summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 599265719c7617b8b16768087d59d41e9e686b67 (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
76
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
_plug=lsmashsource
pkgname="avisynth-plugin-${_plug}-git"
pkgver=1144.0.0.0.1.g2d1fa1f
pkgrel=1
pkgdesc="Plugin for Avisynth: ${_plug} (GIT version)"
arch=('x86_64')
url='https://forum.doom9.org/showthread.php?t=167435'
license=('custom:l-smash')
depends=(
  'avisynthplus'
  'l-smash' 'liblsmash.so'
)
makedepends=(
  'git'
  'meson'
  'avisynthplus'
 )
provides=("avisynth-plugin-${_plug}")
conflicts=("avisynth-plugin-${_plug}")
source=(
  "${_plug}::git+https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works.git"
  'ffmpeg::git+https://github.com/HomeOfAviSynthPlusEvolution/FFmpeg.git#branch=custom-patches-for-lsmashsource'
)
sha256sums=(
  'SKIP'
  'SKIP'
)
options=('debug')

pkgver() {
  cd "${_plug}"
  echo "$(git describe --long --tags | tr - . | tr -d v)"
}

prepare() {
  rm -fr "${_plug}/include"
}

build() {
  (
  cd ffmpeg
  ./configure \
    --prefix="${srcdir}/fakeroot" \
    --enable-gpl \
    --enable-version3 \
    --disable-all \
    --disable-autodetect \
    --enable-avcodec \
    --enable-avformat \
    --enable-swresample \
    --enable-swscale \
    --disable-asm

  make
  make install
  )

  cat > native_config <<EOF
[properties]
pkg_config_path = '${srcdir}/fakeroot/lib/pkgconfig:/usr/lib/pkgconfig'
pkg_config_libdir = '${srcdir}/fakeroot/lib/pkgconfig:/usr/lib/pkgconfig'
EOF

  arch-meson "${_plug}/AviSynth" build \
    --buildtype=release \
    --native-file="${srcdir}/native_config" \

  ninja -C build
}

package() {
  DESTDIR="${pkgdir}" ninja -C build install
  install -Dm644 "${_plug}/AviSynth/README" "${pkgdir}/usr/share/doc/avisynth/plugins/${_plug}/README"
  install -Dm644 "${_plug}/AviSynth/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}