summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2012-08-10 06:12:37 +0000
committerJustin Lecher <jlec@gentoo.org>2012-08-10 06:12:37 +0000
commitf8824fde049efcea56ea02f037e46b2a28a39684 (patch)
tree91f85653859d02645c06ca7368e8fb1b29a772e7 /sci-libs/gdal
parentAdd untested ppc keyword to fix rails dependency tree. (diff)
downloadgentoo-2-f8824fde049efcea56ea02f037e46b2a28a39684.tar.gz
gentoo-2-f8824fde049efcea56ea02f037e46b2a28a39684.tar.bz2
gentoo-2-f8824fde049efcea56ea02f037e46b2a28a39684.zip
sci-libs/gdal: Add fix for poppler-0.20.1, #426584; thanks Andreas Sturmlechner for the backport; use eautoreconf because it seems to work
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/gdal')
-rw-r--r--sci-libs/gdal/ChangeLog7
-rw-r--r--sci-libs/gdal/files/gdal-1.9.1-poppler-0.20.1.patch143
-rw-r--r--sci-libs/gdal/gdal-1.9.1.ebuild14
3 files changed, 158 insertions, 6 deletions
diff --git a/sci-libs/gdal/ChangeLog b/sci-libs/gdal/ChangeLog
index c47bae12caa6..36a7bfd7963e 100644
--- a/sci-libs/gdal/ChangeLog
+++ b/sci-libs/gdal/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-libs/gdal
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v 1.129 2012/06/05 21:08:15 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v 1.130 2012/08/10 06:12:37 jlec Exp $
+
+ 10 Aug 2012; Justin Lecher <jlec@gentoo.org> gdal-1.9.1.ebuild,
+ +files/gdal-1.9.1-poppler-0.20.1.patch:
+ Add fix for poppler-0.20.1, #426584; thanks Andreas Sturmlechner for the
+ backport; use eautoreconf because it seems to work
05 Jun 2012; Brent Baude <ranger@gentoo.org> gdal-1.8.1-r1.ebuild:
Marking gdal-1.8.1-r1 ppc64 for bug 413835
diff --git a/sci-libs/gdal/files/gdal-1.9.1-poppler-0.20.1.patch b/sci-libs/gdal/files/gdal-1.9.1-poppler-0.20.1.patch
new file mode 100644
index 000000000000..3e7f0355a6d8
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.9.1-poppler-0.20.1.patch
@@ -0,0 +1,143 @@
+Index: /branches/1.9/gdal/nmake.opt
+===================================================================
+--- /branches/1.9/gdal/nmake.opt (revision 23610)
++++ /branches/1.9/gdal/nmake.opt (revision 24437)
+@@ -469,8 +469,10 @@
+ # Uncomment for PDF support
+ # Uncomment POPPLER_BASE_STREAM_HAS_TWO_ARGS = YES for Poppler >= 0.16.0
++# Uncomment POPPLER_0_20_OR_LATER = YES for Poppler >= 0.20.0
+ #POPPLER_ENABLED = YES
+ #POPPLER_CFLAGS = -Ie:/kde/include -Ie:/kde/include/poppler
+ #POPPLER_HAS_OPTCONTENT = YES
+ #POPPLER_BASE_STREAM_HAS_TWO_ARGS = YES
++#POPPLER_0_20_OR_LATER = YES
+ #POPPLER_LIBS = e:/kde/lib/poppler.lib e:/kde/lib/freetype.lib e:/kde/lib/liblcms-1.lib advapi32.lib gdi32.lib
+
+Index: /branches/1.9/gdal/configure.in
+===================================================================
+--- /branches/1.9/gdal/configure.in (revision 24333)
++++ /branches/1.9/gdal/configure.in (revision 24437)
+@@ -2941,4 +2941,5 @@
+ POPPLER_HAS_OPTCONTENT=no
+ POPPLER_BASE_STREAM_HAS_TWO_ARGS=no
++POPPLER_0_20_OR_LATER=no
+
+ AC_MSG_CHECKING([for poppler])
+@@ -3000,4 +3001,17 @@
+ POPPLER_BASE_STREAM_HAS_TWO_ARGS=yes
+ AC_MSG_RESULT([yes])
++
++ # And now we check if we have Poppler >= 0.20.0
++ AC_MSG_CHECKING([if we have Poppler >= 0.20.0])
++ rm -f testpoppler.*
++ echo '#include <poppler/Error.h>' > testpoppler.cpp
++ echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp
++ if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
++ POPPLER_0_20_OR_LATER=yes
++ AC_MSG_RESULT([yes])
++ else
++ AC_MSG_RESULT([no])
++ fi
++
+ else
+ AC_MSG_RESULT([no])
+@@ -3015,4 +3029,5 @@
+ AC_SUBST(POPPLER_HAS_OPTCONTENT, $POPPLER_HAS_OPTCONTENT)
+ AC_SUBST(POPPLER_BASE_STREAM_HAS_TWO_ARGS, $POPPLER_BASE_STREAM_HAS_TWO_ARGS)
++AC_SUBST(POPPLER_0_20_OR_LATER, $POPPLER_0_20_OR_LATER)
+ AC_SUBST(POPPLER_INC, $POPPLER_INC)
+
+Index: /branches/1.9/gdal/frmts/pdf/pdfdataset.cpp
+===================================================================
+--- /branches/1.9/gdal/frmts/pdf/pdfdataset.cpp (revision 23986)
++++ /branches/1.9/gdal/frmts/pdf/pdfdataset.cpp (revision 24437)
+@@ -327,5 +327,9 @@
+ poSplashOut = new SplashOutputDev(splashModeRGB8, 4, gFalse, sColor);
+ PDFDoc* poDoc = poGDS->poDoc;
++#ifdef POPPLER_0_20_OR_LATER
++ poSplashOut->startDoc(poDoc);
++#else
+ poSplashOut->startDoc(poDoc->getXRef());
++#endif
+ double dfDPI = poGDS->dfDPI;
+
+@@ -518,4 +522,19 @@
+
+ #ifdef USE_POPPLER
++#ifdef POPPLER_0_20_OR_LATER
++static void PDFDatasetErrorFunction(void* userData, ErrorCategory eErrCatagory, int nPos, char *pszMsg)
++{
++ CPLString osError;
++
++ if (nPos >= 0)
++ osError.Printf("Pos = %d, ", nPos);
++ osError += pszMsg;
++
++ if (strcmp(osError.c_str(), "Incorrect password") == 0)
++ return;
++
++ CPLError(CE_Failure, CPLE_AppDefined, "%s", osError.c_str());
++}
++#else
+ static void PDFDatasetErrorFunction(int nPos, char *pszMsg, va_list args)
+ {
+@@ -531,4 +550,5 @@
+ CPLError(CE_Failure, CPLE_AppDefined, "%s", osError.c_str());
+ }
++#endif
+ #endif
+
+@@ -567,5 +587,9 @@
+
+ /* Set custom error handler for poppler errors */
++#ifdef POPPLER_0_20_OR_LATER
++ setErrorCallback(PDFDatasetErrorFunction, NULL);
++#else
+ setErrorFunction(PDFDatasetErrorFunction);
++#endif
+
+ /* poppler global variable */
+Index: /branches/1.9/gdal/frmts/pdf/makefile.vc
+===================================================================
+--- /branches/1.9/gdal/frmts/pdf/makefile.vc (revision 22493)
++++ /branches/1.9/gdal/frmts/pdf/makefile.vc (revision 24437)
+@@ -7,5 +7,5 @@
+
+ !IFDEF POPPLER_ENABLED
+-EXTRAFLAGS = $(POPPLER_CFLAGS) $(POPPLER_HAS_OPTCONTENT_FLAGS) $(POPPLER_BASE_STREAM_HAS_TWO_ARGS_FLAGS) -DUSE_POPPLER
++EXTRAFLAGS = $(POPPLER_CFLAGS) $(POPPLER_HAS_OPTCONTENT_FLAGS) $(POPPLER_BASE_STREAM_HAS_TWO_ARGS_FLAGS) $(POPPLER_0_20_OR_LATER_FLAGS) -DUSE_POPPLER
+
+ !IFDEF POPPLER_HAS_OPTCONTENT
+@@ -15,4 +15,8 @@
+ !IFDEF POPPLER_BASE_STREAM_HAS_TWO_ARGS
+ POPPLER_BASE_STREAM_HAS_TWO_ARGS_FLAGS = -DPOPPLER_BASE_STREAM_HAS_TWO_ARGS
++!ENDIF
++
++!IFDEF POPPLER_0_20_OR_LATER
++POPPLER_0_20_OR_LATER_FLAGS = -DPOPPLER_0_20_OR_LATER
+ !ENDIF
+
+Index: /branches/1.9/gdal/frmts/pdf/GNUmakefile
+===================================================================
+--- /branches/1.9/gdal/frmts/pdf/GNUmakefile (revision 22491)
++++ /branches/1.9/gdal/frmts/pdf/GNUmakefile (revision 24437)
+@@ -16,4 +16,9 @@
+ endif
+
++ifeq ($(POPPLER_0_20_OR_LATER),yes)
++CPPFLAGS += -DPOPPLER_0_20_OR_LATER
++endif
++
++
+ CPPFLAGS := $(GDAL_INCLUDE) $(CPPFLAGS) $(POPPLER_INC) $(PODOFO_INC)
+
+Index: /branches/1.9/gdal/GDALmake.opt.in
+===================================================================
+--- /branches/1.9/gdal/GDALmake.opt.in (revision 24419)
++++ /branches/1.9/gdal/GDALmake.opt.in (revision 24437)
+@@ -386,4 +386,5 @@
+ POPPLER_HAS_OPTCONTENT = @POPPLER_HAS_OPTCONTENT@
+ POPPLER_BASE_STREAM_HAS_TWO_ARGS = @POPPLER_BASE_STREAM_HAS_TWO_ARGS@
++POPPLER_0_20_OR_LATER = @POPPLER_0_20_OR_LATER@
+ POPPLER_INC = @POPPLER_INC@
+
diff --git a/sci-libs/gdal/gdal-1.9.1.ebuild b/sci-libs/gdal/gdal-1.9.1.ebuild
index 2e0daf6d6ce4..91d0a14102e9 100644
--- a/sci-libs/gdal/gdal-1.9.1.ebuild
+++ b/sci-libs/gdal/gdal-1.9.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/gdal-1.9.1.ebuild,v 1.4 2012/05/27 07:49:48 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/gdal-1.9.1.ebuild,v 1.5 2012/08/10 06:12:37 jlec Exp $
EAPI=4
@@ -120,11 +120,15 @@ src_prepare() {
-e 's:FREEXL_LIBS=missing):FREEXL_LIBS=missing,-lm):g' \
configure.in || die
+ epatch "${FILESDIR}"/${P}-poppler-0.20.1.patch
+
# autoheader fail
- eaclocal
- eautoconf
- eautomake
- elibtoolize
+# eaclocal
+# eautoconf
+# eautomake
+# elibtoolize
+ # Seems to work here.
+ eautoreconf
}
src_configure() {