* [gentoo-embedded] [patch] Busybox interactive config in pkg_config
@ 2005-07-15 1:21 Kristian Benoit
2005-07-15 3:38 ` Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Kristian Benoit @ 2005-07-15 1:21 UTC (permalink / raw
To: gentoo-embedded
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
As I just fixed the pkg_config (see on gentoo-dev mailinglist) to allow
more interactiveness, I modified busybox's ebuild accordingly. So now
one could:
$ ebuild /path/to/busybox.ebuild unpack
$ ebuild /path/to/busybox.ebuild config # which pop a menuconfig
$ ebuild /path/to/busybox.ebuild merge
[-- Attachment #2: busybox-1.00-r4-config.patch --]
[-- Type: text/x-patch, Size: 1496 bytes --]
--- busybox-1.00-r4.ebuild 2005-07-14 20:39:47.000000000 -0400
+++ busybox-1.00-r5.ebuild 2005-07-14 20:38:51.000000000 -0400
@@ -91,6 +91,7 @@ src_unpack() {
done
if [[ -r ${S}/.config ]] ; then
einfo "Found your ${configfile} and using it."
+ touch ${BUILDDIR}/.configured
return 0
fi
fi
@@ -136,7 +137,32 @@ src_unpack() {
make oldconfig > /dev/null
}
+pkg_config() {
+ if [ -f ${BUILDDIR}/.unpacked -a ! -f ${BUILDDIR}/.compiled ]; then
+ cd ${S}
+ emake CROSS="${CROSS}" menuconfig
+ touch ${BUILDDIR}/.configured
+ ewarn "${PN} is now configured, you can :"
+ ewarn "$ ebuild ${EBUILD} merge"
+ ewarn "to complete the process"
+ else
+ eerror "\"config\" must be called between \"unpack\" and \"compile\""
+ eerror "To configure properly use:"
+ eerror "$ ebuild ${PORTDIR}/sys-apps/busybox/${P}.ebuild unpack"
+ eerror "$ ebuild ${PORTDIR}/sys-apps/busybox/${P}.ebuild config"
+ eerror "$ ebuild ${PORTDIR}/sys-apps/busybox/${P}.ebuild merge"
+ fi
+}
+
src_compile() {
+ if [ ! -f ${BUILDDIR}/.configured ]; then
+ ewarn "To configure ${P} properly, you must:"
+ ewarn "$ ebuild ${PORTDIR}/sys-apps/busybox/${P}.ebuild unpack"
+ ewarn "$ ebuild ${PORTDIR}/sys-apps/busybox/${P}.ebuild config"
+ ewarn "$ ebuild ${PORTDIR}/sys-apps/busybox/${P}.ebuild merge"
+ ewarn ""
+ ewarn "Default config will be used."
+ fi
busybox_set_env
emake -j1 CROSS="${CROSS}" depend || die "depend failed"
emake CROSS="${CROSS}" busybox || die "build failed"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-embedded] [patch] Busybox interactive config in pkg_config
2005-07-15 1:21 [gentoo-embedded] [patch] Busybox interactive config in pkg_config Kristian Benoit
@ 2005-07-15 3:38 ` Mike Frysinger
2005-07-15 14:22 ` Kristian Benoit
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2005-07-15 3:38 UTC (permalink / raw
To: gentoo-embedded
On Thursday 14 July 2005 09:21 pm, Kristian Benoit wrote:
> As I just fixed the pkg_config (see on gentoo-dev mailinglist) to allow
> more interactiveness, I modified busybox's ebuild accordingly. So now
> one could:
>
> $ ebuild /path/to/busybox.ebuild unpack
> $ ebuild /path/to/busybox.ebuild config # which pop a menuconfig
> $ ebuild /path/to/busybox.ebuild merge
wrong use of pkg_config imo
pkg_config is for post-emerge configuration
what you want is a new function called 'src_config' which has been proposed
recently
-mike
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-embedded] [patch] Busybox interactive config in pkg_config
2005-07-15 3:38 ` Mike Frysinger
@ 2005-07-15 14:22 ` Kristian Benoit
0 siblings, 0 replies; 3+ messages in thread
From: Kristian Benoit @ 2005-07-15 14:22 UTC (permalink / raw
To: gentoo-embedded
On Thu, 2005-07-14 at 23:38 -0400, Mike Frysinger wrote:
> On Thursday 14 July 2005 09:21 pm, Kristian Benoit wrote:
> > As I just fixed the pkg_config (see on gentoo-dev mailinglist) to allow
> > more interactiveness, I modified busybox's ebuild accordingly. So now
> > one could:
> >
> > $ ebuild /path/to/busybox.ebuild unpack
> > $ ebuild /path/to/busybox.ebuild config # which pop a menuconfig
> > $ ebuild /path/to/busybox.ebuild merge
>
> wrong use of pkg_config imo
I share the same opinion, but it's a solution with the "actual" portage
version that allow someone to make menuconfig from an ebuild so the user
can pre-configure the package without doiing most of the job by hand.
> pkg_config is for post-emerge configuration
>
> what you want is a new function called 'src_config' which has been proposed
> recently
As make menuconfig is part of the build process and not a
post-configuration like pkg_config is, I sent another patch with a
src_preconfig (on gentoo-dev). See:
http://marc.theaimsgroup.com/?l=gentoo-dev&m=112143274103251&w=2
For src_config, it wont be there to run interactive stuff, but for
splitting src_compile in src_config and src_compile as non interactive
task. src_preconfig is there for optional interactiveness between
src_unpack and src_compile.
Imo, src_preconfig is way better, but some people dont seem to share my
opinion so I found this hack which allow a user to configure it without
doiing all the job by hand.
Thank for your feed back.
Kristian
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-15 14:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-15 1:21 [gentoo-embedded] [patch] Busybox interactive config in pkg_config Kristian Benoit
2005-07-15 3:38 ` Mike Frysinger
2005-07-15 14:22 ` Kristian Benoit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox