--- ../../../../../portage/x11-libs/wxGTK/wxGTK-3.0.2.0-r1.ebuild 2015-02-02 19:26:17.000000000 +0300 +++ ./wxGTK-3.0.2.0-r1.ebuild 2015-02-23 17:00:38.126293522 +0300 @@ -4,7 +4,7 @@ EAPI="5" -inherit eutils flag-o-matic +inherit eutils flag-o-matic multilib-minimal DESCRIPTION="GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit" HOMEPAGE="http://wxwidgets.org/" @@ -19,7 +19,7 @@ SLOT="3.0" -RDEPEND=" +NATIVE_DEPEND=" dev-libs/expat sdl? ( media-libs/libsdl ) X? ( @@ -46,14 +46,95 @@ tiff? ( media-libs/tiff:0 ) )" +RDEPEND=" + !amd64? ( ${NATIVE_DEPEND} ) + amd64? ( + abi_x86_64? ( ${NATIVE_DEPEND} ) + abi_x86_32? ( + || ( + app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + ( + dev-libs/expat[abi_x86_32] + X? ( + >=dev-libs/glib-2.22:2[abi_x86_32] + media-libs/libpng:0=[abi_x86_32] + sys-libs/zlib[abi_x86_32] + virtual/jpeg[abi_x86_32] + tiff? ( media-libs/tiff:0[abi_x86_32] ) + ) + ) + ) + sdl? ( || ( + app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] + media-libs/libsdl[abi_x86_32] + ) ) + X? ( + || ( + app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)] + ( + >=x11-libs/gtk+-2.18:2[abi_x86_32] + x11-libs/gdk-pixbuf[abi_x86_32] + x11-libs/pango[X,abi_x86_32] + libnotify? ( x11-libs/libnotify ) + ) + ) + + || ( + app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] + ( + x11-libs/libSM[abi_x86_32] + x11-libs/libXxf86vm[abi_x86_32] + ) + ) + + gstreamer? ( || ( + app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] + ( + media-libs/gstreamer:0.10[abi_x86_32] + media-libs/gst-plugins-base:0.10[abi_x86_32] + ) + ) ) + opengl? ( || ( + app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] + virtual/opengl[abi_x86_32] + ) ) + webkit? ( net-libs/webkit-gtk:2[abi_x86_32] ) + ) + aqua? ( + || ( + app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)] + >=x11-libs/gtk+-2.4[abi_x86_32,aqua=] + ) + + || ( + app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + ( + virtual/jpeg[abi_x86_32] + tiff? ( media-libs/tiff:0[abi_x86_32] ) + ) + ) + ) + ) + ) +" + DEPEND="${RDEPEND} - virtual/pkgconfig - opengl? ( virtual/glu ) + !amd64? ( virtual/glu ) + amd64? ( + abi_x86_64? ( virtual/glu ) + abi_x86_32? ( + opengl? ( || ( + app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] + virtual/glu[abi_x86_32] + ) ) + ) + ) + virtual/pkgconfig[${MULTILIB_USEDEP}] X? ( - x11-proto/xproto - x11-proto/xineramaproto - x11-proto/xf86vidmodeproto - )" + x11-proto/xproto[${MULTILIB_USEDEP}] + x11-proto/xineramaproto[${MULTILIB_USEDEP}] + x11-proto/xf86vidmodeproto[${MULTILIB_USEDEP}] + )" PDEPEND=">=app-admin/eselect-wxwidgets-20131230" @@ -65,20 +146,23 @@ src_prepare() { epatch "${FILESDIR}"/${PN}-3.0.0.0-collision.patch - - # https://bugs.gentoo.org/421851 - # https://bugs.gentoo.org/499984 - # https://bugs.gentoo.org/536004 - sed \ - -e "/wx_cv_std_libpath=/s:=.*:=$(get_libdir):" \ - -e 's:3\.0\.1:3.0.2:g' \ - -e 's:^wx_release_number=1$:wx_release_number=2:' \ - -i configure || die - epatch_user + + multilib_prepare() { + # https://bugs.gentoo.org/421851 + # https://bugs.gentoo.org/499984 + # https://bugs.gentoo.org/536004 + sed \ + -e "/wx_cv_std_libpath=/s:=.*:=$(get_libdir):" \ + -e 's:3\.0\.1:3.0.2:g' \ + -e 's:^wx_release_number=1$:wx_release_number=2:' \ + -i "${BUILD_DIR}"/configure || die + } + multilib_copy_sources + multilib_parallel_foreach_abi multilib_prepare } -src_configure() { +multilib_src_configure() { local myconf # X independent options @@ -133,22 +217,24 @@ --disable-gui" fi - mkdir "${S}"/wxgtk_build - cd "${S}"/wxgtk_build - ECONF_SOURCE="${S}" econf ${myconf} } -src_compile() { - cd "${S}"/wxgtk_build - emake +multilib_src_compile() { + default } -src_install() { - cd "${S}"/wxgtk_build +multilib_src_install() { + default - emake DESTDIR="${D}" install + if multilib_is_native_abi; then + # Stray windows locale file, causes collisions + local wxmsw="${ED}usr/share/locale/it/LC_MESSAGES/wxmsw.mo" + [[ -e ${wxmsw} ]] && rm "${wxmsw}" + fi +} +multilib_src_install_all() { cd "${S}"/docs dodoc changes.txt readme.txt newdoc base/readme.txt base_readme.txt @@ -157,10 +243,6 @@ if use doc; then dohtml -r "${S}"/docs/doxygen/out/html/* fi - - # Stray windows locale file, causes collisions - local wxmsw="${ED}usr/share/locale/it/LC_MESSAGES/wxmsw.mo" - [[ -e ${wxmsw} ]] && rm "${wxmsw}" } pkg_postinst() {