Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Mar 2013 06:07:54 -0600
From:      Chris Torek <torek@torek.net>
To:        Koop Mast <kwm@rainbow-runner.nl>
Cc:        AN <andy@neu.net>, freebsd-ports@freebsd.org
Subject:   Re: Installing empathy-2.32.2_3...warning: undefined reference
Message-ID:  <201303131207.r2DC7sei079612@elf.torek.net>
In-Reply-To: <513CFC74.3020507@rainbow-runner.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 10, 2013 at 3:34 PM, Koop Mast <kwm@rainbow-runner.nl>
wrote:

> Thanks for the report, this is already known.  Sadly I haven't
> managed to find a solution for this :/
>
>     -Koop

The Makefile in net-im/empathy tries to build its included header
files using glib-mkenums, but it assumes they're in the current
directory and depend on Makefile.in.  When they are in
/usr/local/include/* (and Makefile.in is newer) it goes badly
awry.

This somewhat crude patch fixes the problem...

Chris

--- src/Makefile.in.orig
+++ src/Makefile.in
@@ -1689,22 +1689,4 @@
 	$(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
 
-# rules for making the glib enum objects
-%-enumtypes.h: %.h Makefile.in
-	$(AM_V_GEN)glib-mkenums \
-	--fhead "#ifndef __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n#define __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
-	--fprod "/* enumerations from \"@filename@\" */\n" \
-	--vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
-	--ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \
-	$< > $@
-
-%-enumtypes.c: %.h Makefile.in
-	$(AM_V_GEN)glib-mkenums \
-	--fhead "#include <$*.h>\n#include <$*-enumtypes.h>" \
-	--fprod "\n/* enumerations from \"@filename@\" */" \
-	--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"     \
-	--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
-	--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
-	$< > $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303131207.r2DC7sei079612>