1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

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>
This commit is contained in:
Kurt Jaeger 2015-08-06 05:30:26 +00:00
parent 66ea81be51
commit d0cff72421
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=393631
5 changed files with 35 additions and 61 deletions

View File

@ -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
PLIST_FILES= bin/telegram-cli \
etc/tg-server.pub
WRKSRC= ${WRKDIR}/tg-1.3.1
post-patch:
${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/main.c
PLIST_FILES= bin/telegram-cli \
etc/telegram-cli/server.pub
PORTDOCS= *
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 1000024
USE_GCC= 4.8+
.endif
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>

View File

@ -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

View File

@ -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");

View File

@ -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 ) |

View File

@ -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>