[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / glib2

File: [cvs.NetBSD.org] / pkgsrc / devel / glib2 / Makefile (download)

Revision 1.207, Wed Jul 11 23:07:06 2012 UTC (6 years, 8 months ago) by marino
Branch: MAIN
Changes since 1.206: +10 -2 lines

devel/glib2: Fix 32-bit SunOS

On a 32-bit OpenIndiana 151a machine, glib2 failed with the error:
"large files are not supported by libelf".

The glib2 makefile doesn't include libelf from pkgsrc, it uses the version
with the header at /usr/include/libelf.h.  Libelf will only support large
files (64 bits) with 64-bit versions of SunOS.

This change adds additional checks.  When the Makefile determines that the
package is building on a 32-bit SunOS, it will force the configure script
to define _FILE_OFFSET_BITS as 32 which allows glib2 to build completely.

No need to bump revision; it wouldn't have built on 32-bit SunOS before.

# $NetBSD: Makefile,v 1.207 2012/07/11 23:07:06 marino Exp $

.include "Makefile.common"
.include "options.mk"

PKGREVISION=		1

CATEGORIES=		devel

COMMENT=		Some useful routines for C programming (glib2)

USE_TOOLS+=		msgfmt perl:run

PKGCONFIG_OVERRIDE+=	glib-2.0.pc.in
PKGCONFIG_OVERRIDE+=	gmodule-2.0.pc.in
PKGCONFIG_OVERRIDE+=	gmodule-export-2.0.pc.in
PKGCONFIG_OVERRIDE+=	gmodule-no-export-2.0.pc.in
PKGCONFIG_OVERRIDE+=	gobject-2.0.pc.in
PKGCONFIG_OVERRIDE+=	gthread-2.0.pc.in
PKGCONFIG_OVERRIDE+=	gio-2.0.pc.in
PKGCONFIG_OVERRIDE+=	gio-unix-2.0.pc.in
PKGCONFIG_OVERRIDE+=	gio-windows-2.0.pc.in

FILES_SUBST+=		GIO_MODULES_DIR=${PREFIX}/lib/gio/modules
FILES_SUBST+=		GIO_QUERYMODULES=${PREFIX}/bin/gio-querymodules
FILES_SUBST+=		GLIB_COMPILE_SCHEMAS=${PREFIX}/bin/glib-compile-schemas
FILES_SUBST+=		GLIB_SCHEMAS_DIR=${PREFIX}/share/glib-2.0/schemas

# gtester is the glib unit testing and reporting framework
# agc doesn't want glib2 to depend on python so we install it
# in a broken and useless state.
CHECK_INTERPRETER_SKIP+=	bin/gtester-report
CHECK_INTERPRETER_SKIP+=	bin/gdbus-codegen

# need pcre utf8 + unicode-properties
BUILDLINK_API_DEPENDS.pcre+=	pcre>=8.11
# to avoid pkg-config dependency, explicitly specify pcre location
CONFIGURE_ARGS+=	PCRE_CFLAGS=-I${BUILDLINK_PREFIX.pcre}/include
CONFIGURE_ARGS+=	PCRE_LIBS="${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib -L${BUILDLINK_PREFIX.pcre}/lib -lpcre"

# needs gz_header structure
BUILDLINK_API_DEPENDS.zlib+=	zlib>=1.2.2.1

LIBS.SunOS+=		-lnsl -lsocket
CPPFLAGS.SunOS+=	-DBSD_COMP

.if ${OBJECT_FMT} == "ELF"
. if ${OPSYS} == "SunOS"
.  if ${MACHINE_ARCH} == "i386"
# _ILP32 Solaris machines emit "Large files are not supported by libelf" from
# /usr/include/libelf when _FILE_OFFSET_BITS=64, the value configure will set by itself
CONFIGURE_ARGS+=	ac_cv_sys_file_offset_bits=32
.  endif
. else
.include "../../devel/libelf/buildlink3.mk"
. endif
.endif

.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../devel/libffi/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"