forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-gfx/mypaint: Be robust to scons CXXFLAGS issues
Upstream scons bug: SCons/scons#3017 Package-Manager: Portage-2.3.43, Repoman-2.3.10
- Loading branch information
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Copyright 1999-2018 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
|
||
PYTHON_COMPAT=( python2_7 ) | ||
|
||
inherit flag-o-matic fdo-mime gnome2-utils scons-utils toolchain-funcs python-single-r1 | ||
|
||
DESCRIPTION="fast and easy graphics application for digital painters" | ||
HOMEPAGE="http://mypaint.org/" | ||
SRC_URI="https://github.com/mypaint/${PN}/releases/download/v${PV}/${P}.tar.xz" | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="" | ||
|
||
LANGS="cs de en_CA en_GB es fr hu id it ja ko nb nn_NO pl pt_BR ro ru sl sv uk zh_CN zh_TW" | ||
|
||
RDEPEND=" | ||
dev-python/pygobject:3[${PYTHON_USEDEP}] | ||
dev-python/numpy[${PYTHON_USEDEP}] | ||
>=dev-python/pycairo-1.4[${PYTHON_USEDEP}] | ||
dev-python/protobuf-python[${PYTHON_USEDEP}] | ||
>=dev-libs/json-c-0.11:= | ||
media-libs/lcms:2 | ||
>=media-libs/libmypaint-1.3.0 | ||
media-libs/libpng:0= | ||
gnome-base/librsvg | ||
${PYTHON_DEPS} | ||
" | ||
DEPEND="${RDEPEND} | ||
dev-lang/swig | ||
virtual/pkgconfig" | ||
|
||
REQUIRED_USE=${PYTHON_REQUIRED_USE} | ||
|
||
pkg_setup() { | ||
python-single-r1_pkg_setup | ||
} | ||
|
||
src_compile() { | ||
#workaround scons bug with locales. Bug #352700 | ||
export LANG="en_US.UTF-8" | ||
tc-export CC CXX | ||
strip-flags # scons upstream issue #3017 | ||
escons | ||
} | ||
|
||
src_install () { | ||
escons prefix="${D}/usr" install | ||
newicon pixmaps/${PN}_logo.png ${PN}.png | ||
for x in ${LANGS}; do | ||
if ! has ${x} ${LINGUAS}; then | ||
rm -rf "${ED}"/usr/share/locale/${x} || die | ||
fi | ||
done | ||
|
||
python_optimize "${D}"usr/share/${PN} | ||
# not used and broken | ||
rm -r "${ED}"/usr/{include/,lib/libmypaint.a,lib/pkgconfig/} || die | ||
# already provided by system-libmypaint | ||
rm "${ED}"/usr/share/locale/*/LC_MESSAGES/libmypaint* || die | ||
} | ||
|
||
pkg_preinst() { | ||
gnome2_icon_savelist | ||
} | ||
|
||
pkg_postinst() { | ||
fdo-mime_desktop_database_update | ||
gnome2_icon_cache_update | ||
} | ||
|
||
pkg_postrm() { | ||
fdo-mime_desktop_database_update | ||
} |