update Tue Feb 23 12:37:00 PST 2010
[pkgsrc.git] / devel / glib2 / hacks.mk
1 # $NetBSD: hacks.mk,v 1.4 2008/09/05 15:33:01 tron Exp $
2
3 .if !defined(GLIB2_HACKS_MK)
4 GLIB2_HACKS_MK= # defined
5
6 # Build without optimization. Avoids crash in libgobject on gtk2
7 # initialization. Bug is triggered regardless of whether we're using gcc or
8 # aCC.
9 .  if !empty(MACHINE_PLATFORM:MHPUX-*-hppa)
10 PKG_HACKS+=     hppa-codegen
11 CFLAGS:=        -O0 ${CFLAGS:C/[+,-]O[0-9]?//g}
12 .  endif
13
14 # "glib2" supports support for Universal Binaries. But a lot of packages
15 # using it (e.g. "gtk2+") don't support it. We therefore disable it.
16
17 .  if ${OPSYS} == "Darwin"
18 PKG_HACKS+=     darwin-no-universal
19 .    if ${MACHINE_ARCH} == "powerpc"
20 CONFIGURE_ENV+= ac_cv_c_bigendian=yes
21 .    else
22 CONFIGURE_ENV+= ac_cv_c_bigendian=no
23 .    endif
24 .  endif
25
26 # Work around unresolved symbol g_test_config_vars during build
27 .include "../../mk/compiler.mk"
28 .  if !empty(PKGSRC_COMPILER:Msunpro)
29 PKG_HACKS+=             sunpro-visibility
30 CONFIGURE_ARGS+=        --disable-visibility
31 .  endif
32
33 .endif