diff options
author | Markus Dittrich <markusle@gentoo.org> | 2008-07-26 17:00:56 +0000 |
---|---|---|
committer | Markus Dittrich <markusle@gentoo.org> | 2008-07-26 17:00:56 +0000 |
commit | 9cba2b4251c13abcad076a71037f3ff63e4c2226 (patch) | |
tree | e1adbf6d3a6c4e57ea16aed8efc38efd9690ee63 /sci-visualization | |
parent | Stable on ppc wrt bug 232484 (diff) | |
download | gentoo-2-9cba2b4251c13abcad076a71037f3ff63e4c2226.tar.gz gentoo-2-9cba2b4251c13abcad076a71037f3ff63e4c2226.tar.bz2 gentoo-2-9cba2b4251c13abcad076a71037f3ff63e4c2226.zip |
Revision bump to pull in updated grace-5.1.22-mkstemp.patch. The previous patch version was faulty and caused printing to a file to fail (see bug #232742).
(Portage version: 2.2_rc3/cvs/Linux 2.6.25-SENTINEL-5 i686)
Diffstat (limited to 'sci-visualization')
-rw-r--r-- | sci-visualization/grace/ChangeLog | 12 | ||||
-rw-r--r-- | sci-visualization/grace/files/grace-5.1.22-mkstemp.patch | 48 | ||||
-rw-r--r-- | sci-visualization/grace/grace-5.1.22-r1.ebuild | 117 |
3 files changed, 152 insertions, 25 deletions
diff --git a/sci-visualization/grace/ChangeLog b/sci-visualization/grace/ChangeLog index 60b06f22b171..973b3b71817c 100644 --- a/sci-visualization/grace/ChangeLog +++ b/sci-visualization/grace/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sci-visualization/grace # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-visualization/grace/ChangeLog,v 1.34 2008/07/16 11:47:31 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-visualization/grace/ChangeLog,v 1.35 2008/07/26 17:00:56 markusle Exp $ + +*grace-5.1.22-r1 (26 Jul 2008) + + 26 Jul 2008; Markus Dittrich <markusle@gentoo.org> + files/grace-5.1.22-mkstemp.patch, +grace-5.1.22-r1.ebuild: + Revision bump to pull in updated grace-5.1.22-mkstemp.patch. The + previous patch version was faulty and caused printing to a file + to fail (see bug #232742). Thanks much to Stefano Carignano + <scary.moo@libero.it> and Sammy Umar + <umar@compsci.cas.vanderbilt.edu> for helping us track this down. *grace-5.1.22 (16 Jul 2008) diff --git a/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch b/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch index 5cb0f35ef9eb..402a5162c584 100644 --- a/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch +++ b/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch @@ -1,12 +1,30 @@ ---- src/plotone.c.orig 2008-07-16 11:36:43.000000000 +0100 -+++ src/plotone.c 2008-07-16 12:14:22.000000000 +0100 -@@ -119,21 +119,29 @@ - if (print_file[0] == '\0') { - Device_entry dev = get_device_props(hdevice); +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); -+ prstream = grace_openw(fname); } strcpy(fname, print_file); ++ prstream = grace_openw(fname); } else { + int hdfd; s = get_print_cmd(); @@ -35,21 +53,3 @@ if (prstream == NULL) { return; } ---- src/editpwin.c.orig 2008-07-16 11:37:01.000000000 +0100 -+++ src/editpwin.c 2008-07-16 11:39:37.000000000 +0100 -@@ -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 --git a/sci-visualization/grace/grace-5.1.22-r1.ebuild b/sci-visualization/grace/grace-5.1.22-r1.ebuild new file mode 100644 index 000000000000..ae8731a903df --- /dev/null +++ b/sci-visualization/grace/grace-5.1.22-r1.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-visualization/grace/grace-5.1.22-r1.ebuild,v 1.1 2008/07/26 17:00:56 markusle Exp $ + +EAPI="1" +inherit eutils fortran + +DESCRIPTION="Motif based XY-plotting tool" +HOMEPAGE="http://plasma-gate.weizmann.ac.il/Grace/" +SRC_URI="ftp://plasma-gate.weizmann.ac.il/pub/${PN}/src/stable/${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2 LGPL-2" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="fortran fftw jpeg netcdf pdf png" + +DEPEND="x11-libs/openmotif + sys-libs/zlib + media-libs/t1lib + media-libs/tiff + x11-libs/xbae + fftw? ( sci-libs/fftw:2.1 ) + netcdf? ( sci-libs/netcdf ) + png? ( media-libs/libpng ) + jpeg? ( media-libs/jpeg ) + pdf? ( media-libs/pdflib )" + +RDEPEND="${DEPEND} + x11-misc/xdg-utils" + +pkg_setup() { + if use fortran; then + FORTRAN="gfortran g77 ifc" + fortran_pkg_setup + fi +} + +src_unpack() { + unpack ${A} + + cd "${S}" + + # 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 and pdf driver (from freebsd) + epatch "${FILESDIR}"/${P}-dlmodule.patch + epatch "${FILESDIR}"/${P}-pdfdrv.patch + + # fix for glibc-2.7 (bug #217971) + # removed (bug #231607) + # epatch "${FILESDIR}"/${P}-stdc99.patch + + # don't strip if not asked for + sed -i \ + -e 's:$(INSTALL_PROGRAM) -s:$(INSTALL_PROGRAM):g' \ + {auxiliary,grconvert,src}/Makefile + + 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_compile() { + local myconf + if use fortran; then + myconf="--with-f77=${FORTRANC}" + else + myconf="--without-f77" + fi + + # the configure script just produces a basic Make.conf + # and a config.h + econf \ + --disable-xmhtml \ + --without-bundled-xbae \ + --without-bundled-t1lib \ + --enable-grace-home=/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) \ + $(use_enable pdf pdfdrv) \ + ${myconf} \ + || die "econf failed" + + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc CHANGES ChangeLog DEVELOPERS README COPYRIGHT \ + || die "dodoc failed" + + dosym ../../${PN}/examples /usr/share/doc/${PF}/examples + dosym ../../${PN}/doc /usr/share/doc/${PF}/html + + doman "${D}"/usr/share/doc/${PF}/html/*.1 + rm -f "${D}"/usr/share/doc/${PF}/html/*.1 + doicon "${FILESDIR}"/${PN}.png || die "failed installing icon" + make_desktop_entry xmgrace Grace grace +} |