Update package version to 8.8.16 and improve source.sh readability

This commit is contained in:
2025-04-14 17:00:33 +03:00
parent 33185d1c10
commit 5a743ace4e
2 changed files with 39 additions and 40 deletions
+2 -4
View File
@@ -1,10 +1,8 @@
name: tcl name: tcl
description: A general-purpose, interpreted, dynamic programming language description: A general-purpose, interpreted, dynamic programming language
version: 8.6.13 version: 8.6.16
revision: 2
url: http://tcl.sourceforge.net/ url: http://tcl.sourceforge.net/
license: TCL license: TCL
architecture: any architecture: any
depends: ["glibc","zlib"] depends: ["zlib"]
make_depends: ["bash","binutils","coreutils","diffutils","gcc","glibc","grep","make","sed"]
type: source type: source
+37 -36
View File
@@ -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 # 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="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="${DOWNLOAD##*/}"
FILENAME_DOC="${DOWNLOAD_DOC##*/}"
# The prepare function is executed in the root of the temp directory # 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 # This function is used for downloading files and putting them into the correct location
prepare() { prepare() {
wget "$DOWNLOAD" wget "$DOWNLOAD"
wget "$DOWNLOAD_DOC"
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" 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 # The build function is executed in the source directory
# This function is used to compile the source code # This function is used to compile the source code
build() { build() {
SRCDIR=$(pwd)
cd unix cd unix
./configure --prefix=/usr \ ./configure --prefix=/usr \
--mandir=/usr/share/man --mandir=/usr/share/man \
make --enable-threads \
--enable-64bit \
--disable-rpath
make -j1
tdbc_pkg=tdbc1.1.5 # Remove build directory traces
tclver=8.6
sed -e "s|$SRCDIR/unix|/usr/lib|" \ sed -e "s|${BPM_SOURCE}/unix|/usr/lib|" \
-e "s|$SRCDIR|/usr/include|" \ -e "s|${BPM_SOURCE}|/usr/include|" \
-i tclConfig.sh -i tclConfig.sh
sed -e "s|$SRCDIR/unix/pkgs/${tdbc_pkg}|/usr/lib/${tdbc_pkg}|" \ tdbcver=tdbc1.1.10
-e "s|$SRCDIR/pkgs/${tdbc_pkg}/generic|/usr/include|" \ sed -e "s|${BPM_SOURCE}/unix/pkgs/$tdbcver|/usr/lib/$tdbcver|" \
-e "s|$SRCDIR/pkgs/${tdbc_pkg}/library|/usr/lib/tcl${BPM_PKG_VERSION%.*}|" \ -e "s|${BPM_SOURCE}/pkgs/$tdbcver/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/${tdbc_pkg}|/usr/include|" \ -e "s|${BPM_SOURCE}/pkgs/$tdbcver/library|/usr/lib/tcl${BPM_PKG_VERSION%.*}|" \
-i pkgs/${tdbc_pkg}/tdbcConfig.sh -e "s|${BPM_SOURCE}/pkgs/$tdbcver|/usr/include|" \
-i "pkgs/$tdbcver/tdbcConfig.sh"
itcl_pkg=itcl4.2.3 itclver=itcl4.3.2
sed -e "s|${BPM_SOURCE}/unix/pkgs/$itclver|/usr/lib/$itclver|" \
sed -e "s|$SRCDIR/unix/pkgs/${itcl_pkg}|/usr/lib/${itcl_pkg}|" \ -e "s|${BPM_SOURCE}/pkgs/$itclver/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/${itcl_pkg}/generic|/usr/include|" \ -e "s|${BPM_SOURCE}/pkgs/$itclver|/usr/include|" \
-e "s|$SRCDIR/pkgs/${itcl_pkg}|/usr/include|" \ -i "pkgs/$itclver/itclConfig.sh"
-i pkgs/${itcl_pkg}/itclConfig.sh
unset SRCDIR
} }
# The check function is executed in the source directory # The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly # This function is used to run tests to verify the package has been compiled correctly
check() { check() {
cd unix cd unix
make test
make -j1 test
} }
# The package function is executed in the source directory # The package function is executed in the source directory
# This function is used to move the compiled files into the output directory # This function is used to move the compiled files into the output directory
package() { package() {
cd unix cd unix
make DESTDIR="$BPM_OUTPUT" install
chmod -v u+w "$BPM_OUTPUT"/usr/lib/libtcl8.6.so make DESTDIR="$BPM_OUTPUT" install install-private-headers
make DESTDIR="$BPM_OUTPUT" install-private-headers
ln -sfv tclsh${BPM_PKG_VERSION%.*} "$BPM_OUTPUT"/usr/bin/tclsh # Create versioned tclsh link
mv "$BPM_OUTPUT"/usr/share/man/man3/{Thread,Tcl_Thread}.3 ln -sf tclsh${BPM_PKG_VERSION%.*} "$BPM_OUTPUT"/usr/bin/tclsh
mkdir -p "$BPM_OUTPUT"/usr/share/licenses/tcl/
install -v -m644 ../license.terms "$BPM_OUTPUT"/usr/share/licenses/tcl/license.terms # Create versioned libtcl link
cd ../Documentation ln -sf libtcl${BPM_PKG_VERSION%.*}.so "$BPM_OUTPUT"/usr/lib/libtcl.so
mkdir -v -p "$BPM_OUTPUT"/usr/share/doc/tcl
cp -v -r ./html/* "$BPM_OUTPUT"/usr/share/doc/tcl # 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
} }