From nobody Thu Jul 07 10:26:03 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A15433E0B96; Thu, 7 Jul 2022 10:26:06 +0000 (UTC) (envelope-from git@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 4Ldsy44Bj2z3K0W; Thu, 7 Jul 2022 10:26:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657189564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BK8k1F2DpFtmq+SXyRjKGR/Bot9b/qCW5pm9FSWaatM=; b=J7tlaKiS6lIIzljXFefMjSiHlv2JGaAjXzFbmoUth0YFG/8ByaUElcEhcmlFq5S6lf6+7e P1ABxASOoiohPdyhPD3MXpacuRoblZzVUsUexiBWXuJHcGdmZ1Vn6t4jZL891ZYvEeV9oU b+l77kbqW3wp9/lZN1SWj2hE4NLdWs/uBrFlMDcr1D/MLCXFS3sx56dD6PnRIPBVyD2qtd MgACQuLo0RqzpaYtEijMwC97hPLhwBy0DA7UIWw1N8xp9JswhL9VHQ4Ec5vP0zfROKnkQV Xz+B6cyOeTsDPiqmSEaKjBVAbCbhDzpRoszQ/jLaGPuyue4/Yxs/vkfGp/z2Vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ldsy32VdkzfWZ; Thu, 7 Jul 2022 10:26:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 267AQ31o096307; Thu, 7 Jul 2022 10:26:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 267AQ3kU096306; Thu, 7 Jul 2022 10:26:03 GMT (envelope-from git) Date: Thu, 7 Jul 2022 10:26:03 GMT Message-Id: <202207071026.267AQ3kU096306@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 429fe395d1b8 - main - Uses/cabal.mk: Add support for lang/ghcXXX ports: List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 429fe395d1b869f52a3ab7d89ce1a91c624991fa Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657189564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BK8k1F2DpFtmq+SXyRjKGR/Bot9b/qCW5pm9FSWaatM=; b=sZOifjQlLCJAkNM1RVJswPMPPfqxiMz2G3vRyT4AgPX16oPLTpP8VF4pCqQPBzM2Zv882r OIkBuQryFarpLJWeu1pvbhXal9MAyuEXiwO0daz2yeXDmo+IRYZvlw21lPGWRZ/dLvFT6m AtCWq/VbTEAzZ15S9hxyjiyLqlgeYAQk5gPEc7bywzp4de8clJzHR5F0q6l+JNOcMN+m20 J6P6lYFOEJQPSRuxfvNXqlx/FNysB3NwxnC+0UcS8ydDle1qVAJ+A9+FibpPvv4hGx8Oey Y5buE0BZcn+Sg6CLF0OBgU6ZfxolRb5tOuy9kDc2rEe5n2C8kDGYHvyVyv/b1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657189564; a=rsa-sha256; cv=none; b=hWh4ADSwr3wkm5mzx+g1sxNXY6W/hz/Om/s7Mn7gxrXAMeeIZ0nMdA3rvDhEuYS6VQ4hOS iVcb4ltE8/SM29lCQqvcPGmedzt8xll9y3jSzIkqw56wccv8ddnsi4KE9MFay1egJfqtQX nCqYrvG7PAuwNO+ffiygvN6iUBaT6lNJuGVwZidjH0UgLgbzE94Zq/0XN1KZMy50JgZWwI bO5V6x07ZLl7v6LZfiUDcAI2NxqPTZ2I2mmoq6JLIKBRR0jRhUX5F7Sikp3NMacoPgxpKh 4aVkknHSrFWhBCy48+aEibV371AxkV/QREMtqNtBFD8TetBZHeTrxp5fqUq+ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=429fe395d1b869f52a3ab7d89ce1a91c624991fa commit 429fe395d1b869f52a3ab7d89ce1a91c624991fa Author: Gleb Popov AuthorDate: 2022-07-04 09:37:19 +0000 Commit: Gleb Popov CommitDate: 2022-07-07 10:24:41 +0000 Uses/cabal.mk: Add support for lang/ghcXXX ports: - Do not add lang/ghc to BUILD_DEPENDS if another GHC is already there. - Pass --with-compiler flag to cabal if we're using lang/ghcXXX port to build. --- Mk/Uses/cabal.mk | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Mk/Uses/cabal.mk b/Mk/Uses/cabal.mk index b01e53d309ef..dc57732e8d30 100644 --- a/Mk/Uses/cabal.mk +++ b/Mk/Uses/cabal.mk @@ -68,9 +68,15 @@ CABAL_ARCH= ${ARCH:S/amd64/x86_64/:C/armv.*/arm/:S/powerpc64/ppc64/} CABAL_DEPSDIR= ${WRKSRC}/${CABAL_DEPS_SUBDIR} CABAL_DEPS_SUBDIR= _cabal_deps +. if defined(BUILD_DEPENDS) && ${BUILD_DEPENDS:Mghc?*\:lang/ghc?*} +CABAL_WITH_ARGS= --with-compiler=${BUILD_DEPENDS:Mghc?*\:lang/ghc?*:C/\:.*//} \ + --with-hsc2hs=${LOCALBASE}/bin/hsc2hs-${BUILD_DEPENDS:Mghc?*\:lang/ghc?*:C/\:.*//} +. else +BUILD_DEPENDS+= ghc:lang/ghc +. endif + . if !defined(CABAL_BOOTSTRAP) -BUILD_DEPENDS+= cabal:devel/hs-cabal-install \ - ghc:lang/ghc +BUILD_DEPENDS+= cabal:devel/hs-cabal-install . endif . if ${cabal_ARGS:Mhpack} @@ -162,9 +168,9 @@ cabal-extract-deps: cd ${WRKSRC} && ${SETENV} HOME=${CABAL_HOME} hpack . endif cd ${WRKSRC} && \ - ${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal new-configure --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CONFIGURE_ARGS} + ${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal new-configure --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CABAL_WITH_ARGS} ${CONFIGURE_ARGS} cd ${WRKSRC} && \ - ${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal new-build --disable-benchmarks --disable-tests --dependencies-only ${BUILD_ARGS} ${BUILD_TARGET} + ${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal new-build --disable-benchmarks --disable-tests --dependencies-only ${CABAL_WITH_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} . endif # Generates USE_CABAL= ... line ready to be pasted into the port based on artifacts of cabal-extract-deps. @@ -234,7 +240,7 @@ cabal-pre-configure: . if !target(do-build) do-build: cd ${WRKSRC} && \ - ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} cabal new-build --offline --disable-benchmarks --disable-tests --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} + ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} cabal new-build --offline --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} . endif . if !target(do-install)