From owner-svn-ports-all@freebsd.org Wed Sep 25 16:57:36 2019 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 8FAB712CD8D; Wed, 25 Sep 2019 16:57:36 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46dkkm3Gnzz493y; Wed, 25 Sep 2019 16:57:36 +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 549D01AB37; Wed, 25 Sep 2019 16:57:36 +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 x8PGva6C040541; Wed, 25 Sep 2019 16:57:36 GMT (envelope-from arrowd@FreeBSD.org) Received: (from arrowd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8PGvaPd040540; Wed, 25 Sep 2019 16:57:36 GMT (envelope-from arrowd@FreeBSD.org) Message-Id: <201909251657.x8PGvaPd040540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arrowd set sender to arrowd@FreeBSD.org using -f From: Gleb Popov Date: Wed, 25 Sep 2019 16:57:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r512795 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: arrowd X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 512795 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.29 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: Wed, 25 Sep 2019 16:57:36 -0000 Author: arrowd Date: Wed Sep 25 16:57:35 2019 New Revision: 512795 URL: https://svnweb.freebsd.org/changeset/ports/512795 Log: cabal.mk: Move hpack invocation to post-patch stage, as sometimes we need to patch package.yaml before feeding it to hpack. Modified: head/Mk/Uses/cabal.mk Modified: head/Mk/Uses/cabal.mk ============================================================================== --- head/Mk/Uses/cabal.mk Wed Sep 25 16:54:48 2019 (r512794) +++ head/Mk/Uses/cabal.mk Wed Sep 25 16:57:35 2019 (r512795) @@ -55,6 +55,7 @@ EXECUTABLES?= ${PORTNAME} CABAL_HOME= ${WRKDIR}/cabal-home CABAL_LIBEXEC= libexec/cabal CABAL_EXTRACT_SUFX= .tar.gz +CABAL_ARCH= ${ARCH:S/amd64/x86_64/:C/armv.*/arm/:S/powerpc64/ppc64/} . if !defined(CABAL_BOOTSTRAP) BUILD_DEPENDS+= cabal:devel/hs-cabal-install \ @@ -79,6 +80,7 @@ DISTFILES?= ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_ EXTRACT_ONLY?= ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_SUFX} _USES_extract= 701:cabal-post-extract +_USES_patch= 701:cabal-post-patch _USES_stage= 751:cabal-post-install-script BUILD_TARGET?= ${EXECUTABLES:S/^/exe:&/} @@ -137,9 +139,6 @@ make-use-cabal-revs: . if !defined(CABAL_BOOTSTRAP) cabal-post-extract: -. if ${cabal_ARGS:Mhpack} - cd ${WRKSRC} && ${SETENV} HOME=${CABAL_HOME} hpack -. endif . for package in ${_use_cabal} . if ${package:C/[^_]*//:S/_//} != "" cp ${DISTDIR}/${DIST_SUBDIR}/${package:C/_[0-9]+//}/revision/${package:C/[^_]*//:S/_//}.cabal `find ${WRKDIR}/${package:C/_[0-9]+//} -name *.cabal -depth 1` @@ -149,6 +148,11 @@ cabal-post-extract: . endfor mkdir -p ${CABAL_HOME}/.cabal touch ${CABAL_HOME}/.cabal/config + +cabal-post-patch: +. if ${cabal_ARGS:Mhpack} + cd ${WRKSRC} && ${SETENV} HOME=${CABAL_HOME} hpack +. endif . if !target(do-build) do-build: