This commit is contained in:
Sergey Zhemoytel 2024-09-16 21:28:14 +00:00
parent a5ed9049db
commit 82397cdbb0
2 changed files with 26 additions and 21 deletions

View file

@ -1,2 +1,2 @@
sources: sources:
libjpeg-turbo-1.5.0.tar.gz: 9adc21b927e48e4c6889e77079f6c1f3eecf98ab libjpeg-turbo-3.0.4.tar.gz: 17e24c844e95587bc7bd2f3c895565cc133ca182

View file

@ -11,13 +11,14 @@
Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files
Name: libjpeg-turbo Name: libjpeg-turbo
Epoch: 1 #Epoch: 1
Version: 1.5.0 Version: 3.0.4
Release: 3 Release: 1
License: wxWidgets Library License License: wxWidgets Library License
Group: System/Libraries Group: System/Libraries
Url: http://www.libjpeg-turbo.org URL: https://www.libjpeg-turbo.org
Source0: https://sourceforge.net/projects/libjpeg-turbo/files/%{version}/%{name}-%{version}.tar.gz #Source0: https://sourceforge.net/projects/libjpeg-turbo/files/%{version}/%{name}-%{version}.tar.gz
Source0: https://github.com/libjpeg-turbo/libjpeg-turbo/archive/%{version}/%{name}-%{version}.tar.gz
# These two allow automatic lossless rotation of JPEG images from a digital # These two allow automatic lossless rotation of JPEG images from a digital
# camera which have orientation markings in the EXIF data. After rotation # camera which have orientation markings in the EXIF data. After rotation
# the orientation markings are reset to avoid duplicate rotation when # the orientation markings are reset to avoid duplicate rotation when
@ -102,6 +103,7 @@ library.
%{_includedir}/*.h %{_includedir}/*.h
%{_libdir}/pkgconfig/libjpeg.pc %{_libdir}/pkgconfig/libjpeg.pc
%{_libdir}/pkgconfig/libturbojpeg.pc %{_libdir}/pkgconfig/libturbojpeg.pc
%{_libdir}/cmake/libjpeg-turbo/*.cmake
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -159,32 +161,35 @@ cp %{SOURCE2} jpegexiforient.c
cp %{SOURCE3} exifautotran cp %{SOURCE3} exifautotran
%build %build
CONFIGURE_TOP="$PWD" # Prepare build dirs
mkdir -p jpeg8 mkdir -p jpeg8
mkdir -p jpeg62
# Build jpeg v8 API
pushd jpeg8 pushd jpeg8
CFLAGS="%{optflags} -Ofast -funroll-loops" \ CFLAGS="%{optflags} -Ofast -funroll-loops" \
%configure2_5x \ %cmake ../.. -DWITH_JPEG8="True"
--enable-shared \
--enable-static \ %make_build -s
--with-jpeg8
%make
popd popd
mkdir -p jpeg62 # Build jpeg v6.2 API
pushd jpeg62 pushd jpeg62
CFLAGS="%{optflags} -Ofast -funroll-loops" \ CFLAGS="%{optflags} -Ofast -funroll-loops" \
%configure2_5x \ %cmake ../.. \
--enable-shared \ -DWITH_ARITH_DEC="True" \
--disable-static -DWITH_ARITH_ENC="True"
%make
%make_build -s
popd popd
# Build jpegexiforient binary
%__cc %{optflags} %{ldflags} -o jpegexiforient jpegexiforient.c %__cc %{optflags} %{ldflags} -o jpegexiforient jpegexiforient.c
%install %install
make install-libLTLIBRARIES DESTDIR=%{buildroot} -C jpeg62 %make_install -C jpeg8/build
%makeinstall_std -C jpeg8 %make_install -C jpeg62/build
install -m755 jpegexiforient -D %{buildroot}%{_bindir}/jpegexiforient install -m755 jpegexiforient -D %{buildroot}%{_bindir}/jpegexiforient
install -m755 exifautotran -D %{buildroot}%{_bindir}/exifautotran install -m755 exifautotran -D %{buildroot}%{_bindir}/exifautotran
@ -192,5 +197,5 @@ install -m755 exifautotran -D %{buildroot}%{_bindir}/exifautotran
#(neoclust) Provide jpegint.h because it is needed by certain software #(neoclust) Provide jpegint.h because it is needed by certain software
install -m644 jpegint.h -D %{buildroot}%{_includedir}/jpegint.h install -m644 jpegint.h -D %{buildroot}%{_includedir}/jpegint.h
# cleanup # Cleanup
rm -rf %{buildroot}%{_docdir}/* rm -rf %{buildroot}%{_docdir}/*