From 437cf8c3bab133a46595cc7f4af4ce95b16908e0 Mon Sep 17 00:00:00 2001 From: doupengda Date: Thu, 17 Nov 2022 15:35:18 +0800 Subject: [PATCH 1/2] add loongarch64 support (cherry picked from commit 4edf495f1fe756947ef637448f0b21311a79cb29) --- Add-loongarch64.patch | 25 +++++++++++++++++++++++++ libjpeg-turbo.spec | 9 ++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Add-loongarch64.patch diff --git a/Add-loongarch64.patch b/Add-loongarch64.patch new file mode 100644 index 0000000..4bae709 --- /dev/null +++ b/Add-loongarch64.patch @@ -0,0 +1,25 @@ +From 97ca1ba6c5db46675e08899cfda80edf326a21af Mon Sep 17 00:00:00 2001 +From: doupengda +Date: Mon, 5 Dec 2022 02:46:49 +0000 +Subject: [PATCH] Add loongarch64 + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c01ec25..693cfc4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -927,7 +927,7 @@ if(CPU_TYPE STREQUAL "x86_64" OR CPU_TYPE STREQUAL "i386") + # manually. + endif() + else() +- if((CPU_TYPE STREQUAL "powerpc" OR CPU_TYPE STREQUAL "arm64") AND ++ if((CPU_TYPE STREQUAL "powerpc" OR CPU_TYPE STREQUAL "arm64" OR CPU_TYPE STREQUAL "loongarch64") AND + NOT CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT MSVC) + set(DEFAULT_FLOATTEST fp-contract) + else() +-- +2.33.0 + diff --git a/libjpeg-turbo.spec b/libjpeg-turbo.spec index e2411eb..ce7a78a 100644 --- a/libjpeg-turbo.spec +++ b/libjpeg-turbo.spec @@ -1,10 +1,11 @@ Name: libjpeg-turbo Version: 2.1.1 -Release: 3 +Release: 4 Summary: MMX/SSE2/SIMD accelerated libjpeg-compatible JPEG codec library License: IJG URL: http://sourceforge.net/projects/libjpeg-turbo Source0: http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz +Patch0001: Add-loongarch64.patch BuildRequires: gcc cmake libtool nasm @@ -57,6 +58,9 @@ manipulate JPEG files using the TurboJPEG library. %prep %autosetup -n %{name}-%{version} -p1 +%ifnarch loongarch64 +%patch0001 -R -p1 +%endif %build %{cmake} -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES -DENABLE_STATIC:BOOL=NO . @@ -141,6 +145,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test %{?_smp_mflags} %{_mandir}/man1/*.1* %changelog +* Thu Nov 17 2022 doupengda - 2.1.1-4 +- add loongarch64 support + * Wed Jul 13 2022 wangkerong - 2.1.1-3 - utils provide by libjpeg-turbo-utils subpackage,the main package shouldn't provide it -- Gitee From df01b377876f2829f04caa715e415fe5b3006c29 Mon Sep 17 00:00:00 2001 From: dpd Date: Wed, 1 Mar 2023 08:24:59 +0000 Subject: [PATCH 2/2] update libjpeg-turbo.spec. Signed-off-by: dpd (cherry picked from commit 6749ceb6e5ad61494b27a50035035ff2f8a70c22) --- libjpeg-turbo.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libjpeg-turbo.spec b/libjpeg-turbo.spec index ce7a78a..ac3451a 100644 --- a/libjpeg-turbo.spec +++ b/libjpeg-turbo.spec @@ -5,7 +5,9 @@ Summary: MMX/SSE2/SIMD accelerated libjpeg-compatible JPEG codec library License: IJG URL: http://sourceforge.net/projects/libjpeg-turbo Source0: http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz +%ifarch loongarch64 Patch0001: Add-loongarch64.patch +%endif BuildRequires: gcc cmake libtool nasm @@ -58,9 +60,6 @@ manipulate JPEG files using the TurboJPEG library. %prep %autosetup -n %{name}-%{version} -p1 -%ifnarch loongarch64 -%patch0001 -R -p1 -%endif %build %{cmake} -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES -DENABLE_STATIC:BOOL=NO . -- Gitee