Summary: Bruce Verderaime's GDChart chart-drawing utility. Name: gdchart Version: 0.11.5dev Release: 1 Group: Development/Libraries/C and C++ License: Other uncritical OpenSource License URL: http://www.fred.net/brv/chart/ Source0: http://www.fred.net/brv/chart/%{name}%{version}.tar.gz Vendor: Bruce Verderaime Patch0: %{name}%{version}_compilefixes.patch Patch1: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: patch BuildRequires: freetype2-devel >= 2.3.11 BuildRequires: gd-devel >= 2.0.35-5 BuildRequires: libjpeg-devel >= 6b BuildRequires: libpng-devel >= 1.2.40 BuildRequires: zlib-devel >= 1.2.3 Requires: freetype2-devel >= 2.3.11 Requires: gd-devel >= 2.0.35-5 Requires: libjpeg-devel >= 6b Requires: libpng-devel >= 1.2.40 Requires: zlib-devel >= 1.2.3 %description GDCHART is an easy to use C API and high performance library for creating charts and graphs in GIF format. It is especially useful for CGI programming. It is based on the GD library. The library is available as 32-bit and 64-bit. 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 -q64" or "gcc -maix64". %prep export PATH=/opt/freeware/bin:$PATH %setup -n %{name}%{version} %patch0 %patch1 %build export CC="cc" # first build the 64-bit version export OBJECT_MODE=64 make %{?_smp_mflags} mv libgdc.a libgdc.a.64 make clean # now build the 32-bit version export OBJECT_MODE=32 make %{?_smp_mflags} # add the 64-bit shared objects to the library containing already the # 32-bit objects for f in `/usr/bin/ar -X64 -t libgdc.a.64` ; do /usr/bin/ar -X64 -x libgdc.a.64 ${f} /usr/bin/ar -X64 -q libgdc.a ${f} done %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_includedir} cp *.h ${RPM_BUILD_ROOT}%{_includedir}/ chmod 0644 ${RPM_BUILD_ROOT}%{_includedir}/* mkdir -p ${RPM_BUILD_ROOT}%{_libdir} cp libgdc.a ${RPM_BUILD_ROOT}%{_libdir} chmod 0644 ${RPM_BUILD_ROOT}%{_libdir}/* ( 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 *.txt gdc_*samp*.c ft_samp.c %{_includedir}/* %{_libdir}/*.a /usr/include/* /usr/lib/*.a %changelog * Fri Jun 04 2010 Michael Perzl - 0.11.5dev-1 - first version for AIX V5.1 and higher