pyopengl, bump version, working recipe (#4866)

This commit is contained in:
Schrijvers Luc
2020-04-17 09:12:00 +02:00
committed by GitHub
parent bb056a7a8e
commit 8dec539418
2 changed files with 62 additions and 23 deletions

View File

@@ -1,23 +0,0 @@
DESCRIPTION="pyopengl - python opengl bindings"
HOMEPAGE="http://pyopengl.sourceforge.net"
SOURCE_URI="http://pypi.python.org/packages/source/P/PyOpenGL/PyOpenGL-3.0.1.tar.gz"
CHECKSUM_MD5="cdf03284f24279b8d9914bb680a37b5e"
REVISION="1"
STATUS_HAIKU="unstable"
DEPEND="dev-lang/python >= 2.6.4
media-libs/freeglut"
BUILD()
{
cd PyOpenGL-3.0.1
python setup.py build
}
INSTALL()
{
cd PyOpenGL-3.0.1
python setup.py install --root=${DESTDIR}
}
LICENSE="BSD (3-clause)"
COPYRIGHT="1997-1998, 2000-2009, by the contributors
All rights reserved."

View File

@@ -0,0 +1,62 @@
SUMMARY="Common cross platform Python binding to OpenGL"
DESCRIPTION="PyOpenGL is the most common cross platform Python binding to \
OpenGL and related APIs.
The binding is created using the standard ctypes library, and is provided \
under an extremely liberal BSD-style Open-Source license."
HOMEPAGE="https://pypi.org/project/PyOpenGL/"
COPYRIGHT="1997-1998, 2004-2020 Mike C. Fletcher"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://files.pythonhosted.org/packages/b8/73/31c8177f3d236e9a5424f7267659c70ccea604dab0585bfcd55828397746/PyOpenGL-$portVersion.tar.gz"
CHECKSUM_SHA256="4107ba0d0390da5766a08c242cf0cf3404c377ed293c5f6d701e457c57ba3424"
SOURCE_DIR="PyOpenGL-$portVersion"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python3)
PYTHON_VERSIONS=(3.7)
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
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
}