Changeset View
Standalone View
net-p2p/qbittorrent/Makefile
# Created by: Doug Barton <dougb@FreeBSD.org> | # Created by: Doug Barton <dougb@FreeBSD.org> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= qbittorrent | PORTNAME= qbittorrent | ||||
DISTVERSION= 3.3.16 | DISTVERSION= 4.0.2 | ||||
CATEGORIES= net-p2p ipv6 | CATEGORIES= net-p2p ipv6 | ||||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} | MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} | ||||
MAINTAINER= yuri@rawbw.com | MAINTAINER= yuri@rawbw.com | ||||
COMMENT?= Bittorrent client using Qt4/5 and libtorrent-rasterbar | COMMENT= Bittorrent client using Qt4/5 and libtorrent-rasterbar | ||||
tcberner: Qt5 only | |||||
LICENSE= GPLv2+ | LICENSE= GPLv2+ | ||||
LICENSE_FILE= ${WRKSRC}/COPYING | LICENSE_FILE= ${WRKSRC}/COPYING | ||||
LIB_DEPENDS= libtorrent-rasterbar.so:net-p2p/libtorrent-rasterbar \ | LIB_DEPENDS= libtorrent-rasterbar.so:net-p2p/libtorrent-rasterbar \ | ||||
libboost_system.so:devel/boost-libs | libboost_system.so:devel/boost-libs | ||||
USES= compiler:c++11-lib pkgconfig tar:xz | USES= compiler:c++11-lib pkgconfig tar:xz | ||||
GNU_CONFIGURE= yes | GNU_CONFIGURE= yes | ||||
USE_QT5= core network xml qmake_build buildtools_build linguisttools_build | USE_QT5= core network svg xml buildtools_build linguisttools_build qmake_build | ||||
QT_NONSTANDARD= yes | QT_NONSTANDARD= yes | ||||
DESTDIRNAME= INSTALL_ROOT | DESTDIRNAME= INSTALL_ROOT | ||||
PORTDOCS= AUTHORS Changelog README.md | OPTIONS_DEFINE= DBUS DEBUG | ||||
Not Done Inline Actions+=? mat: `+=`? | |||||
.if !defined(SLAVE_PORT) || ${SLAVE_PORT:tl} == "no" | |||||
WITH_GUI:= yes | |||||
.else | |||||
WITH_GUI:= no | |||||
SUFFIX:= -nox | |||||
.endif | |||||
OPTIONS_DEFINE= DBUS DEBUG DOCS | |||||
DEBUG_CONFIGURE_ENABLE= debug | DEBUG_CONFIGURE_ENABLE= debug | ||||
DBUS_CONFIGURE_ENABLE= qt-dbus | DBUS_CONFIGURE_ENABLE= qt-dbus | ||||
DBUS_USE= qt5=dbus | DBUS_USE= qt5=dbus | ||||
.if ${WITH_GUI} == "yes" | CONFIGURE_ARGS+= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" | ||||
Not Done Inline Actions+=? mat: `+=`? | |||||
FLAVORS= default nox | |||||
Done Inline ActionsOut of order. See Chapter 14. Order of Variables in Port Makefiles. mat: Out of order. See [[ https://www.freebsd.org/doc/en/books/porters-handbook/porting-order.html… | |||||
.if ${FLAVOR:U} == default || ${FLAVOR:U} == "" | |||||
Done Inline Actionswhy += ? mat: why += ? | |||||
LIB_DEPENDS+= libGeoIP.so:net/GeoIP | LIB_DEPENDS+= libGeoIP.so:net/GeoIP | ||||
USES+= desktop-file-utils | USES+= desktop-file-utils | ||||
USE_QT5+= concurrent gui widgets | USE_QT5+= concurrent gui widgets | ||||
USE_GL+= gl | USE_GL+= gl | ||||
OPTIONS_DEFAULT+= DBUS | OPTIONS_DEFINE+= DOCS | ||||
.else | OPTIONS_DEFAULT= DBUS | ||||
Done Inline ActionsI would use the flavor helpers for LIB_DEPENDS, PKGNAMESUFFIX and PLIST and keep them here, and move the rest after the USES block and before options. As Chapter 14. Order of Variables in Port Makefiles says. mat: I would use the flavor helpers for LIB_DEPENDS, PKGNAMESUFFIX and PLIST and keep them here, and… | |||||
Done Inline ActionsIf nogui_LIB_DEPENDS, nogui_PKGNAMESUFFIX and nogui_PLIST are kept here, but the rest with ifs is moved after the USES block, wouldn't this be a violation of Chapter 14. Order of Variables in Port Makefiles? It says that flavors should be before the USES block. Besides, shouldn't CONFIGURE_ARGS and PLIST_FILES also have corresponding flavor helpers? yuri: If `nogui_LIB_DEPENDS`, `nogui_PKGNAMESUFFIX` and `nogui_PLIST` are kept here, but the rest… | |||||
Done Inline ActionsI am quite sure this chapter does not say what you are saying. Mostly because I am the one who wrote it. I know that there are two different paragraphs in 15.7 Flavors but the second paragraph is only one sentence long and is sort of answering exactly what you are asking. mat: I am quite sure this chapter does not say what you are saying. Mostly because I am the one who… | |||||
PORTDOCS= AUTHORS Changelog README.md | |||||
Done Inline ActionsWhy move the DOCS here ? Does the "nox" flavor not have DOCS ? mat: Why move the DOCS here ? Does the "nox" flavor not have DOCS ? | |||||
Done Inline ActionsIt has been this way for -nox11 port. Fixed. yuri: It has been this way for -nox11 port. Fixed.
| |||||
.endif | |||||
.if ${FLAVOR:U} == nox | |||||
PKGNAMESUFFIX= -nox | |||||
Done Inline ActionsThis was called -nox11 before, it should stay that way. mat: This was called -nox11 before, it should stay that way. | |||||
CONFIGURE_ARGS+= --disable-gui | CONFIGURE_ARGS+= --disable-gui | ||||
Done Inline Actionswhy := ? mat: why `:=` ? | |||||
Done Inline ActionsIt has been this way. Fixed. yuri: It has been this way. Fixed. | |||||
SUFFIX:= -nox | |||||
Not Done Inline Actionsnot +=? mat: not `+=`? | |||||
COMMENT+= (web UI version) | |||||
PLIST_FILES+= bin/qbittorrent-nox \ | |||||
Not Done Inline ActionsThis should happen earlier. mat: This should happen earlier. | |||||
man/man1/qbittorrent-nox.1.gz | |||||
PLIST= ${NONEXISTENT} | |||||
.endif | .endif | ||||
CONFIGURE_ARGS+= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" | |||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} \ | @${REINPLACE_CMD} \ | ||||
-e 's/#ifdef Q_OS_MAC/#if defined(Q_OS_MAC) || (defined(__FreeBSD__) \&\& __FreeBSD_version < 1003506)/' \ | -e 's/#ifdef Q_OS_MAC/#if defined(Q_OS_MAC) || (defined(__FreeBSD__) \&\& __FreeBSD_version < 1003506)/' \ | ||||
${WRKSRC}/src/base/utils/string.cpp | ${WRKSRC}/src/base/utils/string.cpp | ||||
post-install: | post-install: | ||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qbittorrent${SUFFIX} | @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qbittorrent${SUFFIX} | ||||
${INSTALL_MAN} ${WRKSRC}/doc/qbittorrent${SUFFIX}.1 \ | ${INSTALL_MAN} ${WRKSRC}/doc/qbittorrent${SUFFIX}.1 \ | ||||
${STAGEDIR}${MAN1PREFIX}/man/man1/ | ${STAGEDIR}${MAN1PREFIX}/man/man1/ | ||||
${RM} -r ${STAGEDIR}${PREFIX}/share/man | @${RM} -r ${STAGEDIR}${PREFIX}/share/man | ||||
post-install-DOCS-on: | post-install-DOCS-on: | ||||
${MKDIR} ${STAGEDIR}${DOCSDIR} | @${MKDIR} ${STAGEDIR}${DOCSDIR} | ||||
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} | ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} | ||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
Qt5 only