summaryrefslogtreecommitdiff
path: root/sci-chemistry/pymol
diff options
context:
space:
mode:
Diffstat (limited to 'sci-chemistry/pymol')
-rw-r--r--sci-chemistry/pymol/Manifest1
-rw-r--r--sci-chemistry/pymol/pymol-2.5.0-r1.ebuild98
2 files changed, 99 insertions, 0 deletions
diff --git a/sci-chemistry/pymol/Manifest b/sci-chemistry/pymol/Manifest
index 5ad4d5152a40..84f6ed606d41 100644
--- a/sci-chemistry/pymol/Manifest
+++ b/sci-chemistry/pymol/Manifest
@@ -1,4 +1,5 @@
DIST pymol-1.8.4.0.png.xz 19528 BLAKE2B f3d23d4cedca3d8bb96b20646a548da4be570697e3346a11b01c5c3599b536ba4697be08472dfa8a4f6533167defc1a37a1de332931a73857319cb28fd42cd2b SHA512 40bb0d3f226476f6e047b5361956aad955232a97641474765eaa5204f0539aee3810e0266213618a45364f9f31f6eb18380b17e0c79f64065f7b62a9016caa7c
DIST pymol-2.5.0.tar.gz 10470268 BLAKE2B ad3721432001053be93afe755f531ae47348213b042e84dae33cd79580428c9ac3d00629afa0222e4081807dc80e2dd69c3963a457666b5975b6263b988d02d9 SHA512 19f21b8f735fda5314abf202d56f3c81c7251bf6ef0df73ccee534d9c08035f4ef6155ffb68e09d7717a0fb5ba7289bbfa440691bea4cec0de7199c9e858ea91
+EBUILD pymol-2.5.0-r1.ebuild 2598 BLAKE2B 09303cf04d36851473577d87508a500bd63e9d69f1e57ebefaa466a7ef7ca2bcda751d90b39e79adad2d8a4640927bd4a00bc5e9b229c5927ed922bc2a624652 SHA512 bd0e4cebf1c28a7f9d7cc57f401fa2f1d3a4d9cbaa8ca59e8ca081d76dcef67d3938702d596ab2bd44afb89ae959dcb49a79feabe8570b965774762215137c60
EBUILD pymol-2.5.0.ebuild 2551 BLAKE2B 478607dae22f4715cfc3cae170a7154dd83c6fd84c69ac1b456c85de6e767b95b99b5f333c1a41c8b43ad85189ba8cc94f8e6137d0360d87edecdc7b41c72356 SHA512 8908ac67fdc6a94cc61dcc90a3f96b450b0f2509aa59107a9f1931c89a8f448be3056e5715bc0230243f84aaae769fea15257ac6e8f759675bc41335b9f72eec
MISC metadata.xml 440 BLAKE2B ee3a427d21cd25ce455b61c40767eec9ded9718fa835f545b0849e24451d2004a149bd25df36e59c94d53f3fc27b3d747ac051f82db6aec593645e54a335d884 SHA512 848b215441a66d3ebcda4c06733dc6ce879b738e5210f9e20d309d2aed11f1dd6f2d267e0a4ecb702b43dc5cc9925cb026aff2a16ded4b35dce7c38607438417
diff --git a/sci-chemistry/pymol/pymol-2.5.0-r1.ebuild b/sci-chemistry/pymol/pymol-2.5.0-r1.ebuild
new file mode 100644
index 000000000000..cf2591c61323
--- /dev/null
+++ b/sci-chemistry/pymol/pymol-2.5.0-r1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_USE_SETUPTOOLS=no
+
+inherit desktop flag-o-matic xdg distutils-r1
+
+DESCRIPTION="A Python-extensible molecular graphics system"
+HOMEPAGE="https://www.pymol.org/"
+SRC_URI="
+ https://dev.gentoo.org/~pacho/${PN}/${PN}-1.8.4.0.png.xz
+ https://github.com/schrodinger/pymol-open-source/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ "
+LICENSE="BitstreamVera BSD freedist HPND OFL public-domain UoI-NCSA" #844991
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="+netcdf web"
+
+DEPEND="
+ dev-libs/msgpack[cxx]
+ dev-libs/mmtf-cpp
+ dev-python/pyopengl[${PYTHON_USEDEP}]
+ dev-python/PyQt5[opengl,${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pmw[${PYTHON_USEDEP}]
+ media-libs/freetype:2
+ media-libs/glew:0=
+ media-libs/glm
+ media-libs/libpng:0=
+ media-video/mpeg-tools
+ sys-libs/zlib
+ netcdf? ( sci-libs/netcdf:0= )
+"
+RDEPEND="${DEPEND}
+ sci-chemistry/chemical-mime-data
+"
+
+S="${WORKDIR}"/${PN}-open-source-${PV}
+
+python_prepare_all() {
+ sed \
+ -e "s:\"/usr:\"${EPREFIX}/usr:g" \
+ -e "/ext_comp_args.*+=/s:\[.*\]$:\[\]:g" \
+ -i setup.py || die
+
+ sed \
+ -e "s:/opt/local:${EPREFIX}/usr:g" \
+ -e '/ext_comp_args/s:\[.*\]:[]:g' \
+ -i setup.py || die
+ sed \
+ -e "s:\['msgpackc'\]:\['msgpack'\]:g" \
+ -i setup.py || die
+
+ append-cxxflags -std=c++0x
+
+ use !netcdf && mydistutilsargs=( --no-vmd-plugins )
+
+ distutils-r1_python_prepare_all
+}
+
+python_install() {
+ distutils-r1_python_install \
+ --pymol-path="${EPREFIX}/usr/share/pymol"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ sed \
+ -e '1i#!/usr/bin/env python' \
+ "${D}/$(python_get_sitedir)"/pymol/__init__.py > "${T}"/${PN} || die
+
+ python_foreach_impl python_doscript "${T}"/${PN}
+
+ # These environment variables should not go in the wrapper script, or else
+ # it will be impossible to use the PyMOL libraries from Python.
+ cat >> "${T}"/20pymol <<- EOF || die
+ PYMOL_PATH="${EPREFIX}/usr/share/pymol"
+ PYMOL_DATA="${EPREFIX}/usr/share/pymol/data"
+ PYMOL_SCRIPTS="${EPREFIX}/usr/share/pymol/scripts"
+ EOF
+
+ doenvd "${T}"/20pymol
+
+ newicon "${WORKDIR}"/${PN}-1.8.4.0.png ${PN}.png
+ make_desktop_entry "${PN} %u" PyMol ${PN} \
+ "Graphics;Education;Science;Chemistry;" \
+ "MimeType=chemical/x-pdb;chemical/x-mdl-molfile;chemical/x-mol2;chemical/seq-aa-fasta;chemical/seq-na-fasta;chemical/x-xyz;chemical/x-mdl-sdf;"
+
+ if ! use web; then
+ rm -rf "${D}/$(python_get_sitedir)/web" || die
+ fi
+
+ rm -f "${ED}"/usr/share/${PN}/LICENSE || die
+}