From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EKuVIviLIWB7PAAA0tVLHw (envelope-from ) for ; Mon, 08 Feb 2021 19:07:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wH5/HviLIWBxLwAA1q6Kng (envelope-from ) for ; Mon, 08 Feb 2021 19:07:36 +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 15B4F940439 for ; Mon, 8 Feb 2021 19:07:35 +0000 (UTC) Received: from localhost ([::1]:40816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Bsj-0006iX-KA for larch@yhetil.org; Mon, 08 Feb 2021 14:07:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l97Gp-0007Qi-Ga for guix-patches@gnu.org; Mon, 08 Feb 2021 09:12:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38636) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l97Gk-0004lm-6H for guix-patches@gnu.org; Mon, 08 Feb 2021 09:12:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l97Gk-0008JP-0e for guix-patches@gnu.org; Mon, 08 Feb 2021 09:12:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46378] [PATCH] gnu: Add instead. References: <87o8gv58h0.fsf@liltechdude.xyz> In-Reply-To: <87o8gv58h0.fsf@liltechdude.xyz> Resent-From: polyakov@liltechdude.xyz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Feb 2021 14:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46378 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46378@debbugs.gnu.org Cc: Dmitry Polyakov Received: via spool by 46378-submit@debbugs.gnu.org id=B46378.161279350231926 (code B ref 46378); Mon, 08 Feb 2021 14:12:01 +0000 Received: (at 46378) by debbugs.gnu.org; 8 Feb 2021 14:11:42 +0000 Received: from localhost ([127.0.0.1]:50182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l97GJ-0008Ij-0Z for submit@debbugs.gnu.org; Mon, 08 Feb 2021 09:11:42 -0500 Received: from liltechdude.xyz ([136.244.109.117]:55848 helo=mail.liltechdude.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l97GF-0008IZ-AM for 46378@debbugs.gnu.org; Mon, 08 Feb 2021 09:11:34 -0500 Received: from localhost.localdomain (unknown [188.43.12.45]) by mail.liltechdude.xyz (Postfix) with ESMTPSA id 6FE572F2293; Mon, 8 Feb 2021 14:11:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=liltechdude.xyz; s=mail; t=1612793489; bh=Gj/hS+EVN430ZH5ETh33Q3JhScylgWyngPxtsgSkAe8=; h=From:To:Cc:Subject:Date:From; b=mqRp8S7RRfGEaWHQ4cqksXab3Ib8o1rP5efEYwuDly4O9NcEpQWchenHa5pEmA0FV wX6kwfXZQWfqS5PdCXoQiU6/ZxXHAdnMCTODbEllXsEwB+HiKrShBKk+ALlEjvlnlv Kx3JcV6OCsefT9CFX7odhOWMpPw8OQJsQ3fIEOWqg4Ht5dtJWkL4Hh1mM/hTmu7Va5 i3NdmdKlHiIb3XQG/vzy+FpcOqNPHTfa0JFWucJT6MxUEC0dKp41B/d7Nz5396d7hc 4Asn5ebvN9YFJFrxjzFysnPLRUHky8Q31n3w1gWVtTwxbWtO85OJaJA1RK3EkI58yJ Qmtwc8rvB7MSw== From: polyakov@liltechdude.xyz Date: Mon, 8 Feb 2021 09:11:20 -0500 Message-Id: <20210208141120.9184-1-polyakov@liltechdude.xyz> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Mon, 08 Feb 2021 09:30:20 -0500 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 X-Migadu-Spam-Score: -0.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=liltechdude.xyz header.s=mail header.b=mqRp8S7R; dmarc=fail reason="SPF not aligned (relaxed)" header.from=liltechdude.xyz (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: 15B4F940439 X-Spam-Score: -0.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1qtrxoEE8U60 From: Dmitry Polyakov * gnu/local.mk (instead): New variable. * gnu/packages/patches/instead-use-games-path.patch: Patch for engine that enable set game directory location in environment. --- gnu/local.mk | 2 + gnu/packages/game-development.scm | 53 +++++++++++++++++++ .../patches/instead-use-games-path.patch | 28 ++++++++++ 3 files changed, 83 insertions(+) create mode 100644 gnu/packages/patches/instead-use-games-path.patch diff --git a/gnu/local.mk b/gnu/local.mk index b9b4b66..923231f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -40,6 +40,7 @@ # Copyright © 2020 Malte Frank Gerdes # Copyright © 2020 Vinicius Monego # Copyright © 2021 Björn Höfling +# Copyright © 2021 Dmitry Polyakov # # This file is part of GNU Guix. # @@ -1187,6 +1188,7 @@ dist_patch_DATA = \ %D%/packages/patches/ilmbase-fix-tests.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/intel-xed-fix-nondeterminism.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ %D%/packages/patches/iputils-libcap-compat.patch \ diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 92c3da9..018d946 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2020 Nicolas Goaziou ;;; Copyright © 2020 Timotej Lazar ;;; Copyright © 2020 Giacomo Leidi +;;; Copyright © 2021 Dmitry Polyakov ;;; ;;; This file is part of GNU Guix. ;;; @@ -1961,6 +1962,58 @@ all modern computing platforms. Each library component is fairly independent of the others") (license license:lgpl2.0+))) +(define-public instead + (package + (name "instead") + (version "3.3.2") + (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 "014wfz5z5x72rhnakczpgfyw8s6bq510bxfmn4gv66jahkh4b65f")) + (patches + (search-patches + "instead-use-games-path.patch")))) + (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)) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("sdl2-images" ,sdl2-image) + ("sdl2-ttf" ,sdl2-ttf) + ("lua" ,lua) + ("sdl2-mixer" ,sdl2-mixer) + ("luajit" ,luajit) + ("gtk+",gtk+))) + (home-page "https://instead3.syscall.ru/") + (synopsis "Text adventure interpreter") + (description "The interpreter of STEAD (Simple Text Adventures) allows one +to play games that combine visual novels, text adventures and classic quests +of 1990-s. The STEAD games features are: +@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") + (license (list license:gpl2 license:zlib)) + (native-search-paths + (list (search-path-specification + (variable "INSTEAD_GAMES_PATH") + (separator #f) ;single entry + (files '("share/instead/games"))))))) + (define-public ioquake3 ;; We follow master since it seems that there won't be releases after 1.3.6. (let ((commit "95b9cab4d644fa3bf757cfff821cc4f7d76e38b0")) 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..e081506 --- /dev/null +++ b/gnu/packages/patches/instead-use-games-path.patch @@ -0,0 +1,28 @@ +From eba79afc957b9dc89cfd5c21434bd8ad5e0363bb Mon Sep 17 00:00:00 2001 +From: Dmitry Polyakov +Date: Wed, 3 Feb 2021 14:33:37 -0500 +Subject: [PATCH] add support to get game directory location from environent + +--- + src/main.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/main.c b/src/main.c +index 9e6e2c3b..860bd3aa 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -366,6 +366,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.30.0 -- 2.30.0