summaryrefslogtreecommitdiff
blob: 00c0e8705d3ab65ac01c9fdbcbc8f0b4377bd24f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
EAPI="4"

DESCRIPTION="Palmer Dabbelt's script collection"
HOMEPAGE="http://dabbelt.com/~palmer/software/scripts/"
SRC_URI="https://github.com/palmer-dabbelt/scrpits/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 amd64-linux"
IUSE="v4l2"

RDEPEND="sys-devel/pconfigure
	 sys-devel/make
	 v4l2? ( media-libs/libv4l )
         net-dns/bind-tools
         net-analyzer/traceroute
         dev-util/indent
         sys-process/parallel"

DEPEND="${RDEPEND}"

S="${WORKDIR}"/scrpits-${PV}

src_configure() {
	cd "${S}"

	rm Configfile.local >& /dev/null || true
	touch Configfile.local

	echo "PREFIX = ${EPREFIX}/usr" >> Configfile.local

	echo "LANGUAGES += c" >> Configfile.local
	for i in $(echo ${CFLAGS}); do
		echo "COMPILEOPTS += ${i}" >> Configfile.local
	done
	echo "COMPILEOPTS += -DNDEBUG" >> Configfile.local
	echo "COMPILEOPTS += -DPROCESSORS=\\\"$(grep -c "physical id" /proc/cpuinfo)\\\"" >> Configfile.local

	pconfigure || die "pconfigure failed"
}