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: Mon, 27 Mar 2017 14:09:46
Message-Id: 1490623761.f7f304a16a0f4530e49dc100bc4a542b457a5e28.alexxy@gentoo
1 commit: f7f304a16a0f4530e49dc100bc4a542b457a5e28
2 Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 27 14:08:53 2017 +0000
4 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 27 14:09:21 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7f304a1
7
8 sci-chemistry/pymol: Version bump
9
10 Warning: Pymol now depends on dev-libs/msgpack
11
12 Package-Manager: Portage-2.3.3, Repoman-2.3.1
13
14 sci-chemistry/pymol/Manifest | 1 +
15 sci-chemistry/pymol/pymol-1.8.6.0.ebuild | 109 +++++++++++++++++++++++++++++++
16 2 files changed, 110 insertions(+)
17
18 diff --git a/sci-chemistry/pymol/Manifest b/sci-chemistry/pymol/Manifest
19 index 1f72685ea0c..b4695e66d6d 100644
20 --- a/sci-chemistry/pymol/Manifest
21 +++ b/sci-chemistry/pymol/Manifest
22 @@ -1,2 +1,3 @@
23 DIST pymol-1.8.4.0.png.xz 19528 SHA256 e2c956b39965130a3dc51c2c1b1090bee6bf591885069b2ddb77c0991e9e4928 SHA512 40bb0d3f226476f6e047b5361956aad955232a97641474765eaa5204f0539aee3810e0266213618a45364f9f31f6eb18380b17e0c79f64065f7b62a9016caa7c WHIRLPOOL 1336c20e068b71cdf35118c84b5df8485c86bc51eed7f542a483fb78ce374ca76e4aed3518aced0a6f8ea49e0b180004e567cc059ac52a27a3d616adb282cea2
24 DIST pymol-v1.8.4.0.tar.bz2 8717344 SHA256 b6147befe74844dd23550461b831b2fa6d170d4456f0059cf93fb1e8cb43d279 SHA512 73a810adfc31adaf0f3fa25512084882c87b0782c8af716ac0203a5b5b7f0b9fedfbce3d129bffef7b52044e92b0542e683966b2acf961c4dac17fbba72dd7fe WHIRLPOOL 3943a619ca00cc2bfb51ff4dffa0166856b4425c7518d91b1ff2a048caa53dcb7411c64b246014b860b7f036de582e9efdc09783b3918283f0a96ee5130c7287
25 +DIST pymol-v1.8.6.0.tar.bz2 8717164 SHA256 7eaaf90ac1e1be0969291cdb1154b3631b5b6403cce1d697133d90cd37a3c565 SHA512 bd08e6890382af1503d6af16b27b43af09b372a1229cc9d8e2de311873918b5e7b06e8a2365ce73a5f52cb31ac795f5d91b2ae6ef62890d9c2bf0ea25f856658 WHIRLPOOL 950d655a48b3801de2657b6d8935404ca0069525719b9c88a117ad819c37366a55e42dbe51a253b960b79413e5df9d781b9ada8839ca06e1e01dde965044efe4
26
27 diff --git a/sci-chemistry/pymol/pymol-1.8.6.0.ebuild b/sci-chemistry/pymol/pymol-1.8.6.0.ebuild
28 new file mode 100644
29 index 00000000000..8fd0a78a12a
30 --- /dev/null
31 +++ b/sci-chemistry/pymol/pymol-1.8.6.0.ebuild
32 @@ -0,0 +1,109 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +PYTHON_COMPAT=( python2_7 )
39 +PYTHON_REQ_USE="tk"
40 +
41 +inherit distutils-r1 eutils fdo-mime flag-o-matic versionator
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 + mirror://sourceforge/project/${PN}/${PN}/$(get_version_component_range 1-2)/${PN}-v${PV}.tar.bz2
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-python/numpy[${PYTHON_USEDEP}]
59 + dev-python/pyopengl[${PYTHON_USEDEP}]
60 + media-libs/freeglut
61 + media-libs/freetype:2
62 + media-libs/glew:0=
63 + media-libs/libpng:0=
64 + media-video/mpeg-tools
65 + sys-libs/zlib
66 + virtual/python-pmw[${PYTHON_USEDEP}]
67 + !sci-chemistry/pymol-apbs-plugin[${PYTHON_USEDEP}]
68 + web? ( !dev-python/webpy[${PYTHON_USEDEP}] )"
69 +RDEPEND="${DEPEND}"
70 +
71 +S="${WORKDIR}"/${PN}
72 +
73 +python_prepare_all() {
74 + sed \
75 + -e "s:\"/usr:\"${EPREFIX}/usr:g" \
76 + -e "/ext_comp_args.*+=/s:\[.*\]$:\[\]:g" \
77 + -e "/import/s:argparse:argparseX:g" \
78 + -i setup.py || die
79 +
80 + sed \
81 + -e "s:/opt/local:${EPREFIX}/usr:g" \
82 + -e '/ext_comp_args/s:\[.*\]:[]:g' \
83 + -i setup.py || die
84 +
85 + append-cxxflags -std=c++0x
86 +
87 + distutils-r1_python_prepare_all
88 +}
89 +
90 +python_install() {
91 + distutils-r1_python_install --pymol-path="${EPREFIX}/usr/share/pymol"
92 +
93 + sed \
94 + -e '1d' \
95 + -e "/APBS_BINARY_LOCATION/s:None:\"${EPREFIX}/usr/bin/apbs\":g" \
96 + -e "/APBS_PSIZE_LOCATION/s:None:\"$(python_get_sitedir)/pdb2pqr/src/\":g" \
97 + -e "/APBS_PDB2PQR_LOCATION/s:None:\"$(python_get_sitedir)/pdb2pqr/\":g" \
98 + -i "${D}/$(python_get_sitedir)"/pmg_tk/startup/apbs_tools.py || die
99 +}
100 +
101 +python_install_all() {
102 + distutils-r1_python_install_all
103 +
104 + sed \
105 + -e '1i#!/usr/bin/env python' \
106 + "${D}/$(python_get_sitedir)"/pymol/__init__.py > "${T}"/${PN} || die
107 +
108 + python_foreach_impl python_doscript "${T}"/${PN}
109 +
110 + # These environment variables should not go in the wrapper script, or else
111 + # it will be impossible to use the PyMOL libraries from Python.
112 + cat >> "${T}"/20pymol <<- EOF
113 + PYMOL_PATH="${EPREFIX}/usr/share/pymol"
114 + PYMOL_DATA="${EPREFIX}/usr/share/pymol/data"
115 + PYMOL_SCRIPTS="${EPREFIX}/usr/share/pymol/scripts"
116 + EOF
117 +
118 + doenvd "${T}"/20pymol
119 +
120 + newicon "${WORKDIR}"/${PN}-1.8.4.0.png ${PN}.png
121 + make_desktop_entry ${PN} PyMol ${PN} \
122 + "Graphics;Education;Science;Chemistry;" \
123 + "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;"
124 +
125 + if ! use web; then
126 + rm -rf "${D}/$(python_get_sitedir)/web" || die
127 + fi
128 +
129 + rm -f "${ED}"/usr/share/${PN}/LICENSE || die
130 +}
131 +
132 +pkg_postinst() {
133 + fdo-mime_desktop_database_update
134 + fdo-mime_mime_database_update
135 + optfeature "Electrostatic calculations" sci-chemistry/apbs sci-chemistry/pdb2pqr
136 +}
137 +
138 +pkg_postrm() {
139 + fdo-mime_desktop_database_update
140 + fdo-mime_mime_database_update
141 +}