Update to gtk+3-3.2.1.
While here, move away from kvm(3) to use sysctl(3) instead and don't link to libkvm anymore. inputs and ok robert@ jmatthew@
This commit is contained in:
parent
6af9b14242
commit
0fcc916d16
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.24 2011/10/03 07:13:50 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.25 2011/10/15 12:03:52 ajacoutot Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -6,7 +6,7 @@ COMMENT-main= multi-platform graphical toolkit
|
||||
COMMENT-docs= gtk+3 documentation
|
||||
COMMENT-cups= gtk+3 CUPS print backend
|
||||
|
||||
V= 3.2.0
|
||||
V= 3.2.1
|
||||
DISTNAME= gtk+-${V}
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
|
||||
@ -14,8 +14,6 @@ PKGNAME-main= gtk+3-${V}
|
||||
PKGNAME-docs= gtk+3-docs-${V}
|
||||
PKGNAME-cups= gtk+3-cups-${V}
|
||||
|
||||
REVISION-main= 1
|
||||
|
||||
CATEGORIES= x11 devel
|
||||
|
||||
SHARED_LIBS += gdk-3 1.0 # 192.0
|
||||
@ -32,12 +30,12 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB += X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes Xi
|
||||
WANTLIB += Xinerama Xrandr Xrender cairo expat fontconfig freetype
|
||||
WANTLIB += gthread-2.0 m pcre pixman-1 pthread-stubs xcb gio-2.0
|
||||
WANTLIB += xcb-render z gdk_pixbuf-2.0 GL Xxf86vm drm xcb-shm png
|
||||
WANTLIB += gmodule-2.0 gobject-2.0 atk-1.0 cairo-gobject glib-2.0
|
||||
WANTLIB += pango-1.0 pangocairo-1.0 pangoft2-1.0 ffi kvm
|
||||
WANTLIB += GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
|
||||
WANTLIB += Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0 cairo cairo-gobject
|
||||
WANTLIB += drm expat ffi fontconfig freetype gdk_pixbuf-2.0 gio-2.0
|
||||
WANTLIB += glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 m pango-1.0
|
||||
WANTLIB += pangocairo-1.0 pangoft2-1.0 pcre pixman-1 png pthread-stubs
|
||||
WANTLIB += xcb xcb-render xcb-shm z
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gtk+/${V:C/^([0-9]+\.[0-9]+).*/\1/}/}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (gtk+-3.2.0.tar.xz) = T5gW80Nv+ju4heFDVLH9bA==
|
||||
RMD160 (gtk+-3.2.0.tar.xz) = dTHEfzQeZcHRgW6cqRVISw++20U=
|
||||
SHA1 (gtk+-3.2.0.tar.xz) = cenoICgugL9d4YcSEklpJjY4TkM=
|
||||
SHA256 (gtk+-3.2.0.tar.xz) = vOPBqb5q/XVSx5UmhlbY/dCcKZdlp/qvWnZJi7gu1Ew=
|
||||
SIZE (gtk+-3.2.0.tar.xz) = 12675824
|
||||
MD5 (gtk+-3.2.1.tar.xz) = Z6Se8sA75H4ra5iMjow5LQ==
|
||||
RMD160 (gtk+-3.2.1.tar.xz) = OPYeiIG13RIwrq/swBz6RWKbxu8=
|
||||
SHA1 (gtk+-3.2.1.tar.xz) = fz/qpukie/ySR9WP00lixnd1BZE=
|
||||
SHA256 (gtk+-3.2.1.tar.xz) = 8ZifGDcAzV9GaBz6vCJT4vUmsZtW5LYx3O4llN3bDvM=
|
||||
SIZE (gtk+-3.2.1.tar.xz) = 12664740
|
||||
|
@ -1,10 +1,22 @@
|
||||
$OpenBSD: patch-configure,v 1.7 2011/09/26 07:14:49 ajacoutot Exp $
|
||||
$OpenBSD: patch-configure,v 1.8 2011/10/15 12:03:52 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=661835
|
||||
|
||||
Do not force enable_man to yes.
|
||||
|
||||
--- configure.orig Mon Sep 26 03:14:08 2011
|
||||
+++ configure Mon Sep 26 08:45:36 2011
|
||||
@@ -24580,7 +24580,7 @@ fi
|
||||
--- configure.orig Fri Oct 14 18:38:50 2011
|
||||
+++ configure Sat Oct 15 08:30:40 2011
|
||||
@@ -23153,9 +23153,6 @@ if test "x$enable_x11_backend" = xyes; then
|
||||
GTK_PACKAGES="$GTK_PACKAGES pangoft2"
|
||||
fi
|
||||
GTK_EXTRA_LIBS=
|
||||
-if test x"$os_openbsd" = xyes; then
|
||||
- GTK_EXTRA_LIBS="$GTK_EXTRA_LIBS -lkvm"
|
||||
-fi
|
||||
|
||||
GTK_EXTRA_CFLAGS=
|
||||
GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS $MATH_LIB"
|
||||
@@ -24599,7 +24596,7 @@ fi
|
||||
|
||||
# Check whether --enable-man was given.
|
||||
if test "${enable_man+set}" = set; then :
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-gtk_Makefile_in,v 1.5 2011/09/26 07:14:50 ajacoutot Exp $
|
||||
--- gtk/Makefile.in.orig Mon Sep 26 03:14:11 2011
|
||||
+++ gtk/Makefile.in Mon Sep 26 08:45:36 2011
|
||||
@@ -722,7 +722,7 @@ INTROSPECTION_COMPILER_ARGS = \
|
||||
$OpenBSD: patch-gtk_Makefile_in,v 1.6 2011/10/15 12:03:52 ajacoutot Exp $
|
||||
--- gtk/Makefile.in.orig Fri Oct 14 18:38:53 2011
|
||||
+++ gtk/Makefile.in Sat Oct 15 07:33:17 2011
|
||||
@@ -802,7 +802,7 @@ INTROSPECTION_COMPILER_ARGS = \
|
||||
SUBDIRS = a11y . tests
|
||||
@HAVE_CUPS_FALSE@@HAVE_PAPI_CUPS_FALSE@@HAVE_PAPI_FALSE@GTK_PRINT_BACKENDS = file,lpr
|
||||
@HAVE_CUPS_FALSE@@HAVE_PAPI_CUPS_FALSE@@HAVE_PAPI_TRUE@GTK_PRINT_BACKENDS = file,papi
|
||||
|
130
x11/gtk+3/patches/patch-gtk_gtkmountoperation-x11_c
Normal file
130
x11/gtk+3/patches/patch-gtk_gtkmountoperation-x11_c
Normal file
@ -0,0 +1,130 @@
|
||||
$OpenBSD: patch-gtk_gtkmountoperation-x11_c,v 1.4 2011/10/15 12:03:52 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=661835
|
||||
|
||||
--- gtk/gtkmountoperation-x11.c.orig Thu Sep 22 23:46:14 2011
|
||||
+++ gtk/gtkmountoperation-x11.c Fri Oct 14 15:52:24 2011
|
||||
@@ -43,8 +43,8 @@
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(__OpenBSD__)
|
||||
+#include <stdlib.h>
|
||||
#include <sys/param.h>
|
||||
-#include <kvm.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
@@ -726,46 +726,44 @@ pid_get_command_line (GPid pid)
|
||||
static GPid
|
||||
pid_get_parent (GPid pid)
|
||||
{
|
||||
- struct kinfo_proc *proc;
|
||||
- int count;
|
||||
- kvm_t *kvm;
|
||||
- GPid ppid = 0;
|
||||
+ struct kinfo_proc kp;
|
||||
+ size_t len;
|
||||
+ GPid ppid;
|
||||
|
||||
- kvm = kvm_openfiles (NULL, NULL, NULL, KVM_NO_FILES, NULL);
|
||||
- if (kvm == NULL)
|
||||
- return 0;
|
||||
+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid,
|
||||
+ sizeof(struct kinfo_proc), 0 };
|
||||
|
||||
- proc = kvm_getprocs (kvm, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), &count);
|
||||
- if (count == 1)
|
||||
- ppid = proc->p_ppid;
|
||||
+ if (sysctl(mib, nitems(mib), NULL, &len, NULL, 0) == -1)
|
||||
+ return (-1);
|
||||
+ mib[5] = (len / sizeof(struct kinfo_proc));
|
||||
|
||||
- kvm_close (kvm);
|
||||
+ if (sysctl(mib, nitems(mib), &kp, &len, NULL, 0) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ ppid = kp.p_ppid;
|
||||
+
|
||||
return ppid;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
pid_get_env (GPid pid, const gchar *key)
|
||||
{
|
||||
- kvm_t *kvm;
|
||||
- struct kinfo_proc *proc;
|
||||
- char **strs;
|
||||
+ size_t len = PATH_MAX;
|
||||
+ char **strs = NULL;
|
||||
char *ret;
|
||||
char *end;
|
||||
int key_len;
|
||||
- int count;
|
||||
int i;
|
||||
|
||||
- kvm = kvm_openfiles (NULL, NULL, NULL, KVM_NO_FILES, NULL);
|
||||
- if (kvm == NULL)
|
||||
- return NULL;
|
||||
+ int mib[] = { CTL_KERN, KERN_PROC_ARGS, pid, KERN_PROC_ENV };
|
||||
|
||||
+ strs = (char **)realloc(strs, len);
|
||||
+
|
||||
key_len = strlen (key);
|
||||
|
||||
ret = NULL;
|
||||
- proc = kvm_getprocs (kvm, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), &count);
|
||||
- if (proc != NULL)
|
||||
+ if (sysctl(mib, nitems(mib), strs, &len, NULL, 0) != -1)
|
||||
{
|
||||
- strs = kvm_getenvv (kvm, proc, 0);
|
||||
for (i = 0; strs[i] != NULL; i++)
|
||||
{
|
||||
if (g_str_has_prefix (strs[i], key) && (*(strs[i] + key_len) == '='))
|
||||
@@ -780,35 +778,33 @@ pid_get_env (GPid pid, const gchar *key)
|
||||
}
|
||||
}
|
||||
|
||||
- kvm_close (kvm);
|
||||
+ g_free (strs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
pid_get_command_line (GPid pid)
|
||||
{
|
||||
- kvm_t *kvm;
|
||||
- struct kinfo_proc *proc;
|
||||
- int count;
|
||||
- char **strs;
|
||||
- char *ret;
|
||||
+ size_t len = PATH_MAX;
|
||||
+ char **strs = NULL;
|
||||
+ char *ret = NULL;
|
||||
char *end;
|
||||
|
||||
- kvm = kvm_openfiles (NULL, NULL, NULL, KVM_NO_FILES, NULL);
|
||||
- if (kvm == NULL)
|
||||
- return NULL;
|
||||
+ int mib[] = { CTL_KERN, KERN_PROC_ARGS, pid, KERN_PROC_ARGV };
|
||||
|
||||
- proc = kvm_getprocs (kvm, KERN_PROC_PID, pid, sizeof (struct kinfo_proc), &count);
|
||||
- if (proc == NULL)
|
||||
- return NULL;
|
||||
+ strs = (char **)realloc(strs, len);
|
||||
|
||||
- strs = kvm_getargv (kvm, proc, 0);
|
||||
+ if (sysctl(mib, nitems(mib), strs, &len, NULL, 0) == -1) {
|
||||
+ g_free (strs);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
ret = g_strjoinv (" ", strs);
|
||||
/* skip invalid UTF-8 */
|
||||
if (!g_utf8_validate (ret, -1, (const gchar **) &end))
|
||||
*end = '\0';
|
||||
|
||||
- kvm_close (kvm);
|
||||
+ g_free (strs);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user