Skip to content

Commit

Permalink
Merge pull request #73 from mariux64/update-inkscape-for-poppler-update
Browse files Browse the repository at this point in the history
Update Inkscape for Poppler update
  • Loading branch information
pmenzel authored Aug 1, 2019
2 parents 7d370c5 + 008e62f commit 9fe4f38
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions inkscape-0.92.4-1.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#! /bin/sh
set -xe

PKG=inkscape
VERSION=0.92.4
GITHASH=424477f665adb9996045d92026ceecb2eeb22dbe
BUILD=1
PREFIX=/pkg/$PKG-$VERSION-$BUILD

mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi
EOF

source $PREFIX/profile

export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
mkdir -p $PREFIX/build

cd $PREFIX/build

test -e inkscape-$GITHASH.tar.bz2 || wget -O inkscape-$GITHASH.tar.bz2 https://gitlab.com/inkscape/inkscape/-/archive/$GITHASH/inkscape-$GITHASH.tar.bz2
test -d inkscape-$GITHASH || tar xf inkscape-$GITHASH.tar.bz2
cd inkscape-$GITHASH

# another problem: the CMakeLists of inkscape includes
# if(APPLE)
# SET(CMAKE_MACOSX_RPATH TRUE)
# SET(CMAKE_INSTALL_RPATH "@loader_path/../lib/inkscape")
# else()
# SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib/inkscape")
# endif()
# Thereby overwriting any RPATH we might set e.g.
# cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 -DCMAKE_INSTALL_RPATH=$PREFIX/lib .
# to find ImageMagick library.

patch -p1 <<'EOF'
From: Unpriviledged Software Builder <build@theinternet.molgen.mpg.de>
Date: Fri, 24 Feb 2017 13:02:24 +0100
Subject: [PATCH] Honor CMAKE_INSTALL_RPATH
This enables us to configure CMAKE_INSTALL_RPATH e.g. use
cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DCMAKE_INSTALL_RPATH=$PREFIX/lib .
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5d8919..e253961 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,7 @@ if(APPLE)
SET(CMAKE_MACOSX_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH "@loader_path/../lib/inkscape")
else()
- SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib/inkscape")
+ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:$ORIGIN/../lib/inkscape")
endif()
cmake_policy(SET CMP0003 NEW) # don't be prolific with library paths
--
2.4.1
EOF

cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DCMAKE_INSTALL_RPATH=$PREFIX/lib .
make -j $(nproc)
make install

0 comments on commit 9fe4f38

Please sign in to comment.