From bd48b7007f9ca3770b50ffe37f049312f763205e Mon Sep 17 00:00:00 2001 From: Florian Tham Date: Fri, 24 Jan 2020 12:35:39 +0100 Subject: [PATCH] fix GSC lookup --- sci-astronomy/xephem/Manifest | 2 + .../files/xephem-3.7.7-fix_gsc_lookup.patch | 41 +++++++++++++ sci-astronomy/xephem/xephem-3.7.7-r101.ebuild | 59 +++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 sci-astronomy/xephem/files/xephem-3.7.7-fix_gsc_lookup.patch create mode 100644 sci-astronomy/xephem/xephem-3.7.7-r101.ebuild diff --git a/sci-astronomy/xephem/Manifest b/sci-astronomy/xephem/Manifest index 7fd959b..a5e2b85 100644 --- a/sci-astronomy/xephem/Manifest +++ b/sci-astronomy/xephem/Manifest @@ -1,3 +1,4 @@ +AUX xephem-3.7.7-fix_gsc_lookup.patch 1809 BLAKE2B ab4cffe222761f79e1cee37dc5933f1c2f02aee491aec95595b7422f6643ef29eb0315366bed6a0358ad50d158c56f92741f1403b661aabeca2a68a3dc93f8f9 SHA512 37155ec90da672940bc603ea4f91202d5ca018cea3f3ccbf12e1fa72f5c7fa470376c8288be4bc8b8b66bc0e62e5685b85c8b4dacbf126665f22b47a079bc9d4 AUX xephem-3.7.7-implicits.patch 305 BLAKE2B ad16733b6d44619528af60a33710f3b558a16ebd24bad15b2c1ccf728a113f5495c5f26ded2c1ac61a3fedb9f916571b8bf8076527c7c2ee1353e212e710b319 SHA512 220186bb7f72fe0de6ca75a67df7b1a4d4cc57cc4768d565dc8225e20df93738c7bdd62bde6297941d1ec6638800950ef56e355de8ca1e3e8192b903b021adba AUX xephem-3.7.7-no_xprint.patch 262 BLAKE2B 6676f7e94978d4433f3f26ff3ec4738fd3f5735462806b7f19e7aa4b7671e62e8f7e894071a04f5a90510782b8a57ab0de0a722d4c5520d5c1cf5bbc0c4c9f52 SHA512 d0277edb3c011bf606803a280461410263fe9986d164df28a6801d3bcd7a0a21405728f9d27fd3dfa1a620e4b364d1d8b65843382bd99a2cf2c3e05755a277c2 AUX xephem-3.7.7-respect_env_vars.patch 3781 BLAKE2B e596c7216c0f70145a189696ff890e136ba282113dc5c9acee4808f7a6474f7e0d9295997ee4dbc595dd8a50d1cb67d22e138b465a82a13a2e294a093f0a7061 SHA512 84a9697c3b05ed28bcc59f4b30807aad76c3228e1aec3db898995d36cae3ef58557ff984a57f60b99e15dd04670a65061451dc00437498c14ed081c0cf06830d @@ -5,4 +6,5 @@ AUX xephem-3.7.7_openssl.patch 20456 BLAKE2B 668162e05035c419e3f0624f5f2fbf46787 AUX xephem-3.7.7_openssl_earthmenu.patch 2536 BLAKE2B 22c18a98db2c8c03e9c96be4524e4cd1a433038d45d767da8e61881626824a5499809c9f8ae5cb6c0628c937bfc602c98885c7413adf7f89ccb1613d31951099 SHA512 8263df72d8275a2abddf3a6ace10d1db88693d98064e8bdca0adbf131798e02956db4106978f0516583e59ecdb130f556081afc2e4de88bafdc2e34dabd23d35 DIST xephem-3.7.7.tar.gz 18128523 BLAKE2B 85173bfb21e31198aab9231f6020267beadd4750c832d514f06983ea9c88487c4175d3ac0e7b973a8fb41785658e0155e23be6cb89ac370f9a908e6eff8ea5e8 SHA512 d9cfecf0ce8aa495f66fcf6772ca7df0638cef8b9f18d9d6cbf013846a7575786ae9b5c515abc2058783baa7610320c893ddbc6f68bae28c65661a1c73b88634 EBUILD xephem-3.7.7-r100.ebuild 1377 BLAKE2B b59d387b2462ac5428429826a9668ee468fc43a6f56be1520de0835c9bc6f467a5b1f8feb60ae9707c36c7609c263cd0c1b30b23b12d35c7a5018f97ca278474 SHA512 757e40b5deba336f8b2a515af8c5aa86765d15ba1ef2c7ab8a457bde88e4e1c22abb7da590f3a4c3b35a30963c80a319c5dd1a7ad466aa17597f38d1f72a329c +EBUILD xephem-3.7.7-r101.ebuild 1418 BLAKE2B d232241f8e8eb19f0795fc45b7ca0bb70a86876c1d6b294ef90edc3cc83e4891a7fe60c93ad44bb56b0f055da8119f9fa57ce771fcc6e267fba1f0e1fd4c59d7 SHA512 6f6b2283174599cedf6e54bd89397bbd05e165f6ae6cffa6a8c988cf49d887accce54a04ef0fe5e48c79861f989173dfe3178175af96014c27f1e1399dfaa03b MISC metadata.xml 730 BLAKE2B c1e84de3e52a140cf7641db3d63d47176a50d2dced49c61dbc0d2b4e8eb8a6a8e689cfbec88e67eba9a0372b3ff7cbcd13938da68add5f558058d11b9e07b7df SHA512 faf972aa6cc2761a5aa05994b3718af494c9cc3e4130204128dff553f35c54db96556d713fbc648b0aff9e4058af94eb9e74edfc697423a82e821b1ddfaae8c8 diff --git a/sci-astronomy/xephem/files/xephem-3.7.7-fix_gsc_lookup.patch b/sci-astronomy/xephem/files/xephem-3.7.7-fix_gsc_lookup.patch new file mode 100644 index 0000000..305c0b8 --- /dev/null +++ b/sci-astronomy/xephem/files/xephem-3.7.7-fix_gsc_lookup.patch @@ -0,0 +1,41 @@ +--- a/GUI/xephem/gscnet.c 2020-01-24 12:20:10.210100009 +0100 ++++ b/GUI/xephem/gscnet.c 2020-01-24 12:20:43.711842644 +0100 +@@ -29,7 +29,7 @@ + { + #define GSC23MAXFOV degrad(30./60.0) /* max fov */ + /* http://gsss.stsci.edu/webservices/vo/ConeSearch.aspx?RA=10.0&DEC=5.0&SR=0.2&FORMAT=CSV */ +- static char ifmt[] = "%[^,],%lf,%lf,%*[^,],%*[^,],%*[^,],%*[^,],%lf,%lf,%*[^,],%*[^,],%lf,%lf,%lf,%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%d"; ++ static char ifmt[] = "%[^,],%*[^,],%lf,%lf,%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%lf,%*[^,],%*[^,],%lf,%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%lf,%*[^,],%*[^,],%lf,%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%*[^,],%d"; + static char gfmt[] = " GET http://%s%s?RA=%g&DEC=%g&SR=%g&FORMAT=CSV HTTP/1.0\r\nUser-Agent: xephem/%s\r\n\r\n"; + char host[1024]; + char buf[2048]; +@@ -80,7 +80,7 @@ + while ((n = recvlineb (sockfd, buf, sizeof(buf))) > 0) { + char name[1024]; + double radeg, decdeg; +- double fmag, jmag, bmag, vmag, rmag; ++ double fmag, jmag, bmag, vmag; + int class; + Obj *op; + +@@ -90,9 +90,9 @@ + + /* crack */ + if (sscanf (buf, ifmt, name, &radeg, &decdeg, &fmag, &jmag, &bmag, +- &vmag, &rmag, &class) != 9) ++ &vmag, &class) != 8) + continue; +- if (fmag>lmag && jmag>lmag && bmag>lmag && vmag>lmag && rmag>lmag) ++ if (fmag>lmag && jmag>lmag && bmag>lmag && vmag>lmag) + continue; + + /* good -- grow list */ +@@ -120,8 +120,6 @@ + set_fmag (op, vmag); + else if (bmag<=lmag) + set_fmag (op, bmag); +- else if (rmag<=lmag) +- set_fmag (op, rmag); + else if (fmag<=lmag) + set_fmag (op, fmag); + else diff --git a/sci-astronomy/xephem/xephem-3.7.7-r101.ebuild b/sci-astronomy/xephem/xephem-3.7.7-r101.ebuild new file mode 100644 index 0000000..e144a3e --- /dev/null +++ b/sci-astronomy/xephem/xephem-3.7.7-r101.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils toolchain-funcs + +DESCRIPTION="Interactive tool for astronomical ephemeris and sky simulation" +HOMEPAGE="http://www.clearskyinstitute.com/xephem" +SRC_URI="http://97.74.56.125/free/${P}.tar.gz" + +LICENSE="XEphem" +SLOT=0 +KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND=">=x11-libs/motif-2.3:0 + virtual/jpeg:0= + media-libs/libpng:0=" +DEPEND="${RDEPEND} + sys-apps/groff" + +PATCHES=( + "${FILESDIR}/${P}-respect_env_vars.patch" + "${FILESDIR}/${P}-implicits.patch" + "${FILESDIR}/${P}-no_xprint.patch" + "${FILESDIR}/${P}_openssl.patch" + "${FILESDIR}/${P}_openssl_earthmenu.patch" + "${FILESDIR}/${P}-fix_gsc_lookup.patch" +) + +src_prepare() { + default + echo > "${T}"/XEphem "XEphem.ShareDir: /usr/share/${PN}" + echo > "${T}"/99xephem "XEHELPURL=/usr/share/doc/${PF}/html/xephem.html" +} + +src_compile() { + tc-export CC AR RANLIB + emake -C GUI/xephem +} + +src_install() { + insinto /usr/share/X11/app-defaults + has_version '