--- /dev/null
+# Copyright © 2017 Nick Bowler
+# License GPLv3+: GNU General Public License version 3 or later.
+# There is NO WARRANTY, to the extent permitted by law.
+
+EAPI=6
+
+inherit toolchain-funcs
+
+# Github repo has no release tags, and chromium repo has no stable
+# download archives. Fun times.
+SHA1=04b5510716baccee8a3e4a502d6aab38ea35a6a3
+MY_P=$PN-$SHA1
+
+DESCRIPTION="More Open System tool for ChromiumOS"
+HOMEPAGE="https://github.com/dhendrix/mosys"
+SRC_URI="https://github.com/dhendrix/$PN/archive/$SHA1.tar.gz -> $MY_P.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~arm"
+
+LIBDEPEND="sys-libs/flashmap
+ sys-apps/util-linux"
+DEPEND="$LIBDEPEND
+ sys-libs/ncurses:0
+ virtual/pkgconfig"
+RDEPEND=$LIBDEPEND
+
+PATCHES=(
+ "$FILESDIR/$PN-verbose-library-tests.patch"
+)
+
+S=$WORKDIR/$MY_P
+
+my_emake () {
+ emake V=1 CC_LDFLAGS="$LDFLAGS" EXTRA_CFLAGS="$CFLAGS" \
+ CC="$(tc-getCC)" LD="$(tc-getCC) -nostdlib" AR="$(tc-getAR)" \
+ HOSTCC="$(tc-getBUILD_CC)" "$@" || die
+}
+
+src_configure () {
+ my_emake defconfig
+}
+
+src_compile () {
+ my_emake
+}
+
+src_install () {
+ dosbin mosys
+ dodoc README
+}