pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Sort the PLIST.



Module Name:	pkgsrc-wip
Committed By:	Lloyd Parkes <lloyd%must-have-coffee.gen.nz@localhost>
Pushed By:	lloyd
Date:		Tue Nov 1 11:17:19 2022 +1300
Changeset:	4612737712fe7696a7619c13160b27eef9f0820d

Modified Files:
	nextpnr/Makefile
	nextpnr/PLIST
	nextpnr/options.mk

Log Message:
Sort the PLIST.

Clean up the options handling.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4612737712fe7696a7619c13160b27eef9f0820d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 nextpnr/Makefile   | 14 --------------
 nextpnr/PLIST      |  4 ++--
 nextpnr/options.mk | 31 +++++++++++++++++++++----------
 3 files changed, 23 insertions(+), 26 deletions(-)

diffs:
diff --git a/nextpnr/Makefile b/nextpnr/Makefile
index da9d7c8151..bc9891df20 100644
--- a/nextpnr/Makefile
+++ b/nextpnr/Makefile
@@ -21,20 +21,6 @@ PYTHON_VERSIONS_INCOMPATIBLE=	27
 
 .include "options.mk"
 
-PLIST_VARS+=	ice40 generic ecp5
-
-.if !empty(PKG_OPTIONS:Mice40) || !empty(PKG_OPTIONS:Mall)
-PLIST.ice40=	yes
-.endif
-
-.if !empty(PKG_OPTIONS:Mgeneric) || !empty(PKG_OPTIONS:Mall)
-PLIST.generic=	yes
-.endif
-
-.if !empty(PKG_OPTIONS:Mecp5) || !empty(PKG_OPTIONS:Mall)
-PLIST.ecp5=	yes
-.endif
-
 .include "../../lang/python/application.mk"
 
 .include "../../math/eigen3/buildlink3.mk"
diff --git a/nextpnr/PLIST b/nextpnr/PLIST
index 35f76ce02a..af64f623ed 100644
--- a/nextpnr/PLIST
+++ b/nextpnr/PLIST
@@ -1,4 +1,4 @@
 @comment $NetBSD$
-${PLIST.ice40}bin/nextpnr-ice40
-${PLIST.generic}bin/nextpnr-generic
 ${PLIST.ecp5}bin/nextpnr-ecp5
+${PLIST.generic}bin/nextpnr-generic
+${PLIST.ice40}bin/nextpnr-ice40
diff --git a/nextpnr/options.mk b/nextpnr/options.mk
index a578d4ece8..1d5012c2df 100644
--- a/nextpnr/options.mk
+++ b/nextpnr/options.mk
@@ -13,16 +13,27 @@ PKG_SUGGESTED_OPTIONS=		ice40
 
 .include "../../mk/bsd.options.mk"
 
+PLIST_VARS+=			ice40 generic ecp5
+
 .if !empty(PKG_OPTIONS:Mall)
 CMAKE_ARGS+=			-DARCH=all
+PLIST.ice40=			yes
+PLIST.ecp5=			yes
+PLIST.generic=			yes
 # .elif !empty(PKG_OPTIONS:Mall+alpha)
 # CMAKE_ARGS+=			-DARCH=all+alpha
-.elif !empty(PKG_OPTIONS:Mgeneric)
-CMAKE_ARGS+=			-DARCH=generic
+# PLIST.ice40=			yes
+# PLIST.ecp5=			yes
+# PLIST.generic=		yes
 .elif !empty(PKG_OPTIONS:Mice40)
 CMAKE_ARGS+=			-DARCH=ice40
+PLIST.ice40=			yes
 .elif !empty(PKG_OPTIONS:Mecp5)
 CMAKE_ARGS+=			-DARCH=ecp5
+PLIST.ecp5=			yes
+.elif !empty(PKG_OPTIONS:Mgeneric)
+CMAKE_ARGS+=			-DARCH=generic
+PLIST.generic=			yes
 # .elif !empty(PKG_OPTIONS:Mgowin)
 # CMAKE_ARGS+=			-DARCH=gowin
 # .elif !empty(PKG_OPTIONS:Mfpgainterchange)
@@ -34,17 +45,17 @@ CMAKE_ARGS+=			-DARCH=ecp5
 .endif
 
 
-###
-### Build with ice40 support
-###
-.if !empty(PKG_OPTIONS:Mice40) || !empty(PKG_OPTIONS:Mall)
+# Using the PLIST.xyzzy variables below is a slightly hacky way of
+# easily checking if a particular target is being built.
+#
+# This simply avoids duplicating the TOOL_DEPENDS lines in the "all"
+# and "all+alpha" .if sections above.
+
+.if "${PLIST.ice40}" == "yes"
 TOOL_DEPENDS+=			icestorm-[0-9]*:../../wip/icestorm-git
 .endif
 
-###
-### Build with ecp5 support
-###
-.if !empty(PKG_OPTIONS:Mecp5) || !empty(PKG_OPTIONS:Mall)
+.if "${PLIST.ecp5}" == "yes"
 TOOL_DEPENDS+=			${PYPKGPREFIX}-prjtrellis-[0-9]*:../../wip/prjtrellis
 .endif
 


Home | Main Index | Thread Index | Old Index