Mercurial > vanilla
comparison multimedia/x264/x264.sh @ 809:87ab1f983122
multimedia/x264: initial import, closes #1754
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 18 Aug 2019 22:25:00 +0200 |
parents | |
children | a133976e0783 |
comparison
equal
deleted
inserted
replaced
808:9272b38b063d | 809:87ab1f983122 |
---|---|
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=x264 | |
19 PKGVERSION=20190811-2245 | |
20 PKGREVISION=1 | |
21 PKGLICENSE="GPLv2" | |
22 PKGSUMMARY="opensource H.264 video encoder" | |
23 PKGDOWNLOAD="https://download.videolan.org/pub/videolan/$PKGNAME/snapshots/$PKGNAME-snapshot-$PKGVERSION.tar.bz2" | |
24 PKGOPTIONS="FFMPEG" | |
25 | |
26 : ${CC:=clang} | |
27 : ${CFLAGS:=-O2} | |
28 : ${LDFLAGS:=} | |
29 : ${LIBS:=} | |
30 : ${FFMPEG:=yes} | |
31 | |
32 if [ "$FFMPEG" = "yes" ]; then | |
33 PKGDEPENDS="multimedia/ffmpeg $PKGDEPENDS" | |
34 with_ffmpeg="--enable-swscale --enable-lavf" | |
35 else | |
36 with_ffmpeg="--disable-swscale --disable-lavf" | |
37 fi | |
38 | |
39 build() | |
40 { | |
41 rm -rf $PKGNAME-snapshot-$PKGVERSION | |
42 tar xvf $PKGNAME-snapshot-$PKGVERSION.tar.bz2 | |
43 cd $PKGNAME-snapshot-$PKGVERSION | |
44 | |
45 sed -i -e "s|/bin/bash|/bin/sh|" configure | |
46 CC="$CC" \ | |
47 CFLAGS="$CFLAGS" \ | |
48 LDFLAGS="$LDFLAGS" \ | |
49 LIBS="$LIBS" \ | |
50 ./configure \ | |
51 --prefix= \ | |
52 --enable-shared \ | |
53 --enable-static | |
54 make | |
55 make install DESTDIR=$DESTDIR | |
56 | |
57 cd .. | |
58 rm -rf $PKGNAME-snapshot-$PKGVERSION | |
59 } |