aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2004-09-01 16:03:48 +0800
committerkrion <krion@FreeBSD.org>2004-09-01 16:03:48 +0800
commit1a5aaf02427f08c969b87f5f7e0add6938151f8b (patch)
treeaf8bf506ce06a3f0f223dc5a26265b10fa395e7a
parent06c405592e38376fffb53449e307c3fe6142e6bb (diff)
downloadfreebsd-ports-gnome-1a5aaf02427f08c969b87f5f7e0add6938151f8b.tar.gz
freebsd-ports-gnome-1a5aaf02427f08c969b87f5f7e0add6938151f8b.tar.zst
freebsd-ports-gnome-1a5aaf02427f08c969b87f5f7e0add6938151f8b.zip
Add knob to control where dvd device is
PR: ports/71164 Submitted by: maintainer
-rw-r--r--multimedia/gmencoder/Makefile23
1 files changed, 22 insertions, 1 deletions
diff --git a/multimedia/gmencoder/Makefile b/multimedia/gmencoder/Makefile
index 835dbc283583..024e12613070 100644
--- a/multimedia/gmencoder/Makefile
+++ b/multimedia/gmencoder/Makefile
@@ -28,9 +28,30 @@ USE_REINPLACE= yes
MAN1= gmencoder.1
+.include <bsd.port.pre.mk>
+
+.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
+
+pre-everything::
+.if !defined(WITH_DVD_DEVICE)
+ @${ECHO_MSG} "===> The default DVD device is ${DEFAULT_DVD_DEVICE}"
+ @${ECHO_MSG} "===> Define WITH_DVD_DEVICE if you want to change the default"
+ @${ECHO_MSG} "===> For example, 'make WITH_DVD_DEVICE=\"/dev/somedevice\"'"
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|-O4||; s|type -path|which|' \
${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|' \
+ ${WRKSRC}/src/main.c ${WRKSRC}/src/interface.c
post-install:
.if !defined(NOPORTDOCS)
@@ -41,4 +62,4 @@ post-install:
.endif
${INSTALL_MAN} ${WRKSRC}/man/gmencoder.1 ${MANPREFIX}/man/man1
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>