parent
2e466407a7
commit
ea8c2a28b8
Binary file not shown.
Binary file not shown.
@ -1,6 +1,3 @@
|
||||
DIST ansible-2.5.10.tar.gz 10167484 BLAKE2B 0c60758d54fabef8037ce7e79d86c1508786a3e8cfe2cb1cc9d09cc24ece107414793f4dd12013dbc4c9a1354669288e0989374a20b7ebc035115dfd907c7279 SHA512 911f1f616206136708ceb4f9955e8bf309d7b506fcca9e0f31d770ead0a47c803d670909b6fe10b0d26056d3fd5c140e144132284ad5dbb618d3b013abc9385f
|
||||
DIST ansible-2.5.11.tar.gz 10114022 BLAKE2B 196c657c66b588ed709b8354d7f043c12701f08e263ede1224f59457b7d65c113d6a936150c0379378615e7a89a66db6a8cfc52304f2c3431a4cafbed9a3bdb5 SHA512 b0da66fb67bdd33b42b35239d392793cc19b98650990028ef89b83384285ab6185accbfe15edb030b9e9a62e59961a22e2002b6aeea34f1f063da857ad199358
|
||||
DIST ansible-2.6.5.tar.gz 10757800 BLAKE2B 2389dfdbdf731382643227cb3a0df501d7b756d81dbddfe9b5ce609086eb04073441c01ed6f49480628fa2a2b3556e07c1b4588cb5df96a072d72c9a09fe2739 SHA512 3cab1d14abb3d173722ee76699ac778188481d575d589fb9e85541689a806b6f3eece9b1c5122cd863b46da56ed5cc3c32faaa143826ab3bd3e7a6cc06cbe2fe
|
||||
DIST ansible-2.6.6.tar.gz 10707168 BLAKE2B be41ee9b314a669069d4e8578baefdaa3e12864d132320ecad1cb539ae34d048a4f95b44c995f4695911f652064ef343ca35d9864326fd951e4e389088266505 SHA512 0fd8f208479bde3f9fa957c488abce17e6e7c492e6016a9acd88a11db44f777d148d451a4a246d2b55c6de85b9178e8127908e1fe36e490f7bbef350246ba716
|
||||
DIST ansible-2.6.7.tar.gz 10708387 BLAKE2B cfdd8940e3c23183fa8650d9c5a46b9af056dc9850b25b7969925ea66f2ec7d78945efaf982bc8c8752a285295461922b3e047b4edf75ecf3e3d4c893f0dafbc SHA512 23fde88f7e2151154cd77bb8a946c06c703b620456e0f1e9dc74f532b95d2868eb96e9c6f52fc48fc75ed5ad77d45d61be48fe4b7bd11ac8baa4745a026852bc
|
||||
DIST ansible-2.7.1.tar.gz 11738557 BLAKE2B 8d154d9f09eabd851fb182cea3a6a810385ed971429f4968b649ccd7e5cbbb5c6cd884a478b235f04f12134b471c99a4f77c32826661cc73cbb9e3a1159c377c SHA512 263ebc5fb172c7eda0cc703508ba06a5a6ab197923597a616bcdf28b8bc673ff6117c72cbff4546a1f3628656b0c4d7dd05c34c75e68b9a0d9c29ea9b5a4162f
|
||||
|
@ -1,66 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{5,6} )
|
||||
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
DESCRIPTION="Model-driven deployment, config management, and command execution framework"
|
||||
HOMEPAGE="https://ansible.com/"
|
||||
SRC_URI="https://releases.ansible.com/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 ~x64-macos"
|
||||
IUSE="doc test"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/paramiko[${PYTHON_USEDEP}]
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||
dev-python/httplib2[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
dev-python/netaddr[${PYTHON_USEDEP}]
|
||||
net-misc/sshpass
|
||||
virtual/ssh
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=dev-python/packaging-16.6[${PYTHON_USEDEP}]
|
||||
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/nose[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
|
||||
dev-python/passlib[${PYTHON_USEDEP}]
|
||||
dev-python/coverage[${PYTHON_USEDEP}]
|
||||
dev-python/unittest2[${PYTHON_USEDEP}]
|
||||
dev-vcs/git
|
||||
)"
|
||||
|
||||
# not included in release tarball
|
||||
RESTRICT="test"
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
cd docs/docsite || die
|
||||
export CPUS=4
|
||||
emake -f Makefile.sphinx html
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
nosetests -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches || die
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/docsite/_build/html/. )
|
||||
distutils-r1_python_install_all
|
||||
|
||||
doman docs/man/man1/*.1
|
||||
dodoc -r examples
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{5,6} )
|
||||
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
DESCRIPTION="Model-driven deployment, config management, and command execution framework"
|
||||
HOMEPAGE="https://ansible.com/"
|
||||
SRC_URI="https://releases.ansible.com/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 ~x64-macos"
|
||||
IUSE="doc test"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/paramiko[${PYTHON_USEDEP}]
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||
dev-python/httplib2[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
dev-python/netaddr[${PYTHON_USEDEP}]
|
||||
net-misc/sshpass
|
||||
virtual/ssh
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=dev-python/packaging-16.6[${PYTHON_USEDEP}]
|
||||
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/nose[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
|
||||
dev-python/passlib[${PYTHON_USEDEP}]
|
||||
dev-python/coverage[${PYTHON_USEDEP}]
|
||||
dev-python/unittest2[${PYTHON_USEDEP}]
|
||||
dev-vcs/git
|
||||
)"
|
||||
|
||||
# not included in release tarball
|
||||
RESTRICT="test"
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
cd docs/docsite || die
|
||||
export CPUS=4
|
||||
emake -f Makefile.sphinx html
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
nosetests -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches || die
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/docsite/_build/html/. )
|
||||
distutils-r1_python_install_all
|
||||
|
||||
doman docs/man/man1/*.1
|
||||
dodoc -r examples
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{5,6} )
|
||||
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
DESCRIPTION="Model-driven deployment, config management, and command execution framework"
|
||||
HOMEPAGE="https://ansible.com/"
|
||||
SRC_URI="https://releases.ansible.com/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~x64-macos"
|
||||
IUSE="doc test"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/paramiko[${PYTHON_USEDEP}]
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||
dev-python/httplib2[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
dev-python/netaddr[${PYTHON_USEDEP}]
|
||||
net-misc/sshpass
|
||||
virtual/ssh
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=dev-python/packaging-16.6[${PYTHON_USEDEP}]
|
||||
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/nose[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
|
||||
dev-python/passlib[${PYTHON_USEDEP}]
|
||||
dev-python/coverage[${PYTHON_USEDEP}]
|
||||
dev-python/unittest2[${PYTHON_USEDEP}]
|
||||
dev-vcs/git
|
||||
)"
|
||||
|
||||
# not included in release tarball
|
||||
RESTRICT="test"
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
cd docs/docsite || die
|
||||
export CPUS=4
|
||||
emake -f Makefile.sphinx html
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
nosetests -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches || die
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/docsite/_build/html/. )
|
||||
distutils-r1_python_install_all
|
||||
|
||||
doman docs/man/man1/*.1
|
||||
dodoc -r examples
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
DIST sudo-1.8.23.tar.gz 3150674 BLAKE2B 11b1c7bfa372005cda8baf651c4662f6fd15e94ca77f7705b23ca6573424796d5c1f8e47e2874c4b54017141d01a632885ac60c92346d932537048373cad0ede SHA512 a9d61850a4857bfd075547a13efb13b054e4736e3ebe3c8a98a90a090b1d9b9688354ec9725fc99d1d256999b6f9c6ae6215ce9770fcdebd7f24731107b48342
|
||||
DIST sudo-1.8.25p1.tar.gz 3189951 BLAKE2B ebfedaad62e60f625db8c46a5c8f19977a5ec0a86bab3b34d91096c08e8b8ece056ba312f9fecd4cdd704fc17d49a36681b41cd40269df7c67cd66d80c0d8efb SHA512 b1445be688d3c1dd7efbdfab68977a7a9b6fd6887191dc99ca717117eec0a550492642556cd55ca5873d054ddc5ccc2b87b2c34602e1ffc729ab6fbc4e523a72
|
||||
DIST sudo-1.8.26rc1.tar.gz 3287807 BLAKE2B 84b119974f84868ac3b1ca2784d919a9f68f309263b48c57c657adb49b4f5c605d09c4a92c350907df8f5a0af2ff6aa30ad39d3585c892b9fa4b1e32a5b765c8 SHA512 9501089f352a40bd504cf24616ac0afa9b45eb887677792a4e99f68358402765787bf5ce1286b45ee0477a0930245e1006ecef3db56f915ad9d4a451831bd131
|
||||
DIST sudo-1.8.26.tar.gz 3286368 BLAKE2B 8df947f3dfa32081020b8a19921ea5daf6f9250c1ae34aa29900e85e80669223f28573217cd7e0a28393c6f30aa2117347014aa0cb554f2b85632e335ae790be SHA512 f5596cdf753ffa54f651bb30126e690640125b2ee54e8022f3740bfbe2e5a23e1bee86ce52879e863b9386babbbcf33d3e2882c573995a7d4612e9eea14d8791
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,96 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools vim-doc versionator
|
||||
|
||||
DESCRIPTION="Console file manager with vi(m)-like keybindings"
|
||||
HOMEPAGE="https://vifm.info/"
|
||||
SRC_URI="mirror://sourceforge/vifm/${PF}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
IUSE="X developer +extended-keys gtk +magic vim vim-syntax"
|
||||
|
||||
DEPEND="
|
||||
>=sys-libs/ncurses-5.9-r3:0
|
||||
magic? ( sys-apps/file )
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
X? ( x11-libs/libX11 )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
vim? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
"
|
||||
|
||||
DOCS="AUTHORS FAQ NEWS README TODO"
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e '/stat.h/a#include <sys/sysmacros.h>' "${S}/src/modes/file_info.c" \
|
||||
|| die
|
||||
eapply_user
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable developer) \
|
||||
$(use_enable extended-keys) \
|
||||
$(use_with magic libmagic) \
|
||||
$(use_with gtk) \
|
||||
$(use_with X X11)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
dodoc ${DOCS}
|
||||
|
||||
if use vim; then
|
||||
local t
|
||||
for t in app plugin; do
|
||||
insinto /usr/share/vim/vimfiles/"${t}"
|
||||
doins "${S}"/data/vim/doc/"${t}"/"${PN}"*
|
||||
done
|
||||
fi
|
||||
|
||||
if use vim-syntax; then
|
||||
local t
|
||||
for t in ftdetect ftplugin syntax; do
|
||||
insinto /usr/share/vim/vimfiles/"${t}"
|
||||
doins "${S}"/data/vim/"${t}"/"${PN}".vim
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake check
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use vim; then
|
||||
update_vim_helptags
|
||||
|
||||
if [[ -n ${REPLACING_VERSIONS} ]]; then
|
||||
elog
|
||||
elog "You don't need to copy or link any files for"
|
||||
elog " the vim plugin and documentation to work anymore."
|
||||
elog "If you copied any vifm files to ~/.vim/ manually"
|
||||
elog " in earlier vifm versions, please delete them."
|
||||
fi
|
||||
elog
|
||||
elog "To use vim in vifm to view the documentation"
|
||||
elog " edit ~/.vifm/vifmrc and set vimhelp instead of novimhelp"
|
||||
elog
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use vim && update_vim_helptags
|
||||
}
|
Binary file not shown.
@ -1,91 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit rpm eapi7-ver
|
||||
|
||||
BASE_PV=$(ver_cut 1-3)
|
||||
MY_PV="${PV/_alpha/.alpha}"
|
||||
MY_PV="${MY_PV/_beta/.beta}"
|
||||
[[ ${PV} == *alpha* || ${PV} == *beta* ]] && PN_DEV="Dev"
|
||||
|
||||
DESCRIPTION="Translations for the Libreoffice suite"
|
||||
HOMEPAGE="https://www.libreoffice.org"
|
||||
BASE_SRC_URI_TESTING="https://download.documentfoundation.org/${PN/-l10n/}/testing/${BASE_PV}/rpm"
|
||||
BASE_SRC_URI_STABLE="https://download.documentfoundation.org/${PN/-l10n/}/stable/${BASE_PV}/rpm"
|
||||
|
||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="offlinehelp"
|
||||
|
||||
#
|
||||
# when changing the language lists, please be careful to preserve the spaces (bug 491728)
|
||||
#
|
||||
# "en:en-US" for mapping from Gentoo "en" to upstream "en-US" etc.
|
||||
LANGUAGES_HELP=" am ast bg bn-IN bn bo bs ca-valencia ca cs da de dz el en-GB en:en-US en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl pt-BR pt ru si sk sl sq sv tg tr ug uk vi zh-CN zh-TW "
|
||||
LANGUAGES="${LANGUAGES_HELP}af ar as be br brx cy dgo fa ga gd gug kk kmr-Latn kn kok ks lb lo lt lv mai ml mn mni mr my nr nso oc or pa:pa-IN ro rw sa:sa-IN sat sd sid sr-Latn sr ss st sw-TZ ta te th tn ts tt uz ve xh zu "
|
||||
|
||||
for lang in ${LANGUAGES_HELP}; do
|
||||
helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86/LibreOffice${PN_DEV}_${BASE_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice${PN_DEV}_${MY_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz )"
|
||||
SRC_URI+=" l10n_${lang%:*}? ( ${helppack} )"
|
||||
done
|
||||
for lang in ${LANGUAGES}; do
|
||||
if [[ ${lang%:*} != en ]]; then
|
||||
langpack="${BASE_SRC_URI_STABLE}/x86/LibreOffice${PN_DEV}_${BASE_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice${PN_DEV}_${MY_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz"
|
||||
SRC_URI+=" l10n_${lang%:*}? ( ${langpack} )"
|
||||
fi
|
||||
IUSE+=" l10n_${lang%:*}"
|
||||
done
|
||||
unset lang helppack langpack
|
||||
|
||||
RDEPEND+="app-text/hunspell"
|
||||
|
||||
RESTRICT="strip"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
local lang dir rpmdir
|
||||
|
||||
# First remove dictionaries, we want to use system ones.
|
||||
find "${S}" -name *dict*.rpm -delete || die "Failed to remove dictionaries"
|
||||
|
||||
for lang in ${LANGUAGES}; do
|
||||
# break away if not enabled
|
||||
use l10n_${lang%:*} || continue
|
||||
|
||||
dir=${lang#*:}
|
||||
|
||||
# for english we provide just helppack, as translation is always there
|
||||
if [[ ${lang%:*} != en ]]; then
|
||||
rpmdir="LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${dir}/RPMS/"
|
||||
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
|
||||
rpm_unpack ./${rpmdir}/*.rpm
|
||||
fi
|
||||
if [[ "${LANGUAGES_HELP}" =~ " ${lang} " ]] && use offlinehelp; then
|
||||
rpmdir="LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${dir}/RPMS/"
|
||||
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
|
||||
rpm_unpack ./${rpmdir}/*.rpm
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_configure() { :; }
|
||||
src_compile() { :; }
|
||||
|
||||
src_install() {
|
||||
local dir="${S}"/opt/${PN/-l10n/}$(ver_cut 1-2)/
|
||||
# Condition required for people that do not install anything eg no l10n
|
||||
# or just english with no offlinehelp.
|
||||
if [[ -d "${dir}" ]] ; then
|
||||
insinto /usr/$(get_libdir)/${PN/-l10n/}/
|
||||
doins -r "${dir}"/*
|
||||
fi
|
||||
# remove extensions that are in the l10n for some weird reason
|
||||
rm -rf "${ED}"usr/$(get_libdir)/${PN/-l10n/}/share/extensions/ || \
|
||||
die "Failed to remove extensions"
|
||||
}
|
@ -1,568 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
PYTHON_REQ_USE="threads,xml"
|
||||
|
||||
MY_PV="${PV/_alpha/.alpha}"
|
||||
MY_PV="${MY_PV/_beta/.beta}"
|
||||
# experimental ; release ; old
|
||||
# Usually the tarballs are moved a lot so this should make everyone happy.
|
||||
DEV_URI="
|
||||
https://dev-builds.libreoffice.org/pre-releases/src
|
||||
https://download.documentfoundation.org/libreoffice/src/${MY_PV:0:5}/
|
||||
https://downloadarchive.documentfoundation.org/libreoffice/old/${MY_PV}/src
|
||||
"
|
||||
ADDONS_URI="https://dev-www.libreoffice.org/src/"
|
||||
|
||||
BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
|
||||
# PATCHSET="${P}-patchset-01.tar.xz"
|
||||
|
||||
[[ ${MY_PV} == *9999* ]] && SCM_ECLASS="git-r3"
|
||||
inherit autotools bash-completion-r1 check-reqs eapi7-ver flag-o-matic gnome2-utils java-pkg-opt-2 multiprocessing pax-utils python-single-r1 qmake-utils toolchain-funcs xdg-utils ${SCM_ECLASS}
|
||||
unset SCM_ECLASS
|
||||
|
||||
DESCRIPTION="A full office productivity suite"
|
||||
HOMEPAGE="https://www.libreoffice.org"
|
||||
SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
|
||||
[[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}"
|
||||
|
||||
# Split modules following git/tarballs; Core MUST be first!
|
||||
# Help is used for the image generator
|
||||
# Only release has the tarballs
|
||||
if [[ ${MY_PV} != *9999* ]]; then
|
||||
for i in ${DEV_URI}; do
|
||||
SRC_URI+=" ${i}/${PN}-${MY_PV}.tar.xz"
|
||||
SRC_URI+=" ${i}/${PN}-help-${MY_PV}.tar.xz"
|
||||
done
|
||||
unset i
|
||||
fi
|
||||
unset DEV_URI
|
||||
|
||||
# Really required addons
|
||||
# These are bundles that can't be removed for now due to huge patchsets.
|
||||
# If you want them gone, patches are welcome.
|
||||
ADDONS_SRC=(
|
||||
"java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
|
||||
# no release for 8 years, should we package it?
|
||||
"libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )"
|
||||
# Does not build with 1.6 rhino at all
|
||||
"libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )"
|
||||
# requirement of rhino
|
||||
"libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )"
|
||||
# not packageable
|
||||
"odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )"
|
||||
)
|
||||
SRC_URI+=" ${ADDONS_SRC[*]}"
|
||||
|
||||
unset ADDONS_URI
|
||||
unset ADDONS_SRC
|
||||
|
||||
# Extensions that need extra work:
|
||||
LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
|
||||
|
||||
IUSE="accessibility bluetooth +branding coinmp +cups dbus debug eds firebird
|
||||
googledrive gstreamer +gtk gtk2 kde mysql odk pdfimport postgres test vlc
|
||||
$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
bluetooth? ( dbus )
|
||||
kde? ( gtk )
|
||||
libreoffice_extensions_nlpsolver? ( java )
|
||||
libreoffice_extensions_scripting-beanshell? ( java )
|
||||
libreoffice_extensions_scripting-javascript? ( java )
|
||||
libreoffice_extensions_wiki-publisher? ( java )
|
||||
"
|
||||
|
||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
||||
SLOT="0"
|
||||
[[ ${MY_PV} == *9999* ]] || \
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-arch/unzip
|
||||
app-arch/zip
|
||||
app-crypt/gpgme[cxx]
|
||||
app-text/hunspell:=
|
||||
>=app-text/libabw-0.1.0
|
||||
>=app-text/libebook-0.1
|
||||
app-text/libepubgen
|
||||
>=app-text/libetonyek-0.1
|
||||
app-text/libexttextcat
|
||||
app-text/liblangtag
|
||||
>=app-text/libmspub-0.1.0
|
||||
>=app-text/libmwaw-0.3.1
|
||||
app-text/libnumbertext
|
||||
>=app-text/libodfgen-0.1.0
|
||||
app-text/libqxp
|
||||
app-text/libstaroffice
|
||||
app-text/libwpd:0.10[tools]
|
||||
app-text/libwpg:0.3
|
||||
>=app-text/libwps-0.4
|
||||
app-text/mythes
|
||||
>=dev-cpp/clucene-2.3.3.4-r2
|
||||
=dev-cpp/libcmis-0.5*
|
||||
dev-db/unixODBC
|
||||
dev-lang/perl
|
||||
dev-libs/boost:=[nls]
|
||||
dev-libs/expat
|
||||
dev-libs/hyphen
|
||||
dev-libs/icu:=
|
||||
dev-libs/libassuan
|
||||
dev-libs/libgpg-error
|
||||
=dev-libs/liborcus-0.13*
|
||||
dev-libs/librevenge
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
>=dev-libs/redland-1.0.16
|
||||
>=dev-libs/xmlsec-1.2.24[nss]
|
||||
media-gfx/graphite2
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype:2
|
||||
>=media-libs/harfbuzz-0.9.42:=[graphite,icu]
|
||||
media-libs/lcms:2
|
||||
>=media-libs/libcdr-0.1.0
|
||||
>=media-libs/libepoxy-1.3.1[X]
|
||||
>=media-libs/libfreehand-0.1.0
|
||||
media-libs/libpagemaker
|
||||
>=media-libs/libpng-1.4:0=
|
||||
>=media-libs/libvisio-0.1.0
|
||||
media-libs/libzmf
|
||||
net-libs/neon
|
||||
net-misc/curl
|
||||
net-nds/openldap
|
||||
sci-mathematics/lpsolve
|
||||
sys-libs/zlib:=
|
||||
virtual/glu
|
||||
virtual/jpeg:0
|
||||
virtual/opengl
|
||||
x11-libs/cairo[X]
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
accessibility? ( dev-python/lxml[${PYTHON_USEDEP}] )
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
coinmp? ( sci-libs/coinor-mp )
|
||||
cups? ( net-print/cups )
|
||||
dbus? ( dev-libs/dbus-glib )
|
||||
eds? (
|
||||
dev-libs/glib:2
|
||||
gnome-base/dconf
|
||||
gnome-extra/evolution-data-server
|
||||
)
|
||||
firebird? ( >=dev-db/firebird-3.0.2.32703.0-r1[server] )
|
||||
gstreamer? (
|
||||
media-libs/gstreamer:1.0
|
||||
media-libs/gst-plugins-base:1.0
|
||||
)
|
||||
gtk? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/gobject-introspection
|
||||
gnome-base/dconf
|
||||
media-libs/mesa[egl]
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/pango
|
||||
)
|
||||
gtk2? (
|
||||
x11-libs/gdk-pixbuf
|
||||
>=x11-libs/gtk+-2.24:2
|
||||
x11-libs/pango
|
||||
)
|
||||
kde? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtx11extras:5
|
||||
dev-qt/qtwidgets:5
|
||||
kde-frameworks/kconfig:5
|
||||
kde-frameworks/kcoreaddons:5
|
||||
kde-frameworks/ki18n:5
|
||||
kde-frameworks/kio:5
|
||||
kde-frameworks/kwindowsystem:5
|
||||
)
|
||||
libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
|
||||
libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
|
||||
mysql? ( dev-db/mysql-connector-c++ )
|
||||
pdfimport? ( app-text/poppler:=[cxx] )
|
||||
postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!app-office/libreoffice-bin
|
||||
!app-office/libreoffice-bin-debug
|
||||
!app-office/openoffice
|
||||
media-fonts/dejavu
|
||||
media-fonts/liberation-fonts
|
||||
media-fonts/libertine
|
||||
|| ( x11-misc/xdg-utils kde-plasma/kde-cli-tools )
|
||||
java? ( >=virtual/jre-1.6 )
|
||||
kde? ( kde-frameworks/breeze-icons:* )
|
||||
vlc? ( media-video/vlc )
|
||||
"
|
||||
|
||||
if [[ ${MY_PV} != *9999* ]] && [[ ${PV} != *_* ]]; then
|
||||
PDEPEND="=app-office/libreoffice-l10n-$(ver_cut 1-2)*"
|
||||
else
|
||||
# Translations are not reliable on live ebuilds
|
||||
# rather force people to use english only.
|
||||
PDEPEND="!app-office/libreoffice-l10n"
|
||||
fi
|
||||
|
||||
# FIXME: cppunit should be moved to test conditional
|
||||
# after everything upstream is under gbuild
|
||||
# as dmake execute tests right away
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=dev-libs/libatomic_ops-7.2d
|
||||
dev-perl/Archive-Zip
|
||||
>=dev-util/cppunit-1.14.0
|
||||
>=dev-util/gperf-3
|
||||
dev-util/intltool
|
||||
=dev-util/mdds-1.3*:1=
|
||||
media-libs/glm
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
sys-devel/gettext
|
||||
sys-devel/ucpp
|
||||
virtual/pkgconfig
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libXt
|
||||
x11-libs/libXtst
|
||||
java? (
|
||||
dev-java/ant-core
|
||||
>=virtual/jdk-1.6
|
||||
)
|
||||
odk? ( >=app-doc/doxygen-1.8.4 )
|
||||
test? (
|
||||
app-crypt/gnupg
|
||||
dev-util/cppunit
|
||||
media-fonts/dejavu
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# "${WORKDIR}"/${PATCHSET/.tar.xz/}
|
||||
|
||||
# not upstreamable stuff
|
||||
"${FILESDIR}/${PN}-5.4-system-pyuno.patch"
|
||||
"${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
|
||||
|
||||
# TODO: upstream
|
||||
"${FILESDIR}/${PN}-5.2.5.1-glibc-2.24.patch"
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
_check_reqs() {
|
||||
CHECKREQS_MEMORY="512M"
|
||||
if is-flagq "-g*" && ! is-flagq "-g*0" ; then
|
||||
CHECKREQS_DISK_BUILD="22G"
|
||||
else
|
||||
CHECKREQS_DISK_BUILD="6G"
|
||||
fi
|
||||
check-reqs_$1
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
use java || \
|
||||
ewarn "If you plan to use Base application you should enable java or you will get various crashes."
|
||||
|
||||
if has_version "<app-office/libreoffice-5.3.0[firebird]"; then
|
||||
ewarn "Firebird has been upgraded to version 3. It is unable to read back Firebird 2.5 data, so"
|
||||
ewarn "embedded firebird odb files created in LibreOffice pre-5.3 can't be opened with this version."
|
||||
ewarn "See also: https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base"
|
||||
fi
|
||||
|
||||
[[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
xdg_environment_reset
|
||||
|
||||
[[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
if [[ ${MY_PV} = *9999* ]]; then
|
||||
local base_uri branch mypv
|
||||
base_uri="https://anongit.freedesktop.org/git"
|
||||
branch="master"
|
||||
mypv=${MY_PV/.9999}
|
||||
[[ ${mypv} != ${MY_PV} ]] && branch="${PN}-${mypv/./-}"
|
||||
git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}"
|
||||
git-r3_checkout "${base_uri}/${PN}/core"
|
||||
|
||||
git-r3_fetch "${base_uri}/${PN}/help" "refs/heads/master"
|
||||
git-r3_checkout "${base_uri}/${PN}/help" "helpcontent2" # doesn't match on help
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# sandbox violations on many systems, we don't need it. Bug #646406
|
||||
sed -i \
|
||||
-e "/KF5_CONFIG/s/kf5-config/no/" \
|
||||
configure.ac || die "Failed to disable kf5-config"
|
||||
|
||||
AT_M4DIR="m4" eautoreconf
|
||||
# hack in the autogen.sh
|
||||
touch autogen.lastrun
|
||||
|
||||
# system pyuno mess
|
||||
sed -i \
|
||||
-e "s:%eprefix%:${EPREFIX}:g" \
|
||||
-e "s:%libdir%:$(get_libdir):g" \
|
||||
pyuno/source/module/uno.py \
|
||||
pyuno/source/officehelper.py || die
|
||||
# sed in the tests
|
||||
sed -i \
|
||||
-e "s#all : build unitcheck#all : build#g" \
|
||||
solenv/gbuild/Module.mk || die
|
||||
sed -i \
|
||||
-e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \
|
||||
-e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \
|
||||
Makefile.in || die
|
||||
|
||||
sed -i \
|
||||
-e "s,/usr/share/bash-completion/completions,$(get_bashcompdir)," \
|
||||
-e "s,\$INSTALLDIRNAME.sh,${PN}," \
|
||||
bin/distro-install-desktop-integration || die
|
||||
|
||||
if use branding; then
|
||||
# hack...
|
||||
mv -v "${WORKDIR}/branding-intro.png" "icon-themes/colibre/brand/intro.png" || die
|
||||
fi
|
||||
|
||||
# Don't list pdfimport support in desktop when built with none, bug # 605464
|
||||
if ! use pdfimport; then
|
||||
sed -i \
|
||||
-e ":MimeType: s:application/pdf;::" \
|
||||
-e ":Keywords: s:pdf;::" \
|
||||
sysui/desktop/menus/draw.desktop || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Set up Google API keys, see https://www.chromium.org/developers/how-tos/api-keys
|
||||
# Note: these are for Gentoo use ONLY. For your own distribution, please get
|
||||
# your own set of keys. Feel free to contact chromium@gentoo.org for more info.
|
||||
local google_default_client_id="329227923882.apps.googleusercontent.com"
|
||||
local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
|
||||
|
||||
# optimization flags
|
||||
export GMAKE_OPTIONS="${MAKEOPTS}"
|
||||
# System python enablement:
|
||||
export PYTHON_CFLAGS=$(python_get_CFLAGS)
|
||||
export PYTHON_LIBS=$(python_get_LIBS)
|
||||
|
||||
if use kde; then
|
||||
export QT_SELECT=5 # bug 639620 needs proper fix though
|
||||
export QT5DIR="$(qt5_get_bindir)/../"
|
||||
export MOC5="$(qt5_get_bindir)/moc"
|
||||
fi
|
||||
|
||||
# system headers/libs/...: enforce using system packages
|
||||
# --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad
|
||||
# --enable-cairo: ensure that cairo is always required
|
||||
# --enable-*-link: link to the library rather than just dlopen on runtime
|
||||
# --enable-release-build: build the libreoffice as release
|
||||
# --disable-fetch-external: prevent dowloading during compile phase
|
||||
# --enable-extension-integration: enable any extension integration support
|
||||
# --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
|
||||
# --disable-report-builder: too much java packages pulled in without pkgs
|
||||
# --without-system-sane: just sane.h header that is used for scan in writer,
|
||||
# not linked or anything else, worthless to depend on
|
||||
# --disable-pdfium: not yet packaged
|
||||
local myeconfargs=(
|
||||
--with-system-dicts
|
||||
--with-system-epoxy
|
||||
--with-system-headers
|
||||
--with-system-jars
|
||||
--with-system-libs
|
||||
--enable-cairo-canvas
|
||||
--enable-largefile
|
||||
--enable-mergelibs
|
||||
--enable-neon
|
||||
--enable-python=system
|
||||
--enable-randr
|
||||
--enable-release-build
|
||||
--disable-breakpad
|
||||
--disable-ccache
|
||||
--disable-dependency-tracking
|
||||
--disable-epm
|
||||
--disable-fetch-external
|
||||
--disable-gstreamer-0-10
|
||||
--disable-kde5
|
||||
--disable-online-update
|
||||
--disable-openssl
|
||||
--disable-pdfium
|
||||
--disable-qt5
|
||||
--disable-report-builder
|
||||
--with-alloc=system
|
||||
--with-build-version="Gentoo official package"
|
||||
--enable-extension-integration
|
||||
--with-external-dict-dir="${EPREFIX}/usr/share/myspell"
|
||||
--with-external-hyph-dir="${EPREFIX}/usr/share/myspell"
|
||||
--with-external-thes-dir="${EPREFIX}/usr/share/myspell"
|
||||
--with-external-tar="${DISTDIR}"
|
||||
--with-lang=""
|
||||
--with-parallelism=$(makeopts_jobs)
|
||||
--with-system-ucpp
|
||||
--with-tls=nss
|
||||
--with-vendor="Gentoo Foundation"
|
||||
--with-x
|
||||
--without-fonts
|
||||
--without-myspell-dicts
|
||||
--without-help
|
||||
--with-helppack-integration
|
||||
--with-system-gpgmepp
|
||||
--without-system-sane
|
||||
$(use_enable bluetooth sdremote-bluetooth)
|
||||
$(use_enable coinmp)
|
||||
$(use_enable cups)
|
||||
$(use_enable dbus)
|
||||
$(use_enable debug)
|
||||
$(use_enable eds evolution2)
|
||||
$(use_enable firebird firebird-sdbc)
|
||||
$(use_enable gstreamer gstreamer-1-0)
|
||||
$(use_enable gtk gtk3)
|
||||
$(use_enable gtk2 gtk)
|
||||
$(use_enable kde gtk3-kde5)
|
||||
$(use_enable mysql ext-mariadb-connector)
|
||||
$(use_enable odk)
|
||||
$(use_enable pdfimport)
|
||||
$(use_enable postgres postgresql-sdbc)
|
||||
$(use_enable vlc)
|
||||
$(use_with accessibility lxml)
|
||||
$(use_with coinmp system-coinmp)
|
||||
$(use_with googledrive gdrive-client-id ${google_default_client_id})
|
||||
$(use_with googledrive gdrive-client-secret ${google_default_client_secret})
|
||||
$(use_with java)
|
||||
$(use_with mysql system-mysql-cppconn)
|
||||
$(use_with odk doxygen)
|
||||
)
|
||||
|
||||
if use eds || use gtk; then
|
||||
myeconfargs+=( --enable-dconf --enable-gio )
|
||||
else
|
||||
myeconfargs+=( --disable-dconf --disable-gio )
|
||||
fi
|
||||
|
||||
# libreoffice extensions handling
|
||||
for lo_xt in ${LO_EXTS}; do
|
||||
if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
|
||||
myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt}) )
|
||||
else
|
||||
myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt}) )
|
||||
fi
|
||||
done
|
||||
|
||||
if use java; then
|
||||
# hsqldb: system one is too new
|
||||
myeconfargs+=(
|
||||
--without-junit
|
||||
--without-system-hsqldb
|
||||
--with-ant-home="${ANT_HOME}"
|
||||
--with-jdk-home=$(java-config --jdk-home 2>/dev/null)
|
||||
--with-jvm-path="${EPREFIX}/usr/lib/"
|
||||
)
|
||||
|
||||
use libreoffice_extensions_scripting-beanshell && \
|
||||
myeconfargs+=( --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar) )
|
||||
|
||||
use libreoffice_extensions_scripting-javascript && \
|
||||
myeconfargs+=( --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar) )
|
||||
fi
|
||||
|
||||
is-flagq "-flto*" && myeconfargs+=( --enable-lto )
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# more and more LO stuff tries to use OpenGL, including tests during build
|
||||
# bug 501508, bug 540624, bug 545974 and probably more
|
||||
addpredict /dev/dri
|
||||
addpredict /dev/ati
|
||||
addpredict /dev/nvidiactl
|
||||
|
||||
# hack for offlinehelp, this needs fixing upstream at some point
|
||||
# it is broken because we send --without-help
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=46506
|
||||
(
|
||||
grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk" || die
|
||||
source "${T}/config_host.mk" 2&> /dev/null
|
||||
|
||||
local path="${WORKDIR}/helpcontent2/source/auxiliary/"
|
||||
mkdir -p "${path}" || die
|
||||
|
||||
echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=helpcontent2/source/media/helpimg > \"${path}/helpimg.ilst\""
|
||||
perl "${S}/helpcontent2/helpers/create_ilst.pl" \
|
||||
-dir=helpcontent2/source/media/helpimg \
|
||||
> "${path}/helpimg.ilst"
|
||||
[[ -s "${path}/helpimg.ilst" ]] || \
|
||||
ewarn "The help images list is empty, something is fishy, report a bug."
|
||||
)
|
||||
|
||||
local target
|
||||
use test && target="build" || target="build-nocheck"
|
||||
|
||||
# this is not a proper make script
|
||||
make ${target} || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
make unitcheck || die
|
||||
make slowcheck || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# This is not Makefile so no buildserver
|
||||
make DESTDIR="${D}" distro-pack-install -o build -o check || die
|
||||
|
||||
# bug 593514
|
||||
if use gtk; then
|
||||
dosym libreoffice/program/liblibreofficekitgtk.so \
|
||||
/usr/$(get_libdir)/liblibreofficekitgtk.so
|
||||
fi
|
||||
|
||||
# bash completion aliases
|
||||
bashcomp_alias \
|
||||
libreoffice \
|
||||
unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice
|
||||
|
||||
if use branding; then
|
||||
insinto /usr/$(get_libdir)/${PN}/program
|
||||
newins "${WORKDIR}/branding-sofficerc" sofficerc
|
||||
dodir /etc/env.d
|
||||
echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"etc/env.d/99${PN} || die
|
||||
fi
|
||||
|
||||
# Hack for offlinehelp, this needs fixing upstream at some point.
|
||||
# It is broken because we send --without-help
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=46506
|
||||
insinto /usr/$(get_libdir)/libreoffice/help
|
||||
doins xmlhelp/util/*.xsl
|
||||
|
||||
pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/soffice.bin
|
||||
pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
Binary file not shown.
@ -1,4 +1 @@
|
||||
DIST hstr-1.23.tar.gz 47239 BLAKE2B dec630f1e8161edc40544561dd85ea1c128a6704eeeaeb39eb6987bdc096a070c9e242b938bed01b80e208aadf08606518a007919d353f76ff1c36e7906aeabb SHA512 234c72587d0492d788b1c001b5e53f74820790a9ebe670e8abd28cd82fc7db65996d54160e675055be54cab110686838fe6e36dbefe0fbef9175613633bc5910
|
||||
DIST hstr-1.24.tar.gz 47523 BLAKE2B 6e84ea6bd26cb0745f48e5f8701d4d956ae4b83ed825398fdc401fd0b7f13eb9874de62d438e71a57fa048a535a538504e7fabd7b4a698665a10a901e0a570e6 SHA512 fe522374e33150007c0bbe5d11d38e63c355519350f5777c8787aae62826553b61a358185994d196d015590649fb3accf75948e340233459409d594e51874658
|
||||
DIST hstr-1.25.tar.gz 48926 BLAKE2B ee27adaabcf8c28d10c2188d9570e92609192712e54e73a7904dc32e02805e564d4abcad60d506a961c0d9266c62a4fe1b4ef42171efd8f60d1234bbc9f4921d SHA512 83c6250b1627bf185a572a7278a23f1e779d8f926f62fe341644f0d26b4f9daac8d904a5fe5af63e963a2ec15b7d98ee229bd5f812ee0d167bd2a12ee2e57467
|
||||
DIST hstr-2.0.tar.gz 1242802 BLAKE2B 24f1a870e6aa12b6544a38601c6bc654e01aa1a185c4f7735559aa3220ed8d9fb840e298526b9e4a177000f2ec5c08caee5da97e13783e4114bde5276ee1e85e SHA512 50d5e8e61aa853dab0093f4225d3329e98bc59609d8d59abf832cd4cb616d78a2fa091d1ad8d16f3543276c4ead95a419f33a13a96f423bf93dc648da32740b7
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="Shell history suggest box"
|
||||
HOMEPAGE="https://github.com/dvorka/hstr http://www.mindforger.com"
|
||||
SRC_URI="https://github.com/dvorka/hstr/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="Apache-2.0"
|
||||
KEYWORDS="amd64 x86 ~amd64-fbsd"
|
||||
|
||||
RDEPEND="sys-libs/ncurses:0="
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
DOCS=( CONFIGURATION.md README.md )
|
||||
PATCHES=( "${FILESDIR}/${PN}-1.23-tinfo.patch" )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed \
|
||||
-e 's:-O2::g' \
|
||||
-i src/Makefile.am || die
|
||||
eautoreconf
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="Shell history suggest box"
|
||||
HOMEPAGE="https://github.com/dvorka/hstr http://www.mindforger.com"
|
||||
SRC_URI="https://github.com/dvorka/hstr/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="Apache-2.0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-fbsd"
|
||||
|
||||
RDEPEND="sys-libs/ncurses:0="
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
DOCS=( CONFIGURATION.md README.md )
|
||||
PATCHES=( "${FILESDIR}/${PN}-1.23-tinfo.patch" )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed \
|
||||
-e 's:-O2::g' \
|
||||
-i src/Makefile.am || die
|
||||
eautoreconf
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="Shell history suggest box"
|
||||
HOMEPAGE="https://github.com/dvorka/hstr http://www.mindforger.com"
|
||||
SRC_URI="https://github.com/dvorka/hstr/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="Apache-2.0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-fbsd"
|
||||
|
||||
RDEPEND="
|
||||
sys-libs/ncurses:0="
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
DOCS=( CONFIGURATION.md README.md )
|
||||
PATCHES=( "${FILESDIR}/${PN}-1.23-tinfo.patch" )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed \
|
||||
-e 's:-O2::g' \
|
||||
-i src/Makefile.am || die
|
||||
eautoreconf
|
||||
}
|
Binary file not shown.
@ -1,3 +1,2 @@
|
||||
DIST gprbuild-gpl-2016-src.tar.gz 2142261 BLAKE2B 69948427eb6315b9fb2b84755192b53c035f74093dacb34852713083779bf8bd88dac6b38fe7685f6a40ecb2482f78b15a5221913df997847eee8b1359cf6c14 SHA512 6b9e00248aaee90f3c00e7ce442c2b551b8532ec4d94a4471858d117feb27e91fd6d218995d4b71ee3f1f0677e9547d562fc2cda9ba80c3f6eb8d840ed56eb7e
|
||||
DIST gprbuild-gpl-2017-src.tar.gz 2454957 BLAKE2B 890e5aa29e9f8fa8b140988ee8e5d6042640c34fe0877acde959de803bf690bb33c63b1c7e7db486f804882bddd77ab76ffbaa4dd27da327e21ed0376cadb99d SHA512 12f3682d64ce0718de4940c1e71a4380b20021805d88543842dbf3b5ce5d518c23a6b2d868565579baf81efa1d8cf05c7778253162f0df5d7adc0eb1865c9f88
|
||||
DIST gprbuild-gpl-2018-src.tar.gz 2479651 BLAKE2B b0e24f4d97f06fe84569f8f0284e1028fce8e4ae90cfd27ab31ada0988f4f1b37eca4868bc212a21d26fb1a0a7ba6f031062e16d9758ab211e2fee40e25077ab SHA512 d22c0133baa6a0b626a0c1d145b21865bd0699cd8155ca22727272b0f8988c78163410b432ae148e87099e931df19d51ea867981556c79cb1cceb25456333044
|
||||
|
@ -1,48 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit toolchain-funcs multiprocessing
|
||||
|
||||
MYP=gprbuild-gpl-${PV}
|
||||
|
||||
DESCRIPTION="Ada library to handle GPRbuild project files"
|
||||
HOMEPAGE="http://libre.adacore.com/"
|
||||
SRC_URI="http://mirrors.cdn.adacore.com/art/57399662c7a447658e0affa8
|
||||
-> ${MYP}-src.tar.gz"
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="+gnat_2016 gnat_2017 +shared static-libs static-pic"
|
||||
|
||||
RDEPEND="dev-ada/xmlada[gnat_2016=,gnat_2017=]"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-ada/gprbuild[gnat_2016=,gnat_2017=]"
|
||||
|
||||
S="${WORKDIR}"/${MYP}-src
|
||||
|
||||
REQUIRED_USE="|| ( shared static-libs static-pic )"
|
||||
PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
|
||||
|
||||
src_compile() {
|
||||
if use static-libs; then
|
||||
emake PROCESSORS=$(makeopts_jobs) libgpr.build.static
|
||||
fi
|
||||
for kind in shared static-pic; do
|
||||
if use ${kind}; then
|
||||
emake PROCESSORS=$(makeopts_jobs) libgpr.build.${kind}
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use static-libs; then
|
||||
emake DESTDIR="${D}" libgpr.install.static
|
||||
fi
|
||||
for kind in shared static-pic; do
|
||||
if use ${kind}; then
|
||||
emake DESTDIR="${D}" libgpr.install.${kind}
|
||||
fi
|
||||
done
|
||||
}
|
Binary file not shown.
@ -0,0 +1,796 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
MY_EXTRAS_VER="20180804-2323Z"
|
||||
SUBSLOT="18"
|
||||
|
||||
# Keeping eutils in EAPI=6 for emktemp in pkg_config
|
||||
|
||||
inherit eutils flag-o-matic prefix toolchain-funcs user cmake-utils multilib-build
|
||||
|
||||
SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.5/${P}.tar.gz
|
||||
https://downloads.mysql.com/archives/MySQL-5.5/${P}.tar.gz"
|
||||
# Gentoo patches to MySQL
|
||||
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
|
||||
SRC_URI="${SRC_URI}
|
||||
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
|
||||
fi
|
||||
|
||||
HOMEPAGE="https://mysql.com/"
|
||||
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/${SUBSLOT:-0}"
|
||||
IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl
|
||||
+perl profiling selinux +server static static-libs systemtap tcmalloc
|
||||
test yassl"
|
||||
|
||||
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
|
||||
RESTRICT="!bindist? ( bindist ) libressl? ( test )"
|
||||
|
||||
REQUIRED_USE="?? ( tcmalloc jemalloc )
|
||||
static? ( yassl )"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
||||
|
||||
# Shorten the path because the socket path length must be shorter than 107 chars
|
||||
# and we will run a mysql server during test phase
|
||||
S="${WORKDIR}/mysql"
|
||||
|
||||
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
|
||||
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
|
||||
EGIT_CLONE_TYPE=shallow
|
||||
else
|
||||
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${MY_PATCH_DIR}/01050_all_mysql_config_cleanup-5.5.patch"
|
||||
"${MY_PATCH_DIR}/02040_all_embedded-library-shared-5.5.10.patch"
|
||||
"${MY_PATCH_DIR}/20001_all_fix-minimal-build-cmake-mysql-5.5.41.patch"
|
||||
"${MY_PATCH_DIR}/20002_all_mysql-va-list.patch"
|
||||
"${MY_PATCH_DIR}/20006_all_cmake_elib-mysql-5.5.53.patch"
|
||||
"${MY_PATCH_DIR}/20007_all_cmake-debug-werror-5.6.22.patch"
|
||||
"${MY_PATCH_DIR}/20008_all_mysql-tzinfo-symlink-5.6.37.patch"
|
||||
"${MY_PATCH_DIR}/20009_all_mysql_myodbc_symbol_fix-5.5.38.patch"
|
||||
"${MY_PATCH_DIR}/20018_all_mysql-5.5.60-without-clientlibs-tools.patch"
|
||||
"${MY_PATCH_DIR}/20027_all_mysql-5.5-perl5.26-includes.patch"
|
||||
)
|
||||
|
||||
# Be warned, *DEPEND are version-dependant
|
||||
# These are used for both runtime and compiletime
|
||||
COMMON_DEPEND="
|
||||
kernel_linux? (
|
||||
sys-process/procps:0=
|
||||
dev-libs/libaio:0=
|
||||
)
|
||||
>=sys-apps/sed-4
|
||||
>=sys-apps/texinfo-4.7-r1
|
||||
jemalloc? ( dev-libs/jemalloc:0= )
|
||||
tcmalloc? ( dev-util/google-perftools:0= )
|
||||
systemtap? ( >=dev-util/systemtap-1.3:0= )
|
||||
!yassl? (
|
||||
!libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
>=sys-libs/zlib-1.2.3:0=
|
||||
sys-libs/ncurses:0=
|
||||
!bindist? (
|
||||
>=sys-libs/readline-4.1:0=
|
||||
)
|
||||
!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
|
||||
"
|
||||
DEPEND="virtual/yacc
|
||||
static? ( sys-libs/ncurses[static-libs] )
|
||||
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
|
||||
${COMMON_DEPEND}"
|
||||
RDEPEND="selinux? ( sec-policy/selinux-mysql )
|
||||
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
|
||||
!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
|
||||
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
|
||||
${COMMON_DEPEND}
|
||||
perl? ( !dev-db/mytop
|
||||
virtual/perl-Getopt-Long
|
||||
dev-perl/TermReadKey
|
||||
virtual/perl-Term-ANSIColor
|
||||
virtual/perl-Time-HiRes )
|
||||
"
|
||||
# For other stuff to bring us in
|
||||
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
|
||||
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
|
||||
|
||||
pkg_setup() {
|
||||
if [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
local GCC_MAJOR_SET=$(gcc-major-version)
|
||||
local GCC_MINOR_SET=$(gcc-minor-version)
|
||||
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
|
||||
# non x86{,_64} arches
|
||||
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
|
||||
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
|
||||
eerror "${PN} needs to be built with gcc-4.7 or later."
|
||||
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
|
||||
die
|
||||
fi
|
||||
fi
|
||||
if has test ${FEATURES} && \
|
||||
use server && ! has userpriv ${FEATURES} ; then
|
||||
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
|
||||
fi
|
||||
|
||||
# This should come after all of the die statements
|
||||
enewgroup mysql 60 || die "problem adding 'mysql' group"
|
||||
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Create log directory securely if it does not exist
|
||||
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
|
||||
|
||||
if use server ; then
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
|
||||
einfo
|
||||
elog "You might want to run:"
|
||||
elog "\"emerge --config =${CATEGORY}/${PF}\""
|
||||
elog "if this is a new install."
|
||||
elog
|
||||
elog "If you are switching server implentations, you should run the"
|
||||
elog "mysql_upgrade tool."
|
||||
einfo
|
||||
else
|
||||
einfo
|
||||
elog "If you are upgrading major versions, you should run the"
|
||||
elog "mysql_upgrade tool."
|
||||
einfo
|
||||
fi
|
||||
|
||||
einfo
|
||||
elog "Be sure to edit the my.cnf file to activate your cluster settings."
|
||||
elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
|
||||
elog "The first time the cluster is activated, you should add"
|
||||
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
|
||||
elog "This option should then be removed for subsequent starts."
|
||||
einfo
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
# Grab the patches
|
||||
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
|
||||
|
||||
mv -f "${WORKDIR%/}/${P}" "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
_disable_engine() {
|
||||
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
_disable_plugin() {
|
||||
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
if use tcmalloc; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
if use jemalloc; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
|
||||
if [[ -d "${S}/support-files/SELinux" ]] ; then
|
||||
echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
if use libressl ; then
|
||||
sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
|
||||
"${S}/cmake/ssl.cmake" || die
|
||||
fi
|
||||
|
||||
local plugin
|
||||
local server_plugins=( semisync )
|
||||
local test_plugins=( audit_null daemon_example fulltext )
|
||||
if ! use server; then # These plugins are for the server
|
||||
for plugin in "${server_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
if ! use test; then # These plugins are only used during testing
|
||||
for plugin in "${test_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Don't build example
|
||||
_disable_engine example
|
||||
_disable_engine ndb
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
# Bug #114895, bug #110149
|
||||
filter-flags "-O" "-O[01]"
|
||||
|
||||
append-cxxflags -felide-constructors
|
||||
|
||||
# bug #283926, with GCC4.4, this is required to get correct behavior.
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# debug hack wrt #497532
|
||||
mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
|
||||
-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
|
||||
-DINSTALL_BINDIR=bin
|
||||
-DINSTALL_DOCDIR=share/doc/${PF}
|
||||
-DINSTALL_DOCREADMEDIR=share/doc/${PF}
|
||||
-DINSTALL_INCLUDEDIR=include/mysql
|
||||
-DINSTALL_INFODIR=share/info
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DINSTALL_MANDIR=share/man
|
||||
-DINSTALL_MYSQLSHAREDIR=share/mysql
|
||||
-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
|
||||
-DINSTALL_SCRIPTDIR=share/mysql/scripts
|
||||
-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
|
||||
-DINSTALL_SBINDIR=sbin
|
||||
-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
|
||||
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
|
||||
-DWITH_UNIT_TESTS=$(usex test ON OFF)
|
||||
-DWITH_ZLIB=system
|
||||
-DENABLED_LOCAL_INFILE=1
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
|
||||
# The build forces this to be defined when cross-compiling. We pass it
|
||||
# all the time for simplicity and to make sure it is actually correct.
|
||||
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
|
||||
-DWITHOUT_CLIENTLIBS=YES
|
||||
-DWITH_READLINE=$(usex bindist 1 0)
|
||||
-DENABLE_DTRACE=$(usex systemtap)
|
||||
)
|
||||
if use test ; then
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
|
||||
else
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
|
||||
fi
|
||||
|
||||
if ! use yassl ; then
|
||||
mycmakeargs+=( -DWITH_SSL=system )
|
||||
else
|
||||
mycmakeargs+=( -DWITH_SSL=bundled )
|
||||
fi
|
||||
|
||||
if use server ; then
|
||||
|
||||
# Federated{,X} must be treated special otherwise they will not be built as plugins
|
||||
if ! use extraengine ; then
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
|
||||
-DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
|
||||
fi
|
||||
|
||||
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
|
||||
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
|
||||
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
|
||||
ewarn "You MUST file bugs without these variables set."
|
||||
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
|
||||
-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
|
||||
)
|
||||
|
||||
elif ! use latin1 ; then
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=utf8
|
||||
-DDEFAULT_COLLATION=utf8_general_ci
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=latin1
|
||||
-DDEFAULT_COLLATION=latin1_swedish_ci
|
||||
)
|
||||
fi
|
||||
mycmakeargs+=(
|
||||
-DINSTALL_SQLBENCHDIR=share/mysql
|
||||
-DEXTRA_CHARSETS=all
|
||||
-DDISABLE_SHARED=$(usex static YES NO)
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
)
|
||||
|
||||
if use profiling ; then
|
||||
# Setting to OFF doesn't work: Once set, profiling options will be added
|
||||
# to `mysqld --help` output via sql/sys_vars.cc causing
|
||||
# "main.mysqld--help-notwin" test to fail
|
||||
mycmakeargs+=( -DENABLED_PROFILING=ON )
|
||||
fi
|
||||
|
||||
if use static; then
|
||||
mycmakeargs+=( -DWITH_PIC=1 )
|
||||
fi
|
||||
|
||||
# Storage engines
|
||||
mycmakeargs+=(
|
||||
-DWITH_ARCHIVE_STORAGE_ENGINE=1
|
||||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
|
||||
-DWITH_CSV_STORAGE_ENGINE=1
|
||||
-DWITH_HEAP_STORAGE_ENGINE=1
|
||||
-DWITH_INNOBASE_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAM_STORAGE_ENGINE=1
|
||||
-DWITH_PARTITION_STORAGE_ENGINE=1
|
||||
)
|
||||
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_SERVER=1
|
||||
-DEXTRA_CHARSETS=none
|
||||
-DINSTALL_SQLBENCHDIR=
|
||||
)
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
|
||||
if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
|
||||
rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
|
||||
fi
|
||||
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Convenience links
|
||||
einfo "Making Convenience links for mysqlcheck multi-call binary"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqlrepair"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqloptimize"
|
||||
|
||||
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
|
||||
if [[ -d "${ED%/}/usr/data" ]] ; then
|
||||
rm -Rf "${ED%/}/usr/data" || die
|
||||
fi
|
||||
|
||||
# Unless they explicitly specific USE=test, then do not install the
|
||||
# testsuite. It DOES have a use to be installed, esp. when you want to do a
|
||||
# validation of your database configuration after tuning it.
|
||||
if ! use test ; then
|
||||
rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
|
||||
fi
|
||||
|
||||
# Configuration stuff
|
||||
einfo "Building default configuration ..."
|
||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
|
||||
[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
|
||||
local mycnf_src="my.cnf-5.5"
|
||||
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
|
||||
"${FILESDIR%/}/${mycnf_src}" \
|
||||
> "${TMPDIR%/}/my.cnf.ok" || die
|
||||
use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
|
||||
if use latin1 ; then
|
||||
sed -i \
|
||||
-e "/character-set/s|utf8|latin1|g" \
|
||||
"${TMPDIR%/}/my.cnf.ok" || die
|
||||
fi
|
||||
eprefixify "${TMPDIR%/}/my.cnf.ok"
|
||||
newins "${TMPDIR}/my.cnf.ok" my.cnf
|
||||
|
||||
if use server ; then
|
||||
einfo "Including support files and sample configurations"
|
||||
docinto "support-files"
|
||||
local script
|
||||
for script in \
|
||||
"${S%/}"/support-files/magic
|
||||
do
|
||||
[[ -f "$script" ]] && dodoc "${script}"
|
||||
done
|
||||
|
||||
docinto "scripts"
|
||||
for script in "${S%/}"/scripts/mysql* ; do
|
||||
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
|
||||
done
|
||||
fi
|
||||
|
||||
#Remove mytop if perl is not selected
|
||||
[[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
|
||||
}
|
||||
|
||||
# Official test instructions:
|
||||
# USE='extraengine perl server' \
|
||||
# FEATURES='test userpriv -usersandbox' \
|
||||
# ebuild mysql-X.X.XX.ebuild \
|
||||
# digest clean package
|
||||
src_test() {
|
||||
|
||||
_disable_test() {
|
||||
local rawtestname reason
|
||||
rawtestname="${1}" ; shift
|
||||
reason="${@}"
|
||||
ewarn "test '${rawtestname}' disabled: '${reason}'"
|
||||
echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
|
||||
}
|
||||
|
||||
local TESTDIR="${BUILD_DIR}/mysql-test"
|
||||
local retstatus_unit
|
||||
local retstatus_tests
|
||||
|
||||
if ! use server ; then
|
||||
einfo "Skipping server tests due to minimal build."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Bug #213475 - MySQL _will_ object strenously if your machine is named
|
||||
# localhost. Also causes weird failures.
|
||||
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
|
||||
|
||||
if [[ $UID -eq 0 ]]; then
|
||||
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
|
||||
fi
|
||||
has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
|
||||
|
||||
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
|
||||
# Run CTest (test-units)
|
||||
cmake-utils_src_test
|
||||
retstatus_unit=$?
|
||||
|
||||
# Ensure that parallel runs don't die
|
||||
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
|
||||
# Enable parallel testing, auto will try to detect number of cores
|
||||
# You may set this by hand.
|
||||
# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
|
||||
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
|
||||
|
||||
# create directories because mysqladmin might run out of order
|
||||
mkdir -p "${T}"/var-tests{,/log} || die
|
||||
|
||||
# Run mysql tests
|
||||
pushd "${TESTDIR}" > /dev/null || die
|
||||
|
||||
touch "${T}/disabled.def"
|
||||
# These are failing in MySQL 5.5 for now and are believed to be
|
||||
# false positives:
|
||||
#
|
||||
# main.mysql_client_test, main.mysql_client_test_nonblock
|
||||
# main.mysql_client_test_comp:
|
||||
# segfaults at random under Portage only, suspect resource limits.
|
||||
|
||||
local t
|
||||
for t in main.mysql_client_test main.mysql_client_test_nonblock \
|
||||
main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
|
||||
main.mysqlhotcopy_archive main.mysqlhotcopy_myisam main.openssl_1 \
|
||||
rpl.rpl_semi_sync_uninstall_plugin ; do
|
||||
_disable_test "$t" "False positives in Gentoo"
|
||||
done
|
||||
|
||||
if ! use client-libs ; then
|
||||
_disable_test main.plugin_auth "Needs client libraries built"
|
||||
fi
|
||||
|
||||
# run mysql-test tests
|
||||
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
|
||||
retstatus_tests=$?
|
||||
|
||||
popd > /dev/null || die
|
||||
|
||||
# Cleanup is important for these testcases.
|
||||
pkill -9 -f "${S}/ndb" 2>/dev/null
|
||||
pkill -9 -f "${S}/sql" 2>/dev/null
|
||||
|
||||
local failures=""
|
||||
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
|
||||
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
|
||||
|
||||
[[ -z "$failures" ]] || die "Test failures: $failures"
|
||||
einfo "Tests successfully completed"
|
||||
}
|
||||
|
||||
mysql_init_vars() {
|
||||
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
|
||||
MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
|
||||
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
|
||||
MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
|
||||
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR=""
|
||||
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
|
||||
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
|
||||
| sed -ne '/datadir/s|^--datadir=||p' \
|
||||
| tail -n1`
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
|
||||
| sed -e 's/.*=\s*//' \
|
||||
| tail -n1`
|
||||
fi
|
||||
fi
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR="${MY_LOCALSTATEDIR}"
|
||||
einfo "Using default MY_DATADIR"
|
||||
fi
|
||||
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
|
||||
|
||||
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
|
||||
if [[ -e "${MY_DATADIR}" ]] ; then
|
||||
# If you get this and you're wondering about it, see bug #207636
|
||||
elog "MySQL datadir found in ${MY_DATADIR}"
|
||||
elog "A new one will not be created."
|
||||
PREVIOUS_DATADIR="yes"
|
||||
else
|
||||
PREVIOUS_DATADIR="no"
|
||||
fi
|
||||
export PREVIOUS_DATADIR
|
||||
fi
|
||||
else
|
||||
if [[ ${EBUILD_PHASE} == "config" ]]; then
|
||||
local new_MY_DATADIR
|
||||
new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
|
||||
| sed -ne '/datadir/s|^--datadir=||p' \
|
||||
| tail -n1`
|
||||
|
||||
if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
|
||||
ewarn "MySQL MY_DATADIR has changed"
|
||||
ewarn "from ${MY_DATADIR}"
|
||||
ewarn "to ${new_MY_DATADIR}"
|
||||
MY_DATADIR="${new_MY_DATADIR}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
|
||||
export MY_LOCALSTATEDIR MY_LOGDIR
|
||||
export MY_DATADIR
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
_getoptval() {
|
||||
local mypd="${EROOT}"/usr/bin/my_print_defaults
|
||||
local section="$1"
|
||||
local flag="--${2}="
|
||||
local extra_options="${3}"
|
||||
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
|
||||
}
|
||||
local old_MY_DATADIR="${MY_DATADIR}"
|
||||
local old_HOME="${HOME}"
|
||||
# my_print_defaults needs to read stuff in $HOME/.my.cnf
|
||||
export HOME=${EPREFIX}/root
|
||||
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
|
||||
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
|
||||
die "Minimal builds do NOT include the MySQL server"
|
||||
fi
|
||||
|
||||
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
|
||||
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
|
||||
MY_DATADIR_s="${MY_DATADIR_s%%/}"
|
||||
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
|
||||
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
|
||||
|
||||
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
|
||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
|
||||
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
|
||||
else
|
||||
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
|
||||
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|
||||
|| die "Moving MY_DATADIR failed"
|
||||
fi
|
||||
else
|
||||
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
|
||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||
ewarn "Attempting to use ${MY_DATADIR_s}"
|
||||
else
|
||||
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
|
||||
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
local pwd1="a"
|
||||
local pwd2="b"
|
||||
local maxtry=15
|
||||
|
||||
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
|
||||
local tmp_mysqld_password_source=
|
||||
|
||||
for tmp_mysqld_password_source in mysql client; do
|
||||
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
|
||||
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
|
||||
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
|
||||
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
|
||||
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
|
||||
MYSQL_ROOT_PASSWORD=
|
||||
continue
|
||||
fi
|
||||
|
||||
einfo "Found password in '${tmp_mysqld_password_source}' section!"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
|
||||
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
|
||||
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
|
||||
fi
|
||||
|
||||
unset tmp_mysqld_password_source
|
||||
fi
|
||||
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
|
||||
# These are dir+prefix
|
||||
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
|
||||
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
|
||||
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
|
||||
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
|
||||
|
||||
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
|
||||
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
|
||||
fi
|
||||
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
|
||||
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
|
||||
fi
|
||||
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
|
||||
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
|
||||
fi
|
||||
|
||||
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
|
||||
ewarn "You have already a MySQL database in place."
|
||||
ewarn "(${ROOT}/${MY_DATADIR}/*)"
|
||||
ewarn "Please rename or delete it if you wish to replace it."
|
||||
die "MySQL database already exists!"
|
||||
fi
|
||||
|
||||
# Bug #213475 - MySQL _will_ object strenously if your machine is named
|
||||
# localhost. Also causes weird failures.
|
||||
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
|
||||
|
||||
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
|
||||
|
||||
einfo "Please provide a password for the mysql 'root' user now"
|
||||
einfo "or through the ${HOME}/.my.cnf file."
|
||||
ewarn "Avoid [\"'\\_%] characters in the password"
|
||||
read -rsp " >" pwd1 ; echo
|
||||
|
||||
einfo "Retype the password"
|
||||
read -rsp " >" pwd2 ; echo
|
||||
|
||||
if [[ "x$pwd1" != "x$pwd2" ]] ; then
|
||||
die "Passwords are not the same"
|
||||
fi
|
||||
MYSQL_ROOT_PASSWORD="${pwd1}"
|
||||
unset pwd1 pwd2
|
||||
fi
|
||||
|
||||
local options
|
||||
local sqltmp="$(emktemp)"
|
||||
|
||||
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
|
||||
# see http://bugs.mysql.com/bug.php?id=31312
|
||||
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
|
||||
|
||||
# Figure out which options we need to disable to do the setup
|
||||
local helpfile="${TMPDIR}/mysqld-help"
|
||||
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
|
||||
for opt in grant-tables host-cache name-resolve networking slave-start \
|
||||
federated ssl log-bin relay-log slow-query-log external-locking \
|
||||
log-slave-updates \
|
||||
; do
|
||||
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
|
||||
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
|
||||
done
|
||||
|
||||
einfo "Creating the mysql database and setting proper permissions on it ..."
|
||||
|
||||
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
|
||||
PID_DIR="${EROOT}/var/run/mysqld"
|
||||
if [[ ! -d "${PID_DIR}" ]]; then
|
||||
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${MY_DATADIR}" ]]; then
|
||||
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
|
||||
fi
|
||||
|
||||
pushd "${TMPDIR}" &>/dev/null || die
|
||||
|
||||
# Filling timezones, see
|
||||
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
|
||||
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
|
||||
|
||||
local cmd=( "${EROOT}usr/share/mysql/scripts/mysql_install_db" )
|
||||
[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
|
||||
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
|
||||
einfo "Command: ${cmd[*]}"
|
||||
su -s /bin/sh -c "${cmd[*]}" mysql \
|
||||
>"${TMPDIR}"/mysql_install_db.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
|
||||
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|
||||
|| die "MySQL databases not installed"
|
||||
|
||||
use prefix || options="${options} --user=mysql"
|
||||
|
||||
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
|
||||
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
|
||||
local mysqld="${EROOT}/usr/sbin/mysqld \
|
||||
${options} \
|
||||
--log-warnings=0 \
|
||||
--basedir=${EROOT}/usr \
|
||||
--datadir=${ROOT}/${MY_DATADIR} \
|
||||
--max_allowed_packet=8M \
|
||||
--net_buffer_length=16K \
|
||||
--socket=${socket} \
|
||||
--pid-file=${pidfile} \
|
||||
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
|
||||
#einfo "About to start mysqld: ${mysqld}"
|
||||
ebegin "Starting mysqld"
|
||||
einfo "Command ${mysqld}"
|
||||
${mysqld} &
|
||||
rc=$?
|
||||
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
|
||||
maxtry=$((${maxtry}-1))
|
||||
echo -n "."
|
||||
sleep 1
|
||||
done
|
||||
eend $rc
|
||||
|
||||
if ! [[ -S "${socket}" ]]; then
|
||||
die "Completely failed to start up mysqld with: ${mysqld}"
|
||||
fi
|
||||
|
||||
ebegin "Setting root password"
|
||||
# Do this from memory, as we don't want clear text passwords in temp files
|
||||
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
|
||||
"${EROOT}/usr/bin/mysql" \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-e "${sql}"
|
||||
eend $?
|
||||
|
||||
if [[ -n "${sqltmp}" ]] ; then
|
||||
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
|
||||
"${EROOT}/usr/bin/mysql" \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-uroot \
|
||||
--password="${MYSQL_ROOT_PASSWORD}" \
|
||||
mysql < "${sqltmp}"
|
||||
rc=$?
|
||||
eend $?
|
||||
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
|
||||
fi
|
||||
|
||||
# Stop the server and cleanup
|
||||
einfo "Stopping the server ..."
|
||||
kill $(< "${pidfile}" )
|
||||
rm -f "${sqltmp}"
|
||||
wait %1
|
||||
einfo "Done"
|
||||
}
|
@ -0,0 +1,795 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
MY_EXTRAS_VER="20181111-2314Z"
|
||||
|
||||
CMAKE_MAKEFILE_GENERATOR=emake
|
||||
|
||||
# Keeping eutils in EAPI=6 for emktemp in pkg_config
|
||||
|
||||
inherit eutils flag-o-matic prefix toolchain-funcs \
|
||||
user cmake-utils multilib-build
|
||||
|
||||
SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
|
||||
https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
|
||||
http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
|
||||
|
||||
# Gentoo patches to MySQL
|
||||
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
|
||||
SRC_URI="${SRC_URI}
|
||||
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
|
||||
fi
|
||||
|
||||
HOMEPAGE="https://www.mysql.com/"
|
||||
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/18"
|
||||
IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
|
||||
+server static static-libs systemtap tcmalloc test yassl"
|
||||
|
||||
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
|
||||
RESTRICT="libressl? ( test )"
|
||||
|
||||
REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
||||
|
||||
# Shorten the path because the socket path length must be shorter than 107 chars
|
||||
# and we will run a mysql server during test phase
|
||||
S="${WORKDIR}/mysql"
|
||||
|
||||
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
|
||||
EGIT_CLONE_TYPE=shallow
|
||||
MY_PATCH_DIR="${WORKDIR}/mysql-extras"
|
||||
else
|
||||
MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
|
||||
"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
|
||||
"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
|
||||
"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
|
||||
"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
|
||||
"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
|
||||
"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
|
||||
"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
|
||||
"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
|
||||
"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
|
||||
)
|
||||
|
||||
# Be warned, *DEPEND are version-dependant
|
||||
# These are used for both runtime and compiletime
|
||||
COMMON_DEPEND="
|
||||
kernel_linux? (
|
||||
sys-process/procps:0=
|
||||
dev-libs/libaio:0=
|
||||
)
|
||||
net-misc/curl
|
||||
>=sys-apps/sed-4
|
||||
>=sys-apps/texinfo-4.7-r1
|
||||
jemalloc? ( dev-libs/jemalloc:0= )
|
||||
tcmalloc? ( dev-util/google-perftools:0= )
|
||||
systemtap? ( >=dev-util/systemtap-1.3:0= )
|
||||
!yassl? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.0:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
>=sys-libs/zlib-1.2.3:0=
|
||||
sys-libs/ncurses:0=
|
||||
server? (
|
||||
numa? ( sys-process/numactl )
|
||||
)
|
||||
!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
|
||||
"
|
||||
DEPEND="virtual/yacc
|
||||
static? ( sys-libs/ncurses[static-libs] )
|
||||
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
|
||||
${COMMON_DEPEND}"
|
||||
RDEPEND="selinux? ( sec-policy/selinux-mysql )
|
||||
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
|
||||
!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
|
||||
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
|
||||
${COMMON_DEPEND}
|
||||
"
|
||||
# For other stuff to bring us in
|
||||
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
|
||||
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
|
||||
|
||||
pkg_setup() {
|
||||
if [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
local GCC_MAJOR_SET=$(gcc-major-version)
|
||||
local GCC_MINOR_SET=$(gcc-minor-version)
|
||||
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
|
||||
# non x86{,_64} arches
|
||||
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
|
||||
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
|
||||
eerror "${PN} needs to be built with gcc-4.7 or later."
|
||||
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
|
||||
die
|
||||
fi
|
||||
fi
|
||||
if has test ${FEATURES} && \
|
||||
use server && ! has userpriv ${FEATURES} ; then
|
||||
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
|
||||
fi
|
||||
|
||||
# This should come after all of the die statements
|
||||
enewgroup mysql 60 || die "problem adding 'mysql' group"
|
||||
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Here we need to see if the implementation switched client libraries
|
||||
# We check if this is a new instance of the package and a client library already exists
|
||||
local SHOW_ABI_MESSAGE libpath
|
||||
if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
|
||||
libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
|
||||
elog "Due to ABI changes when switching between different client libraries,"
|
||||
elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
|
||||
elog "Please run: revdep-rebuild --library ${libpath}"
|
||||
ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Create log directory securely if it does not exist
|
||||
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
|
||||
|
||||
if use server ; then
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
|
||||
einfo
|
||||
elog "You might want to run:"
|
||||
elog "\"emerge --config =${CATEGORY}/${PF}\""
|
||||
elog "if this is a new install."
|
||||
elog
|
||||
elog "If you are switching server implentations, you should run the"
|
||||
elog "mysql_upgrade tool."
|
||||
einfo
|
||||
else
|
||||
einfo
|
||||
elog "If you are upgrading major versions, you should run the"
|
||||
elog "mysql_upgrade tool."
|
||||
einfo
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
# Grab the patches
|
||||
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
|
||||
|
||||
mv -f "${WORKDIR}/${P}" "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
_disable_engine() {
|
||||
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
_disable_plugin() {
|
||||
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
if use jemalloc ; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
if use tcmalloc; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
|
||||
if [[ -d "${S}/support-files/SELinux" ]] ; then
|
||||
echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
if use libressl ; then
|
||||
sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
|
||||
"${S}/cmake/ssl.cmake" || die
|
||||
fi
|
||||
|
||||
sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
|
||||
|
||||
local plugin
|
||||
local server_plugins=( semisync )
|
||||
local test_plugins=( audit_null daemon_example fulltext )
|
||||
if ! use server; then # These plugins are for the server
|
||||
for plugin in "${server_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
if ! use test; then # These plugins are only used during testing
|
||||
for plugin in "${test_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Don't build example
|
||||
_disable_engine example
|
||||
_disable_engine ndb
|
||||
_disable_plugin innodb_memcached
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
# bug 508724 mariadb cannot use ld.gold
|
||||
tc-ld-disable-gold
|
||||
# Bug #114895, bug #110149
|
||||
filter-flags "-O" "-O[01]"
|
||||
|
||||
append-cxxflags -felide-constructors
|
||||
|
||||
# bug #283926, with GCC4.4, this is required to get correct behavior.
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# debug hack wrt #497532
|
||||
mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
|
||||
-DSYSCONFDIR="${EPREFIX}/etc/mysql"
|
||||
-DINSTALL_BINDIR=bin
|
||||
-DINSTALL_DOCDIR=share/doc/${PF}
|
||||
-DINSTALL_DOCREADMEDIR=share/doc/${PF}
|
||||
-DINSTALL_INCLUDEDIR=include/mysql
|
||||
-DINSTALL_INFODIR=share/info
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DINSTALL_MANDIR=share/man
|
||||
-DINSTALL_MYSQLSHAREDIR=share/mysql
|
||||
-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
|
||||
-DINSTALL_SCRIPTDIR=share/mysql/scripts
|
||||
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
|
||||
-DINSTALL_SBINDIR=sbin
|
||||
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
|
||||
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
|
||||
-DWITH_UNIT_TESTS=$(usex test ON OFF)
|
||||
### TODO: make this system but issues with UTF-8 prevent it
|
||||
-DWITH_EDITLINE=bundled
|
||||
-DWITH_ZLIB=system
|
||||
-DWITH_LIBWRAP=0
|
||||
-DENABLED_LOCAL_INFILE=1
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=0
|
||||
-DWITH_DEFAULT_FEATURE_SET=0
|
||||
# The build forces this to be defined when cross-compiling. We pass it
|
||||
# all the time for simplicity and to make sure it is actually correct.
|
||||
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
|
||||
-DWITH_LIBEVENT=NO
|
||||
-DWITHOUT_CLIENTLIBS=YES
|
||||
-DENABLE_DTRACE=$(usex systemtap)
|
||||
-DWITH_SSL=$(usex yassl bundled system)
|
||||
-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
|
||||
-DWITHOUT_VALIDATE_PASSWORD=1
|
||||
)
|
||||
|
||||
if use server ; then
|
||||
|
||||
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
|
||||
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
|
||||
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
|
||||
ewarn "You MUST file bugs without these variables set."
|
||||
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
|
||||
-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
|
||||
)
|
||||
|
||||
elif ! use latin1 ; then
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=utf8
|
||||
-DDEFAULT_COLLATION=utf8_general_ci
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=latin1
|
||||
-DDEFAULT_COLLATION=latin1_swedish_ci
|
||||
)
|
||||
fi
|
||||
mycmakeargs+=(
|
||||
-DWITH_NUMA=$(usex numa ON OFF)
|
||||
-DEXTRA_CHARSETS=all
|
||||
-DDISABLE_SHARED=$(usex static YES NO)
|
||||
-DWITH_DEBUG=$(usex debug)
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
)
|
||||
|
||||
if use profiling ; then
|
||||
# Setting to OFF doesn't work: Once set, profiling options will be added
|
||||
# to `mysqld --help` output via sql/sys_vars.cc causing
|
||||
# "main.mysqld--help-notwin" test to fail
|
||||
mycmakeargs+=( -DENABLED_PROFILING=ON )
|
||||
fi
|
||||
|
||||
if use static; then
|
||||
mycmakeargs+=( -DWITH_PIC=1 )
|
||||
fi
|
||||
|
||||
# Storage engines
|
||||
mycmakeargs+=(
|
||||
-DWITH_ARCHIVE_STORAGE_ENGINE=1
|
||||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
|
||||
-DWITH_CSV_STORAGE_ENGINE=1
|
||||
-DWITH_HEAP_STORAGE_ENGINE=1
|
||||
-DWITH_INNOBASE_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAM_STORAGE_ENGINE=1
|
||||
-DWITH_PARTITION_STORAGE_ENGINE=1
|
||||
-DWITH_INNODB_MEMCACHED=0
|
||||
)
|
||||
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_SERVER=1
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
-DEXTRA_CHARSETS=none
|
||||
)
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
|
||||
find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Convenience links
|
||||
einfo "Making Convenience links for mysqlcheck multi-call binary"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqlrepair"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqloptimize"
|
||||
|
||||
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
|
||||
if [[ -d "${ED}/usr/data" ]] ; then
|
||||
rm -Rf "${ED}/usr/data" || die
|
||||
fi
|
||||
|
||||
# Unless they explicitly specific USE=test, then do not install the
|
||||
# testsuite. It DOES have a use to be installed, esp. when you want to do a
|
||||
# validation of your database configuration after tuning it.
|
||||
if ! use test ; then
|
||||
rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
|
||||
fi
|
||||
|
||||
# Configuration stuff
|
||||
einfo "Building default configuration ..."
|
||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
|
||||
[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
|
||||
local mycnf_src="my.cnf-5.6"
|
||||
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
|
||||
"${FILESDIR%/}/${mycnf_src}" \
|
||||
> "${TMPDIR%/}/my.cnf.ok" || die
|
||||
use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
|
||||
if use latin1 ; then
|
||||
sed -i \
|
||||
-e "/character-set/s|utf8|latin1|g" \
|
||||
"${TMPDIR%/}/my.cnf.ok" || die
|
||||
fi
|
||||
eprefixify "${TMPDIR%/}/my.cnf.ok"
|
||||
newins "${TMPDIR}/my.cnf.ok" my.cnf
|
||||
|
||||
if use server ; then
|
||||
einfo "Including support files and sample configurations"
|
||||
docinto "support-files"
|
||||
local script
|
||||
for script in \
|
||||
"${S}"/support-files/magic
|
||||
do
|
||||
[[ -f "$script" ]] && dodoc "${script}"
|
||||
done
|
||||
|
||||
docinto "scripts"
|
||||
for script in "${S}"/scripts/mysql* ; do
|
||||
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
|
||||
done
|
||||
fi
|
||||
|
||||
#Remove mytop if perl is not selected
|
||||
[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
|
||||
}
|
||||
|
||||
# Official test instructions:
|
||||
# USE='perl server static-libs' \
|
||||
# FEATURES='test userpriv -usersandbox' \
|
||||
# ebuild mysql-X.X.XX.ebuild \
|
||||
# digest clean package
|
||||
src_test() {
|
||||
|
||||
_disable_test() {
|
||||
local rawtestname reason
|
||||
rawtestname="${1}" ; shift
|
||||
reason="${@}"
|
||||
ewarn "test '${rawtestname}' disabled: '${reason}'"
|
||||
echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
|
||||
}
|
||||
|
||||
local TESTDIR="${BUILD_DIR}/mysql-test"
|
||||
local retstatus_unit
|
||||
local retstatus_tests
|
||||
|
||||
if ! use server ; then
|
||||
einfo "Skipping server tests due to minimal build."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Bug #213475 - MySQL _will_ object strenously if your machine is named
|
||||
# localhost. Also causes weird failures.
|
||||
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
|
||||
|
||||
if [[ $UID -eq 0 ]]; then
|
||||
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
|
||||
fi
|
||||
has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
|
||||
|
||||
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
|
||||
# Run CTest (test-units)
|
||||
cmake-utils_src_test
|
||||
retstatus_unit=$?
|
||||
|
||||
# Ensure that parallel runs don't die
|
||||
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
|
||||
# Enable parallel testing, auto will try to detect number of cores
|
||||
# You may set this by hand.
|
||||
# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
|
||||
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
|
||||
|
||||
# create directories because mysqladmin might run out of order
|
||||
mkdir -p "${T}"/var-tests{,/log} || die
|
||||
|
||||
# Run mysql tests
|
||||
pushd "${TESTDIR}" > /dev/null || die
|
||||
|
||||
touch "${T}/disabled.def"
|
||||
# These are failing in MySQL 5.6 for now and are believed to be
|
||||
# false positives:
|
||||
#
|
||||
local t
|
||||
|
||||
for t in auth_sec.keyring_udf federated.federated_plugin ; do
|
||||
_disable_test "$t" "False positives in Gentoo"
|
||||
done
|
||||
|
||||
# run mysql-test tests
|
||||
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
|
||||
retstatus_tests=$?
|
||||
|
||||
popd > /dev/null || die
|
||||
|
||||
# Cleanup is important for these testcases.
|
||||
pkill -9 -f "${S}/ndb" 2>/dev/null
|
||||
pkill -9 -f "${S}/sql" 2>/dev/null
|
||||
|
||||
local failures=""
|
||||
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
|
||||
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
|
||||
|
||||
[[ -z "$failures" ]] || die "Test failures: $failures"
|
||||
einfo "Tests successfully completed"
|
||||
}
|
||||
|
||||
mysql_init_vars() {
|
||||
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
|
||||
MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
|
||||
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
|
||||
MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
|
||||
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR=""
|
||||
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
|
||||
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
|
||||
| sed -ne '/datadir/s|^--datadir=||p' \
|
||||
| tail -n1`
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
|
||||
| sed -e 's/.*=\s*//' \
|
||||
| tail -n1`
|
||||
fi
|
||||
fi
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR="${MY_LOCALSTATEDIR}"
|
||||
einfo "Using default MY_DATADIR"
|
||||
fi
|
||||
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
|
||||
|
||||
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
|
||||
if [[ -e "${MY_DATADIR}" ]] ; then
|
||||
# If you get this and you're wondering about it, see bug #207636
|
||||
elog "MySQL datadir found in ${MY_DATADIR}"
|
||||
elog "A new one will not be created."
|
||||
PREVIOUS_DATADIR="yes"
|
||||
else
|
||||
PREVIOUS_DATADIR="no"
|
||||
fi
|
||||
export PREVIOUS_DATADIR
|
||||
fi
|
||||
else
|
||||
if [[ ${EBUILD_PHASE} == "config" ]]; then
|
||||
local new_MY_DATADIR
|
||||
new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
|
||||
| sed -ne '/datadir/s|^--datadir=||p' \
|
||||
| tail -n1`
|
||||
|
||||
if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
|
||||
ewarn "MySQL MY_DATADIR has changed"
|
||||
ewarn "from ${MY_DATADIR}"
|
||||
ewarn "to ${new_MY_DATADIR}"
|
||||
MY_DATADIR="${new_MY_DATADIR}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
|
||||
export MY_LOCALSTATEDIR MY_LOGDIR
|
||||
export MY_DATADIR
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
_getoptval() {
|
||||
local mypd="${EROOT%/}"/usr/bin/my_print_defaults
|
||||
local section="$1"
|
||||
local flag="--${2}="
|
||||
local extra_options="${3}"
|
||||
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
|
||||
}
|
||||
local old_MY_DATADIR="${MY_DATADIR}"
|
||||
local old_HOME="${HOME}"
|
||||
# my_print_defaults needs to read stuff in $HOME/.my.cnf
|
||||
export HOME=${EPREFIX%/}/root
|
||||
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
|
||||
if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
|
||||
die "Minimal builds do NOT include the MySQL server"
|
||||
fi
|
||||
|
||||
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
|
||||
local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
|
||||
MY_DATADIR_s="${MY_DATADIR_s%%/}"
|
||||
local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
|
||||
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
|
||||
|
||||
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
|
||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
|
||||
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
|
||||
else
|
||||
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
|
||||
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|
||||
|| die "Moving MY_DATADIR failed"
|
||||
fi
|
||||
else
|
||||
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
|
||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||
ewarn "Attempting to use ${MY_DATADIR_s}"
|
||||
else
|
||||
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
|
||||
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
local pwd1="a"
|
||||
local pwd2="b"
|
||||
local maxtry=15
|
||||
|
||||
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
|
||||
local tmp_mysqld_password_source=
|
||||
|
||||
for tmp_mysqld_password_source in mysql client; do
|
||||
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
|
||||
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
|
||||
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
|
||||
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
|
||||
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
|
||||
MYSQL_ROOT_PASSWORD=
|
||||
continue
|
||||
fi
|
||||
|
||||
einfo "Found password in '${tmp_mysqld_password_source}' section!"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
|
||||
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
|
||||
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
|
||||
fi
|
||||
|
||||
unset tmp_mysqld_password_source
|
||||
fi
|
||||
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
|
||||
# These are dir+prefix
|
||||
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
|
||||
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
|
||||
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
|
||||
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
|
||||
|
||||
if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
|
||||
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
|
||||
fi
|
||||
if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
|
||||
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
|
||||
fi
|
||||
if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
|
||||
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
|
||||
fi
|
||||
|
||||
if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
|
||||
ewarn "You have already a MySQL database in place."
|
||||
ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
|
||||
ewarn "Please rename or delete it if you wish to replace it."
|
||||
die "MySQL database already exists!"
|
||||
fi
|
||||
|
||||
# Bug #213475 - MySQL _will_ object strenously if your machine is named
|
||||
# localhost. Also causes weird failures.
|
||||
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
|
||||
|
||||
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
|
||||
|
||||
einfo "Please provide a password for the mysql 'root' user now"
|
||||
einfo "or through the ${HOME}/.my.cnf file."
|
||||
ewarn "Avoid [\"'\\_%] characters in the password"
|
||||
read -rsp " >" pwd1 ; echo
|
||||
|
||||
einfo "Retype the password"
|
||||
read -rsp " >" pwd2 ; echo
|
||||
|
||||
if [[ "x$pwd1" != "x$pwd2" ]] ; then
|
||||
die "Passwords are not the same"
|
||||
fi
|
||||
MYSQL_ROOT_PASSWORD="${pwd1}"
|
||||
unset pwd1 pwd2
|
||||
fi
|
||||
|
||||
local options
|
||||
local sqltmp="$(emktemp)"
|
||||
|
||||
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
|
||||
# see http://bugs.mysql.com/bug.php?id=31312
|
||||
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
|
||||
|
||||
local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
|
||||
[[ -r "${help_tables}" ]] \
|
||||
&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
|
||||
|| touch "${TMPDIR}/fill_help_tables.sql"
|
||||
help_tables="${TMPDIR}/fill_help_tables.sql"
|
||||
|
||||
# Figure out which options we need to disable to do the setup
|
||||
local helpfile="${TMPDIR%/}/mysqld-help"
|
||||
"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
|
||||
for opt in host-cache name-resolve networking slave-start \
|
||||
federated ssl log-bin relay-log slow-query-log external-locking \
|
||||
log-slave-updates \
|
||||
; do
|
||||
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
|
||||
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
|
||||
done
|
||||
|
||||
einfo "Creating the mysql database and setting proper permissions on it ..."
|
||||
|
||||
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
|
||||
PID_DIR="${EROOT%/}/var/run/mysqld"
|
||||
if [[ ! -d "${PID_DIR}" ]]; then
|
||||
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${MY_DATADIR}" ]]; then
|
||||
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
|
||||
fi
|
||||
|
||||
pushd "${TMPDIR}" &>/dev/null || die
|
||||
|
||||
# Filling timezones, see
|
||||
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
|
||||
"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
|
||||
chown mysql "${sqltmp}" || die
|
||||
|
||||
local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
|
||||
[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
|
||||
if [[ -r "${help_tables}" ]] ; then
|
||||
cat "${help_tables}" >> "${sqltmp}"
|
||||
fi
|
||||
cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
|
||||
einfo "Command: ${cmd[*]}"
|
||||
su -s /bin/sh -c "${cmd[*]}" mysql \
|
||||
>"${TMPDIR%/}"/mysql_install_db.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
|
||||
die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
|
||||
|| die "MySQL databases not installed"
|
||||
|
||||
use prefix || options="${options} --user=mysql"
|
||||
|
||||
local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
|
||||
local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
|
||||
local mysqld="${EROOT%/}/usr/sbin/mysqld \
|
||||
${options} \
|
||||
$(use prefix || echo --user=mysql) \
|
||||
--log-warnings=0 \
|
||||
--basedir=${EROOT%/}/usr \
|
||||
--datadir=${ROOT%/}/${MY_DATADIR} \
|
||||
--max_allowed_packet=8M \
|
||||
--net_buffer_length=16K \
|
||||
--socket=${socket} \
|
||||
--pid-file=${pidfile} \
|
||||
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
|
||||
#einfo "About to start mysqld: ${mysqld}"
|
||||
ebegin "Starting mysqld"
|
||||
einfo "Command ${mysqld}"
|
||||
${mysqld} &
|
||||
rc=$?
|
||||
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
|
||||
maxtry=$((${maxtry}-1))
|
||||
echo -n "."
|
||||
sleep 1
|
||||
done
|
||||
eend $rc
|
||||
|
||||
if ! [[ -S "${socket}" ]]; then
|
||||
die "Completely failed to start up mysqld with: ${mysqld}"
|
||||
fi
|
||||
|
||||
ebegin "Setting root password"
|
||||
# Do this from memory, as we don't want clear text passwords in temp files
|
||||
local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
|
||||
"${EROOT%/}/usr/bin/mysql" \
|
||||
--no-defaults \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-e "${sql}"
|
||||
eend $?
|
||||
|
||||
if [[ -n "${sqltmp}" ]] ; then
|
||||
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
|
||||
"${EROOT%/}/usr/bin/mysql" \
|
||||
--socket="${socket}" \
|
||||
-hlocalhost \
|
||||
-uroot \
|
||||
--password="${MYSQL_ROOT_PASSWORD}" \
|
||||
mysql < "${sqltmp}"
|
||||
rc=$?
|
||||
eend $?
|
||||
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
|
||||
fi
|
||||
|
||||
# Stop the server and cleanup
|
||||
einfo "Stopping the server ..."
|
||||
kill $(< "${pidfile}" )
|
||||
rm -f "${sqltmp}"
|
||||
wait %1
|
||||
einfo "Done"
|
||||
}
|
Binary file not shown.
@ -0,0 +1,145 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit eutils bash-completion-r1 rust-toolchain versionator toolchain-funcs
|
||||
|
||||
MY_P="rust-${PV}"
|
||||
|
||||
DESCRIPTION="Systems programming language from Mozilla"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
SRC_URI="$(rust_all_arch_uris ${MY_P})"
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
SLOT="stable"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt"
|
||||
|
||||
DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
|
||||
!dev-lang/rust:0
|
||||
!dev-util/cargo
|
||||
rustfmt? ( !dev-util/rustfmt )
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
sys-libs/zlib
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
net-libs/libssh2
|
||||
net-misc/curl[ssl]"
|
||||
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
|
||||
|
||||
QA_PREBUILT="
|
||||
opt/${P}/bin/*-${PV}
|
||||
opt/${P}/lib/*.so
|
||||
opt/${P}/lib/rustlib/*/lib/*.so
|
||||
opt/${P}/lib/rustlib/*/lib/*.rlib*
|
||||
"
|
||||
|
||||
pkg_pretend () {
|
||||
if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
|
||||
die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local std=$(grep 'std' ./components)
|
||||
local components="rustc,cargo,${std}"
|
||||
use doc && components="${components},rust-docs"
|
||||
use clippy && components="${components},clippy-preview"
|
||||
use rustfmt && components="${components},rustfmt-preview"
|
||||
./install.sh \
|
||||
--components="${components}" \
|
||||
--disable-verify \
|
||||
--prefix="${D}/opt/${P}" \
|
||||
--mandir="${D}/usr/share/${P}/man" \
|
||||
--disable-ldconfig \
|
||||
|| die
|
||||
|
||||
local rustc=rustc-bin-${PV}
|
||||
local rustdoc=rustdoc-bin-${PV}
|
||||
local rustgdb=rust-gdb-bin-${PV}
|
||||
local rustlldb=rust-lldb-bin-${PV}
|
||||
|
||||
mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
|
||||
mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
|
||||
mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
|
||||
mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die
|
||||
|
||||
dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
|
||||
dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
|
||||
dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
|
||||
dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
|
||||
|
||||
local cargo=cargo-bin-${PV}
|
||||
mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
|
||||
dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
|
||||
if use clippy; then
|
||||
local clippy_driver=clippy-driver-bin-${PV}
|
||||
local cargo_clippy=cargo-clippy-bin-${PV}
|
||||
mv "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die
|
||||
mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die
|
||||
dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
|
||||
dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
local rustfmt=rustfmt-bin-${PV}
|
||||
local cargo_fmt=cargo-fmt-bin-${PV}
|
||||
mv "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
|
||||
mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
|
||||
dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
|
||||
dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
|
||||
fi
|
||||
|
||||
cat <<-EOF > "${T}"/50${P}
|
||||
LDPATH="/opt/${P}/lib"
|
||||
MANPATH="/usr/share/${P}/man"
|
||||
EOF
|
||||
doenvd "${T}"/50${P}
|
||||
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
dodir /etc/env.d/rust
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB now,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
|
||||
|
||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if has_version 'app-shells/zsh'; then
|
||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust unset --if-invalid
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
--- a/src/tools/clippy/src/driver.rs 2018-10-25 20:09:06.143109996 +0300
|
||||
+++ b/src/tools/clippy/src/driver.rs 2018-10-25 20:11:09.204106005 +0300
|
||||
@@ -29,54 +29,22 @@
|
||||
exit(0);
|
||||
}
|
||||
|
||||
- let sys_root = option_env!("SYSROOT")
|
||||
- .map(String::from)
|
||||
- .or_else(|| std::env::var("SYSROOT").ok())
|
||||
- .or_else(|| {
|
||||
- let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
|
||||
- let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
|
||||
- home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
|
||||
- })
|
||||
- .or_else(|| {
|
||||
- Command::new("rustc")
|
||||
- .arg("--print")
|
||||
- .arg("sysroot")
|
||||
- .output()
|
||||
- .ok()
|
||||
- .and_then(|out| String::from_utf8(out.stdout).ok())
|
||||
- .map(|s| s.trim().to_owned())
|
||||
- })
|
||||
- .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
|
||||
-
|
||||
// Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
|
||||
// We're invoking the compiler programmatically, so we ignore this/
|
||||
- let mut orig_args: Vec<String> = env::args().collect();
|
||||
- if orig_args.len() <= 1 {
|
||||
+ let mut args: Vec<String> = env::args().collect();
|
||||
+ if args.len() <= 1 {
|
||||
std::process::exit(1);
|
||||
}
|
||||
- if Path::new(&orig_args[1]).file_stem() == Some("rustc".as_ref()) {
|
||||
+ if Path::new(&args[1]).file_stem() == Some("rustc".as_ref()) {
|
||||
// we still want to be able to invoke it normally though
|
||||
- orig_args.remove(1);
|
||||
+ args.remove(1);
|
||||
}
|
||||
- // this conditional check for the --sysroot flag is there so users can call
|
||||
- // `clippy_driver` directly
|
||||
- // without having to pass --sysroot or anything
|
||||
- let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
|
||||
- orig_args.clone()
|
||||
- } else {
|
||||
- orig_args
|
||||
- .clone()
|
||||
- .into_iter()
|
||||
- .chain(Some("--sysroot".to_owned()))
|
||||
- .chain(Some(sys_root))
|
||||
- .collect()
|
||||
- };
|
||||
|
||||
// this check ensures that dependencies are built but not linted and the final
|
||||
// crate is
|
||||
// linted but not built
|
||||
let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
|
||||
- || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
|
||||
+ || args.iter().any(|s| s == "--emit=dep-info,metadata");
|
||||
|
||||
if clippy_enabled {
|
||||
args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
|
@ -0,0 +1,263 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
|
||||
|
||||
inherit eapi7-ver multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
|
||||
|
||||
if [[ ${PV} = *beta* ]]; then
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SLOT="beta/${PV}"
|
||||
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
|
||||
else
|
||||
ABI_VER="$(ver_cut 1-2)"
|
||||
SLOT="stable/${ABI_VER}"
|
||||
MY_P="rustc-${PV}"
|
||||
SRC="${MY_P}-src.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
fi
|
||||
|
||||
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).2"
|
||||
|
||||
DESCRIPTION="Systems programming language from Mozilla"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
|
||||
SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
|
||||
$(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
|
||||
|
||||
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
|
||||
NVPTX PowerPC Sparc SystemZ X86 XCore )
|
||||
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
|
||||
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
|
||||
|
||||
IUSE="clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}"
|
||||
|
||||
RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
sys-libs/zlib
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
net-libs/libssh2
|
||||
net-libs/http-parser:=
|
||||
net-misc/curl[ssl]"
|
||||
DEPEND="${RDEPEND}
|
||||
${PYTHON_DEPS}
|
||||
|| (
|
||||
>=sys-devel/gcc-4.7
|
||||
>=sys-devel/clang-3.5
|
||||
)
|
||||
!dev-util/cargo
|
||||
rustfmt? ( !dev-util/rustfmt )
|
||||
dev-util/cmake
|
||||
"
|
||||
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
|
||||
x86? ( cpu_flags_x86_sse2 )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PV}-clippy-sysroot.patch )
|
||||
|
||||
toml_usex() {
|
||||
usex "$1" true false
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
||||
|
||||
local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
|
||||
|
||||
"${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local rust_target="" rust_targets="" rust_target_name arch_cflags
|
||||
|
||||
# Collect rust target names to compile standard libs for all ABIs.
|
||||
for v in $(multilib_get_enabled_abi_pairs); do
|
||||
rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
|
||||
done
|
||||
if use wasm; then
|
||||
rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
|
||||
fi
|
||||
rust_targets="${rust_targets#,}"
|
||||
|
||||
local extended="true" tools="\"cargo\","
|
||||
if use clippy; then
|
||||
tools="\"clippy\",$tools"
|
||||
fi
|
||||
if use rls; then
|
||||
tools="\"rls\",\"analysis\",\"src\",$tools"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
tools="\"rustfmt\",$tools"
|
||||
fi
|
||||
|
||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
||||
|
||||
rust_target="$(rust_abi)"
|
||||
|
||||
cat <<- EOF > "${S}"/config.toml
|
||||
[llvm]
|
||||
optimize = $(toml_usex !debug)
|
||||
release-debuginfo = $(toml_usex debug)
|
||||
assertions = $(toml_usex debug)
|
||||
targets = "${LLVM_TARGETS// /;}"
|
||||
[build]
|
||||
build = "${rust_target}"
|
||||
host = ["${rust_target}"]
|
||||
target = [${rust_targets}]
|
||||
cargo = "${rust_stage0_root}/bin/cargo"
|
||||
rustc = "${rust_stage0_root}/bin/rustc"
|
||||
docs = $(toml_usex doc)
|
||||
submodules = false
|
||||
python = "${EPYTHON}"
|
||||
locked-deps = true
|
||||
vendor = true
|
||||
extended = ${extended}
|
||||
tools = [${tools}]
|
||||
[install]
|
||||
prefix = "${EPREFIX}/usr"
|
||||
libdir = "$(get_libdir)/${P}"
|
||||
docdir = "share/doc/${P}"
|
||||
mandir = "share/${P}/man"
|
||||
[rust]
|
||||
optimize = $(toml_usex !debug)
|
||||
debuginfo = $(toml_usex debug)
|
||||
debug-assertions = $(toml_usex debug)
|
||||
use-jemalloc = $(toml_usex jemalloc)
|
||||
default-linker = "$(tc-getCC)"
|
||||
channel = "stable"
|
||||
rpath = false
|
||||
lld = $(toml_usex wasm)
|
||||
EOF
|
||||
|
||||
for v in $(multilib_get_enabled_abi_pairs); do
|
||||
rust_target=$(get_abi_CHOST ${v##*.})
|
||||
arch_cflags="$(get_abi_CFLAGS ${v##*.})"
|
||||
|
||||
cat <<- EOF >> "${S}"/config.env
|
||||
CFLAGS_${rust_target}=${arch_cflags}
|
||||
EOF
|
||||
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
[target.${rust_target}]
|
||||
cc = "$(tc-getBUILD_CC)"
|
||||
cxx = "$(tc-getBUILD_CXX)"
|
||||
linker = "$(tc-getCC)"
|
||||
ar = "$(tc-getAR)"
|
||||
EOF
|
||||
done
|
||||
|
||||
if use wasm; then
|
||||
cat <<- EOF >> "${S}"/config.toml
|
||||
[target.wasm32-unknown-unknown]
|
||||
linker = "rust-lld"
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
env $(cat "${S}"/config.env)\
|
||||
"${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
|
||||
--exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local rust_target abi_libdir
|
||||
|
||||
env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
|
||||
|
||||
mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
|
||||
mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
|
||||
mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
|
||||
mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
|
||||
mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
|
||||
if use clippy; then
|
||||
mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
|
||||
mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
|
||||
fi
|
||||
if use rls; then
|
||||
mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
|
||||
fi
|
||||
if use rustfmt; then
|
||||
mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
|
||||
mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
|
||||
fi
|
||||
|
||||
# Copy shared library versions of standard libraries for all targets
|
||||
# into the system's abi-dependent lib directories because the rust
|
||||
# installer only does so for the native ABI.
|
||||
for v in $(multilib_get_enabled_abi_pairs); do
|
||||
if [ ${v##*.} = ${DEFAULT_ABI} ]; then
|
||||
continue
|
||||
fi
|
||||
abi_libdir=$(get_abi_LIBDIR ${v##*.})
|
||||
rust_target=$(get_abi_CHOST ${v##*.})
|
||||
rust_abi=$(rust_abi $rust_target)
|
||||
mkdir -p "${D}/usr/${abi_libdir}"
|
||||
cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_abi}/lib"/*.so \
|
||||
"${D}/usr/${abi_libdir}" || die
|
||||
done
|
||||
|
||||
dodoc COPYRIGHT
|
||||
|
||||
# FIXME:
|
||||
# Really not sure if that env is needed, specailly LDPATH
|
||||
cat <<-EOF > "${T}"/50${P}
|
||||
LDPATH="/usr/$(get_libdir)/${P}"
|
||||
MANPATH="/usr/share/${P}/man"
|
||||
EOF
|
||||
doenvd "${T}"/50${P}
|
||||
|
||||
cat <<-EOF > "${T}/provider-${P}"
|
||||
/usr/bin/rustdoc
|
||||
/usr/bin/rust-gdb
|
||||
/usr/bin/rust-lldb
|
||||
EOF
|
||||
echo /usr/bin/cargo >> "${T}/provider-${P}"
|
||||
if use clippy; then
|
||||
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rls; then
|
||||
echo /usr/bin/rls >> "${T}/provider-${P}"
|
||||
fi
|
||||
if use rustfmt; then
|
||||
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
|
||||
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
|
||||
fi
|
||||
dodir /etc/env.d/rust
|
||||
insinto /etc/env.d/rust
|
||||
doins "${T}/provider-${P}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect rust update --if-unset
|
||||
|
||||
elog "Rust installs a helper script for calling GDB and LLDB,"
|
||||
elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
|
||||
|
||||
if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
|
||||
elog "install app-emacs/rust-mode to get emacs support for rust."
|
||||
fi
|
||||
|
||||
if has_version app-editors/gvim || has_version app-editors/vim; then
|
||||
elog "install app-vim/rust-vim to get vim support for rust."
|
||||
fi
|
||||
|
||||
if has_version 'app-shells/zsh'; then
|
||||
elog "install app-shells/rust-zshcomp to get zsh completion for rust."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect rust unset --if-invalid
|
||||
}
|
@ -0,0 +1,357 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
|
||||
|
||||
RUBY_OPTIONAL="yes"
|
||||
USE_RUBY="ruby24"
|
||||
|
||||
PHP_EXT_NAME="IcePHP"
|
||||
PHP_EXT_INI="yes"
|
||||
PHP_EXT_ZENDEXT="no"
|
||||
|
||||
PHP_EXT_OPTIONAL_USE=php
|
||||
|
||||
USE_PHP="php7-0"
|
||||
|
||||
# This variable does not belong to any eclass. It is solely used in this ebuild
|
||||
# db:6.2 breaks the build process
|
||||
BERKDB_SLOTS=( 6.1 5.3 5.1 4.8 )
|
||||
|
||||
inherit db-use mono-env php-ext-source-r3 python-r1 ruby-ng toolchain-funcs eapi7-ver
|
||||
|
||||
DESCRIPTION="ICE middleware C++ library and generator tools"
|
||||
HOMEPAGE="https://zeroc.com/products/ice"
|
||||
SRC_URI="https://github.com/zeroc-ice/ice/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
doc? ( http://download.zeroc.com/Ice/$(ver_cut 1-2)/${P}.pdf )"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/36"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE="doc examples libressl +ncurses mono php python ruby test debug"
|
||||
RESTRICT="test"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
RDEPEND=">=dev-libs/expat-2.0.1
|
||||
>=app-arch/bzip2-1.0.5
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
|| (
|
||||
$(for slot in ${BERKDB_SLOTS[@]} ; do printf '%s\n' "sys-libs/db:${slot}[cxx]" ; done)
|
||||
)
|
||||
dev-cpp/libmcpp
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
ruby? ( $(ruby_implementation_depend ruby24) )
|
||||
mono? ( dev-lang/mono )
|
||||
php? ( dev-lang/php:7.0 )
|
||||
!dev-python/IcePy
|
||||
!dev-ruby/IceRuby"
|
||||
DEPEND="${RDEPEND}
|
||||
ncurses? ( sys-libs/ncurses:0= sys-libs/readline:0= )
|
||||
test? (
|
||||
${PYTHON_DEPS}
|
||||
dev-python/passlib[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
# Maintainer notes:
|
||||
# TODO: java bindings, multiple ruby versions (supports 2.{1,2,3})
|
||||
|
||||
S="${WORKDIR}/${P/I/i}"
|
||||
PHP_EXT_S="${S}/php"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-3.6.3-no-arch-opts.patch"
|
||||
"${FILESDIR}/${PN}-3.6.3-csharp.patch"
|
||||
#"${FILESDIR}/${PN}-3.6.3-libressl.patch"
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
# prevent ruby-ng.eclass from messing with pkg_setup
|
||||
return
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# prevent ruby-ng.eclass from messing with src_unpack
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's|\(install_configdir[[:space:]]*\):=|\1?=|' \
|
||||
-e 's|-L\$\(libdir\)||' \
|
||||
cpp/config/Make.rules || die "sed failed"
|
||||
|
||||
sed -i \
|
||||
-e 's|\(install_phpdir[[:space:]]*\):=|\1?=|' \
|
||||
-e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \
|
||||
php/config/Make.rules.php || die "sed failed"
|
||||
|
||||
sed -i \
|
||||
-e 's|\(install_pythondir[[:space:]]*\)=|\1?=|' \
|
||||
-e 's|\(install_rubydir[[:space:]]*\)=|\1?=|' \
|
||||
-e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \
|
||||
{python,ruby}/config/Make.rules || die "sed failed"
|
||||
|
||||
sed -i \
|
||||
-e 's|-O2 ||g' \
|
||||
-e 's|-Werror ||g' \
|
||||
cpp/config/Make.rules.Linux || die "sed failed"
|
||||
|
||||
sed -i \
|
||||
-e 's|install-common||' \
|
||||
{cpp,csharp,php,python,ruby}/Makefile || die "sed failed"
|
||||
|
||||
sed -i \
|
||||
-e 's|-f -root|-f -gacdir $(GAC_DIR) -root|' \
|
||||
-e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \
|
||||
-e 's|\(install_pkgconfigdir[[:space:]]*\):=|\1?=|' \
|
||||
csharp/config/Make.rules.cs || die "sed failed"
|
||||
|
||||
# skip mono tests, bug #498484
|
||||
sed -i \
|
||||
-e '/SUBDIRS/s|\ test||' \
|
||||
csharp/Makefile || die "sed failed"
|
||||
|
||||
# skip udp test due to multicast
|
||||
# skip IceGrid/admin bug #649850
|
||||
# skip IceSSL tests due to requirement of internet connection
|
||||
# skip IceStorm/single bug #636834
|
||||
# IceStorm/stress fails without USE=debug
|
||||
# IceUtil/stacktrace fails with USE=debug
|
||||
sed -i \
|
||||
-e 's|allTests.py|allTests.py --rfilter=IceUtil\/stacktrace --rfilter=udp --rfilter=IceGrid\/admin --rfilter=IceSSL --rfilter=IceStorm\/single --rfilter=IceStorm\/stress|' \
|
||||
cpp/Makefile || die "sed failed"
|
||||
|
||||
# mainly broken .ice files
|
||||
sed -i \
|
||||
-e 's|allTests.py|allTests.py --rfilter=operations --rfilter=slicing\/objects|' \
|
||||
python/Makefile || die "sed failed"
|
||||
|
||||
# fails even on unicode locale
|
||||
sed -i \
|
||||
-e 's|allTests.py|allTests.py --rfilter=Slice\/unicodePaths|' \
|
||||
ruby/Makefile || die "sed failed"
|
||||
|
||||
# fix for x86 IceBox test
|
||||
sed -i \
|
||||
-e 's|"32"|""|' \
|
||||
scripts/TestUtil.py || die "sed failed"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
suitable_db_version() {
|
||||
local ver
|
||||
for ver in "${BERKDB_SLOTS[@]}"; do
|
||||
if [[ -n $(db_findver sys-libs/db:${ver}) ]]; then
|
||||
echo "${ver}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
die "No suitable BerkDB versions found, aborting"
|
||||
}
|
||||
|
||||
MAKE_RULES=(
|
||||
"prefix=\"${ED%/}/usr\""
|
||||
"install_docdir=\"${ED%/}/usr/share/doc/${PF}\""
|
||||
"install_configdir=\"${ED%/}/usr/share/${P}/config\""
|
||||
"install_mandir=\"${ED%/}/usr/share/man/man1\""
|
||||
"embedded_runpath_prefix=\"${EPREFIX}/usr\""
|
||||
"LP64=yes"
|
||||
"new_dtags=yes"
|
||||
"NOTEST=$(usex !test)"
|
||||
"USE_READLINE=$(usex ncurses)"
|
||||
"OPTIMIZE=$(usex !debug)"
|
||||
)
|
||||
|
||||
local BERKDB_VERSION="$(suitable_db_version)"
|
||||
MAKE_RULES+=("DB_FLAGS=-I$(db_includedir ${BERKDB_VERSION})")
|
||||
sed -i \
|
||||
-e "s|g++|$(tc-getCXX)|" \
|
||||
-e "s|\(CFLAGS[[:space:]]*=\)|\1 ${CFLAGS}|" \
|
||||
-e "s|\(CXXFLAGS[[:space:]]*=\)|\1 ${CXXFLAGS}|" \
|
||||
-e "s|\(LDFLAGS[[:space:]]*=\)|\1 ${LDFLAGS}|" \
|
||||
-e "s|\(DB_LIBS[[:space:]]*=\) \-ldb_cxx|\1 -ldb_cxx-$(db_findver sys-libs/db:${BERKDB_VERSION})|" \
|
||||
cpp/config/Make.rules{,.Linux} python/config/Make.rules || die "sed failed"
|
||||
|
||||
if use python; then
|
||||
local S="${S}/python"
|
||||
python_copy_sources
|
||||
fi
|
||||
|
||||
if use ruby; then
|
||||
SITERUBY="$(ruby24 -r rbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')"
|
||||
MAKE_RULES_RUBY=(
|
||||
"install_rubydir=\"${ED%/}/${SITERUBY}\""
|
||||
"install_libdir=\"${ED%/}/${SITERUBY}\""
|
||||
)
|
||||
|
||||
# make it use ruby24 only
|
||||
sed -i \
|
||||
-e 's|RUBY = ruby|\024|' \
|
||||
ruby/config/Make.rules || die "sed failed"
|
||||
sed -i \
|
||||
-e 's|env ruby|\024|' \
|
||||
ruby/config/s2rb.rb || die "sed failed"
|
||||
sed -i \
|
||||
-e 's|env ruby|\024|' \
|
||||
ruby/scripts/slice2rb || die "sed failed"
|
||||
sed -i \
|
||||
-e 's|output.write("ruby|\024|' \
|
||||
scripts/TestUtil.py || die "sed failed"
|
||||
fi
|
||||
|
||||
MAKE_RULES_MONO=(
|
||||
"GACINSTALL=yes"
|
||||
"GAC_ROOT=\"${ED%/}/usr/$(get_libdir)\""
|
||||
"GAC_DIR=\"${EPREFIX}/usr/$(get_libdir)\""
|
||||
"install_libdir=\"${ED%/}/usr/$(get_libdir)\""
|
||||
"install_pkgconfigdir=\"${ED%/}/usr/$(get_libdir)/pkgconfig\""
|
||||
)
|
||||
|
||||
if has_version ">dev-lang/mono-4"; then
|
||||
MAKE_RULES_MONO+=("MCS=mcs")
|
||||
fi
|
||||
|
||||
use test && python_setup
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Do not remove this export or build will break!
|
||||
tc-export CXX
|
||||
|
||||
emake -C cpp "${MAKE_RULES[@]}"
|
||||
|
||||
if use php; then
|
||||
local i
|
||||
for i in $(php_get_slots); do
|
||||
mkdir -p "${WORKDIR}/${i}" || die
|
||||
cp -r "${PHP_EXT_S}" "${WORKDIR}/${i}/" || die "Failed to copy source ${PHP_EXT_S} to PHP target directory"
|
||||
|
||||
pushd "${WORKDIR}/${i}" >/dev/null || die
|
||||
ln -s "${S}/cpp" || die
|
||||
ln -s "${S}/config" || die
|
||||
ln -s "${S}/slice" || die
|
||||
ln -s "${S}/Makefile" || die
|
||||
|
||||
emake -C php "${MAKE_RULES[@]}" USE_NAMESPACES=yes "PHP_CONFIG=\"${EPREFIX}/usr/$(get_libdir)/${i}/bin/php-config\""
|
||||
popd >/dev/null || die
|
||||
done
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
building() {
|
||||
emake -C "${BUILD_DIR}" "${MAKE_RULES[@]}" PYTHON="${EPYTHON}"
|
||||
}
|
||||
local S="${S}/python"
|
||||
python_foreach_impl building
|
||||
fi
|
||||
|
||||
if use ruby; then
|
||||
emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}"
|
||||
fi
|
||||
|
||||
if use mono; then
|
||||
emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local -x LD_LIBRARY_PATH="${S}/cpp/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
|
||||
emake -C cpp "${MAKE_RULES[@]}" test
|
||||
|
||||
# php tests require the extension loaded and are therefore skipped
|
||||
|
||||
if use python; then
|
||||
testing() {
|
||||
emake -C "${BUILD_DIR}" \
|
||||
"${MAKE_RULES[@]}" \
|
||||
PYTHON="${EPYTHON}" \
|
||||
install_pythondir="\"${D%/}/$(python_get_sitedir)\"" \
|
||||
install_libdir="\"${D%/}/$(python_get_sitedir)\"" test
|
||||
}
|
||||
local S="${S}/python"
|
||||
python_foreach_impl testing
|
||||
fi
|
||||
|
||||
if use ruby; then
|
||||
emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" test
|
||||
fi
|
||||
|
||||
if use mono; then
|
||||
# skip mono tests, bug #498484
|
||||
ewarn "Tests for C# are currently disabled."
|
||||
#emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}" test
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=( CHANGELOG*.md README.md )
|
||||
use doc && DOCS+=( "${DISTDIR}/${P}.pdf" )
|
||||
einstalldocs
|
||||
|
||||
insinto /usr/share/${P}
|
||||
doins -r slice
|
||||
|
||||
emake -C cpp "${MAKE_RULES[@]}" install
|
||||
|
||||
if use examples; then
|
||||
docinto examples-cpp
|
||||
dodoc cpp/config/*.cfg
|
||||
docompress -x /usr/share/doc/${PF}/examples-cpp
|
||||
fi
|
||||
|
||||
if use php; then
|
||||
insinto "/usr/share/php/${PN}"
|
||||
|
||||
local i
|
||||
while IFS="" read -d $'\0' -r i; do
|
||||
doins "${i}"
|
||||
done < <(find "${S}/php/lib/" -name '*.php' -print0)
|
||||
|
||||
pushd "${ED%/}/usr/share/${P}/slice" >/dev/null || die
|
||||
|
||||
local -x LD_LIBRARY_PATH="${ED%/}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
|
||||
for i in *; do
|
||||
mkdir -p "${ED%/}/usr/share/php/${i}" || die
|
||||
"${ED%/}"/usr/bin/slice2php \
|
||||
-I"${ED%/}/usr/share/${P}/slice/" --all \
|
||||
--output-dir "${ED%/}/usr/share/php/${i}" \
|
||||
--ice "${ED%/}/usr/share/${P}/slice/${i}"/*
|
||||
done
|
||||
|
||||
for i in $(php_get_slots); do
|
||||
php_init_slot_env "${i}"
|
||||
insinto "${EXT_DIR}"
|
||||
newins "php/lib/${PHP_EXT_NAME}.so" "${PHP_EXT_NAME}.so"
|
||||
done
|
||||
php-ext-source-r2_createinifiles
|
||||
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
installation() {
|
||||
mkdir -p "${D%/}/$(python_get_sitedir)" || die
|
||||
|
||||
emake -C "${BUILD_DIR}" \
|
||||
"${MAKE_RULES[@]}" \
|
||||
install_pythondir="\"${D%/}/$(python_get_sitedir)\"" \
|
||||
install_libdir="\"${D%/}/$(python_get_sitedir)\"" \
|
||||
install
|
||||
}
|
||||
local S="${S}/python"
|
||||
python_foreach_impl installation
|
||||
fi
|
||||
|
||||
if use ruby; then
|
||||
dodir "${SITERUBY}"
|
||||
emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" install
|
||||
fi
|
||||
|
||||
if use mono; then
|
||||
emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}" install
|
||||
fi
|
||||
}
|
@ -1,2 +1,4 @@
|
||||
DIST Ice-3.6.3.pdf 8844957 BLAKE2B 137e3ce85885305931cbbb2c838ccc52175dffb7ad51264837b2db77eea05987ebecc5e3678e2f589bef1cc94c133f0f298ecce23031fcf2654621921c2bd541 SHA512 44638a315b0da9c26519c053c48ab8ee216c43410f53844465535a972ae01031f1603769e9b3169fdf9358de67e0d0c7e238b2918b5d5b1c4cb95cb922fa922a
|
||||
DIST Ice-3.6.3.tar.gz 5512741 BLAKE2B 7219cd263ccf6207c0d1e788358004744bd53717bba79a53be468b5e38ddbc81895ef078ba31c98d90ac9ccdd9e17123f4a7ab590fa354c28f6d82f09bf0301d SHA512 6e17d21f55a8504af87a64c498a0c4d2084ed96a85c7a66d00319324774f671ace6afa03108d8d4e9bedf5fcfc2f3dba247949a27deecacdd0d298bd0bfe0a45
|
||||
DIST Ice-3.6.4.pdf 8907736 BLAKE2B 5a631c1e2e147c8ed3b31a84192210c92bbe83e8644ec9d7d164d1b94a20069ce77f6baf54910ac00c7216cbc2979caac6fa78457e9292a84407e93000f9903a SHA512 9bd2d373eb83e08e563cab174a53063a490367dea3e4b910f93f0477c3817282c859f07e46e503006e9bd37678fb6da31a58b88bfabd217b5e371fff685321a0
|
||||
DIST Ice-3.6.4.tar.gz 5523841 BLAKE2B 4e50dcf0f004f14a38c173f181cabb97fdc201786c338800b9750dc0cf6ce9b1397ea26b4357de1f6e1ac6b4e69abbe2bf464a5f9c2926f6ae45abbf5a69803b SHA512 fdb412ce591bca7aede2ac7d70600184f3b67279e8ffdfee3649f517d5531d2dfee54b37d0cc6de2ef5de8ecd281c39d6c951781b68f9a36316a7607cefb9e57
|
||||
|
Binary file not shown.
@ -1,32 +1,49 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
NETSURF_BUILDSYSTEM=buildsystem-1.7
|
||||
inherit netsurf
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="CSS parser and selection engine, written in C"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/projects/libcss/"
|
||||
SRC_URI="https://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~m68k-mint"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND=">=dev-libs/libparserutils-0.2.1-r1[static-libs?,${MULTILIB_USEDEP}]
|
||||
>=dev-libs/libwapcaplet-0.4.0[static-libs?,${MULTILIB_USEDEP}]"
|
||||
RDEPEND="
|
||||
>=dev-libs/libparserutils-0.2.1-r1
|
||||
>=dev-libs/libwapcaplet-0.4.0"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/netsurf-buildsystem
|
||||
virtual/pkgconfig
|
||||
test? ( dev-lang/perl )"
|
||||
|
||||
src_prepare() {
|
||||
# working around broken netsurf eclass
|
||||
default
|
||||
sed -e '1i#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"' \
|
||||
-i src/parse/parse.c src/select/arena_hash.h || die
|
||||
sed -e '1i#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"' \
|
||||
-i src/parse/parse.c src/select/computed.c || die
|
||||
}
|
||||
|
||||
_emake() {
|
||||
source /usr/share/netsurf-buildsystem/gentoo-helpers.sh
|
||||
netsurf_define_makeconf
|
||||
emake "${NETSURF_MAKECONF[@]}" COMPONENT_TYPE=lib-shared $@
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
_emake
|
||||
}
|
||||
|
||||
src_test() {
|
||||
_emake test
|
||||
}
|
||||
|
||||
multilib_copy_sources
|
||||
src_install() {
|
||||
_emake DESTDIR="${ED}" install
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="framebuffer abstraction library, written in C"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/projects/libnsfb/"
|
||||
SRC_URI="https://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc"
|
||||
IUSE="sdl test vnc wayland xcb"
|
||||
|
||||
RDEPEND="sdl? ( >=media-libs/libsdl-1.2.15-r4 )
|
||||
vnc? ( >=net-libs/libvncserver-0.9.9-r2 )
|
||||
wayland? ( >=dev-libs/wayland-1.0.6 )
|
||||
xcb? (
|
||||
>=x11-libs/libxcb-1.9.1
|
||||
>=x11-libs/xcb-util-0.3.9-r1
|
||||
>=x11-libs/xcb-util-image-0.3.9-r1
|
||||
>=x11-libs/xcb-util-keysyms-0.3.9-r1
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/netsurf-buildsystem"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-0.1.0-autodetect.patch )
|
||||
|
||||
DOCS=( usage )
|
||||
|
||||
_emake() {
|
||||
source /usr/share/netsurf-buildsystem/gentoo-helpers.sh
|
||||
netsurf_define_makeconf
|
||||
emake "${NETSURF_MAKECONF[@]}" COMPONENT_TYPE=lib-shared \
|
||||
WITH_VNC=$(usex vnc) \
|
||||
WITH_SDL=$(usex sdl) \
|
||||
WITH_XCB=$(usex xcb) \
|
||||
WITH_WLD=$(usex wayland) \
|
||||
$@
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
_emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
_emake DESTDIR="${ED}" install
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
NETSURF_BUILDSYSTEM=buildsystem-1.7
|
||||
inherit netsurf
|
||||
|
||||
DESCRIPTION="framebuffer abstraction library, written in C"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/projects/libnsfb/"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc"
|
||||
IUSE="sdl test vnc wayland xcb"
|
||||
|
||||
RDEPEND="sdl? ( >=media-libs/libsdl-1.2.15-r4[static-libs?,${MULTILIB_USEDEP}] )
|
||||
vnc? ( >=net-libs/libvncserver-0.9.9-r2[static-libs?,${MULTILIB_USEDEP}] )
|
||||
wayland? ( >=dev-libs/wayland-1.0.6[static-libs?,${MULTILIB_USEDEP}] )
|
||||
xcb? ( >=x11-libs/libxcb-1.9.1[static-libs?,${MULTILIB_USEDEP}]
|
||||
>=x11-libs/xcb-util-0.3.9-r1[static-libs?,${MULTILIB_USEDEP}]
|
||||
>=x11-libs/xcb-util-image-0.3.9-r1[static-libs?,${MULTILIB_USEDEP}]
|
||||
>=x11-libs/xcb-util-keysyms-0.3.9-r1[static-libs?,${MULTILIB_USEDEP}] )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-0.1.0-autodetect.patch )
|
||||
|
||||
DOCS=( usage )
|
||||
|
||||
src_prepare() {
|
||||
# working around broken netsurf eclass
|
||||
default
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
netsurf_src_configure
|
||||
|
||||
netsurf_makeconf+=(
|
||||
WITH_VNC=$(usex vnc)
|
||||
WITH_SDL=$(usex sdl)
|
||||
WITH_XCB=$(usex xcb)
|
||||
WITH_WLD=$(usex wayland)
|
||||
)
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="base64 and time library, written in C"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/"
|
||||
SRC_URI="https://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="dev-util/netsurf-buildsystem"
|
||||
|
||||
_emake() {
|
||||
source /usr/share/netsurf-buildsystem/gentoo-helpers.sh
|
||||
netsurf_define_makeconf
|
||||
emake "${NETSURF_MAKECONF[@]}" COMPONENT_TYPE=lib-shared $@
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
_emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
_emake DESTDIR="${ED}" install
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
NETSURF_BUILDSYSTEM=buildsystem-1.7
|
||||
inherit netsurf
|
||||
|
||||
DESCRIPTION="base64 and time library, written in C"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
# working around broken netsurf eclass
|
||||
default
|
||||
multilib_copy_sources
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic toolchain-funcs
|
||||
|
||||
DESCRIPTION="library for building efficient parsers, written in C"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/projects/libparserutils/"
|
||||
SRC_URI="https://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~x86 ~m68k-mint"
|
||||
IUSE="iconv test"
|
||||
|
||||
DEPEND="
|
||||
dev-util/netsurf-buildsystem
|
||||
test? ( dev-lang/perl )"
|
||||
|
||||
DOCS=( README docs/Todo )
|
||||
|
||||
src_configure() {
|
||||
append-cflags "-D$(usex iconv WITH WITHOUT)_ICONV_FILTER"
|
||||
}
|
||||
|
||||
_emake() {
|
||||
source /usr/share/netsurf-buildsystem/gentoo-helpers.sh
|
||||
netsurf_define_makeconf
|
||||
emake "${NETSURF_MAKECONF[@]}" COMPONENT_TYPE=lib-shared $@
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
_emake
|
||||
}
|
||||
|
||||
src_test() {
|
||||
_emake test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
_emake DESTDIR="${ED}" install
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
NETSURF_BUILDSYSTEM=buildsystem-1.7
|
||||
inherit flag-o-matic netsurf
|
||||
|
||||
DESCRIPTION="library for building efficient parsers, written in C"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/projects/libparserutils/"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~x86 ~m68k-mint"
|
||||
IUSE="iconv test"
|
||||
|
||||
DEPEND="test? ( dev-lang/perl )"
|
||||
|
||||
DOCS=( README docs/Todo )
|
||||
|
||||
src_prepare() {
|
||||
# working around broken netsurf eclass
|
||||
default
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
netsurf_src_configure
|
||||
|
||||
append-cflags "-D$(usex iconv WITH WITHOUT)_ICONV_FILTER"
|
||||
}
|
@ -1,8 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>xmw@gentoo.org</email>
|
||||
<name>Michael Weber</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>xmw@gentoo.org</email>
|
||||
<name>Michael Weber</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>vdupras@gentoo.org</email>
|
||||
<name>Virgil Dupras</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
|
@ -0,0 +1,34 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
MY_P="${P/_p/-}"
|
||||
DESCRIPTION="mapping tool for UTF-8 strings"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/"
|
||||
SRC_URI="https://download.netsurf-browser.org/libs/releases/${MY_P}-src.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="dev-util/netsurf-buildsystem"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
_emake() {
|
||||
source /usr/share/netsurf-buildsystem/gentoo-helpers.sh
|
||||
netsurf_define_makeconf
|
||||
emake "${NETSURF_MAKECONF[@]}" COMPONENT_TYPE=lib-shared $@
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
_emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
_emake DESTDIR="${ED}" install
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
NETSURF_BUILDSYSTEM=buildsystem-1.7
|
||||
inherit netsurf
|
||||
|
||||
DESCRIPTION="mapping tool for UTF-8 strings"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/"
|
||||
SRC_URI="${NETSURF_BUILDSYSTEM_SRC_URI}
|
||||
http://download.netsurf-browser.org/libs/releases/${P/_p/-}-src.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}/${P/_p/-}"
|
||||
|
||||
src_prepare() {
|
||||
# working around broken netsurf eclass
|
||||
default
|
||||
multilib_copy_sources
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="string internment library, written in C"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/projects/libwapcaplet/"
|
||||
SRC_URI="https://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~m68k-mint"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="
|
||||
dev-util/netsurf-buildsystem
|
||||
test? ( >=dev-libs/check-0.9.11 )"
|
||||
|
||||
PATCHES=(
|
||||
# bug 664288
|
||||
"${FILESDIR}/${PN}-0.4.1-makefile.patch"
|
||||
)
|
||||
|
||||
_emake() {
|
||||
source /usr/share/netsurf-buildsystem/gentoo-helpers.sh
|
||||
netsurf_define_makeconf
|
||||
emake "${NETSURF_MAKECONF[@]}" COMPONENT_TYPE=lib-shared $@
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
_emake
|
||||
}
|
||||
|
||||
src_test() {
|
||||
_emake test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
_emake DESTDIR="${ED}" install
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
NETSURF_BUILDSYSTEM=buildsystem-1.7
|
||||
inherit netsurf
|
||||
|
||||
DESCRIPTION="string internment library, written in C"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/projects/libwapcaplet/"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~m68k-mint"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="test? ( >=dev-libs/check-0.9.11[${MULTILIB_USEDEP}] )"
|
||||
|
||||
PATCHES=(
|
||||
# bug 664288
|
||||
"${FILESDIR}/${PN}-0.4.1-makefile.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# working around broken netsurf eclass
|
||||
default
|
||||
multilib_copy_sources
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST netsurf-buildsystem-1.7.tar.gz 38597 BLAKE2B d0981ef282ac0d93d81a1a6a6bee1fc2a0151c962be6ce2900a67843ba8ebc67e00508cded2a7375f6bbe0d45572690f127872936a282de80eb08655ac571603 SHA512 f6a46ac25f41e695ec13d7b2b564250c4cc44a40a688904eb17aa4b547c2df0102cc0effb7a23a2ffa6b9178ae5cf452b63980caf26e06e479168c85803f1e58
|
||||
DIST nsgenbind-0.6-src.tar.gz 106862 BLAKE2B 9b40ae6298921736f7d876ae664207eb71102adbe44f4072ea46b08b63cb5cf608df4c96f3ade1c8cca964d8d8b32d68aad25431f6fd455eb8392d8313faa9e9 SHA512 3083b48e48fcf8c7f32b09d040998470d5917469e020c4ccbfb8ffdb7d1252fd27dd02f590f5a2485c6984cdbc005ea87adf0db45077aee0a91f68037c542ffb
|
||||
|
@ -0,0 +1,33 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="generate javascript to dom bindings from w3c webidl files"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/"
|
||||
SRC_URI="https://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="
|
||||
dev-util/netsurf-buildsystem
|
||||
virtual/yacc"
|
||||
|
||||
_emake() {
|
||||
source /usr/share/netsurf-buildsystem/gentoo-helpers.sh
|
||||
netsurf_define_makeconf
|
||||
emake "${NETSURF_MAKECONF[@]}" COMPONENT_TYPE=binary $@
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
_emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
_emake DESTDIR="${ED}" install
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
NETSURF_COMPONENT_TYPE=binary
|
||||
NETSURF_BUILDSYSTEM=buildsystem-1.7
|
||||
inherit netsurf
|
||||
|
||||
DESCRIPTION="generate javascript to dom bindings from w3c webidl files"
|
||||
HOMEPAGE="http://www.netsurf-browser.org/"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~ppc"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="virtual/yacc"
|
||||
|
||||
src_prepare() {
|
||||
# working around broken netsurf eclass
|
||||
default
|
||||
multilib_copy_sources
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
From ab21d82bc0186627451d16be45568fcf2b590817 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Wendler <polynomial-c@gentoo.org>
|
||||
Date: Tue, 22 May 2018 15:08:44 +0200
|
||||
Subject: [PATCH] Use pkgconfig to find python
|
||||
|
||||
otherwise linkage and include of python fails if python is not in
|
||||
default (python$(PYTHON_VERSION)) location.
|
||||
---
|
||||
Makefile.am | 4 ++--
|
||||
configure.ac | 7 +++++--
|
||||
2 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 68560b1..0bc1a5b 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -20,7 +20,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \
|
||||
$(libcryptsetup_CFLAGS) $(nss_CFLAGS)
|
||||
LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"'
|
||||
-PYTHON_CPPFLAGS = -I/usr/include/python$(PYTHON_VERSION)
|
||||
+PYTHON_CPPFLAGS = $(PYTHON_CFLAGS)
|
||||
|
||||
## Targets
|
||||
SUBDIRS = po
|
||||
@@ -65,7 +65,7 @@ lib_libvolume_key_la_LIBADD = $(blkid_LIBS) $(glib_LIBS) $(GPGME_LIBS) \
|
||||
python__volume_key_la_SOURCES = python/volume_key_wrap.c
|
||||
python__volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS)
|
||||
python__volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS)
|
||||
-python__volume_key_la_LIBADD = lib/libvolume_key.la -lpython$(PYTHON_VERSION) \
|
||||
+python__volume_key_la_LIBADD = lib/libvolume_key.la $(PYTHON_LIBS) \
|
||||
$(glib_LIBS) $(nss_LIBS)
|
||||
|
||||
src_volume_key_SOURCES = src/volume_key.c
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 40c3906..c9680e4 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -28,8 +28,11 @@ AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AM_PROG_AR
|
||||
LT_INIT([disable-static])
|
||||
-AC_PATH_PROGS(PYTHON, python2.7 python2.6 python2 python, [Python is required])
|
||||
-AM_PATH_PYTHON([2.6], [], AC_MSG_ERROR([Python 2.6 or 2.7 is required]))
|
||||
+PKG_PROG_PKG_CONFIG
|
||||
+PKG_CHECK_MODULES(PYTHON, [python], [
|
||||
+ AM_PATH_PYTHON
|
||||
+ ], AC_MSG_ERROR([Python is required])
|
||||
+)
|
||||
|
||||
AC_PATH_PROG([GPG], [gpg2])
|
||||
AC_ARG_VAR([GPG])
|
||||
--
|
||||
2.17.0
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 8f8698aba19b501f01285e9eec5c18231fc6bcea Mon Sep 17 00:00:00 2001
|
||||
From: Vratislav Podzimek <vpodzime@redhat.com>
|
||||
Date: Tue, 6 Jan 2015 13:06:52 +0100
|
||||
Subject: Do not include config.h in libvolume_key.h
|
||||
|
||||
The library's header file distributed in the devel package cannot include
|
||||
the config.h file that is only available during build otherwise it's not
|
||||
possible to use the library outside of the volume_key build process.
|
||||
|
||||
Signed-off-by: Vratislav Podzimek <vpodzime@redhat.com>
|
||||
|
||||
diff --git a/lib/libvolume_key.h b/lib/libvolume_key.h
|
||||
index 657b626..513f923 100644
|
||||
--- a/lib/libvolume_key.h
|
||||
+++ b/lib/libvolume_key.h
|
||||
@@ -18,8 +18,6 @@ Author: Miloslav Trmač <mitr@redhat.com> */
|
||||
#ifndef LIBVOLUME_KEY_H__
|
||||
#define LIBVOLUME_KEY_H__
|
||||
|
||||
-#include <config.h>
|
||||
-
|
||||
#include <cert.h>
|
||||
#include <glib.h>
|
||||
|
||||
--
|
||||
cgit v0.10.2
|
||||
|
@ -1,331 +0,0 @@
|
||||
From ecef526a51c5a276681472fd6df239570c9ce518 Mon Sep 17 00:00:00 2001
|
||||
From: Miloslav Trmač <mitr@redhat.com>
|
||||
Date: Nov 07 2017 15:55:55 +0000
|
||||
Subject: Stop using crypt_get_error
|
||||
|
||||
|
||||
Instead of crypt_get_error, which has been removed in cryptsetup 2.0,
|
||||
set up a log callback, which is available in both older and newer
|
||||
versions.
|
||||
|
||||
Fixes #13.
|
||||
|
||||
---
|
||||
|
||||
diff --git a/lib/volume_luks.c b/lib/volume_luks.c
|
||||
index 14794d7..f4bf2c8 100644
|
||||
--- a/lib/volume_luks.c
|
||||
+++ b/lib/volume_luks.c
|
||||
@@ -61,17 +61,13 @@ my_strerror (int err_no)
|
||||
}
|
||||
|
||||
/* Set ERROR based on libcryptsetup error state after returning RES.
|
||||
- Use CODE. */
|
||||
+ Use CODE and LAST_LOG_ENTRY. */
|
||||
static void
|
||||
-error_from_cryptsetup (GError **error, LIBVKError code, int res)
|
||||
+error_from_cryptsetup (GError **error, LIBVKError code, int res,
|
||||
+ char *last_log_entry)
|
||||
{
|
||||
- /* It's not possible to get the error message length from libcryptsetup, just
|
||||
- guess. */
|
||||
- char crypt_msg[4096];
|
||||
-
|
||||
- crypt_get_error (crypt_msg, sizeof (crypt_msg));
|
||||
- if (crypt_msg[0] != '\0')
|
||||
- g_set_error (error, LIBVK_ERROR, code, "%s", crypt_msg);
|
||||
+ if (last_log_entry != NULL && last_log_entry[0] != '\0')
|
||||
+ g_set_error (error, LIBVK_ERROR, code, "%s", last_log_entry);
|
||||
else
|
||||
{
|
||||
char *s;
|
||||
@@ -82,17 +78,33 @@ error_from_cryptsetup (GError **error, LIBVKError code, int res)
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+record_cryptsetup_log_entry (int level, const char *msg, void *usrptr)
|
||||
+{
|
||||
+ char **last_log_entry = usrptr;
|
||||
+
|
||||
+ if (level == CRYPT_LOG_ERROR)
|
||||
+ {
|
||||
+ g_free (*last_log_entry);
|
||||
+ *last_log_entry = g_strdup (msg);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* Open volume PATH and load its header.
|
||||
+ Set up *LAST_LOG_ENTRY to be updated to the last logged message for the
|
||||
+ device. The caller must g_free(*LAST_LOG_ENTRY) after closing the device.
|
||||
Return the volume, or NULL on error. */
|
||||
static struct crypt_device *
|
||||
-open_crypt_device (const char *path, GError **error)
|
||||
+open_crypt_device (const char *path, char **last_log_entry, GError **error)
|
||||
{
|
||||
struct crypt_device *cd;
|
||||
int r;
|
||||
|
||||
+ *last_log_entry = NULL;
|
||||
r = crypt_init (&cd, path);
|
||||
if (r < 0)
|
||||
goto err;
|
||||
+ crypt_set_log_callback(cd, record_cryptsetup_log_entry, last_log_entry);
|
||||
r = crypt_load (cd, CRYPT_LUKS1, NULL);
|
||||
if (r < 0)
|
||||
goto err_cd;
|
||||
@@ -101,9 +113,12 @@ open_crypt_device (const char *path, GError **error)
|
||||
err_cd:
|
||||
crypt_free (cd);
|
||||
err:
|
||||
- error_from_cryptsetup (error, LIBVK_ERROR_VOLUME_UNKNOWN_FORMAT, r);
|
||||
+ error_from_cryptsetup (error, LIBVK_ERROR_VOLUME_UNKNOWN_FORMAT, r,
|
||||
+ *last_log_entry);
|
||||
g_prefix_error (error, _("Error getting information about volume `%s': "),
|
||||
path);
|
||||
+ g_free (*last_log_entry);
|
||||
+ *last_log_entry = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -173,10 +188,11 @@ luks_volume_open (struct libvk_volume *vol, const char *path, GError **error)
|
||||
{
|
||||
struct luks_volume *luks;
|
||||
struct crypt_device *cd;
|
||||
+ char *last_log_entry;
|
||||
const char *uuid;
|
||||
|
||||
(void)vol;
|
||||
- cd = open_crypt_device (path, error);
|
||||
+ cd = open_crypt_device (path, &last_log_entry, error);
|
||||
if (cd == NULL)
|
||||
return NULL;
|
||||
/* A bit of paranoia */
|
||||
@@ -187,6 +203,7 @@ luks_volume_open (struct libvk_volume *vol, const char *path, GError **error)
|
||||
_("UUID mismatch between libblkid and libcryptsetup: `%s' "
|
||||
"vs. `%s'"), vol->uuid, uuid);
|
||||
crypt_free (cd);
|
||||
+ g_free (last_log_entry);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -195,6 +212,7 @@ luks_volume_open (struct libvk_volume *vol, const char *path, GError **error)
|
||||
luks->cipher_mode = g_strdup (crypt_get_cipher_mode (cd));
|
||||
luks->key_bytes = crypt_get_volume_key_size (cd);
|
||||
crypt_free (cd);
|
||||
+ g_free (last_log_entry);
|
||||
|
||||
luks->key = NULL;
|
||||
luks->passphrase = NULL;
|
||||
@@ -256,7 +274,7 @@ luks_get_secret (struct libvk_volume *vol, enum libvk_secret secret_type,
|
||||
const struct libvk_ui *ui, GError **error)
|
||||
{
|
||||
struct crypt_device *cd;
|
||||
- char *passphrase;
|
||||
+ char *last_log_entry, *passphrase;
|
||||
void *key;
|
||||
size_t key_length;
|
||||
int slot;
|
||||
@@ -276,7 +294,7 @@ luks_get_secret (struct libvk_volume *vol, enum libvk_secret secret_type,
|
||||
_("Encryption information type unsupported in LUKS"));
|
||||
goto err;
|
||||
}
|
||||
- cd = open_crypt_device (vol->path, error);
|
||||
+ cd = open_crypt_device (vol->path, &last_log_entry, error);
|
||||
if (cd == NULL)
|
||||
goto err;
|
||||
key_length = crypt_get_volume_key_size (cd);
|
||||
@@ -303,7 +321,7 @@ luks_get_secret (struct libvk_volume *vol, enum libvk_secret secret_type,
|
||||
g_free_passphrase (passphrase);
|
||||
if (r != -EPERM)
|
||||
{
|
||||
- error_from_cryptsetup (error, LIBVK_ERROR_FAILED, r);
|
||||
+ error_from_cryptsetup (error, LIBVK_ERROR_FAILED, r, last_log_entry);
|
||||
g_prefix_error (error, _("Error getting LUKS data encryption key: "));
|
||||
goto err_prompt;
|
||||
}
|
||||
@@ -322,12 +340,14 @@ luks_get_secret (struct libvk_volume *vol, enum libvk_secret secret_type,
|
||||
vol->v.luks->passphrase_slot = slot;
|
||||
g_free (prompt);
|
||||
crypt_free (cd);
|
||||
+ g_free (last_log_entry);
|
||||
return 0;
|
||||
|
||||
err_prompt:
|
||||
g_free (prompt);
|
||||
g_free_key (key, key_length);
|
||||
crypt_free (cd);
|
||||
+ g_free (last_log_entry);
|
||||
err:
|
||||
return -1;
|
||||
}
|
||||
@@ -383,11 +403,12 @@ luks_load_packet (struct libvk_volume *vol, const struct libvk_volume *packet,
|
||||
if (packet->v.luks->key != NULL)
|
||||
{
|
||||
struct crypt_device *cd;
|
||||
+ char *last_log_entry;
|
||||
int r;
|
||||
|
||||
g_return_val_if_fail (vol->v.luks->key_bytes == packet->v.luks->key_bytes,
|
||||
-1);
|
||||
- cd = open_crypt_device (vol->path, error);
|
||||
+ cd = open_crypt_device (vol->path, &last_log_entry, error);
|
||||
if (cd == NULL)
|
||||
return -1;
|
||||
r = crypt_volume_key_verify (cd, packet->v.luks->key,
|
||||
@@ -395,21 +416,25 @@ luks_load_packet (struct libvk_volume *vol, const struct libvk_volume *packet,
|
||||
crypt_free (cd);
|
||||
if (r < 0)
|
||||
{
|
||||
- error_from_cryptsetup (error, LIBVK_ERROR_PACKET_VOLUME_MISMATCH, r);
|
||||
+ error_from_cryptsetup (error, LIBVK_ERROR_PACKET_VOLUME_MISMATCH, r,
|
||||
+ last_log_entry);
|
||||
g_prefix_error (error, _("LUKS data encryption key in packet is "
|
||||
"invalid: "));
|
||||
+ g_free (last_log_entry);
|
||||
return -1;
|
||||
}
|
||||
+ g_free (last_log_entry);
|
||||
luks_replace_key (vol, packet->v.luks->key);
|
||||
}
|
||||
if (packet->v.luks->passphrase != NULL)
|
||||
{
|
||||
struct crypt_device *cd;
|
||||
+ char *last_log_entry;
|
||||
void *key;
|
||||
size_t key_size;
|
||||
int r;
|
||||
|
||||
- cd = open_crypt_device (vol->path, error);
|
||||
+ cd = open_crypt_device (vol->path, &last_log_entry, error);
|
||||
if (cd == NULL)
|
||||
return -1;
|
||||
key_size = crypt_get_volume_key_size (cd);
|
||||
@@ -420,10 +445,13 @@ luks_load_packet (struct libvk_volume *vol, const struct libvk_volume *packet,
|
||||
crypt_free (cd);
|
||||
if (r < 0)
|
||||
{
|
||||
- error_from_cryptsetup (error, LIBVK_ERROR_PACKET_VOLUME_MISMATCH, r);
|
||||
+ error_from_cryptsetup (error, LIBVK_ERROR_PACKET_VOLUME_MISMATCH, r,
|
||||
+ last_log_entry);
|
||||
g_prefix_error (error, _("LUKS passphrase in packet is invalid: "));
|
||||
+ g_free (last_log_entry);
|
||||
return -1;
|
||||
}
|
||||
+ g_free (last_log_entry);
|
||||
luks_replace_passphrase (vol, packet->v.luks->passphrase);
|
||||
vol->v.luks->passphrase_slot = r;
|
||||
if (packet->v.luks->key == NULL)
|
||||
@@ -446,7 +474,7 @@ luks_apply_secret (struct libvk_volume *vol, const struct libvk_volume *packet,
|
||||
GError **error)
|
||||
{
|
||||
struct crypt_device *cd;
|
||||
- char *prompt, *prompt2, *error_prompt, *passphrase;
|
||||
+ char *last_log_entry, *prompt, *prompt2, *error_prompt, *passphrase;
|
||||
unsigned failed;
|
||||
int res;
|
||||
|
||||
@@ -498,7 +526,7 @@ luks_apply_secret (struct libvk_volume *vol, const struct libvk_volume *packet,
|
||||
goto err_prompts;
|
||||
|
||||
got_passphrase:
|
||||
- cd = open_crypt_device (vol->path, error);
|
||||
+ cd = open_crypt_device (vol->path, &last_log_entry, error);
|
||||
if (cd == NULL)
|
||||
goto err_passphrase;
|
||||
res = crypt_keyslot_add_by_volume_key (cd, CRYPT_ANY_SLOT,
|
||||
@@ -508,10 +536,12 @@ luks_apply_secret (struct libvk_volume *vol, const struct libvk_volume *packet,
|
||||
crypt_free (cd);
|
||||
if (res < 0)
|
||||
{
|
||||
- error_from_cryptsetup (error, LIBVK_ERROR_FAILED, res);
|
||||
+ error_from_cryptsetup (error, LIBVK_ERROR_FAILED, res, last_log_entry);
|
||||
g_prefix_error (error, _("Error adding a LUKS passphrase"));
|
||||
+ g_free (last_log_entry);
|
||||
goto err_passphrase;
|
||||
}
|
||||
+ g_free (last_log_entry);
|
||||
|
||||
g_return_val_if_fail (vol->v.luks->key_bytes == packet->v.luks->key_bytes,
|
||||
-1);
|
||||
@@ -542,6 +572,7 @@ luks_add_secret (struct libvk_volume *vol, enum libvk_secret secret_type,
|
||||
const void *secret, size_t size, GError **error)
|
||||
{
|
||||
struct crypt_device *cd;
|
||||
+ char *last_log_entry;
|
||||
int res;
|
||||
|
||||
if (secret_type != LIBVK_SECRET_PASSPHRASE)
|
||||
@@ -562,7 +593,7 @@ luks_add_secret (struct libvk_volume *vol, enum libvk_secret secret_type,
|
||||
_("The passphrase must be a string"));
|
||||
return -1;
|
||||
}
|
||||
- cd = open_crypt_device (vol->path, error);
|
||||
+ cd = open_crypt_device (vol->path, &last_log_entry, error);
|
||||
if (cd == NULL)
|
||||
return -1;
|
||||
res = crypt_keyslot_add_by_volume_key (cd, CRYPT_ANY_SLOT, vol->v.luks->key,
|
||||
@@ -570,10 +601,12 @@ luks_add_secret (struct libvk_volume *vol, enum libvk_secret secret_type,
|
||||
crypt_free (cd);
|
||||
if (res < 0)
|
||||
{
|
||||
- error_from_cryptsetup (error, LIBVK_ERROR_FAILED, res);
|
||||
+ error_from_cryptsetup (error, LIBVK_ERROR_FAILED, res, last_log_entry);
|
||||
g_prefix_error (error, _("Error adding a LUKS passphrase"));
|
||||
+ g_free (last_log_entry);
|
||||
return -1;
|
||||
}
|
||||
+ g_free (last_log_entry);
|
||||
|
||||
luks_replace_passphrase (vol, secret);
|
||||
vol->v.luks->passphrase_slot = res;
|
||||
@@ -823,12 +856,13 @@ luks_open_with_packet (struct libvk_volume *vol,
|
||||
GError **error)
|
||||
{
|
||||
struct crypt_device *cd;
|
||||
+ char *last_log_entry;
|
||||
void *to_free;
|
||||
const void *key;
|
||||
int r;
|
||||
size_t key_size;
|
||||
|
||||
- cd = open_crypt_device (vol->path, error);
|
||||
+ cd = open_crypt_device (vol->path, &last_log_entry, error);
|
||||
if (cd == NULL)
|
||||
goto err;
|
||||
if (packet->v.luks->key != NULL)
|
||||
@@ -846,7 +880,7 @@ luks_open_with_packet (struct libvk_volume *vol,
|
||||
strlen (packet->v.luks->passphrase));
|
||||
if (r < 0)
|
||||
{
|
||||
- error_from_cryptsetup (error, LIBVK_ERROR_FAILED, r);
|
||||
+ error_from_cryptsetup (error, LIBVK_ERROR_FAILED, r, last_log_entry);
|
||||
g_prefix_error (error, _("Error getting LUKS data encryption key: "));
|
||||
goto err_to_free;
|
||||
}
|
||||
@@ -862,7 +896,7 @@ luks_open_with_packet (struct libvk_volume *vol,
|
||||
r = crypt_activate_by_volume_key (cd, name, key, key_size, 0);
|
||||
if (r < 0)
|
||||
{
|
||||
- error_from_cryptsetup (error, LIBVK_ERROR_FAILED, r);
|
||||
+ error_from_cryptsetup (error, LIBVK_ERROR_FAILED, r, last_log_entry);
|
||||
g_prefix_error (error, _("Error opening LUKS volume: "));
|
||||
goto err_to_free;
|
||||
}
|
||||
@@ -870,6 +904,7 @@ luks_open_with_packet (struct libvk_volume *vol,
|
||||
if (to_free != NULL)
|
||||
g_free_key (to_free, key_size);
|
||||
crypt_free (cd);
|
||||
+ g_free (last_log_entry);
|
||||
return 0;
|
||||
|
||||
err_to_free:
|
||||
@@ -877,6 +912,7 @@ luks_open_with_packet (struct libvk_volume *vol,
|
||||
g_free_key (to_free, key_size);
|
||||
err_cd:
|
||||
crypt_free (cd);
|
||||
+ g_free (last_log_entry);
|
||||
err:
|
||||
return -1;
|
||||
}
|
||||
|
@ -1,56 +0,0 @@
|
||||
From 67fbdb6133b6d37548250514eeaf8a4e239e4768 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Wendler <polynomial-c@gentoo.org>
|
||||
Date: Mon, 22 May 2017 14:29:44 +0200
|
||||
Subject: [PATCH] Use pkgconfig to find python
|
||||
|
||||
otherwise linkage and include of python fails if python is not in
|
||||
default (python$(PYTHON_VERSION)) location.
|
||||
---
|
||||
Makefile.am | 4 ++--
|
||||
configure.ac | 8 +++++++-
|
||||
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 4569bbf..445a64c 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -20,7 +20,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \
|
||||
$(libcryptsetup_CFLAGS) $(nss_CFLAGS)
|
||||
LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"'
|
||||
-PYTHON_CPPFLAGS = -I/usr/include/python$(PYTHON_VERSION)
|
||||
+PYTHON_CPPFLAGS = $(PYTHON_CFLAGS)
|
||||
|
||||
## Targets
|
||||
SUBDIRS = po
|
||||
@@ -65,7 +65,7 @@ lib_libvolume_key_la_LIBADD = $(blkid_LIBS) $(glib_LIBS) $(GPGME_LIBS) \
|
||||
python__volume_key_la_SOURCES = python/volume_key_wrap.c
|
||||
python__volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS)
|
||||
python__volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS)
|
||||
-python__volume_key_la_LIBADD = lib/libvolume_key.la -lpython$(PYTHON_VERSION) \
|
||||
+python__volume_key_la_LIBADD = lib/libvolume_key.la $(PYTHON_LIBS) \
|
||||
$(glib_LIBS) $(nss_LIBS)
|
||||
|
||||
src_volume_key_SOURCES = src/volume_key.c
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5dbb326..71e407e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -28,7 +28,13 @@ AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AM_PROG_AR
|
||||
LT_INIT([disable-static])
|
||||
-AM_PATH_PYTHON
|
||||
+
|
||||
+PKG_CHECK_MODULES([PYTHON], [python], [has_python=yes], [])
|
||||
+AS_IF([test "x$has_python" = "xyes"], [
|
||||
+ AM_PATH_PYTHON
|
||||
+ AC_SUBST([PYTHON_CFLAGS])
|
||||
+ AC_SUBST([PYTHON_LIBS])
|
||||
+])
|
||||
|
||||
dnl Not gpg2, it cannot receive passphrases from gpgme
|
||||
AC_PATH_PROG([GPG], [gpg])
|
||||
--
|
||||
2.13.0
|
||||
|
@ -1,48 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python3_{4,5,6} )
|
||||
|
||||
inherit autotools python-single-r1
|
||||
|
||||
DESCRIPTION="Library for manipulating and storing storage volume encryption keys"
|
||||
HOMEPAGE="https://pagure.io/volume_key"
|
||||
SRC_URI="http://releases.pagure.org/${PN}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="test"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
RDEPEND="
|
||||
app-crypt/gpgme
|
||||
dev-libs/glib:2
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
sys-apps/util-linux
|
||||
sys-fs/cryptsetup:=
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
sys-devel/gettext
|
||||
test? ( dev-libs/nss[utils] )
|
||||
"
|
||||
|
||||
RESTRICT="test" # possible gpgme issue
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.3.10-find_python.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python3_{4,5,6} )
|
||||
|
||||
inherit autotools python-single-r1
|
||||
|
||||
DESCRIPTION="Library for manipulating and storing storage volume encryption keys"
|
||||
HOMEPAGE="https://pagure.io/volume_key"
|
||||
SRC_URI="http://releases.pagure.org/${PN}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 ia64 ~mips ppc ppc64 ~sparc x86"
|
||||
IUSE="test"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
RDEPEND="
|
||||
app-crypt/gpgme
|
||||
dev-libs/glib:2
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
sys-apps/util-linux
|
||||
sys-fs/cryptsetup:=
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
sys-devel/gettext
|
||||
test? ( dev-libs/nss[utils] )
|
||||
"
|
||||
|
||||
RESTRICT="test" # possible gpgme issue
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-config.h.diff
|
||||
"${FILESDIR}"/${PN}-0.3.9-find_python.patch
|
||||
|
||||
# Patches from upstream (can usually be removed with next version bump)
|
||||
"${FILESDIR}/${P}-cryptsetup2.patch"
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST chump-1.5.1.tar.gz 9370 BLAKE2B 28c7280aa0fa3fb81a4981ea3892533eb0af6f1655c41bdf8f250ea78806eac7b3d5f21143af83f22b8063913185e77774eb7be2b8ff2bbe5371c690f726acb5 SHA512 778e043e4641b433a03860f1b1b144cdd34d0f79fb20ec0801cea1e1473eade8dd5211ffca391a57eb1f01456ec33cef4db6359839e7e39eab169411d00471e3
|
||||
DIST chump-1.5.2.tar.gz 12920 BLAKE2B 5fde4774009ebda37e7a9f9c9cfedea3d4e19a9be1aeb165dd867a8ec8cc69385855c22763bc822d3a65d76c70cfe7ef41e4761319dbfaca9587301570765a8d SHA512 6b836bac1ab38c88084f9d6608a9ed88b305847faabcf5de6c13d587e91dc92b21334877cb9290dd56873de40be92f31f2bab3a345c7a7e62259004f5762cda4
|
||||
DIST chump-1.6.0.tar.gz 15646 BLAKE2B 8cab76e633fd4084d349115fae925c152439d06acbe629d5c23c474f2dc0a3cb1b5b727b856a9d54a82e39698b3cfd7470086a976cfc6b4870f1af02bac71f87 SHA512 d219f1b9e28dd17f834dc807cd42a288adc4f5579bf97cf6b1833e63f339bd811953c3a74cafad9021beb05cd5fddb46cf49b62a4803c62ece62d037fe38a4ee
|
||||
|
@ -1,18 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="API wrapper for Pushover"
|
||||
HOMEPAGE="https://github.com/karanlyons/chump"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
@ -0,0 +1,37 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
# PyPy is not properly supported:
|
||||
# https://github.com/karanlyons/chump/issues/17
|
||||
PYTHON_COMPAT=( pypy3 python{2_7,3_{4,5,6,7}} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="API wrapper for Pushover"
|
||||
HOMEPAGE="https://github.com/karanlyons/chump"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
|
||||
"
|
||||
|
||||
python_prepare_all() {
|
||||
sed -i "/'sphinx.ext.intersphinx'/d" docs/conf.py || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
# Force sphinx to use the standard theme
|
||||
READTHEDOCS=True sphinx-build docs docs/_build/html || die
|
||||
HTML_DOCS=( docs/_build/html/. )
|
||||
fi
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST prompt_toolkit-1.0.15.tar.gz 243734 BLAKE2B b27e61bb444360abe95714e2014fcacf2355da0540b21af35cc40cb0f0115d0a3b027236235a89a95c1ec1fa947bf5b88b236b737fab5de78e7bd5fc798aa764 SHA512 10981be2ed8b71d0cd9f663c4de047cec9664d9276968c6eec40dc45b388d1acf8eba07d534369254f178931079bf39b04eb2ceac06aa63a2021ebf62387b2f5
|
||||
DIST prompt_toolkit-2.0.6.tar.gz 339714 BLAKE2B f969edef98d25930e4d61c1500bb9c8d731dea29e8d154e6baa2ab4045ceaf9d577d46024734a255cc15a4c13685582309e9d2fe7ae3320257f6fd1f9981ada6 SHA512 37082011ee5b8d6fd9febef95c92494ed6108b9ad8c64ac580b69c3464781a2f0dcef5b1c4d06fe309a3036932f7c622042e6b2293acf2ab6f9f2aa3c48d9322
|
||||
DIST prompt_toolkit-2.0.7.tar.gz 343267 BLAKE2B eed36fb951bcf8b0663a87eb4e77267246bbc7a6b773ed76d730c04b4dd012434fd0e71e5f558c231fd5ba1e8b3403878106bf3c60f44b7aa3e492a99a622b65 SHA512 4ea8102a50290878248ccc2119eb2b5ae50ad58f466510f8328bc172942f5417abde24393958c910ae0ab2ea4a8caff049b6e7acd8d94e9dbeb97b36c6e2191e
|
||||
|
@ -0,0 +1,30 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Building powerful interactive command lines in Python"
|
||||
HOMEPAGE="https://pypi.org/project/prompt_toolkit/ https://github.com/jonathanslenders/python-prompt-toolkit"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="BSD"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/six-1.9.0[${PYTHON_USEDEP}]
|
||||
dev-python/wcwidth[${PYTHON_USEDEP}]"
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
|
||||
|
||||
python_test() {
|
||||
py.test || die
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST pysaml2-4.0.2.tar.gz 13657558 BLAKE2B 35cb9dff897caf9f7fc39a70466dabce88098b6bbe0337a2ae47c733e4fd5de3bd80ddf73f27b6ff67e6f571b1f647d9856bbed58c8b19fe6547a35254dc2019 SHA512 debe23c2b193ca9f937bdb4fc9e8f308fa012c18e50e40183f7e531434af52b6e4d36608be3e9b0321190930cdfd9eb24555ed1805083e32db8de0f57e5afb14
|
||||
DIST pysaml2-4.5.0.tar.gz 20030696 BLAKE2B 547465c2c4191a26de6bf1bab55bd9c36ed7e477c620a4155b7a463c98dbf314a8067d45263055a05ec8ed696177fcbd1443dd856113871f2941b572b9df0628 SHA512 163dfc2acfa0f242bc97d3ec334aec98e993ef9265b2240223205e496f86df5518ca613620b371eabcca0c4070a0bf7bb72a2216f517e19e3b2ff0f20e30a0c7
|
||||
DIST pysaml2-4.6.3.tar.gz 316979 BLAKE2B cf393075903269ce93dd219bd23479949ce8e39383d8150f8ee30185733569fe79c7421b87b3439b95e707f17d5f513abfa2610be76441b8f18d8f75a5a9fdd3 SHA512 259f7395afad44caac32453a03bbdaf8c464adeeb856b78786b665281dbe75b37e8054efaf945a7d10333c0b09d9f516d606e95b157aed34c1cd0821b7255b9d
|
||||
|
@ -0,0 +1,29 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Python implementation of SAML Version 2 to be used in a WSGI environment"
|
||||
HOMEPAGE="https://github.com/rohe/pysaml2"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
PATCHES=(
|
||||
)
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
RDEPEND=">=dev-python/cryptography-1.4[${PYTHON_USEDEP}]
|
||||
dev-python/defusedxml[${PYTHON_USEDEP}]
|
||||
dev-python/future[${PYTHON_USEDEP}]
|
||||
dev-python/pyopenssl[${PYTHON_USEDEP}]
|
||||
dev-python/python-dateutil[${PYTHON_USEDEP}]
|
||||
dev-python/pytz[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-1.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]"
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST ecma-re-validator-0.1.2.gem 824832 BLAKE2B 0ccc81114611b85bf799644dd6f28f75397c3f4223a4eed03206e75b0478a9c4d6ea8807e5b8bc9f06771d51543210fa93fc355d791f7d91bce0f255860bd353 SHA512 4f00dcc940dc13f91b823ce9538239c3d545e79027f8ebc45b258fc807d1dcedeaa128070f666c6c57d50715d76908f45ca7bd639ee5a7bfdd6617f713f2c0fb
|
||||
DIST ecma-re-validator-0.2.0.gem 865792 BLAKE2B c41b01dc36f3000331085666f235b0adc749516b19028ee78ef56c68c00b7ab9105d4bfcfa9b061cd1f63987054a33a7e31cc3957be17182245120d679f5b6f3 SHA512 5e2ff7c2e8b8d5a8749d87f1678b235e69f197b9af95787f59cfff492ff3d8b8e2bc45a0e3da83d92ffa646e9b1b12ef5c4cab324d6e29a0c1f53e211d00aba9
|
||||
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_DOC="rdoc"
|
||||
RUBY_FAKEGEM_EXTRADOC="README.md"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Validate a regular expression string against what ECMA-262 can actually do"
|
||||
HOMEPAGE="https://github.com/gjtorikian/ecma-re-validator"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_rdepend ">=dev-ruby/regexp_parser-1.2:1"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e '/bundler/ s:^:#:' spec/spec_helper.rb || die
|
||||
}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST buildsystem-1.7.tar.gz 38597 BLAKE2B d0981ef282ac0d93d81a1a6a6bee1fc2a0151c962be6ce2900a67843ba8ebc67e00508cded2a7375f6bbe0d45572690f127872936a282de80eb08655ac571603 SHA512 f6a46ac25f41e695ec13d7b2b564250c4cc44a40a688904eb17aa4b547c2df0102cc0effb7a23a2ffa6b9178ae5cf452b63980caf26e06e479168c85803f1e58
|
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
netsurf_define_makeconf() {
|
||||
NETSURF_MAKECONF=(
|
||||
NSSHARED=/usr/share/netsurf-buildsystem
|
||||
LIBDIR="$(get_libdir)"
|
||||
PREFIX="${EROOT}/usr"
|
||||
Q=
|
||||
CC="$(tc-getCC)"
|
||||
LD="$(tc-getLD)"
|
||||
HOST_CC="\$(CC)"
|
||||
CCOPT=
|
||||
CCNOOPT=
|
||||
CCDBG=
|
||||
LDDBG=
|
||||
AR="$(tc-getAR)"
|
||||
)
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue