-
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 #311 from mariux64/add-inkscape-1.4
inkscape: add version 1.4
- Loading branch information
Showing
1 changed file
with
207 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,207 @@ | ||
#! /bin/bash | ||
|
||
# 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.4 | ||
BUILD=0 | ||
DATEREV=2024-10-09_e7c3feb100 | ||
|
||
PREFIX=/pkg/$PKG-$VERSION-$BUILD | ||
if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi | ||
|
||
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin | ||
BUILD_TMPDIR=/scratch/local2/$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.11.11 | ||
PYTHONVERMAIN=${PYTHONVERSION%.*} | ||
BEEHIVE=https://beehive.molgen.mpg.de/9a5b43fcc06810b8ae924b0a080e6569/Python-3.11.11.tgz | ||
test -e Python-$PYTHONVERSION.tgz || wget -nv $BEEHIVE | ||
test -d Python-$PYTHONVERSION || tar -xf Python-$PYTHONVERSION.tgz | ||
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 | ||
# well, numpy 2+ appeared Jun-24, boost-1.86.0 from Aug-24 still prefers 1.xy :/ | ||
pip3 install 'numpy<2' # gives numpy-1.26.4 | ||
pip3 install scour | ||
pip3 install serial | ||
pip3 install pytest | ||
|
||
pip3 install cssselect | ||
pip3 install requests | ||
pip3 install appdirs | ||
pip3 install tinycss2 | ||
|
||
# provide 'python' symlink, or boost may insist on the system python ... | ||
test -e $PREFIX/bin/python || ln -s python3 $PREFIX/bin/python | ||
|
||
cd .. | ||
|
||
( | ||
DBUS_PYTHON_VERSION=1.3.2 | ||
|
||
# https://files.pythonhosted.org/packages/c1/d3/6be85a9c772d6ebba0cc3ab37390dd6620006dcced758667e0217fb13307/dbus-python-1.3.2.tar.gz | ||
BEEHIVE=https://beehive.molgen.mpg.de/33be8a4a766e1c7c9a377b8f934ce21a/dbus-python-1.3.2.tar.gz | ||
test -e dbus-python-$DBUS_PYTHON_VERSION.tar.gz || wget -nv $BEEHIVE | ||
test -d dbus-python-$DBUS_PYTHON_VERSION || tar -xf dbus-python-$DBUS_PYTHON_VERSION.tar.gz | ||
|
||
cd dbus-python-$DBUS_PYTHON_VERSION | ||
./configure --prefix=$PREFIX | ||
|
||
make -j $NPROC | ||
make install | ||
|
||
) | ||
|
||
( | ||
PYCAIRO_VERSION=1.27.0 | ||
# https://files.pythonhosted.org/packages/07/4a/42b26390181a7517718600fa7d98b951da20be982a50cd4afb3d46c2e603/pycairo-1.27.0.tar.gz | ||
BEEHIVE=https://beehive.molgen.mpg.de/12097575a1bb683cab7dc425d9769a68/pycairo-1.27.0.tar.gz | ||
test -e pycairo-$PYCAIRO_VERSION.tar.gz || wget -nv $BEEHIVE | ||
test -d pycairo-$PYCAIRO_VERSION || tar -xf pycairo-$PYCAIRO_VERSION.tar.gz | ||
|
||
cd pycairo-$PYCAIRO_VERSION | ||
|
||
mkdir -p meson-build | ||
cd meson-build | ||
|
||
meson setup \ | ||
--prefix=$PREFIX \ | ||
--buildtype=release \ | ||
-Dpython=$PREFIX/bin/python \ | ||
-Dtests=false \ | ||
.. | ||
|
||
ninja -j $NPROC | ||
ninja install | ||
|
||
) | ||
|
||
( | ||
PYGOBJECT3_VERSION=3.50.0 | ||
|
||
# https://files.pythonhosted.org/packages/2b/58/d34e67a79631177e3c08e7d02b5165147f590171f2cae6769502af5f7f7e/pygobject-3.50.0.tar.gz | ||
BEEHIVE=https://beehive.molgen.mpg.de/a6904c6f523b9f7ca2dec63d8c24de92/pygobject-3.50.0.tar.gz | ||
|
||
test -e pygobject-$PYGOBJECT3_VERSION.tar.gz || wget -nv $BEEHIVE | ||
test -d pygobject-$PYGOBJECT3_VERSION || tar -xf pygobject-$PYGOBJECT3_VERSION.tar.gz | ||
|
||
cd pygobject-$PYGOBJECT3_VERSION | ||
|
||
mkdir -p meson-build | ||
cd meson-build | ||
meson setup \ | ||
--prefix=$PREFIX \ | ||
--buildtype=release \ | ||
-Dpython=$PREFIX/bin/python \ | ||
-Dtests=false \ | ||
.. | ||
|
||
ninja -j $NPROC | ||
ninja install | ||
|
||
) | ||
|
||
BOOSTVERSION=1.86.0 | ||
BOOSTVERSION_USCORED=${BOOSTVERSION//./_} | ||
PKGCFLAGS="-O2 -fPIC" | ||
|
||
# orig: https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.gz | ||
BEEHIVE=https://beehive.molgen.mpg.de/ac857d73bb754b718a039830b07b9624/boost_1_86_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 | ||
|
||
./bootstrap.sh \ | ||
--with-toolset=gcc \ | ||
--with-icu \ | ||
--with-python=$PREFIX/bin/python3 \ | ||
--with-libraries=filesystem,stacktrace || exit 1 | ||
|
||
./b2 \ | ||
$B2FLAGS \ | ||
--prefix=$PREFIX \ | ||
--enable-shared \ | ||
--without-mpi \ | ||
install | ||
|
||
cd .. | ||
|
||
# orig: https://media.inkscape.org/dl/resources/file/inkscape-1.4.tar.xz | ||
BEEHIVE=https://beehive.molgen.mpg.de/a93f3a8eab82ef3d610f426bfe58e3df/inkscape-1.4.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 | ||
|
||
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 -v $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 |