Explorar el Código

Port: Add port for tcl

Gunnar Beutner hace 4 años
padre
commit
cfa095b44a
Se han modificado 3 ficheros con 35 adiciones y 0 borrados
  1. 1 0
      Ports/AvailablePorts.md
  2. 7 0
      Ports/tcl/package.sh
  3. 27 0
      Ports/tcl/patches/ipv6.patch

+ 1 - 0
Ports/AvailablePorts.md

@@ -106,6 +106,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
 | [`sqlite`](sqlite/)                    | SQLite                                                     | 3350300                  | https://www.sqlite.org/                                                        |
 | [`stress-ng`](stress-ng/)              | stress-ng                                                  | 0.11.23                  | https://github.com/ColinIanKing/stress-ng                                      |
 | [`Super-Mario`](Super-Mario/)          | Super-Mario Clone                                          |                          | https://github.com/Bennyhwanggggg/Super-Mario-Clone-Cpp                        |
+| [`tcl`](tcl/)                          | Tcl                                                        | 8.6.11                   | https://www.tcl-lang.org/                                                      |
 | [`termcap`](termcap/)                  | GNU termcap                                                | 1.3.1                    | https://www.gnu.org/software/termutils/                                        |
 | [`tinycc`](tinycc/)                    | Tiny C Compiler (TinyCC)                                   | dev                      | https://github.com/TinyCC/tinycc                                               |
 | [`tinyscheme`](tinyscheme/)            | TinyScheme Interpreter                                     | 1.42                     | https://sourceforge.net/projects/tinyscheme/                                   |

+ 7 - 0
Ports/tcl/package.sh

@@ -0,0 +1,7 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port=tcl
+version=8.6.11
+workdir=tcl${version}/unix
+useconfigure=true
+files="https://prdownloads.sourceforge.net/tcl/tcl${version}-src.tar.gz tcl${version}.tar.gz 8c0486668586672c5693d7d95817cb05a18c5ecca2f40e2836b9578064088258"
+auth_type=sha256

+ 27 - 0
Ports/tcl/patches/ipv6.patch

@@ -0,0 +1,27 @@
+diff -Naur tcl8.6.11/unix/tclUnixSock.c tcl8.6.11.serenity/unix/tclUnixSock.c
+--- tcl8.6.11/unix/tclUnixSock.c	2020-09-21 17:15:49.000000000 +0200
++++ tcl8.6.11.serenity/unix/tclUnixSock.c	2021-04-25 09:39:28.224340150 +0200
+@@ -706,6 +706,7 @@
+ IPv6AddressNeedsNumericRendering(
+     struct in6_addr addr)
+ {
++#ifndef __serenity__
+     if (IN6_ARE_ADDR_EQUAL(&addr, &in6addr_any)) {
+         return 1;
+     }
+@@ -716,11 +717,15 @@
+      */
+ 
+     if (!IN6_IS_ADDR_V4MAPPED(&addr)) {
++#else
+         return 0;
++#endif
++#ifndef __serenity__
+     }
+ 
+     return (addr.s6_addr[12] == 0 && addr.s6_addr[13] == 0
+             && addr.s6_addr[14] == 0 && addr.s6_addr[15] == 0);
++#endif
+ }
+ #if defined (__clang__) || ((__GNUC__)  && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))))
+ #pragma GCC diagnostic pop