-
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 #191 from mariux64/inkscape-update-1.1.2
Inkscape update 1.1.2
- Loading branch information
Showing
1 changed file
with
149 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,149 @@ | ||
#! /bin/sh | ||
|
||
# COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 0.3; exec bash /dev/shm/runme-$COOKIE.sh | ||
# TESTING=1 | ||
|
||
set -xe | ||
|
||
PKG=inkscape | ||
VERSION=1.1.2 | ||
BUILD=0 | ||
DATEREV=2022-02-04_0a00cf5339 # The hex part is now called 'revision' | ||
|
||
PREFIX=/pkg/$PKG-$VERSION-$BUILD | ||
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi | ||
|
||
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin | ||
BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.$USER.build.tmp | ||
test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) | ||
mkdir -p $BUILD_TMPDIR/home | ||
export TMPDIR=$BUILD_TMPDIR | ||
export HOME=$BUILD_TMPDIR/home | ||
|
||
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 | ||
|
||
NPROC=$(( $(nproc) * 4 / 5 + 1 )) | ||
|
||
BEEHIVE=https://beehive.molgen.mpg.de/0bbd38f12656e4728e2f7c4708aec014/gdbm-1.22.tar.gz | ||
test -e gdbm-1.22.tar.gz || wget -nv $BEEHIVE | ||
test -d gdbm-1.22 || tar -xf gdbm-1.22.tar.gz | ||
cd gdbm-1.22 | ||
|
||
CFLAGS="-O2 -fPIC" ./configure \ | ||
--prefix=$PREFIX \ | ||
--enable-libgdbm-compat | ||
|
||
make -j $NPROC | ||
make install | ||
cd .. | ||
|
||
PYTHONVERSION=3.9.7 | ||
PYTHONVERMAIN=${PYTHONVERSION%.*} | ||
BEEHIVE=https://beehive.molgen.mpg.de/fddb060b483bc01850a3f412eea1d954/Python-3.9.7.tar.xz | ||
test -e Python-$PYTHONVERSION.tar.xz || wget -nv $BEEHIVE | ||
test -d Python-$PYTHONVERSION || tar -xf Python-$PYTHONVERSION.tar.xz | ||
cd Python-$PYTHONVERSION | ||
|
||
LDFLAGS="-Wl,-rpath=$PREFIX/lib" \ | ||
./configure \ | ||
--prefix=$PREFIX \ | ||
--enable-shared | ||
|
||
make -j $NPROC | ||
make install | ||
pip3 install --upgrade pip | ||
pip3 install Cython | ||
pip3 install lxml | ||
pip3 install numpy | ||
pip3 install scour | ||
pip3 install serial | ||
pip3 install pytest | ||
cd .. | ||
|
||
BOOSTVERSION=1.75.0 | ||
BOOSTVERSION_USCORED=1_75_0 | ||
PKGCFLAGS="-O2 -fPIC" | ||
|
||
BEEHIVE=https://beehive.molgen.mpg.de//38813f6feb40387dfe90160debd71251/boost_1_75_0.tar.gz | ||
test -e boost_$BOOSTVERSION_USCORED.tar.gz || wget -nv $BEEHIVE | ||
test -d boost_$BOOSTVERSION_USCORED || tar -xf boost_$BOOSTVERSION_USCORED.tar.gz | ||
cd boost_$BOOSTVERSION_USCORED | ||
|
||
sed -e "/using python/ s|;|: ${PREFIX}/include/python${PYTHONVERMAIN} ;|" \ | ||
-i bootstrap.sh | ||
|
||
./bootstrap.sh \ | ||
--with-toolset=gcc \ | ||
--with-icu \ | ||
--with-python=$PREFIX/bin/python3 \ | ||
--with-libraries=filesystem || exit 1 | ||
|
||
./b2 \ | ||
-j $NPROC \ | ||
--layout=system \ | ||
--build-dir=build-python3 \ | ||
--prefix=$PREFIX \ | ||
--libdir=$PREFIX/lib \ | ||
--build-type=minimal \ | ||
toolset=gcc \ | ||
variant=release \ | ||
debug-symbols=off \ | ||
link=shared \ | ||
threading=multi \ | ||
runtime-link=shared \ | ||
python=$PYTHONVERMAIN \ | ||
cflags="$PKGCFLAGS" \ | ||
cxxflags="$PKGCFLAGS" \ | ||
install || exit 1 | ||
|
||
cd .. | ||
|
||
#BEEHIVE=https://inkscape.org/gallery/item/31668/inkscape-1.1.2.tar.xz | ||
BEEHIVE=https://beehive.molgen.mpg.de/a486807ffdf89a1d7ce9425dd60555ec/inkscape-1.1.2.tar.xz | ||
test -e inkscape-$VERSION.tar.xz || wget -nv $BEEHIVE | ||
test -d inkscape-${VERSION}_$DATEREV || tar -xf inkscape-$VERSION.tar.xz | ||
cd inkscape-${VERSION}_$DATEREV | ||
|
||
# remove weird font-feature-settings | ||
cp -p share/ui/style.css share/ui/style.css.orig | ||
echo -e "78,80d\nw\nq" | ed share/ui/style.css | ||
|
||
mkdir -p build | ||
cd build | ||
cmake \ | ||
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | ||
-DCMAKE_VERBOSE_MAKEFILE=ON \ | ||
-DCMAKE_PREFIX_PATH=$PREFIX \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
.. | ||
|
||
make -j $NPROC | ||
make install | ||
|
||
|
||
# INKSCAPE_INSTALL_LIBDIR=lib does no longer work, now we have: | ||
# | ||
# runtime path bin/inkscape: "$ORIGIN/../lib/inkscape" | ||
# runtime path bin/inkview: "$ORIGIN/../lib/inkscape" | ||
# runtime path lib/inkscape/libinkscape_base.so: "$ORIGIN/.." | ||
# | ||
# therefore clean up the mess by hand ... | ||
|
||
cd $PREFIX | ||
mv $PREFIX/lib/inkscape/libinkscape_base.so $PREFIX/lib | ||
rmdir $PREFIX/lib/inkscape | ||
patchelf --set-rpath '$ORIGIN/../lib' bin/inkscape | ||
patchelf --set-rpath '$ORIGIN/../lib' bin/inkview | ||
patchelf --set-rpath '$ORIGIN' lib/libinkscape_base.so | ||
|
||
exit |