Fixing header creation with >=GCC-4.4 wrt bug 322733. Thanks Diego for the report.
authorKacper Kowalik <xarthisius@gentoo.org>
Thu, 10 Jun 2010 08:58:49 +0000 (08:58 +0000)
committerKacper Kowalik <xarthisius@gentoo.org>
Thu, 10 Jun 2010 08:58:49 +0000 (08:58 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

sci-astronomy/ast/ChangeLog
sci-astronomy/ast/Manifest
sci-astronomy/ast/ast-5.3.1-r1.ebuild [new file with mode: 0644]
sci-astronomy/ast/files/ast-5.3.1-gcc44.patch [new file with mode: 0644]

index 736834ab19e14c4eaabd41d78d2e2f95ce0a2f9c..4650e4e320182408c5de648e6475e2233bbfe99c 100644 (file)
@@ -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)
 
index 63e90f4c995beeeb3ce8c071ab2f39fdff11f8eb..df02537c503c995097e4e1bd69349fc1b83c45c6 100644 (file)
@@ -1,5 +1,7 @@
 AUX ast-5.1.0-makefile.in.patch 3331 RMD160 3a533ef384f1fc6a8d7519aebc728c47e2cafd50 SHA1 c92196547a6b7f8c47ff1011a64f0b4c3ad94e23 SHA256 5fb2b991a2ae492871003853256041756307b41481fe091ea642da78f9eb3b8d
+AUX ast-5.3.1-gcc44.patch 1816 RMD160 0ee39a32ef7ce901a61a3ed77e97f2ee53434be4 SHA1 04a36492ae8b906b950082b180d94196078ce9ab SHA256 0143e77fa9d82f74000c69aa93091f66e3c37a551d672a1258dc18863803c14c
 DIST ast-5.3-1.tar.gz 11831030 RMD160 bcc337b821e7879a54fd36137033a4dd88b1303b SHA1 c058243a370f9ae2e69fb15c869398cb755fed1e SHA256 7c7f6ccbbc0b41ea4d02ffb4221e78f390aed57614f530cddf7cf13ad457b0ee
+EBUILD ast-5.3.1-r1.ebuild 1081 RMD160 c20d62236477314ac4f38a5a5ee1f01a8878c257 SHA1 9fc4499e190b480c9ab69dde97c6fd3a6ef3582c SHA256 598a3ad87de65eb96199302b841b804bc0e7da401f30eecdb0e8f3888b46b4b3
 EBUILD ast-5.3.1.ebuild 1041 RMD160 249235ad2a0fa76b25f5258a008edfb836be8b40 SHA1 faecea5039d4d34bb2ecf6a7689d921cffcf23da SHA256 8966c49f618e9f96fe85024c925583e830cab804014f200fa1ba1a026aa360b4
-MISC ChangeLog 1974 RMD160 b5dbdf4877f6734d916286da754d69974c0b06e9 SHA1 4ff207aef4d55c67ef2946bbee846f47328ed0ca SHA256 6f571d2ec1c5b615321ac64fbccdf3a5f38ebf6cde5ad7c8e53d9be0a9be8558
+MISC ChangeLog 2201 RMD160 9ec653263566480beb69d806a353f79171671f64 SHA1 09977964109eecd2c16434faff6b726c91dd579a SHA256 6c1142760da50ccc532cfa669337726df3b2a8951712f81944ffd536f42b6648
 MISC metadata.xml 525 RMD160 0ae28b2258b73b243a0a15af6be1451aaeff7e36 SHA1 6f630d82b6864565d1accaa59c27ed08477e222d SHA256 89798b5d9777297df075ff76257d62740b18eed26028938fa2e13a8686068cfa
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 (file)
index 0000000..4a3c36c
--- /dev/null
@@ -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 (file)
index 0000000..94b1c07
--- /dev/null
@@ -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.