diff --git a/pkg.info b/pkg.info index 5bd108d..b330b88 100644 --- a/pkg.info +++ b/pkg.info @@ -1,8 +1,17 @@ name: tcl description: A general-purpose, interpreted, dynamic programming language -version: 8.6.16 +version: 9.0.2 +revision: 1 url: http://tcl.sourceforge.net/ license: TCL +maintainers: + - enumdev@enumerated.dev architecture: any -depends: ["zlib"] type: source +depends: + - zlib +downloads: + - url: https://downloads.sourceforge.net/project/tcl/Tcl/${BPM_PKG_VERSION}/tcl${BPM_PKG_VERSION}-src.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: e074c6a8d9ba2cddf914ba97b6677a552d7a52a3ca102924389a05ccb249b520 diff --git a/source.sh b/source.sh index ec6be91..e974393 100644 --- a/source.sh +++ b/source.sh @@ -2,46 +2,17 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # 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" -FILENAME="${DOWNLOAD##*/}" - -# 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" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" -} - # The build function is executed in the source directory # This function is used to compile the source code build() { cd unix - + ./configure --prefix=/usr \ --mandir=/usr/share/man \ --enable-threads \ --enable-64bit \ --disable-rpath make -j1 - - # Remove build directory traces - tclver=8.6 - sed -e "s|${BPM_SOURCE}/unix|/usr/lib|" \ - -e "s|${BPM_SOURCE}|/usr/include|" \ - -i tclConfig.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" - - 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 @@ -57,17 +28,31 @@ check() { package() { cd unix - make DESTDIR="$BPM_OUTPUT" install install-private-headers + make INSTALL_ROOT="$BPM_OUTPUT" install install-libraries install-msgs install-private-headers - # Create versioned tclsh link + # Remove build directory traces + sed -e "s|${BPM_SOURCE}/unix|/usr/lib|" \ + -e "s|${BPM_SOURCE}|/usr/include|" \ + -i "$BPM_OUTPUT"/usr/lib/tclConfig.sh + tdbcver=$(ls -1 "${BPM_SOURCE}"/unix/pkgs | grep '^tdbc[0-9]' | sed 's/^tdbc//') + sed -e "s|${BPM_SOURCE}/unix/pkgs/tdbc$tdbcver|/usr/lib/tdbc$tdbcver|" \ + -e "s|${BPM_SOURCE}/pkgs/tdbc$tdbcver/generic|/usr/include|" \ + -e "s|${BPM_SOURCE}/pkgs/tdbc$tdbcver/library|/usr/lib/tcl${BPM_PKG_VERSION%.*}|" \ + -e "s|${BPM_SOURCE}/pkgs/tdbc$tdbcver|/usr/include|" \ + -i "$BPM_OUTPUT"/usr/lib/tdbc$tdbcver/tdbcConfig.sh + itclver=$(ls -1 "${BPM_SOURCE}"/unix/pkgs | grep '^itcl[0-9]' | sed 's/^itcl//') + sed -e "s|${BPM_SOURCE}/unix/pkgs/itcl$itclver|/usr/lib/itcl$itclver|" \ + -e "s|${BPM_SOURCE}/pkgs/itcl$itclver/generic|/usr/include|" \ + -e "s|${BPM_SOURCE}/pkgs/itcl$itclver|/usr/include|" \ + -i "$BPM_OUTPUT"/usr/lib/itcl$itclver/itclConfig.sh + + # Create unversioned symlinks 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 + install -Dm644 "$BPM_SOURCE"/license.terms "$BPM_OUTPUT"/usr/share/licenses/tcl/license.terms }