Skip to content

Commit

Permalink
tulip: install version 5.6.3
Browse files Browse the repository at this point in the history
Tulip is a graph utility.

The former installation (5.2.1, 2018) showed problems when
realising application windows. Time for an update, also the
new version builds like charm :)
  • Loading branch information
thomas committed Oct 25, 2022
1 parent 0ae467d commit 716e6a3
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions tulip-5.6.3-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#! /bin/bash

# ------------------------------------------------------------------- Debug

# 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

# ---------------------------------------------------------------- Preamble

PKG=tulip
TULIP_VERSION=5.6.3
BUILD=0

# orig https://sourceforge.net/projects/auber/files/tulip/tulip-${TULIP_VERSION}/tulip-${TULIP_VERSION}_src.tar.gz
BEEHIVE=https://beehive.molgen.mpg.de/3587478852227ce2787dad594b4d1587/tulip-5.6.3_src.tar.gz
PYTHONINUSE=/pkg/python-3.10.8-0

PREFIX=/pkg/$PKG-$TULIP_VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$TULIP_VERSION-$BUILD; fi

mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:$PYTHONINUSE/bin:\$PATH
LD_LIBRARY_PATH=$PREFIX/lib:$PYTHONINUSE/lib\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
EOF

source $PREFIX/profile
mkdir -p $PREFIX/build
NPROC=$(( $(nproc) * 4 / 5 + 1 ))

# ------------------------------------------------------------------- Build

cd $PREFIX/build

test -e tulip-${TULIP_VERSION}_src.tar.gz || wget -nv $BEEHIVE
test -n "$PURGE" && rm -rf tulip-${TULIP_VERSION}
test -d tulip-${TULIP_VERSION} || tar -xf tulip-${TULIP_VERSION}_src.tar.gz

mkdir -p tulip-${TULIP_VERSION}/build
cd tulip-${TULIP_VERSION}/build

cmake \
-DCMAKE_PREFIX_PATH=/usr/local/qt5/lib/cmake \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DTULIP_USE_QT5=ON \
-DPYTHON_EXECUTABLE=$PYTHONINUSE/bin/python3 \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_COLOR_MAKEFILE=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON \
..

make -j $NPROC
make install

exit

# -------------------------------------------------------- This is the end.

0 comments on commit 716e6a3

Please sign in to comment.