public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alfredo Tupone" <tupone@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/expect/, dev-tcltk/expect/files/
Date: Mon, 20 Jun 2022 19:13:09 +0000 (UTC)	[thread overview]
Message-ID: <1655752346.28640a213f9ca28baa91c11cad62e619c1465291.tupone@gentoo> (raw)

commit:     28640a213f9ca28baa91c11cad62e619c1465291
Author:     Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com>
AuthorDate: Mon Jun 20 17:44:16 2022 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Mon Jun 20 19:12:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28640a21

dev-tcltk/expect: allow cross compiling

expect is a very old and mostly abandoned project seeing very
little bug-fixing and development, despite being a relatively
common dependency due to for e.g. gdb -> dejagnu -> expect
dependency chains.

One patch carried by various cross-compilation build systems
for decades adds the ability to cross compile, which we also
add to portage.

Signed-off-by: Adrian Ratiu <adrian.ratiu <AT> collabora.com>
Closes: https://github.com/gentoo/gentoo/pull/26006
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-tcltk/expect/expect-5.45.4-r3.ebuild           |   1 +
 .../expect/files/expect-5.45.4-configure-in.patch  | 113 +++++++++++++++++++++
 2 files changed, 114 insertions(+)

diff --git a/dev-tcltk/expect/expect-5.45.4-r3.ebuild b/dev-tcltk/expect/expect-5.45.4-r3.ebuild
index 4c7c6571cbd6..c374e9fb54e2 100644
--- a/dev-tcltk/expect/expect-5.45.4-r3.ebuild
+++ b/dev-tcltk/expect/expect-5.45.4-r3.ebuild
@@ -32,6 +32,7 @@ src_prepare() {
 	eapply "${FILESDIR}"/${PN}-5.44.1.15-ldflags.patch
 	eapply "${FILESDIR}"/${PN}-5.45-headers.patch #337943
 	eapply "${FILESDIR}"/${PN}-5.45-format-security.patch
+	eapply "${FILESDIR}"/${PN}-5.45.4-configure-in.patch
 	sed -i 's:ifdef HAVE_SYS_WAIT_H:ifndef NO_SYS_WAIT_H:' *.c
 
 	# fix install_name on darwin

diff --git a/dev-tcltk/expect/files/expect-5.45.4-configure-in.patch b/dev-tcltk/expect/files/expect-5.45.4-configure-in.patch
new file mode 100644
index 000000000000..8c05205bf5ae
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45.4-configure-in.patch
@@ -0,0 +1,113 @@
+Allow cross compiling.
+
+Signed-off-by: Anders Roxell <anders.roxell@enea.com>
+Upstream-Status: Pending
+
+Patch source:
+https://github.com/openembedded/openembedded-core/blob/bb87788832ad64079609e4f554e4d55a14f0aa94/meta/recipes-devtools/expect/expect/0001-configure.in.patch
+
+Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
+---
+diff -uNr a/configure.in b/configure.in
+--- a/configure.in	2012-12-14 15:31:32.623180450 +0100
++++ b/configure.in	2012-12-14 15:53:34.518233519 +0100
+@@ -481,7 +481,7 @@
+ ,
+ 	AC_MSG_RESULT(no)
+ ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
++	AC_MSG_RESULT(no)
+ )
+ 
+ AC_MSG_CHECKING([if any value exists for WNOHANG])
+@@ -506,7 +506,9 @@
+ 	AC_MSG_RESULT(no)
+ 	AC_DEFINE(WNOHANG_BACKUP_VALUE, 1)
+ ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
++	AC_MSG_RESULT(yes)
++	AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, `cat wnohang`)
++	rm -f wnohang
+ )
+ 
+ #
+@@ -574,7 +576,8 @@
+ 	AC_DEFINE(REARM_SIG)
+ ,
+ 	AC_MSG_RESULT(no)
+-, AC_MSG_WARN([Expect can't be cross compiled])
++,
++	AC_MSG_RESULT(no)
+ )
+ 
+ # HPUX7 has trouble with the big cat so split it
+@@ -725,7 +728,9 @@
+ ,
+         AC_MSG_RESULT(no)
+ ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
++        AC_MSG_RESULT(yes)
++        AC_DEFINE(HAVE_SGTTYB)
++        PTY_TYPE=sgttyb
+ )
+ 
+ # mach systems have include files for unimplemented features
+@@ -749,7 +754,9 @@
+ ,
+         AC_MSG_RESULT(no)
+ ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
++        AC_DEFINE(HAVE_TERMIO)
++        PTY_TYPE=termios
++        AC_MSG_RESULT(yes)
+ )
+ 
+   # now check for the new style ttys (not yet posix)
+@@ -771,7 +778,9 @@
+   ,
+         AC_MSG_RESULT(no)
+   ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
++        AC_DEFINE(HAVE_TERMIOS)
++        PTY_TYPE=termios
++        AC_MSG_RESULT(yes)
+   )
+ fi
+ 
+@@ -794,7 +803,7 @@
+ ,
+ 	AC_MSG_RESULT(no)
+ ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
++	AC_MSG_RESULT(no)
+ )
+ 
+ AC_MSG_CHECKING([if TIOCGWINSZ in termios.h])
+@@ -816,7 +825,7 @@
+ ,
+ 	AC_MSG_RESULT(no)
+ ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
++	AC_MSG_RESULT(no)
+ )
+ 
+ # finally check for Cray style ttys
+@@ -837,7 +846,7 @@
+ ,
+ 	AC_MSG_RESULT(no)
+ ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
++	AC_MSG_RESULT(no)
+ )
+ 
+ #
+@@ -889,7 +898,8 @@
+ 	AC_MSG_RESULT(yes),
+ 	AC_MSG_RESULT(no)
+ ,
+-	AC_MSG_ERROR([Expect can't be cross compiled])
++	AC_DEFINE(HAVE_SV_TIMEZONE)
++	AC_MSG_RESULT(yes),
+ )
+ 
+ 


             reply	other threads:[~2022-06-20 19:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 19:13 Alfredo Tupone [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-02  7:56 [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/expect/, dev-tcltk/expect/files/ Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1655752346.28640a213f9ca28baa91c11cad62e619c1465291.tupone@gentoo \
    --to=tupone@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox