graphics/goxel: modernize the port and update to version 0.11.0

- Lowercase all but the first word of the COMMENT, adjust LICENSE
  to match the source code headers
- Drop unused dependency and INSTALLS_ICONS knob, massage USES and
  USE_GNOME lists as needed
- Install more complete set of high-color icons, do not capitalize
  loop iterator variable
- Provide more elaborate port description, move WWW line where it
  belongs these days (in the Makefile) and chase redirection
- Assume maintainership since previous maintainer had stepped down
This commit is contained in:
Alexey Dokuchaev 2022-11-10 06:23:50 +00:00
parent ceb73ea7d4
commit 2ffe6f07cf
7 changed files with 83 additions and 71 deletions

View File

@ -1,43 +1,35 @@
PORTNAME= goxel
PORTVERSION= 0.11.0
DISTVERSIONPREFIX= v
DISTVERSION= 0.8.2
PORTREVISION= 1
CATEGORIES= graphics
MAINTAINER= greg@unrelenting.technology
COMMENT= Free and Open Source 3D Voxel Editor
MAINTAINER= danfe@FreeBSD.org
COMMENT= Free and open-source 3D voxel editor
WWW= https://goxel.xyz/
LICENSE= GPLv3
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libargp.so:devel/argp-standalone \
libglfw.so:graphics/glfw \
LIB_DEPENDS= libglfw.so:graphics/glfw \
libpng.so:graphics/png
USES= compiler:c++11-lang pkgconfig scons gnome gl
USES= compiler:c++17-lang gl gnome pkgconfig scons
USE_GITHUB= yes
GH_ACCOUNT= guillaumechereau
USE_GNOME= cairo gtk30
USE_GL= gl
USE_GNOME= cairo gdkpixbuf2 gtk30
MAKE_ARGS= mode=release werror=false
INSTALLS_ICONS= yes
MAKE_ARGS= debug=0 werror=0
DESKTOP_ENTRIES="Goxel" "${COMMENT}" "${PORTNAME}" \
"${PORTNAME}" "Graphics;3DGraphics;" false
.include <bsd.port.pre.mk>
.if ${ARCH} != amd64 && ${ARCH} != i386
post-patch:
${REINPLACE_CMD} -e 's/-msse2 //g' ${WRKSRC}/SConstruct
.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
.for SZ in 32 64 256
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${SZ}x${SZ}/apps
${INSTALL_DATA} ${WRKSRC}/osx/goxel/goxel/Assets.xcassets/AppIcon.appiconset/${SZ}.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${SZ}x${SZ}/apps/goxel.png
.for n in 16 32 64 128 512 256 1024
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${n}x${n}/apps
${INSTALL_DATA} ${WRKSRC}/osx/goxel/goxel/Assets.xcassets/AppIcon.appiconset/${n}.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${n}x${n}/apps/goxel.png
.endfor
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1545486941
SHA256 (guillaumechereau-goxel-v0.8.2_GH0.tar.gz) = 4f8297560e356cb69469e0a23bcb4e9c4e8549766a0466ffeaa0c9cfb7a04049
SIZE (guillaumechereau-goxel-v0.8.2_GH0.tar.gz) = 3387515
TIMESTAMP = 1660638635
SHA256 (guillaumechereau-goxel-v0.11.0_GH0.tar.gz) = 660030e1b3b33a3e909d8189780a192cba059774af57b042ecb63297f2a6d0fc
SIZE (guillaumechereau-goxel-v0.11.0_GH0.tar.gz) = 2718621

View File

@ -1,35 +1,41 @@
--- SConstruct.orig 2018-12-22 14:00:12 UTC
--- SConstruct.orig 2022-08-16 08:30:35 UTC
+++ SConstruct
@@ -28,15 +28,18 @@ clang = int(ARGUMENTS.get("clang", 0))
cycles = int(ARGUMENTS.get('cycles', 1))
sound = False
@@ -45,10 +45,6 @@ if os.environ.get('CC') == 'clang':
if os.environ.get('CC') == 'clang':
env.Replace(CC='clang', CXX='clang++')
-if os.environ.get('CC') == 'clang': clang = 1
+import subprocess
+if b'clang' in subprocess.check_output([os.environ.get('CC', 'cc'), '-v'],
+ stderr=subprocess.STDOUT):
+ clang = 1
+print('clang', clang)
if profile: debug = 0
-env = Environment(ENV = os.environ)
+
+env = Environment(ENV = os.environ, CC = os.environ.get('CC', 'cc'),
+ CXX = os.environ.get('CXX', 'c++'))
conf = env.Configure()
-if clang:
- env.Replace(CC='clang', CXX='clang++')
-# Hack for gcc <= 5, since pragma diagnostic push doesn't seem to work.
-if env['CCVERSION'] and int(env['CCVERSION'].split('.')[0]) <= 5:
- env.Append(CCFLAGS=['-Wno-unused-function'])
-
# Asan & Ubsan (need to come first).
# Cycles doesn't like libasan with clang, so we only use it on
# C code with clang.
@@ -145,7 +148,7 @@ if cycles:
sources += glob.glob('ext_src/cycles/src/subd/*.cpp')
if env['mode'] == 'debug' and target_os == 'posix':
env.Append(CCFLAGS=['-fsanitize=address', '-fsanitize=undefined'],
@@ -70,7 +66,7 @@ if env['mode'] not in ['debug', 'analyze']:
env.Append(CCFLAGS='-Werror')
env.Append(CPPPATH=['ext_src/cycles/src'])
- env.Append(CPPPATH=['ext_src/cycles/third_party/atomic'])
+ env.Prepend(CPPPATH=['ext_src/cycles/third_party/atomic'])
env.Append(CPPFLAGS=[
'-DCYCLES_STD_UNORDERED_MAP',
'-DCCL_NAMESPACE_BEGIN=namespace ccl {',
if env['mode'] not in ['debug', 'analyze']:
- env.Append(CPPDEFINES='NDEBUG', CCFLAGS='-Ofast')
+ env.Append(CPPDEFINES='NDEBUG')
if env['mode'] == 'debug':
env.Append(CCFLAGS=['-O0'])
@@ -88,16 +84,14 @@ for root, dirnames, filenames in os.walk('src'):
if filename.endswith('.c') or filename.endswith('.cpp'):
sources.append(os.path.join(root, filename))
-# Check for libpng.
-if conf.CheckLibWithHeader('libpng', 'png.h', 'c'):
- env.Append(CPPDEFINES='HAVE_LIBPNG=1')
-
# Linux compilation support.
if target_os == 'posix':
+ env.Append(CPPDEFINES='HAVE_LIBPNG=1')
env.Append(LIBS=['GL', 'm'])
# Note: add '--static' to link with all the libs needed by glfw3.
env.ParseConfig('pkg-config --libs glfw3')
env.ParseConfig('pkg-config --cflags --libs gtk+-3.0')
+ env.ParseConfig('pkg-config --libs libpng')
# Windows compilation support.
if target_os == 'msys':

View File

@ -1,13 +0,0 @@
--- ext_src/cycles/src/util/util_path.cpp.orig 2018-12-22 14:23:19 UTC
+++ ext_src/cycles/src/util/util_path.cpp
@@ -38,6 +38,10 @@
# include <shlwapi.h>
#endif
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <sys/sysctl.h>
+#endif
+
#include "util/util_map.h"
#include "util/util_windows.h"

View File

@ -0,0 +1,11 @@
--- ext_src/yocto/ext/filesystem.hpp.orig 2022-08-16 08:30:35 UTC
+++ ext_src/yocto/ext/filesystem.hpp
@@ -1525,7 +1525,7 @@ GHC_INLINE std::string systemErrorText(ErrorNumber cod
std::string msg = toUtf8(std::wstring((LPWSTR)msgBuf));
LocalFree(msgBuf);
return msg;
-#elif defined(GHC_OS_MACOS) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE)) || (defined(GHC_OS_ANDROID) && __ANDROID_API__ < 23) || defined(EMSCRIPTEN)
+#elif defined(GHC_OS_MACOS) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE)) || (defined(GHC_OS_ANDROID) && __ANDROID_API__ < 23) || defined(EMSCRIPTEN) || defined(__FreeBSD__)
char buffer[512];
int rc = strerror_r(code ? code : errno, buffer, sizeof(buffer));
return rc == 0 ? (const char*)buffer : "Error in strerror_r!";

View File

@ -1,3 +1,15 @@
A 3D program that lets you create voxel volumes, a bit similar to minecraft.
A 3D program for creating voxel volumes, a bit similar to Minecraft.
WWW: https://guillaumechereau.github.io/goxel/
By restricting the volume along a 3D grid, just like pixels do in two
dimensions, voxels make 3D editing as intuitive as drawing in 2D.
Voxel art is used in many video games, and also by artists as a
standalone style.
Make your scene as large as you want. Goxel uses sparse matrices
internally so there is not restrictions on how big a model can be.
Use layers to separate parts of the scene into independently editable
3D models.
Goxel can export to many formats, including: Magica Voxel, Qubicle,
glTF2, obj, ply, build engine.

View File

@ -1,4 +1,8 @@
bin/goxel
share/icons/hicolor/16x16/apps/goxel.png
share/icons/hicolor/32x32/apps/goxel.png
share/icons/hicolor/64x64/apps/goxel.png
share/icons/hicolor/128x128/apps/goxel.png
share/icons/hicolor/256x256/apps/goxel.png
share/icons/hicolor/512x512/apps/goxel.png
share/icons/hicolor/1024x1024/apps/goxel.png