aboutsummaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
Diffstat (limited to 'net-im')
-rw-r--r--net-im/tg/Makefile9
-rw-r--r--net-im/tg/files/patch-mtproto-client.c11
-rw-r--r--net-im/tg/files/patch-net.c15
3 files changed, 33 insertions, 2 deletions
diff --git a/net-im/tg/Makefile b/net-im/tg/Makefile
index 6fb8d77c4cd4..f3a31347ddce 100644
--- a/net-im/tg/Makefile
+++ b/net-im/tg/Makefile
@@ -3,19 +3,24 @@
PORTNAME= tg
PORTVERSION= 1.0.5.1
+PORTREVISION= 1
CATEGORIES= net-im
MAINTAINER= gahr@FreeBSD.org
COMMENT= Command-line interface for Telegram
-LIB_DEPENDS= libconfig.so:${PORTSDIR}/devel/libconfig
+LICENSE= GPLv2
+
+LIB_DEPENDS= libconfig.so:${PORTSDIR}/devel/libconfig \
+ libevent.so:${PORTSDIR}/devel/libevent2
USE_GITHUB= yes
GH_ACCOUNT= vysheng
GH_TAGNAME= 1.0.5.1
GH_COMMIT= 77bbb4c
-USES= execinfo gmake lua:52 readline
+USES= execinfo gmake lua:52 ncurses pkgconfig readline
+USE_OPENSSL= yes
GNU_CONFIGURE= yes
PLIST_FILES= bin/telegram-cli \
diff --git a/net-im/tg/files/patch-mtproto-client.c b/net-im/tg/files/patch-mtproto-client.c
new file mode 100644
index 000000000000..011466f363b1
--- /dev/null
+++ b/net-im/tg/files/patch-mtproto-client.c
@@ -0,0 +1,11 @@
+--- mtproto-client.c.orig 2014-10-02 12:07:49.000000000 +0200
++++ mtproto-client.c 2014-10-02 12:08:13.000000000 +0200
+@@ -80,7 +80,7 @@
+ #define MAX_NET_RES (1L << 16)
+ //extern int log_level;
+
+-#ifndef HAVE___BUILTIN_BSWAP32
++#if !defined(HAVE___BUILTIN_BSWAP32) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
+ static inline unsigned __builtin_bswap32(unsigned x) {
+ return ((x << 24) & 0xff000000 ) |
+ ((x << 8) & 0x00ff0000 ) |
diff --git a/net-im/tg/files/patch-net.c b/net-im/tg/files/patch-net.c
new file mode 100644
index 000000000000..7a8700aab864
--- /dev/null
+++ b/net-im/tg/files/patch-net.c
@@ -0,0 +1,15 @@
+--- net.c.orig 2014-10-02 12:12:58.000000000 +0200
++++ net.c 2014-10-02 12:13:09.000000000 +0200
+@@ -26,11 +26,11 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <assert.h>
++#include <sys/types.h>
+ #include <netdb.h>
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+ #include <sys/fcntl.h>
+-#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <errno.h>
+ #include <stdio.h>