summaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2014-02-25 17:34:49 +0000
committerThierry Thomas <thierry@FreeBSD.org>2014-02-25 17:34:49 +0000
commitdbfdbc658b9a64e49e11613e7ac5be88035978cd (patch)
tree76ab9f67119e4aa0a85f46ac693de2f3e5b66bf8 /net-im
parentSupport staging (diff)
Adding a option to allow the replacement of the cryptographic library
sodium by NaCl. Do not bump PORTREVISION, because this does not affect the default.
Notes
Notes: svn path=/head/; revision=346052
Diffstat (limited to 'net-im')
-rw-r--r--net-im/tox/Makefile19
-rw-r--r--net-im/tox/files/patch-libtoxcore.pc.in10
-rw-r--r--net-im/tox/pkg-message2
3 files changed, 27 insertions, 4 deletions
diff --git a/net-im/tox/Makefile b/net-im/tox/Makefile
index eb384c0e7636..95da90ce94d4 100644
--- a/net-im/tox/Makefile
+++ b/net-im/tox/Makefile
@@ -11,8 +11,7 @@ COMMENT= ProjectTox-Core library, a decentralized and secure messenger
LICENSE= GPLv3
BUILD_DEPENDS= checkmk:${PORTSDIR}/devel/libcheck
-LIB_DEPENDS= libsodium.so:${PORTSDIR}/security/libsodium \
- libvpx.so:${PORTSDIR}/multimedia/libvpx \
+LIB_DEPENDS= libvpx.so:${PORTSDIR}/multimedia/libvpx \
libopus.so:${PORTSDIR}/audio/opus
USE_GITHUB= yes
@@ -25,8 +24,10 @@ USE_AUTOTOOLS= automake autoconf libtoolize
USES= pkgconfig
USE_LDCONFIG= yes
-OPTIONS_DEFINE= PHONE
-OPTIONS_DEFAULT=PHONE
+OPTIONS_RADIO= CRYPTO
+OPTIONS_RADIO_CRYPTO= SODIUM NACL
+OPTIONS_DEFINE= PHONE
+OPTIONS_DEFAULT= PHONE SODIUM
PHONE_DESC= Enable phone test
PHONE_CONFIGURE_ENABLE= phone
@@ -35,7 +36,17 @@ PHONE_LIB_DEPENDS= libopenal.so:${PORTSDIR}/audio/openal \
libswscale.so:${PORTSDIR}/multimedia/ffmpeg
PHONE_USE= SDL=sdl
+SODIUM_DESC= Prefer libsodium
+SODIUM_LIB_DEPENDS= libsodium.so:${PORTSDIR}/security/libsodium
+
+NACL_DESC= Prefer NaCl
+NACL_CONFIGURE_ENABLE= nacl
+NACL_CONFIGURE_WITH= nacl-libs=${LOCALBASE}/lib
+NACL_BUILD_DEPENDS= ${LOCALBASE}/lib/libnacl.a:${PORTSDIR}/security/nacl
+NACL_RUN_DEPENDS= ${LOCALBASE}/lib/libnacl.a:${PORTSDIR}/security/nacl
+
pre-configure:
+ ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/configure.ac
cd ${WRKSRC} && ./autogen.sh
.include <bsd.port.mk>
diff --git a/net-im/tox/files/patch-libtoxcore.pc.in b/net-im/tox/files/patch-libtoxcore.pc.in
new file mode 100644
index 000000000000..a6881256bfa7
--- /dev/null
+++ b/net-im/tox/files/patch-libtoxcore.pc.in
@@ -0,0 +1,10 @@
+--- libtoxcore.pc.in.orig 2014-02-22 23:52:26.000000000 +0100
++++ libtoxcore.pc.in 2014-02-25 09:32:35.000000000 +0100
+@@ -7,6 +7,6 @@
+ Description: Tox protocol library
+ Requires:
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -ltoxcore @LIBS@
++Libs: -L${libdir} -ltoxcore @NACL_LIBS@ @LIBS@
+ Cflags: -I${includedir}
+
diff --git a/net-im/tox/pkg-message b/net-im/tox/pkg-message
new file mode 100644
index 000000000000..9cebbb6b66fd
--- /dev/null
+++ b/net-im/tox/pkg-message
@@ -0,0 +1,2 @@
+Warning: due to NaCl weirdness, if you switch your config from libsodium
+to libnacl, you will have to rebuild the consumers of libtoxcore.