diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2016-06-05 18:12:54 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2016-06-05 18:12:54 +0300 |
commit | aeb412883b87ff87c3e3dfeacc0d692ff7dae304 (patch) | |
tree | dd92698e3513ef08b0e2bdc9daefeabcba688c2b /sys-apps/paludis | |
parent | 2864b61cae3037c7026a2015b1d80d61dccdd458 (diff) |
a bit aditred paludis ebuild added
Diffstat (limited to 'sys-apps/paludis')
-rw-r--r-- | sys-apps/paludis/paludis-scm.ebuild | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/sys-apps/paludis/paludis-scm.ebuild b/sys-apps/paludis/paludis-scm.ebuild new file mode 100644 index 0000000..6be2b84 --- /dev/null +++ b/sys-apps/paludis/paludis-scm.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2007 Ciaran McCreesh +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="paludis-1" + +SCM_REPOSITORY="git://git.exherbo.org/paludis/paludis.git" +SCM_CHECKOUT_TO="${DISTDIR}/git-src/paludis" +inherit scm-git bash-completion-r1 user + +DESCRIPTION="paludis, the other package mangler" +HOMEPAGE="http://paludis.exherbo.org/" +SRC_URI="" + +RUBY_VERSIONS=( 1.9:ruby19 2.0:ruby20 2.1:ruby21 2.2:ruby22 ) + +IUSE="doc gemcutter portage pink python-bindings ruby-bindings search-index vim-syntax xml zsh-completion pbins ${RUBY_VERSIONS[*]/#*:/ruby_targets_}" +LICENSE="GPL-2 vim-syntax? ( vim )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" + +COMMON_DEPEND=" + >=app-admin/eselect-1.2.13 + >=app-shells/bash-3.2 + dev-libs/libpcre[cxx] + ruby-bindings? ( $( + for ruby in ${RUBY_VERSIONS[@]}; do + echo "ruby_targets_${ruby#*:}? ( dev-lang/ruby:${ruby%:*} )" + done + ) ) + python-bindings? ( >=dev-lang/python-2.6:= >=dev-libs/boost-1.41.0[python] ) + gemcutter? ( >=dev-libs/jansson-1.3 ) + xml? ( >=dev-libs/libxml2-2.6 ) + search-index? ( dev-db/sqlite:3 ) + pbins? ( >=app-arch/libarchive-3.1.2[-xattr] )" + +DEPEND="${COMMON_DEPEND} + >=app-text/asciidoc-8.6.3 + app-text/xmlto + >=sys-devel/autoconf-2.65 + sys-devel/automake:1.11 + doc? ( + || ( >=app-doc/doxygen-1.5.3 <=app-doc/doxygen-1.5.1 ) + media-gfx/imagemagick + python-bindings? ( dev-python/sphinx ) + ruby-bindings? ( dev-ruby/syntax$( + for ruby in ${RUBY_VERSIONS[@]}; do + echo -n "[ruby_targets_${ruby#*:}?]" + done + ) ) + ) + virtual/pkgconfig" + +RDEPEND="${COMMON_DEPEND} + sys-apps/sandbox" + +# Keep syntax as a PDEPEND. It avoids issues when Paludis is used as the +# default virtual/portage provider. +PDEPEND=" + vim-syntax? ( >=app-editors/vim-core-7 ) + suggested: + app-eselect/eselect-package-manager + dev-vcs/bzr + dev-vcs/git + dev-vcs/mercurial + dev-vcs/subversion + >=net-misc/rsync-3 + net-misc/wget" + +check_ruby_targets() { + if useq ruby-bindings; then + local nruby=0 ruby + for ruby in ${RUBY_VERSIONS[@]}; do + useq ruby_targets_${ruby#*:} && (( ++nruby )) + done + [[ ${nruby} -eq 1 ]] || die "exactly one RUBY_TARGETS flag must be set if USE=ruby-bindings" + fi +} + +create-paludis-user() { + enewgroup "paludisbuild" + enewuser "paludisbuild" -1 -1 "/var/tmp/paludis" "paludisbuild,tty" +} + +pkg_pretend() { + check_ruby_targets +} + +pkg_setup() { + check_ruby_targets + create-paludis-user +} + +src_unpack() { + scm_src_unpack + cd "${S}" + ./autogen.bash || die "autogen.bash failed" +} + +src_compile() { + local repositories=`echo default unavailable unpackaged $(usev gemcutter ) | tr -s \ ,` + local environments=`echo default $(usev portage ) | tr -s \ ,` + econf \ + $(use_enable doc doxygen ) \ + $(use_enable pink ) \ + $(use_enable ruby-bindings ruby ) \ + $(useq ruby-bindings && for ruby in ${RUBY_VERSIONS[@]}; do + useq ruby_targets_${ruby#*:} && echo --with-ruby-version=${ruby%:*} + done ) \ + $(useq ruby-bindings && useq doc && echo --enable-ruby-doc ) \ + $(use_enable python-bindings python ) \ + $(useq python-bindings && useq doc && echo --enable-python-doc ) \ + $(use_enable vim-syntax vim ) \ + $(use_enable xml ) \ + $(use_enable search-index ) \ + $(use_enable pbins ) \ + --with-vim-install-dir=/usr/share/vim/vimfiles \ + --with-repositories=${repositories} \ + --with-environments=${environments} \ + --with-git-head="$(git rev-parse HEAD)" \ + || die "econf failed" + + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "install failed" + dodoc AUTHORS README NEWS + + dobashcomp bash-completion/cave || die "dobashcomp failed" + + if use zsh-completion ; then + insinto /usr/share/zsh/site-functions + doins zsh-completion/_cave + doins zsh-completion/_paludis_packages + fi +} + +src_test() { + # Work around Portage bugs + export PALUDIS_DO_NOTHING_SANDBOXY="portage sucks" + export BASH_ENV=/dev/null + +# if [[ `id -u` == 0 ]] ; then +# # hate +# export PALUDIS_REDUCED_UID=0 +# export PALUDIS_REDUCED_GID=0 +# fi + +# if ! emake check ; then +# eerror "Tests failed. Looking for files for you to add to your bug report..." +# find "${S}" -type f -name '*.epicfail' -or -name '*.log' | while read a ; do +# eerror " $a" +# done +# die "Make check failed" +# fi +} + +pkg_postinst() { + pm_is_paludis=false + if [[ -f ${ROOT}/etc/env.d/50package-manager ]] ; then + pm_is_paludis=$( source ${ROOT}/etc/env.d/50package-manager ; [[ ${PACKAGE_MANAGER} == paludis ]] && echo true || echo false ) + fi + + if ! $pm_is_paludis ; then + elog "If you are using paludis or cave as your primary package manager," + elog "you should consider running:" + elog " eselect package-manager set paludis" + fi +} + |