comparison multimedia/libbluray/libbluray.sh @ 545:c0553584950e

multimedia/libbluray: initial import, closes #1590
author David Demelier <markand@malikania.fr>
date Fri, 12 Apr 2019 10:19:07 +0200
parents
children bad483aace64
comparison
equal deleted inserted replaced
544:91df0731a3f5 545:c0553584950e
1 #!/bin/sh
2 #
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #
17
18 PKGNAME=libbluray
19 PKGVERSION=1.1.1
20 PKGREVISION=1
21 PKGLICENSE="LGPLv21+"
22 PKGSUMMARY="bluray access library"
23 PKGDOWNLOAD="https://download.videolan.org/pub/videolan/$PKGNAME/$PKGVERSION/$PKGNAME-$PKGVERSION.tar.bz2"
24 PKGOPTIONS="FONTCONFIG FREETYPE XML"
25
26 : ${CHOST:=$(uname -m)-linux-musl}
27 : ${CBUILD:=$(uname -m)-linux-musl}
28 : ${CC:=clang}
29 : ${CFLAGS:=-O2}
30 : ${LDFLAGS:=}
31 : ${LIBS:=}
32 : ${FONTCONFIG:=yes}
33 : ${FREETYPE:=yes}
34 : ${XML:=yes}
35
36 if [ "$FONTCONFIG" = "yes" ]; then
37 PKGDEPENDS="fonts/fontconfig $PKGDEPENDS"
38 with_fontconfig="--with-fontconfig"
39 else
40 with_fontconfig="--without-fontconfig"
41 fi
42
43 if [ "$FREETYPE" = "yes" ]; then
44 PKGDEPENDS="fonts/freetype $PKGDEPENDS"
45 with_freetype="--with-freetype"
46 else
47 with_freetype="--without-freetype"
48 fi
49
50 if [ "$XML" = "yes" ]; then
51 PKGDEPENDS="text/libxml2 $PKGDEPENDS"
52 with_xml="--with-libxml2"
53 else
54 with_xml="--without-libxml2"
55 fi
56
57 build()
58 {
59 rm -rf $PKGNAME-$PKGVERSION
60 tar xvaf $PKGNAME-$PKGVERSION.tar.bz2
61 pushd $PKGNAME-$PKGVERSION
62
63 # TODO: re-enable bdjava-jar once ant is there.
64 CC="$CC" \
65 CFLAGS="$CFLAGS" \
66 LDFLAGS="$LDFLAGS" \
67 LIBS="$LIBS" \
68 ./configure \
69 --build=$CBUILD \
70 --host=$CHOST \
71 --prefix=/ \
72 --disable-bdjava-jar \
73 --enable-shared \
74 --disable-static \
75 $with_fontconfig \
76 $with_freetype \
77 $with_xml
78 make
79 make install DESTDIR=$DESTDIR
80 rm -f $DESTDIR/lib/libbluray.la
81
82 popd
83 rm -rf $PKGNAME-$PKGVERSION
84 }