aboutsummaryrefslogtreecommitdiffstats
path: root/net-im
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2014-02-26 01:34:49 +0800
committerthierry <thierry@FreeBSD.org>2014-02-26 01:34:49 +0800
commit7b6806bc868f8c3654afaa2741cf83d20aa2131d (patch)
tree76ab9f67119e4aa0a85f46ac693de2f3e5b66bf8 /net-im
parent9678fa7ad70fd726a44a003210e878404356b011 (diff)
downloadfreebsd-ports-gnome-7b6806bc868f8c3654afaa2741cf83d20aa2131d.tar.gz
freebsd-ports-gnome-7b6806bc868f8c3654afaa2741cf83d20aa2131d.tar.zst
freebsd-ports-gnome-7b6806bc868f8c3654afaa2741cf83d20aa2131d.zip
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.
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.