We do support monotonic clock, so patch accordingly.
Set correct mix/max thread priorities. Remove an obvious comment. ok landry@ jasper@
This commit is contained in:
parent
e8256cbbb1
commit
16f4a95279
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: Makefile,v 1.91 2010/08/31 07:04:12 ajacoutot Exp $
|
# $OpenBSD: Makefile,v 1.92 2010/09/24 16:20:40 ajacoutot Exp $
|
||||||
|
|
||||||
COMMENT-main= general-purpose utility library
|
COMMENT-main= general-purpose utility library
|
||||||
COMMENT-docs= glib2 documentation
|
COMMENT-docs= glib2 documentation
|
||||||
@ -8,7 +8,7 @@ DISTNAME= glib-${VERSION}
|
|||||||
PKGNAME-main= glib2-${VERSION}
|
PKGNAME-main= glib2-${VERSION}
|
||||||
PKGNAME-docs= glib2-docs-${VERSION}
|
PKGNAME-docs= glib2-docs-${VERSION}
|
||||||
|
|
||||||
REVISION-main= 1
|
REVISION-main= 2
|
||||||
|
|
||||||
CATEGORIES= devel
|
CATEGORIES= devel
|
||||||
|
|
||||||
@ -57,10 +57,10 @@ CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
|
|||||||
--disable-selinux \
|
--disable-selinux \
|
||||||
--disable-xattr \
|
--disable-xattr \
|
||||||
--disable-silent-rules
|
--disable-silent-rules
|
||||||
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include \
|
||||||
|
-D_POSIX_MONOTONIC_CLOCK=200112L" \
|
||||||
LDFLAGS="-L${LOCALBASE}/lib -pthread"
|
LDFLAGS="-L${LOCALBASE}/lib -pthread"
|
||||||
|
|
||||||
# don't hardcode (+fix) paths
|
|
||||||
pre-configure:
|
pre-configure:
|
||||||
perl -pi -e "s,/usr/local,${LOCALBASE},g;" \
|
perl -pi -e "s,/usr/local,${LOCALBASE},g;" \
|
||||||
-e "s,/usr/share,${LOCALBASE}/share,g;" \
|
-e "s,/usr/share,${LOCALBASE}/share,g;" \
|
||||||
|
22
devel/glib2/patches/patch-configure
Normal file
22
devel/glib2/patches/patch-configure
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
$OpenBSD: patch-configure,v 1.23 2010/09/24 16:20:40 ajacoutot Exp $
|
||||||
|
|
||||||
|
OpenBSD does not have sched_get_priority_{max,min}.
|
||||||
|
|
||||||
|
--- configure.orig Fri Sep 24 16:23:49 2010
|
||||||
|
+++ configure Fri Sep 24 16:24:38 2010
|
||||||
|
@@ -25883,6 +25883,15 @@ $as_echo "$glib_result" >&6; }
|
||||||
|
posix_priority_min="sched_get_priority_min(SCHED_OTHER)"
|
||||||
|
posix_priority_max="sched_get_priority_max(SCHED_OTHER)"
|
||||||
|
break
|
||||||
|
+ else
|
||||||
|
+ case $build_os in
|
||||||
|
+ openbsd*)
|
||||||
|
+ G_THREAD_LIBS="$G_THREAD_LIBS $add_thread_lib"
|
||||||
|
+ posix_priority_min=0
|
||||||
|
+ posix_priority_max=31
|
||||||
|
+ break
|
||||||
|
+ ;;
|
||||||
|
+ esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
LIBS="$glib_save_LIBS"
|
22
devel/glib2/patches/patch-gthread_gthread-posix_c
Normal file
22
devel/glib2/patches/patch-gthread_gthread-posix_c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
$OpenBSD: patch-gthread_gthread-posix_c,v 1.1 2010/09/24 16:20:40 ajacoutot Exp $
|
||||||
|
--- gthread/gthread-posix.c.orig Fri Sep 24 17:51:34 2010
|
||||||
|
+++ gthread/gthread-posix.c Fri Sep 24 17:54:33 2010
|
||||||
|
@@ -148,10 +148,18 @@ g_thread_impl_init(void)
|
||||||
|
#endif /* HAVE_PRIORITIES */
|
||||||
|
|
||||||
|
#ifdef USE_CLOCK_GETTIME
|
||||||
|
+# if defined(__OpenBSD__)
|
||||||
|
+ /*
|
||||||
|
+ OpenBSD has support for monotonic clock but does not has the
|
||||||
|
+ sysconf(3) _SC_MONOTONIC_CLOCK define
|
||||||
|
+ */
|
||||||
|
+ posix_clock = CLOCK_MONOTONIC;
|
||||||
|
+# else
|
||||||
|
if (sysconf (_SC_MONOTONIC_CLOCK) >= 0)
|
||||||
|
posix_clock = CLOCK_MONOTONIC;
|
||||||
|
else
|
||||||
|
posix_clock = CLOCK_REALTIME;
|
||||||
|
+# endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif /* _SC_THREAD_STACK_MIN || HAVE_PRIORITIES */
|
Loading…
x
Reference in New Issue
Block a user