Date: Sun, 6 Feb 2005 22:08:16 +0300 (MSK) From: Igor Pokrovsky <ip@doom.homeunix.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/77175: New port: multimedia/libmpeg3 Advanced editing and manipulation of MPEG streams Message-ID: <200502061908.j16J8GoN014379@doom.homeunix.org> Resent-Message-ID: <200502061910.j16JALFp022330@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 77175 >Category: ports >Synopsis: New port: multimedia/libmpeg3 Advanced editing and manipulation of MPEG streams >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Feb 06 19:10:20 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Igor Pokrovsky >Release: FreeBSD 4.11-STABLE i386 >Organization: >Environment: System: FreeBSD doom.homeunix.org 4.11-STABLE FreeBSD 4.11-STABLE #0: Sat Jan 29 15:33:37 MSK 2005 root@doom.homeunix.org:/usr/obj/usr/src/sys/KERNEL i386 >Description: 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 >How-To-Repeat: >Fix: --- libmpeg3.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # libmpeg3 # libmpeg3/pkg-descr # libmpeg3/pkg-plist # libmpeg3/distinfo # libmpeg3/Makefile # libmpeg3/files # libmpeg3/files/patch-Makefile # libmpeg3/files/patch-mpeg3ifo.c # libmpeg3/files/patch-ifo.h # libmpeg3/files/patch-mpeg3io.c # libmpeg3/files/patch-a52dec-0.7.3_include_config.h # echo c - libmpeg3 mkdir -p libmpeg3 > /dev/null 2>&1 echo x - libmpeg3/pkg-descr sed 's/^X//' >libmpeg3/pkg-descr << 'END-of-libmpeg3/pkg-descr' XLibmpeg3 supports advanced editing and manipulation of MPEG streams. XLibmpeg3 provides a uniform front end for a large number of the MPEG Xformats used in HDTV broadcasting. XIt decodes: X * MPEG-1 Layer II Audio X * MPEG-1 Layer III Audio X * MPEG-2 Layer III Audio X * MPEG-1 program streams X * MPEG-2 program streams X * MPEG-2 transport streams X * AC3 Audio X * MPEG-2 Video X * MPEG-1 Video X * IFO files X * VOB files X XWWW: http://heroinewarrior.com/libmpeg3.php3 X X- Igor Pokrovsky Xip@doom.homeunix.org END-of-libmpeg3/pkg-descr echo x - libmpeg3/pkg-plist sed 's/^X//' >libmpeg3/pkg-plist << 'END-of-libmpeg3/pkg-plist' Xbin/mpeg3cat Xbin/mpeg3dump Xbin/mpeg3toc Xinclude/libmpeg3.h Xinclude/mpeg3private.h Xlib/libmpeg3.a X%%PORTDOCS%%%%DOCSDIR%%/index.html X%%PORTDOCS%%@dirrm %%DOCSDIR%% END-of-libmpeg3/pkg-plist echo x - libmpeg3/distinfo sed 's/^X//' >libmpeg3/distinfo << 'END-of-libmpeg3/distinfo' XMD5 (libmpeg3-1.5.4-src.tar.bz2) = 7adfc9c0beea2134575137f2e0d2ef11 XSIZE (libmpeg3-1.5.4-src.tar.bz2) = 626205 END-of-libmpeg3/distinfo echo x - libmpeg3/Makefile sed 's/^X//' >libmpeg3/Makefile << 'END-of-libmpeg3/Makefile' X# New ports collection makefile for: libmpeg3 X# Date created: 06 Feb 2005 X# Whom: Igor Pokrovsky <ip@doom.homeunix.org> X# X# $FreeBSD$ X# X XPORTNAME= libmpeg3 XPORTVERSION= 1.5.4 XCATEGORIES= multimedia XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= heroines XDISTNAME= ${PORTNAME}-${PORTVERSION}-src X XMAINTAINER= ip@doom.homeunix.org XCOMMENT= Advanced editing and manipulation of MPEG streams X XUSE_BZIP2= yes XUSE_REINPLACE= yes XUSE_GMAKE= yes XUSE_GCC= 3.4 XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} X Xpost-patch: X @${REINPLACE_CMD} -e "s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|" \ X ${WRKSRC}/Makefile X @(${FIND} ${WRKSRC} -name '*.[ch]' \ X | ${XARGS} ${REINPLACE_CMD} -i '' -e 's|stdint\.h|sys\/inttypes\.h|g') X Xdo-install: X.for i in mpeg3cat mpeg3dump mpeg3toc X ${INSTALL_PROGRAM} ${WRKSRC}/FreeBSD/${i} ${PREFIX}/bin X.endfor X ${INSTALL_DATA} ${WRKSRC}/FreeBSD/libmpeg3.a ${PREFIX}/lib X.for i in libmpeg3.h mpeg3private.h X ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/include X.endfor X.ifndef (NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X ${INSTALL_DATA} ${WRKSRC}/docs/index.html ${DOCSDIR} X.endif X X.include <bsd.port.mk> END-of-libmpeg3/Makefile echo c - libmpeg3/files mkdir -p libmpeg3/files > /dev/null 2>&1 echo x - libmpeg3/files/patch-Makefile sed 's/^X//' >libmpeg3/files/patch-Makefile << 'END-of-libmpeg3/files/patch-Makefile' X--- Makefile.orig X+++ Makefile X@@ -1,7 +1,7 @@ X-CC = gcc X-NASM = nasm X+#CC = gcc X+#NASM = nasm X USE_MMX = 0 X-USE_CSS = 1 X+USE_CSS = 0 X A52DIR := $(shell expr a52dec* ) X X X@@ -138,7 +138,7 @@ X #$(OBJDIR)/mpeg3split X X X-LIBS = -lm -lpthread X+LIBS = -lm %%PTHREAD_LIBS%% X X $(shell if ! test -d $(OBJDIR) \; then mkdir -p $(OBJDIR) \; fi ) X END-of-libmpeg3/files/patch-Makefile echo x - libmpeg3/files/patch-mpeg3ifo.c sed 's/^X//' >libmpeg3/files/patch-mpeg3ifo.c << 'END-of-libmpeg3/files/patch-mpeg3ifo.c' X--- mpeg3ifo.c.orig X+++ mpeg3ifo.c X@@ -1,4 +1,4 @@ X-#include <byteswap.h> X+//#include <byteswap.h> X #include <dirent.h> X #include <fcntl.h> X #include <stdlib.h> X@@ -9,6 +9,14 @@ X #include "ifo.h" X #include "mpeg3private.h" X #include "mpeg3protos.h" X+ X+#define bswap_16(x) ((((x) << 8) & 0xff00) | \ X+ (((x) >> 8) & 0x00ff)) X+ X+#define bswap_32(x) ((((x) << 24) & 0xff000000) | \ X+ (((x) << 8) & 0x00ff0000) | \ X+ (((x) >> 8) & 0x0000ff00) | \ X+ (((x) >> 24) & 0x000000ff)) X X typedef struct X { END-of-libmpeg3/files/patch-mpeg3ifo.c echo x - libmpeg3/files/patch-ifo.h sed 's/^X//' >libmpeg3/files/patch-ifo.h << 'END-of-libmpeg3/files/patch-ifo.h' X--- ifo.h.orig X+++ ifo.h X@@ -15,6 +15,8 @@ X #define IFO_OFFSET_SUBPIC 0x0250 X X X+typedef off_t __off64_t; X+ X // for debug and error output X X /** END-of-libmpeg3/files/patch-ifo.h echo x - libmpeg3/files/patch-mpeg3io.c sed 's/^X//' >libmpeg3/files/patch-mpeg3io.c << 'END-of-libmpeg3/files/patch-mpeg3io.c' X--- mpeg3io.c.orig X+++ mpeg3io.c X@@ -1,7 +1,7 @@ X #include "mpeg3private.h" X #include "mpeg3protos.h" X X-#include <mntent.h> X+#include <fstab.h> X #include <stdint.h> X #include <stdlib.h> X #include <string.h> X@@ -35,8 +35,8 @@ X X int64_t mpeg3io_get_total_bytes(mpeg3_fs_t *fs) X { X- struct stat64 ostat; X- stat64(fs->path, &ostat); X+ struct stat ostat; X+ stat(fs->path, &ostat); X fs->total_bytes = ostat.st_size; X return fs->total_bytes; X X@@ -50,8 +50,8 @@ X X int64_t mpeg3io_path_total_bytes(char *path) X { X- struct stat64 st; X- if(stat64(path, &st) < 0) return 0; X+ struct stat st; X+ if(stat(path, &st) < 0) return 0; X return st.st_size; X } X X@@ -61,7 +61,7 @@ X mpeg3_get_keys(fs->css, fs->path); X X //printf("mpeg3io_open_file 1 %s\n", fs->path); X- if(!(fs->fd = fopen64(fs->path, "rb"))) X+ if(!(fs->fd = fopen(fs->path, "rb"))) X { X perror("mpeg3io_open_file"); X return 1; X@@ -157,7 +157,7 @@ X if(remainder) X memmove(fs->buffer + remainder_start, fs->buffer, remainder); X X- fseeko64(fs->fd, new_buffer_position, SEEK_SET); X+ fseek(fs->fd, new_buffer_position, SEEK_SET); X fread(fs->buffer, 1, remainder_start, fs->fd); X X X@@ -172,7 +172,7 @@ X fs->buffer_position = fs->current_byte; X fs->buffer_offset = 0; X X- result = fseeko64(fs->fd, fs->buffer_position, SEEK_SET); X+ result = fseek(fs->fd, fs->buffer_position, SEEK_SET); X fs->buffer_size = fread(fs->buffer, 1, MPEG3_IO_SIZE, fs->fd); X X X@@ -210,27 +210,27 @@ X X int mpeg3io_device(char *path, char *device) X { X- struct stat64 file_st, device_st; X- struct mntent *mnt; X- FILE *fp; X+ struct stat file_st, device_st; X+ struct fstab *mnt; X+ int fp; X X- if(stat64(path, &file_st) < 0) X+ if(stat(path, &file_st) < 0) X { X perror("mpeg3io_device"); X return 1; X } X X- fp = setmntent(MOUNTED, "r"); X- while(fp && (mnt = getmntent(fp))) X+ fp = setfsent(); X+ while(fp && (mnt = getfsent())) X { X- if(stat64(mnt->mnt_fsname, &device_st) < 0) continue; X+ if(stat(mnt->fs_spec, &device_st) < 0) continue; X if(device_st.st_rdev == file_st.st_dev) X { X- strncpy(device, mnt->mnt_fsname, MPEG3_STRLEN); X+ strncpy(device, mnt->fs_spec, MPEG3_STRLEN); X break; X- } X+ } X } X- endmntent(fp); X+ endfsent(); X X return 0; X } END-of-libmpeg3/files/patch-mpeg3io.c echo x - libmpeg3/files/patch-a52dec-0.7.3_include_config.h sed 's/^X//' >libmpeg3/files/patch-a52dec-0.7.3_include_config.h << 'END-of-libmpeg3/files/patch-a52dec-0.7.3_include_config.h' X--- a52dec-0.7.3/include/config.h.orig X+++ a52dec-0.7.3/include/config.h X@@ -17,7 +17,7 @@ X /* #undef HAVE_IO_H */ X X /* Define if you have the `memalign' function. */ X-#define HAVE_MEMALIGN 1 X+/*#define HAVE_MEMALIGN 1*/ X X /* Define if you have the <memory.h> header file. */ X #define HAVE_MEMORY_H 1 END-of-libmpeg3/files/patch-a52dec-0.7.3_include_config.h exit --- libmpeg3.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502061908.j16J8GoN014379>