pantry/projects/opus-codec.org/package.yml

59 lines
1.3 KiB
YAML
Raw Normal View History

2023-03-08 20:58:11 +03:00
distributable:
url: https://github.com/xiph/opus/archive/refs/tags/v{{ version.raw }}.tar.gz
strip-components: 1
2023-03-08 20:58:11 +03:00
versions:
2024-03-04 22:11:16 +03:00
github: xiph/opus/tags
2023-03-08 20:58:11 +03:00
strip: /^v/
build:
dependencies:
gnu.org/autoconf: 2
gnu.org/automake: 1.16
gnu.org/libtool: 2.4
2024-03-04 22:11:16 +03:00
gnu.org/wget: '*' # downloads content at build time
script:
- ./autogen.sh
- ./configure $ARGS
- make --jobs {{ hw.concurrency }}
- make install
2023-03-08 20:58:11 +03:00
2024-03-04 22:11:16 +03:00
- run: |
mv opus/* .
rmdir opus
ln -s . opus
working-directory: ${{ prefix }}/include
env:
2023-03-08 20:58:11 +03:00
ARGS:
- --prefix={{ prefix }}
- --disable-dependency-tracking
- --disable-doc
test:
2024-03-04 22:11:16 +03:00
- run: cc $FIXTURE -lopus -o test
fixture:
extname: cpp
content: |
#include <opus.h>
int main(int argc, char **argv)
2023-03-08 20:58:11 +03:00
{
2024-03-04 22:11:16 +03:00
int err = 0;
opus_int32 rate = 48000;
int channels = 2;
int app = OPUS_APPLICATION_AUDIO;
OpusEncoder *enc;
int ret;
enc = opus_encoder_create(rate, channels, app, &err);
if (!(err < 0))
{
err = opus_encoder_ctl(enc, OPUS_SET_BITRATE(OPUS_AUTO));
if (!(err < 0))
{
opus_encoder_destroy(enc);
return 0;
}
}
return err;
2023-03-08 20:58:11 +03:00
}
2024-03-04 22:11:16 +03:00
- ./test