From patchwork Fri Feb 28 16:04:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 20467 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 1B24A27BBE4; Fri, 28 Feb 2020 16:06:56 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable 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 6AD3927BBEA for ; Fri, 28 Feb 2020 16:06:55 +0000 (GMT) Received: from localhost ([::1]:49412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7iAB-0004oV-0A for patchwork@mira.cbaines.net; Fri, 28 Feb 2020 11:06:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51591) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7i9M-0003sL-TU for guix-patches@gnu.org; Fri, 28 Feb 2020 11:06:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7i9K-0001uY-KO for guix-patches@gnu.org; Fri, 28 Feb 2020 11:06:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55952) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7i9K-0001uP-Go for guix-patches@gnu.org; Fri, 28 Feb 2020 11:06:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j7i9K-0000kt-AF for guix-patches@gnu.org; Fri, 28 Feb 2020 11:06:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39825] [PATCH] gnu: Add warsow-qfusion. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Feb 2020 16:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39825 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39825@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15829059042777 (code B ref -1); Fri, 28 Feb 2020 16:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Feb 2020 16:05:04 +0000 Received: from localhost ([127.0.0.1]:33689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7i8N-0000ij-RO for submit@debbugs.gnu.org; Fri, 28 Feb 2020 11:05:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:57915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7i8K-0000iB-83 for submit@debbugs.gnu.org; Fri, 28 Feb 2020 11:05:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51336) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7i8I-0003GB-SH for guix-patches@gnu.org; Fri, 28 Feb 2020 11:05:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7i8E-0001Ki-Qu for guix-patches@gnu.org; Fri, 28 Feb 2020 11:04:58 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:40547) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j7i8E-0001Id-IA for guix-patches@gnu.org; Fri, 28 Feb 2020 11:04:54 -0500 Received: from bababa.home (lfbn-idf2-1-1315-147.w92-169.abo.wanadoo.fr [92.169.129.147]) (Authenticated sender: mail@ambrevar.xyz) by relay12.mail.gandi.net (Postfix) with ESMTPSA id D237F20000A for ; Fri, 28 Feb 2020 16:04:51 +0000 (UTC) From: Pierre Neidhardt Date: Fri, 28 Feb 2020 17:04:51 +0100 Message-Id: <20200228160451.22644-1-mail@ambrevar.xyz> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-GND-Spam-Score: 185 X-GND-Status: SPAM X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] 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 * gnu/packages/game-development.scm (warsow-qfusion): New variable. * gnu/packages/patches/warsow-fix-bool-return-type.patch: New file. * gnu/local.mk: Add patch. --- gnu/local.mk | 1 + gnu/packages/game-development.scm | 49 +++++++++++++++++++ .../patches/warsow-fix-bool-return-type.patch | 24 +++++++++ 3 files changed, 74 insertions(+) create mode 100644 gnu/packages/patches/warsow-fix-bool-return-type.patch diff --git a/gnu/local.mk b/gnu/local.mk index 857345cfad..82d5490dd8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1482,6 +1482,7 @@ dist_patch_DATA = \ %D%/packages/patches/vsearch-unbundle-cityhash.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ + %D%/packages/patches/warsow-fix-bool-return-type.patch \ %D%/packages/patches/weasyprint-library-paths.patch \ %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 05e026a846..f0b1b5f066 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -2188,3 +2188,52 @@ rigid body physics library written in C.") developers providing an advanced true color console, input, and lots of other utilities frequently used in roguelikes.") (license license:bsd-3))) + +(define-public warsow-qfusion + (let ((commit "5ec6887887850fa9e6f0a4418ab2b776f54fb395")) + (package + (name "warsow-qfusion") + (version (git-version "2.1.0" "1" commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Warsow/qfusion/") + (commit commit) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0bfwyikpwgwqcli33hxscdp557li1hkwyxy069csx5dy6sfvci6q")) + ;; Issue reported here: https://github.com/Warsow/qfusion/issues/46 + (patches (search-patches "warsow-fix-bool-return-type.patch")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; No tests. + #:configure-flags '("-DQFUSION_GAME=Warsow") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'change-to-build-dir + (lambda _ + (chdir "source") + #t))))) + (inputs + `(("sdl2" ,sdl2) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libvorbis" ,libvorbis) + ("libogg" ,libogg) + ("libtheora" ,libtheora) + ("freetype" ,freetype) + ("mesa" ,mesa) + ("openal" ,openal) + ("zlib" ,zlib) + ("curl" ,curl) + ("qtbase" ,qtbase) + ("qtdeclarative" ,qtdeclarative) + ("uuid.h" ,util-linux))) + (home-page "https://github.com/Warsow/qfusion") + (synopsis "Warsow's fork of qfusion, the id Tech 2 derived game engine") + (description + "This package contains Warsow's fork of qfusion, the id Tech 2 derived +game engine. id Tech 2 is the engine originally behind Quake 2.") + (license license:gpl2)))) diff --git a/gnu/packages/patches/warsow-fix-bool-return-type.patch b/gnu/packages/patches/warsow-fix-bool-return-type.patch new file mode 100644 index 0000000000..cd2c58afef --- /dev/null +++ b/gnu/packages/patches/warsow-fix-bool-return-type.patch @@ -0,0 +1,24 @@ +diff --git a/source/ref/imagelib.cpp b/source/ref/imagelib.cpp +index 33337ac..bb9a156 100644 +--- a/source/ref/imagelib.cpp ++++ b/source/ref/imagelib.cpp +@@ -762,7 +762,7 @@ static void q_jpg_noop( j_decompress_ptr cinfo ) { + + static boolean q_jpg_fill_input_buffer( j_decompress_ptr cinfo ) { + Com_DPrintf( "Premature end of jpeg file\n" ); +- return 1; ++ return TRUE; + } + + static void q_jpg_skip_input_data( j_decompress_ptr cinfo, long num_bytes ) { +@@ -955,7 +955,7 @@ bool WriteJPG( const char *name, r_imginfo_t *info, int quality ) { + } + + // start compression +- qjpeg_start_compress( &cinfo, true ); ++ qjpeg_start_compress( &cinfo, TRUE ); + + // feed scanline data + w3 = cinfo.image_width * info->samples; +-- +2.25.1