summaryrefslogtreecommitdiff
path: root/devel/glib2/Makefile
diff options
context:
space:
mode:
authormarino <marino>2012-07-11 23:07:06 +0000
committermarino <marino>2012-07-11 23:07:06 +0000
commit3bb49907695ace6c69d2072214af28785e71a93e (patch)
tree5907165f70fc012934ba8de66192f46c01039866 /devel/glib2/Makefile
parent817a9c2f2000ee1a050b198a8f641eee5d0fce97 (diff)
downloadpkgsrc-3bb49907695ace6c69d2072214af28785e71a93e.tar.gz
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.
Diffstat (limited to 'devel/glib2/Makefile')
-rw-r--r--devel/glib2/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile
index 56889144117..30e006df8f0 100644
--- a/devel/glib2/Makefile
+++ b/devel/glib2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.206 2012/06/26 18:21:24 drochner Exp $
+# $NetBSD: Makefile,v 1.207 2012/07/11 23:07:06 marino Exp $
.include "Makefile.common"
.include "options.mk"
@@ -44,8 +44,16 @@ BUILDLINK_API_DEPENDS.zlib+= zlib>=1.2.2.1
LIBS.SunOS+= -lnsl -lsocket
CPPFLAGS.SunOS+= -DBSD_COMP
-.if ${OBJECT_FMT} == "ELF" && ${OPSYS} != "SunOS"
+.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"