summaryrefslogtreecommitdiff
path: root/multilib/lib32-libjpeg-turbo/PKGBUILD
blob: 09102ad966a8a0bd2d02e8dd40b38cc0cc7d732d (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
# $Id: PKGBUILD 48100 2011-05-28 16:27:44Z bluewind $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>

_pkgbasename=libjpeg-turbo
pkgname=lib32-$_pkgbasename
pkgver=1.1.1
pkgrel=1
pkgdesc="libjpeg derivative with accelerated baseline JPEG compression and decompression (32-bit)"
arch=('x86_64')
url="http://libjpeg-turbo.virtualgl.org/"
license=('GPL' 'custom')
depends=('lib32-glibc' $_pkgbasename)
makedepends=('nasm' gcc-multilib)
provides=('lib32-libjpeg=8.0.2')
conflicts=('lib32-libjpeg')
replaces=('lib32-libjpeg')
options=('!libtool')
source=(http://sourceforge.net/projects/$_pkgbasename/files/$pkgver/$_pkgbasename-$pkgver.tar.gz)
md5sums=('03b9c1406c7bfdc204313c2917ce6962')

build() {
  cd "$srcdir/$_pkgbasename-$pkgver"

  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  sed -i "s|NAFLAGS='-felf64 -DELF -D__x86_64__'|NAFLAGS='-felf32 -DELF -D__x86_64__'|" configure
  ./configure --prefix=/usr --with-jpeg8 --mandir=/usr/share/man --libdir=/usr/lib32 --without-simd
  make
}

package() {
  cd "$srcdir/$_pkgbasename-$pkgver"

  make DESTDIR="$pkgdir/" install
  rm -rf "${pkgdir}"/usr/{include,share,bin,sbin}
  mkdir -p "$pkgdir/usr/share/licenses"
  ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
}