private ports and pkgs versioning
Matthew Seaman
matthew at FreeBSD.org
Tue Oct 18 13:52:50 UTC 2016
On 10/18/16 13:54, Mark Linimon wrote:
> On Tue, Oct 18, 2016 at 08:49:06AM +0100, Matthew Seaman wrote:
>> Yes, there is a lot of useful stuff in the ports tree to support local
>> ports or even whole local categories of ports. I can't recall now how I
>> learned about all this stuff -- it may well have been just be a
>> combination of reading Makefiles and hints dropped on mailing lists. I
>> cannot recall a document describing this stuff anywhere.
>
> I don't believe that there is one.
>
> I'm sure there are N locally-grown solutions out in the wild.
>
> We ought to work together to poll people on what they use.
>
> As for adding the category, I think there's a quick fix, if you don't
> care about building INDEX. Add USE_LOCAL_MK=yes to your Makefile
> invocations, and use the patch below.
>
> Note: I haven't tried this yet, so adding the category to ports/Makefile
> may also be necessary to pacify ports/Mk/bsd.port.subdir.mk (e.g. INDEX.)
>
> Index: ports/Mk/bsd.local.mk
> ===================================================================
> --- ports/Mk/bsd.local.mk (revision 423944)
> +++ ports/Mk/bsd.local.mk (working copy)
> @@ -14,6 +14,8 @@
> # time should live.
> #
>
> +VALID_CATEGORIES+= local
> +
> .endif # !defined(_POSTMKINCLUDED) && !defined(Local_Pre_Include)
>
> .if defined(_POSTMKINCLUDED) && !defined(Local_Post_Include)
>
> mcl
>
In many places in the ports you can drop in a Makefile.local that gets
unconditionally included into the existing Makefile at that level.
There are several names that get treated similarly -- so you can have (I
think) Makefile.amd64 which is only included when compiling for that
architecture. The idea being if you add a whole new file, you won't get
merge conflicts when updating from SVN. There's a Makefile.inc that
goes one level above that gets included similarly.
Unfortunately it looks like this doesn't apply at the very top level of
the ports, otherwise this would be a really easy way of adding a custom
category.
Hmmm... looks like this is handled in the 30 or so lines starting at
line 1179 of bsd.port.mk
Cheers,
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20161018/6dc46844/attachment.sig>
More information about the freebsd-ports
mailing list