# Maintainer: PktSurf <smlinux@pktsurf.in>
app=ftjam
version=2.5.3
build=1sml
homepage="https://www.freetype.org/jam/"
download="http://dk.archive.ubuntu.com/pub/mirrors/exherbo/ftjam-2.5.3rc2.tar.bz2"
desc="Program construction tool like make"
requires="musl"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version"rc2"
  
  tar xf $srcdir/$app-$version"rc2".tar.?z*
  cd $app-$version"rc2"
  fixbuilddirpermissions

  applypatch $srcdir/ftjam-2.5.3-clang16.patch
  applypatch $srcdir/ftjam-2.5.3-false-flags.patch
  applypatch $srcdir/ftjam-2.5.3-i-hate-yacc.patch
}

build() {
  ./configure \
    --prefix= \
    $builddist

  make
  make install DESTDIR="$pkg"

  mkfinalpkg
}

sha512sums="
18a40c6741493adf293f032d9c7a9ab419402505a37993fa859e36e7a1655ec9d3d07662e6ee242487b143aa7e0f6c46f253bc7e23c3162c7381aaced001bfcd  ftjam-2.5.3rc2.tar.bz2
30171a78036c34e290d9c880d0f3c0693a372ae4e4d72d549ee508bee6434cba7930ff90100bc26ab79f0d477e7a36935aa0e18c513598d2af7e2e8e452a0141  ftjam-2.5.3-clang16.patch
b9b97127c6a5d89759563cd4a1e4f87ed911610b70bbfff309105ab733290f74087bd0eb066eaad860be5624573ad2dfc1245eb45347c2d1c9800033c35e5c0a  ftjam-2.5.3-false-flags.patch
e02948ccccb963ddfeb777c217efafaf19239cacff80514c167166ec666a6301b90e1a86a2b97ab58fee006f509106cc0e3dacbbde822efd0db2b9f5f4645be8  ftjam-2.5.3-i-hate-yacc.patch
6d8b399f8a4047c34b1315a230cf47e8ab76c7fbad9089fd4c3c18b2ba7fbb2f3ecbcb2d3a1075f0d95d36e547490de345167ba55fed75221b2b8162796ccc25  ftjam-2.5.3-nostrip.patch
"