Update Inkscape to 1.0

Notable Changes:
 - Move from GNU autotools to cmake.
 - Switch to python3

Tested by landry@, pamela@. Py feedback from sthen@ Thanks!
This commit is contained in:
rsadowski 2020-05-26 04:53:26 +00:00
parent a9bc5009fc
commit abada12c18
14 changed files with 2335 additions and 653 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.80 2020/01/02 20:32:58 kili Exp $
# $OpenBSD: Makefile,v 1.81 2020/05/26 04:53:26 rsadowski Exp $
COMMENT = SVG vector drawing application
DISTNAME = inkscape-0.92.4
REVISION = 2
DISTNAME = inkscape-1.0
CATEGORIES = graphics
@ -15,23 +14,19 @@ MAINTAINER = Rafael Sadowski <rsadowski@openbsd.org>
PERMIT_PACKAGE = Yes
WANTLIB += ${COMPILER_LIBCXX} ICE Magick++-6.Q16 MagickCore-6.Q16
WANTLIB += MagickWand-6.Q16 SM X11 Xcomposite Xcursor Xdamage
WANTLIB += Xext Xfixes Xi Xinerama Xrandr Xrender Xt aspell atk-1.0
WANTLIB += atkmm-1.6 bz2 c cairo cairomm-1.0 djvulibre enchant
WANTLIB += exif expat ffi fftw3 fontconfig freetype fribidi gc
WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gdkmm-2.4 gio-2.0 giomm-2.4
WANTLIB += glib-2.0 glibmm-2.4 gmodule-2.0 gobject-2.0 graphite2
WANTLIB += gsl gslcblas gthread-2.0 gtk-x11-2.0 gtkmm-2.4 gtkspell
WANTLIB += harfbuzz iconv intl jasper jbig jpeg lcms2 lzma m openjp2
WANTLIB += pango-1.0 pangocairo-1.0 pangoft2-1.0 pangomm-1.4 pcre
WANTLIB += pixman-1 png poppler poppler-glib popt potrace raw_r
WANTLIB += sigc-2.0 tiff webp webpmux xcb xcb-render xcb-shm xml2
WANTLIB += xslt z
WANTLIB += MagickWand-6.Q16 SM X11 Xext aspell atk-1.0 atkmm-1.6
WANTLIB += c cairo cairo-gobject cairomm-1.0 double-conversion
WANTLIB += fontconfig freetype gc gdk-3 gdk_pixbuf-2.0 gdkmm-3.0
WANTLIB += gdl-3 gio-2.0 giomm-2.4 glib-2.0 glibmm-2.4 gmodule-2.0
WANTLIB += gobject-2.0 gsl gslcblas gtk-3 gtkmm-3.0 harfbuzz iconv
WANTLIB += intl jpeg lcms2 m pango-1.0 pangocairo-1.0 pangoft2-1.0
WANTLIB += pangomm-1.4 png poppler poppler-glib potrace sigc-2.0
WANTLIB += soup-2.4 xml2 xslt z
MASTER_SITES = https://media.inkscape.org/dl/resources/file/
EXTRACT_SUFX = .tar.bz2
EXTRACT_SUFX = .tar.xz
MODULES = textproc/intltool \
MODULES = devel/cmake \
lang/python \
lang/ruby
@ -45,27 +40,28 @@ MODRUBY_BUILDDEP = No
# Note that Python is already pulled in indirectly by py-lxml.
MODRUBY_RUNDEP = No
BUILD_DEPENDS = ${MODGNU_AUTOCONF_DEPENDS} \
${MODGNU_AUTOMAKE_DEPENDS} \
devel/libtool \
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
BUILD_DEPENDS = devel/gettext,-tools \
devel/gtest \
devel/boost
LIB_DEPENDS = devel/boehm-gc \
LIB_DEPENDS = math/double-conversion \
textproc/aspell/core \
devel/libsoup \
devel/boehm-gc \
devel/gsl \
devel/popt \
devel/pango \
graphics/ImageMagick \
graphics/libraw \
graphics/lcms2 \
graphics/libexif \
graphics/png \
graphics/potrace \
graphics/libwebp \
print/poppler \
textproc/aspell/core \
textproc/gtkspell \
textproc/libxslt \
x11/gtk2mm>=2.24.4
x11/gnome/gdl \
x11/gtk+3 \
x11/gtk3mm
RUN_DEPENDS = devel/desktop-file-utils \
devel/gettext,-runtime \
@ -73,38 +69,21 @@ RUN_DEPENDS = devel/desktop-file-utils \
textproc/py-lxml \
x11/gtk+3,-guic
USE_GMAKE = Yes
CONFIGURE_STYLE = gnu
AUTOCONF_VERSION = 2.69
AUTOMAKE_VERSION = 1.11
CONFIGURE_ARGS = -without-gnome-vfs
CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include/ImageMagick \
-I${LOCALBASE}/include -I${X11BASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
# As discussed on the ports mailing list, remove internationalised manual
# pages, as our mandoc implementation does not yet deal with them properly.
RM_MANS = man/el man/fr man/ja man/man1/inkscape.*.1 \
man/sk man/zh_TW man/de
WRKDIST = ${WRKDIR}/inkscape-1.0_2020-05-01_4035a4fb49
SUBST_VARS += RUBY MODRUBY_REV
pre-configure:
# As discussed on the ports mailing list, remove internationalised
# manual pages, as our mandoc implementation does not yet deal with
# them properly.
rm ${WRKDIST}/man/{inkscape,inkview}.*.pod.in
find ${WRKDIST} -name i18n.py \
-exec sed -i 's,python,${MODPY_BIN},' {} +;
${SUBST_CMD} ${WRKSRC}/src/extension/implementation/script.cpp \
${WRKSRC}/src/main.cpp
cd ${WRKSRC} && AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
AUTOCONF_VERSION=${AUTOCONF_VERSION} ./autogen.sh
${SUBST_CMD} ${WRKDIST}/src/extension/implementation/script.cpp \
${WRKDIST}/src/inkscape-main.cpp
post-install:
.for i in ${RM_MANS}
rm -Rf ${PREFIX}/${i}
.endfor
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
${PREFIX}/share/inkscape/extensions

View File

@ -1,2 +1,2 @@
SHA256 (inkscape-0.92.4.tar.bz2) = V+wtqBd7NmFKUT4oIu/XOvch5pD33ca9Cl+7FSW0UV4=
SIZE (inkscape-0.92.4.tar.bz2) = 31929728
SHA256 (inkscape-1.0.tar.xz) = icEj0aYqxS22oI/jvnMFhEEbiaiOzFKKQQtPP6U/lLs=
SIZE (inkscape-1.0.tar.xz) = 31935616

View File

@ -0,0 +1,36 @@
$OpenBSD: patch-CMakeLists_txt,v 1.1 2020/05/26 04:53:26 rsadowski Exp $
- Set project before include GNUInstallDirs to avoid cmake warnings
- Fix RPATH to fix linking
CMake Warning (dev) at /usr/local/share/cmake/Modules/GNUInstallDirs.cmake:225 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known. Please enable at least one language before
including GNUInstallDirs.
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -27,12 +27,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMa
# avoid having empty buildtype
set(CMAKE_BUILD_TYPE_INIT "Release")
+project(inkscape)
include(CMakeScripts/HelperFunctions.cmake)
include(CMakeScripts/ConfigEnv.cmake)
include(GNUInstallDirs) # for the CMAKE_INSTALL_LIBDIR variable
-project(inkscape)
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME inkscape) # needs to be before any install() commands
include(CMakeScripts/ConfigPaths.cmake)
@@ -66,7 +66,7 @@ if(APPLE)
SET(CMAKE_MACOSX_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH "@loader_path/${INKSCAPE_INSTALL_LIBDIR_RELATIVE_TO_BINDIR}")
else()
- SET(CMAKE_INSTALL_RPATH "$ORIGIN/${INKSCAPE_INSTALL_LIBDIR_RELATIVE_TO_BINDIR}")
+ SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${INKSCAPE_INSTALL_LIBDIR})
endif()
# this can be removed if/when cmake 3.1 is made the minimum required version

View File

@ -0,0 +1,34 @@
$OpenBSD: patch-CMakeScripts_Pod2man_cmake,v 1.1 2020/05/26 04:53:26 rsadowski Exp $
Fix manpage setup for OpenBSD
- No compressed manpages
- Fix man install directory
Index: CMakeScripts/Pod2man.cmake
--- CMakeScripts/Pod2man.cmake.orig
+++ CMakeScripts/Pod2man.cmake
@@ -9,7 +9,7 @@ if(NOT POD2MAN)
message(STATUS "Could not find pod2man - man pages disabled")
endif()
-find_program(GZIP gzip)
+#find_program(GZIP gzip)
if(NOT GZIP)
message(STATUS "Could not find gzip - man pages uncompressed")
endif()
@@ -34,13 +34,13 @@ macro(pod2man PODFILE_FULL RELEASE SECTION CENTER)
set(MANFILE_TEMP "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${LANG}.tmp")
set(MANFILE_FULL "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${LANG}.${SECTION}")
set(MANFILE_FULL_GZ "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${LANG}.${SECTION}.gz")
- set(MANFILE_DEST "${SHARE_INSTALL}/man/${LANG}/man${SECTION}")
+ set(MANFILE_DEST "${CMAKE_INSTALL_MANDIR}/man/${LANG}/man${SECTION}")
else()
set(MANPAGE_TARGET "man-${NAME}")
set(MANFILE_TEMP "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.tmp")
set(MANFILE_FULL "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${SECTION}")
set(MANFILE_FULL_GZ "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${SECTION}.gz")
- set(MANFILE_DEST "${SHARE_INSTALL}/man/man${SECTION}")
+ set(MANFILE_DEST "${CMAKE_INSTALL_MANDIR}/man${SECTION}")
endif()
add_custom_command(
OUTPUT ${MANFILE_TEMP}

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-configure_ac,v 1.10 2019/11/07 15:32:56 ajacoutot Exp $
Fix build with newer glib2mm (see include/glibmm-2.4/glibmm/timeval.h).
extension/timer.cpp:49:16: error: no member named 'assign_current_time' in 'Glib::TimeVal'
expiration.assign_current_time();
Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -881,7 +881,7 @@ if test "x$enable_strict_build" != "xno"; then
# Ensure that no deprecated glibmm symbols are introduced.
# lp:inkscape builds cleanly with this option at r10957
- CPPFLAGS="-DGLIBMM_DISABLE_DEPRECATED $CPPFLAGS"
+ # CPPFLAGS="-DGLIBMM_DISABLE_DEPRECATED $CPPFLAGS"
dnl Pango 1.32.4 uses a deprecated Glib symbol:
dnl https://bugzilla.gnome.org/show_bug.cgi?id=689843

View File

@ -1,22 +1,21 @@
$OpenBSD: patch-src_extension_implementation_script_cpp,v 1.5 2017/02/24 08:05:34 landry Exp $
--- src/extension/implementation/script.cpp.orig Mon Jan 2 10:44:59 2017
+++ src/extension/implementation/script.cpp Tue Jan 24 22:01:33 2017
@@ -83,14 +83,14 @@ void Script::pump_events (void) {
the given interpreter to a custom one per user.
*/
Script::interpreter_t const Script::interpreterTab[] = {
- {"perl", "perl-interpreter", "perl" },
+ {"perl", "perl-interpreter", "/usr/bin/perl" },
#ifdef WIN32
{"python", "python-interpreter", "pythonw" },
$OpenBSD: patch-src_extension_implementation_script_cpp,v 1.6 2020/05/26 04:53:26 rsadowski Exp $
Index: src/extension/implementation/script.cpp
--- src/extension/implementation/script.cpp.orig
+++ src/extension/implementation/script.cpp
@@ -79,12 +79,12 @@ const std::map<std::string, Script::interpreter_t> Scr
{ "perl", {"perl-interpreter", {"perl" }}},
{ "python", {"python-interpreter", {"python3" }}},
#else
- {"python", "python-interpreter", "python" },
+ {"python", "python-interpreter", "${MODPY_BIN}" },
- { "perl", {"perl-interpreter", {"perl" }}},
- { "python", {"python-interpreter", {"python3", "python" }}},
+ { "perl", {"perl-interpreter", {"/usr/bin/perl" }}},
+ { "python", {"python-interpreter", {"${MODPY_BIN}" }}},
#endif
- {"ruby", "ruby-interpreter", "ruby" },
- {"shell", "shell-interpreter", "sh" },
+ {"ruby", "ruby-interpreter", "${RUBY}" },
+ {"shell", "shell-interpreter", "/bin/sh" },
{ NULL, NULL, NULL }
{ "python2", {"python2-interpreter", {"python2", "python" }}},
- { "ruby", {"ruby-interpreter", {"ruby" }}},
- { "shell", {"shell-interpreter", {"sh" }}},
+ { "ruby", {"ruby-interpreter", {"${RUBY}" }}},
+ { "shell", {"shell-interpreter", {"/bin/sh" }}},
};

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-src_extension_internal_pdfinput_pdf-input_cpp,v 1.5 2020/01/02 20:32:58 kili Exp $
Fix build with poppler-0.83.0.
Index: src/extension/internal/pdfinput/pdf-input.cpp
--- src/extension/internal/pdfinput/pdf-input.cpp.orig
+++ src/extension/internal/pdfinput/pdf-input.cpp
@@ -689,12 +689,12 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/,
//
gchar const *poppler_datadir = g_getenv("POPPLER_DATADIR");
if (poppler_datadir != NULL) {
- globalParams = new GlobalParams(poppler_datadir);
+ globalParams = std::make_unique<GlobalParams>(poppler_datadir);
} else {
- globalParams = new GlobalParams();
+ globalParams = std::make_unique<GlobalParams>();
}
#else
- globalParams = new GlobalParams();
+ globalParams = std::make_unique<GlobalParams>();
#endif // ENABLE_OSX_APP_LOCATIONS
}

View File

@ -1,45 +0,0 @@
$OpenBSD: patch-src_extension_internal_pdfinput_pdf-parser_cpp,v 1.17 2020/01/02 20:32:58 kili Exp $
Fix build with poppler-0.76. From archlinux.
And with poppler-0.83.0.
Index: src/extension/internal/pdfinput/pdf-parser.cpp
--- src/extension/internal/pdfinput/pdf-parser.cpp.orig
+++ src/extension/internal/pdfinput/pdf-parser.cpp
@@ -272,7 +272,7 @@ class ClipHistoryEntry { (public)
ClipHistoryEntry *save();
ClipHistoryEntry *restore();
GBool hasSaves() { return saved != NULL; }
- void setClip(GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
+ void setClip(const GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
GfxPath *getClipPath() { return clipPath; }
GfxClipType getClipType() { return clipType; }
@@ -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 Parser(xref, obj, gFalse);
go(topLevel);
delete parser;
parser = NULL;
@@ -2414,7 +2414,7 @@ void PdfParser::doShowText(GooString *s) {
int wMode;
double riseX, riseY;
CharCode code;
- Unicode *u = NULL;
+ const Unicode *u = NULL;
double x, y, dx, dy, tdx, tdy;
double originX, originY, tOriginX, tOriginY;
double oldCTM[6], newCTM[6];
@@ -3394,7 +3394,7 @@ ClipHistoryEntry::~ClipHistoryEntry()
}
}
-void ClipHistoryEntry::setClip(GfxPath *clipPathA, GfxClipType clipTypeA) {
+void ClipHistoryEntry::setClip(const GfxPath *clipPathA, GfxClipType clipTypeA) {
// Free previous clip path
if (clipPath) {
delete clipPath;

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-src_extension_internal_pdfinput_svg-builder_cpp,v 1.7 2020/01/02 20:32:58 kili Exp $
Fix build against poppler-0.83.0.
Index: src/extension/internal/pdfinput/svg-builder.cpp
--- src/extension/internal/pdfinput/svg-builder.cpp.orig
+++ src/extension/internal/pdfinput/svg-builder.cpp
@@ -264,10 +264,10 @@ static void svgSetTransform(Inkscape::XML::Node *node,
/**
* \brief Generates a SVG path string from poppler's data structure
*/
-static gchar *svgInterpretPath(GfxPath *path) {
+static gchar *svgInterpretPath(const GfxPath *path) {
Inkscape::SVG::PathString pathString;
for (int i = 0 ; i < path->getNumSubpaths() ; ++i ) {
- GfxSubpath *subpath = path->getSubpath(i);
+ const GfxSubpath *subpath = path->getSubpath(i);
if (subpath->getNumPoints() > 0) {
pathString.moveTo(subpath->getX(0), subpath->getY(0));
int j = 1;
@@ -1379,7 +1379,7 @@ void SvgBuilder::beginString(GfxState *state) {
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*/, const Unicode *u, int uLen) {
bool is_space = ( uLen == 1 && u[0] == 32 );

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_extension_internal_pdfinput_svg-builder_h,v 1.3 2019/11/12 22:04:55 kili Exp $
Fix build against poppler-0.82.0.
Index: src/extension/internal/pdfinput/svg-builder.h
--- src/extension/internal/pdfinput/svg-builder.h.orig
+++ src/extension/internal/pdfinput/svg-builder.h
@@ -141,7 +141,7 @@ class SvgBuilder { (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, const Unicode *u, int uLen);
void beginTextObject(GfxState *state);
void endTextObject(GfxState *state);

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-src_libavoid_connector_cpp,v 1.3 2018/03/16 13:11:22 rsadowski Exp $
Index: src/libavoid/connector.cpp
--- src/libavoid/connector.cpp.orig
+++ src/libavoid/connector.cpp
@@ -694,6 +694,10 @@ bool validateBendPoint(VertInf *aInf, VertInf *bInf, V
return bendOkay;
}
+template<typename T>inline T absdiff(T a, T b)
+{
+ return a < b ? b - a : a - b;
+}
bool ConnRef::generatePath(void)
{
@@ -885,7 +889,7 @@ bool ConnRef::generatePath(void)
{
// Check for consecutive points on opposite
// corners of two touching shapes.
- COLA_ASSERT(abs((long)i->pathNext->id.objID - i->id.objID) != 2);
+ COLA_ASSERT(absdiff(i->pathNext->id.objID, i->id.objID) != 2);
}
}
}

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_libnrtype_FontFactory_cpp,v 1.2 2018/03/15 15:59:19 rsadowski Exp $
fix compile with pango >= 1.40.3
Index: src/libnrtype/FontFactory.cpp
--- src/libnrtype/FontFactory.cpp.orig
+++ src/libnrtype/FontFactory.cpp
@@ -705,7 +705,7 @@ font_instance *font_factory::Face(PangoFontDescription
if( pango_ot_info_find_script( info, PANGO_OT_TABLE_GSUB, scripts[i], &script_index )) {
PangoOTTag* languages =
- pango_ot_info_list_languages( info, PANGO_OT_TABLE_GSUB, script_index, NULL);
+ pango_ot_info_list_languages( info, PANGO_OT_TABLE_GSUB, script_index, PangoOTTag());
// if( languages[0] != 0 )
// std::cout << " languages: " << std::endl;

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
$OpenBSD: README,v 1.2 2018/09/04 12:46:14 espie Exp $
$OpenBSD: README,v 1.3 2020/05/26 04:53:26 rsadowski Exp $
+-----------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
@ -10,14 +10,3 @@ Ruby Extensions
Although there are currently no ruby extension scripts shipped with
Inkscape, users are free to write their own. If you wish to write ruby
extensions, then please install Ruby ${MODRUBY_REV}.
Icon Bug
========
Inkscape is not very resilient to missing icon sets and can crash (for
example when opening file->"document properties"). If you specify a custom
icon theme in your ~/.gtkrc-2.0, then make sure that this icon set is
actually installed.
This bug has been reported:
https://bugs.launchpad.net/inkscape/+bug/1238142