unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add chromium-bsu.
@ 2016-06-21 13:59 Kei Kebreau
  2016-06-21 21:44 ` Leo Famulari
  0 siblings, 1 reply; 4+ messages in thread
From: Kei Kebreau @ 2016-06-21 13:59 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 159 bytes --]


This is a patch for another game that uses quesoglc as a
dependency. It is a simple and quick build, but I still prefer to get a
review in case of odd bugs.


[-- Attachment #1.2: Chromium B.S.U. patch --]
[-- Type: text/plain, Size: 2475 bytes --]

From a71620d13bc3a8605f56bb11e8e3202687c379ba Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kei@openmailbox.org>
Date: Tue, 21 Jun 2016 09:54:37 -0400
Subject: [PATCH] gnu: Add chromium-bsu.

* gnu/packages/games (chromium-bsu): New variable.
---
 gnu/packages/games.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4141d5e..6d0a017 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2447,3 +2447,40 @@ tactics.")
                    license:expat
                    license:gpl2+
                    license:lgpl2.1+))))
+
+(define-public chromium-bsu
+  (package
+    (name "chromium-bsu")
+    (version "0.9.15.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/" name
+                                  "/Chromium B.S.U. source code/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "01c4mki0rpz6wrqbf18fj4vd7axln5v0xqm80cyksbv63g04s6w6"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'set-paths 'set-sdl-paths
+                             (lambda* (#:key inputs #:allow-other-keys)
+                               (setenv "CPATH"
+                                       (string-append (assoc-ref inputs "sdl-union")
+                                                      "/include/SDL"))
+                               #t)))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs `(("freeglut" ,freeglut)
+              ("glu" ,glu)
+              ("quesoglc" ,quesoglc)
+              ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))))
+    (home-page "http://chromium-bsu.sourceforge.net/")
+    (synopsis "Fast-paced, arcade-style, top-scrolling space shooter")
+    (description
+     "In this game you are the captain of the cargo ship Chromium B.S.U. and
+are responsible for delivering supplies to the troops on the front line.  Your
+ship has a small fleet of robotic fighters which you control from the relative
+safety of the Chromium vessel.")
+    ;; Clarified Artistic License for everything but sound, which is covered
+    ;; by the Expat License.
+    (license (list license:clarified-artistic license:expat))))
-- 
2.8.3


[-- Attachment #1.3: Type: text/plain, Size: 46 bytes --]


-- 
Kei (GPG Key: 4096R/E6A5EE3C19467A0D)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: Add chromium-bsu.
  2016-06-21 13:59 [PATCH] gnu: Add chromium-bsu Kei Kebreau
@ 2016-06-21 21:44 ` Leo Famulari
  2016-06-22  1:07   ` Kei Kebreau
  2016-06-22  8:24   ` Alex Kost
  0 siblings, 2 replies; 4+ messages in thread
From: Leo Famulari @ 2016-06-21 21:44 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: guix-devel

On Tue, Jun 21, 2016 at 09:59:31AM -0400, Kei Kebreau wrote:
> * gnu/packages/games (chromium-bsu): New variable.

> +    (arguments
> +     `(#:phases (modify-phases %standard-phases
> +                  (add-after 'set-paths 'set-sdl-paths
> +                             (lambda* (#:key inputs #:allow-other-keys)
> +                               (setenv "CPATH"
> +                                       (string-append (assoc-ref inputs "sdl-union")
> +                                                      "/include/SDL"))
> +                               #t)))))

If you move (modify-phases) underneath #:phases, then this will be
comfortably shorter than 80 characters :)

> +    (native-inputs `(("pkg-config" ,pkg-config)))
> +    (inputs `(("freeglut" ,freeglut)
> +              ("glu" ,glu)
> +              ("quesoglc" ,quesoglc)
> +              ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))))

The output doesn't refer to freeglut. I wonder if it should be
native, propagated, or if it's not needed, etc?

I ran the game on GuixSD, and it did work, although it was much slower
than on my Debian system. I don't know if that was merely a consequence
of the GuixSD system using much older hardware, or if it's related to
the missing reference to freeglut.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: Add chromium-bsu.
  2016-06-21 21:44 ` Leo Famulari
@ 2016-06-22  1:07   ` Kei Kebreau
  2016-06-22  8:24   ` Alex Kost
  1 sibling, 0 replies; 4+ messages in thread
From: Kei Kebreau @ 2016-06-22  1:07 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 1620 bytes --]

Leo Famulari <leo@famulari.name> writes:

> On Tue, Jun 21, 2016 at 09:59:31AM -0400, Kei Kebreau wrote:
>> * gnu/packages/games (chromium-bsu): New variable.
>
>> +    (arguments
>> +     `(#:phases (modify-phases %standard-phases
>> +                  (add-after 'set-paths 'set-sdl-paths
>> +                             (lambda* (#:key inputs #:allow-other-keys)
>> +                               (setenv "CPATH"
>> +                                       (string-append (assoc-ref inputs "sdl-union")
>> +                                                      "/include/SDL"))
>> +                               #t)))))
>
> If you move (modify-phases) underneath #:phases, then this will be
> comfortably shorter than 80 characters :)
>
>> +    (native-inputs `(("pkg-config" ,pkg-config)))
>> +    (inputs `(("freeglut" ,freeglut)
>> +              ("glu" ,glu)
>> +              ("quesoglc" ,quesoglc)
>> +              ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))))
>
> The output doesn't refer to freeglut. I wonder if it should be
> native, propagated, or if it's not needed, etc?
>
> I ran the game on GuixSD, and it did work, although it was much slower
> than on my Debian system. I don't know if that was merely a consequence
> of the GuixSD system using much older hardware, or if it's related to
> the missing reference to freeglut.

The freeglut library is not needed. I mistakenly left out pkg-config in
an earlier build and added it because Chromium B.S.U. complained of a
missing glut library. A corrected patch is attached. (Also, I noticed no
speed difference between the two builds.)

[-- Attachment #1.2: Fixed patch. --]
[-- Type: text/plain, Size: 2439 bytes --]

From c1075872bba7ea3150c13ab7983ffd6b48bae4ad Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kei@openmailbox.org>
Date: Tue, 21 Jun 2016 20:52:24 -0400
Subject: [PATCH] gnu: Add chromium-bsu.

* gnu/packages/games.scm (chromium-bsu): New variable.
---
 gnu/packages/games.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4141d5e..9ec8e8e 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2447,3 +2447,39 @@ tactics.")
                    license:expat
                    license:gpl2+
                    license:lgpl2.1+))))
+
+(define-public chromium-bsu
+  (package
+    (name "chromium-bsu")
+    (version "0.9.15.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/" name
+                                  "/Chromium B.S.U. source code/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "01c4mki0rpz6wrqbf18fj4vd7axln5v0xqm80cyksbv63g04s6w6"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'set-paths 'set-sdl-paths
+                             (lambda* (#:key inputs #:allow-other-keys)
+                               (setenv "CPATH"
+                                       (string-append (assoc-ref inputs "sdl-union")
+                                                      "/include/SDL"))
+                               #t)))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs `(("glu" ,glu)
+              ("quesoglc" ,quesoglc)
+              ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))))
+    (home-page "http://chromium-bsu.sourceforge.net/")
+    (synopsis "Fast-paced, arcade-style, top-scrolling space shooter")
+    (description
+     "In this game you are the captain of the cargo ship Chromium B.S.U. and
+are responsible for delivering supplies to the troops on the front line.  Your
+ship has a small fleet of robotic fighters which you control from the relative
+safety of the Chromium vessel.")
+    ;; Clarified Artistic License for everything but sound, which is covered
+    ;; by the Expat License.
+    (license (list license:clarified-artistic license:expat))))
-- 
2.8.3


[-- Attachment #1.3: Type: text/plain, Size: 46 bytes --]


-- 
Kei (GPG Key: 4096R/E6A5EE3C19467A0D)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: Add chromium-bsu.
  2016-06-21 21:44 ` Leo Famulari
  2016-06-22  1:07   ` Kei Kebreau
@ 2016-06-22  8:24   ` Alex Kost
  1 sibling, 0 replies; 4+ messages in thread
From: Alex Kost @ 2016-06-22  8:24 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari (2016-06-22 00:44 +0300) wrote:

> On Tue, Jun 21, 2016 at 09:59:31AM -0400, Kei Kebreau wrote:
>> * gnu/packages/games (chromium-bsu): New variable.
>
>> +    (arguments
>> +     `(#:phases (modify-phases %standard-phases
>> +                  (add-after 'set-paths 'set-sdl-paths
>> +                             (lambda* (#:key inputs #:allow-other-keys)
>> +                               (setenv "CPATH"
>> +                                       (string-append (assoc-ref inputs "sdl-union")
>> +                                                      "/include/SDL"))
>> +                               #t)))))
>
> If you move (modify-phases) underneath #:phases, then this will be
> comfortably shorter than 80 characters :)

I agree with Leo, I would also reformat it like this:

  (arguments
   `(#:phases
     (modify-phases %standard-phases
       (add-after 'set-paths 'set-sdl-paths
         (lambda* (#:key inputs #:allow-other-keys)
           (setenv "CPATH"
                   (string-append (assoc-ref inputs "sdl-union")
                                  "/include/SDL"))
           #t)))))

-- 
Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-22  8:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-21 13:59 [PATCH] gnu: Add chromium-bsu Kei Kebreau
2016-06-21 21:44 ` Leo Famulari
2016-06-22  1:07   ` Kei Kebreau
2016-06-22  8:24   ` Alex Kost

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).