Subject: pkg/30030: [PATCH] databases/shared-mime-info patches in defines never seen by the compiler
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <idart@performancedesign.no>
List: pkgsrc-bugs
Date: 04/22/2005 09:22:00
>Number:         30030
>Category:       pkg
>Synopsis:       [PATCH] databases/shared-mime-info patches in defines never seen by the compiler
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 22 09:22:00 +0000 2005
>Originator:     Idar Tollefsen
>Release:        N/A
>Organization:
Performance Design
>Environment:
Darwin fulcrum.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC  Power Macintosh powerpc
>Description:
databases/shared-mime-info/patch/patch-aa replaces a directory
variable in update-mime-database.c with a define to pkgsrc's PREFIX.
databases/shared-mime-info/Makefile then tries to define this variable
by adding the definition to CPPFLAGS as a -D flag.

databases/shared-mime-info uses intltool and the intltool override seems
to also override CPPFLAGS, so the definition is never propagated to the
command line and the build fails.



>How-To-Repeat:
Just try to build databases/shared-mime-info.
It is possible that the problem is platform specific.
If so, try to build databases/shared-mime-info on OS X.
>Fix:
Include intltool's buildlink.mk3 _before_ setting CPPFLAGS.

Here's the patch against databases/shared-mime-info/Makefile:
----------------------------------------------

--- Makefile.orig	Fri Apr 22 10:38:33 2005
+++ Makefile	Fri Apr 22 11:08:06 2005
@@ -18,6 +18,8 @@
 
 CONFIGURE_ARGS+=	--disable-update-mimedb
 
+.include "../../textproc/intltool/buildlink3.mk"
+
 CPPFLAGS+=		-DPREFIX="\"${PREFIX}\""
 
 INSTALL_EXTRA_TMPL+=	${.CURDIR}/INSTALL
@@ -34,6 +36,5 @@
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../devel/glib2/buildlink3.mk"
 .include "../../devel/pkgconfig/buildlink3.mk"
-.include "../../textproc/intltool/buildlink3.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"