pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   pho
Date:           Sun Mar 14 08:19:24 UTC 2021

Modified Files:
        pkgsrc/mk: haskell.mk

Log Message:
mk/haskell.mk: Ignore per-user package environment file while building 'Setup'

Turned out this was necessary when using `cabal-install v2-install` outside of pkgsrc, because the command creates a per-user package environment and in turn makes Cabal hidden.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 pkgsrc/mk/haskell.mk

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

Modified files:

Index: pkgsrc/mk/haskell.mk
diff -u pkgsrc/mk/haskell.mk:1.27 pkgsrc/mk/haskell.mk:1.28
--- pkgsrc/mk/haskell.mk:1.27   Wed Jul  1 15:07:25 2020
+++ pkgsrc/mk/haskell.mk        Sun Mar 14 08:19:24 2021
@@ -1,4 +1,4 @@
-# $NetBSD: haskell.mk,v 1.27 2020/07/01 15:07:25 rillig Exp $
+# $NetBSD: haskell.mk,v 1.28 2021/03/14 08:19:24 pho Exp $
 #
 # This Makefile fragment handles Haskell Cabal packages.
 # Package configuration, building, installation, registration and
@@ -113,6 +113,12 @@ _HASKELL_PKG_BIN=  ${BUILDLINK_PREFIX.ghc
 _HASKELL_VERSION_CMD=  ${_HASKELL_BIN} -V 2>/dev/null | ${CUT} -d ' ' -f 8
 _HASKELL_VERSION=      ghc-${_HASKELL_VERSION_CMD:sh}
 
+# By default GHC uses a per-user default environment file if one is
+# available. Cabal has to be visible in order to compile Setup.?hs,
+# but per-user default environment files usually don't mark it as
+# visible. Tell GHC not to read any environment files.
+_HASKELL_BUILD_SETUP_OPTS=     -package-env -
+
 # GHC requires C compiler.
 USE_LANGUAGES+=        c
 
@@ -207,8 +213,8 @@ WARNINGS+=  "[haskell.mk] Set HS_UPDATE_P
 # that didn't work.
 do-configure:
        ${RUN} ${_ULIMIT_CMD} cd ${WRKSRC} && \
-               ( ${_HASKELL_BIN:Q} --make Setup -dynamic || \
-                       ${_HASKELL_BIN:Q} --make Setup -static )
+               ( ${_HASKELL_BIN:Q} ${_HASKELL_BUILD_SETUP_OPTS} --make Setup -dynamic || \
+                       ${_HASKELL_BIN:Q} ${_HASKELL_BUILD_SETUP_OPTS} --make Setup -static )
        ${RUN} ${_ULIMIT_CMD} cd ${WRKSRC:Q} && \
                ${SETENV} ${CONFIGURE_ENV} \
                        ./Setup configure ${PKG_VERBOSE:D-v} ${CONFIGURE_ARGS}



Home | Main Index | Thread Index | Old Index