From 0fbecf08cc522e422e9b0cb363e24ea557276b79 Mon Sep 17 00:00:00 2001 From: Kirill Ponomarev Date: Wed, 1 Sep 2004 08:03:48 +0000 Subject: Add knob to control where dvd device is PR: ports/71164 Submitted by: maintainer --- multimedia/gmencoder/Makefile | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'multimedia/gmencoder/Makefile') 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 + +.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 +.include -- cgit v1.2.3