From owner-svn-ports-all@freebsd.org Mon Feb 15 18:25:26 2021 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0236B53583E; Mon, 15 Feb 2021 18:25:26 +0000 (UTC) (envelope-from arrowd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DfXb96k6Tz4tqk; Mon, 15 Feb 2021 18:25:25 +0000 (UTC) (envelope-from arrowd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D92B622672; Mon, 15 Feb 2021 18:25:25 +0000 (UTC) (envelope-from arrowd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 11FIPPmg031262; Mon, 15 Feb 2021 18:25:25 GMT (envelope-from arrowd@FreeBSD.org) Received: (from arrowd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 11FIPPEI031261; Mon, 15 Feb 2021 18:25:25 GMT (envelope-from arrowd@FreeBSD.org) Message-Id: <202102151825.11FIPPEI031261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arrowd set sender to arrowd@FreeBSD.org using -f From: Gleb Popov Date: Mon, 15 Feb 2021 18:25:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r565321 - in head/x11-wm/hs-xmonad: . files X-SVN-Group: ports-head X-SVN-Commit-Author: arrowd X-SVN-Commit-Paths: in head/x11-wm/hs-xmonad: . files X-SVN-Commit-Revision: 565321 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 18:25:26 -0000 Author: arrowd Date: Mon Feb 15 18:25:25 2021 New Revision: 565321 URL: https://svnweb.freebsd.org/changeset/ports/565321 Log: x11-wm/hs-xmonad: Improve the sample build script. PR: 253167 Modified: head/x11-wm/hs-xmonad/Makefile head/x11-wm/hs-xmonad/files/example_buildscript Modified: head/x11-wm/hs-xmonad/Makefile ============================================================================== --- head/x11-wm/hs-xmonad/Makefile Mon Feb 15 17:23:14 2021 (r565320) +++ head/x11-wm/hs-xmonad/Makefile Mon Feb 15 18:25:25 2021 (r565321) @@ -3,7 +3,7 @@ PORTNAME= xmonad PORTVERSION= 0.15 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= x11-wm haskell MAINTAINER= haskell@FreeBSD.org Modified: head/x11-wm/hs-xmonad/files/example_buildscript ============================================================================== --- head/x11-wm/hs-xmonad/files/example_buildscript Mon Feb 15 17:23:14 2021 (r565320) +++ head/x11-wm/hs-xmonad/files/example_buildscript Mon Feb 15 18:25:25 2021 (r565321) @@ -6,16 +6,24 @@ 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