third-party shared-mime-info installation

Joe Marcus Clarke marcus at marcuscom.com
Thu Jun 24 15:11:45 PDT 2004


On Wed, 2004-06-23 at 08:33, Pav Lucistnik wrote:
> Hi,
> 
> one of my ports is installing his own data to shared-mime-info database.
> The problem is that the port is installing under /usr/X11R6 (it's a
> GNOME app), but the mime database is in /usr/local/share/mime.
> 
> What's the preferred way to handle this? Let the port install files out
> of it's prefix, or should we hack shared-mime-info to look to maintain
> two databases (one in /usr/local, second in /usr/X11R6)?

Give these patches a shot.  They should effectively allow for databases
in LOCALBASE and X11BASE (much like the way pkg-config works).  Too bad
the xdgmime code isn't its own shared library...

Joe

> 
> 
> Index: Makefile
> ===================================================================
> RCS file: /home/pcvs/ports/science/gchempaint/Makefile,v
> retrieving revision 1.16
> diff -a -u -r1.16 Makefile
> --- Makefile	29 May 2004 11:48:19 -0000	1.16
> +++ Makefile	23 Jun 2004 12:27:34 -0000
> @@ -5,7 +5,7 @@
>  # $FreeBSD: ports/science/gchempaint/Makefile,v 1.16 2004/05/29 11:48:19 pav Exp $
>  
>  PORTNAME=	gchempaint
> -PORTVERSION=	0.4.4
> +PORTVERSION=	0.4.5
>  CATEGORIES=	science
>  MASTER_SITES=	${MASTER_SITE_SAVANNAH}
>  MASTER_SITE_SUBDIR=	${PORTNAME}
> @@ -20,6 +20,11 @@
>  USE_GNOME=	gnomehack gnomeprefix intlhack libgnomeprintui libgnomeui lthack
>  USE_GMAKE=	yes
>  USE_LIBTOOL_VER=13
> +USE_REINPLACE=	yes
>  CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" LIBS="-L${LOCALBASE}/lib"
> +
> +post-patch:
> +	@${REINPLACE_CMD} -e 's|$$(datadir)/mime/|${LOCALBASE}/share/mime/|' ${WRKSRC}/Makefile.in
> +	@${REINPLACE_CMD} -e 's|$$(datadir)/mime$$|${LOCALBASE}/share/mime|' ${WRKSRC}/Makefile.in
>  
>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /home/pcvs/ports/science/gchempaint/distinfo,v
> retrieving revision 1.10
> diff -a -u -r1.10 distinfo
> --- distinfo	29 May 2004 11:48:19 -0000	1.10
> +++ distinfo	23 Jun 2004 12:27:34 -0000
> @@ -1,2 +1,2 @@
> -MD5 (gchempaint-0.4.4.tar.bz2) = 1d877cff475eda565e8db4a67f4f7c02
> -SIZE (gchempaint-0.4.4.tar.bz2) = 619320
> +MD5 (gchempaint-0.4.5.tar.bz2) = b074f844b044868ee999eaaf680ba975
> +SIZE (gchempaint-0.4.5.tar.bz2) = 622075
> Index: pkg-plist
> ===================================================================
> RCS file: /home/pcvs/ports/science/gchempaint/pkg-plist,v
> retrieving revision 1.7
> diff -a -u -r1.7 pkg-plist
> --- pkg-plist	11 Mar 2004 22:28:20 -0000	1.7
> +++ pkg-plist	23 Jun 2004 12:27:34 -0000
> @@ -69,3 +69,8 @@
>  @dirrm share/gnome/help/gchempaint
>  @dirrm share/gnome/omf/gchempaint
>  @unexec scrollkeeper-uninstall -q %D/share/gnome/omf/gchempaint/gchempaint-C.omf 2>/dev/null || /usr/bin/true
> + at cwd %%LOCALBASE%%
> +share/mime/application/x-gchempaint.xml
> +share/mime/packages/gchempaint.xml
> + at exec update-mime-database %%LOCALBASE%%/share/mime
> + at unexec update-mime-database %%LOCALBASE%%/share/mime
-- 
PGP Key : http://www.marcuscom.com/pgp.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnomevfs2.diff
Type: text/x-patch
Size: 1553 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-gnome/attachments/20040625/bf7b2e98/gnomevfs2.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gtk20.diff
Type: text/x-patch
Size: 1368 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-gnome/attachments/20040625/bf7b2e98/gtk20.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shared-mime-info.diff
Type: text/x-patch
Size: 1668 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-gnome/attachments/20040625/bf7b2e98/shared-mime-info.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-gnome/attachments/20040625/bf7b2e98/attachment.bin


More information about the freebsd-gnome mailing list