From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id sNA3ODfoUmQgLgEASxT56A (envelope-from ) for ; Thu, 04 May 2023 01:03:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 4H0FODfoUmTjpQAAauVa8A (envelope-from ) for ; Thu, 04 May 2023 01:03:19 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A67B6F0D5 for ; Thu, 4 May 2023 01:03:19 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puLV2-0000ZE-Hh; Wed, 03 May 2023 19:03:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puLV0-0000XJ-JO for guix-patches@gnu.org; Wed, 03 May 2023 19:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1puLV0-00035c-AZ for guix-patches@gnu.org; Wed, 03 May 2023 19:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1puLV0-0001Jk-5c for guix-patches@gnu.org; Wed, 03 May 2023 19:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63254] [PATCH 4/5] gnu: Add mruby-zest. References: In-Reply-To: Resent-From: Sughosha Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 May 2023 23:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63254 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "63254@debbugs.gnu.org" <63254@debbugs.gnu.org> Received: via spool by 63254-submit@debbugs.gnu.org id=B63254.16831549525022 (code B ref 63254); Wed, 03 May 2023 23:03:02 +0000 Received: (at 63254) by debbugs.gnu.org; 3 May 2023 23:02:32 +0000 Received: from localhost ([127.0.0.1]:48054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puLUV-0001Iv-CB for submit@debbugs.gnu.org; Wed, 03 May 2023 19:02:31 -0400 Received: from mail-4325.protonmail.ch ([185.70.43.25]:16199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puLUT-0001Ij-LN for 63254@debbugs.gnu.org; Wed, 03 May 2023 19:02:30 -0400 Date: Wed, 03 May 2023 23:02:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1683154943; x=1683414143; bh=FlcN0O1JruygbfCCuOQU/isMsQECH8HP6L9PeDdXuzc=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=kwu1CHeGic95UFgEbpBaLLbNA6qh8FyQehDj5mMPmdG5SbmsSPneS2UzZv/OHDRkF /AyWKxMITGPFIgl/4Sb9OPKYmmHNEMVGOiAsYETLDbRPORKI+Tyc5yPKDOpStOkjzR vB/Zr6MN89vpb1/3F+Nd5yiQq0IpcW+ag6YgVTRf7UaSCa9eQfD+dDMUCvJFoU9XbU gAJkwjwWSMXYLFSk2apIMznIjrhuv/vpcGkKzQYdtVUMgBwUwH/5FS5G+dfEQMZDxb Z3RvwPdCr6USfF0JQdB+vvNX1h3bXaauSgHe+mqpSMt/q/sKOcCe/N+3TBh7rgEiC4 xJEQRfWt4tEvQ== Message-ID: Feedback-ID: 45211691:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Sughosha X-ACL-Warn: , Sughosha via Guix-patches From: Sughosha via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683154999; a=rsa-sha256; cv=none; b=KMQgZZbe3M/OlEBJGrGA+KQv1cViRu5TSNnSjSlw7GBsQkilKfAakPuUAXgw1+swQih6KE EwH0EnLGboPj+FFekciZuQKdQkTU0GCXTbtTpmXWn5miP/J3f8ybZwevL47voNA0hJAMGj Wl0cw57TRLueXvTodRqN0vgkbtIytETB8VomQIxVzGC52dtwV3NVHVlhXrEHPwQZDdPc9M 7+iY8zUYxCEagxW8Uu6y1bssPGGy3cALQwfuWkyY6j2rZk1on2mBAklXBD7TDihvUhNhiG w/XdkvENM/XJ8ffyPDC5NaefgRnAo1YUIsazbWysYdiWSbiXEdK1sGhmPs1VHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=proton.me header.s=protonmail header.b=kwu1CHeG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683154999; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FlcN0O1JruygbfCCuOQU/isMsQECH8HP6L9PeDdXuzc=; b=OYZtdfXhuOQ4pibLIT32JwU8D4w73+hwtz86mF3KrQtqAMffdJBSm9qgMTpnLJEa3T6r6F sEAhLeaGjHmSGEJ7XuODnWARaQhvOHkUZmIhdJWKk4QH/cnaN6uNU+GmriqHKI6p5RMerg eNHuVxbI9qUTV4CF5L+Trr/AUQuvbgj1EGfSW11OsSfO166VM3YUJRbrenk+L7rVJ+utxS DlM/ic0by9G7iLU/qBQP8m+OT8NZHfV3w9tfxkqbediYe1o47rMgf8TY3ZhK3J/hbA49v8 eDUjbW0Vuo3kFKJvP1opV+HAVb5myxpGOOT6LkvY//sqlOPDV0Jf//U4NGLVZw== X-Migadu-Spam-Score: -2.71 X-Spam-Score: -2.71 X-Migadu-Queue-Id: A67B6F0D5 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=proton.me header.s=protonmail header.b=kwu1CHeG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-TUID: fdCTH5084Zqa * gnu/packages/mruby-xyz.scm: New file. * gnu/packages/local.mk: Register the file. --- gnu/local.mk | 1 + gnu/packages/mruby-xyz.scm | 176 +++++++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100644 gnu/packages/mruby-xyz.scm diff --git a/gnu/local.mk b/gnu/local.mk index aa50fc0465..6f213b2e7f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -436,6 +436,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\ %D%/packages/mpd.scm=09=09=09=09\ %D%/packages/mp3.scm=09=09=09=09\ %D%/packages/mpi.scm=09=09=09=09\ + %D%/packages/mruby-xyz.scm=09=09=09\ %D%/packages/multiprecision.scm=09=09\ %D%/packages/music.scm=09=09=09\ %D%/packages/musl.scm=09=09=09=09\ diff --git a/gnu/packages/mruby-xyz.scm b/gnu/packages/mruby-xyz.scm new file mode 100644 index 0000000000..08e7268f14 --- /dev/null +++ b/gnu/packages/mruby-xyz.scm @@ -0,0 +1,176 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2023 +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages mruby-xyz) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix utils) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages audio) + #:use-module (gnu packages bash) + #:use-module (gnu packages fonts) + #:use-module (gnu packages gl) + #:use-module (gnu packages libevent) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages ruby) + #:use-module (gnu packages xorg)) + +(define-public mruby-zest + (package + (name "mruby-zest") + (version "3.0.6") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mruby-zest/mruby-zest-build") + (commit version) + ;; Cloning recursively for the required mruby gems and= also + ;; for these packages: + ;; "mruby": for building "mruby" with the provided + ;; "build_config.rb". + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc")) + (modules '((guix build utils))) + (snippet + ;; This packages contains a custom "pugl". Replacing it wit= h the + ;; system "pugl" fails to build. + ;; Delete bundled "nanovg" and "rtosc". + '(with-directory-excursion "deps" + (for-each delete-file-recursively + (list "libuv" "nanovg" "rtosc")))))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ;no test suite + #:make-flags + #~(list (string-append "CC=3D" #$(cc-for-target)) + "CONFIG_SHELL=3Dbash") + #:phases + #~(modify-phases %standard-phases + (delete 'configure) ;no configure script + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + ;; Do not compile "nanovg" again and use system "nanovg= ". + (substitute* "Makefile" + (("cd deps/nanovg") "#cd deps/nanovg") + (("\\$\\(AR\\) rc deps/libnanovg\\.a") + "#$(AR) rc deps/libnanovg.a") + (("\\./deps/libnanovg\\.a") + "-lnanovg") + (("cd deps/libuv") "#cd deps/libuv") + (("\\./deps/libuv/\\.libs/libuv\\.a") + "-luv") + (("\\./deps/libuv/\\.libs/libuv-win\\.a") + "-luv-win")) + (substitute* "build_config.rb" + (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libnanovg\\.a") + "-lnanovg") + (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libuv\\.a") + "-luv") + (("cc\\.include_paths.*\\./deps/nanovg/.*$") + "#") + (("cc\\.include_paths.*\\./deps/libuv/.*$") + "#")) + (substitute* "deps/mruby-nanovg/src/nvg_screenshot.c" + (("\\.\\./\\.\\./nanovg/.*/stb_image_write\\.h") + (search-input-file inputs "/example/stb_image_write.h= "))) + ;; Use system "rtosc" headers. + (substitute* "src/mruby-widget-lib/src/gem.c" + (("\"\\.\\./\\.\\./\\.\\./deps/.*/rtosc\\.h\"") + "")) + ;; Fix missing fonts. + (substitute* + "src/mruby-widget-lib/mrblib/script.rb" + (("sans =3D \\[") + (string-append + "sans =3D [\"" + (search-input-file inputs + "/share/fonts/truetype/Roboto-Regular.ttf") + "\", ")) + (("bold =3D \\[") + (string-append + "bold =3D [\"" + (search-input-file inputs + "/share/fonts/truetype/Roboto-Bold.ttf") + "\", "))) + ;; Fix paths for zyn-fusion files. + (substitute* "src/osc-bridge/src/bridge.c" + (("fopen\\(\\\"schema/") + (string-append + "fopen(\"" #$output "/share/zyn-fusion/schema/"))) + (substitute* "test-libversion.c" + (("./libzest.so") + (string-append #$output "/lib/libzest.so"))) + (substitute* "src/mruby-widget-lib/src/api.c" + ((", \\\"\\./qml/") ", \"../share/zyn-fusion/qml/") + (("\\./qml/") + (string-append #$output "/share/zyn-fusion/qml"))))) + (replace 'install + (lambda _ + (rename-file "zest" "zyn-fusion") + (install-file "zyn-fusion" (string-append #$output "/bi= n")) + (install-file "libzest.so" (string-append #$output "/li= b")) + (for-each + (lambda (folder) + (for-each + (lambda (file) + (install-file file + (string-append #$output "/share/zyn-fusion/qml= "))) + (find-files folder "\\.qml$"))) + '("src/mruby-zest/qml" "src/mruby-zest/example")) + (install-file "src/osc-bridge/schema/test.json" + (string-append #$output "/share/zyn-fusion/schema")) + (install-file "completions/zyn-fusion" + (string-append + #$output "/share/bash-completion/completions"))))))) + (native-inputs + (list (package-source nanovg) ;for "stb_image_write.h" + pkg-config + ruby)) + (inputs + (list font-google-roboto + libuv + libx11 + mesa + ;; With the latest version of "nanovg" the contents are not + ;; displayed properly. + (let ((revision "0") + (commit "b83cf926525e7cea8d2483da2a75852b8c7b6d28")) + (package (inherit nanovg) + (version (git-version (package-version nanovg) revision com= mit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/memononen/nanovg") + (commit commit))) + (sha256 + (base32 + "1zp355pw6xnb5mjarz67cxkglv7j1s0qzv705fz1wf0gl0sjhy8f"= )))))) + rtosc)) + (home-page "https://github.com/mruby-zest/mruby-zest-build") + (synopsis "Zyn-Fusion user interface") + (description + "This package provides user interface for Zyn-Fusion.") + (license + (list license:lgpl2.1)))) --=20 2.39.2