packages: crossmingw32-libjpeg/crossmingw32-libjpeg.spec, crossmingw32-libj...
qboosh
qboosh at pld-linux.org
Sun Mar 21 08:56:46 CET 2010
Author: qboosh Date: Sun Mar 21 07:56:46 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- updated to 8a (merged from libjpeg.spec)
---- Files affected:
packages/crossmingw32-libjpeg:
crossmingw32-libjpeg.spec (1.16 -> 1.17) , libjpeg-maxmem-sysconf.patch (NONE -> 1.1) (NEW), crossmingw32-libjpeg-shared.patch (1.2 -> NONE) (REMOVED), libjpeg-DESTDIR.patch (1.1 -> NONE) (REMOVED), libjpeg-c++.patch (1.2 -> NONE) (REMOVED), libjpeg-include.patch (1.1 -> NONE) (REMOVED)
---- Diffs:
================================================================
Index: packages/crossmingw32-libjpeg/crossmingw32-libjpeg.spec
diff -u packages/crossmingw32-libjpeg/crossmingw32-libjpeg.spec:1.16 packages/crossmingw32-libjpeg/crossmingw32-libjpeg.spec:1.17
--- packages/crossmingw32-libjpeg/crossmingw32-libjpeg.spec:1.16 Mon Jul 28 00:22:37 2008
+++ packages/crossmingw32-libjpeg/crossmingw32-libjpeg.spec Sun Mar 21 08:56:41 2010
@@ -3,16 +3,13 @@
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: 6
+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
@@ -37,6 +34,8 @@
# 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
@@ -76,50 +75,27 @@
%prep
%setup -q -n jpeg-%{version}
%patch0 -p1
-%patch1 -p1
-%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
-cd lthack
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%configure \
- --target=%{target} \
- --host=%{target}
-cd ..
-
%configure \
--target=%{target} \
--host=%{target} \
- --enable-shared \
- --enable-static
-
-cp -f lthack/libtool .
+ --disable-silent-rules
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}
-%{__make} install-headers install-lib \
- libdir=%{_libdir} \
+%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+install jversion.h $RPM_BUILD_ROOT%{_includedir}
+
+# 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
+
install -d $RPM_BUILD_ROOT%{_dlldir}
mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
@@ -140,6 +116,7 @@
%{_includedir}/jerror.h
%{_includedir}/jmorecfg.h
%{_includedir}/jpeglib.h
+%{_includedir}/jversion.h
%files static
%defattr(644,root,root,755)
@@ -155,6 +132,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.17 2010/03/21 07:56:41 qboosh
+- updated to 8a (merged from libjpeg.spec)
+
Revision 1.16 2008/07/27 22:22:37 arekm
- release 6
================================================================
Index: packages/crossmingw32-libjpeg/libjpeg-maxmem-sysconf.patch
diff -u /dev/null packages/crossmingw32-libjpeg/libjpeg-maxmem-sysconf.patch:1.1
--- /dev/null Sun Mar 21 08:56:46 2010
+++ packages/crossmingw32-libjpeg/libjpeg-maxmem-sysconf.patch Sun Mar 21 08:56:41 2010
@@ -0,0 +1,49 @@
+# Make a reasonable guess about memory limits using sysconf().
+# includes 5% slop factor as suggested in documentation.
+
+--- jpeg-6b/jmemansi.c
++++ jpeg-6b/jmemansi.c
+@@ -12,6 +12,15 @@
+ * is shoved onto the user.
+ */
+
++#include <unistd.h>
++
++#ifdef __FreeBSD__
++# include <sys/types.h>
++# include <sys/sysctl.h>
++# include <sys/vmmeter.h>
++# include <vm/vm_param.h>
++#endif
++
+ #define JPEG_INTERNALS
+ #include "jinclude.h"
+ #include "jpeglib.h"
+@@ -157,7 +166,26 @@
+ GLOBAL(long)
+ jpeg_mem_init (j_common_ptr cinfo)
+ {
+- return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
++#ifdef _SC_AVPHYS_PAGES
++ long phys_size;
++
++ if ((phys_size = sysconf(_SC_AVPHYS_PAGES)) == -1)
++ return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
++ if ((phys_size *= sysconf(_SC_PAGESIZE)) < 0)
++ return DEFAULT_MAX_MEM;
++ return (long) (phys_size * 0.95);
++#elif defined(HAVE_SYSCTL) && defined(HW_PHYSMEM)
++ /* This works on *bsd and darwin. */
++ unsigned int physmem;
++ size_t len = sizeof physmem;
++ static int mib[2] = { CTL_HW, HW_PHYSMEM };
++
++ if (sysctl (mib, ARRAY_SIZE (mib), &physmem, &len, NULL, 0) == 0
++ && len == sizeof (physmem))
++ return (long) (physmem * 0.95);
++#endif
++
++ return DEFAULT_MAX_MEM;
+ }
+
+ GLOBAL(void)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/crossmingw32-libjpeg/crossmingw32-libjpeg.spec?r1=1.16&r2=1.17&f=u
More information about the pld-cvs-commit
mailing list