From patchwork Thu Jun 9 20:43:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VGF5bGFuIFVscmljaCBCYXnEsXJsxLEgPT91dGYtOD9RPz0yRkthbW1lcj89?= X-Patchwork-Id: 12929 Received: (qmail 62189 invoked by uid 89); 9 Jun 2016 20:44:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=releasing, evil, princess, wizard X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 09 Jun 2016 20:44:05 +0000 Received: from localhost ([::1]:37018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB6o5-0002Wl-SX for patchwork@sourceware.org; Thu, 09 Jun 2016 16:44:01 -0400 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 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:34836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB6nu-0005X2-Pw; Thu, 09 Jun 2016 16:43:51 -0400 Received: by mail-wm0-x241.google.com with SMTP id k184so13405063wme.2; Thu, 09 Jun 2016 13:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ApgTLTDbinAd4rEwZ9nBDqmnkLh7ttoGsZ7RrcNaYxo=; b=MLl5eAfB7wg7povCM1wKVg55BUBL3FahpAbTirzZHNBLOXoNXxvaB2+ScbtqutGq33 nyBCZyRcnW1oGp2jYv+FAr91NonnUPOv/RpdYtI5HabYrNgIskHRVgCBfN5ea2pAxqLs DakRkxX9OgqkDbszWibDKX8W/siUfey+XNZ0DcT/mm1dEYNE9WG/2wX7ksWqbuwJQWm2 sxtG+jkg7vJP+3YcaODO+siLpajP+gNr0BJxseepSzKLDBMVeqiS7cw5Y3NwAKEy1Upr UpJHlCJUJEM4Oa4cgVNTZl23RudQh7YS0Qn1imXhqKqLBJ2s+oq6IlTe7oapx5iN33r/ Blaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ApgTLTDbinAd4rEwZ9nBDqmnkLh7ttoGsZ7RrcNaYxo=; b=GNXDs01ChP1I+rrCq/rxT51tmnO++gyF92RjjsiYoNP4wAKZn6k9rT4kvgH6SlciNV 9ePGDTe1mKhVdN5pfN0d8kdoXTXqug2r9I/SiuUZszO2TDTl+pyDR9pMNy7vd9nRIBg8 f1bLZODn1g1K33gjAEpvP+xa6r+Fg8fvRckMTX8NybXJsNJHXwVqxV6TjxtQ9B7bNM42 2S0kI6hiqDry2xwLbrlUmxVrSXm8fxBGSWSqXOGpIBkUT9APhaoUyf9BQFCvID0JZDrQ +TqU7tSSYPxH94F/sDLfhqmsWxoIsyZ0+cmlh6R9ZxgDrrsdftcgMA1rV94Vi4EdWMij P1qw== X-Gm-Message-State: ALyK8tKPf9yyIdHuufUh61TQUSh/Q/HpUK26udYBcKl1fk93nNY3l1+CmC9RynuGTk8WuA== X-Received: by 10.194.242.230 with SMTP id wt6mr12375451wjc.143.1465505029433; Thu, 09 Jun 2016 13:43:49 -0700 (PDT) Received: from T420.taylan ([78.172.122.152]) by smtp.gmail.com with ESMTPSA id d7sm32240036wmd.11.2016.06.09.13.43.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jun 2016 13:43:48 -0700 (PDT) From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: Add higan. References: <87fustalcn.fsf@T420.taylan> <87porrkgab.fsf@gnu.org> <87fusn7r5i.fsf@T420.taylan> <87k2hzem54.fsf@gnu.org> Date: Thu, 09 Jun 2016 23:43:46 +0300 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") Message-ID: <8737om6qkd.fsf@T420.taylan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::241 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" ludo@gnu.org (Ludovic Courtès) writes: > taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis: > >> ludo@gnu.org (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: >> >> 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 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: https://git.archlinux.org/svntogit/community.git/tree/trunk/higan?h=packages/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=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 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