summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2010-06-10 08:58:49 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2010-06-10 08:58:49 +0000
commit319f33b7ec10ed9ee10c06c124fa2e6469cb35cf (patch)
tree206fbf1557f388a3c718ce2293cc7680744c7564 /sci-astronomy
parentRemove old (diff)
downloadgentoo-2-319f33b7ec10ed9ee10c06c124fa2e6469cb35cf.tar.gz
gentoo-2-319f33b7ec10ed9ee10c06c124fa2e6469cb35cf.tar.bz2
gentoo-2-319f33b7ec10ed9ee10c06c124fa2e6469cb35cf.zip
Fixing header creation with >=GCC-4.4 wrt bug 322733. Thanks Diego for the report.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/ast/ChangeLog9
-rw-r--r--sci-astronomy/ast/ast-5.3.1-r1.ebuild37
-rw-r--r--sci-astronomy/ast/files/ast-5.3.1-gcc44.patch52
3 files changed, 97 insertions, 1 deletions
diff --git a/sci-astronomy/ast/ChangeLog b/sci-astronomy/ast/ChangeLog
index 736834ab19e1..4650e4e32018 100644
--- a/sci-astronomy/ast/ChangeLog
+++ b/sci-astronomy/ast/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-astronomy/ast
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/ast/ChangeLog,v 1.11 2010/01/27 07:00:53 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/ast/ChangeLog,v 1.12 2010/06/10 08:58:48 xarthisius Exp $
+
+*ast-5.3.1-r1 (10 Jun 2010)
+
+ 10 Jun 2010; Kacper Kowalik <xarthisius@gentoo.org> +ast-5.3.1-r1.ebuild,
+ +files/ast-5.3.1-gcc44.patch:
+ Fixing header creation with >=GCC-4.4 wrt bug 322733. Thanks Diego for the
+ report.
*ast-5.3.1 (27 Jan 2010)
diff --git a/sci-astronomy/ast/ast-5.3.1-r1.ebuild b/sci-astronomy/ast/ast-5.3.1-r1.ebuild
new file mode 100644
index 000000000000..4a3c36cb6773
--- /dev/null
+++ b/sci-astronomy/ast/ast-5.3.1-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/ast/ast-5.3.1-r1.ebuild,v 1.1 2010/06/10 08:58:48 xarthisius Exp $
+
+EAPI=2
+inherit eutils versionator
+
+MYP="${PN}-$(replace_version_separator 2 '-')"
+
+DESCRIPTION="Library for handling World Coordinate Systems in astronomy"
+HOMEPAGE="http://starlink.jach.hawaii.edu/starlink/AST"
+SRC_URI="${HOMEPAGE}?action=AttachFile&do=get&target=${MYP}.tar.gz -> ${MYP}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+RDEPEND="sci-libs/pgplot"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ # dont patch/sed Makefile.am because it requires special upstream automake
+ # not shipped
+ epatch "${FILESDIR}"/${PN}-5.1.0-makefile.in.patch \
+ "${FILESDIR}"/${P}-gcc44.patch
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ rm -rf "${D}"usr/{docs,help,manifests,news,share} || die
+ dodoc ast.news fac_1521_err
+ if use doc; then
+ dodoc *.ps || die "doc install failed"
+ fi
+}
diff --git a/sci-astronomy/ast/files/ast-5.3.1-gcc44.patch b/sci-astronomy/ast/files/ast-5.3.1-gcc44.patch
new file mode 100644
index 000000000000..94b1c07ed335
--- /dev/null
+++ b/sci-astronomy/ast/files/ast-5.3.1-gcc44.patch
@@ -0,0 +1,52 @@
+--- makeh
++++ makeh
+@@ -36,6 +36,11 @@
+ # the temporary directory.
+ # 2-MAR-2006 (DSB):
+ # Check for "config.h" as well as <config.h>
++# 6-JAN-2010 (DSB):
++# Add work-around for GCC 4.4.2 problem - the pre-processor seesm to simply
++# throw away backslshes that escape newlines in the input header file. Reported
++# by Bryan Irby at GSFC.
++
+ #-
+
+ ( $#ARGV >= 0 ) || Usage();
+@@ -232,6 +237,9 @@
+ open( INCLUDE, "$srcdir/$file" )
+ || die "Can't open input file " . $srcdir/$file;
+
++# Inicate we have no deferred text to write out.
++ $total = "";
++
+ # Open an output file with the same name in the temporary directory.
+ $tmp_file = $file;
+ $tmp_file =~ s|^.*/||;
+@@ -270,8 +278,25 @@
+ s/__LINE__/___LINE__/g;
+ s/__FILE__/___FILE__/g;
+
+-# Write the modified include file.
+- print( TEMP );
++# Some pre-processors (e.g. GCC 4.4.2) seem to simply throw away trailing
++# backslashes used to concatenate consecutive lines, producing two
++# independent lines in the output rather than one. This completely fouls
++# up the resulting header file. To avoid this, we concatenate such lines
++# explicitly, before writing them out to the temporary output file.
++# If the current line ends with an escaped newline, remove the escape
++# character and newline, and concatenate it with any previously deferred
++# lines.
++ if( /^(.*)\\\s*$/ ) {
++ $total .= $1;
++
++# If the current line does not end with an escaped newline, concatenate it
++# with any previously deferred lines, and write the total string out. Then
++# reset the total string to indicate we have no deferred text.
++ } else {
++ $total .= $_;
++ print TEMP $total;
++ $total = "";
++ }
+ }
+
+ # Close each file when done.