diff options
author | pav <pav@FreeBSD.org> | 2005-02-09 07:18:00 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2005-02-09 07:18:00 +0800 |
commit | 40ac89c3e6ff9dedb97c337a952d62705104212d (patch) | |
tree | af2b2310aa614cf7b11113b551d985c8eea1ae12 /multimedia/libmpeg3 | |
parent | 0ac9397e416abfba8d427b2d9f432f8fb054c269 (diff) | |
download | freebsd-ports-gnome-40ac89c3e6ff9dedb97c337a952d62705104212d.tar.gz freebsd-ports-gnome-40ac89c3e6ff9dedb97c337a952d62705104212d.tar.zst freebsd-ports-gnome-40ac89c3e6ff9dedb97c337a952d62705104212d.zip |
Libmpeg3 supports advanced editing and manipulation of MPEG streams.
Libmpeg3 provides a uniform front end for a large number of the MPEG
formats used in HDTV broadcasting.
It 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
PR: ports/77175
Submitted by: Igor Pokrovsky <ip@doom.homeunix.org>
Diffstat (limited to 'multimedia/libmpeg3')
-rw-r--r-- | multimedia/libmpeg3/Makefile | 45 | ||||
-rw-r--r-- | multimedia/libmpeg3/distinfo | 2 | ||||
-rw-r--r-- | multimedia/libmpeg3/files/patch-Makefile | 40 | ||||
-rw-r--r-- | multimedia/libmpeg3/files/patch-a52dec-0.7.3_include_config.h | 11 | ||||
-rw-r--r-- | multimedia/libmpeg3/files/patch-ifo.h | 11 | ||||
-rw-r--r-- | multimedia/libmpeg3/files/patch-mpeg3ifo.c | 23 | ||||
-rw-r--r-- | multimedia/libmpeg3/files/patch-mpeg3io.c | 98 | ||||
-rw-r--r-- | multimedia/libmpeg3/pkg-descr | 20 | ||||
-rw-r--r-- | multimedia/libmpeg3/pkg-plist | 8 |
9 files changed, 258 insertions, 0 deletions
diff --git a/multimedia/libmpeg3/Makefile b/multimedia/libmpeg3/Makefile new file mode 100644 index 000000000000..1fbe2da3cc97 --- /dev/null +++ b/multimedia/libmpeg3/Makefile @@ -0,0 +1,45 @@ +# New ports collection makefile for: libmpeg3 +# Date created: 06 Feb 2005 +# Whom: Igor Pokrovsky <ip@doom.homeunix.org> +# +# $FreeBSD$ +# + +PORTNAME= libmpeg3 +PORTVERSION= 1.5.4 +CATEGORIES= multimedia +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= heroines +DISTNAME= ${PORTNAME}-${PORTVERSION}-src + +MAINTAINER= ip@doom.homeunix.org +COMMENT= Advanced editing and manipulation of MPEG streams + +USE_BZIP2= yes +USE_REINPLACE= yes +USE_GMAKE= yes +USE_GCC= 3.4 +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} + +post-patch: + @${REINPLACE_CMD} -e "s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|" \ + ${WRKSRC}/Makefile + @(${FIND} ${WRKSRC} -name '*.[ch]' \ + | ${XARGS} ${REINPLACE_CMD} -i '' -e 's|stdint\.h|sys\/types\.h|g') + @${REINPLACE_CMD} -e 's|machine/soundcard.h|sys/soundcard.h|' \ + ${WRKSRC}/a52dec-0.7.3/libao/audio_out_oss.c + +do-install: +.for i in mpeg3cat mpeg3dump mpeg3toc + ${INSTALL_PROGRAM} ${WRKSRC}/${MACHINE_ARCH}/${i} ${PREFIX}/bin +.endfor + ${INSTALL_DATA} ${WRKSRC}/${MACHINE_ARCH}/libmpeg3.a ${PREFIX}/lib +.for i in libmpeg3.h mpeg3private.h + ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/include +.endfor +.ifndef (NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/index.html ${DOCSDIR} +.endif + +.include <bsd.port.mk> diff --git a/multimedia/libmpeg3/distinfo b/multimedia/libmpeg3/distinfo new file mode 100644 index 000000000000..7ac345ab9b25 --- /dev/null +++ b/multimedia/libmpeg3/distinfo @@ -0,0 +1,2 @@ +MD5 (libmpeg3-1.5.4-src.tar.bz2) = 7adfc9c0beea2134575137f2e0d2ef11 +SIZE (libmpeg3-1.5.4-src.tar.bz2) = 626205 diff --git a/multimedia/libmpeg3/files/patch-Makefile b/multimedia/libmpeg3/files/patch-Makefile new file mode 100644 index 000000000000..7f6e2a564727 --- /dev/null +++ b/multimedia/libmpeg3/files/patch-Makefile @@ -0,0 +1,40 @@ +--- Makefile.orig Wed Oct 29 10:53:02 2003 ++++ Makefile Tue Feb 8 23:57:49 2005 +@@ -1,7 +1,7 @@ +-CC = gcc +-NASM = nasm ++#CC = gcc ++#NASM = nasm + USE_MMX = 0 +-USE_CSS = 1 ++USE_CSS = 0 + A52DIR := $(shell expr a52dec* ) + + +@@ -13,7 +13,7 @@ + endif + + +-OBJDIR := $(shell uname --machine) ++OBJDIR := $(shell uname -p) + + + +@@ -33,7 +33,7 @@ + CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + endif + +-ifeq ($(OBJDIR), x86_64) ++ifeq ($(OBJDIR), amd64) + ifneq ($(HAVE_CFLAGS), y) + CFLAGS := -O2 -fomit-frame-pointer -I/usr/local/include + endif +@@ -138,7 +138,7 @@ + #$(OBJDIR)/mpeg3split + + +-LIBS = -lm -lpthread ++LIBS = -lm %%PTHREAD_LIBS%% + + $(shell if ! test -d $(OBJDIR) \; then mkdir -p $(OBJDIR) \; fi ) + diff --git a/multimedia/libmpeg3/files/patch-a52dec-0.7.3_include_config.h b/multimedia/libmpeg3/files/patch-a52dec-0.7.3_include_config.h new file mode 100644 index 000000000000..ee5a4cb539de --- /dev/null +++ b/multimedia/libmpeg3/files/patch-a52dec-0.7.3_include_config.h @@ -0,0 +1,11 @@ +--- a52dec-0.7.3/include/config.h.orig ++++ a52dec-0.7.3/include/config.h +@@ -17,7 +17,7 @@ + /* #undef HAVE_IO_H */ + + /* Define if you have the `memalign' function. */ +-#define HAVE_MEMALIGN 1 ++/*#define HAVE_MEMALIGN 1*/ + + /* Define if you have the <memory.h> header file. */ + #define HAVE_MEMORY_H 1 diff --git a/multimedia/libmpeg3/files/patch-ifo.h b/multimedia/libmpeg3/files/patch-ifo.h new file mode 100644 index 000000000000..b1ef929dd60c --- /dev/null +++ b/multimedia/libmpeg3/files/patch-ifo.h @@ -0,0 +1,11 @@ +--- ifo.h.orig ++++ ifo.h +@@ -15,6 +15,8 @@ + #define IFO_OFFSET_SUBPIC 0x0250 + + ++typedef off_t __off64_t; ++ + // for debug and error output + + /** diff --git a/multimedia/libmpeg3/files/patch-mpeg3ifo.c b/multimedia/libmpeg3/files/patch-mpeg3ifo.c new file mode 100644 index 000000000000..5ac86df3b2cc --- /dev/null +++ b/multimedia/libmpeg3/files/patch-mpeg3ifo.c @@ -0,0 +1,23 @@ +--- mpeg3ifo.c.orig ++++ mpeg3ifo.c +@@ -1,4 +1,4 @@ +-#include <byteswap.h> ++//#include <byteswap.h> + #include <dirent.h> + #include <fcntl.h> + #include <stdlib.h> +@@ -9,6 +9,14 @@ + #include "ifo.h" + #include "mpeg3private.h" + #include "mpeg3protos.h" ++ ++#define bswap_16(x) ((((x) << 8) & 0xff00) | \ ++ (((x) >> 8) & 0x00ff)) ++ ++#define bswap_32(x) ((((x) << 24) & 0xff000000) | \ ++ (((x) << 8) & 0x00ff0000) | \ ++ (((x) >> 8) & 0x0000ff00) | \ ++ (((x) >> 24) & 0x000000ff)) + + typedef struct + { diff --git a/multimedia/libmpeg3/files/patch-mpeg3io.c b/multimedia/libmpeg3/files/patch-mpeg3io.c new file mode 100644 index 000000000000..82fd6f1f32c6 --- /dev/null +++ b/multimedia/libmpeg3/files/patch-mpeg3io.c @@ -0,0 +1,98 @@ +--- mpeg3io.c.orig ++++ mpeg3io.c +@@ -1,7 +1,7 @@ + #include "mpeg3private.h" + #include "mpeg3protos.h" + +-#include <mntent.h> ++#include <fstab.h> + #include <stdint.h> + #include <stdlib.h> + #include <string.h> +@@ -35,8 +35,8 @@ + + int64_t mpeg3io_get_total_bytes(mpeg3_fs_t *fs) + { +- struct stat64 ostat; +- stat64(fs->path, &ostat); ++ struct stat ostat; ++ stat(fs->path, &ostat); + fs->total_bytes = ostat.st_size; + return fs->total_bytes; + +@@ -50,8 +50,8 @@ + + int64_t mpeg3io_path_total_bytes(char *path) + { +- struct stat64 st; +- if(stat64(path, &st) < 0) return 0; ++ struct stat st; ++ if(stat(path, &st) < 0) return 0; + return st.st_size; + } + +@@ -61,7 +61,7 @@ + mpeg3_get_keys(fs->css, fs->path); + + //printf("mpeg3io_open_file 1 %s\n", fs->path); +- if(!(fs->fd = fopen64(fs->path, "rb"))) ++ if(!(fs->fd = fopen(fs->path, "rb"))) + { + perror("mpeg3io_open_file"); + return 1; +@@ -157,7 +157,7 @@ + if(remainder) + memmove(fs->buffer + remainder_start, fs->buffer, remainder); + +- fseeko64(fs->fd, new_buffer_position, SEEK_SET); ++ fseek(fs->fd, new_buffer_position, SEEK_SET); + fread(fs->buffer, 1, remainder_start, fs->fd); + + +@@ -172,7 +172,7 @@ + fs->buffer_position = fs->current_byte; + fs->buffer_offset = 0; + +- result = fseeko64(fs->fd, fs->buffer_position, SEEK_SET); ++ result = fseek(fs->fd, fs->buffer_position, SEEK_SET); + fs->buffer_size = fread(fs->buffer, 1, MPEG3_IO_SIZE, fs->fd); + + +@@ -210,27 +210,27 @@ + + int mpeg3io_device(char *path, char *device) + { +- struct stat64 file_st, device_st; +- struct mntent *mnt; +- FILE *fp; ++ struct stat file_st, device_st; ++ struct fstab *mnt; ++ int fp; + +- if(stat64(path, &file_st) < 0) ++ if(stat(path, &file_st) < 0) + { + perror("mpeg3io_device"); + return 1; + } + +- fp = setmntent(MOUNTED, "r"); +- while(fp && (mnt = getmntent(fp))) ++ fp = setfsent(); ++ while(fp && (mnt = getfsent())) + { +- if(stat64(mnt->mnt_fsname, &device_st) < 0) continue; ++ if(stat(mnt->fs_spec, &device_st) < 0) continue; + if(device_st.st_rdev == file_st.st_dev) + { +- strncpy(device, mnt->mnt_fsname, MPEG3_STRLEN); ++ strncpy(device, mnt->fs_spec, MPEG3_STRLEN); + break; +- } ++ } + } +- endmntent(fp); ++ endfsent(); + + return 0; + } diff --git a/multimedia/libmpeg3/pkg-descr b/multimedia/libmpeg3/pkg-descr new file mode 100644 index 000000000000..0ce4b6f6e08d --- /dev/null +++ b/multimedia/libmpeg3/pkg-descr @@ -0,0 +1,20 @@ +Libmpeg3 supports advanced editing and manipulation of MPEG streams. +Libmpeg3 provides a uniform front end for a large number of the MPEG +formats used in HDTV broadcasting. +It 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 + +WWW: http://heroinewarrior.com/libmpeg3.php3 + +- Igor Pokrovsky +ip@doom.homeunix.org diff --git a/multimedia/libmpeg3/pkg-plist b/multimedia/libmpeg3/pkg-plist new file mode 100644 index 000000000000..883baee58e94 --- /dev/null +++ b/multimedia/libmpeg3/pkg-plist @@ -0,0 +1,8 @@ +bin/mpeg3cat +bin/mpeg3dump +bin/mpeg3toc +include/libmpeg3.h +include/mpeg3private.h +lib/libmpeg3.a +%%PORTDOCS%%%%DOCSDIR%%/index.html +%%PORTDOCS%%@dirrm %%DOCSDIR%% |