forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-shells/ctypes-sh: New package, foreign function interface for bash
Package-Manager: portage-2.3.2
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
18
app-shells/ctypes-sh/files/ctypes-sh-1.1-makefile-fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |