[MPlayer-dev-eng] [PATCH] OpenBSD, take 2
Björn Sandell
biorn at dce.chalmers.se
Sun Apr 28 03:05:40 CEST 2002
Howdy,
Time for my second patch. Contents:
* Fixes mp3lib as suggested
* Implements same fix for loader/stub.s
* Documentation (sort of)
* Link with libi386 when needed
* Link with libossaudio (always)
Björn Sandell DCE/DFS Sysadmin IT department
Chalmers University of Technology www.dce.chalmers.se
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.182
diff -u -r1.182 Makefile
--- Makefile 26 Apr 2002 19:47:55 -0000 1.182
+++ Makefile 28 Apr 2002 00:58:13 -0000
@@ -73,6 +73,9 @@
endif
LOADER_DEP = $(W32_DEP) $(DS_DEP)
LIB_LOADER = $(W32_LIB) $(DS_LIB)
+ifeq ($(TARGET_OS),OpenBSD)
+LIB_LOADER += -li386
+endif
ALL_PRG = $(PRG)
ifeq ($(MENCODER),yes)
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.448
diff -u -r1.448 configure
--- configure 27 Apr 2002 22:42:23 -0000 1.448
+++ configure 28 Apr 2002 00:58:14 -0000
@@ -3509,6 +3509,7 @@
_ld_arch="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
bsdos && _ld_arch="$_ld_arch -ldvd"
netbsd && _ld_arch="$_ld_arch -li386 -lossaudio"
+openbsd && _ld_arch="$_ld_arch -lossaudio"
_def_debug='#undef MP_DEBUG'
test "$_debug" && _def_debug='#define MP_DEBUG 1'
Index: DOCS/documentation.html
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/documentation.html,v
retrieving revision 1.234
diff -u -r1.234 documentation.html
--- DOCS/documentation.html 27 Apr 2002 14:23:52 -0000 1.234
+++ DOCS/documentation.html 28 Apr 2002 00:58:14 -0000
@@ -242,6 +242,7 @@
<LI><A HREF="#6.4">6.4 StrongARM</A></LI>
<LI><A HREF="#6.5">6.5 SGI/Irix</A></LI>
<LI><A HREF="#6.6">6.6 QNX</A></LI>
+ <LI><A HREF="#6.7">6.7 OpenBSD</A></LI>
</UL>
<LI><A HREF="#A">A. Authors</A></LI>
<UL>
@@ -1605,6 +1606,28 @@
<P>The <CODE>-vo x11</CODE> output will be even slower than on Linux, since
QNX has only X <I>emulation</I> which is VERY slow. Use SDL.</P>
+
+
+<P><B><A NAME=6.7>6.7. OpenBSD</A></B></P>
+
+<P>To build the package you will need GNU make (gmake,
+/usr/ports/devel/gmake), native BSD make will not work, and a recent
+binutils (including objcopy).</P>
+
+<P> Presently you must give the option '--disable-mpdvdkit' to
+configure, else it won't compile. </P>
+
+<P>Due to limitations in different versions of gas (relocation vs mmx)
+, you'll need to compile in two steps: First make sure that the
+non-native as is first in PATH and do a 'gmake -k', then make sure
+that the native version i used an do 'gmake'.</P>
+
+<P>To w32-dll's with <B>MPlayer</B> you will need to re-compile the
+kernel with "option USER_LDT".</P>
+
+<P>If <B>MPlayer</B> complains about not finding '/dev/cdrom' or
+'/dev/dvd' make a symbolic link, eg <CODE>ln -s
+/dev/(your_cdrom_device) /dev/cdrom</CODE></P>
<P><B><A NAME=A>Appendix A - Authors</A></B></P>
Index: loader/Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/loader/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- loader/Makefile 24 Apr 2002 21:16:27 -0000 1.7
+++ loader/Makefile 28 Apr 2002 00:58:14 -0000
@@ -32,6 +32,9 @@
libloader.a: $(LIB_OBJECTS) stubs.s
$(CC) -c ./stubs.s -o stubs.o
+ifeq ($(TARGET_OS),OpenBSD)
+ ./loader_objfix.sh
+endif
$(AR) -r libloader.a $(LIB_OBJECTS) stubs.o
dep:
Index: mp3lib/Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- mp3lib/Makefile 13 Apr 2002 19:14:34 -0000 1.27
+++ mp3lib/Makefile 28 Apr 2002 00:58:14 -0000
@@ -38,7 +38,9 @@
ifeq ($(TARGET_OS),CYGWIN)
./mp3lib_objfix.sh
endif
-
+ifeq ($(TARGET_OS),OpenBSD)
+ ./mp3lib_objfix.sh
+endif
test1: libMP3.a test.c
$(CC) $(CFLAGS) test.c ../libvo/aclib.c -o test1 -I.. -L. -lMP3 -lm
Index: loader/loader_objfix.sh
===================================================================
--- /dev/null Sun Apr 28 02:34:40 2002
+++ loader/loader_objfix.sh Sun Apr 28 01:00:29 2002
@@ -0,0 +1,11 @@
+#!/bin/sh
+# This script fixes up symbol mangling in GNU as code of stubs.s.
+# This file is licensed under the GPL, more info at http://www.fsf.org/
+for i in "export_names" \
+ "printf" \
+ "exp_EH_prolog" \
+ "unk_exp1"
+do
+echo "fixing: $i=_$i"
+objcopy --redefine-sym "$i=_$i" stubs.o
+done
More information about the MPlayer-dev-eng
mailing list