Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 70 lines (56 sloc) 2.06 KB
#! /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