Index: head/net-im/Makefile =================================================================== --- head/net-im/Makefile +++ head/net-im/Makefile @@ -195,6 +195,7 @@ SUBDIR += tkabber SUBDIR += tkabber-plugins SUBDIR += tox + SUBDIR += tox12 SUBDIR += toxic SUBDIR += turpial SUBDIR += twirssi Index: head/net-im/tox/Makefile =================================================================== --- head/net-im/tox/Makefile +++ head/net-im/tox/Makefile @@ -2,9 +2,8 @@ # $FreeBSD$ PORTNAME= toxcore -PORTVERSION= 0.1.11 +PORTVERSION= 0.2.0 DISTVERSIONPREFIX= v -PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net-im net-p2p @@ -15,21 +14,23 @@ BUILD_DEPENDS= checkmk:devel/check LIB_DEPENDS= libvpx.so:multimedia/libvpx \ + libmsgpackc.so:devel/msgpack \ libsndfile.so:audio/libsndfile \ + libportaudio.so:audio/portaudio \ libsodium.so:security/libsodium \ libopencv_core.so:graphics/opencv-core \ libopus.so:audio/opus \ libconfig.so:devel/libconfig -TEST_DEPENDS= ${LOCALBASE}/lib/libmsgpackc.so:devel/msgpack \ - ${LOCALBASE}/lib/libportaudio.so:audio/portaudio +CONFLICTS= toxcore-legacy-0.1.* + USE_GITHUB= yes GH_ACCOUNT= TokTok GH_PROJECT= c-toxcore USES= cmake compiler:c11 libtool pathfix pkgconfig USE_LDCONFIG= yes -PLIST_SUB= VER=${PORTVERSION:C/0.//}.0 SO=1 +PLIST_SUB= VER=${PORTVERSION:C/0.//}.0 SO=2 OPTIONS_DEFINE= DAEMON OPTIONS_SUB= yes Index: head/net-im/tox/distinfo =================================================================== --- head/net-im/tox/distinfo +++ head/net-im/tox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1514391164 -SHA256 (TokTok-c-toxcore-v0.1.11_GH0.tar.gz) = 85b6184a160c343616e3253a0bf728cfe1588e73b6d6f8772aa1e44061e41b10 -SIZE (TokTok-c-toxcore-v0.1.11_GH0.tar.gz) = 458597 +TIMESTAMP = 1519933444 +SHA256 (TokTok-c-toxcore-v0.2.0_GH0.tar.gz) = af1efe3b260963bef6497114d4fc0f217a7c4e4126b7b281aab8c316fddfefa9 +SIZE (TokTok-c-toxcore-v0.2.0_GH0.tar.gz) = 462009 Index: head/net-im/tox/files/patch-CMakeLists.txt =================================================================== --- head/net-im/tox/files/patch-CMakeLists.txt +++ head/net-im/tox/files/patch-CMakeLists.txt @@ -1,26 +0,0 @@ ---- CMakeLists.txt.orig 2017-12-27 18:43:18 UTC -+++ CMakeLists.txt -@@ -349,23 +349,6 @@ if(NOT SPECTEST) - endif() - endif() - --if(MSGPACK_FOUND) -- add_c_executable(toxcore-sut -- testing/hstox/binary_decode.c -- testing/hstox/binary_encode.c -- testing/hstox/driver.c -- testing/hstox/methods.c -- testing/hstox/packet_kinds.c -- testing/hstox/test_main.c -- testing/hstox/util.c) -- target_link_modules(toxcore-sut -- toxcore -- ${MSGPACK_LIBRARIES}) -- if(SPECTEST) -- add_test(NAME spectest COMMAND ${SPECTEST} $) -- endif() --endif() -- - ################################################################################ - # - # :: Automated regression tests Index: head/net-im/tox/files/patch-toxcore_ccompat.h =================================================================== --- head/net-im/tox/files/patch-toxcore_ccompat.h +++ head/net-im/tox/files/patch-toxcore_ccompat.h @@ -1,11 +0,0 @@ ---- toxcore/ccompat.h.orig 2017-04-27 18:20:19 UTC -+++ toxcore/ccompat.h -@@ -29,8 +29,6 @@ - // Emulation using alloca. - #ifdef _WIN32 - #include --#else --#include - #endif - - #define VLA(type, name, size) \ Index: head/net-im/tox/pkg-plist =================================================================== --- head/net-im/tox/pkg-plist +++ head/net-im/tox/pkg-plist @@ -2,58 +2,12 @@ %%DAEMON%%@sample etc/tox-bootstrapd.conf.sample include/tox/tox.h include/tox/toxav.h -include/tox/toxdns.h include/tox/toxencryptsave.h -lib/libtoxav.a -lib/libtoxav.so -lib/libtoxav.so.%%SO%% -lib/libtoxav.so.%%VER%% lib/libtoxcore.a lib/libtoxcore.so lib/libtoxcore.so.%%SO%% lib/libtoxcore.so.%%VER%% -lib/libtoxcrypto.a -lib/libtoxcrypto.so -lib/libtoxcrypto.so.%%SO%% -lib/libtoxcrypto.so.%%VER%% -lib/libtoxdht.a -lib/libtoxdht.so -lib/libtoxdht.so.%%SO%% -lib/libtoxdht.so.%%VER%% -lib/libtoxdns.a -lib/libtoxdns.so -lib/libtoxdns.so.%%SO%% -lib/libtoxdns.so.%%VER%% -lib/libtoxencryptsave.a -lib/libtoxencryptsave.so -lib/libtoxencryptsave.so.%%SO%% -lib/libtoxencryptsave.so.%%VER%% -lib/libtoxfriends.a -lib/libtoxfriends.so -lib/libtoxfriends.so.%%SO%% -lib/libtoxfriends.so.%%VER%% -lib/libtoxgroup.a -lib/libtoxgroup.so -lib/libtoxgroup.so.%%SO%% -lib/libtoxgroup.so.%%VER%% -lib/libtoxmessenger.a -lib/libtoxmessenger.so -lib/libtoxmessenger.so.%%SO%% -lib/libtoxmessenger.so.%%VER%% -lib/libtoxnetcrypto.a -lib/libtoxnetcrypto.so -lib/libtoxnetcrypto.so.%%SO%% -lib/libtoxnetcrypto.so.%%VER%% -lib/libtoxnetwork.a -lib/libtoxnetwork.so -lib/libtoxnetwork.so.%%SO%% -lib/libtoxnetwork.so.%%VER%% -libdata/pkgconfig/libtoxav.pc -libdata/pkgconfig/libtoxcore.pc -libdata/pkgconfig/toxav.pc libdata/pkgconfig/toxcore.pc -libdata/pkgconfig/toxdns.pc -libdata/pkgconfig/toxencryptsave.pc %%DAEMON%%@dir(%%TOXDHT%%,nobody,755) /var/run/tox-bootstrapd %%DAEMON%%@dir(%%TOXDHT%%,nobody,700) /var/lib/tox-bootstrapd %%DAEMON%%@dir /var/lib Index: head/net-im/tox12/Makefile =================================================================== --- head/net-im/tox12/Makefile +++ head/net-im/tox12/Makefile @@ -0,0 +1,67 @@ +# Created by: Thierry Thomas +# $FreeBSD$ + +PORTNAME= toxcore +PORTVERSION= 0.1.11 +DISTVERSIONPREFIX= v +PORTREVISION= 1 +PORTEPOCH= 1 +CATEGORIES= net-im net-p2p +PKGNAMESUFFIX= -legacy + +MAINTAINER= thierry@FreeBSD.org +COMMENT= ProjectTox-Core library, a decentralized and secure messenger (legacy) + +LICENSE= GPLv3 + +BUILD_DEPENDS= checkmk:devel/check +LIB_DEPENDS= libvpx.so:multimedia/libvpx \ + libsndfile.so:audio/libsndfile \ + libsodium.so:security/libsodium \ + libopencv_core.so:graphics/opencv-core \ + libopus.so:audio/opus \ + libconfig.so:devel/libconfig +TEST_DEPENDS= ${LOCALBASE}/lib/libmsgpackc.so:devel/msgpack \ + ${LOCALBASE}/lib/libportaudio.so:audio/portaudio + +CONFLICTS= tox-0.2* + +USE_GITHUB= yes +GH_ACCOUNT= TokTok +GH_PROJECT= c-toxcore + +USES= cmake compiler:c11 libtool pathfix pkgconfig +USE_LDCONFIG= yes +PLIST_SUB= VER=${PORTVERSION:C/0.//}.0 SO=1 + +OPTIONS_DEFINE= DAEMON +OPTIONS_SUB= yes + +DAEMON_DESC= Bootstrap daemon +DAEMON_CMAKE_ON= -DBOOTSTRAP_DAEMON=on +DAEMON_LIB_DEPENDS= libconfig.so:devel/libconfig + +TEST_TARGET= test + +.include + +.if ${PORT_OPTIONS:MDAEMON} +USERS= toxdht +USE_RC_SUBR= tox-bootstrapd +SUB_LIST= TOXDHT=${USERS} +PLIST_SUB+= TOXDHT=${USERS} +KEYS_DIR= /var/lib/tox-bootstrapd +PID_DIR= /var/run/tox-bootstrapd +PKGMESSAGE= ${PKGDIR}/pkg-message.daemon +.endif + +post-install: +.if ${PORT_OPTIONS:MDAEMON} + ${INSTALL_PROGRAM} ${WRKSRC}/tox-bootstrapd ${STAGEDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/other/bootstrap_daemon/tox-bootstrapd.conf \ + ${STAGEDIR}${PREFIX}/etc/tox-bootstrapd.conf.sample + ${MKDIR} ${STAGEDIR}${KEYS_DIR} + ${MKDIR} ${STAGEDIR}${PID_DIR} +.endif + +.include Index: head/net-im/tox12/distinfo =================================================================== --- head/net-im/tox12/distinfo +++ head/net-im/tox12/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1514391164 +SHA256 (TokTok-c-toxcore-v0.1.11_GH0.tar.gz) = 85b6184a160c343616e3253a0bf728cfe1588e73b6d6f8772aa1e44061e41b10 +SIZE (TokTok-c-toxcore-v0.1.11_GH0.tar.gz) = 458597 Index: head/net-im/tox12/files/patch-CMakeLists.txt =================================================================== --- head/net-im/tox12/files/patch-CMakeLists.txt +++ head/net-im/tox12/files/patch-CMakeLists.txt @@ -0,0 +1,26 @@ +--- CMakeLists.txt.orig 2017-12-27 18:43:18 UTC ++++ CMakeLists.txt +@@ -349,23 +349,6 @@ if(NOT SPECTEST) + endif() + endif() + +-if(MSGPACK_FOUND) +- add_c_executable(toxcore-sut +- testing/hstox/binary_decode.c +- testing/hstox/binary_encode.c +- testing/hstox/driver.c +- testing/hstox/methods.c +- testing/hstox/packet_kinds.c +- testing/hstox/test_main.c +- testing/hstox/util.c) +- target_link_modules(toxcore-sut +- toxcore +- ${MSGPACK_LIBRARIES}) +- if(SPECTEST) +- add_test(NAME spectest COMMAND ${SPECTEST} $) +- endif() +-endif() +- + ################################################################################ + # + # :: Automated regression tests Index: head/net-im/tox12/files/patch-toxcore_ccompat.h =================================================================== --- head/net-im/tox12/files/patch-toxcore_ccompat.h +++ head/net-im/tox12/files/patch-toxcore_ccompat.h @@ -0,0 +1,11 @@ +--- toxcore/ccompat.h.orig 2017-04-27 18:20:19 UTC ++++ toxcore/ccompat.h +@@ -29,8 +29,6 @@ + // Emulation using alloca. + #ifdef _WIN32 + #include +-#else +-#include + #endif + + #define VLA(type, name, size) \ Index: head/net-im/tox12/files/tox-bootstrapd.in =================================================================== --- head/net-im/tox12/files/tox-bootstrapd.in +++ head/net-im/tox12/files/tox-bootstrapd.in @@ -0,0 +1,42 @@ +#! /bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: tox_bootstrapd +# REQUIRE: NETWORKING DAEMON +# KEYWORD: shutdown + +# Add the following line to /etc/rc.conf to enable `tox-bootstrapd': +# +#tox_bootstrapd_enable="YES" +# + +. /etc/rc.subr + +name="tox_bootstrapd" +rcvar=tox_bootstrapd_enable + +# read settings, set default values +load_rc_config "${name}" +: ${tox_bootstrapd_enable="NO"} + +required_files=${tox_bootstrapd_config:="%%PREFIX%%/etc/tox-bootstrapd.conf"} +_pidprefix="/var/run/tox-bootstrapd" +pidfile=${tox_bootstrapd_pidfile:="$_pidprefix/tox-bootstrapd.pid"} +long_name="Tox DHT bootstrap daemon." +tox_bootstrapd_user="%%TOXDHT%%" +command="%%PREFIX%%/bin/tox-bootstrapd" +command_args="--config ${tox_bootstrapd_config}" + +stop_cmd=${name}_stop + +# Cannot use the regular stop() because the daemon forks +tox_bootstrapd_stop() { + [ -f $pidfile ] || (echo "$name not running?"; exit 1) + echo "Stopping $long_name" + kill `ps ax | grep $command | grep -v grep | awk '{print $1}'` + rm -f $pidfile +} + +run_rc_command "$1" Index: head/net-im/tox12/pkg-descr =================================================================== --- head/net-im/tox12/pkg-descr +++ head/net-im/tox12/pkg-descr @@ -0,0 +1,9 @@ +Tox is a decentralized, secure messenger with audio and video chat capabilities. +You can see it as an alternative to Skype. + +This is only the core library. To use it, you have to install a client, like +e.g. net-im/toxic, net-im/qTox or net-im/uTox. + +This legacy version must be used only with uTox (untill a new release). + +WWW: http://tox.chat/ Index: head/net-im/tox12/pkg-message.daemon =================================================================== --- head/net-im/tox12/pkg-message.daemon +++ head/net-im/tox12/pkg-message.daemon @@ -0,0 +1,4 @@ + +Warning: your public key will be logged at the level INFO. Check that your +/etc/syslog is configured to log these messages if you need it (to publicize +it). Index: head/net-im/tox12/pkg-plist =================================================================== --- head/net-im/tox12/pkg-plist +++ head/net-im/tox12/pkg-plist @@ -0,0 +1,59 @@ +%%DAEMON%%bin/tox-bootstrapd +%%DAEMON%%@sample etc/tox-bootstrapd.conf.sample +include/tox/tox.h +include/tox/toxav.h +include/tox/toxdns.h +include/tox/toxencryptsave.h +lib/libtoxav.a +lib/libtoxav.so +lib/libtoxav.so.%%SO%% +lib/libtoxav.so.%%VER%% +lib/libtoxcore.a +lib/libtoxcore.so +lib/libtoxcore.so.%%SO%% +lib/libtoxcore.so.%%VER%% +lib/libtoxcrypto.a +lib/libtoxcrypto.so +lib/libtoxcrypto.so.%%SO%% +lib/libtoxcrypto.so.%%VER%% +lib/libtoxdht.a +lib/libtoxdht.so +lib/libtoxdht.so.%%SO%% +lib/libtoxdht.so.%%VER%% +lib/libtoxdns.a +lib/libtoxdns.so +lib/libtoxdns.so.%%SO%% +lib/libtoxdns.so.%%VER%% +lib/libtoxencryptsave.a +lib/libtoxencryptsave.so +lib/libtoxencryptsave.so.%%SO%% +lib/libtoxencryptsave.so.%%VER%% +lib/libtoxfriends.a +lib/libtoxfriends.so +lib/libtoxfriends.so.%%SO%% +lib/libtoxfriends.so.%%VER%% +lib/libtoxgroup.a +lib/libtoxgroup.so +lib/libtoxgroup.so.%%SO%% +lib/libtoxgroup.so.%%VER%% +lib/libtoxmessenger.a +lib/libtoxmessenger.so +lib/libtoxmessenger.so.%%SO%% +lib/libtoxmessenger.so.%%VER%% +lib/libtoxnetcrypto.a +lib/libtoxnetcrypto.so +lib/libtoxnetcrypto.so.%%SO%% +lib/libtoxnetcrypto.so.%%VER%% +lib/libtoxnetwork.a +lib/libtoxnetwork.so +lib/libtoxnetwork.so.%%SO%% +lib/libtoxnetwork.so.%%VER%% +libdata/pkgconfig/libtoxav.pc +libdata/pkgconfig/libtoxcore.pc +libdata/pkgconfig/toxav.pc +libdata/pkgconfig/toxcore.pc +libdata/pkgconfig/toxdns.pc +libdata/pkgconfig/toxencryptsave.pc +%%DAEMON%%@dir(%%TOXDHT%%,nobody,755) /var/run/tox-bootstrapd +%%DAEMON%%@dir(%%TOXDHT%%,nobody,700) /var/lib/tox-bootstrapd +%%DAEMON%%@dir /var/lib