]> git.pld-linux.org Git - packages/libjpeg-turbo.git/blobdiff - libjpeg-turbo.spec
- fix arch dependant build
[packages/libjpeg-turbo.git] / libjpeg-turbo.spec
index 43ee1cdda5348f3c3b187df48e5fdcc559ae9904..3cd49680eb89f4fa13f460721d441575badc2e51 100644 (file)
@@ -1,25 +1,32 @@
-%bcond_without tests
-
+#
+# Conditional build
+%bcond_without tests   # don't perform "make test"
+%bcond_without java    # Java binding
+#
 %define                libjpeg_ver     8c
+%define                libjpeg_ver_lt  9-1
 Summary:       A MMX/SSE2 accelerated library for manipulating JPEG image files
 Summary(pl.UTF-8):     Biblioteka do obróbki plików obrazów JPEG z akceleracją MMX/SSE2
 Name:          libjpeg-turbo
-Version:       1.2.0
+Version:       1.3.1
 Release:       1
 License:       wxWidgets
 Group:         Libraries
 Source0:       http://downloads.sourceforge.net/libjpeg-turbo/%{name}-%{version}.tar.gz
-# Source0-md5: 5329fa80953938cb4f097afae55059e2
+# Source0-md5: 2c3a68129dac443a72815ff5bb374b05
 URL:           http://libjpeg-turbo.virtualgl.org/
-Patch0:                %{name}-turbojpeg.patch
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.56
 BuildRequires: automake
+%{?with_java:BuildRequires:    jdk}
 BuildRequires: libstdc++-devel
 BuildRequires: libtool
-BuildRequires: libtool
+# x86* SIMD code uses NASM; arm uses gas, no SIMD code for other archs
+%ifarch %{ix86} %{x8664}
 BuildRequires: nasm
+%endif
 Provides:      libjpeg = %{libjpeg_ver}
-Obsoletes:     libjpeg >= %{libjpeg_ver}
+Obsoletes:     libjpeg < %{libjpeg_ver_lt}
+Obsoletes:     libjpegsimd
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -29,7 +36,7 @@ compression/decompression by about 2-4x on x86 and x86-64 platforms.
 It is based on libjpeg/SIMD but has numerous enhancements.
 
 %description -l pl.UTF-8
-libjpeg-turbo to wersja biblioteki libjpeg, wykorzystująca instrukcje
+libjpeg-turbo to wersja biblioteki libjpeg wykorzystująca instrukcje
 SIMD MMX, SSE i SSE2 w celu przyspieszenia kompresji/dekompresji JPEG
 o około 2-4 razy na platformach x86 i x86-64. Jest oparta na
 libjpeg/SIMD, ale ma wiele rozszerzeń.
@@ -40,7 +47,8 @@ Summary(pl.UTF-8):    Pliki nagłówkowe do tworzenia programów przy użyciu libjp
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Provides:      libjpeg-devel = %{libjpeg_ver}
-Obsoletes:     libjpeg-devel >= %{libjpeg_ver}
+Obsoletes:     libjpeg-devel < %{libjpeg_ver_lt}
+Obsoletes:     libjpegsimd-devel
 Conflicts:     libjpeg6-devel
 
 %description devel
@@ -90,7 +98,8 @@ Summary(uk.UTF-8):    Статична бібліотека для програму
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 Provides:      libjpeg-static = %{libjpeg_ver}
-Obsoletes:     libjpeg-static >= %{libjpeg_ver}
+Obsoletes:     libjpeg-static < %{libjpeg_ver_lt}
+Obsoletes:     libjpegsimd-static
 Conflicts:     libjpeg-turbo6-static
 
 %description static
@@ -118,7 +127,8 @@ Summary(pl.UTF-8):  Kilka prostych programów do manipulowania na plikach JPEG
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Provides:      libjpeg-progs = %{libjpeg_ver}
-Obsoletes:     libjpeg-progs >= %{libjpeg_ver}
+Obsoletes:     libjpeg-progs < %{libjpeg_ver_lt}
+Obsoletes:     libjpegsimd-progs
 Conflicts:     libjpeg-turbo6-progs
 
 %description progs
@@ -142,9 +152,21 @@ zwykłego pliku obrazu, jpegtran potrafi wykonywać różne
 przekształcenia na plikach JPEG. rdjpgcom wyświetla komentarze
 tekstowe dołączone do pliku JPEG, a wrjpgcom wstawia takie komentarze.
 
+%package -n java-turbojpeg
+Summary:       Java wrapper for the TurboJPEG/OSS library
+Summary(pl.UTF-8):     Interfejs Javy do biblioteki TurboJPEG/OSS
+Group:         Development/Languages/Java
+Requires:      %{name} = %{version}-%{release}
+Requires:      jpackage-utils
+
+%description -n java-turbojpeg
+Java wrapper for the TurboJPEG/OSS library.
+
+%description -n java-turbojpeg -l pl.UTF-8
+Interfejs Javy do biblioteki TurboJPEG/OSS.
+
 %prep
 %setup -q
-%patch0 -p1
 
 %build
 %{__libtoolize}
@@ -153,11 +175,16 @@ tekstowe dołączone do pliku JPEG, a wrjpgcom wstawia takie komentarze.
 %{__automake}
 
 %configure \
+       %{?with_java:JNI_CFLAGS="-I%{_jvmdir}/java/include -I%{_jvmdir}/java/include/linux"} \
        --enable-shared \
        --enable-static \
+       %{?with_java:--with-java} \
+%ifnarch %{ix86} %{x8664}
+       --without-simd \
+%endif
        --with-jpeg8
 
-%{__make}
+%{__make} -j1
 
 %{?with_tests:%{__make} test}
 
@@ -167,6 +194,11 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with java}
+install -d $RPM_BUILD_ROOT%{_javadir}
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/classes/turbojpeg.jar $RPM_BUILD_ROOT%{_javadir}
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -211,3 +243,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/jpegtran.1*
 %{_mandir}/man1/rdjpgcom.1*
 %{_mandir}/man1/wrjpgcom.1*
+
+%if %{with java}
+%files -n java-turbojpeg
+%defattr(644,root,root,755)
+%doc java/doc/*
+%{_javadir}/turbojpeg.jar
+%endif
This page took 0.028988 seconds and 4 git commands to generate.