From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yHxdJoqbCmHqVQEAgWs5BA (envelope-from ) for ; Wed, 04 Aug 2021 15:52:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6C4SIoqbCmHIbAAAB5/wlQ (envelope-from ) for ; Wed, 04 Aug 2021 13:52:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7F07E11481 for ; Wed, 4 Aug 2021 15:52:09 +0200 (CEST) Received: from localhost ([::1]:43856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBHJY-0007Gg-IP for larch@yhetil.org; Wed, 04 Aug 2021 09:52:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBHJS-0007CW-Ii for guix-patches@gnu.org; Wed, 04 Aug 2021 09:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59810) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBHJS-0003d7-CL for guix-patches@gnu.org; Wed, 04 Aug 2021 09:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBHJS-0005en-77 for guix-patches@gnu.org; Wed, 04 Aug 2021 09:52:02 -0400 Subject: bug#46378: [PATCH] gnu: Add instead. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Wed, 04 Aug 2021 13:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 46378 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: polyakov@liltechdude.xyz, 46378-done@debbugs.gnu.org Mail-Followup-To: 46378@debbugs.gnu.org, leo.prikler@student.tugraz.at, polyakov@liltechdude.xyz Received: via spool by 46378-done@debbugs.gnu.org id=D46378.162808506521651 (code D ref 46378); Wed, 04 Aug 2021 13:52:02 +0000 Received: (at 46378-done) by debbugs.gnu.org; 4 Aug 2021 13:51:05 +0000 Received: from localhost ([127.0.0.1]:43123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBHIP-0005ce-7A for submit@debbugs.gnu.org; Wed, 04 Aug 2021 09:51:05 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:61989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBHIL-0005cQ-G8 for 46378-done@debbugs.gnu.org; Wed, 04 Aug 2021 09:50:55 -0400 Received: from nijino.local (194-118-35-216.adsl.highway.telekom.at [194.118.35.216]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GftRs4q1pz3wD2; Wed, 4 Aug 2021 15:50:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1628085049; bh=b0YKY5HvnB1tSxSAlFn5z7yAqyu+1dVFHXEfdVIEFsY=; h=Subject:From:To:Date:In-Reply-To:References; b=G1ldDB2pJEqBAUb3NeMj/Vv62kgajxFkimfgM+30xvT3D3Z8Gr9oqeOX3iUqL/9+R CU5j4VspOGOUKymIEog035nBCuv1Xa17KRo0fyewiYl0xIZDo6N7qWSD5U7lHgAoXE 5Yq5dm78eoc+2qMvjOE7gaZkmkGdpJnpZPHMjVWQ= Message-ID: <4810a8fa8167edd84bfe860acecb1dd9cb81faf8.camel@student.tugraz.at> From: Leo Prikler Date: Wed, 04 Aug 2021 15:50:48 +0200 In-Reply-To: <20210804122912.20268-1-polyakov@liltechdude.xyz> References: <20210804122912.20268-1-polyakov@liltechdude.xyz> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628085130; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=b0YKY5HvnB1tSxSAlFn5z7yAqyu+1dVFHXEfdVIEFsY=; b=ilCpHZetcuU1EMyyaDPiNrH2UbwZb+b5mqAvHGAKdb/qC+JQtkVslWpKmVxJkmpZArI2pb RI+dF+RZvDGcHmN/b/SZ1XfhSXA27x/6lzqH+zW/mXhS9zVwKK2mpRKTy7Ba7lJzYxs02y 0B7iWqplw8Qvr7e/4+ZWJfRrzmli651z3Rpy8j3E3Y7NR6r3mYVU9C3pSazdu1/2CIAFxl r9XU/4F203SbBODrG6DhNgufV3Tj+tWFzvap48pkyH/0MpZ4Cwnsd0JimSVccjq562CEJn zNYAKvkLzFL9/Oc8kLOnDzyKk3qevS5zvOTBo6qGNvu1RDdqzlQLZr7YSJ5aHw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628085130; a=rsa-sha256; cv=none; b=XIL7BJuCGSD1QUztToecGbI+z0M5MzCAdV2kpN4r+1i9NOHIoEWHuoJtAy7w6cVqUCeB/J lza2NByF8GHhx90HEgpilbJfoDOhFMcCjCfkeYSUlFbwk9u8bVrpyqrom+YpzOYPuwxrcW RU8q0uWlqQf3bH7qZBIjWWaSIr24baJQDybO/nJaj/dqp6yMDkLezGz4lbPZDptaOOrheB 0IHISXZzaVJm900z8EZNXFsn9Q/Ju3XXj3gGba0JekAlSNUZ+D6UVGK7QVKd8dKeIwXvby ETMvr9GGJH7yCbiem48AJD/KY8YFm9EMcBuLNeHUdonVkqVbr6nWIWVEY/Qmrw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=G1ldDB2p; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=G1ldDB2p; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 7F07E11481 X-Spam-Score: -1.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: kjKGwRyx9GGt Hi, I've made a lot of changes to this patch, but given that it has been around for a while and I didn't want to stall you even further, I've decided to push the modified version. Am Mittwoch, den 04.08.2021, 17:29 +0500 schrieb polyakov@liltechdude.xyz: > From: Dmitry Polyakov > > * gnu/local.mk (dist_patch_DATA): > Register the patch. > > * gnu/packages/patches/instead-use-games-path.patch: > New file. game-development.scm was not mentioned, also you should mention any patch before the Makefile it's added to. > --- > gnu/local.mk | 2 + > gnu/packages/game-development.scm | 52 > +++++++++++++++++++ > .../patches/instead-use-games-path.patch | 32 ++++++++++++ > 3 files changed, 86 insertions(+) > create mode 100644 gnu/packages/patches/instead-use-games-path.patch > > diff --git a/gnu/local.mk b/gnu/local.mk > index e849480..0c45ae5 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -43,6 +43,7 @@ > # Copyright © 2021 Philip McGrath > # Copyright © 2021 Arun Isaac > # Copyright © 2021 Sharlatan Hellseher > +# Copyright © 2021 Dmitry Polyakov > # > # This file is part of GNU Guix. > # > @@ -1261,6 +1262,7 @@ dist_patch_DATA = > \ > %D%/packages/patches/imagemagick-WriteTHUMBNAILImage-fix.patch > \ > %D%/packages/patches/inetutils-hurd.patch \ > %D%/packages/patches/inkscape-poppler-0.76.patch \ > + %D%/packages/patches/instead-use-games-path.patch \ > %D%/packages/patches/inkscape-1.1-fix-build-witch-gcc7.5.patch > \ > %D%/packages/patches/intel-xed-fix-nondeterminism.patch \ > %D%/packages/patches/intltool-perl-compatibility.patch \ > diff --git a/gnu/packages/game-development.scm b/gnu/packages/game- > development.scm > index e1593c0..4164b20 100644 > --- a/gnu/packages/game-development.scm > +++ b/gnu/packages/game-development.scm > @@ -21,6 +21,7 @@ > ;;; Copyright © 2020 Timotej Lazar > ;;; Copyright © 2020 Giacomo Leidi > ;;; Copyright © 2021 Alexandru-Sergiu Marton > +;;; Copyright © 2021 Dmitry Polyakov > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -2115,6 +2116,57 @@ upon which people base their games, ports to > new platforms, and other > projects.") > (license license:gpl2)))) > > +(define-public instead > + (package > + (name "instead") > + (version "3.3.5") > + (build-system cmake-build-system) > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/instead-hub/instead") > + (commit version))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > "02j8cw623j51qmr4991i5hsbrzmnp0qfzds8m6nwwr15sjv3hv1g")) > + (patches > + (search-patches > + "instead-use-games-path.patch")))) I've added a snippet to unbundle zlib. > + (arguments > + '(#:configure-flags > + (list (string-append > + "-DLUA_INCLUDE_DIR=" > + (assoc-ref %build-inputs "luajit") "/include/luajit- > 2.1/") > + "-DWITH_LUAJIT=1" > + "-DWITH_GTK3=1") > + #:tests? #f)) > + (inputs > + `(("sdl2-images" ,sdl2-image) > + ("sdl2-ttf" ,sdl2-ttf) > + ("lua" ,lua) > + ("pkg-config" ,pkg-config) > + ("sdl2-mixer" ,sdl2-mixer) > + ("luajit" ,luajit) > + ("gtk+",gtk+))) I've reorganized the imports and added zlib. > + (home-page "https://instead3.syscall.ru/") > + (synopsis "Text adventure interpreter") > + (description "The STEAD (Simple TExt ADventures) interpreter > provide > +functionality to play games that combine visual novels, text > adventures > +and classic quests of 1990-s. STEAD games feature: > +@enumerate > +@item Very simple source code of the stories. (based on LUA) > +@item Graphical game interface > +@item Supports music and images > +@item Theme support - a game may change the interface look > +@end enumerate") I've shortened the description -- this may be somewhat subjective, but I find the short one neater. > + (license license:gpl2) License should be Expat, I believe, also I shoved it below the search path. > + (native-search-paths > + (list (search-path-specification > + (variable "INSTEAD_GAMES_PATH") > + (separator #f) ;single entry > + (files '("share/instead/games"))))))) > + > (define-public openvr > (package > (name "openvr") > diff --git a/gnu/packages/patches/instead-use-games-path.patch > b/gnu/packages/patches/instead-use-games-path.patch > new file mode 100644 > index 0000000..52e96ed > --- /dev/null > +++ b/gnu/packages/patches/instead-use-games-path.patch > @@ -0,0 +1,32 @@ > +From 8b350daa847dd8e131d9e6b5b4434ce68a7903d0 Mon Sep 17 00:00:00 > 2001 > +From: Dmitry Polyakov > +Date: Wed, 4 Aug 2021 15:46:33 +0500 > +Subject: [PATCH] [PATCH] Add support for INSTEAD_GAMES_PATH > + > +In certain cases, the user needs to determinate by himself where the > +games will be stored. Using an environment variable is the most > common > +way to provide the user with this capability. I've reworded this to use gender-neutral language. There are female and non-binary contributors as well :) > +--- > + src/main.c | 6 ++++++ > + 1 file changed, 6 insertions(+) > + > +diff --git a/src/main.c b/src/main.c > +index ba0ada1d..b05497b8 100644 > +--- a/src/main.c > ++++ b/src/main.c > +@@ -394,6 +394,12 @@ int instead_main(int argc, char *argv[]) > + setdir(game_cwd); > + profile_load(NULL); > + > ++ char *gamespath_env = NULL; > ++ > ++ if (gamespath_env = getenv("INSTEAD_GAMES_PATH"), gamespath_env > != NULL) { > ++ games_sw = strdup(gamespath_env); > ++ } > ++ > + for (i = 1; i < argc; i++) { > + if (lua_sw) /* during load profile */ > + break; > +-- > +2.32.0 > + Thanks and have a nice day :)