# Template file for 'pymol'
pkgname=pymol
version=2.5.0
revision=10
build_style="python3-module"
build_helper="numpy"
hostmakedepends="python3-setuptools"
makedepends="freetype-devel glew-devel glm libfreeglut-devel libgomp-devel
 libxml2-devel mmtf-cpp msgpack-cxx netcdf-devel python3-PyQt5 python3-devel"
depends="python3-numpy tcsh python3-pmw python3-tkinter python3-PyQt5
 python3-PyQt5-opengl"
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"
checksum="aa828bf5719bd9a14510118a93182a6e0cadc03a574ba1e327e1e9780a0e80b3"

export PREFIX_PATH="${XBPS_CROSS_BASE}/usr"
# PREFIX_PATH isn't used for the py3 include path
CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"

post_install() {
	vlicense LICENSE
	vinstall "${FILESDIR}/${pkgname}.desktop" 755 usr/share/applications
	vinstall data/pymol/icons/icon2.svg 644 \
		usr/share/pixmaps pymol.svg

	# these tests are written for python2
	# LICENSE is vlicense'd
	rm -r ${DESTDIR}/${py3_sitelib}/pymol/pymol_path/{test,LICENSE}

	vlicense LICENSE
}
