From ca9627e70852f6b2e835660df870fe3ab405882d Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 1 Sep 2019 00:00:32 +0200 Subject: Initial import --- eclass/g-sorcery.eclass | 49 +++++++++++++++++ eclass/gs-pypi.eclass | 15 ++++++ eclass/qt3.eclass | 7 +++ eclass/rusxmms-plugin.eclass | 122 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 193 insertions(+) create mode 100644 eclass/g-sorcery.eclass create mode 100644 eclass/gs-pypi.eclass create mode 100644 eclass/qt3.eclass create mode 100644 eclass/rusxmms-plugin.eclass (limited to 'eclass') diff --git a/eclass/g-sorcery.eclass b/eclass/g-sorcery.eclass new file mode 100644 index 0000000..338dc83 --- /dev/null +++ b/eclass/g-sorcery.eclass @@ -0,0 +1,49 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ +# automatically generated by g-sorcery +# please do not edit this file +# +# Original Author: Jauhien Piatlicki +# Purpose: base routines for g-sorcery backends' eclasses +# +# Bugs to piatlicki@gmail.com +# +# @ECLASS: g-sorcery.eclass +# +# @ECLASS-VARIABLE: REPO_URI +# @DESCRIPTION: address of a repository with sources +# +# @ECLASS-VARIABLE: DIGEST_SOURCES +# @DESCRIPTION: whether manifest for sources exists +# +# @ECLASS-VARIABLE: SOURCEFILE +# @DESCRIPTION: source file name +# +# @ECLASS-VARIABLE: GSORCERY_STORE_DIR +# @DESCRIPTION: store location for downloaded sources +GSORCERY_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}" +# +# @ECLASS-VARIABLE: GSORCERY_FETCH_CMD +# @DESCRIPTION: fetch command +GSORCERY_FETCH_CMD="wget" + +EXPORT_FUNCTIONS src_unpack + +g-sorcery_fetch() { + addwrite "${GSORCERY_STORE_DIR}" + pushd "${GSORCERY_STORE_DIR}" >/dev/null || die "can't chdir to ${GSORCERY_STORE_DIR}" + if [[ ! -f "${SOURCEFILE}" ]]; then + $GSORCERY_FETCH_CMD ${REPO_URI}${SOURCEFILE} || die + fi + popd >/dev/null || die +} + +g-sorcery_src_unpack() { + if [[ x${DIGEST_SOURCES} = x ]]; then + g-sorcery_fetch + fi + + cp ${GSORCERY_STORE_DIR}/${SOURCEFILE} . || die + unpack ./${SOURCEFILE} +} \ No newline at end of file diff --git a/eclass/gs-pypi.eclass b/eclass/gs-pypi.eclass new file mode 100644 index 0000000..ddccd7c --- /dev/null +++ b/eclass/gs-pypi.eclass @@ -0,0 +1,15 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ +# automatically generated by gs-pypi +# please do not edit this file +# +# Original Author: Jauhien Piatlicki +# Purpose: support installation of python packages from PyPI repo +# +# Bugs to jauhien@gentoo.org +# +# @ECLASS: gs-pypi.eclass +# + +inherit distutils-r1 g-sorcery \ No newline at end of file diff --git a/eclass/qt3.eclass b/eclass/qt3.eclass new file mode 100644 index 0000000..20a6b00 --- /dev/null +++ b/eclass/qt3.eclass @@ -0,0 +1,7 @@ +# Copyright 2005-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/qt3.eclass,v 1.42 2010/03/26 19:40:38 yngwin Exp $ + +# @DEAD +# To be removed on 2012-03-26 +ewarn 'Please fix your ebuild to not inherit the deprecated qt3.eclass' diff --git a/eclass/rusxmms-plugin.eclass b/eclass/rusxmms-plugin.eclass new file mode 100644 index 0000000..cd16832 --- /dev/null +++ b/eclass/rusxmms-plugin.eclass @@ -0,0 +1,122 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: +# +# Jeremy Huddleston + +# Usage: +# This eclass is used to create ebuilds for xmms plugins which are contained +# within the main xmms tarball. Usage: + +# PATCH_VER: +# M4_VER: +# GENTOO_URI: +GENTOO_URI=${GENTOO_URI-"http://dside.dyndns.org/files/rusxmms"} +# Set this variable if you want to use a gentoo specific patchset. This adds +# ${GENTOO_URI}/xmms-${PV}-gentoo-patches-${PATCH_VER}.tar.bz2 to the SRC_URI + +# PLUGIN_PATH: +# Set this variable to the plugin location you want to build. +# Example: +# PLUGIN_PATH="Input/mpg123" + +# SONAME: +# Set this variable to the filename of the plugin that is copied over +# Example: +# SONAME="libmpg123.so" + +inherit eutils + +DESCRIPTION="Xmms Plugin: ${PN}" +HOMEPAGE="http://www.xmms.org" +LICENSE="GPL-2" + +SRC_URI="http://www.xmms.org/files/1.2.x/xmms-${PV}.tar.bz2 + http://dside.dyndns.org/files/rusxmms/RusXMMS2-csa${RUSXMMS_VER}.tar.bz2 + http://dside.dyndns.org/files/rusxmms/xmms-1.2.10-gentoo-m4-${M4_VER}.tar.bz2 + http://dside.dyndns.org/files/rusxmms/xmms-${PV}-gentoo-patches-${PATCH_VER}.tar.bz2" + +# Set S to something which exists +S="${WORKDIR}/xmms-${PV}" + +IUSE="${IUSE} rcc" +RDEPEND="${RDEPEND+${RDEPEND}}${RDEPEND-${DEPEND}}" +DEPEND="${DEPEND} + =sys-devel/automake-1.7* + sys-devel/autoconf + sys-devel/libtool + rcc? ( app-i18n/librcc )" + + +rusxmms-plugin_src_unpack() { + if ! has_version '>=media-sound/xmms-1.2.10-r13'; then + ewarn "You don't have >=media-sound/xmms-1.2.10-r13, so we are using the SDK in" + ewarn "this package rather that the one installed on your system. It is recommended" + ewarn "that you cancel this emerge and grab >=media-sound/xmms-1.2.10-r13 first." + epause 5 + fi + + unpack ${A} + + cd ${S} + + if [[ ${PV} != *1.2.10* ]]; then + use rcc && ../RusXMMS2/apply.sh + fi + + if [[ -n "${PATCH_VER}" ]]; then + EPATCH_SUFFIX="patch" + epatch ${WORKDIR}/patches + fi + + cd ${S}/${PLUGIN_PATH} + sed -i -e "s:-I\$(top_srcdir)::g" \ + -e "s:\$(top_builddir)/libxmms/libxmms.la:/usr/$(get_libdir)/libxmms.la:g" \ + Makefile.am || die "Failed to edit Makefile.am" + + cd ${S} + + if [[ ${PV} == *1.2.10* ]]; then + use rcc && ../RusXMMS2/apply-gentoo.sh + + export WANT_AUTOMAKE=1.7 + export WANT_AUTOCONF=2.5 + fi + + libtoolize --force --copy || die "libtoolize --force --copy failed" + + if [[ -n "${M4_VER}" ]]; then + rm acinclude.m4 + aclocal -I ${WORKDIR}/m4 || die "aclocal failed" + else + aclocal || die "aclocal failed" + fi + autoheader || die "autoheader failed" + automake --gnu --add-missing --include-deps --force-missing --copy || die "automake failed" + + cd ${S}/${PLUGIN_PATH} + if has_version '>=media-sound/xmms-1.2.10-r13'; then + sed -i -e "s:^DEFAULT_INCLUDES = .*$:DEFAULT_INCLUDES = -I. $(xmms-config --cflags):" \ + Makefile.in || die "Failed to edit Makefile.in" + fi + + cd ${S} + autoconf || die "autoconf failed" +} + +rusxmms-plugin_src_compile() { + filter-flags -fforce-addr -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + + econf ${myconf} + cp config.h ${S}/${PLUGIN_PATH} + + cd ${S}/${PLUGIN_PATH} + emake -j1 || die +} + +rusxmms-plugin_src_install() { + cd ${S}/${PLUGIN_PATH} + make DESTDIR="${D}" install || die +} + +EXPORT_FUNCTIONS src_unpack src_compile src_install -- cgit v1.2.3