From patchwork Sun Feb 16 21:53:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Giacomo Leidi X-Patchwork-Id: 20287 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A4DAA27BBE4; Sun, 16 Feb 2020 21:54:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 0B70917B9F for ; Sun, 16 Feb 2020 21:54:24 +0000 (GMT) Received: from localhost ([::1]:37092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3Rrr-0002gT-Bn for patchwork@mira.cbaines.net; Sun, 16 Feb 2020 16:54:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48823) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3RrY-0002gF-1G for guix-patches@gnu.org; Sun, 16 Feb 2020 16:54:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3RrW-00088B-Av for guix-patches@gnu.org; Sun, 16 Feb 2020 16:54:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60081) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3RrV-00087g-TD for guix-patches@gnu.org; Sun, 16 Feb 2020 16:54:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j3RrV-0000IM-Sm for guix-patches@gnu.org; Sun, 16 Feb 2020 16:54:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38687] gnu: Add libtcod. Resent-From: goodoldpaul@autistici.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 16 Feb 2020 21:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38687 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Marius Bakke Cc: 38687@debbugs.gnu.org Received: via spool by 38687-submit@debbugs.gnu.org id=B38687.15818899991084 (code B ref 38687); Sun, 16 Feb 2020 21:54:01 +0000 Received: (at 38687) by debbugs.gnu.org; 16 Feb 2020 21:53:19 +0000 Received: from localhost ([127.0.0.1]:37821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3Rqg-0000HH-Ee for submit@debbugs.gnu.org; Sun, 16 Feb 2020 16:53:19 -0500 Received: from latitanza.investici.org ([82.94.249.234]:29643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3Rqe-0000H9-Ai for 38687@debbugs.gnu.org; Sun, 16 Feb 2020 16:53:09 -0500 Received: from 1.mail-backend.investici.org (unknown [10.0.0.11]) by latitanza.investici.org (Postfix) with ESMTP id C9954120157; Sun, 16 Feb 2020 21:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1581889986; bh=DWRnfu7Bu6dfITg0j2Se5RSkZHX+gHWrF0G6vSN+hQA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GJ2gDY0qUyEqRdpqLEAXU/zYd92fw5ZTlNWJ7DAw8IxIVq8CaVLBWxO4YvjJQ6Ur3 9crGcCwACpd+GDN3OZtcUmslRoHzrWlFy6ZHPVkQDROyInwntLWf+foU6vv+F13+qC orLFw64bu2PgleegLITBsrop/mP1eaHj5lQXvK2g= Received: from 1.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: goodoldpaul@autistici.org) by 1.mail-backend.investici.org (Postfix) with ESMTPA id 9B786BEE32; Sun, 16 Feb 2020 21:53:05 +0000 (UTC) MIME-Version: 1.0 Date: Sun, 16 Feb 2020 21:53:05 +0000 From: goodoldpaul@autistici.org In-Reply-To: <87h7zy2l8y.fsf@devup.no> References: <20200206201713.8535-1-goodoldpaul@autistici.org> <20200206201713.8535-2-goodoldpaul@autistici.org> <87h7zy2l8y.fsf@devup.no> User-Agent: Roundcube Webmail Message-ID: X-Sender: goodoldpaul@autistici.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Marius, I updated the patches and upgrading lodepng led the warning from guix lint disappear so I guess it should be safe now. I'm sending an updated version. Thank you again for your patience, Giacomo From c88a0c12855c2ec82b5653ebe8137bc1245aa369 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Sun, 16 Feb 2020 22:42:42 +0100 Subject: [PATCH 2/2] gnu: Add libtcod. * gnu/packages/game-development.scm (libtcod): New variable. --- gnu/packages/game-development.scm | 74 +++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 6fa4fed74f..7241c0f8c7 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2019 Jethro Cao ;;; Copyright © 2020 Nicolas Goaziou ;;; Copyright © 2020 Timotej Lazar +;;; Copyright © 2020 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,6 +89,7 @@ #:use-module (gnu packages sphinx) #:use-module (gnu packages stb) #:use-module (gnu packages texinfo) + #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages video) #:use-module (gnu packages web) @@ -2086,3 +2088,75 @@ computer games, 3D authoring tools and simulation tools.") (description "Chipmunk is a simple, lightweight, fast and portable 2D rigid body physics library written in C.") (license license:expat))) + +(define-public libtcod + (package + (name "libtcod") + (version "1.15.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/libtcod/libtcod.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0pzr8ajmbqvh43ldjajx962xirj3rf8ayh344p6mqlrmb8gxrfr5")) + (modules '((guix build utils))) + (snippet '(begin + (delete-file-recursively "src/vendor/utf8proc") + (delete-file-recursively "src/vendor/zlib") + (delete-file "src/vendor/stb_truetype.h") + (delete-file "src/vendor/stb_sprintf.h") + (delete-file "src/vendor/lodepng.cpp") + (delete-file "src/vendor/lodepng.h") + + (substitute* "buildsys/autotools/sources.am" + (("\\.\\./\\.\\./src/vendor/lodepng\\.cpp \\\\\n") "") + (("\\.\\./\\.\\./src/vendor/stb\\.c \\\\") + "../../src/vendor/stb.c") + (("\\.\\./\\.\\./src/vendor/utf8proc/utf8proc\\.c") "")) + + (substitute* "src/libtcod/sys_sdl_img_png.cpp" + (("\\.\\./vendor/") "")) + + (substitute* '("src/libtcod/color/canvas.cpp" + "src/libtcod/sys_sdl_img_png.cpp" + "src/libtcod/tileset/truetype.cpp" + "src/libtcod/tileset/tilesheet.cpp") + (("\\.\\./\\.\\./vendor/") "")) + + (substitute* "src/libtcod/console/printing.cpp" + (("\\.\\./\\.\\./vendor/utf8proc/") "")) + #t)))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags '("--with-gnu-ld" + "LIBS=-lutf8proc -llodepng") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'change-to-build-dir + (lambda _ + (chdir "buildsys/autotools") + (patch-shebang "get_version.py") + #t))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("python" ,python) + ("pkg-config" ,pkg-config) + ("stb-sprintf" ,stb-sprintf) + ("stb-truetype" ,stb-truetype))) + (inputs + `(("lodepng" ,lodepng) + ("sdl2" ,sdl2) + ("utf8proc" ,utf8proc) + ("zlib" ,zlib))) + (home-page "https://github.com/libtcod/libtcod") + (synopsis "Library specifically designed for writing roguelikes") + (description + "libtcod is a fast, portable and uncomplicated API for roguelike +developers providing an advanced true color console, input, and lots of other +utilities frequently used in roguelikes.") + (license license:bsd-3))) -- 2.25.0