Github messages for voidlinux
 help / color / mirror / Atom feed
From: MIvanchev <MIvanchev@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: wings-2.3
Date: Thu, 08 Feb 2024 16:04:30 +0100	[thread overview]
Message-ID: <20240208150430.DBFDC25C99@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48603@inbox.vuxu.org>

[-- 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
+}

  parent reply	other threads:[~2024-02-08 15:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08 11:29 [PR PATCH] " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240208150430.DBFDC25C99@inbox.vuxu.org \
    --to=mivanchev@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).