From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id APySNHogQmVKzgAAG6o9tA:P1 (envelope-from ) for ; Wed, 01 Nov 2023 10:55:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id APySNHogQmVKzgAAG6o9tA (envelope-from ) for ; Wed, 01 Nov 2023 10:55:06 +0100 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 9749E427F1 for ; Wed, 1 Nov 2023 10:55:06 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=OVJT8koa; 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-Seal: i=1; s=key1; d=yhetil.org; t=1698832506; a=rsa-sha256; cv=none; b=JKlxEXeoBI/0Dv4LV21xIjHU0X2GNOoAir3NyZDKC+TmqgLhIr5AODkFws0/ppnGozsl8B dhuI6hf/k9LmRSKdMSVbd6WonMBQQwJvOVKSiP2w8mJdoFtSOKTg9NChY/GW1QFdisQ8Yy cN+d7fAZF/1RKFidgsKg/9R9R8A4B33aYWhb0CwS893MliasI9J98RqggZsBMX39WSbFfh nFlc++7jJU9t8D4rlBHR/NFaViUE+J1quvFQYlnkZzKo2S+nfvPApFHS1U3rNI87Dz8Toi jZ1GEyqOXg7979DAp75hz+HUjAYzqGF7d9oMLaKVVzuyhnbqqDVyZ+ItDcqlSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698832506; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=ux6QgWjiZsODG5C5OywjgWQ3RiP/x2yCOQmU5+j2cTQ=; b=R9KqkYjkkMVoVoWrFCCtRoKsef9NZ8gebOtDH/G03RIgCe1MpbfL/4SHaAm2q2SJHTDAXd SHxAIWNab8/6xBMpQerxi5dNs807GfSuivWtypkwLgTHR5hWqG/Mw6ZIX+3PQ1kIpJYQw5 4a3slkU92RhmgztqJJVRKBUxZKtu3cMYf1RoGl5EI+k96eda6pcZxOZGPalhJMdqQU2w8e yjyBnR3k5N9t52nrQUmSIVNYBlXuSBqQf/JMdOGfAeyO/vVhyWv3+m28JlOZeuiRAKwu6j 4V3r9hMKFMBBh14rAx1kyDkFYCne2f1nf6hoXaCcOcD34rQRdyeJFLn2U4xsBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=OVJT8koa; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qy7vi-0001FE-5T; Wed, 01 Nov 2023 05:54:30 -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 1qy7vg-0001Eb-PA for guix-patches@gnu.org; Wed, 01 Nov 2023 05:54:29 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qy7vg-0007vG-GN for guix-patches@gnu.org; Wed, 01 Nov 2023 05:54:28 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qy7wE-0008GF-OK for guix-patches@gnu.org; Wed, 01 Nov 2023 05:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63254] [PATCH v5 3/4] gnu: Add mruby-zest. Resent-From: Sughosha Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Nov 2023 09:55: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 Cc: Sughosha Received: via spool by 63254-submit@debbugs.gnu.org id=B63254.169883244531647 (code B ref 63254); Wed, 01 Nov 2023 09:55:02 +0000 Received: (at 63254) by debbugs.gnu.org; 1 Nov 2023 09:54:05 +0000 Received: from localhost ([127.0.0.1]:49941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy7vI-0008EM-QD for submit@debbugs.gnu.org; Wed, 01 Nov 2023 05:54:05 -0400 Received: from layka.disroot.org ([178.21.23.139]:54506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy7vE-0008DM-2c for 63254@debbugs.gnu.org; Wed, 01 Nov 2023 05:54:01 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 208A244F51; Wed, 1 Nov 2023 10:53:25 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nGt7gCG_nFRs; Wed, 1 Nov 2023 10:53:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1698832403; bh=FAaKTdGG4oxQMveg7n0fDkatTlWkw0QZJmQoE9RgN88=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OVJT8koaknX4zKhNuwbpI8RE4XvmH0ALKEmabs+Ej2VJ7StEPWSdl7dWIdh9MZnGn zg9c1S5CFcC36EZjYiJsAn1mryiOEwzyFRKLwCU3WxDeYqEe6Vvcs8Q4BQHoxb5mr+ nxb45XXwJMQ09m0oMHMlVhAhd+5JLeDQcAX2TlmNfAUCd8itGUj061juej63j2Hg6p xArsfvH5YxYMMpxY8dSO0QqoBhCRi367xJ+gi0gsI5DcNHsoEXAM8m7bk70kywjjv8 0OOlEBkZ/7iizljQriJI9/l/21rSCj/OitQ3DFWO+L+cozOk3vipHyauownRrhZi0K oDsyufeBPVNQQ== Date: Wed, 1 Nov 2023 10:53:04 +0100 Message-ID: <5512f81bc945ad2452c370eaf441a2519c17cb28.1698832359.git.sughosha@disroot.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -5.11 X-Migadu-Queue-Id: 9749E427F1 X-Migadu-Spam-Score: -5.11 X-TUID: eaRi/zIn1pU8 From: Sughosha * gnu/packages/mruby-xyz.scm: New file. * gnu/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 680975da9e..3a16aeb887 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -448,6 +448,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/mpd.scm \ %D%/packages/mp3.scm \ %D%/packages/mpi.scm \ + %D%/packages/mruby-xyz.scm \ %D%/packages/multiprecision.scm \ %D%/packages/music.scm \ %D%/packages/musl.scm \ diff --git a/gnu/packages/mruby-xyz.scm b/gnu/packages/mruby-xyz.scm new file mode 100644 index 0000000000..5524976dec --- /dev/null +++ b/gnu/packages/mruby-xyz.scm @@ -0,0 +1,176 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 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 and the required mruby sources + ;; and gems. + (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 with the + ;; system "pugl" fails to build. + ;; Delete the bundled "libuv", "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=" #$(cc-for-target)) + "CONFIG_SHELL=bash") + #: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" and "libuv" and use the system + ;; provided versions of them. + (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 the system provided "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 = \\[") + (string-append + "sans = [\"" + (search-input-file inputs + "/share/fonts/truetype/Roboto-Regular.ttf") + "\", ")) + (("bold = \\[") + (string-append + "bold = [\"" + (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 "/bin")) + (install-file "libzest.so" (string-append #$output "/lib")) + (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 ((version "0") + (revision "0") + (commit "b83cf926525e7cea8d2483da2a75852b8c7b6d28")) + (package (inherit nanovg) + (version (git-version version revision commit)) + (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)))) -- 2.41.0