aboutsummaryrefslogtreecommitdiff
path: root/sysutils/dvdbackup
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2010-09-17 09:31:27 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2010-09-17 09:31:27 +0000
commit79510b22084d2ab92c64edf940a06ea66f86c28a (patch)
tree30175a112aa3586c81898d0cc9335ca165ca7741 /sysutils/dvdbackup
parent3c06e3d3c4f9afece4e800a4915f058d4cedcfec (diff)
downloadports-79510b22084d2ab92c64edf940a06ea66f86c28a.tar.gz
ports-79510b22084d2ab92c64edf940a06ea66f86c28a.zip
Update to 0.4.1
PR: 150452 Submitted by: Ganael Laplanche <ganael.laplanche@martymac.org>
Notes
Notes: svn path=/head/; revision=261327
Diffstat (limited to 'sysutils/dvdbackup')
-rw-r--r--sysutils/dvdbackup/Makefile50
-rw-r--r--sysutils/dvdbackup/distinfo6
-rw-r--r--sysutils/dvdbackup/files/patch-src::dvdbackup.c82
-rw-r--r--sysutils/dvdbackup/files/pkg-message.in7
-rw-r--r--sysutils/dvdbackup/pkg-descr5
5 files changed, 72 insertions, 78 deletions
diff --git a/sysutils/dvdbackup/Makefile b/sysutils/dvdbackup/Makefile
index 3f496db2b784..a046e0bed80f 100644
--- a/sysutils/dvdbackup/Makefile
+++ b/sysutils/dvdbackup/Makefile
@@ -6,29 +6,51 @@
#
PORTNAME= dvdbackup
-PORTVERSION= 0.1.1
-PORTREVISION= 6
+PORTVERSION= 0.4.1
CATEGORIES= sysutils
-MASTER_SITES= http://dvd-create.sourceforge.net/ GENTOO/distfiles
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
MAINTAINER= ehaupt@FreeBSD.org
COMMENT= Backup content from DVD to hard disk
LIB_DEPENDS= dvdread.4:${PORTSDIR}/multimedia/libdvdread
-WRKSRC= ${WRKDIR}/${PORTNAME}
-PLIST_FILES= bin/dvdbackup
-PORTDOCS= README
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
-do-build:
- ${CC} -o ${WRKSRC}/dvdbackup ${CFLAGS} -I${LOCALBASE}/include \
- -L${LOCALBASE}/lib -ldvdread ${WRKSRC}/src/dvdbackup.c
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
-do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/dvdbackup ${PREFIX}/bin
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+SUB_FILES= pkg-message
+SUB_LIST= DEFAULT_DVD_DEVICE="${DEFAULT_DVD_DEVICE}"
+
+MAN1= dvdbackup.1
+PORTDOCS= NEWS README
+
+DEFAULT_DVD_DEVICE?= /dev/cd0
+
+.if !defined(WITHOUT_NLS)
+USE_GETTEXT= yes
+CONFIGURE_ARGS+= --enable-nls
+PLIST_SUB+= NLS=""
+.else
+CONFIGURE_ARGS+= --disable-nls
+PLIST_SUB+= NLS="@comment "
.endif
+post-patch:
+ @${REINPLACE_CMD} "s|/dev/dvd|${DEFAULT_DVD_DEVICE}|g" \
+ ${WRKSRC}/src/main.c ${WRKSRC}/po/*.po ${WRKSRC}/po/*.pot \
+ ${WRKSRC}/README ${WRKSRC}/man/dvdbackup.1
+
+pre-configure:
+.if defined(NOPORTDOCS)
+ @${REINPLACE_CMD} 's|^install-data-am: .*|install-data-am: |' \
+ ${WRKSRC}/Makefile.in
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
.include <bsd.port.mk>
diff --git a/sysutils/dvdbackup/distinfo b/sysutils/dvdbackup/distinfo
index bb2272685897..a60b5cc82985 100644
--- a/sysutils/dvdbackup/distinfo
+++ b/sysutils/dvdbackup/distinfo
@@ -1,3 +1,3 @@
-MD5 (dvdbackup-0.1.1.tar.gz) = 53a071d1def5ee49d702a4dd080d25ac
-SHA256 (dvdbackup-0.1.1.tar.gz) = 39b0ec9c00a6425a18edab52999932e87e3249e38a03da1d7a8e820232819db7
-SIZE (dvdbackup-0.1.1.tar.gz) = 24806
+MD5 (dvdbackup-0.4.1.tar.gz) = e23ed1a0d5ab97a81eebc93682c0bfeb
+SHA256 (dvdbackup-0.4.1.tar.gz) = ac9138b3265ef7f113d139e68130663937ce25322ae00922f74bab55aa63347b
+SIZE (dvdbackup-0.4.1.tar.gz) = 232885
diff --git a/sysutils/dvdbackup/files/patch-src::dvdbackup.c b/sysutils/dvdbackup/files/patch-src::dvdbackup.c
index 1741e69209d8..5c509eb9d873 100644
--- a/sysutils/dvdbackup/files/patch-src::dvdbackup.c
+++ b/sysutils/dvdbackup/files/patch-src::dvdbackup.c
@@ -1,78 +1,42 @@
---- src/dvdbackup.c.orig Mon Aug 5 02:08:39 2002
-+++ src/dvdbackup.c Tue Mar 1 05:01:19 2005
-@@ -210,6 +210,7 @@
- fprintf(stderr,"\t-v X\t\twhere X is the amount of verbosity\n");
- fprintf(stderr,"\t-I\t\tfor information about the DVD\n");
- fprintf(stderr,"\t-o directory\twhere directory is your backup target\n");
-+ fprintf(stderr,"\t-n\t\tuse this as DVD name (if we can't get it)\n");
- fprintf(stderr,"\t-M\t\tbackup the whole DVD\n");
- fprintf(stderr,"\t-F\t\tbackup the main feature of the DVD\n");
- fprintf(stderr,"\t-T X\t\tbackup title set X\n");
-@@ -219,8 +220,8 @@
- fprintf(stderr,"\t-a 0\t\tto get aspect ratio 4:3 instead of 16:9 if both are present\n");
- fprintf(stderr,"\t-h\t\tprint a brief usage message\n");
- fprintf(stderr,"\t-?\t\tprint a brief usage message\n\n");
-- fprintf(stderr,"\t-i is manditory\n");
-- fprintf(stderr,"\t-o is manditory except if you use -I\n");
-+ fprintf(stderr,"\t-i is mandatory\n");
-+ fprintf(stderr,"\t-o is mandatory except if you use -I\n");
- fprintf(stderr,"\t-a is option to the -F switch and has no effect on other options\n");
- fprintf(stderr,"\t-s and -e should prefereibly be used together with -t \n\n");
- exit(1);
-@@ -228,7 +228,8 @@
- }
+--- src/dvdbackup.c.orig 2010-09-16 22:10:04.307951355 +0200
++++ src/dvdbackup.c 2010-09-16 22:19:49.112413564 +0200
+@@ -99,7 +99,8 @@
- int CheckSizeArray(const int size_array[], int reference, int target) {
+
+ static int CheckSizeArray(const int size_array[], int reference, int target) {
- if ( (size_array[reference]/size_array[target] == 1) &&
+ if ( size_array[target] &&
-+ (size_array[reference]/size_array[target] == 1) &&
- ((size_array[reference] * 2 - size_array[target])/ size_array[target] == 1) &&
- ((size_array[reference]%size_array[target] * 3) < size_array[reference]) ) {
- /* We have a dual DVD with two feature films - now lets see if they have the same amount of chapters*/
-@@ -782,7 +783,7 @@
- to consider the second one a feature title we are doing two checks (biggest + biggest - second) /second == 1
- and biggest%second * 3 < biggest */
-
-- if ( CheckSizeArray(size_size_array, 0, 1) == 1 ) {
-+ if ( CheckSizeArray(size_size_array, 0, 1) == 1 && title_sets >1 ) {
- /* We have a dual DVD with two feature films - now lets see if they have the same amount of chapters*/
-
- chapters_1 = 0;
-@@ -1530,7 +1531,7 @@
++ (size_array[reference]/size_array[target] == 1) &&
+ ((size_array[reference] * 2 - size_array[target])/ size_array[target] == 1) &&
+ ((size_array[reference]%size_array[target] * 3) < size_array[reference]) ) {
+ /* We have a dual DVD with two feature films - now let's see if they have the same amount of chapters*/
+@@ -1264,7 +1265,7 @@
/* Seek to title of first track, which is at (track_no * 32768) + 40 */
- if ( 32808 != lseek(filehandle, 32808, SEEK_SET) ) {
+ if ( 32768 != lseek(filehandle, 32768, SEEK_SET) ) {
close(filehandle);
- fprintf(stderr, "Can't seek DVD device %s - check your DVD device\n", device);
+ fprintf(stderr, _("Cannot seek DVD device %s - check your DVD device\n"), device);
return(1);
-@@ -1538,12 +1539,18 @@
+@@ -1272,10 +1273,16 @@
/* Read the DVD-Video title */
- if ( 32 != read(filehandle, title, 32)) {
-+#define DVD_SEC_SIZ 2048
+- close(filehandle);
+- fprintf(stderr, _("Cannot read title from DVD device %s\n"), device);
+- return(1);
++#define DVD_SEC_SIZ 2048
+ {
-+ char tempBuf[ DVD_SEC_SIZ ];
++ char tempBuf[ DVD_SEC_SIZ ];
+
-+ if ( DVD_SEC_SIZ != read(filehandle, tempBuf, DVD_SEC_SIZ)) {
- close(filehandle);
- fprintf(stderr, "Can't read title from DVD device %s\n", device);
- return(1);
++ if (DVD_SEC_SIZ != read(filehandle, tempBuf, DVD_SEC_SIZ)) {
++ close(filehandle);
++ fprintf(stderr, _("Cannot read title from DVD device %s\n"), device);
++ return(1);
++ }
++ snprintf( title, 32, "%s", tempBuf + 40 );
}
-+ snprintf( title, 32, "%s", tempBuf + 40 );
-+ }
/* Terminate the title string */
-
- title[32] = '\0';
-@@ -2164,7 +2171,7 @@
- DVDGetTitleName(dvd,title_name);
-
-
-- fprintf(stdout,"\n\n\nDVD-Video information of the DVD with tile %s\n\n", title_name);
-+ fprintf(stdout,"\n\n\nDVD-Video information of the DVD with title %s\n\n", title_name);
-
- /* Print file structure */
-
diff --git a/sysutils/dvdbackup/files/pkg-message.in b/sysutils/dvdbackup/files/pkg-message.in
new file mode 100644
index 000000000000..db50123b3c38
--- /dev/null
+++ b/sysutils/dvdbackup/files/pkg-message.in
@@ -0,0 +1,7 @@
+=====================================================================
+
+%%DEFAULT_DVD_DEVICE%% is used as default DVD device. You may change
+this by defining DEFAULT_DVD_DEVICE to another device. Make sure you
+use a SCSI or atapicam(4) device, because an ATAPI device won't work.
+
+=====================================================================
diff --git a/sysutils/dvdbackup/pkg-descr b/sysutils/dvdbackup/pkg-descr
index d512086c998f..b0cc6af63ce3 100644
--- a/sysutils/dvdbackup/pkg-descr
+++ b/sysutils/dvdbackup/pkg-descr
@@ -1,3 +1,4 @@
-Backup content from DVD to hard disk
+dvdbackup is a tool to rip video DVDs from the command line. It has the
+advantages of being small, fast, and easy to use.
-WWW: http://dvd-create.sourceforge.net/
+WWW: http://dvdbackup.sourceforge.net/