Changeset View
Changeset View
Standalone View
Standalone View
net-p2p/transmission-cli/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= transmission | PORTNAME= transmission | ||||
PORTVERSION= 2.93 | DISTVERSION= 2.94 | ||||
PORTREVISION?= 1 | CATEGORIES+= net-p2p | ||||
CATEGORIES?= net-p2p | SLAVEPORT?= cli | ||||
MASTER_SITES= https://github.com/transmission/transmission-releases/raw/master/ \ | |||||
http://transmission.cachefly.net/ | |||||
PKGNAMESUFFIX?= -cli | PKGNAMESUFFIX?= -cli | ||||
tcberner: I would define
```
SLAVEPORT?= cli
PKGNAMESUFFIX?= -${SLAVEPORT}
```
here too -- that way you… | |||||
MAINTAINER?= crees@FreeBSD.org | MAINTAINER= lebarondemerde@privacychain.ch | ||||
COMMENT?= Lightweight CLI (command line) BitTorrent client and utilities | COMMENT= Meta-port for Transmission BitTorrent client | ||||
SLAVEPORT?= cli | |||||
LICENSE= GPLv2+ | |||||
.if ${SLAVEPORT} == cli | |||||
LICENSE+= MIT | LICENSE+= MIT | ||||
.if ${SLAVEPORT:Ncli} | |||||
LICENSE+= GPLv2+ | |||||
LICENSE_COMB= multi | LICENSE_COMB= multi | ||||
.endif | |||||
LICENSE_FILE= ${WRKSRC}/COPYING | LICENSE_FILE= ${WRKSRC}/COPYING | ||||
.endif | |||||
USES+= cpe tar:xz | .if ${SLAVEPORT:Nweb} | ||||
CPE_VENDOR= transmissionbt | LIB_DEPENDS+= libcurl.so:ftp/curl \ | ||||
libdht.so:devel/jech-dht \ | |||||
libb64.so:converters/libb64 \ | |||||
libevent.so:devel/libevent \ | |||||
libnatpmp.so:net/libnatpmp \ | |||||
libutp.so:net/libutp \ | |||||
libminiupnpc.so:net/miniupnpc | |||||
CONFLICTS_INSTALL= ${PORTNAME}${PKGNAMESUFFIX}-2.5* | USES+= cmake:outsource cpe iconv libtool localbase:ldflags pkgconfig | ||||
EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude third-party | . if ${SLAVEPORT:Mcli} | ||||
USES+= ssl | |||||
NLS_USES= gettext-runtime:run | |||||
. endif | |||||
CPE_VENDOR= transmissionbt | |||||
.endif | |||||
USE_GITHUB= yes | |||||
.if ${SLAVEPORT} != web | .if ${SLAVEPORT} != web | ||||
LIB_DEPENDS?= ${GEN_LIB_DEPENDS} | #LDFLAGS+= -L${LOCALBASE}/lib -lintl -ldht | ||||
Done Inline Actions^is this still needed with cmake? -- if ${LOCALBASE}/lib is required you can add USES=localbase, but maybe try it without the whole line once tcberner: ^is this still needed with cmake? -- if ${LOCALBASE}/lib is required you can add USES=localbase… | |||||
Done Inline ActionsUnfortunately yes, otherwise fail. :/ rigoletto: Unfortunately yes, otherwise fail. :/ | |||||
Not Done Inline ActionsThen that is a bug in FindDHT.cmake of transmission, respectively how it is used :) -- it should either return the full librarypath, or add the library-dir to the linkdirectories for the targets that use it. tcberner: Then that is a bug in FindDHT.cmake of transmission, respectively how it is used :) -- it… | |||||
# General dependencies | SLAVES= cli daemon gtk qt | ||||
GEN_LIB_DEPENDS=libb64.so:converters/libb64 \ | CMAKE_ON+= ENABLE_${SLAVEPORT:tu} | ||||
libcurl.so:ftp/curl \ | CMAKE_OFF+= ${SLAVES:N${SLAVEPORT}:tu:S/^/ENABLE_/} | ||||
libdht.so:devel/jech-dht \ | |||||
libminiupnpc.so:net/miniupnpc \ | |||||
libnatpmp.so:net/libnatpmp \ | |||||
libutp.so:net/libutp \ | |||||
libevent.so:devel/libevent | |||||
GEN_RUN_DEPENDS=${LOCALBASE}/share/transmission/web/index.html:www/transmission-web | |||||
# This is master port of transmission-*, so don't override USES definition | . if ${SLAVEPORT:Nweb:Ncli} | ||||
USES+= gmake iconv libtool localbase pkgconfig | CMAKE_OFF+= ENABLE_UTILS | ||||
GNU_CONFIGURE= yes | . endif | ||||
LIBS+= ${ICONV_LIB} | |||||
CONFIGURE_ENV= ${ICONV_LIB:C@.+@ac_cv_func_iconv=yes@} | |||||
CONFIGURE_ARGS= --without-inotify \ | |||||
--enable-external-b64 \ | |||||
--enable-external-dht \ | |||||
--enable-external-natpmp \ | |||||
${EXTRA_CONF_ARGS} | |||||
EXTRA_CONF_ARGS?=--enable-cli \ | DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${SLAVEPORT} | ||||
--disable-daemon \ | CMAKE_ARGS+= -DCMAKE_INSTALL_DOCDIR=${DOCSDIR} | ||||
--without-gtk \ | |||||
--disable-mac \ | |||||
--disable-nls | |||||
Done Inline Actions^ you can probably do something like the following -- if you define SLAVES= cli daemon gtk qt CMAKE_ON= ENABLE_${SLAVEPORT:tu} CMAKE_OFF= ${SLAVES:N${SLAVEPORT}:tu:S/^/ENABLE_/} and get rid of most of the CMAKE_* in the slave ports. tcberner: ^ you can probably do something like the following -- if you define
```
SLAVES= cli daemon gtk… | |||||
EXTRA_PATCHES= ${PATCHDIR}/disable-web | OPTIONS_DEFINE+= DOCS LITE NLS | ||||
OPTIONS_SUB= yes | |||||
OPTIONS_DEFAULT= OPENSSL | |||||
Done Inline ActionsNLS_CMAKE_BOOL=ENABLE_NLS tcberner: NLS_CMAKE_BOOL=ENABLE_NLS | |||||
OPTIONS_DEFINE+= DOCS LITE | NLS_CMAKE_BOOL= ENABLE_NLS | ||||
OPTIONS_DEFAULT+= OPENSSL | |||||
OPTIONS_SINGLE+= SSL | |||||
OPTIONS_SINGLE_SSL+= OPENSSL WOLFSSL | |||||
LITE_CONFIGURE_ENABLE= lightweight | OPTIONS_SINGLE= SSL | ||||
OPTIONS_SINGLE_SSL= OPENSSL WOLFSSL | |||||
OPENSSL_USES= ssl | OPENSSL_USES= ssl | ||||
OPENSSL_CONFIGURE_ENV= OPENSSL_CFLAGS="-I${OPENSSLINC}" \ | OPENSSL_CMAKE_ARGS= -DWITH_CRYPTO="openssl" | ||||
Done Inline Actions^ here too tcberner: ^ here too | |||||
OPENSSL_LIBS="-L${OPENSSLLIB} -lcrypto" | |||||
OPENSSL_CONFIGURE_ON= --with-crypto=openssl | |||||
WOLFSSL_LIB_DEPENDS= libwolfssl.so:security/wolfssl | WOLFSSL_LIB_DEPENDS= libwolfssl.so:security/wolfssl | ||||
WOLFSSL_CONFIGURE_ON= --with-crypto=cyassl | WOLFSSL_CMAKE_ARGS= -DWITH_CRYPTO="cyassl" | ||||
Done Inline Actions^ This seems broken.
tcberner: ^ This seems broken.
* the line continuation does not make sense
* Configure args won't get… | |||||
WOLFSSL_BROKEN= Requires security/wolfssl built with --enable-arc4 | |||||
Not Done Inline ActionsApparently not needed anymore. I built it in here and tested. Seem to be working. rigoletto: Apparently not needed anymore. I built it in here and tested. Seem to be working. | |||||
.endif | |||||
DOCS= AUTHORS NEWS README | LITE_CONFIGURE_ENABLE= lightweight | ||||
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX} | LITE_CMAKE_BOOL= ENABLE_LIGHTWEIGHT | ||||
Done Inline Actions^ you need to find the CMAKE option here too :) tcberner: ^ you need to find the CMAKE option here too :) | |||||
general-patch: | |||||
@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -e \ | |||||
's|noinst_PROGRAMS = |noinst_PROGRAMS = #|g' | |||||
.if ${SLAVEPORT} != gtk | |||||
@${REINPLACE_CMD} -e '/#define DISABLE_GETTEXT/s,/\* \(.*\) \*/,\1,' \ | |||||
${WRKSRC}/libtransmission/utils.h | |||||
.endif | .endif | ||||
@${REINPLACE_CMD} -e \ | |||||
's|rt_clock_gettime=yes|rt_clock_gettime=no|g ; \ | |||||
s|" == "|" = "|g' \ | |||||
${WRKSRC}/configure | |||||
@${REINPLACE_CMD} -e 's|doc \\| \\|g' \ | |||||
${WRKSRC}/Makefile.in | |||||
.if ${SLAVEPORT} != cli | |||||
@${REINPLACE_CMD} -e 's|utils \\|\\|g' \ | |||||
${WRKSRC}/Makefile.in | |||||
.endif | |||||
# Don't conflict with patches but force system libraries | |||||
@${REINPLACE_CMD} -e 's|third-party \\|\\|g' \ | |||||
${WRKSRC}/Makefile.in | |||||
@${REINPLACE_CMD} \ | |||||
-e 's|third-party/[^ ]*Makefile||g' \ | |||||
${WRKSRC}/configure | |||||
post-patch: general-patch | post-extract: | ||||
@${FIND} ${WRKSRC}/web -name .git* -delete | |||||
general-install: | .if ${SLAVEPORT:Mweb} | ||||
.if ${SLAVEPORT} != web | @${FIND} ${WRKSRC}/web \( -name '*.am' -o -name '*.in' \ | ||||
(cd ${WRKSRC} && ${COPYTREE_SHARE} \ | -o -name '*.scss' \) -delete | ||||
"${DOCS}" ${STAGEDIR}${DOCSDIR}) | |||||
do-install: | |||||
( cd ${WRKSRC} && ${COPYTREE_SHARE} web ${STAGEDIR}${DATADIR} ) | |||||
.endif | .endif | ||||
post-install: general-install | .if ${SLAVEPORT:Mdaemon} | ||||
post-install: | |||||
${MKDIR} ${STAGEDIR}${ETCDIR}/home | |||||
.endif | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
I would define
here too -- that way you can remove the PKGNAMESUFFIX definition in the slave ports. (the -qt-one will need some work then :) )