commit 351230a62427ca4bbeb9eecc86bbf0943e52fb64 Author: EnumDev Date: Tue Mar 10 18:47:44 2026 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d96df7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Ignore BPM archives and signatures +*.bpm +*.bpm.sig diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..d4ee0ea --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="haasn/libplacebo" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') + +# Trim 'v' character in TAG_NAME variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..882e3f1 --- /dev/null +++ b/pkg.info @@ -0,0 +1,35 @@ +name: libplacebo +description: Reusable library for GPU-accelerated video/image rendering primitives +version: 7.360.0 +revision: 1 +url: https://github.com/haasn/libplacebo +license: LGPL2.1-or-later +maintainers: + - enumdev@enumerated.dev +architecture: any +type: source +depends: + - gcc-libs + - glibc + - glslang + - lcms2 + - libdovi + - libunwind + - shaderc + - vulkan-loader + - xxhash +make_depends: + - glad + - libglvnd + - meson + - python3 + - python-jinja + - python-mako + - python-markupsafe + - python-setuptools + - vulkan-headers +downloads: + - url: https://github.com/haasn/libplacebo/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: c4c70d430083915a157cb790660749649f58fee1e946c0a6e554fd1cba5a2e8f diff --git a/source-files/fix-glslang-linking.patch b/source-files/fix-glslang-linking.patch new file mode 100644 index 0000000..3027969 --- /dev/null +++ b/source-files/fix-glslang-linking.patch @@ -0,0 +1,11 @@ +Fix linking against glslang 1.3.296.0 + +--- a/src/glsl/meson.build ++++ b/src/glsl/meson.build +@@ -17,6 +17,7 @@ if glslang_req.auto() and shaderc.found() + elif not glslang_req.disabled() + + glslang_deps = [ ++ cxx.find_library('glslang', required: false), + cxx.find_library('glslang-default-resource-limits', required: false) + ] diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..be635d2 --- /dev/null +++ b/source.sh @@ -0,0 +1,40 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +# The prepare function is executed in the root of the temp directory +# This function is used for putting downloaded files to the correct location or applying patches +prepare() { + cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/fix-glslang-linking.patch +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + meson setup build --prefix=/usr \ + -Dtests=true \ + -Dvulkan=enabled \ + -Dglslang=enabled \ + -Dshaderc=enabled \ + -Dlcms=enabled \ + -Dd3d11=disabled \ + -Dlibdovi=enabled \ + -Ddemos=false + meson compile -C build +} + +# The check function is executed in the source directory +# This function is used to run tests to verify the package has been compiled correctly +check() { + meson test -C build --print-errorlogs +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + meson install -C build --destdir="$BPM_OUTPUT" + + # Install package license + install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/libplacebo/LICENSE +}