summaryrefslogtreecommitdiff
path: root/sci-astronomy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-04-05 21:52:00 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-04-05 21:52:00 +0100
commit2d446203bcf1a0db08e99abca43513d246dfa73d (patch)
treeec623bb5f1f389976977e375342ec59ff441eab7 /sci-astronomy
parent171a011ad3a131671aeb5a98b9e3adf219ad2865 (diff)
gentoo resync : 05.04.2018
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/Manifest.gzbin6854 -> 6857 bytes
-rw-r--r--sci-astronomy/celestia/Manifest19
-rw-r--r--sci-astronomy/celestia/celestia-9999.ebuild158
-rw-r--r--sci-astronomy/celestia/files/celestia-1.5.0-desktop.patch16
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.0-cfg.patch4
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.1-gcc46.patch4
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.1-libpng15.patch4
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.1-libpng16.patch8
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.99-automake.patch326
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.99-cfg.patch25
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.99-compiler_warnings.patch226
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.99-default_source.patch40
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.99-gcc47.patch37
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.99-linking.patch78
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.99-models_makefile.patch21
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.99-symlink.patch19
16 files changed, 962 insertions, 23 deletions
diff --git a/sci-astronomy/Manifest.gz b/sci-astronomy/Manifest.gz
index f2ab2739af89..48d690f72f29 100644
--- a/sci-astronomy/Manifest.gz
+++ b/sci-astronomy/Manifest.gz
Binary files differ
diff --git a/sci-astronomy/celestia/Manifest b/sci-astronomy/celestia/Manifest
index 8e7e6855b1d6..25d2ae2b7937 100644
--- a/sci-astronomy/celestia/Manifest
+++ b/sci-astronomy/celestia/Manifest
@@ -1,10 +1,19 @@
-AUX celestia-1.5.0-desktop.patch 1594 BLAKE2B ec22b40b3657d588c0e12c054808fdadb1f9d6ca46326c34f8f599c87c242366d49fb57c21eeaff5a6023251600a059f07f4ecde0712edf219e8101d807c8d9b SHA512 a6f5e296ec66a00182b77311a696ea787876e113260df7d7ad1ee4e27bf6e97264808efd3b760d226f85e9bdbf2832087afb69342d043e4c0059ccecde0384c4
-AUX celestia-1.6.0-cfg.patch 461 BLAKE2B e3d814bd841a23bb258ab1cee3d456f7cf2824075a70a636d6e8f04b1cd35ff71fde227fb4246dd0e12daf16bad60380b68551877859c77d5895ce22cc750db6 SHA512 6780affb6838661aefe7929c4e56594b33f8793b3f9aa1d774605c035b0791e4a94579feccbde76379ec29735368a161bc60fb0b1ae4d0fc953bd75efc946d64
-AUX celestia-1.6.1-gcc46.patch 358 BLAKE2B 1854b2e0e34aa8dc1278fc33f9876a0a625f6507ccbcdddd454374f95160ae254c558c04ebd58c58bf256a133d5e8dbe0c017e17e72bc813d827fae470a301b4 SHA512 dd22249c73bb4fcc76b25726c795a5a2ff62cd069ede151f61b52547383d6ee91744e7cabb4195b3122b2d34f44ec8486090e06eef2fca79ac4e69628e8c3d52
+AUX celestia-1.5.0-desktop.patch 1371 BLAKE2B f4964ea5794b6fa7eff49cb4d9879226e83739dfe877f055f1cbff25562f324e30af3ef4ee68897324504b06a6a6c84c2cee4caf78914792a4c89e54ed580b14 SHA512 937d3a733ec679ed4fb7644b2ae0bf780972dce7ac7d6e30dfbd7cad3e90354460a3e1c3df268514048e53979d22b1bdee70dd340f8c9977e7a0749c65a24bf7
+AUX celestia-1.6.0-cfg.patch 388 BLAKE2B 2f409272fa10d7282a59fb3d20191daf511cc8f10375852d55d869df871a147ca64a497ae3c447bacea287f60bfabf8037c824de0defd327cdd42211d3e6070a SHA512 6442c499d0a57edb5e81fc64b5ba2d1aa5b2d44e91bb3353f485a2f0e9a91c060977cef5136b477d1300c394f9c42a0c73e62563fbaa2e56db587bdc35aac81c
+AUX celestia-1.6.1-gcc46.patch 362 BLAKE2B d40f9f9ccd99de30edb6f3071a38245accd154f75a434a0d13edc43f04554de0cf3563a2c400df53a31adf8f0a7ecc32ba92a35fe62332bec58ae0107a0758d0 SHA512 3a51a47265ff6de5771b9abc4c1f25128d54a05f41c8758fb004ce4a7fb790ad062f1b67070c1ee6aa001de3db45bd73ec4bc8a2cbb6e114ab34c5a12ca677c2
AUX celestia-1.6.1-gcc47.patch 846 BLAKE2B 26a88bdf055014c2d2419fdde5e8e6667e9c15d8a09301a13a22eceb8a11e65c61e6483296e5bac58e3432635d319bd64df822aa12f1f8cc7b3aeb8b598933a9 SHA512 365d9c7a29d9593804b0278b7296f12df56585612b13f7f380f62aa84c36b863f560b5a2c50f53c30ecb9622590f156eac8cbd64d283f0accf0cd79f83647f56
-AUX celestia-1.6.1-libpng15.patch 387 BLAKE2B e1101ea607c3bbd18dc77c982953b324edf6a44c6f1ca24c0d10270f8f9cb3cb116c1acd7c4ada5da853cd758de143ebf3d1a6c84a4c75063c59678d5450e6a9 SHA512 85b1e329c3bd88242a1320dbcfb8b0e0c35d10c2cec610e19f94894225fd236eea1511a7f3df121dd5842fc24c86d4dd468e91acd8a6295eebeb776ab4cb8003
-AUX celestia-1.6.1-libpng16.patch 606 BLAKE2B d96e1fa73241b2b170f6ce43aaa63a54667bb79d854c53be6f38c83b9414b9dbde5c4f422efeff1d96e9dfffc6ceaddb15e52cff67f1d9dc93039741eea9b724 SHA512 7175b26fac03dec6ce3cdde46063ca4f1befb6f2f6f6ee7048f895b6c426d98bd85e76041c053d0471b29df37e1c09ea394de584c6abc144570388e465bb3085
+AUX celestia-1.6.1-libpng15.patch 391 BLAKE2B 6114b4b82a92dd572c3b13ecae23118fb25b1a0a3903b15a4675cae56b0233834d391ec47b4ed23473a6ddb82b07c9103f9459e00587b1aafebf256c02f44137 SHA512 d9d79a31d5ace5938fb419511f730d1a4c56d1d4cb3bac043ec52d63a2172e4c3788dcc272b36247c09571b8f851984fcf99f523184c2c61b6fb6a4178996f7f
+AUX celestia-1.6.1-libpng16.patch 570 BLAKE2B 52710f0e34f8ca6364c2938f3b6839581a25b5e5637382f6995b96cb88b08330a2f46a8e150303d0bb902e6fdeb4755c4cb62499eb3f2435413a0052e6dfe5f7 SHA512 e9721364ec43eb5a1a73ee02553e81e340d56fdca94c8f7ec2825082487422772070f486bf23d2fb11e5e9bc09405e95ae9c73ff136ea7ad3c5c6a7f508e29a1
AUX celestia-1.6.1-linking.patch 1526 BLAKE2B 8244fa0dcd7771887c2bd09e5ac2c8abba2f5882fbce6205b0180d42c34899b88fd19df92b1b96eed45d3ca3931c289e3f8ea96a71fb3a8de0d68266136e4587 SHA512 31ef6c716486ddada988c2ac34e553cd5f928735454e3b74f4a2b0fa15a9b6594c87e40bf1345acc52cdc20d27bb35714fc633c9952a403146cb09966babe26b
+AUX celestia-1.6.99-automake.patch 11596 BLAKE2B aca2b1d28f9973b087de4f7efb02c70ccd93918635d3efda7d3fbdd4bf53d977507aad4de0c6c4b0fe04945472e65736bcd67431e678782ddd59967b987502ff SHA512 8a6ca8816541ba5300a8cc35495811b6b97f36926555d7cbd5a51cba8773ce666ce30bbfae6c624908b23737acdd2687659a8b7ba0a361a197a7a6b63c786314
+AUX celestia-1.6.99-cfg.patch 759 BLAKE2B dddef7d207eaf975d68886d9c0a4aa74c055a08468b1d00dda45b35b5777b481888c0a8c140ad5a7ebf10a96081a273513cb7c351de779a5a2a854d4a6f4fb4d SHA512 17eb15ec550179465d653b055d8af13b9575853f83226faa718ae9288a2aed42979d9d943e06ff8a71a34a6e994c7418b4bba2d608a96ad3517d26070f36bec3
+AUX celestia-1.6.99-compiler_warnings.patch 7731 BLAKE2B f167e55a110c1cf4e7c3a93e277f1f8f48b9b21238cae7ae09ac7f378ea9be6a5f5eda6ce7fae86f1f0e6778a1b8a7a7b6267e34c35f8dbb168bc76ebf6fd1be SHA512 6ea79eb615246f8b19452a5878aab88fae5dd40d2483e5b6996abde67237569b9afe5b647cfb0d4df73488240e4206d64aac21faf436523371e77887e8a51a8c
+AUX celestia-1.6.99-default_source.patch 2576 BLAKE2B b2a41a8017eae979746526c46723e33d9f71442bde1535fb5911f4eab553843610f2cae2afe9250daca89ebc72a14cf49a63dbf0a07cf7b7bff036b3d20f2634 SHA512 4a8db7c3878ef88ad5278bc048b736a060cedd9df6b3b5e87138b71f956d1d6d004a5dff883b3c7311dae20bb59ae65d2e9a0024442492884470a365cd29dc1c
+AUX celestia-1.6.99-gcc47.patch 994 BLAKE2B d2e9ecbeffbdf87bc92862033e3d77006f20c7ce3f4e2b2d9d4ec8cb04a5d2084e0d58888d4c518c83397f21f8286052f83f77403744ab7a6b0975e6f3d83d25 SHA512 5a516bbc14d58be716d621bf796b5171d0197013ba87cb740f4e2634d145eea2db48623a9366168d101819876d5d9f47763d8d7f4e99c6409145078537e9e23e
+AUX celestia-1.6.99-linking.patch 2222 BLAKE2B 56581a1783b3f8441c1f549e13bcd01a448f5945f234d31fe0a3bd91dfacb880254c78ff8ea5072d2058a13361cb51dc8b3e02558d7a461a6749791413089e61 SHA512 da16f9a5a7c183e4b9204f474420599781f741a25f9fc93c47f248af3454810cd43bf293d903dfe07479c075e1bdf67f6b4e119c5a2b071c291aa5eb26e47d93
+AUX celestia-1.6.99-models_makefile.patch 587 BLAKE2B d7b8eef19d5c68ffaac49466edf758fa4a9a06b2384efa5194c3e01daca88e2546fbbddb98c36f14ac3b7a40a05a2de8a568062812e0705064498fabac1ef5d2 SHA512 c8f3bd46ec551d6a4c41e8167f618f68889cae6b1d8cf489690b39a8146701abe5d2ddd2e475108f3994da8532980e56e185384cbce769779ab79b5d17c18aff
+AUX celestia-1.6.99-symlink.patch 620 BLAKE2B 513cc61f42981c0686270effd263583a2942e755edc8292bb321425ec6d9544c0b26e977f6e5f2ec67d0f2567936a1305ac0af58d82efcfebcdfcd08e5de6117 SHA512 c1b69af6bddce9e67f594b83c9da58ab5faaa6f7e8c74ae53b5b0aa15cafdaeb25ff13d330385593d9eb95258ca0573fdbcf57dedc0b3fca0938f2562e5c8bd7
DIST celestia-1.6.1.tar.gz 52600436 BLAKE2B aa5b515a75b0344f6e5d59bf385bf1c368e3c38098a1bb9c273fd87ae34a7c8e88a4bf789935bb35ee16f2037004c8f54e21592023a0675766cb4ce005c704f4 SHA512 5b1221e97ee03f7def317e5e29c5100ebe714a4a3aeb8b9818dc9445e4282b6f87026ab35c7b3d5eb02fa6dbb33693977999d14d9648fc4e6d1947abe32a413f
EBUILD celestia-1.6.1-r1.ebuild 3062 BLAKE2B b5c913e509ce0706219d93350b5f5657fb9b871fa93604eb493ab496926d5c19bd0afecc448ff1c2bed0fe9098bafd9080a816acdaa5802b25812bd3ff921d3d SHA512 84f0c7f6dc6ec27cf1659178a71b1a936d4d2155530dc51fc457aa08cfe02c89a967f8e169d56d9aa2179265153fe0c998f18e0240255c3dadc5b386f915e6f6
+EBUILD celestia-9999.ebuild 3785 BLAKE2B d4a7f2c53dfbf28cb064c2c60c431b76e16593891a51805a8a67db3a0e25940c851b1b4b3d9e01371cd17c04ff9e8a66328259e752afe8c2a6214b4309abf91a SHA512 ff25764dbfa489f782d8b997e91ea19f8c0a08cf4f53491a8dae6aa426d0adb9124f10399c48d6dff045da01aa54e59eb0eaad3799647a11b3c6a529c473ecd6
MISC metadata.xml 892 BLAKE2B e5bc4a09a9e495bcecf9bc2f5e0c60e7aee0b7c65071ac1636416368a1fc9c49057a23127a964c0cbb9a42c6a679cfed5c8d0511c88c67808f5078cfb3ad04c0 SHA512 f222c4e816f2684d8d8de5d456e81b6f6a9b92f3d3996137ddd371a9934793beeda6d1611e8f510f35eafdbe83837007fbae897efcebd47a6bf00e8b3ae159f9
diff --git a/sci-astronomy/celestia/celestia-9999.ebuild b/sci-astronomy/celestia/celestia-9999.ebuild
new file mode 100644
index 000000000000..afec84fc2292
--- /dev/null
+++ b/sci-astronomy/celestia/celestia-9999.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic gnome2 xdg-utils
+
+DESCRIPTION="OpenGL 3D space simulator"
+HOMEPAGE="https://celestia.space"
+if [[ "${PV}" = 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/CelestiaProject/Celestia.git"
+ # Necessary because of gnome2 eclass
+ SRC_URI=""
+else
+ # Old URI! Please update once we have a release > v1.6.1
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cairo gnome gtk nls pch theora threads"
+
+RDEPEND="
+ virtual/opengl
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ >=dev-lang/lua-5.1:*
+ gtk? (
+ x11-libs/gtk+:2
+ >=x11-libs/gtkglext-1.0
+ )
+ gnome? (
+ >=gnome-base/libgnomeui-2.0
+ )
+ !gtk? ( !gnome? ( media-libs/freeglut ) )
+ cairo? ( x11-libs/cairo )
+ theora? ( media-libs/libtheora )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+REQUIRED_USE="gnome? ( gtk )"
+
+PATCHES=(
+ # make better desktop files
+ "${FILESDIR}"/${PN}-1.5.0-desktop.patch
+ # add a ~/.celestia for extra directories
+ "${FILESDIR}"/${PN}-1.6.99-cfg.patch
+ # missing zlib.h include with libpng15
+ "${FILESDIR}"/${PN}-1.6.1-libpng15.patch
+ "${FILESDIR}"/${PN}-1.6.99-linking.patch
+
+ # gcc-47, #414015
+ "${FILESDIR}"/${PN}-1.6.99-gcc47.patch
+
+ # libpng16 #464764
+ "${FILESDIR}"/${PN}-1.6.1-libpng16.patch
+
+ # Patches from upstream PRs
+
+ # https://github.com/CelestiaProject/Celestia/pull/35
+ #"${FILESDIR}/${PN}-1.6.99-automake.patch"
+ "${FILESDIR}/${PN}-1.6.99-models_makefile.patch"
+ "${FILESDIR}/${PN}-1.6.99-default_source.patch"
+ "${FILESDIR}/${PN}-1.6.99-symlink.patch"
+
+ # https://github.com/CelestiaProject/Celestia/pull/37
+ "${FILESDIR}/${PN}-1.6.99-compiler_warnings.patch"
+)
+
+pkg_setup() {
+ # Check for one for the following use flags to be set.
+ if use gnome; then
+ einfo "USE=\"gnome\" detected."
+ USE_DESTDIR="1"
+ CELESTIA_GUI="gnome"
+ elif use gtk; then
+ einfo "USE=\"gtk\" detected."
+ CELESTIA_GUI="gtk"
+ else
+ ewarn "If you want to use the full gui, set USE=\"{gnome|gtk}\""
+ ewarn "Defaulting to glut support (no GUI)."
+ CELESTIA_GUI="glut"
+ fi
+}
+
+src_prepare() {
+ default
+
+ if [[ -f configure.in ]] ; then
+ mv configure.{in,ac} || die
+ else
+ elog "configure.in file is gone. Clean up the ebuild!"
+ fi
+
+ # remove flags to let the user decide
+ local
+ for cf in -O2 -ffast-math \
+ -fexpensive-optimizations \
+ -fomit-frame-pointer; do
+ sed -i \
+ -e "s/${cf}//g" \
+ configure.ac admin/* || die "sed failed"
+ done
+ # remove an unused gconf macro killing autoconf when no gnome
+ # (not needed without eautoreconf)
+ if ! use gnome; then
+ sed -i \
+ -e '/AM_GCONF_SOURCE_2/d' \
+ configure.ac || die "sed failed"
+ fi
+ eautoreconf
+ filter-flags "-funroll-loops -frerun-loop-opt"
+
+ ### This version of Celestia has a bug in the font rendering and
+ ### requires -fsigned-char. We should be able to force this flag
+ ### on all architectures. See bug #316573.
+ append-flags "-fsigned-char"
+}
+
+src_configure() {
+ # force lua in 1.6.1. seems to be inevitable
+ local myeconfargs=(
+ --disable-rpath
+ --with-${CELESTIA_GUI}
+ --with-lua
+ $(use_enable cairo)
+ $(use_enable threads threading)
+ $(use_enable nls)
+ $(use_enable pch)
+ $(use_enable theora)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ if [[ ${CELESTIA_GUI} == gnome ]]; then
+ gnome2_src_install
+ else
+ emake DESTDIR="${D}" MKDIR_P="mkdir -p" install
+ local size
+ for size in 16 22 32 48 ; do
+ newicon "${S}"/src/celestia/kde/data/hi${size}-app-${PN}.png ${PN}.png
+ done
+ fi
+ [[ ${CELESTIA_GUI} == glut ]] && domenu celestia.desktop
+ dodoc AUTHORS README TRANSLATORS *.txt
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}
diff --git a/sci-astronomy/celestia/files/celestia-1.5.0-desktop.patch b/sci-astronomy/celestia/files/celestia-1.5.0-desktop.patch
index 3e87692cc768..002c2d95cec5 100644
--- a/sci-astronomy/celestia/files/celestia-1.5.0-desktop.patch
+++ b/sci-astronomy/celestia/files/celestia-1.5.0-desktop.patch
@@ -1,5 +1,5 @@
---- src/celestia/kde/data/celestia.desktop.orig 2008-02-27 15:19:41.000000000 +0000
-+++ src/celestia/kde/data/celestia.desktop 2008-02-27 15:43:20.000000000 +0000
+--- a/src/celestia/kde/data/celestia.desktop
++++ b/src/celestia/kde/data/celestia.desktop
@@ -1,8 +1,12 @@
[Desktop Entry]
+Encoding=UTF-8
@@ -14,8 +14,8 @@
Type=Application
+Categories=Education;Science;Astronomy;Qt
+GenericName=Space Simulator
---- src/celestia/gtk/data/celestia.desktop.orig 2008-02-27 15:19:58.000000000 +0000
-+++ src/celestia/gtk/data/celestia.desktop 2008-02-27 15:44:26.000000000 +0000
+--- a/src/celestia/gtk/data/celestia.desktop
++++ b/src/celestia/gtk/data/celestia.desktop
@@ -1,12 +1,12 @@
[Desktop Entry]
Encoding=UTF-8
@@ -33,13 +33,13 @@
+Comment=3D space simulator to explore the universe
+Exec=celestia %f
+Terminal=false
-+Icon=celestia.png
++Icon=celestia
+MimeType=application/x-celestia-script
+Type=Application
+Categories=Education;Science;Astronomy;GTK
+GenericName=Space Simulator
---- celestia.desktop 1970-01-01 01:00:00.000000000 +0100
-+++ celestia.desktop 2008-02-27 15:22:31.000000000 +0000
+--- a/celestia.desktop
++++ b/celestia.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
@@ -51,5 +51,5 @@
+Categories=Education;Science;Astronomy
+Exec=celestia %f
+Terminal=false
-+Icon=celestia.png
++Icon=celestia
+MimeType=application/x-celestia-script
diff --git a/sci-astronomy/celestia/files/celestia-1.6.0-cfg.patch b/sci-astronomy/celestia/files/celestia-1.6.0-cfg.patch
index 8a4c18143a95..2319c255b2b5 100644
--- a/sci-astronomy/celestia/files/celestia-1.6.0-cfg.patch
+++ b/sci-astronomy/celestia/files/celestia-1.6.0-cfg.patch
@@ -1,5 +1,5 @@
---- celestia.cfg.orig 2009-07-20 12:52:17.000000000 +0200
-+++ celestia.cfg 2009-07-20 12:52:43.000000000 +0200
+--- a/celestia.cfg
++++ b/celestia.cfg
@@ -195,7 +195,7 @@
# or
# ExtrasDirectories [ "D:\\celestia-extras" ]
diff --git a/sci-astronomy/celestia/files/celestia-1.6.1-gcc46.patch b/sci-astronomy/celestia/files/celestia-1.6.1-gcc46.patch
index 96967e36f9dc..757cd6c5d407 100644
--- a/sci-astronomy/celestia/files/celestia-1.6.1-gcc46.patch
+++ b/sci-astronomy/celestia/files/celestia-1.6.1-gcc46.patch
@@ -2,8 +2,8 @@ http://bugs.gentoo.org/show_bug.cgi?id=366073
http://celestia.svn.sourceforge.net/viewvc/celestia?view=revision&revision=5178
Patch written by Nils Larsson <ni1s@nerdshack.com>
---- src/celengine/frametree.h
-+++ src/celengine/frametree.h
+--- a/src/celengine/frametree.h
++++ b/src/celengine/frametree.h
@@ -14,6 +14,7 @@
#define _CELENGINE_FRAMETREE_H_
diff --git a/sci-astronomy/celestia/files/celestia-1.6.1-libpng15.patch b/sci-astronomy/celestia/files/celestia-1.6.1-libpng15.patch
index 5dffbab246ef..0a772ffdf6ac 100644
--- a/sci-astronomy/celestia/files/celestia-1.6.1-libpng15.patch
+++ b/sci-astronomy/celestia/files/celestia-1.6.1-libpng15.patch
@@ -1,7 +1,7 @@
imagecapture.cpp:184:40: error: ‘Z_BEST_COMPRESSION’ was not declared in this scope
---- src/celestia/imagecapture.cpp
-+++ src/celestia/imagecapture.cpp
+--- a/src/celestia/imagecapture.cpp
++++ b/src/celestia/imagecapture.cpp
@@ -31,6 +31,9 @@
#include "png.h"
#endif
diff --git a/sci-astronomy/celestia/files/celestia-1.6.1-libpng16.patch b/sci-astronomy/celestia/files/celestia-1.6.1-libpng16.patch
index 78911cb55755..0905be66b6b6 100644
--- a/sci-astronomy/celestia/files/celestia-1.6.1-libpng16.patch
+++ b/sci-astronomy/celestia/files/celestia-1.6.1-libpng16.patch
@@ -3,8 +3,8 @@ image.cpp:530:61: error: ‘memcpy’ was not declared in this scope
https://bugs.gentoo.org/show_bug.cgi?id=464764
Patch written by Lars Wendler <polynomial-c@gentoo.org>
---- a/celestia/src/celengine/image.cpp
-+++ b/celestia/src/celengine/image.cpp
+--- a/src/celengine/image.cpp
++++ b/src/celengine/image.cpp
@@ -42,6 +42,7 @@ extern "C" {
#include "jpeglib.h"
#else
@@ -13,8 +13,8 @@ Patch written by Lars Wendler <polynomial-c@gentoo.org>
#include <jpeglib.h>
#endif
}
---- a/celestia/src/celengine/texture.cpp
-+++ b/celestia/src/celengine/texture.cpp
+--- a/src/celengine/texture.cpp
++++ b/src/celengine/texture.cpp
@@ -28,6 +28,7 @@
#include <cstdlib>
#include <cstdio>
diff --git a/sci-astronomy/celestia/files/celestia-1.6.99-automake.patch b/sci-astronomy/celestia/files/celestia-1.6.99-automake.patch
new file mode 100644
index 000000000000..a8c048e77222
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.6.99-automake.patch
@@ -0,0 +1,326 @@
+From 40d2204abb0c3ef3c4ea42492309282006cdb03b Mon Sep 17 00:00:00 2001
+From: Hleb Valoshka <375gnu@gmail.com>
+Date: Sat, 24 Feb 2018 15:37:47 +0300
+Subject: [PATCH] update for newer automake
+
+---
+ configure.in => configure.ac | 19 ++++++++++---------
+ po/Makefile.in.in | 1 +
+ po/be.po | 8 ++++----
+ po2/Makefile.in.in | 1 +
+ src/Makefile.am | 2 +-
+ src/cel3ds/Makefile.am | 2 +-
+ src/celengine/Makefile.am | 10 +++++-----
+ src/celephem/Makefile.am | 2 +-
+ src/celestia/Makefile.am | 2 +-
+ src/celestia/gtk/Makefile.am | 2 +-
+ src/celestia/kde/Makefile.am | 2 +-
+ src/celestia/qt/Makefile.am | 2 +-
+ src/celmath/Makefile.am | 2 +-
+ src/celmodel/Makefile.am | 2 +-
+ src/celtxf/Makefile.am | 2 +-
+ src/celutil/Makefile.am | 2 +-
+ 16 files changed, 32 insertions(+), 29 deletions(-)
+ rename configure.in => configure.ac (97%)
+
+diff --git a/configure.in b/configure.ac
+similarity index 97%
+rename from configure.in
+rename to configure.ac
+index 0b70581e..c9e722a1 100644
+--- a/configure.in
++++ b/configure.ac
+@@ -4,8 +4,9 @@ dnl Process this file with autoconf to make a configure script
+ dnl
+
+ AC_PREREQ(2.57)
+-AC_INIT([celestia], [1.6.0], [celestia-developers@lists.sf.net])
++AC_INIT([celestia], [1.7.0], [celestia-developers@lists.sf.net])
+ AC_CONFIG_SRCDIR(acinclude.m4)
++AC_CONFIG_MACRO_DIRS([macros])
+
+ dnl The following section confirms that the user provided necessary option
+ dnl BEFORE anything is checked.
+@@ -19,7 +20,7 @@ ui_qt="no"
+ AC_ARG_WITH([glut],
+ AC_HELP_STRING([--with-glut], [Use Glut for the UI]),
+ ui_glut="yes")
+-
++
+ AC_ARG_WITH([gtk],
+ AC_HELP_STRING([--with-gtk], [Use Gtk for an enhanced GUI]),
+ ui_gtk="yes")
+@@ -79,7 +80,7 @@ AC_CANONICAL_SYSTEM
+ dnl Perform program name transformation
+ AC_ARG_PROGRAM
+
+-AM_INIT_AUTOMAKE([-Wno-portability])
++AM_INIT_AUTOMAKE([-Wno-portability subdir-objects])
+ AM_CONFIG_HEADER(config.h)
+
+ AM_PO_SUBDIRS
+@@ -152,7 +153,7 @@ dnl
+
+ AC_ARG_WITH([cspice-dir],
+ AC_HELP_STRING([--with-cspice-dir=DIR], [Specify SPICE directory location]),
+- SPICE_CFLAGS="-I$withval/include -DUSE_SPICE";
++ SPICE_CFLAGS="-I$withval/include -DUSE_SPICE";
+ SPICE_LIBS="$withval/lib/cspice.a")
+
+ AC_SUBST(SPICE_CFLAGS)
+@@ -386,11 +387,11 @@ if (test "$enable_lua" != "no"); then
+ LUA_VER=0
+ PKG_CHECK_MODULES(LUA, lua5.2 >= 5.2.0, LUA_VER=0x050200, [
+ PKG_CHECK_MODULES(LUA, lua >= 5.2.0, LUA_VER=0x050200, [
+- PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1.0, LUA_VER=0x050100,
+- [ PKG_CHECK_MODULES(LUA, lua >= 5.1.0, LUA_VER=0x050100,
++ PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1.0, LUA_VER=0x050100,
++ [ PKG_CHECK_MODULES(LUA, lua >= 5.1.0, LUA_VER=0x050100,
+ [ PKG_CHECK_MODULES(LUA, lua50 >= 5.0.0 lua50 < 5.1.0, LUA_VER=0x050000,
+- [ PKG_CHECK_MODULES(LUA, lua >= 5.0.0 lua < 5.1.0, LUA_VER=0x050000, AC_MSG_RESULT([no])) ]
+- ) ]
++ [ PKG_CHECK_MODULES(LUA, lua >= 5.0.0 lua < 5.1.0, LUA_VER=0x050000, AC_MSG_RESULT([no])) ]
++ ) ]
+ ) ]
+ ) ] ) ] )
+ if (test "$LUA_VER" = "0x050000"); then
+@@ -512,7 +513,7 @@ AC_MSG_RESULT([Use Lua: $enable_lua]);
+
+ if (test "$LUA_VER" = "0x050000"); then
+ AC_MSG_RESULT([ Warning: Lua 5.1 is not available on your system, Lua 5.0 will be used
+- instead but it may not be fully compatible with existing CELX scripts.
++ instead but it may not be fully compatible with existing CELX scripts.
+ It is recommanded that you install Lua 5.0 and rerun configure.]);
+ fi
+
+diff --git a/po/Makefile.in.in b/po/Makefile.in.in
+index 5b7a5d5c..58c96720 100644
+--- a/po/Makefile.in.in
++++ b/po/Makefile.in.in
+@@ -31,6 +31,7 @@ gettextsrcdir = $(datadir)/gettext/po
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ mkinstalldirs = $(SHELL) @install_sh@ -d
++MKDIR_P = @MKDIR_P@
+ mkdir_p = @mkdir_p@
+
+ GMSGFMT_ = @GMSGFMT@
+diff --git a/po/be.po b/po/be.po
+index 171bf786..a229f43d 100644
+--- a/po/be.po
++++ b/po/be.po
+@@ -6,7 +6,7 @@ msgstr ""
+ "PO-Revision-Date: \n"
+ "Last-Translator: Hleb Valoshka <375gnu@gmail.com>\n"
+ "Language-Team: belarusian <i18n@mova.org>\n"
+-"Language: \n"
++"Language: belarusian\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=UTF-8\n"
+ "Content-Transfer-Encoding: 8bit\n"
+@@ -28,7 +28,7 @@ msgstr "STD"
+
+ #: src/celengine/dsodb.cpp:387
+ msgid "Loaded "
+-msgstr "Загружаны"
++msgstr "Загружана "
+
+ #: src/celengine/dsodb.cpp:387
+ msgid " deep space objects"
+@@ -110,7 +110,7 @@ msgstr " прымітываў, "
+
+ #: src/celengine/meshmanager.cpp:165
+ msgid " materials "
+-msgstr " матар'ялаў"
++msgstr " матар'ялаў "
+
+ #: src/celengine/meshmanager.cpp:166
+ msgid " unique)\n"
+@@ -739,7 +739,7 @@ msgstr "Трымаць "
+
+ #: src/celestia/celestiacore.cpp:3592
+ msgid "Follow "
+-msgstr "Ісьці ўсьлед "
++msgstr "Ідзём за аб'ектам: "
+
+ #: src/celestia/celestiacore.cpp:3597
+ msgid "Sync Orbit "
+diff --git a/po2/Makefile.in.in b/po2/Makefile.in.in
+index 5b7a5d5c..58c96720 100644
+--- a/po2/Makefile.in.in
++++ b/po2/Makefile.in.in
+@@ -31,6 +31,7 @@ gettextsrcdir = $(datadir)/gettext/po
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ mkinstalldirs = $(SHELL) @install_sh@ -d
++MKDIR_P = @MKDIR_P@
+ mkdir_p = @mkdir_p@
+
+ GMSGFMT_ = @GMSGFMT@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index a929ca4d..64aad4a3 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -2,7 +2,7 @@ SUBDIRS = celutil celmath cel3ds celtxf celengine celephem celmodel celestia
+
+ DEFS = -DHIP_DATA_DIR='"$(HIPDIR)"' @DEFS@
+
+-INCLUDES = -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
++AM_CPPFLAGS = -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
+
+ buildstardb_SOURCES = buildstardb.cpp
+ EXTRA_DIST = packdb.cpp packnames.cpp readstars.cpp
+diff --git a/src/cel3ds/Makefile.am b/src/cel3ds/Makefile.am
+index efd9030d..a573c06b 100644
+--- a/src/cel3ds/Makefile.am
++++ b/src/cel3ds/Makefile.am
+@@ -1,7 +1,7 @@
+ noinst_LIBRARIES = libcel3ds.a
+ noinst_HEADERS = $(wildcard *.h)
+
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen
++AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen
+
+ libcel3ds_a_SOURCES = \
+ 3dsmodel.cpp \
+diff --git a/src/celengine/Makefile.am b/src/celengine/Makefile.am
+index a540b098..77d909b7 100644
+--- a/src/celengine/Makefile.am
++++ b/src/celengine/Makefile.am
+@@ -1,10 +1,11 @@
+ noinst_LIBRARIES = libcelengine.a
+ noinst_HEADERS = $(wildcard *.h)
+
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/curveplot/include \
+- -I$(top_srcdir)/thirdparty/glew/include
++AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/curveplot/include
+
+-libcelengine_a_CXXFLAGS = $(LUA_CFLAGS) $(SPICE_CFLAGS)
++libcelengine_a_CXXFLAGS = $(LUA_CFLAGS) $(SPICE_CFLAGS) $(GLEW_CFLAGS)
++
++AM_LDFLAGS = $(LUA_LDFLAGS) $(GLEW_LDFLAGS)
+
+ libcelengine_a_SOURCES = \
+ asterism.cpp \
+@@ -74,5 +75,4 @@ libcelengine_a_SOURCES = \
+ vertexprog.cpp \
+ virtualtex.cpp \
+ visibleregion.cpp \
+- $(top_srcdir)/thirdparty/glew/src/glew.c \
+- $(top_srcdir)/thirdparty/curveplot/src/curveplot.cpp
++ ../../thirdparty/curveplot/src/curveplot.cpp
+diff --git a/src/celephem/Makefile.am b/src/celephem/Makefile.am
+index 0b9aed16..8d6f25e4 100644
+--- a/src/celephem/Makefile.am
++++ b/src/celephem/Makefile.am
+@@ -1,7 +1,7 @@
+ noinst_LIBRARIES = libcelephem.a
+ noinst_HEADERS = $(wildcard *.h)
+
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen
++AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen
+
+ if ENABLE_SPICE
+ SPICESOURCES = spiceinterface.cpp spiceorbit.cpp spicerotation.cpp
+diff --git a/src/celestia/Makefile.am b/src/celestia/Makefile.am
+index 95ba9ab6..25eb7d64 100644
+--- a/src/celestia/Makefile.am
++++ b/src/celestia/Makefile.am
+@@ -1,7 +1,7 @@
+ SUBDIRS =
+
+ bin_PROGRAMS = celestia
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
++AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
+
+ DEFS = -DCONFIG_DATA_DIR='"$(PKGDATADIR)"' -DLOCALEDIR='"$(datadir)/locale"' @DEFS@
+
+diff --git a/src/celestia/gtk/Makefile.am b/src/celestia/gtk/Makefile.am
+index a77e000a..a32237e6 100644
+--- a/src/celestia/gtk/Makefile.am
++++ b/src/celestia/gtk/Makefile.am
+@@ -1,6 +1,6 @@
+ SUBDIRS = data
+
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
++AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
+
+ DEFS = -DCONFIG_DATA_DIR='"$(PKGDATADIR)"' -DLOCALEDIR='"$(datadir)/locale"' @DEFS@
+
+diff --git a/src/celestia/kde/Makefile.am b/src/celestia/kde/Makefile.am
+index 07ec12d1..4f034994 100644
+--- a/src/celestia/kde/Makefile.am
++++ b/src/celestia/kde/Makefile.am
+@@ -30,7 +30,7 @@ if ENABLE_KDE
+ noinst_LIBRARIES = libkdegui.a
+ noinst_HEADERS = $(wildcard *.h)
+
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include $(QT_INCLUDES) $(KDE_INCLUDES)
++AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include $(QT_AM_CPPFLAGS) $(KDE_AM_CPPFLAGS)
+
+ libkdegui_a_CXXFLAGS = $(LUA_CFLAGS) $(THEORA_CFLAGS)
+
+diff --git a/src/celestia/qt/Makefile.am b/src/celestia/qt/Makefile.am
+index fb43c487..8cd73b65 100644
+--- a/src/celestia/qt/Makefile.am
++++ b/src/celestia/qt/Makefile.am
+@@ -76,7 +76,7 @@ if ENABLE_QT
+ noinst_LIBRARIES = libqtgui.a
+ noinst_HEADERS = $(QT_HEADERS)
+
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
++AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
+
+ BUILT_SOURCES = $(MOC_CPP_FILES) $(QRC_CPP_FILES) $(UI_H_FILES)
+
+diff --git a/src/celmath/Makefile.am b/src/celmath/Makefile.am
+index 2173112e..efb63bc8 100644
+--- a/src/celmath/Makefile.am
++++ b/src/celmath/Makefile.am
+@@ -1,7 +1,7 @@
+ noinst_LIBRARIES = libcelmath.a
+ noinst_HEADERS = $(wildcard *.h)
+
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen
++AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen
+
+ libcelmath_a_SOURCES = \
+ frustum.cpp \
+diff --git a/src/celmodel/Makefile.am b/src/celmodel/Makefile.am
+index 39219eb0..9a619279 100644
+--- a/src/celmodel/Makefile.am
++++ b/src/celmodel/Makefile.am
+@@ -1,7 +1,7 @@
+ noinst_LIBRARIES = libcelmodel.a
+ noinst_HEADERS = $(wildcard *.h)
+
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen
++AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/Eigen
+
+ libcelmodel_a_SOURCES = \
+ material.cpp \
+diff --git a/src/celtxf/Makefile.am b/src/celtxf/Makefile.am
+index 75c1ef89..938d4f04 100644
+--- a/src/celtxf/Makefile.am
++++ b/src/celtxf/Makefile.am
+@@ -1,7 +1,7 @@
+ noinst_LIBRARIES = libceltxf.a
+ noinst_HEADERS = $(wildcard *.h)
+
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/glew/include
++AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/thirdparty/glew/include
+
+ libceltxf_a_SOURCES = \
+ texturefont.cpp
+diff --git a/src/celutil/Makefile.am b/src/celutil/Makefile.am
+index 27361d8b..6c956a1e 100644
+--- a/src/celutil/Makefile.am
++++ b/src/celutil/Makefile.am
+@@ -18,6 +18,6 @@ WINSOURCES = \
+ winutil.cpp \
+ windirectory.cpp
+
+-INCLUDES = -I$(top_srcdir)/thirdparty/Eigen
++AM_CPPFLAGS = -I$(top_srcdir)/thirdparty/Eigen
+
+ EXTRA_libcelutil_a_SOURCES= $(WINSOURCES)
diff --git a/sci-astronomy/celestia/files/celestia-1.6.99-cfg.patch b/sci-astronomy/celestia/files/celestia-1.6.99-cfg.patch
new file mode 100644
index 000000000000..53b0e5ad265e
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.6.99-cfg.patch
@@ -0,0 +1,25 @@
+From af91ecccb4fe46181d22d4195cb4cca1c734ae63 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Wed, 4 Apr 2018 15:28:32 +0200
+Subject: [PATCH] celestia.cfg: Add ~/.celestia as extras directory.
+
+---
+ celestia.cfg | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/celestia.cfg b/celestia.cfg
+index 1a69b422..635b0084 100644
+--- a/celestia.cfg
++++ b/celestia.cfg
+@@ -176,7 +176,7 @@ StarTextures
+ # or
+ # ExtrasDirectories [ "D:\\celestia-extras" ]
+ #------------------------------------------------------------------------
+- ExtrasDirectories [ "data" "extras" ]
++ ExtrasDirectories [ "data" "extras" "~/.celestia" ]
+
+
+ #------------------------------------------------------------------------
+--
+2.17.0
+
diff --git a/sci-astronomy/celestia/files/celestia-1.6.99-compiler_warnings.patch b/sci-astronomy/celestia/files/celestia-1.6.99-compiler_warnings.patch
new file mode 100644
index 000000000000..d1ed92e212a9
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.6.99-compiler_warnings.patch
@@ -0,0 +1,226 @@
+From dba25141a60ba7a09eac8f64eac1c18c48acc3a3 Mon Sep 17 00:00:00 2001
+From: Hleb Valoshka <375gnu@gmail.com>
+Date: Mon, 12 Mar 2018 20:18:51 +0300
+Subject: [PATCH] fix (some) compiler warnings
+
+---
+ src/cel3ds/3dsread.cpp | 5 +++--
+ src/celengine/command.cpp | 15 ++++++---------
+ src/celengine/observer.cpp | 8 ++++----
+ src/celengine/render.cpp | 2 ++
+ src/celengine/renderglsl.cpp | 2 +-
+ src/celengine/star.cpp | 2 +-
+ src/celestia/glutmain.cpp | 9 ++++-----
+ src/celestia/qt/qtmain.cpp | 2 +-
+ src/celutil/bigfix.cpp | 3 +--
+ 9 files changed, 23 insertions(+), 25 deletions(-)
+
+diff --git a/src/cel3ds/3dsread.cpp b/src/cel3ds/3dsread.cpp
+index 3b78847f..3ee3cf3d 100644
+--- a/src/cel3ds/3dsread.cpp
++++ b/src/cel3ds/3dsread.cpp
+@@ -116,8 +116,9 @@ void indent()
+ cout << " ";
+ }
+
+-void logChunk(uint16 chunkType/*, int chunkSize*/)
++void logChunk(uint16 /*chunkType*/ /*, int chunkSize*/)
+ {
++#if 0
+ const char* name = NULL;
+
+ switch (chunkType)
+@@ -193,7 +194,7 @@ void logChunk(uint16 chunkType/*, int chunkSize*/)
+ default:
+ break;
+ }
+-#if 0
++
+ indent();
+
+ if (name == NULL)
+diff --git a/src/celengine/command.cpp b/src/celengine/command.cpp
+index e190fa5b..a258f4c0 100644
+--- a/src/celengine/command.cpp
++++ b/src/celengine/command.cpp
+@@ -703,24 +703,21 @@ CommandCapture::CommandCapture(const std::string& _type,
+ void CommandCapture::process(ExecutionEnvironment&)
+ {
+ #ifndef TARGET_OS_MAC
+- bool success = false;
+-
+-
+ // Get the dimensions of the current viewport
+ int viewport[4];
+ glGetIntegerv(GL_VIEWPORT, viewport);
+
+ if (compareIgnoringCase(type, "jpeg") == 0)
+ {
+- success = CaptureGLBufferToJPEG(filename,
+- viewport[0], viewport[1],
+- viewport[2], viewport[3]);
++ CaptureGLBufferToJPEG(filename,
++ viewport[0], viewport[1],
++ viewport[2], viewport[3]);
+ }
+ if (compareIgnoringCase(type, "png") == 0)
+ {
+- success = CaptureGLBufferToPNG(filename,
+- viewport[0], viewport[1],
+- viewport[2], viewport[3]);
++ CaptureGLBufferToPNG(filename,
++ viewport[0], viewport[1],
++ viewport[2], viewport[3]);
+ }
+ #endif
+ }
+diff --git a/src/celengine/observer.cpp b/src/celengine/observer.cpp
+index 3b5af97a..60b818b3 100644
+--- a/src/celengine/observer.cpp
++++ b/src/celengine/observer.cpp
+@@ -426,7 +426,7 @@ void Observer::update(double dt, double timeScale)
+ UniversalCoord origin = centerObj.getPosition(simTime);
+
+ Vector3d v0 = ufrom.offsetFromKm(origin);
+- Vector3d v1 = uto.offsetFromKm(origin);
++ //Vector3d v1 = uto.offsetFromKm(origin);
+
+ if (jv.norm() == 0.0)
+ {
+@@ -629,7 +629,7 @@ void Observer::computeGotoParameters(const Selection& destination,
+ }
+
+ UniversalCoord targetPosition = destination.getPosition(getTime());
+- Vector3d v = targetPosition.offsetFromKm(getPosition()).normalized();
++ //Vector3d v = targetPosition.offsetFromKm(getPosition()).normalized();
+
+ jparams.traj = Linear;
+ jparams.duration = gotoTime;
+@@ -694,7 +694,7 @@ void Observer::computeGotoParametersGC(const Selection& destination,
+ setFrame(frame->getCoordinateSystem(), destination);
+
+ UniversalCoord targetPosition = destination.getPosition(getTime());
+- Vector3d v = targetPosition.offsetFromKm(getPosition()).normalized();
++ //Vector3d v = targetPosition.offsetFromKm(getPosition()).normalized();
+
+ jparams.traj = GreatCircle;
+ jparams.duration = gotoTime;
+@@ -791,7 +791,7 @@ void Observer::computeCenterCOParameters(const Selection& destination,
+
+ Selection centerObj = frame->getRefObject();
+ UniversalCoord centerPos = centerObj.getPosition(getTime());
+- UniversalCoord targetPosition = destination.getPosition(getTime());
++ //UniversalCoord targetPosition = destination.getPosition(getTime());
+
+ Quaterniond q;
+ q.setFromTwoVectors(v, w);
+diff --git a/src/celengine/render.cpp b/src/celengine/render.cpp
+index 018153d5..bfcefd39 100644
+--- a/src/celengine/render.cpp
++++ b/src/celengine/render.cpp
+@@ -8033,8 +8033,10 @@ void Renderer::renderCometTail(const Body& body,
+ {
+ Vector3f cometPoints[MaxCometTailPoints];
+ Vector3d pos0 = body.getOrbit(now)->positionAtTime(now);
++#if 0
+ Vector3d pos1 = body.getOrbit(now)->positionAtTime(now - 0.01);
+ Vector3d vd = pos1 - pos0;
++#endif
+ double t = now;
+
+ float distanceFromSun, irradiance_max = 0.0f;
+diff --git a/src/celengine/renderglsl.cpp b/src/celengine/renderglsl.cpp
+index 15644440..14774239 100644
+--- a/src/celengine/renderglsl.cpp
++++ b/src/celengine/renderglsl.cpp
+@@ -773,7 +773,7 @@ void renderGeometryShadow_GLSL(Geometry* geometry,
+ int lightIndex = 0;
+ Vector3f viewDir = -ls.lights[lightIndex].direction_obj;
+ Vector3f upDir = viewDir.unitOrthogonal();
+- Vector3f rightDir = upDir.cross(viewDir);
++ /*Vector3f rightDir = */upDir.cross(viewDir);
+
+
+ glUseProgramObjectARB(0);
+diff --git a/src/celengine/star.cpp b/src/celengine/star.cpp
+index a5119cd6..662db92c 100644
+--- a/src/celengine/star.cpp
++++ b/src/celengine/star.cpp
+@@ -761,7 +761,7 @@ StarDetails::StarDetails() :
+ bolometricCorrection(0.0f),
+ knowledge(0u),
+ visible(true),
+- texture(texture),
++ texture(texture), // warning: ‘StarDetails::texture’ is initialized with itself [-Winit-self]
+ geometry(InvalidResource),
+ orbit(NULL),
+ orbitalRadius(0.0f),
+diff --git a/src/celestia/glutmain.cpp b/src/celestia/glutmain.cpp
+index b1fb416c..36ae331b 100644
+--- a/src/celestia/glutmain.cpp
++++ b/src/celestia/glutmain.cpp
+@@ -155,8 +155,7 @@ static void MouseButton(int button, int state, int x, int y)
+ lastY = y;
+ }
+
+-
+-static void KeyPress(unsigned char c, int x, int y)
++static void KeyPress(unsigned char c, int /*x*/, int /*y*/)
+ {
+ // Ctrl-Q exits
+ if (c == '\021')
+@@ -167,7 +166,7 @@ static void KeyPress(unsigned char c, int x, int y)
+ }
+
+
+-static void KeyUp(unsigned char c, int x, int y)
++static void KeyUp(unsigned char c, int /*x*/, int /*y*/)
+ {
+ appCore->keyUp((int) c);
+ }
+@@ -237,13 +236,13 @@ static void HandleSpecialKey(int key, bool down)
+ }
+
+
+-static void SpecialKeyPress(int key, int x, int y)
++static void SpecialKeyPress(int key, int /*x*/, int /*y*/)
+ {
+ HandleSpecialKey(key, true);
+ }
+
+
+-static void SpecialKeyUp(int key, int x, int y)
++static void SpecialKeyUp(int key, int /*x*/, int /*y*/)
+ {
+ HandleSpecialKey(key, false);
+ }
+diff --git a/src/celestia/qt/qtmain.cpp b/src/celestia/qt/qtmain.cpp
+index f8dc5080..04b666d5 100644
+--- a/src/celestia/qt/qtmain.cpp
++++ b/src/celestia/qt/qtmain.cpp
+@@ -29,7 +29,7 @@
+ using namespace std;
+
+ extern "C" { FILE __iob_func[3] = { *stdin,*stdout,*stderr }; }
+-static const char *description = "Celestia";
++//static const char *description = "Celestia";
+
+ // Command line options
+ static bool startFullscreen = false;
+diff --git a/src/celutil/bigfix.cpp b/src/celutil/bigfix.cpp
+index 1eacc5e2..a4ff2f4b 100644
+--- a/src/celutil/bigfix.cpp
++++ b/src/celutil/bigfix.cpp
+@@ -416,11 +416,10 @@ std::string BigFix::toString()
+
+ // Conversion using code from the original BigFix class.
+ std::string encoded("");
+- int bits, c, char_count, started, i, j;
++ int bits, c, char_count, i, j;
+
+ char_count = 0;
+ bits = 0;
+- started = 0;
+
+ // Find first significant (non null) byte
+ i = 16;
diff --git a/sci-astronomy/celestia/files/celestia-1.6.99-default_source.patch b/sci-astronomy/celestia/files/celestia-1.6.99-default_source.patch
new file mode 100644
index 000000000000..c896896ef1df
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.6.99-default_source.patch
@@ -0,0 +1,40 @@
+From 1fe7a493eae81a4f32f65be03f594a7553429268 Mon Sep 17 00:00:00 2001
+From: Hleb Valoshka <375gnu@gmail.com>
+Date: Sat, 24 Feb 2018 16:45:36 +0300
+Subject: [PATCH] replace _BSD_SOURCE with _DEFAULT_SOURCE
+
+---
+ acinclude.m4 | 4 ++--
+ admin/acinclude.m4.in | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index e2d5da23..49a086f8 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -3223,8 +3223,8 @@ AC_DEFUN([AC_CHECK_COMPILERS],
+ CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
+ case $host in
+ *-*-linux-gnu)
+- CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
+- CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
++ CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE $CFLAGS"
++ CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
+ KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
+ KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
+ ;;
+diff --git a/admin/acinclude.m4.in b/admin/acinclude.m4.in
+index e2d5da23..49a086f8 100644
+--- a/admin/acinclude.m4.in
++++ b/admin/acinclude.m4.in
+@@ -3223,8 +3223,8 @@ AC_DEFUN([AC_CHECK_COMPILERS],
+ CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
+ case $host in
+ *-*-linux-gnu)
+- CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
+- CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
++ CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE $CFLAGS"
++ CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
+ KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
+ KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
+ ;;
diff --git a/sci-astronomy/celestia/files/celestia-1.6.99-gcc47.patch b/sci-astronomy/celestia/files/celestia-1.6.99-gcc47.patch
new file mode 100644
index 000000000000..c4dec19211fd
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.6.99-gcc47.patch
@@ -0,0 +1,37 @@
+From 97e728e3db4d74cf2a74316a4f0287a86ece47ad Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Wed, 4 Apr 2018 15:45:25 +0200
+Subject: [PATCH] Fixes for >=gcc-4.7
+
+---
+ src/celengine/frametree.h | 1 +
+ src/celengine/planetgrid.cpp | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/celengine/frametree.h b/src/celengine/frametree.h
+index 62ca5450..f8e17f8a 100644
+--- a/src/celengine/frametree.h
++++ b/src/celengine/frametree.h
+@@ -13,6 +13,7 @@
+ #ifndef _CELENGINE_FRAMETREE_H_
+ #define _CELENGINE_FRAMETREE_H_
+
++#include <unistd.h>
+ #include <vector>
+ #include <cstddef>
+
+diff --git a/src/celengine/planetgrid.cpp b/src/celengine/planetgrid.cpp
+index 1c0f53bc..c08fef4a 100644
+--- a/src/celengine/planetgrid.cpp
++++ b/src/celengine/planetgrid.cpp
+@@ -14,6 +14,7 @@
+ #include "planetgrid.h"
+ #include "body.h"
+ #include "vecgl.h"
++#include <celmath/mathlib.h>
+ #include <celmath/intersect.h>
+ #include <Eigen/Core>
+ #include <Eigen/Geometry>
+--
+2.17.0
+
diff --git a/sci-astronomy/celestia/files/celestia-1.6.99-linking.patch b/sci-astronomy/celestia/files/celestia-1.6.99-linking.patch
new file mode 100644
index 000000000000..809105bbda5b
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.6.99-linking.patch
@@ -0,0 +1,78 @@
+From 803f4652895d40acc698901a87114a8582c050e6 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Wed, 4 Apr 2018 15:40:08 +0200
+Subject: [PATCH] Fix linking issues:
+
+ * underlinking GLUT (https://bugs.gentoo.org/372123, https://bugs.gentoo.org/387609)
+ * as-needed (https://bugs.gentoo.org/281258)
+ * theora with glut (https://bugs.gentoo.org/399237)
+---
+ configure.in | 1 +
+ src/celestia/Makefile.am | 13 ++++++++-----
+ 2 files changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 0b70581e..3ea150b9 100644
+--- a/configure.in
++++ b/configure.in
+@@ -242,6 +242,7 @@ if (test "$ui_glut" = "yes"); then
+ dnl Check for GLUT.
+ AC_CHECK_LIB(glut, glutKeyboardUpFunc, ,
+ [AC_MSG_ERROR([GLUT library version >= 3.7 not found])])
++ check_theora="yes"
+ fi
+ AM_CONDITIONAL(ENABLE_GLUT, test "$ui_glut" = "yes")
+
+diff --git a/src/celestia/Makefile.am b/src/celestia/Makefile.am
+index 95ba9ab6..8402256b 100644
+--- a/src/celestia/Makefile.am
++++ b/src/celestia/Makefile.am
+@@ -7,14 +7,15 @@ DEFS = -DCONFIG_DATA_DIR='"$(PKGDATADIR)"' -DLOCALEDIR='"$(datadir)/locale"' @DE
+
+ if ENABLE_KDE
+ SUBDIRS += kde
+-celestiaKDELIBS = $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KFILE) \
+- $(LIBSOCKET) -lDCOP kde/libkdegui.a
++celestiaKDELIBS = kde/libkdegui.a
+ celestia_LDFLAGS = $(all_libraries) $(KDE_RPATH)
++LIBS += $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KFILE) $(LIBSOCKET) -lDCOP
+ endif
+
+ if ENABLE_GTK
+ SUBDIRS += gtk
+-celestiaGTKLIBS = $(GTK_LIBS) gtk/libgtkgui.a
++celestiaGTKLIBS = gtk/libgtkgui.a
++LIBS += $(GTK_LIBS)
+ endif
+
+ if ENABLE_QT
+@@ -49,6 +50,7 @@ endif
+
+ if ENABLE_GLUT
+ GLUTSOURCES = glutmain.cpp
++GLUTLIBS = -lGL
+ endif
+
+ if ENABLE_THEORA
+@@ -63,8 +65,6 @@ celestia_LDADD = \
+ $(celestiaKDELIBS) \
+ $(celestiaGTKLIBS) \
+ $(celestiaQTLIBS) \
+- $(LUA_LIBS) \
+- $(THEORA_LIBS) \
+ ../celengine/libcelengine.a \
+ ../celephem/libcelephem.a \
+ ../celmodel/libcelmodel.a \
+@@ -72,6 +72,9 @@ celestia_LDADD = \
+ ../cel3ds/libcel3ds.a \
+ ../celmath/libcelmath.a \
+ ../celutil/libcelutil.a \
++ $(LUA_LIBS) \
++ $(THEORA_LIBS) \
++ $(GLUTLIBS) \
+ $(SPICE_LIBS)
+
+ noinst_HEADERS = $(wildcard *.h)
+--
+2.17.0
+
diff --git a/sci-astronomy/celestia/files/celestia-1.6.99-models_makefile.patch b/sci-astronomy/celestia/files/celestia-1.6.99-models_makefile.patch
new file mode 100644
index 000000000000..53d6307ac193
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.6.99-models_makefile.patch
@@ -0,0 +1,21 @@
+From abe1b03873af0e33d6cc23dec22755564794d41c Mon Sep 17 00:00:00 2001
+From: Hleb Valoshka <375gnu@gmail.com>
+Date: Sat, 24 Feb 2018 15:58:35 +0300
+Subject: [PATCH] add Makefile for models/ subdir
+
+---
+ models/Makefile.am | 5 +++++
+ 1 file changed, 5 insertions(+)
+ create mode 100644 models/Makefile.am
+
+diff --git a/models/Makefile.am b/models/Makefile.am
+new file mode 100644
+index 00000000..09d37338
+--- /dev/null
++++ b/models/Makefile.am
+@@ -0,0 +1,5 @@
++pkgdatadir = @datadir@/@PACKAGE@/models
++
++pkgdata_DATA = $(wildcard *.cmod) $(wildcard *.png)
++
++EXTRA_DIST = $(pkgdata_DATA)
diff --git a/sci-astronomy/celestia/files/celestia-1.6.99-symlink.patch b/sci-astronomy/celestia/files/celestia-1.6.99-symlink.patch
new file mode 100644
index 000000000000..4d0cd56cac34
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.6.99-symlink.patch
@@ -0,0 +1,19 @@
+From 20fb86991babb1aa5aa278b2cd4dc454c78d5cd4 Mon Sep 17 00:00:00 2001
+From: Hleb Valoshka <375gnu@gmail.com>
+Date: Sat, 24 Feb 2018 18:36:20 +0300
+Subject: [PATCH] fix symlink creation
+
+---
+ src/celestia/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/celestia/Makefile.am b/src/celestia/Makefile.am
+index 25eb7d64..60609fd3 100644
+--- a/src/celestia/Makefile.am
++++ b/src/celestia/Makefile.am
+@@ -79,4 +79,4 @@ noinst_DATA = ../../celestia
+ CLEANFILES = ../../celestia
+
+ ../../celestia: celestia
+- (cd ../..; ln -s src/celestia/celestia)
++ (cd ../..; ln -sf src/celestia/celestia)