- Use _smp_mflags.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 24 Jan 2009 15:58:32 +0000 (15:58 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 24 Jan 2009 15:58:32 +0000 (15:58 +0000)
- Disable static libraries.
- Include documentation.
- Use the same patches as Fedora native package.
- Just run autoconf instead of autoreconf so we don't upgrade libtool.
- +BR mingw32-dlfcn.
- Don't need the manual pages.

jasper/jasper-1.701.0-GL.patch [new file with mode: 0644]
jasper/mingw32-jasper.spec

diff --git a/jasper/jasper-1.701.0-GL.patch b/jasper/jasper-1.701.0-GL.patch
new file mode 100644 (file)
index 0000000..11f0187
--- /dev/null
@@ -0,0 +1,11 @@
+--- jasper-1.701.0.GEO/configure.GL    2006-02-20 20:01:30.000000000 -0600
++++ jasper-1.701.0.GEO/configure       2006-02-24 07:40:46.000000000 -0600
+@@ -9464,7 +9464,7 @@
+ OPENGL_LIBS=""
+ if test $ENABLE_OPENGL = yes; then
+       if test $HAVE_OPENGL = no; then
+-              TMPLIBS="-lglut -lGL -lGLU $X_PRE_LIBS -lX11 -lXmu -lXi -lXext -lXt $X_EXTRA_LIBS $X_LIBS"
++              TMPLIBS="-lglut"
+               echo "$as_me:$LINENO: checking for glutInit in -lglut" >&5
+ echo $ECHO_N "checking for glutInit in -lglut... $ECHO_C" >&6
+ if test "${ac_cv_lib_glut_glutInit+set}" = set; then
index ec96d06..feac057 100644 (file)
@@ -10,22 +10,32 @@ Release:        6%{?dist}
 Summary:        MinGW Windows Jasper library
 
 License:        JasPer
+Group:          Development/Libraries
+
 URL:            http://www.ece.uvic.ca/~mdadams/jasper/
 Source0:        http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-%{version}.zip
-Patch1:         jasper-1.900.1-sleep.patch
-Patch2:         jasper-1.900.1-mingw32.patch
-Patch3:         jasper-1.900.1-enable-shared.patch
-Patch4:         patch-libjasper-stepsizes-overflow.diff
-Group:          Development/Libraries
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# Patches from Fedora native package.
+Patch1:         jasper-1.701.0-GL.patch
+# Note patch2 appears in native package, but is not applied:
+#Patch2:         jasper-1.701.0-GL-ac.patch
+Patch3:         patch-libjasper-stepsizes-overflow.diff
+
+# MinGW-specific patches.
+Patch1000:      jasper-1.900.1-mingw32.patch
+Patch1001:      jasper-1.900.1-sleep.patch
+Patch1002:      jasper-1.900.1-enable-shared.patch
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
 BuildRequires:  mingw32-filesystem >= 23
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-binutils
 BuildRequires:  mingw32-libjpeg
-BuildRequires:  autoconf automake libtool
+BuildRequires:  mingw32-dlfcn
+BuildRequires:  autoconf
+
 
 %description
 MinGW Windows Jasper library.
@@ -33,16 +43,18 @@ MinGW Windows Jasper library.
 
 %prep
 %setup -q -n jasper-%{version}
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
+%patch1 -p1 -b .GL
+%patch3 -p1 -b .CVE-2007-2721
+
+%patch1000 -p1 -b .mingw32
+%patch1001 -p1 -b .sleep
+%patch1002 -p1 -b .shared
 
 
 %build
-autoreconf
+autoconf
 %{_mingw32_configure} --disable-opengl --enable-libjpeg --disable-static
-make
+make %{?_smp_mflags}
 
 
 %install
@@ -50,6 +62,10 @@ rm -rf $RPM_BUILD_ROOT
 
 make DESTDIR=$RPM_BUILD_ROOT install mandir=%{_mingw32_mandir}
 
+# Remove the manual pages - don't duplicate documentation which
+# is in the native Fedora package.
+rm $RPM_BUILD_ROOT%{_mingw32_mandir}/man1/*
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -57,7 +73,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
-# XXX dlls
+%doc COPYRIGHT LICENSE NEWS README
 %{_mingw32_bindir}/i686-pc-mingw32-imgcmp.exe
 %{_mingw32_bindir}/i686-pc-mingw32-imginfo.exe
 %{_mingw32_bindir}/i686-pc-mingw32-jasper.exe
@@ -66,16 +82,17 @@ rm -rf $RPM_BUILD_ROOT
 %{_mingw32_libdir}/libjasper.dll.a
 %{_mingw32_libdir}/libjasper.la
 %{_mingw32_includedir}/jasper/
-%{_mingw32_mandir}/man1/i686-pc-mingw32-imgcmp.1*
-%{_mingw32_mandir}/man1/i686-pc-mingw32-imginfo.1*
-%{_mingw32_mandir}/man1/i686-pc-mingw32-jasper.1*
-%{_mingw32_mandir}/man1/i686-pc-mingw32-jiv.1*
 
 
 %changelog
 * Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-6
 - Use _smp_mflags.
 - Disable static libraries.
+- Include documentation.
+- Use the same patches as Fedora native package.
+- Just run autoconf instead of autoreconf so we don't upgrade libtool.
+- +BR mingw32-dlfcn.
+- Don't need the manual pages.
 
 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-5
 - Rename mingw -> mingw32.