Source: haskell-text-icu Version: 0.7.0.1-14 Severity: normal Tags: ftbfs patch Usertags: ICU70.1
Hi, Soon I would like to start the ICU 70.1 transition. Your package FTBFS with this release. One reason is that since ICU 68.1 it doesn't define TRUE and FALSE constants. You need to use the C99 / C++ ones which are lowercase ones. Another reason is the update to Unicode 14 for which the newer-icu patch needs to be updated. Patch is attached to make these easy for you. Regards, Laszlo/GCS
diff -Nru a/debian/patches/lowercase_true.patch b/debian/patches/lowercase_true.patch --- a/debian/patches/lowercase_true.patch 1970-01-01 01:00:00.000000000 +0100 +++ b/debian/patches/lowercase_true.patch 2022-01-20 18:54:16.000000000 +0100 @@ -0,0 +1,19 @@ +Description: since ICU 68.1 TRUE and FALSE are no longer defined + Use their C99 / C++ analogues, ie use them in lowercase. +Author: Laszlo Boszormenyi (GCS) <g...@debian.org> +Forwarded: no +Last-Update: 2022-01-20 + +--- + +--- haskell-text-icu-0.7.0.1.orig/cbits/text_icu.c ++++ haskell-text-icu-0.7.0.1/cbits/text_icu.c +@@ -305,7 +305,7 @@ int32_t __hs_u_strFoldCase(UChar *dest, + + int32_t __hs_u_strCompareIter(UCharIterator *iter1, UCharIterator *iter2) + { +- return u_strCompareIter(iter1, iter2, TRUE); ++ return u_strCompareIter(iter1, iter2, true); + } + + UBlockCode __hs_ublock_getCode(UChar32 c) diff -Nru a/debian/patches/newer-icu b/debian/patches/newer-icu --- a/debian/patches/newer-icu 2020-08-19 12:06:30.000000000 +0200 +++ b/debian/patches/newer-icu 2022-01-20 18:54:13.000000000 +0100 @@ -1,17 +1,22 @@ --- a/Data/Text/ICU/Char.hsc +++ b/Data/Text/ICU/Char.hsc -@@ -129,6 +129,10 @@ - | PopDirectionalFormat - | DirNonSpacingMark - | BoundaryNeutral -+ | FirstStrongIsolate -+ | LeftToRightIsolate -+ | RightToLeftIsolate -+ | PopDirectionalIsolate - deriving (Eq, Enum, Show, Typeable) - - instance NFData Direction where -@@ -357,6 +361,94 @@ +@@ -51,6 +51,7 @@ module Data.Text.ICU.Char + , LineBreak_(..) + , SentenceBreak_(..) + , WordBreak_(..) ++ , BidiPairedBracketType_(..) + -- * Property value types + , BlockCode(..) + , Direction(..) +@@ -66,6 +67,7 @@ module Data.Text.ICU.Char + , LineBreak(..) + , SentenceBreak(..) + , WordBreak(..) ++ , BidiPairedBracketType(..) + -- * Functions + , blockCode + , charFullName +@@ -357,6 +359,48 @@ data BlockCode = | SoraSompeng | SundaneseSupplement | Takri @@ -57,52 +62,108 @@ + | OldHungarian + | SupplementalSymbolsAndPictographs + | SuttonSignwriting -+ | Adlam -+ | Bhaiksuki -+ | CyrillicExtendedC -+ | GlagoliticSupplement -+ | IdeographicSymbolsAndPunctuation -+ | Marchen -+ | MongolianSupplement -+ | Newa -+ | Osage -+ | Tangut -+ | TangutComponents -+ | CJKUnifiedIdeographsExtensionF -+ | KanaExtendedA -+ | MasaramGondi -+ | Nushu -+ | Soyombo -+ | SyriacSupplement -+ | ZanabazarSquare -+ | ChessSymbols -+ | Dogra -+ | GeorgianExtended -+ | GunjalaGondi -+ | HanifiRohingya -+ | IndicSiyaqNumbers -+ | Makasar -+ | MayanNumerals -+ | Medefaidrin -+ | OldSogdian -+ | Sogdian -+ | EgyptianHieroglyphFormatControls -+ | Elymaic -+ | Nandinagari -+ | NyiakengPuachueHmong -+ | OttomanSiyaqNumbers -+ | SmallKanaExtension -+ | SymbolsAndPictographsExtendedA -+ | TamilSupplement -+ | Wancho -+ | Chorasmian -+ | CjkUnifiedIdeographsExtensionG -+ | DivesAkuru -+ | KhitanSmallScript -+ | LisuSupplement -+ | SymbolsForLegacyComputing -+ | TangutSupplement -+ | Yezidi deriving (Eq, Enum, Bounded, Show, Typeable) instance NFData BlockCode where +@@ -475,6 +519,16 @@ data Bool_ = + -- ^ Printable character class. + | POSIXXDigit + -- ^ Hex digit character class. ++ | Cased ++ -- ^ Cased character class. For lowercase, uppercase and titlecase characters. ++ | CaseIgnorable ++ -- ^ Used in context-sensitive case mappings. ++ | ChangesWhenLowercased ++ | ChangesWhenUppercased ++ | ChangesWhenTitlecased ++ | ChangesWhenCasefolded ++ | ChangesWhenCasemapped ++ | ChangesWhenNFKCCasefolded + deriving (Eq, Enum, Show, Typeable) + + instance NFData Bool_ where +@@ -678,6 +732,37 @@ data JoiningGroup = + | Khaph + | Zhain + | BurushaskiYehBarree ++ | FarsiYeh ++ | Nya ++ | RohingyaYeh ++ | ManichaeanAleph ++ | ManichaeanAyin ++ | ManichaeanBeth ++ | ManichaeanDaleth ++ | ManichaeanDhamedh ++ | ManichaeanFive ++ | ManichaeanGimel ++ | ManichaeanHeth ++ | ManichaeanHundred ++ | ManichaeanKaph ++ | ManichaeanLamedh ++ | ManichaeanMem ++ | ManichaeanNun ++ | ManichaeanOne ++ | ManichaeanPe ++ | ManichaeanQoph ++ | ManichaeanResh ++ | ManichaeanSadhe ++ | ManichaeanSamekh ++ | ManichaeanTaw ++ | ManichaeanTen ++ | ManichaeanTeth ++ | ManichaeanThamedh ++ | ManichaeanTwenty ++ | ManichaeanWaw ++ | ManichaeanYodh ++ | ManichaeanZayin ++ | StraightWaw + deriving (Eq, Enum, Show, Typeable) + + instance NFData JoiningGroup where +@@ -748,6 +833,10 @@ data LineBreak = + | JL + | JT + | JV ++ | CloseParenthesis ++ | ConditionalJapaneseStarter ++ | LBHebrewLetter ++ | LBRegionalIndicator + deriving (Eq, Enum, Show, Typeable) + + instance NFData LineBreak where +@@ -918,6 +1007,10 @@ data WordBreak = + | WBLF + | WBMidNumLet + | WBNewline ++ | RegionalIndicator ++ | HebrewLetter ++ | SingleQuote ++ | DoubleQuote + deriving (Eq, Enum, Show, Typeable) + + instance NFData WordBreak where +@@ -927,6 +1020,24 @@ instance Property WordBreak_ (Maybe Word + fromNative _ = maybeEnum + toUProperty _ = (#const UCHAR_WORD_BREAK) + ++data BidiPairedBracketType_ = BidiPairedBracketType deriving (Show, Typeable) ++ ++instance NFData BidiPairedBracketType_ where ++ rnf !_ = () ++ ++data BidiPairedBracketType = ++ BPTNone ++ | BPTOpen ++ | BPTClose ++ deriving (Eq, Enum, Show, Typeable) ++ ++instance NFData BidiPairedBracketType where ++ rnf !_ = () ++ ++instance Property BidiPairedBracketType_ (Maybe BidiPairedBracketType) where ++ fromNative _ = maybeEnum ++ toUProperty _ = (#const UCHAR_BIDI_PAIRED_BRACKET_TYPE) ++ + property :: Property p v => p -> Char -> v + property p c = fromNative p . u_getIntPropertyValue (fromIntegral (ord c)) . + toUProperty $ p diff -Nru a/debian/patches/series b/debian/patches/series --- a/debian/patches/series 2018-07-04 16:04:33.000000000 +0200 +++ b/debian/patches/series 2022-01-20 18:54:16.000000000 +0100 @@ -1,2 +1,3 @@ newer-deepseq newer-icu +lowercase_true.patch