summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-13 15:25:31 +0100
committerSam James <sam@gentoo.org>2022-09-13 15:26:37 +0100
commit2d46d566162258c1f1ab8411803e8800a5545424 (patch)
tree75ecf849dd4370c273607e123e073157451ecd32 /net-misc/suite3270
parentkde-frameworks/kross: drop 5.97.0 (diff)
downloadgentoo-2d46d566162258c1f1ab8411803e8800a5545424.tar.gz
gentoo-2d46d566162258c1f1ab8411803e8800a5545424.tar.bz2
gentoo-2d46d566162258c1f1ab8411803e8800a5545424.zip
net-misc/suite3270: add 4.2_p5
Also ports ncurses detection to pkg-config to fix build on musl (need -DNCURSES_WIDECHAR definition). The issue is observable with Clang 15 as it throws up implicit. decl errors. Bug: https://bugs.gentoo.org/869128 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/suite3270')
-rw-r--r--net-misc/suite3270/Manifest1
-rw-r--r--net-misc/suite3270/files/suite3270-4.2_p5-egrep.patch21
-rw-r--r--net-misc/suite3270/files/suite3270-4.2_p5-ncurses-pkg-config.patch48
-rw-r--r--net-misc/suite3270/suite3270-4.2_p5.ebuild106
4 files changed, 176 insertions, 0 deletions
diff --git a/net-misc/suite3270/Manifest b/net-misc/suite3270/Manifest
index 4c70c809cfdb..65c2ed53fcd7 100644
--- a/net-misc/suite3270/Manifest
+++ b/net-misc/suite3270/Manifest
@@ -1,3 +1,4 @@
DIST suite3270-4.0ga13-src.tgz 3317494 BLAKE2B 898f279143006e1fc1f470bda3917afe85957de745676dc915f9c94292824ba0e10fc2ccf0a47e307c41e48741a3da7c066c45f63c917295e0522122226b79dd SHA512 bdf9c5d129419c87b45907186e5f158d8623009151357e4d8a3d08ffff2f3729449cead84d005227bfb32968ae363d1a29350692cabe9bf8b71f760eda3f496b
DIST suite3270-4.0ga14-src.tgz 3318277 BLAKE2B 218d2332e3a5a3af1aa2f4f234d71ad5415ff74eefe485d1e9db2f4606caea56ce05142eec3b051f01eac3a0f0b7796221c98f16e7d7c625af291917148c5e37 SHA512 0c76946420bbc2a483ab321658350a5b3e1c03e66b65e99f1a8cb4d350e07eedd44f9f24671244f3c374f512e5d211304785b8e44ae125265ce8f71f0a9dcc65
DIST suite3270-4.1ga11-src.tgz 3900772 BLAKE2B b56fc8464fa01c65db333bea3a4dc204b3981a39177e108add0220cbddb9c41c4170f879ec1e9bf2755575f7cdf43490fc1a81ca1ca0e9883f97943de0c3a048 SHA512 1032a03bf9b24ae9d0e9b9f8b6a7c6319dff2c77db14257f22eb05b52b308e9134d8c6a5080178081f7ba893936e2eca63bb0e04b804d4a7df2507a5b3f625fb
+DIST suite3270-4.2ga5-src.tgz 4192998 BLAKE2B 2e29a9e9f25688bd5fc84101cab684c0fcdde9eff5e65cf0f247e9942990c812174eec17569716928de299fec0d87e77c785d8415370f7245cc0909c7e2020dd SHA512 4a5847c81262a099c68a914141bc7eba7b7b46f0ed4dabc1e7421b4244ea1ca5877e472262f9a4ab2f1a9ca72bde3901f8281dc0957046d3355ed98377de0492
diff --git a/net-misc/suite3270/files/suite3270-4.2_p5-egrep.patch b/net-misc/suite3270/files/suite3270-4.2_p5-egrep.patch
new file mode 100644
index 000000000000..629cbca5f9f3
--- /dev/null
+++ b/net-misc/suite3270/files/suite3270-4.2_p5-egrep.patch
@@ -0,0 +1,21 @@
+--- a/configure.in
++++ b/configure.in
+@@ -29,6 +29,8 @@ AC_PREREQ([2.69])
+
+ AC_CANONICAL_HOST
+
++AC_PROG_EGREP
++
+ AC_ARG_ENABLE(unix,[ --enable-unix build all Unix emulators])
+ AC_ARG_ENABLE(windows,[ --enable-windows build all Windows emulators])
+
+--- a/lib/configure.in
++++ b/lib/configure.in
+@@ -31,6 +31,7 @@ dnl Checks for programs.
+ AC_PROG_INSTALL
+ AC_PROG_CC
+ AC_PROG_RANLIB
++AC_PROG_EGREP
+ AC_CHECK_TOOLS(AR, [ar])
+
+ dnl Figure out what sort of host this is.
diff --git a/net-misc/suite3270/files/suite3270-4.2_p5-ncurses-pkg-config.patch b/net-misc/suite3270/files/suite3270-4.2_p5-ncurses-pkg-config.patch
new file mode 100644
index 000000000000..7142bb293c00
--- /dev/null
+++ b/net-misc/suite3270/files/suite3270-4.2_p5-ncurses-pkg-config.patch
@@ -0,0 +1,48 @@
+Needed to ensure we pick up definitions from ncurses' pkg-config file
+like -DNCURSES_WIDECHAR (issue is observable on say, musl).
+--- a/x3270if/configure.in
++++ b/x3270if/configure.in
+@@ -65,6 +65,9 @@ AC_CHECK_HEADERS(getopt.h)
+ if test "$with_readline" != no; then
+ AC_CHECK_HEADERS(readline/history.h)
+ fi
++
++dnl Try pkg-config first, and if it fails, try the traditional methods.
++PKG_CHECK_MODULES([ncurses], [ncursesw], [AC_DEFINE([HAVE_NCURSESW_NCURSES_H] ,[1]) AC_DEFINE([HAVE_NCURSESW_TERM_H], [1])], [
+ dnl Find the best curses header file and hope it's consistent with the library
+ dnl we found.
+ AC_CHECK_HEADERS(ncursesw/ncurses.h, ,
+@@ -75,15 +78,16 @@ AC_CHECK_HEADERS(ncursesw/term.h, ,
+ [AC_CHECK_HEADERS(ncurses/term.h, ,
+ [AC_CHECK_HEADERS(term.h)])])
+
++ AC_SEARCH_LIBS(newterm, ncursesw ncurses curses, , [AC_MSG_ERROR(Can't find libncurses or new-enough libcurses)])
++ AC_SEARCH_LIBS(setupterm, tinfow tinfo, , [AC_MSG_ERROR(Can't find terminfo library)])
++ AC_CHECK_FUNCS(tiparm)])
++
+ dnl Check for --without-readline
+ AC_ARG_WITH(readline, [ --without-readline Don't use the readline library])
+
+ dnl Checks for library functions.
+ AC_CHECK_FUNCS(vasprintf)
+ AC_FUNC_FSEEKO
+-AC_SEARCH_LIBS(newterm, ncursesw ncurses curses, , [AC_MSG_ERROR(Can't find libncurses or new-enough libcurses)])
+-AC_SEARCH_LIBS(setupterm, tinfow tinfo, , [AC_MSG_ERROR(Can't find terminfo library)])
+-AC_CHECK_FUNCS(tiparm)
+ if test "$with_readline" != no; then
+ AC_CHECK_LIB(readline, rl_initialize)
+ fi
+--- a/x3270if/Makefile.obj.in
++++ b/x3270if/Makefile.obj.in
+@@ -51,9 +51,9 @@ INSTALL_DATA = @INSTALL_DATA@
+
+ CCOPTIONS = @CCOPTIONS@
+ XCPPFLAGS = -I$(THIS) -I$(TOP)/include -I$(TOP)/Common/x3270if @CPPFLAGS@
+-CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) @CFLAGS@
++CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) @ncurses_CFLAGS@ @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+-LIBS = @LIBS@
++LIBS = @LIBS@ @ncurses_LIBS@
+
+ XVERSION = xversion.c
+ version.o: mkversion.sh $(VOBJS) version.txt
diff --git a/net-misc/suite3270/suite3270-4.2_p5.ebuild b/net-misc/suite3270/suite3270-4.2_p5.ebuild
new file mode 100644
index 000000000000..2c53ea248635
--- /dev/null
+++ b/net-misc/suite3270/suite3270-4.2_p5.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+S="${WORKDIR}"/${PN}-${SUB_PV}
+
+# Only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S="${S}"/${FONT_PN}
+
+inherit autotools font
+
+DESCRIPTION="Complete 3270 (S390) access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+IUSE="cjk doc gui ncurses ssl tcl"
+
+RDEPEND="
+ gui? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ssl? ( dev-libs/openssl:= )
+ ncurses? (
+ sys-libs/ncurses:=
+ sys-libs/readline:=
+ )
+ tcl? ( dev-lang/tcl:= )
+"
+DEPEND="
+ ${RDEPEND}
+ gui? ( x11-base/xorg-proto )
+"
+BDEPEND="
+ gui? (
+ app-text/rman
+ x11-apps/bdftopcf
+ >=x11-apps/mkfontscale-1.2.0
+ x11-misc/xbitmaps
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.1-musl-wint-t-fix.patch
+ "${FILESDIR}"/${PN}-4.2_p5-ncurses-pkg-config.patch
+ "${FILESDIR}"/${PN}-4.2_p5-egrep.patch
+)
+
+src_prepare() {
+ default
+
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in 1 2 3 4 5; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ exit 1
+ EOF
+ chmod a+rx _install || die
+ # Can't use the ${INSTALL} var as top level configure also uses it.
+ # https://sourceforge.net/p/x3270/bugs/15/
+ export ac_cv_path_install="${S}"/_install
+
+ AT_NOEAUTOHEADER=yes eautoreconf
+}
+
+src_configure() {
+ econf \
+ --cache-file="${S}"/config.cache \
+ --enable-s3270 \
+ --enable-pr3287 \
+ $(use_enable ncurses c3270) \
+ $(use_enable tcl tcl3270) \
+ $(use_enable gui x3270) \
+ $(use_with gui x) \
+ $(use_with gui fontdir "${FONTDIR}")
+}
+
+src_install() {
+ use gui && dodir "${FONTDIR}"
+
+ emake DESTDIR="${D}" install{,.man}
+
+ use gui && font_src_install
+}
+
+pkg_postinst() {
+ use gui && font_pkg_postinst
+}
+
+pkg_postrm() {
+ use gui && font_pkg_postrm
+}