summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gd-2.0.34-multilib.patch113
-rw-r--r--gd-2.1.0-multilib.patch33
-rw-r--r--gd-gdcalloc.patch25
-rw-r--r--gd.spec35
4 files changed, 49 insertions, 157 deletions
diff --git a/gd-2.0.34-multilib.patch b/gd-2.0.34-multilib.patch
deleted file mode 100644
index a2c9e89..0000000
--- a/gd-2.0.34-multilib.patch
+++ /dev/null
@@ -1,113 +0,0 @@
---- /dev/null 2007-09-04 12:46:47.564263777 +0200
-+++ gd-2.0.34/config/gdlib.pc.in 2007-09-04 15:17:09.000000000 +0200
-@@ -0,0 +1,15 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+bindir=@bindir@
-+ldflags=@LDFLAGS@
-+
-+
-+Name: gd-devel
-+Description: A graphics library for quick creation of PNG or JPEG images
-+Version: @VERSION@
-+Requires:
-+Libs: -L${libdir} -lgd
-+Libs.private: @LIBS@
-+Cflags: -I${includedir}
---- gd-2.0.34/Makefile.in.pom 2007-02-03 02:41:46.000000000 +0100
-+++ gd-2.0.34/Makefile.in 2007-02-08 13:34:06.000000000 +0100
-@@ -341,6 +341,7 @@
- ACLOCAL_AMFLAGS = -I config
- SUBDIRS = config test
- bin_SCRIPTS = bdftogd config/gdlib-config
-+pkgconf_CFILE = config/gdlib.pc
- EXTRA_DIST = README-JPEG.TXT README.TXT configure.pl bdftogd demoin.png err.out index.html install-item makefile.sample readme.jpn entities.html entities.tcl
- include_HEADERS = gd.h gdfx.h gd_io.h gdcache.h gdfontg.h gdfontl.h gdfontmb.h gdfonts.h gdfontt.h entities.h
- lib_LTLIBRARIES = libgd.la
-@@ -553,6 +554,15 @@
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- done
-
-+install-pkgconfigCF:
-+ $(mkdir_p) "$(DESTDIR)$(libdir)/pkgconfig"
-+ echo " cp $(pkgconf_CFILE) $(DESTDIR)$(libdir)/pkgconfig/gdlib.pc"
-+ cp $(pkgconf_CFILE) $(DESTDIR)$(libdir)/pkgconfig/gdlib.pc
-+
-+uninstall-pkgconfigCF:
-+ echo " rm $(DESTDIR)$(libdir)/pkgconfig/gdlib.pc"
-+ rm $(DESTDIR)$(libdir)/pkgconfig/gdlib.pc
-+
- mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-@@ -986,7 +996,7 @@
-
- install-data-am: install-includeHEADERS
-
--install-exec-am: install-binPROGRAMS install-binSCRIPTS \
-+install-exec-am: install-binPROGRAMS install-binSCRIPTS install-pkgconfigCF\
- install-libLTLIBRARIES
-
- install-info: install-info-recursive
-@@ -1015,7 +1025,7 @@
-
- ps-am:
-
--uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
-+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-pkgconfigCF\
- uninstall-includeHEADERS uninstall-info-am \
- uninstall-libLTLIBRARIES
-
---- gd-2.0.34/config/gdlib-config.in.pom 2007-02-03 02:41:00.000000000 +0100
-+++ gd-2.0.34/config/gdlib-config.in 2007-02-08 13:27:25.000000000 +0100
-@@ -7,9 +7,10 @@
- # installation directories
- prefix=@prefix@
- exec_prefix=@exec_prefix@
--libdir=@libdir@
-+libdir=`pkg-config gdlib --variable=libdir`
- includedir=@includedir@
- bindir=@bindir@
-+ldflags=`pkg-config gdlib --variable=ldflags`
-
- usage()
- {
-@@ -68,7 +69,7 @@
- echo @GDLIB_REVISION@
- ;;
- --ldflags)
-- echo @LDFLAGS@
-+ echo $ldflags
- ;;
- --libs)
- echo @LIBS@ @LIBICONV@
-@@ -83,7 +84,7 @@
- echo "GD library @VERSION@"
- echo "includedir: $includedir"
- echo "cflags: -I@includedir@"
-- echo "ldflags: @LDFLAGS@"
-+ echo "ldflags: $ldflags"
- echo "libs: @LIBS@ @LIBICONV@"
- echo "libdir: $libdir"
- echo "features: @FEATURES@"
---- gd-2.0.34/configure.pom 2007-02-08 13:25:00.000000000 +0100
-+++ gd-2.0.34/configure 2007-02-08 13:31:53.000000000 +0100
-@@ -24672,7 +24672,7 @@
- Support for pthreads: $acx_pthread_ok
- " >&6; }
-
--ac_config_files="$ac_config_files Makefile config/Makefile config/gdlib-config test/Makefile"
-+ac_config_files="$ac_config_files Makefile config/Makefile config/gdlib-config config/gdlib.pc test/Makefile"
-
-
- cat >confcache <<\_ACEOF
-@@ -25257,6 +25257,7 @@
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;;
- "config/gdlib-config") CONFIG_FILES="$CONFIG_FILES config/gdlib-config" ;;
-+ "config/gdlib.pc" ) CONFIG_FILES="$CONFIG_FILES config/gdlib.pc" ;;
- "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
-
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
diff --git a/gd-2.1.0-multilib.patch b/gd-2.1.0-multilib.patch
new file mode 100644
index 0000000..c4fdc63
--- /dev/null
+++ b/gd-2.1.0-multilib.patch
@@ -0,0 +1,33 @@
+diff -up gd-2.1.0/config/gdlib-config.in.multilib gd-2.1.0/config/gdlib-config.in
+--- gd-2.1.0/config/gdlib-config.in.multilib 2013-04-21 16:58:17.820010758 +0200
++++ gd-2.1.0/config/gdlib-config.in 2013-04-21 16:59:27.896317922 +0200
+@@ -7,9 +7,10 @@
+ # installation directories
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-libdir=@libdir@
++libdir=`pkg-config gdlib --variable=libdir`
+ includedir=@includedir@
+ bindir=@bindir@
++ldflags=`pkg-config gdlib --variable=ldflags`
+
+ usage()
+ {
+@@ -68,7 +69,7 @@ while test $# -gt 0; do
+ echo @GDLIB_REVISION@
+ ;;
+ --ldflags)
+- echo @LDFLAGS@
++ echo $ldflags
+ ;;
+ --libs)
+ echo -lgd @LIBS@ @LIBICONV@
+@@ -83,7 +84,7 @@ while test $# -gt 0; do
+ echo "GD library @VERSION@"
+ echo "includedir: $includedir"
+ echo "cflags: -I@includedir@"
+- echo "ldflags: @LDFLAGS@"
++ echo "ldflags: $ldflags"
+ echo "libs: @LIBS@ @LIBICONV@"
+ echo "libdir: $libdir"
+ echo "features: @FEATURES@"
diff --git a/gd-gdcalloc.patch b/gd-gdcalloc.patch
deleted file mode 100644
index 00815ad..0000000
--- a/gd-gdcalloc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/src/gd.h b/src/gd.h
-index 50dfe7f..1a33e98 100644
---- a/src/gd.h
-+++ b/src/gd.h
-@@ -729,6 +729,7 @@ BGD_DECLARE(void) gdImagePngCtxEx (gdImagePtr im, gdIOCtx * out, int level);
- BGD_DECLARE(void) gdImageWBMP (gdImagePtr image, int fg, FILE * out);
- BGD_DECLARE(void) gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out);
-
-+BGD_DECLARE(void *) gdCalloc (size_t nmemb, size_t size);
- /* Guaranteed to correctly free memory returned by the gdImage*Ptr
- functions */
- BGD_DECLARE(void) gdFree (void *m);
-diff --git a/src/gdhelpers.c b/src/gdhelpers.c
-index 577e9d5..0e6cf61 100644
---- a/src/gdhelpers.c
-+++ b/src/gdhelpers.c
-@@ -61,7 +61,7 @@ gd_strtok_r (char *s, char *sep, char **state)
- return result;
- }
-
--void *
-+BGD_DECLARE(void *)
- gdCalloc (size_t nmemb, size_t size)
- {
- return calloc (nmemb, size);
diff --git a/gd.spec b/gd.spec
index fcd1c5b..bf4ee29 100644
--- a/gd.spec
+++ b/gd.spec
@@ -7,8 +7,8 @@ Release: 0.1.preview%{?dist}
Group: System Environment/Libraries
License: MIT
URL: http://libgd.bitbucket.org/
-Source0: https://bitbucket.org/libgd/gd-libgd/downloads/gd-%{version}%{?prever}.tgz
-Patch3: gd-2.0.34-multilib.patch
+Source0: https://bitbucket.org/libgd/gd-libgd/downloads/gd-%{version}%{?prever}.tar.xz
+Patch1: gd-2.1.0-multilib.patch
Patch4: gd-loop.patch
Patch5: gd-2.0.34-sparc64.patch
Patch6: gd-2.0.35-overflow.patch
@@ -24,17 +24,16 @@ Patch15: gd-sa3.patch
Patch16: gd-sa4.patch
Patch17: gd-aarch64.patch
-# https://bitbucket.org/libgd/gd-libgd/pull-request/4
-Patch20: gd-gdcalloc.patch
-
BuildRequires: freetype-devel
BuildRequires: fontconfig-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
+BuildRequires: libvpx-devel
BuildRequires: libX11-devel
BuildRequires: libXpm-devel
BuildRequires: zlib-devel
BuildRequires: pkgconfig
+BuildRequires: chrpath
# we need cmake for building test suite
BuildRequires: cmake
@@ -66,6 +65,7 @@ Requires: freetype-devel%{?_isa}
Requires: fontconfig-devel%{?_isa}
Requires: libjpeg-devel%{?_isa}
Requires: libpng-devel%{?_isa}
+Requires: libvpx-devel%{?_isa}
Requires: libX11-devel%{?_isa}
Requires: libXpm-devel%{?_isa}
Requires: zlib-devel%{?_isa}
@@ -78,7 +78,7 @@ files for gd, a graphics library for creating PNG and JPEG graphics.
%prep
%setup -q -n gd-%{version}
-#patch3 -p1 -b .mlib
+%patch1 -p1 -b .mlib
#patch4 -p1 -b .loop
#patch6 -p1 -b .overflow
#patch5 -p1 -b .sparc64
@@ -94,19 +94,8 @@ files for gd, a graphics library for creating PNG and JPEG graphics.
#patch16 -p1 -b .sa4
#patch17 -p1 -b .aarch64
-# Missing sources
-sed -e '/SOURCES/s/$/ gd_bmp.c bmp.h gd_tga.c gd_tga.h/' \
- -i src/Makefile.am
-
-# Export gdCalloc
-%patch20 -p1 -b .gdcalloc
-
-# Disable failed tests
-sed -e '/bmp_im2im/d' -i tests/bmp/CMakeLists.txt
-sed -e '/gdimageline_aa/d' -i tests/gdimageline/CMakeLists.txt
-
-# Generate autotool stuff
-./bootstrap.sh
+# Generate autotool stuff (when build git git archive)
+[ -f configure ] || ./bootstrap.sh
%build
#cmake -DENABLE_PNG=1 \
@@ -126,10 +115,18 @@ make install INSTALL='install -p' DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.a
+# Using the last resort to remove rpath, another tricks didn't help
+chrpath --delete $RPM_BUILD_ROOT%{_bindir}/{pngtogd,gdparttopng,annotate,gdcmpgif,gdtopng,webpng,pngtogd2,gd2togif,gd2copypal,giftogd2,gd2topng}
+
%check
top=$(pwd)
pushd tests
+
+# Disable failed tests
+sed -e '/bmp_im2im/d' -i bmp/CMakeLists.txt
+sed -e '/gdimageline_aa/d' -i gdimageline/CMakeLists.txt
+
cmake -DBUILD_TEST=1 \
-DGD_INCLUDE_DIR="$top/src" \
-DGD_LIBS_DIR="$top/src/.libs" \