From d150a5f3e462fa7fe194a805a4aa0076f4d03ab9 Mon Sep 17 00:00:00 2001 From: Deposite Pirate Date: Sun, 16 Sep 2018 18:48:36 +0200 Subject: Add ports. --- development/python/python.build | 114 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100755 development/python/python.build (limited to 'development/python/python.build') diff --git a/development/python/python.build b/development/python/python.build new file mode 100755 index 0000000..4eef21c --- /dev/null +++ b/development/python/python.build @@ -0,0 +1,114 @@ +#!/bin/bash +# +# Maintainer: Deposite Pirate + +source /usr/src/ports/Build/build.sh + +NAME=python +MAJOR=2.7 +VERSION=${MAJOR}.4 +BUILD=1 +OPTDEPENDS=('gdbm >= 1.10-1' 'bzip2 >= 1.0.6-1' 'openssl >= 1.0.1e-1' 'expat >= 2.1.0-1' 'sqlite >= 3.7.16.1-1') + +# Description + +cat > ${PKG}/install/slack-desc < python2.1 + echo ".so man1/python${MAJOR}.1" > python.1 +) +# Fix conflicts with python 3.x +( + cd ${PKG}${SYS_DIR[bin]} + mv idle{,2} + mv pydoc{,2} + mv 2to3{,-${MAJOR}} + ln -sf idle2 idle + ln -sf pydoc2 pydoc + ln -sf 2to3-${MAJOR} 2to3 +) +# We don't need smtp.py in /usr/bin +mv ${PKG}${SYS_DIR[bin]}/smtpd.py ${PKG}${PYTHONLIBDIR} +# python -> python2 +sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + $(find ${PKG}${PYTHONLIBDIR} -name '*.py') +# More clean up... +sed -i "s|${PKG}/Python-${SRCVERS[0]}:||g" ${PKG}${PYTHONLIBDIR}/config/Makefile +} -- cgit v1.2.3-70-g09d2