diff --git a/projects/github.com/libsndfile/libsndfile/package.yml b/projects/github.com/libsndfile/libsndfile/package.yml new file mode 100644 index 00000000..f0a5dc74 --- /dev/null +++ b/projects/github.com/libsndfile/libsndfile/package.yml @@ -0,0 +1,54 @@ +distributable: + url: https://github.com/libsndfile/libsndfile/archive/refs/tags/{{version}}.tar.gz + strip-components: 1 + +versions: + github: libsndfile/libsndfile + +provides: + - bin/sndfile-info + - bin/sndfile-convert + - bin/sndfile-play + +dependencies: + xiph.org/flac: '*' + lame.sourceforge.io: '*' + xiph.org/ogg: '*' + xiph.org/vorbis: '*' + mpg123.de: '*' + opus-codec.org: '*' + +build: + dependencies: + cmake.org: '*' + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + python.org: ^3.11 + script: | + cmake -S . -B build $ARGS + cmake --build build + cmake --install build + env: + ARGS: + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_PREFIX={{prefix}} + - -DBUILD_SHARED_LIBS=ON + - -DBUILD_PROGRAMS=ON + - -DENABLE_PACKAGE_CONFIG=ON + - -DINSTALL_PKGCONFIG_MODULE=ON + - -DBUILD_EXAMPLES=OFF + - -DCMAKE_INSTALL_RPATH={{prefix}} + - -DPYTHON_EXECUTABLE="$(which python)" + +test: + script: | + SNDFILE_INFO="$(sndfile-info test.wav)" + case "$SNDFILE_INFO" in + *'Duration : 00:00:00.064'*) + echo 'Success' + ;; + *) + echo 'Error' + exit 1 + ;; + esac diff --git a/projects/github.com/libsndfile/libsndfile/test.wav b/projects/github.com/libsndfile/libsndfile/test.wav new file mode 100644 index 00000000..c846b8a9 Binary files /dev/null and b/projects/github.com/libsndfile/libsndfile/test.wav differ