From 30f93c02e558420e8cddaab5cc192559f4373051 Mon Sep 17 00:00:00 2001 From: Joe DeCapo <679017+JrGoodle@users.noreply.github.com> Date: Sat, 6 May 2023 16:15:59 -0500 Subject: [PATCH] +libass (#1855) * +libass * Fix formatting --- projects/github.com/libass/libass/package.yml | 43 +++++++++++++++++++ projects/github.com/libass/libass/test.cpp | 20 +++++++++ 2 files changed, 63 insertions(+) create mode 100644 projects/github.com/libass/libass/package.yml create mode 100644 projects/github.com/libass/libass/test.cpp diff --git a/projects/github.com/libass/libass/package.yml b/projects/github.com/libass/libass/package.yml new file mode 100644 index 00000000..502e2765 --- /dev/null +++ b/projects/github.com/libass/libass/package.yml @@ -0,0 +1,43 @@ +distributable: + url: https://github.com/libass/libass/archive/refs/tags/{{version}}.tar.gz + strip-components: 1 + +versions: + github: libass/libass/tags + +dependencies: + freetype.org: 2 + gnu.org/fribidi: 1 + harfbuzz.org: '*' + github.com/adah1972/libunibreak: '*' + linux: + freedesktop.org/fontconfig: 2 + x86-64: + nasm.us: 2 + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + gnu.org/autoconf: 2 + gnu.org/automake: 1 + gnu.org/libtool: 2 + freedesktop.org/pkg-config: '*' + script: | + ./autogen.sh + ./configure $ARGS + make install + env: + ARGS: + - --disable-dependency-tracking + - --prefix={{prefix}} + darwin: + ARGS: + - --disable-fontconfig # libass uses coretext on macOS, fontconfig on Linux + +test: + dependencies: + tea.xyz/gx/cc: c99 + script: | + c++ test.cpp -lass -o test + ./test diff --git a/projects/github.com/libass/libass/test.cpp b/projects/github.com/libass/libass/test.cpp new file mode 100644 index 00000000..f4d3eb0b --- /dev/null +++ b/projects/github.com/libass/libass/test.cpp @@ -0,0 +1,20 @@ +#include "ass/ass.h" + +int main() { + ASS_Library *library; + ASS_Renderer *renderer; + library = ass_library_init(); + if (library) { + renderer = ass_renderer_init(library); + if (renderer) { + ass_renderer_done(renderer); + ass_library_done(library); + return 0; + } else { + ass_library_done(library); + return 1; + } + } else { + return 1; + } +}