* [bug#40440] [PATCH 2/3] gnu: Add mruby-zest.
@ 2020-04-04 21:10 Alexandros Theodotou
2020-04-14 18:41 ` Christopher Baines
0 siblings, 1 reply; 3+ messages in thread
From: Alexandros Theodotou @ 2020-04-04 21:10 UTC (permalink / raw)
To: 40440
[-- Attachment #1.1: Type: text/plain, Size: 173 bytes --]
Hi,
This patch adds mruby-zest, a dependency of zynfusion. I had some help
from the developer for making it build without connecting to the
internet.
Thanks,
Alex
[-- Attachment #1.2: 0002-gnu-Add-mruby-zest.patch --]
[-- Type: text/x-patch, Size: 5228 bytes --]
From fd6550f32f534591cb6aba4b9575bae405bc1094 Mon Sep 17 00:00:00 2001
From: Alexandros Theodotou <alex@zrythm.org>
Date: Sat, 4 Apr 2020 22:03:31 +0100
Subject: [PATCH 2/3] gnu: Add mruby-zest.
* gnu/packages/audio.scm (mruby-zest): New variable.
---
gnu/packages/audio.scm | 93 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index f368fedee7..99f3737ed2 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -66,6 +66,7 @@
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
+ #:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gnunet) ; libmicrohttpd
@@ -75,6 +76,7 @@
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages libbsd)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
@@ -93,6 +95,7 @@
#:use-module (gnu packages qt)
#:use-module (gnu packages rdf)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages ruby)
#:use-module (gnu packages sdl)
#:use-module (gnu packages serialization)
#:use-module (gnu packages telephony)
@@ -4160,3 +4163,93 @@ minimum.")
`(("librsvg" ,librsvg)
,@(package-inputs ztoolkit)))
(synopsis "ZToolkit with SVG support")))
+
+(define-public mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.5-ba39aabd")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ ;; this is a meta repo that packs the mruby dependencies
+ ;; as submodules
+ (url "https://github.com/mruby-zest/mruby-zest-build.git")
+ ;; ghaction branch - suggested by the developer to avoid
+ ;; automatic downloading of some unneeded and
+ ;; hard-to-package dependencies used for debugging
+ (commit "ba39aabd8d4ddc5f14137083b6f9a96c536f5f12")
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1vqzdds30sr982dp7fclg4r19l44rv8pbz6h4a8vcginj494gvjn"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no check target
+ #:make-flags
+ (list (string-append "CC=gcc"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'use-installed-libuv
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((libuv (assoc-ref inputs "libuv-static")))
+ (copy-file (string-append libuv "/lib/libuv.a")
+ "deps/libuv.a")
+ (substitute* "Makefile"
+ (("\\.\\./\\.\\./deps/\\$\\(UV_DIR\\)/include")
+ (string-append libuv "/include")))
+ (substitute* "Makefile"
+ (("\\./deps/\\$\\(UV_DIR\\)/\\.libs/libuv\\.a")
+ (string-append libuv "/lib/libuv.a"))))))
+ (add-after 'unpack 'disable-unused-deps
+ (lambda _
+ (substitute* "build_config.rb"
+ (("conf\\.gem 'deps/mruby-file-stat'")
+ "#"))
+ (substitute* "deps/mruby-dir-glob/mrbgem.rake"
+ (("spec\\.add_dependency 'mruby-file-stat'")
+ "#"))
+ #t))
+ (replace 'configure
+ (lambda _
+ (invoke "make" "builddep")))
+ (add-before 'install 'pack
+ (lambda _
+ (setenv "CC" "gcc")
+ (invoke "make" "pack")))
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib/zynfusion")))
+ (mkdir-p lib)
+ (copy-recursively "package" lib)
+ #t)))
+ (add-after 'install 'rename-to-zyn-fusion
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (lib (string-append out "/lib/zynfusion")))
+ (rename-file (string-append lib "/zest")
+ ;; zynfusion expects this name
+ (string-append lib "/zyn-fusion"))
+ #t))))))
+ (inputs
+ `(("libx11" ,libx11)
+ ("cairo" ,cairo)
+ ("mesa" ,mesa)
+ ("libuv-static" ,libuv-static)
+ ("ruby" ,ruby)
+ ("mruby" ,mruby)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("bison" ,bison)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("python-2" ,python-2)))
+ (home-page "https://github.com/mruby-zest/mruby-zest")
+ (synopsis "Widget classes for ZynFusion")
+ (description
+ "MRuby-Zest is a set of widgets needed to create the 'ZynFusion'
+user interface of ZynAddSubFX.")
+ (license license:lgpl2.1+)))
--
2.26.0
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#40440] [PATCH 2/3] gnu: Add mruby-zest.
2020-04-04 21:10 [bug#40440] [PATCH 2/3] gnu: Add mruby-zest Alexandros Theodotou
@ 2020-04-14 18:41 ` Christopher Baines
2020-04-14 18:48 ` Alexandros Theodotou
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Baines @ 2020-04-14 18:41 UTC (permalink / raw)
To: Alexandros Theodotou; +Cc: 40440
[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]
Alexandros Theodotou <alex@zrythm.org> writes:
> This patch adds mruby-zest, a dependency of zynfusion. I had some help
> from the developer for making it build without connecting to the
> internet.
Hey Alex,
Thanks for taking the time to package mruby-zest.
> +(define-public mruby-zest
> + (package
> + (name "mruby-zest")
> + (version "3.0.5-ba39aabd")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + ;; this is a meta repo that packs the mruby dependencies
> + ;; as submodules
> + (url "https://github.com/mruby-zest/mruby-zest-build.git")
> + ;; ghaction branch - suggested by the developer to avoid
> + ;; automatic downloading of some unneeded and
> + ;; hard-to-package dependencies used for debugging
> + (commit "ba39aabd8d4ddc5f14137083b6f9a96c536f5f12")
> + (recursive? #t)))
So I spotted the use of a "deps" directory, which is a bad sign, as
dependencies should be other packages, not things as part of this
package.
I then spotted that the source for this package isn't the upstream Git
repository, but a Git repository that pulls together the mruby-zest
source code, with code from ~16 other Git repositories.
Would it be possible to create Guix packages for these dependencies?
I know that would involve quite a bit of work, but unfortunately that
kind of work is necessary to ensure Guix as a collection of packages can
be maintained in the long term.
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1vqzdds30sr982dp7fclg4r19l44rv8pbz6h4a8vcginj494gvjn"))))
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [bug#40440] [PATCH 2/3] gnu: Add mruby-zest.
2020-04-14 18:41 ` Christopher Baines
@ 2020-04-14 18:48 ` Alexandros Theodotou
0 siblings, 0 replies; 3+ messages in thread
From: Alexandros Theodotou @ 2020-04-14 18:48 UTC (permalink / raw)
To: Christopher Baines; +Cc: 40440
[-- Attachment #1: Type: text/plain, Size: 2241 bytes --]
Hi Christopher,
Thanks for the review.
It would indeed be best to package each dependency first, but I don't
really have time to package all those dependencies, and I also don't
have much knowledge about ruby. If someone else is willing to do it,
please go ahead.
Thanks,
Alex
On Tue, 2020-04-14 at 19:41 +0100, Christopher Baines wrote:
> Alexandros Theodotou <alex@zrythm.org> writes:
>
> > This patch adds mruby-zest, a dependency of zynfusion. I had some
> > help
> > from the developer for making it build without connecting to the
> > internet.
>
> Hey Alex,
>
> Thanks for taking the time to package mruby-zest.
>
> > +(define-public mruby-zest
> > + (package
> > + (name "mruby-zest")
> > + (version "3.0.5-ba39aabd")
> > + (source
> > + (origin
> > + (method git-fetch)
> > + (uri (git-reference
> > + ;; this is a meta repo that packs the mruby
> > dependencies
> > + ;; as submodules
> > + (url "
> > https://github.com/mruby-zest/mruby-zest-build.git")
> > + ;; ghaction branch - suggested by the developer to
> > avoid
> > + ;; automatic downloading of some unneeded and
> > + ;; hard-to-package dependencies used for debugging
> > + (commit "ba39aabd8d4ddc5f14137083b6f9a96c536f5f12"
> > )
> > + (recursive? #t)))
>
> So I spotted the use of a "deps" directory, which is a bad sign, as
> dependencies should be other packages, not things as part of this
> package.
>
> I then spotted that the source for this package isn't the upstream
> Git
> repository, but a Git repository that pulls together the mruby-zest
> source code, with code from ~16 other Git repositories.
>
> Would it be possible to create Guix packages for these dependencies?
>
> I know that would involve quite a bit of work, but unfortunately that
> kind of work is necessary to ensure Guix as a collection of packages
> can
> be maintained in the long term.
>
> > + (file-name (git-file-name name version))
> > + (sha256
> > + (base32
> > + "1vqzdds30sr982dp7fclg4r19l44rv8pbz6h4a8vcginj494gvjn"))
> > ))
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-14 18:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 21:10 [bug#40440] [PATCH 2/3] gnu: Add mruby-zest Alexandros Theodotou
2020-04-14 18:41 ` Christopher Baines
2020-04-14 18:48 ` Alexandros Theodotou
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).