tcl/tk, bump version, enable secondary architecture (#6912)

Fix detection for freetype
Since we pretend to be regular tk, rename the library names in the config files
This commit is contained in:
Schrijvers Luc
2022-05-21 16:48:53 +02:00
committed by GitHub
parent 7454871daa
commit d66b4c2cbc
6 changed files with 343 additions and 32 deletions

40
dev-lang/tcl/licenses/TCL Normal file
View File

@@ -0,0 +1,40 @@
This software is copyrighted by the Regents of the University of
California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
Corporation, Apple Inc. and other parties. The following terms apply to
all files associated with the software unless explicitly disclaimed in
individual files.
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.
GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights"
in the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
Government shall have only "Restricted Rights" as defined in Clause
252.227-7013 (b) (3) of DFARs. Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license.

View File

@@ -0,0 +1,57 @@
From f1281718cfb8a9e92bcc3d03961424043f281735 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 11 Apr 2020 14:33:00 -0400
Subject: import patch from previous version
diff --git a/tests/env.test b/tests/env.test
index 036c7a2..ab8fe59 100644
--- a/tests/env.test
+++ b/tests/env.test
@@ -101,7 +101,7 @@ variable keep {
TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH PURE_PROG_NAME DISPLAY
SHLIB_PATH SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING MSYSTEM
- __CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG WINDIR TERM
+ __CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG WINDIR TERM LIBRARY_PATH
CommonProgramFiles ProgramFiles CommonProgramW6432 ProgramW6432
}
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 27b7540..1091ee0 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -628,7 +628,13 @@ AC_DEFUN([SC_ENABLE_THREADS], [
# The space is needed
THREADS_LIBS=" -lpthread"
else
- AC_CHECK_LIB(pthreads, pthread_mutex_init,
+ AC_CHECK_LIB(root, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREAD_LIBS=" "
+ else
+ AC_CHECK_LIB(pthreads, pthread_mutex_init,
tcl_ok=yes, tcl_ok=no)
if test "$tcl_ok" = "yes"; then
# The space is needed
@@ -647,6 +653,7 @@ AC_DEFUN([SC_ENABLE_THREADS], [
AC_MSG_WARN([Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...])
fi
fi
+ fi
fi
fi
@@ -1238,6 +1245,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
DL_OBJS="tclLoadDl.o"
DL_LIBS="-lroot"
+ LD_LIBRARY_PATH_VAR="LIBRARY_PATH"
AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
;;
HP-UX-*.11.*)
--
2.30.0

View File

@@ -0,0 +1,107 @@
SUMMARY="A very powerful but easy to learn dynamic programming language"
DESCRIPTION="Tcl (Tool Command Language) is a very powerful but easy to learn dynamic \
programming language, suitable for a very wide range of uses, including web \
and desktop applications, networking, administration, testing and many more. \
Open source and business-friendly, Tcl is a mature yet evolving language that \
is truly cross platform, easily deployed and highly extensible."
HOMEPAGE="http://www.tcl.tk"
COPYRIGHT="Regents of the University of California, Sun Microsystems, Inc., Scriptics Corporation, and other parties"
LICENSE="TCL"
REVISION="1"
SOURCE_URI="https://sourceforge.net/projects/tcl/files/Tcl/$portVersion/tcl$portVersion-src.tar.gz"
CHECKSUM_SHA256="26c995dd0f167e48b11961d891ee555f680c175f7173ff8cb829f4ebcde4c1a6"
SOURCE_DIR="tcl$portVersion"
PATCHES="tcl-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
tcl$secondaryArchSuffix = $portVersion compat >= 8.6
cmd:tclsh$commandSuffix = $portVersion compat >= 8.6
cmd:tclsh8.6$commandSuffix = $portVersion compat >= 8.6
lib:libtcl8.6$secondaryArchSuffix = $portVersion compat >= 8.6
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
tcl${secondaryArchSuffix}_devel = $portVersion compat >= 8.6
devel:libtclstub8.6$secondaryArchSuffix = $portVersion compat >= 8.6
"
REQUIRES_devel="
tcl$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libsqlite3$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:sed
"
defineDebugInfoPackage tcl$secondaryArchSuffix \
"$libDir"/libtcl8.6.so
BUILD()
{
local _64bit="--enable-64bit"
if [ "$targetArchitecture" = x86_gcc2 ]; then
_64bit="--disable-64bit"
fi
export CFLAGS="-USQLITE_API -USQLITE_EXTERN"
cd unix
autoconf -f
runConfigure --omit-dirs binDit ./configure \
--bindir=$commandBinDir \
--enable-man-symlinks \
--with-system-sqlite \
$_64bit
make
}
INSTALL()
{
cd unix
make install install-private-headers
ln -s tclsh8.6 "${commandBinDir}/tclsh"
sed -i -e "s#${sourceDir}/unix#${developLibDir}#" \
-e "s#${sourceDir}#${includeDir}#" \
${libDir}/tclConfig.sh
rm $commandBinDir/sqlite3_analyzer
prepareInstalledDevelLib libtclstub8.6
fixPkgconfig
mv $libDir/tclConfig.sh $developLibDir
packageEntries devel \
$developDir
}
TEST()
{
cd unix
make test
}

40
dev-lang/tk/licenses/TCL Normal file
View File

@@ -0,0 +1,40 @@
This software is copyrighted by the Regents of the University of
California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
Corporation, Apple Inc. and other parties. The following terms apply to
all files associated with the software unless explicitly disclaimed in
individual files.
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.
GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights"
in the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
Government shall have only "Restricted Rights" as defined in Clause
252.227-7013 (b) (3) of DFARs. Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license.

View File

@@ -1,4 +1,4 @@
From 2aceca35462c26243dfdf9c76963a03172fc7355 Mon Sep 17 00:00:00 2001
From 0a9f983ba0dcb10cac6559810e0f8f70f30f26aa Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Wed, 17 Nov 2021 17:42:17 -0500
Subject: Fixes for Haiku.
@@ -186,5 +186,40 @@ index e40eab2..e2ae821 100644
* We need the SDL event handling run in the main thread,
* which seems to be a Cocoa requirement. Therefore Tk_MainEx()
--
2.30.2
2.36.1
From e52458cf0424ef1318143c41cc816101ff6678b7 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Thu, 12 May 2022 14:20:59 +0200
Subject: tk fails to find freetype's header ft2build.h
Haikuports version for freetype doesn't provide freetype-config
Change order to check with pkg-config prior to check with freetype-config
diff --git a/sdl/configure b/sdl/configure
old mode 100755
new mode 100644
index 691c0cd..889c7f0
--- a/sdl/configure
+++ b/sdl/configure
@@ -10060,12 +10060,12 @@ fi
{ $as_echo "$as_me:$LINENO: checking for freetype" >&5
$as_echo_n "checking for freetype... " >&6; }
found_ft=yes
-FT_CFLAGS=`freetype-config --cflags 2>/dev/null` || found_ft="no"
-FT_LIBS=`freetype-config --libs 2>/dev/null` || found_ft="no"
+FT_CFLAGS=`pkg-config --cflags freetype2 2>/dev/null` || found_ft="no"
+FT_LIBS=`pkg-config --libs freetype2 2>/dev/null` || found_ft="no"
if test "$found_xft" = "no" ; then
found_ft=yes
- FT_CFLAGS=`pkg-config --cflags freetype2 2>/dev/null` || found_ft="no"
- FT_LIBS=`pkg-config --libs freetype2 2>/dev/null` || found_ft="no"
+ FT_CFLAGS=`freetype-config --cflags 2>/dev/null` || found_ft="no"
+ FT_LIBS=`freetype-config --libs 2>/dev/null` || found_ft="no"
fi
{ $as_echo "$as_me:$LINENO: result: $found_ft" >&5
$as_echo "$found_ft" >&6; }
--
2.36.1

View File

@@ -1,6 +1,5 @@
SUMMARY="A windowing toolkit for use with Tcl"
DESCRIPTION="
Tk is a graphical user interface toolkit that takes developing desktop \
DESCRIPTION="Tk is a graphical user interface toolkit that takes developing desktop \
applications to a higher level than conventional approaches. Tk is the \
standard GUI not only for Tcl, but for many other dynamic languages, and \
can produce rich, native applications that run unchanged across Windows, \
@@ -9,61 +8,79 @@ Mac OS X, Linux and more.
This package is based on UndroidWish, a SDL2-based Tk port."
HOMEPAGE="https://www.androwish.org"
COPYRIGHT="Regents of the University of California, Sun Microsystems, Inc., Scriptics Corporation, and other parties"
LICENSE="BSD (2-clause)"
LICENSE="TCL"
REVISION="1"
SOURCE_URI="http://androwish.org/download/androwish-c48f047f5b.tar.gz"
CHECKSUM_SHA256="4ecbc23193cb00b9fc34c0942e2327f0b6badbe587ab574b492780994707683d"
SOURCE_DIR="androwish-c48f047f5b/jni/sdl2tk/"
PATCHES="tk-$portVersion.patchset"
ARCHITECTURES="all"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
tk = $portVersion compat >= 8.6
cmd:wish = $portVersion compat >= 8.6
cmd:wish8.6 = $portVersion compat >= 8.6
lib:libtk8.6 = $portVersion compat >= 8.6
tk$secondaryArchSuffix = $portVersion compat >= 8.6
cmd:wish$commandSuffix = $portVersion compat >= 8.6
cmd:wish8.6$commandSuffix = $portVersion compat >= 8.6
lib:libtk8.6$secondaryArchSuffix = $portVersion compat >= 8.6
"
REQUIRES="
haiku
tcl
lib:libz
lib:libfreetype
lib:libSDL2_2.0
haiku$secondaryArchSuffix
tcl$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
tk_devel = $portVersion
devel:libtk8.6 = $portVersion
devel:libtkstub8.6 = $portVersion
tk${secondaryArchSuffix}_devel = $portVersion
devel:libtk8.6$secondaryArchSuffix = $portVersion
devel:libtkstub8.6$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
tk == $portVersion
tk$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
tcl_devel
devel:libz
devel:libfreetype
devel:libSDL2
haiku${secondaryArchSuffix}_devel
tcl${secondaryArchSuffix}_devel
devel:libfreetype$secondaryArchSuffix
devel:libSDL2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku_devel
cmd:awk
cmd:gcc
cmd:ld
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cd sdl
chmod +x configure
local _64bit="--enable-64bit"
if [ "$targetArchitecture" = x86_gcc2 ]; then
_64bit="--disable-64bit"
fi
LDFLAGS="-Wl,--no-undefined" \
CFLAGS=-DTclpGetMonotonicTime=Tcl_GetTime \
runConfigure ./configure \
--with-tcl=/system/develop/lib/ \
--enable-man-symlinks
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir \
--with-tcl=$(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib$secondaryArchSubDir \
--enable-man-symlinks $_64bit
# patch Makefile for Haiku compatibility
sed -i s/-lsocket// Makefile
@@ -93,10 +110,25 @@ INSTALL()
mv $libDir/pkgconfig/sdl2tk.pc $libDir/pkgconfig/tk.pc
# add standard symlinks
ln -s $binDir/wish8.6 $binDir/wish
ln -s $commandBinDir/wish8.6 $commandBinDir/wish
prepareInstalledDevelLibs libtkstub8.6
prepareInstalledDevelLib libtkstub8.6
fixPkgconfig
# since we pretend to be regular tk
# correct library names in tk.pc and tkConfig.sh
sed -i 's/-lsdl2tk8.6 -lsdl2tkstub8.6/-ltk8.6 -ltkstub8.6/' \
$prefix/$relativeDevelopLibDir/pkgconfig/tk.pc
sed -i 's/libsdl2tk8.6.so/libtk8.6.so/' \
$prefix/$relativeLibDir/tkConfig.sh
sed -i 's/-lsdl2tk8.6/-ltk8.6/' \
$prefix/$relativeLibDir/tkConfig.sh
sed -i 's/libsdl2tkstub8.6.a/libtkstub8.6.a/' \
$prefix/$relativeLibDir/tkConfig.sh
sed -i 's/-lsdl2tkstub8.6/-ltkstub8.6/' \
$prefix/$relativeLibDir/tkConfig.sh
mv $libDir/tkConfig.sh $developLibDir
packageEntries devel $developDir
packageEntries devel \
$developDir
}