From owner-freebsd-ports Mon Dec 4 17: 0: 6 2000 From owner-freebsd-ports@FreeBSD.ORG Mon Dec 4 17:00:01 2000 Return-Path: Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8518337B401 for ; Mon, 4 Dec 2000 17:00:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id eB5101J37103; Mon, 4 Dec 2000 17:00:01 -0800 (PST) (envelope-from gnats) Resent-Date: Mon, 4 Dec 2000 17:00:01 -0800 (PST) Resent-Message-Id: <200012050100.eB5101J37103@freefall.freebsd.org> Resent-From: gnats-admin@FreeBSD.org (GNATS Management) Resent-To: freebsd-ports@FreeBSD.org Resent-Reply-To: gnats-admin@FreeBSD.org, sec@ice.42.org Received: from ice.42.org (ice.42.org [194.246.250.222]) by hub.freebsd.org (Postfix) with ESMTP id 0D60237B401 for ; Mon, 4 Dec 2000 16:54:00 -0800 (PST) Received: by ice.42.org (Postfix, from userid 1000) id F34E611D; Tue, 5 Dec 2000 01:53:58 +0100 (CET) Message-Id: <20001205005358.F34E611D@ice.42.org> Date: Tue, 5 Dec 2000 01:53:58 +0100 (CET) From: sec@ice.42.org Reply-To: sec@ice.42.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/23287: allow system-local patches for ports Resent-Sender: gnats@FreeBSD.org Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 23287 >Category: ports >Synopsis: allow system-local patches for ports >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Dec 04 17:00:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Stefan `Sec` Zehl >Release: FreeBSD 4.1-STABLE i386 >Organization: >Environment: >Description: Sometimes I'm not completely happy with a single specific aspect of a port, while i still like the rest of it. Thus I often have to do the make extract cd work/portname vi file (modify somthing) cd ../.. make install cycle to install a port. I've started to collect these modifications in patch-format on my systems in /pub/patches. To make it even easier, I modified bsd.port.mk (patch below). If you set 'USERPATCHES' in /etc/make.conf it will look into that directory for patches with the name $PORTNAME.* and apply them. This makes installing ports on a new system so much easier and faster, so I hope this modification could find its way back into FreeBSD. >How-To-Repeat: >Fix: --- /usr/ports/Mk/bsd.port.mk.orig Tue Dec 5 01:31:44 2000 +++ /usr/ports/Mk/bsd.port.mk Tue Dec 5 01:48:13 2000 @@ -1704,6 +1704,14 @@ .if !target(do-patch) do-patch: +.if defined(USERPATCHES) + @if [ "`echo ${USERPATCHES}/${PORTNAME}.*`" != "${USERPATCHES}/${PORTNAME}.*" ]; then \ + ${ECHO_MSG} "===> Applying user patches for ${PKGNAME}" ; \ + for i in ${USERPATCHES}/${PORTNAME}.*; do \ + ${PATCH} ${PATCH_ARGS} < $$i ; \ + done; \ + fi; +.endif .if defined(PATCHFILES) @${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}" @(cd ${_DISTDIR}; \ Possibly also add this to /etc/defaults/make.conf: # USERPATCHES controls where individual patches for ports are searched. # If this is set, it looks for patches of the form # $USERPATCHES/$PORTNAME.* # #USERPATCHES=/pub/patches >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message