aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2011-08-06 16:38:25 +0200
committerSebastian Parborg <darkdefende@gmail.com>2011-08-06 16:38:25 +0200
commit04f5d94fc668f1df603fe07dbf57dd995bd9cf90 (patch)
treee1208542a4e4eaefff27f0aedb4f4fafe8dbd588
parentAdded basic autotools support (diff)
downloadebuildgen-04f5d94fc668f1df603fe07dbf57dd995bd9cf90.tar.gz
ebuildgen-04f5d94fc668f1df603fe07dbf57dd995bd9cf90.tar.bz2
ebuildgen-04f5d94fc668f1df603fe07dbf57dd995bd9cf90.zip
hacked together somethings in the ebuild gen so it persumes autotools
-rw-r--r--ebuildgen.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/ebuildgen.py b/ebuildgen.py
index 10586e6..fee6233 100644
--- a/ebuildgen.py
+++ b/ebuildgen.py
@@ -59,7 +59,7 @@ def outputebuild(iuse,deps,usedeps,dltype,adress,installmethod):
'# $Header: $',
''
]
- inheritstr = 'inherit ' + eclass[dltype]
+ inheritstr = 'inherit ' + eclass[dltype] + ' autotools'
text.append(inheritstr)
text += [
@@ -105,11 +105,27 @@ def outputebuild(iuse,deps,usedeps,dltype,adress,installmethod):
depstr = depstr[:-3]
depstr += " )\n\t"
- depstr = depstr[:-2] + '"'
+ depstr = depstr[:-2] + '"\nRDEPEND="${DEPEND}"'
text.append(depstr)
text += [
- 'RDEPEND="${DEPEND}"',
+ '',
+ 'src_prepare() {',
+ '\teautoreconf',
+ '}',
+ ]
+
+ if iuse:
+ text += [
+ '',
+ 'src_configure() {',
+ '\teconf \\',
+ ]
+ for use in iuse:
+ text += ['\t\t$(use_' + use.split("_")[0] + ' ' + use.split("_")[1] + ') \\']
+ text += ['}']
+
+ text += [
'',
'src_compile() {',
' emake || die "emake failed"',