<commit_before>import xyz

class Gdb(xyz.Package):
    pkg_name = 'gdb'
    variants = {
        'target': ['arm-none-eabi']
        }
    deps = ['texinfo', 'python']
    uses_osx_frameworks = True

    def configure(self):
        self.cross_configure('--disable-nls', '--enable-lto', '--enable-ld=yes', '--without-zlib')

        # After configuring we need to ice python, but we need
        # to ensure we do it using the built version of Python, not
        # this Python
        xyz.ensure_dir('gdb')
        with xyz.chdir('gdb'):
            self.cmd('{devtree_dir_abs}/{host}/bin/python3', '{root_dir_abs}/ice/ice.py', 'stdlib')

rules = Gdb<commit_msg>Update gdb to use ncurses library on Linux<commit_after>import xyz

class Gdb(xyz.Package):
    pkg_name = 'gdb'
    variants = {
        'target': ['arm-none-eabi']
        }
    uses_osx_frameworks = True

    @property
    def deps(self):
        deps = ['texinfo', 'python']
        if self.is_linux():
            deps.append('ncurses')
        return deps

    def configure(self):
        self.cross_configure('--disable-nls', '--enable-lto', '--enable-ld=yes', '--without-zlib')

        # After configuring we need to ice python, but we need
        # to ensure we do it using the built version of Python, not
        # this Python
        xyz.ensure_dir('gdb')
        with xyz.chdir('gdb'):
            self.cmd('{devtree_dir_abs}/{host}/bin/python3', '{root_dir_abs}/ice/ice.py', 'stdlib')

rules = Gdb
{'fraction_non_alphanumeric': 0.14556533513879485, 'fraction_numerical': 0.0013540961408259986, 'mean_word_length': 2.4292343387471, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '171949', 'n_tokens_mistral': 511, 'n_tokens_neox': 491, 'n_words': 118}