Changeset View
Changeset View
Standalone View
Standalone View
net-p2p/transmission-cli/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= transmission | PKGNAMESUFFIX= -cli | ||||
tcberner: I would define
```
SLAVEPORT?= cli
PKGNAMESUFFIX?= -${SLAVEPORT}
```
here too -- that way you… | |||||
PORTVERSION= 2.93 | |||||
PORTREVISION?= 1 | |||||
CATEGORIES?= net-p2p | |||||
MASTER_SITES= https://github.com/transmission/transmission-releases/raw/master/ \ | |||||
http://transmission.cachefly.net/ | |||||
PKGNAMESUFFIX?= -cli | |||||
MAINTAINER?= crees@FreeBSD.org | |||||
COMMENT?= Lightweight CLI (command line) BitTorrent client and utilities | |||||
SLAVEPORT?= cli | |||||
LICENSE= GPLv2+ | |||||
.if ${SLAVEPORT} == cli | |||||
LICENSE+= MIT | LICENSE+= MIT | ||||
LICENSE_COMB= multi | LICENSE_COMB= multi | ||||
.endif | |||||
LICENSE_FILE= ${WRKSRC}/COPYING | |||||
USES+= cpe tar:xz | USES+= gettext-runtime:run ssl | ||||
CPE_VENDOR= transmissionbt | CMAKE_OFF= ENABLE_GTK ENABLE_QT ENABLE_NLS ENABLE_DAEMON | ||||
CMAKE_ON= ENABLE_CLI | |||||
CONFLICTS_INSTALL= ${PORTNAME}${PKGNAMESUFFIX}-2.5* | DESCR= ${.CURDIR}/pkg-descr | ||||
Done Inline Actions^ This seems broken.
tcberner: ^ This seems broken.
* the line continuation does not make sense
* Configure args won't get… | |||||
Done Inline Actions^ you need to find the CMAKE option here too :) tcberner: ^ you need to find the CMAKE option here too :) | |||||
Done Inline Actions^ here too tcberner: ^ here too | |||||
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… | |||||
MASTERDIR= ${.CURDIR}/../transmission | |||||
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… | |||||
PLIST= ${.CURDIR}/pkg-plist | |||||
EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude third-party | SLAVEPORT= cli | ||||
Done Inline ActionsNLS_CMAKE_BOOL=ENABLE_NLS tcberner: NLS_CMAKE_BOOL=ENABLE_NLS | |||||
.if ${SLAVEPORT} != web | .include "${MASTERDIR}/Makefile" | ||||
LIB_DEPENDS?= ${GEN_LIB_DEPENDS} | |||||
# General dependencies | |||||
GEN_LIB_DEPENDS=libb64.so:converters/libb64 \ | |||||
libcurl.so:ftp/curl \ | |||||
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 | |||||
USES+= gmake iconv libtool localbase pkgconfig | |||||
GNU_CONFIGURE= yes | |||||
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 \ | |||||
--disable-daemon \ | |||||
--without-gtk \ | |||||
--disable-mac \ | |||||
--disable-nls | |||||
EXTRA_PATCHES= ${PATCHDIR}/disable-web | |||||
OPTIONS_DEFINE+= DOCS LITE | |||||
OPTIONS_DEFAULT+= OPENSSL | |||||
OPTIONS_SINGLE+= SSL | |||||
OPTIONS_SINGLE_SSL+= OPENSSL WOLFSSL | |||||
LITE_CONFIGURE_ENABLE= lightweight | |||||
OPENSSL_USES= ssl | |||||
OPENSSL_CONFIGURE_ENV= OPENSSL_CFLAGS="-I${OPENSSLINC}" \ | |||||
OPENSSL_LIBS="-L${OPENSSLLIB} -lcrypto" | |||||
OPENSSL_CONFIGURE_ON= --with-crypto=openssl | |||||
WOLFSSL_LIB_DEPENDS= libwolfssl.so:security/wolfssl | |||||
WOLFSSL_CONFIGURE_ON= --with-crypto=cyassl | |||||
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 | |||||
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX} | |||||
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 | |||||
@${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 | |||||
general-install: | |||||
.if ${SLAVEPORT} != web | |||||
(cd ${WRKSRC} && ${COPYTREE_SHARE} \ | |||||
"${DOCS}" ${STAGEDIR}${DOCSDIR}) | |||||
.endif | |||||
post-install: general-install | |||||
.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 :) )