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


--- 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"

Reply via email to