mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
glances: switch to Python 3.10. (#9485)
Recipe is still disabled, as it depends on a working psutil package, but at least now looks more decent (and builds without complains).
This commit is contained in:
@@ -9,64 +9,46 @@ LICENSE="GNU LGPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/nicolargo/glances/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="e3e8f9362b82c74427522e82501b47696945251035b35282f9ee4bc533996220"
|
||||
#SOURCE_DIR="psutil-release-$portVersion"
|
||||
#PATCHES="psutil-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
ARCHITECTURES="?any"
|
||||
|
||||
pythonVersion=3.10
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
cmd:glances = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
haiku
|
||||
future_$pythonPackage
|
||||
psutil_$pythonPackage
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39)
|
||||
PYTHON_VERSIONS=(3.9)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku$secondaryArchSuffix\n\
|
||||
future_$pythonPackage\n\
|
||||
psutil${secondaryArchSuffix}_$pythonPackage\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
haiku_devel
|
||||
setuptools_$pythonPackage
|
||||
psutil${secondaryArchSuffix}_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
python=python$pythonVersion
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||||
mkdir -p $installLocation
|
||||
rm -rf build
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
mkdir -p $installLocation
|
||||
rm -rf build
|
||||
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
|
||||
mkdir -p $docDir $manDir
|
||||
mv $prefix/share/doc/glances/* $docDir/
|
||||
mv $prefix/share/man/* $manDir/
|
||||
rm -rf $prefix/share
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user