Permalink
Cannot retrieve contributors at this time
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?
pkg-scripts/inkscape-1.3.2-0.build.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
218 lines (169 sloc)
5.78 KB
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
#! /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.3.2 | |
BUILD=0 | |
DATEREV=2023-11-25_091e20ef0f | |
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.9.16 | |
PYTHONVERMAIN=${PYTHONVERSION%.*} | |
BEEHIVE=https://beehive.molgen.mpg.de/38c99c7313f416dcf3238f5cf444c6c2/Python-3.9.16.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 | |
pip3 install numpy | |
pip3 install scour | |
pip3 install serial | |
pip3 install pytest | |
pip3 install cssselect | |
pip3 install requests | |
pip3 install appdirs | |
# provide 'python' symlink, or boost will 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.23.0 | |
# https://files.pythonhosted.org/packages/69/ca/9e9fa2e8be0876a9bbf046a1be7ee33e61d4fdfbd1fd25c76c1bdfddf8c4/pycairo-1.23.0.tar.gz | |
BEEHIVE=https://beehive.molgen.mpg.de/7a3729d21659098e1b9a411b62e88966/pycairo-1.23.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.44.1 | |
# https://files.pythonhosted.org/packages/44/80/96d6317a15a13a4f80ffa61118dc144a70756135fbc6ace30f9b033f51f7/PyGObject-3.44.1.tar.gz | |
BEEHIVE=https://beehive.molgen.mpg.de/959259478566b24316edaa18da6e0eaa/PyGObject-3.44.1.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.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,stacktrace || 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 .. | |
# orig: https://inkscape.org/gallery/item/44615/inkscape-1.3.2.tar.xz | |
BEEHIVE=https://beehive.molgen.mpg.de/76ed1f4b13065e80de8b2d77b6427b83/inkscape-1.3.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 | |
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 |