# 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: # # mpglen # mpglen/pkg-descr # mpglen/distinfo # mpglen/Makefile # mpglen/files # mpglen/files/patch-mpglen.c # echo c - mpglen mkdir -p mpglen > /dev/null 2>&1 echo x - mpglen/pkg-descr sed 's/^X//' >mpglen/pkg-descr << 'END-of-mpglen/pkg-descr' Xmpglen is a simple tool to read in one or more mpeg files and report the Xnumber of frames and GOPs it finds. X XI wrote it because the mpeg format does not include any length information Xin it's header, and to convert an mpeg to a known size (S)VCD, you need to Xknow the length to select the optimum bitrate. X XWWW: http://www.iamnota.net/mpglen/ END-of-mpglen/pkg-descr echo x - mpglen/distinfo sed 's/^X//' >mpglen/distinfo << 'END-of-mpglen/distinfo' XMD5 (mpglen.tar.gz) = 0c873fc663f6ab68714b17e9ec312956 XSIZE (mpglen.tar.gz) = 10149 END-of-mpglen/distinfo echo x - mpglen/Makefile sed 's/^X//' >mpglen/Makefile << 'END-of-mpglen/Makefile' X# New ports collection makefile for: mpglen X# Date created: 26 October 2003 X# Whom: Mezz X# X# $FreeBSD$ X# X XPORTNAME= mpglen XPORTVERSION= 20030531 XCATEGORIES= multimedia XMASTER_SITES= http://www.iamnota.net/mpglen/ XDISTNAME= ${PORTNAME} X XMAINTAINER= mezz@FreeBSD.org XCOMMENT= Scan through a MPEG file and count the number of GOPs and frames X XALL_TARGET= XPLIST_FILES= bin/${PORTNAME} XUSE_REINPLACE= yes X XPORTDOCS= AUTHORS COPYING Changelog README X Xpost-patch: X @${REINPLACE_CMD} -e 's|gcc -O4|${CC} ${CFLAGS}|g ; \ X s|__FILE_OFFSET_BITS_64|_FILE_OFFSET_BITS=64|g' \ X ${WRKSRC}/Makefile X Xdo-install: X @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/ X.ifndef (NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X.for i in ${PORTDOCS} X @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} X.endfor X.endif X X.include END-of-mpglen/Makefile echo c - mpglen/files mkdir -p mpglen/files > /dev/null 2>&1 echo x - mpglen/files/patch-mpglen.c sed 's/^X//' >mpglen/files/patch-mpglen.c << 'END-of-mpglen/files/patch-mpglen.c' X--- mpglen.c.orig Fri Jun 6 04:09:43 2003 X+++ mpglen.c Mon Jan 24 20:22:12 2005 X@@ -23,6 +23,7 @@ X * X */ X X+#include X #include X #include X #include X@@ -30,6 +31,11 @@ X #include X #include X X+typedef off_t off64_t; X+#define lseek64 lseek X+#define mmap64 mmap X+#define open64 open X+ X extern char *optarg; X extern int optind, opterr, optopt; X extern int errno; X@@ -136,7 +142,7 @@ X tframes = tgops = 0; X while (optind < argc) { X fnum++; X- fp = open64(argv[optind], O_RDONLY | O_LARGEFILE); X+ fp = open64(argv[optind], O_RDONLY); X if (!fp) { X fprintf(stderr, "Couldn't open file %s\n",argv[optind]); X continue; END-of-mpglen/files/patch-mpglen.c exit