Package: dvd+rw-tools
Severity: important
Version: 6.1-2
Tags: patch
Hi,
the current version fails to build on GNU/kFreeBSD.
It needs additional build-dependency and
small changes to detection logic.
Please find attached patch with that.
It would also be nice if you can ask upstream
to include changes from 03-kfreebsd.dpatch.
Thanks in advance
Petr
diff -u dvd+rw-tools-6.1/debian/control dvd+rw-tools-6.1/debian/control
--- dvd+rw-tools-6.1/debian/control
+++ dvd+rw-tools-6.1/debian/control
@@ -2,7 +2,7 @@
Section: utils
Priority: optional
Maintainer: Daniel Baumann <[EMAIL PROTECTED]>
-Build-Depends: debhelper (>= 4.0.0), dpatch, m4, sharutils
+Build-Depends: debhelper (>= 4.0.0), dpatch, m4, sharutils, libcam-dev
[kfreebsd-i386 kfreebsd-amd64]
Standards-Version: 3.6.2
Package: dvd+rw-tools
diff -u dvd+rw-tools-6.1/debian/patches/00list
dvd+rw-tools-6.1/debian/patches/00list
--- dvd+rw-tools-6.1/debian/patches/00list
+++ dvd+rw-tools-6.1/debian/patches/00list
@@ -2,0 +3 @@
+03-kfreebsd
only in patch2:
unchanged:
--- dvd+rw-tools-6.1.orig/debian/patches/03-kfreebsd.dpatch
+++ dvd+rw-tools-6.1/debian/patches/03-kfreebsd.dpatch
@@ -0,0 +1,79 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## DP: support for GNU/kFreeBSD
+
[EMAIL PROTECTED]@
+
+only in patch2:
+unchanged:
+--- dvd+rw-tools-6.1.orig/Makefile.m4
++++ dvd+rw-tools-6.1/Makefile.m4
+@@ -14,6 +14,7 @@
+ ifelse(OS,NetBSD,[define([OS],[BSD])CXXFLAGS+=-D__unix])
+ ifelse(OS,OpenBSD,[define([OS],[BSD])])
+ ifelse(OS,FreeBSD,[define([OS],[BSD])LDLIBS=-lcam])
++ifelse(OS,GNU/kFreeBSD,[define([OS],[Linux])LDLIBS=-lcam])
+ ifelse(OS,IRIX64,[define([OS],[IRIX])])
+
+ ifelse(OS,MINGW32,[
+@@ -170,7 +170,7 @@
+ CFLAGS +=$(WARN) -O2 -D_REENTRANT
+ CXX =g++
+ CXXFLAGS+=$(WARN) -O2 -fno-exceptions -D_REENTRANT
+-LDLIBS =-lpthread
++LDLIBS +=-lpthread
+ LINK.o =$(LINK.cc)
+
+ prefix?=/usr/local
+only in patch2:
+unchanged:
+--- dvd+rw-tools-6.1.orig/transport.hxx
++++ dvd+rw-tools-6.1/transport.hxx
+@@ -471,7 +471,7 @@
+ { return 1; }
+ };
+
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+
+ #include <sys/ioctl.h>
+ #include <camlib.h>
+only in patch2:
+unchanged:
+--- dvd+rw-tools-6.1.orig/growisofs.c
++++ dvd+rw-tools-6.1/growisofs.c
+@@ -367,7 +367,7 @@
+ #define _LARGEFILE64_SOURCE
+ #define _FILE_OFFSET_BITS 64
+
+-#if defined(__linux)
++#if defined(__linux) || defined(__GLIBC__)
+ /* ... and "engage" glibc large file support */
+ # ifndef _GNU_SOURCE
+ # define _GNU_SOURCE
+@@ -418,7 +418,7 @@
+ # define FATAL_START(e) (0x80|(e))
+ # define FATAL_MASK 0x7F
+
+-#ifdef __FreeBSD__
++#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
+ # include <sys/syscall.h>
+ # ifndef SYS_mlockall
+ # define SYS_mlockall 324
+@@ -856,7 +856,7 @@
+ goto open_rw;
+ }
+
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
+
+ #include <sys/cdio.h>
+ #include <camlib.h>
+@@ -2263,7 +2263,7 @@
+ if (setrlimit(RLIMIT_MEMLOCK,&rlim)) break;
+ }
+ # endif
+-# ifdef __FreeBSD__
++# if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
+ syscall(SYS_mlockall,3);
+ # else
+ mlockall(MCL_CURRENT|MCL_FUTURE);