public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/openrct2/, games-simulation/openrct2/files/
Date: Sun, 12 Dec 2021 22:42:32 +0000 (UTC)	[thread overview]
Message-ID: <1639348816.a49ebf5c5fcf197d014065f3b7eb8b489f9611d2.conikost@gentoo> (raw)

commit:     a49ebf5c5fcf197d014065f3b7eb8b489f9611d2
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 12 22:40:16 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Dec 12 22:40:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a49ebf5c

games-simulation/openrct2: update ccache logic

Closes: https://bugs.gentoo.org/828814
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../openrct2/files/openrct2-0.3.5.1-ccache.patch   | 58 ++++++++++++++++++++++
 games-simulation/openrct2/openrct2-0.3.5.1.ebuild  |  7 ++-
 2 files changed, 61 insertions(+), 4 deletions(-)

diff --git a/games-simulation/openrct2/files/openrct2-0.3.5.1-ccache.patch b/games-simulation/openrct2/files/openrct2-0.3.5.1-ccache.patch
new file mode 100644
index 000000000000..97a529c6a8e2
--- /dev/null
+++ b/games-simulation/openrct2/files/openrct2-0.3.5.1-ccache.patch
@@ -0,0 +1,58 @@
+From cb6d7418c53e10bd4120891f6a2312d3ef839ca8 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conikost@gentoo.org>
+Date: Sun, 12 Dec 2021 23:04:58 +0100
+Subject: [PATCH] CMakeLists.txt: update CCache handling (#16185)
+
+This PR updated slightly the handling of CCache. With the current
+implementation, when CCache is not being installed, CMake will complain,
+that OPENRCT2_USE_CCACHE is not set.
+
+This logic is slightly updated, so the option OPENRCT2_USE_CCACHE is always
+being available and when this option is enabled (default ON), it will
+search for CCache and warn, if it's not found.
+
+The idea behind is, as in Gentoo, we never let CCache be used by the
+package itself, instead, we enabled it globally. But this the old logic,
+on systems, which don't have CCache installed, it will complain about
+OPENRCT2_USE_CCACHE not being used, but we have to make sure, OpenRCT2
+will never use by itself CCache and this message will be gone..
+
+Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
+---
+ CMakeLists.txt | 23 +++++++++++++----------
+ 1 file changed, 13 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8d202cf5a9b8..566f3a8a9688 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,16 +8,19 @@ endif()
+ # if it is available
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+ 
+-find_package(CCache)
+-
+-if (CCache_FOUND)
+-    option(OPENRCT2_USE_CCACHE "Use CCache to improve recompilation speed (optional)" ON)
+-    if (OPENRCT2_USE_CCACHE)
+-        # Use e.g. "ccache clang++" instead of "clang++"
+-        set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCache_EXECUTABLE}")
+-        set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK    "${CCache_EXECUTABLE}")
+-    endif (OPENRCT2_USE_CCACHE)
+-endif (CCache_FOUND)
++option(OPENRCT2_USE_CCACHE "Use CCache to improve recompilation speed (optional)" ON)
++
++if (OPENRCT2_USE_CCACHE)
++    find_package(CCache)
++
++    if (CCache_FOUND)
++         # Use e.g. "ccache clang++" instead of "clang++"
++         set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCache_EXECUTABLE}")
++         set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK    "${CCache_EXECUTABLE}")
++    else()
++        message("Usage of CCache was enabled, but CCache was not found, so CCache is not being enabled.")
++    endif()
++endif (OPENRCT2_USE_CCACHE)
+ 
+ if (APPLE)
+     execute_process(COMMAND /usr/bin/uname -m OUTPUT_VARIABLE SYSTEM_MACOS_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)

diff --git a/games-simulation/openrct2/openrct2-0.3.5.1.ebuild b/games-simulation/openrct2/openrct2-0.3.5.1.ebuild
index af9c013eb4ff..6563d4bf797d 100644
--- a/games-simulation/openrct2/openrct2-0.3.5.1.ebuild
+++ b/games-simulation/openrct2/openrct2-0.3.5.1.ebuild
@@ -21,11 +21,13 @@ SRC_URI="
 	https://github.com/${MY_PN}/${MY_PN_TS}/releases/download/v${MY_PV_TS}/${MY_PN_TS}.zip -> ${PN}-${MY_PN_TS}-${MY_PV_TS}.zip
 	test? ( https://github.com/${MY_PN}/${MY_PN_RPL}/releases/download/v${MY_PV_RPL}/${MY_PN_RPL}.zip -> ${PN}-${MY_PN_RPL}-${MY_PV_RPL}.zip )
 "
+S="${WORKDIR}/${MY_PN}-${PV}"
 
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 IUSE="dedicated +lightfx +opengl scripting test +truetype"
+RESTRICT="!test? ( test )"
 
 COMMON_DEPEND="
 	dev-libs/icu:=
@@ -66,13 +68,10 @@ BDEPEND="
 	virtual/pkgconfig
 "
 
-RESTRICT="!test? ( test )"
-
-S="${WORKDIR}/${MY_PN}-${PV}"
-
 PATCHES=(
 	"${FILESDIR}/${PN}-0.2.4-include-additional-paths.patch"
 	"${FILESDIR}/${PN}-0.2.6-gtest-1.10.patch"
+	"${FILESDIR}/${PN}-0.3.5.1-ccache.patch"
 )
 
 src_unpack() {


             reply	other threads:[~2021-12-12 22:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-12 22:42 Conrad Kostecki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-23 23:36 [gentoo-commits] repo/gentoo:master commit in: games-simulation/openrct2/, games-simulation/openrct2/files/ Conrad Kostecki
2024-01-04 21:08 Conrad Kostecki
2024-01-01 17:56 Conrad Kostecki
2023-04-02 21:12 Conrad Kostecki
2022-10-02 17:31 Conrad Kostecki
2022-05-27 22:34 Conrad Kostecki
2020-08-19 22:45 Conrad Kostecki
2020-08-11 18:30 Conrad Kostecki
2019-12-02 21:16 Conrad Kostecki
2019-10-28 14:43 Joonas Niilola
2018-12-16 16:01 Andreas Sturmlechner
2018-08-19 12:59 Michał Górny
2017-08-11 22:12 Michał Górny
2017-07-26  8:12 Michał Górny

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=1639348816.a49ebf5c5fcf197d014065f3b7eb8b489f9611d2.conikost@gentoo \
    --to=conikost@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