unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Langlois <pierre.langlois@gmx.com>
To: 35364@debbugs.gnu.org
Subject: [bug#35364] [PATCH 2/2] gnu: supertuxkart: Simplify unbundling and unbundle enet.
Date: Sun, 21 Apr 2019 19:09:48 +0100	[thread overview]
Message-ID: <20190421180948.27338-2-pierre.langlois@gmx.com> (raw)
In-Reply-To: <20190421180948.27338-1-pierre.langlois@gmx.com>

* gnu/packages/games.scm (supertuxkart)[source](snippet): Delete "lib/enet".
Remove "CMakeList.txt" substitution.
[arguments]<#:configure-flags>: Add "-DUSER_SYSTEM_GLEW=TRUE" and
"-DUSE_SYSTEM_ENET=TRUE".
<#:phases>: Delete.
---
 gnu/packages/games.scm | 42 ++++++++++++------------------------------
 1 file changed, 12 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 0ca3cdcf8c..6a782b27e9 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2130,50 +2130,31 @@ This game is based on the GPL version of the famous game TuxRacer.")
        (snippet
         ;; Delete bundled library sources
         '(begin
-           ;; FIXME: try to unbundle enet, and angelscript
+           ;; Supertuxkart uses modified versions of the Irrlicht engine
+           ;; and the bullet library.  The developers gave an explanation
+           ;; here: http://forum.freegamedev.net/viewtopic.php?f=17&t=3906
+           ;; FIXME: try to unbundle angelscript
            (for-each delete-file-recursively
                      '("lib/zlib"
                        "lib/libpng"
                        "lib/jpeglib"
                        "lib/glew"
-                       "lib/wiiuse"))
-           (substitute* "CMakeLists.txt"
-             ;; Supertuxkart uses modified versions of the Irrlicht engine
-             ;; and the bullet library.  The developers gave an explanation here:
-             ;; http://forum.freegamedev.net/viewtopic.php?f=17&t=3906
-             (("add_subdirectory\\(.*/(glew|zlib)\"\\)") ""))
+                       "lib/wiiuse"
+                       "lib/enet"))
            #t))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f ; no check target
        #:configure-flags
        (list "-DUSE_WIIUSE=0"
-             ;; Do not use the bundled zlib
+             ;; Do not use the bundled zlib, glew and enet.
              "-DNO_IRR_COMPILE_WITH_ZLIB_=TRUE"
+             "-DUSE_SYSTEM_GLEW=TRUE"
+             "-DUSE_SYSTEM_ENET=TRUE"
              ;; FIXME: needs libopenglrecorder
              "-DBUILD_RECORDER=0"
              ;; Irrlicht returns an integer instead of a boolean
-             "-DCMAKE_C_FLAGS=-fpermissive")
-       #:phases
-       (modify-phases %standard-phases
-         ;; see https://github.com/supertuxkart/stk-code/issues/3557
-         (add-after 'unpack 'patch-for-mesa-18.3
-           (lambda _
-             (substitute* "src/graphics/gl_headers.hpp"
-               (("#if !defined\\(USE_GLES2\\)")
-                "#if !defined(USE_GLES2)\n#   define __gl_glext_h_"))
-             #t))
-         (add-after 'unpack 'unbundle
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "CMakeLists.txt"
-               (("glew")
-                (string-append (assoc-ref inputs "glew")
-                               "/lib/libGLEW.a"))
-               (("include_directories\\(\"\\$\\{PROJECT_SOURCE_DIR\\}/lib/glew/include\"\\)")
-                (string-append "include_directories(\""
-                               (assoc-ref inputs "glew")
-                               "/include\")")))
-             #t)))))
+             "-DCMAKE_C_FLAGS=-fpermissive")))
     (inputs
      `(("glew" ,glew)
        ("zlib" ,zlib)
@@ -2188,7 +2169,8 @@ This game is based on the GPL version of the famous game TuxRacer.")
        ;; The following input is needed to build the bundled and modified
        ;; version of irrlicht.
        ("libjpeg" ,libjpeg)
-       ("openssl" ,openssl)))
+       ("openssl" ,openssl)
+       ("enet" ,enet)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (home-page "https://supertuxkart.net/")
--
2.21.0

  reply	other threads:[~2019-04-21 18:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-21 18:01 [bug#35364] [PATCH 0/2] gnu: supertuxkart: Update to 1.0 Pierre Langlois
2019-04-21 18:09 ` [bug#35364] [PATCH 1/2] " Pierre Langlois
2019-04-21 18:09   ` Pierre Langlois [this message]
2019-04-21 22:03 ` bug#35364: [PATCH 0/2] " Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190421180948.27338-2-pierre.langlois@gmx.com \
    --to=pierre.langlois@gmx.com \
    --cc=35364@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).