]> git.pld-linux.org Git - packages/CuraEngine.git/commitdiff
- CuraEngine "requires" stb library, but what it really wants is a single header, auto/th/CuraEngine-3.5.1-2
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 4 Nov 2018 13:52:18 +0000 (14:52 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 4 Nov 2018 13:52:18 +0000 (14:52 +0100)
  package it here to avoid fetching the whole thing at build time
- rel 2

CuraEngine.spec
local-stb.patch [new file with mode: 0644]

index dd6820d5df893ef0de6b5ddfb1f607a56b0ba52e..9febc9b4cb0375d449ded5a14353f0dd0b842b25 100644 (file)
@@ -6,14 +6,17 @@ Summary:      Engine for processing 3D models into G-code instructions for 3D printer
 Summary(pl.UTF-8):     Silnik do przetwarzania modeli 3D na instrukcje G-code dla drukarek 3D
 Name:          CuraEngine
 Version:       3.5.1
 Summary(pl.UTF-8):     Silnik do przetwarzania modeli 3D na instrukcje G-code dla drukarek 3D
 Name:          CuraEngine
 Version:       3.5.1
-Release:       1
+Release:       2
 Epoch:         1
 License:       AGPL v3
 Group:         Applications/Engineering
 Source0:       https://github.com/Ultimaker/CuraEngine/archive/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5: 54800673b165c69dff2978e7b7a58e70
 Epoch:         1
 License:       AGPL v3
 Group:         Applications/Engineering
 Source0:       https://github.com/Ultimaker/CuraEngine/archive/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5: 54800673b165c69dff2978e7b7a58e70
+Source1:       https://raw.githubusercontent.com/nothings/stb/master/stb_image.h
+# Source1-md5: 2a512ad9f82f104b8120e52babd37cc7
 Patch0:                %{name}-rpath.patch
 Patch1:                %{name}-static-libstdcpp.patch
 Patch0:                %{name}-rpath.patch
 Patch1:                %{name}-static-libstdcpp.patch
+Patch2:                local-stb.patch
 URL:           https://github.com/Ultimaker/CuraEngine
 BuildRequires: cmake
 BuildRequires: libArcus-devel = %{version}
 URL:           https://github.com/Ultimaker/CuraEngine
 BuildRequires: cmake
 BuildRequires: libArcus-devel = %{version}
@@ -46,9 +49,13 @@ pakiecie cura.
 %setup -q
 %patch0 -p1
 %patch1 -p1
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+
+mkdir stb
+install %{SOURCE1} stb/
 
 # bundled libraries
 
 # bundled libraries
-rm -rf libs
+%{__rm} -rf libs
 %{__sed} -i 's|#include <clipper/clipper.hpp>|#include <polyclipping/clipper.hpp>|' src/utils/*.h src/*.cpp
 
 # The -DCURA_ENGINE_VERSION does not work, so we sed-change the default value
 %{__sed} -i 's|#include <clipper/clipper.hpp>|#include <polyclipping/clipper.hpp>|' src/utils/*.h src/*.cpp
 
 # The -DCURA_ENGINE_VERSION does not work, so we sed-change the default value
@@ -58,6 +65,7 @@ rm -rf libs
 mkdir build
 cd build
 %cmake .. \
 mkdir build
 cd build
 %cmake .. \
+       -DStb_INCLUDE_DIRS:STRING="$(pwd)/.." \
        -DUSE_SYSTEM_LIBS:BOOL=ON \
        -DBUILD_SHARED_LIBS:BOOL=OFF \
        -DCURA_ENGINE_VERSION:STRING=%{version}
        -DUSE_SYSTEM_LIBS:BOOL=ON \
        -DBUILD_SHARED_LIBS:BOOL=OFF \
        -DCURA_ENGINE_VERSION:STRING=%{version}
diff --git a/local-stb.patch b/local-stb.patch
new file mode 100644 (file)
index 0000000..71f3ba1
--- /dev/null
@@ -0,0 +1,23 @@
+--- CuraEngine-3.5.1/CMakeLists.txt~   2018-11-04 14:38:14.000000000 +0100
++++ CuraEngine-3.5.1/CMakeLists.txt    2018-11-04 14:48:14.120992489 +0100
+@@ -15,10 +15,7 @@
+     add_definitions(-DARCUS)
+ endif ()
+-#For reading image files.
+-find_package(Stb REQUIRED)
+ include_directories(${Stb_INCLUDE_DIRS})
+-
+ option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF)
+ if(USE_SYSTEM_LIBS)
+     find_package(RapidJSON CONFIG REQUIRED)
+@@ -193,9 +189,6 @@
+ # Compiling CuraEngine itself.
+ add_library(_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS}) #First compile all of CuraEngine as library, allowing this to be re-used for tests.
+-if (CuraEngine_Download_Stb)
+-    add_dependencies(_CuraEngine stb)
+-endif()
+ if(USE_SYSTEM_LIBS)
+     target_link_libraries(_CuraEngine ${Polyclipping_LIBRARIES})
+ else()
This page took 0.122055 seconds and 4 git commands to generate.