[Midnightbsd-cvs] mports: mports/sysutils: add dvd +rw tools
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Oct 22 00:34:59 EDT 2007
Log Message:
-----------
add dvd +rw tools
Modified Files:
--------------
mports/sysutils:
Makefile (r1.50 -> r1.51)
Added Files:
-----------
mports/sysutils/dvd+rw-tools:
Makefile (r1.1)
distinfo (r1.1)
pkg-descr (r1.1)
mports/sysutils/dvd+rw-tools/files:
patch-growisofs.c (r1.1)
patch-mp.h (r1.1)
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/sysutils/Makefile,v
retrieving revision 1.50
retrieving revision 1.51
diff -Lsysutils/Makefile -Lsysutils/Makefile -u -r1.50 -r1.51
--- sysutils/Makefile
+++ sysutils/Makefile
@@ -10,6 +10,7 @@
SUBDIR += consolekit
SUBDIR += coreutils
SUBDIR += dmidecode
+ SUBDIR += dvd+rw-tools
SUBDIR += dvdbackup
SUBDIR += etoile-behavior
SUBDIR += etoile-installer
--- /dev/null
+++ sysutils/dvd+rw-tools/pkg-descr
@@ -0,0 +1,14 @@
+DVD+RW Tools by Andy Polyakov. This software allows one to perform DVD
+recording using a DVD burner, primarily via the "growisofs" utility.
+
+growisofs was originally designed as a frontend to mkisofs to facilitate
+appending of data to ISO9660 volumes residing on random-access media such as
+DVD+RW, DVD-RAM, plain files, hard disk partitions. In the course of
+development general purpose DVD recording support was implemented, and as of
+now growisofs supports not only random-access media, but even mastering of
+multi-session DVD media such as DVD+R and DVD-R/-RW. In addition growisofs
+supports first-/single-session recording of arbitrary pre-mastered image
+(formatted as UDF, ISO9660 or any other file system, if formatted at all) to
+all supported DVD media types.
+
+WWW: http://fy.chalmers.se/~appro/linux/DVD+RW/
--- /dev/null
+++ sysutils/dvd+rw-tools/Makefile
@@ -0,0 +1,45 @@
+# New ports collection makefile for: dvd+rw-tools
+# Date created: 2003-6-15
+# Whom: chuck at pkix.net
+#
+# $MidnightBSD: mports/sysutils/dvd+rw-tools/Makefile,v 1.1 2007/10/22 04:34:57 laffer1 Exp $
+# $FreeBSD: ports/sysutils/dvd+rw-tools/Makefile,v 1.25 2007/03/30 20:51:44 pav Exp $
+
+PORTNAME= dvd+rw-tools
+PORTVERSION= 7.0
+CATEGORIES= sysutils
+MASTER_SITES= http://www.pkix.net/mirror/fy.chalmers.se/ \
+ http://fy.chalmers.se/~appro/linux/DVD+RW/tools/
+
+MAINTAINER= ports at MidnightBSD.org
+COMMENT= DVD burning software
+
+USE_CDRTOOLS= yes
+
+MAN1= growisofs.1
+BIN_FILES= growisofs dvd+rw-format dvd+rw-booktype dvd+rw-mediainfo dvd-ram-control
+PLIST_FILES= ${BIN_FILES:S|^|bin/|}
+PORTDOCS= index.html
+
+post-patch:
+ @${REINPLACE_CMD} -E \
+ -e 's/-D_THREAS_SAFE/-D_THREAD_SAFE/' \
+ -e 's/-D_THREAD_SAFE/-D_THREAD_SAFE ${PTHREAD_CFLAGS}/' \
+ -e 's/-pthread/${PTHREAD_LIBS}/' \
+ -e 's/-O2//' \
+ -e 's/FreeBSD/MidnightBSD/' \
+ ${WRKSRC}/Makefile.m4
+
+do-install:
+.for i in ${BIN_FILES}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/bin
+.endfor
+ ${INSTALL_MAN} ${WRKSRC}/growisofs.1 ${MANPREFIX}/man/man1/
+
+post-install:
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/index.html ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
--- /dev/null
+++ sysutils/dvd+rw-tools/distinfo
@@ -0,0 +1,3 @@
+MD5 (dvd+rw-tools-7.0.tar.gz) = 2eb9c2a6b1e6bc7c4d72d3b5ece34ceb
+SHA256 (dvd+rw-tools-7.0.tar.gz) = c9ffc46ac4e97153f1752f0232a135ebae5688a8e35e975d23e958b785951422
+SIZE (dvd+rw-tools-7.0.tar.gz) = 131259
--- /dev/null
+++ sysutils/dvd+rw-tools/files/patch-growisofs.c
@@ -0,0 +1,102 @@
+--- growisofs.c.orig Sun Sep 24 17:28:53 2006
++++ growisofs.c Fri Feb 2 12:08:20 2007
+@@ -370,12 +370,17 @@
+ * upon Layer Break command, therefore longer timeout is required;
+ * - Linux: deploy BLKFLSBUF to avoid media reloads when possible;
+ * - add unit buffer utilization indicator [by request from K3b];
++ * 7.0.1: (by Nicolas Boichat, Bacula project)
++ * - Allow session to cross 4GB boundary regardless of medium type
++ * (dont need to have a DL media)
++ * - Add a -F option (used instead of -M or -Z), which displays next_session
++ * offset and capacity (free space = next_session - capacity).
+ */
+ #define PRINT_VERSION(cmd) do { \
+ char *s=strrchr((cmd),'/'); \
+ s ? s++ : (s=(cmd)); \
+ printf ("* %.*sgrowisofs by <appro at fy.chalmers.se>,"\
+- " version 7.0,\n",(int)(s-(cmd)),(cmd)); \
++ " version 7.0.1,\n",(int)(s-(cmd)),(cmd)); \
+ } while (0)
+
+ #define _LARGEFILE_SOURCE
+@@ -2773,6 +2778,18 @@
+ else in_device = argv[++i];
+ dev_found = 'Z';
+ }
++ else if (argv[i][1] == 'F')
++ { if (len > 2) in_device = argv[i]+2;
++ else in_device = argv[++i];
++ dev_found = 'F';
++ dry_run = 1; /* NEVER write anything with -F */
++ }
++ else if (!strncmp(opt,"-free-space",11))
++ { if (len > 11) in_device = opt+11;
++ else in_device = argv[++i];
++ dev_found = 'F';
++ dry_run = 1; /* NEVER write anything with -F */
++ }
+ else if (!strcmp(opt,"-poor-man"))
+ { if (poor_man<0) poor_man = 1;
+ continue;
+@@ -2908,6 +2925,9 @@
+ fflush (stdout);
+ #if defined(__unix) || defined(__unix__)
+ setuid(getuid());
++# ifdef __FreeBSD__
++ munlockall();
++#endif
+ execlp (mkisofs_argv[0],mkisofs_argv[0],"-version",NULL);
+ #elif defined(_WIN32)
+ if (_spawnl (_P_WAIT,mkisofs_argv[0],
+@@ -2989,11 +3009,14 @@
+ if (n==0) set_errno(EIO); /* end-of-file reached? */
+ }
+ if (n!=2048 && dev_found=='M')
++ {
+ perror (":-( unable to pread64(2) primary volume descriptor"),
+ fprintf (stderr," you most likely want to use -Z option.\n"),
+ exit (FATAL_START(errno));
+-
+- if (dev_found == 'M')
++ }
++ if ((dev_found == 'M') ||
++ ((dev_found == 'F') && !(mmc_profile&0x10000)) && (saved_descriptors[0].type[0] || saved_descriptors[0].type[1] || saved_descriptors[0].type[2]))
++ /* -F : The medium is not blank, there is a fs on it (the_buffer[0,1 or 2] != 0), so compute next_session. */
+ { if (memcmp (saved_descriptors[0].type,"\1CD001",6))
+ fprintf (stderr,":-( %s doesn't look like isofs...\n",
+ in_device), exit(FATAL_START(EMEDIUMTYPE));
+@@ -3016,8 +3039,7 @@
+ exit(FATAL_START(EINVAL));
+ }
+ else if (next_session > (0x200000-0x5000)) /* 4GB/2K-40MB/2K */
+- if ((mmc_profile&0xFFFF)<0x20 ||
+- ((mmc_profile&0xFFFF)<0x40 && !no_4gb_check))
++ if (!no_4gb_check)
+ fprintf (stderr,":-( next session would cross 4GB "
+ "boundary, aborting...\n"),
+ exit (FATAL_START(ENOSPC));
+@@ -3060,7 +3082,7 @@
+ exit (FATAL_START(EINVAL));
+
+ if (imgfd<0)
+- { if (mkisofs_argc==1)
++ { if ((mkisofs_argc==1) && (dev_found != 'F'))
+ fprintf (stderr,"%s: no mkisofs options specified, "
+ "aborting...\n",argv[0]),
+ exit (FATAL_START(EINVAL));
+@@ -3243,6 +3265,15 @@
+ break;
+ }
+ }
++
++ if (dev_found == 'F') {
++ off64_t capacity = 0;
++ printf("next_session=%lld\n", next_session*CD_BLOCK);
++ if (ioctl_handle!=INVALID_HANDLE)
++ capacity = get_capacity (ioctl_handle);
++ printf("capacity=%lld\n", capacity);
++ exit(0);
++ }
+
+ if (imgfd>=0)
+ { quiet--;
--- /dev/null
+++ sysutils/dvd+rw-tools/files/patch-mp.h
@@ -0,0 +1,12 @@
+--- mp.h.orig Wed May 10 16:01:28 2006
++++ mp.h Wed May 10 16:06:04 2006
+@@ -40,7 +40,9 @@
+
+ if (pthread_attr_init(&attr)==0 &&
+ pthread_attr_setstacksize(&attr,64*1024)==0 &&
++#if !defined(__FreeBSD__) || __FreeBSD_version >= 500000
+ pthread_attr_setscope(&attr,PTHREAD_SCOPE_SYSTEM)==0 &&
++#endif /* FreeBSD 4 does not support PTHREAD_SCOPE_SYSTEM */
+ pthread_create(&h,&attr,(void *(*)(void *))func,arg)==0 )
+ return (void *)h;
+
More information about the Midnightbsd-cvs
mailing list