aboutsummaryrefslogtreecommitdiffstats
path: root/net-im
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2015-08-06 13:30:26 +0800
committerpi <pi@FreeBSD.org>2015-08-06 13:30:26 +0800
commit375097a63bf492402178c9f6c5b35e44aa91e2cf (patch)
tree402eea4891faa5f0d35e5bbe573b25d4f9dd49f9 /net-im
parent5861b70f34fd5e7d949149652bf4da3d4e49862a (diff)
downloadfreebsd-ports-gnome-375097a63bf492402178c9f6c5b35e44aa91e2cf.tar.gz
freebsd-ports-gnome-375097a63bf492402178c9f6c5b35e44aa91e2cf.tar.zst
freebsd-ports-gnome-375097a63bf492402178c9f6c5b35e44aa91e2cf.zip
net-im/telegram: 1.0.5.1 -> 1.3.1
- Update to 1.3.1 - Add LICENSE_FILE - Remove unneeded patches - Add DOCS - Add libjansson.so as dependency - Fix build on FreeBSD 8 and 9 - Submitter takes maintainership PR: 202113 Submitted by: Carlos Jacobo Puga Medina <cpm@fbsd.es>
Diffstat (limited to 'net-im')
-rw-r--r--net-im/telegram/Makefile41
-rw-r--r--net-im/telegram/distinfo8
-rw-r--r--net-im/telegram/files/patch-main.c19
-rw-r--r--net-im/telegram/files/patch-mtproto-client.c11
-rw-r--r--net-im/telegram/files/patch-net.c15
5 files changed, 34 insertions, 60 deletions
diff --git a/net-im/telegram/Makefile b/net-im/telegram/Makefile
index 569527ee87e9..899be8dce7c6 100644
--- a/net-im/telegram/Makefile
+++ b/net-im/telegram/Makefile
@@ -2,34 +2,49 @@
# $FreeBSD$
PORTNAME= telegram
-PORTVERSION= 1.0.5.1
-PORTREVISION= 1
+PORTVERSION= 1.3.1
CATEGORIES= net-im
+MASTER_SITES= http://github.com/vysheng/tg/archive/:source1 \
+ http://github.com/vysheng/tgl/archive/:source2 \
+ http://github.com/vysheng/tl-parser/archive/:source3
+DISTFILES= 1.3.1.tar.gz:source1 2.0.1.tar.gz:source2 master.zip:source3
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= cpm@fbsd.es
COMMENT= Command-line interface for Telegram
LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libconfig.so:${PORTSDIR}/devel/libconfig \
- libevent.so:${PORTSDIR}/devel/libevent2
-
-USE_GITHUB= yes
-GH_ACCOUNT= vysheng
-GH_PROJECT= tg
+ libevent.so:${PORTSDIR}/devel/libevent2 \
+ libjansson.so:${PORTSDIR}/devel/jansson
USES= execinfo gmake lua:52 ncurses pkgconfig readline
USE_OPENSSL= yes
GNU_CONFIGURE= yes
+WRKSRC= ${WRKDIR}/tg-1.3.1
+
PLIST_FILES= bin/telegram-cli \
- etc/tg-server.pub
+ etc/telegram-cli/server.pub
+PORTDOCS= *
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 1000024
+USE_GCC= 4.8+
+.endif
-post-patch:
- ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/main.c
+post-extract:
+ @${MV} ${WRKDIR}/tgl-2.0.1/* ${WRKSRC}/tgl
+ @${MV} ${WRKDIR}/tl-parser-master/* ${WRKSRC}/tgl/tl-parser
do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/telegram-cli
${INSTALL_PROGRAM} ${WRKSRC}/bin/telegram-cli ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/tg-server.pub ${STAGEDIR}${PREFIX}/etc
+ ${INSTALL_DATA} ${WRKSRC}/tg-server.pub ${STAGEDIR}${PREFIX}/etc/telegram-cli/server.pub
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ (cd ${WRKSRC}/ && ${INSTALL_DATA} CHANGELOG README-LUA README.es README.md \
+ ${STAGEDIR}${DOCSDIR})
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net-im/telegram/distinfo b/net-im/telegram/distinfo
index 79789ef088a2..1ac9fad29d9b 100644
--- a/net-im/telegram/distinfo
+++ b/net-im/telegram/distinfo
@@ -1,2 +1,6 @@
-SHA256 (vysheng-tg-1.0.5.1_GH0.tar.gz) = 5a78fd46e978ff450eda6f4664499042dddf053f4fe233fe3157499869646fb8
-SIZE (vysheng-tg-1.0.5.1_GH0.tar.gz) = 390832
+SHA256 (1.3.1.tar.gz) = b70b1d8b97b44086b64e467f81c6aceb8263092c26a8cf1a7d717eb1b5360415
+SIZE (1.3.1.tar.gz) = 278051
+SHA256 (2.0.1.tar.gz) = 549bbfc46715bae31b50a54cc21eefd61109cd28dcdddbe4e53726aec3d924f1
+SIZE (2.0.1.tar.gz) = 250488
+SHA256 (master.zip) = 14e9c78dae2b32acaf845121725ab694e21276959f07242470ebb39a1934fdf5
+SIZE (master.zip) = 82671
diff --git a/net-im/telegram/files/patch-main.c b/net-im/telegram/files/patch-main.c
deleted file mode 100644
index 8a244f95f659..000000000000
--- a/net-im/telegram/files/patch-main.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- main.c.orig 2014-09-24 12:35:27.000000000 +0200
-+++ main.c 2014-10-02 10:22:46.000000000 +0200
-@@ -59,6 +59,7 @@
-
- #include <grp.h>
- #include <arpa/inet.h>
-+#include <netinet/in.h>
-
- #include "telegram.h"
- #include "loop.h"
-@@ -803,7 +804,7 @@
- running_for_first_time ();
- parse_config ();
-
-- tgl_set_rsa_key ("/etc/" PROG_NAME "/server.pub");
-+ tgl_set_rsa_key ("%%PREFIX%%/etc/tg-server.pub");
- tgl_set_rsa_key ("tg-server.pub");
-
-
diff --git a/net-im/telegram/files/patch-mtproto-client.c b/net-im/telegram/files/patch-mtproto-client.c
deleted file mode 100644
index 011466f363b1..000000000000
--- a/net-im/telegram/files/patch-mtproto-client.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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/telegram/files/patch-net.c b/net-im/telegram/files/patch-net.c
deleted file mode 100644
index 7a8700aab864..000000000000
--- a/net-im/telegram/files/patch-net.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- 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>