diff --git a/app-shells/ctypes-sh/Manifest b/app-shells/ctypes-sh/Manifest new file mode 100644 index 0000000000000..e33cec08c5a1b --- /dev/null +++ b/app-shells/ctypes-sh/Manifest @@ -0,0 +1 @@ +DIST ctypes-sh-1.1.tar.gz 437637 SHA256 f7c8276b556101c51838296560d152fdcd96b860254a38d216b92986f31f8297 SHA512 0e136f5b9fc342875d02b1087daed60eed46f411765538f185d1da61430205113db72994ecdb125aded3eae114b3f487e7af398c1326334efdd197ee7de18a61 WHIRLPOOL 7625df5a8d7e5284ee6012e59dc0ff1a2e11ccbec37edb5203d31529715916aefa609d0cd3c7964dfc225d0f476e37213f5936c17c74c2b76fb5ad0a9e02874c diff --git a/app-shells/ctypes-sh/ctypes-sh-1.1.ebuild b/app-shells/ctypes-sh/ctypes-sh-1.1.ebuild new file mode 100644 index 0000000000000..29a2fdc02c5f7 --- /dev/null +++ b/app-shells/ctypes-sh/ctypes-sh-1.1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit autotools toolchain-funcs + +DESCRIPTION="Foreign function interface for bash" +HOMEPAGE="http://ctypes.sh/" +SRC_URI="https://github.com/taviso/${PN/-/.}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="virtual/libffi + app-shells/bash[plugins]" +DEPEND="${RDEPEND} + virtual/libelf + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${P}-makefile-fix.patch" +) + +src_prepare() { + default + eautoreconf +} + +src_test() { + pushd test + PATH="${S}:${PATH}" \ + LD_LIBRARY_PATH="${S}/src/.libs" \ + make CC="$(tc-getCC)" || die "make check failed" + popd +} diff --git a/app-shells/ctypes-sh/files/ctypes-sh-1.1-makefile-fix.patch b/app-shells/ctypes-sh/files/ctypes-sh-1.1-makefile-fix.patch new file mode 100644 index 0000000000000..9a2965a62bc5b --- /dev/null +++ b/app-shells/ctypes-sh/files/ctypes-sh-1.1-makefile-fix.patch @@ -0,0 +1,18 @@ +commit 5e305160cc219fa63658148e3d258cb62dd043a3 +Author: rtlanceroad +Date: Wed Jul 27 14:49:21 2016 +0800 + + fix Makefile.am in src dir + +diff --git a/src/Makefile.am b/src/Makefile.am +index 8a9b682..71347bb 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -11,6 +11,6 @@ ctypes_la_LIBADD += libstruct.la + noinst_LTLIBRARIES += libstruct.la + noinst_HEADERS += struct/dutil.h struct/dwarves.h struct/elf_symtab.h struct/gobuffer.h struct/hash.h struct/list.h struct/rbtree.h struct/strings.h + libstruct_la_SOURCES = struct/dutil.c struct/dwarves.c struct/gobuffer.c struct/struct.c struct/strings.c struct/dwarf_loader.c struct/dwarves_fprintf.c struct/elf_symtab.c struct/rbtree.c +-libstruct_la_CFLAGS = -std=gnu99 -D_GNU_SOURCE ++libstruct_la_CFLAGS = -std=gnu99 -D_GNU_SOURCE $(FFI_CFLAGS) + libstruct_la_CPPFLAGS = -I../include -I../lib + endif diff --git a/app-shells/ctypes-sh/metadata.xml b/app-shells/ctypes-sh/metadata.xml new file mode 100644 index 0000000000000..6083ddccaf9a8 --- /dev/null +++ b/app-shells/ctypes-sh/metadata.xml @@ -0,0 +1,13 @@ + + + + + chutzpah@gentoo.org + Patrick McLean + + +ctypes.sh is a bash plugin that provides a foreign function interface directly +in your shell. In other words, it allows you to call routines in shared +libraries from within bash. + +