Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PLZ help creating an ebuild for KToon
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
- LeChuck -
n00b
n00b


Joined: 27 Jun 2005
Posts: 29
Location: Mêlée Island

PostPosted: Wed Oct 19, 2005 2:09 pm    Post subject: PLZ help creating an ebuild for KToon Reply with quote

Hi,

Recently I discovered KToon, a nice prog to create animated cartoons (I just love that shit). Sadly I couldn'f find an ebuild for it, so I decided to start making my first one ... without success. Therefore, please help me finishing it, 'cause I couldn't figure out what's wrong. That one below compiles perfect for me, creates an image, but didn't install it into the systems directories. Furthermore I'm not sure how to set DEPENT and inherit properbly (and all the other things I just don't know). The Gentoo-ebuild-doc is still to advanced for me, and beside of that im too tired, 'cause I'm awake for almost two days.

Another issue is, I had to ln qmake from /usr/qt/3/bin to /usr/bin to be able to execute it - is that fair, or is there another more elegant way?

I used to have it in a freshly created media-gfx/ktoon directory of the portage directories, did an ebuild ktoon-0.7.3.ebuild digest and build it with ACCEPT_KEYWORDS="~x86" emerge ktoon.

// edit: removed buggy ebuild

Also look at http://bugs.gentoo.org/show_bug.cgi?id=110206

bye
_________________
.. Look behind you, a three headed monkey! ...


Last edited by - LeChuck - on Sun Oct 23, 2005 9:52 am; edited 2 times in total
Back to top
View user's profile Send private message
babo
Guru
Guru


Joined: 10 Aug 2004
Posts: 477
Location: Ljubljana

PostPosted: Thu Oct 20, 2005 8:42 am    Post subject: Reply with quote

First of all great idea and thanx for the effort.

I can only tell you for the depend.
In INSTALL file it says that after make you run ktoon from {downloaded_directory}/ktoon/bin/ktoon, so I also don't know how to make install. And I would also add ~amd64 to keywords as it compiles on amd64.

Code:

DEPEND="app-admin/eselect-opengl
        x11-libs/qt"



I had to emerge eselect-opengl as otherwise I got error about GL/glext.h so therefore eselect-opengl in dependancies and of course qt.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2718
Location: Munich, Bavaria

PostPosted: Thu Oct 20, 2005 9:16 am    Post subject: Reply with quote

maybe use the kde eclass
Code:
inherit kde

and then also add:
Code:
need-kde 3

this way you don't have to list depends that are needed for all kde apps (like qt)

a simple example ebuild is /usr/portage/media-sound/krecord/krecord-1.14.ebuild or any other kde based app
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
babo
Guru
Guru


Joined: 10 Aug 2004
Posts: 477
Location: Ljubljana

PostPosted: Thu Oct 20, 2005 9:19 am    Post subject: Reply with quote

but you don't need kde. I don't have it and it works ok.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2718
Location: Munich, Bavaria

PostPosted: Thu Oct 20, 2005 9:27 am    Post subject: Reply with quote

babo wrote:
but you don't need kde. I don't have it and it works ok.


ok, didn't test that prog, was just an idea :)

maybe 'need-qt 3' is better then...
for the qmake path problem a nice solution (better than ln it) is:
Code:
${QTDIR}/bin/qmake

_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
babo
Guru
Guru


Joined: 10 Aug 2004
Posts: 477
Location: Ljubljana

PostPosted: Thu Oct 20, 2005 9:32 am    Post subject: Reply with quote

what about dobin in src_install for the install problem?
or should qmake take care of that before as I understand you?
Back to top
View user's profile Send private message
babo
Guru
Guru


Joined: 10 Aug 2004
Posts: 477
Location: Ljubljana

PostPosted: Thu Oct 20, 2005 8:00 pm    Post subject: Reply with quote

works here :D

Code:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

MY_P="ktoonsrc-0.7.3"
MY_PN="ktoon"

DESCRIPTION="KToon - 2D animation toolkit"
HOMEPAGE="http://ktoon.toonka.com"
SRC_URI="http://ktoon.toonka.com/download/${MY_P}.tar.gz"
IUSE=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

DEPEND="app-admin/eselect-opengl
        >=x11-libs/qt-3.3.2"

S="${WORKDIR}/${MY_PN}"

src_compile() {
${QTDIR}/bin/qmake ktoon.pro || die "qmake failed"
emake || die "emake failed"
}

src_install() {
make INSTALL_ROOT=${D} install || die "make install failed"
dobin bin/ktoon
}


I don't know what version of qt to add. So I sugest we try to get info about dependancies. That is if ebuild works for others of course :)

edit: It says in the INSTALL file, that qt 3.3.2 is needed, so I added that.

edit2: changed the qt dependancy line to >=x11-libs/qt-3.3.2


Last edited by babo on Fri Oct 21, 2005 7:53 am; edited 1 time in total
Back to top
View user's profile Send private message
- LeChuck -
n00b
n00b


Joined: 27 Jun 2005
Posts: 29
Location: Mêlée Island

PostPosted: Fri Oct 21, 2005 2:29 am    Post subject: Reply with quote

WOW ... thank you so much!

Have to play around a little now. I think to add it at bugzilla afterwards.
_________________
.. Look behind you, a three headed monkey! ...
Back to top
View user's profile Send private message
babo
Guru
Guru


Joined: 10 Aug 2004
Posts: 477
Location: Ljubljana

PostPosted: Fri Oct 21, 2005 7:34 am    Post subject: Reply with quote

- LeChuck - wrote:
WOW ... thank you so much!

Have to play around a little now. I think to add it at bugzilla afterwards.


Please do so and I sugest adding it to www.ebuildexchange.org too.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2718
Location: Munich, Bavaria

PostPosted: Fri Oct 21, 2005 9:57 am    Post subject: Reply with quote

jup, that ebuild works here too.

just that MY_P and MY_PN isn't nice (MY_P shouldn't contain the PV)

fixed:
Code:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

MY_P="${PN}src"

DESCRIPTION="KToon - 2D animation toolkit"
HOMEPAGE="http://ktoon.toonka.com"
SRC_URI="http://ktoon.toonka.com/download/${MY_P}-${PV}.tar.gz"
IUSE=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

DEPEND="app-admin/eselect-opengl
        >=x11-libs/qt-3.3.2"

S="${WORKDIR}/${PN}"

src_compile() {
        cd "${S}"
        "${QTDIR}"/bin/qmake ktoon.pro || die "qmake failed"
        emake || die "emake failed"
}

src_install() {
        make INSTALL_ROOT="${D}" install || die "make install failed"
        dobin bin/ktoon
        dodoc README.txt
}


also that GL stuff needs some finetuning i guess, as i get some compile errors even it got installed with ktoon (still used opengl-update till now :P)

now emerged eselect-opengl and did "eselect opengl set nvidia" but still errors on glimage.cpp. trying xorg-x11 ogl interface now..
OK, that did it.
maybe we should add some checking for that, like if "eselect opengl show" returns ""nvidia" --> die with a einfo that the user should switch to xorg-x11 interface for installation. /me starts hacking that in a bit :P

btw: what is "make INSTALL_ROOT="${D}" install || die "make install failed"
all that gets installed in bin/ktoon by dobin, right?
Quote:
>>> Merging media-video/ktoon-0.7.3 to /
--- /usr/
--- /usr/bin/
>>> /usr/bin/ktoon
>>> Regenerating /etc/ld.so.cache...

_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay


Last edited by gimpel on Fri Oct 21, 2005 10:19 am; edited 1 time in total
Back to top
View user's profile Send private message
babo
Guru
Guru


Joined: 10 Aug 2004
Posts: 477
Location: Ljubljana

PostPosted: Fri Oct 21, 2005 10:17 am    Post subject: Reply with quote

I didn't do run eselect after I emerged it. Before it gave me an error, that GL/glext.h is missing, so I searched the forums and found that eselect-opengl installs it. And I have radeon card. So if there's another way to get GL/glext.h where it needs to be, why not try that.
about the missing files. Should they be copyed with dobin or something similar also?
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2718
Location: Munich, Bavaria

PostPosted: Fri Oct 21, 2005 10:21 am    Post subject: Reply with quote

babo wrote:
I didn't do run eselect after I emerged it. Before it gave me an error, that GL/glext.h is missing, so I searched the forums and found that eselect-opengl installs it. And I have radeon card. So if there's another way to get GL/glext.h where it needs to be, why not try that.
about the missing files. Should they be copyed with dobin or something similar also?


oops, edited a bit around in previous post :)

about those files that seemed to be missing to me: i think they're compiled in the ktoon binary? (as the app seems to work OK with just having the binary in /usr/bin)
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
babo
Guru
Guru


Joined: 10 Aug 2004
Posts: 477
Location: Ljubljana

PostPosted: Fri Oct 21, 2005 11:34 am    Post subject: Reply with quote

gimpel wrote:

btw: what is "make INSTALL_ROOT="${D}" install || die "make install failed"
all that gets installed in bin/ktoon by dobin, right?


probably true. I am sticking together bits I found in diferent ebuilds. make BLAH_BLAH install might not be needed.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2718
Location: Munich, Bavaria

PostPosted: Fri Oct 21, 2005 12:47 pm    Post subject: Reply with quote

ok, added little check for xorg-x11 ogl interface, dodoc the README and remove make install:

Code:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

MY_P="${PN}src"

DESCRIPTION="KToon - 2D animation toolkit"
HOMEPAGE="http://ktoon.toonka.com"
SRC_URI="http://ktoon.toonka.com/download/${MY_P}-${PV}.tar.gz"
IUSE=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

DEPEND="app-admin/eselect-opengl
        >=x11-libs/qt-3.3.2"

S="${WORKDIR}/${PN}"

src_compile() {
        if eval eselect opengl show | grep xorg-x11 >& /dev/null ; then
                cd "${S}"
                "${QTDIR}"/bin/qmake ktoon.pro || die "qmake failed"
                emake || die "emake failed"
        else
                ewarn "You need to switch to xorg-x11 opengl interface for installation of ktoon"
                ewarn "To do so execute 'eselect opengl set xorg-x11' and remerge ktoon"
                die
        fi
}

src_install() {
        dobin bin/ktoon
        dodoc README.txt
}


cheers! :)
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
babo
Guru
Guru


Joined: 10 Aug 2004
Posts: 477
Location: Ljubljana

PostPosted: Fri Oct 21, 2005 3:36 pm    Post subject: Reply with quote

I tryed your last ebuild with xorg-x11 ogl check, but it shows ewarns, couse I have ati opengl interface, and ktoon works with that. So I wouldn't add the check. Or am I not understandirg something with the check, which is very possible.
Back to top
View user's profile Send private message
- LeChuck -
n00b
n00b


Joined: 27 Jun 2005
Posts: 29
Location: Mêlée Island

PostPosted: Sun Oct 23, 2005 9:41 am    Post subject: Reply with quote

Bugzilla reportHERE.

Couldn't upload it at www.ebuildexchange.org at the moment. I'll try that later again.

I attached the ebuild by babo, 'cause it worked for me and I didn't rebuild KToon with the ebuilds by gimpel - until now, I also do that later.
_________________
.. Look behind you, a three headed monkey! ...
Back to top
View user's profile Send private message
babo
Guru
Guru


Joined: 10 Aug 2004
Posts: 477
Location: Ljubljana

PostPosted: Sun Oct 23, 2005 9:59 am    Post subject: Reply with quote

I would vote for gimpel's last ebuild but whithout xorg-x11 ogl check, couse it doesn't work for me. But it has better naming, and in src_install doesn't have the unneeded 'make install' and has one 'dodoc' more. So this would be:

Code:

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

MY_P="${PN}src"

DESCRIPTION="KToon - 2D animation toolkit"
HOMEPAGE="http://ktoon.toonka.com"
SRC_URI="http://ktoon.toonka.com/download/${MY_P}-${PV}.tar.gz"
IUSE=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

DEPEND="app-admin/eselect-opengl
        >=x11-libs/qt-3.3.2"

S="${WORKDIR}/${PN}"

src_compile() {
        cd "${S}"
        "${QTDIR}"/bin/qmake ktoon.pro || die "qmake failed"
        emake || die "emake failed"
}

src_install() {
        dobin bin/ktoon
        dodoc README.txt
}
Back to top
View user's profile Send private message
- LeChuck -
n00b
n00b


Joined: 27 Jun 2005
Posts: 29
Location: Mêlée Island

PostPosted: Sun Oct 23, 2005 6:28 pm    Post subject: Reply with quote

All right, I can see that ... updated.
_________________
.. Look behind you, a three headed monkey! ...
Back to top
View user's profile Send private message
Genjix
Apprentice
Apprentice


Joined: 23 Jun 2005
Posts: 163

PostPosted: Fri Nov 04, 2005 1:18 pm    Post subject: Reply with quote

Code:

/src -I/usr/qt/3/include -I/usr/include -I/usr/include -Imoc/ -o obj/glimage.o gl/glimage.cpp
gl/glimage.cpp: In member function `void GLImage::setFillColor(const Color&)':
gl/glimage.cpp:95: error: `glBlendEquation' undeclared (first use this function)
gl/glimage.cpp:95: error: (Each undeclared identifier is reported only once for each function it appears in.)
make[1]: *** [obj/glimage.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/ktoon-0.7.3/work/ktoon/src'
make: *** [sub-src] Error 2

!!! ERROR: media-gfx/ktoon-0.7.3 failed.
!!! Function src_compile, Line 26, Exitcode 2
!!! emake failed
!!! If you need support, post the topmost build error, NOT this status message.

tower genjix #


other people have seemed to have this problem but I cannot see any fixes for it ...
Back to top
View user's profile Send private message
Genjix
Apprentice
Apprentice


Joined: 23 Jun 2005
Posts: 163

PostPosted: Tue Nov 08, 2005 10:08 pm    Post subject: Reply with quote

no one?
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2718
Location: Munich, Bavaria

PostPosted: Tue Nov 08, 2005 11:58 pm    Post subject: Reply with quote

Genjix wrote:
no one?


hehe, one more example that the check for gl would be good, but the other way round, as it only seems to fail for nvidia.

run
Code:
eselect opengl set xorg-x11

and emerge ktoon

this ebuild would check and only fail on nvidia:
Code:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

MY_P="${PN}src"

DESCRIPTION="KToon - 2D animation toolkit"
HOMEPAGE="http://ktoon.toonka.com"
SRC_URI="http://ktoon.toonka.com/download/${MY_P}-${PV}.tar.gz"
IUSE=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

DEPEND="app-admin/eselect-opengl
        >=x11-libs/qt-3.3.2"

S="${WORKDIR}/${PN}"

src_compile() {
        # does not compile with nvidia openGL interface, so..
        if eval eselect opengl show | grep nvidia >& /dev/null ; then
                ewarn "You need to switch to xorg-x11 opengl interface for installation of ktoon"
                ewarn "To do so execute 'eselect opengl set xorg-x11' and remerge ktoon"
                die
        else
                cd "${S}"
                "${QTDIR}"/bin/qmake ktoon.pro || die "qmake failed"
                emake || die "emake failed"
        fi
}

src_install() {
        dobin bin/ktoon
        dodoc README.txt
}

_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
Genjix
Apprentice
Apprentice


Joined: 23 Jun 2005
Posts: 163

PostPosted: Wed Nov 09, 2005 1:04 pm    Post subject: Reply with quote

wow! remarkable! why does this help the build complete? (without having to re-run ./configure)
Back to top
View user's profile Send private message
Genjix
Apprentice
Apprentice


Joined: 23 Jun 2005
Posts: 163

PostPosted: Wed Nov 09, 2005 1:12 pm    Post subject: Reply with quote

I want to thank LeChuck and others for an excellent ebuild =)
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2718
Location: Munich, Bavaria

PostPosted: Sat Nov 12, 2005 12:42 am    Post subject: Reply with quote

Genjix wrote:
wow! remarkable! why does this help the build complete? (without having to re-run ./configure)


worked that way? nice :)

somehow KToon doesn't compile with the nvidia opengl interface enabled (but it works with ati and xorg-x11). all the ebuild does it issue the command
Code:
eselect opengl show
and if the return is 'nvidia' it exits with the warning.
after installation you can switch back to nvidia with
Code:
eselect opengl set nvidia


we could also completely automize that, but if someone has an opengl app running while emerge of ktoon.. no good idea i guess :p
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
babo
Guru
Guru


Joined: 10 Aug 2004
Posts: 477
Location: Ljubljana

PostPosted: Sat Nov 12, 2005 12:40 pm    Post subject: Reply with quote

yes, that wouldn't be such a good idea. What do you think about adding a message at the end to ones that had to switch opengl with eselect that they can switch back to nvidia?
I don't know how to check that in ebuild so therefore I'm only able to sugest :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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