X-Git-Url: http://git.pld-linux.org/?p=packages%2Fcrossmingw32-libjpeg.git;a=blobdiff_plain;f=crossmingw32-libjpeg.spec;h=a78109100b90ecb37922adfbf351e28feb4cf920;hp=45dbbc79603aa23f05bc64548cfd0c107115d06a;hb=6df733320ea501fdbb0d2de80a41122f9ac1e0f1;hpb=763f7f07bf939bc35c382fe164268bbe1f406a72 diff --git a/crossmingw32-libjpeg.spec b/crossmingw32-libjpeg.spec index 45dbbc7..a781091 100644 --- a/crossmingw32-libjpeg.spec +++ b/crossmingw32-libjpeg.spec @@ -2,18 +2,18 @@ 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: 8a +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: 5146e68be3633c597b0d14d3ed8fa2ea +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,17 +21,20 @@ 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 +%define filterout_ld -Wl,-z,.* %description The libjpeg package contains a library of functions for manipulating @@ -71,90 +74,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 libjpeg. -current=0 -age=0 -revision=0 +%install +rm -rf $RPM_BUILD_ROOT -# Is this an already installed library? -installed=yes +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT -# Should we warn about portability when linking against -modules? -shouldnotlink=no +install jversion.h $RPM_BUILD_ROOT%{_includedir} -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' +# 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 -# 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 +%{_includedir}/jversion.h %files static %defattr(644,root,root,755) @@ -162,4 +123,4 @@ rm -rf $RPM_BUILD_ROOT %files dll %defattr(644,root,root,755) -%{_dlldir}/libjpeg.dll +%{_dlldir}/libjpeg-*.dll