[72332] trunk/dports/devel/ncurses

jmr at macports.org jmr at macports.org
Sun Oct 10 21:03:50 PDT 2010


Revision: 72332
          http://trac.macports.org/changeset/72332
Author:   jmr at macports.org
Date:     2010-10-10 21:03:48 -0700 (Sun, 10 Oct 2010)
Log Message:
-----------
ncurses: sync with ncursesw

Modified Paths:
--------------
    trunk/dports/devel/ncurses/Portfile

Added Paths:
-----------
    trunk/dports/devel/ncurses/files/include_curses.head.ed
    trunk/dports/devel/ncurses/files/ungetch_guard.diff

Removed Paths:
-------------
    trunk/dports/devel/ncurses/files/patch-configure.diff

Modified: trunk/dports/devel/ncurses/Portfile
===================================================================
--- trunk/dports/devel/ncurses/Portfile	2010-10-11 03:59:53 UTC (rev 72331)
+++ trunk/dports/devel/ncurses/Portfile	2010-10-11 04:03:48 UTC (rev 72332)
@@ -1,10 +1,10 @@
 # $Id$
 
 PortSystem 1.0
-PortGroup  muniversal 1.0
 
 name            ncurses
 version         5.7
+revision        1
 categories      devel
 platforms       darwin freebsd
 maintainers     jmr openmaintainer
@@ -26,6 +26,9 @@
 # required for terminfo
 depends_run     port:ncursesw
 
+# from http://www.opensource.apple.com/source/ncurses/ncurses-27/patches/
+patchfiles      ungetch_guard.diff
+
 configure.cppflags
 configure.ldflags
 configure.args  --with-shared \
@@ -56,44 +59,13 @@
 }
 
 if {[variant_isset universal]} {
-    merger_arch_compiler yes
+    configure.args-append --with-chtype=int
 
-    pre-destroot {
-        global merger_dont_diff
-        # These tests must be done in pre-destroot to ensure universal_archs_to_use has the correct values.
-        if { [llength ${universal_archs_to_use}] > 2 } {
-            lappend merger_dont_diff ${prefix}/include/${name}/curses.h
-        }
-    }
-
-    # When cross-compiling, force configure script to assume file system is the same on build and host architectures.
-    #     We can not use --enable-mixed-case=[yes,no] since HFS+ case sensitivity is not known.
-    patchfiles-append  patch-configure.diff
-
-    # Build process requires compiler and pre-processor to build binaries which run on build architecture.
-    lappend cross_configure_args  --with-build-cc='${configure.cc}'
-    lappend cross_configure_args  --with-build-cpp='${configure.cpp}'
-
-    # Unless, _XOPEN_SOURCE_EXTENDED is defined, include/curses.h will not include some system header files,
-    #     which in turn will cause problems with ncurses/curses.priv.h.
-    lappend cross_configure_args  --with-build-cppflags=-D_XOPEN_SOURCE_EXTENDED
-
-    # Configure script attempts to run a test program which allocates a chunk of memory and writes to it.
-    #     If cross-compiling, default does not assume the program would succeed (safest option).
-    lappend cross_configure_args  --enable-big-core
-
-    # For chtype, configure script chooses between int and long for smallest data type which can hold, up to version 5.7, 31 bits.
-    #     If sizeof(unsigned long)==sizeof(unsigned int), configure script chooses long.
-    # For booltype, configure script tries to find data type xxx with sizeof(bool)==sizeof(xxx).
-    if { ${os.arch}=="i386" } {
-        if { ${os.major} >= 10 } {
-            set merger_configure_args(ppc)   "${cross_configure_args} --with-chtype=long  --with-bool='unsigned int'"
-        }
-        set merger_configure_args(ppc64)   "${cross_configure_args} --with-chtype=int  --with-bool='unsigned char'"
-    } else {
-        set merger_configure_args(i386)    "${cross_configure_args} --with-chtype=long --with-bool='unsigned char'"
-        set merger_configure_args(x86_64)  "${cross_configure_args} --with-chtype=int  --with-bool='unsigned char'"
-    }
+    # check that this doesn't start breaking anything with new versions
+	post-configure {
+	    reinplace s/1UL/1U/g "${worksrcpath}/include/curses.head"
+	    system "cd ${worksrcpath} && ed - include/curses.head < ${filespath}/include_curses.head.ed"
+	}
 }
 
 use_parallel_build	yes

Copied: trunk/dports/devel/ncurses/files/include_curses.head.ed (from rev 72330, trunk/dports/devel/ncursesw/files/include_curses.head.ed)
===================================================================
--- trunk/dports/devel/ncurses/files/include_curses.head.ed	                        (rev 0)
+++ trunk/dports/devel/ncurses/files/include_curses.head.ed	2010-10-11 04:03:48 UTC (rev 72332)
@@ -0,0 +1,8 @@
+/typedef.*NCURSES_BOOL;/c
+#if defined(__LP64__) || !defined(__POWERPC__)
+typedef unsigned char NCURSES_BOOL;
+#else
+typedef unsigned int NCURSES_BOOL;
+#endif
+.
+w

Deleted: trunk/dports/devel/ncurses/files/patch-configure.diff
===================================================================
--- trunk/dports/devel/ncurses/files/patch-configure.diff	2010-10-11 03:59:53 UTC (rev 72331)
+++ trunk/dports/devel/ncurses/files/patch-configure.diff	2010-10-11 04:03:48 UTC (rev 72332)
@@ -1,27 +0,0 @@
---- configure.orig	2008-10-25 20:04:38.000000000 -0400
-+++ configure	2009-02-24 17:28:21.000000000 -0500
-@@ -3415,16 +3415,6 @@
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
--if test "$cross_compiling" = yes ; then
--	case $target_alias in #(vi
--	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
--		cf_cv_mixedcase=no
--		;;
--	*)
--		cf_cv_mixedcase=yes
--		;;
--	esac
--else
- 	rm -f conftest CONFTEST
- 	echo test >conftest
- 	if test -f CONFTEST ; then
-@@ -3433,7 +3423,6 @@
- 		cf_cv_mixedcase=yes
- 	fi
- 	rm -f conftest CONFTEST
--fi
- 
- fi
- echo "$as_me:3439: result: $cf_cv_mixedcase" >&5

Copied: trunk/dports/devel/ncurses/files/ungetch_guard.diff (from rev 72330, trunk/dports/devel/ncursesw/files/ungetch_guard.diff)
===================================================================
--- trunk/dports/devel/ncurses/files/ungetch_guard.diff	                        (rev 0)
+++ trunk/dports/devel/ncurses/files/ungetch_guard.diff	2010-10-11 04:03:48 UTC (rev 72332)
@@ -0,0 +1,13 @@
+--- ncurses/base/lib_ungetch.c	2002-08-24 15:08:48.000000000 -0700
++++ ncurses/base/lib_ungetch.c	2008-03-25 13:49:35.000000000 -0700
+@@ -61,6 +61,10 @@
+ {
+     int rc = ERR;
+ 
++    if (!sp) {
++	    returnCode(ERR);
++    }
++
+     if (tail != -1) {
+ 	if (head == -1) {
+ 	    head = 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101010/e97e7749/attachment.html>


More information about the macports-changes mailing list