-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathimlib2.spec
122 lines (103 loc) · 3.18 KB
/
imlib2.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
%{?el5:%define _without_giflib 1}
%{?el4:%define _without_giflib 1}
%{?el3:%define _without_giflib 1}
%{?el2:%define _without_giflib 1}
%{?el4:%define _without_modxorg 1}
%{?el3:%define _without_modxorg 1}
Summary: Powerful image loading and rendering library
Name: imlib2
Version: 1.4.7
Release: 1.%{dist}
License: BSD
Vendor: %{vendor}
Packager: %{packager}
Group: System Environment/Libraries
URL: http://enlightenment.org/pages/imlib2.html
Source: http://dl.sf.net/project/enlightenment/imlib2-src/%{version}/imlib2-%{version}.tar.bz2
#Patch0: imlib2-1.2.1-X11-path.patch
#Patch1: imlib2-1.3.0-multilib.patch
#Patch2: imlib2-1.3.0-loader_overflows.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: bzip2-devel
BuildRequires: freetype-devel >= 1.2
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: zlib-devel
# The ltdl.h file is required...
BuildRequires: libtool, gcc-c++
%{?_without_giflib:BuildRequires: libungif-devel}
%{!?_without_giflib:BuildRequires: giflib-devel}
%{?_without_modxorg:BuildRequires: XFree86-devel}
%{!?_without_modxorg:BuildRequires: libXext-devel}
%description
Imlib2 is an advanced replacement library for libraries like libXpm that
provides many more features with much greater flexibility and speed than
standard libraries, including font rasterization, rotation, RGBA space
rendering and blending, dynamic binary filters, scripting, and more.
%package devel
Summary: Imlib2 header, static libraries and documentation
Group: Development/Libraries
Requires: %{name} = %{version}
%{?_without_modxorg:Requires: XFree86-devel}
%{!?_without_modxorg:Requires: libX11-devel}
Requires: pkgconfig
%description devel
Header, static libraries and documentation for Imlib2.
%prep
%setup
#patch0 -p1 -b .x11-path
#patch1 -p1 -b .multilib
#patch2 -p1 -b .overflow
%{__perl} -pi.orig -e 's|/lib(?=[^/\w])|/%{_lib}|g' configure
touch aclocal.m4
touch configure
touch config.h.in
touch `find -name Makefile.in`
%build
%configure \
--disable-dependency-tracking \
--disable-static \
--x-libraries="%{_prefix}/X11R6/%{_lib}" \
--with-pic \
%ifarch %{ix86}
--enable-mmx \
%else
--disable-mmx \
%endif
%ifarch x86_64
--enable-amd64
%else
--disable-amd64
%endif
%{__make} %{?_smp_mflags}
#LIBTOOL="%{_bindir}/libtool"
%install
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR="%{buildroot}"
#LIBTOOL="%{_bindir}/libtool"
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && %__rm -rf $RPM_BUILD_ROOT
[ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
[ "%{_builddir}/%{name}-%{version}" != "/" ] && %__rm -rf %{_builddir}/%{name}-%{version}
[ "%{_builddir}/%{name}" != "/" ] && %__rm -rf %{_builddir}/%{name}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog COPYING doc/ README
%{_bindir}/imlib2_*
%{_datadir}/imlib2/
%{_libdir}/libImlib2.so.*
%{_libdir}/imlib2/
%files devel
%defattr(-, root, root, 0755)
%{_bindir}/imlib2-config
%{_includedir}/Imlib2.h
### Required by kdelibs bug (RHbz #142244)
%{_libdir}/libImlib2.la
%{_libdir}/libImlib2.so
%{_libdir}/pkgconfig/imlib2.pc
%exclude %{_libdir}/imlib2/filters/*.la
%exclude %{_libdir}/imlib2/loaders/*.la
%changelog