diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-29 10:15:54 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-29 10:15:54 +0100 |
commit | 9aa80713372911cec499b3adb2cd746790920916 (patch) | |
tree | b8e99dc5dd60ac2094a27cc52f74aada8df38f05 /games-simulation/openttd | |
parent | b4d43e8c611df4a8061b6f88d9e9f6b1e3c83903 (diff) |
gentoo resync : 29.06.2021
Diffstat (limited to 'games-simulation/openttd')
-rw-r--r-- | games-simulation/openttd/Manifest | 11 | ||||
-rw-r--r-- | games-simulation/openttd/files/openttd-1.10.3-icu68.patch | 28 | ||||
-rw-r--r-- | games-simulation/openttd/files/openttd-1.11.2_dont_compress_man.patch | 29 | ||||
-rw-r--r-- | games-simulation/openttd/files/openttd-1.9.0-cflags.patch | 56 | ||||
-rw-r--r-- | games-simulation/openttd/files/openttd-1.9.0-dont_compress_manpages.patch | 34 | ||||
-rw-r--r-- | games-simulation/openttd/metadata.xml | 7 | ||||
-rw-r--r-- | games-simulation/openttd/openttd-1.10.3.ebuild | 177 | ||||
-rw-r--r-- | games-simulation/openttd/openttd-1.11.2.ebuild | 100 | ||||
-rw-r--r-- | games-simulation/openttd/openttd-9999.ebuild | 176 |
9 files changed, 138 insertions, 480 deletions
diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest index 08a6b7154bfc..0ab557b4ae36 100644 --- a/games-simulation/openttd/Manifest +++ b/games-simulation/openttd/Manifest @@ -1,8 +1,5 @@ -AUX openttd-1.10.3-icu68.patch 766 BLAKE2B 8d2ad4ddd3fbce89195982a5bcac5fd119d51cba58b9a5b6b90edf8c04041313eaf54167232aab1fdf112cadac1cf0190973cd2a807273544086f8e75226a91f SHA512 f52ed0b0e8e692c481cce579697f329a6f1495bcda834ae1566de9ec7f2cb3b791428d6c6b828d2d9d201572b5a6981d64e936fb33334c7e74d9e56e92d150a7 -AUX openttd-1.9.0-cflags.patch 1418 BLAKE2B 4c279bca0360d202d183488f61a19a5abc768cf55c2bb1ebaaa58ecd59f61584d4865bd7fc91260f14bd750b623884b88b6900e1c9cb89c007b32534e62ab510 SHA512 df1eeca21325b09c849191f7a60d0be1eee107a40b3cbb846f5c845d560f61a847ac66c427772c8e980d2ab2f51ccaa539938dd36c143f9af558293f9cf5c755 -AUX openttd-1.9.0-dont_compress_manpages.patch 1137 BLAKE2B aa03bf141f1dac450b90ad9b54f4022dc981e041f40cd5ad9b7b522910788fcf30c85ac8ee3ba480c76df67f11b8258de7fe785259796b67bebc1a49ce1ed6e3 SHA512 0985a5826dddfb9a03bfc686de5ae2a36362d635865fde9ec2ee340672556d82517db94197d7de04630ba7558bee5ad4543debafd46e5dfd2bbec2eaa9354a18 +AUX openttd-1.11.2_dont_compress_man.patch 999 BLAKE2B 5a2e9d91cb0f60723ef198723b07793c1909e55e68493733ed3cc0ce66441be0e970b7bd8cd6ade43c0090bcc0b2d68cde6230306a55f857ca9d3c0406ccaf17 SHA512 a7b312995000abf5a4bc4418bb466aead75fc3f8dbd4ed7cc3d2914dc96beb815a4cf422e9ca24e41dbbf545dfef8c8cdeeec68f9390e2f6465d1eb80fcaf358 AUX openttd.initd-r1 306 BLAKE2B d36e2f405a1b8808c708edd0c66e23d9976c2f5ef0fc2af3430bb8ba287c237dffe3d11cde6428b8ab668886ac4ff5eb4bc4fe5b39f205da4bf3d7773f66f7ef SHA512 bd04f9d812d5d68eebd953e9a667e5138d8e440139eb9c07f8da089495774b7d45e3b23bfb2af38ed053b333d4ead5f4be5c5fa877ad9f9bb0effee5c4a499dc -DIST openttd-1.10.3-source.tar.xz 6815924 BLAKE2B f700304e723fe5c3fa9781432a387e061595bbc8de42f565ad57ac265d9e4bc14cbc659a3f6551019bfb31b8b56b180c272c6753a12b4cd2e13016a98dfe1679 SHA512 d1cd535e8e49f0ac147704341287af1b16bde6725fd9152dd36dcb780559b400da8bb31c4e8eb665a0d11e9b1f5bf8a96be0f97f7a85bd967eec534fdd3dd0d4 -EBUILD openttd-1.10.3.ebuild 4954 BLAKE2B 4fe0c6e5b94387410cd4f682f73e7ab15538bfca9643b99efefe7e727a985176fc74973c57821399f01e8d3269a2a1bb487dde9dfc6979707d0dace1c302ef12 SHA512 b3bcca0ab9ff9238d2e154bb96f80fc4da572c389fd12881ed62e84ed0cbedd37b26b0465f191188b20238bad9e5e48f87595951e42107296acfaabc95477a94 -EBUILD openttd-9999.ebuild 4922 BLAKE2B 0fe87c1ee04360bf558ffc19219307d97337bd995e861f620f2247bb77c0e27799e7306f7ff6be4a19cdeb45e655a05e89abd1b48528e85dd9b474919cc98c31 SHA512 3c9c8169c1c95af46f6b1c34593a18ad7923df9cce35ec1803d8128c4b552a742b9ac27daa140f59bb14d4847ee3b784e03fda9715e8a6c030aeb72ecd12912c -MISC metadata.xml 752 BLAKE2B 85476f4dbf68d94a5d95e35cff935edfe35caee4bd2a253c7bad747b0915b80f0f7009bf78e419417a05345210bed17dff8f82ce603480c96781323d7d5a89fd SHA512 ddb1fbbe98d5e0bc1e23385b38502603819b89bd1d9285b0193a55efe2263b8ab6e045c7befdc908303eea27de8c9148dbcc8e7b6c035b267f5c8ff0f16b4b56 +DIST openttd-1.11.2-source.tar.xz 6783972 BLAKE2B c71fd98a480566aede29f84afbd100b6d0dfa80311860907a7287d2d5bed74bd492c2b1012cd83f45fe68d60fb0c2378e1384530a84c28bd7fbd907b45110491 SHA512 9a6364bf19627db9f8ec58bfa85fa3a8febf1109f3b5fb9053bef810ac2d0c41df91b58f0b253dd45320a29cae2e8485df794afa7b5240f19759f98fd65c35ea +EBUILD openttd-1.11.2.ebuild 2891 BLAKE2B d46935e37ae46386ba067f37fec19b12f620f543556c7d621811926d90fedcc90434bdb118da848c53d0e6e48f93b5aeaa32e00234f8e838552c0aa4d06d91a2 SHA512 4808d34875431bf1c2fb01d6c2cc9bb216282e1a7debe77909efbbdfb60910d49a88244b36685826f17cd01821ccf1cacce8174b0425c5f6324b914c0829b3a1 +MISC metadata.xml 856 BLAKE2B cb15cf57f5ff6c280b90b7c1c89d50ed7ba428439f604362c049ebfb303e5d05034e7735fc60b4b3c525f0dbdfea7952e5eaac59542885d45692c6412b35d5f0 SHA512 da2d62a4e3b3c49ebd28434851fb1fb7e356e6b7ec7049b37b126b09fbbd38107128e6500fcc316d6b364efa41dec5ad90df09c341ad4b227fd00c08a4f9bb31 diff --git a/games-simulation/openttd/files/openttd-1.10.3-icu68.patch b/games-simulation/openttd/files/openttd-1.10.3-icu68.patch deleted file mode 100644 index 9596ab66606a..000000000000 --- a/games-simulation/openttd/files/openttd-1.10.3-icu68.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 842e0ed5e3220a0e5ab19e7b0892c9c72c230ae7 Mon Sep 17 00:00:00 2001 -From: Lars Wendler <polynomial-c@gentoo.org> -Date: Fri, 30 Oct 2020 18:45:20 +0100 -Subject: [PATCH] Fix: build with icu-68.1 - -icu-68.1 removed public macro definitions for TRUE and FALSE - -Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> ---- - src/gfx_layout.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp -index 584a71273..ebd1afaa8 100644 ---- a/src/gfx_layout.cpp -+++ b/src/gfx_layout.cpp -@@ -116,7 +116,7 @@ void Font::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const - - le_bool Font::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const - { -- return FALSE; -+ return false; - } - - /** --- -2.29.2 - diff --git a/games-simulation/openttd/files/openttd-1.11.2_dont_compress_man.patch b/games-simulation/openttd/files/openttd-1.11.2_dont_compress_man.patch new file mode 100644 index 000000000000..0dfef300dc5e --- /dev/null +++ b/games-simulation/openttd/files/openttd-1.11.2_dont_compress_man.patch @@ -0,0 +1,29 @@ +From 985c2f4937573ce80add1aa84e4e57148c0a1815 Mon Sep 17 00:00:00 2001 +From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com> +Date: Sun, 23 May 2021 17:39:53 +0300 +Subject: [PATCH] Don't compress man file on install + +--- + cmake/InstallAndPackage.cmake | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/cmake/InstallAndPackage.cmake b/cmake/InstallAndPackage.cmake +index 9b7d65788..b5b23c95f 100644 +--- a/cmake/InstallAndPackage.cmake ++++ b/cmake/InstallAndPackage.cmake +@@ -51,11 +51,10 @@ if(OPTION_INSTALL_FHS) + install(CODE + " + execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${MAN_SOURCE_FILE} ${MAN_BINARY_FILE}) +- execute_process(COMMAND gzip -9 -n -f ${MAN_BINARY_FILE}) + " + COMPONENT manual) + install(FILES +- ${MAN_BINARY_FILE}.gz ++ ${MAN_BINARY_FILE} + DESTINATION ${MAN_DESTINATION_DIR}/man6 + COMPONENT manual) + endif() +-- +2.26.3 + diff --git a/games-simulation/openttd/files/openttd-1.9.0-cflags.patch b/games-simulation/openttd/files/openttd-1.9.0-cflags.patch deleted file mode 100644 index 86eb16168dbc..000000000000 --- a/games-simulation/openttd/files/openttd-1.9.0-cflags.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 6d72f33efe9f911d1427795a06c13d9dcd6fa222 Mon Sep 17 00:00:00 2001 -From: Lars Wendler <polynomial-c@gentoo.org> -Date: Wed, 3 Apr 2019 14:11:42 +0200 -Subject: [PATCH] Don't mess with our CFLAGS - -Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> ---- - config.lib | 18 ------------------ - 1 file changed, 18 deletions(-) - -diff --git a/config.lib b/config.lib -index f65aaa535..7789c0bea 100644 ---- a/config.lib -+++ b/config.lib -@@ -1499,11 +1499,6 @@ make_cflags_and_ldflags() { - # No debug, add default stuff - OBJS_SUBDIR="release" - -- if [ "$enable_profiling" = "0" ]; then -- # -fomit-frame-pointer and -pg do not go well together (gcc errors they are incompatible) -- CFLAGS="-fomit-frame-pointer $CFLAGS" -- fi -- CFLAGS="-O2 $CFLAGS" - else - OBJS_SUBDIR="debug" - -@@ -1511,14 +1506,6 @@ make_cflags_and_ldflags() { - if [ $enable_debug -ge 1 ]; then - CFLAGS="$CFLAGS -g -D_DEBUG" - fi -- if [ $enable_debug -ge 2 ]; then -- CFLAGS="$CFLAGS -fno-inline" -- fi -- if [ $enable_debug -ge 3 ]; then -- CFLAGS="$CFLAGS -O0" -- else -- CFLAGS="$CFLAGS -O2" -- fi - fi - - if [ $enable_debug -le 2 ]; then -@@ -1543,11 +1530,6 @@ make_cflags_and_ldflags() { - CFLAGS="$CFLAGS -fno-expensive-optimizations" - fi - -- if [ "$enable_profiling" != "0" ]; then -- CFLAGS="$CFLAGS -pg" -- LDFLAGS="$LDFLAGS -pg" -- fi -- - if [ "$with_threads" = "0" ]; then - CFLAGS="$CFLAGS -DNO_THREADS" - fi --- -2.21.0 - diff --git a/games-simulation/openttd/files/openttd-1.9.0-dont_compress_manpages.patch b/games-simulation/openttd/files/openttd-1.9.0-dont_compress_manpages.patch deleted file mode 100644 index d151dbf36931..000000000000 --- a/games-simulation/openttd/files/openttd-1.9.0-dont_compress_manpages.patch +++ /dev/null @@ -1,34 +0,0 @@ -From da54b0365997181979d5c7131e99957424d4a167 Mon Sep 17 00:00:00 2001 -From: Lars Wendler <polynomial-c@gentoo.org> -Date: Wed, 3 Apr 2019 13:53:50 +0200 -Subject: [PATCH] Do not compress man-pages by default - -Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> ---- - Makefile.bundle.in | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/Makefile.bundle.in b/Makefile.bundle.in -index eaf7134dd..1c2523181 100644 ---- a/Makefile.bundle.in -+++ b/Makefile.bundle.in -@@ -77,7 +77,6 @@ endif - ifdef MAN_DIR - $(Q)mkdir -p "$(BUNDLE_DIR)/man/" - $(Q)cp "$(ROOT_DIR)/docs/openttd.6" "$(BUNDLE_DIR)/man/" -- $(Q)gzip -9 "$(BUNDLE_DIR)/man/openttd.6" - endif - $(Q)cp "$(ROOT_DIR)/media/openttd.32.xpm" "$(BUNDLE_DIR)/media/" - $(Q)cp "$(ROOT_DIR)/media/openttd."*.png "$(BUNDLE_DIR)/media/" -@@ -219,7 +218,7 @@ endif - ifdef MAN_DIR - ifndef DO_NOT_INSTALL_MAN - $(Q)install -d "$(INSTALL_MAN_DIR)" -- $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)/${BINARY_NAME}.6.gz" -+ $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6" "$(INSTALL_MAN_DIR)/${BINARY_NAME}.6" - endif - endif - ifdef MENU_DIR --- -2.21.0 - diff --git a/games-simulation/openttd/metadata.xml b/games-simulation/openttd/metadata.xml index a5465cd55c4a..cd19f79bf538 100644 --- a/games-simulation/openttd/metadata.xml +++ b/games-simulation/openttd/metadata.xml @@ -6,10 +6,13 @@ <name>Gentoo Games Project</name> </maintainer> <use> - <flag name="aplaymidi">Enables midi music in game, using aplaymidi as an external player</flag> - + <flag name="allegro">Add support for Allegro</flag> + <flag name="fluidsynth">Compile with support for FluidSynth</flag> <flag name="openmedia">Enables the free open media sets: OpenGFX, OpenSFX, OpenMSX, removing the requirement for proprietary TTD assets to play OpenTTD.</flag> <flag name="lzo">Enables LZO compression for savegames. This is only needed to load extremely old savegames. (versions before 0.2)</flag> <flag name="dedicated">Build only the openttd server, and not the client.</flag> </use> + <upstream> + <remote-id type="github">OpenTTD/OpenTTD</remote-id> + </upstream> </pkgmetadata> diff --git a/games-simulation/openttd/openttd-1.10.3.ebuild b/games-simulation/openttd/openttd-1.10.3.ebuild deleted file mode 100644 index 0af63df64cff..000000000000 --- a/games-simulation/openttd/openttd-1.10.3.ebuild +++ /dev/null @@ -1,177 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs xdg - -MY_PV="${PV/_rc/-RC}" -MY_P="${PN}-${MY_PV}" - -DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe" -HOMEPAGE="https://www.openttd.org/" -if [[ "${PV}" == *9999 ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/OpenTTD/OpenTTD.git" -else - SRC_URI="https://proxy.binaries.openttd.org/openttd-releases/${MY_PV}/${MY_P}-source.tar.xz" - KEYWORDS="~amd64 ~ppc64 ~x86" - S="${WORKDIR}/${MY_P}" -fi - -LICENSE="GPL-2" -SLOT="0" -IUSE="aplaymidi debug dedicated iconv icu +lzma lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib" -RESTRICT="test" # needs a graphics set in order to test - -RDEPEND="!dedicated? ( - media-libs/libsdl2[sound,video] - icu? ( - dev-libs/icu-layoutex - dev-libs/icu-le-hb - >=dev-libs/icu-58.1:= - ) - truetype? ( - media-libs/fontconfig - media-libs/freetype:2 - sys-libs/zlib:= - ) - ) - lzma? ( app-arch/xz-utils ) - lzo? ( dev-libs/lzo:2 ) - iconv? ( virtual/libiconv ) - png? ( - media-libs/libpng:0= - sys-libs/zlib:= - ) - zlib? ( sys-libs/zlib:= )" -DEPEND="${RDEPEND}" -BDEPEND=" - virtual/pkgconfig" -PDEPEND=" - !dedicated? ( - openmedia? ( - games-misc/openmsx - games-misc/opensfx - ) - aplaymidi? ( media-sound/alsa-utils ) - !aplaymidi? ( timidity? ( media-sound/timidity++ ) ) - ) - openmedia? ( >=games-misc/opengfx-0.4.7 )" - -PATCHES=( - "${FILESDIR}"/${PN}-1.9.0-cflags.patch - "${FILESDIR}"/${PN}-1.9.0-dont_compress_manpages.patch - "${FILESDIR}"/${P}-icu68.patch -) - -src_configure() { - local myopts=( - --binary-dir="bin" - --disable-strip - --doc-dir="share/doc/${PF}" - --install-dir="${D}" - --menu-group="Game;Simulation;" - --prefix-dir="${EPREFIX}/usr" - $(use_with cpu_flags_x86_sse sse) - $(use_with iconv) - $(use_with lzma) - $(use_with lzo liblzo2) - $(use_with png) - $(usex debug '--enable-debug=3' '') - # there is an allegro interface available as well as sdl, but - # the configure for it looks broken so the sdl interface is - # always built instead. - --without-allegro - - --without-fluidsynth - ) - - if use dedicated ; then - myopts+=( --enable-dedicated ) - else - myopts+=( - $(usex aplaymidi '--with-midi=/usr/bin/aplaymidi' '') - $(use_with truetype freetype) - $(use_with icu) - --with-sdl - ) - fi - if use png || { use !dedicated && use truetype; } || use zlib ; then - myopts+=( --with-zlib ) - else - myopts+=( --without-zlib ) - fi - - # configure is a hand-written bash-script, so econf will not work. - # It's all built as C++, upstream uses CFLAGS internally. - CC=$(tc-getCC) CXX=$(tc-getCXX) CFLAGS="" \ - ./configure ${myopts[@]} || die -} - -src_compile() { - emake VERBOSE=1 -} - -src_install() { - default - if use dedicated ; then - newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN} - rm -rf "${ED}"/usr/share/{applications,icons,pixmaps} || die - fi - rm -f "${ED}"/usr/share/doc/${PF}/COPYING || die -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use lzo ; then - elog "OpenTTD was built without 'lzo' in USE. While 'lzo' is not" - elog "required, disabling it does mean that loading old savegames" - elog "or scenarios from ancient versions (~0.2) will fail." - elog - fi - - if use dedicated ; then - ewarn "Warning: The init script will kill all running openttd" - ewarn "processes when triggered, including any running client sessions!" - else - if use aplaymidi ; then - elog "You have emerged with 'aplaymidi' for playing MIDI." - elog "This option is for those with a hardware midi device," - elog "or who have set up ALSA to handle midi ports." - elog "You must set the environment variable ALSA_OUTPUT_PORTS." - elog "Available ports can be listed by using 'aplaymidi -l'." - else - if ! use timidity ; then - elog "OpenTTD was built with neither 'aplaymidi' nor 'timidity'" - elog "in USE. Music may or may not work in-game. If you happen" - elog "to have timidity++ installed, music will work so long" - elog "as it remains installed, but OpenTTD will not depend on it." - fi - fi - if ! use openmedia ; then - elog - elog "OpenTTD was compiled without the 'openmedia' USE flag." - elog - elog "In order to play, you must at least install:" - elog "games-misc/opengfx, and games-misc/opensfx, or copy the " - elog "following 6 files from a version of Transport Tycoon Deluxe" - elog "(windows or DOS) to ~/.openttd/data/ or" - elog "/usr/share/${PN}/data/." - elog - elog "From the WINDOWS version you need: " - elog "sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf" - elog "OR from the DOS version you need: " - elog "SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF" - elog - elog "File names are case sensitive, but should work either with" - elog "all upper or all lower case names" - elog - elog "In addition, in-game music will be unavailable: for music," - elog "install games-misc/openmsx, or use the in-game download" - elog "functionality to get a music set" - elog - fi - fi -} diff --git a/games-simulation/openttd/openttd-1.11.2.ebuild b/games-simulation/openttd/openttd-1.11.2.ebuild new file mode 100644 index 000000000000..cd8010bd21f5 --- /dev/null +++ b/games-simulation/openttd/openttd-1.11.2.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="A clone of Transport Tycoon Deluxe" +HOMEPAGE="https://www.openttd.org/" +SRC_URI="https://cdn.openttd.org/openttd-releases/${PV}/${P}-source.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" + +IUSE="allegro cpu_flags_x86_sse dedicated +fluidsynth icu +lzma lzo +openmedia +png +sdl timidity +truetype zlib" +REQUIRED_USE="!dedicated? ( || ( allegro sdl ) )" + +RESTRICT="test" # needs a graphics set in order to test + +RDEPEND=" + !dedicated? ( + allegro? ( media-libs/allegro:5 ) + fluidsynth? ( media-sound/fluidsynth ) + icu? ( + dev-libs/icu-layoutex + dev-libs/icu-le-hb + >=dev-libs/icu-58.1:= + ) + sdl? ( media-libs/libsdl2[sound,video] ) + truetype? ( + media-libs/fontconfig + media-libs/freetype:2 + sys-libs/zlib:= + ) + ) + lzma? ( app-arch/xz-utils ) + lzo? ( dev-libs/lzo:2 ) + png? ( media-libs/libpng:0= ) + zlib? ( sys-libs/zlib:= )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" +PDEPEND=" + !dedicated? ( + openmedia? ( + >=games-misc/openmsx-0.4.0 + >=games-misc/opensfx-1.0.1 + ) + ) + openmedia? ( >=games-misc/opengfx-0.6.1 ) + timidity? ( media-sound/timidity++ )" + +DOCS=( docs/directory_structure.md ) +PATCHES=( + "${FILESDIR}/${P}_dont_compress_man.patch" +) + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_BINDIR=bin + -DCMAKE_INSTALL_DATADIR=share + -DOPTION_DEDICATED=$(usex dedicated) + -DCMAKE_DISABLE_FIND_PACKAGE_Allegro=$(usex !allegro) + -DCMAKE_DISABLE_FIND_PACKAGE_FREETYPE=$(usex !truetype) + -DCMAKE_DISABLE_FIND_PACKAGE_Fontconfig=$(usex !truetype) + -DCMAKE_DISABLE_FIND_PACKAGE_Fluidsynth=$(usex !fluidsynth) + -DCMAKE_DISABLE_FIND_PACKAGE_ICU=$(usex !icu) + -DCMAKE_DISABLE_FIND_PACKAGE_LIBLZMA=$(usex !lzma) + -DCMAKE_DISABLE_FIND_PACKAGE_LZO=$(usex !lzo) + -DCMAKE_DISABLE_FIND_PACKAGE_PNG=$(usex !png) + -DCMAKE_DISABLE_FIND_PACKAGE_SDL=ON + -DCMAKE_DISABLE_FIND_PACKAGE_SDL2=$(usex !sdl) + -DCMAKE_DISABLE_FIND_PACKAGE_SSE=$(usex !cpu_flags_x86_sse) + -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=$(usex !zlib) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN} +} + +pkg_postinst() { + if ! use openmedia ; then + elog + elog "OpenTTD was compiled without the 'openmedia' USE flag." + elog + elog "In order to play, you must at least install" + elog "games-misc/opengfx, and games-misc/opensfx, or copy the " + elog "following 6 files from a version of Transport Tycoon Deluxe" + elog "(Windows or DOS) to shared or personal location." + elog "See /usr/share/doc/${PF}/directory_structure.md for more info." + elog + elog "From the Windows version you need: " + elog "sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf" + elog "OR from the DOS version you need: " + elog "SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF" + fi +} diff --git a/games-simulation/openttd/openttd-9999.ebuild b/games-simulation/openttd/openttd-9999.ebuild deleted file mode 100644 index c685cc3c5763..000000000000 --- a/games-simulation/openttd/openttd-9999.ebuild +++ /dev/null @@ -1,176 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs xdg - -MY_PV="${PV/_rc/-RC}" -MY_P="${PN}-${MY_PV}" - -DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe" -HOMEPAGE="https://www.openttd.org/" -if [[ "${PV}" == *9999 ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/OpenTTD/OpenTTD.git" -else - SRC_URI="https://proxy.binaries.openttd.org/openttd-releases/${MY_PV}/${MY_P}-source.tar.xz" - KEYWORDS="~amd64 ~ppc64 ~x86" - S="${WORKDIR}/${MY_P}" -fi - -LICENSE="GPL-2" -SLOT="0" -IUSE="aplaymidi debug dedicated iconv icu +lzma lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib" -RESTRICT="test" # needs a graphics set in order to test - -RDEPEND="!dedicated? ( - media-libs/libsdl2[sound,video] - icu? ( - dev-libs/icu-layoutex - dev-libs/icu-le-hb - >=dev-libs/icu-58.1:= - ) - truetype? ( - media-libs/fontconfig - media-libs/freetype:2 - sys-libs/zlib:= - ) - ) - lzma? ( app-arch/xz-utils ) - lzo? ( dev-libs/lzo:2 ) - iconv? ( virtual/libiconv ) - png? ( - media-libs/libpng:0= - sys-libs/zlib:= - ) - zlib? ( sys-libs/zlib:= )" -DEPEND="${RDEPEND}" -BDEPEND=" - virtual/pkgconfig" -PDEPEND=" - !dedicated? ( - openmedia? ( - games-misc/openmsx - games-misc/opensfx - ) - aplaymidi? ( media-sound/alsa-utils ) - !aplaymidi? ( timidity? ( media-sound/timidity++ ) ) - ) - openmedia? ( >=games-misc/opengfx-0.4.7 )" - -PATCHES=( - "${FILESDIR}"/${PN}-1.9.0-cflags.patch - "${FILESDIR}"/${PN}-1.9.0-dont_compress_manpages.patch -) - -src_configure() { - local myopts=( - --binary-dir="bin" - --disable-strip - --doc-dir="share/doc/${PF}" - --install-dir="${D}" - --menu-group="Game;Simulation;" - --prefix-dir="${EPREFIX}/usr" - $(use_with cpu_flags_x86_sse sse) - $(use_with iconv) - $(use_with lzma) - $(use_with lzo liblzo2) - $(use_with png) - $(usex debug '--enable-debug=3' '') - # there is an allegro interface available as well as sdl, but - # the configure for it looks broken so the sdl interface is - # always built instead. - --without-allegro - - --without-fluidsynth - ) - - if use dedicated ; then - myopts+=( --enable-dedicated ) - else - myopts+=( - $(usex aplaymidi '--with-midi=/usr/bin/aplaymidi' '') - $(use_with truetype freetype) - $(use_with icu) - --with-sdl - ) - fi - if use png || { use !dedicated && use truetype; } || use zlib ; then - myopts+=( --with-zlib ) - else - myopts+=( --without-zlib ) - fi - - # configure is a hand-written bash-script, so econf will not work. - # It's all built as C++, upstream uses CFLAGS internally. - CC=$(tc-getCC) CXX=$(tc-getCXX) CFLAGS="" \ - ./configure ${myopts[@]} || die -} - -src_compile() { - emake VERBOSE=1 -} - -src_install() { - default - if use dedicated ; then - newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN} - rm -rf "${ED}"/usr/share/{applications,icons,pixmaps} || die - fi - rm -f "${ED}"/usr/share/doc/${PF}/COPYING || die -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use lzo ; then - elog "OpenTTD was built without 'lzo' in USE. While 'lzo' is not" - elog "required, disabling it does mean that loading old savegames" - elog "or scenarios from ancient versions (~0.2) will fail." - elog - fi - - if use dedicated ; then - ewarn "Warning: The init script will kill all running openttd" - ewarn "processes when triggered, including any running client sessions!" - else - if use aplaymidi ; then - elog "You have emerged with 'aplaymidi' for playing MIDI." - elog "This option is for those with a hardware midi device," - elog "or who have set up ALSA to handle midi ports." - elog "You must set the environment variable ALSA_OUTPUT_PORTS." - elog "Available ports can be listed by using 'aplaymidi -l'." - else - if ! use timidity ; then - elog "OpenTTD was built with neither 'aplaymidi' nor 'timidity'" - elog "in USE. Music may or may not work in-game. If you happen" - elog "to have timidity++ installed, music will work so long" - elog "as it remains installed, but OpenTTD will not depend on it." - fi - fi - if ! use openmedia ; then - elog - elog "OpenTTD was compiled without the 'openmedia' USE flag." - elog - elog "In order to play, you must at least install:" - elog "games-misc/opengfx, and games-misc/opensfx, or copy the " - elog "following 6 files from a version of Transport Tycoon Deluxe" - elog "(windows or DOS) to ~/.openttd/data/ or" - elog "/usr/share/${PN}/data/." - elog - elog "From the WINDOWS version you need: " - elog "sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf" - elog "OR from the DOS version you need: " - elog "SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF" - elog - elog "File names are case sensitive, but should work either with" - elog "all upper or all lower case names" - elog - elog "In addition, in-game music will be unavailable: for music," - elog "install games-misc/openmsx, or use the in-game download" - elog "functionality to get a music set" - elog - fi - fi -} |