head 1.2; access; symbols pkgsrc-2021Q2:1.1.0.40 pkgsrc-2021Q2-base:1.1 pkgsrc-2021Q1:1.1.0.38 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.36 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.34 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.30 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.10 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.32 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.28 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.26 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.24 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.22 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.20 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.18 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.16 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.14 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.12 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.8 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.6 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.4 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.2 pkgsrc-2016Q3-base:1.1; locks; strict; comment @// @; 1.2 date 2021.07.10.10.25.36; author markd; state dead; branches; next 1.1; commitid jeURk9EGrjGMxq0D; 1.1 date 2016.08.22.11.20.56; author markd; state Exp; branches; next ; commitid wNrrckfimfxEbijz; desc @@ 1.2 log @pstoedit: update to 3.75 New or changed in 3.75: * Fix a compile problem under certain MacOS versions. * Various changes needed for interworking with newer versions of GhostScript. * Some code modernization based on feedback from VS-2019, Clang Powertools and PVS Studio. New or changed in 3.74: * Added support for dotted and dashed lines to the DXF backend. * Reduce redundancy in help documents. * Porting to Windows CE by Rohan Shetty. * Made pstoedit compatible with ghostscript 9.27. New or changed in 3.73: * Fix a bug occurring with large scale factors. * Include full documentation by default and provide an option to generate documentation locally which then fit best to the local installation. * Started to apply improvements proposed by clang-tidy. New or changed in 3.72: * Included a bunch of patches from Debian for easier maintenance of the package plus correction to some spelling issues. Thanks to Barak A. Pearlmutter. New or changed in 3.71: * added a -vl option to specify a verbosity level. Using the older -v enables level 1. For more use -vl 2. * included a patch contributed by OpenSuse folks fixing a problem in finding the plugins under certain conditions. * included a patch contributed by Martin Madsen related to checking non existing directories when looking for plugins. * added support for pdfwithshow and pdfawidthshow special operators when reading PDF files. * Scott Pakin updated the cfdg driver to support the current version of cfdg. * changes needed for newer versions of GhostScript. * some code cleanup. pstoedit passed all Coverity checks. @ text @$NetBSD: patch-src_pstoedit.cpp,v 1.1 2016/08/22 11:20:56 markd Exp $ Upstream patch for not finding plugins. --- src/pstoedit.cpp.orig 2014-09-04 18:21:45.000000000 +0000 +++ src/pstoedit.cpp @@@@ -30,6 +30,7 @@@@ #include I_string_h #include +#include #include "pstoeditoptions.h" @@@@ -261,33 +262,33 @@@@ static void loadpstoeditplugins(const ch loadPlugInDrivers(plugindir.c_str(), errstream, verbose); // load the driver plugins pluginsloaded = true; } - // also look in the directory where the pstoedit .exe/dll was found - char szExePath[1000]; - szExePath[0] = '\0'; - const unsigned long r = P_GetPathToMyself(progname, szExePath, sizeof(szExePath)); - if (verbose) errstream << "pstoedit : path to myself:" << progname << " " << r << " " << szExePath<< endl; - char *p = 0; - if (r && (p = strrchr(szExePath, directoryDelimiter)) != 0) { - *p = '\0'; - if (!strequal(szExePath, plugindir.c_str())) { - loadPlugInDrivers(szExePath, errstream,verbose); - pluginsloaded = true; - } - } - // now try also $exepath/../lib/pstoedit - strcat_s(szExePath,1000,"/../lib/pstoedit"); - if (!strequal(szExePath, plugindir.c_str())) { - loadPlugInDrivers(szExePath, errstream,verbose); - pluginsloaded = true; - } - #ifdef PSTOEDITLIBDIR - if (!pluginsloaded) { + struct stat s; + if (!pluginsloaded && + !stat(PSTOEDITLIBDIR, &s) && + S_ISDIR(s.st_mode)) { // also try to load drivers from the PSTOEDITLIBDIR loadPlugInDrivers(PSTOEDITLIBDIR, errstream,verbose); pluginsloaded = true; } #endif + // If the above failed, also look in the directory where the pstoedit .exe/dll was found + if (!pluginsloaded) { + char szExePath[1000]; + szExePath[0] = '\0'; + const unsigned long r = P_GetPathToMyself(progname, szExePath, sizeof(szExePath)); + if (verbose) errstream << "pstoedit : path to myself:" << progname << " " << r << " " << szExePath<< endl; + char *p = 0; + if (r && (p = strrchr(szExePath, directoryDelimiter)) != 0) { + *p = '\0'; + loadPlugInDrivers(szExePath, errstream,verbose); + } + // now try also $exepath/../lib/pstoedit + strcat_s(szExePath,1000,"/../lib/pstoedit"); + if (!strequal(szExePath, plugindir.c_str())) { + loadPlugInDrivers(szExePath, errstream,verbose); + } + } // delete[]plugindir; } @ 1.1 log @Upstream patch for not finding plugins. Fixes latex input in inkscape. @ text @d1 1 a1 1 $NetBSD$ @