parent
ad34bcce76
commit
4cd65553c2
@ -1,4 +1,2 @@
|
||||
DIST lastpass-cli-0.6.1.tar.gz 65996 SHA256 6ae596a59439d39794e31004d877ad6884d0f820bc0cc0a94c87bd2800ddbe9b SHA512 6bfb4d8d5c85a32179d6d577270a91d9731834f79b0ecbd9c8e3f66a403be876de073eb0418cd94ef04f545c3a8aca6fa503e892a13827f7c28f31d15e161dbc WHIRLPOOL a972d245087c2e72c029e06111b082b41f769b18b30ec6fc64176bba22c394d71aaa7cf66d32f31f7b4d4475056c547eae36d8f43f4f6add4aa71d46fb9178b7
|
||||
DIST lastpass-cli-0.7.2.tar.gz 69134 SHA256 e66390ed4037a0b3efef402ca742cc16fc0ac165308188fbd90c25e50ddff00f SHA512 00383ecd38d25ded26004114e1ff7ed21e4d1ee88a4e9b61ad538532f7f609c556d732e4c046faf35d4151cf203e7ea143042722709a3f30e19e81dff869a5c6 WHIRLPOOL 7935f896ac344d322b4fd44421a7b5a34e56200f3e9cc5077bd54ce3ef88e9c4fe242f28a1f6abecf52bbb14e8bbf7c22a859fcf1f95d3faa78138674aaea145
|
||||
DIST lastpass-cli-0.8.1.tar.gz 79981 SHA256 ba845a827501f3c49514e977c8de25e5950d3ea482d7a3c31090148310a83056 SHA512 bc58500165e26dc87b592a7d975fa5b6e6698ca7b68fdd8205d21cfd13f72860cbbf5cd36b162fe928c12eb6c8ab86b42e369b8abc719bd36df5a8d8ea5f1689 WHIRLPOOL 3a332725106a43dc5738ad4b066a5b4c2fd3764e3543257931ba267068d202cb4bafbbdb4b72a336032e66161fba98f3d0c1d9b0f8a194a413fed0bc28a6f692
|
||||
DIST lastpass-cli-0.9.0.tar.gz 84433 SHA256 e7314f0dfeec86add7c19c053ee34bb7a176e462e71727d2b345481d2d136800 SHA512 1e377cfeb9b62c5a69b461312582b6893f88fa12079ad8e52a1e7a3be806225009f0f84eff7d806191ff7f3482e34cd16e10d0b623fa0b0357703d585a015878 WHIRLPOOL 12e6c8ce6ab03ae9586a949f1a9316bf18d80c2ed54b7b883f3888e76932999bb74b8d36bac0361a11da126df20b5b5c39f2dc62cbd76b7d3deacfb57a789406
|
||||
|
@ -1,44 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="Interfaces with LastPass.com from the command line."
|
||||
SRC_URI="https://github.com/lastpass/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
HOMEPAGE="https://github.com/lastpass/lastpass-cli"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2+"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="libressl X +pinentry"
|
||||
|
||||
RDEPEND="
|
||||
X? ( || ( x11-misc/xclip x11-misc/xsel ) )
|
||||
!libressl? ( dev-libs/openssl:0 )
|
||||
libressl? ( dev-libs/libressl )
|
||||
net-misc/curl
|
||||
dev-libs/libxml2
|
||||
pinentry? ( app-crypt/pinentry )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
app-text/asciidoc
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
sed -i 's/install -s/install/' Makefile || die "Could not remove stripping"
|
||||
tc-export CC
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake PREFIX="${EPREFIX}/usr"
|
||||
emake PREFIX="${EPREFIX}/usr" doc-man
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
|
||||
emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install-doc
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="Interfaces with LastPass.com from the command line."
|
||||
SRC_URI="https://github.com/lastpass/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
HOMEPAGE="https://github.com/lastpass/lastpass-cli"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2+"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="libressl X +pinentry"
|
||||
|
||||
RDEPEND="
|
||||
X? ( || ( x11-misc/xclip x11-misc/xsel ) )
|
||||
!libressl? ( dev-libs/openssl:0 )
|
||||
libressl? ( dev-libs/libressl )
|
||||
net-misc/curl
|
||||
dev-libs/libxml2
|
||||
pinentry? ( app-crypt/pinentry )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
app-text/asciidoc
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
tc-export CC
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake PREFIX="${EPREFIX}/usr"
|
||||
emake PREFIX="${EPREFIX}/usr" doc-man
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
|
||||
emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install-doc
|
||||
}
|
@ -0,0 +1,240 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit versionator multilib eutils readme.gentoo-r1 rpm systemd user
|
||||
|
||||
DESCRIPTION="Tivoli Storage Manager (TSM) Backup/Archive (B/A) Client and API"
|
||||
HOMEPAGE="http://www.tivoli.com/"
|
||||
|
||||
MY_PV_MAJOR=$(get_major_version)
|
||||
MY_PV_MINOR=$(get_version_component_range 2)
|
||||
MY_PV_TINY=$(get_version_component_range 3)
|
||||
MY_PV_PATCH=$(get_version_component_range 4)
|
||||
|
||||
MY_PV_NODOTS="${MY_PV_MAJOR}${MY_PV_MINOR}${MY_PV_TINY}"
|
||||
MY_PVR_ALLDOTS=${PV}
|
||||
|
||||
if [[ ${MY_PV_PATCH} == 0 ]]; then
|
||||
MY_RELEASE_PATH=maintenance
|
||||
else
|
||||
MY_RELEASE_PATH=patches
|
||||
fi
|
||||
BASE_URI="ftp://ftp.software.ibm.com/storage/tivoli-storage-management/"
|
||||
BASE_URI+="${MY_RELEASE_PATH}/client/v${MY_PV_MAJOR}r${MY_PV_MINOR}/"
|
||||
BASE_URI+="Linux/LinuxX86/BA/v${MY_PV_NODOTS}/"
|
||||
SRC_TAR="${MY_PVR_ALLDOTS}-TIV-TSMBAC-LinuxX86.tar"
|
||||
SRC_URI="${BASE_URI}${SRC_TAR}"
|
||||
|
||||
RESTRICT="strip" # Breaks libPiIMG.so and libPiSNAP.so
|
||||
LICENSE="Apache-1.1 Apache-2.0 JDOM BSD-2 CC-PD Boost-1.0 MIT CPL-1.0 HPND Exolab
|
||||
dom4j EPL-1.0 FTL icu unicode IBM Info-ZIP LGPL-2 LGPL-2.1 openafs-krb5-a
|
||||
ZLIB MPL-1.0 MPL-1.1 NPL-1.1 openssl OPENLDAP RSA public-domain W3C
|
||||
|| ( BSD GPL-2+ ) gSOAP libpng tsm"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 -*"
|
||||
IUSE="acl java +tsm_cit +tsm_hw"
|
||||
QA_PREBUILT="*"
|
||||
|
||||
MY_LANGS="cs:CS_CZ de:DE_DE es:ES_ES fr:FR_FR hu:HU_HU it:IT_IT
|
||||
ja:JA_JP ko:KO_KR pl:PL_PL pt:PT_BR ru:RU_RU zh:ZH_CN zh_TW:ZH_TW"
|
||||
MY_LANG_PV="${MY_PVR_ALLDOTS}-"
|
||||
for lang in ${MY_LANGS}; do
|
||||
IUSE="${IUSE} linguas_${lang%:*}"
|
||||
SRC_URI="${SRC_URI} linguas_${lang%:*}? ( \
|
||||
${BASE_URI}TIVsm-msg.${lang#*:}.x86_64.rpm -> \
|
||||
${MY_LANG_PV}TIVsm-msg.${lang#*:}.x86_64.rpm )"
|
||||
done
|
||||
unset lang
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
dev-libs/expat
|
||||
dev-libs/libxml2
|
||||
=sys-fs/fuse-2*
|
||||
acl? ( sys-apps/acl )
|
||||
java? ( virtual/jre:1.7 )
|
||||
"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup tsm
|
||||
DOC_CONTENTS="
|
||||
Note that you have to be either root or member of the group tsm to
|
||||
be able to use the Tivoli Storage Manager client."
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local rpm rpms lang
|
||||
unpack ${SRC_TAR}
|
||||
|
||||
for rpm in *.rpm; do
|
||||
case ${rpm} in
|
||||
TIVsm-APIcit.*|TIVsm-BAcit.*)
|
||||
use tsm_cit && rpms="${rpms} ./${rpm}"
|
||||
;;
|
||||
TIVsm-BAhdw.*)
|
||||
use tsm_hw && rpms="${rpms} ./${rpm}"
|
||||
;;
|
||||
TIVsm-JBB.*|*-filepath-*)
|
||||
# "journal based backup" for all filesystems
|
||||
# requires a kernel module.
|
||||
# "Linux Filepath source code" available
|
||||
# by request from vendor
|
||||
;;
|
||||
*)
|
||||
rpms="${rpms} ./${rpm}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
for rpm in ${A}; do
|
||||
case ${rpm} in
|
||||
*.rpm)
|
||||
rpms="${rpms} ${rpm}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
rpm_unpack ${rpms}
|
||||
|
||||
# Avoid strange error messages caused by read-only files
|
||||
chmod -R u+w "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Avoid unnecessary dependency on ksh
|
||||
sed -i 's:^#!/usr/bin/ksh:#!/bin/bash:' \
|
||||
opt/tivoli/tsm/client/ba/bin/dsmj || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cp -a opt "${D}" || die
|
||||
cp -a usr "${D}" || die
|
||||
|
||||
# The RPM files contain postinstall scripts which can be extracted
|
||||
# e.g. using https://bugs.gentoo.org/attachment.cgi?id=234663 .
|
||||
# Below we try to mimic the behaviour of these scripts.
|
||||
# We don't deal with SELinux compliance (yet), though.
|
||||
local RPM_INSTALL_PREFIX CLIENTDIR i
|
||||
RPM_INSTALL_PREFIX=/opt
|
||||
CLIENTDIR=$RPM_INSTALL_PREFIX/tivoli/tsm/client
|
||||
|
||||
# We don't bother setting timestamps to build dates.
|
||||
# But we should delete the corresponding files.
|
||||
rm -f "${D}"$CLIENTDIR/api/bin*/.buildDate || die
|
||||
rm -f "${D}"$CLIENTDIR/ba/bin*/.buildDate || die
|
||||
rm -f "${D}"$CLIENTDIR/lang/.buildDate || die
|
||||
|
||||
# Create links for messages; this is spread over several postin scripts.
|
||||
for i in $(cd "${D}"${CLIENTDIR}/lang; ls -1d ??_??); do
|
||||
dosym ../../lang/${i} $CLIENTDIR/ba/bin/${i}
|
||||
dosym ../../lang/${i} $CLIENTDIR/api/bin64/${i}
|
||||
done
|
||||
|
||||
# Mimic TIVsm-API64 postinstall script
|
||||
for i in libgpfs.so libdmapi.so; do
|
||||
dosym ../..$CLIENTDIR/api/bin64/${i} /usr/lib64/${i}
|
||||
done
|
||||
|
||||
# The TIVsm-BA postinstall script only does messages and ancient upgrades
|
||||
|
||||
# The gscrypt64 postinstall script only deals with s390[x] SELinux
|
||||
# and the symlink for the iccs library which we handle in the loop below.
|
||||
|
||||
# Move stuff from /usr/local to /opt, #452332
|
||||
mv "${D}"/usr/local/ibm "${D}"/opt/ || die
|
||||
rmdir "${D}"/usr/local || die
|
||||
|
||||
# Mimic gskssl64 postinstall script
|
||||
for i in sys p11 km ssl drld kicc ldap cms acmeidup valn dbfl iccs; do
|
||||
dosym ../../opt/ibm/gsk8_64/lib64/libgsk8${i}_64.so \
|
||||
/usr/lib64/libgsk8${i}_64.so
|
||||
done
|
||||
for i in capicmd ver; do
|
||||
dosym ../../opt/ibm/gsk8_64/bin/gsk8${i}_64 /usr/bin/gsk${i}_64
|
||||
done
|
||||
|
||||
# Done with the postinstall scripts as the RPMs contain them.
|
||||
# Now on to some more Gentoo-specific installation.
|
||||
|
||||
[[ -d "${D}usr/lib" ]] && die "Using 32bit lib dir in 64bit only system"
|
||||
|
||||
# Avoid "QA Notice: Found an absolute symlink in a library directory"
|
||||
local target
|
||||
find "${D}"usr/lib* -lname '/*' | while read i; do
|
||||
target=$(readlink "${i}")
|
||||
rm -v "${i}" || die
|
||||
dosym "../..${target}" "${i#${D}}"
|
||||
done
|
||||
|
||||
# Install symlinks for sonames of libraries, bug #416503
|
||||
dosym libvixMntapi.so.1.1.0 $CLIENTDIR/ba/bin/libvixMntapi.so.1
|
||||
dosym libvixDiskLibVim.so.5.5.0 $CLIENTDIR/ba/bin/libvixDiskLibVim.so.5
|
||||
dosym libvixDiskLib.so.5.5.0 $CLIENTDIR/ba/bin/libvixDiskLib.so.5
|
||||
|
||||
fowners :tsm /opt/tivoli/tsm/client/ba/bin/dsmtca
|
||||
fperms 4710 /opt/tivoli/tsm/client/ba/bin/dsmtca
|
||||
|
||||
keepdir /var/log/tsm
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/tsm.logrotate" tsm
|
||||
|
||||
keepdir /etc/tivoli
|
||||
|
||||
cp -a "${S}/opt/tivoli/tsm/client/ba/bin/dsm.sys.smp" "${D}/etc/tivoli/dsm.sys" || die
|
||||
echo ' PasswordDir "/etc/tivoli/"' >> ${D}/etc/tivoli/dsm.sys
|
||||
echo ' PasswordAccess generate' >> ${D}/etc/tivoli/dsm.sys
|
||||
|
||||
# Added the hostname to be more friendly, the admin will need to edit this file anyway
|
||||
echo ' NodeName' `hostname` >> ${D}/etc/tivoli/dsm.sys
|
||||
echo ' ErrorLogName "/var/log/tsm/dsmerror.log"' >> ${D}/etc/tivoli/dsm.sys
|
||||
echo ' SchedLogName "/var/log/tsm/dsmsched.log"' >> ${D}/etc/tivoli/dsm.sys
|
||||
dosym ../../../../../../etc/tivoli/dsm.sys /opt/tivoli/tsm/client/ba/bin/dsm.sys
|
||||
|
||||
cp -a "${S}/opt/tivoli/tsm/client/ba/bin/dsm.opt.smp" "${D}/etc/tivoli/dsm.opt"
|
||||
dosym ../../../../../../etc/tivoli/dsm.opt /opt/tivoli/tsm/client/ba/bin/dsm.opt
|
||||
|
||||
# Setup the env
|
||||
dodir /etc/env.d
|
||||
ENV_FILE="${D}/etc/env.d/80tivoli"
|
||||
echo 'DSM_CONFIG="/etc/tivoli/dsm.opt"' >> ${ENV_FILE}
|
||||
echo 'DSM_DIR="/opt/tivoli/tsm/client/ba/bin"' >> ${ENV_FILE}
|
||||
echo 'DSM_LOG="/var/log/tsm"' >> ${ENV_FILE}
|
||||
echo 'ROOTPATH="/opt/tivoli/tsm/client/ba/bin"' >> ${ENV_FILE}
|
||||
|
||||
newconfd "${FILESDIR}/dsmc.conf.d" dsmc
|
||||
newinitd "${FILESDIR}/dsmc.init.d" dsmc
|
||||
newinitd "${FILESDIR}/dsmcad.init.d-r1" dsmcad
|
||||
|
||||
systemd_dounit "${FILESDIR}/dsmc.service"
|
||||
systemd_dounit "${FILESDIR}/dsmcad.service"
|
||||
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local i dirs
|
||||
for i in /var/log/tsm/dsm{error,sched,j,webcl}.log; do
|
||||
if [[ ! -e $i ]]; then
|
||||
touch $i || die
|
||||
chown :tsm $i || die
|
||||
chmod 0660 $i || die
|
||||
fi
|
||||
done
|
||||
|
||||
# Bug #375041: the log directory itself should not be world writable.
|
||||
# Have to do this in postinst due to bug #141619
|
||||
chown root:tsm /var/log/tsm || die
|
||||
chmod 0750 /var/log/tsm || die
|
||||
|
||||
# Bug 508052: directories used to be too restrictive, have to widen perms.
|
||||
dirs=( /opt/tivoli $(find /opt/tivoli/tsm -type d) )
|
||||
chown root:root "${dirs[@]}" || die
|
||||
chmod 0755 "${dirs[@]}" || die
|
||||
|
||||
readme.gentoo_print_elog
|
||||
}
|
@ -0,0 +1,240 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit versionator multilib eutils readme.gentoo-r1 rpm systemd user
|
||||
|
||||
DESCRIPTION="Tivoli Storage Manager (TSM) Backup/Archive (B/A) Client and API"
|
||||
HOMEPAGE="http://www.tivoli.com/"
|
||||
|
||||
MY_PV_MAJOR=$(get_major_version)
|
||||
MY_PV_MINOR=$(get_version_component_range 2)
|
||||
MY_PV_TINY=$(get_version_component_range 3)
|
||||
MY_PV_PATCH=$(get_version_component_range 4)
|
||||
|
||||
MY_PV_NODOTS="${MY_PV_MAJOR}${MY_PV_MINOR}${MY_PV_TINY}"
|
||||
MY_PVR_ALLDOTS=${PV}
|
||||
|
||||
if [[ ${MY_PV_PATCH} == 0 ]]; then
|
||||
MY_RELEASE_PATH=maintenance
|
||||
else
|
||||
MY_RELEASE_PATH=patches
|
||||
fi
|
||||
BASE_URI="ftp://ftp.software.ibm.com/storage/tivoli-storage-management/"
|
||||
BASE_URI+="${MY_RELEASE_PATH}/client/v${MY_PV_MAJOR}r${MY_PV_MINOR}/"
|
||||
BASE_URI+="Linux/LinuxX86/BA/v${MY_PV_NODOTS}/"
|
||||
SRC_TAR="${MY_PVR_ALLDOTS}-TIV-TSMBAC-LinuxX86.tar"
|
||||
SRC_URI="${BASE_URI}${SRC_TAR}"
|
||||
|
||||
RESTRICT="strip" # Breaks libPiIMG.so and libPiSNAP.so
|
||||
LICENSE="Apache-1.1 Apache-2.0 JDOM BSD-2 CC-PD Boost-1.0 MIT CPL-1.0 HPND Exolab
|
||||
dom4j EPL-1.0 FTL icu unicode IBM Info-ZIP LGPL-2 LGPL-2.1 openafs-krb5-a
|
||||
ZLIB MPL-1.0 MPL-1.1 NPL-1.1 openssl OPENLDAP RSA public-domain W3C
|
||||
|| ( BSD GPL-2+ ) gSOAP libpng tsm"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 -*"
|
||||
IUSE="acl java +tsm_cit +tsm_hw"
|
||||
QA_PREBUILT="*"
|
||||
|
||||
MY_LANGS="cs:CS_CZ de:DE_DE es:ES_ES fr:FR_FR hu:HU_HU it:IT_IT
|
||||
ja:JA_JP ko:KO_KR pl:PL_PL pt:PT_BR ru:RU_RU zh:ZH_CN zh_TW:ZH_TW"
|
||||
MY_LANG_PV="${MY_PVR_ALLDOTS}-"
|
||||
for lang in ${MY_LANGS}; do
|
||||
IUSE="${IUSE} linguas_${lang%:*}"
|
||||
SRC_URI="${SRC_URI} linguas_${lang%:*}? ( \
|
||||
${BASE_URI}TIVsm-msg.${lang#*:}.x86_64.rpm -> \
|
||||
${MY_LANG_PV}TIVsm-msg.${lang#*:}.x86_64.rpm )"
|
||||
done
|
||||
unset lang
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
dev-libs/expat
|
||||
dev-libs/libxml2
|
||||
=sys-fs/fuse-2*
|
||||
acl? ( sys-apps/acl )
|
||||
java? ( virtual/jre:1.7 )
|
||||
"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup tsm
|
||||
DOC_CONTENTS="
|
||||
Note that you have to be either root or member of the group tsm to
|
||||
be able to use the Tivoli Storage Manager client."
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local rpm rpms lang
|
||||
unpack ${SRC_TAR}
|
||||
|
||||
for rpm in *.rpm; do
|
||||
case ${rpm} in
|
||||
TIVsm-APIcit.*|TIVsm-BAcit.*)
|
||||
use tsm_cit && rpms="${rpms} ./${rpm}"
|
||||
;;
|
||||
TIVsm-BAhdw.*)
|
||||
use tsm_hw && rpms="${rpms} ./${rpm}"
|
||||
;;
|
||||
TIVsm-JBB.*|*-filepath-*)
|
||||
# "journal based backup" for all filesystems
|
||||
# requires a kernel module.
|
||||
# "Linux Filepath source code" available
|
||||
# by request from vendor
|
||||
;;
|
||||
*)
|
||||
rpms="${rpms} ./${rpm}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
for rpm in ${A}; do
|
||||
case ${rpm} in
|
||||
*.rpm)
|
||||
rpms="${rpms} ${rpm}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
rpm_unpack ${rpms}
|
||||
|
||||
# Avoid strange error messages caused by read-only files
|
||||
chmod -R u+w "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Avoid unnecessary dependency on ksh
|
||||
sed -i 's:^#!/usr/bin/ksh:#!/bin/bash:' \
|
||||
opt/tivoli/tsm/client/ba/bin/dsmj || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cp -a opt "${D}" || die
|
||||
cp -a usr "${D}" || die
|
||||
|
||||
# The RPM files contain postinstall scripts which can be extracted
|
||||
# e.g. using https://bugs.gentoo.org/attachment.cgi?id=234663 .
|
||||
# Below we try to mimic the behaviour of these scripts.
|
||||
# We don't deal with SELinux compliance (yet), though.
|
||||
local RPM_INSTALL_PREFIX CLIENTDIR i
|
||||
RPM_INSTALL_PREFIX=/opt
|
||||
CLIENTDIR=$RPM_INSTALL_PREFIX/tivoli/tsm/client
|
||||
|
||||
# We don't bother setting timestamps to build dates.
|
||||
# But we should delete the corresponding files.
|
||||
rm -f "${D}"$CLIENTDIR/api/bin*/.buildDate || die
|
||||
rm -f "${D}"$CLIENTDIR/ba/bin*/.buildDate || die
|
||||
rm -f "${D}"$CLIENTDIR/lang/.buildDate || die
|
||||
|
||||
# Create links for messages; this is spread over several postin scripts.
|
||||
for i in $(cd "${D}"${CLIENTDIR}/lang; ls -1d ??_??); do
|
||||
dosym ../../lang/${i} $CLIENTDIR/ba/bin/${i}
|
||||
dosym ../../lang/${i} $CLIENTDIR/api/bin64/${i}
|
||||
done
|
||||
|
||||
# Mimic TIVsm-API64 postinstall script
|
||||
for i in libgpfs.so libdmapi.so; do
|
||||
dosym ../..$CLIENTDIR/api/bin64/${i} /usr/lib64/${i}
|
||||
done
|
||||
|
||||
# The TIVsm-BA postinstall script only does messages and ancient upgrades
|
||||
|
||||
# The gscrypt64 postinstall script only deals with s390[x] SELinux
|
||||
# and the symlink for the iccs library which we handle in the loop below.
|
||||
|
||||
# Move stuff from /usr/local to /opt, #452332
|
||||
mv "${D}"/usr/local/ibm "${D}"/opt/ || die
|
||||
rmdir "${D}"/usr/local || die
|
||||
|
||||
# Mimic gskssl64 postinstall script
|
||||
for i in sys p11 km ssl drld kicc ldap cms acmeidup valn dbfl iccs; do
|
||||
dosym ../../opt/ibm/gsk8_64/lib64/libgsk8${i}_64.so \
|
||||
/usr/lib64/libgsk8${i}_64.so
|
||||
done
|
||||
for i in capicmd ver; do
|
||||
dosym ../../opt/ibm/gsk8_64/bin/gsk8${i}_64 /usr/bin/gsk${i}_64
|
||||
done
|
||||
|
||||
# Done with the postinstall scripts as the RPMs contain them.
|
||||
# Now on to some more Gentoo-specific installation.
|
||||
|
||||
[[ -d "${D}usr/lib" ]] && die "Using 32bit lib dir in 64bit only system"
|
||||
|
||||
# Avoid "QA Notice: Found an absolute symlink in a library directory"
|
||||
local target
|
||||
find "${D}"usr/lib* -lname '/*' | while read i; do
|
||||
target=$(readlink "${i}")
|
||||
rm -v "${i}" || die
|
||||
dosym "../..${target}" "${i#${D}}"
|
||||
done
|
||||
|
||||
# Install symlinks for sonames of libraries, bug #416503
|
||||
dosym libvixMntapi.so.1.1.0 $CLIENTDIR/ba/bin/libvixMntapi.so.1
|
||||
dosym libvixDiskLibVim.so.5.5.0 $CLIENTDIR/ba/bin/libvixDiskLibVim.so.5
|
||||
dosym libvixDiskLib.so.5.5.0 $CLIENTDIR/ba/bin/libvixDiskLib.so.5
|
||||
|
||||
fowners :tsm /opt/tivoli/tsm/client/ba/bin/dsmtca
|
||||
fperms 4710 /opt/tivoli/tsm/client/ba/bin/dsmtca
|
||||
|
||||
keepdir /var/log/tsm
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/tsm.logrotate" tsm
|
||||
|
||||
keepdir /etc/tivoli
|
||||
|
||||
cp -a "${S}/opt/tivoli/tsm/client/ba/bin/dsm.sys.smp" "${D}/etc/tivoli/dsm.sys" || die
|
||||
echo ' PasswordDir "/etc/tivoli/"' >> ${D}/etc/tivoli/dsm.sys
|
||||
echo ' PasswordAccess generate' >> ${D}/etc/tivoli/dsm.sys
|
||||
|
||||
# Added the hostname to be more friendly, the admin will need to edit this file anyway
|
||||
echo ' NodeName' `hostname` >> ${D}/etc/tivoli/dsm.sys
|
||||
echo ' ErrorLogName "/var/log/tsm/dsmerror.log"' >> ${D}/etc/tivoli/dsm.sys
|
||||
echo ' SchedLogName "/var/log/tsm/dsmsched.log"' >> ${D}/etc/tivoli/dsm.sys
|
||||
dosym ../../../../../../etc/tivoli/dsm.sys /opt/tivoli/tsm/client/ba/bin/dsm.sys
|
||||
|
||||
cp -a "${S}/opt/tivoli/tsm/client/ba/bin/dsm.opt.smp" "${D}/etc/tivoli/dsm.opt"
|
||||
dosym ../../../../../../etc/tivoli/dsm.opt /opt/tivoli/tsm/client/ba/bin/dsm.opt
|
||||
|
||||
# Setup the env
|
||||
dodir /etc/env.d
|
||||
ENV_FILE="${D}/etc/env.d/80tivoli"
|
||||
echo 'DSM_CONFIG="/etc/tivoli/dsm.opt"' >> ${ENV_FILE}
|
||||
echo 'DSM_DIR="/opt/tivoli/tsm/client/ba/bin"' >> ${ENV_FILE}
|
||||
echo 'DSM_LOG="/var/log/tsm"' >> ${ENV_FILE}
|
||||
echo 'ROOTPATH="/opt/tivoli/tsm/client/ba/bin"' >> ${ENV_FILE}
|
||||
|
||||
newconfd "${FILESDIR}/dsmc.conf.d" dsmc
|
||||
newinitd "${FILESDIR}/dsmc.init.d" dsmc
|
||||
newinitd "${FILESDIR}/dsmcad.init.d-r1" dsmcad
|
||||
|
||||
systemd_dounit "${FILESDIR}/dsmc.service"
|
||||
systemd_dounit "${FILESDIR}/dsmcad.service"
|
||||
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local i dirs
|
||||
for i in /var/log/tsm/dsm{error,sched,j,webcl}.log; do
|
||||
if [[ ! -e $i ]]; then
|
||||
touch $i || die
|
||||
chown :tsm $i || die
|
||||
chmod 0660 $i || die
|
||||
fi
|
||||
done
|
||||
|
||||
# Bug #375041: the log directory itself should not be world writable.
|
||||
# Have to do this in postinst due to bug #141619
|
||||
chown root:tsm /var/log/tsm || die
|
||||
chmod 0750 /var/log/tsm || die
|
||||
|
||||
# Bug 508052: directories used to be too restrictive, have to widen perms.
|
||||
dirs=( /opt/tivoli $(find /opt/tivoli/tsm -type d) )
|
||||
chown root:root "${dirs[@]}" || die
|
||||
chmod 0755 "${dirs[@]}" || die
|
||||
|
||||
readme.gentoo_print_elog
|
||||
}
|
@ -0,0 +1,244 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit versionator multilib eutils readme.gentoo rpm systemd user pax-utils
|
||||
|
||||
DESCRIPTION="Tivoli Storage Manager (TSM) Backup/Archive (B/A) Client and API"
|
||||
HOMEPAGE="http://www.tivoli.com/"
|
||||
|
||||
MY_PV_MAJOR=$(get_major_version)
|
||||
MY_PV_MINOR=$(get_version_component_range 2)
|
||||
MY_PV_TINY=$(get_version_component_range 3)
|
||||
MY_PV_PATCH=$(get_version_component_range 4)
|
||||
|
||||
MY_PV_NODOTS="${MY_PV_MAJOR}${MY_PV_MINOR}${MY_PV_TINY}"
|
||||
MY_PVR_ALLDOTS=${PV}
|
||||
|
||||
if [[ ${MY_PV_PATCH} == 0 ]]; then
|
||||
MY_RELEASE_PATH=maintenance
|
||||
else
|
||||
MY_RELEASE_PATH=patches
|
||||
fi
|
||||
BASE_URI="ftp://ftp.software.ibm.com/storage/tivoli-storage-management/"
|
||||
BASE_URI+="${MY_RELEASE_PATH}/client/v${MY_PV_MAJOR}r${MY_PV_MINOR}/"
|
||||
BASE_URI+="Linux/LinuxX86/BA/v${MY_PV_NODOTS}/"
|
||||
SRC_TAR="${MY_PVR_ALLDOTS}-TIV-TSMBAC-LinuxX86.tar"
|
||||
SRC_URI="${BASE_URI}${SRC_TAR}"
|
||||
|
||||
RESTRICT="strip" # Breaks libPiIMG.so and libPiSNAP.so
|
||||
LICENSE="Apache-1.1 Apache-2.0 JDOM BSD-2 CC-PD Boost-1.0 MIT CPL-1.0 HPND Exolab
|
||||
dom4j EPL-1.0 FTL icu unicode IBM Info-ZIP LGPL-2 LGPL-2.1 openafs-krb5-a
|
||||
ZLIB MPL-1.0 MPL-1.1 NPL-1.1 openssl OPENLDAP RSA public-domain W3C
|
||||
|| ( BSD GPL-2+ ) gSOAP libpng tsm"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 -*"
|
||||
IUSE="acl java +tsm_cit +tsm_hw"
|
||||
QA_PREBUILT="*"
|
||||
|
||||
# not available (yet?)
|
||||
#MY_LANGS="cs:CS_CZ de:DE_DE es:ES_ES fr:FR_FR hu:HU_HU it:IT_IT
|
||||
# ja:JA_JP ko:KO_KR pl:PL_PL pt:PT_BR ru:RU_RU zh:ZH_CN zh_TW:ZH_TW"
|
||||
MY_LANG_PV="${MY_PVR_ALLDOTS}-"
|
||||
for lang in ${MY_LANGS}; do
|
||||
IUSE="${IUSE} linguas_${lang%:*}"
|
||||
SRC_URI="${SRC_URI} linguas_${lang%:*}? ( \
|
||||
${BASE_URI}TIVsm-msg.${lang#*:}.x86_64.rpm -> \
|
||||
${MY_LANG_PV}TIVsm-msg.${lang#*:}.x86_64.rpm )"
|
||||
done
|
||||
unset lang
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
dev-libs/expat
|
||||
dev-libs/libxml2
|
||||
=sys-fs/fuse-2*
|
||||
acl? ( sys-apps/acl )
|
||||
java? ( virtual/jre:1.7 )
|
||||
"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup tsm
|
||||
DOC_CONTENTS="
|
||||
Note that you have to be either root or member of the group tsm to
|
||||
be able to use the Tivoli Storage Manager client."
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local rpm rpms lang
|
||||
unpack ${SRC_TAR}
|
||||
|
||||
for rpm in *.rpm; do
|
||||
case ${rpm} in
|
||||
TIVsm-APIcit.*|TIVsm-BAcit.*)
|
||||
use tsm_cit && rpms="${rpms} ./${rpm}"
|
||||
;;
|
||||
TIVsm-BAhdw.*)
|
||||
use tsm_hw && rpms="${rpms} ./${rpm}"
|
||||
;;
|
||||
TIVsm-JBB.*|*-filepath-*)
|
||||
# "journal based backup" for all filesystems
|
||||
# requires a kernel module.
|
||||
# "Linux Filepath source code" available
|
||||
# by request from vendor
|
||||
;;
|
||||
*)
|
||||
rpms="${rpms} ./${rpm}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
for rpm in ${A}; do
|
||||
case ${rpm} in
|
||||
*.rpm)
|
||||
rpms="${rpms} ${rpm}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
rpm_unpack ${rpms}
|
||||
|
||||
# Avoid strange error messages caused by read-only files
|
||||
chmod -R u+w "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Avoid unnecessary dependency on ksh
|
||||
sed -i 's:^#!/usr/bin/ksh:#!/bin/bash:' \
|
||||
opt/tivoli/tsm/client/ba/bin/dsmj || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cp -a opt "${D}" || die
|
||||
cp -a usr "${D}" || die
|
||||
|
||||
# The RPM files contain postinstall scripts which can be extracted
|
||||
# e.g. using https://bugs.gentoo.org/attachment.cgi?id=234663 .
|
||||
# Below we try to mimic the behaviour of these scripts.
|
||||
# We don't deal with SELinux compliance (yet), though.
|
||||
local RPM_INSTALL_PREFIX CLIENTDIR i
|
||||
RPM_INSTALL_PREFIX=/opt
|
||||
CLIENTDIR=$RPM_INSTALL_PREFIX/tivoli/tsm/client
|
||||
|
||||
# We don't bother setting timestamps to build dates.
|
||||
# But we should delete the corresponding files.
|
||||
rm -f "${D}"$CLIENTDIR/api/bin*/.buildDate || die
|
||||
rm -f "${D}"$CLIENTDIR/ba/bin*/.buildDate || die
|
||||
rm -f "${D}"$CLIENTDIR/lang/.buildDate || die
|
||||
|
||||
# Create links for messages; this is spread over several postin scripts.
|
||||
for i in $(cd "${D}"${CLIENTDIR}/lang; ls -1d ??_??); do
|
||||
dosym ../../lang/${i} $CLIENTDIR/ba/bin/${i}
|
||||
dosym ../../lang/${i} $CLIENTDIR/api/bin64/${i}
|
||||
done
|
||||
|
||||
# Mimic TIVsm-API64 postinstall script
|
||||
for i in libgpfs.so libdmapi.so; do
|
||||
dosym ../..$CLIENTDIR/api/bin64/${i} /usr/lib64/${i}
|
||||
done
|
||||
|
||||
# The TIVsm-BA postinstall script only does messages and ancient upgrades
|
||||
|
||||
# The gscrypt64 postinstall script only deals with s390[x] SELinux
|
||||
# and the symlink for the iccs library which we handle in the loop below.
|
||||
|
||||
# Move stuff from /usr/local to /opt, #452332
|
||||
mv "${D}"/usr/local/ibm "${D}"/opt/ || die
|
||||
rmdir "${D}"/usr/local || die
|
||||
|
||||
# Mimic gskssl64 postinstall script
|
||||
for i in sys p11 km ssl drld kicc ldap cms acmeidup valn dbfl iccs; do
|
||||
dosym ../../opt/ibm/gsk8_64/lib64/libgsk8${i}_64.so \
|
||||
/usr/lib64/libgsk8${i}_64.so
|
||||
done
|
||||
for i in capicmd ver; do
|
||||
dosym ../../opt/ibm/gsk8_64/bin/gsk8${i}_64 /usr/bin/gsk${i}_64
|
||||
done
|
||||
|
||||
# Done with the postinstall scripts as the RPMs contain them.
|
||||
# Now on to some more Gentoo-specific installation.
|
||||
|
||||
[[ -d "${D}usr/lib" ]] && die "Using 32bit lib dir in 64bit only system"
|
||||
|
||||
# Avoid "QA Notice: Found an absolute symlink in a library directory"
|
||||
local target
|
||||
find "${D}"usr/lib* -lname '/*' | while read i; do
|
||||
target=$(readlink "${i}")
|
||||
rm -v "${i}" || die
|
||||
dosym "../..${target}" "${i#${D}}"
|
||||
done
|
||||
|
||||
# Install symlinks for sonames of libraries, bug #416503
|
||||
dosym libvixMntapi.so.1.1.0 $CLIENTDIR/ba/bin/libvixMntapi.so.1
|
||||
dosym libvixDiskLibVim.so.5.5.0 $CLIENTDIR/ba/bin/libvixDiskLibVim.so.5
|
||||
dosym libvixDiskLib.so.5.5.0 $CLIENTDIR/ba/bin/libvixDiskLib.so.5
|
||||
|
||||
fowners :tsm /opt/tivoli/tsm/client/ba/bin/dsmtca
|
||||
fperms 4710 /opt/tivoli/tsm/client/ba/bin/dsmtca
|
||||
|
||||
keepdir /var/log/tsm
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/tsm.logrotate" tsm
|
||||
|
||||
keepdir /etc/tivoli
|
||||
|
||||
cp -a "${S}/opt/tivoli/tsm/client/ba/bin/dsm.sys.smp" "${D}/etc/tivoli/dsm.sys" || die
|
||||
echo ' PasswordDir "/etc/tivoli/"' >> ${D}/etc/tivoli/dsm.sys
|
||||
echo ' PasswordAccess generate' >> ${D}/etc/tivoli/dsm.sys
|
||||
|
||||
# Added the hostname to be more friendly, the admin will need to edit this file anyway
|
||||
echo ' NodeName' `hostname` >> ${D}/etc/tivoli/dsm.sys
|
||||
echo ' ErrorLogName "/var/log/tsm/dsmerror.log"' >> ${D}/etc/tivoli/dsm.sys
|
||||
echo ' SchedLogName "/var/log/tsm/dsmsched.log"' >> ${D}/etc/tivoli/dsm.sys
|
||||
dosym ../../../../../../etc/tivoli/dsm.sys /opt/tivoli/tsm/client/ba/bin/dsm.sys
|
||||
|
||||
cp -a "${S}/opt/tivoli/tsm/client/ba/bin/dsm.opt.smp" "${D}/etc/tivoli/dsm.opt"
|
||||
dosym ../../../../../../etc/tivoli/dsm.opt /opt/tivoli/tsm/client/ba/bin/dsm.opt
|
||||
|
||||
# Setup the env
|
||||
dodir /etc/env.d
|
||||
ENV_FILE="${D}/etc/env.d/80tivoli"
|
||||
echo 'DSM_CONFIG="/etc/tivoli/dsm.opt"' >> ${ENV_FILE}
|
||||
echo 'DSM_DIR="/opt/tivoli/tsm/client/ba/bin"' >> ${ENV_FILE}
|
||||
echo 'DSM_LOG="/var/log/tsm"' >> ${ENV_FILE}
|
||||
echo 'ROOTPATH="/opt/tivoli/tsm/client/ba/bin"' >> ${ENV_FILE}
|
||||
|
||||
newconfd "${FILESDIR}/dsmc.conf.d" dsmc
|
||||
newinitd "${FILESDIR}/dsmc.init.d" dsmc
|
||||
newinitd "${FILESDIR}/dsmcad.init.d-r1" dsmcad
|
||||
|
||||
# Need this for hardened, otherwise a cryptic "connection to server lost" message appears
|
||||
pax-mark -m "${D}/opt/tivoli/tsm/client/ba/bin/dsmc"
|
||||
|
||||
systemd_dounit "${FILESDIR}/dsmc.service"
|
||||
systemd_dounit "${FILESDIR}/dsmcad.service"
|
||||
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local i dirs
|
||||
for i in /var/log/tsm/dsm{error,sched,j,webcl}.log; do
|
||||
if [[ ! -e $i ]]; then
|
||||
touch $i || die
|
||||
chown :tsm $i || die
|
||||
chmod 0660 $i || die
|
||||
fi
|
||||
done
|
||||
|
||||
# Bug #375041: the log directory itself should not be world writable.
|
||||
# Have to do this in postinst due to bug #141619
|
||||
chown root:tsm /var/log/tsm || die
|
||||
chmod 0750 /var/log/tsm || die
|
||||
|
||||
# Bug 508052: directories used to be too restrictive, have to widen perms.
|
||||
dirs=( /opt/tivoli $(find /opt/tivoli/tsm -type d) )
|
||||
chown root:root "${dirs[@]}" || die
|
||||
chmod 0755 "${dirs[@]}" || die
|
||||
|
||||
readme.gentoo_print_elog
|
||||
}
|
@ -1,3 +1 @@
|
||||
DIST focuswriter-1.5.3-src.tar.bz2 5201148 SHA256 1c48c72879a7b40cf7d97c28abf5cf713c063b7f83a1179093b1241f5797a8c4 SHA512 6796fc8dbe5d5ba545fc8ee5797f620e56dea67a038f4c4eb9e404940a863b32ea2ceb30ed7ea8e22187be2763cc128def3f08f61187ba11de94ec9ae16f807f WHIRLPOOL c5dbf0e739928833bbccdc2e5de6305ca553a3e8f0f1d54d1d2a6bd4636b8ede85c3adedcaee85d66779e25cd53678428cc3817bdedcf30be42c89fc1aebdf07
|
||||
DIST focuswriter-1.5.4-src.tar.bz2 5247111 SHA256 5ffd74a2d5a790e432d819dfd269ddb8d6c1a0168c91e441b2121fa6eaf8f565 SHA512 f532dac5a0691d7b82a16b5dae115c7d79b161484ba1ad2243fd1ccaeba8ae9c9ed0019eba6cd87cc4155a51f5a97cad16c92b9453671426e214e139d78bc526 WHIRLPOOL aca3722b60aee8bec0979f71a04d28217c82c9a2fb60b49a19a58596c9d67bd160626d14cc950eeaa9c0543001f93ec9576a1561c24bbe29a98eeec708287331
|
||||
DIST focuswriter-1.5.5-src.tar.bz2 5249014 SHA256 b6a2085587864b2685516d20870d9375803ccdf3472e66bf457382d028c1da0e SHA512 aed6a2e203dcf349ff7fef6caa8e7ab1dbba80da988933c06d6f4ea1ad49ad4c4546b30aaacf9373d1234cb8934daac36f00d0d7b3512d9c3fc4f1e1b273a766 WHIRLPOOL 29795304e6d6687d16d2774cd4d28d0c45382474391d7ad62fa557a134e7c5d11ba6bf81bb81df2b0fb3727b4bb32f705d8fe73a7129f44c8485cc9d8b19b2e1
|
||||
|
@ -1,67 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PLOCALES="ar ca cs da de el en en_GB es_MX es fi fr he hu hy id it ja ko nl pl
|
||||
pt_BR pt ro ru sk sr sv tr uk vi zh_CN zh_TW"
|
||||
PLOCALE_BACKUP="en"
|
||||
inherit fdo-mime gnome2-utils l10n readme.gentoo qt4-r2
|
||||
|
||||
DESCRIPTION="A fullscreen and distraction-free word processor"
|
||||
HOMEPAGE="http://gottcode.org/focuswriter/"
|
||||
SRC_URI="http://gottcode.org/${PN}/${P}-src.tar.bz2"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="debug"
|
||||
|
||||
RDEPEND="app-text/hunspell
|
||||
dev-qt/qtcore:4
|
||||
dev-qt/qtgui:4
|
||||
dev-qt/qtsingleapplication[qt4(+),X]
|
||||
sys-libs/zlib"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
DOCS=( ChangeLog CREDITS NEWS README )
|
||||
DOC_CONTENTS="Focuswriter has optional sound support if media-libs/sdl-mixer is
|
||||
installed with wav useflag enabled."
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-1.5.2-unbundle-qtsingleapplication.patch" )
|
||||
|
||||
rm_loc() {
|
||||
sed -e "s|translations/${PN}_${1}.ts||" -i ${PN}.pro || die 'sed failed'
|
||||
rm translations/${PN}_${1}.{ts,qm} || die "removing ${1} locale failed"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
qt4-r2_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
eqmake4 PREFIX="${EPREFIX}/usr"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
readme.gentoo_create_doc
|
||||
qt4-r2_src_install
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
gnome2_icon_savelist
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
readme.gentoo_pkg_postinst
|
||||
gnome2_icon_cache_update
|
||||
fdo-mime_desktop_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
fdo-mime_desktop_database_update
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PLOCALES="ar ca cs da de el en en_GB es_MX es fi fr he hu hy id it ja ko nl pl
|
||||
pt_BR pt ro ru sk sr sv tr uk vi zh_CN zh_TW"
|
||||
PLOCALE_BACKUP="en"
|
||||
inherit fdo-mime gnome2-utils l10n readme.gentoo qt4-r2
|
||||
|
||||
DESCRIPTION="A fullscreen and distraction-free word processor"
|
||||
HOMEPAGE="http://gottcode.org/focuswriter/"
|
||||
SRC_URI="http://gottcode.org/${PN}/${P}-src.tar.bz2"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="debug"
|
||||
|
||||
RDEPEND="app-text/hunspell
|
||||
dev-qt/qtcore:4
|
||||
dev-qt/qtgui:4
|
||||
dev-qt/qtsingleapplication[qt4(+),X]
|
||||
sys-libs/zlib"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
DOCS=( ChangeLog CREDITS NEWS README )
|
||||
DOC_CONTENTS="Focuswriter has optional sound support if media-libs/sdl-mixer is
|
||||
installed with wav useflag enabled."
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-1.5.2-unbundle-qtsingleapplication.patch" )
|
||||
|
||||
rm_loc() {
|
||||
sed -e "s|translations/${PN}_${1}.ts||" -i ${PN}.pro || die 'sed failed'
|
||||
rm translations/${PN}_${1}.{ts,qm} || die "removing ${1} locale failed"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
qt4-r2_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
eqmake4 PREFIX="${EPREFIX}/usr"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
readme.gentoo_create_doc
|
||||
qt4-r2_src_install
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
gnome2_icon_savelist
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
readme.gentoo_pkg_postinst
|
||||
gnome2_icon_cache_update
|
||||
fdo-mime_desktop_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
fdo-mime_desktop_database_update
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST gummi-0.6.5.tar.gz 520902 SHA256 b23c2958376ea43c701a276ad19ceac5b50d9cb32a489a10897b25aa5004fffb SHA512 9a35533273ff5f2606ba1d79c01dcdf14f2a47628eb5d19613330650ed2a2bd542461492d031e51b773e13c6ac406b564e6703919f16e5f8d7e6bb3c4428b40e WHIRLPOOL 47e1ad5a15183ed0d24a88ebc3bc1af166604825da54db10461243ba4c1b8d6ca82d1afaf7306ef45a4df0f65d103b6cbc83db02cb6469fb7138545e16ae2728
|
||||
DIST gummi-0.6.6.tar.gz 792642 SHA256 4119341d6556d82f4b8ce08ad67b6f92c1d9ad1fbad789b7faa7b2d38b7299da SHA512 3be94927c9aafa4914ed2b6f6f5022dce5bcca315a1f947fafb8a4c8bbc5a2bc57f07f8ceaaacdd0b92a5a30483ea8b00e570faf62479280d2ad874716e4c47d WHIRLPOOL 6125d930497d6f5a4f6d8604b39314b04e6e147f93a998f3fe722295f7d04f795a2e7e1f8eea21953eae7e69074dc9a9cdc6cefb29f59261c47ec000c55bc363
|
||||
|
@ -1,46 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=4
|
||||
inherit base eutils readme.gentoo
|
||||
|
||||
DESCRIPTION="Simple LaTeX editor for GTK+"
|
||||
HOMEPAGE="http://gummi.midnightcoding.org"
|
||||
SRC_URI="http://dev.midnightcoding.org/attachments/download/301/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE=""
|
||||
|
||||
LANGS="ar ca cs da de el es fr hu it nl pl pt pt_BR ro ru sv zh_CN zh_TW"
|
||||
|
||||
for X in ${LANGS} ; do
|
||||
IUSE="${IUSE} linguas_${X}"
|
||||
done
|
||||
|
||||
RDEPEND="app-text/gtkspell:2
|
||||
>=dev-libs/glib-2.28.6
|
||||
dev-texlive/texlive-latex
|
||||
dev-texlive/texlive-latexextra
|
||||
>=x11-libs/gtk+-2.24:2
|
||||
x11-libs/gtksourceview:2.0"
|
||||
DEPEND="${RDEPEND}
|
||||
app-text/poppler[cairo]
|
||||
x11-libs/gtksourceview:2.0
|
||||
x11-libs/pango"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog README )
|
||||
|
||||
src_prepare() {
|
||||
strip-linguas ${LANGS}
|
||||
DOC_CONTENTS="Gummi supports spell-checking through gtkspell. Support for
|
||||
additional languages can be added by installing myspell-** packages
|
||||
for your language of choice."
|
||||
}
|
||||
|
||||
src_install() {
|
||||
base_src_install
|
||||
readme.gentoo_create_doc
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST jedit5.0.0source.tar.bz2 2224469 SHA256 4464cbfe8a01cae15476d6b0cf57b4b89c1cb3d7b541ec2f48ed283385c015ce SHA512 376803339251ee389e6be0cd5267140e36a09120882a9fb8d989c0ed424e6680ede3c509d10fc3d3b8956d1219ff5c009d9b4fbd04e76b81a9be38f77383562d WHIRLPOOL efa3dc731086ecffbf4490c14a597b24ec7849b5c16f1f5df9d1483b08004433b4a478e96963e9e70ec5f7d584075fb65c2d3e63bd516125907998de649c1a70
|
||||
DIST jedit5.2.0source.tar.bz2 2456541 SHA256 1d444d2ceab62e449523ae336603fedee322d3655c9e5606d3b4d00c125c950f SHA512 5af99ac864dd70701f24435840e26f73077ba02d155319965122bd24871e6825b82383054d29dfec72bbbedaac72bfb2d86097de6a0c79341f0a279dacd60126 WHIRLPOOL e6a8e837317a2068fe808bc3ada39bf4730a5aaebeca60f7501b5fad2353a5f889b76778c59ffe39b34563107ba3ec02eec550cd612ddcbd00ee03616910cc19
|
||||
|
@ -1,101 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
JAVA_PKG_IUSE="doc test"
|
||||
|
||||
inherit java-pkg-2 java-ant-2 eutils fdo-mime
|
||||
|
||||
DESCRIPTION="Programmer's editor written in Java"
|
||||
HOMEPAGE="http://www.jedit.org"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${PN}${PV}source.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="amd64 ppc64 x86"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
# missing from tarball
|
||||
RESTRICT="test"
|
||||
|
||||
COMMON_DEP="
|
||||
dev-java/jsr305:0"
|
||||
RDEPEND="${COMMON_DEP}
|
||||
>=virtual/jre-1.6"
|
||||
DEPEND="${COMMON_DEP}
|
||||
>=virtual/jdk-1.6
|
||||
dev-java/ant-apache-bsf:0
|
||||
dev-java/ant-contrib:0
|
||||
dev-java/bsh[bsf]
|
||||
test? (
|
||||
dev-java/ant-junit:0
|
||||
)"
|
||||
|
||||
S="${WORKDIR}/jEdit"
|
||||
|
||||
JEDIT_HOME="/usr/share/${PN}"
|
||||
|
||||
java_prepare() {
|
||||
mkdir -p lib/{ant-contrib,compile,default-plugins,scripting} || die
|
||||
|
||||
# don't unconditionally run tests (which aren't even shipped)
|
||||
sed -i -e 's|\(depends="init,retrieve,setup,compile\),test|\1|' \
|
||||
build.xml || die
|
||||
}
|
||||
|
||||
JAVA_ANT_REWRITE_CLASSPATH="true"
|
||||
|
||||
EANT_ANT_TASKS="ant-apache-bsf ant-contrib bsh"
|
||||
EANT_GENTOO_CLASSPATH="jsr305"
|
||||
EANT_EXTRA_ARGS="-Divy.jar.present=true -Divy.done=true"
|
||||
EANT_BUILD_TARGET="build"
|
||||
# TODO could build more docs, ie generate-doc-faq generate-doc-news
|
||||
# generate-doc-users-guide ua.
|
||||
EANT_DOC_TARGET="generate-javadoc"
|
||||
# in fact needed only for docs, but shouldn't hurt
|
||||
EANT_NEEDS_TOOLS="true"
|
||||
|
||||
src_test() {
|
||||
java-pkg-2_src_test
|
||||
}
|
||||
|
||||
src_install () {
|
||||
dodir ${JEDIT_HOME}
|
||||
cp -R build/${PN}.jar jars doc keymaps macros modes properties startup \
|
||||
"${D}${JEDIT_HOME}" || die
|
||||
|
||||
java-pkg_regjar ${JEDIT_HOME}/${PN}.jar
|
||||
|
||||
java-pkg_dolauncher ${PN} --main org.gjt.sp.jedit.jEdit
|
||||
|
||||
use doc && java-pkg_dojavadoc build/classes/javadoc/api
|
||||
|
||||
make_desktop_entry ${PN} \
|
||||
jEdit \
|
||||
${JEDIT_HOME}/doc/${PN}.png \
|
||||
"Development;Utility;TextEditor"
|
||||
|
||||
# keep the plugin directory
|
||||
keepdir ${JEDIT_HOME}/jars
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
fdo-mime_desktop_database_update
|
||||
elog "The system directory for jEdit plugins is"
|
||||
elog "${JEDIT_HOME}/jars"
|
||||
elog "If you get plugin related errors on startup, first try updating them."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if [[ -z ${REPLACED_BY_VERSION} ]]; then
|
||||
fdo-mime_desktop_database_update
|
||||
elog "jEdit plugins installed into /usr/share/jedit/jars"
|
||||
elog "(after installation of jEdit itself) haven't been"
|
||||
elog "removed. To get rid of jEdit completely, you may"
|
||||
elog "want to run"
|
||||
elog ""
|
||||
elog " rm -r ${JEDIT_HOME}"
|
||||
fi
|
||||
}
|
@ -1,475 +0,0 @@
|
||||
# Copyright 1999-2016 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=6
|
||||
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}]
|
||||
x86? ( sys-devel/dev86
|
||||
sys-power/iasl )
|
||||
pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
|
||||
hvm? ( media-libs/libsdl )
|
||||
${PYTHON_DEPS}
|
||||
api? ( dev-libs/libxml2
|
||||
net-misc/curl )
|
||||
pygrub? ( $(python_gen_impl_dep ncurses) )
|
||||
ovmf? ( $(python_gen_impl_dep 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 use ovmf; then
|
||||
if [[ -n ${OVMF_VER} ]];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
|
||||
fi
|
||||
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
|
||||
}
|
@ -1,469 +0,0 @@
|
||||
# Copyright 1999-2016 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/
|
||||
# first instance of UPS_VER (usptream ver)
|
||||
UPS_VER=0
|
||||
SEC_VER=5
|
||||
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
|
||||
https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
|
||||
[[ -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}]
|
||||
x86? ( sys-devel/dev86
|
||||
sys-power/iasl )
|
||||
pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
|
||||
${PYTHON_DEPS}
|
||||
api? ( dev-libs/libxml2
|
||||
net-misc/curl )
|
||||
ovmf? ( $(python_gen_impl_dep 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 \
|
||||
"${WORKDIR}"/libexec.patch
|
||||
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
|
||||
}
|
@ -1,469 +0,0 @@
|
||||
# Copyright 1999-2016 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/
|
||||
# first instance of UPS_VER (usptream ver)
|
||||
UPS_VER=0
|
||||
SEC_VER=5
|
||||
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
|
||||
https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
|
||||
[[ -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 +qemu-traditional +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}]
|
||||
x86? ( sys-devel/dev86
|
||||
sys-power/iasl )
|
||||
pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
|
||||
${PYTHON_DEPS}
|
||||
api? ( dev-libs/libxml2
|
||||
net-misc/curl )
|
||||
ovmf? ( $(python_gen_impl_dep 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 \
|
||||
"${WORKDIR}"/libexec.patch
|
||||
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+=" $(use_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
|
||||
}
|
@ -1,192 +0,0 @@
|
||||
# Copyright 1999-2016 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=6
|
||||
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"
|
||||
|
||||
elog "You can optionally block the installation of /boot/xen-syms by an entry"
|
||||
elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
|
||||
elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
|
||||
}
|
@ -1,197 +0,0 @@
|
||||
# Copyright 1999-2016 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/
|
||||
# first instance of UPS_VER (usptream ver)
|
||||
UPS_VER=0
|
||||
SEC_VER=5
|
||||
GENTOO_VER=
|
||||
|
||||
[[ -n ${UPSTREAM_VER} ]] && \
|
||||
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
|
||||
https://dev.gentoo.org/~idella4/distfiles/${PN}-upstream-patches-${UPS_VER}.tar.gz"
|
||||
[[ -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}-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}"
|
||||
|
||||
# no tests are available for the hypervisor
|
||||
# prevent the silliness of /usr/lib/debug/usr/lib/debug files
|
||||
# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
|
||||
RESTRICT="test splitdebug strip"
|
||||
|
||||
# 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 \
|
||||
"${WORKDIR}"/libexec.patch
|
||||
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"
|
||||
|
||||
elog "You can optionally block the installation of /boot/xen-syms by an entry"
|
||||
elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
|
||||
elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
|
||||
}
|
@ -0,0 +1,189 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
VALA_USE_DEPEND="vapigen"
|
||||
# Vapigen is needed for the vala binding
|
||||
# Valac is needed when building from git for the engine
|
||||
UPSTREAM_VER=
|
||||
|
||||
inherit autotools bash-completion-r1 eutils gnome2-utils multilib python-single-r1 readme.gentoo-r1 vala virtualx
|
||||
|
||||
DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
|
||||
HOMEPAGE="https://github.com/ibus/ibus/wiki"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
|
||||
IUSE="deprecated gconf gtk +gtk3 +introspection nls +python test vala wayland +X"
|
||||
REQUIRED_USE="
|
||||
|| ( gtk gtk3 X )
|
||||
deprecated? ( python )
|
||||
vala? ( introspection )
|
||||
python? (
|
||||
${PYTHON_REQUIRED_USE}
|
||||
|| ( deprecated ( gtk3 introspection ) ) )" #342903
|
||||
|
||||
[[ -n ${UPSTREAM_VER} ]] && \
|
||||
UPSTRAM_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
|
||||
|
||||
SRC_URI="https://github.com/ibus/ibus/releases/download/${PV}/${P}.tar.gz
|
||||
${UPSTRAM_PATCHSET_URI}"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=dev-libs/glib-2.26:2
|
||||
gnome-base/librsvg:2
|
||||
sys-apps/dbus[X?]
|
||||
app-text/iso-codes
|
||||
>=gnome-base/dconf-0.13.4
|
||||
x11-libs/libnotify
|
||||
gconf? ( >=gnome-base/gconf-2.12:2 )
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
gtk3? ( x11-libs/gtk+:3 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
X? (
|
||||
x11-libs/libX11
|
||||
x11-libs/gtk+:2 )
|
||||
introspection? ( >=dev-libs/gobject-introspection-0.6.8 )
|
||||
nls? ( virtual/libintl )
|
||||
wayland? ( dev-libs/wayland )"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
x11-apps/setxkbmap
|
||||
python? (
|
||||
dev-python/pyxdg
|
||||
deprecated? (
|
||||
>=dev-python/dbus-python-0.83
|
||||
dev-python/pygobject:2
|
||||
dev-python/pygtk:2 )
|
||||
gtk3? (
|
||||
dev-python/pygobject:3
|
||||
x11-libs/gdk-pixbuf:2[introspection]
|
||||
x11-libs/pango[introspection]
|
||||
x11-libs/gtk+:3[introspection] )
|
||||
)"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=dev-lang/perl-5.8.1
|
||||
dev-util/gtk-doc-am
|
||||
dev-util/intltool
|
||||
virtual/pkgconfig
|
||||
nls? ( >=sys-devel/gettext-0.16.1 )
|
||||
vala? ( $(vala_depend) )"
|
||||
|
||||
# stress test in bus/ fails
|
||||
# IBUS-CRITICAL **: bus_test_client_init: assertion `ibus_bus_is_connected (_bus)' failed
|
||||
RESTRICT="test"
|
||||
|
||||
DOCS="AUTHORS ChangeLog NEWS README"
|
||||
|
||||
DISABLE_AUTOFORMATTING="yes"
|
||||
DOC_CONTENTS="To use ibus, you should:
|
||||
1. Get input engines from sunrise overlay.
|
||||
Run \"emerge -s ibus-\" in your favorite terminal
|
||||
for a list of packages we already have.
|
||||
|
||||
2. Setup ibus:
|
||||
$ ibus-setup
|
||||
|
||||
3. Set the following in your user startup scripts
|
||||
such as .xinitrc, .xsession or .xprofile:
|
||||
|
||||
export XMODIFIERS=\"@im=ibus\"
|
||||
export GTK_IM_MODULE=\"ibus\"
|
||||
export QT_IM_MODULE=\"xim\"
|
||||
ibus-daemon -d -x
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Upstream's patchset
|
||||
if [[ -n ${UPSTREAM_VER} ]]; then
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
EPATCH_OPTS="-p1" \
|
||||
epatch "${WORKDIR}"/patches-upstream
|
||||
fi
|
||||
|
||||
# We run "dconf update" in pkg_postinst/postrm to avoid sandbox violations
|
||||
sed -e 's/dconf update/:/' \
|
||||
-i data/dconf/Makefile.{am,in} || die
|
||||
use vala && vala_src_prepare
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local python_conf
|
||||
if use python; then
|
||||
python_conf="PYTHON=${PYTHON}
|
||||
$(use_enable deprecated python-library)
|
||||
$(use_enable gtk3 setup)"
|
||||
else
|
||||
python_conf="--disable-python-library --disable-setup"
|
||||
fi
|
||||
econf \
|
||||
--enable-dconf \
|
||||
$(use_enable introspection) \
|
||||
$(use_enable gconf) \
|
||||
$(use_enable gtk gtk2) \
|
||||
$(use_enable gtk xim) \
|
||||
$(use_enable gtk3) \
|
||||
$(use_enable gtk3 ui) \
|
||||
$(use_enable nls) \
|
||||
$(use_enable test tests) \
|
||||
$(use_enable X xim) \
|
||||
$(use_enable vala) \
|
||||
$(use_enable wayland) \
|
||||
${python_conf}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
unset DBUS_SESSION_BUS_ADDRESS
|
||||
Xemake check || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
prune_libtool_files --all
|
||||
|
||||
mv "${ED}"/usr/share/bash-completion/completions/ibus.bash "${T}"
|
||||
rm -rf "${ED}"/usr/share/bash-completion || die
|
||||
newbashcomp "${T}"/ibus.bash ${PN}
|
||||
insinto /etc/X11/xinit/xinput.d
|
||||
newins xinput-ibus ibus.conf
|
||||
|
||||
keepdir /usr/share/ibus/{engine,icons} #289547
|
||||
|
||||
use deprecated && python_optimize
|
||||
use python && use gtk3 && python_optimize
|
||||
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
use gconf && gnome2_gconf_savelist
|
||||
gnome2_schemas_savelist
|
||||
gnome2_icon_savelist
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use gconf && gnome2_gconf_install
|
||||
use gtk && gnome2_query_immodules_gtk2
|
||||
use gtk3 && gnome2_query_immodules_gtk3
|
||||
gnome2_schemas_update
|
||||
gnome2_icon_cache_update
|
||||
readme.gentoo_print_elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use gtk && gnome2_query_immodules_gtk2
|
||||
use gtk3 && gnome2_query_immodules_gtk3
|
||||
use gconf && gnome2_schemas_update
|
||||
gnome2_icon_cache_update
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST tagainijisho-1.0.2.tar.gz 24583552 SHA256 144a516a69d440014269dd2a11e10760fd9543726affd9af152b28e1e1d57c3f SHA512 78621af0f998c39acb1e1d1deb4f021e2fa8a1c7454955c0f5f18c49c456831cb3dc76ea9e53f70a23d3d43a93285da44537e72f690d94ba79b4814d512db02a WHIRLPOOL 0e9e97a79ea8d5f02045deac132e16a467b6d472c9c68ecc81207a0442ccc05e7abf67304737ea8d9450459265f9a208b3ac5e17c73e644820a2d53212481005
|
||||
DIST tagainijisho-1.0.3.tar.gz 24816175 SHA256 6fe3c579ec1cea6c41393ac9a82dd12d0e240032d2bb7837a90e470f480aaf4e SHA512 3afd75cc27e8701d93df54a2244b83090770cc80ac20ab8fb843d2ab925ab575f73d731a2ce736179fb7361af68e94694ec91f813d186c87e730368c41535c53 WHIRLPOOL aa4f26506f12f9502b4c9e3a31f0f970e5e6a9ee2892cae9f9edd53e683ff44cd6bb09cd18891ded199dd2835c97be1531c0043121ad161a6dc356bb960251cc
|
||||
|
@ -0,0 +1,15 @@
|
||||
https://github.com/Gnurou/tagainijisho/issues/163
|
||||
|
||||
--- src/sqlite/sqlite3ext.cc
|
||||
+++ src/sqlite/sqlite3ext.cc
|
||||
@@ -118,6 +118,10 @@
|
||||
sqlite3_stmt *pStmt;
|
||||
const char *zSql = "SELECT fts3_tokenizer(?, ?)";
|
||||
|
||||
+#ifdef SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
|
||||
+ sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, NULL);
|
||||
+#endif
|
||||
+
|
||||
rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
|
||||
if( rc!=SQLITE_OK ){
|
||||
return rc;
|
@ -1,59 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit cmake-utils gnome2-utils
|
||||
|
||||
DESCRIPTION="Open-source Japanese dictionary and kanji lookup tool"
|
||||
HOMEPAGE="http://www.tagaini.net/"
|
||||
SRC_URI="https://github.com/Gnurou/tagainijisho/releases/download/${PV}/${P}.tar.gz"
|
||||
LICENSE="GPL-3+ public-domain"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
DEPEND="dev-qt/qtcore:4
|
||||
dev-qt/qtgui:4
|
||||
dev-db/sqlite:3"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_linguas=( ar cs de es fi_FI fr it nb nl pt ru sv th tr vi )
|
||||
IUSE+=" ${pkg_linguas[@]/#/linguas_}"
|
||||
|
||||
src_configure() {
|
||||
# GUI linguas
|
||||
# en is not optional, and build fails if none other then en is set, so adding ja as non-optional too
|
||||
# linguas undeclared in IUSE will trigger an error, which is a handy check
|
||||
for lingua in $(ls -1 i18n/*.ts | sed -e 's/.*tagainijisho_\(.*\)\.ts/\1/' | grep -v en | grep -v ja); do
|
||||
if ! use linguas_${lingua}; then
|
||||
rm i18n/tagainijisho_${lingua}.ts || die
|
||||
fi
|
||||
done
|
||||
|
||||
# Dictionary linguas
|
||||
# en is not optional here either, but nothing special needs to be done
|
||||
# here too, linguas undeclared in IUSE will trigger an error
|
||||
local cmake_linguas
|
||||
for lingua in $(sed -e 's/;/ /g' -ne '/set(DICT_LANG ".*")/s/.*"\(.*\)".*/\1/p' CMakeLists.txt); do
|
||||
if use linguas_${lingua}; then
|
||||
cmake_linguas+=";${lingua}"
|
||||
fi
|
||||
done
|
||||
mycmakeargs=( -DDICT_LANG="${cmake_linguas};" )
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
gnome2_icon_savelist
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_icon_cache_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
inherit eutils multilib systemd udev
|
||||
|
||||
MY_P=${PN}_${PV}
|
||||
|
||||
DESCRIPTION="Linux kernel laptop_mode user-space utilities"
|
||||
HOMEPAGE="https://github.com/rickysarraf/laptop-mode-tools/wiki"
|
||||
SRC_URI="https://github.com/rickysarraf/${PN}/releases/download/${PV}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="+acpi apm bluetooth scsi"
|
||||
|
||||
RDEPEND="net-wireless/wireless-tools
|
||||
sys-apps/iproute2
|
||||
sys-apps/ethtool
|
||||
sys-apps/hdparm
|
||||
sys-apps/which
|
||||
acpi? ( sys-power/acpid )
|
||||
apm? ( sys-apps/apmd )
|
||||
bluetooth? ( net-wireless/bluez:= )
|
||||
scsi? ( sys-apps/sdparm )"
|
||||
DEPEND=""
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
src_prepare() {
|
||||
# This should avoid conflict with pm-powersave wrt #327443 and #396703
|
||||
cat <<-EOF > "${T}"/${PN}
|
||||
HOOK_BLACKLIST="00powersave"
|
||||
EOF
|
||||
}
|
||||
|
||||
src_compile() { :; }
|
||||
|
||||
src_install() {
|
||||
DESTDIR="${D}" \
|
||||
INIT_D="none" \
|
||||
MAN_D="/usr/share/man" \
|
||||
LIB_D="/usr/$(get_libdir)" \
|
||||
UDEV_D="$(get_udevdir)" \
|
||||
SYSTEMD_UNIT_D="$(systemd_get_unitdir)" \
|
||||
TMPFILES_D="/usr/lib/tmpfiles.d" \
|
||||
ACPI="$(use acpi && echo force || echo disabled)" \
|
||||
PMU="$(false && echo force || echo disabled)" \
|
||||
APM="$(use apm && echo force || echo disabled)" \
|
||||
SYSTEMD=yes \
|
||||
sh ./install.sh || die
|
||||
|
||||
dodoc Documentation/*.txt README.md
|
||||
newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode
|
||||
|
||||
# See src_prepare()
|
||||
insinto /etc/pm/config.d
|
||||
doins "${T}"/${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use acpi || use apm; then
|
||||
if use acpi; then
|
||||
daemon_name="acpid"
|
||||
elif use apm; then
|
||||
deamon_name="apmd"
|
||||
fi
|
||||
if [ "$(rc-config list default | grep laptop_mode)" = "" ] || [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then
|
||||
ewarn "To enable automatic power state event handling,"
|
||||
ewarn "e.g. enabling laptop_mode after unplugging the battery,"
|
||||
ewarn "both laptop_mode and the ${daemon_name} daemon must be"
|
||||
ewarn "added to default runlevel:"
|
||||
if [ "$(rc-config list default | grep laptop_mode)" = "" ]; then
|
||||
ewarn "# rc-update add laptop_mode default"
|
||||
fi
|
||||
if [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then
|
||||
ewarn "# rc-update add ${daemon_name} default"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
ewarn "Without USE=\"acpi\" or USE=\"apm\" ${PN} can not"
|
||||
ewarn "automatically disable laptop_mode on low battery."
|
||||
ewarn
|
||||
ewarn "This means you can lose up to 10 minutes of work if running"
|
||||
ewarn "out of battery while laptop_mode is enabled."
|
||||
ewarn
|
||||
ewarn "Please see laptop-mode.txt in /usr/share/doc/${PF} for further"
|
||||
ewarn "information."
|
||||
ewarn
|
||||
fi
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST gitgutter-20141101.tar.bz2 31556 SHA256 a7d65fe668e8e7a515a8637df7ed80b17f27a0f637a7882c0207f8bae035022f SHA512 cbe21df40a05caebd85ac24fd20a55cf784ff33f73a7d27bcb8e87b6a38cd787b801fa314bf7ba9eefbc703efff527c9ebd947768c5714e774e39e67c7d35055 WHIRLPOOL 92d4c59d1e3925afa7f93f30ce8f87c430bf556e9553601b8eaeeaa9538900899115309602b1a5c17e8be9cff9d5b69a0ae70470438841a7090aaa35f452bbd2
|
||||
DIST gitgutter-20160316.tar.bz2 37102 SHA256 41d3e44ae569cf208682e0e50b30bef669e195ad048196ec8fc91a9d8496637a SHA512 f63bb92097c1c52d5a6d84d9707358d4c3c681b1e7b5f4cc19846cda0ee5938d7f0180d5f9dcf259f06d32839e64ebbc4d7b4b681fc91cc785e484fba7d4c1b7 WHIRLPOOL 45a7fcb9108eeab47fdd2cfcc2f9409335d5b322d7bb1db58d9b702583b384d9c9a7ac7084620de1ce2a99370e87b29063291c8aee87c6710bf2153289afc003
|
||||
|
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
inherit vim-plugin
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
EGIT_REPO_URI="git://github.com/airblade/vim-gitgutter.git"
|
||||
inherit git-r3
|
||||
else
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="vim plugin: shows a git diff in the sign column and stages/reverts hunks"
|
||||
HOMEPAGE="https://github.com/airblade/vim-gitgutter/"
|
||||
LICENSE="MIT"
|
||||
VIM_PLUGIN_HELPFILES="${PN}.txt"
|
||||
|
||||
src_prepare() {
|
||||
rm README* screenshot.png || die
|
||||
rm -rf test || die
|
||||
}
|
@ -1,17 +1,23 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
inherit vim-plugin git-r3
|
||||
inherit vim-plugin
|
||||
|
||||
EGIT_REPO_URI="git://github.com/airblade/vim-gitgutter.git"
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
EGIT_REPO_URI="git://github.com/airblade/vim-gitgutter.git"
|
||||
inherit git-r3
|
||||
else
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="vim plugin: shows a git diff summary in the sign column and stages/reverts individual hunks"
|
||||
DESCRIPTION="vim plugin: shows a git diff in the sign column and stages/reverts hunks"
|
||||
HOMEPAGE="https://github.com/airblade/vim-gitgutter/"
|
||||
LICENSE="MIT"
|
||||
VIM_PLUGIN_HELPFILES="${PN}.txt"
|
||||
|
||||
src_prepare() {
|
||||
rm README* screenshot.png || die
|
||||
rm -rf test || die
|
||||
}
|
||||
|
@ -1,2 +1,3 @@
|
||||
DIST asio-1.10.6.tar.bz2 1266180 SHA256 e0d71c40a7b1f6c1334008fb279e7361b32a063e020efd21e40d9d8ff037195e SHA512 7146e75a378de57daab88e7ba509ae01367ffa0d7c4c90481e221977a6b9f4fd80e9caac5c6b4c27bc7652e44cd210e2c6cabf5681d7c62747df14bbc25e8c23 WHIRLPOOL c557736ff07ef15f2963bc64150c6f6c514f2cd0099f0c79588e79aef7148ff1f8478e5be4c6f4ed97f90792a85095c8190aba1891ccc605d53f00bea3497b32
|
||||
DIST asio-1.4.5.tar.bz2 877613 SHA256 33fcb5bdd88ec0833b0069b5d1e4aba6a257b1f55f728274dfca5316e99901ff SHA512 571f0bc183956c9bc6fa4150bdcdbf38e81b713e054a5d981be246b00058cef9fe7ac8f6f4d33993f183867cc57a0f75b2cbc480674277b1b491c62db89f9bf4 WHIRLPOOL 6f39c82c6794017868a482d59b7a887db92a08c2c02eb8bb002a0d94193936ece4d675ffbbbcfd182c4ad3f0a3580210a7e639714b172b9e313395a1818c37a8
|
||||
DIST asio-1.4.8.tar.bz2 907503 SHA256 8d6a594c15ef10b5779d0e80adb9483be1cd36f7ada401b40aa7df85559b1fb9 SHA512 74755767a90e87963352233ba0b1b865197262fc3fc2f2fa4446340d910de0f146454bf1b46736bb81aff4518bc64db1ee74f79966bcc1382774408468dd0540 WHIRLPOOL 646bec38ca0c7654fef93e2430ae61b09d08f26daeea464d2fb13487ef7ebc0345007e98909880c9428fe66bac5f0a102b95cc4b86ffaca4c6a4638bf20aa242
|
||||
|
@ -0,0 +1,47 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
DESCRIPTION="Asynchronous Network Library"
|
||||
HOMEPAGE="http://asio.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="Boost-1.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="doc examples ssl test"
|
||||
|
||||
RDEPEND="ssl? ( dev-libs/openssl:0= )
|
||||
>=dev-libs/boost-1.35.0"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
if ! use test; then
|
||||
# Don't build nor install any examples or unittests
|
||||
# since we don't have a script to run them
|
||||
cat > src/Makefile.in <<-EOF
|
||||
all:
|
||||
|
||||
install:
|
||||
EOF
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
if use examples; then
|
||||
if use test; then
|
||||
# Get rid of the object files
|
||||
emake clean
|
||||
fi
|
||||
dodoc -r src/examples
|
||||
fi
|
||||
if use doc; then
|
||||
docinto /usr/share/doc/${PF}/html
|
||||
dodoc -r doc/*
|
||||
fi
|
||||
}
|
@ -0,0 +1 @@
|
||||
DIST picojson-1.3.0.tar.gz 14695 SHA256 056805ca2691798f5545935a14bb477f2e1d827c9fb862e6e449dbea22801c7d SHA512 76d5a6b3b9e1151198eee707faffcbbba28a2842daccf03d99a5d02ae017f9517ef3ac9da4acc74a4fc1357feaf19e14a15c34698a1d4cb65acb6d23b566b284 WHIRLPOOL 6712331107e5900c68db49f0eab9c18333717ea7e2fe407c684b8c0bb88616665664b995107772056179d4254fb3dde510858f623c76b8b9c3b9bd768043c19c
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>aballier@gentoo.org</email>
|
||||
<name>Alexis Ballier</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,33 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="Header-file-only, JSON parser serializer in C++"
|
||||
HOMEPAGE="https://github.com/kazuho/picojson"
|
||||
SRC_URI="https://github.com/kazuho/picojson/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
:
|
||||
}
|
||||
|
||||
src_test() {
|
||||
tc-export CXX
|
||||
emake test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install
|
||||
dodoc README.mkdn Changes
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST wfmath-1.0.1.tar.bz2 389227 SHA256 1503f0efaf9b27bf96547888062492c2412aebc32a0e407d58d50b84e3e2a506 SHA512 4017a572f946182c7aed4ffb8dfe139f85f5bb946a42bd593579030ee9f5617a07859f62b1169322d613919b37a0ff39079aa989f960d22b6cedfb9c3e7701bc WHIRLPOOL 3c3c78bed0d8d5c70cf4343b54e292bf92856b6629924f75c6c3fc769ae60d816f793c9cbe1fb3161491a90b06d52b1da58557c9ac99a9394fa61baef1946dcc
|
||||
DIST wfmath-1.0.2.tar.bz2 399987 SHA256 7072d640597bf102c6641e9237aaec6582849ef6c1cdc3062e369f070e20d883 SHA512 3506dbaed5db914b0be5483d5b589d95ed495b6375384e4b045844f8d76240f97b5c322ac432faf177f16da0fedd0b0e6006877a9b40e7f5d31d3324efa6de57 WHIRLPOOL fe10805d66707d9b99faa31aa6f048a8ec12c20b47d96ce2f72da253a5e152e069775d65c56da059ca74689eb44d5848dbbf4dd2d1a3f6001bd2b76ac9e8f378
|
||||
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="Worldforge math library"
|
||||
HOMEPAGE="http://www.worldforge.org/dev/eng/libraries/wfmath"
|
||||
SRC_URI="mirror://sourceforge/worldforge/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="doc static-libs"
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="doc? ( app-doc/doxygen )
|
||||
virtual/pkgconfig"
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable static-libs static)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
use doc && emake -C doc docs
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
use doc && dohtml doc/html/*
|
||||
prune_libtool_files
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
# ebuild generated by hackport 0.4.6.9999
|
||||
|
||||
CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
|
||||
inherit haskell-cabal
|
||||
|
||||
DESCRIPTION="Binary serialisation for Haskell values using lazy ByteStrings"
|
||||
HOMEPAGE="https://github.com/kolmodin/binary"
|
||||
SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE=""
|
||||
|
||||
RESTRICT=test # binary[test]->test-framework->text->xml->binary
|
||||
|
||||
RDEPEND=">=dev-lang/ghc-7.4.1:=
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-haskell/cabal-1.8
|
||||
test? ( dev-haskell/hunit
|
||||
>=dev-haskell/quickcheck-2.8
|
||||
>=dev-haskell/random-1.0.1.0
|
||||
dev-haskell/test-framework
|
||||
>=dev-haskell/test-framework-quickcheck2-0.3 )
|
||||
"
|
||||
|
||||
CABAL_CORE_LIB_GHC_PV="PM:7.10.3_rc1 PM:7.10.3"
|
@ -0,0 +1,59 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
# ebuild generated by hackport 0.4.5.9999
|
||||
|
||||
CABAL_FEATURES="lib profile test-suite"
|
||||
CABAL_FEATURES+=" bootstrap" # does not need cabal to build itself
|
||||
inherit haskell-cabal
|
||||
|
||||
MY_PN="Cabal"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="A framework for packaging Haskell software"
|
||||
HOMEPAGE="http://www.haskell.org/cabal/"
|
||||
SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
RESTRICT=test
|
||||
|
||||
RDEPEND=">=dev-lang/ghc-7.8.1:="
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-haskell/extensible-exceptions
|
||||
dev-haskell/hunit
|
||||
>=dev-haskell/quickcheck-2.1.0.1:2 <dev-haskell/quickcheck-2.9:2
|
||||
dev-haskell/regex-posix
|
||||
dev-haskell/test-framework
|
||||
dev-haskell/test-framework-hunit
|
||||
>=dev-haskell/test-framework-quickcheck2-0.2.12 )
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
src_prepare() {
|
||||
if [[ -n ${LIVE_EBUILD} ]]; then
|
||||
CABAL_FILE=${MY_PN}.cabal cabal_chdeps 'version: 1.17.0' "version: ${PV}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
cabal-is-dummy-lib && return
|
||||
|
||||
einfo "Bootstrapping Cabal..."
|
||||
$(ghc-getghc) ${HCFLAGS} -i -i. -i"${WORKDIR}/${FP_P}" -cpp --make Setup.hs \
|
||||
-o setup || die "compiling Setup.hs failed"
|
||||
cabal-configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cabal-is-dummy-lib && return
|
||||
|
||||
cabal-build
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST R-20130129.bash_completion.bz2 4209 SHA256 487e969b94563fec98ec58de7e6142e9361d4219088add0fca282b482a9e01b1 SHA512 910b26e16cfebe677f438abfa5f2652e582db143d91dbf0e7d4b1ea33462c7e5c89c3a3619c63ae98bba26b11a5adb16eda9d344f8cdbe4f0feabc546993c1a5 WHIRLPOOL 2368efaed37fcb6e010f6a234864631f68549bd8e3f733561170cc5b28f5557e546d8561246fb265a481a47991a262fec3acf6abc1dc3929a9357405e0d3c6fc
|
||||
DIST R-3.2.2.tar.gz 29772864 SHA256 9c9152e74134b68b0f3a1c7083764adc1cb56fd8336bec003fd0ca550cd2461d SHA512 71ba470875262b9f00fb6970f209788df4dad30e0a28373b824b60d8bc6401afb7786e65387663c6490c7ddcd2bfd7f808a270a3e63238f3d7565d5f93607138 WHIRLPOOL fea59929ada1d67dafc6ad89409d18ad173af7990384033f490a00e0f794d9919aecf7cd37089d105fe03b9cf64d079e5d148622571cec3eb924c1c5bd00081e
|
||||
DIST R-3.2.3.tar.gz 29816176 SHA256 b93b7d878138279234160f007cb9b7f81b8a72c012a15566e9ec5395cfd9b6c1 SHA512 9d7294af860204f4d84e25eb503111c9607beedbc42f01de073c915945a6342c3e24e25a9cc038a2e58442036bee931975d93dc327081ed02afe5ffa365170ea WHIRLPOOL 31ecbaa5c4340e02551eefe17f7f2e9ae075778e7b568a2c477b9f31f1b9598380edb8cb53c713df6643d2cba62ea97c6f225490ade2fc8a9e2b4d88426c7883
|
||||
DIST R-3.2.4.tar.gz 29879523 SHA256 bafd405fe9c2fe3bbe47a8a7730ad120f03b7df9fb0f61674fca19cf061dd350 SHA512 a74f01a9b47437feb81520c10936a6f2bc7700900730ec87b7f1442ee90bcf1d7aac9ef3345aa046c0566f1920f114da0a616c5f355b1e8480dc01e311476cbf WHIRLPOOL 0277c372baaf6c50c403c03b8fef04e80e8690efad875c26a03283a4f4d32e53610091695922a57a2f8bee4ac1a568b36f1fbf929bf61d11298b81907a3aaac6
|
||||
|
@ -0,0 +1,206 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit bash-completion-r1 autotools eutils flag-o-matic fortran-2 multilib versionator toolchain-funcs
|
||||
|
||||
BCP=${PN}-20130129.bash_completion
|
||||
DESCRIPTION="Language and environment for statistical computing and graphics"
|
||||
HOMEPAGE="http://www.r-project.org/"
|
||||
SRC_URI="
|
||||
mirror://cran/src/base/R-3/${P}.tar.gz
|
||||
https://dev.gentoo.org/~bicatali/distfiles/${BCP}.bz2"
|
||||
|
||||
LICENSE="|| ( GPL-2 GPL-3 ) LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
|
||||
IUSE="cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs tiff tk X"
|
||||
REQUIRED_USE="png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )"
|
||||
|
||||
CDEPEND="
|
||||
app-arch/bzip2:0=
|
||||
app-arch/xz-utils:0=
|
||||
app-text/ghostscript-gpl
|
||||
>=dev-libs/libpcre-8.35:3=
|
||||
virtual/blas:0
|
||||
|| ( >=sys-apps/coreutils-8.15 sys-freebsd/freebsd-bin app-misc/realpath )
|
||||
cairo? ( x11-libs/cairo:0=[X] x11-libs/pango:0= )
|
||||
icu? ( dev-libs/icu:= )
|
||||
jpeg? ( virtual/jpeg:0 )
|
||||
lapack? ( virtual/lapack:0 )
|
||||
perl? ( dev-lang/perl )
|
||||
png? ( media-libs/libpng:0= )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
tiff? ( media-libs/tiff:0= )
|
||||
tk? ( dev-lang/tk:0= )
|
||||
X? ( x11-libs/libXmu:0= x11-misc/xdg-utils )"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
virtual/pkgconfig
|
||||
doc? (
|
||||
virtual/latex-base
|
||||
dev-texlive/texlive-fontsrecommended
|
||||
)"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
>=sys-libs/zlib-1.2.5.1-r2:0[minizip]
|
||||
java? ( >=virtual/jre-1.5 )"
|
||||
|
||||
RESTRICT="minimal? ( test )"
|
||||
|
||||
R_DIR="${EROOT%/}/usr/$(get_libdir)/${PN}"
|
||||
|
||||
pkg_setup() {
|
||||
if use openmp; then
|
||||
if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
|
||||
ewarn "OpenMP is not available in your current selected gcc"
|
||||
die "need openmp capable gcc"
|
||||
fi
|
||||
FORTRAN_NEED_OPENMP=1
|
||||
fi
|
||||
fortran-2_pkg_setup
|
||||
filter-ldflags -Wl,-Bdirect -Bdirect
|
||||
# avoid using existing R installation
|
||||
unset R_HOME
|
||||
# Temporary fix for bug #419761
|
||||
if [[ ($(tc-getCC) == *gcc) && ($(gcc-version) == 4.7) ]]; then
|
||||
append-flags -fno-ipa-cp-clone
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch \
|
||||
"${FILESDIR}"/${PN}-2.11.1-parallel.patch \
|
||||
"${FILESDIR}"/${PN}-2.13.1-zlib_header_fix.patch \
|
||||
"${FILESDIR}"/${PN}-3.0.0-rmath-shared.patch
|
||||
|
||||
# fix packages.html for doc (gentoo bug #205103)
|
||||
sed -i \
|
||||
-e "s:../../../library:../../../../$(get_libdir)/R/library:g" \
|
||||
src/library/tools/R/Rd.R || die
|
||||
|
||||
# fix Rscript path when installed (gentoo bug #221061)
|
||||
sed -i \
|
||||
-e "s:-DR_HOME='\"\$(rhome)\"':-DR_HOME='\"${R_DIR}\"':" \
|
||||
src/unix/Makefile.in || die "sed unix Makefile failed"
|
||||
|
||||
# fix HTML links to manual (gentoo bug #273957)
|
||||
sed -i \
|
||||
-e 's:\.\./manual/:manual/:g' \
|
||||
$(grep -Flr ../manual/ doc) || die "sed for HTML links failed"
|
||||
|
||||
use lapack && \
|
||||
export LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)"
|
||||
|
||||
if use X; then
|
||||
export R_BROWSER="$(type -p xdg-open)"
|
||||
export R_PDFVIEWER="$(type -p xdg-open)"
|
||||
fi
|
||||
use perl && \
|
||||
export PERL5LIB="${S}/share/perl:${PERL5LIB:+:}${PERL5LIB}"
|
||||
|
||||
# don't search /usr/local
|
||||
sed -i -e '/FLAGS=.*\/local\//c\: # removed by ebuild' configure.ac || die
|
||||
# Fix for Darwin (OS X)
|
||||
if use prefix; then
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
sed -i \
|
||||
-e 's:-install_name libR.dylib:-install_name ${libdir}/R/lib/libR.dylib:' \
|
||||
-e 's:-install_name libRlapack.dylib:-install_name ${libdir}/R/lib/libRlapack.dylib:' \
|
||||
-e 's:-install_name libRblas.dylib:-install_name ${libdir}/R/lib/libRblas.dylib:' \
|
||||
-e "/SHLIB_EXT/s/\.so/.dylib/" \
|
||||
configure.ac || die
|
||||
# sort of "undo" 2.14.1-rmath-shared.patch
|
||||
sed -i \
|
||||
-e "s:-Wl,-soname=libRmath.so:-install_name ${EROOT%/}/usr/$(get_libdir)/libRmath.dylib:" \
|
||||
src/nmath/standalone/Makefile.in || die
|
||||
else
|
||||
append-ldflags -Wl,-rpath="${EROOT%/}/usr/$(get_libdir)/R/lib"
|
||||
fi
|
||||
fi
|
||||
AT_M4DIR=m4 eaclocal
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# --with-system-tre \
|
||||
# tre is patched from upstream
|
||||
econf \
|
||||
--enable-byte-compiled-packages \
|
||||
--enable-R-shlib \
|
||||
--disable-R-framework \
|
||||
--with-system-zlib \
|
||||
--with-system-bzlib \
|
||||
--with-system-pcre \
|
||||
--with-system-xz \
|
||||
--with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
|
||||
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
||||
rdocdir="${EPREFIX}/usr/share/doc/${PF}" \
|
||||
$(use_enable nls) \
|
||||
$(use_enable openmp) \
|
||||
$(use_enable profile R-profiling) \
|
||||
$(use_enable profile memory-profiling) \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable static-libs R-static-lib) \
|
||||
$(use_with cairo) \
|
||||
$(use_with icu ICU) \
|
||||
$(use_with jpeg jpeglib) \
|
||||
$(use_with lapack) \
|
||||
$(use_with !minimal recommended-packages) \
|
||||
$(use_with png libpng) \
|
||||
$(use_with readline) \
|
||||
$(use_with tiff libtiff) \
|
||||
$(use_with tk tcltk) \
|
||||
$(use_with tk tk-config "${EPREFIX}"/usr/lib/tkConfig.sh) \
|
||||
$(use_with tk tcl-config "${EPREFIX}"/usr/lib/tclConfig.sh) \
|
||||
$(use_with X x)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export VARTEXFONTS="${T}/fonts"
|
||||
emake AR="$(tc-getAR)"
|
||||
emake -C src/nmath/standalone \
|
||||
shared $(use static-libs && echo static) AR="$(tc-getAR)"
|
||||
use doc && emake info pdf
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
emake -j1 -C src/nmath/standalone DESTDIR="${D}" install
|
||||
|
||||
if use doc; then
|
||||
emake DESTDIR="${D}" install-info install-pdf
|
||||
dosym ../manual /usr/share/doc/${PF}/html/manual
|
||||
fi
|
||||
|
||||
cat > 99R <<-EOF
|
||||
LDPATH=${R_DIR}/lib
|
||||
R_HOME=${R_DIR}
|
||||
EOF
|
||||
doenvd 99R
|
||||
newbashcomp "${WORKDIR}"/${BCP} ${PN}
|
||||
# The buildsystem has a different understanding of install_names than
|
||||
# we require. Since it builds modules like shared objects (wrong), many
|
||||
# objects (all modules) get an incorrect install_name. Fixing the build
|
||||
# system here is not really trivial.
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
local mod
|
||||
pushd "${ED}"/usr/lib/R > /dev/null
|
||||
for mod in $(find . -name "*.dylib") ; do
|
||||
mod=${mod#./}
|
||||
install_name_tool -id "${EPREFIX}/usr/lib/R/${mod}" \
|
||||
"${mod}"
|
||||
done
|
||||
popd > /dev/null
|
||||
fi
|
||||
docompress -x /usr/share/doc/${PF}/NEWS.rds
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use java; then
|
||||
einfo "Re-initializing java paths for ${P}"
|
||||
R CMD javareconf
|
||||
fi
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
commit 5cc08ebf2f346992a0abd4440252165c90b5ec05
|
||||
Author: Sergei Trofimovich <siarheit@google.com>
|
||||
Date: Sat Jun 20 12:23:00 2015 +0100
|
||||
|
||||
Recognise 'hardhloat' as a valid vendor in a host tuple
|
||||
|
||||
Observed on a tuple armv7a-hardfloat-linux-gnueabi:
|
||||
> Unknown vendor hardfloat
|
||||
|
||||
Reported-by: Sergey Alirzaev
|
||||
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
||||
|
||||
diff --git a/aclocal.m4 b/aclocal.m4
|
||||
index 590edb0..958622c 100644
|
||||
--- a/aclocal.m4
|
||||
+++ b/aclocal.m4
|
||||
@@ -1966,6 +1966,9 @@ AC_DEFUN([GHC_CONVERT_VENDOR],[
|
||||
softfloat) # like armv5tel-softfloat-linux-gnueabi
|
||||
$2="unknown"
|
||||
;;
|
||||
+ hardfloat) # like armv7a-hardfloat-linux-gnueabi
|
||||
+ $2="unknown"
|
||||
+ ;;
|
||||
*)
|
||||
#pass thru by default
|
||||
$2="$1"
|
@ -0,0 +1,45 @@
|
||||
diff --git a/ANNOUNCE b/ANNOUNCE
|
||||
index 7812eba..0018b37 100644
|
||||
--- a/ANNOUNCE
|
||||
+++ b/ANNOUNCE
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
==============================================================
|
||||
- The (Interactive) Glasgow Haskell Compiler -- version 7.10.2
|
||||
+ The (Interactive) Glasgow Haskell Compiler -- version 7.10.3
|
||||
==============================================================
|
||||
|
||||
The GHC Team is pleased to announce a new minor release of GHC. This is a
|
||||
@@ -29,7 +29,7 @@ bug-fix release and contains a number of important fixes,
|
||||
A more thorough list of the changes in the release can be found in the release
|
||||
notes,
|
||||
|
||||
- http://haskell.org/ghc/docs/7.10.2/html/users_guide/release-7-10-2.html
|
||||
+ http://haskell.org/ghc/docs/7.10.3/html/users_guide/release-7-10-3.html
|
||||
|
||||
|
||||
How to get it
|
||||
diff --git a/docs/users_guide/intro.xml b/docs/users_guide/intro.xml
|
||||
index 3292334..fb7116e 100644
|
||||
--- a/docs/users_guide/intro.xml
|
||||
+++ b/docs/users_guide/intro.xml
|
||||
@@ -309,6 +309,7 @@
|
||||
|
||||
&relnotes1;
|
||||
&relnotes2;
|
||||
+&relnotes3;
|
||||
|
||||
</chapter>
|
||||
|
||||
diff --git a/docs/users_guide/ug-ent.xml.in b/docs/users_guide/ug-ent.xml.in
|
||||
index b696aad..3629e93 100644
|
||||
--- a/docs/users_guide/ug-ent.xml.in
|
||||
+++ b/docs/users_guide/ug-ent.xml.in
|
||||
@@ -5,6 +5,7 @@
|
||||
<!ENTITY intro SYSTEM "intro.xml" >
|
||||
<!ENTITY relnotes1 SYSTEM "7.10.1-notes.xml" >
|
||||
<!ENTITY relnotes2 SYSTEM "7.10.2-notes.xml" >
|
||||
+<!ENTITY relnotes3 SYSTEM "7.10.3-notes.xml" >
|
||||
<!ENTITY using SYSTEM "using.xml" >
|
||||
<!ENTITY code-gens SYSTEM "codegens.xml" >
|
||||
<!ENTITY runtime SYSTEM "runtime_control.xml" >
|
@ -0,0 +1,672 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
# to make make a crosscompiler use crossdev and symlink ghc tree into
|
||||
# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
|
||||
#
|
||||
# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
if [[ ${CTARGET} = ${CHOST} ]] ; then
|
||||
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
|
||||
export CTARGET=${CATEGORY/cross-}
|
||||
fi
|
||||
fi
|
||||
|
||||
inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
|
||||
inherit multilib pax-utils toolchain-funcs versionator
|
||||
|
||||
DESCRIPTION="The Glasgow Haskell Compiler"
|
||||
HOMEPAGE="http://www.haskell.org/ghc/"
|
||||
|
||||
# we don't have any binaries yet
|
||||
arch_binaries=""
|
||||
|
||||
# sorted!
|
||||
#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
|
||||
#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
|
||||
arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PVR}-amd64.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
|
||||
#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
|
||||
arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PVR}-x86.tbz2 )"
|
||||
|
||||
# various ports:
|
||||
#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
|
||||
|
||||
# 0 - yet
|
||||
yet_binary() {
|
||||
case "${ARCH}" in
|
||||
#alpha) return 0 ;;
|
||||
#arm)
|
||||
# ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
|
||||
# return 0
|
||||
#;;
|
||||
amd64) return 0 ;;
|
||||
#ia64) return 0 ;;
|
||||
#ppc) return 0 ;;
|
||||
#ppc64) return 0 ;;
|
||||
#sparc) return 0 ;;
|
||||
x86) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
GHC_PV=${PV}
|
||||
#GHC_PV=7.10.2.20151030 # uncomment only for -rc ebuilds
|
||||
GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
|
||||
|
||||
SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
|
||||
S="${WORKDIR}"/${GHC_P}
|
||||
|
||||
[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
|
||||
|
||||
BUMP_LIBRARIES=(
|
||||
# "hackage-name hackage-version"
|
||||
"binary 0.7.6.1"
|
||||
"hoopl 3.10.2.0"
|
||||
"transformers 0.4.3.0"
|
||||
)
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc ghcbootstrap ghcmakebinary +gmp"
|
||||
IUSE+=" binary"
|
||||
IUSE+=" elibc_glibc" # system stuff
|
||||
|
||||
RDEPEND="
|
||||
>=dev-lang/perl-5.6.1
|
||||
>=dev-libs/gmp-5:=
|
||||
sys-libs/ncurses:=[unicode]
|
||||
!ghcmakebinary? ( virtual/libffi:= )
|
||||
!kernel_Darwin? ( >=sys-devel/gcc-2.95.3:* )
|
||||
kernel_linux? ( >=sys-devel/binutils-2.17:* )
|
||||
kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
|
||||
"
|
||||
|
||||
# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
|
||||
# that we want the binaries to use the latest versioun available, and not to be
|
||||
# built against gmp-4
|
||||
|
||||
# similar for glibc. we have bootstrapped binaries against glibc-2.17
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-text/docbook-xml-dtd:4.2
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
app-text/docbook-xsl-stylesheets
|
||||
>=dev-libs/libxslt-1.1.2 )
|
||||
!ghcbootstrap? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
|
||||
|
||||
PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
|
||||
|
||||
REQUIRED_USE="?? ( ghcbootstrap binary )"
|
||||
|
||||
# haskell libraries built with cabal in configure mode, #515354
|
||||
QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
|
||||
|
||||
is_crosscompile() {
|
||||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
# returns tool prefix for crosscompiler.
|
||||
# Example:
|
||||
# CTARGET=armv7a-unknown-linux-gnueabi
|
||||
# CHOST=x86_64-pc-linux-gnu
|
||||
# "armv7a-unknown-linux-gnueabi-"
|
||||
# CTARGET=${CHOST}
|
||||
# ""
|
||||
# Used in tools and library prefix:
|
||||
# "${ED}"/usr/bin/$(cross)haddock
|
||||
# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
|
||||
|
||||
cross() {
|
||||
if is_crosscompile; then
|
||||
echo "${CTARGET}-"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
append-ghc-cflags() {
|
||||
local persistent compile assemble link
|
||||
local flag ghcflag
|
||||
|
||||
for flag in $*; do
|
||||
case ${flag} in
|
||||
persistent) persistent="yes";;
|
||||
compile) compile="yes";;
|
||||
assemble) assemble="yes";;
|
||||
link) link="yes";;
|
||||
*)
|
||||
[[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
[[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
[[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# $1 - lib name (under libraries/)
|
||||
# $2 - lib version
|
||||
# example: bump_lib "transformers" "0.4.2.0"
|
||||
bump_lib() {
|
||||
local pn=$1 pv=$2
|
||||
local p=${pn}-${pv}
|
||||
local f
|
||||
|
||||
einfo "Bumping ${pn} up to ${pv}"
|
||||
|
||||
for f in ghc.mk GNUmakefile; do
|
||||
mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
|
||||
done
|
||||
mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
|
||||
mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
|
||||
}
|
||||
|
||||
update_SRC_URI() {
|
||||
local p pn pv
|
||||
for p in "${BUMP_LIBRARIES[@]}"; do
|
||||
set -- $p
|
||||
pn=$1 pv=$2
|
||||
|
||||
SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
|
||||
done
|
||||
}
|
||||
|
||||
update_SRC_URI
|
||||
|
||||
bump_libs() {
|
||||
local p pn pv
|
||||
for p in "${BUMP_LIBRARIES[@]}"; do
|
||||
set -- $p
|
||||
pn=$1 pv=$2
|
||||
|
||||
bump_lib "${pn}" "${pv}"
|
||||
done
|
||||
}
|
||||
|
||||
ghc_setup_cflags() {
|
||||
if is_crosscompile; then
|
||||
export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
|
||||
export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
|
||||
einfo "Crosscompiling mode:"
|
||||
einfo " CHOST: ${CHOST}"
|
||||
einfo " CTARGET: ${CTARGET}"
|
||||
einfo " CFLAGS: ${CFLAGS}"
|
||||
einfo " LDFLAGS: ${LDFLAGS}"
|
||||
einfo " prefix: $(cross)"
|
||||
return
|
||||
fi
|
||||
# We need to be very careful with the CFLAGS we ask ghc to pass through to
|
||||
# gcc. There are plenty of flags which will make gcc produce output that
|
||||
# breaks ghc in various ways. The main ones we want to pass through are
|
||||
# -mcpu / -march flags. These are important for arches like alpha & sparc.
|
||||
# We also use these CFLAGS for building the C parts of ghc, ie the rts.
|
||||
strip-flags
|
||||
strip-unsupported-flags
|
||||
|
||||
# Cmm can't parse line numbers #482086
|
||||
replace-flags -ggdb[3-9] -ggdb2
|
||||
|
||||
GHC_FLAGS=""
|
||||
GHC_PERSISTENT_FLAGS=""
|
||||
for flag in ${CFLAGS}; do
|
||||
case ${flag} in
|
||||
|
||||
# Ignore extra optimisation (ghc passes -O to gcc anyway)
|
||||
# -O2 and above break on too many systems
|
||||
-O*) ;;
|
||||
|
||||
# Arch and ABI flags are what we're really after
|
||||
-m*) append-ghc-cflags compile assemble ${flag};;
|
||||
|
||||
# Sometimes it's handy to see backtrace of RTS
|
||||
# to get an idea what happens there
|
||||
-g*) append-ghc-cflags compile ${flag};;
|
||||
|
||||
# Ignore all other flags, including all -f* flags
|
||||
esac
|
||||
done
|
||||
|
||||
for flag in ${LDFLAGS}; do
|
||||
append-ghc-cflags link ${flag}
|
||||
done
|
||||
|
||||
# hardened-gcc needs to be disabled, because the mangler doesn't accept
|
||||
# its output.
|
||||
gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
|
||||
gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector
|
||||
|
||||
# prevent from failind building unregisterised ghc:
|
||||
# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
|
||||
use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
|
||||
# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
|
||||
# currently ghc fails to build haddock
|
||||
# http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
|
||||
use ia64 && append-ghc-cflags persistent compile -G0
|
||||
}
|
||||
|
||||
# substitutes string $1 to $2 in files $3 $4 ...
|
||||
relocate_path() {
|
||||
local from=$1
|
||||
local to=$2
|
||||
shift 2
|
||||
local file=
|
||||
for file in "$@"
|
||||
do
|
||||
sed -i -e "s|$from|$to|g" \
|
||||
"$file" || die "path relocation failed for '$file'"
|
||||
done
|
||||
}
|
||||
|
||||
# changes hardcoded ghc paths and updates package index
|
||||
# $1 - new absolute root path
|
||||
relocate_ghc() {
|
||||
local to=$1
|
||||
|
||||
# libdir for prebuilt binary and for current system may mismatch
|
||||
# It does for prefix installation for example: bug #476998
|
||||
local bin_ghc_prefix=${WORKDIR}/usr
|
||||
local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
|
||||
local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
|
||||
|
||||
# backup original script to use it later after relocation
|
||||
local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
|
||||
cp "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
|
||||
|
||||
if [[ ${bin_libdir} != $(get_libdir) ]]; then
|
||||
einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
|
||||
# moving the dir itself is not strictly needed
|
||||
# but then USE=binary would result in installing
|
||||
# in '${bin_libdir}'
|
||||
mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
|
||||
|
||||
relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
|
||||
"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/$(cross)hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
|
||||
"$gp_back" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
|
||||
fi
|
||||
|
||||
# Relocate from /usr to ${EPREFIX}/usr
|
||||
relocate_path "/usr" "${to}/usr" \
|
||||
"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/$(cross)hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
|
||||
|
||||
# this one we will use to regenerate cache
|
||||
# so it should point to current tree location
|
||||
relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
|
||||
|
||||
if use prefix; then
|
||||
# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
|
||||
# TODO: add the same for darwin's CHOST and it's DYLD_
|
||||
local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
|
||||
sed -i -e '2i'"$new_ldpath" \
|
||||
"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/$(cross)hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
|
||||
"$gp_back" \
|
||||
|| die "Adding LD_LIBRARY_PATH for wrappers failed"
|
||||
fi
|
||||
|
||||
# regenerate the binary package cache
|
||||
"$gp_back" recache || die "failed to update cache after relocation"
|
||||
rm "$gp_back"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# quiet portage about prebuilt binaries
|
||||
use binary && QA_PREBUILT="*"
|
||||
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
if use ghcbootstrap; then
|
||||
ewarn "You requested ghc bootstrapping, this is usually only used"
|
||||
ewarn "by Gentoo developers to make binary .tbz2 packages."
|
||||
|
||||
[[ -z $(type -P ghc) ]] && \
|
||||
die "Could not find a ghc to bootstrap with."
|
||||
else
|
||||
if ! yet_binary; then
|
||||
eerror "Please try emerging with USE=ghcbootstrap and report build"
|
||||
eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
|
||||
die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# Create the ${S} dir if we're using the binary version
|
||||
use binary && mkdir "${S}"
|
||||
|
||||
# the Solaris and Darwin binaries from ghc (maeder) need to be
|
||||
# unpacked separately, so prevent them from being unpacked
|
||||
local ONLYA=${A}
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.bz2 ;;
|
||||
esac
|
||||
unpack ${ONLYA}
|
||||
|
||||
if [[ -d "${S}"/libraries/dph ]]; then
|
||||
# Sometimes dph libs get accidentally shipped with ghc
|
||||
# but they are not installed unless user requests it.
|
||||
# We never install them.
|
||||
elog "Removing 'libraries/dph'"
|
||||
rm -rf "${S}"/libraries/dph
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
ghc_setup_cflags
|
||||
|
||||
if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
|
||||
# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
|
||||
# See bug #313635.
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
|
||||
"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}"
|
||||
|
||||
# allow hardened users use vanilla binary to bootstrap ghc
|
||||
# ghci uses mmap with rwx protection at it implements dynamic
|
||||
# linking on it's own (bug #299709)
|
||||
pax-mark -m "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/bin/ghc"
|
||||
fi
|
||||
|
||||
if use binary; then
|
||||
if use prefix; then
|
||||
relocate_ghc "${EPREFIX}"
|
||||
fi
|
||||
|
||||
# Move unpacked files to the expected place
|
||||
mv "${WORKDIR}/usr" "${S}"
|
||||
else
|
||||
if ! use ghcbootstrap; then
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*)
|
||||
# UPDATE ME for ghc-7
|
||||
mkdir "${WORKDIR}"/ghc-bin-installer || die
|
||||
pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
|
||||
use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
|
||||
use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
|
||||
use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
|
||||
use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
|
||||
popd > /dev/null
|
||||
|
||||
pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
|
||||
# fix the binaries so they run, on Solaris we need an
|
||||
# LD_LIBRARY_PATH which has our prefix libdirs, on
|
||||
# Darwin we need to replace the frameworks with our libs
|
||||
# from the prefix fix before installation, because some
|
||||
# of the tools are actually used during configure/make
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
|
||||
elif [[ ${CHOST} == *-darwin* ]] ; then
|
||||
local readline_framework=GNUreadline.framework/GNUreadline
|
||||
local gmp_framework=/opt/local/lib/libgmp.10.dylib
|
||||
local ncurses_file=/opt/local/lib/libncurses.5.dylib
|
||||
for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
|
||||
install_name_tool -change \
|
||||
${readline_framework} \
|
||||
"${EPREFIX}"/lib/libreadline.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${gmp_framework} \
|
||||
"${EPREFIX}"/usr/lib/libgmp.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${ncurses_file} \
|
||||
"${EPREFIX}"/usr/lib/libncurses.dylib \
|
||||
${binary} || die
|
||||
done
|
||||
# we don't do frameworks!
|
||||
sed -i \
|
||||
-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
|
||||
-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
|
||||
rts/package.conf.in || die
|
||||
fi
|
||||
|
||||
# it is autoconf, but we really don't want to give it too
|
||||
# much arguments, in fact we do the make in-place anyway
|
||||
./configure --prefix="${WORKDIR}"/usr || die
|
||||
make install || die
|
||||
popd > /dev/null
|
||||
;;
|
||||
*)
|
||||
relocate_ghc "${WORKDIR}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
|
||||
"${S}/ghc/ghc.wrapper"
|
||||
|
||||
cd "${S}" # otherwise epatch will break
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.10.1-rc3-ghc-7.10-bootstrap.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.10.3-relnotes.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.10.3-hardfloat.patch
|
||||
|
||||
# Since ${S}/packages does not include base, etc. add them to gen_contents_index
|
||||
sed -e 's@\(for REPO in .*\)@\1 base integer-gmp integer-gmp2 integer-simple template-haskell@' \
|
||||
-i libraries/gen_contents_index || die
|
||||
|
||||
if use prefix; then
|
||||
# Make configure find docbook-xsl-stylesheets from Prefix
|
||||
sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
|
||||
-i utils/haddock/doc/configure.ac || die
|
||||
fi
|
||||
|
||||
bump_libs
|
||||
|
||||
# as we have changed the build system
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if ! use binary; then
|
||||
# initialize build.mk
|
||||
echo '# Gentoo changes' > mk/build.mk
|
||||
|
||||
# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
|
||||
echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
|
||||
# We also need to use the GHC_FLAGS flags when building ghc itself
|
||||
echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
|
||||
echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
|
||||
echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
|
||||
|
||||
# We can't depend on haddock except when bootstrapping when we
|
||||
# must build docs and include them into the binary .tbz2 package
|
||||
# app-text/dblatex is not in portage, can not build PDF or PS
|
||||
echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
|
||||
if use doc; then
|
||||
echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
|
||||
else
|
||||
echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# this controls presence on 'xhtml' and 'haddock' in final install
|
||||
echo "HADDOCK_DOCS = YES" >> mk/build.mk
|
||||
|
||||
# allows overriding build flavours for libraries:
|
||||
# v - vanilla (static libs)
|
||||
# p - profiled
|
||||
# dyn - shared libraries
|
||||
# example: GHC_LIBRARY_WAYS="v dyn"
|
||||
if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
|
||||
echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# Get ghc from the unpacked binary .tbz2
|
||||
# except when bootstrapping we just pick ghc up off the path
|
||||
if ! use ghcbootstrap; then
|
||||
export PATH="${WORKDIR}/usr/bin:${PATH}"
|
||||
fi
|
||||
|
||||
if use gmp; then
|
||||
echo "INTEGER_LIBRARY=integer-gmp2" >> mk/build.mk
|
||||
else
|
||||
echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# don't strip anything. Very useful when stage2 SIGSEGVs on you
|
||||
echo "STRIP_CMD = :" >> mk/build.mk
|
||||
|
||||
local econf_args=()
|
||||
|
||||
# GHC embeds 'gcc' it was built by and uses it later.
|
||||
# Don't allow things like ccache or versioned binary slip.
|
||||
# We use stable thing across gcc upgrades.
|
||||
is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
|
||||
|
||||
if use ghcmakebinary; then
|
||||
# When building booting libary we are trying to
|
||||
# bundle or restrict most of external depends
|
||||
# with unstable ABI:
|
||||
# - embed libffi (default GHC behaviour)
|
||||
# - disable ncurses support for ghci (via haskeline)
|
||||
# https://bugs.gentoo.org/557478
|
||||
# - disable ncurses support for ghc-pkg
|
||||
echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
|
||||
echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
|
||||
else
|
||||
econf_args+=(--with-system-libffi)
|
||||
econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
|
||||
fi
|
||||
|
||||
elog "Final mk/build.mk:"
|
||||
cat mk/build.mk || die
|
||||
|
||||
econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
|
||||
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
|
||||
GHC_P=${PN}-${GHC_PV}
|
||||
fi
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if ! use binary; then
|
||||
# 1. build compiler binary first
|
||||
emake ghc/stage2/build/tmp/ghc-stage2
|
||||
# 2. pax-mark (bug #516430)
|
||||
pax-mark -m ghc/stage2/build/tmp/ghc-stage2
|
||||
# 3. and then all the rest
|
||||
emake all
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use binary; then
|
||||
use prefix && mkdir -p "${ED}"
|
||||
mv "${S}/usr" "${ED}"
|
||||
else
|
||||
|
||||
emake -j1 install DESTDIR="${D}"
|
||||
dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
|
||||
|
||||
# rename ghc-shipped files to avoid collision
|
||||
# of external packages. Motivating example:
|
||||
# user had installed:
|
||||
# dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
|
||||
# dev-haskell/transformers-0.4.2.0
|
||||
# then user tried to update to
|
||||
# dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
|
||||
# this will lead to single .conf file collision.
|
||||
local shipped_conf renamed_conf
|
||||
local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
|
||||
for shipped_conf in "${package_confdir}"/*.conf; do
|
||||
# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
|
||||
renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
|
||||
mv "${shipped_conf}" "${renamed_conf}" || die
|
||||
done
|
||||
|
||||
# remove link, but leave 'haddock-${GHC_P}'
|
||||
rm -f "${ED}"/usr/bin/$(cross)haddock
|
||||
|
||||
if [[ ! -f "${S}/VERSION" ]]; then
|
||||
echo "${GHC_PV}" > "${S}/VERSION" \
|
||||
|| die "Could not create file ${S}/VERSION"
|
||||
fi
|
||||
if ! is_crosscompile; then
|
||||
newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
|
||||
newbashcomp utils/completion/ghc.bash ghc
|
||||
fi
|
||||
fi
|
||||
|
||||
# path to the package.cache
|
||||
local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
|
||||
PKGCACHE="${package_confdir}"/package.cache
|
||||
# copy the package.conf.d, including timestamp, save it so we can help
|
||||
# users that have a broken package.conf.d
|
||||
cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
|
||||
|
||||
# copy the package.conf, including timestamp, save it so we later can put it
|
||||
# back before uninstalling, or when upgrading.
|
||||
cp -p "${PKGCACHE}"{,.shipped} \
|
||||
|| die "failed to copy package.conf.d/package.cache"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# have we got an earlier version of ghc installed?
|
||||
if has_version "<${CATEGORY}/${PF}"; then
|
||||
haskell_updater_warn="1"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ghc-reregister
|
||||
|
||||
# path to the package.cache
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
|
||||
|
||||
# give the cache a new timestamp, it must be as recent as
|
||||
# the package.conf.d directory.
|
||||
touch "${PKGCACHE}"
|
||||
|
||||
if [[ "${haskell_updater_warn}" == "1" ]]; then
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
ewarn "You have just upgraded from an older version of GHC."
|
||||
ewarn "You may have to run"
|
||||
ewarn " 'haskell-updater'"
|
||||
ewarn "to rebuild all ghc-based Haskell libraries."
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
|
||||
rm -rf "${PKGCACHE}"
|
||||
|
||||
cp -p "${PKGCACHE}"{.shipped,}
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
ghc-package_pkg_postrm
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue