summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: def8b21bfde4326705dd8e09150f1a7999d29546 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
# Contributor: DrZaius <lou[at]fakeoutdoorsman.com>

pkgname=x262-git
pkgver=0.142.2633.bb887aa
pkgrel=1
pkgdesc="x264 with MPEG-2 video support (GIT version)"
arch=('x86_64')
license=('GPL')
depends=('zlib'
         'bzip2'
         'xz'
         'sdl'
         )
makedepends=('git'
             'yasm'
             )
url="https://www.videolan.org/developers/x262.html"
source=('git+https://git.videolan.org/git/x262.git'
        'git+https://github.com/ffmpeg/ffmpeg.git#tag=n2.7.7'
        'git+https://github.com/FFMS/ffms2.git#tag=2.20')
provides=('x262')
conflicts=('x262')
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            )

pkgver() {
  cd x262
  echo "$(sh version.sh | grep 'X264_POINTVER' | cut -d '"' -f2 | tr M m | tr ' ' .)"
}

prepare() {
  mkdir -p build-{ffmpeg,ffms2}
}

build() {
  msg2 "Build FFmpeg"
  cd "${srcdir}/build-ffmpeg"
  ../ffmpeg/configure \
    --prefix="${srcdir}/fakeroot" \
    --disable-{network,{encod,mux}ers,hwaccels,{in,out}devs,debug,doc,vdpau,vaapi,programs} \
    --enable-pic \
    --enable-gpl

  make install-libs install-headers

  export PKG_CONFIG_LIBDIR="${srcdir}/fakeroot/lib/pkgconfig"
  export PKG_CONFIG_PATH="${PKG_CONFIG_LIBDIR}:/usr/lib/pkgconfig"

  msg2 "Build FFmpegsource"
  cd "${srcdir}/build-ffms2"
  (cd "${srcdir}/ffms2"; mkdir -p src/config; autoreconf -vfi)
  ../ffms2/configure \
    --prefix="${srcdir}/fakeroot" \
    --enable-shared=no

  make install-libLTLIBRARIES install-pkgconfigDATA install-includeHEADERS

  msg2 "Build x262"
  cd "${srcdir}/x262"
  ./configure \
    --prefix=/usr \
    --disable-lsmash \
    --enable-pic

  make
}

package() {
  make -C x262 DESTDIR="${pkgdir}" install
  rm -fr "${pkgdir}/usr/bin/x262"
  mv "${pkgdir}/usr/bin/x264" "${pkgdir}/usr/bin/x262"
}