commit:     091a3e710fc969183bbe7c4d92c8e198fae76691
Author:     Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 11 07:05:20 2023 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Fri Aug 11 07:25:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=091a3e71

games-util/grfcodec: add 6.0.6_p20230811

Also, stop defining _FORTIFY_SOURCE.

Closes: https://bugs.gentoo.org/894648
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>

 games-util/grfcodec/Manifest                       |  1 +
 ...rfcodec-6.0.6_p20230811-no-fortify-source.patch | 19 ++++++++++
 .../grfcodec/grfcodec-6.0.6_p20230811.ebuild       | 43 ++++++++++++++++++++++
 3 files changed, 63 insertions(+)

diff --git a/games-util/grfcodec/Manifest b/games-util/grfcodec/Manifest
index 4cd8f5110c37..06a4a62fcc28 100644
--- a/games-util/grfcodec/Manifest
+++ b/games-util/grfcodec/Manifest
@@ -1 +1,2 @@
 DIST grfcodec-6.0.6_p20210310.tar.gz 205795 BLAKE2B 
24d803e208b2fc465ae71611c0c0fb2737bfa8c5a28375bc08a6220581d7b07bb2f2a390e2ddb7f4beb8a80951862473919d41bce83364af70b6dc646f0f3f8e
 SHA512 
10f4ec28c69d87e397f0fb5b497dbefce8fcd826731d3a0a864cbbd333b7df188ab0087445644ad245aeff65a8b6563dfdfa657ac1a2248e56e296c01f7d58a8
+DIST grfcodec-6.0.6_p20230811.tar.gz 205324 BLAKE2B 
00d36b6785d00edec061cc0f0a695225a78c487bc66c4521f0f3da1050304bc382ed78d1df8dff8602b35b167505388ad993c46f01ac39960c131a6f5c7264eb
 SHA512 
95a883636720ad1fdd0a2e17cba60b6cde15b5fe0337cfe2330db75d60e9a2bdb1dea3c06bb8f8acace8989b6abaf6d1845b30c5bc5f6c76f34e5aa76f36ddd4

diff --git 
a/games-util/grfcodec/files/grfcodec-6.0.6_p20230811-no-fortify-source.patch 
b/games-util/grfcodec/files/grfcodec-6.0.6_p20230811-no-fortify-source.patch
new file mode 100644
index 000000000000..ce71610a0cad
--- /dev/null
+++ b/games-util/grfcodec/files/grfcodec-6.0.6_p20230811-no-fortify-source.patch
@@ -0,0 +1,19 @@
+From a6e90d5121cfd312df535d90d1b939d9f9c616a1 Mon Sep 17 00:00:00 2001
+From: Matthew Smith <[email protected]>
+Date: Fri, 11 Aug 2023 07:59:54 +0100
+Subject: [PATCH] build: Remove -D_FORTIFY_SOURCE=2
+
+Bug: https://bugs.gentoo.org/894648
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -47,7 +47,6 @@ endif()
+ # it does not appear to support the $<> tags.
+ add_compile_options(
+     "$<$<CONFIG:Debug>:-D_DEBUG>"
+-    "$<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>" # FORTIFY_SOURCE should 
only be used in non-debug builds (requires -O1+)
+ )
+ if(MINGW)
+     add_link_options(
+-- 
+2.41.0
+

diff --git a/games-util/grfcodec/grfcodec-6.0.6_p20230811.ebuild 
b/games-util/grfcodec/grfcodec-6.0.6_p20230811.ebuild
new file mode 100644
index 000000000000..9effc99b535d
--- /dev/null
+++ b/games-util/grfcodec/grfcodec-6.0.6_p20230811.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake vcs-snapshot
+
+COMMIT=d5a7b850bcef30c0bfd17ceeb4a18c431770f468
+
+DESCRIPTION="A suite of programs to modify openttd/Transport Tycoon Deluxe's 
GRF files"
+HOMEPAGE="https://github.com/OpenTTD/grfcodec";
+SRC_URI="https://github.com/OpenTTD/grfcodec/archive/${COMMIT}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="media-libs/libpng:="
+DEPEND="${RDEPEND}
+       dev-libs/boost"
+
+PATCHES=(
+       # Bug #894648
+       "${FILESDIR}"/${P}-no-fortify-source.patch
+)
+
+src_configure() {
+       local mycmakeargs=(
+               # Make sure we don't use git by accident.
+               # Build system does not care much if it's
+               # executed successfully and populates
+               # YEARS / VERSION with empty values.
+               -DGIT_EXECUTABLE=/bin/do-not-use-git-executable
+       )
+
+       cmake_src_configure
+}
+
+src_install() {
+       dobin "${BUILD_DIR}"/{grfcodec,grfid,grfstrip,nforenum}
+       doman docs/*.1
+       dodoc changelog.txt docs/*.txt
+}

Reply via email to