summaryrefslogtreecommitdiff
path: root/multilib/lib32-libjpeg-turbo/PKGBUILD
blob: 7404c4a806bc21a63675f33a88fac3b312f27ca4 (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 64376 2012-02-12 09:31:17Z bluewind $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>

_pkgbasename=libjpeg-turbo
pkgname=lib32-$_pkgbasename
pkgver=1.2.0
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=('5329fa80953938cb4f097afae55059e2')

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"
}