[Midnightbsd-cvs] mports: devel/icu: Update to 3.8.1

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Mar 31 11:20:08 EDT 2008


Log Message:
-----------
Update to 3.8.1

Modified Files:
--------------
    mports/devel/icu:
        Makefile (r1.2 -> r1.3)
        distinfo (r1.1 -> r1.2)
        pkg-descr (r1.1 -> r1.2)
        pkg-plist (r1.1 -> r1.2)

Added Files:
-----------
    mports/devel/icu/files:
        patch-CVE-2007-4770 (r1.1)
        patch-install (r1.1)
        patch-putil (r1.1)

-------------- next part --------------
Index: pkg-descr
===================================================================
RCS file: /home/cvs/mports/devel/icu/pkg-descr,v
retrieving revision 1.1
retrieving revision 1.2
diff -L devel/icu/pkg-descr -L devel/icu/pkg-descr -u -r1.1 -r1.2
--- devel/icu/pkg-descr
+++ devel/icu/pkg-descr
@@ -6,6 +6,3 @@
 
 WWW: http://icu.sourceforge.net/
 WWW: http://ibm.com/software/globalization/icu
-
-- Bjoern A. Zeeb
-bzeeb+freebsdports at zabbadoz.net
Index: pkg-plist
===================================================================
RCS file: /home/cvs/mports/devel/icu/pkg-plist,v
retrieving revision 1.1
retrieving revision 1.2
diff -L devel/icu/pkg-plist -L devel/icu/pkg-plist -u -r1.1 -r1.2
--- devel/icu/pkg-plist
+++ devel/icu/pkg-plist
@@ -24,7 +24,9 @@
 include/layout/LayoutEngine.h
 include/layout/ParagraphLayout.h
 include/layout/RunArrays.h
+include/layout/loengine.h
 @dirrm include/layout
+include/unicode/basictz.h
 include/unicode/brkiter.h
 include/unicode/calendar.h
 include/unicode/caniter.h
@@ -40,6 +42,8 @@
 include/unicode/decimfmt.h
 include/unicode/docmain.h
 include/unicode/dtfmtsym.h
+include/unicode/dtptngen.h
+include/unicode/dtrule.h
 include/unicode/fieldpos.h
 include/unicode/fmtable.h
 include/unicode/format.h
@@ -51,14 +55,15 @@
 include/unicode/msgfmt.h
 include/unicode/normlzr.h
 include/unicode/numfmt.h
-include/unicode/ppalmos.h
 include/unicode/parseerr.h
 include/unicode/parsepos.h
 include/unicode/platform.h
+include/unicode/ppalmos.h
 include/unicode/putil.h
 include/unicode/pwin32.h
 include/unicode/rbbi.h
 include/unicode/rbnf.h
+include/unicode/rbtz.h
 include/unicode/regex.h
 include/unicode/rep.h
 include/unicode/resbund.h
@@ -73,6 +78,8 @@
 include/unicode/tblcoll.h
 include/unicode/timezone.h
 include/unicode/translit.h
+include/unicode/tzrule.h
+include/unicode/tztrans.h
 include/unicode/ubidi.h
 include/unicode/ubrk.h
 include/unicode/ucal.h
@@ -91,6 +98,7 @@
 include/unicode/ucurr.h
 include/unicode/udat.h
 include/unicode/udata.h
+include/unicode/udatpg.h
 include/unicode/udeprctd.h
 include/unicode/udraft.h
 include/unicode/uenum.h
@@ -137,6 +145,7 @@
 include/unicode/utrans.h
 include/unicode/utypes.h
 include/unicode/uversion.h
+include/unicode/vtzone.h
 @dirrm include/unicode
 lib/icu/%%ICUVER%%/Makefile.inc
 lib/icu/current
@@ -165,7 +174,6 @@
 lib/libicuio.so.%%ICUMAJOR%%.%%ICUMINOR%%
 lib/libicuio.so
 lib/libicuio.so.%%ICUMAJOR%%
-lib/libsicutu.a
 lib/libicutu.so.%%ICUMAJOR%%.%%ICUMINOR%%
 lib/libicutu.so.%%ICUMAJOR%%
 lib/libicutu.so
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/devel/icu/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -L devel/icu/Makefile -L devel/icu/Makefile -u -r1.2 -r1.3
--- devel/icu/Makefile
+++ devel/icu/Makefile
@@ -2,16 +2,14 @@
 # Date created:				22 Jan 2001
 # Whom:					dwm
 #
-# $FreeBSD: ports/devel/icu/Makefile,v 1.22 2006/09/27 13:33:14 mi Exp $
+# $FreeBSD: ports/devel/icu/Makefile,v 1.27 2008/02/18 17:06:32 mi Exp $
 # $MidnightBSD$
 #
 
 PORTNAME=	icu
-PORTVERSION=	3.6
-PORTREVISION=	1
+PORTVERSION=	3.8.1
 CATEGORIES=	devel
-MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}	\
-		ftp://ftp.software.ibm.com/software/globalization/icu/${PORTVERSION}/
+MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=${PORTNAME}
 DISTNAME=	icu4c-${PORTVERSION:S/./_/g}
 EXTRACT_SUFX=	-src.tgz
@@ -19,10 +17,10 @@
 MAINTAINER=	ports at MidnightBSD.org
 COMMENT=	International Components for Unicode (from IBM)
 
-OPTIONS=	THREADS "Build multi-threaded version of the library" off
+OPTIONS=	THREADS "Build thread-safe version of the library" on
 CONFLICTS=	icu2-[0-9]*
 
-USE_LDCONFIG=		yes
+INSTALLS_SHLIB=		yes
 
 WRKSRC=			${WRKDIR}/icu/source
 
@@ -32,10 +30,9 @@
 CONFIGURE_ARGS+=	--enable-shared
 CONFIGURE_ARGS+=	--enable-static
 CONFIGURE_ARGS+=	--enable-samples=no
+ALL_TARGET=	-j`${SYSCTL} -n hw.ncpu`
 
 USE_GMAKE=		yes
-CONFIGURE_ENV+=		CFLAGS="${CFLAGS:N-funroll-loops:N-O*} -O2" CXX="${CXX}"
-CONFIGURE_ENV+=		CXXFLAGS="${CXXFLAGS:N-funroll-loops:N-O*} -O2" CC="${CC}"
 
 MAN1+=	derb.1
 MAN1+=	genbrk.1
@@ -53,17 +50,26 @@
 MAN8+=	genuca.8
 
 ICUMAJOR=	${PORTVERSION:S/.//:R}
-PLIST_SUB+=	ICUMAJOR=${ICUMAJOR} ICUMINOR=0
+PLIST_SUB+=	ICUMAJOR=${ICUMAJOR} ICUMINOR=1
 PLIST_SUB+=	ICUVER=${PORTVERSION}
 
 .include <bsd.port.pre.mk>
 
-.if defined(WITH_THREADS)
-CONFIGURE_ARGS+=	--enable-threads=yes
+.if ${CC:T} == "cc"
+CFLAGS:=	${CFLAGS:N-funroll-loops:N-O*:N-*strict-aliasing} -O2 -fno-strict-aliasing
+.endif
+.if ${CXX:T} == "c++"
+CXXFLAGS:=	${CXXFLAGS:N-funroll-loops:N-O*:N-*strict-aliasing} -O2 -fno-strict-aliasing
+.endif
+CONFIGURE_ENV+=	CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
+
+.if defined(WITHOUT_THREADS)
+CONFIGURE_ARGS+=	--enable-threads=no
+.else
+# This builds thread-safe, but not the thread-using version:
+CONFIGURE_ARGS+=	--enable-weak-threads
 post-patch:
 	${REINPLACE_CMD} -e 's,\(THREADSC.*FLAGS\).*,\1=${PTHREAD_CFLAGS},g' ${WRKSRC}/config/mh-bsd-gcc
-.else
-CONFIGURE_ARGS+=	--enable-threads=no
 .endif
 
 iotest cintltst intltest:
Index: distinfo
===================================================================
RCS file: /home/cvs/mports/devel/icu/distinfo,v
retrieving revision 1.1
retrieving revision 1.2
diff -L devel/icu/distinfo -L devel/icu/distinfo -u -r1.1 -r1.2
--- devel/icu/distinfo
+++ devel/icu/distinfo
@@ -1,3 +1,3 @@
-MD5 (icu4c-3_6-src.tgz) = 6243f7a19e03e05403ce84e597510d4c
-SHA256 (icu4c-3_6-src.tgz) = 5135e8d69d6206d320515df7aeee7027711ab1aef9d8dbf29571a97a9746b041
-SIZE (icu4c-3_6-src.tgz) = 10183358
+MD5 (icu4c-3_8_1-src.tgz) = a827dbc9d909febd4ec39b90386868ba
+SHA256 (icu4c-3_8_1-src.tgz) = 16dda09dff3f770e629313a4c50a82fee88baf87d89a3bb2a28806be07766cee
+SIZE (icu4c-3_8_1-src.tgz) = 10998841
--- /dev/null
+++ devel/icu/files/patch-CVE-2007-4770
@@ -0,0 +1,304 @@
+Index: /icu/branches/maint/maint-3-8/source/i18n/regexcmp.cpp
+===================================================================
+--- i18n/regexcmp.cpp (revision 21805)
++++ i18n/regexcmp.cpp (revision 23292)
+@@ -3,5 +3,5 @@
+ //  file:  regexcmp.cpp
+ //
+-//  Copyright (C) 2002-2007 International Business Machines Corporation and others.
++//  Copyright (C) 2002-2008 International Business Machines Corporation and others.
+ //  All Rights Reserved.
+ //
+@@ -1187,12 +1187,15 @@
+             //  we fill the operand with the capture group number.  At the end
+             //  of compilation, it will be changed to the variable's location.
+-            U_ASSERT(groupNum > 0);
+-            int32_t  op;
+-            if (fModeFlags & UREGEX_CASE_INSENSITIVE) {
+-                op = URX_BUILD(URX_BACKREF_I, groupNum);
++            if (groupNum < 1) { 
++                error(U_REGEX_INVALID_BACK_REF);
+             } else {
+-                op = URX_BUILD(URX_BACKREF, groupNum);
+-            }
+-            fRXPat->fCompiledPat->addElement(op, *fStatus);
++                int32_t  op;
++                if (fModeFlags & UREGEX_CASE_INSENSITIVE) {
++                    op = URX_BUILD(URX_BACKREF_I, groupNum);
++                } else {
++                    op = URX_BUILD(URX_BACKREF, groupNum);
++                }
++                fRXPat->fCompiledPat->addElement(op, *fStatus);
++            }
+         }
+         break;
+Index: /icu/branches/maint/maint-3-8/source/i18n/rematch.cpp
+===================================================================
+--- i18n/rematch.cpp (revision 21973)
++++ i18n/rematch.cpp (revision 23292)
+@@ -1,5 +1,5 @@
+ /*
+ **************************************************************************
+-*   Copyright (C) 2002-2007 International Business Machines Corporation  *
++*   Copyright (C) 2002-2008 International Business Machines Corporation  *
+ *   and others. All rights reserved.                                     *
+ **************************************************************************
+@@ -30,4 +30,13 @@
+ 
+ U_NAMESPACE_BEGIN
++
++// Limit the size of the back track stack, to avoid system failures caused
++//   by heap exhaustion.  Units are in 32 bit words, not bytes.
++// This value puts ICU's limits higher than most other regexp implementations,
++//  which use recursion rather than the heap, and take more storage per
++//  backtrack point.
++// This constant is _temporary_.  Proper API to control the value will added.
++//
++static const int32_t BACKTRACK_STACK_CAPACITY = 8000000;
+ 
+ //-----------------------------------------------------------------------------
+@@ -54,6 +63,7 @@
+     if (fStack == NULL || fData == NULL) {
+         fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;
+-    }
+-        
++    } else {
++        fStack->setMaxCapacity(BACKTRACK_STACK_CAPACITY);
++    }
+     reset(RegexStaticSets::gStaticSets->fEmptyString);
+ }
+@@ -79,4 +89,6 @@
+     if (fStack == NULL || fData == NULL) {
+         status = U_MEMORY_ALLOCATION_ERROR;
++    } else {
++        fStack->setMaxCapacity(BACKTRACK_STACK_CAPACITY);
+     }
+     reset(input);
+@@ -103,4 +115,6 @@
+     if (fStack == NULL || fData == NULL) {
+         status = U_MEMORY_ALLOCATION_ERROR;
++    } else {
++        fStack->setMaxCapacity(BACKTRACK_STACK_CAPACITY);
+     }
+     reset(RegexStaticSets::gStaticSets->fEmptyString);
+@@ -1015,4 +1029,12 @@
+     // push storage for a new frame. 
+     int32_t *newFP = fStack->reserveBlock(frameSize, status);
++    if (newFP == NULL) {
++        // Heap allocation error on attempted stack expansion.
++        // We need to return a writable stack frame, so just return the
++        //    previous frame.  The match operation will stop quickly
++        //    becuase of the error status, after which the frame will never
++        //    be looked at again.
++        return fp;
++    }
+     fp = (REStackFrame *)(newFP - frameSize);  // in case of realloc of stack.
+     
+@@ -1030,6 +1052,6 @@
+     return (REStackFrame *)newFP;
+ }
+-    
+-            
++
++
+ //--------------------------------------------------------------------------------
+ //
+@@ -2262,4 +2284,5 @@
+ 
+         if (U_FAILURE(status)) {
++            isMatch = FALSE;
+             break;
+         }
+Index: /icu/branches/maint/maint-3-8/source/test/intltest/regextst.h
+===================================================================
+--- test/intltest/regextst.h (revision 22001)
++++ test/intltest/regextst.h (revision 23292)
+@@ -1,5 +1,5 @@
+ /********************************************************************
+  * COPYRIGHT: 
+- * Copyright (c) 2002-2007, International Business Machines Corporation and
++ * Copyright (c) 2002-2008, International Business Machines Corporation and
+  * others. All Rights Reserved.
+  ********************************************************************/
+@@ -31,4 +31,5 @@
+     virtual void Errors();
+     virtual void PerlTests();
++    virtual void Bug6149();
+ 
+     // The following functions are internal to the regexp tests.
+Index: /icu/branches/maint/maint-3-8/source/test/intltest/regextst.cpp
+===================================================================
+--- test/intltest/regextst.cpp (revision 22057)
++++ test/intltest/regextst.cpp (revision 23292)
+@@ -1,5 +1,5 @@
+ /********************************************************************
+  * COPYRIGHT:
+- * Copyright (c) 2002-2007, International Business Machines Corporation and
++ * Copyright (c) 2002-2008, International Business Machines Corporation and
+  * others. All Rights Reserved.
+  ********************************************************************/
+@@ -67,4 +67,8 @@
+             if (exec) PerlTests();
+             break;
++        case 7: name = "Bug 6149";
++            if (exec) Bug6149();
++            break;
++            
+ 
+ 
+@@ -1640,4 +1644,10 @@
+     // Ticket 5389
+     REGEX_ERR("*c", 1, 1, U_REGEX_RULE_SYNTAX);
++    
++    // Invalid Back Reference \0
++    //    For ICU 3.8 and earlier
++    //    For ICU versions newer than 3.8, \0 introduces an octal escape.
++    //
++    REGEX_ERR("(ab)\\0", 1, 6, U_REGEX_INVALID_BACK_REF);
+ 
+ }
+@@ -2123,4 +2133,24 @@
+ 
+ 
++//--------------------------------------------------------------
++//
++//  Bug6149   Verify limits to heap expansion for backtrack stack.
++//             Use this pattern,
++//                 "(a?){1,}"
++//             The zero-length match will repeat forever.
++//                (That this goes into a loop is another bug)
++//
++//---------------------------------------------------------------
++void RegexTest::Bug6149() {
++    UnicodeString pattern("(a?){1,}");
++    UnicodeString s("xyz");
++    uint32_t flags = 0;
++    UErrorCode status = U_ZERO_ERROR;
++    
++    RegexMatcher  matcher(pattern, s, flags, status);
++    UBool result = false;
++    REGEX_ASSERT_FAIL(result=matcher.matches(status), U_BUFFER_OVERFLOW_ERROR);
++    REGEX_ASSERT(result == FALSE);
++ }
+ 
+ #endif  /* !UCONFIG_NO_REGULAR_EXPRESSIONS  */
+Index: /icu/branches/maint/maint-3-8/source/common/uvectr32.cpp
+===================================================================
+--- common/uvectr32.cpp (revision 12958)
++++ common/uvectr32.cpp (revision 23292)
+@@ -1,5 +1,5 @@
+ /*
+ ******************************************************************************
+-* Copyright (C) 1999-2003, International Business Machines Corporation and   *
++* Copyright (C) 1999-2008, International Business Machines Corporation and   *
+ * others. All Rights Reserved.                                               *
+ ******************************************************************************
+@@ -27,4 +27,5 @@
+     count(0),
+     capacity(0),
++    maxCapacity(0),
+     elements(NULL)
+ {
+@@ -35,4 +36,5 @@
+     count(0),
+     capacity(0),
++    maxCapacity(0),
+     elements(0)
+ {
+@@ -46,4 +48,7 @@
+     if (initialCapacity < 1) {
+         initialCapacity = DEFUALT_CAPACITY;
++    }
++    if (maxCapacity>0 && maxCapacity<initialCapacity) {
++        initialCapacity = maxCapacity;
+     }
+     elements = (int32_t *)uprv_malloc(sizeof(int32_t)*initialCapacity);
+@@ -190,19 +195,33 @@
+     if (capacity >= minimumCapacity) {
+         return TRUE;
+-    } else {
+-        int32_t newCap = capacity * 2;
+-        if (newCap < minimumCapacity) {
+-            newCap = minimumCapacity;
+-        }
+-        int32_t* newElems = (int32_t *)uprv_malloc(sizeof(int32_t)*newCap);
+-        if (newElems == 0) {
+-            status = U_MEMORY_ALLOCATION_ERROR;
+-            return FALSE;
+-        }
+-        uprv_memcpy(newElems, elements, sizeof(elements[0]) * count);
+-        uprv_free(elements);
+-        elements = newElems;
+-        capacity = newCap;
+-        return TRUE;
++    }
++    if (maxCapacity>0 && minimumCapacity>maxCapacity) {
++        status = U_BUFFER_OVERFLOW_ERROR;
++        return FALSE;
++    }
++    int32_t newCap = capacity * 2;
++    if (newCap < minimumCapacity) {
++        newCap = minimumCapacity;
++    }
++    if (maxCapacity > 0 && newCap > maxCapacity) {
++        newCap = maxCapacity;
++    }
++    int32_t* newElems = (int32_t *)uprv_malloc(sizeof(int32_t)*newCap);
++    if (newElems == 0) {
++        status = U_MEMORY_ALLOCATION_ERROR;
++        return FALSE;
++    }
++    uprv_memcpy(newElems, elements, sizeof(elements[0]) * count);
++    uprv_free(elements);
++    elements = newElems;
++    capacity = newCap;
++    return TRUE;
++}
++
++void UVector32::setMaxCapacity(int32_t limit) {
++    U_ASSERT(limit >= 0);
++    maxCapacity = limit;
++    if (maxCapacity < 0) {
++        maxCapacity = 0;
+     }
+ }
+Index: /icu/branches/maint/maint-3-8/source/common/uvectr32.h
+===================================================================
+--- common/uvectr32.h (revision 19000)
++++ common/uvectr32.h (revision 23292)
+@@ -1,5 +1,5 @@
+ /*
+ **********************************************************************
+-*   Copyright (C) 1999-2006, International Business Machines
++*   Copyright (C) 1999-2008, International Business Machines
+ *   Corporation and others.  All Rights Reserved.
+ **********************************************************************
+@@ -62,4 +62,6 @@
+ 
+     int32_t   capacity;
++    
++    int32_t   maxCapacity;   // Limit beyond which capacity is not permitted to grow.
+ 
+     int32_t*  elements;
+@@ -161,4 +163,12 @@
+      */
+     int32_t *getBuffer() const;
++
++    /**
++     * Set the maximum allowed buffer capacity for this vector/stack.
++     * Default with no limit set is unlimited, go until malloc() fails.
++     * A Limit of zero means unlimited capacity.
++     * Units are vector elements (32 bits each), not bytes.
++     */
++    void setMaxCapacity(int32_t limit);
+ 
+     /**
+@@ -222,5 +232,7 @@
+ 
+ inline int32_t *UVector32::reserveBlock(int32_t size, UErrorCode &status) {
+-    ensureCapacity(count+size, status);
++    if (ensureCapacity(count+size, status) == FALSE) {
++        return NULL;
++    }
+     int32_t  *rp = elements+count;
+     count += size;
--- /dev/null
+++ devel/icu/files/patch-putil
@@ -0,0 +1,9 @@
+--- common/putil.c	2007-12-12 13:57:26.000000000 -0500
++++ common/putil.c	2008-01-28 13:04:02.000000000 -0500
+@@ -577,5 +577,5 @@
+ /* These platforms are likely to use Olson timezone IDs. */
+ #define CHECK_LOCALTIME_LINK 1
+-#if defined(U_LINUX)
++#if defined(U_LINUX) || defined(U_BSD)
+ #define TZDEFAULT       "/etc/localtime"
+ #define TZZONEINFO      "/usr/share/zoneinfo/"
--- /dev/null
+++ devel/icu/files/patch-install
@@ -0,0 +1,8 @@
+--- Makefile.in	2007-12-12 13:58:06.000000000 -0500
++++ Makefile.in	2008-01-28 15:20:56.000000000 -0500
+@@ -126,5 +126,4 @@
+ 	$(INSTALL_DATA) @platform_make_fragment@ $(DESTDIR)$(pkgdatadir)/config/@platform_make_fragment_name@
+ 	$(INSTALL_SCRIPT) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)/mkinstalldirs
+-	$(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh
+ 	$(INSTALL_DATA) $(top_srcdir)/../license.html $(DESTDIR)$(pkgdatadir)/license.html
+ 	$(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config


More information about the Midnightbsd-cvs mailing list