From owner-freebsd-ports@FreeBSD.ORG Wed May 17 14:23:47 2006 Return-Path: X-Original-To: ports@FreeBSD.ORG Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BA8516A589 for ; Wed, 17 May 2006 14:23:47 +0000 (UTC) (envelope-from fernan@iib.unsam.edu.ar) Received: from smtp.unsam.edu.ar (smtp.unsam.edu.ar [170.210.48.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1345B43D60 for ; Wed, 17 May 2006 14:23:41 +0000 (GMT) (envelope-from fernan@iib.unsam.edu.ar) Received: from omega.iib.unsam.edu.ar (omega.iib.unsam.edu.ar [192.168.10.14]) by smtp.unsam.edu.ar (8.12.6/8.12.6) with ESMTP id k4HEPOoh054099 for ; Wed, 17 May 2006 11:25:25 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: from omega.iib.unsam.edu.ar (localhost [127.0.0.1]) by omega.iib.unsam.edu.ar (8.13.6/8.13.6) with ESMTP id k4HENU5K095842 for ; Wed, 17 May 2006 11:23:31 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: (from fernan@localhost) by omega.iib.unsam.edu.ar (8.13.6/8.13.3/Submit) id k4HENTBo095836 for ports@FreeBSD.ORG; Wed, 17 May 2006 11:23:29 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) X-Authentication-Warning: omega.iib.unsam.edu.ar: fernan set sender to fernan@iib.unsam.edu.ar using -f Date: Wed, 17 May 2006 11:23:29 -0300 From: Fernan Aguero To: FreeBSD Ports Message-ID: <20060517142329.GD50791@iib.unsam.edu.ar> Mail-Followup-To: FreeBSD Ports Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 Cc: Subject: applying patches with different PATCH_ARGS requirements X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2006 14:23:48 -0000 Hi! I need to patch a port with an external patch (PATCHFILES + PATCH_SITE already set up). The problem is that this port already has patches in PATCHDIR (files/) and that I need to set the pathname strip count (-p) to different values. As per the Porter's Handbook, there is a mechanism in place to deal with patches from different sites and different subdirectories within these sites: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#PORTING-MASTER-SITES-N The mechanism, works by adding a postfix identifier to values of variables, like in: MASTERSITES= site1:group1 site2:group2 ... et cetera MASTER_SITE_SUBDIR= subdirX:group1 subdirY:group2 ... et cetera DISTFILES= fileA:group1 fileB:group2 ... et cetera with this, fileA will be fetched from site1/subdirX fileB will be fetched from site2/subdirY However, after reading this section it's clear that this mechanism is restricted to a few variables http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#PORTING-MASTER-SITES-N-GROUP-SEMANTICS namely: MASTER_SITES, PATCH_SITES, MASTER_SITE_SUBDIR, PATCH_SITE_SUBDIR, DISTFILES, and PATCHFILES What would it take to have this grouping mechanism extended to other variables? I'm currently thinking in PATCH_ARGS= -p0:group1 -p1:group2 Or is there any other way to achieve this? (excluding the obvious, of course, which would be something like: .if !defined(WITHOUT_THIS_PATCH) # apply this patch with its own local PATCH_ARGS .endif (this patch is a bugfix, so it should not be optional) Fernan