1 |
%define major 3 |
2 |
%define libname %mklibname gd %{major} |
3 |
%define develname %mklibname gd -d |
4 |
%define staticdevelname %mklibname gd -d -s |
5 |
|
6 |
Summary: A library used to create PNG, JPEG, or WBMP images |
7 |
Name: libgd |
8 |
Version: 2.2.5 |
9 |
Release: %mkrel 1 |
10 |
License: BSD-like |
11 |
Group: System/Libraries |
12 |
URL: http://www.libgd.org/ |
13 |
Source0: https://github.com/libgd/libgd/releases/download/gd-%{version}/%{name}-%{version}.tar.xz |
14 |
Patch2: libgd-2.2.4-disable-tests-gdimagegrayscale-as-it-breaks-on-32-bit.patch |
15 |
BuildRequires: pkgconfig(fontconfig) |
16 |
BuildRequires: pkgconfig(freetype2) >= 9.8.3 |
17 |
BuildRequires: pkgconfig(libpng) |
18 |
BuildRequires: pkgconfig(libtiff-4) |
19 |
BuildRequires: pkgconfig(libwebp) |
20 |
BuildRequires: pkgconfig(xpm) |
21 |
BuildRequires: libjpeg-devel |
22 |
BuildRequires: pkgconfig(zlib) |
23 |
BuildRequires: gettext-devel |
24 |
|
25 |
%description |
26 |
gd is a graphics library. It allows your code to quickly draw images complete |
27 |
with lines, arcs, text, multiple colors, cut and paste from other images, and |
28 |
flood fills, and write out the result as a PNG or JPEG file. This is |
29 |
particularly useful in World Wide Webapplications, where PNG and JPEG are two |
30 |
of the formats accepted for in-line images by most browsers. |
31 |
|
32 |
gd is not a paint program. If you are looking for a paint program, you are |
33 |
looking in the wrong place. If you are not a programmer, you are looking in the |
34 |
wrong place. |
35 |
|
36 |
gd does not provide for every possible desirable graphics operation. It is not |
37 |
necessary or desirable for gd to become a kitchen-sink graphics package, but |
38 |
version 1.7.3 incorporates most of the commonly requested features for an 8-bit |
39 |
2D package. |
40 |
|
41 |
%package -n %{libname} |
42 |
Summary: A library used to create PNG, JPEG, or WBMP images |
43 |
Group: System/Libraries |
44 |
Provides: gd = %{version}-%{release} |
45 |
Obsoletes: gd |
46 |
|
47 |
%description -n %{libname} |
48 |
gd is a graphics library. It allows your code to quickly draw images complete |
49 |
with lines, arcs, text, multiple colors, cut and paste from other images, and |
50 |
flood fills, and write out the result as a PNG or JPEG file. This is |
51 |
particularly useful in World Wide Webapplications, where PNG and JPEG are two |
52 |
of the formats accepted for in-line images by most browsers. |
53 |
|
54 |
gd is not a paint program. If you are looking for a paint program, you are |
55 |
looking in the wrong place. If you are not a programmer, you are looking in the |
56 |
wrong place. |
57 |
|
58 |
gd does not provide for every possible desirable graphics operation. It is not |
59 |
necessary or desirable for gd to become a kitchen-sink graphics package, but |
60 |
version 1.7.3 incorporates most of the commonly requested features for an 8-bit |
61 |
2D package. |
62 |
|
63 |
This package contains the library needed to run programs dynamically linked |
64 |
with libgd. |
65 |
|
66 |
%package -n %{develname} |
67 |
Summary: The development libraries and header files for gd |
68 |
Group: Development/C |
69 |
Requires: %{libname} = %{version} |
70 |
Provides: gd-devel = %{version}-%{release} |
71 |
Obsoletes: gd-devel |
72 |
Provides: %{name}-devel = %{version}-%{release} |
73 |
|
74 |
%description -n %{develname} |
75 |
gd is a graphics library. It allows your code to quickly draw images complete |
76 |
with lines, arcs, text, multiple colors, cut and paste from other images, and |
77 |
flood fills, and write out the result as a PNG or JPEG file. This is |
78 |
particularly useful in World Wide Webapplications, where PNG and JPEG are two |
79 |
of the formats accepted for in-line images by most browsers. |
80 |
|
81 |
gd is not a paint program. If you are looking for a paint program, you are |
82 |
looking in the wrong place. If you are not a programmer, you are looking in the |
83 |
wrong place. |
84 |
|
85 |
gd does not provide for every possible desirable graphics operation. It is not |
86 |
necessary or desirable for gd to become a kitchen-sink graphics package, but |
87 |
version 1.7.3 incorporates most of the commonly requested features for an 8-bit |
88 |
2D package. |
89 |
|
90 |
These are the development libraries and header files for gd, the .png and .jpeg |
91 |
graphics library. If you're installing the gd graphics library, you'll probably |
92 |
want to install gd-devel. |
93 |
|
94 |
%package -n %{staticdevelname} |
95 |
Summary: Static GD library |
96 |
Group: Development/C |
97 |
Requires: %{develname} = %{version} |
98 |
Provides: libgd-static-devel = %{version}-%{release} |
99 |
Provides: gd-static-devel = %{version}-%{release} |
100 |
|
101 |
%description -n %{staticdevelname} |
102 |
gd is a graphics library. It allows your code to quickly draw images complete |
103 |
with lines, arcs, text, multiple colors, cut and paste from other images, and |
104 |
flood fills, and write out the result as a PNG or JPEG file. This is |
105 |
particularly useful in World Wide Webapplications, where PNG and JPEG are two |
106 |
of the formats accepted for in-line images by most browsers. |
107 |
|
108 |
gd is not a paint program. If you are looking for a paint program, you are |
109 |
looking in the wrong place. If you are not a programmer, you are looking in the |
110 |
wrong place. |
111 |
|
112 |
gd does not provide for every possible desirable graphics operation. It is not |
113 |
necessary or desirable for gd to become a kitchen-sink graphics package, but |
114 |
version 1.7.3 incorporates most of the commonly requested features for an 8-bit |
115 |
2D package. |
116 |
|
117 |
This package contains static gd library. |
118 |
|
119 |
%package -n gd-utils |
120 |
Summary: The Utils files for gd |
121 |
Group: System/Libraries |
122 |
Requires: %{libname} = %{version} |
123 |
|
124 |
%description -n gd-utils |
125 |
gd is a graphics library. It allows your code to quickly draw images complete |
126 |
with lines, arcs, text, multiple colors, cut and paste from other images, and |
127 |
flood fills, and write out the result as a PNG or JPEG file. This is |
128 |
particularly useful in World Wide Webapplications, where PNG and JPEG are two |
129 |
of the formats accepted for in-line images by most browsers. |
130 |
|
131 |
gd is not a paint program. If you are looking for a paint program, you are |
132 |
looking in the wrong place. If you are not a programmer, you are looking in the |
133 |
wrong place. |
134 |
|
135 |
gd does not provide for every possible desirable graphics operation. It is not |
136 |
necessary or desirable for gd to become a kitchen-sink graphics package, but |
137 |
version 1.7.3 incorporates most of the commonly requested features for an 8-bit |
138 |
2D package. |
139 |
|
140 |
This package contains various utilities utilizing the gd library. |
141 |
|
142 |
%prep |
143 |
%setup -q -n libgd-%{version} |
144 |
%autopatch -p1 |
145 |
|
146 |
%build |
147 |
%ifarch %{ix86} |
148 |
# see https://github.com/libgd/libgd/issues/242 |
149 |
CFLAGS="%{optflags} $CFLAGS -msse -mfpmath=sse" |
150 |
%endif |
151 |
|
152 |
autoreconf -fi |
153 |
%configure2_5x --without-libiconv-prefix |
154 |
%make_build |
155 |
|
156 |
%check |
157 |
%ifarch %{ix86} |
158 |
# See https://github.com/libgd/libgd/issues/359 |
159 |
XFAIL_TESTS="gdimagegrayscale/basic $XFAIL_TESTS" |
160 |
%endif |
161 |
|
162 |
export XFAIL_TESTS |
163 |
|
164 |
: Upstream test suite |
165 |
make check |
166 |
|
167 |
%install |
168 |
%make_install |
169 |
|
170 |
sed -i -e 's!-Wl,--as-needed!!' -e 's!-Wl,--no-undefined!!' %{buildroot}%{_bindir}/gdlib-config |
171 |
|
172 |
%multiarch_binaries %{buildroot}%{_bindir}/gdlib-config |
173 |
%multiarch_includes %{buildroot}%{_includedir}/gd.h |
174 |
|
175 |
install -m 0644 src/gdhelpers.h %{buildroot}%{_includedir}/ |
176 |
|
177 |
rm -f %{buildroot}%{_libdir}/*.la |
178 |
|
179 |
%files -n %{libname} |
180 |
%doc docs/README.TXT src/COPYING |
181 |
%{_libdir}/*.so.%{major} |
182 |
%{_libdir}/*.so.%{major}.* |
183 |
|
184 |
%files -n %{develname} |
185 |
%{_bindir}/gdlib-config |
186 |
%multiarch %{multiarch_bindir}/gdlib-config |
187 |
%{_libdir}/*.so |
188 |
%{_libdir}/pkgconfig/gdlib.pc |
189 |
%{_includedir}/*.h |
190 |
%multiarch %{multiarch_includedir}/*.h |
191 |
|
192 |
%files -n %{staticdevelname} |
193 |
%{_libdir}/lib*.a |
194 |
|
195 |
%files -n gd-utils |
196 |
%{_bindir}/annotate |
197 |
%{_bindir}/bdftogd |
198 |
%{_bindir}/gd2copypal |
199 |
%{_bindir}/gd2topng |
200 |
%{_bindir}/gdparttopng |
201 |
%{_bindir}/gdtopng |
202 |
%{_bindir}/pngtogd |
203 |
%{_bindir}/pngtogd2 |
204 |
%{_bindir}/webpng |
205 |
%{_bindir}/gd2togif |
206 |
%{_bindir}/gdcmpgif |
207 |
%{_bindir}/giftogd2 |