diff --git a/multimedia/lxdvdrip/Makefile b/multimedia/lxdvdrip/Makefile index a62e43d96752..fcc194d766bb 100644 --- a/multimedia/lxdvdrip/Makefile +++ b/multimedia/lxdvdrip/Makefile @@ -6,10 +6,9 @@ # PORTNAME= lxdvdrip -PORTVERSION= 1.41 +PORTVERSION= 1.46 CATEGORIES= multimedia MASTER_SITES= http://download.berlios.de/lxdvdrip/ -DISTNAME= ${PORTNAME}-${PORTVERSION}-3 EXTRACT_SUFX= .tgz MAINTAINER= q@galgenberg.net @@ -22,13 +21,19 @@ PKGMESSAGE= ${WRKDIR}/pkg-message WRKSRC= ${WRKDIR}/${PORTNAME} +MAN1= lxdvdrip.1 + do-build: - (cd ${WRKSRC}; ${CC} ${CFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib \ - -ldvdread -lm -o lxdvdrip lxdvdrip.c) + (cd ${WRKSRC}; \ + ${CC} ${CFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib \ + -ldvdread -lm -o lxdvdrip lxdvdrip.c; \ + ${CC} ${CFLAGS} -lm -o lxac3scan lxac3scan.c) do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/lxdvdrip ${LOCALBASE}/bin - ${INSTALL_DATA} ${WRKSRC}/doc-pak/lxdvdrip.conf.* ${LOCALBASE}/etc + ${INSTALL_PROGRAM} ${WRKSRC}/lxdvdrip ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/lxac3scan ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/lxdvdrip.1 ${PREFIX}/man/man1 + ${INSTALL_DATA} ${WRKSRC}/doc-pak/lxdvdrip.conf.* ${PREFIX}/etc .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} cd ${WRKSRC}/doc-pak && ${CP} Changelog* README.* TODO freebsd.doc ${DOCSDIR} diff --git a/multimedia/lxdvdrip/distinfo b/multimedia/lxdvdrip/distinfo index 1da7d7e9ea88..8803cb022dc2 100644 --- a/multimedia/lxdvdrip/distinfo +++ b/multimedia/lxdvdrip/distinfo @@ -1,2 +1,2 @@ -MD5 (lxdvdrip-1.41-3.tgz) = bd325a8a4a5519a2146a2ca9ecfea3b3 -SIZE (lxdvdrip-1.41-3.tgz) = 456578 +MD5 (lxdvdrip-1.46.tgz) = 025fc4b3c1de1a716a579b90fd9bb1b6 +SIZE (lxdvdrip-1.46.tgz) = 512236 diff --git a/multimedia/lxdvdrip/files/patch-lxac3scan.c b/multimedia/lxdvdrip/files/patch-lxac3scan.c new file mode 100644 index 000000000000..654eb00292a8 --- /dev/null +++ b/multimedia/lxdvdrip/files/patch-lxac3scan.c @@ -0,0 +1,16 @@ +--- lxac3scan.c.orig Tue Feb 22 20:56:28 2005 ++++ lxac3scan.c Wed Jul 6 18:36:10 2005 +@@ -19,11 +19,11 @@ + FILE* fStdin; + FILE* fStdout; + ++ char ch=' '; ++ + fStdin = fopen ("/dev/stdin", "rb"); + fStdout = fopen ("/dev/stdout", "wb"); + +- char ch=' '; +- + // Schleife 1: Alles ueberspringen bis zum ersten sync word + do { + if (fread (&ch, 1, 1, fStdin) <= 0) break; diff --git a/multimedia/lxdvdrip/files/patch-lxdvdrip.c b/multimedia/lxdvdrip/files/patch-lxdvdrip.c index 2132de964d39..ed7826011cd3 100644 --- a/multimedia/lxdvdrip/files/patch-lxdvdrip.c +++ b/multimedia/lxdvdrip/files/patch-lxdvdrip.c @@ -1,94 +1,40 @@ ---- lxdvdrip.c.orig Wed Jan 12 23:31:49 2005 -+++ lxdvdrip.c Wed Jan 26 21:31:51 2005 -@@ -229,6 +229,11 @@ - #include - #include - #include -+#include -+#include -+#ifndef __FreeBSD__ -+#include -+#endif - #include - #include - #include -@@ -621,16 +626,19 @@ - // Gibt die Groesse einer Datei zurueck, ohne die stat Beschraenkung auf < 2 GB - long long filesize64 (char * szFileName) - { -+#ifdef __FreeBSD__ -+ struct stat buf; -+ -+ if (stat(szFileName, &buf) < 0) -+ return 0LL; -+ -+ return buf.st_size; -+#else - FILE * fp; - long long lSize; - char szBuffer[128]; - char szTempl[32] = "/tmp/groesse.lxdvdrip"; --// FreeBSD hat fopen64 als Standard --#ifdef _FREEBSD -- fp = (FILE*)fopen (szFileName, "rb"); --#else - fp = (FILE*)fopen64 (szFileName, "rb"); --#endif - if (!fp) - { - return (long long)0; -@@ -644,39 +652,28 @@ - system ("rm /tmp/groesse.lxdvdrip"); - lSize = atoll (szBuffer); - return lSize; -+#endif - } +--- lxdvdrip.c.orig Tue May 31 23:26:37 2005 ++++ lxdvdrip.c Wed Jul 6 18:34:10 2005 +@@ -763,6 +763,9 @@ + FILE *filehandle = 0; + int i; - // Berechnet freien Festplattenplatz - long long calculate_discfree (char * szPfad, long lSprache) - { -- char szTempl[32] = "/tmp/lxdf.lxdvdrip"; -- char szBefehl[1024]; -+ struct statfs buf; - long long lGroesse=0; -- sprintf (szBefehl, "stat -f %s -c ", szPfad); -- strcat (szBefehl, "'%a %s' > "); -- strcat (szBefehl, szTempl); -- if (system (szBefehl) == 0) ++#define DVD_SEC_SIZ 2048 ++ char tempBuf[DVD_SEC_SIZ]; + -+ if (statfs(szPfad, &buf) < 0) -+ return 0; -+ -+ lGroesse = buf.f_bavail*buf.f_bsize; -+ -+ switch (lSprache) - { -- FILE * fTmp; -- long long lFrei; -- long long lBlockGroesse; -- fTmp = fopen(szTempl,"r"); -- if (fTmp) -- { -- fscanf (fTmp, "%lld %lld", &lFrei, &lBlockGroesse); -- fclose (fTmp); -- lGroesse = lFrei * lBlockGroesse; -- } -- system ("rm /tmp/lxdf.lxdvdrip"); -- switch (lSprache) -- { -- case 0: printf ("Frei in %s: %lld Bytes\n", szPfad, lGroesse); -- break; -- case 1: printf ("Free in %s: %lld Bytes\n", szPfad, lGroesse); -- break; -- case 2: printf ("Espace libre sur %s: %lld octets\n", szPfad, lGroesse); -- break; -- } -+ case 0: printf ("Frei in %s: %lld Bytes\n", szPfad, lGroesse); -+ break; -+ case 1: printf ("Free in %s: %lld Bytes\n", szPfad, lGroesse); -+ break; -+ case 2: printf ("Espace libre sur %s: %lld octets\n", szPfad, lGroesse); -+ break; - } - return lGroesse; - } + if (!(filehandle = fopen (dvd_device, "r"))) + { + switch (lSprache) +@@ -782,7 +785,7 @@ + return -1; + } + +- if (fseek (filehandle, 32808, SEEK_SET)) ++ if (fseek (filehandle, 32768, SEEK_SET)) + { + fclose (filehandle); + switch (lSprache) +@@ -802,7 +805,7 @@ + return -1; + } + +- if (32 != (i = fread (title, 1, 32, filehandle))) ++ if (DVD_SEC_SIZ != fread (tempBuf, 1, DVD_SEC_SIZ, filehandle)) + { + fclose (filehandle); + switch (lSprache) +@@ -820,7 +823,8 @@ + strcpy (title, "unknown"); + return -1; + } +- ++ snprintf( title, 32, "%s", tempBuf + 40 ); ++ i=32; + fclose (filehandle); + + title[32] = '\0'; diff --git a/multimedia/lxdvdrip/pkg-plist b/multimedia/lxdvdrip/pkg-plist index 8ab45829ed22..f96cb114e768 100644 --- a/multimedia/lxdvdrip/pkg-plist +++ b/multimedia/lxdvdrip/pkg-plist @@ -1,4 +1,5 @@ bin/lxdvdrip +bin/lxac3scan etc/lxdvdrip.conf.DE etc/lxdvdrip.conf.EN etc/lxdvdrip.conf.FR