From nobody Wed May 18 14:00:29 2022 X-Original-To: freebsd-ports@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 EBDD21AEB4E3 for ; Wed, 18 May 2022 14:05:12 +0000 (UTC) (envelope-from naddy@mips.inka.de) Received: from mail.inka.de (mail.inka.de [IPv6:2a04:c9c7:0:1073:217:a4ff:fe3b:e77c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4L3FB02fMsz4fvn for ; Wed, 18 May 2022 14:05:12 +0000 (UTC) (envelope-from naddy@mips.inka.de) Received: from mips.inka.de (naddy@[127.0.0.1]) by mail.inka.de with uucp (rmailwrap 0.5) id 1nrKIR-00CRRV-Vt; Wed, 18 May 2022 16:05:03 +0200 Received: from lorvorc.mips.inka.de (localhost [127.0.0.1]) by lorvorc.mips.inka.de (8.16.1/8.16.1) with ESMTP id 24IE0Txs099453; Wed, 18 May 2022 16:00:29 +0200 (CEST) (envelope-from naddy@lorvorc.mips.inka.de) Received: (from naddy@localhost) by lorvorc.mips.inka.de (8.16.1/8.16.1/Submit) id 24IE0TVv099452; Wed, 18 May 2022 16:00:29 +0200 (CEST) (envelope-from naddy) Date: Wed, 18 May 2022 16:00:29 +0200 From: Christian Weisgerber To: "\"Pat Maddox\"" Cc: freebsd-ports@freebsd.org Subject: Re: How to override port Makefile to point to local directory? Message-ID: References: List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4L3FB02fMsz4fvn X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of naddy@mips.inka.de has no SPF policy when checking 2a04:c9c7:0:1073:217:a4ff:fe3b:e77c) smtp.mailfrom=naddy@mips.inka.de X-Spamd-Result: default: False [-1.09 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[naddy]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[inka.de]; AUTH_NA(1.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-ports]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:202113, ipnet:2a04:c9c7::/32, country:DE]; SUBJECT_ENDS_QUESTION(1.00)[] X-ThisMailContainsUnwantedMimeParts: N "Pat Maddox": > I am writing software that I would eventually like to install on > FreeBSD. I'm currently stuck trying to write a Makefile that will point > to my local git dir, so I can build and install it while I'm developing. Set an empty DISTFILES and define a do-extract target that copies (downloads, checks out, ...) the source tree. For trying devel/got -current between releases, I add this to the port Makefile: -------------------> --- devel/got/Makefile +++ devel/got/Makefile @@ -13,6 +13,13 @@ USES= uidfix CONFLICTS_INSTALL= p5-App-GitGot +DISTFILES= +do-extract: + @cd ${WRKDIR} && got checkout /home/naddy/got.git ${WRKSRC} + @cd ${WRKSRC} && got ref -d `got info | \ + awk '/work tree UUID:/ { print "refs/got/worktree/base-" $$NF }'` + @sed -i '' 's/GOT_RELEASE=No/GOT_RELEASE=Yes/' ${WRKSRC}/got-version.mk + # Insert #include "openbsd-compat.h" into each source file, # after the <...> includes and before the "..." ones. n= ${.newline} <------------------- In fact, I have a branch "current", whose first commit is the above, and where I accumulate other port changes as they become necessary. Then, once there is a new Got release, I merge the changes into "main". If I were using git, I'd probably have some sort of "git archive ... | tar xf -" invocation in do-extract. -- Christian "naddy" Weisgerber naddy@mips.inka.de