Files
haikuports/games-kids/gcompris/gcompris-26.0.recipe
2026-02-04 13:49:21 +01:00

165 lines
4.7 KiB
Bash

SUMMARY="Educational software suite comprising of numerous activities for kids"
DESCRIPTION="GCompris is a high quality educational software suite comprising of numerous \
activities for children aged 2 to 10.
Some of the activities are game orientated, but nonetheless still educational."
HOMEPAGE="https://gcompris.net/"
COPYRIGHT="2014-2016 Bruno Coudoin
2014-2016 Johnny Jazeix
2016 Stefan Toncu
2014-2015 Stephane Mankowski
2015 Sagar Chand Agarwal
2014 Emmanuel Charruau
2014-2015 Holger Kaelberer
2014 Pulkit Gupta
2010-2011 Alessandro Portale
2014 Aruna Sankaranarayanan
2015 Siddhesh suthar"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://download.kde.org/stable/gcompris/qt/src/gcompris-qt-$portVersion.tar.xz"
CHECKSUM_SHA256="7d3df8be96dd6e883990abe14f9137900030d508d3a30e2b38e39d0eb31ef333"
SOURCE_DIR="gcompris-qt-$portVersion"
PATCHES="gcompris-$portVersion.patchset"
ADDITIONAL_FILES="gcompris.rdef.in
gcompris-teachers.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
gcompris$secondaryArchSuffix = $portVersion
app:GCompris = $portVersion
cmd:gcompris = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libopenal$secondaryArchSuffix
lib:libQt6Charts$secondaryArchSuffix
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
lib:libQt6Graphs$secondaryArchSuffix
lib:libQt6Multimedia$secondaryArchSuffix
lib:libQt6Network$secondaryArchSuffix
lib:libQt6OpenGL$secondaryArchSuffix
lib:libQt6Qml$secondaryArchSuffix
lib:libQt6Quick$secondaryArchSuffix
lib:libQt6Quick3D$secondaryArchSuffix
lib:libQt6Sensors$secondaryArchSuffix
lib:libQt6ShaderTools$secondaryArchSuffix
lib:libQt6Svg$secondaryArchSuffix
lib:libQt6Widgets$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
"
SUMMARY_teachers="Teachers tool to follow up on students progress"
PROVIDES_teachers="
gcompris${secondaryArchSuffix}_teachers
app:GCompris_Teachers = $portVersion
"
REQUIRES_teachers="
gcompris$secondaryArchSuffix == $portVersion base
$REQUIRES
"
# developer tool
#SUMMARY_inkscape_extention="Inkscape export extension"
#PROVIDES_inkscape_extention="
# gcompris${secondaryArchSuffix}_inkscape_extention
# "
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
extra_cmake_modules$secondaryArchSuffix
# gcc_syslibs${secondaryArchSuffix}_devel
qml_box2d_qt6$secondaryArchSuffix
qt6_tools${secondaryArchSuffix}_devel
devel:libcrypto$secondaryArchSuffix >= 3
devel:libQt6Charts$secondaryArchSuffix
devel:libQt6Core$secondaryArchSuffix
devel:libQt6Gui$secondaryArchSuffix
devel:libQt6Graphs$secondaryArchSuffix
devel:libQt6Multimedia$secondaryArchSuffix
devel:libQt6Network$secondaryArchSuffix
devel:libQt6Qml$secondaryArchSuffix
devel:libQt6Quick$secondaryArchSuffix
devel:libQt6Svg$secondaryArchSuffix
devel:libQt6Sensors$secondaryArchSuffix
devel:libQt6Widgets$secondaryArchSuffix
devel:libssl$secondaryArchSuffix >= 3
"
BUILD_PREREQUIRES="
# cmd:clang_tidy
# cmd:cppcheck
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:msgattrib$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
"
TEST_REQUIRES="
qthaikuplugins$secondaryArchSuffix
"
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$appsDir \
-DGRAPHICAL_RENDERER=software \
-DQML_BOX2D_LIBRARY="`finddir B_SYSTEM_DATA_DIRECTORY`/Qt6/qml/Box2D" \
-DPACKAGE_SERVER=ON \
-DCMAKE_SKIP_RPATH=YES \
-DBUILD_TESTING=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
# cleanup
rm -rf $dataDir/{applications,icons,metainfo}
# Inkscape extension
mkdir -p $dataDir/inkscape/extensions
cp tools/inkscape/{export_layers_gcompris.inx,export_layers_gcompris.py,README} \
$dataDir/inkscape/extensions
mkdir $prefix/bin
ln -s $appsDir/GCompris $prefix/bin/gcompris
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
$portDir/additional-files/gcompris.rdef.in > gcompris.rdef
addResourcesToBinaries gcompris.rdef $appsDir/GCompris
addAppDeskbarSymlink $appsDir/GCompris
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
$portDir/additional-files/gcompris-teachers.rdef.in > gcompris-teachers.rdef
addResourcesToBinaries gcompris-teachers.rdef $appsDir/GCompris-Teachers
addAppDeskbarSymlink $appsDir/GCompris-Teachers
packageEntries teachers \
$appsDir/GCompris-Teachers \
$dataDir/deskbar/menu/Applications/GCompris-Teachers
# packageEntries inkscape_extention \
# $dataDir/inkscape
}
TEST()
{
ctest --test-dir build --output-on-failure
}