Package: xine-lib
Severity: important
Tags: patch

Hi,

xine-lib fails to build on GNU/kFreeBSD due to missing support.  Please
find attached a patch to fix that. Note that the patch also modify
debian/control in order to not depend on libasound2-dev on kfreebsd-i386
as it is a linux specific library.

Could you please add it in the next upload?

Don't hesitate to contact me if you need more information.

Thanks in advance,
Aurelien


-- System Information:
Debian Release: testing/unstable
Architecture: kfreebsd-i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: GNU/kFreeBSD 5.4-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Author: aurel32
Status: in BTS

diff -u xine-lib-1.0.1/debian/control xine-lib-1.0.1/debian/control
--- xine-lib-1.0.1/debian/control
+++ xine-lib-1.0.1/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Siggi Langauf <[EMAIL PROTECTED]>
 Uploaders: Philipp Matthias Hahn <[EMAIL PROTECTED]>
-Build-Depends: debhelper (>= 4.0.4), libaa1-dev (>= 1.4p5-2), libcaca-dev, xlibs-dev (>> 4.1), libxinerama-dev, libesd0-dev, zlib1g-dev | libz-dev, libartsc0-dev (>>1.1.0), liblircclient-dev, libogg-dev, libvorbis-dev, libtheora-dev, libasound2-dev, libflac-dev (>>1.1.0), libmodplug-dev, libgnomevfs2-dev, libsmbclient-dev, libspeex-dev, libmng-dev, libpng12-dev | libpng-dev, libfreetype6-dev, libsdl1.2-dev (>=1.1.5)
+Build-Depends: debhelper (>= 4.0.4), libaa1-dev (>= 1.4p5-2), libcaca-dev, xlibs-dev (>> 4.1), libxinerama-dev, libesd0-dev, zlib1g-dev | libz-dev, libartsc0-dev (>>1.1.0), liblircclient-dev, libogg-dev, libvorbis-dev, libtheora-dev, libasound2-dev [!kfreebsd-i386 !hurd-i386], libflac-dev (>>1.1.0), libmodplug-dev, libgnomevfs2-dev, libsmbclient-dev, libspeex-dev, libmng-dev, libpng12-dev | libpng-dev, libfreetype6-dev, libsdl1.2-dev (>=1.1.5)
 Build-Conflicts: libdvdnav-dev
 Standards-Version: 3.5.9
 
diff -u xine-lib-1.0.1/debian/changelog xine-lib-1.0.1/debian/changelog
--- xine-lib-1.0.1.orig/src/input/input_vcd.c
+++ xine-lib-1.0.1/src/input/input_vcd.c
@@ -39,7 +39,7 @@
 #ifdef HAVE_SYS_CDIO_H
 # include <sys/cdio.h>
 /* TODO: not clean yet */
-# if defined (__FreeBSD__)
+# if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
 #  include <sys/cdrio.h>
 # endif
 #endif
@@ -94,7 +94,7 @@
 #if defined (__linux__) || defined(__sun)
   struct cdrom_tochdr    tochdr;
   struct cdrom_tocentry  tocent[100];
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
   struct ioc_toc_header  tochdr;
   struct cd_toc_entry    *tocent;
   off_t                  cur_sec;
@@ -119,7 +119,7 @@
 
   int                    cur_track;
 
-#if defined (__linux__) || defined(__sun) || defined(__FreeBSD__)
+#if defined (__linux__) || defined(__sun) || defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
   uint8_t                cur_min, cur_sec, cur_frame;
 #endif
 
@@ -179,7 +179,7 @@
 
   return 0;
 }
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
 static int input_vcd_read_toc (vcd_input_class_t *this, int fd) {
 
   struct ioc_read_toc_entry te;
@@ -395,7 +395,7 @@
   memcpy (buf, data.data, VCDSECTORSIZE); /* FIXME */
   return VCDSECTORSIZE;
 }
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
 static off_t vcd_plugin_read (input_plugin_t *this_gen, 
 				char *buf, off_t nlen) {
   vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
@@ -533,7 +533,7 @@
   memcpy (buf->mem, data.data, VCDSECTORSIZE); /* FIXME */
   return buf;
 }
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
 static buf_element_t *vcd_plugin_read_block (input_plugin_t *this_gen, 
 					     fifo_buffer_t *fifo, off_t nlen) {
   
@@ -692,7 +692,7 @@
 
   return offset ; /* FIXME */
 }
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
 static off_t vcd_plugin_seek (input_plugin_t *this_gen, 
 				off_t offset, int origin) {
 
@@ -766,7 +766,7 @@
 
   return (off_t) 0;
 }
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
 static off_t vcd_plugin_get_length (input_plugin_t *this_gen) {
   vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
   off_t len ;
@@ -861,7 +861,7 @@
   this->cur_min   = this->cls->tocent[this->cur_track].cdte_addr.msf.minute;
   this->cur_sec   = this->cls->tocent[this->cur_track].cdte_addr.msf.second;
   this->cur_frame = this->cls->tocent[this->cur_track].cdte_addr.msf.frame;
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
   {
     int bsize = 2352;
     if (ioctl (this->fd, CDRIOCSETBLOCKSIZE, &bsize) == -1) {
only in patch2:
unchanged:
--- xine-lib-1.0.1.orig/src/input/libdvdnav/bswap.h
+++ xine-lib-1.0.1/src/input/libdvdnav/bswap.h
@@ -35,7 +35,7 @@
 #include <sys/param.h>
 #endif
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__GLIBC__)
 #include <byteswap.h>
 #define B2N_16(x) x = bswap_16(x)
 #define B2N_32(x) x = bswap_32(x)

Reply via email to