ports: Add tcl port

This commit is contained in:
Bananymous 2025-06-28 20:53:27 +03:00
parent fe9a8b542a
commit a847823411
4 changed files with 75 additions and 0 deletions

22
ports/tcl/build.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash ../install.sh
NAME='tcl'
VERSION='8.6.12'
DOWNLOAD_URL="http://prdownloads.sourceforge.net/tcl/tcl$VERSION-src.tar.gz#26c995dd0f167e48b11961d891ee555f680c175f7173ff8cb829f4ebcde4c1a6"
TAR_CONTENT="tcl$VERSION"
pre_configure() {
pushd unix || exit 1
}
post_configure() {
popd
}
build() {
make -C unix -j$(nproc) all || exit 1
}
install() {
make -C unix install "DESTDIR=$BANAN_SYSROOT" || exit 1
}

View File

@ -0,0 +1,21 @@
diff -ruN tcl8.6.12/unix/tclUnixSock.c tcl8.6.12-banan_os/unix/tclUnixSock.c
--- tcl8.6.12/unix/tclUnixSock.c 2021-10-29 20:08:08.000000000 +0300
+++ tcl8.6.12-banan_os/unix/tclUnixSock.c 2025-06-26 01:23:59.649074073 +0300
@@ -706,6 +706,7 @@
IPv6AddressNeedsNumericRendering(
struct in6_addr addr)
{
+#ifndef __banan_os__
if (IN6_ARE_ADDR_EQUAL(&addr, &in6addr_any)) {
return 1;
}
@@ -721,6 +722,9 @@
return (addr.s6_addr[12] == 0 && addr.s6_addr[13] == 0
&& addr.s6_addr[14] == 0 && addr.s6_addr[15] == 0);
+#else
+ return 0;
+#endif
}
#if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))))
#pragma GCC diagnostic pop

View File

@ -0,0 +1,19 @@
diff -ruN tcl8.6.12/unix/tclUnixCompat.c tcl8.6.12-banan_os/unix/tclUnixCompat.c
--- tcl8.6.12/unix/tclUnixCompat.c 2021-10-29 20:08:08.000000000 +0300
+++ tcl8.6.12-banan_os/unix/tclUnixCompat.c 2025-06-26 01:26:39.033530792 +0300
@@ -702,6 +702,7 @@
len += copied;
p = buf + len;
+#ifndef __banan_os__
/*
* Copy password.
*/
@@ -713,6 +714,7 @@
tgtPtr->gr_passwd = (copied > 0) ? p : NULL;
len += copied;
p = buf + len;
+#endif
/*
* Copy group members.

View File

@ -0,0 +1,13 @@
diff -ruN tcl8.6.12/pkgs/sqlite3.36.0/compat/sqlite3/sqlite3.c tcl8.6.12-banan_os/pkgs/sqlite3.36.0/compat/sqlite3/sqlite3.c
--- tcl8.6.12/pkgs/sqlite3.36.0/compat/sqlite3/sqlite3.c 2021-09-13 01:15:31.000000000 +0300
+++ tcl8.6.12-banan_os/pkgs/sqlite3.36.0/compat/sqlite3/sqlite3.c 2025-06-28 02:27:43.042768624 +0300
@@ -19854,6 +19854,9 @@
#if !defined(alloca) && defined(_WIN32)
# define alloca _alloca
#endif
+#if !defined(alloca) && defined(__banan_os__)
+# include <alloca.h>
+#endif
# define sqlite3StackAllocRaw(D,N) alloca(N)
# define sqlite3StackAllocZero(D,N) memset(alloca(N), 0, N)
# define sqlite3StackFree(D,P)