summaryrefslogtreecommitdiff
path: root/repo/libebml/libebml.xibuild
blob: b2df1896e69065ad30f3d7f3e1c71471367541a8 (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="libebml"
DESC="C++ library to parse Extensible Binary Meta-Language files"

MAKEDEPS="cmake ninja"

PKG_VER=1.4.3
SOURCE="http://dl.matroska.org/downloads/libebml/libebml-$PKG_VER.tar.xz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi

	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		$CMAKE_CROSSOPTS
	cmake --build build
}

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