* [PR PATCH] New package: telegram-cli-20200106
@ 2020-01-31 18:13 voidlinux-github
2020-02-01 0:04 ` [PR PATCH] [Updated] " voidlinux-github
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: voidlinux-github @ 2020-01-31 18:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
There is a new pull request by timmykill against master on the void-packages repository
https://github.com/timmykill/void-packages telegram-cli
https://github.com/void-linux/void-packages/pull/18693
New package: telegram-cli-20200106
A patch file from https://github.com/void-linux/void-packages/pull/18693.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-cli-18693.patch --]
[-- Type: text/x-diff, Size: 1767 bytes --]
From b15e061fe78ca88645cc4487ebc206128832f3f7 Mon Sep 17 00:00:00 2001
From: Marco <marko99thebest@gmail.com>
Date: Fri, 31 Jan 2020 19:12:51 +0100
Subject: [PATCH] New package: telegram-cli-20200106
---
srcpkgs/telegram-cli/template | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 srcpkgs/telegram-cli/template
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
new file mode 100644
index 00000000000..0c0cfd8f68e
--- /dev/null
+++ b/srcpkgs/telegram-cli/template
@@ -0,0 +1,26 @@
+# Template file for 'telegram-cli'
+pkgname=telegram-cli
+version=20200106
+revision=1
+build_style=gnu-configure
+makedepends="libevent-devel libconfig-devel lua-devel jansson-devel zlib-devel readline-devel libressl-devel libgcrypt-devel"
+short_desc="Command-line interface for Telegram. Uses readline interface"
+maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
+license="GPL-2"
+homepage="https://github.com/kenorb-contrib/tg"
+_tglversion=20190203
+distfiles="https://github.com/kenorb-contrib/tg/archive/${version}.tar.gz>tg-${version}.tar.gz https://github.com/kenorb-contrib/tgl/archive/${_tglversion}.tar.gz>tgl-${_tglversion}.tar.gz"
+checksum="824504804e8c0bb20943d765ba54feaacda7b2ec34735da0cfe5d5e61348d519 178e443938a89c9aa771fe7a25b36315840915bff8f6744ab298f36f88540a32"
+
+do_extract() {
+ srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tg-${version}.tar.gz -C $wrksrc --strip-components 1
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tgl-${_tglversion}.tar.gz -C $wrksrc/tgl --strip-components 1
+}
+
+do_install() {
+ cd ${wrksrc}
+ vbin bin/telegram-cli
+ vman debian/telegram-cli.8
+ vconf tg-server.pub server.pub
+}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
@ 2020-02-01 0:04 ` voidlinux-github
2020-02-01 0:11 ` voidlinux-github
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: voidlinux-github @ 2020-02-01 0:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
There is an updated pull request by timmykill against master on the void-packages repository
https://github.com/timmykill/void-packages telegram-cli
https://github.com/void-linux/void-packages/pull/18693
New package: telegram-cli-20200106
A patch file from https://github.com/void-linux/void-packages/pull/18693.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-cli-18693.patch --]
[-- Type: text/x-diff, Size: 1774 bytes --]
From 1261f61d10a7bcad05ddde0436aa162d4fb660fc Mon Sep 17 00:00:00 2001
From: Marco <marko99thebest@gmail.com>
Date: Fri, 31 Jan 2020 19:12:51 +0100
Subject: [PATCH] New package: telegram-cli-20200106
---
srcpkgs/telegram-cli/template | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 srcpkgs/telegram-cli/template
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
new file mode 100644
index 00000000000..775fff7bf14
--- /dev/null
+++ b/srcpkgs/telegram-cli/template
@@ -0,0 +1,26 @@
+# Template file for 'telegram-cli'
+pkgname=telegram-cli
+version=20200106
+revision=1
+build_style=gnu-configure
+makedepends="libevent-devel libconfig-devel lua-devel jansson-devel zlib-devel readline-devel libressl-devel libgcrypt-devel"
+short_desc="Command-line interface for Telegram. Uses readline interface"
+maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/kenorb-contrib/tg"
+_tglversion=20190203
+distfiles="https://github.com/kenorb-contrib/tg/archive/${version}.tar.gz>tg-${version}.tar.gz https://github.com/kenorb-contrib/tgl/archive/${_tglversion}.tar.gz>tgl-${_tglversion}.tar.gz"
+checksum="824504804e8c0bb20943d765ba54feaacda7b2ec34735da0cfe5d5e61348d519 178e443938a89c9aa771fe7a25b36315840915bff8f6744ab298f36f88540a32"
+
+do_extract() {
+ srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tg-${version}.tar.gz -C $wrksrc --strip-components 1
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tgl-${_tglversion}.tar.gz -C $wrksrc/tgl --strip-components 1
+}
+
+do_install() {
+ cd ${wrksrc}
+ vbin bin/telegram-cli
+ vman debian/telegram-cli.8
+ vconf tg-server.pub server.pub
+}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
2020-02-01 0:04 ` [PR PATCH] [Updated] " voidlinux-github
@ 2020-02-01 0:11 ` voidlinux-github
2020-02-01 0:22 ` voidlinux-github
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: voidlinux-github @ 2020-02-01 0:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
There is an updated pull request by timmykill against master on the void-packages repository
https://github.com/timmykill/void-packages telegram-cli
https://github.com/void-linux/void-packages/pull/18693
New package: telegram-cli-20200106
A patch file from https://github.com/void-linux/void-packages/pull/18693.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-cli-18693.patch --]
[-- Type: text/x-diff, Size: 1829 bytes --]
From 1822ac4561e25bf2922c1a6f24ef400ba9ad5302 Mon Sep 17 00:00:00 2001
From: Marco <marko99thebest@gmail.com>
Date: Fri, 31 Jan 2020 19:12:51 +0100
Subject: [PATCH] New package: telegram-cli-20200106
---
srcpkgs/telegram-cli/template | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 srcpkgs/telegram-cli/template
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
new file mode 100644
index 00000000000..c4143e7a2d7
--- /dev/null
+++ b/srcpkgs/telegram-cli/template
@@ -0,0 +1,27 @@
+# Template file for 'telegram-cli'
+pkgname=telegram-cli
+version=20200106
+revision=1
+build_style=gnu-configure
+configure_args="${configure_args} --disable-openssl"
+makedepends="libevent-devel libconfig-devel lua-devel jansson-devel zlib-devel readline-devel libressl-devel libgcrypt-devel"
+short_desc="Command-line interface for Telegram. Uses readline interface"
+maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/kenorb-contrib/tg"
+_tglversion=20190203
+distfiles="https://github.com/kenorb-contrib/tg/archive/${version}.tar.gz>tg-${version}.tar.gz https://github.com/kenorb-contrib/tgl/archive/${_tglversion}.tar.gz>tgl-${_tglversion}.tar.gz"
+checksum="824504804e8c0bb20943d765ba54feaacda7b2ec34735da0cfe5d5e61348d519 178e443938a89c9aa771fe7a25b36315840915bff8f6744ab298f36f88540a32"
+
+do_extract() {
+ srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tg-${version}.tar.gz -C $wrksrc --strip-components 1
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tgl-${_tglversion}.tar.gz -C $wrksrc/tgl --strip-components 1
+}
+
+do_install() {
+ cd ${wrksrc}
+ vbin bin/telegram-cli
+ vman debian/telegram-cli.8
+ vconf tg-server.pub server.pub
+}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
2020-02-01 0:04 ` [PR PATCH] [Updated] " voidlinux-github
2020-02-01 0:11 ` voidlinux-github
@ 2020-02-01 0:22 ` voidlinux-github
2020-02-01 1:06 ` voidlinux-github
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: voidlinux-github @ 2020-02-01 0:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
There is an updated pull request by timmykill against master on the void-packages repository
https://github.com/timmykill/void-packages telegram-cli
https://github.com/void-linux/void-packages/pull/18693
New package: telegram-cli-20200106
A patch file from https://github.com/void-linux/void-packages/pull/18693.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-cli-18693.patch --]
[-- Type: text/x-diff, Size: 1849 bytes --]
From e68a26b5118d657bbd57faa592690f645a641b2c Mon Sep 17 00:00:00 2001
From: Marco <marko99thebest@gmail.com>
Date: Fri, 31 Jan 2020 19:12:51 +0100
Subject: [PATCH] New package: telegram-cli-20200106
---
srcpkgs/telegram-cli/template | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 srcpkgs/telegram-cli/template
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
new file mode 100644
index 00000000000..79865b29b00
--- /dev/null
+++ b/srcpkgs/telegram-cli/template
@@ -0,0 +1,28 @@
+# Template file for 'telegram-cli'
+pkgname=telegram-cli
+version=20200106
+revision=1
+build_style=gnu-configure
+configure_args="${configure_args} --disable-openssl"
+hostmakedepends="lua-devel"
+makedepends="libevent-devel libconfig-devel jansson-devel zlib-devel readline-devel libressl-devel libgcrypt-devel"
+short_desc="Command-line interface for Telegram. Uses readline interface"
+maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/kenorb-contrib/tg"
+_tglversion=20190203
+distfiles="https://github.com/kenorb-contrib/tg/archive/${version}.tar.gz>tg-${version}.tar.gz https://github.com/kenorb-contrib/tgl/archive/${_tglversion}.tar.gz>tgl-${_tglversion}.tar.gz"
+checksum="824504804e8c0bb20943d765ba54feaacda7b2ec34735da0cfe5d5e61348d519 178e443938a89c9aa771fe7a25b36315840915bff8f6744ab298f36f88540a32"
+
+do_extract() {
+ srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tg-${version}.tar.gz -C $wrksrc --strip-components 1
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tgl-${_tglversion}.tar.gz -C $wrksrc/tgl --strip-components 1
+}
+
+do_install() {
+ cd ${wrksrc}
+ vbin bin/telegram-cli
+ vman debian/telegram-cli.8
+ vconf tg-server.pub server.pub
+}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (2 preceding siblings ...)
2020-02-01 0:22 ` voidlinux-github
@ 2020-02-01 1:06 ` voidlinux-github
2020-02-01 1:08 ` voidlinux-github
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: voidlinux-github @ 2020-02-01 1:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
There is an updated pull request by timmykill against master on the void-packages repository
https://github.com/timmykill/void-packages telegram-cli
https://github.com/void-linux/void-packages/pull/18693
New package: telegram-cli-20200106
A patch file from https://github.com/void-linux/void-packages/pull/18693.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-cli-18693.patch --]
[-- Type: text/x-diff, Size: 1848 bytes --]
From 68694297329a105685acbacea84586ed9ba9f6ba Mon Sep 17 00:00:00 2001
From: Marco <marko99thebest@gmail.com>
Date: Fri, 31 Jan 2020 19:12:51 +0100
Subject: [PATCH] New package: telegram-cli-20200106
---
srcpkgs/telegram-cli/template | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 srcpkgs/telegram-cli/template
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
new file mode 100644
index 00000000000..d409f3ebb9b
--- /dev/null
+++ b/srcpkgs/telegram-cli/template
@@ -0,0 +1,28 @@
+# Template file for 'telegram-cli'
+pkgname=telegram-cli
+version=20200106
+revision=1
+build_style=gnu-configure
+configure_args="${configure_args} --disable-openssl"
+hostmakedepends="lua-devel libressl-devel libcrypt-devel"
+makedepends="libevent-devel libconfig-devel jansson-devel zlib-devel readline-devel"
+short_desc="Command-line interface for Telegram. Uses readline interface"
+maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/kenorb-contrib/tg"
+_tglversion=20190203
+distfiles="https://github.com/kenorb-contrib/tg/archive/${version}.tar.gz>tg-${version}.tar.gz https://github.com/kenorb-contrib/tgl/archive/${_tglversion}.tar.gz>tgl-${_tglversion}.tar.gz"
+checksum="824504804e8c0bb20943d765ba54feaacda7b2ec34735da0cfe5d5e61348d519 178e443938a89c9aa771fe7a25b36315840915bff8f6744ab298f36f88540a32"
+
+do_extract() {
+ srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tg-${version}.tar.gz -C $wrksrc --strip-components 1
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tgl-${_tglversion}.tar.gz -C $wrksrc/tgl --strip-components 1
+}
+
+do_install() {
+ cd ${wrksrc}
+ vbin bin/telegram-cli
+ vman debian/telegram-cli.8
+ vconf tg-server.pub server.pub
+}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (3 preceding siblings ...)
2020-02-01 1:06 ` voidlinux-github
@ 2020-02-01 1:08 ` voidlinux-github
2020-02-01 1:16 ` voidlinux-github
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: voidlinux-github @ 2020-02-01 1:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
There is an updated pull request by timmykill against master on the void-packages repository
https://github.com/timmykill/void-packages telegram-cli
https://github.com/void-linux/void-packages/pull/18693
New package: telegram-cli-20200106
A patch file from https://github.com/void-linux/void-packages/pull/18693.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-cli-18693.patch --]
[-- Type: text/x-diff, Size: 1793 bytes --]
From a021f11b74d9d1eb5abbd06a62a526c1fd7ec199 Mon Sep 17 00:00:00 2001
From: Marco <marko99thebest@gmail.com>
Date: Fri, 31 Jan 2020 19:12:51 +0100
Subject: [PATCH] New package: telegram-cli-20200106
---
srcpkgs/telegram-cli/template | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 srcpkgs/telegram-cli/template
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
new file mode 100644
index 00000000000..82564f5ca8c
--- /dev/null
+++ b/srcpkgs/telegram-cli/template
@@ -0,0 +1,27 @@
+# Template file for 'telegram-cli'
+pkgname=telegram-cli
+version=20200106
+revision=1
+build_style=gnu-configure
+hostmakedepends="lua-devel libressl-devel libcrypt-devel"
+makedepends="libevent-devel libconfig-devel jansson-devel zlib-devel readline-devel"
+short_desc="Command-line interface for Telegram. Uses readline interface"
+maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/kenorb-contrib/tg"
+_tglversion=20190203
+distfiles="https://github.com/kenorb-contrib/tg/archive/${version}.tar.gz>tg-${version}.tar.gz https://github.com/kenorb-contrib/tgl/archive/${_tglversion}.tar.gz>tgl-${_tglversion}.tar.gz"
+checksum="824504804e8c0bb20943d765ba54feaacda7b2ec34735da0cfe5d5e61348d519 178e443938a89c9aa771fe7a25b36315840915bff8f6744ab298f36f88540a32"
+
+do_extract() {
+ srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tg-${version}.tar.gz -C $wrksrc --strip-components 1
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tgl-${_tglversion}.tar.gz -C $wrksrc/tgl --strip-components 1
+}
+
+do_install() {
+ cd ${wrksrc}
+ vbin bin/telegram-cli
+ vman debian/telegram-cli.8
+ vconf tg-server.pub server.pub
+}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (4 preceding siblings ...)
2020-02-01 1:08 ` voidlinux-github
@ 2020-02-01 1:16 ` voidlinux-github
2020-02-01 1:44 ` voidlinux-github
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: voidlinux-github @ 2020-02-01 1:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
There is an updated pull request by timmykill against master on the void-packages repository
https://github.com/timmykill/void-packages telegram-cli
https://github.com/void-linux/void-packages/pull/18693
New package: telegram-cli-20200106
A patch file from https://github.com/void-linux/void-packages/pull/18693.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-cli-18693.patch --]
[-- Type: text/x-diff, Size: 1790 bytes --]
From 3ee8e52f1b213e548f77cca48f8db987a549a8e2 Mon Sep 17 00:00:00 2001
From: Marco <marko99thebest@gmail.com>
Date: Fri, 31 Jan 2020 19:12:51 +0100
Subject: [PATCH] New package: telegram-cli-20200106
---
srcpkgs/telegram-cli/template | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 srcpkgs/telegram-cli/template
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
new file mode 100644
index 00000000000..904a3cf1579
--- /dev/null
+++ b/srcpkgs/telegram-cli/template
@@ -0,0 +1,27 @@
+# Template file for 'telegram-cli'
+pkgname=telegram-cli
+version=20200106
+revision=1
+build_style=gnu-configure
+hostmakedepends="lua-devel libressl-devel libcrypto45"
+makedepends="libevent-devel libconfig-devel jansson-devel zlib-devel readline-devel"
+short_desc="Command-line interface for Telegram. Uses readline interface"
+maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/kenorb-contrib/tg"
+_tglversion=20190203
+distfiles="https://github.com/kenorb-contrib/tg/archive/${version}.tar.gz>tg-${version}.tar.gz https://github.com/kenorb-contrib/tgl/archive/${_tglversion}.tar.gz>tgl-${_tglversion}.tar.gz"
+checksum="824504804e8c0bb20943d765ba54feaacda7b2ec34735da0cfe5d5e61348d519 178e443938a89c9aa771fe7a25b36315840915bff8f6744ab298f36f88540a32"
+
+do_extract() {
+ srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tg-${version}.tar.gz -C $wrksrc --strip-components 1
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tgl-${_tglversion}.tar.gz -C $wrksrc/tgl --strip-components 1
+}
+
+do_install() {
+ cd ${wrksrc}
+ vbin bin/telegram-cli
+ vman debian/telegram-cli.8
+ vconf tg-server.pub server.pub
+}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (5 preceding siblings ...)
2020-02-01 1:16 ` voidlinux-github
@ 2020-02-01 1:44 ` voidlinux-github
2020-02-01 9:42 ` voidlinux-github
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: voidlinux-github @ 2020-02-01 1:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
There is an updated pull request by timmykill against master on the void-packages repository
https://github.com/timmykill/void-packages telegram-cli
https://github.com/void-linux/void-packages/pull/18693
New package: telegram-cli-20200106
A patch file from https://github.com/void-linux/void-packages/pull/18693.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-cli-18693.patch --]
[-- Type: text/x-diff, Size: 21248 bytes --]
From f62beb56ff1531a61dfa0db6ee2f836450cea049 Mon Sep 17 00:00:00 2001
From: Marco <marko99thebest@gmail.com>
Date: Fri, 31 Jan 2020 19:12:51 +0100
Subject: [PATCH] New package: telegram-cli-20200106
---
.../telegram-cli/patches/cross_comp_lua.patch | 450 ++++++++++++++++++
srcpkgs/telegram-cli/template | 27 ++
2 files changed, 477 insertions(+)
create mode 100644 srcpkgs/telegram-cli/patches/cross_comp_lua.patch
create mode 100644 srcpkgs/telegram-cli/template
diff --git a/srcpkgs/telegram-cli/patches/cross_comp_lua.patch b/srcpkgs/telegram-cli/patches/cross_comp_lua.patch
new file mode 100644
index 00000000000..eb1f4e5befc
--- /dev/null
+++ b/srcpkgs/telegram-cli/patches/cross_comp_lua.patch
@@ -0,0 +1,450 @@
+From c6e70b6a8c2a110d4172762d279f523764030d41 Mon Sep 17 00:00:00 2001
+From: Valentin <vk18496@gmail.com>
+Date: Thu, 17 Aug 2017 15:33:19 +0200
+Subject: [PATCH] Update ax_lua.m4
+
+---
+ ax_lua.m4 | 266 ++++++++++++++++++++++++++++++++----------------------
+ 1 file changed, 158 insertions(+), 108 deletions(-)
+
+diff --git a/ax_lua.m4 b/ax_lua.m4
+index d9f47734..59201671 100644
+--- ax_lua.m4
++++ b/ax_lua.m4
+@@ -1,5 +1,5 @@
+ # ===========================================================================
+-# http://www.gnu.org/software/autoconf-archive/ax_lua.html
++# https://www.gnu.org/software/autoconf-archive/ax_lua.html
+ # ===========================================================================
+ #
+ # SYNOPSIS
+@@ -18,8 +18,8 @@
+ # Also detect Lua headers and libraries. The Lua version contained in the
+ # header is checked to match the Lua interpreter version exactly. When
+ # searching for Lua libraries, the version number is used as a suffix.
+-# This is done with the goal of supporting multiple Lua installs (5.1 and
+-# 5.2 side-by-side).
++# This is done with the goal of supporting multiple Lua installs (5.1,
++# 5.2, and 5.3 side-by-side).
+ #
+ # A note on compatibility with previous versions: This file has been
+ # mostly rewritten for serial 18. Most developers should be able to use
+@@ -51,13 +51,10 @@
+ #
+ # If MINIMUM-VERSION is supplied, then only Lua interpreters with a
+ # version number greater or equal to MINIMUM-VERSION will be accepted. If
+-# TOO-BIG- VERSION is also supplied, then only Lua interpreters with a
++# TOO-BIG-VERSION is also supplied, then only Lua interpreters with a
+ # version number greater or equal to MINIMUM-VERSION and less than
+ # TOO-BIG-VERSION will be accepted.
+ #
+-# Version comparisons require the AX_COMPARE_VERSION macro, which is
+-# provided by ax_compare_version.m4 from the Autoconf Archive.
+-#
+ # The Lua version number, LUA_VERSION, is found from the interpreter, and
+ # substituted. LUA_PLATFORM is also found, but not currently supported (no
+ # standard representation).
+@@ -69,12 +66,13 @@
+ # luaexecdir Directory to install Lua modules.
+ # pkgluaexecdir $luaexecdir/$PACKAGE
+ #
+-# These paths a found based on $prefix, $exec_prefix, Lua's package.path,
+-# and package.cpath. The first path of package.path beginning with $prefix
+-# is selected as luadir. The first path of package.cpath beginning with
+-# $exec_prefix is used as luaexecdir. This should work on all reasonable
+-# Lua installations. If a path cannot be determined, a default path is
+-# used. Of course, the user can override these later when invoking make.
++# These paths are found based on $prefix, $exec_prefix, Lua's
++# package.path, and package.cpath. The first path of package.path
++# beginning with $prefix is selected as luadir. The first path of
++# package.cpath beginning with $exec_prefix is used as luaexecdir. This
++# should work on all reasonable Lua installations. If a path cannot be
++# determined, a default path is used. Of course, the user can override
++# these later when invoking make.
+ #
+ # luadir Default: $prefix/share/lua/$LUA_VERSION
+ # luaexecdir Default: $exec_prefix/lib/lua/$LUA_VERSION
+@@ -154,8 +152,8 @@
+ #
+ # LICENSE
+ #
+-# Copyright (c) 2013 Tim Perkins <tprk77@gmail.com>
+-# Copyright (c) 2013 Reuben Thomas <rrt@sc3d.org>
++# Copyright (c) 2015 Reuben Thomas <rrt@sc3d.org>
++# Copyright (c) 2014 Tim Perkins <tprk77@gmail.com>
+ #
+ # This program is free software: you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by the
+@@ -168,7 +166,7 @@
+ # Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License along
+-# with this program. If not, see <http://www.gnu.org/licenses/>.
++# with this program. If not, see <https://www.gnu.org/licenses/>.
+ #
+ # As a special exception, the respective Autoconf Macro's copyright owner
+ # gives unlimited permission to copy, distribute and modify the configure
+@@ -183,7 +181,7 @@
+ # modified version of the Autoconf Macro, you may extend this special
+ # exception to the GPL to apply to your modified version as well.
+
+-#serial 21
++#serial 40
+
+ dnl =========================================================================
+ dnl AX_PROG_LUA([MINIMUM-VERSION], [TOO-BIG-VERSION],
+@@ -191,12 +189,16 @@ dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+ dnl =========================================================================
+ AC_DEFUN([AX_PROG_LUA],
+ [
++ dnl Check for required tools.
++ AC_REQUIRE([AC_PROG_GREP])
++ AC_REQUIRE([AC_PROG_SED])
++
+ dnl Make LUA a precious variable.
+ AC_ARG_VAR([LUA], [The Lua interpreter, e.g. /usr/bin/lua5.1])
+
+ dnl Find a Lua interpreter.
+ m4_define_default([_AX_LUA_INTERPRETER_LIST],
+- [lua lua5.2 lua52 lua5.1 lua51 lua50])
++ [lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51 lua50])
+
+ m4_if([$1], [],
+ [ dnl No version check is needed. Find any Lua interpreter.
+@@ -204,12 +206,14 @@ AC_DEFUN([AX_PROG_LUA],
+ [AC_PATH_PROGS([LUA], [_AX_LUA_INTERPRETER_LIST], [:])])
+ ax_display_LUA='lua'
+
+- dnl At least check if this is a Lua interpreter.
+- AC_MSG_CHECKING([if $LUA is a Lua interpreter])
+- _AX_LUA_CHK_IS_INTRP([$LUA],
+- [AC_MSG_RESULT([yes])],
+- [ AC_MSG_RESULT([no])
+- AC_MSG_ERROR([not a Lua interpreter])
++ AS_IF([test "x$LUA" != 'x:'],
++ [ dnl At least check if this is a Lua interpreter.
++ AC_MSG_CHECKING([if $LUA is a Lua interpreter])
++ _AX_LUA_CHK_IS_INTRP([$LUA],
++ [AC_MSG_RESULT([yes])],
++ [ AC_MSG_RESULT([no])
++ AC_MSG_ERROR([not a Lua interpreter])
++ ])
+ ])
+ ],
+ [ dnl A version check is needed.
+@@ -257,21 +261,26 @@ AC_DEFUN([AX_PROG_LUA],
+ m4_default([$4], [AC_MSG_ERROR([cannot find suitable Lua interpreter])])
+ ],
+ [ dnl Query Lua for its version number.
+- AC_CACHE_CHECK([for $ax_display_LUA version], [ax_cv_lua_version],
+- [ ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
+- sed "s|^Lua \(.*\)|\1|" | \
+- grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
++ AC_CACHE_CHECK([for $ax_display_LUA version],
++ [ax_cv_lua_version],
++ [ dnl Get the interpreter version in X.Y format. This should work for
++ dnl interpreters version 5.0 and beyond.
++ ax_cv_lua_version=[`$LUA -e '
++ -- return a version number in X.Y format
++ local _, _, ver = string.find(_VERSION, "^Lua (%d+%.%d+)")
++ print(ver)'`]
+ ])
+ AS_IF([test "x$ax_cv_lua_version" = 'x'],
+ [AC_MSG_ERROR([invalid Lua version number])])
+ AC_SUBST([LUA_VERSION], [$ax_cv_lua_version])
+- AC_SUBST([LUA_SHORT_VERSION], [`echo "$LUA_VERSION" | sed 's|\.||'`])
++ AC_SUBST([LUA_SHORT_VERSION], [`echo "$LUA_VERSION" | $SED 's|\.||'`])
+
+ dnl The following check is not supported:
+ dnl At times (like when building shared libraries) you may want to know
+ dnl which OS platform Lua thinks this is.
+- AC_CACHE_CHECK([for $ax_display_LUA platform], [ax_cv_lua_platform],
+- [ax_cv_lua_platform=`$LUA -e "print('unknown')"`])
++ AC_CACHE_CHECK([for $ax_display_LUA platform],
++ [ax_cv_lua_platform],
++ [ax_cv_lua_platform=[`$LUA -e 'print("unknown")'`]])
+ AC_SUBST([LUA_PLATFORM], [$ax_cv_lua_platform])
+
+ dnl Use the values of $prefix and $exec_prefix for the corresponding
+@@ -296,12 +305,12 @@ AC_DEFUN([AX_PROG_LUA],
+ ax_cv_lua_luadir="$LUA_PREFIX/share/lua/$LUA_VERSION"
+
+ dnl Try to find a path with the prefix.
+- _AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [package.path])
++ _AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [script])
+ AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
+ [ dnl Fix the prefix.
+- _ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'`
++ _ax_strip_prefix=`echo "$ax_lua_prefix" | $SED 's|.|.|g'`
+ ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \
+- sed "s,^$_ax_strip_prefix,$LUA_PREFIX,"`
++ $SED "s|^$_ax_strip_prefix|$LUA_PREFIX|"`
+ ])
+ ])
+ AC_SUBST([luadir], [$ax_cv_lua_luadir])
+@@ -323,12 +332,12 @@ AC_DEFUN([AX_PROG_LUA],
+
+ dnl Try to find a path with the prefix.
+ _AX_LUA_FND_PRFX_PTH([$LUA],
+- [$ax_lua_exec_prefix], [package.cpathd])
++ [$ax_lua_exec_prefix], [module])
+ AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
+ [ dnl Fix the prefix.
+- _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | sed 's|.|.|g'`
++ _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | $SED 's|.|.|g'`
+ ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \
+- sed "s,^$_ax_strip_prefix,$LUA_EXEC_PREFIX,"`
++ $SED "s|^$_ax_strip_prefix|$LUA_EXEC_PREFIX|"`
+ ])
+ ])
+ AC_SUBST([luaexecdir], [$ax_cv_lua_luaexecdir])
+@@ -342,7 +351,7 @@ AC_DEFUN([AX_PROG_LUA],
+ dnl AX_WITH_LUA is now the same thing as AX_PROG_LUA.
+ AC_DEFUN([AX_WITH_LUA],
+ [
+- AC_MSG_WARN([[$0 is deprecated, please use AX_PROG_LUA]])
++ AC_MSG_WARN([[$0 is deprecated, please use AX_PROG_LUA instead]])
+ AX_PROG_LUA
+ ])
+
+@@ -352,8 +361,19 @@ dnl _AX_LUA_CHK_IS_INTRP(PROG, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+ dnl =========================================================================
+ AC_DEFUN([_AX_LUA_CHK_IS_INTRP],
+ [
+- dnl Just print _VERSION because all Lua interpreters have this global.
+- AS_IF([$1 -e "print('Hello ' .. _VERSION .. '!')" &>/dev/null],
++ dnl A minimal Lua factorial to prove this is an interpreter. This should work
++ dnl for Lua interpreters version 5.0 and beyond.
++ _ax_lua_factorial=[`$1 2>/dev/null -e '
++ -- a simple factorial
++ function fact (n)
++ if n == 0 then
++ return 1
++ else
++ return n * fact(n-1)
++ end
++ end
++ print("fact(5) is " .. fact(5))'`]
++ AS_IF([test "$_ax_lua_factorial" = 'fact(5) is 120'],
+ [$2], [$3])
+ ])
+
+@@ -364,48 +384,70 @@ dnl [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+ dnl =========================================================================
+ AC_DEFUN([_AX_LUA_CHK_VER],
+ [
+- _ax_test_ver=`$1 -e "print(_VERSION)" 2>/dev/null | \
+- sed "s|^Lua \(.*\)|\1|" | grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
+- AS_IF([test "x$_ax_test_ver" = 'x'],
+- [_ax_test_ver='0'])
+- AX_COMPARE_VERSION([$_ax_test_ver], [ge], [$2])
+- m4_if([$3], [], [],
+- [ AS_IF([$ax_compare_version],
+- [AX_COMPARE_VERSION([$_ax_test_ver], [lt], [$3])])
+- ])
+- AS_IF([$ax_compare_version], [$4], [$5])
++ dnl Check that the Lua version is within the bounds. Only the major and minor
++ dnl version numbers are considered. This should work for Lua interpreters
++ dnl version 5.0 and beyond.
++ _ax_lua_good_version=[`$1 -e '
++ -- a script to compare versions
++ function verstr2num(verstr)
++ local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)")
++ if majorver and minorver then
++ return tonumber(majorver) * 100 + tonumber(minorver)
++ end
++ end
++ local minver = verstr2num("$2")
++ local _, _, trimver = string.find(_VERSION, "^Lua (.*)")
++ local ver = verstr2num(trimver)
++ local maxver = verstr2num("$3") or 1e9
++ if minver <= ver and ver < maxver then
++ print("yes")
++ else
++ print("no")
++ end'`]
++ AS_IF([test "x$_ax_lua_good_version" = "xyes"],
++ [$4], [$5])
+ ])
+
+
+ dnl =========================================================================
+-dnl _AX_LUA_FND_PRFX_PTH(PROG, PREFIX, LUA-PATH-VARIABLE)
++dnl _AX_LUA_FND_PRFX_PTH(PROG, PREFIX, SCRIPT-OR-MODULE-DIR)
+ dnl =========================================================================
+ AC_DEFUN([_AX_LUA_FND_PRFX_PTH],
+ [
+- dnl Invokes the Lua interpreter PROG to print the path variable
+- dnl LUA-PATH-VARIABLE, usually package.path or package.cpath. Paths are
+- dnl then matched against PREFIX. The first path to begin with PREFIX is set
+- dnl to ax_lua_prefixed_path.
+-
+- ax_lua_prefixed_path=''
+- _ax_package_paths=`$1 -e 'print($3)' 2>/dev/null | sed 's|;|\n|g'`
+- dnl Try the paths in order, looking for the prefix.
+- for _ax_package_path in $_ax_package_paths; do
+- dnl Copy the path, up to the use of a Lua wildcard.
+- _ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'`
+- _ax_reassembled=''
+- for _ax_path_part in $_ax_path_parts; do
+- echo "$_ax_path_part" | grep '\?' >/dev/null && break
+- _ax_reassembled="$_ax_reassembled/$_ax_path_part"
+- done
+- dnl Check the path against the prefix.
+- _ax_package_path=$_ax_reassembled
+- if echo "$_ax_package_path" | grep "^$2" >/dev/null; then
+- dnl Found it.
+- ax_lua_prefixed_path=$_ax_package_path
+- break
+- fi
+- done
++ dnl Get the script or module directory by querying the Lua interpreter,
++ dnl filtering on the given prefix, and selecting the shallowest path. If no
++ dnl path is found matching the prefix, the result will be an empty string.
++ dnl The third argument determines the type of search, it can be 'script' or
++ dnl 'module'. Supplying 'script' will perform the search with package.path
++ dnl and LUA_PATH, and supplying 'module' will search with package.cpath and
++ dnl LUA_CPATH. This is done for compatibility with Lua 5.0.
++
++ ax_lua_prefixed_path=[`$1 -e '
++ -- get the path based on search type
++ local searchtype = "$3"
++ local paths = ""
++ if searchtype == "script" then
++ paths = (package and package.path) or LUA_PATH
++ elseif searchtype == "module" then
++ paths = (package and package.cpath) or LUA_CPATH
++ end
++ -- search for the prefix
++ local prefix = "'$2'"
++ local minpath = ""
++ local mindepth = 1e9
++ string.gsub(paths, "(@<:@^;@:>@+)",
++ function (path)
++ path = string.gsub(path, "%?.*$", "")
++ path = string.gsub(path, "/@<:@^/@:>@*$", "")
++ if string.find(path, prefix) then
++ local depth = string.len(string.gsub(path, "@<:@^/@:>@", ""))
++ if depth < mindepth then
++ minpath = path
++ mindepth = depth
++ end
++ end
++ end)
++ print(minpath)'`]
+ ])
+
+
+@@ -426,9 +468,10 @@ AC_DEFUN([AX_LUA_HEADERS],
+ AC_ARG_VAR([LUA_INCLUDE], [The Lua includes, e.g. -I/usr/include/lua5.1])
+
+ dnl Some default directories to search.
+- LUA_SHORT_VERSION=`echo "$LUA_VERSION" | sed 's|\.||'`
++ LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'`
+ m4_define_default([_AX_LUA_INCLUDE_LIST],
+ [ /usr/include/lua$LUA_VERSION \
++ /usr/include/lua-$LUA_VERSION \
+ /usr/include/lua/$LUA_VERSION \
+ /usr/include/lua$LUA_SHORT_VERSION \
+ /usr/local/include/lua$LUA_VERSION \
+@@ -472,14 +515,17 @@ AC_DEFUN([AX_LUA_HEADERS],
+
+ AS_IF([test "x$ac_cv_header_lua_h" = 'xyes'],
+ [ dnl Make a program to print LUA_VERSION defined in the header.
+- dnl TODO This probably shouldn't be a runtime test.
+-
+- AC_CACHE_CHECK([for Lua header version],
+- [ax_cv_lua_header_version],
+- [ _ax_lua_saved_cppflags=$CPPFLAGS
+- CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
+- AC_RUN_IFELSE(
+- [ AC_LANG_SOURCE([[
++ dnl TODO It would be really nice if we could do this without compiling a
++ dnl program, then it would work when cross compiling. But I'm not sure how
++ dnl to do this reliably. For now, assume versions match when cross compiling.
++
++ AS_IF([test "x$cross_compiling" != 'xyes'],
++ [ AC_CACHE_CHECK([for Lua header version],
++ [ax_cv_lua_header_version],
++ [ _ax_lua_saved_cppflags=$CPPFLAGS
++ CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
++ AC_RUN_IFELSE(
++ [ AC_LANG_SOURCE([[
+ #include <lua.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -489,23 +535,26 @@ int main(int argc, char ** argv)
+ exit(EXIT_SUCCESS);
+ }
+ ]])
++ ],
++ [ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
++ $SED -n "s|^Lua \(@<:@0-9@:>@\{1,\}\.@<:@0-9@:>@\{1,\}\).\{0,\}|\1|p"`
++ ],
++ [ax_cv_lua_header_version='unknown'])
++ CPPFLAGS=$_ax_lua_saved_cppflags
++ ])
++
++ dnl Compare this to the previously found LUA_VERSION.
++ AC_MSG_CHECKING([if Lua header version matches $LUA_VERSION])
++ AS_IF([test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"],
++ [ AC_MSG_RESULT([yes])
++ ax_header_version_match='yes'
+ ],
+- [ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
+- sed "s|^Lua \(.*\)|\1|" | \
+- grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
+- ],
+- [ax_cv_lua_header_version='unknown'])
+- CPPFLAGS=$_ax_lua_saved_cppflags
+- ])
+-
+- dnl Compare this to the previously found LUA_VERSION.
+- AC_MSG_CHECKING([if Lua header version matches $LUA_VERSION])
+- AS_IF([test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"],
+- [ AC_MSG_RESULT([yes])
+- ax_header_version_match='yes'
++ [ AC_MSG_RESULT([no])
++ ax_header_version_match='no'
++ ])
+ ],
+- [ AC_MSG_RESULT([no])
+- ax_header_version_match='no'
++ [ AC_MSG_WARN([cross compiling so assuming header version number matches])
++ ax_header_version_match='yes'
+ ])
+ ])
+
+@@ -522,7 +571,7 @@ int main(int argc, char ** argv)
+ dnl AX_LUA_HEADERS_VERSION no longer exists, use AX_LUA_HEADERS.
+ AC_DEFUN([AX_LUA_HEADERS_VERSION],
+ [
+- AC_MSG_WARN([[$0 is deprecated, please use AX_LUA_HEADERS]])
++ AC_MSG_WARN([[$0 is deprecated, please use AX_LUA_HEADERS instead]])
+ ])
+
+
+@@ -578,14 +627,15 @@ AC_DEFUN([AX_LUA_LIBS],
+ _ax_lua_saved_libs=$LIBS
+ LIBS="$LIBS $LUA_LIB"
+ AC_SEARCH_LIBS([lua_load],
+- [ lua$LUA_VERSION \
+- lua$LUA_SHORT_VERSION \
+- lua-$LUA_VERSION \
+- lua-$LUA_SHORT_VERSION \
+- lua],
+- [_ax_found_lua_libs='yes'],
+- [_ax_found_lua_libs='no'],
+- [$_ax_lua_extra_libs])
++ [ lua$LUA_VERSION \
++ lua$LUA_SHORT_VERSION \
++ lua-$LUA_VERSION \
++ lua-$LUA_SHORT_VERSION \
++ lua \
++ ],
++ [_ax_found_lua_libs='yes'],
++ [_ax_found_lua_libs='no'],
++ [$_ax_lua_extra_libs])
+ LIBS=$_ax_lua_saved_libs
+
+ AS_IF([test "x$ac_cv_search_lua_load" != 'xno' &&
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
new file mode 100644
index 00000000000..904a3cf1579
--- /dev/null
+++ b/srcpkgs/telegram-cli/template
@@ -0,0 +1,27 @@
+# Template file for 'telegram-cli'
+pkgname=telegram-cli
+version=20200106
+revision=1
+build_style=gnu-configure
+hostmakedepends="lua-devel libressl-devel libcrypto45"
+makedepends="libevent-devel libconfig-devel jansson-devel zlib-devel readline-devel"
+short_desc="Command-line interface for Telegram. Uses readline interface"
+maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/kenorb-contrib/tg"
+_tglversion=20190203
+distfiles="https://github.com/kenorb-contrib/tg/archive/${version}.tar.gz>tg-${version}.tar.gz https://github.com/kenorb-contrib/tgl/archive/${_tglversion}.tar.gz>tgl-${_tglversion}.tar.gz"
+checksum="824504804e8c0bb20943d765ba54feaacda7b2ec34735da0cfe5d5e61348d519 178e443938a89c9aa771fe7a25b36315840915bff8f6744ab298f36f88540a32"
+
+do_extract() {
+ srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tg-${version}.tar.gz -C $wrksrc --strip-components 1
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tgl-${_tglversion}.tar.gz -C $wrksrc/tgl --strip-components 1
+}
+
+do_install() {
+ cd ${wrksrc}
+ vbin bin/telegram-cli
+ vman debian/telegram-cli.8
+ vconf tg-server.pub server.pub
+}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (6 preceding siblings ...)
2020-02-01 1:44 ` voidlinux-github
@ 2020-02-01 9:42 ` voidlinux-github
2020-02-01 10:48 ` voidlinux-github
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: voidlinux-github @ 2020-02-01 9:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
There is an updated pull request by timmykill against master on the void-packages repository
https://github.com/timmykill/void-packages telegram-cli
https://github.com/void-linux/void-packages/pull/18693
New package: telegram-cli-20200106
A patch file from https://github.com/void-linux/void-packages/pull/18693.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-cli-18693.patch --]
[-- Type: text/x-diff, Size: 20485 bytes --]
From df1b2d06e8498502a22eacef49ecb7f150bfa3e3 Mon Sep 17 00:00:00 2001
From: Marco <marko99thebest@gmail.com>
Date: Fri, 31 Jan 2020 19:12:51 +0100
Subject: [PATCH] New package: telegram-cli-20200106
---
.../telegram-cli/patches/cross_comp_lua.patch | 439 ++++++++++++++++++
srcpkgs/telegram-cli/template | 27 ++
2 files changed, 466 insertions(+)
create mode 100644 srcpkgs/telegram-cli/patches/cross_comp_lua.patch
create mode 100644 srcpkgs/telegram-cli/template
diff --git a/srcpkgs/telegram-cli/patches/cross_comp_lua.patch b/srcpkgs/telegram-cli/patches/cross_comp_lua.patch
new file mode 100644
index 00000000000..cba44ebfedc
--- /dev/null
+++ b/srcpkgs/telegram-cli/patches/cross_comp_lua.patch
@@ -0,0 +1,439 @@
+--- ax_lua.m4 2020-01-06 11:43:44.000000000 +0100
++++ ax_lua.m4n 2020-02-01 10:43:11.238993656 +0100
+@@ -1,5 +1,5 @@
+ # ===========================================================================
+-# http://www.gnu.org/software/autoconf-archive/ax_lua.html
++# https://www.gnu.org/software/autoconf-archive/ax_lua.html
+ # ===========================================================================
+ #
+ # SYNOPSIS
+@@ -18,8 +18,8 @@
+ # Also detect Lua headers and libraries. The Lua version contained in the
+ # header is checked to match the Lua interpreter version exactly. When
+ # searching for Lua libraries, the version number is used as a suffix.
+-# This is done with the goal of supporting multiple Lua installs (5.1 and
+-# 5.2 side-by-side).
++# This is done with the goal of supporting multiple Lua installs (5.1,
++# 5.2, and 5.3 side-by-side).
+ #
+ # A note on compatibility with previous versions: This file has been
+ # mostly rewritten for serial 18. Most developers should be able to use
+@@ -51,13 +51,10 @@
+ #
+ # If MINIMUM-VERSION is supplied, then only Lua interpreters with a
+ # version number greater or equal to MINIMUM-VERSION will be accepted. If
+-# TOO-BIG- VERSION is also supplied, then only Lua interpreters with a
++# TOO-BIG-VERSION is also supplied, then only Lua interpreters with a
+ # version number greater or equal to MINIMUM-VERSION and less than
+ # TOO-BIG-VERSION will be accepted.
+ #
+-# Version comparisons require the AX_COMPARE_VERSION macro, which is
+-# provided by ax_compare_version.m4 from the Autoconf Archive.
+-#
+ # The Lua version number, LUA_VERSION, is found from the interpreter, and
+ # substituted. LUA_PLATFORM is also found, but not currently supported (no
+ # standard representation).
+@@ -69,12 +66,13 @@
+ # luaexecdir Directory to install Lua modules.
+ # pkgluaexecdir $luaexecdir/$PACKAGE
+ #
+-# These paths a found based on $prefix, $exec_prefix, Lua's package.path,
+-# and package.cpath. The first path of package.path beginning with $prefix
+-# is selected as luadir. The first path of package.cpath beginning with
+-# $exec_prefix is used as luaexecdir. This should work on all reasonable
+-# Lua installations. If a path cannot be determined, a default path is
+-# used. Of course, the user can override these later when invoking make.
++# These paths are found based on $prefix, $exec_prefix, Lua's
++# package.path, and package.cpath. The first path of package.path
++# beginning with $prefix is selected as luadir. The first path of
++# package.cpath beginning with $exec_prefix is used as luaexecdir. This
++# should work on all reasonable Lua installations. If a path cannot be
++# determined, a default path is used. Of course, the user can override
++# these later when invoking make.
+ #
+ # luadir Default: $prefix/share/lua/$LUA_VERSION
+ # luaexecdir Default: $exec_prefix/lib/lua/$LUA_VERSION
+@@ -154,8 +152,8 @@
+ #
+ # LICENSE
+ #
+-# Copyright (c) 2013 Tim Perkins <tprk77@gmail.com>
+-# Copyright (c) 2013 Reuben Thomas <rrt@sc3d.org>
++# Copyright (c) 2015 Reuben Thomas <rrt@sc3d.org>
++# Copyright (c) 2014 Tim Perkins <tprk77@gmail.com>
+ #
+ # This program is free software: you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by the
+@@ -168,7 +166,7 @@
+ # Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License along
+-# with this program. If not, see <http://www.gnu.org/licenses/>.
++# with this program. If not, see <https://www.gnu.org/licenses/>.
+ #
+ # As a special exception, the respective Autoconf Macro's copyright owner
+ # gives unlimited permission to copy, distribute and modify the configure
+@@ -183,7 +181,7 @@
+ # modified version of the Autoconf Macro, you may extend this special
+ # exception to the GPL to apply to your modified version as well.
+
+-#serial 21
++#serial 40
+
+ dnl =========================================================================
+ dnl AX_PROG_LUA([MINIMUM-VERSION], [TOO-BIG-VERSION],
+@@ -191,12 +189,16 @@
+ dnl =========================================================================
+ AC_DEFUN([AX_PROG_LUA],
+ [
++ dnl Check for required tools.
++ AC_REQUIRE([AC_PROG_GREP])
++ AC_REQUIRE([AC_PROG_SED])
++
+ dnl Make LUA a precious variable.
+ AC_ARG_VAR([LUA], [The Lua interpreter, e.g. /usr/bin/lua5.1])
+
+ dnl Find a Lua interpreter.
+ m4_define_default([_AX_LUA_INTERPRETER_LIST],
+- [lua lua5.2 lua52 lua5.1 lua51 lua50])
++ [lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51 lua50])
+
+ m4_if([$1], [],
+ [ dnl No version check is needed. Find any Lua interpreter.
+@@ -204,12 +206,14 @@
+ [AC_PATH_PROGS([LUA], [_AX_LUA_INTERPRETER_LIST], [:])])
+ ax_display_LUA='lua'
+
+- dnl At least check if this is a Lua interpreter.
+- AC_MSG_CHECKING([if $LUA is a Lua interpreter])
+- _AX_LUA_CHK_IS_INTRP([$LUA],
+- [AC_MSG_RESULT([yes])],
+- [ AC_MSG_RESULT([no])
+- AC_MSG_ERROR([not a Lua interpreter])
++ AS_IF([test "x$LUA" != 'x:'],
++ [ dnl At least check if this is a Lua interpreter.
++ AC_MSG_CHECKING([if $LUA is a Lua interpreter])
++ _AX_LUA_CHK_IS_INTRP([$LUA],
++ [AC_MSG_RESULT([yes])],
++ [ AC_MSG_RESULT([no])
++ AC_MSG_ERROR([not a Lua interpreter])
++ ])
+ ])
+ ],
+ [ dnl A version check is needed.
+@@ -257,21 +261,26 @@
+ m4_default([$4], [AC_MSG_ERROR([cannot find suitable Lua interpreter])])
+ ],
+ [ dnl Query Lua for its version number.
+- AC_CACHE_CHECK([for $ax_display_LUA version], [ax_cv_lua_version],
+- [ ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
+- sed "s|^Lua \(.*\)|\1|" | \
+- grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
++ AC_CACHE_CHECK([for $ax_display_LUA version],
++ [ax_cv_lua_version],
++ [ dnl Get the interpreter version in X.Y format. This should work for
++ dnl interpreters version 5.0 and beyond.
++ ax_cv_lua_version=[`$LUA -e '
++ -- return a version number in X.Y format
++ local _, _, ver = string.find(_VERSION, "^Lua (%d+%.%d+)")
++ print(ver)'`]
+ ])
+ AS_IF([test "x$ax_cv_lua_version" = 'x'],
+ [AC_MSG_ERROR([invalid Lua version number])])
+ AC_SUBST([LUA_VERSION], [$ax_cv_lua_version])
+- AC_SUBST([LUA_SHORT_VERSION], [`echo "$LUA_VERSION" | sed 's|\.||'`])
++ AC_SUBST([LUA_SHORT_VERSION], [`echo "$LUA_VERSION" | $SED 's|\.||'`])
+
+ dnl The following check is not supported:
+ dnl At times (like when building shared libraries) you may want to know
+ dnl which OS platform Lua thinks this is.
+- AC_CACHE_CHECK([for $ax_display_LUA platform], [ax_cv_lua_platform],
+- [ax_cv_lua_platform=`$LUA -e "print('unknown')"`])
++ AC_CACHE_CHECK([for $ax_display_LUA platform],
++ [ax_cv_lua_platform],
++ [ax_cv_lua_platform=[`$LUA -e 'print("unknown")'`]])
+ AC_SUBST([LUA_PLATFORM], [$ax_cv_lua_platform])
+
+ dnl Use the values of $prefix and $exec_prefix for the corresponding
+@@ -296,12 +305,12 @@
+ ax_cv_lua_luadir="$LUA_PREFIX/share/lua/$LUA_VERSION"
+
+ dnl Try to find a path with the prefix.
+- _AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [package.path])
++ _AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [script])
+ AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
+ [ dnl Fix the prefix.
+- _ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'`
++ _ax_strip_prefix=`echo "$ax_lua_prefix" | $SED 's|.|.|g'`
+ ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \
+- sed "s,^$_ax_strip_prefix,$LUA_PREFIX,"`
++ $SED "s|^$_ax_strip_prefix|$LUA_PREFIX|"`
+ ])
+ ])
+ AC_SUBST([luadir], [$ax_cv_lua_luadir])
+@@ -323,12 +332,12 @@
+
+ dnl Try to find a path with the prefix.
+ _AX_LUA_FND_PRFX_PTH([$LUA],
+- [$ax_lua_exec_prefix], [package.cpathd])
++ [$ax_lua_exec_prefix], [module])
+ AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
+ [ dnl Fix the prefix.
+- _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | sed 's|.|.|g'`
++ _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | $SED 's|.|.|g'`
+ ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \
+- sed "s,^$_ax_strip_prefix,$LUA_EXEC_PREFIX,"`
++ $SED "s|^$_ax_strip_prefix|$LUA_EXEC_PREFIX|"`
+ ])
+ ])
+ AC_SUBST([luaexecdir], [$ax_cv_lua_luaexecdir])
+@@ -342,7 +351,7 @@
+ dnl AX_WITH_LUA is now the same thing as AX_PROG_LUA.
+ AC_DEFUN([AX_WITH_LUA],
+ [
+- AC_MSG_WARN([[$0 is deprecated, please use AX_PROG_LUA]])
++ AC_MSG_WARN([[$0 is deprecated, please use AX_PROG_LUA instead]])
+ AX_PROG_LUA
+ ])
+
+@@ -352,8 +361,19 @@
+ dnl =========================================================================
+ AC_DEFUN([_AX_LUA_CHK_IS_INTRP],
+ [
+- dnl Just print _VERSION because all Lua interpreters have this global.
+- AS_IF([$1 -e "print('Hello ' .. _VERSION .. '!')" &>/dev/null],
++ dnl A minimal Lua factorial to prove this is an interpreter. This should work
++ dnl for Lua interpreters version 5.0 and beyond.
++ _ax_lua_factorial=[`$1 2>/dev/null -e '
++ -- a simple factorial
++ function fact (n)
++ if n == 0 then
++ return 1
++ else
++ return n * fact(n-1)
++ end
++ end
++ print("fact(5) is " .. fact(5))'`]
++ AS_IF([test "$_ax_lua_factorial" = 'fact(5) is 120'],
+ [$2], [$3])
+ ])
+
+@@ -364,48 +384,70 @@
+ dnl =========================================================================
+ AC_DEFUN([_AX_LUA_CHK_VER],
+ [
+- _ax_test_ver=`$1 -e "print(_VERSION)" 2>/dev/null | \
+- sed "s|^Lua \(.*\)|\1|" | grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
+- AS_IF([test "x$_ax_test_ver" = 'x'],
+- [_ax_test_ver='0'])
+- AX_COMPARE_VERSION([$_ax_test_ver], [ge], [$2])
+- m4_if([$3], [], [],
+- [ AS_IF([$ax_compare_version],
+- [AX_COMPARE_VERSION([$_ax_test_ver], [lt], [$3])])
+- ])
+- AS_IF([$ax_compare_version], [$4], [$5])
++ dnl Check that the Lua version is within the bounds. Only the major and minor
++ dnl version numbers are considered. This should work for Lua interpreters
++ dnl version 5.0 and beyond.
++ _ax_lua_good_version=[`$1 -e '
++ -- a script to compare versions
++ function verstr2num(verstr)
++ local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)")
++ if majorver and minorver then
++ return tonumber(majorver) * 100 + tonumber(minorver)
++ end
++ end
++ local minver = verstr2num("$2")
++ local _, _, trimver = string.find(_VERSION, "^Lua (.*)")
++ local ver = verstr2num(trimver)
++ local maxver = verstr2num("$3") or 1e9
++ if minver <= ver and ver < maxver then
++ print("yes")
++ else
++ print("no")
++ end'`]
++ AS_IF([test "x$_ax_lua_good_version" = "xyes"],
++ [$4], [$5])
+ ])
+
+
+ dnl =========================================================================
+-dnl _AX_LUA_FND_PRFX_PTH(PROG, PREFIX, LUA-PATH-VARIABLE)
++dnl _AX_LUA_FND_PRFX_PTH(PROG, PREFIX, SCRIPT-OR-MODULE-DIR)
+ dnl =========================================================================
+ AC_DEFUN([_AX_LUA_FND_PRFX_PTH],
+ [
+- dnl Invokes the Lua interpreter PROG to print the path variable
+- dnl LUA-PATH-VARIABLE, usually package.path or package.cpath. Paths are
+- dnl then matched against PREFIX. The first path to begin with PREFIX is set
+- dnl to ax_lua_prefixed_path.
+-
+- ax_lua_prefixed_path=''
+- _ax_package_paths=`$1 -e 'print($3)' 2>/dev/null | sed 's|;|\n|g'`
+- dnl Try the paths in order, looking for the prefix.
+- for _ax_package_path in $_ax_package_paths; do
+- dnl Copy the path, up to the use of a Lua wildcard.
+- _ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'`
+- _ax_reassembled=''
+- for _ax_path_part in $_ax_path_parts; do
+- echo "$_ax_path_part" | grep '\?' >/dev/null && break
+- _ax_reassembled="$_ax_reassembled/$_ax_path_part"
+- done
+- dnl Check the path against the prefix.
+- _ax_package_path=$_ax_reassembled
+- if echo "$_ax_package_path" | grep "^$2" >/dev/null; then
+- dnl Found it.
+- ax_lua_prefixed_path=$_ax_package_path
+- break
+- fi
+- done
++ dnl Get the script or module directory by querying the Lua interpreter,
++ dnl filtering on the given prefix, and selecting the shallowest path. If no
++ dnl path is found matching the prefix, the result will be an empty string.
++ dnl The third argument determines the type of search, it can be 'script' or
++ dnl 'module'. Supplying 'script' will perform the search with package.path
++ dnl and LUA_PATH, and supplying 'module' will search with package.cpath and
++ dnl LUA_CPATH. This is done for compatibility with Lua 5.0.
++
++ ax_lua_prefixed_path=[`$1 -e '
++ -- get the path based on search type
++ local searchtype = "$3"
++ local paths = ""
++ if searchtype == "script" then
++ paths = (package and package.path) or LUA_PATH
++ elseif searchtype == "module" then
++ paths = (package and package.cpath) or LUA_CPATH
++ end
++ -- search for the prefix
++ local prefix = "'$2'"
++ local minpath = ""
++ local mindepth = 1e9
++ string.gsub(paths, "(@<:@^;@:>@+)",
++ function (path)
++ path = string.gsub(path, "%?.*$", "")
++ path = string.gsub(path, "/@<:@^/@:>@*$", "")
++ if string.find(path, prefix) then
++ local depth = string.len(string.gsub(path, "@<:@^/@:>@", ""))
++ if depth < mindepth then
++ minpath = path
++ mindepth = depth
++ end
++ end
++ end)
++ print(minpath)'`]
+ ])
+
+
+@@ -426,9 +468,10 @@
+ AC_ARG_VAR([LUA_INCLUDE], [The Lua includes, e.g. -I/usr/include/lua5.1])
+
+ dnl Some default directories to search.
+- LUA_SHORT_VERSION=`echo "$LUA_VERSION" | sed 's|\.||'`
++ LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'`
+ m4_define_default([_AX_LUA_INCLUDE_LIST],
+ [ /usr/include/lua$LUA_VERSION \
++ /usr/include/lua-$LUA_VERSION \
+ /usr/include/lua/$LUA_VERSION \
+ /usr/include/lua$LUA_SHORT_VERSION \
+ /usr/local/include/lua$LUA_VERSION \
+@@ -472,14 +515,17 @@
+
+ AS_IF([test "x$ac_cv_header_lua_h" = 'xyes'],
+ [ dnl Make a program to print LUA_VERSION defined in the header.
+- dnl TODO This probably shouldn't be a runtime test.
+-
+- AC_CACHE_CHECK([for Lua header version],
+- [ax_cv_lua_header_version],
+- [ _ax_lua_saved_cppflags=$CPPFLAGS
+- CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
+- AC_RUN_IFELSE(
+- [ AC_LANG_SOURCE([[
++ dnl TODO It would be really nice if we could do this without compiling a
++ dnl program, then it would work when cross compiling. But I'm not sure how
++ dnl to do this reliably. For now, assume versions match when cross compiling.
++
++ AS_IF([test "x$cross_compiling" != 'xyes'],
++ [ AC_CACHE_CHECK([for Lua header version],
++ [ax_cv_lua_header_version],
++ [ _ax_lua_saved_cppflags=$CPPFLAGS
++ CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
++ AC_RUN_IFELSE(
++ [ AC_LANG_SOURCE([[
+ #include <lua.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -489,23 +535,26 @@
+ exit(EXIT_SUCCESS);
+ }
+ ]])
++ ],
++ [ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
++ $SED -n "s|^Lua \(@<:@0-9@:>@\{1,\}\.@<:@0-9@:>@\{1,\}\).\{0,\}|\1|p"`
++ ],
++ [ax_cv_lua_header_version='unknown'])
++ CPPFLAGS=$_ax_lua_saved_cppflags
++ ])
++
++ dnl Compare this to the previously found LUA_VERSION.
++ AC_MSG_CHECKING([if Lua header version matches $LUA_VERSION])
++ AS_IF([test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"],
++ [ AC_MSG_RESULT([yes])
++ ax_header_version_match='yes'
+ ],
+- [ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
+- sed "s|^Lua \(.*\)|\1|" | \
+- grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
+- ],
+- [ax_cv_lua_header_version='unknown'])
+- CPPFLAGS=$_ax_lua_saved_cppflags
+- ])
+-
+- dnl Compare this to the previously found LUA_VERSION.
+- AC_MSG_CHECKING([if Lua header version matches $LUA_VERSION])
+- AS_IF([test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"],
+- [ AC_MSG_RESULT([yes])
+- ax_header_version_match='yes'
++ [ AC_MSG_RESULT([no])
++ ax_header_version_match='no'
++ ])
+ ],
+- [ AC_MSG_RESULT([no])
+- ax_header_version_match='no'
++ [ AC_MSG_WARN([cross compiling so assuming header version number matches])
++ ax_header_version_match='yes'
+ ])
+ ])
+
+@@ -522,7 +571,7 @@
+ dnl AX_LUA_HEADERS_VERSION no longer exists, use AX_LUA_HEADERS.
+ AC_DEFUN([AX_LUA_HEADERS_VERSION],
+ [
+- AC_MSG_WARN([[$0 is deprecated, please use AX_LUA_HEADERS]])
++ AC_MSG_WARN([[$0 is deprecated, please use AX_LUA_HEADERS instead]])
+ ])
+
+
+@@ -578,14 +627,15 @@
+ _ax_lua_saved_libs=$LIBS
+ LIBS="$LIBS $LUA_LIB"
+ AC_SEARCH_LIBS([lua_load],
+- [ lua$LUA_VERSION \
+- lua$LUA_SHORT_VERSION \
+- lua-$LUA_VERSION \
+- lua-$LUA_SHORT_VERSION \
+- lua],
+- [_ax_found_lua_libs='yes'],
+- [_ax_found_lua_libs='no'],
+- [$_ax_lua_extra_libs])
++ [ lua$LUA_VERSION \
++ lua$LUA_SHORT_VERSION \
++ lua-$LUA_VERSION \
++ lua-$LUA_SHORT_VERSION \
++ lua \
++ ],
++ [_ax_found_lua_libs='yes'],
++ [_ax_found_lua_libs='no'],
++ [$_ax_lua_extra_libs])
+ LIBS=$_ax_lua_saved_libs
+
+ AS_IF([test "x$ac_cv_search_lua_load" != 'xno' &&
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
new file mode 100644
index 00000000000..904a3cf1579
--- /dev/null
+++ b/srcpkgs/telegram-cli/template
@@ -0,0 +1,27 @@
+# Template file for 'telegram-cli'
+pkgname=telegram-cli
+version=20200106
+revision=1
+build_style=gnu-configure
+hostmakedepends="lua-devel libressl-devel libcrypto45"
+makedepends="libevent-devel libconfig-devel jansson-devel zlib-devel readline-devel"
+short_desc="Command-line interface for Telegram. Uses readline interface"
+maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/kenorb-contrib/tg"
+_tglversion=20190203
+distfiles="https://github.com/kenorb-contrib/tg/archive/${version}.tar.gz>tg-${version}.tar.gz https://github.com/kenorb-contrib/tgl/archive/${_tglversion}.tar.gz>tgl-${_tglversion}.tar.gz"
+checksum="824504804e8c0bb20943d765ba54feaacda7b2ec34735da0cfe5d5e61348d519 178e443938a89c9aa771fe7a25b36315840915bff8f6744ab298f36f88540a32"
+
+do_extract() {
+ srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tg-${version}.tar.gz -C $wrksrc --strip-components 1
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tgl-${_tglversion}.tar.gz -C $wrksrc/tgl --strip-components 1
+}
+
+do_install() {
+ cd ${wrksrc}
+ vbin bin/telegram-cli
+ vman debian/telegram-cli.8
+ vconf tg-server.pub server.pub
+}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (7 preceding siblings ...)
2020-02-01 9:42 ` voidlinux-github
@ 2020-02-01 10:48 ` voidlinux-github
2020-08-09 0:16 ` Noah-Huppert
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: voidlinux-github @ 2020-02-01 10:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
There is an updated pull request by timmykill against master on the void-packages repository
https://github.com/timmykill/void-packages telegram-cli
https://github.com/void-linux/void-packages/pull/18693
New package: telegram-cli-20200106
A patch file from https://github.com/void-linux/void-packages/pull/18693.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-cli-18693.patch --]
[-- Type: text/x-diff, Size: 48518 bytes --]
From eda0e035cee6c38a348388449385310660655a73 Mon Sep 17 00:00:00 2001
From: Marco <marko99thebest@gmail.com>
Date: Fri, 31 Jan 2020 19:12:51 +0100
Subject: [PATCH] New package: telegram-cli-20200106
---
.../patches/cross_comp_conf.patch | 759 ++++++++++++++++++
.../telegram-cli/patches/cross_comp_lua.patch | 439 ++++++++++
srcpkgs/telegram-cli/template | 27 +
3 files changed, 1225 insertions(+)
create mode 100644 srcpkgs/telegram-cli/patches/cross_comp_conf.patch
create mode 100644 srcpkgs/telegram-cli/patches/cross_comp_lua.patch
create mode 100644 srcpkgs/telegram-cli/template
diff --git a/srcpkgs/telegram-cli/patches/cross_comp_conf.patch b/srcpkgs/telegram-cli/patches/cross_comp_conf.patch
new file mode 100644
index 00000000000..a0a002fb8cc
--- /dev/null
+++ b/srcpkgs/telegram-cli/patches/cross_comp_conf.patch
@@ -0,0 +1,759 @@
+--- configure 2020-01-06 11:43:44.000000000 +0100
++++ configure.new 2020-02-01 11:42:54.891996110 +0100
+@@ -640,6 +640,7 @@
+ LUA_SHORT_VERSION
+ LUA_VERSION
+ LUA
++SED
+ OPENSSL_LDFLAGS
+ OPENSSL_LIBS
+ OPENSSL_INCLUDES
+@@ -2196,7 +2197,7 @@
+
+
+ # ===========================================================================
+-# http://www.gnu.org/software/autoconf-archive/ax_lua.html
++# https://www.gnu.org/software/autoconf-archive/ax_lua.html
+ # ===========================================================================
+ #
+ # SYNOPSIS
+@@ -2215,8 +2216,8 @@
+ # Also detect Lua headers and libraries. The Lua version contained in the
+ # header is checked to match the Lua interpreter version exactly. When
+ # searching for Lua libraries, the version number is used as a suffix.
+-# This is done with the goal of supporting multiple Lua installs (5.1 and
+-# 5.2 side-by-side).
++# This is done with the goal of supporting multiple Lua installs (5.1,
++# 5.2, and 5.3 side-by-side).
+ #
+ # A note on compatibility with previous versions: This file has been
+ # mostly rewritten for serial 18. Most developers should be able to use
+@@ -2248,13 +2249,10 @@
+ #
+ # If MINIMUM-VERSION is supplied, then only Lua interpreters with a
+ # version number greater or equal to MINIMUM-VERSION will be accepted. If
+-# TOO-BIG- VERSION is also supplied, then only Lua interpreters with a
++# TOO-BIG-VERSION is also supplied, then only Lua interpreters with a
+ # version number greater or equal to MINIMUM-VERSION and less than
+ # TOO-BIG-VERSION will be accepted.
+ #
+-# Version comparisons require the AX_COMPARE_VERSION macro, which is
+-# provided by ax_compare_version.m4 from the Autoconf Archive.
+-#
+ # The Lua version number, LUA_VERSION, is found from the interpreter, and
+ # substituted. LUA_PLATFORM is also found, but not currently supported (no
+ # standard representation).
+@@ -2266,12 +2264,13 @@
+ # luaexecdir Directory to install Lua modules.
+ # pkgluaexecdir $luaexecdir/$PACKAGE
+ #
+-# These paths a found based on $prefix, $exec_prefix, Lua's package.path,
+-# and package.cpath. The first path of package.path beginning with $prefix
+-# is selected as luadir. The first path of package.cpath beginning with
+-# $exec_prefix is used as luaexecdir. This should work on all reasonable
+-# Lua installations. If a path cannot be determined, a default path is
+-# used. Of course, the user can override these later when invoking make.
++# These paths are found based on $prefix, $exec_prefix, Lua's
++# package.path, and package.cpath. The first path of package.path
++# beginning with $prefix is selected as luadir. The first path of
++# package.cpath beginning with $exec_prefix is used as luaexecdir. This
++# should work on all reasonable Lua installations. If a path cannot be
++# determined, a default path is used. Of course, the user can override
++# these later when invoking make.
+ #
+ # luadir Default: $prefix/share/lua/$LUA_VERSION
+ # luaexecdir Default: $exec_prefix/lib/lua/$LUA_VERSION
+@@ -2351,8 +2350,8 @@
+ #
+ # LICENSE
+ #
+-# Copyright (c) 2013 Tim Perkins <tprk77@gmail.com>
+-# Copyright (c) 2013 Reuben Thomas <rrt@sc3d.org>
++# Copyright (c) 2015 Reuben Thomas <rrt@sc3d.org>
++# Copyright (c) 2014 Tim Perkins <tprk77@gmail.com>
+ #
+ # This program is free software: you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by the
+@@ -2365,7 +2364,7 @@
+ # Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License along
+-# with this program. If not, see <http://www.gnu.org/licenses/>.
++# with this program. If not, see <https://www.gnu.org/licenses/>.
+ #
+ # As a special exception, the respective Autoconf Macro's copyright owner
+ # gives unlimited permission to copy, distribute and modify the configure
+@@ -2380,7 +2379,7 @@
+ # modified version of the Autoconf Macro, you may extend this special
+ # exception to the GPL to apply to your modified version as well.
+
+-#serial 21
++#serial 40
+
+
+
+@@ -4758,6 +4757,75 @@
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblua" >&5
+ $as_echo_n "checking for liblua... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
++$as_echo_n "checking for a sed that does not truncate output... " >&6; }
++if ${ac_cv_path_SED+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
++ for ac_i in 1 2 3 4 5 6 7; do
++ ac_script="$ac_script$as_nl$ac_script"
++ done
++ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
++ { ac_script=; unset ac_script;}
++ if test -z "$SED"; then
++ ac_path_SED_found=false
++ # Loop through the user's path and test for each of PROGNAME-LIST
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in sed gsed; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
++ as_fn_executable_p "$ac_path_SED" || continue
++# Check for GNU ac_path_SED and select it if it is found.
++ # Check for GNU $ac_path_SED
++case `"$ac_path_SED" --version 2>&1` in
++*GNU*)
++ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
++*)
++ ac_count=0
++ $as_echo_n 0123456789 >"conftest.in"
++ while :
++ do
++ cat "conftest.in" "conftest.in" >"conftest.tmp"
++ mv "conftest.tmp" "conftest.in"
++ cp "conftest.in" "conftest.nl"
++ $as_echo '' >> "conftest.nl"
++ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++ as_fn_arith $ac_count + 1 && ac_count=$as_val
++ if test $ac_count -gt ${ac_path_SED_max-0}; then
++ # Best one so far, save it but keep looking for a better one
++ ac_cv_path_SED="$ac_path_SED"
++ ac_path_SED_max=$ac_count
++ fi
++ # 10*(2^10) chars as input seems more than enough
++ test $ac_count -gt 10 && break
++ done
++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++ $ac_path_SED_found && break 3
++ done
++ done
++ done
++IFS=$as_save_IFS
++ if test -z "$ac_cv_path_SED"; then
++ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
++ fi
++else
++ ac_cv_path_SED=$SED
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
++$as_echo "$ac_cv_path_SED" >&6; }
++ SED="$ac_cv_path_SED"
++ rm -f conftest.sed
++
+ # Check whether --enable-liblua was given.
+ if test "${enable_liblua+set}" = set; then :
+ enableval=$enable_liblua;
+@@ -4772,8 +4840,11 @@
+
+
+
++
++
++
+ if test "x$LUA" = 'x'; then :
+- for ac_prog in lua lua5.2 lua52 lua5.1 lua51 lua50
++ for ac_prog in lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51 lua50
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+@@ -4822,20 +4893,33 @@
+ fi
+ ax_display_LUA='lua'
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LUA is a Lua interpreter" >&5
++ if test "x$LUA" != 'x:'; then :
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LUA is a Lua interpreter" >&5
+ $as_echo_n "checking if $LUA is a Lua interpreter... " >&6; }
+
+- if $LUA -e "print('Hello ' .. _VERSION .. '!')" &>/dev/null; then :
++ _ax_lua_factorial=`$LUA 2>/dev/null -e '
++ -- a simple factorial
++ function fact (n)
++ if n == 0 then
++ return 1
++ else
++ return n * fact(n-1)
++ end
++ end
++ print("fact(5) is " .. fact(5))'`
++ if test "$_ax_lua_factorial" = 'fact(5) is 120'; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+- as_fn_error $? "not a Lua interpreter" "$LINENO" 5
++ as_fn_error $? "not a Lua interpreter" "$LINENO" 5
+
+ fi
+
+
++fi
++
+
+ if test "x$LUA" = 'x:'; then :
+
+@@ -4848,9 +4932,10 @@
+ if ${ax_cv_lua_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+- ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
+- sed "s|^Lua \(.*\)|\1|" | \
+- grep -E -o "^[0-9]+\.[0-9]+"`
++ ax_cv_lua_version=`$LUA -e '
++ -- return a version number in X.Y format
++ local _, _, ver = string.find(_VERSION, "^Lua (%d+%.%d+)")
++ print(ver)'`
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_version" >&5
+@@ -4860,7 +4945,7 @@
+ fi
+ LUA_VERSION=$ax_cv_lua_version
+
+- LUA_SHORT_VERSION=`echo "$LUA_VERSION" | sed 's|\.||'`
++ LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'`
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA platform" >&5
+@@ -4868,7 +4953,7 @@
+ if ${ax_cv_lua_platform+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+- ax_cv_lua_platform=`$LUA -e "print('unknown')"`
++ ax_cv_lua_platform=`$LUA -e 'print("unknown")'`
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_platform" >&5
+ $as_echo "$ax_cv_lua_platform" >&6; }
+@@ -4895,26 +4980,37 @@
+
+
+
+- ax_lua_prefixed_path=''
+- _ax_package_paths=`$LUA -e 'print(package.path)' 2>/dev/null | sed 's|;|\n|g'`
+- for _ax_package_path in $_ax_package_paths; do
+- _ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'`
+- _ax_reassembled=''
+- for _ax_path_part in $_ax_path_parts; do
+- echo "$_ax_path_part" | grep '\?' >/dev/null && break
+- _ax_reassembled="$_ax_reassembled/$_ax_path_part"
+- done
+- _ax_package_path=$_ax_reassembled
+- if echo "$_ax_package_path" | grep "^$ax_lua_prefix" >/dev/null; then
+- ax_lua_prefixed_path=$_ax_package_path
+- break
+- fi
+- done
++ ax_lua_prefixed_path=`$LUA -e '
++ -- get the path based on search type
++ local searchtype = "script"
++ local paths = ""
++ if searchtype == "script" then
++ paths = (package and package.path) or LUA_PATH
++ elseif searchtype == "module" then
++ paths = (package and package.cpath) or LUA_CPATH
++ end
++ -- search for the prefix
++ local prefix = "'$ax_lua_prefix'"
++ local minpath = ""
++ local mindepth = 1e9
++ string.gsub(paths, "([^;]+)",
++ function (path)
++ path = string.gsub(path, "%?.*$", "")
++ path = string.gsub(path, "/[^/]*$", "")
++ if string.find(path, prefix) then
++ local depth = string.len(string.gsub(path, "[^/]", ""))
++ if depth < mindepth then
++ minpath = path
++ mindepth = depth
++ end
++ end
++ end)
++ print(minpath)'`
+
+ if test "x$ax_lua_prefixed_path" != 'x'; then :
+- _ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'`
++ _ax_strip_prefix=`echo "$ax_lua_prefix" | $SED 's|.|.|g'`
+ ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \
+- sed "s,^$_ax_strip_prefix,$LUA_PREFIX,"`
++ $SED "s|^$_ax_strip_prefix|$LUA_PREFIX|"`
+
+ fi
+
+@@ -4941,26 +5037,37 @@
+
+
+
+- ax_lua_prefixed_path=''
+- _ax_package_paths=`$LUA -e 'print(package.cpathd)' 2>/dev/null | sed 's|;|\n|g'`
+- for _ax_package_path in $_ax_package_paths; do
+- _ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'`
+- _ax_reassembled=''
+- for _ax_path_part in $_ax_path_parts; do
+- echo "$_ax_path_part" | grep '\?' >/dev/null && break
+- _ax_reassembled="$_ax_reassembled/$_ax_path_part"
+- done
+- _ax_package_path=$_ax_reassembled
+- if echo "$_ax_package_path" | grep "^$ax_lua_exec_prefix" >/dev/null; then
+- ax_lua_prefixed_path=$_ax_package_path
+- break
+- fi
+- done
++ ax_lua_prefixed_path=`$LUA -e '
++ -- get the path based on search type
++ local searchtype = "module"
++ local paths = ""
++ if searchtype == "script" then
++ paths = (package and package.path) or LUA_PATH
++ elseif searchtype == "module" then
++ paths = (package and package.cpath) or LUA_CPATH
++ end
++ -- search for the prefix
++ local prefix = "'$ax_lua_exec_prefix'"
++ local minpath = ""
++ local mindepth = 1e9
++ string.gsub(paths, "([^;]+)",
++ function (path)
++ path = string.gsub(path, "%?.*$", "")
++ path = string.gsub(path, "/[^/]*$", "")
++ if string.find(path, prefix) then
++ local depth = string.len(string.gsub(path, "[^/]", ""))
++ if depth < mindepth then
++ minpath = path
++ mindepth = depth
++ end
++ end
++ end)
++ print(minpath)'`
+
+ if test "x$ax_lua_prefixed_path" != 'x'; then :
+- _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | sed 's|.|.|g'`
++ _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | $SED 's|.|.|g'`
+ ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \
+- sed "s,^$_ax_strip_prefix,$LUA_EXEC_PREFIX,"`
++ $SED "s|^$_ax_strip_prefix|$LUA_EXEC_PREFIX|"`
+
+ fi
+
+@@ -4988,7 +5095,7 @@
+
+
+
+- LUA_SHORT_VERSION=`echo "$LUA_VERSION" | sed 's|\.||'`
++ LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'`
+
+
+ _ax_lua_saved_cppflags=$CPPFLAGS
+@@ -5011,6 +5118,7 @@
+ if test "x$LUA_INCLUDE" = 'x' &&
+ test "x$ac_cv_header_lua_h" != 'xyes'; then :
+ for _ax_include_path in /usr/include/lua$LUA_VERSION \
++ /usr/include/lua-$LUA_VERSION \
+ /usr/include/lua/$LUA_VERSION \
+ /usr/include/lua$LUA_SHORT_VERSION \
+ /usr/local/include/lua$LUA_VERSION \
+@@ -5058,14 +5166,15 @@
+
+ if test "x$ac_cv_header_lua_h" = 'xyes'; then :
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua header version" >&5
++ if test "x$cross_compiling" != 'xyes'; then :
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua header version" >&5
+ $as_echo_n "checking for Lua header version... " >&6; }
+ if ${ax_cv_lua_header_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ _ax_lua_saved_cppflags=$CPPFLAGS
+- CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
+- if test "$cross_compiling" = yes; then :
++ CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
++ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "cannot run test program while cross compiling
+@@ -5087,8 +5196,7 @@
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
+- sed "s|^Lua \(.*\)|\1|" | \
+- grep -E -o "^[0-9]+\.[0-9]+"`
++ $SED -n "s|^Lua \([0-9]\{1,\}\.[0-9]\{1,\}\).\{0,\}|\1|p"`
+
+ else
+ ax_cv_lua_header_version='unknown'
+@@ -5097,23 +5205,30 @@
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+
+- CPPFLAGS=$_ax_lua_saved_cppflags
++ CPPFLAGS=$_ax_lua_saved_cppflags
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_header_version" >&5
+ $as_echo "$ax_cv_lua_header_version" >&6; }
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Lua header version matches $LUA_VERSION" >&5
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Lua header version matches $LUA_VERSION" >&5
+ $as_echo_n "checking if Lua header version matches $LUA_VERSION... " >&6; }
+- if test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"; then :
++ if test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+- ax_header_version_match='yes'
++ ax_header_version_match='yes'
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+- ax_header_version_match='no'
++ ax_header_version_match='no'
++
++fi
++
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling so assuming header version number matches" >&5
++$as_echo "$as_me: WARNING: cross compiling so assuming header version number matches" >&2;}
++ ax_header_version_match='yes'
+
+ fi
+
+@@ -5369,10 +5484,11 @@
+ }
+ _ACEOF
+ for ac_lib in '' lua$LUA_VERSION \
+- lua$LUA_SHORT_VERSION \
+- lua-$LUA_VERSION \
+- lua-$LUA_SHORT_VERSION \
+- lua; do
++ lua$LUA_SHORT_VERSION \
++ lua-$LUA_VERSION \
++ lua-$LUA_SHORT_VERSION \
++ lua \
++ ; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+@@ -5441,8 +5557,11 @@
+
+
+
++
++
++
+ if test "x$LUA" = 'x'; then :
+- for ac_prog in lua lua5.2 lua52 lua5.1 lua51 lua50
++ for ac_prog in lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51 lua50
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+@@ -5491,20 +5610,33 @@
+ fi
+ ax_display_LUA='lua'
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LUA is a Lua interpreter" >&5
++ if test "x$LUA" != 'x:'; then :
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LUA is a Lua interpreter" >&5
+ $as_echo_n "checking if $LUA is a Lua interpreter... " >&6; }
+
+- if $LUA -e "print('Hello ' .. _VERSION .. '!')" &>/dev/null; then :
++ _ax_lua_factorial=`$LUA 2>/dev/null -e '
++ -- a simple factorial
++ function fact (n)
++ if n == 0 then
++ return 1
++ else
++ return n * fact(n-1)
++ end
++ end
++ print("fact(5) is " .. fact(5))'`
++ if test "$_ax_lua_factorial" = 'fact(5) is 120'; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+- as_fn_error $? "not a Lua interpreter" "$LINENO" 5
++ as_fn_error $? "not a Lua interpreter" "$LINENO" 5
+
+ fi
+
+
++fi
++
+
+ if test "x$LUA" = 'x:'; then :
+
+@@ -5517,9 +5649,10 @@
+ if ${ax_cv_lua_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+- ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
+- sed "s|^Lua \(.*\)|\1|" | \
+- grep -E -o "^[0-9]+\.[0-9]+"`
++ ax_cv_lua_version=`$LUA -e '
++ -- return a version number in X.Y format
++ local _, _, ver = string.find(_VERSION, "^Lua (%d+%.%d+)")
++ print(ver)'`
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_version" >&5
+@@ -5529,7 +5662,7 @@
+ fi
+ LUA_VERSION=$ax_cv_lua_version
+
+- LUA_SHORT_VERSION=`echo "$LUA_VERSION" | sed 's|\.||'`
++ LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'`
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA platform" >&5
+@@ -5537,7 +5670,7 @@
+ if ${ax_cv_lua_platform+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+- ax_cv_lua_platform=`$LUA -e "print('unknown')"`
++ ax_cv_lua_platform=`$LUA -e 'print("unknown")'`
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_platform" >&5
+ $as_echo "$ax_cv_lua_platform" >&6; }
+@@ -5564,26 +5697,37 @@
+
+
+
+- ax_lua_prefixed_path=''
+- _ax_package_paths=`$LUA -e 'print(package.path)' 2>/dev/null | sed 's|;|\n|g'`
+- for _ax_package_path in $_ax_package_paths; do
+- _ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'`
+- _ax_reassembled=''
+- for _ax_path_part in $_ax_path_parts; do
+- echo "$_ax_path_part" | grep '\?' >/dev/null && break
+- _ax_reassembled="$_ax_reassembled/$_ax_path_part"
+- done
+- _ax_package_path=$_ax_reassembled
+- if echo "$_ax_package_path" | grep "^$ax_lua_prefix" >/dev/null; then
+- ax_lua_prefixed_path=$_ax_package_path
+- break
+- fi
+- done
++ ax_lua_prefixed_path=`$LUA -e '
++ -- get the path based on search type
++ local searchtype = "script"
++ local paths = ""
++ if searchtype == "script" then
++ paths = (package and package.path) or LUA_PATH
++ elseif searchtype == "module" then
++ paths = (package and package.cpath) or LUA_CPATH
++ end
++ -- search for the prefix
++ local prefix = "'$ax_lua_prefix'"
++ local minpath = ""
++ local mindepth = 1e9
++ string.gsub(paths, "([^;]+)",
++ function (path)
++ path = string.gsub(path, "%?.*$", "")
++ path = string.gsub(path, "/[^/]*$", "")
++ if string.find(path, prefix) then
++ local depth = string.len(string.gsub(path, "[^/]", ""))
++ if depth < mindepth then
++ minpath = path
++ mindepth = depth
++ end
++ end
++ end)
++ print(minpath)'`
+
+ if test "x$ax_lua_prefixed_path" != 'x'; then :
+- _ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'`
++ _ax_strip_prefix=`echo "$ax_lua_prefix" | $SED 's|.|.|g'`
+ ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \
+- sed "s,^$_ax_strip_prefix,$LUA_PREFIX,"`
++ $SED "s|^$_ax_strip_prefix|$LUA_PREFIX|"`
+
+ fi
+
+@@ -5610,26 +5754,37 @@
+
+
+
+- ax_lua_prefixed_path=''
+- _ax_package_paths=`$LUA -e 'print(package.cpathd)' 2>/dev/null | sed 's|;|\n|g'`
+- for _ax_package_path in $_ax_package_paths; do
+- _ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'`
+- _ax_reassembled=''
+- for _ax_path_part in $_ax_path_parts; do
+- echo "$_ax_path_part" | grep '\?' >/dev/null && break
+- _ax_reassembled="$_ax_reassembled/$_ax_path_part"
+- done
+- _ax_package_path=$_ax_reassembled
+- if echo "$_ax_package_path" | grep "^$ax_lua_exec_prefix" >/dev/null; then
+- ax_lua_prefixed_path=$_ax_package_path
+- break
+- fi
+- done
++ ax_lua_prefixed_path=`$LUA -e '
++ -- get the path based on search type
++ local searchtype = "module"
++ local paths = ""
++ if searchtype == "script" then
++ paths = (package and package.path) or LUA_PATH
++ elseif searchtype == "module" then
++ paths = (package and package.cpath) or LUA_CPATH
++ end
++ -- search for the prefix
++ local prefix = "'$ax_lua_exec_prefix'"
++ local minpath = ""
++ local mindepth = 1e9
++ string.gsub(paths, "([^;]+)",
++ function (path)
++ path = string.gsub(path, "%?.*$", "")
++ path = string.gsub(path, "/[^/]*$", "")
++ if string.find(path, prefix) then
++ local depth = string.len(string.gsub(path, "[^/]", ""))
++ if depth < mindepth then
++ minpath = path
++ mindepth = depth
++ end
++ end
++ end)
++ print(minpath)'`
+
+ if test "x$ax_lua_prefixed_path" != 'x'; then :
+- _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | sed 's|.|.|g'`
++ _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | $SED 's|.|.|g'`
+ ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \
+- sed "s,^$_ax_strip_prefix,$LUA_EXEC_PREFIX,"`
++ $SED "s|^$_ax_strip_prefix|$LUA_EXEC_PREFIX|"`
+
+ fi
+
+@@ -5657,7 +5812,7 @@
+
+
+
+- LUA_SHORT_VERSION=`echo "$LUA_VERSION" | sed 's|\.||'`
++ LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'`
+
+
+ _ax_lua_saved_cppflags=$CPPFLAGS
+@@ -5680,6 +5835,7 @@
+ if test "x$LUA_INCLUDE" = 'x' &&
+ test "x$ac_cv_header_lua_h" != 'xyes'; then :
+ for _ax_include_path in /usr/include/lua$LUA_VERSION \
++ /usr/include/lua-$LUA_VERSION \
+ /usr/include/lua/$LUA_VERSION \
+ /usr/include/lua$LUA_SHORT_VERSION \
+ /usr/local/include/lua$LUA_VERSION \
+@@ -5727,14 +5883,15 @@
+
+ if test "x$ac_cv_header_lua_h" = 'xyes'; then :
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua header version" >&5
++ if test "x$cross_compiling" != 'xyes'; then :
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua header version" >&5
+ $as_echo_n "checking for Lua header version... " >&6; }
+ if ${ax_cv_lua_header_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ _ax_lua_saved_cppflags=$CPPFLAGS
+- CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
+- if test "$cross_compiling" = yes; then :
++ CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
++ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "cannot run test program while cross compiling
+@@ -5756,8 +5913,7 @@
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
+- sed "s|^Lua \(.*\)|\1|" | \
+- grep -E -o "^[0-9]+\.[0-9]+"`
++ $SED -n "s|^Lua \([0-9]\{1,\}\.[0-9]\{1,\}\).\{0,\}|\1|p"`
+
+ else
+ ax_cv_lua_header_version='unknown'
+@@ -5766,23 +5922,30 @@
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+
+- CPPFLAGS=$_ax_lua_saved_cppflags
++ CPPFLAGS=$_ax_lua_saved_cppflags
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_header_version" >&5
+ $as_echo "$ax_cv_lua_header_version" >&6; }
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Lua header version matches $LUA_VERSION" >&5
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Lua header version matches $LUA_VERSION" >&5
+ $as_echo_n "checking if Lua header version matches $LUA_VERSION... " >&6; }
+- if test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"; then :
++ if test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+- ax_header_version_match='yes'
++ ax_header_version_match='yes'
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+- ax_header_version_match='no'
++ ax_header_version_match='no'
++
++fi
++
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling so assuming header version number matches" >&5
++$as_echo "$as_me: WARNING: cross compiling so assuming header version number matches" >&2;}
++ ax_header_version_match='yes'
+
+ fi
+
+@@ -6038,10 +6201,11 @@
+ }
+ _ACEOF
+ for ac_lib in '' lua$LUA_VERSION \
+- lua$LUA_SHORT_VERSION \
+- lua-$LUA_VERSION \
+- lua-$LUA_SHORT_VERSION \
+- lua; do
++ lua$LUA_SHORT_VERSION \
++ lua-$LUA_VERSION \
++ lua-$LUA_SHORT_VERSION \
++ lua \
++ ; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+@@ -6108,7 +6272,7 @@
+ # Check whether --enable-python was given.
+ if test "${enable_python+set}" = set; then :
+ enableval=$enable_python;
+- if test "x$enableval" = "xno" ; then
++ if test "x$enableval" = "xyes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+ $as_echo "disabled" >&6; }
+ else
diff --git a/srcpkgs/telegram-cli/patches/cross_comp_lua.patch b/srcpkgs/telegram-cli/patches/cross_comp_lua.patch
new file mode 100644
index 00000000000..cba44ebfedc
--- /dev/null
+++ b/srcpkgs/telegram-cli/patches/cross_comp_lua.patch
@@ -0,0 +1,439 @@
+--- ax_lua.m4 2020-01-06 11:43:44.000000000 +0100
++++ ax_lua.m4n 2020-02-01 10:43:11.238993656 +0100
+@@ -1,5 +1,5 @@
+ # ===========================================================================
+-# http://www.gnu.org/software/autoconf-archive/ax_lua.html
++# https://www.gnu.org/software/autoconf-archive/ax_lua.html
+ # ===========================================================================
+ #
+ # SYNOPSIS
+@@ -18,8 +18,8 @@
+ # Also detect Lua headers and libraries. The Lua version contained in the
+ # header is checked to match the Lua interpreter version exactly. When
+ # searching for Lua libraries, the version number is used as a suffix.
+-# This is done with the goal of supporting multiple Lua installs (5.1 and
+-# 5.2 side-by-side).
++# This is done with the goal of supporting multiple Lua installs (5.1,
++# 5.2, and 5.3 side-by-side).
+ #
+ # A note on compatibility with previous versions: This file has been
+ # mostly rewritten for serial 18. Most developers should be able to use
+@@ -51,13 +51,10 @@
+ #
+ # If MINIMUM-VERSION is supplied, then only Lua interpreters with a
+ # version number greater or equal to MINIMUM-VERSION will be accepted. If
+-# TOO-BIG- VERSION is also supplied, then only Lua interpreters with a
++# TOO-BIG-VERSION is also supplied, then only Lua interpreters with a
+ # version number greater or equal to MINIMUM-VERSION and less than
+ # TOO-BIG-VERSION will be accepted.
+ #
+-# Version comparisons require the AX_COMPARE_VERSION macro, which is
+-# provided by ax_compare_version.m4 from the Autoconf Archive.
+-#
+ # The Lua version number, LUA_VERSION, is found from the interpreter, and
+ # substituted. LUA_PLATFORM is also found, but not currently supported (no
+ # standard representation).
+@@ -69,12 +66,13 @@
+ # luaexecdir Directory to install Lua modules.
+ # pkgluaexecdir $luaexecdir/$PACKAGE
+ #
+-# These paths a found based on $prefix, $exec_prefix, Lua's package.path,
+-# and package.cpath. The first path of package.path beginning with $prefix
+-# is selected as luadir. The first path of package.cpath beginning with
+-# $exec_prefix is used as luaexecdir. This should work on all reasonable
+-# Lua installations. If a path cannot be determined, a default path is
+-# used. Of course, the user can override these later when invoking make.
++# These paths are found based on $prefix, $exec_prefix, Lua's
++# package.path, and package.cpath. The first path of package.path
++# beginning with $prefix is selected as luadir. The first path of
++# package.cpath beginning with $exec_prefix is used as luaexecdir. This
++# should work on all reasonable Lua installations. If a path cannot be
++# determined, a default path is used. Of course, the user can override
++# these later when invoking make.
+ #
+ # luadir Default: $prefix/share/lua/$LUA_VERSION
+ # luaexecdir Default: $exec_prefix/lib/lua/$LUA_VERSION
+@@ -154,8 +152,8 @@
+ #
+ # LICENSE
+ #
+-# Copyright (c) 2013 Tim Perkins <tprk77@gmail.com>
+-# Copyright (c) 2013 Reuben Thomas <rrt@sc3d.org>
++# Copyright (c) 2015 Reuben Thomas <rrt@sc3d.org>
++# Copyright (c) 2014 Tim Perkins <tprk77@gmail.com>
+ #
+ # This program is free software: you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by the
+@@ -168,7 +166,7 @@
+ # Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License along
+-# with this program. If not, see <http://www.gnu.org/licenses/>.
++# with this program. If not, see <https://www.gnu.org/licenses/>.
+ #
+ # As a special exception, the respective Autoconf Macro's copyright owner
+ # gives unlimited permission to copy, distribute and modify the configure
+@@ -183,7 +181,7 @@
+ # modified version of the Autoconf Macro, you may extend this special
+ # exception to the GPL to apply to your modified version as well.
+
+-#serial 21
++#serial 40
+
+ dnl =========================================================================
+ dnl AX_PROG_LUA([MINIMUM-VERSION], [TOO-BIG-VERSION],
+@@ -191,12 +189,16 @@
+ dnl =========================================================================
+ AC_DEFUN([AX_PROG_LUA],
+ [
++ dnl Check for required tools.
++ AC_REQUIRE([AC_PROG_GREP])
++ AC_REQUIRE([AC_PROG_SED])
++
+ dnl Make LUA a precious variable.
+ AC_ARG_VAR([LUA], [The Lua interpreter, e.g. /usr/bin/lua5.1])
+
+ dnl Find a Lua interpreter.
+ m4_define_default([_AX_LUA_INTERPRETER_LIST],
+- [lua lua5.2 lua52 lua5.1 lua51 lua50])
++ [lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51 lua50])
+
+ m4_if([$1], [],
+ [ dnl No version check is needed. Find any Lua interpreter.
+@@ -204,12 +206,14 @@
+ [AC_PATH_PROGS([LUA], [_AX_LUA_INTERPRETER_LIST], [:])])
+ ax_display_LUA='lua'
+
+- dnl At least check if this is a Lua interpreter.
+- AC_MSG_CHECKING([if $LUA is a Lua interpreter])
+- _AX_LUA_CHK_IS_INTRP([$LUA],
+- [AC_MSG_RESULT([yes])],
+- [ AC_MSG_RESULT([no])
+- AC_MSG_ERROR([not a Lua interpreter])
++ AS_IF([test "x$LUA" != 'x:'],
++ [ dnl At least check if this is a Lua interpreter.
++ AC_MSG_CHECKING([if $LUA is a Lua interpreter])
++ _AX_LUA_CHK_IS_INTRP([$LUA],
++ [AC_MSG_RESULT([yes])],
++ [ AC_MSG_RESULT([no])
++ AC_MSG_ERROR([not a Lua interpreter])
++ ])
+ ])
+ ],
+ [ dnl A version check is needed.
+@@ -257,21 +261,26 @@
+ m4_default([$4], [AC_MSG_ERROR([cannot find suitable Lua interpreter])])
+ ],
+ [ dnl Query Lua for its version number.
+- AC_CACHE_CHECK([for $ax_display_LUA version], [ax_cv_lua_version],
+- [ ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
+- sed "s|^Lua \(.*\)|\1|" | \
+- grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
++ AC_CACHE_CHECK([for $ax_display_LUA version],
++ [ax_cv_lua_version],
++ [ dnl Get the interpreter version in X.Y format. This should work for
++ dnl interpreters version 5.0 and beyond.
++ ax_cv_lua_version=[`$LUA -e '
++ -- return a version number in X.Y format
++ local _, _, ver = string.find(_VERSION, "^Lua (%d+%.%d+)")
++ print(ver)'`]
+ ])
+ AS_IF([test "x$ax_cv_lua_version" = 'x'],
+ [AC_MSG_ERROR([invalid Lua version number])])
+ AC_SUBST([LUA_VERSION], [$ax_cv_lua_version])
+- AC_SUBST([LUA_SHORT_VERSION], [`echo "$LUA_VERSION" | sed 's|\.||'`])
++ AC_SUBST([LUA_SHORT_VERSION], [`echo "$LUA_VERSION" | $SED 's|\.||'`])
+
+ dnl The following check is not supported:
+ dnl At times (like when building shared libraries) you may want to know
+ dnl which OS platform Lua thinks this is.
+- AC_CACHE_CHECK([for $ax_display_LUA platform], [ax_cv_lua_platform],
+- [ax_cv_lua_platform=`$LUA -e "print('unknown')"`])
++ AC_CACHE_CHECK([for $ax_display_LUA platform],
++ [ax_cv_lua_platform],
++ [ax_cv_lua_platform=[`$LUA -e 'print("unknown")'`]])
+ AC_SUBST([LUA_PLATFORM], [$ax_cv_lua_platform])
+
+ dnl Use the values of $prefix and $exec_prefix for the corresponding
+@@ -296,12 +305,12 @@
+ ax_cv_lua_luadir="$LUA_PREFIX/share/lua/$LUA_VERSION"
+
+ dnl Try to find a path with the prefix.
+- _AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [package.path])
++ _AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [script])
+ AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
+ [ dnl Fix the prefix.
+- _ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'`
++ _ax_strip_prefix=`echo "$ax_lua_prefix" | $SED 's|.|.|g'`
+ ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \
+- sed "s,^$_ax_strip_prefix,$LUA_PREFIX,"`
++ $SED "s|^$_ax_strip_prefix|$LUA_PREFIX|"`
+ ])
+ ])
+ AC_SUBST([luadir], [$ax_cv_lua_luadir])
+@@ -323,12 +332,12 @@
+
+ dnl Try to find a path with the prefix.
+ _AX_LUA_FND_PRFX_PTH([$LUA],
+- [$ax_lua_exec_prefix], [package.cpathd])
++ [$ax_lua_exec_prefix], [module])
+ AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
+ [ dnl Fix the prefix.
+- _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | sed 's|.|.|g'`
++ _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | $SED 's|.|.|g'`
+ ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \
+- sed "s,^$_ax_strip_prefix,$LUA_EXEC_PREFIX,"`
++ $SED "s|^$_ax_strip_prefix|$LUA_EXEC_PREFIX|"`
+ ])
+ ])
+ AC_SUBST([luaexecdir], [$ax_cv_lua_luaexecdir])
+@@ -342,7 +351,7 @@
+ dnl AX_WITH_LUA is now the same thing as AX_PROG_LUA.
+ AC_DEFUN([AX_WITH_LUA],
+ [
+- AC_MSG_WARN([[$0 is deprecated, please use AX_PROG_LUA]])
++ AC_MSG_WARN([[$0 is deprecated, please use AX_PROG_LUA instead]])
+ AX_PROG_LUA
+ ])
+
+@@ -352,8 +361,19 @@
+ dnl =========================================================================
+ AC_DEFUN([_AX_LUA_CHK_IS_INTRP],
+ [
+- dnl Just print _VERSION because all Lua interpreters have this global.
+- AS_IF([$1 -e "print('Hello ' .. _VERSION .. '!')" &>/dev/null],
++ dnl A minimal Lua factorial to prove this is an interpreter. This should work
++ dnl for Lua interpreters version 5.0 and beyond.
++ _ax_lua_factorial=[`$1 2>/dev/null -e '
++ -- a simple factorial
++ function fact (n)
++ if n == 0 then
++ return 1
++ else
++ return n * fact(n-1)
++ end
++ end
++ print("fact(5) is " .. fact(5))'`]
++ AS_IF([test "$_ax_lua_factorial" = 'fact(5) is 120'],
+ [$2], [$3])
+ ])
+
+@@ -364,48 +384,70 @@
+ dnl =========================================================================
+ AC_DEFUN([_AX_LUA_CHK_VER],
+ [
+- _ax_test_ver=`$1 -e "print(_VERSION)" 2>/dev/null | \
+- sed "s|^Lua \(.*\)|\1|" | grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
+- AS_IF([test "x$_ax_test_ver" = 'x'],
+- [_ax_test_ver='0'])
+- AX_COMPARE_VERSION([$_ax_test_ver], [ge], [$2])
+- m4_if([$3], [], [],
+- [ AS_IF([$ax_compare_version],
+- [AX_COMPARE_VERSION([$_ax_test_ver], [lt], [$3])])
+- ])
+- AS_IF([$ax_compare_version], [$4], [$5])
++ dnl Check that the Lua version is within the bounds. Only the major and minor
++ dnl version numbers are considered. This should work for Lua interpreters
++ dnl version 5.0 and beyond.
++ _ax_lua_good_version=[`$1 -e '
++ -- a script to compare versions
++ function verstr2num(verstr)
++ local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)")
++ if majorver and minorver then
++ return tonumber(majorver) * 100 + tonumber(minorver)
++ end
++ end
++ local minver = verstr2num("$2")
++ local _, _, trimver = string.find(_VERSION, "^Lua (.*)")
++ local ver = verstr2num(trimver)
++ local maxver = verstr2num("$3") or 1e9
++ if minver <= ver and ver < maxver then
++ print("yes")
++ else
++ print("no")
++ end'`]
++ AS_IF([test "x$_ax_lua_good_version" = "xyes"],
++ [$4], [$5])
+ ])
+
+
+ dnl =========================================================================
+-dnl _AX_LUA_FND_PRFX_PTH(PROG, PREFIX, LUA-PATH-VARIABLE)
++dnl _AX_LUA_FND_PRFX_PTH(PROG, PREFIX, SCRIPT-OR-MODULE-DIR)
+ dnl =========================================================================
+ AC_DEFUN([_AX_LUA_FND_PRFX_PTH],
+ [
+- dnl Invokes the Lua interpreter PROG to print the path variable
+- dnl LUA-PATH-VARIABLE, usually package.path or package.cpath. Paths are
+- dnl then matched against PREFIX. The first path to begin with PREFIX is set
+- dnl to ax_lua_prefixed_path.
+-
+- ax_lua_prefixed_path=''
+- _ax_package_paths=`$1 -e 'print($3)' 2>/dev/null | sed 's|;|\n|g'`
+- dnl Try the paths in order, looking for the prefix.
+- for _ax_package_path in $_ax_package_paths; do
+- dnl Copy the path, up to the use of a Lua wildcard.
+- _ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'`
+- _ax_reassembled=''
+- for _ax_path_part in $_ax_path_parts; do
+- echo "$_ax_path_part" | grep '\?' >/dev/null && break
+- _ax_reassembled="$_ax_reassembled/$_ax_path_part"
+- done
+- dnl Check the path against the prefix.
+- _ax_package_path=$_ax_reassembled
+- if echo "$_ax_package_path" | grep "^$2" >/dev/null; then
+- dnl Found it.
+- ax_lua_prefixed_path=$_ax_package_path
+- break
+- fi
+- done
++ dnl Get the script or module directory by querying the Lua interpreter,
++ dnl filtering on the given prefix, and selecting the shallowest path. If no
++ dnl path is found matching the prefix, the result will be an empty string.
++ dnl The third argument determines the type of search, it can be 'script' or
++ dnl 'module'. Supplying 'script' will perform the search with package.path
++ dnl and LUA_PATH, and supplying 'module' will search with package.cpath and
++ dnl LUA_CPATH. This is done for compatibility with Lua 5.0.
++
++ ax_lua_prefixed_path=[`$1 -e '
++ -- get the path based on search type
++ local searchtype = "$3"
++ local paths = ""
++ if searchtype == "script" then
++ paths = (package and package.path) or LUA_PATH
++ elseif searchtype == "module" then
++ paths = (package and package.cpath) or LUA_CPATH
++ end
++ -- search for the prefix
++ local prefix = "'$2'"
++ local minpath = ""
++ local mindepth = 1e9
++ string.gsub(paths, "(@<:@^;@:>@+)",
++ function (path)
++ path = string.gsub(path, "%?.*$", "")
++ path = string.gsub(path, "/@<:@^/@:>@*$", "")
++ if string.find(path, prefix) then
++ local depth = string.len(string.gsub(path, "@<:@^/@:>@", ""))
++ if depth < mindepth then
++ minpath = path
++ mindepth = depth
++ end
++ end
++ end)
++ print(minpath)'`]
+ ])
+
+
+@@ -426,9 +468,10 @@
+ AC_ARG_VAR([LUA_INCLUDE], [The Lua includes, e.g. -I/usr/include/lua5.1])
+
+ dnl Some default directories to search.
+- LUA_SHORT_VERSION=`echo "$LUA_VERSION" | sed 's|\.||'`
++ LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'`
+ m4_define_default([_AX_LUA_INCLUDE_LIST],
+ [ /usr/include/lua$LUA_VERSION \
++ /usr/include/lua-$LUA_VERSION \
+ /usr/include/lua/$LUA_VERSION \
+ /usr/include/lua$LUA_SHORT_VERSION \
+ /usr/local/include/lua$LUA_VERSION \
+@@ -472,14 +515,17 @@
+
+ AS_IF([test "x$ac_cv_header_lua_h" = 'xyes'],
+ [ dnl Make a program to print LUA_VERSION defined in the header.
+- dnl TODO This probably shouldn't be a runtime test.
+-
+- AC_CACHE_CHECK([for Lua header version],
+- [ax_cv_lua_header_version],
+- [ _ax_lua_saved_cppflags=$CPPFLAGS
+- CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
+- AC_RUN_IFELSE(
+- [ AC_LANG_SOURCE([[
++ dnl TODO It would be really nice if we could do this without compiling a
++ dnl program, then it would work when cross compiling. But I'm not sure how
++ dnl to do this reliably. For now, assume versions match when cross compiling.
++
++ AS_IF([test "x$cross_compiling" != 'xyes'],
++ [ AC_CACHE_CHECK([for Lua header version],
++ [ax_cv_lua_header_version],
++ [ _ax_lua_saved_cppflags=$CPPFLAGS
++ CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
++ AC_RUN_IFELSE(
++ [ AC_LANG_SOURCE([[
+ #include <lua.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -489,23 +535,26 @@
+ exit(EXIT_SUCCESS);
+ }
+ ]])
++ ],
++ [ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
++ $SED -n "s|^Lua \(@<:@0-9@:>@\{1,\}\.@<:@0-9@:>@\{1,\}\).\{0,\}|\1|p"`
++ ],
++ [ax_cv_lua_header_version='unknown'])
++ CPPFLAGS=$_ax_lua_saved_cppflags
++ ])
++
++ dnl Compare this to the previously found LUA_VERSION.
++ AC_MSG_CHECKING([if Lua header version matches $LUA_VERSION])
++ AS_IF([test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"],
++ [ AC_MSG_RESULT([yes])
++ ax_header_version_match='yes'
+ ],
+- [ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
+- sed "s|^Lua \(.*\)|\1|" | \
+- grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
+- ],
+- [ax_cv_lua_header_version='unknown'])
+- CPPFLAGS=$_ax_lua_saved_cppflags
+- ])
+-
+- dnl Compare this to the previously found LUA_VERSION.
+- AC_MSG_CHECKING([if Lua header version matches $LUA_VERSION])
+- AS_IF([test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"],
+- [ AC_MSG_RESULT([yes])
+- ax_header_version_match='yes'
++ [ AC_MSG_RESULT([no])
++ ax_header_version_match='no'
++ ])
+ ],
+- [ AC_MSG_RESULT([no])
+- ax_header_version_match='no'
++ [ AC_MSG_WARN([cross compiling so assuming header version number matches])
++ ax_header_version_match='yes'
+ ])
+ ])
+
+@@ -522,7 +571,7 @@
+ dnl AX_LUA_HEADERS_VERSION no longer exists, use AX_LUA_HEADERS.
+ AC_DEFUN([AX_LUA_HEADERS_VERSION],
+ [
+- AC_MSG_WARN([[$0 is deprecated, please use AX_LUA_HEADERS]])
++ AC_MSG_WARN([[$0 is deprecated, please use AX_LUA_HEADERS instead]])
+ ])
+
+
+@@ -578,14 +627,15 @@
+ _ax_lua_saved_libs=$LIBS
+ LIBS="$LIBS $LUA_LIB"
+ AC_SEARCH_LIBS([lua_load],
+- [ lua$LUA_VERSION \
+- lua$LUA_SHORT_VERSION \
+- lua-$LUA_VERSION \
+- lua-$LUA_SHORT_VERSION \
+- lua],
+- [_ax_found_lua_libs='yes'],
+- [_ax_found_lua_libs='no'],
+- [$_ax_lua_extra_libs])
++ [ lua$LUA_VERSION \
++ lua$LUA_SHORT_VERSION \
++ lua-$LUA_VERSION \
++ lua-$LUA_SHORT_VERSION \
++ lua \
++ ],
++ [_ax_found_lua_libs='yes'],
++ [_ax_found_lua_libs='no'],
++ [$_ax_lua_extra_libs])
+ LIBS=$_ax_lua_saved_libs
+
+ AS_IF([test "x$ac_cv_search_lua_load" != 'xno' &&
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
new file mode 100644
index 00000000000..904a3cf1579
--- /dev/null
+++ b/srcpkgs/telegram-cli/template
@@ -0,0 +1,27 @@
+# Template file for 'telegram-cli'
+pkgname=telegram-cli
+version=20200106
+revision=1
+build_style=gnu-configure
+hostmakedepends="lua-devel libressl-devel libcrypto45"
+makedepends="libevent-devel libconfig-devel jansson-devel zlib-devel readline-devel"
+short_desc="Command-line interface for Telegram. Uses readline interface"
+maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/kenorb-contrib/tg"
+_tglversion=20190203
+distfiles="https://github.com/kenorb-contrib/tg/archive/${version}.tar.gz>tg-${version}.tar.gz https://github.com/kenorb-contrib/tgl/archive/${_tglversion}.tar.gz>tgl-${_tglversion}.tar.gz"
+checksum="824504804e8c0bb20943d765ba54feaacda7b2ec34735da0cfe5d5e61348d519 178e443938a89c9aa771fe7a25b36315840915bff8f6744ab298f36f88540a32"
+
+do_extract() {
+ srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tg-${version}.tar.gz -C $wrksrc --strip-components 1
+ tar -x --no-same-permissions --no-same-owner -f $srcdir/tgl-${_tglversion}.tar.gz -C $wrksrc/tgl --strip-components 1
+}
+
+do_install() {
+ cd ${wrksrc}
+ vbin bin/telegram-cli
+ vman debian/telegram-cli.8
+ vconf tg-server.pub server.pub
+}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (8 preceding siblings ...)
2020-02-01 10:48 ` voidlinux-github
@ 2020-08-09 0:16 ` Noah-Huppert
2020-08-09 0:20 ` Noah-Huppert
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Noah-Huppert @ 2020-08-09 0:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
New comment by Noah-Huppert on void-packages repository
https://github.com/void-linux/void-packages/pull/18693#issuecomment-670987748
Comment:
Built recently and I needed to add `tar` to the `hostmakedepends`: [`telegram-cli-fix-build.patch`](https://gist.github.com/Noah-Huppert/b40b93edb66ab1417ffa99f23c837319/raw/c663083aec6a25919f54cc869cb6d9c1adf9754f/telegram-cli-fix-build.patch)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (9 preceding siblings ...)
2020-08-09 0:16 ` Noah-Huppert
@ 2020-08-09 0:20 ` Noah-Huppert
2020-12-20 1:46 ` ericonr
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Noah-Huppert @ 2020-08-09 0:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]
New comment by Noah-Huppert on void-packages repository
https://github.com/void-linux/void-packages/pull/18693#issuecomment-670987748
Comment:
Built recently and I needed to add `tar` to the `hostmakedepends`: [`telegram-cli-fix-build.patch`](https://gist.github.com/Noah-Huppert/b40b93edb66ab1417ffa99f23c837319/raw/c663083aec6a25919f54cc869cb6d9c1adf9754f/telegram-cli-fix-build.patch)
```patch
diff --git a/srcpkgs/telegram-cli/template b/srcpkgs/telegram-cli/template
index 2c5ec94067..7a12a5bc08 100644
--- a/srcpkgs/telegram-cli/template
+++ b/srcpkgs/telegram-cli/template
@@ -3,7 +3,7 @@ pkgname=telegram-cli
version=20200106
revision=1
build_style=gnu-configure
-hostmakedepends="lua-devel libevent-devel jansson-devel zlib-devel libconfig-devel readline-devel libressl-devel libcrypto45"
+hostmakedepends="lua-devel libevent-devel jansson-devel zlib-devel libconfig-devel readline-devel libressl-devel libcrypto45 tar"
makedepends="lua-devel libevent-devel jansson-devel zlib-devel libconfig-devel readline-devel libressl-devel libcrypto45"
short_desc="Command-line interface for Telegram. Uses readline interface"
maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
```
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (10 preceding siblings ...)
2020-08-09 0:20 ` Noah-Huppert
@ 2020-12-20 1:46 ` ericonr
2020-12-20 1:46 ` [PR PATCH] [Closed]: " ericonr
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ericonr @ 2020-12-20 1:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/18693#issuecomment-748550878
Comment:
Having a specific `libcrypto` in `hostmakedepends` is very wrong. `libressl-devel` will pull the version it depends on by itself.
I'm closing this for inactivity, feel free to reopen :)
@jcgruenhage if you want to take over the PR, feel free as well.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Closed]: New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (11 preceding siblings ...)
2020-12-20 1:46 ` ericonr
@ 2020-12-20 1:46 ` ericonr
2020-12-21 1:27 ` jcgruenhage
2020-12-21 1:37 ` ericonr
14 siblings, 0 replies; 16+ messages in thread
From: ericonr @ 2020-12-20 1:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 168 bytes --]
There's a closed pull request on the void-packages repository
New package: telegram-cli-20200106
https://github.com/void-linux/void-packages/pull/18693
Description:
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (12 preceding siblings ...)
2020-12-20 1:46 ` [PR PATCH] [Closed]: " ericonr
@ 2020-12-21 1:27 ` jcgruenhage
2020-12-21 1:37 ` ericonr
14 siblings, 0 replies; 16+ messages in thread
From: jcgruenhage @ 2020-12-21 1:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
New comment by jcgruenhage on void-packages repository
https://github.com/void-linux/void-packages/pull/18693#issuecomment-748708938
Comment:
@ericonr you sure you meant me? Not sure what I got to do with this :D
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: New package: telegram-cli-20200106
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
` (13 preceding siblings ...)
2020-12-21 1:27 ` jcgruenhage
@ 2020-12-21 1:37 ` ericonr
14 siblings, 0 replies; 16+ messages in thread
From: ericonr @ 2020-12-21 1:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/18693#issuecomment-748710931
Comment:
oops, sorry! I meant @Noah-Huppert !
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2020-12-21 1:37 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-31 18:13 [PR PATCH] New package: telegram-cli-20200106 voidlinux-github
2020-02-01 0:04 ` [PR PATCH] [Updated] " voidlinux-github
2020-02-01 0:11 ` voidlinux-github
2020-02-01 0:22 ` voidlinux-github
2020-02-01 1:06 ` voidlinux-github
2020-02-01 1:08 ` voidlinux-github
2020-02-01 1:16 ` voidlinux-github
2020-02-01 1:44 ` voidlinux-github
2020-02-01 9:42 ` voidlinux-github
2020-02-01 10:48 ` voidlinux-github
2020-08-09 0:16 ` Noah-Huppert
2020-08-09 0:20 ` Noah-Huppert
2020-12-20 1:46 ` ericonr
2020-12-20 1:46 ` [PR PATCH] [Closed]: " ericonr
2020-12-21 1:27 ` jcgruenhage
2020-12-21 1:37 ` ericonr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).