%define fontconfig_version 2.12.6-2 %define freetype2_version 2.9.1-2 %define libjpeg_version 9c-1 %define libpng_version 1.6.37-1 %define libXpm_version 3.5.12-1 %define pkgconfig_version 0.28-1 %define zlib_version 1.2.3-7 Summary: A graphics library for quick creation of PNG or JPEG images Name: gd Version: 2.0.35 Release: 6 Group: System Environment/Libraries License: BSD-style URL: http://www.libgd.org/Main_Page Source0: http://www.libgd.org/releases/%{name}-%{version}.tar.bz2 Patch3: gd-2.0.34-multilib.patch Patch4: gd-loop.patch Patch6: gd-2.0.35-overflow.patch Patch7: gd-2.0.35-AALineThick.patch Patch8: gd-2.0.33-BoxBound.patch Patch10: gd-2.0.35-time.patch Patch11: gd-2.0.35-security3.patch Patch12: gd-2.0.35-runtests.patch Patch13: gd-sa1.patch Patch14: gd-sa2.patch Patch15: gd-sa3.patch Patch16: gd-sa4.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: fontconfig-devel >= %{fontconfig_version} BuildRequires: freetype2-devel >= %{freetype2_version} BuildRequires: libjpeg-devel >= %{libjpeg_version} BuildRequires: libpng-devel >= %{libpng_version} BuildRequires: zlib-devel >= %{zlib_version} BuildRequires: pkg-config >= %{pkgconfig_version} BuildRequires: libXpm-devel >= %{libXpm_version} Requires: fontconfig >= %{fontconfig_version} Requires: freetype2 >= %{freetype2_version} Requires: libjpeg >= %{libjpeg_version} Requires: libpng >= %{libpng_version} Requires: zlib >= %{zlib_version} Requires: libXpm >= %{libXpm_version} %description The gd graphics library allows your code to quickly draw images complete with lines, arcs, text, multiple colors, cut and paste from other images, and flood fills, and to write out the result as a PNG or JPEG file. This is particularly useful in Web applications, where PNG and JPEG are two of the formats accepted for inline images by most browsers. Note that gd is not a paint program. The library is available as 32-bit and 64-bit. %package progs Summary: Utility programs that use libgd Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} Requires: fontconfig-devel >= %{fontconfig_version} Requires: freetype2-devel >= %{freetype2_version} Requires: libjpeg-devel >= %{libjpeg_version} Requires: libpng-devel >= %{libpng_version} Requires: zlib-devel >= %{zlib_version} Requires: pkg-config >= %{pkgconfig_version} Requires: libXpm-devel >= %{libXpm_version} %description progs The gd-progs package includes utility programs supplied with gd, a graphics library for creating PNG and JPEG images. If you install these, you must also install gd. %package devel Summary: The development libraries and header files for gd Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The gd-devel package contains the development libraries and header files for gd, a graphics library for creating PNG and JPEG graphics. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc_r -q64" or "gcc -maix64". %prep export PATH=/opt/freeware/bin:$PATH %setup -q %patch3 -p1 -b .mlib %patch4 -p1 -b .loop %patch6 -p1 -b .overflow %patch7 -p1 -b .AALineThick %patch8 -p1 -b .bb %patch10 -p1 -b .time %patch11 -p1 -b .sec3 %patch12 -p1 -b .runtests %patch13 -p1 -b .sa1 %patch14 -p1 -b .sa2 %patch15 -p1 -b .sa3 %patch16 -p1 -b .sa4 %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="cc_r -qcpluscmt -q64" ./configure \ --prefix=%{_prefix} \ --enable-static --enable-shared make %{?_smp_mflags} cp .libs/libgd.so.2 . make distclean # now build the 32-bit version export CC="cc_r -qcpluscmt" ./configure \ --prefix=%{_prefix} \ --enable-shared --enable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q .libs/libgd.a ./libgd.so.2 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc COPYING README-JPEG.TXT index.html entities.html %{_libdir}/*.a /usr/lib/*.a %files progs %defattr(-,root,system,-) %{_bindir}/annotate %{_bindir}/bdftogd %{_bindir}/gd2copypal %{_bindir}/gd2togif %{_bindir}/gd2topng %{_bindir}/gdcmpgif %{_bindir}/gdparttopng %{_bindir}/gdtopng %{_bindir}/giftogd2 %{_bindir}/pngtogd %{_bindir}/pngtogd2 %{_bindir}/webpng /usr/bin/annotate /usr/bin/bdftogd /usr/bin/gd2copypal /usr/bin/gd2togif /usr/bin/gd2topng /usr/bin/gdcmpgif /usr/bin/gdparttopng /usr/bin/gdtopng /usr/bin/giftogd2 /usr/bin/pngtogd /usr/bin/pngtogd2 /usr/bin/webpng %files devel %defattr(-,root,system,-) %doc index.html %{_bindir}/gdlib-config %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/*.pc /usr/bin/gdlib-config /usr/include/* /usr/lib/*.la %changelog * Wed May 29 2019 Michael Perzl - 2.0.35-6 - added all latest available security patches * Tue Apr 27 2010 Michael Perzl - 2.0.35-5 - recompiled thread-safe with cc_r * Wed Apr 23 2008 Michael Perzl - 2.0.35-4 - some minor spec file fixes * Sat Mar 29 2008 Michael Perzl - 2.0.35-3 - changed to FreeType version 2 * Thu Jan 03 2008 Michael Perzl - 2.0.35-2 - included both 32-bit and 64-bit shared objects * Fri Sep 28 2007 Michael Perzl - 2.0.35-1 - first version for AIX V5.1 and higher