From nobody Sat Jan 06 08:18:44 2024 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 4T6YBD4tcDz55scZ; Sat, 6 Jan 2024 08:18:44 +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 4T6YBD4QG3z4hYM; Sat, 6 Jan 2024 08:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704529124; 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=POUuvzcuXn5gm1CRvKUXFE7wMJDchD3R7BCNtR/DQoA=; b=LIikkHVqqW8rFpzCKRFRw7D91tONV6pBtyIG9q4DmDSziWru8YTPACbCtHIn3JOGJPd30u EHQnzA8eERIv/KLPEAYybqE9G+8IvXqTUla47rRGMh2/JWNIHsDJHVxEcy6pwyysof9oAk qAFHjZMR1Oz4u4SDHFPcVOHspo01TZlso7pbPLq+tG8HygRrwVL2gWrlEmbC6ytQVLuz5D aEPNUULtskkLCj4FxVFtDpGDpZ1cZK7NU8AERCrE2UrS62tUmiajMdB1s0mI1eGp5oJ3ur dtnNpk06mCzHak5p3pmnGK0Kpt+gEQ6K3QPE6iKBsQIzmDQ8v9Wg5BmWU5hkNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704529124; 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=POUuvzcuXn5gm1CRvKUXFE7wMJDchD3R7BCNtR/DQoA=; b=bKLp9htemfAQ0MkOyUb4364KYG9sips5A3cMyLYOYlWDpFn+1wig5Xd4cFNrKWUTmC04Ip 3+7CZ9I209FxkIEstWmBK5ouAN85uYbkL4louXcZzwJlqTTyIc1Z5uStuQ8we4RILGo5wv iCOVemUz3FEGUm0G4w14NR/5M5TMdgT4vj4ukc+j3gOnOMNeqqanNCLH2Xp5lUzFxOYby+ gzDCGEcwc3ItKzLUgACQan3zYjiS6ZnLgtThFtRWDGC3mKs8qcBZtjNMPIquWPnz6VAG09 CekzUQMJZVXpFWOkGsC9hDGEvqgYYXaQZmzTv0V/e9zOeODPOvjqHXkS/UfPxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704529124; a=rsa-sha256; cv=none; b=hUd1ZIVtMdblcts1q1LlrikYksn6VBPLmUmwmX1vct5813GT4W1lvWJyd2u1Jo/mGEomcD grbBPeo3CmeAnC/hHbqadg3oj9vXwLpcWHMh4Mrql9F/TeDWHVOgk7gOm5PBwuDs7dYf/7 BBIK7ksZn8psaUvSyyQpbc8tKv9qedpHsTxNwORJUJvFzHzfQNwHK9BAfkGiGIHYNCbpO+ qik2tCBJD0v8iH+4+yntkWn7K38L+jrfEk8vzk92w/ZJhQOyPKehjuBNLrMr/r07SuwSZ1 BkHV632j57NsSMInis8GRoJ1oFA0kgOSkNTohrSOePLofkaxhi2YP1I1eweuWA== 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 4T6YBD3Rt0zYpr; Sat, 6 Jan 2024 08:18:44 +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 4068IiW5038470; Sat, 6 Jan 2024 08:18:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4068IiMj038467; Sat, 6 Jan 2024 08:18:44 GMT (envelope-from git) Date: Sat, 6 Jan 2024 08:18:44 GMT Message-Id: <202401060818.4068IiMj038467@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthias Fechner Subject: git: 87916ecbfac7 - main - gem: make it possible to generate gems that require rust/cargo 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: mfechner X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87916ecbfac7532b4d3de63efa36ed8f8e637e36 Auto-Submitted: auto-generated The branch main has been updated by mfechner: URL: https://cgit.FreeBSD.org/ports/commit/?id=87916ecbfac7532b4d3de63efa36ed8f8e637e36 commit 87916ecbfac7532b4d3de63efa36ed8f8e637e36 Author: Matthias Fechner AuthorDate: 2024-01-03 09:32:55 +0000 Commit: Matthias Fechner CommitDate: 2024-01-06 08:18:36 +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 --- 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: