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

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