Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2021 09:27:09 +0100
From:      Christoph Brinkhaus <c.brinkhaus@t-online.de>
To:        Gary Aitken <freebsd@dreamchaser.org>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: tweaking a port (build issue)
Message-ID:  <YAqMXSdQA800qcDh@esprimo>
In-Reply-To: <cc70bdb2-e96c-2d68-5ce2-c9915d9c1b74@dreamchaser.org>
References:  <cc70bdb2-e96c-2d68-5ce2-c9915d9c1b74@dreamchaser.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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?

It is very likely that you change has been overwritten. 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.
Coming from a clean port by running make clean make patch modifies 
the original cpp file according to your modifications. If you just
call make build the other make targets as fetch, extract and patch are
called before running the build.
I backup the files directory before the procedure somewhere else.
Just in case make makepatch clean the existing patches in case there
are no *.orig files of already existing files to be patched after 
make extract by make patch.

If things are unclear please have a look at
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/

Kind regards,
Christoph

> Thanks,
> 
> 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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YAqMXSdQA800qcDh>