fontconfig.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. ##
  2. ## fontconfig.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: fontconfig
  26. Summary: Font Access Configuration And Customizing
  27. URL: http://fontconfig.org/
  28. Vendor: Keith Packard
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: BASE
  32. Group: XWindow
  33. License: GPL
  34. Version: 2.4.1
  35. Release: 20060925
  36. # list of sources
  37. Source0: http://fontconfig.org/release/fontconfig-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20040130, make
  42. PreReq: OpenPKG, openpkg >= 20040130
  43. BuildPreReq: X11, libiconv, freetype, expat
  44. PreReq: X11, libiconv, freetype, expat
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. Fontconfig is a library for configuring and customizing font access.
  49. It contains two essential modules, the configuration module which
  50. builds an internal configuration from XML files and the matching
  51. module which accepts font patterns and returns the nearest matching
  52. font.
  53. %track
  54. prog fontconfig = {
  55. version = %{version}
  56. url = http://fontconfig.org/release/
  57. regex = fontconfig-(\d+\.\d+\.\d+)\.tar\.gz
  58. }
  59. %prep
  60. %setup -q
  61. %build
  62. x11inc=`%{l_rc} --query x11_incdir`
  63. x11lib=`%{l_rc} --query x11_libdir`
  64. # make configure look only in our path
  65. %{l_shtool} subst \
  66. -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
  67. -e "s;/usr/X11R6/lib/X11;$x11lib/X11;g" \
  68. -e 's;/usr/X11/lib/X11;;g' \
  69. -e 's;/usr/lib/X11;;g' \
  70. configure
  71. # add iconv, freetype and expat dependencies
  72. %{l_shtool} subst \
  73. -e '/^Libs:/s;$; -liconv -lfreetype -lexpat;' \
  74. fontconfig.pc.in
  75. echo 'ac_cv_prog_HASDOCBOOK=${ac_cv_prog_HASDOCBOOK=no}' >config.cache
  76. CC="%{l_cc}" \
  77. CFLAGS="%{l_cflags -O}" \
  78. CPPFLAGS="%{l_cppflags}" \
  79. LDFLAGS="%{l_ldflags}" \
  80. LIBS="-liconv" \
  81. ./configure \
  82. --cache-file=./config.cache \
  83. --prefix=%{l_prefix} \
  84. --with-x \
  85. --x-includes=$x11inc \
  86. --x-libraries=$x11lib \
  87. --with-glib-prefix=%{l_prefix} \
  88. --with-freetype-config=%{l_prefix}/bin/freetype-config \
  89. --with-expat=%{l_prefix} \
  90. --with-confdir=%{l_prefix}/etc/fontconfig \
  91. --with-docdir=%{l_prefix}/share/fontconfig \
  92. --with-cache-dir=%{l_prefix}/var/fontconfig \
  93. --with-default-fonts=$x11lib/X11/fonts/TTF \
  94. --disable-nls \
  95. --disable-shared
  96. %{l_make} %{l_mflags -O}
  97. %install
  98. rm -rf $RPM_BUILD_ROOT
  99. %{l_shtool} mkdir -f -p -m 755 \
  100. $RPM_BUILD_ROOT%{l_prefix}/etc/fontconfig \
  101. $RPM_BUILD_ROOT%{l_prefix}/share/fontconfig
  102. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  103. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  104. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/fontconfig/fontconfig-devel
  105. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/fontconfig/*.html
  106. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  107. %{l_files_std} \
  108. '%not %dir %{l_prefix}/lib/pkgconfig' \
  109. '%config %{l_prefix}/etc/fontconfig/*.conf' \
  110. '%config %{l_prefix}/etc/fontconfig/conf.d/*.conf' \
  111. '%doc %{l_prefix}/share/fontconfig/*.pdf' \
  112. '%doc %{l_prefix}/share/fontconfig/*.txt'
  113. %files -f files
  114. %clean
  115. rm -rf $RPM_BUILD_ROOT