add adxv, imagemagick, and pymol-open-source
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# ImageMagick
|
||||
|
||||
ImageMagick 7 image manipulation toolkit: `magick`, `convert`,
|
||||
`identify`, `mogrify`, `montage`, ... plus the MagickCore / MagickWand /
|
||||
Magick++ libraries.
|
||||
|
||||
- Upstream: https://imagemagick.org/ (source: https://github.com/ImageMagick/ImageMagick)
|
||||
- License: ImageMagick License (Apache-2.0 derived)
|
||||
|
||||
## How it is built
|
||||
|
||||
Standard autotools from the sha-pinned GitHub tag tarball; the default
|
||||
modbuild hooks do `./configure --prefix=$PREFIX && make && make install`.
|
||||
Built with the gcc/12.3.0 module (also a runtime dep — Magick++ needs
|
||||
its libstdc++ on RHEL8). Version keys are the full upstream tag
|
||||
(`7.1.2-30`), which the download URL uses as `${V}`.
|
||||
|
||||
Image-format delegates (PNG, JPEG, TIFF, ...) auto-enable from the
|
||||
`-devel` RPMs present on the build host. If a needed format is missing,
|
||||
install the RPM (e.g. `libpng-devel libjpeg-turbo-devel libtiff-devel`)
|
||||
and rebuild.
|
||||
|
||||
## Building on Ra
|
||||
|
||||
```sh
|
||||
module use unstable && module load modbuild/2.1.3
|
||||
cd ImageMagick
|
||||
modbuild build \
|
||||
--tmpdir=/das/work/p21/p21515/.cache/Pmodules \
|
||||
--distdir=/das/work/p21/p21515/.cache/Pmodules \
|
||||
7.1.2-30
|
||||
module use MX unstable && module load ImageMagick/7.1.2-30
|
||||
```
|
||||
|
||||
## Verifying the install
|
||||
|
||||
```sh
|
||||
which magick # -> /opt/psi/MX/ImageMagick/7.1.2-30/bin/magick
|
||||
magick -version # version + enabled features
|
||||
magick -list format | head # delegates that got enabled
|
||||
magick rose: /tmp/rose.png # end-to-end: writes a PNG (needs libpng delegate)
|
||||
```
|
||||
|
||||
## Adding a new version
|
||||
|
||||
Pick the tag from https://github.com/ImageMagick/ImageMagick/tags, add
|
||||
version + tarball sha256 in `files/config.yaml` (`sha256sum` the
|
||||
downloaded tag tarball), then build as above.
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env modbuild
|
||||
|
||||
# Plain autotools build: default hooks run ./configure --prefix=$PREFIX,
|
||||
# make -j, make install. Delegates (png/jpeg/tiff/...) auto-enable from
|
||||
# whatever -devel RPMs exist on the build host; `magick -list format`
|
||||
# shows what got in.
|
||||
|
||||
pbuild::post_install() {
|
||||
# modbuild has no errexit in hooks - without this a failed make still installs the modulefile
|
||||
[[ -x "$PREFIX/bin/magick" ]] || std::die 42 "magick binary missing - configure/make failed above"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
format: 1
|
||||
ImageMagick:
|
||||
defaults:
|
||||
group: MX
|
||||
overlay: base
|
||||
relstage: unstable
|
||||
urls:
|
||||
# tag is the full version incl. patch release, e.g. 7.1.2-30 -> ${V}
|
||||
- url: https://github.com/ImageMagick/ImageMagick/archive/refs/tags/${V}.tar.gz
|
||||
name: ImageMagick-${V}.tar.gz
|
||||
strip_dirs: 1
|
||||
shasums:
|
||||
ImageMagick-7.1.2-30.tar.gz: 3034a64f22398e15ee3dd1e6b1aa83d838cfc47df1bb246ae0eca9590e6ace72
|
||||
versions:
|
||||
7.1.2-30:
|
||||
config:
|
||||
relstage: unstable
|
||||
# gcc also at runtime: Magick++ links gcc-12 libstdc++, newer than RHEL8 system one
|
||||
build_requires: [gcc/12.3.0]
|
||||
runtime_deps: [gcc/12.3.0]
|
||||
@@ -0,0 +1,18 @@
|
||||
#%Module1.0
|
||||
|
||||
module-whatis "ImageMagick - create, edit and convert bitmap images (magick, convert, ...)"
|
||||
module-url "https://imagemagick.org/"
|
||||
module-license "ImageMagick License (Apache-2.0 derived)"
|
||||
module-maintainer "MX Data <jiaxin.duan@psi.ch>"
|
||||
|
||||
module-help "
|
||||
ImageMagick 7 command-line tools (magick, convert, mogrify, identify,
|
||||
montage, ...) plus MagickCore/MagickWand/Magick++ libraries and
|
||||
pkg-config files. Enabled image formats depend on the -devel RPMs
|
||||
present at build time: check with `magick -list format`.
|
||||
"
|
||||
|
||||
prepend-path PATH $PREFIX/bin
|
||||
prepend-path LD_LIBRARY_PATH $PREFIX/lib
|
||||
prepend-path PKG_CONFIG_PATH $PREFIX/lib/pkgconfig
|
||||
prepend-path MANPATH $PREFIX/share/man
|
||||
@@ -0,0 +1,41 @@
|
||||
# adxv
|
||||
|
||||
Adxv — display and analyze X-ray diffraction images (ADSC, MarCCD, CBF,
|
||||
XDS `.pck`, EDF, NumPy, HDF5, TIFF, raw ...). X11/Motif GUI.
|
||||
|
||||
- Upstream: https://adxv.scripps.edu/ (manual: https://adxv.scripps.edu/adxv/AdxvUserManual.pdf)
|
||||
- License: free for everyone, no registration/fee; binary-only, no source
|
||||
|
||||
## How it is built
|
||||
|
||||
No build: the recipe downloads the prebuilt, sha-pinned
|
||||
`adxv.x86_64CentOS7` binary (CentOS7 build runs fine on RHEL8) and
|
||||
installs it as `$PREFIX/bin/adxv`. Runtime needs system X11 + Motif
|
||||
(`motif` RPM, libXm) on the execution host and an X server.
|
||||
|
||||
## Building on Ra
|
||||
|
||||
```sh
|
||||
module use unstable && module load modbuild/2.1.3
|
||||
cd adxv
|
||||
modbuild build \
|
||||
--tmpdir=/das/work/p21/p21515/.cache/Pmodules \
|
||||
--distdir=/das/work/p21/p21515/.cache/Pmodules \
|
||||
1.9.15
|
||||
module use MX unstable && module load adxv/1.9.15
|
||||
```
|
||||
|
||||
## Verifying the install
|
||||
|
||||
```sh
|
||||
which adxv # -> /opt/psi/MX/adxv/1.9.15/bin/adxv
|
||||
ldd $(which adxv) # no "not found" lines (libXm etc. resolve)
|
||||
adxv -help # usage text; GUI itself needs X
|
||||
```
|
||||
|
||||
## Adding a new version
|
||||
|
||||
Check the download section on https://adxv.scripps.edu/adxv.html for the
|
||||
new `adxv_<ver>/adxv.x86_64CentOS7` path, add version + binary sha256 in
|
||||
`files/config.yaml` (`sha256sum` the downloaded binary), then build as
|
||||
above.
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env modbuild
|
||||
|
||||
# Prebuilt single binary from adxv.scripps.edu (CentOS7 build, runs on RHEL8;
|
||||
# needs system Motif/X11 libs at runtime). Default pbuild::prep downloads +
|
||||
# sha-verifies + copies it into SRC_DIR (unpacker: none).
|
||||
|
||||
pbuild::configure() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::compile() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::install() {
|
||||
mkdir -p "$PREFIX/bin"
|
||||
install -m 755 "$SRC_DIR/adxv-${V_PKG}.x86_64CentOS7" "$PREFIX/bin/adxv" || \
|
||||
std::die 42 "adxv binary missing from SRC_DIR - download failed?"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
format: 1
|
||||
adxv:
|
||||
defaults:
|
||||
group: MX
|
||||
overlay: base
|
||||
relstage: unstable
|
||||
urls:
|
||||
# single prebuilt binary, no unpack; version-tagged name so the
|
||||
# distfiles cache keeps one per release
|
||||
- url: https://adxv.scripps.edu/adxv/adxv_${V_PKG}/adxv.x86_64CentOS7
|
||||
name: adxv-${V_PKG}.x86_64CentOS7
|
||||
unpacker: none
|
||||
shasums:
|
||||
adxv-1.9.15.x86_64CentOS7: 4df30c2ddb579ae3aa9d99895c74fd6ab332c3a290fb32bb9e8271a5d578e461
|
||||
versions:
|
||||
1.9.15:
|
||||
config:
|
||||
relstage: unstable
|
||||
@@ -0,0 +1,15 @@
|
||||
#%Module1.0
|
||||
|
||||
module-whatis "Adxv - display and analyze X-ray diffraction images"
|
||||
module-url "https://adxv.scripps.edu/"
|
||||
module-license "Free for everyone, no registration or fee (binary-only)"
|
||||
module-maintainer "MX Data <jiaxin.duan@psi.ch>"
|
||||
|
||||
module-help "
|
||||
Adxv displays 2-D area detector data (ADSC, MarCCD, CBF, XDS .pck,
|
||||
EDF, NumPy, HDF5, TIFF, raw, ...) as cross section, image or 3-D
|
||||
surface. X11/Motif app: needs an X server, and system Motif libs
|
||||
on the execution host.
|
||||
"
|
||||
|
||||
prepend-path PATH $PREFIX/bin
|
||||
@@ -0,0 +1,57 @@
|
||||
# pymol-open-source
|
||||
|
||||
Open-Source PyMOL, compiled from the GitHub source. Free for everyone,
|
||||
no license file — unlike the `pymol` module (Schrodinger incentive
|
||||
bundle).
|
||||
|
||||
- Upstream: https://github.com/schrodinger/pymol-open-source
|
||||
- License: Open-Source PyMOL license (BSD-like)
|
||||
|
||||
## How it is built
|
||||
|
||||
uv route (careless-style): uv fetches a standalone Python 3.12 into
|
||||
`$PREFIX/python`, creates `$PREFIX/venv`, then `uv pip install` compiles
|
||||
the sha-pinned source tarball into it with the gcc/12.3.0 module
|
||||
(`CC=gcc CXX=g++`; gcc is also a runtime dep for its libstdc++). glm
|
||||
(header-only) is fetched as a second pinned tarball and staged via
|
||||
`PREFIX_PATH`. PyQt5 is pip-installed for the GUI.
|
||||
|
||||
Build options passed as `uv pip install -C k=v` (upstream
|
||||
`_custom_build/backend.py` turns them into `build_ext --k=v`):
|
||||
|
||||
- `use-msgpackc=no` — no msgpack-c/mmtf-cpp on Ra; disables fast MMTF load
|
||||
- `no-libxml=yes` — disables COLLADA export
|
||||
- `no-vmd-plugins=no` — disables VMD molfile plugins (needs libnetcdf).
|
||||
`no` is correct: upstream stores the value straight into `vmd_plugins`.
|
||||
|
||||
Required system RPMs on the build host (if the compile fails, ask
|
||||
sysadmins for): `glew-devel libpng-devel freetype-devel mesa-libGL-devel`.
|
||||
|
||||
`uv` must be on the build host (default `~/.local/bin/uv`, override with
|
||||
`UV=/path/to/uv`).
|
||||
|
||||
## Building on Ra
|
||||
|
||||
```sh
|
||||
module use unstable && module load modbuild/2.1.3
|
||||
cd pymol-open-source
|
||||
modbuild build \
|
||||
--tmpdir=/das/work/p21/p21515/.cache/Pmodules \
|
||||
--distdir=/das/work/p21/p21515/.cache/Pmodules \
|
||||
3.1.0
|
||||
module use MX unstable && module load pymol-open-source/3.1.0
|
||||
```
|
||||
|
||||
## Verifying the install
|
||||
|
||||
```sh
|
||||
which pymol # -> .../pymol-open-source/3.1.0/venv/bin/pymol
|
||||
readlink -f "$PYMOL_ENV/bin/python" # must resolve inside the module PREFIX
|
||||
pymol -cq # headless no-op: exits 0 without X
|
||||
pymol # Qt GUI check, needs X
|
||||
```
|
||||
|
||||
## Adding a new version
|
||||
|
||||
Add the version + tarball sha256 in `files/config.yaml`
|
||||
(`sha256sum` the downloaded `v<ver>.tar.gz`), then build as above.
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env modbuild
|
||||
|
||||
# Open-source PyMOL, compiled from the GitHub source tarball into a uv venv
|
||||
# (careless-style uv route; conda unreachable from Ra). Default pbuild::prep
|
||||
# downloads + sha-verifies + unpacks both urls from files/config.yaml.
|
||||
# GLEW/libpng/freetype/GL headers must exist as system RPMs on the build host;
|
||||
# msgpack/MMTF, libxml2 (COLLADA) and VMD plugins (libnetcdf) are disabled
|
||||
# because those libs are not on Ra.
|
||||
|
||||
pbuild::configure() {
|
||||
# modbuild's shell strips ~/.local/bin from PATH; override with UV=/path/to/uv if needed
|
||||
UV="${UV:-$HOME/.local/bin/uv}"
|
||||
# ~/.cache/uv hits the home disk quota; shared cache reuses wheels across MX builds
|
||||
export UV_CACHE_DIR="/opt/psi/MX/.uv-cache"
|
||||
# keep the standalone CPython inside PREFIX so venv symlinks never point at a home cache
|
||||
export UV_PYTHON_INSTALL_DIR="$PREFIX/python"
|
||||
"$UV" venv --python 3.12 "$PREFIX/venv" || std::die 42 "uv venv failed - is uv at \$UV?"
|
||||
|
||||
# stage glm where setup.py's PREFIX_PATH lookup expects it: <prefix>/include/glm
|
||||
mkdir -p "$SRC_DIR/deps/include"
|
||||
cp -r "$SRC_DIR/glm-1.0.1/glm" "$SRC_DIR/deps/include/" || \
|
||||
std::die 42 "glm staging failed - glm tarball missing from SRC_DIR?"
|
||||
}
|
||||
|
||||
pbuild::compile() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::install() {
|
||||
UV="${UV:-$HOME/.local/bin/uv}"
|
||||
export UV_CACHE_DIR="/opt/psi/MX/.uv-cache"
|
||||
# force the gcc module's compilers; uv's standalone CPython records clang in sysconfig
|
||||
export CC=gcc CXX=g++
|
||||
export PREFIX_PATH="$SRC_DIR/deps"
|
||||
# -C k=v reaches setup.py as `build_ext --k=v` (_custom_build/backend.py).
|
||||
# no-vmd-plugins=no is deliberate: upstream dest is vmd_plugins, so `no` disables them.
|
||||
"$UV" pip install --python "$PREFIX/venv/bin/python" \
|
||||
-C use-msgpackc=no -C no-libxml=yes -C no-vmd-plugins=no \
|
||||
"$SRC_DIR" || \
|
||||
std::die 42 "pymol build failed - check system devel RPMs (glew, libpng, freetype, mesa-libGL)"
|
||||
# Qt GUI; without it pymol falls back to CLI-only
|
||||
"$UV" pip install --python "$PREFIX/venv/bin/python" PyQt5 || \
|
||||
std::die 42 "PyQt5 install failed"
|
||||
[[ -x "$PREFIX/venv/bin/pymol" ]] || std::die 42 "pymol launcher missing from venv"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
format: 1
|
||||
pymol-open-source:
|
||||
defaults:
|
||||
group: MX
|
||||
overlay: base
|
||||
relstage: unstable
|
||||
urls:
|
||||
- url: https://github.com/schrodinger/pymol-open-source/archive/refs/tags/v${V_PKG}.tar.gz
|
||||
name: pymol-open-source-${V_PKG}.tar.gz
|
||||
strip_dirs: 1
|
||||
# glm is header-only and not packaged on Ra; staged into PREFIX_PATH by
|
||||
# pbuild::configure. Pinned, version-independent of pymol.
|
||||
- url: https://github.com/g-truc/glm/archive/refs/tags/1.0.1.tar.gz
|
||||
name: glm-1.0.1.tar.gz
|
||||
shasums:
|
||||
pymol-open-source-3.1.0.tar.gz: 54306d65060bd58ed8b3dab1a8af521aeb4fd417871f15f463ff05ccb4e121fe
|
||||
glm-1.0.1.tar.gz: 9f3174561fd26904b23f0db5e560971cbf9b3cbda0b280f04d5c379d03bf234c
|
||||
versions:
|
||||
3.1.0:
|
||||
config:
|
||||
relstage: unstable
|
||||
# gcc also at runtime: the compiled _cmd extension needs gcc-12 libstdc++,
|
||||
# newer than the RHEL8 system one
|
||||
build_requires: [gcc/12.3.0]
|
||||
runtime_deps: [gcc/12.3.0]
|
||||
@@ -0,0 +1,16 @@
|
||||
#%Module1.0
|
||||
|
||||
module-whatis "PyMOL (open-source build) - molecular visualization system"
|
||||
module-url "https://github.com/schrodinger/pymol-open-source"
|
||||
module-license "Open-Source PyMOL license (BSD-like), free for everyone"
|
||||
module-maintainer "MX Data <jiaxin.duan@psi.ch>"
|
||||
|
||||
module-help "
|
||||
Open-Source PyMOL, compiled from source into a private Python venv
|
||||
with the PyQt5 GUI. No license file needed (unlike the pymol
|
||||
incentive module). MMTF fast load, COLLADA export and VMD plugins
|
||||
are disabled in this build.
|
||||
"
|
||||
|
||||
setenv PYMOL_ENV $PREFIX/venv
|
||||
prepend-path PATH $PREFIX/venv/bin
|
||||
Reference in New Issue
Block a user