diff options
author | 2022-12-20 09:38:52 +0100 | |
---|---|---|
committer | 2022-12-20 09:43:07 +0100 | |
commit | 7525ad875eb51a66d6298a2691f16530cec6f1e9 (patch) | |
tree | def9cded58905a7c1cb1a7055f21824de0d4a0de /sci-astronomy/celestia/celestia-1.7.0_pre20221215.ebuild | |
parent | gnome-extra/gnome-network-displays: stabilize 0.90.5 for amd64 (diff) | |
download | gentoo-7525ad875eb51a66d6298a2691f16530cec6f1e9.tar.gz gentoo-7525ad875eb51a66d6298a2691f16530cec6f1e9.tar.bz2 gentoo-7525ad875eb51a66d6298a2691f16530cec6f1e9.zip |
sci-astronomy/celestia: add 1.7.0_pre20221215
Closes: https://bugs.gentoo.org/887029
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'sci-astronomy/celestia/celestia-1.7.0_pre20221215.ebuild')
-rw-r--r-- | sci-astronomy/celestia/celestia-1.7.0_pre20221215.ebuild | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/sci-astronomy/celestia/celestia-1.7.0_pre20221215.ebuild b/sci-astronomy/celestia/celestia-1.7.0_pre20221215.ebuild new file mode 100644 index 000000000000..d5a18e53aa56 --- /dev/null +++ b/sci-astronomy/celestia/celestia-1.7.0_pre20221215.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +CMAKE_IN_SOURCE_BUILD="yes" +LUA_COMPAT=( lua5-{1..3} luajit ) + +inherit desktop lua-single xdg cmake + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/CelestiaProject/Celestia.git" + inherit git-r3 +else + if [[ ${PV} == *_p* ]] ; then + COMMIT_ID="9b00246b17a60f0a6dce724be8f7a3bda04809c3" + COMMIT_ID_DATA="bc8208e4474aee9a1096c6479a1e7f298aa98d02" + SRC_URI=" + https://github.com/${PN^}Project/${PN^}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz + https://github.com/${PN^}Project/${PN^}Content/archive/${COMMIT_ID_DATA}.tar.gz -> ${P}-data.tar.gz + " + S="${WORKDIR}/${PN^}-${COMMIT_ID}" + KEYWORDS="~amd64 ~x86" + else + SRC_URI="https://github.com/${PN^}Project/${PN^}/archive/${PV/_/-}.tar.gz -> ${P}.tar.gz" + fi +fi + +DESCRIPTION="OpenGL 3D space simulator" +HOMEPAGE="https://celestia.space https://github.com/CelestiaProject/Celestia" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="ffmpeg glut lua nls +qt5" +REQUIRED_USE="|| ( glut qt5 ) + lua? ( ${LUA_REQUIRED_USE} )" + +BDEPEND=" + dev-cpp/eigen + virtual/pkgconfig + nls? ( sys-devel/gettext ) +" +DEPEND=" + dev-libs/libfmt:= + media-libs/glew:0= + media-libs/libepoxy + media-libs/libjpeg-turbo:0= + media-libs/libpng:0= + sys-libs/zlib:= + virtual/glu + virtual/opengl + ffmpeg? ( media-video/ffmpeg:0 ) + glut? ( media-libs/freeglut ) + lua? ( ${LUA_DEPS} ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtopengl:5 + dev-qt/qtwidgets:5 + ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + # add a ~/.celestia for extra directories + "${FILESDIR}"/${PN}-1.6.99-cfg.patch + # allow forcing CMake to look for a specific Lua version instead of the newest branch installed + "${FILESDIR}"/${PN}-1.7.0-cmake_lua_version.patch +) + +src_prepare() { + mv "${WORKDIR}"/CelestiaContent-${COMMIT_ID_DATA} content || die + cmake_src_prepare +} + +src_configure() { + CMAKE_USE_DIR="${CMAKE_USE_DIR}/content" BUILD_DIR="${BUILD_DIR}/content" \ + cmake_src_configure + + local mycmakeargs=( + -DENABLE_CELX="$(usex lua)" + -DENABLE_NLS="$(usex nls)" + -DENABLE_FFMPEG="$(usex ffmpeg)" + -DENABLE_GLUT="$(usex glut)" + -DENABLE_GTK=OFF + -DENABLE_QT="$(usex qt5)" + -DENABLE_WIN=OFF + -DENABLE_SDL=OFF + ) + # Upstream always looks for LuaJIT first unless stopped, and we only need + # the version specification when linking against PUC Lua + if use lua && ! use lua_single_target_luajit; then + mycmakeargs+=( + -DCMAKE_DISABLE_FIND_PACKAGE_LuaJIT=ON + -DLUA_VERSION=$(lua_get_version) + ) + fi + cmake_src_configure +} + +src_compile() { + cmake_src_compile + CMAKE_USE_DIR="${CMAKE_USE_DIR}/content" BUILD_DIR="${BUILD_DIR}/content" cmake_src_compile +} + +src_install() { + cmake_src_install + + # Icons with more resolutions + doicon -s 48 "${S}"/src/celestia/gtk/data/${PN}.png + newicon -s 128 "${S}"/src/celestia/gtk/data/${PN}-logo.png ${PN}.png + doicon -s scalable "${S}"/src/celestia/gtk/data/${PN}.svg + + use glut && domenu "${S}"/debian/${PN}-glut.desktop + + dodoc AUTHORS README TRANSLATORS *.txt + + CMAKE_USE_DIR="${CMAKE_USE_DIR}/content" BUILD_DIR="${BUILD_DIR}/content" cmake_src_install +} |