Created attachment 159590 [details] Patch - Update to 1.3.1 - Add LICENSE_FILE - Remove unneeded patches - Take maintainership ref: https://github.com/vysheng/tg/releases/tag/1.3.1
Created attachment 159591 [details] Patch - Add DOCS
Comment on attachment 159591 [details] Patch >diff -urN /usr/ports/net-im/telegram.old/Makefile /usr/ports/net-im/telegram/Makefile >--- /usr/ports/net-im/telegram.old/Makefile 2015-05-07 19:26:05.000000000 +0200 >+++ /usr/ports/net-im/telegram/Makefile 2015-08-05 23:39:14.683611000 +0200 >@@ -2,34 +2,42 @@ > # $FreeBSD: head/net-im/telegram/Makefile 385640 2015-05-07 17:26:05Z mat $ > > 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 >- > 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= * > >-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> >diff -urN /usr/ports/net-im/telegram.old/distinfo /usr/ports/net-im/telegram/distinfo >--- /usr/ports/net-im/telegram.old/distinfo 2015-05-07 19:26:05.000000000 +0200 >+++ /usr/ports/net-im/telegram/distinfo 2015-08-05 23:04:08.157598000 +0200 >@@ -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 -urN /usr/ports/net-im/telegram.old/files/patch-main.c /usr/ports/net-im/telegram/files/patch-main.c >--- /usr/ports/net-im/telegram.old/files/patch-main.c 2014-10-02 10:59:02.000000000 +0200 >+++ /usr/ports/net-im/telegram/files/patch-main.c 1970-01-01 01:00:00.000000000 +0100 >@@ -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 -urN /usr/ports/net-im/telegram.old/files/patch-mtproto-client.c /usr/ports/net-im/telegram/files/patch-mtproto-client.c >--- /usr/ports/net-im/telegram.old/files/patch-mtproto-client.c 2014-10-02 12:19:08.000000000 +0200 >+++ /usr/ports/net-im/telegram/files/patch-mtproto-client.c 1970-01-01 01:00:00.000000000 +0100 >@@ -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 -urN /usr/ports/net-im/telegram.old/files/patch-net.c /usr/ports/net-im/telegram/files/patch-net.c >--- /usr/ports/net-im/telegram.old/files/patch-net.c 2014-10-02 12:19:08.000000000 +0200 >+++ /usr/ports/net-im/telegram/files/patch-net.c 1970-01-01 01:00:00.000000000 +0100 >@@ -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>
Created attachment 159593 [details] Patch Fix typo in Makefile
Created attachment 159599 [details] Patch - Add libjasson.so as dependency - Fix build on FreeBSD 8 and 9. __builtin_bswap32 and __builtin_bswap64 were not introduced in GCC until v4.3
Summarizing: - 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 - Take maintainership
Created attachment 159600 [details] Patch
Created attachment 159601 [details] telegram build log on 93x32
Created attachment 159602 [details] telegram build log on 93x64
Created attachment 159603 [details] telegram build log on 10x32
portlint seems happy % cd /usr/ports/net-im/telegram && portlint -ac WARN: Consider to set DEVELOPER=yes in /etc/make.conf 0 fatal errors and 1 warning found.
testing @work
A commit references this bug: Author: pi Date: Thu Aug 6 05:30:27 UTC 2015 New revision: 393631 URL: https://svnweb.freebsd.org/changeset/ports/393631 Log: 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> Changes: head/net-im/telegram/Makefile head/net-im/telegram/distinfo head/net-im/telegram/files/
Build-test on cur 93a 10x 10i was fine. Committed, thanks!