parent
8edc1eac5d
commit
ef8a58d266
@ -1,3 +1,4 @@
|
||||
DIST gkrellm-2.3.5.tar.bz2 765011 SHA256 702b5b0e9c040eb3af8e157453f38dd6f53e1dcd8b1272d20266cda3d4372c8b SHA512 9681ec5978b6be9f56a71726df36671829a4427f45caf90c8c3460e8c59004ff4083de1692cad16e3724ed37418bb3e4589d1961c140f3becfa3efd210b7a5dc WHIRLPOOL 3dceb20b9da49fb9b287e1faca88b3fdb7ae7af6dde5e675ee1e5c718467b131e34f740cb38719e5026ce0478146264fa4eaa060120e71f2c442ec5504e6dfb4
|
||||
DIST gkrellm-2.3.6-rc1.tar.bz2 784934 SHA256 abeeb0c04a8f911db5f07a95a98e4044326a657f65986013d36a736ba4e47ae8 SHA512 2004c6e57dc5dba9dbbd4c713caa29f5b59e4926b1ce4a3cfb47840096d6d93d66633d15d5588bc22e31df88241248d7910645da75de39278f1fd68255b88517 WHIRLPOOL f3506e88dc19e3eebe313b5f57a5d605d6b011808391036ff5332140c53061f8ee99b942b2b287cb7f645e9f2491e654623759b4a01fa454c785883355141319
|
||||
DIST gkrellm-2.3.6_rc1-update_german_translation.patch.xz 18184 SHA256 cb90522c99135736ac3073b7e688fbcb0da31f6594ce3fc851df87c9be10f2df SHA512 c79feb4b740b303e5e6e2ccf84694770bac746b375a0a09918ef1ac67b2700f3a7796251cd4224958ca50a8f81a501bf468dc7a78844218074130758a8248150 WHIRLPOOL ea3d532aa670b7344cc2dd6c5fd4dda6ec27832c039547ace0772b4a3002baaeb598003d81bf2231b2506de1e22d2b83959e4f1bc7ec13b56b2366c43101ace0
|
||||
DIST gkrellm-2.3.7.tar.bz2 777841 SHA256 f7a4642d2cc6b61242215e58e1bd8fe394e6fd984cd3c3f8964c1c554029735d SHA512 832353d245966a5d64ccbacd619905fe437b347c2654e279ec47b56aa1ef559a166b4791d63e151a5481c55c1d3775906e52213f42e5d7071fd15f00f8cecaa5 WHIRLPOOL 3fd8b51a1be5174308fe1dbbb1c1d83df0685c12e71cf410533f97439fb5cf001553c462e15b9971c55c6ea87b28429136fe0025d39c443cb9d215fcf7620f46
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- gkrellm-2.3.7/Makefile
|
||||
+++ gkrellm-2.3.7/Makefile
|
||||
@@ -131,7 +131,7 @@
|
||||
(cd server && ${MAKE} gkrellmd)
|
||||
|
||||
gkrellm.pc: Makefile
|
||||
- echo 'prefix=$(INSTALLROOT)\n'\
|
||||
+ printf 'prefix=$(INSTALLROOT)\n'\
|
||||
'Name: GKrellM\n'\
|
||||
'Description: Extensible GTK system monitoring application\n'\
|
||||
'Version: $(VERSION)\n'\
|
@ -0,0 +1,145 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit eutils multilib user systemd toolchain-funcs
|
||||
|
||||
MY_P="${P/_/-}"
|
||||
|
||||
DESCRIPTION="Single process stack of various system monitors"
|
||||
HOMEPAGE="http://www.gkrellm.net/"
|
||||
SRC_URI="http://gkrellm.srcbox.net/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
|
||||
IUSE="gnutls hddtemp libressl lm_sensors nls ntlm ssl kernel_FreeBSD X"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/glib:2
|
||||
hddtemp? ( app-admin/hddtemp )
|
||||
gnutls? ( net-libs/gnutls )
|
||||
!gnutls? (
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
)
|
||||
lm_sensors? ( sys-apps/lm_sensors )
|
||||
nls? ( virtual/libintl )
|
||||
ntlm? ( net-libs/libntlm )
|
||||
X? (
|
||||
x11-libs/gdk-pixbuf
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/libICE
|
||||
x11-libs/libSM
|
||||
x11-libs/libX11
|
||||
x11-libs/pango
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.3.5-cifs.patch
|
||||
"${FILESDIR}"/${PN}-2.3.5-config.patch
|
||||
"${FILESDIR}"/${PN}-2.3.5-width.patch
|
||||
"${FILESDIR}"/${PN}-2.3.5-sansfont.patch
|
||||
"${FILESDIR}"/${P}-pkgconfig_fix_newlines.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DOCS=( Changelog CREDITS README )
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup gkrellmd
|
||||
enewuser gkrellmd -1 -1 -1 gkrellmd
|
||||
TARGET=
|
||||
use kernel_FreeBSD && TARGET="freebsd"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -e 's:-O2 ::' \
|
||||
-e 's:override CC:CFLAGS:' \
|
||||
-e 's:-L/usr/X11R6/lib::' \
|
||||
-i */Makefile || die "sed Makefile(s) failed"
|
||||
|
||||
sed -e "s:/usr/lib:${EPREFIX}/usr/$(get_libdir):" \
|
||||
-e "s:/usr/local/lib:${EPREFIX}/usr/local/$(get_libdir):" \
|
||||
-i src/${PN}.h || die "sed ${PN}.h failed"
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use X ; then
|
||||
local sslopt=""
|
||||
if use gnutls; then
|
||||
sslopt="without-ssl=yes"
|
||||
elif use ssl; then
|
||||
sslopt="without-gnutls=yes"
|
||||
else
|
||||
sslopt="without-ssl=yes without-gnutls=yes"
|
||||
fi
|
||||
|
||||
emake \
|
||||
${TARGET} \
|
||||
CC="$(tc-getCC)" \
|
||||
STRIP="" \
|
||||
INSTALLROOT="${EPREFIX}/usr" \
|
||||
INCLUDEDIR="${EPREFIX}/usr/include/gkrellm2" \
|
||||
LOCALEDIR="${EPREFIX}/usr/share/locale" \
|
||||
$(usex nls "" "enable_nls=0") \
|
||||
$(usex lm_sensors "" "without-libsensors=yes") \
|
||||
$(usex ntlm "" "without-ntlm=yes") \
|
||||
${sslopt}
|
||||
else
|
||||
cd server || die
|
||||
emake \
|
||||
${TARGET} \
|
||||
CC="$(tc-getCC)" \
|
||||
LINK_FLAGS="$LDFLAGS -Wl,-E" \
|
||||
STRIP="" \
|
||||
$(usex nls "" "enable_nls=0") \
|
||||
$(usex lm_sensors "" "without-libsensors=yes")
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use X ; then
|
||||
emake \
|
||||
install${TARGET:+_}${TARGET} \
|
||||
$(usex nls "" "enable_nls=0") \
|
||||
STRIP="" \
|
||||
INSTALLDIR="${ED}/usr/bin" \
|
||||
INCLUDEDIR="${ED}/usr/include" \
|
||||
LOCALEDIR="${ED}/usr/share/locale" \
|
||||
PKGCONFIGDIR="${ED}/usr/$(get_libdir)/pkgconfig" \
|
||||
MANDIR="${ED}/usr/share/man/man1"
|
||||
|
||||
docinto html
|
||||
dodoc *.html
|
||||
|
||||
newicon src/icon.xpm ${PN}.xpm
|
||||
make_desktop_entry ${PN} GKrellM ${PN}
|
||||
else
|
||||
dobin server/gkrellmd
|
||||
|
||||
insinto /usr/include/gkrellm2
|
||||
doins server/gkrellmd.h
|
||||
doins shared/log.h
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}"/gkrellmd.initd gkrellmd
|
||||
newconfd "${FILESDIR}"/gkrellmd.conf gkrellmd
|
||||
|
||||
systemd_dounit "${FILESDIR}"/gkrellmd.service
|
||||
|
||||
insinto /etc
|
||||
doins server/gkrellmd.conf
|
||||
|
||||
einstalldocs
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
inherit eutils systemd unpacker user
|
||||
|
||||
DESCRIPTION="general puppet client utils along with mcollective hiera and facter"
|
||||
HOMEPAGE="https://puppetlabs.com/"
|
||||
SRC_BASE="http://apt.puppetlabs.com/pool/xenial/PC1/${PN:0:1}/${PN}/${PN}_${PV}-1xenial"
|
||||
SRC_URI="
|
||||
amd64? ( ${SRC_BASE}_amd64.deb )
|
||||
x86? ( ${SRC_BASE}_i386.deb )
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="puppetdb selinux"
|
||||
RESTRICT="strip"
|
||||
|
||||
CDEPEND="!app-admin/augeas
|
||||
!app-admin/mcollective
|
||||
!app-admin/puppet
|
||||
!dev-ruby/hiera
|
||||
!dev-ruby/facter
|
||||
!app-emulation/virt-what"
|
||||
|
||||
DEPEND="
|
||||
${CDEPEND}"
|
||||
RDEPEND="${CDEPEND}
|
||||
sys-apps/dmidecode
|
||||
selinux? (
|
||||
sys-libs/libselinux[ruby]
|
||||
sec-policy/selinux-puppet
|
||||
)
|
||||
puppetdb? ( >=dev-ruby/puppetdb-termini-3.1.0 )"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
QA_PREBUILT="
|
||||
/opt/puppetlabs/puppet
|
||||
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/2.1.0/x86_64-linux/*
|
||||
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/mathn/*
|
||||
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/io/*
|
||||
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/dl/*
|
||||
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/racc/*
|
||||
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/enc/*
|
||||
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/json/ext/*
|
||||
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/rbconfig/*
|
||||
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/digest/*
|
||||
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/*
|
||||
/opt/puppetlabs/puppet/lib/engines/*
|
||||
/opt/puppetlabs/puppet/lib/virt-what/*
|
||||
/opt/puppetlabs/puppet/lib/*
|
||||
/opt/puppetlabs/puppet/bin/*"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup puppet
|
||||
enewuser puppet -1 -1 /var/run/puppet puppet
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# conf.d
|
||||
doconfd etc/default/puppet
|
||||
doconfd etc/default/mcollective
|
||||
# logrotate.d
|
||||
insinto /etc/logrotate.d
|
||||
doins etc/logrotate.d/mcollective
|
||||
# puppet itself
|
||||
insinto /etc/puppetlabs
|
||||
doins -r etc/puppetlabs/*
|
||||
# logdir for systemd
|
||||
dodir var/log/puppetlabs/puppet/
|
||||
fperms 0750 var/log/puppetlabs/puppet/
|
||||
# the rest
|
||||
insinto /opt
|
||||
dodir opt/puppetlabs/puppet/cache
|
||||
doins -r opt/*
|
||||
fperms 0750 /opt/puppetlabs/puppet/cache
|
||||
# init
|
||||
newinitd "${FILESDIR}/puppet.initd" puppet
|
||||
newinitd "${FILESDIR}/mcollective.initd" mcollective
|
||||
systemd_dounit "${FILESDIR}/puppet.service"
|
||||
systemd_dounit "${FILESDIR}/mcollective.service"
|
||||
systemd_newtmpfilesd "${FILESDIR}/puppet-agent.conf.tmpfilesd" puppet-agent.conf
|
||||
# symlinks
|
||||
chmod 0755 -R "${D}/opt/puppetlabs/puppet/bin/"
|
||||
chmod 0755 "${D}//opt/puppetlabs/puppet/lib/virt-what/virt-what-cpuid-helper"
|
||||
dosym /opt/puppetlabs/bin/facter /usr/bin/facter
|
||||
dosym /opt/puppetlabs/bin/hiera /usr/bin/hiera
|
||||
dosym /opt/puppetlabs/bin/mco /usr/bin/mco
|
||||
dosym /opt/puppetlabs/bin/puppet /usr/bin/puppet
|
||||
dosym /opt/puppetlabs/puppet/bin/mcollectived /usr/sbin/mcollectived
|
||||
dosym /opt/puppetlabs/puppet/bin/virt-what /usr/bin/virt-what
|
||||
dosym /opt/puppetlabs/puppet/bin/augparse /usr/bin/augparse
|
||||
dosym /opt/puppetlabs/puppet/bin/augtool /usr/bin/augtool
|
||||
dosym /opt/puppetlabs/puppet/bin/extlookup2hiera /usr/bin/extlookup2hiera
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
STUPID_NUM="4171"
|
||||
|
||||
inherit eutils toolchain-funcs udev autotools-utils
|
||||
|
||||
DESCRIPTION="CCID free software driver"
|
||||
HOMEPAGE="http://pcsclite.alioth.debian.org/ccid.html"
|
||||
SRC_URI="http://alioth.debian.org/frs/download.php/file/${STUPID_NUM}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="twinserial kobil-midentity +usb"
|
||||
|
||||
RDEPEND=">=sys-apps/pcsc-lite-1.8.3
|
||||
usb? ( virtual/libusb:1 )"
|
||||
DEPEND="${RDEPEND}
|
||||
kernel_linux? ( virtual/pkgconfig )"
|
||||
|
||||
DOCS=( README AUTHORS )
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
LEX=:
|
||||
$(use_enable twinserial)
|
||||
$(use_enable usb libusb)
|
||||
)
|
||||
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
autotools-utils_src_compile
|
||||
use kobil-midentity && autotools-utils_src_compile contrib/Kobil_mIDentity_switch
|
||||
}
|
||||
|
||||
src_install() {
|
||||
autotools-utils_src_install
|
||||
|
||||
if use kobil-midentity; then
|
||||
dosbin "${BUILD_DIR}"/contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch
|
||||
doman contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch.8
|
||||
fi
|
||||
|
||||
if use kernel_linux; then
|
||||
# note: for eudev support, rules probably will always need to be
|
||||
# installed to /usr
|
||||
|
||||
# ccid >=1.4.11 version changed the rules drastically in a minor
|
||||
# release to no longer use the pcscd group. Using the old ones in
|
||||
# the mean time.
|
||||
udev_newrules "${FILESDIR}"/92_pcscd_ccid-2.rules 92-pcsc-ccid.rules
|
||||
|
||||
# disable Kobil_mIDentity_switch udev rule with USE=-kobil-midentity
|
||||
if ! use kobil-midentity; then
|
||||
sed \
|
||||
-e '/Kobil_mIDentity_switch/s/^/#/' \
|
||||
-i "${D}/$(get_udevdir)"/rules.d/92-pcsc-ccid.rules || die
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit toolchain-funcs multilib
|
||||
|
||||
DESCRIPTION="a free, pretty much fully featured and stable TrueCrypt implementation"
|
||||
HOMEPAGE="https://github.com/bwalex/tc-play"
|
||||
SRC_URI="https://github.com/bwalex/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="gnutls libressl"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/libgpg-error
|
||||
sys-fs/lvm2
|
||||
sys-apps/util-linux
|
||||
dev-libs/libgcrypt:0
|
||||
gnutls? ( net-libs/gnutls )
|
||||
!gnutls? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_setup() {
|
||||
local backend="openssl"
|
||||
use gnutls && local backend="gcrypt"
|
||||
|
||||
EXTRA_MAKE_FLAGS=(
|
||||
PBKDF_BACKEND="${backend}"
|
||||
WARNFLAGS=""
|
||||
CC=$(tc-getCC)
|
||||
AR=$(tc-getAR)
|
||||
PREFIX=/usr \
|
||||
LIBDIR=/usr/$(get_libdir)
|
||||
)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -f Makefile.classic \
|
||||
tcplay \
|
||||
"${EXTRA_MAKE_FLAGS[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake -f Makefile.classic \
|
||||
"${EXTRA_MAKE_FLAGS[@]}" \
|
||||
install_program \
|
||||
DESTDIR="${ED}"
|
||||
dodoc README.md
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils
|
||||
|
||||
MY_P="${PN}${PV/./-}"
|
||||
DESCRIPTION="Simple Perl/Tk GUI to manage a small certification authority"
|
||||
HOMEPAGE="http://tinyca.sm-zone.net/"
|
||||
SRC_URI="http://tinyca.sm-zone.net/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="Artistic"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
|
||||
IUSE="libressl"
|
||||
LANGS="en de cs es sv"
|
||||
|
||||
for X in ${LANGS} ; do
|
||||
IUSE="${IUSE} linguas_${X}"
|
||||
done
|
||||
|
||||
RDEPEND="
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
dev-perl/Locale-gettext
|
||||
>=virtual/perl-MIME-Base64-2.12
|
||||
>=dev-perl/gtk2-perl-1.072"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-apps/sed-4"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${PN}-2.0.7.3-compositefix.patch"
|
||||
epatch "${FILESDIR}/${P}-openssl-1.patch"
|
||||
epatch "${FILESDIR}/${P}-perl-5.18.patch"
|
||||
sed -i -e 's:./lib:/usr/share/tinyca/lib:g' \
|
||||
-e 's:./templates:/usr/share/tinyca/templates:g' \
|
||||
-e 's:./locale:/usr/share/locale:g' "${S}/tinyca2" || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -C po
|
||||
}
|
||||
|
||||
locale_install() {
|
||||
insinto /usr/share/locale/$@/LC_MESSAGES/
|
||||
doins locale/$@/LC_MESSAGES/tinyca2.mo
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newbin tinyca2 tinyca
|
||||
insinto /usr/share/tinyca/lib
|
||||
doins lib/*.pm
|
||||
insinto /usr/share/tinyca/lib/GUI
|
||||
doins lib/GUI/*.pm
|
||||
insinto /usr/share/tinyca/templates
|
||||
doins templates/*
|
||||
insinto /usr/share/
|
||||
strip-linguas ${LANGS}
|
||||
local l
|
||||
for l in ${LANGS}; do
|
||||
if [ "$l" != "en" ]; then
|
||||
use linguas_$l && locale_install $l
|
||||
fi
|
||||
done
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils flag-o-matic
|
||||
|
||||
DESCRIPTION="TrouSerS' support tools for the Trusted Platform Modules"
|
||||
HOMEPAGE="http://trousers.sourceforge.net"
|
||||
SRC_URI="mirror://sourceforge/trousers/${P}.tar.gz"
|
||||
|
||||
LICENSE="CPL-1.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~s390 ~sh ~x86"
|
||||
IUSE="libressl nls pkcs11 debug"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=app-crypt/trousers-0.3.0
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
pkcs11? ( dev-libs/opencryptoki )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
nls? ( virtual/libintl )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
src_prepare() {
|
||||
sed -i -r \
|
||||
-e '/CFLAGS/s/ -(Werror|m64)//' \
|
||||
configure.in || die
|
||||
epatch "${FILESDIR}/${P}-gold.patch"
|
||||
epatch "${FILESDIR}/${P}-build.patch"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
# don't use --enable-pkcs11-support, configure is a mess.
|
||||
use pkcs11 || myconf+=" --disable-pkcs11-support"
|
||||
|
||||
append-cppflags $(usex debug -DDEBUG -DNDEBUG)
|
||||
|
||||
econf \
|
||||
$(use_enable nls) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
rm -f "${ED}"/usr/lib*/libtpm_unseal.la
|
||||
}
|
@ -0,0 +1,180 @@
|
||||
From 476aa73644e6b3d353a1ed1cf3982e7114875088 Mon Sep 17 00:00:00 2001
|
||||
From: Alon Bar-Lev <alon.barlev@gmail.com>
|
||||
Date: Fri, 3 Jun 2016 23:15:29 +0300
|
||||
Subject: [PATCH 1/2] build: add --with-qt-version to force specific qt linkage
|
||||
|
||||
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
|
||||
---
|
||||
configure.ac | 43 ++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 28 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 32ba42b..8490a88 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -90,18 +90,28 @@ if test -n "${_QTDIR}" && test -d "${_QTDIR}"; then
|
||||
DYLD_LIBRARY_PATH="${_QTDIR}/lib:${DYLD_LIBRARY_PATH}"
|
||||
fi
|
||||
|
||||
-PKG_CHECK_MODULES(Qt5, [Qt5Core >= 5.0, Qt5Widgets >= 5.0], [
|
||||
- _QT_HOST_BINS="`pkg-config --variable=host_bins Qt5Core`"
|
||||
- QT_MOC="${_QT_HOST_BINS}/moc"
|
||||
- QT_UIC="${_QT_HOST_BINS}/uic"
|
||||
- if test -n "$DARWIN"; then
|
||||
- FRAMEDIR=`pkg-config --variable=libdir Qt5Core`
|
||||
- Qt5_CFLAGS="$Qt5_CFLAGS -F${FRAMEDIR} -I${FRAMEDIR}/QtCore.framework/Headers -I${FRAMEDIR}/QtGui.framework/Headers -I${FRAMEDIR}/QtWdgets.framework/Headers"
|
||||
- fi
|
||||
- QT_VERSION=5
|
||||
- QT_CFLAGS="${Qt5_CFLAGS} -fPIC"
|
||||
- QT_LIBS="${Qt5_LIBS}"
|
||||
-], [
|
||||
+AC_ARG_WITH([qt-version],
|
||||
+ AS_HELP_STRING([--with-qt-version], [Select the Qt version]),
|
||||
+ [WANT_QT_VERSION="$withval"],
|
||||
+ [WANT_QT_VERSION=detect])
|
||||
+
|
||||
+if test "${WANT_QT_VERSION}" = detect -o "${WANT_QT_VERSION}" = 5; then
|
||||
+ PKG_CHECK_MODULES(Qt5, [Qt5Core >= 5.0, Qt5Widgets >= 5.0], [
|
||||
+ _QT_HOST_BINS="`pkg-config --variable=host_bins Qt5Core`"
|
||||
+ QT_MOC="${_QT_HOST_BINS}/moc"
|
||||
+ QT_UIC="${_QT_HOST_BINS}/uic"
|
||||
+ if test -n "$DARWIN"; then
|
||||
+ FRAMEDIR=`pkg-config --variable=libdir Qt5Core`
|
||||
+ Qt5_CFLAGS="$Qt5_CFLAGS -F${FRAMEDIR} -I${FRAMEDIR}/QtCore.framework/Headers -I${FRAMEDIR}/QtGui.framework/Headers -I${FRAMEDIR}/QtWdgets.framework/Headers"
|
||||
+ fi
|
||||
+ WANT_QT_VERSION=5
|
||||
+ QT_VERSION=5
|
||||
+ QT_CFLAGS="${Qt5_CFLAGS} -fPIC"
|
||||
+ QT_LIBS="${Qt5_LIBS}"
|
||||
+])
|
||||
+fi
|
||||
+
|
||||
+if test "${WANT_QT_VERSION}" = detect -o "${WANT_QT_VERSION}" = 4; then
|
||||
PKG_CHECK_MODULES(Qt4, [QtCore >= 4.6, QtCore < 5.0, QtGui >= 4.6, QtGui < 5.0], [
|
||||
QT_MOC="`pkg-config --variable=moc_location QtCore`"
|
||||
QT_UIC="`pkg-config --variable=uic_location QtCore`"
|
||||
@@ -112,18 +122,21 @@ PKG_CHECK_MODULES(Qt5, [Qt5Core >= 5.0, Qt5Widgets >= 5.0], [
|
||||
FRAMEDIR=`pkg-config --variable=libdir QtCore`
|
||||
Qt4_CFLAGS="$Qt4_CFLAGS -F${FRAMEDIR} -I${FRAMEDIR}/QtCore.framework/Headers -I${FRAMEDIR}/QtGui.framework/Headers"
|
||||
fi
|
||||
+ WANT_QT_VERSION=4
|
||||
QT_VERSION=4
|
||||
QT_CFLAGS="${Qt4_CFLAGS}"
|
||||
QT_LIBS="${Qt4_LIBS}"
|
||||
- ], [
|
||||
+ ])
|
||||
+fi
|
||||
+
|
||||
+if test -z "${QT_VERSION}"; then
|
||||
if test -z "$DARWIN"; then
|
||||
QT_LIBS=" -lQtCore -lQtGui "
|
||||
else
|
||||
QT_LIBS=" -framework QtGui -framework QtCore "
|
||||
fi
|
||||
AC_MSG_WARN([Qt pkg-config failed, using fallback defaults (${QT_LIBS})]);
|
||||
- ])
|
||||
-])
|
||||
+fi
|
||||
|
||||
AC_SUBST([QT_CFLAGS])
|
||||
AC_SUBST([QT_LIBS])
|
||||
--
|
||||
2.7.3
|
||||
|
||||
From 7112df9532f71cb3a150fef61b2d7e5d9899634c Mon Sep 17 00:00:00 2001
|
||||
From: Alon Bar-Lev <alon.barlev@gmail.com>
|
||||
Date: Fri, 3 Jun 2016 23:58:01 +0300
|
||||
Subject: [PATCH 2/2] build: add --disable-doc to disable doc installation
|
||||
|
||||
---
|
||||
Local.mak.in | 1 +
|
||||
configure.ac | 37 +++++++++++++++++++++++--------------
|
||||
doc/Makefile | 10 +++++-----
|
||||
3 files changed, 29 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/Local.mak.in b/Local.mak.in
|
||||
index cd5ebfc..d993b8b 100644
|
||||
--- a/Local.mak.in
|
||||
+++ b/Local.mak.in
|
||||
@@ -19,6 +19,7 @@ STRIP=@STRIP@
|
||||
DOCTOOL=@DOCTOOL@
|
||||
MACDEPLOYQT=@MACDEPLOYQT@
|
||||
DARWIN=@DARWIN@
|
||||
+ENABLE_DOC=@ENABLE_DOC@
|
||||
|
||||
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
||||
HOST=linux
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8490a88..03d729e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -202,20 +202,29 @@ AX_CHECK_GNU_MAKE()
|
||||
|
||||
# linuxdoc application detection
|
||||
##################################
|
||||
-AC_CHECK_PROGS([DOCTOOL], [linuxdoc sgml2html], [":"])
|
||||
-AC_SUBST([DOCTOOL])
|
||||
-
|
||||
-case "$DOCTOOL" in
|
||||
- linuxdoc) DOCTOOL="linuxdoc -B html";;
|
||||
- sgml2html) DOCTOOL="sgml2html -s 1";;
|
||||
- :)
|
||||
- if test "${srcdir}" != "."; then
|
||||
- mkdir -p doc
|
||||
- cp ${srcdir}/doc/xca-doc.tgz doc/
|
||||
- fi
|
||||
- AC_MSG_WARN(['linuxdoc' or 'sgml2html' not found, using pre-compiled documentation])
|
||||
- ;;
|
||||
-esac
|
||||
+AC_ARG_ENABLE([doc],
|
||||
+ AS_HELP_STRING([--disable-doc], [Disable documentation installation]),
|
||||
+ ,
|
||||
+ [enable_doc=yes])
|
||||
+test "${enable_doc}" = "yes" && ENABLE_DOC= || ENABLE_DOC='\#'
|
||||
+AC_SUBST([ENABLE_DOC])
|
||||
+
|
||||
+if test "${enable_doc}"; then
|
||||
+ AC_CHECK_PROGS([DOCTOOL], [linuxdoc sgml2html], [":"])
|
||||
+ AC_SUBST([DOCTOOL])
|
||||
+
|
||||
+ case "$DOCTOOL" in
|
||||
+ linuxdoc) DOCTOOL="linuxdoc -B html";;
|
||||
+ sgml2html) DOCTOOL="sgml2html -s 1";;
|
||||
+ :)
|
||||
+ if test "${srcdir}" != "."; then
|
||||
+ mkdir -p doc
|
||||
+ cp ${srcdir}/doc/xca-doc.tgz doc/
|
||||
+ fi
|
||||
+ AC_MSG_WARN(['linuxdoc' or 'sgml2html' not found, using pre-compiled documentation])
|
||||
+ ;;
|
||||
+ esac
|
||||
+fi
|
||||
|
||||
# Setup done. Write local.h and Local.mak
|
||||
############################################
|
||||
diff --git a/doc/Makefile b/doc/Makefile
|
||||
index fce4acf..7bf802f 100644
|
||||
--- a/doc/Makefile
|
||||
+++ b/doc/Makefile
|
||||
@@ -17,13 +17,13 @@ xca.html: xca.sgml
|
||||
echo 'The documentation for XCA can be viewed online at: <a href="http://xca.sourceforge.net/">http://xca.sourceforge.net/</a>.' > $@
|
||||
test ! -f xca-doc.tgz || tar zxf xca-doc.tgz
|
||||
@$(PRINT) " DOC [$(BASENAME)] $@"
|
||||
- $(DOCTOOL) $< >/dev/null
|
||||
+ $(ENABLE_DOC)$(DOCTOOL) $< >/dev/null
|
||||
|
||||
install: $(doc)
|
||||
- install -m 755 -d $(destdir)$(htmldir) \
|
||||
- $(destdir)$(mandir)/man1
|
||||
- install -m 644 xca*.html $(destdir)$(htmldir)
|
||||
- install *.1.gz $(destdir)/$(mandir)/man1
|
||||
+ $(ENABLE_DOC)install -m 755 -d $(destdir)$(htmldir)
|
||||
+ $(ENABLE_DOC)install -m 644 xca*.html $(destdir)$(htmldir)
|
||||
+ install -m 755 -d $(destdir)$(mandir)/man1
|
||||
+ install -m 644 *.1.gz $(destdir)/$(mandir)/man1
|
||||
|
||||
app: xca.html
|
||||
mkdir -p $(APPDIR)/Resources
|
||||
--
|
||||
2.7.3
|
||||
|
@ -0,0 +1,45 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils toolchain-funcs
|
||||
|
||||
DESCRIPTION="A GUI to OpenSSL, RSA public keys, certificates, signing requests and revokation lists"
|
||||
HOMEPAGE="http://xca.sourceforge.net"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="bindist libressl"
|
||||
|
||||
RDEPEND="
|
||||
!libressl? ( dev-libs/openssl:0=[bindist=] )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
dev-qt/qtgui:4"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-1.0.0-desktop.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
||||
STRIP=true
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# enforce all to avoid the automatic silent rules
|
||||
emake all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# non standard destdir
|
||||
emake install destdir="${ED}"
|
||||
|
||||
insinto /etc/xca
|
||||
doins misc/*.txt
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils toolchain-funcs autotools
|
||||
|
||||
DESCRIPTION="A GUI to OpenSSL, RSA public keys, certificates, signing requests etc"
|
||||
HOMEPAGE="http://xca.sourceforge.net"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="bindist doc libressl qt4 qt5"
|
||||
|
||||
REQUIRED_USE="|| ( qt4 qt5 )"
|
||||
|
||||
RDEPEND="
|
||||
!libressl? ( dev-libs/openssl:0=[bindist=] )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
doc? ( app-text/linuxdoc-tools )
|
||||
qt5? ( dev-qt/qtgui:5 )
|
||||
qt4? ( dev-qt/qtgui:4 )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-1.0.0-desktop.patch
|
||||
epatch "${FILESDIR}"/${P}-build.patch
|
||||
AT_M4DIR="m4" eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
||||
--with-qt-version=$(use qt5 && echo 5 || echo 4) \
|
||||
$(use_enable doc) \
|
||||
STRIP=true
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# enforce all to avoid the automatic silent rules
|
||||
emake all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# non standard destdir
|
||||
emake install destdir="${ED}"
|
||||
|
||||
insinto /etc/xca
|
||||
doins misc/*.txt
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools eutils
|
||||
|
||||
DESCRIPTION="Simple LaTeX editor for GTK+ users"
|
||||
HOMEPAGE="https://github.com/alexandervdm/gummi"
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/alexandervdm/gummi.git"
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="https://github.com/alexandervdm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
LANGS="ar ca cs da de el es fr hu it nl pl pt pt_BR ro ru sv zh_CN zh_TW"
|
||||
|
||||
for X in ${LANGS} ; do
|
||||
IUSE="${IUSE} +linguas_${X}"
|
||||
done
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/glib:2
|
||||
dev-texlive/texlive-latex
|
||||
dev-texlive/texlive-latexextra
|
||||
x11-libs/gtk+:2"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
app-text/gtkspell:2
|
||||
app-text/poppler[cairo]
|
||||
x11-libs/gtksourceview:2.0
|
||||
x11-libs/pango"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog README.md )
|
||||
|
||||
src_prepare() {
|
||||
strip-linguas ${LANGS}
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Gummi >=0.4.8 supports spell-checking through gtkspell. Support for"
|
||||
elog "additional languages can be added by installing myspell-** packages"
|
||||
elog "for your language of choice."
|
||||
}
|
@ -1,25 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>alexvandermey@gmail.com</email>
|
||||
<name>Alexander van der Mey</name>
|
||||
<description>Upstream developer.</description>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>hwoarang@gentoo.org</email>
|
||||
<name>Markos Chandras</name>
|
||||
<description>Proxy maintainer.</description>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>christian.tietz@mailbox.org</email>
|
||||
<name>Christian Tietz</name>
|
||||
<description>Proxy maintainer.</description>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
</longdescription>
|
||||
<maintainer type="person">
|
||||
<email>hwoarang@gentoo.org</email>
|
||||
<name>Markos Chandras</name>
|
||||
<description>Proxy maintainer.</description>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>christian.tietz@mailbox.org</email>
|
||||
<name>Christian Tietz</name>
|
||||
<description>Proxy maintainer.</description>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<maintainer status="active">
|
||||
<email>alexvandermey@gmail.com</email>
|
||||
<name>Alexander van der Mey</name>
|
||||
</maintainer>
|
||||
<remote-id type="github">alexandervdm/gummi</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
@ -0,0 +1,37 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="gnat module for eselect"
|
||||
HOMEPAGE="https://www.gentoo.org"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~x86 ~sparc"
|
||||
|
||||
IUSE=""
|
||||
RDEPEND=">=app-admin/eselect-1.2.5"
|
||||
|
||||
MODULEDIR="/usr/share/eselect/modules"
|
||||
|
||||
# NOTE!!
|
||||
# This path is duplicated in gnat-eselect module,
|
||||
# adjust in both locations!
|
||||
LIBDIR="/usr/share/gnat/lib"
|
||||
|
||||
src_install() {
|
||||
dodir ${MODULEDIR}
|
||||
insinto ${MODULEDIR}
|
||||
newins "${FILESDIR}"/gnat.eselect-${PV} gnat.eselect
|
||||
dodir ${LIBDIR}
|
||||
insinto ${LIBDIR}
|
||||
# !ATTN!
|
||||
# Make sure to adjust version of installed file to a proper one if there is
|
||||
# a change!
|
||||
newins "${FILESDIR}"/gnat-common-${PV}.bash gnat-common.bash
|
||||
}
|
@ -0,0 +1,227 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
#
|
||||
# Author: George Shapovalov <george@gentoo.org>
|
||||
# Purpose: Contains common vars/locations and functions for use by gnat.eclass,
|
||||
# gnat.eselect and gnatbuild.eclass.
|
||||
#
|
||||
# NOTE!!!
|
||||
# This code should just define vars (try to limit these!) and simple functions.
|
||||
# No bash extensions!!
|
||||
# That is, no portage or eclass constructs are allowed!
|
||||
#
|
||||
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Globals
|
||||
|
||||
# Environmantal stuff (for env update)
|
||||
SPECSDIR="/usr/share/gnat/eselect"
|
||||
ENVDIR="/etc/env.d"
|
||||
MARKER="55gnat-"
|
||||
|
||||
# User configurable settings
|
||||
SETTINGSDIR="/etc/ada"
|
||||
PRIMELIST="${SETTINGSDIR}/primary_compilers"
|
||||
|
||||
## Lib install locations
|
||||
##
|
||||
## Gnat profile dependent files go under under ${LibTop}/${Gnat_Profile}/${PN}
|
||||
## and common files go unde SpecsDir, DataDir
|
||||
#PREFIX=/usr
|
||||
## Replace %LIBDIR% below with $(get_libdir) in eclasses and ebuilds (top level Ok, inherit multilib)
|
||||
## or $(profile2libdir ${profile}) in this code, eselect module or anywhere
|
||||
## outside portage (as profile will be available only during actual execution, this only should
|
||||
## be done inside corresponding functions).
|
||||
#AdalibSpecsDir=${PREFIX}/include/ada
|
||||
#AdalibDataDir=${PREFIX}/share/ada
|
||||
#AdalibLibTop=${PREFIX}/%LIBDIR%/ada
|
||||
|
||||
|
||||
# ------------------------------------
|
||||
# Helpers
|
||||
#
|
||||
|
||||
# get_all_profile_components splits gnat profile and returns pace separated list of its components:
|
||||
# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> x86_64-pc-linux-gnu gcc 4.1
|
||||
# args:
|
||||
# $1 - the string to split
|
||||
get_all_profile_components() {
|
||||
local GnatSLOT=${1##*-}
|
||||
local remainder=${1%-*}
|
||||
local GnatPkg=${remainder##*-}
|
||||
remainder=${remainder%-gnat-*}
|
||||
echo "${remainder} ${GnatPkg} ${GnatSLOT}"
|
||||
}
|
||||
|
||||
# similar to above, returns only SLOT component:
|
||||
# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> 4.1
|
||||
# args:
|
||||
# $1 - the string to extract the slot from
|
||||
get_gnat_SLOT() {
|
||||
echo "${1##*-}"
|
||||
}
|
||||
|
||||
# returns only Pkg component:
|
||||
# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> gcc
|
||||
# args:
|
||||
# $1 - the string to extract the slot from
|
||||
get_gnat_Pkg() {
|
||||
local remainder=${1%-*}
|
||||
echo "${remainder##*-}"
|
||||
}
|
||||
|
||||
# returns only Arch component:
|
||||
# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> x86_64-pc-linux-gnu
|
||||
# args:
|
||||
# $1 - the string to extract the slot from
|
||||
get_gnat_Arch() {
|
||||
echo ${1%-gnat-*}
|
||||
}
|
||||
|
||||
|
||||
|
||||
## -------------------------------------------
|
||||
# gnat profile and lib detection functions
|
||||
|
||||
|
||||
# create a list of all gnat env.d files
|
||||
# for now use trivial implementation - store name of active profile in the
|
||||
# env file name, so it gets called 55gnat-${ARCH}-${PN}-${SLOT}
|
||||
get_env_list() {
|
||||
for fn in ${ENVDIR}/${MARKER}*; do
|
||||
echo $(basename ${fn})
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
# find all installed compilers and return a list
|
||||
find_all_compilers() {
|
||||
[[ ! -d ${SPECSDIR} ]] && exit
|
||||
for fn in ${SPECSDIR}/*; do
|
||||
[[ ! -d ${fn} ]] && echo $(basename ${fn});
|
||||
done
|
||||
}
|
||||
|
||||
# find installed primary compilers and return a list
|
||||
find_primary_compilers() {
|
||||
[[ ! -f ${PRIMELIST} ]] && exit
|
||||
for fn in $(cat ${PRIMELIST}); do
|
||||
[[ -f ${SPECSDIR}/${fn} ]] && echo ${fn};
|
||||
done
|
||||
}
|
||||
|
||||
# find installed libs and return a list
|
||||
find_all_libs() {
|
||||
[[ ! -d ${SPECSDIR} ]] && exit
|
||||
for fn in ${SPECSDIR}/*; do
|
||||
[[ -d ${fn} ]] && echo $(basename ${fn});
|
||||
done
|
||||
}
|
||||
|
||||
# find libs that have been built for a given profile
|
||||
# Arguments:
|
||||
# $1 - gnat profile for which to detect active libs
|
||||
find_libs4profile() {
|
||||
libs=( $(find_all_libs) )
|
||||
|
||||
for (( i = 0 ; i < ${#libs[@]} ; i = i + 1 )) ; do
|
||||
[[ -f ${SPECSDIR}/${libs[$i]}/$1 ]] && echo "${libs[$i]}"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
## -----------------------
|
||||
# main action - central part of do_set and helpers
|
||||
|
||||
|
||||
# extracts values of the passed var definition from given spec file
|
||||
# params:
|
||||
# $1: spec file (as generated by gnabuild.eclass)
|
||||
# $2: variable name
|
||||
get_var_from_spec() {
|
||||
local var=$(grep -e "^ *$2=" $1|cut -d= -f2)
|
||||
echo ${var}
|
||||
}
|
||||
|
||||
|
||||
# Cycle through given libs and form a ':' separated list of settings for the given
|
||||
# var. Repeating settings are omitted, that is unique entry is added only first
|
||||
# time it is encountered.
|
||||
#
|
||||
# params:
|
||||
# $1 - name of env var to process
|
||||
# $2 - name of gnat profile
|
||||
# $3.. - list of libs to check (to avoid its composition every time)
|
||||
# - the list is expanded to list of args at the point of call
|
||||
get_lib_var_settings() {
|
||||
local envVar=$1
|
||||
local toset=$2
|
||||
#echo "get_lib_var_settings params:$@" >> /tmp/eselect-gnat.rep
|
||||
if [[ "none" != ${3} ]]; then
|
||||
local envString
|
||||
local specLine=$(get_var_from_spec ${SPECSDIR}/$3/${toset} ${envVar})
|
||||
if [[ -n ${specLine} ]]; then
|
||||
envString="${specLine}"
|
||||
fi
|
||||
shift
|
||||
#
|
||||
while [[ -n $3 ]]; do
|
||||
specLine=$(get_var_from_spec ${SPECSDIR}/$3/${toset} ${envVar})
|
||||
#echo "$3:${specLine}." >> /tmp/eselect-gnat.rep
|
||||
if [[ -n ${specLine} ]] && [[ ! ${envString} =~ ${specLine} ]]; then
|
||||
envString="${envString}:${specLine}"
|
||||
fi
|
||||
shift
|
||||
done
|
||||
echo "${envString}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
# The action!
|
||||
# Part common for do_set and do_update of gnat.eselect, also used in gnat.eclass
|
||||
# to set environment during lib build and installation
|
||||
#
|
||||
# params:
|
||||
# $1 - profile to set (toset param inside)
|
||||
# $2 - envfile
|
||||
|
||||
generate_envFile() {
|
||||
local toset=$1
|
||||
local envfile=$2
|
||||
|
||||
local binpath="$(get_var_from_spec ${SPECSDIR}/${toset} binpath)"
|
||||
local libexecpath="$(get_var_from_spec ${SPECSDIR}/${toset} libexecpath)"
|
||||
local libs=( $(find_libs4profile ${toset}) )
|
||||
#echo "generate_envFile: ${libs[@]}" >> /tmp/eselect-gnat.rep
|
||||
if (( 0 == ${#libs[@]} )); then
|
||||
libs="none"
|
||||
fi
|
||||
|
||||
local MyPath="${binpath}:${libexecpath}:$(get_lib_var_settings PATH ${toset} ${libs[@]})"
|
||||
echo "PATH=${MyPath}" > "${envfile}"
|
||||
echo "ROOTPATH=${MyPath}" >> "${envfile}"
|
||||
echo "MANPATH=$(get_var_from_spec ${SPECSDIR}/${toset} manpath):$(get_lib_var_settings MANPATH ${toset} ${libs[@]})" >> "${envfile}"
|
||||
echo "INFOPATH=$(get_var_from_spec ${SPECSDIR}/${toset} infopath):$(get_lib_var_settings INFOPATH ${toset} ${libs[@]})" >> "${envfile}"
|
||||
# the next three use the common base
|
||||
local libBase=$(get_var_from_spec ${SPECSDIR}/${toset} ldpath)
|
||||
echo "COMPILER_PATH=${libexecpath}:${libBase}:" >> "${envfile}"
|
||||
echo "LDPATH=${libBase}:${libBase}/adalib:$(get_lib_var_settings LDPATH ${toset} ${libs[@]})" >> "${envfile}"
|
||||
echo "ADA_INCLUDE_PATH=${libBase}/adainclude:$(get_lib_var_settings ADA_INCLUDE_PATH ${toset} ${libs[@]})" >> "${envfile}"
|
||||
echo "ADA_OBJECTS_PATH=${libBase}/adalib:$(get_lib_var_settings ADA_OBJECTS_PATH ${toset} ${libs[@]})" >> "${envfile}"
|
||||
# ADA_PROJECT_PATH may not be set in any of the installed packages,
|
||||
# we should only create this line if cumulative var is non-empty
|
||||
My_ProjectPath=$(get_lib_var_settings ADA_PROJECT_PATH ${toset} ${libs[@]})
|
||||
if [[ -n ${My_ProjectPath} ]]; then
|
||||
echo "ADA_PROJECT_PATH=${My_ProjectPath}" >> "${envfile}"
|
||||
fi
|
||||
}
|
||||
|
@ -0,0 +1,91 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit rpm eutils multilib versionator
|
||||
|
||||
MY_PV=$(get_version_component_range 1-3)
|
||||
|
||||
DESCRIPTION="Translations for the Libreoffice suite"
|
||||
HOMEPAGE="http://www.libreoffice.org"
|
||||
BASE_SRC_URI_TESTING="http://download.documentfoundation.org/${PN/-l10n/}/testing/${MY_PV}/rpm"
|
||||
BASE_SRC_URI_STABLE="http://download.documentfoundation.org/${PN/-l10n/}/stable/${MY_PV}/rpm"
|
||||
|
||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="offlinehelp"
|
||||
|
||||
#
|
||||
# when changing the language lists, please be careful to preserve the spaces (bug 491728)
|
||||
#
|
||||
LANGUAGES_HELP=" am ast bg bn_IN bn bo bs ca_valencia ca cs da de dz el en_GB en en_ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl pt_BR pt ru si sk sl sq sv tg tr ug uk vi zh_CN zh_TW "
|
||||
LANGUAGES="${LANGUAGES_HELP}af ar as be br brx cy dgo fa ga gd gug kk kmr_Latn kn kok ks lb lo lt lv mai ml mn mni mr my nr nso oc or pa_IN ro rw sa_IN sat sd sid sr_Latn sr ss st sw_TZ ta te th tn ts tt uz ve xh zu "
|
||||
|
||||
for lang in ${LANGUAGES_HELP}; do
|
||||
helppack=""
|
||||
[[ ${lang} == en ]] && lang2=${lang/en/en_US} || lang2=${lang}
|
||||
helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz )"
|
||||
SRC_URI+=" linguas_${lang}? ( ${helppack} )"
|
||||
done
|
||||
for lang in ${LANGUAGES}; do
|
||||
langpack=""
|
||||
[[ ${lang} == en ]] \
|
||||
|| langpack="${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz"
|
||||
[[ -z ${langpack} ]] || SRC_URI+=" linguas_${lang}? ( ${langpack} )"
|
||||
IUSE+=" linguas_${lang}"
|
||||
done
|
||||
unset lang helppack langpack lang2
|
||||
|
||||
RDEPEND+="app-text/hunspell"
|
||||
|
||||
RESTRICT="strip"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
local lang dir rpmdir
|
||||
|
||||
# First remove dictionaries, we want to use system ones.
|
||||
find "${S}" -name *dict*.rpm -delete || die "Failed to remove dictionaries"
|
||||
|
||||
for lang in ${LANGUAGES}; do
|
||||
# break away if not enabled; paludis support
|
||||
use_if_iuse linguas_${lang} || continue
|
||||
|
||||
dir=${lang/_/-}
|
||||
|
||||
# for english we provide just helppack, as translation is always there
|
||||
if [[ ${lang} != en ]]; then
|
||||
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_langpack_${dir}/RPMS/"
|
||||
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
|
||||
rpm_unpack ./${rpmdir}/*.rpm
|
||||
fi
|
||||
if [[ "${LANGUAGES_HELP}" =~ " ${lang} " ]] && use offlinehelp; then
|
||||
[[ ${lang} == en ]] && dir="en-US"
|
||||
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_helppack_${dir}/RPMS/"
|
||||
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
|
||||
rpm_unpack ./${rpmdir}/*.rpm
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_configure() { :; }
|
||||
src_compile() { :; }
|
||||
|
||||
src_install() {
|
||||
local dir="${S}"/opt/${PN/-l10n/}$(get_version_component_range 1-2)/
|
||||
# Condition required for people that do not install anything eg no linguas
|
||||
# or just english with no offlinehelp.
|
||||
if [[ -d "${dir}" ]] ; then
|
||||
insinto /usr/$(get_libdir)/${PN/-l10n/}/
|
||||
doins -r "${dir}"/*
|
||||
fi
|
||||
# remove extensions that are in the l10n for some weird reason
|
||||
rm -rf "${ED}"usr/$(get_libdir)/${PN/-l10n/}/share/extensions/ || \
|
||||
die "Failed to remove extensions"
|
||||
}
|
@ -0,0 +1,563 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
KDE_REQUIRED="optional"
|
||||
QT_MINIMAL="4.7.4"
|
||||
KDE_SCM="git"
|
||||
CMAKE_REQUIRED="never"
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
|
||||
PYTHON_REQ_USE="threads,xml"
|
||||
|
||||
# experimental ; release ; old
|
||||
# Usually the tarballs are moved a lot so this should make
|
||||
# everyone happy.
|
||||
DEV_URI="
|
||||
http://dev-builds.libreoffice.org/pre-releases/src
|
||||
http://download.documentfoundation.org/libreoffice/src/${PV:0:5}/
|
||||
http://download.documentfoundation.org/libreoffice/old/${PV}/
|
||||
"
|
||||
EXT_URI="http://ooo.itc.hu/oxygenoffice/download/libreoffice"
|
||||
ADDONS_URI="http://dev-www.libreoffice.org/src/"
|
||||
|
||||
BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
|
||||
# PATCHSET="${P}-patchset-01.tar.xz"
|
||||
|
||||
[[ ${PV} == *9999* ]] && SCM_ECLASS="git-r3"
|
||||
inherit multiprocessing autotools bash-completion-r1 check-reqs eutils java-pkg-opt-2 kde4-base pax-utils python-single-r1 multilib toolchain-funcs flag-o-matic versionator ${SCM_ECLASS}
|
||||
unset SCM_ECLASS
|
||||
|
||||
DESCRIPTION="A full office productivity suite"
|
||||
HOMEPAGE="http://www.libreoffice.org"
|
||||
SRC_URI="branding? ( http://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
|
||||
[[ -n ${PATCHSET} ]] && SRC_URI+=" http://dev.gentooexperimental.org/~scarabeus/${PATCHSET}"
|
||||
|
||||
# Split modules following git/tarballs
|
||||
# Core MUST be first!
|
||||
# Help is used for the image generator
|
||||
MODULES="core help"
|
||||
# Only release has the tarballs
|
||||
if [[ ${PV} != *9999* ]]; then
|
||||
for i in ${DEV_URI}; do
|
||||
for mod in ${MODULES}; do
|
||||
if [[ ${mod} == core ]]; then
|
||||
SRC_URI+=" ${i}/${P}.tar.xz"
|
||||
else
|
||||
SRC_URI+=" ${i}/${PN}-${mod}-${PV}.tar.xz"
|
||||
fi
|
||||
done
|
||||
unset mod
|
||||
done
|
||||
unset i
|
||||
fi
|
||||
unset DEV_URI
|
||||
|
||||
# Really required addons
|
||||
# These are bundles that can't be removed for now due to huge patchsets.
|
||||
# If you want them gone, patches are welcome.
|
||||
ADDONS_SRC=(
|
||||
"${ADDONS_URI}/ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz" # modifies source code
|
||||
"collada? ( ${ADDONS_URI}/4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 )"
|
||||
"java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
|
||||
# no release for 8 years, should we package it?
|
||||
"libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )"
|
||||
# Does not build with 1.6 rhino at all
|
||||
"libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )"
|
||||
# requirement of rhino
|
||||
"libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )"
|
||||
# not packageable
|
||||
"odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )"
|
||||
)
|
||||
SRC_URI+=" ${ADDONS_SRC[*]}"
|
||||
|
||||
unset ADDONS_URI
|
||||
unset EXT_URI
|
||||
unset ADDONS_SRC
|
||||
|
||||
# Unpackaged separate extensions:
|
||||
# diagram: lo has 0.9.5 upstream is weirdly patched 0.9.4 -> wtf?
|
||||
# hunart: only on ooo extensions -> fubared download path somewhere on sf
|
||||
# numbertext, typo, validator, watch-window: ^^
|
||||
# oooblogger: no homepage or anything
|
||||
# Extensions that need extra work:
|
||||
LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
|
||||
|
||||
IUSE="bluetooth +branding coinmp collada +cups dbus debug eds firebird gltf gnome gstreamer
|
||||
+gtk gtk3 jemalloc kde libressl mysql odk postgres telepathy test vlc
|
||||
$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
|
||||
|
||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
||||
SLOT="0"
|
||||
[[ ${PV} == *9999* ]] || \
|
||||
KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
COMMON_DEPEND="
|
||||
${PYTHON_DEPS}
|
||||
app-arch/zip
|
||||
app-arch/unzip
|
||||
app-text/hunspell
|
||||
app-text/mythes
|
||||
>=app-text/libabw-0.1.0
|
||||
app-text/libexttextcat
|
||||
>=app-text/libebook-0.1
|
||||
>=app-text/libetonyek-0.1
|
||||
app-text/liblangtag
|
||||
>=app-text/libmspub-0.1.0
|
||||
>=app-text/libmwaw-0.3.1
|
||||
>=app-text/libodfgen-0.1.0
|
||||
app-text/libwpd:0.10[tools]
|
||||
app-text/libwpg:0.3
|
||||
>=app-text/libwps-0.4
|
||||
app-text/poppler:=[cxx]
|
||||
>=dev-cpp/clucene-2.3.3.4-r2
|
||||
=dev-cpp/libcmis-0.5*
|
||||
dev-db/unixODBC
|
||||
>=dev-libs/boost-1.55:=
|
||||
dev-libs/expat
|
||||
dev-libs/hyphen
|
||||
dev-libs/icu:=
|
||||
>=dev-libs/liborcus-0.11.2
|
||||
dev-libs/librevenge
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
>=dev-lang/perl-5.0
|
||||
!libressl? ( >=dev-libs/openssl-1.0.0d:0 )
|
||||
libressl? ( dev-libs/libressl )
|
||||
>=dev-libs/redland-1.0.16
|
||||
media-gfx/graphite2
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype:2
|
||||
>=media-libs/glew-1.10
|
||||
>=media-libs/harfbuzz-0.9.18:=[icu(+)]
|
||||
media-libs/lcms:2
|
||||
>=media-libs/libpng-1.4:0=
|
||||
>=media-libs/libcdr-0.1.0
|
||||
>=media-libs/libfreehand-0.1.0
|
||||
media-libs/libpagemaker
|
||||
>=media-libs/libvisio-0.1.0
|
||||
net-misc/curl
|
||||
net-libs/neon
|
||||
net-nds/openldap
|
||||
sci-mathematics/lpsolve
|
||||
virtual/jpeg:0
|
||||
x11-libs/cairo[X,-xlib-xcb]
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
virtual/glu
|
||||
virtual/opengl
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
coinmp? ( sci-libs/coinor-mp )
|
||||
collada? ( >=media-libs/opencollada-1.2.2_p20150207 )
|
||||
cups? ( net-print/cups )
|
||||
dbus? ( dev-libs/dbus-glib )
|
||||
eds? (
|
||||
dev-libs/glib:2
|
||||
gnome-extra/evolution-data-server
|
||||
)
|
||||
firebird? ( >=dev-db/firebird-2.5 )
|
||||
gltf? ( media-libs/libgltf )
|
||||
gtk? (
|
||||
x11-libs/gdk-pixbuf
|
||||
>=x11-libs/gtk+-2.24:2
|
||||
)
|
||||
gtk3? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/gobject-introspection
|
||||
>=x11-libs/gtk+-3.8:3
|
||||
)
|
||||
gstreamer? (
|
||||
media-libs/gstreamer:1.0
|
||||
media-libs/gst-plugins-base:1.0
|
||||
)
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
|
||||
libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
|
||||
mysql? ( dev-db/mysql-connector-c++ )
|
||||
postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
|
||||
telepathy? ( net-libs/telepathy-glib )
|
||||
"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!app-office/libreoffice-bin
|
||||
!app-office/libreoffice-bin-debug
|
||||
!app-office/openoffice
|
||||
media-fonts/libertine
|
||||
media-fonts/liberation-fonts
|
||||
media-fonts/urw-fonts
|
||||
java? ( >=virtual/jre-1.6 )
|
||||
kde? ( $(add_kdeapps_dep kioclient) )
|
||||
vlc? ( media-video/vlc )
|
||||
"
|
||||
|
||||
if [[ ${PV} != *9999* ]]; then
|
||||
PDEPEND="=app-office/libreoffice-l10n-$(get_version_component_range 1-2)*"
|
||||
else
|
||||
# Translations are not reliable on live ebuilds
|
||||
# rather force people to use english only.
|
||||
PDEPEND="!app-office/libreoffice-l10n"
|
||||
fi
|
||||
|
||||
# FIXME: cppunit should be moved to test conditional
|
||||
# after everything upstream is under gbuild
|
||||
# as dmake execute tests right away
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=dev-libs/libatomic_ops-7.2d
|
||||
>=dev-libs/libxml2-2.7.8
|
||||
dev-libs/libxslt
|
||||
dev-perl/Archive-Zip
|
||||
dev-util/cppunit
|
||||
>=dev-util/gperf-3
|
||||
dev-util/intltool
|
||||
>=dev-util/mdds-1.2.0:1=
|
||||
media-libs/glm
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
sys-devel/gettext
|
||||
!<sys-devel/make-3.82
|
||||
sys-devel/ucpp
|
||||
sys-libs/zlib
|
||||
virtual/pkgconfig
|
||||
x11-libs/libXt
|
||||
x11-libs/libXtst
|
||||
x11-proto/randrproto
|
||||
x11-proto/xextproto
|
||||
x11-proto/xineramaproto
|
||||
x11-proto/xproto
|
||||
java? (
|
||||
>=virtual/jdk-1.6
|
||||
>=dev-java/ant-core-1.7
|
||||
)
|
||||
odk? ( >=app-doc/doxygen-1.8.4 )
|
||||
test? ( dev-util/cppunit )
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
${PYTHON_REQUIRED_USE}
|
||||
bluetooth? ( dbus )
|
||||
collada? ( gltf )
|
||||
eds? ( gnome )
|
||||
gnome? ( gtk )
|
||||
telepathy? ( gtk )
|
||||
libreoffice_extensions_nlpsolver? ( java )
|
||||
libreoffice_extensions_scripting-beanshell? ( java )
|
||||
libreoffice_extensions_scripting-javascript? ( java )
|
||||
libreoffice_extensions_wiki-publisher? ( java )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# not upstreamable stuff
|
||||
"${FILESDIR}/${PN}-5.2-system-pyuno.patch"
|
||||
)
|
||||
|
||||
CHECKREQS_MEMORY="512M"
|
||||
|
||||
if [[ ${MERGE_TYPE} != binary ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
|
||||
CHECKREQS_DISK_BUILD="22G"
|
||||
elif [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
CHECKREQS_DISK_BUILD="6G"
|
||||
fi
|
||||
|
||||
pkg_pretend() {
|
||||
use java || \
|
||||
ewarn "If you plan to use lbase application you should enable java or you will get various crashes."
|
||||
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
check-reqs_pkg_pretend
|
||||
|
||||
if [[ $(gcc-major-version) -lt 4 ]] || {
|
||||
[[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]]; }
|
||||
then
|
||||
eerror "Compilation with gcc older than 4.7 is not supported"
|
||||
die "Too old gcc found."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Ensure pg version but we have to be sure the pg is installed (first
|
||||
# install on clean system)
|
||||
if use postgres && has_version dev-db/postgresql; then
|
||||
local pgslot=$(postgresql-config show)
|
||||
if [[ ${pgslot//.} -lt 90 ]] ; then
|
||||
eerror "PostgreSQL slot must be set to 9.0 or higher."
|
||||
eerror " postgresql-config set 9.0"
|
||||
die "PostgreSQL slot is not set to 9.0 or higher."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
kde4-base_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
|
||||
[[ ${MERGE_TYPE} != binary ]] && check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local mod
|
||||
|
||||
[[ -n ${PATCHSET} ]] && unpack ${PATCHSET}
|
||||
use branding && unpack "${BRANDING}"
|
||||
|
||||
if [[ ${PV} != *9999* ]]; then
|
||||
unpack "${P}.tar.xz"
|
||||
for mod in ${MODULES}; do
|
||||
[[ ${mod} == core ]] && continue
|
||||
unpack "${PN}-${mod}-${PV}.tar.xz"
|
||||
done
|
||||
else
|
||||
local base_uri branch checkout mypv
|
||||
base_uri="git://anongit.freedesktop.org"
|
||||
for mod in ${MODULES}; do
|
||||
branch="master"
|
||||
mypv=${PV/.9999}
|
||||
[[ ${mypv} != ${PV} ]] && branch="${PN}-${mypv/./-}"
|
||||
git-r3_fetch "${base_uri}/${PN}/${mod}" "refs/heads/${branch}"
|
||||
[[ ${mod} != core ]] && checkout="${S}/${mod}"
|
||||
[[ ${mod} == help ]] && checkout="helpcontent2" # doesn't match on help
|
||||
git-r3_checkout "${base_uri}/${PN}/${mod}" ${checkout}
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
[[ -n ${PATCHSET} ]] && eapply "${WORKDIR}/${PATCHSET/.tar.xz/}"
|
||||
eapply "${PATCHES[@]}"
|
||||
eapply_user
|
||||
|
||||
AT_M4DIR="m4" eautoreconf
|
||||
# hack in the autogen.sh
|
||||
touch autogen.lastrun
|
||||
|
||||
# system pyuno mess
|
||||
sed -i \
|
||||
-e "s:%eprefix%:${EPREFIX}:g" \
|
||||
-e "s:%libdir%:$(get_libdir):g" \
|
||||
pyuno/source/module/uno.py \
|
||||
pyuno/source/officehelper.py || die
|
||||
# sed in the tests
|
||||
sed -i \
|
||||
-e "s#all : build unitcheck#all : build#g" \
|
||||
solenv/gbuild/Module.mk || die
|
||||
sed -i \
|
||||
-e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \
|
||||
-e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \
|
||||
Makefile.in || die
|
||||
|
||||
if use branding; then
|
||||
# hack...
|
||||
mv -v "${WORKDIR}/branding-intro.png" "${S}/icon-themes/galaxy/brand/intro.png" || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local java_opts
|
||||
local ext_opts
|
||||
|
||||
# optimization flags
|
||||
export GMAKE_OPTIONS="${MAKEOPTS}"
|
||||
# System python enablement:
|
||||
export PYTHON_CFLAGS=$(python_get_CFLAGS)
|
||||
export PYTHON_LIBS=$(python_get_LIBS)
|
||||
|
||||
if use collada; then
|
||||
export OPENCOLLADA_CFLAGS="-I/usr/include/opencollada/COLLADABaseUtils -I/usr/include/opencollada/COLLADAFramework -I/usr/include/opencollada/COLLADASaxFrameworkLoader -I/usr/include/opencollada/GeneratedSaxParser"
|
||||
export OPENCOLLADA_LIBS="-L /usr/$(get_libdir)/opencollada -lOpenCOLLADABaseUtils -lOpenCOLLADAFramework -lOpenCOLLADASaxFrameworkLoader -lGeneratedSaxParser"
|
||||
fi
|
||||
|
||||
# libreoffice extensions handling
|
||||
for lo_xt in ${LO_EXTS}; do
|
||||
if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
|
||||
ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt})"
|
||||
else
|
||||
ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt})"
|
||||
fi
|
||||
done
|
||||
|
||||
if use java; then
|
||||
# hsqldb: system one is too new
|
||||
java_opts="
|
||||
--without-junit
|
||||
--without-system-hsqldb
|
||||
--with-ant-home="${ANT_HOME}"
|
||||
--with-jdk-home=$(java-config --jdk-home 2>/dev/null)
|
||||
--with-jvm-path="${EPREFIX}/usr/lib/"
|
||||
"
|
||||
|
||||
use libreoffice_extensions_scripting-beanshell && \
|
||||
java_opts+=" --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)"
|
||||
|
||||
use libreoffice_extensions_scripting-javascript && \
|
||||
java_opts+=" --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar)"
|
||||
fi
|
||||
|
||||
# system headers/libs/...: enforce using system packages
|
||||
# --enable-cairo: ensure that cairo is always required
|
||||
# --enable-graphite: disabling causes build breakages
|
||||
# --enable-*-link: link to the library rather than just dlopen on runtime
|
||||
# --enable-release-build: build the libreoffice as release
|
||||
# --disable-fetch-external: prevent dowloading during compile phase
|
||||
# --disable-systray: quickstarter does not actually work at all so do not
|
||||
# promote it
|
||||
# --enable-extension-integration: enable any extension integration support
|
||||
# --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
|
||||
# --disable-report-builder: too much java packages pulled in without pkgs
|
||||
# --without-system-sane: just sane.h header that is used for scan in writer,
|
||||
# not linked or anything else, worthless to depend on
|
||||
econf \
|
||||
--docdir="${EPREFIX}/usr/share/doc/${PF}/" \
|
||||
--with-system-headers \
|
||||
--with-system-libs \
|
||||
--with-system-jars \
|
||||
--with-system-dicts \
|
||||
--enable-cairo-canvas \
|
||||
--enable-graphite \
|
||||
--enable-largefile \
|
||||
--enable-mergelibs \
|
||||
--enable-neon \
|
||||
--enable-python=system \
|
||||
--enable-randr \
|
||||
--enable-release-build \
|
||||
--disable-hardlink-deliver \
|
||||
--disable-ccache \
|
||||
--disable-crashdump \
|
||||
--disable-dependency-tracking \
|
||||
--disable-epm \
|
||||
--disable-fetch-external \
|
||||
--disable-gstreamer-0-10 \
|
||||
--disable-report-builder \
|
||||
--disable-online-update \
|
||||
--disable-systray \
|
||||
--with-alloc=$(use jemalloc && echo "jemalloc" || echo "system") \
|
||||
--with-build-version="Gentoo official package" \
|
||||
--enable-extension-integration \
|
||||
--with-external-dict-dir="${EPREFIX}/usr/share/myspell" \
|
||||
--with-external-hyph-dir="${EPREFIX}/usr/share/myspell" \
|
||||
--with-external-thes-dir="${EPREFIX}/usr/share/myspell" \
|
||||
--with-external-tar="${DISTDIR}" \
|
||||
--with-lang="" \
|
||||
--with-parallelism=$(makeopts_jobs) \
|
||||
--with-system-ucpp \
|
||||
--with-vendor="Gentoo Foundation" \
|
||||
--with-x \
|
||||
--without-fonts \
|
||||
--without-myspell-dicts \
|
||||
--without-help \
|
||||
--with-helppack-integration \
|
||||
--without-sun-templates \
|
||||
--without-system-sane \
|
||||
$(use_enable bluetooth sdremote-bluetooth) \
|
||||
$(use_enable coinmp) \
|
||||
$(use_enable collada) \
|
||||
$(use_enable cups) \
|
||||
$(use_enable debug) \
|
||||
$(use_enable dbus) \
|
||||
$(use_enable eds evolution2) \
|
||||
$(use_enable firebird firebird-sdbc) \
|
||||
$(use_enable gltf) \
|
||||
$(use_enable gnome gio) \
|
||||
$(use_enable gstreamer gstreamer-1-0) \
|
||||
$(use_enable gtk) \
|
||||
$(use_enable gtk3) \
|
||||
$(use_enable kde kde4) \
|
||||
$(use_enable mysql ext-mariadb-connector) \
|
||||
$(use_enable odk) \
|
||||
$(use_enable postgres postgresql-sdbc) \
|
||||
$(use_enable telepathy) \
|
||||
$(use_enable vlc) \
|
||||
$(use_with coinmp system-coinmp) \
|
||||
$(use_with collada system-opencollada) \
|
||||
$(use_with gltf system-libgltf) \
|
||||
$(use_with java) \
|
||||
$(use_with mysql system-mysql-cppconn) \
|
||||
$(use_with odk doxygen) \
|
||||
${java_opts} \
|
||||
${ext_opts}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# more and more LO stuff tries to use OpenGL, including tests during build
|
||||
# bug 501508, bug 540624, bug 545974 and probably more
|
||||
addpredict /dev/dri
|
||||
addpredict /dev/ati
|
||||
addpredict /dev/nvidiactl
|
||||
|
||||
# hack for offlinehelp, this needs fixing upstream at some point
|
||||
# it is broken because we send --without-help
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=46506
|
||||
(
|
||||
grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk" || die
|
||||
source "${T}/config_host.mk" 2&> /dev/null
|
||||
|
||||
local path="${WORKDIR}/helpcontent2/source/auxiliary/"
|
||||
mkdir -p "${path}" || die
|
||||
|
||||
echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=icon-themes/galaxy/res/helpimg > \"${path}/helpimg.ilst\""
|
||||
perl "${S}/helpcontent2/helpers/create_ilst.pl" \
|
||||
-dir=icon-themes/galaxy/res/helpimg \
|
||||
> "${path}/helpimg.ilst"
|
||||
[[ -s "${path}/helpimg.ilst" ]] || \
|
||||
ewarn "The help images list is empty, something is fishy, report a bug."
|
||||
)
|
||||
|
||||
local target
|
||||
use test && target="build" || target="build-nocheck"
|
||||
|
||||
# this is not a proper make script
|
||||
make ${target} || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
make unitcheck || die
|
||||
make slowcheck || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# This is not Makefile so no buildserver
|
||||
make DESTDIR="${D}" distro-pack-install -o build -o check || die
|
||||
|
||||
# Fix bash completion placement
|
||||
newbashcomp "${ED}"usr/share/bash-completion/completions/libreoffice.sh ${PN}
|
||||
bashcomp_alias \
|
||||
libreoffice \
|
||||
unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice
|
||||
|
||||
if use branding; then
|
||||
insinto /usr/$(get_libdir)/${PN}/program
|
||||
newins "${WORKDIR}/branding-sofficerc" sofficerc
|
||||
dodir /etc/env.d
|
||||
echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"etc/env.d/99${PN} || die
|
||||
fi
|
||||
|
||||
# Hack for offlinehelp, this needs fixing upstream at some point.
|
||||
# It is broken because we send --without-help
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=46506
|
||||
insinto /usr/$(get_libdir)/libreoffice/help
|
||||
doins xmlhelp/util/*.xsl
|
||||
|
||||
# Remove desktop files for support to old installs that can't parse mime
|
||||
rm -r "${ED}"usr/share/mimelnk/ || die
|
||||
|
||||
# FIXME: Hack add missing file
|
||||
exeinto /usr/$(get_libdir)/${PN}/program
|
||||
doexe "${S}"/instdir/program/libsaxlo.so
|
||||
|
||||
pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/soffice.bin
|
||||
pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Cache updates - all handled by kde eclass for all environments
|
||||
kde4-base_pkg_preinst
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
kde4-base_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
kde4-base_pkg_postrm
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
--- a/abbrev.c
|
||||
+++ b/abbrev.c
|
||||
@@ -122,7 +122,7 @@
|
||||
del_abbr(char *abbrev)
|
||||
{
|
||||
struct abbrev *a;
|
||||
- struct abbrev **prev;
|
||||
+ struct abbrev **prev = NULL;
|
||||
|
||||
if (!(a = find_abbr(abbrev, strlen(abbrev), prev)))
|
||||
return;
|
||||
--- a/help.c
|
||||
+++ b/help.c
|
||||
@@ -14,6 +14,10 @@
|
||||
#include "sc.h"
|
||||
#endif /* QREF */
|
||||
|
||||
+#ifdef TROFF
|
||||
+#include <stdlib.h>
|
||||
+#endif /* TROFF */
|
||||
+
|
||||
char *intro[] = {
|
||||
" ",
|
||||
#if defined(QREF) && defined(TROFF)
|
||||
--- a/lex.c
|
||||
+++ b/lex.c
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#ifdef IEEE_MATH
|
||||
#include <ieeefp.h>
|
||||
+#else
|
||||
+#include <math.h>
|
||||
#endif /* IEEE_MATH */
|
||||
|
||||
#include <stdlib.h>
|
||||
--- a/sc.h
|
||||
+++ b/sc.h
|
||||
@@ -14,6 +14,9 @@
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
+#include <unistd.h>
|
||||
+#include <curses.h>
|
||||
+
|
||||
#define ATBL(tbl, row, col) (*(tbl + row) + (col))
|
||||
|
||||
#define MINROWS 100 /* minimum size at startup */
|
||||
@@ -390,6 +393,7 @@
|
||||
extern char *v_name(int row, int col);
|
||||
extern double eval(register struct enode *e);
|
||||
extern int any_locked_cells(int r1, int c1, int r2, int c2);
|
||||
+extern int are_abbrevs();
|
||||
extern int are_colors();
|
||||
extern int are_frames();
|
||||
extern int are_ranges();
|
||||
@@ -425,6 +429,7 @@
|
||||
extern struct crange *find_crange(int row, int col);
|
||||
extern struct frange *find_frange(int row, int col);
|
||||
extern void EvalAll();
|
||||
+extern void add_abbr(char *string);
|
||||
extern void add_crange(struct ent *r_left, struct ent *r_right, int pair);
|
||||
extern void add_frange(struct ent *or_left, struct ent *or_right,
|
||||
struct ent *ir_left, struct ent *ir_right, int toprows, int bottomrows,
|
||||
@@ -434,6 +439,7 @@
|
||||
extern void addplugin(char *ext, char *plugin, char type);
|
||||
extern void backcol(int arg);
|
||||
extern void backrow(int arg);
|
||||
+extern void center(int sr, int sc, int er, int ec);
|
||||
extern void change_color(int pair, struct enode *e);
|
||||
extern void checkbounds(int *rowp, int *colp);
|
||||
extern void clearent(struct ent *v);
|
||||
@@ -456,9 +462,12 @@
|
||||
extern void diesave();
|
||||
extern void doend(int rowinc, int colinc);
|
||||
extern void doformat(int c1, int c2, int w, int p, int r);
|
||||
+extern void dogetkey();
|
||||
extern void dupcol();
|
||||
extern void duprow();
|
||||
extern void doquery(char *s, char *data, int fd);
|
||||
+extern void doeval(struct enode *e, char *fmt, int row, int col, int fd);
|
||||
+extern void doseval(struct enode *e, int row, int col, int fd);
|
||||
extern void dostat(int fd);
|
||||
extern void dotick(int tick);
|
||||
extern void editexp(int row, int col);
|
||||
@@ -486,11 +495,14 @@
|
||||
extern void free_ent(register struct ent *p, int unlock);
|
||||
extern void getexp(int r0, int c0, int rn, int cn, int fd);
|
||||
extern void getfmt(int r0, int c0, int rn, int cn, int fd);
|
||||
+extern void getframe(int fd);
|
||||
extern void getformat(int col, int fd);
|
||||
extern void getnum(int r0, int c0, int rn, int cn, int fd);
|
||||
+extern void getrange(char *name, int fd);
|
||||
extern void getstring(int r0, int c0, int rn, int cn, int fd);
|
||||
extern void go_last();
|
||||
extern void goraw();
|
||||
+extern void gotonote();
|
||||
extern void help();
|
||||
extern void hide_col(int arg);
|
||||
extern void hide_row(int arg);
|
||||
@@ -507,6 +519,8 @@
|
||||
extern void label(register struct ent *v, register char *s, int flushdir);
|
||||
extern void let(struct ent *v, struct enode *e);
|
||||
extern void list_colors(FILE *f);
|
||||
+extern void ljustify(int sr, int sc, int er, int ec);
|
||||
+extern void list_frames(FILE *f);
|
||||
extern void list_ranges(FILE *f);
|
||||
extern void lock_cells(struct ent *v1, struct ent *v2);
|
||||
extern void markcell();
|
||||
@@ -523,6 +537,7 @@
|
||||
extern void read_hist();
|
||||
extern void remember(int save);
|
||||
extern void resetkbd();
|
||||
+extern void rjustify(int sr, int sc, int er, int ec);
|
||||
extern void rowshow_op();
|
||||
extern void scxfree(char *p);
|
||||
extern void setauto(int i);
|
||||
@@ -560,6 +575,9 @@
|
||||
extern void write_line(int c);
|
||||
extern void write_ranges(FILE *f);
|
||||
extern void yank_area(int sr, int sc, int er, int ec);
|
||||
+extern void yankcol(int arg);
|
||||
+extern void yankr(struct ent *v1, struct ent *v2);
|
||||
+extern void yankrow(int arg);
|
||||
extern void yyerror(char *err);
|
||||
extern int yylex();
|
||||
extern int yyparse();
|
||||
--- a/screen.c
|
||||
+++ b/screen.c
|
||||
@@ -870,7 +870,7 @@
|
||||
}
|
||||
} /* else */
|
||||
} else
|
||||
- if (!*pp && color && has_colors && cr && cr->r_color != 1) {
|
||||
+ if (!*pp && color && has_colors() && cr && cr->r_color != 1) {
|
||||
move(r, c);
|
||||
color_set(cr->r_color, NULL);
|
||||
printw("%*s", fwidth[col], " ");
|
||||
--- a/vi.c
|
||||
+++ b/vi.c
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
+#include <sys/wait.h>
|
||||
#ifdef BSD42
|
||||
#include <strings.h>
|
||||
#else
|
@ -0,0 +1,102 @@
|
||||
--- a/sc.c
|
||||
+++ b/sc.c
|
||||
@@ -520,7 +520,7 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
- if (redraw) printf(redraw);
|
||||
+ if (redraw) printf("%s", redraw);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
--- a/gram.y
|
||||
+++ b/gram.y
|
||||
@@ -1010,7 +1010,7 @@
|
||||
| S_PLUGOUT STRING '=' STRING
|
||||
{ addplugin($2, $4, 'w'); }
|
||||
| PLUGIN { *line = '|';
|
||||
- sprintf(line + 1, $1);
|
||||
+ sprintf(line + 1, "%s", $1);
|
||||
readfile(line, 0);
|
||||
scxfree($1); }
|
||||
| /* nothing */
|
||||
--- a/vmtbl.c
|
||||
+++ b/vmtbl.c
|
||||
@@ -61,10 +61,10 @@
|
||||
oldptr = newptr /* wait incase we can't alloc */
|
||||
|
||||
#ifndef PSC
|
||||
-static char nolonger[] = "The table can't be any longer";
|
||||
+#define NOLONGER "The table can't be any longer"
|
||||
#endif /* !PSC */
|
||||
|
||||
-static char nowider[] = "The table can't be any wider";
|
||||
+#define NOWIDER "The table can't be any wider"
|
||||
|
||||
/*
|
||||
* grow the main && auxiliary tables (reset maxrows/maxcols as needed)
|
||||
@@ -117,7 +117,7 @@
|
||||
if ((rowcol == GROWCOL) || (rowcol == GROWBOTH)) {
|
||||
if ((rowcol == GROWCOL) && ((maxcols == ABSMAXCOLS) ||
|
||||
(topcol >= ABSMAXCOLS))) {
|
||||
- error(nowider);
|
||||
+ error(NOWIDER);
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
@@ -135,14 +135,14 @@
|
||||
struct ent *** lnullit;
|
||||
int lcnt;
|
||||
|
||||
- GROWALLOC(row_hidden2, row_hidden, newrows, char, nolonger);
|
||||
+ GROWALLOC(row_hidden2, row_hidden, newrows, char, NOLONGER);
|
||||
memset(row_hidden+maxrows, 0, (newrows-maxrows)*sizeof(char));
|
||||
|
||||
/*
|
||||
* alloc tbl row pointers, per net.lang.c, calloc does not
|
||||
* necessarily fill in NULL pointers
|
||||
*/
|
||||
- GROWALLOC(tbl2, tbl, newrows, struct ent **, nolonger);
|
||||
+ GROWALLOC(tbl2, tbl, newrows, struct ent **, NOLONGER);
|
||||
for (lnullit = tbl+maxrows, lcnt = 0; lcnt < newrows-maxrows;
|
||||
lcnt++, lnullit++)
|
||||
*lnullit = (struct ent **)NULL;
|
||||
@@ -151,16 +151,16 @@
|
||||
#endif /* !PSC */
|
||||
|
||||
if ((rowcol == GROWCOL) || (rowcol == GROWBOTH) || (rowcol == GROWNEW)) {
|
||||
- GROWALLOC(fwidth2, fwidth, newcols, int, nowider);
|
||||
- GROWALLOC(precision2, precision, newcols, int, nowider);
|
||||
- GROWALLOC(realfmt2, realfmt, newcols, int, nowider);
|
||||
+ GROWALLOC(fwidth2, fwidth, newcols, int, NOWIDER);
|
||||
+ GROWALLOC(precision2, precision, newcols, int, NOWIDER);
|
||||
+ GROWALLOC(realfmt2, realfmt, newcols, int, NOWIDER);
|
||||
#ifdef PSC
|
||||
memset(fwidth+maxcols, 0, (newcols-maxcols)*sizeof(int));
|
||||
memset(precision+maxcols, 0, (newcols-maxcols)*sizeof(int));
|
||||
memset(realfmt+maxcols, 0, (newcols-maxcols)*sizeof(int));
|
||||
}
|
||||
#else
|
||||
- GROWALLOC(col_hidden2, col_hidden, newcols, char, nowider);
|
||||
+ GROWALLOC(col_hidden2, col_hidden, newcols, char, NOWIDER);
|
||||
memset(col_hidden+maxcols, 0, (newcols-maxcols)*sizeof(char));
|
||||
for (i = maxcols; i < newcols; i++) {
|
||||
fwidth[i] = DEFWIDTH;
|
||||
@@ -172,7 +172,7 @@
|
||||
for (i = 0; i < maxrows; i++) {
|
||||
if ((tbl[i] = (struct ent **)scxrealloc((char *)tbl[i],
|
||||
(unsigned)(newcols * sizeof(struct ent **)))) == (struct ent **)0) {
|
||||
- error(nowider);
|
||||
+ error(NOWIDER);
|
||||
return(FALSE);
|
||||
}
|
||||
for (nullit = ATBL(tbl, i, maxcols), cnt = 0;
|
||||
@@ -190,7 +190,7 @@
|
||||
for (; i < newrows; i++) {
|
||||
if ((tbl[i] = (struct ent **)scxmalloc((unsigned)(newcols *
|
||||
sizeof(struct ent **)))) == (struct ent **)0) {
|
||||
- error(nowider);
|
||||
+ error(NOWIDER);
|
||||
return(FALSE);
|
||||
}
|
||||
for (nullit = tbl[i], cnt = 0; cnt < newcols; cnt++, nullit++)
|
@ -0,0 +1,69 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
inherit eutils multilib toolchain-funcs
|
||||
|
||||
DESCRIPTION="Spreadsheet Calculator"
|
||||
SRC_URI="ftp://ibiblio.org/pub/Linux/apps/financial/spreadsheet/${P}.tar.gz"
|
||||
HOMEPAGE="http://ibiblio.org/pub/Linux/apps/financial/spreadsheet/"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="public-domain"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=sys-libs/ncurses-5.2
|
||||
"
|
||||
DEPEND="
|
||||
virtual/pkgconfig
|
||||
"
|
||||
RDEPEND="
|
||||
${COMMON_DEPEND}
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-amd64.patch
|
||||
"${FILESDIR}"/${P}-lex-syntax.patch
|
||||
"${FILESDIR}"/${P}-c.patch
|
||||
"${FILESDIR}"/${P}-printf.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e "/^prefix=/ s:/usr:${D}/usr:" \
|
||||
-e "/^MANDIR=/ s:${prefix}/man:${prefix}/share/man:" \
|
||||
-e "/^LIBDIR=/ s:${prefix}/lib:${prefix}/$(get_libdir):" \
|
||||
-e '/^LIB=/s|-lncurses|$(shell ${PKG_CONFIG} --libs ncurses)|g' \
|
||||
-e "/^CC=/ s:gcc:$(tc-getCC):" \
|
||||
-e "/^CFLAGS/ s:=-DSYSV3 -O2 -pipe:+=-DSYSV3:" \
|
||||
-e "/strip/ s:^:#:g" \
|
||||
Makefile || die
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
tc-export PKG_CONFIG
|
||||
# no autoconf
|
||||
emake prefix="${D}"/usr
|
||||
|
||||
emake ${PN}.1
|
||||
sed -i -e "s:${D}::g" sc.1 || die
|
||||
}
|
||||
|
||||
src_install () {
|
||||
dodir /usr/bin
|
||||
dodir /usr/$(get_libdir)/sc
|
||||
dodir /usr/share/man/man1
|
||||
|
||||
emake install
|
||||
|
||||
doman sc.1 psc.1
|
||||
|
||||
dodoc CHANGES README tutorial.sc
|
||||
dodoc VMS_NOTES ${P}.lsm TODO SC.MACROS
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST mupdf-1.5.tar.gz 7485699 SHA256 946393c7abf78e50fa9815f18a9e91f275a1a96a7ea14ae39b5237944070d1f5 SHA512 bfb79838eba629295ab164cf37e49edc8846689598fbad9312409535022a2e747bd062718b899909564c6cf5826fb46a2b4b579ced8c7a3896d6098e7e5ccf40 WHIRLPOOL ebcaf5f677984a78aecf9eeb72e7a79e6e2a6388db5024427d8bf55f31b3690844dd291ada3cd578a5bb9a370ea21cb2a044656c21a0ef47cdf7bfc42c842beb
|
||||
DIST mupdf-1.8.tar.gz 7706473 SHA256 d4e06644caad381d1dc88401dae12ee614809a7b95f6dcbf6fd086d5b594dcc4 SHA512 6adc30330c61d0bb8c9ee09488ef31701e9a7425cbac76e072eae9816c14a1190a1e2bd1e9155b6892d4198f7d8692661582cc1b82c7caab7b3ba4fddfcc7461 WHIRLPOOL 9fceca049cf5eaffd1520a0077c78bd8647d8e5b384eb2c1bc968a16349b46909b592cb8cbd5ee0546e798434afbece39a258e175ba02d0454b8edc35e179dd7
|
||||
DIST mupdf-1.9a.tar.gz 13282205 SHA256 2a7d6d73cd1f6de8f70792dff9936b84c54c127feecd485675e0d0c17debc98d SHA512 aa268484371597f2082bff61052b3f80e30b8d41018bf0477b8975e4520849090b75e6c4be6be15d6af9cea6d9315deb28f82c6afc8b6f3c5bfc3498eca91140 WHIRLPOOL b552e68d0412e723e23c645516e87d695e00af0c88b14ab1ebc6b65e374f525fab6df2b5f81fe72fc8a61a8a9f616712ef0d215a07327745d33fb0238509eac9
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- mupdf-1.9a/Makerules
|
||||
+++ mupdf-1.9a/Makerules
|
||||
@@ -10,7 +10,7 @@
|
||||
CFLAGS += -Wall
|
||||
|
||||
ifeq "$(build)" "debug"
|
||||
-CFLAGS += -pipe -g -DDEBUG
|
||||
+CFLAGS += -DDEBUG
|
||||
LDFLAGS += -g
|
||||
else ifeq "$(build)" "release"
|
||||
CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
|
@ -0,0 +1,10 @@
|
||||
--- mupdf-1.9a/Makefile
|
||||
+++ mupdf-1.9a/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
# GNU Makefile
|
||||
|
||||
-build ?= release
|
||||
+build ?= debug
|
||||
|
||||
OUT := build/$(build)
|
||||
GEN := generated
|
@ -0,0 +1,113 @@
|
||||
--- mupdf-1.9a/Makefile
|
||||
+++ mupdf-1.9a/Makefile
|
||||
@@ -142,15 +141,12 @@
|
||||
# --- Library ---
|
||||
|
||||
MUPDF_LIB = $(OUT)/libmupdf.a
|
||||
-THIRD_LIB = $(OUT)/libmupdfthird.a
|
||||
|
||||
MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
|
||||
-THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(JPEG_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ)
|
||||
|
||||
$(MUPDF_LIB) : $(MUPDF_OBJ)
|
||||
-$(THIRD_LIB) : $(THIRD_OBJ)
|
||||
|
||||
-INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
|
||||
+INSTALL_LIBS := $(MUPDF_LIB)
|
||||
|
||||
# --- Rules ---
|
||||
|
||||
@@ -251,19 +247,19 @@
|
||||
MUTOOL := $(addprefix $(OUT)/, mutool)
|
||||
MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o mudraw.o murun.o pdfclean.o pdfcreate.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o pdfpages.o pdfmerge.o)
|
||||
$(MUTOOL_OBJ): $(FITZ_HDR) $(PDF_HDR)
|
||||
-$(MUTOOL) : $(MUPDF_LIB) $(THIRD_LIB)
|
||||
+$(MUTOOL) : $(MUPDF_LIB)
|
||||
$(MUTOOL) : $(MUTOOL_OBJ)
|
||||
$(LINK_CMD)
|
||||
|
||||
MJSGEN := $(OUT)/mjsgen
|
||||
-$(MJSGEN) : $(MUPDF_LIB) $(THIRD_LIB)
|
||||
+$(MJSGEN) : $(MUPDF_LIB)
|
||||
$(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.o)
|
||||
$(LINK_CMD)
|
||||
|
||||
MUJSTEST := $(OUT)/mujstest
|
||||
MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o)
|
||||
$(MUJSTEST_OBJ) : $(FITZ_HDR) $(PDF_HDR)
|
||||
-$(MUJSTEST) : $(MUPDF_LIB) $(THIRD_LIB)
|
||||
+$(MUJSTEST) : $(MUPDF_LIB)
|
||||
$(MUJSTEST) : $(MUJSTEST_OBJ)
|
||||
$(LINK_CMD)
|
||||
|
||||
@@ -271,7 +267,7 @@
|
||||
MUVIEW_X11 := $(OUT)/mupdf-x11
|
||||
MUVIEW_X11_OBJ := $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
|
||||
$(MUVIEW_X11_OBJ) : $(FITZ_HDR) $(PDF_HDR)
|
||||
-$(MUVIEW_X11) : $(MUPDF_LIB) $(THIRD_LIB)
|
||||
+$(MUVIEW_X11) : $(MUPDF_LIB)
|
||||
$(MUVIEW_X11) : $(MUVIEW_X11_OBJ)
|
||||
$(LINK_CMD) $(X11_LIBS)
|
||||
|
||||
@@ -279,7 +275,7 @@
|
||||
MUVIEW_GLFW := $(OUT)/mupdf-gl
|
||||
MUVIEW_GLFW_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.o gl-input.o gl-main.o)
|
||||
$(MUVIEW_GLFW_OBJ) : $(FITZ_HDR) $(PDF_HDR) platform/gl/gl-app.h
|
||||
-$(MUVIEW_GLFW) : $(MUPDF_LIB) $(THIRD_LIB) $(GLFW_LIB)
|
||||
+$(MUVIEW_GLFW) : $(MUPDF_LIB) $(GLFW_LIB)
|
||||
$(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ)
|
||||
$(LINK_CMD) $(GLFW_LIBS)
|
||||
endif
|
||||
@@ -288,7 +284,7 @@
|
||||
MUVIEW_X11_CURL := $(OUT)/mupdf-x11-curl
|
||||
MUVIEW_X11_CURL_OBJ := $(addprefix $(OUT)/platform/x11/curl/, x11_main.o x11_image.o pdfapp.o curl_stream.o)
|
||||
$(MUVIEW_X11_CURL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
|
||||
-$(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(THIRD_LIB) $(CURL_LIB)
|
||||
+$(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(CURL_LIB)
|
||||
$(MUVIEW_X11_CURL) : $(MUVIEW_X11_CURL_OBJ)
|
||||
$(LINK_CMD) $(X11_LIBS) $(CURL_LIBS) $(SYS_CURL_DEPS)
|
||||
endif
|
||||
@@ -298,7 +294,7 @@
|
||||
MUVIEW_WIN32 := $(OUT)/mupdf
|
||||
MUVIEW_WIN32_OBJ := $(addprefix $(OUT)/platform/x11/, win_main.o pdfapp.o win_res.o)
|
||||
$(MUVIEW_WIN32_OBJ) : $(FITZ_HDR) $(PDF_HDR)
|
||||
-$(MUVIEW_WIN32) : $(MUPDF_LIB) $(THIRD_LIB)
|
||||
+$(MUVIEW_WIN32) : $(MUPDF_LIB)
|
||||
$(MUVIEW_WIN32) : $(MUVIEW_WIN32_OBJ)
|
||||
$(LINK_CMD) $(WIN32_LIBS)
|
||||
endif
|
||||
@@ -312,9 +308,9 @@
|
||||
|
||||
examples: $(OUT)/example $(OUT)/multi-threaded
|
||||
|
||||
-$(OUT)/example: docs/example.c $(MUPDF_LIB) $(THIRD_LIB)
|
||||
+$(OUT)/example: docs/example.c $(MUPDF_LIB)
|
||||
$(LINK_CMD) $(CFLAGS)
|
||||
-$(OUT)/multi-threaded: docs/multi-threaded.c $(MUPDF_LIB) $(THIRD_LIB)
|
||||
+$(OUT)/multi-threaded: docs/multi-threaded.c $(MUPDF_LIB)
|
||||
$(LINK_CMD) $(CFLAGS) -lpthread
|
||||
|
||||
# --- Update version string header ---
|
||||
@@ -343,7 +339,6 @@
|
||||
mandir ?= $(prefix)/share/man
|
||||
docdir ?= $(prefix)/share/doc/mupdf
|
||||
|
||||
-third: $(THIRD_LIB)
|
||||
extra: $(CURL_LIB) $(GLFW_LIB)
|
||||
libs: $(INSTALL_LIBS)
|
||||
apps: $(INSTALL_APPS)
|
||||
@@ -376,7 +371,7 @@
|
||||
java:
|
||||
$(MAKE) -C platform/java
|
||||
|
||||
-tags: $(shell find include source platform thirdparty -name '*.[ch]' -or -name '*.cc' -or -name '*.hh')
|
||||
+tags: $(shell find include source platform -name '*.[ch]' -or -name '*.cc' -or -name '*.hh')
|
||||
ctags $^
|
||||
|
||||
cscope.files: $(shell find include source platform -name '*.[ch]')
|
||||
@@ -397,4 +392,4 @@
|
||||
debug:
|
||||
$(MAKE) build=debug
|
||||
|
||||
-.PHONY: all clean nuke install third libs apps generate
|
||||
+.PHONY: all clean nuke install libs apps generate
|
@ -0,0 +1,144 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs vcs-snapshot
|
||||
|
||||
DESCRIPTION="a lightweight PDF viewer and toolkit written in portable C"
|
||||
HOMEPAGE="http://mupdf.com/"
|
||||
SRC_URI="http://git.ghostscript.com/?p=mupdf.git;a=snapshot;h=027860688eafc89ca3d57937a77a43a9bb96f590;sf=tgz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="AGPL-3"
|
||||
MY_SOVER=1.9
|
||||
SLOT="0/${MY_SOVER}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="X vanilla +curl libressl opengl +openssl static static-libs"
|
||||
|
||||
LIB_DEPEND="
|
||||
!libressl? ( dev-libs/openssl:0[static-libs?] )
|
||||
libressl? ( dev-libs/libressl[static-libs?] )
|
||||
>=dev-lang/mujs-0_p20160504
|
||||
media-libs/freetype:2[static-libs?]
|
||||
media-libs/harfbuzz[static-libs?]
|
||||
media-libs/jbig2dec[static-libs?]
|
||||
media-libs/libpng:0[static-libs?]
|
||||
media-libs/openjpeg:2[static-libs?]
|
||||
net-misc/curl[static-libs?]
|
||||
virtual/jpeg[static-libs?]
|
||||
X? ( x11-libs/libX11[static-libs?]
|
||||
x11-libs/libXext[static-libs?] )
|
||||
opengl? ( >=media-libs/glfw-3 )"
|
||||
RDEPEND="${LIB_DEPEND}"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
static-libs? ( ${LIB_DEPEND} )
|
||||
static? ( ${LIB_DEPEND//?}
|
||||
app-arch/bzip2[static-libs]
|
||||
x11-libs/libXau[static-libs]
|
||||
x11-libs/libXdmcp[static-libs]
|
||||
x11-libs/libxcb[static-libs] )"
|
||||
|
||||
REQUIRED_USE="opengl? ( X !static !static-libs )"
|
||||
|
||||
src_prepare() {
|
||||
use hppa && append-cflags -ffunction-sections
|
||||
|
||||
rm -rf thirdparty || die
|
||||
|
||||
epatch \
|
||||
"${FILESDIR}"/${PN}-1.9a-CFLAGS.patch \
|
||||
"${FILESDIR}"/${PN}-1.9a-debug-build.patch \
|
||||
"${FILESDIR}"/${PN}-1.5-old-debian-files.patch \
|
||||
"${FILESDIR}"/${PN}-1.3-pkg-config.patch \
|
||||
"${FILESDIR}"/${PN}-1.5-Makerules-openssl-curl.patch \
|
||||
"${FILESDIR}"/${PN}-1.9a-no-thirdlibs.patch \
|
||||
"${FILESDIR}"/${PN}-1.8-system-glfw.patch
|
||||
|
||||
if has_version ">=media-libs/openjpeg-2.1:2" ; then
|
||||
epatch \
|
||||
"${FILESDIR}"/${PN}-1.5-openjpeg-2.1.patch
|
||||
fi
|
||||
|
||||
sed -e "/^libdir=/s:/lib:/$(get_libdir):" \
|
||||
-e "/^prefix=/s:=.*:=${EROOT}/usr:" \
|
||||
-i platform/debian/${PN}.pc || die
|
||||
|
||||
use vanilla || epatch \
|
||||
"${FILESDIR}"/${PN}-1.3-zoom-2.patch
|
||||
|
||||
#http://bugs.ghostscript.com/show_bug.cgi?id=693467
|
||||
sed -e '/^\(Actions\|MimeType\)=/s:\(.*\):\1;:' \
|
||||
-i platform/debian/${PN}.desktop || die
|
||||
|
||||
sed -e "1iOS = Linux" \
|
||||
-e "1iCC = $(tc-getCC)" \
|
||||
-e "1iLD = $(tc-getCC)" \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "1iverbose = yes" \
|
||||
-e "1ibuild = debug" \
|
||||
-e "1iprefix = ${ED}usr" \
|
||||
-e "1ilibdir = ${ED}usr/$(get_libdir)" \
|
||||
-e "1idocdir = ${ED}usr/share/doc/${PF}" \
|
||||
-e "1iHAVE_X11 = $(usex X)" \
|
||||
-e "1iWANT_OPENSSL = $(usex openssl)" \
|
||||
-e "1iWANT_CURL = $(usex curl)" \
|
||||
-e "1iHAVE_MUJS = yes" \
|
||||
-e "1iMUJS_LIBS = -lmujs" \
|
||||
-e "1iMUJS_CFLAGS =" \
|
||||
-e "1iHAVE_GLFW = $(usex opengl yes no)" \
|
||||
-i Makerules || die
|
||||
|
||||
if use static-libs || use static ; then
|
||||
cp -a "${S}" "${S}"-static || die
|
||||
#add missing Libs.private for xcb and freetype
|
||||
sed -e 's:\(pkg-config --libs\):\1 --static:' \
|
||||
-e '/^SYS_X11_LIBS = /s:\(.*\):\1 -lpthread:' \
|
||||
-e '/^SYS_FREETYPE_LIBS = /s:\(.*\):\1 -lbz2:' \
|
||||
-i "${S}"-static/Makerules || die
|
||||
fi
|
||||
|
||||
my_soname=libmupdf.so.${MY_SOVER}
|
||||
my_soname_js_none=libmupdf-js-none.so.${MY_SOVER}
|
||||
sed -e "\$a\$(MUPDF_LIB): \$(MUPDF_JS_NONE_LIB)" \
|
||||
-e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname} -Wl,--no-undefined -o \$@ \$^ \$(MUPDF_JS_NONE_LIB) \$(LIBS)" \
|
||||
-e "/^MUPDF_LIB =/s:=.*:= \$(OUT)/${my_soname}:" \
|
||||
-e "\$a\$(MUPDF_JS_NONE_LIB):" \
|
||||
-e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname_js_none} -Wl,--no-undefined -o \$@ \$^ \$(LIBS)" \
|
||||
-e "/install/s: COPYING : :" \
|
||||
-i Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake XCFLAGS="-fpic"
|
||||
use static-libs && \
|
||||
emake -C "${S}"-static build/debug/lib${PN}{,-js-none}.a
|
||||
use static && \
|
||||
emake -C "${S}"-static XLIBS="-static"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use X ; then
|
||||
domenu platform/debian/${PN}.desktop
|
||||
doicon platform/debian/${PN}.xpm
|
||||
else
|
||||
rm docs/man/${PN}.1
|
||||
fi
|
||||
|
||||
emake install
|
||||
dosym ${my_soname} /usr/$(get_libdir)/lib${PN}.so
|
||||
|
||||
use static-libs && \
|
||||
dolib.a "${S}"-static/build/debug/lib${PN}{,-js-none}.a
|
||||
if use static ; then
|
||||
dobin "${S}"-static/build/debug/mu{tool,draw}
|
||||
use X && dobin "${S}"-static/build/debug/${PN}-x11
|
||||
fi
|
||||
use X && dosym ${PN}-x11 /usr/bin/${PN}
|
||||
|
||||
insinto /usr/$(get_libdir)/pkgconfig
|
||||
doins platform/debian/${PN}.pc
|
||||
|
||||
dodoc README docs/*.{txt,c}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
2013-08-22 Magnus Granberg <zorry@gentoo.org>
|
||||
|
||||
* gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var
|
||||
and move the process of the user specifed specs.
|
||||
|
||||
This allows us to easily control pie/ssp defaults with gcc-config profiles.
|
||||
Original patch by Rob Holland
|
||||
Extended to support multiple entries separated by ':' by Kevin F. Quinn
|
||||
Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
|
||||
Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg
|
||||
|
||||
--- gcc-4.8-20130210/gcc/gcc.c 2013-02-05 16:55:31.000000000 +0100
|
||||
+++ gcc-4.8-20130210-work/gcc/gcc.c 2013-07-26 02:32:14.625089864 +0200
|
||||
@@ -6427,6 +6428,48 @@ main (int argc, char **argv)
|
||||
do_option_spec (option_default_specs[i].name,
|
||||
option_default_specs[i].spec);
|
||||
|
||||
+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32))
|
||||
+ /* Add specs listed in GCC_SPECS. Note; in the process of separating
|
||||
+ * each spec listed, the string is overwritten at token boundaries
|
||||
+ * (':') with '\0', an effect of strtok_r().
|
||||
+ */
|
||||
+ specs_file = getenv ("GCC_SPECS");
|
||||
+ if (specs_file && (strlen(specs_file) > 0))
|
||||
+ {
|
||||
+ char *spec, *saveptr;
|
||||
+ for (spec=strtok_r(specs_file,":",&saveptr);
|
||||
+ spec!=NULL;
|
||||
+ spec=strtok_r(NULL,":",&saveptr))
|
||||
+ {
|
||||
+ struct user_specs *user = (struct user_specs *)
|
||||
+ xmalloc (sizeof (struct user_specs));
|
||||
+ user->next = (struct user_specs *) 0;
|
||||
+ user->filename = spec;
|
||||
+ if (user_specs_tail)
|
||||
+ user_specs_tail->next = user;
|
||||
+ else
|
||||
+ user_specs_head = user;
|
||||
+ user_specs_tail = user;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+ /* Process any user specified specs in the order given on the command
|
||||
+ * line. */
|
||||
+ for (uptr = user_specs_head; uptr; uptr = uptr->next)
|
||||
+ {
|
||||
+ char *filename = find_a_file (&startfile_prefixes, uptr->filename,
|
||||
+ R_OK, true);
|
||||
+ read_specs (filename ? filename : uptr->filename, false, true);
|
||||
+ }
|
||||
+ /* Process any user self specs. */
|
||||
+ {
|
||||
+ struct spec_list *sl;
|
||||
+ for (sl = specs; sl; sl = sl->next)
|
||||
+ if (sl->name_len == sizeof "self_spec" - 1
|
||||
+ && !strcmp (sl->name, "self_spec"))
|
||||
+ do_self_spec (*sl->ptr_spec);
|
||||
+ }
|
||||
+
|
||||
/* Process DRIVER_SELF_SPECS, adding any new options to the end
|
||||
of the command line. */
|
||||
|
||||
@@ -6535,24 +6578,6 @@ main (int argc, char **argv)
|
||||
PREFIX_PRIORITY_LAST, 0, 1);
|
||||
}
|
||||
|
||||
- /* Process any user specified specs in the order given on the command
|
||||
- line. */
|
||||
- for (uptr = user_specs_head; uptr; uptr = uptr->next)
|
||||
- {
|
||||
- char *filename = find_a_file (&startfile_prefixes, uptr->filename,
|
||||
- R_OK, true);
|
||||
- read_specs (filename ? filename : uptr->filename, false, true);
|
||||
- }
|
||||
-
|
||||
- /* Process any user self specs. */
|
||||
- {
|
||||
- struct spec_list *sl;
|
||||
- for (sl = specs; sl; sl = sl->next)
|
||||
- if (sl->name_len == sizeof "self_spec" - 1
|
||||
- && !strcmp (sl->name, "self_spec"))
|
||||
- do_self_spec (*sl->ptr_spec);
|
||||
- }
|
||||
-
|
||||
if (compare_debug)
|
||||
{
|
||||
enum save_temps save;
|
@ -0,0 +1,27 @@
|
||||
--- gcc/Makefile.in.orig 2016-05-20 15:01:04.277726220 -0700
|
||||
+++ gcc/Makefile.in 2016-05-20 18:40:43.658617109 -0700
|
||||
@@ -594,9 +594,9 @@
|
||||
# --------
|
||||
|
||||
# Directory in which the compiler finds libraries etc.
|
||||
-libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
|
||||
+libsubdir = $(libdir)/gnat-gcc/$(target_noncanonical)/SLOT_MARKER
|
||||
# Directory in which the compiler finds executables
|
||||
-libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
|
||||
+libexecsubdir = $(libexecdir)/gnat-gcc/$(target_noncanonical)/SLOT_MARKER
|
||||
# Directory in which all plugin resources are installed
|
||||
plugin_resourcesdir = $(libsubdir)/plugin
|
||||
# Directory in which plugin headers are installed
|
||||
@@ -1944,9 +1944,9 @@
|
||||
|
||||
DRIVER_DEFINES = \
|
||||
-DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
|
||||
- -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
|
||||
- -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
|
||||
- -DDEFAULT_TARGET_VERSION=\"$(version)\" \
|
||||
+ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gnat-gcc/\" \
|
||||
+ -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gnat-gcc/\" \
|
||||
+ -DDEFAULT_TARGET_VERSION=\"SLOT_MARKER\" \
|
||||
-DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \
|
||||
-DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \
|
||||
-DTOOLDIR_BASE_PREFIX=\"$(libsubdir_to_prefix)$(prefix_to_exec_prefix)\" \
|
@ -0,0 +1,86 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PATCH_VER="1.5"
|
||||
PIE_VER="0.6.4"
|
||||
SPECS_VER="0.2.0"
|
||||
SPECS_GCC_VER="4.4.3"
|
||||
PIE_GLIBC_STABLE="amd64 x86 mips ppc ppc64 arm"
|
||||
SSP_STABLE="amd64 x86 mips ppc ppc64 arm"
|
||||
|
||||
inherit gnatbuild-r1
|
||||
|
||||
DESCRIPTION="GNAT Ada Compiler - gcc version"
|
||||
HOMEPAGE="https://gcc.gnu.org/"
|
||||
LICENSE="GMGPL"
|
||||
|
||||
IUSE="acats doc hardened"
|
||||
|
||||
BOOT_SLOT="4.9"
|
||||
|
||||
# SLOT is set in gnatbuild-r1.eclass, depends only on PV (basically SLOT=GCCBRANCH)
|
||||
# so the URI's are static.
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
|
||||
# arm is armv7-hardfloat, no neon:
|
||||
# (--with-arch=armv7-a --with-mode=thumb --with-float=hard --with-fpu=vfpv3-d16)
|
||||
SRC_URI="mirror://gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2
|
||||
mirror://gentoo/gcc-${PV}-patches-${PATCH_VER}.tar.bz2
|
||||
mirror://gentoo/gcc-${PV}-piepatches-v${PIE_VER}.tar.bz2
|
||||
hardened? ( mirror://gentoo/gcc-${SPECS_GCC_VER}-specs-${SPECS_VER}.tar.bz2 )
|
||||
amd64? ( http://dev.gentoo.org/~nerdboy/files/gnatboot-${BOOT_SLOT}-amd64.tar.xz )
|
||||
arm? ( http://dev.gentoo.org/~nerdboy/files/gnatboot-${BOOT_SLOT}-arm.tar.xz )
|
||||
x86? ( http://dev.gentoo.org/~nerdboy/files/gnatboot-${BOOT_SLOT}-i686.tar.xz )"
|
||||
|
||||
# starting with 4.3.0 gnat needs these libs
|
||||
RDEPEND=">=dev-libs/mpfr-3.1.2
|
||||
>=dev-libs/gmp-5.1.3
|
||||
>=dev-libs/mpc-1.0.1
|
||||
>=sys-libs/zlib-1.2
|
||||
>=sys-libs/ncurses-5.7:0"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( >=sys-apps/texinfo-5 )"
|
||||
|
||||
if [[ ${CATEGORY} != cross-* ]] ; then
|
||||
PDEPEND="${PDEPEND} >=sys-libs/glibc-2.12"
|
||||
fi
|
||||
|
||||
src_prepare() {
|
||||
# See if we can enable boehm-gc for Ada
|
||||
#epatch "${FILESDIR}"/${PN}-4.9.3-enable-boehm-gc-for-Ada.patch
|
||||
|
||||
#fixup some hardwired flags
|
||||
pushd "${S}"/gcc/ada > /dev/null
|
||||
|
||||
# universal gcc -> gnatgcc substitution occasionally produces lines too long
|
||||
# and then build halts on the style check.
|
||||
#
|
||||
sed -i -e 's:gnatgcc:gcc:' osint.ads switch.ads ||
|
||||
die "reversing [gnat]gcc substitution in comments failed"
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
# gcc pretty much ignores --with-system-zlib. At least it still descends
|
||||
# into zlib and does configure and build there (gcc bug@7125?). For whatever
|
||||
# reason this conflicts with multilib in gcc-4.4..
|
||||
sed -i -e "s:libgui zlib:libgui:" "${S}"/configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# looks like gnatlib_and_tools and gnatlib_shared have become part of
|
||||
# bootstrap
|
||||
gnatbuild-r1_src_compile configure make-tools bootstrap
|
||||
}
|
||||
|
||||
src_install() {
|
||||
gnatbuild-r1_src_install
|
||||
|
||||
if use acats ; then
|
||||
insinto "${LIBPATH}"/acats
|
||||
doins -r "${S}"/gcc/testsuite/ada/acats/*
|
||||
fi
|
||||
}
|
@ -1,18 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<maintainer type="project">
|
||||
<email>ada@gentoo.org</email>
|
||||
<name>Gentoo Resources for Ada</name>
|
||||
<name>Gentoo Ada Project</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="lto">Add support for link-time optimizations (unsupported, use
|
||||
at your own risk).</flag>
|
||||
<flag name="acats">
|
||||
Installs ACATS source under LIBPATH.
|
||||
</flag>
|
||||
<flag name="lto">
|
||||
Enable Link Time Optimization (somewhat unsafe).
|
||||
</flag>
|
||||
</use>
|
||||
<longdescription>
|
||||
GNAT, the (GN)U (A)da (T)oolchain, is a high performance Ada 95
|
||||
development environment based on the mature GCC compiler technology. It
|
||||
implements the full Ada 95 language defined by the ISO standard and is upward
|
||||
compatible with Ada 83. This is an FSF supported version, integrated with gcc.
|
||||
</longdescription>
|
||||
<longdescription>
|
||||
GNAT, the (GN)U (A)da (T)oolchain, is a high performance Ada 95 development
|
||||
environment based on the mature GCC compiler technology. It implements the
|
||||
full Ada 95 language defined by the ISO standard and is upward compatible
|
||||
with Ada 83. This is an FSF supported version, integrated with gcc.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:gnu:gcc</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
@ -0,0 +1,493 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
|
||||
|
||||
PATCH_VER=2
|
||||
|
||||
PERL_OLDVERSEN=""
|
||||
MODULE_AUTHOR=RJBS
|
||||
|
||||
SHORT_PV="${PV%.*}"
|
||||
MY_P="perl-${PV/_rc/-RC}"
|
||||
MY_PV="${PV%_rc*}"
|
||||
|
||||
DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
|
||||
|
||||
SRC_URI="
|
||||
mirror://cpan/src/5.0/${MY_P}.tar.bz2
|
||||
mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MY_P}.tar.bz2
|
||||
mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.xz
|
||||
https://dev.gentoo.org/~dilfridge/distfiles/${MY_P}-patches-${PATCH_VER}.tar.xz
|
||||
"
|
||||
HOMEPAGE="http://www.perl.org/"
|
||||
|
||||
LICENSE="|| ( Artistic GPL-1+ )"
|
||||
SLOT="0/${SHORT_PV}"
|
||||
KEYWORDS="~alpha ~amd64 ~amd64-fbsd ~amd64-linux ~arm ~arm64 ~hppa ~hppa-hpux ~ia64 ~ia64-hpux ~ia64-linux ~m68k ~m68k-mint ~mips ~ppc ~ppc64 ~ppc-aix ~ppc-macos ~s390 ~sh ~sparc ~sparc64-solaris ~sparc-solaris ~x64-freebsd ~x64-macos ~x64-solaris ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~x86-linux ~x86-macos ~x86-solaris"
|
||||
IUSE="berkdb debug doc gdbm ithreads"
|
||||
|
||||
RDEPEND="
|
||||
berkdb? ( sys-libs/db:* )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.3 )
|
||||
app-arch/bzip2
|
||||
sys-libs/zlib
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
!prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
|
||||
"
|
||||
PDEPEND="
|
||||
>=app-admin/perl-cleaner-2.5
|
||||
>=virtual/perl-File-Temp-0.230.400-r2
|
||||
>=virtual/perl-Data-Dumper-2.154.0
|
||||
virtual/perl-Test-Harness
|
||||
"
|
||||
# bug 390719, bug 523624
|
||||
# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
dual_scripts() {
|
||||
src_remove_dual perl-core/Archive-Tar 2.40.0 ptar ptardiff ptargrep
|
||||
src_remove_dual perl-core/Digest-SHA 5.950.0 shasum
|
||||
src_remove_dual perl-core/CPAN 2.110.0 cpan
|
||||
src_remove_dual perl-core/Encode 2.800.0 enc2xs piconv
|
||||
src_remove_dual perl-core/ExtUtils-MakeMaker 7.100.100_rc instmodsh
|
||||
src_remove_dual perl-core/ExtUtils-ParseXS 3.310.0 xsubpp
|
||||
src_remove_dual perl-core/IO-Compress 2.69.0 zipdetails
|
||||
src_remove_dual perl-core/JSON-PP 2.273.0 json_pp
|
||||
src_remove_dual perl-core/Module-CoreList 5.201.605.60 corelist
|
||||
src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
|
||||
src_remove_dual perl-core/Pod-Perldoc 3.250.200_rc perldoc
|
||||
src_remove_dual perl-core/Test-Harness 3.360.0 prove
|
||||
src_remove_dual perl-core/podlators 4.70.0 pod2man pod2text
|
||||
src_remove_dual_man perl-core/podlators 4.70.0 /usr/share/man/man1/perlpodstyle.1
|
||||
}
|
||||
|
||||
check_rebuild() {
|
||||
if has_version "<dev-lang/perl-${SHORT_PV}" ; then
|
||||
echo ""
|
||||
ewarn "UPDATE THE PERL MODULES:"
|
||||
ewarn "After updating dev-lang/perl the installed Perl modules"
|
||||
ewarn "have to be re-installed. In most cases, this is done automatically"
|
||||
ewarn "by the package manager, but you should still call perl-cleaner to"
|
||||
ewarn "make sure your system is consistent."
|
||||
ewarn "Use: perl-cleaner --all"
|
||||
elif has_version dev-lang/perl ; then
|
||||
if ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
|
||||
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
|
||||
( use debug && ! has_version dev-lang/perl[debug] ) || \
|
||||
( ! use debug && has_version dev-lang/perl[debug] ) ; then
|
||||
echo ""
|
||||
ewarn "TOGGLED USE-FLAGS WARNING:"
|
||||
ewarn "You changed one of the use-flags ithreads or debug."
|
||||
ewarn "You must rebuild all perl-modules installed."
|
||||
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
case ${CHOST} in
|
||||
*-freebsd*) osname="freebsd" ;;
|
||||
*-dragonfly*) osname="dragonfly" ;;
|
||||
*-netbsd*) osname="netbsd" ;;
|
||||
*-openbsd*) osname="openbsd" ;;
|
||||
*-darwin*) osname="darwin" ;;
|
||||
*-interix*) osname="interix" ;;
|
||||
*-aix*) osname="aix" ;;
|
||||
*-cygwin*) osname="cygwin" ;;
|
||||
*) osname="linux" ;;
|
||||
esac
|
||||
|
||||
myarch="${CHOST%%-*}-${osname}"
|
||||
if use debug ; then
|
||||
myarch+="-debug"
|
||||
fi
|
||||
if use ithreads ; then
|
||||
mythreading="-multi"
|
||||
myarch+="-thread"
|
||||
fi
|
||||
|
||||
LIBPERL="libperl$(get_libname ${MY_PV} )"
|
||||
PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}"
|
||||
ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
|
||||
SITE_LIB="/usr/local/$(get_libdir)/perl5/${MY_PV}"
|
||||
SITE_ARCH="/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
|
||||
VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}"
|
||||
VENDOR_ARCH="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}"
|
||||
|
||||
dual_scripts
|
||||
}
|
||||
|
||||
src_remove_dual_file() {
|
||||
local i pkg ver
|
||||
pkg="$1"
|
||||
ver="$2"
|
||||
shift 2
|
||||
case "${EBUILD_PHASE:-none}" in
|
||||
postinst|postrm)
|
||||
for i in "$@" ; do
|
||||
alternatives_auto_makesym "${i}" "${i}-[0-9]*"
|
||||
done
|
||||
;;
|
||||
setup)
|
||||
for i in "$@" ; do
|
||||
if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
|
||||
has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
install)
|
||||
for i in "$@" ; do
|
||||
if ! [[ -f "${ED}"${i} ]] ; then
|
||||
ewarn "${i} does not exist!"
|
||||
continue
|
||||
fi
|
||||
mv "${ED}"${i}{,-${ver}-${P}} || die
|
||||
done
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_remove_dual_man() {
|
||||
local i pkg ver ff
|
||||
pkg="$1"
|
||||
ver="$2"
|
||||
shift 2
|
||||
case "${EBUILD_PHASE:-none}" in
|
||||
postinst|postrm)
|
||||
for i in "$@" ; do
|
||||
ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
|
||||
ff=${ff##*${i#${i%.[0-9]}}}
|
||||
alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
|
||||
done
|
||||
;;
|
||||
install)
|
||||
for i in "$@" ; do
|
||||
if ! [[ -f "${ED}"${i} ]] ; then
|
||||
ewarn "${i} does not exist!"
|
||||
continue
|
||||
fi
|
||||
mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
|
||||
done
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_remove_dual() {
|
||||
local i pkg ver
|
||||
pkg="$1"
|
||||
ver="$2"
|
||||
shift 2
|
||||
for i in "$@" ; do
|
||||
src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
|
||||
src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
|
||||
done
|
||||
}
|
||||
|
||||
src_prepare_update_patchlevel_h() {
|
||||
# Copied and modified from debian:
|
||||
# Copyright 2011 Niko Tyni
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
local patchdir="${WORKDIR}/patches"
|
||||
local prefix
|
||||
local patchoutput="patchlevel-gentoo.h"
|
||||
|
||||
[[ -f ${patchdir}/series ]] || return 0
|
||||
|
||||
while read patch
|
||||
do
|
||||
patchname=$(echo $patch | sed 's/\.diff$//')
|
||||
< $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
|
||||
|
||||
# massage the patch headers
|
||||
s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
|
||||
s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
|
||||
s|^Bug-Gentoo: ||; tprepend;
|
||||
s/^\(Subject\|Description\): //; tappend;
|
||||
s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
|
||||
|
||||
# post-process at the end of input
|
||||
$ { x;
|
||||
# include the version number in the patchlevel.h description (if available)
|
||||
s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
|
||||
|
||||
# escape any backslashes and double quotes
|
||||
s|\\|\\\\|g; s|"|\\"|g;
|
||||
|
||||
# add a prefix
|
||||
s|^|\t,"'"$prefix$patchname"' - |;
|
||||
# newlines away
|
||||
s/\n/ /g; s/ */ /g;
|
||||
# add a suffix
|
||||
s/ *$/"/; p
|
||||
};
|
||||
# stop all processing
|
||||
d;
|
||||
# label: append to the hold space
|
||||
:append H; d;
|
||||
# label: prepend to the hold space
|
||||
:prepend x; H; d;
|
||||
'
|
||||
done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
|
||||
echo "${patchoutput}" >> "${S}/MANIFEST"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patch
|
||||
EPATCH_OPTS+=" -p1"
|
||||
einfo "Applying patches from ${MY_P}-${PATCH_VER} ..."
|
||||
while read patch ; do
|
||||
EPATCH_SINGLE_MSG=" ${patch} ..."
|
||||
epatch "${WORKDIR}"/patches/${patch}
|
||||
done < "${WORKDIR}"/patches/series
|
||||
|
||||
src_prepare_update_patchlevel_h
|
||||
|
||||
if ! tc-is-static-only ; then
|
||||
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
|
||||
ln -s ${LIBPERL} libperl$(get_libname ) || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
myconf() {
|
||||
# the myconf array is declared in src_configure
|
||||
myconf=( "${myconf[@]}" "$@" )
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
declare -a myconf
|
||||
|
||||
export LC_ALL="C"
|
||||
[[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
|
||||
|
||||
# some arches and -O do not mix :)
|
||||
use ppc && replace-flags -O? -O1
|
||||
|
||||
# Perl has problems compiling with -Os in your flags with glibc
|
||||
use elibc_uclibc || replace-flags "-Os" "-O2"
|
||||
|
||||
# This flag makes compiling crash in interesting ways
|
||||
filter-flags "-malign-double"
|
||||
|
||||
# Fixes bug #97645
|
||||
use ppc && filter-flags "-mpowerpc-gpopt"
|
||||
|
||||
# Fixes bug #143895 on gcc-4.1.1
|
||||
filter-flags "-fsched2-use-superblocks"
|
||||
|
||||
use sparc && myconf -Ud_longdbl
|
||||
|
||||
export BUILD_BZIP2=0
|
||||
export BZIP2_INCLUDE=${EPREFIX}/usr/include
|
||||
export BZIP2_LIB=${EPREFIX}/usr/$(get_libdir)
|
||||
|
||||
export BUILD_ZLIB=False
|
||||
export ZLIB_INCLUDE=${EPREFIX}/usr/include
|
||||
export ZLIB_LIB=${EPREFIX}/usr/$(get_libdir)
|
||||
|
||||
# allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
|
||||
myndbm='U'
|
||||
mygdbm='U'
|
||||
mydb='U'
|
||||
if use gdbm ; then
|
||||
mygdbm='D'
|
||||
myndbm='D'
|
||||
fi
|
||||
if use berkdb ; then
|
||||
mydb='D'
|
||||
has_version '=sys-libs/db-1*' && myndbm='D'
|
||||
fi
|
||||
|
||||
myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
|
||||
|
||||
if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
|
||||
ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
|
||||
myconf -Ui_db -Ui_ndbm
|
||||
fi
|
||||
|
||||
use ithreads && myconf -Dusethreads
|
||||
|
||||
if use debug ; then
|
||||
append-cflags "-g"
|
||||
myconf -DDEBUGGING
|
||||
elif [[ ${CFLAGS} == *-g* ]] ; then
|
||||
myconf -DDEBUGGING=-g
|
||||
else
|
||||
myconf -DDEBUGGING=none
|
||||
fi
|
||||
|
||||
if [[ -n ${PERL_OLDVERSEN} ]] ; then
|
||||
local inclist=$(for v in ${PERL_OLDVERSEN}; do echo -n "${v}/${myarch}${mythreading} ${v} "; done )
|
||||
myconf -Dinc_version_list="${inclist}"
|
||||
fi
|
||||
|
||||
[[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
|
||||
|
||||
# Make sure we can do the final link #523730, need to set deployment
|
||||
# target to override hardcoded 10.3 which breaks on modern OSX
|
||||
[[ ${CHOST} == *-darwin* ]] && \
|
||||
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
|
||||
|
||||
# Prefix: the host system needs not to follow Gentoo multilib stuff, and in
|
||||
# Prefix itself we don't do multilib either, so make sure perl can find
|
||||
# something compatible.
|
||||
if use prefix ; then
|
||||
# Set a hook to check for each detected library whether it actually works.
|
||||
export libscheck="
|
||||
( echo 'main(){}' > '${T}'/conftest.c &&
|
||||
$(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
|
||||
) || xxx=/dev/null"
|
||||
|
||||
# Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
|
||||
local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
|
||||
myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
|
||||
elif [[ $(get_libdir) != "lib" ]] ; then
|
||||
# We need to use " and not ', as the written config.sh use ' ...
|
||||
myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
|
||||
fi
|
||||
|
||||
# don't try building ODBM, bug #354453
|
||||
disabled_extensions="ODBM_File"
|
||||
|
||||
if ! use gdbm ; then
|
||||
# workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
|
||||
disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
|
||||
fi
|
||||
|
||||
myconf -Dnoextensions="${disabled_extensions}"
|
||||
|
||||
sh Configure \
|
||||
-des \
|
||||
-Duseshrplib \
|
||||
-Darchname="${myarch}" \
|
||||
-Dcc="$(tc-getCC)" \
|
||||
-Doptimize="${CFLAGS}" \
|
||||
-Dldflags="${LDFLAGS}" \
|
||||
-Dprefix="${EPREFIX}"'/usr' \
|
||||
-Dinstallprefix="${EPREFIX}"'/usr' \
|
||||
-Dsiteprefix="${EPREFIX}"'/usr/local' \
|
||||
-Dvendorprefix="${EPREFIX}"'/usr' \
|
||||
-Dscriptdir="${EPREFIX}"'/usr/bin' \
|
||||
-Dprivlib="${EPREFIX}${PRIV_LIB}" \
|
||||
-Darchlib="${EPREFIX}${ARCH_LIB}" \
|
||||
-Dsitelib="${EPREFIX}${SITE_LIB}" \
|
||||
-Dsitearch="${EPREFIX}${SITE_ARCH}" \
|
||||
-Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
|
||||
-Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
|
||||
-Dman1dir="${EPREFIX}"/usr/share/man/man1 \
|
||||
-Dman3dir="${EPREFIX}"/usr/share/man/man3 \
|
||||
-Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
|
||||
-Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
|
||||
-Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
|
||||
-Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
|
||||
-Dman1ext='1' \
|
||||
-Dman3ext='3pm' \
|
||||
-Dlibperl="${LIBPERL}" \
|
||||
-Dlocincpth="${EPREFIX}"'/usr/include ' \
|
||||
-Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
|
||||
-Duselargefiles \
|
||||
-Dd_semctl_semun \
|
||||
-Dcf_by='Gentoo' \
|
||||
-Dmyhostname='localhost' \
|
||||
-Dperladmin='root@localhost' \
|
||||
-Dinstallusrbinperl='n' \
|
||||
-Ud_csh \
|
||||
-Dsh="${EPREFIX}"/bin/sh \
|
||||
-Dtargetsh="${EPREFIX}"/bin/sh \
|
||||
-Uusenm \
|
||||
"${myconf[@]}" || die "Unable to configure"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
export NO_GENTOO_NETWORK_TESTS=1;
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
|
||||
return 0
|
||||
fi
|
||||
use elibc_uclibc && export MAKEOPTS+=" -j1"
|
||||
TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local i
|
||||
local coredir="${ARCH_LIB}/CORE"
|
||||
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
rm -f "${ED}/usr/bin/perl${MY_PV}"
|
||||
ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
|
||||
|
||||
if ! tc-is-static-only ; then
|
||||
dolib.so "${ED}"${coredir}/${LIBPERL}
|
||||
rm -f "${ED}"${coredir}/${LIBPERL}
|
||||
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
|
||||
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
|
||||
ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
|
||||
ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
|
||||
ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
|
||||
fi
|
||||
|
||||
rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
|
||||
|
||||
# This removes ${D} from Config.pm
|
||||
for i in $(find "${D}" -iname "Config.pm" ) ; do
|
||||
einfo "Removing ${D} from ${i}..."
|
||||
sed -i -e "s:${D}::" "${i}" || die "Sed failed"
|
||||
done
|
||||
|
||||
dodoc Changes* README AUTHORS
|
||||
|
||||
if use doc ; then
|
||||
# HTML Documentation
|
||||
# We expect errors, warnings, and such with the following.
|
||||
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
LD_LIBRARY_PATH=. ./perl installhtml \
|
||||
--podroot='.' \
|
||||
--podpath='lib:ext:pod:vms' \
|
||||
--recurse \
|
||||
--htmldir="${ED}/usr/share/doc/${PF}/html"
|
||||
fi
|
||||
|
||||
[[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
|
||||
|
||||
dual_scripts
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
dual_scripts
|
||||
|
||||
if [[ "${ROOT}" = "/" ]] ; then
|
||||
local INC DIR file
|
||||
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
|
||||
einfo "Removing old .ph files"
|
||||
for DIR in ${INC} ; do
|
||||
if [[ -d "${DIR}" ]] ; then
|
||||
for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
|
||||
rm -f "${file}"
|
||||
einfo "<< ${file}"
|
||||
done
|
||||
fi
|
||||
done
|
||||
# Silently remove the now empty dirs
|
||||
for DIR in ${INC} ; do
|
||||
if [[ -d "${DIR}" ]] ; then
|
||||
find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm(){
|
||||
dual_scripts
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
DIST php-5.5.33.tar.bz2 13686486 SHA256 c490b1ed4df596b48eb68f630d89ca512945e2650840e7dace1119cc7e600aa9 SHA512 a0ac57adcc4b0caec153265a8d1ded8d4d0f71b44f08158feb0add9c8fdd36826767882e85dd03399cf146800eddcb6b6cc1b21051d4fc4371e3f61b1169132b WHIRLPOOL 373c61677adb89506cc4621d1c7a0732f6454a8679a797807631f2286188bb990dfcaf34b4108edf7b1819424100fa0d7060f0f792a65dc5f1c130cfa00e6b45
|
||||
DIST php-5.5.34.tar.bz2 13686681 SHA256 af88884416a92619de842ad0fd23f7f7e8140efb0b9194f98a38a78781e5851c SHA512 c4269f79f5acaac64e9d2e20feef4bbd5aa7a84e69445dee64bf068197d611aa8ceb3697ae6461d8c96068be7839f22eeaff61f201f6e7a8749d284eaa68c0f8 WHIRLPOOL f4771f614176242a9a3e27185c98822493ca1b1982b5b11b3ee53d952534c69a73e0625b589723cc153da0978b27a8e55c7f9056b81b7a282dc385d22f4fdf02
|
||||
DIST php-5.5.35.tar.bz2 13690152 SHA256 2d648dd648e820fd64693ce72f9bf07064d147220e594e39fb9f6310238258d7 SHA512 cfa62f83cd79b678c55ffdb1325906962bb7dae23fdbe963d57c3b24d13223229448f4c45727df1ab042bbd2db85804051c66993c28c68c0c873481cfe7e6834 WHIRLPOOL e7b765b6d99e7f9c0e18cae64577d0e7e7eb136debf565f49ab02a962046437064f810d1a407546e2f83d69cfb3104244424ae5a34bc83c3778aaff95984a9f7
|
||||
DIST php-5.5.36.tar.bz2 13686345 SHA256 2484edfaa3de606d74f927b55c5206f51b1ae24ea8e428aa9fc15474c7bb71bb SHA512 5521ef8bec1720e3df49f5b002c93726d1b52a7b551acf414e32dfd8ca88f8d661b9f011408d7f9f451fb29b06385365d2975bb14ed6d3c10cdc5546543af485 WHIRLPOOL 687818ee021cb473a92ff7c5b67c6b110360227aaecbb6832f0f8383d0a4878f038d45c49518aa38e2b99d96e2eaa6e5de7f535c1fcce05f41024ca7423e2783
|
||||
DIST php-5.6.19.tar.bz2 14100438 SHA256 2a24a3f84971680ac0a4c71050067de4f76ee235aa4a041fae21bfa69975c168 SHA512 c8c2b3bdfc1a8abe834612c33123b4f103e841c230b53934fb7bafe11af7f1175f02ca54c92f33e8e603485e6283897bebb51acc55d1213b7433024684215c14 WHIRLPOOL f026e8779c531f887b1e292e5f1d6eafd0e3ae46f83ae8efb830ad8e0f91d86e5b002dda9e6a02987db6230557ff773d8c52dd2db423d792aed1aca292e5b92b
|
||||
DIST php-5.6.20.tar.bz2 14162188 SHA256 5ac7bf7caec7a79b18cf458e786fd1609ad2da771224b80bc15cc6f01b22bf1f SHA512 9e26f2564ee7329ab50d4d8d27f029c4f88317ea761888138e60d13a3cf51e49676ded406a3ec18433be2ec5d2a49c904eaa9f32d473b99d11550025e026a61c WHIRLPOOL 679c8ee4b3ddf18d94598982969fd12d053493fbe70d4b9f8d3eda4ed9ab0bb6f83d912bb7f8ebd99264beea992cce7c1083d257576551fadf537b5655d23d57
|
||||
DIST php-5.6.21.tar.bz2 14165919 SHA256 b4ed7ab574b689fd6d6494fde954826c06efc85c505e017b8d776c7c7f479590 SHA512 028d62434e7932b4a07fa7d404b8ad938f0ca7968ae2b23386038f77482984d2b6145523e11f37b9e72621c8bf40f08e38a6db1d209493770ac99e13e2fac0d0 WHIRLPOOL e5e606f0a3df1af12c9c0148a29336de0d00a8d7cedbb42727a3e1b6a700e0dcda63c7086e59f175ec060cbf910c2b12815ae3c08bb73d43a84b4f3aaa5d2ed6
|
||||
DIST php-7.0.6.tar.bz2 14102594 SHA256 14ddf192a9965c858c1e742a61456be2f34a4db87556172c0d76f08de96329b7 SHA512 7f44cc5df3b9bb4394ac39069fdc2993086dd8e159e97275bf5fa4dd399d416e9ea1b057cdf855bae1c0f9c2129af1914495d9d2512ce90a7dd3ce4206aa9286 WHIRLPOOL dfb19b2bee5ea79fc08039544c350e58b329f439fb21b0b75d3b83ae151f449678614fad76829b5d86b885423fe6e1b21622f58aa598c6450732f164ae596b1b
|
||||
DIST php-5.6.22.tar.bz2 14170522 SHA256 90da8a80cc52fa699cf2bfa4c6fa737c772df7c92b81ef483460aa3b1e9f88c6 SHA512 9d21104832a1053a350ff31196e2c41cef713a9dfe207491236219954cf2eea216049b2f40313fb2a8e9ef641aad0af3f69456bbcebdf8fee312b0dd4a7df320 WHIRLPOOL 2163f683c2e572ddd9a7368e070b172f6b2f2fcb0128ac7db0b8639e0b14b0b1fa7050cb6082b627006e700099c1ca4144b20a2c5cd637ecad697e99a125e284
|
||||
DIST php-7.0.7.tar.bz2 14106181 SHA256 474f2925c4782b94016e3afbb17b14ff9cc6f4fdb6f6e231b36a378bb18a3d1a SHA512 e6d5ce0eb665aa9beb13f5a3e6fa074ff92ccdd5112c4f2a7dfb1220f55624f2284a0bcfec45b92572762905ab2ac7890e98803860378fdb06752e22f363dbcf WHIRLPOOL edf2fc8fdcb3630c2b417d459b52e1f78cbfbc5b8a9c3191b9401356dfb48d6b7767a98b8f904acb4e96849d54c53ef7f6d91772f2d39a18a26a7540b40857d9
|
||||
|
@ -0,0 +1,784 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
function php_get_uri ()
|
||||
{
|
||||
case "${1}" in
|
||||
"php-pre")
|
||||
echo "http://downloads.php.net/dsp/${2}"
|
||||
;;
|
||||
"php")
|
||||
echo "http://www.php.net/distributions/${2}"
|
||||
;;
|
||||
"olemarkus")
|
||||
echo "https://dev.gentoo.org/~olemarkus/php/${2}"
|
||||
;;
|
||||
"gentoo")
|
||||
echo "mirror://gentoo/${2}"
|
||||
;;
|
||||
*)
|
||||
die "unhandled case in php_get_uri"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# alias, so we can handle different types of releases (finals, rcs, alphas,
|
||||
# betas, ...) w/o changing the whole ebuild
|
||||
PHP_PV="${PV/_rc/RC}"
|
||||
PHP_PV="${PHP_PV/_alpha/alpha}"
|
||||
PHP_PV="${PHP_PV/_beta/beta}"
|
||||
PHP_RELEASE="php"
|
||||
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
|
||||
PHP_P="${PN}-${PHP_PV}"
|
||||
|
||||
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
|
||||
|
||||
PHP_FPM_CONF_VER="1"
|
||||
|
||||
SRC_URI="${PHP_SRC_URI}"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="http://php.net/"
|
||||
LICENSE="PHP-3"
|
||||
|
||||
S="${WORKDIR}/${PHP_P}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl debug
|
||||
enchant exif frontbase +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
|
||||
mssql mysql libmysqlclient 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
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
DEPEND="
|
||||
>=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( =sys-libs/db-4* )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
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-4.1.2 )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[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] )
|
||||
libmysqlclient? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
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 )
|
||||
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? ( >=dev-libs/openssl-0.9.7 )
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
vpx? ( media-libs/libvpx )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
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
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
virtual/mta
|
||||
"
|
||||
|
||||
php="=${CATEGORY}/${PF}"
|
||||
|
||||
REQUIRED_USE="
|
||||
truetype? ( gd )
|
||||
vpx? ( 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 )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
PHP_INI_VERSION="development"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
|
||||
PHP_INI_FILE="php.ini"
|
||||
|
||||
want_apache
|
||||
|
||||
pkg_setup() {
|
||||
depend.apache_pkg_setup
|
||||
}
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
|
||||
|
||||
# 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}"
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" "${PHP_INI_FILE}"
|
||||
|
||||
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_if_iuse 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
|
||||
[[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
|
||||
einfo "Installing FPM CGI config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
|
||||
|
||||
# Remove bogus /etc/php-fpm.conf.default (bug 359906)
|
||||
[[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
|
||||
fi
|
||||
|
||||
# Install PHP ini files into /usr/share/php
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-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() {
|
||||
# USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
|
||||
# ([empty session.save_path]/session_mm_[sapi][gid].sem)
|
||||
# there is no easy way to circumvent that, all php calls during
|
||||
# install use -n, so no php.ini file will be used.
|
||||
# As such, this is the easiest way to get around
|
||||
addpredict /session_mm_cli250.sem
|
||||
addpredict /session_mm_cli0.sem
|
||||
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
#Add user patches #357637
|
||||
epatch_user
|
||||
|
||||
#force rebuilding aclocal.m4
|
||||
rm aclocal.m4
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# This is a global variable and should be in caps. It isn't because the
|
||||
# phpconfutils eclass relies on exactly this name...
|
||||
# for --with-libdir see bug #327025
|
||||
my_conf="
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}"/man
|
||||
--infodir="${PHP_DESTDIR}"/info
|
||||
--libdir="${PHP_DESTDIR}"/lib
|
||||
--with-libdir=$(get_libdir)
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)"
|
||||
|
||||
# extension USE flag shared
|
||||
my_conf+="
|
||||
$(use_enable bcmath bcmath )
|
||||
$(use_with bzip2 bz2 "${EPREFIX}"/usr)
|
||||
$(use_enable calendar calendar )
|
||||
$(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 mssql mssql "${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_with sybase-ct sybase-ct "${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
|
||||
my_conf="${my_conf} --enable-dba${shared}"
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
my_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
|
||||
my_conf+="
|
||||
$(use_with truetype freetype-dir ${EPREFIX}/usr)
|
||||
$(use_with truetype t1lib ${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)
|
||||
$(use_with vpx vpx-dir ${EPREFIX}/usr)"
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
my_conf+="
|
||||
$(use_with gd gd)"
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
my_conf+="
|
||||
$(use_with imap imap ${EPREFIX}/usr)
|
||||
$(use_with ssl imap-ssl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
|
||||
if use firebird ; then
|
||||
my_conf+="
|
||||
$(use_with firebird interbase ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
my_conf+="
|
||||
$(use_with ldap ldap ${EPREFIX}/usr)
|
||||
$(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
use libmysqlclient && mysqllib="${EPREFIX}/usr"
|
||||
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
|
||||
|
||||
my_conf+=" $(use_with mysql mysql $mysqllib)"
|
||||
my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
|
||||
|
||||
local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
|
||||
if use mysql ; then
|
||||
my_conf+="${mysqlsock}"
|
||||
elif use mysqli ; then
|
||||
my_conf+="${mysqlsock}"
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
if use odbc ; then
|
||||
my_conf+="
|
||||
$(use_with odbc unixODBC ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
if use iodbc ; then
|
||||
my_conf+="
|
||||
$(use_with iodbc iodbc ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Oracle support
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client oci8)"
|
||||
fi
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
my_conf+="
|
||||
$(use_with mssql pdo-dblib )
|
||||
$(use_with mysql pdo-mysql ${mysqllib})
|
||||
$(use_with postgres pdo-pgsql )
|
||||
$(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
|
||||
$(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client pdo-oci)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
my_conf+="
|
||||
$(use_with readline readline ${EPREFIX}/usr)
|
||||
$(use_with libedit libedit ${EPREFIX}/usr)"
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
my_conf+="
|
||||
$(use_with sharedmem mm ${EPREFIX}/usr)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_enable session session )"
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
my_conf="${my_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
|
||||
my_conf="${my_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"
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
my_conf="${my_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"
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
|
||||
sapi_conf="${my_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)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --enable-${sapi}"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --disable-${sapi}"
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --without-apxs2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
econf ${sapi_conf}
|
||||
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" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake || die "emake failed"
|
||||
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"
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs \
|
||||
|| die "emake install failed"
|
||||
|
||||
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}"
|
||||
|
||||
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/libphp5$(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)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}" || die "Unable to install ${sapi} sapi"
|
||||
else
|
||||
dobin "${source}" || die "Unable to install ${sapi} sapi"
|
||||
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_if_iuse opcache ; then
|
||||
dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
|
||||
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}"
|
||||
sed -e "s|php5|php${SLOT}|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
|
||||
# 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"
|
||||
|
||||
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/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
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
|
||||
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
|
||||
APACHE2_MOD_DEFINE="PHP"
|
||||
APACHE2_MOD_CONF="70_mod_php" # provided by app-eselect/eselect-php
|
||||
apache-module_pkg_postinst
|
||||
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}
|
||||
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
|
||||
|
||||
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
|
||||
elog "to compile extensions for the ${SLOT} ABI"
|
||||
elog
|
||||
if ! use readline && use cli ; then
|
||||
ewarn "Note that in order to use php interactivly, you need to enable"
|
||||
ewarn "the readline USE flag or php -a will hang"
|
||||
fi
|
||||
elog
|
||||
elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
|
||||
elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
|
||||
elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
|
||||
elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
|
||||
|
||||
elog
|
||||
elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
|
||||
elog "https://www.gentoo.org/proj/en/php/php-upgrading.xml"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
eselect php cleanup
|
||||
}
|
@ -0,0 +1,807 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils autotools flag-o-matic versionator depend.apache apache-module libtool systemd
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
function php_get_uri ()
|
||||
{
|
||||
case "${1}" in
|
||||
"php-pre")
|
||||
echo "http://downloads.php.net/dsp/${2}"
|
||||
;;
|
||||
"php")
|
||||
echo "http://www.php.net/distributions/${2}"
|
||||
;;
|
||||
"olemarkus")
|
||||
echo "https://dev.gentoo.org/~olemarkus/php/${2}"
|
||||
;;
|
||||
"gentoo")
|
||||
echo "mirror://gentoo/${2}"
|
||||
;;
|
||||
*)
|
||||
die "unhandled case in php_get_uri"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# alias, so we can handle different types of releases (finals, rcs, alphas,
|
||||
# betas, ...) w/o changing the whole ebuild
|
||||
PHP_PV="${PV/_rc/RC}"
|
||||
PHP_PV="${PHP_PV/_alpha/alpha}"
|
||||
PHP_PV="${PHP_PV/_beta/beta}"
|
||||
PHP_RELEASE="php"
|
||||
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
|
||||
PHP_P="${PN}-${PHP_PV}"
|
||||
|
||||
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
|
||||
|
||||
PHP_FPM_CONF_VER="1"
|
||||
|
||||
SRC_URI="${PHP_SRC_URI}"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine"
|
||||
HOMEPAGE="http://php.net/"
|
||||
LICENSE="PHP-3"
|
||||
|
||||
S="${WORKDIR}/${PHP_P}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl debug
|
||||
enchant exif frontbase +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 libmysqlclient 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
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
DEPEND="
|
||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )"
|
||||
|
||||
# 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.
|
||||
DEPEND="${DEPEND}
|
||||
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 ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
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[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] )
|
||||
libmysqlclient? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
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 )
|
||||
)
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
vpx? ( media-libs/libvpx )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
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
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
virtual/mta
|
||||
"
|
||||
|
||||
php="=${CATEGORY}/${PF}"
|
||||
|
||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
||||
REQUIRED_USE="
|
||||
cli? ( ^^ ( readline libedit ) )
|
||||
truetype? ( gd )
|
||||
vpx? ( 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 )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
PHP_INI_VERSION="development"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
|
||||
PHP_INI_FILE="php.ini"
|
||||
|
||||
want_apache
|
||||
|
||||
pkg_setup() {
|
||||
depend.apache_pkg_setup
|
||||
}
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${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_FILE}"
|
||||
|
||||
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_if_iuse 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 file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
doins sapi/fpm/php-fpm.conf
|
||||
fi
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-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() {
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 \
|
||||
|| die
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
# Add user patches #357637
|
||||
epatch_user
|
||||
|
||||
# Force rebuilding aclocal.m4
|
||||
rm -f aclocal.m4 || die
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
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_enable bcmath bcmath)
|
||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
||||
$(use_enable calendar calendar)
|
||||
$(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 mssql mssql "${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_with sybase-ct sybase-ct "${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_with truetype t1lib "${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")
|
||||
$(use_with vpx vpx-dir "${EPREFIX}/usr")
|
||||
)
|
||||
# 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"
|
||||
use libmysqlclient && mysqllib="${EPREFIX}/usr"
|
||||
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
|
||||
|
||||
our_conf+=( $(use_with mysql mysql "${mysqllib}") )
|
||||
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)
|
||||
$(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"
|
||||
|
||||
# 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 -r "${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)
|
||||
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/sbin/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/libphp5$(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)"
|
||||
;;
|
||||
*)
|
||||
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_if_iuse opcache ; then
|
||||
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/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
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
|
||||
APACHE2_MOD_DEFINE="PHP"
|
||||
APACHE2_MOD_CONF="70_mod_php" # Provided by app-eselect/eselect-php
|
||||
apache-module_pkg_postinst
|
||||
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
|
||||
|
||||
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes"
|
||||
elog "php${SLOT/./-} in order to compile extensions for the ${SLOT} ABI."
|
||||
elog
|
||||
elog "This ebuild installed a version of php.ini based on"
|
||||
elog "php.ini-${PHP_INI_VERSION}. You can choose which version of"
|
||||
elog "php.ini to install by default by setting PHP_INI_VERSION"
|
||||
elog "to either 'production' or 'development' in your make.conf."
|
||||
elog "Both versions of php.ini can be found with the PHP docs in"
|
||||
elog "${EPREFIX}/usr/share/doc/${PF}"
|
||||
elog
|
||||
elog "For more 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