Browse Source

gd-2.1.0-2

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@8594 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 10 years ago
parent
commit
45acb62adf
1 changed files with 78 additions and 8 deletions
  1. 78 8
      g/gd/gd-vl.spec

+ 78 - 8
g/gd/gd-vl.spec

@@ -1,20 +1,33 @@
+%bcond_with libvpx
+
 %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
 Summary: A graphics library for drawing .png files.
 Summary(ja): PNGイメージファイルを描写するためのグラフィックライブラリ
 Name: gd
 Version: 2.1.0
-Release: 1%{_dist_release}
+Release: 2%{_dist_release}
 Source0: https://bitbucket.org/libgd/gd-libgd/downloads/libgd-%{version}.tar.xz
 Patch0:        gd-2.1.0-multilib.patch
-Patch1:        gd-2.1.0-fonts-vine.patch
+Patch1:        gd-fixautoconf.patch
+Patch100:      gd-2.1.0-fonts-vine.patch
 License: BSD-style
 URL: http://www.libgd.org/
 Group: System Environment/Libraries
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: libjpeg-devel zlib-devel freetype2-devel
-BuildRequires: libpng-devel >= 2:1.2.5
-BuildRequires: libX11-devel libXpm-devel
+BuildRequires: freetype2-devel
+BuildRequires: fontconfig-devel
+BuildRequires: gettext-devel
+BuildRequires: libjpeg-turbo-devel
+BuildRequires: libpng-devel
+BuildRequires: libtiff-devel
+%if %{with libvpx}
+BuildRequires: libvpx-devel
+%endif
+BuildRequires: libX11-devel
+BuildRequires: libXpm-devel
+BuildRequires: zlib-devel
+BuildRequires: pkgconfig
 
 Vendor: Project Vine
 Distribution: Vine Linux
@@ -60,10 +73,21 @@ If you install these, you must install gd.
 があります。
 
 %package devel
-Requires: gd = %{version}
 Summary: The development libraries and header files for gd.
 Summary(ja): gd用の開発ライブラリとヘッダファイル
 Group: Development/Libraries
+Requires: gd = %{version}
+Requires: freetype-devel
+Requires: fontconfig-devel
+Requires: libjpeg-turbo-devel
+Requires: libpng-devel
+Requires: libtiff-devel
+%if %{with libvpx}
+Requires: libvpx-devel
+%endif
+Requires: libX11-devel
+Requires: libXpm-devel
+Requires: zlib-devel
 
 %description devel
 These are the development libraries and header files for gd, the .png
@@ -98,6 +122,18 @@ package.
 %package -n compat32-%{name}-devel
 Summary: The development libraries and header files for gd.
 Group: Development/Libraries
+Requires: compat32-freetype-devel
+Requires: compat32-fontconfig-devel
+Requires: compat32-libjpeg-turbo-devel
+Requires: compat32-libpng-devel
+Requires: compat32-libtiff-devel
+%if %{with libvpx}
+Requires: compat32-libvpx-devel
+%endif
+Requires: compat32-libX11-devel
+Requires: compat32-libXpm-devel
+Requires: compat32-zlib-devel
+
 %description -n compat32-%{name}-devel
 These are the development libraries and header files for gd, the .png
 graphics library.
@@ -108,10 +144,40 @@ If you're installing the gd graphics library, you must install gd-devel.
 %prep
 %setup -q -n libgd-%{version}
 %patch0 -p1 -b .mlib
-%patch1 -p1 -b .fonts-vine
+%patch1 -p1 -b .automake
+%patch100 -p1 -b .fonts-vine
+
+# https://bitbucket.org/libgd/gd-libgd/issue/77
+sed -e '/GD_VERSION_STRING/s/-alpha//' \
+    -e '/GD_EXTRA_VERSION/s/alpha//' \
+    -i src/gd.h
+grep VERSION src/gd.h
+
+: regenerate autotool stuff
+if [ -f configure ]; then
+   libtoolize --copy --force
+   autoreconf -vif
+else
+   ./bootstrap.sh
+fi
+
 
 %build
-%configure CPPFLAGS="-DHAVE_ICONV -DHAVE_STDARG_H -DHAVE_ERRNO_H"
+# Provide a correct default font search path
+CFLAGS="$RPM_OPT_FLAGS -DDEFAULT_FONTPATH='\"\
+/usr/share/fonts/TrueType-vlgothic:\
+/usr/share/fonts/bitstream-vera:\
+/usr/share/fonts/dejavu:\
+/usr/share/fonts/default/Type1:\
+/usr/share/X11/fonts/Type1:\
+/usr/share/fonts/liberation\"'"
+
+%configure CPPFLAGS="-DHAVE_ICONV -DHAVE_STDARG_H -DHAVE_ERRNO_H" \
+    --with-tiff=%{_prefix} \
+%if %{with libvpx}
+    --with-vpx=%{_prefix} \
+%endif
+	--disable-rpath
 make %{?_smp_mflags}
 
 %install
@@ -158,6 +224,10 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
 %endif
 
 %changelog
+* Mon Jun 23 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.0-2
+- fixed version in gd.h.
+- added fontconfig and tiff support.
+
 * Wed Oct 02 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.0-1
 - new upstream release.
 - dropped unnecessary patches.