Changes to conanfile.py, and flatpak build works again
This commit is contained in:
parent
124203def3
commit
78a2b5918b
7 changed files with 83 additions and 58 deletions
|
|
@ -21,9 +21,8 @@ option(USE_LEAKSAN "Enable Leak Sanitizer" OFF)
|
|||
option(USE_THREADSAN "Enable Thread Sanitizer" OFF)
|
||||
option(USE_MEMORYSAN "Enable Memory Sanitizer" OFF)
|
||||
|
||||
option(LINK_SKIA_MANUALLY "Link skia not as a package, but as separate libraries for non-Conan builds" OFF)
|
||||
option(NO_CONAN_BUILD "Not using conan to get packages" OFF)
|
||||
option(EMSCRIPTEN_SINGLE_HTML_FILE "Building with emscripten generates a single HTML file" OFF)
|
||||
option(TBB_NOT_ONETBB "Use TBB::tbb package and not onetbb::onetbb package from conan" OFF)
|
||||
option(CONFIG_NEXT_TO_EXECUTABLE "Place configuration folder next to executable (portable executable)" OFF)
|
||||
|
||||
# Setting sources
|
||||
|
|
@ -134,9 +133,9 @@ if(WIN32)
|
|||
endif()
|
||||
|
||||
# Get libraries
|
||||
find_package(ICU REQUIRED)
|
||||
find_package(ICU 77.1 REQUIRED COMPONENTS uc)
|
||||
|
||||
if(LINK_SKIA_MANUALLY)
|
||||
if(NO_CONAN_BUILD)
|
||||
set(SKIA_INCLUDE "modules/skia" CACHE PATH "Path to Skia root directory")
|
||||
set(SKIA_LIB_PATH "modules/skia/out/Static" CACHE PATH "Path to Skia libs")
|
||||
find_library(SKIA_LIB skia PATHS ${SKIA_LIB_PATH})
|
||||
|
|
@ -146,6 +145,11 @@ if(LINK_SKIA_MANUALLY)
|
|||
find_library(SKIA_SHAPER_LIB skshaper PATHS ${SKIA_LIB_PATH})
|
||||
find_library(SKIA_UNICODE_ICU_LIB skunicode_icu PATHS ${SKIA_LIB_PATH})
|
||||
find_library(SKIA_UNICODE_CORE_LIB skunicode_core PATHS ${SKIA_LIB_PATH})
|
||||
|
||||
find_package(Freetype REQUIRED)
|
||||
find_package(Fontconfig REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
else()
|
||||
find_package(skia)
|
||||
endif()
|
||||
|
|
@ -275,18 +279,14 @@ if(NOT EMSCRIPTEN AND ((GRAPHICS_BACKEND STREQUAL "OpenGL3.3") OR (GRAPHICS_BACK
|
|||
endif()
|
||||
|
||||
if((NOT EMSCRIPTEN) AND (NOT APPLE))
|
||||
if(TBB_NOT_ONETBB)
|
||||
if(NO_CONAN_BUILD)
|
||||
target_link_libraries(infinipaint TBB::tbb)
|
||||
else()
|
||||
target_link_libraries(infinipaint onetbb::onetbb)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(infinipaint SDL3::SDL3 zstd::libzstd_static icu::icu)
|
||||
|
||||
if(NOT EMSCRIPTEN)
|
||||
target_link_libraries(infinipaint harfbuzz::harfbuzz)
|
||||
endif()
|
||||
target_link_libraries(infinipaint SDL3::SDL3 zstd::libzstd_static)
|
||||
|
||||
if(EMSCRIPTEN)
|
||||
add_subdirectory(deps/datachannel-wasm EXCLUDE_FROM_ALL)
|
||||
|
|
@ -295,11 +295,17 @@ else()
|
|||
target_link_libraries(infinipaint LibDataChannel::LibDataChannel CURL::libcurl)
|
||||
endif()
|
||||
|
||||
if(LINK_SKIA_MANUALLY)
|
||||
if(NO_CONAN_BUILD)
|
||||
target_link_libraries(infinipaint ${SKIA_SVG_LIB} ${SKIA_RESOURCES_LIB} ${SKIA_LIB} ${SKIA_UNICODE_CORE_LIB} ${SKIA_UNICODE_ICU_LIB} ${SKIA_UNICODE_CORE_LIB} ${SKIA_PARAGRAPH_LIB} ${SKIA_SHAPER_LIB})
|
||||
target_include_directories(infinipaint PRIVATE ${SKIA_INCLUDE})
|
||||
target_link_libraries(infinipaint ICU::uc Fontconfig::Fontconfig Freetype::Freetype PNG::PNG ZLIB::ZLIB)
|
||||
else()
|
||||
target_link_libraries(infinipaint skia::skia)
|
||||
target_link_libraries(infinipaint icu::icu)
|
||||
endif()
|
||||
|
||||
if(NOT EMSCRIPTEN)
|
||||
target_link_libraries(infinipaint harfbuzz::harfbuzz)
|
||||
endif()
|
||||
|
||||
if((NOT (GRAPHICS_BACKEND STREQUAL "Vulkan")) AND (NOT EMSCRIPTEN) AND LINUX)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
conan export %0/../libjuice/all/conanfile.py --version=1.6.1
|
||||
conan export %0/../libdatachannel/all/conanfile.py --version=0.23.1
|
||||
conan export %0/../conan-skia/recipes/skia/all/conanfile.py --version=142.20250802.0
|
||||
conan export %0/../sdl3/3.x/conanfile.py --version=3.2.24
|
||||
conan export %0/../sdl3/3.x/conanfile.py --version=3.2.26
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ conan export "$(dirname "$0")/libjuice/all/conanfile.py" --version=1.6.1
|
|||
conan export "$(dirname "$0")/libdatachannel/all/conanfile.py" --version=0.23.1
|
||||
conan export "$(dirname "$0")/mpg123/all/conanfile.py" --version=1.32.10
|
||||
conan export "$(dirname "$0")/conan-skia/recipes/skia/all/conanfile.py" --version=142.20250802.0
|
||||
conan export "$(dirname "$0")/sdl3/3.x/conanfile.py" --version=3.2.24
|
||||
conan export "$(dirname "$0")/sdl3/3.x/conanfile.py" --version=3.2.26
|
||||
#conan create . -o use_system_expat=False -o use_system_freetype=False -o use_system_harfbuzz=False -o use_system_icu=False -o use_system_libjpeg_turbo=False -o use_system_libpng=False -o use_system_libwebp=False -o use_system_zlib=False --build=missing --version=134.20250327.0
|
||||
#cd ../../../..
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
sources:
|
||||
"3.2.24":
|
||||
url: "https://github.com/libsdl-org/SDL/releases/download/release-3.2.24/SDL3-3.2.24.tar.gz"
|
||||
sha256: "81cc0fc17e5bf2c1754eeca9af9c47a76789ac5efdd165b3b91cbbe4b90bfb76"
|
||||
"3.2.26":
|
||||
url: "https://github.com/libsdl-org/SDL/releases/download/release-3.2.26/SDL3-3.2.26.tar.gz"
|
||||
sha256: "dad488474a51a0b01d547cd2834893d6299328d2e30f479a3564088b5476bae2"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
versions:
|
||||
"3.2.24":
|
||||
"3.2.26":
|
||||
folder: 3.x
|
||||
"2.32.10":
|
||||
folder: all
|
||||
|
|
|
|||
69
conanfile.py
69
conanfile.py
|
|
@ -9,47 +9,52 @@ class CompressorRecipe(ConanFile):
|
|||
if self.settings.os == "Emscripten":
|
||||
self.requires("skia/142.20250802.0", options = {
|
||||
"enable_svg": True,
|
||||
"use_freetype":True,
|
||||
"use_system_freetype":True,
|
||||
"use_freetype": True,
|
||||
"use_system_freetype": True,
|
||||
"use_expat": True,
|
||||
"use_harfbuzz": True,
|
||||
"use_system_harfbuzz":True,
|
||||
"use_conan_harfbuzz":False,
|
||||
"use_system_harfbuzz": True,
|
||||
"use_conan_harfbuzz": False,
|
||||
"use_system_icu": True,
|
||||
"use_conan_icu": True,
|
||||
"enable_skshaper": True,
|
||||
"canvaskit_enable_alias_font" : False,
|
||||
"canvaskit_enable_canvas_bindings" : False,
|
||||
"canvaskit_enable_effects_deserialization" : False,
|
||||
"canvaskit_enable_embedded_font" : False,
|
||||
"canvaskit_enable_font" : False,
|
||||
"canvaskit_enable_matrix_helper" : False,
|
||||
"canvaskit_enable_pathops" : False,
|
||||
"canvaskit_enable_rt_shader" : False,
|
||||
"canvaskit_enable_skp_serialization" : False,
|
||||
"canvaskit_enable_sksl_trace" : False,
|
||||
"canvaskit_enable_webgpu " : False,
|
||||
"canvaskit_enable_webgl " : False
|
||||
"canvaskit_enable_alias_font": False,
|
||||
"canvaskit_enable_canvas_bindings": False,
|
||||
"canvaskit_enable_effects_deserialization": False,
|
||||
"canvaskit_enable_embedded_font": False,
|
||||
"canvaskit_enable_font": False,
|
||||
"canvaskit_enable_matrix_helper": False,
|
||||
"canvaskit_enable_pathops": False,
|
||||
"canvaskit_enable_rt_shader": False,
|
||||
"canvaskit_enable_skp_serialization": False,
|
||||
"canvaskit_enable_sksl_trace": False,
|
||||
"canvaskit_enable_webgpu": False,
|
||||
"canvaskit_enable_webgl": False,
|
||||
"use_system_libwebp": False, # There's a problem compiling libwebp with emscripten in conan
|
||||
"use_conan_libwebp": False
|
||||
})
|
||||
else:
|
||||
self.requires("skia/142.20250802.0", options = {
|
||||
"use_system_expat":False,
|
||||
"use_system_freetype":True,
|
||||
"use_conan_freetype":True,
|
||||
"use_system_harfbuzz":False,
|
||||
"use_system_icu":False,
|
||||
"use_system_libjpeg_turbo":False,
|
||||
"use_system_libpng":False,
|
||||
"use_system_libwebp":False,
|
||||
"use_system_zlib":False,
|
||||
"use_system_expat": False,
|
||||
"use_freetype": True,
|
||||
"use_system_freetype": True,
|
||||
"use_conan_freetype": True,
|
||||
"use_system_harfbuzz": True,
|
||||
"use_conan_harfbuzz": True,
|
||||
"use_system_icu": True,
|
||||
"use_conan_icu": True,
|
||||
"use_system_libjpeg_turbo": False,
|
||||
"use_system_libpng": False,
|
||||
"use_system_libwebp": False,
|
||||
"use_system_zlib": False,
|
||||
"enable_svg": True,
|
||||
"enable_skottie": False,
|
||||
"enable_bentleyottmann": True, # for some reason, setting this to False results in an error when creating the project
|
||||
"use_freetype": True
|
||||
"enable_bentleyottmann": True # for some reason, setting this to False results in an error when creating the project
|
||||
})
|
||||
self.requires("harfbuzz/11.4.1")
|
||||
|
||||
|
||||
if self.settings.os == "Linux":
|
||||
self.requires("sdl/3.2.24", options = {
|
||||
self.requires("sdl/3.2.26", options = {
|
||||
"wayland": False,
|
||||
"pulseaudio": False,
|
||||
"alsa": False,
|
||||
|
|
@ -58,17 +63,17 @@ class CompressorRecipe(ConanFile):
|
|||
"opengles": False
|
||||
})
|
||||
else:
|
||||
self.requires("sdl/3.2.24")
|
||||
self.requires("sdl/3.2.26")
|
||||
|
||||
if self.settings.os != "Emscripten" and self.settings.os != "Macos":
|
||||
self.requires("onetbb/2022.0.0")
|
||||
|
||||
if self.settings.os != "Emscripten":
|
||||
self.requires("libdatachannel/0.23.1")
|
||||
self.requires("libcurl/8.15.0")
|
||||
self.requires("libcurl/8.16.0")
|
||||
|
||||
self.requires("zstd/1.5.7")
|
||||
self.requires("icu/[>=77.1]")
|
||||
self.requires("icu/77.1")
|
||||
|
||||
def build_requirements(self):
|
||||
self.tool_requires("cmake/3.27.0")
|
||||
|
|
|
|||
|
|
@ -1,12 +1,24 @@
|
|||
id: com.infinipaint.infinipaint
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: '24.08'
|
||||
runtime-version: '25.08'
|
||||
sdk: org.freedesktop.Sdk
|
||||
command: infinipaint
|
||||
build-options:
|
||||
build-args:
|
||||
- --share=network
|
||||
modules:
|
||||
- name: ICU
|
||||
buildsystem: simple
|
||||
subdir: source
|
||||
build-commands:
|
||||
- chmod +x runConfigureICU configure install-sh
|
||||
- ./runConfigureICU Linux --prefix=/app --disable-icu-config --disable-icuio --disable-extras --disable-tools --disable-tests --disable-samples --disable-layoutex --disable-layout
|
||||
- make -j$(nproc)
|
||||
- make install
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/unicode-org/icu/releases/download/release-77-1/icu4c-77_1-src.tgz
|
||||
sha256: 588e431f77327c39031ffbb8843c0e3bc122c211374485fa87dc5f3faff24061
|
||||
- name: zstd
|
||||
buildsystem: cmake-ninja
|
||||
subdir: build/cmake
|
||||
|
|
@ -45,13 +57,13 @@ modules:
|
|||
- -DSDL_X11=ON
|
||||
sources:
|
||||
- type: git
|
||||
tag: release-3.2.24
|
||||
tag: release-3.2.26
|
||||
url: https://github.com/libsdl-org/SDL.git
|
||||
- name: Skia
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- python3 tools/git-sync-deps
|
||||
- bin/gn gen out/Static --args='is_official_build=true skia_use_system_expat=false skia_use_system_freetype2=false skia_use_system_harfbuzz=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false'
|
||||
- bin/gn gen out/Static --args='is_official_build=true skia_use_system_expat=false skia_use_system_freetype2=true skia_use_system_harfbuzz=true skia_use_system_icu=true skia_use_system_libjpeg_turbo=false skia_use_system_libpng=true skia_use_system_libwebp=false skia_use_system_zlib=true'
|
||||
- ninja -C out/Static skia svg skunicode_core skunicode_icu skparagraph skresources skshaper
|
||||
- mkdir /app/Skia
|
||||
- mv out /app/Skia
|
||||
|
|
@ -62,15 +74,15 @@ modules:
|
|||
- '*'
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/google/skia/archive/aefbd9403c1b3032ad4cd0281ef312ed262c7125.zip
|
||||
sha256: e10c67a96828b9f36364e2459cdee3e3b381a3875ff78db2b30e7b6fe69509bb
|
||||
url: https://github.com/google/skia/archive/f4ed99d2443962782cf5f8b4dd27179f131e7cbe.zip
|
||||
sha256: 2e00dcdb54942c1da7b2f6cfd9fef8c4899115206d940931f6c040bac08b6b79
|
||||
- name: infinipaint-x86_64
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
only-arches:
|
||||
- x86_64
|
||||
config-opts:
|
||||
- -DLINK_SKIA_MANUALLY=ON
|
||||
- -DNO_CONAN_BUILD=ON
|
||||
- -DSKIA_INCLUDE=/app/Skia
|
||||
- -DSKIA_LIB=/app/Skia/out/Static/libskia.a
|
||||
- -DSKIA_SVG_LIB=/app/Skia/out/Static/libsvg.a
|
||||
|
|
@ -80,7 +92,6 @@ modules:
|
|||
- -DSKIA_UNICODE_CORE_LIB=/app/Skia/out/Static/libskunicode_icu.a
|
||||
- -DSKIA_PARAGRAPH_LIB=/app/Skia/out/Static/libskparagraph.a
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DTBB_NOT_ONETBB=ON
|
||||
- -DGRAPHICS_BACKEND=OpenGL3.3
|
||||
sources:
|
||||
- type: dir
|
||||
|
|
@ -92,7 +103,7 @@ modules:
|
|||
only-arches:
|
||||
- aarch64
|
||||
config-opts:
|
||||
- -DLINK_SKIA_MANUALLY=ON
|
||||
- -DNO_CONAN_BUILD=ON
|
||||
- -DSKIA_INCLUDE=/app/Skia
|
||||
- -DSKIA_LIB=/app/Skia/out/Static/libskia.a
|
||||
- -DSKIA_SVG_LIB=/app/Skia/out/Static/libsvg.a
|
||||
|
|
@ -102,7 +113,6 @@ modules:
|
|||
- -DSKIA_UNICODE_CORE_LIB=/app/Skia/out/Static/libskunicode_icu.a
|
||||
- -DSKIA_PARAGRAPH_LIB=/app/Skia/out/Static/libskparagraph.a
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DTBB_NOT_ONETBB=ON
|
||||
- -DGRAPHICS_BACKEND=OpenGLES3.0
|
||||
sources:
|
||||
- type: dir
|
||||
|
|
@ -118,6 +128,10 @@ cleanup:
|
|||
- /lib/libupb.a
|
||||
- /bin/proto*
|
||||
- /lib/*.a
|
||||
- /lib/libicui18n*
|
||||
- /lib/libicudata*
|
||||
- /bin/zstd*
|
||||
- /bin/unzstd
|
||||
|
||||
finish-args:
|
||||
- --share=ipc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue