summaryrefslogtreecommitdiff
path: root/extra/fltk/PKGBUILD
blob: 6c81007d74aa8b0d95ba3a848cbd2c6c5d3fb05a (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
# $Id: PKGBUILD 202754 2013-12-26 07:00:56Z bpiotrowski $
# Maintainer:

pkgbase=fltk
pkgname=('fltk' 'fltk-docs' 'fltk-games')
pkgver=1.3.2
pkgrel=5
arch=('i686' 'x86_64')
license=('custom:LGPL')
url="http://www.fltk.org/"
makedepends=('mesa' 'glu' 'doxygen' 'libjpeg' 'libxft' 'libxinerama' \
             'alsa-lib' 'desktop-file-utils' 'libxcursor')
source=(http://fltk.org/pub/fltk/$pkgver/fltk-$pkgver-source.tar.gz
        tigervnc.patch
        fltk-config-dynlibs.patch)
md5sums=('9f7e707d4fb7a5a76f0f9b73ff70623d'
         '9efdf03a449d7639b6da493cb0972bba'
         'b7ca1a3f5055aabe9c823e650db5b0b0')

prepare() {
  cd $pkgbase-$pkgver
  patch -p1 -i ../tigervnc.patch
  patch -p1 -i ../fltk-config-dynlibs.patch
}

build() {
  cd $pkgbase-$pkgver
  sed -i -e 's/$(LINKFLTK)/$(LINKSHARED)/' \
         -e 's/$(LINKFLTKIMG)/$(LINKSHARED)/' test/Makefile
  ./configure --prefix=/usr --enable-threads --enable-xft --enable-shared
  make
  make -C documentation html
}

package_fltk() {
  pkgdesc="Graphical user interface toolkit for X"
  depends=('libjpeg' 'libxft' 'libxinerama' 'hicolor-icon-theme' \
           'desktop-file-utils' 'xdg-utils' 'libxcursor')
  options=('!docs')
  install=fltk.install

  cd $pkgbase-$pkgver
  make DESTDIR="$pkgdir" install
  make DESTDIR="$pkgdir" -C fluid install install-linux
  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_fltk-docs() {
  pkgdesc="Graphical user interface toolkit for X (documentation)"

  cd $pkgbase-$pkgver/documentation
  install -d "$pkgdir"/usr/share/doc/fltk/
  for _file in html/* ; do
    install -m644 $_file "$pkgdir"/usr/share/doc/fltk/
  done
  make DESTDIR="$pkgdir" -C ../test install
  install -D -m644 ../COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_fltk-games() {
  pkgdesc="Example games that accompany FLTK: blocks, checkers and sudoku"
  depends=('alsa-lib' 'fltk')
  install=fltk-games.install

  cd $pkgbase-$pkgver/test
  make DESTDIR="$pkgdir" install-linux
  make DESTDIR="$pkgdir" -C ../documentation install-linux
  install -D -m644 ../COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}