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

Reply via email to