Permalink
Browse files

Added dev-util/bam-0.4.0-r1.ebuild

  • Loading branch information...
1 parent f93cbe3 commit 74cc4c55875ab63ea7eb86413a2fa2ee5a423f4b @PaddyMac committed Jul 16, 2012
@@ -0,0 +1 @@
+DIST bam-0.4.0.tar.bz2 164033 SHA256 56030670aa21e227ce0a00f1ee0c9b5129469a6e69e7b67c3dd459d2fce6207d SHA512 10ba53b05ac1604a9e9a01f4c008a8cbdc4e4e9df2fc039c8ca59251461e4c5f95770b5b72945d07693db7abe7cd312bc38725686b4d509d5dc21a585fffc810 WHIRLPOOL 01399ae9347b52318b7589b05e156362948773ef7b7060b299b79c3d8519565d38cdc786257b929a5f0c3c96d56eedcdd4adc4702ff9c9773c2037adb52414a8
@@ -0,0 +1,51 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/bam/bam-0.4.0.ebuild,v 1.4 2012/05/21 12:23:12 phajdan.jr Exp $
+
+EAPI=3
+
+PYTHON_DEPEND="2"
+
+inherit eutils python toolchain-funcs
+
+DESCRIPTION="Fast and flexible Lua-based build system"
+HOMEPAGE="http://matricks.github.com/bam/"
+SRC_URI="http://github.com/downloads/matricks/${PN}/${P}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc test"
+
+RDEPEND="dev-lang/lua"
+DEPEND="${RDEPEND}
+ doc? ( dev-lang/python )
+ test? ( dev-lang/python )"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ cp "${FILESDIR}"/${PV}/Makefile "${S}"/Makefile || die "cp failed"
+ epatch "${FILESDIR}"/${PV}/${P}-test.py.patch
+ python_convert_shebangs -r 2 .
+ tc-export CC
+}
+
+src_compile() {
+ emake ${PN} || die
+
+ if use doc; then
+ $(PYTHON) scripts/gendocs.py || die "doc generation failed"
+ fi
+}
+
+src_install() {
+ dobin ${PN} || die
+
+ if use doc; then
+ dohtml docs/${PN}{.html,_logo.png} || die "dohtml failed"
+ fi
+}
@@ -0,0 +1,22 @@
+LIBS += -lm -lpthread -llua -ldl -rdynamic
+TARGETS = txt2c internal_base bam
+BAM_OBJ = $(patsubst %.c,%.o,$(wildcard src/*.c))
+TXT2C_LUA = $(wildcard src/*.lua)
+
+all: $(TARGETS)
+
+txt2c: src/tools/txt2c
+
+internal_base: src/internal_base.h
+
+src/internal_base.h:
+ src/tools/txt2c $(TXT2C_LUA) > src/internal_base.h
+
+bam: txt2c internal_base $(BAM_OBJ)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(BAM_OBJ) $(LIBS)
+
+test: $(TARGETS)
+ python scripts/test.py
+
+clean:
+ rm -f $(BAM_OBJ) $(TARGETS) src/internal_base.h src/tools/txt2c
@@ -0,0 +1,11 @@
+--- scripts/test.py.old 2010-03-22 19:23:23.000000000 +0100
++++ scripts/test.py 2010-03-22 19:23:43.000000000 +0100
+@@ -178,6 +178,8 @@
+ print "FAILED TESTS:"
+ for t in failed_tests:
+ print "\t"+t
++ sys.exit(1)
+ else:
+ print "ALL TESTS PASSED!"
++ sys.exit(0)
+
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>doctorwhoguy@gmail.com</email>
+ <name>Patrick McMunn</name>
+ </maintainer>
+</pkgmetadata>

0 comments on commit 74cc4c5

Please sign in to comment.