summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 375d0311b50dc443ede364894f123578080ec820 (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
# Contributor: Andrew Wong <andrew@wongdev.com>
_pkgbase="freeglut"
pkgbase="$_pkgbase-svn"
pkgname=("$_pkgbase-x11-svn" "$_pkgbase-wayland-svn")
pkgver=r1846
pkgrel=2
arch=('i686' 'x86_64')
url="http://freeglut.sourceforge.net/"
license=('MIT')
makedepends=('subversion' 'cmake' 'mesa' 'glu' 'wayland' 'libxxf86vm')
provides=('glut' 'freeglut' 'freeglut-svn')
conflicts=('glut' 'freeglut' 'freeglut-svn')
source=("svn+https://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgbase"
  local ver="$(svnversion)"
  echo "r${ver//[[:alpha:]]}"
}

prepare() {
  mkdir -p "$srcdir/$_pkgbase/build-x11"
  mkdir -p "$srcdir/$_pkgbase/build-wayland"
}

package_freeglut-x11-svn() {
  depends=('libxi' 'libxrandr' 'libgl')
  pkgdesc="Provides functionality for small OpenGL programs; X11 version"

  cd "$srcdir/$_pkgbase/build-x11"
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DFREEGLUT_BUILD_DEMOS=OFF
  make all
  make DESTDIR="$pkgdir/" install
  install -Dm644 ../COPYING "$pkgdir/usr/share/licenses/$_pkgbase/LICENSE"
}

package_freeglut-wayland-svn() {
  depends=('wayland' 'libxkbcommon' 'libgl')
  pkgdesc="Provides functionality for small OpenGL programs; Wayland version"

  cd "$srcdir/$_pkgbase/build-wayland"
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DFREEGLUT_BUILD_DEMOS=OFF -DFREEGLUT_WAYLAND=ON
  make all
  make DESTDIR="$pkgdir/" install
  install -Dm644 ../COPYING "$pkgdir/usr/share/licenses/$_pkgbase/LICENSE"
}