summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Anderson <gentoofan23@gentoo.org>2008-04-12 13:31:46 +0000
committerThomas Anderson <gentoofan23@gentoo.org>2008-04-12 13:31:46 +0000
commit7f87ad468b38011c04f598a6ad3135faa0dc0509 (patch)
tree0dd8738bfbc3e84cd234084146327e01c9829f74 /sci-mathematics
parentsci-libs/openfoam: Fix patch as it is now in DISTDIR (diff)
downloadsunrise-7f87ad468b38011c04f598a6ad3135faa0dc0509.tar.gz
sunrise-7f87ad468b38011c04f598a6ad3135faa0dc0509.tar.bz2
sunrise-7f87ad468b38011c04f598a6ad3135faa0dc0509.zip
sci-mathematics/dataplot: New Ebuild for bug #217390, thanks to Tommy[D] for reviewing
svn path=/sunrise/; revision=6032
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/dataplot/ChangeLog9
-rw-r--r--sci-mathematics/dataplot/Manifest6
-rw-r--r--sci-mathematics/dataplot/dataplot-20080225.ebuild119
-rw-r--r--sci-mathematics/dataplot/files/dpsrc-patchset-20080225.patch69
-rw-r--r--sci-mathematics/dataplot/metadata.xml5
5 files changed, 208 insertions, 0 deletions
diff --git a/sci-mathematics/dataplot/ChangeLog b/sci-mathematics/dataplot/ChangeLog
new file mode 100644
index 000000000..a06713b73
--- /dev/null
+++ b/sci-mathematics/dataplot/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for sci-mathematics/dataplot
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 12 Apr 2008; Thomas Anderson (gentoofan23) <gentoofan23@gmail.com>
+ +dataplot-20080225.ebuild, +files/dpsrc-patchset-20080225.patch,
+ +metadata.xml:
+ New Ebuild for bug #217390, thanks to Tommy[D] for reviewing
+
diff --git a/sci-mathematics/dataplot/Manifest b/sci-mathematics/dataplot/Manifest
new file mode 100644
index 000000000..7252b52c0
--- /dev/null
+++ b/sci-mathematics/dataplot/Manifest
@@ -0,0 +1,6 @@
+AUX dpsrc-patchset-20080225.patch 2672 RMD160 5877cc97e034c52a4228fe19d87fc2d9a7ae043d SHA1 4377f353fb3de6f598884d542fc0c1842a3c29a9 SHA256 022995d5dca408d099c95165476c47f633a91273b931405cb1a90b27ae1113a1
+DIST dplib.02_25_2008.tar.gz 5340447 RMD160 51b5892c83bb5d420f324e3dab5edec24925f728 SHA1 3a77ed5e1e49f377083a11b8a177f678284b91f2 SHA256 7f9a30ae8ab029e0eeca4fbe08e665b572ec98a05ec001a67f95e4857d2a5b05
+DIST dpsrc.02_25_2008.tar.gz 6399167 RMD160 ed14f8ceb225e86f25026916ab4934a140f602ae SHA1 f1023d99ec7d2a64611dabedfbc5ad6f16e67cf7 SHA256 794bedcc48cf444c5813f864f4bacb158474d450337279edaf7fba1055c552c6
+EBUILD dataplot-20080225.ebuild 2982 RMD160 cbfa4ac1d88a55e1f5cd747124cc521e8d0c7be2 SHA1 e051de49ff4b9ff465e7c235b48b4f612f3a3911 SHA256 b97e46556d2f863fab08461336c772af31b8e1daf192ace34f3953e76a3763fa
+MISC ChangeLog 342 RMD160 ddbb97a7d041f76288658b05cd717ab03dedf3d9 SHA1 bad35c8549bffce47e5fbb8e8b304d281371b184 SHA256 bf35239ab57a9707ff740471ef37b2386a52e1246c81756eaa4b8ea42f1e79de
+MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/sci-mathematics/dataplot/dataplot-20080225.ebuild b/sci-mathematics/dataplot/dataplot-20080225.ebuild
new file mode 100644
index 000000000..4f8c80a56
--- /dev/null
+++ b/sci-mathematics/dataplot/dataplot-20080225.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit toolchain-funcs fortran eutils
+
+## PVD->Day component
+## PVM->Month component
+## PVY->Year component
+MY_PVD="${PV:6:2}"
+MY_PVM="${PV:4:2}"
+MY_PVY="${PV:0:4}"
+MY_PV="${MY_PVM}_${MY_PVD}_${MY_PVY}"
+
+DESCRIPTION="A statistics plotter"
+HOMEPAGE="http://www.itl.nist.gov/div898/software/dataplot/"
+SRC_URI="ftp://ftp.nist.gov/pub/dataplot/unix/dpsrc.${MY_PV}.tar.gz
+ examples? ( ftp://ftp.nist.gov/pub/dataplot/unix/dplib.${MY_PV}.tar.gz )"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples gd opengl X"
+
+DEPEND="${RDEPEND}"
+RDEPEND="X? ( x11-libs/libX11 )
+ opengl? ( virtual/opengl )
+ gd? ( media-libs/gd )"
+
+S="${WORKDIR}/dpsrc"
+LIBS="${WORKDIR}/dplib"
+
+pkg_setup() {
+ #Dataplot requires media-libs/gd to be built with USE="png jpeg"
+ if ! built_with_use -a media-libs/gd png jpeg; then
+ eerror "media-libs/gd is not compiled with USE=\"png jpeg\""
+ eerror "Please recompile media-libs/gd, ensuring USE=\"png jpeg\""
+ die
+ fi
+
+ need_fortran g77 gfortran
+}
+
+src_unpack() {
+ mkdir dpsrc && cd "${S}"
+ unpack dpsrc.${MY_PV}.tar.gz
+ ##Arches!: Add your architecture name here in the braces if you are 64-bit!
+ if use {amd64}; then
+ cp dp1_linux_64.f dp1.f
+ cp DPCOPA_BIG.INC DPCOPA.INC
+ else
+ cp dp1_linux.f dp1.f
+ fi
+
+ epatch "${FILESDIR}/dpsrc-patchset-${PV}.patch"
+ if use examples; then
+ mkdir "${LIBS}" && cd "${LIBS}"
+ unpack dplib.${MY_PV}.tar.gz
+ fi
+}
+
+src_compile() {
+ FFLAGS="${FFLAGS} -fno-range-check -c"
+
+ for i in {1..46}; do
+ FORTRANSOURCES+="dp${i}.f "
+ done
+
+ FORTRANSOURCES+=" dpcalc.f dpdds2.f dpdds3.f
+ dpdds.f edinit.f edmai2.f edsear.f
+ edsub.f edwrst.f fit3b.f gl_src.f
+ starpac.f tcdriv_nopc.f aqua_src.f"
+
+ for i in ${FORTRANSOURCES}; do
+ einfo "Compiling ${i}..."
+ $FORTRANC -w ${FFLAGS} ${i} || die "Fortran Compile failed for file: ${i}"
+ done
+
+ use X && LDFLAGS="${LDFLAGS} -L/usr/$(get_libdir) -lX11"
+ use opengl && LDFLAGS="${LDFLAGS} -L/usr/$(get_libdir)/opengl/xorg-x11/lib -lGL -lGLU"
+ use gd && LDFLAGS="${LDFLAGS} -lgd -lpng -ljpeg -lz"
+
+ ##Compile x11/gd/opengl device drivers
+
+ if use gd; then
+ $(tc-getCC) -c ${CFLAGS} -I/usr/include/GL gd_src.c || die "Compiling gd_src.c
+ failed!"
+ else
+ ${FORTRANC} ${FFLAGS} gd_src.f || die "Compiling gd_src.f failed!"
+ fi
+
+ if use opengl; then
+ $(tc-getCC) -c ${CFLAGS} -DUNIX_OS -DAPPEND_UNDERSCORE \
+ -DSUBROUTINE_CASE gl_src.c || die "Compiling gl_src.c
+ failed!"
+ else
+ ${FORTRANC} ${FFLAGS} gl_src.f || die "Compiling gl_src.f failed!"
+ fi
+
+ if use X; then
+ $(tc-getCC) -c ${CFLAGS} -I/usr/include/X11 x11_src.c || die "Compiling x11_src.c
+ failed!"
+ else
+ ${FORTRANC} ${FFLAGS} x11src.f || die "Compiling x11_src.f failed!"
+ fi
+
+ #Link!
+ ${FORTRANC} -o dataplot main.f *.o ${LDFLAGS} || die "Linking failed!"
+}
+
+src_install() {
+ dobin dataplot
+
+ if use examples; then
+ cd "${LIBS}"
+ insinto /usr/share/${PN}
+ doins -r data
+ fi
+}
diff --git a/sci-mathematics/dataplot/files/dpsrc-patchset-20080225.patch b/sci-mathematics/dataplot/files/dpsrc-patchset-20080225.patch
new file mode 100644
index 000000000..dbb95da2a
--- /dev/null
+++ b/sci-mathematics/dataplot/files/dpsrc-patchset-20080225.patch
@@ -0,0 +1,69 @@
+diff -Naur dpsrc-orig/gl_src.c dpsrc/gl_src.c
+--- dpsrc-orig/gl_src.c 2001-02-28 16:45:56.000000000 -0500
++++ dpsrc/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);
+diff -Naur dpsrc-orig/x11_src.c dpsrc/x11_src.c
+--- dpsrc-orig/x11_src.c 2007-08-23 13:57:06.000000000 -0400
++++ dpsrc/x11_src.c 2008-04-10 17:02:18.000000000 -0400
+@@ -214,7 +214,7 @@
+ /* add following 2 lines MAY 1995 */
+ #include <stdlib.h>
+ #include <math.h>
+-#include <strings.h>
++#include <string.h>
+
+ /* global definitions */
+
+@@ -507,7 +507,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 - xerase has not been called, 1 - xerase has been called */
++static int GRAPH_FLAG = 0; /* 0 - xerase has not been called, 1 - xerase has been called */
+ int WIDTH_CURRENT; /* current line width */
+ int LINE_STYLE_CURRENT; /* current line style */
+ int CAP_STYLE_CURRENT; /* current cap style */
diff --git a/sci-mathematics/dataplot/metadata.xml b/sci-mathematics/dataplot/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/sci-mathematics/dataplot/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>