Gentoo Archives: gentoo-commits

From: Sebastien Fabbro <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-astronomy/xephem/files/, sci-astronomy/xephem/
Date: Mon, 29 Feb 2016 22:16:54
Message-Id: 1456787585.68cbf0ab6e2d940986c6902d72fab3b57e026c21.bicatali@gentoo
1 commit: 68cbf0ab6e2d940986c6902d72fab3b57e026c21
2 Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 29 22:27:44 2016 +0000
4 Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 29 23:13:05 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68cbf0ab
7
8 sci-astronomy/xephem: Version bump
9
10 Thanks Ooblick for his work.
11 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=572748
12
13 Package-Manager: portage-2.2.27
14
15 sci-astronomy/xephem/Manifest | 1 +
16 .../xephem/files/xephem-3.7.7-implicits.patch | 12 ++
17 .../files/xephem-3.7.7-respect_env_vars.patch | 137 +++++++++++++++++++++
18 sci-astronomy/xephem/xephem-3.7.7.ebuild | 56 +++++++++
19 4 files changed, 206 insertions(+)
20
21 diff --git a/sci-astronomy/xephem/Manifest b/sci-astronomy/xephem/Manifest
22 index 5205d30..22e06f8 100644
23 --- a/sci-astronomy/xephem/Manifest
24 +++ b/sci-astronomy/xephem/Manifest
25 @@ -1,2 +1,3 @@
26 DIST xephem-3.7.5.tar.gz 18908521 SHA256 edda7975bb690f74b1853d2729de2b0f4ada69fb37a08117ace7a22c23ee7d1a SHA512 58cd75e4cf8b541d818631e50453f14275cf81ca3349c442ac62eb7fa15509d3d2d57f88420f866312e41ecfd333c8aeeade7656a84e6e527811f98a26b8588d WHIRLPOOL 6d97bf755cc5e98909aa66c1a0ae942f32dd74541ef6e7c03d7c76214462a10929935a38a5a7c468e28ba315f019d9a0489e345f95ee547238d2250fdc9f8005
27 DIST xephem-3.7.6.tar.gz 17975496 SHA256 2080b628d80d52d9ff7148787e3093eb56f21fef5fba404f123b6198b2d64d05 SHA512 96d77852045e3d3cb996de5884a9272b2f3157216816acf3ad05a0bc60f20673fccc0f1efd54443cf7c38d0aaa86da1cf3f11989c2e37e26feb0cbd78855c84f WHIRLPOOL 94bba9595863cc30f5a058ea72dc4d4824d62355ce0bfef05c63a741667c064febb26bc4da884d7cc15ee04b74cf402031efbdbae844c458acc1c8cb0ec2a91a
28 +DIST xephem-3.7.7.tar.gz 18128523 SHA256 d1f8e17cfc5d2e3af5fd5a8bcf34bbf99a79d40f66326c098a819f82af62b4b7 SHA512 d9cfecf0ce8aa495f66fcf6772ca7df0638cef8b9f18d9d6cbf013846a7575786ae9b5c515abc2058783baa7610320c893ddbc6f68bae28c65661a1c73b88634 WHIRLPOOL 1986700ee6207b4a68ea8e5acb3c37f45286b48c5ed392934eb0b9beb2f9e733c2e995fc367da1f4079b7b48d9d92e2e5400658b9ed36cbf3961969f26e6013c
29
30 diff --git a/sci-astronomy/xephem/files/xephem-3.7.7-implicits.patch b/sci-astronomy/xephem/files/xephem-3.7.7-implicits.patch
31 new file mode 100644
32 index 0000000..4c34071
33 --- /dev/null
34 +++ b/sci-astronomy/xephem/files/xephem-3.7.7-implicits.patch
35 @@ -0,0 +1,12 @@
36 +sunmenu.c:920:3: warning: implicit declaration of function ‘strptime’
37 +
38 +--- a/GUI/xephem/sunmenu.c
39 ++++ b/GUI/xephem/sunmenu.c
40 +@@ -1,6 +1,7 @@
41 + /* code to manage the sun display
42 + */
43 +
44 ++#define _XOPEN_SOURCE /* See feature_test_macros(7) */
45 + #include <stdio.h>
46 + #include <stdlib.h>
47 + #include <errno.h>
48
49 diff --git a/sci-astronomy/xephem/files/xephem-3.7.7-respect_env_vars.patch b/sci-astronomy/xephem/files/xephem-3.7.7-respect_env_vars.patch
50 new file mode 100644
51 index 0000000..e916bd3
52 --- /dev/null
53 +++ b/sci-astronomy/xephem/files/xephem-3.7.7-respect_env_vars.patch
54 @@ -0,0 +1,137 @@
55 +diff -ruN a/GUI/xephem/Makefile b/GUI/xephem/Makefile
56 +--- a/GUI/xephem/Makefile 2015-08-09 22:36:50.000000000 +0100
57 ++++ b/GUI/xephem/Makefile 2016-01-24 09:34:24.378578717 +0000
58 +@@ -10,9 +10,9 @@
59 + # one executable, xephem.
60 +
61 + # These -I and -L flags point to the supporting XEphem libraries
62 +-LIBINC = -I../../libastro -I../../libip -I../../liblilxml -I../../libjpegd -I../../libpng -I../../libz
63 +-LIBLNK = -L../../libastro -L../../libip -L../../liblilxml -L../../libjpegd -L../../libpng -L../../libz
64 +-LIBLIB = -lastro -lip -llilxml -ljpegd -lpng -lz
65 ++LIBINC = -I../../libastro -I../../libip -I../../liblilxml
66 ++LIBLNK = -L../../libastro -L../../libip -L../../liblilxml
67 ++LIBLIB = -lastro -lip -llilxml -ljpeg -lpng -lz
68 +
69 + # MOTIFI is the directory containing the Xm directory of include files.
70 + # MOTIFL is the directory containing the libXm.a library.
71 +@@ -30,12 +30,9 @@
72 + endif
73 +
74 + # for linux and Apple OS X
75 +-CC = gcc
76 +-CLDFLAGS = -g
77 +-CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -Wall -I$(MOTIFI) -I/opt/X11/include
78 +-LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L/opt/X11/lib
79 + XLIBS = -lXm -lXp -lXt -lXext -lXmu -lX11
80 +-LIBS = $(XLIBS) $(LIBLIB) -lm
81 ++CFLAGS := $(LIBINC) $(CFLAGS)
82 ++LIBS = $(LIBLNK) $(XLIBS) $(LIBLIB) -lm
83 +
84 + # static linking on Apple using X11 libs from ports
85 + # CC = gcc
86 +@@ -68,9 +65,9 @@
87 + # MOTIFI = -I/usr/include
88 + # MOTIFL = -L/usr/lib
89 + # CC = cc
90 +-# CLDFLAGS =
91 ++# CLDFLAGS =
92 + # CFLAGS = $(LIBINC) $(CLDFLAGS) -O -I$(MOTIFI)
93 +-# LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL)
94 ++# LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL)
95 + # XLIBS = -lXm -lXt -lX11
96 + # LIBS = $(XLIBS) $(LIBLIB) -lsocket -lnsl -lc -lm /usr/ucblib/libucb.a
97 + # Note: if you get regex undefined, add -lgen to the end of LIBS.
98 +@@ -195,12 +192,9 @@
99 + nroff -man $? > $@
100 +
101 + libs:
102 +- cd ../../libastro; make
103 +- cd ../../libip; make
104 +- cd ../../libjpegd; make
105 +- cd ../../liblilxml; make
106 +- cd ../../libpng; make
107 +- cd ../../libz; make
108 ++ $(MAKE) -C ../../libastro
109 ++ $(MAKE) -C ../../libip
110 ++ $(MAKE) -C ../../liblilxml
111 +
112 + clean:
113 + rm -fr *.o ../../lib*/*.[ao]
114 +diff -ruN a/libastro/Makefile b/libastro/Makefile
115 +--- a/libastro/Makefile 2006-02-24 03:37:31.000000000 +0000
116 ++++ b/libastro/Makefile 2016-01-24 09:30:28.745982455 +0000
117 +@@ -4,8 +4,6 @@
118 + # compiler and flags
119 +
120 + # gcc
121 +-CC = gcc
122 +-CFLAGS= -O2 -Wall
123 +
124 + # macosx universal binary
125 + # CFLAGS= -O2 -Wall -arch i386 -arch ppc
126 +@@ -83,11 +81,11 @@
127 + vsop87_data.o
128 +
129 + libastro.a: $(HS) $(OBJS)
130 +- ar rv $@ $(OBJS)
131 +- ranlib $@
132 ++ $(AR) rv $@ $(OBJS)
133 ++ $(RANLIB) $@
134 +
135 + libastro.so: $(HS) $(OBJS)
136 +- $(CC) -shared -o $@ $(OBJS)
137 ++ $(CC) $(LDFLAGS) -shared -o $@ $(OBJS)
138 +
139 + clobber:
140 + rm -f *.o libastro.a
141 +diff -ruN a/libip/Makefile b/libip/Makefile
142 +--- a/libip/Makefile 2009-01-05 20:53:46.000000000 +0000
143 ++++ b/libip/Makefile 2016-01-24 09:30:28.745982455 +0000
144 +@@ -2,8 +2,7 @@
145 + # (C) 2001 Elwood Charles Downey
146 +
147 + # gcc
148 +-CC = gcc
149 +-CFLAGS= -I../libastro -O2 -Wall
150 ++CFLAGS += -I../libastro
151 +
152 + # macosx universal binary
153 + # CFLAGS= -I../libastro -O2 -Wall -arch i386 -arch ppc
154 +@@ -36,11 +35,11 @@
155 + HS = ip.h fsmatch.h
156 +
157 + libip.a: $(HS) $(OBJS)
158 +- ar rv $@ $(OBJS)
159 +- ranlib $@
160 ++ $(AR) rv $@ $(OBJS)
161 ++ $(RANLIB) $@
162 +
163 + libip.so: $(OBJS)
164 +- gcc -shared -o $@ $(OBJS)
165 ++ $(CC) $(LDFLAGS) -shared -o $@ $(OBJS)
166 +
167 + clobber:
168 + rm -f *.o libip.a
169 +diff -ruN a/liblilxml/Makefile b/liblilxml/Makefile
170 +--- a/liblilxml/Makefile 2006-02-24 03:37:32.000000000 +0000
171 ++++ b/liblilxml/Makefile 2016-01-24 09:30:28.745982455 +0000
172 +@@ -4,8 +4,6 @@
173 + # compiler and flags
174 +
175 + # gcc
176 +-CC = gcc
177 +-CFLAGS= -O2 -Wall
178 +
179 + # macosx universal binary
180 + # CFLAGS= -O2 -Wall -arch i386 -arch ppc
181 +@@ -27,8 +25,8 @@
182 + OBJS = lilxml.o base64.o
183 +
184 + liblilxml.a: $(HS) $(OBJS)
185 +- ar r $@ $(OBJS)
186 +- ranlib $@
187 ++ $(AR) r $@ $(OBJS)
188 ++ $(RANLIB) $@
189 +
190 + liltest: liltest.o liblilxml.a
191 + $(CC) $(LDFLAGS) -o liltest liltest.o liblilxml.a
192
193 diff --git a/sci-astronomy/xephem/xephem-3.7.7.ebuild b/sci-astronomy/xephem/xephem-3.7.7.ebuild
194 new file mode 100644
195 index 0000000..967573d
196 --- /dev/null
197 +++ b/sci-astronomy/xephem/xephem-3.7.7.ebuild
198 @@ -0,0 +1,56 @@
199 +# Copyright 1999-2016 Gentoo Foundation
200 +# Distributed under the terms of the GNU General Public License v2
201 +# $Id$
202 +
203 +EAPI=6
204 +
205 +inherit eutils toolchain-funcs
206 +
207 +DESCRIPTION="Interactive tool for astronomical ephemeris and sky simulation"
208 +HOMEPAGE="http://www.clearskyinstitute.com/xephem"
209 +SRC_URI="http://97.74.56.125/free/${P}.tar.gz"
210 +
211 +LICENSE="XEphem"
212 +SLOT=0
213 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
214 +IUSE=""
215 +
216 +RDEPEND=">=x11-libs/motif-2.3:0
217 + virtual/jpeg:0=
218 + media-libs/libpng:0="
219 +DEPEND="${RDEPEND}
220 + sys-apps/groff"
221 +
222 +PATCHES=(
223 + "${FILESDIR}/${P}-respect_env_vars.patch"
224 + "${FILESDIR}/${P}-implicits.patch"
225 +)
226 +
227 +src_prepare() {
228 + default
229 + echo > "${T}"/XEphem "XEphem.ShareDir: /usr/share/${PN}"
230 + echo > "${T}"/99xephem "XEHELPURL=/usr/share/doc/${PF}/html/xephem.html"
231 +}
232 +
233 +src_compile() {
234 + tc-export CC AR RANLIB
235 + emake -C GUI/xephem
236 +}
237 +
238 +src_install() {
239 + insinto /usr/share/X11/app-defaults
240 + has_version '<x11-base/xorg-x11-7.0' && insinto /etc/X11/app-defaults
241 + doins "${T}"/XEphem
242 + doenvd "${T}"/99xephem
243 + dodoc README
244 +
245 + cd GUI/xephem
246 + dobin xephem
247 + doman xephem.1
248 + newicon XEphem.png ${PN}.png
249 + insinto /usr/share/${PN}
250 + doins -r auxil catalogs fifos fits gallery lo
251 + insinto /usr/share/doc/${PF}/html
252 + doins -r help/*
253 + make_desktop_entry xephem XEphem ${PN}
254 +}