public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [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

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