freebsd-ports/print/pdftk/files/patch-pdftk__Makefile.FreeBSD
Greg Larkin 7c642d9fdc - Updated to 1.44 (http://www.pdflabs.com/docs/pdftk-version-history/)
- Removed a bunch of patches after upstream build system changes
- Added FreeBSD-specific Makefile (pushing to upstream)

Requested by:	Sid Steward <sid dot steward at pdflabs dot com> (author)
Reviewed by:	Alessandro de Manzano <demanzano at dqmicro dot it>
2010-11-12 22:52:53 +00:00

83 lines
3.2 KiB
Makefile

--- ./pdftk/Makefile.FreeBSD.orig 2010-11-11 09:38:40.000000000 -0500
+++ ./pdftk/Makefile.FreeBSD 2010-11-11 09:39:33.000000000 -0500
@@ -0,0 +1,80 @@
+# -*- Mode: Makefile -*-
+# Makefile.FreeBSD
+# Copyright 2004, 2010 Sid Steward
+# This is part of pdftk.
+#
+# Visit: www.pdftk.com for pdftk information and articles
+# Permalink: http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
+#
+# Please email Sid Steward with questions or bug reports.
+# Include "pdftk" in the subject line to ensure successful delivery:
+# sid.steward at pdflabs dot com
+
+# Brief Instructions
+#
+# Compile: make -f Makefile.FreeBSD
+# Install (as root): make -f Makefile.FreeBSD install
+# Uninstall: make -f Makefile.FreeBSD uninstall
+# Clean: make -f Makefile.FreeBSD clean
+#
+
+# this tries to compensate for objects missing from older versions of libgcj
+# it replaces them with local implementations
+#
+# set to 1 for gcc 3.4 and other, older versions of gcc (e.g., mingw 3.4.5)
+# comment out for gcc 4.4 and other, newer versions of gcc
+#
+#export USE_LOCAL_LIBGCJ= 1
+
+# tools
+# need direct path to libgcj for gcjh (starting in gcj 4.1.2 per Aurélien GÉRÔME)
+TOOLPATH=
+export VERSUFF=
+export CXX= $(TOOLPATH)g++$(VERSUFF)
+export GCJ= $(TOOLPATH)gcj$(VERSUFF)
+export GCJH= $(TOOLPATH)gcjh$(VERSUFF)
+export GJAR= $(TOOLPATH)gjar$(VERSUFF)
+#export LIBGCJ= /usr/share/java/libgcj$(VERSUFF).jar
+export AR= ar
+export RM= rm
+export ARFLAGS= rs
+export RMFLAGS= -vf
+
+# pdftk compiler flags; 0x2f is a forward slash; 0x5c is a backslash
+# if you want pdftk to ask before overwriting a file, set
+# ASK_ABOUT_WARNINGS to true; otherwise: false; override this default
+# with the dont_ask or do_ask command-line options
+#
+# drop CXXFLAG -O3 due to template inlining causing:
+# "error: mixing C++ and Java catches in a single translation unit" per Andrew Haley;
+# fix added for gcc-4.3; this problem might be fixed in 4.4
+#
+# GCJFLAG -O3 causes pdftk to segfault (during a cat operation) when compiled on sarge using gcc 3.4.4
+# per Johann Felix Soden:
+# In gcc 4.3 "-O3" gives an error. This is fixed in PR C++/39380 which is at least in debian's gcc 4.4.1-4
+#
+# GCJFLAG -fsource=1.3 identifies the version of the java source
+#
+# when building/using a shared itext library:
+# CXXFLAGS: -fpic (or-fPIC)
+# GCJFLAGS: -Wl,-Bsymbolic -fpic (or -fPIC) -Wl,-rpath,/usr/lib/gcj
+# stock pdftk links statically against its own, modified itext library
+#
+# -findirect-dispatch
+# introduced in gcj 4:
+# "Using that option causes GCJ to generate native code for classes and methods that follow the precise same binary compatibility rules as described in the Java Language Specification."
+# http://lwn.net/Articles/130796/
+# omitted because it caused linking errors using gcc 4.4; it also seems to make a larger binary
+#
+# -Wl,--as-needed
+# see: http://www.gentoo.org/proj/en/qa/asneeded.xml
+# only effects libraries following option on the command line
+#
+#
+export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
+export CXXFLAGS= -Wall -Wextra -Weffc++ -O2
+export GCJFLAGS= -Wall -Wextra -fsource=1.3 -O2
+export GCJHFLAGS= -force
+export LDLIBS= -lgcj
+
+include Makefile.Base