summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cb1c58024f9102e56371b9129fb98ef1be4e8491 (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
# Maintainer: Aki-nyan <aur@catgirl.link>

pkgname=nextpnr-machxo2-nightly
pkgver=20241223_nextpnr_0.7_138_gf01465f6
pkgrel=1
epoch=1
pkgdesc="nextpnr portable FPGA place and route tool - for machxo2"
arch=("x86_64")
url="https://github.com/YosysHQ/nextpnr"
license=("custom:ISC")
groups=()
options=("!strip")
depends=(
	"yosys-nightly"
	"prjtrellis-nightly"
	"python"
	"boost-libs"
	"qt5-base"
)
optdepends=()
makedepends=("git" "gcc" "cmake" "ninja" "pkgconf" "gawk" "eigen" "boost")
conflicts=(
	"nextpnr-git"
	"nextpnr-all-nightly"
)
replaces=()
provides=("nextpnr-machxo2=$(cut -d _ -f 3 <<< "${pkgver}")")
source=(
	"nextpnr::git+https://github.com/YosysHQ/nextpnr.git#commit=f01465f6"
)
sha256sums=(
	"SKIP"
)

_PREFIX="/usr"
prepare() {
	cd "${srcdir}/nextpnr"
	[ ! -d "${srcdir}/nextpnr/build-machxo2" ] && mkdir build-machxo2
}

build() {
	cd "${srcdir}/nextpnr"
	cd build-machxo2
		cmake -G Ninja        \
			-DARCH=machxo2    \
			-DBUILD_PYTHON=ON \
			-DBUILD_GUI=ON    \
			-DCMAKE_BUILD_TYPE=RelWithDebInfo \
			-DCMAKE_INSTALL_PREFIX=${_PREFIX} \
			-DUSE_OPENMP=ON	\
			..
	ninja
}

package() {
	cd "${srcdir}/nextpnr"
	DESTDIR="${pkgdir}" PREFIX="${_PREFIX}" ninja -C build-machxo2 install
	install -Dm644 "${srcdir}/nextpnr/COPYING" "${pkgdir}${_PREFIX}/share/licenses/nextpnr-machxo2/COPYING"
}