Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile
@ 2020-04-03 17:08 sgn
  2020-04-05  0:30 ` Piraty
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: sgn @ 2020-04-03 17:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages deeping-terminal-fix-latest-vala-and-cross
https://github.com/void-linux/void-packages/pull/20610

Deeping terminal fix build with latest vala and cross compile + Expect cross compile


A patch file from https://github.com/void-linux/void-packages/pull/20610.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-deeping-terminal-fix-latest-vala-and-cross-20610.patch --]
[-- Type: text/x-diff, Size: 12122 bytes --]

From 2d5320beea6fdbfec6430a6cd71370128dc9c04a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 3 Apr 2020 23:01:46 +0700
Subject: [PATCH 1/3] expect: cross compile

---
 srcpkgs/expect/patches/0001-init-CC.patch     |  21 ++
 ...-cross-WNOHANG-requires-POSIX_SOURCE.patch |  41 ++++
 .../patches/0003-cross-wnohang-value.patch    |  56 +++++
 srcpkgs/expect/patches/0004-cross-misc.patch  | 195 ++++++++++++++++++
 srcpkgs/expect/template                       |   8 +-
 5 files changed, 320 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/expect/patches/0001-init-CC.patch
 create mode 100644 srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
 create mode 100644 srcpkgs/expect/patches/0003-cross-wnohang-value.patch
 create mode 100644 srcpkgs/expect/patches/0004-cross-misc.patch

diff --git a/srcpkgs/expect/patches/0001-init-CC.patch b/srcpkgs/expect/patches/0001-init-CC.patch
new file mode 100644
index 00000000000..1069798a0de
--- /dev/null
+++ b/srcpkgs/expect/patches/0001-init-CC.patch
@@ -0,0 +1,21 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git configure.in configure.in
+index aa6fd6e..ad8db32 100755
+--- configure.in
++++ configure.in
+@@ -9,6 +9,8 @@ TEA_INIT([3.9])
+ 
+ AC_CONFIG_AUX_DIR(tclconfig)
+ 
++AC_PROG_CC([cc gcc])
++
+ #--------------------------------------------------------------------
+ # Configure script for package 'Expect'.
+ # TEA compliant.
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch b/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
new file mode 100644
index 00000000000..b1fb36b53ae
--- /dev/null
+++ b/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
@@ -0,0 +1,41 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 16 +++++++---------
+ 1 file changed, 7 insertions(+), 9 deletions(-)
+
+diff --git configure.in configure.in
+index ad8db32..6570a07 100755
+--- configure.in
++++ configure.in
+@@ -469,21 +469,19 @@ memcpy(s1,s2,0);
+ # and if so that WNOHANG is not defined.  The only place I've
+ # seen this is ISC.
+ AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ #include <sys/wait.h>
+-main() {
+-#ifndef WNOHANG
+-	return 0;
+-#else
+-	return 1;
++]],[[
++#ifdef WNOHANG
++	#error WNOHANG
+ #endif
+-}],
++]])]
++,
+ 	AC_MSG_RESULT(yes)
+ 	AC_DEFINE(WNOHANG_REQUIRES_POSIX_SOURCE)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ AC_MSG_CHECKING([if any value exists for WNOHANG])
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0003-cross-wnohang-value.patch b/srcpkgs/expect/patches/0003-cross-wnohang-value.patch
new file mode 100644
index 00000000000..c735f2f5237
--- /dev/null
+++ b/srcpkgs/expect/patches/0003-cross-wnohang-value.patch
@@ -0,0 +1,56 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git configure.in configure.in
+index 6570a07..0e4c9d1 100755
+--- configure.in
++++ configure.in
+@@ -486,6 +486,25 @@ AC_LANG_PROGRAM([[
+ 
+ AC_MSG_CHECKING([if any value exists for WNOHANG])
+ rm -rf wnohang
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
++#include <sys/wait.h>
++]],[[
++#ifdef WNOHANG
++	int wnohang_value = WNOHANG;
++#else
++	#error no value
++#endif
++]])],
++	AC_MSG_RESULT(yes)
++,
++	AC_MSG_RESULT(no)
++	expect_cv_wnohang_value=1
++)
++
++AC_CACHE_CHECK([value of WNOHANG], [expect_cv_wnohang_value],
++[
++rm -rf wnohang
+ AC_TRY_RUN([
+ #include <stdio.h>
+ #include <sys/wait.h>
+@@ -500,14 +519,15 @@ main() {
+ #endif
+ }],
+ 	AC_MSG_RESULT(yes)
+-	AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, `cat wnohang`)
+ 	rm -f wnohang
+ ,
+ 	AC_MSG_RESULT(no)
+-	AC_DEFINE(WNOHANG_BACKUP_VALUE, 1)
+ ,
+ 	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
++])
++
++AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, $expect_cv_wnohang_value)
+ 
+ #
+ # check how signals work
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0004-cross-misc.patch b/srcpkgs/expect/patches/0004-cross-misc.patch
new file mode 100644
index 00000000000..f0e08bdc7e3
--- /dev/null
+++ b/srcpkgs/expect/patches/0004-cross-misc.patch
@@ -0,0 +1,195 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 79 +++++++++++++++++++++-------------------------------
+ 1 file changed, 32 insertions(+), 47 deletions(-)
+
+diff --git configure.in configure.in
+index 0e4c9d1..d41a7a4 100755
+--- configure.in
++++ configure.in
+@@ -732,20 +732,17 @@ fi
+ 
+ # first check for the pure bsd
+ AC_MSG_CHECKING([for struct sgttyb])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ #include <sgtty.h>
+-main()
+-{
++]],[[
+   struct sgttyb tmp;
+-  exit(0);
+-}],
++]])],
+         AC_MSG_RESULT(yes)
+         AC_DEFINE(HAVE_SGTTYB)
+         PTY_TYPE=sgttyb
+ ,
+         AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ # mach systems have include files for unimplemented features
+@@ -757,107 +754,99 @@ if test $mach -eq 0 ; then
+   # since that just controls which of pty_XXXX.c file is use and
+   # pty_termios.c is set up to handle pty_termio.
+   AC_MSG_CHECKING([for struct termio])
+-  AC_TRY_RUN([#include <termio.h>
+-  main()
+-  {
++  AC_COMPILE_IFELSE([
++  AC_LANG_PROGRAM([[
++  #include <termio.h>
++  ]],[[
+     struct termio tmp;
+-    exit(0);
+-  }],
++  ]])],
+         AC_DEFINE(HAVE_TERMIO)
+         PTY_TYPE=termios
+         AC_MSG_RESULT(yes)
+ ,
+         AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+   # now check for the new style ttys (not yet posix)
+   AC_MSG_CHECKING([for struct termios])
+-  AC_TRY_RUN([
++  AC_COMPILE_IFELSE([
++  AC_LANG_PROGRAM([[
+   /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #  ifdef HAVE_INTTYPES_H
+ #  include <inttypes.h>
+ #  endif
+ #  include <termios.h>
+-  main()
+-  {
++  ]],[[
+     struct termios tmp;
+-    exit(0);
+-  }],
++  ]])],
+         AC_DEFINE(HAVE_TERMIOS)
+         PTY_TYPE=termios
+         AC_MSG_RESULT(yes)
+   ,
+         AC_MSG_RESULT(no)
+-  ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+   )
+ fi
+ 
+ AC_MSG_CHECKING([if TCGETS or TCGETA in termios.h])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+ #include <termios.h>
+-main() {
++]],[[
+ #if defined(TCGETS) || defined(TCGETA)
+ 	return 0;
+ #else
+-	return 1;
++	#error no TCGETS or TCGETA
+ #endif
+-}],
++]])],
+ 	AC_DEFINE(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H)
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ AC_MSG_CHECKING([if TIOCGWINSZ in termios.h])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+ #include <termios.h>
+-main() {
++]],[[
+ #ifdef TIOCGWINSZ
+ 	return 0;
+ #else
+-	return 1;
++	#error no TIOCGWINSZ
+ #endif
+-}],
++]])],
+ 	AC_DEFINE(HAVE_TIOCGWINSZ_IN_TERMIOS_H)
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ # finally check for Cray style ttys
+ AC_MSG_CHECKING([for Cray-style ptys])
+ SETUID=":"
+-AC_TRY_RUN([
+-main(){
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
++]],[[
+ #ifdef CRAY
+ 	return 0;
+ #else
+-	return 1;
++	#error no CRAY
+ #endif
+-}
++]])
+ ],
+ 	PTY_TYPE=unicos
+ 	SETUID="chmod u+s"
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ #
+@@ -895,21 +884,17 @@ AC_FUNC_SETPGRP
+ # check for timezones
+ #
+ AC_MSG_CHECKING([for SV-style timezone])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ extern char *tzname[2];
+ extern int daylight;
+-main()
+-{
++]],[[
+   int *x = &daylight;
+   char **y = tzname;
+-
+-  exit(0);
+-}],
++]])],
+ 	AC_DEFINE(HAVE_SV_TIMEZONE)
+ 	AC_MSG_RESULT(yes),
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ 
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/template b/srcpkgs/expect/template
index 66936f261e7..664f91cdb40 100644
--- a/srcpkgs/expect/template
+++ b/srcpkgs/expect/template
@@ -4,7 +4,9 @@ version=5.45.4
 revision=2
 wrksrc=${pkgname}${version}
 build_style=gnu-configure
+configure_args="expect_cv_wnohang_value=1"
 make_check_target="test"
+hostmakedepends="automake libtool tcl-devel"
 makedepends="tcl-devel"
 short_desc="Programmed dialogue with interactive programs"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
@@ -12,7 +14,6 @@ license="Public Domain"
 homepage="http://www.nist.gov/el/msid/expect.cfm"
 distfiles="${SOURCEFORGE_SITE}/${pkgname}/Expect/${version}/${pkgname}${version}.tar.gz"
 checksum=49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34
-nocross=yes
 
 alternatives="
  mkpasswd:mkpasswd:/usr/bin/expect-mkpasswd
@@ -20,11 +21,16 @@ alternatives="
 
 LDFLAGS+=" -Wl,-rpath=/usr/lib:/usr/lib/${pkgname}${version}"
 
+pre_configure() {
+	autoreconf -fi
+}
+
 post_install() {
 	rm ${DESTDIR}/usr/bin/weather
 	mv ${DESTDIR}/usr/bin/{,expect-}mkpasswd
 	mv ${DESTDIR}/usr/share/man/man1/{,expect-}mkpasswd.1
 }
+
 expect-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" -- development files"

From 8c4b55f9a7fe3fa3546a06099fab98c9f7c70d20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 3 Apr 2020 23:59:35 +0700
Subject: [PATCH 2/3] deepin-terminal: fix build with latest vala

---
 srcpkgs/deepin-terminal/template | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/deepin-terminal/template b/srcpkgs/deepin-terminal/template
index e1dc0494ddc..57feb0bd3f8 100644
--- a/srcpkgs/deepin-terminal/template
+++ b/srcpkgs/deepin-terminal/template
@@ -1,7 +1,7 @@
 # Template file for 'deepin-terminal'
 pkgname=deepin-terminal
 version=5.0.0
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DTEST_BUILD=OFF -DUSE_VENDOR_LIB=OFF"
 hostmakedepends="glib-devel gobject-introspection gperf intltool pkg-config
@@ -21,3 +21,12 @@ nocross=yes
 case $XBPS_TARGET_MACHINE in
 	*-musl) CFLAGS="-DREG_NOERROR=REG_OK"
 esac
+
+post_patch() {
+	# latest vala string#to_utf8() return char[]
+	# but term.feed_child expects "unowned uint8[]"
+	vsed -i 's/[.]to_utf8()/.data/g' \
+		widget/command_panel.vala \
+		widget/terminal.vala \
+		widget/workspace.vala
+}

From 3ea49b0f30ab8f1a4c8f61c58630eff8ac5cbb03 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Sat, 4 Apr 2020 00:07:41 +0700
Subject: [PATCH 3/3] deeping-terminal: fix cross-compile

---
 srcpkgs/deepin-terminal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/deepin-terminal/template b/srcpkgs/deepin-terminal/template
index 57feb0bd3f8..ac614fcfc2b 100644
--- a/srcpkgs/deepin-terminal/template
+++ b/srcpkgs/deepin-terminal/template
@@ -3,6 +3,7 @@ pkgname=deepin-terminal
 version=5.0.0
 revision=2
 build_style=cmake
+build_helper="gir"
 configure_args="-DTEST_BUILD=OFF -DUSE_VENDOR_LIB=OFF"
 hostmakedepends="glib-devel gobject-introspection gperf intltool pkg-config
  vala"
@@ -16,7 +17,6 @@ homepage="https://github.com/linuxdeepin/deepin-terminal"
 changelog="https://github.com/linuxdeepin/deepin-terminal/blob/master/CHANGELOG.md"
 distfiles="https://github.com/linuxdeepin/deepin-terminal/archive/${version}.tar.gz"
 checksum=fc0586a48f85a8151602c205004118429f22c504cd25881eecfd553849fe35f2
-nocross=yes
 
 case $XBPS_TARGET_MACHINE in
 	*-musl) CFLAGS="-DREG_NOERROR=REG_OK"

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Deeping terminal fix build with latest vala and cross compile + Expect cross compile
  2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
@ 2020-04-05  0:30 ` Piraty
  2020-04-05  0:53 ` sgn
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Piraty @ 2020-04-05  0:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

New comment by Piraty on void-packages repository

https://github.com/void-linux/void-packages/pull/20610#issuecomment-609109333

Comment:
since expect is handled in #20605, why have this commit in this branch as well?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Deeping terminal fix build with latest vala and cross compile + Expect cross compile
  2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
  2020-04-05  0:30 ` Piraty
@ 2020-04-05  0:53 ` sgn
  2020-04-05  0:57 ` [PR PATCH] [Updated] " sgn
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-04-05  0:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/20610#issuecomment-609111201

Comment:
> since expect is handled in #20605, why have this commit in this branch as well?

Ah, It was there to be able to cross-compile in CI,
IOW, this one is depended on #20605 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] Deeping terminal fix build with latest vala and cross compile + Expect cross compile
  2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
  2020-04-05  0:30 ` Piraty
  2020-04-05  0:53 ` sgn
@ 2020-04-05  0:57 ` sgn
  2020-04-05  1:08 ` sgn
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-04-05  0:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages deeping-terminal-fix-latest-vala-and-cross
https://github.com/void-linux/void-packages/pull/20610

Deeping terminal fix build with latest vala and cross compile + Expect cross compile


A patch file from https://github.com/void-linux/void-packages/pull/20610.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-deeping-terminal-fix-latest-vala-and-cross-20610.patch --]
[-- Type: text/x-diff, Size: 12122 bytes --]

From 053682d5b62721ccfaac30e2c005ac9a2edf354b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 3 Apr 2020 23:01:46 +0700
Subject: [PATCH 1/3] expect: cross compile

---
 srcpkgs/expect/patches/0001-init-CC.patch     |  21 ++
 ...-cross-WNOHANG-requires-POSIX_SOURCE.patch |  41 ++++
 .../patches/0003-cross-wnohang-value.patch    |  56 +++++
 srcpkgs/expect/patches/0004-cross-misc.patch  | 195 ++++++++++++++++++
 srcpkgs/expect/template                       |   8 +-
 5 files changed, 320 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/expect/patches/0001-init-CC.patch
 create mode 100644 srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
 create mode 100644 srcpkgs/expect/patches/0003-cross-wnohang-value.patch
 create mode 100644 srcpkgs/expect/patches/0004-cross-misc.patch

diff --git a/srcpkgs/expect/patches/0001-init-CC.patch b/srcpkgs/expect/patches/0001-init-CC.patch
new file mode 100644
index 00000000000..1069798a0de
--- /dev/null
+++ b/srcpkgs/expect/patches/0001-init-CC.patch
@@ -0,0 +1,21 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git configure.in configure.in
+index aa6fd6e..ad8db32 100755
+--- configure.in
++++ configure.in
+@@ -9,6 +9,8 @@ TEA_INIT([3.9])
+ 
+ AC_CONFIG_AUX_DIR(tclconfig)
+ 
++AC_PROG_CC([cc gcc])
++
+ #--------------------------------------------------------------------
+ # Configure script for package 'Expect'.
+ # TEA compliant.
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch b/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
new file mode 100644
index 00000000000..b1fb36b53ae
--- /dev/null
+++ b/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
@@ -0,0 +1,41 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 16 +++++++---------
+ 1 file changed, 7 insertions(+), 9 deletions(-)
+
+diff --git configure.in configure.in
+index ad8db32..6570a07 100755
+--- configure.in
++++ configure.in
+@@ -469,21 +469,19 @@ memcpy(s1,s2,0);
+ # and if so that WNOHANG is not defined.  The only place I've
+ # seen this is ISC.
+ AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ #include <sys/wait.h>
+-main() {
+-#ifndef WNOHANG
+-	return 0;
+-#else
+-	return 1;
++]],[[
++#ifdef WNOHANG
++	#error WNOHANG
+ #endif
+-}],
++]])]
++,
+ 	AC_MSG_RESULT(yes)
+ 	AC_DEFINE(WNOHANG_REQUIRES_POSIX_SOURCE)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ AC_MSG_CHECKING([if any value exists for WNOHANG])
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0003-cross-wnohang-value.patch b/srcpkgs/expect/patches/0003-cross-wnohang-value.patch
new file mode 100644
index 00000000000..c735f2f5237
--- /dev/null
+++ b/srcpkgs/expect/patches/0003-cross-wnohang-value.patch
@@ -0,0 +1,56 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git configure.in configure.in
+index 6570a07..0e4c9d1 100755
+--- configure.in
++++ configure.in
+@@ -486,6 +486,25 @@ AC_LANG_PROGRAM([[
+ 
+ AC_MSG_CHECKING([if any value exists for WNOHANG])
+ rm -rf wnohang
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
++#include <sys/wait.h>
++]],[[
++#ifdef WNOHANG
++	int wnohang_value = WNOHANG;
++#else
++	#error no value
++#endif
++]])],
++	AC_MSG_RESULT(yes)
++,
++	AC_MSG_RESULT(no)
++	expect_cv_wnohang_value=1
++)
++
++AC_CACHE_CHECK([value of WNOHANG], [expect_cv_wnohang_value],
++[
++rm -rf wnohang
+ AC_TRY_RUN([
+ #include <stdio.h>
+ #include <sys/wait.h>
+@@ -500,14 +519,15 @@ main() {
+ #endif
+ }],
+ 	AC_MSG_RESULT(yes)
+-	AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, `cat wnohang`)
+ 	rm -f wnohang
+ ,
+ 	AC_MSG_RESULT(no)
+-	AC_DEFINE(WNOHANG_BACKUP_VALUE, 1)
+ ,
+ 	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
++])
++
++AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, $expect_cv_wnohang_value)
+ 
+ #
+ # check how signals work
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0004-cross-misc.patch b/srcpkgs/expect/patches/0004-cross-misc.patch
new file mode 100644
index 00000000000..f0e08bdc7e3
--- /dev/null
+++ b/srcpkgs/expect/patches/0004-cross-misc.patch
@@ -0,0 +1,195 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 79 +++++++++++++++++++++-------------------------------
+ 1 file changed, 32 insertions(+), 47 deletions(-)
+
+diff --git configure.in configure.in
+index 0e4c9d1..d41a7a4 100755
+--- configure.in
++++ configure.in
+@@ -732,20 +732,17 @@ fi
+ 
+ # first check for the pure bsd
+ AC_MSG_CHECKING([for struct sgttyb])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ #include <sgtty.h>
+-main()
+-{
++]],[[
+   struct sgttyb tmp;
+-  exit(0);
+-}],
++]])],
+         AC_MSG_RESULT(yes)
+         AC_DEFINE(HAVE_SGTTYB)
+         PTY_TYPE=sgttyb
+ ,
+         AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ # mach systems have include files for unimplemented features
+@@ -757,107 +754,99 @@ if test $mach -eq 0 ; then
+   # since that just controls which of pty_XXXX.c file is use and
+   # pty_termios.c is set up to handle pty_termio.
+   AC_MSG_CHECKING([for struct termio])
+-  AC_TRY_RUN([#include <termio.h>
+-  main()
+-  {
++  AC_COMPILE_IFELSE([
++  AC_LANG_PROGRAM([[
++  #include <termio.h>
++  ]],[[
+     struct termio tmp;
+-    exit(0);
+-  }],
++  ]])],
+         AC_DEFINE(HAVE_TERMIO)
+         PTY_TYPE=termios
+         AC_MSG_RESULT(yes)
+ ,
+         AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+   # now check for the new style ttys (not yet posix)
+   AC_MSG_CHECKING([for struct termios])
+-  AC_TRY_RUN([
++  AC_COMPILE_IFELSE([
++  AC_LANG_PROGRAM([[
+   /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #  ifdef HAVE_INTTYPES_H
+ #  include <inttypes.h>
+ #  endif
+ #  include <termios.h>
+-  main()
+-  {
++  ]],[[
+     struct termios tmp;
+-    exit(0);
+-  }],
++  ]])],
+         AC_DEFINE(HAVE_TERMIOS)
+         PTY_TYPE=termios
+         AC_MSG_RESULT(yes)
+   ,
+         AC_MSG_RESULT(no)
+-  ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+   )
+ fi
+ 
+ AC_MSG_CHECKING([if TCGETS or TCGETA in termios.h])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+ #include <termios.h>
+-main() {
++]],[[
+ #if defined(TCGETS) || defined(TCGETA)
+ 	return 0;
+ #else
+-	return 1;
++	#error no TCGETS or TCGETA
+ #endif
+-}],
++]])],
+ 	AC_DEFINE(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H)
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ AC_MSG_CHECKING([if TIOCGWINSZ in termios.h])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+ #include <termios.h>
+-main() {
++]],[[
+ #ifdef TIOCGWINSZ
+ 	return 0;
+ #else
+-	return 1;
++	#error no TIOCGWINSZ
+ #endif
+-}],
++]])],
+ 	AC_DEFINE(HAVE_TIOCGWINSZ_IN_TERMIOS_H)
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ # finally check for Cray style ttys
+ AC_MSG_CHECKING([for Cray-style ptys])
+ SETUID=":"
+-AC_TRY_RUN([
+-main(){
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
++]],[[
+ #ifdef CRAY
+ 	return 0;
+ #else
+-	return 1;
++	#error no CRAY
+ #endif
+-}
++]])
+ ],
+ 	PTY_TYPE=unicos
+ 	SETUID="chmod u+s"
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ #
+@@ -895,21 +884,17 @@ AC_FUNC_SETPGRP
+ # check for timezones
+ #
+ AC_MSG_CHECKING([for SV-style timezone])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ extern char *tzname[2];
+ extern int daylight;
+-main()
+-{
++]],[[
+   int *x = &daylight;
+   char **y = tzname;
+-
+-  exit(0);
+-}],
++]])],
+ 	AC_DEFINE(HAVE_SV_TIMEZONE)
+ 	AC_MSG_RESULT(yes),
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ 
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/template b/srcpkgs/expect/template
index 66936f261e7..664f91cdb40 100644
--- a/srcpkgs/expect/template
+++ b/srcpkgs/expect/template
@@ -4,7 +4,9 @@ version=5.45.4
 revision=2
 wrksrc=${pkgname}${version}
 build_style=gnu-configure
+configure_args="expect_cv_wnohang_value=1"
 make_check_target="test"
+hostmakedepends="automake libtool tcl-devel"
 makedepends="tcl-devel"
 short_desc="Programmed dialogue with interactive programs"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
@@ -12,7 +14,6 @@ license="Public Domain"
 homepage="http://www.nist.gov/el/msid/expect.cfm"
 distfiles="${SOURCEFORGE_SITE}/${pkgname}/Expect/${version}/${pkgname}${version}.tar.gz"
 checksum=49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34
-nocross=yes
 
 alternatives="
  mkpasswd:mkpasswd:/usr/bin/expect-mkpasswd
@@ -20,11 +21,16 @@ alternatives="
 
 LDFLAGS+=" -Wl,-rpath=/usr/lib:/usr/lib/${pkgname}${version}"
 
+pre_configure() {
+	autoreconf -fi
+}
+
 post_install() {
 	rm ${DESTDIR}/usr/bin/weather
 	mv ${DESTDIR}/usr/bin/{,expect-}mkpasswd
 	mv ${DESTDIR}/usr/share/man/man1/{,expect-}mkpasswd.1
 }
+
 expect-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" -- development files"

From 7ca8401da229834d32f8290a13c69a48d0bb2133 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 3 Apr 2020 23:59:35 +0700
Subject: [PATCH 2/3] deepin-terminal: fix build with latest vala

---
 srcpkgs/deepin-terminal/template | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/deepin-terminal/template b/srcpkgs/deepin-terminal/template
index e1dc0494ddc..57feb0bd3f8 100644
--- a/srcpkgs/deepin-terminal/template
+++ b/srcpkgs/deepin-terminal/template
@@ -1,7 +1,7 @@
 # Template file for 'deepin-terminal'
 pkgname=deepin-terminal
 version=5.0.0
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DTEST_BUILD=OFF -DUSE_VENDOR_LIB=OFF"
 hostmakedepends="glib-devel gobject-introspection gperf intltool pkg-config
@@ -21,3 +21,12 @@ nocross=yes
 case $XBPS_TARGET_MACHINE in
 	*-musl) CFLAGS="-DREG_NOERROR=REG_OK"
 esac
+
+post_patch() {
+	# latest vala string#to_utf8() return char[]
+	# but term.feed_child expects "unowned uint8[]"
+	vsed -i 's/[.]to_utf8()/.data/g' \
+		widget/command_panel.vala \
+		widget/terminal.vala \
+		widget/workspace.vala
+}

From 6575555c67643c13f70512c7a818e8fa36435831 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Sat, 4 Apr 2020 00:07:41 +0700
Subject: [PATCH 3/3] deeping-terminal: fix cross-compile

---
 srcpkgs/deepin-terminal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/deepin-terminal/template b/srcpkgs/deepin-terminal/template
index 57feb0bd3f8..ac614fcfc2b 100644
--- a/srcpkgs/deepin-terminal/template
+++ b/srcpkgs/deepin-terminal/template
@@ -3,6 +3,7 @@ pkgname=deepin-terminal
 version=5.0.0
 revision=2
 build_style=cmake
+build_helper="gir"
 configure_args="-DTEST_BUILD=OFF -DUSE_VENDOR_LIB=OFF"
 hostmakedepends="glib-devel gobject-introspection gperf intltool pkg-config
  vala"
@@ -16,7 +17,6 @@ homepage="https://github.com/linuxdeepin/deepin-terminal"
 changelog="https://github.com/linuxdeepin/deepin-terminal/blob/master/CHANGELOG.md"
 distfiles="https://github.com/linuxdeepin/deepin-terminal/archive/${version}.tar.gz"
 checksum=fc0586a48f85a8151602c205004118429f22c504cd25881eecfd553849fe35f2
-nocross=yes
 
 case $XBPS_TARGET_MACHINE in
 	*-musl) CFLAGS="-DREG_NOERROR=REG_OK"

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Deeping terminal fix build with latest vala and cross compile + Expect cross compile
  2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
                   ` (2 preceding siblings ...)
  2020-04-05  0:57 ` [PR PATCH] [Updated] " sgn
@ 2020-04-05  1:08 ` sgn
  2020-04-05  1:11 ` [PR PATCH] [Updated] " sgn
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-04-05  1:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/20610#issuecomment-609112441

Comment:
Forced push for 1 fix in cross-misc.patch:

    AC_COMPILE_IFELSE -> AC_LINK_IFELSE

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] Deeping terminal fix build with latest vala and cross compile + Expect cross compile
  2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
                   ` (3 preceding siblings ...)
  2020-04-05  1:08 ` sgn
@ 2020-04-05  1:11 ` sgn
  2020-04-05  1:12 ` sgn
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-04-05  1:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages deeping-terminal-fix-latest-vala-and-cross
https://github.com/void-linux/void-packages/pull/20610

Deeping terminal fix build with latest vala and cross compile + Expect cross compile


A patch file from https://github.com/void-linux/void-packages/pull/20610.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-deeping-terminal-fix-latest-vala-and-cross-20610.patch --]
[-- Type: text/x-diff, Size: 12173 bytes --]

From 6b60f703dec8a459b75f5c8bde3a1c1743c302f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 3 Apr 2020 23:01:46 +0700
Subject: [PATCH 1/3] expect: cross compile

---
 srcpkgs/expect/patches/0001-init-CC.patch     |  21 ++
 ...-cross-WNOHANG-requires-POSIX_SOURCE.patch |  41 ++++
 .../patches/0003-cross-wnohang-value.patch    |  56 +++++
 srcpkgs/expect/patches/0004-cross-misc.patch  | 195 ++++++++++++++++++
 srcpkgs/expect/template                       |   8 +-
 5 files changed, 320 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/expect/patches/0001-init-CC.patch
 create mode 100644 srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
 create mode 100644 srcpkgs/expect/patches/0003-cross-wnohang-value.patch
 create mode 100644 srcpkgs/expect/patches/0004-cross-misc.patch

diff --git a/srcpkgs/expect/patches/0001-init-CC.patch b/srcpkgs/expect/patches/0001-init-CC.patch
new file mode 100644
index 00000000000..1069798a0de
--- /dev/null
+++ b/srcpkgs/expect/patches/0001-init-CC.patch
@@ -0,0 +1,21 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git configure.in configure.in
+index aa6fd6e..ad8db32 100755
+--- configure.in
++++ configure.in
+@@ -9,6 +9,8 @@ TEA_INIT([3.9])
+ 
+ AC_CONFIG_AUX_DIR(tclconfig)
+ 
++AC_PROG_CC([cc gcc])
++
+ #--------------------------------------------------------------------
+ # Configure script for package 'Expect'.
+ # TEA compliant.
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch b/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
new file mode 100644
index 00000000000..b1fb36b53ae
--- /dev/null
+++ b/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
@@ -0,0 +1,41 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 16 +++++++---------
+ 1 file changed, 7 insertions(+), 9 deletions(-)
+
+diff --git configure.in configure.in
+index ad8db32..6570a07 100755
+--- configure.in
++++ configure.in
+@@ -469,21 +469,19 @@ memcpy(s1,s2,0);
+ # and if so that WNOHANG is not defined.  The only place I've
+ # seen this is ISC.
+ AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ #include <sys/wait.h>
+-main() {
+-#ifndef WNOHANG
+-	return 0;
+-#else
+-	return 1;
++]],[[
++#ifdef WNOHANG
++	#error WNOHANG
+ #endif
+-}],
++]])]
++,
+ 	AC_MSG_RESULT(yes)
+ 	AC_DEFINE(WNOHANG_REQUIRES_POSIX_SOURCE)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ AC_MSG_CHECKING([if any value exists for WNOHANG])
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0003-cross-wnohang-value.patch b/srcpkgs/expect/patches/0003-cross-wnohang-value.patch
new file mode 100644
index 00000000000..c735f2f5237
--- /dev/null
+++ b/srcpkgs/expect/patches/0003-cross-wnohang-value.patch
@@ -0,0 +1,56 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git configure.in configure.in
+index 6570a07..0e4c9d1 100755
+--- configure.in
++++ configure.in
+@@ -486,6 +486,25 @@ AC_LANG_PROGRAM([[
+ 
+ AC_MSG_CHECKING([if any value exists for WNOHANG])
+ rm -rf wnohang
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
++#include <sys/wait.h>
++]],[[
++#ifdef WNOHANG
++	int wnohang_value = WNOHANG;
++#else
++	#error no value
++#endif
++]])],
++	AC_MSG_RESULT(yes)
++,
++	AC_MSG_RESULT(no)
++	expect_cv_wnohang_value=1
++)
++
++AC_CACHE_CHECK([value of WNOHANG], [expect_cv_wnohang_value],
++[
++rm -rf wnohang
+ AC_TRY_RUN([
+ #include <stdio.h>
+ #include <sys/wait.h>
+@@ -500,14 +519,15 @@ main() {
+ #endif
+ }],
+ 	AC_MSG_RESULT(yes)
+-	AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, `cat wnohang`)
+ 	rm -f wnohang
+ ,
+ 	AC_MSG_RESULT(no)
+-	AC_DEFINE(WNOHANG_BACKUP_VALUE, 1)
+ ,
+ 	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
++])
++
++AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, $expect_cv_wnohang_value)
+ 
+ #
+ # check how signals work
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0004-cross-misc.patch b/srcpkgs/expect/patches/0004-cross-misc.patch
new file mode 100644
index 00000000000..f45f6e52137
--- /dev/null
+++ b/srcpkgs/expect/patches/0004-cross-misc.patch
@@ -0,0 +1,195 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 79 +++++++++++++++++++++-------------------------------
+ 1 file changed, 32 insertions(+), 47 deletions(-)
+
+diff --git configure.in configure.in
+index 0e4c9d1..d41a7a4 100755
+--- configure.in
++++ configure.in
+@@ -732,20 +732,17 @@ fi
+ 
+ # first check for the pure bsd
+ AC_MSG_CHECKING([for struct sgttyb])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ #include <sgtty.h>
+-main()
+-{
++]],[[
+   struct sgttyb tmp;
+-  exit(0);
+-}],
++]])],
+         AC_MSG_RESULT(yes)
+         AC_DEFINE(HAVE_SGTTYB)
+         PTY_TYPE=sgttyb
+ ,
+         AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ # mach systems have include files for unimplemented features
+@@ -757,107 +754,99 @@ if test $mach -eq 0 ; then
+   # since that just controls which of pty_XXXX.c file is use and
+   # pty_termios.c is set up to handle pty_termio.
+   AC_MSG_CHECKING([for struct termio])
+-  AC_TRY_RUN([#include <termio.h>
+-  main()
+-  {
++  AC_COMPILE_IFELSE([
++  AC_LANG_PROGRAM([[
++  #include <termio.h>
++  ]],[[
+     struct termio tmp;
+-    exit(0);
+-  }],
++  ]])],
+         AC_DEFINE(HAVE_TERMIO)
+         PTY_TYPE=termios
+         AC_MSG_RESULT(yes)
+ ,
+         AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+   # now check for the new style ttys (not yet posix)
+   AC_MSG_CHECKING([for struct termios])
+-  AC_TRY_RUN([
++  AC_COMPILE_IFELSE([
++  AC_LANG_PROGRAM([[
+   /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #  ifdef HAVE_INTTYPES_H
+ #  include <inttypes.h>
+ #  endif
+ #  include <termios.h>
+-  main()
+-  {
++  ]],[[
+     struct termios tmp;
+-    exit(0);
+-  }],
++  ]])],
+         AC_DEFINE(HAVE_TERMIOS)
+         PTY_TYPE=termios
+         AC_MSG_RESULT(yes)
+   ,
+         AC_MSG_RESULT(no)
+-  ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+   )
+ fi
+ 
+ AC_MSG_CHECKING([if TCGETS or TCGETA in termios.h])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+ #include <termios.h>
+-main() {
++]],[[
+ #if defined(TCGETS) || defined(TCGETA)
+ 	return 0;
+ #else
+-	return 1;
++	#error no TCGETS or TCGETA
+ #endif
+-}],
++]])],
+ 	AC_DEFINE(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H)
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ AC_MSG_CHECKING([if TIOCGWINSZ in termios.h])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+ #include <termios.h>
+-main() {
++]],[[
+ #ifdef TIOCGWINSZ
+ 	return 0;
+ #else
+-	return 1;
++	#error no TIOCGWINSZ
+ #endif
+-}],
++]])],
+ 	AC_DEFINE(HAVE_TIOCGWINSZ_IN_TERMIOS_H)
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ # finally check for Cray style ttys
+ AC_MSG_CHECKING([for Cray-style ptys])
+ SETUID=":"
+-AC_TRY_RUN([
+-main(){
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
++]],[[
+ #ifdef CRAY
+ 	return 0;
+ #else
+-	return 1;
++	#error no CRAY
+ #endif
+-}
++]])
+ ],
+ 	PTY_TYPE=unicos
+ 	SETUID="chmod u+s"
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ #
+@@ -895,21 +884,17 @@ AC_FUNC_SETPGRP
+ # check for timezones
+ #
+ AC_MSG_CHECKING([for SV-style timezone])
+-AC_TRY_RUN([
++AC_LINK_IFELSE([
++AC_LANG_PROGRAM([[
+ extern char *tzname[2];
+ extern int daylight;
+-main()
+-{
++]],[[
+   int *x = &daylight;
+   char **y = tzname;
+-
+-  exit(0);
+-}],
++]])],
+ 	AC_DEFINE(HAVE_SV_TIMEZONE)
+ 	AC_MSG_RESULT(yes),
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ 
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/template b/srcpkgs/expect/template
index 66936f261e7..664f91cdb40 100644
--- a/srcpkgs/expect/template
+++ b/srcpkgs/expect/template
@@ -4,7 +4,9 @@ version=5.45.4
 revision=2
 wrksrc=${pkgname}${version}
 build_style=gnu-configure
+configure_args="expect_cv_wnohang_value=1"
 make_check_target="test"
+hostmakedepends="automake libtool tcl-devel"
 makedepends="tcl-devel"
 short_desc="Programmed dialogue with interactive programs"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
@@ -12,7 +14,6 @@ license="Public Domain"
 homepage="http://www.nist.gov/el/msid/expect.cfm"
 distfiles="${SOURCEFORGE_SITE}/${pkgname}/Expect/${version}/${pkgname}${version}.tar.gz"
 checksum=49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34
-nocross=yes
 
 alternatives="
  mkpasswd:mkpasswd:/usr/bin/expect-mkpasswd
@@ -20,11 +21,16 @@ alternatives="
 
 LDFLAGS+=" -Wl,-rpath=/usr/lib:/usr/lib/${pkgname}${version}"
 
+pre_configure() {
+	autoreconf -fi
+}
+
 post_install() {
 	rm ${DESTDIR}/usr/bin/weather
 	mv ${DESTDIR}/usr/bin/{,expect-}mkpasswd
 	mv ${DESTDIR}/usr/share/man/man1/{,expect-}mkpasswd.1
 }
+
 expect-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" -- development files"

From d064ae39b1bbac8a3dcfb5169d5191f43f0ae08e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 3 Apr 2020 23:59:35 +0700
Subject: [PATCH 2/3] deepin-terminal: fix build with vte3 0.60

https://github.com/linuxdeepin/deepin-terminal/pull/221
---
 srcpkgs/deepin-terminal/template | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/deepin-terminal/template b/srcpkgs/deepin-terminal/template
index e1dc0494ddc..57feb0bd3f8 100644
--- a/srcpkgs/deepin-terminal/template
+++ b/srcpkgs/deepin-terminal/template
@@ -1,7 +1,7 @@
 # Template file for 'deepin-terminal'
 pkgname=deepin-terminal
 version=5.0.0
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DTEST_BUILD=OFF -DUSE_VENDOR_LIB=OFF"
 hostmakedepends="glib-devel gobject-introspection gperf intltool pkg-config
@@ -21,3 +21,12 @@ nocross=yes
 case $XBPS_TARGET_MACHINE in
 	*-musl) CFLAGS="-DREG_NOERROR=REG_OK"
 esac
+
+post_patch() {
+	# latest vala string#to_utf8() return char[]
+	# but term.feed_child expects "unowned uint8[]"
+	vsed -i 's/[.]to_utf8()/.data/g' \
+		widget/command_panel.vala \
+		widget/terminal.vala \
+		widget/workspace.vala
+}

From a5316c41f389bf2429da89ce3c9af0c8c8cda9c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Sat, 4 Apr 2020 00:07:41 +0700
Subject: [PATCH 3/3] deeping-terminal: fix cross-compile

---
 srcpkgs/deepin-terminal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/deepin-terminal/template b/srcpkgs/deepin-terminal/template
index 57feb0bd3f8..ac614fcfc2b 100644
--- a/srcpkgs/deepin-terminal/template
+++ b/srcpkgs/deepin-terminal/template
@@ -3,6 +3,7 @@ pkgname=deepin-terminal
 version=5.0.0
 revision=2
 build_style=cmake
+build_helper="gir"
 configure_args="-DTEST_BUILD=OFF -DUSE_VENDOR_LIB=OFF"
 hostmakedepends="glib-devel gobject-introspection gperf intltool pkg-config
  vala"
@@ -16,7 +17,6 @@ homepage="https://github.com/linuxdeepin/deepin-terminal"
 changelog="https://github.com/linuxdeepin/deepin-terminal/blob/master/CHANGELOG.md"
 distfiles="https://github.com/linuxdeepin/deepin-terminal/archive/${version}.tar.gz"
 checksum=fc0586a48f85a8151602c205004118429f22c504cd25881eecfd553849fe35f2
-nocross=yes
 
 case $XBPS_TARGET_MACHINE in
 	*-musl) CFLAGS="-DREG_NOERROR=REG_OK"

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Deeping terminal fix build with latest vala and cross compile + Expect cross compile
  2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
                   ` (4 preceding siblings ...)
  2020-04-05  1:11 ` [PR PATCH] [Updated] " sgn
@ 2020-04-05  1:12 ` sgn
  2020-04-06  1:51 ` [PR PATCH] [Updated] " sgn
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-04-05  1:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/20610#issuecomment-609112441

Comment:
Forced push for 1 fix in cross-misc.patch in expect

    AC_COMPILE_IFELSE -> AC_LINK_IFELSE

The second patch was sent for review in https://github.com/linuxdeepin/deepin-terminal/pull/221

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] Deeping terminal fix build with latest vala and cross compile + Expect cross compile
  2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
                   ` (5 preceding siblings ...)
  2020-04-05  1:12 ` sgn
@ 2020-04-06  1:51 ` sgn
  2020-04-07 15:43 ` sgn
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-04-06  1:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages deeping-terminal-fix-latest-vala-and-cross
https://github.com/void-linux/void-packages/pull/20610

Deeping terminal fix build with latest vala and cross compile + Expect cross compile


A patch file from https://github.com/void-linux/void-packages/pull/20610.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-deeping-terminal-fix-latest-vala-and-cross-20610.patch --]
[-- Type: text/x-diff, Size: 12173 bytes --]

From 30f51dfa402ed7d5110a76a26d406d0093a0db1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 3 Apr 2020 23:01:46 +0700
Subject: [PATCH 1/3] expect: cross compile

---
 srcpkgs/expect/patches/0001-init-CC.patch     |  21 ++
 ...-cross-WNOHANG-requires-POSIX_SOURCE.patch |  41 ++++
 .../patches/0003-cross-wnohang-value.patch    |  56 +++++
 srcpkgs/expect/patches/0004-cross-misc.patch  | 195 ++++++++++++++++++
 srcpkgs/expect/template                       |   8 +-
 5 files changed, 320 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/expect/patches/0001-init-CC.patch
 create mode 100644 srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
 create mode 100644 srcpkgs/expect/patches/0003-cross-wnohang-value.patch
 create mode 100644 srcpkgs/expect/patches/0004-cross-misc.patch

diff --git a/srcpkgs/expect/patches/0001-init-CC.patch b/srcpkgs/expect/patches/0001-init-CC.patch
new file mode 100644
index 00000000000..1069798a0de
--- /dev/null
+++ b/srcpkgs/expect/patches/0001-init-CC.patch
@@ -0,0 +1,21 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git configure.in configure.in
+index aa6fd6e..ad8db32 100755
+--- configure.in
++++ configure.in
+@@ -9,6 +9,8 @@ TEA_INIT([3.9])
+ 
+ AC_CONFIG_AUX_DIR(tclconfig)
+ 
++AC_PROG_CC([cc gcc])
++
+ #--------------------------------------------------------------------
+ # Configure script for package 'Expect'.
+ # TEA compliant.
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch b/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
new file mode 100644
index 00000000000..b1fb36b53ae
--- /dev/null
+++ b/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.patch
@@ -0,0 +1,41 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 16 +++++++---------
+ 1 file changed, 7 insertions(+), 9 deletions(-)
+
+diff --git configure.in configure.in
+index ad8db32..6570a07 100755
+--- configure.in
++++ configure.in
+@@ -469,21 +469,19 @@ memcpy(s1,s2,0);
+ # and if so that WNOHANG is not defined.  The only place I've
+ # seen this is ISC.
+ AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ #include <sys/wait.h>
+-main() {
+-#ifndef WNOHANG
+-	return 0;
+-#else
+-	return 1;
++]],[[
++#ifdef WNOHANG
++	#error WNOHANG
+ #endif
+-}],
++]])]
++,
+ 	AC_MSG_RESULT(yes)
+ 	AC_DEFINE(WNOHANG_REQUIRES_POSIX_SOURCE)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ AC_MSG_CHECKING([if any value exists for WNOHANG])
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0003-cross-wnohang-value.patch b/srcpkgs/expect/patches/0003-cross-wnohang-value.patch
new file mode 100644
index 00000000000..c735f2f5237
--- /dev/null
+++ b/srcpkgs/expect/patches/0003-cross-wnohang-value.patch
@@ -0,0 +1,56 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git configure.in configure.in
+index 6570a07..0e4c9d1 100755
+--- configure.in
++++ configure.in
+@@ -486,6 +486,25 @@ AC_LANG_PROGRAM([[
+ 
+ AC_MSG_CHECKING([if any value exists for WNOHANG])
+ rm -rf wnohang
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
++#include <sys/wait.h>
++]],[[
++#ifdef WNOHANG
++	int wnohang_value = WNOHANG;
++#else
++	#error no value
++#endif
++]])],
++	AC_MSG_RESULT(yes)
++,
++	AC_MSG_RESULT(no)
++	expect_cv_wnohang_value=1
++)
++
++AC_CACHE_CHECK([value of WNOHANG], [expect_cv_wnohang_value],
++[
++rm -rf wnohang
+ AC_TRY_RUN([
+ #include <stdio.h>
+ #include <sys/wait.h>
+@@ -500,14 +519,15 @@ main() {
+ #endif
+ }],
+ 	AC_MSG_RESULT(yes)
+-	AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, `cat wnohang`)
+ 	rm -f wnohang
+ ,
+ 	AC_MSG_RESULT(no)
+-	AC_DEFINE(WNOHANG_BACKUP_VALUE, 1)
+ ,
+ 	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
++])
++
++AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, $expect_cv_wnohang_value)
+ 
+ #
+ # check how signals work
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/patches/0004-cross-misc.patch b/srcpkgs/expect/patches/0004-cross-misc.patch
new file mode 100644
index 00000000000..f45f6e52137
--- /dev/null
+++ b/srcpkgs/expect/patches/0004-cross-misc.patch
@@ -0,0 +1,195 @@
+From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ configure.in | 79 +++++++++++++++++++++-------------------------------
+ 1 file changed, 32 insertions(+), 47 deletions(-)
+
+diff --git configure.in configure.in
+index 0e4c9d1..d41a7a4 100755
+--- configure.in
++++ configure.in
+@@ -732,20 +732,17 @@ fi
+ 
+ # first check for the pure bsd
+ AC_MSG_CHECKING([for struct sgttyb])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ #include <sgtty.h>
+-main()
+-{
++]],[[
+   struct sgttyb tmp;
+-  exit(0);
+-}],
++]])],
+         AC_MSG_RESULT(yes)
+         AC_DEFINE(HAVE_SGTTYB)
+         PTY_TYPE=sgttyb
+ ,
+         AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ # mach systems have include files for unimplemented features
+@@ -757,107 +754,99 @@ if test $mach -eq 0 ; then
+   # since that just controls which of pty_XXXX.c file is use and
+   # pty_termios.c is set up to handle pty_termio.
+   AC_MSG_CHECKING([for struct termio])
+-  AC_TRY_RUN([#include <termio.h>
+-  main()
+-  {
++  AC_COMPILE_IFELSE([
++  AC_LANG_PROGRAM([[
++  #include <termio.h>
++  ]],[[
+     struct termio tmp;
+-    exit(0);
+-  }],
++  ]])],
+         AC_DEFINE(HAVE_TERMIO)
+         PTY_TYPE=termios
+         AC_MSG_RESULT(yes)
+ ,
+         AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+   # now check for the new style ttys (not yet posix)
+   AC_MSG_CHECKING([for struct termios])
+-  AC_TRY_RUN([
++  AC_COMPILE_IFELSE([
++  AC_LANG_PROGRAM([[
+   /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #  ifdef HAVE_INTTYPES_H
+ #  include <inttypes.h>
+ #  endif
+ #  include <termios.h>
+-  main()
+-  {
++  ]],[[
+     struct termios tmp;
+-    exit(0);
+-  }],
++  ]])],
+         AC_DEFINE(HAVE_TERMIOS)
+         PTY_TYPE=termios
+         AC_MSG_RESULT(yes)
+   ,
+         AC_MSG_RESULT(no)
+-  ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+   )
+ fi
+ 
+ AC_MSG_CHECKING([if TCGETS or TCGETA in termios.h])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+ #include <termios.h>
+-main() {
++]],[[
+ #if defined(TCGETS) || defined(TCGETA)
+ 	return 0;
+ #else
+-	return 1;
++	#error no TCGETS or TCGETA
+ #endif
+-}],
++]])],
+ 	AC_DEFINE(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H)
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ AC_MSG_CHECKING([if TIOCGWINSZ in termios.h])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
+ /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+ #include <termios.h>
+-main() {
++]],[[
+ #ifdef TIOCGWINSZ
+ 	return 0;
+ #else
+-	return 1;
++	#error no TIOCGWINSZ
+ #endif
+-}],
++]])],
+ 	AC_DEFINE(HAVE_TIOCGWINSZ_IN_TERMIOS_H)
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ # finally check for Cray style ttys
+ AC_MSG_CHECKING([for Cray-style ptys])
+ SETUID=":"
+-AC_TRY_RUN([
+-main(){
++AC_COMPILE_IFELSE([
++AC_LANG_PROGRAM([[
++]],[[
+ #ifdef CRAY
+ 	return 0;
+ #else
+-	return 1;
++	#error no CRAY
+ #endif
+-}
++]])
+ ],
+ 	PTY_TYPE=unicos
+ 	SETUID="chmod u+s"
+ 	AC_MSG_RESULT(yes)
+ ,
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ #
+@@ -895,21 +884,17 @@ AC_FUNC_SETPGRP
+ # check for timezones
+ #
+ AC_MSG_CHECKING([for SV-style timezone])
+-AC_TRY_RUN([
++AC_LINK_IFELSE([
++AC_LANG_PROGRAM([[
+ extern char *tzname[2];
+ extern int daylight;
+-main()
+-{
++]],[[
+   int *x = &daylight;
+   char **y = tzname;
+-
+-  exit(0);
+-}],
++]])],
+ 	AC_DEFINE(HAVE_SV_TIMEZONE)
+ 	AC_MSG_RESULT(yes),
+ 	AC_MSG_RESULT(no)
+-,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
+ )
+ 
+ 
+-- 
+2.26.0.292.g33ef6b2f38
+
diff --git a/srcpkgs/expect/template b/srcpkgs/expect/template
index 66936f261e7..664f91cdb40 100644
--- a/srcpkgs/expect/template
+++ b/srcpkgs/expect/template
@@ -4,7 +4,9 @@ version=5.45.4
 revision=2
 wrksrc=${pkgname}${version}
 build_style=gnu-configure
+configure_args="expect_cv_wnohang_value=1"
 make_check_target="test"
+hostmakedepends="automake libtool tcl-devel"
 makedepends="tcl-devel"
 short_desc="Programmed dialogue with interactive programs"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
@@ -12,7 +14,6 @@ license="Public Domain"
 homepage="http://www.nist.gov/el/msid/expect.cfm"
 distfiles="${SOURCEFORGE_SITE}/${pkgname}/Expect/${version}/${pkgname}${version}.tar.gz"
 checksum=49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34
-nocross=yes
 
 alternatives="
  mkpasswd:mkpasswd:/usr/bin/expect-mkpasswd
@@ -20,11 +21,16 @@ alternatives="
 
 LDFLAGS+=" -Wl,-rpath=/usr/lib:/usr/lib/${pkgname}${version}"
 
+pre_configure() {
+	autoreconf -fi
+}
+
 post_install() {
 	rm ${DESTDIR}/usr/bin/weather
 	mv ${DESTDIR}/usr/bin/{,expect-}mkpasswd
 	mv ${DESTDIR}/usr/share/man/man1/{,expect-}mkpasswd.1
 }
+
 expect-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" -- development files"

From 9c0f1064d6ca28f162b28dda0520574bfc4affa6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 3 Apr 2020 23:59:35 +0700
Subject: [PATCH 2/3] deepin-terminal: fix build with vte3 0.60

https://github.com/linuxdeepin/deepin-terminal/pull/221
---
 srcpkgs/deepin-terminal/template | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/deepin-terminal/template b/srcpkgs/deepin-terminal/template
index e1dc0494ddc..57feb0bd3f8 100644
--- a/srcpkgs/deepin-terminal/template
+++ b/srcpkgs/deepin-terminal/template
@@ -1,7 +1,7 @@
 # Template file for 'deepin-terminal'
 pkgname=deepin-terminal
 version=5.0.0
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DTEST_BUILD=OFF -DUSE_VENDOR_LIB=OFF"
 hostmakedepends="glib-devel gobject-introspection gperf intltool pkg-config
@@ -21,3 +21,12 @@ nocross=yes
 case $XBPS_TARGET_MACHINE in
 	*-musl) CFLAGS="-DREG_NOERROR=REG_OK"
 esac
+
+post_patch() {
+	# latest vala string#to_utf8() return char[]
+	# but term.feed_child expects "unowned uint8[]"
+	vsed -i 's/[.]to_utf8()/.data/g' \
+		widget/command_panel.vala \
+		widget/terminal.vala \
+		widget/workspace.vala
+}

From b81d3ac4fe0e16bc9ebe8bee0bc8879436a38177 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Sat, 4 Apr 2020 00:07:41 +0700
Subject: [PATCH 3/3] deeping-terminal: fix cross-compile

---
 srcpkgs/deepin-terminal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/deepin-terminal/template b/srcpkgs/deepin-terminal/template
index 57feb0bd3f8..ac614fcfc2b 100644
--- a/srcpkgs/deepin-terminal/template
+++ b/srcpkgs/deepin-terminal/template
@@ -3,6 +3,7 @@ pkgname=deepin-terminal
 version=5.0.0
 revision=2
 build_style=cmake
+build_helper="gir"
 configure_args="-DTEST_BUILD=OFF -DUSE_VENDOR_LIB=OFF"
 hostmakedepends="glib-devel gobject-introspection gperf intltool pkg-config
  vala"
@@ -16,7 +17,6 @@ homepage="https://github.com/linuxdeepin/deepin-terminal"
 changelog="https://github.com/linuxdeepin/deepin-terminal/blob/master/CHANGELOG.md"
 distfiles="https://github.com/linuxdeepin/deepin-terminal/archive/${version}.tar.gz"
 checksum=fc0586a48f85a8151602c205004118429f22c504cd25881eecfd553849fe35f2
-nocross=yes
 
 case $XBPS_TARGET_MACHINE in
 	*-musl) CFLAGS="-DREG_NOERROR=REG_OK"

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] Deeping terminal fix build with latest vala and cross compile + Expect cross compile
  2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
                   ` (6 preceding siblings ...)
  2020-04-06  1:51 ` [PR PATCH] [Updated] " sgn
@ 2020-04-07 15:43 ` sgn
  2020-04-07 15:54 ` Deeping terminal fix build with latest vala and " sgn
  2020-04-07 15:55 ` [PR PATCH] [Merged]: " xtraeme
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-04-07 15:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages deeping-terminal-fix-latest-vala-and-cross
https://github.com/void-linux/void-packages/pull/20610

Deeping terminal fix build with latest vala and cross compile + Expect cross compile


A patch file from https://github.com/void-linux/void-packages/pull/20610.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-deeping-terminal-fix-latest-vala-and-cross-20610.patch --]
[-- Type: text/x-diff, Size: 2446 bytes --]

From 2366b3af3b42157a428dad1ea5cb77df20f71d71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 3 Apr 2020 23:59:35 +0700
Subject: [PATCH 1/2] deepin-terminal: fix build with vte3 0.60

https://github.com/linuxdeepin/deepin-terminal/pull/221
---
 srcpkgs/deepin-terminal/template | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/deepin-terminal/template b/srcpkgs/deepin-terminal/template
index e1dc0494ddc..57feb0bd3f8 100644
--- a/srcpkgs/deepin-terminal/template
+++ b/srcpkgs/deepin-terminal/template
@@ -1,7 +1,7 @@
 # Template file for 'deepin-terminal'
 pkgname=deepin-terminal
 version=5.0.0
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DTEST_BUILD=OFF -DUSE_VENDOR_LIB=OFF"
 hostmakedepends="glib-devel gobject-introspection gperf intltool pkg-config
@@ -21,3 +21,12 @@ nocross=yes
 case $XBPS_TARGET_MACHINE in
 	*-musl) CFLAGS="-DREG_NOERROR=REG_OK"
 esac
+
+post_patch() {
+	# latest vala string#to_utf8() return char[]
+	# but term.feed_child expects "unowned uint8[]"
+	vsed -i 's/[.]to_utf8()/.data/g' \
+		widget/command_panel.vala \
+		widget/terminal.vala \
+		widget/workspace.vala
+}

From d156cb4dcb0942853fdd063f259a48df80fd2383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Sat, 4 Apr 2020 00:07:41 +0700
Subject: [PATCH 2/2] deeping-terminal: fix cross-compile

---
 srcpkgs/deepin-terminal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/deepin-terminal/template b/srcpkgs/deepin-terminal/template
index 57feb0bd3f8..ac614fcfc2b 100644
--- a/srcpkgs/deepin-terminal/template
+++ b/srcpkgs/deepin-terminal/template
@@ -3,6 +3,7 @@ pkgname=deepin-terminal
 version=5.0.0
 revision=2
 build_style=cmake
+build_helper="gir"
 configure_args="-DTEST_BUILD=OFF -DUSE_VENDOR_LIB=OFF"
 hostmakedepends="glib-devel gobject-introspection gperf intltool pkg-config
  vala"
@@ -16,7 +17,6 @@ homepage="https://github.com/linuxdeepin/deepin-terminal"
 changelog="https://github.com/linuxdeepin/deepin-terminal/blob/master/CHANGELOG.md"
 distfiles="https://github.com/linuxdeepin/deepin-terminal/archive/${version}.tar.gz"
 checksum=fc0586a48f85a8151602c205004118429f22c504cd25881eecfd553849fe35f2
-nocross=yes
 
 case $XBPS_TARGET_MACHINE in
 	*-musl) CFLAGS="-DREG_NOERROR=REG_OK"

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Deeping terminal fix build with latest vala and cross compile
  2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
                   ` (7 preceding siblings ...)
  2020-04-07 15:43 ` sgn
@ 2020-04-07 15:54 ` sgn
  2020-04-07 15:55 ` [PR PATCH] [Merged]: " xtraeme
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-04-07 15:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/20610#issuecomment-610469425

Comment:
Travis is passed.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Merged]: Deeping terminal fix build with latest vala and cross compile
  2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
                   ` (8 preceding siblings ...)
  2020-04-07 15:54 ` Deeping terminal fix build with latest vala and " sgn
@ 2020-04-07 15:55 ` xtraeme
  9 siblings, 0 replies; 11+ messages in thread
From: xtraeme @ 2020-04-07 15:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

There's a merged pull request on the void-packages repository

Deeping terminal fix build with latest vala and cross compile
https://github.com/void-linux/void-packages/pull/20610

Description:


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-04-07 15:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 17:08 [PR PATCH] Deeping terminal fix build with latest vala and cross compile + Expect cross compile sgn
2020-04-05  0:30 ` Piraty
2020-04-05  0:53 ` sgn
2020-04-05  0:57 ` [PR PATCH] [Updated] " sgn
2020-04-05  1:08 ` sgn
2020-04-05  1:11 ` [PR PATCH] [Updated] " sgn
2020-04-05  1:12 ` sgn
2020-04-06  1:51 ` [PR PATCH] [Updated] " sgn
2020-04-07 15:43 ` sgn
2020-04-07 15:54 ` Deeping terminal fix build with latest vala and " sgn
2020-04-07 15:55 ` [PR PATCH] [Merged]: " xtraeme

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