--- /usr/portage/net-misc/openswan/openswan-2.4.4.ebuild 2005-11-29 16:06:02.000000000 +0100 +++ /usr/local/portage/net-misc/openswan/openswan-2.4.4.ebuild 2006-09-26 19:42:29.000000000 +0200 @@ -37,7 +37,14 @@ check_version_h # Get the kernel version of sources in /usr/src/linux ... - export KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); print $3 }' \ + export KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); print $3; nextfile}; \ + /LINUX_VERSION_CODE/ { \ + major=rshift( $3, 16 ); \ + minor=and( rshift( $3, 8 ), 255 ); \ + micro=and( $3, 255); \ + printf( "%d.%d.%d\n", major, minor, micro ); \ + nextfile; \ + }' \ "${ROOT}/usr/src/linux/include/linux/version.h")" export KV_major="$(echo "${KV_full}" | cut -d. -f1)" export KV_minor="$(echo "${KV_full}" | cut -d. -f2)"