aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2014-04-17 15:02:05 -0700
committerSébastien Fabbro <bicatali@gentoo.org>2014-04-17 15:02:05 -0700
commita5fb901955b87c7dad91865864b0449f487b3635 (patch)
treeb1157394a679e76da37019e7c205e7aabf350718 /sci-astronomy
parentMerge pull request #221 from erasmuswill/x11-misc/envytools (diff)
downloadsci-a5fb901955b87c7dad91865864b0449f487b3635.tar.gz
sci-a5fb901955b87c7dad91865864b0449f487b3635.tar.bz2
sci-a5fb901955b87c7dad91865864b0449f487b3635.zip
sci-astronomy/montage: fixed for more recent compiler versions, some warnings, and a leak
Package-Manager: portage-2.2.8-prefix
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/montage/ChangeLog5
-rw-r--r--sci-astronomy/montage/files/montage-3.3-gcc48.patch97
-rw-r--r--sci-astronomy/montage/montage-3.3.ebuild15
3 files changed, 111 insertions, 6 deletions
diff --git a/sci-astronomy/montage/ChangeLog b/sci-astronomy/montage/ChangeLog
index 87812f105..3ac296369 100644
--- a/sci-astronomy/montage/ChangeLog
+++ b/sci-astronomy/montage/ChangeLog
@@ -2,6 +2,11 @@
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 17 Apr 2014; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/montage-3.3-gcc48.patch, montage-3.3.ebuild:
+ sci-astronomy/montage: fixed for more recent compiler versions, some warnings,
+ and a leak
+
*montage-3.3 (16 Apr 2014)
16 Apr 2014; Sébastien Fabbro <bicatali@gentoo.org> +metadata.xml,
diff --git a/sci-astronomy/montage/files/montage-3.3-gcc48.patch b/sci-astronomy/montage/files/montage-3.3-gcc48.patch
new file mode 100644
index 000000000..4846b4c95
--- /dev/null
+++ b/sci-astronomy/montage/files/montage-3.3-gcc48.patch
@@ -0,0 +1,97 @@
+diff -Nur Montage_v3.3.orig/grid/Pegasus/mPresentation.c Montage_v3.3/grid/Pegasus/mPresentation.c
+--- Montage_v3.3.orig/grid/Pegasus/mPresentation.c 2009-12-10 19:54:51.000000000 -0800
++++ Montage_v3.3/grid/Pegasus/mPresentation.c 2014-04-17 14:36:28.735594113 -0700
+@@ -14,6 +14,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <strings.h>
++#include <string.h>
+
+ #define MAXLEN 20000
+
+diff -Nur Montage_v3.3.orig/lib/src/coord/ccalc.c Montage_v3.3/lib/src/coord/ccalc.c
+--- Montage_v3.3.orig/lib/src/coord/ccalc.c 2009-12-10 19:54:51.000000000 -0800
++++ Montage_v3.3/lib/src/coord/ccalc.c 2014-04-17 14:11:51.041349620 -0700
+@@ -25,7 +25,7 @@
+ static int ConvertfromDD(char *fmt, char *clongprec, char *clatprec,
+ char *clon, char *clat, double *lon, double *lat);
+ static char *downcase(char *s);
+-char *strdup(const char *s1);
++
+ int ParseUnits(char *cunit, int *chflag, CoordUnit *unit);
+ int ParsePrec(CoordUnit units, char *cprec, int longflag);
+
+diff -Nur Montage_v3.3.orig/lib/src/two_plane_v1.1/initdistdata.c Montage_v3.3/lib/src/two_plane_v1.1/initdistdata.c
+--- Montage_v3.3.orig/lib/src/two_plane_v1.1/initdistdata.c 2009-12-10 19:54:51.000000000 -0800
++++ Montage_v3.3/lib/src/two_plane_v1.1/initdistdata.c 2014-04-17 14:35:14.559081232 -0700
+@@ -1,8 +1,13 @@
+ #include <stdio.h>
++#include <string.h>
+ #include <strings.h>
+ #include "fitsio.h"
+ #include "distort.h"
+
++int parse_double(char *fitsheader, double *value, const char *key);
++int parse_int(char *fitsheader, int *value, const char *key);
++int parse_str(char *fitsheader, char *value, const char *key);
++
+ fitsfile *ffp_FITS_In;
+
+ int openfitsfile(char *fitsfilename)
+@@ -21,16 +26,16 @@
+ return 0;
+ }
+
+-closefitsfile()
++int closefitsfile()
+ {
+ int I_fits_return_status=0;
+ fits_close_file(ffp_FITS_In, &I_fits_return_status);
+ if (I_fits_return_status != 0)
+ {
+ fprintf(stderr, "Error closing file\n");
+- return;
++ return -1;
+ }
+- return;
++ return 0;
+ }
+
+ int initdata_byheader(char *fitsheader, DistCoeff *coeff)
+diff -Nur Montage_v3.3.orig/lib/src/two_plane_v1.1/two_plane.c Montage_v3.3/lib/src/two_plane_v1.1/two_plane.c
+--- Montage_v3.3.orig/lib/src/two_plane_v1.1/two_plane.c 2010-02-04 11:53:56.000000000 -0800
++++ Montage_v3.3/lib/src/two_plane_v1.1/two_plane.c 2014-04-17 14:43:20.094377873 -0700
+@@ -21,6 +21,11 @@
+ #include "two_plane.h"
+ #include "distort.h"
+
++int undistort(double u, double v, DistCoeff coeff, double *x, double *y);
++int distort(double x, double y, DistCoeff coeff, double *u, double *v);
++int initdata_byheader(char *fitsheader, DistCoeff *coeff);
++
++
+ int plane1_to_plane2_transform(double x_1, double y_1, double *x_2, double *y_2,
+ struct TwoPlane *two_plane){
+
+diff -Nur Montage_v3.3.orig/lib/src/wcstools-3.8.1/libwcs/imhfile.c Montage_v3.3/lib/src/wcstools-3.8.1/libwcs/imhfile.c
+--- Montage_v3.3.orig/lib/src/wcstools-3.8.1/libwcs/imhfile.c 2007-01-08 09:24:29.000000000 -0800
++++ Montage_v3.3/lib/src/wcstools-3.8.1/libwcs/imhfile.c 2014-04-17 14:40:06.993064103 -0700
+@@ -1019,7 +1019,6 @@
+ nbw = write (fd, image, nbimage);
+ close (fd);
+
+- free (pixname);
+ return (nbw);
+ }
+
+diff -Nur Montage_v3.3.orig/util/TblExec/mTblExec.c Montage_v3.3/util/TblExec/mTblExec.c
+--- Montage_v3.3.orig/util/TblExec/mTblExec.c 2009-12-10 19:54:51.000000000 -0800
++++ Montage_v3.3/util/TblExec/mTblExec.c 2014-04-17 14:49:34.896939154 -0700
+@@ -4,6 +4,7 @@
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <time.h>
++#include <unistd.h>
+
+ #include <mtbl.h>
+ #include <svc.h>
diff --git a/sci-astronomy/montage/montage-3.3.ebuild b/sci-astronomy/montage/montage-3.3.ebuild
index 370bf1a73..7e0440569 100644
--- a/sci-astronomy/montage/montage-3.3.ebuild
+++ b/sci-astronomy/montage/montage-3.3.ebuild
@@ -4,7 +4,7 @@
EAPI=5
-inherit toolchain-funcs
+inherit eutils toolchain-funcs
MYP=Montage_v${PV}
@@ -28,12 +28,15 @@ DEPEND="${RDEPEND}"
S="${WORKDIR}/${MYP}"
src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc48.patch
use doc && mv "${WORKDIR}"/docs/* docs/
- sed -i \
- -e "/CC.*=/s:\(gcc\|cc\):$(tc-getCC):g" \
- -e "/CFLAGS.*=/s:-g:${CFLAGS}:g" \
- -e "s:ar q:$(tc-getAR) q:g" \
- $(find . -name Makefile) || die
+ tc-export CC AR
+
+ find . -name Makefile\* | xargs sed -i \
+ -e "/^CC.*=/s:\(gcc\|cc\):$(tc-getCC):g" \
+ -e "/^CFLAGS.*=/s:-g:${CFLAGS}:g" \
+ -e "s:ar q:$(tc-getAR) q:g" || die
+
if use mpi; then
sed -i \
-e 's:# MPICC:MPICC:' \