summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-12-01 14:22:28 +0100
committerMarek Szuba <marecki@gentoo.org>2020-12-01 14:23:08 +0100
commit42cc080b30071bc9a1cf866fe932e4619a726065 (patch)
treeee3a4d7d7cc22524518acdcc0100aa67cc34e774 /games-util
parentgames-sports/xmoto: migrate to lua-single.eclass (diff)
downloadgentoo-42cc080b30071bc9a1cf866fe932e4619a726065.tar.gz
gentoo-42cc080b30071bc9a1cf866fe932e4619a726065.tar.bz2
gentoo-42cc080b30071bc9a1cf866fe932e4619a726065.zip
games-util/slade: migrate to lua-single.eclass
Nothing special, just the usual CMake find_package(Lua) hackery. Closes: https://bugs.gentoo.org/752732 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'games-util')
-rw-r--r--games-util/slade/files/slade-3.1.12a-cmake-lua-version.patch11
-rw-r--r--games-util/slade/slade-3.1.12a-r100.ebuild72
2 files changed, 83 insertions, 0 deletions
diff --git a/games-util/slade/files/slade-3.1.12a-cmake-lua-version.patch b/games-util/slade/files/slade-3.1.12a-cmake-lua-version.patch
new file mode 100644
index 000000000000..ba7fba329c9b
--- /dev/null
+++ b/games-util/slade/files/slade-3.1.12a-cmake-lua-version.patch
@@ -0,0 +1,11 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -104,7 +104,7 @@
+ find_package(OpenGL REQUIRED)
+ find_package(GLEW REQUIRED)
+ find_package(CURL REQUIRED)
+-find_package(Lua REQUIRED)
++find_package(Lua ${LUA_VERSION} EXACT REQUIRED)
+ pkg_check_modules(DUMB REQUIRED dumb>=1.0)
+ include_directories(
+ ${FREEIMAGE_INCLUDE_DIR}
diff --git a/games-util/slade/slade-3.1.12a-r100.ebuild b/games-util/slade/slade-3.1.12a-r100.ebuild
new file mode 100644
index 000000000000..da73f5e0060b
--- /dev/null
+++ b/games-util/slade/slade-3.1.12a-r100.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..3} )
+WX_GTK_VER="3.0-gtk3"
+
+inherit cmake lua-single wxwidgets
+
+DESCRIPTION="Modern editor for Doom-engine based games and source ports"
+HOMEPAGE="https://slade.mancubus.net/"
+SRC_URI="https://github.com/sirjuddington/${PN^^}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="fluidsynth timidity webkit"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+DEPEND="${LUA_DEPS}
+ app-arch/bzip2:=
+ >=media-libs/dumb-2:=
+ media-libs/freeimage[jpeg,png,tiff]
+ media-libs/glew:0=
+ media-libs/libsfml:=
+ net-misc/curl
+ sys-libs/zlib
+ x11-libs/wxGTK:${WX_GTK_VER}[gstreamer,opengl,webkit?,X]
+ fluidsynth? ( media-sound/fluidsynth:= )
+"
+
+RDEPEND="
+ ${DEPEND}
+ timidity? ( media-sound/timidity++ )
+"
+
+BDEPEND="
+ app-arch/p7zip
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${PN^^}-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-bundled-libs.patch
+ "${FILESDIR}"/${P}-sfml-gtk3.patch
+ "${FILESDIR}"/${P}-wxGLCanvas.patch
+ "${FILESDIR}"/${P}-freetype-deps.patch
+ "${FILESDIR}"/${P}-fluidsynth-driver.patch
+ "${FILESDIR}"/${PN}-3.1.12a-cmake-lua-version.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Delete bundled libraries just in case.
+ rm -r src/External/{dumb,glew,lua}/ || die
+
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLUA_VERSION=$(lua_get_version)
+ -DNO_FLUIDSYNTH=$(usex fluidsynth OFF ON)
+ -DNO_WEBVIEW=$(usex webkit OFF ON)
+ -DUSE_SFML_RENDERWINDOW=ON
+ -DWX_GTK3=ON
+ )
+ setup-wxwidgets
+ cmake_src_configure
+}