initial commit

This commit is contained in:
lod 2024-09-09 15:07:59 +02:00
commit cce73214c3
4 changed files with 387 additions and 0 deletions

54
.SRCINFO Normal file
View file

@ -0,0 +1,54 @@
pkgbase = orca-slicer
pkgdesc = G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
pkgver = 2.1.1
pkgrel = 1
url = https://github.com/SoftFever/OrcaSlicer
arch = x86_64
license = AGPL-3.0-only
makedepends = cmake
makedepends = extra-cmake-modules
makedepends = git
makedepends = m4
makedepends = ninja
makedepends = pkgconf
makedepends = wayland-protocols
makedepends = glew
depends = cairo
depends = curl
depends = dbus
depends = expat
depends = fontconfig
depends = freetype2
depends = gcc-libs
depends = glib2
depends = glibc
depends = gtk3
depends = gdk-pixbuf2
depends = gstreamer
depends = gst-plugins-bad-libs
depends = hicolor-icon-theme
depends = libglvnd
depends = libjpeg-turbo
depends = libpng
depends = libspnav
depends = libtiff
depends = libx11
depends = openssl
depends = pango
depends = python
depends = wayland
depends = webkit2gtk-4.1
depends = zlib
depends = opencv
depends = freeimage
depends = nlopt
depends = opencascade
provides = orca-slicer
source = orca-slicer::git+https://github.com/SoftFever/OrcaSlicer.git#tag=v2.1.1
source = test.patch
source = dont-link-opencv-world.patch
b2sums = e5b0e0c15ac6418bed32ca144342acb5db37f55cf028b2f5ba32e0765e7e876786efa6f15e66e7b0e1ddef05eb22d2a5d390835fc584838f66d5f869df02eb32
b2sums = SKIP
b2sums = SKIP
pkgname = orca-slicer

60
PKGBUILD Normal file
View file

@ -0,0 +1,60 @@
# Maintainer: lod <aur@cyber-anlage.de>
pkgname=orca-slicer
pkgver=2.1.1
pkgrel=1
pkgdesc="G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.) "
arch=('x86_64')
url="https://github.com/SoftFever/OrcaSlicer"
license=('AGPL-3.0-only')
depends=('cairo' 'curl' 'dbus' 'expat' 'fontconfig' 'freetype2' 'gcc-libs' 'glib2' 'glibc' 'gtk3' 'gdk-pixbuf2' 'gstreamer' 'gst-plugins-bad-libs' 'hicolor-icon-theme' 'libglvnd' 'libjpeg-turbo' 'libpng' 'libspnav' 'libtiff' 'libx11' 'openssl' 'pango' 'python' 'wayland' 'webkit2gtk-4.1' 'zlib' 'opencv' 'freeimage' 'nlopt' 'opencascade')
makedepends=('cmake' 'extra-cmake-modules' 'git' 'm4' 'ninja' 'pkgconf' 'wayland-protocols' 'glew')
provides=("orca-slicer")
source=("$pkgname::git+https://github.com/SoftFever/OrcaSlicer.git#tag=v$pkgver"
"test.patch"
"dont-link-opencv-world.patch")
b2sums=('e5b0e0c15ac6418bed32ca144342acb5db37f55cf028b2f5ba32e0765e7e876786efa6f15e66e7b0e1ddef05eb22d2a5d390835fc584838f66d5f869df02eb32'
'SKIP'
'SKIP')
prepare() {
cd $srcdir/$pkgname
patch -p1 -i ../test.patch
patch -p1 -i ../dont-link-opencv-world.patch
# C++20 disallows the use of the Point<T> syntax in the constructor
sed -i 's/explicit Point<T>(/explicit Point(/' src/clipper2/Clipper2Lib/include/clipper2/clipper.core.h
}
build() {
cd $srcdir/$pkgname
export CXXFLAGS="${CXXFLAGS} -flto"
cmake \
-G Ninja \
-S deps \
-B deps/build \
-DDEP_WX_GTK3=ON
ninja -C deps/build
cmake \
-G Ninja \
-S . \
-B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_FULL_DATAROOTDIR=/usr/share/ \
-DCMAKE_PREFIX_PATH=$srcdir/$pkgname/deps/build/destdir/usr/local \
-DSLIC3R_STATIC=1 \
-DORCA_TOOLS=1 \
-DSLIC3R_FHS=1 \
-DSLIC3R_GTK=3
ninja -C build
}
package() {
cd $srcdir/$pkgname
DESTDIR=$pkgdir ninja -C build install
install -Dm644 doc/*.md -t $pkgdir/usr/share/doc/OrcaSlicer/
install -Dm644 $pkgdir/usr/LICENSE.txt $pkgdir/usr/share/licenses/OrcaSlicer/LICENSE
rm -rf $pkgdir/usr/LICENSE.txt
}

View file

@ -0,0 +1,14 @@
diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt
index 38a1b2499..00c9060b3 100644
--- a/src/libslic3r/CMakeLists.txt
+++ b/src/libslic3r/CMakeLists.txt
@@ -573,7 +573,8 @@ target_link_libraries(libslic3r
mcut
JPEG::JPEG
qoi
- opencv_world
+ opencv_core
+ opencv_imgproc
)
if(NOT WIN32)

259
test.patch Normal file
View file

@ -0,0 +1,259 @@
--- orca-slicer/deps/CMakeLists.txt 2024-09-06 02:33:53.328327769 +0200
+++ orca-slicer/deps/CMakeLists.txt.new 2024-09-06 02:41:16.852832404 +0200
@@ -240,59 +240,136 @@
include("deps-linux.cmake")
endif()
-if(FLATPAK)
- # flatpak bundles some deps with the layer, so attempt to find them first
- # also, yes, this reduces CI by not needing to vendor certain deps
- find_package(ZLIB)
- find_package(PNG)
- find_package(EXPAT)
- find_package(CURL)
- find_package(JPEG)
- find_package(TIFF)
- find_package(Freetype)
- find_package(OpenSSL 1.1...<3.2)
- find_package(CURL)
-endif()
+# flatpak bundles some deps with the layer, so attempt to find them first
+# also, yes, this reduces CI by not needing to vendor certain deps
+find_package(cereal) #f
+find_package(qhull) #f
+# find_package(GLEW) #f
+find_package(NLopt)
+find_package(GLFW) #f
+find_package(opencsg) #f
+# find_package(TBB) #f
+# find_package(Blosc) #f
+# find_package(OpenEXR) #f
+# find_package(OPENVDB) #f
+find_package(ZLIB)
+find_package(PNG)
+find_package(EXPAT)
+find_package(JPEG)
+find_package(TIFF)
+find_package(Freetype) #f
+find_package(MPFR) #f
+find_package(GMP) #f
+# find_package(CGAL) #f
+find_package(OpenSSL)
+find_package(CURL)
+find_package(OpenCASCADE) #f
+find_package(OpenCV)
set(ZLIB_PKG "")
if (NOT ZLIB_FOUND)
include(ZLIB/ZLIB.cmake)
set(ZLIB_PKG dep_ZLIB)
+ message(WARNING "ezstr2grep: No ZLIB dev package found in system, building static library. You should install the system package.")
endif ()
set(PNG_PKG "")
if (NOT PNG_FOUND)
include(PNG/PNG.cmake)
set(PNG_PKG dep_PNG)
+ message(WARNING "ezstr2grep: No PNG dev package found in system, building static library. You should install the system package.")
endif ()
set(EXPAT_PKG "")
find_package(EXPAT)
if (NOT EXPAT_FOUND)
include(EXPAT/EXPAT.cmake)
set(EXPAT_PKG dep_EXPAT)
+ message(WARNING "ezstr2grep: No EXPAT dev package found in system, building static library. You should install the system package.")
endif ()
set(DEP_Boost_COMPONENTS system iostreams filesystem thread log locale regex date_time)
include(Boost/Boost.cmake)
# The order of includes respects the dependencies between libraries
-include(Cereal/Cereal.cmake)
-include(Qhull/Qhull.cmake)
-include(GLEW/GLEW.cmake)
-include(GLFW/GLFW.cmake)
-include(OpenCSG/OpenCSG.cmake)
+set(CEREAL_PKG "")
+if(NOT CEREAL_FOUND)
+ # include(Cereal/Cereal.cmake)
+ # set(CEREAL_PKG dep_Cereal)
+ # message(WARNING "ezstr2grep:No CEREAL dev package found in system, building static library. You should install the system package.")
+endif()
+set(QHULLL_PKG "")
+if(NOT QHULLL_FOUND)
+ # include(Qhull/Qhull.cmake)
+ # set(QHULLL_PKG dep_Qhull)
+ # message(WARNING "ezstr2grep: No QHULLL dev package found in system, building static library. You should install the system package.")
+endif()
+if(NOT GLEW_FOUND)
+ include(GLEW/GLEW.cmake)
+ message(WARNING "ezstr2grep: No GLEW dev package found in system, building static library. You should install the system package.")
+endif()
+
-include(TBB/TBB.cmake)
-include(Blosc/Blosc.cmake)
-include(OpenEXR/OpenEXR.cmake)
-include(OpenVDB/OpenVDB.cmake)
+set(GLFW_PKG "")
+if(NOT GLFW_FOUND)
+ include(GLFW/GLFW.cmake)
+ set(GLFW_PKG dep_GLFW)
+ message(WARNING "ezstr2grep: No GLFW dev package found in system, building static library. You should install the system package.")
+endif()
+set(OPENCSG_PKG "")
+if(NOT opencsg_FOUND)
+ include(OpenCSG/OpenCSG.cmake)
+ set(OPENCSG_PKG dep_OpenCSG)
+ message(WARNING "ezstr2grep: No OpenCSG dev package found in system, building static library. You should install the system package.")
+endif()
-include(GMP/GMP.cmake)
-include(MPFR/MPFR.cmake)
-include(CGAL/CGAL.cmake)
+set(TBB_PKG "")
+if(NOT TBB_FOUND)
+ include(TBB/TBB.cmake)
+ set(TBB_PKG dep_TBB)
+ message(WARNING "ezstr2grep: No TBB dev package found in system, building static library. You should install the system package.")
+endif()
+
+if(NOT Blosc_FOUND)
+ include(Blosc/Blosc.cmake)
+ message(WARNING "ezstr2grep: No Blosc dev package found in system, building static library. You should install the system package.")
+endif()
+if(NOT OpenEXR_FOUND)
+ include(OpenEXR/OpenEXR.cmake)
+ message(WARNING "ezstr2grep: No OpenEXR dev package found in system, building static library. You should install the system package.")
+endif()
+
+
+set(OPENVDB_PKG "")
+if(NOT OPENVDB_FOUND)
+ include(OpenVDB/OpenVDB.cmake)
+ set(OPENVDB_PKG dep_OpenVDB)
+ message(WARNING "ezstr2grep: No OpenVDB dev package found in system, building static library. You should install the system package.")
+endif()
+
+if(NOT GMP_FOUND)
+ include(GMP/GMP.cmake)
+ message(WARNING "ezstr2grep: No GMP dev package found in system, building static library. You should install the system package.")
+endif()
+if(NOT MPFR_FOUND)
+ include(MPFR/MPFR.cmake)
+ message(WARNING "ezstr2grep: No MPFR dev package found in system, building static library. You should install the system package.")
+endif()
+
+set(CGAL_PKG "")
+if(NOT CGAL_FOUND)
+ include(CGAL/CGAL.cmake)
+ set(CGAL_PKG dep_CGAL)
+ message(WARNING "ezstr2grep: No CGAL dev package found in system, building static library. You should install the system package.")
+endif()
+
+set(NLOPT_PKG "")
+if(NOT NLopt_FOUND)
+ # include(NLopt/NLopt.cmake)
+ # set(NLOPT_PKG dep_NLopt)
+ # message(WARNING "ezstr2grep: No NLopt dev package found in system, building static library. You should install the system package.")
+endif()
-include(NLopt/NLopt.cmake)
# I *think* 1.1 is used for *just* md5 hashing?
@@ -303,6 +380,7 @@
if(NOT OPENSSL_FOUND)
include(OpenSSL/OpenSSL.cmake)
set(OPENSSL_PKG dep_OpenSSL)
+ message(WARNING "ezstr2grep: No OpenSSL dev package found in system, building static library. You should install the system package.")
endif()
# we don't want to load a "wrong" openssl when loading curl
@@ -312,18 +390,21 @@
if (NOT OPENSSL_FOUND OR NOT CURL_FOUND)
include(CURL/CURL.cmake)
set(CURL_PKG dep_CURL)
+ message(WARNING "ezstr2grep: No CURL dev package found in system, building static library. You should install the system package.")
endif ()
set(JPEG_PKG "")
if (NOT JPEG_FOUND)
include(JPEG/JPEG.cmake)
set(JPEG_PKG dep_JPEG)
+ message(WARNING "ezstr2grep: No JPG dev package found in system, building static library. You should install the system package.")
endif()
set(TIFF_PKG "")
if (NOT TIFF_FOUND)
include(TIFF/TIFF.cmake)
set(TIFF_PKG "dep_TIFF")
+ message(WARNING "ezstr2grep: No TIFF dev package found in system, building static library. You should install the system package.")
endif()
# flatpak builds wxwidgets separately
@@ -331,31 +412,43 @@
if (NOT FLATPAK)
include(wxWidgets/wxWidgets.cmake)
set(WXWIDGETS_PKG "dep_wxWidgets")
+ # message(WARNING "ezstr2grep: No wxWidgets dev package found in system, building static library. You should install the system package.")
endif()
set(FREETYPE_PKG "")
if(NOT FREETYPE_FOUND)
include(FREETYPE/FREETYPE.cmake)
set(FREETYPE_PKG "dep_FREETYPE")
+ message(WARNING "ezstr2grep: No FREETYPE dev package found in system, building static library. You should install the system package.")
endif()
-include(OCCT/OCCT.cmake)
-include(OpenCV/OpenCV.cmake)
+set(OCCT_PKG "")
+if(NOT OpenCASCADE_FOUND)
+ include(OCCT/OCCT.cmake)
+ set(OCCT_PKG "dep_OCCT")
+ message(WARNING "ezstr2grep: No OCCT dev package found in system, building static library. You should install the system package.")
+endif()
+set(OPENCV_PKG "")
+if(NOT OpenCV_FOUND)
+ include(OpenCV/OpenCV.cmake)
+ set(OPENCV_PKG "dep_OpenCV")
+ message(WARNING "ezstr2grep: No OpenVC dev package found in system, building static library. You should install the system package.")
+endif()
set(_dep_list
dep_Boost
- dep_TBB
+ ${TBB_PKG}
${OPENSSL_PKG}
${CURL_PKG}
${WXWIDGETS_PKG}
- dep_Cereal
- dep_NLopt
- dep_OpenVDB
- dep_OpenCSG
- dep_OpenCV
- dep_CGAL
- dep_GLFW
- dep_OCCT
+ ${CEREAL_PKG}
+ ${NLOPT_PKG}
+ ${OPENVDB_PKG}
+ ${OPENCSG_PKG}
+ ${OPENCV_PKG}
+ ${CGAL_PKG}
+ ${GLFW_PKG}
+ ${OCCT_PKG}
${FREETYPE_PKG}
${PNG_PKG}
${ZLIB_PKG}
@@ -366,7 +459,7 @@
# Experimental
#list(APPEND _dep_list "dep_qhull")
else()
- list(APPEND _dep_list "dep_Qhull")
+ list(APPEND _dep_list ${QHULLL_PKG})
# Not working, static build has different Eigen
#list(APPEND _dep_list "dep_libigl")
endif()