commit:     397297785fbdfde84c7378475b0ac143796d242e
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  3 23:09:50 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Oct  3 23:09:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39729778

sci-astronomy/stuff: Fix -fno-common

Closes: https://bugs.gentoo.org/706944
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../stuff/files/stuff-1.26.0-fno-common.patch      | 60 ++++++++++++++++++++++
 sci-astronomy/stuff/stuff-1.26.0.ebuild            |  9 ++--
 2 files changed, 64 insertions(+), 5 deletions(-)

diff --git a/sci-astronomy/stuff/files/stuff-1.26.0-fno-common.patch 
b/sci-astronomy/stuff/files/stuff-1.26.0-fno-common.patch
new file mode 100644
index 00000000000..bb02fa9e26f
--- /dev/null
+++ b/sci-astronomy/stuff/files/stuff-1.26.0-fno-common.patch
@@ -0,0 +1,60 @@
+--- a/src/cosmo.c
++++ b/src/cosmo.c
+@@ -39,6 +39,11 @@
+ #include "cosmo.h"
+ #include "lf.h"
+ 
++char    gstr[MAXCHAR];
++int   bswapflag;
++
++double  H, H0, OmegaM, OmegaL, deltaMH;
++
+ /******************************** cosmo_dconf 
********************************/
+ /*
+ Conformal distance. Numerical integration along geodesic, allowing for a
+--- a/src/cosmo.h
++++ b/src/cosmo.h
+@@ -38,7 +38,7 @@
+ 
+ /*------------------------------ global variables 
---------------------------*/
+ 
+-double        H, H0, OmegaM, OmegaL, deltaMH;
++extern double H, H0, OmegaM, OmegaL, deltaMH;
+ 
+ /*-------------------------------- protos 
-----------------------------------*/
+ 
+--- a/src/globals.h
++++ b/src/globals.h
+@@ -29,8 +29,8 @@
+ #include      "types.h"
+ 
+ /*----------------------- miscellaneous variables 
---------------------------*/
+-char          gstr[MAXCHAR];
+-int           bswapflag;
++extern char           gstr[MAXCHAR];
++extern int            bswapflag;
+ 
+ /*------------------------------- functions 
---------------------------------*/
+ extern        void    error(int, char *, char *),
+--- a/src/prefs.c
++++ b/src/prefs.c
+@@ -53,6 +53,8 @@
+ #include      "prefs.h"
+ #include      "preflist.h"
+ 
++prefstruct  prefs;
++
+ /********************************* dumpprefs ********************************/
+ /*
+ Print the default preference parameters.
+--- a/src/prefs.h
++++ b/src/prefs.h
+@@ -136,7 +136,7 @@
+   double      time_diff;                      /* Execution time */
+   }   prefstruct;
+ 
+-prefstruct    prefs;
++extern prefstruct     prefs;
+ 
+ /*----------------------------- Internal constants 
--------------------------*/
+ 

diff --git a/sci-astronomy/stuff/stuff-1.26.0.ebuild 
b/sci-astronomy/stuff/stuff-1.26.0.ebuild
index cc672651f26..8c31f838acd 100644
--- a/sci-astronomy/stuff/stuff-1.26.0.ebuild
+++ b/sci-astronomy/stuff/stuff-1.26.0.ebuild
@@ -1,19 +1,18 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 DESCRIPTION="Tool for automatic generation of astronomical catalogs"
 HOMEPAGE="http://www.astromatic.net/software/stuff/";
 SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz";
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
 
 LICENSE="GPL-3"
 SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
 IUSE="threads"
 
-RDEPEND=""
-DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
 
 src_configure() {
        econf $(use_enable threads)

Reply via email to