cleanup and use new environment variable CMAKE_POLICY_VERSION_MINIMUM
This commit is contained in:
parent
f23f04c99b
commit
104c19184d
5 changed files with 16 additions and 111 deletions
8
.SRCINFO
8
.SRCINFO
|
@ -1,6 +1,6 @@
|
||||||
pkgbase = orca-slicer-git
|
pkgbase = orca-slicer-git
|
||||||
pkgdesc = G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
|
pkgdesc = G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
|
||||||
pkgver = 2.3.1.r24908.32efc17
|
pkgver = 2.3.1.r24918.82bc52c
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://github.com/SoftFever/OrcaSlicer
|
url = https://github.com/SoftFever/OrcaSlicer
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
|
@ -47,12 +47,8 @@ pkgbase = orca-slicer-git
|
||||||
source = orca-slicer-git::git+https://github.com/SoftFever/OrcaSlicer.git
|
source = orca-slicer-git::git+https://github.com/SoftFever/OrcaSlicer.git
|
||||||
source = orca-slicer-wrapper.sh
|
source = orca-slicer-wrapper.sh
|
||||||
source = https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch
|
source = https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch
|
||||||
source = cmake-min-version.patch
|
|
||||||
source = wxWidgets-cmake-min-version.patch
|
|
||||||
b2sums = SKIP
|
b2sums = SKIP
|
||||||
b2sums = aa8f847eef062b7999d33ec23e9abb5dd666221ee31aae4d94117eba96038da069d43be5e65321820172fc1c82ce9c674e8c4f833d01bb87d4e5db284c159156
|
b2sums = ea635f7745795d535ddf8cf317b27986ae28c177ea3fd7764c3314f9ca152672d17af22541cd9f6efc08a04fd02b2bda502f867fd2dd6888c58cf9b5d7c6c2a4
|
||||||
b2sums = cc7791841533e07787a4921b688fdd885782a67320936d445ad04102a68e8e044b5bf52a58d987d158ae522ae4f02a56a3525ccfd1831ef6a3b6459be14bd408
|
b2sums = cc7791841533e07787a4921b688fdd885782a67320936d445ad04102a68e8e044b5bf52a58d987d158ae522ae4f02a56a3525ccfd1831ef6a3b6459be14bd408
|
||||||
b2sums = 562dcd07530faef0d9fdddf1e009075f67105c8239e4b1402cd890f7a89be8b11671dd6ecc7b55a155f2d05247070bb0b8ff84f2170ce2454ab818018be80e48
|
|
||||||
b2sums = 1459ce126dd80a891006d2c40a001e75dc146ac9eb6ad8e975a3e4672ebb914baabecd8a4048742fab03e2820242f614449dd23a8e721bd5c945c8765e986a5a
|
|
||||||
|
|
||||||
pkgname = orca-slicer-git
|
pkgname = orca-slicer-git
|
||||||
|
|
33
PKGBUILD
33
PKGBUILD
|
@ -1,7 +1,7 @@
|
||||||
# Maintainer: lod <aur@cyber-anlage.de>
|
# Maintainer: lod <aur@cyber-anlage.de>
|
||||||
|
|
||||||
pkgname=orca-slicer-git
|
pkgname=orca-slicer-git
|
||||||
pkgver=2.3.1.r24908.32efc17
|
pkgver=2.3.1.r24918.82bc52c
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)"
|
pkgdesc="G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
|
@ -16,16 +16,12 @@ optdepends=('mesa: Enables Zink fallback workaround for NVIDIA on Wayland'
|
||||||
'nvidia-utils: for querying driver version')
|
'nvidia-utils: for querying driver version')
|
||||||
options=('!debug' '!emptydirs')
|
options=('!debug' '!emptydirs')
|
||||||
provides=("orca-slicer")
|
provides=("orca-slicer")
|
||||||
source=("$pkgname::git+https://github.com/SoftFever/OrcaSlicer.git"
|
source=($pkgname::git+https://github.com/SoftFever/OrcaSlicer.git
|
||||||
"orca-slicer-wrapper.sh"
|
orca-slicer-wrapper.sh
|
||||||
"https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch"
|
https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch)
|
||||||
"cmake-min-version.patch"
|
|
||||||
"wxWidgets-cmake-min-version.patch")
|
|
||||||
b2sums=('SKIP'
|
b2sums=('SKIP'
|
||||||
'aa8f847eef062b7999d33ec23e9abb5dd666221ee31aae4d94117eba96038da069d43be5e65321820172fc1c82ce9c674e8c4f833d01bb87d4e5db284c159156'
|
'ea635f7745795d535ddf8cf317b27986ae28c177ea3fd7764c3314f9ca152672d17af22541cd9f6efc08a04fd02b2bda502f867fd2dd6888c58cf9b5d7c6c2a4'
|
||||||
'cc7791841533e07787a4921b688fdd885782a67320936d445ad04102a68e8e044b5bf52a58d987d158ae522ae4f02a56a3525ccfd1831ef6a3b6459be14bd408'
|
'cc7791841533e07787a4921b688fdd885782a67320936d445ad04102a68e8e044b5bf52a58d987d158ae522ae4f02a56a3525ccfd1831ef6a3b6459be14bd408')
|
||||||
'562dcd07530faef0d9fdddf1e009075f67105c8239e4b1402cd890f7a89be8b11671dd6ecc7b55a155f2d05247070bb0b8ff84f2170ce2454ab818018be80e48'
|
|
||||||
'1459ce126dd80a891006d2c40a001e75dc146ac9eb6ad8e975a3e4672ebb914baabecd8a4048742fab03e2820242f614449dd23a8e721bd5c945c8765e986a5a')
|
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd $pkgname
|
cd $pkgname
|
||||||
|
@ -41,25 +37,21 @@ prepare() {
|
||||||
# abuse FLATPAK IF statement to build against some system libs
|
# abuse FLATPAK IF statement to build against some system libs
|
||||||
sed -i 's/if(FLATPAK)/if(true)/' $pkgname/deps/CMakeLists.txt
|
sed -i 's/if(FLATPAK)/if(true)/' $pkgname/deps/CMakeLists.txt
|
||||||
# cherry pick an OCCT commit to make it build with system freetype
|
# cherry pick an OCCT commit to make it build with system freetype
|
||||||
cat 7236e83dcc1e7284e66dc61e612154617ef715d6.patch >> $pkgname/deps/OCCT/0001-OCCT-fix.patch
|
cat 7236e83dcc1e7284e66dc61e612154617ef715d6.patch >> $pkgname/deps/OCCT/0001-OCCT-fix.patch
|
||||||
# Fix xgettext: case-sensitive mismatches
|
# Fix xgettext: case-sensitive mismatches
|
||||||
sed -i 's|src/slic3r/GUI/AMSMappingPopup.cpp|src/slic3r/GUI/AmsMappingPopup.cpp|g' $pkgname/localization/i18n/list.txt
|
sed -i 's|src/slic3r/GUI/AMSMappingPopup.cpp|src/slic3r/GUI/AmsMappingPopup.cpp|g' $pkgname/localization/i18n/list.txt
|
||||||
# Set cmake_minimum_required to 3.5 for all dependencies
|
|
||||||
cp wxWidgets-cmake-min-version.patch $pkgname/deps/wxWidgets/wxWidgets-cmake-min-version.patch
|
|
||||||
cd $pkgname
|
|
||||||
git apply ../cmake-min-version.patch
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd $pkgname
|
cd $pkgname
|
||||||
export CXXFLAGS="${CXXFLAGS} -flto"
|
export CXXFLAGS="${CXXFLAGS} -flto"
|
||||||
|
export CMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||||
|
|
||||||
cmake \
|
cmake \
|
||||||
-G Ninja \
|
-G Ninja \
|
||||||
-S deps \
|
-S deps \
|
||||||
-B deps/build \
|
-B deps/build \
|
||||||
-DDEP_WX_GTK3=ON \
|
-DDEP_WX_GTK3=ON
|
||||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
|
||||||
ninja -C deps/build
|
ninja -C deps/build
|
||||||
|
|
||||||
cmake \
|
cmake \
|
||||||
|
@ -72,8 +64,7 @@ build() {
|
||||||
-DSLIC3R_STATIC=1 \
|
-DSLIC3R_STATIC=1 \
|
||||||
-DORCA_TOOLS=1 \
|
-DORCA_TOOLS=1 \
|
||||||
-DSLIC3R_FHS=1 \
|
-DSLIC3R_FHS=1 \
|
||||||
-DSLIC3R_GTK=3 \
|
-DSLIC3R_GTK=3
|
||||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
|
||||||
ninja -C build
|
ninja -C build
|
||||||
|
|
||||||
# add localizations
|
# add localizations
|
||||||
|
@ -84,8 +75,8 @@ package() {
|
||||||
cd $pkgname
|
cd $pkgname
|
||||||
|
|
||||||
DESTDIR="$pkgdir" ninja -C build install
|
DESTDIR="$pkgdir" ninja -C build install
|
||||||
install -d "$pkgdir/usr/lib/orca-slicer/"
|
install -d "$pkgdir/usr/lib/OrcaSlicer/"
|
||||||
mv "$pkgdir/usr/bin/orca-slicer" "$pkgdir/usr/lib/orca-slicer/"
|
mv "$pkgdir/usr/bin/orca-slicer" "$pkgdir/usr/lib/OrcaSlicer/"
|
||||||
install -Dm755 "$srcdir/orca-slicer-wrapper.sh" "$pkgdir/usr/bin/orca-slicer"
|
install -Dm755 "$srcdir/orca-slicer-wrapper.sh" "$pkgdir/usr/bin/orca-slicer"
|
||||||
install -Dm644 doc/*.md -t "$pkgdir/usr/share/doc/OrcaSlicer/"
|
install -Dm644 doc/*.md -t "$pkgdir/usr/share/doc/OrcaSlicer/"
|
||||||
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/OrcaSlicer/LICENSE"
|
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/OrcaSlicer/LICENSE"
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
|
|
||||||
index b24ee20e2..e59edc7b6 100644
|
|
||||||
--- a/deps/CMakeLists.txt
|
|
||||||
+++ b/deps/CMakeLists.txt
|
|
||||||
@@ -128,6 +128,7 @@ if (NOT IS_CROSS_COMPILE OR NOT APPLE)
|
|
||||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
|
||||||
${_gen}
|
|
||||||
CMAKE_ARGS
|
|
||||||
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
|
||||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
|
|
||||||
-DCMAKE_MODULE_PATH:STRING=${PROJECT_SOURCE_DIR}/../cmake/modules
|
|
||||||
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}
|
|
||||||
@@ -157,6 +158,7 @@ elseif(FLATPAK)
|
|
||||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
|
||||||
${_gen}
|
|
||||||
CMAKE_ARGS
|
|
||||||
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
|
||||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
|
|
||||||
-DCMAKE_MODULE_PATH:STRING=${PROJECT_SOURCE_DIR}/../cmake/modules
|
|
||||||
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}
|
|
||||||
@@ -185,6 +187,7 @@ else()
|
|
||||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
|
||||||
${_gen}
|
|
||||||
CMAKE_ARGS
|
|
||||||
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
|
||||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
|
|
||||||
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}
|
|
||||||
-DBUILD_SHARED_LIBS:BOOL=OFF
|
|
||||||
diff --git a/deps/wxWidgets/wxWidgets.cmake b/deps/wxWidgets/wxWidgets.cmake
|
|
||||||
index 1097e6cfc..9cf27a790 100644
|
|
||||||
--- a/deps/wxWidgets/wxWidgets.cmake
|
|
||||||
+++ b/deps/wxWidgets/wxWidgets.cmake
|
|
||||||
@@ -25,9 +25,11 @@ endif ()
|
|
||||||
orcaslicer_add_cmake_project(
|
|
||||||
wxWidgets
|
|
||||||
GIT_REPOSITORY "https://github.com/SoftFever/Orca-deps-wxWidgets"
|
|
||||||
+ PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/wxWidgets-cmake-min-version.patch
|
|
||||||
GIT_SHALLOW ON
|
|
||||||
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${TIFF_PKG} ${JPEG_PKG}
|
|
||||||
CMAKE_ARGS
|
|
||||||
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
|
||||||
-DwxBUILD_PRECOMP=ON
|
|
||||||
${_wx_toolkit}
|
|
||||||
"-DCMAKE_DEBUG_POSTFIX:STRING="
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
DIR="/usr/lib/orca-slicer"
|
DIR="/usr/lib/OrcaSlicer"
|
||||||
export LD_LIBRARY_PATH="$DIR/bin:$LD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH="$DIR/bin:$LD_LIBRARY_PATH"
|
||||||
|
|
||||||
# OrcaSlicer will segfault on systems where locale info is not as expected
|
# OrcaSlicer will segfault on systems where locale info is not as expected
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
#Use Zink to run OpenGL on top of Vulkan bypassing the problematic NVIDIA OpenGL stack while retaining hardware acceleration.
|
# Use Zink to run OpenGL on top of Vulkan bypassing the problematic NVIDIA OpenGL stack while retaining hardware acceleration.
|
||||||
if [ "$XDG_SESSION_TYPE" = "wayland" ] && [ "$ZINK_DISABLE_OVERRIDE" != "1" ]; then
|
if [ "$XDG_SESSION_TYPE" = "wayland" ] && [ "$ZINK_DISABLE_OVERRIDE" != "1" ]; then
|
||||||
if command -v glxinfo >/dev/null 2>&1; then
|
if command -v glxinfo >/dev/null 2>&1; then
|
||||||
RENDERER=$(glxinfo | grep "OpenGL renderer string:" | sed 's/.*: //')
|
RENDERER=$(glxinfo | grep "OpenGL renderer string:" | sed 's/.*: //')
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 4063020..d498b78 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -7,7 +7,7 @@
|
|
||||||
# Licence: wxWindows licence
|
|
||||||
#############################################################################
|
|
||||||
|
|
||||||
-cmake_minimum_required(VERSION 2.8.12)
|
|
||||||
+cmake_minimum_required(VERSION 3.5)
|
|
||||||
|
|
||||||
if(NOT CMAKE_CONFIGURATION_TYPES)
|
|
||||||
get_property(HAVE_MULTI_CONFIG_GENERATOR GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
|
||||||
diff --git a/build/cmake/modules/cotire.cmake b/build/cmake/modules/cotire.cmake
|
|
||||||
index bb69643..e91f7e4 100644
|
|
||||||
--- a/build/cmake/modules/cotire.cmake
|
|
||||||
+++ b/build/cmake/modules/cotire.cmake
|
|
||||||
@@ -37,7 +37,7 @@ set(__COTIRE_INCLUDED TRUE)
|
|
||||||
if (NOT CMAKE_SCRIPT_MODE_FILE)
|
|
||||||
cmake_policy(PUSH)
|
|
||||||
endif()
|
|
||||||
-cmake_minimum_required(VERSION 2.8.12)
|
|
||||||
+cmake_minimum_required(VERSION 3.5)
|
|
||||||
if (NOT CMAKE_SCRIPT_MODE_FILE)
|
|
||||||
cmake_policy(POP)
|
|
||||||
endif()
|
|
||||||
diff --git a/build/cmake/modules/cotire_test/CMakeLists.txt b/build/cmake/modules/cotire_test/CMakeLists.txt
|
|
||||||
index dd14262..6d865bc 100644
|
|
||||||
--- a/build/cmake/modules/cotire_test/CMakeLists.txt
|
|
||||||
+++ b/build/cmake/modules/cotire_test/CMakeLists.txt
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
# cotire example project
|
|
||||||
|
|
||||||
-cmake_minimum_required(VERSION 2.8.12)
|
|
||||||
+cmake_minimum_required(VERSION 3.5)
|
|
||||||
|
|
||||||
if (POLICY CMP0058)
|
|
||||||
# Ninja requires custom command byproducts to be explicit
|
|
Loading…
Add table
Reference in a new issue