pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc
Module Name: pkgsrc
Committed By: pho
Date: Sat May 1 16:14:19 UTC 2021
Modified Files:
pkgsrc/devel/hs-haskell-src-exts: Makefile
pkgsrc/devel/hs-pretty-show: Makefile
pkgsrc/mk: haskell.mk
Added Files:
pkgsrc/mk/haskell/tools: alex.mk cpphs.mk happy.mk
Log Message:
Use tools framework for Haskell source preprocessors
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/devel/hs-haskell-src-exts/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/hs-pretty-show/Makefile
cvs rdiff -u -r1.32 -r1.33 pkgsrc/mk/haskell.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/mk/haskell/tools/alex.mk \
pkgsrc/mk/haskell/tools/cpphs.mk pkgsrc/mk/haskell/tools/happy.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/hs-haskell-src-exts/Makefile
diff -u pkgsrc/devel/hs-haskell-src-exts/Makefile:1.8 pkgsrc/devel/hs-haskell-src-exts/Makefile:1.9
--- pkgsrc/devel/hs-haskell-src-exts/Makefile:1.8 Fri Apr 23 12:16:15 2021
+++ pkgsrc/devel/hs-haskell-src-exts/Makefile Sat May 1 16:14:19 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2021/04/23 12:16:15 pho Exp $
+# $NetBSD: Makefile,v 1.9 2021/05/01 16:14:19 pho Exp $
DISTNAME= haskell-src-exts-1.23.1
CATEGORIES= devel
@@ -7,7 +7,8 @@ MAINTAINER= pho%cielonegro.org@localhost
COMMENT= Manipulating Haskell source
LICENSE= modified-bsd
-BUILD_DEPENDS+= happy>=1.19:../../devel/happy
+USE_TOOLS+= happy
+HAPPY_REQD= 1.19
.include "../../mk/haskell.mk"
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/hs-pretty-show/Makefile
diff -u pkgsrc/devel/hs-pretty-show/Makefile:1.3 pkgsrc/devel/hs-pretty-show/Makefile:1.4
--- pkgsrc/devel/hs-pretty-show/Makefile:1.3 Fri Apr 23 10:31:55 2021
+++ pkgsrc/devel/hs-pretty-show/Makefile Sat May 1 16:14:19 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2021/04/23 10:31:55 pho Exp $
+# $NetBSD: Makefile,v 1.4 2021/05/01 16:14:19 pho Exp $
DISTNAME= pretty-show-1.10
CATEGORIES= devel
@@ -7,7 +7,7 @@ MAINTAINER= pho%cielonegro.org@localhost
COMMENT= Tools for working with derived Show instances
LICENSE= mit
-BUILD_DEPENDS+= happy-[0-9]*:../../devel/happy
+USE_TOOLS+= happy
.include "../../devel/hs-haskell-lexer/buildlink3.mk"
.include "../../mk/haskell.mk"
Index: pkgsrc/mk/haskell.mk
diff -u pkgsrc/mk/haskell.mk:1.32 pkgsrc/mk/haskell.mk:1.33
--- pkgsrc/mk/haskell.mk:1.32 Sat May 1 15:06:26 2021
+++ pkgsrc/mk/haskell.mk Sat May 1 16:14:19 2021
@@ -1,4 +1,4 @@
-# $NetBSD: haskell.mk,v 1.32 2021/05/01 15:06:26 pho Exp $
+# $NetBSD: haskell.mk,v 1.33 2021/05/01 16:14:19 pho Exp $
#
# This Makefile fragment handles Haskell Cabal packages.
# Package configuration, building, installation, registration and
@@ -111,6 +111,13 @@ HASKELL_ENABLE_HADDOCK_DOCUMENTATION?= y
.include "../../lang/ghc88/buildlink3.mk"
+# Some Cabal packages requires preprocessors to build, and we don't
+# want them to implicitly depend on such tools. Place dummy scripts by
+# default.
+.include "../../mk/haskell/tools/alex.mk"
+.include "../../mk/haskell/tools/cpphs.mk"
+.include "../../mk/haskell/tools/happy.mk"
+
# Tools
_HASKELL_BIN= ${BUILDLINK_PREFIX.ghc:U${PREFIX}}/bin/ghc
_HASKELL_PKG_BIN= ${BUILDLINK_PREFIX.ghc:U${PREFIX}}/bin/ghc-pkg
Added files:
Index: pkgsrc/mk/haskell/tools/alex.mk
diff -u /dev/null pkgsrc/mk/haskell/tools/alex.mk:1.1
--- /dev/null Sat May 1 16:14:19 2021
+++ pkgsrc/mk/haskell/tools/alex.mk Sat May 1 16:14:19 2021
@@ -0,0 +1,17 @@
+# $NetBSD: alex.mk,v 1.1 2021/05/01 16:14:19 pho Exp $
+#
+# Usage: USE_TOOLS+= alex
+#
+
+ALEX_REQD?= 0
+TOOLS_CREATE+= alex
+
+.if !empty(USE_TOOLS:Malex)
+TOOLS_DEPENDS.alex?= alex>=${ALEX_REQD}:../../devel/alex
+TOOLS_PATH.alex= ${PREFIX}/bin/alex
+.else
+# We can't use TOOLS_FAIL because Cabal tries to invoke all of
+# relevant tools regardless of whether they are actually required.
+TOOLS_SCRIPT.alex= \
+ ${FAIL_MSG} "To use this tool, add USE_TOOLS+=alex to the package Makefile."
+.endif
Index: pkgsrc/mk/haskell/tools/cpphs.mk
diff -u /dev/null pkgsrc/mk/haskell/tools/cpphs.mk:1.1
--- /dev/null Sat May 1 16:14:19 2021
+++ pkgsrc/mk/haskell/tools/cpphs.mk Sat May 1 16:14:19 2021
@@ -0,0 +1,17 @@
+# $NetBSD: cpphs.mk,v 1.1 2021/05/01 16:14:19 pho Exp $
+#
+# Usage: USE_TOOLS+= cpphs
+#
+
+CPPHS_REQD?= 0
+TOOLS_CREATE+= cpphs
+
+.if !empty(USE_TOOLS:Mcpphs)
+TOOLS_DEPENDS.cpphs?= hs-cpphs>=${CPPHS_REQD}:../../devel/hs-cpphs
+TOOLS_PATH.cpphs= ${PREFIX}/bin/cpphs
+.else
+# We can't use TOOLS_FAIL because Cabal tries to invoke all of
+# relevant tools regardless of whether they are actually required.
+TOOLS_SCRIPT.cpphs= \
+ ${FAIL_MSG} "To use this tool, add USE_TOOLS+=cpphs to the package Makefile."
+.endif
Index: pkgsrc/mk/haskell/tools/happy.mk
diff -u /dev/null pkgsrc/mk/haskell/tools/happy.mk:1.1
--- /dev/null Sat May 1 16:14:19 2021
+++ pkgsrc/mk/haskell/tools/happy.mk Sat May 1 16:14:19 2021
@@ -0,0 +1,17 @@
+# $NetBSD: happy.mk,v 1.1 2021/05/01 16:14:19 pho Exp $
+#
+# Usage: USE_TOOLS+= happy
+#
+
+HAPPY_REQD?= 0
+TOOLS_CREATE+= happy
+
+.if !empty(USE_TOOLS:Mhappy)
+TOOLS_DEPENDS.happy?= happy>=${HAPPY_REQD}:../../devel/happy
+TOOLS_PATH.happy= ${PREFIX}/bin/happy
+.else
+# We can't use TOOLS_FAIL because Cabal tries to invoke all of
+# relevant tools regardless of whether they are actually required.
+TOOLS_SCRIPT.happy= \
+ ${FAIL_MSG} "To use this tool, add USE_TOOLS+=happy to the package Makefile."
+.endif
Home |
Main Index |
Thread Index |
Old Index