aboutsummaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2014-10-02 10:19:08 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2014-10-02 10:19:08 +0000
commit922e1e6b2e08f238677478863842ecf69e2c2ddc (patch)
tree68e3946afef082241a851e949efeccadaf336e86 /net-im
parent361c0be994da769f19fd64dfcfcea3671ff5a86d (diff)
downloadports-922e1e6b2e08f238677478863842ecf69e2c2ddc.tar.gz
ports-922e1e6b2e08f238677478863842ecf69e2c2ddc.zip
Notes
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>