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.1.1-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
138 lines (110 sloc)
3.63 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/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.1 | |
BUILD=0 | |
DATEREV=2021-09-20_3bf5ae0d25 # 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.72.0 | |
BOOSTVERSION_USCORED=1_72_0 | |
BEEHIVE=https://beehive.molgen.mpg.de/e2b0b1eac302880461bcbef097171758/boost_1_72_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 \ | |
--prefix=$PREFIX | |
./b2 \ | |
-j $NPROC \ | |
--prefix=$PREFIX \ | |
--enable-shared \ | |
--with-filesystem \ | |
--build-type=minimal \ | |
install | |
# someday I'll find out how to set LDFLAGS in boost | |
( | |
cd $PREFIX/lib | |
for SO in *$BOOSTVERSION ; do | |
patchelf --set-rpath $PREFIX/lib $SO | |
done | |
) | |
cd .. | |
# https://inkscape.org/gallery/item/29255/inkscape-1.1.1.tar.xz | |
BEEHIVE=https://beehive.molgen.mpg.de/1852c535a1aec7ca25eca9de110330d7/inkscape-1.1.1.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 \ | |
.. | |
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 |