summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f5d9853b4a44b2b560dd086601fda9d6a0fd7619 (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
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Markus Kitsinger (SwooshyCueb) <root at swooshalicio dot us>

_android_arch=aarch64

pkgname=android-${_android_arch}-libtool
pkgver=2.5.2
pkgrel=1
pkgdesc="A generic library support script (Android ${_android_arch})"
arch=('any')
url="https://www.gnu.org/software/libtool"
license=('GPL')
groups=('android-libtool')
depends=('android-ndk'
         'tar')
makedepends=('android-configure'
             'help2man')
provides=("android-${_android_arch}-libltdl=${pkgver}")
conflicts=("android-${_android_arch}-libltdl")
replaces=("android-${_android_arch}-libltdl")
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/autotools-mirror/libtool/archive/refs/tags/v${pkgver}.tar.gz"
        "gnulib.tar.gz::https://github.com/coreutils/gnulib/archive/refs/heads/master.tar.gz"
        "gnulib-bootstrap.tar.gz::https://github.com/gnulib-modules/bootstrap/archive/refs/heads/master.tar.gz")
md5sums=('9d5c05fce71c72916ca32691ba2cd146'
         'SKIP'
         'SKIP')

prepare() {
    cd "${srcdir}"

    rm -rvf "${srcdir}/libtool-${pkgver}/gnulib"
    ln -sf "${srcdir}/gnulib-master" "${srcdir}/libtool-${pkgver}/gnulib"
    mkdir -p "${srcdir}/libtool-${pkgver}/gl-mod"
    rm -rvf "${srcdir}/libtool-${pkgver}/gl-mod/bootstrap"
    ln -sf "${srcdir}/bootstrap-master" "${srcdir}/libtool-${pkgver}/gl-mod/bootstrap"

    cd "${srcdir}/libtool-${pkgver}"
    source android-env ${_android_arch}

    ./bootstrap --force \
        --gnulib-srcdir "${srcdir}/libtool-${pkgver}/gnulib"
}

build() {
    cd "${srcdir}/libtool-${pkgver}"
    source android-env ${_android_arch}

    android-${_android_arch}-configure \
        --infodir="${ANDROID_PREFIX_SHARE}/info/libtool" \
        lt_cv_sys_lib_dlsearch_path_spec="${ANDROID_PREFIX_LIB}"
    make $MAKEFLAGS
}

package() {
    cd "${srcdir}/libtool-${pkgver}"
    source android-env ${_android_arch}

    make DESTDIR="${pkgdir}" install
    rm -rf "${pkgdir}/${ANDROID_PREFIX_SHARE}/man"
    ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
    ${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a
}