pango.spec 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. ##
  2. ## pango.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_glib_major 2.14
  25. %define V_pango_major 1.22
  26. %define V_pango_minor 0
  27. # package information
  28. Name: pango
  29. Summary: Layout And Rendering Of Internationalized Text
  30. URL: http://www.pango.org/
  31. Vendor: The Gtk Project
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: XWindow
  36. License: GPL
  37. Version: %{V_pango_major}.%{V_pango_minor}
  38. Release: 20081016
  39. # package options
  40. %option with_x11 no
  41. # list of sources
  42. Source0: http://ftp.gnome.org/pub/GNOME/sources/pango/%{V_pango_major}/pango-%{version}.tar.bz2
  43. Patch0: pango.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, pkgconfig
  48. PreReq: OpenPKG, openpkg >= 20040130
  49. BuildPreReq: glib2 >= %{V_glib_major}
  50. PreReq: glib2 >= %{V_glib_major}
  51. BuildPreReq: gettext, libiconv, freetype, fontconfig, cairo >= 1.7.4
  52. PreReq: gettext, libiconv, freetype, fontconfig, cairo >= 1.7.4
  53. %if "%{with_x11}" == "yes"
  54. BuildPreReq: X11, xft
  55. PreReq: X11, xft
  56. %endif
  57. AutoReq: no
  58. AutoReqProv: no
  59. %description
  60. Pango is a library for layout and rendering of text, with an
  61. emphasis on internationalization. Pango can be used anywhere that
  62. text layout is needed; however, most of the work on Pango was done
  63. using the Gtk+ widget toolkit as a test platform. Pango forms the
  64. core of text and font handling for Gtk+.
  65. %track
  66. prog pango = {
  67. version = %{version}
  68. url = http://ftp.gnome.org/pub/GNOME/sources/pango/%{V_pango_major}/
  69. regex = pango-(__VER__)\.tar\.(gz|bz2)
  70. }
  71. %prep
  72. %setup -q
  73. %patch -p0
  74. %{l_shtool} subst \
  75. -e 's;/pango-1\.0;/pango;g' \
  76. -e 's;lib\(p[a-zA-Z0-9]*\)-1.0;lib\1;g' \
  77. -e 's;lib\(p[a-zA-Z0-9]*\)-\$(PANGO_API_VERSION);lib\1;g' \
  78. -e 's;-@PANGO_API_VERSION@;;g' \
  79. -e '/moduledir =/s;/\$(PANGO_MODULE_VERSION);;g' \
  80. Makefile.in */Makefile.in */*/Makefile.in \
  81. pango\*.pc.in
  82. %build
  83. ( echo "ac_cv_lib_cairo_cairo_ft_scaled_font_lock_face=yes"
  84. ) >config.cache
  85. CC="%{l_cc}" \
  86. CFLAGS="%{l_cflags -O}" \
  87. %if "%{with_x11}" == "yes"
  88. CPPFLAGS="%{l_cppflags} -I`%{l_rc} --query x11_incdir`" \
  89. LDFLAGS="%{l_ldflags} -L`%{l_rc} --query x11_libdir`" \
  90. %else
  91. CPPFLAGS="%{l_cppflags}" \
  92. LDFLAGS="%{l_ldflags}" \
  93. %endif
  94. ./configure \
  95. --cache-file=./config.cache \
  96. --prefix=%{l_prefix} \
  97. --mandir=%{l_prefix}/man \
  98. %if "%{with_x11}" == "yes"
  99. --with-x \
  100. --x-includes=`%{l_rc} --query x11_incdir` \
  101. --x-libraries=`%{l_rc} --query x11_libdir` \
  102. %else
  103. --without-x \
  104. %endif
  105. --with-html-dir="%{l_prefix}/share/pango/doc" \
  106. --with-xml-catalog="%{l_prefix}/share/sgml/catalog.xml" \
  107. --disable-dependency-tracking \
  108. --disable-debug \
  109. --disable-rebuilds \
  110. --disable-shared \
  111. --with-included-modules="arabic-fc,basic-fc,basic-x,hangul-fc,hebrew-fc,indic-fc,khmer-fc,syriac-fc,thai-fc,tibetan-fc"
  112. %{l_make} %{l_mflags -O}
  113. %install
  114. rm -rf $RPM_BUILD_ROOT
  115. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  116. %{l_shtool} mkdir -f -p -m 755 \
  117. $RPM_BUILD_ROOT%{l_prefix}/etc/pango
  118. $RPM_BUILD_ROOT%{l_prefix}/bin/pango-querymodules \
  119. $RPM_BUILD_ROOT%{l_prefix}/lib/pango/modules/*.so \
  120. | sed "s,$RPM_BUILD_ROOT,," \
  121. >$RPM_BUILD_ROOT%{l_prefix}/etc/pango/pango.modules
  122. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  123. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
  124. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.s[ol]
  125. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.s[ol].*
  126. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/pango/modules/*.la
  127. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/pango/modules/*.a
  128. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/pango/doc
  129. rmdir $RPM_BUILD_ROOT%{l_prefix}/share/pango >/dev/null 2>&1 || true
  130. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  131. %{l_files_std} \
  132. '%config %{l_prefix}/etc/pango/*'
  133. %files -f files
  134. %clean
  135. rm -rf $RPM_BUILD_ROOT