- 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
This commit is contained in:
parent
6e1008c8e0
commit
d962a78457
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=459273
2 changed files with 51 additions and 19 deletions
|
@ -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}
|
||||
|
|
11
multimedia/smplayer/files/patch-src_smplayer.pro
Normal file
11
multimedia/smplayer/files/patch-src_smplayer.pro
Normal file
|
@ -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.")
|
||||
|
Loading…
Reference in a new issue