%define _libdir64 %{_prefix}/lib64 Summary: PDF rendering library Name: poppler Version: 0.14.5 Release: 1 License: GPLv2 Group: Development/Libraries URL: http://poppler.freedesktop.org/ Source0: http://poppler.freedesktop.org/%{name}-%{version}.tar.gz ## upstreamable patches # http://bugzilla.redhat.com/show_bug.cgi?id=480868 Patch0: %{name}-0.12.4-annot-appearance.patch Patch1: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make, patch, sed BuildRequires: cairo-devel >= 1.8.10-1 BuildRequires: curl-devel >= 7.19.7-1 BuildRequires: freetype2-devel >= 2.3.12-1 BuildRequires: gettext BuildRequires: gtk2-devel >= 2.18.5-2 BuildRequires: lcms-devel >= 1.19-1 BuildRequires: libjpeg-devel >= 6b-7 BuildRequires: libxml2-devel >= 2.6.32-3 BuildRequires: libpng-devel >= 1.2.46-1 BuildRequires: openjpeg-devel >= 1.4-1 BuildRequires: zlib-devel >= 1.2.3-3 Requires: cairo >= 1.8.10-1 Requires: curl >= 7.19.7-1 Requires: freetype2 >= 2.3.12-1 Requires: gettext Requires: gtk2 >= 2.18.5-2 Requires: lcms >= 1.19-1 Requires: libjpeg >= 6b-7 Requires: libpng >= 1.2.46-1 Requires: libxml2 >= 2.6.32-3 Requires: openjpeg >= 1.4-1 Requires: poppler-data >= 0.4.4 Requires: zlib >= 1.2.3-3 %description Poppler, a PDF rendering library, is a fork of the xpdf PDF viewer developed by Derek Noonburg of Glyph and Cog, LLC. %package devel Summary: Libraries and headers for poppler Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config %description devel You should install the poppler-devel package if you would like to compile applications based on poppler. %package glib Summary: Glib wrapper for poppler Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description glib %{summary}. %package glib-devel Summary: Development files for glib wrapper Group: Development/Libraries Requires: %{name}-glib = %{version}-%{release} Requires: %{name}-devel = %{version}-%{release} %description glib-devel %{summary}. %package cpp Summary: Pure C++ wrapper for poppler Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: libiconv >= 1.14-2 %description cpp %{summary}. %package cpp-devel Summary: Development files for C++ wrapper Group: Development/Libraries Requires: %{name}-cpp = %{version}-%{release} Requires: %{name}-devel = %{version}-%{release} %description cpp-devel %{summary}. %package utils Summary: Command line utilities for converting PDF files Group: Applications/Text Requires: %{name} = %{version}-%{release} %description utils Poppler, a PDF rendering library, is a fork of the xpdf PDF viewer developed by Derek Noonburg of Glyph and Cog, LLC. This utils package installs a number of command line tools for converting PDF files to a number of other formats. %prep %setup -q export PATH=/opt/freeware/bin:$PATH %patch0 -p1 -b .annot %patch1 chmod -x goo/GooTimer.h mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build # we need to find our Perl first export PATH=/opt/freeware/bin:$PATH export CC="xlc_r -D_LARGE_FILES=1 -D_LINUX_SOURCE_COMPAT" export CXX="xlC_r -D_LARGE_FILES=1 -D_LINUX_SOURCE_COMPAT" export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" export CXXFLAGS="${CFLAGS}" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-xpdf-headers \ --enable-libopenjpeg \ --enable-largefile \ --enable-zlib \ --enable-libcurl \ --enable-libjpeg \ --enable-cairo-output \ --disable-poppler-qt \ --disable-poppler-qt4 \ --enable-cms \ --with-x # otherwise our config.h and the config.h from libjpeg will collide /opt/freeware/bin/sed -i 's|#define HAVE_STDLIB_H 1|#define HAVE_STDLIB_H|g' config.h make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-xpdf-headers \ --enable-libopenjpeg \ --enable-largefile \ --enable-zlib \ --enable-libcurl \ --enable-libjpeg \ --enable-cairo-output \ --disable-poppler-qt \ --disable-poppler-qt4 \ --enable-cms \ --with-x # otherwise our config.h and the config.h from libjpeg will collide /opt/freeware/bin/sed -i 's|#define HAVE_STDLIB_H 1|#define HAVE_STDLIB_H|g' config.h make %{?_smp_mflags} %install export PATH=/opt/freeware/bin:$PATH [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects for i in "" -cpp -glib ; do /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}${i}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}${i}.so* done ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 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 32bit/COPYING 32bit/README %{_libdir}/libpoppler.a %{_libdir}/libpoppler.so* %{_libdir64}/libpoppler.so* /usr/lib/libpoppler.a /usr/lib/libpoppler.so* /usr/lib64/libpoppler.so* %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/libpoppler.la %{_libdir64}/libpoppler.la %{_libdir}/pkgconfig/poppler.pc %{_libdir64}/pkgconfig/poppler.pc %{_libdir}/pkgconfig/poppler-splash.pc %{_libdir64}/pkgconfig/poppler-splash.pc %{_datadir}/gtk-doc/html/poppler /usr/include/* /usr/lib/libpoppler.la /usr/lib64/libpoppler.la %files glib %defattr(-,root,system,-) %{_libdir}/libpoppler-glib.a %{_libdir}/libpoppler-glib.so* %{_libdir64}/libpoppler-glib.so* /usr/lib/libpoppler-glib.a /usr/lib/libpoppler-glib.so* /usr/lib64/libpoppler-glib.so* %files glib-devel %defattr(-,root,system,-) %{_libdir}/libpoppler-glib.la %{_libdir64}/libpoppler-glib.la %{_libdir}/pkgconfig/poppler-glib.pc %{_libdir64}/pkgconfig/poppler-glib.pc %{_libdir}/pkgconfig/poppler-cairo.pc %{_libdir64}/pkgconfig/poppler-cairo.pc /usr/lib/libpoppler-glib.la /usr/lib64/libpoppler-glib.la %files cpp %defattr(-,root,system,-) %{_libdir}/libpoppler-cpp.a %{_libdir}/libpoppler-cpp.so* %{_libdir64}/libpoppler-cpp.so* /usr/lib/libpoppler-cpp.a /usr/lib/libpoppler-cpp.so* /usr/lib64/libpoppler-cpp.so* %files cpp-devel %defattr(-,root,system,-) %{_libdir}/libpoppler-cpp.la %{_libdir64}/libpoppler-cpp.la %{_libdir}/pkgconfig/poppler-cpp.pc %{_libdir64}/pkgconfig/poppler-cpp.pc /usr/lib/libpoppler-cpp.la /usr/lib64/libpoppler-cpp.la %files utils %defattr(-,root,system,-) %{_bindir}/* %{_mandir}/man1/* /usr/bin/* %changelog * Thu Oct 18 2012 Michael Perzl - 0.14.5-1 - first version for AIX V5.1 and higher