summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7884c3e81c5ed3905cde97902928747f3b6da569 (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
80
81
82
# Contributor: Abdel-Rahman Abdel-Rahman <abodyxplay1@gmail.com>
# Contributor: Iru Cai <mytbk920423@gmail.com>
# Contributor: Tim Van den Langenbergh <tmt_vdl@gmx.com>
# Contributor: Omar Botta <omarbotta@gnulinuxlibre.net>
# Contributor: Carlos Sanchez <cargabsj175@vegnux.org.ve>
# Contributor: Frederic Bezies <fredbezies@gmail.com>

pkgname=gnash-git
_gitname=gnash
pkgver=0.8.11.r22358.g9229f6f
pkgrel=1
pkgdesc="The GNU SWF Player based on GameSWF - git development version"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/gnash/"
license=('GPL3')
depends=('curl' 'giflib' 'sdl' 'libjpeg' 'libpng' 'libgl' 
  'glu' 'fontconfig' 'cairo' 'ffmpeg' 'jemalloc' 'boost-libs' 
  'gtk2' 'libldap' 'hicolor-icon-theme' 'desktop-file-utils' 'gconf' 
  'gtkglext' 'agg' 'gdk-pixbuf2')
makedepends=('mesa' 'xulrunner' 'pkgconfig' 'boost' 'git')
provides=('gnash-common' 'gnash-gtk' 'gnash')
conflicts=('gnash-common' 'gnash-gtk' 'gnash')
replaces=('gnash-common' 'gnash-gtk' 'gnash')
options=('!emptydirs')
install=$_gitname.install
backup=('etc/gnashpluginrc')
source=('git://git.sv.gnu.org/gnash.git'
        'jemalloc_gnash.patch'
        'build_on_new_boost.patch')
sha256sums=('SKIP'
            '422aad0cf678f8427b1601e41e6440b3526872b640b6ccd3ab93ae656a9a8c8e'
            '1df546e376f0a0e495f2c1a96f13e29c507dfb5f16b808696dc8c7474d833f65')

pkgver() {
  cd $_gitname

  echo "0.8.11.r$(git rev-list --count master).g$(git log -1 --format="%h")" 
}

prepare() {
  cd $_gitname

  chmod +x autogen.sh
  ./autogen.sh
}

build() {
  cd $_gitname

  patch -Np1 -i "${srcdir}/jemalloc_gnash.patch"
  sed -i 's#${JEMALLOC_CONFIG} --cxxflags#${JEMALLOC_CONFIG} --cflags#g' configure

  # https://savannah.gnu.org/bugs/?46148
  patch -Np1 -i "${srcdir}/build_on_new_boost.patch"

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --with-plugins-install=system \
    --with-npapi-plugindir=/usr/lib/mozilla/plugins \
    --enable-gui=sdl,gtk \
    --enable-media=ffmpeg \
    --enable-renderer=all \
    --enable-device=x11

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/      func_append compile_command " -Wl,-O1,--as-needed"\n      func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool

  make
}

package() {
  cd $_gitname

  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install install-plugin

  install -m755 -d "$pkgdir/usr/share/gconf/schemas"

  gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/gnash.schemas" --domain gnash \
    "$pkgdir"/usr/share/applications/*.schemas

  rm -f "$pkgdir"/usr/share/applications/*.schemas
}