From owner-freebsd-questions@freebsd.org Sat Jan 23 08:39:51 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F9C24EB83C for ; Sat, 23 Jan 2021 08:39:51 +0000 (UTC) (envelope-from c.brinkhaus@t-online.de) Received: from mailout02.t-online.de (mailout02.t-online.de [194.25.134.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DN8h64cQnz3Qmh for ; Sat, 23 Jan 2021 08:39:50 +0000 (UTC) (envelope-from c.brinkhaus@t-online.de) Received: from fwd29.aul.t-online.de (fwd29.aul.t-online.de [172.20.26.134]) by mailout02.t-online.de (Postfix) with SMTP id 1E1E741E4C82; Sat, 23 Jan 2021 09:39:48 +0100 (CET) Received: from esprimo.local (bNp8sZZOoh-z1qLKWRSwcfVI8Y6DA+HyXUcLXwwI8O8Ked4REeUSY4mrVZkXKupwY6@[217.226.184.156]) by fwd29.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1l3ESQ-0IA3H60; Sat, 23 Jan 2021 09:39:46 +0100 Received: by esprimo.local (Postfix, from userid 1001) id 343BD3811D; Sat, 23 Jan 2021 09:39:46 +0100 (CET) Date: Sat, 23 Jan 2021 09:39:46 +0100 From: Christoph Brinkhaus To: Gary Aitken Cc: FreeBSD Mailing List , Polytropon Subject: Re: tweaking a port (build issue) Message-ID: References: <9c72d8fa-e60b-9953-0002-a61e012a1870@dreamchaser.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c72d8fa-e60b-9953-0002-a61e012a1870@dreamchaser.org> X-ID: bNp8sZZOoh-z1qLKWRSwcfVI8Y6DA+HyXUcLXwwI8O8Ked4REeUSY4mrVZkXKupwY6 X-TOI-EXPURGATEID: 150726::1611391186-0000FF93-5DDD19BF/0/0 CLEAN NORMAL X-TOI-MSGID: 06cac937-984e-457e-b7c5-f6d78df887a5 X-Rspamd-Queue-Id: 4DN8h64cQnz3Qmh X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of c.brinkhaus@t-online.de has no SPF policy when checking 194.25.134.17) smtp.mailfrom=c.brinkhaus@t-online.de X-Spamd-Result: default: False [-1.60 / 15.00]; RWL_MAILSPIKE_GOOD(0.00)[194.25.134.17:from]; FREEMAIL_FROM(0.00)[t-online.de]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[t-online.de]; ASN(0.00)[asn:3320, ipnet:194.25.0.0/16, country:DE]; RBL_DBL_DONT_QUERY_IPS(0.00)[194.25.134.17:from]; RECEIVED_SPAMHAUS_PBL(0.00)[217.226.184.156:received]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[t-online.de]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[194.25.134.17:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[194.25.134.17:from]; R_SPF_NA(0.00)[no SPF record]; MID_RHS_NOT_FQDN(0.50)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2021 08:39:51 -0000 Am Fri, Jan 22, 2021 at 08:28:35PM -0700 schrieb Gary Aitken: > On 1/22/21 1:27 AM, Christoph Brinkhaus wrote: > > Am Thu, Jan 21, 2021 at 05:17:15PM -0700 schrieb Gary Aitken: > > > > Hi Gary, > > > >> I'm trying to tweak a port (cad/freecad) and am having an issue getting the > >> build to work. > >> > >> I modified a file in the /usr/ports/cad/freecad directory tree > >> work/FreeCAD-0.18.4/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp > >> and did: > >> pkg deinstall > >> make build > >> make install > >> pkg deinstall > >> modify something else > >> make build > >> doesn't look like anything changed. > >> > >> Apparently I'm using some old forgotten lore which is wrong... clues? > ...> To preserve > > the change it should be the best practice to follow the porters > > handbook. > > After make extract copy the orininal file to > > ViewProviderSketch.cpp.orig. Then modify the cpp file. > > cd to /usr/ports/cad/freecad and run make makepatch. > > Now a patch-ViewProviderSketch.cpp or so should have been generated in > > /usr/ports/cad/freecad/files. May be the path to the file is added to > > the name after the patch-. make makepatch takes are for the proper > > file name. > > Thanks, I didn't know about makepatch. I see it is in the new version > of the porter's handbook but not in my 2020-08-09 (11.4) version > > Unfortunately, there was a file which I did *not* modify which also had > a .orig version. In the files directory, a patch was generated for > that file also. The build failed because of that patch. Renaming the > failed patch to no-patch... prevented it from being used. I'm assuming > the .orig file is cruft left over from the porting process. > > The above process works, but it's painfully slow, rebuilding the whole > port rather than just the changed file, the library it's in, and the > final executable. Is there an easy way to get just those rebuilt? I do not know about any automatism which updates just one target. But you can mix your previous work flow with the make makepatch thing. Just do not run make build on the complete port but compile your library and copy the executable to its target origin. Then a make clean and everything should be as required. Kind regards, Christoph > On 1/21/21 10:23 PM, Polytropon wrote: > > > You probably don't need to invoke pkg manually. The "deinstall" > > target should do that, as it did in ye olden times. > > Thanks > > > After making a code change, try this: > >> # cd /usr/ports/cad/freecad > > # make deinstall <--- remove installed program > > # make clean <--- remove compiler cruft > > # make <--- build everything new > > # make reinstall <--- (re)install program > > > > This should work as expected even in the modern pkg times. :-) > > Nope. The make clean deletes the work subtree, and the changes, so you're > back where you started. > > Gary > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"