Accepting request 800698 from home:XRevan86
- Update to version 1.0. OBS-URL: https://build.opensuse.org/request/show/800698 OBS-URL: https://build.opensuse.org/package/show/graphics/inkscape?expand=0&rev=61
This commit is contained in:
parent
23d89d24e3
commit
d4e95d2f28
@ -1,79 +0,0 @@
|
||||
From 5d0de061d393cc0aa134708a7482e9913a0d0736 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Tue, 30 Jul 2019 16:02:49 +0200
|
||||
Subject: [PATCH] Run python script for translations with Python 3
|
||||
|
||||
---
|
||||
share/filters/CMakeLists.txt | 2 +-
|
||||
share/palettes/CMakeLists.txt | 2 +-
|
||||
share/patterns/CMakeLists.txt | 2 +-
|
||||
share/symbols/CMakeLists.txt | 2 +-
|
||||
share/templates/CMakeLists.txt | 2 +-
|
||||
5 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/share/filters/CMakeLists.txt b/share/filters/CMakeLists.txt
|
||||
index bfcdd78..17cb98f 100644
|
||||
--- a/share/filters/CMakeLists.txt
|
||||
+++ b/share/filters/CMakeLists.txt
|
||||
@@ -1,6 +1,6 @@
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
|
||||
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg > ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
|
||||
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg > ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py
|
||||
)
|
||||
diff --git a/share/palettes/CMakeLists.txt b/share/palettes/CMakeLists.txt
|
||||
index 49b1b5e..ef6f501 100644
|
||||
--- a/share/palettes/CMakeLists.txt
|
||||
+++ b/share/palettes/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ set(I18N_FILES "inkscape.gpl" "svg.gpl" "Tango-Palette.gpl")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
|
||||
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
|
||||
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES}
|
||||
)
|
||||
diff --git a/share/patterns/CMakeLists.txt b/share/patterns/CMakeLists.txt
|
||||
index 4dd4153..4d63fc0 100644
|
||||
--- a/share/patterns/CMakeLists.txt
|
||||
+++ b/share/patterns/CMakeLists.txt
|
||||
@@ -1,6 +1,6 @@
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
|
||||
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg > ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
|
||||
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg > ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py
|
||||
)
|
||||
diff --git a/share/symbols/CMakeLists.txt b/share/symbols/CMakeLists.txt
|
||||
index 36f7564..ed0bc43 100644
|
||||
--- a/share/symbols/CMakeLists.txt
|
||||
+++ b/share/symbols/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ file(GLOB _FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.svg")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
|
||||
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
|
||||
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES}
|
||||
)
|
||||
diff --git a/share/templates/CMakeLists.txt b/share/templates/CMakeLists.txt
|
||||
index a267e43..8a95704 100644
|
||||
--- a/share/templates/CMakeLists.txt
|
||||
+++ b/share/templates/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ file(GLOB _FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.svg")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/templates.h
|
||||
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/templates.h
|
||||
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/templates.h
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES}
|
||||
)
|
||||
--
|
||||
2.22.0
|
||||
|
15
_service
15
_service
@ -1,15 +0,0 @@
|
||||
<services>
|
||||
<service mode="disabled" name="tar_scm">
|
||||
<param name="url">https://gitlab.com/inkscape/inkscape.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="revision">0.92.x</param>
|
||||
<param name="versionformat">0.92.3+%cd.%h</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
</service>
|
||||
<service mode="disabled" name="recompress">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">bz2</param>
|
||||
</service>
|
||||
<service mode="disabled" name="set_version" />
|
||||
</services>
|
||||
|
@ -1,4 +0,0 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://gitlab.com/inkscape/inkscape.git</param>
|
||||
<param name="changesrevision">6afa35c3d33c050e8d00bf7608733aad5d726d0b</param></service></servicedata>
|
@ -1,11 +0,0 @@
|
||||
--- inkscape-0.92.3/CMakeScripts/HelperMacros.cmake_orig 2018-04-24 21:00:20.000562424 +0200
|
||||
+++ inkscape-0.92.3/CMakeScripts/HelperMacros.cmake 2018-04-24 21:00:30.300534272 +0200
|
||||
@@ -29,7 +29,7 @@
|
||||
name
|
||||
sources)
|
||||
|
||||
- add_library(${name} ${sources})
|
||||
+ add_library(${name} STATIC ${sources})
|
||||
|
||||
# works fine without having the includes
|
||||
# listed is helpful for IDE's (QtCreator/MSVC)
|
@ -1,34 +0,0 @@
|
||||
From f5e0ea893f34c91f25d4781b37ee6eff15a7e213 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Holder <thomas@thomas-holder.de>
|
||||
Date: Thu, 7 Mar 2019 21:48:37 +0100
|
||||
Subject: [PATCH] extensions 2to3: fix dxf_outlines
|
||||
|
||||
---
|
||||
share/extensions/dxf_outlines.py | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py
|
||||
index 63d813f94c..e07681bbba 100755
|
||||
--- a/share/extensions/dxf_outlines.py
|
||||
+++ b/share/extensions/dxf_outlines.py
|
||||
@@ -31,6 +31,7 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
'''
|
||||
# standard library
|
||||
+import sys
|
||||
import math
|
||||
# local library
|
||||
import inkex
|
||||
@@ -101,7 +102,8 @@ class MyEffect(inkex.Effect):
|
||||
self.d = array([0], float) # knot vector
|
||||
self.poly = [[0.0,0.0]] # LWPOLYLINE data
|
||||
def output(self):
|
||||
- print(b''.join(self.dxf))
|
||||
+ stdout = sys.stdout if sys.version_info[0] < 3 else sys.stdout.buffer
|
||||
+ stdout.write(b''.join(self.dxf))
|
||||
def dxf_add(self, str):
|
||||
self.dxf.append(str.encode(self.options.char_encode))
|
||||
def dxf_line(self,csp):
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,25 +0,0 @@
|
||||
--- inkscape-0.92.3/CMakeScripts/HelperMacros.cmake_orig 2018-04-24 21:28:19.299976294 +0200
|
||||
+++ inkscape-0.92.3/CMakeScripts/HelperMacros.cmake 2018-04-24 21:00:30.300534272 +0200
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
# static libraries are probably not useful on Windows
|
||||
# (if we ever build shared libraries those would use the RUNTIME target and we might have to revisit this)
|
||||
- if(NOT WIN32)
|
||||
+ if(0)
|
||||
install(TARGETS ${name}
|
||||
LIBRARY DESTINATION lib/inkscape
|
||||
ARCHIVE DESTINATION lib/inkscape
|
||||
--- inkscape-0.92.3/src/CMakeLists.txt_orig 2018-04-24 21:21:17.069106797 +0200
|
||||
+++ inkscape-0.92.3/src/CMakeLists.txt 2018-04-24 21:26:42.844223886 +0200
|
||||
@@ -575,9 +575,8 @@
|
||||
inkscape_base
|
||||
inkscape
|
||||
inkview
|
||||
- RUNTIME DESTINATION bin
|
||||
- LIBRARY DESTINATION lib/inkscape
|
||||
- ARCHIVE DESTINATION lib/inkscape)
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
else()
|
||||
install(TARGETS
|
||||
inkscape_base
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:57ec2da8177b36614a513e2822efd73af721e690f7ddc6bd0a5fbb1525b4515e
|
||||
size 31929728
|
3
inkscape-1.0.tar.xz
Normal file
3
inkscape-1.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:89c123d1a62ac52db6a08fe3be730584411b89a88ecc528a410b4f3fa53f94bb
|
||||
size 31935616
|
@ -1,44 +0,0 @@
|
||||
From dc25406853353320078eca22cf817fb052c97082 Mon Sep 17 00:00:00 2001
|
||||
From: Marc Jeanmougin <marc@jeanmougin.fr>
|
||||
Date: Wed, 24 Apr 2019 14:11:26 +0200
|
||||
Subject: [PATCH] Tentative fix for poppler 0.76
|
||||
|
||||
---
|
||||
src/extension/internal/pdfinput/pdf-parser.cpp | 2 +-
|
||||
src/extension/internal/pdfinput/poppler-transition-api.h | 7 +++++++
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
|
||||
index 2981d6ee51..ddbff7671f 100644
|
||||
--- a/src/extension/internal/pdfinput/pdf-parser.cpp
|
||||
+++ b/src/extension/internal/pdfinput/pdf-parser.cpp
|
||||
@@ -426,7 +426,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) {
|
||||
error(errInternal, -1, "Weird page contents");
|
||||
return;
|
||||
}
|
||||
- parser = new Parser(xref, new Lexer(xref, obj), gFalse);
|
||||
+ parser = new _POPPLER_NEW_PARSER(xref, obj);
|
||||
go(topLevel);
|
||||
delete parser;
|
||||
parser = NULL;
|
||||
diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h
|
||||
index 6e4dde7dee..21a60702fa 100644
|
||||
--- a/src/extension/internal/pdfinput/poppler-transition-api.h
|
||||
+++ b/src/extension/internal/pdfinput/poppler-transition-api.h
|
||||
@@ -3,6 +3,13 @@
|
||||
|
||||
#include <glib/poppler-features.h>
|
||||
|
||||
+#if POPPLER_CHECK_VERSION(0, 76, 0)
|
||||
+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse)
|
||||
+#else
|
||||
+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse)
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#if POPPLER_CHECK_VERSION(0, 72, 0)
|
||||
#define getCString c_str
|
||||
#endif
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,68 +0,0 @@
|
||||
From 324c7903d9fd62e74c042c31477299be3b980fd2 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Holder <thomas@thomas-holder.de>
|
||||
Date: Sat, 26 Oct 2019 14:39:31 +0200
|
||||
Subject: [PATCH] fix poppler 0.82.0 build
|
||||
|
||||
---
|
||||
src/extension/internal/pdfinput/pdf-parser.cpp | 2 +-
|
||||
src/extension/internal/pdfinput/poppler-transition-api.h | 6 ++++++
|
||||
src/extension/internal/pdfinput/svg-builder.cpp | 2 +-
|
||||
src/extension/internal/pdfinput/svg-builder.h | 2 +-
|
||||
4 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: inkscape-0.92.4/src/extension/internal/pdfinput/pdf-parser.cpp
|
||||
===================================================================
|
||||
--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/pdf-parser.cpp
|
||||
+++ inkscape-0.92.4/src/extension/internal/pdfinput/pdf-parser.cpp
|
||||
@@ -2414,7 +2414,7 @@ void PdfParser::doShowText(GooString *s)
|
||||
int wMode;
|
||||
double riseX, riseY;
|
||||
CharCode code;
|
||||
- Unicode *u = NULL;
|
||||
+ Unicode _POPPLER_CONST_82 *u = nullptr;
|
||||
double x, y, dx, dy, tdx, tdy;
|
||||
double originX, originY, tOriginX, tOriginY;
|
||||
double oldCTM[6], newCTM[6];
|
||||
Index: inkscape-0.92.4/src/extension/internal/pdfinput/poppler-transition-api.h
|
||||
===================================================================
|
||||
--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/poppler-transition-api.h
|
||||
+++ inkscape-0.92.4/src/extension/internal/pdfinput/poppler-transition-api.h
|
||||
@@ -3,6 +3,12 @@
|
||||
|
||||
#include <glib/poppler-features.h>
|
||||
|
||||
+#if POPPLER_CHECK_VERSION(0, 82, 0)
|
||||
+#define _POPPLER_CONST_82 const
|
||||
+#else
|
||||
+#define _POPPLER_CONST_82
|
||||
+#endif
|
||||
+
|
||||
#if POPPLER_CHECK_VERSION(0, 76, 0)
|
||||
#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse)
|
||||
#else
|
||||
Index: inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.cpp
|
||||
===================================================================
|
||||
--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/svg-builder.cpp
|
||||
+++ inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.cpp
|
||||
@@ -1379,7 +1379,7 @@ void SvgBuilder::beginString(GfxState *s
|
||||
void SvgBuilder::addChar(GfxState *state, double x, double y,
|
||||
double dx, double dy,
|
||||
double originX, double originY,
|
||||
- CharCode /*code*/, int /*nBytes*/, Unicode *u, int uLen) {
|
||||
+ CharCode /*code*/, int /*nBytes*/, Unicode const *u, int uLen) {
|
||||
|
||||
|
||||
bool is_space = ( uLen == 1 && u[0] == 32 );
|
||||
Index: inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.h
|
||||
===================================================================
|
||||
--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/svg-builder.h
|
||||
+++ inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.h
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
void addChar(GfxState *state, double x, double y,
|
||||
double dx, double dy,
|
||||
double originX, double originY,
|
||||
- CharCode code, int nBytes, Unicode *u, int uLen);
|
||||
+ CharCode code, int nBytes, Unicode const *u, int uLen);
|
||||
void beginTextObject(GfxState *state);
|
||||
void endTextObject(GfxState *state);
|
||||
|
@ -1,105 +0,0 @@
|
||||
From b5360a807b12d4e8318475ffd0464b84882788b5 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Tojnar <jtojnar@gmail.com>
|
||||
Date: Tue, 3 Dec 2019 00:17:05 +0100
|
||||
Subject: [PATCH] Fix build with Poppler 0.83.0
|
||||
|
||||
(cherry picked from commit 51351358a62acb6887eab49bc0dc4a7a3d18c17a)
|
||||
---
|
||||
src/extension/internal/pdfinput/pdf-input.cpp | 6 +++---
|
||||
src/extension/internal/pdfinput/pdf-parser.cpp | 4 ++--
|
||||
.../internal/pdfinput/poppler-transition-api.h | 12 ++++++++++++
|
||||
src/extension/internal/pdfinput/svg-builder.cpp | 4 ++--
|
||||
4 files changed, 19 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
|
||||
index 9621e306a0..7027b7e642 100644
|
||||
--- a/src/extension/internal/pdfinput/pdf-input.cpp
|
||||
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
|
||||
@@ -689,12 +689,12 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
|
||||
//
|
||||
gchar const *poppler_datadir = g_getenv("POPPLER_DATADIR");
|
||||
if (poppler_datadir != NULL) {
|
||||
- globalParams = new GlobalParams(poppler_datadir);
|
||||
+ globalParams = _POPPLER_NEW_GLOBAL_PARAMS(poppler_datadir);
|
||||
} else {
|
||||
- globalParams = new GlobalParams();
|
||||
+ globalParams = _POPPLER_NEW_GLOBAL_PARAMS();
|
||||
}
|
||||
#else
|
||||
- globalParams = new GlobalParams();
|
||||
+ globalParams = _POPPLER_NEW_GLOBAL_PARAMS();
|
||||
#endif // ENABLE_OSX_APP_LOCATIONS
|
||||
}
|
||||
|
||||
diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
|
||||
index e71bb79381..2ff448828d 100644
|
||||
--- a/src/extension/internal/pdfinput/pdf-parser.cpp
|
||||
+++ b/src/extension/internal/pdfinput/pdf-parser.cpp
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
ClipHistoryEntry *save();
|
||||
ClipHistoryEntry *restore();
|
||||
GBool hasSaves() { return saved != NULL; }
|
||||
- void setClip(GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
|
||||
+ void setClip(_POPPLER_CONST_83 GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
|
||||
GfxPath *getClipPath() { return clipPath; }
|
||||
GfxClipType getClipType() { return clipType; }
|
||||
|
||||
@@ -3394,7 +3394,7 @@ ClipHistoryEntry::~ClipHistoryEntry()
|
||||
}
|
||||
}
|
||||
|
||||
-void ClipHistoryEntry::setClip(GfxPath *clipPathA, GfxClipType clipTypeA) {
|
||||
+void ClipHistoryEntry::setClip(_POPPLER_CONST_83 GfxPath *clipPathA, GfxClipType clipTypeA) {
|
||||
// Free previous clip path
|
||||
if (clipPath) {
|
||||
delete clipPath;
|
||||
diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h
|
||||
index 93c0f99ba1..1118c0849f 100644
|
||||
--- a/src/extension/internal/pdfinput/poppler-transition-api.h
|
||||
+++ b/src/extension/internal/pdfinput/poppler-transition-api.h
|
||||
@@ -3,6 +3,12 @@
|
||||
|
||||
#include <glib/poppler-features.h>
|
||||
|
||||
+#if POPPLER_CHECK_VERSION(0, 83, 0)
|
||||
+#define _POPPLER_CONST_83 const
|
||||
+#else
|
||||
+#define _POPPLER_CONST_83
|
||||
+#endif
|
||||
+
|
||||
#if POPPLER_CHECK_VERSION(0, 82, 0)
|
||||
#define _POPPLER_CONST_82 const
|
||||
#else
|
||||
@@ -15,6 +21,12 @@
|
||||
#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse)
|
||||
#endif
|
||||
|
||||
+#if POPPLER_CHECK_VERSION(0, 83, 0)
|
||||
+#define _POPPLER_NEW_GLOBAL_PARAMS(args...) std::unique_ptr<GlobalParams>(new GlobalParams(args))
|
||||
+#else
|
||||
+#define _POPPLER_NEW_GLOBAL_PARAMS(args...) new GlobalParams(args)
|
||||
+#endif
|
||||
+
|
||||
|
||||
#if POPPLER_CHECK_VERSION(0, 72, 0)
|
||||
#define getCString c_str
|
||||
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
|
||||
index ea2940ffe1..6454089134 100644
|
||||
--- a/src/extension/internal/pdfinput/svg-builder.cpp
|
||||
+++ b/src/extension/internal/pdfinput/svg-builder.cpp
|
||||
@@ -264,10 +264,10 @@ static void svgSetTransform(Inkscape::XML::Node *node, double c0, double c1,
|
||||
/**
|
||||
* \brief Generates a SVG path string from poppler's data structure
|
||||
*/
|
||||
-static gchar *svgInterpretPath(GfxPath *path) {
|
||||
+static gchar *svgInterpretPath(_POPPLER_CONST_83 GfxPath *path) {
|
||||
Inkscape::SVG::PathString pathString;
|
||||
for (int i = 0 ; i < path->getNumSubpaths() ; ++i ) {
|
||||
- GfxSubpath *subpath = path->getSubpath(i);
|
||||
+ _POPPLER_CONST_83 GfxSubpath *subpath = path->getSubpath(i);
|
||||
if (subpath->getNumPoints() > 0) {
|
||||
pathString.moveTo(subpath->getX(0), subpath->getY(0));
|
||||
int j = 1;
|
||||
--
|
||||
2.22.0
|
||||
|
@ -1,24 +0,0 @@
|
||||
===================================================================
|
||||
--- a/share/extensions/export_gimp_palette.py
|
||||
+++ b/share/extensions/export_gimp_palette.py
|
||||
@@ -13,7 +13,7 @@ import sys, simplestyle
|
||||
try:
|
||||
from xml.dom.minidom import parse
|
||||
except:
|
||||
- inkex.errormsg(_('The export_gpl.py module requires PyXML. Please download the latest version from http://pyxml.sourceforge.net/.'))
|
||||
+ inkex.errormsg(_('The export_gpl.py module requires XML modules. Please install the python-xml package.'))
|
||||
sys.exit()
|
||||
# local library
|
||||
import inkex
|
||||
===================================================================
|
||||
--- a/share/extensions/inkex.py
|
||||
+++ b/share/extensions/inkex.py
|
||||
@@ -114,9 +114,7 @@ def uutounit(val, unit):
|
||||
except ImportError as e:
|
||||
localize()
|
||||
errormsg(_("The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension."
|
||||
- "Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, "
|
||||
- "or install it through your package manager by a command like: sudo apt-get install "
|
||||
- "python-lxml\n\nTechnical details:\n%s" % (e, )))
|
||||
+ "Please download and install it through your package manager by a command like: sudo zypper install python-lxml\n\nTechnical details:\n%s" % (e,)))
|
||||
sys.exit()
|
136
inkscape-split-extensions-extra.py
Normal file
136
inkscape-split-extensions-extra.py
Normal file
@ -0,0 +1,136 @@
|
||||
#!/usr/bin/env python3
|
||||
# List all files, that depend on base_extra_modules, explicitly or implicitly.
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
|
||||
# Search all .py files that are imported by mentioned modules.
|
||||
def make_deplist(inx_list, module_list):
|
||||
modules = set()
|
||||
inx_regex = re.compile(rf">(.+)\.py</(dependency|command)>")
|
||||
|
||||
for entry in inx_list:
|
||||
with open(os.path.join(".", entry)) as file:
|
||||
for line in file:
|
||||
match = inx_regex.search(line)
|
||||
if (match and match.group(1)
|
||||
and match.group(1) not in module_list):
|
||||
modules.add(match.group(1))
|
||||
|
||||
for module in module_list.union(modules):
|
||||
name = os.path.join(".", f"{module}.py")
|
||||
if os.path.isfile(name):
|
||||
with open(name) as file:
|
||||
for line in file:
|
||||
match = re.match(r"from (.+) import", line)
|
||||
if not match:
|
||||
match = re.match(r"import ([^#]+).*? *", line)
|
||||
|
||||
if match and match.group(1):
|
||||
needle = re.sub(r"as .+", "", match.group(1)).strip()
|
||||
|
||||
if (needle not in module_list.union(modules)
|
||||
and os.path.isfile(f"{needle}.py")):
|
||||
modules.add(needle)
|
||||
|
||||
return modules
|
||||
|
||||
if __name__ == "__main__":
|
||||
work_dir = pathlib.Path(os.getcwd())
|
||||
os.chdir(sys.argv[1])
|
||||
prefix = sys.argv[2]
|
||||
|
||||
base_extra_modules = set(["lxml", "numpy", "scour", "xml"])
|
||||
extra_modules = set()
|
||||
|
||||
prev_modules = base_extra_modules
|
||||
while True:
|
||||
prev_module_regex = rf"({'|'.join(map(re.escape, prev_modules))})"
|
||||
import_regex = re.compile(rf"(import|from).* {prev_module_regex}")
|
||||
|
||||
next_modules = set()
|
||||
|
||||
# Search all .py files importing one of the mentioned modules.
|
||||
for entry in pathlib.Path(".").glob("**/*.py"):
|
||||
with entry.open() as file:
|
||||
for line in file:
|
||||
if import_regex.search(line):
|
||||
name = str(entry.as_posix())
|
||||
|
||||
module = name.split(os.sep, 1)[0]
|
||||
if module.endswith(".py"):
|
||||
module = entry.stem
|
||||
if module not in next_modules:
|
||||
next_modules.add(module)
|
||||
|
||||
prev_modules = next_modules
|
||||
if extra_modules.issuperset(prev_modules):
|
||||
break
|
||||
extra_modules.update(prev_modules)
|
||||
|
||||
|
||||
std_inx = set()
|
||||
extra_inx = set()
|
||||
|
||||
# We have a complete list of .py files dependent on base_extra_modules.
|
||||
# Now we need a list of .inx module descriptors.
|
||||
inx_regex = re.compile(rf'({"|".join(map(re.escape, extra_modules))})\.py')
|
||||
|
||||
for entry in pathlib.Path(".").iterdir():
|
||||
if entry.is_file() and entry.suffix == ".inx":
|
||||
with entry.open() as file:
|
||||
for line in file:
|
||||
if inx_regex.search(line):
|
||||
extra_inx.add(entry.name)
|
||||
|
||||
# inx files that do not belong in extra_inx.
|
||||
if entry.name not in extra_inx:
|
||||
std_inx.add(entry.name)
|
||||
|
||||
|
||||
# Now create list of .py files that should belong in the std package.
|
||||
std_modules = make_deplist(std_inx, set())
|
||||
|
||||
# Now create list of .py files that are required by extra modules
|
||||
# (If no std module needs it, then they will belong in the extra package).
|
||||
extradep_modules = make_deplist(extra_inx, extra_modules)
|
||||
|
||||
|
||||
# And now verify everything and generate final list.
|
||||
exclusion_regex = re.compile(r"^(cdr|fig|.*gimp)")
|
||||
|
||||
std_list = work_dir / "inkscape.lst"
|
||||
extra_list = work_dir / "inkscape-extensions-extra.lst"
|
||||
|
||||
with std_list.open("w") as file:
|
||||
for inx in std_inx:
|
||||
if not exclusion_regex.match(inx):
|
||||
print(f"{prefix}{inx}", file=file)
|
||||
with extra_list.open("w") as file:
|
||||
for inx in extra_inx:
|
||||
if not exclusion_regex.match(inx):
|
||||
print(f"{prefix}{inx}", file=file)
|
||||
|
||||
|
||||
with std_list.open("a") as std_file, extra_list.open("a") as extra_file:
|
||||
for entry in pathlib.Path(".").iterdir():
|
||||
if entry.is_file() and entry.suffix == ".py":
|
||||
name = str(entry.as_posix())
|
||||
if exclusion_regex.match(name):
|
||||
pass
|
||||
elif entry.is_file() and entry.stem in extra_modules:
|
||||
print(f"{prefix}{entry.name}", file=extra_file)
|
||||
elif entry.is_file() and entry.stem in std_modules:
|
||||
print(f"{prefix}{entry.name}", file=std_file)
|
||||
elif entry.is_file() and entry.stem in extradep_modules:
|
||||
print(f"{prefix}{entry.name}", file=extra_file)
|
||||
else:
|
||||
print(f"ERROR: Undecided file {name}", file=sys.stderr)
|
||||
elif entry.is_dir():
|
||||
if entry.name in extra_modules:
|
||||
print(f"{prefix}{entry.name}/", file=extra_file)
|
||||
elif entry.name in std_modules:
|
||||
print(f"{prefix}{entry.name}/", file=std_file)
|
||||
elif entry.name in extradep_modules:
|
||||
print(f"{prefix}{entry.name}/", file=extra_file)
|
@ -1,100 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# List all files, that depend on NEXT_LIST_REGEXP, explicitly or implicitly
|
||||
|
||||
cd $1
|
||||
|
||||
# Search all py files importing one of the mentioned modules:
|
||||
make_extra_list() {
|
||||
NEWLIST=( $(grep -rl '\(import\|from\).* '"$NEXT_LIST_REGEXP"'\(,\|\.\| \|$\)' .) )
|
||||
EXTRA_LIST=( $(IFS=$'\n' ; echo "${EXTRA_LIST[*]}"$'\n'"${NEWLIST[*]}" | sed '/^$/d;s:^\./::' | sort -u) )
|
||||
NEWLIST=( "${NEWLIST[@]##*/}" )
|
||||
NEXT_LIST_REGEXP="\\(${NEWLIST[*]%.py}\\)"
|
||||
NEXT_LIST_REGEXP=${NEXT_LIST_REGEXP// /\\|}
|
||||
}
|
||||
|
||||
# Search all py files that are imported by mentioned modules:
|
||||
make_deplist() {
|
||||
NEWLIST=( $( ( (IFS=$'\n' ; echo "${NEWLIST[*]}"$'\n') ; sed 2>/dev/null -n 's/^from \(.*\) import.*/\1/p;s/^import \([^#]*\).* */\1/p' ${NEWLIST[@]} | sed 's/as .*//g;s/, */\n/g;s/ //g' | sed 's/$/.py/;s/\.py\.py$/.py/') | sort -u) )
|
||||
}
|
||||
|
||||
OLDLIST=( EMPTY )
|
||||
EXTRA_LIST=()
|
||||
NEXT_LIST_REGEXP='\(xml\|lxml\)'
|
||||
ITER=1
|
||||
|
||||
until test "${EXTRA_LIST[*]}" = "${OLDLIST[*]}" ; do
|
||||
OLDLIST=( "${EXTRA_LIST[@]}" )
|
||||
make_extra_list
|
||||
#echo "iter $ITER list: ${LIST[*]}"
|
||||
let ITER++
|
||||
done
|
||||
|
||||
# We have a complete list of py files dependent on xml or lxml.
|
||||
# Now we need a list of inx module descriptors.
|
||||
INX_REGEXP="${EXTRA_LIST[*]//./\\.}"
|
||||
INX_REGEXP="\\(>${INX_REGEXP// /<\\|>}<\\)"
|
||||
INX_EXTRA_LIST=( $(grep -l "$INX_REGEXP" *.inx) )
|
||||
|
||||
# inx files that do not belong to INX_EXTRA_LIST will be a part of INX_STD_LIST
|
||||
INX_STD_LIST=()
|
||||
for FILE in *.inx ; do
|
||||
eval 'case $FILE in '"$(IFS='|' ; echo "${INX_EXTRA_LIST[*]}")"') continue;; esac'
|
||||
INX_STD_LIST[${#INX_STD_LIST[@]}]=$FILE
|
||||
done
|
||||
|
||||
# Now create list of py files that should belong to std package:
|
||||
OLDLIST=( EMPTY )
|
||||
NEWLIST=( $(sed -n 's@.*<dependency type="executable" location="extensions">\(.*\)\.py</dependency>.*@\1.py@p' ${INX_STD_LIST[@]}) )
|
||||
ITER=1
|
||||
until test "${NEWLIST[*]}" = "${OLDLIST[*]}" ; do
|
||||
OLDLIST=( "${NEWLIST[@]}" )
|
||||
make_deplist
|
||||
#echo "iter $ITER list: ${LIST[*]}"
|
||||
let ITER++
|
||||
done
|
||||
STD_LIST=( "${NEWLIST[@]}" )
|
||||
|
||||
# Now create list of py files that are required by extra modules:
|
||||
# (If no std module needs it, then they will belong to extra package.)
|
||||
OLDLIST=( EMPTY )
|
||||
NEWLIST=( $(sed -n 's@.*<dependency type="executable" location="extensions">\(.*\)\.py</dependency>.*@\1.py@p' ${INX_EXTRA_LIST[@]}) )
|
||||
ITER=1
|
||||
until test "${NEWLIST[*]}" = "${OLDLIST[*]}" ; do
|
||||
OLDLIST=( "${NEWLIST[@]}" )
|
||||
make_deplist
|
||||
#echo "iter $ITER list: ${LIST[*]}"
|
||||
let ITER++
|
||||
done
|
||||
EXTRADEP_LIST=( ${NEWLIST[@]} )
|
||||
|
||||
# And now verify everything and generate final list:
|
||||
# Now its safe to ignore subdirectory issue - we know where they belong.
|
||||
RC=0
|
||||
IFS=$'\n'
|
||||
exec 3>$OLDPWD/inkscape.lst
|
||||
echo >&3 "%defattr(-,root,root)"
|
||||
for FILE in ${INX_STD_LIST[@]} ; do
|
||||
echo >&3 $2$FILE
|
||||
done
|
||||
exec 4>$OLDPWD/inkscape-extensions-extra.lst
|
||||
echo >&4 "%defattr(-,root,root)"
|
||||
for FILE in ${INX_EXTRA_LIST[@]} ; do
|
||||
echo >&4 $2$FILE
|
||||
done
|
||||
for FILE in *.py ; do
|
||||
eval '
|
||||
case $FILE in
|
||||
cdr*|dia*|fig*|*gimp*|sk*) continue;;
|
||||
'"$(IFS='|' ; echo "${EXTRA_LIST[*]}")"') echo >&4 $2$FILE; continue;;
|
||||
'"$(IFS='|' ; echo "${STD_LIST[*]}")"') echo >&3 $2$FILE; continue;;
|
||||
'"$(IFS='|' ; echo "${EXTRADEP_LIST[*]}")"') echo >&4 $2$FILE; continue;;
|
||||
esac'
|
||||
echo "ERROR: Undecided file $FILE"
|
||||
RC=1
|
||||
done
|
||||
|
||||
exec 3>&-
|
||||
exec 4>&-
|
||||
|
||||
exit $RC
|
@ -1,3 +1,37 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 4 15:29:43 UTC 2020 - Alexei Sorokin <sor.alexei@meowr.ru>
|
||||
|
||||
- Update to version 1.0:
|
||||
* See https://inkscape.org/release/inkscape-1.0/
|
||||
- Re-enable ImageMagick support.
|
||||
- Replace inkscape-split-extensions-extra.sh with
|
||||
inkscape-split-extensions-extra.py, adapting for 1.0.
|
||||
- Add python3-numpy and python3-scour to the list of extra
|
||||
dependencies as only extra extensions need them.
|
||||
- Stop altering Name and GenericName from the .desktop file:
|
||||
original values are fine.
|
||||
- Remove
|
||||
0001-Run-python-script-for-translations-with-Python-3.patch:
|
||||
merged upstream.
|
||||
- Remove build_internal_libraries_as_static.patch: merged upstream.
|
||||
- Remove f5e0ea893f34_extensions_python3_compatibility.patch:
|
||||
merged upstream.
|
||||
- Remove fix_install_targets.patch: fixed upstream.
|
||||
- Remove inkscape-fix-for-poppler-0.76.patch: merged upstream.
|
||||
- Remove inkscape-fix-for-poppler-0.82.patch: merged upstream.
|
||||
- Remove inkscape-fix-for-poppler-0.83.patch: merged upstream.
|
||||
- Remove inkscape-packages.patch: no longer needed.
|
||||
- Remove mr_568_extensions_python3_compatibility.patch: merged
|
||||
upstream.
|
||||
- Remove mr_582_extensions_python3_compatibility.patch: merged
|
||||
upstream.
|
||||
- Remove obsolete hacks from the spec file and add new ones.
|
||||
- Remove the inkscape-extensions-dia and
|
||||
inkscape-extensions-skencil packages: the extensions were
|
||||
removed upstream.
|
||||
- Drop the python2 bcond, no practical use without skencil.
|
||||
- Drop openSUSE versions prior to Leap 15.x.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 16 18:40:23 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
249
inkscape.spec
249
inkscape.spec
@ -16,98 +16,70 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without python2
|
||||
%define _version 1.0_2020-05-01_4035a4fb49
|
||||
Name: inkscape
|
||||
Version: 0.92.4
|
||||
Version: 1.0
|
||||
Release: 0
|
||||
Summary: Vector Illustration Program
|
||||
License: GPL-3.0-only
|
||||
Group: Productivity/Graphics/Vector Editors
|
||||
URL: https://inkscape.org/
|
||||
#Source: https://media.inkscape.org/dl/resources/file/%%{name}-%%{version}.tar.bz2
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
|
||||
Source: https://media.inkscape.org/dl/resources/file/%{name}-%{version}.tar.xz
|
||||
# openSUSE palette file
|
||||
Source1: openSUSE.gpl
|
||||
Source2: inkscape-split-extensions-extra.sh
|
||||
# PATCH-FIX-OPENSUSE inkscape-packages.patch sbrabec@suse.cz -- Suggest packages instead of compilation from source.
|
||||
Patch0: inkscape-packages.patch
|
||||
# PATCH-FIX-OPENSUSE build_internal_libraries_as_static.patch -- Avoid problems with dynamic library default from %%cmake macro
|
||||
Patch1: build_internal_libraries_as_static.patch
|
||||
# PATCH-FIX-OPENSUSE fix_install_targets.patch -- use correct libdir etc.
|
||||
Patch2: fix_install_targets.patch
|
||||
# PATCH-FIX-UPSTREAM inkscape-fix-for-poppler-0.76.patch -- Fix build with poppler 0.76
|
||||
Patch3: inkscape-fix-for-poppler-0.76.patch
|
||||
# PATCH-FIX-OPENSUSE -- run i18n string extraction with python3
|
||||
Patch4: 0001-Run-python-script-for-translations-with-Python-3.patch
|
||||
# PATCH-FIX-UPSTREAM https://gitlab.com/inkscape/inkscape/merge_requests/568.patch -- fixed in 0.92.5
|
||||
Patch5: mr_568_extensions_python3_compatibility.patch
|
||||
# PATCH-FIX-UPSTREAM https://gitlab.com/inkscape/inkscape/commit/f5e0ea893f34c91f25d4781b37ee6eff15a7e213
|
||||
Patch6: f5e0ea893f34_extensions_python3_compatibility.patch
|
||||
# PATCH-FIX-UPSTREAM https://gitlab.com/inkscape/inkscape/merge_requests/582.patch -- fixed in 0.92.5
|
||||
Patch7: mr_582_extensions_python3_compatibility.patch
|
||||
# PATCH-FIX-UPSTREAM inkscape-fix-for-poppler-0.82.patch -- Fix build poppler 0.82
|
||||
Patch8: inkscape-fix-for-poppler-0.82.patch
|
||||
# PATCH-FIX-UPSTREAM inkscape-fix-for-poppler-0.83.patch -- Fix build poppler 0.83
|
||||
Patch9: inkscape-fix-for-poppler-0.83.patch
|
||||
|
||||
BuildRequires: gtkspell-devel
|
||||
%if 0%{?suse_version} > 1325
|
||||
BuildRequires: libboost_headers-devel
|
||||
%else
|
||||
BuildRequires: boost-devel
|
||||
%endif
|
||||
Source2: inkscape-split-extensions-extra.py
|
||||
BuildRequires: cmake
|
||||
BuildRequires: double-conversion-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gc-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gsl-devel
|
||||
BuildRequires: gtkmm24-devel
|
||||
BuildRequires: intltool
|
||||
# Disabling IM until inkscape upstream supports IM7
|
||||
#BuildRequires: libMagick++-devel
|
||||
BuildRequires: libboost_headers-devel
|
||||
BuildRequires: liblcms2-devel
|
||||
BuildRequires: libpoppler-glib-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxslt-devel
|
||||
BuildRequires: perl
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: popt-devel
|
||||
BuildRequires: potrace-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-gobject-devel
|
||||
BuildRequires: python3-xml
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: pkgconfig(dbus-glib-1)
|
||||
BuildRequires: pkgconfig(libcdr-0.1)
|
||||
BuildRequires: pkgconfig(Magick++)
|
||||
BuildRequires: pkgconfig(gdl-3.0)
|
||||
BuildRequires: pkgconfig(gsl)
|
||||
BuildRequires: pkgconfig(gtkmm-3.0)
|
||||
BuildRequires: pkgconfig(gtkspell3-3.0)
|
||||
BuildRequires: pkgconfig(libexif)
|
||||
BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(librevenge-0.0)
|
||||
BuildRequires: pkgconfig(libsoup-2.4)
|
||||
BuildRequires: pkgconfig(libvisio-0.1)
|
||||
BuildRequires: pkgconfig(libwpg-0.3)
|
||||
Requires: python3-gobject
|
||||
Recommends: %{name}-lang
|
||||
Recommends: python3-lxml
|
||||
Recommends: python3-numpy
|
||||
Recommends: python3-scour
|
||||
Recommends: python3-xml
|
||||
Obsoletes: %{name}-extensions-dia < %{version}
|
||||
Obsoletes: %{name}-extensions-skencil < %{version}
|
||||
|
||||
%description
|
||||
Inkscape is a vector graphics editor.
|
||||
|
||||
%package extensions-extra
|
||||
Summary: Additional extensions for Inkscape
|
||||
Group: Productivity/Graphics/Vector Editors
|
||||
Requires: %{name} = %{version}
|
||||
# ps2pdf-ext.py is a wrapper around ps2pdf, which lives in ghostscript package.
|
||||
# ps_input.py is a wrapper around ps2pdf, which lives in ghostscript package.
|
||||
Requires: ghostscript
|
||||
Requires: python3-lxml
|
||||
Requires: python3-numpy
|
||||
Requires: python3-scour
|
||||
Requires: python3-xml
|
||||
# for cdr and wmf modules
|
||||
Recommends: yudit
|
||||
# dxf_output.inx, eqtexsvg.inx:
|
||||
Requires: pstoedit
|
||||
Enhances: %{name}
|
||||
# python3-xml is already likely installed, so the big dependency is python3-lxml. Hence this supplements.
|
||||
Supplements: packageand(%{name}:python3-lxml)
|
||||
Supplements: (%{name} and python3-lxml and python3-numpy and python3-scour and python3-xml)
|
||||
|
||||
%description extensions-extra
|
||||
Extra extensions for Inkscape. Recommended for everybody who wants to
|
||||
@ -115,26 +87,13 @@ use Inkscape.
|
||||
|
||||
Inkscape is a vector graphics editor.
|
||||
|
||||
%package extensions-dia
|
||||
Summary: Dia import extension for Inkscape
|
||||
Group: Productivity/Graphics/Vector Editors
|
||||
Requires: %{name} = %{version}
|
||||
Requires: dia
|
||||
Enhances: %{name}
|
||||
Supplements: packageand(%{name}:dia)
|
||||
|
||||
%description extensions-dia
|
||||
Dia import extension for Inkscape.
|
||||
|
||||
Inkscape is a vector graphics editor.
|
||||
|
||||
%package extensions-fig
|
||||
Summary: Fig import extensions for Inkscape
|
||||
Group: Productivity/Graphics/Vector Editors
|
||||
Requires: %{name} = %{version}
|
||||
Requires: %{name}-extensions-extra = %{version}
|
||||
Requires: transfig
|
||||
Enhances: %{name}
|
||||
Supplements: packageand(%{name}:transfig)
|
||||
Supplements: (%{name} and transfig)
|
||||
|
||||
%description extensions-fig
|
||||
Fig family (XFig, Figurine, JFig, WinFig,...) import extension for
|
||||
@ -144,124 +103,74 @@ Inkscape is a vector graphics editor.
|
||||
|
||||
%package extensions-gimp
|
||||
Summary: GIMP extensions for Inkscape
|
||||
Group: Productivity/Graphics/Vector Editors
|
||||
Requires: %{name} = %{version}
|
||||
Requires: %{name}-extensions-extra = %{version}
|
||||
Requires: gimp
|
||||
Enhances: %{name}
|
||||
Supplements: packageand(%{name}:gimp)
|
||||
Supplements: (%{name} and gimp)
|
||||
|
||||
%description extensions-gimp
|
||||
The GIMP import and export extensions for Inkscape.
|
||||
|
||||
Inkscape is a vector graphics editor.
|
||||
|
||||
%package extensions-skencil
|
||||
Summary: Skencil import extension for Inkscape
|
||||
Group: Productivity/Graphics/Vector Editors
|
||||
Requires: %{name} = %{version}
|
||||
Requires: skencil
|
||||
Enhances: %{name}
|
||||
Supplements: packageand(%{name}:skencil)
|
||||
|
||||
%description extensions-skencil
|
||||
Skencil import extension for Inkscape.
|
||||
|
||||
Inkscape is a vector graphics editor.
|
||||
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%setup -q -n %{name}-%{_version}
|
||||
|
||||
%build
|
||||
%define _lto_cflags %{nil}
|
||||
%ifarch %{arm}
|
||||
export LDFLAGS+="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
|
||||
%endif
|
||||
%cmake
|
||||
%{make_jobs}
|
||||
|
||||
# Unmangle XML and merge translations
|
||||
# Currently missing from CMake build (https://bugs.launchpad.net/inkscape/+bug/1710337)
|
||||
(cd ..
|
||||
sed -ie 's:<_:<:g; s:</_:</:g' inkscape.appdata.xml.in
|
||||
# msgfmt --xml ... is available since 0.19.7
|
||||
%if 0%{?suse_version} >= 1500
|
||||
msgfmt --xml -d ./po/ --template inkscape.appdata.xml.in -o inkscape.appdata.xml
|
||||
%else
|
||||
cp inkscape.appdata.xml.in inkscape.appdata.xml
|
||||
%endif
|
||||
)
|
||||
%cmake \
|
||||
-DINKSCAPE_INSTALL_LIBDIR=%{_libdir} \
|
||||
-DWITH_MANPAGE_COMPRESSION=OFF
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
rm -rf %{buildroot}%{_datadir}/locale/en_US@piglatin
|
||||
rm -rf %{buildroot}%{_datadir}/inkscape/filters/filters.svg.h
|
||||
rm -rf %{buildroot}%{_datadir}/inkscape/patterns/patterns.svg.h
|
||||
# Only useful for translators.
|
||||
rm %{buildroot}%{_datadir}/inkscape/extensions/genpofiles.sh
|
||||
# Only required on Windows.
|
||||
rm %{buildroot}%{_datadir}/inkscape/extensions/print_win32_vector.*
|
||||
# Packaging/distribution info.
|
||||
rm %{buildroot}%{_datadir}/inkscape/extensions/{LICENSE.txt,MANIFEST.in,README.md,STYLEGUIDE.md}
|
||||
# Test framework.
|
||||
rm %{buildroot}%{_datadir}/inkscape/extensions/setup.{cfg,py} \
|
||||
%{buildroot}%{_datadir}/inkscape/extensions/tox.ini \
|
||||
%{buildroot}%{_datadir}/inkscape/extensions/.pylintrc \
|
||||
%{buildroot}%{_datadir}/inkscape/extensions/doxygen-main.dox
|
||||
|
||||
# its not really an extension (missing .inx), but a standalone script
|
||||
# avoid perl dependency, same can be achieved with 'cat foo.svg | extensions/embedimage.py'
|
||||
rm -rf %{buildroot}%{_datadir}/inkscape/extensions/embed_raster_in_svg.pl
|
||||
# only useful for translators
|
||||
rm -rf %{buildroot}%{_datadir}/inkscape/extensions/genpofiles.sh
|
||||
# ruby port of simplepath.py, which is not used anywhere
|
||||
rm -rf %{buildroot}%{_datadir}/inkscape/extensions/simplepath.rb
|
||||
# only required on Windows
|
||||
rm -rf %{buildroot}%{_datadir}/inkscape/extensions/print_win32_vector.*
|
||||
# packaging/distribution info
|
||||
rm -rf %{buildroot}%{_datadir}/inkscape/extensions/README
|
||||
|
||||
install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/inkscape/palettes
|
||||
|
||||
%suse_update_desktop_file -N "Inkscape" -G "SVG Vector Illustrator" inkscape
|
||||
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_datadir}/inkscape/palettes/
|
||||
|
||||
%find_lang %{name} %{?no_lang_C}
|
||||
|
||||
%if !%{with python2}
|
||||
# remove skencil extension as we need sk1 that is py2 only
|
||||
rm -rf %{buildroot}%{_datadir}/inkscape/extensions/sk*
|
||||
%endif
|
||||
sed -i -e "1 s|#! *%{_bindir}/env python|#!%{_bindir}/python3|" %{buildroot}%{_datadir}/inkscape/extensions/*.py
|
||||
|
||||
# split extensions
|
||||
bash %{SOURCE2} %{buildroot}%{_datadir}/inkscape/extensions "%%{_datadir}/inkscape/extensions/"
|
||||
|
||||
sed -i -e "1 s,#! */usr/bin/env python,#!/usr/bin/python3," %{buildroot}%{_datadir}/inkscape/extensions/*.py
|
||||
|
||||
# Localized man pages, correct install path
|
||||
for man in %{buildroot}%{_mandir}/man1/inkscape.*.1; do
|
||||
LOCALE=`echo $man | sed "s:.*%{_mandir}/man1/.*\.\([a-zA-Z_]\+\)\.1:\1:g"`
|
||||
mkdir -m755 -p %{buildroot}%{_mandir}/$LOCALE/man1
|
||||
mv $man %{buildroot}%{_mandir}/$LOCALE/man1/%{name}.1
|
||||
echo "%%lang($LOCALE) %%dir %%{_mandir}/$LOCALE" >> %{name}.man-lang.tmp
|
||||
echo "%%lang($LOCALE) %%dir %%{_mandir}/$LOCALE/man1" >> %{name}.man-lang.tmp
|
||||
echo "%%lang($LOCALE) %%doc %%{_mandir}/$LOCALE/man1/inkscape.1*" >> %{name}.man-lang.tmp
|
||||
done
|
||||
sort -u %{name}.man-lang.tmp > %{name}.man-lang
|
||||
rm %{name}.man-lang.tmp
|
||||
|
||||
# Install appdata
|
||||
install -D -m 0644 inkscape.appdata.xml %{buildroot}%{_datadir}/metainfo/inkscape.appdata.xml
|
||||
# Split extensions.
|
||||
python3 %{SOURCE2} %{buildroot}%{_datadir}/inkscape/extensions "%%{_datadir}/inkscape/extensions/"
|
||||
|
||||
%fdupes %{buildroot}
|
||||
|
||||
# We can't really move the localized manpages to the lang package, since they'd
|
||||
# create a conflict between the lang subpackage and bundles
|
||||
%post -n %{name} -p /sbin/ldconfig
|
||||
|
||||
%files -f inkscape.lst -f %{name}.man-lang
|
||||
%postun -n %{name} -p /sbin/ldconfig
|
||||
|
||||
%files -f inkscape.lst
|
||||
%{_bindir}/*
|
||||
%{_libdir}/libinkscape_base.so
|
||||
%{_datadir}/applications/inkscape.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/inkscape.png
|
||||
%dir %{_datadir}/metainfo
|
||||
%{_datadir}/metainfo/inkscape.appdata.xml
|
||||
%dir %{_datadir}/inkscape
|
||||
%{_datadir}/inkscape/[cf-z]*
|
||||
%{_datadir}/inkscape/examples
|
||||
%dir %{_datadir}/inkscape/extensions
|
||||
%dir %{_datadir}/inkscape/extensions/ink2canvas
|
||||
%{_datadir}/inkscape/extensions/xaml2svg
|
||||
%{_libdir}/lib%{name}_base.so
|
||||
%{_datadir}/applications/*Inkscape.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/*Inkscape.png
|
||||
%{_datadir}/metainfo/*Inkscape.appdata.xml
|
||||
%dir %{_datadir}/inkscape/
|
||||
%{_datadir}/inkscape/[cdf-z]*
|
||||
%{_datadir}/inkscape/examples/
|
||||
%dir %{_datadir}/inkscape/extensions/
|
||||
%{_datadir}/inkscape/extensions/svg_fonts/
|
||||
%{_datadir}/inkscape/extensions/xaml2svg/
|
||||
%{_datadir}/inkscape/extensions/*.xsl*
|
||||
%{_datadir}/inkscape/extensions/colors.xml
|
||||
%{_datadir}/inkscape/extensions/Poly3DObjects/
|
||||
@ -272,46 +181,23 @@ install -D -m 0644 inkscape.appdata.xml %{buildroot}%{_datadir}/metainfo/inkscap
|
||||
%{_datadir}/inkscape/extensions/jessyInk_core_mouseHandler_zoomControl.js
|
||||
%{_datadir}/inkscape/extensions/jessyInk_video.svg
|
||||
%{_datadir}/inkscape/extensions/fontfix.conf
|
||||
%{_datadir}/inkscape/extensions/ink2canvas/*
|
||||
%{_datadir}/inkscape/extensions/inkscape.extension.rng
|
||||
%{_datadir}/inkscape/extensions/seamless_pattern.svg
|
||||
%{_datadir}/inkscape/attributes/
|
||||
%{_datadir}/inkscape/branding/
|
||||
%doc %{_mandir}/man?/*.*
|
||||
%{_mandir}/man1/*.1%{?ext_man}
|
||||
# We can't really move the localized manpages to the lang package, since they'd
|
||||
# create a conflict between the lang subpackage and bundles
|
||||
%dir %{_mandir}/hr/
|
||||
%dir %{_mandir}/hr/man1/
|
||||
%{_mandir}/*/man1/*.1%{?ext_man}
|
||||
# exclude extensions that go in other packages:
|
||||
%exclude %{_datadir}/inkscape/extensions/Barcode
|
||||
%exclude %{_datadir}/inkscape/extensions/ps2pdf-ext.py
|
||||
%exclude %{_datadir}/inkscape/extensions/ps_input.inx
|
||||
%exclude %{_datadir}/inkscape/extensions/eps_input.inx
|
||||
%exclude %{_datadir}/inkscape/extensions/cdr*
|
||||
%exclude %{_datadir}/inkscape/extensions/wmf*
|
||||
%exclude %{_datadir}/inkscape/extensions/dia*
|
||||
%exclude %{_datadir}/inkscape/extensions/fig*
|
||||
%exclude %{_datadir}/inkscape/extensions/*gimp*
|
||||
%if %{with python2}
|
||||
%exclude %{_datadir}/inkscape/extensions/sk*
|
||||
%endif
|
||||
%exclude %{_datadir}/inkscape/extensions/*dxf*
|
||||
# this one is in extras, manually added there due to large dependencies on ghostscript
|
||||
%exclude %{_datadir}/inkscape/extensions/ps2pdf-ext.py
|
||||
|
||||
%files extensions-extra -f inkscape-extensions-extra.lst
|
||||
%{_datadir}/inkscape/extensions/Barcode
|
||||
# ps2pdf-ext is a wrapper around ps2pdf binary (part of ghostscript)
|
||||
%{_datadir}/inkscape/extensions/ps_input.inx
|
||||
%{_datadir}/inkscape/extensions/eps_input.inx
|
||||
%{_datadir}/inkscape/extensions/ps2pdf-ext.py
|
||||
# ps2dxf is a wrapper around pstoedit
|
||||
%{_datadir}/inkscape/extensions/dxf_output.inx
|
||||
%{_datadir}/inkscape/extensions/ps2dxf.sh
|
||||
# This extensions seems erronous being copied in here too.
|
||||
%exclude %{_datadir}/inkscape/extensions/*gimp*
|
||||
%if %{with python2}
|
||||
%exclude %{_datadir}/inkscape/extensions/sk*
|
||||
%endif
|
||||
|
||||
%files extensions-dia
|
||||
%{_datadir}/inkscape/extensions/dia*
|
||||
%{_datadir}/inkscape/extensions/output_scour.svg
|
||||
|
||||
%files extensions-fig
|
||||
%{_datadir}/inkscape/extensions/fig*
|
||||
@ -320,11 +206,6 @@ install -D -m 0644 inkscape.appdata.xml %{buildroot}%{_datadir}/metainfo/inkscap
|
||||
# NOTE: export_gimp_palette* does not depend on gimp, but belongs here logically:
|
||||
%{_datadir}/inkscape/extensions/*gimp*
|
||||
|
||||
%if %{with python2}
|
||||
%files extensions-skencil
|
||||
%{_datadir}/inkscape/extensions/sk*
|
||||
%endif
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
|
||||
%changelog
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,130 +0,0 @@
|
||||
From d3ed2703736d9157b2cdadd4b5a95324aacc6191 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Holder <thomas@thomas-holder.de>
|
||||
Date: Tue, 12 Mar 2019 16:29:56 +0100
|
||||
Subject: [PATCH] extensions 2to3: follow-up
|
||||
|
||||
---
|
||||
share/extensions/color_desaturate.py | 2 +-
|
||||
share/extensions/dxf_input.py | 2 +-
|
||||
share/extensions/dxf_outlines.py | 2 +-
|
||||
share/extensions/ink2canvas/svg.py | 6 +++++-
|
||||
share/extensions/voronoi.py | 12 +++++++++---
|
||||
5 files changed, 17 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/share/extensions/color_desaturate.py b/share/extensions/color_desaturate.py
|
||||
index a2350a4d32..978e199a29 100755
|
||||
--- a/share/extensions/color_desaturate.py
|
||||
+++ b/share/extensions/color_desaturate.py
|
||||
@@ -3,7 +3,7 @@ import coloreffect
|
||||
|
||||
class C(coloreffect.ColorEffect):
|
||||
def colmod(self,r,g,b):
|
||||
- l = (max(r,g,b)+min(r,g,b))/2
|
||||
+ l = (max(r,g,b)+min(r,g,b)) // 2
|
||||
ig=int(round(l))
|
||||
return '%02x%02x%02x' % (ig,ig,ig)
|
||||
|
||||
diff --git a/share/extensions/dxf_input.py b/share/extensions/dxf_input.py
|
||||
index 3e15c0b8fd..8754e7cb63 100755
|
||||
--- a/share/extensions/dxf_input.py
|
||||
+++ b/share/extensions/dxf_input.py
|
||||
@@ -109,7 +109,7 @@ def export_SPLINE():
|
||||
vals[groups['20']].insert(i-1, (1.0 - a1)*vals[groups['20']][i-2] + a1*vals[groups['20']][i-1])
|
||||
ctrls = len(vals[groups['10']])
|
||||
path = 'M %f,%f' % (vals[groups['10']][0], vals[groups['20']][0])
|
||||
- for i in range (0, (ctrls - 1)/3):
|
||||
+ for i in range (0, (ctrls - 1) // 3):
|
||||
path += ' C %f,%f %f,%f %f,%f' % (vals[groups['10']][3*i + 1], vals[groups['20']][3*i + 1], vals[groups['10']][3*i + 2], vals[groups['20']][3*i + 2], vals[groups['10']][3*i + 3], vals[groups['20']][3*i + 3])
|
||||
if vals[groups['70']][0] & 1: # closed path
|
||||
path += ' z'
|
||||
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py
|
||||
index e07681bbba..53c1a523e6 100755
|
||||
--- a/share/extensions/dxf_outlines.py
|
||||
+++ b/share/extensions/dxf_outlines.py
|
||||
@@ -103,7 +103,7 @@ class MyEffect(inkex.Effect):
|
||||
self.poly = [[0.0,0.0]] # LWPOLYLINE data
|
||||
def output(self):
|
||||
stdout = sys.stdout if sys.version_info[0] < 3 else sys.stdout.buffer
|
||||
- stdout.write(b''.join(self.dxf))
|
||||
+ stdout.write(b''.join(self.dxf) + b'\n')
|
||||
def dxf_add(self, str):
|
||||
self.dxf.append(str.encode(self.options.char_encode))
|
||||
def dxf_line(self,csp):
|
||||
diff --git a/share/extensions/ink2canvas/svg.py b/share/extensions/ink2canvas/svg.py
|
||||
index f4dca8279d..8d1402b7b0 100644
|
||||
--- a/share/extensions/ink2canvas/svg.py
|
||||
+++ b/share/extensions/ink2canvas/svg.py
|
||||
@@ -16,6 +16,10 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
'''
|
||||
|
||||
+import sys
|
||||
+if sys.version_info[0] > 2:
|
||||
+ unicode = lambda s: s.decode() if isinstance(s, bytes) else str(s)
|
||||
+
|
||||
import inkex
|
||||
import simplestyle
|
||||
from simplepath import parsePath
|
||||
@@ -326,7 +330,7 @@ class Polygon(Path):
|
||||
points = map(lambda x: x.split(","), points)
|
||||
comm = []
|
||||
for pt in points: # creating path command similar
|
||||
- pt = map(float, pt)
|
||||
+ pt = list(map(float, pt))
|
||||
comm.append(["L", pt])
|
||||
comm[0][0] = "M" # first command must be a 'M' => moveTo
|
||||
return comm
|
||||
diff --git a/share/extensions/voronoi.py b/share/extensions/voronoi.py
|
||||
index af83007f1a..d3e9b124df 100644
|
||||
--- a/share/extensions/voronoi.py
|
||||
+++ b/share/extensions/voronoi.py
|
||||
@@ -189,7 +189,7 @@ def voronoi(siteList,context):
|
||||
if not priorityQ.isEmpty():
|
||||
minpt = priorityQ.getMinPt()
|
||||
|
||||
- if (newsite and (priorityQ.isEmpty() or cmp(newsite,minpt) < 0)):
|
||||
+ if (newsite and (priorityQ.isEmpty() or newsite < minpt)):
|
||||
# newsite is smallest - this is a site event
|
||||
context.outSite(newsite)
|
||||
|
||||
@@ -341,6 +341,9 @@ class Site(object):
|
||||
else:
|
||||
return 0
|
||||
|
||||
+ def __lt__(self, other):
|
||||
+ return self.__cmp__(other) < 0
|
||||
+
|
||||
def distance(self,other):
|
||||
dx = self.x - other.x
|
||||
dy = self.y - other.y
|
||||
@@ -442,6 +445,9 @@ class Halfedge(object):
|
||||
else:
|
||||
return 0
|
||||
|
||||
+ def __lt__(self, other):
|
||||
+ return self.__cmp__(other) < 0
|
||||
+
|
||||
def leftreg(self,default):
|
||||
if not self.edge:
|
||||
return default
|
||||
@@ -519,7 +525,7 @@ class Halfedge(object):
|
||||
|
||||
xint = (e1.c*e2.b - e2.c*e1.b) / d
|
||||
yint = (e2.c*e1.a - e1.c*e2.a) / d
|
||||
- if(cmp(e1.reg[1],e2.reg[1]) < 0):
|
||||
+ if e1.reg[1] < e2.reg[1]:
|
||||
he = self
|
||||
e = e1
|
||||
else:
|
||||
@@ -637,7 +643,7 @@ class PriorityQueue(object):
|
||||
he.ystar = site.y + offset
|
||||
last = self.hash[self.getBucket(he)]
|
||||
next = last.qnext
|
||||
- while((next is not None) and cmp(he,next) > 0):
|
||||
+ while((next is not None) and he > next):
|
||||
last = next
|
||||
next = last.qnext
|
||||
he.qnext = last.qnext
|
||||
--
|
||||
2.21.0
|
||||
|
Loading…
Reference in New Issue
Block a user