public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/files/, games-simulation/openttd/
Date: Mon, 28 Jun 2021 22:13:35 +0000 (UTC)	[thread overview]
Message-ID: <1624918387.65c9998903c9780c36696c189f3a814e331e4270.chewi@gentoo> (raw)

commit:     65c9998903c9780c36696c189f3a814e331e4270
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Fri May 21 16:45:25 2021 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Mon Jun 28 22:13:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65c99989

games-simulation/openttd: update to 1.11.2

Update version, migrate to cmake, cleanup.
Bug: https://bugs.gentoo.org/729000

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-simulation/openttd/Manifest                  |   1 +
 .../files/openttd-1.11.2_dont_compress_man.patch   |  29 ++++++
 games-simulation/openttd/metadata.xml              |   6 +-
 games-simulation/openttd/openttd-1.11.2.ebuild     | 100 +++++++++++++++++++++
 4 files changed, 135 insertions(+), 1 deletion(-)

diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest
index 1799965afea..4baf99cfbbe 100644
--- a/games-simulation/openttd/Manifest
+++ b/games-simulation/openttd/Manifest
@@ -1 +1,2 @@
 DIST openttd-1.10.3-source.tar.xz 6815924 BLAKE2B f700304e723fe5c3fa9781432a387e061595bbc8de42f565ad57ac265d9e4bc14cbc659a3f6551019bfb31b8b56b180c272c6753a12b4cd2e13016a98dfe1679 SHA512 d1cd535e8e49f0ac147704341287af1b16bde6725fd9152dd36dcb780559b400da8bb31c4e8eb665a0d11e9b1f5bf8a96be0f97f7a85bd967eec534fdd3dd0d4
+DIST openttd-1.11.2-source.tar.xz 6783972 BLAKE2B c71fd98a480566aede29f84afbd100b6d0dfa80311860907a7287d2d5bed74bd492c2b1012cd83f45fe68d60fb0c2378e1384530a84c28bd7fbd907b45110491 SHA512 9a6364bf19627db9f8ec58bfa85fa3a8febf1109f3b5fb9053bef810ac2d0c41df91b58f0b253dd45320a29cae2e8485df794afa7b5240f19759f98fd65c35ea

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 00000000000..0dfef300dc5
--- /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/metadata.xml b/games-simulation/openttd/metadata.xml
index a5465cd55c4..b7a1255795f 100644
--- a/games-simulation/openttd/metadata.xml
+++ b/games-simulation/openttd/metadata.xml
@@ -6,10 +6,14 @@
 		<name>Gentoo Games Project</name>
 	</maintainer>
 	<use>
+		<flag name="allegro">Add support for Allegro</flag>
 		<flag name="aplaymidi">Enables midi music in game, using aplaymidi as an external player</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.11.2.ebuild b/games-simulation/openttd/openttd-1.11.2.ebuild
new file mode 100644
index 00000000000..cd8010bd21f
--- /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
+}


             reply	other threads:[~2021-06-28 22:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 22:13 James Le Cuirot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-28 12:21 [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/files/, games-simulation/openttd/ Sam James
2024-11-11  0:07 Sam James
2024-07-24  7:12 Sam James
2022-04-10 13:24 Conrad Kostecki
2021-06-28 22:13 James Le Cuirot
2016-02-16  1:38 Michael Sterrett
2015-12-18  0:47 Michael Sterrett
2015-12-09 21:25 Michael Sterrett
2015-11-09 23:09 Michael Sterrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1624918387.65c9998903c9780c36696c189f3a814e331e4270.chewi@gentoo \
    --to=chewi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox