Enforce Setup.lhs args and the dependency of xmonad-lib on lang/ghc.

Without this, the build fails when run from /usr/ports with SUBDIRLIST
pointing to x11/xmonad,-main x11/xmonad,-lib.


Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/xmonad/Makefile,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile
--- Makefile    23 Apr 2011 14:32:51 -0000      1.27
+++ Makefile    25 Jun 2011 21:07:47 -0000
@@ -5,9 +5,9 @@ COMMENT-lib =           libraries for runtime con
 
 DISTNAME =             xmonad-0.9.2
 PKGNAME-main =         ${DISTNAME}
-REVISION-main =                1
+REVISION-main =                2
 PKGNAME-lib =          ${DISTNAME:S,-,-lib-,}
-REVISION-lib =         1
+REVISION-lib =         2
 CATEGORIES =           x11
 HOMEPAGE =             http://www.xmonad.org/
 
@@ -25,11 +25,7 @@ WANTLIB-lib =
 MODULES =              lang/ghc converters/libiconv
 # No documentation for now (haddock thinks that module `xmonad-0.9.2:Main'
 # is defined in multiple files).
-MODGHC_BUILD =         cabal hackage register
-
-.if defined (SUBPACKAGE) && ${SUBPACKAGE:M-main}
-MODGHC_BUILD +=                nort
-.endif
+MODGHC_BUILD =         cabal hackage register nort
 
 BUILD_DEPENDS =                ${RUN_DEPENDS-lib}
 RUN_DEPENDS-lib =      devel/hs-mtl \
@@ -37,6 +33,14 @@ RUN_DEPENDS-lib =    devel/hs-mtl \
                        x11/hs-X11>=1.5.0.0
 LIB_DEPENDS-main =     ${LIB_DEPENDS} \
                        devel/gmp
+
+# Instead of adding `nort' to MODGHC_BUILD for -main, explicitely set
+# MODGHC_SETUP_CONF_ARGS and add lang/ghc to RUN_DEPENDS-lib.
+# Otherwise, we may end up in xmonad configured with `nort', which
+# causes xmonad-lib to be installed in the wrong place.
+MODGHC_SETUP_CONF_ARGS +=      --docdir=\$$datadir/doc/hs-\$$pkgid
+MODGHC_SETUP_CONF_ARGS +=      --libsubdir=ghc/\$$pkgid
+RUN_DEPENDS-lib +=             lang/ghc=${MODGHC_VER}
 
 USE_GROFF =            Yes
 

Reply via email to