commit:     44e946f5745557c6147af42882099eabcc97ebd4
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 19 14:22:10 2023 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Thu Oct 19 14:22:10 2023 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=44e946f5

sci-chemistry/chimera: add 1.17.3

Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 sci-chemistry/chimera/chimera-1.17.3.ebuild | 93 +++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)

diff --git a/sci-chemistry/chimera/chimera-1.17.3.ebuild 
b/sci-chemistry/chimera/chimera-1.17.3.ebuild
new file mode 100644
index 000000000..4fdafd361
--- /dev/null
+++ b/sci-chemistry/chimera/chimera-1.17.3.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit desktop xdg
+
+DESCRIPTION="Next generation molecular visualization program from RBVI"
+HOMEPAGE="https://www.cgl.ucsf.edu/chimera/";
+SRC_URI="${P}-linux_x86_64.bin
+       mirror+https://dev.gentoo.org/~pacho/${PN}/Chimera512.png";
+
+SLOT="0"
+LICENSE="chimera"
+KEYWORDS="~amd64 ~x86"
+
+RESTRICT="fetch mirror strip"
+QA_PREBUILT="*"
+
+DEPEND=""
+BDEPEND=""
+RDEPEND="
+       dev-lang/tcl
+       dev-lang/tk
+       dev-libs/expat
+       dev-libs/libotf
+       dev-libs/openssl:0
+       dev-libs/libpcre
+       sys-libs/zlib
+       media-libs/fontconfig
+       media-libs/freetype
+       media-libs/ftgl
+       media-libs/libpng
+       media-libs/tiff
+       sci-libs/hdf5
+       sys-devel/gcc[openmp,fortran]
+       media-libs/libjpeg-turbo
+       virtual/glu
+       virtual/opengl
+       x11-libs/libX11
+       x11-libs/libICE
+       x11-libs/libXext
+       x11-libs/libXft
+       x11-libs/libXmu
+       x11-libs/libXpm
+       x11-libs/libXrender
+       x11-libs/libSM
+       x11-libs/libXt
+       x11-libs/libGLw
+       virtual/libcrypt:=
+"
+
+S="${WORKDIR}"
+
+pkg_nofetch() {
+       elog "Please visit"
+       elog "https://www.cgl.ucsf.edu/chimera/download.html";
+       elog "and download ${P}-linux_x86_64.bin into your DISTDIR"
+}
+
+src_unpack() {
+       cp "${DISTDIR}"/${P}-linux_x86_64.bin ${P}-linux_x86_64.bin.zip
+       unzip ${P}-linux_x86_64.bin.zip || die
+}
+
+src_install() {
+       chmod +x ./chimera.bin
+       dodir /opt/
+       ./chimera.bin -d foo || die
+       newicon "${DISTDIR}"/Chimera512.png Chimera.png
+       make_desktop_entry "${EPREFIX}/opt/bin/chimera" Chimera Chimera
+       mv foo "${ED}/opt/${PN}" || die
+
+       cat >> "${T}"/chimera <<- EOF
+       #!${EPREFX}/bin/bash
+
+       export PATH="${EPREFIX}/opt/${PN}/bin:\${PATH}"
+       "${EPREFIX}/opt/${PN}/bin/chimera" \$@
+       EOF
+
+       exeinto /opt/bin/
+       doexe "${T}"/chimera
+
+       # point the symlink to the correct location
+       rm "${ED}/opt/chimera/include/ft2build.h" || die
+       dosym ../../../usr/include/freetype2/ft2build.h 
opt/chimera/include/ft2build.h
+
+       if use prefix; then
+               local i
+               for i in "${ED}"/opt/${PN}/bin/{tiffcp,povray,al2co} 
"${ED}"/opt/${PN}/lib/*.so; do
+                       patchelf --set-rpath 
"${EPREFIX}/usr/lib:${EPREFIX}/opt/${PN}/lib" "${i}" || die
+               done
+       fi
+}

Reply via email to