diff --git a/graphics/mpeg-lib/Makefile b/graphics/mpeg-lib/Makefile index d1eb1f5eb8b..75a0ae53f6e 100644 --- a/graphics/mpeg-lib/Makefile +++ b/graphics/mpeg-lib/Makefile @@ -1,37 +1,21 @@ -# $OpenBSD: Makefile,v 1.10 1999/10/27 03:23:52 brad Exp $ +# $OpenBSD: Makefile,v 1.11 2000/01/09 05:56:33 brad Exp $ -DISTNAME= mpeg_lib-1.2.1 +DISTNAME= mpeg_lib-1.3.1 CATEGORIES= graphics -MASTER_SITES= ftp://ftp.mni.mcgill.ca/pub/mpeg/ +MASTER_SITES= ftp://ftp.bic.mni.mcgill.ca/pub/mpeg/ \ + http://starship.python.net/~gward/mpeglib/ -NEED_VERSION= 1.64 +NEED_VERSION= 1.73 MAINTAINER= brad@openbsd.org -HAS_CONFIGURE= yes -CONFIGURE_ARGS+= ${CONFIGURE_SHARED} -CONFIGURE_ARGS+= --prefix=${PREFIX} - -WRKSRC= ${WRKDIR}/mpeg_lib - -# post-patch must be defined before bsd.port.mk is included so it will -# be called. However, we need to have the body of the target after -# bsd.port.mk is included so NO_SHARED_LIBS is defined. -# Define the target twice, using : -post-patch: - -pre-install: - @${MKDIR} -p ${PREFIX}/bin ${PREFIX}/lib ${PREFIX}/include +GNU_CONFIGURE= yes post-install: @${LDCONFIG} -m ${PREFIX}/lib .include -# 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. -post-patch: -.if defined(NO_SHARED_LIBS) - @(cd ${DISTDIR}; ${PATCH} ${PATCH_DIST_ARGS} < ${FILESDIR}/patch) +.if defined(NO_SHARED_LIBS) & ${NO_SHARED_LIBS:U} == YES +MAKE_ENV= NO_SHARED_LIBS=Yes .endif diff --git a/graphics/mpeg-lib/files/md5 b/graphics/mpeg-lib/files/md5 index 0be6c1c65cd..bef2698da28 100644 --- a/graphics/mpeg-lib/files/md5 +++ b/graphics/mpeg-lib/files/md5 @@ -1,3 +1,3 @@ -MD5 (mpeg_lib-1.2.1.tar.gz) = 28d9d7a80031393d1008e0dff76c4674 -RMD160 (mpeg_lib-1.2.1.tar.gz) = fcfb3225d230b858f5893973c24b2f21e3f80cfa -SHA1 (mpeg_lib-1.2.1.tar.gz) = 2c3bde100f45f73025f9ba14b8360c7d26b41785 +MD5 (mpeg_lib-1.3.1.tar.gz) = 9d803be0073f42acf87d5fbb339a183b +RMD160 (mpeg_lib-1.3.1.tar.gz) = 27df1f6568c763df41beeed6382af88377da3e38 +SHA1 (mpeg_lib-1.3.1.tar.gz) = 0ea4f8b31e4f316d99c2034d76619988f75147dc diff --git a/graphics/mpeg-lib/patches/patch-aa b/graphics/mpeg-lib/patches/patch-aa index 158edaef149..3991c9ce355 100644 --- a/graphics/mpeg-lib/patches/patch-aa +++ b/graphics/mpeg-lib/patches/patch-aa @@ -1,14 +1,22 @@ ---- 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 +--- Makefile.in.orig Thu Nov 26 11:03:29 1998 ++++ Makefile.in Thu Dec 23 22:55:03 1999 +@@ -19,13 +19,14 @@ + exec_prefix = @exec_prefix@ + INSTALL_INCLUDE = @includedir@ + INSTALL_LIBRARY = @libdir@ +-INSTALL = @INSTALL@ ++INSTALL_DATA = @INSTALL_DATA@ -+.SUFFIXES: .so + # Other miscellaneous programs + AR = @AR@ + ARFLAGS = -ru + RANLIB = @RANLIB@ + ++.SUFFIXES: .c .o .so # 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 @@ +@@ -37,12 +38,13 @@ mono.c ordered.c ordered2.c mb_ordered.c LIBSRC = @libsrc@ LIBOBJ = @libobj@ @@ -18,38 +26,55 @@ # Other files of interest LIBRARY = libmpeg.a -+SHLIBRARY = libmpeg.so.1.2 - MPEGTEST = mpegtest +-SHLIB = libmpeg.so ++SHLIB = libmpeg.so.13.1 + HEADER = mpeg.h + EXTRAS = @extras@ - # Targets for all platforms +@@ -50,10 +52,16 @@ + .c.o: + $(CC) -c $(CFLAGS) $(CPPFLAGS) $< --all: $(LIBRARY) @extras@ -+all: $(LIBRARY) ${SHLIBRARY} @extras@ ++.c.so: ++ $(CC) -c $(CFLAGS) $(CPPFLAGS) -fpic -DPIC $< -o $@ - $(LIBRARY): $(LIBOBJ) + # Library/cleanup targets: + ++.if defined(NO_SHARED_LIBRARY) && ${NO_SHARED_LIBRARY:U} == YES + all: lib $(EXTRAS) ++.else ++all: lib shlib $(EXTRAS) ++.endif + + lib: $(LIBRARY) + +@@ -63,17 +71,22 @@ $(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ) $(RANLIB) $(LIBRARY) -+$(SHLIBRARY): $(SHLIBOBJ) -+ ld -Bshareable -Bforcearchive -o $(SHLIBRARY) $(SHLIBOBJ) -+ - $(LIBOBJ): Makefile +-$(SHLIB): $(LIBOBJ) +- $(CC) -shared -o $(SHLIB) $(LIBOBJ) ++$(SHLIB): $(SHLIBOBJ) ++ ld -Bshareable -Bforcearchive -o $(SHLIB) $(SHLIBOBJ) -+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@ ++.if defined(NO_SHARED_LIBRARY) && ${NO_SHARED_LIBRARY:U} == YES + install: $(LIBRARY) +- $(INSTALL) -d $(INSTALL_INCLUDE) $(INSTALL_LIBRARY) +- $(INSTALL) -m 0644 $(HEADER) $(INSTALL_INCLUDE)/$(HEADER) +- $(INSTALL) -m 0644 $(LIBRARY) $(INSTALL_LIBRARY)/$(LIBRARY) +- @if test -f $(SHLIB) ; then echo "warning: $(SHLIB) *not* installed (installing shared libraries is too system-specific)" ; fi ++.else ++install: $(LIBRARY) $(SHLIB) ++.endif ++ $(INSTALL_DATA) $(HEADER) $(INSTALL_INCLUDE)/$(HEADER) ++ $(INSTALL_DATA) $(LIBRARY) $(INSTALL_LIBRARY)/$(LIBRARY) ++ @if [ -f $(SHLIB) ]; then \ ++ $(INSTALL_DATA) $(SHLIB) $(INSTALL_LIBRARY)/$(SHLIB) ;\ ++ fi 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 $@ - - # Include a system-specific Makefile fragment, if any +- rm -f $(LIBRARY) $(EXTRAS) $(LIBOBJ) core ++ rm -f $(LIBRARY) $(SHLIB) $(EXTRAS) $(LIBOBJ) core + cd extras && $(MAKE) clean + distclean: clean diff --git a/graphics/mpeg-lib/patches/patch-ad b/graphics/mpeg-lib/patches/patch-ad index eb8b0501771..3f001bbc229 100644 --- a/graphics/mpeg-lib/patches/patch-ad +++ b/graphics/mpeg-lib/patches/patch-ad @@ -1,6 +1,6 @@ ---- configure.orig Mon Feb 26 09:58:27 1996 -+++ configure Tue Jun 30 15:07:28 1998 -@@ -817,6 +817,7 @@ +--- configure.orig Sun Aug 8 20:36:05 1999 ++++ configure Sun Jan 2 00:37:29 2000 +@@ -1101,6 +1101,7 @@ if test $dither = yes; then libsrc='$(DECODER_SRC) $(DITHER_SRC)' libobj='$(DECODER_SRC:.c=.o) $(DITHER_SRC:.c=.o)' @@ -8,7 +8,7 @@ cat >> confdefs.h <<\EOF #define ENABLE_DITHER 1 EOF -@@ -825,6 +826,7 @@ +@@ -1109,6 +1110,7 @@ else libsrc='$(DECODER_SRC)' libobj='$(DECODER_SRC:.c=.o)' @@ -16,11 +16,20 @@ cat >> confdefs.h <<\EOF #define ENABLE_DITHER 0 EOF -@@ -1459,6 +1461,7 @@ +@@ -1285,7 +1287,7 @@ + + fi + +-for ac_hdr in sys/time.h unistd.h netinet/in.h ++for ac_hdr in sys/time.h unistd.h netinet/in.h malloc.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +@@ -1818,6 +1820,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 + s%@CPP@%$CPP%g + + CEOF diff --git a/graphics/mpeg-lib/patches/patch-ae b/graphics/mpeg-lib/patches/patch-ae index aeba4214bdd..46ca534d63a 100644 --- a/graphics/mpeg-lib/patches/patch-ae +++ b/graphics/mpeg-lib/patches/patch-ae @@ -1,17 +1,17 @@ ---- 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" +--- video.c.orig Sat Jul 24 00:00:51 1999 ++++ video.c Thu Dec 23 22:41:32 1999 +@@ -49,6 +49,10 @@ #include "proto.h" + #include "my_dmalloc.h" +#ifdef _HAVE_PARAM_H +#include +#endif + /* Declarations of functions. */ - static void ReconIMBlock(); - static void ReconPMBlock(); -@@ -436,7 +440,9 @@ + static void ReconIMBlock(VidStream *,int); + static void ReconPMBlock(VidStream *,int,int,int,int); +@@ -445,7 +449,9 @@ static int num_calls = 0; unsigned int data; int i, status; diff --git a/graphics/mpeg-lib/patches/patch-af b/graphics/mpeg-lib/patches/patch-af index 82a13a3073c..917c22dd171 100644 --- a/graphics/mpeg-lib/patches/patch-af +++ b/graphics/mpeg-lib/patches/patch-af @@ -1,12 +1,17 @@ ---- wrapper.c.orig Tue Oct 10 14:08:39 1995 -+++ wrapper.c Tue Jun 30 15:07:27 1998 -@@ -390,7 +390,8 @@ +--- 24bit.c.orig Fri Dec 24 01:37:17 1999 ++++ 24bit.c Fri Dec 24 01:40:16 1999 +@@ -26,11 +26,13 @@ + */ - 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); + #include ++#ifdef HAVE_MALLOC_H ++#include ++#endif + #include "video.h" + #include "dither.h" + #include "proto.h" + #include +-#include + #include "my_dmalloc.h" - } /* GetMPEGFrame () */ + /* diff --git a/graphics/mpeg-lib/patches/patch-ag b/graphics/mpeg-lib/patches/patch-ag new file mode 100644 index 00000000000..931a79851b5 --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-ag @@ -0,0 +1,12 @@ +--- 2x2.c.orig Fri Dec 24 01:40:29 1999 ++++ 2x2.c Fri Dec 24 01:40:52 1999 +@@ -21,7 +21,9 @@ + + #include + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include "video.h" + #include "dither.h" + #include "proto.h" diff --git a/graphics/mpeg-lib/patches/patch-ah b/graphics/mpeg-lib/patches/patch-ah new file mode 100644 index 00000000000..e548e2de63d --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-ah @@ -0,0 +1,12 @@ +--- fs2.c.orig Fri Dec 24 01:41:39 1999 ++++ fs2.c Fri Dec 24 01:42:08 1999 +@@ -19,7 +19,9 @@ + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include "video.h" + #include "dither.h" diff --git a/graphics/mpeg-lib/patches/patch-ai b/graphics/mpeg-lib/patches/patch-ai new file mode 100644 index 00000000000..1437790d787 --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-ai @@ -0,0 +1,12 @@ +--- wrapper.c.orig Sun Jan 2 00:45:18 2000 ++++ wrapper.c Sun Jan 2 00:45:53 2000 +@@ -44,7 +44,9 @@ + ---------------------------------------------------------------------------- */ + + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include + #include diff --git a/graphics/mpeg-lib/patches/patch-aj b/graphics/mpeg-lib/patches/patch-aj new file mode 100644 index 00000000000..2e006a53e5c --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-aj @@ -0,0 +1,12 @@ +--- gdith.c.orig Sun Jan 2 00:46:44 2000 ++++ gdith.c Sun Jan 2 00:46:54 2000 +@@ -21,7 +21,9 @@ + + + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include "mpeg.h" + #include "dither.h" diff --git a/graphics/mpeg-lib/patches/patch-ak b/graphics/mpeg-lib/patches/patch-ak new file mode 100644 index 00000000000..4fcb9813e9a --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-ak @@ -0,0 +1,12 @@ +--- fs2fast.c.orig Sat Jan 8 13:49:10 2000 ++++ fs2fast.c Sat Jan 8 13:50:15 2000 +@@ -19,7 +19,9 @@ + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include "video.h" + #include "proto.h" diff --git a/graphics/mpeg-lib/patches/patch-al b/graphics/mpeg-lib/patches/patch-al new file mode 100644 index 00000000000..15f1137443a --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-al @@ -0,0 +1,12 @@ +--- fs4.c.orig Sat Jan 8 13:50:55 2000 ++++ fs4.c Sat Jan 8 13:51:03 2000 +@@ -21,7 +21,9 @@ + /* This file contains C code to do YCrCb -> colormap space. */ + + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include "fs4.h" + #include "video.h" diff --git a/graphics/mpeg-lib/patches/patch-am b/graphics/mpeg-lib/patches/patch-am new file mode 100644 index 00000000000..df1f8da7d5f --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-am @@ -0,0 +1,12 @@ +--- hybrid.c.orig Sat Jan 8 13:51:39 2000 ++++ hybrid.c Sat Jan 8 13:51:51 2000 +@@ -21,7 +21,9 @@ + /* This file contains C code to implement an ordered dither. */ + + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include "video.h" + #include "proto.h" diff --git a/graphics/mpeg-lib/patches/patch-an b/graphics/mpeg-lib/patches/patch-an new file mode 100644 index 00000000000..97520e2de0e --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-an @@ -0,0 +1,14 @@ +--- hybriderr.c.orig Sat Jan 8 13:52:19 2000 ++++ hybriderr.c Sat Jan 8 13:53:02 2000 +@@ -23,8 +23,10 @@ + */ + + #include +-#include ++#ifdef HAVE_MALLOC_H + #include ++#endif ++#include + #include "video.h" + #include "proto.h" + #include "dither.h" diff --git a/graphics/mpeg-lib/patches/patch-ao b/graphics/mpeg-lib/patches/patch-ao new file mode 100644 index 00000000000..e5aa64ac6b1 --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-ao @@ -0,0 +1,12 @@ +--- mono.c.orig Sat Jan 8 13:54:02 2000 ++++ mono.c Sat Jan 8 13:54:11 2000 +@@ -24,7 +24,9 @@ + */ + + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include "video.h" + #include "proto.h" diff --git a/graphics/mpeg-lib/patches/patch-ap b/graphics/mpeg-lib/patches/patch-ap new file mode 100644 index 00000000000..3ca4a0b28cf --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-ap @@ -0,0 +1,12 @@ +--- ordered.c.orig Sat Jan 8 14:03:02 2000 ++++ ordered.c Sat Jan 8 14:03:38 2000 +@@ -21,7 +21,9 @@ + /* This file contains C code to implement an ordered dither. */ + + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include "video.h" + #include "proto.h" diff --git a/graphics/mpeg-lib/patches/patch-aq b/graphics/mpeg-lib/patches/patch-aq new file mode 100644 index 00000000000..ee14ef7f07c --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-aq @@ -0,0 +1,12 @@ +--- ordered2.c.orig Sat Jan 8 14:04:07 2000 ++++ ordered2.c Sat Jan 8 14:04:17 2000 +@@ -21,7 +21,9 @@ + /* This file contains C code to implement an ordered dither. */ + + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include "video.h" + #include "proto.h" diff --git a/graphics/mpeg-lib/patches/patch-ar b/graphics/mpeg-lib/patches/patch-ar new file mode 100644 index 00000000000..ad99b7413b2 --- /dev/null +++ b/graphics/mpeg-lib/patches/patch-ar @@ -0,0 +1,12 @@ +--- mb_ordered.c.orig Sat Jan 8 13:56:05 2000 ++++ mb_ordered.c Sat Jan 8 13:56:16 2000 +@@ -21,7 +21,9 @@ + /* This file contains C code to implement an ordered dither. */ + + #include ++#ifdef HAVE_MALLOC_H + #include ++#endif + #include + #include "video.h" + #include "proto.h" diff --git a/graphics/mpeg-lib/pkg/PLIST b/graphics/mpeg-lib/pkg/PLIST index 1205a03365a..e3deb17d37e 100644 --- a/graphics/mpeg-lib/pkg/PLIST +++ b/graphics/mpeg-lib/pkg/PLIST @@ -1,4 +1,4 @@ lib/libmpeg.a -lib/libmpeg.so.1.2 +lib/libmpeg.so.13.1 @exec /sbin/ldconfig -m %B include/mpeg.h