[Pkg-cli-apps-commits] [SCM] pdfmod branch, master, updated. upstream/0.7-34-gf5ffd5d
Chow Loong Jin
hyperair at ubuntu.com
Thu Jun 17 21:27:24 UTC 2010
The following commit has been merged in the master branch:
commit 2f8f2a0ad17aa2da6acc148436f47a5ae2dbd713
Author: Chow Loong Jin <hyperair at ubuntu.com>
Date: Fri Jun 18 04:15:26 2010 +0800
Add patches and flags to use external poppler#
diff --git a/debian/control b/debian/control
index b2fa9bf..58c97b7 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,8 @@ Maintainer: Debian CLI Applications Team <pkg-cli-apps-team at lists.alioth.debian.
Uploaders: Chow Loong Jin <hyperair at ubuntu.com>
Build-Depends: debhelper (>= 7.0.50),
autotools-dev,
+ autoconf,
+ automake,
cli-common-dev (>= 0.5.7),
mono-devel (>= 2.4.2),
gnome-doc-utils (>= 0.3.2),
diff --git a/debian/patches/0001-Autodetect-external-poppler-sharp.patch b/debian/patches/0001-Autodetect-external-poppler-sharp.patch
new file mode 100644
index 0000000..61fd8df
--- /dev/null
+++ b/debian/patches/0001-Autodetect-external-poppler-sharp.patch
@@ -0,0 +1,77 @@
+From fb1a0d7bf4a2db47748671243458c6bef4ccaf6d Mon Sep 17 00:00:00 2001
+From: Chow Loong Jin <hyperair at ubuntu.com>
+Date: Wed, 16 Jun 2010 23:16:33 +0800
+Subject: [PATCH 1/3] Autodetect external poppler-sharp
+
+Now that poppler-sharp has had a tarball release, detect the system's
+poppler-sharp installation if present, and use it accordingly. Also
+provide an option --(enable|disable)-external-poppler-sharp which can
+override the automagic.
+
+Signed-off-by: Gabriel Burt <gabriel.burt at gmail.com>
+---
+ configure.ac | 24 +++++++++++++++++++++++-
+ lib/poppler-sharp/Makefile.am | 5 ++++-
+ 2 files changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 80927ea..cd522a6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -123,7 +123,29 @@ HYENA_GUI_FILES="`$PKG_CONFIG --variable=Files hyena.gui`"
+ AC_SUBST(HYENA_GUI_ASSEMBLIES)
+ AC_SUBST(HYENA_GUI_FILES)
+
+-BUNDLE_ASSEMBLIES="$HYENA_ASSEMBLIES $HYENA_GUI_ASSEMBLIES"
++dnl choose between bundled or system poppler-sharp
++AC_ARG_ENABLE([external-poppler-sharp],
++ AC_HELP_STRING([--enable-external-poppler-sharp],
++ [Enable using the external poppler-sharp. [[default=auto]]]),,
++ enable_external_poppler_sharp=auto)
++
++if test "$enable_external_poppler_sharp" = "auto"; then
++ PKG_CHECK_MODULES(POPPLER, poppler-sharp,
++ enable_external_poppler_sharp=yes,
++ enable_external_poppler_sharp=no)
++elif test "$enable_external_poppler_sharp" = "yes"; then
++ PKG_CHECK_MODULES(POPPLER, poppler-sharp)
++fi
++
++if test "$enable_external_poppler_sharp" = "yes"; then
++ POPPLER_ASSEMBLIES="`$PKG_CONFIG --variable=Libraries poppler-sharp`"
++ AC_SUBST(POPPLER_ASSEMBLIES)
++fi
++
++AM_CONDITIONAL(USE_BUNDLED_POPPLER,
++ test "$enable_external_poppler_sharp" = "no")
++
++BUNDLE_ASSEMBLIES="$HYENA_ASSEMBLIES $HYENA_GUI_ASSEMBLIES $POPPLER_ASSEMBLIES"
+ BUNDLE_FILES="$HYENA_FILES $HYENA_GUI_FILES"
+ AC_SUBST(BUNDLE_ASSEMBLIES)
+ AC_SUBST(BUNDLE_FILES)
+diff --git a/lib/poppler-sharp/Makefile.am b/lib/poppler-sharp/Makefile.am
+index 0399b48..3c84cd8 100644
+--- a/lib/poppler-sharp/Makefile.am
++++ b/lib/poppler-sharp/Makefile.am
+@@ -1,6 +1,7 @@
+
+ EXTRA_DIST =
+
++if USE_BUNDLED_POPPLER
+ if ENABLE_DEBUG
+ ASSEMBLY_COMPILER_COMMAND = $(MCS)
+ ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -unsafe -debug "-define:DEBUG"
+@@ -31,7 +32,9 @@ BINARIES =
+
+ RESGEN=resgen2
+
+-all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES)
++all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES)
++
++endif
+
+ FILES = \
+ poppler-sharp/Document.cs \
+--
+1.7.0.4
+
diff --git a/debian/patches/0002-Fix-PDFMod-s-compilation-to-choose-correct-Poppler.patch b/debian/patches/0002-Fix-PDFMod-s-compilation-to-choose-correct-Poppler.patch
new file mode 100644
index 0000000..bb98bae
--- /dev/null
+++ b/debian/patches/0002-Fix-PDFMod-s-compilation-to-choose-correct-Poppler.patch
@@ -0,0 +1,68 @@
+From da6b1cfe37c41741d00792e17ee21163e4fb0533 Mon Sep 17 00:00:00 2001
+From: Chow Loong Jin <hyperair at ubuntu.com>
+Date: Fri, 18 Jun 2010 03:23:18 +0800
+Subject: [PATCH 2/3] Fix PDFMod's compilation to choose correct Poppler#
+
+Signed-off-by: Gabriel Burt <gabriel.burt at gmail.com>
+---
+ src/Makefile.am | 28 +++++++---------------------
+ 1 files changed, 7 insertions(+), 21 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 52a31d6..892373f 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -3,36 +3,16 @@
+ #
+ EXTRA_DIST =
+
+-if ENABLE_DEBUG
+ ASSEMBLY_COMPILER_COMMAND = $(MCS)
+ ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -debug "-define:DEBUG"
+ ASSEMBLY = ../bin/PdfMod.exe
+ ASSEMBLY_MDB = $(ASSEMBLY).mdb
+ COMPILE_TARGET = exe
+-PROJECT_REFERENCES = \
+- ../bin/PdfSharp.dll \
+- ../bin/poppler-sharp.dll
++PROJECT_REFERENCES = ../bin/PdfSharp.dll
+ BUILD_DIR = ../bin
+
+ PDFMOD_EXE_MDB_SOURCE=../bin/PdfMod.exe.mdb
+
+-endif
+-
+-if ENABLE_RELEASE
+-ASSEMBLY_COMPILER_COMMAND = $(MCS)
+-ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -debug -define:DEBUG
+-ASSEMBLY = ../bin/PdfMod.exe
+-ASSEMBLY_MDB = $(ASSEMBLY).mdb
+-COMPILE_TARGET = exe
+-PROJECT_REFERENCES = \
+- ../bin/PdfSharp.dll \
+- ../bin/poppler-sharp.dll
+-BUILD_DIR = ../bin
+-
+-PDFMOD_EXE_MDB_SOURCE=../bin/PdfMod.exe.mdb
+-
+-endif
+-
+ AL=al2
+ SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
+
+@@ -90,6 +70,12 @@ REFERENCES = \
+ System \
+ System.Core
+
++if USE_BUNDLED_POPPLER
++PROJECT_REFERENCES += ../bin/poppler-sharp.dll
++else
++REFERENCES += -pkg:poppler-sharp
++endif
++
+ DLL_REFERENCES =
+
+ CLEANFILES = $(PROGRAMFILES) $(BINARIES)
+--
+1.7.0.4
+
diff --git a/debian/patches/0003-Make-POPPLER_SHARP_DLL_CONFIG-conditional.patch b/debian/patches/0003-Make-POPPLER_SHARP_DLL_CONFIG-conditional.patch
new file mode 100644
index 0000000..690bdec
--- /dev/null
+++ b/debian/patches/0003-Make-POPPLER_SHARP_DLL_CONFIG-conditional.patch
@@ -0,0 +1,41 @@
+From 8c111956f38867765ce083ca669707ace6d2c171 Mon Sep 17 00:00:00 2001
+From: Chow Loong Jin <hyperair at ubuntu.com>
+Date: Fri, 18 Jun 2010 04:25:58 +0800
+Subject: [PATCH 3/3] Make POPPLER_SHARP_DLL_CONFIG conditional
+
+Only add POPPLER_SHARP_DLL_CONFIG to PROGRAMFILES if USE_BUNDLED_POPPLER
+is true, as it should be copied from the external installation
+otherwise.
+
+Signed-off-by: Gabriel Burt <gabriel.burt at gmail.com>
+---
+ src/Makefile.am | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 892373f..797e2bb 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -16,9 +16,7 @@ PDFMOD_EXE_MDB_SOURCE=../bin/PdfMod.exe.mdb
+ AL=al2
+ SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
+
+-PROGRAMFILES = \
+- $(PDFMOD_EXE_MDB) \
+- $(POPPLER_SHARP_DLL_CONFIG)
++PROGRAMFILES = $(PDFMOD_EXE_MDB)
+
+ BINARIES = \
+ $(PDFMOD)
+@@ -72,6 +70,8 @@ REFERENCES = \
+
+ if USE_BUNDLED_POPPLER
+ PROJECT_REFERENCES += ../bin/poppler-sharp.dll
++PROGRAMFILES += $(POPPLER_SHARP_DLL_CONFIG)
++
+ else
+ REFERENCES += -pkg:poppler-sharp
+ endif
+--
+1.7.0.4
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..97aec31
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+0001-Autodetect-external-poppler-sharp.patch
+0002-Fix-PDFMod-s-compilation-to-choose-correct-Poppler.patch
+0003-Make-POPPLER_SHARP_DLL_CONFIG-conditional.patch
diff --git a/debian/rules b/debian/rules
index acca747..8b5c32a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,11 @@ USCAN = uscan \
--upstream-version=$(VERSION)
override_dh_auto_configure:
+ gnome-doc-prepare
+ intltoolize
+ autoreconf -vfi
dh_auto_configure -- \
+ --enable-external-poppler-sharp \
MCS=/usr/bin/mono-csc
# disable tests; they need network access to download DTDs
--
pdfmod
More information about the Pkg-cli-apps-commits
mailing list