summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5b2ed8a316ab6ba3f90d79959980aa19e1e3b0cd (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
# Generated by scripts/release/generate-pkgbuild-source.sh. Do not edit.
# Maintainer: metaneutrons <https://github.com/metaneutrons>
pkgname=freebasic-ng
pkgver=1.25.2
pkgrel=1
pkgdesc="FreeBASIC-NG compiler"
arch=('x86_64' 'aarch64')
url="https://github.com/metaneutrons/freebasic-ng"
license=('GPL-2.0-or-later' 'LGPL-2.1-or-later')
depends=('gcc' 'binutils' 'ncurses' 'libx11' 'libxext' 'libxpm' 'libxrandr' 'libxrender' 'gpm' 'libffi' 'libglvnd')
makedepends=('ca-certificates' 'cmake' 'ninja' 'python')
# fbc invokes ld directly, so its runtime archives must not contain LTO IR.
options=('!lto' 'staticlibs')
conflicts=('freebasic' 'freebasic-ng-bin')
source=("$pkgname-$pkgver.tar.gz::https://github.com/metaneutrons/freebasic-ng/releases/download/v1.25.2/freebasic-ng-1.25.2-source.tar.gz")
sha256sums=('f598a3bb2f08fea46dca2d2cdd453904ebe19b123961c43ccdb603563315ea45')

build() {
    cmake -S "freebasic-ng-1.25.2" -B build -G Ninja \
        -DCMAKE_BUILD_TYPE=Release -DFB_BUILD_GFXLIB=ON
    cmake --build build
}

check() {
    ./build/src/compiler/fbc --version | grep -F "Version $pkgver"
    cmake --install build --prefix "$srcdir/check-stage"
    python "freebasic-ng-1.25.2/scripts/verify-installed-fbc.py" \
        --prefix "$srcdir/check-stage" --expected-host "linux-$CARCH" --require-gfxlib
}

package() {
    DESTDIR="$pkgdir" cmake --install build --prefix /usr
    install -Dm644 "freebasic-ng-1.25.2/LICENSE.md" \
        "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
}