From owner-freebsd-ports Thu Jan 23 9:57:16 2003 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 A35FC37B405 for ; Thu, 23 Jan 2003 09:57:15 -0800 (PST) Received: from mail.bellavista.cz (mail.bellavista.cz [62.168.44.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0B7F43ED8 for ; Thu, 23 Jan 2003 09:57:14 -0800 (PST) (envelope-from neuhauser@bellavista.cz) Received: from freepuppy.bellavista.cz (freepuppy.bellavista.cz [10.0.0.10]) by mail.bellavista.cz (Postfix) with ESMTP id 9F49369 for ; Thu, 23 Jan 2003 18:57:12 +0100 (CET) Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 8B5CF2FDB4E; Thu, 23 Jan 2003 18:57:12 +0100 (CET) Date: Thu, 23 Jan 2003 18:57:12 +0100 From: Roman Neuhauser To: freebsd-ports Subject: Porting question Message-ID: <20030123175712.GE86853@freepuppy.bellavista.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I haven't spotted this in the Porter's Handbook, so I'll ask here: a ported program has some hardcoded paths, in quite a few files. I want to make it $PREFIX-clean. What's the canonical way of doing this? My first thought was something along these lines: files/patch-aa: +++ foo --- foo.orig ... - ... /etc/something + ... @@PREFIX@@/etc/something ... Makefile: USE_REINPLACE= yes PATCHED_FILES= foo bar baz post-patch: for f in ${PATCHED_FILES}; do \ ${REINPLACE_CMD} s,@@PREFIX@@,${PREFIX} $$f; \ done But is this the correct approach? -- FreeBSD 4.7-STABLE 6:49PM up 14 days, 23:56, 19 users, load averages: 0.00, 0.00, 0.00 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message