commit: 4c691a11251554e0d60ed21c6f2dcc021a1ebf8c Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> AuthorDate: Fri Jun 6 14:05:44 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Jun 7 04:02:17 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c691a11
games-rpg/xu4: add 1.4.3 Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42475 Signed-off-by: Sam James <sam <AT> gentoo.org> games-rpg/xu4/Manifest | 1 + games-rpg/xu4/files/1.4.3-glfw-build.patch | 18 ++++++++ games-rpg/xu4/metadata.xml | 3 ++ games-rpg/xu4/xu4-1.4.3.ebuild | 68 ++++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+) diff --git a/games-rpg/xu4/Manifest b/games-rpg/xu4/Manifest index 559f0ae8278e..2b13ba57c4b4 100644 --- a/games-rpg/xu4/Manifest +++ b/games-rpg/xu4/Manifest @@ -1,3 +1,4 @@ DIST u4upgrad.zip 632072 BLAKE2B 3691f1cbac940021ef6043dd5e2ee26dcee5f8d7181ed525179211a6984f5ab498b84533d28146129c3e747f0af8946f7d691b7cb817a5a4ecb39e71e2df7b9a SHA512 4832d8cfd266d3ccc5eab5184bd2b6b9acd4c0203478873fb5e11704d95104dd9285a7752bad77f873d4f8603673184ae9421964509b948ec69944a4ceadd083 DIST ultima4.zip 529099 BLAKE2B 62a7e6e05344d0c3496ee3240d6cd98c61f1ff8b8f5d869a8cecec8f786b76c8a42e1bef40fa63861d5652352c00ba67708e49b5e6c9ddfdebbb3ae47ae01e2e SHA512 efc65a53492c0f68c9e2f1507afed4da925992cdfec7a699095e6369725af8156331000c575778121e04ef6ca252af2eef97f8f7183b8378f22a4e7e509fb9a5 DIST xu4-1.4.2.gh.tar.gz 8069084 BLAKE2B 6150427c202597b730bfc1c44b0e92d60c90997804fc66b2d108247b7a8578f26ca5fb49acf8afd438437d544141871ff5dc437f00edc74473a500065a21aa43 SHA512 d2ae3fdf47809d4238f986594f182326538d2bbfcd0bacade859a70b8ad91d7b387a3f3d4561361cc3cbd715cc4d54c73c01ad61dcdf10948e715e714e5147f0 +DIST xu4-1.4.3.tar.gz 8086267 BLAKE2B 24bed7b41b0137cdeb488c6ee4e191687c493e56bba7878a00222074e0f9407407e575916ee21c3dbb4888e1301b27e74d7abc33789be8a9a171d719f79c60d2 SHA512 0ce0b71628c0b2f5f3eaf132a0312ad71924097bb663e795ccc296fd80b701798190d492a40a37af2b379a321bd5504b5fecccf6283df1b374b619666fd9edc4 diff --git a/games-rpg/xu4/files/1.4.3-glfw-build.patch b/games-rpg/xu4/files/1.4.3-glfw-build.patch new file mode 100644 index 000000000000..d0bdc677dfd7 --- /dev/null +++ b/games-rpg/xu4/files/1.4.3-glfw-build.patch @@ -0,0 +1,18 @@ +From https://github.com/xu4-engine/u4/commit/6a7ee3d0079cfdc1c8fb9ba7a3c710a957155a71 +From: Karl Robillard <[email protected]> +Date: Thu, 5 Jun 2025 12:42:51 -0400 +Subject: [PATCH] Makefile.common: Fix GLFW build. + +--- a/src/Makefile.common ++++ b/src/Makefile.common +@@ -77,8 +77,10 @@ CXXSRCS=\ + ifeq ($(UI),glv) + CSRCS+=$(GLV_SRC) + else ++ifneq ($(UI),glfw) + CXXSRCS+=event_$(UI).cpp + endif ++endif + + #ifeq ($(CONF),boron) + CSRCS+=module.c support/cdi.c diff --git a/games-rpg/xu4/metadata.xml b/games-rpg/xu4/metadata.xml index dfb64cd69633..6202a0a6fbed 100644 --- a/games-rpg/xu4/metadata.xml +++ b/games-rpg/xu4/metadata.xml @@ -5,6 +5,9 @@ <email>[email protected]</email> <name>Gentoo Games Project</name> </maintainer> + <use> + <flag name="allegro">Add support for Allegro</flag> + </use> <upstream> <remote-id type="github">xu4-engine/u4</remote-id> <remote-id type="sourceforge">xu4</remote-id> diff --git a/games-rpg/xu4/xu4-1.4.3.ebuild b/games-rpg/xu4/xu4-1.4.3.ebuild new file mode 100644 index 000000000000..61b552f608ac --- /dev/null +++ b/games-rpg/xu4/xu4-1.4.3.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="A remake of the computer game Ultima IV" +HOMEPAGE="https://xu4.sourceforge.net/" +SRC_URI="https://sourceforge.net/projects/xu4/files/${PN}/$(ver_cut 1-2)/${P}.tar.gz + https://ultima.thatfleminggent.com/ultima4.zip + https://downloads.sourceforge.net/xu4/u4upgrad.zip" +#S="${WORKDIR}/u4-${PV}/" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="allegro" + +RDEPEND=" + dev-libs/boron + allegro? ( media-libs/allegro:5[opengl] ) + !allegro? ( media-libs/glfw ) + >=media-libs/faun-0.2.1 + media-libs/libglvnd + media-libs/libpng:= + sys-libs/zlib:=[minizip] +" +DEPEND="${RDEPEND}" +BDEPEND="app-arch/unzip" + +PATCHES=( + "${FILESDIR}/1.4-system-minizip.patch" + "${FILESDIR}/1.4.3-glfw-build.patch" +) + +src_unpack() { + # xu4 will read the data files right out of the zip files + # but we want the docs from the original. + unpack ${P}.tar.gz + unpack ultima4.zip + # Place zips where make install expects them + cp "${DISTDIR}/ultima4.zip" "${DISTDIR}/u4upgrad.zip" "${S}" || die +} + +src_prepare() { + default + + # rm as part of using system minizip patch + rm -f src/unzip.{c,h} || die + sed -i -e '/CXXFLAGS+=-O3 -DNDEBUG/d' src/Makefile || die + # Don't strip executable + sed -i -e 's:-s src/xu4:src/xu4:g' Makefile || die +} + +src_configure() { + # custom configure + local myconf=( + $(usev allegro --allegro) + $(usev !allegro --glfw) + ) + ./configure "${myconf[@]}" || die +} + +src_install() { + emake DESTDIR="${D}/usr" install + dodoc AUTHORS README.md doc/*.txt "${WORKDIR}"/*.txt + insinto "/usr/share/xu4" + doins "${DISTDIR}/ultima4.zip" +}
