View | Details | Raw Unified | Return to bug 202113 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/ports/net-im/telegram/Makefile (-11 / +15 lines)
Lines 2-35 Link Here
2
# $FreeBSD: head/net-im/telegram/Makefile 385640 2015-05-07 17:26:05Z mat $
2
# $FreeBSD: head/net-im/telegram/Makefile 385640 2015-05-07 17:26:05Z mat $
3
3
4
PORTNAME=	telegram
4
PORTNAME=	telegram
5
PORTVERSION=	1.0.5.1
5
PORTVERSION=	1.3.1
6
PORTREVISION=	1
7
CATEGORIES=	net-im
6
CATEGORIES=	net-im
7
MASTER_SITES=	http://github.com/vysheng/tg/archive/:source1 \
8
		http://github.com/vysheng/tgl/archive/:source2 \
9
		http://github.com/vysheng/tl-parser/archive/:source3
10
DISTFILES=	1.3.1.tar.gz:source1 2.0.1.tar.gz:source2 master.zip:source3
8
11
9
MAINTAINER=	ports@FreeBSD.org
12
MAINTAINER=	cpm@fbsd.es
10
COMMENT=	Command-line interface for Telegram
13
COMMENT=	Command-line interface for Telegram
11
14
12
LICENSE=	GPLv2
15
LICENSE=	GPLv2
16
LICENSE_FILES=	${WRKSRC}/LICENSE
13
17
14
LIB_DEPENDS=	libconfig.so:${PORTSDIR}/devel/libconfig \
18
LIB_DEPENDS=	libconfig.so:${PORTSDIR}/devel/libconfig \
15
    		libevent.so:${PORTSDIR}/devel/libevent2
19
    		libevent.so:${PORTSDIR}/devel/libevent2
16
20
17
USE_GITHUB=	yes
18
GH_ACCOUNT=	vysheng
19
GH_PROJECT=	tg
20
21
USES=		execinfo gmake lua:52 ncurses pkgconfig readline
21
USES=		execinfo gmake lua:52 ncurses pkgconfig readline
22
USE_OPENSSL=	yes
22
USE_OPENSSL=	yes
23
GNU_CONFIGURE=	yes
23
GNU_CONFIGURE=	yes
24
24
25
WRKSRC=	${WRKDIR}/tg-1.3.1
26
25
PLIST_FILES=	bin/telegram-cli \
27
PLIST_FILES=	bin/telegram-cli \
26
		etc/tg-server.pub
28
		etc/telegram-cli/server.pub
27
29
28
post-patch:
30
post-extract:
29
	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/main.c
31
	@${MV} ${WRKDIR}/tgl-2.0.1/* ${WRKSRC}/tgl
32
	@${MV} ${WRKDIR}/tl-parser-master/* ${WRKSRC}/tgl/tl-parser
30
33
31
do-install:
34
do-install:
35
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/telegram-cli
32
	${INSTALL_PROGRAM} ${WRKSRC}/bin/telegram-cli ${STAGEDIR}${PREFIX}/bin
36
	${INSTALL_PROGRAM} ${WRKSRC}/bin/telegram-cli ${STAGEDIR}${PREFIX}/bin
33
	${INSTALL_DATA} ${WRKSRC}/tg-server.pub ${STAGEDIR}${PREFIX}/etc
37
	${INSTALL_DATA} ${WRKSRC}/tg-server.pub ${STAGEDIR}${PREFIX}/etc/telegram-cli/server.pub
34
38
35
.include <bsd.port.mk>
39
.include <bsd.port.mk>
(-)/usr/ports/net-im/telegram/distinfo (-2 / +6 lines)
Lines 1-2 Link Here
1
SHA256 (vysheng-tg-1.0.5.1_GH0.tar.gz) = 5a78fd46e978ff450eda6f4664499042dddf053f4fe233fe3157499869646fb8
1
SHA256 (1.3.1.tar.gz) = b70b1d8b97b44086b64e467f81c6aceb8263092c26a8cf1a7d717eb1b5360415
2
SIZE (vysheng-tg-1.0.5.1_GH0.tar.gz) = 390832
2
SIZE (1.3.1.tar.gz) = 278051
3
SHA256 (2.0.1.tar.gz) = 549bbfc46715bae31b50a54cc21eefd61109cd28dcdddbe4e53726aec3d924f1
4
SIZE (2.0.1.tar.gz) = 250488
5
SHA256 (master.zip) = 14e9c78dae2b32acaf845121725ab694e21276959f07242470ebb39a1934fdf5
6
SIZE (master.zip) = 82671
(-)/usr/ports/net-im/telegram/files/patch-main.c (-19 lines)
Lines 1-19 Link Here
1
--- main.c.orig	2014-09-24 12:35:27.000000000 +0200
2
+++ main.c	2014-10-02 10:22:46.000000000 +0200
3
@@ -59,6 +59,7 @@
4
 
5
 #include <grp.h>
6
 #include <arpa/inet.h>
7
+#include <netinet/in.h>
8
 
9
 #include "telegram.h"
10
 #include "loop.h"
11
@@ -803,7 +804,7 @@
12
   running_for_first_time ();
13
   parse_config ();
14
 
15
-  tgl_set_rsa_key ("/etc/" PROG_NAME "/server.pub");
16
+  tgl_set_rsa_key ("%%PREFIX%%/etc/tg-server.pub");
17
   tgl_set_rsa_key ("tg-server.pub");
18
 
19
 
(-)/usr/ports/net-im/telegram/files/patch-mtproto-client.c (-11 lines)
Lines 1-11 Link Here
1
--- mtproto-client.c.orig	2014-10-02 12:07:49.000000000 +0200
2
+++ mtproto-client.c	2014-10-02 12:08:13.000000000 +0200
3
@@ -80,7 +80,7 @@
4
 #define MAX_NET_RES        (1L << 16)
5
 //extern int log_level;
6
 
7
-#ifndef HAVE___BUILTIN_BSWAP32
8
+#if !defined(HAVE___BUILTIN_BSWAP32) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
9
 static inline unsigned __builtin_bswap32(unsigned x) {
10
   return ((x << 24) & 0xff000000 ) |
11
   ((x << 8) & 0x00ff0000 ) |
(-)/usr/ports/net-im/telegram/files/patch-net.c (-15 lines)
Lines 1-15 Link Here
1
--- net.c.orig	2014-10-02 12:12:58.000000000 +0200
2
+++ net.c	2014-10-02 12:13:09.000000000 +0200
3
@@ -26,11 +26,11 @@
4
 #include <string.h>
5
 #include <stdlib.h>
6
 #include <assert.h>
7
+#include <sys/types.h>
8
 #include <netdb.h>
9
 #include <netinet/in.h>
10
 #include <netinet/tcp.h>
11
 #include <sys/fcntl.h>
12
-#include <sys/types.h>
13
 #include <sys/socket.h>
14
 #include <errno.h>
15
 #include <stdio.h>

Return to bug 202113