summaryrefslogtreecommitdiff
path: root/repo/libmatroska/libmatroska.xibuild
blob: 330ebacdf7ffd98d3244ff6721fb8c43173141b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

NAME="libmatroska"
DESC="Extensible multimedia container format based on EBML"

MAKEDEPS="cmake libebml ninja"

PKG_VER=1.6.3
SOURCE="https://dl.matroska.org/downloads/libmatroska/libmatroska-$PKG_VER.tar.xz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		$CMAKE_CROSSOPTS
	cmake --build build
}

package() {
	DESTDIR="$PKG_DEST" cmake --build build --target install
}