SPECS: crossmingw32-libjpeg.spec - updated shared patch, replaced ...
qboosh
qboosh at pld-linux.org
Sun Jan 27 21:18:02 CET 2008
Author: qboosh Date: Sun Jan 27 20:18:02 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- updated shared patch, replaced one pseudo-libtool hack with another using real libtool
---- Files affected:
SPECS:
crossmingw32-libjpeg.spec (1.14 -> 1.15)
---- Diffs:
================================================================
Index: SPECS/crossmingw32-libjpeg.spec
diff -u SPECS/crossmingw32-libjpeg.spec:1.14 SPECS/crossmingw32-libjpeg.spec:1.15
--- SPECS/crossmingw32-libjpeg.spec:1.14 Mon Jan 14 20:28:19 2008
+++ SPECS/crossmingw32-libjpeg.spec Sun Jan 27 21:17:57 2008
@@ -14,7 +14,10 @@
Patch2: %{realname}-c++.patch
Patch3: %{name}-shared.patch
URL: http://www.ijg.org/
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake
BuildRequires: crossmingw32-gcc
+BuildRequires: libtool
Requires: crossmingw32-runtime
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -30,7 +33,8 @@
%define __cc %{target}-gcc
%define __cxx %{target}-g++
-%ifarch alpha sparc sparc64 sparcv9
+%ifnarch %{ix86}
+# arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
%define optflags -O2
%endif
@@ -76,85 +80,66 @@
%patch2 -p1
%patch3 -p1
+cp /usr/share/automake/config.* .
+
+# hack: use recent libtool by configuring for mingw32 in separate dir
+# (cannot regenerate main ac/lt because of missing configure.in)
+mkdir lthack
+cd lthack
+cat >configure.ac <<EOF
+AC_INIT(lthack, 0)
+AC_CONFIG_AUX_DIR(..)
+AC_PROG_LIBTOOL
+EOF
+
%build
-CC=%{target}-gcc ; export CC
-CXX=%{target}-g++ ; export CXX
-LD=%{target}-ld ; export LD
-AR=%{target}-ar ; export AR
-AS=%{target}-as ; export AS
-CROSS_COMPILE=1 ; export CROSS_COMPILE
-CPPFLAGS="-I%{_includedir}" ; export CPPFLAGS
-RANLIB=%{target}-ranlib ; export RANLIB
-LDSHARED="%{target}-gcc -shared" ; export LDSHARED
-TARGET="%{target}" ; export TARGET
+cd lthack
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%configure \
+ --target=%{target} \
+ --host=%{target}
+cd ..
%configure \
--target=%{target} \
--host=%{target} \
- --build=i386-linux
-
-%{__make}
-%{__make} jpeg.dll
-
-cat << "EOF" >> libjpeg.la
-# libjpeg.la - a libtool library file
-# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
-# ^^^^ This line needs to stay
-# Made by czarny czarny at pld-linux.org
-
-# The name that we can dlopen(3).
-dlname='../bin/libjpeg.dll'
-
-# Names of this library.
-library_names='libjpeg.dll.a'
-
-# The name of the static archive.
-old_library='libjpeg.a'
-
-# Libraries that this one depends upon.
-dependency_libs=''
+ --enable-shared \
+ --enable-static
-# Version information for libjpeg.
-current=0
-age=0
-revision=0
+cp -f lthack/libtool .
-# Is this an already installed library?
-installed=yes
+%{__make}
-# Should we warn about portability when linking against -modules?
-shouldnotlink=no
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
+%{__make} install-headers install-lib \
+ libdir=%{_libdir} \
+ DESTDIR=$RPM_BUILD_ROOT
-# Directory that this library needs to be installed in:
-libdir='%{_libdir}'
-EOF
+install -d $RPM_BUILD_ROOT%{_dlldir}
+mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
%if 0%{!?debug:1}
-%{target}-strip jpeg.dll
-%{target}-strip -g -R.comment -R.note *.a
+%{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
+%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
%endif
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}
-
-install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{_includedir}
-install *.a $RPM_BUILD_ROOT%{_libdir}
-install jpeg.dll $RPM_BUILD_ROOT%{_dlldir}/libjpeg.dll
-install libjpeg.la $RPM_BUILD_ROOT%{_libdir}
-
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
+%doc README change.log
%{_libdir}/libjpeg.dll.a
%{_libdir}/libjpeg.la
-%{_includedir}/*.h
+%{_includedir}/jconfig.h
+%{_includedir}/jerror.h
+%{_includedir}/jmorecfg.h
+%{_includedir}/jpeglib.h
%files static
%defattr(644,root,root,755)
@@ -162,7 +147,7 @@
%files dll
%defattr(644,root,root,755)
-%{_dlldir}/libjpeg.dll
+%{_dlldir}/libjpeg-*.dll
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -170,6 +155,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.15 2008-01-27 20:17:57 qboosh
+- updated shared patch, replaced one pseudo-libtool hack with another using real libtool
+
Revision 1.14 2008-01-14 19:28:19 qboosh
- force %{_lib}-independent libdir
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/crossmingw32-libjpeg.spec?r1=1.14&r2=1.15&f=u
More information about the pld-cvs-commit
mailing list