parent
7ff44512cd
commit
bc647da0ea
@ -1,2 +1,2 @@
|
|||||||
DIST calamares-3.1.5.tar.gz 2266110 SHA256 02bd3c10e06ac207cdee0ee29f8d20bfe48eba491800e3eab704e1d294736260 SHA512 92e29668ddab880b76319fbf4eeffea21bfa0bd5b8807cb5a2c2786eafe4921f442a9a5773243fafe5942a346d46b89285e9472d4c8da70b70979a049923df06 WHIRLPOOL 74b396551aee5c7831b05a0c40df56f047bf6bd1fb0c9e3e51b2791696b9e19eb1db78128c1167a668d0d4e412cddbb819c807dfb52cc8bea667307921752a80
|
|
||||||
DIST calamares-3.1.6.tar.gz 2266993 SHA256 d18d50aca6dc8b8d4d4933b507fdaabeb607adc9c9c14646f1031c005aeaaf98 SHA512 d6e7fa5a040e507141bbd6b3863f5743b9646e503cfec26ed710718835a782b0acf582f24959eb52d906eeca60061d39e01b4a542c3d83535efa17eb4a5b0b85 WHIRLPOOL 3fc71da001282cbe7c670b192335ddac460f3fb053849a51d95d9113b6c31a27ff65ce64811ca26c456ec01911ce8685d73c793183e71bc696cd896f9bf38507
|
DIST calamares-3.1.6.tar.gz 2266993 SHA256 d18d50aca6dc8b8d4d4933b507fdaabeb607adc9c9c14646f1031c005aeaaf98 SHA512 d6e7fa5a040e507141bbd6b3863f5743b9646e503cfec26ed710718835a782b0acf582f24959eb52d906eeca60061d39e01b4a542c3d83535efa17eb4a5b0b85 WHIRLPOOL 3fc71da001282cbe7c670b192335ddac460f3fb053849a51d95d9113b6c31a27ff65ce64811ca26c456ec01911ce8685d73c793183e71bc696cd896f9bf38507
|
||||||
|
DIST calamares-3.1.7.tar.gz 2275893 SHA256 91ffee72df1d222c50db81c3f48d44e617019db95d1f58ab16a962b1fb47d749 SHA512 eaf516db4d97b89a5854c5dac5fd556a2deb47bebb88e7c55e2bb7d4ce050e913afbf08c6536503f5c3af7427a43b75f67bfa317e1601bb5a6f05f17c5bf6760 WHIRLPOOL 71e248e3dd8a9e05b5a0d25807607c3d026ba896835edd559ce716c9edf5ae8b840570ae453772558cd05757d99acc09c90f23423045f1754cd56b8693b99a4d
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
DIST consul-0.8.4.tar.gz 6614287 SHA256 d5573d6e70d490c8b8109722c2019b5a2b35eff703b92d6276997846361cff1b SHA512 4bbb167a603f1d20940330bd9615ba0f50e0113e1d96ce47773f5d2813635f76dd1aec8f43dae4c8c547cec8a891eb0726eeeda7bd7c5b1d495029b359378e68 WHIRLPOOL e270367c69fe74f25c89ef9e8c7f71307d3b8e48b4210e43e48907f1f5a73f11f45aa2b212f70c24463e35d800b861ccd34e2c82de863fc6e7da9cd3eda5214c
|
|
||||||
DIST consul-0.9.3.tar.gz 7278357 SHA256 69b76432203e046a8025ce13f7cc041b2308d72f07f240a57f2ba5d580fcff70 SHA512 a1c9cdd3e197afbf088bd1866af15c1864cb8d042dc65d2fcc0d9070b8bf2f9380cf2ceadaff6d5bba7ecd379d53f4b8191e1ae6832f1b2c82f21c62f07d8b0f WHIRLPOOL 9e5ac311761bc786c986d4b0cdb4ba541a46f57cffd8cac4de96292293518cd8e8f3743bcb0740b245ae5a30f9f157987078874503bd6b0685a9f3c88c92ffba
|
DIST consul-0.9.3.tar.gz 7278357 SHA256 69b76432203e046a8025ce13f7cc041b2308d72f07f240a57f2ba5d580fcff70 SHA512 a1c9cdd3e197afbf088bd1866af15c1864cb8d042dc65d2fcc0d9070b8bf2f9380cf2ceadaff6d5bba7ecd379d53f4b8191e1ae6832f1b2c82f21c62f07d8b0f WHIRLPOOL 9e5ac311761bc786c986d4b0cdb4ba541a46f57cffd8cac4de96292293518cd8e8f3743bcb0740b245ae5a30f9f157987078874503bd6b0685a9f3c88c92ffba
|
||||||
DIST consul-1.0.0.tar.gz 7354292 SHA256 60e86cf77c3287edc98f8381c046bc876f969dd97dea7adc68019bff2207af7a SHA512 8223f79aa1b7bfc5693168b56fbe9a506ca504771c92328afeb99e78dce8699c7532582749a372dfed10dd4b7c440ace0dd248f1ae27247059da3e2f88293a88 WHIRLPOOL b40a450efc9587475ccf0f0080c0fb03769557487b3f9a29df9454551149a8235e240aacd82849736f9160d10aee1e04a76035b9bab716b244f7cb13791ff43c
|
DIST consul-1.0.0.tar.gz 7354292 SHA256 60e86cf77c3287edc98f8381c046bc876f969dd97dea7adc68019bff2207af7a SHA512 8223f79aa1b7bfc5693168b56fbe9a506ca504771c92328afeb99e78dce8699c7532582749a372dfed10dd4b7c440ace0dd248f1ae27247059da3e2f88293a88 WHIRLPOOL b40a450efc9587475ccf0f0080c0fb03769557487b3f9a29df9454551149a8235e240aacd82849736f9160d10aee1e04a76035b9bab716b244f7cb13791ff43c
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit golang-vcs-snapshot systemd user
|
|
||||||
|
|
||||||
KEYWORDS="~amd64"
|
|
||||||
EGO_PN="github.com/hashicorp/consul"
|
|
||||||
DESCRIPTION="A tool for service discovery, monitoring and configuration"
|
|
||||||
HOMEPAGE="http://www.consul.io"
|
|
||||||
SRC_URI="https://github.com/hashicorp/consul/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
|
|
||||||
SLOT="0"
|
|
||||||
LICENSE="MPL-2.0"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
RESTRICT="test"
|
|
||||||
|
|
||||||
DEPEND="dev-go/gox
|
|
||||||
>=dev-lang/go-1.7.5:=
|
|
||||||
>=dev-go/go-tools-0_pre20160121"
|
|
||||||
RDEPEND=""
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
enewgroup consul
|
|
||||||
enewuser consul -1 -1 /var/lib/${PN} consul
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
eapply_user
|
|
||||||
|
|
||||||
sed -e 's:^\(GIT_DESCRIBE=\).*:\1v'${PV}':' \
|
|
||||||
-e 's:^\(GIT_COMMIT=\).*:\1:' \
|
|
||||||
-e 's:^\(GIT_DIRTY=\).*:\1:' \
|
|
||||||
-e 's:go get -u -v $(GOTOOLS)::' \
|
|
||||||
-i "${S}/src/${EGO_PN}/GNUmakefile" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# The dev target sets causes build.sh to set appropriate XC_OS
|
|
||||||
# and XC_ARCH, and skips generation of an unused zip file,
|
|
||||||
# avoiding a dependency on app-arch/zip.
|
|
||||||
GOPATH="${S}" \
|
|
||||||
emake -C "${S}/src/${EGO_PN}" dev
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local x
|
|
||||||
|
|
||||||
dobin "${S}/bin/${PN}"
|
|
||||||
|
|
||||||
keepdir /etc/consul.d
|
|
||||||
insinto /etc/consul.d
|
|
||||||
doins "${FILESDIR}/"*.json.example
|
|
||||||
|
|
||||||
for x in /var/{lib,log}/${PN}; do
|
|
||||||
keepdir "${x}"
|
|
||||||
fowners consul:consul "${x}"
|
|
||||||
done
|
|
||||||
|
|
||||||
newinitd "${FILESDIR}/consul.initd" "${PN}"
|
|
||||||
newconfd "${FILESDIR}/consul.confd" "${PN}"
|
|
||||||
insinto /etc/logrotate.d
|
|
||||||
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
|
|
||||||
systemd_dounit "${FILESDIR}/consul.service"
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
|
|
||||||
inherit toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="Files which haven't been accessed are removed from specified directories"
|
|
||||||
HOMEPAGE="https://fedorahosted.org/tmpwatch/"
|
|
||||||
SRC_URI="https://fedorahosted.org/releases/t/m/${PN}/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
|
|
||||||
IUSE="selinux"
|
|
||||||
|
|
||||||
RDEPEND="selinux? ( sec-policy/selinux-tmpreaper )"
|
|
||||||
DEPEND=""
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake AR="$(tc-getAR)"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
dosbin tmpwatch || die
|
|
||||||
doman tmpwatch.8 || die
|
|
||||||
dodoc ChangeLog NEWS README AUTHORS || die
|
|
||||||
|
|
||||||
exeinto /etc/cron.daily
|
|
||||||
newexe "${FILESDIR}/${PN}.cron" "${PN}" || die
|
|
||||||
}
|
|
@ -1,196 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
inherit depend.apache eutils user systemd
|
|
||||||
|
|
||||||
MY_P="BackupPC-${PV}"
|
|
||||||
|
|
||||||
DESCRIPTION="High-performance backups to a server's disk"
|
|
||||||
HOMEPAGE="http://backuppc.sourceforge.net/"
|
|
||||||
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
KEYWORDS="amd64 x86"
|
|
||||||
|
|
||||||
IUSE="rss samba"
|
|
||||||
|
|
||||||
# The CGI modules are handled in $RDEPEND.
|
|
||||||
APACHE_MODULES="apache2_modules_alias," # RedirectMatch
|
|
||||||
APACHE_MODULES+="apache2_modules_authn_core," # AuthType
|
|
||||||
APACHE_MODULES+="apache2_modules_authz_core," # Require
|
|
||||||
APACHE_MODULES+="apache2_modules_authz_host," # Require host
|
|
||||||
APACHE_MODULES+="apache2_modules_authz_user" # Require valid-user
|
|
||||||
|
|
||||||
DEPEND="dev-lang/perl
|
|
||||||
app-admin/apache-tools
|
|
||||||
app-admin/makepasswd"
|
|
||||||
|
|
||||||
# Older versions of mod_perl think they're compatibile with apache-2.4,
|
|
||||||
# so we require the new one explicitly.
|
|
||||||
RDEPEND="${DEPEND}
|
|
||||||
virtual/perl-IO-Compress
|
|
||||||
dev-perl/Archive-Zip
|
|
||||||
dev-perl/CGI
|
|
||||||
dev-perl/libwww-perl
|
|
||||||
app-arch/tar
|
|
||||||
app-arch/par2cmdline
|
|
||||||
app-arch/gzip
|
|
||||||
app-arch/bzip2
|
|
||||||
virtual/mta
|
|
||||||
>=www-apache/mod_perl-2.0.9
|
|
||||||
www-apache/mpm_itk
|
|
||||||
|| ( >=www-servers/apache-2.4[${APACHE_MODULES},apache2_modules_cgi]
|
|
||||||
>=www-servers/apache-2.4[${APACHE_MODULES},apache2_modules_cgid]
|
|
||||||
>=www-servers/apache-2.4[${APACHE_MODULES},apache2_modules_fcgid] )
|
|
||||||
net-misc/rsync
|
|
||||||
dev-perl/File-RsyncP
|
|
||||||
rss? ( dev-perl/XML-RSS )
|
|
||||||
samba? ( net-fs/samba )"
|
|
||||||
|
|
||||||
need_apache2_4
|
|
||||||
|
|
||||||
SLOT="0"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}"
|
|
||||||
|
|
||||||
CGIDIR="/usr/lib/backuppc/htdocs"
|
|
||||||
CONFDIR="/etc/BackupPC"
|
|
||||||
DATADIR="/var/lib/backuppc"
|
|
||||||
DOCDIR="/usr/share/doc/${PF}"
|
|
||||||
LOGDIR="/var/log/BackupPC"
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
enewgroup backuppc
|
|
||||||
enewuser backuppc -1 /bin/bash /var/lib/backuppc backuppc
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
epatch "${FILESDIR}/3.3.0/01-fix-configure.pl.patch"
|
|
||||||
epatch "${FILESDIR}/3.3.0/02-fix-config.pl-formatting.patch"
|
|
||||||
epatch "${FILESDIR}/3.3.0/03-reasonable-config.pl-defaults.patch"
|
|
||||||
|
|
||||||
epatch "${FILESDIR}/3.2.0/04-add-docdir-marker.patch"
|
|
||||||
epatch "${FILESDIR}/3.2.0/05-nicelevel.patch"
|
|
||||||
|
|
||||||
epatch "${FILESDIR}"/${P}-perl522.patch #580254
|
|
||||||
|
|
||||||
# Fix docs location using the marker that we've patched in.
|
|
||||||
sed -i "s+__DOCDIR__+${DOCDIR}+" "lib/BackupPC/CGI/View.pm" \
|
|
||||||
|| die "failed to sed the documentation location"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local myconf
|
|
||||||
myconf=""
|
|
||||||
if use samba ; then
|
|
||||||
myconf="--bin-path smbclient=$(type -p smbclient)"
|
|
||||||
myconf="${myconf} --bin-path nmblookup=$(type -p nmblookup)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
/usr/bin/env perl ./configure.pl \
|
|
||||||
--batch \
|
|
||||||
--bin-path perl=$(type -p perl) \
|
|
||||||
--bin-path tar=$(type -p tar) \
|
|
||||||
--bin-path rsync=$(type -p rsync) \
|
|
||||||
--bin-path ping=$(type -p ping) \
|
|
||||||
--bin-path df=$(type -p df) \
|
|
||||||
--bin-path ssh=$(type -p ssh) \
|
|
||||||
--bin-path sendmail=$(type -p sendmail) \
|
|
||||||
--bin-path hostname=$(type -p hostname) \
|
|
||||||
--bin-path gzip=$(type -p gzip) \
|
|
||||||
--bin-path bzip2=$(type -p bzip2) \
|
|
||||||
--config-dir "${CONFDIR}" \
|
|
||||||
--install-dir /usr \
|
|
||||||
--data-dir "${DATADIR}" \
|
|
||||||
--hostname 127.0.0.1 \
|
|
||||||
--uid-ignore \
|
|
||||||
--dest-dir "${D%/}" \
|
|
||||||
--html-dir "${CGIDIR}"/image \
|
|
||||||
--html-dir-url /image \
|
|
||||||
--cgi-dir "${CGIDIR}" \
|
|
||||||
--fhs \
|
|
||||||
${myconf} || die "failed the configure.pl script"
|
|
||||||
|
|
||||||
ebegin "Installing documentation"
|
|
||||||
|
|
||||||
pod2man \
|
|
||||||
-errors=none \
|
|
||||||
--section=8 \
|
|
||||||
--center="BackupPC manual" \
|
|
||||||
"${S}"/doc/BackupPC.pod backuppc.8 \
|
|
||||||
|| die "failed to generate man page"
|
|
||||||
|
|
||||||
doman backuppc.8
|
|
||||||
|
|
||||||
# Place the documentation in the correct location
|
|
||||||
dodoc "${D}/usr/doc/BackupPC.html"
|
|
||||||
dodoc "${D}/usr/doc/BackupPC.pod"
|
|
||||||
rm -rf "${D}/usr/doc" || die
|
|
||||||
|
|
||||||
eend 0
|
|
||||||
|
|
||||||
# Setup directories
|
|
||||||
dodir "${CONFDIR}/pc"
|
|
||||||
|
|
||||||
keepdir "${CONFDIR}"
|
|
||||||
keepdir "${CONFDIR}/pc"
|
|
||||||
keepdir "${DATADIR}"/{trash,pool,pc,cpool}
|
|
||||||
keepdir "${LOGDIR}"
|
|
||||||
|
|
||||||
ebegin "Setting up init.d/conf.d/systemd scripts"
|
|
||||||
newinitd "${S}"/init.d/gentoo-backuppc backuppc
|
|
||||||
newconfd "${S}"/init.d/gentoo-backuppc.conf backuppc
|
|
||||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
|
||||||
|
|
||||||
insinto "${APACHE_MODULES_CONFDIR}"
|
|
||||||
doins "${FILESDIR}"/99_backuppc.conf
|
|
||||||
|
|
||||||
# Make sure that the ownership is correct
|
|
||||||
chown -R backuppc:backuppc "${D}${CONFDIR}" || die
|
|
||||||
chown -R backuppc:backuppc "${D}${DATADIR}" || die
|
|
||||||
chown -R backuppc:backuppc "${D}${LOGDIR}" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
elog "Installation finished, you may now start using BackupPC."
|
|
||||||
elog
|
|
||||||
elog "- Read the documentation in /usr/share/doc/${PF}/BackupPC.html"
|
|
||||||
elog " Please pay special attention to the security section."
|
|
||||||
elog
|
|
||||||
elog "- You can launch backuppc by running:"
|
|
||||||
elog
|
|
||||||
elog " # /etc/init.d/backuppc start"
|
|
||||||
elog
|
|
||||||
elog "- To enable the GUI, first edit ${ROOT}etc/conf.d/apache2 and add,"
|
|
||||||
elog
|
|
||||||
elog " \"-D BACKUPPC -D PERL -D MPM_ITK\""
|
|
||||||
elog
|
|
||||||
elog " to the APACHE2_OPTS line."
|
|
||||||
elog
|
|
||||||
elog " Then you must edit ${ROOT}etc/apache2/modules.d/00_mpm_itk.conf"
|
|
||||||
elog " and adjust the values of LimitUIDRange/LimitGIDRange to include"
|
|
||||||
elog " the UID and GID of the backuppc user."
|
|
||||||
elog
|
|
||||||
elog " Finally, start apache:"
|
|
||||||
elog
|
|
||||||
elog " # /etc/init.d/apache2 start"
|
|
||||||
elog
|
|
||||||
elog " The web interface should now be running on,"
|
|
||||||
elog
|
|
||||||
elog " http://127.0.0.1:8080/"
|
|
||||||
elog
|
|
||||||
|
|
||||||
# Generate a new password if there's no auth file
|
|
||||||
if [[ ! -f "${CONFDIR}/users.htpasswd" ]]; then
|
|
||||||
adminuser="backuppc"
|
|
||||||
adminpass=$( makepasswd --chars=12 )
|
|
||||||
htpasswd -bc "${CONFDIR}/users.htpasswd" $adminuser $adminpass
|
|
||||||
|
|
||||||
elog ""
|
|
||||||
elog "- Created admin user $adminuser with password $adminpass"
|
|
||||||
elog " To add new users, run: "
|
|
||||||
elog ""
|
|
||||||
elog " # htpasswd ${CONFDIR}/users.htpasswd newUser"
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1 +1,2 @@
|
|||||||
DIST wrk-3.1.2.tar.gz 902868 SHA256 da88a25f0eeb9e1fd6a9dcf4a96859e9e758f9446f0787cf7c95e4ccde14eefc SHA512 399f33c2c008c21ac8fae1b561fe16ebcca324b5171340ffa706e84c256bf13a9983b5c18d258be6f87cb9fe8e38a434f9bfa7059395a01cb783f77faf952b15 WHIRLPOOL 3460aadf5f3e54cf64d0779b45efba291200f0344a55b3a8c35a603d9fbb917c006ff2035fb91bfdce7652b7e4231fc43c558115cab4ff73b91087163655fe85
|
DIST wrk-3.1.2.tar.gz 902868 SHA256 da88a25f0eeb9e1fd6a9dcf4a96859e9e758f9446f0787cf7c95e4ccde14eefc SHA512 399f33c2c008c21ac8fae1b561fe16ebcca324b5171340ffa706e84c256bf13a9983b5c18d258be6f87cb9fe8e38a434f9bfa7059395a01cb783f77faf952b15 WHIRLPOOL 3460aadf5f3e54cf64d0779b45efba291200f0344a55b3a8c35a603d9fbb917c006ff2035fb91bfdce7652b7e4231fc43c558115cab4ff73b91087163655fe85
|
||||||
|
DIST wrk-4.0.2.tar.gz 6146798 SHA256 a4a6ad6727733023771163e7250189a9a23e6253b5e5025191baa6092d5a26fb SHA512 4279cf7136e2919779be3f61f462136a7a5288eac481104b844193682a8fc554581fd3942624d0be9317a3e82c82497927a124b9b4dbdf455e30d3f0cad1fdea WHIRLPOOL 123e3233b211b06d4542f504db2cd5bded5eb4405fc647a1f4edd1ee2eed8ccb7757b77d2baa7867fac02bf73114de9221cefbf347425498d656fdd2fd9ca000
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=5
|
||||||
|
|
||||||
|
inherit eutils
|
||||||
|
|
||||||
|
DESCRIPTION="A modern HTTP benchmarking tool"
|
||||||
|
HOMEPAGE="https://github.com/wg/wrk"
|
||||||
|
SRC_URI="https://github.com/wg/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~x86 ~amd64"
|
||||||
|
IUSE="libressl"
|
||||||
|
|
||||||
|
DEPEND=">=dev-lang/luajit-2.0.2
|
||||||
|
!libressl? ( dev-libs/openssl:0= )
|
||||||
|
libressl? ( dev-libs/libressl:0= )"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
tc-export CC
|
||||||
|
emake VER="${PV}" WITH_LUAJIT="${EPREFIX}"/usr WITH_OPENSSL="${EPREFIX}"/usr
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin ${PN}
|
||||||
|
dodoc README NOTICE
|
||||||
|
insinto /usr/share/${PN}
|
||||||
|
doins -r scripts
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
# Copyright 2014-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="6"
|
||||||
|
|
||||||
|
DESCRIPTION="A OpenPGP/GPG keyring of official Gentoo release media GPG keys"
|
||||||
|
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Gentoo-keys"
|
||||||
|
SRC_URI="https://dev.gentoo.org/~dolsen/releases/keyrings/${P}.tar.xz"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc64 ~ppc ~sparc ~x86 ~arm64 ~x86-fbsd ~amd64-fbsd ~m68k ~mips ~s390 ~sh"
|
||||||
|
|
||||||
|
S="${WORKDIR}"
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
insinto /var/lib/gentoo/gkeys/keyrings
|
||||||
|
doins -r gentoo
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
DIST yubikey-manager-qt-0.3.1.tar.gz 175215 SHA256 e41bcda5aae5e0f92158f591e8e584d25c9b4872475f8e4253c7a7671e94c859 SHA512 d47a6b75b50c2dca073ab74ea2d7c7c46ff86ec338f52d49afd39796cc1f3de7ddd74664b5f60f9013393b9ca24621da63d218eb3c2cb3017fefed2370b269d1 WHIRLPOOL 1d6de66f0450d72e29b9e9a2a959f4ca8ed7c8614b976115ecfb433e8b5f1795d12e6d907f73152b6bef3de6510cbcf236b2386b18a3cba2094269f78522196a
|
DIST yubikey-manager-qt-0.3.1.tar.gz 175215 SHA256 e41bcda5aae5e0f92158f591e8e584d25c9b4872475f8e4253c7a7671e94c859 SHA512 d47a6b75b50c2dca073ab74ea2d7c7c46ff86ec338f52d49afd39796cc1f3de7ddd74664b5f60f9013393b9ca24621da63d218eb3c2cb3017fefed2370b269d1 WHIRLPOOL 1d6de66f0450d72e29b9e9a2a959f4ca8ed7c8614b976115ecfb433e8b5f1795d12e6d907f73152b6bef3de6510cbcf236b2386b18a3cba2094269f78522196a
|
||||||
|
DIST yubikey-manager-qt-0.3.2.tar.gz 175662 SHA256 5dd780c75e17a141ab882c8c10b04dcfcc61dae7e574c1404a606b05b047cae1 SHA512 5ae0b802f041a37a67bef6f7c8b5224fe47d145bcb3bef8c42e300048e849bbcf333de6d15a9a671ced21741d412af9419c08fd3b018276ce997b3cdd5ba55f5 WHIRLPOOL 5284a3e2f1e64d3b793b82d1064feab7325de12c0b8b6b5328f66440668d7b2628a5dc0df2d0b3b5e3a72a6f4aca511777cd6e2ae9fb3f337cc908cb1a2f1586
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{4,5,6} )
|
||||||
|
|
||||||
|
inherit eutils qmake-utils python-single-r1 vcs-snapshot
|
||||||
|
|
||||||
|
DESCRIPTION="Cross-platform application for configuring any YubiKey over all USB transports"
|
||||||
|
HOMEPAGE="https://developers.yubico.com/yubikey-manager-qt https://github.com/Yubico/yubikey-manager-qt"
|
||||||
|
SRC_URI="https://github.com/Yubico/yubikey-manager-qt/archive/${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="BSD-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
DEPEND=">=app-crypt/yubikey-manager-0.4[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pyotherside[${PYTHON_USEDEP}]
|
||||||
|
dev-qt/qtsingleapplication[qt5]
|
||||||
|
dev-qt/qtdeclarative:5
|
||||||
|
dev-qt/qtquickcontrols:5[widgets]
|
||||||
|
dev-qt/qtwidgets:5"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
rm -rf vendor ykman-gui/vendor || die
|
||||||
|
sed -i -e "s/ykman-cli//" ${PN}.pro || die
|
||||||
|
sed -i -e "/qtsingleapplication.pri/d" -e "/CONFIG += c++11/a CONFIG += qtsingleapplication" -i ykman-gui/ykman-gui.pro || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
eqmake5
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
emake install INSTALL_ROOT="${D}"
|
||||||
|
domenu resources/ykman-gui.desktop
|
||||||
|
doicon -s 128 resources/icons/ykman.png
|
||||||
|
}
|
@ -1,14 +0,0 @@
|
|||||||
--- a/build/app/src/config-schema.js
|
|
||||||
+++ b/build/app/src/config-schema.js
|
|
||||||
@@ -9,6 +9,11 @@
|
|
||||||
core: {
|
|
||||||
type: 'object',
|
|
||||||
properties: {
|
|
||||||
+ apmPath: {
|
|
||||||
+ type: 'string',
|
|
||||||
+ "default": '/usr/bin/apm{{ATOM_SUFFIX}}',
|
|
||||||
+ description: 'Path to apm executable.'
|
|
||||||
+ },
|
|
||||||
ignoredNames: {
|
|
||||||
type: 'array',
|
|
||||||
"default": [".git", ".hg", ".svn", ".DS_Store", "._*", "Thumbs.db"],
|
|
@ -1,2 +1 @@
|
|||||||
DIST juffed-0.10-1054.tar.bz2 1657118 SHA256 ac58d32acaf9d60e4758e9ae05b1a6b7fc0cb7ecd3b207db769dbb9c747be16c SHA512 023e9fca1f02fdb39645bd41700c7481fe8d6ae08ec62b0bf5ba58f627eb6872f96d27f05eae4bc92d90fd204dd0c30f868c858de873ab6511ac21748254b47c WHIRLPOOL ceb9e0dc9100dd5f2578abc14fff336adf664726d8e347f9832ffc4942c36e6e28aaff931fd528e6f572bcb29e4027ee486a82ee93d216d0751b5d8aa4233f6c
|
|
||||||
DIST juffed-0.10_p20160323.tar.gz 1617451 SHA256 15d84bbda71cc8f44f7e0f2c114609859ca90602e86e40f00394d372ab87b5cf SHA512 a49837b199db35c5e7a7580aa4025a2c056b55cef6e98e22f239fc9e455cde3a451d6a0971fb02697c63f3f156d85aaf8021ea13ea3a9e6867ae419f772484b5 WHIRLPOOL 1aac9f820fd842890784979436a7e5afe706af62bcbaf6d5d837749ab26bae79ed5b4d10bc833351f8b2eafd1760f86e3f7f1ca51774a282ffdd85482152c68b
|
DIST juffed-0.10_p20160323.tar.gz 1617451 SHA256 15d84bbda71cc8f44f7e0f2c114609859ca90602e86e40f00394d372ab87b5cf SHA512 a49837b199db35c5e7a7580aa4025a2c056b55cef6e98e22f239fc9e455cde3a451d6a0971fb02697c63f3f156d85aaf8021ea13ea3a9e6867ae419f772484b5 WHIRLPOOL 1aac9f820fd842890784979436a7e5afe706af62bcbaf6d5d837749ab26bae79ed5b4d10bc833351f8b2eafd1760f86e3f7f1ca51774a282ffdd85482152c68b
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index ccad5d1..304c0aa 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -190,6 +190,9 @@ add_library ( ${JUFFLIB} SHARED
|
|
||||||
target_link_libraries ( ${JUFFLIB}
|
|
||||||
${QT_LIBRARIES}
|
|
||||||
)
|
|
||||||
+if (ENCA_FOUND)
|
|
||||||
+ target_link_libraries( ${JUFFLIB} ${ENCA_LIBRARIES} )
|
|
||||||
+endif (ENCA_FOUND)
|
|
||||||
|
|
||||||
add_library ( ${QSCI_ENGINE} SHARED
|
|
||||||
${juffed_qsci_SRCS}
|
|
||||||
@@ -277,9 +280,6 @@ target_link_libraries ( ${JUFFED}
|
|
||||||
${QT_LIBRARIES}
|
|
||||||
${QT_QTNETWORK_LIBRARY}
|
|
||||||
)
|
|
||||||
-if (ENCA_FOUND)
|
|
||||||
- target_link_libraries( ${JUFFED} ${ENCA_LIBRARIES} )
|
|
||||||
-endif (ENCA_FOUND)
|
|
||||||
|
|
||||||
if ( UNIX )
|
|
||||||
set(CMAKE_CXX_FLAGS "-Wall -Werror -Wextra")
|
|
@ -1,44 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
|
|
||||||
inherit cmake-utils
|
|
||||||
|
|
||||||
DESCRIPTION="QScintilla-based tabbed text editor with syntax highlighting"
|
|
||||||
HOMEPAGE="http://juffed.com/en/"
|
|
||||||
SRC_URI="mirror://sourceforge/${PN}/${P}-1054.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64 ~ppc ~ppc64 x86"
|
|
||||||
IUSE="debug"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
app-i18n/enca
|
|
||||||
dev-qt/qtcore:4
|
|
||||||
dev-qt/qtgui:4
|
|
||||||
dev-qt/qtsingleapplication[qt4(+),X]
|
|
||||||
x11-libs/qscintilla:=[qt4(-)]
|
|
||||||
"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
|
|
||||||
DOCS=( ChangeLog README )
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
# bug 540554
|
|
||||||
"${FILESDIR}/0.10-link-libjuff-against-libenca.patch"
|
|
||||||
)
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
cmake-utils_src_prepare
|
|
||||||
|
|
||||||
sed -i -e '/set(CMAKE_CXX_FLAGS/d' CMakeLists.txt || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local mycmakeargs=(
|
|
||||||
-DUSE_SYSTEM_QTSINGLEAPPLICATION=ON
|
|
||||||
)
|
|
||||||
cmake-utils_src_configure
|
|
||||||
}
|
|
@ -1,3 +1,3 @@
|
|||||||
DIST ebuild-mode-1.37.tar.xz 30816 SHA256 f7368a8757036874dde542c69c26b824fe3da5241098f89a6b7d7e2665cbbf1d SHA512 1d570b213ad0c6eef8817f69c99c0862703b9bddc24477234dde542b697ba372a06bbe8e4a91179a7d528b720a7dbfc13bb92c8ea0a4d3b3b8684fa4ee0065c0 WHIRLPOOL 75928f5965bdfe66733e203588f01ab3b5de67a5958d33f41069d0793842bd9617ab0904ab71f95aeae04e0aa2f55646e4c545d6199cc1d357140b8fd1a714ab
|
DIST ebuild-mode-1.37.tar.xz 30816 SHA256 f7368a8757036874dde542c69c26b824fe3da5241098f89a6b7d7e2665cbbf1d SHA512 1d570b213ad0c6eef8817f69c99c0862703b9bddc24477234dde542b697ba372a06bbe8e4a91179a7d528b720a7dbfc13bb92c8ea0a4d3b3b8684fa4ee0065c0 WHIRLPOOL 75928f5965bdfe66733e203588f01ab3b5de67a5958d33f41069d0793842bd9617ab0904ab71f95aeae04e0aa2f55646e4c545d6199cc1d357140b8fd1a714ab
|
||||||
DIST ebuild-mode-1.38.tar.xz 30744 SHA256 63f39bb1a09e29b86e5048f162f4779f287c8825e161a092e74530962947d3c3 SHA512 bfcc4fb100f7d9299e9b466c7661e865f9b93ee352780da1647f1a98159fe3e9eeb8cd4b7d1d9906d532316d1256ec7b6f821cac3d064cda15f2fd62ca7cb349 WHIRLPOOL ea61825ac0fd2d50ec9722088b03ed9664708dd6fac076ff3db8323bfdf8d1b2e351c7059f2f77471ea200b7a19d9f67ab233ebdb743ece80218f0e940fb0706
|
DIST ebuild-mode-1.38.tar.xz 30744 SHA256 63f39bb1a09e29b86e5048f162f4779f287c8825e161a092e74530962947d3c3 SHA512 bfcc4fb100f7d9299e9b466c7661e865f9b93ee352780da1647f1a98159fe3e9eeb8cd4b7d1d9906d532316d1256ec7b6f821cac3d064cda15f2fd62ca7cb349 WHIRLPOOL ea61825ac0fd2d50ec9722088b03ed9664708dd6fac076ff3db8323bfdf8d1b2e351c7059f2f77471ea200b7a19d9f67ab233ebdb743ece80218f0e940fb0706
|
||||||
DIST ebuild-mode-1.39.tar.xz 34476 SHA256 15ed940d9cc600a9058ced8dcee0e88e0cd635cfe85c385e84a4b738ed70e051 SHA512 ba4f082c5b9bf8e80077f31d8134eb06d927d1f34b505a43b093832b3763a84f37136f8458d863b28d31c0512ffa7c460c1f7640f2e107f3eec3f5c95eb80da7 WHIRLPOOL ae2c4cf6783adb1dad058a84794efdd510d972a81961da21adeaf5f36cc9870ecfa80c1aa1ae8fe79e2c10c8082f9f6dc32e6e051f846dce1787843e9f0e78f5
|
DIST ebuild-mode-1.40.tar.xz 34676 SHA256 fcce06f2c429989cecb50d043c50a06c28e640987aef84f5760a1c5df1793ef2 SHA512 50caa3255ff874e779f8dcb34b84845fd3b03edee35fc20df8aa3606dc2a00a4a0e88fab79f7872cfe3e92f04263ce74e60f3aeb1d97a2706116414ac9b352d5 WHIRLPOOL 369b152f1ffa6cd818fbb5be7d1ef054508056adfa1fa614d8bcbfba71c8b7f8a61e7b81ee162632cb31e4914c15c7def07bc64ef62a41eafbb9572749a35037
|
||||||
|
@ -1,87 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
|
|
||||||
inherit autotools eutils flag-o-matic pax-utils toolchain-funcs
|
|
||||||
|
|
||||||
P_FD="dosemu-freedos-1.0-bin"
|
|
||||||
COMMIT="15cfb41ff20a052769d753c3262c57ecb050ad71"
|
|
||||||
|
|
||||||
DESCRIPTION="DOS Emulator"
|
|
||||||
HOMEPAGE="http://www.dosemu.org/"
|
|
||||||
SRC_URI="mirror://sourceforge/dosemu/${P_FD}.tgz
|
|
||||||
https://sourceforge.net/code-snapshots/git/d/do/dosemu/code.git/dosemu-code-${COMMIT}.zip -> ${P}.zip"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="-* amd64 x86"
|
|
||||||
IUSE="X svga gpm debug alsa sndfile fluidsynth"
|
|
||||||
|
|
||||||
RDEPEND="X? ( x11-libs/libX11
|
|
||||||
x11-libs/libXxf86vm
|
|
||||||
x11-libs/libXau
|
|
||||||
x11-libs/libXext
|
|
||||||
x11-libs/libXdmcp
|
|
||||||
x11-apps/xset
|
|
||||||
x11-apps/xlsfonts
|
|
||||||
x11-apps/bdftopcf
|
|
||||||
x11-apps/mkfontdir )
|
|
||||||
svga? ( media-libs/svgalib )
|
|
||||||
gpm? ( sys-libs/gpm )
|
|
||||||
alsa? ( media-libs/alsa-lib )
|
|
||||||
sndfile? ( media-libs/libsndfile )
|
|
||||||
fluidsynth? ( media-sound/fluidsynth
|
|
||||||
media-sound/fluid-soundfont )
|
|
||||||
media-libs/libsdl
|
|
||||||
>=sys-libs/slang-1.4"
|
|
||||||
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
X? ( x11-proto/xf86dgaproto )
|
|
||||||
>=sys-devel/autoconf-2.57"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${PN}-code-${COMMIT}"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
epatch "${FILESDIR}"/${P}-fortify.patch
|
|
||||||
epatch "${FILESDIR}"/${PN}-1.4.1_pre20091009-dash.patch
|
|
||||||
epatch "${FILESDIR}"/${P}-no-glibc.patch
|
|
||||||
epatch "${FILESDIR}"/${P}-flex-2.6.3.patch
|
|
||||||
|
|
||||||
epatch_user
|
|
||||||
|
|
||||||
# Has problems with -O3 on some systems
|
|
||||||
replace-flags -O[3-9] -O2
|
|
||||||
|
|
||||||
# This one is from media-sound/fluid-soundfont (bug #479534)
|
|
||||||
sed "s,/usr/share/soundfonts/default.sf2,${EPREFIX}/usr/share/sounds/sf2/FluidR3_GM.sf2,"\
|
|
||||||
-i src/plugin/fluidsynth/mid_o_flus.c || die
|
|
||||||
|
|
||||||
eautoreconf
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf $(use_with X x) \
|
|
||||||
$(use_with svga svgalib) \
|
|
||||||
$(use_enable debug) \
|
|
||||||
$(use_with gpm) \
|
|
||||||
$(use_with alsa) \
|
|
||||||
$(use_with sndfile) \
|
|
||||||
$(use_with fluidsynth) \
|
|
||||||
--with-fdtarball="${DISTDIR}"/${P_FD}.tgz \
|
|
||||||
--sysconfdir="${EPREFIX}"/etc/dosemu/ \
|
|
||||||
--with-docdir="${EPREFIX}"/usr/share/doc/${PF}
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake AR=$(tc-getAR)
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# r - randmmap: dosemu tries to get address mapping
|
|
||||||
# exactly where asked, loops otherwise.
|
|
||||||
# m - allow RWX mapping: as it's an emulator / code loader
|
|
||||||
pax-mark -mr "${ED}/usr/bin/dosemu.bin"
|
|
||||||
}
|
|
@ -0,0 +1,784 @@
|
|||||||
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="6"
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python2_7 )
|
||||||
|
PYTHON_REQ_USE="ncurses,readline"
|
||||||
|
|
||||||
|
PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
|
||||||
|
|
||||||
|
FIRMWARE_ABI_VERSION="2.9.0-r52"
|
||||||
|
|
||||||
|
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||||
|
user udev fcaps readme.gentoo-r1 pax-utils l10n
|
||||||
|
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||||
|
inherit git-r3
|
||||||
|
SRC_URI=""
|
||||||
|
else
|
||||||
|
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
|
||||||
|
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||||
|
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||||
|
|
||||||
|
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt
|
||||||
|
glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux
|
||||||
|
kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png
|
||||||
|
pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy
|
||||||
|
spice ssh static static-user systemtap tci test usb usbredir vde
|
||||||
|
+vhost-net virgl virtfs +vnc vte xattr xen xfs"
|
||||||
|
|
||||||
|
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel
|
||||||
|
mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc
|
||||||
|
sparc64 x86_64"
|
||||||
|
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS}
|
||||||
|
lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb"
|
||||||
|
IUSE_USER_TARGETS="${COMMON_TARGETS}
|
||||||
|
armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
|
||||||
|
|
||||||
|
use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||||
|
use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||||
|
IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
|
||||||
|
|
||||||
|
# Allow no targets to be built so that people can get a tools-only build.
|
||||||
|
# Block USE flag configurations known to not work.
|
||||||
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||||
|
gtk2? ( gtk )
|
||||||
|
qemu_softmmu_targets_arm? ( fdt )
|
||||||
|
qemu_softmmu_targets_microblaze? ( fdt )
|
||||||
|
qemu_softmmu_targets_mips64el? ( fdt )
|
||||||
|
qemu_softmmu_targets_ppc? ( fdt )
|
||||||
|
qemu_softmmu_targets_ppc64? ( fdt )
|
||||||
|
sdl2? ( sdl )
|
||||||
|
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio )
|
||||||
|
virtfs? ( xattr )
|
||||||
|
vte? ( gtk )"
|
||||||
|
|
||||||
|
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||||
|
# and user/softmmu targets (qemu-*, qemu-system-*).
|
||||||
|
#
|
||||||
|
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||||
|
#
|
||||||
|
# The attr lib isn't always linked in (although the USE flag is always
|
||||||
|
# respected). This is because qemu supports using the C library's API
|
||||||
|
# when available rather than always using the extranl library.
|
||||||
|
ALL_DEPEND="
|
||||||
|
>=dev-libs/glib-2.0[static-libs(+)]
|
||||||
|
sys-libs/zlib[static-libs(+)]
|
||||||
|
python? ( ${PYTHON_DEPS} )
|
||||||
|
systemtap? ( dev-util/systemtap )
|
||||||
|
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||||
|
|
||||||
|
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||||
|
# softmmu targets (qemu-system-*).
|
||||||
|
SOFTMMU_TOOLS_DEPEND="
|
||||||
|
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||||
|
accessibility? (
|
||||||
|
app-accessibility/brltty[api]
|
||||||
|
app-accessibility/brltty[static-libs(+)]
|
||||||
|
)
|
||||||
|
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||||
|
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||||
|
bluetooth? ( net-wireless/bluez )
|
||||||
|
bzip2? ( app-arch/bzip2[static-libs(+)] )
|
||||||
|
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||||
|
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||||
|
fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] )
|
||||||
|
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||||
|
gnutls? (
|
||||||
|
dev-libs/nettle:=[static-libs(+)]
|
||||||
|
>=net-libs/gnutls-3.0:=[static-libs(+)]
|
||||||
|
)
|
||||||
|
gtk? (
|
||||||
|
gtk2? (
|
||||||
|
x11-libs/gtk+:2
|
||||||
|
vte? ( x11-libs/vte:0 )
|
||||||
|
)
|
||||||
|
!gtk2? (
|
||||||
|
x11-libs/gtk+:3
|
||||||
|
vte? ( x11-libs/vte:2.91 )
|
||||||
|
)
|
||||||
|
)
|
||||||
|
infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] )
|
||||||
|
iscsi? ( net-libs/libiscsi )
|
||||||
|
jpeg? ( virtual/jpeg:0=[static-libs(+)] )
|
||||||
|
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||||
|
ncurses? (
|
||||||
|
sys-libs/ncurses:0=[unicode]
|
||||||
|
sys-libs/ncurses:0=[static-libs(+)]
|
||||||
|
)
|
||||||
|
nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] )
|
||||||
|
numa? ( sys-process/numactl[static-libs(+)] )
|
||||||
|
opengl? (
|
||||||
|
virtual/opengl
|
||||||
|
media-libs/libepoxy[static-libs(+)]
|
||||||
|
media-libs/mesa[static-libs(+)]
|
||||||
|
media-libs/mesa[egl,gbm]
|
||||||
|
)
|
||||||
|
png? ( media-libs/libpng:0=[static-libs(+)] )
|
||||||
|
pulseaudio? ( media-sound/pulseaudio )
|
||||||
|
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||||
|
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||||
|
sdl? (
|
||||||
|
!sdl2? (
|
||||||
|
media-libs/libsdl[X]
|
||||||
|
>=media-libs/libsdl-1.2.11[static-libs(+)]
|
||||||
|
)
|
||||||
|
sdl2? (
|
||||||
|
media-libs/libsdl2[X]
|
||||||
|
media-libs/libsdl2[static-libs(+)]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||||
|
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||||
|
snappy? ( app-arch/snappy:=[static-libs(+)] )
|
||||||
|
spice? (
|
||||||
|
>=app-emulation/spice-protocol-0.12.3
|
||||||
|
>=app-emulation/spice-0.12.0[static-libs(+)]
|
||||||
|
)
|
||||||
|
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||||
|
usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
|
||||||
|
usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
|
||||||
|
vde? ( net-misc/vde[static-libs(+)] )
|
||||||
|
virgl? ( media-libs/virglrenderer[static-libs(+)] )
|
||||||
|
virtfs? ( sys-libs/libcap )
|
||||||
|
xen? ( app-emulation/xen-tools:= )
|
||||||
|
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||||
|
|
||||||
|
X86_FIRMWARE_DEPEND="
|
||||||
|
pin-upstream-blobs? (
|
||||||
|
~sys-firmware/edk2-ovmf-2017_pre20170505[binary]
|
||||||
|
~sys-firmware/ipxe-1.0.0_p20160620
|
||||||
|
~sys-firmware/seabios-1.10.2[binary,seavgabios]
|
||||||
|
~sys-firmware/sgabios-0.1_pre8
|
||||||
|
)
|
||||||
|
!pin-upstream-blobs? (
|
||||||
|
sys-firmware/edk2-ovmf
|
||||||
|
sys-firmware/ipxe
|
||||||
|
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||||
|
sys-firmware/sgabios
|
||||||
|
)"
|
||||||
|
|
||||||
|
CDEPEND="
|
||||||
|
!static? (
|
||||||
|
${ALL_DEPEND//\[static-libs(+)]}
|
||||||
|
${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]}
|
||||||
|
)
|
||||||
|
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||||
|
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )"
|
||||||
|
DEPEND="${CDEPEND}
|
||||||
|
dev-lang/perl
|
||||||
|
=dev-lang/python-2*
|
||||||
|
sys-apps/texinfo
|
||||||
|
virtual/pkgconfig
|
||||||
|
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||||
|
gtk? ( nls? ( sys-devel/gettext ) )
|
||||||
|
static? (
|
||||||
|
${ALL_DEPEND}
|
||||||
|
${SOFTMMU_TOOLS_DEPEND}
|
||||||
|
)
|
||||||
|
static-user? ( ${ALL_DEPEND} )
|
||||||
|
test? (
|
||||||
|
dev-libs/glib[utils]
|
||||||
|
sys-devel/bc
|
||||||
|
)"
|
||||||
|
RDEPEND="${CDEPEND}
|
||||||
|
selinux? ( sec-policy/selinux-qemu )"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-2.5.0-cflags.patch
|
||||||
|
"${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
|
||||||
|
"${FILESDIR}"/${PN}-2.10.0-CVE-2017-13711.patch # bug 629350
|
||||||
|
)
|
||||||
|
|
||||||
|
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||||
|
|
||||||
|
QA_PREBUILT="
|
||||||
|
usr/share/qemu/openbios-ppc
|
||||||
|
usr/share/qemu/openbios-sparc64
|
||||||
|
usr/share/qemu/openbios-sparc32
|
||||||
|
usr/share/qemu/palcode-clipper
|
||||||
|
usr/share/qemu/s390-ccw.img
|
||||||
|
usr/share/qemu/s390-netboot.img
|
||||||
|
usr/share/qemu/u-boot.e500"
|
||||||
|
|
||||||
|
QA_WX_LOAD="usr/bin/qemu-i386
|
||||||
|
usr/bin/qemu-x86_64
|
||||||
|
usr/bin/qemu-alpha
|
||||||
|
usr/bin/qemu-arm
|
||||||
|
usr/bin/qemu-cris
|
||||||
|
usr/bin/qemu-m68k
|
||||||
|
usr/bin/qemu-microblaze
|
||||||
|
usr/bin/qemu-microblazeel
|
||||||
|
usr/bin/qemu-mips
|
||||||
|
usr/bin/qemu-mipsel
|
||||||
|
usr/bin/qemu-or1k
|
||||||
|
usr/bin/qemu-ppc
|
||||||
|
usr/bin/qemu-ppc64
|
||||||
|
usr/bin/qemu-ppc64abi32
|
||||||
|
usr/bin/qemu-sh4
|
||||||
|
usr/bin/qemu-sh4eb
|
||||||
|
usr/bin/qemu-sparc
|
||||||
|
usr/bin/qemu-sparc64
|
||||||
|
usr/bin/qemu-armeb
|
||||||
|
usr/bin/qemu-sparc32plus
|
||||||
|
usr/bin/qemu-s390x
|
||||||
|
usr/bin/qemu-unicore32"
|
||||||
|
|
||||||
|
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the
|
||||||
|
kernel module loaded before running kvm. The easiest way to ensure that the
|
||||||
|
kernel module is loaded is to load it on boot.
|
||||||
|
For AMD CPUs the module is called 'kvm-amd'.
|
||||||
|
For Intel CPUs the module is called 'kvm-intel'.
|
||||||
|
Please review /etc/conf.d/modules for how to load these.
|
||||||
|
|
||||||
|
Make sure your user is in the 'kvm' group. Just run
|
||||||
|
$ gpasswd -a <USER> kvm
|
||||||
|
then have <USER> re-login.
|
||||||
|
|
||||||
|
For brand new installs, the default permissions on /dev/kvm might not let
|
||||||
|
you access it. You can tell udev to reset ownership/perms:
|
||||||
|
$ udevadm trigger -c add /dev/kvm
|
||||||
|
|
||||||
|
If you want to register binfmt handlers for qemu user targets:
|
||||||
|
For openrc:
|
||||||
|
# rc-update add qemu-binfmt
|
||||||
|
For systemd:
|
||||||
|
# ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf"
|
||||||
|
|
||||||
|
pkg_pretend() {
|
||||||
|
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||||
|
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||||
|
elif use kernel_linux; then
|
||||||
|
if ! linux_config_exists; then
|
||||||
|
eerror "Unable to check your kernel for KVM support"
|
||||||
|
else
|
||||||
|
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||||
|
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||||
|
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||||
|
ERROR_KVM_AMD+=" your kernel configuration."
|
||||||
|
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||||
|
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||||
|
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||||
|
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||||
|
ERROR_TUN+=" virtual network device if using -net tap."
|
||||||
|
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||||
|
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||||
|
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||||
|
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||||
|
ERROR_VHOST_NET+=" support"
|
||||||
|
|
||||||
|
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||||
|
CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||||
|
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||||
|
|
||||||
|
# Now do the actual checks setup above
|
||||||
|
check_extra_config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||||
|
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||||
|
eerror "instances are still pointing to it. Please update your"
|
||||||
|
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||||
|
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||||
|
die "update your virt configs to not use qemu-kvm"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
enewgroup kvm 78
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sanity check to make sure target lists are kept up-to-date.
|
||||||
|
check_targets() {
|
||||||
|
local var=$1 mak=$2
|
||||||
|
local detected sorted
|
||||||
|
|
||||||
|
pushd "${S}"/default-configs >/dev/null || die
|
||||||
|
|
||||||
|
# Force C locale until glibc is updated. #564936
|
||||||
|
detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
|
||||||
|
sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
|
||||||
|
if [[ ${sorted} != "${detected}" ]] ; then
|
||||||
|
eerror "The ebuild needs to be kept in sync."
|
||||||
|
eerror "${var}: ${sorted}"
|
||||||
|
eerror "$(printf '%-*s' ${#var} configure): ${detected}"
|
||||||
|
die "sync ${var} to the list of targets"
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_locales() {
|
||||||
|
# Make sure locale list is kept up-to-date.
|
||||||
|
local detected sorted
|
||||||
|
detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u))
|
||||||
|
sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u))
|
||||||
|
if [[ ${sorted} != "${detected}" ]] ; then
|
||||||
|
eerror "The ebuild needs to be kept in sync."
|
||||||
|
eerror "PLOCALES: ${sorted}"
|
||||||
|
eerror " po/*.po: ${detected}"
|
||||||
|
die "sync PLOCALES"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Deal with selective install of locales.
|
||||||
|
if use nls ; then
|
||||||
|
# Delete locales the user does not want. #577814
|
||||||
|
rm_loc() { rm po/$1.po || die; }
|
||||||
|
l10n_for_each_disabled_locale_do rm_loc
|
||||||
|
else
|
||||||
|
# Cheap hack to disable gettext .mo generation.
|
||||||
|
rm -f po/*.po
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
check_targets IUSE_SOFTMMU_TARGETS softmmu
|
||||||
|
check_targets IUSE_USER_TARGETS linux-user
|
||||||
|
|
||||||
|
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||||
|
sed -i -r \
|
||||||
|
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||||
|
Makefile Makefile.target || die
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
# Fix ld and objcopy being called directly
|
||||||
|
tc-export AR LD OBJCOPY
|
||||||
|
|
||||||
|
# Verbose builds
|
||||||
|
MAKEOPTS+=" V=1"
|
||||||
|
|
||||||
|
# Run after we've applied all patches.
|
||||||
|
handle_locales
|
||||||
|
|
||||||
|
# Remove bundled copy of libfdt
|
||||||
|
rm -r dtc || die
|
||||||
|
}
|
||||||
|
|
||||||
|
##
|
||||||
|
# configures qemu based on the build directory and the build type
|
||||||
|
# we are using.
|
||||||
|
#
|
||||||
|
qemu_src_configure() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
local buildtype=$1
|
||||||
|
local builddir="${S}/${buildtype}-build"
|
||||||
|
|
||||||
|
mkdir "${builddir}"
|
||||||
|
|
||||||
|
local conf_opts=(
|
||||||
|
--prefix=/usr
|
||||||
|
--sysconfdir=/etc
|
||||||
|
--libdir=/usr/$(get_libdir)
|
||||||
|
--docdir=/usr/share/doc/${PF}/html
|
||||||
|
--disable-bsd-user
|
||||||
|
--disable-guest-agent
|
||||||
|
--disable-strip
|
||||||
|
--disable-werror
|
||||||
|
# We support gnutls/nettle for crypto operations. It is possible
|
||||||
|
# to use gcrypt when gnutls/nettle are disabled (but not when they
|
||||||
|
# are enabled), but it's not really worth the hassle. Disable it
|
||||||
|
# all the time to avoid automatically detecting it. #568856
|
||||||
|
--disable-gcrypt
|
||||||
|
--python="${PYTHON}"
|
||||||
|
--cc="$(tc-getCC)"
|
||||||
|
--cxx="$(tc-getCXX)"
|
||||||
|
--host-cc="$(tc-getBUILD_CC)"
|
||||||
|
$(use_enable debug debug-info)
|
||||||
|
$(use_enable debug debug-tcg)
|
||||||
|
--enable-docs
|
||||||
|
$(use_enable tci tcg-interpreter)
|
||||||
|
$(use_enable xattr attr)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Disable options not used by user targets. This simplifies building
|
||||||
|
# static user targets (USE=static-user) considerably.
|
||||||
|
conf_notuser() {
|
||||||
|
if [[ ${buildtype} == "user" ]] ; then
|
||||||
|
echo "--disable-${2:-$1}"
|
||||||
|
else
|
||||||
|
use_enable "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
conf_opts+=(
|
||||||
|
$(conf_notuser accessibility brlapi)
|
||||||
|
$(conf_notuser aio linux-aio)
|
||||||
|
$(conf_notuser bzip2)
|
||||||
|
$(conf_notuser bluetooth bluez)
|
||||||
|
$(conf_notuser caps cap-ng)
|
||||||
|
$(conf_notuser curl)
|
||||||
|
$(conf_notuser fdt)
|
||||||
|
$(conf_notuser glusterfs)
|
||||||
|
$(conf_notuser gnutls)
|
||||||
|
$(conf_notuser gnutls nettle)
|
||||||
|
$(conf_notuser gtk)
|
||||||
|
$(conf_notuser infiniband rdma)
|
||||||
|
$(conf_notuser iscsi libiscsi)
|
||||||
|
$(conf_notuser jpeg vnc-jpeg)
|
||||||
|
$(conf_notuser kernel_linux kvm)
|
||||||
|
$(conf_notuser lzo)
|
||||||
|
$(conf_notuser ncurses curses)
|
||||||
|
$(conf_notuser nfs libnfs)
|
||||||
|
$(conf_notuser numa)
|
||||||
|
$(conf_notuser opengl)
|
||||||
|
$(conf_notuser png vnc-png)
|
||||||
|
$(conf_notuser rbd)
|
||||||
|
$(conf_notuser sasl vnc-sasl)
|
||||||
|
$(conf_notuser sdl)
|
||||||
|
$(conf_notuser seccomp)
|
||||||
|
$(conf_notuser smartcard)
|
||||||
|
$(conf_notuser snappy)
|
||||||
|
$(conf_notuser spice)
|
||||||
|
$(conf_notuser ssh libssh2)
|
||||||
|
$(conf_notuser usb libusb)
|
||||||
|
$(conf_notuser usbredir usb-redir)
|
||||||
|
$(conf_notuser vde)
|
||||||
|
$(conf_notuser vhost-net)
|
||||||
|
$(conf_notuser virgl virglrenderer)
|
||||||
|
$(conf_notuser virtfs)
|
||||||
|
$(conf_notuser vnc)
|
||||||
|
$(conf_notuser vte)
|
||||||
|
$(conf_notuser xen)
|
||||||
|
$(conf_notuser xen xen-pci-passthrough)
|
||||||
|
$(conf_notuser xfs xfsctl)
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ ! ${buildtype} == "user" ]] ; then
|
||||||
|
# audio options
|
||||||
|
local audio_opts="oss"
|
||||||
|
use alsa && audio_opts="alsa,${audio_opts}"
|
||||||
|
use sdl && audio_opts="sdl,${audio_opts}"
|
||||||
|
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||||
|
conf_opts+=(
|
||||||
|
--audio-drv-list="${audio_opts}"
|
||||||
|
)
|
||||||
|
use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
|
||||||
|
use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
|
||||||
|
fi
|
||||||
|
|
||||||
|
case ${buildtype} in
|
||||||
|
user)
|
||||||
|
conf_opts+=(
|
||||||
|
--enable-linux-user
|
||||||
|
--disable-system
|
||||||
|
--disable-blobs
|
||||||
|
--disable-tools
|
||||||
|
)
|
||||||
|
local static_flag="static-user"
|
||||||
|
;;
|
||||||
|
softmmu)
|
||||||
|
conf_opts+=(
|
||||||
|
--disable-linux-user
|
||||||
|
--enable-system
|
||||||
|
--disable-tools
|
||||||
|
--with-system-pixman
|
||||||
|
)
|
||||||
|
local static_flag="static"
|
||||||
|
;;
|
||||||
|
tools)
|
||||||
|
conf_opts+=(
|
||||||
|
--disable-linux-user
|
||||||
|
--disable-system
|
||||||
|
--disable-blobs
|
||||||
|
--enable-tools
|
||||||
|
)
|
||||||
|
local static_flag="static"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
local targets="${buildtype}_targets"
|
||||||
|
[[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
|
||||||
|
|
||||||
|
# Add support for SystemTAP
|
||||||
|
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||||
|
|
||||||
|
# We always want to attempt to build with PIE support as it results
|
||||||
|
# in a more secure binary. But it doesn't work with static or if
|
||||||
|
# the current GCC doesn't have PIE support.
|
||||||
|
if use ${static_flag}; then
|
||||||
|
conf_opts+=( --static --disable-pie )
|
||||||
|
else
|
||||||
|
tc-enables-pie && conf_opts+=( --enable-pie )
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "../configure ${conf_opts[*]}"
|
||||||
|
cd "${builddir}"
|
||||||
|
../configure "${conf_opts[@]}" || die "configure failed"
|
||||||
|
|
||||||
|
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||||
|
# host USB devices yet
|
||||||
|
use kernel_FreeBSD && \
|
||||||
|
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local target
|
||||||
|
|
||||||
|
python_setup
|
||||||
|
|
||||||
|
softmmu_targets= softmmu_bins=()
|
||||||
|
user_targets= user_bins=()
|
||||||
|
|
||||||
|
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||||
|
if use "qemu_softmmu_targets_${target}"; then
|
||||||
|
softmmu_targets+=",${target}-softmmu"
|
||||||
|
softmmu_bins+=( "qemu-system-${target}" )
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for target in ${IUSE_USER_TARGETS} ; do
|
||||||
|
if use "qemu_user_targets_${target}"; then
|
||||||
|
user_targets+=",${target}-linux-user"
|
||||||
|
user_bins+=( "qemu-${target}" )
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
softmmu_targets=${softmmu_targets#,}
|
||||||
|
user_targets=${user_targets#,}
|
||||||
|
|
||||||
|
[[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
|
||||||
|
[[ -n ${user_targets} ]] && qemu_src_configure "user"
|
||||||
|
qemu_src_configure "tools"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
if [[ -n ${user_targets} ]]; then
|
||||||
|
cd "${S}/user-build"
|
||||||
|
default
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n ${softmmu_targets} ]]; then
|
||||||
|
cd "${S}/softmmu-build"
|
||||||
|
default
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${S}/tools-build"
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
if [[ -n ${softmmu_targets} ]]; then
|
||||||
|
cd "${S}/softmmu-build"
|
||||||
|
pax-mark m */qemu-system-* #515550
|
||||||
|
emake -j1 check
|
||||||
|
emake -j1 check-report.html
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
qemu_python_install() {
|
||||||
|
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||||
|
|
||||||
|
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||||
|
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||||
|
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Generate binfmt support files.
|
||||||
|
# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
|
||||||
|
# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
|
||||||
|
generate_initd() {
|
||||||
|
local out="${T}/qemu-binfmt"
|
||||||
|
local out_systemd="${T}/qemu.conf"
|
||||||
|
local d="${T}/binfmt.d"
|
||||||
|
|
||||||
|
einfo "Generating qemu binfmt scripts and configuration files"
|
||||||
|
|
||||||
|
# Generate the debian fragments first.
|
||||||
|
mkdir -p "${d}"
|
||||||
|
"${S}"/scripts/qemu-binfmt-conf.sh \
|
||||||
|
--debian \
|
||||||
|
--exportdir "${d}" \
|
||||||
|
--qemu-path "${EPREFIX}/usr/bin" \
|
||||||
|
|| die
|
||||||
|
# Then turn the fragments into a shell script we can source.
|
||||||
|
sed -E -i \
|
||||||
|
-e 's:^([^ ]+) (.*)$:\1="\2":' \
|
||||||
|
"${d}"/* || die
|
||||||
|
|
||||||
|
# Generate the init.d script by assembling the fragments from above.
|
||||||
|
local f qcpu package interpreter magic mask
|
||||||
|
cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die
|
||||||
|
for f in "${d}"/qemu-* ; do
|
||||||
|
source "${f}"
|
||||||
|
|
||||||
|
# Normalize the cpu logic like we do in the init.d for the native cpu.
|
||||||
|
qcpu=${package#qemu-}
|
||||||
|
case ${qcpu} in
|
||||||
|
arm*) qcpu="arm";;
|
||||||
|
mips*) qcpu="mips";;
|
||||||
|
ppc*) qcpu="ppc";;
|
||||||
|
s390*) qcpu="s390";;
|
||||||
|
sh*) qcpu="sh";;
|
||||||
|
sparc*) qcpu="sparc";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
cat <<EOF >>"${out}"
|
||||||
|
if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then
|
||||||
|
echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
|
||||||
|
|
||||||
|
done
|
||||||
|
cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
if [[ -n ${user_targets} ]]; then
|
||||||
|
cd "${S}/user-build"
|
||||||
|
emake DESTDIR="${ED}" install
|
||||||
|
|
||||||
|
# Install binfmt handler init script for user targets.
|
||||||
|
generate_initd
|
||||||
|
doinitd "${T}/qemu-binfmt"
|
||||||
|
|
||||||
|
# Install binfmt/qemu.conf.
|
||||||
|
insinto "/usr/share/qemu/binfmt.d"
|
||||||
|
doins "${T}/qemu.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n ${softmmu_targets} ]]; then
|
||||||
|
cd "${S}/softmmu-build"
|
||||||
|
emake DESTDIR="${ED}" install
|
||||||
|
|
||||||
|
# This might not exist if the test failed. #512010
|
||||||
|
[[ -e check-report.html ]] && dohtml check-report.html
|
||||||
|
|
||||||
|
if use kernel_linux; then
|
||||||
|
udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use python; then
|
||||||
|
python_foreach_impl qemu_python_install
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${S}/tools-build"
|
||||||
|
emake DESTDIR="${ED}" install
|
||||||
|
|
||||||
|
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||||
|
pushd "${ED}"/usr/bin >/dev/null
|
||||||
|
pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594
|
||||||
|
popd >/dev/null
|
||||||
|
|
||||||
|
# Install config file example for qemu-bridge-helper
|
||||||
|
insinto "/etc/qemu"
|
||||||
|
doins "${FILESDIR}/bridge.conf"
|
||||||
|
|
||||||
|
cd "${S}"
|
||||||
|
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||||
|
newdoc pc-bios/README README.pc-bios
|
||||||
|
|
||||||
|
if [[ -n ${softmmu_targets} ]]; then
|
||||||
|
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||||
|
rm "${ED}/usr/share/qemu/bios.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/bios-256k.bin"
|
||||||
|
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||||
|
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||||
|
dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove vgabios since we're using the seavgabios packaged one
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||||
|
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||||
|
dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
|
||||||
|
dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||||
|
dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||||
|
dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||||
|
dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin
|
||||||
|
dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove sgabios since we're using the sgabios packaged one
|
||||||
|
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||||
|
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||||
|
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove iPXE since we're using the iPXE packaged one
|
||||||
|
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||||
|
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||||
|
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||||
|
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||||
|
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||||
|
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||||
|
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||||
|
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
DISABLE_AUTOFORMATTING=true
|
||||||
|
readme.gentoo_create_doc
|
||||||
|
}
|
||||||
|
|
||||||
|
firmware_abi_change() {
|
||||||
|
local pv
|
||||||
|
for pv in ${REPLACING_VERSIONS}; do
|
||||||
|
if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||||
|
udev_reload
|
||||||
|
fi
|
||||||
|
|
||||||
|
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||||
|
|
||||||
|
DISABLE_AUTOFORMATTING=true
|
||||||
|
readme.gentoo_print_elog
|
||||||
|
|
||||||
|
if use pin-upstream-blobs && firmware_abi_change; then
|
||||||
|
ewarn "This version of qemu pins new versions of firmware blobs:"
|
||||||
|
ewarn " $(best_version sys-firmware/edk2-ovmf)"
|
||||||
|
ewarn " $(best_version sys-firmware/ipxe)"
|
||||||
|
ewarn " $(best_version sys-firmware/seabios)"
|
||||||
|
ewarn " $(best_version sys-firmware/sgabios)"
|
||||||
|
ewarn "This might break resume of hibernated guests (started with a different"
|
||||||
|
ewarn "firmware version) and live migration to/from qemu versions with different"
|
||||||
|
ewarn "firmware. Please (cold) restart all running guests. For functional"
|
||||||
|
ewarn "guest migration ensure that all"
|
||||||
|
ewarn "hosts run at least"
|
||||||
|
ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_info() {
|
||||||
|
echo "Using:"
|
||||||
|
echo " $(best_version app-emulation/spice-protocol)"
|
||||||
|
echo " $(best_version sys-firmware/edk2-ovmf)"
|
||||||
|
if has_version 'sys-firmware/edk2-ovmf[binary]'; then
|
||||||
|
echo " USE=binary"
|
||||||
|
else
|
||||||
|
echo " USE=''"
|
||||||
|
fi
|
||||||
|
echo " $(best_version sys-firmware/ipxe)"
|
||||||
|
echo " $(best_version sys-firmware/seabios)"
|
||||||
|
if has_version 'sys-firmware/seabios[binary]'; then
|
||||||
|
echo " USE=binary"
|
||||||
|
else
|
||||||
|
echo " USE=''"
|
||||||
|
fi
|
||||||
|
echo " $(best_version sys-firmware/sgabios)"
|
||||||
|
}
|
@ -0,0 +1,796 @@
|
|||||||
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="6"
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python2_7 )
|
||||||
|
PYTHON_REQ_USE="ncurses,readline"
|
||||||
|
|
||||||
|
PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
|
||||||
|
|
||||||
|
FIRMWARE_ABI_VERSION="2.9.0-r52"
|
||||||
|
|
||||||
|
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||||
|
user udev fcaps readme.gentoo-r1 pax-utils l10n
|
||||||
|
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||||
|
inherit git-r3
|
||||||
|
SRC_URI=""
|
||||||
|
else
|
||||||
|
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
|
||||||
|
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||||
|
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||||
|
|
||||||
|
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt
|
||||||
|
glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux
|
||||||
|
kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png
|
||||||
|
pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy
|
||||||
|
spice ssh static static-user systemtap tci test usb usbredir vde
|
||||||
|
+vhost-net virgl virtfs +vnc vte xattr xen xfs"
|
||||||
|
|
||||||
|
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel
|
||||||
|
mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc
|
||||||
|
sparc64 x86_64"
|
||||||
|
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS}
|
||||||
|
lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb"
|
||||||
|
IUSE_USER_TARGETS="${COMMON_TARGETS}
|
||||||
|
armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
|
||||||
|
|
||||||
|
use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||||
|
use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||||
|
IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
|
||||||
|
|
||||||
|
# Allow no targets to be built so that people can get a tools-only build.
|
||||||
|
# Block USE flag configurations known to not work.
|
||||||
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||||
|
gtk2? ( gtk )
|
||||||
|
qemu_softmmu_targets_arm? ( fdt )
|
||||||
|
qemu_softmmu_targets_microblaze? ( fdt )
|
||||||
|
qemu_softmmu_targets_mips64el? ( fdt )
|
||||||
|
qemu_softmmu_targets_ppc? ( fdt )
|
||||||
|
qemu_softmmu_targets_ppc64? ( fdt )
|
||||||
|
sdl2? ( sdl )
|
||||||
|
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio )
|
||||||
|
virtfs? ( xattr )
|
||||||
|
vte? ( gtk )"
|
||||||
|
|
||||||
|
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||||
|
# and user/softmmu targets (qemu-*, qemu-system-*).
|
||||||
|
#
|
||||||
|
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||||
|
#
|
||||||
|
# The attr lib isn't always linked in (although the USE flag is always
|
||||||
|
# respected). This is because qemu supports using the C library's API
|
||||||
|
# when available rather than always using the extranl library.
|
||||||
|
ALL_DEPEND="
|
||||||
|
>=dev-libs/glib-2.0[static-libs(+)]
|
||||||
|
sys-libs/zlib[static-libs(+)]
|
||||||
|
python? ( ${PYTHON_DEPS} )
|
||||||
|
systemtap? ( dev-util/systemtap )
|
||||||
|
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||||
|
|
||||||
|
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||||
|
# softmmu targets (qemu-system-*).
|
||||||
|
SOFTMMU_TOOLS_DEPEND="
|
||||||
|
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||||
|
accessibility? (
|
||||||
|
app-accessibility/brltty[api]
|
||||||
|
app-accessibility/brltty[static-libs(+)]
|
||||||
|
)
|
||||||
|
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||||
|
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||||
|
bluetooth? ( net-wireless/bluez )
|
||||||
|
bzip2? ( app-arch/bzip2[static-libs(+)] )
|
||||||
|
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||||
|
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||||
|
fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] )
|
||||||
|
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||||
|
gnutls? (
|
||||||
|
dev-libs/nettle:=[static-libs(+)]
|
||||||
|
>=net-libs/gnutls-3.0:=[static-libs(+)]
|
||||||
|
)
|
||||||
|
gtk? (
|
||||||
|
gtk2? (
|
||||||
|
x11-libs/gtk+:2
|
||||||
|
vte? ( x11-libs/vte:0 )
|
||||||
|
)
|
||||||
|
!gtk2? (
|
||||||
|
x11-libs/gtk+:3
|
||||||
|
vte? ( x11-libs/vte:2.91 )
|
||||||
|
)
|
||||||
|
)
|
||||||
|
infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] )
|
||||||
|
iscsi? ( net-libs/libiscsi )
|
||||||
|
jpeg? ( virtual/jpeg:0=[static-libs(+)] )
|
||||||
|
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||||
|
ncurses? (
|
||||||
|
sys-libs/ncurses:0=[unicode]
|
||||||
|
sys-libs/ncurses:0=[static-libs(+)]
|
||||||
|
)
|
||||||
|
nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] )
|
||||||
|
numa? ( sys-process/numactl[static-libs(+)] )
|
||||||
|
opengl? (
|
||||||
|
virtual/opengl
|
||||||
|
media-libs/libepoxy[static-libs(+)]
|
||||||
|
media-libs/mesa[static-libs(+)]
|
||||||
|
media-libs/mesa[egl,gbm]
|
||||||
|
)
|
||||||
|
png? ( media-libs/libpng:0=[static-libs(+)] )
|
||||||
|
pulseaudio? ( media-sound/pulseaudio )
|
||||||
|
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||||
|
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||||
|
sdl? (
|
||||||
|
!sdl2? (
|
||||||
|
media-libs/libsdl[X]
|
||||||
|
>=media-libs/libsdl-1.2.11[static-libs(+)]
|
||||||
|
)
|
||||||
|
sdl2? (
|
||||||
|
media-libs/libsdl2[X]
|
||||||
|
media-libs/libsdl2[static-libs(+)]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||||
|
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||||
|
snappy? ( app-arch/snappy:=[static-libs(+)] )
|
||||||
|
spice? (
|
||||||
|
>=app-emulation/spice-protocol-0.12.3
|
||||||
|
>=app-emulation/spice-0.12.0[static-libs(+)]
|
||||||
|
)
|
||||||
|
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||||
|
usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
|
||||||
|
usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
|
||||||
|
vde? ( net-misc/vde[static-libs(+)] )
|
||||||
|
virgl? ( media-libs/virglrenderer[static-libs(+)] )
|
||||||
|
virtfs? ( sys-libs/libcap )
|
||||||
|
xen? ( app-emulation/xen-tools:= )
|
||||||
|
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||||
|
|
||||||
|
X86_FIRMWARE_DEPEND="
|
||||||
|
pin-upstream-blobs? (
|
||||||
|
~sys-firmware/edk2-ovmf-2017_pre20170505[binary]
|
||||||
|
~sys-firmware/ipxe-1.0.0_p20160620
|
||||||
|
~sys-firmware/seabios-1.10.2[binary,seavgabios]
|
||||||
|
~sys-firmware/sgabios-0.1_pre8
|
||||||
|
)
|
||||||
|
!pin-upstream-blobs? (
|
||||||
|
sys-firmware/edk2-ovmf
|
||||||
|
sys-firmware/ipxe
|
||||||
|
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||||
|
sys-firmware/sgabios
|
||||||
|
)"
|
||||||
|
|
||||||
|
CDEPEND="
|
||||||
|
!static? (
|
||||||
|
${ALL_DEPEND//\[static-libs(+)]}
|
||||||
|
${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]}
|
||||||
|
)
|
||||||
|
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||||
|
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )"
|
||||||
|
DEPEND="${CDEPEND}
|
||||||
|
dev-lang/perl
|
||||||
|
=dev-lang/python-2*
|
||||||
|
sys-apps/texinfo
|
||||||
|
virtual/pkgconfig
|
||||||
|
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||||
|
gtk? ( nls? ( sys-devel/gettext ) )
|
||||||
|
static? (
|
||||||
|
${ALL_DEPEND}
|
||||||
|
${SOFTMMU_TOOLS_DEPEND}
|
||||||
|
)
|
||||||
|
static-user? ( ${ALL_DEPEND} )
|
||||||
|
test? (
|
||||||
|
dev-libs/glib[utils]
|
||||||
|
sys-devel/bc
|
||||||
|
)"
|
||||||
|
RDEPEND="${CDEPEND}
|
||||||
|
selinux? ( sec-policy/selinux-qemu )"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-2.5.0-cflags.patch
|
||||||
|
"${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-8309.patch # bug 616870
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-8379.patch # bug 616872
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-8380.patch # bug 616874
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-8112.patch # bug 616636
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-7493.patch # bug 618808
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-11434.patch # bug 625614
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-11334.patch # bug 621292
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-9524-1.patch # bug 621292
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-9524-2.patch
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-9503-1.patch # bug 621184
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-9503-2.patch
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-10664.patch # bug 623016
|
||||||
|
"${FILESDIR}"/${PN}-2.9.0-CVE-2017-10806.patch # bug 624088
|
||||||
|
)
|
||||||
|
|
||||||
|
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||||
|
|
||||||
|
QA_PREBUILT="
|
||||||
|
usr/share/qemu/openbios-ppc
|
||||||
|
usr/share/qemu/openbios-sparc64
|
||||||
|
usr/share/qemu/openbios-sparc32
|
||||||
|
usr/share/qemu/palcode-clipper
|
||||||
|
usr/share/qemu/s390-ccw.img
|
||||||
|
usr/share/qemu/u-boot.e500"
|
||||||
|
|
||||||
|
QA_WX_LOAD="usr/bin/qemu-i386
|
||||||
|
usr/bin/qemu-x86_64
|
||||||
|
usr/bin/qemu-alpha
|
||||||
|
usr/bin/qemu-arm
|
||||||
|
usr/bin/qemu-cris
|
||||||
|
usr/bin/qemu-m68k
|
||||||
|
usr/bin/qemu-microblaze
|
||||||
|
usr/bin/qemu-microblazeel
|
||||||
|
usr/bin/qemu-mips
|
||||||
|
usr/bin/qemu-mipsel
|
||||||
|
usr/bin/qemu-or1k
|
||||||
|
usr/bin/qemu-ppc
|
||||||
|
usr/bin/qemu-ppc64
|
||||||
|
usr/bin/qemu-ppc64abi32
|
||||||
|
usr/bin/qemu-sh4
|
||||||
|
usr/bin/qemu-sh4eb
|
||||||
|
usr/bin/qemu-sparc
|
||||||
|
usr/bin/qemu-sparc64
|
||||||
|
usr/bin/qemu-armeb
|
||||||
|
usr/bin/qemu-sparc32plus
|
||||||
|
usr/bin/qemu-s390x
|
||||||
|
usr/bin/qemu-unicore32"
|
||||||
|
|
||||||
|
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the
|
||||||
|
kernel module loaded before running kvm. The easiest way to ensure that the
|
||||||
|
kernel module is loaded is to load it on boot.
|
||||||
|
For AMD CPUs the module is called 'kvm-amd'.
|
||||||
|
For Intel CPUs the module is called 'kvm-intel'.
|
||||||
|
Please review /etc/conf.d/modules for how to load these.
|
||||||
|
|
||||||
|
Make sure your user is in the 'kvm' group. Just run
|
||||||
|
$ gpasswd -a <USER> kvm
|
||||||
|
then have <USER> re-login.
|
||||||
|
|
||||||
|
For brand new installs, the default permissions on /dev/kvm might not let
|
||||||
|
you access it. You can tell udev to reset ownership/perms:
|
||||||
|
$ udevadm trigger -c add /dev/kvm
|
||||||
|
|
||||||
|
If you want to register binfmt handlers for qemu user targets:
|
||||||
|
For openrc:
|
||||||
|
# rc-update add qemu-binfmt
|
||||||
|
For systemd:
|
||||||
|
# ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf"
|
||||||
|
|
||||||
|
pkg_pretend() {
|
||||||
|
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||||
|
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||||
|
elif use kernel_linux; then
|
||||||
|
if ! linux_config_exists; then
|
||||||
|
eerror "Unable to check your kernel for KVM support"
|
||||||
|
else
|
||||||
|
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||||
|
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||||
|
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||||
|
ERROR_KVM_AMD+=" your kernel configuration."
|
||||||
|
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||||
|
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||||
|
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||||
|
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||||
|
ERROR_TUN+=" virtual network device if using -net tap."
|
||||||
|
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||||
|
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||||
|
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||||
|
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||||
|
ERROR_VHOST_NET+=" support"
|
||||||
|
|
||||||
|
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||||
|
CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||||
|
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||||
|
|
||||||
|
# Now do the actual checks setup above
|
||||||
|
check_extra_config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||||
|
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||||
|
eerror "instances are still pointing to it. Please update your"
|
||||||
|
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||||
|
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||||
|
die "update your virt configs to not use qemu-kvm"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
enewgroup kvm 78
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sanity check to make sure target lists are kept up-to-date.
|
||||||
|
check_targets() {
|
||||||
|
local var=$1 mak=$2
|
||||||
|
local detected sorted
|
||||||
|
|
||||||
|
pushd "${S}"/default-configs >/dev/null || die
|
||||||
|
|
||||||
|
# Force C locale until glibc is updated. #564936
|
||||||
|
detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
|
||||||
|
sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
|
||||||
|
if [[ ${sorted} != "${detected}" ]] ; then
|
||||||
|
eerror "The ebuild needs to be kept in sync."
|
||||||
|
eerror "${var}: ${sorted}"
|
||||||
|
eerror "$(printf '%-*s' ${#var} configure): ${detected}"
|
||||||
|
die "sync ${var} to the list of targets"
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_locales() {
|
||||||
|
# Make sure locale list is kept up-to-date.
|
||||||
|
local detected sorted
|
||||||
|
detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u))
|
||||||
|
sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u))
|
||||||
|
if [[ ${sorted} != "${detected}" ]] ; then
|
||||||
|
eerror "The ebuild needs to be kept in sync."
|
||||||
|
eerror "PLOCALES: ${sorted}"
|
||||||
|
eerror " po/*.po: ${detected}"
|
||||||
|
die "sync PLOCALES"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Deal with selective install of locales.
|
||||||
|
if use nls ; then
|
||||||
|
# Delete locales the user does not want. #577814
|
||||||
|
rm_loc() { rm po/$1.po || die; }
|
||||||
|
l10n_for_each_disabled_locale_do rm_loc
|
||||||
|
else
|
||||||
|
# Cheap hack to disable gettext .mo generation.
|
||||||
|
rm -f po/*.po
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
check_targets IUSE_SOFTMMU_TARGETS softmmu
|
||||||
|
check_targets IUSE_USER_TARGETS linux-user
|
||||||
|
|
||||||
|
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||||
|
sed -i -r \
|
||||||
|
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||||
|
Makefile Makefile.target || die
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
# Fix ld and objcopy being called directly
|
||||||
|
tc-export AR LD OBJCOPY
|
||||||
|
|
||||||
|
# Verbose builds
|
||||||
|
MAKEOPTS+=" V=1"
|
||||||
|
|
||||||
|
# Run after we've applied all patches.
|
||||||
|
handle_locales
|
||||||
|
|
||||||
|
#remove bundled copy of libfdt
|
||||||
|
rm -r dtc || die
|
||||||
|
}
|
||||||
|
|
||||||
|
##
|
||||||
|
# configures qemu based on the build directory and the build type
|
||||||
|
# we are using.
|
||||||
|
#
|
||||||
|
qemu_src_configure() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
local buildtype=$1
|
||||||
|
local builddir="${S}/${buildtype}-build"
|
||||||
|
|
||||||
|
mkdir "${builddir}"
|
||||||
|
|
||||||
|
local conf_opts=(
|
||||||
|
--prefix=/usr
|
||||||
|
--sysconfdir=/etc
|
||||||
|
--libdir=/usr/$(get_libdir)
|
||||||
|
--docdir=/usr/share/doc/${PF}/html
|
||||||
|
--disable-bsd-user
|
||||||
|
--disable-guest-agent
|
||||||
|
--disable-strip
|
||||||
|
--disable-werror
|
||||||
|
# We support gnutls/nettle for crypto operations. It is possible
|
||||||
|
# to use gcrypt when gnutls/nettle are disabled (but not when they
|
||||||
|
# are enabled), but it's not really worth the hassle. Disable it
|
||||||
|
# all the time to avoid automatically detecting it. #568856
|
||||||
|
--disable-gcrypt
|
||||||
|
--python="${PYTHON}"
|
||||||
|
--cc="$(tc-getCC)"
|
||||||
|
--cxx="$(tc-getCXX)"
|
||||||
|
--host-cc="$(tc-getBUILD_CC)"
|
||||||
|
$(use_enable debug debug-info)
|
||||||
|
$(use_enable debug debug-tcg)
|
||||||
|
--enable-docs
|
||||||
|
$(use_enable tci tcg-interpreter)
|
||||||
|
$(use_enable xattr attr)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Disable options not used by user targets. This simplifies building
|
||||||
|
# static user targets (USE=static-user) considerably.
|
||||||
|
conf_notuser() {
|
||||||
|
if [[ ${buildtype} == "user" ]] ; then
|
||||||
|
echo "--disable-${2:-$1}"
|
||||||
|
else
|
||||||
|
use_enable "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
conf_opts+=(
|
||||||
|
$(conf_notuser accessibility brlapi)
|
||||||
|
$(conf_notuser aio linux-aio)
|
||||||
|
$(conf_notuser bzip2)
|
||||||
|
$(conf_notuser bluetooth bluez)
|
||||||
|
$(conf_notuser caps cap-ng)
|
||||||
|
$(conf_notuser curl)
|
||||||
|
$(conf_notuser fdt)
|
||||||
|
$(conf_notuser glusterfs)
|
||||||
|
$(conf_notuser gnutls)
|
||||||
|
$(conf_notuser gnutls nettle)
|
||||||
|
$(conf_notuser gtk)
|
||||||
|
$(conf_notuser infiniband rdma)
|
||||||
|
$(conf_notuser iscsi libiscsi)
|
||||||
|
$(conf_notuser jpeg vnc-jpeg)
|
||||||
|
$(conf_notuser kernel_linux kvm)
|
||||||
|
$(conf_notuser lzo)
|
||||||
|
$(conf_notuser ncurses curses)
|
||||||
|
$(conf_notuser nfs libnfs)
|
||||||
|
$(conf_notuser numa)
|
||||||
|
$(conf_notuser opengl)
|
||||||
|
$(conf_notuser png vnc-png)
|
||||||
|
$(conf_notuser rbd)
|
||||||
|
$(conf_notuser sasl vnc-sasl)
|
||||||
|
$(conf_notuser sdl)
|
||||||
|
$(conf_notuser seccomp)
|
||||||
|
$(conf_notuser smartcard)
|
||||||
|
$(conf_notuser snappy)
|
||||||
|
$(conf_notuser spice)
|
||||||
|
$(conf_notuser ssh libssh2)
|
||||||
|
$(conf_notuser usb libusb)
|
||||||
|
$(conf_notuser usbredir usb-redir)
|
||||||
|
$(conf_notuser vde)
|
||||||
|
$(conf_notuser vhost-net)
|
||||||
|
$(conf_notuser virgl virglrenderer)
|
||||||
|
$(conf_notuser virtfs)
|
||||||
|
$(conf_notuser vnc)
|
||||||
|
$(conf_notuser vte)
|
||||||
|
$(conf_notuser xen)
|
||||||
|
$(conf_notuser xen xen-pci-passthrough)
|
||||||
|
$(conf_notuser xfs xfsctl)
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ ! ${buildtype} == "user" ]] ; then
|
||||||
|
# audio options
|
||||||
|
local audio_opts="oss"
|
||||||
|
use alsa && audio_opts="alsa,${audio_opts}"
|
||||||
|
use sdl && audio_opts="sdl,${audio_opts}"
|
||||||
|
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||||
|
conf_opts+=(
|
||||||
|
--audio-drv-list="${audio_opts}"
|
||||||
|
)
|
||||||
|
use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
|
||||||
|
use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
|
||||||
|
fi
|
||||||
|
|
||||||
|
case ${buildtype} in
|
||||||
|
user)
|
||||||
|
conf_opts+=(
|
||||||
|
--enable-linux-user
|
||||||
|
--disable-system
|
||||||
|
--disable-blobs
|
||||||
|
--disable-tools
|
||||||
|
)
|
||||||
|
local static_flag="static-user"
|
||||||
|
;;
|
||||||
|
softmmu)
|
||||||
|
conf_opts+=(
|
||||||
|
--disable-linux-user
|
||||||
|
--enable-system
|
||||||
|
--disable-tools
|
||||||
|
--with-system-pixman
|
||||||
|
)
|
||||||
|
local static_flag="static"
|
||||||
|
;;
|
||||||
|
tools)
|
||||||
|
conf_opts+=(
|
||||||
|
--disable-linux-user
|
||||||
|
--disable-system
|
||||||
|
--disable-blobs
|
||||||
|
--enable-tools
|
||||||
|
)
|
||||||
|
local static_flag="static"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
local targets="${buildtype}_targets"
|
||||||
|
[[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
|
||||||
|
|
||||||
|
# Add support for SystemTAP
|
||||||
|
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||||
|
|
||||||
|
# We always want to attempt to build with PIE support as it results
|
||||||
|
# in a more secure binary. But it doesn't work with static or if
|
||||||
|
# the current GCC doesn't have PIE support.
|
||||||
|
if use ${static_flag}; then
|
||||||
|
conf_opts+=( --static --disable-pie )
|
||||||
|
else
|
||||||
|
tc-enables-pie && conf_opts+=( --enable-pie )
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "../configure ${conf_opts[*]}"
|
||||||
|
cd "${builddir}"
|
||||||
|
../configure "${conf_opts[@]}" || die "configure failed"
|
||||||
|
|
||||||
|
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||||
|
# host USB devices yet
|
||||||
|
use kernel_FreeBSD && \
|
||||||
|
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local target
|
||||||
|
|
||||||
|
python_setup
|
||||||
|
|
||||||
|
softmmu_targets= softmmu_bins=()
|
||||||
|
user_targets= user_bins=()
|
||||||
|
|
||||||
|
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||||
|
if use "qemu_softmmu_targets_${target}"; then
|
||||||
|
softmmu_targets+=",${target}-softmmu"
|
||||||
|
softmmu_bins+=( "qemu-system-${target}" )
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for target in ${IUSE_USER_TARGETS} ; do
|
||||||
|
if use "qemu_user_targets_${target}"; then
|
||||||
|
user_targets+=",${target}-linux-user"
|
||||||
|
user_bins+=( "qemu-${target}" )
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
softmmu_targets=${softmmu_targets#,}
|
||||||
|
user_targets=${user_targets#,}
|
||||||
|
|
||||||
|
[[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
|
||||||
|
[[ -n ${user_targets} ]] && qemu_src_configure "user"
|
||||||
|
qemu_src_configure "tools"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
if [[ -n ${user_targets} ]]; then
|
||||||
|
cd "${S}/user-build"
|
||||||
|
default
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n ${softmmu_targets} ]]; then
|
||||||
|
cd "${S}/softmmu-build"
|
||||||
|
default
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${S}/tools-build"
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
if [[ -n ${softmmu_targets} ]]; then
|
||||||
|
cd "${S}/softmmu-build"
|
||||||
|
pax-mark m */qemu-system-* #515550
|
||||||
|
emake -j1 check
|
||||||
|
emake -j1 check-report.html
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
qemu_python_install() {
|
||||||
|
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||||
|
|
||||||
|
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||||
|
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||||
|
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Generate binfmt support files.
|
||||||
|
# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
|
||||||
|
# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
|
||||||
|
generate_initd() {
|
||||||
|
local out="${T}/qemu-binfmt"
|
||||||
|
local out_systemd="${T}/qemu.conf"
|
||||||
|
local d="${T}/binfmt.d"
|
||||||
|
|
||||||
|
einfo "Generating qemu binfmt scripts and configuration files"
|
||||||
|
|
||||||
|
# Generate the debian fragments first.
|
||||||
|
mkdir -p "${d}"
|
||||||
|
"${S}"/scripts/qemu-binfmt-conf.sh \
|
||||||
|
--debian \
|
||||||
|
--exportdir "${d}" \
|
||||||
|
--qemu-path "${EPREFIX}/usr/bin" \
|
||||||
|
|| die
|
||||||
|
# Then turn the fragments into a shell script we can source.
|
||||||
|
sed -E -i \
|
||||||
|
-e 's:^([^ ]+) (.*)$:\1="\2":' \
|
||||||
|
"${d}"/* || die
|
||||||
|
|
||||||
|
# Generate the init.d script by assembling the fragments from above.
|
||||||
|
local f qcpu package interpreter magic mask
|
||||||
|
cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die
|
||||||
|
for f in "${d}"/qemu-* ; do
|
||||||
|
source "${f}"
|
||||||
|
|
||||||
|
# Normalize the cpu logic like we do in the init.d for the native cpu.
|
||||||
|
qcpu=${package#qemu-}
|
||||||
|
case ${qcpu} in
|
||||||
|
arm*) qcpu="arm";;
|
||||||
|
mips*) qcpu="mips";;
|
||||||
|
ppc*) qcpu="ppc";;
|
||||||
|
s390*) qcpu="s390";;
|
||||||
|
sh*) qcpu="sh";;
|
||||||
|
sparc*) qcpu="sparc";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
cat <<EOF >>"${out}"
|
||||||
|
if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then
|
||||||
|
echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
|
||||||
|
|
||||||
|
done
|
||||||
|
cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
if [[ -n ${user_targets} ]]; then
|
||||||
|
cd "${S}/user-build"
|
||||||
|
emake DESTDIR="${ED}" install
|
||||||
|
|
||||||
|
# Install binfmt handler init script for user targets.
|
||||||
|
generate_initd
|
||||||
|
doinitd "${T}/qemu-binfmt"
|
||||||
|
|
||||||
|
# Install binfmt/qemu.conf.
|
||||||
|
insinto "/usr/share/qemu/binfmt.d"
|
||||||
|
doins "${T}/qemu.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n ${softmmu_targets} ]]; then
|
||||||
|
cd "${S}/softmmu-build"
|
||||||
|
emake DESTDIR="${ED}" install
|
||||||
|
|
||||||
|
# This might not exist if the test failed. #512010
|
||||||
|
[[ -e check-report.html ]] && dohtml check-report.html
|
||||||
|
|
||||||
|
if use kernel_linux; then
|
||||||
|
udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use python; then
|
||||||
|
python_foreach_impl qemu_python_install
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${S}/tools-build"
|
||||||
|
emake DESTDIR="${ED}" install
|
||||||
|
|
||||||
|
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||||
|
pushd "${ED}"/usr/bin >/dev/null
|
||||||
|
pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594
|
||||||
|
popd >/dev/null
|
||||||
|
|
||||||
|
# Install config file example for qemu-bridge-helper
|
||||||
|
insinto "/etc/qemu"
|
||||||
|
doins "${FILESDIR}/bridge.conf"
|
||||||
|
|
||||||
|
cd "${S}"
|
||||||
|
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||||
|
newdoc pc-bios/README README.pc-bios
|
||||||
|
dodoc docs/qmp-*.txt
|
||||||
|
|
||||||
|
if [[ -n ${softmmu_targets} ]]; then
|
||||||
|
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||||
|
rm "${ED}/usr/share/qemu/bios.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/bios-256k.bin"
|
||||||
|
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||||
|
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||||
|
dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove vgabios since we're using the seavgabios packaged one
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
|
||||||
|
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||||
|
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||||
|
dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
|
||||||
|
dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||||
|
dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||||
|
dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||||
|
dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin
|
||||||
|
dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove sgabios since we're using the sgabios packaged one
|
||||||
|
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||||
|
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||||
|
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove iPXE since we're using the iPXE packaged one
|
||||||
|
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||||
|
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||||
|
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||||
|
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||||
|
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||||
|
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||||
|
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||||
|
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
DISABLE_AUTOFORMATTING=true
|
||||||
|
readme.gentoo_create_doc
|
||||||
|
}
|
||||||
|
|
||||||
|
firmware_abi_change() {
|
||||||
|
local pv
|
||||||
|
for pv in ${REPLACING_VERSIONS}; do
|
||||||
|
if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||||
|
udev_reload
|
||||||
|
fi
|
||||||
|
|
||||||
|
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||||
|
|
||||||
|
DISABLE_AUTOFORMATTING=true
|
||||||
|
readme.gentoo_print_elog
|
||||||
|
|
||||||
|
if use pin-upstream-blobs && firmware_abi_change; then
|
||||||
|
ewarn "This version of qemu pins new versions of firmware blobs:"
|
||||||
|
ewarn " $(best_version sys-firmware/edk2-ovmf)"
|
||||||
|
ewarn " $(best_version sys-firmware/ipxe)"
|
||||||
|
ewarn " $(best_version sys-firmware/seabios)"
|
||||||
|
ewarn " $(best_version sys-firmware/sgabios)"
|
||||||
|
ewarn "This might break resume of hibernated guests (started with a different"
|
||||||
|
ewarn "firmware version) and live migration to/from qemu versions with different"
|
||||||
|
ewarn "firmware. Please (cold) restart all running guests. For functional"
|
||||||
|
ewarn "guest migration ensure that all"
|
||||||
|
ewarn "hosts run at least"
|
||||||
|
ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_info() {
|
||||||
|
echo "Using:"
|
||||||
|
echo " $(best_version app-emulation/spice-protocol)"
|
||||||
|
echo " $(best_version sys-firmware/edk2-ovmf)"
|
||||||
|
if has_version 'sys-firmware/edk2-ovmf[binary]'; then
|
||||||
|
echo " USE=binary"
|
||||||
|
else
|
||||||
|
echo " USE=''"
|
||||||
|
fi
|
||||||
|
echo " $(best_version sys-firmware/ipxe)"
|
||||||
|
echo " $(best_version sys-firmware/seabios)"
|
||||||
|
if has_version 'sys-firmware/seabios[binary]'; then
|
||||||
|
echo " USE=binary"
|
||||||
|
else
|
||||||
|
echo " USE=''"
|
||||||
|
fi
|
||||||
|
echo " $(best_version sys-firmware/sgabios)"
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
DIST icdiff-1.7.3.tar.gz 20215 SHA256 5161265f72a7c9c1d2d7b0780a381743ef3d3127944a96786422802a6bc14ca5 SHA512 ae8ca394c3fdf820d4795282672bc44eb01f88f9614d6240f035c31f99130b188185a0e241c3c17974d76f604b85ef48aa8296835b5dfb46463a88cb1f68d305 WHIRLPOOL 994bbc53673db6559444908b9a08e71283060648fdbc86e607b5ee229a933d13627b4e02b7b41fc25bf41021b9d86bed4d9e1b9df978922102b724e7be0a4642
|
DIST icdiff-1.7.3.tar.gz 20215 SHA256 5161265f72a7c9c1d2d7b0780a381743ef3d3127944a96786422802a6bc14ca5 SHA512 ae8ca394c3fdf820d4795282672bc44eb01f88f9614d6240f035c31f99130b188185a0e241c3c17974d76f604b85ef48aa8296835b5dfb46463a88cb1f68d305 WHIRLPOOL 994bbc53673db6559444908b9a08e71283060648fdbc86e607b5ee229a933d13627b4e02b7b41fc25bf41021b9d86bed4d9e1b9df978922102b724e7be0a4642
|
||||||
|
DIST icdiff-1.9.1.tar.gz 24387 SHA256 18cf11866150eba1ecec1370611921246918310f4b5cb101045db523a05fb37d SHA512 f73108f6f3a4a2fc40e041bbe7b5934acd76684bb54a3fa544e9f146fd3c528528928378496f53ad92d649547ccc491a77296b6fa57e4534abb13d61c0df8d58 WHIRLPOOL 6599f4fb4bd399ca89510f7a1980d86cab9443e97850f9ba77f6431a74cb4cb363b2c32d6bf7e834b55bc8ac9698177c104484656c02df6ada2d3ba85ed7f8b3
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
PYTHON_COMPAT=(python2_7 python3_4 python3_5)
|
||||||
|
|
||||||
|
inherit distutils-r1
|
||||||
|
|
||||||
|
DESCRIPTION="Colourized diff that supports side-by-side diffing"
|
||||||
|
HOMEPAGE="http://www.jefftk.com/icdiff"
|
||||||
|
SRC_URI="https://github.com/jeffkaufman/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="PSF-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
|
||||||
|
DOCS=(README.md ChangeLog)
|
||||||
|
|
||||||
|
S="${WORKDIR}/${PN}-release-${PV}"
|
||||||
|
|
||||||
|
python_test() {
|
||||||
|
./test.sh "${EPYTHON%.*}" || die "Tests failed"
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
From 1856b8c4902498843f4da37a7aaeb2ce85acc1d3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Denis <dkasak@users.noreply.github.com>
|
||||||
|
Date: Mon, 12 Sep 2016 12:49:40 +0200
|
||||||
|
Subject: [PATCH] Fix compilation error with boost 1.61
|
||||||
|
|
||||||
|
---
|
||||||
|
src/item.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/item.h b/src/item.h
|
||||||
|
index ca16d87b3..4dc6df7e6 100644
|
||||||
|
--- a/src/item.h
|
||||||
|
+++ b/src/item.h
|
||||||
|
@@ -92,7 +92,7 @@ class item_t : public supports_flags<uint_least16_t>, public scope_t
|
||||||
|
|
||||||
|
typedef std::pair<optional<value_t>, bool> tag_data_t;
|
||||||
|
typedef std::map<string, tag_data_t,
|
||||||
|
- function<bool(string, string)> > string_map;
|
||||||
|
+ std::function<bool(string, string)> > string_map;
|
||||||
|
|
||||||
|
state_t _state;
|
||||||
|
optional<date_t> _date;
|
@ -1,7 +1,4 @@
|
|||||||
DIST repoman-2.3.0-bug-586864.patch 1074 SHA256 4ad35afd9237be63c1c2c21348501499c252c4bf828a04f08ca0a129e091001d SHA512 b48112a623a4844e5783f229ee0208f729b99ab46128d19735a76633efee17deb81342b5dc8fa67f4f4f5a851509c04c8d2f2ba2cbd992a9d26e61da4ed5f7e8 WHIRLPOOL f1cb4d9a11d8958fae726642bd0d12a0bb8d6564077c09b961fa2f0448c0503132683b4199e37f7cbd5bfd01adb1eede50496ed9b2ad32572284eacd3b2cd2dc
|
DIST repoman-2.3.0-bug-586864.patch 1074 SHA256 4ad35afd9237be63c1c2c21348501499c252c4bf828a04f08ca0a129e091001d SHA512 b48112a623a4844e5783f229ee0208f729b99ab46128d19735a76633efee17deb81342b5dc8fa67f4f4f5a851509c04c8d2f2ba2cbd992a9d26e61da4ed5f7e8 WHIRLPOOL f1cb4d9a11d8958fae726642bd0d12a0bb8d6564077c09b961fa2f0448c0503132683b4199e37f7cbd5bfd01adb1eede50496ed9b2ad32572284eacd3b2cd2dc
|
||||||
DIST repoman-2.3.0.tar.bz2 75285 SHA256 e67d1a2dbb89f44e64a49259e64affcf138ade8ad0f397b93c9cbdecd517b726 SHA512 960c63caed12f7c89d374ecceb39677b62d588bf75cc8da1857641c60310061188f4c2fd7177c93a4e8f20cf00a423426f2a70666320f263158531a618a7ff9c WHIRLPOOL bff6d55a4abc5032cd3d04d8e56ec3bb7902c6877836ca4b129f5a57480c01eb6a6225b75fd0cc0b6a2a2991728896ddef3b7ee2a225a901c0523d88d99cecf6
|
DIST repoman-2.3.0.tar.bz2 75285 SHA256 e67d1a2dbb89f44e64a49259e64affcf138ade8ad0f397b93c9cbdecd517b726 SHA512 960c63caed12f7c89d374ecceb39677b62d588bf75cc8da1857641c60310061188f4c2fd7177c93a4e8f20cf00a423426f2a70666320f263158531a618a7ff9c WHIRLPOOL bff6d55a4abc5032cd3d04d8e56ec3bb7902c6877836ca4b129f5a57480c01eb6a6225b75fd0cc0b6a2a2991728896ddef3b7ee2a225a901c0523d88d99cecf6
|
||||||
DIST repoman-2.3.0_rc1.tar.bz2 74621 SHA256 e1de34b710cd43787a91ab49e0b0a6ca32d942ee130ec74523b00f3c5f4ccefa SHA512 7594053472512ab66a269acd1e5f3a9191a519df061ed65b612af0ee30f830ff71ab6b602416aa968476fec1f534ecf313317a28df6120b74c7379197b769983 WHIRLPOOL 9e00736856879f222eaa2f8330109e92b8c7d262ed5a1ef0cf0c3c36f84dfdedfea2de202043aba7585f42353e1ebaf04b16329c812d7e71f957cf697899abd0
|
|
||||||
DIST repoman-2.3.1.tar.bz2 76678 SHA256 93a39ff20eac6166ec29497ae2476cc168ea35d8822aaed33a3010fe9c2abf91 SHA512 6655027acaa6b98b7fdf927b6744e87b6ea09fe6d61653874aeb5603943aa9fc68df9435335dfc8f51d25949354660eaccdd1c8b659dbc87aea7a2f8bf3dfd16 WHIRLPOOL 29ddd58a8585a3926853beb66afe5d1a41a16667c9155b7dbc08a63ec02ea8873b304ac7267e3525341cd49c15dcc0dc01e0d0802c61a438fb75b113b7aafd66
|
|
||||||
DIST repoman-2.3.2.tar.bz2 77218 SHA256 69b6ed4fae2475f4b4faa4117498caa943ec8e9e360cd5551e819abc7315d19c SHA512 262dfa8d018b318df695003ec1f370d0d2065f50594cfc2c2ef26989409f61d43e6c0e42d279ed1e316e2a9027ca3fd6e46a06b95d80700d57e0bc3e3713cb6c WHIRLPOOL b571a759717af651737047d13dd35f122d982a73091f2c4509ff4e45301badf947ecd10668f10ef5cb865eb0b0e49133ceb4561d9872bde9bc4de7cbbd524360
|
|
||||||
DIST repoman-2.3.3.tar.bz2 78045 SHA256 8e8fdb81e3c1f0a7a1d49b161083fa39d47883b3b2bb6ff9456d23f41a75b807 SHA512 17212c19b14817a8a004619dd56ad557457d45919da45edfb27538304e68187fe1104f0b6ccc2b29fa1709645a7a82c75676b118b20d79dc790b0eb2ebf5a2ce WHIRLPOOL b4533763b06ef3e1e2e885bcc5340e05a4d8ab32d47856cbe48920066dcbdb4ce3fd867bef17eecd0caeb91e5481fefdab020e6046518145331727c9496a7a15
|
DIST repoman-2.3.3.tar.bz2 78045 SHA256 8e8fdb81e3c1f0a7a1d49b161083fa39d47883b3b2bb6ff9456d23f41a75b807 SHA512 17212c19b14817a8a004619dd56ad557457d45919da45edfb27538304e68187fe1104f0b6ccc2b29fa1709645a7a82c75676b118b20d79dc790b0eb2ebf5a2ce WHIRLPOOL b4533763b06ef3e1e2e885bcc5340e05a4d8ab32d47856cbe48920066dcbdb4ce3fd867bef17eecd0caeb91e5481fefdab020e6046518145331727c9496a7a15
|
||||||
DIST repoman-2.3.4.tar.bz2 78764 SHA256 fedfb840333ce6784fdd244ef23075b67fdf018f6c88aca459b48ae026e0e02c SHA512 1a434eea6361cc06ba3c27ccd31aa02875af1a577860490f8de666b0160370f09d1c46cea95d577163845e12c5672486b176c0009c32e735e16752d67bf4d96c WHIRLPOOL 695ccb19e820274eeb2c3d14506cc3239cc48d2ee925e6600aa311dd38f54617576d9d159fe5554323a89f18a75f83f6bf4478422607216634842185895a89a2
|
DIST repoman-2.3.4.tar.bz2 78764 SHA256 fedfb840333ce6784fdd244ef23075b67fdf018f6c88aca459b48ae026e0e02c SHA512 1a434eea6361cc06ba3c27ccd31aa02875af1a577860490f8de666b0160370f09d1c46cea95d577163845e12c5672486b176c0009c32e735e16752d67bf4d96c WHIRLPOOL 695ccb19e820274eeb2c3d14506cc3239cc48d2ee925e6600aa311dd38f54617576d9d159fe5554323a89f18a75f83f6bf4478422607216634842185895a89a2
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
|
||||||
PYTHON_REQ_USE='bzip2(+)'
|
|
||||||
|
|
||||||
inherit distutils-r1
|
|
||||||
|
|
||||||
DESCRIPTION="Repoman is a Quality Assurance tool for Gentoo ebuilds"
|
|
||||||
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
|
|
||||||
SRC_URI="https://dev.gentoo.org/~dolsen/releases/${PN}/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
!<sys-apps/portage-2.3.0_rc
|
|
||||||
>=dev-python/lxml-3.6.0[${PYTHON_USEDEP}]
|
|
||||||
"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
|
|
||||||
PATCHES=( "${FILESDIR}"/${PN}-2.3.0-bug-586864.patch )
|
|
||||||
|
|
||||||
python_prepare_all() {
|
|
||||||
distutils-r1_python_prepare_all
|
|
||||||
|
|
||||||
if [[ -n "${EPREFIX}" ]] ; then
|
|
||||||
einfo "Prefixing shebangs ..."
|
|
||||||
|
|
||||||
local file
|
|
||||||
while read -r -d $'\0' file; do
|
|
||||||
local shebang=$(head -n1 "${file}")
|
|
||||||
|
|
||||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
|
||||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "${file}" || \
|
|
||||||
die "sed failed"
|
|
||||||
fi
|
|
||||||
done < <(find . -type f -print0)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
python_test() {
|
|
||||||
esetup.py test
|
|
||||||
}
|
|
||||||
|
|
||||||
python_install() {
|
|
||||||
# Install sbin scripts to bindir for python-exec linking
|
|
||||||
# they will be relocated in pkg_preinst()
|
|
||||||
distutils-r1_python_install \
|
|
||||||
--system-prefix="${EPREFIX}/usr" \
|
|
||||||
--bindir="$(python_get_scriptdir)" \
|
|
||||||
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
|
||||||
--htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
|
|
||||||
--sbindir="$(python_get_scriptdir)" \
|
|
||||||
--sysconfdir="${EPREFIX}/etc" \
|
|
||||||
"${@}"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
einfo ""
|
|
||||||
einfo "This release of repoman is from the new portage/repoman split"
|
|
||||||
einfo "release code base."
|
|
||||||
einfo "This new repoman code base is still being developed. So its API's"
|
|
||||||
einfo "are not to be considered stable and are subject to change."
|
|
||||||
einfo "The code released has been tested and considered ready for use."
|
|
||||||
einfo "This however does not guarantee it to be completely bug free."
|
|
||||||
einfo "Please report any bugs you may encounter."
|
|
||||||
einfo ""
|
|
||||||
}
|
|
@ -1,92 +0,0 @@
|
|||||||
# Copyright 1999-2016 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
|
|
||||||
PYTHON_COMPAT=(
|
|
||||||
pypy
|
|
||||||
python3_3 python3_4 python3_5
|
|
||||||
python2_7
|
|
||||||
)
|
|
||||||
PYTHON_REQ_USE='bzip2(+)'
|
|
||||||
|
|
||||||
inherit distutils-r1 multilib
|
|
||||||
|
|
||||||
DESCRIPTION="Repoman is a Quality Assurance tool for Gentoo ebuilds"
|
|
||||||
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
|
||||||
SLOT="0"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
DEPEND="dev-lang/python-exec:2"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
dev-lang/python-exec:2
|
|
||||||
!<sys-apps/portage-2.3.0_rc
|
|
||||||
>=dev-python/lxml-3.6.0
|
|
||||||
"
|
|
||||||
|
|
||||||
SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/repoman"
|
|
||||||
|
|
||||||
prefix_src_archives() {
|
|
||||||
local x y
|
|
||||||
for x in ${@}; do
|
|
||||||
for y in ${SRC_ARCHIVES}; do
|
|
||||||
echo ${y}/${x}
|
|
||||||
done
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
TARBALL_PV=${PV}
|
|
||||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
|
||||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
|
|
||||||
|
|
||||||
python_prepare_all() {
|
|
||||||
distutils-r1_python_prepare_all
|
|
||||||
|
|
||||||
if [[ -n ${EPREFIX} ]] ; then
|
|
||||||
einfo "Prefixing shebangs ..."
|
|
||||||
while read -r -d $'\0' ; do
|
|
||||||
local shebang=$(head -n1 "$REPLY")
|
|
||||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
|
||||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
|
||||||
die "sed failed"
|
|
||||||
fi
|
|
||||||
done < <(find . -type f -print0)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
python_test() {
|
|
||||||
esetup.py test
|
|
||||||
}
|
|
||||||
|
|
||||||
python_install() {
|
|
||||||
# Install sbin scripts to bindir for python-exec linking
|
|
||||||
# they will be relocated in pkg_preinst()
|
|
||||||
distutils-r1_python_install \
|
|
||||||
--system-prefix="${EPREFIX}/usr" \
|
|
||||||
--bindir="$(python_get_scriptdir)" \
|
|
||||||
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
|
||||||
--htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
|
|
||||||
--sbindir="$(python_get_scriptdir)" \
|
|
||||||
--sysconfdir="${EPREFIX}/etc" \
|
|
||||||
"${@}"
|
|
||||||
}
|
|
||||||
|
|
||||||
python_install_all() {
|
|
||||||
distutils-r1_python_install_all
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
einfo ""
|
|
||||||
einfo "This release of repoman is from the new portage/repoman split"
|
|
||||||
einfo "release code base."
|
|
||||||
einfo "This new repoman code base is still being developed. So its API's"
|
|
||||||
einfo "are not to be considered stable and are subject to change."
|
|
||||||
einfo "The code released has been tested and considered ready for use."
|
|
||||||
einfo "This however does not guarantee it to be completely bug free."
|
|
||||||
einfo "Please report any bugs you may encounter."
|
|
||||||
einfo ""
|
|
||||||
}
|
|
@ -1,78 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
|
||||||
PYTHON_REQ_USE='bzip2(+)'
|
|
||||||
|
|
||||||
inherit distutils-r1
|
|
||||||
|
|
||||||
if [[ ${PV} == 9999 ]]; then
|
|
||||||
inherit git-r3
|
|
||||||
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage.git"
|
|
||||||
S="${WORKDIR}/${P}/repoman"
|
|
||||||
else
|
|
||||||
SRC_URI="https://dev.gentoo.org/~dolsen/releases/${PN}/${P}.tar.bz2"
|
|
||||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DESCRIPTION="Repoman is a Quality Assurance tool for Gentoo ebuilds"
|
|
||||||
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
>=sys-apps/portage-2.3.0_rc[${PYTHON_USEDEP}]
|
|
||||||
>=dev-python/lxml-3.6.0[${PYTHON_USEDEP}]
|
|
||||||
"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
|
|
||||||
python_prepare_all() {
|
|
||||||
distutils-r1_python_prepare_all
|
|
||||||
|
|
||||||
if [[ -n "${EPREFIX}" ]] ; then
|
|
||||||
einfo "Prefixing shebangs ..."
|
|
||||||
|
|
||||||
local file
|
|
||||||
while read -r -d $'\0' file; do
|
|
||||||
local shebang=$(head -n1 "${file}")
|
|
||||||
|
|
||||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
|
||||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "${file}" || \
|
|
||||||
die "sed failed"
|
|
||||||
fi
|
|
||||||
done < <(find . -type f -print0)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
python_test() {
|
|
||||||
esetup.py test
|
|
||||||
}
|
|
||||||
|
|
||||||
python_install() {
|
|
||||||
# Install sbin scripts to bindir for python-exec linking
|
|
||||||
# they will be relocated in pkg_preinst()
|
|
||||||
distutils-r1_python_install \
|
|
||||||
--system-prefix="${EPREFIX}/usr" \
|
|
||||||
--bindir="$(python_get_scriptdir)" \
|
|
||||||
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
|
||||||
--htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
|
|
||||||
--sbindir="$(python_get_scriptdir)" \
|
|
||||||
--sysconfdir="${EPREFIX}/etc" \
|
|
||||||
"${@}"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
einfo ""
|
|
||||||
einfo "This release of repoman is from the new portage/repoman split"
|
|
||||||
einfo "release code base."
|
|
||||||
einfo "This new repoman code base is still being developed. So its API's"
|
|
||||||
einfo "are not to be considered stable and are subject to change."
|
|
||||||
einfo "The code released has been tested and considered ready for use."
|
|
||||||
einfo "This however does not guarantee it to be completely bug free."
|
|
||||||
einfo "Please report any bugs you may encounter."
|
|
||||||
einfo ""
|
|
||||||
}
|
|
@ -1,78 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
|
||||||
PYTHON_REQ_USE='bzip2(+)'
|
|
||||||
|
|
||||||
inherit distutils-r1
|
|
||||||
|
|
||||||
if [[ ${PV} == 9999 ]]; then
|
|
||||||
inherit git-r3
|
|
||||||
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage.git"
|
|
||||||
S="${WORKDIR}/${P}/repoman"
|
|
||||||
else
|
|
||||||
SRC_URI="https://dev.gentoo.org/~dolsen/releases/${PN}/${P}.tar.bz2"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DESCRIPTION="Repoman is a Quality Assurance tool for Gentoo ebuilds"
|
|
||||||
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
>=sys-apps/portage-2.3.0_rc[${PYTHON_USEDEP}]
|
|
||||||
>=dev-python/lxml-3.6.0[${PYTHON_USEDEP}]
|
|
||||||
"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
|
|
||||||
python_prepare_all() {
|
|
||||||
distutils-r1_python_prepare_all
|
|
||||||
|
|
||||||
if [[ -n "${EPREFIX}" ]] ; then
|
|
||||||
einfo "Prefixing shebangs ..."
|
|
||||||
|
|
||||||
local file
|
|
||||||
while read -r -d $'\0' file; do
|
|
||||||
local shebang=$(head -n1 "${file}")
|
|
||||||
|
|
||||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
|
||||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "${file}" || \
|
|
||||||
die "sed failed"
|
|
||||||
fi
|
|
||||||
done < <(find . -type f -print0)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
python_test() {
|
|
||||||
esetup.py test
|
|
||||||
}
|
|
||||||
|
|
||||||
python_install() {
|
|
||||||
# Install sbin scripts to bindir for python-exec linking
|
|
||||||
# they will be relocated in pkg_preinst()
|
|
||||||
distutils-r1_python_install \
|
|
||||||
--system-prefix="${EPREFIX}/usr" \
|
|
||||||
--bindir="$(python_get_scriptdir)" \
|
|
||||||
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
|
||||||
--htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
|
|
||||||
--sbindir="$(python_get_scriptdir)" \
|
|
||||||
--sysconfdir="${EPREFIX}/etc" \
|
|
||||||
"${@}"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
einfo ""
|
|
||||||
einfo "This release of repoman is from the new portage/repoman split"
|
|
||||||
einfo "release code base."
|
|
||||||
einfo "This new repoman code base is still being developed. So its API's"
|
|
||||||
einfo "are not to be considered stable and are subject to change."
|
|
||||||
einfo "The code released has been tested and considered ready for use."
|
|
||||||
einfo "This however does not guarantee it to be completely bug free."
|
|
||||||
einfo "Please report any bugs you may encounter."
|
|
||||||
einfo ""
|
|
||||||
}
|
|
@ -1 +1,2 @@
|
|||||||
DIST kbibtex-0.6.2.tar.xz 3081364 SHA256 d99e419aec1d3af0a57eba6d7498de4e6be25ddbd5a5e56fc9de09e7e17dcdf3 SHA512 aa23e80cb273c0ae721ecc917f540070deea520fea2d7ca7ee97fde2c6918dba84769ad083fed93b9d0260539273c20c214b92c94269b413f46cb644d16dc270 WHIRLPOOL 4ab308a8a44df4f3e3a485a67b265ecaf28d2c4a9e4e126d5ab4b95eac12ecacdd3b49bd03f67167a358d86b8359d758e3c4cbc72bd5eed8c10873d181f7e32e
|
DIST kbibtex-0.6.2.tar.xz 3081364 SHA256 d99e419aec1d3af0a57eba6d7498de4e6be25ddbd5a5e56fc9de09e7e17dcdf3 SHA512 aa23e80cb273c0ae721ecc917f540070deea520fea2d7ca7ee97fde2c6918dba84769ad083fed93b9d0260539273c20c214b92c94269b413f46cb644d16dc270 WHIRLPOOL 4ab308a8a44df4f3e3a485a67b265ecaf28d2c4a9e4e126d5ab4b95eac12ecacdd3b49bd03f67167a358d86b8359d758e3c4cbc72bd5eed8c10873d181f7e32e
|
||||||
|
DIST kbibtex-0.8_pre20171028.tar.gz 11423361 SHA256 e7fd595ab0c9cedcb794ebd8a1050d03855a0d315ced59a649c3d9c01aa23239 SHA512 28c8eefa3e8b3e59bc7069929ea6dbf3070e755ec3b2cd0fa96d7de37337a3f6ede20c52f73406fca05b99e1ee04f07bee91b5ca2f88381c98c5ee7424de193e WHIRLPOOL 2a6fae7dc53096e615dca3751d320d51036818ffb84c1952c732021fc918715cc0643165b7fa8b3f6b8816c0488b12c3416d1b309f55e8443cf6079aead3b848
|
||||||
|
@ -0,0 +1,78 @@
|
|||||||
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
COMMIT=49764d8677e46cddee0b20e60749983b7924c79d
|
||||||
|
KDE_HANDBOOK="optional"
|
||||||
|
KDE_TEST="true"
|
||||||
|
inherit kde5 vcs-snapshot
|
||||||
|
|
||||||
|
DESCRIPTION="BibTeX editor to edit bibliographies used with LaTeX"
|
||||||
|
HOMEPAGE="https://userbase.kde.org/KBibTeX"
|
||||||
|
if [[ ${KDE_BUILD_TYPE} != live ]]; then
|
||||||
|
SRC_URI="https://github.com/KDE/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
IUSE="webengine webkit zotero"
|
||||||
|
|
||||||
|
REQUIRED_USE="?? ( webengine webkit )"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
$(add_frameworks_dep kcompletion)
|
||||||
|
$(add_frameworks_dep kconfig)
|
||||||
|
$(add_frameworks_dep kconfigwidgets)
|
||||||
|
$(add_frameworks_dep kcoreaddons)
|
||||||
|
$(add_frameworks_dep kcrash)
|
||||||
|
$(add_frameworks_dep ki18n)
|
||||||
|
$(add_frameworks_dep kiconthemes)
|
||||||
|
$(add_frameworks_dep kio)
|
||||||
|
$(add_frameworks_dep kitemviews)
|
||||||
|
$(add_frameworks_dep kjobwidgets)
|
||||||
|
$(add_frameworks_dep kparts)
|
||||||
|
$(add_frameworks_dep kservice)
|
||||||
|
$(add_frameworks_dep ktextwidgets)
|
||||||
|
$(add_frameworks_dep kwallet)
|
||||||
|
$(add_frameworks_dep kwidgetsaddons)
|
||||||
|
$(add_frameworks_dep kxmlgui)
|
||||||
|
$(add_qt_dep qtdbus)
|
||||||
|
$(add_qt_dep qtgui)
|
||||||
|
$(add_qt_dep qtnetwork)
|
||||||
|
$(add_qt_dep qtwidgets)
|
||||||
|
$(add_qt_dep qtxml)
|
||||||
|
$(add_qt_dep qtxmlpatterns)
|
||||||
|
app-text/poppler[qt5]
|
||||||
|
dev-libs/icu:=
|
||||||
|
virtual/tex-base
|
||||||
|
webengine? ( $(add_qt_dep qtwebengine 'widgets') )
|
||||||
|
webkit? ( $(add_qt_dep qtwebkit) )
|
||||||
|
zotero? (
|
||||||
|
app-crypt/qca[qt5]
|
||||||
|
dev-libs/qoauth:5
|
||||||
|
)
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}
|
||||||
|
!app-text/kbibtex:4
|
||||||
|
dev-tex/bibtex2html
|
||||||
|
x11-misc/shared-mime-info
|
||||||
|
"
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local mycmakeargs=(
|
||||||
|
$(cmake-utils_use_find_package webengine Qt5WebEngineWidgets)
|
||||||
|
$(cmake-utils_use_find_package webkit Qt5WebKitWidgets)
|
||||||
|
$(cmake-utils_use_find_package zotero Qca-qt5)
|
||||||
|
)
|
||||||
|
|
||||||
|
kde5_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
kde5_pkg_postinst
|
||||||
|
|
||||||
|
if ! has_version "kde-apps/okular:${SLOT}" ; then
|
||||||
|
elog "For PDF or PostScript document preview support, please install kde-apps/okular:${SLOT}"
|
||||||
|
fi
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
DIST master-pdf-editor-4.3.61_qt5.amd64.tar.gz 14950654 SHA256 d54ea747dc17bc5fb3020495688be529d4c8c7314b7703d171d71bc82cead5bc SHA512 0c416df191a2796fdafa6014c258166d47037039fcc9205398138a46d59b1f771d9ffe38eb16f22f4300c3e965435300037d7413a86efb997395e6e974baecb5 WHIRLPOOL 5a40bf8589abcfb9681a920cca686f160f482d330c1086a3af6bf8ce11678ff3cc362ebdb60b8e0c4bb36852d378e70ae0aa017c859689580300408def39b706
|
@ -0,0 +1,72 @@
|
|||||||
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
inherit xdg-utils eutils versionator
|
||||||
|
|
||||||
|
DESCRIPTION="Master PDF Editor is a complete solution for viewing and editing PDF files"
|
||||||
|
HOMEPAGE="https://code-industry.net/free-pdf-editor/"
|
||||||
|
|
||||||
|
SRC_URI="http://get.code-industry.net/public/${P}_qt5.amd64.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="master-pdf-editor"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
RESTRICT="mirror"
|
||||||
|
|
||||||
|
COMMON_DEPEND="
|
||||||
|
app-arch/bzip2
|
||||||
|
dev-libs/double-conversion
|
||||||
|
dev-libs/glib
|
||||||
|
dev-libs/icu
|
||||||
|
dev-libs/openssl
|
||||||
|
media-gfx/graphite2
|
||||||
|
media-gfx/sane-backends
|
||||||
|
media-libs/freetype
|
||||||
|
media-libs/harfbuzz
|
||||||
|
media-libs/libjpeg-turbo
|
||||||
|
media-libs/libpng
|
||||||
|
media-libs/tiff
|
||||||
|
x11-libs/libX11
|
||||||
|
x11-libs/libXau
|
||||||
|
x11-libs/libxcb
|
||||||
|
x11-libs/libXdmcp
|
||||||
|
x11-libs/libXext
|
||||||
|
>=dev-qt/qtsvg-5.4:5
|
||||||
|
>=dev-qt/qtnetwork-5.4:5
|
||||||
|
>=dev-qt/qtgui-5.4:5
|
||||||
|
>=dev-qt/qtprintsupport-5.4:5
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="${COMMON_DEPEND}"
|
||||||
|
|
||||||
|
S="${WORKDIR}/${PN}-$(get_major_version ${PV})"
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local dest=/opt/${PN}
|
||||||
|
local bin_name=masterpdfeditor4
|
||||||
|
|
||||||
|
insinto ${dest}
|
||||||
|
doins -r fonts lang stamps templates ${bin_name}.png
|
||||||
|
|
||||||
|
exeinto ${dest}
|
||||||
|
doexe ${bin_name}
|
||||||
|
|
||||||
|
dosym ${dest}/${bin_name} /opt/bin/${bin_name}
|
||||||
|
make_desktop_entry ${bin_name} \
|
||||||
|
"Master PDF Editor ${PV}" ${dest}/${bin_name}.png \
|
||||||
|
"Office;Graphics;Viewer" \
|
||||||
|
"MimeType=application/pdf;application/x-bzpdf;application/x-gzpdf;\nTerminal=false"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
sed -i -e \
|
||||||
|
'/^Exec=/s/masterpdfeditor4/masterpdfeditor4 %f/' \
|
||||||
|
/usr/share/applications/masterpdfeditor4-${PN}.desktop || die
|
||||||
|
xdg_desktop_database_update
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postrm() {
|
||||||
|
xdg_desktop_database_update
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>joaompssantos@gmail.com</email>
|
||||||
|
<name>Joao Santos</name>
|
||||||
|
</maintainer>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>proxy-maint@gentoo.org</email>
|
||||||
|
<name>Proxy Maintainers</name>
|
||||||
|
</maintainer>
|
||||||
|
</pkgmetadata>
|
@ -0,0 +1 @@
|
|||||||
|
DIST vim-go-1.13.zip 900566 SHA256 b4a6212becad775f90dedcb8045b04bf691f32c258c1fead68d5fbb7b775b463 SHA512 3a1818c126c6ab01cd6993336c9e87f88357375b5252e0aeed434dccd0514cbcb1b7c96dce2aaf8f8c2e21909a17bf4bbb39a386ee1f7049b50a85ed9c635817 WHIRLPOOL 0c92fe8f0f685401a9014124a0fb7341b7891dc5346b5af50124a5d2435614d11ed9d24922e0d5fe4cbfe0045ee0539769b3592ff5a0fdecf0f260a090e7b28d
|
@ -0,0 +1,22 @@
|
|||||||
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
inherit vim-plugin
|
||||||
|
|
||||||
|
DESCRIPTION="vim plugin: Go development plugin for Vim"
|
||||||
|
HOMEPAGE="https://github.com/fatih/vim-go"
|
||||||
|
SRC_URI="https://github.com/fatih/${PN}/archive/v${PV}.zip -> ${P}.zip"
|
||||||
|
LICENSE="BSD"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
|
||||||
|
VIM_PLUGIN_HELPFILES="$PN"
|
||||||
|
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# safely skip `make test` triggered by `make` as it runs `go get` commands
|
||||||
|
# TODO: see :GoInstallBinaries (https://github.com/fatih/vim-go/blob/master/doc/vim-go.txt)
|
||||||
|
:;
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright 1999-2015 Gentoo Foundation
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=5
|
EAPI=5
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright 1999-2015 Gentoo Foundation
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=5
|
EAPI=5
|
@ -1,2 +1 @@
|
|||||||
DIST batik-src-1.8.tar.gz 14970684 SHA256 0f1175146d45445fc4940e214c3e1e5cfa0294ae6a9787859bda00964f97c2bd SHA512 352843fd0cec43c6d9d54426fe1c20a9bd2234798404b101f2e8d43f6089c0bf6bb5102cb5674de11d37a0d820a8bb79fe9dd854030b23fd8c68f3931eb12f1b WHIRLPOOL fa50d1f87257c6018f99076bf759066b2311f483d424ef743e45fe17c74c646a215c1211c5431b2a522913f23ff5f53934a1606d4d4a223e8298abd6ce94bb46
|
|
||||||
DIST batik-src-1.9.tar.gz 16748072 SHA256 bef436c0b4ac9a499274a8df9a2769f42ddc6553451dac9a9514b4f55d06c6a3 SHA512 96a5c16bd3d61ea33ed5013fd0b00f1724470d9b667f0f84ef4a29dcaaa19b1cc8ffcc92dc49767f4e29d77a47f99df5afca479336ac5619778b51a6fb6cd952 WHIRLPOOL b389ec0d38e16d4619f0a1e933c357a018e0ae2a0c04900caf53f398180c5a2ca031bd8909ef50aeb2db5c12dd6981cb5d1ec466e4c5fbc0379d0c325f039b25
|
DIST batik-src-1.9.tar.gz 16748072 SHA256 bef436c0b4ac9a499274a8df9a2769f42ddc6553451dac9a9514b4f55d06c6a3 SHA512 96a5c16bd3d61ea33ed5013fd0b00f1724470d9b667f0f84ef4a29dcaaa19b1cc8ffcc92dc49767f4e29d77a47f99df5afca479336ac5619778b51a6fb6cd952 WHIRLPOOL b389ec0d38e16d4619f0a1e933c357a018e0ae2a0c04900caf53f398180c5a2ca031bd8909ef50aeb2db5c12dd6981cb5d1ec466e4c5fbc0379d0c325f039b25
|
||||||
|
@ -1,124 +0,0 @@
|
|||||||
# Copyright 1999-2016 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
JAVA_PKG_IUSE="doc"
|
|
||||||
|
|
||||||
inherit java-pkg-2 java-ant-2 eutils
|
|
||||||
|
|
||||||
DESCRIPTION="Java based SVG toolkit"
|
|
||||||
HOMEPAGE="https://xmlgraphics.apache.org/batik/"
|
|
||||||
SRC_URI="http://apache.mirrors.ovh.net/ftp.apache.org/dist/xmlgraphics/${PN}/source/${PN}-src-${PV}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
|
||||||
SLOT="1.8"
|
|
||||||
KEYWORDS="amd64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
|
|
||||||
IUSE="doc python tcl"
|
|
||||||
|
|
||||||
CDEPEND="
|
|
||||||
dev-java/xalan:0
|
|
||||||
dev-java/rhino:1.6
|
|
||||||
dev-java/xml-commons-external:1.3
|
|
||||||
dev-java/xmlgraphics-commons:2
|
|
||||||
python? (
|
|
||||||
dev-java/jython:2.7
|
|
||||||
)
|
|
||||||
tcl? (
|
|
||||||
dev-java/jacl:0
|
|
||||||
)
|
|
||||||
dev-java/ant-core:0"
|
|
||||||
|
|
||||||
DEPEND="
|
|
||||||
>=virtual/jdk-1.6
|
|
||||||
${CDEPEND}"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
>=virtual/jre-1.6
|
|
||||||
${CDEPEND}"
|
|
||||||
|
|
||||||
JAVA_ANT_REWRITE_CLASSPATH="true"
|
|
||||||
EANT_GENTOO_CLASSPATH="
|
|
||||||
xml-commons-external-1.3
|
|
||||||
xmlgraphics-commons-2
|
|
||||||
xalan
|
|
||||||
rhino-1.6
|
|
||||||
"
|
|
||||||
|
|
||||||
java_prepare() {
|
|
||||||
# bug #318323
|
|
||||||
for file in build.xml contrib/rasterizertask/build.xml; do
|
|
||||||
java-ant_xml-rewrite -f ${file} -c -e javadoc -a failonerror -v no -a maxmemory -v 512m
|
|
||||||
done
|
|
||||||
|
|
||||||
# Add some missing imports to avoid a compiling issue.
|
|
||||||
# https://bugs.gentoo.org/show_bug.cgi?id=551952
|
|
||||||
# https://issues.apache.org/jira/browse/BATIK-1123
|
|
||||||
local imports=()
|
|
||||||
imports+=(sources/org/apache/batik/script/jpython/JPythonInterpreterFactory.java)
|
|
||||||
imports+=(sources/org/apache/batik/script/jacl/JaclInterpreterFactory.java)
|
|
||||||
for import in ${imports[@]}; do
|
|
||||||
einfo "Fixing missing import in ${import}"
|
|
||||||
sed -i '23i import org.apache.batik.script.ImportInfo;' ${import} || die
|
|
||||||
eend $?
|
|
||||||
done
|
|
||||||
|
|
||||||
cd lib || die
|
|
||||||
rm -v *.jar build/*.jar || die
|
|
||||||
use python && java-pkg_jar-from jython-2.7
|
|
||||||
use tcl && java-pkg_jar-from jacl
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# Fails to build on amd64 without this
|
|
||||||
if use amd64 ; then
|
|
||||||
export ANT_OPTS="-Xmx1g"
|
|
||||||
else
|
|
||||||
export ANT_OPTS="-Xmx256m"
|
|
||||||
fi
|
|
||||||
|
|
||||||
eant jars all-jar $(use_doc)
|
|
||||||
cd contrib/rasterizertask || die
|
|
||||||
eant -Dgentoo.classpath="$(java-pkg_getjar ant-core ant.jar):../../classes" jar $(use_doc)
|
|
||||||
|
|
||||||
# batik-all-1.8.jar is a all-in-one jar that contains all other jars.
|
|
||||||
# We don't want to package it.
|
|
||||||
# No actually we do. See bug 556062.
|
|
||||||
# cd "${S}"/"${P}/lib" || die
|
|
||||||
# rm -v ${PN}-all-${PV}.jar || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
batik_unversion_jars() {
|
|
||||||
for jar in batik-*.jar; do
|
|
||||||
newj="${jar%-*}.jar"
|
|
||||||
java-pkg_newjar ${jar} ${newj}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# First unversion jars in ${P}/lib
|
|
||||||
cd "${S}"/"${P}"/lib || die
|
|
||||||
batik_unversion_jars
|
|
||||||
|
|
||||||
# Then, only those in ${P}
|
|
||||||
cd "${S}"/"${P}" || die
|
|
||||||
batik_unversion_jars
|
|
||||||
|
|
||||||
# Proceed with documentation installation
|
|
||||||
cd "${S}" || die
|
|
||||||
dodoc README CHANGES
|
|
||||||
use doc && java-pkg_dojavadoc ${P}/docs/javadoc
|
|
||||||
|
|
||||||
# pwd fixes bug #116976
|
|
||||||
java-pkg_dolauncher batik-${SLOT} --pwd "${EPREFIX}/usr/share/${PN}-${SLOT}/" \
|
|
||||||
--main org.apache.batik.apps.svgbrowser.Main
|
|
||||||
|
|
||||||
# To find these lsjar batik-${SLOT} | grep Main.class
|
|
||||||
for launcher in ttf2svg slideshow svgpp rasterizer; do
|
|
||||||
java-pkg_dolauncher batik-${launcher}-${SLOT} \
|
|
||||||
--main org.apache.batik.apps.${launcher}.Main
|
|
||||||
done
|
|
||||||
|
|
||||||
# Install and register the ant task.
|
|
||||||
java-pkg_dojar contrib/rasterizertask/build/lib/RasterizerTask.jar
|
|
||||||
java-pkg_register-ant-task
|
|
||||||
}
|
|
@ -0,0 +1,10 @@
|
|||||||
|
--- a/batik-script/src/main/java/org/apache/batik/script/jacl/JaclInterpreterFactory.java 2017-10-28 17:24:11.401276868 +0000
|
||||||
|
+++ b/batik-script/src/main/java/org/apache/batik/script/jacl/JaclInterpreterFactory.java 2017-10-28 17:27:13.314255999 +0000
|
||||||
|
@@ -20,6 +20,7 @@
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
+import org.apache.batik.script.ImportInfo;
|
||||||
|
import org.apache.batik.script.Interpreter;
|
||||||
|
import org.apache.batik.script.InterpreterFactory;
|
||||||
|
|
@ -1,191 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
JAVA_PKG_IUSE="doc examples source"
|
|
||||||
|
|
||||||
inherit eutils java-pkg-2 java-ant-2 python-utils-r1 flag-o-matic
|
|
||||||
|
|
||||||
MY_PV=${PV/_beta/-b}
|
|
||||||
MY_P=${PN}-${MY_PV}
|
|
||||||
|
|
||||||
DESCRIPTION="An implementation of Python written in Java"
|
|
||||||
HOMEPAGE="http://www.jython.org"
|
|
||||||
SRC_URI="http://search.maven.org/remotecontent?filepath=org/python/${PN}/${MY_PV}/${MY_P}-sources.jar"
|
|
||||||
|
|
||||||
LICENSE="PSF-2"
|
|
||||||
SLOT="2.7"
|
|
||||||
KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~x86-macos"
|
|
||||||
IUSE="+readline test"
|
|
||||||
REQUIRED_USE="test? ( readline )"
|
|
||||||
|
|
||||||
CDEPEND="dev-java/ant-core:0
|
|
||||||
dev-java/antlr:3
|
|
||||||
dev-java/netty-transport:0
|
|
||||||
=dev-java/asm-5.0.3:4
|
|
||||||
dev-java/commons-compress:0
|
|
||||||
dev-java/guava:13
|
|
||||||
>=dev-java/java-config-2.1.11-r3
|
|
||||||
dev-java/jffi:1.2
|
|
||||||
dev-java/jline:2
|
|
||||||
dev-java/icu4j:52
|
|
||||||
dev-java/jnr-constants:0
|
|
||||||
dev-java/jnr-posix:3.0
|
|
||||||
dev-java/jnr-netdb:1.0
|
|
||||||
dev-java/stringtemplate:0
|
|
||||||
dev-java/xerces:2
|
|
||||||
java-virtuals/script-api:0
|
|
||||||
java-virtuals/servlet-api:3.0
|
|
||||||
readline? ( >=dev-java/libreadline-java-0.8.0:0 )"
|
|
||||||
RDEPEND="${CDEPEND}
|
|
||||||
>=virtual/jre-1.7"
|
|
||||||
DEPEND="${CDEPEND}
|
|
||||||
>=virtual/jdk-1.7
|
|
||||||
app-arch/unzip
|
|
||||||
test? (
|
|
||||||
dev-java/junit:4
|
|
||||||
dev-java/ant-junit:0
|
|
||||||
)"
|
|
||||||
|
|
||||||
S=${WORKDIR}
|
|
||||||
|
|
||||||
RESTRICT="test"
|
|
||||||
|
|
||||||
JAVA_ANT_REWRITE_CLASSPATH="yes"
|
|
||||||
EANT_GENTOO_CLASSPATH="asm-4,commons-compress,guava-13,jffi-1.2,jline-2,"
|
|
||||||
EANT_GENTOO_CLASSPATH+="jnr-constants,script-api,servlet-api-3.0,"
|
|
||||||
EANT_GENTOO_CLASSPATH+="stringtemplate,xerces-2,icu4j-52,netty-transport,jnr-posix-3.0"
|
|
||||||
|
|
||||||
JAVA_ANT_CLASSPATH_TAGS+=" java"
|
|
||||||
|
|
||||||
EANT_BUILD_TARGET="developer-build"
|
|
||||||
EANT_TEST_EXTRA_ARGS="-Dpython.home=dist"
|
|
||||||
|
|
||||||
# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed.
|
|
||||||
# Uncomment and add to CDEPEND if you want either of them
|
|
||||||
#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present"
|
|
||||||
#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-2.5.2-distutils_scripts_location.patch
|
|
||||||
"${FILESDIR}"/${PN}-2.5.2-respect_PYTHONPATH.patch
|
|
||||||
"${FILESDIR}"/${PN}-2.7_beta1-ant.patch
|
|
||||||
"${FILESDIR}"/${PN}-2.7_beta1-dont-always-recompile-classes.patch
|
|
||||||
"${FILESDIR}"/${PN}-2.7_beta2-maxrepeat-import.patch
|
|
||||||
"${FILESDIR}"/${PN}-2.7.0-build.xml.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
java_prepare() {
|
|
||||||
find \( -name '*.jar' -o -name '*.class' \
|
|
||||||
-o -name '*.pyc' -o -name '*.exe' \) -delete
|
|
||||||
|
|
||||||
epatch "${PATCHES[@]}"
|
|
||||||
|
|
||||||
if ! use readline; then
|
|
||||||
rm -v src/org/python/util/ReadlineConsole.java || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# needed for launchertest
|
|
||||||
chmod +x tests/shell/test-jython.sh || die
|
|
||||||
|
|
||||||
# apparently this can cause problems
|
|
||||||
append-flags -fno-stack-protector
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
use readline && EANT_GENTOO_CLASSPATH+=",libreadline-java"
|
|
||||||
|
|
||||||
EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-3.0)"
|
|
||||||
EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)"
|
|
||||||
|
|
||||||
sed -i -e "1 a\
|
|
||||||
CLASSPATH=\"$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}\"" \
|
|
||||||
src/shell/jython || die
|
|
||||||
|
|
||||||
java-pkg-2_src_compile
|
|
||||||
}
|
|
||||||
|
|
||||||
EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4"
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
java-pkg-2_src_test
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local instdir=/usr/share/${PN}-${SLOT}
|
|
||||||
|
|
||||||
java-pkg_newjar dist/${PN}-dev.jar
|
|
||||||
|
|
||||||
java-pkg_register-optional-dependency jdbc-mysql
|
|
||||||
java-pkg_register-optional-dependency jdbc-postgresql
|
|
||||||
|
|
||||||
insinto ${instdir}
|
|
||||||
doins -r dist/{Lib,registry}
|
|
||||||
|
|
||||||
dodoc ACKNOWLEDGMENTS NEWS README.txt
|
|
||||||
|
|
||||||
use doc && java-pkg_dohtml -r dist/Doc/javadoc
|
|
||||||
use source && java-pkg_dosrc src/*
|
|
||||||
use examples && java-pkg_doexamples Demo/*
|
|
||||||
|
|
||||||
local java_args=(
|
|
||||||
-Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT}
|
|
||||||
-Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT}
|
|
||||||
-Dpython.cachedir="\${HOME}/.jythoncachedir"
|
|
||||||
)
|
|
||||||
|
|
||||||
java-pkg_dolauncher jython${SLOT} \
|
|
||||||
--main org.python.util.jython \
|
|
||||||
--java_args "${java_args[*]}"
|
|
||||||
|
|
||||||
if use readline; then
|
|
||||||
sed \
|
|
||||||
-e "s/#\(python.console=org.python.util.ReadlineConsole\)/\1/" \
|
|
||||||
-e "/#python.console.readlinelib=JavaReadline/a python.console.readlinelib=GnuReadline" \
|
|
||||||
-i "${ED}"/usr/share/${PN}-${SLOT}/registry || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# we need a wrapper to help python_optimize
|
|
||||||
cat <<-EOF > "${T}"/jython
|
|
||||||
exec java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \
|
|
||||||
-Dpython.home="${ED}${instdir}" \
|
|
||||||
-Dpython.cachedir="${T}/.jythoncachedir" \
|
|
||||||
-Duser.home="${T}" \
|
|
||||||
org.python.util.jython "\${@}"
|
|
||||||
EOF
|
|
||||||
chmod +x "${T}"/jython || die
|
|
||||||
|
|
||||||
local -x PYTHON="${T}"/jython
|
|
||||||
# we can't get the path from the interpreter since it does some
|
|
||||||
# magic that fails on non-installed copy...
|
|
||||||
local PYTHON_SITEDIR=${EPREFIX}/usr/share/jython-${SLOT}/Lib/site-packages
|
|
||||||
python_export jython${SLOT} EPYTHON
|
|
||||||
|
|
||||||
# compile tests (everything else is compiled already)
|
|
||||||
# we're keeping it quiet since jython reports errors verbosely
|
|
||||||
# and some of the tests are supposed to trigger compile errors
|
|
||||||
python_optimize "${ED}${instdir}"/Lib/test &>/dev/null
|
|
||||||
|
|
||||||
# for python-exec
|
|
||||||
echo "EPYTHON='${EPYTHON}'" > epython.py || die
|
|
||||||
python_domodule epython.py
|
|
||||||
|
|
||||||
# some of the class files end up with newer timestamps than the files they
|
|
||||||
# were generated from, make sure this doesn't happen
|
|
||||||
find "${ED}${instdir}"/Lib/ -name '*.class' | xargs touch
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
if ! has_version dev-java/jython ; then
|
|
||||||
elog
|
|
||||||
elog "readline can be configured in the registry:"
|
|
||||||
elog
|
|
||||||
elog "python.console=org.python.util.ReadlineConsole"
|
|
||||||
elog "python.console.readlinelib=GnuReadline"
|
|
||||||
elog
|
|
||||||
elog "Global registry: '${EROOT}usr/share/${PN}-${SLOT}/registry'"
|
|
||||||
elog "User registry: '~/.jython'"
|
|
||||||
elog "See http://www.jython.org/docs/registry.html for more information."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
}
|
|
@ -0,0 +1,28 @@
|
|||||||
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
JAVA_PKG_IUSE="doc source"
|
||||||
|
|
||||||
|
inherit java-pkg-2 java-pkg-simple
|
||||||
|
|
||||||
|
DESCRIPTION="XP is an XML 1.0 parser written in Java"
|
||||||
|
HOMEPAGE="http://www.jclark.com/xml/xp"
|
||||||
|
SRC_URI="ftp://ftp.jclark.com/pub/xml/${PN}.zip -> ${P}.zip"
|
||||||
|
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
|
||||||
|
RDEPEND=">=virtual/jre-1.6"
|
||||||
|
DEPEND=">=virtual/jdk-1.6"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${P}-fix-jdk-1.7-enum.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
java-pkg_clean
|
||||||
|
}
|
@ -0,0 +1,227 @@
|
|||||||
|
# Copyright 1999-2017 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
export CBUILD=${CBUILD:-${CHOST}}
|
||||||
|
export CTARGET=${CTARGET:-${CHOST}}
|
||||||
|
|
||||||
|
MY_PV=${PV/_/}
|
||||||
|
|
||||||
|
inherit toolchain-funcs
|
||||||
|
|
||||||
|
BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
|
||||||
|
BOOTSTRAP_VERSION="bootstrap-1.8"
|
||||||
|
BOOTSTRAP_URI="
|
||||||
|
amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz )
|
||||||
|
arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz )
|
||||||
|
arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz )
|
||||||
|
ppc64? (
|
||||||
|
${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
|
||||||
|
${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
|
||||||
|
)
|
||||||
|
s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz )
|
||||||
|
x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz )
|
||||||
|
amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz )
|
||||||
|
x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz )
|
||||||
|
x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz )
|
||||||
|
x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz )
|
||||||
|
"
|
||||||
|
|
||||||
|
case ${PV} in
|
||||||
|
*9999*)
|
||||||
|
EGIT_REPO_URI="https://github.com/golang/go.git"
|
||||||
|
inherit git-r3
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
|
||||||
|
S="${WORKDIR}"/go
|
||||||
|
case ${PV} in
|
||||||
|
*_beta*|*_rc*) ;;
|
||||||
|
*)
|
||||||
|
KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
|
||||||
|
# The upstream tests fail under portage but pass if the build is
|
||||||
|
# run according to their documentation [1].
|
||||||
|
# I am restricting the tests on released versions until this is
|
||||||
|
# solved.
|
||||||
|
# [1] https://golang.org/issues/18442
|
||||||
|
RESTRICT="test"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
esac
|
||||||
|
SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
|
||||||
|
|
||||||
|
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
|
||||||
|
HOMEPAGE="https://golang.org"
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
SLOT="0/${PV}"
|
||||||
|
IUSE="gccgo"
|
||||||
|
|
||||||
|
DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
|
||||||
|
RDEPEND="!<dev-go/go-tools-0_pre20150902"
|
||||||
|
|
||||||
|
# These test data objects have writable/executable stacks.
|
||||||
|
QA_EXECSTACK="
|
||||||
|
usr/lib/go/src/debug/elf/testdata/*.obj
|
||||||
|
usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox
|
||||||
|
usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox
|
||||||
|
"
|
||||||
|
|
||||||
|
# Do not complain about CFLAGS, etc, since Go doesn't use them.
|
||||||
|
QA_FLAGS_IGNORED='.*'
|
||||||
|
|
||||||
|
REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
|
||||||
|
|
||||||
|
# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
|
||||||
|
QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
|
||||||
|
|
||||||
|
# Do not strip this package. Stripping is unsupported upstream and may
|
||||||
|
# fail.
|
||||||
|
RESTRICT+=" strip"
|
||||||
|
|
||||||
|
DOCS=(
|
||||||
|
AUTHORS
|
||||||
|
CONTRIBUTING.md
|
||||||
|
CONTRIBUTORS
|
||||||
|
PATENTS
|
||||||
|
README.md
|
||||||
|
)
|
||||||
|
|
||||||
|
go_arch()
|
||||||
|
{
|
||||||
|
# By chance most portage arch names match Go
|
||||||
|
local portage_arch=$(tc-arch $@)
|
||||||
|
case "${portage_arch}" in
|
||||||
|
x86) echo 386;;
|
||||||
|
x64-*) echo amd64;;
|
||||||
|
ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
|
||||||
|
s390) echo s390x ;;
|
||||||
|
*) echo "${portage_arch}";;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
go_arm()
|
||||||
|
{
|
||||||
|
case "${1:-${CHOST}}" in
|
||||||
|
armv5*) echo 5;;
|
||||||
|
armv6*) echo 6;;
|
||||||
|
armv7*) echo 7;;
|
||||||
|
*)
|
||||||
|
die "unknown GOARM for ${1:-${CHOST}}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
go_os()
|
||||||
|
{
|
||||||
|
case "${1:-${CHOST}}" in
|
||||||
|
*-linux*) echo linux;;
|
||||||
|
*-darwin*) echo darwin;;
|
||||||
|
*-freebsd*) echo freebsd;;
|
||||||
|
*-netbsd*) echo netbsd;;
|
||||||
|
*-openbsd*) echo openbsd;;
|
||||||
|
*-solaris*) echo solaris;;
|
||||||
|
*-cygwin*|*-interix*|*-winnt*)
|
||||||
|
echo windows
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown GOOS for ${1:-${CHOST}}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
go_tuple()
|
||||||
|
{
|
||||||
|
echo "$(go_os $@)_$(go_arch $@)"
|
||||||
|
}
|
||||||
|
|
||||||
|
go_cross_compile()
|
||||||
|
{
|
||||||
|
[[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_pretend()
|
||||||
|
{
|
||||||
|
# make.bash does not understand cross-compiling a cross-compiler
|
||||||
|
if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
|
||||||
|
die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_unpack()
|
||||||
|
{
|
||||||
|
if [[ ${PV} = 9999 ]]; then
|
||||||
|
git-r3_src_unpack
|
||||||
|
fi
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile()
|
||||||
|
{
|
||||||
|
export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
|
||||||
|
if use gccgo; then
|
||||||
|
mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
|
||||||
|
local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
|
||||||
|
[[ -x ${go_binary} ]] || go_binary=$(
|
||||||
|
find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
|
||||||
|
sort -V | tail -n1)
|
||||||
|
[[ -x ${go_binary} ]] ||
|
||||||
|
die "go-$(gcc-major-version): command not found"
|
||||||
|
ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
|
||||||
|
fi
|
||||||
|
export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
|
||||||
|
export GOROOT="$(pwd)"
|
||||||
|
export GOBIN="${GOROOT}/bin"
|
||||||
|
|
||||||
|
# Go's build script does not use BUILD/HOST/TARGET consistently. :(
|
||||||
|
export GOHOSTARCH=$(go_arch ${CBUILD})
|
||||||
|
export GOHOSTOS=$(go_os ${CBUILD})
|
||||||
|
export CC=$(tc-getBUILD_CC)
|
||||||
|
|
||||||
|
export GOARCH=$(go_arch)
|
||||||
|
export GOOS=$(go_os)
|
||||||
|
export CC_FOR_TARGET=$(tc-getCC)
|
||||||
|
export CXX_FOR_TARGET=$(tc-getCXX)
|
||||||
|
if [[ ${ARCH} == arm ]]; then
|
||||||
|
export GOARM=$(go_arm)
|
||||||
|
fi
|
||||||
|
einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}"
|
||||||
|
|
||||||
|
cd src
|
||||||
|
./make.bash || die "build failed"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test()
|
||||||
|
{
|
||||||
|
go_cross_compile && return 0
|
||||||
|
|
||||||
|
cd src
|
||||||
|
PATH="${GOBIN}:${PATH}" \
|
||||||
|
./run.bash -no-rebuild || die "tests failed"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install()
|
||||||
|
{
|
||||||
|
local bin_path f x
|
||||||
|
|
||||||
|
dodir /usr/lib/go
|
||||||
|
|
||||||
|
# There is a known issue which requires the source tree to be installed [1].
|
||||||
|
# Once this is fixed, we can consider using the doc use flag to control
|
||||||
|
# installing the doc and src directories.
|
||||||
|
# [1] https://golang.org/issue/2775
|
||||||
|
#
|
||||||
|
# deliberately use cp to retain permissions
|
||||||
|
cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
|
||||||
|
if go_cross_compile; then
|
||||||
|
bin_path="bin/$(go_tuple)"
|
||||||
|
else
|
||||||
|
bin_path=bin
|
||||||
|
fi
|
||||||
|
for x in ${bin_path}/*; do
|
||||||
|
f=${x##*/}
|
||||||
|
dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
|
||||||
|
done
|
||||||
|
einstalldocs
|
||||||
|
}
|
@ -1,8 +1,6 @@
|
|||||||
DIST php-5.6.31.tar.xz 12461268 SHA256 c464af61240a9b7729fabe0314cdbdd5a000a4f0c9bd201f89f8628732fe4ae4 SHA512 b5d3bc306167c851460036aa21194a2f74a50a26aa5c46159394bddbff94e4a418b557d68d5e1315672b3571b13a231ef7810d5346f57c0094acfe29c2e70495 WHIRLPOOL 2cd74a9cfe82b9363b4fbad37b13a8f7cc9571d2493a95b52cdaeeafe2d04255a29b31792dce2db0c41696539ed6b203446a2a6a8ea0319d82066fe9622bfcb9
|
DIST php-5.6.31.tar.xz 12461268 SHA256 c464af61240a9b7729fabe0314cdbdd5a000a4f0c9bd201f89f8628732fe4ae4 SHA512 b5d3bc306167c851460036aa21194a2f74a50a26aa5c46159394bddbff94e4a418b557d68d5e1315672b3571b13a231ef7810d5346f57c0094acfe29c2e70495 WHIRLPOOL 2cd74a9cfe82b9363b4fbad37b13a8f7cc9571d2493a95b52cdaeeafe2d04255a29b31792dce2db0c41696539ed6b203446a2a6a8ea0319d82066fe9622bfcb9
|
||||||
|
DIST php-5.6.32.tar.xz 12464512 SHA256 8c2b4f721c7475fb9eabda2495209e91ea933082e6f34299d11cba88cd76e64b SHA512 f0556a23f2a2711cda25dd25e63996c9315e7da13555a7169ee701406454e4d372ffca82476b4a474a96b2f3d3b783f6827042df71bb245514884d7c3d23530b WHIRLPOOL eae1a493ddb2c01166fb2364d31248f0d68eadb53aa0802cec336833ee7d76f30c161ae36d0984f5b9386a3e1ace33c0d8bc02153d0c0da49a7a2d5f489b8624
|
||||||
DIST php-7.0.23.tar.xz 11953100 SHA256 8e526e3551a58e00c8055fa4a72804aa1bd3ee1c0411b25bf1504cc4992609df SHA512 62201592fca88fb1c302badf7e73e5d417e9a062300e0d32fdfcb346d300cd86bf957b880a73795037a332fe148b64589bb15204bdd6b0ddcbbddc5a12e6d042 WHIRLPOOL 5d6131b5d7701b01c1aa849c6b5e3b133b4276999354eccecf847675552eb0be79a68cd0a10595c64bda2594489d3699868b4ed9a1fe3c5cdcc4fda45be32493
|
DIST php-7.0.23.tar.xz 11953100 SHA256 8e526e3551a58e00c8055fa4a72804aa1bd3ee1c0411b25bf1504cc4992609df SHA512 62201592fca88fb1c302badf7e73e5d417e9a062300e0d32fdfcb346d300cd86bf957b880a73795037a332fe148b64589bb15204bdd6b0ddcbbddc5a12e6d042 WHIRLPOOL 5d6131b5d7701b01c1aa849c6b5e3b133b4276999354eccecf847675552eb0be79a68cd0a10595c64bda2594489d3699868b4ed9a1fe3c5cdcc4fda45be32493
|
||||||
DIST php-7.0.24.tar.xz 11959232 SHA256 4dba7aa365193c9229f89f1975fad4c01135d29922a338ffb4a27e840d6f1c98 SHA512 7ae7795ff89924adc5f989bcf438a372684c7fc041ec10db96369f12faaeb90a23e7a7b5253f2a1022059f7464e6c11ee46a164a7f873b0b44a5317c3a3a49e7 WHIRLPOOL c5d8cdc684738610f520df0f46042625cfa0a5530e84e4c813493f755f03656f8ba71de630769f6381b9b729feb161b06eae7d44dcf21f79bec67fd5b9c23c26
|
|
||||||
DIST php-7.0.25.tar.xz 11963668 SHA256 5cc14bd20fb2226f6d34465662425cd100441bde9042ea1cef2e4506d6ded8cc SHA512 7a31fe48f3843a5380a7ab7b04ba2006e739f96d314b662beb337a8e76fbb2f3c1e1e22a8c9d5209bad61deb0ccc21706f0dedd12d15766f7795497549b4cae4 WHIRLPOOL 3998e5d6dcded72feb38ffdfd3c1e0b467151f5b9c0ff111ab4b6a90e2ad29a4a4929641f7af1c983b9a5df0a8a2d54af17d2eeb82a9b7efe8e6cbb199334440
|
DIST php-7.0.25.tar.xz 11963668 SHA256 5cc14bd20fb2226f6d34465662425cd100441bde9042ea1cef2e4506d6ded8cc SHA512 7a31fe48f3843a5380a7ab7b04ba2006e739f96d314b662beb337a8e76fbb2f3c1e1e22a8c9d5209bad61deb0ccc21706f0dedd12d15766f7795497549b4cae4 WHIRLPOOL 3998e5d6dcded72feb38ffdfd3c1e0b467151f5b9c0ff111ab4b6a90e2ad29a4a4929641f7af1c983b9a5df0a8a2d54af17d2eeb82a9b7efe8e6cbb199334440
|
||||||
DIST php-7.1.10.tar.xz 12166036 SHA256 2b8efa771a2ead0bb3ae67b530ca505b5b286adc873cca9ce97a6e1d6815c50b SHA512 64f03d7a8928283e2f4f0958168610780553765ac20cf558cd6452ba4474461e74366c41b9bfdaf08b25195ca9c0059a94b77f06d8de3512d251cb2a84113d30 WHIRLPOOL 9ec9b6a93e95f23b15c8816de0384b62297ae06cec9b4c8cabeef8ecbefcd7c14b751c7310fa13a1326028a61c4f7206b5c0ce3388e0b40e44fffa0de6129721
|
DIST php-7.1.11.tar.xz 12169884 SHA256 074093e9d7d21afedc5106904218a80a47b854abe368d2728ed22184c884893e SHA512 400bc75d938f49754586d2b14b8f300c5a1e961489c02c968c7560ea0edc3765992580306c6185ecee57734775f8abaf7525a2aaa5110db2d8efacf2701c0101 WHIRLPOOL 8d5414b31838e10524a34facbab9a6e749d84f03752c2ec5a2d82f3dcab2b6e804d691101610398a136c68e1002eb6a9294d818166eecebb706d7f7d343f9620
|
||||||
DIST php-7.1.9.tar.xz 12157172 SHA256 ec9ca348dd51f19a84dc5d33acfff1fba1f977300604bdac08ed46ae2c281e8c SHA512 feefaae7edda115c9c10d6a07a9d897343ca972e4e5ec327f383cb28f204ac10956653fc120f0474901e59f32f105dc1a7afe64d49a3ea8bf486377837618013 WHIRLPOOL 5179ca1adddb099a3d8dccc009a96202f6d69edeea3126a5f861498475f36413f0a17a6a501b1b0eadba3acfb4ff262a8a5a7ee324043f03d74e857d1dc7c6a8
|
DIST php-7.2.0RC5.tar.xz 12074000 SHA256 92a745048912beb3f6c2a3c188ce695a51852c67201fdf9a21dafe59f51aecc1 SHA512 c78bf3b05658ddd053cf8bd696f22bea4c0d1f94659e3821aed5fbd73cea9b953ca2c1b565e99e60034fbe4a98764cd596ee67cc0108d73f8adc0bb889899f3a WHIRLPOOL a851ca6d57b88bbf8a0838c697accce6679640fbc3ec44d25b64a14daa53c399c11d5636c2cf032ce96b99b6cf48b1cc81cf15022c0618919abc201f885329f6
|
||||||
DIST php-7.2.0RC2.tar.xz 12051048 SHA256 0406366fcd5be4ee5e76e3c6a4279e04f93a1827a44d27c4f57fbed9e01cd281 SHA512 aa7e3632381677db995a72dcf0276a3be0d40c32138743a225d8e41e791a6fe00859e27ed7699be90e3843d3eb4da90af6a31aab65dc790c402863d09f409a48 WHIRLPOOL fc8c39b8b4a6184fa8e460dd91b0afbb62c5321effd5c5227eb276adb46857acf05e0fa5749279b0f26fe2c08d9f8001f0132507ab778dd1f7df7237da74b623
|
|
||||||
DIST php-7.2.0RC3.tar.xz 11973876 SHA256 abe0a237f94837854f2cfd9c7dc99fbca2c817ae1d6194a514f29b463db36853 SHA512 a33e72e458e7e9fef59db5c147da9efdbd6d2987610216d99fd6c8bb25927153573614bdf3ca3b4e3278c5e6657fbd30665e3a895448afb0d6951af65e8e5b55 WHIRLPOOL 128ff4e663dfca3ad60c7ba2fa789a394a607ae6e93bb1e2b371972179c5fcecf13504cab0f6ec20bbf08c4040a6bfba8388bed9f60ddbc226dd9b9c241e555f
|
|
||||||
|
@ -1,721 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit flag-o-matic versionator systemd
|
|
||||||
|
|
||||||
DESCRIPTION="The PHP language runtime engine"
|
|
||||||
HOMEPAGE="http://php.net/"
|
|
||||||
SRC_URI="http://php.net/distributions/${P}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="PHP-3.01
|
|
||||||
BSD
|
|
||||||
Zend-2.0
|
|
||||||
bcmath? ( LGPL-2.1+ )
|
|
||||||
fpm? ( BSD-2 )
|
|
||||||
gd? ( gd )
|
|
||||||
unicode? ( BSD-2 LGPL-2.1 )"
|
|
||||||
|
|
||||||
SLOT="$(get_version_component_range 1-2)"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
|
||||||
|
|
||||||
# We can build the following SAPIs in the given order
|
|
||||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
|
||||||
|
|
||||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
|
||||||
IUSE="${IUSE}
|
|
||||||
${SAPIS/cli/+cli}
|
|
||||||
threads"
|
|
||||||
|
|
||||||
IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
|
|
||||||
coverage crypt +ctype curl debug
|
|
||||||
enchant exif +fileinfo +filter firebird
|
|
||||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
|
||||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
|
|
||||||
mhash mssql mysql mysqli nls
|
|
||||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
|
||||||
readline recode selinux +session sharedmem
|
|
||||||
+simplexml snmp soap sockets spell sqlite ssl
|
|
||||||
sysvipc systemd test tidy +tokenizer truetype unicode wddx webp
|
|
||||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
|
||||||
|
|
||||||
# The supported (that is, autodetected) versions of BDB are listed in
|
|
||||||
# the ./configure script. Other versions *work*, but we need to stick to
|
|
||||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
|
||||||
COMMON_DEPEND="
|
|
||||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
|
||||||
>=dev-libs/libpcre-8.32[unicode]
|
|
||||||
acl? ( sys-apps/acl )
|
|
||||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
|
||||||
<www-servers/apache-2.4[threads=] ) )
|
|
||||||
berkdb? ( || ( sys-libs/db:5.3
|
|
||||||
sys-libs/db:5.1
|
|
||||||
sys-libs/db:4.8
|
|
||||||
sys-libs/db:4.7
|
|
||||||
sys-libs/db:4.6
|
|
||||||
sys-libs/db:4.5 ) )
|
|
||||||
bzip2? ( app-arch/bzip2 )
|
|
||||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
|
||||||
coverage? ( dev-util/lcov )
|
|
||||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
|
||||||
curl? ( >=net-misc/curl-7.10.5 )
|
|
||||||
enchant? ( app-text/enchant )
|
|
||||||
firebird? ( dev-db/firebird )
|
|
||||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
|
||||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
|
||||||
gmp? ( dev-libs/gmp:0 )
|
|
||||||
iconv? ( virtual/libiconv )
|
|
||||||
imap? ( virtual/imap-c-client[kerberos=,ssl=] )
|
|
||||||
intl? ( dev-libs/icu:= )
|
|
||||||
iodbc? ( dev-db/libiodbc )
|
|
||||||
kerberos? ( virtual/krb5 )
|
|
||||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
|
||||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
|
||||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
|
||||||
mssql? ( dev-db/freetds[mssql] )
|
|
||||||
nls? ( sys-devel/gettext )
|
|
||||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
|
||||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
|
||||||
postgres? ( dev-db/postgresql:* )
|
|
||||||
qdbm? ( dev-db/qdbm )
|
|
||||||
readline? ( sys-libs/readline:0= )
|
|
||||||
recode? ( app-text/recode )
|
|
||||||
sharedmem? ( dev-libs/mm )
|
|
||||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
|
||||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
spell? ( >=app-text/aspell-0.50 )
|
|
||||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( dev-libs/openssl:0 )
|
|
||||||
libressl? ( dev-libs/libressl )
|
|
||||||
)
|
|
||||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
|
||||||
truetype? ( =media-libs/freetype-2* )
|
|
||||||
unicode? ( dev-libs/oniguruma:= )
|
|
||||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
webp? ( media-libs/libwebp )
|
|
||||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
|
||||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
xpm? ( x11-libs/libXpm )
|
|
||||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
|
||||||
zip? ( sys-libs/zlib )
|
|
||||||
zlib? ( sys-libs/zlib )
|
|
||||||
"
|
|
||||||
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
virtual/mta
|
|
||||||
fpm? (
|
|
||||||
selinux? ( sec-policy/selinux-phpfpm )
|
|
||||||
systemd? ( sys-apps/systemd ) )"
|
|
||||||
|
|
||||||
# Bison isn't actually needed when building from a release tarball
|
|
||||||
# However, the configure script will warn if it's absent or if you
|
|
||||||
# have an incompatible version installed. See bug 593278.
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
app-arch/xz-utils
|
|
||||||
>=sys-devel/bison-3.0.1"
|
|
||||||
|
|
||||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
|
||||||
REQUIRED_USE="
|
|
||||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
|
||||||
cli? ( ^^ ( readline libedit ) )
|
|
||||||
truetype? ( gd )
|
|
||||||
webp? ( gd )
|
|
||||||
cjk? ( gd )
|
|
||||||
exif? ( gd )
|
|
||||||
xpm? ( gd )
|
|
||||||
gd? ( zlib )
|
|
||||||
simplexml? ( xml )
|
|
||||||
soap? ( xml )
|
|
||||||
wddx? ( xml )
|
|
||||||
xmlrpc? ( || ( xml iconv ) )
|
|
||||||
xmlreader? ( xml )
|
|
||||||
xslt? ( xml )
|
|
||||||
ldap-sasl? ( ldap )
|
|
||||||
mhash? ( hash )
|
|
||||||
phar? ( hash )
|
|
||||||
qdbm? ( !gdbm )
|
|
||||||
readline? ( !libedit )
|
|
||||||
recode? ( !imap !mysqli !mysql )
|
|
||||||
sharedmem? ( !threads )
|
|
||||||
mysql? ( || ( mysqli pdo ) )
|
|
||||||
"
|
|
||||||
|
|
||||||
PHP_MV="$(get_major_version)"
|
|
||||||
|
|
||||||
php_install_ini() {
|
|
||||||
local phpsapi="${1}"
|
|
||||||
|
|
||||||
# work out where we are installing the ini file
|
|
||||||
php_set_ini_dir "${phpsapi}"
|
|
||||||
|
|
||||||
# Always install the production INI file, bug 611214.
|
|
||||||
local phpinisrc="php.ini-production-${phpsapi}"
|
|
||||||
cp php.ini-production "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# default to /tmp for save_path, bug #282768
|
|
||||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# Set the extension dir
|
|
||||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
|
|
||||||
-i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# Set the include path to point to where we want to find PEAR packages
|
|
||||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
newins "${phpinisrc}" php.ini
|
|
||||||
|
|
||||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
elog
|
|
||||||
|
|
||||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
|
||||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
|
||||||
|
|
||||||
if use opcache; then
|
|
||||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
|
||||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
|
||||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
|
||||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
|
|
||||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# SAPI-specific handling
|
|
||||||
if [[ "${sapi}" == "fpm" ]] ; then
|
|
||||||
einfo "Installing FPM config files php-fpm.conf and www.conf"
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
doins sapi/fpm/php-fpm.conf
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
|
||||||
doins sapi/fpm/www.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
dodoc php.ini-{development,production}
|
|
||||||
}
|
|
||||||
|
|
||||||
php_set_ini_dir() {
|
|
||||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
|
||||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
|
||||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# In php-7.x, the FPM pool configuration files have been split off
|
|
||||||
# of the main config. By default the pool config files go in
|
|
||||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
|
||||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
|
||||||
# we'll install the pool configuration file "www.conf" there.
|
|
||||||
php_set_ini_dir fpm
|
|
||||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
|
||||||
sapi/fpm/php-fpm.conf.in \
|
|
||||||
|| die 'failed to move the include directory in php-fpm.conf'
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
addpredict /usr/share/snmp/mibs/.index
|
|
||||||
addpredict /var/lib/net-snmp/mib_indexes
|
|
||||||
|
|
||||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
|
||||||
|
|
||||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
|
||||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
|
||||||
local our_conf=(
|
|
||||||
--prefix="${PHP_DESTDIR}"
|
|
||||||
--mandir="${PHP_DESTDIR}/man"
|
|
||||||
--infodir="${PHP_DESTDIR}/info"
|
|
||||||
--libdir="${PHP_DESTDIR}/lib"
|
|
||||||
--with-libdir="$(get_libdir)"
|
|
||||||
--localstatedir="${EPREFIX}/var"
|
|
||||||
--without-pear
|
|
||||||
$(use_enable threads maintainer-zts)
|
|
||||||
)
|
|
||||||
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with acl fpm-acl)
|
|
||||||
$(use_enable bcmath bcmath)
|
|
||||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
|
||||||
$(use_enable calendar calendar)
|
|
||||||
$(use_enable coverage gcov)
|
|
||||||
$(use_enable ctype ctype)
|
|
||||||
$(use_with curl curl "${EPREFIX}/usr")
|
|
||||||
$(use_enable xml dom)
|
|
||||||
$(use_with enchant enchant "${EPREFIX}/usr")
|
|
||||||
$(use_enable exif exif)
|
|
||||||
$(use_enable fileinfo fileinfo)
|
|
||||||
$(use_enable filter filter)
|
|
||||||
$(use_enable ftp ftp)
|
|
||||||
$(use_with nls gettext "${EPREFIX}/usr")
|
|
||||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
|
||||||
$(use_enable hash hash)
|
|
||||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
|
||||||
$(use_with iconv iconv \
|
|
||||||
$(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
|
|
||||||
$(use_enable intl intl)
|
|
||||||
$(use_enable ipv6 ipv6)
|
|
||||||
$(use_enable json json)
|
|
||||||
$(use_with kerberos kerberos "${EPREFIX}/usr")
|
|
||||||
$(use_enable xml libxml)
|
|
||||||
$(use_with xml libxml-dir "${EPREFIX}/usr")
|
|
||||||
$(use_enable unicode mbstring)
|
|
||||||
$(use_with crypt mcrypt "${EPREFIX}/usr")
|
|
||||||
$(use_with unicode onig "${EPREFIX}/usr")
|
|
||||||
$(use_with ssl openssl "${EPREFIX}/usr")
|
|
||||||
$(use_with ssl openssl-dir "${EPREFIX}/usr")
|
|
||||||
$(use_enable pcntl pcntl)
|
|
||||||
$(use_enable phar phar)
|
|
||||||
$(use_enable pdo pdo)
|
|
||||||
$(use_enable opcache opcache)
|
|
||||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
|
||||||
$(use_enable posix posix)
|
|
||||||
$(use_with spell pspell "${EPREFIX}/usr")
|
|
||||||
$(use_with recode recode "${EPREFIX}/usr")
|
|
||||||
$(use_enable simplexml simplexml)
|
|
||||||
$(use_enable sharedmem shmop)
|
|
||||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
|
||||||
$(use_enable soap soap)
|
|
||||||
$(use_enable sockets sockets)
|
|
||||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
|
||||||
$(use_enable sysvipc sysvmsg)
|
|
||||||
$(use_enable sysvipc sysvsem)
|
|
||||||
$(use_enable sysvipc sysvshm)
|
|
||||||
$(use_with systemd fpm-systemd)
|
|
||||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
|
||||||
$(use_enable tokenizer tokenizer)
|
|
||||||
$(use_enable wddx wddx)
|
|
||||||
$(use_enable xml xml)
|
|
||||||
$(use_enable xmlreader xmlreader)
|
|
||||||
$(use_enable xmlwriter xmlwriter)
|
|
||||||
$(use_with xmlrpc xmlrpc)
|
|
||||||
$(use_with xslt xsl "${EPREFIX}/usr")
|
|
||||||
$(use_enable zip zip)
|
|
||||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
|
||||||
$(use_enable debug debug)
|
|
||||||
)
|
|
||||||
|
|
||||||
# DBA support
|
|
||||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
|
||||||
|| use qdbm ; then
|
|
||||||
our_conf+=( "--enable-dba${shared}" )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# DBA drivers support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with cdb cdb)
|
|
||||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
|
||||||
$(use_enable flatfile flatfile)
|
|
||||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
|
||||||
$(use_enable inifile inifile)
|
|
||||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Support for the GD graphics library
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with truetype freetype-dir "${EPREFIX}/usr")
|
|
||||||
$(use_enable cjk gd-jis-conv)
|
|
||||||
$(use_with gd jpeg-dir "${EPREFIX}/usr")
|
|
||||||
$(use_with gd png-dir "${EPREFIX}/usr")
|
|
||||||
$(use_with xpm xpm-dir "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
if use webp; then
|
|
||||||
our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
|
|
||||||
fi
|
|
||||||
# enable gd last, so configure can pick up the previous settings
|
|
||||||
our_conf+=( $(use_with gd gd) )
|
|
||||||
|
|
||||||
# IMAP support
|
|
||||||
if use imap ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with imap imap "${EPREFIX}/usr")
|
|
||||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Interbase/firebird support
|
|
||||||
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
|
||||||
|
|
||||||
# LDAP support
|
|
||||||
if use ldap ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
|
||||||
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# MySQL support
|
|
||||||
local mysqllib="mysqlnd"
|
|
||||||
local mysqlilib="mysqlnd"
|
|
||||||
|
|
||||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
|
||||||
|
|
||||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
|
||||||
if use mysql || use mysqli ; then
|
|
||||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ODBC support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
|
||||||
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Oracle support
|
|
||||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
|
||||||
|
|
||||||
# PDO support
|
|
||||||
if use pdo ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with mssql pdo-dblib "${EPREFIX}/usr")
|
|
||||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
|
||||||
$(use_with postgres pdo-pgsql)
|
|
||||||
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
|
|
||||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
|
||||||
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
|
||||||
$(use_with oci8-instant-client pdo-oci)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# readline/libedit support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with readline readline "${EPREFIX}/usr")
|
|
||||||
$(use_with libedit libedit "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Session support
|
|
||||||
if use session ; then
|
|
||||||
our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
|
|
||||||
else
|
|
||||||
our_conf+=( $(use_enable session session) )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use pic for shared modules such as apache2's mod_php
|
|
||||||
our_conf+=( --with-pic )
|
|
||||||
|
|
||||||
# we use the system copy of pcre
|
|
||||||
# --with-pcre-regex affects ext/pcre
|
|
||||||
# --with-pcre-dir affects ext/filter and ext/zip
|
|
||||||
our_conf+=(
|
|
||||||
--with-pcre-regex="${EPREFIX}/usr"
|
|
||||||
--with-pcre-dir="${EPREFIX}/usr"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Catch CFLAGS problems
|
|
||||||
# Fixes bug #14067.
|
|
||||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
|
||||||
replace-cpu-flags "k6*" "i586"
|
|
||||||
|
|
||||||
# Cache the ./configure test results between SAPIs.
|
|
||||||
our_conf+=( --cache-file="${T}/config.cache" )
|
|
||||||
|
|
||||||
# Support user-passed configuration parameters
|
|
||||||
our_conf+=( ${EXTRA_ECONF:-} )
|
|
||||||
|
|
||||||
# Support the Apache2 extras, they must be set globally for all
|
|
||||||
# SAPIs to work correctly, especially for external PHP extensions
|
|
||||||
|
|
||||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
|
||||||
for one_sapi in $SAPIS ; do
|
|
||||||
use "${one_sapi}" || continue
|
|
||||||
php_set_ini_dir "${one_sapi}"
|
|
||||||
|
|
||||||
# The BUILD_DIR variable is used to determine where to output
|
|
||||||
# the files that autotools creates. This was all originally
|
|
||||||
# based on the autotools-utils eclass.
|
|
||||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
|
||||||
cp -a "${S}" "${BUILD_DIR}" || die
|
|
||||||
cd "${BUILD_DIR}" || die
|
|
||||||
|
|
||||||
local sapi_conf=(
|
|
||||||
--with-config-file-path="${PHP_INI_DIR}"
|
|
||||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
|
||||||
)
|
|
||||||
|
|
||||||
for sapi in $SAPIS ; do
|
|
||||||
case "$sapi" in
|
|
||||||
cli|cgi|embed|fpm|phpdbg)
|
|
||||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=( "--enable-${sapi}" )
|
|
||||||
else
|
|
||||||
sapi_conf+=( "--disable-${sapi}" )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
apache2)
|
|
||||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
|
|
||||||
else
|
|
||||||
sapi_conf+=( --without-apxs2 )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Construct the $myeconfargs array by concatenating $our_conf
|
|
||||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
|
||||||
local myeconfargs=( "${our_conf[@]}" )
|
|
||||||
myeconfargs+=( "${sapi_conf[@]}" )
|
|
||||||
|
|
||||||
pushd "${BUILD_DIR}" > /dev/null || die
|
|
||||||
econf "${myeconfargs[@]}"
|
|
||||||
popd > /dev/null || die
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# snmp seems to run during src_compile, too (bug #324739)
|
|
||||||
addpredict /usr/share/snmp/mibs/.index
|
|
||||||
addpredict /var/lib/net-snmp/mib_indexes
|
|
||||||
|
|
||||||
for sapi in ${SAPIS} ; do
|
|
||||||
if use "${sapi}"; then
|
|
||||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
|
||||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
|
||||||
emake
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# see bug #324739 for what happens when we don't have that
|
|
||||||
addpredict /usr/share/snmp/mibs/.index
|
|
||||||
|
|
||||||
# grab the first SAPI that got built and install common files from there
|
|
||||||
local first_sapi=""
|
|
||||||
for sapi in $SAPIS ; do
|
|
||||||
if use $sapi ; then
|
|
||||||
first_sapi=$sapi
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Makefile forgets to create this before trying to write to it...
|
|
||||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
|
||||||
|
|
||||||
# Install php environment (without any sapis)
|
|
||||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
|
||||||
emake INSTALL_ROOT="${D}" \
|
|
||||||
install-build install-headers install-programs
|
|
||||||
|
|
||||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
|
||||||
|
|
||||||
# Create the directory where we'll put version-specific php scripts
|
|
||||||
keepdir "/usr/share/php${PHP_MV}"
|
|
||||||
|
|
||||||
local sapi="", file=""
|
|
||||||
local sapi_list=""
|
|
||||||
|
|
||||||
for sapi in ${SAPIS}; do
|
|
||||||
if use "${sapi}" ; then
|
|
||||||
einfo "Installing SAPI: ${sapi}"
|
|
||||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
|
||||||
|
|
||||||
if [[ "${sapi}" == "apache2" ]] ; then
|
|
||||||
# We're specifically not using emake install-sapi as libtool
|
|
||||||
# may cause unnecessary relink failures (see bug #351266)
|
|
||||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
|
||||||
newins ".libs/libphp${PHP_MV}$(get_libname)" \
|
|
||||||
"libphp${PHP_MV}$(get_libname)"
|
|
||||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
|
||||||
else
|
|
||||||
# needed each time, php_install_ini would reset it
|
|
||||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
|
||||||
into "${dest}"
|
|
||||||
case "$sapi" in
|
|
||||||
cli)
|
|
||||||
source="sapi/cli/php"
|
|
||||||
;;
|
|
||||||
cgi)
|
|
||||||
source="sapi/cgi/php-cgi"
|
|
||||||
;;
|
|
||||||
fpm)
|
|
||||||
source="sapi/fpm/php-fpm"
|
|
||||||
;;
|
|
||||||
embed)
|
|
||||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
|
||||||
;;
|
|
||||||
phpdbg)
|
|
||||||
source="sapi/phpdbg/phpdbg"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "unhandled sapi in src_install"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
|
||||||
dolib.so "${source}"
|
|
||||||
else
|
|
||||||
dobin "${source}"
|
|
||||||
local name="$(basename ${source})"
|
|
||||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
php_install_ini "${sapi}"
|
|
||||||
|
|
||||||
# construct correct SAPI string for php-config
|
|
||||||
# thanks to ferringb for the bash voodoo
|
|
||||||
if [[ "${sapi}" == "apache2" ]]; then
|
|
||||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
|
||||||
else
|
|
||||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Installing opcache module
|
|
||||||
if use opcache ; then
|
|
||||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
|
||||||
dolib.so "modules/opcache$(get_libname)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install env.d files
|
|
||||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
|
||||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
|
||||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
|
||||||
|
|
||||||
# set php-config variable correctly (bug #278439)
|
|
||||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
|
||||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
|
||||||
|
|
||||||
if use fpm ; then
|
|
||||||
if use systemd; then
|
|
||||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
|
||||||
"php-fpm@${SLOT}.service"
|
|
||||||
else
|
|
||||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
|
||||||
"php-fpm@${SLOT}.service"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
|
||||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
|
||||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
|
||||||
ewarn "Test phase requires USE=cli, skipping"
|
|
||||||
return
|
|
||||||
else
|
|
||||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
|
||||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
|
||||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
|
||||||
"session.save_path=${T}" \
|
|
||||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
|
||||||
"session.save_path=${T}"
|
|
||||||
|
|
||||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
|
||||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
|
||||||
done
|
|
||||||
|
|
||||||
local failed="$(find -name '*.out')"
|
|
||||||
if [[ ${failed} != "" ]] ; then
|
|
||||||
ewarn "The following test cases failed unexpectedly:"
|
|
||||||
for name in ${failed}; do
|
|
||||||
ewarn " ${name/.out/}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "No unexpected test failures, all fine"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
|
||||||
local passed=""
|
|
||||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
|
||||||
[[ -f "${name}.diff" ]] && continue
|
|
||||||
passed="${passed} ${name}"
|
|
||||||
done
|
|
||||||
if [[ ${passed} != "" ]] ; then
|
|
||||||
einfo "The following test cases passed unexpectedly:"
|
|
||||||
for name in ${passed}; do
|
|
||||||
ewarn " ${passed}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "None of the known-to-fail tests passed, all fine"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
# Output some general info to the user
|
|
||||||
if use apache2 ; then
|
|
||||||
elog
|
|
||||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
|
||||||
elog "your apache2 command. OpenRC users can append that string to"
|
|
||||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
|
||||||
elog
|
|
||||||
elog "The apache module configuration file 70_mod_php.conf is"
|
|
||||||
elog "provided (and maintained) by eselect-php."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create the symlinks for php
|
|
||||||
for m in ${SAPIS}; do
|
|
||||||
[[ ${m} == 'embed' ]] && continue;
|
|
||||||
if use $m ; then
|
|
||||||
local ci=$(eselect php show $m)
|
|
||||||
if [[ -z $ci ]]; then
|
|
||||||
eselect php set $m php${SLOT} || die
|
|
||||||
einfo "Switched ${m} to use php:${SLOT}"
|
|
||||||
einfo
|
|
||||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
|
||||||
elog "To switch $m to use php:${SLOT}, run"
|
|
||||||
elog " eselect php set $m php${SLOT}"
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
|
||||||
# example, if the user has the cgi SAPI enabled, then he has an
|
|
||||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
|
||||||
# USE="-cgi", that symlink will break. This call to eselect is
|
|
||||||
# supposed to remove that dead link per bug 572436.
|
|
||||||
eselect php cleanup || die
|
|
||||||
|
|
||||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
|
||||||
elog "To build extensions for this version of PHP, you will need to"
|
|
||||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
|
||||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
|
||||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
|
||||||
ewarn 'remove it from your configuration at your convenience. See'
|
|
||||||
ewarn
|
|
||||||
ewarn ' https://bugs.gentoo.org/611214'
|
|
||||||
ewarn
|
|
||||||
ewarn 'for more information.'
|
|
||||||
fi
|
|
||||||
|
|
||||||
elog "For details on how version slotting works, please see"
|
|
||||||
elog "the wiki:"
|
|
||||||
elog
|
|
||||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
|
||||||
elog
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
# This serves two purposes. First, if we have just removed the last
|
|
||||||
# installed version of PHP, then this will remove any dead symlinks
|
|
||||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
|
||||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
|
||||||
# his existing symlinks to point to the new 7.0 installation. The
|
|
||||||
# latter is bug 432962.
|
|
||||||
#
|
|
||||||
# Note: the eselect-php package may not be installed at this point,
|
|
||||||
# so we can't die() if this command fails.
|
|
||||||
eselect php cleanup
|
|
||||||
}
|
|
@ -1,734 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit flag-o-matic versionator systemd
|
|
||||||
|
|
||||||
DESCRIPTION="The PHP language runtime engine"
|
|
||||||
HOMEPAGE="http://php.net/"
|
|
||||||
SRC_URI="https://downloads.php.net/~remi/php-7.2.0RC3.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="PHP-3.01
|
|
||||||
BSD
|
|
||||||
Zend-2.0
|
|
||||||
bcmath? ( LGPL-2.1+ )
|
|
||||||
fpm? ( BSD-2 )
|
|
||||||
gd? ( gd )
|
|
||||||
unicode? ( BSD-2 LGPL-2.1 )"
|
|
||||||
|
|
||||||
SLOT="$(get_version_component_range 1-2)"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
|
||||||
|
|
||||||
S="${WORKDIR}/php-7.2.0RC3"
|
|
||||||
# We can build the following SAPIs in the given order
|
|
||||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
|
||||||
|
|
||||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
|
||||||
IUSE="${IUSE}
|
|
||||||
${SAPIS/cli/+cli}
|
|
||||||
threads"
|
|
||||||
|
|
||||||
IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
|
|
||||||
coverage +ctype curl debug
|
|
||||||
enchant exif +fileinfo +filter firebird
|
|
||||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
|
||||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
|
|
||||||
mhash mssql mysql mysqli nls
|
|
||||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
|
||||||
readline recode selinux +session sharedmem
|
|
||||||
+simplexml snmp soap sockets sodium spell sqlite ssl
|
|
||||||
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
|
|
||||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
|
|
||||||
|
|
||||||
# The supported (that is, autodetected) versions of BDB are listed in
|
|
||||||
# the ./configure script. Other versions *work*, but we need to stick to
|
|
||||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
|
||||||
COMMON_DEPEND="
|
|
||||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
|
||||||
>=dev-libs/libpcre-8.32[unicode]
|
|
||||||
acl? ( sys-apps/acl )
|
|
||||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
|
||||||
<www-servers/apache-2.4[threads=] ) )
|
|
||||||
argon2? ( app-crypt/argon2 )
|
|
||||||
berkdb? ( || ( sys-libs/db:5.3
|
|
||||||
sys-libs/db:5.1
|
|
||||||
sys-libs/db:4.8
|
|
||||||
sys-libs/db:4.7
|
|
||||||
sys-libs/db:4.6
|
|
||||||
sys-libs/db:4.5 ) )
|
|
||||||
bzip2? ( app-arch/bzip2 )
|
|
||||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
|
||||||
coverage? ( dev-util/lcov )
|
|
||||||
curl? ( >=net-misc/curl-7.10.5 )
|
|
||||||
enchant? ( app-text/enchant )
|
|
||||||
firebird? ( dev-db/firebird )
|
|
||||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
|
||||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
|
||||||
gmp? ( dev-libs/gmp:0 )
|
|
||||||
iconv? ( virtual/libiconv )
|
|
||||||
imap? ( virtual/imap-c-client[kerberos=,ssl=] )
|
|
||||||
intl? ( dev-libs/icu:= )
|
|
||||||
iodbc? ( dev-db/libiodbc )
|
|
||||||
kerberos? ( virtual/krb5 )
|
|
||||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
|
||||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
|
||||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
|
||||||
lmdb? ( dev-db/lmdb:= )
|
|
||||||
mssql? ( dev-db/freetds[mssql] )
|
|
||||||
nls? ( sys-devel/gettext )
|
|
||||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
|
||||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
|
||||||
postgres? ( dev-db/postgresql:* )
|
|
||||||
qdbm? ( dev-db/qdbm )
|
|
||||||
readline? ( sys-libs/readline:0= )
|
|
||||||
recode? ( app-text/recode )
|
|
||||||
sharedmem? ( dev-libs/mm )
|
|
||||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
|
||||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
sodium? ( dev-libs/libsodium:= )
|
|
||||||
spell? ( >=app-text/aspell-0.50 )
|
|
||||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( dev-libs/openssl:0 )
|
|
||||||
libressl? ( dev-libs/libressl )
|
|
||||||
)
|
|
||||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
|
||||||
tokyocabinet? ( dev-db/tokyocabinet )
|
|
||||||
truetype? ( =media-libs/freetype-2* )
|
|
||||||
unicode? ( dev-libs/oniguruma:= )
|
|
||||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
webp? ( media-libs/libwebp )
|
|
||||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
|
||||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
|
||||||
xpm? ( x11-libs/libXpm )
|
|
||||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
|
||||||
zip? ( sys-libs/zlib )
|
|
||||||
zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
|
|
||||||
zlib? ( sys-libs/zlib )
|
|
||||||
"
|
|
||||||
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
virtual/mta
|
|
||||||
fpm? (
|
|
||||||
selinux? ( sec-policy/selinux-phpfpm )
|
|
||||||
systemd? ( sys-apps/systemd ) )"
|
|
||||||
|
|
||||||
# Bison isn't actually needed when building from a release tarball
|
|
||||||
# However, the configure script will warn if it's absent or if you
|
|
||||||
# have an incompatible version installed. See bug 593278.
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
app-arch/xz-utils
|
|
||||||
>=sys-devel/bison-3.0.1"
|
|
||||||
|
|
||||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
|
||||||
REQUIRED_USE="
|
|
||||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
|
||||||
cli? ( ^^ ( readline libedit ) )
|
|
||||||
truetype? ( gd )
|
|
||||||
webp? ( gd )
|
|
||||||
cjk? ( gd )
|
|
||||||
exif? ( gd )
|
|
||||||
xpm? ( gd )
|
|
||||||
gd? ( zlib )
|
|
||||||
simplexml? ( xml )
|
|
||||||
soap? ( xml )
|
|
||||||
wddx? ( xml )
|
|
||||||
xmlrpc? ( || ( xml iconv ) )
|
|
||||||
xmlreader? ( xml )
|
|
||||||
xslt? ( xml )
|
|
||||||
ldap-sasl? ( ldap )
|
|
||||||
mhash? ( hash )
|
|
||||||
phar? ( hash )
|
|
||||||
qdbm? ( !gdbm )
|
|
||||||
readline? ( !libedit )
|
|
||||||
recode? ( !imap !mysqli !mysql )
|
|
||||||
sharedmem? ( !threads )
|
|
||||||
mysql? ( || ( mysqli pdo ) )
|
|
||||||
zip-encryption? ( zip )
|
|
||||||
"
|
|
||||||
|
|
||||||
PHP_MV="$(get_major_version)"
|
|
||||||
|
|
||||||
php_install_ini() {
|
|
||||||
local phpsapi="${1}"
|
|
||||||
|
|
||||||
# work out where we are installing the ini file
|
|
||||||
php_set_ini_dir "${phpsapi}"
|
|
||||||
|
|
||||||
# Always install the production INI file, bug 611214.
|
|
||||||
local phpinisrc="php.ini-production-${phpsapi}"
|
|
||||||
cp php.ini-production "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# default to /tmp for save_path, bug #282768
|
|
||||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# Set the extension dir
|
|
||||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
|
|
||||||
-i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# Set the include path to point to where we want to find PEAR packages
|
|
||||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
newins "${phpinisrc}" php.ini
|
|
||||||
|
|
||||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
elog
|
|
||||||
|
|
||||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
|
||||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
|
||||||
|
|
||||||
if use opcache; then
|
|
||||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
|
||||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
|
||||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
|
||||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
|
|
||||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# SAPI-specific handling
|
|
||||||
if [[ "${sapi}" == "fpm" ]] ; then
|
|
||||||
einfo "Installing FPM config files php-fpm.conf and www.conf"
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
doins sapi/fpm/php-fpm.conf
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
|
||||||
doins sapi/fpm/www.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
dodoc php.ini-{development,production}
|
|
||||||
}
|
|
||||||
|
|
||||||
php_set_ini_dir() {
|
|
||||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
|
||||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
|
||||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# In php-7.x, the FPM pool configuration files have been split off
|
|
||||||
# of the main config. By default the pool config files go in
|
|
||||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
|
||||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
|
||||||
# we'll install the pool configuration file "www.conf" there.
|
|
||||||
php_set_ini_dir fpm
|
|
||||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
|
||||||
sapi/fpm/php-fpm.conf.in \
|
|
||||||
|| die 'failed to move the include directory in php-fpm.conf'
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
addpredict /usr/share/snmp/mibs/.index
|
|
||||||
addpredict /var/lib/net-snmp/mib_indexes
|
|
||||||
|
|
||||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
|
||||||
|
|
||||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
|
||||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
|
||||||
local our_conf=(
|
|
||||||
--prefix="${PHP_DESTDIR}"
|
|
||||||
--mandir="${PHP_DESTDIR}/man"
|
|
||||||
--infodir="${PHP_DESTDIR}/info"
|
|
||||||
--libdir="${PHP_DESTDIR}/lib"
|
|
||||||
--with-libdir="$(get_libdir)"
|
|
||||||
--localstatedir="${EPREFIX}/var"
|
|
||||||
--without-pear
|
|
||||||
$(use_enable threads maintainer-zts)
|
|
||||||
)
|
|
||||||
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with acl fpm-acl)
|
|
||||||
$(use_with argon2 password-argon2 "${EPREFIX}/usr")
|
|
||||||
$(use_enable bcmath bcmath)
|
|
||||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
|
||||||
$(use_enable calendar calendar)
|
|
||||||
$(use_enable coverage gcov)
|
|
||||||
$(use_enable ctype ctype)
|
|
||||||
$(use_with curl curl "${EPREFIX}/usr")
|
|
||||||
$(use_enable xml dom)
|
|
||||||
$(use_with enchant enchant "${EPREFIX}/usr")
|
|
||||||
$(use_enable exif exif)
|
|
||||||
$(use_enable fileinfo fileinfo)
|
|
||||||
$(use_enable filter filter)
|
|
||||||
$(use_enable ftp ftp)
|
|
||||||
$(use_with nls gettext "${EPREFIX}/usr")
|
|
||||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
|
||||||
$(use_enable hash hash)
|
|
||||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
|
||||||
$(use_with iconv iconv \
|
|
||||||
$(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
|
|
||||||
$(use_enable intl intl)
|
|
||||||
$(use_enable ipv6 ipv6)
|
|
||||||
$(use_enable json json)
|
|
||||||
$(use_with kerberos kerberos "${EPREFIX}/usr")
|
|
||||||
$(use_enable xml libxml)
|
|
||||||
$(use_with xml libxml-dir "${EPREFIX}/usr")
|
|
||||||
$(use_enable unicode mbstring)
|
|
||||||
$(use_with unicode onig "${EPREFIX}/usr")
|
|
||||||
$(use_with ssl openssl "${EPREFIX}/usr")
|
|
||||||
$(use_with ssl openssl-dir "${EPREFIX}/usr")
|
|
||||||
$(use_enable pcntl pcntl)
|
|
||||||
$(use_enable phar phar)
|
|
||||||
$(use_enable pdo pdo)
|
|
||||||
$(use_enable opcache opcache)
|
|
||||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
|
||||||
$(use_enable posix posix)
|
|
||||||
$(use_with spell pspell "${EPREFIX}/usr")
|
|
||||||
$(use_with recode recode "${EPREFIX}/usr")
|
|
||||||
$(use_enable simplexml simplexml)
|
|
||||||
$(use_enable sharedmem shmop)
|
|
||||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
|
||||||
$(use_enable soap soap)
|
|
||||||
$(use_enable sockets sockets)
|
|
||||||
$(use_with sodium sodium "${EPREFIX}/usr")
|
|
||||||
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
|
||||||
$(use_enable sysvipc sysvmsg)
|
|
||||||
$(use_enable sysvipc sysvsem)
|
|
||||||
$(use_enable sysvipc sysvshm)
|
|
||||||
$(use_with systemd fpm-systemd)
|
|
||||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
|
||||||
$(use_enable tokenizer tokenizer)
|
|
||||||
$(use_enable wddx wddx)
|
|
||||||
$(use_enable xml xml)
|
|
||||||
$(use_enable xmlreader xmlreader)
|
|
||||||
$(use_enable xmlwriter xmlwriter)
|
|
||||||
$(use_with xmlrpc xmlrpc)
|
|
||||||
$(use_with xslt xsl "${EPREFIX}/usr")
|
|
||||||
$(use_enable zip zip)
|
|
||||||
$(use_with zip-encryption libzip "${EPREFIX}/usr")
|
|
||||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
|
||||||
$(use_enable debug debug)
|
|
||||||
)
|
|
||||||
|
|
||||||
# DBA support
|
|
||||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
|
||||||
|| use qdbm || use lmdb || use tokyocabinet ; then
|
|
||||||
our_conf+=( "--enable-dba${shared}" )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# DBA drivers support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with cdb cdb)
|
|
||||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
|
||||||
$(use_enable flatfile flatfile)
|
|
||||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
|
||||||
$(use_enable inifile inifile)
|
|
||||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
|
||||||
$(use_with lmdb lmdb "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Support for the GD graphics library
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with truetype freetype-dir "${EPREFIX}/usr")
|
|
||||||
$(use_enable cjk gd-jis-conv)
|
|
||||||
$(use_with gd jpeg-dir "${EPREFIX}/usr")
|
|
||||||
$(use_with gd png-dir "${EPREFIX}/usr")
|
|
||||||
$(use_with xpm xpm-dir "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
if use webp; then
|
|
||||||
our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
|
|
||||||
fi
|
|
||||||
# enable gd last, so configure can pick up the previous settings
|
|
||||||
our_conf+=( $(use_with gd gd) )
|
|
||||||
|
|
||||||
# IMAP support
|
|
||||||
if use imap ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with imap imap "${EPREFIX}/usr")
|
|
||||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Interbase/firebird support
|
|
||||||
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
|
||||||
|
|
||||||
# LDAP support
|
|
||||||
if use ldap ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
|
||||||
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# MySQL support
|
|
||||||
local mysqllib="mysqlnd"
|
|
||||||
local mysqlilib="mysqlnd"
|
|
||||||
|
|
||||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
|
||||||
|
|
||||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
|
||||||
if use mysql || use mysqli ; then
|
|
||||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ODBC support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
|
||||||
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Oracle support
|
|
||||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
|
||||||
|
|
||||||
# PDO support
|
|
||||||
if use pdo ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with mssql pdo-dblib "${EPREFIX}/usr")
|
|
||||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
|
||||||
$(use_with postgres pdo-pgsql)
|
|
||||||
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
|
|
||||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
|
||||||
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
|
||||||
$(use_with oci8-instant-client pdo-oci)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# readline/libedit support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with readline readline "${EPREFIX}/usr")
|
|
||||||
$(use_with libedit libedit "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Session support
|
|
||||||
if use session ; then
|
|
||||||
our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
|
|
||||||
else
|
|
||||||
our_conf+=( $(use_enable session session) )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use pic for shared modules such as apache2's mod_php
|
|
||||||
our_conf+=( --with-pic )
|
|
||||||
|
|
||||||
# we use the system copy of pcre
|
|
||||||
# --with-pcre-regex affects ext/pcre
|
|
||||||
# --with-pcre-dir affects ext/filter and ext/zip
|
|
||||||
# --with-pcre-valgrind cannot be enabled with system pcre
|
|
||||||
# Many arches don't support pcre-jit
|
|
||||||
our_conf+=(
|
|
||||||
--with-pcre-regex="${EPREFIX}/usr"
|
|
||||||
--with-pcre-dir="${EPREFIX}/usr"
|
|
||||||
--without-pcre-valgrind
|
|
||||||
--without-pcre-jit
|
|
||||||
)
|
|
||||||
|
|
||||||
# Catch CFLAGS problems
|
|
||||||
# Fixes bug #14067.
|
|
||||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
|
||||||
replace-cpu-flags "k6*" "i586"
|
|
||||||
|
|
||||||
# Cache the ./configure test results between SAPIs.
|
|
||||||
our_conf+=( --cache-file="${T}/config.cache" )
|
|
||||||
|
|
||||||
# Support user-passed configuration parameters
|
|
||||||
our_conf+=( ${EXTRA_ECONF:-} )
|
|
||||||
|
|
||||||
# Support the Apache2 extras, they must be set globally for all
|
|
||||||
# SAPIs to work correctly, especially for external PHP extensions
|
|
||||||
|
|
||||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
|
||||||
for one_sapi in $SAPIS ; do
|
|
||||||
use "${one_sapi}" || continue
|
|
||||||
php_set_ini_dir "${one_sapi}"
|
|
||||||
|
|
||||||
# The BUILD_DIR variable is used to determine where to output
|
|
||||||
# the files that autotools creates. This was all originally
|
|
||||||
# based on the autotools-utils eclass.
|
|
||||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
|
||||||
cp -a "${S}" "${BUILD_DIR}" || die
|
|
||||||
cd "${BUILD_DIR}" || die
|
|
||||||
|
|
||||||
local sapi_conf=(
|
|
||||||
--with-config-file-path="${PHP_INI_DIR}"
|
|
||||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
|
||||||
)
|
|
||||||
|
|
||||||
for sapi in $SAPIS ; do
|
|
||||||
case "$sapi" in
|
|
||||||
cli|cgi|embed|fpm|phpdbg)
|
|
||||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=( "--enable-${sapi}" )
|
|
||||||
else
|
|
||||||
sapi_conf+=( "--disable-${sapi}" )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
apache2)
|
|
||||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
|
|
||||||
else
|
|
||||||
sapi_conf+=( --without-apxs2 )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Construct the $myeconfargs array by concatenating $our_conf
|
|
||||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
|
||||||
local myeconfargs=( "${our_conf[@]}" )
|
|
||||||
myeconfargs+=( "${sapi_conf[@]}" )
|
|
||||||
|
|
||||||
pushd "${BUILD_DIR}" > /dev/null || die
|
|
||||||
econf "${myeconfargs[@]}"
|
|
||||||
popd > /dev/null || die
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# snmp seems to run during src_compile, too (bug #324739)
|
|
||||||
addpredict /usr/share/snmp/mibs/.index
|
|
||||||
addpredict /var/lib/net-snmp/mib_indexes
|
|
||||||
|
|
||||||
for sapi in ${SAPIS} ; do
|
|
||||||
if use "${sapi}"; then
|
|
||||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
|
||||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
|
||||||
emake
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# see bug #324739 for what happens when we don't have that
|
|
||||||
addpredict /usr/share/snmp/mibs/.index
|
|
||||||
|
|
||||||
# grab the first SAPI that got built and install common files from there
|
|
||||||
local first_sapi=""
|
|
||||||
for sapi in $SAPIS ; do
|
|
||||||
if use $sapi ; then
|
|
||||||
first_sapi=$sapi
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Makefile forgets to create this before trying to write to it...
|
|
||||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
|
||||||
|
|
||||||
# Install php environment (without any sapis)
|
|
||||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
|
||||||
emake INSTALL_ROOT="${D}" \
|
|
||||||
install-build install-headers install-programs
|
|
||||||
|
|
||||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
|
||||||
|
|
||||||
# Create the directory where we'll put version-specific php scripts
|
|
||||||
keepdir "/usr/share/php${PHP_MV}"
|
|
||||||
|
|
||||||
local sapi="", file=""
|
|
||||||
local sapi_list=""
|
|
||||||
|
|
||||||
for sapi in ${SAPIS}; do
|
|
||||||
if use "${sapi}" ; then
|
|
||||||
einfo "Installing SAPI: ${sapi}"
|
|
||||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
|
||||||
|
|
||||||
if [[ "${sapi}" == "apache2" ]] ; then
|
|
||||||
# We're specifically not using emake install-sapi as libtool
|
|
||||||
# may cause unnecessary relink failures (see bug #351266)
|
|
||||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
|
||||||
newins ".libs/libphp${PHP_MV}$(get_libname)" \
|
|
||||||
"libphp${PHP_MV}$(get_libname)"
|
|
||||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
|
||||||
else
|
|
||||||
# needed each time, php_install_ini would reset it
|
|
||||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
|
||||||
into "${dest}"
|
|
||||||
case "$sapi" in
|
|
||||||
cli)
|
|
||||||
source="sapi/cli/php"
|
|
||||||
;;
|
|
||||||
cgi)
|
|
||||||
source="sapi/cgi/php-cgi"
|
|
||||||
;;
|
|
||||||
fpm)
|
|
||||||
source="sapi/fpm/php-fpm"
|
|
||||||
;;
|
|
||||||
embed)
|
|
||||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
|
||||||
;;
|
|
||||||
phpdbg)
|
|
||||||
source="sapi/phpdbg/phpdbg"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "unhandled sapi in src_install"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
|
||||||
dolib.so "${source}"
|
|
||||||
else
|
|
||||||
dobin "${source}"
|
|
||||||
local name="$(basename ${source})"
|
|
||||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
php_install_ini "${sapi}"
|
|
||||||
|
|
||||||
# construct correct SAPI string for php-config
|
|
||||||
# thanks to ferringb for the bash voodoo
|
|
||||||
if [[ "${sapi}" == "apache2" ]]; then
|
|
||||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
|
||||||
else
|
|
||||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Installing opcache module
|
|
||||||
if use opcache ; then
|
|
||||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
|
||||||
dolib.so "modules/opcache$(get_libname)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install env.d files
|
|
||||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
|
||||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
|
||||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
|
||||||
|
|
||||||
# set php-config variable correctly (bug #278439)
|
|
||||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
|
||||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
|
||||||
|
|
||||||
if use fpm ; then
|
|
||||||
if use systemd; then
|
|
||||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
|
||||||
"php-fpm@${SLOT}.service"
|
|
||||||
else
|
|
||||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
|
||||||
"php-fpm@${SLOT}.service"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
|
||||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
|
||||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
|
||||||
ewarn "Test phase requires USE=cli, skipping"
|
|
||||||
return
|
|
||||||
else
|
|
||||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
|
||||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
|
||||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
|
||||||
"session.save_path=${T}" \
|
|
||||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
|
||||||
"session.save_path=${T}"
|
|
||||||
|
|
||||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
|
||||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
|
||||||
done
|
|
||||||
|
|
||||||
local failed="$(find -name '*.out')"
|
|
||||||
if [[ ${failed} != "" ]] ; then
|
|
||||||
ewarn "The following test cases failed unexpectedly:"
|
|
||||||
for name in ${failed}; do
|
|
||||||
ewarn " ${name/.out/}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "No unexpected test failures, all fine"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
|
||||||
local passed=""
|
|
||||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
|
||||||
[[ -f "${name}.diff" ]] && continue
|
|
||||||
passed="${passed} ${name}"
|
|
||||||
done
|
|
||||||
if [[ ${passed} != "" ]] ; then
|
|
||||||
einfo "The following test cases passed unexpectedly:"
|
|
||||||
for name in ${passed}; do
|
|
||||||
ewarn " ${passed}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "None of the known-to-fail tests passed, all fine"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
# Output some general info to the user
|
|
||||||
if use apache2 ; then
|
|
||||||
elog
|
|
||||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
|
||||||
elog "your apache2 command. OpenRC users can append that string to"
|
|
||||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
|
||||||
elog
|
|
||||||
elog "The apache module configuration file 70_mod_php.conf is"
|
|
||||||
elog "provided (and maintained) by eselect-php."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create the symlinks for php
|
|
||||||
for m in ${SAPIS}; do
|
|
||||||
[[ ${m} == 'embed' ]] && continue;
|
|
||||||
if use $m ; then
|
|
||||||
local ci=$(eselect php show $m)
|
|
||||||
if [[ -z $ci ]]; then
|
|
||||||
eselect php set $m php${SLOT} || die
|
|
||||||
einfo "Switched ${m} to use php:${SLOT}"
|
|
||||||
einfo
|
|
||||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
|
||||||
elog "To switch $m to use php:${SLOT}, run"
|
|
||||||
elog " eselect php set $m php${SLOT}"
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
|
||||||
# example, if the user has the cgi SAPI enabled, then he has an
|
|
||||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
|
||||||
# USE="-cgi", that symlink will break. This call to eselect is
|
|
||||||
# supposed to remove that dead link per bug 572436.
|
|
||||||
eselect php cleanup || die
|
|
||||||
|
|
||||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
|
||||||
elog "To build extensions for this version of PHP, you will need to"
|
|
||||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
|
||||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
|
||||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
|
||||||
ewarn 'remove it from your configuration at your convenience. See'
|
|
||||||
ewarn
|
|
||||||
ewarn ' https://bugs.gentoo.org/611214'
|
|
||||||
ewarn
|
|
||||||
ewarn 'for more information.'
|
|
||||||
fi
|
|
||||||
|
|
||||||
elog "For details on how version slotting works, please see"
|
|
||||||
elog "the wiki:"
|
|
||||||
elog
|
|
||||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
|
||||||
elog
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
# This serves two purposes. First, if we have just removed the last
|
|
||||||
# installed version of PHP, then this will remove any dead symlinks
|
|
||||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
|
||||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
|
||||||
# his existing symlinks to point to the new 7.0 installation. The
|
|
||||||
# latter is bug 432962.
|
|
||||||
#
|
|
||||||
# Note: the eselect-php package may not be installed at this point,
|
|
||||||
# so we can't die() if this command fails.
|
|
||||||
eselect php cleanup
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue