Date: Wed, 25 Sep 2019 16:57:36 +0000 (UTC) From: Gleb Popov <arrowd@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r512795 - head/Mk/Uses Message-ID: <201909251657.x8PGvaPd040540@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909251657.x8PGvaPd040540>