summaryrefslogtreecommitdiff
path: root/sci-visualization/grace
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-visualization/grace
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-visualization/grace')
-rw-r--r--sci-visualization/grace/Manifest16
-rw-r--r--sci-visualization/grace/files/grace-5.1.21-fortran.patch26
-rw-r--r--sci-visualization/grace/files/grace-5.1.21-netcdf.patch11
-rw-r--r--sci-visualization/grace/files/grace-5.1.22-dlmodule.patch12
-rw-r--r--sci-visualization/grace/files/grace-5.1.22-ldflags.patch41
-rw-r--r--sci-visualization/grace/files/grace-5.1.22-mkstemp.patch55
-rw-r--r--sci-visualization/grace/files/grace.desktop8
-rw-r--r--sci-visualization/grace/grace-5.1.23-r1.ebuild110
-rw-r--r--sci-visualization/grace/grace-5.1.23.ebuild110
-rw-r--r--sci-visualization/grace/grace-5.1.25.ebuild107
-rw-r--r--sci-visualization/grace/metadata.xml22
11 files changed, 518 insertions, 0 deletions
diff --git a/sci-visualization/grace/Manifest b/sci-visualization/grace/Manifest
new file mode 100644
index 000000000000..ab7a70241619
--- /dev/null
+++ b/sci-visualization/grace/Manifest
@@ -0,0 +1,16 @@
+AUX grace-5.1.21-fortran.patch 649 SHA256 f6b078cb8ab1fafc59b3993b374731cd82dbbee6334afd7c5ccfe6fefb823bb7 SHA512 29331f67e0a23a2c180aff1c864fde6cd7b41d835a0eff63135c1f5840b2c67263c409c355d1c453133668f2dbde032f7525859ce2e579d52db8884f08554baa WHIRLPOOL 6225c84888b9bcb3c83ac4e7a68325e480a7982add44cbdf2c3f2f47ddb391d44dcb2c9c4733ff5f70f73a5b020026c2faecc3495d72409c72c77ceca502dc74
+AUX grace-5.1.21-netcdf.patch 412 SHA256 9b76339d4c9f3e26f0ba05dfd7d2358146fabc6ed466182f4a20bc134a90e3fc SHA512 b80651039fe60d7784839061081d9f2d64cd67a71e80f834d938f62266a825666e11c424bdd92a9a0808e148537c56106c79f4be943abf36925923f7fd89b347 WHIRLPOOL ec964d69fbb0a520de018bedb0f65810aa33ccf825581a7c5b3410d8e3f52e0bfd1e34f35e4ffe82b31f666866bb24041038e8dfa8a392f30968be0d49657afa
+AUX grace-5.1.22-dlmodule.patch 355 SHA256 73b62389666445cd7aebcd42ec12aecfefe2a742b2178eacf5593768f1c2222e SHA512 8ce040b56992712a11f2d00aa1aca67120e16df187ffed9541bb5fdc390c7555461d3ccbfbc3448e68d9a41b6b3bf9d1d2f3dca10259393c96665e3ba489ef34 WHIRLPOOL 8f0d1931af43d8404f69ea4395a795738066f5abc2c76f937f38609e62e1a85cdc61a46248fe5bdf0ba5d0acb0c2b7e4bee4f83577efaa1fbd2227ce3724f5ed
+AUX grace-5.1.22-ldflags.patch 1161 SHA256 955c74169f859bef042601d85be80319c29d7774b62aacceafeb352803d5ea15 SHA512 43950d98c61cbeaa93d84d1c4b37233a49150ef804b6a00ffbcccc4dd926878bafa9d24007640f193c323e093f0c4c731ac676f5e5d410c8e814796babdf6e0a WHIRLPOOL 3812bbfaff8c4b7aa7bdc16dfca2db48575f7d172eaac4f3e59b77523d097480aaeee24778708b09ba2b1cd931cf59c65f6914f1298202af324ee582e06d81e5
+AUX grace-5.1.22-mkstemp.patch 1664 SHA256 6e436fe9c27d4b627a8116ca2a1bea94bd5fc01bc475be6f56a63ec9b5cf2f97 SHA512 e7ba04f9be93e2bb12e5f78894eec255b76ee85463ec35b2890ff111f9f64567c67effec1678d4a953a602be3d0ecd2123487e3dd88704d325b369e59750ad44 WHIRLPOOL 4a092c453fca29d44ed20d1c366ce0cba5d724f5dd5a8900d2d09d795753e5ff36a184f6beb5e90b86bc38e18b12b62c607bd42536aa1ca59a58798e80e71f71
+AUX grace.desktop 161 SHA256 0e522ef577b5658559b6e4a4be531ae4989b294935897e84e03f6ad1cc4e83ff SHA512 6d43de6f8d5f85c3fff36202320864ea3611d3ee842efa677ad59ae1390c6499f9f14aefd37345c0cec62024637b057e804efd26577c45b4f7a5bb6717952b2a WHIRLPOOL e7ca9891b4b4cffa0f9bb31f398a2fdb4d662dc255a869487f0155e35662a61e9b05aaf8cf6543fed6e584758a8c1a7fc4a2056a77c65b84628eea9778bb684c
+DIST grace-5.1.23.tar.gz 2501364 SHA256 69527950fd9c056a76b7a6bf4ac37a9b87acc565c12a941ffae3c9c5a822ca10 SHA512 84b75639a5065fb0a39204b55e82471be90d78b22530e541a4e58cb5bcd94a59d51e91da38d9fecb9c23e21744c0c3b31bb9db4fd26c656233a19cffd1eef7d3 WHIRLPOOL f807245acd084973d6436f404fc9eb146543a8ce34e0089ded098e771564e9d3bc6ae7023463674101cd161a1463ab3b97ee80df5b18e191b1e9ab94c7e6afc4
+DIST grace-5.1.25.tar.gz 2957689 SHA256 751ab9917ed0f6232073c193aba74046037e185d73b77bab0f5af3e3ff1da2ac SHA512 9ea68483af1dfc98d217ae730b7a51b66deae5aaa8dfda29d5a3337ed4b5728b45aa03f561bf7d4173e73d6af8dee03cbabd95c0c8dd36999303c89451a3728a WHIRLPOOL 3c74003882b4f3455b17563b94649bb7a2abd66df4a386b0da4e91498174b414a96b705b081c8c2a1d5532b2709b2b02f5fe18145a2fc1071f2900ccef7f6e95
+DIST grace.png 338 SHA256 70130b7ddb7a64cf2d866aaf472d8badb12d72ac288275709689c631e23da9bc SHA512 804a693b867ad63f34964c7388f61719c558d253cb2c7bc7b6bd0647ad9b3ddc6b23d3950091b6804e4a94736f024486cf3dcce5f877135def34712ee95e4031 WHIRLPOOL 6cef65fc9329e7f49541e193a84c4f86498f422951ced1bd228ce854bab43a9ba5d9dfb44f780b1dcb030892cebd657d6de385df92710062f56c38f1e6cccd94
+DIST grace.png.tar 10240 SHA256 05215c72a2f45b513ba508287b5f693af145719b7a85497320d1e1e17695e99c SHA512 e94970b92894e58fd481d2f81e615c38b77fab7039985516a2ad9b2bb2bb7a82f4e3e8cdb639e7c0d55eaad6bf8abc636a342c94a356e3bd0520824252faddcf WHIRLPOOL 448e1c659475e38331c3ff2f050de52feb01db9623c0a250c7702debe920abf7e9bc56373f442d91d11ad6f55da3e9bbc58f52c1251223bdf405202ae8309556
+EBUILD grace-5.1.23-r1.ebuild 2881 SHA256 b5338544bf82157191e3e599358f7afee169db0c24f1129bf611f54d70593584 SHA512 b4efb103df93cfe9429a7b996cede8d94e36aeba1b721024076ea5a35a62234b0b0a71caf5b30cace32b113d2239037cca83c0fda781fd6aef8f769c87902032 WHIRLPOOL 060c83ec9739d1169a91d4987311281f0ecb9847c42fe7447ca751c733e72810543f4cc69c67247c034945ead7248a08db7b7d16bf84dcb3c67f85c865685106
+EBUILD grace-5.1.23.ebuild 2878 SHA256 ba501427027acb385d35ce8290afc4a6c98a574349e57bac14cc9fd2c2747e5b SHA512 7ea419a1843b0aa108b4fc765d545e2503351b6b0a7b2ddac6f48c01b78a7e4682be363735cdf4f4420304ac5d5c9439a40b87ef2bb6672eb7eab6fed345afd0 WHIRLPOOL 59089cd598852caa2977a107ccedbe5904b99077b32d9ed9ce4569bb27ae1a48002ccb0557e717b0436d6cbc3ef3230cd724918af821e04462ef1d5e3447feb0
+EBUILD grace-5.1.25.ebuild 2755 SHA256 bb106492ff5708156c9131cfecea4d84928409515c17d1c897043fd18d482ad1 SHA512 b7b6188fc2825584783a059b1c54de606f81739c0098dd0e2dd7e129cee705fc7cf76ab383cd13ac88cc626c078c3410c4c7ae301b4dac7c016333315f2d4108 WHIRLPOOL 8f8c6b29d8ca468e4936f90fa37302efe7554651aef76bafc4ee7ec2cb01ada15c3b0a746e4c29e356ba041936d6db71f896c344174b81b930348d5ef55e682d
+MISC ChangeLog 3197 SHA256 01be6542549a3a0debd04e25210fd7d8588cde54e0716fc29e68cf040661e5bc SHA512 b3bab2db522e0338fcf2f569c78add38784d80e1288d06b877cb8b24ba381470af2cf4b712d4a79cb720635d0c27df2d44507f92d9e6d3126938122c6534bb10 WHIRLPOOL d46ad892f0f850584b408c7325099173bbe40ce210542b1f2a170aa90847eacbf1b76698f5b0f30095984f05e5eec20cd98144d629b93ea87630aa41e6b012ed
+MISC ChangeLog-2015 17200 SHA256 c95d804a3815936374bc83b00b2786c5bf7e861ba773b5e24ec9f3cbf3f4570f SHA512 35883206a47366b521b7491cba97723fdce34964b1c4375def3f4b6968c65e8cc2df56943667ac7f425ffbf2edb0164739b1fc1f3e7ce724b93cc22c4b7a8c68 WHIRLPOOL 79d991d53c34c9b5dbfec721dd35d86d5cd47ae5ad3b16c63b7eb665f210344ab29213d6bccd8b210ec40dda1daae5b5efa5bd27fdf57d224c74e6fe4489a172
+MISC metadata.xml 854 SHA256 5af93a465d4dba7d2dbc11a03fefe0cab05a83b3976a10e9c6e5cf6effa28027 SHA512 ac6c70961058fcff4c352138f48f3efc468a82132625893775c775258b8d2e894d09faa3e51b382c437583088ac937ca3d8e2002f202fce6409c6f11e5acfaf2 WHIRLPOOL 2ecfb14839c9dc356c2178df83a06dcfb34db53308f2dd4b8ce5fb7688e50e57d82103ede66baabb80efaebc999df920c4f3f2a218575b299ae21ed4876c7bc2
diff --git a/sci-visualization/grace/files/grace-5.1.21-fortran.patch b/sci-visualization/grace/files/grace-5.1.21-fortran.patch
new file mode 100644
index 000000000000..cdec666107ee
--- /dev/null
+++ b/sci-visualization/grace/files/grace-5.1.21-fortran.patch
@@ -0,0 +1,26 @@
+--- a/grace_np/gracef_np.c 2008-03-03 11:45:12.000000000 +0000
++++ b/grace_np/gracef_np.c 2008-03-03 12:05:37.000000000 +0000
+@@ -1,5 +1,11 @@
+ #include <config.h>
+
++#ifdef NEED_F77_UNDERSCORE
++# define F77_FNAME(fname) fname ## _
++#else
++# define F77_FNAME(fname) fname
++#endif
++
+ #if defined(WITH_F77_WRAPPER)
+
+ #include <stdio.h>
+@@ -8,11 +14,6 @@
+
+ #include "grace_np.h"
+
+-#ifdef NEED_F77_UNDERSCORE
+-# define F77_FNAME(fname) fname ## _
+-#else
+-# define F77_FNAME(fname) fname
+-#endif
+
+ typedef void (*GraceFortranFunctionType) (const char *str, int len);
+ static GraceFortranFunctionType fortran_error = (GraceFortranFunctionType) 0;
diff --git a/sci-visualization/grace/files/grace-5.1.21-netcdf.patch b/sci-visualization/grace/files/grace-5.1.21-netcdf.patch
new file mode 100644
index 000000000000..d843cb4b284c
--- /dev/null
+++ b/sci-visualization/grace/files/grace-5.1.21-netcdf.patch
@@ -0,0 +1,11 @@
+--- a/configure 2007-02-16 22:44:49.000000000 +0000
++++ b/configure 2007-09-28 23:03:29.000000000 +0100
+@@ -15181,7 +15181,7 @@
+ int main(void) {
+ char *vlib;
+ vlib = nc_inq_libvers();
+- if (strcmp(vlib, "3.0") < 0) {
++ if (((vlib[0] == '"') && (strcmp(vlib, "\"3.0") < 0)) || ((vlib[0] != '"') && (strcmp(vlib, "3.0") < 0))){
+ exit(1);
+ }
+ exit(0);
diff --git a/sci-visualization/grace/files/grace-5.1.22-dlmodule.patch b/sci-visualization/grace/files/grace-5.1.22-dlmodule.patch
new file mode 100644
index 000000000000..02fa06a8a9f9
--- /dev/null
+++ b/sci-visualization/grace/files/grace-5.1.22-dlmodule.patch
@@ -0,0 +1,12 @@
+--- a/src/dlmodule.c 2005-11-13 07:45:16.000000000 +0900
++++ b/src/dlmodule.c 2008-06-16 15:28:33.000000000 +0900
+@@ -89,6 +89,9 @@
+ return RETURN_FAILURE;
+ }
+
++ /* clear error indicator */
++ dlerror();
++
+ newkey.data = dlsym(handle, dl_function);
+ if (!newkey.data && (error = dlerror()) != NULL) {
+ errmsg(error);
diff --git a/sci-visualization/grace/files/grace-5.1.22-ldflags.patch b/sci-visualization/grace/files/grace-5.1.22-ldflags.patch
new file mode 100644
index 000000000000..2a65cd233361
--- /dev/null
+++ b/sci-visualization/grace/files/grace-5.1.22-ldflags.patch
@@ -0,0 +1,41 @@
+Respect LDFLAGS
+
+http://bugs.gentoo.org/show_bug.cgi?id=336984
+
+--- grace-5.1.22/src/Makefile
++++ grace-5.1.22/src/Makefile
+@@ -37,10 +37,10 @@
+ include Make.dep
+
+ xmgrace$(EXE) : $(GROBJS) $(PARS_C) $(GUIOBJS) $(CEPHES_LIB)
+- $(CC) $(CFLAGS) $(GROBJS) $(GUIOBJS) -o $@ $(LDFLAGS) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(GROBJS) $(GUIOBJS) -o $@ $(LIBS)
+
+ grace$(EXE) : $(GROBJS) $(PARS_C) $(CEPHES_LIB)
+- $(CC) $(CFLAGS) $(GROBJS) -o $@ $(LDFLAGS) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(GROBJS) -o $@ $(LIBS)
+
+
+ buildinfo$(EXE) : buildinfo$(O)
+--- grace-5.1.22/auxiliary/Makefile
++++ grace-5.1.22/auxiliary/Makefile
+@@ -22,7 +22,7 @@
+ devclean : distclean
+
+ convcal$(EXE) : convcal.c
+- $(CC) $(CFLAGS0) $(CPPFLAGS) -o $@ convcal.c $(NOGUI_LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS0) $(CPPFLAGS) -o $@ convcal.c $(NOGUI_LIBS)
+
+ install : $(AUXILIARIES) $(PROGRAMS) $(SCRIPTS)
+ $(MKINSTALLDIRS) $(DESTDIR)$(GRACE_HOME)/auxiliary
+--- grace-5.1.22/grconvert/Makefile
++++ grace-5.1.22/grconvert/Makefile
+@@ -23,7 +23,7 @@
+ all : $(PROG)
+
+ $(PROG) : $(OBJS)
+- $(CC) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
+ $(OBJS) : grconvert.h
+
diff --git a/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch b/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch
new file mode 100644
index 000000000000..402a5162c584
--- /dev/null
+++ b/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch
@@ -0,0 +1,55 @@
+diff -Naur grace-5.1.22/src/editpwin.c grace-5.1.22.new/src/editpwin.c
+--- grace-5.1.22/src/editpwin.c 2006-06-03 17:19:52.000000000 -0400
++++ grace-5.1.22.new/src/editpwin.c 2008-07-26 12:45:21.000000000 -0400
+@@ -776,12 +776,12 @@
+ */
+ void do_ext_editor(int gno, int setno)
+ {
+- char *fname, ebuf[256];
++ char fname[64], ebuf[256];
+ FILE *cp;
+ int save_autos;
+
+- fname = tmpnam(NULL);
+- cp = grace_openw(fname);
++ strcpy(fname, "grace-XXXXXX");
++ cp = fdopen(mkstemp(fname), "wb");
+ if (cp == NULL) {
+ return;
+ }
+diff -Naur grace-5.1.22/src/plotone.c grace-5.1.22.new/src/plotone.c
+--- grace-5.1.22/src/plotone.c 2005-05-19 16:30:25.000000000 -0400
++++ grace-5.1.22.new/src/plotone.c 2008-07-26 12:45:40.000000000 -0400
+@@ -121,19 +121,27 @@
+ sprintf(print_file, "%s.%s", get_docbname(), dev.fext);
+ }
+ strcpy(fname, print_file);
++ prstream = grace_openw(fname);
+ } else {
++ int hdfd;
+ s = get_print_cmd();
+ if (s == NULL || s[0] == '\0') {
+ errmsg("No print command defined, output aborted");
+ return;
+ }
+- tmpnam(fname);
+- /* VMS doesn't like extensionless files */
+- strcat(fname, ".prn");
++ strcpy(fname, "grace-hardcopy-XXXXXX");
++ hdfd=mkstemp(fname);
++ if (hdfd == -1) {
++ errmsg("Could not create a temporary file, output aborted.");
++ return;
++ }
++ prstream = fdopen(hdfd, "wb");
++ if (prstream == NULL) {
++ errmsg("Could not create a temporary file, output aborted.");
++ return;
++ }
+ }
+
+- prstream = grace_openw(fname);
+-
+ if (prstream == NULL) {
+ return;
+ }
diff --git a/sci-visualization/grace/files/grace.desktop b/sci-visualization/grace/files/grace.desktop
new file mode 100644
index 000000000000..227d88d9cbe4
--- /dev/null
+++ b/sci-visualization/grace/files/grace.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Grace
+Comment=Numerical Data Processing and Visualization Tool
+Exec=xmgrace
+Icon=grace
+Terminal=false
+Type=Application
+Categories=Graphics;
diff --git a/sci-visualization/grace/grace-5.1.23-r1.ebuild b/sci-visualization/grace/grace-5.1.23-r1.ebuild
new file mode 100644
index 000000000000..74c9a9f993c6
--- /dev/null
+++ b/sci-visualization/grace/grace-5.1.23-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit eutils fortran-2 multilib toolchain-funcs
+
+DESCRIPTION="Motif based XY-plotting tool"
+HOMEPAGE="http://plasma-gate.weizmann.ac.il/Grace/"
+SRC_URI="
+ http://pkgs.fedoraproject.org/cgit/grace.git/plain/grace.png
+ https://dev.gentoo.org/~jlec/distfiles/${PN}.png.tar
+ ftp://plasma-gate.weizmann.ac.il/pub/${PN}/src/stable/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="fortran fftw jpeg netcdf png"
+
+DEPEND="
+ media-libs/t1lib
+ media-libs/tiff:0
+ sys-libs/zlib
+ >=x11-libs/motif-2.3:0
+ x11-libs/xbae
+ fftw? ( sci-libs/fftw:2.1 )
+ jpeg? ( virtual/jpeg:0 )
+ netcdf? ( sci-libs/netcdf )
+ png? ( media-libs/libpng:0= )"
+RDEPEND="${DEPEND}
+ x11-misc/xdg-utils"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ tc-export CC AR
+}
+
+src_prepare() {
+ # move tmpnam to mkstemp (adapted from debian)
+ epatch "${FILESDIR}"/${PN}-5.1.22-mkstemp.patch
+ # fix configure instead of aclocal.m4
+ epatch "${FILESDIR}"/${PN}-5.1.21-netcdf.patch
+ # fix for missing defines when fortran is disabled
+ epatch "${FILESDIR}"/${PN}-5.1.21-fortran.patch
+ # fix a leak (from freebsd)
+ epatch \
+ "${FILESDIR}"/${PN}-5.1.22-dlmodule.patch \
+ "${FILESDIR}"/${PN}-5.1.22-ldflags.patch
+
+ # don't strip if not asked for
+ sed -i \
+ -e 's:$(INSTALL_PROGRAM) -s:$(INSTALL_PROGRAM):g' \
+ {auxiliary,grconvert,src}/Makefile || die
+
+ sed -i \
+ -e 's:$(GRACE_HOME)/bin:$(PREFIX)/bin:g' \
+ -e "s:\$(GRACE_HOME)/lib:\$(PREFIX)/$(get_libdir):g" \
+ -e 's:$(GRACE_HOME)/include:$(PREFIX)/include:g' \
+ -e 's:$(PREFIX)/man:$(PREFIX)/share/man:g' \
+ Makefile */Makefile || die "sed failed"
+
+ sed -i \
+ -e 's:bin/grconvert:grconvert:' \
+ -e 's:auxiliary/fdf2fit:fdf2fit:' \
+ gracerc || die
+}
+
+src_configure() {
+ local myconf
+ if use fortran; then
+ myconf="--with-f77=$(tc-getFC)"
+ else
+ myconf="--without-f77"
+ fi
+
+ # the configure script just produces a basic Make.conf
+ # and a config.h
+ econf \
+ --disable-pdfdrv \
+ --disable-xmhtml \
+ --without-bundled-xbae \
+ --without-bundled-t1lib \
+ --enable-grace-home="${EPREFIX}"/usr/share/${PN} \
+ --with-helpviewer="xdg-open %s" \
+ --with-editor="xdg-open %s" \
+ --with-printcmd="lpr" \
+ --x-includes="${EPREFIX}"/usr/include \
+ --x-libraries="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with fftw) \
+ $(use_enable fortran f77-wrapper) \
+ $(use_enable netcdf) \
+ $(use_enable jpeg jpegdrv) \
+ $(use_enable png pngdrv) \
+ ${myconf}
+}
+
+src_install() {
+ default
+
+ dosym ../../${PN}/examples /usr/share/doc/${PF}/examples
+ dosym ../../${PN}/doc /usr/share/doc/${PF}/html
+
+ doman "${ED}"/usr/share/doc/${PF}/html/*.1
+ rm -f "${ED}"/usr/share/doc/${PF}/html/*.1 || die
+ doicon "${WORKDIR}"/${PN}.png
+ domenu "${FILESDIR}"/${PN}.desktop
+ doicon "${WORKDIR}"/${PN}.png
+}
diff --git a/sci-visualization/grace/grace-5.1.23.ebuild b/sci-visualization/grace/grace-5.1.23.ebuild
new file mode 100644
index 000000000000..4b2795c8f6ba
--- /dev/null
+++ b/sci-visualization/grace/grace-5.1.23.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit eutils fortran-2 multilib toolchain-funcs
+
+DESCRIPTION="Motif based XY-plotting tool"
+HOMEPAGE="http://plasma-gate.weizmann.ac.il/Grace/"
+SRC_URI="
+ http://pkgs.fedoraproject.org/cgit/grace.git/plain/grace.png
+ https://dev.gentoo.org/~jlec/distfiles/${PN}.png.tar
+ ftp://plasma-gate.weizmann.ac.il/pub/${PN}/src/stable/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="fortran fftw jpeg netcdf png"
+
+DEPEND="
+ media-libs/t1lib
+ media-libs/tiff:0
+ sys-libs/zlib
+ >=x11-libs/motif-2.3:0
+ x11-libs/xbae
+ fftw? ( sci-libs/fftw:2.1 )
+ jpeg? ( virtual/jpeg:0 )
+ netcdf? ( sci-libs/netcdf )
+ png? ( media-libs/libpng:0= )"
+RDEPEND="${DEPEND}
+ x11-misc/xdg-utils"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ tc-export CC
+}
+
+src_prepare() {
+ # move tmpnam to mkstemp (adapted from debian)
+ epatch "${FILESDIR}"/${PN}-5.1.22-mkstemp.patch
+ # fix configure instead of aclocal.m4
+ epatch "${FILESDIR}"/${PN}-5.1.21-netcdf.patch
+ # fix for missing defines when fortran is disabled
+ epatch "${FILESDIR}"/${PN}-5.1.21-fortran.patch
+ # fix a leak (from freebsd)
+ epatch \
+ "${FILESDIR}"/${PN}-5.1.22-dlmodule.patch \
+ "${FILESDIR}"/${PN}-5.1.22-ldflags.patch
+
+ # don't strip if not asked for
+ sed -i \
+ -e 's:$(INSTALL_PROGRAM) -s:$(INSTALL_PROGRAM):g' \
+ {auxiliary,grconvert,src}/Makefile || die
+
+ sed -i \
+ -e 's:$(GRACE_HOME)/bin:$(PREFIX)/bin:g' \
+ -e "s:\$(GRACE_HOME)/lib:\$(PREFIX)/$(get_libdir):g" \
+ -e 's:$(GRACE_HOME)/include:$(PREFIX)/include:g' \
+ -e 's:$(PREFIX)/man:$(PREFIX)/share/man:g' \
+ Makefile */Makefile || die "sed failed"
+
+ sed -i \
+ -e 's:bin/grconvert:grconvert:' \
+ -e 's:auxiliary/fdf2fit:fdf2fit:' \
+ gracerc || die
+}
+
+src_configure() {
+ local myconf
+ if use fortran; then
+ myconf="--with-f77=$(tc-getFC)"
+ else
+ myconf="--without-f77"
+ fi
+
+ # the configure script just produces a basic Make.conf
+ # and a config.h
+ econf \
+ --disable-pdfdrv \
+ --disable-xmhtml \
+ --without-bundled-xbae \
+ --without-bundled-t1lib \
+ --enable-grace-home="${EPREFIX}"/usr/share/${PN} \
+ --with-helpviewer="xdg-open %s" \
+ --with-editor="xdg-open %s" \
+ --with-printcmd="lpr" \
+ --x-includes="${EPREFIX}"/usr/include \
+ --x-libraries="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with fftw) \
+ $(use_enable fortran f77-wrapper) \
+ $(use_enable netcdf) \
+ $(use_enable jpeg jpegdrv) \
+ $(use_enable png pngdrv) \
+ ${myconf}
+}
+
+src_install() {
+ default
+
+ dosym ../../${PN}/examples /usr/share/doc/${PF}/examples
+ dosym ../../${PN}/doc /usr/share/doc/${PF}/html
+
+ doman "${ED}"/usr/share/doc/${PF}/html/*.1
+ rm -f "${ED}"/usr/share/doc/${PF}/html/*.1 || die
+ doicon "${WORKDIR}"/${PN}.png
+ domenu "${FILESDIR}"/${PN}.desktop
+ doicon "${WORKDIR}"/${PN}.png
+}
diff --git a/sci-visualization/grace/grace-5.1.25.ebuild b/sci-visualization/grace/grace-5.1.25.ebuild
new file mode 100644
index 000000000000..28ef1a814c03
--- /dev/null
+++ b/sci-visualization/grace/grace-5.1.25.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+FORTRAN_NEEDED=fortran
+
+inherit eutils fortran-2 toolchain-funcs
+
+DESCRIPTION="Motif based XY-plotting tool"
+HOMEPAGE="http://plasma-gate.weizmann.ac.il/Grace/"
+SRC_URI="
+ http://pkgs.fedoraproject.org/cgit/grace.git/plain/grace.png
+ https://dev.gentoo.org/~jlec/distfiles/${PN}.png.tar
+ ftp://plasma-gate.weizmann.ac.il/pub/${PN}/src/stable/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="fftw fortran jpeg netcdf png"
+
+DEPEND="
+ media-libs/t1lib
+ media-libs/tiff:0
+ sys-libs/zlib
+ >=x11-libs/motif-2.3:0
+ x11-libs/xbae
+ fftw? ( sci-libs/fftw:2.1= )
+ jpeg? ( virtual/jpeg:0 )
+ netcdf? ( sci-libs/netcdf )
+ png? ( media-libs/libpng:0= )"
+RDEPEND="${DEPEND}
+ x11-misc/xdg-utils"
+
+PATCHES=(
+ # move tmpnam to mkstemp (adapted from debian)
+ "${FILESDIR}"/${PN}-5.1.22-mkstemp.patch
+ # fix configure instead of aclocal.m4
+ "${FILESDIR}"/${PN}-5.1.21-netcdf.patch
+ # fix for missing defines when fortran is disabled
+ "${FILESDIR}"/${PN}-5.1.21-fortran.patch
+ # fix a leak (from freebsd)
+ "${FILESDIR}"/${PN}-5.1.22-dlmodule.patch
+ "${FILESDIR}"/${PN}-5.1.22-ldflags.patch
+)
+
+pkg_setup() {
+ fortran-2_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # don't strip if not asked for
+ sed -i \
+ -e 's:$(INSTALL_PROGRAM) -s:$(INSTALL_PROGRAM):g' \
+ {auxiliary,grconvert,src}/Makefile || die
+
+ sed -i \
+ -e 's:$(GRACE_HOME)/bin:$(PREFIX)/bin:g' \
+ -e "s:\$(GRACE_HOME)/lib:\$(PREFIX)/$(get_libdir):g" \
+ -e 's:$(GRACE_HOME)/include:$(PREFIX)/include:g' \
+ -e 's:$(PREFIX)/man:$(PREFIX)/share/man:g' \
+ Makefile */Makefile || die "sed failed"
+
+ sed -i \
+ -e 's:bin/grconvert:grconvert:' \
+ -e 's:auxiliary/fdf2fit:fdf2fit:' \
+ gracerc || die
+}
+
+src_configure() {
+ tc-export CC AR
+
+ # the configure script just produces a basic Make.conf
+ # and a config.h
+ econf \
+ --disable-pdfdrv \
+ --disable-xmhtml \
+ --without-bundled-xbae \
+ --without-bundled-t1lib \
+ --enable-grace-home="${EPREFIX}"/usr/share/${PN} \
+ --with-helpviewer="xdg-open %s" \
+ --with-editor="xdg-open %s" \
+ --with-printcmd="lpr" \
+ --x-includes="${EPREFIX}"/usr/include \
+ --x-libraries="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with fftw) \
+ $(use_enable fortran f77-wrapper) \
+ $(use_enable netcdf) \
+ $(use_enable jpeg jpegdrv) \
+ $(use_enable png pngdrv) \
+ $(use_with fortran f77 $(tc-getFC))
+}
+
+src_install() {
+ default
+
+ dosym ../../${PN}/examples /usr/share/doc/${PF}/examples
+ dosym ../../${PN}/doc /usr/share/doc/${PF}/html
+
+ doman "${ED%/}"/usr/share/doc/${PF}/html/*.1
+ rm -f "${ED%/}"/usr/share/doc/${PF}/html/*.1 || die
+
+ domenu "${FILESDIR}"/${PN}.desktop
+ doicon "${WORKDIR}"/${PN}.png
+}
diff --git a/sci-visualization/grace/metadata.xml b/sci-visualization/grace/metadata.xml
new file mode 100644
index 000000000000..61bf28cf2c69
--- /dev/null
+++ b/sci-visualization/grace/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>graphics@gentoo.org</email>
+ <name>Gentoo Graphics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Grace is a point-and-click tool that allows the user to draw X-Y
+ plots. This is the program formerly known as Xmgr.
+
+ A few of its features are: user defined scaling, tick marks, labels,
+ symbols, line styles, colors. Polynomial regression, splines, running
+ averages, DFT/FFT, cross/auto-correlation. Batch mode for unattended
+ plotting. Hardcopy support for PostScript, FrameMaker and several
+ image formats.
+</longdescription>
+</pkgmetadata>