gd-vl.spec 12 KB

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