98 lines
2.3 KiB
Bash
98 lines
2.3 KiB
Bash
SUMMARY="A windowing toolkit for use with Tcl"
|
|
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, \
|
|
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)"
|
|
REVISION="1"
|
|
SOURCE_URI="https://www.androwish.org/download/androwish-6e2085e6e4.tar.gz"
|
|
CHECKSUM_SHA256="71bb1a7421c4c07e0762084def72d0af7b645c0ae5188d0f2389e74305be8de7"
|
|
SOURCE_DIR="androwish-6e2085e6e4/jni/sdl2tk/"
|
|
|
|
# disabled: builds but does not work
|
|
ARCHITECTURES="?all"
|
|
|
|
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
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
tcl
|
|
lib:libfreetype
|
|
lib:libSDL2_2.0
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
tk_devel = $portVersion
|
|
devel:libtk8.6 = $portVersion
|
|
devel:libtkstub8.6 = $portVersion
|
|
"
|
|
REQUIRES_devel="
|
|
tk == $portVersion
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
tcl_devel
|
|
devel:libfreetype
|
|
devel:libSDL2
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
haiku_devel
|
|
cmd:awk
|
|
cmd:gcc
|
|
cmd:ld
|
|
cmd:make
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cd sdl
|
|
|
|
LDFLAGS="-Wl,--no-undefined -ltcl8.6" \
|
|
CFLAGS=-DTclpGetMonotonicTime=Tcl_GetTime \
|
|
runConfigure ./configure \
|
|
--with-tcl=/system/develop/lib/ \
|
|
--enable-man-symlinks
|
|
|
|
# patch Makefile for Haiku compatibility
|
|
sed -i s/-lsocket// Makefile
|
|
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
|
sed -i s/-lstdc++/-lstdc++.r4/ Makefile
|
|
fi
|
|
|
|
# patch Makefile to be "regular Tk"
|
|
sed -i s/tkZipMain/tkMain/ Makefile
|
|
sed -i s/libsdl2tk/libtk/ Makefile
|
|
sed -i s/sdl2wish/wish/ Makefile
|
|
sed -i s/sdl2tk8/tk8/ Makefile
|
|
|
|
make
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cd sdl
|
|
make install
|
|
|
|
# rearrange to be "regular Tk"
|
|
mv $libDir/sdl2tkConfig.sh $libDir/tkConfig.sh
|
|
mv $libDir/pkgconfig/sdl2tk.pc $libDir/pkgconfig/tk.pc
|
|
|
|
# add standard symlinks
|
|
ln -s $binDir/wish8.6 $binDir/wish
|
|
|
|
prepareInstalledDevelLibs libtkstub8.6
|
|
fixPkgconfig
|
|
mv $libDir/tkConfig.sh $developLibDir
|
|
packageEntries devel $developDir
|
|
}
|