From c5a400efc40a247e00824763238c4d139b81f267 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 24 Jan 2022 22:58:28 -0500 Subject: [PATCH] Inkscape: add recipe (disabled, needs hacks to start without crashing.) --- media-gfx/inkscape/inkscape-1.1.1.recipe | 87 +++++++++++++++++ .../inkscape/patches/inkscape-1.1.1.patchset | 94 +++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 media-gfx/inkscape/inkscape-1.1.1.recipe create mode 100644 media-gfx/inkscape/patches/inkscape-1.1.1.patchset diff --git a/media-gfx/inkscape/inkscape-1.1.1.recipe b/media-gfx/inkscape/inkscape-1.1.1.recipe new file mode 100644 index 000000000..d6fe4cc5f --- /dev/null +++ b/media-gfx/inkscape/inkscape-1.1.1.recipe @@ -0,0 +1,87 @@ +SUMMARY="A free & open source vector graphics editor" +DESCRIPTION="Inkscape is a Free and open source vector graphics editor. It offers a rich set \ +of features and is widely used for both artistic and technical illustrations \ +such as cartoons, clip art, logos, typography, diagramming and flowcharting. \ +It uses vector graphics to allow for sharp printouts and renderings at \ +unlimited resolution and is not bound to a fixed number of pixels like raster \ +graphics. Inkscape uses the standardized SVG file format as its main format, \ +which is supported by many other applications including web browsers." +HOMEPAGE="https://inkscape.org/" +COPYRIGHT="2021 Inkscape Developers" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://inkscape.org/gallery/item/29255/inkscape-$portVersion.tar.xz" +CHECKSUM_SHA256="aeca0b9d33b5b1cfa9aa70433bdee6a8c3d020ffafc2e6f0c9a60eed7a7978af" +SOURCE_DIR="inkscape-1.1.1_2021-09-20_3bf5ae0d25" +PATCHES="inkscape-$portVersion.patchset" + +# disabled: crashes on startup for various reasons +ARCHITECTURES="?all !x86_gcc2" +SECONDARY_ARCHITECTURES="?x86" + +PROVIDES=" + inkscape$secondaryArchSuffix = $portVersion + app:inkscape$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + boehm_gc$secondaryArchSuffix + lib:libgtkmm_3.0$secondaryArchSuffix + lib:libboost_filesystem$secondaryArchSuffix + lib:liblcms2$secondaryArchSuffix + lib:libfontconfig$secondaryArchSuffix + lib:libpango_1.0$secondaryArchSuffix + lib:libsoup_2.4$secondaryArchSuffix + lib:libgsl$secondaryArchSuffix + lib:libdouble_conversion$secondaryArchSuffix + lib:libpotrace$secondaryArchSuffix + lib:libxslt$secondaryArchSuffix + + # so gdk-pixbuf can load SVG icons + librsvg$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + boehm_gc${secondaryArchSuffix}_devel + devel:libgtkmm_3.0$secondaryArchSuffix + devel:libboost_filesystem$secondaryArchSuffix + devel:liblcms2$secondaryArchSuffix + devel:libfontconfig$secondaryArchSuffix + devel:libpango_1.0$secondaryArchSuffix + devel:libsoup_2.4$secondaryArchSuffix + devel:libgsl$secondaryArchSuffix + devel:libdouble_conversion$secondaryArchSuffix + devel:libpotrace$secondaryArchSuffix + devel:libxslt$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:g++$secondaryArchSuffix + cmd:ninja + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + LDFLAGS="-Wl,--as-needed" \ + cmake . -GNinja -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$appsDir/Inkscape + + # otherwise it runs out of memory, unfortunately + ninja -j1 +} + +INSTALL() +{ + ninja install + + mv $appsDir/Inkscape/bin/inkscape $appsDir/Inkscape/Inkscape + mv $appsDir/Inkscape/bin/inkview $appsDir/Inkscape/inkview + mv $appsDir/Inkscape/lib/inkscape/* $appsDir/Inkscape/lib/ + rm -rf $appsDir/Inkscape/lib/inkscape + rm -rf $appsDir/Inkscape/lib/cmake + rm -rf $appsDir/Inkscape/include + + addAppDeskbarSymlink $appsDir/Inkscape/Inkscape +} diff --git a/media-gfx/inkscape/patches/inkscape-1.1.1.patchset b/media-gfx/inkscape/patches/inkscape-1.1.1.patchset new file mode 100644 index 000000000..7b2f7edd6 --- /dev/null +++ b/media-gfx/inkscape/patches/inkscape-1.1.1.patchset @@ -0,0 +1,94 @@ +From 97a13d23c93f83f32f734505dcd46e6ffe9d85de Mon Sep 17 00:00:00 2001 +From: Augustin Cavalier +Date: Mon, 24 Jan 2022 17:27:43 -0500 +Subject: Fix build without Poppler. + + +diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake +index 4d77e4d..c1e33a5 100644 +--- a/CMakeScripts/DefineDependsandFlags.cmake ++++ b/CMakeScripts/DefineDependsandFlags.cmake +@@ -179,9 +179,11 @@ else() + set(ENABLE_POPPLER_CAIRO OFF) + endif() + +-list(APPEND INKSCAPE_INCS_SYS ${POPPLER_INCLUDE_DIRS}) +-list(APPEND INKSCAPE_LIBS ${POPPLER_LIBRARIES}) +-add_definitions(${POPPLER_DEFINITIONS}) ++if(ENABLE_POPPLER_CAIRO) ++ list(APPEND INKSCAPE_INCS_SYS ${POPPLER_INCLUDE_DIRS}) ++ list(APPEND INKSCAPE_LIBS ${POPPLER_LIBRARIES}) ++ add_definitions(${POPPLER_DEFINITIONS}) ++endif() + + if(WITH_LIBWPG) + pkg_check_modules(LIBWPG libwpg-0.3 librevenge-0.0 librevenge-stream-0.0) +-- +2.30.2 + + +From 1c0fee9ec8c13b4f04fbace825a538a81d00f338 Mon Sep 17 00:00:00 2001 +From: Augustin Cavalier +Date: Mon, 24 Jan 2022 20:07:10 -0500 +Subject: tracedialog: Fix build under Haiku. + + +diff --git a/src/ui/dialog/tracedialog.cpp b/src/ui/dialog/tracedialog.cpp +index 869510d..05f446d 100644 +--- a/src/ui/dialog/tracedialog.cpp ++++ b/src/ui/dialog/tracedialog.cpp +@@ -33,6 +33,10 @@ + #include "trace/potrace/inkscape-potrace.h" + #include "trace/depixelize/inkscape-depixelize.h" + ++#ifdef __HAIKU__ ++#undef B_OK ++#endif ++ + // This maps the column ids in the glade file to useful enums + static const std::map trace_types = { + {"SS_BC", Inkscape::Trace::Potrace::TRACE_BRIGHTNESS}, +-- +2.30.2 + + +From 98493bef0d5329b8610fb7f704090a57b5ee8a0d Mon Sep 17 00:00:00 2001 +From: Augustin Cavalier +Date: Mon, 24 Jan 2022 21:57:22 -0500 +Subject: Another no-Poppler fix. + + +diff --git a/src/inkscape-version-info.cpp b/src/inkscape-version-info.cpp +index e02a575..d460ac1 100644 +--- a/src/inkscape-version-info.cpp ++++ b/src/inkscape-version-info.cpp +@@ -21,7 +21,9 @@ + #include + #include + #include ++#if 0 + #include ++#endif + + #include "inkscape-version.h" // Inkscape version + +@@ -91,7 +93,9 @@ std::string debug_info() { + ss << " Cairo version: " << cairo_version_string() << std::endl; + ss << " Pango version: " << pango_version_string() << std::endl; + ss << " HarfBuzz version: " << hb_version_string() << std::endl; ++#if 0 + ss << " Poppler version: " << POPPLER_VERSION << std::endl; ++#endif + ss << std::endl; + ss << " OS version: " << os_version(); + +@@ -110,4 +114,4 @@ std::string debug_info() { + fill-column:99 + End: + */ +-// vim:filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99: +\ No newline at end of file ++// vim:filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99: +-- +2.30.2 +