Date: Fri, 22 Jan 2021 20:28:35 -0700 From: Gary Aitken <freebsd@dreamchaser.org> To: FreeBSD Mailing List <freebsd-questions@freebsd.org> Cc: Christoph Brinkhaus <c.brinkhaus@t-online.de>, Polytropon <freebsd@edvax.de> Subject: Re: tweaking a port (build issue) Message-ID: <9c72d8fa-e60b-9953-0002-a61e012a1870@dreamchaser.org> In-Reply-To: <YAqMXSdQA800qcDh@esprimo> References: <cc70bdb2-e96c-2d68-5ce2-c9915d9c1b74@dreamchaser.org> <YAqMXSdQA800qcDh@esprimo>
next in thread | previous in thread | raw e-mail | index | archive | help
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? 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9c72d8fa-e60b-9953-0002-a61e012a1870>