Skip to content

Commit

Permalink
app-shells/ctypes-sh: New package, foreign function interface for bash
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.3.2
  • Loading branch information
chutz committed Oct 18, 2016
1 parent 8092a0f commit d808185
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-shells/ctypes-sh/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST ctypes-sh-1.1.tar.gz 437637 SHA256 f7c8276b556101c51838296560d152fdcd96b860254a38d216b92986f31f8297 SHA512 0e136f5b9fc342875d02b1087daed60eed46f411765538f185d1da61430205113db72994ecdb125aded3eae114b3f487e7af398c1326334efdd197ee7de18a61 WHIRLPOOL 7625df5a8d7e5284ee6012e59dc0ff1a2e11ccbec37edb5203d31529715916aefa609d0cd3c7964dfc225d0f476e37213f5936c17c74c2b76fb5ad0a9e02874c
38 changes: 38 additions & 0 deletions app-shells/ctypes-sh/ctypes-sh-1.1.ebuild
Original file line number Diff line number Diff line change
@@ -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
}
18 changes: 18 additions & 0 deletions app-shells/ctypes-sh/files/ctypes-sh-1.1-makefile-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
commit 5e305160cc219fa63658148e3d258cb62dd043a3
Author: rtlanceroad <[email protected]>
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
13 changes: 13 additions & 0 deletions app-shells/ctypes-sh/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>[email protected]</email>
<name>Patrick McLean</name>
</maintainer>
<longdescription lang="en">
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.
</longdescription>
</pkgmetadata>

0 comments on commit d808185

Please sign in to comment.