Marcus Meissner
ff829be779
OBS-URL: https://build.opensuse.org/package/show/graphics/gd?expand=0&rev=14
156 lines
4.4 KiB
RPMSpec
156 lines
4.4 KiB
RPMSpec
#
|
|
# spec file for package gd
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define prjname libgd
|
|
|
|
%define lname libgd3
|
|
|
|
Name: gd
|
|
Version: 2.1.0
|
|
Release: 0
|
|
Summary: A Drawing Library for Programs That Use PNG and JPEG Output
|
|
License: MIT
|
|
Group: System/Libraries
|
|
Url: http://libgd.bitbucket.org/
|
|
Source: https://bitbucket.org/libgd/gd-libgd/downloads/libgd-%{version}.tar.xz
|
|
Source1: baselibs.conf
|
|
# 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
|
|
# could be upstreamed?
|
|
Patch4: gd-autoconf.patch
|
|
Patch5: gd-2.1.0-CVE-2014-2497.patch
|
|
BuildRequires: fontconfig-devel
|
|
BuildRequires: freetype2-devel
|
|
BuildRequires: libjpeg-devel
|
|
BuildRequires: libpng-devel
|
|
BuildRequires: libtiff-devel
|
|
BuildRequires: libtool
|
|
BuildRequires: libvpx-devel
|
|
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 = %{version}
|
|
Obsoletes: gdlib < %{version}
|
|
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 PHP.
|
|
|
|
%package -n %lname
|
|
Summary: A Drawing Library for Programs That Use PNG and JPEG Output
|
|
Group: System/Libraries
|
|
|
|
%description -n %lname
|
|
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 PHP.
|
|
|
|
%package devel
|
|
Summary: Drawing Library for Programs with PNG and JPEG Output
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %lname = %{version}
|
|
Requires: glibc-devel
|
|
Requires: libpng-devel
|
|
Requires: libtiff-devel
|
|
Requires: libvpx-devel
|
|
Requires: zlib-devel
|
|
|
|
%description devel
|
|
gd allows code to quickly draw images complete with lines, arcs, text,
|
|
multiple colors, cut and paste from other images, and flood fills. gd
|
|
writes out the result as a PNG or JPEG file. This is particularly
|
|
useful in World Wide Web applications, where PNG and JPEG are two of
|
|
the formats accepted for inline images by most browsers.
|
|
|
|
%prep
|
|
%setup -q -n %{prjname}-%{version}
|
|
%patch0
|
|
%patch1
|
|
%patch2
|
|
%patch3
|
|
%patch4
|
|
%patch5
|
|
|
|
%build
|
|
autoreconf -fiv
|
|
# without-x -- useless switch which just mangles cflags
|
|
%configure \
|
|
--without-x \
|
|
--with-fontconfig \
|
|
--with-freetype \
|
|
--with-jpeg \
|
|
--with-png \
|
|
--with-xpm \
|
|
--disable-static \
|
|
--with-pic
|
|
make %{?_smp_mflags}
|
|
|
|
%check
|
|
make check %{?_smp_mflags}
|
|
|
|
%install
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc COPYING NEWS examples
|
|
%{_bindir}/annotate
|
|
%{_bindir}/bdftogd
|
|
%{_bindir}/gd2copypal
|
|
%{_bindir}/gd2togif
|
|
%{_bindir}/gd2topng
|
|
%{_bindir}/gdcmpgif
|
|
%{_bindir}/gdparttopng
|
|
%{_bindir}/gdtopng
|
|
%{_bindir}/giftogd2
|
|
%{_bindir}/pngtogd
|
|
%{_bindir}/pngtogd2
|
|
%{_bindir}/webpng
|
|
|
|
%files -n %lname
|
|
%defattr(-,root,root)
|
|
%doc COPYING
|
|
%{_libdir}/*.so.*
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%doc COPYING
|
|
%{_bindir}/gdlib-config
|
|
%{_includedir}/*
|
|
%{_libdir}/*.so
|
|
%{_libdir}/pkgconfig/gdlib.pc
|
|
|
|
%changelog
|