python-breathe: New package
This commit is contained in:
89
mingw-w64-python-breathe/PKGBUILD
Normal file
89
mingw-w64-python-breathe/PKGBUILD
Normal file
@@ -0,0 +1,89 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=breathe
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=4.10.0
|
||||
pkgrel=1
|
||||
pkgdesc="An extension to reStructuredText and Sphinx to be able to read and render Doxygen xml output (mingw-w64)"
|
||||
arch=('any')
|
||||
url="https://breathe.readthedocs.org/en/latest/"
|
||||
license=('BSD')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
||||
options=('staticlibs' 'strip' '!debug')
|
||||
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/michaeljones/breathe/archive/v${pkgver}.tar.gz")
|
||||
sha256sums=('10e294ca2927d40c83343674186ce6fad539acfb464ffd765fd371adc1126d4d')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
for builddir in python{2,3}-build-${CARCH}; do
|
||||
rm -rf ${builddir} | true
|
||||
cp -r "${_realname}-${pkgver}" "${builddir}"
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
for pver in {2,3}; do
|
||||
msg "Python ${pver} build for ${CARCH}"
|
||||
cd "${srcdir}/python${pver}-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/python${pver} setup.py build
|
||||
done
|
||||
}
|
||||
|
||||
package_python3-breathe() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python3")
|
||||
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \
|
||||
--root="${pkgdir}" --optimize=1 --skip-build
|
||||
|
||||
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
||||
# fix python command in files
|
||||
for _ff in ${pkgdir}${MINGW_PREFIX}/bin/*.py; do
|
||||
sed -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_ff}
|
||||
done
|
||||
}
|
||||
|
||||
package_python2-breathe() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python2")
|
||||
|
||||
cd "${srcdir}/python2-build-${CARCH}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \
|
||||
--root="${pkgdir}" --optimize=1 --skip-build
|
||||
|
||||
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
||||
# fix python command in files
|
||||
for _ff in ${pkgdir}${MINGW_PREFIX}/bin/*.py; do
|
||||
sed -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_ff}
|
||||
done
|
||||
|
||||
for f in breathe-apidoc; do
|
||||
mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe
|
||||
if [ -f "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest ]; then
|
||||
mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe.manifest
|
||||
sed -e "s|${f}|${f}2|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/${f}2.exe.manifest
|
||||
fi
|
||||
mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}-script.py
|
||||
done
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-python2-breathe() {
|
||||
package_python2-breathe
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-python3-breathe() {
|
||||
package_python3-breathe
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-python2-breathe() {
|
||||
package_python2-breathe
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-python3-breathe() {
|
||||
package_python3-breathe
|
||||
}
|
||||
Reference in New Issue
Block a user