Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2018 17:17:26 +0000 (UTC)
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r459273 - in head/multimedia/smplayer: . files
Message-ID:  <201801171717.w0HHHQrb084011@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pawel
Date: Wed Jan 17 17:17:26 2018
New Revision: 459273
URL: https://svnweb.freebsd.org/changeset/ports/459273

Log:
  - Provide a choice between Qt versions (4/5).
  - Add possibility to use MPV as a backend; disable support in code when backend
    is not selected (obsolete mplayer2 support is always disabled).
  - Add options for additional skins / themes
  - Convert to options helpers
  
  PR:		217546
  Submitted by:	avos
  Approved by:	maintainer timeout

Added:
  head/multimedia/smplayer/files/patch-src_smplayer.pro   (contents, props changed)
Modified:
  head/multimedia/smplayer/Makefile

Modified: head/multimedia/smplayer/Makefile
==============================================================================
--- head/multimedia/smplayer/Makefile	Wed Jan 17 16:59:55 2018	(r459272)
+++ head/multimedia/smplayer/Makefile	Wed Jan 17 17:17:26 2018	(r459273)
@@ -3,43 +3,64 @@
 
 PORTNAME=	smplayer
 DISTVERSION=	17.1.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	multimedia audio kde
 MASTER_SITES=	SF/${PORTNAME}/SMPlayer/${PORTVERSION}
 
 MAINTAINER=	nemysis@FreeBSD.org
-COMMENT=	Complete front-end based on Qt4 for mplayer
+COMMENT=	Complete front-end based on Qt for mplayer
 
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/Copying.txt
 
-RUN_DEPENDS=	mplayer:multimedia/mplayer \
-		smplayer-skins>=0:multimedia/smplayer-skins \
-		smplayer-themes>=0:multimedia/smplayer-themes
-
-USE_QT4=	gui dbus network script xml moc_build rcc_build uic_build \
-		uic3_build porting_build linguisttools_build
-
-ALL_TARGET=	src/smplayer
-CONFIGURE_WRKSRC=	${WRKSRC}/src
-MAKE_ARGS+=	PREFIX=${PREFIX} DESTDIR=${STAGEDIR}
-
 USES=		cpe desktop-file-utils dos2unix gmake qmake tar:bzip2
+USE_XORG=	x11
 CPE_VENDOR=	ricardo_villalba
 DOS2UNIX_REGEX=	.*.[^p][^n][^g]$
 INSTALLS_ICONS=	yes
 
+ALL_TARGET=	src/smplayer
+CONFIGURE_WRKSRC=	${WRKSRC}/src
+MAKE_ARGS=	PREFIX=${PREFIX} DESTDIR=${STAGEDIR}
+QMAKE_ARGS=	"DEFINES_DISABLED+=MPLAYER2_SUPPORT"
+
 PORTDOCS=	Changelog Not_so_obvious_things.txt Notes_about_mpv.txt \
 		Readme.txt Release_notes.txt Watching_TV.txt
-OPTIONS_DEFINE=	DOCS DEBUG
 
+OPTIONS_SINGLE=		TOOLKIT
+OPTIONS_SINGLE_TOOLKIT=	QT4 QT5
+OPTIONS_MULTI=		ENGINE
+OPTIONS_MULTI_ENGINE=	MPLAYER MPV
+OPTIONS_DEFINE=		DOCS DEBUG SKINS THEMES
+OPTIONS_DEFAULT=	QT4 MPLAYER SKINS THEMES
+
+TOOLKIT_DESC=	Qt toolkit version
+ENGINE_DESC=	Multimedia engine
+MPLAYER_DESC=	Allow to use MPlayer as multimedia engine
+MPV_DESC=	Allow to use mpv as multimedia engine
+SKINS_DESC=	Install additional skins
+THEMES_DESC=	Install additional themes
+
+QT4_USE=	qt4=moc_build,linguisttools_build,rcc_build,uic_build
+QT4_USE+=	qt4=corelib,dbus,gui,network,script,xml
+
+QT5_USE=	qt5=buildtools_build,linguisttools_build
+QT5_USE+=	qt5=core,dbus,gui,network,script,widgets,xml
+
+MPLAYER_RUN_DEPENDS=	mplayer:multimedia/mplayer
+MPLAYER_QMAKE_OFF=	"DEFINES_DISABLED+=MPLAYER_SUPPORT"
+
+MPV_RUN_DEPENDS=	mpv:multimedia/mpv
+MPV_QMAKE_OFF=		"DEFINES_DISABLED+=MPV_SUPPORT"
+
+SKINS_RUN_DEPENDS=	smplayer-skins>=0:multimedia/smplayer-skins
+THEMES_RUN_DEPENDS=	smplayer-themes>=0:multimedia/smplayer-themes
+
 # Do not use unstable versions
 PORTSCOUT=	site:http://sourceforge.net/projects/smplayer/files/Unstable/releases/
 
 SUB_FILES=	pkg-message
 
-.include <bsd.port.options.mk>
-
 post-patch:
 	@${REINPLACE_CMD} -e 's|&& $$(QMAKE) $$(QMAKE_OPTS)||; \
 		s|lrelease|${LRELEASE}|; \
@@ -47,13 +68,13 @@ post-patch:
 		s| make| ${MAKE_CMD}|g' \
 		${WRKSRC}/Makefile
 
-.if ${PORT_OPTIONS:MDEBUG}
+post-patch-DEBUG-on:
 	@${REINPLACE_CMD} -e '/CONFIG += debug/s|#||' \
 		${WRKSRC}/src/smplayer.pro
-.else
+
+post-patch-DEBUG-off:
 	@${REINPLACE_CMD} -e '/DEFINES += NO_DEBUG_ON_CONSOLE/s|#||' \
 		${WRKSRC}/src/smplayer.pro
-.endif
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}

Added: head/multimedia/smplayer/files/patch-src_smplayer.pro
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/smplayer/files/patch-src_smplayer.pro	Wed Jan 17 17:17:26 2018	(r459273)
@@ -0,0 +1,11 @@
+--- src/smplayer.pro.orig	2016-12-26 22:19:34 UTC
++++ src/smplayer.pro
+@@ -97,6 +97,8 @@ isEqual(QT_MAJOR_VERSION, 5) {
+ 	}
+ }
+ 
++DEFINES -= $${DEFINES_DISABLED}
++
+ contains(QT_VERSION, ^4\\.[0-3]\\..*) {
+ 	message("Some features requires Qt > 4.3.")
+ 



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