diff options
author | jperkin <jperkin@pkgsrc.org> | 2019-11-26 10:27:09 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2019-11-26 10:27:09 +0000 |
commit | c0c10012f83bc9a3d40e5c0f5b5ed70156e7cc6f (patch) | |
tree | 2fceedb32d5e4dd4039be7e54218faa1ee80cacb | |
parent | ffa762b1b409c614cb0403705498fc84a6a10c5c (diff) | |
download | pkgsrc-c0c10012f83bc9a3d40e5c0f5b5ed70156e7cc6f.tar.gz |
glib2: Various fixes for the SunOS build.
Should also fix a bunch of other platforms, the build tries to execute a python
script that is not executable after unpacking the distfile, though not sure why
that's not showing up on some other bulk builds.
-rw-r--r-- | devel/glib2/Makefile | 7 | ||||
-rw-r--r-- | devel/glib2/distinfo | 7 | ||||
-rw-r--r-- | devel/glib2/patches/patch-glib_gmain.c | 26 | ||||
-rw-r--r-- | devel/glib2/patches/patch-glib_meson.build | 14 | ||||
-rw-r--r-- | devel/glib2/patches/patch-glib_tests_include.c | 17 |
5 files changed, 45 insertions, 26 deletions
diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile index b5ec3d819c3..4e90428e668 100644 --- a/devel/glib2/Makefile +++ b/devel/glib2/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.263 2019/11/14 11:40:30 wiz Exp $ +# $NetBSD: Makefile,v 1.264 2019/11/26 10:27:09 jperkin Exp $ .include "Makefile.common" @@ -13,7 +13,7 @@ MESON_ARGS+= -Dlibmount=false MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}/output/gio:${WRKSRC}/output/glib:${WRKSRC}/output/gobject:${WRKSRC}/output/gmodule -LDFLAGS.SunOS+= -lintl -lnsl +LDFLAGS.SunOS+= -liconv -lintl -lnsl -lsocket REPLACE_PYTHON+= gio/gio-querymodules-wrapper.py REPLACE_PYTHON+= gio/tests/gengiotypefuncs.py @@ -62,6 +62,9 @@ PKGCONFIG_OVERRIDE_STAGE= post-configure TOOL_DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat PYTHON_FOR_BUILD_ONLY= yes +post-extract: + ${CHMOD} +x ${WRKSRC}/gio/tests/gengiotypefuncs.py + .include "../../converters/libiconv/buildlink3.mk" .include "../../devel/gettext-lib/buildlink3.mk" .include "../../devel/pcre/buildlink3.mk" diff --git a/devel/glib2/distinfo b/devel/glib2/distinfo index 06402262831..6633af5cd64 100644 --- a/devel/glib2/distinfo +++ b/devel/glib2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.258 2019/11/14 12:26:05 ryoon Exp $ +$NetBSD: distinfo,v 1.259 2019/11/26 10:27:09 jperkin Exp $ SHA1 (glib-2.62.2.tar.xz) = b2a4e6eea3132b4c8393c2f570711131ed960b73 RMD160 (glib-2.62.2.tar.xz) = 4a2cb690579c755de38125081879633e739a3820 @@ -16,10 +16,11 @@ SHA1 (patch-gio_tests_gdbus-export.c) = 59d85ca079d02b52e33153c7d2ac1cc48c26707a SHA1 (patch-glib_gatomic.c) = 875ad9c828dcf2add356d4988d14fb4f1985aef8 SHA1 (patch-glib_gatomic.h) = 21294cac483c3379198283c54fe6e24af3e630b1 SHA1 (patch-glib_glibconfig.h.in) = 1964b5fb15317e681dad426d4862e3f48c4274f7 -SHA1 (patch-glib_gmain.c) = 2ab4b59e438d9f764bee62e0c1fa8bbd231b6e8d +SHA1 (patch-glib_gmain.c) = b361e4f7fa285c1d9317468c2b1be390e8190e8b SHA1 (patch-glib_gtypes.h) = a659b770c55a8071a6e6afd8a9fccdf723e086e6 -SHA1 (patch-glib_meson.build) = f7990bc0a37c0d14437c7bbd44b1e60dd1f8245e +SHA1 (patch-glib_meson.build) = bc429f6537c6dd5fa99137c35c0627a97d48a850 SHA1 (patch-glib_tests_hash.c) = e928b22926ad917a7a201882a5105b25533554ae +SHA1 (patch-glib_tests_include.c) = 12d98caebfb87c1146821d518c37c45f97fc7be0 SHA1 (patch-glib_tests_meson.build) = d012ede92bd3202bde4e8fab9cf4c0ee9ca8d3d4 SHA1 (patch-gmodule_gmodule-ar.c) = e382a0ada232e083d51cbede7f689a50ebeff4d8 SHA1 (patch-gmodule_gmodule-dl.c) = b678a04debbc79ebb67d91db7716990658e76da4 diff --git a/devel/glib2/patches/patch-glib_gmain.c b/devel/glib2/patches/patch-glib_gmain.c index 7c9c7d6d834..2a48df38f4c 100644 --- a/devel/glib2/patches/patch-glib_gmain.c +++ b/devel/glib2/patches/patch-glib_gmain.c @@ -1,4 +1,4 @@ -$NetBSD: patch-glib_gmain.c,v 1.2 2019/06/03 09:53:50 prlw1 Exp $ +$NetBSD: patch-glib_gmain.c,v 1.3 2019/11/26 10:27:09 jperkin Exp $ Imported patch from the upstream Bugzilla: @@ -7,9 +7,9 @@ Imported patch from the upstream Bugzilla: Tested on powerpc-apple-darwin9. ---- glib/gmain.c.orig 2014-11-09 21:54:26.000000000 +0000 +--- glib/gmain.c.orig 2019-10-21 17:18:40.000000000 +0000 +++ glib/gmain.c -@@ -2694,47 +2694,31 @@ g_get_monotonic_time (void) +@@ -2758,47 +2758,31 @@ g_get_monotonic_time (void) gint64 g_get_monotonic_time (void) { @@ -27,13 +27,20 @@ Tested on powerpc-apple-darwin9. - * picoseconds. Try to deal nicely with that. - */ - mach_timebase_info (&timebase_info); -- ++ /* we get nanoseconds from mach_absolute_time() using timebase_info */ ++ mach_timebase_info (&timebase_info); ++ val = mach_absolute_time(); + - /* We actually want microseconds... */ - if (timebase_info.numer % 1000 == 0) - timebase_info.numer /= 1000; - else - timebase_info.denom *= 1000; -- ++ if (timebase_info.numer != timebase_info.denom) ++ { ++ guint64 t_high, t_low; ++ guint64 result_high, result_low; + - /* We want to make the numer 1 to avoid having to multiply... */ - if (timebase_info.denom % timebase_info.numer == 0) - { @@ -53,15 +60,6 @@ Tested on powerpc-apple-darwin9. - g_error ("Got weird mach timebase info of %d/%d. Please file a bug against GLib.", - timebase_info.numer, timebase_info.denom); - } -+ /* we get nanoseconds from mach_absolute_time() using timebase_info */ -+ mach_timebase_info (&timebase_info); -+ val = mach_absolute_time(); -+ -+ if (timebase_info.numer != timebase_info.denom) -+ { -+ guint64 t_high, t_low; -+ guint64 result_high, result_low; -+ + /* 64 bit x 32 bit / 32 bit with 96-bit intermediate + * algorithm lifted from qemu */ + t_low = (val & 0xffffffffLL) * (guint64)timebase_info.numer; diff --git a/devel/glib2/patches/patch-glib_meson.build b/devel/glib2/patches/patch-glib_meson.build index ec2677bdc3f..091907fa1d8 100644 --- a/devel/glib2/patches/patch-glib_meson.build +++ b/devel/glib2/patches/patch-glib_meson.build @@ -1,10 +1,10 @@ -$NetBSD: patch-glib_meson.build,v 1.5 2019/11/14 11:40:30 wiz Exp $ +$NetBSD: patch-glib_meson.build,v 1.6 2019/11/26 10:27:09 jperkin Exp $ - On Darwin, allow building without Cocoa. - Don't bother with gtester as it's slated for deprecation anyway: https://gitlab.gnome.org/GNOME/glib/issues/1441 ---- glib/meson.build.orig 2019-10-04 11:44:24.000000000 +0000 +--- glib/meson.build.orig 2019-10-21 17:18:40.000000000 +0000 +++ glib/meson.build @@ -316,7 +316,7 @@ else platform_deps = [] @@ -15,7 +15,7 @@ $NetBSD: patch-glib_meson.build,v 1.5 2019/11/14 11:40:30 wiz Exp $ glib_sources += files('gosxutils.m') endif -@@ -410,25 +410,8 @@ if host_system == 'windows' +@@ -410,24 +410,7 @@ if host_system == 'windows' include_directories : configinc, dependencies : [libglib_dep]) endif @@ -25,8 +25,8 @@ $NetBSD: patch-glib_meson.build,v 1.5 2019/11/14 11:40:30 wiz Exp $ - c_args : ['-UG_DISABLE_ASSERT'], - include_directories : configinc, - dependencies : [libglib_dep]) - endif - +-endif +- -report_conf = configuration_data() -report_conf.set('GLIB_VERSION', glib_version) -report_conf.set('PYTHON', python_name) @@ -37,7 +37,7 @@ $NetBSD: patch-glib_meson.build,v 1.5 2019/11/14 11:40:30 wiz Exp $ - configuration: report_conf, - install_mode: 'rwxr-xr-x' -) -- ++endif + install_data('glib_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb')) - gdb_conf = configuration_data() diff --git a/devel/glib2/patches/patch-glib_tests_include.c b/devel/glib2/patches/patch-glib_tests_include.c new file mode 100644 index 00000000000..9861ed9c088 --- /dev/null +++ b/devel/glib2/patches/patch-glib_tests_include.c @@ -0,0 +1,17 @@ +$NetBSD: patch-glib_tests_include.c,v 1.3 2019/11/26 10:27:09 jperkin Exp $ + +Fix SunOS build. + +--- glib/tests/include.c.orig 2019-10-21 17:18:40.000000000 +0000 ++++ glib/tests/include.c +@@ -1,8 +1,10 @@ + /* Test case for bug 659866 */ + ++#ifndef __sun + #define _POSIX_C_SOURCE 199309L + #undef _GNU_SOURCE + #undef _XOPEN_SOURCE ++#endif + #include <pthread.h> + #include <glib.h> + |