diff options
author | tron <tron> | 2009-11-25 09:58:39 +0000 |
---|---|---|
committer | tron <tron> | 2009-11-25 09:58:39 +0000 |
commit | 9b0e06d140eb922444857e7c0674b2d76d5b33df (patch) | |
tree | 6babbd6597498788660e1a3f9f9a2dbe3840fe2e /devel/pango | |
parent | 91e4594a031e2fe52fc723db5fe3ec2b62916e1e (diff) | |
download | pkgsrc-9b0e06d140eb922444857e7c0674b2d76d5b33df.tar.gz |
Add patches on behalf of Jens Rehsack:
Pango was using invalid c++ code and Sun Studio avoids that to compile.
Applied patches are taken from the bug-fixes committed upstream -HEAD
taken from harrbuuz-ng repository for pango.
Bump package revision because of these patches.
Diffstat (limited to 'devel/pango')
-rw-r--r-- | devel/pango/Makefile | 4 | ||||
-rw-r--r-- | devel/pango/distinfo | 13 | ||||
-rw-r--r-- | devel/pango/patches/patch-ac | 130 | ||||
-rw-r--r-- | devel/pango/patches/patch-ad | 115 | ||||
-rw-r--r-- | devel/pango/patches/patch-af | 50 | ||||
-rw-r--r-- | devel/pango/patches/patch-ag | 259 | ||||
-rw-r--r-- | devel/pango/patches/patch-ah | 149 | ||||
-rw-r--r-- | devel/pango/patches/patch-ai | 122 | ||||
-rw-r--r-- | devel/pango/patches/patch-aj | 19 | ||||
-rw-r--r-- | devel/pango/patches/patch-ak | 17 | ||||
-rw-r--r-- | devel/pango/patches/patch-al | 19 |
11 files changed, 890 insertions, 7 deletions
diff --git a/devel/pango/Makefile b/devel/pango/Makefile index 9d978d4fc19..6cd21391b32 100644 --- a/devel/pango/Makefile +++ b/devel/pango/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.137 2009/11/23 17:18:52 tron Exp $ +# $NetBSD: Makefile,v 1.138 2009/11/25 09:58:39 tron Exp $ DISTNAME= pango-1.26.1 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= devel fonts MASTER_SITES= ${MASTER_SITE_GNOME:=sources/pango/1.26/} EXTRACT_SUFX= .tar.bz2 diff --git a/devel/pango/distinfo b/devel/pango/distinfo index 18c81f46643..a1a694ecb8c 100644 --- a/devel/pango/distinfo +++ b/devel/pango/distinfo @@ -1,10 +1,17 @@ -$NetBSD: distinfo,v 1.79 2009/11/23 17:18:52 tron Exp $ +$NetBSD: distinfo,v 1.80 2009/11/25 09:58:39 tron Exp $ SHA1 (pango-1.26.1.tar.bz2) = d4891a34a46ddc9a6e37bcdf0fef4cbab7391b7b RMD160 (pango-1.26.1.tar.bz2) = cc9e3bd5d4cdfcb9c2298b75c4b02fee31816184 Size (pango-1.26.1.tar.bz2) = 1538050 bytes SHA1 (patch-aa) = 1a87d055dc722eff28517a11d0832ae19df5eb59 SHA1 (patch-ab) = 12c09b12ba31be19fa0d602f89909811e6221bd8 -SHA1 (patch-ac) = 04da33d33698f7c1e7776e7c050d4fb7043ff0a3 -SHA1 (patch-ad) = 96b82ee6685eed69e324f3d1d7139a2762ae1a30 +SHA1 (patch-ac) = af7a64dbab62cdb5ebbed1519b64d97fd07eabf7 +SHA1 (patch-ad) = 7d44d444f8063d7a2a222ee03257704927e19f35 SHA1 (patch-ae) = 2ebb8a0886a745fbfb0106dece91c5c990982ef8 +SHA1 (patch-af) = adfb861fe7f364ff8270fb589d0e004534579d0b +SHA1 (patch-ag) = 8c35324b0436f3270cf51850a3059b7dd7dd6043 +SHA1 (patch-ah) = 5bfa3dbfd681e36b450179c5373416101ca63155 +SHA1 (patch-ai) = 130993e48f95a1540307af25e503a37670c6a867 +SHA1 (patch-aj) = ec5f198cd2fa18ea3d1536c5013efa6cc7cd8b5a +SHA1 (patch-ak) = dae7044d4dc90f9c729746d88296ca2e7043239d +SHA1 (patch-al) = 537f653b78e45a3019fb27a28d6d4d29d1657c1f diff --git a/devel/pango/patches/patch-ac b/devel/pango/patches/patch-ac index 0dc9caf6101..d657b3e264f 100644 --- a/devel/pango/patches/patch-ac +++ b/devel/pango/patches/patch-ac @@ -1,9 +1,29 @@ -$NetBSD: patch-ac,v 1.12 2009/11/22 19:14:42 sno Exp $ +$NetBSD: patch-ac,v 1.13 2009/11/25 09:58:39 tron Exp $ See https://bugzilla.gnome.org/show_bug.cgi?id=602408 +and https://bugzilla.gnome.org/show_bug.cgi?id=602660 --- pango/opentype/hb-open-type-private.hh.orig +++ pango/opentype/hb-open-type-private.hh +@@ -50,6 +50,9 @@ + #define CONST_NEXT(T,X) (*(reinterpret_cast<const T *>(CONST_CHARP(&(X)) + (X).get_size ()))) + #define NEXT(T,X) (*(reinterpret_cast<T *>(CHARP(&(X)) + (X).get_size ()))) + ++#define CONST_ARRAY_AFTER(T,X) ((reinterpret_cast<const T *>(CONST_CHARP(&(X)) + sizeof (X)))) ++#define ARRAY_AFTER(T,X) ((reinterpret_cast<T *>(CHARP(&(X)) + sizeof (X)))) ++ + /* + * Class features + */ +@@ -58,7 +61,7 @@ + /* Null objects */ + + /* Global nul-content Null pool. Enlarge as necessary. */ +-static const char NullPool[16] = ""; ++static const char NullPool[32] = ""; + + /* Generic template for nul-content sizeof-sized Null objects. */ + template <typename Type> @@ -258,7 +258,7 @@ _hb_sanitize_edit (SANITIZE_ARG_DEF, #define NEUTER(Var, Val) \ (SANITIZE_OBJ (Var) && \ @@ -40,3 +60,111 @@ See https://bugzilla.gnome.org/show_bug.cgi?id=602408 inline Tag (const char *c) { *(ULONG*)this = *(ULONG*)c; } inline bool operator== (const char *c) const { return *(ULONG*)this == *(ULONG*)c; } /* What the char* converters return is NOT nul-terminated. Print using "%.4s" */ +@@ -505,13 +508,16 @@ struct LongOffsetTo : GenericOffsetTo<LongOffset, Type> {}; + template <typename LenType, typename Type> + struct GenericArrayOf + { ++ const Type *const_array(void) const { return CONST_ARRAY_AFTER (Type, len); } ++ Type *array(void) { return ARRAY_AFTER (Type, len); } ++ + inline const Type& operator [] (unsigned int i) const + { + if (HB_UNLIKELY (i >= len)) return Null(Type); +- return array[i]; ++ return const_array()[i]; + } + inline unsigned int get_size () const +- { return sizeof (len) + len * sizeof (array[0]); } ++ { return sizeof (len) + len * sizeof (Type); } + + inline bool sanitize (SANITIZE_ARG_DEF) { + TRACE_SANITIZE (); +@@ -523,7 +529,7 @@ struct GenericArrayOf + return true; + unsigned int count = len; + for (unsigned int i = 0; i < count; i++) +- if (!SANITIZE (array[i])) ++ if (!SANITIZE (array()[i])) + return false; + return true; + } +@@ -532,7 +538,7 @@ struct GenericArrayOf + if (!SANITIZE_GET_SIZE()) return false; + unsigned int count = len; + for (unsigned int i = 0; i < count; i++) +- if (!array[i].sanitize (SANITIZE_ARG, base)) ++ if (!array()[i].sanitize (SANITIZE_ARG, base)) + return false; + return true; + } +@@ -541,7 +547,7 @@ struct GenericArrayOf + if (!SANITIZE_GET_SIZE()) return false; + unsigned int count = len; + for (unsigned int i = 0; i < count; i++) +- if (!array[i].sanitize (SANITIZE_ARG, base, base2)) ++ if (!array()[i].sanitize (SANITIZE_ARG, base, base2)) + return false; + return true; + } +@@ -550,13 +556,13 @@ struct GenericArrayOf + if (!SANITIZE_GET_SIZE()) return false; + unsigned int count = len; + for (unsigned int i = 0; i < count; i++) +- if (!array[i].sanitize (SANITIZE_ARG, base, user_data)) ++ if (!array()[i].sanitize (SANITIZE_ARG, base, user_data)) + return false; + return true; + } + + LenType len; +- Type array[]; ++/*Type array[VAR];*/ + }; + + /* An array with a USHORT number of elements. */ +@@ -586,7 +592,7 @@ struct OffsetListOf : OffsetArrayOf<Type> + inline const Type& operator [] (unsigned int i) const + { + if (HB_UNLIKELY (i >= this->len)) return Null(Type); +- return this+this->array[i]; ++ return this+this->const_array()[i]; + } + + inline bool sanitize (SANITIZE_ARG_DEF) { +@@ -605,13 +611,16 @@ struct OffsetListOf : OffsetArrayOf<Type> + template <typename Type> + struct HeadlessArrayOf + { ++ const Type *const_array(void) const { return CONST_ARRAY_AFTER (Type, len); } ++ Type *array(void) { return ARRAY_AFTER (Type, len); } ++ + inline const Type& operator [] (unsigned int i) const + { + if (HB_UNLIKELY (i >= len || !i)) return Null(Type); +- return array[i-1]; ++ return const_array()[i-1]; + } + inline unsigned int get_size () const +- { return sizeof (len) + (len ? len - 1 : 0) * sizeof (array[0]); } ++ { return sizeof (len) + (len ? len - 1 : 0) * sizeof (Type); } + + inline bool sanitize (SANITIZE_ARG_DEF) { + TRACE_SANITIZE (); +@@ -622,14 +631,15 @@ struct HeadlessArrayOf + * do have a simple sanitize(). */ + return true; + unsigned int count = len ? len - 1 : 0; ++ Type *a = array(); + for (unsigned int i = 0; i < count; i++) +- if (!SANITIZE (array[i])) ++ if (!SANITIZE (a[i])) + return false; + return true; + } + + USHORT len; +- Type array[]; ++/*Type array[VAR];*/ + }; + + diff --git a/devel/pango/patches/patch-ad b/devel/pango/patches/patch-ad index eef5f3f502b..89ac5dcf0e0 100644 --- a/devel/pango/patches/patch-ad +++ b/devel/pango/patches/patch-ad @@ -1,9 +1,82 @@ -$NetBSD: patch-ad,v 1.9 2009/11/22 19:14:42 sno Exp $ +$NetBSD: patch-ad,v 1.10 2009/11/25 09:58:39 tron Exp $ See https://bugzilla.gnome.org/show_bug.cgi?id=602408 +and https://bugzilla.gnome.org/show_bug.cgi?id=602660 --- pango/opentype/hb-ot-layout-common-private.hh.orig +++ pango/opentype/hb-ot-layout-common-private.hh +@@ -67,14 +67,15 @@ struct RecordArrayOf : ArrayOf<Record<Type> > { + inline const Tag& get_tag (unsigned int i) const + { + if (HB_UNLIKELY (i >= this->len)) return Null(Tag); +- return this->array[i].tag; ++ return (*this)[i].tag; + } + inline bool get_tags (unsigned int *record_count /* IN/OUT */, + hb_tag_t *record_tags /* OUT */) const + { ++ const Record<Type> *a = this->const_array(); + unsigned int count = MIN (this->len, *record_count); + for (unsigned int i = 0; i < count; i++) +- record_tags[i] = this->array[i].tag; ++ record_tags[i] = a[i].tag; + + *record_count = this->len; + return !!this->len; +@@ -83,10 +84,11 @@ struct RecordArrayOf : ArrayOf<Record<Type> > { + { + const Tag t = tag; + // TODO bsearch ++ const Record<Type> *a = this->const_array(); + unsigned int count = this->len; + for (unsigned int i = 0; i < count; i++) + { +- if (t == this->array[i].tag) ++ if (t == a[i].tag) + { + if (index) *index = i; + return true; +@@ -116,14 +118,15 @@ struct IndexArray : ArrayOf<USHORT> + { + if (HB_UNLIKELY (i >= this->len)) + return NO_INDEX; +- return this->array[i]; ++ return this->const_array()[i]; + } + inline bool get_indexes (unsigned int *_count /* IN/OUT */, + unsigned int *_indexes /* OUT */) const + { + unsigned int count = MIN (this->len, *_count); ++ const USHORT *a = this->const_array(); + for (unsigned int i = 0; i < count; i++) +- _indexes[i] = this->array[i]; ++ _indexes[i] = a[i]; + + *_count = this->len; + return !!this->len; +@@ -283,7 +286,7 @@ struct Lookup + + inline bool sanitize (SANITIZE_ARG_DEF) { + TRACE_SANITIZE (); +- if (!(SANITIZE_SELF () && SANITIZE_THIS (subTable))) return false; ++ if (!(SANITIZE (lookupType) && SANITIZE (lookupFlag) && SANITIZE_THIS (subTable))) return false; + if (HB_UNLIKELY (lookupFlag & LookupFlag::UseMarkFilteringSet)) + { + USHORT &markFilteringSet = NEXT (USHORT, subTable); +@@ -296,11 +299,11 @@ struct Lookup + USHORT lookupFlag; /* Lookup qualifiers */ + OffsetArrayOf<LookupSubTable> + subTable; /* Array of SubTables */ +- USHORT markFilteringSetX[0]; /* Index (base 0) into GDEF mark glyph sets ++ USHORT markFilteringSetX[VAR]; /* Index (base 0) into GDEF mark glyph sets + * structure. This field is only present if bit + * UseMarkFilteringSet of lookup flags is set. */ + }; +-ASSERT_SIZE (Lookup, 6); ++ASSERT_SIZE_VAR (Lookup, 6, USHORT); + + typedef OffsetListOf<Lookup> LookupList; + ASSERT_SIZE (LookupList, 2); @@ -320,7 +320,7 @@ struct CoverageFormat1 if (HB_UNLIKELY (glyph_id > 0xFFFF)) return NOT_COVERED; @@ -13,3 +86,43 @@ See https://bugzilla.gnome.org/show_bug.cgi?id=602408 // TODO: bsearch unsigned int num_glyphs = glyphArray.len; for (unsigned int i = 0; i < num_glyphs; i++) +@@ -425,11 +428,10 @@ struct Coverage + private: + union { + USHORT format; /* Format identifier */ +- CoverageFormat1 format1[]; +- CoverageFormat2 format2[]; ++ CoverageFormat1 format1[VAR]; ++ CoverageFormat2 format2[VAR]; + } u; + }; +-ASSERT_SIZE (Coverage, 2); + + + /* +@@ -541,11 +543,10 @@ struct ClassDef + private: + union { + USHORT format; /* Format identifier */ +- ClassDefFormat1 format1[]; +- ClassDefFormat2 format2[]; ++ ClassDefFormat1 format1[VAR]; ++ ClassDefFormat2 format2[VAR]; + } u; + }; +-ASSERT_SIZE (ClassDef, 2); + + + /* +@@ -595,9 +596,9 @@ struct Device + USHORT startSize; /* Smallest size to correct--in ppem */ + USHORT endSize; /* Largest size to correct--in ppem */ + USHORT deltaFormat; /* Format of DeltaValue array data: 1, 2, or 3 */ +- USHORT deltaValue[]; /* Array of compressed data */ ++ USHORT deltaValue[VAR]; /* Array of compressed data */ + }; +-ASSERT_SIZE (Device, 6); ++ASSERT_SIZE_VAR (Device, 6, USHORT); + + + #endif /* HB_OT_LAYOUT_COMMON_PRIVATE_HH */ diff --git a/devel/pango/patches/patch-af b/devel/pango/patches/patch-af new file mode 100644 index 00000000000..1ac770c30cf --- /dev/null +++ b/devel/pango/patches/patch-af @@ -0,0 +1,50 @@ +$NetBSD: patch-af,v 1.1 2009/11/25 09:58:39 tron Exp $ + +See https://bugzilla.gnome.org/show_bug.cgi?id=602408 +and https://bugzilla.gnome.org/show_bug.cgi?id=602660 + +--- pango/opentype/hb-ot-layout-gdef-private.hh.orig ++++ pango/opentype/hb-ot-layout-gdef-private.hh +@@ -177,12 +177,11 @@ struct CaretValue + private: + union { + USHORT format; /* Format identifier */ +- CaretValueFormat1 format1[]; +- CaretValueFormat2 format2[]; +- CaretValueFormat3 format3[]; ++ CaretValueFormat1 format1[VAR]; ++ CaretValueFormat2 format2[VAR]; ++ CaretValueFormat3 format3[VAR]; + } u; + }; +-ASSERT_SIZE (CaretValue, 2); + + struct LigGlyph + { +@@ -286,10 +285,9 @@ struct MarkGlyphSets + private: + union { + USHORT format; /* Format identifier */ +- MarkGlyphSetsFormat1 format1[]; ++ MarkGlyphSetsFormat1 format1[VAR]; + } u; + }; +-ASSERT_SIZE (MarkGlyphSets, 2); + + + /* +@@ -364,12 +362,12 @@ struct GDEF + * mark attachment type--from beginning + * of GDEF header (may be Null) */ + OffsetTo<MarkGlyphSets> +- markGlyphSetsDef[0]; /* Offset to the table of mark set ++ markGlyphSetsDef[VAR]; /* Offset to the table of mark set + * definitions--from beginning of GDEF + * header (may be NULL). Introduced + * in version 00010002. */ + }; +-ASSERT_SIZE (GDEF, 12); ++ASSERT_SIZE_VAR (GDEF, 12, OffsetTo<MarkGlyphSets>); + + + #endif /* HB_OT_LAYOUT_GDEF_PRIVATE_HH */ diff --git a/devel/pango/patches/patch-ag b/devel/pango/patches/patch-ag new file mode 100644 index 00000000000..a5720f2d020 --- /dev/null +++ b/devel/pango/patches/patch-ag @@ -0,0 +1,259 @@ +$NetBSD: patch-ag,v 1.1 2009/11/25 09:58:39 tron Exp $ + +See https://bugzilla.gnome.org/show_bug.cgi?id=602408 +and https://bugzilla.gnome.org/show_bug.cgi?id=602660 + +--- pango/opentype/hb-ot-layout-gpos-private.hh.orig ++++ pango/opentype/hb-ot-layout-gpos-private.hh +@@ -35,8 +35,8 @@ + + typedef SHORT Value; + +-typedef Value ValueRecord[0]; +-ASSERT_SIZE (ValueRecord, 0); ++typedef Value ValueRecord[VAR]; ++ASSERT_SIZE_VAR (ValueRecord, 0, Value); + + struct ValueFormat : USHORT + { +@@ -259,12 +259,11 @@ struct Anchor + private: + union { + USHORT format; /* Format identifier */ +- AnchorFormat1 format1[]; +- AnchorFormat2 format2[]; +- AnchorFormat3 format3[]; ++ AnchorFormat1 format1[VAR]; ++ AnchorFormat2 format2[VAR]; ++ AnchorFormat3 format3[VAR]; + } u; + }; +-ASSERT_SIZE (Anchor, 2); + + + struct AnchorMatrix +@@ -287,10 +286,10 @@ struct AnchorMatrix + USHORT rows; /* Number of rows */ + private: + OffsetTo<Anchor> +- matrix[]; /* Matrix of offsets to Anchor tables-- ++ matrix[VAR]; /* Matrix of offsets to Anchor tables-- + * from beginning of AnchorMatrix table */ + }; +-ASSERT_SIZE (AnchorMatrix, 2); ++ASSERT_SIZE_VAR (AnchorMatrix, 2, OffsetTo<Anchor>); + + + struct MarkRecord +@@ -389,7 +388,7 @@ struct SinglePosFormat1 + * value(s)--applied to all glyphs in + * the Coverage table */ + }; +-ASSERT_SIZE (SinglePosFormat1, 6); ++ASSERT_SIZE_VAR (SinglePosFormat1, 6, ValueRecord); + + struct SinglePosFormat2 + { +@@ -431,7 +430,7 @@ struct SinglePosFormat2 + ValueRecord values; /* Array of ValueRecords--positioning + * values applied to glyphs */ + }; +-ASSERT_SIZE (SinglePosFormat2, 8); ++ASSERT_SIZE_VAR (SinglePosFormat2, 8, ValueRecord); + + struct SinglePos + { +@@ -461,11 +460,10 @@ struct SinglePos + private: + union { + USHORT format; /* Format identifier */ +- SinglePosFormat1 format1[]; +- SinglePosFormat2 format2[]; ++ SinglePosFormat1 format1[VAR]; ++ SinglePosFormat2 format2[VAR]; + } u; + }; +-ASSERT_SIZE (SinglePos, 2); + + + struct PairValueRecord +@@ -479,7 +477,7 @@ struct PairValueRecord + ValueRecord values; /* Positioning data for the first glyph + * followed by for second glyph */ + }; +-ASSERT_SIZE (PairValueRecord, 2); ++ASSERT_SIZE_VAR (PairValueRecord, 2, ValueRecord); + + struct PairSet + { +@@ -495,10 +493,10 @@ struct PairSet + private: + USHORT len; /* Number of PairValueRecords */ + PairValueRecord +- array[]; /* Array of PairValueRecords--ordered ++ array[VAR]; /* Array of PairValueRecords--ordered + * by GlyphID of the second glyph */ + }; +-ASSERT_SIZE (PairSet, 2); ++ASSERT_SIZE_VAR (PairSet, 2, PairValueRecord); + + struct PairPosFormat1 + { +@@ -654,7 +652,7 @@ struct PairPosFormat2 + * class1-major, class2-minor, + * Each entry has value1 and value2 */ + }; +-ASSERT_SIZE (PairPosFormat2, 16); ++ASSERT_SIZE_VAR (PairPosFormat2, 16, ValueRecord); + + struct PairPos + { +@@ -684,11 +682,10 @@ struct PairPos + private: + union { + USHORT format; /* Format identifier */ +- PairPosFormat1 format1[]; +- PairPosFormat2 format2[]; ++ PairPosFormat1 format1[VAR]; ++ PairPosFormat2 format2[VAR]; + } u; + }; +-ASSERT_SIZE (PairPos, 2); + + + struct EntryExitRecord +@@ -931,17 +928,15 @@ struct CursivePos + private: + union { + USHORT format; /* Format identifier */ +- CursivePosFormat1 format1[]; ++ CursivePosFormat1 format1[VAR]; + } u; + }; +-ASSERT_SIZE (CursivePos, 2); + + + typedef AnchorMatrix BaseArray; /* base-major-- + * in order of BaseCoverage Index--, + * mark-minor-- + * ordered by class--zero-based. */ +-ASSERT_SIZE (BaseArray, 2); + + struct MarkBasePosFormat1 + { +@@ -1027,23 +1022,20 @@ struct MarkBasePos + private: + union { + USHORT format; /* Format identifier */ +- MarkBasePosFormat1 format1[]; ++ MarkBasePosFormat1 format1[VAR]; + } u; + }; +-ASSERT_SIZE (MarkBasePos, 2); + + + typedef AnchorMatrix LigatureAttach; /* component-major-- + * in order of writing direction--, + * mark-minor-- + * ordered by class--zero-based. */ +-ASSERT_SIZE (LigatureAttach, 2); + + typedef OffsetListOf<LigatureAttach> LigatureArray; + /* Array of LigatureAttach + * tables ordered by + * LigatureCoverage Index */ +-ASSERT_SIZE (LigatureArray, 2); + + struct MarkLigPosFormat1 + { +@@ -1152,17 +1144,15 @@ struct MarkLigPos + private: + union { + USHORT format; /* Format identifier */ +- MarkLigPosFormat1 format1[]; ++ MarkLigPosFormat1 format1[VAR]; + } u; + }; +-ASSERT_SIZE (MarkLigPos, 2); + + + typedef AnchorMatrix Mark2Array; /* mark2-major-- + * in order of Mark2Coverage Index--, + * mark1-minor-- + * ordered by class--zero-based. */ +-ASSERT_SIZE (Mark2Array, 2); + + struct MarkMarkPosFormat1 + { +@@ -1253,10 +1243,9 @@ struct MarkMarkPos + private: + union { + USHORT format; /* Format identifier */ +- MarkMarkPosFormat1 format1[]; ++ MarkMarkPosFormat1 format1[VAR]; + } u; + }; +-ASSERT_SIZE (MarkMarkPos, 2); + + + static inline bool position_lookup (APPLY_ARG_DEF, unsigned int lookup_index); +@@ -1272,7 +1261,6 @@ struct ContextPos : Context + return Context::apply (APPLY_ARG, position_lookup); + } + }; +-ASSERT_SIZE (ContextPos, 2); + + struct ChainContextPos : ChainContext + { +@@ -1285,7 +1273,6 @@ struct ChainContextPos : ChainContext + return ChainContext::apply (APPLY_ARG, position_lookup); + } + }; +-ASSERT_SIZE (ChainContextPos, 2); + + + struct ExtensionPos : Extension +@@ -1300,7 +1287,6 @@ struct ExtensionPos : Extension + + inline bool sanitize (SANITIZE_ARG_DEF); + }; +-ASSERT_SIZE (ExtensionPos, 2); + + + +@@ -1362,18 +1348,17 @@ struct PosLookupSubTable + private: + union { + USHORT format; +- SinglePos single[]; +- PairPos pair[]; +- CursivePos cursive[]; +- MarkBasePos markBase[]; +- MarkLigPos markLig[]; +- MarkMarkPos markMark[]; +- ContextPos context[]; +- ChainContextPos chainContext[]; +- ExtensionPos extension[]; ++ SinglePos single[VAR]; ++ PairPos pair[VAR]; ++ CursivePos cursive[VAR]; ++ MarkBasePos markBase[VAR]; ++ MarkLigPos markLig[VAR]; ++ MarkMarkPos markMark[VAR]; ++ ContextPos context[VAR]; ++ ChainContextPos chainContext[VAR]; ++ ExtensionPos extension[VAR]; + } u; + }; +-ASSERT_SIZE (PosLookupSubTable, 2); + + + struct PosLookup : Lookup +@@ -1462,7 +1447,6 @@ struct PosLookup : Lookup + return SANITIZE_THIS (list); + } + }; +-ASSERT_SIZE (PosLookup, 6); + + typedef OffsetListOf<PosLookup> PosLookupList; + ASSERT_SIZE (PosLookupList, 2); diff --git a/devel/pango/patches/patch-ah b/devel/pango/patches/patch-ah new file mode 100644 index 00000000000..b7df9911f41 --- /dev/null +++ b/devel/pango/patches/patch-ah @@ -0,0 +1,149 @@ +$NetBSD: patch-ah,v 1.1 2009/11/25 09:58:39 tron Exp $ + +See https://bugzilla.gnome.org/show_bug.cgi?id=602408 +and https://bugzilla.gnome.org/show_bug.cgi?id=602660 + +--- pango/opentype/hb-ot-layout-gsub-private.hh.orig ++++ pango/opentype/hb-ot-layout-gsub-private.hh +@@ -141,11 +141,10 @@ struct SingleSubst + private: + union { + USHORT format; /* Format identifier */ +- SingleSubstFormat1 format1[]; +- SingleSubstFormat2 format2[]; ++ SingleSubstFormat1 format1[VAR]; ++ SingleSubstFormat2 format2[VAR]; + } u; + }; +-ASSERT_SIZE (SingleSubst, 2); + + + struct Sequence +@@ -160,7 +159,7 @@ struct Sequence + return false; + + _hb_buffer_add_output_glyphs (buffer, 1, +- substitute.len, (const uint16_t *) substitute.array, ++ substitute.len, (const uint16_t *) substitute.const_array(), + 0xFFFF, 0xFFFF); + + /* This is a guess only ... */ +@@ -249,10 +248,9 @@ struct MultipleSubst + private: + union { + USHORT format; /* Format identifier */ +- MultipleSubstFormat1 format1[]; ++ MultipleSubstFormat1 format1[VAR]; + } u; + }; +-ASSERT_SIZE (MultipleSubst, 2); + + + typedef ArrayOf<GlyphID> AlternateSet; /* Array of alternate GlyphIDs--in +@@ -345,10 +343,9 @@ struct AlternateSubst + private: + union { + USHORT format; /* Format identifier */ +- AlternateSubstFormat1 format1[]; ++ AlternateSubstFormat1 format1[VAR]; + } u; + }; +-ASSERT_SIZE (AlternateSubst, 2); + + + struct Ligature +@@ -531,10 +528,9 @@ struct LigatureSubst + private: + union { + USHORT format; /* Format identifier */ +- LigatureSubstFormat1 format1[]; ++ LigatureSubstFormat1 format1[VAR]; + } u; + }; +-ASSERT_SIZE (LigatureSubst, 2); + + + +@@ -551,7 +547,6 @@ struct ContextSubst : Context + return Context::apply (APPLY_ARG, substitute_lookup); + } + }; +-ASSERT_SIZE (ContextSubst, 2); + + struct ChainContextSubst : ChainContext + { +@@ -564,7 +559,6 @@ struct ChainContextSubst : ChainContext + return ChainContext::apply (APPLY_ARG, substitute_lookup); + } + }; +-ASSERT_SIZE (ChainContextSubst, 2); + + + struct ExtensionSubst : Extension +@@ -579,7 +573,6 @@ struct ExtensionSubst : Extension + + inline bool sanitize (SANITIZE_ARG_DEF); + }; +-ASSERT_SIZE (ExtensionSubst, 2); + + + struct ReverseChainSingleSubstFormat1 +@@ -601,10 +594,10 @@ struct ReverseChainSingleSubstFormat1 + const ArrayOf<GlyphID> &substitute = CONST_NEXT (ArrayOf<GlyphID>, lookahead); + + if (match_backtrack (APPLY_ARG, +- backtrack.len, (USHORT *) backtrack.array, ++ backtrack.len, (USHORT *) backtrack.const_array(), + match_coverage, DECONST_CHARP(this)) && + match_lookahead (APPLY_ARG, +- lookahead.len, (USHORT *) lookahead.array, ++ lookahead.len, (USHORT *) lookahead.const_array(), + match_coverage, DECONST_CHARP(this), + 1)) + { +@@ -672,10 +665,9 @@ struct ReverseChainSingleSubst + private: + union { + USHORT format; /* Format identifier */ +- ReverseChainSingleSubstFormat1 format1[]; ++ ReverseChainSingleSubstFormat1 format1[VAR]; + } u; + }; +-ASSERT_SIZE (ReverseChainSingleSubst, 2); + + + +@@ -733,17 +725,16 @@ struct SubstLookupSubTable + private: + union { + USHORT format; +- SingleSubst single[]; +- MultipleSubst multiple[]; +- AlternateSubst alternate[]; +- LigatureSubst ligature[]; +- ContextSubst context[]; +- ChainContextSubst chainContext[]; +- ExtensionSubst extension[]; +- ReverseChainSingleSubst reverseChainContextSingle[]; ++ SingleSubst single[VAR]; ++ MultipleSubst multiple[VAR]; ++ AlternateSubst alternate[VAR]; ++ LigatureSubst ligature[VAR]; ++ ContextSubst context[VAR]; ++ ChainContextSubst chainContext[VAR]; ++ ExtensionSubst extension[VAR]; ++ ReverseChainSingleSubst reverseChainContextSingle[VAR]; + } u; + }; +-ASSERT_SIZE (SubstLookupSubTable, 2); + + + struct SubstLookup : Lookup +@@ -846,7 +837,6 @@ struct SubstLookup : Lookup + return SANITIZE_THIS (list); + } + }; +-ASSERT_SIZE (SubstLookup, 6); + + typedef OffsetListOf<SubstLookup> SubstLookupList; + ASSERT_SIZE (SubstLookupList, 2); diff --git a/devel/pango/patches/patch-ai b/devel/pango/patches/patch-ai new file mode 100644 index 00000000000..65d495c9e68 --- /dev/null +++ b/devel/pango/patches/patch-ai @@ -0,0 +1,122 @@ +$NetBSD: patch-ai,v 1.1 2009/11/25 09:58:39 tron Exp $ + +See https://bugzilla.gnome.org/show_bug.cgi?id=602408 +and https://bugzilla.gnome.org/show_bug.cgi?id=602660 + +--- pango/opentype/hb-ot-layout-gsubgpos-private.hh.orig ++++ pango/opentype/hb-ot-layout-gsubgpos-private.hh +@@ -307,7 +307,7 @@ struct Rule + public: + inline bool sanitize (SANITIZE_ARG_DEF) { + TRACE_SANITIZE (); +- if (!SANITIZE_SELF ()) return false; ++ if (!(SANITIZE (inputCount) && SANITIZE (lookupCount))) return false; + return SANITIZE_MEM (input, + sizeof (input[0]) * inputCount + + sizeof (lookupRecordX[0]) * lookupCount); +@@ -318,12 +318,12 @@ struct Rule + * glyph sequence--includes the first + * glyph */ + USHORT lookupCount; /* Number of LookupRecords */ +- USHORT input[]; /* Array of match inputs--start with ++ USHORT input[VAR]; /* Array of match inputs--start with + * second glyph */ +- LookupRecord lookupRecordX[]; /* Array of LookupRecords--in ++ LookupRecord lookupRecordX[VAR]; /* Array of LookupRecords--in + * design order */ + }; +-ASSERT_SIZE (Rule, 4); ++ASSERT_SIZE_VAR2 (Rule, 4, USHORT, LookupRecord); + + struct RuleSet + { +@@ -473,12 +473,12 @@ struct ContextFormat3 + * sequence */ + USHORT lookupCount; /* Number of LookupRecords */ + OffsetTo<Coverage> +- coverage[]; /* Array of offsets to Coverage ++ coverage[VAR]; /* Array of offsets to Coverage + * table in glyph sequence order */ +- LookupRecord lookupRecordX[]; /* Array of LookupRecords--in ++ LookupRecord lookupRecordX[VAR]; /* Array of LookupRecords--in + * design order */ + }; +-ASSERT_SIZE (ContextFormat3, 6); ++ASSERT_SIZE_VAR2 (ContextFormat3, 6, OffsetTo<Coverage>, LookupRecord); + + struct Context + { +@@ -508,12 +508,11 @@ struct Context + private: + union { + USHORT format; /* Format identifier */ +- ContextFormat1 format1[]; +- ContextFormat2 format2[]; +- ContextFormat3 format3[]; ++ ContextFormat1 format1[VAR]; ++ ContextFormat2 format2[VAR]; ++ ContextFormat3 format3[VAR]; + } u; + }; +-ASSERT_SIZE (Context, 2); + + + /* Chaining Contextual lookups */ +@@ -572,10 +571,10 @@ struct ChainRule + const ArrayOf<USHORT> &lookahead = CONST_NEXT (ArrayOf<USHORT>, input); + const ArrayOf<LookupRecord> &lookup = CONST_NEXT (ArrayOf<LookupRecord>, lookahead); + return chain_context_lookup (APPLY_ARG, +- backtrack.len, backtrack.array, +- input.len, input.array, +- lookahead.len, lookahead.array, +- lookup.len, lookup.array, ++ backtrack.len, backtrack.const_array(), ++ input.len, input.const_array(), ++ lookahead.len, lookahead.const_array(), ++ lookup.len, lookup.const_array(), + lookup_context); + return false; + } +@@ -754,10 +753,10 @@ struct ChainContextFormat3 + {DECONST_CHARP(this), DECONST_CHARP(this), DECONST_CHARP(this)} + }; + return chain_context_lookup (APPLY_ARG, +- backtrack.len, (USHORT *) backtrack.array, +- input.len, (USHORT *) input.array + 1, +- lookahead.len, (USHORT *) lookahead.array, +- lookup.len, lookup.array, ++ backtrack.len, (const USHORT *) backtrack.const_array(), ++ input.len, (const USHORT *) input.const_array() + 1, ++ lookahead.len, (const USHORT *) lookahead.const_array(), ++ lookup.len, lookup.const_array(), + lookup_context); + return false; + } +@@ -821,12 +820,11 @@ struct ChainContext + private: + union { + USHORT format; /* Format identifier */ +- ChainContextFormat1 format1[]; +- ChainContextFormat2 format2[]; +- ChainContextFormat3 format3[]; ++ ChainContextFormat1 format1[VAR]; ++ ChainContextFormat2 format2[VAR]; ++ ChainContextFormat3 format3[VAR]; + } u; + }; +-ASSERT_SIZE (ChainContext, 2); + + + struct ExtensionFormat1 +@@ -889,10 +887,9 @@ struct Extension + private: + union { + USHORT format; /* Format identifier */ +- ExtensionFormat1 format1[]; ++ ExtensionFormat1 format1[VAR]; + } u; + }; +-ASSERT_SIZE (Extension, 2); + + + /* diff --git a/devel/pango/patches/patch-aj b/devel/pango/patches/patch-aj new file mode 100644 index 00000000000..842f15a63c2 --- /dev/null +++ b/devel/pango/patches/patch-aj @@ -0,0 +1,19 @@ +$NetBSD: patch-aj,v 1.1 2009/11/25 09:58:39 tron Exp $ + +See https://bugzilla.gnome.org/show_bug.cgi?id=602408 +and https://bugzilla.gnome.org/show_bug.cgi?id=602660 + +--- pango/opentype/hb-private.h.orig ++++ pango/opentype/hb-private.h +@@ -130,6 +130,11 @@ typedef GStaticMutex hb_mutex_t; + + #define ASSERT_SIZE(_type, _size) ASSERT_STATIC (sizeof (_type) == (_size)) + ++#define VAR 1 /* Size signifying variable-sized array */ ++#define ASSERT_SIZE_VAR(_type, _size, _var_type) \ ++ ASSERT_STATIC (sizeof (_type) == (_size) + VAR * sizeof (_var_type)) ++#define ASSERT_SIZE_VAR2(_type, _size, _var_type1, _var_type2) \ ++ ASSERT_STATIC (sizeof (_type) == (_size) + VAR * sizeof (_var_type1) + VAR * sizeof (_var_type2)) + + #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) + #define _HB_BOOLEAN_EXPR(expr) \ diff --git a/devel/pango/patches/patch-ak b/devel/pango/patches/patch-ak new file mode 100644 index 00000000000..4c599710989 --- /dev/null +++ b/devel/pango/patches/patch-ak @@ -0,0 +1,17 @@ +$NetBSD: patch-ak,v 1.1 2009/11/25 09:58:39 tron Exp $ + +"glyphstring.c", line 350: void function cannot return value + +--- pango/glyphstring.c.orig Tue Nov 24 11:28:11 2009 ++++ pango/glyphstring.c Tue Nov 24 11:29:25 2009 +@@ -347,7 +347,9 @@ + NULL}}; + PangoGlyphItem glyph_item = {&item, glyphs}; + +- return pango_glyph_item_get_logical_widths (&glyph_item, text, logical_widths); ++ pango_glyph_item_get_logical_widths (&glyph_item, text, logical_widths); ++ ++ return; + } + + /* The initial implementation here is script independent, diff --git a/devel/pango/patches/patch-al b/devel/pango/patches/patch-al new file mode 100644 index 00000000000..96c5323a418 --- /dev/null +++ b/devel/pango/patches/patch-al @@ -0,0 +1,19 @@ +$NetBSD: patch-al,v 1.1 2009/11/25 09:58:39 tron Exp $ + +See https://bugzilla.gnome.org/show_bug.cgi?id=602408 +and https://bugzilla.gnome.org/show_bug.cgi?id=602660 + +--- pango/opentype/hb-open-file-private.hh.orig ++++ pango/opentype/hb-open-file-private.hh +@@ -122,9 +122,9 @@ typedef struct OffsetTable + USHORT searchRange; /* (Maximum power of 2 <= numTables) x 16 */ + USHORT entrySelector; /* Log2(maximum power of 2 <= numTables). */ + USHORT rangeShift; /* NumTables x 16-searchRange. */ +- TableDirectory tableDir[]; /* TableDirectory entries. numTables items */ ++ TableDirectory tableDir[VAR]; /* TableDirectory entries. numTables items */ + } OpenTypeFontFace; +-ASSERT_SIZE (OffsetTable, 12); ++ASSERT_SIZE_VAR (OffsetTable, 12, TableDirectory); + + /* + * TrueType Collections |