| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- ##
- ## imlib.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package version
- %define V_imlib1_major 1.9
- %define V_imlib1_minor 15
- %define V_imlib2_major 1.4
- %define V_imlib2_minor 0
- # package information
- Name: imlib
- Summary: The Gtk Image Library
- URL: http://www.enlightenment.org/Libraries/Imlib2/
- Vendor: Carsten Haitzler
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: EVAL
- Group: XWindow
- License: GPL
- Version: %{V_imlib2_major}.%{V_imlib2_minor}
- Release: 20070929
- # list of sources
- Source0: ftp://ftp.gnome.org/pub/GNOME/sources/imlib/%{V_imlib1_major}/imlib-%{V_imlib1_major}.%{V_imlib1_minor}.tar.gz
- Source1: http://switch.dl.sourceforge.net/enlightenment/imlib2-%{V_imlib2_major}.%{V_imlib2_minor}.tar.gz
- Patch0: imlib.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, make
- PreReq: OpenPKG, openpkg >= 20040130
- BuildPreReq: glib, gtk, tiff, jpeg, png, giflib, freetype
- PreReq: glib, gtk, tiff, jpeg, png, giflib, freetype
- AutoReq: no
- AutoReqProv: no
- %description
- Imlib is an image processing library for use with Gtk. It can
- load/save image files from/to disk in many formats, render image
- data onto other images, render images to an X-Windows drawable,
- produce pixmaps and pixmap masks of images, apply filters to
- images, rotate images, accept RGBA data for images, scale images,
- alpha blend images on other images or drawables, apply color
- correction and modification tables and factors to images, render
- images onto images with color correction and modification tables,
- render truetype anti-aliased text at any angle, render anti-aliased
- lines, render rectangles render linear multi-colored gradients,
- cache data intelligently for maximum performance, allocate colors
- automatically, allow full control over caching and color allocation,
- provide plug-in filter interface, and provide on-the-fly runtime
- plug-in image loading and saving interface.
- This package contains both the newer Imlib2 %{V_imlib2_major}.%{V_imlib2_minor}
- and the older Imlib %{V_imlib1_major}.%{V_imlib1_minor}.
- %track
- prog imlib:imlib1 = {
- version = %{V_imlib1_major}.%{V_imlib1_minor}
- url = ftp://ftp.gnome.org/pub/GNOME/sources/imlib/
- regex = (\d+\.\d+)\b
- url = ftp://ftp.gnome.org/pub/GNOME/sources/imlib/__NEWVER__/
- regex = imlib-(__VER__)\.tar\.gz
- }
- prog imlib:imlib2 = {
- version = %{V_imlib2_major}.%{V_imlib2_minor}
- url = http://sourceforge.net/project/showfiles.php?group_id=2
- regex = imlib2-(__VER__)\.tar\.gz
- }
- %prep
- %setup -q -c
- %setup -q -D -T -a 1
- %patch -p0
- %{l_shtool} subst \
- -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
- imlib2-%{V_imlib2_major}.%{V_imlib2_minor}/configure \
- imlib-%{V_imlib1_major}.%{V_imlib1_minor}/configure
- %build
- ( cd imlib2-%{V_imlib2_major}.%{V_imlib2_minor}
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- CPPFLAGS="%{l_cppflags tiff} -I`%{l_rc} --query x11_incdir`" \
- LDFLAGS="%{l_ldflags} -L`%{l_rc} --query x11_libdir`" \
- LIBS="-ljpeg -lz -lm" \
- ./configure \
- --prefix=%{l_prefix} \
- --without-zlib \
- --without-bzip2 \
- --without-id3 \
- --disable-shared
- %{l_make} %{l_mflags -O}
- ) || exit $?
- ( cd imlib-%{V_imlib1_major}.%{V_imlib1_minor}
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O} %{l_cppflags tiff}" \
- CPPFLAGS="%{l_cppflags tiff}" \
- LDFLAGS="%{l_ldflags}" \
- ./configure \
- --prefix=%{l_prefix} \
- --sysconfdir=%{l_prefix}/etc/imlib \
- --with-gtk-prefix=%{l_prefix} \
- --with-glib-prefix=%{l_prefix} \
- --disable-shared \
- --disable-nls \
- --enable-shm
- %{l_make} %{l_mflags -O}
- ) || exit $?
- %install
- rm -rf $RPM_BUILD_ROOT
- ( cd imlib2-%{V_imlib2_major}.%{V_imlib2_minor}
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
- ) || exit $?
- ( cd imlib-%{V_imlib1_major}.%{V_imlib1_minor}
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
- ) || exit $?
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|