From: darkdefende@gmail.com
To: gentoo-soc@lists.gentoo.org
Subject: [gentoo-soc] Ebuild generator Final report
Date: Mon, 22 Aug 2011 18:30:27 +0200 [thread overview]
Message-ID: <cone.1314030627.192663.17186.1000@DarkRain> (raw)
This is the final weekly update for my ebuild generator project.
The goal of this project is to be able to generate ebuilds for fairly
simple programs/projects. You should just be able to point it to the source
code repo/mirror and it should download, scan the source and figure out what
to do and what dependencies are required.
You should not have to have the required dependencies installed to generate
an ebuild with this program.
Last week I worked mostly on fixing some small bugs, fixing a website and
writing an ebulid for my ebuild generator.
You can find the ebuild in the overlay dir in the git repo.
Website: http://soc.dev.gentoo.org/~darkdefender/ebuildgenerator
Github: https://github.com/DarkDefender/ebuildgen
Gentoo git: http://git.overlays.gentoo.org/gitweb/?p=proj/ebuildgen.git
The plan was to support makefile and autotools projects at the end of GSoC.
There where also plans for cmake/scons and even pure python project if there
were any time left.
Sadly only autotools project are now working good. There is some basic
makefile support. But I have disabled it for the time being as it where too
incomplete/buggy. It also only support SCM projects at the moment
(svn/git/hg). IE no tarballs yet. It shouldn't be hard to implement later.
It currently works like this:
- Ebuild generator gets called with a code repo
- It clones the repo to /tmp/ebuildgen/
- Scans the project for configure.ac, take the top most one (if here is
multiple)
- Scan the configure.ac for possible useflags, variables that might be used
in automake/source files
- Scan the makefile.am in the same dir as configure.ac and other automake
files that gets pulled in by this makefile.am
- Link optional source files to useflags with the information that we have
from the configure.ac scan
- Scan all sourcefiles that we got from the automake scan
- Link "#includes" that are in ifdefs to useflags
- Search in the include paths if the includes are local or if it's from a
external dependency.
- Try to link the "globaly" #included to packages
- Use qfile to try to find the packages
- Use the pfl online database to guess
- Check if the guessed package exists in the package manager
- Output an ebuild to /tmp/ebuildgen/generated.ebuild
I think it works ok for the autotool projects that I've tried out so far.
It guesses quite well. But because the generator only "looks" at the code
and doesn't run it there will be cases where it will miss dependencies or
include bogus ones.
I think it would be really good to run the "auto dependency builder" by
Alexander Bersenev on the generated ebuild to check if it is sane dependency
wise.
For the future there is a lot features left to implement from autotools.
So the plan for the time being is to flesh out that till it's good enough
for most projects.
After that work will go into supporting other build methods.
I hope this project will at least help people when writing ebuilds for
projects. So you can generate the ebuild and then just do some small tweaks.
I will be quite busy with my studies so if anyone wants to help out/improve
the program just ask.
reply other threads:[~2011-08-22 16:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cone.1314030627.192663.17186.1000@DarkRain \
--to=darkdefende@gmail.com \
--cc=gentoo-soc@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox