Accepting request 212283 from graphics

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/212283
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gd?expand=0&rev=29
This commit is contained in:
Stephan Kulow
2013-12-26 16:36:49 +00:00
committed by Git OBS Bridge
parent 45195ac482
commit d7f3d21394
13 changed files with 108 additions and 169 deletions

View File

@@ -1,13 +0,0 @@
Index: gd.c
===================================================================
--- gd.c.orig 2007-11-27 09:30:34.000000000 +0100
+++ gd.c 2008-11-12 16:13:25.000000000 +0100
@@ -1895,7 +1895,7 @@ struct seg {int y, xl, xr, dy;};
/* max depth of stack */
#define FILL_MAX 1200000
#define FILL_PUSH(Y, XL, XR, DY) \
- if (sp<stack+FILL_MAX*10 && Y+(DY)>=0 && Y+(DY)<wy2) \
+ if (sp<stack+FILL_MAX && Y+(DY)>=0 && Y+(DY)<wy2) \
{sp->y = Y; sp->xl = XL; sp->xr = XR; sp->dy = DY; sp++;}
#define FILL_POP(Y, XL, XR, DY) \

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0ee0fabaee6164bae38e3b0dc042e6d5a3f25a656553935b9128a91eacb51a80
size 1590828

View File

@@ -1,13 +0,0 @@
Index: config/gdlib-config.in
===================================================================
--- config/gdlib-config.in.orig 2006-10-11 11:46:22.000000000 +0200
+++ config/gdlib-config.in 2007-12-20 03:59:07.000000000 +0100
@@ -71,7 +71,7 @@ while test $# -gt 0; do
echo @LDFLAGS@
;;
--libs)
- echo @LIBS@ @LIBICONV@
+ echo -l@GDLIBNAME@
;;
--cflags|--includes)
echo -I@includedir@

View File

@@ -1,11 +0,0 @@
--- gdkanji.c
+++ gdkanji.c
@@ -392,7 +392,7 @@
from_len = strlen ((const char *)from) + 1;
to_len = BUFSIZ;
- if ((int) (iconv (cd, (char **)from_p, &from_len, (char **)to_p, &to_len))
+ if ((int) (iconv (cd, from_p, &from_len, to_p, &to_len))
== -1)
{
#ifdef HAVE_ERRNO_H

View File

@@ -1,28 +1,30 @@
--- fontwheeltest.c 2004-10-27 14:22:04.000000000 +0000
+++ fontwheeltest.c 2005-11-24 10:45:11.000000000 +0000
@@ -34,6 +34,8 @@
Index: src/fontwheeltest.c
===================================================================
--- src/fontwheeltest.c.orig 2013-12-18 11:49:47.041577398 +0100
+++ src/fontwheeltest.c 2013-12-18 11:53:52.575496376 +0100
@@ -32,6 +32,8 @@
doerr (err, "------------------------------------------");
for (curang = 0.0; curang < 360.0; curang += angle)
{
+ gdPoint points[4];
for (curang = 0.0; curang < 360.0; curang += angle) {
+ gdPoint points[4];
+
curangrads = DEGTORAD(curang);
x0 = x + cos (curangrads) * offset;
y0 = y - sin (curangrads) * offset;
@@ -49,7 +51,15 @@
if (cp)
doerr (err, cp);
curangrads = DEGTORAD(curang);
x0 = x + cos (curangrads) * offset;
y0 = y - sin (curangrads) * offset;
@@ -47,7 +49,15 @@
if (cp)
doerr (err, cp);
- gdImagePolygon (im, (gdPointPtr)brect, 4, color);
+ points[0].x = brect[0];
+ points[0].y = brect[1];
+ points[1].x = brect[2];
+ points[1].y = brect[3];
+ points[2].x = brect[4];
+ points[2].y = brect[5];
+ points[3].x = brect[6];
+ points[3].y = brect[7];
+ gdImagePolygon (im, points, 4, color);
}
- gdImagePolygon (im, (gdPointPtr)brect, 4, color);
+ points[0].x = brect[0];
+ points[0].y = brect[1];
+ points[1].x = brect[2];
+ points[1].y = brect[3];
+ points[2].x = brect[4];
+ points[2].y = brect[5];
+ points[3].x = brect[6];
+ points[3].y = brect[7];
+ gdImagePolygon (im, points, 4, color);
}
fclose (err);
fclose (err);

View File

@@ -1,34 +1,14 @@
--- configure.ac.orig
+++ configure.ac
@@ -40,8 +40,9 @@ esac
AC_MSG_RESULT([$os_cygwin])
AC_SUBST([XTRA_LDFLAGS])
Index: configure.ac
===================================================================
--- configure.ac.orig 2013-12-18 12:58:25.906977199 +0100
+++ configure.ac 2013-12-18 12:59:36.671840317 +0100
@@ -53,6 +53,9 @@
AM_PROG_AR
-AC_PROG_CC
-AM_PROG_CC_STDC
+AC_PROG_CC_STDC
AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
+
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_LN_S
--- Makefile.am.orig
+++ Makefile.am
@@ -3,6 +3,8 @@ AUTOMAKE_OPTIONS = foreign 1.7
ACLOCAL_AMFLAGS = -I config
+AM_CPPFLAGS = -include $(top_builddir)/config.h
+
SUBDIRS = config test
bin_PROGRAMS = annotate gdparttopng gdtopng gd2copypal gd2topng pngtogd pngtogd2 webpng gd2togif gdcmpgif giftogd2
@@ -19,7 +21,7 @@ lib_LTLIBRARIES = libgd.la
libgd_la_SOURCES = gd.c gdfx.c gd_security.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_gif_in.c gd_gif_out.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h
-libgd_la_LDFLAGS = -version-info 2:0:0 $(XTRA_LDFLAGS)
+libgd_la_LDFLAGS = -no-undefined -version-info 2:0:0 $(XTRA_LDFLAGS)
libgd_la_LIBADD = $(LTLIBICONV)

13
gd-config.patch Normal file
View File

@@ -0,0 +1,13 @@
Index: config/gdlib-config.in
===================================================================
--- config/gdlib-config.in.orig 2013-06-25 11:58:23.000000000 +0200
+++ config/gdlib-config.in 2013-12-18 10:00:24.635577307 +0100
@@ -71,7 +71,7 @@
echo @LDFLAGS@
;;
--libs)
- echo -lgd @LIBS@ @LIBICONV@
+ echo -lgd
;;
--cflags|--includes)
echo -I@includedir@

View File

@@ -1,11 +1,13 @@
--- gd.h.orig 2006-08-16 05:10:17.000000000 +0200
+++ gd.h 2006-08-16 05:11:03.000000000 +0200
@@ -59,7 +59,7 @@
/* 2.0.23: more Type 1 fonts */
#ifndef DEFAULT_FONTPATH
/* default fontpath for unix systems - whatever happened to standards ! */
-#define DEFAULT_FONTPATH "/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/Type1"
+#define DEFAULT_FONTPATH "/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/Type1:/usr/share/fonts/Type1"
Index: src/gdft.c
===================================================================
--- src/gdft.c.orig 2013-06-25 11:58:23.000000000 +0200
+++ src/gdft.c 2013-12-18 11:44:06.915533057 +0100
@@ -74,7 +74,7 @@
# define DEFAULT_FONTPATH "/usr/share/fonts/truetype:/System/Library/Fonts:/Library/Fonts"
# else
/* default fontpath for unix systems - whatever happened to standards ! */
-# define DEFAULT_FONTPATH "/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/Type1"
+# define DEFAULT_FONTPATH "/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/Type1:/usr/share/fonts/Type1"
# endif
#endif
#ifndef PATHSEPARATOR
#define PATHSEPARATOR ":"

View File

@@ -1,11 +1,14 @@
--- gd-2.0.32/gdkanji.c.xx 2005-02-05 10:38:02.201752762 +0100
+++ gd-2.0.32/gdkanji.c 2005-02-05 10:38:48.616943407 +0100
@@ -100,7 +100,7 @@
#endif
}
Index: src/gd_errors.h
===================================================================
--- src/gd_errors.h.orig 2013-06-25 11:58:23.000000000 +0200
+++ src/gd_errors.h 2013-12-18 11:47:26.605907096 +0100
@@ -40,7 +40,7 @@
#define GD_INFO LOG_INFO
#define GD_DEBUG LOG_DEBUG
-static void
+static void __attribute__((__format__(printf,1,2)))
error (const char *format, ...)
{
va_list args;
-void gd_error(const char *format, ...);
-void gd_error_ex(int priority, const char *format, ...);
+void gd_error(const char *format, ...) __attribute__((format(printf, 1, 2)));
+void gd_error_ex(int priority, const char *format, ...) __attribute__((format(printf, 2, 3)));
#endif

View File

@@ -1,11 +0,0 @@
--- gd_png.c
+++ gd_png.c
@@ -151,7 +151,7 @@
return NULL;
}
- if (!png_check_sig (sig, 8)) { /* bad signature */
+ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
return NULL; /* bad signature */
}

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Dec 17 14:30:38 UTC 2013 - pgajdos@suse.com
- updated to 2.1.0
- removed warn.patch (not needed)
- removed ppc64.patch (upstreamed)
- removed gd-png_check_sig.patch (upstreamed)
-------------------------------------------------------------------
Sun Feb 3 14:57:17 UTC 2013 - crrodriguez@opensuse.org

69
gd.spec
View File

@@ -16,48 +16,47 @@
#
%define prjname libgd
Name: gd
BuildRequires: cmake
BuildRequires: fontconfig-devel
BuildRequires: freetype2-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: xorg-x11-libX11-devel
BuildRequires: xorg-x11-libXau-devel
BuildRequires: xorg-x11-libXdmcp-devel
BuildRequires: xorg-x11-libXpm-devel
Provides: gdlib
Obsoletes: gdlib
Version: 2.0.36.RC1
Version: 2.1.0
Release: 0
Url: http://www.libgd.org/
Url: http://libgd.bitbucket.org/
Summary: A Drawing Library for Programs That Use PNG and JPEG Output
License: MIT
Group: System/Libraries
Source: gd-%{version}.tar.bz2
Source: https://bitbucket.org/libgd/gd-libgd/downloads/libgd-%{version}.tar.xz
Source1: baselibs.conf
Patch0: gd-2.0.36RC1-warn.patch
#Patch1: gd-CAN-2004-0941.patch
# to be upstreamed, gdlib-config --libs to return the same as pkg-config --libs gdlib
Patch0: gd-config.patch
# might be upstreamed, but could be suse specific also (/usr/share/fonts/Type1 font dir)
Patch1: gd-fontpath.patch
# could be upstreamed, but not in this form (need ac check for attribute format printf, etc.)
Patch2: gd-format.patch
# could be upstreamed
Patch3: gd-aliasing.patch
Patch6: gd-fontpath.patch
Patch7: gd-2.0.36RC1-config.patch
Patch8: gd-2.0.36.RC1-ppc64.patch
Patch9: gd-png_check_sig.patch
Patch10: gd-autoconf.patch
# could be upstreamed?
Patch4: gd-autoconf.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Gd allows your code to quickly draw images complete with lines, arcs,
text, and multiple colors. It supports cut and paste from other images
and flood fills. It outputs PNG, JPEG, and WBMP (for wireless devices)
and is supported by PHP4.
Authors:
--------
Thomas Boutell <boutell@boutell.com>
and is supported by PHP.
%package devel
Requires: %{name} = %{version}
@@ -76,20 +75,13 @@ the formats accepted for inline images by most browsers.
Authors:
--------
Thomas Boutell <boutell@boutell.com>
%prep
%setup -q
#%patch0
%patch2 -p1
%setup -q -n %{prjname}-%{version}
%patch0
%patch1
%patch2
%patch3
%patch6
%patch7
%patch8
%patch9
%patch10
%patch4
%build
autoreconf -fiv
%configure \
@@ -102,21 +94,7 @@ autoreconf -fiv
make %{?_smp_mflags}
%check
export MALLOC_CHECK_=2 MALLOC_PERTURB_=$((${RANDOM:-256} % 256))
#run test programs
cp test/gdtest_wbmp_to_png.png gdtest.png
./gdtest gdtest.png 2>&1 |tee gdtest.log
grep ERROR gdtest.log && exit 1
./gdtest demoin.png 2>&1 |tee gdtest.log
# wbmp test fails on color image, this is OK
grep -v "gdtest.png, gdtest.wbmp.*ERROR" gdtest.log | grep ERROR && exit 1
./gddemo
# The following would require xorg-x11-fonts-scalable which we do not like to have as requirement
# so disable it.
#for f in `find /usr/share/fonts/truetype /usr/X11R6/lib/X11/fonts/truetype -name "*.ttf"` ; do
# ./gdtestft $f
#done
unset MALLOC_CHECK_ MALLOC_PERTURB_
make check
%install
make install DESTDIR=$RPM_BUILD_ROOT
@@ -127,7 +105,7 @@ make install DESTDIR=$RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc COPYING README* index.html
%doc COPYING NEWS examples
/usr/bin/annotate
/usr/bin/bdftogd
/usr/bin/gd2copypal
@@ -147,6 +125,7 @@ make install DESTDIR=$RPM_BUILD_ROOT
%{_bindir}/gdlib-config
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/gdlib.pc
%exclude %{_libdir}/*.la
%changelog

3
libgd-2.1.0.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fa6665dfe3d898019671293c84d77067a3d2ede50884dbcb6df899d508370e5a
size 2004304