pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/glib2 glib2: fix build on sunos.
details: https://anonhg.NetBSD.org/pkgsrc/rev/ecfcb4bb1418
branches: trunk
changeset: 334725:ecfcb4bb1418
user: maya <maya%pkgsrc.org@localhost>
date: Mon Jun 03 21:24:04 2019 +0000
description:
glib2: fix build on sunos.
- Default to a newer POSIX, since we build this package with -std=gnu99
- Link against libnsl and libintl
- Don't use mnt_opt
- XXX who else uses this case in gunixmounts.c?
- include <sys/filio.h> for FIONREAD.
- Auto-detect GNU iconv.
- Don't fail if getxattr is not available. The code is already ready
for this case with some small configure changes.
diffstat:
devel/glib2/Makefile | 4 +-
devel/glib2/distinfo | 7 +-
devel/glib2/patches/patch-gio_gunixmounts.c | 17 +++++
devel/glib2/patches/patch-gio_inotify_inotify-kernel.c | 11 ++-
devel/glib2/patches/patch-meson.build | 61 +++++++++++++++++-
5 files changed, 91 insertions(+), 9 deletions(-)
diffs (173 lines):
diff -r 99389854874d -r ecfcb4bb1418 devel/glib2/Makefile
--- a/devel/glib2/Makefile Mon Jun 03 20:40:02 2019 +0000
+++ b/devel/glib2/Makefile Mon Jun 03 21:24:04 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.246 2019/06/03 09:53:50 prlw1 Exp $
+# $NetBSD: Makefile,v 1.247 2019/06/03 21:24:04 maya Exp $
.include "Makefile.common"
@@ -14,6 +14,8 @@
# Avoid linux dependency on libmount-dev
MESON_ARGS+= -Dlibmount=false
+LDFLAGS.SunOS+= -lintl -lnsl
+
REPLACE_PYTHON+= gio/gio-querymodules-wrapper.py
REPLACE_PYTHON+= gio/tests/gengiotypefuncs.py
REPLACE_PYTHON+= gio/tests/static-link.py
diff -r 99389854874d -r ecfcb4bb1418 devel/glib2/distinfo
--- a/devel/glib2/distinfo Mon Jun 03 20:40:02 2019 +0000
+++ b/devel/glib2/distinfo Mon Jun 03 21:24:04 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.238 2019/06/03 09:53:50 prlw1 Exp $
+$NetBSD: distinfo,v 1.239 2019/06/03 21:24:04 maya Exp $
SHA1 (glib-2.60.2.tar.xz) = 8aa8586f0b1fd13c2717adf7ac3e6427bee651b6
RMD160 (glib-2.60.2.tar.xz) = 8d18a8e4b43071afc35762eff3618a88a7112f57
@@ -10,7 +10,8 @@
SHA1 (patch-gio_glocalfileinfo.c) = 8e0b7e9543ce3c702c468f56e7ecf418d70b049f
SHA1 (patch-gio_gresource-tool.c) = ad0e59f48f5f98ea66be568dbe2e5a5d1ac602fc
SHA1 (patch-gio_gunixcredentialsmessage.c) = c13119ddd6262db7c03e53857e987f0c495d3312
-SHA1 (patch-gio_inotify_inotify-kernel.c) = 18fc55be06dfa4ebf7128b8d1888aaff3b2b95c0
+SHA1 (patch-gio_gunixmounts.c) = bce5aaa9778b7044aebe588d12068202682c5feb
+SHA1 (patch-gio_inotify_inotify-kernel.c) = ee931a707c7685a91e52eba1300405dfdb647b0c
SHA1 (patch-gio_meson.build) = 5983ff37da260558d0f367feed75d4c0ed1bd6fd
SHA1 (patch-glib_gmain.c) = 2ab4b59e438d9f764bee62e0c1fa8bbd231b6e8d
SHA1 (patch-glib_meson.build) = 477cbc2324a81bb2a406487daef71cfc2140719c
@@ -21,4 +22,4 @@
SHA1 (patch-gmodule_gmodule.c) = 55c5f9d16e3517f3fdc04d40922f50d9c66b0b9a
SHA1 (patch-gobject_glib-mkenums.in) = c177cf9b1ea81542665240678f47f68351a3760d
SHA1 (patch-gobject_meson.build) = 5e7c8508dbc228d01960e563bdba40cbf10db489
-SHA1 (patch-meson.build) = f4731d32655f0b4b28cc0dddc4d553c65e857385
+SHA1 (patch-meson.build) = 7c7de85d2dc91ac835d80d76c23330c3e0ab3555
diff -r 99389854874d -r ecfcb4bb1418 devel/glib2/patches/patch-gio_gunixmounts.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/glib2/patches/patch-gio_gunixmounts.c Mon Jun 03 21:24:04 2019 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-gio_gunixmounts.c,v 1.3 2019/06/03 21:24:04 maya Exp $
+
+SunOS has sys/mntent.h but no mnt_opts.
+XXX who else uses the sys/mntent.h case?
+
+--- gio/gunixmounts.c.orig 2019-05-03 13:43:28.000000000 +0000
++++ gio/gunixmounts.c
+@@ -736,7 +736,7 @@ _g_get_unix_mounts (void)
+ mntent.mnt_mountp,
+ NULL,
+ mntent.mnt_fstype,
+- mntent.mnt_opts,
++ NULL/*mntent.mnt_opts*/,
+ is_read_only);
+
+ return_list = g_list_prepend (return_list, mount_entry);
+
diff -r 99389854874d -r ecfcb4bb1418 devel/glib2/patches/patch-gio_inotify_inotify-kernel.c
--- a/devel/glib2/patches/patch-gio_inotify_inotify-kernel.c Mon Jun 03 20:40:02 2019 +0000
+++ b/devel/glib2/patches/patch-gio_inotify_inotify-kernel.c Mon Jun 03 21:24:04 2019 +0000
@@ -1,10 +1,17 @@
-$NetBSD: patch-gio_inotify_inotify-kernel.c,v 1.1 2016/04/13 10:13:43 jperkin Exp $
+$NetBSD: patch-gio_inotify_inotify-kernel.c,v 1.2 2019/06/03 21:24:04 maya Exp $
Use _XOPEN_NAME_MAX in lieu of NAME_MAX for SunOS.
+Include <sys/filio.h> for FIONREAD on SunOS.
--- gio/inotify/inotify-kernel.c.orig 2016-02-23 22:25:36.000000000 +0000
+++ gio/inotify/inotify-kernel.c
-@@ -36,6 +36,9 @@
+@@ -30,11 +30,15 @@
+ #include <glib.h>
+ #include "inotify-kernel.h"
+ #include <sys/inotify.h>
++#include <sys/filio.h>
+ #include <glib/glib-unix.h>
+
#include "glib-private.h"
/* From inotify(7) */
diff -r 99389854874d -r ecfcb4bb1418 devel/glib2/patches/patch-meson.build
--- a/devel/glib2/patches/patch-meson.build Mon Jun 03 20:40:02 2019 +0000
+++ b/devel/glib2/patches/patch-meson.build Mon Jun 03 21:24:04 2019 +0000
@@ -1,12 +1,58 @@
-$NetBSD: patch-meson.build,v 1.1 2019/06/03 09:53:50 prlw1 Exp $
+$NetBSD: patch-meson.build,v 1.2 2019/06/03 21:24:04 maya Exp $
- Don't insist that python binary is called "python3".
(Requires meson >= 0.50.0)
- Don't install bash completion scripts.
+- Tolerate getxattr not existing (smartOS)
+- Define a newer POSIX, as we build this package with -std=gnu99
+- auto-detect GNU iconv, even if no arguments are passed.
+ (by checking if iconv.h might in fact be a gnu one)
--- meson.build.orig 2019-05-03 13:43:28.000000000 +0000
+++ meson.build
-@@ -1886,9 +1886,11 @@ elif meson.get_cross_property('have_strl
+@@ -1696,14 +1696,14 @@ else
+ found_iconv = false
+ if iconv_opt == 'libc'
+ if cc.has_function('iconv_open')
+- libiconv = []
+- found_iconv = true
+- endif
+- elif iconv_opt == 'gnu'
+- if cc.has_header_symbol('iconv.h', 'libiconv_open')
+- glib_conf.set('USE_LIBICONV_GNU', true)
+- libiconv = [cc.find_library('iconv')]
+- found_iconv = true
++ if cc.has_header_symbol('iconv.h', 'libiconv_open')
++ glib_conf.set('USE_LIBICONV_GNU', true)
++ libiconv = [cc.find_library('iconv')]
++ found_iconv = true
++ else
++ libiconv = []
++ found_iconv = true
++ endif
+ endif
+ elif iconv_opt == 'native'
+ if cc.has_header_symbol('iconv.h', 'iconv_open')
+@@ -1836,16 +1836,15 @@ if host_system != 'windows' and get_opti
+ if cc.has_function('getxattr') and cc.has_header('sys/xattr.h')
+ glib_conf.set('HAVE_SYS_XATTR_H', 1)
+ glib_conf_prefix = glib_conf_prefix + '#define @0@ 1\n'.format('HAVE_SYS_XATTR_H')
++ glib_conf.set('HAVE_XATTR', 1)
+ #failure. try libattr
+ elif cc.has_header_symbol('attr/xattr.h', 'getxattr')
+ glib_conf.set('HAVE_ATTR_XATTR_H', 1)
+ glib_conf_prefix = glib_conf_prefix + '#define @0@ 1\n'.format('HAVE_ATTR_XATTR_H')
+ xattr_dep = [cc.find_library('xattr')]
+- else
+- error('No getxattr implementation found in C library or libxattr')
++ glib_conf.set('HAVE_XATTR', 1)
+ endif
+
+- glib_conf.set('HAVE_XATTR', 1)
+ if cc.compiles(glib_conf_prefix + '''
+ #include <stdio.h>
+ #ifdef HAVE_SYS_TYPES_H
+@@ -1886,9 +1885,11 @@ elif meson.get_cross_property('have_strl
glib_conf.set('HAVE_STRLCPY', 1)
endif
@@ -21,7 +67,7 @@
python_version = python.language_version()
python_version_req = '>=3.4'
-@@ -1897,7 +1899,7 @@ if not python_version.version_compare(py
+@@ -1897,7 +1898,7 @@ if not python_version.version_compare(py
endif
# Determine which user environment-dependent files that we want to install
@@ -30,3 +76,12 @@
have_sh = find_program('sh', required : false).found() # For glib-gettextize
# Some installed tests require a custom environment
+@@ -1906,7 +1907,7 @@ env_program = find_program('env', requir
+ # FIXME: How to detect Solaris? https://github.com/mesonbuild/meson/issues/1578
+ if host_system == 'sunos'
+ glib_conf.set('_XOPEN_SOURCE_EXTENDED', 1)
+- glib_conf.set('_XOPEN_SOURCE', 2)
++ glib_conf.set('_POSIX_C_SOURCE',200809)
+ glib_conf.set('__EXTENSIONS__',1)
+ endif
+
Home |
Main Index |
Thread Index |
Old Index