diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-07-20 13:07:51 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-07-20 13:07:51 +0100 |
commit | 30114ae8ef07a32fea1e44a10b61f98c84142645 (patch) | |
tree | 1f5829906b913ee4637e04254cc50ffc1faab519 /sci-chemistry/pymol | |
parent | aaa44376d7162304219748a3b6771d9a26fc80fe (diff) |
gentoo auto-resync : 20:07:2023 - 13:07:51
Diffstat (limited to 'sci-chemistry/pymol')
-rw-r--r-- | sci-chemistry/pymol/Manifest | 2 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/pymol-2.5.0-format-security.patch | 15 | ||||
-rw-r--r-- | sci-chemistry/pymol/pymol-2.5.0-r4.ebuild | 108 |
3 files changed, 125 insertions, 0 deletions
diff --git a/sci-chemistry/pymol/Manifest b/sci-chemistry/pymol/Manifest index 496faac919ff..27ab37bd4be7 100644 --- a/sci-chemistry/pymol/Manifest +++ b/sci-chemistry/pymol/Manifest @@ -1,4 +1,6 @@ +AUX pymol-2.5.0-format-security.patch 562 BLAKE2B 566f653ca3abd4498f9ee5d7255e1b06d8df320bd25a569620b1ee33da0cfb6a969fd3e0a65fbce7116cd6567d9a544c57f4d6d399bec00b9effa8273a52153c SHA512 4e93a0449470abdbd2d943ef0a5fac7f302485ca42c6d9ccdf1ab9a879029d5185c3f1a3a2e237fd8b3b3bf0a306bce07db3226257360127c97546480c233c4f 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-r3.ebuild 2617 BLAKE2B d79d2bcdbb284b0eb6bb3eb4863288aaaebfa94c65b3d9205e60caf607195fd7631b7b29cc7a27ff25b25f4236ea211b99b96dbafe084042b4a0d20c613edb05 SHA512 4ec711441b124b5abc0a062dac1293385dfecf83db6c1c7380907d2ae680f4a064cbb08260bd2b058741764dd25be1570e8fbb402c3204da58f08bf7efd48678 +EBUILD pymol-2.5.0-r4.ebuild 2826 BLAKE2B 3a5a557058ff0f552e3160c8a127bdbfd257d1fc47530b4cc79b0ac5751b3a2959822c8562aca0d66aafa4c3e48a287784e0b968c3c9cbdc6fa980db49768735 SHA512 1f219a9ea5ee7946626c15bfb3e0e01501bf16dd08c1763bd986a6766e0cce92846c3ac9ed9e1e88fa19467b35a0d21b67ef0c58dbd81bd002968f609f802e78 MISC metadata.xml 495 BLAKE2B 32d321e92c7e7c226747660c314f5cff9aabf9ee41c8a864064432ac9554879db7bf60640993dadae6e00a9b7d1367cb8ab228b63b8797ca84e5618eeeb192cc SHA512 36ef956d111c76182c70c81a830885f540fb2710f696b2711837d4bf1055a8792226f38b827f389a3a3861f259bae1394d6da50c2b33a0ddb4e6940262e1b25d diff --git a/sci-chemistry/pymol/files/pymol-2.5.0-format-security.patch b/sci-chemistry/pymol/files/pymol-2.5.0-format-security.patch new file mode 100644 index 000000000000..080e5e8960e4 --- /dev/null +++ b/sci-chemistry/pymol/files/pymol-2.5.0-format-security.patch @@ -0,0 +1,15 @@ +Author: Michael Banck <mbanck@debian.org> +Description: Fix "error: format not a string literal and no format arguments [-Werror=format-security]" (#759860) +Forwarded: yes + +--- a/contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp ++++ b/contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp +@@ -2004,7 +2004,7 @@ namespace { + } + } + catch (std::exception &e) { +- fprintf(stderr, "%s", e.what()); ++ fprintf(stderr, "Cannot write timestamp to mae file: %s\n", e.what()); + return MOLFILE_ERROR; + } + return MOLFILE_SUCCESS; diff --git a/sci-chemistry/pymol/pymol-2.5.0-r4.ebuild b/sci-chemistry/pymol/pymol-2.5.0-r4.ebuild new file mode 100644 index 000000000000..e4b4d3e2eadb --- /dev/null +++ b/sci-chemistry/pymol/pymol-2.5.0-r4.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +DISTUTILS_USE_PEP517="setuptools" +DISTUTILS_EXT=1 + +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-cpp/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} + +PATCHES=( + "${FILESDIR}/${PN}-2.5.0-format-security.patch" +) + +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 + + distutils-r1_python_prepare_all +} + +python_configure_all() { + use !netcdf && DISTUTILS_ARGS=( --no-vmd-plugins ) +} + +python_install() { + distutils-r1_python_install \ + --pymol-path="${EPREFIX}/usr/share/pymol" + + sed \ + -e '1i#!/usr/bin/env python' \ + "${D}/$(python_get_sitedir)"/pymol/__init__.py > "${T}"/${PN} || die + python_doscript "${T}"/${PN} +} + +python_install_all() { + distutils-r1_python_install_all + + # Move data to correct location + dodir /usr/share/pymol + mv "${D}/$(python_get_sitedir)"/pymol/pymol_path/* "${ED}/usr/share/pymol" || die + + # 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 +} |