gd-vl.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. %bcond_with libvpx
  2. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  3. Summary: A graphics library for drawing .png files.
  4. Summary(ja): PNGイメージファイルを描写するためのグラフィックライブラリ
  5. Name: gd
  6. Version: 2.1.0
  7. Release: 2%{_dist_release}
  8. Source0: https://bitbucket.org/libgd/gd-libgd/downloads/libgd-%{version}.tar.xz
  9. Patch0: gd-2.1.0-multilib.patch
  10. Patch1: gd-fixautoconf.patch
  11. Patch100: gd-2.1.0-fonts-vine.patch
  12. License: BSD-style
  13. URL: http://www.libgd.org/
  14. Group: System Environment/Libraries
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  16. BuildRequires: freetype2-devel
  17. BuildRequires: fontconfig-devel
  18. BuildRequires: gettext-devel
  19. BuildRequires: libjpeg-turbo-devel
  20. BuildRequires: libpng-devel
  21. BuildRequires: libtiff-devel
  22. %if %{with libvpx}
  23. BuildRequires: libvpx-devel
  24. %endif
  25. BuildRequires: libX11-devel
  26. BuildRequires: libXpm-devel
  27. BuildRequires: zlib-devel
  28. BuildRequires: pkgconfig
  29. Vendor: Project Vine
  30. Distribution: Vine Linux
  31. Packager: daisuke
  32. %description
  33. Gd is a graphics library for drawing .png files. Gd allows your code to
  34. quickly draw images (lines, arcs, text, multiple colors, cutting and
  35. pasting from other images, flood fills) and write out the result as a
  36. .png file. Gd is particularly useful in web applications, where .pngs
  37. are commonly used as inline images. Note, however, that gd is not a
  38. paint program.
  39. Install gd if you are developing applications which need to draw .png
  40. files. If you install gd, you'll also need to install the gd-devel
  41. package.
  42. %description -l ja
  43. GdはPNGファイルを描写するためのグラフックライブラリです。 Gdを使って、
  44. 画像(線や弧, テキスト, カラー, 他の画像からのカット&ペースト等々)を
  45. 簡単に描写して、PNGファイルへ結果を出力することができます。
  46. Gdは特に、一般にPNG画像を埋め込む必要のあるウェブアプリケーションで
  47. 便利です。ただし、注意して欲しいのは, Gdはペイントツールではありませ
  48. ん。
  49. PNGファイルを描写する必要のあるアプリケーションを開発する場合、
  50. Gdをインストールしてください。gdをインストールした場合、gd-devel
  51. パッケージも必要になります。
  52. %package progs
  53. Summary: Utility programs that use libgd.
  54. Summary(ja): libgd を用いたユーティリティプログラム
  55. Group: Applications/Graphics
  56. Requires: gd = %{version}, perl
  57. %description progs
  58. These are utility programs supplied with gd, the .png graphics library.
  59. If you install these, you must install gd.
  60. %description progs -l ja
  61. これは PNG グラフィックライブラリ gd によって提供されるユーティリティ
  62. プログラムです。これをインストールするには, gdをインストールする必要
  63. があります。
  64. %package devel
  65. Summary: The development libraries and header files for gd.
  66. Summary(ja): gd用の開発ライブラリとヘッダファイル
  67. Group: Development/Libraries
  68. Requires: gd = %{version}
  69. Requires: freetype-devel
  70. Requires: fontconfig-devel
  71. Requires: libjpeg-turbo-devel
  72. Requires: libpng-devel
  73. Requires: libtiff-devel
  74. %if %{with libvpx}
  75. Requires: libvpx-devel
  76. %endif
  77. Requires: libX11-devel
  78. Requires: libXpm-devel
  79. Requires: zlib-devel
  80. %description devel
  81. These are the development libraries and header files for gd, the .png
  82. graphics library.
  83. If you're installing the gd graphics library, you must install gd-devel.
  84. %description devel -l ja
  85. これらは開発ライブラリです。
  86. PNGグラフィックライブラリ gd 用の開発ライブラリおよびヘッダファイル
  87. です。
  88. gdをインストールした場合、gd-develパッケージも必要になります。
  89. ## to build compat32 for x86_64 architecture support
  90. %package -n compat32-%{name}
  91. Summary: A graphics library for drawing .png files.
  92. Group: System Environment/Libraries
  93. %description -n compat32-%{name}
  94. Gd is a graphics library for drawing .png files. Gd allows your code to
  95. quickly draw images (lines, arcs, text, multiple colors, cutting and
  96. pasting from other images, flood fills) and write out the result as a
  97. .png file. Gd is particularly useful in web applications, where .pngs
  98. are commonly used as inline images. Note, however, that gd is not a
  99. paint program.
  100. Install gd if you are developing applications which need to draw .png
  101. files. If you install gd, you'll also need to install the gd-devel
  102. package.
  103. %package -n compat32-%{name}-devel
  104. Summary: The development libraries and header files for gd.
  105. Group: Development/Libraries
  106. Requires: compat32-freetype-devel
  107. Requires: compat32-fontconfig-devel
  108. Requires: compat32-libjpeg-turbo-devel
  109. Requires: compat32-libpng-devel
  110. Requires: compat32-libtiff-devel
  111. %if %{with libvpx}
  112. Requires: compat32-libvpx-devel
  113. %endif
  114. Requires: compat32-libX11-devel
  115. Requires: compat32-libXpm-devel
  116. Requires: compat32-zlib-devel
  117. %description -n compat32-%{name}-devel
  118. These are the development libraries and header files for gd, the .png
  119. graphics library.
  120. If you're installing the gd graphics library, you must install gd-devel.
  121. %prep
  122. %setup -q -n libgd-%{version}
  123. %patch0 -p1 -b .mlib
  124. %patch1 -p1 -b .automake
  125. %patch100 -p1 -b .fonts-vine
  126. # https://bitbucket.org/libgd/gd-libgd/issue/77
  127. sed -e '/GD_VERSION_STRING/s/-alpha//' \
  128. -e '/GD_EXTRA_VERSION/s/alpha//' \
  129. -i src/gd.h
  130. grep VERSION src/gd.h
  131. : regenerate autotool stuff
  132. if [ -f configure ]; then
  133. libtoolize --copy --force
  134. autoreconf -vif
  135. else
  136. ./bootstrap.sh
  137. fi
  138. %build
  139. # Provide a correct default font search path
  140. CFLAGS="$RPM_OPT_FLAGS -DDEFAULT_FONTPATH='\"\
  141. /usr/share/fonts/TrueType-vlgothic:\
  142. /usr/share/fonts/bitstream-vera:\
  143. /usr/share/fonts/dejavu:\
  144. /usr/share/fonts/default/Type1:\
  145. /usr/share/X11/fonts/Type1:\
  146. /usr/share/fonts/liberation\"'"
  147. %configure CPPFLAGS="-DHAVE_ICONV -DHAVE_STDARG_H -DHAVE_ERRNO_H" \
  148. --with-tiff=%{_prefix} \
  149. %if %{with libvpx}
  150. --with-vpx=%{_prefix} \
  151. %endif
  152. --disable-rpath
  153. make %{?_smp_mflags}
  154. %install
  155. [ "$RPM_BUILD_ROOT" != "/" ] && rm -fr $RPM_BUILD_ROOT
  156. make DESTDIR=$RPM_BUILD_ROOT install
  157. ## remove unuse files
  158. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
  159. %clean
  160. [ "$RPM_BUILD_ROOT" != "/" ] && rm -fr $RPM_BUILD_ROOT
  161. %post -p /sbin/ldconfig
  162. %postun -p /sbin/ldconfig
  163. %if %{build_compat32}
  164. %post -n compat32-%{name} -p /sbin/ldconfig
  165. %postun -n compat32-%{name} -p /sbin/ldconfig
  166. %endif
  167. %files
  168. %defattr(-,root,root)
  169. %doc ChangeLog COPYING NEWS docs/*
  170. %{_libdir}/*.so.*
  171. %files progs
  172. %defattr(-,root,root)
  173. %{_bindir}/*
  174. %exclude %{_bindir}/gdlib-config
  175. %files devel
  176. %defattr(-,root,root)
  177. %{_bindir}/gdlib-config
  178. %{_includedir}/*
  179. %{_libdir}/*.so
  180. %{_libdir}/pkgconfig/*.pc
  181. %if %{build_compat32}
  182. %files -n compat32-%{name}
  183. %defattr(-,root,root)
  184. %{_libdir}/*.so.*
  185. %files -n compat32-%{name}-devel
  186. %defattr(-,root,root)
  187. %{_libdir}/*.so
  188. %endif
  189. %changelog
  190. * Mon Jun 23 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.0-2
  191. - fixed version in gd.h.
  192. - added fontconfig and tiff support.
  193. * Wed Oct 02 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.0-1
  194. - new upstream release.
  195. - dropped unnecessary patches.
  196. * Tue Feb 19 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.35-8
  197. - import patches from fedora package
  198. - modified font path patch for Vine Linux
  199. - drop static library
  200. - remove "-DJISX0208"
  201. - add "-DHAVE_ICONV -DHAVE_STDARG_H -DHAVE_ERRNO_H""
  202. * Fri Mar 09 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.35-7
  203. - move gdlib-config from gd-progs subpackage to gd-devel subpackage
  204. * Thu Apr 14 2011 IWAI, Masaharu <iwai@alib.jp> 2.0.35-6
  205. - build on current VineSeed
  206. * Tue Nov 3 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.0.35-5
  207. - fix build_compat32 if-endif sections
  208. * Sat Oct 31 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.0.35-4
  209. - add patch2 for fix CVE-2009-3546 (_gdGetColors())
  210. * Wed Apr 8 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.35-3
  211. - updated URL
  212. - changed progs Group to Applications/Graphics
  213. - added %%postun section
  214. * Fri Sep 26 2008 Shu KONNO <owa@bg.wakwak.com> 2.0.35-2
  215. - removed *.la
  216. - spec in utf-8
  217. * Sat Apr 05 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.0.35-1
  218. - add patch1 from centos5
  219. - new versioning policy
  220. * Wed Feb 14 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.0.35-0vl1
  221. - new upstream release with security fix (CVE-2007-2756)
  222. * Wed Feb 14 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.0.34-0vl1
  223. - new upstream release with security fix
  224. - change source tarball format gz -> bz2
  225. * Fri Mar 17 2006 Shu KONNO <owa@bg.wakwak.com> 2.0.33-0vl2
  226. - added compat32-* packages for x86_64 architecture support
  227. * Sat Nov 6 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.0.33-0vl1
  228. - source upgrade
  229. * Wed Jul 14 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 2.0.27-0vl1
  230. - source update
  231. - added -DJISX0208 flag
  232. * Thu Jun 17 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.0.26-0vl1
  233. - source upgrade
  234. - BuildPrereq: XOrg-devel instead of XFree86-devel
  235. * Wed Mar 31 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.0.22-0vl1
  236. - source upgrade
  237. - remove patch0 (no need for freetype2-2.1.7)
  238. * Wed Nov 19 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.0.15-0vl2
  239. - add patch0 to build against freetype2-2.1.7
  240. * Sat Jun 7 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.0.15-0vl1
  241. - source upgrade
  242. - add URL
  243. - remove all patches
  244. - use %%configure script
  245. - add BuildPrereq: freetype2-devel XFree86-devel
  246. - remove BuildPrereq: VFlib-devel
  247. - update %%files
  248. - update Requires:
  249. - use License tag instead of Copyright
  250. * Fri Apr 18 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.8.3-0vl4
  251. - rebuild with libpng-devel-1.2.5-0vl1
  252. * Sun Apr 13 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.3-0vl3
  253. - rebuild with new toolchain
  254. * Sat Sep 02 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  255. - 1.8.3-0vl2
  256. - symlink to libgd.so.1 (for backward compatibility)
  257. * Tue Jun 6 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
  258. - first gd 1.8.x release for Vine from rawhide.
  259. - enable freetype support and defined JISX208 macro.
  260. * Mon May 22 2000 Nalin Dahyabhai <nalin@redhat.com>
  261. - break out a -progs subpackage
  262. - disable freetype support
  263. * Fri May 19 2000 Nalin Dahyabhai <nalin@redhat.com>
  264. - update to latest version (1.8.2)
  265. - disable xpm support
  266. * Thu Feb 03 2000 Nalin Dahyabhai <nalin@redhat.com>
  267. - auto rebuild in the new build environment (release 6)
  268. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  269. - auto rebuild in the new build environment (release 5)
  270. * Thu Dec 17 1998 Cristian Gafton <gafton@redhat.com>
  271. - buiuld for glibc 2.1
  272. * Fri Sep 11 1998 Cristian Gafton <gafton@redhat.com>
  273. - built for 5.2