diff options
author | Xiretza | 2021-09-08 17:53:49 +0200 |
---|---|---|
committer | Xiretza | 2021-09-08 17:54:44 +0200 |
commit | edf58e0c78e8ea188004e7d05167194638bc6e56 (patch) | |
tree | 4072e2abe00c6620840b04e4bf97b338bb809f98 | |
parent | dba45b6310ebf8342285110069a6160f9f7dec89 (diff) | |
download | aur-edf58e0c78e8ea188004e7d05167194638bc6e56.tar.gz |
Make enabled architectures easily configurable
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 48 |
2 files changed, 40 insertions, 13 deletions
@@ -1,7 +1,7 @@ pkgbase = nextpnr-git pkgdesc = Portable FPGA place and route tool - pkgver = r3528.179ae683 - pkgrel = 1 + pkgver = r3780.95845b47 + pkgrel = 2 url = https://github.com/YosysHQ/nextpnr arch = i686 arch = x86_64 @@ -24,4 +24,3 @@ pkgbase = nextpnr-git sha256sums = SKIP pkgname = nextpnr-git - @@ -1,19 +1,50 @@ -# Maintainer: Graham Edgecombe <gpe@grahamedgecombe.com> +# Maintainer: xiretza <xiretza+aur@xiretza.xyz> +# Contributor: Richard Petri <git@rpls.de> +# Contributor: Graham Edgecombe <gpe@grahamedgecombe.com> +_ARCHS=('generic' 'ice40' 'ecp5' 'nexus' 'gowin') + pkgname=nextpnr-git -pkgver=r3528.179ae683 -pkgrel=1 +pkgver=r3780.95845b47 +pkgrel=2 pkgdesc='Portable FPGA place and route tool' arch=('i686' 'x86_64') url='https://github.com/YosysHQ/nextpnr' license=('custom:ISC') depends=('boost-libs' 'python' 'qt5-base') -makedepends=('boost' 'cmake' 'eigen' 'git' 'icestorm' 'prjtrellis' - 'prjtrellis-db' 'prjoxide' 'prjapicula') +makedepends=('boost' 'cmake' 'eigen' 'git') provides=('nextpnr') conflicts=('nextpnr') source=('nextpnr::git+https://github.com/YosysHQ/nextpnr.git') sha256sums=('SKIP') +_CONFIG=() +for _arch in ${_ARCHS[@]}; do + case $_arch in + ice40) + makedepends+=('icestorm') + _CONFIG+=('-DICESTORM_INSTALL_PREFIX=/usr') + ;; + ecp5) + makedepends+=('prjtrellis' 'prjtrellis-db') + _CONFIG+=('-DTRELLIS_INSTALL_PREFIX=/usr') + ;; + nexus) + makedepends+=('prjoxide') + _CONFIG+=('-DOXIDE_INSTALL_PREFIX=/usr') + ;; + gowin) + makedepends+=('prjapicula') + _CONFIG+=('-DGOWIN_BBA_EXECUTABLE=/usr/bin/gowin_bba') + ;; + generic) + ;; + *) + echo "Unhandled architecture: $_arch" >&2 + exit 1 + ;; + esac +done + pkgver() { cd "$srcdir/nextpnr" printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" @@ -26,11 +57,8 @@ build() { cd build cmake \ - -DARCH=generic\;ice40\;ecp5\;nexus\;gowin \ - -DICESTORM_INSTALL_PREFIX=/usr \ - -DTRELLIS_INSTALL_PREFIX=/usr \ - -DOXIDE_INSTALL_PREFIX=/usr \ - -DGOWIN_BBA_EXECUTABLE=/usr/bin/gowin_bba \ + -DARCH=$(IFS=\;; echo "${_ARCHS[*]}") \ + "${_CONFIG[@]}" \ -DBUILD_TESTS=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=/usr \ |