<commit_before>{ stdenv, fetchurl, perl, freetype }:

stdenv.mkDerivation {
  name = "ttf2pt1-3.4.4";

  src = fetchurl {
    url = http://prdownloads.sourceforge.net/ttf2pt1/ttf2pt1-3.4.4.tgz;
    sha256 = "1l718n4k4widx49xz7qrj4mybzb8q67kp2jw7f47604ips4654mf";
  };

  preConfigure = ''
    find -type f | xargs sed -i 's@/usr/bin/perl@${perl}/bin/perl@'
    mkdir -p $out
    sed -e 's/chown/true/' \
        -e 's/chgrp/true/' \
        -e 's@^CFLAGS_FT =.*@CFLAGS_FT=-DUSE_FREETYPE -I${freetype}/include/freetype2@' \
        -i scripts/{inst_dir,inst_file} Makefile
    makeFlags="INSTDIR=$out OWNER=`id -u`"
  '';

  buildInputs = [ freetype ];
  
  patches = ./gentoo-makefile.patch; # also contains the freetype patch

  meta = { 
    description = "True Type to Postscript Type 3 converter, fpdf";
    homepage = "http://ttf2pt1.sourceforge.net/index.html";
    license = "ttf2pt1";
  };
}<commit_msg>Fix ttf2pt1 build<commit_after>{ stdenv, fetchurl, perl, freetype }:

stdenv.mkDerivation {
  name = "ttf2pt1-3.4.4";

  src = fetchurl {
    url = http://prdownloads.sourceforge.net/ttf2pt1/ttf2pt1-3.4.4.tgz;
    sha256 = "1l718n4k4widx49xz7qrj4mybzb8q67kp2jw7f47604ips4654mf";
  };

  preConfigure = ''
    find -type f | xargs sed -i 's@/usr/bin/perl@${perl}/bin/perl@'
    mkdir -p $out
    sed -e 's/chown/true/' \
        -e 's/chgrp/true/' \
        -e 's@^CFLAGS_FT =.*@CFLAGS_FT=-DUSE_FREETYPE -I${freetype}/include/freetype2@' \
        -i scripts/{inst_dir,inst_file} Makefile
    makeFlags="INSTDIR=$out OWNER=`id -u`"
  '';

  buildInputs = [ freetype ];
  buildNativeInputs = [ perl ];
  
  patches = ./gentoo-makefile.patch; # also contains the freetype patch

  meta = { 
    description = "True Type to Postscript Type 3 converter, fpdf";
    homepage = "http://ttf2pt1.sourceforge.net/index.html";
    license = "ttf2pt1";
  };
}
{'fraction_non_alphanumeric': 0.15931108719052745, 'fraction_numerical': 0.04951560818083961, 'mean_word_length': 2.9892703862660945, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6521950', 'n_tokens_mistral': 837, 'n_tokens_neox': 782, 'n_words': 130}