diff options
author | V3n3RiX <venerix@rogentos.ro> | 2016-08-27 17:47:14 +0100 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2016-08-27 17:47:14 +0100 |
commit | 9f5ecdecfb746a40f8a4f48d59bd968f192a35a2 (patch) | |
tree | fb1ae5eacea8552019009e21e822404ed5a84918 | |
parent | 5c54d5f18dd41633db91f3641b8f4fc47f1c18bc (diff) |
drop some 100000 years old deprecated, duplicated, unused eclasses
-rw-r--r-- | eclass/avahi.eclass | 102 | ||||
-rw-r--r-- | eclass/mate-desktop.org.eclass | 32 | ||||
-rw-r--r-- | eclass/mate.eclass | 58 | ||||
-rw-r--r-- | eclass/rogentos-artwork.eclass | 67 | ||||
-rw-r--r-- | eclass/rogentos-kernel.eclass | 968 | ||||
-rw-r--r-- | eclass/sab-patches.eclass | 171 | ||||
-rw-r--r-- | eclass/transmission-2.51.eclass | 294 | ||||
-rw-r--r-- | eclass/transmission-2.52.eclass | 295 | ||||
-rw-r--r-- | eclass/transmission-2.80.eclass | 262 | ||||
-rw-r--r-- | eclass/transmission-2.82.eclass | 284 | ||||
-rw-r--r-- | eclass/transmission-2.83.eclass | 287 | ||||
-rw-r--r-- | eclass/transmission-2.84.eclass | 291 |
12 files changed, 0 insertions, 3111 deletions
diff --git a/eclass/avahi.eclass b/eclass/avahi.eclass deleted file mode 100644 index c9a9876d..00000000 --- a/eclass/avahi.eclass +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2004-2011 Sabayon -# Distributed under the terms of the GNU General Public License v2 -# $ - -SUPPORTED_AVAHI_MODULES="base gtk gtk3 mono qt" - -# @ECLASS-VARIABLE: AVAHI_MODULE -# @DESCRIPTION: -# Set this variable to the avahi module ebuild name, by default it's used -# the second part of PN, for example: for avahi-glib, it is "glib". -# Supported avahi modules: -# base gtk gtk3 mono qt -AVAHI_MODULE="${AVAHI_MODULE:-${PN/avahi-}}" - -# @ECLASS-VARIABLE: AVAHI_PATCHES -# @DEFAULT-UNSET -# @DESCRIPTION: -# List of patches to apply -if [ -z "${AVAHI_PATCHES}" ]; then - AVAHI_PATCHES=() -fi - -# @ECLASS-VARIABLE: AVAHI_MODULE_DEPEND -# @DESCRIPTION: -# Avahi module built time dependencies list -AVAHI_MODULE_DEPEND="${AVAHI_MODULE_DEPEND:-}" - -# @ECLASS-VARIABLE: AVAHI_MODULE_RDEPEND -# @DESCRIPTION: -# Avahi module run time dependencies list -AVAHI_MODULE_RDEPEND="${AVAHI_MODULE_RDEPEND:-}" - -# @ECLASS-VARIABLE: AVAHI_MODULE_PDEPEND -# @DESCRIPTION: -# Avahi module post dependencies list -AVAHI_MODULE_PDEPEND="${AVAHI_MODULE_PDEPEND:-}" - -_supported="0" -for mod in ${SUPPORTED_AVAHI_MODULES} ; do - if [ "${mod}" = "${AVAHI_MODULE}" ]; then - _supported="1" - break - fi -done -if [ "${_supported}" = "0" ]; then - die "Unsupported avahi module: ${AVAHI_MODULE}" -fi - -MY_P=${P/-${AVAHI_MODULE}} - -inherit autotools eutils flag-o-matic - -DESCRIPTION="avahi ${AVAHI_MODULE} module" -HOMEPAGE="http://avahi.org/" -SRC_URI="http://avahi.org/download/${MY_P}.tar.gz" -S="${WORKDIR}/${MY_P}" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -AVAHI_COMMON_DEPEND=">=dev-util/intltool-0.40.5 - >=dev-util/pkgconfig-0.9.0" -DEPEND="${AVAHI_MODULE_DEPEND} ${AVAHI_COMMON_DEPEND}" -RDEPEND="${AVAHI_MODULE_RDEPEND}" -PDEPEND="${AVAHI_MODULE_PDEPEND}" - -avahi_src_prepare() { - sed -i\ - -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \ - doxygen_to_devhelp.xsl || die - - for i in ${!AVAHI_PATCHES[@]}; do - epatch "${AVAHI_PATCHES[i]}" - done - - eautoreconf -} - -avahi_src_configure() { - use sh && replace-flags -O? -O0 - # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module - unset DISPLAY - local myconf=" - --disable-static - --localstatedir=/var - --with-distro=gentoo - --disable-xmltoman - --disable-monodoc - --enable-glib - --enable-gobject - --disable-qt3 - $@" - econf ${myconf} -} - -avahi_src_install-cleanup() { - # Remove .la files - find "${D}" -name '*.la' -exec rm -f {} + || die -} - -EXPORT_FUNCTIONS src_prepare src_configure diff --git a/eclass/mate-desktop.org.eclass b/eclass/mate-desktop.org.eclass deleted file mode 100644 index cc305b82..00000000 --- a/eclass/mate-desktop.org.eclass +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# @ECLASS: mate-desktop.org.eclass -# @MAINTAINER: -# micia@sabayon.org -# @AUTHOR: -# Authors: Spidler <spidler@gentoo.org> with help of carparski. -# eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org> -# @BLURB: Helper eclass for gnome.org hosted archives -# @DESCRIPTION: -# Provide a default SRC_URI for tarball hosted on mate-desktop.org mirrors. - -inherit versionator - -DEPEND="${DEPEND} app-arch/xz-utils" - -# @ECLASS-VARIABLE: MATE_DESKTOP_ORG_MODULE -# @DESCRIPTION: -# Name of the module as hosted on mate-desktop.org mirrors. -# Leave unset if package name matches module name. -: ${MATE_DESKTOP_ORG_MODULE:=$PN} - -# @ECLASS-VARIABLE: GNOME_ORG_PVP -# @INTERNAL -# @DESCRIPTION: -# Major and minor numbers of the version number. -: ${GNOME_ORG_PVP:=$(get_version_component_range 1-2)} - -SRC_URI="http://pub.mate-desktop.org/releases/${GNOME_ORG_PVP}/${MATE_DESKTOP_ORG_MODULE}-${PV}.tar.xz" -S="${WORKDIR}/${MATE_DESKTOP_ORG_MODULE}-${PV}" diff --git a/eclass/mate.eclass b/eclass/mate.eclass deleted file mode 100644 index 1f4584b8..00000000 --- a/eclass/mate.eclass +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit autotools eutils libtool gnome2 mate-desktop.org - -# FIXME Not all package have proper build system/docs -# Once this is fixed upstream remove DEPEND and move to ebuild. -DEPEND="dev-util/gtk-doc - dev-util/gtk-doc-am" - -# @FUNCTION: mate_gen_build_system -# @DESCRIPTION: -# Generate autotools build system for releases that don't have one. -# We need this as early releases did not have a proper build system. -mate_gen_build_system() { - einfo "Generating mate build system" - # Retrieve configure script - local mate_conf_in - if [[ -f "${S}/configure.in" ]]; then - mate_conf_in="${S}/configure.in" - elif [[ -f "${S}/configure.ac" ]]; then - mate_conf_in="${S}/configure.ac" - else - einfo "no configure.in or configure.ac file were found" - return 0 - fi - # Mate preparation, doing similar to autotools eclass stuff. (Do we need die here?) - if grep -q "^AM_GLIB_GNU_GETTEXT" "${mate_conf_in}"; then - autotools_run_tool glib-gettextize --copy --force || die - elif grep -q "^AM_GNU_GETTEXT" "${mate_conf_in}"; then - eautopoint --force - fi - - if grep -q "^A[CM]_PROG_LIBTOOL" "${mate_conf_in}" || grep -q "^LT_INIT" "${mate_conf_in}"; then - _elibtoolize --copy --force --install - fi - - - if grep -q "^AC_PROG_INTLTOOL" "${mate_conf_in}" || grep -q "^IT_PROG_INTLTOOL" "${mate_conf_in}"; then - mkdir -p "${S}/m4" - autotools_run_tool intltoolize --automake --copy --force || die - fi - - if grep -q "^GTK_DOC_CHECK" "${mate_conf_in}"; then - autotools_run_tool gtkdocize --copy || die - fi - - if grep -q "^MATE_DOC_INIT" "${mate_conf_in}"; then - autotools_run_tool mate-doc-prepare --force --copy || die - autotools_run_tool mate-doc-common --copy || die - fi - - eaclocal - eautoconf - eautoheader - eautomake -} diff --git a/eclass/rogentos-artwork.eclass b/eclass/rogentos-artwork.eclass deleted file mode 100644 index 33a84601..00000000 --- a/eclass/rogentos-artwork.eclass +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 2004-2009 Sabayon Project -# Copyright 2012 Rogentos -# Distributed under the terms of the GNU General Public License v2 -# Original Authors: Sabayon Team -# Maintainer BlackNoxis <stefan.cristian at rogentos.ro> -# $ - -inherit eutils - -# @ECLASS-VARIABLE: KERN_INITRAMFS_SEARCH_NAME -# @DESCRIPTION: -# Argument used by `find` to search inside ${ROOT}boot Linux -# Kernel initramfs files to patch -KERN_INITRAMFS_SEARCH_NAME="${KERN_INITRAMFS_SEARCH_NAME:-initramfs-genkernel*}" - -# @ECLASS-VARIABLE: GFX_SPLASH_NAME -# @DESCRIPTION: -# Default splash theme name to use -GFX_SPLASH_NAME="${GFX_SPLASH_NAME:-rogentos}" - -# @ECLASS-VARIABLE: PLYMOUTH_THEME -# @DESCRIPTION: -# Default plymouth theme name to use -PLYMOUTH_THEME="${PLYMOUTH_THEME:-rogentos}" - -# @FUNCTION: update_kernel_initramfs_splash -# @USAGE: update_kernel_initramfs_splash [splash_theme] [splash_file] -# @RETURN: 1, if something went wrong -# -# @MAINTAINER: -# Brindusa Stefan Cristian -# @AUTHOR: -# Fabio Erculiani -update_kernel_initramfs_splash() { - - [[ -z "${2}" ]] && die "wrong update_kernel_splash arguments" - - if ! has_version "media-gfx/splashutils"; then - ewarn "media-gfx/splashutils not found, cannot update kernel splash" - return 1 - fi - splash_geninitramfs -a "${2}" ${1} - return ${?} - -} - -# @FUNCTION: _update_kogaionkernel_initramfs_splash -# @USAGE: _update_kogaionkernel_initramfs_splash -# -# @AUTHOR: -# Fabio Erculiani -# @MAINTAINER: -# Brindusa Stefan Cristian -_update_kogaionkernel_initramfs_splash() { - local splash_name="${GFX_SPLASH_NAME}" - local override_splash_file="${ROOT}etc/${splash_name}" - if [ -f "${override_splash_file}" ]; then - found_splash_name=$(cat "${override_splash_file}" | cut -d" " -f 1) - if [ -d "/etc/splash/${found_splash_name}" ]; then - splash_name="${found_splash_name}" - fi - fi - for bootfile in `find ${ROOT}boot -name "${KERN_INITRAMFS_SEARCH_NAME}"`; do - einfo "Updating boot splash for ${bootfile}" - update_kernel_initramfs_splash "${GFX_SPLASH_NAME}" "${bootfile}" - done -} diff --git a/eclass/rogentos-kernel.eclass b/eclass/rogentos-kernel.eclass deleted file mode 100644 index 08f83821..00000000 --- a/eclass/rogentos-kernel.eclass +++ /dev/null @@ -1,968 +0,0 @@ -# Copyright 2004-2014 RogentOS Team -# Distributed under the terms of the GNU General Public License v2 -# $ - -# @ECLASS-VARIABLE: K_ROGKERNEL_NAME -# @DESCRIPTION: -# The kernel name used by the ebuild, it should be the ending ${PN} part -# for example, of linux-rogentos it is "${PN/${PN/-*}-}" (rogentos) -K_ROGKERNEL_NAME="${K_ROGKERNEL_NAME:-${PN/${PN/-*}-}}" - -# @ECLASS-VARIABLE: K_ROGKERNEL_SELF_TARBALL_NAME -# @DESCRIPTION: -# If the main kernel sources tarball is generated in-house and available -# on the "rogentos" mirror, set this variable to the extension name (see example -# below). This will disable ALL the extra/local patches (since they have to -# be applied inside the tarball). Moreover, K_ROGKERNEL_NAME, -# K_KERNEL_PATCH_VER will be ignored. -# Example: -# K_ROGKERNEL_SELF_TARBALL_NAME="rogentos" -# This would generate: -# SRC_URI="mirror://rogentos/sys-kernel/linux-${PV}+rogentos.tar.${K_TARBALL_EXT}" -K_ROGKERNEL_SELF_TARBALL_NAME="${K_ROGKERNEL_SELF_TARBALL_NAME:-}" - -# @ECLASS-VARIABLE: K_ROGKERNEL_PATCH_UPSTREAM_TARBALL -# @DESCRIPTION: -# If set to 1, the ebuild will fetch the upstream kernel tarball and -# apply the RogentOS patch against it. This strategy avoids the need of -# creating complete kernel source tarballs. The default value is 0. -K_ROGKERNEL_PATCH_UPSTREAM_TARBALL="${K_ROGKERNEL_PATCH_UPSTREAM_TARBALL:-0}" - -# @ECLASS-VARIABLE: K_ROGKERNEL_FORCE_SUBLEVEL -# @DESCRIPTION: -# Force the rewrite of SUBLEVEL in kernel sources Makefile -K_ROGKERNEL_FORCE_SUBLEVEL="${K_ROGKERNEL_FORCE_SUBLEVEL:-}" - -# @ECLASS-VARIABLE: K_ROGKERNEL_RESET_EXTRAVERSION -# @DESCRIPTION: -# Force the rewrite of EXTRAVERSION in kernel sources Makefile (setting it to "") -K_ROGKERNEL_RESET_EXTRAVERSION="${K_ROGKERNEL_RESET_EXTRAVERSION:-}" - -# @ECLASS-VARIABLE: K_ROGKERNEL_LONGTERM -# @DESCRIPTION: -# Consider Kernel stable patchset as longterm (changing URL) -K_ROGKERNEL_LONGTERM="${K_ROGKERNEL_LONGTERM:-}" - -# @ECLASS-VARIABLE: K_KERNEL_SOURCES_PKG -# @DESCRIPTION: -# The kernel sources package used to build this kernel binary -K_KERNEL_SOURCES_PKG="${K_KERNEL_SOURCES_PKG:-${CATEGORY}/${PN/*-}-sources-${PVR}}" - -# @ECLASS-VARIABLE: K_KERNEL_PATCH_VER -# @DESCRIPTION: -# If set to "3" for example, it applies the upstream kernel -# patch corresponding to patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.3.${K_TARBALL_EXT} -# @TODO: deprecate and remove once 2.6.x kernels are retired -K_KERNEL_PATCH_VER="${K_KERNEL_PATCH_VER:-}" - -# @ECLASS-VARIABLE: K_KERNEL_PATCH_HOTFIXES -# @DESCRIPTION: -# If there is the need to quickly apply patches to the kernel -# without bumping the kernel patch tarball (for eg. in case -# of just released security fixes), set this variable in your ebuild -# pointing to space separated list of patch paths. -K_KERNEL_PATCH_HOTFIXES="${K_KERNEL_PATCH_HOTFIXES:-}" - -# @ECLASS-VARIABLE: K_KERNEL_DISABLE_PR_EXTRAVERSION -# @DESCRIPTION: -# Set this to "1" if you want to tell kernel-2 eclass to -# not use ${PR} in kernel EXTRAVERSION (K_NOUSEPR). Otherwise, set -# this to "0" to not set K_NOUSEPR at all. -K_KERNEL_DISABLE_PR_EXTRAVERSION="${K_KERNEL_DISABLE_PR_EXTRAVERSION:-1}" - -# @ECLASS-VARIABLE: K_KERNEL_SLOT_USEPVR -# @DESCRIPTION: -# Set this to "1" if you want to use ${PVR} in SLOT variable, instead of ${PV} -# sys-kernel/linux-vserver (vserver-sources) require this. This won't work for -# firmware pkgs. -K_KERNEL_SLOT_USEPVR="${K_KERNEL_SLOT_USEPVR:-0}" - -# @ECLASS-VARIABLE: K_KERNEL_NEW_VERSIONING -# @DESCRIPTION: -# Set this to "1" if your kernel ebuild uses the new Linux kernel upstream -# versioning and ${PV} contains the stable revision, like 3.7.1. -# In the example above, this makes the SLOT variable contain only "3.7". -# The sublevel version can be forced using K_ROGKERNEL_FORCE_SUBLEVEL -K_KERNEL_NEW_VERSIONING="${K_KERNEL_NEW_VERSIONING:-0}" - -# @ECLASS-VARIABLE: K_KERNEL_IMAGE_NAME -# @DESCRIPTION: -# Set this to a custom kernel image make target if the default does not -# fit your needs. This value if set, is passed to genkernel through the -# --kernel-target= flag. -K_KERNEL_IMAGE_NAME="${K_KERNEL_IMAGE_NAME:-}" - -# @ECLASS-VARIABLE: K_KERNEL_LTS -# @DESCRIPTION: -# Set this to 1 to mark the kernel as Long Term Stable. "virtual/linux-binary-lts" -# shall be appended to ${PROVIDE}. -K_KERNEL_LTS="${K_KERNEL_LTS:-}" - -# @ECLASS-VARIABLE: K_KERNEL_IMAGE_PATH -# @DESCRIPTION: -# Set this to a custom relative kernel image path to override the default -# one. This value if set, is passed to genkernel through the -# --kernel-binary= flag. -K_KERNEL_IMAGE_PATH="${K_KERNEL_IMAGE_PATH:-}" - -# @ECLASS-VARIABLE: K_ROGKERNEL_FIRMWARE -# @DESCRIPTION: -# Set this to "1" if your ebuild is a kernel firmware package -K_FIRMWARE_PACKAGE="${K_FIRMWARE_PACKAGE:-}" - -# @ECLASS-VARIABLE: K_ONLY_SOURCES -# @DESCRIPTION: -# For every kernel binary package, there is a kernel source package associated -# if your ebuild is one of them, set this to "1" -K_ONLY_SOURCES="${K_ONLY_SOURCES:-}" - -# @ECLASS-VARIABLE: K_REQUIRED_LINUX_FIRMWARE_VER -# @DESCRIPTION: -# Minimum required version of sys-kernel/linux-formware package, if any -K_REQUIRED_LINUX_FIRMWARE_VER="${K_REQUIRED_LINUX_FIRMWARE_VER:-}" - -# @ECLASS-VARIABLE: K_WORKAROUND_SOURCES_COLLISION -# @DESCRIPTION: -# For kernel binary packages, Workaround file collisions with kernel -# sources already providing certain files (like Makefile). Used -# by linux-openvz and linux-vserver -K_WORKAROUND_SOURCES_COLLISION="${K_WORKAROUND_SOURCES_COLLISION:-}" - -# @ECLASS-VARIABLE: K_WORKAROUND_USE_REAL_EXTRAVERSION -# @DESCRIPTION: -# Some kernel sources are shipped with their own EXTRAVERSION and -# we're kindly asked to not touch it, if this is your case, set -# this variable and depmod will work correctly. -K_WORKAROUND_USE_REAL_EXTRAVERSION="${K_WORKAROUND_USE_REAL_EXTRAVERSION:-}" - -# @ECLASS-VARIABLE: K_ROGKERNEL_ZFS -# @DESCRIPTION: -# If set, this kernel features ZFS. -K_ROGKERNEL_ZFS="${K_ROGKERNEL_ZFS:-}" - -# @ECLASS-VARIABLE: K_GENKERNEL_ARGS -# @DESCRIPTION: -# Provide extra genkernel arguments using K_GENKERNEL_ARGS -K_GENKERNEL_ARGS="${K_GENKERNEL_ARGS:-}" - -# @ECLASS-VARIABLE: K_MKIMAGE_RAMDISK_ADDRESS -# @DESCRIPTION: -# [ARM ONLY] Provide the ramdisk load address to be used with mkimage -K_MKIMAGE_RAMDISK_ADDRESS="${K_MKIMAGE_RAMDISK_ADDRESS:-}" - -# @ECLASS-VARIABLE: K_MKIMAGE_RAMDISK_ENTRYPOINT -# @DESCRIPTION: -# [ARM ONLY] Provide the ramdisk entry point address to be used with mkimage -K_MKIMAGE_RAMDISK_ENTRYPOINT="${K_MKIMAGE_RAMDISK_ENTRYPOINT:-}" - -# @ECLASS-VARIABLE: K_MKIMAGE_WRAP_INITRAMFS -# @DESCRIPTION: -# [ARM ONLY] Execute mkimage against the generated initramfs Default is yes ("1"). -K_MKIMAGE_WRAP_INITRAMFS="${K_MKIMAGE_WRAP_INITRAMFS:-1}" - -# @ECLASS-VARIABLE: K_MKIMAGE_KERNEL_ADDRESS -# @DESCRIPTION: -# [ARM ONLY] Provide the kernel load address to be used with mkimage -K_MKIMAGE_KERNEL_ADDRESS="${K_MKIMAGE_KERNEL_ADDRESS:-}" - -KERN_INITRAMFS_SEARCH_NAME="${KERN_INITRAMFS_SEARCH_NAME:-initramfs-genkernel*${K_ROGKERNEL_NAME}}" - -# Disable deblobbing feature -K_DEBLOB_AVAILABLE=0 -ETYPE="sources" -K_TARBALL_EXT="${K_TARBALL_EXT:-xz}" - -inherit versionator -if [ "${K_KERNEL_NEW_VERSIONING}" = "1" ]; then - CKV="$(get_version_component_range 1-2)" -fi - -inherit eutils multilib kernel-2 rogentos-artwork mount-boot linux-info - -# from kernel-2 eclass -detect_version -detect_arch - -DESCRIPTION="Kogaion, Argent and ArgOS linux kernel functions and phases" - - -K_LONGTERM_URL_STR="" -if [ -n "${K_ROGKERNEL_LONGTERM}" ]; then - K_LONGTERM_URL_STR="/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" -fi - -## kernel-2 eclass settings -if [ "${K_ROGKERNEL_PATCH_UPSTREAM_TARBALL}" = "1" ]; then - _patch_name="$(get_version_component_range 1-2)-${K_ROGKERNEL_SELF_TARBALL_NAME}-${PVR}.patch.xz" - SRC_URI="${KERNEL_URI}" - UNIPATCH_LIST="${UNIPATCH_LIST} ${DISTDIR}/${_patch_name}" - unset _patch_name -elif [ -n "${K_ROGKERNEL_SELF_TARBALL_NAME}" ]; then - #SRC_URI="mirror://rogentos/${CATEGORY}/linux-${PVR}+${K_ROGKERNEL_SELF_TARBALL_NAME}.tar.${K_TARBALL_EXT}" - SRC_URI="http://bpr.bluepink.ro/~rogentos/distro/${CATEGORY}/linux-${PVR}+${K_ROGKERNEL_SELF_TARBALL_NAME}.tar.${K_TARBALL_EXT}" -else - SRC_URI="${KERNEL_URI}" -fi - -if [ -z "${K_ROGKERNEL_SELF_TARBALL_NAME}" ]; then - if [ -n "${K_KERNEL_PATCH_VER}" ]; then - K_PATCH_NAME="patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.${K_KERNEL_PATCH_VER}.${K_TARBALL_EXT}" - SRC_URI="${SRC_URI} - mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}${K_LONGTERM_URL_STR}/${K_PATCH_NAME}" - UNIPATCH_LIST="${DISTDIR}/${K_PATCH_NAME} - ${UNIPATCH_LIST}" - fi -fi -if [ -n "${K_KERNEL_PATCH_HOTFIXES}" ]; then - UNIPATCH_LIST="${UNIPATCH_LIST} ${K_KERNEL_PATCH_HOTFIXES}" -fi - -_get_real_kv_full() { - if [[ "${KV_MAJOR}${KV_MINOR}" -eq 26 ]]; then - echo "${ORIGINAL_KV_FULL}" - elif [[ "${OKV/.*}" = "3" ]]; then - # Linux 3.x support, KV_FULL is set to: 3.0-rogentos - # need to add another final .0 to the version part - echo "${ORIGINAL_KV_FULL/-/.0-}" - else - echo "${ORIGINAL_KV_FULL}" - fi -} - -# replace "linux" with K_ROGKERNEL_NAME, usually replaces -# "linux" with "rogentos" or "server" or "openvz" -KV_FULL="${KV_FULL/${PN/-*}/${K_ROGKERNEL_NAME}}" -EXTRAVERSION="${EXTRAVERSION/${PN/-*}/${K_ROGKERNEL_NAME}}" -# drop -rX if exists -if [[ -n "${PR//r0}" ]] && [[ "${K_KERNEL_DISABLE_PR_EXTRAVERSION}" = "1" ]] \ - && [[ -z "${K_NOSETEXTRAVERSION}" ]]; then - EXTRAVERSION="${EXTRAVERSION%-r*}" - KV_FULL="${KV_FULL%-r*}" - KV="${KV%-r*}" -fi -# rewrite it -ORIGINAL_KV_FULL="${KV_FULL}" -KV_FULL="$(_get_real_kv_full)" - -# Starting from linux-3.0, we still have to install -# sources stuff into /usr/src/linux-3.0.0-rogentos (example) -# where the last part must always match uname -r -# otherwise kernel-switcher (and RELEASE_LEVEL file) -# will complain badly -KV_OUT_DIR="/usr/src/linux-${KV_FULL}" -S="${WORKDIR}/linux-${KV_FULL}" - - -if [ -n "${K_FIRMWARE_PACKAGE}" ]; then - SLOT="0" -elif [ "${K_KERNEL_SLOT_USEPVR}" = "1" ]; then - SLOT="${PVR}" -elif [ "${K_KERNEL_NEW_VERSIONING}" = "1" ]; then - SLOT="$(get_version_component_range 1-2)" -else - SLOT="${PV}" -fi - -_is_kernel_binary() { - if [ -z "${K_ONLY_SOURCES}" ] && [ -z "${K_FIRMWARE_PACKAGE}" ]; then - # yes it is - return 0 - else - # no it isn't - return 1 - fi -} - -_is_kernel_lts() { - local _ver="$(get_version_component_range 1-2)" - [ "${_ver}" = "3.0" ] && return 0 - [ "${_ver}" = "3.2" ] && return 0 - [ "${_ver}" = "3.4" ] && return 0 - [ "${_ver}" = "3.10" ] && return 0 - [ "${_ver}" = "3.12" ] && return 0 - [ "${_ver}" = "3.14" ] && return 0 - return 1 -} - -# provide extra virtual pkg -if _is_kernel_binary; then - PROVIDE="virtual/linux-binary" -# LTS support - if [ "${K_KERNEL_LTS}" = "1" ] || _is_kernel_lts; then - PROVIDE+=" virtual/linux-binary-lts" - fi -fi - -if [ -n "${K_ROGKERNEL_SELF_TARBALL_NAME}" ]; then - HOMEPAGE="https://github.com/Rogentos/kernel" -else - HOMEPAGE="http://www.rogentos.ro" -fi - -# Returns success if _set_config_file_vars was called. -_is_config_file_set() { - [[ ${_config_file_set} = 1 ]] -} - -# Returns the arm kernel config file extension for the current subarch -_get_arm_subarch() { - local target="${CTARGET:-${CHOST}}" - local arm_arch=${target%%-*} - if [[ ${arm_arch} == armv7? ]]; then - echo "armv7" - elif [[ ${arm_arch} == armv6? ]]; then - echo "armv6" - elif [[ ${arm_arch} == armv5? ]]; then - echo "armv5" - fi -} - -_get_arch() { - if use arm; then - _get_arm_subarch - elif use amd64; then - echo "amd64" - elif use x86; then - echo "x86" - fi -} - -_set_config_file_vars() { - # Setup kernel configuration file name - local pvr="${PVR}" - local pv="${PV}" - if [ "${K_KERNEL_NEW_VERSIONING}" = "1" ]; then - pvr="$(get_version_component_range 1-2)" - pv="${pvr}" - if [ "${PR}" != "r0" ]; then - pvr+="-${PR}" - fi - fi - - K_ROGKERNEL_CONFIG_FILES=() - K_ROGKERNEL_CONFIG_FILES+=( "${K_ROGKERNEL_NAME}-${pvr}-$(_get_arch).config" ) - K_ROGKERNEL_CONFIG_FILES+=( "${K_ROGKERNEL_NAME}-${pv}-$(_get_arch).config" ) - K_ROGKERNEL_CONFIG_FILES+=( "${K_ROGKERNEL_NAME}-$(_get_arch).config" ) - - _config_file_set=1 -} - -if [ -n "${K_ONLY_SOURCES}" ] || [ -n "${K_FIRMWARE_PACKAGE}" ]; then - IUSE="${IUSE}" - DEPEND="sys-apps/sed" - RDEPEND="${RDEPEND}" -else - IUSE="dmraid dracut iscsi luks lvm mdadm plymouth splash" - if [ -n "${K_ROGKERNEL_ZFS}" ]; then - IUSE="${IUSE} zfs" - fi - DEPEND="app-arch/xz-utils - sys-apps/sed - sys-devel/autoconf - sys-devel/make - || ( >=sys-kernel/genkernel-next-5 >=sys-kernel/genkernel-3.4.45-r2 ) - arm? ( dev-embedded/u-boot-tools ) - amd64? ( sys-apps/v86d ) - x86? ( sys-apps/v86d ) - splash? ( x11-themes/rogentos-artwork-core ) - lvm? ( sys-fs/lvm2 sys-block/thin-provisioning-tools ) - plymouth? ( - || ( >=sys-kernel/genkernel-next-5 >=sys-kernel/genkernel-5 ) - sys-boot/plymouth - ) - dracut? ( sys-apps/v86d sys-kernel/dracut )" - RDEPEND="sys-apps/sed - sys-kernel/linux-firmware" - if [ -n "${K_REQUIRED_LINUX_FIRMWARE_VER}" ]; then - RDEPEND+=" >=sys-kernel/linux-firmware-${K_REQUIRED_LINUX_FIRMWARE_VER}" - fi -fi - -# internal function -# -# FUNCTION: _update_depmod -# @USAGE: _update_depmod <-r depmod> -# DESCRIPTION: -# It updates the modules.dep file for the current kernel. -# This is more or less the same of linux-mod update_depmod, with the -# exception of accepting parameter which is passed to depmod -r switch -_update_depmod() { - - # if we haven't determined the version yet, we need too. - get_version; - - ebegin "Updating module dependencies for ${KV_FULL}" - if [ -r "${KV_OUT_DIR}"/System.map ]; then - depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT}" -r "${1}" - eend $? - else - ewarn - ewarn "${KV_OUT_DIR}/System.map not found." - ewarn "You must manually update the kernel module dependencies using depmod." - eend 1 - ewarn - fi -} - -rogentos-kernel_pkg_setup() { - if [ -n "${K_FIRMWARE_PACKAGE}" ]; then - einfo "Preparing kernel firmwares" - else - einfo "Preparing kernel and its modules" - fi -} - -rogentos-kernel_src_unpack() { - local okv="${OKV}" - if [ -n "${K_ROGKERNEL_SELF_TARBALL_NAME}" ] && [ "${K_ROGKERNEL_PATCH_UPSTREAM_TARBALL}" != "1" ]; then - OKV="${PVR}+${K_ROGKERNEL_SELF_TARBALL_NAME}" - fi - if [ "${K_KERNEL_NEW_VERSIONING}" = "1" ]; then - # workaround for kernel-2's universal_unpack assumptions - UNIPATCH_LIST_DEFAULT= KV_MAJOR=0 kernel-2_src_unpack - else - kernel-2_src_unpack - fi - if [ -n "${K_ROGKERNEL_FORCE_SUBLEVEL}" ]; then - # patch out Makefile with proper sublevel - sed -i "s:^SUBLEVEL = .*:SUBLEVEL = ${K_ROGKERNEL_FORCE_SUBLEVEL}:" \ - "${S}/Makefile" || die - fi - if [ -n "${K_ROGKERNEL_RESET_EXTRAVERSION}" ]; then - sed -i "s:^EXTRAVERSION =.*:EXTRAVERSION = :" "${S}/Makefile" || die - # some sources could have multiple append-based EXTRAVERSIONs - sed -i "s/^EXTRAVERSION :=.*//" "${S}/Makefile" || die - fi - OKV="${okv}" - - # Let's handle EAPIs 0 and 1... - case ${EAPI:-0} in - 0|1) rogentos-kernel_src_prepare ;; - esac -} - -rogentos-kernel_src_prepare() { - _set_config_file_vars -} - -rogentos-kernel_src_compile() { - if [ -n "${K_FIRMWARE_PACKAGE}" ]; then - _firmwares_src_compile - elif [ -n "${K_ONLY_SOURCES}" ]; then - kernel-2_src_compile - else - _kernel_src_compile - fi -} - -_firmwares_src_compile() { - einfo "Starting to compile firmwares..." - _kernel_copy_config "${S}/.config" - cd "${S}" || die "cannot find source dir" - - export LDFLAGS="" - OLDARCH="${ARCH}" - unset ARCH - emake firmware || die "cannot compile firmwares" - ARCH="${OLDARCH}" -} - -_kernel_copy_config() { - _is_config_file_set \ - || die "Kernel configuration file not set. Was rogentos-kernel_src_prepare() called?" - - local base_path="${DISTDIR}" - if [ -n "${K_ROGKERNEL_SELF_TARBALL_NAME}" ]; then - base_path="${S}/rogentos/config" - fi - - local found= cfg= - for cfg in "${K_ROGKERNEL_CONFIG_FILES[@]}"; do - cfg="${base_path}/${cfg}" - if [ -f "${cfg}" ]; then - cp "${cfg}" "${1}" || die "cannot copy kernel config ${cfg} -> ${1}" - elog "Using kernel config: ${cfg}" - found=1 - break - fi - done - [[ -z "${found}" ]] && die "cannot find kernel configs among: ${K_ROGKERNEL_CONFIG_FILES[*]}" -} - -_kernel_src_compile() { - # disable sandbox - export SANDBOX_ON=0 - - # needed anyway, even if grub use flag is not used here - if use amd64 || use x86; then - mkdir -p "${WORKDIR}"/boot/grub - else - mkdir -p "${WORKDIR}"/boot - fi - - einfo "Starting to compile kernel..." - _kernel_copy_config "${WORKDIR}"/config - - # do some cleanup - rm -rf "${WORKDIR}"/lib - rm -rf "${WORKDIR}"/cache - rm -rf "${S}"/temp - - # creating workdirs - # some kernels fail with make 3.82 if firmware dir is not created - mkdir "${WORKDIR}"/lib/lib/firmware -p - mkdir "${WORKDIR}"/cache - mkdir "${S}"/temp - - cd "${S}" || die - local GKARGS=() - GKARGS+=( "--no-save-config" "--e2fsprogs" "--udev" ) - use splash && GKARGS+=( "--splash=rogentos" ) - use plymouth && GKARGS+=( "--plymouth" "--plymouth-theme=${PLYMOUTH_THEME}" ) - use dmraid && GKARGS+=( "--dmraid" ) - use iscsi && GKARGS+=( "--iscsi" ) - use mdadm && GKARGS+=( "--mdadm" ) - use luks && GKARGS+=( "--luks" ) - use lvm && GKARGS+=( "--lvm" ) - if [ -n "${K_ROGKERNEL_ZFS}" ]; then - use zfs && GKARGS+=( "--zfs" ) - fi - - export DEFAULT_KERNEL_SOURCE="${S}" - export CMD_KERNEL_DIR="${S}" - for opt in ${MAKEOPTS}; do - if [ "${opt:0:2}" = "-j" ]; then - mkopts="${opt}" - break - fi - done - [ -z "${mkopts}" ] && mkopts="-j3" - - if [ -n "${K_KERNEL_IMAGE_NAME}" ]; then - GKARGS+=( "--kernel-target=${K_KERNEL_IMAGE_NAME}" ) - elif use arm; then - # backward compat + provide sane defaults. - GKARGS+=( "--kernel-target=uImage" ) - fi - if [ -n "${K_KERNEL_IMAGE_PATH}" ]; then - GKARGS+=( "--kernel-binary=${K_KERNEL_IMAGE_PATH}" ) - elif use arm; then - # backward compat + provide sane defaults. - GKARGS+=( "--kernel-binary=arch/arm/boot/uImage" ) - fi - - # Workaround bug in splash_geninitramfs corrupting the initramfs - # if xz compression is used (newer genkernel >3.4.24) - local support_comp=$(genkernel --help | grep compress-initramfs-type) - if [ -n "${support_comp}" ]; then - GKARGS+=( "--compress-initramfs-type=gzip" ) - fi - - # Use --disklabel if genkernel supports it - local support_disklabel=$(genkernel --help | grep -- --disklabel) - if [ -n "${support_disklabel}" ]; then - GKARGS+=( "--disklabel" ) - fi - - if [ -n "${K_MKIMAGE_KERNEL_ADDRESS}" ]; then - export LOADADDR="${K_MKIMAGE_KERNEL_ADDRESS}" - fi - OLDARCH="${ARCH}" - unset ARCH - unset LDFLAGS - DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel "${GKARGS[@]}" ${K_GENKERNEL_ARGS} \ - --kerneldir="${S}" \ - --kernel-config="${WORKDIR}"/config \ - --cachedir="${WORKDIR}"/cache \ - --makeopts="${mkopts}" \ - --tempdir="${S}"/temp \ - --logfile="${WORKDIR}"/genkernel.log \ - --bootdir="${WORKDIR}"/boot \ - --mountboot \ - --module-prefix="${WORKDIR}"/lib \ - all || die "genkernel failed" - - if [ -n "${K_MKIMAGE_KERNEL_ADDRESS}" ]; then - unset LOADADDR - fi - - ARCH=${OLDARCH} -} - -_setup_mkimage_ramdisk() { - local initramfs=$(ls "${WORKDIR}"/boot/${KERN_INITRAMFS_SEARCH_NAME}* 2> /dev/null) - if [ ! -e "${initramfs}" ] || [ ! -f "${initramfs}" ]; then - ewarn "No initramfs at ${initramfs}, cannot run mkimage on it!" - elif [ "${K_MKIMAGE_WRAP_INITRAMFS}" = "1" ]; then - einfo "Setting up u-boot initramfs for: ${initramfs}" - mkimage -A arm -O linux -T ramdisk -C none -a \ - "${K_MKIMAGE_RAMDISK_ADDRESS}" \ - -e "${K_MKIMAGE_RAMDISK_ENTRYPOINT}" -d "${initramfs}" \ - "${initramfs}.u-boot" || return 1 - mv "${initramfs}.u-boot" "${initramfs}" || return 1 - else - einfo "mkimage won't be called for: ${initramfs}" - fi - return 0 -} - -rogentos-kernel_src_install() { - if [ -n "${K_FIRMWARE_PACKAGE}" ]; then - _firmwares_src_install - elif [ -n "${K_ONLY_SOURCES}" ]; then - _kernel_sources_src_install - else - _kernel_src_install - fi - # File collisions between slots, debug stuff - # not really needed for a kernel - rm -rf "${D}/usr/lib/debug" -} - -_firmwares_src_install() { - dodir /lib/firmware - keepdir /lib/firmware - cd "${S}" || die - emake INSTALL_FW_PATH="${D}/lib/firmware" firmware_install || die "cannot install firmwares" -} - -_kernel_sources_src_install() { - _kernel_copy_config ".config" - kernel-2_src_install - cd "${D}${KV_OUT_DIR}" || die - local oldarch="${ARCH}" - unset ARCH - if ! use sources_standalone; then - make modules_prepare || die "failed to run modules_prepare" - rm .config || die "cannot remove .config" - rm Makefile || die "cannot remove Makefile" - rm -f include/linux/version.h - rm -f include/generated/uapi/linux/version.h - fi - ARCH="${oldarch}" -} - -_kernel_src_install() { - if use arm; then - _setup_mkimage_ramdisk || die "cannot setup mkimage" - fi - - dodir "${KV_OUT_DIR}" - insinto "${KV_OUT_DIR}" - - _kernel_copy_config ".config" - doins ".config" || die "cannot copy kernel config" - doins Makefile || die "cannot copy Makefile" - doins Module.symvers || die "cannot copy Module.symvers" - doins System.map || die "cannot copy System.map" - - # NOTE: this is a workaround caused by linux-info.eclass not - # being ported to EAPI=2 yet - local version_h_dir="include/linux" - local version_h_dir2="include/generated/uapi/linux" - local version_h= - local version_h_src= - for ver_dir in "${version_h_dir}" "${version_h_dir2}"; do - version_h="${ROOT}${KV_OUT_DIR/\//}/${ver_dir}/version.h" - if [ -f "${version_h}" ]; then - einfo "Discarding previously installed version.h to avoid collisions" - addwrite "${version_h}" - rm -f "${version_h}" - fi - - # Include include/linux/version.h to make Portage happy - version_h_src="${S}/${ver_dir}/version.h" - if [ -f "${version_h_src}" ]; then - dodir "${KV_OUT_DIR}/${ver_dir}" - insinto "${KV_OUT_DIR}/${ver_dir}" - doins "${version_h_src}" || die "cannot copy version.h" - fi - done - - insinto "/boot" - doins "${WORKDIR}"/boot/* || die "cannot copy /boot over" - cp -Rp "${WORKDIR}"/lib/* "${D}/" || die "cannot copy /lib over" - - # Install dtbs if found - if use arm; then - local dtb_dir="/lib/dts/${KV_FULL}" - elog "Installing .dtbs (if any) into ${dtb_dir}" - insinto "${dtb_dir}" - local dtb= - for dtb in "${S}/arch/arm/boot/dts"/*.dtb; do - if [ -f "${dtb}" ]; then - elog "Installing dtb: ${dtb}" - doins "${dtb}" - fi - done - fi - - # This doesn't always work because KV_FULL (when K_NOSETEXTRAVERSION=1) doesn't - # reflect the real value used in Makefile - #dosym "../../..${KV_OUT_DIR}" "/lib/modules/${KV_FULL}/source" || die "cannot install source symlink" - #dosym "../../..${KV_OUT_DIR}" "/lib/modules/${KV_FULL}/build" || die "cannot install build symlink" - cd "${D}"/lib/modules/* || die "cannot enter /lib/modules directory, more than one element?" - # cleanup previous - rm -f build source || die - # create sane symlinks - ln -sf "../../..${KV_OUT_DIR}" source || die "cannot create source symlink" - ln -sf "../../..${KV_OUT_DIR}" build || die "cannot create build symlink" - cd "${S}" || die - - # drop ${D}/lib/firmware, virtual/linux-firmwares provides it - rm -rf "${D}/lib/firmware" - - if [ -n "${K_WORKAROUND_SOURCES_COLLISION}" ]; then - # Fixing up Makefile collision if already installed by - # openvz-sources - einfo "Workarounding source package collisions" - make_file="${KV_OUT_DIR/\//}/Makefile" - einfo "Makefile: ${make_file}" - if [ -f "${ROOT}/${make_file}" ]; then - elog "Removing ${D}/${make_file}" - rm -f "${D}/${make_file}" - fi - fi - - # Install kernel configuration information - # useful for Entropy kernel-switcher - # release level is enough for now - base_dir="/etc/kernels/${P}" - dodir "${base_dir}" - insinto "${base_dir}" - echo "${KV_FULL}" > "RELEASE_LEVEL" - doins "RELEASE_LEVEL" - einfo "Installing ${base_dir}/RELEASE_LEVEL file: ${KV_FULL}" - - use dracut && \ - _dracut_initramfs_create "${KV_FULL}" -} - -rogentos-kernel_pkg_preinst() { - if _is_kernel_binary; then - mount-boot_pkg_preinst - fi -} -rogentos-kernel_grub2_mkconfig() { - if [ -x "${ROOT}usr/sbin/grub2-mkconfig" ]; then - # Grub 2.00 - "${ROOT}usr/sbin/grub2-mkconfig" -o "${ROOT}boot/grub/grub.cfg" - elif [ -x "${ROOT}sbin/grub-mkconfig" ]; then - # Grub 1.99 - "${ROOT}sbin/grub-mkdevicemap" --device-map="${ROOT}boot/grub/device.map" - "${ROOT}sbin/grub-mkconfig" -o "${ROOT}boot/grub/grub.cfg" - else - echo - ewarn "Attention, Grub2 is not installed !!!" - ewarn "Grub2 bootloader configuration won't be updated" - echo - fi -} - -_get_real_extraversion() { - make_file="${ROOT}${KV_OUT_DIR}/Makefile" - local extraver=$(grep -r "^EXTRAVERSION =" "${make_file}" | cut -d "=" -f 2 | head -n 1) - local trimmed=${extraver%% } - echo ${trimmed## } -} - -_get_release_level() { - if [[ -n "${K_WORKAROUND_USE_REAL_EXTRAVERSION}" ]]; then - echo "${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}$(_get_real_extraversion)" - elif [[ "${KV_MAJOR}${KV_MINOR}" -eq 26 ]]; then - echo "${KV_FULL}" - elif [[ "${OKV/.*}" = "3" ]] && [[ "${KV_PATCH}" = "0" ]]; then - # Linux 3.x support, KV_FULL is set to: 3.0-rogentos - # need to add another final .0 to the version part - echo "${KV_FULL/-/.0-}" - else - echo "${KV_FULL}" - fi -} - -rogentos-kernel_uimage_config() { - # Two cases here: - # 1. /boot/uImage symlink is broken (pkg_postrm) - # 2. /boot/uImage symlink doesn't exist (pkg_postinst) - - if ! has_version app-eselect/uimage; then - ewarn "app-eselect/uimage not installed" - ewarn "If you are using this tool, please install it" - return 0 - fi - - local uimage_file=$(eselect uimage show --quiet 2> /dev/null) - if [ -z "${uimage_file}" ]; then - # pick the first listed, sorry! - local eselect_list=$(eselect uimage list --quiet 2> /dev/null) - if [ -n "${eselect_list}" ]; then - eselect uimage set 1 - else - echo - ewarn "No more kernels available, you won't be able to boot" - echo - fi - else - echo - elog "If you use eselect-bzimage, you are currently booting with kernel:" - elog "${uimage_file}" - elog - elog "Use 'eselect uimage' in order to switch between the available ones" - echo - fi -} - -rogentos-kernel_bzimage_config() { - # Two cases here: - # 1. /boot/bzImage symlink is broken (pkg_postrm) - # 2. /boot/bzImage symlink doesn't exist (pkg_postinst) - local kern_arch - use x86 && kern_arch="x86" - use amd64 && kern_arch="x86_64" - - if ! has_version app-eselect/eselect-bzimage; then - ewarn "app-eselect/eselect-bzimage not installed" - ewarn "If you are using this tool, please install it" - return 0 - fi - - local bzimage_file=$(eselect bzimage show --quiet 2> /dev/null) - if [ -z "${bzimage_file}" ]; then - # try to pic what's being installed - local eselect_list=$(eselect bzimage list --quiet 2> /dev/null) - if [ -n "${eselect_list}" ]; then - eselect bzimage set "kernel-genkernel-${kern_arch}-${KV_FULL}" - if [ "${?}" != "0" ]; then - # pick the first available, sorry! - echo - eselect bzimage set 1 - ewarn "Unable to select the right kernel, falling back" - ewarn "to the first available entry. You have been warned" - echo - fi - else - echo - ewarn "No more kernels available, you might not be able to boot" - echo - fi - else - echo - ewarn "You are currently booting with kernel:" - ewarn "${bzimage_file}" - ewarn - ewarn "Use 'eselect bzimage' in order to switch between the available ones" - echo - fi -} - -_dracut_initramfs_create() { - local kver="${1}" - - elog "Creating dracut initramfs for ${kver}" - addpredict /etc/ld.so.cache~ - dracut -q -N -f --kver="${kver}" "${D}/boot/initramfs-dracut-${kver}" -} - -rogentos-kernel_pkg_postinst() { - if _is_kernel_binary; then - fstab_file="${ROOT}etc/fstab" - einfo "Removing extents option for ext4 drives from ${fstab_file}" - # Remove "extents" from /etc/fstab - if [ -f "${fstab_file}" ]; then - sed -i '/ext4/ s/extents//g' "${fstab_file}" - fi - - # Update kernel initramfs to match user customizations - use splash && update_rogentos_kernel_initramfs_splash - - # Add kernel to grub.conf - if use amd64 || use x86; then - if use amd64; then - local kern_arch="x86_64" - else - local kern_arch="x86" - fi - # grub-legacy - if [ -x "${ROOT}usr/sbin/grub-handler" ]; then - "${ROOT}usr/sbin/grub-handler" add \ - "/boot/kernel-genkernel-${kern_arch}-${KV_FULL}" \ - "/boot/initramfs-genkernel-${kern_arch}-${KV_FULL}" - fi - - rogentos-kernel_grub2_mkconfig - fi - - # Setup newly installed kernel on ARM - if use arm; then - rogentos-kernel_uimage_config - fi - # Setup newly installed kernel on x86/amd64 - # This is quite handy for static grub1/grub2 - # configurations (like on Amazon EC2) - if use x86 || use amd64; then - rogentos-kernel_bzimage_config - fi - - kernel-2_pkg_postinst - local depmod_r=$(_get_release_level) - _update_depmod "${depmod_r}" - - elog "Please report kernel bugs at:" - elog "http://bugs.rogentos.ro" - - elog "The source code of this kernel is located at" - elog "=${K_KERNEL_SOURCES_PKG}." - elog "RogentOS Team recommends that portage users install" - elog "${K_KERNEL_SOURCES_PKG} if you want" - elog "to build any packages that install kernel modules" - elog "(such as ati-drivers, nvidia-drivers, virtualbox, etc...)." - else - kernel-2_pkg_postinst - fi -} - -rogentos-kernel_pkg_prerm() { - if _is_kernel_binary; then - mount-boot_pkg_prerm - fi -} - -rogentos-kernel_pkg_postrm() { - if _is_kernel_binary; then - # Remove kernel from grub.conf - if use amd64 || use x86; then - if use amd64; then - local kern_arch="x86_64" - else - local kern_arch="x86" - fi - if [ -x "${ROOT}usr/sbin/grub-handler" ]; then - "${ROOT}usr/sbin/grub-handler" remove \ - "/boot/kernel-genkernel-${kern_arch}-${KV_FULL}" \ - "/boot/initramfs-genkernel-${kern_arch}-${KV_FULL}" - fi - - rogentos-kernel_grub2_mkconfig - fi - - # Setup newly installed kernel on ARM - if use arm; then - rogentos-kernel_uimage_config - fi - # Setup newly installed kernel on x86/amd64 - # This is quite handy for static grub1/grub2 - # configurations (like on Amazon EC2) - if use x86 || use amd64; then - rogentos-kernel_bzimage_config - fi - fi -} - -# export all the available functions here -case ${EAPI:-0} in - 0|1) extra_export_funcs= ;; - *) extra_export_funcs=src_prepare ;; -esac - -EXPORT_FUNCTIONS pkg_setup src_unpack ${extra_export_funcs} \ - src_compile src_install pkg_preinst pkg_postinst pkg_prerm pkg_postrm diff --git a/eclass/sab-patches.eclass b/eclass/sab-patches.eclass deleted file mode 100644 index 40e89911..00000000 --- a/eclass/sab-patches.eclass +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright 2014 Sabayon -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# @ECLASS: sab-patches.eclass -# @MAINTAINER: -# slawomir.nizio@sabayon.org -# @AUTHOR: -# Sławomir Nizio <slawomir.nizio@sabayon.org> -# @BLURB: eclass that makes it easier to apply patches from multiple packages -# @DESCRIPTION: -# Makes it easy to apply patches stored in a remote location -# with the intention to make the task easier for Sabayon split ebuilds. -# (Plain patches kept in a VCS are very nice, but in the case of split -# ebuilds, duplicating the patches is not effective.) -# Patches are not added to SRC_URI by default, because it makes ebuilds -# use "SRC_URI+=..." which makes them more diverged from the original -# one than necessary. -# The eclass does not define any phase function. - -# @ECLASS-VARIABLE: SAB_PATCHES_SRC -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array that contains URIs of patches to be added to SRC_URI. Mandatory! - -# @ECLASS-VARIABLE: SAB_PATCHES_SKIP -# @DESCRIPTION: -# Array that contains patterns of patch names to be skipped. -# It does not need to be a global variable. - -inherit eutils - -if [[ ${#SAB_PATCHES_SRC[@]} -eq 0 ]]; then - die "SAB_PATCHES_SRC is not set" -fi - -# @FUNCTION: sab-patches_update_SRC_URI -# @DESCRIPTION: -# Appends patches entries to SRC_URI. If it is not done, an error will -# occur later on. -sab-patches_update_SRC_URI() { - local p - for p in "${SAB_PATCHES_SRC[@]}"; do - SRC_URI+=${SRC_URI:+ }${p} - done -} - -# @FUNCTION: sab-patches_apply_all -# @DESCRIPTION: -# Applies patches specified using SAB_PATCHES_SRC, skipping patches -# with names matched in SAB_PATCHES_SKIP. -# Two possible cases are supported. -# 1. A patch path which is a tarball (assumed file name: *.tar*). -# Such a tarball must unpack to ${WORKDIR}/<tarball name without *.tar*> -# and must contain a file 'order,' which is used to determine order -# of patches to apply. -# 2. A patch which is not a tarball, which will be simply applied (if -# it is not skipped). -sab-patches_apply_all() { - local p - for p in "${SAB_PATCHES_SRC[@]}"; do - if [[ ${p} = *.tar* ]]; then - local dir=${p##*/} - dir=${dir%.tar*} - _sab-patches_apply_from_dir "${WORKDIR}/${dir}" - else - local name=${p##*/} - _sab-patches_apply_nonskipped "${DISTDIR}" "${name}" - fi - done -} - -# @FUNCTION: sab-patches_apply -# @DESCRIPTION: -# Apply selected patches. Arguments are the directory containing -# the patch, followed by one or more patch names. -sab-patches_apply() { - [[ $# -lt 2 ]] && die "sab-patches_apply: missing arguments" - local dir=$1 - shift - local patch - for patch; do - epatch "${dir}/${patch}" - done -} - -# @FUNCTION: sab-patches_unpack -# @DESCRIPTION: -# Unpack every file provided in SAB_PATCHES_SRC. -sab-patches_unpack() { - local p - pushd "${WORKDIR}" > /dev/null || die - - for p in "${SAB_PATCHES_SRC[@]}"; do - local name=${p##*/} - unpack "${name}" - done - - popd > /dev/null || die -} - -# @FUNCTION: _sab-patches_apply_nonskipped -# @INTERNAL -# @DESCRIPTION: -# Apply selected patches - only those which should not be skipped. -# Arguments are the directory containing the patch, followed by -# one or more patch names. -# This function is not intended to be used by ebuilds because there -# is a better way: use sab-patches_apply and skip the unwanted ones. -_sab-patches_apply_nonskipped() { - if [[ $# -lt 2 ]]; then - die "_sab-patches_apply_nonskipped: missing arguments" - fi - - local dir=$1 - shift - - local patch - for patch; do - if [[ ${patch} = */* ]]; then - die "_sab-patches_apply_nonskipped: '${patch}' contains slashes" - fi - - if _sab-patches_is_skipped "${patch}"; then - einfo "(skipping ${patch})" - else - epatch "${dir}/${patch}" - fi - done -} - -# @FUNCTION: _sab-patches_apply_from_dir -# @INTERNAL -# @DESCRIPTION: -# Apply all patches from a directory in order. Obeys SAB_PATCHES_SKIP. -_sab-patches_apply_from_dir() { - local dir=$1 - local order_file=${dir}/order - if [[ ! -r ${order_file} ]] || [[ ! -f ${order_file} ]]; then - die "Problems with '${order_file}'... (Does it exist?)" - fi - - local patch - while read patch; do - local patch_path=${dir}/${patch} - if \ - [[ -z ${patch} ]] || \ - [[ ${patch} = *\ * ]] || \ - [[ ${patch} = */* ]] || \ - [[ ! -f ${patch_path} ]]; then - die "Problems with the patch '${patch}', see ${order_file}." - fi - - _sab-patches_apply_nonskipped "${dir}" "${patch}" - done < "${order_file}" - - [[ $? -ne 0 ]] && die "_sab-patches_apply_from_dir: loop failed" -} - -# @FUNCTION: _sab-patches_is_skipped -# @INTERNAL -# @DESCRIPTION: -# Returns success if the patch should be skipped. O(n). :) -_sab-patches_is_skipped() { - local arg=$1 - local p - for p in "${SAB_PATCHES_SKIP[@]}"; do - [[ ${arg} = ${p} ]] && return 0 - done - return 1 -} diff --git a/eclass/transmission-2.51.eclass b/eclass/transmission-2.51.eclass deleted file mode 100644 index e1e32e02..00000000 --- a/eclass/transmission-2.51.eclass +++ /dev/null @@ -1,294 +0,0 @@ -# Copyright 1999-2012 Sabayon -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# @ECLASS: transmission-2.51.eclass -# @MAINTAINER: -# slawomir.nizio@sabayon.org -# @AUTHOR: -# Sławomir Nizio <slawomir.nizio@sabayon.org> -# @BLURB: eclass to ease managing of Sabayon split net-p2p/transmission -# @DESCRIPTION: -# This eclass is to ease managing of split net-p2p/transmission for Sabayon. -# Its name contains a version that corresponds to net-p2p/transmission one, -# because the eclass will change often when needed to follow changes -# in Gentoo ebuild. - -# @ECLASS-VARIABLE: TRANSMISSION_ECLASS_VERSION_OK -# @DESCRIPTION: -# Set this to x.y if you want to use transmission-x.y.eclass from ebuild -# with ${PV} different than x.y. This is to catch bugs. -: ${TRANSMISSION_ECLASS_VERSION_OK:=${PV}} - -# @ECLASS-VARIABLE: E_TRANSM_TAIL -# @DESCRIPTION: -# "Tail" of package name. Can take value gtk, qt4, etc. or can be empty. -# It shouldn't be modified. -E_TRANSM_TAIL=${PN#transmission} -E_TRANSM_TAIL=${E_TRANSM_TAIL#-} - -# @FUNCTION: _transmission_is -# @DESCRIPTION: -# Function used to check which variant of Transmission are we working on. -# Argument should be one of these: (none), gtk, qt4, daemon, cli, base. -# If argument is empty or omitted, true value means that it is -# net-p2p/transmission (metapackage). -# Consider it private. -_transmission_is() { - local what=$1 - [[ ${what} = "${E_TRANSM_TAIL}" ]] -} - -LANGS="en es kk lt pt_BR ru" # used only for -qt - -unset _live_inherits -if [[ ${PV} == *9999* ]]; then - # not tested in the eclass - ESVN_REPO_URI="svn://svn.transmissionbt.com/Transmission/trunk" - _live_inherits=subversion -fi - -MY_ECLASSES="" -_transmission_is gtk && MY_ECLASSES+="fdo-mime gnome2-utils" -_transmission_is qt4 && MY_ECLASSES+="fdo-mime qt4-r2" -_transmission_is "" || MY_ECLASSES+=" autotools" - -inherit eutils multilib ${MY_ECLASSES} ${_live_inherits} - -unset MY_ECLASSES - -case ${EAPI:-0} in - 4|3) EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile \ - pkg_preinst pkg_postinst pkg_postrm ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -[[ ${PN} = transmission* ]] || \ - die "This eclass can only be used with net-p2p/transmission* ebuilds!" -# Bug catcher! -if ! [[ ${PV} = *9999* ]] && [[ ${TRANSMISSION_ECLASS_VERSION_OK} != ${ECLASS#*-} ]]; then - eerror "used eclass ${ECLASS}" - eerror "TRANSMISSION_ECLASS_VERSION_OK=${TRANSMISSION_ECLASS_VERSION_OK}" - die "ebuild version ${PV} doesn't match with the eclass" -fi - -MY_PN="transmission" -MY_P="${MY_PN}-${PV}" - -DESCRIPTION="A Fast, Easy and Free BitTorrent client" -HOMEPAGE="http://www.transmissionbt.com/" -SRC_URI="http://download.transmissionbt.com/${MY_PN}/files/${MY_P}.tar.xz" - -LICENSE="GPL-2 MIT" -SLOT="0" -IUSE="" - -# only common dependencies plus blockers -RDEPEND="" -_transmission_is base || RDEPEND+="~net-p2p/transmission-base-${PV}" -if ! _transmission_is ""; then - RDEPEND+=" - >=dev-libs/libevent-2.0.10 - dev-libs/openssl:0 - >=net-libs/miniupnpc-1.6 - >=net-misc/curl-7.16.3[ssl] - net-libs/libnatpmp - sys-libs/zlib" -fi - -DEPEND="${RDEPEND}" -if _transmission_is base; then - RDEPEND+=" !<net-p2p/transmission-gtk-${PV} - !<net-p2p/transmission-qt4-${PV} - !<net-p2p/transmission-daemon-${PV} - !<net-p2p/transmission-cli-${PV}" -fi -if ! _transmission_is ""; then - DEPEND+=" dev-util/intltool - dev-util/pkgconfig - sys-devel/gettext - virtual/os-headers" -fi - -S="${WORKDIR}/${MY_P}" -_transmission_is "" && S="${WORKDIR}" - -transmission-2.51_pkg_setup() { - if _transmission_is base; then - enewgroup transmission - enewuser transmission -1 -1 -1 transmission - fi -} - -transmission-2.51_src_unpack() { - if [[ ${PV} == *9999* ]]; then - subversion_src_unpack - else - default - fi -} - -transmission-2.51_src_prepare() { - _transmission_is "" && return - - if [[ ${PV} == *9999* ]]; then - subversion_src_prepare - ./update-version-h.sh - fi - - sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die - - if ! use_if_iuse ayatana; then - sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die - fi - - # http://trac.transmissionbt.com/ticket/4324 - sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' lib${MY_PN}/Makefile.am || die - - intltoolize --copy --force --automake || die - eautoreconf - - if _transmission_is qt4; then - cat <<-EOF > "${T}"/${MY_PN}-magnet.protocol - [Protocol] - exec=transmission-qt '%u' - protocol=magnet - Icon=transmission - input=none - output=none - helper=true - listing= - reading=false - writing=false - makedir=false - deleting=false - EOF - fi - - if ! _transmission_is base; then - local sedcmd="s:\$(top_builddir)/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - find . -name Makefile.in -exec sed -i -e "${sedcmd}" {} \; || die - sed -i -e '/libtransmission \\/d' Makefile.in || die - if _transmission_is qt4; then - sedcmd="s:\$\${TRANSMISSION_TOP}/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - sed -i -e "${sedcmd}" qt/qtr.pro || die - fi - fi -} - -transmission-2.51_src_configure() { - _transmission_is "" && return - - local econfargs=( - --enable-external-natpmp - ) - - if _transmission_is base; then - export ac_cv_header_xfs_xfs_h=$(usex xfs) - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - $(use_enable lightweight) - ) - elif _transmission_is cli; then - econfargs+=( - --enable-cli - --disable-daemon - --without-gtk - ) - elif _transmission_is daemon; then - econfargs+=( - --disable-cli - --enable-daemon - --without-gtk - ) - elif _transmission_is gtk; then - econfargs+=( - --disable-cli - --disable-daemon - --with-gtk - ) - elif _transmission_is qt4; then - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - ) - else - die "Something is wrong... (E_TRANSM_TAIL=$E_TRANSM_TAIL)" - fi - - econf "${econfargs[@]}" - if _transmission_is qt4; then - pushd qt >/dev/null - eqmake4 qtr.pro - popd >/dev/null - fi -} - -transmission-2.51_src_compile() { - _transmission_is "" && return - - emake - if _transmission_is qt4; then - pushd qt >/dev/null - emake - - local l - for l in ${LANGS}; do - if use linguas_${l}; then - lrelease translations/${MY_PN}_${l}.ts - fi - done - popd >/dev/null - fi -} - - -# Note: not providing src_install. Too many differences and too much code -# which would only clutter this pretty eclass. - -transmission-2.51_pkg_preinst() { - _transmission_is gtk && gnome2_icon_savelist -} - -transmission-2.51_pkg_postinst() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update - - if _transmission_is daemon; then - elog "If you use ${MY_PN}-daemon, please, set 'rpc-username' and" - elog "'rpc-password' (in plain text, ${MY_PN}-daemon will hash it on" - elog "start) in settings.json file located at /var/${MY_PN}/config or" - elog "any other appropriate config directory." - fi - - if _transmission_is gtk; then - # in -gtk only? - elog - elog "To enable sound emerge media-libs/libcanberra and check that at least" - elog "some sound them is selected. For this go:" - elog "Gnome/system/preferences/sound themes tab and 'sound theme: default'" - elog - fi - - elog "Since µTP is enabled by default, ${MY_PN} needs large kernel buffers for" - elog "the UDP socket. You can append following lines into /etc/sysctl.conf:" - elog " net.core.rmem_max = 4194304" - elog " net.core.wmem_max = 1048576" - elog "and run sysctl -p" -} - -transmission-2.51_pkg_postrm() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update -} diff --git a/eclass/transmission-2.52.eclass b/eclass/transmission-2.52.eclass deleted file mode 100644 index 17b3aa14..00000000 --- a/eclass/transmission-2.52.eclass +++ /dev/null @@ -1,295 +0,0 @@ -# Copyright 1999-2012 Sabayon -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# @ECLASS: transmission-2.52.eclass -# @MAINTAINER: -# slawomir.nizio@sabayon.org -# @AUTHOR: -# Sławomir Nizio <slawomir.nizio@sabayon.org> -# @BLURB: eclass to ease managing of Sabayon split net-p2p/transmission -# @DESCRIPTION: -# This eclass is to ease managing of split net-p2p/transmission for Sabayon. -# Its name contains a version that corresponds to net-p2p/transmission one, -# because the eclass will change often when needed to follow changes -# in Gentoo ebuild. - -# @ECLASS-VARIABLE: TRANSMISSION_ECLASS_VERSION_OK -# @DESCRIPTION: -# Set this to x.y if you want to use transmission-x.y.eclass from ebuild -# with ${PV} different than x.y. This is to catch bugs. -: ${TRANSMISSION_ECLASS_VERSION_OK:=${PV}} - -# @ECLASS-VARIABLE: E_TRANSM_TAIL -# @DESCRIPTION: -# "Tail" of package name. Can take value gtk, qt4, etc. or can be empty. -# It shouldn't be modified. -E_TRANSM_TAIL=${PN#transmission} -E_TRANSM_TAIL=${E_TRANSM_TAIL#-} - -# @FUNCTION: _transmission_is -# @DESCRIPTION: -# Function used to check which variant of Transmission are we working on. -# Argument should be one of these: (none), gtk, qt4, daemon, cli, base. -# If argument is empty or omitted, true value means that it is -# net-p2p/transmission (metapackage). -# Consider it private. -_transmission_is() { - local what=$1 - [[ ${what} = "${E_TRANSM_TAIL}" ]] -} - -LANGS="en es kk lt pt_BR ru" # used only for -qt - -unset _live_inherits -if [[ ${PV} == *9999* ]]; then - # not tested in the eclass - ESVN_REPO_URI="svn://svn.transmissionbt.com/Transmission/trunk" - _live_inherits=subversion -fi - -MY_ECLASSES="" -_transmission_is gtk && MY_ECLASSES+="fdo-mime gnome2-utils" -_transmission_is qt4 && MY_ECLASSES+="fdo-mime qt4-r2" -_transmission_is "" || MY_ECLASSES+=" autotools" - -inherit eutils multilib ${MY_ECLASSES} ${_live_inherits} - -unset MY_ECLASSES - -case ${EAPI:-0} in - 4|3) EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile \ - pkg_preinst pkg_postinst pkg_postrm ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -[[ ${PN} = transmission* ]] || \ - die "This eclass can only be used with net-p2p/transmission* ebuilds!" -# Bug catcher! -if ! [[ ${PV} = *9999* ]] && [[ ${TRANSMISSION_ECLASS_VERSION_OK} != ${ECLASS#*-} ]]; then - eerror "used eclass ${ECLASS}" - eerror "TRANSMISSION_ECLASS_VERSION_OK=${TRANSMISSION_ECLASS_VERSION_OK}" - die "ebuild version ${PV} doesn't match with the eclass" -fi - -MY_PN="transmission" -MY_P="${MY_PN}-${PV}" - -DESCRIPTION="A Fast, Easy and Free BitTorrent client" -HOMEPAGE="http://www.transmissionbt.com/" -SRC_URI="http://download.transmissionbt.com/${MY_PN}/files/${MY_P}.tar.xz" - -LICENSE="GPL-2 MIT" -SLOT="0" -IUSE="" - -# only common dependencies plus blockers -RDEPEND="" -_transmission_is base || RDEPEND+="~net-p2p/transmission-base-${PV}" -if ! _transmission_is ""; then - RDEPEND+=" - >=dev-libs/libevent-2.0.10 - dev-libs/openssl:0 - >=net-libs/miniupnpc-1.6.20120509 - >=net-misc/curl-7.16.3[ssl] - net-libs/libnatpmp - sys-libs/zlib" -fi - -DEPEND="${RDEPEND}" -if _transmission_is base; then - RDEPEND+=" !<net-p2p/transmission-gtk-${PV} - !<net-p2p/transmission-qt4-${PV} - !<net-p2p/transmission-daemon-${PV} - !<net-p2p/transmission-cli-${PV}" -fi -if ! _transmission_is ""; then - DEPEND+=" dev-util/intltool - virtual/pkgconfig - sys-devel/gettext - virtual/os-headers" -fi - -S="${WORKDIR}/${MY_P}" -_transmission_is "" && S="${WORKDIR}" - -transmission-2.52_pkg_setup() { - if _transmission_is base; then - enewgroup transmission - enewuser transmission -1 -1 -1 transmission - fi -} - -transmission-2.52_src_unpack() { - if [[ ${PV} == *9999* ]]; then - subversion_src_unpack - else - default - fi -} - -transmission-2.52_src_prepare() { - _transmission_is "" && return - - if [[ ${PV} == *9999* ]]; then - subversion_src_prepare - ./update-version-h.sh - fi - - sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die - - if ! use_if_iuse ayatana; then - sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die - fi - - # http://trac.transmissionbt.com/ticket/4324 - sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' lib${MY_PN}/Makefile.am || die - - # [eclass] patch for FreeBSD skipped - - eautoreconf - - if _transmission_is qt4; then - cat <<-EOF > "${T}"/${MY_PN}-magnet.protocol - [Protocol] - exec=transmission-qt '%u' - protocol=magnet - Icon=transmission - input=none - output=none - helper=true - listing= - reading=false - writing=false - makedir=false - deleting=false - EOF - fi - - if ! _transmission_is base; then - local sedcmd="s:\$(top_builddir)/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - find . -name Makefile.in -exec sed -i -e "${sedcmd}" {} \; || die - sed -i -e '/libtransmission \\/d' Makefile.in || die - if _transmission_is qt4; then - sedcmd="s:\$\${TRANSMISSION_TOP}/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - sed -i -e "${sedcmd}" qt/qtr.pro || die - fi - fi -} - -transmission-2.52_src_configure() { - _transmission_is "" && return - - local econfargs=( - --enable-external-natpmp - ) - - if _transmission_is base; then - export ac_cv_header_xfs_xfs_h=$(usex xfs) - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - $(use_enable lightweight) - ) - elif _transmission_is cli; then - econfargs+=( - --enable-cli - --disable-daemon - --without-gtk - ) - elif _transmission_is daemon; then - econfargs+=( - --disable-cli - --enable-daemon - --without-gtk - ) - elif _transmission_is gtk; then - econfargs+=( - --disable-cli - --disable-daemon - --with-gtk - ) - elif _transmission_is qt4; then - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - ) - else - die "Something is wrong... (E_TRANSM_TAIL=$E_TRANSM_TAIL)" - fi - - econf "${econfargs[@]}" - if _transmission_is qt4; then - pushd qt >/dev/null - eqmake4 qtr.pro - popd >/dev/null - fi -} - -transmission-2.52_src_compile() { - _transmission_is "" && return - - emake - if _transmission_is qt4; then - pushd qt >/dev/null - emake - - local l - for l in ${LANGS}; do - if use linguas_${l}; then - lrelease translations/${MY_PN}_${l}.ts - fi - done - popd >/dev/null - fi -} - - -# Note: not providing src_install. Too many differences and too much code -# which would only clutter this pretty eclass. - -transmission-2.52_pkg_preinst() { - _transmission_is gtk && gnome2_icon_savelist -} - -transmission-2.52_pkg_postinst() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update - - if _transmission_is daemon; then - elog "If you use ${MY_PN}-daemon, please, set 'rpc-username' and" - elog "'rpc-password' (in plain text, ${MY_PN}-daemon will hash it on" - elog "start) in settings.json file located at /var/${MY_PN}/config or" - elog "any other appropriate config directory." - fi - - if _transmission_is gtk; then - # in -gtk only? - elog - elog "To enable sound emerge media-libs/libcanberra and check that at least" - elog "some sound them is selected. For this go:" - elog "Gnome/system/preferences/sound themes tab and 'sound theme: default'" - elog - fi - - elog "Since µTP is enabled by default, ${MY_PN} needs large kernel buffers for" - elog "the UDP socket. You can append following lines into /etc/sysctl.conf:" - elog " net.core.rmem_max = 4194304" - elog " net.core.wmem_max = 1048576" - elog "and run sysctl -p" -} - -transmission-2.52_pkg_postrm() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update -} diff --git a/eclass/transmission-2.80.eclass b/eclass/transmission-2.80.eclass deleted file mode 100644 index afaf9a38..00000000 --- a/eclass/transmission-2.80.eclass +++ /dev/null @@ -1,262 +0,0 @@ -# Copyright 1999-2013 Sabayon -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# @ECLASS: transmission-2.xx.eclass -# @MAINTAINER: -# slawomir.nizio@sabayon.org -# @AUTHOR: -# Sławomir Nizio <slawomir.nizio@sabayon.org> -# @BLURB: eclass to ease managing of Sabayon split net-p2p/transmission -# @DESCRIPTION: -# This eclass is to ease managing of split net-p2p/transmission for Sabayon. -# Its name contains a version that corresponds to net-p2p/transmission one, -# because the eclass will change often when needed to follow changes -# in Gentoo ebuild. - -# @ECLASS-VARIABLE: TRANSMISSION_PATCHES -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array that contains patches to apply just before eautoreconf. - -# @ECLASS-VARIABLE: TRANSMISSION_ECLASS_VERSION_OK -# @DESCRIPTION: -# Set this to x.y if you want to use transmission-x.y.eclass from ebuild -# with ${PV} different than x.y. This is to catch bugs. -: ${TRANSMISSION_ECLASS_VERSION_OK:=${PV}} - -# @ECLASS-VARIABLE: E_TRANSM_TAIL -# @INTERNAL -# @DESCRIPTION: -# "Tail" of package name. Can take value gtk, qt4, etc. or can be empty. -E_TRANSM_TAIL=${PN#transmission} -E_TRANSM_TAIL=${E_TRANSM_TAIL#-} - -# @FUNCTION: _transmission_is -# @INTERNAL -# @DESCRIPTION: -# Function used to check which variant of Transmission are we working on. -# Argument should be one of these: (none), gtk, qt4, daemon, cli, base. -# If argument is empty or omitted, true value means that it is -# net-p2p/transmission (metapackage). -_transmission_is() { - local what=$1 - [[ ${what} = "${E_TRANSM_TAIL}" ]] -} - -MY_ECLASSES="" -_transmission_is gtk && MY_ECLASSES+="fdo-mime gnome2-utils" -_transmission_is qt4 && MY_ECLASSES+="fdo-mime qt4-r2" -_transmission_is "" || MY_ECLASSES+=" autotools" -_transmission_is base && MY_ECLASSES+=" user" - -inherit eutils multilib ${MY_ECLASSES} - -unset MY_ECLASSES - -case ${EAPI:-0} in - 4|5) EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile \ - pkg_preinst pkg_postinst pkg_postrm ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -[[ ${PN} = transmission* ]] || \ - die "This eclass can only be used with net-p2p/transmission* ebuilds!" -# Bug catcher! -if ! [[ ${PV} = *9999* ]] && [[ ${TRANSMISSION_ECLASS_VERSION_OK} != ${ECLASS#*-} ]]; then - eerror "used eclass ${ECLASS}" - eerror "TRANSMISSION_ECLASS_VERSION_OK=${TRANSMISSION_ECLASS_VERSION_OK}" - die "ebuild version ${PV} doesn't match with the eclass" -fi - -MY_PN="transmission" -MY_P="${MY_PN}-${PV}" - -DESCRIPTION="A Fast, Easy and Free BitTorrent client" -HOMEPAGE="http://www.transmissionbt.com/" -SRC_URI="http://download.transmissionbt.com/${MY_PN}/files/${MY_P}.tar.xz" - -LICENSE="GPL-2 MIT" -SLOT="0" -IUSE="" - -# only common dependencies plus blockers -RDEPEND="" -_transmission_is base || RDEPEND+="~net-p2p/transmission-base-${PV}" -if ! _transmission_is ""; then - RDEPEND+=" - >=dev-libs/libevent-2.0.10:= - dev-libs/openssl:0= - net-libs/libnatpmp:= - >=net-libs/miniupnpc-1.6.20120509:= - >=net-misc/curl-7.16.3:=[ssl] - sys-libs/zlib:=" -fi - -DEPEND="${RDEPEND}" -if _transmission_is base; then - RDEPEND+=" !<net-p2p/transmission-gtk-${PV} - !<net-p2p/transmission-qt4-${PV} - !<net-p2p/transmission-daemon-${PV} - !<net-p2p/transmission-cli-${PV}" -fi -if ! _transmission_is ""; then - DEPEND+=" dev-libs/glib:2 - dev-util/intltool - virtual/pkgconfig - sys-devel/gettext - virtual/os-headers" -fi - -S="${WORKDIR}/${MY_P}" -_transmission_is "" && S="${WORKDIR}" - -transmission-2.80_pkg_setup() { - if _transmission_is base; then - enewgroup transmission - enewuser transmission -1 -1 -1 transmission - fi -} - -transmission-2.80_src_prepare() { - _transmission_is "" && return - - sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die - - if ! use_if_iuse ayatana; then - sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die - fi - - # http://trac.transmissionbt.com/ticket/4324 - sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' lib${MY_PN}/Makefile.am || die - - if [[ ${#TRANSMISSION_PATCHES[@]} -gt 0 ]]; then - epatch "${TRANSMISSION_PATCHES[@]}" - fi - - eautoreconf - - if ! _transmission_is base; then - local sedcmd="s:\$(top_builddir)/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - find . -name Makefile.in -exec sed -i -e "${sedcmd}" {} \; || die - sed -i -e '/libtransmission \\/d' Makefile.in || die - if _transmission_is qt4; then - sedcmd="s:\$\${TRANSMISSION_TOP}/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - sed -i -e "${sedcmd}" qt/qtr.pro || die - fi - fi -} - -transmission-2.80_src_configure() { - _transmission_is "" && return - - local econfargs=( - --enable-external-natpmp - ) - - if _transmission_is base; then - export ac_cv_header_xfs_xfs_h=$(usex xfs) - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - $(use_enable lightweight) - ) - elif _transmission_is cli; then - econfargs+=( - --enable-cli - --disable-daemon - --without-gtk - ) - elif _transmission_is daemon; then - econfargs+=( - --disable-cli - --enable-daemon - --without-gtk - $(use_with systemd systemd-daemon) - ) - elif _transmission_is gtk; then - econfargs+=( - --disable-cli - --disable-daemon - --with-gtk - ) - elif _transmission_is qt4; then - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - ) - else - die "Something is wrong... (E_TRANSM_TAIL=$E_TRANSM_TAIL)" - fi - - econf "${econfargs[@]}" - if _transmission_is qt4; then - pushd qt >/dev/null - eqmake4 qtr.pro - popd >/dev/null - fi -} - -transmission-2.80_src_compile() { - _transmission_is "" && return - - emake - if _transmission_is qt4; then - pushd qt >/dev/null - emake - lrelease translations/*.ts - popd >/dev/null - fi -} - - -# Note: not providing src_install. Too many differences and too much code -# which would only clutter this pretty eclass. - -transmission-2.80_pkg_preinst() { - _transmission_is gtk && gnome2_icon_savelist -} - -transmission-2.80_pkg_postinst() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update - - if _transmission_is daemon; then - elog "If you use ${MY_PN}-daemon, please, set 'rpc-username' and" - elog "'rpc-password' (in plain text, ${MY_PN}-daemon will hash it on" - elog "start) in settings.json file located at /var/${MY_PN}/config or" - elog "any other appropriate config directory." - fi - - if _transmission_is gtk; then - # in -gtk only? - elog - elog "To enable sound emerge media-libs/libcanberra and check that at least" - elog "some sound them is selected. For this go:" - elog "Gnome/system/preferences/sound themes tab and 'sound theme: default'" - elog - fi - - if _transmission_is base; then - elog "Since µTP is enabled by default, ${MY_PN} needs large kernel buffers for" - elog "the UDP socket. You can append following lines into /etc/sysctl.conf:" - elog " net.core.rmem_max = 4194304" - elog " net.core.wmem_max = 1048576" - elog "and run sysctl -p" - fi -} - -transmission-2.80_pkg_postrm() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update -} diff --git a/eclass/transmission-2.82.eclass b/eclass/transmission-2.82.eclass deleted file mode 100644 index f9808b04..00000000 --- a/eclass/transmission-2.82.eclass +++ /dev/null @@ -1,284 +0,0 @@ -# Copyright 1999-2013 Sabayon -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# @ECLASS: transmission-2.xx.eclass -# @MAINTAINER: -# slawomir.nizio@sabayon.org -# @AUTHOR: -# Sławomir Nizio <slawomir.nizio@sabayon.org> -# @BLURB: eclass to ease managing of Sabayon split net-p2p/transmission -# @DESCRIPTION: -# This eclass is to ease managing of split net-p2p/transmission for Sabayon. -# Its name contains a version that corresponds to net-p2p/transmission one, -# because the eclass will change often when needed to follow changes -# in Gentoo ebuild. -# Always call phase functions using their public names, such like: -# transmission-2.82_src_configure, and never _transmission_src_configure. - -# @ECLASS-VARIABLE: TRANSMISSION_PATCHES -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array that contains patches to apply just before eautoreconf. - -# @ECLASS-VARIABLE: TRANSMISSION_ECLASS_VERSION_OK -# @DESCRIPTION: -# Set this to x.y if you want to use transmission-x.y.eclass from ebuild -# with ${PV} different than x.y. This is to catch bugs. -: ${TRANSMISSION_ECLASS_VERSION_OK:=${PV}} - -# @ECLASS-VARIABLE: E_TRANSM_TAIL -# @INTERNAL -# @DESCRIPTION: -# "Tail" of package name. Can take value gtk, qt4, etc. or can be empty. -E_TRANSM_TAIL=${PN#transmission} -E_TRANSM_TAIL=${E_TRANSM_TAIL#-} - -# @FUNCTION: _transmission_is -# @INTERNAL -# @DESCRIPTION: -# Function used to check which variant of Transmission are we working on. -# Argument should be one of these: (none), gtk, qt4, daemon, cli, base. -# If argument is empty or omitted, true value means that it is -# net-p2p/transmission (metapackage). -_transmission_is() { - local what=$1 - [[ ${what} = "${E_TRANSM_TAIL}" ]] -} - -# @FUNCTION: _transmission_eclass_setup_functions -# @INTERNAL -# @DESCRIPTION: -# Function to setup functions. The eval uses strictly controlled variables, -# so it's OK. -_transmission_eclass_setup_functions() { - local v=2.82 - local func - for func in pkg_setup src_prepare src_configure src_compile \ - pkg_preinst pkg_postinst pkg_postrm; do - eval "transmission-${v}_${func}() { _transmission_${func}; }" - done -} - -_transmission_eclass_setup_functions - -MY_ECLASSES="" -_transmission_is gtk && MY_ECLASSES+="fdo-mime gnome2-utils" -_transmission_is qt4 && MY_ECLASSES+="fdo-mime qt4-r2" -_transmission_is "" || MY_ECLASSES+=" autotools" -_transmission_is base && MY_ECLASSES+=" user" - -inherit eutils multilib ${MY_ECLASSES} - -unset MY_ECLASSES - -case ${EAPI:-0} in - 4|5) EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile \ - pkg_preinst pkg_postinst pkg_postrm ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -[[ ${PN} = transmission* ]] || \ - die "This eclass can only be used with net-p2p/transmission* ebuilds!" -# Bug catcher! -if ! [[ ${PV} = *9999* ]] && [[ ${TRANSMISSION_ECLASS_VERSION_OK} != ${ECLASS#*-} ]]; then - eerror "used eclass ${ECLASS}" - eerror "TRANSMISSION_ECLASS_VERSION_OK=${TRANSMISSION_ECLASS_VERSION_OK}" - die "ebuild version ${PV} doesn't match with the eclass" -fi - -MY_PN="transmission" -MY_P="${MY_PN}-${PV}" - -DESCRIPTION="A Fast, Easy and Free BitTorrent client" -HOMEPAGE="http://www.transmissionbt.com/" -SRC_URI="http://download.transmissionbt.com/${MY_PN}/files/${MY_P}.tar.xz" - -LICENSE="GPL-2 MIT" -SLOT="0" -IUSE="" - -# only common dependencies plus blockers -RDEPEND="" -_transmission_is base || RDEPEND+="~net-p2p/transmission-base-${PV}" -if ! _transmission_is ""; then - RDEPEND+=" - >=dev-libs/libevent-2.0.10:= - dev-libs/openssl:0= - net-libs/libnatpmp:= - >=net-libs/miniupnpc-1.6.20120509:= - >=net-misc/curl-7.16.3:=[ssl] - sys-libs/zlib:=" -fi - -DEPEND="${RDEPEND}" -if _transmission_is base; then - RDEPEND+=" !<net-p2p/transmission-gtk-${PV} - !<net-p2p/transmission-qt4-${PV} - !<net-p2p/transmission-daemon-${PV} - !<net-p2p/transmission-cli-${PV}" -fi -if ! _transmission_is ""; then - DEPEND+=" dev-libs/glib:2 - dev-util/intltool - virtual/pkgconfig - sys-devel/gettext - virtual/os-headers" -fi - -S="${WORKDIR}/${MY_P}" -_transmission_is "" && S="${WORKDIR}" - -_transmission_pkg_setup() { - if _transmission_is base; then - enewgroup transmission - enewuser transmission -1 -1 -1 transmission - fi -} - -_transmission_src_prepare() { - _transmission_is "" && return - - sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die - - if ! use_if_iuse ayatana; then - # Trick to avoid automagic dependency - sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die - fi - - # Pass our configuration dir to systemd unit file - sed -i '/ExecStart/ s|$| -g /var/lib/transmission/config|' daemon/transmission-daemon.service || die - - # http://trac.transmissionbt.com/ticket/4324 - sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' lib${MY_PN}/Makefile.am || die - - if [[ ${#TRANSMISSION_PATCHES[@]} -gt 0 ]]; then - epatch "${TRANSMISSION_PATCHES[@]}" - fi - - eautoreconf - - if ! _transmission_is base; then - local sedcmd="s:\$(top_builddir)/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - find . -name Makefile.in -exec sed -i -e "${sedcmd}" {} \; || die - sed -i -e '/libtransmission \\/d' Makefile.in || die - if _transmission_is qt4; then - sedcmd="s:\$\${TRANSMISSION_TOP}/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - sed -i -e "${sedcmd}" qt/qtr.pro || die - fi - fi -} - -_transmission_src_configure() { - _transmission_is "" && return - - local econfargs=( - --enable-external-natpmp - ) - - if _transmission_is base; then - export ac_cv_header_xfs_xfs_h=$(usex xfs) - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - $(use_enable lightweight) - ) - elif _transmission_is cli; then - econfargs+=( - --enable-cli - --disable-daemon - --without-gtk - ) - elif _transmission_is daemon; then - econfargs+=( - --disable-cli - --enable-daemon - --without-gtk - $(use_with systemd systemd-daemon) - ) - elif _transmission_is gtk; then - econfargs+=( - --disable-cli - --disable-daemon - --with-gtk - ) - elif _transmission_is qt4; then - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - ) - else - die "Something is wrong... (E_TRANSM_TAIL=$E_TRANSM_TAIL)" - fi - - econf "${econfargs[@]}" - if _transmission_is qt4; then - pushd qt >/dev/null - eqmake4 qtr.pro - popd >/dev/null - fi -} - -_transmission_src_compile() { - _transmission_is "" && return - - emake - if _transmission_is qt4; then - pushd qt >/dev/null - emake - lrelease translations/*.ts - popd >/dev/null - fi -} - - -# Note: not providing src_install. Too many differences and too much code -# which would only clutter this pretty eclass. - -_transmission_pkg_preinst() { - _transmission_is gtk && gnome2_icon_savelist -} - -_transmission_pkg_postinst() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update - - if _transmission_is daemon; then - elog "If you use ${MY_PN}-daemon, please, set 'rpc-username' and" - elog "'rpc-password' (in plain text, ${MY_PN}-daemon will hash it on" - elog "start) in settings.json file located at /var/${MY_PN}/config or" - elog "any other appropriate config directory." - fi - - if _transmission_is gtk; then - # in -gtk only? - elog - elog "To enable sound emerge media-libs/libcanberra and check that at least" - elog "some sound them is selected. For this go:" - elog "Gnome/system/preferences/sound themes tab and 'sound theme: default'" - elog - fi - - if _transmission_is base; then - elog "Since µTP is enabled by default, ${MY_PN} needs large kernel buffers for" - elog "the UDP socket. You can append following lines into /etc/sysctl.conf:" - elog " net.core.rmem_max = 4194304" - elog " net.core.wmem_max = 1048576" - elog "and run sysctl -p" - fi -} - -_transmission_pkg_postrm() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update -} diff --git a/eclass/transmission-2.83.eclass b/eclass/transmission-2.83.eclass deleted file mode 100644 index 075a5025..00000000 --- a/eclass/transmission-2.83.eclass +++ /dev/null @@ -1,287 +0,0 @@ -# Copyright 1999-2013 Sabayon -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# @ECLASS: transmission-2.xx.eclass -# @MAINTAINER: -# slawomir.nizio@sabayon.org -# @AUTHOR: -# Sławomir Nizio <slawomir.nizio@sabayon.org> -# @BLURB: eclass to ease managing of Sabayon split net-p2p/transmission -# @DESCRIPTION: -# This eclass is to ease managing of split net-p2p/transmission for Sabayon. -# Its name contains a version that corresponds to net-p2p/transmission one, -# because the eclass will change often when needed to follow changes -# in Gentoo ebuild. -# Always call phase functions using their public names, such like: -# transmission-2.83_src_configure, and never _transmission_src_configure. - -# @ECLASS-VARIABLE: TRANSMISSION_PATCHES -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array that contains patches to apply just before eautoreconf. - -# @ECLASS-VARIABLE: TRANSMISSION_ECLASS_VERSION_OK -# @DESCRIPTION: -# Set this to x.y if you want to use transmission-x.y.eclass from ebuild -# with ${PV} different than x.y. This is to catch bugs. -: ${TRANSMISSION_ECLASS_VERSION_OK:=${PV}} - -# @ECLASS-VARIABLE: E_TRANSM_TAIL -# @INTERNAL -# @DESCRIPTION: -# "Tail" of package name. Can take value gtk, qt4, etc. or can be empty. -E_TRANSM_TAIL=${PN#transmission} -E_TRANSM_TAIL=${E_TRANSM_TAIL#-} - -# @FUNCTION: _transmission_is -# @INTERNAL -# @DESCRIPTION: -# Function used to check which variant of Transmission are we working on. -# Argument should be one of these: (none), gtk, qt4, daemon, cli, base. -# If argument is empty or omitted, true value means that it is -# net-p2p/transmission (metapackage). -_transmission_is() { - local what=$1 - [[ ${what} = "${E_TRANSM_TAIL}" ]] -} - -# @FUNCTION: _transmission_eclass_setup_functions -# @INTERNAL -# @DESCRIPTION: -# Function to setup functions. The eval uses strictly controlled variables, -# so it's OK. -_transmission_eclass_setup_functions() { - local v=2.83 - local func - for func in pkg_setup src_prepare src_configure src_compile \ - pkg_preinst pkg_postinst pkg_postrm; do - eval "transmission-${v}_${func}() { _transmission_${func}; }" - done -} - -_transmission_eclass_setup_functions - -MY_ECLASSES="" -_transmission_is gtk && MY_ECLASSES+="fdo-mime gnome2-utils" -_transmission_is qt4 && MY_ECLASSES+="fdo-mime qt4-r2" -_transmission_is "" || MY_ECLASSES+=" autotools" -_transmission_is base && MY_ECLASSES+=" user" - -inherit eutils multilib ${MY_ECLASSES} - -unset MY_ECLASSES - -case ${EAPI:-0} in - 4|5) EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile \ - pkg_preinst pkg_postinst pkg_postrm ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -[[ ${PN} = transmission* ]] || \ - die "This eclass can only be used with net-p2p/transmission* ebuilds!" -# Bug catcher! -if ! [[ ${PV} = *9999* ]] && [[ ${TRANSMISSION_ECLASS_VERSION_OK} != ${ECLASS#*-} ]]; then - eerror "used eclass ${ECLASS}" - eerror "TRANSMISSION_ECLASS_VERSION_OK=${TRANSMISSION_ECLASS_VERSION_OK}" - die "ebuild version ${PV} doesn't match with the eclass" -fi - -MY_PN="transmission" -MY_P="${MY_PN}-${PV}" - -DESCRIPTION="A Fast, Easy and Free BitTorrent client" -HOMEPAGE="http://www.transmissionbt.com/" -SRC_URI="http://download.transmissionbt.com/${MY_PN}/files/${MY_P}.tar.xz" - -LICENSE="GPL-2 MIT" -SLOT="0" -IUSE="" - -# only common dependencies plus blockers -RDEPEND="" -_transmission_is base || RDEPEND+="~net-p2p/transmission-base-${PV}" -if ! _transmission_is ""; then - RDEPEND+=" - >=dev-libs/libevent-2.0.10:= - dev-libs/openssl:0= - net-libs/libnatpmp:= - >=net-libs/miniupnpc-1.7:= - >=net-misc/curl-7.16.3:=[ssl] - sys-libs/zlib:=" -fi - -DEPEND="${RDEPEND}" -if _transmission_is base; then - RDEPEND+=" !<net-p2p/transmission-gtk-${PV} - !<net-p2p/transmission-qt4-${PV} - !<net-p2p/transmission-daemon-${PV} - !<net-p2p/transmission-cli-${PV}" -fi -if ! _transmission_is ""; then - DEPEND+=" >=dev-libs/glib-2.32 - dev-util/intltool - virtual/pkgconfig - sys-devel/gettext - virtual/os-headers" -fi - -S="${WORKDIR}/${MY_P}" -_transmission_is "" && S="${WORKDIR}" - -_transmission_pkg_setup() { - if _transmission_is base; then - enewgroup transmission - enewuser transmission -1 -1 -1 transmission - fi -} - -_transmission_src_prepare() { - _transmission_is "" && return - - sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die - - if ! use_if_iuse ayatana; then - # Trick to avoid automagic dependency - sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die - fi - - # Pass our configuration dir to systemd unit file - sed -i '/ExecStart/ s|$| -g /var/lib/transmission/config|' daemon/${MY_PN}-daemon.service || die - - # http://trac.transmissionbt.com/ticket/4324 - sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' lib${MY_PN}/Makefile.am || die - - if [[ ${#TRANSMISSION_PATCHES[@]} -gt 0 ]]; then - epatch "${TRANSMISSION_PATCHES[@]}" - fi - - # http://trac.transmissionbt.com/ticket/5700 - sed -i -e '1iQMAKE_CXXFLAGS += -std=c++11' qt/qtr.pro || die - - eautoreconf - - if ! _transmission_is base; then - local sedcmd="s:\$(top_builddir)/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - find . -name Makefile.in -exec sed -i -e "${sedcmd}" {} \; || die - sed -i -e '/libtransmission \\/d' Makefile.in || die - if _transmission_is qt4; then - sedcmd="s:\$\${TRANSMISSION_TOP}/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - sed -i -e "${sedcmd}" qt/qtr.pro || die - fi - fi -} - -_transmission_src_configure() { - _transmission_is "" && return - - local econfargs=( - --enable-external-natpmp - ) - - if _transmission_is base; then - export ac_cv_header_xfs_xfs_h=$(usex xfs) - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - $(use_enable lightweight) - ) - elif _transmission_is cli; then - econfargs+=( - --enable-cli - --disable-daemon - --without-gtk - ) - elif _transmission_is daemon; then - econfargs+=( - --disable-cli - --enable-daemon - --without-gtk - $(use_with systemd systemd-daemon) - ) - elif _transmission_is gtk; then - econfargs+=( - --disable-cli - --disable-daemon - --with-gtk - ) - elif _transmission_is qt4; then - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - ) - else - die "Something is wrong... (E_TRANSM_TAIL=$E_TRANSM_TAIL)" - fi - - econf "${econfargs[@]}" - if _transmission_is qt4; then - pushd qt >/dev/null - eqmake4 qtr.pro - popd >/dev/null - fi -} - -_transmission_src_compile() { - _transmission_is "" && return - - emake - if _transmission_is qt4; then - pushd qt >/dev/null - emake - lrelease translations/*.ts - popd >/dev/null - fi -} - - -# Note: not providing src_install. Too many differences and too much code -# which would only clutter this pretty eclass. - -_transmission_pkg_preinst() { - _transmission_is gtk && gnome2_icon_savelist -} - -_transmission_pkg_postinst() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update - - if _transmission_is daemon; then - elog "If you use ${MY_PN}-daemon, please, set 'rpc-username' and" - elog "'rpc-password' (in plain text, ${MY_PN}-daemon will hash it on" - elog "start) in settings.json file located at /var/${MY_PN}/config or" - elog "any other appropriate config directory." - fi - - if _transmission_is gtk; then - # in -gtk only? - elog - elog "To enable sound emerge media-libs/libcanberra and check that at least" - elog "some sound them is selected. For this go:" - elog "Gnome/system/preferences/sound themes tab and 'sound theme: default'" - elog - fi - - if _transmission_is base; then - elog "Since µTP is enabled by default, ${MY_PN} needs large kernel buffers for" - elog "the UDP socket. You can append following lines into /etc/sysctl.conf:" - elog " net.core.rmem_max = 4194304" - elog " net.core.wmem_max = 1048576" - elog "and run sysctl -p" - fi -} - -_transmission_pkg_postrm() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update -} diff --git a/eclass/transmission-2.84.eclass b/eclass/transmission-2.84.eclass deleted file mode 100644 index 94f21620..00000000 --- a/eclass/transmission-2.84.eclass +++ /dev/null @@ -1,291 +0,0 @@ -# Copyright 1999-2014 Sabayon -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# @ECLASS: transmission-2.xx.eclass -# @MAINTAINER: -# slawomir.nizio@sabayon.org -# @AUTHOR: -# Sławomir Nizio <slawomir.nizio@sabayon.org> -# @BLURB: eclass to ease managing of Sabayon split net-p2p/transmission -# @DESCRIPTION: -# This eclass is to ease managing of split net-p2p/transmission for Sabayon. -# Its name contains a version that corresponds to net-p2p/transmission one, -# because the eclass will change often when needed to follow changes -# in Gentoo ebuild. -# Always call phase functions using their public names, such like: -# transmission-2.83_src_configure, and never _transmission_src_configure. - -# @ECLASS-VARIABLE: TRANSMISSION_PATCHES -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array that contains patches to apply just before eautoreconf. - -# @ECLASS-VARIABLE: TRANSMISSION_ECLASS_VERSION_OK -# @DESCRIPTION: -# Set this to x.y if you want to use transmission-x.y.eclass from ebuild -# with ${PV} different than x.y. This is to catch bugs. -: ${TRANSMISSION_ECLASS_VERSION_OK:=${PV}} - -# @ECLASS-VARIABLE: E_TRANSM_TAIL -# @INTERNAL -# @DESCRIPTION: -# "Tail" of package name. Can take value gtk, qt4, etc. or can be empty. -E_TRANSM_TAIL=${PN#transmission} -E_TRANSM_TAIL=${E_TRANSM_TAIL#-} - -# @FUNCTION: _transmission_is -# @INTERNAL -# @DESCRIPTION: -# Function used to check which variant of Transmission are we working on. -# Argument should be one of these: (none), gtk, qt4, daemon, cli, base. -# If argument is empty or omitted, true value means that it is -# net-p2p/transmission (metapackage). -_transmission_is() { - local what=$1 - [[ ${what} = "${E_TRANSM_TAIL}" ]] -} - -# @FUNCTION: _transmission_eclass_setup_functions -# @INTERNAL -# @DESCRIPTION: -# Function to setup functions. The eval uses strictly controlled variables, -# so it's OK. -_transmission_eclass_setup_functions() { - local v=2.84 - local func - for func in pkg_setup src_prepare src_configure src_compile \ - pkg_preinst pkg_postinst pkg_postrm; do - eval "transmission-${v}_${func}() { _transmission_${func}; }" - done -} - -_transmission_eclass_setup_functions - -MY_ECLASSES="" -_transmission_is gtk && MY_ECLASSES+="fdo-mime gnome2-utils" -_transmission_is qt4 && MY_ECLASSES+="fdo-mime qt4-r2" -_transmission_is "" || MY_ECLASSES+=" autotools" -_transmission_is base && MY_ECLASSES+=" user" - -inherit eutils multilib ${MY_ECLASSES} - -unset MY_ECLASSES - -case ${EAPI:-0} in - 4|5) EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile \ - pkg_preinst pkg_postinst pkg_postrm ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -[[ ${PN} = transmission* ]] || \ - die "This eclass can only be used with net-p2p/transmission* ebuilds!" -# Bug catcher! -if ! [[ ${PV} = *9999* ]] && [[ ${TRANSMISSION_ECLASS_VERSION_OK} != ${ECLASS#*-} ]]; then - eerror "used eclass ${ECLASS}" - eerror "TRANSMISSION_ECLASS_VERSION_OK=${TRANSMISSION_ECLASS_VERSION_OK}" - die "ebuild version ${PV} doesn't match with the eclass" -fi - -MY_PN="transmission" -MY_P="${MY_PN}-${PV}" - -DESCRIPTION="A Fast, Easy and Free BitTorrent client" -HOMEPAGE="http://www.transmissionbt.com/" -SRC_URI="http://download.transmissionbt.com/${MY_PN}/files/${MY_P}.tar.xz" - -# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest -# transmission in licenses/ is for mentioning OpenSSL linking exception -# MIT is in several libtransmission/ headers -LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT" -SLOT="0" -IUSE="" - -# only common dependencies plus blockers -RDEPEND="" -_transmission_is base || RDEPEND+="~net-p2p/transmission-base-${PV}" -if ! _transmission_is ""; then - RDEPEND+=" - >=dev-libs/libevent-2.0.10:= - dev-libs/openssl:0= - net-libs/libnatpmp:= - >=net-libs/miniupnpc-1.7:= - >=net-misc/curl-7.16.3:=[ssl] - sys-libs/zlib:=" -fi - -DEPEND="${RDEPEND}" -if _transmission_is base; then - RDEPEND+=" !<net-p2p/transmission-gtk-${PV} - !<net-p2p/transmission-qt4-${PV} - !<net-p2p/transmission-daemon-${PV} - !<net-p2p/transmission-cli-${PV}" -fi -if ! _transmission_is ""; then - DEPEND+=" >=dev-libs/glib-2.32 - dev-util/intltool - virtual/pkgconfig - sys-devel/gettext - virtual/os-headers" -fi - -S="${WORKDIR}/${MY_P}" -_transmission_is "" && S="${WORKDIR}" - -_transmission_pkg_setup() { - if _transmission_is base; then - enewgroup transmission - enewuser transmission -1 -1 -1 transmission - fi -} - -_transmission_src_prepare() { - _transmission_is "" && return - - sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die - - if ! use_if_iuse ayatana; then - # Trick to avoid automagic dependency - sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die - fi - - # Pass our configuration dir to systemd unit file - sed -i '/ExecStart/ s|$| -g /var/lib/transmission/config|' daemon/${MY_PN}-daemon.service || die - - # http://trac.transmissionbt.com/ticket/4324 - sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' lib${MY_PN}/Makefile.am || die - - if [[ ${#TRANSMISSION_PATCHES[@]} -gt 0 ]]; then - epatch "${TRANSMISSION_PATCHES[@]}" - fi - - # http://trac.transmissionbt.com/ticket/5700 - sed -i -e '1iQMAKE_CXXFLAGS += -std=c++11' qt/qtr.pro || die - - epatch_user - eautoreconf - - if ! _transmission_is base; then - local sedcmd="s:\$(top_builddir)/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - find . -name Makefile.in -exec sed -i -e "${sedcmd}" {} \; || die - sed -i -e '/libtransmission \\/d' Makefile.in || die - if _transmission_is qt4; then - sedcmd="s:\$\${TRANSMISSION_TOP}/libtransmission/libtransmission.a:" - sedcmd+="${EROOT}usr/$(get_libdir)/libtransmission.a:" - sed -i -e "${sedcmd}" qt/qtr.pro || die - fi - fi -} - -_transmission_src_configure() { - _transmission_is "" && return - - local econfargs=( - --enable-external-natpmp - ) - - if _transmission_is base; then - export ac_cv_header_xfs_xfs_h=$(usex xfs) - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - $(use_enable lightweight) - ) - elif _transmission_is cli; then - econfargs+=( - --enable-cli - --disable-daemon - --without-gtk - ) - elif _transmission_is daemon; then - econfargs+=( - --disable-cli - --enable-daemon - --without-gtk - $(use_with systemd systemd-daemon) - ) - elif _transmission_is gtk; then - econfargs+=( - --disable-cli - --disable-daemon - --with-gtk - ) - elif _transmission_is qt4; then - econfargs+=( - --disable-cli - --disable-daemon - --without-gtk - ) - else - die "Something is wrong... (E_TRANSM_TAIL=$E_TRANSM_TAIL)" - fi - - econf "${econfargs[@]}" - if _transmission_is qt4; then - pushd qt >/dev/null - eqmake4 qtr.pro - popd >/dev/null - fi -} - -_transmission_src_compile() { - _transmission_is "" && return - - emake - if _transmission_is qt4; then - pushd qt >/dev/null - emake - lrelease translations/*.ts - popd >/dev/null - fi -} - - -# Note: not providing src_install. Too many differences and too much code -# which would only clutter this pretty eclass. - -_transmission_pkg_preinst() { - _transmission_is gtk && gnome2_icon_savelist -} - -_transmission_pkg_postinst() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update - - if _transmission_is daemon; then - elog "If you use ${MY_PN}-daemon, please, set 'rpc-username' and" - elog "'rpc-password' (in plain text, ${MY_PN}-daemon will hash it on" - elog "start) in settings.json file located at /var/${MY_PN}/config or" - elog "any other appropriate config directory." - fi - - if _transmission_is gtk; then - # in -gtk only? - elog - elog "To enable sound emerge media-libs/libcanberra and check that at least" - elog "some sound them is selected. For this go:" - elog "Gnome/system/preferences/sound themes tab and 'sound theme: default'" - elog - fi - - if _transmission_is base; then - elog "Since µTP is enabled by default, ${MY_PN} needs large kernel buffers for" - elog "the UDP socket. You can append following lines into /etc/sysctl.conf:" - elog " net.core.rmem_max = 4194304" - elog " net.core.wmem_max = 1048576" - elog "and run sysctl -p" - fi -} - -_transmission_pkg_postrm() { - if _transmission_is gtk || _transmission_is qt4; then - fdo-mime_desktop_database_update - fi - - _transmission_is gtk && gnome2_icon_cache_update -} |