summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 44a0c99965f7fd601c57073105de6178a8ce5daa (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
77
78
79
# Maintainer: orumin <dev@orum.in>

_basename=gst-plugins-bad
pkgname="lib32-$_basename"
pkgver=1.12.1
pkgrel=4
pkgdesc="GStreamer Multimedia Framework Bad Plugins (32-bit)"
url="https://gstreamer.freedesktop.org/"
arch=('x86_64')
license=(LGPL)
depends=(mjpegtools lib32-gst-plugins-base-libs lib32-chromaprint lib32-libmms
         lib32-faad2 lib32-celt lib32-libdca lib32-libdvdnav lib32-libmodplug lib32-libgme
         lib32-wayland lib32-openjpeg2 lib32-libwebp lib32-libsrtp lib32-gnutls
         lib32-glu lib32-sbc lib32-rtmpdump lib32-libgudev lib32-graphene lib32-schroedinger
         lib32-libexif lib32-libdvdread lib32-libvdpau lib32-libmpeg2 lib32-wildmidi lib32-ladspa
         lib32-openal lib32-libusb lib32-vulkan-icd-loader lib32-libfdk-aac lib32-faac lib32-soundtouch
         lib32-spandsp lib32-neon lib32-webrtc-audio-processing lib32-libdc1394 lib32-libmpcdec
         lib32-zvbi gst-plugins-bad)
# lib32-libofa adn lib32-curl disabled
makedepends=(python valgrind-multilib gobject-introspection git autoconf-archive vulkan-headers
             lib32-gtk3 lib32-clutter lib32-librsvg lib32-libtiger lib32-fluidsynth lib32-opencv lib32-openexr)
_commit=30f004de7fa9fd83b32b1f9be0f35e660e546f8f  # tags/1.12.1^0
source=(${url}/src/$_basename/$_basename-$pkgver.tar.xz)
source=("git+https://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad#commit=$_commit"
        "gst-common::git+https://anongit.freedesktop.org/git/gstreamer/common")
sha256sums=('SKIP'
            'SKIP')
pkgver() {
  cd $_basename
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $_basename

  git submodule init
  git config --local submodule.common.url "$srcdir/gst-common"
  git submodule update

  sed -i 's/cmu_us_kal/&16/g' configure.ac ext/flite/gstflitetestsrc.c
  sed -i 's/openjpeg-2.1/openjpeg-2.2/' -i ext/openjpeg/gstopenjpeg.h

  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $_basename

  export CC='gcc -m32'
  export CXX='g++ -m32'
  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --build=i686-pc-linux-gnu --libdir=/usr/lib32 \
    --with-package-name="GStreamer Bad Plugins (Arch Linux)" \
    --with-package-origin="http://www.archlinux.org/" \
    --with-gtk=3.0 \
    --disable-static --enable-experimental --disable-gtk-doc \
    --disable-lv2 --disable-ofa --disable-curl --disable-qt --disable-x265

  # https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

check() {
  cd $_basename
  # bad tests are bad
  #make -k check || :
}

package() {
  cd $_basename
  make DESTDIR="${pkgdir}" install

  cd "$pkgdir"/usr
  rm -r include share
}