Newer
Older
minerva / Ports / gnupg / package.sh
@minerva minerva on 13 Jul 1 KB Initial commit
#!/usr/bin/env -S bash ../.port_include.sh
port='gnupg'
version='2.4.5'
useconfigure='true'
use_fresh_config_sub='true'
config_sub_paths=(
    'build-aux/config.sub'
)
files=(
    "https://gnupg.org/ftp/gcrypt/gnupg/gnupg-${version}.tar.bz2#f68f7d75d06cb1635c336d34d844af97436c3f64ea14bcb7c869782f96f44277"
)
depends=(
    'libassuan'
    'libgcrypt'
    'libgpg-error'
    'libiconv'
    'libksba'
    'npth'
    'ntbtls'
)

pre_configure() {
    export GPGRT_CONFIG="${MINERVA_INSTALL_ROOT}/usr/local/bin/gpgrt-config"
    export CFLAGS="-L${MINERVA_INSTALL_ROOT}/usr/local/include"
    export LDFLAGS="-L${MINERVA_INSTALL_ROOT}/usr/local/lib -lm -liconv -ldl"
}

configure() {
    run ./configure \
        --host="${MINERVA_ARCH}-pc-minerva" \
        --build="$("${workdir}/build-aux/config.guess")" \
        --with-libgpg-error-prefix="${MINERVA_INSTALL_ROOT}/usr/local" \
        --with-libgcrypt-prefix="${MINERVA_INSTALL_ROOT}/usr/local" \
        --with-ksba-prefix="${MINERVA_INSTALL_ROOT}/usr/local" \
        --with-libassuan-prefix="${MINERVA_INSTALL_ROOT}/usr/local" \
        --with-ntbtls-prefix="${MINERVA_INSTALL_ROOT}/usr/local" \
        --with-npth-prefix="${MINERVA_INSTALL_ROOT}/usr/local" \
        --disable-dirmngr
}