# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils wxwidgets mono DESCRIPTION="wxWidgets bindings for mono" HOMEPAGE="http://wxnet.sf.net/" SRC_URI="http://puzzle.dl.sourceforge.net/sourceforge/${PN}/wx.NET-${PV}-Source.tar.gz" LICENSE="wxWinLL-3" SLOT="0" KEYWORDS="~x86" IUSE="gtk2 unicode" RDEPEND=">=dev-lang/mono-1.0.4-r1 >=x11-libs/wxGTK-2.6.1" DEPEND="sys-apps/sed dev-lang/perl" S="${WORKDIR}/wx.NET-${PV}" src_unpack() { unpack ${A} || die "Unpacking the source failed" cd ${S}/Build/Linux || die "Could not change directory." cp Defs.in.template Defs.in epatch ${FILESDIR}/Defs.in.patch || \ die "epatch failed on Defs.in.patch" cd ${S}/Build/Common || die "Could not change directory" epatch ${FILESDIR}/wx-config-helper.patch || \ die "epatch failed on wx-config-helper.patch" } src_compile() { dodir /usr/lib/wxnet cd ${S}/Build/Linux export WX_GTK_VER="2.6" if use unicode; then need-wxwidgets unicode || die "Emerge wxGTK with unicode in USE" elif use gtk2; then need-wxwidgets gtk2 || die "Emerge wxGTK with gtk2 in USE" else die "You need either a gtk2 or gtk2+unicode version of wxGTK" fi # Just satisfy the stupid wx-config-helper script mkdir -p ${S}/wx/lib/wx/config cp /usr/lib/wx/config/${WX_CONFIG_NAME} ${S}/wx/lib/wx/config/ || \ die "Could not copy wx-config file" # # We need to disable shared memory because of the ~/.wapi # # sandbox problem # export MONO_DISABLE_SHM=1 make wxnet || die "make wxnet failed" } src_install() { dodir /usr/share/doc/${PF}/{Samples,Bin} dodir /usr/bin cp -R ${S}/Samples/* ${D}/usr/share/doc/${PF}/Samples/ cp ${S}/Sample-Launcher.sh ${D}/usr/share/doc/${PF}/ cd ${S}/Bin dolib libwx-c.so *dll dodoc README.txt dohtml ${S}/Docs/Manual/* cp wxnet-run *exe ${D}/usr/share/doc/${PF}/Bin/ dosym /usr/share/doc/${PF}/Bin/towxnet.exe /usr/bin/towxnet.exe || die "dosym failed" } pkg_postinst() { einfo "You can view a demo by running:" einfo "/usr/share/doc/${PF}/Sample-Launcher.sh" }