| View previous topic :: View next topic |
| Author |
Message |
steveL Veteran

Joined: 13 Sep 2006 Posts: 1367 Location: The Peanut Gallery
|
Posted: Sun Oct 01, 2006 5:50 pm Post subject: HOWTO: Build a svn-based ebuild. |
|
|
Hi,
I'm posting this here in case someone else has a use for it, and also to get feedback and maybe give some hints to anyone else starting out on writing ebuilds.
These are for Synfig, "an industrial-strength vector-based 2D animation software package." The website is at http://www.synfig.com/ and the actual ebuilds can be downloaded from bugzilla (there are two other bugs for supporting packages.)
Make a portage overlay directory (eg /usr/local/portage) if you don't already have one
..and add it to your make.conf:
| Code: | | PORTDIR_OVERLAY="/usr/local/portage" |
Underneath that you will need 2 directories, dev-cpp and media-gfx.
In dev-cpp you will need another directory, ETL.
In media-gfx you will need another 2 directories, synfig and synfig-studio.
The ebuilds should be placed in the appropriate directories.
You will wish to rename the ebuilds to use the latest checkout number, as we'll be downloading the files from subversion; if you do this, you'll also need to change all the filenames in the code below (so instead of ETL-231 use ETL-237 or whatever.) In the following instructions, stuff in code blocks needs to be typed in at the command-line. Other steps can be done from a GUI. NB: don't change any of the `svn co http...' lines, as they refer to the project names as set by the developer.
If you don't have subversion already you'll first need to do:
| Code: | | emerge -av subversion |
Now, say in your home dir, make a new directory (eg synfig) and start a terminal in it (or cd to it if you're already in a shell)
Then we download the latest code, and export it to another directory:
| Code: | svn co http://svn.voria.com/code/ETL/trunk/ etl
svn export etl ETL-231 |
In this example, I'm using 231 as the version number of the ebuilds, as that was the svn checkout no.
Go into ETL-231 directory, and make a new folder called `CVS'; this stops a bootstrap warning from the config stage. Then make a source file we can hand over to portage:
| Code: | | tar -cjf ETL-231.tar.bz2 ETL-231/ |
Move file ETL-231.tar.bz2 to /usr/portage/distfiles and run:
| Code: | | ebuild /usr/local/portage/dev-cpp/ETL/ETL-231.ebuild digest |
(BTW if you're not great at the CLI, remember you can use TAB completion, so /u<TAB> gives /usr/ then lo<TAB> gives local and so on.)
The same procedure applies to the other 2 ebuilds:
| Code: | svn co http://svn.voria.com/code/synfig-core/trunk/ synfig
svn export synfig synfig-231 |
-> add empty CVS dir in synfig-231.
| Code: | | tar -cjf synfig-231.tar.bz2 synfig-231/ |
-> move tar.bz2 file to /usr/portage/distfiles, and then:
| Code: | | ebuild /usr/local/portage/media-gfx/synfig/synfig-231.ebuild digest |
And for synfig-studio (the actual program you see):
| Code: | svn co http://svn.voria.com/code/synfig-studio/trunk/ synfigstudio
svn export synfigstudio synfig-studio-231 |
-> add empty CVS dir in synfig-studio-231.
| Code: | | tar -cjf synfig-studio-231.tar.bz2 synfig-studio-231/ |
-> move file to /usr/portage/distfiles, then:
| Code: | | ebuild /usr/local/portage/media-gfx/synfig-studio/synfig-studio-231.ebuild digest |
Before you actually emerge any of the packages, you need to add them to your package.keywords file (in /etc/portage - create it as an empty text file if it doesn't exist):
| Code: | dev-cpp/ETL
media-gfx/synfig
media-gfx/synfig-studio |
I also recommend adding
| Code: | | media-gfx/synfig-studio fmod |
to /etc/portage/package.use for sound support (this will also pull in the fmod3.7 package if you don't already have it.) Synfig (the core libs) uses:
| Code: | | dv ffmpeg fontconfig imagemagick jpeg openexr png tiff truetype | all of which are set in my standard USE flags, plus the debug flag, which I don't have set. (It might be a good idea to set this later if you're going to submit bug reports back to the developer, which we should.)
And finally, emerge the software:
| Code: | | emerge -av synfig-studio |
Hope this is of use,
Steve.
Hint: use the ebuild command while you are developing your own ebuilds, eg:
| Code: | ebuild /usr/local/portage/media-gfx/synfig/synfig-231.ebuild qmerge
ebuild /usr/local/portage/media-gfx/synfig/synfig-231.ebuild install |
edit: amended bugzilla so other bugs (111277/8/9) have updated ebuilds.
edit: changed title, proper links to bugs.
edit: changed to use svn checkout numbers.
edit: changed title to reflect function
Last edited by steveL on Sat Mar 31, 2007 2:00 am; edited 4 times in total |
|
| Back to top |
|
 |
steveL Veteran

Joined: 13 Sep 2006 Posts: 1367 Location: The Peanut Gallery
|
Posted: Wed Dec 20, 2006 5:39 am Post subject: |
|
|
Just an update on the process of getting involved with gentoo ebuild maintenance.
So far I've learnt:
- post to bugzilla
- expect bad manners if it's a whinge
 - once you've submitted a build, watch for the pkg to go to maintainer-wanted
- bump the bugs with new versions as they come out
- live svn and cvs builds don't go very far.
- Once it's on maintainer-wanted find out which herd would be responsible for it and mail them asking if someone can proxy maintain for you.
- Get it into sunrise -- join #gentoo-sunrise
- if you need help ask on irc.freenode.net#gentoo-dev-help
Thanks to antarus and astinus for the help so far.
edit: added IRC channel
edit: removed IRC log
Last edited by steveL on Tue Apr 15, 2008 5:56 pm; edited 1 time in total |
|
| Back to top |
|
 |
steveL Veteran

Joined: 13 Sep 2006 Posts: 1367 Location: The Peanut Gallery
|
Posted: Tue Jan 09, 2007 11:01 am Post subject: |
|
|
Check out the thread on becoming a dev especially the bash links and the stuff about mailing lists (you don't want to be embarrassed like I was ;) And this one has info on using epatches. Note that you apply the patches in the ebuild, and they become part of your file list. -p1 means strip one directory from path names.
Last edited by steveL on Sat Apr 14, 2007 2:38 am; edited 1 time in total |
|
| Back to top |
|
 |
steveL Veteran

Joined: 13 Sep 2006 Posts: 1367 Location: The Peanut Gallery
|
Posted: Tue Jan 30, 2007 7:00 am Post subject: |
|
|
Just a quick note on making docs; in these ebuilds (well ETL and synfig, not synfig-studio) programming documentation is made using doxygen. So I added a doc USE flag (in IUSE) and made the ebuilds build the docs conditionally on that use flag. The interesting (for a geek ;) part is how you get those files across to the main system- you have to use dohtml not dodoc or otherwise the files will be compressed which obviously makes it tricky to view them in a browser. This also means you need to use insinto beforehand to set the correct directory.
| Code: | if use doc; then
insinto /usr/share/doc/${PF}
dohtml doc/html/*
fi | NB the html directory is copied over as well (but not the doc dir.) |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|