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: Tue, 26 Feb 2019 14:15:49
Message-Id: 1551190506.6608559d020df9dc6c0e7364bc7c058a1c2ab1fd.alexxy@gentoo
1 commit: 6608559d020df9dc6c0e7364bc7c058a1c2ab1fd
2 Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 26 14:15:06 2019 +0000
4 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 26 14:15:06 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6608559d
7
8 sci-chemistry/pymol: Version bump
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
12
13 sci-chemistry/pymol/Manifest | 1 +
14 sci-chemistry/pymol/pymol-2.3.0.ebuild | 115 +++++++++++++++++++++++++++++++++
15 2 files changed, 116 insertions(+)
16
17 diff --git a/sci-chemistry/pymol/Manifest b/sci-chemistry/pymol/Manifest
18 index d308fc6a065..4e293b43050 100644
19 --- a/sci-chemistry/pymol/Manifest
20 +++ b/sci-chemistry/pymol/Manifest
21 @@ -1,3 +1,4 @@
22 DIST pymol-1.8.4.0.png.xz 19528 BLAKE2B f3d23d4cedca3d8bb96b20646a548da4be570697e3346a11b01c5c3599b536ba4697be08472dfa8a4f6533167defc1a37a1de332931a73857319cb28fd42cd2b SHA512 40bb0d3f226476f6e047b5361956aad955232a97641474765eaa5204f0539aee3810e0266213618a45364f9f31f6eb18380b17e0c79f64065f7b62a9016caa7c
23 DIST pymol-2.2.0.tar.gz 10514753 BLAKE2B 54bf7c639ec1af0c318438f6dcbe5878aded5cc360dee3a5f1dee4b6eea588f4242865ae8adf1e044628ad5f71aa8f6d58d0cc71baf7c1f20eed3045ed3a1cb1 SHA512 56776586276208d42cc4bd4c3cb7d6b9a08e7239186b8f398c75cb57f85e05ebf51aaa8cdec5672e56beeda26f1cd9d14c6de7fba1a741f9c8ec22c1292b9c63
24 +DIST pymol-2.3.0.tar.gz 10448674 BLAKE2B 0d508587d880ce7f2e8a0481bf664e6bfe6eb1d68b0f48b9266cde756824bd8c0144d7243e958bbc5e571d60fca9dafff125d81a8a3d32107e78ad2ff8dffc05 SHA512 e1dcea1c97bcd9045d3543e92902f240e6affbf61a38e8d2a0be04309e3dbabfe1a869847d1423b3151008978d4c305bbf3ce994fc9d453c0063ce020100c133
25 DIST pymol-v1.8.4.0.tar.bz2 8717344 BLAKE2B a4cfb95eb40a3cd3da5b8cfd4acac7255997f9a3e49ef7e7e1d4c13f36e4aace462a054c326bbaadbc99f22286be878a6d5c518149760b5c939ce9362d4b8cc3 SHA512 73a810adfc31adaf0f3fa25512084882c87b0782c8af716ac0203a5b5b7f0b9fedfbce3d129bffef7b52044e92b0542e683966b2acf961c4dac17fbba72dd7fe
26
27 diff --git a/sci-chemistry/pymol/pymol-2.3.0.ebuild b/sci-chemistry/pymol/pymol-2.3.0.ebuild
28 new file mode 100644
29 index 00000000000..0f197578023
30 --- /dev/null
31 +++ b/sci-chemistry/pymol/pymol-2.3.0.ebuild
32 @@ -0,0 +1,115 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python2_7 )
39 +PYTHON_REQ_USE="tk"
40 +
41 +inherit distutils-r1 eutils xdg-utils flag-o-matic
42 +
43 +DESCRIPTION="A Python-extensible molecular graphics system"
44 +HOMEPAGE="http://www.pymol.org/"
45 +SRC_URI="
46 + https://dev.gentoo.org/~jlec/distfiles/${PN}-1.8.4.0.png.xz
47 + https://github.com/schrodinger/pymol-open-source/archive/v${PV}.tar.gz -> ${P}.tar.gz
48 + "
49 +# git archive -v --prefix=${P}/ master -o ${P}.tar.xz
50 +RESTRICT="mirror"
51 +LICENSE="PSF-2.2"
52 +SLOT="0"
53 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
54 +IUSE="web"
55 +
56 +DEPEND="
57 + dev-libs/msgpack[cxx]
58 + dev-libs/mmtf-cpp
59 + dev-python/numpy[${PYTHON_USEDEP}]
60 + dev-python/pyopengl[${PYTHON_USEDEP}]
61 + media-libs/freeglut
62 + media-libs/freetype:2
63 + media-libs/glew:0=
64 + media-libs/glm
65 + media-libs/libpng:0=
66 + media-video/mpeg-tools
67 + sys-libs/zlib
68 + virtual/python-pmw[${PYTHON_USEDEP}]
69 + !sci-chemistry/pymol-apbs-plugin[${PYTHON_USEDEP}]
70 + web? ( !dev-python/webpy[${PYTHON_USEDEP}] )"
71 +RDEPEND="${DEPEND}"
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 + -e "/import/s:argparse:argparseX:g" \
80 + -i setup.py || die
81 +
82 + sed \
83 + -e "s:/opt/local:${EPREFIX}/usr:g" \
84 + -e '/ext_comp_args/s:\[.*\]:[]:g' \
85 + -i setup.py || die
86 + sed \
87 + -e "s:\['msgpackc'\]:\['msgpack'\]:g" \
88 + -i setup.py || die
89 +
90 + append-cxxflags -std=c++0x
91 +
92 + distutils-r1_python_prepare_all
93 +}
94 +
95 +python_install() {
96 + distutils-r1_python_install \
97 + --pymol-path="${EPREFIX}/usr/share/pymol"
98 +
99 + sed \
100 + -e '1d' \
101 + -e "/APBS_BINARY_LOCATION/s:None:\"${EPREFIX}/usr/bin/apbs\":g" \
102 + -e "/APBS_PSIZE_LOCATION/s:None:\"$(python_get_sitedir)/pdb2pqr/src/\":g" \
103 + -e "/APBS_PDB2PQR_LOCATION/s:None:\"$(python_get_sitedir)/pdb2pqr/\":g" \
104 + -i "${D}/$(python_get_sitedir)"/pmg_tk/startup/apbs_tools.py || die
105 +}
106 +
107 +python_install_all() {
108 + distutils-r1_python_install_all
109 +
110 + sed \
111 + -e '1i#!/usr/bin/env python' \
112 + "${D}/$(python_get_sitedir)"/pymol/__init__.py > "${T}"/${PN} || die
113 +
114 + python_foreach_impl python_doscript "${T}"/${PN}
115 +
116 + # These environment variables should not go in the wrapper script, or else
117 + # it will be impossible to use the PyMOL libraries from Python.
118 + cat >> "${T}"/20pymol <<- EOF
119 + PYMOL_PATH="${EPREFIX}/usr/share/pymol"
120 + PYMOL_DATA="${EPREFIX}/usr/share/pymol/data"
121 + PYMOL_SCRIPTS="${EPREFIX}/usr/share/pymol/scripts"
122 + EOF
123 +
124 + doenvd "${T}"/20pymol
125 +
126 + newicon "${WORKDIR}"/${PN}-1.8.4.0.png ${PN}.png
127 + make_desktop_entry ${PN} PyMol ${PN} \
128 + "Graphics;Education;Science;Chemistry;" \
129 + "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;"
130 +
131 + if ! use web; then
132 + rm -rf "${D}/$(python_get_sitedir)/web" || die
133 + fi
134 +
135 + rm -f "${ED}"/usr/share/${PN}/LICENSE || die
136 +}
137 +
138 +pkg_postinst() {
139 + xdg_desktop_database_update
140 + xdg_mimeinfo_database_update
141 + optfeature "Electrostatic calculations" sci-chemistry/apbs sci-chemistry/pdb2pqr
142 +}
143 +
144 +pkg_postrm() {
145 + xdg_desktop_database_update
146 + xdg_mimeinfo_database_update
147 +}