@@ -41,6 +41,7 @@ (define-module (gnu packages build-tools)
#:use-module (guix git-download)
#:use-module (guix git)
#:use-module (guix build-system cmake)
+ #:use-module (guix modules)
#:use-module (gnu packages)
#:use-module (gnu packages adns)
#:use-module (gnu packages autotools)
@@ -52,6 +53,7 @@ (define-module (gnu packages build-tools)
#:use-module (gnu packages cpp)
#:use-module (gnu packages cppi)
#:use-module (gnu packages elf)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages linux)
#:use-module (gnu packages lisp)
#:use-module (gnu packages logging)
@@ -72,6 +74,7 @@ (define-module (gnu packages build-tools)
#:use-module (gnu packages rpc)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages unicode)
#:use-module (gnu packages version-control)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python))
@@ -827,7 +830,350 @@ (define*-public (gnulib-checkout #:key
(url "https://git.savannah.gnu.org/git/gnulib.git")
(commit commit)))
(file-name (git-file-name name version))
- (sha256 hash)))
+ (sha256 hash)
+ (snippet
+ (with-imported-modules (source-module-closure '((guix build utils)))
+ #~(begin
+ (use-modules (guix build utils))
+ (for-each delete-file-recursively
+ `("tests/unicase/test-ignorable.c"
+ "tests/unicase/test-uc_toupper.c"
+ "tests/unicase/test-uc_tolower.c"
+ "tests/unicase/test-cased.c"
+ "tests/unicase/test-uc_totitle.c"
+ "tests/unigbrk/test-uc-gbrk-prop.h"
+ "tests/unictype/test-pr_zero_width.c"
+ "tests/unictype/test-pr_ascii_hex_digit.c"
+ "tests/unictype/test-ctype_xdigit.c"
+ "tests/unictype/test-digit.h"
+ "tests/unictype/test-pr_grapheme_extend.c"
+ "tests/unictype/test-ctype_cntrl.c"
+ "tests/unictype/test-pr_default_ignorable_code_point.c"
+ "tests/unictype/test-categ_Nd.c"
+ "tests/unictype/test-decdigit.h"
+ "tests/unictype/test-pr_currency_symbol.c"
+ "tests/unictype/test-pr_logical_order_exception.c"
+ "tests/unictype/test-pr_bidi_common_separator.c"
+ "tests/unictype/test-pr_space.c"
+ "tests/unictype/test-pr_ids_trinary_operator.c"
+ "tests/unictype/test-pr_decimal_digit.c"
+ "tests/unictype/test-categ_Lo.c"
+ "tests/unictype/test-categ_Cn.c"
+ "tests/unictype/test-categ_Mn.c"
+ "tests/unictype/test-pr_line_separator.c"
+ "tests/unictype/test-ctype_upper.c"
+ "tests/unictype/test-pr_extender.c"
+ "tests/unictype/test-pr_other_default_ignorable_code_point.c"
+ "tests/unictype/test-pr_uppercase.c"
+ "tests/unictype/test-categ_Ll.c"
+ "tests/unictype/test-ctype_alpha.c"
+ "tests/unictype/test-pr_changes_when_lowercased.c"
+ "tests/unictype/test-categ_Sm.c"
+ "tests/unictype/test-pr_variation_selector.c"
+ "tests/unictype/test-pr_white_space.c"
+ "tests/unictype/test-pr_ideographic.c"
+ "tests/unictype/test-joininggroup_of.h"
+ "tests/unictype/test-ctype_lower.c"
+ "tests/unictype/test-pr_quotation_mark.c"
+ "tests/unictype/test-pr_bidi_block_separator.c"
+ "tests/unictype/test-ctype_blank.c"
+ "tests/unictype/test-pr_bidi_eur_num_terminator.c"
+ "tests/unictype/test-pr_bidi_pdf.c"
+ "tests/unictype/test-pr_deprecated.c"
+ "tests/unictype/test-pr_grapheme_base.c"
+ "tests/unictype/test-sy_java_whitespace.c"
+ "tests/unictype/test-pr_other_alphabetic.c"
+ "tests/unictype/test-categ_C.c"
+ "tests/unictype/test-categ_Cc.c"
+ "tests/unictype/test-pr_id_continue.c"
+ "tests/unictype/test-pr_changes_when_uppercased.c"
+ "tests/unictype/test-pr_bidi_control.c"
+ "tests/unictype/test-pr_changes_when_casemapped.c"
+ "tests/unictype/test-categ_S.c"
+ "tests/unictype/test-pr_pattern_white_space.c"
+ "tests/unictype/test-pr_format_control.c"
+ "tests/unictype/test-categ_N.c"
+ "tests/unictype/test-categ_LC.c"
+ "tests/unictype/test-pr_bidi_arabic_right_to_left.c"
+ "tests/unictype/test-categ_Nl.c"
+ "tests/unictype/test-pr_other_uppercase.c"
+ "tests/unictype/test-pr_other_grapheme_extend.c"
+ "tests/unictype/test-pr_diacritic.c"
+ "tests/unictype/test-pr_join_control.c"
+ "tests/unictype/test-pr_composite.c"
+ "tests/unictype/test-pr_extended_pictographic.c"
+ "tests/unictype/test-pr_combining.c"
+ "tests/unictype/test-categ_Lm.c"
+ "tests/unictype/test-pr_other_id_continue.c"
+ "tests/unictype/test-pr_xid_continue.c"
+ "tests/unictype/test-pr_ids_binary_operator.c"
+ "tests/unictype/test-pr_bidi_left_to_right.c"
+ "tests/unictype/test-pr_bidi_non_spacing_mark.c"
+ "tests/unictype/test-categ_Zl.c"
+ "tests/unictype/test-pr_sentence_terminal.c"
+ "tests/unictype/test-categ_Co.c"
+ "tests/unictype/test-pr_non_break.c"
+ "tests/unictype/test-pr_math.c"
+ "tests/unictype/test-ctype_punct.c"
+ "tests/unictype/test-pr_other_id_start.c"
+ "tests/unictype/test-ctype_digit.c"
+ "tests/unictype/test-pr_bidi_eur_num_separator.c"
+ "tests/unictype/test-pr_id_start.c"
+ "tests/unictype/test-pr_numeric.c"
+ "tests/unictype/test-categ_Pe.c"
+ "tests/unictype/test-pr_lowercase.c"
+ "tests/unictype/test-pr_hex_digit.c"
+ "tests/unictype/test-pr_emoji_presentation.c"
+ "tests/unictype/test-pr_ignorable_control.c"
+ "tests/unictype/test-categ_Pi.c"
+ "tests/unictype/test-pr_bidi_boundary_neutral.c"
+ "tests/unictype/test-pr_changes_when_titlecased.c"
+ "tests/unictype/test-categ_Cf.c"
+ "tests/unictype/test-pr_emoji_modifier.c"
+ "tests/unictype/test-pr_alphabetic.c"
+ "tests/unictype/test-pr_changes_when_casefolded.c"
+ "tests/unictype/test-pr_left_of_pair.c"
+ "tests/unictype/test-pr_radical.c"
+ "tests/unictype/test-pr_pattern_syntax.c"
+ "tests/unictype/test-categ_L.c"
+ "tests/unictype/test-pr_other_lowercase.c"
+ "tests/unictype/test-categ_Pf.c"
+ "tests/unictype/test-ctype_print.c"
+ "tests/unictype/test-pr_bidi_whitespace.c"
+ "tests/unictype/test-numeric.h"
+ "tests/unictype/test-pr_paired_punctuation.c"
+ "tests/unictype/test-pr_emoji_modifier_base.c"
+ "tests/unictype/test-categ_Ps.c"
+ "tests/unictype/test-pr_dash.c"
+ "tests/unictype/test-pr_bidi_european_digit.c"
+ "tests/unictype/test-categ_P.c"
+ "tests/unictype/test-pr_grapheme_link.c"
+ "tests/unictype/test-categ_Lu.c"
+ "tests/unictype/test-categ_No.c"
+ "tests/unictype/test-pr_emoji.c"
+ "tests/unictype/test-categ_M.c"
+ "tests/unictype/test-pr_regional_indicator.c"
+ "tests/unictype/test-categ_Zs.c"
+ "tests/unictype/test-categ_Sk.c"
+ "tests/unictype/test-sy_c_whitespace.c"
+ "tests/unictype/test-pr_unified_ideograph.c"
+ "tests/unictype/test-categ_Cs.c"
+ "tests/unictype/test-pr_case_ignorable.c"
+ "tests/unictype/test-categ_Sc.c"
+ "tests/unictype/test-categ_So.c"
+ "tests/unictype/test-pr_bidi_hebrew_right_to_left.c"
+ "tests/unictype/test-categ_Po.c"
+ "tests/unictype/test-joiningtype_of.h"
+ "tests/unictype/test-pr_soft_dotted.c"
+ "tests/unictype/test-categ_Pd.c"
+ "tests/unictype/test-categ_Z.c"
+ "tests/unictype/test-categ_Zp.c"
+ "tests/unictype/test-ctype_space.c"
+ "tests/unictype/test-pr_emoji_component.c"
+ "tests/unictype/test-pr_bidi_other_neutral.c"
+ "tests/unictype/test-pr_other_math.c"
+ "tests/unictype/test-pr_private_use.c"
+ "tests/unictype/test-pr_cased.c"
+ "tests/unictype/test-pr_terminal_punctuation.c"
+ "tests/unictype/test-categ_Me.c"
+ "tests/unictype/test-ctype_graph.c"
+ "tests/unictype/test-pr_unassigned_code_value.c"
+ "tests/unictype/test-categ_Lt.c"
+ "tests/unictype/test-categ_Pc.c"
+ "tests/unictype/test-pr_punctuation.c"
+ "tests/unictype/test-pr_bidi_segment_separator.c"
+ "tests/unictype/test-pr_paragraph_separator.c"
+ "tests/unictype/test-pr_xid_start.c"
+ "tests/unictype/test-pr_bidi_embedding_or_override.c"
+ "tests/unictype/test-categ_Mc.c"
+ "tests/unictype/test-pr_bidi_arabic_digit.c"
+ "tests/unictype/test-pr_titlecase.c"
+ "tests/unictype/test-pr_iso_control.c"
+ "tests/unictype/test-pr_not_a_character.c"
+ "tests/unictype/test-pr_hyphen.c"
+ "tests/unictype/test-ctype_alnum.c"
+ "lib/unicase/ignorable.h"
+ "lib/unicase/special-casing-table.gperf"
+ "lib/unicase/tolower.h"
+ "lib/unicase/toupper.h"
+ "lib/unicase/tocasefold.h"
+ "lib/unicase/totitle.h"
+ "lib/unicase/cased.h"
+ "lib/uniwidth/width0.h"
+ "lib/uniwidth/width2.h"
+ "lib/unigbrk/gbrkprop.h"
+ "lib/uninorm/composition-table.gperf"
+ "lib/uninorm/decomposition-table1.h"
+ "lib/uninorm/decomposition-table2.h"
+ "lib/uniname/uninames.h"
+ "lib/uniwbrk/wbrkprop.h"
+ "lib/unilbrk/lbrktables.c"
+ "lib/unilbrk/lbrkprop1.h"
+ "lib/unilbrk/lbrkprop2.h"
+ "lib/unictype/pr_radical.h"
+ "lib/unictype/pr_other_math.h"
+ "lib/unictype/pr_dash.h"
+ "lib/unictype/pr_combining.h"
+ "lib/unictype/pr_not_a_character.h"
+ "lib/unictype/pr_math.h"
+ "lib/unictype/pr_terminal_punctuation.h"
+ "lib/unictype/pr_id_start.h"
+ "lib/unictype/pr_quotation_mark.h"
+ "lib/unictype/pr_changes_when_titlecased.h"
+ "lib/unictype/categ_Mc.h"
+ "lib/unictype/pr_deprecated.h"
+ "lib/unictype/categ_Cf.h"
+ "lib/unictype/pr_zero_width.h"
+ "lib/unictype/pr_emoji_modifier_base.h"
+ "lib/unictype/ctype_blank.h"
+ "lib/unictype/joininggroup_of.h"
+ "lib/unictype/categ_Sk.h"
+ "lib/unictype/pr_paired_punctuation.h"
+ "lib/unictype/pr_decimal_digit.h"
+ "lib/unictype/pr_other_uppercase.h"
+ "lib/unictype/categ_Cn.h"
+ "lib/unictype/categ_of.h"
+ "lib/unictype/sy_c_whitespace.h"
+ "lib/unictype/pr_composite.h"
+ "lib/unictype/pr_other_grapheme_extend.h"
+ "lib/unictype/pr_other_id_continue.h"
+ "lib/unictype/pr_paragraph_separator.h"
+ "lib/unictype/pr_bidi_whitespace.h"
+ "lib/unictype/scripts.h"
+ "lib/unictype/ctype_graph.h"
+ "lib/unictype/pr_bidi_arabic_right_to_left.h"
+ "lib/unictype/categ_Lu.h"
+ "lib/unictype/pr_hyphen.h"
+ "lib/unictype/pr_changes_when_casemapped.h"
+ "lib/unictype/categ_Pe.h"
+ "lib/unictype/pr_hex_digit.h"
+ "lib/unictype/pr_id_continue.h"
+ "lib/unictype/pr_pattern_white_space.h"
+ "lib/unictype/joiningtype_of.h"
+ "lib/unictype/ctype_upper.h"
+ "lib/unictype/pr_extender.h"
+ "lib/unictype/pr_iso_control.h"
+ "lib/unictype/ctype_lower.h"
+ "lib/unictype/categ_Ps.h"
+ "lib/unictype/categ_Sc.h"
+ "lib/unictype/ctype_print.h"
+ "lib/unictype/sy_java_ident.h"
+ "lib/unictype/ctype_alnum.h"
+ "lib/unictype/pr_ideographic.h"
+ "lib/unictype/pr_titlecase.h"
+ "lib/unictype/categ_N.h"
+ "lib/unictype/pr_changes_when_casefolded.h"
+ "lib/unictype/pr_soft_dotted.h"
+ "lib/unictype/categ_Z.h"
+ "lib/unictype/categ_Lm.h"
+ "lib/unictype/categ_P.h"
+ "lib/unictype/pr_emoji_component.h"
+ "lib/unictype/pr_space.h"
+ "lib/unictype/pr_other_lowercase.h"
+ "lib/unictype/pr_bidi_eur_num_separator.h"
+ "lib/unictype/pr_bidi_eur_num_terminator.h"
+ "lib/unictype/ctype_alpha.h"
+ "lib/unictype/numeric.h"
+ "lib/unictype/pr_grapheme_base.h"
+ "lib/unictype/ctype_xdigit.h"
+ "lib/unictype/pr_bidi_embedding_or_override.h"
+ "lib/unictype/blocks.h"
+ "lib/unictype/categ_No.h"
+ "lib/unictype/pr_ascii_hex_digit.h"
+ "lib/unictype/pr_bidi_european_digit.h"
+ "lib/unictype/pr_format_control.h"
+ "lib/unictype/pr_join_control.h"
+ "lib/unictype/pr_case_ignorable.h"
+ "lib/unictype/ctype_space.h"
+ "lib/unictype/pr_bidi_control.h"
+ "lib/unictype/pr_diacritic.h"
+ "lib/unictype/categ_Zs.h"
+ "lib/unictype/mirror.h"
+ "lib/unictype/categ_Zl.h"
+ "lib/unictype/pr_bidi_hebrew_right_to_left.h"
+ "lib/unictype/decdigit.h"
+ "lib/unictype/categ_Nd.h"
+ "lib/unictype/pr_sentence_terminal.h"
+ "lib/unictype/combiningclass.h"
+ "lib/unictype/categ_S.h"
+ "lib/unictype/pr_bidi_arabic_digit.h"
+ "lib/unictype/digit.h"
+ "lib/unictype/categ_So.h"
+ "lib/unictype/pr_changes_when_uppercased.h"
+ "lib/unictype/pr_other_alphabetic.h"
+ "lib/unictype/pr_emoji_presentation.h"
+ "lib/unictype/pr_ignorable_control.h"
+ "lib/unictype/categ_Cs.h"
+ "lib/unictype/sy_java_whitespace.h"
+ "lib/unictype/pr_changes_when_lowercased.h"
+ "lib/unictype/pr_ids_binary_operator.h"
+ "lib/unictype/categ_Ll.h"
+ "lib/unictype/pr_logical_order_exception.h"
+ "lib/unictype/pr_bidi_pdf.h"
+ "lib/unictype/sy_c_ident.h"
+ "lib/unictype/categ_Sm.h"
+ "lib/unictype/pr_non_break.h"
+ "lib/unictype/categ_Zp.h"
+ "lib/unictype/categ_Pc.h"
+ "lib/unictype/pr_bidi_common_separator.h"
+ "lib/unictype/pr_grapheme_extend.h"
+ "lib/unictype/categ_Pd.h"
+ "lib/unictype/categ_Mn.h"
+ "lib/unictype/pr_extended_pictographic.h"
+ "lib/unictype/categ_Lo.h"
+ "lib/unictype/pr_currency_symbol.h"
+ "lib/unictype/pr_unassigned_code_value.h"
+ "lib/unictype/categ_Cc.h"
+ "lib/unictype/pr_xid_continue.h"
+ "lib/unictype/pr_numeric.h"
+ "lib/unictype/categ_LC.h"
+ "lib/unictype/pr_bidi_segment_separator.h"
+ "lib/unictype/categ_M.h"
+ "lib/unictype/ctype_cntrl.h"
+ "lib/unictype/pr_ids_trinary_operator.h"
+ "lib/unictype/pr_private_use.h"
+ "lib/unictype/categ_Pi.h"
+ "lib/unictype/categ_Lt.h"
+ "lib/unictype/pr_variation_selector.h"
+ "lib/unictype/categ_L.h"
+ "lib/unictype/pr_emoji_modifier.h"
+ "lib/unictype/pr_alphabetic.h"
+ "lib/unictype/ctype_punct.h"
+ "lib/unictype/pr_bidi_boundary_neutral.h"
+ "lib/unictype/pr_uppercase.h"
+ "lib/unictype/pr_xid_start.h"
+ "lib/unictype/categ_Po.h"
+ "lib/unictype/scripts_byname.gperf"
+ "lib/unictype/pr_default_ignorable_code_point.h"
+ "lib/unictype/pr_bidi_non_spacing_mark.h"
+ "lib/unictype/bidi_of.h"
+ "lib/unictype/pr_white_space.h"
+ "lib/unictype/pr_left_of_pair.h"
+ "lib/unictype/categ_Nl.h"
+ "lib/unictype/pr_other_id_start.h"
+ "lib/unictype/categ_C.h"
+ "lib/unictype/pr_bidi_left_to_right.h"
+ "lib/unictype/categ_Me.h"
+ "lib/unictype/pr_cased.h"
+ "lib/unictype/categ_Pf.h"
+ "lib/unictype/pr_other_default_ignorable_code_point.h"
+ "lib/unictype/pr_unified_ideograph.h"
+ "lib/unictype/pr_grapheme_link.h"
+ "lib/unictype/pr_pattern_syntax.h"
+ "lib/unictype/pr_bidi_block_separator.h"
+ "lib/unictype/categ_Co.h"
+ "lib/unictype/pr_punctuation.h"
+ "lib/unictype/pr_bidi_other_neutral.h"
+ "lib/unictype/pr_line_separator.h"
+ "lib/unictype/ctype_digit.h"
+ "lib/unictype/pr_lowercase.h"
+ "lib/unictype/pr_emoji.h"
+ "tests/unigbrk/GraphemeBreakTest.txt"
+ "tests/uninorm/NormalizationTest.txt"
+ "tests/uniname/UnicodeData.txt"
+ "tests/uniname/NameAliases.txt"
+ ;; I could not find a replacement for tests/unigbrk/HangulSyllableNames.txt
+ "tests/uniwbrk/WordBreakTest.txt")))))))
(build-system gnu-build-system)
(arguments
(list
@@ -876,6 +1222,48 @@ (define*-public (gnulib-checkout #:key
(("sc_prohibit_leading_TABs")
"disabled_prohibit_leading_TABs"))))
(delete 'configure)
+ (add-after 'unpack 'regenerate-unicode
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "lib"
+ ;; See the compile-command buffer-local variable in
+ ;; lib/gen-uni-tables.c
+ (invoke #+(file-append gcc "/bin/gcc") "-O" "-Wall" "gen-uni-tables.c"
+ "-Iunictype" "-o" "gen-uni-tables")
+ (apply invoke
+ "./gen-uni-tables"
+ `(,@(map (lambda (f)
+ (search-input-file inputs f))
+ '("share/ucd/UnicodeData.txt"
+ "share/ucd/PropList.txt"
+ "share/ucd/DerivedCoreProperties.txt"
+ "share/ucd/emoji/emoji-data.txt"
+ "share/ucd/ArabicShaping.txt"
+ "share/ucd/Scripts.txt"
+ "share/ucd/Blocks.txt"
+ "share/ucd/PropList-3.0.1.txt"
+ "share/ucd/EastAsianWidth.txt"
+ "share/ucd/LineBreak.txt"
+ "share/ucd/auxiliary/WordBreakProperty.txt"
+ "share/ucd/auxiliary/GraphemeBreakProperty.txt"
+ "share/ucd/CompositionExclusions.txt"
+ "share/ucd/SpecialCasing.txt"
+ "share/ucd/CaseFolding.txt"))
+ #$(package-version ucd)))
+ (invoke "clisp" "-C" "uniname/gen-uninames.lisp"
+ (search-input-file inputs "share/ucd/UnicodeData.txt")
+ "uniname/uninames.h"
+ (search-input-file inputs "share/ucd/NameAliases.txt"))
+ (copy-file (search-input-file inputs "share/ucd/NameAliases.txt")
+ "../tests/uniname/NameAliases.txt")
+ (copy-file (search-input-file inputs "share/ucd/UnicodeData.txt")
+ "../tests/uniname/UnicodeData.txt")
+ (copy-file (search-input-file inputs "share/ucd/NormalizationTest.txt")
+ "../tests/uninorm/NormalizationTest.txt")
+ (copy-file (search-input-file inputs "share/ucd/auxiliary/GraphemeBreakTest.txt")
+ "../tests/unigbrk/GraphemeBreakTest.txt")
+ (copy-file (search-input-file inputs "share/ucd/auxiliary/WordBreakTest.txt")
+ "../tests/uniwbrk/WordBreakTest.txt")
+ (delete-file "gen-uni-tables"))))
(replace 'install
(lambda _
(install-file "gnulib-tool"
@@ -883,9 +1271,14 @@ (define*-public (gnulib-checkout #:key
(delete-file-recursively ".git")
(copy-recursively "." (string-append #$output "/src/gnulib/")))))))
(inputs ;; Shebangs for some auxiliary build files.
- (list python perl clisp
- ;; Programs for the tests:
- cppi indent git autoconf))
+ (list python perl clisp))
+ (native-inputs
+ (list
+ python perl clisp
+ ;; Unicode data:
+ ucd ucd3.0-update1
+ ;; Programs for the tests:
+ cppi indent git autoconf))
(home-page "https://www.gnu.org/software/gnulib/")
(synopsis "Source files to share among distributions")
(description