NAME="fonts"
DESC="Bunch of fonts for XORG"
VERSION="1"
FILES=(
  "https://www.x.org/pub/individual/font/font-adobe-utopia-type1-1.0.5.tar.xz"
  "https://www.x.org/pub/individual/font/font-bh-ttf-1.0.4.tar.xz"
  "https://www.x.org/pub/individual/font/font-bh-type1-1.0.4.tar.xz"
  "https://www.x.org/pub/individual/font/font-ibm-type1-1.0.4.tar.xz"
  "https://www.x.org/pub/individual/font/font-misc-ethiopic-1.0.5.tar.xz"
  "https://www.x.org/pub/individual/font/font-xfree86-type1-1.0.5.tar.xz"
  "https://xorg.freedesktop.org/releases/individual/font/font-arabic-misc-1.0.4.tar.xz"
  "https://xorg.freedesktop.org/releases/individual/font/font-cursor-misc-1.0.4.tar.xz"
  "https://xorg.freedesktop.org/releases/individual/font/font-daewoo-misc-1.0.4.tar.xz"
  "https://xorg.freedesktop.org/releases/individual/font/font-dec-misc-1.0.4.tar.xz"
  "https://xorg.freedesktop.org/releases/individual/font/font-isas-misc-1.0.4.tar.xz"
)
HASHES=(
  "546d17feab30d4e3abcf332b454f58ed"
  "063bfa1456c8a68208bf96a33f472bb1"
  "51a17c981275439b85e15430a3d711ee"
  "00f64a84b6c9886040241e081347a853"
  "fe972eaf13176fa9aa7e74a12ecc801a"
  "3b47fed2c032af3a32aad9acc1d25150"
  "afd5fae32440b133c5ee0195af44ad1462d35c2f451dcf4b1c93e0ce245d009b120d39eb5f780b003ae2f572408965e6d149437e9ebbf5738cb69193aaa4d488"
  "22bd86a81cdfb1e17f885dc3961071c08920171a6f0736ae52d95c8e576b1debc7570aa3b7e1007f474b50435fba411f0eb1847894e8b52f6e6268d91cf9f2db"
  "be9f550e8cb84f9e24afb6b739c357cb159da8a06f8bc2c26c9fbb62320427dd7522e04d10492cec91ab559b2e5dd5067012ff3225695a8337f1cd7db9801f57"
  "bf6c0e4924835346f1f7913a04fa3903a7c55d292317526dd8eaa799dfb3b52eb2157c34692d659b41a18123af8389785dcb4aa0c31fc387cb368642801c3335"
  "7c8cc9083600949fff4a0373f9f22df80f6a2c97d8d56bc2c4d03b102d16ad071b984b1ecf547d2d17ede9335e5c3a418512631a18938b7728c66b4339dcedd5"
)
DEPENDS=("font-encodings" "font-alias")

run_build(){
  ./configure $XORG_CONFIG
  make && make DESTDIR=${ROOTDIR} install
  cd ..
}

PACKAGE() {
  mkdir fontbuild && cd fontbuild
  
  tar xvf ../font-adobe-utopia-type1-1.0.5.tar.xz
  cd font-adobe-utopia-type1-1.0.5 && run_build

  tar xvf ../font-bh-ttf-1.0.4.tar.xz
  cd font-bh-ttf-1.0.4 && run_build
  
  tar xvf ../font-bh-type1-1.0.4.tar.xz
  cd font-bh-type1-1.0.4 && run_build

  tar xvf ../font-ibm-type1-1.0.4.tar.xz
  cd font-ibm-type1-1.0.4 && run_build
  
  tar xvf ../font-misc-ethiopic-1.0.5.tar.xz
  cd font-misc-ethiopic-1.0.5 && run_build
  
  tar xvf ../font-xfree86-type1-1.0.5.tar.xz
  cd font-xfree86-type1-1.0.5 && run_build

  tar xvf ../font-arabic-misc-1.0.4.tar.xz
  cd font-arabic-misc-1.0.4 && run_build

  tar xvf ../font-cursor-misc-1.0.4.tar.xz
  cd font-cursor-misc-1.0.4 && run_build
  
  tar xvf ../font-daewoo-misc-1.0.4.tar.xz
  cd font-daewoo-misc-1.0.4 && run_build

  tar xvf ../font-dec-misc-1.0.4.tar.xz
  cd font-dec-misc-1.0.4 && run_build

  tar xvf ../font-isas-misc-1.0.4.tar.xz
  cd font-isas-misc-1.0.4 && run_build

  cd .. && rm -rf fontbuild
}
