Skip to content

Commit

Permalink
Re-add Ghostscript
Browse files Browse the repository at this point in the history
This can be easily disabled if we need to produce a GPLv2+ compliant
release. In the meantime, this brings back out-of-the-box support EPS.
  • Loading branch information
dehesselle committed Jul 8, 2022
1 parent dc2e928 commit 8757bd5
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 2 deletions.
6 changes: 6 additions & 0 deletions 220-inkscape_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ lib_change_paths @loader_path/../../.. "$INK_APP_LIB_DIR" \
lib_change_paths @loader_path/.. "$INK_APP_LIB_DIR" \
"$INK_APP_LIB_DIR"/enchant-2/enchant_applespell.so

# Point Ghostscript towards INK_APP_LIB_DIR using @executable_path.
lib_change_paths \
@executable_path/../lib \
"$INK_APP_LIB_DIR" \
"$INK_APP_BIN_DIR"/gs

#------------------------------------------------------ use rpath in cache files

sed -i '' \
Expand Down
9 changes: 8 additions & 1 deletion 310-inkscape_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,11 @@ cd "$INK_BLD_DIR" || exit 1

ninja tests # build tests

ctest -V # run tests
# run tests
# exclude four tests: https://gitlab.com/inkscape/inbox/-/issues/7304
ctest -V -E "(\
export-clone-group-filtered-mp|\
export-filtered-clones-mp|\
export-grouped-mp|\
export-with-filters-multipage\
)"
10 changes: 10 additions & 0 deletions inkscape.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@
<binary>
${prefix}/lib/enchant-2/*.so
</binary>
<!-- Ghostscript (disable this for GPLv2+ compliance!) -->
<binary>
${prefix}/bin/gs
</binary>
<data>
${prefix}/share/ghostscript
</data>
<data>
${prefix}/bin/ps2pdf*
</data>
<!-- GObject Introspection -->
<binary>
${prefix}/lib/libgirepository-1.0.1.dylib
Expand Down
2 changes: 1 addition & 1 deletion jhb-custom.conf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

### variables ##################################################################

VERSION=0.65
VERSION=0.66
VER_DIR_TEMPLATE="\$WRK_DIR/mibap-\$VERSION"

RECOMMENDED_SDK_VER_X86_64=10.13
Expand Down
20 changes: 20 additions & 0 deletions modulesets/inkscape.modules
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,25 @@
</dependencies>
</autotools>

<!-- Ghostscript https://www.ghostscript.com -->
<autotools
id="ghostscript"
autogen-sh="configure"
autogenargs="--without-tesseract --without-x">
<branch
module="ArtifexSoftware/ghostpdl-downloads/releases/download/gs9561/ghostscript-9.56.1.tar.xz"
version="9.56.1"
hash="sha256:d43406805650009b42c3d5f6dc535233454533c1e27c13a77dd1d462a056b8e4"
repo="github">
<patch
file="ghostscript_configure_libtiff.patch"
strip="1"/>
<patch
file="ghostscript_link_cupsimage.patch"
strip="1"/>
</branch>
</autotools>

<!-- Google Testing and Mocking Framework https://github.com/google/googletest -->
<cmake
id="googletest">
Expand Down Expand Up @@ -276,6 +295,7 @@
<dependencies>
<dep package="bdwgc"/>
<dep package="doubleconversion"/>
<dep package="ghostscript"/>
<dep package="googletest"/>
<dep package="gspell"/>
<dep package="gsl"/>
Expand Down
11 changes: 11 additions & 0 deletions modulesets/patches/ghostscript_configure_libtiff.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/configure 2022-04-04 15:48:49.000000000 +0200
+++ b/configure 2022-07-06 01:03:53.000000000 +0200
@@ -8796,7 +8796,7 @@
if ! test -d "$LIBTIFFCONFDIR" ; then
mkdir "$LIBTIFFCONFDIR"
fi
- cd "$LIBTIFFCONFDIR" && "$absolute_source_path/$LIBTIFFDIR/configure" $GS_TIFF_CONFIGURE_OPTS --disable-jbig --disable-lzma --disable-zstd --disable-webp --disable-libdeflate $SUBCONFIG_OPTS
+ cd "$LIBTIFFCONFDIR" && "$LIBTIFFDIR/configure" $GS_TIFF_CONFIGURE_OPTS --disable-jbig --disable-lzma --disable-zstd --disable-webp --disable-libdeflate $SUBCONFIG_OPTS
status=$?
if test $status -ne 0 ; then
as_fn_error $status "libtiff configure script failed" "$LINENO" 5
11 changes: 11 additions & 0 deletions modulesets/patches/ghostscript_link_cupsimage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/base/unixlink.mak 2020-03-19 09:21:42.000000000 +0100
+++ b/base/unixlink.mak 2020-05-02 01:11:38.000000000 +0200
@@ -168,7 +168,7 @@
$(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(GS_LDFLAGS) -o $(GS_XE)
$(ECHOGS_XE) -a $(ldt_tr) -n -s $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) $(GS_DOT_O) -s
cat $(gsld_tr) >> $(ldt_tr)
- $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS)
+ $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS) -lcupsimage
if [ x$(XLIBDIR) != x ]; then LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; fi; \
XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
PSI_FEATURE_DEVS= FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \

0 comments on commit 8757bd5

Please sign in to comment.