Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] new package: sonic-pi
@ 2024-04-21 23:16 Nicop06
  2024-04-22 12:31 ` meator
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Nicop06 @ 2024-04-21 23:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

There is a new pull request by Nicop06 against master on the void-packages repository

https://github.com/Nicop06/void-packages sonic-pi
https://github.com/void-linux/void-packages/pull/49972

new package: sonic-pi
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)


A patch file from https://github.com/void-linux/void-packages/pull/49972.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sonic-pi-49972.patch --]
[-- Type: text/x-diff, Size: 13000 bytes --]

From 5f475c315d6fa2cc71b27f7c0c48c1053d786432 Mon Sep 17 00:00:00 2001
From: Nicolas Porcel <nicolasporcel06@gmail.com>
Date: Sun, 26 Feb 2023 21:26:34 +0000
Subject: [PATCH] new package: sonic-pi

---
 common/shlibs                                 |  4 +
 .../patches/add_missing_include.patch         | 12 +++
 srcpkgs/crossguid-git/template                | 27 ++++++
 srcpkgs/gl3w-git/template                     | 19 +++++
 srcpkgs/kissfft-devel                         |  1 +
 srcpkgs/kissfft/template                      | 26 ++++++
 srcpkgs/platform_folders-devel                |  1 +
 srcpkgs/platform_folders/template             | 24 ++++++
 srcpkgs/reproc++                              |  1 +
 srcpkgs/reproc++-devel                        |  1 +
 srcpkgs/reproc-devel                          |  1 +
 srcpkgs/reproc/template                       | 56 +++++++++++++
 srcpkgs/sonic-pi/files/sonic-pi               |  3 +
 srcpkgs/sonic-pi/template                     | 84 +++++++++++++++++++
 14 files changed, 260 insertions(+)
 create mode 100644 srcpkgs/crossguid-git/patches/add_missing_include.patch
 create mode 100644 srcpkgs/crossguid-git/template
 create mode 100644 srcpkgs/gl3w-git/template
 create mode 120000 srcpkgs/kissfft-devel
 create mode 100644 srcpkgs/kissfft/template
 create mode 120000 srcpkgs/platform_folders-devel
 create mode 100644 srcpkgs/platform_folders/template
 create mode 120000 srcpkgs/reproc++
 create mode 120000 srcpkgs/reproc++-devel
 create mode 120000 srcpkgs/reproc-devel
 create mode 100644 srcpkgs/reproc/template
 create mode 100644 srcpkgs/sonic-pi/files/sonic-pi
 create mode 100644 srcpkgs/sonic-pi/template

diff --git a/common/shlibs b/common/shlibs
index 531f1431305d49..f6ae690b7670eb 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4305,3 +4305,7 @@ force-stage.so.0.1 void-force-stage-0.1_1
 libliftoff.so.0 libliftoff-0.4.1_1
 libscfg.so libscfg-0.1.1_1
 libmsgraph-0.so.1 msgraph-0.2.1_1
+libplatform_folders.so platform_folders-4.2.0_1
+libreproc.so.14 reproc-14.2.5_1
+libreproc++.so.14 reproc++-14.2.5_1
+libkissfft-float.so.131 kissfft-131.1.0_1
diff --git a/srcpkgs/crossguid-git/patches/add_missing_include.patch b/srcpkgs/crossguid-git/patches/add_missing_include.patch
new file mode 100644
index 00000000000000..4e0c24c2a11438
--- /dev/null
+++ b/srcpkgs/crossguid-git/patches/add_missing_include.patch
@@ -0,0 +1,12 @@
+Index: crossguid-git-201900529/include/crossguid/guid.hpp
+===================================================================
+--- crossguid-git-201900529.orig/include/crossguid/guid.hpp
++++ crossguid-git-201900529/include/crossguid/guid.hpp
+@@ -29,6 +29,7 @@ THE SOFTWARE.
+ #include <jni.h>
+ #endif
+ 
++#include <cstdint>
+ #include <functional>
+ #include <iostream>
+ #include <array>
diff --git a/srcpkgs/crossguid-git/template b/srcpkgs/crossguid-git/template
new file mode 100644
index 00000000000000..dfd3f0a577185b
--- /dev/null
+++ b/srcpkgs/crossguid-git/template
@@ -0,0 +1,27 @@
+# Template file for 'crossguid-git'
+pkgname=crossguid-git
+version=201900529
+revision=1
+build_style=cmake
+hostmakedepends="git"
+makedepends="libuuid-devel"
+short_desc="Lightweight cross platform C++ GUID/UUID library (git)"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/graeme-hill/crossguid"
+commit_id=ca1bf4b810e2d188d04cb6286f957008ee1b7681
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout $commit_id
+}
+
+do_install() {
+	vlicense LICENSE
+	vinstall build/libcrossguid.a 644 usr/lib
+	vinstall include/crossguid/guid.hpp 644 usr/include/crossguid
+
+	vmkdir usr/lib/cmake/crossguid
+	vcopy build/CMakeFiles/Export/*/crossguid-config*.cmake usr/lib/cmake/crossguid
+}
diff --git a/srcpkgs/gl3w-git/template b/srcpkgs/gl3w-git/template
new file mode 100644
index 00000000000000..621bade1283f9e
--- /dev/null
+++ b/srcpkgs/gl3w-git/template
@@ -0,0 +1,19 @@
+# Template file for 'gl3w-git'
+pkgname=gl3w-git
+version=20231010
+revision=1
+build_style=cmake
+hostmakedepends="git"
+makedepends="MesaLib-devel python3"
+depends="mesa"
+short_desc=" Simple OpenGL core profile loading "
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="Unlicense"
+homepage="https://github.com/skaslev/gl3w"
+commit_id=3a33275633ce4be433332dc776e6a5b3bdea6506
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout $commit_id
+}
diff --git a/srcpkgs/kissfft-devel b/srcpkgs/kissfft-devel
new file mode 120000
index 00000000000000..55f4052fc4c657
--- /dev/null
+++ b/srcpkgs/kissfft-devel
@@ -0,0 +1 @@
+kissfft
\ No newline at end of file
diff --git a/srcpkgs/kissfft/template b/srcpkgs/kissfft/template
new file mode 100644
index 00000000000000..3d350dfcd9087e
--- /dev/null
+++ b/srcpkgs/kissfft/template
@@ -0,0 +1,26 @@
+# Template file for 'kissfft'
+pkgname=kissfft
+version=131.1.0
+revision=1
+build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DKISSFFT_OPENMP=OFF -DKISSFFT_PKGCONFIG=ON"
+hostmakedepends=""
+makedepends="python3 libpng-devel fftw-devel pkg-config"
+depends="libpng"
+short_desc="a Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid "
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/mborgerding/kissfft"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@a772a3a982bdbb515695d705bf7f4e2632a671af3144839479ce3813fe5223be
+
+kissfft-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/*.so
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/pkgconfig
+	}
+}
diff --git a/srcpkgs/platform_folders-devel b/srcpkgs/platform_folders-devel
new file mode 120000
index 00000000000000..68c09f7e4c01ef
--- /dev/null
+++ b/srcpkgs/platform_folders-devel
@@ -0,0 +1 @@
+platform_folders
\ No newline at end of file
diff --git a/srcpkgs/platform_folders/template b/srcpkgs/platform_folders/template
new file mode 100644
index 00000000000000..cea41fa32a7225
--- /dev/null
+++ b/srcpkgs/platform_folders/template
@@ -0,0 +1,24 @@
+# Template file for 'platform_folders'
+pkgname=platform_folders
+version=4.2.0
+revision=1
+build_style=cmake
+configure_args="-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPLATFORMFOLDERS_ENABLE_INSTALL=ON"
+hostmakedepends=""
+makedepends=""
+depends=""
+short_desc='A C++ library to look for special directories like "My Documents" and "%APPDATA%" so that you do not need to write Linux, Windows or Mac OS X specific code'
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/sago007/PlatformFolders"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@368af4106c2aff0b46f0bb23b6460d6600eaafb2b5db786f05f2ca8e9be5a2fd
+
+platform_folders-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+	}
+}
diff --git a/srcpkgs/reproc++ b/srcpkgs/reproc++
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc++-devel b/srcpkgs/reproc++-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc-devel b/srcpkgs/reproc-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc/template b/srcpkgs/reproc/template
new file mode 100644
index 00000000000000..ec9f240f008b52
--- /dev/null
+++ b/srcpkgs/reproc/template
@@ -0,0 +1,56 @@
+# Template file for 'reproc'
+pkgname=reproc
+version=14.2.5
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DREPROC++=ON"
+hostmakedepends=""
+makedepends=""
+depends=""
+short_desc="A cross-platform C99 process library"
+short_desc_cpp="A cross-platform C++11 process library"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/DaanDeMeyer/reproc"
+distfiles="https://github.com/DaanDeMeyer/reproc/archive/refs/tags/v${version}.tar.gz"
+checksum=@24f06d6ff393ed89400ee1d5aaff7ba97cf2a996c031083bde613ce937d9f163
+
+reproc-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc
+		vmove usr/lib/cmake/reproc
+		vmove usr/lib/pkgconfig/reproc.pc
+		vmove usr/lib/libreproc.so
+	}
+}
+
+reproc++_package() {
+	short_desc=short_desc_cpp
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/libreproc++.so.*
+	}
+}
+
+reproc++-devel_package() {
+	short_desc="${short_desc_cpp} (development files)"
+	depends="${sourcepkg}-devel>=${version}_${revision} ${sourcepkg}++>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc++
+		vmove usr/lib/cmake/reproc++
+		vmove usr/lib/pkgconfig/reproc++.pc
+		vmove usr/lib/libreproc++.so
+	}
+}
+
+reproc-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/pkgconfig
+	}
+}
diff --git a/srcpkgs/sonic-pi/files/sonic-pi b/srcpkgs/sonic-pi/files/sonic-pi
new file mode 100644
index 00000000000000..eb75fd702c61df
--- /dev/null
+++ b/srcpkgs/sonic-pi/files/sonic-pi
@@ -0,0 +1,3 @@
+#/usr/bin/env sh
+
+exec /opt/sonic-pi/bin/sonic-pi
diff --git a/srcpkgs/sonic-pi/template b/srcpkgs/sonic-pi/template
new file mode 100644
index 00000000000000..dbe93f08504e4d
--- /dev/null
+++ b/srcpkgs/sonic-pi/template
@@ -0,0 +1,84 @@
+# Template file for 'sonic-pi'
+pkgname=sonic-pi
+version=4.5.0
+revision=1
+archs="i686 x86_64"
+build_style=cmake
+build_wrksrc="app"
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_IMGUI_INTERFACE=ON -DUSE_SYSTEM_LIBS=ON -DQSCINTILLA_INCLUDE_DIR=/usr/include/qt5 -DQSCINTILLA_LIBRARY=/usr/lib/libqscintilla2_qt5.so"
+makedepends="qscintilla-qt5-devel qt5-svg-devel SDL2-devel ruby-devel elixir pkg-config aubio-devel catch2 platform_folders-devel reproc++-devel kissfft-devel crossguid-git fmt-devel rtmidi-devel gl3w-git"
+depends="qscintilla-qt5 qt5-svg SDL2 supercollider sc3-plugins aubio platform_folders reproc++ kissfft fmt rtmidi ruby erlang libjack-pipewire"
+short_desc="The Live Coding Music Synth for Everyone"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://sonic-pi.net/"
+distfiles="https://github.com/samaaron/${pkgname}/archive/v${version}.tar.gz"
+checksum=@3a958ca3c1bb429f5d3cafaee0ed82aae96d5152f06a6a40b1c04154b6291c17
+
+pre_configure() {
+	ruby server/ruby/bin/compile-extensions.rb
+	ruby server/ruby/bin/i18n-tool.rb -t
+
+	cp gui/qt/utils/ruby_help.tmpl gui/qt/utils/ruby_help.h
+	ruby server/ruby/bin/qt-doc.rb
+}
+
+post_build() {
+        cd ${wrksrc}/app/server/beam/tau
+        MIX_ENV=prod mix tau.release
+	erl -noinput -eval \
+		'lists:foreach(fun(F) -> beam_lib:strip(F) end, filelib:wildcard("app/server/beam/tau/**/*.beam"))' \
+		-s init stop
+	rm _build/prod/rel/tau/bin/tau.bat
+}
+
+do_install() {
+	cd ${wrksrc}
+
+	INSTALL_DIR=opt/${pkgname}
+	vmkdir ${INSTALL_DIR}
+
+	vcopy bin ${INSTALL_DIR}
+	vcopy etc ${INSTALL_DIR}
+
+	vmkdir ${INSTALL_DIR}/app
+	vcopy app/config ${INSTALL_DIR}/app
+	vcopy app/server/native ${INSTALL_DIR}/app/server
+
+	# Ruby
+	RUBY_DIR=app/server/ruby
+	vmkdir ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/*.rb ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/bin ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/lib ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/rb-native ${INSTALL_DIR}/${RUBY_DIR}
+	for ruby_vendor in ${RUBY_DIR}/vendor/*; do
+		vendor_name=$(basename $ruby_vendor)
+		vmkdir ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+		vcopy ${RUBY_DIR}/vendor/${vendor_name}/lib ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+	done
+
+	BEAM_DIR=app/server/beam/tau
+	BEAM_BUILD_DIR=${BEAM_DIR}/_build/prod
+	vmkdir ${INSTALL_DIR}/${BEAM_DIR}/_build
+	vcopy ${BEAM_BUILD_DIR} ${INSTALL_DIR}/${BEAM_BUILD_DIR}
+	vinstall ${BEAM_DIR}/boot-lin.sh 0755 ${INSTALL_DIR}/${BEAM_DIR}
+
+	GUI_DIR=app/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/lang ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/theme ${INSTALL_DIR}/${GUI_DIR}
+
+	GUI_BIN_DIR=app/build/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_BIN_DIR}
+	vinstall ${GUI_BIN_DIR}/sonic-pi 0755 ${INSTALL_DIR}/${GUI_BIN_DIR}
+
+	IMGUI_RES_DIR=app/gui/imgui/res
+	vmkdir ${INSTALL_DIR}/${IMGUI_RES_DIR}
+	vinstall ${IMGUI_RES_DIR}//Cousine-Regular.ttf 0644 ${INSTALL_DIR}/${IMGUI_RES_DIR}
+
+	mkdir -p /usr/bin/
+	vinstall ${FILESDIR}/sonic-pi 0755 usr/bin
+
+	vlicense LICENSE.md
+}

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

* Re: new package: sonic-pi
  2024-04-21 23:16 [PR PATCH] new package: sonic-pi Nicop06
@ 2024-04-22 12:31 ` meator
  2024-04-22 19:55 ` Nicop06
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: meator @ 2024-04-22 12:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 301 bytes --]

New comment by meator on void-packages repository

https://github.com/void-linux/void-packages/pull/49972#issuecomment-2069277318

Comment:
I don't think the `-git` packages meet the [Package Requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements).

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

* Re: new package: sonic-pi
  2024-04-21 23:16 [PR PATCH] new package: sonic-pi Nicop06
  2024-04-22 12:31 ` meator
@ 2024-04-22 19:55 ` Nicop06
  2024-04-22 19:55 ` [PR PATCH] [Updated] " Nicop06
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nicop06 @ 2024-04-22 19:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

New comment by Nicop06 on void-packages repository

https://github.com/void-linux/void-packages/pull/49972#issuecomment-2070843922

Comment:
Yes that's a good point. Unfortunately, those packages are needed by `sonic-pi`, and requires the latest version to run.

For [crossguid](https://github.com/graeme-hill/crossguid), this package hasn't been updated in 5 years and the latest release was 7 years ago. `sonic-pi` only builds from the github version as the header was moved.

For [gl3w](https://github.com/skaslev/gl3w), there is no official release. The last commit was 6 months ago and there were only 2 commits in the past 2 years.

I'm happy to contact the maintainers to ask if they can provide a release.

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

* Re: [PR PATCH] [Updated] new package: sonic-pi
  2024-04-21 23:16 [PR PATCH] new package: sonic-pi Nicop06
  2024-04-22 12:31 ` meator
  2024-04-22 19:55 ` Nicop06
@ 2024-04-22 19:55 ` Nicop06
  2024-04-22 20:21 ` Nicop06
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nicop06 @ 2024-04-22 19:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

There is an updated pull request by Nicop06 against master on the void-packages repository

https://github.com/Nicop06/void-packages sonic-pi
https://github.com/void-linux/void-packages/pull/49972

new package: sonic-pi
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)


A patch file from https://github.com/void-linux/void-packages/pull/49972.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sonic-pi-49972.patch --]
[-- Type: text/x-diff, Size: 13021 bytes --]

From 947777a6276726dc3541d588e31f491a6d14bc7d Mon Sep 17 00:00:00 2001
From: Nicolas Porcel <nicolasporcel06@gmail.com>
Date: Sun, 26 Feb 2023 21:26:34 +0000
Subject: [PATCH] new package: sonic-pi

---
 common/shlibs                                 |  4 +
 .../patches/add_missing_include.patch         | 12 +++
 srcpkgs/crossguid-git/template                | 27 ++++++
 srcpkgs/gl3w-git/template                     | 19 +++++
 srcpkgs/kissfft-devel                         |  1 +
 srcpkgs/kissfft/template                      | 26 ++++++
 srcpkgs/platform_folders-devel                |  1 +
 srcpkgs/platform_folders/template             | 24 ++++++
 srcpkgs/reproc++                              |  1 +
 srcpkgs/reproc++-devel                        |  1 +
 srcpkgs/reproc-devel                          |  1 +
 srcpkgs/reproc/template                       | 56 +++++++++++++
 srcpkgs/sonic-pi/files/sonic-pi               |  3 +
 srcpkgs/sonic-pi/template                     | 84 +++++++++++++++++++
 14 files changed, 260 insertions(+)
 create mode 100644 srcpkgs/crossguid-git/patches/add_missing_include.patch
 create mode 100644 srcpkgs/crossguid-git/template
 create mode 100644 srcpkgs/gl3w-git/template
 create mode 120000 srcpkgs/kissfft-devel
 create mode 100644 srcpkgs/kissfft/template
 create mode 120000 srcpkgs/platform_folders-devel
 create mode 100644 srcpkgs/platform_folders/template
 create mode 120000 srcpkgs/reproc++
 create mode 120000 srcpkgs/reproc++-devel
 create mode 120000 srcpkgs/reproc-devel
 create mode 100644 srcpkgs/reproc/template
 create mode 100644 srcpkgs/sonic-pi/files/sonic-pi
 create mode 100644 srcpkgs/sonic-pi/template

diff --git a/common/shlibs b/common/shlibs
index 4fe3b26a2e0378..60f33e285ace6b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4305,3 +4305,7 @@ libmsgraph-0.so.1 msgraph-0.2.1_1
 libgtk-session-lock.so.0 gtk-session-lock-0.2.0_1
 libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
+libplatform_folders.so platform_folders-4.2.0_1
+libreproc.so.14 reproc-14.2.5_1
+libreproc++.so.14 reproc++-14.2.5_1
+libkissfft-float.so.131 kissfft-131.1.0_1
diff --git a/srcpkgs/crossguid-git/patches/add_missing_include.patch b/srcpkgs/crossguid-git/patches/add_missing_include.patch
new file mode 100644
index 00000000000000..4e0c24c2a11438
--- /dev/null
+++ b/srcpkgs/crossguid-git/patches/add_missing_include.patch
@@ -0,0 +1,12 @@
+Index: crossguid-git-201900529/include/crossguid/guid.hpp
+===================================================================
+--- crossguid-git-201900529.orig/include/crossguid/guid.hpp
++++ crossguid-git-201900529/include/crossguid/guid.hpp
+@@ -29,6 +29,7 @@ THE SOFTWARE.
+ #include <jni.h>
+ #endif
+ 
++#include <cstdint>
+ #include <functional>
+ #include <iostream>
+ #include <array>
diff --git a/srcpkgs/crossguid-git/template b/srcpkgs/crossguid-git/template
new file mode 100644
index 00000000000000..dfd3f0a577185b
--- /dev/null
+++ b/srcpkgs/crossguid-git/template
@@ -0,0 +1,27 @@
+# Template file for 'crossguid-git'
+pkgname=crossguid-git
+version=201900529
+revision=1
+build_style=cmake
+hostmakedepends="git"
+makedepends="libuuid-devel"
+short_desc="Lightweight cross platform C++ GUID/UUID library (git)"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/graeme-hill/crossguid"
+commit_id=ca1bf4b810e2d188d04cb6286f957008ee1b7681
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout $commit_id
+}
+
+do_install() {
+	vlicense LICENSE
+	vinstall build/libcrossguid.a 644 usr/lib
+	vinstall include/crossguid/guid.hpp 644 usr/include/crossguid
+
+	vmkdir usr/lib/cmake/crossguid
+	vcopy build/CMakeFiles/Export/*/crossguid-config*.cmake usr/lib/cmake/crossguid
+}
diff --git a/srcpkgs/gl3w-git/template b/srcpkgs/gl3w-git/template
new file mode 100644
index 00000000000000..621bade1283f9e
--- /dev/null
+++ b/srcpkgs/gl3w-git/template
@@ -0,0 +1,19 @@
+# Template file for 'gl3w-git'
+pkgname=gl3w-git
+version=20231010
+revision=1
+build_style=cmake
+hostmakedepends="git"
+makedepends="MesaLib-devel python3"
+depends="mesa"
+short_desc=" Simple OpenGL core profile loading "
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="Unlicense"
+homepage="https://github.com/skaslev/gl3w"
+commit_id=3a33275633ce4be433332dc776e6a5b3bdea6506
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout $commit_id
+}
diff --git a/srcpkgs/kissfft-devel b/srcpkgs/kissfft-devel
new file mode 120000
index 00000000000000..55f4052fc4c657
--- /dev/null
+++ b/srcpkgs/kissfft-devel
@@ -0,0 +1 @@
+kissfft
\ No newline at end of file
diff --git a/srcpkgs/kissfft/template b/srcpkgs/kissfft/template
new file mode 100644
index 00000000000000..3d350dfcd9087e
--- /dev/null
+++ b/srcpkgs/kissfft/template
@@ -0,0 +1,26 @@
+# Template file for 'kissfft'
+pkgname=kissfft
+version=131.1.0
+revision=1
+build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DKISSFFT_OPENMP=OFF -DKISSFFT_PKGCONFIG=ON"
+hostmakedepends=""
+makedepends="python3 libpng-devel fftw-devel pkg-config"
+depends="libpng"
+short_desc="a Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid "
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/mborgerding/kissfft"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@a772a3a982bdbb515695d705bf7f4e2632a671af3144839479ce3813fe5223be
+
+kissfft-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/*.so
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/pkgconfig
+	}
+}
diff --git a/srcpkgs/platform_folders-devel b/srcpkgs/platform_folders-devel
new file mode 120000
index 00000000000000..68c09f7e4c01ef
--- /dev/null
+++ b/srcpkgs/platform_folders-devel
@@ -0,0 +1 @@
+platform_folders
\ No newline at end of file
diff --git a/srcpkgs/platform_folders/template b/srcpkgs/platform_folders/template
new file mode 100644
index 00000000000000..cea41fa32a7225
--- /dev/null
+++ b/srcpkgs/platform_folders/template
@@ -0,0 +1,24 @@
+# Template file for 'platform_folders'
+pkgname=platform_folders
+version=4.2.0
+revision=1
+build_style=cmake
+configure_args="-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPLATFORMFOLDERS_ENABLE_INSTALL=ON"
+hostmakedepends=""
+makedepends=""
+depends=""
+short_desc='A C++ library to look for special directories like "My Documents" and "%APPDATA%" so that you do not need to write Linux, Windows or Mac OS X specific code'
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/sago007/PlatformFolders"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@368af4106c2aff0b46f0bb23b6460d6600eaafb2b5db786f05f2ca8e9be5a2fd
+
+platform_folders-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+	}
+}
diff --git a/srcpkgs/reproc++ b/srcpkgs/reproc++
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc++-devel b/srcpkgs/reproc++-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc-devel b/srcpkgs/reproc-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc/template b/srcpkgs/reproc/template
new file mode 100644
index 00000000000000..ec9f240f008b52
--- /dev/null
+++ b/srcpkgs/reproc/template
@@ -0,0 +1,56 @@
+# Template file for 'reproc'
+pkgname=reproc
+version=14.2.5
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DREPROC++=ON"
+hostmakedepends=""
+makedepends=""
+depends=""
+short_desc="A cross-platform C99 process library"
+short_desc_cpp="A cross-platform C++11 process library"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/DaanDeMeyer/reproc"
+distfiles="https://github.com/DaanDeMeyer/reproc/archive/refs/tags/v${version}.tar.gz"
+checksum=@24f06d6ff393ed89400ee1d5aaff7ba97cf2a996c031083bde613ce937d9f163
+
+reproc-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc
+		vmove usr/lib/cmake/reproc
+		vmove usr/lib/pkgconfig/reproc.pc
+		vmove usr/lib/libreproc.so
+	}
+}
+
+reproc++_package() {
+	short_desc=short_desc_cpp
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/libreproc++.so.*
+	}
+}
+
+reproc++-devel_package() {
+	short_desc="${short_desc_cpp} (development files)"
+	depends="${sourcepkg}-devel>=${version}_${revision} ${sourcepkg}++>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc++
+		vmove usr/lib/cmake/reproc++
+		vmove usr/lib/pkgconfig/reproc++.pc
+		vmove usr/lib/libreproc++.so
+	}
+}
+
+reproc-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/pkgconfig
+	}
+}
diff --git a/srcpkgs/sonic-pi/files/sonic-pi b/srcpkgs/sonic-pi/files/sonic-pi
new file mode 100644
index 00000000000000..eb75fd702c61df
--- /dev/null
+++ b/srcpkgs/sonic-pi/files/sonic-pi
@@ -0,0 +1,3 @@
+#/usr/bin/env sh
+
+exec /opt/sonic-pi/bin/sonic-pi
diff --git a/srcpkgs/sonic-pi/template b/srcpkgs/sonic-pi/template
new file mode 100644
index 00000000000000..dbe93f08504e4d
--- /dev/null
+++ b/srcpkgs/sonic-pi/template
@@ -0,0 +1,84 @@
+# Template file for 'sonic-pi'
+pkgname=sonic-pi
+version=4.5.0
+revision=1
+archs="i686 x86_64"
+build_style=cmake
+build_wrksrc="app"
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_IMGUI_INTERFACE=ON -DUSE_SYSTEM_LIBS=ON -DQSCINTILLA_INCLUDE_DIR=/usr/include/qt5 -DQSCINTILLA_LIBRARY=/usr/lib/libqscintilla2_qt5.so"
+makedepends="qscintilla-qt5-devel qt5-svg-devel SDL2-devel ruby-devel elixir pkg-config aubio-devel catch2 platform_folders-devel reproc++-devel kissfft-devel crossguid-git fmt-devel rtmidi-devel gl3w-git"
+depends="qscintilla-qt5 qt5-svg SDL2 supercollider sc3-plugins aubio platform_folders reproc++ kissfft fmt rtmidi ruby erlang libjack-pipewire"
+short_desc="The Live Coding Music Synth for Everyone"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://sonic-pi.net/"
+distfiles="https://github.com/samaaron/${pkgname}/archive/v${version}.tar.gz"
+checksum=@3a958ca3c1bb429f5d3cafaee0ed82aae96d5152f06a6a40b1c04154b6291c17
+
+pre_configure() {
+	ruby server/ruby/bin/compile-extensions.rb
+	ruby server/ruby/bin/i18n-tool.rb -t
+
+	cp gui/qt/utils/ruby_help.tmpl gui/qt/utils/ruby_help.h
+	ruby server/ruby/bin/qt-doc.rb
+}
+
+post_build() {
+        cd ${wrksrc}/app/server/beam/tau
+        MIX_ENV=prod mix tau.release
+	erl -noinput -eval \
+		'lists:foreach(fun(F) -> beam_lib:strip(F) end, filelib:wildcard("app/server/beam/tau/**/*.beam"))' \
+		-s init stop
+	rm _build/prod/rel/tau/bin/tau.bat
+}
+
+do_install() {
+	cd ${wrksrc}
+
+	INSTALL_DIR=opt/${pkgname}
+	vmkdir ${INSTALL_DIR}
+
+	vcopy bin ${INSTALL_DIR}
+	vcopy etc ${INSTALL_DIR}
+
+	vmkdir ${INSTALL_DIR}/app
+	vcopy app/config ${INSTALL_DIR}/app
+	vcopy app/server/native ${INSTALL_DIR}/app/server
+
+	# Ruby
+	RUBY_DIR=app/server/ruby
+	vmkdir ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/*.rb ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/bin ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/lib ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/rb-native ${INSTALL_DIR}/${RUBY_DIR}
+	for ruby_vendor in ${RUBY_DIR}/vendor/*; do
+		vendor_name=$(basename $ruby_vendor)
+		vmkdir ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+		vcopy ${RUBY_DIR}/vendor/${vendor_name}/lib ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+	done
+
+	BEAM_DIR=app/server/beam/tau
+	BEAM_BUILD_DIR=${BEAM_DIR}/_build/prod
+	vmkdir ${INSTALL_DIR}/${BEAM_DIR}/_build
+	vcopy ${BEAM_BUILD_DIR} ${INSTALL_DIR}/${BEAM_BUILD_DIR}
+	vinstall ${BEAM_DIR}/boot-lin.sh 0755 ${INSTALL_DIR}/${BEAM_DIR}
+
+	GUI_DIR=app/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/lang ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/theme ${INSTALL_DIR}/${GUI_DIR}
+
+	GUI_BIN_DIR=app/build/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_BIN_DIR}
+	vinstall ${GUI_BIN_DIR}/sonic-pi 0755 ${INSTALL_DIR}/${GUI_BIN_DIR}
+
+	IMGUI_RES_DIR=app/gui/imgui/res
+	vmkdir ${INSTALL_DIR}/${IMGUI_RES_DIR}
+	vinstall ${IMGUI_RES_DIR}//Cousine-Regular.ttf 0644 ${INSTALL_DIR}/${IMGUI_RES_DIR}
+
+	mkdir -p /usr/bin/
+	vinstall ${FILESDIR}/sonic-pi 0755 usr/bin
+
+	vlicense LICENSE.md
+}

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

* Re: [PR PATCH] [Updated] new package: sonic-pi
  2024-04-21 23:16 [PR PATCH] new package: sonic-pi Nicop06
                   ` (2 preceding siblings ...)
  2024-04-22 19:55 ` [PR PATCH] [Updated] " Nicop06
@ 2024-04-22 20:21 ` Nicop06
  2024-04-22 20:39 ` Nicop06
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nicop06 @ 2024-04-22 20:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

There is an updated pull request by Nicop06 against master on the void-packages repository

https://github.com/Nicop06/void-packages sonic-pi
https://github.com/void-linux/void-packages/pull/49972

new package: sonic-pi
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)


A patch file from https://github.com/void-linux/void-packages/pull/49972.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sonic-pi-49972.patch --]
[-- Type: text/x-diff, Size: 13051 bytes --]

From 4144cd52a08b1d89c24d3e410503b88b43475485 Mon Sep 17 00:00:00 2001
From: Nicolas Porcel <nicolasporcel06@gmail.com>
Date: Sun, 26 Feb 2023 21:26:34 +0000
Subject: [PATCH] new package: sonic-pi

---
 common/shlibs                                 |  4 +
 .../patches/add_missing_include.patch         | 12 +++
 srcpkgs/crossguid-git/template                | 27 ++++++
 srcpkgs/gl3w-git/template                     | 19 +++++
 srcpkgs/kissfft-devel                         |  1 +
 srcpkgs/kissfft/template                      | 27 ++++++
 srcpkgs/platform_folders-devel                |  1 +
 srcpkgs/platform_folders/template             | 24 ++++++
 srcpkgs/reproc++                              |  1 +
 srcpkgs/reproc++-devel                        |  1 +
 srcpkgs/reproc-devel                          |  1 +
 srcpkgs/reproc/template                       | 56 +++++++++++++
 srcpkgs/sonic-pi/files/sonic-pi               |  3 +
 srcpkgs/sonic-pi/template                     | 84 +++++++++++++++++++
 14 files changed, 261 insertions(+)
 create mode 100644 srcpkgs/crossguid-git/patches/add_missing_include.patch
 create mode 100644 srcpkgs/crossguid-git/template
 create mode 100644 srcpkgs/gl3w-git/template
 create mode 120000 srcpkgs/kissfft-devel
 create mode 100644 srcpkgs/kissfft/template
 create mode 120000 srcpkgs/platform_folders-devel
 create mode 100644 srcpkgs/platform_folders/template
 create mode 120000 srcpkgs/reproc++
 create mode 120000 srcpkgs/reproc++-devel
 create mode 120000 srcpkgs/reproc-devel
 create mode 100644 srcpkgs/reproc/template
 create mode 100644 srcpkgs/sonic-pi/files/sonic-pi
 create mode 100644 srcpkgs/sonic-pi/template

diff --git a/common/shlibs b/common/shlibs
index 4fe3b26a2e0378..60f33e285ace6b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4305,3 +4305,7 @@ libmsgraph-0.so.1 msgraph-0.2.1_1
 libgtk-session-lock.so.0 gtk-session-lock-0.2.0_1
 libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
+libplatform_folders.so platform_folders-4.2.0_1
+libreproc.so.14 reproc-14.2.5_1
+libreproc++.so.14 reproc++-14.2.5_1
+libkissfft-float.so.131 kissfft-131.1.0_1
diff --git a/srcpkgs/crossguid-git/patches/add_missing_include.patch b/srcpkgs/crossguid-git/patches/add_missing_include.patch
new file mode 100644
index 00000000000000..4e0c24c2a11438
--- /dev/null
+++ b/srcpkgs/crossguid-git/patches/add_missing_include.patch
@@ -0,0 +1,12 @@
+Index: crossguid-git-201900529/include/crossguid/guid.hpp
+===================================================================
+--- crossguid-git-201900529.orig/include/crossguid/guid.hpp
++++ crossguid-git-201900529/include/crossguid/guid.hpp
+@@ -29,6 +29,7 @@ THE SOFTWARE.
+ #include <jni.h>
+ #endif
+ 
++#include <cstdint>
+ #include <functional>
+ #include <iostream>
+ #include <array>
diff --git a/srcpkgs/crossguid-git/template b/srcpkgs/crossguid-git/template
new file mode 100644
index 00000000000000..dfd3f0a577185b
--- /dev/null
+++ b/srcpkgs/crossguid-git/template
@@ -0,0 +1,27 @@
+# Template file for 'crossguid-git'
+pkgname=crossguid-git
+version=201900529
+revision=1
+build_style=cmake
+hostmakedepends="git"
+makedepends="libuuid-devel"
+short_desc="Lightweight cross platform C++ GUID/UUID library (git)"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/graeme-hill/crossguid"
+commit_id=ca1bf4b810e2d188d04cb6286f957008ee1b7681
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout $commit_id
+}
+
+do_install() {
+	vlicense LICENSE
+	vinstall build/libcrossguid.a 644 usr/lib
+	vinstall include/crossguid/guid.hpp 644 usr/include/crossguid
+
+	vmkdir usr/lib/cmake/crossguid
+	vcopy build/CMakeFiles/Export/*/crossguid-config*.cmake usr/lib/cmake/crossguid
+}
diff --git a/srcpkgs/gl3w-git/template b/srcpkgs/gl3w-git/template
new file mode 100644
index 00000000000000..621bade1283f9e
--- /dev/null
+++ b/srcpkgs/gl3w-git/template
@@ -0,0 +1,19 @@
+# Template file for 'gl3w-git'
+pkgname=gl3w-git
+version=20231010
+revision=1
+build_style=cmake
+hostmakedepends="git"
+makedepends="MesaLib-devel python3"
+depends="mesa"
+short_desc=" Simple OpenGL core profile loading "
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="Unlicense"
+homepage="https://github.com/skaslev/gl3w"
+commit_id=3a33275633ce4be433332dc776e6a5b3bdea6506
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout $commit_id
+}
diff --git a/srcpkgs/kissfft-devel b/srcpkgs/kissfft-devel
new file mode 120000
index 00000000000000..55f4052fc4c657
--- /dev/null
+++ b/srcpkgs/kissfft-devel
@@ -0,0 +1 @@
+kissfft
\ No newline at end of file
diff --git a/srcpkgs/kissfft/template b/srcpkgs/kissfft/template
new file mode 100644
index 00000000000000..406f2da2234622
--- /dev/null
+++ b/srcpkgs/kissfft/template
@@ -0,0 +1,27 @@
+# Template file for 'kissfft'
+pkgname=kissfft
+version=131.1.0
+revision=1
+build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DKISSFFT_OPENMP=OFF -DKISSFFT_PKGCONFIG=ON"
+hostmakedepends=""
+checkdepends="python3-numpy"
+makedepends="python3 libpng-devel fftw-devel pkg-config"
+depends="libpng"
+short_desc="a Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid "
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/mborgerding/kissfft"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@a772a3a982bdbb515695d705bf7f4e2632a671af3144839479ce3813fe5223be
+
+kissfft-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/*.so
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/pkgconfig
+	}
+}
diff --git a/srcpkgs/platform_folders-devel b/srcpkgs/platform_folders-devel
new file mode 120000
index 00000000000000..68c09f7e4c01ef
--- /dev/null
+++ b/srcpkgs/platform_folders-devel
@@ -0,0 +1 @@
+platform_folders
\ No newline at end of file
diff --git a/srcpkgs/platform_folders/template b/srcpkgs/platform_folders/template
new file mode 100644
index 00000000000000..cea41fa32a7225
--- /dev/null
+++ b/srcpkgs/platform_folders/template
@@ -0,0 +1,24 @@
+# Template file for 'platform_folders'
+pkgname=platform_folders
+version=4.2.0
+revision=1
+build_style=cmake
+configure_args="-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPLATFORMFOLDERS_ENABLE_INSTALL=ON"
+hostmakedepends=""
+makedepends=""
+depends=""
+short_desc='A C++ library to look for special directories like "My Documents" and "%APPDATA%" so that you do not need to write Linux, Windows or Mac OS X specific code'
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/sago007/PlatformFolders"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@368af4106c2aff0b46f0bb23b6460d6600eaafb2b5db786f05f2ca8e9be5a2fd
+
+platform_folders-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+	}
+}
diff --git a/srcpkgs/reproc++ b/srcpkgs/reproc++
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc++-devel b/srcpkgs/reproc++-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc-devel b/srcpkgs/reproc-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc/template b/srcpkgs/reproc/template
new file mode 100644
index 00000000000000..ec9f240f008b52
--- /dev/null
+++ b/srcpkgs/reproc/template
@@ -0,0 +1,56 @@
+# Template file for 'reproc'
+pkgname=reproc
+version=14.2.5
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DREPROC++=ON"
+hostmakedepends=""
+makedepends=""
+depends=""
+short_desc="A cross-platform C99 process library"
+short_desc_cpp="A cross-platform C++11 process library"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/DaanDeMeyer/reproc"
+distfiles="https://github.com/DaanDeMeyer/reproc/archive/refs/tags/v${version}.tar.gz"
+checksum=@24f06d6ff393ed89400ee1d5aaff7ba97cf2a996c031083bde613ce937d9f163
+
+reproc-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc
+		vmove usr/lib/cmake/reproc
+		vmove usr/lib/pkgconfig/reproc.pc
+		vmove usr/lib/libreproc.so
+	}
+}
+
+reproc++_package() {
+	short_desc=short_desc_cpp
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/libreproc++.so.*
+	}
+}
+
+reproc++-devel_package() {
+	short_desc="${short_desc_cpp} (development files)"
+	depends="${sourcepkg}-devel>=${version}_${revision} ${sourcepkg}++>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc++
+		vmove usr/lib/cmake/reproc++
+		vmove usr/lib/pkgconfig/reproc++.pc
+		vmove usr/lib/libreproc++.so
+	}
+}
+
+reproc-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/pkgconfig
+	}
+}
diff --git a/srcpkgs/sonic-pi/files/sonic-pi b/srcpkgs/sonic-pi/files/sonic-pi
new file mode 100644
index 00000000000000..eb75fd702c61df
--- /dev/null
+++ b/srcpkgs/sonic-pi/files/sonic-pi
@@ -0,0 +1,3 @@
+#/usr/bin/env sh
+
+exec /opt/sonic-pi/bin/sonic-pi
diff --git a/srcpkgs/sonic-pi/template b/srcpkgs/sonic-pi/template
new file mode 100644
index 00000000000000..dbe93f08504e4d
--- /dev/null
+++ b/srcpkgs/sonic-pi/template
@@ -0,0 +1,84 @@
+# Template file for 'sonic-pi'
+pkgname=sonic-pi
+version=4.5.0
+revision=1
+archs="i686 x86_64"
+build_style=cmake
+build_wrksrc="app"
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_IMGUI_INTERFACE=ON -DUSE_SYSTEM_LIBS=ON -DQSCINTILLA_INCLUDE_DIR=/usr/include/qt5 -DQSCINTILLA_LIBRARY=/usr/lib/libqscintilla2_qt5.so"
+makedepends="qscintilla-qt5-devel qt5-svg-devel SDL2-devel ruby-devel elixir pkg-config aubio-devel catch2 platform_folders-devel reproc++-devel kissfft-devel crossguid-git fmt-devel rtmidi-devel gl3w-git"
+depends="qscintilla-qt5 qt5-svg SDL2 supercollider sc3-plugins aubio platform_folders reproc++ kissfft fmt rtmidi ruby erlang libjack-pipewire"
+short_desc="The Live Coding Music Synth for Everyone"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://sonic-pi.net/"
+distfiles="https://github.com/samaaron/${pkgname}/archive/v${version}.tar.gz"
+checksum=@3a958ca3c1bb429f5d3cafaee0ed82aae96d5152f06a6a40b1c04154b6291c17
+
+pre_configure() {
+	ruby server/ruby/bin/compile-extensions.rb
+	ruby server/ruby/bin/i18n-tool.rb -t
+
+	cp gui/qt/utils/ruby_help.tmpl gui/qt/utils/ruby_help.h
+	ruby server/ruby/bin/qt-doc.rb
+}
+
+post_build() {
+        cd ${wrksrc}/app/server/beam/tau
+        MIX_ENV=prod mix tau.release
+	erl -noinput -eval \
+		'lists:foreach(fun(F) -> beam_lib:strip(F) end, filelib:wildcard("app/server/beam/tau/**/*.beam"))' \
+		-s init stop
+	rm _build/prod/rel/tau/bin/tau.bat
+}
+
+do_install() {
+	cd ${wrksrc}
+
+	INSTALL_DIR=opt/${pkgname}
+	vmkdir ${INSTALL_DIR}
+
+	vcopy bin ${INSTALL_DIR}
+	vcopy etc ${INSTALL_DIR}
+
+	vmkdir ${INSTALL_DIR}/app
+	vcopy app/config ${INSTALL_DIR}/app
+	vcopy app/server/native ${INSTALL_DIR}/app/server
+
+	# Ruby
+	RUBY_DIR=app/server/ruby
+	vmkdir ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/*.rb ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/bin ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/lib ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/rb-native ${INSTALL_DIR}/${RUBY_DIR}
+	for ruby_vendor in ${RUBY_DIR}/vendor/*; do
+		vendor_name=$(basename $ruby_vendor)
+		vmkdir ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+		vcopy ${RUBY_DIR}/vendor/${vendor_name}/lib ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+	done
+
+	BEAM_DIR=app/server/beam/tau
+	BEAM_BUILD_DIR=${BEAM_DIR}/_build/prod
+	vmkdir ${INSTALL_DIR}/${BEAM_DIR}/_build
+	vcopy ${BEAM_BUILD_DIR} ${INSTALL_DIR}/${BEAM_BUILD_DIR}
+	vinstall ${BEAM_DIR}/boot-lin.sh 0755 ${INSTALL_DIR}/${BEAM_DIR}
+
+	GUI_DIR=app/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/lang ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/theme ${INSTALL_DIR}/${GUI_DIR}
+
+	GUI_BIN_DIR=app/build/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_BIN_DIR}
+	vinstall ${GUI_BIN_DIR}/sonic-pi 0755 ${INSTALL_DIR}/${GUI_BIN_DIR}
+
+	IMGUI_RES_DIR=app/gui/imgui/res
+	vmkdir ${INSTALL_DIR}/${IMGUI_RES_DIR}
+	vinstall ${IMGUI_RES_DIR}//Cousine-Regular.ttf 0644 ${INSTALL_DIR}/${IMGUI_RES_DIR}
+
+	mkdir -p /usr/bin/
+	vinstall ${FILESDIR}/sonic-pi 0755 usr/bin
+
+	vlicense LICENSE.md
+}

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

* Re: [PR PATCH] [Updated] new package: sonic-pi
  2024-04-21 23:16 [PR PATCH] new package: sonic-pi Nicop06
                   ` (3 preceding siblings ...)
  2024-04-22 20:21 ` Nicop06
@ 2024-04-22 20:39 ` Nicop06
  2024-04-22 20:43 ` Nicop06
  2024-04-22 21:10 ` Nicop06
  6 siblings, 0 replies; 8+ messages in thread
From: Nicop06 @ 2024-04-22 20:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

There is an updated pull request by Nicop06 against master on the void-packages repository

https://github.com/Nicop06/void-packages sonic-pi
https://github.com/void-linux/void-packages/pull/49972

new package: sonic-pi
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)


A patch file from https://github.com/void-linux/void-packages/pull/49972.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sonic-pi-49972.patch --]
[-- Type: text/x-diff, Size: 12518 bytes --]

From 415594a0e946ef6e436af512a931f6650346555d Mon Sep 17 00:00:00 2001
From: Nicolas Porcel <nicolasporcel06@gmail.com>
Date: Sun, 26 Feb 2023 21:26:34 +0000
Subject: [PATCH] new package: sonic-pi

---
 common/shlibs                                 |  4 +
 .../patches/add_missing_include.patch         | 12 +++
 srcpkgs/crossguid-git/template                | 27 +++++++
 srcpkgs/gl3w-git/template                     | 19 +++++
 srcpkgs/kissfft-devel                         |  1 +
 srcpkgs/kissfft/template                      | 30 +++++++
 srcpkgs/platform_folders-devel                |  1 +
 srcpkgs/platform_folders/template             | 25 ++++++
 srcpkgs/reproc++                              |  1 +
 srcpkgs/reproc++-devel                        |  1 +
 srcpkgs/reproc-devel                          |  1 +
 srcpkgs/reproc/template                       | 41 ++++++++++
 srcpkgs/sonic-pi/files/sonic-pi               |  3 +
 srcpkgs/sonic-pi/template                     | 81 +++++++++++++++++++
 14 files changed, 247 insertions(+)
 create mode 100644 srcpkgs/crossguid-git/patches/add_missing_include.patch
 create mode 100644 srcpkgs/crossguid-git/template
 create mode 100644 srcpkgs/gl3w-git/template
 create mode 120000 srcpkgs/kissfft-devel
 create mode 100644 srcpkgs/kissfft/template
 create mode 120000 srcpkgs/platform_folders-devel
 create mode 100644 srcpkgs/platform_folders/template
 create mode 120000 srcpkgs/reproc++
 create mode 120000 srcpkgs/reproc++-devel
 create mode 120000 srcpkgs/reproc-devel
 create mode 100644 srcpkgs/reproc/template
 create mode 100644 srcpkgs/sonic-pi/files/sonic-pi
 create mode 100644 srcpkgs/sonic-pi/template

diff --git a/common/shlibs b/common/shlibs
index 4fe3b26a2e0378..60f33e285ace6b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4305,3 +4305,7 @@ libmsgraph-0.so.1 msgraph-0.2.1_1
 libgtk-session-lock.so.0 gtk-session-lock-0.2.0_1
 libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
+libplatform_folders.so platform_folders-4.2.0_1
+libreproc.so.14 reproc-14.2.5_1
+libreproc++.so.14 reproc++-14.2.5_1
+libkissfft-float.so.131 kissfft-131.1.0_1
diff --git a/srcpkgs/crossguid-git/patches/add_missing_include.patch b/srcpkgs/crossguid-git/patches/add_missing_include.patch
new file mode 100644
index 00000000000000..4e0c24c2a11438
--- /dev/null
+++ b/srcpkgs/crossguid-git/patches/add_missing_include.patch
@@ -0,0 +1,12 @@
+Index: crossguid-git-201900529/include/crossguid/guid.hpp
+===================================================================
+--- crossguid-git-201900529.orig/include/crossguid/guid.hpp
++++ crossguid-git-201900529/include/crossguid/guid.hpp
+@@ -29,6 +29,7 @@ THE SOFTWARE.
+ #include <jni.h>
+ #endif
+ 
++#include <cstdint>
+ #include <functional>
+ #include <iostream>
+ #include <array>
diff --git a/srcpkgs/crossguid-git/template b/srcpkgs/crossguid-git/template
new file mode 100644
index 00000000000000..bc731b6dae7eed
--- /dev/null
+++ b/srcpkgs/crossguid-git/template
@@ -0,0 +1,27 @@
+# Template file for 'crossguid-git'
+pkgname=crossguid-git
+version=201900529
+revision=1
+build_style=cmake
+hostmakedepends="git"
+makedepends="libuuid-devel"
+short_desc="Lightweight cross platform C++ GUID/UUID library (git)"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/graeme-hill/crossguid"
+_commit_id=ca1bf4b810e2d188d04cb6286f957008ee1b7681
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout ${_commit_id}
+}
+
+do_install() {
+	vlicense LICENSE
+	vinstall build/libcrossguid.a 644 usr/lib
+	vinstall include/crossguid/guid.hpp 644 usr/include/crossguid
+
+	vmkdir usr/lib/cmake/crossguid
+	vcopy build/CMakeFiles/Export/*/crossguid-config*.cmake usr/lib/cmake/crossguid
+}
diff --git a/srcpkgs/gl3w-git/template b/srcpkgs/gl3w-git/template
new file mode 100644
index 00000000000000..ed3f2158f55771
--- /dev/null
+++ b/srcpkgs/gl3w-git/template
@@ -0,0 +1,19 @@
+# Template file for 'gl3w-git'
+pkgname=gl3w-git
+version=20231010
+revision=1
+build_style=cmake
+hostmakedepends="git"
+makedepends="MesaLib-devel python3"
+depends="mesa"
+short_desc="Simple OpenGL core profile loading"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="Unlicense"
+homepage="https://github.com/skaslev/gl3w"
+_commit_id=3a33275633ce4be433332dc776e6a5b3bdea6506
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout ${_commit_id}
+}
diff --git a/srcpkgs/kissfft-devel b/srcpkgs/kissfft-devel
new file mode 120000
index 00000000000000..55f4052fc4c657
--- /dev/null
+++ b/srcpkgs/kissfft-devel
@@ -0,0 +1 @@
+kissfft
\ No newline at end of file
diff --git a/srcpkgs/kissfft/template b/srcpkgs/kissfft/template
new file mode 100644
index 00000000000000..0fcf368035cd65
--- /dev/null
+++ b/srcpkgs/kissfft/template
@@ -0,0 +1,30 @@
+# Template file for 'kissfft'
+pkgname=kissfft
+version=131.1.0
+revision=1
+build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DKISSFFT_OPENMP=OFF -DKISSFFT_PKGCONFIG=ON"
+makedepends="python3 libpng-devel fftw-devel pkg-config"
+depends="libpng"
+checkdepends="python3-numpy"
+short_desc="Fast Fourier Transform (FFT) library"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="BSD-3-Clause,Unlicense"
+homepage="https://github.com/mborgerding/kissfft"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@a772a3a982bdbb515695d705bf7f4e2632a671af3144839479ce3813fe5223be
+
+post_install() {
+	vlicense LICENSES/BSD-3-Clause
+}
+
+kissfft-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/*.so
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/pkgconfig
+	}
+}
diff --git a/srcpkgs/platform_folders-devel b/srcpkgs/platform_folders-devel
new file mode 120000
index 00000000000000..68c09f7e4c01ef
--- /dev/null
+++ b/srcpkgs/platform_folders-devel
@@ -0,0 +1 @@
+platform_folders
\ No newline at end of file
diff --git a/srcpkgs/platform_folders/template b/srcpkgs/platform_folders/template
new file mode 100644
index 00000000000000..638b1d1572c8a1
--- /dev/null
+++ b/srcpkgs/platform_folders/template
@@ -0,0 +1,25 @@
+# Template file for 'platform_folders'
+pkgname=platform_folders
+version=4.2.0
+revision=1
+build_style=cmake
+configure_args="-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPLATFORMFOLDERS_ENABLE_INSTALL=ON"
+short_desc="C++ library to look for user directories"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/sago007/PlatformFolders"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@368af4106c2aff0b46f0bb23b6460d6600eaafb2b5db786f05f2ca8e9be5a2fd
+
+post_install() {
+	vlicense LICENSE
+}
+
+platform_folders-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+	}
+}
diff --git a/srcpkgs/reproc++ b/srcpkgs/reproc++
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc++-devel b/srcpkgs/reproc++-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc-devel b/srcpkgs/reproc-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc/template b/srcpkgs/reproc/template
new file mode 100644
index 00000000000000..9a8fa95fb06920
--- /dev/null
+++ b/srcpkgs/reproc/template
@@ -0,0 +1,41 @@
+# Template file for 'reproc'
+pkgname=reproc
+version=14.2.5
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DREPROC++=ON"
+short_desc="Cross-platform C99/C++11 process library"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/DaanDeMeyer/reproc"
+distfiles="https://github.com/DaanDeMeyer/reproc/archive/refs/tags/v${version}.tar.gz"
+checksum=@24f06d6ff393ed89400ee1d5aaff7ba97cf2a996c031083bde613ce937d9f163
+
+reproc-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc
+		vmove usr/lib/cmake/reproc
+		vmove usr/lib/pkgconfig/reproc.pc
+		vmove usr/lib/libreproc.so
+	}
+}
+
+reproc++_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/libreproc++.so.*
+	}
+}
+
+reproc++-devel_package() {
+	short_desc="${short_desc} (development files)"
+	depends="${sourcepkg}-devel>=${version}_${revision} ${sourcepkg}++>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc++
+		vmove usr/lib/cmake/reproc++
+		vmove usr/lib/pkgconfig/reproc++.pc
+		vmove usr/lib/libreproc++.so
+	}
+}
diff --git a/srcpkgs/sonic-pi/files/sonic-pi b/srcpkgs/sonic-pi/files/sonic-pi
new file mode 100644
index 00000000000000..eb75fd702c61df
--- /dev/null
+++ b/srcpkgs/sonic-pi/files/sonic-pi
@@ -0,0 +1,3 @@
+#/usr/bin/env sh
+
+exec /opt/sonic-pi/bin/sonic-pi
diff --git a/srcpkgs/sonic-pi/template b/srcpkgs/sonic-pi/template
new file mode 100644
index 00000000000000..84b212322a70a3
--- /dev/null
+++ b/srcpkgs/sonic-pi/template
@@ -0,0 +1,81 @@
+# Template file for 'sonic-pi'
+pkgname=sonic-pi
+version=4.5.0
+revision=1
+archs="i686 x86_64"
+build_style=cmake
+build_wrksrc="app"
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_IMGUI_INTERFACE=ON -DUSE_SYSTEM_LIBS=ON -DQSCINTILLA_INCLUDE_DIR=/usr/include/qt5 -DQSCINTILLA_LIBRARY=/usr/lib/libqscintilla2_qt5.so"
+makedepends="qscintilla-qt5-devel qt5-svg-devel SDL2-devel ruby-devel elixir pkg-config aubio-devel catch2 platform_folders-devel reproc++-devel kissfft-devel crossguid-git fmt-devel rtmidi-devel gl3w-git"
+depends="qscintilla-qt5 qt5-svg SDL2 supercollider sc3-plugins aubio platform_folders reproc++ kissfft fmt rtmidi ruby erlang libjack-pipewire"
+short_desc="Live Coding Music Synth for Everyone"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://sonic-pi.net/"
+distfiles="https://github.com/samaaron/${pkgname}/archive/v${version}.tar.gz"
+checksum=@3a958ca3c1bb429f5d3cafaee0ed82aae96d5152f06a6a40b1c04154b6291c17
+
+pre_configure() {
+	ruby server/ruby/bin/compile-extensions.rb
+	ruby server/ruby/bin/i18n-tool.rb -t
+
+	cp gui/qt/utils/ruby_help.tmpl gui/qt/utils/ruby_help.h
+	ruby server/ruby/bin/qt-doc.rb
+}
+
+post_build() {
+	cd ${wrksrc}/app/server/beam/tau
+	MIX_ENV=prod mix tau.release
+	erl -noinput -eval \
+		'lists:foreach(fun(F) -> beam_lib:strip(F) end, filelib:wildcard("app/server/beam/tau/**/*.beam"))' \
+		-s init stop
+	rm _build/prod/rel/tau/bin/tau.bat
+}
+
+do_install() {
+	cd ${wrksrc}
+
+	INSTALL_DIR=opt/${pkgname}
+	vmkdir ${INSTALL_DIR}
+
+	vcopy bin ${INSTALL_DIR}
+	vcopy etc ${INSTALL_DIR}
+
+	vmkdir ${INSTALL_DIR}/app
+	vcopy app/config ${INSTALL_DIR}/app
+	vcopy app/server/native ${INSTALL_DIR}/app/server
+
+	# Ruby
+	RUBY_DIR=app/server/ruby
+	vmkdir ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/*.rb ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/bin ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/lib ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/rb-native ${INSTALL_DIR}/${RUBY_DIR}
+	for ruby_vendor in ${RUBY_DIR}/vendor/*; do
+		vendor_name=$(basename $ruby_vendor)
+		vmkdir ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+		vcopy ${RUBY_DIR}/vendor/${vendor_name}/lib ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+	done
+
+	BEAM_DIR=app/server/beam/tau
+	BEAM_BUILD_DIR=${BEAM_DIR}/_build/prod
+	vmkdir ${INSTALL_DIR}/${BEAM_DIR}/_build
+	vcopy ${BEAM_BUILD_DIR} ${INSTALL_DIR}/${BEAM_BUILD_DIR}
+	vinstall ${BEAM_DIR}/boot-lin.sh 0755 ${INSTALL_DIR}/${BEAM_DIR}
+
+	GUI_DIR=app/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/lang ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/theme ${INSTALL_DIR}/${GUI_DIR}
+
+	GUI_BIN_DIR=app/build/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_BIN_DIR}
+	vinstall ${GUI_BIN_DIR}/sonic-pi 0755 ${INSTALL_DIR}/${GUI_BIN_DIR}
+
+	IMGUI_RES_DIR=app/gui/imgui/res
+	vmkdir ${INSTALL_DIR}/${IMGUI_RES_DIR}
+	vinstall ${IMGUI_RES_DIR}//Cousine-Regular.ttf 0644 ${INSTALL_DIR}/${IMGUI_RES_DIR}
+
+	vbin ${FILESDIR}/sonic-pi
+}

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

* Re: [PR PATCH] [Updated] new package: sonic-pi
  2024-04-21 23:16 [PR PATCH] new package: sonic-pi Nicop06
                   ` (4 preceding siblings ...)
  2024-04-22 20:39 ` Nicop06
@ 2024-04-22 20:43 ` Nicop06
  2024-04-22 21:10 ` Nicop06
  6 siblings, 0 replies; 8+ messages in thread
From: Nicop06 @ 2024-04-22 20:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

There is an updated pull request by Nicop06 against master on the void-packages repository

https://github.com/Nicop06/void-packages sonic-pi
https://github.com/void-linux/void-packages/pull/49972

new package: sonic-pi
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)


A patch file from https://github.com/void-linux/void-packages/pull/49972.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sonic-pi-49972.patch --]
[-- Type: text/x-diff, Size: 12539 bytes --]

From f5cc40bc418018f10554bc3c9b1094080efd5475 Mon Sep 17 00:00:00 2001
From: Nicolas Porcel <nicolasporcel06@gmail.com>
Date: Sun, 26 Feb 2023 21:26:34 +0000
Subject: [PATCH] new package: sonic-pi

---
 common/shlibs                                 |  4 +
 .../patches/add_missing_include.patch         | 12 +++
 srcpkgs/crossguid-git/template                | 27 +++++++
 srcpkgs/gl3w-git/template                     | 20 +++++
 srcpkgs/kissfft-devel                         |  1 +
 srcpkgs/kissfft/template                      | 30 +++++++
 srcpkgs/platform_folders-devel                |  1 +
 srcpkgs/platform_folders/template             | 25 ++++++
 srcpkgs/reproc++                              |  1 +
 srcpkgs/reproc++-devel                        |  1 +
 srcpkgs/reproc-devel                          |  1 +
 srcpkgs/reproc/template                       | 41 ++++++++++
 srcpkgs/sonic-pi/files/sonic-pi               |  3 +
 srcpkgs/sonic-pi/template                     | 81 +++++++++++++++++++
 14 files changed, 248 insertions(+)
 create mode 100644 srcpkgs/crossguid-git/patches/add_missing_include.patch
 create mode 100644 srcpkgs/crossguid-git/template
 create mode 100644 srcpkgs/gl3w-git/template
 create mode 120000 srcpkgs/kissfft-devel
 create mode 100644 srcpkgs/kissfft/template
 create mode 120000 srcpkgs/platform_folders-devel
 create mode 100644 srcpkgs/platform_folders/template
 create mode 120000 srcpkgs/reproc++
 create mode 120000 srcpkgs/reproc++-devel
 create mode 120000 srcpkgs/reproc-devel
 create mode 100644 srcpkgs/reproc/template
 create mode 100644 srcpkgs/sonic-pi/files/sonic-pi
 create mode 100644 srcpkgs/sonic-pi/template

diff --git a/common/shlibs b/common/shlibs
index 4fe3b26a2e0378..60f33e285ace6b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4305,3 +4305,7 @@ libmsgraph-0.so.1 msgraph-0.2.1_1
 libgtk-session-lock.so.0 gtk-session-lock-0.2.0_1
 libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
+libplatform_folders.so platform_folders-4.2.0_1
+libreproc.so.14 reproc-14.2.5_1
+libreproc++.so.14 reproc++-14.2.5_1
+libkissfft-float.so.131 kissfft-131.1.0_1
diff --git a/srcpkgs/crossguid-git/patches/add_missing_include.patch b/srcpkgs/crossguid-git/patches/add_missing_include.patch
new file mode 100644
index 00000000000000..4e0c24c2a11438
--- /dev/null
+++ b/srcpkgs/crossguid-git/patches/add_missing_include.patch
@@ -0,0 +1,12 @@
+Index: crossguid-git-201900529/include/crossguid/guid.hpp
+===================================================================
+--- crossguid-git-201900529.orig/include/crossguid/guid.hpp
++++ crossguid-git-201900529/include/crossguid/guid.hpp
+@@ -29,6 +29,7 @@ THE SOFTWARE.
+ #include <jni.h>
+ #endif
+ 
++#include <cstdint>
+ #include <functional>
+ #include <iostream>
+ #include <array>
diff --git a/srcpkgs/crossguid-git/template b/srcpkgs/crossguid-git/template
new file mode 100644
index 00000000000000..bc731b6dae7eed
--- /dev/null
+++ b/srcpkgs/crossguid-git/template
@@ -0,0 +1,27 @@
+# Template file for 'crossguid-git'
+pkgname=crossguid-git
+version=201900529
+revision=1
+build_style=cmake
+hostmakedepends="git"
+makedepends="libuuid-devel"
+short_desc="Lightweight cross platform C++ GUID/UUID library (git)"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/graeme-hill/crossguid"
+_commit_id=ca1bf4b810e2d188d04cb6286f957008ee1b7681
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout ${_commit_id}
+}
+
+do_install() {
+	vlicense LICENSE
+	vinstall build/libcrossguid.a 644 usr/lib
+	vinstall include/crossguid/guid.hpp 644 usr/include/crossguid
+
+	vmkdir usr/lib/cmake/crossguid
+	vcopy build/CMakeFiles/Export/*/crossguid-config*.cmake usr/lib/cmake/crossguid
+}
diff --git a/srcpkgs/gl3w-git/template b/srcpkgs/gl3w-git/template
new file mode 100644
index 00000000000000..6a536a3c92e8a3
--- /dev/null
+++ b/srcpkgs/gl3w-git/template
@@ -0,0 +1,20 @@
+# Template file for 'gl3w-git'
+pkgname=gl3w-git
+version=20231010
+revision=1
+archs="i686 x86_64"
+build_style=cmake
+hostmakedepends="git"
+makedepends="MesaLib-devel python3"
+depends="mesa"
+short_desc="Simple OpenGL core profile loading"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="Unlicense"
+homepage="https://github.com/skaslev/gl3w"
+_commit_id=3a33275633ce4be433332dc776e6a5b3bdea6506
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout ${_commit_id}
+}
diff --git a/srcpkgs/kissfft-devel b/srcpkgs/kissfft-devel
new file mode 120000
index 00000000000000..55f4052fc4c657
--- /dev/null
+++ b/srcpkgs/kissfft-devel
@@ -0,0 +1 @@
+kissfft
\ No newline at end of file
diff --git a/srcpkgs/kissfft/template b/srcpkgs/kissfft/template
new file mode 100644
index 00000000000000..0fcf368035cd65
--- /dev/null
+++ b/srcpkgs/kissfft/template
@@ -0,0 +1,30 @@
+# Template file for 'kissfft'
+pkgname=kissfft
+version=131.1.0
+revision=1
+build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DKISSFFT_OPENMP=OFF -DKISSFFT_PKGCONFIG=ON"
+makedepends="python3 libpng-devel fftw-devel pkg-config"
+depends="libpng"
+checkdepends="python3-numpy"
+short_desc="Fast Fourier Transform (FFT) library"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="BSD-3-Clause,Unlicense"
+homepage="https://github.com/mborgerding/kissfft"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@a772a3a982bdbb515695d705bf7f4e2632a671af3144839479ce3813fe5223be
+
+post_install() {
+	vlicense LICENSES/BSD-3-Clause
+}
+
+kissfft-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/*.so
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/pkgconfig
+	}
+}
diff --git a/srcpkgs/platform_folders-devel b/srcpkgs/platform_folders-devel
new file mode 120000
index 00000000000000..68c09f7e4c01ef
--- /dev/null
+++ b/srcpkgs/platform_folders-devel
@@ -0,0 +1 @@
+platform_folders
\ No newline at end of file
diff --git a/srcpkgs/platform_folders/template b/srcpkgs/platform_folders/template
new file mode 100644
index 00000000000000..638b1d1572c8a1
--- /dev/null
+++ b/srcpkgs/platform_folders/template
@@ -0,0 +1,25 @@
+# Template file for 'platform_folders'
+pkgname=platform_folders
+version=4.2.0
+revision=1
+build_style=cmake
+configure_args="-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPLATFORMFOLDERS_ENABLE_INSTALL=ON"
+short_desc="C++ library to look for user directories"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/sago007/PlatformFolders"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@368af4106c2aff0b46f0bb23b6460d6600eaafb2b5db786f05f2ca8e9be5a2fd
+
+post_install() {
+	vlicense LICENSE
+}
+
+platform_folders-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+	}
+}
diff --git a/srcpkgs/reproc++ b/srcpkgs/reproc++
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc++-devel b/srcpkgs/reproc++-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc-devel b/srcpkgs/reproc-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc/template b/srcpkgs/reproc/template
new file mode 100644
index 00000000000000..9a8fa95fb06920
--- /dev/null
+++ b/srcpkgs/reproc/template
@@ -0,0 +1,41 @@
+# Template file for 'reproc'
+pkgname=reproc
+version=14.2.5
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DREPROC++=ON"
+short_desc="Cross-platform C99/C++11 process library"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/DaanDeMeyer/reproc"
+distfiles="https://github.com/DaanDeMeyer/reproc/archive/refs/tags/v${version}.tar.gz"
+checksum=@24f06d6ff393ed89400ee1d5aaff7ba97cf2a996c031083bde613ce937d9f163
+
+reproc-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc
+		vmove usr/lib/cmake/reproc
+		vmove usr/lib/pkgconfig/reproc.pc
+		vmove usr/lib/libreproc.so
+	}
+}
+
+reproc++_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/libreproc++.so.*
+	}
+}
+
+reproc++-devel_package() {
+	short_desc="${short_desc} (development files)"
+	depends="${sourcepkg}-devel>=${version}_${revision} ${sourcepkg}++>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc++
+		vmove usr/lib/cmake/reproc++
+		vmove usr/lib/pkgconfig/reproc++.pc
+		vmove usr/lib/libreproc++.so
+	}
+}
diff --git a/srcpkgs/sonic-pi/files/sonic-pi b/srcpkgs/sonic-pi/files/sonic-pi
new file mode 100644
index 00000000000000..eb75fd702c61df
--- /dev/null
+++ b/srcpkgs/sonic-pi/files/sonic-pi
@@ -0,0 +1,3 @@
+#/usr/bin/env sh
+
+exec /opt/sonic-pi/bin/sonic-pi
diff --git a/srcpkgs/sonic-pi/template b/srcpkgs/sonic-pi/template
new file mode 100644
index 00000000000000..84b212322a70a3
--- /dev/null
+++ b/srcpkgs/sonic-pi/template
@@ -0,0 +1,81 @@
+# Template file for 'sonic-pi'
+pkgname=sonic-pi
+version=4.5.0
+revision=1
+archs="i686 x86_64"
+build_style=cmake
+build_wrksrc="app"
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_IMGUI_INTERFACE=ON -DUSE_SYSTEM_LIBS=ON -DQSCINTILLA_INCLUDE_DIR=/usr/include/qt5 -DQSCINTILLA_LIBRARY=/usr/lib/libqscintilla2_qt5.so"
+makedepends="qscintilla-qt5-devel qt5-svg-devel SDL2-devel ruby-devel elixir pkg-config aubio-devel catch2 platform_folders-devel reproc++-devel kissfft-devel crossguid-git fmt-devel rtmidi-devel gl3w-git"
+depends="qscintilla-qt5 qt5-svg SDL2 supercollider sc3-plugins aubio platform_folders reproc++ kissfft fmt rtmidi ruby erlang libjack-pipewire"
+short_desc="Live Coding Music Synth for Everyone"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://sonic-pi.net/"
+distfiles="https://github.com/samaaron/${pkgname}/archive/v${version}.tar.gz"
+checksum=@3a958ca3c1bb429f5d3cafaee0ed82aae96d5152f06a6a40b1c04154b6291c17
+
+pre_configure() {
+	ruby server/ruby/bin/compile-extensions.rb
+	ruby server/ruby/bin/i18n-tool.rb -t
+
+	cp gui/qt/utils/ruby_help.tmpl gui/qt/utils/ruby_help.h
+	ruby server/ruby/bin/qt-doc.rb
+}
+
+post_build() {
+	cd ${wrksrc}/app/server/beam/tau
+	MIX_ENV=prod mix tau.release
+	erl -noinput -eval \
+		'lists:foreach(fun(F) -> beam_lib:strip(F) end, filelib:wildcard("app/server/beam/tau/**/*.beam"))' \
+		-s init stop
+	rm _build/prod/rel/tau/bin/tau.bat
+}
+
+do_install() {
+	cd ${wrksrc}
+
+	INSTALL_DIR=opt/${pkgname}
+	vmkdir ${INSTALL_DIR}
+
+	vcopy bin ${INSTALL_DIR}
+	vcopy etc ${INSTALL_DIR}
+
+	vmkdir ${INSTALL_DIR}/app
+	vcopy app/config ${INSTALL_DIR}/app
+	vcopy app/server/native ${INSTALL_DIR}/app/server
+
+	# Ruby
+	RUBY_DIR=app/server/ruby
+	vmkdir ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/*.rb ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/bin ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/lib ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/rb-native ${INSTALL_DIR}/${RUBY_DIR}
+	for ruby_vendor in ${RUBY_DIR}/vendor/*; do
+		vendor_name=$(basename $ruby_vendor)
+		vmkdir ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+		vcopy ${RUBY_DIR}/vendor/${vendor_name}/lib ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+	done
+
+	BEAM_DIR=app/server/beam/tau
+	BEAM_BUILD_DIR=${BEAM_DIR}/_build/prod
+	vmkdir ${INSTALL_DIR}/${BEAM_DIR}/_build
+	vcopy ${BEAM_BUILD_DIR} ${INSTALL_DIR}/${BEAM_BUILD_DIR}
+	vinstall ${BEAM_DIR}/boot-lin.sh 0755 ${INSTALL_DIR}/${BEAM_DIR}
+
+	GUI_DIR=app/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/lang ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/theme ${INSTALL_DIR}/${GUI_DIR}
+
+	GUI_BIN_DIR=app/build/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_BIN_DIR}
+	vinstall ${GUI_BIN_DIR}/sonic-pi 0755 ${INSTALL_DIR}/${GUI_BIN_DIR}
+
+	IMGUI_RES_DIR=app/gui/imgui/res
+	vmkdir ${INSTALL_DIR}/${IMGUI_RES_DIR}
+	vinstall ${IMGUI_RES_DIR}//Cousine-Regular.ttf 0644 ${INSTALL_DIR}/${IMGUI_RES_DIR}
+
+	vbin ${FILESDIR}/sonic-pi
+}

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

* Re: [PR PATCH] [Updated] new package: sonic-pi
  2024-04-21 23:16 [PR PATCH] new package: sonic-pi Nicop06
                   ` (5 preceding siblings ...)
  2024-04-22 20:43 ` Nicop06
@ 2024-04-22 21:10 ` Nicop06
  6 siblings, 0 replies; 8+ messages in thread
From: Nicop06 @ 2024-04-22 21:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

There is an updated pull request by Nicop06 against master on the void-packages repository

https://github.com/Nicop06/void-packages sonic-pi
https://github.com/void-linux/void-packages/pull/49972

new package: sonic-pi
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)


A patch file from https://github.com/void-linux/void-packages/pull/49972.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sonic-pi-49972.patch --]
[-- Type: text/x-diff, Size: 12555 bytes --]

From 58fc0af435bbfcb7066269ddd4dd318dd66afbad Mon Sep 17 00:00:00 2001
From: Nicolas Porcel <nicolasporcel06@gmail.com>
Date: Sun, 26 Feb 2023 21:26:34 +0000
Subject: [PATCH] new package: sonic-pi

---
 common/shlibs                                 |  4 +
 .../patches/add_missing_include.patch         | 12 +++
 srcpkgs/crossguid-git/template                | 27 +++++++
 srcpkgs/gl3w-git/template                     | 20 +++++
 srcpkgs/kissfft-devel                         |  1 +
 srcpkgs/kissfft/template                      | 31 +++++++
 srcpkgs/platform_folders-devel                |  1 +
 srcpkgs/platform_folders/template             | 25 ++++++
 srcpkgs/reproc++                              |  1 +
 srcpkgs/reproc++-devel                        |  1 +
 srcpkgs/reproc-devel                          |  1 +
 srcpkgs/reproc/template                       | 41 ++++++++++
 srcpkgs/sonic-pi/files/sonic-pi               |  3 +
 srcpkgs/sonic-pi/template                     | 81 +++++++++++++++++++
 14 files changed, 249 insertions(+)
 create mode 100644 srcpkgs/crossguid-git/patches/add_missing_include.patch
 create mode 100644 srcpkgs/crossguid-git/template
 create mode 100644 srcpkgs/gl3w-git/template
 create mode 120000 srcpkgs/kissfft-devel
 create mode 100644 srcpkgs/kissfft/template
 create mode 120000 srcpkgs/platform_folders-devel
 create mode 100644 srcpkgs/platform_folders/template
 create mode 120000 srcpkgs/reproc++
 create mode 120000 srcpkgs/reproc++-devel
 create mode 120000 srcpkgs/reproc-devel
 create mode 100644 srcpkgs/reproc/template
 create mode 100644 srcpkgs/sonic-pi/files/sonic-pi
 create mode 100644 srcpkgs/sonic-pi/template

diff --git a/common/shlibs b/common/shlibs
index 4fe3b26a2e0378..60f33e285ace6b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4305,3 +4305,7 @@ libmsgraph-0.so.1 msgraph-0.2.1_1
 libgtk-session-lock.so.0 gtk-session-lock-0.2.0_1
 libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
+libplatform_folders.so platform_folders-4.2.0_1
+libreproc.so.14 reproc-14.2.5_1
+libreproc++.so.14 reproc++-14.2.5_1
+libkissfft-float.so.131 kissfft-131.1.0_1
diff --git a/srcpkgs/crossguid-git/patches/add_missing_include.patch b/srcpkgs/crossguid-git/patches/add_missing_include.patch
new file mode 100644
index 00000000000000..4e0c24c2a11438
--- /dev/null
+++ b/srcpkgs/crossguid-git/patches/add_missing_include.patch
@@ -0,0 +1,12 @@
+Index: crossguid-git-201900529/include/crossguid/guid.hpp
+===================================================================
+--- crossguid-git-201900529.orig/include/crossguid/guid.hpp
++++ crossguid-git-201900529/include/crossguid/guid.hpp
+@@ -29,6 +29,7 @@ THE SOFTWARE.
+ #include <jni.h>
+ #endif
+ 
++#include <cstdint>
+ #include <functional>
+ #include <iostream>
+ #include <array>
diff --git a/srcpkgs/crossguid-git/template b/srcpkgs/crossguid-git/template
new file mode 100644
index 00000000000000..bc731b6dae7eed
--- /dev/null
+++ b/srcpkgs/crossguid-git/template
@@ -0,0 +1,27 @@
+# Template file for 'crossguid-git'
+pkgname=crossguid-git
+version=201900529
+revision=1
+build_style=cmake
+hostmakedepends="git"
+makedepends="libuuid-devel"
+short_desc="Lightweight cross platform C++ GUID/UUID library (git)"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/graeme-hill/crossguid"
+_commit_id=ca1bf4b810e2d188d04cb6286f957008ee1b7681
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout ${_commit_id}
+}
+
+do_install() {
+	vlicense LICENSE
+	vinstall build/libcrossguid.a 644 usr/lib
+	vinstall include/crossguid/guid.hpp 644 usr/include/crossguid
+
+	vmkdir usr/lib/cmake/crossguid
+	vcopy build/CMakeFiles/Export/*/crossguid-config*.cmake usr/lib/cmake/crossguid
+}
diff --git a/srcpkgs/gl3w-git/template b/srcpkgs/gl3w-git/template
new file mode 100644
index 00000000000000..6a536a3c92e8a3
--- /dev/null
+++ b/srcpkgs/gl3w-git/template
@@ -0,0 +1,20 @@
+# Template file for 'gl3w-git'
+pkgname=gl3w-git
+version=20231010
+revision=1
+archs="i686 x86_64"
+build_style=cmake
+hostmakedepends="git"
+makedepends="MesaLib-devel python3"
+depends="mesa"
+short_desc="Simple OpenGL core profile loading"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="Unlicense"
+homepage="https://github.com/skaslev/gl3w"
+_commit_id=3a33275633ce4be433332dc776e6a5b3bdea6506
+
+do_fetch() {
+	git clone $homepage $wrksrc
+	cd $wrksrc
+	git checkout ${_commit_id}
+}
diff --git a/srcpkgs/kissfft-devel b/srcpkgs/kissfft-devel
new file mode 120000
index 00000000000000..55f4052fc4c657
--- /dev/null
+++ b/srcpkgs/kissfft-devel
@@ -0,0 +1 @@
+kissfft
\ No newline at end of file
diff --git a/srcpkgs/kissfft/template b/srcpkgs/kissfft/template
new file mode 100644
index 00000000000000..aa00325d753217
--- /dev/null
+++ b/srcpkgs/kissfft/template
@@ -0,0 +1,31 @@
+# Template file for 'kissfft'
+pkgname=kissfft
+version=131.1.0
+revision=1
+archs="i686 x86_64"
+build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DKISSFFT_OPENMP=OFF -DKISSFFT_PKGCONFIG=ON"
+makedepends="python3 libpng-devel fftw-devel pkg-config"
+depends="libpng"
+checkdepends="python3-numpy"
+short_desc="Fast Fourier Transform (FFT) library"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="BSD-3-Clause,Unlicense"
+homepage="https://github.com/mborgerding/kissfft"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@a772a3a982bdbb515695d705bf7f4e2632a671af3144839479ce3813fe5223be
+
+post_install() {
+	vlicense LICENSES/BSD-3-Clause
+}
+
+kissfft-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/*.so
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/pkgconfig
+	}
+}
diff --git a/srcpkgs/platform_folders-devel b/srcpkgs/platform_folders-devel
new file mode 120000
index 00000000000000..68c09f7e4c01ef
--- /dev/null
+++ b/srcpkgs/platform_folders-devel
@@ -0,0 +1 @@
+platform_folders
\ No newline at end of file
diff --git a/srcpkgs/platform_folders/template b/srcpkgs/platform_folders/template
new file mode 100644
index 00000000000000..638b1d1572c8a1
--- /dev/null
+++ b/srcpkgs/platform_folders/template
@@ -0,0 +1,25 @@
+# Template file for 'platform_folders'
+pkgname=platform_folders
+version=4.2.0
+revision=1
+build_style=cmake
+configure_args="-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPLATFORMFOLDERS_ENABLE_INSTALL=ON"
+short_desc="C++ library to look for user directories"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="MIT"
+homepage="https://github.com/sago007/PlatformFolders"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=@368af4106c2aff0b46f0bb23b6460d6600eaafb2b5db786f05f2ca8e9be5a2fd
+
+post_install() {
+	vlicense LICENSE
+}
+
+platform_folders-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+	}
+}
diff --git a/srcpkgs/reproc++ b/srcpkgs/reproc++
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc++-devel b/srcpkgs/reproc++-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc++-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc-devel b/srcpkgs/reproc-devel
new file mode 120000
index 00000000000000..ea2ee2920788c1
--- /dev/null
+++ b/srcpkgs/reproc-devel
@@ -0,0 +1 @@
+reproc
\ No newline at end of file
diff --git a/srcpkgs/reproc/template b/srcpkgs/reproc/template
new file mode 100644
index 00000000000000..9a8fa95fb06920
--- /dev/null
+++ b/srcpkgs/reproc/template
@@ -0,0 +1,41 @@
+# Template file for 'reproc'
+pkgname=reproc
+version=14.2.5
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DREPROC++=ON"
+short_desc="Cross-platform C99/C++11 process library"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/DaanDeMeyer/reproc"
+distfiles="https://github.com/DaanDeMeyer/reproc/archive/refs/tags/v${version}.tar.gz"
+checksum=@24f06d6ff393ed89400ee1d5aaff7ba97cf2a996c031083bde613ce937d9f163
+
+reproc-devel_package() {
+	short_desc+=" (development files)"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc
+		vmove usr/lib/cmake/reproc
+		vmove usr/lib/pkgconfig/reproc.pc
+		vmove usr/lib/libreproc.so
+	}
+}
+
+reproc++_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/libreproc++.so.*
+	}
+}
+
+reproc++-devel_package() {
+	short_desc="${short_desc} (development files)"
+	depends="${sourcepkg}-devel>=${version}_${revision} ${sourcepkg}++>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include/reproc++
+		vmove usr/lib/cmake/reproc++
+		vmove usr/lib/pkgconfig/reproc++.pc
+		vmove usr/lib/libreproc++.so
+	}
+}
diff --git a/srcpkgs/sonic-pi/files/sonic-pi b/srcpkgs/sonic-pi/files/sonic-pi
new file mode 100644
index 00000000000000..eb75fd702c61df
--- /dev/null
+++ b/srcpkgs/sonic-pi/files/sonic-pi
@@ -0,0 +1,3 @@
+#/usr/bin/env sh
+
+exec /opt/sonic-pi/bin/sonic-pi
diff --git a/srcpkgs/sonic-pi/template b/srcpkgs/sonic-pi/template
new file mode 100644
index 00000000000000..bbd888ca75d1c0
--- /dev/null
+++ b/srcpkgs/sonic-pi/template
@@ -0,0 +1,81 @@
+# Template file for 'sonic-pi'
+pkgname=sonic-pi
+version=4.5.0
+revision=1
+archs="x86_64"
+build_style=cmake
+build_wrksrc="app"
+configure_args="-DCMAKE_BUILD_TYPE=Release -DBUILD_IMGUI_INTERFACE=ON -DUSE_SYSTEM_LIBS=ON -DQSCINTILLA_INCLUDE_DIR=/usr/include/qt5 -DQSCINTILLA_LIBRARY=/usr/lib/libqscintilla2_qt5.so"
+makedepends="qscintilla-qt5-devel qt5-svg-devel SDL2-devel ruby-devel elixir pkg-config aubio-devel catch2 platform_folders-devel reproc++-devel kissfft-devel crossguid-git fmt-devel rtmidi-devel gl3w-git"
+depends="qscintilla-qt5 qt5-svg SDL2 supercollider sc3-plugins aubio platform_folders reproc++ kissfft fmt rtmidi ruby erlang libjack-pipewire"
+short_desc="Live Coding Music Synth for Everyone"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://sonic-pi.net/"
+distfiles="https://github.com/samaaron/${pkgname}/archive/v${version}.tar.gz"
+checksum=@3a958ca3c1bb429f5d3cafaee0ed82aae96d5152f06a6a40b1c04154b6291c17
+
+pre_configure() {
+	ruby server/ruby/bin/compile-extensions.rb
+	ruby server/ruby/bin/i18n-tool.rb -t
+
+	cp gui/qt/utils/ruby_help.tmpl gui/qt/utils/ruby_help.h
+	ruby server/ruby/bin/qt-doc.rb
+}
+
+post_build() {
+	cd ${wrksrc}/app/server/beam/tau
+	MIX_ENV=prod mix tau.release
+	erl -noinput -eval \
+		'lists:foreach(fun(F) -> beam_lib:strip(F) end, filelib:wildcard("app/server/beam/tau/**/*.beam"))' \
+		-s init stop
+	rm _build/prod/rel/tau/bin/tau.bat
+}
+
+do_install() {
+	cd ${wrksrc}
+
+	INSTALL_DIR=opt/${pkgname}
+	vmkdir ${INSTALL_DIR}
+
+	vcopy bin ${INSTALL_DIR}
+	vcopy etc ${INSTALL_DIR}
+
+	vmkdir ${INSTALL_DIR}/app
+	vcopy app/config ${INSTALL_DIR}/app
+	vcopy app/server/native ${INSTALL_DIR}/app/server
+
+	# Ruby
+	RUBY_DIR=app/server/ruby
+	vmkdir ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/*.rb ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/bin ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/lib ${INSTALL_DIR}/${RUBY_DIR}
+	vcopy ${RUBY_DIR}/rb-native ${INSTALL_DIR}/${RUBY_DIR}
+	for ruby_vendor in ${RUBY_DIR}/vendor/*; do
+		vendor_name=$(basename $ruby_vendor)
+		vmkdir ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+		vcopy ${RUBY_DIR}/vendor/${vendor_name}/lib ${INSTALL_DIR}/${RUBY_DIR}/vendor/${vendor_name}
+	done
+
+	BEAM_DIR=app/server/beam/tau
+	BEAM_BUILD_DIR=${BEAM_DIR}/_build/prod
+	vmkdir ${INSTALL_DIR}/${BEAM_DIR}/_build
+	vcopy ${BEAM_BUILD_DIR} ${INSTALL_DIR}/${BEAM_BUILD_DIR}
+	vinstall ${BEAM_DIR}/boot-lin.sh 0755 ${INSTALL_DIR}/${BEAM_DIR}
+
+	GUI_DIR=app/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/lang ${INSTALL_DIR}/${GUI_DIR}
+	vcopy ${GUI_DIR}/theme ${INSTALL_DIR}/${GUI_DIR}
+
+	GUI_BIN_DIR=app/build/gui/qt
+	vmkdir ${INSTALL_DIR}/${GUI_BIN_DIR}
+	vinstall ${GUI_BIN_DIR}/sonic-pi 0755 ${INSTALL_DIR}/${GUI_BIN_DIR}
+
+	IMGUI_RES_DIR=app/gui/imgui/res
+	vmkdir ${INSTALL_DIR}/${IMGUI_RES_DIR}
+	vinstall ${IMGUI_RES_DIR}//Cousine-Regular.ttf 0644 ${INSTALL_DIR}/${IMGUI_RES_DIR}
+
+	vbin ${FILESDIR}/sonic-pi
+}

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

end of thread, other threads:[~2024-04-22 21:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-21 23:16 [PR PATCH] new package: sonic-pi Nicop06
2024-04-22 12:31 ` meator
2024-04-22 19:55 ` Nicop06
2024-04-22 19:55 ` [PR PATCH] [Updated] " Nicop06
2024-04-22 20:21 ` Nicop06
2024-04-22 20:39 ` Nicop06
2024-04-22 20:43 ` Nicop06
2024-04-22 21:10 ` Nicop06

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 NNTP newsgroup(s).