unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Adam Van Ymeren <adam@vany.ca>
To: 27950@debbugs.gnu.org
Subject: [bug#27950] [PATCH] Add The Ur-Quan Masters
Date: Fri, 04 Aug 2017 09:33:36 -0400	[thread overview]
Message-ID: <877eyja24v.fsf@vany.ca> (raw)


This is my first package so obviously comments are welcome.  This
package only contains the engine.  The data files are distributed as a
few separate archives.  According to their wiki the data files are
available under a free(ish) license (CC BY-NC-SA 2.5).  A few separate
packages will have to be made for those I guess?  I'm not sure how to
include multiple source files in a single package, if this is even
supported.

UQM uses a pretty custom looking build system so I had to replace all
phases of the build, but it appears to work now.  After installation the
games starts and the dies complaining about missing data files.

---
 gnu/packages/games.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 2dec9a395..08f99cf61 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4579,3 +4579,56 @@ computer-hosted roleplaying games.  This is the last version released by
 Crowther & Woods, its original authors, in 1995.  It has been known as
 \"adventure 2.5\" and \"430-point adventure\".")
       (license license:bsd-2))))
+
+(define-public uqm
+  (package
+   (name "uqm")
+   (version "0.7.0")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "mirror://sourceforge/sc2/UQM/0.7/"
+                                name "-" version "-source.tgz"))
+            (sha256
+             (base32
+              "08dj7fsvflxx69an6vpf3wx050mk0ycmdv401yffrrqbgxgmqsd3"))))
+   (build-system gnu-build-system)
+   (arguments
+    '(#:tests? #f
+      #:phases
+      (modify-phases %standard-phases
+        (add-after 'patch-source-shebangs 'patch-build-config
+          (lambda* (#:key outputs #:allow-other-keys)
+            (substitute* "build/unix/build.config"
+              (("/usr/local/games") (assoc-ref outputs "out")))))
+        (add-after 'set-paths 'set-sdl-paths
+          (lambda* (#:key inputs #:allow-other-keys)
+            (setenv "CPATH"
+                    (string-append (assoc-ref inputs "sdl-union")
+                                   "/include/SDL"))))
+        (replace 'configure
+          (lambda _
+            (setenv "SH" (which "sh"))
+            (zero? (system* "sh" "build.sh" "uqm" "config"))))
+        (replace 'build
+          (lambda _
+            (zero? (system* "sh" "build.sh" "uqm"))))
+        (replace 'install
+          (lambda _
+            (zero? (system* "sh" "build.sh" "uqm" "install")))))))
+   (inputs
+    `(("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))
+      ("glu" ,glu)
+      ("libvorbis" ,libvorbis)
+      ("libogg" ,libogg)
+      ("libmikmod" ,libmikmod)))
+   (native-inputs
+    `(("mesa" ,mesa)
+      ("pkg-config" ,pkg-config)))
+   (home-page "http://sc2.sourceforge.net/")
+   (synopsis "Port of Star Control II for modern systems")
+   (description
+    "The Ur-Quan Masters, sometimes referred to as UQM, is a port of Star
+Control II for modern personal computers and operating systems from the
+original 3DO source code released to the fan community by Toys For Bob in
+August 2002.")
+    (license license:gpl2+)))
-- 
2.13.3

             reply	other threads:[~2017-08-04 13:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04 13:33 Adam Van Ymeren [this message]
2017-08-07 21:42 ` [bug#27950] [PATCH] Add The Ur-Quan Masters Marius Bakke
2017-08-08 18:07   ` Adam Van Ymeren
2017-09-04 13:13   ` Ludovic Courtès
2017-09-06 17:31     ` Adonay Felipe Nogueira

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=877eyja24v.fsf@vany.ca \
    --to=adam@vany.ca \
    --cc=27950@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).