aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-03-23 00:28:16 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-03-26 01:20:10 +0700
commitb0459f13551035b5796af6fb02f525ccb356da38 (patch)
treeabddd959591393f6b08881500924025a73446d3d /graphics
parent5e51f314acc2129c305d009c2e248c16de5e19fc (diff)
graphics/mitsuba2: Fix 32-bit build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/mitsuba2/32bit.diff22
-rw-r--r--graphics/mitsuba2/mitsuba2.SlackBuild12
2 files changed, 31 insertions, 3 deletions
diff --git a/graphics/mitsuba2/32bit.diff b/graphics/mitsuba2/32bit.diff
new file mode 100644
index 0000000000000..55019bf61eb09
--- /dev/null
+++ b/graphics/mitsuba2/32bit.diff
@@ -0,0 +1,22 @@
+diff -Naur mitsuba2-4e7628c/ext/CMakeLists.txt mitsuba2-4e7628c.patched/ext/CMakeLists.txt
+--- mitsuba2-4e7628c/ext/CMakeLists.txt 2022-03-07 17:07:27.000000000 -0500
++++ mitsuba2-4e7628c.patched/ext/CMakeLists.txt 2022-03-23 00:07:42.901574553 -0400
+@@ -223,9 +223,8 @@
+ # tinyformat include path
+ set(TINYFORMAT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/tinyformat PARENT_SCOPE)
+
+-if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|AMD64")
+ # Build asmjit
+- set(ASMJIT_BUILD_X64 TRUE)
++ set(ASMJIT_BUILD_X86 TRUE)
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-undefined-inline")
+ endif()
+@@ -235,7 +234,6 @@
+ if (MSVC)
+ target_compile_options(asmjit PRIVATE "/wd4804" "/wd4838")
+ endif()
+-endif()
+
+ # Disable annoying MSVC warnings in rgb2spec build
+ if (MSVC)
diff --git a/graphics/mitsuba2/mitsuba2.SlackBuild b/graphics/mitsuba2/mitsuba2.SlackBuild
index bd7005f7c9743..392e52bddb099 100644
--- a/graphics/mitsuba2/mitsuba2.SlackBuild
+++ b/graphics/mitsuba2/mitsuba2.SlackBuild
@@ -7,6 +7,8 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
+# 20220322 bkw: Modified by SlackBuilds.org: fix 32-bit build.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mitsuba2
@@ -23,7 +25,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If PRINT_PACKAGE_NAME is set, print name of package
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -58,13 +59,18 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+case "$ARCH" in
+ i?86) patch -p1 < $CWD/32bit.diff ;;
+esac
mkdir -p build
cd build
cmake -GNinja \
+ $extra \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \