From owner-freebsd-questions@FreeBSD.ORG Mon May 31 07:39:35 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26DDA106564A for ; Mon, 31 May 2010 07:39:35 +0000 (UTC) (envelope-from sahil@tandon.net) Received: from spartan.hamla.org (spartan.hamla.org [206.251.255.30]) by mx1.freebsd.org (Postfix) with ESMTP id 035438FC0C for ; Mon, 31 May 2010 07:39:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by spartan.hamla.org (Postfix) with ESMTP id 959F9170F0 for ; Mon, 31 May 2010 03:39:34 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tandon.net; h= user-agent:in-reply-to:content-disposition:content-type :content-type:mime-version:references:reply-to:message-id :subject:subject:from:from:date:date:received:received; s=aegis; t=1275291574; bh=IyrzuUVHh342jMArlMPhOwNXMqomNmKuFY6R8rZGYFQ=; b= mG4h7uXFAIAPNDbFhGiOSTBRa9msZdEZ/5nQrokCe0LttP5GMQexQhy6N0UDiYeZ QL+wq0La2OiuiWd7lxZ04vJ/WFyFdqXZuFk9SAGv3YDWpI2KmQ2WfuWu6czmgaYb IV2lYOnygKdSroH8d3L/CsaxuhhjvBfb+qPacBX1A0k= X-Virus-Scanned: by ClamAV at spartan.hamla.org Received: from spartan.hamla.org ([127.0.0.1]) by localhost (spartan.hamla.org [127.0.0.1]) (amavisd-new, port 10027) with LMTP id 0g+vFZ+RWEUN for ; Mon, 31 May 2010 03:39:34 -0400 (EDT) Received: from magic.hamla.org (cpe-69-201-179-80.nyc.res.rr.com [69.201.179.80]) by spartan.hamla.org (Postfix) with ESMTPSA id EBBCB17045 for ; Mon, 31 May 2010 03:39:32 -0400 (EDT) Date: Mon, 31 May 2010 03:39:30 -0400 From: Sahil Tandon To: freebsd-questions@freebsd.org Message-ID: <20100531073930.GC243@magic.hamla.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: portmaster not replacing %var% in final pkg-msg X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Sahil Tandon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2010 07:39:35 -0000 On Sun, 30 May 2010, Eitan Adler wrote: > $cd lang/go && portmaster . > ------------------------------------------------------------------ > To build Go programs for FreeBSD, you'll want to set up your > environment properly. The following environment variables should > be set: > ... > GOOS=freebsd > GOARCH=386 > GOROOT=/usr/local/lib/go This works because of the following sed-fu in lang/go/Makefile: post-install: @${CAT} ${PKGMESSAGE} | ${SED} \ -e "s|%%PREFIX%%|${PREFIX}|g" \ -e "s|%%ARCH%%|${GOARCH}|g" \ -e "s|%%GOOBJ%%|${GOOBJ}|g" > ===>>> pkg-message for go-20100413 [ .. ] > GOARCH=%%ARCH%% > GOROOT=%%PREFIX%%/lib/go It's probably preferable for lang/go to utilize SUB_FILES and SUB_LIST instead of using ${SED} to manually expand VAR=VALUE pairs in post-install. For context, see: http://www.freebsd.org/doc/en/books/porters-handbook/book.html#USING-SUB-FILES -- Sahil Tandon