-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from mariux64/update-inkscape-for-poppler-update
Update Inkscape for Poppler update
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |