<commit_before>SUMMARY = "VCD (Value Change Dump) file waveform viewer"
DESCRIPTION = "gtkwave is a viewer for VCD (Value Change Dump) files which are usually created by digital circuit simulators. (These files have no connection to video CDs!) "
HOMEPAGE = "http://gtkwave.sourceforge.net/"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e"

SRC_URI = "http://gtkwave.sourceforge.net/gtkwave-gtk3-${PV}.tar.gz"
SRC_URI[sha256sum] = "35461eccd9b8b4470caa78ab9a8f14ecacbcc9eff63033d8dce58093e786deb7"
S = "${WORKDIR}/${BPN}-gtk3-${PV}"

DEPENDS = " \
    gperf-native \
    gtk+3 \
    gdk-pixbuf \
    tcl \
    tk \
    bzip2 \
    xz \
    pango \
    zlib \
"

inherit pkgconfig autotools gettext texinfo mime mime-xdg

# depends on gtk+3 which has this restriction
inherit features_check
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"

EXTRA_OECONF = " \<commit_msg>gtkwave: set REQUIRED_DISTRO_FEATURES only to wayland<commit_after>SUMMARY = "VCD (Value Change Dump) file waveform viewer"
DESCRIPTION = "gtkwave is a viewer for VCD (Value Change Dump) files which are usually created by digital circuit simulators. (These files have no connection to video CDs!) "
HOMEPAGE = "http://gtkwave.sourceforge.net/"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e"

SRC_URI = "http://gtkwave.sourceforge.net/gtkwave-gtk3-${PV}.tar.gz"
SRC_URI[sha256sum] = "35461eccd9b8b4470caa78ab9a8f14ecacbcc9eff63033d8dce58093e786deb7"
S = "${WORKDIR}/${BPN}-gtk3-${PV}"

DEPENDS = " \
    gperf-native \
    gtk+3 \
    gdk-pixbuf \
    tcl \
    tk \
    bzip2 \
    xz \
    pango \
    zlib \
"

inherit pkgconfig autotools gettext texinfo mime mime-xdg

inherit features_check
# depends on gtk+3 which has this restriction
# ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
# but https://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10
# explicitly includes gdk/gdkwayland.h for gtk-3.22.26 and newer (oe-core currently has 3.24.29)
# and it needs x11 as well for tk dependency (so it happends to be both GTK3DISTROFEATURES instead of either of them)
REQUIRED_DISTRO_FEATURES = "wayland x11"

EXTRA_OECONF = " \
{'fraction_non_alphanumeric': 0.10493552690084482, 'fraction_numerical': 0.08270342374388617, 'mean_word_length': 4.306603773584905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '2007787', 'n_tokens_mistral': 1008, 'n_tokens_neox': 882, 'n_words': 194}