gd-vl.spec 11 KB

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