[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: Add higan.
Taylan Ulrich Bayırlı/Kammer
Re: [PATCH] gnu: Add higan.
Thu, 09 Jun 2016 23:43:46 +0300
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
address@hidden (Ludovic Courtès) writes:
> address@hidden (Taylan Ulrich "Bayırlı/Kammer") skribis:
>> address@hidden (Ludovic Courtès) writes:
>>> In what sense is it unsuitable? It’s OK to have a couple of patches,
>>> but it’s not quite OK to host a fork of the upstream package, IMO (at
>>> the very least, it can create confusion and make it harder to see how it
>>> differs from the “real” package.)
>> The repo is just for having a consistent place from which the source can
>> be fetched, as the author doesn't want source bundles to be downloaded
>> from his website. No changes to the code are made.
>> The repo at GitLab didn't seem to tag releases properly. That being
>> said, now that I look at it, it seems more like an oversight for v098.
>> Other releases seem to be tagged quite consistently:
>> Should we use that repo instead? It's a bit more official than mine.
> Yes, I think it would be more appropriate.
I contacted the maintainer of the repo and asked them to add a tag,
which is done now.
Note: apparently the author re-released 098 with a hotfix very soon
after releasing it, without making a version change. In the repository,
this is tagged as 098b, which I use here. I.e. this is not a true
version update; we were already using "this 098".
>>>> * The program insists on looking in ~/.local/share for some data files
>>>> that are actually installed in $prefix/share; does my strategy here
>>>> look OK, in that I wrap the executable to copy the data files into
>>>> ~/.local/share every time the program is run?
>>> Sounds like a sledgehammer no? :-)
>>> If those files are immutable, what about patching Higan to look for
>>> those files in $datadir instead?
>> Apparently, the files that are part of the distribution are pure data
>> files, i.e. fine to be read-only. However, the directory hierarchy of
>> which they're a part needs to be writable, as higan creates further
>> files there. With that cp -r, the directory hierarchy is made sure to
>> be there, and the data files made sure to be up to date.
>> Although I didn't look too closely at the sources, patching higan to do
>> things differently would presumably be a nontrivial task, since it seems
>> bent on doing things in terms of this directory structure that contains
>> both pure data and read-write data files.
> Hmm OK. What do other distros do?
More or less the same thing; it's sanctioned by the developers even
though it's acknowledged not to be a particularly good solution. Here
we see Arch do the same:
(Though this one seems to have a bug because they copy things to
~/Emulation instead of the new ~/.local/share. I'm confident that
~/.local/share is the right location in the latest release. Also for
the cheats.bml file.)
Here's a patch that, in addition to switching the repo, adds a patch
removing a -march=native flag (which I assume would break
cross-compilation), and passes the make flag "profile=balanced" to make
higan less CPU intensive by emulating a bit less accurately (it was
running too slow on my i5, so this should be a better default).
I just saved a princess from an evil wizard with this so I can confirm
it runs smooth now.
>From 93ccdf075caf462af742cf46cad35697001db124 Mon Sep 17 00:00:00 2001
Date: Thu, 9 Jun 2016 21:53:02 +0300
Subject: [PATCH] gnu: higan: Various improvements.
* gnu/packages/games.scm (higan): Use semi-official repository at GitLab
(using hotfix tag 098b which is equivalent to official release 098).
Add a patch to remove the build flag -march=native. Set profile to
* gnu/packages/patches/higan-remove-march-native-flag.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
gnu/local.mk | 1 +
gnu/packages/games.scm | 9 ++++++---
gnu/packages/patches/higan-remove-march-native-flag.patch | 13 +++++++++++++
3 files changed, 20 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/higan-remove-march-native-flag.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index d3e7262..210d3aa 100644
@@ -542,6 +542,7 @@ dist_patch_DATA =
+ %D%/packages/patches/higan-remove-march-native-flag.patch \
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4181ffb..2aa46e3 100644
@@ -2248,15 +2248,17 @@ Red Eclipse provides fast paced and accessible
- (version "098")
+ (version "098b")
- "https://github.com/TaylanUB/higan/archive/v" version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
- (base32 "12snxrk8wa94x3l69qcimgm0xc22zjgf7vzhckp2lzyfbf27950v"))))
+ (base32 "05j0xzr01gsyia4gj6jmdzklll4iky1kwxgxw0mmfcgm10m0h3bf"))
+ (patches (search-patches "higan-remove-march-native-flag.patch"))))
@@ -2322,6 +2324,7 @@ Red Eclipse provides fast paced and accessible gameplay.")
`("PATH" ":" prefix (,bin))))))))
+ "profile=balanced" ;default is accuracy; which is quite slow
(string-append "prefix=" (assoc-ref %outputs "out")))
;; There is no test suite.
diff --git a/gnu/packages/patches/higan-remove-march-native-flag.patch
new file mode 100644
@@ -0,0 +1,13 @@
+Remove -march=native from build flags.
+@@ -32,7 +32,7 @@ ifeq ($(platform),windows)
+ else ifeq ($(platform),macosx)
+ flags += -march=native
+ else ifneq ($(filter $(platform),linux bsd),)
+- flags += -march=native -fopenmp
++ flags += -fopenmp
+ link += -fopenmp
+ link += -Wl,-export-dynamic
+ link += -lX11 -lXext