Index: head/x11-wm/hs-xmonad/Makefile =================================================================== --- head/x11-wm/hs-xmonad/Makefile (revision 565320) +++ head/x11-wm/hs-xmonad/Makefile (revision 565321) @@ -1,45 +1,45 @@ # Created by: Matthieu Guegan # $FreeBSD$ PORTNAME= xmonad PORTVERSION= 0.15 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= x11-wm haskell MAINTAINER= haskell@FreeBSD.org COMMENT= Tiling window manager LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ghc:lang/ghc USES= cabal xorg USE_XORG= x11 xext xinerama xrandr xscrnsaver USE_CABAL= X11-1.9.1 \ data-default-0.7.1.1 \ data-default-class-0.1.2.0 \ data-default-instances-containers-0.0.1 \ data-default-instances-dlist-0.0.1 \ data-default-instances-old-locale-0.0.1 \ dlist-0.8.0.8 \ extensible-exceptions-0.1.1.4 \ hsc2hs-0.68.7 \ old-locale-1.0.0.7_2 \ setlocale-1.0.0.9_2 \ utf8-string-1.0.1.1_3 OPTIONS_DEFINE= EXAMPLES post-install: ${INSTALL_MAN} ${WRKSRC}/man/xmonad.1 ${STAGEDIR}${MANPREFIX}/man/man1/ post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_SCRIPT} ${PATCHDIR}/example_buildscript ${STAGEDIR}${EXAMPLESDIR}/build ${INSTALL_DATA} ${PATCHDIR}/example_config.cabal ${STAGEDIR}${EXAMPLESDIR}/xmonad-config.cabal ${INSTALL_DATA} ${WRKSRC}/man/xmonad.hs ${STAGEDIR}${EXAMPLESDIR} .include Index: head/x11-wm/hs-xmonad/files/example_buildscript =================================================================== --- head/x11-wm/hs-xmonad/files/example_buildscript (revision 565320) +++ head/x11-wm/hs-xmonad/files/example_buildscript (revision 565321) @@ -1,21 +1,29 @@ #!/bin/sh # must match "executable" line from xmonad-config.cabal EXE_NAME=xmonad-config # xmonad tells us how it want resulting executable to be named output_file=$1; shift -CFG_DIR=$HOME/.xmonad +CFG_DIR="$HOME/.xmonad" +if [ ! -f "$HOME/.cabal/config" ]; then +cabal new-update +fi + # build the config cd $CFG_DIR -cabal new-clean || true cabal new-configure --enable-optimization --enable-executable-stripping cabal new-build if [ "$output_file" != "" ]; then # move resulting binary where it was requested to reside -find $CFG_DIR/dist-newstyle -type f -perm +111 -name $EXE_NAME \ - -exec mv '{}' $output_file ';' +res=`find $CFG_DIR/dist-newstyle -type f -perm +111 -name $EXE_NAME` +if [ "$res" == "" ]; then + return 1 +fi +# use "mv" to be able to replace a running executable +mv -f "$res" "$output_file" +cp "$output_file" "$res" fi