From c595d1e445f170ee908699627e4eaeca64cf4ab0 Mon Sep 17 00:00:00 2001 From: Clement Laforet Date: Thu, 20 Oct 2005 18:02:18 +0000 Subject: - Add "make patch-o-matic" target. It applies to a fresh ports tree patches required to build ports correctly with devel/portmk. Currently only USE_GMAKE changes [1] are applied. It will be heavily used in the future to support new knobs in b.p.m (like USE_APACHE, USE_TCL, new OPTIONS, etc.) Currently patches are added by hand. I hope I can add soon an automated way to submit patches. [1] Submitted by: jylefort --- ports-mgmt/portmk/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'ports-mgmt') diff --git a/ports-mgmt/portmk/Makefile b/ports-mgmt/portmk/Makefile index 1adef89e2ee9..3b66f3cdaa2f 100644 --- a/ports-mgmt/portmk/Makefile +++ b/ports-mgmt/portmk/Makefile @@ -20,6 +20,10 @@ PLIST_FILES= bin/omake PORTDOCS= ReadMe ChangeLog Features KnownIssues +MASTER_SITE_PATCHOMATIC?= http://people.freebsd.org/~clement/portmk/ +PATCHOMATIC_FILE?= patch-o-matic-latest.tar.bz2 +WRKSRC= ${WRKDIR}/patch-o-matic + .include .if ${OSVERSION} < 500000 @@ -58,4 +62,21 @@ activate: ${CAT} ${FILESDIR}/make.conf >> /etc/make.conf && \ ${ECHO_MSG} ">> Configured make.conf(5)." +patch-o-matic: + @${MKDIR} ${WRKDIR} + @${ECHO_CMD} "==> Fetching patch-o-matic file (${MASTER_SITE_PATCHOMATIC}/${PATCHOMATIC_FILE}" + @(cd ${WRKDIR} ; ${RM} -f ${PATCHOMATIC_FILE} ; ${FETCH_CMD} \ + ${MASTER_SITE_PATCHOMATIC}/${PATCHOMATIC_FILE}) + @${TAR} yxf ${WRKDIR}/${PATCHOMATIC_FILE} -C ${WRKDIR} + @${ECHO_CMD} "==> Applying patches..." + @for patch in $$(${CAT} ${WRKSRC}/AFFECTED_PORTS); do \ + eval `${ECHO_CMD} $$patch | ${AWK} -F\: \ + '{print "PORT="$$1"; PATCH="$$2";"}'`; \ + [ -e ${WRKSRC}/patches/$$PATCH ] && { \ + ${ECHO_CMD} -n " Applying $$PATCH to $$PORT... " ; \ + ${PATCH} -d ${PORTSDIR} -p0 < ${WRKSRC}/patches/$$PATCH > /dev/null 2>&1 || echo -n "N" ;\ + echo OK ;\ + }; ${TRUE} ;\ + done + .include -- cgit v1.2.3