LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File PKGBUILD of Package vlc-git (Project home:metakcahura)

# Maintainer : Andrew Crerar <andrew (dot) crerar at gmail>
# Contributor: Rob McCathie <korrode at gmail>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
# Contributor: Martin Sandsmark <martin.sandsmark@kde.org>
# Contributor: heaven <aheaven87 at gmail dot com>
# Contributor: graysky <graysky at archlinux dot us>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: MacWolf <macwolf at archlinux dot de>

_name=vlc
pkgname=vlc-git
pkgver=r2.2.0.git.645.g345fa6c
pkgrel=1
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player (GIT Version)"
arch=('x86_64')
url="http://www.videolan.org/vlc/"
license=('LGPL2.1' 'GPL2')
depends=(
    'a52dec'
    'aribb24'
    'faad2'
    'ffmpeg'
    'fontconfig'
    'freetype2'
    'fribidi'
    'gnutls'
    'harfbuzz'
    'hicolor-icon-theme'
    'libarchive'
    'libdca'
    'libdvbpsi'
    'libdvdnav'
    'libglvnd'
    'libidn'
    'libmad'
    'libmatroska'
    'libmpcdec'
    'libmpeg2'
    'libplacebo'
    'libproxy'
    'libsecret'
    'libshout'
    'libtar'
    'libupnp'
    'libxinerama'
    'libxml2'
    'libxpm'
    'lua'
    'mesa'
    'qt5-base'
    'qt5-declarative'
    'qt5-quickcontrols2'
    'qt5-svg'
    'qt5-x11extras'
    'sdl_image'
    'taglib'
    'vulkan-icd-loader'
    'xcb-util-keysyms'
    'wayland-protocols'
    )
makedepends=(
	'alsa-lib'
	'aom'
	'avahi'
	'chromaprint'
	'dav1d'
	'flac'
	'git'
	'gst-plugins-base-libs'
	'gtk3'
	'jack'
	'libass'
	'libavc1394'
	'libbluray'
	'libcaca'
	'libdc1394'
	'libdvdcss'
	'libdvdnav'
	'libdvdread'
	'libgme'
	'libgoom2'
	'libjpeg-turbo'
	'libkate'
	'libmicrodns'
	'libmodplug'
	'libmtp'
	'libnfs'
	'libnotify'
	'libogg'
	'libpng'
	'libpulse'
	'librsvg'
	'libsamplerate'
	'libshout'
	'libsoxr'
	'libssh2'
	'libtheora'
	'libtiger'
	'libvorbis'
	'libvpx'
	'libx264.so'
	'libx265.so'
	'lirc'
	'live-media'
	'mesa'
	'mpg123'
	'opus'
	'projectm'
	'protobuf'
	'sdl_image'
	'smbclient'
	'speex'
	'srt'
        'systemd-libs'
	'twolame'
	'unzip'
	'vcdimager'
	'vulkan-headers'
	'zvbi'
    )
optdepends=(
	'alsa-lib: ALSA audio output'
	'aom: AOM AV1 codec'
	'avahi: service discovery using bonjour protocol'
	'chromaprint: Chromaprint audio fingerprinter'
	'dav1d: dav1d AV1 decoder'
	'flac: Free Lossless Audio Codec plugin'
	'gst-plugins-base-libs: for libgst plugins'
	'gtk3: notification plugin'
	'jack: jack audio server'
	'kwallet: kwallet keystore'
	'libass: Subtitle support'
	'libavc1394: devices using the 1394ta AV/C'
	'libbluray: Blu-Ray video input'
	'libcaca: colored ASCII art video output'
	'libcdio: audio CD playback'
	'libdc1394: IEEE 1394 access plugin'
	'libdvdcss: decoding encrypted DVDs'
	'libdvdnav: DVD with navigation input module'
	'libdvdread: DVD input module'
	'libgme: Game Music Emu plugin'
	'libgoom2: Goom visualization'
	'libjpeg-turbo: JPEG support'
	'libkate: Kate codec'
	'libmicrodns: mDNS services discovery (chromecast etc)'
	'libmodplug: MOD output plugin'
	'libmtp: MTP devices discovery'
	'libnfs: NFS access'
	'libnotify: notification plugin'
	'libogg: Ogg and OggSpots codec'
	'libpng: PNG support'
	'libpulse: PulseAudio audio output'
	'librsvg: SVG plugin'
	'libsamplerate: audio Resampler'
	'libshout: shoutcast/icecast output plugin'
	'libsoxr: SoX audio Resampler'
	'libssh2: sftp access'
	'libtheora: theora codec'
	'libtiger: Tiger rendering for Kate streams'
	'libva-intel-driver: video backend intel'
	'libva-vdpau-driver: vdpau backend nvidia'
	'libvorbis: Vorbis decoder/encoder'
	'libvpx: VP8 and VP9 codec'
	'lirc: lirc control'
	'lua-socket: http interface'
	'mpg123: mpg123 codec'
	'ncurses: ncurses interface'
	'opus: opus codec'
	'projectm: ProjectM visualisation'
	'protobuf: chromecast streaming'
	'sdl_image: SDL image support'
	'smbclient: SMB access plugin'
	'speex: Speex codec'
	'srt: SRT input/output plugin'
        'systemd-libs: udev services discovery'
	'ttf-dejavu: subtitle font'
	'ttf-freefont: subtitle font'
	'twolame: TwoLAME mpeg2 encoder plugin'
	'vcdimager: navigate VCD with libvcdinfo'
        'x264: H264 encoding'
	'x265: HEVC/H.265 encoder'
	'zvbi: VBI/Teletext decoding'
	)
conflicts=("${_name}" 'vlc-dev' 'vlc-plugin' 'vlc-stable-git')
provides=("${_name}=${pkgver}")
options=("!libtool" "!emptydirs")
source=("${pkgname}-${pkgver}.tar.xz"
        'lua53_compat.patch'
        'update-vlc-plugin-cache.hook')
sha512sums=('SKIP'
            '33cda373aa1fb3ee19a78748e2687f2b93c8662c9fda62ecd122a2e649df8edaceb54dda3991bc38c80737945a143a9e65baa2743a483bb737bb94cd590dc25f'
            '2f1015af384559bf4868bb989c06a7d281a8e32afb175ef397dbf1671bae3540a3a6b073a74ed77ed82e79a81f964a5a58a98c2a3f1b5e5cd5e9ea60d58c737f')

prepare() {
  cd "${pkgname}-${pkgver}"

  echo $pkgver > src/revision.txt
  ./bootstrap

  sed -e 's:truetype/ttf-dejavu:TTF:g' -i modules/visualization/projectm.cpp
  sed -e 's|-Werror-implicit-function-declaration||g' -i configure
  patch -Np1 < "${srcdir}"/lua53_compat.patch
  sed 's|whoami|echo builduser|g' -i configure
  sed 's|hostname -f|echo arch|g' -i configure
}

build() {
  cd "${pkgname}-${pkgver}"

  echo $pkgver > src/revision.txt

  export CFLAGS+=" -I/usr/include/samba-4.0"
  export CPPFLAGS+=" -I/usr/include/samba-4.0"
  export CXXFLAGS+=" -std=c++11"
  export LUAC=/usr/bin/luac
  export LUA_LIBS="$(pkg-config --libs lua)"
  export RCC=/usr/bin/rcc-qt5

  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --with-kde-solid=/usr/share/solid/actions/ \
              --libexecdir=/usr/lib \
              --disable-rpath \
              --enable-nls \
              --enable-archive \
              --enable-live555 \
              --enable-dc1394 \
              --enable-dv1394 \
              --enable-dvdread \
              --enable-dvdnav \
              --enable-bluray \
              --disable-opencv \
              --enable-smbclient \
              --enable-sftp \
              --enable-nfs \
              --enable-dvbpsi \
              --enable-gme \
              --enable-ogg \
              --enable-shout \
              --enable-matroska \
              --enable-mod \
              --enable-mpc \
              --enable-mad \
              --enable-mpg123 \
              --enable-gst-decode \
              --enable-avcodec \
              --enable-libva \
              --enable-avformat \
              --enable-postproc \
              --enable-faad \
              --enable-vpx \
              --enable-twolame \
              --disable-fdkaac \
              --enable-a52 \
              --enable-dca \
              --enable-flac \
              --enable-libmpeg2 \
              --enable-vorbis \
              --enable-speex \
              --enable-opus \
              --enable-oggspots \
              --disable-schroedinger \
              --enable-png \
              --enable-jpeg \
              --enable-x264 \
              --enable-x265 \
              --enable-zvbi \
              --enable-libass \
              --enable-kate \
              --enable-tiger \
              --enable-vdpau \
              --enable-wayland \
              --enable-sdl-image \
              --enable-freetype \
              --enable-fribidi \
              --enable-harfbuzz \
              --enable-fontconfig \
              --enable-svg \
              --enable-svgdec \
              --enable-caca \
              --enable-pulse \
              --enable-alsa \
              --enable-jack \
              --enable-samplerate \
              --enable-soxr \
              --enable-chromaprint \
              --enable-chromecast \
              --enable-qt \
              --enable-skins2 \
              --enable-libtar \
              --enable-ncurses \
              --enable-lirc \
              --enable-goom \
              --enable-projectm \
              --enable-avahi \
              --enable-mtp \
              --enable-upnp \
              --enable-microdns \
              --enable-libxml2 \
              --disable-libgcrypt \
              --enable-gnutls \
              --enable-taglib \
              --enable-secret \
              --enable-kwallet \
              --disable-update-check \
              --enable-notify \
              --enable-libplacebo \
              --enable-vlc \
              --enable-aribsub \
              --enable-aom \
              --enable-srt
              #--enable-dav1d \
  make -j8
}

package() {
  cd "${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install

  for res in 16 32 48 128 256; do
    install -Dm 644 "${srcdir}"/"${pkgname}-${pkgver}"/share/icons/"${res}"x"${res}"/vlc.png \
                     "${pkgdir}"/usr/share/icons/hicolor/"${res}"x"${res}"/apps/vlc.png
  done

  install -Dm 644 "${srcdir}"/update-vlc-plugin-cache.hook -t "${pkgdir}"/usr/share/libalpm/hooks
}