gd.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. ##
  2. ## gd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 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 [BASE]
  32. Group: Graphics
  33. License: GPL
  34. Version: 2.0.21
  35. Release: 20040116
  36. # package options
  37. %option with_xpm no
  38. # list of sources
  39. Source0: http://www.boutell.com/gd/http/gd-%{version}.tar.gz
  40. Patch0: gd.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20030709
  45. PreReq: OpenPKG, openpkg >= 20030709, perl
  46. BuildPreReq: png, zlib, jpeg, freetype
  47. PreReq: png, zlib, jpeg, freetype
  48. %if "%{with_xpm}" == "yes"
  49. BuildPreReq: X11, xpm
  50. PreReq: X11, xpm
  51. %endif
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. GD is a graphics library. It allows your code to quickly draw images
  56. complete with lines, arcs, text, multiple colors, cut and paste
  57. from other images, and flood fills, and write out the result as a
  58. PNG or JPEG file. This is particularly useful in World Wide Web
  59. applications, where PNG and JPEG are two of the formats accepted for
  60. inline images by most browsers.
  61. %prep
  62. %setup -q
  63. %patch -p0
  64. %build
  65. ( echo "ac_cv_header_iconv_h=no"
  66. echo "am_cv_func_iconv=no"
  67. ) >config.cache
  68. CC="%{l_cc}" \
  69. CFLAGS="%{l_cflags -O}" \
  70. CPPFLAGS="%{l_cppflags . libpng}" \
  71. LDFLAGS="%{l_ldflags}" \
  72. LIBS="-lm" \
  73. ./configure \
  74. --cache-file=./config.cache \
  75. --prefix=%{l_prefix} \
  76. %if "%{with_xpm}" == "yes"
  77. --with-x \
  78. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  79. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  80. --with-xpm=%{l_prefix} \
  81. %else
  82. --without-x \
  83. --without-xpm \
  84. %endif
  85. --with-png=%{l_prefix} \
  86. --with-freetype=%{l_prefix} \
  87. --with-jpeg=%{l_prefix} \
  88. --disable-shared
  89. %{l_shtool} subst -e 's;-LNONE;;' Makefile
  90. %{l_make} %{l_mflags}
  91. %{l_shtool} subst -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' bdftogd
  92. %install
  93. rm -rf $RPM_BUILD_ROOT
  94. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  95. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  96. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  97. %files -f files
  98. %clean
  99. rm -rf $RPM_BUILD_ROOT