[Pkg-wmaker-commits] [wmrack] 29/97: incorporate Knut Anders Hatien's patch to allow building on Solaris and FreeBSD

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sat Aug 22 02:42:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmrack.

commit 7e6a642a2267f9224dc778c13489887999dd6028
Author: Chris Waters <xtifr.w at gmail.com>
Date:   Thu Mar 8 17:47:30 2012 -0800

    incorporate Knut Anders Hatien's patch to allow building on Solaris and FreeBSD
---
 CHANGES      |  3 +++
 Makefile.in  |  3 ++-
 README       | 12 ++++++++++--
 TODO         |  4 +++-
 cdrom.c      | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 configure.in |  1 +
 6 files changed, 78 insertions(+), 8 deletions(-)

diff --git a/CHANGES b/CHANGES
index 9efe3ad..b98aa97 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,7 @@
 1.3 -> 1.4
+- Incorporate patch from Knut Anders Hatlen to provide support for
+  Solaris and FreeBSD systems.  Should probably still be considered
+  somewhat experimental, but Knut says it works for him.
 - modify configure.in to not assume that X11 requires extra include
   and library paths (X11R6 does; X11R7 usually does not).
 - change the main polling frequency from 5000 usec (1/200th sec) to a
diff --git a/Makefile.in b/Makefile.in
index b8a2acf..8583e58 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -6,6 +6,7 @@
 CC		= @CC@
 CFLAGS		= @CFLAGS@
 LIBS		= @LIBS@
+CPPFLAGS	= @CPPFLAGS@
 INSTALL		= @INSTALL@
 INSTALL_DATA	= @INSTALL_DATA@
 RM		= rm -f
@@ -64,6 +65,6 @@ distclean: binclean
 depend: standart.style .depend
 
 .depend:
-	gcc -M $(SOURCES) >> Makefile
+	gcc $(CPPFLAGS) -M $(SOURCES) >> Makefile
 	echo "Done" > .depend
 
diff --git a/README b/README
index 7264e66..6885f47 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-wmrack 1.3
+wmrack 1.4
 
 The WindowMaker Sound Control Panel by Oliver Graf
 Currently maintained by Chris Waters <xtifr at users.sourceforge.net>
@@ -26,6 +26,9 @@ Mixer Functions:
  * control balance
  * change record sources
 
+Currently supported platforms are: Linux (stable), Solaris
+(experimental) and FreeBSD (experimental).
+
 INSTALLATION:
 -------------
 First you need to configure the whole package with:
@@ -39,6 +42,11 @@ default.
 After this a 'make' will compile WMRack and a 'make install' will
 install it.
 
+Special note to Solaris users: Solaris support is new as-of release
+1.4, and it should be considered somewhat experimental.  You will
+probably need to install the OSS drivers from www.opensound.com before
+configuring/installing (although future versions of OpenSolaris may
+incorporate OSS, so you might be able to skip this step).
 
 USAGE:
 ------
@@ -74,4 +82,4 @@ the progress of work, almost any part that was stolen, has been rewritten,
 restructured, and overworked.
 
 -----
-$Id: README,v 1.3 2006/04/22 06:33:45 xtifr Exp $
+$Id: README,v 1.4 2007/11/25 23:54:46 xtifr Exp $
diff --git a/TODO b/TODO
index 7799689..4980eef 100644
--- a/TODO
+++ b/TODO
@@ -18,4 +18,6 @@ may or may not bear any resemblance to actual plans.  The new maintainer
 
 I also have at least one item to add:
 
-- Enhance portability (not so Linux specific).
+- Enhance portability (not so Linux specific).  Note, as of v1.4, this
+  is at least _partially_ accomplished, with the addtion of
+  experimental support for Solaris and FreeBSD.
\ No newline at end of file
diff --git a/cdrom.c b/cdrom.c
index 9a63070..46903d7 100644
--- a/cdrom.c
+++ b/cdrom.c
@@ -1,13 +1,11 @@
 /*
- * $Id: cdrom.c,v 1.3 2003/10/01 22:44:19 xtifr Exp $
+ * $Id: cdrom.c,v 1.4 2007/11/25 23:54:46 xtifr Exp $
  *
  * cdrom utility functions for WMRack
  *
  * Copyright (c) 1997 by Oliver Graf <ograf at fga.de>
  *
  * some hints taken from WorkBone
- *
- * this is very linux specific !!!
  */
 
 #include <stdio.h>
@@ -22,10 +20,61 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
-#include <sys/vfs.h>
 
 #ifdef linux
+#  include <sys/vfs.h>
 #  include <linux/cdrom.h>
+#elif defined(__sun) && defined(__SVR4) /* Solaris */
+#  include <sys/cdio.h>
+#  include <sys/statvfs.h>
+#  define statfs statvfs
+#elif defined(__FreeBSD__)
+#  include <sys/mount.h>
+#  include <sys/cdio.h>
+
+#  define cdrom_tocentry ioc_read_toc_single_entry
+#  define cdte_track track
+#  define cdte_format address_format
+#  define cdte_ctrl entry.control
+#  define cdte_addr entry.addr
+#  define CDROMREADTOCENTRY CDIOREADTOCENTRY
+#  define CDROM_LEADOUT 0xAA
+#  define CDROM_MSF CD_MSF_FORMAT
+#  define CDROM_DATA_TRACK 4
+
+#  define cdrom_tochdr ioc_toc_header
+#  define cdth_trk0 starting_track
+#  define cdth_trk1 ending_track
+#  define CDROMREADTOCHDR CDIOREADTOCHEADER
+
+#  define cdrom_msf ioc_play_msf
+#  define cdmsf_min0 start_m
+#  define cdmsf_sec0 start_s
+#  define cdmsf_frame0 start_f
+#  define cdmsf_min1 end_m
+#  define cdmsf_sec1 end_s
+#  define cdmsf_frame1 end_f
+
+#  define cdrom_subchnl ioc_read_subchannel
+#  define cdsc_format address_format
+#  define cdsc_audiostatus data->header.audio_status
+#  define cdsc_trk data->what.position.track_number
+#  define cdsc_absaddr data->what.position.absaddr
+#  define cdsc_reladdr data->what.position.reladdr
+#  define CDROMSUBCHNL CDIOCREADSUBCHANNEL
+#  define CDROM_AUDIO_INVALID CD_AS_AUDIO_INVALID
+#  define CDROM_AUDIO_PLAY CD_AS_PLAY_IN_PROGRESS
+#  define CDROM_AUDIO_PAUSED CD_AS_PLAY_PAUSED
+#  define CDROM_AUDIO_COMPLETED CD_AS_PLAY_COMPLETED
+#  define CDROM_AUDIO_NO_STATUS CD_AS_NO_STATUS
+
+#  define CDROMPLAYMSF CDIOCPLAYMSF
+#  define CDROMPAUSE CDIOCPAUSE
+#  define CDROMRESUME CDIOCRESUME
+#  define CDROMSTART CDIOCSTART
+#  define CDROMSTOP CDIOCSTOP
+#  define CDROMEJECT CDIOCEJECT
+
 #else
 #  include <sundev/srreg.h>
 #endif /* linux */
@@ -358,6 +407,12 @@ int cd_getStatus(CD *cd, int reopen, int force)
   int                  ret=1, newcd=0, im_stop=0;
   CDPosition           *cur;
   struct timeval       now;
+#ifdef __FreeBSD__
+  struct cd_sub_channel_info data;
+  sc.data = &data;
+  sc.data_len = sizeof(data);
+  sc.data_format = CD_CURRENT_POSITION;
+#endif
 
   if (cd==NULL)
     return -1;
diff --git a/configure.in b/configure.in
index d15487a..a7b398c 100644
--- a/configure.in
+++ b/configure.in
@@ -56,6 +56,7 @@ if test "x$no_x" = "xyes"; then
 else
   CFLAGS="$CFLAGS ${x_includes:+-I$x_includes}"
   LIBS="$LIBS ${x_libraries:+-L$x_libraries} -lX11"
+  CPPFLAGS="$CPPFLAGS ${x_includes:+-I$x_includes}"
 fi
 
 dnl check for Xpm

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmrack.git



More information about the Pkg-wmaker-commits mailing list