summary refs log tree commit diff
path: root/pkgs/tools/bluetooth/obex-data-server
diff options
context:
space:
mode:
authorTom Hinton <tom.hinton@cse.org.uk>2014-02-19 13:07:20 +0100
committerTom Hinton <hinton@pin>2014-02-19 18:11:54 +0000
commit208d4241ff9db3939bd9f4a579b8524dd80ffe42 (patch)
tree0e3b46e08e25ba19ea1e4214a116ccd8851e3582 /pkgs/tools/bluetooth/obex-data-server
parentc7aedd58050daa7ecab58851af2ee8281ec623e8 (diff)
downloadnixpkgs-208d4241ff9db3939bd9f4a579b8524dd80ffe42.tar
nixpkgs-208d4241ff9db3939bd9f4a579b8524dd80ffe42.tar.gz
nixpkgs-208d4241ff9db3939bd9f4a579b8524dd80ffe42.tar.bz2
nixpkgs-208d4241ff9db3939bd9f4a579b8524dd80ffe42.tar.lz
nixpkgs-208d4241ff9db3939bd9f4a579b8524dd80ffe42.tar.xz
nixpkgs-208d4241ff9db3939bd9f4a579b8524dd80ffe42.tar.zst
nixpkgs-208d4241ff9db3939bd9f4a579b8524dd80ffe42.zip
- Add openobex's unusual pkgconfig to pkgconfig path
- Prepend dbus_libs pkgconfig to pkgconfig path, as otherwise the dbus-daemon pkgconfig wins,
  as it has the same name (dbus-1.pc), which doesn't provide all the dbus headers that are needed
- Apply the included patch to obex-data-server which lets it build against current openobex
Diffstat (limited to 'pkgs/tools/bluetooth/obex-data-server')
-rw-r--r--pkgs/tools/bluetooth/obex-data-server/default.nix11
-rw-r--r--pkgs/tools/bluetooth/obex-data-server/obex-data-server-0.4.6-build-fixes-1.patch56
2 files changed, 65 insertions, 2 deletions
diff --git a/pkgs/tools/bluetooth/obex-data-server/default.nix b/pkgs/tools/bluetooth/obex-data-server/default.nix
index 790b57f4a76..53e854c34eb 100644
--- a/pkgs/tools/bluetooth/obex-data-server/default.nix
+++ b/pkgs/tools/bluetooth/obex-data-server/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, libusb, glib, dbus_glib, bluez, openobex }:
+{ stdenv, fetchurl, pkgconfig, libusb, glib, dbus_glib, bluez, openobex, dbus_libs }:
    
 stdenv.mkDerivation rec {
   name = "obex-data-server-0.4.6";
@@ -8,7 +8,14 @@ stdenv.mkDerivation rec {
     sha256 = "0kq940wqs9j8qjnl58d6l3zhx0jaszci356xprx23l6nvdfld6dk";
   };
 
-  buildInputs = [ pkgconfig libusb glib dbus_glib bluez openobex ];
+  buildInputs = [ pkgconfig libusb glib dbus_glib bluez openobex dbus_libs ];
+
+  patches = [ ./obex-data-server-0.4.6-build-fixes-1.patch ];
+
+  preConfigure = ''
+  addToSearchPath PKG_CONFIG_PATH ${openobex}/lib64/pkgconfig
+  export PKG_CONFIG_PATH="${dbus_libs}/lib/pkgconfig:$PKG_CONFIG_PATH"
+  '';
 
   meta = {
     homepage = http://wiki.muiline.com/obex-data-server;
diff --git a/pkgs/tools/bluetooth/obex-data-server/obex-data-server-0.4.6-build-fixes-1.patch b/pkgs/tools/bluetooth/obex-data-server/obex-data-server-0.4.6-build-fixes-1.patch
new file mode 100644
index 00000000000..b5fde8db589
--- /dev/null
+++ b/pkgs/tools/bluetooth/obex-data-server/obex-data-server-0.4.6-build-fixes-1.patch
@@ -0,0 +1,56 @@
+Submitted By:            Armin K. <krejzi at email dot com>
+Date:                    2012-07-06
+Initial Package Version: 0.4.6
+Upstream Status:         Unknown
+Origin:                  Self
+Description:             Some build fixes.
+
+--- obex-data-server.orig/src/ods-obex.c	2011-02-10 10:14:42.000000000 +0100
++++ obex-data-server/src/ods-obex.c	2012-07-06 20:10:09.208712553 +0200
+@@ -412,7 +412,7 @@
+ 		goto err;
+ 	}
+ 
+-	interfaces_num = OBEX_FindInterfaces(obex_context->obex_handle, &obex_intf);
++	interfaces_num = OBEX_EnumerateInterfaces(obex_context->obex_handle);
+ 	if (intf_num >= interfaces_num) {
+ 		g_set_error (error, ODS_ERROR, ODS_ERROR_FAILED, "Invalid interface number");
+ 		goto err;
+@@ -1928,7 +1928,7 @@
+ 	gchar	*uname;
+ 	gsize	uname_len;
+ 
+-	if (action != OBEX_ACTION_SETPERM)
++	if (action != 0x03)
+ 		g_assert (src && dst);
+ 
+ 	object = OBEX_ObjectNew (obex_context->obex_handle, OBEX_CMD_ACTION);
+@@ -1974,7 +1974,7 @@
+ 	                      OBEX_HDR_ACTION_ID, hv, 1, 0);
+ 
+ 	/* permissions header */
+-	if (action == OBEX_ACTION_SETPERM) {
++	if (action == 0x03) {
+ 		hv.bq4 = perms;
+ 		ret = OBEX_ObjectAddHeader (obex_context->obex_handle, object,
+ 		                            OBEX_HDR_PERMISSIONS, hv, 4, 0);
+--- obex-data-server.orig/src/ods-session.c	2011-02-10 09:57:31.000000000 +0100
++++ obex-data-server/src/ods-session.c	2012-07-06 20:10:09.208712553 +0200
+@@ -1761,7 +1761,7 @@
+                          DBusGMethodInvocation *context)
+ {
+ 	return ods_session_remote_action (session, remote_source,
+-	                                  remote_destination, OBEX_ACTION_COPY,
++	                                  remote_destination, 0x00,
+ 	                                  context);
+ }
+ 
+@@ -1772,7 +1772,7 @@
+                          DBusGMethodInvocation *context)
+ {
+ 	return ods_session_remote_action (session, remote_source,
+-	                                  remote_destination, OBEX_ACTION_MOVE,
++	                                  remote_destination, 0x01,
+ 	                                  context);
+ }
+