From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1532060-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id EB003158009
	for <garchives@archives.gentoo.org>; Sat, 24 Jun 2023 17:44:22 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id AE5DEE07F2;
	Sat, 24 Jun 2023 17:44:21 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 9519DE07F2
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Jun 2023 17:44:21 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 5B6CA34090F
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Jun 2023 17:44:20 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 72A3FA80
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Jun 2023 17:44:18 +0000 (UTC)
From: "Pacho Ramos" <pacho@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Pacho Ramos" <pacho@gentoo.org>
Message-ID: <1687627022.b79fe624316f1410e0ac77c10ded47222fcd9d57.pacho@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/pymol/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sci-chemistry/pymol/pymol-2.5.0-r3.ebuild
X-VCS-Directories: sci-chemistry/pymol/
X-VCS-Committer: pacho
X-VCS-Committer-Name: Pacho Ramos
X-VCS-Revision: b79fe624316f1410e0ac77c10ded47222fcd9d57
X-VCS-Branch: master
Date: Sat, 24 Jun 2023 17:44:18 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: c009fca4-fdfe-4af2-b58e-a4f15e3f0108
X-Archives-Hash: f90ba96222f5c10d420f251293d71298

commit:     b79fe624316f1410e0ac77c10ded47222fcd9d57
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 24 17:17:02 2023 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Jun 24 17:17:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b79fe624

sci-chemistry/pymol: Drop dev-libs/msgpack[cxx(-)] to workaround portage bug

Bug: https://bugs.gentoo.org/872227
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 sci-chemistry/pymol/pymol-2.5.0-r3.ebuild | 98 +++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)

diff --git a/sci-chemistry/pymol/pymol-2.5.0-r3.ebuild b/sci-chemistry/pymol/pymol-2.5.0-r3.ebuild
new file mode 100644
index 000000000000..92415ecd58a6
--- /dev/null
+++ b/sci-chemistry/pymol/pymol-2.5.0-r3.ebuild
@@ -0,0 +1,98 @@
+# 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_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-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}
+
+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
+}