don't build shared libs on the alpha; only one patch per patch file

This commit is contained in:
marc 1998-06-30 22:29:09 +00:00
parent c9819a7626
commit d651593a6d
8 changed files with 176 additions and 193 deletions

View File

@ -3,19 +3,30 @@
# Date created: December 17, 1997
# Whom: Don Schmidt
#
# $OpenBSD: Makefile,v 1.1.1.1 1997/12/20 03:17:26 don Exp $
# $OpenBSD: Makefile,v 1.2 1998/06/30 22:29:09 marc Exp $
#
DISTNAME= mpeg_lib-1.2.1
CATEGORIES= graphics
MAINTAINER= marc@OpenBSD.ORG
MASTER_SITES= ftp://ftp.mni.mcgill.ca/pub/mpeg/
MAINTAINER= don@OpenBSD.ORG
GNU_CONFIGURE= yup
CONFIGURE_ENV= ${SETENV}
WRKSRC= ${WRKDIR}/mpeg_lib
GNU_CONFIGURE= yup
# The patches assumed shared libs would be build. If building
# on a host that does not support shared libs, e.g. the alpha,
# apply one more patch.
#
.if (${MACHINE_ARCH} == "alpha")
post-patch:
@(cd ${DISTDIR}; ${PATCH} ${PATCH_DIST_ARGS} < ${FILESDIR}/patch)
.endif
pre-install:
@${MKDIR} -p ${PREFIX}/bin ${PREFIX}/lib ${PREFIX}/include

View File

@ -0,0 +1,19 @@
--- xx Tue Jun 30 15:14:22 1998
+++ Makefile.in Tue Jun 30 15:14:46 1998
@@ -39,7 +39,7 @@
# Targets for all platforms
-all: $(LIBRARY) ${SHLIBRARY} @extras@
+all: $(LIBRARY) @extras@
$(LIBRARY): $(LIBOBJ)
$(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ)
@@ -52,7 +52,6 @@
install:
install -c -m 444 ${LIBRARY} ${PREFIX}/lib
- install -c -m 444 ${SHLIBRARY} ${PREFIX}/lib
install -c -m 444 mpeg.h ${PREFIX}/include
@Makefile_extras@

View File

@ -1,151 +1,55 @@
*** Makefile.in.orig Mon Feb 26 12:12:54 1996
--- Makefile.in Thu Dec 18 19:36:45 1997
***************
*** 16,21 ****
--- 16,22 ----
RANLIB = @RANLIB@
SHELL = /bin/sh
--- Makefile.in.orig Mon Feb 26 10:12:54 1996
+++ Makefile.in Tue Jun 30 15:13:40 1998
@@ -16,6 +16,7 @@
RANLIB = @RANLIB@
SHELL = /bin/sh
+ .SUFFIXES: .so
+.SUFFIXES: .so
# Source for the library itself -- note that we define LIBSRC and
# LIBOBJ this way (instead of just LIBOBJ=$(LIBSRC:.c=.o) because
***************
*** 27,49 ****
mono.c ordered.c ordered2.c mb_ordered.c
LIBSRC = @libsrc@
LIBOBJ = @libobj@
# Source for the library itself -- note that we define LIBSRC and
# LIBOBJ this way (instead of just LIBOBJ=$(LIBSRC:.c=.o) because
@@ -27,23 +28,33 @@
mono.c ordered.c ordered2.c mb_ordered.c
LIBSRC = @libsrc@
LIBOBJ = @libobj@
+SHLIBOBJ = @shlibobj@
# Other files of interest
# Other files of interest
LIBRARY = libmpeg.a
MPEGTEST = mpegtest
LIBRARY = libmpeg.a
+SHLIBRARY = libmpeg.so.1.2
MPEGTEST = mpegtest
# Targets for all platforms
# Targets for all platforms
! all: $(LIBRARY) @extras@
-all: $(LIBRARY) @extras@
+all: $(LIBRARY) ${SHLIBRARY} @extras@
$(LIBRARY): $(LIBOBJ)
$(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ)
$(RANLIB) $(LIBRARY)
$(LIBRARY): $(LIBOBJ)
$(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ)
$(RANLIB) $(LIBRARY)
$(LIBOBJ): Makefile
@Makefile_extras@
clean:
--- 28,59 ----
mono.c ordered.c ordered2.c mb_ordered.c
LIBSRC = @libsrc@
LIBOBJ = @libobj@
+ SHLIBOBJ = @shlibobj@
# Other files of interest
LIBRARY = libmpeg.a
+ SHLIBRARY = libmpeg.so.1.2
MPEGTEST = mpegtest
# Targets for all platforms
! all: $(LIBRARY) ${SHLIBRARY} @extras@
$(LIBRARY): $(LIBOBJ)
$(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ)
$(RANLIB) $(LIBRARY)
+ $(SHLIBRARY): $(SHLIBOBJ)
+ ld -Bshareable -o $(SHLIBRARY) $(SHLIBOBJ)
+$(SHLIBRARY): $(SHLIBOBJ)
+ ld -Bshareable -o $(SHLIBRARY) $(SHLIBOBJ)
+
$(LIBOBJ): Makefile
$(LIBOBJ): Makefile
+ install:
+ install -c -m 444 ${LIBRARY} ${SHLIBRARY} ${PREFIX}/lib
+ install -c -m 444 mpeg.h ${PREFIX}/include
+install:
+ install -c -m 444 ${LIBRARY} ${PREFIX}/lib
+ install -c -m 444 ${SHLIBRARY} ${PREFIX}/lib
+ install -c -m 444 mpeg.h ${PREFIX}/include
+
@Makefile_extras@
@Makefile_extras@
clean:
***************
*** 53,58 ****
--- 63,71 ----
distclean: clean
rm -f config.cache config.log config.status Makefile config.h
cd extras && $(MAKE) distclean
clean:
@@ -53,6 +64,9 @@
distclean: clean
rm -f config.cache config.log config.status Makefile config.h
cd extras && $(MAKE) distclean
+
+ .c.so:
+ ${CC} ${CFLAGS} -fpic -DPIC -c $< -o $@
+.c.so:
+ ${CC} ${CFLAGS} -fpic -DPIC -c $< -o $@
# Include a system-specific Makefile fragment, if any
# Include a system-specific Makefile fragment, if any
*** configure.orig Mon Feb 26 11:58:27 1996
--- configure Thu Dec 18 19:36:45 1997
***************
*** 817,822 ****
--- 817,823 ----
if test $dither = yes; then
libsrc='$(DECODER_SRC) $(DITHER_SRC)'
libobj='$(DECODER_SRC:.c=.o) $(DITHER_SRC:.c=.o)'
+ shlibobj='$(DECODER_SRC:.c=.so) $(DITHER_SRC:.c=.so)'
cat >> confdefs.h <<\EOF
#define ENABLE_DITHER 1
EOF
***************
*** 825,830 ****
--- 826,832 ----
else
libsrc='$(DECODER_SRC)'
libobj='$(DECODER_SRC:.c=.o)'
+ shlibobj='$(DECODER_SRC:.c=.so)'
cat >> confdefs.h <<\EOF
#define ENABLE_DITHER 0
EOF
***************
*** 1459,1464 ****
--- 1461,1467 ----
s%@AR@%$AR%g
s%@libsrc@%$libsrc%g
s%@libobj@%$libobj%g
+ s%@shlibobj@%$shlibobj%g
s%@jrevdct@%$jrevdct%g
s%@extras@%$extras%g
/@Makefile_extras@/r $Makefile_extras
*** config.guess.orig Thu Dec 18 19:51:29 1997
--- config.guess Thu Dec 18 20:00:23 1997
***************
*** 311,316 ****
--- 311,319 ----
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*** config.sub.orig Thu Dec 18 20:03:37 1997
--- config.sub Thu Dec 18 20:06:00 1997
***************
*** 637,645 ****
| -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
| -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
| -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
! | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
! | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
! | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* )
# Remember, each alternative MUST END IN *, to match a version number.
;;
--- 637,645 ----
| -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
| -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
| -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
! | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* \
! | -riscix* | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* \
! | -elf* | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* )
# Remember, each alternative MUST END IN *, to match a version number.
;;

View File

@ -1,27 +1,12 @@
*** video.c.orig Wed Nov 16 13:43:47 1994
--- video.c Wed Nov 16 13:34:42 1994
***************
*** 39,44 ****
--- 39,48 ----
#include "util.h"
#include "proto.h"
+ #ifdef _HAVE_PARAM_H
+ #include <sys/param.h>
+ #endif
+
/* Declarations of functions. */
static void ReconIMBlock();
static void ReconPMBlock();
***************
*** 435,441 ****
--- 439,447 ----
static int num_calls = 0;
unsigned int data;
int i, status;
+ #if BSD < 199103
long int ftell (FILE *stream);
+ #endif
/* If vid_stream is null, create new VidStream structure. */
--- config.guess.orig Tue Oct 10 09:38:00 1995
+++ config.guess Tue Jun 30 15:07:28 1998
@@ -311,6 +311,9 @@
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;

View File

@ -1,12 +1,15 @@
--- wrapper.c.orig Tue Oct 10 16:08:39 1995
+++ wrapper.c Tue Oct 14 14:25:17 1997
@@ -390,7 +390,8 @@
dprintf ("\nGetMPEGFrame: just received a finished frame: "
"copying from %08X to %08X\n", CurrentImage, Frame);
- memcpy (Frame, CurrentImage, ImageInfo.Size);
+ if (!MovieDone)
+ memcpy (Frame, CurrentImage, ImageInfo.Size);
return (!MovieDone);
} /* GetMPEGFrame () */
--- config.sub.orig Tue Oct 10 09:38:00 1995
+++ config.sub Tue Jun 30 15:07:26 1998
@@ -637,9 +637,9 @@
| -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
| -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
| -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* \
+ | -riscix* | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* \
+ | -elf* | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* )
# Remember, each alternative MUST END IN *, to match a version number.
;;

View File

@ -0,0 +1,26 @@
--- configure.orig Mon Feb 26 09:58:27 1996
+++ configure Tue Jun 30 15:07:28 1998
@@ -817,6 +817,7 @@
if test $dither = yes; then
libsrc='$(DECODER_SRC) $(DITHER_SRC)'
libobj='$(DECODER_SRC:.c=.o) $(DITHER_SRC:.c=.o)'
+ shlibobj='$(DECODER_SRC:.c=.so) $(DITHER_SRC:.c=.so)'
cat >> confdefs.h <<\EOF
#define ENABLE_DITHER 1
EOF
@@ -825,6 +826,7 @@
else
libsrc='$(DECODER_SRC)'
libobj='$(DECODER_SRC:.c=.o)'
+ shlibobj='$(DECODER_SRC:.c=.so)'
cat >> confdefs.h <<\EOF
#define ENABLE_DITHER 0
EOF
@@ -1459,6 +1461,7 @@
s%@AR@%$AR%g
s%@libsrc@%$libsrc%g
s%@libobj@%$libobj%g
+s%@shlibobj@%$shlibobj%g
s%@jrevdct@%$jrevdct%g
s%@extras@%$extras%g
/@Makefile_extras@/r $Makefile_extras

View File

@ -0,0 +1,23 @@
--- video.c.orig Mon Sep 25 10:17:49 1995
+++ video.c Tue Jun 30 15:07:27 1998
@@ -40,6 +40,10 @@
#include "util.h"
#include "proto.h"
+#ifdef _HAVE_PARAM_H
+#include <sys/param.h>
+#endif
+
/* Declarations of functions. */
static void ReconIMBlock();
static void ReconPMBlock();
@@ -436,7 +440,9 @@
static int num_calls = 0;
unsigned int data;
int i, status;
+#if BSD < 199103
long int ftell (FILE *stream);
+#endif
/* If vid_stream is null, create new VidStream structure. */

View File

@ -0,0 +1,12 @@
--- wrapper.c.orig Tue Oct 10 14:08:39 1995
+++ wrapper.c Tue Jun 30 15:07:27 1998
@@ -390,7 +390,8 @@
dprintf ("\nGetMPEGFrame: just received a finished frame: "
"copying from %08X to %08X\n", CurrentImage, Frame);
- memcpy (Frame, CurrentImage, ImageInfo.Size);
+ if (!MovieDone)
+ memcpy (Frame, CurrentImage, ImageInfo.Size);
return (!MovieDone);
} /* GetMPEGFrame () */