From nobody Mon Jan 15 12:09:15 2024 X-Original-To: dev-commits-ports-branches@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 4TD9t33R4Dz56n6L; Mon, 15 Jan 2024 12:09:15 +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 4TD9t32pM5z4N4W; Mon, 15 Jan 2024 12:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705320555; 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=LXn2wLTXrvZBXIP4Bmf6LP22vp3gCSFQHxmdmhY3UOs=; b=AoQxXfaxRKUTWVylPV+E9pb6yHut/xD9CymBYhq3S5lObyp57v64vijUCXwONrlunlhNXu YPPhomrKcZkiwZaFQM93DDH0XKS3DfwQ1+UleCW1CzfnoKlxnBOsVKCM+TM+lqZzstyPIU N8c/GlN1j1Mew53dsjGDTJw/lcWQKzeSwCxVVzvjPS1G0xcjK/jRzrPGGd2s3m0xJyhzfw RnWiWmlOWL68Sh0wZvo7ygkAKiujsdqAaAwgpjMRDQnPd1KI+rygyDadudJGExClQ4HK2j lQ7NhGTiQFGD/eIDNvEk2ahM8/mdxrJzuZSjo2h3E5iHL61nD5BC7tU+P7cuAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705320555; 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=LXn2wLTXrvZBXIP4Bmf6LP22vp3gCSFQHxmdmhY3UOs=; b=MMHMvFLXTOzVmPboZGvKY9aYNl9i28CtmQ8QiaUr1Lt3gza2IIeKeBYGnBv7QowhMLeMzn 3tCESETlVzO8NVIAeW3HaU/1A1KmIpW8qJdz+9aifr0QW6sOfjPSJ5JBemxpHtWoNVB8nk XLJ7kZH7W89OHfe8VD6B4vcpAEhHB+cqWjhI3pVk0SoImvA9fadP6dkEY0bP60Hf4nTlxI RSpCoHW3lJf4oT0Q8tbdQKEVjLuAER4fEBUM31Wu1UPehHTUYnpSW97pZR0oKcqMdmhft2 ugf/UXhAPgbrLgcIn5Rg70PA+CcUvkf9X3iQyqkqUenytoB5eUjeQPt47BoN/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705320555; a=rsa-sha256; cv=none; b=sHbclLotDtzJ7gh9WnW+qV4qMbR2OQ4qkPDSXuFhiIvxp1U9MkGBEpbndJetRspZsRPFCR kAdLrnemB/hMvsxfbDHutcPsY7oPE0t6XYo9cUD+E64NUd0TKvHbG+ypsvGh6UNGCKwLQ3 pZJwVNBbhACnob2f4FVQgN8B5HoD1e2Rs47Uu6s9kZRLCsocEkOBE1wvDiEHHsRegJ8x2g 1S4OqteiR2E6pPd9zxh7fhulj7k7FDwd7ERKPmC/QB4Zd03yVBaodlDCCqtZGHoK0Q3C9k BoRkCWvgIq11tiWZ9lGM8VNFSK1vMjw+jgS4KvJ+rhcocLDhHL0/eULNkTi8rg== 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 4TD9t31nSgzwS7; Mon, 15 Jan 2024 12:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40FC9Fmh073569; Mon, 15 Jan 2024 12:09:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40FC9Fmu073566; Mon, 15 Jan 2024 12:09:15 GMT (envelope-from git) Date: Mon, 15 Jan 2024 12:09:15 GMT Message-Id: <202401151209.40FC9Fmu073566@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Matthias Fechner Subject: git: d4326d554ac1 - 2024Q1 - gem: make it possible to generate gems that require rust/cargo List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mfechner X-Git-Repository: ports X-Git-Refname: refs/heads/2024Q1 X-Git-Reftype: branch X-Git-Commit: d4326d554ac1da8b1847251800cebd4a0bfeb49b Auto-Submitted: auto-generated The branch 2024Q1 has been updated by mfechner: URL: https://cgit.FreeBSD.org/ports/commit/?id=d4326d554ac1da8b1847251800cebd4a0bfeb49b commit d4326d554ac1da8b1847251800cebd4a0bfeb49b Author: Matthias Fechner AuthorDate: 2024-01-03 09:32:55 +0000 Commit: Matthias Fechner CommitDate: 2024-01-15 12:06:59 +0000 gem: make it possible to generate gems that require rust/cargo Make sure cargo.mk and gem.mk can work together. If you want to use rust for your gem, have a look on devel/rubygem-prometheus-client-mmap as an example. Differential Revision: https://reviews.freebsd.org/D43292 (cherry picked from commit 87916ecbfac7532b4d3de63efa36ed8f8e637e36) --- Mk/Uses/gem.mk | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Mk/Uses/gem.mk b/Mk/Uses/gem.mk index a1e77273932a..69924ae3d172 100644 --- a/Mk/Uses/gem.mk +++ b/Mk/Uses/gem.mk @@ -23,9 +23,10 @@ IGNORE= Incorrect 'USES+= gem:${gem_ARGS}' usage: argument [${arg}] is not recog .include "${USESDIR}/ruby.mk" PKGNAMEPREFIX?= rubygem- -EXTRACT_SUFX= .gem -EXTRACT_ONLY= -DIST_SUBDIR= rubygem +GEM_EXT= .gem +# needs to be disabled that rust cargo directories are correctly extracted +#EXTRACT_ONLY= +GEM_DIST_SUBDIR?= rubygem BUILD_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems EXTRACT_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems @@ -63,15 +64,16 @@ PLIST_SUB+= PORTVERSION="${PORTVERSION}" \ GEM_DOC_DIR="${GEM_DOC_DIR}" \ GEM_SPEC="${GEM_SPEC}" \ GEM_CACHE="${GEM_CACHE}" \ - EXTRACT_SUFX="${EXTRACT_SUFX}" + GEM_EXT="${GEM_EXT}" RUBYGEMBIN= ${LOCALBASE}/bin/gem . if defined(DISTFILES) -GEMFILES= ${DISTFILES:C/:[^:]+$//} +GEMFILES?= ${DISTFILES:C/:[^:]+$//} . else -GEMFILES= ${DISTNAME}${EXTRACT_SUFX} +GEMFILES?= ${DISTNAME}${GEM_EXT} . endif +DISTFILES+= ${GEM_DIST_SUBDIR}/${GEMFILES} RUBYGEM_ARGS=-l --no-update-sources --install-dir ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER} --ignore-dependencies --bindir=${STAGEDIR}${PREFIX}/bin @@ -81,17 +83,16 @@ RUBYGEM_ARGS+= --document rdoc,ri RUBYGEM_ARGS+= --no-document . endif -. if !target(do-extract) -do-extract: - @${SETENV} ${GEM_ENV} ${RUBYGEMBIN} unpack --target=${WRKDIR} ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} - @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} spec --ruby ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} > ${GEMSPEC} ; then \ +_USES_extract+= 590:gem-extract +gem-extract: + @${SETENV} ${GEM_ENV} ${RUBYGEMBIN} unpack --target=${WRKDIR} ${DISTDIR}/${GEM_DIST_SUBDIR}/${GEMFILES} + @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} spec --ruby ${DISTDIR}/${GEM_DIST_SUBDIR}/${GEMFILES} > ${GEMSPEC} ; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Extraction failed unexpectedly."; \ (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ fi; \ ${FALSE}; \ fi) -. endif . if !target(do-build) do-build: