archrelease: copy trunk to extra-x86_64
[arch-packages.git] / freeglut / trunk / PKGBUILD
blob0431744988cbb2bf3190eede106142968d736c77
1 # Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
2 # Contributor: Eric Belanger <eric@archlinux.org>
3 # Contributor: Tom Newsom <Jeepster@gmx.co.uk>
5 pkgname=freeglut
6 pkgver=3.2.1
7 pkgrel=2
8 pkgdesc="Provides functionality for small OpenGL programs"
9 arch=(x86_64)
10 url="http://freeglut.sourceforge.net/"
11 license=(MIT)
12 depends=(libxi libxrandr libgl)
13 makedepends=(mesa glu libxxf86vm cmake)
14 replaces=(glut)
15 provides=(glut)
16 conflicts=(glut)
17 source=(https://downloads.sourceforge.net/freeglut/${pkgname}-${pkgver}.tar.gz)
18 sha512sums=('aced4bbcd36269ce6f4ee1982e0f9e3fffbf18c94f785d3215ac9f4809b992e166c7ada496ed6174e13d77c0f7ef3ca4c57d8a282e96cbbe6ff086339ade3b08')
20 prepare() {
21   cd $pkgname-$pkgver
24 build() {
25   CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
26   cmake -H$pkgname-$pkgver -Bbuild \
27     -DFREEGLUT_BUILD_STATIC_LIBS=OFF \
28     -DCMAKE_INSTALL_PREFIX=/usr \
29     -DCMAKE_INSTALL_LIBDIR=lib \
30     -DCMAKE_BUILD_TYPE=None
31   cmake --build build
34 package() {
35   DESTDIR="$pkgdir" cmake --build build --target install
36   ln -sr "$pkgdir"/usr/lib/pkgconfig/{glut,freeglut}.pc
37   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $pkgname-$pkgver/COPYING
40 # vim: ts=2 sw=2 et: