mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 00:30:06 +02:00
rst2pdf, add recipe (can be used in MasterPiece to export to PDF) (#10655)
This commit is contained in:
70
dev-python/rst2pdf/rst2pdf-0.102.recipe
Normal file
70
dev-python/rst2pdf/rst2pdf-0.102.recipe
Normal file
@@ -0,0 +1,70 @@
|
||||
SUMMARY="Use a text editor. Make a PDF"
|
||||
DESCRIPTION="The rst2pdf tool creates PDF documents from your ReStructured Text markup. It is an \
|
||||
Open Source, free-to-use tool that will help you create documents, slide decks and other PDF \
|
||||
output very quickly and easily."
|
||||
HOMEPAGE="http://rst2pdf.github.io/"
|
||||
COPYRIGHT="2007-2020 Roberto Alsina and the contributors to the rst2pdf project"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/rst2pdf/rst2pdf/archive/refs/tags/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="45d7d1e074793762d9aa9799cfbaa15495377456fd88ed63fa941c562cd165eb"
|
||||
SOURCE_FILENAME="rst2pdf-$portVersion.tar.gz"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_VERSIONS=(3.10)
|
||||
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
cmd:rst2pdf = $portVersion
|
||||
\""
|
||||
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
reportlab_$pythonPackage
|
||||
\""
|
||||
BUILD_REQUIRES+="
|
||||
setuptools_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=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
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$binDir
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user