From cb04bdc56c6e16f90f44f5a4abb3ac3b5a3d2a98 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 18 Oct 2018 11:45:11 +0200 Subject: [PATCH] git-cola: Add version 3.2 Uses an 'embedded' PyQt5, which consumes 99.9% of the build. Also sip is included, but this should be unnecessary in future builds. --- git-cola-3.2-0.build.sh | 102 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100755 git-cola-3.2-0.build.sh diff --git a/git-cola-3.2-0.build.sh b/git-cola-3.2-0.build.sh new file mode 100755 index 0000000..bae523b --- /dev/null +++ b/git-cola-3.2-0.build.sh @@ -0,0 +1,102 @@ +#! /bin/bash + +set -xe + +PKG=git-cola +VERSION=3.2 +BUILD=0 +SRC=https://github.com/git-cola/git-cola/archive/v$VERSION.tar.gz +PREFIX=/pkg/$PKG-$VERSION-$BUILD +# PREFIX=/dev/shm/pkg/$PKG-$VERSION-$BUILD + +# sip should be part of recent pkg-pythons +SIP_VERSION=4.19.13 +SIP_SRC=https://sourceforge.net/projects/pyqt/files/sip/sip-$SIP_VERSION/sip-$SIP_VERSION.tar.gz + +# pyqt annoyances: +# v 5.11.3 is defunct due to api changes/borkage +# old 5.7, 5.7.1 now have problems with the qt-licence (what?) +# 5.8.2, 5.10.1 are ok, thus: + +PYQT_VERSION=5.10.1 +PYQT_SRC=https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-$PYQT_VERSION/PyQt5_gpl-$PYQT_VERSION.tar.gz + +PYTHONVER=$( python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d. ) +PATH=$PREFIX/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin +PYTHONPATH=$PREFIX/lib/python$PYTHONVER/site-packages +PYTHONLIB=$PYTHONPATH + +export PATH PYTHONPATH + +mkdir -p $PREFIX/build +mkdir -p $PYTHONPATH + +cat >$PREFIX/profile <<-EOF + PATH=$PREFIX/bin:\$PATH + PYTHONPATH=$PYTHONPATH\${PYTHONPATH:+":\$PYTHONPATH"} + export PATH PYTHONPATH +EOF + +cd $PREFIX/build + +if test -z "$(type -p sip)"; then # install sip + + test -e sip-$SIP_VERSION.tar.gz || wget $SIP_SRC + test -n 'XWIPE' && rm -rf sip-$SIP_VERSION + test -d sip-$SIP_VERSION || tar -xf sip-$SIP_VERSION.tar.gz + + cd sip-$SIP_VERSION + + python configure.py \ + -b $PREFIX/bin \ + -d $PYTHONLIB \ + -e $PREFIX/include/python$PYTHONVER \ + -v $PREFIX/share/sip + + mkdir -p $PREFIX/share/sip + make; make install + +fi + +cd $PREFIX/build + +test -e PyQt5_gpl-$PYQT_VERSION.tar.gz || wget $PYQT_SRC +test -n 'XWIPE' && rm -rf PyQt5_gpl-$PYQT_VERSION +test -d PyQt5_gpl-$PYQT_VERSION || tar -xf PyQt5_gpl-$PYQT_VERSION.tar.gz + +cd PyQt5_gpl-$PYQT_VERSION + +export QTDIR=/usr/local/qt5 + +python configure.py \ + -b $PREFIX/bin \ + -d $PYTHONLIB \ + -q /usr/local/qt5/bin/qmake \ + -v $PREFIX/share/sip \ + --confirm-license \ + --no-designer-plugin \ + --no-python-dbus \ + --no-qml-plugin \ + --no-stubs \ + --sip-incdir=$PREFIX/include/python$PYTHONVER \ + --verbose + +make -j $(( 2 * $(nproc) - 1 )) +make install + +cd $PREFIX/build + +test -e v$VERSION.tar.gz || wget $SRC +test -n 'XWIPE' && rm -rf git-cola-$VERSION +test -d git-cola-$VERSION || tar -xf v$VERSION.tar.gz + +cd git-cola-$VERSION +python setup.py install --prefix=$PREFIX + +# exit 1 # final barrier, inhibits 'closing' on success. + +# dump debris from build (approx. 200MB), but keep the sources +cd $PREFIX/build +find * -maxdepth 0 -type d -exec rm -rf {} \; + +exit