pymol: enable for musl, fix byte-compilation.
Replace multiple include flags with PREFIX_PATH env var. Also xlintify.
This commit is contained in:
parent
ae7ed8198e
commit
7cd71a104f
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/ov/src/ov_types.h b/ov/src/ov_types.h
|
||||||
|
index 6d2ad80..11d1589 100644
|
||||||
|
--- ov/src/ov_types.h
|
||||||
|
+++ ov/src/ov_types.h
|
||||||
|
@@ -19,6 +19,8 @@ extern "C" {
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <cstddef>
|
||||||
|
+
|
||||||
|
/* automatically detect 64-bit machines */
|
||||||
|
|
||||||
|
#ifndef OV_32_BIT
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'pymol'
|
# Template file for 'pymol'
|
||||||
pkgname=pymol
|
pkgname=pymol
|
||||||
version=2.3.0
|
version=2.3.0
|
||||||
revision=3
|
revision=4
|
||||||
wrksrc=${pkgname}-open-source-${version}
|
wrksrc=${pkgname}-open-source-${version}
|
||||||
build_style="python3-module"
|
build_style="python3-module"
|
||||||
hostmakedepends="python3"
|
hostmakedepends="python3"
|
||||||
|
@ -10,7 +10,7 @@ makedepends="msgpack-devel python3-numpy freetype-devel libfreeglut-devel glew-d
|
||||||
depends="python3-numpy tcsh python3-pmw python3-tkinter python3-PyQt5"
|
depends="python3-numpy tcsh python3-pmw python3-tkinter python3-PyQt5"
|
||||||
short_desc="PyMOL molecular visualization system"
|
short_desc="PyMOL molecular visualization system"
|
||||||
maintainer="Brenton Horne <brentonhorne77@gmail.com>"
|
maintainer="Brenton Horne <brentonhorne77@gmail.com>"
|
||||||
license="PyMOL"
|
license="custom:PyMOL"
|
||||||
homepage="https://pymol.org/"
|
homepage="https://pymol.org/"
|
||||||
distfiles="https://github.com/schrodinger/pymol-open-source/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz
|
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"
|
https://c.fsdn.com/allura/p/${pkgname}/icon>${pkgname}.png"
|
||||||
|
@ -18,16 +18,30 @@ checksum="62aa21fafd1db805c876f89466e47513809f8198395e1f00a5f5cc40d6f40ed0
|
||||||
0ea81faaf336becc669a193777d0dca55475d303d1236b57df25cf67ff7c2bcd"
|
0ea81faaf336becc669a193777d0dca55475d303d1236b57df25cf67ff7c2bcd"
|
||||||
skip_extraction="${pkgname}.png"
|
skip_extraction="${pkgname}.png"
|
||||||
|
|
||||||
case $XBPS_TARGET_MACHINE in
|
export PREFIX_PATH="${XBPS_CROSS_BASE}/usr"
|
||||||
*-musl) broken="segfaults on start";;
|
# PREFIX_PATH isn't used for the py3 include path
|
||||||
esac
|
CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
|
||||||
|
|
||||||
# TODO: make it use pkg-config, if possible
|
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
||||||
CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include/libxml2
|
makedepends+=" libexecinfo-devel"
|
||||||
-I${XBPS_CROSS_BASE}/usr/include/freetype2"
|
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() {
|
post_install() {
|
||||||
vlicense LICENSE
|
vlicense LICENSE
|
||||||
vinstall "${FILESDIR}/${pkgname}.desktop" 755 usr/share/applications
|
vinstall "${FILESDIR}/${pkgname}.desktop" 755 usr/share/applications
|
||||||
vinstall "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}.png" 644 usr/share/pixmaps
|
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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue