public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/
@ 2016-04-05  1:03 Michael Sterrett
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Sterrett @ 2016-04-05  1:03 UTC (permalink / raw
  To: gentoo-commits

commit:     1c284527f144d928e9d40a2898531c67744429e5
Author:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  5 01:02:05 2016 +0000
Commit:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
CommitDate: Tue Apr  5 01:02:42 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c284527

games-simulation/openttd: version bump (bug #579056)

Package-Manager: portage-2.2.26

 games-simulation/openttd/Manifest                  |   1 +
 .../openttd/files/openttd-1.6.0-cflags.patch       |  42 +++++
 games-simulation/openttd/openttd-1.6.0.ebuild      | 174 +++++++++++++++++++++
 3 files changed, 217 insertions(+)

diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest
index b5c1cf7..a6bd3e0 100644
--- a/games-simulation/openttd/Manifest
+++ b/games-simulation/openttd/Manifest
@@ -1 +1,2 @@
 DIST openttd-1.5.3-source.tar.gz 10042384 SHA256 a5525de811ff83e89774d9a7344c7f63ec282b956c3f015af259fd79f54d18e5 SHA512 8185ea4b8e5ac9456c7067a5d662b4a2e1724e14fc0455705ec3b72943421cc5cb10cb67a4f483c47ff2fa6621a219cababd08e21086209a53241a74607b5466 WHIRLPOOL 839067c2c6f8f87ea74df376f3d3d5e2a126c5198f69efce1205603da67d97c1a1b0d5dc3b349aa92f916179ccc48581418b5aa1e9e7e250f636fae78bcbf7ac
+DIST openttd-1.6.0-source.tar.gz 10064454 SHA256 32f63477aba1ccf238dfe0538a6660163c2b725e077978e570e38d023d269cad SHA512 d235e6e094b2e3fda0cf58a2dce1e5d779654bee638def60f00da4e7c6443b00a6f3b204d5a63cf56e141074c8aa3700ce7e9f1b1eccbb5cd36260f1892ad501 WHIRLPOOL 497272ccc3836710a68cabfbf5b925a30c3d23ee332e5ba5fa24a2b79b199d2b7ce6bd22507ea977986382ae32193247b9eedee638419d1e6f41165f5fa8abd9

diff --git a/games-simulation/openttd/files/openttd-1.6.0-cflags.patch b/games-simulation/openttd/files/openttd-1.6.0-cflags.patch
new file mode 100644
index 0000000..bb7f768
--- /dev/null
+++ b/games-simulation/openttd/files/openttd-1.6.0-cflags.patch
@@ -0,0 +1,42 @@
+--- openttd-1.4.4/config.lib
++++ openttd-1.4.4/config.lib
+@@ -1450,12 +1450,6 @@
+ 			CFLAGS="-I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations -mcpu=604 -fno-inline -mstring -mmultiple $CFLAGS"
+ 			LDFLAGS="$LDFLAGS -noixemul"
+ 		fi
+-
+-		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"
+ 
+@@ -1466,14 +1460,6 @@
+ 				CFLAGS="$CFLAGS -G0"
+ 			fi
+ 		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
+@@ -1498,11 +1484,6 @@
+ 		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

diff --git a/games-simulation/openttd/openttd-1.6.0.ebuild b/games-simulation/openttd/openttd-1.6.0.ebuild
new file mode 100644
index 0000000..403e495
--- /dev/null
+++ b/games-simulation/openttd/openttd-1.6.0.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils gnome2-utils games
+
+DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe"
+HOMEPAGE="http://www.openttd.org/"
+SRC_URI="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib"
+RESTRICT="test" # needs a graphics set in order to test
+
+RDEPEND="!dedicated? (
+		media-libs/libsdl[sound,X,video]
+		icu? ( dev-libs/icu:= )
+		truetype? (
+			media-libs/fontconfig
+			media-libs/freetype:2
+			sys-libs/zlib
+		)
+	)
+	lzo? ( dev-libs/lzo:2 )
+	iconv? ( virtual/libiconv )
+	png? ( media-libs/libpng:0 )
+	zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+	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 )"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P}-cflags.patch
+}
+
+src_configure() {
+	# 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.
+	local myopts=" --without-allegro"
+
+	# libtimidity not needed except for some embedded platform
+	# nevertheless, it will be automagically linked if it is
+	# installed. Hence, we disable it.
+	myopts+=" --without-libtimidity"
+
+	use debug && myopts+=" --enable-debug=3"
+
+	if use dedicated ; then
+		myopts+=" --enable-dedicated"
+	else
+		use aplaymidi && myopts+=" --with-midi='/usr/bin/aplaymidi'"
+		myopts+="
+			$(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.
+	CFLAGS="" ./configure \
+		--disable-strip \
+		--prefix-dir="${EPREFIX}" \
+		--binary-dir="${GAMES_BINDIR}" \
+		--data-dir="${GAMES_DATADIR}/${PN}" \
+		--install-dir="${D}" \
+		--icon-dir=/usr/share/pixmaps \
+		--menu-dir=/usr/share/applications \
+		--icon-theme-dir=/usr/share/icons/hicolor \
+		--man-dir=/usr/share/man/man6 \
+		--doc-dir=/usr/share/doc/${PF} \
+		--menu-group="Game;Simulation;" \
+		${myopts} \
+		$(use_with iconv) \
+		$(use_with png) \
+		$(use_with cpu_flags_x86_sse sse) \
+		$(use_with lzo liblzo2) \
+		|| die
+}
+
+src_compile() {
+	emake VERBOSE=1
+}
+
+src_install() {
+	default
+	if use dedicated ; then
+		newinitd "${FILESDIR}"/${PN}.initd ${PN}
+		rm -rf "${ED}"/usr/share/{applications,icons,pixmaps}
+	fi
+	rm -f "${ED}"/usr/share/doc/${PF}/COPYING
+	prepgamesdirs
+}
+
+pkg_preinst() {
+	games_pkg_preinst
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	gnome2_icon_cache_update
+	games_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 "${GAMES_DATADIR}/${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
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/
@ 2017-07-18 23:06 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2017-07-18 23:06 UTC (permalink / raw
  To: gentoo-commits

commit:     d46cda64f4ab29c1c953810cd9de1c520de3ebd0
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 18 22:51:27 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jul 18 23:06:06 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d46cda64

games-simulation/openttd: Fixed init script (bug #625472).

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 games-simulation/openttd/files/openttd.initd-r1        | 13 +++++++++++++
 games-simulation/openttd/openttd-1.6.1-r1.ebuild       | 16 +++++-----------
 ...openttd-1.6.1-r1.ebuild => openttd-1.7.1-r1.ebuild} | 18 ++++++------------
 3 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/games-simulation/openttd/files/openttd.initd-r1 b/games-simulation/openttd/files/openttd.initd-r1
new file mode 100644
index 00000000000..0bfeefddf6d
--- /dev/null
+++ b/games-simulation/openttd/files/openttd.initd-r1
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="OpenTTD dedicated game server"
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/bin/openttd"
+command_args="-D"
+command_background="true"
+
+depend() {
+	need net
+}

diff --git a/games-simulation/openttd/openttd-1.6.1-r1.ebuild b/games-simulation/openttd/openttd-1.6.1-r1.ebuild
index f776da42d6e..e68b7259b6f 100644
--- a/games-simulation/openttd/openttd-1.6.1-r1.ebuild
+++ b/games-simulation/openttd/openttd-1.6.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -17,15 +17,9 @@ RESTRICT="test" # needs a graphics set in order to test
 RDEPEND="!dedicated? (
 		media-libs/libsdl[sound,X,video]
 		icu? (
-			|| (
-				(
-					dev-libs/icu-layoutex
-					dev-libs/icu-le-hb
-					>=dev-libs/icu-58.1
-				)
-				<dev-libs/icu-58.1
-			)
-			dev-libs/icu:=
+			dev-libs/icu-layoutex
+			dev-libs/icu-le-hb
+			>=dev-libs/icu-58.1:=
 		)
 		truetype? (
 			media-libs/fontconfig
@@ -107,7 +101,7 @@ src_compile() {
 src_install() {
 	default
 	if use dedicated ; then
-		newinitd "${FILESDIR}"/${PN}.initd ${PN}
+		newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
 		rm -rf "${ED}"/usr/share/{applications,icons,pixmaps}
 	fi
 	rm -f "${ED}"/usr/share/doc/${PF}/COPYING

diff --git a/games-simulation/openttd/openttd-1.6.1-r1.ebuild b/games-simulation/openttd/openttd-1.7.1-r1.ebuild
similarity index 94%
copy from games-simulation/openttd/openttd-1.6.1-r1.ebuild
copy to games-simulation/openttd/openttd-1.7.1-r1.ebuild
index f776da42d6e..f24302009a4 100644
--- a/games-simulation/openttd/openttd-1.6.1-r1.ebuild
+++ b/games-simulation/openttd/openttd-1.7.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -17,15 +17,9 @@ RESTRICT="test" # needs a graphics set in order to test
 RDEPEND="!dedicated? (
 		media-libs/libsdl[sound,X,video]
 		icu? (
-			|| (
-				(
-					dev-libs/icu-layoutex
-					dev-libs/icu-le-hb
-					>=dev-libs/icu-58.1
-				)
-				<dev-libs/icu-58.1
-			)
-			dev-libs/icu:=
+			dev-libs/icu-layoutex
+			dev-libs/icu-le-hb
+			>=dev-libs/icu-58.1:=
 		)
 		truetype? (
 			media-libs/fontconfig
@@ -88,7 +82,7 @@ src_configure() {
 	# It's all built as C++, upstream uses CFLAGS internally.
 	CFLAGS="" ./configure \
 		--disable-strip \
-		--prefix-dir="${EPREFIX}/usr" \
+		--prefix-dir="${EPREFIX%/}/usr" \
 		--binary-dir="bin" \
 		--install-dir="${D}" \
 		--menu-group="Game;Simulation;" \
@@ -107,7 +101,7 @@ src_compile() {
 src_install() {
 	default
 	if use dedicated ; then
-		newinitd "${FILESDIR}"/${PN}.initd ${PN}
+		newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
 		rm -rf "${ED}"/usr/share/{applications,icons,pixmaps}
 	fi
 	rm -f "${ED}"/usr/share/doc/${PF}/COPYING


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/
@ 2018-07-16  9:08 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2018-07-16  9:08 UTC (permalink / raw
  To: gentoo-commits

commit:     411d6e9248ea22a72d1291969c17fd32a2de527f
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 16 09:07:34 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Jul 16 09:08:10 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=411d6e92

games-simulation/openttd: Bump to version 1.8.0. Removed old.

Package-Manager: Portage-2.3.42, Repoman-2.3.9

 games-simulation/openttd/Manifest                  |  2 +-
 .../openttd/files/openttd-1.8.0-icu61.patch        | 45 ++++++++++++++++++++++
 ...enttd-1.8.0_rc1.ebuild => openttd-1.8.0.ebuild} | 22 ++++++-----
 3 files changed, 58 insertions(+), 11 deletions(-)

diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest
index 5bcc9a0a188..0830de1214c 100644
--- a/games-simulation/openttd/Manifest
+++ b/games-simulation/openttd/Manifest
@@ -1,3 +1,3 @@
 DIST openttd-1.7.1-source.tar.gz 10090311 BLAKE2B 339171cd2895398ee1fedcfd24d1126fbc060b6d4530b267310b3f220448f8e6469a726e71e9882bea117585ea7b9f7271205f576ee2b26de6dec079f57f1620 SHA512 4a0d2ee424374b50fe0d089b86ff16b5de3159848a38143ca6745e349b6126567f1e4beda9afe2e6bc21ffffce1166acf719d3f5c95703a14c1379f8857e83d3
 DIST openttd-1.7.2-source.tar.gz 10097175 BLAKE2B a027b6ca6d3116dc3e6ad6ae43965682107268e367032418200cf1c1e16c5b5dad39c275ea57d923f17564d80cceb0e9909dc5aaf7ee230242f0ce0f46f06b1a SHA512 44d25061c42cb9c81baa67a40ff31a6681dcbb121c61db74c5179a31f189919471a82b7fd3f79c2cdeef02af5b47ec35fdbdc7feed74ca2360c028869fe772e8
-DIST openttd-1.8.0-RC1-source.tar.xz 6520976 BLAKE2B 17d34378ba3aa7a9def9f3ff764c42b890a646946211184660c3af9e252b9a809d481ccdd31421442efd9c7fac86f5c9c6091987070d53d1c913d3ef680f413c SHA512 aff6833934ce875320bdba3410be15a53fc8c233e7efe60628158636eed3b179fea5c8e9f8af2181c16bc173c409eab93477f2165d448100d048959bf63ba3d2
+DIST openttd-1.8.0-source.tar.xz 6521016 BLAKE2B b3a608fd21d21f861af6eba235c028a59f071ab4698cfdcdd499b6ea7ece853679b064935368d95330414a24ac90aaa3c426afc12a2e135d5b0a48170879b807 SHA512 a2d61b3c94a550c8f3a581127df8c3459b1ddff5ba924942c468cbc70e88e0bf4405cecb68a91243b544ead64f215aa8d489a07b38dce507ae7d59e8ec155d7a

diff --git a/games-simulation/openttd/files/openttd-1.8.0-icu61.patch b/games-simulation/openttd/files/openttd-1.8.0-icu61.patch
new file mode 100644
index 00000000000..e4143d82f67
--- /dev/null
+++ b/games-simulation/openttd/files/openttd-1.8.0-icu61.patch
@@ -0,0 +1,45 @@
+From 19076c24c1f3baf2a22d1fa832d5688216cf54a3 Mon Sep 17 00:00:00 2001
+From: Charles Pigott <charlespigott@googlemail.com>
+Date: Sun, 8 Apr 2018 01:06:18 +0100
+Subject: [PATCH] Fix #6690: Compilation with ICU 61
+
+---
+ src/language.h  | 2 +-
+ src/strings.cpp | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/language.h b/src/language.h
+index d33ba81892..ec241dbd8c 100644
+--- a/src/language.h
++++ b/src/language.h
+@@ -105,7 +105,7 @@ extern LanguageList _languages;
+ extern const LanguageMetadata *_current_language;
+ 
+ #ifdef WITH_ICU_SORT
+-extern Collator *_current_collator;
++extern icu::Collator *_current_collator;
+ #endif /* WITH_ICU_SORT */
+ 
+ bool ReadLanguagePack(const LanguageMetadata *lang);
+diff --git a/src/strings.cpp b/src/strings.cpp
+index 1c539d9343..fd7420259a 100644
+--- a/src/strings.cpp
++++ b/src/strings.cpp
+@@ -52,7 +52,7 @@ const LanguageMetadata *_current_language = NULL; ///< The currently loaded lang
+ TextDirection _current_text_dir; ///< Text direction of the currently selected language.
+ 
+ #ifdef WITH_ICU_SORT
+-Collator *_current_collator = NULL;               ///< Collator for the language currently in use.
++icu::Collator *_current_collator = NULL;          ///< Collator for the language currently in use.
+ #endif /* WITH_ICU_SORT */
+ 
+ static uint64 _global_string_params_data[20];     ///< Global array of string parameters. To access, use #SetDParam.
+@@ -1795,7 +1795,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
+ 
+ 	/* Create a collator instance for our current locale. */
+ 	UErrorCode status = U_ZERO_ERROR;
+-	_current_collator = Collator::createInstance(Locale(_current_language->isocode), status);
++	_current_collator = icu::Collator::createInstance(icu::Locale(_current_language->isocode), status);
+ 	/* Sort number substrings by their numerical value. */
+ 	if (_current_collator != NULL) _current_collator->setAttribute(UCOL_NUMERIC_COLLATION, UCOL_ON, status);
+ 	/* Avoid using the collator if it is not correctly set. */

diff --git a/games-simulation/openttd/openttd-1.8.0_rc1.ebuild b/games-simulation/openttd/openttd-1.8.0.ebuild
similarity index 92%
rename from games-simulation/openttd/openttd-1.8.0_rc1.ebuild
rename to games-simulation/openttd/openttd-1.8.0.ebuild
index 6eca8d5fbef..2d97c8bf081 100644
--- a/games-simulation/openttd/openttd-1.8.0_rc1.ebuild
+++ b/games-simulation/openttd/openttd-1.8.0.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-inherit eutils gnome2-utils
+inherit gnome2-utils
 
 MY_PV="${PV/_rc/-RC}"
 MY_P="${PN}-${MY_PV}"
@@ -51,14 +51,20 @@ S="${WORKDIR}/${MY_P}"
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.6.0-cflags.patch
+	"${FILESDIR}"/${PN}-1.8.0-icu61.patch
 )
 
 src_configure() {
-	local myopts=()
+	local myopts=(
+		$(use_with iconv)
+		$(use_with png)
+		$(use_with cpu_flags_x86_sse sse)
+		$(use_with lzo liblzo2)
+	)
 	# 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.
-	local myopts+=( --without-allegro )
+	myopts+=( --without-allegro )
 
 	# libtimidity not needed except for some embedded platform
 	# nevertheless, it will be automagically linked if it is
@@ -70,8 +76,8 @@ src_configure() {
 	if use dedicated ; then
 		myopts+=( --enable-dedicated )
 	else
-		use aplaymidi && myopts+=( --with-midi='/usr/bin/aplaymidi' )
 		myopts+=(
+			$(usex aplaymidi '--with-midi=/usr/bin/aplaymidi' '')
 			$(use_with truetype freetype)
 			$(use_with icu)
 			--with-sdl
@@ -92,10 +98,6 @@ src_configure() {
 		--install-dir="${D}" \
 		--menu-group="Game;Simulation;" \
 		${myopts[@]} \
-		$(use_with iconv) \
-		$(use_with png) \
-		$(use_with cpu_flags_x86_sse sse) \
-		$(use_with lzo liblzo2) \
 		|| die
 }
 
@@ -107,9 +109,9 @@ src_install() {
 	default
 	if use dedicated ; then
 		newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
-		rm -rf "${ED}"/usr/share/{applications,icons,pixmaps}
+		rm -rf "${ED%/}"/usr/share/{applications,icons,pixmaps}
 	fi
-	rm -f "${ED}"/usr/share/doc/${PF}/COPYING
+	rm -f "${ED%/}"/usr/share/doc/${PF}/COPYING
 }
 
 pkg_preinst() {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/
@ 2018-09-21 11:37 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2018-09-21 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     d0c2fcd0affe96e988eefb31f7c561d6fc12a3af
Author:     Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
AuthorDate: Wed Sep 19 21:01:44 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Sep 21 11:37:05 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0c2fcd0

games-simulation/openttd: fix compilation with icu-62.1

Closes: https://bugs.gentoo.org/666578
Package-Manager: Portage-2.3.49, Repoman-2.3.10
Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/9922

 .../openttd/files/openttd-1.8.0-icu62.patch        | 99 ++++++++++++++++++++++
 games-simulation/openttd/openttd-1.8.0.ebuild      |  1 +
 2 files changed, 100 insertions(+)

diff --git a/games-simulation/openttd/files/openttd-1.8.0-icu62.patch b/games-simulation/openttd/files/openttd-1.8.0-icu62.patch
new file mode 100644
index 00000000000..9ba907fa47e
--- /dev/null
+++ b/games-simulation/openttd/files/openttd-1.8.0-icu62.patch
@@ -0,0 +1,99 @@
+From 55bf7628e299ef2c143e9ac97e87817b5eda3239 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <stefan.strogin@gmail.com>
+Date: Wed, 19 Sep 2018 23:52:10 +0300
+Subject: [PATCH] Fix #6854: Compilation with ICU 62
+
+---
+ src/gfx_layout.cpp | 18 +++++++++---------
+ src/gfx_layout.h   |  2 +-
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp
+index f5463d401..e13ece0e7 100644
+--- a/src/gfx_layout.cpp
++++ b/src/gfx_layout.cpp
+@@ -126,7 +126,7 @@ static size_t AppendToBuffer(UChar *buff, const UChar *buffer_last, WChar c)
+  * Wrapper for doing layouts with ICU.
+  */
+ class ICUParagraphLayout : public AutoDeleteSmallVector<ParagraphLayouter::Line *, 4>, public ParagraphLayouter {
+-	ParagraphLayout *p; ///< The actual ICU paragraph layout.
++	icu::ParagraphLayout *p; ///< The actual ICU paragraph layout.
+ public:
+ 	/** Helper for GetLayouter, to get the right type. */
+ 	typedef UChar CharType;
+@@ -135,10 +135,10 @@ public:
+ 
+ 	/** Visual run contains data about the bit of text with the same font. */
+ 	class ICUVisualRun : public ParagraphLayouter::VisualRun {
+-		const ParagraphLayout::VisualRun *vr; ///< The actual ICU vr.
++		const icu::ParagraphLayout::VisualRun *vr; ///< The actual ICU vr.
+ 
+ 	public:
+-		ICUVisualRun(const ParagraphLayout::VisualRun *vr) : vr(vr) { }
++		ICUVisualRun(const icu::ParagraphLayout::VisualRun *vr) : vr(vr) { }
+ 
+ 		const Font *GetFont() const          { return (const Font*)vr->getFont(); }
+ 		int GetGlyphCount() const            { return vr->getGlyphCount(); }
+@@ -150,10 +150,10 @@ public:
+ 
+ 	/** A single line worth of VisualRuns. */
+ 	class ICULine : public AutoDeleteSmallVector<ICUVisualRun *, 4>, public ParagraphLayouter::Line {
+-		ParagraphLayout::Line *l; ///< The actual ICU line.
++		icu::ParagraphLayout::Line *l; ///< The actual ICU line.
+ 
+ 	public:
+-		ICULine(ParagraphLayout::Line *l) : l(l)
++		ICULine(icu::ParagraphLayout::Line *l) : l(l)
+ 		{
+ 			for (int i = 0; i < l->countRuns(); i++) {
+ 				*this->Append() = new ICUVisualRun(l->getVisualRun(i));
+@@ -173,13 +173,13 @@ public:
+ 		}
+ 	};
+ 
+-	ICUParagraphLayout(ParagraphLayout *p) : p(p) { }
++	ICUParagraphLayout(icu::ParagraphLayout *p) : p(p) { }
+ 	~ICUParagraphLayout() { delete p; }
+ 	void Reflow() { p->reflow(); }
+ 
+ 	ParagraphLayouter::Line *NextLine(int max_width)
+ 	{
+-		ParagraphLayout::Line *l = p->nextLine(max_width);
++		icu::ParagraphLayout::Line *l = p->nextLine(max_width);
+ 		return l == NULL ? NULL : new ICULine(l);
+ 	}
+ };
+@@ -196,7 +196,7 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
+ 	}
+ 
+ 	/* Fill ICU's FontRuns with the right data. */
+-	FontRuns runs(fontMapping.Length());
++	icu::FontRuns runs(fontMapping.Length());
+ 	for (FontMap::iterator iter = fontMapping.Begin(); iter != fontMapping.End(); iter++) {
+ 		runs.add(iter->second, iter->first);
+ 	}
+@@ -204,7 +204,7 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
+ 	LEErrorCode status = LE_NO_ERROR;
+ 	/* ParagraphLayout does not copy "buff", so it must stay valid.
+ 	 * "runs" is copied according to the ICU source, but the documentation does not specify anything, so this might break somewhen. */
+-	ParagraphLayout *p = new ParagraphLayout(buff, length, &runs, NULL, NULL, NULL, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, false, status);
++	icu::ParagraphLayout *p = new icu::ParagraphLayout(buff, length, &runs, NULL, NULL, NULL, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, false, status);
+ 	if (status != LE_NO_ERROR) {
+ 		delete p;
+ 		return NULL;
+diff --git a/src/gfx_layout.h b/src/gfx_layout.h
+index 0a21d9b0c..028f5be63 100644
+--- a/src/gfx_layout.h
++++ b/src/gfx_layout.h
+@@ -21,7 +21,7 @@
+ 
+ #ifdef WITH_ICU_LAYOUT
+ #include "layout/ParagraphLayout.h"
+-#define ICU_FONTINSTANCE : public LEFontInstance
++#define ICU_FONTINSTANCE : public icu::LEFontInstance
+ #else /* WITH_ICU_LAYOUT */
+ #define ICU_FONTINSTANCE
+ #endif /* WITH_ICU_LAYOUT */
+-- 
+2.19.0
+

diff --git a/games-simulation/openttd/openttd-1.8.0.ebuild b/games-simulation/openttd/openttd-1.8.0.ebuild
index 2d97c8bf081..7daebea4a2c 100644
--- a/games-simulation/openttd/openttd-1.8.0.ebuild
+++ b/games-simulation/openttd/openttd-1.8.0.ebuild
@@ -52,6 +52,7 @@ S="${WORKDIR}/${MY_P}"
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.6.0-cflags.patch
 	"${FILESDIR}"/${PN}-1.8.0-icu61.patch
+	"${FILESDIR}"/${PN}-1.8.0-icu62.patch
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/
@ 2019-04-03 12:20 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2019-04-03 12:20 UTC (permalink / raw
  To: gentoo-commits

commit:     e6b14dd3d154e5ff05ac29e4d71e55a6ed0b1b60
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  3 12:18:16 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Apr  3 12:20:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6b14dd3

games-simulation/openttd: Bump live ebuild to EAPI-7

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../openttd/files/openttd-1.9.0-cflags.patch       | 56 ++++++++++++++++++++++
 .../openttd-1.9.0-dont_compress_manpages.patch     | 34 +++++++++++++
 games-simulation/openttd/openttd-9999.ebuild       | 51 ++++++++++----------
 3 files changed, 117 insertions(+), 24 deletions(-)

diff --git a/games-simulation/openttd/files/openttd-1.9.0-cflags.patch b/games-simulation/openttd/files/openttd-1.9.0-cflags.patch
new file mode 100644
index 00000000000..86eb16168db
--- /dev/null
+++ b/games-simulation/openttd/files/openttd-1.9.0-cflags.patch
@@ -0,0 +1,56 @@
+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
new file mode 100644
index 00000000000..d151dbf3693
--- /dev/null
+++ b/games-simulation/openttd/files/openttd-1.9.0-dont_compress_manpages.patch
@@ -0,0 +1,34 @@
+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/openttd-9999.ebuild b/games-simulation/openttd/openttd-9999.ebuild
index 8289f42f6d0..0299cc25d76 100644
--- a/games-simulation/openttd/openttd-9999.ebuild
+++ b/games-simulation/openttd/openttd-9999.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-inherit gnome2-utils
+EAPI=7
+inherit xdg
 
 MY_PV="${PV/_rc/-RC}"
 MY_P="${PN}-${MY_PV}"
@@ -13,8 +13,9 @@ if [[ "${PV}" == *9999 ]] ; then
 	inherit git-r3
 	EGIT_REPO_URI="https://github.com/OpenTTD/OpenTTD.git"
 else
-	SRC_URI="http://binaries.openttd.org/releases/${MY_PV}/${MY_P}-source.tar.xz"
+	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"
@@ -32,14 +33,18 @@ RDEPEND="!dedicated? (
 		truetype? (
 			media-libs/fontconfig
 			media-libs/freetype:2
-			sys-libs/zlib
+			sys-libs/zlib:=
 		)
 	)
 	lzo? ( dev-libs/lzo:2 )
 	iconv? ( virtual/libiconv )
-	png? ( media-libs/libpng:0 )
-	zlib? ( sys-libs/zlib )"
-DEPEND="${RDEPEND}
+	png? (
+		media-libs/libpng:0
+		sys-libs/zlib:=
+	)
+	zlib? ( sys-libs/zlib:= )"
+DEPEND="${RDEPEND}"
+BDEPEND="
 	virtual/pkgconfig"
 PDEPEND="
 	!dedicated? (
@@ -52,32 +57,30 @@ PDEPEND="
 	)
 	openmedia? ( >=games-misc/opengfx-0.4.7 )"
 
-S="${WORKDIR}/${MY_P}"
-
 PATCHES=(
-	"${FILESDIR}"/${PN}-1.6.0-cflags.patch
+	"${FILESDIR}"/${PN}-1.9.0-cflags.patch
+	"${FILESDIR}"/${PN}-1.9.0-dont_compress_manpages.patch
 )
 
 src_configure() {
 	local myopts=(
-		--disable-strip
-		--prefix-dir="${EPREFIX%/}/usr"
 		--binary-dir="bin"
+		--disable-strip
+		--doc-dir="share/doc/${PF}"
 		--install-dir="${D}"
 		--menu-group="Game;Simulation;"
-		$(use_with iconv)
-		$(use_with png)
+		--prefix-dir="${EPREFIX}/usr"
 		$(use_with cpu_flags_x86_sse sse)
+		$(use_with iconv)
 		$(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
-		# libtimidity not needed except for some embedded platform
-		# nevertheless, it will be automagically linked if it is
-		# installed. Hence, we disable it.
-		--without-libtimidity
+
+		--without-fluidsynth
 	)
 
 	if use dedicated ; then
@@ -109,17 +112,17 @@ src_install() {
 	default
 	if use dedicated ; then
 		newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
-		rm -rf "${ED%/}"/usr/share/{applications,icons,pixmaps}
+		rm -rf "${ED}"/usr/share/{applications,icons,pixmaps}
 	fi
-	rm -f "${ED%/}"/usr/share/doc/${PF}/COPYING
+	rm -f "${ED}"/usr/share/doc/${PF}/COPYING
 }
 
 pkg_preinst() {
-	gnome2_icon_savelist
+	xdg_pkg_preinst
 }
 
 pkg_postinst() {
-	gnome2_icon_cache_update
+	xdg_pkg_postinst
 
 	if ! use lzo ; then
 		elog "OpenTTD was built without 'lzo' in USE. While 'lzo' is not"
@@ -173,5 +176,5 @@ pkg_postinst() {
 }
 
 pkg_postrm() {
-	gnome2_icon_cache_update
+	xdg_pkg_postrm
 }


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/
@ 2019-04-03 12:23 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2019-04-03 12:23 UTC (permalink / raw
  To: gentoo-commits

commit:     bb06c4171f88467a4f354eac22b44d4d9bde83fc
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  3 12:23:00 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Apr  3 12:23:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb06c417

games-simulation/openttd: Removed old.

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 games-simulation/openttd/Manifest                |   2 -
 games-simulation/openttd/files/openttd.initd     |  19 ---
 games-simulation/openttd/openttd-1.7.1-r1.ebuild | 170 -----------------------
 games-simulation/openttd/openttd-1.7.2.ebuild    | 170 -----------------------
 4 files changed, 361 deletions(-)

diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest
index bf1c8e1257c..8bae6409e8b 100644
--- a/games-simulation/openttd/Manifest
+++ b/games-simulation/openttd/Manifest
@@ -1,4 +1,2 @@
-DIST openttd-1.7.1-source.tar.gz 10090311 BLAKE2B 339171cd2895398ee1fedcfd24d1126fbc060b6d4530b267310b3f220448f8e6469a726e71e9882bea117585ea7b9f7271205f576ee2b26de6dec079f57f1620 SHA512 4a0d2ee424374b50fe0d089b86ff16b5de3159848a38143ca6745e349b6126567f1e4beda9afe2e6bc21ffffce1166acf719d3f5c95703a14c1379f8857e83d3
-DIST openttd-1.7.2-source.tar.gz 10097175 BLAKE2B a027b6ca6d3116dc3e6ad6ae43965682107268e367032418200cf1c1e16c5b5dad39c275ea57d923f17564d80cceb0e9909dc5aaf7ee230242f0ce0f46f06b1a SHA512 44d25061c42cb9c81baa67a40ff31a6681dcbb121c61db74c5179a31f189919471a82b7fd3f79c2cdeef02af5b47ec35fdbdc7feed74ca2360c028869fe772e8
 DIST openttd-1.8.0-source.tar.xz 6521016 BLAKE2B b3a608fd21d21f861af6eba235c028a59f071ab4698cfdcdd499b6ea7ece853679b064935368d95330414a24ac90aaa3c426afc12a2e135d5b0a48170879b807 SHA512 a2d61b3c94a550c8f3a581127df8c3459b1ddff5ba924942c468cbc70e88e0bf4405cecb68a91243b544ead64f215aa8d489a07b38dce507ae7d59e8ec155d7a
 DIST openttd-1.9.0-source.tar.xz 6575956 BLAKE2B 31d663b2f8aa67d9e3eb7899795468e8641671bb977957fdc6e55c8dedf3f2a00757de67ed034bf6180cc6091006a1b0bfba8af22d09744eb839a54ca662cbd9 SHA512 fcc044ea93810c99e9b3e80676676272c6f0efb43faa7ef4bfa7184aea793680df22504a1831837cc5ae8481e898d0636b992d1ddb8560cd4848463343adba2d

diff --git a/games-simulation/openttd/files/openttd.initd b/games-simulation/openttd/files/openttd.initd
deleted file mode 100644
index 7a719587c7d..00000000000
--- a/games-simulation/openttd/files/openttd.initd
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or later
-
-depend() {
-	need net
-}
-
-start() {
-	ebegin "Starting OpenTTD dedicated server"
-	start-stop-daemon --start -q --exec /usr/games/bin/openttd -- -D -f > /dev/null
-	eend $?
-}
-
-stop() {
-	ebegin "Stopping OpenTTD dedicated server"
-	start-stop-daemon --stop -q -n openttd
-	eend $?
-}

diff --git a/games-simulation/openttd/openttd-1.7.1-r1.ebuild b/games-simulation/openttd/openttd-1.7.1-r1.ebuild
deleted file mode 100644
index f24302009a4..00000000000
--- a/games-simulation/openttd/openttd-1.7.1-r1.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils gnome2-utils
-
-DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe"
-HOMEPAGE="http://www.openttd.org/"
-SRC_URI="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE="aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib"
-RESTRICT="test" # needs a graphics set in order to test
-
-RDEPEND="!dedicated? (
-		media-libs/libsdl[sound,X,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
-		)
-	)
-	lzo? ( dev-libs/lzo:2 )
-	iconv? ( virtual/libiconv )
-	png? ( media-libs/libpng:0 )
-	zlib? ( sys-libs/zlib )"
-DEPEND="${RDEPEND}
-	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.6.0-cflags.patch
-)
-
-src_configure() {
-	local myopts=()
-	# 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.
-	local myopts+=( --without-allegro )
-
-	# libtimidity not needed except for some embedded platform
-	# nevertheless, it will be automagically linked if it is
-	# installed. Hence, we disable it.
-	myopts+=( --without-libtimidity )
-
-	use debug && myopts+=( --enable-debug=3 )
-
-	if use dedicated ; then
-		myopts+=( --enable-dedicated )
-	else
-		use aplaymidi && myopts+=( --with-midi='/usr/bin/aplaymidi' )
-		myopts+=(
-			$(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.
-	CFLAGS="" ./configure \
-		--disable-strip \
-		--prefix-dir="${EPREFIX%/}/usr" \
-		--binary-dir="bin" \
-		--install-dir="${D}" \
-		--menu-group="Game;Simulation;" \
-		${myopts[@]} \
-		$(use_with iconv) \
-		$(use_with png) \
-		$(use_with cpu_flags_x86_sse sse) \
-		$(use_with lzo liblzo2) \
-		|| 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}
-	fi
-	rm -f "${ED}"/usr/share/doc/${PF}/COPYING
-}
-
-pkg_preinst() {
-	gnome2_icon_savelist
-}
-
-pkg_postinst() {
-	gnome2_icon_cache_update
-
-	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 "${GAMES_DATADIR}/${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
-}
-
-pkg_postrm() {
-	gnome2_icon_cache_update
-}

diff --git a/games-simulation/openttd/openttd-1.7.2.ebuild b/games-simulation/openttd/openttd-1.7.2.ebuild
deleted file mode 100644
index f6e90e926ac..00000000000
--- a/games-simulation/openttd/openttd-1.7.2.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils gnome2-utils
-
-DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe"
-HOMEPAGE="http://www.openttd.org/"
-SRC_URI="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE="aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib"
-RESTRICT="test" # needs a graphics set in order to test
-
-RDEPEND="!dedicated? (
-		media-libs/libsdl[sound,X,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
-		)
-	)
-	lzo? ( dev-libs/lzo:2 )
-	iconv? ( virtual/libiconv )
-	png? ( media-libs/libpng:0 )
-	zlib? ( sys-libs/zlib )"
-DEPEND="${RDEPEND}
-	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.6.0-cflags.patch
-)
-
-src_configure() {
-	local myopts=()
-	# 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.
-	local myopts+=( --without-allegro )
-
-	# libtimidity not needed except for some embedded platform
-	# nevertheless, it will be automagically linked if it is
-	# installed. Hence, we disable it.
-	myopts+=( --without-libtimidity )
-
-	use debug && myopts+=( --enable-debug=3 )
-
-	if use dedicated ; then
-		myopts+=( --enable-dedicated )
-	else
-		use aplaymidi && myopts+=( --with-midi='/usr/bin/aplaymidi' )
-		myopts+=(
-			$(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.
-	CFLAGS="" ./configure \
-		--disable-strip \
-		--prefix-dir="${EPREFIX%/}/usr" \
-		--binary-dir="bin" \
-		--install-dir="${D}" \
-		--menu-group="Game;Simulation;" \
-		${myopts[@]} \
-		$(use_with iconv) \
-		$(use_with png) \
-		$(use_with cpu_flags_x86_sse sse) \
-		$(use_with lzo liblzo2) \
-		|| 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}
-	fi
-	rm -f "${ED}"/usr/share/doc/${PF}/COPYING
-}
-
-pkg_preinst() {
-	gnome2_icon_savelist
-}
-
-pkg_postinst() {
-	gnome2_icon_cache_update
-
-	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 "${GAMES_DATADIR}/${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
-}
-
-pkg_postrm() {
-	gnome2_icon_cache_update
-}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/
@ 2020-11-11 11:22 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2020-11-11 11:22 UTC (permalink / raw
  To: gentoo-commits

commit:     d44391b8ac3c5cf88c2b3b20b0a580e9ebbd3ae1
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 11 09:19:21 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Nov 11 11:22:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d44391b8

games-simulation/openttd: Fixed build with >=dev-libs/icu-68.1

Closes: https://bugs.gentoo.org/751949
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../openttd/files/openttd-1.10.3-icu68.patch       | 28 ++++++++++++++++++++++
 games-simulation/openttd/openttd-1.10.3.ebuild     |  1 +
 2 files changed, 29 insertions(+)

diff --git a/games-simulation/openttd/files/openttd-1.10.3-icu68.patch b/games-simulation/openttd/files/openttd-1.10.3-icu68.patch
new file mode 100644
index 00000000000..9596ab66606
--- /dev/null
+++ b/games-simulation/openttd/files/openttd-1.10.3-icu68.patch
@@ -0,0 +1,28 @@
+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/openttd-1.10.3.ebuild b/games-simulation/openttd/openttd-1.10.3.ebuild
index acf83d2f955..8bad288e564 100644
--- a/games-simulation/openttd/openttd-1.10.3.ebuild
+++ b/games-simulation/openttd/openttd-1.10.3.ebuild
@@ -62,6 +62,7 @@ PDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.9.0-cflags.patch
 	"${FILESDIR}"/${PN}-1.9.0-dont_compress_manpages.patch
+	"${FILESDIR}"/${P}-icu68.patch
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/
@ 2022-04-10 13:24 Conrad Kostecki
  0 siblings, 0 replies; 9+ messages in thread
From: Conrad Kostecki @ 2022-04-10 13:24 UTC (permalink / raw
  To: gentoo-commits

commit:     6f6d5ac7441e6449230909e5ad6c2db1e48557fb
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 10 13:08:15 2022 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Apr 10 13:23:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f6d5ac7

games-simulation/openttd: add 12.2

Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 games-simulation/openttd/Manifest               |   1 +
 games-simulation/openttd/files/openttd.confd    |   5 +
 games-simulation/openttd/files/openttd.initd-r2 |  16 ++++
 games-simulation/openttd/openttd-12.2.ebuild    | 120 ++++++++++++++++++++++++
 4 files changed, 142 insertions(+)

diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest
index 1cc2aec45707..47bd27323260 100644
--- a/games-simulation/openttd/Manifest
+++ b/games-simulation/openttd/Manifest
@@ -1,2 +1,3 @@
 DIST openttd-12.0-source.tar.xz 7307832 BLAKE2B 12ffd0978e1f735f4a1d9eb63876a6f4a38867f11e5cbfbb7386f34564ef8b79f394b782c99f28e8a65196b7311aee28427d0485abd2e16dd69f36beb40fa3b1 SHA512 a1042fe52892cf301d3a2c7e972d9c091829638119d2ca9b55165a6b5568660f178e808db4b0bf2d3e4538dbdaea7b0683d4de9333defbcd95e109d591c05a78
 DIST openttd-12.1-source.tar.xz 7357316 BLAKE2B 653a511416b0d75af696eae96cf730e95747b476f9b1957759a6d3941eff2d6194dfb4bdb8e5e6cb645b81278ac4d48cf886daaa5796d1f995da490bcd046514 SHA512 bf58dbe308c64736973b92d66c3973081867e93f02e3b345556f5e74aea00fe0bbbb8b826f4bb59440b593d2a2d3be4f36321fb8a44be89bfa390fe6afe40bfc
+DIST openttd-12.2-source.tar.xz 7377496 BLAKE2B a2c0192a2d4ed149f7c6584032b46483eb74d2d7d2ced16f1d0d3e638c4acef184cd8b013b855a01750dbb570d37bb6ed95f04d16c1580e4b3777ea3b90cfee1 SHA512 577792faee1d5e0c19fbfe31501dab3359f8e1327caa87e6378bb3e616ab6b2c64d02044c6ac99f7c40397df7bc6847a6b432852a5318a2db574203ddebfaef6

diff --git a/games-simulation/openttd/files/openttd.confd b/games-simulation/openttd/files/openttd.confd
new file mode 100644
index 000000000000..399ab5d984c6
--- /dev/null
+++ b/games-simulation/openttd/files/openttd.confd
@@ -0,0 +1,5 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Options for your started OpenTTD server
+openttd_opts=""

diff --git a/games-simulation/openttd/files/openttd.initd-r2 b/games-simulation/openttd/files/openttd.initd-r2
new file mode 100644
index 000000000000..6a24bbc25072
--- /dev/null
+++ b/games-simulation/openttd/files/openttd.initd-r2
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="OpenTTD dedicated game server"
+pidfile="/run/${SVCNAME}.pid"
+
+command="/usr/bin/openttd"
+command_args="-D ${openttd_opts}"
+command_background="true"
+command_group="openttd"
+command_user="openttd"
+
+depend() {
+	need net
+}

diff --git a/games-simulation/openttd/openttd-12.2.ebuild b/games-simulation/openttd/openttd-12.2.ebuild
new file mode 100644
index 000000000000..9b284346f0a3
--- /dev/null
+++ b/games-simulation/openttd/openttd-12.2.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg-utils
+
+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 ~arm64 ~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? (
+		acct-group/openttd
+		acct-user/openttd
+	)
+	!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="
+	>=games-util/grfcodec-6.0.6_p20210310
+	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}/${PN}-1.11.2_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)
+		# N.B. regarding #807364 and #828984: CMAKE_DISABLE_FIND_PACKAGE_SDL is used only
+		# with USE="allegro -sdl" combination flags. There no other way to
+		# completely disable SDL1 support.
+		-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
+	if use dedicated ; then
+		newconfd "${FILESDIR}"/openttd.confd openttd
+		newinitd "${FILESDIR}"/openttd.initd-r1 openttd
+	fi
+}
+
+pkg_postinst() {
+	xdg_icon_cache_update
+
+	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
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/
@ 2022-04-12 20:59 Conrad Kostecki
  0 siblings, 0 replies; 9+ messages in thread
From: Conrad Kostecki @ 2022-04-12 20:59 UTC (permalink / raw
  To: gentoo-commits

commit:     17d9e66641cfdec7bf1a2f97f8d50fd4d93d8435
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 12 20:57:20 2022 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Tue Apr 12 20:58:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17d9e666

games-simulation/openttd: add custom attach command

Adding a custom attach command, so you can attach yourself with 'dtach'
in the interactive console open OpenTTD, when running in server mode.

Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 games-simulation/openttd/files/openttd.confd       |  5 ----
 games-simulation/openttd/files/openttd.confd-r1    | 10 +++++++
 games-simulation/openttd/files/openttd.initd-r2    | 16 ----------
 games-simulation/openttd/files/openttd.initd-r3    | 34 ++++++++++++++++++++++
 ...{openttd-12.2.ebuild => openttd-12.2-r1.ebuild} |  5 ++--
 5 files changed, 47 insertions(+), 23 deletions(-)

diff --git a/games-simulation/openttd/files/openttd.confd b/games-simulation/openttd/files/openttd.confd
deleted file mode 100644
index 399ab5d984c6..000000000000
--- a/games-simulation/openttd/files/openttd.confd
+++ /dev/null
@@ -1,5 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Options for your started OpenTTD server
-openttd_opts=""

diff --git a/games-simulation/openttd/files/openttd.confd-r1 b/games-simulation/openttd/files/openttd.confd-r1
new file mode 100644
index 000000000000..47cae2fda01a
--- /dev/null
+++ b/games-simulation/openttd/files/openttd.confd-r1
@@ -0,0 +1,10 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Dtach options, which will used, when the `attach` extra command is called.
+# By default, CTRL+D is used, and no signal is send,
+# when you want to detach from the attached console.
+dtach_opts="-e '^D' -r none"
+
+# Options for your started OpenTTD server
+openttd_opts=""

diff --git a/games-simulation/openttd/files/openttd.initd-r2 b/games-simulation/openttd/files/openttd.initd-r2
deleted file mode 100644
index 6a24bbc25072..000000000000
--- a/games-simulation/openttd/files/openttd.initd-r2
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2022 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or later
-
-description="OpenTTD dedicated game server"
-pidfile="/run/${SVCNAME}.pid"
-
-command="/usr/bin/openttd"
-command_args="-D ${openttd_opts}"
-command_background="true"
-command_group="openttd"
-command_user="openttd"
-
-depend() {
-	need net
-}

diff --git a/games-simulation/openttd/files/openttd.initd-r3 b/games-simulation/openttd/files/openttd.initd-r3
new file mode 100644
index 000000000000..89680f91d267
--- /dev/null
+++ b/games-simulation/openttd/files/openttd.initd-r3
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="OpenTTD dedicated game server"
+dtach_tmpfile="$(mktemp -u)"
+name="OpenTTD dedicated game server"
+openttd_command="/usr/bin/openttd"
+pidfile="/run/${SVCNAME}.pid"
+
+description_attach="Attaches to the session (interactive console) of the OpenTTD game server"
+extra_started_commands="attach"
+
+command="/usr/bin/dtach"
+command_args="-N ${dtach_tmpfile} ${openttd_command} -D ${openttd_opts}"
+command_background="true"
+command_group="openttd"
+command_user="openttd"
+
+depend() {
+        need net
+}
+
+attach() {
+        pidnumber="$(cat ${pidfile})"
+        dtach_tmpfile="$(cat /proc/${pidnumber}/cmdline | tr '\0' ' ' | awk '{print $3}')"
+
+        if [ -S "${dtach_tmpfile}" ]; then
+                eval "${command}" -a "${dtach_tmpfile}" "${dtach_opts}"
+        else
+                eerror "The determined socket file for dtach could not be found!"
+                eerror "Did the process crash?"
+        fi
+}

diff --git a/games-simulation/openttd/openttd-12.2.ebuild b/games-simulation/openttd/openttd-12.2-r1.ebuild
similarity index 96%
rename from games-simulation/openttd/openttd-12.2.ebuild
rename to games-simulation/openttd/openttd-12.2-r1.ebuild
index aaeac2d9a8f2..2c6d18c4b2c4 100644
--- a/games-simulation/openttd/openttd-12.2.ebuild
+++ b/games-simulation/openttd/openttd-12.2-r1.ebuild
@@ -22,6 +22,7 @@ RDEPEND="
 	dedicated? (
 		acct-group/openttd
 		acct-user/openttd
+		app-misc/dtach
 	)
 	!dedicated? (
 		allegro? ( media-libs/allegro:5 )
@@ -90,8 +91,8 @@ src_configure() {
 src_install() {
 	cmake_src_install
 	if use dedicated ; then
-		newconfd "${FILESDIR}"/openttd.confd openttd
-		newinitd "${FILESDIR}"/openttd.initd-r2 openttd
+		newconfd "${FILESDIR}"/openttd.confd-r1 openttd
+		newinitd "${FILESDIR}"/openttd.initd-r3 openttd
 	fi
 }
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-12 20:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-11 11:22 [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2022-04-12 20:59 Conrad Kostecki
2022-04-10 13:24 Conrad Kostecki
2019-04-03 12:23 Lars Wendler
2019-04-03 12:20 Lars Wendler
2018-09-21 11:37 Lars Wendler
2018-07-16  9:08 Lars Wendler
2017-07-18 23:06 Lars Wendler
2016-04-05  1:03 Michael Sterrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox