void-packages/srcpkgs/pymol/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

48 lines
1.6 KiB
Bash

# Template file for 'pymol'
pkgname=pymol
version=2.4.0
revision=2
wrksrc=${pkgname}-open-source-${version}
build_style="python3-module"
build_helper="numpy"
makedepends="msgpack-devel freetype-devel libfreeglut-devel netcdf-devel
glew-devel glm python3-devel libxml2-devel python3-PyQt5 mmtf-cpp"
depends="python3-numpy tcsh python3-pmw python3-tkinter python3-PyQt5"
short_desc="PyMOL molecular visualization system"
maintainer="Brenton Horne <brentonhorne77@gmail.com>"
license="custom:PyMOL"
homepage="https://pymol.org/"
distfiles="https://github.com/schrodinger/pymol-open-source/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz
https://c.fsdn.com/allura/p/${pkgname}/icon>${pkgname}.png"
checksum="5ede4ce2e8f53713c5ee64f5905b2d29bf01e4391da7e536ce8909d6b9116581
0ea81faaf336becc669a193777d0dca55475d303d1236b57df25cf67ff7c2bcd"
skip_extraction="${pkgname}.png"
export PREFIX_PATH="${XBPS_CROSS_BASE}/usr"
# PREFIX_PATH isn't used for the py3 include path
CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
if [ "$XBPS_TARGET_LIBC" = musl ]; then
makedepends+=" libexecinfo-devel"
fi
pre_configure() {
if [ "$XBPS_TARGET_LIBC" = musl ]; then
# execinfo is linked when building for freebsd, force it for linux with musl
vsed -e 's@sys.platform.startswith("freebsd")@True@' \
-i setup.py
fi
}
post_install() {
vlicense LICENSE
vinstall "${FILESDIR}/${pkgname}.desktop" 755 usr/share/applications
vinstall "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}.png" 644 usr/share/pixmaps
# these tests are written for python2
# LICENSE is vlicense'd
rm -r ${DESTDIR}/${py3_sitelib}/pymol/pymol_path/{test,LICENSE}
vlicense LICENSE
}