unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: 30406@debbugs.gnu.org
Subject: [bug#30406] [PATCH 1/2] gnu: tome4: Add fix to getself.c.
Date: Sat, 10 Feb 2018 00:23:30 +0300	[thread overview]
Message-ID: <20180209212331.6538-1-go.wigust@gmail.com> (raw)
In-Reply-To: <20180209212145.6478-1-go.wigust@gmail.com>

* gnu/local.mk (dist_patch_DATA): Add this.
* gnu/packages/games.scm (tome4)[source]: Add fix to getself.c.
* gnu/packages/patches/tome4-patch-src-getself-c.patch: New file.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/games.scm                             |  1 +
 .../patches/tome4-patch-src-getself-c.patch        | 24 ++++++++++++++++++++++
 3 files changed, 26 insertions(+)
 create mode 100644 gnu/packages/patches/tome4-patch-src-getself-c.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 925057dc7..24b0bf1e0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1118,6 +1118,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/tk-find-library.patch			\
   %D%/packages/patches/ttf2eot-cstddef.patch			\
   %D%/packages/patches/ttfautohint-source-date-epoch.patch	\
+  %D%/packages/patches/tome4-patch-src-getself-c.patch		\
   %D%/packages/patches/tophat-build-with-later-seqan.patch	\
   %D%/packages/patches/totem-meson-easy-codec.patch		\
   %D%/packages/patches/tuxpaint-stamps-path.patch		\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 286d0feef..a5804a87b 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5208,6 +5208,7 @@ Crowther & Woods, its original authors, in 1995.  It has been known as
        (sha256
         (base32
          "0v2qgdfpvdzd1bcbp9v8pfahj1bgczsq2d4xfhh5wg11jgjcwz03"))
+       (patches (search-patches "tome4-patch-src-getself-c.patch"))
        (modules '((guix build utils)))
        (snippet
         '(substitute* '("src/music.h" "src/tSDL.h")
diff --git a/gnu/packages/patches/tome4-patch-src-getself-c.patch b/gnu/packages/patches/tome4-patch-src-getself-c.patch
new file mode 100644
index 000000000..ce4795662
--- /dev/null
+++ b/gnu/packages/patches/tome4-patch-src-getself-c.patch
@@ -0,0 +1,24 @@
+Copied from OpenBSD.
+
+Fixes: ../src/getself.c:40:1: fatal error: opening dependency file
+../obj/Release/TEngine/getself.d: No such file or directory
+
+$OpenBSD: patch-src_getself_c,v 1.3 2017/11/11 11:24:42 kirby Exp $
+
+--- a/src/getself.c
++++ b/src/getself.c
+@@ -47,13 +47,7 @@ int get_number_cpus()
+ const char *get_self_executable(int argc, char **argv)
+ {
+ 	static char res[PATH_MAX];
+-	int mib[4];
+-	mib[0] = CTL_KERN;
+-	mib[1] = KERN_PROC;
+-	mib[2] = KERN_PROC_PATHNAME;
+-	mib[3] = -1;
+-	size_t cb = sizeof(res);
+-	sysctl(mib,4,res,&cb,NULL,0);
++	realpath("${GAMEDIR}/", res);
+ 	return res;
+ }
+ 
-- 
2.15.1

  reply	other threads:[~2018-02-09 21:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09 21:21 [bug#30406] [PATCH 0/2] gnu: tome4: Add fix to getself.c Oleg Pykhalov
2018-02-09 21:23 ` Oleg Pykhalov [this message]
2018-02-09 21:23   ` [bug#30406] [PATCH 2/2] gnu: tome4: Replace system* with invoke Oleg Pykhalov
2018-04-23 12:59     ` Ludovic Courtès
2018-04-23 12:59   ` [bug#30406] [PATCH 1/2] gnu: tome4: Add fix to getself.c Ludovic Courtès
2018-06-22 19:34 ` [bug#30406] " Gábor Boskovits
2018-06-23  2:06   ` Oleg Pykhalov
2021-09-13  0:07     ` bug#30406: " Sarah Morgensen

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20180209212331.6538-1-go.wigust@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=30406@debbugs.gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).