summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-09-16 23:38:55 +0200
committerDavid Seifert <soap@gentoo.org>2020-09-16 23:38:55 +0200
commit92fb3a027479cbcd3ca53b427e6ae3cd3e03fbab (patch)
tree7117ea2f8fdf3f987be89ba568db0fb15519c6da /sci-chemistry
parentprofiles/package.mask: last-rite app-admin/recursos (diff)
downloadgentoo-92fb3a027479cbcd3ca53b427e6ae3cd3e03fbab.tar.gz
gentoo-92fb3a027479cbcd3ca53b427e6ae3cd3e03fbab.tar.bz2
gentoo-92fb3a027479cbcd3ca53b427e6ae3cd3e03fbab.zip
sci-chemistry/raster3d: Version bump to 3.0.6
Package-Manager: Portage-3.0.7, Repoman-3.0.1 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/raster3d/Manifest1
-rw-r--r--sci-chemistry/raster3d/raster3d-3.0.6.ebuild107
2 files changed, 108 insertions, 0 deletions
diff --git a/sci-chemistry/raster3d/Manifest b/sci-chemistry/raster3d/Manifest
index 070c7030e39c..e3f4d06cf38b 100644
--- a/sci-chemistry/raster3d/Manifest
+++ b/sci-chemistry/raster3d/Manifest
@@ -1,2 +1,3 @@
DIST Raster3D_3.0-2.tar 1743034 BLAKE2B 3331d971696f2d95d1b2afe09995a8b5ce5ce7041725f1dd8a5ea27645d1e824956019a1466b60395ac0406d8c055a5052e0a483564777435d7fafda15cad6bb SHA512 f8f73cc91eae521839a9db8ee1a7a9d8727ed510cb574116d89e918480700d844691a6fc3c4a28cb54312b0133cc610422e55d99716803cf3e8bb5d9d934e37f
DIST Raster3D_3.0-3.tar 1729356 BLAKE2B be933cfb2c4bdc500d2cd221b8d71a01f1f4fab9cc0c70e0f5538363fa53714b6198a78e7cf7dd111dd0242e8537f2fcc38e54a12fc71588250e6ecfc561c0bc SHA512 bd372c4ba8d40db38e19f520883ca71ab7c5ef7a451b67150894e229b45167dfe00b77c19e118afc6abdb9ac07800cc16de5d2dc82c3ef9baa751200490e40fa
+DIST Raster3D_3.0-6.tar 1729698 BLAKE2B d51b752c189ef720306e78a97e75a8b30c4286b1e75bfa20dd6d8c6e02e3a57d49508faaa1324d8b1f8311049ab3a9b18847bdcb73e7237e3bc91c34fb1ea55b SHA512 656bc19fdef882713c540598173e7f46246b4245f7983edc906fe9fdab7393c47c1687c6e9366987e8af7627d4bfe56a996ff0003aa19872d79724b3e555fdda
diff --git a/sci-chemistry/raster3d/raster3d-3.0.6.ebuild b/sci-chemistry/raster3d/raster3d-3.0.6.ebuild
new file mode 100644
index 000000000000..eb03d6182a84
--- /dev/null
+++ b/sci-chemistry/raster3d/raster3d-3.0.6.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit fortran-2 flag-o-matic prefix toolchain-funcs
+
+MY_PN="Raster3D"
+MY_PV=$(ver_rs 2 -)
+MY_P="${MY_PN}_${MY_PV}"
+
+DESCRIPTION="Generation high quality raster images of proteins or other molecules"
+HOMEPAGE="http://www.bmsc.washington.edu/raster3d/raster3d.html"
+SRC_URI="http://www.bmsc.washington.edu/${PN}/${MY_P}.tar.gz -> ${MY_P}.tar"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="gd tiff"
+
+RDEPEND="
+ gd? ( media-libs/gd[jpeg,png] )
+ tiff? ( media-libs/tiff:0 )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/3.0.2-as-needed.patch
+ "${FILESDIR}"/3.0.2-gentoo-prefix.patch
+)
+
+src_prepare() {
+ default
+
+ sed \
+ -e "s:MYPF:${PF}:" \
+ -e "s:MYLIB:$(get_libdir):g" \
+ -i Makefile.template || \
+ die "Failed to patch makefile.template"
+
+ if ! use gd; then
+ sed \
+ -e "/GDLIBS/s:^:#:g" \
+ -e "/GDDEFS/s:^:#:g" \
+ -i Makefile.template || die
+ fi
+
+ if ! use tiff; then
+ sed \
+ -e "/TLIBS/s:^:#:g" \
+ -e "/TDEFS/s:^:#:g" \
+ -i Makefile.template || die
+ fi
+
+ if [[ $(tc-getFC) =~ gfortran ]]; then
+ append-cflags -Dgfortran
+ fi
+
+ append-fflags -ffixed-line-length-132
+
+ eprefixify Makefile.template
+ cp Makefile.template Makefile.incl || die
+}
+
+src_compile() {
+ local target
+ if [[ $(tc-getFC) =~ gfortran ]]; then
+ target="linux"
+ else
+ target="linux-$(tc-getFC)"
+ fi
+
+ local i
+ for i in render.o ${target} all; do
+ emake \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ FFLAGS="${FFLAGS}" \
+ CC="$(tc-getCC)"\
+ FC="$(tc-getFC)" \
+ INCDIRS="-I${EPREFIX}/usr/include" \
+ LIBDIRS="-L${EPREFIX}/usr/$(get_libdir)" \
+ ${i}
+ done
+}
+
+src_install() {
+ emake prefix="${ED}"/usr \
+ bindir="${ED}"/usr/bin \
+ datadir="${ED}"/usr/share/Raster3D/materials \
+ mandir="${ED}"/usr/share/man/man1 \
+ htmldir="${ED}"/usr/share/doc/${PF}/html \
+ examdir="${ED}"/usr/share/Raster3D/examples \
+ install
+
+ newenvd - 10raster3d <<-EOF
+ R3D_LIB="${EPREFIX}/usr/share/${NAME}/materials"
+ EOF
+}
+
+pkg_postinst() {
+ elog "Add following line:"
+ elog "<delegate decode=\"r3d\" command='\"render\" < \"%i\" > \"%o\"' />"
+ elog "to ${EPREFIX}/usr/$(get_libdir)/ImageMagick-6.5.8/config/delegates.xml"
+ elog "to make imagemagick use raster3d for .r3d files"
+}