aboutsummaryrefslogtreecommitdiff
path: root/graphics/goxel/files
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2022-11-10 06:23:50 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2022-11-10 06:23:50 +0000
commit2ffe6f07cf959e5979e410ce3713d83b720a309a (patch)
treea9f3ed2b210196ca4cb6d4afd59620c52c8dae3a /graphics/goxel/files
parentceb73ea7d40ca4ea42fd3f576317e0f2fc0c5b08 (diff)
downloadports-2ffe6f07cf959e5979e410ce3713d83b720a309a.tar.gz
ports-2ffe6f07cf959e5979e410ce3713d83b720a309a.zip
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
Diffstat (limited to 'graphics/goxel/files')
-rw-r--r--graphics/goxel/files/patch-SConstruct64
-rw-r--r--graphics/goxel/files/patch-ext__src_cycles_src_util_util__path.cpp13
-rw-r--r--graphics/goxel/files/patch-ext__src_yocto_ext_filesystem.hpp11
3 files changed, 46 insertions, 42 deletions
diff --git a/graphics/goxel/files/patch-SConstruct b/graphics/goxel/files/patch-SConstruct
index a4c6b5177ff8..58485b0130ac 100644
--- a/graphics/goxel/files/patch-SConstruct
+++ b/graphics/goxel/files/patch-SConstruct
@@ -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
+-# 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).
+ 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 = 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 env['mode'] not in ['debug', 'analyze']:
+- env.Append(CPPDEFINES='NDEBUG', CCFLAGS='-Ofast')
++ env.Append(CPPDEFINES='NDEBUG')
--if clang:
-- env.Replace(CC='clang', CXX='clang++')
+ 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')
-
- # 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')
+ # 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')
- 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 {',
+ # Windows compilation support.
+ if target_os == 'msys':
diff --git a/graphics/goxel/files/patch-ext__src_cycles_src_util_util__path.cpp b/graphics/goxel/files/patch-ext__src_cycles_src_util_util__path.cpp
deleted file mode 100644
index 008ccd5b9909..000000000000
--- a/graphics/goxel/files/patch-ext__src_cycles_src_util_util__path.cpp
+++ /dev/null
@@ -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"
-
diff --git a/graphics/goxel/files/patch-ext__src_yocto_ext_filesystem.hpp b/graphics/goxel/files/patch-ext__src_yocto_ext_filesystem.hpp
new file mode 100644
index 000000000000..36a411cc8cc7
--- /dev/null
+++ b/graphics/goxel/files/patch-ext__src_yocto_ext_filesystem.hpp
@@ -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!";