--- apr-0.9.7.ebuild.orig 2006-01-06 14:54:08.000000000 -0500 +++ apr-0.9.7.ebuild 2006-01-06 15:54:27.000000000 -0500 @@ -16,6 +16,20 @@ DEPEND="" +urandom_info() { + if use urandom; then + DEV="/dev/urandom" + else + DEV="/dev/random" + fi + einfo + einfo "Using $DEV as random device" + einfo "If /dev/random is used, programs may sporadically pause for several seconds." + einfo "Using /dev/urandom prevents this, but weakens cryptography." + einfo "/dev/urandom is good enough for most purposes." + einfo +} + src_compile() { elibtoolize || die "elibtoolize failed" @@ -25,12 +39,11 @@ myconf="${myconf} --enable-threads" myconf="${myconf} --enable-nonportable-atomics" if use urandom; then - einfo "Using /dev/urandom as random device" myconf="${myconf} --with-devrandom=/dev/urandom" else - einfo "Using /dev/random as random device" myconf="${myconf} --with-devrandom=/dev/random" fi + urandom_info econf ${myconf} || die emake || die @@ -52,3 +65,7 @@ dodoc CHANGES LICENSE NOTICE } + +pkg_postinst() { + urandom_info +}