Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jan 2017 19:00:37 +0800
From:      Julian Elischer <julian@freebsd.org>
To:        "ports@FreeBSD.org" <ports@freebsd.org>, FreeBSD Ports Management Team <portmgr@FreeBSD.org>
Subject:   Re: suggested patch for bsd.ports.mk
Message-ID:  <b385445c-55e8-1684-bfb0-5dc029551dc4@freebsd.org>
In-Reply-To: <6453cdb9-b27a-e061-7249-51d84dbaefcc@freebsd.org>
References:  <d857274b-908a-4873-1f81-ea99cb1fdbba@freebsd.org> <6453cdb9-b27a-e061-7249-51d84dbaefcc@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/01/2017 6:31 PM, Julian Elischer wrote:
> Sometime ago I proposed the following change.
>
> I got several "yes please" from members of the public,
> but no actionable response from members of the ports group
> So I am asking again.
>
> As a src committer I don't feel qualified to do the commit myself 
> and would like a guide/mentor for the task if I'm to do it myself.

see also:
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215726

>
> Julian
>
> On 13/05/2016 12:11 AM, Julian Elischer wrote:
>> This patch is pretty self explanatory.
>>
>> it allows us to keep patches for various ports separately in a 
>> sparse hierarchy while not having to write to the ports tree itself.
>>
>> In case the list scrubs hte text attachment (diff) here's the 
>> description part of the diff.
>>
>> >==== //depot/bugatti/FreeBSD-ports-PZ/10.1/Mk/bsd.port.mk#2 (text) 
>> ====
>>
>> @@ -791,6 +791,11 @@
>>  #                  The patches specified by this variable will be
>>  #                  applied after the normal distribution patches but
>>  #                  before those in ${PATCHDIR}.
>> +# EXTRA_PATCH_TREE - where to find extra 'out-of-tree' patches
>> +#                  Points to a directory hierarchy with the same 
>> layout
>> +#                  as the ports tree, where local patches can be 
>> found.
>> +#                  This allows a third party to keep their patches in
>> +#                  some other source control system if needed.
>>  # PATCH_WRKSRC    - Directory to apply patches in.
>>  #                  Default: ${WRKSRC}
>>  #
>>
>> If anyone thinks this is a good idea, I'd like it to go in as we 
>> have to maintain it..
>> I could commit it myself but haven't had my ports wings awarded yet..
>>
>>
> the actual patch is:
>
>
> ==== //depot/bugatti/FreeBSD-ports-PZ/10.1/Mk/bsd.port.mk#2 (text) ====
>
> @@ -749,6 +749,11 @@
>  #                  The patches specified by this variable will be
>  #                  applied after the normal distribution patches but
>  #                  before those in ${PATCHDIR}.
> +# EXTRA_PATCH_TREE - where to find extra 'out-of-tree' patches
> +#                  Points to a directory hierarchy with the same 
> layout
> +#                  as the ports tree, where local patches can be 
> found.
> +#                  This allows a third party to keep their patches in
> +#                  some other source control system if needed.
>  # PATCH_WRKSRC    - Directory to apply patches in.
>  #                  Default: ${WRKSRC}
>  #
> @@ -3145,6 +3150,36 @@
>              done; \
>          fi; \
>      fi
> +.if defined(EXTRA_PATCH_TREE)
> +    @set -e ;\
> +    if [ -d ${EXTRA_PATCH_TREE}/${PKGORIGIN} ]; then \
> +        if [ "`${ECHO_CMD} 
> ${EXTRA_PATCH_TREE}/${PKGORIGIN}/patch-*`" != 
> "${EXTRA_PATCH_TREE}/${PKGORIGIN}/patch-*" ]; then \
> +            ${ECHO_MSG} "===>  Applying local patches for 
> ${PKGNAME}" ; \
> +            PATCHES_APPLIED="" ; \
> +            for i in ${EXTRA_PATCH_TREE}/${PKGORIGIN}/patch-*; do \
> +                case $$i in \
> +                    *.orig|*.rej|*~|*,v) \
> +                        ${ECHO_MSG} "===>   Ignoring local 
> patchfile $$i" ; \
> +                        ;; \
> +                    *) \
> +                        if [ ${PATCH_DEBUG_TMP} = yes ]; then \
> +                            ${ECHO_MSG} "===>   Applying local 
> patch $$i" ; \
> +                        fi; \
> +                        if ${PATCH} ${PATCH_ARGS} < $$i ; then \
> +                            PATCHES_APPLIED="$$PATCHES_APPLIED $$i" 
> ; \
> +                        else \
> +                            ${ECHO_MSG} `${ECHO_CMD} "=> Local 
> patch $$i failed to apply cleanly." | ${SED} 
> "s|${EXTRA_PATCH_TREE}/${PKGORIGIN}/||"` ; \
> +                            if [ x"$$PATCHES_APPLIED" != x"" -a 
> ${PATCH_SILENT} != "yes" ]; then \
> +                                ${ECHO_MSG} `${ECHO_CMD} "=> 
> Patch(es) $$PATCHES_APPLIED applied cleanly." | ${SED} 
> "s|${EXTRA_PATCH_TREE}/${PKGORIGIN}/||g"` ; \
> +                            fi; \
> +                            ${FALSE} ; \
> +                        fi; \
> +                        ;; \
> +                esac; \
> +            done; \
> +        fi; \
> +    fi
> +.endif
>  .endif
>
>  .if !target(run-autotools-fixup)
>
> _______________________________________________
> freebsd-ports@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to 
> "freebsd-ports-unsubscribe@freebsd.org"
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b385445c-55e8-1684-bfb0-5dc029551dc4>