summaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-04-03 15:11:07 +0000
committerpav <pav@FreeBSD.org>2004-04-03 15:11:07 +0000
commit7b9f311ffbca361bed24de408a63267408d8ad42 (patch)
treeeb69fbd4ad5e0eafb020bd6187e2382c01c6f2b7 /multimedia
parent19a7427e9e51b80147939a514d9fb1db005d11e8 (diff)
downloadFreeBSD-ports-7b9f311ffbca361bed24de408a63267408d8ad42.zip
FreeBSD-ports-7b9f311ffbca361bed24de408a63267408d8ad42.tar.gz
- Use /dev/acd0[c] as a default CD/DVD device
- Allow people to override default device with DEFAULT_CDROM_DEVICE and DEFAULT_DVD_DEVICE knobs PR: ports/65059 Submitted by: michael johnson <ahze@ahze.net> Approved by: maintainer
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/mplayer/Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/multimedia/mplayer/Makefile b/multimedia/mplayer/Makefile
index ea5a10e..c6fb047 100644
--- a/multimedia/mplayer/Makefile
+++ b/multimedia/mplayer/Makefile
@@ -91,6 +91,17 @@
# WITH_DVD
# default: autodetect
#
+# WITH_DVD_DEVICE
+# default 5.x: /dev/acd0
+# default 4.x: /dev/acd0c
+# change the default dvd device
+#
+# WITH_CDROM_DEVICE
+# default 5.x: /dev/acd0
+# default 4.x: /dev/acd0c
+# change the default cdrom device
+# useful for VCD's
+#
# WITH_LIBDVDREAD
# default: disabled
# define this if you prefer the use of libdvdread instead of the
@@ -518,6 +529,26 @@ CONFIGURE_ARGS+=--enable-xanim --with-xanimlibdir=${X11BASE}/lib/X11/xanim
CONFIGURE_ARGS+=--disable-xanim
.endif
+.if defined(WITH_DVD_DEVICE)
+DEFAULT_DVD_DEVICE=${WITH_DVD_DEVICE}
+.else
+.if ${OSVERSION} < 500000
+DEFAULT_DVD_DEVICE=/dev/acd0c
+.else
+DEFAULT_DVD_DEVICE=/dev/acd0
+.endif
+.endif
+
+.if defined(WITH_CDROM_DEVICE)
+DEFAULT_CDROM_DEVICE=${WITH_CDROM_DEVICE}
+.else
+.if ${OSVERSION} < 500000
+DEFAULT_CDROM_DEVICE=/dev/acd0c
+.else
+DEFAULT_CDROM_DEVICE=/dev/acd0
+.endif
+.endif
+
# "enable" build for other archs
.if ${ARCH} == "i386"
.if !defined(WITHOUT_RUNTIME_CPUDETECTION)
@@ -583,6 +614,9 @@ post-patch:
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} -Ee 's#-pthread|-lc_r#${PTHREAD_LIBS}#g' \
${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|; \
+ s|/dev/cdrom|${DEFAULT_CDROM_DEVICE}|' \
+ ${WRKSRC}/configure
.if defined(WITH_RTC)
@${REINPLACE_CMD} -e \
's|<linux/rtc.h>|<rtc.h>|' \
OpenPOWER on IntegriCloud