Permalink
Browse files

glorious funtoo updates

merged:

  gentoo: de3c97317a9f3a6811b91d95ba2e63ec4f8b74e1
  funtoo-overlay: eed941e252e8a90599de9479fa419c4415a70486
  foo-overlay: 4e928d47e22991dc209ec57d02372c56ceff4275
  bar-overlay: 6c956f1ca6178fed85bda46013da787239706d7c
  flora: 4cbb9b684d2abac91991502465f21fe8858343c1
  lcd-filtering: dd3d9b094dbfc726ee9b3d886783a18b92f899fd
  mythtv: 1500bdb1a6ca4b93a7bd05e4266e0b4c7d094a34
  • Loading branch information...
1 parent be777f7 commit 1bd46b9728fb71370dae4dd56b579179203b1d71 @danielrobbins danielrobbins committed Aug 22, 2012
Showing 393 changed files with 6,393 additions and 1,027 deletions.
@@ -0,0 +1,72 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=3
+
+inherit bash-completion-r1
+
+DESCRIPTION="Gentoo's multi-purpose configuration and management tool"
+HOMEPAGE="http://www.gentoo.org/proj/en/eselect/"
+SRC_URI="mirror://gentoo/eselect-1.3.1.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~*"
+IUSE="doc"
+S=$WORKDIR/$PN-1.3.1
+
+RDEPEND="sys-apps/sed
+ || (
+ sys-apps/coreutils
+ sys-freebsd/freebsd-bin
+ app-misc/realpath
+ )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ doc? ( dev-python/docutils )"
+RDEPEND="!app-admin/eselect-news
+ ${RDEPEND}
+ sys-apps/file
+ sys-libs/ncurses"
+
+# Commented out: only few users of eselect will edit its source
+#PDEPEND="emacs? ( app-emacs/gentoo-syntax )
+# vim-syntax? ( app-vim/eselect-syntax )"
+
+src_compile() {
+ emake || die
+
+ if use doc; then
+ emake html || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ newbashcomp misc/${PN}.bashcomp ${PN} || die
+ dodoc AUTHORS ChangeLog NEWS README TODO doc/*.txt || die
+
+ if use doc; then
+ dohtml *.html doc/* || die
+ fi
+
+ # needed by news module
+ keepdir /var/lib/gentoo/news
+ fowners root:portage /var/lib/gentoo/news || die
+ fperms g+w /var/lib/gentoo/news || die
+
+ # tweaks for funtoo-1.0 profile
+ insinto /usr/share/eselect/modules
+ doins $FILESDIR/$PV/profile.eselect || die
+ doins $FILESDIR/$PV/kernel.eselect || die
+}
+
+pkg_postinst() {
+ # fowners in src_install doesn't work for the portage group:
+ # merging changes the group back to root
+ [[ -z ${EROOT} ]] && local EROOT=${ROOT}
+ chgrp portage "${EROOT}/var/lib/gentoo/news" \
+ && chmod g+w "${EROOT}/var/lib/gentoo/news"
+
+ ewarn "This version of eselect supports using /etc/portage/make.profile along with the new Funtoo 1.0 profiles."
+ ewarn "Please visit http://www.funtoo.org/wiki/Funtoo_1.0_Profile for instructions on how to switch"
+}
@@ -0,0 +1,127 @@
+# -*-eselect-*- vim: ft=eselect
+# Copyright 2005-2012 Gentoo Foundation
+# Distributed under the terms of the GNU GPL version 2 or later
+# $Id: $
+
+# This version was modified by Funtoo to support all kernel sources in /usr/src
+
+DESCRIPTION="Manage the /usr/src/linux symlink"
+MAINTAINER="rh1@funtoo.org"
+VERSION="funtoo-1.1_beta"
+
+# sort function for kernel versions, to be used in a pipe
+sort_kernel_versions() {
+ local vsort="sort --version-sort"
+ # Test if our sort supports the --version-sort option
+ # (should be GNU sort, since the kernel module is GNU/Linux specific)
+ ${vsort} </dev/null &>/dev/null || vsort=sort
+
+ # We sort kernel versions as follows:
+ # 1. Run sed to prepend the version string by the numeric version
+ # and an additional rank indicator that is 0 for release candidates
+ # or 1 otherwise. After this step we have, for example:
+ # 2.6.29 1 linux-2.6.29
+ # 2.6.29 0 linux-2.6.29-rc8
+ # 2. sort --version-sort
+ # 3. Run sed again to remove the prepended keys from step 1.
+ sed -e 's/^\(linux-.*\)\?\([[:digit:].]\+\)[-_]rc/\2 0 &/' \
+ -e 't;s/^\(linux-.*\)\?\([[:digit:].]\+\)/\2 1 &/' \
+ | LC_ALL=C ${vsort} | sed 's/.* //'
+}
+
+# find a list of kernel symlink targets
+find_targets() {
+ local f
+ for f in "${EROOT}"/usr/src/linux-[[:graph:]]*; do
+ [[ -d ${f} ]] && basename "${f}"
+ done | sort_kernel_versions
+}
+
+# remove the kernel symlink
+remove_symlink() {
+ rm "${EROOT}/usr/src/linux"
+}
+
+# set the kernel symlink
+set_symlink() {
+ local target=$1
+
+ if is_number "${target}"; then
+ local targets=( $(find_targets) )
+ target=${targets[target-1]}
+ fi
+
+ if [[ -z ${target} ]]; then
+ die -q "Target \"$1\" doesn't appear to be valid!"
+ elif [[ -d ${EROOT}/usr/src/${target} ]]; then
+ ln -s "${target}" "${EROOT}/usr/src/linux"
+ elif [[ -d ${EROOT}/usr/src/linux-${target} ]]; then
+ ln -s "linux-${target}" "${EROOT}/usr/src/linux"
+ else
+ die -q "Target \"$1\" doesn't appear to be valid!"
+ fi
+}
+
+### show action ###
+
+describe_show() {
+ echo "Show the current kernel symlink"
+}
+
+do_show() {
+ write_list_start "Current kernel symlink:"
+ if [[ -L ${EROOT}/usr/src/linux ]]; then
+ local kernel=$(canonicalise "${EROOT}/usr/src/linux")
+ write_kv_list_entry "${kernel%/}" ""
+ else
+ write_kv_list_entry "(unset)" ""
+ fi
+}
+
+### list action ###
+
+describe_list() {
+ echo "List available kernel symlink targets"
+}
+
+do_list() {
+ local i targets=( $(find_targets) )
+
+ write_list_start "Available kernel symlink targets:"
+ for (( i = 0; i < ${#targets[@]}; i++ )); do
+ [[ ${targets[i]} = \
+ $(basename "$(canonicalise "${EROOT}/usr/src/linux")") ]] \
+ && targets[i]=$(highlight_marker "${targets[i]}")
+ done
+ write_numbered_list -m "(none found)" "${targets[@]}"
+}
+
+### set action ###
+
+describe_set() {
+ echo "Set a new kernel symlink target"
+}
+
+describe_set_parameters() {
+ echo "<target>"
+}
+
+describe_set_options() {
+ echo "target : Target name or number (from 'list' action)"
+}
+
+do_set() {
+ [[ -z $1 ]] && die -q "You didn't tell me what to set the symlink to"
+ [[ $# -gt 1 ]] && die -q "Too many parameters"
+
+ if [[ -L ${EROOT}/usr/src/linux ]]; then
+ # existing symlink
+ remove_symlink || die -q "Couldn't remove existing symlink"
+ set_symlink "$1" || die -q "Couldn't set a new symlink"
+ elif [[ -e ${EROOT}/usr/src/linux ]]; then
+ # we have something strange
+ die -q "${EROOT}/usr/src/linux exists but is not a symlink"
+ else
+ set_symlink "$1" || die -q "Couldn't set a new symlink"
+ fi
+}
Oops, something went wrong.

0 comments on commit 1bd46b9

Please sign in to comment.