mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
108 lines
2.8 KiB
Bash
108 lines
2.8 KiB
Bash
SUMMARY="A modern port of Turbo Vision 2.0"
|
|
DESCRIPTION="A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. \
|
|
Now cross-platform and with Unicode support. "
|
|
HOMEPAGE="https://github.com/magiblot/tvision"
|
|
COPYRIGHT="2019-2021 magiblot"
|
|
LICENSE="TVISION
|
|
MIT"
|
|
REVISION="1"
|
|
srcGitRev="be6e64f85355c6c96b7c09174986fafb6a411c6a"
|
|
SOURCE_URI="https://github.com/magiblot/tvision/archive/$srcGitRev.tar.gz"
|
|
CHECKSUM_SHA256="cb9601551831861f06ec5e6bfefe9340b5ca0fea7eeb253630ece98790620ce7"
|
|
SOURCE_DIR="tvision-$srcGitRev"
|
|
|
|
PATCHES="tvision-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
PROVIDES="
|
|
tvision$secondaryArchSuffix = $portVersion
|
|
lib:libtvision$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libncursesw$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
tvision${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libtvision$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES_devel="
|
|
tvision$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
PROVIDES_tools="
|
|
tvision${secondaryArchSuffix}_tools = $portVersion
|
|
cmd:tvdemo$commandSuffix = $portVersion
|
|
cmd:tvedit$commandSuffix = $portVersion
|
|
cmd:tvhc$commandSuffix = $portVersion
|
|
"
|
|
REQUIRES_tools="
|
|
$REQUIRES
|
|
tvision$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
# devel:libgtest$secondaryArchSuffix # only needed if using -DTV_BUILD_TESTS=YES in BUILD below
|
|
devel:libncursesw$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:make
|
|
cmd:gcc$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
# The following is only needed when building with either:
|
|
# -DTV_BUILD_TESTS=YES (`test/tvision-test-passed` bin links to libtvsion.so)
|
|
# or
|
|
# -DTV_BUILD_EXAMPLES=YES (two binaries there are ran from the "build" dir)
|
|
# and libtvsion.so is located under $sourceDir/build.
|
|
export LIBRARY_PATH="$sourceDir/build:$LIBRARY_PATH"
|
|
|
|
cmake . -B ./build \
|
|
$cmakeDirArgs \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_SKIP_RPATH=YES \
|
|
-DTV_BUILD_EXAMPLES=YES \
|
|
-DTV_BUILD_TESTS=NO
|
|
|
|
cmake --build ./build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cmake --install ./build
|
|
|
|
prepareInstalledDevelLib libtvision
|
|
|
|
# Fix usage of hardcoded "/include":
|
|
sed -e "s|\(\${_IMPORT_PREFIX}\)/include|\1/$relativeIncludeDir|" -i \
|
|
$libDir/cmake/tvision/tvision-config.cmake
|
|
|
|
packageEntries devel \
|
|
$developDir \
|
|
$libDir/cmake
|
|
|
|
# Not all examples that are built get "install"ed.
|
|
# Not included here:
|
|
# hello, mmenu, palette, tvdir, and tvforms (w/ genparts, genphone that generate data for it)
|
|
# Included:
|
|
# - tvdemo (demo for TurboVision widgets)
|
|
# - tvedit (a simple text editor)
|
|
# - tvhc (a .hlp compiler for tvision apps)
|
|
packageEntries tools \
|
|
$commandBinDir
|
|
}
|