Gentoo Archives: gentoo-commits

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/pymol/
Date: Sun, 16 May 2021 20:41:26
Message-Id: 1621197675.428de16e86460563d0e465331e301cc0dedf91ac.alexxy@gentoo
1 commit: 428de16e86460563d0e465331e301cc0dedf91ac
2 Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 16 20:41:00 2021 +0000
4 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
5 CommitDate: Sun May 16 20:41:15 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=428de16e
7
8 sci-chemistry/pymol: Version bump
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
12
13 sci-chemistry/pymol/Manifest | 1 +
14 sci-chemistry/pymol/pymol-2.5.0.ebuild | 111 +++++++++++++++++++++++++++++++++
15 2 files changed, 112 insertions(+)
16
17 diff --git a/sci-chemistry/pymol/Manifest b/sci-chemistry/pymol/Manifest
18 index cfd2bae6b9a..dec8f0b1525 100644
19 --- a/sci-chemistry/pymol/Manifest
20 +++ b/sci-chemistry/pymol/Manifest
21 @@ -1,2 +1,3 @@
22 DIST pymol-1.8.4.0.png.xz 19528 BLAKE2B f3d23d4cedca3d8bb96b20646a548da4be570697e3346a11b01c5c3599b536ba4697be08472dfa8a4f6533167defc1a37a1de332931a73857319cb28fd42cd2b SHA512 40bb0d3f226476f6e047b5361956aad955232a97641474765eaa5204f0539aee3810e0266213618a45364f9f31f6eb18380b17e0c79f64065f7b62a9016caa7c
23 DIST pymol-2.4.0.tar.gz 10552539 BLAKE2B 34e31dce99c1e838b00389c3d7c29657534dd037349769bd6c8cb17028cfaaa856d5729760d3768fd43f61086cac30749a864fb4156c14eda07f9027430f0523 SHA512 2b19294197d58a808bf7bb7fa9f829c2ec582ba47a4380783a2b1eedda2ce4118cd398e01885db8c449e7fd5e4c08a1c40508e679ef42d8e183a6a52b031c02a
24 +DIST pymol-2.5.0.tar.gz 10470268 BLAKE2B ad3721432001053be93afe755f531ae47348213b042e84dae33cd79580428c9ac3d00629afa0222e4081807dc80e2dd69c3963a457666b5975b6263b988d02d9 SHA512 19f21b8f735fda5314abf202d56f3c81c7251bf6ef0df73ccee534d9c08035f4ef6155ffb68e09d7717a0fb5ba7289bbfa440691bea4cec0de7199c9e858ea91
25
26 diff --git a/sci-chemistry/pymol/pymol-2.5.0.ebuild b/sci-chemistry/pymol/pymol-2.5.0.ebuild
27 new file mode 100644
28 index 00000000000..6d7ecd4e09c
29 --- /dev/null
30 +++ b/sci-chemistry/pymol/pymol-2.5.0.ebuild
31 @@ -0,0 +1,111 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{7..9} )
38 +DISTUTILS_USE_SETUPTOOLS=no
39 +
40 +inherit desktop optfeature flag-o-matic xdg distutils-r1
41 +
42 +DESCRIPTION="A Python-extensible molecular graphics system"
43 +HOMEPAGE="https://www.pymol.org/"
44 +SRC_URI="
45 + https://dev.gentoo.org/~pacho/${PN}/${PN}-1.8.4.0.png.xz
46 + https://github.com/schrodinger/pymol-open-source/archive/v${PV}.tar.gz -> ${P}.tar.gz
47 + "
48 +RESTRICT="mirror"
49 +LICENSE="PSF-2.2"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
52 +IUSE="+netcdf web"
53 +
54 +DEPEND="
55 + dev-libs/msgpack[cxx]
56 + dev-libs/mmtf-cpp
57 + dev-python/pyopengl[${PYTHON_USEDEP}]
58 + dev-python/PyQt5[opengl,${PYTHON_USEDEP}]
59 + dev-python/numpy[${PYTHON_USEDEP}]
60 + dev-python/pmw[${PYTHON_USEDEP}]
61 + media-libs/freetype:2
62 + media-libs/glew:0=
63 + media-libs/glm
64 + media-libs/libpng:0=
65 + media-video/mpeg-tools
66 + sys-libs/zlib
67 + netcdf? ( sci-libs/netcdf:0= )
68 +"
69 +RDEPEND="${DEPEND}
70 + sci-chemistry/chemical-mime-data
71 +"
72 +
73 +S="${WORKDIR}"/${PN}-open-source-${PV}
74 +
75 +python_prepare_all() {
76 + sed \
77 + -e "s:\"/usr:\"${EPREFIX}/usr:g" \
78 + -e "/ext_comp_args.*+=/s:\[.*\]$:\[\]:g" \
79 + -i setup.py || die
80 +
81 + sed \
82 + -e "s:/opt/local:${EPREFIX}/usr:g" \
83 + -e '/ext_comp_args/s:\[.*\]:[]:g' \
84 + -i setup.py || die
85 + sed \
86 + -e "s:\['msgpackc'\]:\['msgpack'\]:g" \
87 + -i setup.py || die
88 +
89 + append-cxxflags -std=c++0x
90 +
91 + use !netcdf && mydistutilsargs=( --no-vmd-plugins )
92 +
93 + distutils-r1_python_prepare_all
94 +}
95 +
96 +python_install() {
97 + distutils-r1_python_install \
98 + --pymol-path="${EPREFIX}/usr/share/pymol"
99 +
100 + sed \
101 + -e '1d' \
102 + -e "/APBS_BINARY_LOCATION/s:None:\"${EPREFIX}/usr/bin/apbs\":g" \
103 + -e "/APBS_PSIZE_LOCATION/s:None:\"$(python_get_sitedir)/pdb2pqr/src/\":g" \
104 + -e "/APBS_PDB2PQR_LOCATION/s:None:\"$(python_get_sitedir)/pdb2pqr/\":g" \
105 + -i "${D}/$(python_get_sitedir)"/pmg_tk/startup/apbs_tools.py || die
106 +}
107 +
108 +python_install_all() {
109 + distutils-r1_python_install_all
110 +
111 + sed \
112 + -e '1i#!/usr/bin/env python' \
113 + "${D}/$(python_get_sitedir)"/pymol/__init__.py > "${T}"/${PN} || die
114 +
115 + python_foreach_impl python_doscript "${T}"/${PN}
116 +
117 + # These environment variables should not go in the wrapper script, or else
118 + # it will be impossible to use the PyMOL libraries from Python.
119 + cat >> "${T}"/20pymol <<- EOF || die
120 + PYMOL_PATH="${EPREFIX}/usr/share/pymol"
121 + PYMOL_DATA="${EPREFIX}/usr/share/pymol/data"
122 + PYMOL_SCRIPTS="${EPREFIX}/usr/share/pymol/scripts"
123 + EOF
124 +
125 + doenvd "${T}"/20pymol
126 +
127 + newicon "${WORKDIR}"/${PN}-1.8.4.0.png ${PN}.png
128 + make_desktop_entry ${PN} PyMol ${PN} \
129 + "Graphics;Education;Science;Chemistry;" \
130 + "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;"
131 +
132 + if ! use web; then
133 + rm -rf "${D}/$(python_get_sitedir)/web" || die
134 + fi
135 +
136 + rm -f "${ED}"/usr/share/${PN}/LICENSE || die
137 +}
138 +
139 +pkg_postinst() {
140 + xdg_pkg_postinst
141 + optfeature "Electrostatic calculations" sci-chemistry/apbs sci-chemistry/pdb2pqr
142 +}