diff options
author | 2007-10-28 03:48:00 -0700 | |
---|---|---|
committer | 2007-10-28 03:48:00 -0700 | |
commit | 602936b50b87c592846f4432e4a5a7c2d64cf2ee (patch) | |
tree | e216738a174f7084681de64c2b29377aaf32d9c6 /sys-apps | |
parent | Add hacked-together pyvnc2swf and dep pymedia. (diff) | |
download | dberkholz-602936b50b87c592846f4432e4a5a7c2d64cf2ee.tar.gz dberkholz-602936b50b87c592846f4432e4a5a7c2d64cf2ee.tar.bz2 dberkholz-602936b50b87c592846f4432e4a5a7c2d64cf2ee.zip |
Add a collection of basis system utilities written in assembly.
Nice and small, although I haven't compared with busybox yet.
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/asmutils/Manifest | 16 | ||||
-rw-r--r-- | sys-apps/asmutils/asmutils-0.18.ebuild | 54 | ||||
-rw-r--r-- | sys-apps/asmutils/files/0.18-fix-undefined-references-in-asm.patch | 32 | ||||
-rw-r--r-- | sys-apps/asmutils/files/0.18-rename-do-asm-label.patch | 21 | ||||
-rw-r--r-- | sys-apps/asmutils/files/digest-asmutils-0.18 | 3 |
5 files changed, 126 insertions, 0 deletions
diff --git a/sys-apps/asmutils/Manifest b/sys-apps/asmutils/Manifest new file mode 100644 index 0000000..50807c1 --- /dev/null +++ b/sys-apps/asmutils/Manifest @@ -0,0 +1,16 @@ +AUX 0.18-fix-undefined-references-in-asm.patch 1004 RMD160 81027f5d68f2f65bdf86575682e535814c84e93d SHA1 ff844a0292b1e0794b7146934961b541233da3b9 SHA256 25ef217020a58e8562677e80d048fe722903d92f297af7026e9a61ec19a78bf4 +MD5 59b9414e3aca991830519be573d976df files/0.18-fix-undefined-references-in-asm.patch 1004 +RMD160 81027f5d68f2f65bdf86575682e535814c84e93d files/0.18-fix-undefined-references-in-asm.patch 1004 +SHA256 25ef217020a58e8562677e80d048fe722903d92f297af7026e9a61ec19a78bf4 files/0.18-fix-undefined-references-in-asm.patch 1004 +AUX 0.18-rename-do-asm-label.patch 376 RMD160 1ab90df7f694ab3f198122b05701af944de00354 SHA1 8cd2e6c52225f1378fc0b7953901c5bc02684e4a SHA256 7d2674f281924b6b1bf57573a698638c85015fce3381cd2d992f624a3cb73bdf +MD5 81d8bfd39d81693effa0c24cb97e7edb files/0.18-rename-do-asm-label.patch 376 +RMD160 1ab90df7f694ab3f198122b05701af944de00354 files/0.18-rename-do-asm-label.patch 376 +SHA256 7d2674f281924b6b1bf57573a698638c85015fce3381cd2d992f624a3cb73bdf files/0.18-rename-do-asm-label.patch 376 +DIST asmutils-0.18.tar.gz 361157 RMD160 1b633086f80cd02ff47497b2679c73434aaa750a SHA1 981123c5a5c5618b19bb04b72ede785657d37b41 SHA256 905e58521c9c85ae64a243ff8a05503ddaed3d808a99aa6db8737d0bfb16d38a +EBUILD asmutils-0.18.ebuild 1293 RMD160 b5b3d6c7bff89be32a5cb755add914ff67856dba SHA1 07929b52a5983bb6ffee8d9b34192207731ed268 SHA256 a826bfc4ceb6955bea2757ee9d11023a263a7e3bcf2a4ad6c483884ca19f6237 +MD5 4c23dc166b19c0b4e18116c917bcdc3a asmutils-0.18.ebuild 1293 +RMD160 b5b3d6c7bff89be32a5cb755add914ff67856dba asmutils-0.18.ebuild 1293 +SHA256 a826bfc4ceb6955bea2757ee9d11023a263a7e3bcf2a4ad6c483884ca19f6237 asmutils-0.18.ebuild 1293 +MD5 239c798dd7f4e01b77adb5627a85aae0 files/digest-asmutils-0.18 241 +RMD160 9c19be2b10bb243f311ffc644ec5c28e2dcc9649 files/digest-asmutils-0.18 241 +SHA256 c7bcc42b248f345813410809fd8484c499e2e7c69b7b01a974bd8e61bec8a072 files/digest-asmutils-0.18 241 diff --git a/sys-apps/asmutils/asmutils-0.18.ebuild b/sys-apps/asmutils/asmutils-0.18.ebuild new file mode 100644 index 0000000..1d4bca7 --- /dev/null +++ b/sys-apps/asmutils/asmutils-0.18.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit savedconfig toolchain-funcs eutils + +DESCRIPTION="A set of miscellaneous utilities written in assembly language, targeted on embedded systems and small distributions" +HOMEPAGE="http://asm.sourceforge.net/asmutils.html" +SRC_URI="http://asm.sourceforge.net/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~x86" +IUSE="" +RDEPEND="" +DEPEND="${RDEPEND} + ~dev-lang/nasm-0.98.39" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${PV}-fix-undefined-references-in-asm.patch" + epatch "${FILESDIR}/${PV}-rename-do-asm-label.patch" + + sed -i \ + -e "s~^\(INSTALLDIR\)=\(.*\)~\1 := \2~g" \ + MCONFIG \ + || die +} + +src_compile() { + restore_config MCONFIG + CPU=${CHOST%%-*} + CPU=${CPU#i} + emake \ + CC=$(tc-getCC) \ + LD=$(tc-getLD) \ + AR=$(tc-getAR) \ + STRIP=$(tc-getSTRIP) \ + CPU="${CPU}" \ + CLEAN_CFLAGS="-D__CPU__=\$(CPU) ${CFLAGS}" \ + || die +} + +src_install() { + emake INSTALLDIR="${D}/bin" install || die + dodoc ChangeLog README TODO CREDITS || die + dohtml -r doc || die + save_config MCONFIG +} + +pkg_postinst() { + elog "Don't expect any usage help from the --help flag to programs." + elog "You'll have to check the .asm source code in the tarball." +} diff --git a/sys-apps/asmutils/files/0.18-fix-undefined-references-in-asm.patch b/sys-apps/asmutils/files/0.18-fix-undefined-references-in-asm.patch new file mode 100644 index 0000000..538b37c --- /dev/null +++ b/sys-apps/asmutils/files/0.18-fix-undefined-references-in-asm.patch @@ -0,0 +1,32 @@ +http://www.gnu.org/software/gcc/gcc-3.4/changes.html + +The new unit-at-a-time compilation scheme has several compatibility +issues: ... + +Unreferenced static variables and functions are removed. This may result +in undefined references when an asm statement refers to the +variable/function directly. In that case either the variable/function +shall be listed in asm statement operand or in the case of top-level asm +statements the attribute used shall be used to force function/variable +to be always output and considered as a possibly used by unknown code. + +--- lib/libm.c.orig 2007-10-28 02:59:50.000000000 -0700 ++++ lib/libm.c 2007-10-28 02:58:57.000000000 -0700 +@@ -1797,7 +1797,7 @@ + return ret; + } + +-static void (frac)( void ) ++__attribute__((used)) static void (frac)( void ) + { + short cw1,cw2; + asm("fnstcw %0\n" +@@ -1818,7 +1818,7 @@ + #define FRAC "call frac\n" + #endif + +-static void (Lpow2)( void ) ++__attribute__((used)) static void (Lpow2)( void ) + { + asm(FRAC + " f2xm1\n" diff --git a/sys-apps/asmutils/files/0.18-rename-do-asm-label.patch b/sys-apps/asmutils/files/0.18-rename-do-asm-label.patch new file mode 100644 index 0000000..ad66bb5 --- /dev/null +++ b/sys-apps/asmutils/files/0.18-rename-do-asm-label.patch @@ -0,0 +1,21 @@ +For some reason, nasm doesn't like the name 'do'. + +--- src/deflate.asm.orig 2007-10-28 03:37:50.000000000 -0700 ++++ src/deflate.asm 2007-10-28 03:38:05.000000000 -0700 +@@ -408,14 +408,14 @@ + mov ecx,3 + call copymatch + +-do: ++do_something: + lodsb + xor ecx,ecx + mov cl,al + call copymatch + cmp al,0xFF + jnz end_do +- jmp do ++ jmp do_something + + end_do: + jmp d_loop diff --git a/sys-apps/asmutils/files/digest-asmutils-0.18 b/sys-apps/asmutils/files/digest-asmutils-0.18 new file mode 100644 index 0000000..3bd3661 --- /dev/null +++ b/sys-apps/asmutils/files/digest-asmutils-0.18 @@ -0,0 +1,3 @@ +MD5 a11c8fea347026449ecd2e5807e77d64 asmutils-0.18.tar.gz 361157 +RMD160 1b633086f80cd02ff47497b2679c73434aaa750a asmutils-0.18.tar.gz 361157 +SHA256 905e58521c9c85ae64a243ff8a05503ddaed3d808a99aa6db8737d0bfb16d38a asmutils-0.18.tar.gz 361157 |