imlib.spec 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. ##
  2. ## imlib.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 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 version
  25. %define V_imlib1_major 1.9
  26. %define V_imlib1_minor 15
  27. %define V_imlib2_major 1.4
  28. %define V_imlib2_minor 0
  29. # package information
  30. Name: imlib
  31. Summary: The Gtk Image Library
  32. URL: http://www.enlightenment.org/Libraries/Imlib2/
  33. Vendor: Carsten Haitzler
  34. Packager: OpenPKG Foundation e.V.
  35. Distribution: OpenPKG Community
  36. Class: EVAL
  37. Group: XWindow
  38. License: GPL
  39. Version: %{V_imlib2_major}.%{V_imlib2_minor}
  40. Release: 20070929
  41. # list of sources
  42. Source0: ftp://ftp.gnome.org/pub/GNOME/sources/imlib/%{V_imlib1_major}/imlib-%{V_imlib1_major}.%{V_imlib1_minor}.tar.gz
  43. Source1: http://switch.dl.sourceforge.net/enlightenment/imlib2-%{V_imlib2_major}.%{V_imlib2_minor}.tar.gz
  44. Patch0: imlib.patch
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130, make
  49. PreReq: OpenPKG, openpkg >= 20040130
  50. BuildPreReq: glib, gtk, tiff, jpeg, png, giflib, freetype
  51. PreReq: glib, gtk, tiff, jpeg, png, giflib, freetype
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. Imlib is an image processing library for use with Gtk. It can
  56. load/save image files from/to disk in many formats, render image
  57. data onto other images, render images to an X-Windows drawable,
  58. produce pixmaps and pixmap masks of images, apply filters to
  59. images, rotate images, accept RGBA data for images, scale images,
  60. alpha blend images on other images or drawables, apply color
  61. correction and modification tables and factors to images, render
  62. images onto images with color correction and modification tables,
  63. render truetype anti-aliased text at any angle, render anti-aliased
  64. lines, render rectangles render linear multi-colored gradients,
  65. cache data intelligently for maximum performance, allocate colors
  66. automatically, allow full control over caching and color allocation,
  67. provide plug-in filter interface, and provide on-the-fly runtime
  68. plug-in image loading and saving interface.
  69. This package contains both the newer Imlib2 %{V_imlib2_major}.%{V_imlib2_minor}
  70. and the older Imlib %{V_imlib1_major}.%{V_imlib1_minor}.
  71. %track
  72. prog imlib:imlib1 = {
  73. version = %{V_imlib1_major}.%{V_imlib1_minor}
  74. url = ftp://ftp.gnome.org/pub/GNOME/sources/imlib/
  75. regex = (\d+\.\d+)\b
  76. url = ftp://ftp.gnome.org/pub/GNOME/sources/imlib/__NEWVER__/
  77. regex = imlib-(__VER__)\.tar\.gz
  78. }
  79. prog imlib:imlib2 = {
  80. version = %{V_imlib2_major}.%{V_imlib2_minor}
  81. url = http://sourceforge.net/project/showfiles.php?group_id=2
  82. regex = imlib2-(__VER__)\.tar\.gz
  83. }
  84. %prep
  85. %setup -q -c
  86. %setup -q -D -T -a 1
  87. %patch -p0
  88. %{l_shtool} subst \
  89. -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
  90. imlib2-%{V_imlib2_major}.%{V_imlib2_minor}/configure \
  91. imlib-%{V_imlib1_major}.%{V_imlib1_minor}/configure
  92. %build
  93. ( cd imlib2-%{V_imlib2_major}.%{V_imlib2_minor}
  94. CC="%{l_cc}" \
  95. CFLAGS="%{l_cflags -O}" \
  96. CPPFLAGS="%{l_cppflags tiff} -I`%{l_rc} --query x11_incdir`" \
  97. LDFLAGS="%{l_ldflags} -L`%{l_rc} --query x11_libdir`" \
  98. LIBS="-ljpeg -lz -lm" \
  99. ./configure \
  100. --prefix=%{l_prefix} \
  101. --without-zlib \
  102. --without-bzip2 \
  103. --without-id3 \
  104. --disable-shared
  105. %{l_make} %{l_mflags -O}
  106. ) || exit $?
  107. ( cd imlib-%{V_imlib1_major}.%{V_imlib1_minor}
  108. CC="%{l_cc}" \
  109. CFLAGS="%{l_cflags -O} %{l_cppflags tiff}" \
  110. CPPFLAGS="%{l_cppflags tiff}" \
  111. LDFLAGS="%{l_ldflags}" \
  112. ./configure \
  113. --prefix=%{l_prefix} \
  114. --sysconfdir=%{l_prefix}/etc/imlib \
  115. --with-gtk-prefix=%{l_prefix} \
  116. --with-glib-prefix=%{l_prefix} \
  117. --disable-shared \
  118. --disable-nls \
  119. --enable-shm
  120. %{l_make} %{l_mflags -O}
  121. ) || exit $?
  122. %install
  123. rm -rf $RPM_BUILD_ROOT
  124. ( cd imlib2-%{V_imlib2_major}.%{V_imlib2_minor}
  125. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  126. ) || exit $?
  127. ( cd imlib-%{V_imlib1_major}.%{V_imlib1_minor}
  128. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  129. ) || exit $?
  130. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
  131. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  132. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  133. %{l_files_std}
  134. %files -f files
  135. %clean
  136. rm -rf $RPM_BUILD_ROOT