summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-visualization/grace
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-visualization/grace')
-rw-r--r--sci-visualization/grace/Manifest4
-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-libpng15.patch19
-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.22-r2.ebuild107
-rw-r--r--sci-visualization/grace/grace-5.1.22-r3.ebuild111
-rw-r--r--sci-visualization/grace/grace-5.1.23-r1.ebuild111
-rw-r--r--sci-visualization/grace/grace-5.1.23.ebuild111
-rw-r--r--sci-visualization/grace/metadata.xml16
13 files changed, 632 insertions, 0 deletions
diff --git a/sci-visualization/grace/Manifest b/sci-visualization/grace/Manifest
new file mode 100644
index 000000000000..f73411ce95bc
--- /dev/null
+++ b/sci-visualization/grace/Manifest
@@ -0,0 +1,4 @@
+DIST grace-5.1.22.tar.gz 2516576 SHA256 4ce8f058b6c1267a842419a3edbf471421dea9cf5744783745b6cb375cdf5f25 SHA512 0187f0305ff5e404e9adab60e9f3d328121c9ab8352f0b65fa523e2e9078dcee073d347a252a5e8b516728cae24b1ac0718b5011ab17247ae9ea9149336866d4 WHIRLPOOL 206ceb7dee5572e756fe67d528925705ab3b56913f26d8c9b066b07423cdd6b4e70c0739e3b66bdf7aa992dae243755f81ea097e1a33b94817322bc30b33274a
+DIST grace-5.1.23.tar.gz 2501364 SHA256 69527950fd9c056a76b7a6bf4ac37a9b87acc565c12a941ffae3c9c5a822ca10 SHA512 84b75639a5065fb0a39204b55e82471be90d78b22530e541a4e58cb5bcd94a59d51e91da38d9fecb9c23e21744c0c3b31bb9db4fd26c656233a19cffd1eef7d3 WHIRLPOOL f807245acd084973d6436f404fc9eb146543a8ce34e0089ded098e771564e9d3bc6ae7023463674101cd161a1463ab3b97ee80df5b18e191b1e9ab94c7e6afc4
+DIST grace.png 338 SHA256 70130b7ddb7a64cf2d866aaf472d8badb12d72ac288275709689c631e23da9bc SHA512 804a693b867ad63f34964c7388f61719c558d253cb2c7bc7b6bd0647ad9b3ddc6b23d3950091b6804e4a94736f024486cf3dcce5f877135def34712ee95e4031 WHIRLPOOL 6cef65fc9329e7f49541e193a84c4f86498f422951ced1bd228ce854bab43a9ba5d9dfb44f780b1dcb030892cebd657d6de385df92710062f56c38f1e6cccd94
+DIST grace.png.tar 10240 SHA256 05215c72a2f45b513ba508287b5f693af145719b7a85497320d1e1e17695e99c SHA512 e94970b92894e58fd481d2f81e615c38b77fab7039985516a2ad9b2bb2bb7a82f4e3e8cdb639e7c0d55eaad6bf8abc636a342c94a356e3bd0520824252faddcf WHIRLPOOL 448e1c659475e38331c3ff2f050de52feb01db9623c0a250c7702debe920abf7e9bc56373f442d91d11ad6f55da3e9bbc58f52c1251223bdf405202ae8309556
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..921d965f3893
--- /dev/null
+++ b/sci-visualization/grace/files/grace-5.1.21-fortran.patch
@@ -0,0 +1,26 @@
+--- grace_np/gracef_np.c.orig 2008-03-03 11:45:12.000000000 +0000
++++ 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..eabb27434e17
--- /dev/null
+++ b/sci-visualization/grace/files/grace-5.1.21-netcdf.patch
@@ -0,0 +1,11 @@
+--- configure.orig 2007-02-16 22:44:49.000000000 +0000
++++ 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..9e36b34e06f4
--- /dev/null
+++ b/sci-visualization/grace/files/grace-5.1.22-dlmodule.patch
@@ -0,0 +1,12 @@
+--- src/dlmodule.c.orig 2005-11-13 07:45:16.000000000 +0900
++++ 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-libpng15.patch b/sci-visualization/grace/files/grace-5.1.22-libpng15.patch
new file mode 100644
index 000000000000..43db9e0723a5
--- /dev/null
+++ b/sci-visualization/grace/files/grace-5.1.22-libpng15.patch
@@ -0,0 +1,19 @@
+--- src/rstdrv.c
++++ src/rstdrv.c
+@@ -53,6 +53,7 @@
+ #endif
+
+ #ifdef HAVE_LIBPNG
++# include <zlib.h>
+ # include <png.h>
+ #endif
+
+@@ -885,7 +886,7 @@
+ return;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return;
+ }
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.22-r2.ebuild b/sci-visualization/grace/grace-5.1.22-r2.ebuild
new file mode 100644
index 000000000000..5fc2aa5e8096
--- /dev/null
+++ b/sci-visualization/grace/grace-5.1.22-r2.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+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://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
+ sys-libs/zlib
+ >=x11-libs/motif-2.3:0
+ x11-libs/xbae
+ fftw? ( sci-libs/fftw:2.1 )
+ jpeg? ( virtual/jpeg )
+ netcdf? ( sci-libs/netcdf )
+ png? ( media-libs/libpng )"
+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}"/${P}-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}"/${P}-dlmodule.patch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-libpng15.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" \
+ $(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
+ make_desktop_entry xmgrace Grace grace
+}
diff --git a/sci-visualization/grace/grace-5.1.22-r3.ebuild b/sci-visualization/grace/grace-5.1.22-r3.ebuild
new file mode 100644
index 000000000000..f87a0fc19a9d
--- /dev/null
+++ b/sci-visualization/grace/grace-5.1.22-r3.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+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
+ http://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
+ sys-libs/zlib
+ >=x11-libs/motif-2.3:0
+ x11-libs/xbae
+ fftw? ( sci-libs/fftw:2.1 )
+ jpeg? ( virtual/jpeg )
+ netcdf? ( sci-libs/netcdf )
+ png? ( media-libs/libpng )"
+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}"/${P}-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}"/${P}-dlmodule.patch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-libpng15.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-r1.ebuild b/sci-visualization/grace/grace-5.1.23-r1.ebuild
new file mode 100644
index 000000000000..bf75efa73ff9
--- /dev/null
+++ b/sci-visualization/grace/grace-5.1.23-r1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ http://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
+ sys-libs/zlib
+ >=x11-libs/motif-2.3:0
+ x11-libs/xbae
+ fftw? ( sci-libs/fftw:2.1 )
+ jpeg? ( virtual/jpeg )
+ netcdf? ( sci-libs/netcdf )
+ png? ( media-libs/libpng )"
+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..134fe12d0f2c
--- /dev/null
+++ b/sci-visualization/grace/grace-5.1.23.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ http://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
+ sys-libs/zlib
+ >=x11-libs/motif-2.3:0
+ x11-libs/xbae
+ fftw? ( sci-libs/fftw:2.1 )
+ jpeg? ( virtual/jpeg )
+ netcdf? ( sci-libs/netcdf )
+ png? ( media-libs/libpng )"
+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/metadata.xml b/sci-visualization/grace/metadata.xml
new file mode 100644
index 000000000000..8aa335d964d1
--- /dev/null
+++ b/sci-visualization/grace/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <herd>graphics</herd>
+ <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>