Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Oct 2011 16:58:43 +0200 (CEST)
From:      Oliver Fromme <olli@secnetix.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Oliver Fromme <olli@secnetix.de>
Subject:   ports/161546: [PATCH] multimedia/mkvtoolnix: make some dependencies optional
Message-ID:  <201110131458.p9DEwhkY084937@pluto.secnetix.de>
Resent-Message-ID: <201110131500.p9DF0KEs061926@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         161546
>Category:       ports
>Synopsis:       [PATCH] multimedia/mkvtoolnix: make some dependencies optional
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 13 15:00:20 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Fromme
>Release:        n/a
>Organization:
secnetix GmbH & Co. KG
		http://www.secnetix.de/bsd
>Environment:

	n/a

>Description:

	This patch makes some of the dependencies optional
	by using the options framework:  flac, lzo, curl.
	Previously these dependencies are hardcoded.

	The options default to "on", so there is no change in
	behaviour, except for the curl dependency.  Curl is only
	used to check for online software updates, which doesn't
	make much sense for the FreeBSD port, so this defaults
	to "off".

>How-To-Repeat:

	n/a

>Fix:

--- Makefile.old	2011-10-13 13:59:25.000000000 +0200
+++ Makefile	2011-10-13 16:52:11.000000000 +0200
@@ -7,6 +7,7 @@
 
 PORTNAME=	mkvtoolnix
 PORTVERSION=	5.0.1
+PORTREVISION=	1
 CATEGORIES=	multimedia audio
 MASTER_SITES=	http://www.bunkus.org/videotools/mkvtoolnix/sources/
 
@@ -16,13 +17,10 @@
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-LIB_DEPENDS=	FLAC.10:${PORTSDIR}/audio/flac \
-		expat.6:${PORTSDIR}/textproc/expat2 \
-		lzo2.2:${PORTSDIR}/archivers/lzo2 \
+LIB_DEPENDS=	expat.6:${PORTSDIR}/textproc/expat2 \
 		vorbis.4:${PORTSDIR}/audio/libvorbis \
 		ogg.7:${PORTSDIR}/audio/libogg \
-		boost_regex.4:${PORTSDIR}/devel/boost-libs \
-		curl.6:${PORTSDIR}/ftp/curl
+		boost_regex.4:${PORTSDIR}/devel/boost-libs
 
 USE_BZIP2=	yes
 USE_GETTEXT=	yes
@@ -33,7 +31,7 @@
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 CONFIGURE_ENV+=	ac_cv_path_PO4A=no
-CONFIGURE_ARGS=	--enable-lzo --enable-bz2 --disable-qt \
+CONFIGURE_ARGS=	--enable-bz2 --disable-qt \
 		--with-boost=${LOCALBASE} \
 		--with-boost-filesystem=boost_filesystem \
 		--with-boost-system=boost_system \
@@ -43,7 +41,10 @@
 MANLANG=	"" ja zh_CN nl
 MAN1=		mkvextract.1 mkvinfo.1 mkvmerge.1 mkvpropedit.1
 
-OPTIONS=	WXGTK "build wxGTK2 based GUI" on
+OPTIONS=	WXGTK "build wxGTK2 based GUI" on \
+		LZO   "build with lzo compression support" on \
+		FLAC  "build with flac audio support" on \
+		CURL  "build with curl (for online-updates)" off
 
 .include <bsd.port.pre.mk>
 
@@ -66,6 +67,27 @@
 PLIST_SUB+=	GUI="@comment "
 .endif
 
+.if !defined(WITHOUT_LZO)
+LIB_DEPENDS+=	lzo2.2:${PORTSDIR}/archivers/lzo2
+CONFIGURE_ARGS+=	--enable-lzo
+.else
+CONFIGURE_ARGS+=	--disable-lzo
+.endif
+
+.if !defined(WITHOUT_FLAC)
+LIB_DEPENDS+=	FLAC.10:${PORTSDIR}/audio/flac
+CONFIGURE_ARGS+=	--with-flac
+.else
+CONFIGURE_ARGS+=	--without-flac
+.endif
+
+.if !defined(WITHOUT_CURL)
+LIB_DEPENDS+=	curl.6:${PORTSDIR}/ftp/curl
+.else
+#   --without-curl and --disable-curl don't work, but this one does:
+CONFIGURE_ARGS+=	--with-curl-config=/dev/null
+.endif
+
 do-build:
 	@(cd ${WRKSRC}/; unset PREFIX; ${RAKE_BIN})
 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110131458.p9DEwhkY084937>