Hi ! OSS4 has finally been accepted into Debian [1] !
The package is usable, though it probably need some more polishing. As a first task, we had to make it compile on every architecture supported by Debian. This has lead to some patches which you will find attached. They fix the compilation only for the binaries, and the modules still need to be tested. These patches are: * arch_without_mregparm.patch * fix_invalid_printf.patch * sharedlib.patch Also, it would be very usefull to us if at some point the oss4 distribution would allow to create a seperate source-code tree for the modules in order to compile them on each destination host. This would also help to distribute the freebsd modules for the two freebsd- based architectures supported by Debian. I have not checked the latest releases, but this was not possible the last time I checked. Additionally, I also send you other patch that you may want to consider. * cmd.patch: Use /var/lib/oss4 for saved old devices in ossdevlinks and savemixer. This path is more standard than /usr/lib/oss4/etc... * os_cmd.patch: Use /etc/oss4 for the configuration directory. Again this path is more standard than /usr/lib/oss4/etc.. Romain [1]: http://packages.debian.org/source/sid/oss4
Index: oss-v4.2-build2000-src-gpl/setup/srcconf_linux.inc =================================================================== --- oss-v4.2-build2000-src-gpl.orig/setup/srcconf_linux.inc 2009-11-27 19:05:11.000000000 -0600 +++ oss-v4.2-build2000-src-gpl/setup/srcconf_linux.inc 2009-11-27 19:05:41.000000000 -0600 @@ -53,7 +53,9 @@ fprintf (f, "CFLAGS += -O3 -fno-common -mcmodel=kernel -mno-red-zone -fno-asynchronous-unwind-tables -ffreestanding%s\n", fnsp); # else -# ifndef __arm__ +# if defined(__arm__) || defined(__sh__) || defined(__mips__) || defined(__sparc__) || defined(__ia64__) || defined(__alpha__) || defined(__s390__) || defined(__powerpc__) || defined(__hppa__) + fprintf (f, "CFLAGS += -O3 -fno-common -ffreestanding%s\n", fnsp); +# else if (getenv ("NO_REGPARM") == NULL) { fprintf (f, @@ -63,8 +65,6 @@ { fprintf (f, "CFLAGS += -O3 -fno-common -ffreestanding -DNO_REGPARM%s\n", fnsp); } -# else - fprintf (f, "CFLAGS += -O3 -fno-common -ffreestanding%s\n", fnsp); # endif # endif }
Index: oss-v4.2-build2000-src-gpl/setup/elflib.inc =================================================================== --- oss-v4.2-build2000-src-gpl.orig/setup/elflib.inc 2009-11-27 18:48:40.000000000 -0600 +++ oss-v4.2-build2000-src-gpl/setup/elflib.inc 2009-11-27 19:01:01.000000000 -0600 @@ -81,7 +81,11 @@ } if (hdr->e_ehsize != sizeof (*hdr)) { - fprintf (stderr, "e_ehsize=%x (%x)\n", hdr->e_ehsize, sizeof (*hdr)); + #if defined(__alpha__) || defined(__s390__) || defined(__ia64__) + fprintf (stderr, "e_ehsize=%x (%lx)\n", hdr->e_ehsize, sizeof (*hdr)); + #else + fprintf (stderr, "e_ehsize=%x (%x)\n", hdr->e_ehsize, sizeof (*hdr)); + #endif return 0; }
Index: /oss-build/setup/srcconf.c =================================================================== --- oss-build/setup/srcconf.c 2009-11-26 23:44:46.000000000 -0600 +++ oss-build/setup/srcconf.c 2009-11-26 23:44:48.000000000 -0600 @@ -1181,7 +1181,7 @@ fprintf (f, "$(LIBDIR)/%s.so:\t$(OBJECTS)\n", name); fprintf (f, - "\t$(LD) $(LDFLAGS) %s -o $(LIBDIR)/%s.so $(OBJECTS)\n", + "\t$(CC) $(LDFLAGS) %s -o $(LIBDIR)/%s.so $(OBJECTS)\n", shlib_ldflags, name); fprintf (f, "\n\n"); }
Index: /oss-build/cmd/ossdevlinks/ossdevlinks.c =================================================================== --- oss-build/cmd/ossdevlinks/ossdevlinks.c 2009-11-26 23:39:42.000000000 -0600 +++ oss-build/cmd/ossdevlinks/ossdevlinks.c 2009-11-26 23:40:23.000000000 -0600 @@ -73,7 +73,7 @@ #if defined(sun) #define DEFAULT_OSSLIBDIR "/etc/oss" #else -#define DEFAULT_OSSLIBDIR "/usr/lib/oss" +#define DEFAULT_OSSLIBDIR "/var/lib/oss4" #endif static char * @@ -97,7 +97,7 @@ if (l > 0 && tmp[l - 1] == '\n') tmp[l - 1] = '\0'; - if (strncmp (tmp, "OSSLIBDIR=", 10) == 0) + if (strncmp (tmp, "OSSVARDIR=", 10) == 0) { l = snprintf (name, sizeof (name), "%s", &tmp[10]); if ((l >= OSSLIBDIRLEN) || (l < 0)) @@ -989,7 +989,7 @@ char lfile[PATH_MAX+20], * osslibdir; osslibdir = get_mapname (); - snprintf (lfile, sizeof (lfile), "%s/%s", osslibdir, "etc/legacy_devices"); + snprintf (lfile, sizeof (lfile), "%s/%s", osslibdir, "legacy_devices"); if ((f = fopen (lfile, "w")) == NULL) { perror (lfile); Index: /oss-build/cmd/ossdevlinks/ossdevlinks.man =================================================================== --- oss-build/cmd/ossdevlinks/ossdevlinks.man 2009-11-26 23:39:42.000000000 -0600 +++ oss-build/cmd/ossdevlinks/ossdevlinks.man 2009-11-26 23:40:23.000000000 -0600 @@ -33,7 +33,7 @@ FILES /usr/sbin/ossdevlinks -/usr/lib/oss/etc/legacy_devices +/var/lib/oss4/legacy_devices /dev/dspN /dev/midiNN /dev/mixerN Index: /oss-build/cmd/savemixer/savemixer.c =================================================================== --- oss-build/cmd/savemixer/savemixer.c 2009-11-26 23:39:42.000000000 -0600 +++ oss-build/cmd/savemixer/savemixer.c 2009-11-26 23:40:23.000000000 -0600 @@ -269,14 +269,14 @@ get_mapname (void) { FILE *f; - char tmp[ETCDIRLEN+11]; /* Adding 'OSSLIBDIR=' */ - static char name[ETCDIRLEN+15]; /* Adding '/etc/mixer.save' */ + char tmp[ETCDIRLEN+11]; /* Adding 'OSSVARDIR=' */ + static char name[ETCDIRLEN+10]; /* Adding 'mixer.save' */ struct stat st; - if (stat ("/etc/oss", &st) != -1) /* Use /etc/oss/mixer.save */ + if (stat ("/var/lib/oss4", &st) != -1) /* Use /var/lib/oss4/mixer.save */ { - strcpy (name, "/etc/oss/mixer.save"); - strcpy (ossetcdir, "/etc/oss"); + strcpy (name, "/var/lib/oss4/mixer.save"); + strcpy (ossetcdir, "/var/lib/oss4"); return name; } @@ -292,15 +292,15 @@ if (l > 0 && tmp[l - 1] == '\n') tmp[l - 1] = '\0'; - if (strncmp (tmp, "OSSLIBDIR=", 10) == 0) + if (strncmp (tmp, "OSSVARDIR=", 10) == 0) { - l = snprintf (name, sizeof (name), "%s/etc/mixer.save", &tmp[10]); + l = snprintf (name, sizeof (name), "%s/mixer.save", &tmp[10]); if ((l >= sizeof (name)) || (l < 0)) { fprintf (stderr, "String in /etc/oss.conf is too long!\n"); goto oexit; } - snprintf (ossetcdir, sizeof (ossetcdir), "%s/etc", &tmp[10]); + snprintf (ossetcdir, sizeof (ossetcdir), "%s", &tmp[10]); if ((l >= sizeof (ossetcdir)) || (l < 0)) { fprintf (stderr, "String in /etc/oss.conf is too long!\n"); @@ -312,7 +312,7 @@ } fclose (f); - fprintf (stderr, "Error: OSSLIBDIR not set in /etc/oss.conf\n"); + fprintf (stderr, "Error: OSSVARDIR not set in /etc/oss.conf\n"); dexit: snprintf (name, sizeof (name), "%s/mixer.save", ossetcdir); Index: /oss-build/cmd/savemixer/savemixer.man =================================================================== --- oss-build/cmd/savemixer/savemixer.man 2009-11-26 23:39:42.000000000 -0600 +++ oss-build/cmd/savemixer/savemixer.man 2009-11-26 23:40:23.000000000 -0600 @@ -9,8 +9,8 @@ settings back into the mixer. Running this program without any parameters will save the current mixer -settings into /etc/oss/mixer.save or $OSSLIBDIR/etc/mixer.save file. -OSSLIBDIR is decided by reading /etc/oss.conf, and defaults to /usr/lib/oss. +settings into /var/lib/oss4/mixer.save or $OSSVARDIR/mixer.save file. +OSSVARDIR is decided by reading /etc/oss.conf, and defaults to /var/lib/oss4. AUTOMATIC SAVE By default the soundoff command will automatically run savemixer to save @@ -29,9 +29,9 @@ FILES /etc/oss.conf /usr/sbin/savemixer -/usr/lib/oss/etc/mixer.save -/usr/lib/oss/etc/dspdevs.map -/usr/lib/oss/etc/applist.conf +/var/lib/oss4/mixer.save +/var/lib/oss4/dspdevs.map +/var/lib/oss4/applist.conf AUTHOR 4Front Technologies
Index: /oss-build/os_cmd/Linux/ossdetect/ossdetect.c =================================================================== --- oss-build/os_cmd/Linux/ossdetect/ossdetect.c 2009-11-27 00:06:58.000000000 -0600 +++ oss-build/os_cmd/Linux/ossdetect/ossdetect.c 2009-11-27 00:06:59.000000000 -0600 @@ -90,7 +90,7 @@ if (l > 0 && tmp[l - 1] == '\n') tmp[l - 1] = '\0'; - if (strncmp (tmp, "OSSLIBDIR=", 10) == 0) + if (strncmp (tmp, "OSSETCDIR=", 10) == 0) { l = snprintf (name, sizeof (name), "%s", &tmp[10]); if ((l >= OSSLIBDIRLEN) || (l < 0)) @@ -109,11 +109,11 @@ } } - fprintf (stderr, "OSSLIBDIR not set in /etc/oss.conf, using default " - "/usr/lib/oss\n"); + fprintf (stderr, "OSSETCDIR not set in /etc/oss.conf, using default " + "/etc/oss4\n"); oexit: fclose (f); - snprintf (name, sizeof (name), "/usr/lib/oss"); + snprintf (name, sizeof (name), "/etc/oss4"); return name; } @@ -646,7 +646,7 @@ exit (0); } - load_devlist ("etc/devices.list", 0); + load_devlist ("devices.list", 0); if (stat ("/etc/oss_3rdparty", &st) != -1) load_devlist ("/etc/oss_3rdparty", 1); @@ -672,7 +672,7 @@ } snprintf (instfname, sizeof (instfname), "%s/%s", osslibdir, - "etc/installed_drivers"); + "installed_drivers"); if ((f = fopen (instfname, "w")) == NULL) { Index: /oss-build/os_cmd/Linux/ossdetect/ossdetect.man =================================================================== --- oss-build/os_cmd/Linux/ossdetect/ossdetect.man 2009-11-27 00:06:58.000000000 -0600 +++ oss-build/os_cmd/Linux/ossdetect/ossdetect.man 2009-11-27 00:06:59.000000000 -0600 @@ -6,9 +6,10 @@ DESCRIPTION The ossdetect application performs automatic detection of soundcards. -The application looks at the /usr/lib/oss/etc/device.list and performs +The application looks at the $OSSETCDIR/device.list and performs automatic detection. It will create a file with the list of the configured -drivers in /usr/lib/oss/etc/installed_drivers. +drivers in $OSSETCDIR/installed_drivers. +OSSETCDIR is decided by reading /etc/oss.conf, and defaults to /etc/oss4. The Input Multiplexer driver (IMUX) is not configured by default and can be added to the OSS configuration using the -i option. @@ -26,6 +27,7 @@ ossdevlinks(1), ossinfo(1) FILES +/etc/oss.conf /usr/sbin/ossdetect AUTHOR
_______________________________________________ oss-devel mailing list oss-devel@mailman.opensound.com http://mailman.opensound.com/mailman/listinfo/oss-devel