summaryrefslogtreecommitdiff
path: root/community/lightspark/PKGBUILD
blob: 876666175887f5282fe97bcf275bc1d98efaa396 (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
# Maintainer: Thomas Dziedzic < gostrc at gmail >
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>

pkgname=lightspark
pkgver=0.4.6.1
pkgrel=2
pkgdesc='An alternative Flash Player for Linux.'
arch=('i686' 'x86_64')
url='http://lightspark.sourceforge.net'
license=('LGPL3')
conflicts=('lightspark-git')
# add libxml++ back after repos update it
depends=('mesa' 'ftgl' 'sdl' 'gtk2' 'curl' 'zlib' 'ffmpeg' 'glew' 'pcre' 'libpulse' 'libffi' 'boost-libs' 'glibmm' 'ffmpeg' 'gtkglext' 'desktop-file-utils')
makedepends=('cmake' 'nasm' 'xulrunner' 'llvm' 'glproto' 'boost' 'pkgconfig' 'libxml2>=2.7.7' 'fontconfig')
optdepends=('gnash-gtk: fallback support')
install="${pkgname}.install"
source=("http://launchpad.net/${pkgname}/trunk/${pkgname}-${pkgver:0:5}/+download/${pkgname}-${pkgver}.tar.gz"
        'http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.33/libxml++-2.33.1.tar.bz2')
md5sums=('a352604c4cfe33f5e0bfec5cf27a6019'
         '90919b5a5e92381722ef004898eba343')

build() {
  # statically link against libxml++ 2.33.1 because of constant crashes
  # DIRTEH HACK -- reading below code may cause eye leakage
  export CFLAGS="-fPIC ${CFLAGS}"
  export CXXFLAGS="-fPIC ${CXXFLAGS}"
  # need to add fPIC since liblightspark itself is a shared object
  cd libxml++-2.33.1
  ./configure \
    --prefix=${srcdir}/iamsorry \
    --enable-static \
    --disable-shared \
    --disable-documentation \
    --disable-examples
  make
  make install

  export PKG_CONFIG_PATH=${srcdir}/iamsorry/lib/pkgconfig/
  
  cd ${srcdir}

  sed -i '213iLINK_DIRECTORIES(${LIBXMLPP_LIB_DIR})' ${srcdir}/${pkgname}-${pkgver}/CMakeLists.txt

  rm -rf build
  mkdir build
  cd build

  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCOMPILE_PLUGIN=1 \
    -DCMAKE_BUILD_TYPE=Release \
    -DGNASH_EXE_PATH=/usr/bin/gtk-gnash \
    -DLIBXMLPP_LIB_DIR=${srcdir}/iamsorry/lib \
    ../${pkgname}-${pkgver}

  make
}

package() {
  cd build

  make DESTDIR=${pkgdir} install
}