Blob Blame History Raw
%define libtool_hack LIBTOOL=/usr/bin/libtool

Summary:	An image loading and rendering library for X11R6
Name:		imlib
Version:	1.9.15
Release:	3%{?dist}
Epoch:		1
License:	LGPL+
Group:		System Environment/Libraries
URL:		http://enlightenment.sourceforge.net/Libraries/Imlib/
Source0:	http://ftp.gnome.org/pub/GNOME/sources/imlib/1.9/imlib-%{version}.tar.bz2
Source2:	local-hack-gmodule.tar.gz
Patch1:		imlib-1.9.13-sec2.patch
Patch3:		imlib-1.9.10-cppflags.patch
Patch4:		imlib-1.9.15-gmodulehack.patch
Patch6:		imlib-1.9.13-underquoted.patch
Patch8:		imlib-1.9.15-lib-bloat.patch
Patch9:		imlib-1.9.15-multilib-config.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
BuildRequires:	automake
BuildRequires:	giflib-devel
BuildRequires:	gtk+-devel
BuildRequires:	libpng-devel >= 1.2.2
BuildRequires:	libjpeg-devel
BuildRequires:	libtiff-devel
BuildRequires:	libtool
BuildRequires:	libX11-devel
BuildRequires:	libXt-devel
BuildRequires:	zlib-devel
Obsoletes:	imlib-cfgeditor <= %{version}-%{release}, Imlib <= %{version}-%{release}
Provides:	imlib-cfgeditor = %{version}-%{release}, Imlib = %{version}-%{release}

%description
Imlib is a display depth independent image loading and rendering library.
Imlib is designed to simplify and speed up the process of loading images and
obtaining X Window System drawables. Imlib provides many simple manipulation
routines which can be used for common operations.

The imlib package also contains the imlib_config program, which you can use to
configure the Imlib image loading and rendering library. Imlib_config can be
used to control how Imlib uses color and handles gamma corrections, etc.

Install imlib if you need an image loading and rendering library for X11R6, or
if you are installing GNOME. 

%package devel
Summary:	Development tools for Imlib applications
Group:		Development/Libraries
Requires:	imlib = %{epoch}:%{version}-%{release}
Requires:	giflib-devel, gtk+-devel, libjpeg-devel, libtiff-devel
Requires:	libX11-devel, zlib-devel
Requires:	%{_datadir}/aclocal, pkgconfig

%description devel
The header files, static libraries and documentation needed for
developing Imlib applications. Imlib is an image loading and
rendering library for X11R6.

Install the imlib-devel package if you want to develop Imlib
applications. You will also need to install the imlib package.

%prep
%setup -q
%patch1 -p1 -b .sec2
%patch3 -p1 -b .cppflags
%patch4 -p1 -b .gmodulehack
%patch6 -p1 -b .underquoted
%patch8 -p1 -b .lib-bloat
%patch9 -p1 -b .multilib

## Local gmodule hack to support building with libpng rather than libpng10
(cd gdk_imlib && %{__tar} zxf %{SOURCE2})
%{__sed} -i -e	's/gmodule.h/gmodule-local.h/g;
		 s/g_module/local_hack_g_module/g;
		 s/GModule/LocalHackGModule/g;
		 s/G_MODULE/LOCAL_HACK_G_MODULE/g' \
	gdk_imlib/modules.c
%{__sed} -i -e 's/-static//g' \
	gdk_imlib/local-hack-gmodule/Makefile

## Change soname to reflect new libpng
%{__sed} -i -e 's/10:15:9/11:0:0/g' Imlib/Makefile*

%build
/usr/bin/autoreconf -i -f
%configure

## Remove -L%{_libdir} from imlib-config if present;
## it's redundant and breaks multilib compatibility
%{__sed} -i -e 's,-L%{_libdir} ,,g' imlib-config

## Build local gmodule hack
tagname=CC %{__make} -C gdk_imlib/local-hack-gmodule %{libtool_hack}
%{__cp} gdk_imlib/local-hack-gmodule/gmodule-local.h gdk_imlib/

## Avoid unnecessary library linkage in libgdk_imlib
GX_LIBS=$(/usr/bin/gtk-config --libs | %{__sed} -e 's/-lgtk //; s/-lgmodule //; s/-lXi //')

## Note: build with %{?_smp_mflags} doesn't work reliably
%{__make} %{libtool_hack} GX_LIBS="${GX_LIBS}"

%install
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR=%{buildroot} %{libtool_hack}

## Don't package static or libtool archives
%{__rm} -f %{buildroot}%{_libdir}/*a

%clean
%{__rm} -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc README AUTHORS ChangeLog COPYING.LIB
%config(noreplace) %{_sysconfdir}/im_palette-small.pal
%config(noreplace) %{_sysconfdir}/im_palette-tiny.pal
%config(noreplace) %{_sysconfdir}/im_palette.pal
%config(noreplace) %{_sysconfdir}/imrc
%{_bindir}/imlib_config
%{_libdir}/libImlib.so.11
%{_libdir}/libImlib.so.11.*
%{_libdir}/libgdk_imlib.so.1
%{_libdir}/libgdk_imlib.so.1.*
%{_libdir}/libimlib-bmp.so
%{_libdir}/libimlib-gif.so
%{_libdir}/libimlib-jpeg.so
%{_libdir}/libimlib-png.so
%{_libdir}/libimlib-ppm.so
%{_libdir}/libimlib-ps.so
%{_libdir}/libimlib-tiff.so
%{_libdir}/libimlib-xpm.so

%files devel
%defattr(-,root,root,-)
%doc doc/*.gif doc/*.html
%{_bindir}/imlib-config
%{_datadir}/aclocal/imlib.m4
%{_includedir}/*.h
%{_libdir}/libImlib.so
%{_libdir}/libgdk_imlib.so
%{_libdir}/pkgconfig/imlib.pc
%{_libdir}/pkgconfig/imlibgdk.pc
%{_mandir}/man1/imlib_config.1*
%{_mandir}/man1/imlib-config.1*

%changelog
* Wed Aug  8 2007 Paul Howarth <paul@city-fan.org> 1:1.9.15-3
- redesign of enlightenment.org website removed imlib page, so URL changed
  to enlightenment.sourceforge.net where the original website lived (#251278)
- clarify license as GNU Lesser General Public License v2 or later (LGPL+)

* Tue Apr 10 2007 Paul Howarth <paul@city-fan.org> 1:1.9.15-2
- add patch for CVE-2004-1025, CVE-2004-1026 (integer/buffer overflows)
  (#235416)

* Thu Mar 29 2007 Paul Howarth <paul@city-fan.org> 1:1.9.15-1
- update to 1.9.15
- update gmodulehack patch
- update URL
- version the obsoletes and provides
- require giflib-devel instead of libungif-devel
- remove redundant gtk+ dependency
- devel package requires %%{_datadir}/aclocal and pkgconfig
- remove patches for fixes done upstream (ac25, waitpid, bounds)
- use sed rather than perl for scripted edits
- macro-ize commands where possible, hardcode paths otherwise
- use make with DESTDIR rather than %%makeinstall
- use more explicit names in the %%files lists
- make imlib-config multilib-compatible
- add buildreq libXt-devel (needed for FC5)

* Fri Jan 12 2007 Paul Howarth <paul@city-fan.org> 1:1.9.13-31
- rebuilt

* Sun Sep 03 2006 Michael J. Knox <michael[AT]knox.net.nz> - 1:1.9.13-30
- Fixed for building in mock/rawhide

* Mon Aug 27 2006 Michael J. Knox <michael[AT]knox.net.nz> - 1:1.9.13-29
- Rebuild for FC6

* Thu Jun 29 2006 Michael J. Knox <michael[AT]knox.net.nz> - 1:1.9.13-28
- spec tidy for FE import

* Mon Jun 12 2006 Matthias Clasen <mclasen@redhat.com> - 1:1.9.13-27
- Package review cleanups

* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1:1.9.13-26.2.1
- bump again for double-long bug on ppc(64)

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1:1.9.13-26.2
- rebuilt for new gcc4.1 snapshot and glibc changes

* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt

* Mon Nov  7 2005 Matthias Clasen <mclasen@redhat.com> 1:1.9.13-26
- Remove static libs from the -devel package

* Tue Nov  1 2005 Matthias Clasen <mclasen@redhat.com> 1:1.9.13-25
- Switch requires to modular X

* Wed Mar  2 2005 Matthias Clasen <mclasen@redhat.com> 1:1.9.13-24
- Replace Copyright: with License:
- rebuild with gcc4

* Thu Sep  9 2004 Matthias Clasen <mclasen@redhat.com>
- security fixes

* Thu Aug 12 2004 Matthias Clasen <mclasen@redhat.com> 1:1.9.13-18
- Kill imlib-cfgeditor subpackage. Move imlib_config 
  into imlib package.  (#127878)

* Fri Aug  6 2004 Tim Waugh <twaugh@redhat.com> 1:1.9.13-17
- Fixed underquoted m4 definitions.

* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Wed Aug  6 2003 Elliot Lee <sopwith@redhat.com>
- Fix libtool

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Tue Jun  3 2003 Jeff Johnson <jbj@redhat.com>
- add explicit epoch's where needed.

* Fri Jan 24 2003 Jonathan Blandford <jrb@redhat.com>
- add epoch to requires, #77919
- Fix URI, #71008

* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt

* Tue Nov  5 2002 Jeremy Katz <katzj@redhat.com>
- rebuild to fixup Xlib dir in .pc file

* Tue Aug 13 2002 Havoc Pennington <hp@redhat.com>
- bump soname for new libpng, matches Debian soname
- mop up unpackaged files

* Fri Jul 19 2002 Jakub Jelinek <jakub@redhat.com>
- really remove -static

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Jun 17 2002 Havoc Pennington <hp@redhat.com>
- remove -static that messed up prelinking

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon May 13 2002 Jeremy Katz <katzj@redhat.com>
- rebuild in new environment

* Wed Apr 10 2002 Owen Taylor <otaylor@redhat.com>
- Backport file descriptor leak and extra waitpid fixes from 1.9.14

* Fri Mar 15 2002 Owen Taylor <otaylor@redhat.com>
- Remove netpbm dependencies

* Thu Mar 14 2002 Owen Taylor <otaylor@redhat.com>
- Version 1.9.13
- Bump version for 6.x/7.x split
- Remove automake-1.4 references

* Thu Feb 28 2002 Havoc Pennington <hp@redhat.com>
- backport to Hampton

* Thu Feb  7 2002 Havoc Pennington <hp@redhat.com>
- remove libpng10, instead load libpng without RTLD_GLOBAL in
  gdk_imlib, and break ABI of plain Imlib

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Tue Jan  8 2002 Havoc Pennington <hp@redhat.com>
- get rid of -I/usr/include that was hosing up the png build

* Mon Jan  7 2002 Havoc Pennington <hp@redhat.com>
- try to build against libpng10
- minor spec file cleanup

* Mon Jun 18 2001 Than Ngo <than@redhat.com>
- use %%{_tmppath}
- fix to build against new libtool

* Tue Apr 17 2001 Jonathan Blandford <jrb@redhat.com>
- Updated to new version (1.9.10)

* Fri Aug 11 2000 Jonathan Blandford <jrb@redhat.com>
- Up Epoch and release

* Tue Aug 01 2000 Jonathan Blandford <jrb@redhat.com>
- updated to new version.

* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Thu Jun 29 2000 Dave Mason <dcm@redhat.com>
- updated spec file to new RPM Guidelines

* Sat Jun  3 2000 Nalin Dahyabhai <nalin@redhat.com>
- change dependencies from libgr to netpbm

* Wed May 31 2000 Matt Wilson <msw@redhat.com>
- use makeinstall macro
- 1.9.8

* Fri Feb 25 2000 Elliot Lee <sopwith@redhat.com>
- Patch to use fallback locations for palette files.

* Thu Feb 03 2000 Preston Brown <pbrown@redhat.com>
- strip format plugins

* Tue Aug 31 1999 Elliot Lee <sopwith@redhat.com>
- Updates from the RHL 6.0 package.

* Mon Jan 11 1999 Carsten Haitzler <raster@redhat.com>
- up to 1.9.0

* Wed Sep 23 1998 Carsten Haitzler <raster@redhat.com>
- up to 1.8.1

* Tue Sep 22 1998 Cristian Gafton <gafton@redhat.com>
- yet another build for today (%%defattr and %%attr in the files lists)
- devel docs are back on the spec file

* Tue Sep 22 1998 Carsten Haitzler <raster@redhat.com>
- Added minor patch for ps saving code.

* Mon Sep 21 1998 Cristian Gafton <gafton@redhat.com>
- updated to version 1.8

* Fri Sep 11 1998 Cristian Gafton <gafton@redhat.com>
- take out imlib_config from devel package

* Wed Sep 9 1998 Michael Fulbright <msf@redhat.com>
- upgraded to 1.7
- changed name so it will persist if user later install devel imlib
- added subpackage for imlib_config

* Fri Apr 3 1998 Michael K. Johnson <johnsonm@redhat.com>
- fixed typo

* Fri Mar 13 1998 Marc Ewing <marc@redhat.com>
- Added -k, Obsoletes
- Integrate into CVS source tree