2023-03-16 15:02:20 +03:00
|
|
|
distributable:
|
|
|
|
url: https://downloads.xiph.org/releases/ogg/libogg-{{version}}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
2023-05-01 20:14:59 +03:00
|
|
|
url: https://downloads.xiph.org/releases/ogg/
|
|
|
|
match: /libogg-(\d+\.\d+\.\d+)\.tar\.gz/
|
|
|
|
strip:
|
|
|
|
- /libogg-/
|
|
|
|
- /.tar.gz/
|
2023-03-16 15:02:20 +03:00
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
script: |
|
|
|
|
./configure $ARGS
|
2023-05-01 20:14:59 +03:00
|
|
|
make --jobs {{ hw.concurrency }}
|
2023-03-16 15:02:20 +03:00
|
|
|
make install
|
|
|
|
env:
|
|
|
|
ARGS:
|
|
|
|
- --prefix="{{prefix}}"
|
|
|
|
- --disable-dependency-tracking
|
|
|
|
|
|
|
|
test:
|
|
|
|
fixture: |
|
|
|
|
#include <ogg/ogg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
int main (void) {
|
|
|
|
ogg_sync_state oy;
|
|
|
|
ogg_stream_state os;
|
|
|
|
ogg_page og;
|
|
|
|
ogg_packet op;
|
|
|
|
char *buffer;
|
|
|
|
int bytes;
|
|
|
|
ogg_sync_init (&oy);
|
|
|
|
buffer = ogg_sync_buffer (&oy, 4096);
|
|
|
|
bytes = fread(buffer, 1, 4096, stdin);
|
|
|
|
ogg_sync_wrote (&oy, bytes);
|
|
|
|
if (ogg_sync_pageout (&oy, &og) != 1)
|
|
|
|
return 1;
|
|
|
|
ogg_stream_init (&os, ogg_page_serialno (&og));
|
|
|
|
if (ogg_stream_pagein (&os, &og) < 0)
|
|
|
|
return 1;
|
|
|
|
if (ogg_stream_packetout (&os, &op) != 1)
|
|
|
|
return 1;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
dependencies:
|
|
|
|
gnu.org/wget: '*'
|
|
|
|
script: |
|
|
|
|
wget https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg -O test.ogg
|
|
|
|
mv $FIXTURE test.c
|
|
|
|
cc test.c -logg
|
|
|
|
./a.out < test.ogg
|