Add recipe for reportlab 3.6.9 (#6825)

* Add recipe for reportlab 3.6.9
This commit is contained in:
Ivan Holmes
2022-04-19 13:50:00 +01:00
committed by GitHub
parent 2c646229f0
commit b254189b8c
2 changed files with 122 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
From c2fbc73f80870621b9eb120a1af26c7b8aa112c5 Mon Sep 17 00:00:00 2001
From: Ivan Holmes <ivan@ivanholmes.co.uk>
Date: Mon, 11 Apr 2022 17:29:01 +0100
Subject: Add Haiku-specific include/library paths
diff --git a/setup.py b/setup.py
index 3b7e665..fdc5af7 100644
--- a/setup.py
+++ b/setup.py
@@ -252,6 +252,11 @@ class inc_lib_dirs:
# darwin ports installation directories
aDir(L, "/opt/local/lib")
aDir(I, "/opt/local/include")
+ elif platform.startswith("haiku"):
+ aDir(I, "/boot/system/develop/headers/x86/freetype2")
+ aDir(I, "/boot/system/develop/headers/freetype2")
+ aDir(L, "/boot/system/lib/x86")
+ aDir(L, "/boot/system/lib")
aDir(I, "/usr/local/include")
aDir(L, "/usr/local/lib")
aDir(I, "/usr/include")
--
2.30.2
From a599b24524dc317d69b13cb0ca08855a1951e878 Mon Sep 17 00:00:00 2001
From: Ivan Holmes <ivan@ivanholmes.co.uk>
Date: Mon, 11 Apr 2022 17:44:15 +0100
Subject: add vendor-packages to potential package_paths
diff --git a/setup.py b/setup.py
index fdc5af7..3c01392 100644
--- a/setup.py
+++ b/setup.py
@@ -93,7 +93,7 @@ def _packages_path(d):
P = [_ for _ in sys.path if basename(_)==d]
if P: return P[0]
-package_path = _packages_path('dist-packages') or _packages_path('site-packages')
+package_path = _packages_path('dist-packages') or _packages_path('site-packages') or _packages_path('vendor-packages')
package_path = pjoin(package_path, 'reportlab')
def die(msg):
--
2.30.2

View File

@@ -0,0 +1,74 @@
SUMMARY="An open source Python library for generating PDFs and graphics"
DESCRIPTION="ReportLab is a software library that lets you directly create documents in Adobe's \
Portable Document Format (PDF) using the Python programming language. It also creates charts and \
data graphics in various bitmap and vector formats as well as PDF.
The ReportLab library directly creates PDF documents based on your graphics commands with no \
intervening steps. This means your applications can generate reports extremely quickly compared \
to other approaches such as scripting GUI PDF authoring tools."
HOMEPAGE="https://pypi.org/project/reportlab/
https://www.reportlab.com/"
COPYRIGHT="2000-2021 ReportLab Europe Ltd."
LICENSE="BSD (3-clause)"
REVISION="1"
pypi="81ff7e3f9fd345cd4685f964fbc3d89a06f39a4f552ab1c2a5769a0f9013"
SOURCE_URI="https://files.pythonhosted.org/packages/16/31/$pypi/reportlab-$portVersion.tar.gz"
CHECKSUM_SHA256="5d0cc3682456ad213150f6dbffe7d47eab737d809e517c316103376be548fb84"
SOURCE_DIR="reportlab-$portVersion"
PATCHES="reportlab-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfreetype$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:git
"
PYTHON_PACKAGES=(python3 python38 python39 python310)
PYTHON_VERSIONS=(3.7 3.8 3.9 3.10)
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\n\
lib:libfreetype$secondaryArchSuffix\n\
\""
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
}