master chld/ports-heresy / lib / libogg / ndmake.sh
 1#!/bin/sh -ue
 2NAME=libogg
 3VERSION=1.3.6
 4RELEASE=1
 5SOURCE="https://github.com/xiph/ogg/releases/download/v1.3.6/libogg-1.3.6.tar.gz"
 6BUILD_STYLE=hell
 7
 8build() {
 9	msg "generating with demiurge..."
10	demiurge . || die "demiurge failed"
11
12	msg "generating ninja files with hell..."
13	satan gen PREFIX="$PREFIX" DESTDIR="$PKG" . || die "satan gen failed"
14
15	msg "fixing config_types.h..."
16	cat > include/ogg/config_types.h <<'EOF' || die "config_types.h patch failed"
17#ifndef __CONFIG_TYPES_H__
18#define __CONFIG_TYPES_H__
19
20#include <stdint.h>
21
22typedef int16_t ogg_int16_t;
23typedef uint16_t ogg_uint16_t;
24typedef int32_t ogg_int32_t;
25typedef uint32_t ogg_uint32_t;
26typedef int64_t ogg_int64_t;
27typedef uint64_t ogg_uint64_t;
28
29#endif
30EOF
31
32	msg "building libogg..."
33	samu || die "samu build failed"
34
35	msg "installing libogg..."
36	samu install || die "samu install failed"
37
38	mkdir -p $PKG$PREFIX/include/ogg
39	cp include/ogg/config_types.h $PKG$PREFIX/include/ogg/
40}
41
42. ${0%/*}/../../libsh/libdmake.sh