gd-vl.spec 11 KB

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