PKGBUILD 1.4 KB
Newer Older
1 2
_pkgbasename=virtualgl
pkgname=lib32-${_pkgbasename}
3 4
pkgver=2.6.1
pkgrel=1
5 6
pkgdesc="32-bit serverside components for 64-bit VirtualGL servers."
arch=('x86_64')
7
url="https://virtualgl.org"
8
license=('LGPL')
9 10
depends=('virtualgl' 'lib32-libxv' 'lib32-glu' 'lib32-libjpeg-turbo')
makedepends=('lib32-libxv' 'lib32-glu' 'cmake' 'lib32-gcc-libs' 'lib32-mesa' 'lib32-libxtst')
11
conflicts=('virtualgl32-bin')
12 13 14 15 16 17 18 19 20
source=("https://downloads.sourceforge.net/project/virtualgl/${pkgver}/VirtualGL-${pkgver}.tar.gz")
sha1sums=('0b5db8cd90e658605a7e04bc694a7739ec3edce4')

prepare() {
  # FS#48403
  export LDFLAGS="${LDFLAGS/--as-needed,}"

  mkdir "$srcdir/VirtualGL-$pkgver"/build
}
21 22

build() {
23
  cd "$srcdir/VirtualGL-$pkgver"/build
24 25 26 27

  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
Neophytos's avatar
Neophytos committed
28

29 30 31 32 33 34 35 36 37
  cmake .. \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DTJPEG_INCLUDE_DIR=/usr/include \
      -DTJPEG_LIBRARY=/usr/lib32/libturbojpeg.so \
      -DCMAKE_INSTALL_LIBDIR=/usr/lib32 \
      -DCMAKE_INSTALL_BINDIR=/usr/bin \
      -DX11_X11_LIB=/usr/lib32/libX11.so \
      -DX11_Xext_LIB=/usr/lib32/libXext.so \
      -DOPENGL_gl_LIBRARY=/usr/lib32/libGL.so
38 39 40 41 42 43 44 45
  make
}

package() {
  cd "$srcdir/VirtualGL-$pkgver/build"
  make install DESTDIR="$pkgdir"

  cd "$pkgdir/usr"
46
  mv bin/glxspheres glxspheres32
47 48
  rm -rf bin
  mkdir -p bin
49
  mv glxspheres32 bin/
50

51 52
  rm -rf "$pkgdir/usr/share"
  rm -rf "$pkgdir/usr/include"
53
}