Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2016 09:00:01 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r429879 - head/net/mediatomb
Message-ID:  <201612290900.uBT901J6000804@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Thu Dec 29 09:00:01 2016
New Revision: 429879
URL: https://svnweb.freebsd.org/changeset/ports/429879

Log:
  - Switch to USES=localbase
  - Switch to options helpers
  
  Approved by:	portmgr blanket

Modified:
  head/net/mediatomb/Makefile

Modified: head/net/mediatomb/Makefile
==============================================================================
--- head/net/mediatomb/Makefile	Thu Dec 29 08:52:37 2016	(r429878)
+++ head/net/mediatomb/Makefile	Thu Dec 29 09:00:01 2016	(r429879)
@@ -18,12 +18,11 @@ LIB_DEPENDS=	libexpat.so:textproc/expat2
 BROKEN_FreeBSD_9_i386=	does not build (error: declaration of 'operator new' as non-function)
 
 GNU_CONFIGURE=	yes
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-lpthread -L${LOCALBASE}/lib ${ICONV_LIB}
+LDFLAGS+=	-lpthread ${ICONV_LIB}
 CONFIGURE_ARGS=	--with-search="${LOCALBASE}" \
 		--disable-inotify
 CONFIGURE_ENV=	PTHREAD_LIBS="-lpthread"
-USES=		compiler:gcc-c++11-lib iconv
+USES=		compiler:gcc-c++11-lib iconv localbase:ldflags
 USE_RC_SUBR=	mediatomb
 
 USERS=		mediatomb
@@ -44,10 +43,12 @@ OPTIONS_MULTI_DB=	SQLITE MYSQL
 OPTIONS_RADIO=	METADATA TAG
 OPTIONS_RADIO_METADATA=	FFMPEG LIBEXTRACTOR
 OPTIONS_RADIO_TAG=	TAGLIB ID3LIB
-METADATA_DESC=	Metadata extractor
-TAG_DESC=	Tag library
 OPTIONS_DEFAULT=	SQLITE MYSQL JS LIBEXIF TAGLIB FFMPEG FFMPEGTHUMBNAILER \
 			EXTERNAL_TRANSCODING CURL
+
+METADATA_DESC=			Metadata extractor
+TAG_DESC=			Tag library
+
 DB_DESC=			Database backend
 JS_DESC=			JavaScript (SpiderMonkey) support
 TAGLIB_DESC=			taglib support
@@ -57,111 +58,61 @@ EXTERNAL_TRANSCODING_DESC=	external tran
 ID3LIB_DESC=			id3lib support
 LIBEXTRACTOR_DESC=		libextractor support
 
-SQLITE_USES=	sqlite
-MYSQL_USES=	mysql
-
-.include <bsd.port.pre.mk>
-
-.if ${PORT_OPTIONS:MSQLITE}
-CONFIGURE_ARGS+=	--enable-sqlite3 \
-			--with-sqlite3-h="${LOCALBASE}/include" \
-			--with-sqlite3-libs="${LOCALBASE}/lib"
-.else
-CONFIGURE_ARGS+=	--disable-sqlite3
-.endif
-
-.if ${PORT_OPTIONS:MMYSQL}
-CONFIGURE_ARGS+=	--enable-mysql \
-			--with-mysql-cfg="${LOCALBASE}/bin/mysql_config"
-.else
-CONFIGURE_ARGS+=	--disable-mysql
-.endif
-
-.if ${PORT_OPTIONS:MJS}
-CONFIGURE_ARGS+=	--enable-libjs \
-			--with-js-h="${LOCALBASE}/include" \
-			--with-js-libs="${LOCALBASE}/lib"
-LIB_DEPENDS+=		libjs.so:lang/spidermonkey17
-.else
-CONFIGURE_ARGS+=	--disable-libjs
-.endif
-
-.if ${PORT_OPTIONS:MLIBEXIF}
-CONFIGURE_ARGS+=	--enable-libexif \
-			--with-libexif-h="${LOCALBASE}/include" \
-			--with-libexif-libs="${LOCALBASE}/lib"
-LIB_DEPENDS+=		libexif.so:graphics/libexif
-.else
-CONFIGURE_ARGS+=	--disable-libexif
-.endif
-
-.if ${PORT_OPTIONS:MEXTERNAL_TRANSCODING}
-CONFIGURE_ARGS+=	--enable-external-transcoding
-.else
-CONFIGURE_ARGS+=	--disable-external-transcoding
-.endif
-
-.if ${PORT_OPTIONS:MFFMPEGTHUMBNAILER}
-CONFIGURE_ARGS+=	--enable-ffmpegthumbnailer \
-			--with-ffmpegthumbnailer-h="${LOCALBASE}/include" \
-			--with-ffmpegthumbnailer-libs="${LOCALBASE}/lib"
-LIB_DEPENDS+=		libffmpegthumbnailer.so:multimedia/ffmpegthumbnailer
-.else
-CONFIGURE_ARGS+=	--disable-ffmpegthumbnailer
-.endif
+SQLITE_USES=			sqlite
+SQLITE_CONFIGURE_ENABLE=	sqlite3
+SQLITE_CONFIGURE_ON=		--with-sqlite3-h="${LOCALBASE}/include" \
+				--with-sqlite3-libs="${LOCALBASE}/lib"
+
+MYSQL_USES=			mysql
+MYSQL_CONFIGURE_ENABLE=		mysql
+MYSQL_CONFIGURE_ON= 		--with-mysql-cfg="${LOCALBASE}/bin/mysql_config"
+
+JS_CONFIGURE_ENABLE=		libjs
+JS_CONFIGURE_ON=		--with-js-h="${LOCALBASE}/include" \
+				--with-js-libs="${LOCALBASE}/lib"
+JS_LIB_DEPENDS=			libjs.so:lang/spidermonkey17
+
+LIBEXIF_CONFIGURE_ENABLE=	libexif
+LIBEXIF_CONFIGURE_ON=		--with-libexif-h="${LOCALBASE}/include" \
+				--with-libexif-libs="${LOCALBASE}/lib"
+LIBEXIF_LIB_DEPENDS=		libexif.so:graphics/libexif
+
+EXTERNAL_TRANSCODING_CONFIGURE_ENABLE=	external-transcoding
+
+FFMPEGTHUMBNAILER_CONFIGURE_ENABLE=	ffmpegthumbnailer
+FFMPEGTHUMBNAILER_CONFIGURE_ON=		--with-ffmpegthumbnailer-h="${LOCALBASE}/include" \
+					--with-ffmpegthumbnailer-libs="${LOCALBASE}/lib"
+FFMPEGTHUMBNAILER_LIB_DEPENDS=		libffmpegthumbnailer.so:multimedia/ffmpegthumbnailer
 
 # CURL is only useful in combination with EXTERNAL_TRANSCODING
-.if ${PORT_OPTIONS:MCURL} && ${PORT_OPTIONS:MEXTERNAL_TRANSCODING}
-CONFIGURE_ARGS+=	--enable-curl \
-			--with-curl-cfg="${LOCALBASE}/bin/curl-config"
-LIB_DEPENDS+=	libcurl.so:ftp/curl
-.else
-CONFIGURE_ARGS+=	--disable-curl
-.endif
-
-.if ${PORT_OPTIONS:MFFMPEG}
-CONFIGURE_ARGS+=	--enable-ffmpeg
-LIB_DEPENDS+=		libavformat.so:multimedia/ffmpeg
-.else
-CONFIGURE_ARGS+=	--disable-ffmpeg
-.endif
-
-.if ${PORT_OPTIONS:MLIBEXTRACTOR}
-CONFIGURE_ARGS+=	--enable-libextractor \
-			--with-extractor-h="${LOCALBASE}/include" \
-			--with-extractor-libs="${LOCALBASE}/lib"
-LIB_DEPENDS+=		libextractor.so:textproc/libextractor
-.else
-CONFIGURE_ARGS+=	--disable-libextractor
-.endif
-
-.if ${PORT_OPTIONS:MID3LIB}
-CONFIGURE_ARGS+=	--enable-id3lib \
-			--with-id3lib-h="${LOCALBASE}/include" \
-			--with-id3lib-libs="${LOCALBASE}/lib"
-LIB_DEPENDS+=		libid3.so:audio/id3lib
-.else
-CONFIGURE_ARGS+=	--disable-id3lib
-.endif
-
-.if ${PORT_OPTIONS:MTAGLIB}
-CONFIGURE_ARGS+=	--enable-taglib \
-			--with-taglib-cfg="${LOCALBASE}/bin/taglib-config"
-LIB_DEPENDS+=		libtag.so:audio/taglib
-.else
-CONFIGURE_ARGS+=	--disable-taglib
-.endif
-
-.if ${PORT_OPTIONS:MDEBUG}
-CONFIGURE_ARGS+=	--enable-tombdebug
-.else
-CONFIGURE_ARGS+=	--disable-tombdebug
-.endif
+CURL_IMPLIES=			EXTERNAL_TRANSCODING
+CURL_CONFIGURE_ENABLE=		curl
+CURL_CONFIGURE_ON= 		--with-curl-cfg="${LOCALBASE}/bin/curl-config"
+CURL_LIB_DEPENDS=		libcurl.so:ftp/curl
+
+FFMPEG_CONFIGURE_ENABLE=	ffmpeg
+FFMPEG_LIB_DEPENDS=		libavformat.so:multimedia/ffmpeg
+
+LIBEXTRACTOR_CONFIGURE_ENABLE=	libextractor
+LIBEXTRACTOR_CONFIGURE_ON=	--with-extractor-h="${LOCALBASE}/include" \
+				--with-extractor-libs="${LOCALBASE}/lib"
+LIBEXTRACTOR_LIB_DEPENDS=	libextractor.so:textproc/libextractor
+
+ID3LIB_CONFIGURE_ENABLE=	id3lib
+ID3LIB_CONFIGURE_ON=		--with-id3lib-h="${LOCALBASE}/include" \
+				--with-id3lib-libs="${LOCALBASE}/lib"
+ID3LIB_LIB_DEPENDS=		libid3.so:audio/id3lib
+
+TAGLIB_CONFIGURE_ENABLE=	taglib
+TAGLIB_CONFIGURE_ON=		--with-taglib-cfg="${LOCALBASE}/bin/taglib-config"
+TAGLIB_LIB_DEPENDS=		libtag.so:audio/taglib
+
+DEBUG_CONFIGURE_ENABLE=		tombdebug
 
 post-install:
-	${MKDIR} ${STAGEDIR}${PREFIX}/etc/mediatomb
-	${MKDIR} ${STAGEDIR}/var/log/mediatomb
-	${MKDIR} ${STAGEDIR}/var/db/mediatomb
-	@${INSTALL} ${COPY} ${WRKDIR}/config.xml.dist ${STAGEDIR}${PREFIX}/etc/mediatomb/config.xml.dist
+	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/mediatomb
+	@${MKDIR} ${STAGEDIR}/var/log/mediatomb
+	@${MKDIR} ${STAGEDIR}/var/db/mediatomb
+	${INSTALL_DATA} ${WRKDIR}/config.xml.dist ${STAGEDIR}${PREFIX}/etc/mediatomb/config.xml.dist
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



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