diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2021-01-18 00:18:08 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2021-01-18 00:20:15 +0100 |
commit | c10ee37782c5045e949a2758cdb5fd0e6dbe8aa2 (patch) | |
tree | 32c399e41872809ba22bc73c6ed572b56f502ccf | |
parent | dev-lang/go: remove 1.14.12 and 1.15.5 (diff) | |
download | gentoo-c10ee37782c5045e949a2758cdb5fd0e6dbe8aa2.tar.gz gentoo-c10ee37782c5045e949a2758cdb5fd0e6dbe8aa2.tar.bz2 gentoo-c10ee37782c5045e949a2758cdb5fd0e6dbe8aa2.zip |
games-engines/devilutionx: Avoid bundled font again
Bug: https://bugs.gentoo.org/704508
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-rw-r--r-- | games-engines/devilutionx/devilutionx-1.1.0-r1.ebuild | 65 | ||||
-rw-r--r-- | games-engines/devilutionx/files/devilutionx-1.1.0-no_bundled_font.patch | 51 |
2 files changed, 116 insertions, 0 deletions
diff --git a/games-engines/devilutionx/devilutionx-1.1.0-r1.ebuild b/games-engines/devilutionx/devilutionx-1.1.0-r1.ebuild new file mode 100644 index 000000000000..913e1f40eef5 --- /dev/null +++ b/games-engines/devilutionx/devilutionx-1.1.0-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# Sometimes build with ninja fails. +# Please check occasionally if we can revert back to ninja. +# Latest known issue: +# +#CMAKE_MAKEFILE_GENERATOR="emake" + +inherit cmake desktop + +DESCRIPTION="Diablo engine for modern operating systems" +HOMEPAGE="https://github.com/diasurgical/devilutionX" +if [[ "${PV}" == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/diasurgical/devilutionX.git" +else + SRC_URI="https://github.com/diasurgical/devilutionX/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/devilutionX-${PV}" +fi + +LICENSE="public-domain" +SLOT="0" + +IUSE="debug lto" + +RDEPEND=" + dev-libs/libsodium + media-fonts/sil-charis + media-libs/libsdl2[haptic] + media-libs/sdl2-mixer + media-libs/sdl2-ttf +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-1.1.0-no_bundled_font.patch" #704508 +) + +src_configure() { + local mycmakeargs=( + -DASAN="OFF" + -DDEBUG="$(usex debug)" + -DDISABLE_LTO="$(usex !lto)" + -DDIST="ON" + -DUBSAN="OFF" + ) + cmake_src_configure + + # Build system still doesn't reliably set release version in the build + sed "/PROJECT_VERSION/s@-@${PV}@" -i "${BUILD_DIR}/config.h" || die +} + +pkg_postinst() { + einfo "In order to play the game you need to install the file" + einfo " diabdat.mpq" + einfo "from the original game CD into the following directory:" + einfo " \${HOME}/.local/share/diasurgical/devilution/" +} diff --git a/games-engines/devilutionx/files/devilutionx-1.1.0-no_bundled_font.patch b/games-engines/devilutionx/files/devilutionx-1.1.0-no_bundled_font.patch new file mode 100644 index 000000000000..7944a8221d2d --- /dev/null +++ b/games-engines/devilutionx/files/devilutionx-1.1.0-no_bundled_font.patch @@ -0,0 +1,51 @@ +https://bugs.gentoo.org/704508 + +--- devilutionX-1.1.0/CMakeLists.txt ++++ devilutionX-1.1.0/CMakeLists.txt +@@ -298,7 +298,6 @@ + SourceX/main.cpp
+ SourceX/devilutionx.exe.manifest
+ Packaging/macOS/AppIcon.icns
+- Packaging/resources/CharisSILB.ttf
+ Packaging/windows/devilutionx.rc)
+
+ if(NOT NONET)
+@@ -339,9 +338,6 @@ +
+ add_executable(${BIN_TARGET} WIN32 MACOSX_BUNDLE ${devilutionx_SRCS})
+
+-# Copy the font to the build directory to it works from the build directory
+-file(COPY "Packaging/resources/CharisSILB.ttf" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+-
+ # Use file GENERATE instead of configure_file because configure_file
+ # does not support generator expressions.
+ get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+@@ -563,7 +559,6 @@ +
+ if(APPLE)
+ set_source_files_properties("./Packaging/macOS/AppIcon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+- set_source_files_properties("./Packaging/resources/CharisSILB.ttf" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+ set(MACOSX_BUNDLE_GUI_IDENTIFIER com.diasurgical.devilutionx)
+ set(MACOSX_BUNDLE_COPYRIGHT Unlicense)
+ set(MACOSX_BUNDLE_BUNDLE_NAME devilutionx)
+@@ -624,9 +619,6 @@ + DESTINATION "share/icons/hicolor/512x512/apps"
+ RENAME "${project_name}.png"
+ )
+- install(FILES "${PROJECT_SOURCE_DIR}/Packaging/resources/CharisSILB.ttf"
+- DESTINATION "share/fonts/truetype"
+- )
+
+ # -G DEB
+ set(CPACK_PACKAGE_CONTACT "anders@jenbo.dk")
+--- devilutionX-1.1.0/SourceX/DiabloUI/fonts.h ++++ devilutionX-1.1.0/SourceX/DiabloUI/fonts.h +@@ -11,7 +11,7 @@ + #endif
+
+ #ifndef TTF_FONT_NAME
+-#define TTF_FONT_NAME "CharisSILB.ttf"
++#define TTF_FONT_NAME "CharisSIL-B.ttf"
+ #endif
+
+ namespace dvl {
|