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 | FLAVORS= default nogui | ||||
GNU_CONFIGURE= yes | |||||
USE_QT5= core network xml qmake_build buildtools_build linguisttools_build | |||||
QT_NONSTANDARD= yes | |||||
DESTDIRNAME= INSTALL_ROOT | |||||
PORTDOCS= AUTHORS Changelog README.md | .if ${FLAVOR:Udefault} == default | ||||
LIB_DEPENDS+= libGeoIP.so:net/GeoIP | |||||
USES= desktop-file-utils | |||||
USE_QT5= concurrent gui widgets | |||||
USE_GL= gl | |||||
.endif | |||||
Not Done Inline Actions+=? mat: `+=`? | |||||
.if !defined(SLAVE_PORT) || ${SLAVE_PORT:tl} == "no" | .if ${FLAVOR:U} == nogui | ||||
WITH_GUI:= yes | PKGNAMESUFFIX= -nox11 | ||||
.else | SUFFIX= -nox | ||||
WITH_GUI:= no | COMMENT+= (web UI version) | ||||
SUFFIX:= -nox | CONFIGURE_ARGS= --disable-gui | ||||
PLIST_FILES= bin/qbittorrent${SUFFIX} \ | |||||
man/man1/qbittorrent${SUFFIX}.1.gz | |||||
Not Done Inline Actions+=? mat: `+=`? | |||||
PLIST= ${NONEXISTENT} | |||||
.endif | .endif | ||||
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… | |||||
USES+= compiler:c++11-lib pkgconfig tar:xz | |||||
GNU_CONFIGURE= yes | |||||
USE_QT5+= core network svg xml buildtools_build linguisttools_build qmake_build | |||||
CONFIGURE_ARGS+= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" | |||||
QT_NONSTANDARD= yes | |||||
DESTDIRNAME= INSTALL_ROOT | |||||
OPTIONS_DEFINE= DBUS DEBUG DOCS | OPTIONS_DEFINE= DBUS DEBUG DOCS | ||||
OPTIONS_DEFAULT= DBUS | |||||
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" | PORTDOCS= AUTHORS Changelog README.md | ||||
Done Inline Actionswhy += ? mat: why += ? | |||||
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.
| |||||
LIB_DEPENDS+= libGeoIP.so:net/GeoIP | |||||
USES+= desktop-file-utils | |||||
USE_QT5+= concurrent gui widgets | |||||
USE_GL+= gl | |||||
OPTIONS_DEFAULT+= DBUS | |||||
.else | |||||
CONFIGURE_ARGS+= --disable-gui | |||||
.endif | |||||
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… | |||||
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+= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" | |||||
post-patch: | post-patch: | ||||
Done Inline Actionswhy := ? mat: why `:=` ? | |||||
Done Inline ActionsIt has been this way. Fixed. yuri: It has been this way. Fixed. | |||||
@${REINPLACE_CMD} \ | @${REINPLACE_CMD} \ | ||||
Not Done Inline Actionsnot +=? mat: not `+=`? | |||||
-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: | ||||
Not Done Inline ActionsThis should happen earlier. mat: This should happen earlier. | |||||
${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