From owner-freebsd-ports@FreeBSD.ORG Thu Jan 28 16:53:47 2010 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8460B106566C for ; Thu, 28 Jan 2010 16:53:47 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 1EE428FC18 for ; Thu, 28 Jan 2010 16:53:46 +0000 (UTC) Received: by fxm27 with SMTP id 27so401575fxm.3 for ; Thu, 28 Jan 2010 08:53:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=rWQZme8yraKWxIP7mf+ek65K/HqEpjFnwNJpjJtFSmM=; b=FWHIkd4RJyefSqe/reOPUud59lEDAI/7CprFj3TSXWxdHweDgu5DwzKqVkHz12a7Tj 6IFQgzeJMD9vrtLguEelnAjGYh9eyrr4xWLz6YAyoq/J2PknyKVwZIFmFauO55U/9mxt BDWe9DBjHMRskKXWy15LttdDRqOCkFmj61WxY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=GQzSn+lBN/EzLoR6IojgPrVvyTWYPCQz2MGQsaI2O9ZDmuTzJDQYry8nJA2gO6JxuU hk+CobL3fAsufmtkgqcri8qyxja3AZJYOl5WZYM0Bw8TgpBg8RL/dFqjA38BQSkofHeE q8WloaAtzUCdEm5LZPLiCkJhB0tvv4WvDC8I8= MIME-Version: 1.0 Received: by 10.216.90.208 with SMTP id e58mr2406204wef.57.1264697625734; Thu, 28 Jan 2010 08:53:45 -0800 (PST) Date: Thu, 28 Jan 2010 11:53:45 -0500 Message-ID: From: "b. f." To: freebsd-ports@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Rainer Hurling Subject: Re: Need help with new port math/ggobi 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: Thu, 28 Jan 2010 16:53:47 -0000 Rainer Hurling wrote: >There are some obscurities I am struggling with: >1. The port needs libraries gtk2 and libxml2. > Is it ok how the port ensures they are installed? Just use USE_GNOME= gtk20 libxml2, rather than the LIB_DEPENDS line. > >2. A second make target has to create 'ggobirc'. > Is it build ok this way? Yes, but it is easier just to set ALL_TARGET= all ggobirc, rather than defining a custom post-build target. > >3. ggobi authors suggest to create /etc/xdg/ggobi/ for resource file. > A better place would be /usr/local/etc/xdg/ggobi/, I think. > What do you think? How could this be coded in the port? > Don't write into /etc, except in special cases. Use ${PREFIX}/etc instead. Also, do something like: post-install: ${MKDIR} /etc/xdg/ggobi ${INSTALL_DATA} ${WRKSRC}/ggobirc ${PREFIX}/etc/xdg/ggobi/ggobirc.sample In the pkg-plist, add ggobirc only if it does not already exist, and only remove ggobirc if it is identical to ggobirc.sample, to protect user-customized configuration files during re-installation: @unexec if cmp -s %D/etc/xdg/ggobi/ggobirc.sample %D/etc/xdg/ggobi/ggobirc; then rm -f %D/etc/dillo/dillorc; fi etc/xdg/ggobi/ggobirc.sample @exec if [ ! -f %B/ggobirc ]; then cp -p %D/%F %B/ggobirc; fi Here %D, %B, and %F are as defined in pkg_create(1). >5. When deinstalling, should we try to remove dirs share/applications > and etc/xdg? (Mostly they are used by other ports, too) Use, as many other ports do, @dirrmtry share/applications @dirrmtry etc/xdg Regards, b.