parent
698cd3ce17
commit
2a195723cb
@ -0,0 +1,471 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
MY_PV=${PV/_/-}
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE='xml,threads'
|
||||
|
||||
if [[ $PV == *9999 ]]; then
|
||||
KEYWORDS=""
|
||||
REPO="xen-unstable.hg"
|
||||
EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
|
||||
S="${WORKDIR}/${REPO}"
|
||||
live_eclass="mercurial"
|
||||
else
|
||||
KEYWORDS="~amd64 ~arm ~arm64 -x86"
|
||||
UPSTREAM_VER=
|
||||
SECURITY_VER=7
|
||||
# vars set to reflect https://dev.gentoo.org/~idella4/
|
||||
SEC_VER=2
|
||||
QEMU_VER=0
|
||||
# xen-tools's gentoo patches tarball
|
||||
GENTOO_VER=4
|
||||
# xen-tools's gentoo patches version which apply to this specific ebuild
|
||||
GENTOO_GPV=0
|
||||
# xen-tools ovmf's patches
|
||||
OVMF_VER=1
|
||||
|
||||
SEABIOS_VER=1.7.5
|
||||
OVMF_PV=20150629
|
||||
|
||||
[[ -n ${UPSTREAM_VER} ]] && \
|
||||
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
|
||||
[[ -n ${SECURITY_VER} ]] && \
|
||||
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
|
||||
https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
|
||||
https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
|
||||
[[ -n ${GENTOO_VER} ]] && \
|
||||
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
|
||||
[[ -n ${OVMF_VER} ]] && \
|
||||
OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
|
||||
|
||||
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
|
||||
http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
|
||||
https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
|
||||
ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
|
||||
${OVMF_PATCHSET_URI} )
|
||||
${UPSTREAM_PATCHSET_URI}
|
||||
${SECURITY_PATCHSET_URI}
|
||||
${GENTOO_PATCHSET_URI}"
|
||||
|
||||
S="${WORKDIR}/xen-${MY_PV}"
|
||||
fi
|
||||
|
||||
inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
|
||||
|
||||
DESCRIPTION="Xend daemon and tools"
|
||||
HOMEPAGE="http://xen.org/"
|
||||
DOCS=( README docs/README.xen-bugtool )
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
|
||||
# >=dev-lang/ocaml-4 stable
|
||||
# Masked in profiles/eapi-5-files instead
|
||||
IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
|
||||
|
||||
REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
pygrub? ( python )
|
||||
ovmf? ( hvm )
|
||||
qemu? ( !system-qemu )"
|
||||
|
||||
COMMON_DEPEND="
|
||||
dev-libs/lzo:2
|
||||
dev-libs/glib:2
|
||||
dev-libs/yajl
|
||||
dev-libs/libaio
|
||||
dev-libs/libgcrypt:0
|
||||
sys-libs/zlib
|
||||
"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
dev-python/lxml[${PYTHON_USEDEP}]
|
||||
pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
|
||||
hvm? ( media-libs/libsdl )
|
||||
${PYTHON_DEPS}
|
||||
api? ( dev-libs/libxml2
|
||||
net-misc/curl )
|
||||
pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
|
||||
ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
|
||||
!amd64? ( >=sys-apps/dtc-1.4.0 )
|
||||
amd64? ( sys-devel/bin86
|
||||
system-seabios? ( sys-firmware/seabios )
|
||||
sys-firmware/ipxe
|
||||
sys-devel/dev86
|
||||
sys-power/iasl )
|
||||
dev-lang/perl
|
||||
app-misc/pax-utils
|
||||
doc? (
|
||||
app-doc/doxygen
|
||||
dev-python/markdown[${PYTHON_USEDEP}]
|
||||
dev-tex/latex2html[png,gif]
|
||||
media-gfx/graphviz
|
||||
dev-tex/xcolor
|
||||
media-gfx/transfig
|
||||
dev-texlive/texlive-latexextra
|
||||
virtual/latex-base
|
||||
dev-tex/latexmk
|
||||
dev-texlive/texlive-latex
|
||||
dev-texlive/texlive-pictures
|
||||
dev-texlive/texlive-latexrecommended
|
||||
)
|
||||
hvm? ( x11-proto/xproto
|
||||
!net-libs/libiscsi )
|
||||
qemu? ( x11-libs/pixman )
|
||||
system-qemu? ( app-emulation/qemu[xen] )
|
||||
ocaml? ( dev-ml/findlib
|
||||
>=dev-lang/ocaml-4 )"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
sys-apps/iproute2
|
||||
net-misc/bridge-utils
|
||||
screen? (
|
||||
app-misc/screen
|
||||
app-admin/logrotate
|
||||
)
|
||||
virtual/udev"
|
||||
|
||||
# hvmloader is used to bootstrap a fully virtualized kernel
|
||||
# Approved by QA team in bug #144032
|
||||
QA_WX_LOAD="usr/lib/xen/boot/hvmloader
|
||||
usr/share/qemu-xen/qemu/s390-ccw.img"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
export "CONFIG_LOMOUNT=y"
|
||||
|
||||
#bug 522642, disable compile tools/tests
|
||||
export "CONFIG_TESTS=n"
|
||||
|
||||
if has_version dev-libs/libgcrypt:0; then
|
||||
export "CONFIG_GCRYPT=y"
|
||||
fi
|
||||
|
||||
if [[ -z ${XEN_TARGET_ARCH} ]] ; then
|
||||
if use x86 && use amd64; then
|
||||
die "Confusion! Both x86 and amd64 are set in your use flags!"
|
||||
elif use x86; then
|
||||
export XEN_TARGET_ARCH="x86_32"
|
||||
elif use amd64 ; then
|
||||
export XEN_TARGET_ARCH="x86_64"
|
||||
elif use arm; then
|
||||
export XEN_TARGET_ARCH="arm32"
|
||||
elif use arm64; then
|
||||
export XEN_TARGET_ARCH="arm64"
|
||||
else
|
||||
die "Unsupported architecture!"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Upstream's patchset
|
||||
if [[ -n ${UPSTREAM_VER} ]]; then
|
||||
einfo "Try to apply Xen Upstream patcheset"
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
EPATCH_OPTS="-p1" \
|
||||
epatch "${WORKDIR}"/patches-upstream
|
||||
fi
|
||||
|
||||
# Security patchset
|
||||
if [[ -n ${SECURITY_VER} ]]; then
|
||||
einfo "Try to apply Xen Security patcheset"
|
||||
source "${WORKDIR}"/patches-security/${PV}.conf
|
||||
# apply main xen patches
|
||||
# Two parallel systems, both work
|
||||
# Over time they may concdense into one. This will suffice for now
|
||||
EPATCH_SUFFIX="patch"
|
||||
EPATCH_FORCE="yes"
|
||||
for i in ${XEN_SECURITY_MAIN}; do
|
||||
epatch "${WORKDIR}"/patches-security/xen/$i
|
||||
done
|
||||
for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
|
||||
epatch $i
|
||||
done
|
||||
|
||||
# apply qemu-traditional patches
|
||||
pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
|
||||
for i in ${XEN_SECURITY_QEMUT}; do
|
||||
epatch "${WORKDIR}"/patches-security/qemut/$i
|
||||
done
|
||||
for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
|
||||
epatch $i
|
||||
done
|
||||
popd > /dev/null
|
||||
|
||||
# apply qemu-xen/upstream patches
|
||||
pushd "${S}"/tools/qemu-xen/ > /dev/null
|
||||
for i in ${XEN_SECURITY_QEMUU}; do
|
||||
epatch "${WORKDIR}"/patches-security/qemuu/$i
|
||||
done
|
||||
for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
|
||||
epatch $i
|
||||
done
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
|
||||
mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
|
||||
pushd tools/firmware/ > /dev/null
|
||||
ln -s seabios-dir-remote seabios-dir || die
|
||||
popd > /dev/null
|
||||
|
||||
# Gentoo's patchset
|
||||
if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
|
||||
einfo "Try to apply Gentoo specific patch set"
|
||||
source "${FILESDIR}"/gentoo-patches.conf
|
||||
_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
|
||||
for i in ${!_gpv}; do
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
epatch "${WORKDIR}"/patches-gentoo/$i
|
||||
done
|
||||
fi
|
||||
|
||||
# Ovmf's patchset
|
||||
if [[ -n ${OVMF_VER} ]] && use ovmf; then
|
||||
einfo "Try to apply Ovmf patch set"
|
||||
pushd "${WORKDIR}"/ovmf-*/ > /dev/null
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
EPATCH_OPTS="-p1" \
|
||||
epatch "${WORKDIR}"/patches-ovmf
|
||||
popd > /dev/null
|
||||
mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
|
||||
fi
|
||||
|
||||
mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
|
||||
|
||||
# Fix texi2html build error with new texi2html, qemu.doc.html
|
||||
sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
|
||||
|
||||
use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
|
||||
sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
|
||||
-i tools/firmware/Makefile || die
|
||||
|
||||
# Drop .config, fixes to gcc-4.6
|
||||
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
|
||||
|
||||
# if the user *really* wants to use their own custom-cflags, let them
|
||||
if use custom-cflags; then
|
||||
einfo "User wants their own CFLAGS - removing defaults"
|
||||
|
||||
# try and remove all the default cflags
|
||||
find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
|
||||
-exec sed \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-i {} + || die "failed to re-set custom-cflags"
|
||||
fi
|
||||
|
||||
if ! use pygrub; then
|
||||
sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
|
||||
fi
|
||||
|
||||
if ! use python; then
|
||||
sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
|
||||
fi
|
||||
|
||||
if ! use hvm; then
|
||||
sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
|
||||
# Bug 351648
|
||||
elif ! use x86 && ! has x86 $(get_all_abis); then
|
||||
mkdir -p "${WORKDIR}"/extra-headers/gnu || die
|
||||
touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
|
||||
export CPATH="${WORKDIR}"/extra-headers
|
||||
fi
|
||||
|
||||
# Don't bother with qemu, only needed for fully virtualised guests
|
||||
if ! use qemu; then
|
||||
sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
|
||||
fi
|
||||
|
||||
# Reset bash completion dir; Bug 472438
|
||||
sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
|
||||
-i Config.mk || die
|
||||
sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
|
||||
|
||||
# xencommons, Bug #492332, sed lighter weight than patching
|
||||
sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
|
||||
-i tools/hotplug/Linux/init.d/xencommons.in || die
|
||||
|
||||
# respect multilib, usr/lib/libcacard.so.0.0.0
|
||||
sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
|
||||
-i tools/qemu-xen/configure || die
|
||||
|
||||
#bug 518136, don't build 32bit exactuable for nomultilib profile
|
||||
if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
|
||||
sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
|
||||
fi
|
||||
|
||||
# use /var instead of /var/lib, consistat with previous ebuild
|
||||
sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
|
||||
m4/paths.m4 configure tools/configure || die
|
||||
# use /run instead of /var/run
|
||||
sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
|
||||
m4/paths.m4 configure tools/configure || die
|
||||
|
||||
# uncomment lines in xl.conf
|
||||
sed -e 's:^#autoballoon=:autoballoon=:' \
|
||||
-e 's:^#lockfile=:lockfile=:' \
|
||||
-e 's:^#vif.default.script=:vif.default.script=:' \
|
||||
-i tools/examples/xl.conf || die
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf="--prefix=${PREFIX}/usr \
|
||||
--libdir=${PREFIX}/usr/$(get_libdir) \
|
||||
--libexecdir=${PREFIX}/usr/libexec \
|
||||
--disable-werror \
|
||||
--disable-xen \
|
||||
--enable-tools \
|
||||
--enable-docs \
|
||||
$(use_with system-qemu) \
|
||||
$(use_enable pam) \
|
||||
$(use_enable api xenapi) \
|
||||
$(use_enable ovmf) \
|
||||
$(use_enable ocaml ocamltools) \
|
||||
"
|
||||
use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
|
||||
use qemu || myconf+=" --with-system-qemu"
|
||||
use amd64 && myconf+=" --enable-qemu-traditional"
|
||||
econf ${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export VARTEXFONTS="${T}/fonts"
|
||||
local myopt
|
||||
use debug && myopt="${myopt} debug=y"
|
||||
|
||||
use custom-cflags || unset CFLAGS
|
||||
if test-flag-CC -fno-strict-overflow; then
|
||||
append-flags -fno-strict-overflow
|
||||
fi
|
||||
|
||||
unset LDFLAGS
|
||||
unset CFLAGS
|
||||
emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
|
||||
|
||||
use doc && emake -C docs txt html
|
||||
emake -C docs man-pages
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Override auto-detection in the build system, bug #382573
|
||||
export INITD_DIR=/tmp/init.d
|
||||
export CONFIG_LEAF_DIR=../tmp/default
|
||||
|
||||
# Let the build system compile installed Python modules.
|
||||
local PYTHONDONTWRITEBYTECODE
|
||||
export PYTHONDONTWRITEBYTECODE
|
||||
|
||||
emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
|
||||
XEN_PYTHON_NATIVE_INSTALL=y install-tools
|
||||
|
||||
# Fix the remaining Python shebangs.
|
||||
python_fix_shebang "${D}"
|
||||
|
||||
# Remove RedHat-specific stuff
|
||||
rm -rf "${D}"tmp || die
|
||||
|
||||
if use doc; then
|
||||
emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
|
||||
|
||||
dohtml -r docs/
|
||||
docinto pdf
|
||||
dodoc ${DOCS[@]}
|
||||
[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
|
||||
fi
|
||||
|
||||
rm -rf "${D}"/usr/share/doc/xen/
|
||||
doman docs/man?/*
|
||||
|
||||
newconfd "${FILESDIR}"/xendomains.confd xendomains
|
||||
newconfd "${FILESDIR}"/xenstored.confd xenstored
|
||||
newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
|
||||
newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
|
||||
newinitd "${FILESDIR}"/xenstored.initd xenstored
|
||||
newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
|
||||
newinitd "${FILESDIR}"/xencommons.initd xencommons
|
||||
newconfd "${FILESDIR}"/xencommons.confd xencommons
|
||||
newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
|
||||
newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
|
||||
|
||||
if use screen; then
|
||||
cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
|
||||
cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
|
||||
keepdir /var/log/xen-consoles
|
||||
fi
|
||||
|
||||
# For -static-libs wrt Bug 384355
|
||||
if ! use static-libs; then
|
||||
rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
|
||||
fi
|
||||
|
||||
# for xendomains
|
||||
keepdir /etc/xen/auto
|
||||
|
||||
# Temp QA workaround
|
||||
dodir "$(get_udevdir)"
|
||||
mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
|
||||
rm -rf "${D}"/etc/udev
|
||||
|
||||
# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
|
||||
find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
|
||||
-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Official Xen Guide and the offical wiki page:"
|
||||
elog "https://wiki.gentoo.org/wiki/Xen"
|
||||
elog "http://wiki.xen.org/wiki/Main_Page"
|
||||
elog ""
|
||||
elog "Recommended to utilise the xencommons script to config sytem At boot"
|
||||
elog "Add by use of rc-update on completion of the install"
|
||||
|
||||
# TODO: we need to have the current Python slot here.
|
||||
if ! has_version "dev-lang/python[ncurses]"; then
|
||||
echo
|
||||
ewarn "NB: Your dev-lang/python is built without USE=ncurses."
|
||||
ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
|
||||
fi
|
||||
|
||||
if has_version "sys-apps/iproute2[minimal]"; then
|
||||
echo
|
||||
ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
|
||||
ewarn "will not work until you rebuild iproute2 without USE=minimal."
|
||||
fi
|
||||
|
||||
if ! use hvm; then
|
||||
echo
|
||||
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
|
||||
elog "support enable the hvm use flag."
|
||||
elog "An x86 or amd64 system is required to build HVM support."
|
||||
fi
|
||||
|
||||
if use qemu; then
|
||||
elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
|
||||
elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
|
||||
elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
|
||||
elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
|
||||
fi
|
||||
|
||||
if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
|
||||
echo
|
||||
elog "xensv is broken upstream (Gentoo bug #142011)."
|
||||
elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
|
||||
fi
|
||||
}
|
@ -0,0 +1,463 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE='ncurses,xml,threads'
|
||||
|
||||
inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
|
||||
|
||||
MY_PV=${PV/_/-}
|
||||
MAJOR_V="$(get_version_component_range 1-2)"
|
||||
|
||||
if [[ $PV == *9999 ]]; then
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
REPO="xen.git"
|
||||
EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
|
||||
S="${WORKDIR}/${REPO}"
|
||||
else
|
||||
KEYWORDS="~amd64 ~arm ~arm64 -x86"
|
||||
UPSTREAM_VER=0
|
||||
SECURITY_VER=7
|
||||
# vars set to reflect https://dev.gentoo.org/~idella4/
|
||||
SEC_VER=3
|
||||
QEMU_VER=0
|
||||
# xen-tools's gentoo patches tarball
|
||||
GENTOO_VER=4
|
||||
# xen-tools's gentoo patches version which apply to this specific ebuild
|
||||
GENTOO_GPV=0
|
||||
# xen-tools ovmf's patches
|
||||
OVMF_VER=1
|
||||
|
||||
SEABIOS_VER=1.8.2
|
||||
OVMF_PV=20150629
|
||||
|
||||
[[ -n ${UPSTREAM_VER} ]] && \
|
||||
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
|
||||
[[ -n ${SECURITY_VER} ]] && \
|
||||
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
|
||||
https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
|
||||
https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
|
||||
[[ -n ${GENTOO_VER} ]] && \
|
||||
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
|
||||
[[ -n ${OVMF_VER} ]] && \
|
||||
OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
|
||||
|
||||
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
|
||||
http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
|
||||
https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
|
||||
ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
|
||||
${OVMF_PATCHSET_URI} )
|
||||
${UPSTREAM_PATCHSET_URI}
|
||||
${SECURITY_PATCHSET_URI}
|
||||
${GENTOO_PATCHSET_URI}"
|
||||
|
||||
S="${WORKDIR}/xen-${MY_PV}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Xen tools including QEMU and xl"
|
||||
HOMEPAGE="http://xen.org/"
|
||||
DOCS=( README docs/README.xen-bugtool )
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/${MAJOR_V}"
|
||||
# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
|
||||
# >=dev-lang/ocaml-4 stable
|
||||
# Masked in profiles/eapi-5-files instead
|
||||
IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
|
||||
|
||||
REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
pygrub? ( python )
|
||||
ovmf? ( hvm )
|
||||
qemu? ( !system-qemu )"
|
||||
|
||||
COMMON_DEPEND="
|
||||
dev-libs/lzo:2
|
||||
dev-libs/glib:2
|
||||
dev-libs/yajl
|
||||
dev-libs/libaio
|
||||
dev-libs/libgcrypt:0
|
||||
sys-libs/zlib
|
||||
"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
dev-python/lxml[${PYTHON_USEDEP}]
|
||||
pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
|
||||
${PYTHON_DEPS}
|
||||
api? ( dev-libs/libxml2
|
||||
net-misc/curl )
|
||||
ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
|
||||
!amd64? ( >=sys-apps/dtc-1.4.0 )
|
||||
amd64? ( sys-devel/bin86
|
||||
system-seabios? ( sys-firmware/seabios )
|
||||
sys-firmware/ipxe
|
||||
sys-devel/dev86
|
||||
sys-power/iasl )
|
||||
dev-lang/perl
|
||||
app-misc/pax-utils
|
||||
doc? (
|
||||
app-doc/doxygen
|
||||
dev-python/markdown[${PYTHON_USEDEP}]
|
||||
dev-tex/latex2html[png,gif]
|
||||
media-gfx/graphviz
|
||||
dev-tex/xcolor
|
||||
media-gfx/transfig
|
||||
dev-texlive/texlive-latexextra
|
||||
virtual/latex-base
|
||||
dev-tex/latexmk
|
||||
dev-texlive/texlive-latex
|
||||
dev-texlive/texlive-pictures
|
||||
dev-texlive/texlive-latexrecommended
|
||||
)
|
||||
hvm? ( x11-proto/xproto
|
||||
!net-libs/libiscsi )
|
||||
qemu? (
|
||||
x11-libs/pixman
|
||||
sdl? ( media-libs/libsdl[X] )
|
||||
)
|
||||
system-qemu? ( app-emulation/qemu[xen] )
|
||||
ocaml? ( dev-ml/findlib
|
||||
>=dev-lang/ocaml-4 )"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
sys-apps/iproute2[-minimal]
|
||||
net-misc/bridge-utils
|
||||
screen? (
|
||||
app-misc/screen
|
||||
app-admin/logrotate
|
||||
)"
|
||||
|
||||
# hvmloader is used to bootstrap a fully virtualized kernel
|
||||
# Approved by QA team in bug #144032
|
||||
QA_WX_LOAD="usr/lib/xen/boot/hvmloader
|
||||
usr/share/qemu-xen/qemu/s390-ccw.img"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
export "CONFIG_LOMOUNT=y"
|
||||
|
||||
#bug 522642, disable compile tools/tests
|
||||
export "CONFIG_TESTS=n"
|
||||
|
||||
if has_version dev-libs/libgcrypt:0; then
|
||||
export "CONFIG_GCRYPT=y"
|
||||
fi
|
||||
|
||||
if [[ -z ${XEN_TARGET_ARCH} ]] ; then
|
||||
if use x86 && use amd64; then
|
||||
die "Confusion! Both x86 and amd64 are set in your use flags!"
|
||||
elif use x86; then
|
||||
export XEN_TARGET_ARCH="x86_32"
|
||||
elif use amd64 ; then
|
||||
export XEN_TARGET_ARCH="x86_64"
|
||||
elif use arm; then
|
||||
export XEN_TARGET_ARCH="arm32"
|
||||
elif use arm64; then
|
||||
export XEN_TARGET_ARCH="arm64"
|
||||
else
|
||||
die "Unsupported architecture!"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Upstream's patchset
|
||||
if [[ -n ${UPSTREAM_VER} ]]; then
|
||||
einfo "Try to apply Xen Upstream patch set"
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
EPATCH_OPTS="-p1" \
|
||||
epatch "${WORKDIR}"/patches-upstream
|
||||
fi
|
||||
|
||||
# Security patchset
|
||||
if [[ -n ${SECURITY_VER} ]]; then
|
||||
einfo "Try to apply Xen Security patch set"
|
||||
source "${WORKDIR}"/patches-security/${PV}.conf
|
||||
# apply main xen patches
|
||||
# Two parallel systems, both work side by side
|
||||
# Over time they may concdense into one. This will suffice for now
|
||||
EPATCH_SUFFIX="patch"
|
||||
EPATCH_FORCE="yes"
|
||||
for i in ${XEN_SECURITY_MAIN}; do
|
||||
epatch "${WORKDIR}"/patches-security/xen/$i
|
||||
done
|
||||
|
||||
for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
|
||||
epatch $i
|
||||
done
|
||||
|
||||
# apply qemu-traditional patches
|
||||
pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
|
||||
for i in ${XEN_SECURITY_QEMUT}; do
|
||||
epatch "${WORKDIR}"/patches-security/qemut/$i
|
||||
done
|
||||
for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
|
||||
epatch $i
|
||||
done
|
||||
popd > /dev/null
|
||||
|
||||
# apply qemu-xen/upstream patches
|
||||
pushd "${S}"/tools/qemu-xen/ > /dev/null
|
||||
for i in ${XEN_SECURITY_QEMUU}; do
|
||||
epatch "${WORKDIR}"/patches-security/qemuu/$i
|
||||
done
|
||||
for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
|
||||
epatch $i
|
||||
done
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
|
||||
mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
|
||||
pushd tools/firmware/ > /dev/null
|
||||
ln -s seabios-dir-remote seabios-dir || die
|
||||
popd > /dev/null
|
||||
|
||||
# Gentoo's patchset
|
||||
if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
|
||||
einfo "Try to apply Gentoo specific patch set"
|
||||
source "${FILESDIR}"/gentoo-patches.conf
|
||||
_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
|
||||
for i in ${!_gpv}; do
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
epatch "${WORKDIR}"/patches-gentoo/$i
|
||||
done
|
||||
fi
|
||||
|
||||
# Ovmf's patchset
|
||||
if [[ -n ${OVMF_VER} ]] && use ovmf; then
|
||||
einfo "Try to apply Ovmf patch set"
|
||||
pushd "${WORKDIR}"/ovmf-*/ > /dev/null
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
EPATCH_OPTS="-p1" \
|
||||
epatch "${WORKDIR}"/patches-ovmf
|
||||
popd > /dev/null
|
||||
mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
|
||||
fi
|
||||
|
||||
mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
|
||||
|
||||
# Fix texi2html build error with new texi2html, qemu.doc.html
|
||||
sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
|
||||
|
||||
use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
|
||||
sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
|
||||
-i tools/firmware/Makefile || die
|
||||
|
||||
# Drop .config, fixes to gcc-4.6
|
||||
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
|
||||
|
||||
# if the user *really* wants to use their own custom-cflags, let them
|
||||
if use custom-cflags; then
|
||||
einfo "User wants their own CFLAGS - removing defaults"
|
||||
|
||||
# try and remove all the default cflags
|
||||
find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
|
||||
-exec sed \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-i {} + || die "failed to re-set custom-cflags"
|
||||
else
|
||||
unset CFLAGS
|
||||
unset LDFLAGS
|
||||
unset ASFLAGS
|
||||
unset CPPFLAGS
|
||||
fi
|
||||
|
||||
if ! use pygrub; then
|
||||
sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
|
||||
fi
|
||||
|
||||
if ! use python; then
|
||||
sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
|
||||
fi
|
||||
|
||||
if ! use hvm; then
|
||||
sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
|
||||
# Bug 351648
|
||||
elif ! use x86 && ! has x86 $(get_all_abis); then
|
||||
mkdir -p "${WORKDIR}"/extra-headers/gnu || die
|
||||
touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
|
||||
export CPATH="${WORKDIR}"/extra-headers
|
||||
fi
|
||||
|
||||
if use qemu; then
|
||||
if use sdl; then
|
||||
sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
|
||||
tools/Makefile || die
|
||||
else
|
||||
sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
|
||||
tools/qemu-xen-traditional/xen-setup || die
|
||||
sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
|
||||
tools/Makefile || die
|
||||
fi
|
||||
else
|
||||
# Don't bother with qemu, only needed for fully virtualised guests
|
||||
sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
|
||||
fi
|
||||
|
||||
# Reset bash completion dir; Bug 472438
|
||||
sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
|
||||
-i Config.mk || die
|
||||
sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
|
||||
|
||||
# xencommons, Bug #492332, sed lighter weight than patching
|
||||
sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
|
||||
-i tools/hotplug/Linux/init.d/xencommons.in || die
|
||||
|
||||
# respect multilib, usr/lib/libcacard.so.0.0.0
|
||||
sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
|
||||
-i tools/qemu-xen/configure || die
|
||||
|
||||
#bug 518136, don't build 32bit exactuable for nomultilib profile
|
||||
if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
|
||||
sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
|
||||
fi
|
||||
|
||||
# use /var instead of /var/lib, consistat with previous ebuild
|
||||
sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
|
||||
m4/paths.m4 configure tools/configure || die
|
||||
# use /run instead of /var/run
|
||||
sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
|
||||
m4/paths.m4 configure tools/configure || die
|
||||
|
||||
# uncomment lines in xl.conf
|
||||
sed -e 's:^#autoballoon=:autoballoon=:' \
|
||||
-e 's:^#lockfile=:lockfile=:' \
|
||||
-e 's:^#vif.default.script=:vif.default.script=:' \
|
||||
-i tools/examples/xl.conf || die
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf="--prefix=${PREFIX}/usr \
|
||||
--libdir=${PREFIX}/usr/$(get_libdir) \
|
||||
--libexecdir=${PREFIX}/usr/libexec \
|
||||
--disable-werror \
|
||||
--disable-xen \
|
||||
--enable-tools \
|
||||
--enable-docs \
|
||||
$(use_with system-qemu) \
|
||||
$(use_enable pam) \
|
||||
$(use_enable api xenapi) \
|
||||
$(use_enable ovmf) \
|
||||
$(use_enable ocaml ocamltools) \
|
||||
--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
|
||||
"
|
||||
|
||||
use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
|
||||
use qemu || myconf+=" --with-system-qemu"
|
||||
use amd64 && myconf+=" --enable-qemu-traditional"
|
||||
econf ${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export VARTEXFONTS="${T}/fonts"
|
||||
local myopt
|
||||
use debug && myopt="${myopt} debug=y"
|
||||
|
||||
if test-flag-CC -fno-strict-overflow; then
|
||||
append-flags -fno-strict-overflow
|
||||
fi
|
||||
|
||||
emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
|
||||
|
||||
use doc && emake -C docs txt html
|
||||
emake -C docs man-pages
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Override auto-detection in the build system, bug #382573
|
||||
export INITD_DIR=/tmp/init.d
|
||||
export CONFIG_LEAF_DIR=../tmp/default
|
||||
|
||||
# Let the build system compile installed Python modules.
|
||||
local PYTHONDONTWRITEBYTECODE
|
||||
export PYTHONDONTWRITEBYTECODE
|
||||
|
||||
emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
|
||||
XEN_PYTHON_NATIVE_INSTALL=y install-tools
|
||||
|
||||
# Fix the remaining Python shebangs.
|
||||
python_fix_shebang "${D}"
|
||||
|
||||
# Remove RedHat-specific stuff
|
||||
rm -rf "${D}"tmp || die
|
||||
|
||||
if use doc; then
|
||||
emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
|
||||
|
||||
dohtml -r docs/
|
||||
docinto pdf
|
||||
dodoc ${DOCS[@]}
|
||||
[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
|
||||
fi
|
||||
|
||||
rm -rf "${D}"/usr/share/doc/xen/
|
||||
doman docs/man?/*
|
||||
|
||||
newconfd "${FILESDIR}"/xendomains.confd xendomains
|
||||
newconfd "${FILESDIR}"/xenstored.confd xenstored
|
||||
newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
|
||||
newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
|
||||
newinitd "${FILESDIR}"/xenstored.initd xenstored
|
||||
newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
|
||||
newinitd "${FILESDIR}"/xencommons.initd xencommons
|
||||
newconfd "${FILESDIR}"/xencommons.confd xencommons
|
||||
newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
|
||||
newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
|
||||
|
||||
if use screen; then
|
||||
cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
|
||||
cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
|
||||
keepdir /var/log/xen-consoles
|
||||
fi
|
||||
|
||||
# For -static-libs wrt Bug 384355
|
||||
if ! use static-libs; then
|
||||
rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
|
||||
fi
|
||||
|
||||
# for xendomains
|
||||
keepdir /etc/xen/auto
|
||||
|
||||
# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
|
||||
find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
|
||||
-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Official Xen Guide and the offical wiki page:"
|
||||
elog "https://wiki.gentoo.org/wiki/Xen"
|
||||
elog "http://wiki.xen.org/wiki/Main_Page"
|
||||
elog ""
|
||||
elog "Recommended to utilise the xencommons script to config sytem At boot"
|
||||
elog "Add by use of rc-update on completion of the install"
|
||||
|
||||
if ! use hvm; then
|
||||
echo
|
||||
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
|
||||
elog "support enable the hvm use flag."
|
||||
elog "An x86 or amd64 system is required to build HVM support."
|
||||
fi
|
||||
|
||||
if use qemu; then
|
||||
elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
|
||||
elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
|
||||
elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
|
||||
elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
|
||||
fi
|
||||
}
|
@ -0,0 +1,188 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
|
||||
|
||||
MY_PV=${PV/_/-}
|
||||
MY_P=${PN}-${PV/_/-}
|
||||
|
||||
if [[ $PV == *9999 ]]; then
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
EGIT_REPO_URI="git://xenbits.xen.org/${PN}.git"
|
||||
SRC_URI=""
|
||||
else
|
||||
KEYWORDS="~amd64 ~arm ~arm64 -x86"
|
||||
UPSTREAM_VER=
|
||||
SECURITY_VER=0
|
||||
# var set to reflect https://dev.gentoo.org/~idella4/
|
||||
SEC_VER=2
|
||||
GENTOO_VER=
|
||||
|
||||
[[ -n ${UPSTREAM_VER} ]] && \
|
||||
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
|
||||
[[ -n ${SECURITY_VER} ]] && \
|
||||
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
|
||||
https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz"
|
||||
[[ -n ${GENTOO_VER} ]] && \
|
||||
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
|
||||
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
|
||||
${UPSTREAM_PATCHSET_URI}
|
||||
${SECURITY_PATCHSET_URI}
|
||||
${GENTOO_PATCHSET_URI}"
|
||||
|
||||
fi
|
||||
|
||||
DESCRIPTION="The Xen virtual machine monitor"
|
||||
HOMEPAGE="http://xen.org/"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="custom-cflags debug efi flask xsm"
|
||||
|
||||
DEPEND="${PYTHON_DEPS}
|
||||
efi? ( >=sys-devel/binutils-2.22[multitarget] )
|
||||
!efi? ( >=sys-devel/binutils-2.22[-multitarget] )"
|
||||
RDEPEND=""
|
||||
PDEPEND="~app-emulation/xen-tools-${PV}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
# Approved by QA team in bug #144032
|
||||
QA_WX_LOAD="boot/xen-syms-${PV}"
|
||||
|
||||
REQUIRED_USE="flask? ( xsm )
|
||||
arm? ( debug )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
pkg_setup() {
|
||||
python-any-r1_pkg_setup
|
||||
if [[ -z ${XEN_TARGET_ARCH} ]]; then
|
||||
if use x86 && use amd64; then
|
||||
die "Confusion! Both x86 and amd64 are set in your use flags!"
|
||||
elif use x86; then
|
||||
export XEN_TARGET_ARCH="x86_32"
|
||||
elif use amd64; then
|
||||
export XEN_TARGET_ARCH="x86_64"
|
||||
elif use arm; then
|
||||
export XEN_TARGET_ARCH="arm32"
|
||||
elif use arm64; then
|
||||
export XEN_TARGET_ARCH="arm64"
|
||||
else
|
||||
die "Unsupported architecture!"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use flask ; then
|
||||
export "XSM_ENABLE=y"
|
||||
export "FLASK_ENABLE=y"
|
||||
elif use xsm ; then
|
||||
export "XSM_ENABLE=y"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Upstream's patchset
|
||||
if [[ -n ${UPSTREAM_VER} ]]; then
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
EPATCH_OPTS="-p1" \
|
||||
epatch "${WORKDIR}"/patches-upstream
|
||||
fi
|
||||
|
||||
if [[ -n ${SECURITY_VER} ]]; then
|
||||
einfo "Try to apply Xen Security patcheset"
|
||||
# apply main xen patches
|
||||
# Two parallel systems, both work side by side
|
||||
# Over time they may concdense into one. This will suffice for now
|
||||
EPATCH_SUFFIX="patch"
|
||||
EPATCH_FORCE="yes"
|
||||
for i in ${XEN_SECURITY_MAIN}; do
|
||||
epatch "${WORKDIR}"/patches-security/xen/$i
|
||||
done
|
||||
|
||||
for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
|
||||
epatch $i
|
||||
done
|
||||
fi
|
||||
|
||||
# Gentoo's patchset
|
||||
if [[ -n ${GENTOO_VER} ]]; then
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
epatch "${WORKDIR}"/patches-gentoo
|
||||
fi
|
||||
|
||||
# Drop .config
|
||||
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
|
||||
|
||||
if use efi; then
|
||||
epatch "${FILESDIR}"/${PN}-4.5-efi.patch
|
||||
export EFI_VENDOR="gentoo"
|
||||
export EFI_MOUNTPOINT="boot"
|
||||
fi
|
||||
|
||||
# if the user *really* wants to use their own custom-cflags, let them
|
||||
if use custom-cflags; then
|
||||
einfo "User wants their own CFLAGS - removing defaults"
|
||||
# try and remove all the default custom-cflags
|
||||
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-i {} \; || die "failed to re-set custom-cflags"
|
||||
fi
|
||||
|
||||
# remove -Werror for gcc-4.6's sake
|
||||
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
|
||||
xargs sed -i 's/ *-Werror */ /'
|
||||
# not strictly necessary to fix this
|
||||
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
|
||||
|
||||
use debug && myopt="${myopt} debug=y"
|
||||
|
||||
if use custom-cflags; then
|
||||
filter-flags -fPIE -fstack-protector
|
||||
replace-flags -O3 -O2
|
||||
else
|
||||
unset CFLAGS
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Send raw LDFLAGS so that --as-needed works
|
||||
emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local myopt
|
||||
use debug && myopt="${myopt} debug=y"
|
||||
|
||||
# The 'make install' doesn't 'mkdir -p' the subdirs
|
||||
if use efi; then
|
||||
mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
|
||||
fi
|
||||
|
||||
emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Official Xen Guide and the unoffical wiki page:"
|
||||
elog " https://wiki.gentoo.org/wiki/Xen"
|
||||
elog " http://en.gentoo-wiki.com/wiki/Xen/"
|
||||
|
||||
use efi && einfo "The efi executable is installed in boot/efi/gentoo"
|
||||
}
|
@ -0,0 +1,186 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
|
||||
|
||||
MY_PV=${PV/_/-}
|
||||
MY_P=${PN}-${PV/_/-}
|
||||
|
||||
if [[ $PV == *9999 ]]; then
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
|
||||
SRC_URI=""
|
||||
else
|
||||
KEYWORDS="~amd64 ~arm ~arm64 -x86"
|
||||
UPSTREAM_VER=0
|
||||
SECURITY_VER=0
|
||||
# var set to reflect https://dev.gentoo.org/~idella4/
|
||||
SEC_VER=3
|
||||
GENTOO_VER=
|
||||
|
||||
[[ -n ${UPSTREAM_VER} ]] && \
|
||||
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
|
||||
[[ -n ${SECURITY_VER} ]] && \
|
||||
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
|
||||
https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz"
|
||||
[[ -n ${GENTOO_VER} ]] && \
|
||||
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
|
||||
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
|
||||
${UPSTREAM_PATCHSET_URI}
|
||||
${SECURITY_PATCHSET_URI}
|
||||
${GENTOO_PATCHSET_URI}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="The Xen virtual machine monitor"
|
||||
HOMEPAGE="http://xen.org/"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="custom-cflags debug efi flask"
|
||||
|
||||
DEPEND="${PYTHON_DEPS}
|
||||
efi? ( >=sys-devel/binutils-2.22[multitarget] )
|
||||
!efi? ( >=sys-devel/binutils-2.22 )"
|
||||
RDEPEND=""
|
||||
PDEPEND="~app-emulation/xen-tools-${PV}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
# Approved by QA team in bug #144032
|
||||
QA_WX_LOAD="boot/xen-syms-${PV}"
|
||||
|
||||
REQUIRED_USE="arm? ( debug )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
pkg_setup() {
|
||||
python-any-r1_pkg_setup
|
||||
if [[ -z ${XEN_TARGET_ARCH} ]]; then
|
||||
if use amd64; then
|
||||
export XEN_TARGET_ARCH="x86_64"
|
||||
elif use arm; then
|
||||
export XEN_TARGET_ARCH="arm32"
|
||||
elif use arm64; then
|
||||
export XEN_TARGET_ARCH="arm64"
|
||||
else
|
||||
die "Unsupported architecture!"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use flask ; then
|
||||
export "XSM_ENABLE=y"
|
||||
export "FLASK_ENABLE=y"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Upstream's patchset
|
||||
if [[ -n ${UPSTREAM_VER} ]]; then
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
EPATCH_OPTS="-p1" \
|
||||
epatch "${WORKDIR}"/patches-upstream
|
||||
fi
|
||||
|
||||
if [[ -n ${SECURITY_VER} ]]; then
|
||||
einfo "Try to apply Xen Security patcheset"
|
||||
# apply main xen patches
|
||||
# Two parallel systems, both work side by side
|
||||
# Over time they may concdense into one. This will suffice for now
|
||||
EPATCH_SUFFIX="patch"
|
||||
EPATCH_FORCE="yes"
|
||||
for i in ${XEN_SECURITY_MAIN}; do
|
||||
epatch "${WORKDIR}"/patches-security/xen/$i
|
||||
done
|
||||
|
||||
for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
|
||||
epatch $i
|
||||
done
|
||||
fi
|
||||
|
||||
# Gentoo's patchset
|
||||
if [[ -n ${GENTOO_VER} ]]; then
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
epatch "${WORKDIR}"/patches-gentoo
|
||||
fi
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-4.6-efi.patch
|
||||
|
||||
# Drop .config
|
||||
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
|
||||
|
||||
if use efi; then
|
||||
export EFI_VENDOR="gentoo"
|
||||
export EFI_MOUNTPOINT="boot"
|
||||
fi
|
||||
|
||||
# if the user *really* wants to use their own custom-cflags, let them
|
||||
if use custom-cflags; then
|
||||
einfo "User wants their own CFLAGS - removing defaults"
|
||||
# try and remove all the default custom-cflags
|
||||
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-i {} \; || die "failed to re-set custom-cflags"
|
||||
fi
|
||||
|
||||
# remove -Werror for gcc-4.6's sake
|
||||
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
|
||||
xargs sed -i 's/ *-Werror */ /'
|
||||
# not strictly necessary to fix this
|
||||
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
|
||||
|
||||
use debug && myopt="${myopt} debug=y"
|
||||
|
||||
if use custom-cflags; then
|
||||
filter-flags -fPIE -fstack-protector
|
||||
replace-flags -O3 -O2
|
||||
else
|
||||
unset CFLAGS
|
||||
unset LDFLAGS
|
||||
unset ASFLAGS
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Send raw LDFLAGS so that --as-needed works
|
||||
emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local myopt
|
||||
use debug && myopt="${myopt} debug=y"
|
||||
|
||||
# The 'make install' doesn't 'mkdir -p' the subdirs
|
||||
if use efi; then
|
||||
mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
|
||||
fi
|
||||
|
||||
emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
|
||||
|
||||
# make install likes to throw in some extra EFI bits if it built
|
||||
use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Official Xen Guide and the unoffical wiki page:"
|
||||
elog " https://wiki.gentoo.org/wiki/Xen"
|
||||
elog " http://en.gentoo-wiki.com/wiki/Xen/"
|
||||
|
||||
use efi && einfo "The efi executable is installed in boot/efi/gentoo"
|
||||
}
|
@ -1,11 +1,87 @@
|
||||
[Unit]
|
||||
Description=Elasticsearch
|
||||
After=network.target
|
||||
#!/sbin/runscript
|
||||
|
||||
[Service]
|
||||
User=elasticsearch
|
||||
Environment=ES_INCLUDE=/usr/share/elasticsearch/bin/elasticsearch.in.sh
|
||||
ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.default.path.conf=/etc/elasticsearch
|
||||
name="Elasticsearch"
|
||||
description=""
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
ES_USER=${ES_USER:="elasticsearch"}
|
||||
ES_INSTANCE=${SVCNAME#*.}
|
||||
|
||||
if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then
|
||||
PIDFILE="/run/elasticsearch/elasticsearch.${ES_INSTANCE}.pid"
|
||||
ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
|
||||
ES_CONF_PATH="/etc/elasticsearch/${ES_INSTANCE}"
|
||||
ES_LOG_PATH="/var/log/elasticsearch/${ES_INSTANCE}"
|
||||
else
|
||||
PIDFILE="/run/elasticsearch/elasticsearch.pid"
|
||||
ES_BASE_PATH="/var/lib/elasticsearch/_default"
|
||||
ES_CONF_PATH="/etc/elasticsearch"
|
||||
ES_LOG_PATH="/var/log/elasticsearch/_default"
|
||||
fi
|
||||
|
||||
ES_DATA_PATH="${ES_BASE_PATH}/data"
|
||||
ES_WORK_PATH="${ES_BASE_PATH}/work"
|
||||
|
||||
export ES_INCLUDE="/usr/share/elasticsearch/bin/elasticsearch.in.sh"
|
||||
export JAVA_OPTS
|
||||
export ES_JAVA_OPTS
|
||||
export ES_HEAP_SIZE
|
||||
export ES_HEAP_NEWSIZE
|
||||
export ES_DIRECT_SIZE
|
||||
export ES_USE_IPV4
|
||||
|
||||
server_command="/usr/share/elasticsearch/bin/elasticsearch"
|
||||
server_args=" -p ${PIDFILE} -Des.default.path.conf=${ES_CONF_PATH} -Des.default.path.data=${ES_DATA_PATH} -Des.default.path.work=${ES_WORK_PATH} -Des.default.path.logs=${ES_LOG_PATH}"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
# elasticsearch -Des.config=/path/to/config/file
|
||||
# elasticsearch -Des.network.host=10.0.0.4
|
||||
|
||||
[ ! -f "${ES_INCLUDE}" ] && {
|
||||
eerror "${ES_INCLUDE} must be copied into place"
|
||||
return 1
|
||||
}
|
||||
|
||||
local conf
|
||||
local conf_file
|
||||
for conf in elasticsearch.yml logging.yml; do
|
||||
conf_file="${ES_CONF_PATH}/${conf}"
|
||||
if [ ! -f "${conf_file}" ]; then
|
||||
eerror "${conf_file} must be copied into place"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
ebegin "Starting ${SVCNAME}"
|
||||
|
||||
if [ -n "${ES_MAX_FD}" ]; then
|
||||
ulimit -n ${ES_MAX_FD}
|
||||
einfo "Max open filedescriptors : ${ES_MAX_FD}"
|
||||
fi
|
||||
|
||||
checkpath -d -o "${ES_USER}" -m750 "/var/lib/elasticsearch"
|
||||
checkpath -d -o "${ES_USER}" -m750 "/var/log/elasticsearch"
|
||||
checkpath -d -o "${ES_USER}" -m750 "$(dirname "${PIDFILE}")"
|
||||
checkpath -d -o "${ES_USER}" -m750 "${ES_BASE_PATH}"
|
||||
checkpath -d -o "${ES_USER}" -m750 "${ES_LOG_PATH}"
|
||||
|
||||
start-stop-daemon --start \
|
||||
--background \
|
||||
--chdir "${ES_BASE_PATH}" \
|
||||
--user="${ES_USER}" \
|
||||
--pidfile="${PIDFILE}" \
|
||||
--exec ${server_command} -- ${server_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${SVCNAME}"
|
||||
start-stop-daemon --stop \
|
||||
--pidfile=${PIDFILE} \
|
||||
--user="${ES_USER}" \
|
||||
--retry=TERM/20/KILL/5
|
||||
eend $?
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Thu, 17 Dec 2015 13:44:01 +0000
|
||||
Thu, 17 Dec 2015 14:43:50 +0000
|
||||
|
@ -1 +1 @@
|
||||
Thu, 17 Dec 2015 13:44:01 +0000
|
||||
Thu, 17 Dec 2015 14:43:50 +0000
|
||||
|
@ -0,0 +1,15 @@
|
||||
DEFINED_PHASES=compile configure install postinst postrm preinst prepare prerm pretend setup
|
||||
DEPEND=|| ( >=dev-lang/python-2.7.5-r2:2.7 ) efi? ( >=sys-devel/binutils-2.22[multitarget] ) !efi? ( >=sys-devel/binutils-2.22[-multitarget] )
|
||||
DESCRIPTION=The Xen virtual machine monitor
|
||||
EAPI=5
|
||||
HOMEPAGE=http://xen.org/
|
||||
IUSE=custom-cflags debug efi flask xsm
|
||||
KEYWORDS=~amd64 ~arm ~arm64 -x86
|
||||
LICENSE=GPL-2
|
||||
PDEPEND=~app-emulation/xen-tools-4.5.2
|
||||
REQUIRED_USE=flask? ( xsm ) arm? ( debug )
|
||||
RESTRICT=test
|
||||
SLOT=0
|
||||
SRC_URI=http://bits.xensource.com/oss-xen/release/4.5.2/xen-4.5.2.tar.gz https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-0.tar.xz https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-2.tar.gz
|
||||
_eclasses_=eutils d9bd2ddd85a58e470b49ca997e255a4c flag-o-matic 85dc1eac3c64d8141374490ed64122e5 mount-boot 41ed556fa5641393d5323e421c8e5bcf multilib 3972ca401cf7dbb430df9995f5d8d580 python-any-r1 0ee3a2b43a7ff470ba57bc6e0ee386b3 python-utils-r1 832cb17726d498a182de6b9ee2adc0dc toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85
|
||||
_md5_=055bc0b4aba637cbeeec79e9b01154a1
|
@ -0,0 +1,15 @@
|
||||
DEFINED_PHASES=compile configure install postinst postrm preinst prepare prerm pretend setup
|
||||
DEPEND=|| ( >=dev-lang/python-2.7.5-r2:2.7 ) efi? ( >=sys-devel/binutils-2.22[multitarget] ) !efi? ( >=sys-devel/binutils-2.22 )
|
||||
DESCRIPTION=The Xen virtual machine monitor
|
||||
EAPI=5
|
||||
HOMEPAGE=http://xen.org/
|
||||
IUSE=custom-cflags debug efi flask
|
||||
KEYWORDS=~amd64 ~arm ~arm64 -x86
|
||||
LICENSE=GPL-2
|
||||
PDEPEND=~app-emulation/xen-tools-4.6.0
|
||||
REQUIRED_USE=arm? ( debug )
|
||||
RESTRICT=test
|
||||
SLOT=0
|
||||
SRC_URI=http://bits.xensource.com/oss-xen/release/4.6.0/xen-4.6.0.tar.gz https://dev.gentoo.org/~dlan/distfiles/xen-4.6.0-upstream-patches-0.tar.xz https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-0.tar.xz https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-3.tar.gz
|
||||
_eclasses_=eutils d9bd2ddd85a58e470b49ca997e255a4c flag-o-matic 85dc1eac3c64d8141374490ed64122e5 mount-boot 41ed556fa5641393d5323e421c8e5bcf multilib 3972ca401cf7dbb430df9995f5d8d580 python-any-r1 0ee3a2b43a7ff470ba57bc6e0ee386b3 python-utils-r1 832cb17726d498a182de6b9ee2adc0dc toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85
|
||||
_md5_=322793f040510b3cb2abd8faaaaa898b
|
@ -0,0 +1,15 @@
|
||||
DEFINED_PHASES=compile configure install postinst prepare setup
|
||||
DEPEND=dev-libs/lzo:2 dev-libs/glib:2 dev-libs/yajl dev-libs/libaio dev-libs/libgcrypt:0 sys-libs/zlib dev-python/lxml[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] pam? ( dev-python/pypam[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] ) hvm? ( media-libs/libsdl ) >=dev-lang/python-2.7.5-r2:2.7[xml,threads] >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] api? ( dev-libs/libxml2 net-misc/curl ) pygrub? ( >=dev-lang/python-2.7.5-r2:2.7[ncurses] >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] ) ovmf? ( >=dev-lang/python-2.7.5-r2:2.7[sqlite] >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] ) !amd64? ( >=sys-apps/dtc-1.4.0 ) amd64? ( sys-devel/bin86 system-seabios? ( sys-firmware/seabios ) sys-firmware/ipxe sys-devel/dev86 sys-power/iasl ) dev-lang/perl app-misc/pax-utils doc? ( app-doc/doxygen dev-python/markdown[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] dev-tex/latex2html[png,gif] media-gfx/graphviz dev-tex/xcolor media-gfx/transfig dev-texlive/texlive-latexextra virtual/latex-base dev-tex/latexmk dev-texlive/texlive-latex dev-texlive/texlive-pictures dev-texlive/texlive-latexrecommended ) hvm? ( x11-proto/xproto !net-libs/libiscsi ) qemu? ( x11-libs/pixman ) system-qemu? ( app-emulation/qemu[xen] ) ocaml? ( dev-ml/findlib >=dev-lang/ocaml-4 ) virtual/pkgconfig
|
||||
DESCRIPTION=Xend daemon and tools
|
||||
EAPI=5
|
||||
HOMEPAGE=http://xen.org/
|
||||
IUSE=api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios python_targets_python2_7
|
||||
KEYWORDS=~amd64 ~arm ~arm64 -x86
|
||||
LICENSE=GPL-2
|
||||
RDEPEND=dev-libs/lzo:2 dev-libs/glib:2 dev-libs/yajl dev-libs/libaio dev-libs/libgcrypt:0 sys-libs/zlib sys-apps/iproute2 net-misc/bridge-utils screen? ( app-misc/screen app-admin/logrotate ) virtual/udev
|
||||
REQUIRED_USE=hvm? ( || ( qemu system-qemu ) ) python_targets_python2_7 pygrub? ( python ) ovmf? ( hvm ) qemu? ( !system-qemu )
|
||||
RESTRICT=test
|
||||
SLOT=0
|
||||
SRC_URI=http://bits.xensource.com/oss-xen/release/4.5.2/xen-4.5.2.tar.gz http://code.coreboot.org/p/seabios/downloads/get/seabios-1.7.5.tar.gz https://dev.gentoo.org/~dlan/distfiles/seabios-1.7.5.tar.gz ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-20150629.tar.bz2 https://dev.gentoo.org/~dlan/distfiles/xen-ovmf-patches-1.tar.xz ) https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-7.tar.xz https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-2.tar.gz https://dev.gentoo.org/~idella4/distfiles/xen-qemu-patches-0.tar.gz https://dev.gentoo.org/~dlan/distfiles/xen-gentoo-patches-4.tar.xz
|
||||
_eclasses_=bash-completion-r1 acf715fa09463f043fbfdc1640f3fb85 eutils d9bd2ddd85a58e470b49ca997e255a4c flag-o-matic 85dc1eac3c64d8141374490ed64122e5 multilib 3972ca401cf7dbb430df9995f5d8d580 python-single-r1 caecf590709cc0fcf0b6582bdc49150f python-utils-r1 832cb17726d498a182de6b9ee2adc0dc toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85 udev 37ef89be271b9ae8aa64be024ddb39b5
|
||||
_md5_=776685e9051f6a785ee0af265c6264c1
|
@ -0,0 +1,15 @@
|
||||
DEFINED_PHASES=compile configure install postinst prepare setup
|
||||
DEPEND=dev-libs/lzo:2 dev-libs/glib:2 dev-libs/yajl dev-libs/libaio dev-libs/libgcrypt:0 sys-libs/zlib dev-python/lxml[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] pam? ( dev-python/pypam[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] ) >=dev-lang/python-2.7.5-r2:2.7[ncurses,xml,threads] >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] api? ( dev-libs/libxml2 net-misc/curl ) ovmf? ( >=dev-lang/python-2.7.5-r2:2.7[sqlite] >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] ) !amd64? ( >=sys-apps/dtc-1.4.0 ) amd64? ( sys-devel/bin86 system-seabios? ( sys-firmware/seabios ) sys-firmware/ipxe sys-devel/dev86 sys-power/iasl ) dev-lang/perl app-misc/pax-utils doc? ( app-doc/doxygen dev-python/markdown[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] dev-tex/latex2html[png,gif] media-gfx/graphviz dev-tex/xcolor media-gfx/transfig dev-texlive/texlive-latexextra virtual/latex-base dev-tex/latexmk dev-texlive/texlive-latex dev-texlive/texlive-pictures dev-texlive/texlive-latexrecommended ) hvm? ( x11-proto/xproto !net-libs/libiscsi ) qemu? ( x11-libs/pixman sdl? ( media-libs/libsdl[X] ) ) system-qemu? ( app-emulation/qemu[xen] ) ocaml? ( dev-ml/findlib >=dev-lang/ocaml-4 )
|
||||
DESCRIPTION=Xen tools including QEMU and xl
|
||||
EAPI=5
|
||||
HOMEPAGE=http://xen.org/
|
||||
IUSE=api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios python_targets_python2_7
|
||||
KEYWORDS=~amd64 ~arm ~arm64 -x86
|
||||
LICENSE=GPL-2
|
||||
RDEPEND=dev-libs/lzo:2 dev-libs/glib:2 dev-libs/yajl dev-libs/libaio dev-libs/libgcrypt:0 sys-libs/zlib sys-apps/iproute2[-minimal] net-misc/bridge-utils screen? ( app-misc/screen app-admin/logrotate )
|
||||
REQUIRED_USE=hvm? ( || ( qemu system-qemu ) ) python_targets_python2_7 pygrub? ( python ) ovmf? ( hvm ) qemu? ( !system-qemu )
|
||||
RESTRICT=test
|
||||
SLOT=0/4.6
|
||||
SRC_URI=http://bits.xensource.com/oss-xen/release/4.6.0/xen-4.6.0.tar.gz http://code.coreboot.org/p/seabios/downloads/get/seabios-1.8.2.tar.gz https://dev.gentoo.org/~dlan/distfiles/seabios-1.8.2.tar.gz ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-20150629.tar.bz2 https://dev.gentoo.org/~dlan/distfiles/xen-ovmf-patches-1.tar.xz ) https://dev.gentoo.org/~dlan/distfiles/xen-4.6.0-upstream-patches-0.tar.xz https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-7.tar.xz https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-3.tar.gz https://dev.gentoo.org/~idella4/distfiles/xen-qemu-patches-0.tar.gz https://dev.gentoo.org/~dlan/distfiles/xen-gentoo-patches-4.tar.xz
|
||||
_eclasses_=bash-completion-r1 acf715fa09463f043fbfdc1640f3fb85 eutils d9bd2ddd85a58e470b49ca997e255a4c flag-o-matic 85dc1eac3c64d8141374490ed64122e5 multilib 3972ca401cf7dbb430df9995f5d8d580 python-single-r1 caecf590709cc0fcf0b6582bdc49150f python-utils-r1 832cb17726d498a182de6b9ee2adc0dc toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85 versionator 99ae9d758cbe7cfed19170e7d48f5a9c
|
||||
_md5_=84c8829944abf25e061b0fd7379538c9
|
@ -0,0 +1,14 @@
|
||||
DEFINED_PHASES=compile install prepare setup
|
||||
DEPEND=mpi? ( virtual/blas virtual/lapack virtual/mpi ) gzip? ( app-arch/gzip ) sci-libs/voro++ python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_3? ( >=dev-lang/python-3.3.2-r2:3.3 ) python_targets_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] ) virtual/fortran
|
||||
DESCRIPTION=Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
EAPI=5
|
||||
HOMEPAGE=http://lammps.sandia.gov/
|
||||
IUSE=doc examples gzip lammps-memalign mpi python static-libs python_targets_python2_7 python_targets_python3_3 python_targets_python3_4
|
||||
KEYWORDS=~amd64 ~x86
|
||||
LICENSE=GPL-2
|
||||
RDEPEND=mpi? ( virtual/blas virtual/lapack virtual/mpi ) gzip? ( app-arch/gzip ) sci-libs/voro++ python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_3? ( >=dev-lang/python-3.3.2-r2:3.3 ) python_targets_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] ) virtual/fortran
|
||||
REQUIRED_USE=python? ( || ( python_targets_python2_7 python_targets_python3_3 python_targets_python3_4 ) )
|
||||
SLOT=0
|
||||
SRC_URI=http://lammps.sandia.gov/tars/lammps-9Dec15.tar.gz
|
||||
_eclasses_=eutils d9bd2ddd85a58e470b49ca997e255a4c flag-o-matic 85dc1eac3c64d8141374490ed64122e5 fortran-2 5cc7c979568f0b4f6ef324628a6465d5 multibuild 706332a8d833c077e1aa37faa1ebf162 multilib 3972ca401cf7dbb430df9995f5d8d580 python-r1 98eaa2ec9918bbf0571252d6c6d894f2 python-utils-r1 832cb17726d498a182de6b9ee2adc0dc toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85
|
||||
_md5_=ae537eee8c7c8e90f9dfe821f4ad0b30
|
@ -1,15 +0,0 @@
|
||||
DEFINED_PHASES=configure install prepare setup
|
||||
DEPEND=media-libs/fontconfig x11-libs/gdk-pixbuf:2[X] x11-libs/libX11 x11-libs/libXrandr x11-libs/libXext x11-libs/libXpm x11-libs/libXrender x11-libs/libXft x11-libs/libSM x11-libs/libICE xinerama? ( x11-libs/libXinerama ) bidi? ( dev-libs/fribidi ) gnome? ( >=dev-lang/python-2.7.5-r2:2.7 >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] dev-python/pyxdg gnome-base/gnome-desktop:2 gnome-base/gnome-menus gnome-base/libgnomeui ) >=sys-apps/sed-4 x11-proto/xproto x11-proto/xextproto doc? ( app-text/linuxdoc-tools ) nls? ( >=sys-devel/gettext-0.19.2 ) truetype? ( >=media-libs/freetype-2.0.9 ) xinerama? ( x11-proto/xineramaproto ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.15:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
|
||||
DESCRIPTION=Ice Window Manager with Themes
|
||||
EAPI=5
|
||||
HOMEPAGE=http://www.icewm.org/ https://github.com/bbidulock/icewm
|
||||
IUSE=bidi debug doc gnome minimal nls truetype uclibc xinerama python_targets_python2_7
|
||||
KEYWORDS=~amd64 ~ppc ~x86
|
||||
LICENSE=GPL-2
|
||||
RDEPEND=media-libs/fontconfig x11-libs/gdk-pixbuf:2[X] x11-libs/libX11 x11-libs/libXrandr x11-libs/libXext x11-libs/libXpm x11-libs/libXrender x11-libs/libXft x11-libs/libSM x11-libs/libICE xinerama? ( x11-libs/libXinerama ) bidi? ( dev-libs/fribidi ) gnome? ( >=dev-lang/python-2.7.5-r2:2.7 >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_jython2_7(-),python_single_target_python2_7(+)] dev-python/pyxdg gnome-base/gnome-desktop:2 gnome-base/gnome-menus gnome-base/libgnomeui )
|
||||
REQUIRED_USE=gnome? ( python_targets_python2_7 )
|
||||
RESTRICT=test
|
||||
SLOT=0
|
||||
SRC_URI=https://github.com/bbidulock/icewm/archive/1.3.9.tar.gz -> icewm-1.3.9.tar.gz
|
||||
_eclasses_=autotools 07e71b3b5690738ef7e8bc097077e00c eutils d9bd2ddd85a58e470b49ca997e255a4c libtool b75230758539a7da029e24afdb693960 multilib 3972ca401cf7dbb430df9995f5d8d580 python-single-r1 caecf590709cc0fcf0b6582bdc49150f python-utils-r1 832cb17726d498a182de6b9ee2adc0dc toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85
|
||||
_md5_=e5630e47c1d18c65ead6d34c33c07b59
|
@ -1 +1 @@
|
||||
Thu, 17 Dec 2015 13:44:01 +0000
|
||||
Thu, 17 Dec 2015 14:43:50 +0000
|
||||
|
@ -1 +1 @@
|
||||
Thu Dec 17 13:43:06 UTC 2015
|
||||
Thu Dec 17 14:42:56 UTC 2015
|
||||
|
@ -1 +1 @@
|
||||
Thu, 17 Dec 2015 14:00:01 +0000
|
||||
Thu, 17 Dec 2015 15:00:01 +0000
|
||||
|
@ -1 +1 @@
|
||||
1450359901 Thu 17 Dec 2015 01:45:01 PM UTC
|
||||
1450363201 Thu 17 Dec 2015 02:40:01 PM UTC
|
||||
|
@ -0,0 +1,217 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} )
|
||||
|
||||
inherit eutils flag-o-matic fortran-2 multilib python-r1
|
||||
|
||||
convert_month() {
|
||||
local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
|
||||
echo ${months[${1#0}]}
|
||||
}
|
||||
|
||||
MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
|
||||
|
||||
DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
|
||||
HOMEPAGE="http://lammps.sandia.gov/"
|
||||
SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc examples gzip lammps-memalign mpi python static-libs"
|
||||
|
||||
DEPEND="
|
||||
mpi? (
|
||||
virtual/blas
|
||||
virtual/lapack
|
||||
virtual/mpi
|
||||
)
|
||||
gzip? ( app-arch/gzip )
|
||||
sci-libs/voro++
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
lmp_emake() {
|
||||
local LAMMPS_INCLUDEFLAGS
|
||||
LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
|
||||
LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
|
||||
|
||||
# The lammps makefile uses CC to indicate the C++ compiler.
|
||||
emake \
|
||||
ARCHIVE="$(tc-getAR)" \
|
||||
CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
|
||||
F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
|
||||
LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
|
||||
CCFLAGS="${CXXFLAGS}" \
|
||||
F90FLAGS="${FCFLAGS}" \
|
||||
LINKFLAGS="${LDFLAGS}" \
|
||||
LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
|
||||
MPI_INC="$(usex mpi "" "-I../STUBS")" \
|
||||
MPI_PATH="$(usex mpi "" "-L../STUBS")" \
|
||||
MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
|
||||
user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
|
||||
"$@"
|
||||
}
|
||||
|
||||
lmp_activate_packages() {
|
||||
# Build packages
|
||||
local packages=( yes-asphere yes-body yes-class2 yes-colloid \
|
||||
yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
|
||||
yes-manybody yes-mc yes-meam yes-misc \
|
||||
$(usex mpi "yes-user-atc" "") \
|
||||
yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
|
||||
yes-replica yes-rigid yes-shock yes-snap yes-srd \
|
||||
yes-user-eff yes-user-fep \
|
||||
$(usex mpi "yes-user-lb" "") \
|
||||
yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
|
||||
|
||||
for p in ${packages[@]}; do
|
||||
lmp_emake -C src ${p}
|
||||
done
|
||||
}
|
||||
|
||||
lmp_build_packages() {
|
||||
lmp_emake -C lib/meam -j1 -f Makefile.gfortran
|
||||
lmp_emake -C lib/poems -f Makefile.g++
|
||||
lmp_emake -C lib/reax -j1 -f Makefile.gfortran
|
||||
use mpi && lmp_emake -C lib/atc -f Makefile.g++
|
||||
}
|
||||
|
||||
lmp_clean_packages() {
|
||||
lmp_emake -C lib/meam -f Makefile.gfortran clean
|
||||
lmp_emake -C lib/poems -f Makefile.g++ clean
|
||||
lmp_emake -C lib/reax -f Makefile.gfortran clean
|
||||
use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Fix inconsistent use of SHFLAGS.
|
||||
sed -i \
|
||||
-e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
|
||||
-e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
|
||||
lib/voronoi/Makefile.lammps || die
|
||||
|
||||
# Fix missing .so name.
|
||||
sed -i \
|
||||
-e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
|
||||
src/MAKE/Makefile.serial || die
|
||||
|
||||
# Fix makefile in tools.
|
||||
sed -i \
|
||||
-e 's:g++:$(CXX) $(CXXFLAGS):' \
|
||||
-e 's:gcc:$(CC) $(CCFLAGS):' \
|
||||
-e 's:ifort:$(FC) $(FCFLAGS):' \
|
||||
tools/Makefile || die
|
||||
|
||||
# Patch python.
|
||||
epatch "${FILESDIR}/lammps-python3-r1.patch"
|
||||
epatch "${FILESDIR}/python-shebang.patch"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Fix atc...
|
||||
append-cxxflags -I../../src
|
||||
|
||||
# Acticate packages.
|
||||
elog "Activating lammps packages..."
|
||||
lmp_activate_packages
|
||||
|
||||
# STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
|
||||
# "mpi.h"' which requires an additional '-I.'.
|
||||
append-cxxflags -I.
|
||||
|
||||
# Compile stubs for serial version.
|
||||
use mpi || lmp_emake -C src mpi-stubs
|
||||
|
||||
elog "Building packages..."
|
||||
lmp_build_packages
|
||||
|
||||
if use static-libs; then
|
||||
# Build static library.
|
||||
elog "Building static library..."
|
||||
lmp_emake -C src mode=lib serial
|
||||
fi
|
||||
|
||||
# Clean out packages (that's not done by the build system with the clean
|
||||
# target), so we can rebuild the packages with -fPIC.
|
||||
elog "Cleaning packages..."
|
||||
lmp_clean_packages
|
||||
|
||||
# The build system does not rebuild the packages with -fPIC, adding flag
|
||||
# manually.
|
||||
append-cxxflags -fPIC
|
||||
append-fflags -fPIC
|
||||
|
||||
# Compile stubs for serial version.
|
||||
use mpi || lmp_emake -C src mpi-stubs
|
||||
|
||||
elog "Building packages..."
|
||||
lmp_build_packages
|
||||
|
||||
# Build shared library.
|
||||
elog "Building shared library..."
|
||||
lmp_emake -C src mode=shlib serial
|
||||
|
||||
# Compile main executable. The shared library is always built, and
|
||||
# mode=shexe is simply a way to re-use the object files built in the
|
||||
# "shlib" step when linking the executable. The executable is not actually
|
||||
# using the shared library. If we have built the static library, then we
|
||||
# link that into the executable.
|
||||
elog "Linking executable..."
|
||||
if use static-libs; then
|
||||
lmp_emake -C src mode=exe serial
|
||||
else
|
||||
lmp_emake -C src mode=shexe serial
|
||||
fi
|
||||
|
||||
# Compile tools.
|
||||
elog "Building tools..."
|
||||
lmp_emake -C tools binary2txt chain data2xmovie micelle2d
|
||||
}
|
||||
|
||||
src_install() {
|
||||
use static-libs && newlib.a src/liblammps_serial.a liblammps.a
|
||||
newlib.so src/liblammps_serial.so liblammps.so.0.0.0
|
||||
dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
|
||||
dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
|
||||
newbin src/lmp_serial lmp
|
||||
dobin tools/binary2txt
|
||||
dobin tools/chain
|
||||
dobin tools/data2xmovie
|
||||
dobin tools/micelle2d
|
||||
# Don't forget to add header files of optional packages as they are added
|
||||
# to this ebuild. There may also be .mod files from Fortran based
|
||||
# packages.
|
||||
insinto "/usr/include/${PN}"
|
||||
doins -r src/*.h lib/meam/*.mod
|
||||
|
||||
local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
|
||||
insinto "/${LAMMPS_POTENTIALS}"
|
||||
doins potentials/*
|
||||
echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
|
||||
doenvd 99lammps
|
||||
|
||||
# Install python script.
|
||||
use python && python_foreach_impl python_domodule python/lammps.py
|
||||
|
||||
if use examples; then
|
||||
local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
|
||||
insinto "${LAMMPS_EXAMPLES}"
|
||||
doins -r examples/*
|
||||
fi
|
||||
|
||||
dodoc README
|
||||
if use doc; then
|
||||
dodoc doc/Manual.pdf
|
||||
dohtml -r doc/*
|
||||
fi
|
||||
}
|
@ -1,137 +0,0 @@
|
||||
From 800fc7caa9728cebafee86d841ac23b6ffaa896b Mon Sep 17 00:00:00 2001
|
||||
From: Brian Bidulock <bidulock@openss7.org>
|
||||
Date: Wed, 5 Nov 2014 03:25:44 -0700
|
||||
Subject: [PATCH] fribidi support (gentoo icewm-1.3.9-fribidi.patch)
|
||||
|
||||
Also fixes several problems with the gentoo patch:
|
||||
|
||||
1) the patch modifies CORE_CFLAGS and CORE_LIBS before they
|
||||
are first defined, confusing later PKG_CONFIG([CORE], ...)
|
||||
so I moved it later in configure.ac
|
||||
|
||||
2) the patch uses the deprecated fribidi_log2vis, so I modified
|
||||
src/yfontxft.cc to disabled deprecated symbols (because I
|
||||
always test build with -Werror).
|
||||
|
||||
3) the patch ignores the return value of fribidi_log2vis()
|
||||
causing another warning which -Werror turns into an error.
|
||||
Changed to "if (fribidi_log2vis(...)) ;" to disable that.
|
||||
|
||||
4) fixed the configure.ac macro check for fribidi to only warn
|
||||
when the library is not present but the feature has not
|
||||
been disabled
|
||||
|
||||
5) add fribidi to configure.ac features list shown at end of
|
||||
./configure run (added xrandr and xinerama too...)
|
||||
---
|
||||
configure.ac | 17 +++++++++++++++--
|
||||
src/yfontxft.cc | 47 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 62 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index dce4f1e..63d362f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -158,7 +158,8 @@ if test x$enable_xrandr != xno; then
|
||||
PKG_CHECK_MODULES([XRANDR],[xrandr],[
|
||||
CORE_CFLAGS="$XRANDR_CFLAGS $CORE_CFLAGS"
|
||||
CORE_LIBS="$XRANDR_LIBS $CORE_LIBS"
|
||||
- AC_DEFINE([CONFIG_XRANDR],[1],[Define to enable XRANDR extension.])],
|
||||
+ AC_DEFINE([CONFIG_XRANDR],[1],[Define to enable XRANDR extension.])
|
||||
+ features="$features xrandr"],
|
||||
[AC_MSG_WARN([XRANDR not supported.])])
|
||||
fi
|
||||
|
||||
@@ -270,10 +271,22 @@ if test x$enable_xinerama != xno ; then
|
||||
PKG_CHECK_MODULES([XINERAMA],[xinerama],[
|
||||
CORE_CFLAGS="$XINERAMA_CFLAGS $CORE_CFLAGS"
|
||||
CORE_LIBS="$XINERAMA_LIBS $CORE_LIBS"
|
||||
- AC_DEFINE([XINERAMA],[1],[Define to enable Xinerama support.])],
|
||||
+ AC_DEFINE([XINERAMA],[1],[Define to enable Xinerama support.])
|
||||
+ features="$features xinerama"],
|
||||
[AC_MSG_WARN([XINERAMA is not supported.])])
|
||||
fi
|
||||
|
||||
+AC_ARG_ENABLE([fribidi],
|
||||
+ AC_HELP_STRING([--disable-fribidi],[Disable right to left support.]))
|
||||
+if test "$enable_fribidi" != "no" && test "$enable_i18n" != "no"; then
|
||||
+ PKG_CHECK_MODULES([FRIBIDI], [fribidi],[
|
||||
+ CORE_CFLAGS="$FRIBIDI_CFLAGS $CORE_CFLAGS"
|
||||
+ CORE_LIBS="$FRIBIDI_LIBS $CORE_LIBS"
|
||||
+ AC_DEFINE([CONFIG_FRIBIDI],[1],[Define to enable fribidi support.])
|
||||
+ features="$features fribidi"],
|
||||
+ [AC_MSG_WARN([FRIBIDI is not supported.])])
|
||||
+fi
|
||||
+
|
||||
AC_ARG_ENABLE([prefs],
|
||||
AC_HELP_STRING([--disable-prefs],[Disable configurable preferences.]))
|
||||
if test x$enable_prefs = xno ; then
|
||||
diff --git a/src/yfontxft.cc b/src/yfontxft.cc
|
||||
index c200dc6..01b52f9 100644
|
||||
--- a/src/yfontxft.cc
|
||||
+++ b/src/yfontxft.cc
|
||||
@@ -6,6 +6,18 @@
|
||||
#include "ypaint.h"
|
||||
#include "yxapp.h"
|
||||
#include "intl.h"
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#ifdef CONFIG_FRIBIDI
|
||||
+ // remove deprecated warnings for now...
|
||||
+ #include <fribidi/fribidi-config.h>
|
||||
+ #if FRIBIDI_USE_GLIB+0
|
||||
+ #include <glib.h>
|
||||
+ #undef G_GNUC_DEPRECATED
|
||||
+ #define G_GNUC_DEPRECATED
|
||||
+ #endif
|
||||
+ #include <fribidi/fribidi.h>
|
||||
+#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
@@ -69,10 +81,45 @@ class XftGraphics {
|
||||
char_t * str, size_t len)
|
||||
{
|
||||
XftColor *c = *g.color();
|
||||
+
|
||||
+#ifdef CONFIG_FRIBIDI
|
||||
+
|
||||
+#define STATIS_STRING_SIZE 256
|
||||
+
|
||||
+ // Based around upstream (1.3.2) patch with some optimization
|
||||
+ // on my end. (reduce unnecessary memory allocation)
|
||||
+ // - Gilboa
|
||||
+
|
||||
+ char_t static_str[STATIS_STRING_SIZE];
|
||||
+ char_t *vis_str = static_str;
|
||||
+
|
||||
+ if (len >= STATIS_STRING_SIZE)
|
||||
+ {
|
||||
+ vis_str = new char_t[len+1];
|
||||
+ if (!vis_str)
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ FriBidiCharType pbase_dir = FRIBIDI_TYPE_N;
|
||||
+ if (fribidi_log2vis(str, len, &pbase_dir, //input
|
||||
+ vis_str, // output
|
||||
+ NULL, NULL, NULL // "statistics" that we don't need
|
||||
+ )) ;
|
||||
+ str = vis_str;
|
||||
+#endif
|
||||
+
|
||||
XftDrawString(g.handleXft(), c, font,
|
||||
x - g.xorigin(),
|
||||
y - g.yorigin(),
|
||||
str, len);
|
||||
+
|
||||
+#ifdef CONFIG_FRIBIDI
|
||||
+
|
||||
+ if (vis_str != static_str)
|
||||
+ delete[] str;
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
}
|
||||
|
||||
static void textExtents(XftFont * font, char_t * str, size_t len,
|
@ -1,135 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit autotools eutils python-single-r1
|
||||
|
||||
DESCRIPTION="Ice Window Manager with Themes"
|
||||
HOMEPAGE="http://www.icewm.org/ https://github.com/bbidulock/icewm"
|
||||
LICENSE="GPL-2"
|
||||
SRC_URI="https://github.com/bbidulock/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="bidi debug doc gnome minimal nls truetype uclibc xinerama"
|
||||
REQUIRED_USE="gnome? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
# Tests broken in all versions, patches welcome, bug #323907, #389533
|
||||
RESTRICT="test"
|
||||
|
||||
#fix for icewm preversion package names
|
||||
S=${WORKDIR}/${P/_}
|
||||
|
||||
RDEPEND="
|
||||
media-libs/fontconfig
|
||||
x11-libs/gdk-pixbuf:2[X]
|
||||
x11-libs/libX11
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXext
|
||||
x11-libs/libXpm
|
||||
x11-libs/libXrender
|
||||
x11-libs/libXft
|
||||
x11-libs/libSM
|
||||
x11-libs/libICE
|
||||
xinerama? ( x11-libs/libXinerama )
|
||||
bidi? ( dev-libs/fribidi )
|
||||
gnome? (
|
||||
${PYTHON_DEPS}
|
||||
dev-python/pyxdg
|
||||
gnome-base/gnome-desktop:2
|
||||
gnome-base/gnome-menus
|
||||
gnome-base/libgnomeui )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-apps/sed-4
|
||||
x11-proto/xproto
|
||||
x11-proto/xextproto
|
||||
doc? ( app-text/linuxdoc-tools )
|
||||
nls? ( >=sys-devel/gettext-0.19.2 )
|
||||
truetype? ( >=media-libs/freetype-2.0.9 )
|
||||
xinerama? ( x11-proto/xineramaproto )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
if use truetype && use minimal; then
|
||||
ewarn "You have both 'truetype' and 'minimal' use flags enabled."
|
||||
ewarn "If you really want a minimal install, you will have to turn off"
|
||||
ewarn "the truetype flag for this package."
|
||||
fi
|
||||
}
|
||||
|
||||
PATCHES=(
|
||||
# Fedora patches
|
||||
"${FILESDIR}"/${PN}-1.3.8-menu.patch
|
||||
"${FILESDIR}"/${PN}-1.3.9-fribidi.patch
|
||||
"${FILESDIR}"/${PN}-1.3.8-deprecated.patch
|
||||
|
||||
# Debian patch fixing multiple build issues, like bug #470148
|
||||
#"${FILESDIR}"/${PN}-1.3.8-build-fixes.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
epatch ${PATCHES[@]}
|
||||
|
||||
# Fix bug #486710
|
||||
use uclibc && epatch "${FILESDIR}/${PN}-1.3.8-uclibc.patch"
|
||||
|
||||
if ! use doc ; then
|
||||
sed '/^SUBDIRS =/s@ doc@@' -i Makefile.am || die
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if use truetype
|
||||
then
|
||||
myconf="${myconf} --enable-gradients --enable-shape --enable-shaped-decorations"
|
||||
else
|
||||
myconf="${myconf} --disable-xfreetype --enable-corefonts
|
||||
$(use_enable minimal lite)"
|
||||
fi
|
||||
|
||||
myconf="${myconf}
|
||||
--with-libdir=/usr/share/icewm
|
||||
--with-cfgdir=/etc/icewm
|
||||
--with-docdir=/usr/share/doc/${PF}/html
|
||||
$(use_enable bidi fribidi)
|
||||
$(use_enable debug)
|
||||
$(use_enable gnome menus-gnome2)
|
||||
$(use_enable nls i18n)
|
||||
$(use_enable nls)
|
||||
$(use_enable xinerama)"
|
||||
|
||||
CXXFLAGS="${CXXFLAGS}" econf ${myconf}
|
||||
|
||||
sed -i "s:/icewm-\$(VERSION)::" src/Makefile || die "patch failed"
|
||||
sed -i "s:ungif:gif:" src/Makefile || die "libungif fix failed"
|
||||
}
|
||||
|
||||
src_install(){
|
||||
default
|
||||
|
||||
if use gnome; then
|
||||
dobin "${FILESDIR}"/icewm-xdg-menu
|
||||
exeinto /usr/share/icewm/
|
||||
newexe "${FILESDIR}"/icewm-startup startup
|
||||
fi
|
||||
|
||||
dodoc AUTHORS BUGS CHANGES PLATFORMS README* TODO VERSION
|
||||
|
||||
if ! use doc ; then
|
||||
dohtml -a html,sgml doc/*
|
||||
cp doc/${PN}.man "${T}"/${PN}.1
|
||||
doman "${T}"/${PN}.1
|
||||
fi
|
||||
|
||||
exeinto /etc/X11/Sessions
|
||||
doexe "${FILESDIR}/icewm"
|
||||
|
||||
insinto /usr/share/xsessions
|
||||
doins "${FILESDIR}/IceWM.desktop"
|
||||
}
|
Loading…
Reference in new issue