vlc -> BSD/OS 4.3beta1
Steven M. Schultz
sms at TO.GD-ES.COM
Tue Jul 31 00:14:29 CEST 2001
Greetings!
Thank you *very much* for vlc-0.2.81!
This version, with only 6 minor changes (primarily in the Makefile*
files), now runs on BSD/OS 4.3beta (I am one of the beta testers for
BSDI)!
Only two .c files needed to be changed: ioctl.c and input_ps.c
I do have a "Linux ioctl emulation" library which has the ioctl
definitions in "dvd.h" - the only change to ./extras/libdvdcss/ioctl.c
was to put a "ifdef __bsdi__" around one small block of lines at the
top of the file.
In ./plugins/mpeg/input_ps.c I needed to compensate for the lack of
"fseeko()" - again a very small change ifdef'd on __bsdi__
The ./extras/libdvdcss/Makefile needed to conditionally add "-ldvd",
I think I did it in a portable manner that will not break existing
systems.
The change to ./Makefile.dep is to work around a bug in BSD/OS -
trailing slashes in a 'mkdir' command cause an error. The 'dirname'
program exists on FreeBSD, Linux, etc so using it should not break
anything but if you do not wish to include this change I understand.
The last change was to ./configure.in - I needed to test for 'bsdi*'
and set SYS to simply 'bsdi'.
That's all I had to do. Then I sat back and watched movies the
rest of the evening :)
Thanks again - 'vlc' is so much more stable than 'xine' that I do not
think I will bother trying to make 'xine' work correctly on BSD systems.
Steven Schultz
sms at to.gd-es.com
===============================cut here=============================
--- ./extras/libdvdcss/ioctl.c.dist Tue Jul 24 17:23:40 2001
+++ ./extras/libdvdcss/ioctl.c Sun Jul 29 12:46:11 2001
@@ -60,6 +60,11 @@
# include "DVDioctl/DVDioctl.h"
#endif
+#ifdef __bsdi__
+#include <dvd.h>
+#define DVD_STRUCT_IN_LINUX_CDROM_H 1
+#endif
+
#include "ioctl.h"
/*****************************************************************************
--- ./extras/libdvdcss/Makefile.dist Fri Jul 27 08:46:40 2001
+++ ./extras/libdvdcss/Makefile Mon Jul 30 11:35:59 2001
@@ -21,8 +21,14 @@
$(LIBDVDCSS_O): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+ifeq ($(SYS),bsdi)
+EXTRALIBS += -ldvd
+else
+EXTRALIBS += ""
+endif
+
../../lib/libdvdcss.so.$(LIBDVDCSS_VERSION): $(LIBDVDCSS_O)
- $(CC) $(PCFLAGS) -Wl,-soname -Wl,libdvdcss.so.$(LIBDVDCSS_MAJOR) -o $@ $^ $(PLCFLAGS)
+ $(CC) $(PCFLAGS) -Wl,-soname -Wl,libdvdcss.so.$(LIBDVDCSS_MAJOR) -o $@ $^ $(PLCFLAGS) $(EXTRALIBS)
rm -f ../../lib/libdvdcss.so && ln -s libdvdcss.so.$(LIBDVDCSS_VERSION) ../../lib/libdvdcss.so
rm -f ../../lib/libdvdcss.so.$(LIBDVDCSS_MAJOR) && ln -s libdvdcss.so.$(LIBDVDCSS_VERSION) ../../lib/libdvdcss.so.$(LIBDVDCSS_MAJOR)
--- ./plugins/mpeg/input_ps.c.dist Fri Jul 27 19:30:23 2001
+++ ./plugins/mpeg/input_ps.c Sun Jul 29 12:33:41 2001
@@ -71,6 +71,19 @@
#include "modules.h"
#include "modules_export.h"
+#ifdef __bsdi__
+#include <stdio.h>
+
+int __sfseek __P((FILE *, fpos_t, int));
+fpos_t __sftell __P((FILE *));
+
+int
+fseeko(FILE *fp, off_t offset, int whence)
+ {
+ return(__sfseek(fp, offset, whence));
+ }
+#endif
+
/*****************************************************************************
* Local prototypes
*****************************************************************************/
--- ./Makefile.dep.dist Fri Jul 27 19:30:25 2001
+++ ./Makefile.dep Sun Jul 29 12:31:02 2001
@@ -46,7 +46,7 @@
-include $(MAKECMDGOALS)
$(C_DEP): .dep/%.d: %.c
- @test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*)
+ @test -d .dep/$(dir $*) || mkdir -p `dirname .dep/$*`
@echo "regenerating dependencies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
@@ -54,7 +54,7 @@
[ -s $@ ] || rm -f $@'
$(CPP_DEP): .dep/%.dpp: %.cpp
- @test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*)
+ @test -d .dep/$(dir $*) || mkdir -p `dirname .dep/$*`
@echo "regenerating dependencies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
--- ./Makefile.opts.in.dist Fri Jul 27 19:30:25 2001
+++ ./Makefile.opts.in Sun Jul 29 20:47:45 2001
@@ -173,6 +173,10 @@
LIB += -L/usr/local/lib @LIB@
+ifeq ($(SYS),bsdi)
+LIB += -ldvd
+endif
+
#
# C compiler flags: mainstream compilation
#
--- ./configure.in.dist Fri Jul 27 19:30:25 2001
+++ ./configure.in Mon Jul 30 11:33:46 2001
@@ -223,6 +223,9 @@
dnl Check the operating system
dnl
case ${host_os} in
+ bsdi*)
+ SYS=bsdi
+ ;;
darwin*)
SYS=darwin
;;
More information about the vlc
mailing list