Commit a different fix for the Solaris 32-bit libelf problem. Disable

largefile support only in programs which depend upon libelf (currently just
gresource), rather than across the entirety of glib2.

Bump PKGREVISION.
This commit is contained in:
jperkin 2012-07-12 14:43:25 +00:00
parent 05665399c9
commit 314a39e354
3 changed files with 25 additions and 7 deletions

View file

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.207 2012/07/11 23:07:06 marino Exp $
# $NetBSD: Makefile,v 1.208 2012/07/12 14:43:25 jperkin Exp $
.include "Makefile.common"
.include "options.mk"
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= devel
@ -46,10 +46,11 @@ 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
. if ${ABI} == 32
# Solaris libelf in 32-bit mode does not support largefile. We patch files
# individually to force _FILE_OFFSET_BITS=32 but need to turn back on -lelf
# after configure disabled it.
CONFIGURE_ENV+= LIBELF_LIBS='-lelf'
. endif
. else
.include "../../devel/libelf/buildlink3.mk"

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.174 2012/05/22 20:40:07 jmmv Exp $
$NetBSD: distinfo,v 1.175 2012/07/12 14:43:25 jperkin Exp $
SHA1 (glib-2.32.3.tar.xz) = 429355327aaf69d2c21cbefcb20c61db94e0acec
RMD160 (glib-2.32.3.tar.xz) = 204ddce09d6622926c7b2d51b995f503ec18673e
@ -38,5 +38,6 @@ SHA1 (patch-cl) = 9c34ff58a44f2c8bf328807d1d1261765045028d
SHA1 (patch-cm) = 7f14ab327d021537714f876fbfbd4b0350d98a6e
SHA1 (patch-cn) = 7a2f42fc1199bfc3fd2ccbd2ed1c56a7f6c0028f
SHA1 (patch-co) = 146d7102970bd92beff382b7b8f0bb681e0b8520
SHA1 (patch-gio_gresource-tool.c) = 4eb7c9df25e9ac3e977edf3be8fb977a6fb39182
SHA1 (patch-glib_goption.c) = 323297aa328b85493f156792b4baa0cb04fa82ad
SHA1 (patch-glib_tests_include.c) = 95f7d34e6e03849316bbfac1541eec4582b92ffc

View file

@ -0,0 +1,16 @@
$NetBSD: patch-gio_gresource-tool.c,v 1.1 2012/07/12 14:43:26 jperkin Exp $
--- gio/gresource-tool.c.orig Thu Jul 12 09:13:01 2012
+++ gio/gresource-tool.c Thu Jul 12 09:13:06 2012
@@ -31,6 +31,11 @@
#include <locale.h>
#ifdef HAVE_LIBELF
+/* Solaris native libelf does not support largefile in 32-bit mode */
+# if defined(__sun) && defined(__i386)
+# undef _FILE_OFFSET_BITS
+# define _FILE_OFFSET_BITS 32
+# endif
#include <libelf.h>
#include <gelf.h>
#include <sys/mman.h>