Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: wings-2.3
@ 2024-02-08 11:29 MIvanchev
  2024-02-08 12:00 ` [PR PATCH] [Updated] " MIvanchev
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 11:29 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From c56f8258eb1258a271c7f0528df2c728a529d281 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 +++++++++++++++++++
 srcpkgs/erlang-cl/template                | 31 +++++++++++++++++++++++
 srcpkgs/wings/files/wings                 |  8 ++++++
 srcpkgs/wings/files/wings.desktop         |  9 +++++++
 srcpkgs/wings/files/wings.rc              | 15 +++++++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 +++++++++++
 srcpkgs/wings/template                    | 29 +++++++++++++++++++++
 7 files changed, 133 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..e10099de15214
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Wings 3D
+Comment=A subdivision polygon modeler
+Exec=/usr/bin/wings -detached
+Terminal=false
+Type=Application
+Icon=wings
+Categories=Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..1a33b1fa4f119
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,29 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Wings 3D is an advanced subdivision modeler that is both powerful and easy to use."
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="Tcl/Tk"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}{/ebin,/plugins,/shaders,/textures}
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
@ 2024-02-08 12:00 ` MIvanchev
  2024-02-08 12:52 ` MIvanchev
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 12:00 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From 5d69e0d952aec34445091f29fa1b2fe895ee00f7 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 ++++++++++++++++++
 srcpkgs/erlang-cl/template                | 31 +++++++++++++++++++++
 srcpkgs/wings/files/wings                 |  8 ++++++
 srcpkgs/wings/files/wings.desktop         |  9 +++++++
 srcpkgs/wings/files/wings.rc              | 15 +++++++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 +++++++++++
 srcpkgs/wings/template                    | 33 +++++++++++++++++++++++
 7 files changed, 137 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..e10099de15214
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Wings 3D
+Comment=A subdivision polygon modeler
+Exec=/usr/bin/wings -detached
+Terminal=false
+Type=Application
+Icon=wings
+Categories=Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..92d914d3c183e
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,33 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+
+pre_build() {
+	CFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}{/ebin,/plugins,/shaders,/textures}
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
  2024-02-08 12:00 ` [PR PATCH] [Updated] " MIvanchev
@ 2024-02-08 12:52 ` MIvanchev
  2024-02-08 13:11 ` MIvanchev
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 12:52 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From 678789b155dd24201a047667dc878721361c76ce Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 ++++++++++++++++
 srcpkgs/erlang-cl/template                | 31 +++++++++++++++++++
 srcpkgs/wings/files/wings                 |  8 +++++
 srcpkgs/wings/files/wings.desktop         |  9 ++++++
 srcpkgs/wings/files/wings.rc              | 15 ++++++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 ++++++++++
 srcpkgs/wings/template                    | 36 +++++++++++++++++++++++
 7 files changed, 140 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..e10099de15214
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Wings 3D
+Comment=A subdivision polygon modeler
+Exec=/usr/bin/wings -detached
+Terminal=false
+Type=Application
+Icon=wings
+Categories=Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..43e406292a549
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,36 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+
+pre_build() {
+	find -iname "*.erl" -exec sed -i "{}" -e "s;\(-include_lib(.wings\)/;\1-${version}/;" \;
+	find -iname "*.hrl" -exec sed -i "{}" -e "s;\(-include_lib(.wings\)/;\1-${version}/;" \;
+	sed -i "s;\(ERL_FLAGS += -pa ../../wings\)/ebin;\1-${version}/;" icons/Makefile
+	CFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}{/ebin,/plugins,/shaders,/textures}
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
  2024-02-08 12:00 ` [PR PATCH] [Updated] " MIvanchev
  2024-02-08 12:52 ` MIvanchev
@ 2024-02-08 13:11 ` MIvanchev
  2024-02-08 13:56 ` MIvanchev
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 13:11 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From 6a700a9228465850ebbd248d5d2004962148c7d3 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 ++++++++++++++++
 srcpkgs/erlang-cl/template                | 31 +++++++++++++++++++
 srcpkgs/wings/files/wings                 |  8 +++++
 srcpkgs/wings/files/wings.desktop         |  9 ++++++
 srcpkgs/wings/files/wings.rc              | 15 +++++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 +++++++++
 srcpkgs/wings/template                    | 37 +++++++++++++++++++++++
 7 files changed, 141 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..e10099de15214
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Wings 3D
+Comment=A subdivision polygon modeler
+Exec=/usr/bin/wings -detached
+Terminal=false
+Type=Application
+Icon=wings
+Categories=Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..68e236e76d966
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,37 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+
+pre_build() {
+	find -iname "*.erl" -exec sed -i "{}" -e "s;\(-include_lib(.wings\)/;\1-${version}/;" \;
+	find -iname "*.hrl" -exec sed -i "{}" -e "s;\(-include_lib(.wings\)/;\1-${version}/;" \;
+	sed -i "s;\(ERL_FLAGS += -pa ../../wings\)/ebin;\1-${version}/;" icons/Makefile
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}{/ebin,/plugins,/shaders,/textures}
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (2 preceding siblings ...)
  2024-02-08 13:11 ` MIvanchev
@ 2024-02-08 13:56 ` MIvanchev
  2024-02-08 14:08 ` MIvanchev
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 13:56 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From 3e243222e192540bcb3948e7db5a64040dee6c30 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 ++++++++++++++++
 srcpkgs/erlang-cl/template                | 31 ++++++++++++++++++
 srcpkgs/wings/files/wings                 |  8 +++++
 srcpkgs/wings/files/wings.desktop         |  9 ++++++
 srcpkgs/wings/files/wings.rc              | 15 +++++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 +++++++++
 srcpkgs/wings/template                    | 38 +++++++++++++++++++++++
 7 files changed, 142 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..e10099de15214
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Wings 3D
+Comment=A subdivision polygon modeler
+Exec=/usr/bin/wings -detached
+Terminal=false
+Type=Application
+Icon=wings
+Categories=Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..01d98ab106a1c
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,38 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+
+pre_build() {
+	find -iname "*.erl" -exec sed -i "{}" -e "s;\(-include_lib(.wings\)/;\1-${version}/;" \;
+	find -iname "*.hrl" -exec sed -i "{}" -e "s;\(-include_lib(.wings\)/;\1-${version}/;" \;
+	sed -i "s;\(ERL_FLAGS += -pa ../../wings\)/ebin;\1-${version}/;" icons/Makefile
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}{/ebin,/plugins,/shaders,/textures}
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (3 preceding siblings ...)
  2024-02-08 13:56 ` MIvanchev
@ 2024-02-08 14:08 ` MIvanchev
  2024-02-08 14:54 ` MIvanchev
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 14:08 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From b36effa197d3f86d5a4f77c417d64660281fb942 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 ++++++++++++++
 srcpkgs/erlang-cl/template                | 31 ++++++++++++++++
 srcpkgs/wings/files/wings                 |  8 +++++
 srcpkgs/wings/files/wings.desktop         |  9 +++++
 srcpkgs/wings/files/wings.rc              | 15 ++++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 ++++++++
 srcpkgs/wings/template                    | 44 +++++++++++++++++++++++
 7 files changed, 148 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..e10099de15214
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Wings 3D
+Comment=A subdivision polygon modeler
+Exec=/usr/bin/wings -detached
+Terminal=false
+Type=Application
+Icon=wings
+Categories=Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..17357773be2b4
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,44 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+create_wrksrc=yes
+build_wrksrc=wings
+
+post_extract() {
+	mv ${pkgname}-${version} ${build_wrksrc}
+}
+
+pre_build() {
+#	find -iname "*.erl" -exec sed -i "{}" -e "s;\(-include_lib(.wings\)/;\1-${version}/;" \;
+#	find -iname "*.hrl" -exec sed -i "{}" -e "s;\(-include_lib(.wings\)/;\1-${version}/;" \;
+#	sed -i "s;\(ERL_FLAGS += -pa ../../wings\)/ebin;\1-${version}/;" icons/Makefile
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}{/ebin,/plugins,/shaders,/textures}
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (4 preceding siblings ...)
  2024-02-08 14:08 ` MIvanchev
@ 2024-02-08 14:54 ` MIvanchev
  2024-02-08 15:04 ` MIvanchev
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 14:54 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From dc6e5593d00af1eb7ad40ba950df0d80e361d533 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 +++++++++++
 srcpkgs/erlang-cl/template                | 31 +++++++++++++
 srcpkgs/wings/files/wings                 |  8 ++++
 srcpkgs/wings/files/wings.desktop         |  9 ++++
 srcpkgs/wings/files/wings.rc              | 15 +++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 +++++++
 srcpkgs/wings/template                    | 54 +++++++++++++++++++++++
 7 files changed, 158 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..e10099de15214
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Wings 3D
+Comment=A subdivision polygon modeler
+Exec=/usr/bin/wings -detached
+Terminal=false
+Type=Application
+Icon=wings
+Categories=Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..c5b65ca42e815
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,54 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+create_wrksrc=yes
+build_wrksrc=wings
+
+post_extract() {
+	mv wings-2.3/* . && rm -rf wings-2.3
+	mkdir wings
+}
+
+post_patch() {
+	find ${wrksrc} -maxdepth 1 -not -iname "${build_wrksrc}" -exec mv "{}" "${wrksrc}/${build_wrksrc}/" \;
+}
+
+#post_patch() {
+#	cp -R ../${wrksrc}/* ../${build_wrksrc}
+#	cd ../${build_wrksrc}
+#}
+
+pre_build() {
+#	find -iname "*.erl" -exec sed -i "{}" -e "s;\(-include_lib(.wings\)/;\1-${version}/;" \;
+#	find -iname "*.hrl" -exec sed -i "{}" -e "s;\(-include_lib(.wings\)/;\1-${version}/;" \;
+#	sed -i "s;\(ERL_FLAGS += -pa ../../wings\)/ebin;\1-${version}/;" icons/Makefile
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}{/ebin,/plugins,/shaders,/textures}
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (5 preceding siblings ...)
  2024-02-08 14:54 ` MIvanchev
@ 2024-02-08 15:04 ` MIvanchev
  2024-02-08 15:39 ` MIvanchev
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 15:04 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From cbb66a742935b1ece33de4594f469394fc0ea5dc Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 ++++++++++++
 srcpkgs/erlang-cl/template                | 31 ++++++++++++++
 srcpkgs/wings/files/wings                 |  8 ++++
 srcpkgs/wings/files/wings.desktop         |  9 +++++
 srcpkgs/wings/files/wings.rc              | 15 +++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 +++++++
 srcpkgs/wings/template                    | 49 +++++++++++++++++++++++
 7 files changed, 153 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..e10099de15214
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Wings 3D
+Comment=A subdivision polygon modeler
+Exec=/usr/bin/wings -detached
+Terminal=false
+Type=Application
+Icon=wings
+Categories=Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..740acf54fb546
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,49 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+create_wrksrc=yes
+build_wrksrc=wings
+
+post_extract() {
+	mv "${pkgname}-${version}/*" . && rm -rf "${pkg-name}/${version}"
+	mkdir "${build_wrksrc}"
+}
+
+post_patch() {
+	find "${wrksrc}" -maxdepth 1 -not -iname "${build_wrksrc}" -exec mv "{}" "${wrksrc}/${build_wrksrc}/" \;
+}
+
+pre_build() {
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}/ebin
+	vmkdir opt/${pkgname}/plugins
+	vmkdir opt/${pkgname}/shaders
+	vmkdir opt/${pkgname}/textures
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (6 preceding siblings ...)
  2024-02-08 15:04 ` MIvanchev
@ 2024-02-08 15:39 ` MIvanchev
  2024-02-08 15:56 ` MIvanchev
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 15:39 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From 048aad05e8d7487838d746320525e07e5fa7f6a3 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 ++++++++++++
 srcpkgs/erlang-cl/template                | 31 ++++++++++++++
 srcpkgs/wings/files/wings                 |  8 ++++
 srcpkgs/wings/files/wings.desktop         |  9 +++++
 srcpkgs/wings/files/wings.rc              | 15 +++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 +++++++
 srcpkgs/wings/template                    | 49 +++++++++++++++++++++++
 7 files changed, 153 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..e10099de15214
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Wings 3D
+Comment=A subdivision polygon modeler
+Exec=/usr/bin/wings -detached
+Terminal=false
+Type=Application
+Icon=wings
+Categories=Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..736baf1a5eeda
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,49 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+create_wrksrc=yes
+build_wrksrc=wings
+
+post_extract() {
+	mv ${pkgname}-${version}/* . && rm -rf ${pkg-name}/${version}
+	mkdir "${build_wrksrc}"
+}
+
+post_patch() {
+	find "${wrksrc}" -maxdepth 1 -not -iname "${build_wrksrc}" -exec mv "{}" "${wrksrc}/${build_wrksrc}/" \;
+}
+
+pre_build() {
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}/ebin
+	vmkdir opt/${pkgname}/plugins
+	vmkdir opt/${pkgname}/shaders
+	vmkdir opt/${pkgname}/textures
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (7 preceding siblings ...)
  2024-02-08 15:39 ` MIvanchev
@ 2024-02-08 15:56 ` MIvanchev
  2024-02-08 15:56 ` MIvanchev
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 15:56 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From 6c46719e1b4ddeff26393ae7fa4c2cd3804ace0a Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 +++++++++++
 srcpkgs/erlang-cl/template                | 31 +++++++++++++
 srcpkgs/wings/files/wings                 |  8 ++++
 srcpkgs/wings/files/wings.desktop         |  9 ++++
 srcpkgs/wings/files/wings.rc              | 15 +++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 +++++++
 srcpkgs/wings/template                    | 54 +++++++++++++++++++++++
 7 files changed, 158 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..e10099de15214
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Wings 3D
+Comment=A subdivision polygon modeler
+Exec=/usr/bin/wings -detached
+Terminal=false
+Type=Application
+Icon=wings
+Categories=Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..7a533aea4269f
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,54 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+create_wrksrc=yes
+build_wrksrc=wings
+
+# Wings 3D currently requires that the root directory is called "wings". To fullfil
+# this, we enable "create_wrksrc" and copy the contents of the build directory to
+# a directory called "wings" after the patching. One day hopefully this will no
+# longer be necessary.
+
+post_extract() {
+	mv ${pkgname}-${version}/* . && rm -rf ${pkg-name}/${version}
+	mkdir "${build_wrksrc}"
+}
+
+post_patch() {
+	find "${wrksrc}" -maxdepth 1 -not -iname "${build_wrksrc}" -exec mv "{}" "${wrksrc}/${build_wrksrc}/" \;
+}
+
+pre_build() {
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}/ebin
+	vmkdir opt/${pkgname}/plugins
+	vmkdir opt/${pkgname}/shaders
+	vmkdir opt/${pkgname}/textures
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (8 preceding siblings ...)
  2024-02-08 15:56 ` MIvanchev
@ 2024-02-08 15:56 ` MIvanchev
  2024-02-09  9:49 ` [PR PATCH] [Updated] " MIvanchev
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-08 15:56 UTC (permalink / raw)
  To: ml

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

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/48603#issuecomment-1934428866

Comment:
Closes #11250.

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (9 preceding siblings ...)
  2024-02-08 15:56 ` MIvanchev
@ 2024-02-09  9:49 ` MIvanchev
  2024-02-09 10:00 ` MIvanchev
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-09  9:49 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From 8d5a9543c739e756057b49be44933cb87551ab50 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 +++++++++++
 srcpkgs/erlang-cl/template                | 31 +++++++++++++
 srcpkgs/wings/files/wings                 |  8 ++++
 srcpkgs/wings/files/wings.desktop         | 11 +++++
 srcpkgs/wings/files/wings.rc              | 15 +++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 +++++++
 srcpkgs/wings/template                    | 54 +++++++++++++++++++++++
 7 files changed, 160 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..abaf99191b7e4
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Terminal=false
+Exec=/usr/bin/wings -detached
+Name=Wings 3D
+GenericName=A 3D Subdivision Modeler
+Comment=A 3D modeler that is both powerful and easy to use
+GenericName[en]=A 3D Subdivision Modeler
+Comment[en]=A 3D modeler that is both powerful and easy to use
+Categories=GNOME;GTK;Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..7a533aea4269f
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,54 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+create_wrksrc=yes
+build_wrksrc=wings
+
+# Wings 3D currently requires that the root directory is called "wings". To fullfil
+# this, we enable "create_wrksrc" and copy the contents of the build directory to
+# a directory called "wings" after the patching. One day hopefully this will no
+# longer be necessary.
+
+post_extract() {
+	mv ${pkgname}-${version}/* . && rm -rf ${pkg-name}/${version}
+	mkdir "${build_wrksrc}"
+}
+
+post_patch() {
+	find "${wrksrc}" -maxdepth 1 -not -iname "${build_wrksrc}" -exec mv "{}" "${wrksrc}/${build_wrksrc}/" \;
+}
+
+pre_build() {
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}/ebin
+	vmkdir opt/${pkgname}/plugins
+	vmkdir opt/${pkgname}/shaders
+	vmkdir opt/${pkgname}/textures
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (10 preceding siblings ...)
  2024-02-09  9:49 ` [PR PATCH] [Updated] " MIvanchev
@ 2024-02-09 10:00 ` MIvanchev
  2024-02-09 10:00 ` MIvanchev
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-09 10:00 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From e4a37d72ec76cffcfeaf0c5962ead0c320c5bc0d Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 +++++++++++
 srcpkgs/erlang-cl/template                | 31 +++++++++++++
 srcpkgs/wings/files/wings                 |  8 ++++
 srcpkgs/wings/files/wings.desktop         | 11 +++++
 srcpkgs/wings/files/wings.rc              | 15 ++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 ++++++
 srcpkgs/wings/template                    | 56 +++++++++++++++++++++++
 7 files changed, 162 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..abaf99191b7e4
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Terminal=false
+Exec=/usr/bin/wings -detached
+Name=Wings 3D
+GenericName=A 3D Subdivision Modeler
+Comment=A 3D modeler that is both powerful and easy to use
+GenericName[en]=A 3D Subdivision Modeler
+Comment[en]=A 3D modeler that is both powerful and easy to use
+Categories=GNOME;GTK;Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..78bc4d2761456
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,56 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+create_wrksrc=yes
+build_wrksrc=wings
+
+# Wings 3D currently requires that the root directory is called "wings". To fullfil
+# this, we enable "create_wrksrc" and copy the contents of the build directory to
+# a directory called "wings" after the patching. One day hopefully this will no
+# longer be necessary.
+
+post_extract() {
+	mv ${pkgname}-${version}/* . && rm -rf ${pkg-name}/${version}
+	mkdir "${build_wrksrc}"
+}
+
+post_patch() {
+	find "${wrksrc}" -maxdepth 1 -not -iname "${build_wrksrc}" -exec mv "{}" "${wrksrc}/${build_wrksrc}/" \;
+}
+
+pre_build() {
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}/ebin
+	vmkdir opt/${pkgname}/plugins
+	vmkdir opt/${pkgname}/shaders
+	vmkdir opt/${pkgname}/textures
+        vmkdir opt/${pkgname}/priv
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vcopy priv/* opt/${pkgname}/priv
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (11 preceding siblings ...)
  2024-02-09 10:00 ` MIvanchev
@ 2024-02-09 10:00 ` MIvanchev
  2024-02-09 10:11 ` MIvanchev
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-09 10:00 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From 24345bc79f8325626f142471d1a155299dd8f3a6 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 +++++++++++
 srcpkgs/erlang-cl/template                | 31 +++++++++++++
 srcpkgs/wings/files/wings                 |  8 ++++
 srcpkgs/wings/files/wings.desktop         | 12 +++++
 srcpkgs/wings/files/wings.rc              | 15 ++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 ++++++
 srcpkgs/wings/template                    | 56 +++++++++++++++++++++++
 7 files changed, 163 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..82f5e2b2d33b1
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Terminal=false
+Exec=/usr/bin/wings -detached
+Name=Wings 3D
+GenericName=A 3D Subdivision Modeler
+Comment=A 3D modeler that is both powerful and easy to use
+GenericName[en]=A 3D Subdivision Modeler
+Comment[en]=A 3D modeler that is both powerful and easy to use
+Icon=wings
+Categories=GNOME;GTK;Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..78bc4d2761456
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,56 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+create_wrksrc=yes
+build_wrksrc=wings
+
+# Wings 3D currently requires that the root directory is called "wings". To fullfil
+# this, we enable "create_wrksrc" and copy the contents of the build directory to
+# a directory called "wings" after the patching. One day hopefully this will no
+# longer be necessary.
+
+post_extract() {
+	mv ${pkgname}-${version}/* . && rm -rf ${pkg-name}/${version}
+	mkdir "${build_wrksrc}"
+}
+
+post_patch() {
+	find "${wrksrc}" -maxdepth 1 -not -iname "${build_wrksrc}" -exec mv "{}" "${wrksrc}/${build_wrksrc}/" \;
+}
+
+pre_build() {
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}/ebin
+	vmkdir opt/${pkgname}/plugins
+	vmkdir opt/${pkgname}/shaders
+	vmkdir opt/${pkgname}/textures
+        vmkdir opt/${pkgname}/priv
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vcopy priv/* opt/${pkgname}/priv
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (12 preceding siblings ...)
  2024-02-09 10:00 ` MIvanchev
@ 2024-02-09 10:11 ` MIvanchev
  2024-05-10  1:47 ` github-actions
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-02-09 10:11 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From 415645e98c377d4b4e3255504f1328f97a99da00 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH] New package: wings-2.3

---
 srcpkgs/erlang-cl/patches/cflags.patch    | 26 +++++++++++
 srcpkgs/erlang-cl/template                | 31 +++++++++++++
 srcpkgs/wings/files/wings                 |  8 ++++
 srcpkgs/wings/files/wings.desktop         | 12 +++++
 srcpkgs/wings/files/wings.rc              | 15 ++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 ++++++
 srcpkgs/wings/template                    | 56 +++++++++++++++++++++++
 7 files changed, 163 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 0000000000000..4d3b914487258
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 0000000000000..2de5a62c77481
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}
diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 0000000000000..c79885bb5cd86
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 0000000000000..82f5e2b2d33b1
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Terminal=false
+Exec=/usr/bin/wings -detached
+Name=Wings 3D
+GenericName=A 3D Subdivision Modeler
+Comment=A 3D modeler that is both powerful and easy to use
+GenericName[en]=A 3D Subdivision Modeler
+Comment[en]=A 3D modeler that is both powerful and easy to use
+Icon=wings
+Categories=GNOME;GTK;Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 0000000000000..eb0048179f855
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 0000000000000..6b04793605b03
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 0000000000000..34d0a224a15ad
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,56 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+create_wrksrc=yes
+build_wrksrc=wings
+
+# Wings 3D currently requires that the root directory is called "wings". To fullfil
+# this, we enable "create_wrksrc" and copy the contents of the build directory to
+# a directory called "wings" after the patching. One day hopefully this will no
+# longer be necessary.
+
+post_extract() {
+	mv ${pkgname}-${version}/* . && rm -rf ${pkg-name}/${version}
+	mkdir "${build_wrksrc}"
+}
+
+post_patch() {
+	find "${wrksrc}" -maxdepth 1 -not -iname "${build_wrksrc}" -exec mv "{}" "${wrksrc}/${build_wrksrc}/" \;
+}
+
+pre_build() {
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}/ebin
+	vmkdir opt/${pkgname}/plugins
+	vmkdir opt/${pkgname}/shaders
+	vmkdir opt/${pkgname}/textures
+	vmkdir opt/${pkgname}/priv
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vcopy priv/* opt/${pkgname}/priv
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

* Re: New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (13 preceding siblings ...)
  2024-02-09 10:11 ` MIvanchev
@ 2024-05-10  1:47 ` github-actions
  2024-05-10  8:37 ` MIvanchev
  2024-05-14 10:12 ` [PR PATCH] [Updated] " MIvanchev
  16 siblings, 0 replies; 18+ messages in thread
From: github-actions @ 2024-05-10  1:47 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/48603#issuecomment-2103702999

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

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

* Re: New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (14 preceding siblings ...)
  2024-05-10  1:47 ` github-actions
@ 2024-05-10  8:37 ` MIvanchev
  2024-05-14 10:12 ` [PR PATCH] [Updated] " MIvanchev
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-05-10  8:37 UTC (permalink / raw)
  To: ml

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

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/48603#issuecomment-2104191774

Comment:
Bump.

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

* Re: [PR PATCH] [Updated] New package: wings-2.3
  2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
                   ` (15 preceding siblings ...)
  2024-05-10  8:37 ` MIvanchev
@ 2024-05-14 10:12 ` MIvanchev
  16 siblings, 0 replies; 18+ messages in thread
From: MIvanchev @ 2024-05-14 10:12 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MIvanchev/void-packages wings3d
https://github.com/void-linux/void-packages/pull/48603

New package: wings-2.3
#### 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, (X86_64-GLIBC)

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

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

From bccf8e0475bf7a473324ae9df0e296c1e918c1b6 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Tue, 14 May 2024 12:12:05 +0200
Subject: [PATCH 1/2] New package: erlang-cl-1.2.4

---
 srcpkgs/erlang-cl/patches/cflags.patch | 26 +++++++++++++++++++++
 srcpkgs/erlang-cl/template             | 31 ++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/erlang-cl/patches/cflags.patch
 create mode 100644 srcpkgs/erlang-cl/template

diff --git a/srcpkgs/erlang-cl/patches/cflags.patch b/srcpkgs/erlang-cl/patches/cflags.patch
new file mode 100644
index 00000000000000..4d3b9144872583
--- /dev/null
+++ b/srcpkgs/erlang-cl/patches/cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 224fd5f..379fa98 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -52,11 +52,17 @@ ifeq ($(OSNAME)$(WSLcross), Linux)
+ LINUX = Yes
+ CFLAGS += -I/usr/include/nvidia-current
+ CFLAGS += -I/opt/AMDAPP/include
+-ifeq ($(WORDSIZE), 32)
+-CFLAGS += -O3 -fPIC -m32
++CFLAGS += -O3 -fPIC
++ifeq (x86_64, $(findstring x86_64,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m64
++else
++ifeq (i386, $(findstring i386,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++else
++ifeq (i686, $(findstring i686,$(XBPS_TARGET_MACHINE)))
++CFLAGS += -m32
++endif
+ endif
+-ifeq ($(WORDSIZE), 64)
+-CFLAGS += -O3 -fPIC -m64
+ endif
+ LD_SHARED	:= $(CC) -shared
+ LDFLAGS	        += -lOpenCL
diff --git a/srcpkgs/erlang-cl/template b/srcpkgs/erlang-cl/template
new file mode 100644
index 00000000000000..2de5a62c774810
--- /dev/null
+++ b/srcpkgs/erlang-cl/template
@@ -0,0 +1,31 @@
+# Template file for 'erlang-cl'
+pkgname=erlang-cl
+version=1.2.4
+revision=1
+hostmakedepends="git rebar3"
+makedepends="ocl-icd-devel"
+depends="erlang"
+short_desc="Erlang OpenCL bindings"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="MIT"
+homepage="https://github.com/tonyrog/cl"
+distfiles="https://github.com/tonyrog/cl/archive/refs/tags/cl-${version}.tar.gz"
+checksum=577b8788029148f93217d00a1bbdc500db68ee77b2246bbd892269b5bb98c41a
+
+do_build() {
+	rebar3 compile
+}
+
+do_install() {
+	vmkdir usr/lib/erlang/lib/cl-${version}
+	vmkdir usr/lib/erlang/lib/cl-${version}/ebin
+	vmkdir usr/lib/erlang/lib/cl-${version}/include
+	vmkdir usr/lib/erlang/lib/cl-${version}/priv
+	vmkdir usr/share/doc/${pkgname}
+	vmkdir usr/share/doc/${pkgname}/examples
+	vcopy ebin/* usr/lib/erlang/lib/cl-${version}/ebin
+	vinstall include/cl.hrl 644 usr/lib/erlang/lib/cl-${version}/include
+	vinstall priv/cl_nif.so 644 usr/lib/erlang/lib/cl-${version}/priv
+	vcopy examples/* usr/share/doc/${pkgname}/examples
+	vlicense COPYRIGHT
+}

From ebea61ce168d679071c20164faa19581282a1db2 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Fri, 29 Dec 2023 13:21:10 +0100
Subject: [PATCH 2/2] New package: wings-2.3

---
 srcpkgs/wings/files/wings                 |  8 ++++
 srcpkgs/wings/files/wings.desktop         | 12 +++++
 srcpkgs/wings/files/wings.rc              | 15 ++++++
 srcpkgs/wings/patches/triple_quotes.patch | 15 ++++++
 srcpkgs/wings/template                    | 56 +++++++++++++++++++++++
 5 files changed, 106 insertions(+)
 create mode 100755 srcpkgs/wings/files/wings
 create mode 100644 srcpkgs/wings/files/wings.desktop
 create mode 100644 srcpkgs/wings/files/wings.rc
 create mode 100644 srcpkgs/wings/patches/triple_quotes.patch
 create mode 100644 srcpkgs/wings/template

diff --git a/srcpkgs/wings/files/wings b/srcpkgs/wings/files/wings
new file mode 100755
index 00000000000000..c79885bb5cd861
--- /dev/null
+++ b/srcpkgs/wings/files/wings
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f /etc/wings.rc ]; then
+    . /etc/wings.rc
+fi
+
+exec /usr/bin/erl -pa /opt/wings/ebin -noinput -s wings_start start_halt {1+"$@"}
+
diff --git a/srcpkgs/wings/files/wings.desktop b/srcpkgs/wings/files/wings.desktop
new file mode 100644
index 00000000000000..82f5e2b2d33b14
--- /dev/null
+++ b/srcpkgs/wings/files/wings.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Terminal=false
+Exec=/usr/bin/wings -detached
+Name=Wings 3D
+GenericName=A 3D Subdivision Modeler
+Comment=A 3D modeler that is both powerful and easy to use
+GenericName[en]=A 3D Subdivision Modeler
+Comment[en]=A 3D modeler that is both powerful and easy to use
+Icon=wings
+Categories=GNOME;GTK;Graphics;3DGraphics;
+StartupNotify=false
diff --git a/srcpkgs/wings/files/wings.rc b/srcpkgs/wings/files/wings.rc
new file mode 100644
index 00000000000000..eb0048179f8553
--- /dev/null
+++ b/srcpkgs/wings/files/wings.rc
@@ -0,0 +1,15 @@
+# wings uses the wxGLCanvas component of wxWidgets for the rendering but
+# Wayland users are experiencing issues because wxGLCanvas' Wayland support
+# is relatively new. That's why we request the X11 backend to be used.
+# Feel free to comment out the following lines and give the Wayland support
+# a try.
+GDK_BACKEND=x11
+export GDK_BACKEND
+
+# uncomment this if you have problems with OpenGL (vertices are small,
+# faces are invisible, ...).  This is caused by buggy drivers, buggy
+# graphics cards, etc.
+#
+# You usually want to leave this as-is:
+# LIBGL_ALWAYS_INDIRECT=1
+# export LIBGL_ALWAYS_INDIRECT
diff --git a/srcpkgs/wings/patches/triple_quotes.patch b/srcpkgs/wings/patches/triple_quotes.patch
new file mode 100644
index 00000000000000..6b04793605b030
--- /dev/null
+++ b/srcpkgs/wings/patches/triple_quotes.patch
@@ -0,0 +1,15 @@
+diff --git a/plugins_src/import_export/wpc_yafaray.erl b/plugins_src/import_export/wpc_yafaray.erl
+index e3ecb184..a36e79a2 100644
+--- a/plugins_src/import_export/wpc_yafaray.erl
++++ b/plugins_src/import_export/wpc_yafaray.erl
+@@ -4008,8 +4008,8 @@ export_blend_mat_shader(F, Name, Mat, ExportDir, YafaRay) ->
+ 
+     Blend_Value = proplists:get_value(blend_value, YafaRay, ?DEF_BLEND_VALUE),
+ 
+-    uniprintln(F, "  <material1 sval=\"""w_""\~ts\"/>~n"
+-                  "        <material2 sval=\"""w_""\~ts\"/>~n"
++    uniprintln(F, "  <material1 sval=\"w_\~ts\"/>~n"
++                  "        <material2 sval=\"w_\~ts\"/>~n"
+                   "        <blend_value fval=\"~.10f\"/>~n",
+             [Blend_Mat1,Blend_Mat2,Blend_Value]),
+     foldl(fun ({modulator,Ps}=M, N) when is_list(Ps) ->
diff --git a/srcpkgs/wings/template b/srcpkgs/wings/template
new file mode 100644
index 00000000000000..34d0a224a15ad0
--- /dev/null
+++ b/srcpkgs/wings/template
@@ -0,0 +1,56 @@
+# Template file for 'wings'
+pkgname=wings
+version=2.3
+revision=1
+build_style=gnu-makefile
+hostmakedepends="git"
+makedepends="erlang-wx erlang-cl"
+depends="desktop-file-utils hicolor-icon-theme"
+short_desc="Advanced subdivision modeler that is both powerful and easy to use"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="TCL"
+homepage="https://github.com/dgud/wings"
+distfiles="https://github.com/dgud/wings/archive/refs/tags/v${version}.tar.gz"
+checksum=d8d7751a898afa983b017fe9cd6bdc47dc430e0d86125da782344d4cf1be0f1d
+nocross="requires erlang-wx which is unavaiable on cross-built platforms"
+create_wrksrc=yes
+build_wrksrc=wings
+
+# Wings 3D currently requires that the root directory is called "wings". To fullfil
+# this, we enable "create_wrksrc" and copy the contents of the build directory to
+# a directory called "wings" after the patching. One day hopefully this will no
+# longer be necessary.
+
+post_extract() {
+	mv ${pkgname}-${version}/* . && rm -rf ${pkg-name}/${version}
+	mkdir "${build_wrksrc}"
+}
+
+post_patch() {
+	find "${wrksrc}" -maxdepth 1 -not -iname "${build_wrksrc}" -exec mv "{}" "${wrksrc}/${build_wrksrc}/" \;
+}
+
+pre_build() {
+	CFLAGS+=" -fPIC"
+	CXXFLAGS+=" -fPIC"
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vmkdir opt/${pkgname}/ebin
+	vmkdir opt/${pkgname}/plugins
+	vmkdir opt/${pkgname}/shaders
+	vmkdir opt/${pkgname}/textures
+	vmkdir opt/${pkgname}/priv
+	vcopy ebin/* opt/${pkgname}/ebin
+	vcopy plugins/* opt/${pkgname}/plugins
+	vcopy shaders/* opt/${pkgname}/shaders
+	vcopy textures/* opt/${pkgname}/textures
+	vcopy priv/* opt/${pkgname}/priv
+	vlicense license.terms
+	vinstall ${FILESDIR}/wings.desktop 644 usr/share/applications
+	vinstall ebin/wings_icon_256x256.png 644 usr/share/icons/hicolor/256x256/apps wings.png
+	vinstall ebin/wings_icon_48x48.png 644 usr/share/icons/hicolor/48x48/apps wings.png
+	vbin ${FILESDIR}/wings
+	vinstall ${FILESDIR}/wings.rc 644 etc
+}

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

end of thread, other threads:[~2024-05-14 10:12 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08 11:29 [PR PATCH] New package: wings-2.3 MIvanchev
2024-02-08 12:00 ` [PR PATCH] [Updated] " MIvanchev
2024-02-08 12:52 ` MIvanchev
2024-02-08 13:11 ` MIvanchev
2024-02-08 13:56 ` MIvanchev
2024-02-08 14:08 ` MIvanchev
2024-02-08 14:54 ` MIvanchev
2024-02-08 15:04 ` MIvanchev
2024-02-08 15:39 ` MIvanchev
2024-02-08 15:56 ` MIvanchev
2024-02-08 15:56 ` MIvanchev
2024-02-09  9:49 ` [PR PATCH] [Updated] " MIvanchev
2024-02-09 10:00 ` MIvanchev
2024-02-09 10:00 ` MIvanchev
2024-02-09 10:11 ` MIvanchev
2024-05-10  1:47 ` github-actions
2024-05-10  8:37 ` MIvanchev
2024-05-14 10:12 ` [PR PATCH] [Updated] " MIvanchev

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).