Skip to content

Commit 7921676

Browse files
holgersson32644Lars Wendler
authored and
Lars Wendler
committed
sci-astronomy/celestia: Bump to version 1.7.0_pre20200316
Package-Manager: Portage-2.3.94, Repoman-2.3.21 Signed-off-by: Lars Wendler <[email protected]>
1 parent 14c2774 commit 7921676

File tree

2 files changed

+107
-0
lines changed

2 files changed

+107
-0
lines changed

sci-astronomy/celestia/Manifest

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DIST celestia-1.7.0_pre20200316.tar.gz 69459012 BLAKE2B 8e718e8a4aa064b9be0bd5f0f1c034f3ffec42671c6eae503216f5ea2787e8c5da3315e3cb39e94e2a0eab5f067e189fe70dc9d04bff4127e9e39fba3a7117ae SHA512 db4213e1d76699ff01390f12e3763596dfd2641389743c27221b4e7934be9daca7a884dd389135894d225e8613830468ebede5664543e27e44e21e19d22d1e7f
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Copyright 1999-2020 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=7
5+
6+
inherit desktop flag-o-matic xdg cmake
7+
8+
if [[ ${PV} == *9999 ]] ; then
9+
EGIT_REPO_URI="https://github.com/CelestiaProject/Celestia.git"
10+
inherit git-r3
11+
else
12+
if [[ ${PV} == *_p* ]] ; then
13+
COMMIT_ID="df508a0c597a3d96c1c039fa4a973e294021cfba"
14+
SRC_URI="https://github.com/${PN^}Project/${PN^}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
15+
S="${WORKDIR}/${PN^}-${COMMIT_ID}"
16+
KEYWORDS="~amd64 ~x86"
17+
else
18+
SRC_URI="https://github.com/${PN^}Project/${PN^}/archive/${PV/_/-}.tar.gz -> ${P}.tar.gz"
19+
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
20+
fi
21+
fi
22+
23+
DESCRIPTION="OpenGL 3D space simulator"
24+
HOMEPAGE="https://celestia.space"
25+
26+
LICENSE="GPL-2+"
27+
SLOT="0"
28+
IUSE="glut lua nls +qt5 theora"
29+
REQUIRED_USE="|| ( glut qt5 )"
30+
31+
BDEPEND="
32+
dev-cpp/eigen
33+
virtual/pkgconfig
34+
nls? ( sys-devel/gettext )
35+
"
36+
DEPEND="
37+
dev-libs/libfmt:=
38+
media-libs/glew:0
39+
media-libs/libpng:0=
40+
sys-libs/zlib:=
41+
virtual/glu
42+
virtual/jpeg:0
43+
virtual/opengl
44+
glut? ( media-libs/freeglut )
45+
lua? ( dev-lang/lua:* )
46+
qt5? (
47+
dev-qt/qtcore:5
48+
dev-qt/qtgui:5
49+
dev-qt/qtwidgets:5
50+
)
51+
theora? (
52+
media-libs/libogg
53+
media-libs/libtheora
54+
)
55+
"
56+
RDEPEND="${DEPEND}"
57+
58+
PATCHES=(
59+
# make better desktop files
60+
"${FILESDIR}"/${PN}-1.5.0-desktop.patch
61+
# add a ~/.celestia for extra directories
62+
"${FILESDIR}"/${PN}-1.6.99-cfg.patch
63+
)
64+
65+
src_prepare() {
66+
cmake_src_prepare
67+
68+
### This version of Celestia has a bug in the font rendering and
69+
### requires -fsigned-char. We should be able to force this flag
70+
### on all architectures. See bug #316573.
71+
append-flags "-fsigned-char"
72+
}
73+
74+
src_configure() {
75+
local mycmakeargs=(
76+
-DENABLE_CELX="$(usex lua)"
77+
-DENABLE_NLS="$(usex nls)"
78+
-DENABLE_GLUT="$(usex glut)"
79+
-DENABLE_GTK=OFF
80+
-DENABLE_QT="$(usex qt5)"
81+
-DENABLE_WIN=OFF
82+
-DENABLE_THEORA="$(usex theora)"
83+
)
84+
cmake_src_configure
85+
}
86+
87+
src_install() {
88+
cmake_src_install
89+
90+
local size
91+
for size in 16 22 32 48 ; do
92+
newicon -s ${size} "${S}"/src/celestia/kde/data/hi${size}-app-${PN}.png ${PN}.png
93+
done
94+
newicon -s 128 "${S}"/src/celestia/gtk/data/${PN}-logo.png ${PN}.png
95+
doicon -s scalable "${S}"/src/celestia/gtk/data/${PN}.svg
96+
97+
use glut && domenu ${PN}.desktop
98+
if use qt5 ; then
99+
sed \
100+
-e "/^Name/s@\$@ (qt5 interface)@" \
101+
-e "/^Exec/s@${PN}@${PN}-qt@" \
102+
${PN}.desktop > "${T}"/${PN}-qt5.desktop || die
103+
domenu "${T}"/${PN}-qt5.desktop
104+
fi
105+
dodoc AUTHORS README TRANSLATORS *.txt
106+
}

0 commit comments

Comments
 (0)