From mboxrd@z Thu Jan 1 00:00:00 1970 From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Subject: Re: [PATCH] gnu: Add higan. Date: Thu, 09 Jun 2016 23:43:46 +0300 Message-ID: <8737om6qkd.fsf@T420.taylan> References: <87fustalcn.fsf@T420.taylan> <87porrkgab.fsf@gnu.org> <87fusn7r5i.fsf@T420.taylan> <87k2hzem54.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB6o0-0002W9-2y for guix-devel@gnu.org; Thu, 09 Jun 2016 16:43:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bB6nv-0005Y5-4p for guix-devel@gnu.org; Thu, 09 Jun 2016 16:43:55 -0400 In-Reply-To: <87k2hzem54.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 08 Jun 2016 17:27:35 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer") skribi= s: > >> ludo@gnu.org (Ludovic Court=C3=A8s) writes: > > [...] > >>> In what sense is it unsuitable? It=E2=80=99s OK to have a couple of pa= tches, >>> but it=E2=80=99s not quite OK to host a fork of the upstream package, I= MO (at >>> the very least, it can create confusion and make it harder to see how it >>> differs from the =E2=80=9Creal=E2=80=9D 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: >> >> https://gitlab.com/higan/higan/tags >> >> 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 fil= es >>>> 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: https://git.archlinux.org/svntogit/community.git/tree/trunk/higan?h=3Dpacka= ges/higan (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=3Dnative flag (which I assume would break cross-compilation), and passes the make flag "profile=3Dbalanced" 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-higan-Various-improvements.patch >From 93ccdf075caf462af742cf46cad35697001db124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= 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 balanced. * 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 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -542,6 +542,7 @@ dist_patch_DATA = \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ %D%/packages/patches/hdf5-config-date.patch \ + %D%/packages/patches/higan-remove-march-native-flag.patch \ %D%/packages/patches/hop-bigloo-4.0b.patch \ %D%/packages/patches/hop-linker-flags.patch \ %D%/packages/patches/hydra-automake-1.15.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 4181ffb..2aa46e3 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2248,15 +2248,17 @@ Red Eclipse provides fast paced and accessible gameplay.") (define-public higan (package (name "higan") - (version "098") + (version "098b") (source (origin (method url-fetch) (uri (string-append - "https://github.com/TaylanUB/higan/archive/v" version ".tar.gz")) + "https://gitlab.com/higan/higan/repository/archive.tar.gz?ref=v" + version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "12snxrk8wa94x3l69qcimgm0xc22zjgf7vzhckp2lzyfbf27950v")))) + (base32 "05j0xzr01gsyia4gj6jmdzklll4iky1kwxgxw0mmfcgm10m0h3bf")) + (patches (search-patches "higan-remove-march-native-flag.patch")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) @@ -2322,6 +2324,7 @@ Red Eclipse provides fast paced and accessible gameplay.") `("PATH" ":" prefix (,bin)))))))) #:make-flags (list "compiler=g++" + "profile=balanced" ;default is accuracy; which is quite slow (string-append "prefix=" (assoc-ref %outputs "out"))) ;; There is no test suite. #:tests? #f)) diff --git a/gnu/packages/patches/higan-remove-march-native-flag.patch b/gnu/packages/patches/higan-remove-march-native-flag.patch new file mode 100644 index 0000000..8f4a36d --- /dev/null +++ b/gnu/packages/patches/higan-remove-march-native-flag.patch @@ -0,0 +1,13 @@ +Remove -march=native from build flags. + +--- a/higan/GNUmakefile ++++ b/higan/GNUmakefile +@@ -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 -- 2.7.4 --=-=-=--