pkgname=tcl pkgver=8.6.15 pkgrel=1 pkgdesc="Powerful, easy-to-learn dynamic programming language" arch=('x86_64') url="http://tcl.sourceforge.net/" license=('TCL') depends=('zlib') options=('!lto') source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}${pkgver}-src.tar.gz https://downloads.sourceforge.net/${pkgname}/${pkgname}${pkgver}-html.tar.gz) sha256sums=(861e159753f2e2fbd6ec1484103715b0be56be3357522b858d3cbb5f893ffef1 65028034a19dd93676681bf043b3629f36445aa7f2b4d261baa0a3d5b65c4d06) build() { cd ${pkgname}${pkgver}/unix local configure_args=( --disable-rpath --mandir=/usr/share/man TCL_LIBRARY=/usr/lib64/${pkgname}${pkgver%.*} ${configure_options} ) ./configure ${configure_args[@]} make sed -e "s|${srcdir}/${pkgname}${pkgver}/unix|/usr/lib64|" \ -e "s|${srcdir}/${pkgname}${pkgver}|/usr/include|" \ -i tclConfig.sh sed -e "s|${srcdir}/${pkgname}${pkgver}/unix/pkgs/tdbc1.1.9|/usr/lib64/tdbc1.1.9|" \ -e "s|${srcdir}/${pkgname}${pkgver}/pkgs/tdbc1.1.9/generic|/usr/include|" \ -e "s|${srcdir}/${pkgname}${pkgver}/pkgs/tdbc1.1.9/library|/usr/lib64/tcl8.6|" \ -e "s|${srcdir}/${pkgname}${pkgver}/pkgs/tdbc1.1.9|/usr/include|" \ -i pkgs/tdbc1.1.9/tdbcConfig.sh sed -e "s|${srcdir}/${pkgname}${pkgver}/unix/pkgs/itcl4.3.0|/usr/lib64/itcl4.3.0|" \ -e "s|${srcdir}/${pkgname}${pkgver}/pkgs/itcl4.3.0/generic|/usr/include|" \ -e "s|${srcdir}/${pkgname}${pkgver}/pkgs/itcl4.3.0|/usr/include|" \ -i pkgs/itcl4.3.0/itclConfig.sh } package() { cd ${pkgname}${pkgver}/unix make DESTDIR=${pkgdir} install chmod -v u+w ${pkgdir}/usr/lib64/libtcl${pkgver%.*}.so make DESTDIR=${pkgdir} install-private-headers ln -sfv tclsh${pkgver%.*} ${pkgdir}/usr/bin/tclsh mv ${pkgdir}/usr/share/man/man3/{Thread,Tcl_Thread}.3 install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} cp -v -r ../html/* ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} }