| 1 |
# Maintainer: The MyPaint Team <[email protected]> |
| 2 |
|
| 3 |
_realname=mypaint |
| 4 |
pkgbase=mingw-w64-${_realname} |
| 5 |
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" |
| 6 |
pkgver=2.0.1 |
| 7 |
pkgrel=1 |
| 8 |
provides=( |
| 9 |
"${MINGW_PACKAGE_PREFIX}-${_realname}" |
| 10 |
) |
| 11 |
conflicts=( |
| 12 |
"${MINGW_PACKAGE_PREFIX}-${_realname}-git" |
| 13 |
) |
| 14 |
arch=('any') |
| 15 |
pkgdesc="Simple drawing & painting program that works well with Wacom-style graphics tablets" |
| 16 |
depends=( |
| 17 |
"${MINGW_PACKAGE_PREFIX}-libmypaint" |
| 18 |
"${MINGW_PACKAGE_PREFIX}-gtk3" |
| 19 |
"${MINGW_PACKAGE_PREFIX}-python3" |
| 20 |
"${MINGW_PACKAGE_PREFIX}-python3-numpy" |
| 21 |
"${MINGW_PACKAGE_PREFIX}-json-c" |
| 22 |
"${MINGW_PACKAGE_PREFIX}-lcms2" |
| 23 |
"${MINGW_PACKAGE_PREFIX}-python3-cairo" |
| 24 |
"${MINGW_PACKAGE_PREFIX}-python3-gobject" |
| 25 |
"${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" |
| 26 |
"${MINGW_PACKAGE_PREFIX}-librsvg" |
| 27 |
"${MINGW_PACKAGE_PREFIX}-gcc-libs" |
| 28 |
"${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" |
| 29 |
"${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" |
| 30 |
"${MINGW_PACKAGE_PREFIX}-mypaint-brushes2" |
| 31 |
) |
| 32 |
makedepends=( |
| 33 |
"${MINGW_PACKAGE_PREFIX}-swig" |
| 34 |
"${MINGW_PACKAGE_PREFIX}-pkg-config" |
| 35 |
"${MINGW_PACKAGE_PREFIX}-pygobject-devel" |
| 36 |
"${MINGW_PACKAGE_PREFIX}-python3" |
| 37 |
"${MINGW_PACKAGE_PREFIX}-python3-setuptools" |
| 38 |
"swig" |
| 39 |
) |
| 40 |
options=('!strip' 'debug' 'staticlibs') |
| 41 |
license=("GPL2") |
| 42 |
url="http://mypaint.org" |
| 43 |
install=mypaint-${CARCH}.install |
| 44 |
source=("${_realname}::git+https://github.com/mypaint/mypaint.git#tag=v2.0.1") |
| 45 |
sha256sums=('SKIP') |
| 46 |
|
| 47 |
CFLAGS="-O3 -ftree-vectorize -funsafe-math-optimizations -funsafe-loop-optimizations" |
| 48 |
CXXFLAGS="-O3 -ftree-vectorize -funsafe-math-optimizations -funsafe-loop-optimizations" |
| 49 |
|
| 50 |
|
| 51 |
pkgver() { |
| 52 |
cd "${srcdir}"/${_realname} |
| 53 |
eval `python3 lib/meta.py` |
| 54 |
echo "$MYPAINT_VERSION_CEREMONIAL" \ |
| 55 |
| sed 's,-\(alpha\),\1.'`date +d%Y%m%d`',' \ |
| 56 |
| sed 's,-\(beta\|rc\),\1,' \ |
| 57 |
| sed 's,+git[a-z]*\.\?,.g,' \ |
| 58 |
| sed 's,-,_,g' |
| 59 |
} |
| 60 |
|
| 61 |
prepare() { |
| 62 |
cd "${srcdir}"/${_realname} |
| 63 |
} |
| 64 |
|
| 65 |
build() { |
| 66 |
cd "${srcdir}/${_realname}" |
| 67 |
${MINGW_PREFIX}/bin/python3 setup.py clean --all |
| 68 |
|
| 69 |
REL_BRUSH_PATH=".${MINGW_PREFIX}/share/mypaint-data/2.0/brushes" |
| 70 |
${MINGW_PREFIX}/bin/python3 setup.py build_config --brushdir-path="${REL_BRUSH_PATH}" build |
| 71 |
} |
| 72 |
|
| 73 |
package() { |
| 74 |
cd "${srcdir}/${_realname}" |
| 75 |
echo "prefix: ${MINGW_PREFIX}" |
| 76 |
echo "root: ${pkgdir}" |
| 77 |
|
| 78 |
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-purelib=;--install-data=" \ |
| 79 |
${MINGW_PREFIX}/bin/python3 setup.py install \ |
| 80 |
--prefix=${MINGW_PREFIX} --root="${pkgdir}" \ |
| 81 |
--optimize=1 \ |
| 82 |
--skip-build |
| 83 |
|
| 84 |
# Fix Python #! to not refer to Windows paths (C:\mymsys32\...) |
| 85 |
local PREFIX_WIN=$(cygpath -wm "${MINGW_PREFIX}") |
| 86 |
for script in "${pkgdir}${MINGW_PREFIX}/bin"/mypaint*; do |
| 87 |
sed -e "s|^\(#!.*\)${PREFIX_WIN}/bin/|\1/usr/bin/env |g" -i "$script" |
| 88 |
done |
| 89 |
|
| 90 |
install -Dm644 COPYING \ |
| 91 |
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" |
| 92 |
install -Dm644 Licenses.md \ |
| 93 |
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/Licenses.md" |
| 94 |
install -Dm644 Licenses.dep5 \ |
| 95 |
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/Licenses.dep5" |
| 96 |
} |