diff --git a/pkg.info b/pkg.info index cc8cf1f..5bd108d 100644 --- a/pkg.info +++ b/pkg.info @@ -1,10 +1,8 @@ name: tcl description: A general-purpose, interpreted, dynamic programming language -version: 8.6.13 -revision: 2 +version: 8.6.16 url: http://tcl.sourceforge.net/ license: TCL architecture: any -depends: ["glibc","zlib"] -make_depends: ["bash","binutils","coreutils","diffutils","gcc","glibc","grep","make","sed"] +depends: ["zlib"] type: source diff --git a/source.sh b/source.sh index a45cae6..ec6be91 100644 --- a/source.sh +++ b/source.sh @@ -3,70 +3,71 @@ # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT DOWNLOAD="https://downloads.sourceforge.net/tcl/tcl${BPM_PKG_VERSION}-src.tar.gz" -DOWNLOAD_DOC="https://downloads.sourceforge.net/tcl/tcl${BPM_PKG_VERSION}-html.tar.gz" FILENAME="${DOWNLOAD##*/}" -FILENAME_DOC="${DOWNLOAD_DOC##*/}" # The prepare function is executed in the root of the temp directory # This function is used for downloading files and putting them into the correct location prepare() { wget "$DOWNLOAD" - wget "$DOWNLOAD_DOC" tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" - mkdir -p "$BPM_SOURCE"/Documentation - tar -xvf "$FILENAME_DOC" --strip-components=1 -C "$BPM_SOURCE"/Documentation } # The build function is executed in the source directory # This function is used to compile the source code build() { - SRCDIR=$(pwd) cd unix + ./configure --prefix=/usr \ - --mandir=/usr/share/man - make + --mandir=/usr/share/man \ + --enable-threads \ + --enable-64bit \ + --disable-rpath + make -j1 - tdbc_pkg=tdbc1.1.5 - - sed -e "s|$SRCDIR/unix|/usr/lib|" \ - -e "s|$SRCDIR|/usr/include|" \ + # Remove build directory traces + tclver=8.6 + sed -e "s|${BPM_SOURCE}/unix|/usr/lib|" \ + -e "s|${BPM_SOURCE}|/usr/include|" \ -i tclConfig.sh - sed -e "s|$SRCDIR/unix/pkgs/${tdbc_pkg}|/usr/lib/${tdbc_pkg}|" \ - -e "s|$SRCDIR/pkgs/${tdbc_pkg}/generic|/usr/include|" \ - -e "s|$SRCDIR/pkgs/${tdbc_pkg}/library|/usr/lib/tcl${BPM_PKG_VERSION%.*}|" \ - -e "s|$SRCDIR/pkgs/${tdbc_pkg}|/usr/include|" \ - -i pkgs/${tdbc_pkg}/tdbcConfig.sh + tdbcver=tdbc1.1.10 + sed -e "s|${BPM_SOURCE}/unix/pkgs/$tdbcver|/usr/lib/$tdbcver|" \ + -e "s|${BPM_SOURCE}/pkgs/$tdbcver/generic|/usr/include|" \ + -e "s|${BPM_SOURCE}/pkgs/$tdbcver/library|/usr/lib/tcl${BPM_PKG_VERSION%.*}|" \ + -e "s|${BPM_SOURCE}/pkgs/$tdbcver|/usr/include|" \ + -i "pkgs/$tdbcver/tdbcConfig.sh" - itcl_pkg=itcl4.2.3 - - sed -e "s|$SRCDIR/unix/pkgs/${itcl_pkg}|/usr/lib/${itcl_pkg}|" \ - -e "s|$SRCDIR/pkgs/${itcl_pkg}/generic|/usr/include|" \ - -e "s|$SRCDIR/pkgs/${itcl_pkg}|/usr/include|" \ - -i pkgs/${itcl_pkg}/itclConfig.sh - - unset SRCDIR + itclver=itcl4.3.2 + sed -e "s|${BPM_SOURCE}/unix/pkgs/$itclver|/usr/lib/$itclver|" \ + -e "s|${BPM_SOURCE}/pkgs/$itclver/generic|/usr/include|" \ + -e "s|${BPM_SOURCE}/pkgs/$itclver|/usr/include|" \ + -i "pkgs/$itclver/itclConfig.sh" } # The check function is executed in the source directory # This function is used to run tests to verify the package has been compiled correctly check() { cd unix - make test + + make -j1 test } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { cd unix - make DESTDIR="$BPM_OUTPUT" install - chmod -v u+w "$BPM_OUTPUT"/usr/lib/libtcl8.6.so - make DESTDIR="$BPM_OUTPUT" install-private-headers - ln -sfv tclsh${BPM_PKG_VERSION%.*} "$BPM_OUTPUT"/usr/bin/tclsh - mv "$BPM_OUTPUT"/usr/share/man/man3/{Thread,Tcl_Thread}.3 - mkdir -p "$BPM_OUTPUT"/usr/share/licenses/tcl/ - install -v -m644 ../license.terms "$BPM_OUTPUT"/usr/share/licenses/tcl/license.terms - cd ../Documentation - mkdir -v -p "$BPM_OUTPUT"/usr/share/doc/tcl - cp -v -r ./html/* "$BPM_OUTPUT"/usr/share/doc/tcl + + make DESTDIR="$BPM_OUTPUT" install install-private-headers + + # Create versioned tclsh link + ln -sf tclsh${BPM_PKG_VERSION%.*} "$BPM_OUTPUT"/usr/bin/tclsh + + # Create versioned libtcl link + ln -sf libtcl${BPM_PKG_VERSION%.*}.so "$BPM_OUTPUT"/usr/lib/libtcl.so + + # Move man page as it is in conflict with a perl man page + mv "$BPM_OUTPUT"/usr/share/man/man3/Thread.3 "$BPM_OUTPUT"/usr/share/man/man3/Tcl_Thread.3 + + # Install package license + install -Dm644 ../license.terms "$BPM_OUTPUT"/usr/share/licenses/tcl/license.terms }