From nobody Mon Jan 15 12:09:31 2024 X-Original-To: dev-commits-ports-all@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 4TD9tM4H1zz56n1T; Mon, 15 Jan 2024 12:09:31 +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 4TD9tM2XC5z4Nbr; Mon, 15 Jan 2024 12:09:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705320571; 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=BNiQy+HRnmFJYBj3myB1X/dUoLmf1LC29tH/x/tGDN0=; b=cjDf3ytpYhu9hPnCBMtfSW2WKCbt3ApS9FWtDKcobU/b2YoeWTSIzQd1pl8hbpAtfsibTo HMHolIydURs3X6BC4P3D5AiBhENiu6vovTKYfWlDl4s1i22K+Kz2hKMJ1Kbv9l6rh93UoQ yiOTfeGWAN0zycEUADtsZ7pKi7dH/5Exvl0LORQIJU7nS440XKt49VLqoy8sasB0eNfn9T OhV8w/mPVFhTODXNwykrV4r+pM1mgFSC2t5K7hh+mhBTgepNZlNWhlTlZDX3P5sOv9DAIk zAE6Sl7SX4iMXwQaqKZ6tTY+OKQraVZe1yypo0VsuNB/0sz0qtPB7pATXNS/Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705320571; 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=BNiQy+HRnmFJYBj3myB1X/dUoLmf1LC29tH/x/tGDN0=; b=yEKlEhGEX49tfAQH1McX68D3XKehFrjPH4acRfPNNjgPNINLV4ca6s8VkRl8bDrEOuLmJI uxutrWCNgsRjGhaBRXln6b7vwK67DduJl1XFfP2i/BLp6pab1RN5uC6lvHLKcAbM9tQ1E6 NAzGLmQp15ubh20fFAjKVkNcrSX8BB0SJpB6kwzrcwRTJhsp5A+V0Iv64DjOU6XZNKtzGd yteX60ftj/EhT30n1wN8t0GIQgUTnRDFZqAhWAVcQx5X8vFjZlSY2khwY3kDLWwj/Ij8Up yxH7hDYseR0pnLSBLwRLlB5ui2GQGm5UAxbKal+VDw77MyY2KL/IFNUbrz4OAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705320571; a=rsa-sha256; cv=none; b=oxs36SiHAUI7/ZyJytQQYoBnNotoch27sE4MLuwU2mzlVW7RUiPHLs3N7Os5XFaZlgH1jN WKjcoX4b1iaeRQMzvbW5l03AK2kpM3+gBIkJOz7mfkwvArOdXqM5HLquZqwK2Lj92bHWNU fEr8xXJRcTTBy/nsJpgSG5cBZ2ADzdpkKqUIyduC9po86TttfFjxGhtTWCkdUyCEpCMC52 H0Gs1JYcGQoegXvLmWdEnmmJJzrUW/cE96b7+cYIDZ1qHsQeY2cAsbaqcmyXhUrEDTL/cg Z2EldvV726YAMeM5kqXmc8wwCLcMIdIh8MLl5Cff4hgLF1s86HpYi8vtGspR1Q== 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 4TD9tM1YSFzwGt; Mon, 15 Jan 2024 12:09:31 +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 40FC9Vdm074198; Mon, 15 Jan 2024 12:09:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40FC9VMK074195; Mon, 15 Jan 2024 12:09:31 GMT (envelope-from git) Date: Mon, 15 Jan 2024 12:09:31 GMT Message-Id: <202401151209.40FC9VMK074195@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: cf447c2b1a39 - 2024Q1 - Mk/Uses: make it possible to compile gems that need rust to build List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@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: cf447c2b1a3905d2ffb186b5db32af03b055dc73 Auto-Submitted: auto-generated The branch 2024Q1 has been updated by mfechner: URL: https://cgit.FreeBSD.org/ports/commit/?id=cf447c2b1a3905d2ffb186b5db32af03b055dc73 commit cf447c2b1a3905d2ffb186b5db32af03b055dc73 Author: Matthias Fechner AuthorDate: 2024-01-09 12:04:24 +0000 Commit: Matthias Fechner CommitDate: 2024-01-15 12:07:02 +0000 Mk/Uses: make it possible to compile gems that need rust to build This commits defines same variables in a way that they can be overwritten by a port. Refactored the extract target to work together with cargo.mk. The gem.mk file will require more work to be easily usable for gems that required rust. Most of the work is now outsourced to the port. I added comments to parts that needs more love. To test these modification, the following commands can be used: (make sure you adjust the path to match your environment) rm /usr/local/poudriere/ports/gitlab/distfiles/rubygem/gapic-common-*.gem rm /usr/local/poudriere/ports/gitlab/distfiles/rubygem/prome*.gem rm /usr/local/poudriere/ports/gitlab/distfiles/rust/crates/ahash-*crate /usr/local/poudriere/ports/gitlab/distfiles/*.gem cd /usr/local/poudriere/ports/gitlab/devel/rubygem-prometheus-client-mmap make makesum cd /usr/local/poudriere/ports/gitlab/devel/rubygem-gapic-common make makesum poudriere testport -p gitlab -j 132amd64 devel/rubygem-gapic-common && poudriere testport -p gitlab -j 132amd64 devel/rubygem-prometheus-client-mmap (cherry picked from commit 606b37bbf06dcdfb54480aae8fb69135c06fb11a) --- Mk/Uses/gem.mk | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/Mk/Uses/gem.mk b/Mk/Uses/gem.mk index a1e77273932a..8c4539a274ca 100644 --- a/Mk/Uses/gem.mk +++ b/Mk/Uses/gem.mk @@ -24,8 +24,8 @@ IGNORE= Incorrect 'USES+= gem:${gem_ARGS}' usage: argument [${arg}] is not recog PKGNAMEPREFIX?= rubygem- EXTRACT_SUFX= .gem -EXTRACT_ONLY= -DIST_SUBDIR= rubygem +# disabled to be able that extract other archives into the gem folder like cargo archives which are required to compile gems that require rust +#EXTRACT_ONLY?= BUILD_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems EXTRACT_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems @@ -67,10 +67,20 @@ PLIST_SUB+= PORTVERSION="${PORTVERSION}" \ RUBYGEMBIN= ${LOCALBASE}/bin/gem +. if defined(GEMS_SKIP_SUBDIR) +# do not define a DIST_SUBDIR, currently required to have cargo archives available in the gem source directory to be able to compile it +#DIST_SUBDIR= +. else +DIST_SUBDIR= rubygem +. endif + . if defined(DISTFILES) -GEMFILES= ${DISTFILES:C/:[^:]+$//} +# this should maybe be reworked, as if a gem port is used together with cargo archives, the DISTFILES also includes the cargo archives +# this is currently overwritten in the port that requires this +# the cargo archives should be filtered out here or better we should only have here gem archives included +GEMFILES?= ${DISTFILES:C/:[^:]+$//} . else -GEMFILES= ${DISTNAME}${EXTRACT_SUFX} +GEMFILES?= ${DISTNAME}${EXTRACT_SUFX} . endif RUBYGEM_ARGS=-l --no-update-sources --install-dir ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER} --ignore-dependencies --bindir=${STAGEDIR}${PREFIX}/bin @@ -81,8 +91,8 @@ RUBYGEM_ARGS+= --document rdoc,ri RUBYGEM_ARGS+= --no-document . endif -. if !target(do-extract) -do-extract: +_USES_extract+= 590:gem-extract +gem-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 \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ @@ -91,7 +101,6 @@ do-extract: fi; \ ${FALSE}; \ fi) -. endif . if !target(do-build) do-build: