Update to (meta-)tracker-0.16.1.
This commit is contained in:
parent
9c81cdc52f
commit
357f55154a
@ -1,12 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.142 2013/05/01 06:57:50 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.143 2013/05/01 12:40:18 ajacoutot Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
COMMENT= powerful desktop search tool and indexer
|
||||
|
||||
GNOME_PROJECT= tracker
|
||||
GNOME_VERSION= 0.16.0
|
||||
REVISION= 7
|
||||
GNOME_VERSION= 0.16.1
|
||||
|
||||
# there is already audio/tracker, so this port has to live
|
||||
# as meta-tracker.
|
||||
@ -121,12 +120,10 @@ MODGNOME_LDFLAGS= -Wl,-rpath,${TRUEPREFIX}/lib/tracker-${MAJ_V}
|
||||
|
||||
FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/meta-tracker/
|
||||
|
||||
# XXX rm when patch-src_libtracker-sparql-backend_tracker-backend_vala is removed
|
||||
post-patch:
|
||||
find ${WRKSRC} -name '*_vala.stamp' -exec rm {} \;
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/src/tracker-needle/tracker-utils.vala
|
||||
perl -pi -e 's,/usr/bin,${LOCALBASE}/bin,' \
|
||||
${WRKSRC}/src/tracker-needle/tracker-utils.vala
|
||||
|
||||
post-install:
|
||||
rm ${PREFIX}/lib/tracker-${MAJ_V}/extract-modules/*.la
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (gnome/tracker-0.16.0.tar.xz) = KZxqGANwUi0deUwYSq742CItP3N9VkuOXKJbh1FHDE8=
|
||||
SIZE (gnome/tracker-0.16.0.tar.xz) = 5921104
|
||||
SHA256 (gnome/tracker-0.16.1.tar.xz) = +7lBRIJrANoLQn3G830meb2N/sHcmS6FekegtFPwt3E=
|
||||
SIZE (gnome/tracker-0.16.1.tar.xz) = 5970452
|
||||
|
@ -1,22 +0,0 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.2 2013/04/24 07:07:58 ajacoutot Exp $
|
||||
|
||||
From 67ccf1dbda724991d1bf1e30be38b388798f3e6a Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@gnome.org>
|
||||
Date: Thu, 18 Apr 2013 12:21:49 +0000
|
||||
Subject: tracker-dbus: add support for OpenBSD
|
||||
|
||||
--- configure.ac.orig Wed Apr 10 14:51:37 2013
|
||||
+++ configure.ac Wed Apr 10 14:51:18 2013
|
||||
@@ -231,6 +231,12 @@ LIBTRACKER_COMMON_REQUIRED="glib-2.0 >= $GLIB_REQU
|
||||
|
||||
PKG_CHECK_MODULES(LIBTRACKER_COMMON, [$LIBTRACKER_COMMON_REQUIRED])
|
||||
|
||||
+case $host in
|
||||
+ *-*-openbsd*)
|
||||
+ LIBTRACKER_COMMON_LIBS="$LIBTRACKER_COMMON_LIBS -lkvm"
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
# Check requirements for libtracker-data
|
||||
LIBTRACKER_DATA_REQUIRED="glib-2.0 >= $GLIB_REQUIRED
|
||||
gio-unix-2.0 >= $GLIB_REQUIRED
|
@ -1,69 +0,0 @@
|
||||
$OpenBSD: patch-src_libtracker-common_tracker-dbus_c,v 1.10 2013/04/24 07:07:58 ajacoutot Exp $
|
||||
|
||||
From 67ccf1dbda724991d1bf1e30be38b388798f3e6a Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@gnome.org>
|
||||
Date: Thu, 18 Apr 2013 12:21:49 +0000
|
||||
Subject: tracker-dbus: add support for OpenBSD
|
||||
|
||||
--- src/libtracker-common/tracker-dbus.c.orig Thu May 3 17:22:57 2012
|
||||
+++ src/libtracker-common/tracker-dbus.c Thu Apr 18 14:12:43 2013
|
||||
@@ -23,6 +23,14 @@
|
||||
#include <gio/gunixinputstream.h>
|
||||
#include <gio/gunixoutputstream.h>
|
||||
|
||||
+#ifdef __OpenBSD__
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/proc.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <kvm.h>
|
||||
+#endif
|
||||
+
|
||||
#include "tracker-dbus.h"
|
||||
#include "tracker-log.h"
|
||||
|
||||
@@ -139,6 +147,7 @@ client_data_new (gchar *sender)
|
||||
}
|
||||
|
||||
if (get_binary) {
|
||||
+#ifndef __OpenBSD__
|
||||
gchar *filename;
|
||||
gchar *pid_str;
|
||||
gchar *contents = NULL;
|
||||
@@ -171,6 +180,36 @@ client_data_new (gchar *sender)
|
||||
|
||||
g_strfreev (strv);
|
||||
g_free (contents);
|
||||
+#else
|
||||
+ gint nproc;
|
||||
+ struct kinfo_proc *kp;
|
||||
+ kvm_t *kd;
|
||||
+ gchar **strv;
|
||||
+
|
||||
+ if ((kd = kvm_openfiles (NULL, NULL, NULL, KVM_NO_FILES, NULL)) == NULL)
|
||||
+ return cd;
|
||||
+
|
||||
+ if ((kp = kvm_getprocs (kd, KERN_PROC_PID, cd->pid, sizeof (*kp), &nproc)) == NULL) {
|
||||
+ g_warning ("Could not get process name: %s", kvm_geterr (kd));
|
||||
+ kvm_close(kd);
|
||||
+ return cd;
|
||||
+ }
|
||||
+
|
||||
+ if ((kp->p_flag & P_SYSTEM) != 0) {
|
||||
+ kvm_close(kd);
|
||||
+ return cd;
|
||||
+ }
|
||||
+
|
||||
+ strv = kvm_getargv (kd, kp, 0);
|
||||
+
|
||||
+ if (strv == NULL) {
|
||||
+ kvm_close(kd);
|
||||
+ return cd;
|
||||
+ } else {
|
||||
+ cd->binary = g_path_get_basename (strv[0]);
|
||||
+ kvm_close(kd);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
return cd;
|
@ -1,50 +0,0 @@
|
||||
$OpenBSD: patch-src_libtracker-common_tracker-os-dependant-unix_c,v 1.7 2013/04/30 08:35:44 ajacoutot Exp $
|
||||
|
||||
From a5dcf74772ad7800100905d93a11debf67644a38 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@gnome.org>
|
||||
Date: Mon, 29 Apr 2013 15:03:36 +0000
|
||||
Subject: Implement get_memory_total() on OpenBSD.
|
||||
|
||||
--- src/libtracker-common/tracker-os-dependant-unix.c.orig Thu Mar 14 18:25:30 2013
|
||||
+++ src/libtracker-common/tracker-os-dependant-unix.c Wed Apr 10 15:16:43 2013
|
||||
@@ -26,6 +26,11 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
+#if defined (__OpenBSD__)
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+#endif
|
||||
+
|
||||
#include <glib.h>
|
||||
|
||||
#include "tracker-log.h"
|
||||
@@ -225,6 +230,7 @@ tracker_create_permission_string (struct stat finfo)
|
||||
static glong
|
||||
get_memory_total (void)
|
||||
{
|
||||
+#if !defined (__OpenBSD__)
|
||||
GError *error = NULL;
|
||||
const gchar *filename;
|
||||
gchar *contents = NULL;
|
||||
@@ -258,6 +264,20 @@ get_memory_total (void)
|
||||
}
|
||||
g_free (contents);
|
||||
}
|
||||
+#else /* OpenBSD */
|
||||
+ glong total = 0;
|
||||
+ int64_t physmem;
|
||||
+ size_t len;
|
||||
+ static gint mib[] = { CTL_HW, HW_PHYSMEM64 };
|
||||
+
|
||||
+ len = sizeof (physmem);
|
||||
+
|
||||
+ if (sysctl (mib, G_N_ELEMENTS (mib), &physmem, &len, NULL, 0) == -1) {
|
||||
+ g_critical ("Couldn't get memory information: %d", errno);
|
||||
+ } else {
|
||||
+ total = physmem;
|
||||
+ }
|
||||
+#endif /* !OpenBSD */
|
||||
|
||||
return total;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
$OpenBSD: patch-src_libtracker-common_tracker-type-utils_c,v 1.4 2013/04/10 14:13:53 ajacoutot Exp $
|
||||
|
||||
From 3443706bbe0c1c2e465336c59f87cec90929ff1e Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@gnome.org>
|
||||
Date: Wed, 10 Apr 2013 07:16:54 +0000
|
||||
Subject: OpenBSD needs _XOPEN_SOURCE_EXTENDED for strptime/strcasecmp
|
||||
|
||||
--- src/libtracker-common/tracker-type-utils.c.orig Wed Apr 10 08:40:12 2013
|
||||
+++ src/libtracker-common/tracker-type-utils.c Wed Apr 10 08:40:47 2013
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
+#define _XOPEN_SOURCE_EXTENDED 1 /* strcasecmp is XPG4v2 */
|
||||
#include <time.h>
|
||||
|
||||
#include <strings.h>
|
@ -1,17 +0,0 @@
|
||||
$OpenBSD: patch-src_libtracker-extract_tracker-utils_c,v 1.1 2013/04/10 14:13:53 ajacoutot Exp $
|
||||
|
||||
From 3443706bbe0c1c2e465336c59f87cec90929ff1e Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@gnome.org>
|
||||
Date: Wed, 10 Apr 2013 07:16:54 +0000
|
||||
Subject: OpenBSD needs _XOPEN_SOURCE_EXTENDED for strptime/strcasecmp
|
||||
|
||||
--- src/libtracker-extract/tracker-utils.c.orig Wed Apr 10 08:42:17 2013
|
||||
+++ src/libtracker-extract/tracker-utils.c Wed Apr 10 08:42:29 2013
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
+#define _XOPEN_SOURCE_EXTENDED 1 /* strptime is XPG4v2 */
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
@ -1,20 +0,0 @@
|
||||
$OpenBSD: patch-src_libtracker-sparql-backend_tracker-backend_vala,v 1.2 2013/05/01 08:48:36 ajacoutot Exp $
|
||||
|
||||
From b52dd1f97180575497a576b289bd5a1af7573b12 Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Tue, 30 Apr 2013 19:38:39 +0000
|
||||
Subject: libtracker-sparql-backend: Fix connection singleton mutex issue
|
||||
|
||||
XXX rm post-patch when this patch is removed
|
||||
|
||||
--- src/libtracker-sparql-backend/tracker-backend.vala.orig Thu Mar 14 18:25:30 2013
|
||||
+++ src/libtracker-sparql-backend/tracker-backend.vala Wed May 1 08:48:30 2013
|
||||
@@ -209,7 +209,7 @@ class Tracker.Sparql.Backend : Connection {
|
||||
|
||||
static weak Connection? singleton;
|
||||
static bool log_initialized;
|
||||
- static Mutex door = Mutex ();
|
||||
+ static Mutex door;
|
||||
|
||||
static new Connection get (Cancellable? cancellable = null) throws Sparql.Error, IOError, DBusError, SpawnError {
|
||||
door.lock ();
|
@ -1,17 +0,0 @@
|
||||
$OpenBSD: patch-src_tracker-needle_Makefile_in,v 1.2 2013/04/11 10:03:32 ajacoutot Exp $
|
||||
|
||||
From 626c04163154bb2044d0d329778f14bf7b746e45 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@gnome.org>
|
||||
Date: Wed, 10 Apr 2013 15:51:12 +0000
|
||||
Subject: Another need for XOPEN_SOURCE_EXTENDED missed in previous commit.
|
||||
|
||||
--- src/tracker-needle/Makefile.in.orig Wed Apr 10 17:31:36 2013
|
||||
+++ src/tracker-needle/Makefile.in Wed Apr 10 17:31:58 2013
|
||||
@@ -499,6 +499,7 @@ AM_VALAFLAGS = \
|
||||
AM_CPPFLAGS = \
|
||||
$(BUILD_CFLAGS) \
|
||||
-D_XOPEN_SOURCE \
|
||||
+ -D_XOPEN_SOURCE_EXTENDED \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_builddir)/src \
|
||||
-DTRACKER_UI_DIR=\"$(datadir)/tracker/\" \
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-src_tracker-needle_tracker-utils_vala,v 1.3 2013/04/10 15:41:47 ajacoutot Exp $
|
||||
--- src/tracker-needle/tracker-utils.vala.orig Thu Oct 6 20:47:36 2011
|
||||
+++ src/tracker-needle/tracker-utils.vala Thu Oct 6 20:47:48 2011
|
||||
@@ -43,7 +43,7 @@ private void uri_launch (string uri) {
|
||||
argv[0] = command[0];
|
||||
|
||||
try {
|
||||
- Process.spawn_async ("/usr/bin",
|
||||
+ Process.spawn_async ("${LOCALBASE}/bin",
|
||||
argv,
|
||||
null, // environment
|
||||
SpawnFlags.SEARCH_PATH,
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-tests_libtracker-common_tracker-sched-test_c,v 1.4 2013/04/11 10:03:32 ajacoutot Exp $
|
||||
|
||||
From 045ede1aeb281016c2e0f21028774b90e0df72b5 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@gnome.org>
|
||||
Date: Wed, 10 Apr 2013 15:16:28 +0000
|
||||
Subject: SCHED_IDLE is only available on Linux.
|
||||
|
||||
--- tests/libtracker-common/tracker-sched-test.c.orig Fri Dec 16 16:38:16 2011
|
||||
+++ tests/libtracker-common/tracker-sched-test.c Fri Dec 16 18:02:12 2011
|
||||
@@ -46,7 +46,9 @@ test_sched_set_and_get (void)
|
||||
{
|
||||
g_assert (scheduler_is (SCHED_OTHER));
|
||||
g_assert (tracker_sched_idle ());
|
||||
+#ifdef __linux__
|
||||
g_assert (scheduler_is (SCHED_IDLE));
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user