Package Details: nextpnr-git 0.7.r29.gf0859503-1

Git Clone URL: https://aur.archlinux.org/nextpnr-git.git (read-only, click to copy)
Package Base: nextpnr-git
Description: Portable FPGA place and route tool
Upstream URL: https://github.com/YosysHQ/nextpnr
Licenses: custom:ISC
Conflicts: nextpnr
Provides: nextpnr
Submitter: grahamedgecombe
Maintainer: None
Last Packager: xiretza
Votes: 25
Popularity: 1.40
First Submitted: 2018-08-02 17:35 (UTC)
Last Updated: 2024-05-01 16:12 (UTC)

Dependencies (12)

Required by (5)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

marzoul commented on 2021-09-08 15:18 (UTC) (edited on 2021-09-08 15:18 (UTC) by marzoul)

Hi, I would suggest to move the supported architecture in optdepends. And generate the cmake options according to the actually installed corresponding packages. This would remove need to edit PKGBUILD for anyone not needing everything.


 # Maintainer: Graham Edgecombe <gpe@grahamedgecombe.com>
 pkgname=nextpnr-git
-pkgver=r3528.179ae683
+pkgver=r3780.95845b47
 pkgrel=1
 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')
-provides=('nextpnr')
+makedepends=('boost' 'cmake' 'eigen' 'git')
+optdepends=(
+       'icestorm:      For Lattice iCE40 support'
+       'prjtrellis:    For Lattice ECP5 support'
+       'prjtrellis-db: For Lattice ECP5 support'
+       'prjoxide:      For Lattice Nexus support'
+       'prjapicula:    For Gowin support'
+)
+provides=('nextpnr=$pkgver')
 conflicts=('nextpnr')
 source=('nextpnr::git+https://github.com/YosysHQ/nextpnr.git')
 sha256sums=('SKIP')
@@ -22,11 +28,26 @@ pkgver() {
 build() {
   cd "$srcdir/nextpnr"

+  local _archlist="generic"
+  if $(pacman -Qi icestorm &> /dev/null) ; then
+    _archlist="$_archlist;ice40"
+  fi
+  if $(pacman -Qi prjtrellis &> /dev/null) && $(pacman -Qi prjtrellis-db &> /dev/null) ; then
+    _archlist="$_archlist;ecp5"
+  fi
+  if $(pacman -Qi prjoxide &> /dev/null) ; then
+    _archlist="$_archlist;nexus"
+  fi
+  if $(pacman -Qi prjapicula &> /dev/null) ; then
+    _archlist="$_archlist;gowin"
+  fi
+  msg "Architectures : $_archlist"
+
   mkdir -p build
   cd build

   cmake \
-    -DARCH=generic\;ice40\;ecp5\;nexus\;gowin \
+    -DARCH="$_archlist" \
     -DICESTORM_INSTALL_PREFIX=/usr \
     -DTRELLIS_INSTALL_PREFIX=/usr \
     -DOXIDE_INSTALL_PREFIX=/usr \

rpls commented on 2021-05-16 21:14 (UTC)

With all the different supported target architectures, the dependencies are getting a bit out of hand. :-) This makes it a bit neater (similar to the emacs-git AUR package) and enables some user customization. But in no way a must-have, just a suggestion.

diff --git a/PKGBUILD b/PKGBUILD
index 572b12c..b52ca84 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,42 @@
 # Maintainer: Graham Edgecombe <gpe@grahamedgecombe.com>
+_ARCHS=('generic' 'ice40' 'ecp5' 'nexus' 'gowin')
+
 pkgname=nextpnr-git
-pkgver=r3528.179ae683
+pkgver=r3529.5a41d207
 pkgrel=1
 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')
+      ;;
+  esac
+done
+
 pkgver() {
   cd "$srcdir/nextpnr"
   printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
@@ -26,11 +49,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 \

xiretza commented on 2021-05-16 07:59 (UTC)

@rpls: thanks, added!

rpls commented on 2021-05-15 23:56 (UTC)

Nextpnr now support GowinSemi FPGAs with "Project Apicula". I added a package for the requirements and validated it on a FPGA with the examples provided by prjapicula.

diff --git a/PKGBUILD b/PKGBUILD
index 15571c6..572b12c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ 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')
+             'prjtrellis-db' 'prjoxide' 'prjapicula')
 provides=('nextpnr')
 conflicts=('nextpnr')
 source=('nextpnr::git+https://github.com/YosysHQ/nextpnr.git')
@@ -26,10 +26,11 @@ build() {
   cd build

   cmake \
-    -DARCH=generic\;ice40\;ecp5\;nexus \
+    -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 \
     -DBUILD_TESTS=ON \
     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
     -DCMAKE_INSTALL_PREFIX=/usr \

xiretza commented on 2021-03-12 21:39 (UTC)

@jamonterrell: see my comment below yours, the VCS package guidelines actually tell you how to add the submodules to source=() properly.

jamonterrell commented on 2021-03-12 21:30 (UTC)

This is currently not working due to git submodules not being updated before build (causes -lpthreads error).

Fix below:

diff --git a/PKGBUILD b/PKGBUILD
index f2d607c..a1fe78c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,6 +22,8 @@ pkgver() {
 build() {
   cd "$srcdir/nextpnr"

+  git submodule init
+  git submodule update
   mkdir -p build
   cd build

xiretza commented on 2021-03-10 22:45 (UTC)

Since https://github.com/YosysHQ/nextpnr/pull/607, nextpnr now has a submodule for abseil-cpp that has to be added to source and initialized accordingly. Also there's a warning about -DICEBOX_ROOT= being deprecated, see @rpls' comment.

rpls commented on 2021-01-18 20:46 (UTC) (edited on 2021-01-18 20:46 (UTC) by rpls)

nextpnr now supports another FPGA architecture with "Project Oxide". I added a package for the requirements and validated it with the examples provided by prjoxide. Also the icestorm requirement is now referenced as ICESTORM_INSTALL_PREFIX in the CMake script.

diff --git a/PKGBUILD b/PKGBUILD
index f2d607c..4c33916 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ url='https://github.com/YosysHQ/nextpnr'
 license=('custom:ISC')
 depends=('boost-libs' 'python' 'qt5-base')
 makedepends=('boost' 'cmake' 'eigen' 'git' 'icestorm' 'prjtrellis'
-             'prjtrellis-db')
+             'prjtrellis-db' 'prjoxide')
 provides=('nextpnr')
 conflicts=('nextpnr')
 source=('nextpnr::git+https://github.com/YosysHQ/nextpnr.git')
@@ -26,9 +26,10 @@ build() {
   cd build

   cmake \
-    -DARCH=generic\;ice40\;ecp5 \
-    -DICEBOX_ROOT=/usr/share/icebox \
+    -DARCH=generic\;ice40\;ecp5\;nexus \
+    -DICESTORM_INSTALL_PREFIX=/usr \
     -DTRELLIS_INSTALL_PREFIX=/usr \
+    -DOXIDE_INSTALL_PREFIX=/usr \
     -DBUILD_TESTS=ON \
     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
     -DCMAKE_INSTALL_PREFIX=/usr \

zoe1337 commented on 2020-12-18 19:30 (UTC)

shouldn't this PKGBUILD depend on prjtrellis instead of trellis?

xiretza commented on 2020-12-08 12:06 (UTC)

nextpnr now no longer builds the GUI by default, could you add a -DBUILD_GUI=ON to the cmake invocation?