From 57af47e7cd98a3255e6ceb5726575f65c0f37e0e Mon Sep 17 00:00:00 2001 From: Oscar Lesta Date: Sun, 28 Sep 2025 04:04:30 -0300 Subject: [PATCH] smartypants: new recipe (needed by rst2pdf 0.102). --- .../smartypants/smartypants-2.0.2.recipe | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 dev-python/smartypants/smartypants-2.0.2.recipe diff --git a/dev-python/smartypants/smartypants-2.0.2.recipe b/dev-python/smartypants/smartypants-2.0.2.recipe new file mode 100644 index 000000000..b78b3a7d9 --- /dev/null +++ b/dev-python/smartypants/smartypants-2.0.2.recipe @@ -0,0 +1,86 @@ +SUMMARY="A Python fork of SmartyPants" +DESCRIPTION="Translate plain ASCII quotation marks and other characters into “smart” typographic HTML entities." +HOMEPAGE="https://github.com/justinmayer/smartypants.py" +COPYRIGHT="2025–present, Justin Mayer + 2017, Leo Hemsted + 2013, 2014, 2015, 2016 Yu-Jie Lin + 2004, 2005, 2007, 2013 Chad Miller + 2003 John Gruber + " +LICENSE=" + BSD (3-clause) + BSD (2-clause) + " +REVISION="1" +SOURCE_URI="https://files.pythonhosted.org/packages/py2.py3/${portName:0:1}/$portName/$portName-$portVersion-py2.py3-none-any.whl#noarchive" +CHECKSUM_SHA256="9471578606e8ee0740065bf8771f55fec8c83313cb98c5d1c1864ddd389d0f3a" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +# Add more versions here if necessary: +PYTHON_VERSIONS=(3.10) +defaultVersion=3.10 + +for pythonVersion in ${PYTHON_VERSIONS[@]}; do + pythonPackage=python${pythonVersion//.} + + eval "PROVIDES_$pythonPackage=\" + ${portName}_$pythonPackage = $portVersion + cmd:smartypants_$pythonVersion = $portVersion + \"" + + if [ $pythonVersion = $defaultVersion ]; then + eval "PROVIDES_$pythonPackage+=\" + cmd:smartypants = $portVersion + \"" + fi + + eval "REQUIRES_$pythonPackage=\" + $REQUIRES + cmd:python$pythonVersion + \"" + + BUILD_REQUIRES+=" + installer_$pythonPackage + " + BUILD_PREREQUIRES+=" + cmd:python$pythonVersion + " +done + +INSTALL() +{ + for pythonVersion in ${PYTHON_VERSIONS[@]}; do + pythonPackage=python${pythonVersion//.} + + python=python$pythonVersion + $python -m installer -p $prefix $portName-$portVersion-py2.py3-none-any.whl + + # Version suffix all the scripts + for f in $binDir/*; do + mv $f $f-$pythonVersion + done + + # And provide suffix-less symlinks for the default version + if [ $pythonVersion = $defaultVersion ]; then + for f in $binDir/*; do + ln -sr $f ${f%-$pythonVersion} + done + fi + + packageEntries $pythonPackage \ + $prefix/lib/python* \ + $binDir + done +}