pylzma: bump version.

This commit is contained in:
Jerome Duval
2019-10-25 20:50:53 +02:00
parent 8731213b72
commit 1aa1a84cf8
2 changed files with 81 additions and 49 deletions

View File

@@ -1,49 +0,0 @@
SUMMARY="Python bindings for the LZMA library by Igor Pavlov"
DESCRIPTION="Contains numerous packages that will allow Python to unpack \
archives."
HOMEPAGE="https://www.joachim-bauch.de/projects/pylzma/"
COPYRIGHT="2004-2015 Joachim Bauch
7-zip 1999-2010 Igor Pavlov
LZMA SDK 1999-2010 Igor Pavlov"
LICENSE="MIT"
REVISION="4"
SOURCE_URI="https://files.pythonhosted.org/packages/fe/33/9fa773d6f2f11d95f24e590190220e23badfea3725ed71d78908fbfd4a14/pylzma-0.4.8.tar.gz"
CHECKSUM_SHA256="e6239cc4c134083ef6cfee54b1b9f5116dfc081474e093136b1b0e3226ac2532"
ARCHITECTURES="x86 x86_gcc2 x86_64"
PROVIDES="
pylzma = $portVersion
"
REQUIRES="
haiku
cmd:python
"
BUILD_REQUIRES="
haiku_devel
setuptools_python
cmd:sed
"
BUILD_PREREQUIRES="
cmd:gcc
cmd:python
"
BUILD()
{
$portPackageLinksDir/cmd~python/bin/python setup.py build
}
INSTALL()
{
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python/bin/python
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
$python setup.py install \
--prefix=$prefix
}

View File

@@ -0,0 +1,81 @@
SUMMARY="Python bindings for the LZMA library by Igor Pavlov"
DESCRIPTION="Contains numerous packages that will allow Python to unpack \
archives."
HOMEPAGE="https://www.joachim-bauch.de/projects/pylzma/"
COPYRIGHT="2004-2015 Joachim Bauch
7-zip 1999-2010 Igor Pavlov
LZMA SDK 1999-2010 Igor Pavlov"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://pypi.io/packages/source/p/pylzma/pylzma-$portVersion.tar.gz"
CHECKSUM_SHA256="b874172afbf37770e643bf2dc9d9b6b03eb95d8f8162e157145b3fe9e1b68a1c"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
gcc$secondaryArchSuffix
"
PYTHON_PACKAGES=()
PYTHON_VERSIONS=()
# We don't have python2 for secondaryArch
if [ -z "$secondaryArchSuffix" ]; then
PYTHON_PACKAGES+=(python)
PYTHON_VERSIONS+=(2.7)
fi
# gcc2 does not support the flags passed by python3
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
PYTHON_PACKAGES+=(python3)
PYTHON_VERSIONS+=(3.7)
fi
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
if [ "$targetArchitecture" = x86_gcc2 -a -n "$secondaryArchSuffix" ]; then
PROVIDES_python3+="
pylzma_python3 = $portVersion
"
fi
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
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
packageEntries $pythonPackage \
$prefix/lib/python*
done
}