summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2010-07-23 18:28:47 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2010-07-23 18:28:47 +0000
commit9931012f4bf267480988c44a6adb3bdf08ae155d (patch)
tree24c0a197ba2b1f60ccfb5dfbc11c59abd4893f0f /sci-mathematics
parentKeyword ~ppc64 wrt #329245. (diff)
downloadgentoo-2-9931012f4bf267480988c44a6adb3bdf08ae155d.tar.gz
gentoo-2-9931012f4bf267480988c44a6adb3bdf08ae155d.tar.bz2
gentoo-2-9931012f4bf267480988c44a6adb3bdf08ae155d.zip
Version bump. No more use of fortran eclass, updated patches, dependencies, some work to make it easier to maintain. Program not fully tested though.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/dataplot/ChangeLog12
-rw-r--r--sci-mathematics/dataplot/dataplot-20090821.ebuild83
-rw-r--r--sci-mathematics/dataplot/files/Makefile.am.2009082146
-rw-r--r--sci-mathematics/dataplot/files/configure.ac.2009082176
-rw-r--r--sci-mathematics/dataplot/files/dataplot-20090821-opengl.patch47
5 files changed, 262 insertions, 2 deletions
diff --git a/sci-mathematics/dataplot/ChangeLog b/sci-mathematics/dataplot/ChangeLog
index 60af517ab53a..32623a819ebb 100644
--- a/sci-mathematics/dataplot/ChangeLog
+++ b/sci-mathematics/dataplot/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-mathematics/dataplot
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/dataplot/ChangeLog,v 1.8 2009/12/26 17:45:37 pva Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/dataplot/ChangeLog,v 1.9 2010/07/23 18:28:47 bicatali Exp $
+
+*dataplot-20090821 (23 Jul 2010)
+
+ 23 Jul 2010; Sébastien Fabbro <bicatali@gentoo.org>
+ +dataplot-20090821.ebuild, +files/dataplot-20090821-opengl.patch,
+ +files/Makefile.am.20090821, +files/configure.ac.20090821:
+ Version bump. Still rough (untested fully). No more use of fortran eclass,
+ updated patches, dependencies, some work to make it easier to maintain
26 Dec 2009; Peter Volkov <pva@gentoo.org> dataplot-20080225.ebuild:
virtual/ghostscript->app-text/ghostscript-gpl: ghostscript-gpl is the only
diff --git a/sci-mathematics/dataplot/dataplot-20090821.ebuild b/sci-mathematics/dataplot/dataplot-20090821.ebuild
new file mode 100644
index 000000000000..c1d817eb85a5
--- /dev/null
+++ b/sci-mathematics/dataplot/dataplot-20090821.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/dataplot/dataplot-20090821.ebuild,v 1.1 2010/07/23 18:28:47 bicatali Exp $
+
+EAPI=3
+inherit eutils toolchain-funcs autotools
+
+# YEAR MONTH DAY
+MY_PV=${PV:0:4}_${PV:4:2}_${PV:6:2}
+MY_P=dpsrc_${MY_PV}
+# MY_PV_AUX usually ${MY_PV}
+MY_PV_AUX=2009_07_15
+MY_P_AUX=dplib.${MY_PV_AUX}
+
+DESCRIPTION="A program for scientific visualization and statistical analyis"
+HOMEPAGE="http://www.itl.nist.gov/div898/software/dataplot/"
+SRC_URI="ftp://ftp.nist.gov/pub/dataplot/unix/${MY_P}.tar.gz
+ ftp://ftp.nist.gov/pub/dataplot/unix/${MY_P_AUX}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples gd opengl X"
+
+COMMON_DEPEND="media-libs/plotutils
+ opengl? ( virtual/opengl )
+ gd? ( media-libs/gd[png,jpeg] )"
+DEPEND="${COMMON_DEPEND}
+ dev-util/pkgconfig"
+RDEPEND="${COMMON_DEPEND}
+ X? ( x11-misc/xdg-utils )"
+
+S="${WORKDIR}/${MY_P}"
+S_AUX="${WORKDIR}/${MY_P_AUX}"
+
+src_unpack() {
+ # unpacking and renaming because
+ # upstream does not use directories
+ mkdir "${S_AUX}"
+ pushd "${S_AUX}"
+ unpack ${MY_P_AUX}.tar.gz
+ popd
+ mkdir ${MY_P}
+ cd "${S}"
+ unpack ${MY_P}.tar.gz
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-opengl.patch
+ cp "${FILESDIR}"/Makefile.am.${PV} Makefile.am
+ cp "${FILESDIR}"/configure.ac.${PV} configure.ac
+ sed -e "s:IHOST1='SUN':IHOST1='@HOST@:" \
+ -e "s:/usr/local/lib:@datadir@:g" \
+ dp1_linux.f > dp1_linux.f.in || die
+ sed -e "s/(MAXOBV=.*)/(MAXOBV=@MAXOBV@)/" \
+ -e "s:/usr/local/lib:@datadir@:g" \
+ DPCOPA.INC > DPCOPA.INC.in || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable gd) \
+ $(use_enable opengl gl) \
+ $(use_enable X)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${S_AUX}"/data/* || die "installing examples failed"
+ fi
+ insinto /usr/share/dataplot
+ doins "${S_AUX}"/dp{mes,sys,log}f.tex || die "doins failed."
+ doenvd "${FILESDIR}"/90${PN} || die "doenvd failed"
+}
+
+pkg_postinst() {
+ elog "Before using dataplot, please run (as root):"
+ elog "env-update && source /etc/profile"
+}
diff --git a/sci-mathematics/dataplot/files/Makefile.am.20090821 b/sci-mathematics/dataplot/files/Makefile.am.20090821
new file mode 100644
index 000000000000..e10cf41ebd54
--- /dev/null
+++ b/sci-mathematics/dataplot/files/Makefile.am.20090821
@@ -0,0 +1,46 @@
+bin_PROGRAMS = dataplot
+dataplot_SOURCES = dp1_linux.f \
+ dp2.f dp3.f dp4.f dp5.f dp6.f dp7.f dp8.f dp9.f dp10.f dp11.f \
+ dp12.f dp13.f dp14.f dp15.f dp16.f dp17.f dp18.f dp19.f dp20.f dp21.f \
+ dp22.f dp23.f dp24.f dp25.f dp26.f dp27.f dp28.f dp29.f dp30.f dp31.f \
+ dp32.f dp33.f dp34.f dp35.f dp36.f dp37.f dp38.f dp39.f dp40.f dp41.f \
+ dp42.f dp43.f dp44.f dp45.f dp46.f \
+ dpcalc.f dpdds2.f dpdds3.f dpdds.f edinit.f edmai2.f edsear.f edsub.f \
+ edwrst.f fit3b.f starpac.f tcdriv_nopc.f aqua_src.f cluster.f compgeom.f \
+ optimi.f libplot_src.c rldp.c main.f
+
+if ENABLE_GD
+dataplot_SOURCES += gd_src.c
+else
+dataplot_SOURCES += gd_src.f
+endif
+
+if ENABLE_GL
+dataplot_SOURCES += gl_src.c
+else
+dataplot_SOURCES += gl_src.f
+endif
+
+if ENABLE_X11
+dataplot_SOURCES += x11_src.c
+else
+dataplot_SOURCES += x11src.f
+endif
+
+dataplot_CFLAGS = @GL_CFLAGS@
+dataplot_LDADD = @GD_LIBS@ @GL_LIBS@ @X11_LIBS@ $(FLIBS) -lreadline
+
+# this is to remove ambiguity between the similar filenames
+# of the c and f77 version (shortcoming of automake)
+# the f77 versions are forced
+# the c versions objects are called dataplot-gd_src.o etc
+gd_src.o: gd_src.f
+ $(F77COMPILE) -c -o $@ $<
+gl_src.o: gl_src.f
+ $(F77COMPILE) -c -o $@ $<
+aqua_src.o: aqua_src.f
+ $(F77COMPILE) -c -o $@ $<
+libplot_src.o: libplot_src.f
+ $(F77COMPILE) -c -o $@ $<
+rldp.o: rldp.f
+ $(F77COMPILE) -c -o $@ $<
diff --git a/sci-mathematics/dataplot/files/configure.ac.20090821 b/sci-mathematics/dataplot/files/configure.ac.20090821
new file mode 100644
index 000000000000..75ef115e58bc
--- /dev/null
+++ b/sci-mathematics/dataplot/files/configure.ac.20090821
@@ -0,0 +1,76 @@
+AC_PREREQ(2.59)
+AC_INIT([dataplot], [20080225], [n.heckert@nist.gov])
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_AUX_DIR(config)
+AM_MAINTAINER_MODE
+AM_INIT_AUTOMAKE([foreign])
+
+AC_PROG_CC
+AC_PROG_F77
+AC_F77_LIBRARY_LDFLAGS
+case $F77 in
+ *gfortran*) FFLAGS+=" -w -fno-range-check" ;;
+ *) ;;
+esac
+
+AC_CANONICAL_HOST
+case $host in
+ i?86*linux*) MAXOBV=100000 ;;
+ *64*linux*) MAXOBV=1000000 ;;
+esac
+AC_SUBST(MAXOBV)
+
+AC_ARG_ENABLE(gd,
+ [AS_HELP_STRING([--enable-gd], [Enable the gd device driver])],
+ [enable_gd=$enableval],
+ [enable_gd=no])
+
+AC_CHECK_LIB(plot, pl_closepl_r, ,
+ [AC_MSG_ERROR([plotutils libraries not found])])
+
+AC_ARG_ENABLE(gl,
+ [AS_HELP_STRING([--enable-gl], [Enable the OpenGL device driver])],
+ [enable_gl=$enableval],
+ [enable_gl=no])
+
+AC_ARG_ENABLE(X,
+ [AS_HELP_STRING([--enable-X], [Enable the X11 device driver])],
+ [enable_x11=$enableval],
+ [enable_x11=no])
+
+if test x"$enable_gd" = x"yes"; then
+ AC_CHECK_PROG(enable_gd, [gdlib-config],,
+ [AC_MSG_ERROR([GD driver requested but gdlib-config not found])])
+ GD_LIBS="`gdlib-config --libs` -lgd"
+ GD_CFLAGS="`gdlib-config --cflags`"
+ AC_SUBST(GD_LIBS)
+ AC_SUBST(GD_CFLAGS)
+fi
+AM_CONDITIONAL(ENABLE_GD, [test x"$enable_gd" = x"yes"] )
+
+if test x"$enable_gl" = x"yes"; then
+dnl hardcoded opengl libs (should be host/implementation dependent)
+ AC_CHECK_HEADER(GL/gl.h,,
+ [AC_MSG_ERROR([OpenGL driver requested but header gl.h not found])])
+ AC_CHECK_HEADER(GL/glu.h,,
+ [AC_MSG_ERROR([OpenGL driver requested but header glu.h not found])])
+ GL_CFLAGS="-DUNIX_OS -DAPPEND_UNDERSCORE -DSUBROUTINE_CASE"
+ AC_SUBST(GL_CFLAGS)
+
+ AC_CHECK_LIB(GL, glXCreateContext, GL_LIBS="-lGL",
+ [AC_MSG_ERROR([OpenGL driver requested but libraries not found])])
+ AC_CHECK_LIB(GLU, gluPerspective, GL_LIBS="-lGL -lGLU",
+ [AC_MSG_ERROR([OpenGL driver requested but libraries not found])])
+ GL_LIBS="-lGL -lGLU"
+ AC_SUBST(GL_LIBS)
+fi
+AM_CONDITIONAL(ENABLE_GL, [ test x"$enable_gl" = x"yes" ])
+
+if test x"$enable_x11" = x"yes"; then
+ PKG_CHECK_MODULES(X11, x11,,
+ [AC_MSG_ERROR([X11 driver requested but pkgconfig module not found])])
+fi
+AM_CONDITIONAL(ENABLE_X11, [ test x"$enable_x11" = x"yes" ])
+
+AC_CONFIG_FILES([Makefile DPCOPA.INC dp1_linux.f])
+AC_OUTPUT
diff --git a/sci-mathematics/dataplot/files/dataplot-20090821-opengl.patch b/sci-mathematics/dataplot/files/dataplot-20090821-opengl.patch
new file mode 100644
index 000000000000..5810b6029b87
--- /dev/null
+++ b/sci-mathematics/dataplot/files/dataplot-20090821-opengl.patch
@@ -0,0 +1,47 @@
+--- gl_src.c.orig 2001-02-28 16:45:56.000000000 -0500
++++ gl_src.c 2008-04-10 17:03:03.000000000 -0400
+@@ -154,7 +154,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
+-#include <strings.h>
++#include <string.h>
+
+ #if UNIX == 0
+ #include <X11/Xlib.h>
+@@ -257,7 +257,7 @@
+ /* flags for current attribute settings */
+ static int OPEN_FLAG = 0; /* 0 - X11 closed, 1 - X11 open */
+ static int OPEN_FLAG_2 = 0; /* 0 - repeat graph window closed, 1 - open */
+-int GRAPH_FLAG = 0; /* 0 - gleras has not been called, 1 - gleras has been called */
++static int GRAPH_FLAG = 0; /* 0 - gleras has not been called, 1 - gleras has been called */
+ int WIDTH_CURRENT; /* current line width */
+ int LINE_STYLE_CURRENT; /* current line style */
+ char FONT_NAME_CURRENT[80]; /* name of current font */
+@@ -922,7 +922,7 @@
+ glNewList(list_id, GL_COMPILE_AND_EXECUTE);
+
+ glClearColor(red_temp,green_temp,blue_temp,1.0);
+- glclear(GL_COLOR_BUFFER_BIT);
++ glClear(GL_COLOR_BUFFER_BIT);
+
+ GRAPH_FLAG = 1;
+ }
+@@ -1486,7 +1486,7 @@
+ * Color only set if being changed.
+ */
+ #if APPEND_UNDERSCORE == 1 && SUBROUTINE_CASE == 1
+-void glseco(jcol, red, green, blue)
++void glseco_(jcol, red, green, blue)
+ #elif APPEND_UNDERSCORE == 1 && SUBROUTINE_CASE == 0
+ void GLSECO_(jcol, red, green, blue)
+ #elif APPEND_UNDERSCORE == 0 && SUBROUTINE_CASE == 1
+@@ -1691,7 +1691,7 @@
+ width = isize[0];
+ #endif
+ if (width < 1.0) width = 1.0;
+- glPointsize(width);
++ glPointSize(width);
+ glBegin(GL_POINTS);
+ #if PRECISION == 0
+ glVertex2f(*ix, *iy);