| View previous topic :: View next topic |
| Author |
Message |
yzonesoft n00b

Joined: 25 Jul 2004 Posts: 65 Location: India
|
|
| Back to top |
|
 |
Telemin l33t


Joined: 25 Aug 2005 Posts: 753 Location: Glasgow, UK
|
Posted: Sun Nov 06, 2005 3:29 pm Post subject: |
|
|
I've never made an ebuild before, but theres a first time for everything. I'll have a go if you like, and get back to you on it.
Freestyling |
|
| Back to top |
|
 |
ryszardzonk Apprentice


Joined: 18 Dec 2003 Posts: 225 Location: Rzeszów, POLAND
|
Posted: Mon Nov 07, 2005 12:18 pm Post subject: Ebuild |
|
|
HI, I made an ebuild just like asked.
Personaly I get an segfult trying to run the game. Right now I have no time to test why, but if its ebuild related than it probably could be easily fixed.
| Code: |
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
inherit eutils games
DESCRIPTION="A sudoku solver and generator"
HOMEPAGE="http://www.yzonesoft.com/gsudoku/gsudoku.html"
SRC_URI="http://www.yzonesoft.com/gsudoku/files/${PN}_${PV}_source.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND=">=x11-libs/gtk+-2.0"
RDEPEND="${DEPEND}
app-arch/unzip"
S=${WORKDIR}/source
dir=${GAMES_PREFIX_OPT}/${PN}
src_compile() {
gcc -DLINUX gsudoku.c generator_solver.c menu.c settings.c gsignal.c da_interactive.c da_drawing.c other.c help_about.c \
-o gsudoku `pkg-config --cflags --libs gtk+-2.0 gthread-2.0` || die "build failed"
}
src_install() {
exeinto ${dir}
doexe gsudoku || die "dogamesbin failed"
rm */Thumbs.db
rm manual/*~
insinto ${dir}
doins -r icons images *dir || die "doins failed"
insinto /usr/share/pixmaps
doins ${PN}.ico || die "doins failed"
insinto /usr/share/doc/${PN}
doins -r manual
dodoc *.txt || die "dodoc failed"
games_make_wrapper gsudoku ./gsudoku "${dir}" "${dir}"
make_desktop_entry ${PN} "G-Sudoku" ${PN}.ico
prepgamesdirs
}
|
I had it saved as gsudoku-01f.ebuild in the games-puzzle/gsudoku. _________________ Sky is not the limit... |
|
| Back to top |
|
 |
playmiac n00b

Joined: 08 Nov 2005 Posts: 18
|
Posted: Tue Nov 08, 2005 11:55 am Post subject: |
|
|
Thanks ryszardzonk!
Worked out of the box in my amd64 box. So you can add ~amd64 keyword to the ebuild. |
|
| Back to top |
|
 |
yzonesoft n00b

Joined: 25 Jul 2004 Posts: 65 Location: India
|
Posted: Wed Nov 09, 2005 3:20 pm Post subject: Re: Ebuild |
|
|
| ryszardzonk wrote: | HI, I made an ebuild just like asked.
Personaly I get an segfult trying to run the game. Right now I have no time to test why, but if its ebuild related than it probably could be easily fixed.
| Code: |
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
inherit eutils games
DESCRIPTION="A sudoku solver and generator"
HOMEPAGE="http://www.yzonesoft.com/gsudoku/gsudoku.html"
SRC_URI="http://www.yzonesoft.com/gsudoku/files/${PN}_${PV}_source.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND=">=x11-libs/gtk+-2.0"
RDEPEND="${DEPEND}
app-arch/unzip"
S=${WORKDIR}/source
dir=${GAMES_PREFIX_OPT}/${PN}
src_compile() {
gcc -DLINUX gsudoku.c generator_solver.c menu.c settings.c gsignal.c da_interactive.c da_drawing.c other.c help_about.c \
-o gsudoku `pkg-config --cflags --libs gtk+-2.0 gthread-2.0` || die "build failed"
}
src_install() {
exeinto ${dir}
doexe gsudoku || die "dogamesbin failed"
rm */Thumbs.db
rm manual/*~
insinto ${dir}
doins -r icons images *dir || die "doins failed"
insinto /usr/share/pixmaps
doins ${PN}.ico || die "doins failed"
insinto /usr/share/doc/${PN}
doins -r manual
dodoc *.txt || die "dodoc failed"
games_make_wrapper gsudoku ./gsudoku "${dir}" "${dir}"
make_desktop_entry ${PN} "G-Sudoku" ${PN}.ico
prepgamesdirs
}
|
I had it saved as gsudoku-01f.ebuild in the games-puzzle/gsudoku. |
Thank you very much, I will make sure your name appears in the contributers list(in the next release(bug fix release) which is to be released before Dec 4th. _________________ http://yzonesoft.buildtolearn.net |
|
| Back to top |
|
 |
ciaranm Retired Dev


Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
Posted: Wed Nov 09, 2005 4:35 pm Post subject: |
|
|
Waah! That ebuild contains several policy violations.
* unzip as an rdepend?
* You can't call gcc manually. Use tc-getCC.
* You can't ignore user CFLAGS
* dir shouldn't be global. |
|
| Back to top |
|
 |
ryszardzonk Apprentice


Joined: 18 Dec 2003 Posts: 225 Location: Rzeszów, POLAND
|
Posted: Wed Nov 09, 2005 8:56 pm Post subject: ebuild |
|
|
| ciaranm wrote: | Waah! That ebuild contains several policy violations.
* unzip as an rdepend?
* You can't call gcc manually. Use tc-getCC.
* You can't ignore user CFLAGS
* dir shouldn't be global. |
Hi
I am happy that You provided me with the pointers about making ebuild. I knew that it is not perfect policy wise, but still I tried to follow it as much as possible.
1) I have seen unzip as rdepend on many different occasions, so I am suprised it should not be there...
2) I am not at this point of knowing how to do that yet, so sorry but please fix it so I could know it as well
3) I did not realize that this "(...) pkg-config --cflags (...)" is not enough as far as user flags are concerned
4) same as no.1 - example (enemy-territory ebuild in portage)
What I believed was the violation was placing it in "/opt" not in "games_data_dir", but there wasn't any Makefile/SConstruct/configure to alter and I just didnt know where to look for that info so it could be altered using probably sed
I provided it since it seemed to me that it gets job done (even when I still cant get it to work myself... dunno why)
| yzonesoft wrote: |
Thank you very much, I will make sure your name appears in the contributers list(in the next release(bug fix release) which is to be released before Dec 4th. |
No problem, just helping out as much as I can  _________________ Sky is not the limit... |
|
| Back to top |
|
 |
Jormangeud n00b


Joined: 05 Jul 2004 Posts: 24 Location: Finland
|
Posted: Fri Nov 11, 2005 9:58 pm Post subject: |
|
|
whoa!
tried that ebuild and frankly, I have never seen so much compilation errors
Tweaked around a little to come up with this. (Hopefully I fixed some of those ciaranm complained about)
| Code: |
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
inherit eutils games toolchain-funcs
DESCRIPTION="A sudoku solver and generator"
HOMEPAGE="http://www.yzonesoft.com/gsudoku/gsudoku.html"
SRC_URI="http://www.yzonesoft.com/gsudoku/files/${PN}_${PV}_source.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"
IUSE=""
DEPEND=">=x11-libs/gtk+-2.0"
RDEPEND="${DEPEND}
app-arch/unzip"
S=${WORKDIR}/source
src_compile() {
CONFIG="-DLINUX `pkg-config --cflags --libs gtk+-2.0 gthread-2.0`"
$(tc-getCC) ${CFLAGS} ${CONFIG} gsudoku.c generator_solver.c menu.c\
settings.c gsignal.c da_interactive.c da_drawing.c other.c help_about.c\
-o gsudoku || die "build failed"
}
src_install() {
local dir=${GAMES_PREFIX_OPT}/${PN}
exeinto ${dir}
doexe gsudoku || die "dogamesbin failed"
rm */Thumbs.db
rm manual/*~
insinto ${dir}
doins -r icons images *dir || die "doins failed"
insinto /usr/share/pixmaps
doins ${PN}.ico || die "doins failed"
insinto /usr/share/doc/${PN}
doins -r manual
dodoc *.txt || die "dodoc failed"
games_make_wrapper gsudoku ./gsudoku "${dir}" "${dir}"
make_desktop_entry ${PN} "G-Sudoku" ${PN}.ico
prepgamesdirs
}
|
This fails with the following:
| Code: |
generator_solver.c: In function `back_up_possibles_and_puzzles':
generator_solver.c:4419: internal compiler error: in find_function_data, at function.c:322
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /var/tmp/portage/gsudoku-01f/temp/ccxGJJqx.out file, please attach this to your bugreport.
!!! ERROR: games-puzzle/gsudoku-01f failed.
!!! Function src_compile, Line 27, Exitcode 1
!!! build failed
!!! If you need support, post the topmost build error, NOT this status message.
|
my gcc is i686-pc-linux-gnu-3.4.3-20050110
maybe I'll try it after some shut-eye |
|
| Back to top |
|
 |
playmiac n00b

Joined: 08 Nov 2005 Posts: 18
|
Posted: Tue Nov 22, 2005 8:46 pm Post subject: |
|
|
Version 02 is out. The "new" ebuild version Jormangeud contributed does not work, as there seems to be an optimization problem with the function "back_up_possibles_and_puzzles" (see further G-Sudoku Forum http://yzonesoft.com/forum/index.php?topic=21.0). To repair is beyond my C
I "updated" the Jormangeud's ebuild with ryszardzonk's src_compile and otherwise made updates (working directory changed, some files missing, ~amd64 keyword) but it still violates some of "the rules" that ciaranm quoted.
gsudoku-02.ebuild:
| Code: | # # Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
inherit eutils games toolchain-funcs
DESCRIPTION="A sudoku solver and generator"
HOMEPAGE="http://www.yzonesoft.com/gsudoku/gsudoku.html"
SRC_URI="http://www.yzonesoft.com/gsudoku/files/${PN}_${PV}_source.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
DEPEND=">=x11-libs/gtk+-2.0"
RDEPEND="${DEPEND}
app-arch/unzip"
S=${WORKDIR}/gsudoku_02_source
src_compile() {
# Due to optimization problem in source the following does not compile the source
# CONFIG="-DLINUX `pkg-config --cflags --libs gtk+-2.0 gthread-2.0`"
# $(tc-getCC) ${CFLAGS} ${CONFIG} gsudoku.c generator_solver.c menu.c\
# settings.c gsignal.c da_interactive.c da_drawing.c other.c help_about.c\
# -o gsudoku || die "build failed"
gcc -DLINUX gsudoku.c generator_solver.c menu.c settings.c gsignal.c da_interactive.c da_drawing.c other.c help_about.c -o gsudoku `pkg-config --cflags --libs gtk+-2.0 gthread-2.0` || die "build failed"
}
src_install() {
local dir=${GAMES_PREFIX_OPT}/${PN}
exeinto ${dir}
doexe gsudoku || die "dogamesbin failed"
# rm */Thumbs.db
rm manual/*~
insinto ${dir}
doins -r icons images *dir || die "doins failed"
# insinto /usr/share/pixmaps
# doins ${PN}.ico || die "doins failed"
insinto /usr/share/doc/${PN}
doins -r manual
dodoc *.txt || die "dodoc failed"
games_make_wrapper gsudoku ./gsudoku "${dir}" "${dir}"
make_desktop_entry ${PN} "G-Sudoku" ${PN}.ico
prepgamesdirs
}
|
|
|
| Back to top |
|
 |
Jormangeud n00b


Joined: 05 Jul 2004 Posts: 24 Location: Finland
|
Posted: Tue Nov 29, 2005 3:30 pm Post subject: |
|
|
This ebuild compiles, but the app will segfault when running.
Maybe someone at the G-Sudoku Forum comes up with a patch.
| Code: |
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
inherit eutils games toolchain-funcs flag-o-matic
DESCRIPTION="A sudoku solver and generator"
HOMEPAGE="http://www.yzonesoft.com/gsudoku/gsudoku.html"
SRC_URI="http://www.yzonesoft.com/gsudoku/files/${PN}_${PV}_source.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
DEPEND=">=x11-libs/gtk+-2.0"
RDEPEND="${DEPEND}
app-arch/unzip"
S=${WORKDIR}/${PN}_${PV}_source
src_compile() {
CONFIG="-DLINUX `pkg-config --cflags gtk+-2.0 gthread-2.0`"
LIBS="`pkg-config gtk+-2.0 gthread-2.0 --libs` -shared"
# drop optimization to get it compile
filter-flags -O2 -O3
$(tc-getCC) ${CFLAGS} ${CONFIG} ${LIBS} \
gsudoku.c generator_solver.c menu.c settings.c gsignal.c \
da_interactive.c da_drawing.c other.c help_about.c -o gsudoku \
|| die "build failed"
}
src_install() {
local dir=${GAMES_PREFIX_OPT}/${PN}
exeinto ${dir}
doexe gsudoku || die "dogamesbin failed"
#rm */Thumbs.db
rm manual/*~
insinto ${dir}
doins -r icons images *dir || die "doins failed"
insinto /usr/share/pixmaps
newins icons/icon.ico ${PN}.ico || die "doins failed"
insinto /usr/share/doc/${PN}
doins -r manual
dodoc *.txt || die "dodoc failed"
games_make_wrapper gsudoku ./gsudoku "${dir}" "${dir}"
make_desktop_entry ${PN} "G-Sudoku" ${PN}.ico
prepgamesdirs
}
|
|
|
| Back to top |
|
 |
ben_zarges n00b

Joined: 13 Apr 2005 Posts: 23 Location: /dev/urandom
|
Posted: Fri Jan 20, 2006 9:30 pm Post subject: |
|
|
The problem with G-Sudoku segfaulting when started can be solved by copying the file settings from the tarball to /opt/gsudoku and then
| Code: |
chgrp games /opt/gsudoku/settings
chmod 664 /opt/gsudoku/settings
|
_________________ I have nothing to say but I say i anyway...
72e89c34336568adf7f5f25de651a1d7 |
|
| Back to top |
|
 |
|