diff options
author | netchild <netchild@FreeBSD.org> | 2003-11-17 18:11:20 +0800 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2003-11-17 18:11:20 +0800 |
commit | b38128b2cf8166a76640ea22412fb239c62aba0a (patch) | |
tree | 938d76d445f25a3267c685874d21d6eca12c7c9b /sysutils | |
parent | d76d1acac6587414a9ddce36c9791ab9f47358f6 (diff) | |
download | freebsd-ports-gnome-b38128b2cf8166a76640ea22412fb239c62aba0a.tar.gz freebsd-ports-gnome-b38128b2cf8166a76640ea22412fb239c62aba0a.tar.zst freebsd-ports-gnome-b38128b2cf8166a76640ea22412fb239c62aba0a.zip |
- Add a knob WITH_DVDHACK that builds cdrecord with a third-party patch
allowing to record DVD-R[W]s. [1]
NOTE: Please don't blame Joerg Schilling or ask for support on the
cdrtools mailing lists if this doesn't work. Also have a look
at the output of `cdrecord -version`.
- Append '-rscsi' to PKGNAMESUFFIX when built with WITH_RSCSI (equivalent
is done when built with WITH_DVDHACK).
- Limit the workaround that disables using mlockall(2) to FreeBSD versions
where it triggers a panic.
Requested by: pav [1]
Tested by: Harold Gutch <logix@foobar.franken.de> [1]
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/cdrtools-devel/Makefile | 26 | ||||
-rw-r--r-- | sysutils/cdrtools-devel/distinfo | 1 | ||||
-rw-r--r-- | sysutils/cdrtools-devel/files/extra-patch-drv_mmc.c | 37 | ||||
-rw-r--r-- | sysutils/cdrtools-devel/files/patch-conf::configure | 13 |
4 files changed, 69 insertions, 8 deletions
diff --git a/sysutils/cdrtools-devel/Makefile b/sysutils/cdrtools-devel/Makefile index 3fe2752ea728..a0660dcda7e1 100644 --- a/sysutils/cdrtools-devel/Makefile +++ b/sysutils/cdrtools-devel/Makefile @@ -7,13 +7,20 @@ PORTNAME?= cdrtools PORTVERSION?= 2.01a19 -PORTREVISION?= 0 +#PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES?= sysutils audio MASTER_SITES= ftp://ftp.berlios.de/pub/cdrecord/alpha/ \ ftp://ftp.cs.tu-berlin.de/pub/misc/cdrecord/alpha/ -PKGNAMESUFFIX= -devel DISTNAME= cdrtools-2.01a19 +.if defined(WITH_DVDHACK) && !defined(MKISOFS) +PATCH_SITES= http://people.mandrakesoft.com/~warly/files/cdrtools/archives/ +PATCHFILES= cdrtools-2.01a16-dvd.patch.bz2 +PATCH_DIST_STRIP= -p1 +EXTRA_PATCHES= ${FILESDIR}/extra-patch-drv_mmc.c +.endif + MAINTAINER= marius@alchemy.franken.de COMMENT?= Cdrecord and other programs to extract and record CDs/CD-R[W]s @@ -49,13 +56,18 @@ PKGMESSAGE= "" .else DOCSSRC= ${WRKSRC} PKGMESSAGE= ${WRKDIR}/pkg-message +.if defined(WITH_DVDHACK) +_DVDSUFFIX= -dvd +.endif .if defined(WITH_RSCSI) PKGINSTALL= ${PKGDIR}/pkg-install.rscsi PLIST_SUB= RSCSI="" +_RSCSISUFFIX= -rscsi .else PLIST_SUB= RSCSI="@comment " .endif .endif +PKGNAMESUFFIX= ${_DVDSUFFIX}${_RSCSISUFFIX}-devel .include <bsd.port.pre.mk> @@ -64,10 +76,12 @@ pre-everything:: @${ECHO_MSG} "" @${ECHO_MSG} "You may use the following build option(s):" @${ECHO_MSG} "" - @${ECHO_MSG} "WITH_RSCSI=yes builds with rscsi which allows using SCSI-devices over the" - @${ECHO_MSG} " network." - @${ECHO_MSG} " BEWARE: The rscsi binary gets installed suid root as this is" - @${ECHO_MSG} " the preferred method to set it up." + @${ECHO_MSG} "WITH_DVDHACK=yes builds with a third-party patch that enables recording" + @${ECHO_MSG} " of DVD-R[W]s." + @${ECHO_MSG} "WITH_RSCSI=yes builds with rscsi which allows using SCSI-devices over" + @${ECHO_MSG} " the network." + @${ECHO_MSG} " BEWARE: The rscsi binary gets installed suid root as" + @${ECHO_MSG} " this is the preferred method to set it up." @${ECHO_MSG} "" .endif diff --git a/sysutils/cdrtools-devel/distinfo b/sysutils/cdrtools-devel/distinfo index 9568c4b2a779..c51c18e7a347 100644 --- a/sysutils/cdrtools-devel/distinfo +++ b/sysutils/cdrtools-devel/distinfo @@ -1 +1,2 @@ MD5 (cdrtools-2.01a19.tar.bz2) = d35cbd5af1b2a375656db66e9bd79739 +MD5 (cdrtools-2.01a16-dvd.patch.bz2) = 01ad227cc3b700fd5f19a6a043c1b847 diff --git a/sysutils/cdrtools-devel/files/extra-patch-drv_mmc.c b/sysutils/cdrtools-devel/files/extra-patch-drv_mmc.c new file mode 100644 index 000000000000..9dee2f41a62a --- /dev/null +++ b/sysutils/cdrtools-devel/files/extra-patch-drv_mmc.c @@ -0,0 +1,37 @@ +--- cdrecord/drv_mmc.c.orig Thu Oct 9 01:10:41 2003 ++++ cdrecord/drv_mmc.c Thu Oct 9 01:31:28 2003 +@@ -224,13 +224,13 @@ + scsi_unload, + read_buff_cap, + cmd_dummy, /* recovery_needed */ +- (int(*)__PR((SCSI *, int)))cmd_dummy, /* recover */ ++ (int(*)__PR((SCSI *, cdr_t *, int)))cmd_dummy, /* recover */ + speed_select_mdvd, + select_secsize, + next_wr_addr_mdvd, + (int(*)__PR((SCSI *, Ulong)))cmd_ill, /* reserve_track */ + scsi_cdr_write, +- (int(*)__PR((SCSI *scgp, int, track_t *)))cmd_dummy, /* gen_cue */ ++ (int(*)__PR((track_t *, void *, BOOL)))cmd_dummy, /* gen_cue */ + (int(*)__PR((SCSI *scgp, cdr_t *, track_t *)))cmd_dummy, /* send_cue */ + write_leadin_mmc, + open_track_mdvd, +@@ -702,8 +702,7 @@ + #endif + } + if (is_dvd) { +- errmsgno(EX_BAD, +- "Found DVD media: using cdr_mdvd.\n"); ++ printf("Found DVD media: using cdr_mdvd.\n"); + dp = &cdr_mdvd; + } + return (dp); +@@ -1083,7 +1082,7 @@ + return (0); + } + +-LOCAL int ++EXPORT int + check_writemodes_mdvd(scgp, dp) + SCSI *scgp; + cdr_t *dp; diff --git a/sysutils/cdrtools-devel/files/patch-conf::configure b/sysutils/cdrtools-devel/files/patch-conf::configure index eda23804083c..6cbcfc0b2002 100644 --- a/sysutils/cdrtools-devel/files/patch-conf::configure +++ b/sysutils/cdrtools-devel/files/patch-conf::configure @@ -1,10 +1,19 @@ --- conf/configure.orig Fri Sep 19 16:47:37 2003 +++ conf/configure Fri Sep 19 16:49:26 2003 -@@ -5567,6 +5567,7 @@ +@@ -5564,9 +5564,16 @@ + extern int errno; + #endif + ++#if defined (__FreeBSD__) && __FreeBSD__ >= 2 ++#include <osreldate.h> ++#endif ++ int main() { -+ exit(1); ++#if defined(__FreeBSD__) && __FreeBSD_version < 501113 ++ exit(-1); ++#endif if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) { if (errno == EINVAL || errno == ENOMEM || errno == EPERM || errno == EACCES) |