Skip to content

Commit

Permalink
chore: thorvg upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelOsborne committed Dec 14, 2024
1 parent 92bbca5 commit 2ee6da2
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deps/modules/thorvg
Submodule thorvg updated 63 files
+4 −1 AUTHORS
+15 −18 examples/Example.h
+1 −1 examples/LottieExtension.cpp
+1 −1 examples/resources/lottie/extensions/slotsample.json
+2 −1 inc/thorvg.h
+7 −1 meson.build
+5 −0 meson_options.txt
+4 −0 src/loaders/external_jpg/tvgJpgLoader.cpp
+4 −0 src/loaders/external_png/tvgPngLoader.cpp
+4 −0 src/loaders/external_webp/tvgWebpLoader.cpp
+4 −0 src/loaders/jpg/tvgJpgLoader.cpp
+145 −31 src/loaders/lottie/tvgLottieBuilder.cpp
+2 −1 src/loaders/lottie/tvgLottieCommon.h
+1 −1 src/loaders/lottie/tvgLottieExpressions.cpp
+1 −1 src/loaders/lottie/tvgLottieInterpolator.cpp
+23 −13 src/loaders/lottie/tvgLottieLoader.cpp
+1 −1 src/loaders/lottie/tvgLottieLoader.h
+121 −64 src/loaders/lottie/tvgLottieModel.cpp
+91 −80 src/loaders/lottie/tvgLottieModel.h
+207 −104 src/loaders/lottie/tvgLottieParser.cpp
+16 −10 src/loaders/lottie/tvgLottieParser.h
+6 −0 src/loaders/lottie/tvgLottieParserHandler.cpp
+1 −0 src/loaders/lottie/tvgLottieParserHandler.h
+117 −28 src/loaders/lottie/tvgLottieProperty.h
+4 −0 src/loaders/png/tvgPngLoader.cpp
+30 −2 src/loaders/svg/tvgSvgLoader.cpp
+4 −3 src/loaders/svg/tvgXmlParser.cpp
+13 −1 src/loaders/ttf/tvgTtfLoader.cpp
+4 −0 src/loaders/webp/tvgWebpLoader.cpp
+8 −3 src/renderer/gl_engine/tvgGlCommon.h
+2 −2 src/renderer/gl_engine/tvgGlGeometry.cpp
+39 −13 src/renderer/gl_engine/tvgGlGpuBuffer.cpp
+6 −4 src/renderer/gl_engine/tvgGlGpuBuffer.h
+32 −16 src/renderer/gl_engine/tvgGlRenderer.cpp
+2 −2 src/renderer/gl_engine/tvgGlRenderer.h
+114 −22 src/renderer/gl_engine/tvgGlShaderSrc.cpp
+1 −1 src/renderer/gl_engine/tvgGlTessellator.cpp
+6 −2 src/renderer/sw_engine/tvgSwCommon.h
+258 −58 src/renderer/sw_engine/tvgSwPostEffect.cpp
+15 −24 src/renderer/sw_engine/tvgSwRaster.cpp
+32 −0 src/renderer/sw_engine/tvgSwRasterC.h
+47 −21 src/renderer/sw_engine/tvgSwRenderer.cpp
+3 −3 src/renderer/sw_engine/tvgSwRenderer.h
+51 −35 src/renderer/sw_engine/tvgSwRle.cpp
+2 −0 src/renderer/sw_engine/tvgSwShape.cpp
+6 −2 src/renderer/tvgLoader.cpp
+2 −2 src/renderer/tvgPaint.cpp
+6 −6 src/renderer/tvgPaint.h
+14 −7 src/renderer/tvgPicture.cpp
+3 −3 src/renderer/tvgPicture.h
+31 −9 src/renderer/tvgRender.h
+1 −0 src/renderer/tvgSaver.cpp
+10 −2 src/renderer/tvgScene.cpp
+18 −17 src/renderer/tvgScene.h
+11 −11 src/renderer/tvgShape.cpp
+28 −23 src/renderer/tvgShape.h
+10 −1 src/renderer/tvgText.cpp
+1 −1 src/renderer/tvgText.h
+2 −2 src/renderer/wg_engine/tvgWgRenderer.cpp
+2 −2 src/renderer/wg_engine/tvgWgRenderer.h
+1 −1 test/capi/capiLottie.cpp
+1 −1 test/resources/lottieslot.json
+1 −1 test/testLottie.cpp
74 changes: 74 additions & 0 deletions meson.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
class Meson < Formula
desc "Fast and user friendly build system"
homepage "https://mesonbuild.com/"
url "https://github.com/mesonbuild/meson/releases/download/1.6.0/meson-1.6.0.tar.gz"
sha256 "999b65f21c03541cf11365489c1fad22e2418bb0c3d50ca61139f2eec09d5496"
license "Apache-2.0"
head "https://github.com/mesonbuild/meson.git", branch: "master"

bottle do
sha256 cellar: :any_skip_relocation, all: "77eb91483991e1b615c3fe1dcea843e43706ac3eb011b0556fcf70e3a3e097fb"
end

depends_on "ninja"
depends_on "[email protected]"

def install
python3 = "python3.13"
system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "."

bash_completion.install "data/shell-completions/bash/meson"
zsh_completion.install "data/shell-completions/zsh/_meson"
vim_plugin_dir = buildpath/"data/syntax-highlighting/vim"
(share/"vim/vimfiles").install %w[ftdetect ftplugin indent syntax].map { |dir| vim_plugin_dir/dir }

# Make the bottles uniform. This also ensures meson checks `HOMEBREW_PREFIX`
# for fulfilling dependencies rather than just `/usr/local`.
mesonbuild = prefix/Language::Python.site_packages(python3)/"mesonbuild"
usr_local_files = %w[
compilers/mixins/apple.py
coredata.py
dependencies/boost.py
dependencies/cuda.py
dependencies/misc.py
dependencies/qt.py
options.py
scripts/python_info.py
utils/universal.py
].map { |f| mesonbuild/f }
usr_local_files << (bash_completion/"meson")

# Passing `build.stable?` ensures a failed `inreplace` won't fail HEAD installs.
inreplace usr_local_files, "/usr/local", HOMEBREW_PREFIX, audit_result: build.stable?

opt_homebrew_files = %w[
dependencies/boost.py
dependencies/misc.py
compilers/mixins/apple.py
].map { |f| mesonbuild/f }
inreplace opt_homebrew_files, "/opt/homebrew", HOMEBREW_PREFIX, audit_result: build.stable?

# Ensure meson uses our `var` directory.
inreplace mesonbuild/"options.py", "'/var/local", "'#{var}", audit_result: build.stable?
end

test do
(testpath/"helloworld.c").write <<~C
#include <stdio.h>
int main(void) {
puts("hi");
return 0;
}
C
(testpath/"meson.build").write <<~EOS
project('hello', 'c')
executable('hello', 'helloworld.c')
EOS

system bin/"meson", "setup", "build"
assert_predicate testpath/"build/build.ninja", :exist?

system bin/"meson", "compile", "-C", "build", "--verbose"
assert_equal "hi", shell_output("build/hello").chomp
end
end

0 comments on commit 2ee6da2

Please sign in to comment.