summaryrefslogtreecommitdiff
path: root/multilib/libtool-multilib/PKGBUILD
blob: b10e9c3294b666d2abef5bb2988b0a1e349ef1db (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# $Id: PKGBUILD 55394 2011-09-11 20:34:04Z heftig $
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>

# NOTE: requires rebuild with each new gcc version

pkgbase=libtool-multilib
pkgname=(libtool-multilib lib32-libltdl)
pkgver=2.4
pkgrel=5
pkgdesc="A generic library support script for multilib"
arch=('x86_64')
url="http://www.gnu.org/software/libtool"
license=('GPL')
_gccver=4.6.1
makedepends=("gcc-multilib=$_gccver")
options=('!libtool')
source=(ftp://ftp.gnu.org/pub/gnu/libtool/libtool-${pkgver}.tar.xz)
md5sums=('4e6144439d95d7332dc50ace6dd24c55')

build() {
  cd "$srcdir"

  rm -rf libtool-64 libtool-32
  mv libtool-$pkgver libtool-64
  cp -a libtool-64 libtool-32

  msg2 "Building libtool-64..."
  cd "$srcdir/libtool-64"
  ./configure --prefix=/usr
  make

  msg2 "Building libtool-32..."
  export CC="gcc -m32"
  export CXX="g++ -m32"

  cd "$srcdir/libtool-32"
  ./configure --prefix=/usr --libdir=/usr/lib32
  make
}

check() {
  cd "$srcdir/libtool-64"
  make check
  cd "$srcdir/libtool-32"
  make check
}

package_libtool-multilib() {
  depends=('sh' "libltdl=$pkgver" "gcc-multilib=$_gccver" "lib32-libltdl=$pkgver")
  groups=('multilib-devel')
  install=libtool.install
  provides=("libtool=$pkgver-$pkgrel")
  conflicts=(libtool)

  cd "$srcdir/libtool-64"
  make DESTDIR=${pkgdir} install-binSCRIPTS install-man install-info \
                         install-data-local
  rm -rf ${pkgdir}/usr/share/libtool/libltdl/
}

package_lib32-libltdl() {
  pkgdesc="A system independent dlopen wrapper for GNU libtool (32-bit)"
  depends=(lib32-glibc libltdl)
  replaces=(lib32-libtool)
  provides=("lib32-libtool=$pkgver-$pkgrel")
  conflicts=(lib32-libtool)

  cd "$srcdir/libtool-32"
  make DESTDIR="$pkgdir" install-libLTLIBRARIES
}