Package: totem
Version: 1.4.5-1
Severity: important
Tags: patch

Hi,

totem fails to build on GNU/kFreeBSD, due to missing code about how to
access the CD-ROM drive. Please find attached a patch to fix that. Note
that this patch also work for plain FreeBSD.

It would be nice if you could include it in the next upload.

Thanks in advance,
Aurelien
diff -u totem-1.4.5/debian/patches/00list totem-1.4.5/debian/patches/00list
--- totem-1.4.5/debian/patches/00list
+++ totem-1.4.5/debian/patches/00list
@@ -2,2 +2,3 @@
 20_use_alternatives
+30_kfreebsd_gnu
 60_mandatory-relibtoolizing
diff -u totem-1.4.5/debian/changelog totem-1.4.5/debian/changelog
--- totem-1.4.5/debian/changelog
+++ totem-1.4.5/debian/changelog
@@ -1,3 +1,9 @@
+totem (1.4.5-1+kbsd) unreleased; urgency=low
+
+  * Added support for GNU/kFreeBSD. 
+
+ -- Aurelien Jarno <[EMAIL PROTECTED]>  Wed,  4 Oct 2006 20:30:20 +0200
+
 totem (1.4.5-1) unstable; urgency=low
 
   * New upstream release; no API changes.
only in patch2:
unchanged:
--- totem-1.4.5.orig/debian/patches/30_kfreebsd_gnu.dpatch
+++ totem-1.4.5/debian/patches/30_kfreebsd_gnu.dpatch
@@ -0,0 +1,61 @@
+#! /bin/sh -e
+## 30_kfreebsd_gnu.dpatch by Joe Marcus Clarke <[EMAIL PROTECTED]> 
+##                       and Aurelien Jarno <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+if [ $# -lt 1 ]; then
+    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+    -patch) patch -p1 ${patch_opts} < $0;;
+    -unpatch) patch -R -p1 ${patch_opts} < $0;;
+    *)
+        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+        exit 1;;
+esac
+
+exit 0
+
[EMAIL PROTECTED]@
+--- totem-1.2.1.orig/src/plparse/totem-disc.c  2006-02-07 20:24:54.000000000 
+0100
++++ totem-1.2.1/src/plparse/totem-disc.c       2006-02-07 20:26:43.000000000 
+0100
+@@ -43,7 +43,32 @@
+ #include <glib/gi18n.h>
+ #include <libgnomevfs/gnome-vfs.h>
+ 
++#if defined (__linux__)
++#include <mntent.h>
+ #include <linux/cdrom.h>
++#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
++#include <sys/cdio.h>
++#include <sys/disklabel.h>
++
++#define CDROM_DRIVE_STATUS      0x5326
++#define CDROM_DISC_STATUS       0x5327
++#define CDS_AUDIO               100
++#define CDS_MIXED               105
++#define CDS_DATA_1              101
++#define CDS_DATA_2              102
++#define CDS_NO_INFO             0       /* if not implemented */
++#define CDS_NO_DISC             1
++#define CDS_TRAY_OPEN           2
++#define CDS_DRIVE_NOT_READY     3
++#define CDS_DISC_OK             4
++#define CDS_XA_2_1              103
++#define CDS_XA_2_2              104
++#define CDC_DVD                 0x8000
++#define ENOMEDIUM ENODEV
++#define CDROM_GET_CAPABILITY CDIOCCLRDEBUG
++#else
++# error "Unknown system"
++#endif
+ 
+ #include "totem-disc.h"
+ 

Reply via email to