]> git.pld-linux.org Git - packages/crossmingw32-libjpeg.git/blobdiff - crossmingw32-libjpeg.spec
- updated to 9a
[packages/crossmingw32-libjpeg.git] / crossmingw32-libjpeg.spec
index 9fe2b4d3f130f359611099953eb16d5fdc7114c1..1ff8578ab18c8caa5938fc644e513a76b6ff85ec 100644 (file)
@@ -1,19 +1,19 @@
 %define                realname        libjpeg
-Summary:       Library for handling different jpeg files - Mingw32 cross version
-Summary(pl.UTF-8):     Biblioteka do manipulacji plikami w formacie jpeg - wersja skrośna dla Mingw32
+Summary:       Library for handling different jpeg files - MinGW32 cross version
+Summary(pl.UTF-8):     Biblioteka do manipulacji plikami w formacie jpeg - wersja skrośna dla MinGW32
 Name:          crossmingw32-%{realname}
-Version:       6b
-Release:       5
+Version:       9a
+Release:       1
 License:       distributable
 Group:         Development/Libraries
-Source0:       ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v%{version}.tar.gz
-# Source0-md5: dbd5f3b47ed13132f04c685d608a7547
-Patch0:                %{realname}-DESTDIR.patch
-Patch1:                %{realname}-include.patch
-Patch2:                %{realname}-c++.patch
-Patch3:                %{name}-shared.patch
+Source0:       http://www.ijg.org/files/jpegsrc.v%{version}.tar.gz
+# Source0-md5: 3353992aecaee1805ef4109aadd433e7
+Patch0:                %{realname}-maxmem-sysconf.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)
 
@@ -21,18 +21,23 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                target                  i386-mingw32
 %define                target_platform         i386-pc-mingw32
-%define                arch                    %{_prefix}/%{target}
 
 %define                _sysprefix              /usr
 %define                _prefix                 %{_sysprefix}/%{target}
+%define                _libdir                 %{_prefix}/lib
 %define                _dlldir                 /usr/share/wine/windows/system
 %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
 
+# -z options are invalid for mingw linker, most of -f options are Linux-specific
+%define                filterout_ld    -Wl,-z,.*
+%define                filterout_c     -f[-a-z0-9=]*
+
 %description
 The libjpeg package contains a library of functions for manipulating
 JPEG images.
@@ -45,16 +50,16 @@ Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg.
 Ten pakiet zawiera wersję skrośną dla Win32.
 
 %package static
-Summary:       Static libjpeg library (cross mingw32 version)
-Summary(pl.UTF-8):     Statyczna biblioteka libjpeg (wersja skrośna mingw32)
+Summary:       Static libjpeg library (cross MinGW32 version)
+Summary(pl.UTF-8):     Statyczna biblioteka libjpeg (wersja skrośna MinGW32)
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description static
-Static libjpeg library (cross mingw32 version).
+Static libjpeg library (cross MinGW32 version).
 
 %description static -l pl.UTF-8
-Statyczna biblioteka libjpeg (wersja skrośna mingw32).
+Statyczna biblioteka libjpeg (wersja skrośna MinGW32).
 
 %package dll
 Summary:       libjpeg - DLL library for Windows
@@ -71,88 +76,48 @@ libjpeg - biblioteka DLL dla Windows.
 %prep
 %setup -q -n jpeg-%{version}
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
 
 %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%{arch}/include" ; export CPPFLAGS
-RANLIB=%{target}-ranlib ; export RANLIB
-LDSHARED="%{target}-gcc -shared" ; export LDSHARED
-TARGET="%{target}" ; export TARGET
-
 %configure \
        --target=%{target} \
        --host=%{target} \
-       --build=i386-linux \
-       --prefix=%{arch}
+       --disable-silent-rules
 
 %{__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=''
 
-# Version information for libz.
-current=0
-age=0
-revision=0
-
-# Is this an already installed library?
-installed=yes
+%install
+rm -rf $RPM_BUILD_ROOT
 
-# Should we warn about portability when linking against -modules?
-shouldnotlink=no
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
+install jversion.h $RPM_BUILD_ROOT%{_includedir}
 
-# Directory that this library needs to be installed in:
-libdir='%{_libdir}'
-EOF
+# remove HAVE_STD{DEF,LIB}_H
+# (not necessary but may generate warnings confusing autoconf)
+sed -i -e 's#.*HAVE_STD..._H.*##g' $RPM_BUILD_ROOT%{_includedir}/jconfig.h
 
-%{target}-strip jpeg.dll
-%{target}-strip -g -R.comment -R.note *.a
+install -d $RPM_BUILD_ROOT%{_dlldir}
+mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
 
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_prefix}/{include,lib,bin}
-
-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%{_bindir}/libjpeg.dll
-install libjpeg.la $RPM_BUILD_ROOT%{_libdir}
+%if 0%{!?debug:1}
+%{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
 
 %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
+%{_includedir}/jversion.h
 
 %files static
 %defattr(644,root,root,755)
@@ -160,4 +125,4 @@ rm -rf $RPM_BUILD_ROOT
 
 %files dll
 %defattr(644,root,root,755)
-%{_bindir}/libjpeg.dll
+%{_dlldir}/libjpeg-9.dll
This page took 0.03842 seconds and 4 git commands to generate.