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:
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
Name: libjpeg-turbo
Epoch: 1
Version: 1.5.0
Release: 3
#Epoch: 1
Version: 3.0.4
Release: 1
License: wxWidgets Library License
Group: System/Libraries
Url: http://www.libjpeg-turbo.org
Source0: https://sourceforge.net/projects/libjpeg-turbo/files/%{version}/%{name}-%{version}.tar.gz
URL: https://www.libjpeg-turbo.org
#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
# camera which have orientation markings in the EXIF data. After rotation
# the orientation markings are reset to avoid duplicate rotation when
@ -102,6 +103,7 @@ library.
%{_includedir}/*.h
%{_libdir}/pkgconfig/libjpeg.pc
%{_libdir}/pkgconfig/libturbojpeg.pc
%{_libdir}/cmake/libjpeg-turbo/*.cmake
#----------------------------------------------------------------------------
@ -159,32 +161,35 @@ cp %{SOURCE2} jpegexiforient.c
cp %{SOURCE3} exifautotran
%build
CONFIGURE_TOP="$PWD"
# Prepare build dirs
mkdir -p jpeg8
mkdir -p jpeg62
# Build jpeg v8 API
pushd jpeg8
CFLAGS="%{optflags} -Ofast -funroll-loops" \
%configure2_5x \
--enable-shared \
--enable-static \
--with-jpeg8
%make
%cmake ../.. -DWITH_JPEG8="True"
%make_build -s
popd
mkdir -p jpeg62
# Build jpeg v6.2 API
pushd jpeg62
CFLAGS="%{optflags} -Ofast -funroll-loops" \
%configure2_5x \
--enable-shared \
--disable-static
%make
%cmake ../.. \
-DWITH_ARITH_DEC="True" \
-DWITH_ARITH_ENC="True"
%make_build -s
popd
# Build jpegexiforient binary
%__cc %{optflags} %{ldflags} -o jpegexiforient jpegexiforient.c
%install
make install-libLTLIBRARIES DESTDIR=%{buildroot} -C jpeg62
%makeinstall_std -C jpeg8
%make_install -C jpeg8/build
%make_install -C jpeg62/build
install -m755 jpegexiforient -D %{buildroot}%{_bindir}/jpegexiforient
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
install -m644 jpegint.h -D %{buildroot}%{_includedir}/jpegint.h
# cleanup
# Cleanup
rm -rf %{buildroot}%{_docdir}/*