Index: Makefile =================================================================== RCS file: /cvsroot/pkgsrc/devel/glib2/Makefile,v retrieving revision 1.207 diff -u -r1.207 Makefile --- Makefile 11 Jul 2012 23:07:06 -0000 1.207 +++ Makefile 12 Jul 2012 10:30:37 -0000 @@ -3,7 +3,7 @@ .include "Makefile.common" .include "options.mk" -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= devel @@ -46,10 +46,11 @@ .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" Index: distinfo =================================================================== RCS file: /cvsroot/pkgsrc/devel/glib2/distinfo,v retrieving revision 1.174 diff -u -r1.174 distinfo --- distinfo 22 May 2012 20:40:07 -0000 1.174 +++ distinfo 12 Jul 2012 10:30:37 -0000 @@ -38,5 +38,6 @@ 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 Index: patches/patch-gio_gresource-tool.c =================================================================== RCS file: patches/patch-gio_gresource-tool.c diff -N patches/patch-gio_gresource-tool.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-gio_gresource-tool.c 12 Jul 2012 10:30:37 -0000 @@ -0,0 +1,16 @@ +$NetBSD$ + +--- 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 + + #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 + #include + #include