Web lists-archives.org

[MPlayer-dev-eng] [PATCH] Support for DragonFly BSD




The attached patch adds support for DragonFly BSD. The patch adds /usr/pkg 
to extra paths for NetBSD as well - both NetBSD and DragonFly use pkgsrc 
package management system.

And to answer to the (obvious for outsider) questions "Why not just define 
FreeBSD, DragonFly is just FreeBSD 4 and some more?" ... Although I share 
a lot of code, same can be said about other BSD's. There are already some 
differences in the patch.


regards,

-- 
Hasso Tepper
Index: configure
===================================================================
--- configure	(revision 26273)
+++ configure	(working copy)
@@ -107,7 +107,8 @@
 netbsd()  { issystem "NetBSD"  ; return "$?" ; }
 bsdos()   { issystem "BSD/OS"  ; return "$?" ; }
 openbsd() { issystem "OpenBSD" ; return "$?" ; }
-bsd()     { freebsd || netbsd || bsdos || openbsd ; return "$?" ; }
+dragonfly() { issystem "DragonFly" ; return "$?" ; }
+bsd()     { freebsd || netbsd || bsdos || openbsd || dragonfly ; return "$?" ; }
 qnx()     { issystem "QNX"     ; return "$?" ; }
 darwin()  { issystem "Darwin"  ; return "$?" ; }
 gnu()     { issystem "GNU"     ; return "$?" ; }
@@ -1212,7 +1213,7 @@
   # OS name
   system_name=`uname -s 2>&1`
   case "$system_name" in
-  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX|AmigaOS)
+  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|DragonFly|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX|AmigaOS)
     ;;
   IRIX*)
     system_name=IRIX
@@ -1289,6 +1290,7 @@
     netbsd) system_name=NetBSD ;;
     bsd/os) system_name=BSD/OS ;;
     openbsd) system_name=OpenBSD ;;
+    dragonfly) system_name=DragonFly ;;
     sunos) system_name=SunOS ;;
     qnx) system_name=QNX ;;
     morphos) system_name=MorphOS ;;
@@ -1315,6 +1317,11 @@
   _inc_extra="$_inc_extra -I/usr/local/include"
 fi
 
+if netbsd || dragonfly ; then
+  _ld_extra="$_ld_extra -L/usr/pkg/lib"
+  _inc_extra="$_inc_extra -I/usr/pkg/include"
+fi
+
 if darwin; then
   _ld_extra="$_ld_extra -L/usr/local/lib"
   _inc_extra="$_inc_extra -I/usr/local/include"
@@ -2984,7 +2991,7 @@
   _def_malloc='#undef HAVE_MALLOC_H'
 fi
 # malloc.h emits a warning in FreeBSD and OpenBSD
-freebsd || openbsd && _def_malloc='#undef HAVE_MALLOC_H'
+freebsd || openbsd || dragonfly && _def_malloc='#undef HAVE_MALLOC_H'
 echores "$_malloc"
 
 
@@ -4269,7 +4276,7 @@
 _vidix_drv_unichrome=no
 if test "$_vidix_internal" = auto ; then
   _vidix_internal=no
-  x86 && (linux || freebsd || netbsd || openbsd || sunos || win32) \
+  x86 && (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32) \
     && _vidix_internal=yes
   (ppc || alpha) && linux && _vidix_internal=yes
 fi
@@ -5387,7 +5394,7 @@
 
 
 echocheck "VCD support"
-if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32; then
+if linux || bsdos || freebsd || netbsd || dragonfly || sunos || darwin || mingw32; then
   _inputmodules="vcd $_inputmodules"
   _def_vcd='#define HAVE_VCD 1'
   _vcd="yes"
@@ -5404,7 +5411,7 @@
 echocheck "dvdread"
 if test "$_dvdread_internal" = auto ; then
   _dvdread_internal=no
-  if (linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux) && \
+  if (linux || freebsd || netbsd || darwin || openbsd || dragonfly || win32 || sunos || hpux) && \
       (test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || \
       test "$_dvdio" = yes || test "$_bsdi_dvd" = yes); then
     _dvdread_internal=yes
@@ -5456,7 +5463,7 @@
   if linux || netbsd || openbsd || bsdos ; then
     _def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1'
     openbsd && _dev_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1'
-  elif freebsd ; then
+  elif freebsd || dragonfly ; then
     _def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1'
   elif darwin ; then
     _def_dvd_darwin='#define DARWIN_DVD_IOCTL'
@@ -6265,7 +6272,7 @@
   _real=no
   _res_comment="dynamic loader support needed"
   if test "$_dl" = yes || test "$_win32dll" = yes &&
-     (linux || freebsd || netbsd || win32 || darwin) ; then
+     (linux || freebsd || netbsd || dragonfly || win32 || darwin) ; then
     _real=yes
   fi
 fi
@@ -8391,6 +8398,9 @@
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #define DEFAULT_CDROM_DEVICE	"/dev/acd0"
 #define DEFAULT_DVD_DEVICE	DEFAULT_CDROM_DEVICE
+#elif defined(__DragonFly__)
+#define DEFAULT_CDROM_DEVICE	"/dev/cd0"
+#define DEFAULT_DVD_DEVICE	DEFAULT_CDROM_DEVICE
 #elif defined(__AMIGAOS4__)
 #define DEFAULT_CDROM_DEVICE    "a1ide.device:2"
 #define DEFAULT_DVD_DEVICE	DEFAULT_CDROM_DEVICE
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng