- updated shared patch, replaced one pseudo-libtool hack with another using real...
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 27 Jan 2008 20:17:57 +0000 (20:17 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    crossmingw32-libjpeg.spec -> 1.15

crossmingw32-libjpeg.spec

index 55f32ca..65d1092 100644 (file)
@@ -13,7 +13,10 @@ Patch1:              %{realname}-include.patch
 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)
 
@@ -29,7 +32,8 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %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
 
@@ -75,85 +79,66 @@ libjpeg - biblioteka DLL dla Windows.
 %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'
+       --enable-shared \
+       --enable-static
 
-# Libraries that this one depends upon.
-dependency_libs=''
+cp -f lthack/libtool .
 
-# Version information for libjpeg.
-current=0
-age=0
-revision=0
-
-# 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)
@@ -161,4 +146,4 @@ rm -rf $RPM_BUILD_ROOT
 
 %files dll
 %defattr(644,root,root,755)
-%{_dlldir}/libjpeg.dll
+%{_dlldir}/libjpeg-*.dll
This page took 0.038914 seconds and 4 git commands to generate.