public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Curses/, dev-perl/Curses/files/
@ 2015-08-22  5:16 Jeroen Roovers
  0 siblings, 0 replies; 2+ messages in thread
From: Jeroen Roovers @ 2015-08-22  5:16 UTC (permalink / raw
  To: gentoo-commits

commit:     0890a90aea6e33173ad59fa490052f27516f203e
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 22 05:16:20 2015 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Aug 22 05:16:20 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0890a90a

dev-perl/Curses: Fix building against >=sys-libs/ncurses-6.0 (bug #557434 by Bernard Cafarelli).

Package-Manager: portage-2.2.20.1

 dev-perl/Curses/Curses-1.320.0.ebuild             | 12 ++++++---
 dev-perl/Curses/files/Curses-1.08-p5.8-fixes.diff | 32 -----------------------
 2 files changed, 8 insertions(+), 36 deletions(-)

diff --git a/dev-perl/Curses/Curses-1.320.0.ebuild b/dev-perl/Curses/Curses-1.320.0.ebuild
index 9b6ff02..7e85c67 100644
--- a/dev-perl/Curses/Curses-1.320.0.ebuild
+++ b/dev-perl/Curses/Curses-1.320.0.ebuild
@@ -20,16 +20,20 @@ RDEPEND="${DEPEND}"
 
 SRC_TEST="do"
 
-my_curses_version() {
+my_curses_unicode() {
 	echo ncurses$(use unicode && echo w)
 }
 
+my_curses_version() {
+	echo ncurses$(use unicode && echo w)$(has_version '>sys-libs/ncurses-6' && echo 6 || echo 5)
+}
+
 pkg_setup() {
 	myconf="${myconf} FORMS PANELS MENUS"
 	mydoc=HISTORY
-	export CURSES_LIBTYPE=$(my_curses_version)
-	export CURSES_LDFLAGS=$($(my_curses_version)5-config --libs)
-	export CURSES_CFLAGS=$( $(my_curses_version)5-config --cflags)
+	export CURSES_LIBTYPE=$(my_curses_unicode)
+	export CURSES_LDFLAGS=$($(my_curses_version)-config --libs)
+	export CURSES_CFLAGS=$( $(my_curses_version)-config --cflags)
 }
 
 src_configure(){

diff --git a/dev-perl/Curses/files/Curses-1.08-p5.8-fixes.diff b/dev-perl/Curses/files/Curses-1.08-p5.8-fixes.diff
deleted file mode 100644
index f661f80..0000000
--- a/dev-perl/Curses/files/Curses-1.08-p5.8-fixes.diff
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -Naurp CursesFun.c.old CursesFun.c
---- CursesFun.c.old	2005-03-05 09:15:20.714006864 -0500
-+++ CursesFun.c	2005-03-05 09:16:14.501829872 -0500
-@@ -1276,8 +1276,8 @@ XS(XS_Curses_newterm)
-     c_exactargs("newterm", items, 3);
-     {
- 	char *	type	= ST(0) != &PL_sv_undef ? (char *)SvPV(ST(0),PL_na) : NULL;
--	FILE *	outfd	= IoIFP(sv_2io(ST(1)));
--	FILE *	infd	= IoIFP(sv_2io(ST(2)));
-+	FILE *	outfd	= PerlIO_findFILE(IoIFP(sv_2io(ST(1))));
-+	FILE *	infd	= PerlIO_findFILE(IoIFP(sv_2io(ST(2))));
- 	SCREEN *	ret	= newterm(type, outfd, infd);
- 	
- 	ST(0) = sv_newmortal();
-@@ -3450,7 +3450,7 @@ XS(XS_Curses_putwin)
-     c_exactargs("putwin", items, 2);
-     {
- 	WINDOW *win	= c_sv2window(ST(0), 0);
--	FILE *	filep	= IoIFP(sv_2io(ST(1)));
-+	FILE *	filep	= PerlIO_findFILE(IoIFP(sv_2io(ST(1))));
- 	int	ret	= putwin(win, filep);
- 	
- 	ST(0) = sv_newmortal();
-@@ -3469,7 +3469,7 @@ XS(XS_Curses_getwin)
- #ifdef C_GETWIN
-     c_exactargs("getwin", items, 1);
-     {
--	FILE *	filep	= IoIFP(sv_2io(ST(0)));
-+	FILE *	filep	= PerlIO_findFILE(IoIFP(sv_2io(ST(0))));
- 	WINDOW *	ret	= getwin(filep);
- 	
- 	ST(0) = sv_newmortal();


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

* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Curses/, dev-perl/Curses/files/
@ 2022-11-30  5:28 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-11-30  5:28 UTC (permalink / raw
  To: gentoo-commits

commit:     e8fa0139c9d04403a711cb5707637627c0673717
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 30 05:09:51 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 30 05:09:51 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8fa0139

dev-perl/Curses: add 1.410.0

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-perl/Curses/Curses-1.410.0.ebuild              | 47 ++++++++++++
 dev-perl/Curses/Manifest                           |  1 +
 dev-perl/Curses/files/Curses-1.410.0-clang16.patch | 84 ++++++++++++++++++++++
 3 files changed, 132 insertions(+)

diff --git a/dev-perl/Curses/Curses-1.410.0.ebuild b/dev-perl/Curses/Curses-1.410.0.ebuild
new file mode 100644
index 000000000000..09e5023669bd
--- /dev/null
+++ b/dev-perl/Curses/Curses-1.410.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=GIRAFFED
+DIST_VERSION=1.41
+DIST_EXAMPLES=("demo" "demo2" "demo.form" "demo.menu" "demo.panel")
+inherit perl-module toolchain-funcs
+
+DESCRIPTION="Curses interface modules for Perl"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~sparc-solaris ~x86-solaris"
+IUSE="+unicode"
+
+RDEPEND="
+	>=sys-libs/ncurses-6:=[unicode(+)?]
+	virtual/perl-Data-Dumper
+"
+DEPEND="
+	>=sys-libs/ncurses-6:=[unicode(+)?]
+"
+BDEPEND="
+	${RDEPEND}
+	virtual/perl-ExtUtils-MakeMaker
+	test? ( virtual/perl-Test-Simple )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.410.0-clang16.patch
+)
+
+src_configure() {
+	myconf=( FORMS PANELS MENUS )
+	mydoc=( HISTORY )
+
+	export CURSES_LIBTYPE="$(usex unicode ncursesw ncurses)"
+	export CURSES_LDFLAGS=$($(tc-getPKG_CONFIG) --libs ${CURSES_LIBTYPE})
+	export CURSES_CFLAGS=$($(tc-getPKG_CONFIG) --cflags ${CURSES_LIBTYPE})
+
+	perl-module_src_configure
+
+	if ! use unicode ; then
+		sed -i 's:<form.h>:"${ESYSROOT}/usr/include/form.h":' "${S}"/c-config.h || die
+	fi
+}

diff --git a/dev-perl/Curses/Manifest b/dev-perl/Curses/Manifest
index 66499d4511a5..56d0bf347996 100644
--- a/dev-perl/Curses/Manifest
+++ b/dev-perl/Curses/Manifest
@@ -1,2 +1,3 @@
 DIST Curses-1.37.tar.gz 135763 BLAKE2B b42f81d5a382b8cf6c8323cc5c13fd39dcc57081ad2e3de9e940f06a0126879d301ccaebc5c34fb5cb4bffd1263b0681243164539c450db50cd3388e6fd35823 SHA512 10886e725b174fdabc0c9b86a9ef9b717949f0fb03561bfc315e8503be689be7945d1ceeea2f950628ce480c2cc8081736d3b8f28042ea677b252298a9eb4827
 DIST Curses-1.38.tar.gz 135789 BLAKE2B 68817bfafcfe2b9d9480c12f2490f9281b5e0cc51bbcfd795e2728a21ef24e12362cfc0896d7b5d6678f35f25fb80c0aee4cde5cf06ec8b3871168cd059649d6 SHA512 27999e71f19576c930a794c9f478e8a3b6b3b1d1e68c4ca57b712f20c98a83dba46295c012a6c618d097b661ec30441c8147e26579218ecef977d7c7996c7442
+DIST Curses-1.41.tar.gz 137458 BLAKE2B 04cb8fc655d0f8ce629fad453923a82ee8c3f7b95e042f036b1c1dc6781e181c04716f8166ebfc0a34eab2402271e8e05ce9438af7a7276c11d22fd9106733f7 SHA512 a8d091f3f79be6368bb0e465563cc736a934f66f489d8c1ec86dca71c22705c7969e1468c9d330cc6653994af550f8f95282b0fd504174d2f77b7d32e98be108

diff --git a/dev-perl/Curses/files/Curses-1.410.0-clang16.patch b/dev-perl/Curses/files/Curses-1.410.0-clang16.patch
new file mode 100644
index 000000000000..1f11a893b2d4
--- /dev/null
+++ b/dev-perl/Curses/files/Curses-1.410.0-clang16.patch
@@ -0,0 +1,84 @@
+Fedora sent upstream by email: https://bugzilla.redhat.com/show_bug.cgi?id=2148432#c2.
+
+https://src.fedoraproject.org/rpms/perl-Curses/c/2633f3adcd14dff61d6d45f97c8bc4f65ce06d82?branch=rawhide
+Add missing int types for C99 compatibility.
+--- a/testint.c
++++ b/testint.c
+@@ -8,6 +8,7 @@
+ 
+ #include "c-config.h"
+ 
++int
+ main() {
+   int ret;
+ 
+--- a/testtyp.c
++++ b/testtyp.c
+@@ -8,6 +8,7 @@
+ 
+ #include "c-config.h"
+ 
++int
+ main() {
+   typedef SYM c_sym_t;
+ }
+
+--- a/test.syms
++++ b/test.syms
+@@ -24,6 +24,9 @@ use warnings;
+ use English;
+ 
+ my $verbose;
++my $panels;
++my $menus;
++my $forms;
+ 
+ sub makeCompileCommand($) {
+     my ($compileR) = @_;
+@@ -74,22 +77,31 @@ sub makeCompileCommand($) {
+     #
+     #  _C_SYM_ and _C_FILE_ will be filled in later
+ 
++    my $defs_prefix = '-D';
+     if ($OSNAME =~ m{VMS}i) {
+-        $compile =~ s{#DEFS#}{DEFINE=SYM="_C_SYM_"};
++	$defs_prefix = 'DEFINE-';
+         $compile =~ s{#FILE#}{_C_FILE_.c};
+         $compile =~ s{#NULL#}{};  # no non-verbose way
+     }
+     elsif ($OSNAME eq 'MSWin32') {
+-        $compile =~ s{#DEFS#}{-DSYM="_C_SYM_"};
+         $compile =~ s{#FILE#}{_C_FILE_.c};
+         $compile =~ s{#NULL#}{>nul 2>&1};
+     }
+     else {
+-        $compile =~ s{#DEFS#}{-DSYM="_C_SYM_"};
+         $compile =~ s{#FILE#}{-o _C_FILE_ _C_FILE_.c};
+         $compile =~ s{#NULL#}{>/dev/null 2>&1};
+     }
+ 
++    # Make these defines from CursesDef.h available early, so that
++    # the feature probing uses the correct build configuration.
++    my @defs = (qq(${defs_prefix}SYM="_C_SYM_"));
++    push @defs, qq(${defs_prefix}C_PANELFUNCTION="1") if $panels;
++    push @defs, qq(${defs_prefix}C_MENUFUNCTION="1") if $menus;
++    push @defs, qq(${defs_prefix}C_FORMFUNCTION="1") if $forms;
++
++    $compile =~ s{#DEFS#}{join " ", @defs}e;
++    
++
+     if ($compile =~ m{#.+#}) {
+         die "OOPS: internal error constructing a compile command.  " .
+             "We failed to substitute for a #xxx# substitution variable " .
+@@ -109,10 +121,6 @@ print("Set CURSES_VERBOSE environment variable to see the details of the " .
+       "tests.\n");
+ print("\n");
+ 
+-my $panels;
+-my $menus;
+-my $forms;
+-
+ if ($ENV{CURSES_VERBOSE}) {
+     $verbose = 1;
+ } else {
+


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

end of thread, other threads:[~2022-11-30  5:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-22  5:16 [gentoo-commits] repo/gentoo:master commit in: dev-perl/Curses/, dev-perl/Curses/files/ Jeroen Roovers
  -- strict thread matches above, loose matches on Subject: below --
2022-11-30  5:28 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox