summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2017-03-04 12:54:38 -0300
committerDaniel Bermond2017-03-04 12:54:38 -0300
commitf6bfd1869b7944c15147d3526317f94693ec3d86 (patch)
tree28b44fd43857d5be5f6eb4646bed3298bed8dda0
parent905895998542bd763a4287852bb524a8c09ff2f0 (diff)
downloadaur-f6bfd1869b7944c15147d3526317f94693ec3d86.tar.gz
Added patches with various fixes. Removed autotrace fix.
Some fixes are needed. See references bellow. Also, removed the autotrace fix (that makes autotrace detect new versions of pstoedit like 3.70) because it's now fixed directly in package autotrace-nomagick as of its version 0.31.1-3. This is more logic due to the fact that this bug resides in autotrace and not in pstoedit. References ========== Send errors to stdout --------------------- http://bugs.debian.org/551125 Fix for pkg-config (obsolete LIBPNG_LDFLAGS) -------------------------------------------- https://bugs.gentoo.org/show_bug.cgi?id=551208 https://bugzilla.redhat.com/show_bug.cgi?id=1415258 Fix plugin loading ------------------ http://bugs.debian.org/813316
-rw-r--r--.SRCINFO12
-rw-r--r--02-errors-to-stderr.patch122
-rw-r--r--04-fix-obsolete-LIBPNG_LDFLAGS.patch23
-rw-r--r--05-fix-plugin-loading.patch34
-rwxr-xr-xPKGBUILD18
5 files changed, 198 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ad92c3b2234f..9ae62e21426a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sun Feb 19 13:35:39 UTC 2017
+# Sat Mar 4 15:32:58 UTC 2017
pkgbase = pstoedit-nomagick
pkgdesc = Translates PS/PDF graphics to other vector formats (no ImageMagick dependency)
pkgver = 3.70
- pkgrel = 2
+ pkgrel = 3
url = http://www.pstoedit.net/
arch = i686
arch = x86_64
@@ -17,9 +17,13 @@ pkgbase = pstoedit-nomagick
provides = libpstoedit.so
conflicts = pstoedit
source = https://sourceforge.net/projects/pstoedit/files/pstoedit/3.70/pstoedit-3.70.tar.gz
- source = http://www.openmamba.org/pub/openmamba/milestone2/patches/autotrace-0.31.1-pstoedit.patch
+ source = 02-errors-to-stderr.patch
+ source = 04-fix-obsolete-LIBPNG_LDFLAGS.patch
+ source = 05-fix-plugin-loading.patch
sha256sums = 06b86113f7847cbcfd4e0623921a8763143bbcaef9f9098e6def650d1ff8138c
- sha256sums = 74989406876269222a5287a3f737a4627a084a0758398c92c220f118d56ef474
+ sha256sums = 66cd2bd3f92aa4ba57c916f721acd8c42c07fffea5fbc81f075853dab845d6d8
+ sha256sums = 3320bbcf6ba33d70213897f41c31c158d4bb4284e17b061ed8d1c38c1ee5a8b8
+ sha256sums = edec8010f6f05126047ce8f9facf1c36a2c0480a0bac14469b8ffb31a7722625
pkgname = pstoedit-nomagick
diff --git a/02-errors-to-stderr.patch b/02-errors-to-stderr.patch
new file mode 100644
index 000000000000..5de42009fef0
--- /dev/null
+++ b/02-errors-to-stderr.patch
@@ -0,0 +1,122 @@
+From: Roland Stigge <stigge@antcom.de>
+Date: Sun, 10 Jul 2011 12:19:43 +0200
+Subject: errors to stderr
+
+This patch redirects error messages to stderr.
+I.e., send error messages to standard error even when diagnostic
+messages, on stream diag, are being sent to standard output.
+
+Bug-Debian: http://bugs.debian.org/551125
+---
+ src/pstoedit.cpp | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/pstoedit.cpp b/src/pstoedit.cpp
+index 7f66d23..33a297a 100644
+--- a/src/pstoedit.cpp
++++ b/src/pstoedit.cpp
+@@ -414,7 +414,7 @@ extern "C" DLLEXPORT
+ break;
+ }
+ default:{
+- diag << "more than two file arguments " << endl;
++ errstream << "more than two file arguments " << endl;
+ shortusage(diag);
+ return 1;
+ }
+@@ -500,7 +500,7 @@ extern "C" DLLEXPORT
+ usage(diag,false,false);
+ const char *gstocall = whichPI(diag, options.verbose, options.gsregbase.value.c_str(),options.GSToUse.value.c_str());
+ if (gstocall != 0) {
+- diag << "Default interpreter is " << gstocall << endl;
++ errstream << "Default interpreter is " << gstocall << endl;
+ }
+ getglobalRp()->explainformats(diag);
+ return 1;
+@@ -577,13 +577,13 @@ To get the pre 8.00 behaviour, either use -dNOEPS or run the file with (filename
+ if (options.drivername.value.length() == 0) {
+ // try to find driver according to suffix of input file
+ if (!options.nameOfOutputFile) {
+- diag << "No output format specified (-f option) and format could not be deduced from suffix of output file since no output file name was given" << endl;
++ errstream << "No output format specified (-f option) and format could not be deduced from suffix of output file since no output file name was given" << endl;
+ shortusage(diag);
+ return 1;
+ } else {
+ const char * suffixOfInputFile = strrchr(options.nameOfOutputFile,'.');
+ if (!suffixOfInputFile) {
+- diag << "No output format specified (-f option) and format could not be deduced from suffix of output file since no suffix was found" << endl;
++ errstream << "No output format specified (-f option) and format could not be deduced from suffix of output file since no suffix was found" << endl;
+ shortusage(diag);
+ return 1;
+ } else {
+@@ -592,7 +592,7 @@ To get the pre 8.00 behaviour, either use -dNOEPS or run the file with (filename
+ errstream << "No explicit output format specified - using " << suffixDriverDesc->symbolicname << " as derived from suffix of output file" << endl;
+ options.drivername = suffixDriverDesc->symbolicname;
+ } else {
+- diag << "No output format specified (-f option) and format could not be uniquely deduced from suffix " << suffixOfInputFile << " of output file" << endl;
++ errstream << "No output format specified (-f option) and format could not be uniquely deduced from suffix " << suffixOfInputFile << " of output file" << endl;
+ // usage(errstream);
+ getglobalRp()->explainformats(diag); // ,true);
+ return 1;
+@@ -611,13 +611,13 @@ To get the pre 8.00 behaviour, either use -dNOEPS or run the file with (filename
+ }
+ const DriverDescription *currentDriverDesc = getglobalRp()->getDriverDescForName(options.drivername.value.c_str());
+ if (currentDriverDesc == 0) {
+- diag << "Unsupported output format " << options.drivername.value.c_str() << endl;
++ errstream << "Unsupported output format " << options.drivername.value.c_str() << endl;
+ getglobalRp()->explainformats(diag);
+ return 1;
+ }
+
+ if ( currentDriverDesc->backendFileOpenType!=DriverDescription::normalopen && !options.nameOfOutputFile ) {
+- diag << "The driver for the selected format cannot write to standard output because it writes binary data" << endl;
++ errstream << "The driver for the selected format cannot write to standard output because it writes binary data" << endl;
+ return 1;
+ }
+
+@@ -625,7 +625,7 @@ To get the pre 8.00 behaviour, either use -dNOEPS or run the file with (filename
+ if (driveroptions && strequal(driveroptions, "-help") ) {
+ ProgramOptions* dummy = currentDriverDesc->createDriverOptions();
+ if (dummy->numberOfOptions() ) {
+- diag << "The driver for this output format supports the following additional options: (specify using -f \"format:-option1 -option2\")" << endl;
++ errstream << "The driver for this output format supports the following additional options: (specify using -f \"format:-option1 -option2\")" << endl;
+ dummy->showhelp(diag,false,false);
+ }
+ delete dummy;
+@@ -635,7 +635,7 @@ To get the pre 8.00 behaviour, either use -dNOEPS or run the file with (filename
+ // TODO:
+ // Check for input file (exists, or stdin) stdout handling
+ if (!options.nameOfInputFile) {
+- diag << "Cannot read from standard input if GS drivers are selected" << endl;
++ errstream << "Cannot read from standard input if GS drivers are selected" << endl;
+ return 1;
+ }
+ // an input file was given as argument
+@@ -646,23 +646,23 @@ To get the pre 8.00 behaviour, either use -dNOEPS or run the file with (filename
+ convertBackSlashes(options.nameOfInputFile);
+
+ if (!fileExists(options.nameOfInputFile)) {
+- diag << "Could not open file " << options.nameOfInputFile << " for input" << endl;
++ errstream << "Could not open file " << options.nameOfInputFile << " for input" << endl;
+ return 1;
+ }
+
+ if (!options.nameOfOutputFile) {
+- diag <<
++ errstream <<
+ "Cannot write to standard output if GS drivers are selected" << endl;
+ return 1;
+ }
+
+ if (options.backendonly) {
+- diag << "The -bo option cannot be used if GS drivers are selected " << endl;
++ errstream << "The -bo option cannot be used if GS drivers are selected " << endl;
+ return 1;
+ }
+
+ if (!driveroptions) {
+- diag <<
++ errstream <<
+ "The gs output driver needs a gs-device as argument, e.g. gs:pdfwrite" << endl;
+ return 1;
+ }
diff --git a/04-fix-obsolete-LIBPNG_LDFLAGS.patch b/04-fix-obsolete-LIBPNG_LDFLAGS.patch
new file mode 100644
index 000000000000..fe6679c7034e
--- /dev/null
+++ b/04-fix-obsolete-LIBPNG_LDFLAGS.patch
@@ -0,0 +1,23 @@
+From: Roland Stigge <stigge@antcom.de>
+Date: Fri, 22 Jan 2016 12:12:56 +0100
+Subject: fix obsolete LIBPNG_LDFLAGS
+
+Remove @LIBPNG_LDFLAGS@ from pc file
+
+This substitution is obsoleted from configure.ac but still present in the pc
+file. This patch fixes this by removing there also
+---
+ config/pstoedit.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config/pstoedit.pc.in b/config/pstoedit.pc.in
+index 3131ac5..ffda220 100644
+--- a/config/pstoedit.pc.in
++++ b/config/pstoedit.pc.in
+@@ -7,5 +7,5 @@ Name: pstoedit
+ Description: converts PostScript(TM) and PDF files to other vector graphic formats
+ Version: @VERSION@.0
+ Requires:
+-Libs: -L@libdir@ -lpstoedit @LIBPNG_LDFLAGS@ @CXX_STD_LIB@ @CXX_RUNTIME_LIB@ @LIBLD_LDFLAGS@
++Libs: -L@libdir@ -lpstoedit @CXX_STD_LIB@ @CXX_RUNTIME_LIB@ @LIBLD_LDFLAGS@
+ Cflags: -I@includedir@
diff --git a/05-fix-plugin-loading.patch b/05-fix-plugin-loading.patch
new file mode 100644
index 000000000000..259d7d67b695
--- /dev/null
+++ b/05-fix-plugin-loading.patch
@@ -0,0 +1,34 @@
+From: James Cowgill <jcowgill@debian.org>
+Date: Mon, 9 May 2016 22:31:45 +0100
+Subject: fix plugin loading
+
+Disable broken if-check in plugin load code so that plugins can be successfully loaded from PSTOEDITLIBDIR.
+
+The plugin load code was checking pluginsloaded before trying to load plugins from PSTOEDITLIBDIR
+Unfortunately code further up in the method sets pluginsloaded even if no plugins were found in
+previous places. This patch restores the old 3.62 behaviour of not checking pluginsloaded before
+searching for plugins in PSTOEDITLIBDIR.
+
+Bug-Debian: http://bugs.debian.org/813316
+---
+ src/pstoedit.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/pstoedit.cpp b/src/pstoedit.cpp
+index 33a297a..833abf2 100644
+--- a/src/pstoedit.cpp
++++ b/src/pstoedit.cpp
+@@ -282,11 +282,11 @@ static void loadpstoeditplugins(const char *progname, ostream & errstream, bool
+ }
+
+ #ifdef PSTOEDITLIBDIR
+- if (!pluginsloaded) {
++ //if (!pluginsloaded) {
+ // also try to load drivers from the PSTOEDITLIBDIR
+ loadPlugInDrivers(PSTOEDITLIBDIR, errstream,verbose);
+ pluginsloaded = true;
+- }
++ //}
+ #endif
+
+ // delete[]plugindir;
diff --git a/PKGBUILD b/PKGBUILD
index f7595533dffd..6d8205ebb4d1 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
_srcname="pstoedit"
pkgname=pstoedit-nomagick
pkgver=3.70
-pkgrel=2
+pkgrel=3
pkgdesc="Translates PS/PDF graphics to other vector formats (no ImageMagick dependency)"
arch=('i686' 'x86_64')
url="http://www.pstoedit.net/"
@@ -14,15 +14,20 @@ depends=('gd' 'ming' 'libzip' 'plotutils' 'ghostscript')
provides=('pstoedit' 'libpstoedit.so')
conflicts=('pstoedit')
source=("https://sourceforge.net/projects/pstoedit/files/pstoedit/${pkgver}/${_srcname}-${pkgver}.tar.gz"
- "http://www.openmamba.org/pub/openmamba/milestone2/patches/autotrace-0.31.1-pstoedit.patch")
+ "02-errors-to-stderr.patch"
+ "04-fix-obsolete-LIBPNG_LDFLAGS.patch"
+ "05-fix-plugin-loading.patch"
+)
sha256sums=('06b86113f7847cbcfd4e0623921a8763143bbcaef9f9098e6def650d1ff8138c'
- '74989406876269222a5287a3f737a4627a084a0758398c92c220f118d56ef474')
+ '66cd2bd3f92aa4ba57c916f721acd8c42c07fffea5fbc81f075853dab845d6d8'
+ '3320bbcf6ba33d70213897f41c31c158d4bb4284e17b061ed8d1c38c1ee5a8b8'
+ 'edec8010f6f05126047ce8f9facf1c36a2c0480a0bac14469b8ffb31a7722625')
prepare() {
cd "${_srcname}-${pkgver}"
- rm --force pstoedit-config
- sed -i "s,+ echo 3.42.0,+ echo 3.70.0,g" "${srcdir}/autotrace-0.31.1-pstoedit.patch"
- patch -Np1 -i "../autotrace-0.31.1-pstoedit.patch"
+ patch -Np1 -i ../02-errors-to-stderr.patch
+ patch -Np1 -i ../04-fix-obsolete-LIBPNG_LDFLAGS.patch
+ patch -Np1 -i ../05-fix-plugin-loading.patch
}
build() {
@@ -42,5 +47,4 @@ build() {
package() {
cd "${_srcname}-${pkgver}"
make DESTDIR="$pkgdir/" install
- install -D -m755 pstoedit-config "${pkgdir}"/usr/bin/pstoedit-config
}