gd.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ##
  2. ## gd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: gd
  27. Summary: Fast Graphics Generation Library
  28. URL: http://www.boutell.com/gd/
  29. Vendor: Thomas Boutell
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: BASE
  33. Group: Graphics
  34. License: GPL
  35. Version: 2.0.26
  36. Release: 20040602
  37. # package options
  38. %option with_xpm no
  39. # list of sources
  40. Source0: http://www.boutell.com/gd/http/gd-%{version}.tar.gz
  41. Patch0: gd.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130
  46. PreReq: OpenPKG, openpkg >= 20040130, perl
  47. BuildPreReq: png, zlib, jpeg, freetype
  48. PreReq: png, zlib, jpeg, freetype
  49. %if "%{with_xpm}" == "yes"
  50. BuildPreReq: X11, xpm
  51. PreReq: X11, xpm
  52. %endif
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. GD is a graphics library. It allows your code to quickly draw images
  57. complete with lines, arcs, text, multiple colors, cut and paste
  58. from other images, and flood fills, and write out the result as a
  59. PNG or JPEG file. This is particularly useful in World Wide Web
  60. applications, where PNG and JPEG are two of the formats accepted for
  61. inline images by most browsers.
  62. %track
  63. prog gd = {
  64. version = %{version}
  65. url = http://www.boutell.com/gd/http/
  66. regex = gd-(__VER__)\.tar\.gz
  67. }
  68. %prep
  69. %setup -q
  70. %patch -p0
  71. %build
  72. ( echo "ac_cv_header_iconv_h=no"
  73. echo "am_cv_func_iconv=no"
  74. ) >config.cache
  75. CC="%{l_cc}" \
  76. CFLAGS="%{l_cflags -O}" \
  77. CPPFLAGS="%{l_cppflags . libpng}" \
  78. LDFLAGS="%{l_ldflags}" \
  79. LIBS="-lm" \
  80. ./configure \
  81. --cache-file=./config.cache \
  82. --prefix=%{l_prefix} \
  83. %if "%{with_xpm}" == "yes"
  84. --with-x \
  85. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  86. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  87. --with-xpm=%{l_prefix} \
  88. %else
  89. --without-x \
  90. --without-xpm \
  91. %endif
  92. --with-png=%{l_prefix} \
  93. --with-freetype=%{l_prefix} \
  94. --with-jpeg=%{l_prefix} \
  95. --disable-shared
  96. %{l_shtool} subst -e 's;-LNONE;;' Makefile
  97. %{l_make} %{l_mflags}
  98. %{l_shtool} subst -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' bdftogd
  99. %install
  100. rm -rf $RPM_BUILD_ROOT
  101. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  102. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  103. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  104. %files -f files
  105. %clean
  106. rm -rf $RPM_BUILD_ROOT