Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

17
multimedia/libmpeg3/DESCR Normal file
View File

@@ -0,0 +1,17 @@
Libmpeg3 decodes
MPEG-1 Layer II Audio
MPEG-1 Layer III Audio
MPEG-2 Layer III Audio
MPEG-1 program streams
MPEG-2 program streams
MPEG-2 transport streams
AC3 Audio
MPEG-2 Video
MPEG-1 Video
IFO files
VOB files
This package provides tools to concatenate video files, split
elementary streams into chunks of bytes, dump information or extract
audio to a 24 bit pcm file, and create a table of contents for a
DVD or mpeg stream.

View File

@@ -0,0 +1,71 @@
# $NetBSD: Makefile,v 1.18 2012/10/08 09:21:07 asau Exp $
#
DISTNAME= libmpeg3-1.8-src
PKGNAME= ${DISTNAME:S/-src//}
#PKGREVISION= 1
CATEGORIES= devel audio graphics multimedia
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=heroines/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://heroines.sourceforge.net/libmpeg3.php3
COMMENT= MPEG decoding library and tools
.include "../../mk/bsd.prefs.mk"
.if (${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin")
MAKE_ENV+= USE_MMX=1
MAKE_ENV+= USE_CSS=1
BUILD_DEPENDS+= nasm-[0-9]*:../../devel/nasm
.else
. if ${OPSYS} == "DragonFly"
MAKE_ENV+= USE_MMX=0
MAKE_ENV+= USE_CSS=0
. endif
.endif
NO_CONFIGURE= yes
USE_TOOLS+= gmake
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
ONLY_FOR_COMPILER= gcc
PTHREAD_AUTO_VARS= yes
PTHREAD_OPTS+= require
post-configure:
${ECHO} "CFLAGS+=-O2" >>${WRKSRC}/global_config
${ECHO} "CFLAGS+=-I${BUILDLINK_DIR}/include" >>${WRKSRC}/global_config
${ECHO} "CFLAGS+=-D_FILE_OFFSET_BITS=64" >>${WRKSRC}/global_config
INSTHDRS= bitstream.h libmpeg3.h mpeg3atrack.h mpeg3css.h \
mpeg3demux.h mpeg3io.h mpeg3private.h \
mpeg3private.inc mpeg3title.h mpeg3vtrack.h timecode.h
AINSTHDRS= ac3.h mpeg3audio.h
VINSTHDRS= idct.h mpeg3video.h slice.h
INSTBINS= mpeg3cat mpeg3peek mpeg3toc mpeg3dump
INSTALLATION_DIRS= bin include/mpeg3/audio include/mpeg3/video lib \
share/doc/html/libmpeg3
do-install:
for f in ${INSTBINS}; do \
${INSTALL_PROGRAM} ${WRKSRC}/work/$$f ${DESTDIR}${PREFIX}/bin; \
done
for f in ${INSTHDRS}; do \
${INSTALL_DATA} ${WRKSRC}/$$f ${DESTDIR}${PREFIX}/include/mpeg3; \
done
for f in ${AINSTHDRS}; do \
${INSTALL_DATA} ${WRKSRC}/audio/$$f \
${DESTDIR}${PREFIX}/include/mpeg3/audio; \
done
for f in ${VINSTHDRS}; do \
${INSTALL_DATA} ${WRKSRC}/video/$$f \
${DESTDIR}${PREFIX}/include/mpeg3/video; \
done
${INSTALL_LIB} ${WRKSRC}/work/libmpeg3.a ${DESTDIR}${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/docs/index.html \
${DESTDIR}${PREFIX}/share/doc/html/libmpeg3
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

23
multimedia/libmpeg3/PLIST Normal file
View File

@@ -0,0 +1,23 @@
@comment $NetBSD: PLIST,v 1.4 2009/06/14 18:08:07 joerg Exp $
bin/mpeg3cat
bin/mpeg3dump
bin/mpeg3peek
bin/mpeg3toc
include/mpeg3/audio/ac3.h
include/mpeg3/audio/mpeg3audio.h
include/mpeg3/bitstream.h
include/mpeg3/libmpeg3.h
include/mpeg3/mpeg3atrack.h
include/mpeg3/mpeg3css.h
include/mpeg3/mpeg3demux.h
include/mpeg3/mpeg3io.h
include/mpeg3/mpeg3private.h
include/mpeg3/mpeg3private.inc
include/mpeg3/mpeg3title.h
include/mpeg3/mpeg3vtrack.h
include/mpeg3/timecode.h
include/mpeg3/video/idct.h
include/mpeg3/video/mpeg3video.h
include/mpeg3/video/slice.h
lib/libmpeg3.a
share/doc/html/libmpeg3/index.html

View File

@@ -0,0 +1,15 @@
# $NetBSD: buildlink3.mk,v 1.9 2012/05/07 01:53:50 dholland Exp $
BUILDLINK_TREE+= libmpeg3
.if !defined(LIBMPEG3_BUILDLINK3_MK)
LIBMPEG3_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.libmpeg3+= libmpeg3>=1.3nb4
BUILDLINK_ABI_DEPENDS.libmpeg3+= libmpeg3>=1.3nb6
BUILDLINK_PKGSRCDIR.libmpeg3?= ../../multimedia/libmpeg3
.include "../../mk/pthread.buildlink3.mk"
.endif # LIBMPEG3_BUILDLINK3_MK
BUILDLINK_TREE+= -libmpeg3

View File

@@ -0,0 +1,14 @@
$NetBSD: distinfo,v 1.20 2009/05/26 08:49:27 obache Exp $
SHA1 (libmpeg3-1.8-src.tar.bz2) = dae3fc1d68533e71cb9f77adf124bfbfb4e13ae6
RMD160 (libmpeg3-1.8-src.tar.bz2) = bc01d72b1e1b3e91ff206bae7a314b939c44b192
Size (libmpeg3-1.8-src.tar.bz2) = 2452350 bytes
SHA1 (patch-aa) = 6afb72af6ce53e7eb26bfebc056060b99b2612cf
SHA1 (patch-ab) = 4ca251c445658ad2844b7202ae3a4e1690573f18
SHA1 (patch-ac) = cfee202be3b9ec53e597a53dc8a6708506c053ad
SHA1 (patch-ad) = e7d5164de3303346b2e92994fc25858323d455b5
SHA1 (patch-ae) = 1ede8f615f703eb43b074465cc1bed86fccedfff
SHA1 (patch-ag) = bf321ac689b82889ca1a2bb8a96cb6e387280f32
SHA1 (patch-ah) = fd039c1d2fdde4ea0e6f7b95cbf18027000fa015
SHA1 (patch-ai) = 859735f677cb469b782e27da2a14bacd3fd02003
SHA1 (patch-aj) = 48a5bcbce03d4ff91e8815b5813d2138b87bacb0

View File

@@ -0,0 +1,68 @@
$NetBSD: patch-aa,v 1.6 2009/05/26 08:49:27 obache Exp $
--- Makefile.orig 2008-08-07 03:33:09.000000000 +0000
+++ Makefile
@@ -1,7 +1,7 @@
CC = gcc
NASM = nasm
-USE_MMX = 0
-USE_CSS = 1
+#USE_MMX = 0
+#USE_CSS = 1
A52DIR := $(shell expr a52dec* )
@@ -16,7 +16,7 @@ HAVE_CFLAGS := n
endif
-OBJDIR := $(shell uname --machine)
+OBJDIR = work
@@ -147,17 +147,17 @@ UTILS = $(OBJDIR)/mpeg3dump $(OBJDIR)/mp
#$(OBJDIR)/mpeg3split
-LIBS = -lm -lpthread
-
-$(shell mkdir -p $(OBJDIR) )
-
-$(shell echo $(CFLAGS) > $(OBJDIR)/c_flags)
-$(shell echo $(A52CFLAGS) > $(OBJDIR)/a52_flags)
-$(shell echo $(OBJS) $(ASMOBJS) $(A52OBJS) $(NASMOBJS) > $(OBJDIR)/objs)
-$(shell mkdir -p $(DIRS) )
-
+LIBS = -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lm ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
all: $(OUTPUT) $(UTILS)
+prepare:
+ mkdir -p $(OBJDIR)
+ mkdir -p $(OBJDIR)/audio
+ mkdir -p $(OBJDIR)/video
+ echo $(CFLAGS) > $(OBJDIR)/c_flags
+ echo $(A52CFLAGS) > $(OBJDIR)/a52_flags
+ echo $(OBJS) $(ASMOBJS) $(A52OBJS) $(NASMOBJS) > $(OBJDIR)/objs
+ mkdir -p $(DIRS)
$(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS) $(A52OBJS)
ar rcs $(OUTPUT) `cat $(OBJDIR)/objs`
@@ -203,13 +203,13 @@ backup: clean
wc:
cat *.c *.h audio/*.c audio/*.h video/*.c video/*.h | wc
-$(OBJS):
+$(OBJS): prepare
$(CC) -c `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.c) -o $*.o
-$(ASMOBJS):
+$(ASMOBJS): prepare
$(CC) -c `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.S) -o $*.o
-$(NASMOBJS):
+$(NASMOBJS): prepare
$(NASM) -f elf $(subst $(OBJDIR)/,, $*.s) -o $*.o
-$(A52OBJS):
+$(A52OBJS): prepare
$(CC) -c `cat $(OBJDIR)/a52_flags` $(subst $(OBJDIR)/,, $*.c) -o $*.o
$(OBJDIR)/libmpeg3.o: libmpeg3.c

View File

@@ -0,0 +1,57 @@
$NetBSD: patch-ab,v 1.4 2009/01/29 17:53:49 abs Exp $
--- mpeg3css.c.orig 2007-01-09 07:09:52.000000000 +0000
+++ mpeg3css.c
@@ -41,7 +41,9 @@
#include <unistd.h>
#include <fcntl.h>
// Must unlink /usr/include directories from the kernel source for this to work.
-#include <linux/cdrom.h>
+#ifdef linux
+# include <linux/cdrom.h>
+#endif
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
@@ -572,6 +574,7 @@ static void crypt_bus_key(mpeg3_css_t *c
css_engine(perm_varient[varient], scratch, key);
}
+#ifdef linux
static int get_asf(mpeg3_css_t *css)
{
dvd_authinfo ai;
@@ -588,6 +591,7 @@ static int get_asf(mpeg3_css_t *css)
return 0;
}
+#endif /* linux */
static int authenticate_drive(mpeg3_css_t *css, const unsigned char *key)
{
@@ -611,6 +615,7 @@ static int authenticate_drive(mpeg3_css_
return 0;
}
+#ifdef linux
/* Simulation of a non-CSS compliant host (i.e. the authentication fails,
* but idea is here for a real CSS compliant authentication scheme). */
static int hostauth(mpeg3_css_t *css, dvd_authinfo *ai)
@@ -801,6 +806,7 @@ static int validate(mpeg3_css_t *css, in
return 0;
}
+#endif /* linux */
static int validate_path(mpeg3_css_t *css, int do_title)
{
@@ -831,7 +837,9 @@ static int validate_path(mpeg3_css_t *cs
if(!result) result = (css->fd = open(css->device_path, O_RDONLY | O_NONBLOCK)) < 0;
//printf("validate_path 2 %d\n", result);
+#ifdef linux
if(!result) result = validate(css, lba, do_title);
+#endif /* linux */
//printf("validate_path 3 %d\n", result);
/* Definitely encrypted if we got here. */

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-ac,v 1.5 2009/01/29 17:53:49 abs Exp $
--- mpeg3ifo.c.orig 2007-12-16 23:25:26.000000000 +0000
+++ mpeg3ifo.c
@@ -1,4 +1,3 @@
-#include <byteswap.h>
#include <dirent.h>
#include <fcntl.h>
#include <stdlib.h>
@@ -10,6 +9,23 @@
#include "mpeg3private.h"
#include "mpeg3protos.h"
+#if defined(__NetBSD__)
+# include <sys/endian.h>
+# include <machine/bswap.h>
+# define bswap_16(x) bswap16(x)
+# define bswap_32(x) bswap32(x)
+#elif defined(__DragonFly__)
+# include <sys/endian.h>
+# define bswap_16(x) bswap16(x)
+# define bswap_32(x) bswap32(x)
+#elif defined(linux)
+# include <byteswap.h>
+#elif defined(__APPLE__) || defined(__MACH__) /* MacOS X */
+# include <libkern/OSByteOrder.h>
+# define bswap_16(x) OSSwapInt16(x)
+# define bswap_32(x) OSSwapInt32(x)
+#endif
+
typedef struct
{
// Bytes relative to start of stream.

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-ad,v 1.2 2009/01/29 17:53:49 abs Exp $
--- ifo.h.orig 2007-01-09 07:09:52.000000000 +0000
+++ ifo.h
@@ -193,7 +193,7 @@ typedef struct {
u_char *data[10];
int fd; // file descriptor
- __off64_t pos; // offset of ifo file on device
+ off_t pos; // offset of ifo file on device
} ifo_t;
@@ -221,7 +221,7 @@ typedef struct {
* Prototypes
*/
-ifo_t *ifoOpen (int fd, __off64_t pos);
+ifo_t *ifoOpen (int fd, off_t pos);
int ifoClose (ifo_t *ifo);
u_int ifoGetVOBStart (ifo_t *ifo);

View File

@@ -0,0 +1,84 @@
$NetBSD: patch-ae,v 1.14 2009/02/23 13:24:31 wiz Exp $
--- mpeg3io.c.orig 2008-07-05 00:47:42 +0000
+++ mpeg3io.c
@@ -1,10 +1,43 @@
#include "mpeg3private.h"
#include "mpeg3protos.h"
-#include <mntent.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
+
+#if defined(__NetBSD__)
+
+# include <sys/mount.h>
+# define fopen64 fopen
+# define fseeko64 fseek
+# define stat64 stat
+# if __NetBSD_Version__ >= 299000900 /* 2.99.9 */
+# define statfs statvfs
+# endif
+
+#elif defined(__DragonFly__)
+
+# include <sys/param.h>
+# include <sys/mount.h>
+# include <sys/types.h>
+# define fopen64 fopen
+# define fseeko64 fseek
+# define stat64 stat
+
+#elif defined(__APPLE__) && defined(__MACH__)
+
+# include <sys/param.h>
+# include <sys/mount.h>
+# include <sys/cdefs.h>
+# include <sys/types.h>
+# if !defined(__DARWIN_64_BIT_INO_T /* MacOSX < 10.5 */)
+# define stat64 stat
+# endif
+# define fopen64 fopen
+# define fseeko64 fseek
+
+#endif
+
#include <sys/stat.h>
mpeg3_fs_t* mpeg3_new_fs(char *path)
@@ -215,16 +248,26 @@ void mpeg3io_complete_path(char *complet
int mpeg3io_device(char *path, char *device)
{
+#if defined(__NetBSD__) || defined(__DragonFly__) || (defined(__APPLE__) && defined(__MACH__))
+ struct statfs file_st;
+
+ if (statfs(path, &file_st) < 0)
+#else
+
struct stat64 file_st, device_st;
struct mntent *mnt;
FILE *fp;
if(stat64(path, &file_st) < 0)
+#endif
{
perror("mpeg3io_device");
return 1;
}
+#if defined(__NetBSD__) || defined(__DragonFly__) || (defined(__APPLE__) && defined(__MACH__))
+ strncpy(device, file_st.f_mntfromname, MPEG3_STRLEN);
+#else
fp = setmntent(MOUNTED, "r");
while(fp && (mnt = getmntent(fp)))
{
@@ -236,6 +279,7 @@ int mpeg3io_device(char *path, char *dev
}
}
endmntent(fp);
+#endif
return 0;
}

View File

@@ -0,0 +1,45 @@
$NetBSD: patch-ag,v 1.1 2004/06/26 18:00:21 grant Exp $
--- video/mmxtest.c.orig Tue Jul 31 19:37:07 2001
+++ video/mmxtest.c Tue Jul 31 19:41:16 2001
@@ -5,39 +5,9 @@
int mpeg3_mmx_test()
{
- int result = 0;
- FILE *proc;
- char string[MPEG3_STRLEN];
-
#ifdef HAVE_MMX
- if(!(proc = fopen(MPEG3_PROC_CPUINFO, "r")))
- {
- fprintf(stderr, "mpeg3_mmx_test: failed to open /proc/cpuinfo\n");
- return 0;
- }
-
- while(!feof(proc))
- {
- fgets(string, MPEG3_STRLEN, proc);
-/* Got the flags line */
- if(!strncasecmp(string, "flags", 5))
- {
- char *needle;
- needle = strstr(string, "mmx");
- if(!needle)
- {
- fclose(proc);
- return 0;
- }
- if(!strncasecmp(needle, "mmx", 3))
- {
- fclose(proc);
- return 1;
- }
- }
- }
- fclose(proc);
+ return (1);
#endif
return 0;

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-ah,v 1.8 2009/01/29 17:53:49 abs Exp $
--- mpeg3tocutil.c.orig 2008-06-21 04:53:27.000000000 +0100
+++ mpeg3tocutil.c
@@ -5,7 +5,27 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/stat.h>
+
+#if defined(__NetBSD__) || defined(__DragonFly__) || (defined(__APPLE__) && defined(__MACH__))
+# include <sys/param.h>
+# include <sys/mount.h>
+
+# if defined(__APPLE__) && defined(__MACH__)
+#include <sys/cdefs.h>
+# endif
+# if (defined(__NetBSD__) && __NetBSD_Version__ >= 299000900 /* 2.99.9 */) || defined(__DragonFly__) || (defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN_64_BIT_INO_T) /* MacOSX < 10.5 */)
+# define stat64 stat
+# endif
+# if defined(__NetBSD__) && __NetBSD_Version__ >= 299000900 /* 2.99.9 */
+# define statfs statvfs
+# endif
+
+# include <sys/types.h>
+# include <sys/stat.h>
+#else
+# include <mntent.h>
+# include <sys/stat.h>
+#endif
static FILE *test_file = 0;

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ai,v 1.2 2008/02/20 09:56:44 xtraeme Exp $
--- a52dec-0.7.3/liba52/parse.c.orig 2008-02-19 19:41:19.000000000 +0100
+++ a52dec-0.7.3/liba52/parse.c 2008-02-19 19:41:32.000000000 +0100
@@ -32,7 +32,7 @@
#include "bitstream.h"
#include "tables.h"
-#ifdef HAVE_MEMALIGN
+#if 0
/* some systems have memalign() but no declaration for it */
void * memalign (size_t align, size_t size);
#else

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-aj,v 1.1 2008/05/21 19:21:33 tonio Exp $
Deactivate oss output for darwin
--- a52dec-0.7.3/include/config.h.orig 2005-04-21 05:59:43.000000000 +0200
+++ a52dec-0.7.3/include/config.h
@@ -56,7 +56,9 @@
/* #undef LIBAO_AL */
/* libao OSS support */
+#if !(defined(__APPLE__) && defined(__MACH__))
#define LIBAO_OSS
+#endif
/* libao solaris support */
/* #undef LIBAO_SOLARIS */