attempting to package MegaZeux

  • Open
  • quality assurance status badge
Details
2 participants
  • Leo Prikler
  • vidak
Owner
unassigned
Submitted by
vidak
Severity
normal
V
V
vidak wrote on 2 Apr 2021 02:08
(address . bug-guix@gnu.org)
041db42609a80eb872e3dc3b016922ec@riseup.net
Hello!

I am attempting to package this piece of software:


However I am having issues understanding exactly how to deal with its
non-standard build process.

I have attached the work I have already done to this email.

Could anyone help me understand where I am going wrong?

Thanks so much for your time (:

~vidak

@vidak@awkward.company
(define-module (gnu packages megazeux) #:use-module (ice-9 match) #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (gnu packages autotools) #:use-module (gnu packages build-tools) #:use-module (gnu packages xiph) #:use-module (gnu packages game-development) #:use-module (gnu packages image) #:use-module (gnu packages sdl) #:use-module (gnu packages pkg-config)) (define-public megazeux (let ((commit "eb04c509c80f42af331bb1aa0bde7b31df4dd28e") (revision "1")) (package (name "megazeux") (version (git-version "2.92f" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/AliceLR/megazeux/") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "15zbqwyi34m810njylfahgbr2w0sswqbb632vrgr9yd1aayzg9pj")) (modules '((guix build utils))))) (build-system gnu-build-s) (outputs '("out" "debug")) (arguments `(#:tests? #f #:modules ((guix build utils)) #:configure-flags '("--platform unix") #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")) "CC=gcc") #:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs (configure-flags '()) #:allow-other-keys) (apply invoke "./config.sh" configure-flags))) ))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("libpng" ,libpng) ("libogg" ,libogg) ("libvorbis" ,libvorbis) ("sdl2" ,sdl2))) (home-page "https://www.digitalmzx.com/") (synopsis "The MegaZeux game creation system.") (description "MegaZeux is a game creation system (GCS) created by game developer Alexis Janson in 1994. Originally a DOS program, in 2005 a multi-platform port was released by Exophase.") (license license:gpl2)))) megazeux
L
L
Leo Prikler wrote on 3 Apr 2021 00:59
9f453321acdbcfff004654d9b5675df16a4ac068.camel@student.tugraz.at
Am Donnerstag, den 01.04.2021, 17:08 -0700 schrieb vidak@riseup.net:
Toggle quote (12 lines)
> Hello!
>
> I am attempting to package this piece of software:
>
> https://github.com/AliceLR/megazeux
>
> However I am having issues understanding exactly how to deal with its
> non-standard build process.
>
> I have attached the work I have already done to this email.
>
> Could anyone help me understand where I am going wrong?
The original issue was, that you weren't splitting your arguments
correctly. (list "argument with spaces") counts as a single argument,
not three. After adjusting that, I encountered some additional errors
coming from the build system/missing inputs and fixed those up as well,
getting the package into a state in which it at least builds and tests.

Toggle quote (1 lines)
> Thanks so much for your time (:
You're welcome. I've attached a patch, that contains my fixes, which
should apply cleanly to guix master. It mostly follows Guix coding
standards, but it noticeably falls short in the description. I haven't
found anything, that's useful. Is there a way of describing this
package in terms of its features?

Toggle quote (1 lines)
That's a nice domain to have reserved ;)

Regards,
Leo
From 4667217092ae9a058a5b370295c6b913671819a4 Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Sat, 3 Apr 2021 00:45:51 +0200
Subject: [PATCH] gnu: Add megazeux.

* gnu/packages/game-development.scm (megazeux): New variable.
---
gnu/packages/game-development.scm | 55 +++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)

Toggle diff (68 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index ea879568f5..f9b015be11 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1496,6 +1496,61 @@ robust and compatible with many systems and operating systems.")
(home-page "https://github.com/wgois/OIS")
(license license:zlib)))
+(define-public megazeux
+ (package
+ (name "megazeux")
+ (version "2.92f")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AliceLR/megazeux/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rlw2ijx5gvk09gwpl7p8vnvff6mfw3c4nbiyvw0mccbjf1zfajn"))
+ (modules '((guix build utils)))))
+ (build-system gnu-build-system)
+ (outputs '("out" "debug"))
+ (arguments
+ `(#:test-target "test"
+ #:configure-flags
+ (list "--platform" "unix"
+ "--prefix" (assoc-ref %outputs "out")
+ "--sysconfdir" (string-append (assoc-ref %outputs "out") "/etc"))
+ #:make-flags
+ (list (string-append "CC=" ,(cc-for-target)))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs (configure-flags '()) #:allow-other-keys)
+ (apply invoke "./config.sh" configure-flags)))
+ (add-before 'check 'setup-tests
+ (lambda _
+ ;; Fake a terminal for the test cases.
+ (setenv "TERM" "xterm-256color")
+ ;; Also run an X server, because why not?
+ (setenv "DISPLAY" ":1")
+ (system "Xvfb :1 &")
+ #t))
+ )))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("ncurses" ,ncurses) ; for tput
+ ("procps" ,procps)
+ ("xorg-server" ,xorg-server-for-tests)))
+ (inputs
+ `(("libpng" ,libpng)
+ ("libogg" ,libogg)
+ ("libvorbis" ,libvorbis)
+ ("sdl2" ,sdl2)))
+ (home-page "https://www.digitalmzx.com/")
+ (synopsis "Game Creation System")
+ (description "MegaZeux is a game creation system (GCS) created by game
+developer Alexis Janson in 1994. Originally a DOS program, in 2005 a
+multi-platform port was released by Exophase.")
+ (license license:gpl2+)))
+
(define-public mygui
(package
(name "mygui")
--
2.31.1
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 47557@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 47557
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch