On Mon, Aug 31, 2009 at 09:04:08AM +0200, Matthias Ringwald wrote: > Hi Dave > > I've fixed it by marking pdftk for 10.4 and 10.5 only. It should not > show up in fink on 10.6. :( Maybe MacPorts still has it. > > pdftk is an unhealthy amalgan of the java iText PDF library and a > convenient command-line interface written in C++. If the command-line > would have been written in Java instead of creating a maintenance > nightmare of compiling iText as a native library, it would be still in > Fink. The current problem is that the original code does things which > are not possible in this setup. GCC up to 4.2 ignored this, but 4.3 and > higher (rightly) throw an compile error So, it can only compiled with gcc > 4.2. Apple provides a gcc-4.2 on 10.6, but it does not provide the Java > compiler. Compiling gcc-4.2 on Snow Leopard is rather tricky, so the Fink > Core developers decided to get rid of it. > > More on this here: http://trac.macports.org/ticket/13553 > > Jack Howarth mentioned a possible solution here: > http://www.mail-archive.com/fink-devel@lists.sourceforge.net/msg18449.html > Jack: How far did you get? :)
The problem I ran into was the required dependencies in the Fedora packaging. Their current specfile in rawhide builds as follows... %global itextvers 2.1.7 Summary: The PDF Tool Kit Name: pdftk Version: 1.41 Release: 22%{?dist} License: GPLv2+ URL: http://www.pdfhacks.com/pdftk/ # Remove java-lib/com because it's contains licensing issue Source0: http://www.pdfhacks.com/pdftk/%{name}-%{version}-noitext.tar.bz2Patch0: pdftk-use-internal-itext.patch Patch1: pdftk-1.41-make.patch Patch2: pdftk-1.41-gcc44.patch # Solves ".afm files not found" error. RHBZ#494785: Patch4: pdftk-classpath.patch Group: Applications/Publishing BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc-java BuildRequires: libgcj-devel BuildRequires: java-devel >= 1:1.6.0 BuildRequires: itext >= %{itextvers} Requires: itext >= 2.1.7-1 %description If PDF is electronic paper, then pdftk is an electronic staple-remover, hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a simple tool for doing everyday things with PDF documents. Keep one in the top drawer of your desktop and use it to: * Merge PDF Documents * Split PDF Pages into a New Document * Decrypt Input as Necessary (Password Required) * Encrypt Output as Desired * Burst a PDF Document into Single Pages * Report on PDF Metrics, including Metadata and Bookmarks * Uncompress and Re-Compress Page Streams * Repair Corrupted PDF (Where Possible) Pdftk is also an example of how to use a library of Java classes in a stand-alone C++ program. Specifically, it demonstrates how GCJ and CNI allow C++ code to use iText's (itext-paulo) Java classes. %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch4 -p0 -b .classpath rm -rf java_libs %build # Requires as a workaround for gcc BZ #39380 export CFLAGS="${RPM_OPT_FLAGS}" jar tf %{_javadir}/itext-%{itextvers}.jar | grep '\.class$' | sed 's/\.class//' | sed 's|/|\.|g' > classes gjavah -d java_libs -cni -classpath=%{_javadir}/itext-%{itextvers}.jar \ `cat classes` cd pdftk make -f Makefile.RedHat LIBDIR=%{_libdir} %{?_smp_mflags} ITEXTVERS="%{itextvers}" %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_bindir} mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1 install -m 0755 pdftk/pdftk $RPM_BUILD_ROOT/%{_bindir}/pdftk install -m 0644 debian/pdftk.1 $RPM_BUILD_ROOT/%{_mandir}/man1/pdftk.1 # Fix the weird dependency, e.g. # /usr/lib64/gcj/itext/itext-x.y.z.jar.so()(64bit) to # /usr/lib64/gcj/itext/itext-x.y.z.jar.so %define _use_internal_dependency_generator 0 cat << \EOF > %{name}.req #!%{_buildshell} grep -v %{_docdir} - | %{__find_requires} $* \ | sed 's...@\(itext-[0-9.]*\.jar\.so\)\(()(64bit)\)\...@\1@' EOF %define __find_requires %{_builddir}/%{name}-%{version}/%{name}.req chmod +x %{__find_requires} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc pdftk.1.html pdftk.1.txt %{_bindir}/* %{_mandir}/man1/* %changelog * Sat Jul 25 2009 Fedora Release Engineering <rel-...@lists.fedoraproject.org> - 1.41-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Jul 9 2009 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> 1.41-21 - Build against itext-2.1.7 * Fri Jun 26 2009 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> 1.41-20 - Build against itext-2.1.6 * Wed May 6 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-19 - Remove workaround for brocken gcj * Wed Apr 29 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-18 - Add bcprov and bcmail to classpath patch (BZ #497986) * Tue Apr 21 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-17 - Bump release number * Tue Apr 21 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-16 - Remove stdin patch, add Req. to modified iText release (BZ #495574) * Wed Apr 8 2009 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> 1.41-15 - Patch ".afm files not found" issue (#494785) * Tue Mar 31 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-14 - Patch stdin issue (#492968) * Tue Mar 10 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-13 - Move to iText-2.1.5 * Thu Mar 5 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-12 - Make sure, the -O0 will be used by the Makefile * Thu Mar 5 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-11 - substitute %%{_datadir}/java into %%{_javadir} in build stanza * Thu Mar 5 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-10 - Use -O0 as a workaround for a gcc bug * Sun Mar 1 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-9 - Remove license text - Fix Dependencies - fix Tab/Space * Thu Feb 19 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-8 - Add BR and Req. to itext-2.1.4-3 * Sun Feb 15 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-7 - Build pdftk agains system iText library * Sun Jan 25 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.41-6 - Fix license tag * Wed Apr 11 2007 Thomas Fitzsimmons <fitz...@redhat.com> 1.41-5 - Build against system libgcj. - Patch build for new gcjh. - Resolves: rhbz#233682 rhbz#233489 rhbz#233514 * Wed Feb 28 2007 Jochen Schmitt <Jochen herr-schmitt de> 1.41-4 - Rebuild to solve broken deps * Mon Feb 26 2007 Jochen Schmitt <s450...@zeus.herr-schmitt.de> 1.41-3 - Use $$RPM_OPT_FLAGS (#228945) * Wed Nov 29 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.41-2 - New upstream release * Sun Sep 3 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.12-8 - Rebuild for FC-6 * Mon Jul 31 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.12-7 - Rebuild * Sun Feb 12 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.12-6 - Rebuild for FC5 * Thu Dec 15 2005 Jochen Schmitt <Jochen herr-schmitt de> 1.12-5 - Rebuild - Remove strange '//SID' comment. * Sun Jul 31 2005 Jochen Schmitt <Jochen herr-schmitt de> 1.12-3 - Add literal GPL text as Source1 * Wed Jul 27 2005 Jochen Schmitt <Jochen herr-schmitt de> 1.12-2 - Don't compress man page - Remove pdftk.1.notes - Add COPYRIGHT from debian/copyright * Tue Jul 26 2005 Jochen Schmitt <Jochen herr-schmitt de> 1.12-1 - Initial RPM release I'll go ahead and open a placeholder entry for new pdftk packaging on fink tracking and upload the fedora specfile and patches there. The main problem if I recall correctly is that need to install the itext jar somewhere in the fink setup and we need to add the equivalent to the java-devel package to fink. I'll upload the specfile and patches for that as well to the same pdftk entry. Jack > > I guess I'll also spend an evening to see, if I can just comment out the > offending code. I'll keep you informed. > > Cheers, > Matthias > > > On 30.08.2009, at 22:51, David Kamholz wrote: > >> Hi, >> >> I've installed the 64-bit fink on Snow Leopard. I noticed that pdftk >> is now broken: >> >> Can't resolve dependency "gcc42-shlibs" for package "pdftk-1.41-1" (no >> matching packages/versions found) >> Exiting with failure. >> >> gcc42 is a virtual package provided by Apple's XCode pkg. However, >> there is no gcc42-shlibs virtual package (and I'm not sure if Apple's >> install is appropriate for pdftk anyway). There is a gcc44-shlibs, but >> that's not what pdftk depends on currently. I would appreciate if you >> could fix the package. Thanks! >> >> Dave ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel