From nobody Sun Mar 12 07:16:31 2023 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 4PZB0w1jQRz3xW31; Sun, 12 Mar 2023 07:16:32 +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 4PZB0w0pSkz430r; Sun, 12 Mar 2023 07:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678605392; 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=mv0k9saaDG8r6CxiekHXujplaQqeeojNm2H42OW8qkI=; b=P9b14tAGUThVzz5DbmgysMFep++ER+XMZ5iiZC1e8/B6rcrXSiPwDMkStQ124RwDH3Zc2t wK4YTfheXSxRBY5kuXWp7PcTtwRNg+Kopl8HwSFevqfdyFoMFbQB0RumpA++EmnmNoQwTw +oeHx1qfrbHWtQone5PILBorQJlbFzLm98wcuCD4RtbmHgyQBvHiEHwJbQO/bEany04VRd br/EqXuXWMh+D1QQOctOFyWpOSVwZZHXaQUEGecOAxcqe1Cy8EUrltOhiodkTbByTnxhqO yz8DVLm+DGIMXA+7BlWWY9hsRFRp+j2dFl+hMkQeBFUbY9bKzl4r9FyU0KBcQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678605392; 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=mv0k9saaDG8r6CxiekHXujplaQqeeojNm2H42OW8qkI=; b=LiXCYR5q/QCWJWMLculceJ+IvpVWjdXotrB4oCycCxecaH54mz99RI+v85r0JpPuNqE7GV TaF01+M2NykMNKq4/kaAZ16wQTvmfK47/pqRNWuNZ7xlo80Y521wHkZG7yMBW+omiEzuqV 4RUNhf3cPYA0WNotnLs8mAr7rxS7GmyfzuHQDQ/9mTTfGMsqtyKU+Hbu9fISljgDil9SGu QFzD8wDbzzvuiJDxoledgrxyUj2HII+ev7TNJM6GU7qxIXku3dow88StYSeElrxzSR0CLA wqFHCnbuFvMK04z0WFYEycsB1vPcp7KWIlS7QamUkUM+iCYYkYKGuCBlwnDvuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678605392; a=rsa-sha256; cv=none; b=h6jhkoXN+FMVRUsnPhtiX3VBcMfSJfER1PGoAnmEy9nNFMNYOy7hl7DmQTWETjZ7wxLa4D 5byoFWIKyTSGP731iL8PsQFfh6XC+Nth6RvXGIh7Uw6dgugPv0yDD1IZxNz4XsWYVdx/cp kNZqM5TavLCHahJ6yqHitT5B2Ed4lyPPJDNK4z1PGKH7y2VXmI0A9osWs67mUQyrdPjUfH jb2RhGM+0OlqKwGetbGVdxld+X7gfJVm4sSKzEHHp13DeYt6roFPoIi0xUlUK8T7yJL/zX KrwZheG5qTgQyr1hZSfwZvka4P7jkQgf/1/e6oJu7JslsRFnevbLWkRqCPB8hQ== 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 4PZB0v6skKz129C; Sun, 12 Mar 2023 07:16:31 +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 32C7GVOO018277; Sun, 12 Mar 2023 07:16:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32C7GVaZ018276; Sun, 12 Mar 2023 07:16:31 GMT (envelope-from git) Date: Sun, 12 Mar 2023 07:16:31 GMT Message-Id: <202303120716.32C7GVaZ018276@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: 3eb1fbc04130 - main - Uses/cabal.mk: Pass correct XDG_* environment in cabal invocations. 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: 3eb1fbc04130a5de07a27a7fe63faa1af5bdad00 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=3eb1fbc04130a5de07a27a7fe63faa1af5bdad00 commit 3eb1fbc04130a5de07a27a7fe63faa1af5bdad00 Author: Gleb Popov AuthorDate: 2023-03-11 19:38:40 +0000 Commit: Gleb Popov CommitDate: 2023-03-12 07:15:53 +0000 Uses/cabal.mk: Pass correct XDG_* environment in cabal invocations. --- Mk/Uses/cabal.mk | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Mk/Uses/cabal.mk b/Mk/Uses/cabal.mk index a788a66c2b9b..0221eb36a78a 100644 --- a/Mk/Uses/cabal.mk +++ b/Mk/Uses/cabal.mk @@ -84,6 +84,7 @@ CABAL_EXECUTABLES?= ${PORTNAME} CABAL_CMD?= cabal CABAL_PORT= devel/hs-cabal-install CABAL_HOME= ${WRKDIR}/cabal-home +CABAL_HOME_ENV=XDG_DATA_HOME=${CABAL_HOME} XDG_CONFIG_HOME=${CABAL_HOME} XDG_CACHE_HOME=${CABAL_HOME} HOME=${CABAL_HOME} CABAL_LIBEXEC= libexec/cabal CABAL_EXTRACT_SUFX= .tar.gz CABAL_ARCH= ${ARCH:S/amd64/x86_64/:C/armv.*/arm/:S/powerpc64/ppc64/} @@ -190,14 +191,14 @@ cabal-extract: check-cabal ${RM} -r ${CABAL_HOME} . endif @${ECHO_MSG} "===> Fetching Hackage index into ${CABAL_HOME}/.cabal" - ${SETENV} HOME=${CABAL_HOME} ${CABAL_CMD} update + ${SETENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update . if ${_hackage_is_default} == yes cd ${WRKDIR} && \ - ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} ${CABAL_CMD} get ${PORTNAME}-${PORTVERSION} + ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} get ${PORTNAME}-${PORTVERSION} . else . if ${cabal_ARGS:Mhpack} @${ECHO_MSG} "===> Running ${HPACK_CMD} to generate .cabal file" - cd ${WRKSRC} && ${SETENV} HOME=${CABAL_HOME} ${HPACK_CMD} + cd ${WRKSRC} && ${SETENV} ${CABAL_HOME_ENV} ${HPACK_CMD} . endif . endif # Remove Haskell dependencies that come from GH_TUPLE @@ -205,7 +206,7 @@ cabal-extract: check-cabal . ifdef CABAL_REPOSITORIES @${ECHO_MSG} "===> Fetching additional Cabal repositories index into ${CABAL_HOME}/.cabal" @cd ${WRKSRC} && \ - ${SETENV} HOME=${CABAL_HOME} ${CABAL_CMD} update + ${SETENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update . endif # Create a cookie for cabal-post-patch @${TOUCH} ${EXTRACT_COOKIE} ${CABAL_COOKIE} @@ -215,12 +216,12 @@ cabal-extract: check-cabal # This pulls in all source dependencies, resolves them and generates build plan cabal-configure: check-cabal cd ${WRKSRC} && \ - ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} ${CABAL_CMD} build --dry-run --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} + ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --dry-run --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} # Calls cabal build on the Haskell package located in ${WRKSRC} cabal-build: check-cabal cd ${WRKSRC} && \ - ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} ${CABAL_CMD} build --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} + ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} # Generates USE_CABAL= ... line ready to be pasted into the port based on the plan.json file generated by cabal configure. make-use-cabal: check-cabal2tuple @@ -300,13 +301,13 @@ cabal-post-patch: cabal-pre-configure: # Generate .cabal file with hpack if requested . if ${cabal_ARGS:Mhpack} - cd ${WRKSRC} && ${SETENV} HOME=${CABAL_HOME} hpack + cd ${WRKSRC} && ${SETENV} ${CABAL_HOME_ENV} hpack . endif . if !target(do-build) do-build: cd ${WRKSRC} && \ - ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} ${CABAL_CMD} build --offline --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} + ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --offline --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} . endif . if !target(do-install)