<commit_before>extern crate gcc;
extern crate pkg_config;

use std::path::Path;

fn main() {
    let root = std::env::var("CARGO_MANIFEST_DIR").unwrap();
    let root = Path::new(&root).join("libvorbis");

    println!(
        "cargo:include={}",
        root.join("include").into_os_string().into_string().unwrap()
    );
    println!(
        "cargo:src={}",
        root.join("lib").into_os_string().into_string().unwrap()
    );

    match pkg_config::find_library("vorbis") {
        Ok(_) => return,
        Err(..) => {}
    };

    let ogg_inc = std::env::var("DEP_OGG_INCLUDE").unwrap();
    let ogg_inc = Path::new(&ogg_inc);

    gcc::Config::new()
        .file("libvorbis/lib/analysis.c")
        .file("libvorbis/lib/bitrate.c")
        .file("libvorbis/lib/block.c")
        .file("libvorbis/lib/codebook.c")
        .file("libvorbis/lib/envelope.c")
        .file("libvorbis/lib/floor0.c")
        .file("libvorbis/lib/floor1.c")
        .file("libvorbis/lib/info.c")
        .file("libvorbis/lib/lookup.c")
        .file("libvorbis/lib/lpc.c")
        .file("libvorbis/lib/lsp.c")
        .file("libvorbis/lib/mapping0.c")
        .file("libvorbis/lib/mdct.c")
        .file("libvorbis/lib/misc.c")
        .file("libvorbis/lib/psy.c")
        .file("libvorbis/lib/registry.c")
        .file("libvorbis/lib/res0.c")
        .file("libvorbis/lib/sharedbook.c")<commit_msg>Remove misc.c from sources<commit_after>extern crate gcc;
extern crate pkg_config;

use std::path::Path;

fn main() {
    let root = std::env::var("CARGO_MANIFEST_DIR").unwrap();
    let root = Path::new(&root).join("libvorbis");

    println!(
        "cargo:include={}",
        root.join("include").into_os_string().into_string().unwrap()
    );
    println!(
        "cargo:src={}",
        root.join("lib").into_os_string().into_string().unwrap()
    );

    match pkg_config::find_library("vorbis") {
        Ok(_) => return,
        Err(..) => {}
    };

    let ogg_inc = std::env::var("DEP_OGG_INCLUDE").unwrap();
    let ogg_inc = Path::new(&ogg_inc);

    gcc::Config::new()
        .file("libvorbis/lib/analysis.c")
        .file("libvorbis/lib/bitrate.c")
        .file("libvorbis/lib/block.c")
        .file("libvorbis/lib/codebook.c")
        .file("libvorbis/lib/envelope.c")
        .file("libvorbis/lib/floor0.c")
        .file("libvorbis/lib/floor1.c")
        .file("libvorbis/lib/info.c")
        .file("libvorbis/lib/lookup.c")
        .file("libvorbis/lib/lpc.c")
        .file("libvorbis/lib/lsp.c")
        .file("libvorbis/lib/mapping0.c")
        .file("libvorbis/lib/mdct.c")
        .file("libvorbis/lib/psy.c")
        .file("libvorbis/lib/registry.c")
        .file("libvorbis/lib/res0.c")
        .file("libvorbis/lib/sharedbook.c")
{'fraction_non_alphanumeric': 0.20087177624409736, 'fraction_numerical': 0.002905920813657828, 'mean_word_length': 2.5673575129533677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1502900', 'n_tokens_mistral': 1039, 'n_tokens_neox': 1051, 'n_words': 105}