Index: head/net-im/telegram/Makefile =================================================================== --- head/net-im/telegram/Makefile (revision 482678) +++ head/net-im/telegram/Makefile (revision 482679) @@ -1,46 +1,52 @@ # Created by: gahr # $FreeBSD$ PORTNAME= telegram PORTVERSION= 1.4.1.g20161227 PORTREVISION= 4 CATEGORIES= net-im MAINTAINER= cpm@FreeBSD.org COMMENT= Command-line interface for Telegram LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libconfig.so:devel/libconfig \ libevent.so:devel/libevent \ libjansson.so:devel/jansson BROKEN_mips= Missing header BROKEN_mips64= Missing header BROKEN_powerpc64= Does not build: Assertion failed: (get_int () == TLS_SCHEMA_V2) USES= gmake lua:52 ncurses pkgconfig readline ssl GNU_CONFIGURE= yes USE_GITHUB= yes GH_ACCOUNT= vysheng GH_PROJECT= tg tgl:tgl tl-parser:tlparser GH_TAGNAME= 6547c0b ffb04ca:tgl 36bf190:tlparser GH_SUBDIR= tgl:tgl tgl/tl-parser:tlparser PLIST_FILES= bin/telegram-cli \ etc/telegram-cli/server.pub PORTDOCS= * OPTIONS_DEFINE= DOCS +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200085 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-openssl-1.1.0 +.endif + 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/telegram-cli/server.pub @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/ && ${INSTALL_DATA} CHANGELOG README-LUA README.es README.md \ ${STAGEDIR}${DOCSDIR}) .include Index: head/net-im/telegram/files/extra-patch-openssl-1.1.0 =================================================================== --- head/net-im/telegram/files/extra-patch-openssl-1.1.0 (nonexistent) +++ head/net-im/telegram/files/extra-patch-openssl-1.1.0 (revision 482679) @@ -0,0 +1,38 @@ +--- tgl/crypto/rsa_pem_openssl.c.orig 2018-10-21 14:25:36 UTC ++++ tgl/crypto/rsa_pem_openssl.c +@@ -36,18 +36,28 @@ TGLC_WRAPPER_ASSOC(rsa,RSA) + // TODO: Refactor crucial struct-identity into its own header. + TGLC_WRAPPER_ASSOC(bn,BIGNUM) + ++/* ++ * Note: Since OpenSSL version 1.1.0-pre5 the RSA struct (rsa_st) is opaque, ++ * see https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes ++ */ + TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) { + RSA *ret = RSA_new (); +- ret->e = unwrap_bn (TGLC_bn_new ()); +- TGLC_bn_set_word (wrap_bn (ret->e), e); +- ret->n = unwrap_bn (TGLC_bn_bin2bn (n, n_bytes, NULL)); ++ BIGNUM *ret_e = unwrap_bn (TGLC_bn_new ()); ++ BIGNUM *ret_n = unwrap_bn (TGLC_bn_bin2bn (n, n_bytes, NULL)); ++ RSA_set0_key (ret, ret_n, ret_e, NULL); ++ TGLC_bn_set_word (wrap_bn (ret_e), e); + return wrap_rsa (ret); + } + +-#define RSA_GETTER(M) \ +- TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \ +- return wrap_bn (unwrap_rsa (key)->M); \ +- } \ ++#define RSA_GETTER(M) \ ++TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \ ++ BIGNUM *rsa_n, *rsa_e, *rsa_d; \ ++ RSA_get0_key(unwrap_rsa (key), \ ++ (const BIGNUM **) &rsa_n, \ ++ (const BIGNUM **) &rsa_e, \ ++ (const BIGNUM **) &rsa_d); \ ++ return wrap_bn (rsa_ ## M); \ ++} + + RSA_GETTER(n); + RSA_GETTER(e); Property changes on: head/net-im/telegram/files/extra-patch-openssl-1.1.0 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property