Need help with new port math/ggobi

b. f. bf1783 at
Thu Jan 28 16:53:47 UTC 2010

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:

        ${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
@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



More information about the freebsd-ports mailing list