1 |
commit: a05acb05582af6fb2720a3a5fa0e59b4bb780439 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 2 15:07:38 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 2 15:08:25 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a05acb05 |
7 |
|
8 |
sci-astronomy/celestia: Switched from autotools to cmake |
9 |
|
10 |
- Adjusted dependencies |
11 |
- Added qt5 USE flag |
12 |
- Added glew USE flag |
13 |
- Install different icon sizes |
14 |
- Install correct .desktop files |
15 |
|
16 |
Package-Manager: Portage-2.3.53, Repoman-2.3.12 |
17 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
18 |
|
19 |
sci-astronomy/celestia/celestia-9999.ebuild | 96 ++++++++++++++++------------- |
20 |
1 file changed, 52 insertions(+), 44 deletions(-) |
21 |
|
22 |
diff --git a/sci-astronomy/celestia/celestia-9999.ebuild b/sci-astronomy/celestia/celestia-9999.ebuild |
23 |
index 4e61192de39..b3f1f95bcbf 100644 |
24 |
--- a/sci-astronomy/celestia/celestia-9999.ebuild |
25 |
+++ b/sci-astronomy/celestia/celestia-9999.ebuild |
26 |
@@ -1,9 +1,9 @@ |
27 |
-# Copyright 1999-2018 Gentoo Foundation |
28 |
+# Copyright 1999-2019 Gentoo Authors |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
|
31 |
EAPI=6 |
32 |
|
33 |
-inherit autotools flag-o-matic xdg-utils |
34 |
+inherit cmake-utils desktop flag-o-matic gnome2-utils xdg-utils |
35 |
|
36 |
DESCRIPTION="OpenGL 3D space simulator" |
37 |
HOMEPAGE="https://celestia.space" |
38 |
@@ -18,23 +18,40 @@ fi |
39 |
|
40 |
LICENSE="GPL-2" |
41 |
SLOT="0" |
42 |
-IUSE="cairo gtk nls pch theora threads" |
43 |
+IUSE="glut gtk nls +qt5 theora" |
44 |
+ |
45 |
+REQUIRED_USE="|| ( glut gtk qt5 )" |
46 |
|
47 |
RDEPEND=" |
48 |
+ >=dev-lang/lua-5.1:* |
49 |
+ dev-libs/libfmt |
50 |
+ media-libs/glew:0 |
51 |
+ virtual/glu |
52 |
virtual/opengl |
53 |
virtual/jpeg:0 |
54 |
media-libs/libpng:0= |
55 |
- >=dev-lang/lua-5.1:* |
56 |
+ glut? ( media-libs/freeglut ) |
57 |
gtk? ( |
58 |
x11-libs/gtk+:2 |
59 |
>=x11-libs/gtkglext-1.0 |
60 |
+ x11-libs/gdk-pixbuf:2 |
61 |
+ x11-libs/pango |
62 |
+ ) |
63 |
+ qt5? ( |
64 |
+ dev-qt/qtcore:5 |
65 |
+ dev-qt/qtgui:5 |
66 |
+ dev-qt/qtwidgets:5 |
67 |
+ ) |
68 |
+ theora? ( |
69 |
+ media-libs/libogg |
70 |
+ media-libs/libtheora |
71 |
) |
72 |
- !gtk? ( media-libs/freeglut ) |
73 |
- cairo? ( x11-libs/cairo ) |
74 |
- theora? ( media-libs/libtheora )" |
75 |
+" |
76 |
|
77 |
DEPEND="${RDEPEND} |
78 |
- virtual/pkgconfig" |
79 |
+ dev-cpp/eigen |
80 |
+ virtual/pkgconfig |
81 |
+ nls? ( sys-devel/gettext )" |
82 |
|
83 |
PATCHES=( |
84 |
# make better desktop files |
85 |
@@ -43,31 +60,9 @@ PATCHES=( |
86 |
"${FILESDIR}"/${PN}-1.6.99-cfg.patch |
87 |
) |
88 |
|
89 |
-pkg_setup() { |
90 |
- # Check for one for the following use flags to be set. |
91 |
- if use gtk; then |
92 |
- einfo "USE=\"gtk\" detected." |
93 |
- CELESTIA_GUI="gtk" |
94 |
- else |
95 |
- ewarn "If you want to use the full gui, set USE=\"gtk\"" |
96 |
- ewarn "Defaulting to glut support (no GUI)." |
97 |
- CELESTIA_GUI="glut" |
98 |
- fi |
99 |
-} |
100 |
- |
101 |
src_prepare() { |
102 |
default |
103 |
|
104 |
- # remove flags to let the user decide |
105 |
- local cf |
106 |
- for cf in -O2 -ffast-math \ |
107 |
- -fexpensive-optimizations \ |
108 |
- -fomit-frame-pointer; do |
109 |
- sed -i \ |
110 |
- -e "s/${cf}//g" \ |
111 |
- configure.ac admin/* || die "sed failed" |
112 |
- done |
113 |
- eautoreconf |
114 |
filter-flags "-funroll-loops -frerun-loop-opt" |
115 |
|
116 |
### This version of Celestia has a bug in the font rendering and |
117 |
@@ -77,35 +72,48 @@ src_prepare() { |
118 |
} |
119 |
|
120 |
src_configure() { |
121 |
- # force lua in 1.6.1. seems to be inevitable |
122 |
- local myeconfargs=( |
123 |
- --disable-rpath |
124 |
- --with-${CELESTIA_GUI} |
125 |
- --with-lua |
126 |
- $(use_enable cairo) |
127 |
- $(use_enable threads threading) |
128 |
- $(use_enable nls) |
129 |
- $(use_enable pch) |
130 |
- $(use_enable theora) |
131 |
+ # force lua. Seems still to be inevitable |
132 |
+ local mycmakeargs=( |
133 |
+ #-DENABLE_CELX="$(usex lua)" |
134 |
+ -DENABLE_CELX=ON |
135 |
+ -DENABLE_NLS="$(usex nls)" |
136 |
+ -DENABLE_GLUT="$(usex glut)" |
137 |
+ -DENABLE_GTK="$(usex gtk)" |
138 |
+ -DENABLE_QT="$(usex qt5)" |
139 |
+ -DENABLE_WIN=OFF |
140 |
+ -DENABLE_THEORA="$(usex theora)" |
141 |
) |
142 |
- econf "${myeconfargs[@]}" |
143 |
+ cmake-utils_src_configure |
144 |
} |
145 |
|
146 |
src_install() { |
147 |
- emake DESTDIR="${D}" install |
148 |
+ cmake-utils_src_install |
149 |
+ |
150 |
local size |
151 |
for size in 16 22 32 48 ; do |
152 |
- newicon "${S}"/src/celestia/kde/data/hi${size}-app-${PN}.png ${PN}.png |
153 |
+ newicon -s ${size} "${S}"/src/celestia/kde/data/hi${size}-app-${PN}.png ${PN}.png |
154 |
done |
155 |
|
156 |
- [[ ${CELESTIA_GUI} == glut ]] && domenu celestia.desktop |
157 |
+ use glut && domenu ${PN}.desktop |
158 |
+ local ui |
159 |
+ for ui in gtk qt5 ; do |
160 |
+ if use ${ui} ; then |
161 |
+ sed \ |
162 |
+ -e "/^Name/s@\$@ (${ui} interface)@" \ |
163 |
+ -e "/^Exec/s@${PN}@${PN}-${ui/qt5/qt}@" \ |
164 |
+ ${PN}.desktop > "${T}"/${PN}-${ui}.desktop || die |
165 |
+ domenu "${T}"/${PN}-${ui}.desktop |
166 |
+ fi |
167 |
+ done |
168 |
dodoc AUTHORS README TRANSLATORS *.txt |
169 |
} |
170 |
|
171 |
pkg_postinst() { |
172 |
+ gnome2_icon_cache_update |
173 |
xdg_desktop_database_update |
174 |
} |
175 |
|
176 |
pkg_postrm() { |
177 |
+ gnome2_icon_cache_update |
178 |
xdg_desktop_database_update |
179 |
} |