From 6bd7c9097fa2e7f39770443dc7fac3f57c0f128f Mon Sep 17 00:00:00 2001 From: sagitter Date: Mon, 5 Oct 2020 15:03:29 +0200 Subject: [PATCH] Rebase to 3.75 --- .gitignore | 1 + pstoedit-pkglibdir.patch | 124 +++++------------------------------- pstoedit.spec | 61 +++++++++--------- remove-libpng-ldflags.patch | 28 -------- sources | 2 +- 5 files changed, 47 insertions(+), 169 deletions(-) delete mode 100644 remove-libpng-ldflags.patch diff --git a/.gitignore b/.gitignore index fedba58..9391e29 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ pstoedit-3.45.tar.gz /pstoedit-3.70.tar.gz /pstoedit-3.71.tar.gz /pstoedit-3.73.tar.gz +/pstoedit-3.75.tar.gz diff --git a/pstoedit-pkglibdir.patch b/pstoedit-pkglibdir.patch index 477dc94..9ccccc2 100644 --- a/pstoedit-pkglibdir.patch +++ b/pstoedit-pkglibdir.patch @@ -1,109 +1,17 @@ -Fix for pstoedit search for plugins. - -By default, pstoedit "make install" installs to PSTOEDITLIBDIR, so if -nobody moves them to another location, then it is sufficient to search in -PSTOEDITLIBDIR. - - -But the way how pstoedit searches for plugins is broken: - -If pstoedit.reg does not exist or does not contain common/plugindir, then -it tries $exepath/../lib/pstoedit, always sets pluginsloaded, and never -tries PSTOEDITLIBDIR. - -If pstoedit.reg contains common/plugindir, then it tries that path, -always sets pluginsloaded, and never tries PSTOEDITLIBDIR. - -=> The default installation directory is never tried, if it is not equal -to one of above. - - -The implementation has just another problem: - -If pstoedit.reg contains common/plugindir, and the directory defined -there is equal to $pkglibdir, but the string is not literally -"{expansion_of_bindir}/../lib/pstoedit", then plugins are loaded twice. -So the check as it is makes only a little sense, because nobody would -create ~/.pstoedit.reg containing: - -common/plugindir=/usr/bin/../lib/pstoedit - - -The new implementation does things differently: - -If common/plugindir is defined, it checks only that directory. - -It swaps the check order: First checks whether PSTOEDITLIBDIR exists. If -it exists, it skips blind attempts to find plugins. - -As PSTOEDITLIBDIR is always defined by makefile, the blind fallback will -be attempted only in obscure environments. - - -Index: pstoedit-3.70/src/pstoedit.cpp -=================================================================== ---- pstoedit-3.70.orig/src/pstoedit.cpp -+++ pstoedit-3.70/src/pstoedit.cpp -@@ -30,6 +30,7 @@ - #include I_string_h +--- a/config/pstoedit.pc.orig.in 2018-04-16 14:26:28.000000000 +0200 ++++ b/config/pstoedit.pc.in 2020-10-05 14:37:16.750980762 +0200 +@@ -1,7 +1,7 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ +-includedir=@includedir@ ++includedir=@includedir@/pstoedit - #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; - } + Name: pstoedit + Description: converts PostScript(TM) and PDF files to other vector graphic formats +@@ -8,4 +8,4 @@ + Version: @VERSION@.0 + Requires: + Libs: -L@libdir@ -lpstoedit @CXX_STD_LIB@ @CXX_RUNTIME_LIB@ @LIBLD_LDFLAGS@ +-Cflags: -I@includedir@ ++Cflags: -I@includedir@/pstoedit diff --git a/pstoedit.spec b/pstoedit.spec index 3291d06..f84ffe0 100644 --- a/pstoedit.spec +++ b/pstoedit.spec @@ -1,26 +1,24 @@ Name: pstoedit -Version: 3.73 -Release: 8%{?dist} +Version: 3.75 +Release: 1%{?dist} Summary: Translates PostScript and PDF graphics into other vector formats - License: GPLv2+ -URL: http://www.pstoedit.net/ -Source0: http://downloads.sourceforge.net/pstoedit/pstoedit-%{version}.tar.gz +URL: http://www.pstoedit.net +Source0: https://sourceforge.net/projects/pstoedit/files/pstoedit/%{version}/pstoedit-%{version}.tar.gz + +# Fix include directory +Patch0: pstoedit-pkglibdir.patch -Requires: ghostscript -BuildRequires: texlive-latex2man -BuildRequires: texlive-latex -BuildRequires: texlive-collection-langeuropean -BuildRequires: texlive-collection-latex BuildRequires: gd-devel BuildRequires: dos2unix BuildRequires: ghostscript BuildRequires: plotutils-devel -BuildRequires: automake -BuildRequires: gcc-c++ -%ifnarch ia64 +BuildRequires: gcc-c++, gcc BuildRequires: libEMF-devel -%endif +BuildRequires: libzip-devel +BuildRequires: ImageMagick-c++-devel +BuildRequires: ming-devel +Requires: ghostscript%{?_isa} %description Pstoedit converts PostScript and PDF files to various vector graphic @@ -31,7 +29,7 @@ drivers %package devel Summary: Headers for developing programs that will use %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains the header files needed for developing %{name} @@ -39,50 +37,49 @@ applications %prep -%setup -q +%autosetup -p1 dos2unix doc/*.htm doc/readme.txt -aclocal -automake - %build # Buildling without ImageMagick support, to work around bug 507035 -%configure --disable-static --with-emf --without-swf --without-magick +%configure --disable-static --with-emf \ + --enable-docs=no --with-libzip-include=%{_includedir} # http://fedoraproject.org/wiki/Packaging/Guidelines#Removing_Rpath -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool -make %{?_smp_mflags} +%make_build %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 -install -m 644 doc/pstoedit.1 $RPM_BUILD_ROOT%{_mandir}/man1/ +install -pm 644 doc/pstoedit.1 $RPM_BUILD_ROOT%{_mandir}/man1/ find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' -%ldconfig_scriptlets - - %files -%doc copying doc/readme.txt doc/pstoedit.htm doc/changelog.htm doc/pstoedit.pdf +%doc doc/readme.txt doc/pstoedit.htm doc/changelog.htm doc/pstoedit.pdf +%license copying %{_datadir}/pstoedit %{_mandir}/man1/* %{_bindir}/pstoedit %{_libdir}/*.so.* -%{_libdir}/pstoedit +%{_libdir}/pstoedit/ %files devel %doc doc/changelog.htm -%{_includedir}/pstoedit +%{_includedir}/pstoedit/ %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %{_datadir}/aclocal/*.m4 %changelog +* Mon Oct 05 2020 Antonio Trande - 3.75-1 +- Rebase to 3.75 + * Sat Aug 01 2020 Fedora Release Engineering - 3.73-8 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild @@ -107,7 +104,7 @@ the buildroot default packages set. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Mon Jul 09 2018 Sebastian Kisela - 3.73-1 -- Rebase to 3.73. +- Rebase to 3.73 - Add automake call to regenerate Makefile, as libpstoedit.so was not generated at the right time. * Mon Apr 16 2018 Sebastian Kisela - 3.70-11 diff --git a/remove-libpng-ldflags.patch b/remove-libpng-ldflags.patch deleted file mode 100644 index 0b66387..0000000 --- a/remove-libpng-ldflags.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 421cdbeccccb68589002b24dc6e91b23ccd86bfd Mon Sep 17 00:00:00 2001 -From: Sebastian Kisela -Date: Fri, 13 Apr 2018 09:25:37 +0200 -Subject: [PATCH] Remove LIBPNG_LDFLAGS from config - -From version 3.70 upstream seized to use libpng in linking phase -as the whole png generation is now being done by ghostscript -itself. - -Fixes: #1415258 ---- - 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@ --- -2.14.3 - diff --git a/sources b/sources index f93f5aa..97f2922 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pstoedit-3.73.tar.gz) = 77823d77dcec8604decab03cee86edb1ef0a6c56b8dd01a65ab6431d9345bc6a2140076f5d5572fd5221b7f381a07d14b2a45e66cff2a6e12ab7417cd95113b6 +SHA512 (pstoedit-3.75.tar.gz) = 54b8cf7e78e52027d45e7550821476d9a9c4df4f63af83792b6a2909bc62236450ba6b619f95eede9f61a715f4937f1fbaf2ce4ae4b486daa0294c396a882a28