-
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 #321 from mariux64/add-pymol-open-source-3.1.0-0
pymol-open-source: update to 3.1.0
- Loading branch information
Showing
1 changed file
with
143 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,143 @@ | ||
#! /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 | ||
|
||
PKG=pymol-open-source | ||
VERSION=3.1.0 | ||
BUILD=0 | ||
|
||
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 | ||
|
||
set -eu | ||
umask 022 | ||
|
||
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 ) | ||
export TMPDIR=$BUILD_TMPDIR | ||
export HOME=$BUILD_TMPDIR/home | ||
|
||
exec </dev/null | ||
|
||
mkdir -p $PREFIX | ||
cat >$PREFIX/profile <<-EOF | ||
# pymol is build with current system python-3.12.8-0, if it is phased out, source it ... | ||
PYFP='3.12.8.*Jan 6 2025, 13:15:47' | ||
python -VV | grep -q "\$PYFP" || . /pkg/python-3.12.8-0/profile | ||
PATH=$PREFIX/bin:\$PATH | ||
export LD_LIBRARY_PATH=$PREFIX/lib\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} | ||
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig\${PKG_CONFIG_PATH:+:\$PKG_CONFIG_PATH} | ||
export PKG_CONFIG_PATH | ||
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi | ||
EOF | ||
. $PREFIX/profile | ||
|
||
NPROC=$(( $(nproc) * 4 / 5 + 1 )) | ||
export MAKEFLAGS="-j $NPROC" | ||
|
||
BUILDDIR=$PREFIX/build | ||
|
||
mkdir -p $BUILDDIR | ||
cd $BUILDDIR | ||
|
||
if /bin/true ; then | ||
|
||
( | ||
|
||
# orig: https://github.com/msgpack/msgpack-c/archive/refs/tags/cpp-6.1.1.tar.gz | ||
BEEHIVE=https://beehive.molgen.mpg.de/a0398798d8b9733bd5cd87a6d2f0b05f/msgpack-c-cpp-6.1.1.tar.gz | ||
test -e msgpack-c-cpp-6.1.1.tar.gz || wget -nv $BEEHIVE | ||
test -d msgpack-c-cpp-6.1.1 || tar -xf msgpack-c-cpp-6.1.1.tar.gz | ||
cd msgpack-c-cpp-6.1.1 | ||
|
||
mkdir -p build | ||
cd build | ||
|
||
cmake \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | ||
-DCMAKE_VERBOSE_MAKEFILE=ON \ | ||
.. | ||
|
||
make -j $NPROC | ||
make install | ||
) | ||
|
||
( | ||
|
||
# orig: https://github.com/rcsb/mmtf-cpp/archive/refs/tags/v1.1.0.tar.gz | ||
BEEHIVE=https://beehive.molgen.mpg.de/ec961ff406a1636b4c5a25de7d9bd47b/mmtf-cpp-1.1.0.tar.gz | ||
|
||
test -e mmtf-cpp-1.1.0.tar.gz || wget -nv $BEEHIVE | ||
test -d mmtf-cpp-1.1.0 || tar -xf mmtf-cpp-1.1.0.tar.gz | ||
cd mmtf-cpp-1.1.0 | ||
|
||
mkdir -p build | ||
cd build | ||
|
||
cmake \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | ||
-DCMAKE_VERBOSE_MAKEFILE=ON \ | ||
-DCMAKE_PREFIX_PATH=$PREFIX \ | ||
.. | ||
|
||
make -j $NPROC | ||
make install | ||
) | ||
|
||
( | ||
|
||
# orig: https://github.com/g-truc/glm/archive/refs/tags/1.0.1.tar.gz | ||
BEEHIVE=https://beehive.molgen.mpg.de/f824ac50e16310a95279032f82cbd341/glm-1.0.1.tar.gz | ||
test -e glm-1.0.1.tar.gz || wget -nv $BEEHIVE | ||
test -d glm-1.0.1 || tar -xf glm-1.0.1.tar.gz | ||
cd glm-1.0.1 | ||
|
||
mkdir -p build | ||
cd build | ||
|
||
cmake \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | ||
-DCMAKE_VERBOSE_MAKEFILE=ON \ | ||
-DCMAKE_PREFIX_PATH=$PREFIX \ | ||
-DGLM_TEST_ENABLE=OFF \ | ||
.. | ||
|
||
make -j $NPROC | ||
mkdir -p $PREFIX/include | ||
cp -ax ../glm $PREFIX/include | ||
) | ||
|
||
fi | ||
|
||
( | ||
# orig: https://github.com/schrodinger/pymol-open-source/archive/refs/tags/v3.1.0.tar.gz | ||
BEEHIVE=https://beehive.molgen.mpg.de/459f483231e1d521824b0e74df5ba640/pymol-open-source-3.1.0.tar.gz | ||
test -e pymol-open-source-3.1.0.tar.gz || wget -nv $BEEHIVE | ||
test -d pymol-open-source-3.1.0 || tar -xf pymol-open-source-3.1.0.tar.gz | ||
cd pymol-open-source-3.1.0 | ||
|
||
# patch setup.py, great, everthing else but a hack is a waste of time ... | ||
# needed -lcurl -lhdf5_hl -lhdf5_cpp -lhdf5, hdf 5 is static, curl was forgotten ? | ||
# old: extra_link_args = ext_link_args, | ||
# new: extra_link_args = ['-lcurl', '-lhdf5_hl', '-lhdf5_cpp', '-lhdf5'] + ext_link_args, | ||
sed -i -e '/\s\s*extra_link_args/ s/= /= \["-lcurl", "-lhdf5_hl", "-lhdf5_cpp", "-lhdf5"\] + /' setup.py | ||
|
||
export PREFIX_PATH=$PREFIX | ||
export CXXFLAGS='-I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2' | ||
|
||
python setup.py build --use-msgpackc c++11 | ||
python setup.py install --prefix=$PREFIX | ||
|
||
# autsch ... | ||
sed -i -e "s|/pkg/python-3.12.8-0/lib|$PREFIX/lib|" $PREFIX/bin/pymol | ||
|
||
) | ||
|