summaryrefslogtreecommitdiff
path: root/sysutils/hal/patches/patch-na
blob: f1a585dca92c6b61f09c271c4544c27e66286967 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
$NetBSD: patch-na,v 1.11 2011/10/04 10:31:37 dsainty Exp $

Includes upstream patch to build on Linux systems without V4L1 support.

http://cgit.freedesktop.org/hal/commit/?id=8f624253f0135ca77a893ad4e8168f51ef90d4da

--- configure.in.orig	2009-08-25 00:42:29.000000000 +1200
+++ configure.in	2011-10-04 22:56:25.700308098 +1300
@@ -479,12 +479,16 @@
 fi 
 AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"])
 
+AC_CHECK_HEADERS([linux/videodev.h], [have_videodev_h=yes], [])
+AM_CONDITIONAL(HAVE_V4L1, [test "x$have_videodev_h" = "xyes"])
+
 USE_LIBUSB20=no
 USE_LIBUSB=no
 LIBUSB20_LIBS=""
+LIBUFS_LIBS=""
 AC_ARG_WITH([backend],
 	    AS_HELP_STRING([--with-backend=<name>],
-	                   [backend to use (linux/solaris/freebsd/dummy)]),
+	                   [backend to use (linux/solaris/netbsd/freebsd/dummy)]),
 	    [backend=$withval])
 if ! test -z "$with_backend" ; then
     HALD_BACKEND="$with_backend"
@@ -493,6 +497,9 @@
         *-*-solaris*)
 		   HALD_BACKEND="solaris"
 		   ;;
+        *-*-netbsd*)
+		   HALD_BACKEND="netbsd"
+		   ;;
         *-*-freebsd* | *-*-kfreebsd*-gnu)
                    HALD_BACKEND="freebsd"
                    ;;
@@ -508,8 +515,10 @@
 AM_CONDITIONAL(HALD_COMPILE_LINUX, [test x$HALD_BACKEND = xlinux], [Compiling for Linux])
 AM_CONDITIONAL(HALD_COMPILE_FREEBSD, [test x$HALD_BACKEND = xfreebsd], [Compiling for FreeBSD])
 AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris])
+AM_CONDITIONAL(HALD_COMPILE_NETBSD, [test x$HALD_BACKEND = xnetbsd], [Compiling for NetBSD])
 AC_SUBST(HALD_BACKEND)
 if test "x$HALD_BACKEND" = "xfreebsd"; then
+    AC_SEARCH_LIBS([ufs_disk_fillout], [ufs], [LIBUFS_LIBS="-lufs"], [])
     AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no])
 fi
 if test "x$USE_LIBUSB20" = "xno"; then
@@ -526,6 +535,8 @@
 fi
 AC_SUBST(LIBUSB20_LIBS)
 
+AC_SUBST(LIBUFS_LIBS)
+
 dnl DBUS API is subject to changes
 AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to change])
 
@@ -706,8 +717,8 @@
 fi
 AC_MSG_RESULT($have_glib_2_14)
 
-case "$host" in
-    *-*-freebsd*)
+case "$HALD_BACKEND" in
+    freebsd | netbsd)
         PKG_CHECK_MODULES(VOLUME_ID, [$volume_id_module])
 	AC_SUBST(VOLUME_ID_CFLAGS)
 	AC_SUBST(VOLUME_ID_LIBS)
@@ -718,14 +729,13 @@
 
 # blkid (util-linux-ng)
 case "$host" in
-*-*-freebsd*)
-        ;;
-*-*-solaris*)
-	;;
-*)
+*linux*)
 	PKG_CHECK_MODULES(BLKID, [$blkid_module])
 	AC_SUBST(BLKID_CFLAGS)
 	AC_SUBST(BLKID_LIBS)
+	;;
+*)
+	;;
 esac
 
 # OS specific libs
@@ -1086,6 +1096,9 @@
 hald/solaris/Makefile
 hald/solaris/probing/Makefile
 hald/solaris/addons/Makefile
+hald/netbsd/Makefile
+hald/netbsd/probing/Makefile
+hald/netbsd/addons/Makefile
 hald/freebsd/Makefile
 hald/freebsd/probing/Makefile
 hald/freebsd/libprobe/Makefile
@@ -1096,6 +1109,7 @@
 tools/Makefile
 tools/freebsd/Makefile
 tools/linux/Makefile
+tools/netbsd/Makefile
 partutil/Makefile
 policy/Makefile
 fdi/Makefile