mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-03 03:21:43 +02:00
commit
2f10538f4d
@ -1,8 +1,6 @@
|
||||
DIST gnupg-1.4.21.tar.bz2 3689305 BLAKE2B 0c26c9c3aeae2bf2eafa858bc3bd15cc2702bce12a8a90938565322c34e2eeb8e5432932f5c9344a76aa4528b66051141536c062d9923a79d12a0767421bb017 SHA512 619e0fbc10310c7e55d129027e2945791fe91a0884b1d6f53acb4b2e380d1c6e71d1a516a59876182c5c70a4227d44a74ceda018c343b5291fa9a5d6de77c984
|
||||
DIST gnupg-2.1.15.tar.bz2 5723689 BLAKE2B 48889c0a5445b5b76b027debd6a4711930694e7440b76c06a7da1db5e7989eeae791e4c7a29e60a9d0b862c167374016d908aaa54165a44268f072075cdd9690 SHA512 69c943e853e1a37e8b17b3bc34e1503f14bc8f189fa9f3ac6644bcc98ccce6eaef64da20ff9dd1c8de3a7789ea577167984ccf3ac286cac50752e6f7c2f42ab1
|
||||
DIST gnupg-2.1.20.tar.bz2 6456128 BLAKE2B 009a8b8163701f5f5e269caea315a81f4c90c32ec19d501e9fd180bdd3a21454956549b433eb81e98c7a22c4c551eed666d9f3e59ea8e55ed2545ddf49334151 SHA512 14a9890bc64e143f87cff121dd298d490d78dbd34e36883e0f25763ff9064e5706a7632893d7c5d0e8e9b8cf9cdb0d378b4ce1715348729f0fc080455b61eca9
|
||||
DIST gnupg-2.2.0.tar.bz2 6532475 BLAKE2B 284ef4ce5ebb7e3d49ca3e73461b3f017eb07d23ee5cd9902ba1637be060246c0caf223fd2ba77d84ddf03e4b65964553b8adff9682d83e7d4f099ed99b841a7 SHA512 8ab7c4183d2ec2e6b62066e3cbcba95babaa0ae22da47feab716698792d26495f072d50e8ec612b8d26147636bb316320c78940184373b3f4cb6ec411933361b
|
||||
DIST gnupg-2.2.1.tar.bz2 6537959 BLAKE2B 4ec500110358a9e5c7d01157e3e9b29a6c7084266b59a9b412d76a793245e0dc5ab94c5cff34eec5169f6fa226ffe2005ccafc4ba3fedb6761e2c4a2d9fd3234 SHA512 fcda7ea360d9928bf9e410afe3806ee0692dd533443b0c0e050605a9e2e37ec16f3c60a30b30ab137155327bc1f5d2107f1e792582e3ad245b47bf39a1a61a8f
|
||||
DIST gnupg-2.2.3.tar.bz2 6547069 BLAKE2B a5ac44f696cce2ffbac72b80f0efcd19fe09934fe00d3fe90c0a5be5618b40b686fa9fe3e78a451e72835342afa75f4316b7ea34d3ff9fe602e621111876cc4b SHA512 c73df3c6f7ce65bd9867a39d10f93548496bf596ba0901737fc0063b370fd2d834c0b912e5aa07ff31067bc9c1263acc9d314c6bfaf7c889b72c8d46087810cb
|
||||
DIST gnupg-2.2.4.tar.bz2 6571487 BLAKE2B ec678470e574fdc9f057cc727cbb902ce525f76adae740722731e318032707d0f72873628024c2070a72c21321f2b8da16153edeafcb4ddeba72de59ff5c73bd SHA512 3d5c93b7662433103e9549d066a6b1a0c09d595851fab712d2ee844a55157e952a8a2dd5deff70fa8dd6817481f81c3fe5135603bca03206857310d04c1067a8
|
||||
DIST gnupg-2.2.5.tar.bz2 6584756 BLAKE2B d19358caf65627243c37afbf348acb2ea91f785272f318aed9e95e097c34cf3b3b1a223919a86e3ff09c045cb0b56d8aed7c746ed1223dd6a6aa072d24c44bce SHA512 675d2acc2ba95d14b14f4c83364663d88c982332fb4c35a4cf32af19a6bd4453ad89905c80d45007adb50c01816247df84d1f525e94bb668b962a84815e49bf1
|
||||
DIST gnupg-2.2.6.tar.bz2 6605028 BLAKE2B 2de6f8d32e551a8af5c41b7e6220a43645472b3b7f25b168a54343c4279f412d5d8f7a5142451504192259b3fe4a3e3242d12520dadc385f466dd701a803073a SHA512 ad0861c86c1886f701ae05e7cd439449cf0684a7bf461ca2b729c5e93833ee36f8438cd4d7f73a4c60e57060f3d8f4890a809b2bbc31b083f9f61d2f66ccacc4
|
||||
DIST gnupg-2.2.7.tar.bz2 6631100 BLAKE2B 81a66a8f738fc2b42d923ccda7d6cbfffc8e938970c04fe02c0146202f2e97fa88d5263aee2f3051e141169f4f02f72ccc53ac831bb57d42740130e3122fa454 SHA512 f858b275876d38b9d3a60e5428574f1008a73a948f67a2fa43bcf1970a5dbb60ec3f0e2b2271243229465eb9b22124e216894f0b3d72004acf3ed0c3481da33d
|
||||
|
@ -1,123 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit systemd toolchain-funcs
|
||||
|
||||
MY_P="${P/_/-}"
|
||||
|
||||
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
|
||||
HOMEPAGE="http://www.gnupg.org/"
|
||||
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bzip2 doc +gnutls ldap nls readline selinux +smartcard tofu tools usb wks-server"
|
||||
|
||||
COMMON_DEPEND_LIBS="
|
||||
>=dev-libs/npth-1.2
|
||||
>=dev-libs/libassuan-2.4.3
|
||||
>=dev-libs/libgcrypt-1.7.3
|
||||
>=dev-libs/libgpg-error-1.24
|
||||
>=dev-libs/libksba-1.3.4
|
||||
>=net-misc/curl-7.10
|
||||
gnutls? ( >=net-libs/gnutls-3.0:0= )
|
||||
sys-libs/zlib
|
||||
ldap? ( net-nds/openldap )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
smartcard? ( usb? ( virtual/libusb:0 ) )
|
||||
tofu? ( >=dev-db/sqlite-3.7 )
|
||||
"
|
||||
COMMON_DEPEND_BINS="app-crypt/pinentry
|
||||
!app-crypt/dirmngr"
|
||||
|
||||
# Existence of executables is checked during configuration.
|
||||
DEPEND="${COMMON_DEPEND_LIBS}
|
||||
${COMMON_DEPEND_BINS}
|
||||
nls? ( sys-devel/gettext )
|
||||
doc? ( sys-apps/texinfo )"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND_LIBS}
|
||||
${COMMON_DEPEND_BINS}
|
||||
selinux? ( sec-policy/selinux-gpg )
|
||||
nls? ( virtual/libintl )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DOCS=(
|
||||
ChangeLog NEWS README THANKS TODO VERSION
|
||||
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myconf=()
|
||||
|
||||
if use smartcard; then
|
||||
myconf+=(
|
||||
--enable-scdaemon
|
||||
$(use_enable usb ccid-driver)
|
||||
)
|
||||
else
|
||||
myconf+=( --disable-scdaemon )
|
||||
fi
|
||||
|
||||
if use elibc_SunOS || use elibc_AIX; then
|
||||
myconf+=( --disable-symcryptrun )
|
||||
else
|
||||
myconf+=( --enable-symcryptrun )
|
||||
fi
|
||||
|
||||
# glib fails and picks up clang's internal stdint.h causing weird errors
|
||||
[[ ${CC} == *clang ]] && \
|
||||
export gl_cv_absolute_stdint_h=/usr/include/stdint.h
|
||||
|
||||
econf \
|
||||
"${myconf[@]}" \
|
||||
$(use_enable bzip2) \
|
||||
$(use_enable gnutls) \
|
||||
$(use_enable nls) \
|
||||
$(use_enable tofu) \
|
||||
$(use_enable wks-server wks-tools) \
|
||||
$(use_with ldap) \
|
||||
$(use_with readline) \
|
||||
--enable-gpg \
|
||||
--enable-gpgsm \
|
||||
--enable-large-secmem \
|
||||
--enable-all-tests \
|
||||
CC_FOR_BUILD="$(tc-getBUILD_CC)"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
use doc && emake -C doc html
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
use tools &&
|
||||
dobin \
|
||||
tools/{convert-from-106,gpg-check-pattern} \
|
||||
tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys} \
|
||||
tools/make-dns-cert
|
||||
|
||||
dosym gpg /usr/bin/gpg2
|
||||
dosym gpgv /usr/bin/gpgv2
|
||||
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
|
||||
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
|
||||
|
||||
dodir /etc/env.d
|
||||
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
|
||||
|
||||
use doc && dodoc doc/gnupg.html/* doc/*.png
|
||||
|
||||
systemd_douserunit doc/examples/systemd-user/*.{service,socket}
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit systemd toolchain-funcs
|
||||
|
||||
MY_P="${P/_/-}"
|
||||
|
||||
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
|
||||
HOMEPAGE="http://www.gnupg.org/"
|
||||
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bzip2 doc +gnutls ldap nls readline selinux +smartcard tofu tools usb wks-server"
|
||||
|
||||
COMMON_DEPEND_LIBS="
|
||||
>=dev-libs/npth-1.2
|
||||
>=dev-libs/libassuan-2.4.3
|
||||
>=dev-libs/libgcrypt-1.7.3
|
||||
>=dev-libs/libgpg-error-1.24
|
||||
>=dev-libs/libksba-1.3.4
|
||||
>=net-misc/curl-7.10
|
||||
gnutls? ( >=net-libs/gnutls-3.0:0= )
|
||||
sys-libs/zlib
|
||||
ldap? ( net-nds/openldap )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
smartcard? ( usb? ( virtual/libusb:0 ) )
|
||||
tofu? ( >=dev-db/sqlite-3.7 )
|
||||
"
|
||||
COMMON_DEPEND_BINS="app-crypt/pinentry
|
||||
!app-crypt/dirmngr"
|
||||
|
||||
# Existence of executables is checked during configuration.
|
||||
DEPEND="${COMMON_DEPEND_LIBS}
|
||||
${COMMON_DEPEND_BINS}
|
||||
nls? ( sys-devel/gettext )
|
||||
doc? ( sys-apps/texinfo )"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND_LIBS}
|
||||
${COMMON_DEPEND_BINS}
|
||||
selinux? ( sec-policy/selinux-gpg )
|
||||
nls? ( virtual/libintl )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DOCS=(
|
||||
ChangeLog NEWS README THANKS TODO VERSION
|
||||
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
|
||||
"${FILESDIR}/${P}-fix-gnupg-wait.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myconf=()
|
||||
|
||||
if use smartcard; then
|
||||
myconf+=(
|
||||
--enable-scdaemon
|
||||
$(use_enable usb ccid-driver)
|
||||
)
|
||||
else
|
||||
myconf+=( --disable-scdaemon )
|
||||
fi
|
||||
|
||||
if use elibc_SunOS || use elibc_AIX; then
|
||||
myconf+=( --disable-symcryptrun )
|
||||
else
|
||||
myconf+=( --enable-symcryptrun )
|
||||
fi
|
||||
|
||||
# glib fails and picks up clang's internal stdint.h causing weird errors
|
||||
[[ ${CC} == *clang ]] && \
|
||||
export gl_cv_absolute_stdint_h=/usr/include/stdint.h
|
||||
|
||||
econf \
|
||||
"${myconf[@]}" \
|
||||
$(use_enable bzip2) \
|
||||
$(use_enable gnutls) \
|
||||
$(use_enable nls) \
|
||||
$(use_enable tofu) \
|
||||
$(use_enable wks-server wks-tools) \
|
||||
$(use_with ldap) \
|
||||
$(use_with readline) \
|
||||
--enable-gpg \
|
||||
--enable-gpgsm \
|
||||
--enable-large-secmem \
|
||||
--enable-all-tests \
|
||||
CC_FOR_BUILD="$(tc-getBUILD_CC)"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
use doc && emake -C doc html
|
||||
}
|
||||
|
||||
src_test() {
|
||||
export TESTFLAGS=--parallel
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
use tools &&
|
||||
dobin \
|
||||
tools/{convert-from-106,gpg-check-pattern} \
|
||||
tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys} \
|
||||
tools/make-dns-cert
|
||||
|
||||
dosym gpg /usr/bin/gpg2
|
||||
dosym gpgv /usr/bin/gpgv2
|
||||
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
|
||||
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
|
||||
|
||||
dodir /etc/env.d
|
||||
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
|
||||
|
||||
use doc && dodoc doc/gnupg.html/* doc/*.png
|
||||
|
||||
systemd_douserunit doc/examples/systemd-user/*.{service,socket}
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit systemd toolchain-funcs
|
||||
|
||||
MY_P="${P/_/-}"
|
||||
|
||||
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
|
||||
HOMEPAGE="http://www.gnupg.org/"
|
||||
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bzip2 doc +gnutls ldap nls readline selinux +smartcard tofu tools usb wks-server"
|
||||
|
||||
COMMON_DEPEND_LIBS="
|
||||
>=dev-libs/npth-1.2
|
||||
>=dev-libs/libassuan-2.4.3
|
||||
>=dev-libs/libgcrypt-1.7.3
|
||||
>=dev-libs/libgpg-error-1.24
|
||||
>=dev-libs/libksba-1.3.4
|
||||
>=net-misc/curl-7.10
|
||||
gnutls? ( >=net-libs/gnutls-3.0:0= )
|
||||
sys-libs/zlib
|
||||
ldap? ( net-nds/openldap )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
smartcard? ( usb? ( virtual/libusb:0 ) )
|
||||
tofu? ( >=dev-db/sqlite-3.7 )
|
||||
"
|
||||
COMMON_DEPEND_BINS="app-crypt/pinentry
|
||||
!app-crypt/dirmngr"
|
||||
|
||||
# Existence of executables is checked during configuration.
|
||||
DEPEND="${COMMON_DEPEND_LIBS}
|
||||
${COMMON_DEPEND_BINS}
|
||||
nls? ( sys-devel/gettext )
|
||||
doc? ( sys-apps/texinfo )"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND_LIBS}
|
||||
${COMMON_DEPEND_BINS}
|
||||
selinux? ( sec-policy/selinux-gpg )
|
||||
nls? ( virtual/libintl )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DOCS=(
|
||||
ChangeLog NEWS README THANKS TODO VERSION
|
||||
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myconf=()
|
||||
|
||||
if use smartcard; then
|
||||
myconf+=(
|
||||
--enable-scdaemon
|
||||
$(use_enable usb ccid-driver)
|
||||
)
|
||||
else
|
||||
myconf+=( --disable-scdaemon )
|
||||
fi
|
||||
|
||||
if use elibc_SunOS || use elibc_AIX; then
|
||||
myconf+=( --disable-symcryptrun )
|
||||
else
|
||||
myconf+=( --enable-symcryptrun )
|
||||
fi
|
||||
|
||||
# glib fails and picks up clang's internal stdint.h causing weird errors
|
||||
[[ ${CC} == *clang ]] && \
|
||||
export gl_cv_absolute_stdint_h=/usr/include/stdint.h
|
||||
|
||||
econf \
|
||||
"${myconf[@]}" \
|
||||
$(use_enable bzip2) \
|
||||
$(use_enable gnutls) \
|
||||
$(use_enable nls) \
|
||||
$(use_enable tofu) \
|
||||
$(use_enable wks-server wks-tools) \
|
||||
$(use_with ldap) \
|
||||
$(use_with readline) \
|
||||
--enable-gpg \
|
||||
--enable-gpgsm \
|
||||
--enable-large-secmem \
|
||||
--enable-all-tests \
|
||||
CC_FOR_BUILD="$(tc-getBUILD_CC)"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
use doc && emake -C doc html
|
||||
}
|
||||
|
||||
src_test() {
|
||||
#Bug: 638574
|
||||
use tofu && export TESTFLAGS=--parallel
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
use tools &&
|
||||
dobin \
|
||||
tools/{convert-from-106,gpg-check-pattern} \
|
||||
tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys} \
|
||||
tools/make-dns-cert
|
||||
|
||||
dosym gpg /usr/bin/gpg2
|
||||
dosym gpgv /usr/bin/gpgv2
|
||||
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
|
||||
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
|
||||
|
||||
dodir /etc/env.d
|
||||
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
|
||||
|
||||
use doc && dodoc doc/gnupg.html/* doc/*.png
|
||||
|
||||
systemd_douserunit doc/examples/systemd-user/*.{service,socket}
|
||||
}
|
@ -13,7 +13,7 @@ SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 ~arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl tofu tools usb wks-server"
|
||||
|
||||
COMMON_DEPEND_LIBS="
|
||||
|
@ -30,6 +30,7 @@ COMMON_DEPEND_LIBS="
|
||||
readline? ( sys-libs/readline:0= )
|
||||
smartcard? ( usb? ( virtual/libusb:0 ) )
|
||||
tofu? ( >=dev-db/sqlite-3.7 )
|
||||
virtual/mta
|
||||
"
|
||||
COMMON_DEPEND_BINS="app-crypt/pinentry
|
||||
!app-crypt/dirmngr"
|
@ -55,7 +55,6 @@ DOCS=(
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
|
||||
"${FILESDIR}/${PN}-2.2.4-dirmngr-Handle-failures-related-to-missing-IPv6.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
@ -1,10 +1,2 @@
|
||||
AUX pinentry-0.8.2-ncurses.patch 824 SHA256 7d5e485e2c6dcce80ab63055d24761f53ae28e19b5ab2dacc424ebc7677805e8 SHA512 415ad55fd7a4ab66e87e5db76b1314b00f5a86552804f1f431a533ba1e7ec3f2c7136096106688b572639ceb637fdf0c3e25d96aa2e07fd1f6f295d39e1d4901 WHIRLPOOL 5483ccb6041e769387685ce987a19a2aa50835781a391169abbe7a838325149b81ce186692dbdc588858f74ef912a80f1eca6efb0f3421ace57925ca9c6f9ca5
|
||||
AUX pinentry-0.9.7-require-CPP11-for-qt-5-7.patches 1415 SHA256 ee9fc1ccc6d8c96a7097d8cb93a2277b7809dff24314d616615ae3bbe369c5a1 SHA512 1191ec7aa71042e4c770ea2793aac73f5501e83f0f93e9ae5440cbf84e4796c258156af7da9d0aaa7603e690c6bfa97d921c7721b3519d7ba33bd0f0def0baf4 WHIRLPOOL bbd686b0bde31c1a07074720ae611454f8a2f383c4d950c29deac974ac91b44c64c06066a65467589451bf596badbcc56d63a6bbfcb2061329861983b9209915
|
||||
AUX pinentry-1.0.0-build.patch 6634 SHA256 ddc05cb4e3760b3c2f92c0dd76f316aed455400f34dd4ff2939a5a59995c5c15 SHA512 cd71552db3c4ab3bd7dd34d5009ad332e5a430ae1e909085cac6a04e63801086cac18916af65a37c110c2b667054c356f38dcc8af43468a23b1b562bf6dbafec WHIRLPOOL d117a3e591b38ed5e5239b5e2fab01c3db0d90fc6b8f52204d9e4cb7a579e703de1615be0bc8d481bc23149731835d6f78b25ffc74a8b361a1400a9d80da0344
|
||||
DIST pinentry-0.9.7.tar.bz2 432978 SHA256 6398208394972bbf897c3325780195584682a0d0c164ca5a0da35b93b1e4e7b2 SHA512 9c5bc8f7246e8b0affd83fea6e64c47cecf6a12515a82dd2a6712b230306a9c3c97da4dbf6519ea98c85c88bf180a5a2b8c46cedcd594f224e5a08f2f0e35bf0 WHIRLPOOL eb3f72acf6990d61b4279de89a334e68c6052a3edef789aab2a421c2e489c1286b756bf3c9b8e6dd4cee3716e32b53d0e9d41db15a5069e010fe713dfba0596a
|
||||
DIST pinentry-1.0.0.tar.bz2 436930 SHA256 1672c2edc1feb036075b187c0773787b2afd0544f55025c645a71b4c2f79275a SHA512 f109236707c51871b5020ef807a551366461fafcfbe09bf8cda19d4b163a42cf622562b905ceb41429f1d648b3f3d27807538709da6a135b67f9888709eccd62 WHIRLPOOL 182d75e37afc40c02705ed6611354eb3429924df9062e64d42e511a5bdac5f7094b351aae406ef243e4a9d6f7db0eb897820bd23ed925b8787941342bc67d187
|
||||
EBUILD pinentry-0.9.7-r1.ebuild 3246 SHA256 7f098011d46661c2b5fea2b03ec0402d232b7845564d57e1d56d954f70367325 SHA512 78e797ea8a8f806fbac7a161b82ada7941e80b69dc1a3051d20655abca27dcab40888d6a08d913203c8e2d14308d8e6164249f6ec915ed2c991a763d66d0e8af WHIRLPOOL ede02f69437072f1b2251613078a62f592f682793c8c4fa422be6982f071b563b0a85c4207996f8c5752fa0d176b194ef805d960536f9c3a1434023e9f4c3c3d
|
||||
EBUILD pinentry-1.0.0.ebuild 3187 SHA256 5c38f93fd97fab439d9f7b87349f130f816b5fc842d2b9dfbcc74e05d72c07b4 SHA512 6960375928be6637f611a87795336cce35d910ce9fe6f045b7d7603751f0d999611b41afe70d1baf5613720020384f1676d63e45ed1ebbf5b02297c84f789d7f WHIRLPOOL 4544a7bd4154fbf46277956423170ec507e728f0ee8a73c5517498c20655778613a5bd0f742a7eab9d384ff10a8227e7abf0d07881041af9e7f3c94472248307
|
||||
MISC ChangeLog 9508 SHA256 c9cc05ed15e6ab1341299c3fb985fdd2d8a9539e62d73a16b4dd8f5815bbeefb SHA512 7ff10fc6c2e2621c475ebb0805b63092d8d9fd56b40d69fa4669a4456c5900644aa51b758b92086621035b83e4f728fcfc20d2d8a13e53194d7ef88b3aeb3fa4 WHIRLPOOL 4dac379391947f44aec42b9c3d71b01f46700ede56347dea6b73d9771c7e55cdcbdbdec20cf7781119e1aaf4d3dd822eb423a4810ff3657a8d76dd1768f2a6dc
|
||||
MISC ChangeLog-2015 25487 SHA256 599f868331443fbdf95c4b9ef073517aeb355df82a2878199d311310891ebaa1 SHA512 b6cbb7b6abb7ba7e70094d334d18da227aec8b0e7654af58736fd6a5626dd178c23ac7524abddaf2dbf67037f117e98d6bf4a3757f0c2bb9428e55f0154c8f96 WHIRLPOOL 7683a728f4a93c78d60061a1a85785a3a7271e5854a81e7485fae2760190d49edd1d43e68db525ffc785a1ae45cb52b7df7af9a47d77b84c8a5c397ee4a29d56
|
||||
MISC metadata.xml 352 SHA256 7fd48348fd50b298029c84f873443f5b826fb46f05437440cef6dc2e1ce3773e SHA512 3817eb6ad931ab0ee363ed7f8612b08a44c0d02e7abb9d0734452c289350c9909ca4208acad01c54a3f1b260417c400f4692e37b34113c6d618680d41796e2d0 WHIRLPOOL 46aba74d2e5243e320da11ac8193123ec2576b4fa7d6c904a494b8e234716afe4a90fe1c2c6ea211b40b53edef261eb1735200950563ecc1592d213c66d40ad8
|
||||
DIST pinentry-1.0.0.tar.bz2 436930 BLAKE2B 949be8de8504a42cd5bd6ffebe331a825db7ff3c2ccc5fc554155b7621fddf9df957aa92063eb1a06c6964826a296bf60a4cc46cf2886552e37703a62042f35a SHA512 f109236707c51871b5020ef807a551366461fafcfbe09bf8cda19d4b163a42cf622562b905ceb41429f1d648b3f3d27807538709da6a135b67f9888709eccd62
|
||||
DIST pinentry-1.1.0.tar.bz2 467702 BLAKE2B cf43555848ab0dc60756fca123aba7599ebb1bfe0458b973ed9d84479f8de9ee69ef309b518b40aa340434d64d37793cf97c94f78f99820bc5c71ecd2aac7a49 SHA512 5012672925bcb5f683358c259e55e4b87c67cf063ad52c759308933733025c33f7ce08e5b8019ffc101cbf7ef30499040ef2fd34a7611698e65e1593f80948cd
|
||||
|
@ -1,48 +0,0 @@
|
||||
From 7384e2a575dde2809784d9f182fd1d247064c8a2 Mon Sep 17 00:00:00 2001
|
||||
From: Kristian Fiskerstrand <kf@sumptuouscapital.com>
|
||||
Date: Thu, 11 Aug 2016 14:44:37 +0200
|
||||
Subject: [PATCH] Qt: Append -std=c++11 if building against Qt 5.7
|
||||
|
||||
* m4/qt.m4: Append -std=c++11 to CFLAGS if building against Qt 5.7
|
||||
|
||||
--
|
||||
Qt 5.7 enables C++11 for Qt modules, and any app relying on it require to be
|
||||
compiled with at least this standard.
|
||||
|
||||
This patch adds detection for Qt 5.7 and make sure -std=c++11 is passed if
|
||||
building against Qt 5.7 or higher.
|
||||
---
|
||||
m4/qt.m4 | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/m4/qt.m4 b/m4/qt.m4
|
||||
index 093f428..90c4a6e 100644
|
||||
--- a/m4/qt.m4
|
||||
+++ b/m4/qt.m4
|
||||
@@ -35,6 +35,7 @@ AC_DEFUN([FIND_QT],
|
||||
enable_pinentry_qt5="try")
|
||||
|
||||
have_qt5_libs="no";
|
||||
+ require_qt_cpp11="no";
|
||||
|
||||
if test "$enable_pinentry_qt5" != "no"; then
|
||||
PKG_CHECK_MODULES(PINENTRY_QT,
|
||||
@@ -47,6 +48,15 @@ AC_DEFUN([FIND_QT],
|
||||
fi
|
||||
fi
|
||||
if test "$have_qt5_libs" = "yes"; then
|
||||
+ PKG_CHECK_MODULES(PINENTRY_QT_REQUIRE_CPP11,
|
||||
+ Qt5Core >= 5.7.0,
|
||||
+ [require_qt_cpp11="yes"],
|
||||
+ [require_qt_cpp11="no"])
|
||||
+
|
||||
+ if test "${require_qt_cpp11}" = "yes"; then
|
||||
+ PINENTRY_QT_CFLAGS="$PINENTRY_QT_CFLAGS -std=c++11"
|
||||
+ fi
|
||||
+
|
||||
AC_CHECK_TOOL(MOC, moc)
|
||||
AC_MSG_CHECKING([moc version])
|
||||
mocversion=`$MOC -v 2>&1`
|
||||
--
|
||||
2.7.3
|
||||
|
@ -0,0 +1,47 @@
|
||||
From 1590b664d88be8386a4664c2994b685187d1eb25 Mon Sep 17 00:00:00 2001
|
||||
From: Damien Goutte-Gattat <dgouttegattat@incenp.org>
|
||||
Date: Thu, 3 Aug 2017 22:56:49 +0200
|
||||
Subject: [PATCH 1/6] gtk: Disable tooltips in keyboard-grabbing mode.
|
||||
|
||||
* gtk+-2:/pinentry-gtk-2.c (show_hide_button): Do not show the
|
||||
tooltip if we attempt to grab the keyboard.
|
||||
(create_window): Likewise.
|
||||
--
|
||||
|
||||
For unclear reasons, those tooltips may interfere with grabbing
|
||||
under some tiling window managers.
|
||||
|
||||
GnuPG-bug-id: 3297
|
||||
Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
|
||||
---
|
||||
gtk+-2/pinentry-gtk-2.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c
|
||||
index d467ec5..f17a702 100644
|
||||
--- a/gtk+-2/pinentry-gtk-2.c
|
||||
+++ b/gtk+-2/pinentry-gtk-2.c
|
||||
@@ -516,7 +516,10 @@ show_hide_button_toggled (GtkWidget *widget, gpointer data)
|
||||
}
|
||||
|
||||
gtk_label_set_markup (GTK_LABEL(label), text);
|
||||
- gtk_widget_set_tooltip_text (GTK_WIDGET(button), tooltip);
|
||||
+ if (!pinentry->grab)
|
||||
+ {
|
||||
+ gtk_widget_set_tooltip_text (GTK_WIDGET(button), tooltip);
|
||||
+ }
|
||||
g_free (tooltip);
|
||||
}
|
||||
|
||||
@@ -736,7 +739,7 @@ create_window (pinentry_t ctx)
|
||||
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (qualitybar),
|
||||
QUALITYBAR_EMPTY_TEXT);
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (qualitybar), 0.0);
|
||||
- if (pinentry->quality_bar_tt)
|
||||
+ if (pinentry->quality_bar_tt && !pinentry->grab)
|
||||
{
|
||||
#if !GTK_CHECK_VERSION (2, 12, 0)
|
||||
gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), qualitybar,
|
||||
--
|
||||
2.13.6
|
||||
|
@ -0,0 +1,47 @@
|
||||
From b0e0bdeac5d40ca645afc9017778b39a26303523 Mon Sep 17 00:00:00 2001
|
||||
From: Werner Koch <wk@gnupg.org>
|
||||
Date: Wed, 11 Jan 2017 18:40:17 +0100
|
||||
Subject: [PATCH 01/25] gtk2: Fix a problem with fvwm
|
||||
|
||||
* gtk+-2/pinentry-gtk-2.c (grab_pointer): Take care of
|
||||
GDK_GRAB_ALREADY_GRABBED.
|
||||
--
|
||||
|
||||
Debian-bug-id: 850708
|
||||
Co-authored-by: Vincent Lefevre <vincent@vinc17.net>
|
||||
Signed-off-by: Werner Koch <wk@gnupg.org>
|
||||
---
|
||||
gtk+-2/pinentry-gtk-2.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c
|
||||
index 473c4aa..e37601f 100644
|
||||
--- a/gtk+-2/pinentry-gtk-2.c
|
||||
+++ b/gtk+-2/pinentry-gtk-2.c
|
||||
@@ -203,7 +203,12 @@ grab_pointer (GtkWidget *win, GdkEvent *event, gpointer data)
|
||||
(void)data;
|
||||
|
||||
/* Change the cursor for the duration of the grab to indicate that
|
||||
- something is going on. */
|
||||
+ * something is going on. The fvwm window manager grabs the pointer
|
||||
+ * for a short time and thus we may end up with the already grabbed
|
||||
+ * error code. Actually this error code should be used to detect a
|
||||
+ * malicious grabbing application but with fvwm this renders
|
||||
+ * Pinentry only unusable. Thus we try again several times also for
|
||||
+ * that error code. See Debian bug 850708 for details. */
|
||||
/* XXX: It would be nice to have a key cursor, unfortunately there
|
||||
is none readily available. */
|
||||
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (win),
|
||||
@@ -215,7 +220,8 @@ grab_pointer (GtkWidget *win, GdkEvent *event, gpointer data)
|
||||
NULL /* confine to */,
|
||||
cursor,
|
||||
gdk_event_get_time (event));
|
||||
- while (tries++ < max_tries && err == GDK_GRAB_NOT_VIEWABLE);
|
||||
+ while (tries++ < max_tries && (err == GDK_GRAB_NOT_VIEWABLE
|
||||
+ || err == GDK_GRAB_ALREADY_GRABBED));
|
||||
|
||||
if (err)
|
||||
{
|
||||
--
|
||||
2.13.6
|
||||
|
@ -0,0 +1,52 @@
|
||||
From 7218becac7132c2508d4e8f42c693d69c406795a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu>
|
||||
Date: Wed, 7 Mar 2018 15:14:22 +0100
|
||||
Subject: [PATCH] Make pinentry-qt icon work under Plasma Wayland.
|
||||
|
||||
---
|
||||
qt/Makefile.am | 2 ++
|
||||
qt/main.cpp | 2 ++
|
||||
qt/org.gnupg.pinentry-qt.desktop | 5 +++++
|
||||
3 files changed, 9 insertions(+)
|
||||
create mode 100644 qt/org.gnupg.pinentry-qt.desktop
|
||||
|
||||
diff --git a/qt/Makefile.am b/qt/Makefile.am
|
||||
index 698005e..bbf39d1 100644
|
||||
--- a/qt/Makefile.am
|
||||
+++ b/qt/Makefile.am
|
||||
@@ -24,6 +24,8 @@ bin_PROGRAMS = pinentry-qt
|
||||
|
||||
EXTRA_DIST = document-encrypt.png pinentry.qrc
|
||||
|
||||
+desktopdir = $(datadir)/applications
|
||||
+dist_desktop_DATA = org.gnupg.pinentry-qt.desktop
|
||||
|
||||
if FALLBACK_CURSES
|
||||
ncurses_include = $(NCURSES_INCLUDE)
|
||||
diff --git a/qt/main.cpp b/qt/main.cpp
|
||||
index fe88d26..b767cb4 100644
|
||||
--- a/qt/main.cpp
|
||||
+++ b/qt/main.cpp
|
||||
@@ -372,6 +372,8 @@ main(int argc, char *argv[])
|
||||
i = argc;
|
||||
app = new QApplication(i, new_argv);
|
||||
app->setWindowIcon(QIcon(QLatin1String(":/document-encrypt.png")));
|
||||
+ app->setOrganizationDomain(QStringLiteral("gnupg.org"));
|
||||
+ app->setDesktopFileName(QStringLiteral("org.gnupg.pinentry-qt"));
|
||||
}
|
||||
|
||||
pinentry_parse_opts(argc, argv);
|
||||
diff --git a/qt/org.gnupg.pinentry-qt.desktop b/qt/org.gnupg.pinentry-qt.desktop
|
||||
new file mode 100644
|
||||
index 0000000..0ac89aa
|
||||
--- /dev/null
|
||||
+++ b/qt/org.gnupg.pinentry-qt.desktop
|
||||
@@ -0,0 +1,5 @@
|
||||
+[Desktop Entry]
|
||||
+Type=Application
|
||||
+Name=Pinentry dialog
|
||||
+Icon=document-encrypt
|
||||
+NoDisplay=true
|
||||
--
|
||||
2.16.1
|
||||
|
@ -1,106 +1,86 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
EAPI=6
|
||||
|
||||
inherit autotools qmake-utils multilib eutils flag-o-matic toolchain-funcs
|
||||
inherit autotools flag-o-matic qmake-utils toolchain-funcs
|
||||
|
||||
DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol"
|
||||
HOMEPAGE="http://gnupg.org/aegypten2/index.html"
|
||||
HOMEPAGE="https://gnupg.org/aegypten2/index.html"
|
||||
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="emacs gtk ncurses qt4 qt5 caps gnome-keyring static"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="caps emacs gnome-keyring gtk ncurses qt5 static"
|
||||
|
||||
CDEPEND="
|
||||
>=dev-libs/libgpg-error-1.17
|
||||
app-eselect/eselect-pinentry
|
||||
>=dev-libs/libassuan-2.1
|
||||
>=dev-libs/libgcrypt-1.6.3
|
||||
ncurses? ( sys-libs/ncurses:0= )
|
||||
>=dev-libs/libgpg-error-1.17
|
||||
caps? ( sys-libs/libcap )
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
qt4? (
|
||||
>=dev-qt/qtgui-4.4.1:4
|
||||
)
|
||||
ncurses? ( sys-libs/ncurses:0= )
|
||||
qt5? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
)
|
||||
caps? ( sys-libs/libcap )
|
||||
static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] )
|
||||
app-eselect/eselect-pinentry
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
RDEPEND="${CDEPEND}
|
||||
gnome-keyring? ( app-crypt/gcr )
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
|| ( ncurses gtk qt4 qt5 )
|
||||
gtk? ( !static )
|
||||
qt4? ( !static )
|
||||
qt5? ( !static )
|
||||
static? ( ncurses )
|
||||
?? ( qt4 qt5 )
|
||||
"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-0.8.2-ncurses.patch"
|
||||
"${FILESDIR}/${P}-build.patch"
|
||||
"${FILESDIR}/${P}-Disable-tooltips-in-keyboard-grabbing-mode.patch"
|
||||
"${FILESDIR}/${P}-gtk2-Fix-a-problem-with-fvwm.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${PN}-0.8.2-ncurses.patch"\
|
||||
"${FILESDIR}/${P}-require-CPP11-for-qt-5-7.patches"
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=()
|
||||
use static && append-ldflags -static
|
||||
[[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11
|
||||
|
||||
QT_MOC=""
|
||||
if use qt4; then
|
||||
myconf+=( --enable-pinentry-qt
|
||||
--disable-pinentry-qt5
|
||||
)
|
||||
QT_MOC="$(qt4_get_bindir)"/moc
|
||||
# Issues finding qt on multilib systems
|
||||
export QTLIB="$(qt4_get_libdir)"
|
||||
elif use qt5; then
|
||||
myconf+=( --enable-pinentry-qt )
|
||||
QT_MOC="$(qt5_get_bindir)"/moc
|
||||
export QTLIB="$(qt5_get_libdir)"
|
||||
else
|
||||
myconf+=( --disable-pinentry-qt )
|
||||
fi
|
||||
|
||||
econf \
|
||||
--enable-pinentry-tty \
|
||||
$(use_with caps libcap) \
|
||||
$(use_enable emacs pinentry-emacs) \
|
||||
$(use_enable gnome-keyring libsecret) \
|
||||
$(use_enable gnome-keyring pinentry-gnome3) \
|
||||
$(use_enable gtk pinentry-gtk2) \
|
||||
$(use_enable ncurses pinentry-curses) \
|
||||
$(use_enable ncurses fallback-curses) \
|
||||
$(use_with caps libcap) \
|
||||
$(use_enable gnome-keyring libsecret) \
|
||||
$(use_enable gnome-keyring pinentry-gnome3) \
|
||||
"${myconf[@]}" \
|
||||
MOC="${QT_MOC}"
|
||||
$(use_enable qt5 pinentry-qt) \
|
||||
MOC="$(qt5_get_bindir)"/moc
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
rm -f "${ED}"/usr/bin/pinentry || die
|
||||
|
||||
if use qt4 || use qt5; then
|
||||
dosym pinentry-qt /usr/bin/pinentry-qt4
|
||||
fi
|
||||
use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt4
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
@ -1,55 +1,46 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools qmake-utils multilib flag-o-matic toolchain-funcs
|
||||
inherit autotools flag-o-matic qmake-utils toolchain-funcs
|
||||
|
||||
DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol"
|
||||
HOMEPAGE="http://gnupg.org/aegypten2/index.html"
|
||||
HOMEPAGE="https://gnupg.org/aegypten2/index.html"
|
||||
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="emacs gtk ncurses qt4 qt5 caps gnome-keyring static"
|
||||
IUSE="caps emacs gnome-keyring gtk ncurses qt5 static"
|
||||
|
||||
CDEPEND="
|
||||
>=dev-libs/libgpg-error-1.17
|
||||
app-eselect/eselect-pinentry
|
||||
>=dev-libs/libassuan-2.1
|
||||
>=dev-libs/libgcrypt-1.6.3
|
||||
ncurses? ( sys-libs/ncurses:0= )
|
||||
>=dev-libs/libgpg-error-1.17
|
||||
caps? ( sys-libs/libcap )
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
qt4? (
|
||||
>=dev-qt/qtgui-4.4.1:4
|
||||
)
|
||||
ncurses? ( sys-libs/ncurses:0= )
|
||||
qt5? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
)
|
||||
caps? ( sys-libs/libcap )
|
||||
static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] )
|
||||
app-eselect/eselect-pinentry
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
RDEPEND="${CDEPEND}
|
||||
gnome-keyring? ( app-crypt/gcr )
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
|| ( ncurses gtk qt4 qt5 )
|
||||
gtk? ( !static )
|
||||
qt4? ( !static )
|
||||
qt5? ( !static )
|
||||
static? ( ncurses )
|
||||
?? ( qt4 qt5 )
|
||||
"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
|
||||
@ -57,6 +48,9 @@ DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-0.8.2-ncurses.patch"
|
||||
"${FILESDIR}/${P}-build.patch"
|
||||
"${FILESDIR}/${P}-Disable-tooltips-in-keyboard-grabbing-mode.patch"
|
||||
"${FILESDIR}/${P}-gtk2-Fix-a-problem-with-fvwm.patch"
|
||||
"${FILESDIR}/${P}-make-icon-work-under-Plasma-Wayland.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
@ -65,44 +59,29 @@ src_prepare() {
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=()
|
||||
use static && append-ldflags -static
|
||||
[[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11
|
||||
|
||||
if use qt4; then
|
||||
myconf+=(
|
||||
--enable-pinentry-qt
|
||||
--disable-pinentry-qt5
|
||||
)
|
||||
export MOC="$(qt4_get_bindir)"/moc
|
||||
export QTLIB="$(qt4_get_libdir)"
|
||||
elif use qt5; then
|
||||
myconf+=( --enable-pinentry-qt )
|
||||
export MOC="$(qt5_get_bindir)"/moc
|
||||
export QTLIB="$(qt5_get_libdir)"
|
||||
else
|
||||
myconf+=( --disable-pinentry-qt )
|
||||
fi
|
||||
|
||||
econf \
|
||||
--enable-pinentry-tty \
|
||||
$(use_with caps libcap) \
|
||||
$(use_enable emacs pinentry-emacs) \
|
||||
$(use_enable gnome-keyring libsecret) \
|
||||
$(use_enable gnome-keyring pinentry-gnome3) \
|
||||
$(use_enable gtk pinentry-gtk2) \
|
||||
$(use_enable ncurses pinentry-curses) \
|
||||
$(use_enable ncurses fallback-curses) \
|
||||
$(use_with caps libcap) \
|
||||
$(use_enable gnome-keyring libsecret) \
|
||||
$(use_enable gnome-keyring pinentry-gnome3) \
|
||||
"${myconf[@]}"
|
||||
$(use_enable qt5 pinentry-qt) \
|
||||
MOC="$(qt5_get_bindir)"/moc
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
rm -f "${ED}"/usr/bin/pinentry || die
|
||||
|
||||
if use qt4 || use qt5; then
|
||||
dosym pinentry-qt /usr/bin/pinentry-qt4
|
||||
fi
|
||||
use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt4
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
100
sdk_container/src/third_party/portage-stable/app-crypt/pinentry/pinentry-1.1.0-r1.ebuild
vendored
Normal file
100
sdk_container/src/third_party/portage-stable/app-crypt/pinentry/pinentry-1.1.0-r1.ebuild
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools flag-o-matic qmake-utils toolchain-funcs
|
||||
|
||||
DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol"
|
||||
HOMEPAGE="https://gnupg.org/aegypten2/index.html"
|
||||
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="caps emacs gnome-keyring gtk ncurses qt5 static"
|
||||
|
||||
CDEPEND="
|
||||
app-eselect/eselect-pinentry
|
||||
>=dev-libs/libassuan-2.1
|
||||
>=dev-libs/libgcrypt-1.6.3
|
||||
>=dev-libs/libgpg-error-1.17
|
||||
caps? ( sys-libs/libcap )
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
ncurses? ( sys-libs/ncurses:0= )
|
||||
qt5? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
)
|
||||
static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] )
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig
|
||||
"
|
||||
RDEPEND="${CDEPEND}
|
||||
gnome-keyring? ( app-crypt/gcr )
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
gtk? ( !static )
|
||||
qt5? ( !static )
|
||||
"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.0.0-make-icon-work-under-Plasma-Wayland.patch"
|
||||
"${FILESDIR}/${PN}-0.8.2-ncurses.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use static && append-ldflags -static
|
||||
[[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11
|
||||
|
||||
export QTLIB="$(qt5_get_libdir)"
|
||||
|
||||
econf \
|
||||
--enable-pinentry-tty \
|
||||
$(use_with caps libcap) \
|
||||
$(use_enable emacs pinentry-emacs) \
|
||||
$(use_enable gnome-keyring libsecret) \
|
||||
$(use_enable gnome-keyring pinentry-gnome3) \
|
||||
$(use_enable gtk pinentry-gtk2) \
|
||||
$(use_enable ncurses pinentry-curses) \
|
||||
$(use_enable ncurses fallback-curses) \
|
||||
$(use_enable qt5 pinentry-qt) \
|
||||
MOC="$(qt5_get_bindir)"/moc
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
rm -f "${ED}"/usr/bin/pinentry || die
|
||||
|
||||
use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt4
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! has_version 'app-crypt/pinentry' || has_version '<app-crypt/pinentry-0.7.3'; then
|
||||
elog "We no longer install pinentry-curses and pinentry-qt SUID root by default."
|
||||
elog "Linux kernels >=2.6.9 support memory locking for unprivileged processes."
|
||||
elog "The soft resource limit for memory locking specifies the limit an"
|
||||
elog "unprivileged process may lock into memory. You can also use POSIX"
|
||||
elog "capabilities to allow pinentry to lock memory. To do so activate the caps"
|
||||
elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of"
|
||||
elog "your users."
|
||||
fi
|
||||
|
||||
eselect pinentry update ifunset
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect pinentry update ifunset
|
||||
}
|
102
sdk_container/src/third_party/portage-stable/app-crypt/pinentry/pinentry-1.1.0-r2.ebuild
vendored
Normal file
102
sdk_container/src/third_party/portage-stable/app-crypt/pinentry/pinentry-1.1.0-r2.ebuild
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools flag-o-matic qmake-utils toolchain-funcs
|
||||
|
||||
DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol"
|
||||
HOMEPAGE="https://gnupg.org/aegypten2/index.html"
|
||||
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="caps emacs gnome-keyring fltk gtk ncurses qt5 static"
|
||||
|
||||
CDEPEND="
|
||||
app-eselect/eselect-pinentry
|
||||
>=dev-libs/libassuan-2.1
|
||||
>=dev-libs/libgcrypt-1.6.3
|
||||
>=dev-libs/libgpg-error-1.17
|
||||
caps? ( sys-libs/libcap )
|
||||
fltk? ( x11-libs/fltk )
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
ncurses? ( sys-libs/ncurses:0= )
|
||||
qt5? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
)
|
||||
static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] )
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig
|
||||
"
|
||||
RDEPEND="${CDEPEND}
|
||||
gnome-keyring? ( app-crypt/gcr )
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
gtk? ( !static )
|
||||
qt5? ( !static )
|
||||
"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.0.0-make-icon-work-under-Plasma-Wayland.patch"
|
||||
"${FILESDIR}/${PN}-0.8.2-ncurses.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use static && append-ldflags -static
|
||||
[[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11
|
||||
|
||||
export QTLIB="$(qt5_get_libdir)"
|
||||
|
||||
econf \
|
||||
--enable-pinentry-tty \
|
||||
$(use_with caps libcap) \
|
||||
$(use_enable emacs pinentry-emacs) \
|
||||
$(use_enable fltk pinentry-fltk) \
|
||||
$(use_enable gnome-keyring libsecret) \
|
||||
$(use_enable gnome-keyring pinentry-gnome3) \
|
||||
$(use_enable gtk pinentry-gtk2) \
|
||||
$(use_enable ncurses pinentry-curses) \
|
||||
$(use_enable ncurses fallback-curses) \
|
||||
$(use_enable qt5 pinentry-qt) \
|
||||
MOC="$(qt5_get_bindir)"/moc
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
rm -f "${ED}"/usr/bin/pinentry || die
|
||||
|
||||
use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt4
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! has_version 'app-crypt/pinentry' || has_version '<app-crypt/pinentry-0.7.3'; then
|
||||
elog "We no longer install pinentry-curses and pinentry-qt SUID root by default."
|
||||
elog "Linux kernels >=2.6.9 support memory locking for unprivileged processes."
|
||||
elog "The soft resource limit for memory locking specifies the limit an"
|
||||
elog "unprivileged process may lock into memory. You can also use POSIX"
|
||||
elog "capabilities to allow pinentry to lock memory. To do so activate the caps"
|
||||
elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of"
|
||||
elog "your users."
|
||||
fi
|
||||
|
||||
eselect pinentry update ifunset
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect pinentry update ifunset
|
||||
}
|
2
sdk_container/src/third_party/portage-stable/app-crypt/rhash/Manifest
vendored
Normal file
2
sdk_container/src/third_party/portage-stable/app-crypt/rhash/Manifest
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
DIST rhash-1.3.5-src.tar.gz 316867 BLAKE2B 3ffbf2ec5aef24ef63455e21c3efcae043a321a78be522a26bd25086111430071a496ab3775ff9b4956da7304df8d8e552a061f3306a7a683be5fc65ea3fd1c4 SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c
|
||||
DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6
|
54
sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch
vendored
Normal file
54
sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
From c1776248a0b34a690e99ab9a7a814c34f78088ec Mon Sep 17 00:00:00 2001
|
||||
From: Lars Wendler <polynomial-c@gentoo.org>
|
||||
Date: Mon, 19 Mar 2018 10:47:13 +0100
|
||||
Subject: [PATCH] "echo -n" cannot be expected to work with every POSIX shell
|
||||
|
||||
See "man 1p echo" section APPLICATION USAGE. This patch replaces "echo -n"
|
||||
with "printf '%s'".
|
||||
---
|
||||
configure | 15 ++-------------
|
||||
1 file changed, 2 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index f480f7b..2a7d485 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -22,17 +22,6 @@ INSTALL_LIB_STATIC=auto
|
||||
INSTALL_LIB_SHARED=auto
|
||||
INSTALL_PKGCONFIGDIR="$PKG_INSTALLDIR"
|
||||
|
||||
-case $(echo -n) in
|
||||
- -n) # SysV style
|
||||
- ECHO_N=
|
||||
- ECHO_C='\c'
|
||||
- ;;
|
||||
- *) # BSD style
|
||||
- ECHO_N='-n '
|
||||
- ECHO_C=
|
||||
- ;;
|
||||
-esac
|
||||
-
|
||||
# display error message and exit
|
||||
die () {
|
||||
echo
|
||||
@@ -235,7 +224,7 @@ trap remove_tmpdir EXIT
|
||||
|
||||
str_concat()
|
||||
{
|
||||
- echo ${ECHO_N} $@ ${ECHO_C}
|
||||
+ printf '%s ' $@
|
||||
}
|
||||
|
||||
yn_nonempty()
|
||||
@@ -246,7 +235,7 @@ yn_nonempty()
|
||||
# Use this before starting a check
|
||||
start_check() {
|
||||
echo "============ Checking for $1 ============" >> "$TMPLOG"
|
||||
- echo ${ECHO_N} "Checking for $1 ... ${ECHO_C}"
|
||||
+ printf '%s' "Checking for $1 ... "
|
||||
res_comment=""
|
||||
}
|
||||
|
||||
--
|
||||
2.16.2
|
||||
|
26
sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/unquote-cc.patch
vendored
Normal file
26
sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/unquote-cc.patch
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
From 4558d6753611ab1bf21765017e5b451aee8409f6 Mon Sep 17 00:00:00 2001
|
||||
From: James Le Cuirot <chewi@gentoo.org>
|
||||
Date: Sun, 18 Mar 2018 14:23:28 +0000
|
||||
Subject: [PATCH] configure: Don't quote $CC when calling it
|
||||
|
||||
It might have additional arguments.
|
||||
---
|
||||
configure | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index f480f7b..8ebb929 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -480,7 +480,7 @@ if test "$(basename $CC)" = "icc" || test "$(basename $CC)" = "ecc"; then
|
||||
else
|
||||
CC_TMP="$CC"
|
||||
for CC in "$CC_TMP" gcc cc ; do
|
||||
- if "$CC" -v >/dev/null 2>&1; then
|
||||
+ if $CC -v >/dev/null 2>&1; then
|
||||
cc_name_tmp=$($CC -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
|
||||
if test "$cc_name_tmp" = "gcc"; then
|
||||
cc_name=$cc_name_tmp
|
||||
--
|
||||
2.16.1
|
||||
|
16
sdk_container/src/third_party/portage-stable/app-crypt/rhash/metadata.xml
vendored
Normal file
16
sdk_container/src/third_party/portage-stable/app-crypt/rhash/metadata.xml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>chewi@gentoo.org</email>
|
||||
<name>James Le Cuirot</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">rhash</remote-id>
|
||||
<remote-id type="github">rhash/RHash</remote-id>
|
||||
<bugs-to>https://github.com/rhash/RHash/issues</bugs-to>
|
||||
</upstream>
|
||||
<longdescription lang="en">
|
||||
RHash is a console utility for calculation and verification of magnet links and a wide range of hash sums like CRC32, MD4, MD5, SHA1, SHA256, SHA512, SHA3, AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R, Whirlpool and Snefru.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
94
sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.5.ebuild
vendored
Normal file
94
sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.5.ebuild
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit toolchain-funcs multilib-minimal
|
||||
|
||||
DESCRIPTION="Console utility and library for computing and verifying file hash sums"
|
||||
HOMEPAGE="http://rhash.anz.ru/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug nls libressl ssl static-libs"
|
||||
|
||||
RDEPEND="
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
|
||||
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
S="${WORKDIR}/RHash-${PV}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Install /etc stuff inside the Prefix
|
||||
sed -i -e 's:\$(DESTDIR)/etc:\$(DESTDIR)/$(SYSCONFDIR):g' Makefile || die
|
||||
|
||||
if use elibc_Darwin ; then
|
||||
local ver_script='-Wl,--version-script,exports.sym,-soname,$(SONAME)'
|
||||
local install_name='-install_name $(LIBDIR)/$(SONAME)'
|
||||
sed -i -e '/^\(SONAME\|SHAREDLIB\)/s/\.so\.\([0-9]\+\)/.\1.dylib/' \
|
||||
-e '/^SOLINK/s/\.so/.dylib/' \
|
||||
-e "s:${ver_script}:${install_name}:" \
|
||||
librhash/Makefile \
|
||||
Makefile || die
|
||||
fi
|
||||
|
||||
if use elibc_SunOS ; then
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=12548
|
||||
# skip the export.sym for now
|
||||
sed -i -e 's/,--version-script,exports.sym//' librhash/Makefile || die
|
||||
fi
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
local ADDCFLAGS=(
|
||||
$(use debug || echo -DNDEBUG)
|
||||
$(use nls && echo -DUSE_GETTEXT)
|
||||
$(use ssl && echo -DOPENSSL_RUNTIME -rdynamic)
|
||||
)
|
||||
|
||||
local ADDLDFLAGS=(
|
||||
$(use ssl && echo -ldl)
|
||||
)
|
||||
|
||||
use elibc_Darwin || use elibc_DragonFly || use elibc_FreeBSD ||
|
||||
use elibc_NetBSD || use elibc_OpenBSD || use elibc_SunOS &&
|
||||
ADDLDFLAGS+=( $(use nls && echo -lintl) )
|
||||
|
||||
emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \
|
||||
ADDCFLAGS="${ADDCFLAGS[*]}" ADDLDFLAGS="${ADDLDFLAGS[*]}" \
|
||||
PREFIX="${EPREFIX}"/usr LIBDIR='$(PREFIX)'/$(get_libdir) \
|
||||
build-shared $(use static-libs && echo lib-static)
|
||||
}
|
||||
|
||||
myemake() {
|
||||
emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr \
|
||||
LIBDIR='$(PREFIX)'/$(get_libdir) SYSCONFDIR="${EPREFIX}"/etc "${@}"
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
myemake -C librhash install-lib-shared install-so-link
|
||||
multilib_is_native_abi && myemake install-shared
|
||||
use static-libs && myemake install-lib-static
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
myemake -C librhash install-headers
|
||||
use nls && myemake install-gmo
|
||||
einstalldocs
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
cd tests || die
|
||||
LD_LIBRARY_PATH=$(pwd)/../librhash ./test_rhash.sh --full ../rhash_shared || die "tests failed"
|
||||
}
|
77
sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.6-r1.ebuild
vendored
Normal file
77
sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.6-r1.ebuild
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit toolchain-funcs multilib-minimal
|
||||
|
||||
DESCRIPTION="Console utility and library for computing and verifying file hash sums"
|
||||
HOMEPAGE="http://rhash.anz.ru/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug nls libressl ssl static-libs"
|
||||
|
||||
RDEPEND="
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
|
||||
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
S="${WORKDIR}/RHash-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/unquote-cc.patch
|
||||
"${FILESDIR}"/${P}-no_echon.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
set -- \
|
||||
./configure \
|
||||
--target="${CHOST}" \
|
||||
--cc="$(tc-getCC)" \
|
||||
--ar="$(tc-getAR)" \
|
||||
--extra-cflags="${CFLAGS}" \
|
||||
--extra-ldflags="${LDFLAGS}" \
|
||||
--prefix="${EPREFIX}"/usr \
|
||||
--libdir="${EPREFIX}"/usr/$(get_libdir) \
|
||||
--sysconfdir="${EPREFIX}"/etc \
|
||||
--disable-openssl-runtime \
|
||||
--disable-static \
|
||||
--enable-lib-shared \
|
||||
$(use_enable debug) \
|
||||
$(use_enable nls gettext) \
|
||||
$(use_enable ssl openssl) \
|
||||
$(use_enable static-libs lib-static)
|
||||
|
||||
echo "${@}"
|
||||
"${@}" || die "configure failed"
|
||||
}
|
||||
|
||||
# We would add compile-gmo to the build targets but install-gmo always
|
||||
# recompiles unconditionally. :(
|
||||
|
||||
multilib_src_install() {
|
||||
# -j1 needed due to race condition.
|
||||
emake DESTDIR="${D}" -j1 \
|
||||
install{,-pkg-config} \
|
||||
$(use nls && echo install-gmo) \
|
||||
$(use kernel_Winnt || echo install-lib-so-link)
|
||||
|
||||
emake DESTDIR="${D}" -j1 \
|
||||
-C lib${PN} install-headers
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
emake test
|
||||
}
|
@ -1,2 +1,5 @@
|
||||
DIST vim-8.0.0106-gentoo-patches.tar.bz2 2281 SHA256 9823a91b050eb4b001cc50f508d2ad03c7c256ed49183c1af7582318667f48d4 SHA512 39edd9f518c230d2b0486b18aa155572a9eada4a5e21108573d6e66e2eef1276f23b77d766648f018c9cf973a7d03712d8861be6ea13255d7b389912d554a47a WHIRLPOOL d6d01e3944d56762a2a999ee631f89e212360aa030ddd16ea96e32d518ec171e04d8565dcb89e804248d53e4c6e06b19be239ad2316ea88bb57364815b85d26b
|
||||
DIST vim-8.0.0386.tar.gz 13000882 SHA256 25b28f6ef55a8d0b3f255f0fbed90ad1450bde7f7b231cc09d86c5119adc95bc SHA512 3169ea4dbc836c724f63d99cd345227f870a3a922beba84a6b42011685c0dd209f6bba8c69af0650c9a57bb47fc541e1150ca8cefb21fcada022259bf4c94a66 WHIRLPOOL 99a5582e0db0dc53fd8385cddf1fbf13d2fe1dd5c8e33c9959288c19d4b85f50139791269edd4ec3d5cbed6548cc3d9c7962ec1706eb422a4ef83c207aac009b
|
||||
DIST vim-8.0.0938-gentoo-patches.tar.bz2 2316 BLAKE2B 05a87f32fc5cc65e7f5e4e5a87c654b2040ad39f1555ddde7e0e6f473dc8b520916a795406bb6bbeaf5e7ae8748aacebe7a9679461e48802e69417e945eea827 SHA512 a6062be5e6a5c5b437081312df5742353242b5171bf26da04aa6ca216d2b142b2411a88bc1edd460d28e00a59a210c8e1729e801fac6f1efd86bb2e437a56a2b
|
||||
DIST vim-8.0.1298.tar.gz 13395459 BLAKE2B 4b6e3c4443cd675dc3727e8609b89c422f66c7d32908b5136ee312d48427568a8236214c85135242269b6575e0e1336b0973395a6372664435f8bae4d7bee843 SHA512 7704c493359c1a922f876e4d6f3b4ad265d8ce974a59d51a39e5a4424251105250ffc803bcf6c6750daeb5e6376cbbfd24557b075eacf2b0274d7c432db2f681
|
||||
DIST vim-8.0.1428.tar.gz 13415243 BLAKE2B 88f86c371d0a644212b9e4dc1a15d61244847037f36262a225c361bfc2799b741c128de21ac92bb3fb4a4955894e46d34dc01baa7cbf58f1371d772b36887103 SHA512 f635c53c7e2ca808dc1cb424e6e4b16d8c41c66a86c3c7584444dab3d2482904795fea7c071d65862ae6ac6b2b66b7ad5ac832e1e30f4624d46f220c6f41e2e9
|
||||
DIST vim-8.0.1645.tar.gz 13535252 BLAKE2B a5c7463e85eed12825bdf46d15eb7e7513d62831eba76cbb90af875010b33662b7a6ef2c4c5cecddface415d75e97caf0a670e69835ecd3b4a89704f3b18b905 SHA512 367b9e205e776f84fcfbb92725afd5e7aa66898110d46dbea1a33f7b74c239559e829b5104c45360539c8f2b23c375ed59ccea7ee35a5dd10770400d9a7be085
|
||||
DIST vim-8.0.1699.tar.gz 13546105 BLAKE2B cabf29d5a89c55e2fe3bc5e39eb499412f5907ddf856f8644b466f1e0fbffefff3cd801b6bc5e49e62ffdf8805b0556058b9a913015a9f9fbe1a4f580132fd49 SHA512 b0fe8e1dc05fdc3758896caf4746da40988ca7604d77dbe78c47525cbf8f0d7e6c05f690687268eda581009050d4e02e93fb4d30734cbbab4cfd6a8a1488c1e7
|
||||
|
@ -193,6 +193,17 @@ endif " has("autocmd")
|
||||
" instead:
|
||||
let g:skip_defaults_vim = 1
|
||||
|
||||
" Enable Omni completion when opening a file only if a specific plugin does
|
||||
" not already exist for that filetype. This allows Omni completion
|
||||
" (Ctrl-x/Ctrl-o) to work with any programming language if and only if a syntax
|
||||
" file exists for the said language.
|
||||
if exists("+omnifunc")
|
||||
autocmd Filetype *
|
||||
\ if &omnifunc == "" |
|
||||
\ setlocal omnifunc=syntaxcomplete#Complete |
|
||||
\ endif
|
||||
endif
|
||||
|
||||
" {{{ vimrc.local
|
||||
if filereadable("@GENTOO_PORTAGE_EPREFIX@/etc/vim/vimrc.local")
|
||||
source @GENTOO_PORTAGE_EPREFIX@/etc/vim/vimrc.local
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
VIM_VERSION="8.0"
|
||||
inherit eutils vim-doc flag-o-matic versionator bash-completion-r1 prefix
|
||||
inherit estack vim-doc flag-o-matic versionator bash-completion-r1 prefix
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
inherit git-r3
|
||||
@ -11,12 +11,12 @@ if [[ ${PV} == 9999* ]] ; then
|
||||
EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV}
|
||||
else
|
||||
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0106-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="vim and gvim shared files"
|
||||
HOMEPAGE="http://www.vim.org/ https://github.com/vim/vim"
|
||||
HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="vim"
|
||||
@ -33,7 +33,7 @@ pkg_setup() {
|
||||
export LC_COLLATE="C"
|
||||
|
||||
# Gnome sandbox silliness. bug #114475.
|
||||
mkdir -p "${T}"/home
|
||||
mkdir -p "${T}"/home || die "mkdir -p failed"
|
||||
export HOME="${T}"/home
|
||||
}
|
||||
|
||||
@ -44,8 +44,12 @@ src_prepare() {
|
||||
fi
|
||||
|
||||
# Fixup a script to use awk instead of nawk
|
||||
sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
|
||||
|| die "mve.awk sed failed"
|
||||
sed -i \
|
||||
-e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
|
||||
"${S}"/runtime/tools/mve.awk || die "sed failed"
|
||||
|
||||
# See #77841. We remove this file after the tarball extraction.
|
||||
rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed"
|
||||
|
||||
# Read vimrc and gvimrc from /etc/vim
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
|
||||
@ -70,24 +74,23 @@ src_prepare() {
|
||||
# correctly. To avoid some really entertaining error messages about stuff
|
||||
# which isn't even in the source file being invalid, we'll do some trickery
|
||||
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
|
||||
find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done
|
||||
find "${S}" -name '*.c' | while read c; do
|
||||
echo >> "$c" || die "echo failed"
|
||||
done
|
||||
|
||||
# Try to avoid sandbox problems. Bug #114475.
|
||||
if [[ -d "${S}"/src/po ]]; then
|
||||
sed -i -e \
|
||||
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile
|
||||
"${S}"/src/po/Makefile || die "sed failed"
|
||||
fi
|
||||
|
||||
if version_is_at_least 7.3.122 ; then
|
||||
cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
|
||||
fi
|
||||
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
|
||||
|
||||
# Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
|
||||
if version_is_at_least 7.3 ; then
|
||||
sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
sed -i -e \
|
||||
"s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
"${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
@ -110,13 +113,18 @@ src_configure() {
|
||||
# (3) Notice auto/configure is newer than auto/config.mk
|
||||
# (4) Run ./configure (with wrong args) to remake auto/config.mk
|
||||
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
|
||||
rm -f src/auto/configure
|
||||
|
||||
# Remove src/auto/configure file.
|
||||
rm -v src/auto/configure || die "rm configure failed"
|
||||
|
||||
emake -j1 -C src autoconf
|
||||
|
||||
# This should fix a sandbox violation (see bug 24447). The hvc
|
||||
# things are for ppc64, see bug 86433.
|
||||
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
|
||||
[[ -e ${file} ]] && addwrite $file
|
||||
if [[ -e "${file}" ]]; then
|
||||
addwrite $file
|
||||
fi
|
||||
done
|
||||
|
||||
# Let Portage do the stripping. Some people like that.
|
||||
@ -141,9 +149,7 @@ src_configure() {
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# The following allows emake to be used
|
||||
emake -j1 -C src auto/osdef.h objects
|
||||
|
||||
emake tools
|
||||
}
|
||||
|
||||
@ -179,9 +185,9 @@ src_install() {
|
||||
# Helps minimalize the livecd, bug 65144.
|
||||
eshopts_push -s extglob
|
||||
|
||||
rm -fr "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent}
|
||||
rm -fr "${ED}${vimfiles}"/{macros,print,tools,tutor}
|
||||
rm "${ED}"/usr/bin/vimtutor
|
||||
rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die "rm failed"
|
||||
rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die "rm failed"
|
||||
rm -v "${ED}"/usr/bin/vimtutor || die "rm failed"
|
||||
|
||||
local keep_colors="default"
|
||||
ignore=$(rm -fr "${ED}${vimfiles}"/colors/!(${keep_colors}).vim )
|
||||
@ -194,16 +200,7 @@ src_install() {
|
||||
eshopts_pop
|
||||
fi
|
||||
|
||||
# These files might have slight security issues, so we won't
|
||||
# install them. See bug #77841. We don't mind if these don't
|
||||
# exist.
|
||||
rm "${ED}${vimfiles}"/tools/{vimspell.sh,tcltags} 2>/dev/null
|
||||
|
||||
newbashcomp "${FILESDIR}"/xxd-completion xxd
|
||||
|
||||
# We shouldn't be installing the ex or view man page symlinks, as they
|
||||
# are managed by eselect-vi
|
||||
rm -f "${ED}"/usr/share/man/man1/{ex,view}.1
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
214
sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-8.0.1428.ebuild
vendored
Normal file
214
sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-8.0.1428.ebuild
vendored
Normal file
@ -0,0 +1,214 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
VIM_VERSION="8.0"
|
||||
inherit estack vim-doc flag-o-matic versionator bash-completion-r1 prefix
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/vim/vim.git"
|
||||
EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV}
|
||||
else
|
||||
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="vim and gvim shared files"
|
||||
HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="vim"
|
||||
IUSE="nls acl minimal"
|
||||
|
||||
DEPEND="sys-devel/autoconf"
|
||||
PDEPEND="!minimal? ( app-vim/gentoo-syntax )"
|
||||
|
||||
S=${WORKDIR}/vim-${PV}
|
||||
|
||||
pkg_setup() {
|
||||
# people with broken alphabets run into trouble. bug 82186.
|
||||
unset LANG LC_ALL
|
||||
export LC_COLLATE="C"
|
||||
|
||||
# Gnome sandbox silliness. bug #114475.
|
||||
mkdir -p "${T}"/home || die "mkdir -p failed"
|
||||
export HOME="${T}"/home
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} != 9999* ]] ; then
|
||||
# Gentoo patches to fix runtime issues, cross-compile errors, etc
|
||||
eapply "${WORKDIR}"/patches
|
||||
fi
|
||||
|
||||
# Fixup a script to use awk instead of nawk
|
||||
sed -i \
|
||||
-e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
|
||||
"${S}"/runtime/tools/mve.awk || die "sed failed"
|
||||
|
||||
# See #77841. We remove this file after the tarball extraction.
|
||||
rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed"
|
||||
|
||||
# Read vimrc and gvimrc from /etc/vim
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
|
||||
|
||||
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
|
||||
# Hopefully this pattern won't break for a while at least.
|
||||
# This fixes bug 29398 (27 Sep 2003 agriffis)
|
||||
sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
"${S}"/runtime/doc/syntax.txt \
|
||||
"${S}"/runtime/doc/tagsrch.txt \
|
||||
"${S}"/runtime/doc/usr_29.txt \
|
||||
"${S}"/runtime/menu.vim \
|
||||
"${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# Don't be fooled by /usr/include/libc.h. When found, vim thinks
|
||||
# this is NeXT, but it's actually just a file in dev-libs/9libs
|
||||
# This fixes bug 43885 (20 Mar 2004 agriffis)
|
||||
sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
|
||||
# correctly. To avoid some really entertaining error messages about stuff
|
||||
# which isn't even in the source file being invalid, we'll do some trickery
|
||||
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
|
||||
find "${S}" -name '*.c' | while read c; do
|
||||
echo >> "$c" || die "echo failed"
|
||||
done
|
||||
|
||||
# Try to avoid sandbox problems. Bug #114475.
|
||||
if [[ -d "${S}"/src/po ]]; then
|
||||
sed -i -e \
|
||||
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile || die "sed failed"
|
||||
fi
|
||||
|
||||
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
|
||||
|
||||
# Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
|
||||
sed -i -e \
|
||||
"s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
"${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
|
||||
# Fix bug 37354: Disallow -funroll-all-loops on amd64
|
||||
# Bug 57859 suggests that we want to do this for all archs
|
||||
filter-flags -funroll-all-loops
|
||||
|
||||
# Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
|
||||
# everyone since previous flag filtering bugs have turned out to affect
|
||||
# multiple archs...
|
||||
replace-flags -O3 -O2
|
||||
|
||||
# Fix bug 18245: Prevent "make" from the following chain:
|
||||
# (1) Notice configure.ac is newer than auto/configure
|
||||
# (2) Rebuild auto/configure
|
||||
# (3) Notice auto/configure is newer than auto/config.mk
|
||||
# (4) Run ./configure (with wrong args) to remake auto/config.mk
|
||||
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
|
||||
|
||||
# Remove src/auto/configure file.
|
||||
rm -v src/auto/configure || die "rm configure failed"
|
||||
|
||||
emake -j1 -C src autoconf
|
||||
|
||||
# This should fix a sandbox violation (see bug 24447). The hvc
|
||||
# things are for ppc64, see bug 86433.
|
||||
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
|
||||
if [[ -e "${file}" ]]; then
|
||||
addwrite $file
|
||||
fi
|
||||
done
|
||||
|
||||
# Let Portage do the stripping. Some people like that.
|
||||
export ac_cv_prog_STRIP="$(type -P true ) faking strip"
|
||||
|
||||
# Keep Gentoo Prefix env contained within the EPREFIX
|
||||
use prefix && myconf+=" --without-local-dir"
|
||||
|
||||
econf \
|
||||
--with-modified-by=Gentoo-${PVR} \
|
||||
--enable-gui=no \
|
||||
--without-x \
|
||||
--disable-darwin \
|
||||
--disable-perlinterp \
|
||||
--disable-pythoninterp \
|
||||
--disable-rubyinterp \
|
||||
--disable-gpm \
|
||||
--disable-selinux \
|
||||
$(use_enable nls) \
|
||||
$(use_enable acl) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 -C src auto/osdef.h objects
|
||||
emake tools
|
||||
}
|
||||
|
||||
src_test() { :; }
|
||||
|
||||
src_install() {
|
||||
local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
|
||||
|
||||
dodir /usr/{bin,share/{man/man1,vim}}
|
||||
emake -C src \
|
||||
installruntime \
|
||||
installmanlinks \
|
||||
installmacros \
|
||||
installtutor \
|
||||
installtutorbin \
|
||||
installtools \
|
||||
install-languages \
|
||||
DESTDIR="${D}" \
|
||||
BINDIR="${EPREFIX}"/usr/bin \
|
||||
MANDIR="${EPREFIX}"/usr/share/man \
|
||||
DATADIR="${EPREFIX}"/usr/share
|
||||
|
||||
keepdir ${vimfiles}/keymap
|
||||
|
||||
# default vimrc is installed by vim-core since it applies to
|
||||
# both vim and gvim
|
||||
insinto /etc/vim/
|
||||
newins "${FILESDIR}"/vimrc-r5 vimrc
|
||||
eprefixify "${ED}"/etc/vim/vimrc
|
||||
|
||||
if use minimal; then
|
||||
# To save space, install only a subset of the files.
|
||||
# Helps minimalize the livecd, bug 65144.
|
||||
eshopts_push -s extglob
|
||||
|
||||
rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die "rm failed"
|
||||
rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die "rm failed"
|
||||
rm -v "${ED}"/usr/bin/vimtutor || die "rm failed"
|
||||
|
||||
local keep_colors="default"
|
||||
ignore=$(rm -fr "${ED}${vimfiles}"/colors/!(${keep_colors}).vim )
|
||||
|
||||
local keep_syntax="conf|crontab|fstab|inittab|resolv|sshdconfig"
|
||||
# tinkering with the next line might make bad things happen ...
|
||||
keep_syntax="${keep_syntax}|syntax|nosyntax|synload"
|
||||
ignore=$(rm -fr "${ED}${vimfiles}"/syntax/!(${keep_syntax}).vim )
|
||||
|
||||
eshopts_pop
|
||||
fi
|
||||
|
||||
newbashcomp "${FILESDIR}"/xxd-completion xxd
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
}
|
214
sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-8.0.1645.ebuild
vendored
Normal file
214
sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-8.0.1645.ebuild
vendored
Normal file
@ -0,0 +1,214 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
VIM_VERSION="8.0"
|
||||
inherit estack vim-doc flag-o-matic versionator bash-completion-r1 prefix
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/vim/vim.git"
|
||||
EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV}
|
||||
else
|
||||
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="vim and gvim shared files"
|
||||
HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="vim"
|
||||
IUSE="nls acl minimal"
|
||||
|
||||
DEPEND="sys-devel/autoconf"
|
||||
PDEPEND="!minimal? ( app-vim/gentoo-syntax )"
|
||||
|
||||
S=${WORKDIR}/vim-${PV}
|
||||
|
||||
pkg_setup() {
|
||||
# people with broken alphabets run into trouble. bug 82186.
|
||||
unset LANG LC_ALL
|
||||
export LC_COLLATE="C"
|
||||
|
||||
# Gnome sandbox silliness. bug #114475.
|
||||
mkdir -p "${T}"/home || die "mkdir -p failed"
|
||||
export HOME="${T}"/home
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} != 9999* ]] ; then
|
||||
# Gentoo patches to fix runtime issues, cross-compile errors, etc
|
||||
eapply "${WORKDIR}"/patches
|
||||
fi
|
||||
|
||||
# Fixup a script to use awk instead of nawk
|
||||
sed -i \
|
||||
-e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
|
||||
"${S}"/runtime/tools/mve.awk || die "sed failed"
|
||||
|
||||
# See #77841. We remove this file after the tarball extraction.
|
||||
rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed"
|
||||
|
||||
# Read vimrc and gvimrc from /etc/vim
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
|
||||
|
||||
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
|
||||
# Hopefully this pattern won't break for a while at least.
|
||||
# This fixes bug 29398 (27 Sep 2003 agriffis)
|
||||
sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
"${S}"/runtime/doc/syntax.txt \
|
||||
"${S}"/runtime/doc/tagsrch.txt \
|
||||
"${S}"/runtime/doc/usr_29.txt \
|
||||
"${S}"/runtime/menu.vim \
|
||||
"${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# Don't be fooled by /usr/include/libc.h. When found, vim thinks
|
||||
# this is NeXT, but it's actually just a file in dev-libs/9libs
|
||||
# This fixes bug 43885 (20 Mar 2004 agriffis)
|
||||
sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
|
||||
# correctly. To avoid some really entertaining error messages about stuff
|
||||
# which isn't even in the source file being invalid, we'll do some trickery
|
||||
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
|
||||
find "${S}" -name '*.c' | while read c; do
|
||||
echo >> "$c" || die "echo failed"
|
||||
done
|
||||
|
||||
# Try to avoid sandbox problems. Bug #114475.
|
||||
if [[ -d "${S}"/src/po ]]; then
|
||||
sed -i -e \
|
||||
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile || die "sed failed"
|
||||
fi
|
||||
|
||||
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
|
||||
|
||||
# Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
|
||||
sed -i -e \
|
||||
"s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
"${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
|
||||
# Fix bug 37354: Disallow -funroll-all-loops on amd64
|
||||
# Bug 57859 suggests that we want to do this for all archs
|
||||
filter-flags -funroll-all-loops
|
||||
|
||||
# Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
|
||||
# everyone since previous flag filtering bugs have turned out to affect
|
||||
# multiple archs...
|
||||
replace-flags -O3 -O2
|
||||
|
||||
# Fix bug 18245: Prevent "make" from the following chain:
|
||||
# (1) Notice configure.ac is newer than auto/configure
|
||||
# (2) Rebuild auto/configure
|
||||
# (3) Notice auto/configure is newer than auto/config.mk
|
||||
# (4) Run ./configure (with wrong args) to remake auto/config.mk
|
||||
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
|
||||
|
||||
# Remove src/auto/configure file.
|
||||
rm -v src/auto/configure || die "rm configure failed"
|
||||
|
||||
emake -j1 -C src autoconf
|
||||
|
||||
# This should fix a sandbox violation (see bug 24447). The hvc
|
||||
# things are for ppc64, see bug 86433.
|
||||
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
|
||||
if [[ -e "${file}" ]]; then
|
||||
addwrite $file
|
||||
fi
|
||||
done
|
||||
|
||||
# Let Portage do the stripping. Some people like that.
|
||||
export ac_cv_prog_STRIP="$(type -P true ) faking strip"
|
||||
|
||||
# Keep Gentoo Prefix env contained within the EPREFIX
|
||||
use prefix && myconf+=" --without-local-dir"
|
||||
|
||||
econf \
|
||||
--with-modified-by=Gentoo-${PVR} \
|
||||
--enable-gui=no \
|
||||
--without-x \
|
||||
--disable-darwin \
|
||||
--disable-perlinterp \
|
||||
--disable-pythoninterp \
|
||||
--disable-rubyinterp \
|
||||
--disable-gpm \
|
||||
--disable-selinux \
|
||||
$(use_enable nls) \
|
||||
$(use_enable acl) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 -C src auto/osdef.h objects
|
||||
emake tools
|
||||
}
|
||||
|
||||
src_test() { :; }
|
||||
|
||||
src_install() {
|
||||
local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
|
||||
|
||||
dodir /usr/{bin,share/{man/man1,vim}}
|
||||
emake -C src \
|
||||
installruntime \
|
||||
installmanlinks \
|
||||
installmacros \
|
||||
installtutor \
|
||||
installtutorbin \
|
||||
installtools \
|
||||
install-languages \
|
||||
DESTDIR="${D}" \
|
||||
BINDIR="${EPREFIX}"/usr/bin \
|
||||
MANDIR="${EPREFIX}"/usr/share/man \
|
||||
DATADIR="${EPREFIX}"/usr/share
|
||||
|
||||
keepdir ${vimfiles}/keymap
|
||||
|
||||
# default vimrc is installed by vim-core since it applies to
|
||||
# both vim and gvim
|
||||
insinto /etc/vim/
|
||||
newins "${FILESDIR}"/vimrc-r5 vimrc
|
||||
eprefixify "${ED}"/etc/vim/vimrc
|
||||
|
||||
if use minimal; then
|
||||
# To save space, install only a subset of the files.
|
||||
# Helps minimalize the livecd, bug 65144.
|
||||
eshopts_push -s extglob
|
||||
|
||||
rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die "rm failed"
|
||||
rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die "rm failed"
|
||||
rm -v "${ED}"/usr/bin/vimtutor || die "rm failed"
|
||||
|
||||
local keep_colors="default"
|
||||
ignore=$(rm -fr "${ED}${vimfiles}"/colors/!(${keep_colors}).vim )
|
||||
|
||||
local keep_syntax="conf|crontab|fstab|inittab|resolv|sshdconfig"
|
||||
# tinkering with the next line might make bad things happen ...
|
||||
keep_syntax="${keep_syntax}|syntax|nosyntax|synload"
|
||||
ignore=$(rm -fr "${ED}${vimfiles}"/syntax/!(${keep_syntax}).vim )
|
||||
|
||||
eshopts_pop
|
||||
fi
|
||||
|
||||
newbashcomp "${FILESDIR}"/xxd-completion xxd
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
}
|
214
sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-8.0.1699.ebuild
vendored
Normal file
214
sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-8.0.1699.ebuild
vendored
Normal file
@ -0,0 +1,214 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
VIM_VERSION="8.0"
|
||||
inherit estack vim-doc flag-o-matic versionator bash-completion-r1 prefix
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/vim/vim.git"
|
||||
EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV}
|
||||
else
|
||||
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="vim and gvim shared files"
|
||||
HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="vim"
|
||||
IUSE="nls acl minimal"
|
||||
|
||||
DEPEND="sys-devel/autoconf"
|
||||
PDEPEND="!minimal? ( app-vim/gentoo-syntax )"
|
||||
|
||||
S=${WORKDIR}/vim-${PV}
|
||||
|
||||
pkg_setup() {
|
||||
# people with broken alphabets run into trouble. bug 82186.
|
||||
unset LANG LC_ALL
|
||||
export LC_COLLATE="C"
|
||||
|
||||
# Gnome sandbox silliness. bug #114475.
|
||||
mkdir -p "${T}"/home || die "mkdir -p failed"
|
||||
export HOME="${T}"/home
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} != 9999* ]] ; then
|
||||
# Gentoo patches to fix runtime issues, cross-compile errors, etc
|
||||
eapply "${WORKDIR}"/patches
|
||||
fi
|
||||
|
||||
# Fixup a script to use awk instead of nawk
|
||||
sed -i \
|
||||
-e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
|
||||
"${S}"/runtime/tools/mve.awk || die "sed failed"
|
||||
|
||||
# See #77841. We remove this file after the tarball extraction.
|
||||
rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed"
|
||||
|
||||
# Read vimrc and gvimrc from /etc/vim
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
|
||||
|
||||
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
|
||||
# Hopefully this pattern won't break for a while at least.
|
||||
# This fixes bug 29398 (27 Sep 2003 agriffis)
|
||||
sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
"${S}"/runtime/doc/syntax.txt \
|
||||
"${S}"/runtime/doc/tagsrch.txt \
|
||||
"${S}"/runtime/doc/usr_29.txt \
|
||||
"${S}"/runtime/menu.vim \
|
||||
"${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# Don't be fooled by /usr/include/libc.h. When found, vim thinks
|
||||
# this is NeXT, but it's actually just a file in dev-libs/9libs
|
||||
# This fixes bug 43885 (20 Mar 2004 agriffis)
|
||||
sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
|
||||
# correctly. To avoid some really entertaining error messages about stuff
|
||||
# which isn't even in the source file being invalid, we'll do some trickery
|
||||
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
|
||||
find "${S}" -name '*.c' | while read c; do
|
||||
echo >> "$c" || die "echo failed"
|
||||
done
|
||||
|
||||
# Try to avoid sandbox problems. Bug #114475.
|
||||
if [[ -d "${S}"/src/po ]]; then
|
||||
sed -i -e \
|
||||
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile || die "sed failed"
|
||||
fi
|
||||
|
||||
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
|
||||
|
||||
# Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
|
||||
sed -i -e \
|
||||
"s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
"${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
|
||||
# Fix bug 37354: Disallow -funroll-all-loops on amd64
|
||||
# Bug 57859 suggests that we want to do this for all archs
|
||||
filter-flags -funroll-all-loops
|
||||
|
||||
# Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
|
||||
# everyone since previous flag filtering bugs have turned out to affect
|
||||
# multiple archs...
|
||||
replace-flags -O3 -O2
|
||||
|
||||
# Fix bug 18245: Prevent "make" from the following chain:
|
||||
# (1) Notice configure.ac is newer than auto/configure
|
||||
# (2) Rebuild auto/configure
|
||||
# (3) Notice auto/configure is newer than auto/config.mk
|
||||
# (4) Run ./configure (with wrong args) to remake auto/config.mk
|
||||
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
|
||||
|
||||
# Remove src/auto/configure file.
|
||||
rm -v src/auto/configure || die "rm configure failed"
|
||||
|
||||
emake -j1 -C src autoconf
|
||||
|
||||
# This should fix a sandbox violation (see bug 24447). The hvc
|
||||
# things are for ppc64, see bug 86433.
|
||||
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
|
||||
if [[ -e "${file}" ]]; then
|
||||
addwrite $file
|
||||
fi
|
||||
done
|
||||
|
||||
# Let Portage do the stripping. Some people like that.
|
||||
export ac_cv_prog_STRIP="$(type -P true ) faking strip"
|
||||
|
||||
# Keep Gentoo Prefix env contained within the EPREFIX
|
||||
use prefix && myconf+=" --without-local-dir"
|
||||
|
||||
econf \
|
||||
--with-modified-by=Gentoo-${PVR} \
|
||||
--enable-gui=no \
|
||||
--without-x \
|
||||
--disable-darwin \
|
||||
--disable-perlinterp \
|
||||
--disable-pythoninterp \
|
||||
--disable-rubyinterp \
|
||||
--disable-gpm \
|
||||
--disable-selinux \
|
||||
$(use_enable nls) \
|
||||
$(use_enable acl) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 -C src auto/osdef.h objects
|
||||
emake tools
|
||||
}
|
||||
|
||||
src_test() { :; }
|
||||
|
||||
src_install() {
|
||||
local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
|
||||
|
||||
dodir /usr/{bin,share/{man/man1,vim}}
|
||||
emake -C src \
|
||||
installruntime \
|
||||
installmanlinks \
|
||||
installmacros \
|
||||
installtutor \
|
||||
installtutorbin \
|
||||
installtools \
|
||||
install-languages \
|
||||
DESTDIR="${D}" \
|
||||
BINDIR="${EPREFIX}"/usr/bin \
|
||||
MANDIR="${EPREFIX}"/usr/share/man \
|
||||
DATADIR="${EPREFIX}"/usr/share
|
||||
|
||||
keepdir ${vimfiles}/keymap
|
||||
|
||||
# default vimrc is installed by vim-core since it applies to
|
||||
# both vim and gvim
|
||||
insinto /etc/vim/
|
||||
newins "${FILESDIR}"/vimrc-r5 vimrc
|
||||
eprefixify "${ED}"/etc/vim/vimrc
|
||||
|
||||
if use minimal; then
|
||||
# To save space, install only a subset of the files.
|
||||
# Helps minimalize the livecd, bug 65144.
|
||||
eshopts_push -s extglob
|
||||
|
||||
rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die "rm failed"
|
||||
rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die "rm failed"
|
||||
rm -v "${ED}"/usr/bin/vimtutor || die "rm failed"
|
||||
|
||||
local keep_colors="default"
|
||||
ignore=$(rm -fr "${ED}${vimfiles}"/colors/!(${keep_colors}).vim )
|
||||
|
||||
local keep_syntax="conf|crontab|fstab|inittab|resolv|sshdconfig"
|
||||
# tinkering with the next line might make bad things happen ...
|
||||
keep_syntax="${keep_syntax}|syntax|nosyntax|synload"
|
||||
ignore=$(rm -fr "${ED}${vimfiles}"/syntax/!(${keep_syntax}).vim )
|
||||
|
||||
eshopts_pop
|
||||
fi
|
||||
|
||||
newbashcomp "${FILESDIR}"/xxd-completion xxd
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
VIM_VERSION="8.0"
|
||||
inherit eutils vim-doc flag-o-matic versionator bash-completion-r1 prefix
|
||||
inherit estack vim-doc flag-o-matic versionator bash-completion-r1 prefix
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
inherit git-r3
|
||||
@ -11,12 +11,12 @@ if [[ ${PV} == 9999* ]] ; then
|
||||
EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV}
|
||||
else
|
||||
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0106-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="vim and gvim shared files"
|
||||
HOMEPAGE="http://www.vim.org/ https://github.com/vim/vim"
|
||||
HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="vim"
|
||||
@ -33,7 +33,7 @@ pkg_setup() {
|
||||
export LC_COLLATE="C"
|
||||
|
||||
# Gnome sandbox silliness. bug #114475.
|
||||
mkdir -p "${T}"/home
|
||||
mkdir -p "${T}"/home || die "mkdir -p failed"
|
||||
export HOME="${T}"/home
|
||||
}
|
||||
|
||||
@ -44,8 +44,12 @@ src_prepare() {
|
||||
fi
|
||||
|
||||
# Fixup a script to use awk instead of nawk
|
||||
sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
|
||||
|| die "mve.awk sed failed"
|
||||
sed -i \
|
||||
-e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
|
||||
"${S}"/runtime/tools/mve.awk || die "sed failed"
|
||||
|
||||
# See #77841. We remove this file after the tarball extraction.
|
||||
rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed"
|
||||
|
||||
# Read vimrc and gvimrc from /etc/vim
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
|
||||
@ -70,24 +74,23 @@ src_prepare() {
|
||||
# correctly. To avoid some really entertaining error messages about stuff
|
||||
# which isn't even in the source file being invalid, we'll do some trickery
|
||||
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
|
||||
find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done
|
||||
find "${S}" -name '*.c' | while read c; do
|
||||
echo >> "$c" || die "echo failed"
|
||||
done
|
||||
|
||||
# Try to avoid sandbox problems. Bug #114475.
|
||||
if [[ -d "${S}"/src/po ]]; then
|
||||
sed -i -e \
|
||||
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile
|
||||
"${S}"/src/po/Makefile || die "sed failed"
|
||||
fi
|
||||
|
||||
if version_is_at_least 7.3.122 ; then
|
||||
cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
|
||||
fi
|
||||
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
|
||||
|
||||
# Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
|
||||
if version_is_at_least 7.3 ; then
|
||||
sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
sed -i -e \
|
||||
"s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
"${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
@ -110,13 +113,18 @@ src_configure() {
|
||||
# (3) Notice auto/configure is newer than auto/config.mk
|
||||
# (4) Run ./configure (with wrong args) to remake auto/config.mk
|
||||
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
|
||||
rm -f src/auto/configure
|
||||
|
||||
# Remove src/auto/configure file.
|
||||
rm -v src/auto/configure || die "rm configure failed"
|
||||
|
||||
emake -j1 -C src autoconf
|
||||
|
||||
# This should fix a sandbox violation (see bug 24447). The hvc
|
||||
# things are for ppc64, see bug 86433.
|
||||
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
|
||||
[[ -e ${file} ]] && addwrite $file
|
||||
if [[ -e "${file}" ]]; then
|
||||
addwrite $file
|
||||
fi
|
||||
done
|
||||
|
||||
# Let Portage do the stripping. Some people like that.
|
||||
@ -141,9 +149,7 @@ src_configure() {
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# The following allows emake to be used
|
||||
emake -j1 -C src auto/osdef.h objects
|
||||
|
||||
emake tools
|
||||
}
|
||||
|
||||
@ -179,9 +185,9 @@ src_install() {
|
||||
# Helps minimalize the livecd, bug 65144.
|
||||
eshopts_push -s extglob
|
||||
|
||||
rm -fr "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent}
|
||||
rm -fr "${ED}${vimfiles}"/{macros,print,tools,tutor}
|
||||
rm "${ED}"/usr/bin/vimtutor
|
||||
rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die "rm failed"
|
||||
rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die "rm failed"
|
||||
rm -v "${ED}"/usr/bin/vimtutor || die "rm failed"
|
||||
|
||||
local keep_colors="default"
|
||||
ignore=$(rm -fr "${ED}${vimfiles}"/colors/!(${keep_colors}).vim )
|
||||
@ -194,16 +200,7 @@ src_install() {
|
||||
eshopts_pop
|
||||
fi
|
||||
|
||||
# These files might have slight security issues, so we won't
|
||||
# install them. See bug #77841. We don't mind if these don't
|
||||
# exist.
|
||||
rm "${ED}${vimfiles}"/tools/{vimspell.sh,tcltags} 2>/dev/null
|
||||
|
||||
newbashcomp "${FILESDIR}"/xxd-completion xxd
|
||||
|
||||
# We shouldn't be installing the ex or view man page symlinks, as they
|
||||
# are managed by eselect-vi
|
||||
rm -f "${ED}"/usr/share/man/man1/{ex,view}.1
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
@ -1,9 +1,5 @@
|
||||
AUX vim-completion 1004 SHA256 8191a5a47e03de62d67ad6936259c8eb005e50b52d94994bcf4164e54ffefdae SHA512 dccf663a93efdf2ec3be69f49e418a0ef66277e2fae6c12287adde772592e19f5130388a04242121846f1dae39f78b30780c99dc6fe1b847f4f08354bda3cc41 WHIRLPOOL 0f5d9ed640ecd3520c79e9abb4473bbca66f145106d2c997791eacf6f0f93131f102d55b2f056f87484c5d5ca781af958fd48f1a24e2c2c1a4ac1be378700f84
|
||||
DIST vim-8.0.0106-gentoo-patches.tar.bz2 2281 SHA256 9823a91b050eb4b001cc50f508d2ad03c7c256ed49183c1af7582318667f48d4 SHA512 39edd9f518c230d2b0486b18aa155572a9eada4a5e21108573d6e66e2eef1276f23b77d766648f018c9cf973a7d03712d8861be6ea13255d7b389912d554a47a WHIRLPOOL d6d01e3944d56762a2a999ee631f89e212360aa030ddd16ea96e32d518ec171e04d8565dcb89e804248d53e4c6e06b19be239ad2316ea88bb57364815b85d26b
|
||||
DIST vim-8.0.0386.tar.gz 13000882 SHA256 25b28f6ef55a8d0b3f255f0fbed90ad1450bde7f7b231cc09d86c5119adc95bc SHA512 3169ea4dbc836c724f63d99cd345227f870a3a922beba84a6b42011685c0dd209f6bba8c69af0650c9a57bb47fc541e1150ca8cefb21fcada022259bf4c94a66 WHIRLPOOL 99a5582e0db0dc53fd8385cddf1fbf13d2fe1dd5c8e33c9959288c19d4b85f50139791269edd4ec3d5cbed6548cc3d9c7962ec1706eb422a4ef83c207aac009b
|
||||
EBUILD vim-8.0.0386-r1.ebuild 9843 SHA256 46779ed099d073cdaf90b68c6a6afef3de1954a4ad1dee680e3f3040577e97b4 SHA512 08db4fae98cb400f9c105d1cc2e6938de2e64035e78af6fc95dad9e0dabac7faa46c5eeeb481310a8e6854181e526d6cb2e2521234600e77a482a159eddd26ea WHIRLPOOL 3d75af738e603a9518154a57f4159d44b5db95c6b0a0c4b5aa22b1195415767bce2c41aa2c9f5520c95ad260a83eb217144ea330d204b2f62b311f94a82efb2e
|
||||
EBUILD vim-8.0.0386.ebuild 10124 SHA256 bf05c7d3c48a49c8ee2ab91799e2258681d3d8cceb631eb0a002c8382e4e9032 SHA512 df3604a0c5025cc34bffa597107e7ee0013a4aa691ad284cefbef701ede72d0db5648d01d20ddd4791b1a30b5359dd2cb1a8f70b0e75e57fcec7b4f045c8d040 WHIRLPOOL 99e4329f7c78df2b274676805d08224440e10144d8ad4e4ca2e45ab7ce3c91fc10efd3dcafa6373920353b21c2b6999b68e3a6bafda31047adfd93138d18fe8f
|
||||
EBUILD vim-9999.ebuild 9831 SHA256 db850496134483d440a3fd888b86292342bef688c871cc9834ca450866d909b4 SHA512 fdabdd8cc6bd829846bd796cac66adecf36818aad49bd5977c35909a0545c5550fc748477fc7d53162fe948c2fc08cb017d4ebcf1b688a0da018e79b498aeada WHIRLPOOL 8bf855e12c91b4b82c4f61ed45a0e75cb1f603f284895202fbb36ee8627afd79874be393994b510be31f6f31456782bee3d1104dc7f71e6deae65297c7caaf25
|
||||
MISC ChangeLog 7848 SHA256 6fc0792ca6d0bc4bf25efefac019e1938db855deffd2a47a02de28f848e29c48 SHA512 de0459f63bb4caad161089ec6e662cb6f5aba4fc8413de18f205ed5e5ec3b1576fe6d3ad9c5799c333bd3435857801a80eb63d77a9ac3e30c1e9ea44580076d8 WHIRLPOOL d8df884c001bb4572d0c50a0b69ce2cdad81abefc95a66769cde7c34eb50a52db31bb192de1015f8927d123102e0c9c4e1222e02b5955f8aea88d1cca19410f7
|
||||
MISC ChangeLog-2015 67669 SHA256 86ac1b2a4e92a9eab943636dde488ccb9351b509b3775e8e11f30e5367d48732 SHA512 f84c582b834fdb2907730b9f409f243e10d98777083a8b9a5b689a803d974f2181a93c7de6d197f4482e6b054992f1324d5e0e9d580f7cc89d6d48947a3e9ed7 WHIRLPOOL 047df580ce408d600fd30222ecd55b24414ee3aaea8cd156728a371a878ee0da86ec18843699bc961a911429c57bbf578bd2d4569c2d116f8cf1bac110ee79b4
|
||||
MISC metadata.xml 779 SHA256 d9701e486eaad4caac728b1eecdcf0a9f88aefe093d6846f559821fdaecc8f83 SHA512 4e6fd3126e8b090f1cd89418ace750073a1dd0bbaa5fecca9be10fb19c70147e7d97b71ab1e3ffc480427a0477bd6fa5e27c475d5685c43e9d0137ea1df5d31d WHIRLPOOL df429412c61fc3023f1cee9f3899978ff3bb9841332915e13a1478ac76215d1d773248efbc31bbf774168b3a88d7a04fa8d985b64b20cd3925f369249a2e50d2
|
||||
DIST vim-8.0.0938-gentoo-patches.tar.bz2 2316 BLAKE2B 05a87f32fc5cc65e7f5e4e5a87c654b2040ad39f1555ddde7e0e6f473dc8b520916a795406bb6bbeaf5e7ae8748aacebe7a9679461e48802e69417e945eea827 SHA512 a6062be5e6a5c5b437081312df5742353242b5171bf26da04aa6ca216d2b142b2411a88bc1edd460d28e00a59a210c8e1729e801fac6f1efd86bb2e437a56a2b
|
||||
DIST vim-8.0.1298.tar.gz 13395459 BLAKE2B 4b6e3c4443cd675dc3727e8609b89c422f66c7d32908b5136ee312d48427568a8236214c85135242269b6575e0e1336b0973395a6372664435f8bae4d7bee843 SHA512 7704c493359c1a922f876e4d6f3b4ad265d8ce974a59d51a39e5a4424251105250ffc803bcf6c6750daeb5e6376cbbfd24557b075eacf2b0274d7c432db2f681
|
||||
DIST vim-8.0.1428.tar.gz 13415243 BLAKE2B 88f86c371d0a644212b9e4dc1a15d61244847037f36262a225c361bfc2799b741c128de21ac92bb3fb4a4955894e46d34dc01baa7cbf58f1371d772b36887103 SHA512 f635c53c7e2ca808dc1cb424e6e4b16d8c41c66a86c3c7584444dab3d2482904795fea7c071d65862ae6ac6b2b66b7ad5ac832e1e30f4624d46f220c6f41e2e9
|
||||
DIST vim-8.0.1645.tar.gz 13535252 BLAKE2B a5c7463e85eed12825bdf46d15eb7e7513d62831eba76cbb90af875010b33662b7a6ef2c4c5cecddface415d75e97caf0a670e69835ecd3b4a89704f3b18b905 SHA512 367b9e205e776f84fcfbb92725afd5e7aa66898110d46dbea1a33f7b74c239559e829b5104c45360539c8f2b23c375ed59ccea7ee35a5dd10770400d9a7be085
|
||||
DIST vim-8.0.1699.tar.gz 13546105 BLAKE2B cabf29d5a89c55e2fe3bc5e39eb499412f5907ddf856f8644b466f1e0fbffefff3cd801b6bc5e49e62ffdf8805b0556058b9a913015a9f9fbe1a4f580132fd49 SHA512 b0fe8e1dc05fdc3758896caf4746da40988ca7604d77dbe78c47525cbf8f0d7e6c05f690687268eda581009050d4e02e93fb4d30734cbbab4cfd6a8a1488c1e7
|
||||
|
@ -6,8 +6,8 @@
|
||||
<name>Gentoo Vim Project</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of <pkg>dev-lang/lua</pkg></flag>
|
||||
<flag name="racket">Enable support for Scheme using <pkg>dev-scheme/racket</pkg></flag>
|
||||
<flag name="terminal">Enable terminal emulation support</flag>
|
||||
<flag name="vim-pager">Install vimpager and vimmanpager links</flag>
|
||||
<flag name="X">Link console vim against X11 libraries to enable title and
|
||||
clipboard features in xterm</flag>
|
||||
|
@ -1,34 +1,30 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
VIM_VERSION="8.0"
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
||||
PYTHON_REQ_USE=threads
|
||||
inherit eutils vim-doc flag-o-matic fdo-mime versionator bash-completion-r1 python-r1
|
||||
inherit vim-doc flag-o-matic versionator bash-completion-r1 python-single-r1
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/vim/vim.git"
|
||||
else
|
||||
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0106-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Vim, an improved vi-style text editor"
|
||||
HOMEPAGE="http://www.vim.org/ https://github.com/vim/vim"
|
||||
HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="vim"
|
||||
IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl vim-pager"
|
||||
IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl terminal vim-pager"
|
||||
REQUIRED_USE="
|
||||
luajit? ( lua )
|
||||
python? (
|
||||
|| ( $(python_gen_useflags '*') )
|
||||
?? ( $(python_gen_useflags 'python2*') )
|
||||
?? ( $(python_gen_useflags 'python3*') )
|
||||
)
|
||||
python? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
@ -49,12 +45,14 @@ RDEPEND="
|
||||
perl? ( dev-lang/perl:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
racket? ( dev-scheme/racket )
|
||||
ruby? ( || ( dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 ) )
|
||||
ruby? ( || ( dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 ) )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
tcl? ( dev-lang/tcl:0= )
|
||||
X? ( x11-libs/libXt )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
sys-devel/autoconf
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
@ -65,8 +63,10 @@ pkg_setup() {
|
||||
export LC_COLLATE="C"
|
||||
|
||||
# Gnome sandbox silliness. bug #114475.
|
||||
mkdir -p "${T}"/home
|
||||
mkdir -p "${T}"/home || die "mkdir failed"
|
||||
export HOME="${T}"/home
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
@ -76,17 +76,21 @@ src_prepare() {
|
||||
fi
|
||||
|
||||
# Fixup a script to use awk instead of nawk
|
||||
sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
|
||||
|| die "mve.awk sed failed"
|
||||
sed -i -e \
|
||||
'1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
|
||||
"${S}"/runtime/tools/mve.awk || die "mve.awk sed failed"
|
||||
|
||||
# Read vimrc and gvimrc from /etc/vim
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \
|
||||
>> "${S}"/src/feature.h || die "echo failed"
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \
|
||||
>> "${S}"/src/feature.h || die "echo failed"
|
||||
|
||||
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
|
||||
# Hopefully this pattern won't break for a while at least.
|
||||
# This fixes bug 29398 (27 Sep 2003 agriffis)
|
||||
sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
sed -i -e \
|
||||
's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
"${S}"/runtime/doc/syntax.txt \
|
||||
"${S}"/runtime/doc/tagsrch.txt \
|
||||
"${S}"/runtime/doc/usr_29.txt \
|
||||
@ -96,17 +100,21 @@ src_prepare() {
|
||||
# Don't be fooled by /usr/include/libc.h. When found, vim thinks
|
||||
# this is NeXT, but it's actually just a file in dev-libs/9libs
|
||||
# This fixes bug 43885 (20 Mar 2004 agriffis)
|
||||
sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
|
||||
sed -i -e \
|
||||
's/ libc\.h / /' \
|
||||
"${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
|
||||
# correctly. To avoid some really entertaining error messages about stuff
|
||||
# which isn't even in the source file being invalid, we'll do some trickery
|
||||
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
|
||||
find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done
|
||||
find "${S}" -name '*.c' | while read c; do
|
||||
echo >> "$c" || die "echo failed"
|
||||
done
|
||||
|
||||
# conditionally make the manpager.sh script
|
||||
if use vim-pager; then
|
||||
cat <<-END > "${S}"/runtime/macros/manpager.sh
|
||||
cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed"
|
||||
#!/bin/sh
|
||||
sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
|
||||
vim \\
|
||||
@ -114,24 +122,21 @@ src_prepare() {
|
||||
-c 'set nolist nomod ft=man ts=8' \\
|
||||
-c 'let g:showmarks_enable=0' \\
|
||||
-c 'runtime! macros/less.vim' -
|
||||
END
|
||||
_EOF_
|
||||
fi
|
||||
|
||||
# Try to avoid sandbox problems. Bug #114475.
|
||||
if [[ -d "${S}"/src/po ]]; then
|
||||
sed -i '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile
|
||||
sed -i -e \
|
||||
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile || die "sed failed"
|
||||
fi
|
||||
|
||||
if version_is_at_least 7.3.122 ; then
|
||||
cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
|
||||
fi
|
||||
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
|
||||
|
||||
# Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
|
||||
if version_is_at_least 7.3 ; then
|
||||
sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
sed -i -e \
|
||||
"s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
"${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
@ -154,13 +159,15 @@ src_configure() {
|
||||
# (3) Notice auto/configure is newer than auto/config.mk
|
||||
# (4) Run ./configure (with wrong args) to remake auto/config.mk
|
||||
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
|
||||
rm -f src/auto/configure
|
||||
rm src/auto/configure || die "rm failed"
|
||||
emake -j1 -C src autoconf
|
||||
|
||||
# This should fix a sandbox violation (see bug 24447). The hvc
|
||||
# things are for ppc64, see bug 86433.
|
||||
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
|
||||
[[ -e ${file} ]] && addwrite $file
|
||||
if [[ -e "${file}" ]]; then
|
||||
addwrite $file
|
||||
fi
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
@ -195,36 +202,20 @@ src_configure() {
|
||||
$(use_with luajit)
|
||||
$(use_enable nls)
|
||||
$(use_enable perl perlinterp)
|
||||
$(use_enable python pythoninterp)
|
||||
$(use_enable python python3interp)
|
||||
$(use_enable racket mzschemeinterp)
|
||||
$(use_enable ruby rubyinterp)
|
||||
$(use_enable selinux)
|
||||
$(use_enable tcl tclinterp)
|
||||
$(use_enable terminal)
|
||||
)
|
||||
|
||||
if use python ; then
|
||||
py_add_interp() {
|
||||
local v
|
||||
|
||||
[[ ${EPYTHON} == python3* ]] && v=3
|
||||
myconf+=(
|
||||
--enable-python${v}interp
|
||||
vi_cv_path_python${v}="${PYTHON}"
|
||||
)
|
||||
}
|
||||
|
||||
python_foreach_impl py_add_interp
|
||||
else
|
||||
myconf+=(
|
||||
--disable-pythoninterp
|
||||
--disable-python3interp
|
||||
)
|
||||
fi
|
||||
|
||||
# --with-features=huge forces on cscope even if we --disable it. We need
|
||||
# to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
|
||||
if ! use cscope; then
|
||||
sed -i '/# define FEAT_CSCOPE/d' src/feature.h || \
|
||||
die "couldn't disable cscope"
|
||||
sed -i -e \
|
||||
'/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed"
|
||||
fi
|
||||
|
||||
# don't test USE=X here ... see bug #19115
|
||||
@ -255,14 +246,14 @@ src_compile() {
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo
|
||||
einfo
|
||||
einfo "Starting vim tests. Several error messages will be shown"
|
||||
einfo "while the tests run. This is normal behaviour and does not"
|
||||
einfo "indicate a fault."
|
||||
echo
|
||||
einfo
|
||||
ewarn "If the tests fail, your terminal may be left in a strange"
|
||||
ewarn "state. Usually, running 'reset' will fix this."
|
||||
echo
|
||||
einfo
|
||||
|
||||
# Don't let vim talk to X
|
||||
unset DISPLAY
|
||||
@ -270,39 +261,12 @@ src_test() {
|
||||
emake -j1 -C src/testdir nongui
|
||||
}
|
||||
|
||||
# Make convenience symlinks, hopefully without stepping on toes. Some
|
||||
# of these links are "owned" by the vim ebuild when it is installed,
|
||||
# but they might be good for gvim as well (see bug 45828)
|
||||
update_vim_symlinks() {
|
||||
local f syms
|
||||
syms="vimdiff rvim rview"
|
||||
# Call eselect vi update with --if-unset
|
||||
# to respect user's choice (bug 187449)
|
||||
eselect_vi_update() {
|
||||
einfo "Calling eselect vi update..."
|
||||
# Call this with --if-unset to respect user's choice (bug 187449)
|
||||
eselect vi update --if-unset
|
||||
|
||||
# Make or remove convenience symlink, vim -> gvim
|
||||
if [[ -f "${EROOT}"/usr/bin/gvim ]]; then
|
||||
ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null
|
||||
elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then
|
||||
rm "${EROOT}"/usr/bin/vim
|
||||
fi
|
||||
|
||||
# Make or remove convenience symlinks to vim
|
||||
if [[ -f "${EROOT}"/usr/bin/vim ]]; then
|
||||
for f in ${syms}; do
|
||||
ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null
|
||||
done
|
||||
else
|
||||
for f in ${syms}; do
|
||||
if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then
|
||||
rm -f "${EROOT}"/usr/bin/${f}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# This will still break if you merge then remove the vi package,
|
||||
# but there's only so much you can do, eh? Unfortunately we don't
|
||||
# have triggers like are done in rpm-land.
|
||||
eend $?
|
||||
}
|
||||
|
||||
src_install() {
|
||||
@ -323,26 +287,23 @@ src_install() {
|
||||
fi
|
||||
|
||||
newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
|
||||
|
||||
# keep in sync with 'complete ... -F' list
|
||||
bashcomp_alias vim ex vi view rvim rview vimdiff
|
||||
|
||||
# We shouldn't be installing the ex or view man page symlinks, as they
|
||||
# are managed by eselect-vi
|
||||
rm -f "${ED}"/usr/share/man/man1/{ex,view}.1
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
|
||||
# Make convenience symlinks
|
||||
update_vim_symlinks
|
||||
# Call eselect vi update
|
||||
eselect_vi_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
|
||||
# Make convenience symlinks
|
||||
update_vim_symlinks
|
||||
# Call eselect vi update
|
||||
eselect_vi_update
|
||||
}
|
@ -1,27 +1,27 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
VIM_VERSION="8.0"
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
||||
PYTHON_REQ_USE=threads
|
||||
inherit eutils vim-doc flag-o-matic fdo-mime versionator bash-completion-r1 python-single-r1
|
||||
inherit vim-doc flag-o-matic versionator bash-completion-r1 python-single-r1
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/vim/vim.git"
|
||||
else
|
||||
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0106-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Vim, an improved vi-style text editor"
|
||||
HOMEPAGE="http://www.vim.org/ https://github.com/vim/vim"
|
||||
HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="vim"
|
||||
IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl vim-pager"
|
||||
IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl terminal vim-pager"
|
||||
REQUIRED_USE="
|
||||
luajit? ( lua )
|
||||
python? ( ${PYTHON_REQUIRED_USE} )
|
||||
@ -45,12 +45,14 @@ RDEPEND="
|
||||
perl? ( dev-lang/perl:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
racket? ( dev-scheme/racket )
|
||||
ruby? ( || ( dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 ) )
|
||||
ruby? ( || ( dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 ) )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
tcl? ( dev-lang/tcl:0= )
|
||||
X? ( x11-libs/libXt )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
sys-devel/autoconf
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
@ -61,7 +63,7 @@ pkg_setup() {
|
||||
export LC_COLLATE="C"
|
||||
|
||||
# Gnome sandbox silliness. bug #114475.
|
||||
mkdir -p "${T}"/home
|
||||
mkdir -p "${T}"/home || die "mkdir failed"
|
||||
export HOME="${T}"/home
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
@ -74,17 +76,21 @@ src_prepare() {
|
||||
fi
|
||||
|
||||
# Fixup a script to use awk instead of nawk
|
||||
sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
|
||||
|| die "mve.awk sed failed"
|
||||
sed -i -e \
|
||||
'1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
|
||||
"${S}"/runtime/tools/mve.awk || die "mve.awk sed failed"
|
||||
|
||||
# Read vimrc and gvimrc from /etc/vim
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \
|
||||
>> "${S}"/src/feature.h || die "echo failed"
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \
|
||||
>> "${S}"/src/feature.h || die "echo failed"
|
||||
|
||||
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
|
||||
# Hopefully this pattern won't break for a while at least.
|
||||
# This fixes bug 29398 (27 Sep 2003 agriffis)
|
||||
sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
sed -i -e \
|
||||
's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
"${S}"/runtime/doc/syntax.txt \
|
||||
"${S}"/runtime/doc/tagsrch.txt \
|
||||
"${S}"/runtime/doc/usr_29.txt \
|
||||
@ -94,17 +100,21 @@ src_prepare() {
|
||||
# Don't be fooled by /usr/include/libc.h. When found, vim thinks
|
||||
# this is NeXT, but it's actually just a file in dev-libs/9libs
|
||||
# This fixes bug 43885 (20 Mar 2004 agriffis)
|
||||
sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
|
||||
sed -i -e \
|
||||
's/ libc\.h / /' \
|
||||
"${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
|
||||
# correctly. To avoid some really entertaining error messages about stuff
|
||||
# which isn't even in the source file being invalid, we'll do some trickery
|
||||
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
|
||||
find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done
|
||||
find "${S}" -name '*.c' | while read c; do
|
||||
echo >> "$c" || die "echo failed"
|
||||
done
|
||||
|
||||
# conditionally make the manpager.sh script
|
||||
if use vim-pager; then
|
||||
cat <<-END > "${S}"/runtime/macros/manpager.sh
|
||||
cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed"
|
||||
#!/bin/sh
|
||||
sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
|
||||
vim \\
|
||||
@ -112,24 +122,21 @@ src_prepare() {
|
||||
-c 'set nolist nomod ft=man ts=8' \\
|
||||
-c 'let g:showmarks_enable=0' \\
|
||||
-c 'runtime! macros/less.vim' -
|
||||
END
|
||||
_EOF_
|
||||
fi
|
||||
|
||||
# Try to avoid sandbox problems. Bug #114475.
|
||||
if [[ -d "${S}"/src/po ]]; then
|
||||
sed -i '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile
|
||||
sed -i -e \
|
||||
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile || die "sed failed"
|
||||
fi
|
||||
|
||||
if version_is_at_least 7.3.122 ; then
|
||||
cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
|
||||
fi
|
||||
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
|
||||
|
||||
# Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
|
||||
if version_is_at_least 7.3 ; then
|
||||
sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
sed -i -e \
|
||||
"s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
"${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
@ -152,13 +159,15 @@ src_configure() {
|
||||
# (3) Notice auto/configure is newer than auto/config.mk
|
||||
# (4) Run ./configure (with wrong args) to remake auto/config.mk
|
||||
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
|
||||
rm -f src/auto/configure
|
||||
rm src/auto/configure || die "rm failed"
|
||||
emake -j1 -C src autoconf
|
||||
|
||||
# This should fix a sandbox violation (see bug 24447). The hvc
|
||||
# things are for ppc64, see bug 86433.
|
||||
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
|
||||
[[ -e ${file} ]] && addwrite $file
|
||||
if [[ -e "${file}" ]]; then
|
||||
addwrite $file
|
||||
fi
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
@ -199,13 +208,14 @@ src_configure() {
|
||||
$(use_enable ruby rubyinterp)
|
||||
$(use_enable selinux)
|
||||
$(use_enable tcl tclinterp)
|
||||
$(use_enable terminal)
|
||||
)
|
||||
|
||||
# --with-features=huge forces on cscope even if we --disable it. We need
|
||||
# to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
|
||||
if ! use cscope; then
|
||||
sed -i '/# define FEAT_CSCOPE/d' src/feature.h || \
|
||||
die "couldn't disable cscope"
|
||||
sed -i -e \
|
||||
'/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed"
|
||||
fi
|
||||
|
||||
# don't test USE=X here ... see bug #19115
|
||||
@ -236,14 +246,14 @@ src_compile() {
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo
|
||||
einfo
|
||||
einfo "Starting vim tests. Several error messages will be shown"
|
||||
einfo "while the tests run. This is normal behaviour and does not"
|
||||
einfo "indicate a fault."
|
||||
echo
|
||||
einfo
|
||||
ewarn "If the tests fail, your terminal may be left in a strange"
|
||||
ewarn "state. Usually, running 'reset' will fix this."
|
||||
echo
|
||||
einfo
|
||||
|
||||
# Don't let vim talk to X
|
||||
unset DISPLAY
|
||||
@ -251,39 +261,12 @@ src_test() {
|
||||
emake -j1 -C src/testdir nongui
|
||||
}
|
||||
|
||||
# Make convenience symlinks, hopefully without stepping on toes. Some
|
||||
# of these links are "owned" by the vim ebuild when it is installed,
|
||||
# but they might be good for gvim as well (see bug 45828)
|
||||
update_vim_symlinks() {
|
||||
local f syms
|
||||
syms="vimdiff rvim rview"
|
||||
# Call eselect vi update with --if-unset
|
||||
# to respect user's choice (bug 187449)
|
||||
eselect_vi_update() {
|
||||
einfo "Calling eselect vi update..."
|
||||
# Call this with --if-unset to respect user's choice (bug 187449)
|
||||
eselect vi update --if-unset
|
||||
|
||||
# Make or remove convenience symlink, vim -> gvim
|
||||
if [[ -f "${EROOT}"/usr/bin/gvim ]]; then
|
||||
ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null
|
||||
elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then
|
||||
rm "${EROOT}"/usr/bin/vim
|
||||
fi
|
||||
|
||||
# Make or remove convenience symlinks to vim
|
||||
if [[ -f "${EROOT}"/usr/bin/vim ]]; then
|
||||
for f in ${syms}; do
|
||||
ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null
|
||||
done
|
||||
else
|
||||
for f in ${syms}; do
|
||||
if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then
|
||||
rm -f "${EROOT}"/usr/bin/${f}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# This will still break if you merge then remove the vi package,
|
||||
# but there's only so much you can do, eh? Unfortunately we don't
|
||||
# have triggers like are done in rpm-land.
|
||||
eend $?
|
||||
}
|
||||
|
||||
src_install() {
|
||||
@ -304,26 +287,23 @@ src_install() {
|
||||
fi
|
||||
|
||||
newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
|
||||
|
||||
# keep in sync with 'complete ... -F' list
|
||||
bashcomp_alias vim ex vi view rvim rview vimdiff
|
||||
|
||||
# We shouldn't be installing the ex or view man page symlinks, as they
|
||||
# are managed by eselect-vi
|
||||
rm -f "${ED}"/usr/share/man/man1/{ex,view}.1
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
|
||||
# Make convenience symlinks
|
||||
update_vim_symlinks
|
||||
# Call eselect vi update
|
||||
eselect_vi_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
|
||||
# Make convenience symlinks
|
||||
update_vim_symlinks
|
||||
# Call eselect vi update
|
||||
eselect_vi_update
|
||||
}
|
309
sdk_container/src/third_party/portage-stable/app-editors/vim/vim-8.0.1645.ebuild
vendored
Normal file
309
sdk_container/src/third_party/portage-stable/app-editors/vim/vim-8.0.1645.ebuild
vendored
Normal file
@ -0,0 +1,309 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
VIM_VERSION="8.0"
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
||||
PYTHON_REQ_USE=threads
|
||||
inherit vim-doc flag-o-matic versionator bash-completion-r1 python-single-r1
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/vim/vim.git"
|
||||
else
|
||||
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Vim, an improved vi-style text editor"
|
||||
HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="vim"
|
||||
IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl terminal vim-pager"
|
||||
REQUIRED_USE="
|
||||
luajit? ( lua )
|
||||
python? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
>=app-eselect/eselect-vi-1.1
|
||||
>=sys-libs/ncurses-5.2-r2:0=
|
||||
nls? ( virtual/libintl )
|
||||
acl? ( kernel_linux? ( sys-apps/acl ) )
|
||||
cscope? ( dev-util/cscope )
|
||||
gpm? ( >=sys-libs/gpm-1.19.3 )
|
||||
lua? (
|
||||
luajit? ( dev-lang/luajit:2= )
|
||||
!luajit? ( dev-lang/lua:0[deprecated] )
|
||||
)
|
||||
!minimal? (
|
||||
~app-editors/vim-core-${PV}
|
||||
dev-util/ctags
|
||||
)
|
||||
perl? ( dev-lang/perl:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
racket? ( dev-scheme/racket )
|
||||
ruby? ( || ( dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 ) )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
tcl? ( dev-lang/tcl:0= )
|
||||
X? ( x11-libs/libXt )
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
sys-devel/autoconf
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
# people with broken alphabets run into trouble. bug 82186.
|
||||
unset LANG LC_ALL
|
||||
export LC_COLLATE="C"
|
||||
|
||||
# Gnome sandbox silliness. bug #114475.
|
||||
mkdir -p "${T}"/home || die "mkdir failed"
|
||||
export HOME="${T}"/home
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} != 9999* ]] ; then
|
||||
# Gentoo patches to fix runtime issues, cross-compile errors, etc
|
||||
eapply "${WORKDIR}"/patches/
|
||||
fi
|
||||
|
||||
# Fixup a script to use awk instead of nawk
|
||||
sed -i -e \
|
||||
'1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
|
||||
"${S}"/runtime/tools/mve.awk || die "mve.awk sed failed"
|
||||
|
||||
# Read vimrc and gvimrc from /etc/vim
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \
|
||||
>> "${S}"/src/feature.h || die "echo failed"
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \
|
||||
>> "${S}"/src/feature.h || die "echo failed"
|
||||
|
||||
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
|
||||
# Hopefully this pattern won't break for a while at least.
|
||||
# This fixes bug 29398 (27 Sep 2003 agriffis)
|
||||
sed -i -e \
|
||||
's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
"${S}"/runtime/doc/syntax.txt \
|
||||
"${S}"/runtime/doc/tagsrch.txt \
|
||||
"${S}"/runtime/doc/usr_29.txt \
|
||||
"${S}"/runtime/menu.vim \
|
||||
"${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# Don't be fooled by /usr/include/libc.h. When found, vim thinks
|
||||
# this is NeXT, but it's actually just a file in dev-libs/9libs
|
||||
# This fixes bug 43885 (20 Mar 2004 agriffis)
|
||||
sed -i -e \
|
||||
's/ libc\.h / /' \
|
||||
"${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
|
||||
# correctly. To avoid some really entertaining error messages about stuff
|
||||
# which isn't even in the source file being invalid, we'll do some trickery
|
||||
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
|
||||
find "${S}" -name '*.c' | while read c; do
|
||||
echo >> "$c" || die "echo failed"
|
||||
done
|
||||
|
||||
# conditionally make the manpager.sh script
|
||||
if use vim-pager; then
|
||||
cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed"
|
||||
#!/bin/sh
|
||||
sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
|
||||
vim \\
|
||||
-c 'let no_plugin_maps = 1' \\
|
||||
-c 'set nolist nomod ft=man ts=8' \\
|
||||
-c 'let g:showmarks_enable=0' \\
|
||||
-c 'runtime! macros/less.vim' -
|
||||
_EOF_
|
||||
fi
|
||||
|
||||
# Try to avoid sandbox problems. Bug #114475.
|
||||
if [[ -d "${S}"/src/po ]]; then
|
||||
sed -i -e \
|
||||
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile || die "sed failed"
|
||||
fi
|
||||
|
||||
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
|
||||
|
||||
sed -i -e \
|
||||
"s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
"${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=()
|
||||
|
||||
# Fix bug 37354: Disallow -funroll-all-loops on amd64
|
||||
# Bug 57859 suggests that we want to do this for all archs
|
||||
filter-flags -funroll-all-loops
|
||||
|
||||
# Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
|
||||
# everyone since previous flag filtering bugs have turned out to affect
|
||||
# multiple archs...
|
||||
replace-flags -O3 -O2
|
||||
|
||||
# Fix bug 18245: Prevent "make" from the following chain:
|
||||
# (1) Notice configure.ac is newer than auto/configure
|
||||
# (2) Rebuild auto/configure
|
||||
# (3) Notice auto/configure is newer than auto/config.mk
|
||||
# (4) Run ./configure (with wrong args) to remake auto/config.mk
|
||||
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
|
||||
rm src/auto/configure || die "rm failed"
|
||||
emake -j1 -C src autoconf
|
||||
|
||||
# This should fix a sandbox violation (see bug 24447). The hvc
|
||||
# things are for ppc64, see bug 86433.
|
||||
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
|
||||
if [[ -e "${file}" ]]; then
|
||||
addwrite $file
|
||||
fi
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
myconf=(
|
||||
--with-features=tiny
|
||||
--disable-nls
|
||||
--disable-multibyte
|
||||
--disable-acl
|
||||
--enable-gui=no
|
||||
--without-x
|
||||
--disable-darwin
|
||||
--disable-luainterp
|
||||
--disable-perlinterp
|
||||
--disable-pythoninterp
|
||||
--disable-mzschemeinterp
|
||||
--disable-rubyinterp
|
||||
--disable-selinux
|
||||
--disable-tclinterp
|
||||
--disable-gpm
|
||||
)
|
||||
else
|
||||
use debug && append-flags "-DDEBUG"
|
||||
|
||||
myconf=(
|
||||
--with-features=huge
|
||||
--enable-multibyte
|
||||
$(use_enable acl)
|
||||
$(use_enable cscope)
|
||||
$(use_enable gpm)
|
||||
$(use_enable lua luainterp)
|
||||
$(usex lua "--with-lua-prefix=${EPREFIX}/usr" "")
|
||||
$(use_with luajit)
|
||||
$(use_enable nls)
|
||||
$(use_enable perl perlinterp)
|
||||
$(use_enable python pythoninterp)
|
||||
$(use_enable python python3interp)
|
||||
$(use_enable racket mzschemeinterp)
|
||||
$(use_enable ruby rubyinterp)
|
||||
$(use_enable selinux)
|
||||
$(use_enable tcl tclinterp)
|
||||
$(use_enable terminal)
|
||||
)
|
||||
|
||||
# --with-features=huge forces on cscope even if we --disable it. We need
|
||||
# to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
|
||||
if ! use cscope; then
|
||||
sed -i -e \
|
||||
'/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed"
|
||||
fi
|
||||
|
||||
# don't test USE=X here ... see bug #19115
|
||||
# but need to provide a way to link against X ... see bug #20093
|
||||
myconf+=(
|
||||
--enable-gui=no
|
||||
--disable-darwin
|
||||
$(use_with X x)
|
||||
)
|
||||
fi
|
||||
|
||||
# let package manager strip binaries
|
||||
export ac_cv_prog_STRIP="$(type -P true ) faking strip"
|
||||
|
||||
# keep prefix env contained within the EPREFIX
|
||||
use prefix && myconf+=( --without-local-dir )
|
||||
|
||||
econf \
|
||||
--with-modified-by=Gentoo-${PVR} \
|
||||
"${myconf[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# The following allows emake to be used
|
||||
emake -j1 -C src auto/osdef.h objects
|
||||
|
||||
emake
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo
|
||||
einfo "Starting vim tests. Several error messages will be shown"
|
||||
einfo "while the tests run. This is normal behaviour and does not"
|
||||
einfo "indicate a fault."
|
||||
einfo
|
||||
ewarn "If the tests fail, your terminal may be left in a strange"
|
||||
ewarn "state. Usually, running 'reset' will fix this."
|
||||
einfo
|
||||
|
||||
# Don't let vim talk to X
|
||||
unset DISPLAY
|
||||
|
||||
emake -j1 -C src/testdir nongui
|
||||
}
|
||||
|
||||
# Call eselect vi update with --if-unset
|
||||
# to respect user's choice (bug 187449)
|
||||
eselect_vi_update() {
|
||||
einfo "Calling eselect vi update..."
|
||||
eselect vi update --if-unset
|
||||
eend $?
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
|
||||
|
||||
# Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are
|
||||
# managed by eselect-vi
|
||||
dobin src/vim
|
||||
dosym vim /usr/bin/vimdiff
|
||||
dosym vim /usr/bin/rvim
|
||||
dosym vim /usr/bin/rview
|
||||
if use vim-pager ; then
|
||||
dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager
|
||||
dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager
|
||||
insinto ${vimfiles}/macros
|
||||
doins runtime/macros/manpager.sh
|
||||
fperms a+x ${vimfiles}/macros/manpager.sh
|
||||
fi
|
||||
|
||||
newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
|
||||
|
||||
# keep in sync with 'complete ... -F' list
|
||||
bashcomp_alias vim ex vi view rvim rview vimdiff
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
|
||||
# Call eselect vi update
|
||||
eselect_vi_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
|
||||
# Call eselect vi update
|
||||
eselect_vi_update
|
||||
}
|
311
sdk_container/src/third_party/portage-stable/app-editors/vim/vim-8.0.1699.ebuild
vendored
Normal file
311
sdk_container/src/third_party/portage-stable/app-editors/vim/vim-8.0.1699.ebuild
vendored
Normal file
@ -0,0 +1,311 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
VIM_VERSION="8.0"
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
||||
PYTHON_REQ_USE="threads"
|
||||
USE_RUBY="ruby22 ruby23 ruby24 ruby25"
|
||||
|
||||
inherit vim-doc flag-o-matic versionator bash-completion-r1 python-single-r1 ruby-single
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/vim/vim.git"
|
||||
else
|
||||
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Vim, an improved vi-style text editor"
|
||||
HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="vim"
|
||||
IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl terminal vim-pager"
|
||||
REQUIRED_USE="
|
||||
luajit? ( lua )
|
||||
python? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
>=app-eselect/eselect-vi-1.1
|
||||
>=sys-libs/ncurses-5.2-r2:0=
|
||||
nls? ( virtual/libintl )
|
||||
acl? ( kernel_linux? ( sys-apps/acl ) )
|
||||
cscope? ( dev-util/cscope )
|
||||
gpm? ( >=sys-libs/gpm-1.19.3 )
|
||||
lua? (
|
||||
luajit? ( dev-lang/luajit:2= )
|
||||
!luajit? ( dev-lang/lua:0[deprecated] )
|
||||
)
|
||||
!minimal? (
|
||||
~app-editors/vim-core-${PV}
|
||||
dev-util/ctags
|
||||
)
|
||||
perl? ( dev-lang/perl:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
racket? ( dev-scheme/racket )
|
||||
ruby? ( ${RUBY_DEPS} )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
tcl? ( dev-lang/tcl:0= )
|
||||
X? ( x11-libs/libXt )
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
sys-devel/autoconf
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
# people with broken alphabets run into trouble. bug 82186.
|
||||
unset LANG LC_ALL
|
||||
export LC_COLLATE="C"
|
||||
|
||||
# Gnome sandbox silliness. bug #114475.
|
||||
mkdir -p "${T}"/home || die "mkdir failed"
|
||||
export HOME="${T}"/home
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} != 9999* ]] ; then
|
||||
# Gentoo patches to fix runtime issues, cross-compile errors, etc
|
||||
eapply "${WORKDIR}"/patches/
|
||||
fi
|
||||
|
||||
# Fixup a script to use awk instead of nawk
|
||||
sed -i -e \
|
||||
'1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
|
||||
"${S}"/runtime/tools/mve.awk || die "mve.awk sed failed"
|
||||
|
||||
# Read vimrc and gvimrc from /etc/vim
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \
|
||||
>> "${S}"/src/feature.h || die "echo failed"
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \
|
||||
>> "${S}"/src/feature.h || die "echo failed"
|
||||
|
||||
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
|
||||
# Hopefully this pattern won't break for a while at least.
|
||||
# This fixes bug 29398 (27 Sep 2003 agriffis)
|
||||
sed -i -e \
|
||||
's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
"${S}"/runtime/doc/syntax.txt \
|
||||
"${S}"/runtime/doc/tagsrch.txt \
|
||||
"${S}"/runtime/doc/usr_29.txt \
|
||||
"${S}"/runtime/menu.vim \
|
||||
"${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# Don't be fooled by /usr/include/libc.h. When found, vim thinks
|
||||
# this is NeXT, but it's actually just a file in dev-libs/9libs
|
||||
# This fixes bug 43885 (20 Mar 2004 agriffis)
|
||||
sed -i -e \
|
||||
's/ libc\.h / /' \
|
||||
"${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
|
||||
# correctly. To avoid some really entertaining error messages about stuff
|
||||
# which isn't even in the source file being invalid, we'll do some trickery
|
||||
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
|
||||
find "${S}" -name '*.c' | while read c; do
|
||||
echo >> "$c" || die "echo failed"
|
||||
done
|
||||
|
||||
# conditionally make the manpager.sh script
|
||||
if use vim-pager; then
|
||||
cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed"
|
||||
#!/bin/sh
|
||||
sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
|
||||
vim \\
|
||||
-c 'let no_plugin_maps = 1' \\
|
||||
-c 'set nolist nomod ft=man ts=8' \\
|
||||
-c 'let g:showmarks_enable=0' \\
|
||||
-c 'runtime! macros/less.vim' -
|
||||
_EOF_
|
||||
fi
|
||||
|
||||
# Try to avoid sandbox problems. Bug #114475.
|
||||
if [[ -d "${S}"/src/po ]]; then
|
||||
sed -i -e \
|
||||
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile || die "sed failed"
|
||||
fi
|
||||
|
||||
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
|
||||
|
||||
sed -i -e \
|
||||
"s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
"${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=()
|
||||
|
||||
# Fix bug 37354: Disallow -funroll-all-loops on amd64
|
||||
# Bug 57859 suggests that we want to do this for all archs
|
||||
filter-flags -funroll-all-loops
|
||||
|
||||
# Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
|
||||
# everyone since previous flag filtering bugs have turned out to affect
|
||||
# multiple archs...
|
||||
replace-flags -O3 -O2
|
||||
|
||||
# Fix bug 18245: Prevent "make" from the following chain:
|
||||
# (1) Notice configure.ac is newer than auto/configure
|
||||
# (2) Rebuild auto/configure
|
||||
# (3) Notice auto/configure is newer than auto/config.mk
|
||||
# (4) Run ./configure (with wrong args) to remake auto/config.mk
|
||||
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
|
||||
rm src/auto/configure || die "rm failed"
|
||||
emake -j1 -C src autoconf
|
||||
|
||||
# This should fix a sandbox violation (see bug 24447). The hvc
|
||||
# things are for ppc64, see bug 86433.
|
||||
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
|
||||
if [[ -e "${file}" ]]; then
|
||||
addwrite $file
|
||||
fi
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
myconf=(
|
||||
--with-features=tiny
|
||||
--disable-nls
|
||||
--disable-multibyte
|
||||
--disable-acl
|
||||
--enable-gui=no
|
||||
--without-x
|
||||
--disable-darwin
|
||||
--disable-luainterp
|
||||
--disable-perlinterp
|
||||
--disable-pythoninterp
|
||||
--disable-mzschemeinterp
|
||||
--disable-rubyinterp
|
||||
--disable-selinux
|
||||
--disable-tclinterp
|
||||
--disable-gpm
|
||||
)
|
||||
else
|
||||
use debug && append-flags "-DDEBUG"
|
||||
|
||||
myconf=(
|
||||
--with-features=huge
|
||||
--enable-multibyte
|
||||
$(use_enable acl)
|
||||
$(use_enable cscope)
|
||||
$(use_enable gpm)
|
||||
$(use_enable lua luainterp)
|
||||
$(usex lua "--with-lua-prefix=${EPREFIX}/usr" "")
|
||||
$(use_with luajit)
|
||||
$(use_enable nls)
|
||||
$(use_enable perl perlinterp)
|
||||
$(use_enable python pythoninterp)
|
||||
$(use_enable python python3interp)
|
||||
$(use_enable racket mzschemeinterp)
|
||||
$(use_enable ruby rubyinterp)
|
||||
$(use_enable selinux)
|
||||
$(use_enable tcl tclinterp)
|
||||
$(use_enable terminal)
|
||||
)
|
||||
|
||||
# --with-features=huge forces on cscope even if we --disable it. We need
|
||||
# to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
|
||||
if ! use cscope; then
|
||||
sed -i -e \
|
||||
'/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed"
|
||||
fi
|
||||
|
||||
# don't test USE=X here ... see bug #19115
|
||||
# but need to provide a way to link against X ... see bug #20093
|
||||
myconf+=(
|
||||
--enable-gui=no
|
||||
--disable-darwin
|
||||
$(use_with X x)
|
||||
)
|
||||
fi
|
||||
|
||||
# let package manager strip binaries
|
||||
export ac_cv_prog_STRIP="$(type -P true ) faking strip"
|
||||
|
||||
# keep prefix env contained within the EPREFIX
|
||||
use prefix && myconf+=( --without-local-dir )
|
||||
|
||||
econf \
|
||||
--with-modified-by=Gentoo-${PVR} \
|
||||
"${myconf[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# The following allows emake to be used
|
||||
emake -j1 -C src auto/osdef.h objects
|
||||
|
||||
emake
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo
|
||||
einfo "Starting vim tests. Several error messages will be shown"
|
||||
einfo "while the tests run. This is normal behaviour and does not"
|
||||
einfo "indicate a fault."
|
||||
einfo
|
||||
ewarn "If the tests fail, your terminal may be left in a strange"
|
||||
ewarn "state. Usually, running 'reset' will fix this."
|
||||
einfo
|
||||
|
||||
# Don't let vim talk to X
|
||||
unset DISPLAY
|
||||
|
||||
emake -j1 -C src/testdir nongui
|
||||
}
|
||||
|
||||
# Call eselect vi update with --if-unset
|
||||
# to respect user's choice (bug 187449)
|
||||
eselect_vi_update() {
|
||||
einfo "Calling eselect vi update..."
|
||||
eselect vi update --if-unset
|
||||
eend $?
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
|
||||
|
||||
# Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are
|
||||
# managed by eselect-vi
|
||||
dobin src/vim
|
||||
dosym vim /usr/bin/vimdiff
|
||||
dosym vim /usr/bin/rvim
|
||||
dosym vim /usr/bin/rview
|
||||
if use vim-pager ; then
|
||||
dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager
|
||||
dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager
|
||||
insinto ${vimfiles}/macros
|
||||
doins runtime/macros/manpager.sh
|
||||
fperms a+x ${vimfiles}/macros/manpager.sh
|
||||
fi
|
||||
|
||||
newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
|
||||
|
||||
# keep in sync with 'complete ... -F' list
|
||||
bashcomp_alias vim ex vi view rvim rview vimdiff
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
|
||||
# Call eselect vi update
|
||||
eselect_vi_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
|
||||
# Call eselect vi update
|
||||
eselect_vi_update
|
||||
}
|
@ -1,27 +1,29 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
VIM_VERSION="8.0"
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
||||
PYTHON_REQ_USE=threads
|
||||
inherit eutils vim-doc flag-o-matic fdo-mime versionator bash-completion-r1 python-single-r1
|
||||
PYTHON_REQ_USE="threads"
|
||||
USE_RUBY="ruby22 ruby23 ruby24 ruby25"
|
||||
|
||||
inherit vim-doc flag-o-matic versionator bash-completion-r1 python-single-r1 ruby-single
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/vim/vim.git"
|
||||
else
|
||||
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0106-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Vim, an improved vi-style text editor"
|
||||
HOMEPAGE="http://www.vim.org/ https://github.com/vim/vim"
|
||||
HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="vim"
|
||||
IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl vim-pager"
|
||||
IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl terminal vim-pager"
|
||||
REQUIRED_USE="
|
||||
luajit? ( lua )
|
||||
python? ( ${PYTHON_REQUIRED_USE} )
|
||||
@ -45,12 +47,14 @@ RDEPEND="
|
||||
perl? ( dev-lang/perl:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
racket? ( dev-scheme/racket )
|
||||
ruby? ( || ( dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 ) )
|
||||
ruby? ( ${RUBY_DEPS} )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
tcl? ( dev-lang/tcl:0= )
|
||||
X? ( x11-libs/libXt )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
sys-devel/autoconf
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
@ -61,7 +65,7 @@ pkg_setup() {
|
||||
export LC_COLLATE="C"
|
||||
|
||||
# Gnome sandbox silliness. bug #114475.
|
||||
mkdir -p "${T}"/home
|
||||
mkdir -p "${T}"/home || die "mkdir failed"
|
||||
export HOME="${T}"/home
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
@ -74,17 +78,21 @@ src_prepare() {
|
||||
fi
|
||||
|
||||
# Fixup a script to use awk instead of nawk
|
||||
sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
|
||||
|| die "mve.awk sed failed"
|
||||
sed -i -e \
|
||||
'1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
|
||||
"${S}"/runtime/tools/mve.awk || die "mve.awk sed failed"
|
||||
|
||||
# Read vimrc and gvimrc from /etc/vim
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
|
||||
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \
|
||||
>> "${S}"/src/feature.h || die "echo failed"
|
||||
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \
|
||||
>> "${S}"/src/feature.h || die "echo failed"
|
||||
|
||||
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
|
||||
# Hopefully this pattern won't break for a while at least.
|
||||
# This fixes bug 29398 (27 Sep 2003 agriffis)
|
||||
sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
sed -i -e \
|
||||
's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
|
||||
"${S}"/runtime/doc/syntax.txt \
|
||||
"${S}"/runtime/doc/tagsrch.txt \
|
||||
"${S}"/runtime/doc/usr_29.txt \
|
||||
@ -94,17 +102,21 @@ src_prepare() {
|
||||
# Don't be fooled by /usr/include/libc.h. When found, vim thinks
|
||||
# this is NeXT, but it's actually just a file in dev-libs/9libs
|
||||
# This fixes bug 43885 (20 Mar 2004 agriffis)
|
||||
sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
|
||||
sed -i -e \
|
||||
's/ libc\.h / /' \
|
||||
"${S}"/src/configure.ac || die 'sed failed'
|
||||
|
||||
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
|
||||
# correctly. To avoid some really entertaining error messages about stuff
|
||||
# which isn't even in the source file being invalid, we'll do some trickery
|
||||
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
|
||||
find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done
|
||||
find "${S}" -name '*.c' | while read c; do
|
||||
echo >> "$c" || die "echo failed"
|
||||
done
|
||||
|
||||
# conditionally make the manpager.sh script
|
||||
if use vim-pager; then
|
||||
cat <<-END > "${S}"/runtime/macros/manpager.sh
|
||||
cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed"
|
||||
#!/bin/sh
|
||||
sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
|
||||
vim \\
|
||||
@ -112,24 +124,21 @@ src_prepare() {
|
||||
-c 'set nolist nomod ft=man ts=8' \\
|
||||
-c 'let g:showmarks_enable=0' \\
|
||||
-c 'runtime! macros/less.vim' -
|
||||
END
|
||||
_EOF_
|
||||
fi
|
||||
|
||||
# Try to avoid sandbox problems. Bug #114475.
|
||||
if [[ -d "${S}"/src/po ]]; then
|
||||
sed -i '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile
|
||||
sed -i -e \
|
||||
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
|
||||
"${S}"/src/po/Makefile || die "sed failed"
|
||||
fi
|
||||
|
||||
if version_is_at_least 7.3.122 ; then
|
||||
cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
|
||||
fi
|
||||
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
|
||||
|
||||
# Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
|
||||
if version_is_at_least 7.3 ; then
|
||||
sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
sed -i -e \
|
||||
"s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
|
||||
"${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
@ -152,13 +161,15 @@ src_configure() {
|
||||
# (3) Notice auto/configure is newer than auto/config.mk
|
||||
# (4) Run ./configure (with wrong args) to remake auto/config.mk
|
||||
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
|
||||
rm -f src/auto/configure
|
||||
rm src/auto/configure || die "rm failed"
|
||||
emake -j1 -C src autoconf
|
||||
|
||||
# This should fix a sandbox violation (see bug 24447). The hvc
|
||||
# things are for ppc64, see bug 86433.
|
||||
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
|
||||
[[ -e ${file} ]] && addwrite $file
|
||||
if [[ -e "${file}" ]]; then
|
||||
addwrite $file
|
||||
fi
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
@ -199,13 +210,14 @@ src_configure() {
|
||||
$(use_enable ruby rubyinterp)
|
||||
$(use_enable selinux)
|
||||
$(use_enable tcl tclinterp)
|
||||
$(use_enable terminal)
|
||||
)
|
||||
|
||||
# --with-features=huge forces on cscope even if we --disable it. We need
|
||||
# to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
|
||||
if ! use cscope; then
|
||||
sed -i '/# define FEAT_CSCOPE/d' src/feature.h || \
|
||||
die "couldn't disable cscope"
|
||||
sed -i -e \
|
||||
'/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed"
|
||||
fi
|
||||
|
||||
# don't test USE=X here ... see bug #19115
|
||||
@ -236,14 +248,14 @@ src_compile() {
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo
|
||||
einfo
|
||||
einfo "Starting vim tests. Several error messages will be shown"
|
||||
einfo "while the tests run. This is normal behaviour and does not"
|
||||
einfo "indicate a fault."
|
||||
echo
|
||||
einfo
|
||||
ewarn "If the tests fail, your terminal may be left in a strange"
|
||||
ewarn "state. Usually, running 'reset' will fix this."
|
||||
echo
|
||||
einfo
|
||||
|
||||
# Don't let vim talk to X
|
||||
unset DISPLAY
|
||||
@ -251,39 +263,12 @@ src_test() {
|
||||
emake -j1 -C src/testdir nongui
|
||||
}
|
||||
|
||||
# Make convenience symlinks, hopefully without stepping on toes. Some
|
||||
# of these links are "owned" by the vim ebuild when it is installed,
|
||||
# but they might be good for gvim as well (see bug 45828)
|
||||
update_vim_symlinks() {
|
||||
local f syms
|
||||
syms="vimdiff rvim rview"
|
||||
# Call eselect vi update with --if-unset
|
||||
# to respect user's choice (bug 187449)
|
||||
eselect_vi_update() {
|
||||
einfo "Calling eselect vi update..."
|
||||
# Call this with --if-unset to respect user's choice (bug 187449)
|
||||
eselect vi update --if-unset
|
||||
|
||||
# Make or remove convenience symlink, vim -> gvim
|
||||
if [[ -f "${EROOT}"/usr/bin/gvim ]]; then
|
||||
ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null
|
||||
elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then
|
||||
rm "${EROOT}"/usr/bin/vim
|
||||
fi
|
||||
|
||||
# Make or remove convenience symlinks to vim
|
||||
if [[ -f "${EROOT}"/usr/bin/vim ]]; then
|
||||
for f in ${syms}; do
|
||||
ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null
|
||||
done
|
||||
else
|
||||
for f in ${syms}; do
|
||||
if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then
|
||||
rm -f "${EROOT}"/usr/bin/${f}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# This will still break if you merge then remove the vi package,
|
||||
# but there's only so much you can do, eh? Unfortunately we don't
|
||||
# have triggers like are done in rpm-land.
|
||||
eend $?
|
||||
}
|
||||
|
||||
src_install() {
|
||||
@ -304,26 +289,23 @@ src_install() {
|
||||
fi
|
||||
|
||||
newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
|
||||
|
||||
# keep in sync with 'complete ... -F' list
|
||||
bashcomp_alias vim ex vi view rvim rview vimdiff
|
||||
|
||||
# We shouldn't be installing the ex or view man page symlinks, as they
|
||||
# are managed by eselect-vi
|
||||
rm -f "${ED}"/usr/share/man/man1/{ex,view}.1
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
|
||||
# Make convenience symlinks
|
||||
update_vim_symlinks
|
||||
# Call eselect vi update
|
||||
eselect_vi_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# Update documentation tags (from vim-doc.eclass)
|
||||
update_vim_helptags
|
||||
|
||||
# Make convenience symlinks
|
||||
update_vim_symlinks
|
||||
# Call eselect vi update
|
||||
eselect_vi_update
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
DIST qemu-2.11.1-patches-r1.tar.xz 2064 BLAKE2B 533c916b01c014bcfa6c733b76aa6da1f12cdf5f0d4ae33136453705a8aca9fdfeef998747cfdc72d19e08fa40ea97e2fd4c21412c030af314605059282f49ef SHA512 12de7b4777ec98871d0786291534f61b37534feef64b556caeab72e020ff14d61fe19d24cb151ebfdb912df2a7ba72c0d882566b368d88d02c9f1354c2adae4a
|
||||
DIST qemu-2.11.1-patches-r2.tar.xz 3652 BLAKE2B 4c3bf7503a838c2a978bcc973ee7d8909d662980aa2ccb71f3bff69a7aa79cc2ed405ed4648914808c64a538c0ceeef2904380cae38ee6c94176a11c9ebdbed3 SHA512 35d3aaeffe7655e739cd6d7c420692fcc6d2d76e49a8fd288f09bec81146075485675d1f912a7fc531ac8497977bcd259e97c260b61a7e854c378f6b9b2d4a79
|
||||
DIST qemu-2.11.1.tar.bz2 32819412 BLAKE2B 6b6d4e7b8dcf33aeedb0b33bad267da07ad17c2eeeb5fbd2c038d760bc03224e55ba0f03eb248c62bc0e8636c2c660ea76b367eaea96bee16388053f82c8b8a9 SHA512 1b692bbdfc3dc785738c7192aa2a3f9cf53d9f5bf3b3f49fa8692050dc50f7056c8a4d1b527d48ffb2a674a0fd3a46d87addd1eaaa758f35eec1ab5adfe32354
|
@ -1,2 +0,0 @@
|
||||
KERNEL=="kvm", GROUP="kvm", MODE="0660"
|
||||
KERNEL=="vhost-net", GROUP="kvm", MODE="0660", OPTIONS+="static_node=vhost-net"
|
@ -1,14 +0,0 @@
|
||||
# This should have the following permissions: root:qemu 0640
|
||||
|
||||
# allow br0
|
||||
# Uncommenting the above would allow users in the 'qemu' group
|
||||
# to add devices to 'br0'
|
||||
|
||||
# allow virbr0
|
||||
# Uncommenting the above would allow users in the 'qemu' group
|
||||
# to add devices to 'virbr0'
|
||||
|
||||
# include /etc/qemu/bob.conf
|
||||
# Uncommenting the above would allow users in the 'bob' group
|
||||
# to have permissions defined in it, iff it has the following
|
||||
# permissions: root:bob 0640
|
@ -1,54 +0,0 @@
|
||||
From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Tue, 28 Nov 2017 11:51:27 +0100
|
||||
Subject: [PATCH] memfd: fix configure test
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Recent glibc added memfd_create in sys/mman.h. This conflicts with
|
||||
the definition in util/memfd.c:
|
||||
|
||||
/builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration
|
||||
|
||||
Fix the configure test, and remove the sys/memfd.h inclusion since the
|
||||
file actually does not exist---it is a typo in the memfd_create(2) man
|
||||
page.
|
||||
|
||||
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
---
|
||||
configure | 2 +-
|
||||
util/memfd.c | 4 +---
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 9c8aa5a98b..99ccc1725a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -3923,7 +3923,7 @@ fi
|
||||
# check if memfd is supported
|
||||
memfd=no
|
||||
cat > $TMPC << EOF
|
||||
-#include <sys/memfd.h>
|
||||
+#include <sys/mman.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
diff --git a/util/memfd.c b/util/memfd.c
|
||||
index 4571d1aba8..412e94a405 100644
|
||||
--- a/util/memfd.c
|
||||
+++ b/util/memfd.c
|
||||
@@ -31,9 +31,7 @@
|
||||
|
||||
#include "qemu/memfd.h"
|
||||
|
||||
-#ifdef CONFIG_MEMFD
|
||||
-#include <sys/memfd.h>
|
||||
-#elif defined CONFIG_LINUX
|
||||
+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
|
||||
#include <sys/syscall.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
--
|
||||
2.11.0
|
@ -1,11 +0,0 @@
|
||||
--- qemu-2.11.1/include/disas/capstone.h 2018-02-14 22:53:22.000000000 +0100
|
||||
+++ qemu-2.11.1/include/disas/capstone.h 2018-02-17 20:12:12.754703951 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#ifdef CONFIG_CAPSTONE
|
||||
|
||||
-#include <capstone.h>
|
||||
+#include <capstone/capstone.h>
|
||||
|
||||
#else
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -4468,10 +4468,6 @@ fi
|
||||
if test "$gcov" = "yes" ; then
|
||||
CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
|
||||
LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
|
||||
-elif test "$fortify_source" = "yes" ; then
|
||||
- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
|
||||
-elif test "$debug" = "no"; then
|
||||
- CFLAGS="-O2 $CFLAGS"
|
||||
fi
|
||||
|
||||
##########################################
|
@ -1,15 +0,0 @@
|
||||
Linux C libs are moving away from implicit header pollution with sys/types.h
|
||||
|
||||
--- a/include/qemu/osdep.h
|
||||
+++ b/include/qemu/osdep.h
|
||||
@@ -78,6 +78,10 @@ extern int daemon(int, int);
|
||||
#include <assert.h>
|
||||
#include <signal.h>
|
||||
|
||||
+#ifdef __linux__
|
||||
+#include <sys/sysmacros.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef __OpenBSD__
|
||||
#include <sys/signal.h>
|
||||
#endif
|
@ -1,64 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Enable automatic non-native program execution by the kernel.
|
||||
|
||||
# Defaulting to OC should be safe because it comes down to:
|
||||
# - do we trust the interp itself to not be malicious? yes; we built it.
|
||||
# - do we trust the programs we're running? ish; same permission as native
|
||||
# binaries apply. so if user can do bad stuff natively, cross isn't worse.
|
||||
: ${QEMU_BINFMT_FLAGS:=OC}
|
||||
|
||||
depend() {
|
||||
after procfs
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Registering qemu-user binaries (flags: ${QEMU_BINFMT_FLAGS})"
|
||||
|
||||
if [ ! -d /proc/sys/fs/binfmt_misc ] ; then
|
||||
modprobe -q binfmt_misc
|
||||
fi
|
||||
|
||||
if [ ! -d /proc/sys/fs/binfmt_misc ] ; then
|
||||
eend 1 "You need support for 'misc binaries' in your kernel!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f /proc/sys/fs/binfmt_misc/register ] ; then
|
||||
mount -t binfmt_misc -o nodev,noexec,nosuid \
|
||||
binfmt_misc /proc/sys/fs/binfmt_misc >/dev/null 2>&1
|
||||
eend $? || return
|
||||
fi
|
||||
|
||||
# Probe the native cpu type so we don't try registering them.
|
||||
local cpu="$(uname -m)"
|
||||
case "${cpu}" in
|
||||
armv[4-9]*)
|
||||
cpu="arm"
|
||||
;;
|
||||
i386|i486|i586|i686|i86pc|BePC|x86_64)
|
||||
cpu="i386"
|
||||
;;
|
||||
m68k)
|
||||
cpu="m68k"
|
||||
;;
|
||||
mips*)
|
||||
cpu="mips"
|
||||
;;
|
||||
"Power Macintosh"|ppc|ppc64)
|
||||
cpu="ppc"
|
||||
;;
|
||||
s390*)
|
||||
cpu="s390"
|
||||
;;
|
||||
sh*)
|
||||
cpu="sh"
|
||||
;;
|
||||
sparc*)
|
||||
cpu="sparc"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Register the interpreter for each cpu except for the native one.
|
@ -1,14 +0,0 @@
|
||||
eend 0
|
||||
}
|
||||
|
||||
stop() {
|
||||
# We unregister everything in the "qemu-xxx" namespace.
|
||||
ebegin "Unregistering qemu-user binaries"
|
||||
local f
|
||||
for f in /proc/sys/fs/binfmt_misc/qemu-* ; do
|
||||
if [ -f "${f}" ] ; then
|
||||
echo '-1' > "${f}"
|
||||
fi
|
||||
done
|
||||
eend 0
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>qemu@gentoo.org</email>
|
||||
<name>Gentoo QEMU Project</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="accessibility">Adds support for braille displays using brltty</flag>
|
||||
<flag name="aio">Enables support for Linux's Async IO</flag>
|
||||
<flag name="alsa">Enable alsa output for sound emulation</flag>
|
||||
<flag name="capstone">Enable disassembly support with <pkg>dev-libs/capstone</pkg></flag>
|
||||
<flag name="curl">Support ISOs / -cdrom directives vis HTTP or HTTPS.</flag>
|
||||
<flag name="fdt">Enables firmware device tree support</flag>
|
||||
<flag name="glusterfs">Enables GlusterFS cluster fileystem via
|
||||
<pkg>sys-cluster/glusterfs</pkg></flag>
|
||||
<flag name="gnutls">Enable TLS support for the VNC console server.
|
||||
For 1.4 and newer this also enables WebSocket support.
|
||||
For 2.0 through 2.3 also enables disk quorum support.</flag>
|
||||
<flag name="gtk2">Use gtk-2 instead of gtk-3</flag>
|
||||
<flag name="iscsi">Enable direct iSCSI support via
|
||||
<pkg>net-libs/libiscsi</pkg> instead of indirectly via the Linux
|
||||
block layer that <pkg>sys-block/open-iscsi</pkg> does.</flag>
|
||||
<flag name="ncurses">Enable the ncurses-based console</flag>
|
||||
<flag name="nfs">Enable NFS support</flag>
|
||||
<flag name="numa">Enable NUMA support</flag>
|
||||
<flag name="pin-upstream-blobs">Pin the versions of BIOS firmware to the version included in the upstream release.
|
||||
This is needed to sanely support migration/suspend/resume/snapshotting/etc... of instances.
|
||||
When the blobs are different, random corruption/bugs/crashes/etc... may be observed.</flag>
|
||||
<flag name="pulseaudio">Enable pulseaudio output for sound emulation</flag>
|
||||
<flag name="rbd">Enable rados block device backend support, see http://ceph.newdream.net/wiki/QEMU-RBD</flag>
|
||||
<flag name="sdl">Enable the SDL-based console</flag>
|
||||
<flag name="sdl2">Use libsdl2 instead of libsdl</flag>
|
||||
<flag name="spice">Enable Spice protocol support via <pkg>app-emulation/spice</pkg></flag>
|
||||
<flag name="ssh">Enable SSH based block device support via <pkg>net-libs/libssh2</pkg></flag>
|
||||
<flag name="static-user">Build the User targets as static binaries</flag>
|
||||
<flag name="static">Build the User and Software MMU (system) targets as well as tools as static binaries</flag>
|
||||
<flag name="snappy">Enable support for snappy compression</flag>
|
||||
<flag name="systemtap">Enable SystemTAP/DTrace tracing</flag>
|
||||
<flag name="tci">Enable the TCG Interpreter which can speed up or slowdown workloads depending on the host and guest CPUs being emulated. In the future it will be a runtime option but for now its compile time.</flag>
|
||||
<flag name="jpeg">Enable jpeg image support for the VNC console server</flag>
|
||||
<flag name="png">Enable png image support for the VNC console server</flag>
|
||||
<flag name="usb">Enable USB passthrough via <pkg>dev-libs/libusb</pkg></flag>
|
||||
<flag name="usbredir">Use <pkg>sys-apps/usbredir</pkg> to redirect USB devices to another machine over TCP</flag>
|
||||
<flag name="vde">Enable VDE-based networking</flag>
|
||||
<flag name="vhost-net">Enable accelerated networking using vhost-net, see http://www.linux-kvm.org/page/VhostNet</flag>
|
||||
<flag name="virgl">Enable experimental Virgil 3d (virtual software GPU)</flag>
|
||||
<flag name="virtfs">Enable VirtFS via virtio-9p-pci / fsdev. See http://wiki.qemu.org/Documentation/9psetup</flag>
|
||||
<flag name="vte">Enable terminal support (<pkg>x11-libs/vte</pkg>) in the GTK+ interface</flag>
|
||||
<flag name="xattr">Add support for getting and setting POSIX extended attributes, through
|
||||
<pkg>sys-apps/attr</pkg>. Requisite for the virtfs backend.
|
||||
</flag>
|
||||
<flag name="xen">Enables support for Xen backends</flag>
|
||||
<flag name="xfs">Support xfsctl() notification and syncing for XFS backed
|
||||
virtual disks.</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
@ -1,805 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
|
||||
|
||||
FIRMWARE_ABI_VERSION="2.9.0-r52"
|
||||
|
||||
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||
user udev fcaps readme.gentoo-r1 pax-utils l10n
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||
inherit git-r3
|
||||
SRC_URI=""
|
||||
else
|
||||
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
|
||||
KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 x86 ~x86-fbsd"
|
||||
|
||||
# Gentoo specific patchsets:
|
||||
SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r1.tar.xz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt
|
||||
glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux
|
||||
kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png
|
||||
pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy
|
||||
spice ssh static static-user systemtap tci test usb usbredir vde
|
||||
+vhost-net virgl virtfs +vnc vte xattr xen xfs"
|
||||
|
||||
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel
|
||||
mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc
|
||||
sparc64 x86_64"
|
||||
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS}
|
||||
lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb"
|
||||
IUSE_USER_TARGETS="${COMMON_TARGETS}
|
||||
armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
|
||||
|
||||
use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||
use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||
IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
|
||||
|
||||
# Allow no targets to be built so that people can get a tools-only build.
|
||||
# Block USE flag configurations known to not work.
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
gtk2? ( gtk )
|
||||
qemu_softmmu_targets_arm? ( fdt )
|
||||
qemu_softmmu_targets_microblaze? ( fdt )
|
||||
qemu_softmmu_targets_mips64el? ( fdt )
|
||||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
sdl2? ( sdl )
|
||||
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio !snappy )
|
||||
virtfs? ( xattr )
|
||||
vte? ( gtk )"
|
||||
|
||||
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||
# and user/softmmu targets (qemu-*, qemu-system-*).
|
||||
#
|
||||
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||
#
|
||||
# The attr lib isn't always linked in (although the USE flag is always
|
||||
# respected). This is because qemu supports using the C library's API
|
||||
# when available rather than always using the extranl library.
|
||||
ALL_DEPEND="
|
||||
>=dev-libs/glib-2.0[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||
|
||||
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||
# softmmu targets (qemu-system-*).
|
||||
SOFTMMU_TOOLS_DEPEND="
|
||||
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||
accessibility? (
|
||||
app-accessibility/brltty[api]
|
||||
app-accessibility/brltty[static-libs(+)]
|
||||
)
|
||||
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
bzip2? ( app-arch/bzip2[static-libs(+)] )
|
||||
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||
fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] )
|
||||
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||
gnutls? (
|
||||
dev-libs/nettle:=[static-libs(+)]
|
||||
>=net-libs/gnutls-3.0:=[static-libs(+)]
|
||||
)
|
||||
gtk? (
|
||||
gtk2? (
|
||||
x11-libs/gtk+:2
|
||||
vte? ( x11-libs/vte:0 )
|
||||
)
|
||||
!gtk2? (
|
||||
x11-libs/gtk+:3
|
||||
vte? ( x11-libs/vte:2.91 )
|
||||
)
|
||||
)
|
||||
infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] )
|
||||
iscsi? ( net-libs/libiscsi )
|
||||
jpeg? ( virtual/jpeg:0=[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
ncurses? (
|
||||
sys-libs/ncurses:0=[unicode]
|
||||
sys-libs/ncurses:0=[static-libs(+)]
|
||||
)
|
||||
nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] )
|
||||
numa? ( sys-process/numactl[static-libs(+)] )
|
||||
opengl? (
|
||||
virtual/opengl
|
||||
media-libs/libepoxy[static-libs(+)]
|
||||
media-libs/mesa[static-libs(+)]
|
||||
media-libs/mesa[egl,gbm]
|
||||
)
|
||||
png? ( media-libs/libpng:0=[static-libs(+)] )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||
sdl? (
|
||||
!sdl2? (
|
||||
media-libs/libsdl[X]
|
||||
>=media-libs/libsdl-1.2.11[static-libs(+)]
|
||||
)
|
||||
sdl2? (
|
||||
media-libs/libsdl2[X]
|
||||
media-libs/libsdl2[static-libs(+)]
|
||||
)
|
||||
)
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy:= )
|
||||
spice? (
|
||||
>=app-emulation/spice-protocol-0.12.3
|
||||
>=app-emulation/spice-0.12.0[static-libs(+)]
|
||||
)
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||
usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
|
||||
usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
|
||||
vde? ( net-misc/vde[static-libs(+)] )
|
||||
virgl? ( media-libs/virglrenderer[static-libs(+)] )
|
||||
virtfs? ( sys-libs/libcap )
|
||||
xen? ( app-emulation/xen-tools:= )
|
||||
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||
|
||||
X86_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/edk2-ovmf-2017_pre20170505[binary]
|
||||
~sys-firmware/ipxe-1.0.0_p20160620
|
||||
~sys-firmware/seabios-1.10.2[binary,seavgabios]
|
||||
~sys-firmware/sgabios-0.1_pre8
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
sys-firmware/edk2-ovmf
|
||||
sys-firmware/ipxe
|
||||
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||
sys-firmware/sgabios
|
||||
)"
|
||||
PPC64_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-1.10.2[binary,seavgabios]
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||
)
|
||||
"
|
||||
|
||||
CDEPEND="
|
||||
!static? (
|
||||
${ALL_DEPEND//\[static-libs(+)]}
|
||||
${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]}
|
||||
)
|
||||
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_ppc64? ( ${PPC64_FIRMWARE_DEPEND} )
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-lang/perl
|
||||
=dev-lang/python-2*
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||
gtk? ( nls? ( sys-devel/gettext ) )
|
||||
static? (
|
||||
${ALL_DEPEND}
|
||||
${SOFTMMU_TOOLS_DEPEND}
|
||||
)
|
||||
static-user? ( ${ALL_DEPEND} )
|
||||
test? (
|
||||
dev-libs/glib[utils]
|
||||
sys-devel/bc
|
||||
)"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-qemu )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.5.0-cflags.patch
|
||||
"${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
|
||||
"${FILESDIR}"/${PN}-2.11.0-glibc-2.27.patch
|
||||
"${WORKDIR}"/patches
|
||||
)
|
||||
|
||||
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||
|
||||
QA_PREBUILT="
|
||||
usr/share/qemu/openbios-ppc
|
||||
usr/share/qemu/openbios-sparc64
|
||||
usr/share/qemu/openbios-sparc32
|
||||
usr/share/qemu/palcode-clipper
|
||||
usr/share/qemu/s390-ccw.img
|
||||
usr/share/qemu/s390-netboot.img
|
||||
usr/share/qemu/u-boot.e500"
|
||||
|
||||
QA_WX_LOAD="usr/bin/qemu-i386
|
||||
usr/bin/qemu-x86_64
|
||||
usr/bin/qemu-alpha
|
||||
usr/bin/qemu-arm
|
||||
usr/bin/qemu-cris
|
||||
usr/bin/qemu-m68k
|
||||
usr/bin/qemu-microblaze
|
||||
usr/bin/qemu-microblazeel
|
||||
usr/bin/qemu-mips
|
||||
usr/bin/qemu-mipsel
|
||||
usr/bin/qemu-or1k
|
||||
usr/bin/qemu-ppc
|
||||
usr/bin/qemu-ppc64
|
||||
usr/bin/qemu-ppc64abi32
|
||||
usr/bin/qemu-sh4
|
||||
usr/bin/qemu-sh4eb
|
||||
usr/bin/qemu-sparc
|
||||
usr/bin/qemu-sparc64
|
||||
usr/bin/qemu-armeb
|
||||
usr/bin/qemu-sparc32plus
|
||||
usr/bin/qemu-s390x
|
||||
usr/bin/qemu-unicore32"
|
||||
|
||||
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the
|
||||
kernel module loaded before running kvm. The easiest way to ensure that the
|
||||
kernel module is loaded is to load it on boot.
|
||||
For AMD CPUs the module is called 'kvm-amd'.
|
||||
For Intel CPUs the module is called 'kvm-intel'.
|
||||
Please review /etc/conf.d/modules for how to load these.
|
||||
|
||||
Make sure your user is in the 'kvm' group. Just run
|
||||
$ gpasswd -a <USER> kvm
|
||||
then have <USER> re-login.
|
||||
|
||||
For brand new installs, the default permissions on /dev/kvm might not let
|
||||
you access it. You can tell udev to reset ownership/perms:
|
||||
$ udevadm trigger -c add /dev/kvm
|
||||
|
||||
If you want to register binfmt handlers for qemu user targets:
|
||||
For openrc:
|
||||
# rc-update add qemu-binfmt
|
||||
For systemd:
|
||||
# ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf"
|
||||
|
||||
pkg_pretend() {
|
||||
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||
elif use kernel_linux; then
|
||||
if ! linux_config_exists; then
|
||||
eerror "Unable to check your kernel for KVM support"
|
||||
else
|
||||
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||
ERROR_KVM_AMD+=" your kernel configuration."
|
||||
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||
ERROR_TUN+=" virtual network device if using -net tap."
|
||||
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||
ERROR_VHOST_NET+=" support"
|
||||
|
||||
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||
if grep -q AuthenticAMD /proc/cpuinfo; then
|
||||
CONFIG_CHECK+=" ~KVM_AMD"
|
||||
elif grep -q GenuineIntel /proc/cpuinfo; then
|
||||
CONFIG_CHECK+=" ~KVM_INTEL"
|
||||
fi
|
||||
fi
|
||||
|
||||
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||
|
||||
# Now do the actual checks setup above
|
||||
check_extra_config
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||
eerror "instances are still pointing to it. Please update your"
|
||||
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||
die "update your virt configs to not use qemu-kvm"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup kvm 78
|
||||
}
|
||||
|
||||
# Sanity check to make sure target lists are kept up-to-date.
|
||||
check_targets() {
|
||||
local var=$1 mak=$2
|
||||
local detected sorted
|
||||
|
||||
pushd "${S}"/default-configs >/dev/null || die
|
||||
|
||||
# Force C locale until glibc is updated. #564936
|
||||
detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "${var}: ${sorted}"
|
||||
eerror "$(printf '%-*s' ${#var} configure): ${detected}"
|
||||
die "sync ${var} to the list of targets"
|
||||
fi
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
handle_locales() {
|
||||
# Make sure locale list is kept up-to-date.
|
||||
local detected sorted
|
||||
detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "PLOCALES: ${sorted}"
|
||||
eerror " po/*.po: ${detected}"
|
||||
die "sync PLOCALES"
|
||||
fi
|
||||
|
||||
# Deal with selective install of locales.
|
||||
if use nls ; then
|
||||
# Delete locales the user does not want. #577814
|
||||
rm_loc() { rm po/$1.po || die; }
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
else
|
||||
# Cheap hack to disable gettext .mo generation.
|
||||
rm -f po/*.po
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
check_targets IUSE_SOFTMMU_TARGETS softmmu
|
||||
check_targets IUSE_USER_TARGETS linux-user
|
||||
|
||||
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||
sed -i -r \
|
||||
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||
Makefile Makefile.target || die
|
||||
|
||||
default
|
||||
|
||||
# Fix ld and objcopy being called directly
|
||||
tc-export AR LD OBJCOPY
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
# Run after we've applied all patches.
|
||||
handle_locales
|
||||
|
||||
# Remove bundled copy of libfdt
|
||||
rm -r dtc || die
|
||||
}
|
||||
|
||||
##
|
||||
# configures qemu based on the build directory and the build type
|
||||
# we are using.
|
||||
#
|
||||
qemu_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local buildtype=$1
|
||||
local builddir="${S}/${buildtype}-build"
|
||||
|
||||
mkdir "${builddir}"
|
||||
|
||||
local conf_opts=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--docdir=/usr/share/doc/${PF}/html
|
||||
--disable-bsd-user
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
--disable-werror
|
||||
# We support gnutls/nettle for crypto operations. It is possible
|
||||
# to use gcrypt when gnutls/nettle are disabled (but not when they
|
||||
# are enabled), but it's not really worth the hassle. Disable it
|
||||
# all the time to avoid automatically detecting it. #568856
|
||||
--disable-gcrypt
|
||||
--python="${PYTHON}"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
--host-cc="$(tc-getBUILD_CC)"
|
||||
$(use_enable debug debug-info)
|
||||
$(use_enable debug debug-tcg)
|
||||
--enable-docs
|
||||
$(use_enable tci tcg-interpreter)
|
||||
$(use_enable xattr attr)
|
||||
)
|
||||
|
||||
# Disable options not used by user targets. This simplifies building
|
||||
# static user targets (USE=static-user) considerably.
|
||||
conf_notuser() {
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
echo "--disable-${2:-$1}"
|
||||
else
|
||||
use_enable "$@"
|
||||
fi
|
||||
}
|
||||
conf_opts+=(
|
||||
$(conf_notuser accessibility brlapi)
|
||||
$(conf_notuser aio linux-aio)
|
||||
$(conf_notuser bzip2)
|
||||
$(conf_notuser bluetooth bluez)
|
||||
$(conf_notuser caps cap-ng)
|
||||
$(conf_notuser curl)
|
||||
$(conf_notuser fdt)
|
||||
$(conf_notuser glusterfs)
|
||||
$(conf_notuser gnutls)
|
||||
$(conf_notuser gnutls nettle)
|
||||
$(conf_notuser gtk)
|
||||
$(conf_notuser infiniband rdma)
|
||||
$(conf_notuser iscsi libiscsi)
|
||||
$(conf_notuser jpeg vnc-jpeg)
|
||||
$(conf_notuser kernel_linux kvm)
|
||||
$(conf_notuser lzo)
|
||||
$(conf_notuser ncurses curses)
|
||||
$(conf_notuser nfs libnfs)
|
||||
$(conf_notuser numa)
|
||||
$(conf_notuser opengl)
|
||||
$(conf_notuser png vnc-png)
|
||||
$(conf_notuser rbd)
|
||||
$(conf_notuser sasl vnc-sasl)
|
||||
$(conf_notuser sdl)
|
||||
$(conf_notuser seccomp)
|
||||
$(conf_notuser smartcard)
|
||||
$(conf_notuser snappy)
|
||||
$(conf_notuser spice)
|
||||
$(conf_notuser ssh libssh2)
|
||||
$(conf_notuser usb libusb)
|
||||
$(conf_notuser usbredir usb-redir)
|
||||
$(conf_notuser vde)
|
||||
$(conf_notuser vhost-net)
|
||||
$(conf_notuser virgl virglrenderer)
|
||||
$(conf_notuser virtfs)
|
||||
$(conf_notuser vnc)
|
||||
$(conf_notuser vte)
|
||||
$(conf_notuser xen)
|
||||
$(conf_notuser xen xen-pci-passthrough)
|
||||
$(conf_notuser xfs xfsctl)
|
||||
)
|
||||
|
||||
if [[ ! ${buildtype} == "user" ]] ; then
|
||||
# audio options
|
||||
local audio_opts="oss"
|
||||
use alsa && audio_opts="alsa,${audio_opts}"
|
||||
use sdl && audio_opts="sdl,${audio_opts}"
|
||||
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||
conf_opts+=(
|
||||
--audio-drv-list="${audio_opts}"
|
||||
)
|
||||
use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
|
||||
use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
|
||||
fi
|
||||
|
||||
case ${buildtype} in
|
||||
user)
|
||||
conf_opts+=(
|
||||
--enable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--disable-tools
|
||||
)
|
||||
local static_flag="static-user"
|
||||
;;
|
||||
softmmu)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--enable-system
|
||||
--disable-tools
|
||||
)
|
||||
local static_flag="static"
|
||||
;;
|
||||
tools)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--enable-tools
|
||||
)
|
||||
local static_flag="static"
|
||||
;;
|
||||
esac
|
||||
|
||||
local targets="${buildtype}_targets"
|
||||
[[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
|
||||
|
||||
# Add support for SystemTAP
|
||||
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||
|
||||
# We always want to attempt to build with PIE support as it results
|
||||
# in a more secure binary. But it doesn't work with static or if
|
||||
# the current GCC doesn't have PIE support.
|
||||
if use ${static_flag}; then
|
||||
conf_opts+=( --static --disable-pie )
|
||||
else
|
||||
tc-enables-pie && conf_opts+=( --enable-pie )
|
||||
fi
|
||||
|
||||
#bug #647570
|
||||
conf_opts+=( --disable-capstone )
|
||||
|
||||
echo "../configure ${conf_opts[*]}"
|
||||
cd "${builddir}"
|
||||
../configure "${conf_opts[@]}" || die "configure failed"
|
||||
|
||||
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||
# host USB devices yet
|
||||
use kernel_FreeBSD && \
|
||||
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local target
|
||||
|
||||
python_setup
|
||||
|
||||
softmmu_targets= softmmu_bins=()
|
||||
user_targets= user_bins=()
|
||||
|
||||
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||
if use "qemu_softmmu_targets_${target}"; then
|
||||
softmmu_targets+=",${target}-softmmu"
|
||||
softmmu_bins+=( "qemu-system-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
for target in ${IUSE_USER_TARGETS} ; do
|
||||
if use "qemu_user_targets_${target}"; then
|
||||
user_targets+=",${target}-linux-user"
|
||||
user_bins+=( "qemu-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
softmmu_targets=${softmmu_targets#,}
|
||||
user_targets=${user_targets#,}
|
||||
|
||||
[[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
|
||||
[[ -n ${user_targets} ]] && qemu_src_configure "user"
|
||||
qemu_src_configure "tools"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
default
|
||||
fi
|
||||
|
||||
cd "${S}/tools-build"
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
pax-mark m */qemu-system-* #515550
|
||||
emake -j1 check
|
||||
emake -j1 check-report.html
|
||||
fi
|
||||
}
|
||||
|
||||
qemu_python_install() {
|
||||
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||
|
||||
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||
}
|
||||
|
||||
# Generate binfmt support files.
|
||||
# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
|
||||
# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
|
||||
generate_initd() {
|
||||
local out="${T}/qemu-binfmt"
|
||||
local out_systemd="${T}/qemu.conf"
|
||||
local d="${T}/binfmt.d"
|
||||
|
||||
einfo "Generating qemu binfmt scripts and configuration files"
|
||||
|
||||
# Generate the debian fragments first.
|
||||
mkdir -p "${d}"
|
||||
"${S}"/scripts/qemu-binfmt-conf.sh \
|
||||
--debian \
|
||||
--exportdir "${d}" \
|
||||
--qemu-path "${EPREFIX}/usr/bin" \
|
||||
|| die
|
||||
# Then turn the fragments into a shell script we can source.
|
||||
sed -E -i \
|
||||
-e 's:^([^ ]+) (.*)$:\1="\2":' \
|
||||
"${d}"/* || die
|
||||
|
||||
# Generate the init.d script by assembling the fragments from above.
|
||||
local f qcpu package interpreter magic mask
|
||||
cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die
|
||||
for f in "${d}"/qemu-* ; do
|
||||
source "${f}"
|
||||
|
||||
# Normalize the cpu logic like we do in the init.d for the native cpu.
|
||||
qcpu=${package#qemu-}
|
||||
case ${qcpu} in
|
||||
arm*) qcpu="arm";;
|
||||
mips*) qcpu="mips";;
|
||||
ppc*) qcpu="ppc";;
|
||||
s390*) qcpu="s390";;
|
||||
sh*) qcpu="sh";;
|
||||
sparc*) qcpu="sparc";;
|
||||
esac
|
||||
|
||||
cat <<EOF >>"${out}"
|
||||
if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then
|
||||
echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
EOF
|
||||
|
||||
echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
|
||||
|
||||
done
|
||||
cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Install binfmt handler init script for user targets.
|
||||
generate_initd
|
||||
doinitd "${T}/qemu-binfmt"
|
||||
|
||||
# Install binfmt/qemu.conf.
|
||||
insinto "/usr/share/qemu/binfmt.d"
|
||||
doins "${T}/qemu.conf"
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# This might not exist if the test failed. #512010
|
||||
[[ -e check-report.html ]] && dohtml check-report.html
|
||||
|
||||
if use kernel_linux; then
|
||||
udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl qemu_python_install
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${S}/tools-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||
pushd "${ED}"/usr/bin >/dev/null
|
||||
pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594
|
||||
popd >/dev/null
|
||||
|
||||
# Install config file example for qemu-bridge-helper
|
||||
insinto "/etc/qemu"
|
||||
doins "${FILESDIR}/bridge.conf"
|
||||
|
||||
cd "${S}"
|
||||
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||
newdoc pc-bios/README README.pc-bios
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||
rm "${ED}/usr/share/qemu/bios.bin"
|
||||
rm "${ED}/usr/share/qemu/bios-256k.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||
dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
|
||||
fi
|
||||
|
||||
# Remove vgabios since we're using the seavgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||
# PPC64 loads vgabios-stdvga
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc64; then
|
||||
dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
|
||||
dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||
dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||
dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||
dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin
|
||||
dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||
fi
|
||||
|
||||
# Remove sgabios since we're using the sgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||
fi
|
||||
|
||||
# Remove iPXE since we're using the iPXE packaged one
|
||||
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||
fi
|
||||
fi
|
||||
|
||||
DISABLE_AUTOFORMATTING=true
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
firmware_abi_change() {
|
||||
local pv
|
||||
for pv in ${REPLACING_VERSIONS}; do
|
||||
if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||
udev_reload
|
||||
fi
|
||||
|
||||
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||
|
||||
DISABLE_AUTOFORMATTING=true
|
||||
readme.gentoo_print_elog
|
||||
|
||||
if use pin-upstream-blobs && firmware_abi_change; then
|
||||
ewarn "This version of qemu pins new versions of firmware blobs:"
|
||||
ewarn " $(best_version sys-firmware/edk2-ovmf)"
|
||||
ewarn " $(best_version sys-firmware/ipxe)"
|
||||
ewarn " $(best_version sys-firmware/seabios)"
|
||||
ewarn " $(best_version sys-firmware/sgabios)"
|
||||
ewarn "This might break resume of hibernated guests (started with a different"
|
||||
ewarn "firmware version) and live migration to/from qemu versions with different"
|
||||
ewarn "firmware. Please (cold) restart all running guests. For functional"
|
||||
ewarn "guest migration ensure that all"
|
||||
ewarn "hosts run at least"
|
||||
ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_info() {
|
||||
echo "Using:"
|
||||
echo " $(best_version app-emulation/spice-protocol)"
|
||||
echo " $(best_version sys-firmware/edk2-ovmf)"
|
||||
if has_version 'sys-firmware/edk2-ovmf[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/ipxe)"
|
||||
echo " $(best_version sys-firmware/seabios)"
|
||||
if has_version 'sys-firmware/seabios[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/sgabios)"
|
||||
}
|
@ -1,805 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
|
||||
|
||||
FIRMWARE_ABI_VERSION="2.11.1-r50"
|
||||
|
||||
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||
user udev fcaps readme.gentoo-r1 pax-utils l10n
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||
inherit git-r3
|
||||
SRC_URI=""
|
||||
else
|
||||
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
|
||||
|
||||
# Gentoo specific patchsets:
|
||||
SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r2.tar.xz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
IUSE="accessibility +aio alsa bluetooth bzip2 capstone +caps +curl debug
|
||||
+fdt glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux
|
||||
kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png
|
||||
pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy
|
||||
spice ssh static static-user systemtap tci test usb usbredir vde
|
||||
+vhost-net virgl virtfs +vnc vte xattr xen xfs"
|
||||
|
||||
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel
|
||||
mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc
|
||||
sparc64 x86_64"
|
||||
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS}
|
||||
lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb"
|
||||
IUSE_USER_TARGETS="${COMMON_TARGETS}
|
||||
armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
|
||||
|
||||
use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||
use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||
IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
|
||||
|
||||
# Allow no targets to be built so that people can get a tools-only build.
|
||||
# Block USE flag configurations known to not work.
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
gtk2? ( gtk )
|
||||
qemu_softmmu_targets_arm? ( fdt )
|
||||
qemu_softmmu_targets_microblaze? ( fdt )
|
||||
qemu_softmmu_targets_mips64el? ( fdt )
|
||||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
sdl2? ( sdl )
|
||||
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio !snappy )
|
||||
virtfs? ( xattr )
|
||||
vte? ( gtk )"
|
||||
|
||||
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||
# and user/softmmu targets (qemu-*, qemu-system-*).
|
||||
#
|
||||
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||
#
|
||||
# The attr lib isn't always linked in (although the USE flag is always
|
||||
# respected). This is because qemu supports using the C library's API
|
||||
# when available rather than always using the external library.
|
||||
ALL_DEPEND="
|
||||
>=dev-libs/glib-2.0[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||
|
||||
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||
# softmmu targets (qemu-system-*).
|
||||
SOFTMMU_TOOLS_DEPEND="
|
||||
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||
accessibility? (
|
||||
app-accessibility/brltty[api]
|
||||
app-accessibility/brltty[static-libs(+)]
|
||||
)
|
||||
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
bzip2? ( app-arch/bzip2[static-libs(+)] )
|
||||
capstone? ( dev-libs/capstone )
|
||||
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||
fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] )
|
||||
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||
gnutls? (
|
||||
dev-libs/nettle:=[static-libs(+)]
|
||||
>=net-libs/gnutls-3.0:=[static-libs(+)]
|
||||
)
|
||||
gtk? (
|
||||
gtk2? (
|
||||
x11-libs/gtk+:2
|
||||
vte? ( x11-libs/vte:0 )
|
||||
)
|
||||
!gtk2? (
|
||||
x11-libs/gtk+:3
|
||||
vte? ( x11-libs/vte:2.91 )
|
||||
)
|
||||
)
|
||||
infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] )
|
||||
iscsi? ( net-libs/libiscsi )
|
||||
jpeg? ( virtual/jpeg:0=[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
ncurses? (
|
||||
sys-libs/ncurses:0=[unicode]
|
||||
sys-libs/ncurses:0=[static-libs(+)]
|
||||
)
|
||||
nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] )
|
||||
numa? ( sys-process/numactl[static-libs(+)] )
|
||||
opengl? (
|
||||
virtual/opengl
|
||||
media-libs/libepoxy[static-libs(+)]
|
||||
media-libs/mesa[static-libs(+)]
|
||||
media-libs/mesa[egl,gbm]
|
||||
)
|
||||
png? ( media-libs/libpng:0=[static-libs(+)] )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||
sdl? (
|
||||
!sdl2? (
|
||||
media-libs/libsdl[X]
|
||||
>=media-libs/libsdl-1.2.11[static-libs(+)]
|
||||
)
|
||||
sdl2? (
|
||||
media-libs/libsdl2[X]
|
||||
media-libs/libsdl2[static-libs(+)]
|
||||
)
|
||||
)
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy:= )
|
||||
spice? (
|
||||
>=app-emulation/spice-protocol-0.12.3
|
||||
>=app-emulation/spice-0.12.0[static-libs(+)]
|
||||
)
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||
usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
|
||||
usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
|
||||
vde? ( net-misc/vde[static-libs(+)] )
|
||||
virgl? ( media-libs/virglrenderer[static-libs(+)] )
|
||||
virtfs? ( sys-libs/libcap )
|
||||
xen? ( app-emulation/xen-tools:= )
|
||||
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||
|
||||
X86_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/edk2-ovmf-2017_p20180211[binary]
|
||||
~sys-firmware/ipxe-1.0.0_p20180211[binary]
|
||||
~sys-firmware/seabios-1.11.0[binary,seavgabios]
|
||||
~sys-firmware/sgabios-0.1_pre8[binary]
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
sys-firmware/edk2-ovmf
|
||||
sys-firmware/ipxe
|
||||
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||
sys-firmware/sgabios
|
||||
)"
|
||||
PPC64_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-1.11.0[binary,seavgabios]
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||
)
|
||||
"
|
||||
|
||||
CDEPEND="
|
||||
!static? (
|
||||
${ALL_DEPEND//\[static-libs(+)]}
|
||||
${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]}
|
||||
)
|
||||
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_ppc64? ( ${PPC64_FIRMWARE_DEPEND} )
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-lang/perl
|
||||
=dev-lang/python-2*
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||
gtk? ( nls? ( sys-devel/gettext ) )
|
||||
static? (
|
||||
${ALL_DEPEND}
|
||||
${SOFTMMU_TOOLS_DEPEND}
|
||||
)
|
||||
static-user? ( ${ALL_DEPEND} )
|
||||
test? (
|
||||
dev-libs/glib[utils]
|
||||
sys-devel/bc
|
||||
)"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-qemu )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.5.0-cflags.patch
|
||||
"${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
|
||||
"${FILESDIR}"/${PN}-2.11.0-glibc-2.27.patch
|
||||
"${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
|
||||
"${WORKDIR}"/patches
|
||||
)
|
||||
|
||||
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||
|
||||
QA_PREBUILT="
|
||||
usr/share/qemu/openbios-ppc
|
||||
usr/share/qemu/openbios-sparc64
|
||||
usr/share/qemu/openbios-sparc32
|
||||
usr/share/qemu/palcode-clipper
|
||||
usr/share/qemu/s390-ccw.img
|
||||
usr/share/qemu/s390-netboot.img
|
||||
usr/share/qemu/u-boot.e500"
|
||||
|
||||
QA_WX_LOAD="usr/bin/qemu-i386
|
||||
usr/bin/qemu-x86_64
|
||||
usr/bin/qemu-alpha
|
||||
usr/bin/qemu-arm
|
||||
usr/bin/qemu-cris
|
||||
usr/bin/qemu-m68k
|
||||
usr/bin/qemu-microblaze
|
||||
usr/bin/qemu-microblazeel
|
||||
usr/bin/qemu-mips
|
||||
usr/bin/qemu-mipsel
|
||||
usr/bin/qemu-or1k
|
||||
usr/bin/qemu-ppc
|
||||
usr/bin/qemu-ppc64
|
||||
usr/bin/qemu-ppc64abi32
|
||||
usr/bin/qemu-sh4
|
||||
usr/bin/qemu-sh4eb
|
||||
usr/bin/qemu-sparc
|
||||
usr/bin/qemu-sparc64
|
||||
usr/bin/qemu-armeb
|
||||
usr/bin/qemu-sparc32plus
|
||||
usr/bin/qemu-s390x
|
||||
usr/bin/qemu-unicore32"
|
||||
|
||||
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the
|
||||
kernel module loaded before running kvm. The easiest way to ensure that the
|
||||
kernel module is loaded is to load it on boot.
|
||||
For AMD CPUs the module is called 'kvm-amd'.
|
||||
For Intel CPUs the module is called 'kvm-intel'.
|
||||
Please review /etc/conf.d/modules for how to load these.
|
||||
|
||||
Make sure your user is in the 'kvm' group. Just run
|
||||
$ gpasswd -a <USER> kvm
|
||||
then have <USER> re-login.
|
||||
|
||||
For brand new installs, the default permissions on /dev/kvm might not let
|
||||
you access it. You can tell udev to reset ownership/perms:
|
||||
$ udevadm trigger -c add /dev/kvm
|
||||
|
||||
If you want to register binfmt handlers for qemu user targets:
|
||||
For openrc:
|
||||
# rc-update add qemu-binfmt
|
||||
For systemd:
|
||||
# ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf"
|
||||
|
||||
pkg_pretend() {
|
||||
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||
elif use kernel_linux; then
|
||||
if ! linux_config_exists; then
|
||||
eerror "Unable to check your kernel for KVM support"
|
||||
else
|
||||
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||
ERROR_KVM_AMD+=" your kernel configuration."
|
||||
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||
ERROR_TUN+=" virtual network device if using -net tap."
|
||||
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||
ERROR_VHOST_NET+=" support"
|
||||
|
||||
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||
if grep -q AuthenticAMD /proc/cpuinfo; then
|
||||
CONFIG_CHECK+=" ~KVM_AMD"
|
||||
elif grep -q GenuineIntel /proc/cpuinfo; then
|
||||
CONFIG_CHECK+=" ~KVM_INTEL"
|
||||
fi
|
||||
fi
|
||||
|
||||
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||
|
||||
# Now do the actual checks setup above
|
||||
check_extra_config
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||
eerror "instances are still pointing to it. Please update your"
|
||||
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||
die "update your virt configs to not use qemu-kvm"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup kvm 78
|
||||
}
|
||||
|
||||
# Sanity check to make sure target lists are kept up-to-date.
|
||||
check_targets() {
|
||||
local var=$1 mak=$2
|
||||
local detected sorted
|
||||
|
||||
pushd "${S}"/default-configs >/dev/null || die
|
||||
|
||||
# Force C locale until glibc is updated. #564936
|
||||
detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "${var}: ${sorted}"
|
||||
eerror "$(printf '%-*s' ${#var} configure): ${detected}"
|
||||
die "sync ${var} to the list of targets"
|
||||
fi
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
handle_locales() {
|
||||
# Make sure locale list is kept up-to-date.
|
||||
local detected sorted
|
||||
detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "PLOCALES: ${sorted}"
|
||||
eerror " po/*.po: ${detected}"
|
||||
die "sync PLOCALES"
|
||||
fi
|
||||
|
||||
# Deal with selective install of locales.
|
||||
if use nls ; then
|
||||
# Delete locales the user does not want. #577814
|
||||
rm_loc() { rm po/$1.po || die; }
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
else
|
||||
# Cheap hack to disable gettext .mo generation.
|
||||
rm -f po/*.po
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
check_targets IUSE_SOFTMMU_TARGETS softmmu
|
||||
check_targets IUSE_USER_TARGETS linux-user
|
||||
|
||||
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||
sed -i -r \
|
||||
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||
Makefile Makefile.target || die
|
||||
|
||||
default
|
||||
|
||||
# Fix ld and objcopy being called directly
|
||||
tc-export AR LD OBJCOPY
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
# Run after we've applied all patches.
|
||||
handle_locales
|
||||
|
||||
# Remove bundled copy of libfdt
|
||||
rm -r dtc || die
|
||||
}
|
||||
|
||||
##
|
||||
# configures qemu based on the build directory and the build type
|
||||
# we are using.
|
||||
#
|
||||
qemu_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local buildtype=$1
|
||||
local builddir="${S}/${buildtype}-build"
|
||||
|
||||
mkdir "${builddir}"
|
||||
|
||||
local conf_opts=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--docdir=/usr/share/doc/${PF}/html
|
||||
--disable-bsd-user
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
--disable-werror
|
||||
# We support gnutls/nettle for crypto operations. It is possible
|
||||
# to use gcrypt when gnutls/nettle are disabled (but not when they
|
||||
# are enabled), but it's not really worth the hassle. Disable it
|
||||
# all the time to avoid automatically detecting it. #568856
|
||||
--disable-gcrypt
|
||||
--python="${PYTHON}"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
--host-cc="$(tc-getBUILD_CC)"
|
||||
$(use_enable debug debug-info)
|
||||
$(use_enable debug debug-tcg)
|
||||
--enable-docs
|
||||
$(use_enable tci tcg-interpreter)
|
||||
$(use_enable xattr attr)
|
||||
)
|
||||
|
||||
# Disable options not used by user targets. This simplifies building
|
||||
# static user targets (USE=static-user) considerably.
|
||||
conf_notuser() {
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
echo "--disable-${2:-$1}"
|
||||
else
|
||||
use_enable "$@"
|
||||
fi
|
||||
}
|
||||
conf_opts+=(
|
||||
$(conf_notuser accessibility brlapi)
|
||||
$(conf_notuser aio linux-aio)
|
||||
$(conf_notuser bzip2)
|
||||
$(conf_notuser bluetooth bluez)
|
||||
$(conf_notuser capstone)
|
||||
$(conf_notuser caps cap-ng)
|
||||
$(conf_notuser curl)
|
||||
$(conf_notuser fdt)
|
||||
$(conf_notuser glusterfs)
|
||||
$(conf_notuser gnutls)
|
||||
$(conf_notuser gnutls nettle)
|
||||
$(conf_notuser gtk)
|
||||
$(conf_notuser infiniband rdma)
|
||||
$(conf_notuser iscsi libiscsi)
|
||||
$(conf_notuser jpeg vnc-jpeg)
|
||||
$(conf_notuser kernel_linux kvm)
|
||||
$(conf_notuser lzo)
|
||||
$(conf_notuser ncurses curses)
|
||||
$(conf_notuser nfs libnfs)
|
||||
$(conf_notuser numa)
|
||||
$(conf_notuser opengl)
|
||||
$(conf_notuser png vnc-png)
|
||||
$(conf_notuser rbd)
|
||||
$(conf_notuser sasl vnc-sasl)
|
||||
$(conf_notuser sdl)
|
||||
$(conf_notuser seccomp)
|
||||
$(conf_notuser smartcard)
|
||||
$(conf_notuser snappy)
|
||||
$(conf_notuser spice)
|
||||
$(conf_notuser ssh libssh2)
|
||||
$(conf_notuser usb libusb)
|
||||
$(conf_notuser usbredir usb-redir)
|
||||
$(conf_notuser vde)
|
||||
$(conf_notuser vhost-net)
|
||||
$(conf_notuser virgl virglrenderer)
|
||||
$(conf_notuser virtfs)
|
||||
$(conf_notuser vnc)
|
||||
$(conf_notuser vte)
|
||||
$(conf_notuser xen)
|
||||
$(conf_notuser xen xen-pci-passthrough)
|
||||
$(conf_notuser xfs xfsctl)
|
||||
)
|
||||
|
||||
if [[ ! ${buildtype} == "user" ]] ; then
|
||||
# audio options
|
||||
local audio_opts="oss"
|
||||
use alsa && audio_opts="alsa,${audio_opts}"
|
||||
use sdl && audio_opts="sdl,${audio_opts}"
|
||||
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||
conf_opts+=(
|
||||
--audio-drv-list="${audio_opts}"
|
||||
)
|
||||
use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
|
||||
use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
|
||||
fi
|
||||
|
||||
case ${buildtype} in
|
||||
user)
|
||||
conf_opts+=(
|
||||
--enable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--disable-tools
|
||||
)
|
||||
local static_flag="static-user"
|
||||
;;
|
||||
softmmu)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--enable-system
|
||||
--disable-tools
|
||||
)
|
||||
local static_flag="static"
|
||||
;;
|
||||
tools)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--enable-tools
|
||||
)
|
||||
local static_flag="static"
|
||||
;;
|
||||
esac
|
||||
|
||||
local targets="${buildtype}_targets"
|
||||
[[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
|
||||
|
||||
# Add support for SystemTAP
|
||||
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||
|
||||
# We always want to attempt to build with PIE support as it results
|
||||
# in a more secure binary. But it doesn't work with static or if
|
||||
# the current GCC doesn't have PIE support.
|
||||
if use ${static_flag}; then
|
||||
conf_opts+=( --static --disable-pie )
|
||||
else
|
||||
tc-enables-pie && conf_opts+=( --enable-pie )
|
||||
fi
|
||||
|
||||
echo "../configure ${conf_opts[*]}"
|
||||
cd "${builddir}"
|
||||
../configure "${conf_opts[@]}" || die "configure failed"
|
||||
|
||||
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||
# host USB devices yet
|
||||
use kernel_FreeBSD && \
|
||||
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local target
|
||||
|
||||
python_setup
|
||||
|
||||
softmmu_targets= softmmu_bins=()
|
||||
user_targets= user_bins=()
|
||||
|
||||
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||
if use "qemu_softmmu_targets_${target}"; then
|
||||
softmmu_targets+=",${target}-softmmu"
|
||||
softmmu_bins+=( "qemu-system-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
for target in ${IUSE_USER_TARGETS} ; do
|
||||
if use "qemu_user_targets_${target}"; then
|
||||
user_targets+=",${target}-linux-user"
|
||||
user_bins+=( "qemu-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
softmmu_targets=${softmmu_targets#,}
|
||||
user_targets=${user_targets#,}
|
||||
|
||||
[[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
|
||||
[[ -n ${user_targets} ]] && qemu_src_configure "user"
|
||||
qemu_src_configure "tools"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
default
|
||||
fi
|
||||
|
||||
cd "${S}/tools-build"
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
pax-mark m */qemu-system-* #515550
|
||||
emake -j1 check
|
||||
emake -j1 check-report.html
|
||||
fi
|
||||
}
|
||||
|
||||
qemu_python_install() {
|
||||
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||
|
||||
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||
}
|
||||
|
||||
# Generate binfmt support files.
|
||||
# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
|
||||
# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
|
||||
generate_initd() {
|
||||
local out="${T}/qemu-binfmt"
|
||||
local out_systemd="${T}/qemu.conf"
|
||||
local d="${T}/binfmt.d"
|
||||
|
||||
einfo "Generating qemu binfmt scripts and configuration files"
|
||||
|
||||
# Generate the debian fragments first.
|
||||
mkdir -p "${d}"
|
||||
"${S}"/scripts/qemu-binfmt-conf.sh \
|
||||
--debian \
|
||||
--exportdir "${d}" \
|
||||
--qemu-path "${EPREFIX}/usr/bin" \
|
||||
|| die
|
||||
# Then turn the fragments into a shell script we can source.
|
||||
sed -E -i \
|
||||
-e 's:^([^ ]+) (.*)$:\1="\2":' \
|
||||
"${d}"/* || die
|
||||
|
||||
# Generate the init.d script by assembling the fragments from above.
|
||||
local f qcpu package interpreter magic mask
|
||||
cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die
|
||||
for f in "${d}"/qemu-* ; do
|
||||
source "${f}"
|
||||
|
||||
# Normalize the cpu logic like we do in the init.d for the native cpu.
|
||||
qcpu=${package#qemu-}
|
||||
case ${qcpu} in
|
||||
arm*) qcpu="arm";;
|
||||
mips*) qcpu="mips";;
|
||||
ppc*) qcpu="ppc";;
|
||||
s390*) qcpu="s390";;
|
||||
sh*) qcpu="sh";;
|
||||
sparc*) qcpu="sparc";;
|
||||
esac
|
||||
|
||||
cat <<EOF >>"${out}"
|
||||
if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then
|
||||
echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
EOF
|
||||
|
||||
echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
|
||||
|
||||
done
|
||||
cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Install binfmt handler init script for user targets.
|
||||
generate_initd
|
||||
doinitd "${T}/qemu-binfmt"
|
||||
|
||||
# Install binfmt/qemu.conf.
|
||||
insinto "/usr/share/qemu/binfmt.d"
|
||||
doins "${T}/qemu.conf"
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# This might not exist if the test failed. #512010
|
||||
[[ -e check-report.html ]] && dohtml check-report.html
|
||||
|
||||
if use kernel_linux; then
|
||||
udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl qemu_python_install
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${S}/tools-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||
pushd "${ED}"/usr/bin >/dev/null
|
||||
pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594
|
||||
popd >/dev/null
|
||||
|
||||
# Install config file example for qemu-bridge-helper
|
||||
insinto "/etc/qemu"
|
||||
doins "${FILESDIR}/bridge.conf"
|
||||
|
||||
cd "${S}"
|
||||
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||
newdoc pc-bios/README README.pc-bios
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||
rm "${ED}/usr/share/qemu/bios.bin"
|
||||
rm "${ED}/usr/share/qemu/bios-256k.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||
dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
|
||||
fi
|
||||
|
||||
# Remove vgabios since we're using the seavgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||
# PPC64 loads vgabios-stdvga
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc64; then
|
||||
dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
|
||||
dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||
dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||
dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||
dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin
|
||||
dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||
fi
|
||||
|
||||
# Remove sgabios since we're using the sgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||
fi
|
||||
|
||||
# Remove iPXE since we're using the iPXE packaged one
|
||||
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||
fi
|
||||
fi
|
||||
|
||||
DISABLE_AUTOFORMATTING=true
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
firmware_abi_change() {
|
||||
local pv
|
||||
for pv in ${REPLACING_VERSIONS}; do
|
||||
if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||
udev_reload
|
||||
fi
|
||||
|
||||
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||
|
||||
DISABLE_AUTOFORMATTING=true
|
||||
readme.gentoo_print_elog
|
||||
|
||||
if use pin-upstream-blobs && firmware_abi_change; then
|
||||
ewarn "This version of qemu pins new versions of firmware blobs:"
|
||||
ewarn " $(best_version sys-firmware/edk2-ovmf)"
|
||||
ewarn " $(best_version sys-firmware/ipxe)"
|
||||
ewarn " $(best_version sys-firmware/seabios)"
|
||||
ewarn " $(best_version sys-firmware/sgabios)"
|
||||
ewarn "This might break resume of hibernated guests (started with a different"
|
||||
ewarn "firmware version) and live migration to/from qemu versions with different"
|
||||
ewarn "firmware. Please (cold) restart all running guests. For functional"
|
||||
ewarn "guest migration ensure that all"
|
||||
ewarn "hosts run at least"
|
||||
ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_info() {
|
||||
echo "Using:"
|
||||
echo " $(best_version app-emulation/spice-protocol)"
|
||||
echo " $(best_version sys-firmware/edk2-ovmf)"
|
||||
if has_version 'sys-firmware/edk2-ovmf[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/ipxe)"
|
||||
echo " $(best_version sys-firmware/seabios)"
|
||||
if has_version 'sys-firmware/seabios[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/sgabios)"
|
||||
}
|
@ -1,801 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
|
||||
|
||||
FIRMWARE_ABI_VERSION="2.11.1-r50"
|
||||
|
||||
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||
user udev fcaps readme.gentoo-r1 pax-utils l10n
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||
inherit git-r3
|
||||
SRC_URI=""
|
||||
else
|
||||
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
IUSE="accessibility +aio alsa bluetooth bzip2 capstone +caps +curl debug
|
||||
+fdt glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux
|
||||
kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png
|
||||
pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy
|
||||
spice ssh static static-user systemtap tci test usb usbredir vde
|
||||
+vhost-net virgl virtfs +vnc vte xattr xen xfs"
|
||||
|
||||
COMMON_TARGETS="aarch64 alpha arm cris hppa i386 m68k microblaze microblazeel
|
||||
mips mips64 mips64el mipsel nios2 or1k ppc ppc64 riscv32 riscv64 s390x
|
||||
sh4 sh4eb sparc sparc64 x86_64 xtensa xtensaeb"
|
||||
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS}
|
||||
lm32 moxie ppcemb tricore unicore32"
|
||||
IUSE_USER_TARGETS="${COMMON_TARGETS}
|
||||
aarch64_be armeb mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus
|
||||
tilegx"
|
||||
|
||||
use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||
use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||
IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
|
||||
|
||||
# Allow no targets to be built so that people can get a tools-only build.
|
||||
# Block USE flag configurations known to not work.
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
gtk2? ( gtk )
|
||||
qemu_softmmu_targets_arm? ( fdt )
|
||||
qemu_softmmu_targets_microblaze? ( fdt )
|
||||
qemu_softmmu_targets_mips64el? ( fdt )
|
||||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
sdl2? ( sdl )
|
||||
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio !snappy )
|
||||
virtfs? ( xattr )
|
||||
vte? ( gtk )"
|
||||
|
||||
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||
# and user/softmmu targets (qemu-*, qemu-system-*).
|
||||
#
|
||||
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||
#
|
||||
# The attr lib isn't always linked in (although the USE flag is always
|
||||
# respected). This is because qemu supports using the C library's API
|
||||
# when available rather than always using the external library.
|
||||
ALL_DEPEND="
|
||||
>=dev-libs/glib-2.0[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||
|
||||
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||
# softmmu targets (qemu-system-*).
|
||||
SOFTMMU_TOOLS_DEPEND="
|
||||
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||
accessibility? (
|
||||
app-accessibility/brltty[api]
|
||||
app-accessibility/brltty[static-libs(+)]
|
||||
)
|
||||
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
bzip2? ( app-arch/bzip2[static-libs(+)] )
|
||||
capstone? ( dev-libs/capstone )
|
||||
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||
fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] )
|
||||
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||
gnutls? (
|
||||
dev-libs/nettle:=[static-libs(+)]
|
||||
>=net-libs/gnutls-3.0:=[static-libs(+)]
|
||||
)
|
||||
gtk? (
|
||||
gtk2? (
|
||||
x11-libs/gtk+:2
|
||||
vte? ( x11-libs/vte:0 )
|
||||
)
|
||||
!gtk2? (
|
||||
x11-libs/gtk+:3
|
||||
vte? ( x11-libs/vte:2.91 )
|
||||
)
|
||||
)
|
||||
infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] )
|
||||
iscsi? ( net-libs/libiscsi )
|
||||
jpeg? ( virtual/jpeg:0=[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
ncurses? (
|
||||
sys-libs/ncurses:0=[unicode]
|
||||
sys-libs/ncurses:0=[static-libs(+)]
|
||||
)
|
||||
nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] )
|
||||
numa? ( sys-process/numactl[static-libs(+)] )
|
||||
opengl? (
|
||||
virtual/opengl
|
||||
media-libs/libepoxy[static-libs(+)]
|
||||
media-libs/mesa[static-libs(+)]
|
||||
media-libs/mesa[egl,gbm]
|
||||
)
|
||||
png? ( media-libs/libpng:0=[static-libs(+)] )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||
sdl? (
|
||||
!sdl2? (
|
||||
media-libs/libsdl[X]
|
||||
>=media-libs/libsdl-1.2.11[static-libs(+)]
|
||||
)
|
||||
sdl2? (
|
||||
media-libs/libsdl2[X]
|
||||
media-libs/libsdl2[static-libs(+)]
|
||||
)
|
||||
)
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy )
|
||||
spice? (
|
||||
>=app-emulation/spice-protocol-0.12.3
|
||||
>=app-emulation/spice-0.12.0[static-libs(+)]
|
||||
)
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||
usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
|
||||
usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
|
||||
vde? ( net-misc/vde[static-libs(+)] )
|
||||
virgl? ( media-libs/virglrenderer[static-libs(+)] )
|
||||
virtfs? ( sys-libs/libcap )
|
||||
xen? ( app-emulation/xen-tools:= )
|
||||
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||
|
||||
X86_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/edk2-ovmf-2017_p20180211[binary]
|
||||
~sys-firmware/ipxe-1.0.0_p20180211[binary]
|
||||
~sys-firmware/seabios-1.11.0[binary,seavgabios]
|
||||
~sys-firmware/sgabios-0.1_pre8[binary]
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
sys-firmware/edk2-ovmf
|
||||
sys-firmware/ipxe
|
||||
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||
sys-firmware/sgabios
|
||||
)"
|
||||
PPC64_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-1.11.0[binary,seavgabios]
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||
)
|
||||
"
|
||||
|
||||
CDEPEND="
|
||||
!static? (
|
||||
${ALL_DEPEND//\[static-libs(+)]}
|
||||
${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]}
|
||||
)
|
||||
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_ppc64? ( ${PPC64_FIRMWARE_DEPEND} )
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-lang/perl
|
||||
=dev-lang/python-2*
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||
gtk? ( nls? ( sys-devel/gettext ) )
|
||||
static? (
|
||||
${ALL_DEPEND}
|
||||
${SOFTMMU_TOOLS_DEPEND}
|
||||
)
|
||||
static-user? ( ${ALL_DEPEND} )
|
||||
test? (
|
||||
dev-libs/glib[utils]
|
||||
sys-devel/bc
|
||||
)"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-qemu )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.5.0-cflags.patch
|
||||
"${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
|
||||
"${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
|
||||
)
|
||||
|
||||
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||
|
||||
QA_PREBUILT="
|
||||
usr/share/qemu/openbios-ppc
|
||||
usr/share/qemu/openbios-sparc64
|
||||
usr/share/qemu/openbios-sparc32
|
||||
usr/share/qemu/palcode-clipper
|
||||
usr/share/qemu/s390-ccw.img
|
||||
usr/share/qemu/s390-netboot.img
|
||||
usr/share/qemu/u-boot.e500"
|
||||
|
||||
QA_WX_LOAD="usr/bin/qemu-i386
|
||||
usr/bin/qemu-x86_64
|
||||
usr/bin/qemu-alpha
|
||||
usr/bin/qemu-arm
|
||||
usr/bin/qemu-cris
|
||||
usr/bin/qemu-m68k
|
||||
usr/bin/qemu-microblaze
|
||||
usr/bin/qemu-microblazeel
|
||||
usr/bin/qemu-mips
|
||||
usr/bin/qemu-mipsel
|
||||
usr/bin/qemu-or1k
|
||||
usr/bin/qemu-ppc
|
||||
usr/bin/qemu-ppc64
|
||||
usr/bin/qemu-ppc64abi32
|
||||
usr/bin/qemu-sh4
|
||||
usr/bin/qemu-sh4eb
|
||||
usr/bin/qemu-sparc
|
||||
usr/bin/qemu-sparc64
|
||||
usr/bin/qemu-armeb
|
||||
usr/bin/qemu-sparc32plus
|
||||
usr/bin/qemu-s390x
|
||||
usr/bin/qemu-unicore32"
|
||||
|
||||
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the
|
||||
kernel module loaded before running kvm. The easiest way to ensure that the
|
||||
kernel module is loaded is to load it on boot.
|
||||
For AMD CPUs the module is called 'kvm-amd'.
|
||||
For Intel CPUs the module is called 'kvm-intel'.
|
||||
Please review /etc/conf.d/modules for how to load these.
|
||||
|
||||
Make sure your user is in the 'kvm' group. Just run
|
||||
$ gpasswd -a <USER> kvm
|
||||
then have <USER> re-login.
|
||||
|
||||
For brand new installs, the default permissions on /dev/kvm might not let
|
||||
you access it. You can tell udev to reset ownership/perms:
|
||||
$ udevadm trigger -c add /dev/kvm
|
||||
|
||||
If you want to register binfmt handlers for qemu user targets:
|
||||
For openrc:
|
||||
# rc-update add qemu-binfmt
|
||||
For systemd:
|
||||
# ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf"
|
||||
|
||||
pkg_pretend() {
|
||||
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||
elif use kernel_linux; then
|
||||
if ! linux_config_exists; then
|
||||
eerror "Unable to check your kernel for KVM support"
|
||||
else
|
||||
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||
ERROR_KVM_AMD+=" your kernel configuration."
|
||||
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||
ERROR_TUN+=" virtual network device if using -net tap."
|
||||
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||
ERROR_VHOST_NET+=" support"
|
||||
|
||||
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||
if grep -q AuthenticAMD /proc/cpuinfo; then
|
||||
CONFIG_CHECK+=" ~KVM_AMD"
|
||||
elif grep -q GenuineIntel /proc/cpuinfo; then
|
||||
CONFIG_CHECK+=" ~KVM_INTEL"
|
||||
fi
|
||||
fi
|
||||
|
||||
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||
|
||||
# Now do the actual checks setup above
|
||||
check_extra_config
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||
eerror "instances are still pointing to it. Please update your"
|
||||
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||
die "update your virt configs to not use qemu-kvm"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup kvm 78
|
||||
}
|
||||
|
||||
# Sanity check to make sure target lists are kept up-to-date.
|
||||
check_targets() {
|
||||
local var=$1 mak=$2
|
||||
local detected sorted
|
||||
|
||||
pushd "${S}"/default-configs >/dev/null || die
|
||||
|
||||
# Force C locale until glibc is updated. #564936
|
||||
detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "${var}: ${sorted}"
|
||||
eerror "$(printf '%-*s' ${#var} configure): ${detected}"
|
||||
die "sync ${var} to the list of targets"
|
||||
fi
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
handle_locales() {
|
||||
# Make sure locale list is kept up-to-date.
|
||||
local detected sorted
|
||||
detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "PLOCALES: ${sorted}"
|
||||
eerror " po/*.po: ${detected}"
|
||||
die "sync PLOCALES"
|
||||
fi
|
||||
|
||||
# Deal with selective install of locales.
|
||||
if use nls ; then
|
||||
# Delete locales the user does not want. #577814
|
||||
rm_loc() { rm po/$1.po || die; }
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
else
|
||||
# Cheap hack to disable gettext .mo generation.
|
||||
rm -f po/*.po
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
check_targets IUSE_SOFTMMU_TARGETS softmmu
|
||||
check_targets IUSE_USER_TARGETS linux-user
|
||||
|
||||
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||
sed -i -r \
|
||||
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||
Makefile Makefile.target || die
|
||||
|
||||
default
|
||||
|
||||
# Fix ld and objcopy being called directly
|
||||
tc-export AR LD OBJCOPY
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
# Run after we've applied all patches.
|
||||
handle_locales
|
||||
|
||||
# Remove bundled copy of libfdt
|
||||
rm -r dtc || die
|
||||
}
|
||||
|
||||
##
|
||||
# configures qemu based on the build directory and the build type
|
||||
# we are using.
|
||||
#
|
||||
qemu_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local buildtype=$1
|
||||
local builddir="${S}/${buildtype}-build"
|
||||
|
||||
mkdir "${builddir}"
|
||||
|
||||
local conf_opts=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--docdir=/usr/share/doc/${PF}/html
|
||||
--disable-bsd-user
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
--disable-werror
|
||||
# We support gnutls/nettle for crypto operations. It is possible
|
||||
# to use gcrypt when gnutls/nettle are disabled (but not when they
|
||||
# are enabled), but it's not really worth the hassle. Disable it
|
||||
# all the time to avoid automatically detecting it. #568856
|
||||
--disable-gcrypt
|
||||
--python="${PYTHON}"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
--host-cc="$(tc-getBUILD_CC)"
|
||||
$(use_enable debug debug-info)
|
||||
$(use_enable debug debug-tcg)
|
||||
--enable-docs
|
||||
$(use_enable tci tcg-interpreter)
|
||||
$(use_enable xattr attr)
|
||||
)
|
||||
|
||||
# Disable options not used by user targets. This simplifies building
|
||||
# static user targets (USE=static-user) considerably.
|
||||
conf_notuser() {
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
echo "--disable-${2:-$1}"
|
||||
else
|
||||
use_enable "$@"
|
||||
fi
|
||||
}
|
||||
conf_opts+=(
|
||||
$(conf_notuser accessibility brlapi)
|
||||
$(conf_notuser aio linux-aio)
|
||||
$(conf_notuser bzip2)
|
||||
$(conf_notuser bluetooth bluez)
|
||||
$(conf_notuser capstone)
|
||||
$(conf_notuser caps cap-ng)
|
||||
$(conf_notuser curl)
|
||||
$(conf_notuser fdt)
|
||||
$(conf_notuser glusterfs)
|
||||
$(conf_notuser gnutls)
|
||||
$(conf_notuser gnutls nettle)
|
||||
$(conf_notuser gtk)
|
||||
$(conf_notuser infiniband rdma)
|
||||
$(conf_notuser iscsi libiscsi)
|
||||
$(conf_notuser jpeg vnc-jpeg)
|
||||
$(conf_notuser kernel_linux kvm)
|
||||
$(conf_notuser lzo)
|
||||
$(conf_notuser ncurses curses)
|
||||
$(conf_notuser nfs libnfs)
|
||||
$(conf_notuser numa)
|
||||
$(conf_notuser opengl)
|
||||
$(conf_notuser png vnc-png)
|
||||
$(conf_notuser rbd)
|
||||
$(conf_notuser sasl vnc-sasl)
|
||||
$(conf_notuser sdl)
|
||||
$(conf_notuser seccomp)
|
||||
$(conf_notuser smartcard)
|
||||
$(conf_notuser snappy)
|
||||
$(conf_notuser spice)
|
||||
$(conf_notuser ssh libssh2)
|
||||
$(conf_notuser usb libusb)
|
||||
$(conf_notuser usbredir usb-redir)
|
||||
$(conf_notuser vde)
|
||||
$(conf_notuser vhost-net)
|
||||
$(conf_notuser virgl virglrenderer)
|
||||
$(conf_notuser virtfs)
|
||||
$(conf_notuser vnc)
|
||||
$(conf_notuser vte)
|
||||
$(conf_notuser xen)
|
||||
$(conf_notuser xen xen-pci-passthrough)
|
||||
$(conf_notuser xfs xfsctl)
|
||||
)
|
||||
|
||||
if [[ ! ${buildtype} == "user" ]] ; then
|
||||
# audio options
|
||||
local audio_opts="oss"
|
||||
use alsa && audio_opts="alsa,${audio_opts}"
|
||||
use sdl && audio_opts="sdl,${audio_opts}"
|
||||
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||
conf_opts+=(
|
||||
--audio-drv-list="${audio_opts}"
|
||||
)
|
||||
use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
|
||||
use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
|
||||
fi
|
||||
|
||||
case ${buildtype} in
|
||||
user)
|
||||
conf_opts+=(
|
||||
--enable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--disable-tools
|
||||
)
|
||||
local static_flag="static-user"
|
||||
;;
|
||||
softmmu)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--enable-system
|
||||
--disable-tools
|
||||
)
|
||||
local static_flag="static"
|
||||
;;
|
||||
tools)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--enable-tools
|
||||
)
|
||||
local static_flag="static"
|
||||
;;
|
||||
esac
|
||||
|
||||
local targets="${buildtype}_targets"
|
||||
[[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
|
||||
|
||||
# Add support for SystemTAP
|
||||
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||
|
||||
# We always want to attempt to build with PIE support as it results
|
||||
# in a more secure binary. But it doesn't work with static or if
|
||||
# the current GCC doesn't have PIE support.
|
||||
if use ${static_flag}; then
|
||||
conf_opts+=( --static --disable-pie )
|
||||
else
|
||||
tc-enables-pie && conf_opts+=( --enable-pie )
|
||||
fi
|
||||
|
||||
echo "../configure ${conf_opts[*]}"
|
||||
cd "${builddir}"
|
||||
../configure "${conf_opts[@]}" || die "configure failed"
|
||||
|
||||
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||
# host USB devices yet
|
||||
use kernel_FreeBSD && \
|
||||
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local target
|
||||
|
||||
python_setup
|
||||
|
||||
softmmu_targets= softmmu_bins=()
|
||||
user_targets= user_bins=()
|
||||
|
||||
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||
if use "qemu_softmmu_targets_${target}"; then
|
||||
softmmu_targets+=",${target}-softmmu"
|
||||
softmmu_bins+=( "qemu-system-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
for target in ${IUSE_USER_TARGETS} ; do
|
||||
if use "qemu_user_targets_${target}"; then
|
||||
user_targets+=",${target}-linux-user"
|
||||
user_bins+=( "qemu-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
softmmu_targets=${softmmu_targets#,}
|
||||
user_targets=${user_targets#,}
|
||||
|
||||
[[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
|
||||
[[ -n ${user_targets} ]] && qemu_src_configure "user"
|
||||
qemu_src_configure "tools"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
default
|
||||
fi
|
||||
|
||||
cd "${S}/tools-build"
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
pax-mark m */qemu-system-* #515550
|
||||
emake -j1 check
|
||||
emake -j1 check-report.html
|
||||
fi
|
||||
}
|
||||
|
||||
qemu_python_install() {
|
||||
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||
|
||||
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||
}
|
||||
|
||||
# Generate binfmt support files.
|
||||
# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
|
||||
# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
|
||||
generate_initd() {
|
||||
local out="${T}/qemu-binfmt"
|
||||
local out_systemd="${T}/qemu.conf"
|
||||
local d="${T}/binfmt.d"
|
||||
|
||||
einfo "Generating qemu binfmt scripts and configuration files"
|
||||
|
||||
# Generate the debian fragments first.
|
||||
mkdir -p "${d}"
|
||||
"${S}"/scripts/qemu-binfmt-conf.sh \
|
||||
--debian \
|
||||
--exportdir "${d}" \
|
||||
--qemu-path "${EPREFIX}/usr/bin" \
|
||||
|| die
|
||||
# Then turn the fragments into a shell script we can source.
|
||||
sed -E -i \
|
||||
-e 's:^([^ ]+) (.*)$:\1="\2":' \
|
||||
"${d}"/* || die
|
||||
|
||||
# Generate the init.d script by assembling the fragments from above.
|
||||
local f qcpu package interpreter magic mask
|
||||
cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die
|
||||
for f in "${d}"/qemu-* ; do
|
||||
source "${f}"
|
||||
|
||||
# Normalize the cpu logic like we do in the init.d for the native cpu.
|
||||
qcpu=${package#qemu-}
|
||||
case ${qcpu} in
|
||||
arm*) qcpu="arm";;
|
||||
mips*) qcpu="mips";;
|
||||
ppc*) qcpu="ppc";;
|
||||
s390*) qcpu="s390";;
|
||||
sh*) qcpu="sh";;
|
||||
sparc*) qcpu="sparc";;
|
||||
esac
|
||||
|
||||
cat <<EOF >>"${out}"
|
||||
if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then
|
||||
echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
EOF
|
||||
|
||||
echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
|
||||
|
||||
done
|
||||
cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Install binfmt handler init script for user targets.
|
||||
generate_initd
|
||||
doinitd "${T}/qemu-binfmt"
|
||||
|
||||
# Install binfmt/qemu.conf.
|
||||
insinto "/usr/share/qemu/binfmt.d"
|
||||
doins "${T}/qemu.conf"
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# This might not exist if the test failed. #512010
|
||||
[[ -e check-report.html ]] && dohtml check-report.html
|
||||
|
||||
if use kernel_linux; then
|
||||
udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl qemu_python_install
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${S}/tools-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||
pushd "${ED}"/usr/bin >/dev/null
|
||||
pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594
|
||||
popd >/dev/null
|
||||
|
||||
# Install config file example for qemu-bridge-helper
|
||||
insinto "/etc/qemu"
|
||||
doins "${FILESDIR}/bridge.conf"
|
||||
|
||||
cd "${S}"
|
||||
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||
newdoc pc-bios/README README.pc-bios
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||
rm "${ED}/usr/share/qemu/bios.bin"
|
||||
rm "${ED}/usr/share/qemu/bios-256k.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||
dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
|
||||
fi
|
||||
|
||||
# Remove vgabios since we're using the seavgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||
# PPC64 loads vgabios-stdvga
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc64; then
|
||||
dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
|
||||
dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||
dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||
dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||
dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin
|
||||
dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||
fi
|
||||
|
||||
# Remove sgabios since we're using the sgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||
fi
|
||||
|
||||
# Remove iPXE since we're using the iPXE packaged one
|
||||
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||
fi
|
||||
fi
|
||||
|
||||
DISABLE_AUTOFORMATTING=true
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
firmware_abi_change() {
|
||||
local pv
|
||||
for pv in ${REPLACING_VERSIONS}; do
|
||||
if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||
udev_reload
|
||||
fi
|
||||
|
||||
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||
|
||||
DISABLE_AUTOFORMATTING=true
|
||||
readme.gentoo_print_elog
|
||||
|
||||
if use pin-upstream-blobs && firmware_abi_change; then
|
||||
ewarn "This version of qemu pins new versions of firmware blobs:"
|
||||
ewarn " $(best_version sys-firmware/edk2-ovmf)"
|
||||
ewarn " $(best_version sys-firmware/ipxe)"
|
||||
ewarn " $(best_version sys-firmware/seabios)"
|
||||
ewarn " $(best_version sys-firmware/sgabios)"
|
||||
ewarn "This might break resume of hibernated guests (started with a different"
|
||||
ewarn "firmware version) and live migration to/from qemu versions with different"
|
||||
ewarn "firmware. Please (cold) restart all running guests. For functional"
|
||||
ewarn "guest migration ensure that all"
|
||||
ewarn "hosts run at least"
|
||||
ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_info() {
|
||||
echo "Using:"
|
||||
echo " $(best_version app-emulation/spice-protocol)"
|
||||
echo " $(best_version sys-firmware/edk2-ovmf)"
|
||||
if has_version 'sys-firmware/edk2-ovmf[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/ipxe)"
|
||||
echo " $(best_version sys-firmware/seabios)"
|
||||
if has_version 'sys-firmware/seabios[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/sgabios)"
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
# ChangeLog for app-eselect/eselect-pinentry
|
||||
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-pinentry/ChangeLog,v 1.1 2015/03/31 16:54:08 ulm Exp $
|
||||
|
||||
31 Mar 2015; Ulrich Müller <ulm@gentoo.org> +eselect-pinentry-0.3.ebuild,
|
||||
+eselect-pinentry-0.4.ebuild, +files/eselect-pinentry-0.3,
|
||||
+files/pinentry.eselect-0.4, +metadata.xml:
|
||||
Move package from app-admin to app-eselect category.
|
||||
|
||||
20 Jan 2014; Mike Frysinger <vapier@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Add arm64 love.
|
||||
|
||||
05 Dec 2013; Michael Haubenwallner <haubi@gentoo.org>
|
||||
eselect-pinentry-0.4.ebuild:
|
||||
add ~ppc-aix keyword
|
||||
|
||||
07 Jul 2013; Agostino Sarubbo <ago@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Stable for x86, wrt bug #470286
|
||||
|
||||
30 Jun 2013; Agostino Sarubbo <ago@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Stable for s390, wrt bug #470286
|
||||
|
||||
29 Jun 2013; Agostino Sarubbo <ago@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Stable for ppc64, wrt bug #470286
|
||||
|
||||
29 Jun 2013; Agostino Sarubbo <ago@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Stable for ppc, wrt bug #470286
|
||||
|
||||
29 Jun 2013; Agostino Sarubbo <ago@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Stable for sparc, wrt bug #470286
|
||||
|
||||
26 Jun 2013; Agostino Sarubbo <ago@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Stable for ia64, wrt bug #470286
|
||||
|
||||
26 Jun 2013; Agostino Sarubbo <ago@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Stable for alpha, wrt bug #470286
|
||||
|
||||
09 Jun 2013; Agostino Sarubbo <ago@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Stable for sh, wrt bug #470286
|
||||
|
||||
09 Jun 2013; Markus Meier <maekke@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
arm stable, bug #470286
|
||||
|
||||
04 Jun 2013; Chema Alonso <nimiux@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Stable for amd64 wrt bug #470286
|
||||
|
||||
03 Jun 2013; Jeroen Roovers <jer@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Stable for HPPA (bug #470286).
|
||||
|
||||
19 Feb 2013; Zac Medico <zmedico@gentoo.org> eselect-pinentry-0.4.ebuild:
|
||||
Add ~arm-linux keyword.
|
||||
|
||||
*eselect-pinentry-0.4 (14 Jan 2013)
|
||||
|
||||
14 Jan 2013; Samuli Suominen <ssuominen@gentoo.org>
|
||||
+files/pinentry.eselect-0.4, +eselect-pinentry-0.4.ebuild:
|
||||
Version bump to use shared code from eselect-lib-bin-symlink by mgorny.
|
||||
|
||||
28 Nov 2012; Tim Harder <radhermit@gentoo.org> metadata.xml:
|
||||
Add to crypto herd.
|
||||
|
||||
25 Nov 2012; Sven Wegener <swegener@gentoo.org> metadata.xml:
|
||||
Move to maintainer-needed.
|
||||
|
||||
14 Sep 2012; Samuli Suominen <ssuominen@gentoo.org> metadata.xml:
|
||||
Copy metadata.xml from app-crypt/pinentry since you can't maintain one
|
||||
without another.
|
||||
|
||||
09 Sep 2012; Raúl Porcel <armin76@gentoo.org> eselect-pinentry-0.3.ebuild:
|
||||
alpha/ia64/s390/sh/sparc stable wrt #421593
|
||||
|
||||
17 Aug 2012; Anthony G. Basile <blueness@gentoo.org>
|
||||
eselect-pinentry-0.3.ebuild:
|
||||
Stable ppc ppc64, bug #421593
|
||||
|
||||
03 Jul 2012; Jeroen Roovers <jer@gentoo.org> eselect-pinentry-0.3.ebuild:
|
||||
Stable for HPPA (bug #421593).
|
||||
|
||||
25 Jun 2012; Markus Meier <maekke@gentoo.org> eselect-pinentry-0.3.ebuild:
|
||||
arm stable, bug #421593
|
||||
|
||||
19 Jun 2012; Agostino Sarubbo <ago@gentoo.org> eselect-pinentry-0.3.ebuild:
|
||||
Stable for amd64, wrt bug #421593
|
||||
|
||||
17 Jun 2012; Jeff Horelick <jdhore@gentoo.org> eselect-pinentry-0.3.ebuild:
|
||||
marked x86 per bug 421593
|
||||
|
||||
17 Jun 2012; Samuli Suominen <ssuominen@gentoo.org>
|
||||
-eselect-pinentry-0.1.ebuild, -eselect-pinentry-0.2.ebuild,
|
||||
-files/eselect-pinentry-0.1, -files/eselect-pinentry-0.2:
|
||||
old
|
||||
|
||||
09 May 2012; Alexis Ballier <aballier@gentoo.org>
|
||||
eselect-pinentry-0.3.ebuild:
|
||||
keyword ~amd64-fbsd
|
||||
|
||||
*eselect-pinentry-0.3 (21 Oct 2010)
|
||||
|
||||
21 Oct 2010; Samuli Suominen <ssuominen@gentoo.org>
|
||||
+files/eselect-pinentry-0.3, +eselect-pinentry-0.3.ebuild:
|
||||
Use EROOT instead of ROOT for prefix support.
|
||||
|
||||
*eselect-pinentry-0.2 (30 Sep 2010)
|
||||
|
||||
30 Sep 2010; Samuli Suominen <ssuominen@gentoo.org>
|
||||
+files/eselect-pinentry-0.2, +eselect-pinentry-0.2.ebuild:
|
||||
If no targets are found, remove the symlink and exit.
|
||||
|
||||
*eselect-pinentry-0.1 (30 Sep 2010)
|
||||
|
||||
30 Sep 2010; Samuli Suominen <ssuominen@gentoo.org>
|
||||
+files/eselect-pinentry-0.1, +eselect-pinentry-0.1.ebuild:
|
||||
Initial commit wrt #338691 by Michał Górny.
|
@ -1,23 +0,0 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
AUX eselect-pinentry-0.3 3465 SHA256 854367bc7bc9a377315a406632a30b25a22ffa9b7543042578fd522f270ce425 SHA512 757429cec97ab91781a3cc10ee1ded2718963cbc92dc14752b46aaac2054c7db2ff2861b966f132efe8b4fa4fe7d4561833bbbbedb961e067aacfdf47932ba27 WHIRLPOOL ea99694d0a5483614f60221c61fcb9e6170e14cf6069e3d48b751c9622fb6872827df572790ca7a5a06f5e20040d790377d05aba7740554816a6d16876883fd8
|
||||
AUX pinentry.eselect-0.4 441 SHA256 d61a081051de1c72d5aa5376b78a78e9e39c0cfa439e825e6002fa9905492800 SHA512 dc681dc0cbd9e98218463a1cd53a9bf246827596e3c092061e0069373badb0e966f5e91107fd3bc5cbe4e58b688fdd5d67f4f2bf9fdb50c51bcb94a235b98aa3 WHIRLPOOL 4b31b3eb2b810b775f560ed1344579ebef1dd2c91754b9667a6ab4e786d857dbc8fb0479ef2c446337e021586e8bda825aa606ab92f631829b4b6d86a18fdb12
|
||||
EBUILD eselect-pinentry-0.3.ebuild 795 SHA256 1b892149ce8d8ec1eada91dd1c4427b295383a023051efabbbd3790ed95c3be5 SHA512 0b849904560e8dcc57801a43362d3fac26560be8303a211ffb9607fd52c15bedf49c7a280508ea341819ceeb325c66a0114953be667d54bb48f091bada3d9022 WHIRLPOOL 31ff9c0fa44e683cc00b79afa36df440a825be51edffe34c28bada2c54907916c069e34e58278e276a5f8e33918526a37a0c1557e722b77a090060e51afa6493
|
||||
EBUILD eselect-pinentry-0.4.ebuild 832 SHA256 e56f46050870b0f35b95f37fd52ca5fa2e25f4d6c373ec1feb1ddd9a3a92b965 SHA512 36781fc29610e37c38d13594f80f511d83abd02d79f9e596c15d2f0769a34f482d729ad9fd2ed776ecbb8ac0e5d7abf38b037b6d9eda8d7b79b20d788196e3b3 WHIRLPOOL d96c766b2e2459d7bd60b68c02ccff49b2b5a373b2e9183f1a6be6f8658d3b93e92da9c3827f09234478a56af7575ee1402e4564240a6c19fed66739f0017eb5
|
||||
MISC ChangeLog 4163 SHA256 898445704533f36e6f95a8ac2c57b48701ad4b81bb9ac41c53573315f32a6fd4 SHA512 a992480db11f459ad096573b6abd0b59fbf13846370f1e5c4b32ec4de7bebd62e6674411b812f45244ad91f71d29264ef0e6bc905e841e592ab72c268472c93b WHIRLPOOL 14bd06552c6baa75b69f0fad59234f19644b7eba39ef7c4bc3b5def8cd0233a53d0f446bb018d4c024e915712239a411cfde41a2459a57eaa3fa3ecf4490c580
|
||||
MISC metadata.xml 159 SHA256 fabd15e2740a2a68e0bda738d0cd4300b133ff11239802afe7e60aa3862c9c03 SHA512 96a1f7f082adc57e52a1a32666e1206e68f8ff03c728fdb7666ff98c255905977491fc4dfc37bc8bdf5da0eb50cdc408adec357bbd75bd980bc90659cc157194 WHIRLPOOL 82fca1c4b75b090abdb0a4233c8e49fc43535ca6e470f725c1872653ea922b6693e9646bc3ee1fd6f1293ebedad661642cec13b2817fb5315268300f7675a751
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2
|
||||
|
||||
iQGcBAEBCAAGBQJVGtEzAAoJEJQzkH1pP7W4A34L/3twrSuUQlPlIFLCYSq488Oi
|
||||
jhqtw4vIib42XKoxzUm0+1QI2XvQaTSOZSLq+KhI9lmrcY0TSbQmHxfPK0/XIBZl
|
||||
2Ki6gkXSWTENUnqFP9pvw17mhhJq9gePqAbnIsrw85S7CHKdktseMT66X9HP8Wsc
|
||||
uSlrwRyQQvmpZ/VoJ448SLtsV+TGSTh6t1a0wI3Ap2B8btJ2o5ZymXkbmMUDM+ES
|
||||
OdesCkRQnMUWmSotQ0a4tX0l7tCYq2sl70TQheZtYgtDFhf7eScJvJx25ca6kxbU
|
||||
PLL7GeGZFTwnJW1Om+7gYcHXDUTv4VBlPqN79tgWj9wIHEg4VIu743nzFD8FeU20
|
||||
ZdkTkRIuYnIZwmtMGTEdd88vbvPBelr53MuZ7Oda/MscHQLoxeHhI/TemaWi0/0o
|
||||
fID9oZzhwDKrdkns2YeCAWliD339ioLkamgG2K+dtikgQPryF1nK9Fjc/SW4zB+p
|
||||
UPjYaHjY2VDivxgzBUGwC4lvnnFxD2tUOqU2F8POIQ==
|
||||
=JJaf
|
||||
-----END PGP SIGNATURE-----
|
@ -1,21 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-pinentry/eselect-pinentry-0.3.ebuild,v 1.1 2015/03/31 16:54:08 ulm Exp $
|
||||
|
||||
DESCRIPTION="Manage /usr/bin/pinentry symlink"
|
||||
HOMEPAGE="http://www.gentoo.org/"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="app-admin/eselect
|
||||
!<app-crypt/pinentry-0.8.0-r1"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/eselect/modules
|
||||
newins "${FILESDIR}"/${P} pinentry.eselect || die
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-pinentry/eselect-pinentry-0.4.ebuild,v 1.1 2015/03/31 16:54:08 ulm Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
DESCRIPTION="Manage /usr/bin/pinentry symlink"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/eselect/"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=app-eselect/eselect-lib-bin-symlink-0.1.1"
|
||||
|
||||
S=${FILESDIR}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/eselect/modules
|
||||
newins pinentry.eselect-${PV} pinentry.eselect
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
DESCRIPTION="Manage /usr/bin/pinentry symlink"
|
||||
HOMEPAGE="https://www.gentoo.org/proj/en/eselect/"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=app-eselect/eselect-lib-bin-symlink-0.1.1"
|
||||
|
||||
S="${FILESDIR}"
|
||||
|
||||
src_install() {
|
||||
default
|
||||
insinto /usr/share/eselect/modules
|
||||
newins pinentry.eselect-${PV} pinentry.eselect
|
||||
}
|
@ -1,147 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id: eselect-pinentry-0.3,v 1.1 2015/03/31 16:54:08 ulm Exp $
|
||||
|
||||
# Based on eselect-sh by Michał Górny
|
||||
|
||||
DESCRIPTION="Manage /usr/bin/pinentry symlink"
|
||||
MAINTAINER="ssuominen@gentoo.org"
|
||||
VERSION="0.2"
|
||||
|
||||
## Functions ##
|
||||
|
||||
# find a list of pinentry symlink targets, best first
|
||||
find_targets() {
|
||||
local t
|
||||
for t in \
|
||||
pinentry-qt \
|
||||
pinentry-gtk-2 \
|
||||
pinentry-qt4 \
|
||||
pinentry-curses \
|
||||
; do
|
||||
if [[ -x ${EROOT}/usr/bin/${t} ]]; then
|
||||
echo ${t}
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# set the pinentry symlink
|
||||
set_symlinks() {
|
||||
local target="${1}" targets
|
||||
|
||||
[[ ! -L ${EROOT}/usr/bin/pinentry && -e ${EROOT}/usr/bin/pinentry ]] && \
|
||||
die -q "/usr/bin/pinentry is not a symlink!"
|
||||
|
||||
if is_number "${target}" && [[ ${target} -ge 1 ]]; then
|
||||
targets=( $(find_targets) )
|
||||
|
||||
# If no targets are found, remove the symlink and exit
|
||||
if [[ -L ${EROOT}/usr/bin/pinentry && -z ${targets} ]]; then
|
||||
rm -f "${EROOT}"/usr/bin/pinentry
|
||||
return
|
||||
fi
|
||||
|
||||
target=${targets[target-1]}
|
||||
fi
|
||||
|
||||
if [[ -x ${EROOT}/usr/bin/${target} ]]; then
|
||||
local tmpf="${EROOT}"/usr/bin/pinentry.new
|
||||
# we could use 'ln -f' to directly replace the symlink
|
||||
# but 'mv' is an atomic operation so it should be more fault-proof
|
||||
|
||||
ln -s "${target}" "${tmpf}" || \
|
||||
die -q "Unable to create temporary symlink"
|
||||
if ! mv "${tmpf}" "${EROOT}"/usr/bin/pinentry; then
|
||||
rm -f "${tmpf}" # cleanup
|
||||
die -q "Unable to replace /usr/bin/pinentry symlink with ${target}"
|
||||
fi
|
||||
else
|
||||
die -q "Target '${target}' doesn't appear to be valid!"
|
||||
fi
|
||||
}
|
||||
|
||||
### show action ###
|
||||
|
||||
describe_show() {
|
||||
echo "Show the current pinentry implementation"
|
||||
}
|
||||
|
||||
do_show() {
|
||||
[[ -z ${@} ]] || die -q "Too many parameters"
|
||||
|
||||
write_list_start "Current pinentry implementation:"
|
||||
if [[ -L ${EROOT}/usr/bin/pinentry ]]; then
|
||||
write_kv_list_entry "$(basename $(readlink ${EROOT}/usr/bin/pinentry))" ""
|
||||
elif [[ -e ${EROOT}/usr/bin/pinentry ]]; then
|
||||
write_kv_list_entry "(not a symlink)" ""
|
||||
else
|
||||
write_kv_list_entry "(unset)" ""
|
||||
fi
|
||||
}
|
||||
|
||||
### list action ###
|
||||
|
||||
describe_list() {
|
||||
echo "List available pinentry implementations"
|
||||
}
|
||||
|
||||
do_list() {
|
||||
[[ -z ${@} ]] || die -q "Too many parameters"
|
||||
|
||||
local i targets
|
||||
targets=( $(find_targets) )
|
||||
if [[ -n ${targets[@]} ]]; then
|
||||
for (( i = 0; i < ${#targets[@]}; i++ )) ; do
|
||||
[[ ${targets[${i}]} == $(basename $(readlink ${EROOT}/usr/bin/pinentry)) ]] && \
|
||||
targets[${i}]="${targets[${i}]} $(highlight '*')"
|
||||
done
|
||||
write_list_start "Available pinentry implementations:"
|
||||
write_numbered_list "${targets[@]}"
|
||||
else
|
||||
write_kv_list_entry "(none found)" ""
|
||||
fi
|
||||
}
|
||||
|
||||
### set action ###
|
||||
|
||||
describe_set() {
|
||||
echo "Set a new pinentry implementation"
|
||||
}
|
||||
|
||||
describe_set_options() {
|
||||
echo "target : Target name or number (from 'list' action)"
|
||||
}
|
||||
|
||||
describe_set_parameters() {
|
||||
echo "<target>"
|
||||
}
|
||||
|
||||
do_set() {
|
||||
if [[ -z ${1} ]]; then
|
||||
die -q "Not enough parameters"
|
||||
elif [[ -n ${2} ]]; then
|
||||
die -q "Too many parameters"
|
||||
else
|
||||
set_symlinks "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
### update action ###
|
||||
|
||||
describe_update() {
|
||||
echo "Automatically update the pinentry implementation"
|
||||
}
|
||||
|
||||
describe_update_options() {
|
||||
echo "ifunset : Do not override existing implementation"
|
||||
}
|
||||
|
||||
do_update() {
|
||||
[[ -z ${1} || ( -z ${2} && ( ${1} == ifunset || ${1} == '--if-unset' ) ) ]] || \
|
||||
die -q "Usage error"
|
||||
|
||||
[[ ( ${1} == ifunset || ${1} == '--if-unset' ) && -L ${EROOT}/usr/bin/pinentry && -x ${EROOT}/usr/bin/pinentry ]] && \
|
||||
return
|
||||
|
||||
set_symlinks 1
|
||||
}
|
@ -1,13 +1,12 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id: pinentry.eselect-0.4,v 1.1 2015/03/31 16:54:08 ulm Exp $
|
||||
|
||||
DESCRIPTION="Manage /usr/bin/pinentry implementation"
|
||||
MAINTAINER="ssuominen@gentoo.org"
|
||||
VERSION="0.4"
|
||||
VERSION="0.7"
|
||||
|
||||
SYMLINK_PATH=/usr/bin/pinentry
|
||||
SYMLINK_TARGETS=( pinentry-qt pinentry-gtk-2 pinentry-qt4 pinentry-curses )
|
||||
SYMLINK_TARGETS=( pinentry-gnome3 pinentry-qt pinentry-gtk-2 pinentry-qt4 pinentry-curses pinentry-tty )
|
||||
SYMLINK_DESCRIPTION='pinentry binary'
|
||||
|
||||
inherit bin-symlink
|
@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>crypto</herd>
|
||||
<maintainer type="project">
|
||||
<email>crypto@gentoo.org</email>
|
||||
<name>Crypto</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
|
@ -1,16 +1,3 @@
|
||||
AUX bash-completion-2.1-escape-characters-r1.patch 1084 SHA256 b8e96b91f7d03e6e6de7e105dd8100206058b2ad44f09055521b4fab9befb245 SHA512 b7cb548024fbc68e87d781208a378299c399d2661121290c500d62cd66855acc02848710b44c363917c3c4923e063212a2b56c9b0c08deb71aba308d75939cab WHIRLPOOL c2697d7a54614692e8b40c3ca55554a25ccf34e5914a362ce9a256d783be3f4d398dd1d948b8b81130ed8662045177a824fdd5b8c7f0166872c33d4274eb4a9d
|
||||
AUX bash-completion-2.1-escape-characters.patch 1082 SHA256 cfa2ffac3da8dc110967464a6af0f029992192b8eff345756f8a0a11a871eb29 SHA512 1352c100ae7cb9d3683a33c8f3fe333a81d897faf16e6a76559c973f90f12d6e53a2998935d755b5518e1ed4912d079ed0bada3d4e97bb97d294ab2f8d58feae WHIRLPOOL 5f729a02426a080c171fa8e72993673e889ecb878db56b7d9fb0fbd2674ec815a2b2793ebc2e8bd3291a7fd458e2225fe9a135a210666e249cadea463aea272d
|
||||
DIST bash-completion-2.1_p20141224.tar.xz 257964 SHA256 a76ffdbc9f49f48e290f0e6f3d46060d51c770f91e25b35b014bc16fec76f517 SHA512 94649aad8dbf0f170422605a5f36c5cab61e45ce402a92f89a6eba3bd5d2e976087b35cd0a9b6d4d29ba608cee3bb27b692088c884b766447ee9eafa99c2814a WHIRLPOOL 0ea12dfc8f432ffed598aee65c7080de570ebe9783415c7ebe4bd5d152fc645a132fae3a28986c029d13a4b939e15053204d73ae9b207f4ad62b9c117bf59cba
|
||||
DIST bash-completion-2.3.tar.xz 272252 SHA256 b2e081af317f3da4fff3a332bfdbebeb5514ebc6c2d2a9cf781180acab15e8e9 SHA512 396c060fa39aa05866d26b573d6b9eebdb96e41a17ef723e95f8b01bbda32b0b83bf9e4d978a4f0a1c0590787ae797bb3b6417b95b877f8447037cb873ccf38a WHIRLPOOL fe5ebae1c77dfba504e8f79b130ba0bc80d882a045b980a23f4642e77dfb7bb79b529c1573b13fc0986f486c41696bb94fadef677e0cabfdffe7aeea6e8ff5c0
|
||||
DIST bash-completion-2.4.tar.xz 276148 SHA256 c0f76b5202fec9ef8ffba82f5605025ca003f27cfd7a85115f838ba5136890f6 SHA512 b852e0a38417dfc3754a91dae2d107f99a3c2970d835a4bbaa80f2a4db8d670bc3820ddc6ada26f68070f22fb4c1db7abe50ad489b1c0f8497b1e6e91be27627 WHIRLPOOL f38f148dcbca1ee47ec6fa33637ea0673c03816b607bd638605832fb76ec7fb5f24cba35cb559e8a5b06636b1ec0f225e420615b6721074fc405cb79b505b07b
|
||||
DIST bash-completion-2.5.tar.xz 276732 SHA256 b0b9540c65532825eca030f1241731383f89b2b65e80f3492c5dd2f0438c95cf SHA512 44ca2cbf38190c2bfa1e98021c1de36dbef0e55f9fe7840e83bd7f91b4c9afc92afa9bb03d53dbc6d9f9b468ac63ff1021a60e456fc239010010d75687eff3da WHIRLPOOL b488571aca9d8b027214c2964ec789ef616659a098a2bd65a921075d94a8014b51a802040535e44c7831b159a5094b6879935f726ee97409b575c36cd01dbc13
|
||||
DIST bashcomp-2.0.1.tar.bz2 4078 SHA256 142348b61b32fb3f1580ac90b684b1014d6d177f371baadb503340c507f9a992 SHA512 8ac8982f418a2d71dffcf027ffe0b7eefa3ee49413a726a8ee9e758975d8f86c687a64b55cd94e09b7936d1c6990285ddc90a3c2b1989af44322937c5c4fb8d7 WHIRLPOOL b6daa0a93282e9df73635cbdddde97c473fd22aa3baf035c3ffcb5966152e20b26d85979fe8a5ecf9128157422f3f60dc27c82c843b9a0e6e80b7de7da596250
|
||||
DIST bashcomp-2.0.2.tar.gz 3625 SHA256 6ede58bfbe99f0dca1eb9236492aa20a6755e5731526de56e15d1e2b220165c9 SHA512 46bc1bcc32263135f44be68569459a409250dd2c81c18190735f11e13a26508e9d3cb91d24a8fe7b21bdea678347873b7ac1b67d5e8c78c8444011f85dfdcdce WHIRLPOOL 4b6cb989235d5fed8fd9986c1419ab337df38384fe2b307fd78f08f8696f4a2328845ed4f27913a36e9a544e973690bc0dd2af73816e272c3faf27ff2eafa585
|
||||
EBUILD bash-completion-2.1_p20141224-r1.ebuild 2995 SHA256 d1c30de8d90fcd960a2a2919b30888c9c277138688371824e8585ffbb7cc7f5a SHA512 2fc900e06669e301612c7488d982396a843955c74911f400a4d47da5df2a53a464e8751ee18b9b5caf6d3ae5555191ca22681b1dbfede621b323a5f8ec01b869 WHIRLPOOL 02c6679fb1237372b7d039b41eea9de29c5eb28d74c4d88935c9d974b0d72b7b1749a6caa04db68e5903f6cbf2efa64b86b58c24be412e40bce9a6335504bf63
|
||||
EBUILD bash-completion-2.3-r2.ebuild 3219 SHA256 802e5ebc7fc23a6efcbf75b89f274dab2c0b31ea0cc4492d82bda5befdabb715 SHA512 0bf3de6b02f03162e1a575368da1b2b0c3a0dc0c60330907d79e86911b2099c714766630ab63e9746c5399020997a5b53ff0794ca6631c3a5a35764e251c59b2 WHIRLPOOL 76ac7dd678df77aac01c4e1733873351bf09a0ca4758c9330df21de0801e51c89ddd7ff66d17186c235b01a1e019e8964148aad842262d8c2cfa29a33e4208f4
|
||||
EBUILD bash-completion-2.4-r1.ebuild 3173 SHA256 09d54454ec4c629c21747d071a2c31e432289c207d96b3eebc8cc651ec2fef2a SHA512 5421a782dff1e908fdaafa97b58bcacdaa250ce6d0a701765506bd3384a5f32983bc86e4733336913462102c842b8168fb9e30450180820ce0c6239582467cce WHIRLPOOL b2d3d4d43181c63fa2c49358c6a5d47f310fd6cf578167180aa43eb49784bfa8f0852954460118a34001f00f585459ce975003fb8612931c2b312ab37f038d75
|
||||
EBUILD bash-completion-2.4.ebuild 3161 SHA256 6ce31c89554f2f58393d10ceb9210ba5ee9fd90bee28509b79a541964f9b70d2 SHA512 f10698650577d080d5af602a87f9b9e3c8204d602a188f439faf99bb782da4b798edfcdabd8c16fe032fd09d18503932b14f3baabb565a0781f86f209b7dde25 WHIRLPOOL 72e6e7b0c24aa70a70706351045a7fa98024ebe3190e713aca42f20ee47016057847333bea45990bdd3a71f96f6c42b04c2d74fa17aac5de308cc4f8f33e05ad
|
||||
EBUILD bash-completion-2.5.ebuild 3183 SHA256 2d5e15afb28616799eb7b6129f1c112009155685b7c15fe0dc8214820ae21ae0 SHA512 a3a790e199dfba8150c2f5abdc120e5c3b8b41814f996c034e432b4633b211f79eaf056a3622823b36ea0a259cb9ee3ce09210e3e631250fdd6cc315a2642e0a WHIRLPOOL 35e91efe36b01564a3e913980c5990ee5cd1dcf0f0826d360adc42dc3b3cd07ad011e348c6d3f380a450e351b006dbd847ee7b79469312502bdb4a10e5fce34e
|
||||
MISC ChangeLog 6192 SHA256 7aa78e4d3347e97e9a2676ad90b03dcfbf6bb185ce6f53050786420a7e58b42d SHA512 d689eca6fe0572923dbc618aa95d7a4b43a92654d6485ca14ae974581c3728dfeac45f139788b22b56d17ae86e063316e474f8ce10a7092e43abaad840579c2c WHIRLPOOL de6bc49d153a04b105d21a4de5def31dc028638190a4b51d66d241abaea7206d5704ddba15bef9a5f74acbce2a0b134d9bb38deacac896e9ab4efd16ccc22ddc
|
||||
MISC ChangeLog-2015 49155 SHA256 df2d7ecd84a601d6a713409dd0ea3f8c2dacadf9b2f637769c6e8787d66cee1d SHA512 31fec84312c20ff1612f57f1bac506937c128b13005246ba36eaa449c1aff7712cc3645952fb9eebf3a24483590010fb5a954d43f238f47cd759911830fe5205 WHIRLPOOL 1463d6fa3480fd139341ade021e1e70884dd72e5f22aa16cb74eb11c8c4b606014b0b4f6369db06fcc9c76e354016d196a2b206fb0681c5b71237aa37991c914
|
||||
MISC metadata.xml 1285 SHA256 efb4f76c8b2dfe1e809c94fd10aac8b3a4e3ada43ceb33f95193ba246a482529 SHA512 e935bab45ac355ca0a05df6f6f9aaf8e20ef73fa3ce4f2bde83b331cccaa7ae7756a6a62a075b148194b556da8f41f4cf2aa72f271958333d026913ddbfcc133 WHIRLPOOL 6e76587fa0d9e19603fb1bd27100c076ed00840f994bd2b73b9208f438503874dcdc02be6a9c986666cf6d00fb9068d6a6f6dbd1de7662e282be11652412ac83
|
||||
DIST bash-completion-2.4.tar.xz 276148 BLAKE2B 1ca38db1d1ad9f0bf7d1aa4e49cba1c82a6a575b05118099b609da12bf2e369637be907cba1d46e1e33fface482ebd7c63d70d56c948e45ef71725780ffb2171 SHA512 b852e0a38417dfc3754a91dae2d107f99a3c2970d835a4bbaa80f2a4db8d670bc3820ddc6ada26f68070f22fb4c1db7abe50ad489b1c0f8497b1e6e91be27627
|
||||
DIST bash-completion-2.7.tar.xz 280048 BLAKE2B 88b09f451fd4e14daf8e139951a4b65aaa9d9b1d86dceade388a726ac7f3caff2546597695c3f0cbd5dd64e20472d0cf3e98e0f367898b81d696d4ccb8f2fb73 SHA512 514709ad2e5f6bd4e20027c7049a1144c1854a37b653d5c11fad1cdf7a46d0e1afca725d6ce75d49691149e0de57be85747f704ac1c429ef4cea114bfbff8fcd
|
||||
DIST bashcomp-2.0.2.tar.gz 3625 BLAKE2B ebd835e23634e8a7491467ad66c53941763cea43bad75fe24982d3885be2d2ba132e5273a655fec34705224315d7a3f0248c030fb7685fc613ac4f489cde5bf5 SHA512 46bc1bcc32263135f44be68569459a409250dd2c81c18190735f11e13a26508e9d3cb91d24a8fe7b21bdea678347873b7ac1b67d5e8c78c8444011f85dfdcdce
|
||||
|
@ -1,94 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
BASHCOMP_P=bashcomp-2.0.1
|
||||
inherit versionator
|
||||
|
||||
DESCRIPTION="Programmable Completion for bash"
|
||||
HOMEPAGE="http://bash-completion.alioth.debian.org/"
|
||||
SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/${BASHCOMP_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=app-shells/bash-4.3_p30-r1
|
||||
sys-apps/miscfiles
|
||||
!app-eselect/eselect-bashcomp"
|
||||
DEPEND="app-arch/xz-utils"
|
||||
PDEPEND=">=app-shells/gentoo-bashcomp-20140911"
|
||||
|
||||
# Remove unwanted completions.
|
||||
STRIP_COMPLETIONS=(
|
||||
# Slackware package stuff, quite generic names cause collisions
|
||||
# (e.g. with sys-apps/pacman)
|
||||
explodepkg installpkg makepkg pkgtool removepkg upgradepkg
|
||||
|
||||
# Debian/Red Hat network stuff
|
||||
ifdown ifup ifstatus
|
||||
|
||||
# Installed in app-editors/vim-core
|
||||
xxd
|
||||
|
||||
# Now-dead symlinks to deprecated completions
|
||||
hd ncal
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/${BASHCOMP_P}/${P}"-*.patch
|
||||
# Bug 543100
|
||||
epatch "${FILESDIR}/${PN}-2.1-escape-characters.patch"
|
||||
}
|
||||
|
||||
src_test() { :; } # Skip testsuite because of interactive shell wrt #477066
|
||||
|
||||
src_install() {
|
||||
# work-around race conditions, bug #526996
|
||||
mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
|
||||
|
||||
emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
|
||||
|
||||
local file
|
||||
for file in "${STRIP_COMPLETIONS[@]}"; do
|
||||
rm "${ED}"/usr/share/bash-completion/completions/${file} || die
|
||||
done
|
||||
# remove deprecated completions (moved to other packages)
|
||||
rm "${ED}"/usr/share/bash-completion/completions/_* || die
|
||||
|
||||
dodoc AUTHORS CHANGES README
|
||||
|
||||
# install the eselect module
|
||||
insinto /usr/share/eselect/modules
|
||||
doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
|
||||
doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local v
|
||||
for v in ${REPLACING_VERSIONS}; do
|
||||
if ! version_is_at_least 2.1-r90 ${v}; then
|
||||
ewarn "For bash-completion autoloader to work, all completions need to"
|
||||
ewarn "be installed in /usr/share/bash-completion/completions. You may"
|
||||
ewarn "need to rebuild packages that installed completions in the old"
|
||||
ewarn "location. You can do this using:"
|
||||
ewarn
|
||||
ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +"
|
||||
ewarn
|
||||
ewarn "After the rebuild, you should remove the old setup symlinks:"
|
||||
ewarn
|
||||
ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete"
|
||||
fi
|
||||
done
|
||||
|
||||
if has_version 'app-shells/zsh'; then
|
||||
elog
|
||||
elog "If you are interested in using the provided bash completion functions with"
|
||||
elog "zsh, valuable tips on the effective use of bashcompinit are available:"
|
||||
elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
|
||||
elog
|
||||
fi
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
@ -13,7 +13,7 @@ SRC_URI="https://github.com/scop/bash-completion/releases/download/${PV}/${P}.ta
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=app-shells/bash-4.3_p30-r1
|
||||
|
@ -1,98 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
BASHCOMP_P=bashcomp-2.0.2
|
||||
inherit versionator
|
||||
|
||||
DESCRIPTION="Programmable Completion for bash"
|
||||
HOMEPAGE="https://github.com/scop/bash-completion"
|
||||
SRC_URI="https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
|
||||
https://bitbucket.org/mgorny/bashcomp2/downloads/${BASHCOMP_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=app-shells/bash-4.3_p30-r1
|
||||
sys-apps/miscfiles
|
||||
!app-eselect/eselect-bashcomp"
|
||||
DEPEND="app-arch/xz-utils"
|
||||
PDEPEND=">=app-shells/gentoo-bashcomp-20140911"
|
||||
|
||||
# Remove unwanted completions.
|
||||
STRIP_COMPLETIONS=(
|
||||
# Slackware package stuff, quite generic names cause collisions
|
||||
# (e.g. with sys-apps/pacman)
|
||||
explodepkg installpkg makepkg pkgtool removepkg upgradepkg
|
||||
|
||||
# Debian/Red Hat network stuff
|
||||
ifdown ifup ifstatus
|
||||
|
||||
# Installed in app-editors/vim-core
|
||||
xxd
|
||||
|
||||
# Now-dead symlinks to deprecated completions
|
||||
hd ncal
|
||||
|
||||
# Installed by sys-apps/util-linux-2.28
|
||||
mount umount mount.linux umount.linux
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
eapply "${WORKDIR}/${BASHCOMP_P}/${PN}"-2.1_p*.patch
|
||||
# Bug 543100
|
||||
eapply "${FILESDIR}/${PN}-2.1-escape-characters.patch"
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_test() { :; } # Skip testsuite because of interactive shell wrt #477066
|
||||
|
||||
src_install() {
|
||||
# work-around race conditions, bug #526996
|
||||
mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
|
||||
|
||||
emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
|
||||
|
||||
local file
|
||||
for file in "${STRIP_COMPLETIONS[@]}"; do
|
||||
rm "${ED}"/usr/share/bash-completion/completions/${file} || die
|
||||
done
|
||||
# remove deprecated completions (moved to other packages)
|
||||
rm "${ED}"/usr/share/bash-completion/completions/_* || die
|
||||
|
||||
dodoc AUTHORS CHANGES CONTRIBUTING.md README.md
|
||||
|
||||
# install the eselect module
|
||||
insinto /usr/share/eselect/modules
|
||||
doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
|
||||
doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local v
|
||||
for v in ${REPLACING_VERSIONS}; do
|
||||
if ! version_is_at_least 2.1-r90 ${v}; then
|
||||
ewarn "For bash-completion autoloader to work, all completions need to"
|
||||
ewarn "be installed in /usr/share/bash-completion/completions. You may"
|
||||
ewarn "need to rebuild packages that installed completions in the old"
|
||||
ewarn "location. You can do this using:"
|
||||
ewarn
|
||||
ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +"
|
||||
ewarn
|
||||
ewarn "After the rebuild, you should remove the old setup symlinks:"
|
||||
ewarn
|
||||
ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete"
|
||||
fi
|
||||
done
|
||||
|
||||
if has_version 'app-shells/zsh'; then
|
||||
elog
|
||||
elog "If you are interested in using the provided bash completion functions with"
|
||||
elog "zsh, valuable tips on the effective use of bashcompinit are available:"
|
||||
elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
|
||||
elog
|
||||
fi
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
@ -13,13 +13,23 @@ SRC_URI="https://github.com/scop/bash-completion/releases/download/${PV}/${P}.ta
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
|
||||
IUSE=""
|
||||
KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
|
||||
IUSE="test"
|
||||
# Multiple test failures, need to investigate the exact problem
|
||||
RESTRICT="test"
|
||||
|
||||
# completion collision with net-fs/mc
|
||||
RDEPEND=">=app-shells/bash-4.3_p30-r1
|
||||
sys-apps/miscfiles
|
||||
!app-eselect/eselect-bashcomp"
|
||||
DEPEND="app-arch/xz-utils"
|
||||
!app-eselect/eselect-bashcomp
|
||||
!!net-fs/mc"
|
||||
DEPEND="app-arch/xz-utils
|
||||
test? (
|
||||
${RDEPEND}
|
||||
app-misc/dtach
|
||||
dev-util/dejagnu
|
||||
dev-tcltk/tcllib
|
||||
)"
|
||||
PDEPEND=">=app-shells/gentoo-bashcomp-20140911"
|
||||
|
||||
# Remove unwanted completions.
|
||||
@ -39,6 +49,9 @@ STRIP_COMPLETIONS=(
|
||||
|
||||
# Installed by sys-apps/util-linux-2.28
|
||||
mount umount mount.linux umount.linux
|
||||
|
||||
# Installed by sys-apps/util-linux-2.31
|
||||
rfkill
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
@ -46,9 +59,31 @@ src_prepare() {
|
||||
# Bug 543100, update bug 601194
|
||||
eapply "${FILESDIR}/${PN}-2.1-escape-characters-r1.patch"
|
||||
eapply_user
|
||||
|
||||
# Remove implicit completions for vim.
|
||||
# https://bugs.gentoo.org/649986
|
||||
sed -i -e 's/vi vim gvim rvim view rview rgvim rgview gview//' \
|
||||
bash_completion || die
|
||||
rm test/completion/vi.exp || die
|
||||
}
|
||||
|
||||
src_test() { :; } # Skip testsuite because of interactive shell wrt #477066
|
||||
src_test() {
|
||||
# Tests need an interactive shell, #477066
|
||||
# idea stolen from:
|
||||
# http://pkgs.fedoraproject.org/cgit/rpms/bash-completion.git/tree/bash-completion.spec
|
||||
|
||||
# real-time output of the log ;-)
|
||||
touch "${T}/dtach-test.log" || die
|
||||
tail -f "${T}/dtach-test.log" &
|
||||
local tail_pid=${!}
|
||||
|
||||
nonfatal dtach -N "${T}/dtach.sock" \
|
||||
bash -c 'emake check &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out'
|
||||
|
||||
kill "${tail_pid}"
|
||||
[[ -f ${T}/dtach-test.out ]] || die "Unable to run tests"
|
||||
[[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# work-around race conditions, bug #526996
|
@ -1,25 +1,33 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
BASHCOMP_P=bashcomp-2.0.2
|
||||
inherit versionator
|
||||
EGIT_REPO_URI="https://github.com/scop/bash-completion"
|
||||
inherit autotools git-r3 versionator
|
||||
|
||||
DESCRIPTION="Programmable Completion for bash"
|
||||
HOMEPAGE="https://github.com/scop/bash-completion"
|
||||
SRC_URI="https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
|
||||
https://bitbucket.org/mgorny/bashcomp2/downloads/${BASHCOMP_P}.tar.gz"
|
||||
SRC_URI="https://bitbucket.org/mgorny/bashcomp2/downloads/${BASHCOMP_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
|
||||
IUSE=""
|
||||
KEYWORDS=""
|
||||
IUSE="test"
|
||||
|
||||
# completion collision with net-fs/mc
|
||||
RDEPEND=">=app-shells/bash-4.3_p30-r1
|
||||
sys-apps/miscfiles
|
||||
!app-eselect/eselect-bashcomp"
|
||||
DEPEND="app-arch/xz-utils"
|
||||
!app-eselect/eselect-bashcomp
|
||||
!!net-fs/mc"
|
||||
DEPEND="app-arch/xz-utils
|
||||
test? (
|
||||
${RDEPEND}
|
||||
app-misc/dtach
|
||||
dev-util/dejagnu
|
||||
dev-tcltk/tcllib
|
||||
)"
|
||||
PDEPEND=">=app-shells/gentoo-bashcomp-20140911"
|
||||
|
||||
# Remove unwanted completions.
|
||||
@ -37,21 +45,47 @@ STRIP_COMPLETIONS=(
|
||||
# Now-dead symlinks to deprecated completions
|
||||
hd ncal
|
||||
|
||||
# Installed by sys-apps/util-linux-2.28
|
||||
mount umount mount.linux umount.linux
|
||||
# Installed by sys-apps/util-linux-2.28 (and now deprecated)
|
||||
_mount _umount _mount.linux _umount.linux
|
||||
|
||||
# Dumb symlink to mplayer, removed upstream in git
|
||||
mpv
|
||||
# Deprecated in favor of sys-apps/util-linux-2.31
|
||||
_rfkill
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
git-r3_src_unpack
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
eapply "${WORKDIR}/${BASHCOMP_P}/${PN}"-2.1_p*.patch
|
||||
# Bug 543100
|
||||
eapply "${FILESDIR}/${PN}-2.1-escape-characters.patch"
|
||||
eapply_user
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_test() { :; } # Skip testsuite because of interactive shell wrt #477066
|
||||
src_test() {
|
||||
# Tests need an interactive shell, #477066
|
||||
# idea stolen from:
|
||||
# http://pkgs.fedoraproject.org/cgit/rpms/bash-completion.git/tree/bash-completion.spec
|
||||
|
||||
# real-time output of the log ;-)
|
||||
touch "${T}/dtach-test.log" || die
|
||||
tail -f "${T}/dtach-test.log" &
|
||||
local tail_pid=${!}
|
||||
|
||||
# override the default expect timeout and buffer size to avoid tests
|
||||
# failing randomly due to cold cache, busy system or just more output
|
||||
# than upstream anticipated (they run tests on pristine docker
|
||||
# installs of binary distros)
|
||||
nonfatal dtach -N "${T}/dtach.sock" \
|
||||
bash -c 'emake check RUNTESTFLAGS="OPT_TIMEOUT=300 OPT_BUFFER_SIZE=1000000" \
|
||||
&> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out'
|
||||
|
||||
kill "${tail_pid}"
|
||||
[[ -f ${T}/dtach-test.out ]] || die "Unable to run tests"
|
||||
[[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# work-around race conditions, bug #526996
|
||||
@ -61,7 +95,8 @@ src_install() {
|
||||
|
||||
local file
|
||||
for file in "${STRIP_COMPLETIONS[@]}"; do
|
||||
rm "${ED}"/usr/share/bash-completion/completions/${file} || die
|
||||
rm "${ED}"/usr/share/bash-completion/completions/${file} ||
|
||||
die "stripping ${file} failed"
|
||||
done
|
||||
# remove deprecated completions (moved to other packages)
|
||||
rm "${ED}"/usr/share/bash-completion/completions/_* || die
|
@ -1,27 +0,0 @@
|
||||
--- bash-completion-2.1/bash_completion.orig 2014-03-09 17:38:14 +0000
|
||||
+++ bash-completion-2.1/bash_completion 2014-03-13 23:26:44 +0000
|
||||
@@ -536,13 +536,23 @@
|
||||
# @param $2 Name of variable to return result to
|
||||
_quote_readline_by_ref()
|
||||
{
|
||||
- if [[ $1 == \'* ]]; then
|
||||
+ if [ -z "$1" ]; then
|
||||
+ # avoid quoting if empty
|
||||
+ printf -v $2 %s "$1"
|
||||
+ elif [[ $1 == \'* ]]; then
|
||||
# Leave out first character
|
||||
printf -v $2 %s "${1:1}"
|
||||
+ elif [[ $1 == ~* ]]; then
|
||||
+ # avoid escaping first ~
|
||||
+ printf -v $2 ~%q "${1:1}"
|
||||
else
|
||||
printf -v $2 %q "$1"
|
||||
fi
|
||||
|
||||
+ # Replace double escaping ( \\ ) by single ( \ )
|
||||
+ # This happens always when argument is already escaped at cmdline,
|
||||
+ # and passed to this function as e.g.: file\ with\ spaces
|
||||
+ [[ ${!2} == *\\* ]] && printf -v $2 %s "${1//\\\\/\\}"
|
||||
# If result becomes quoted like this: $'string', re-evaluate in order to
|
||||
# drop the additional quoting. See also: http://www.mail-archive.com/
|
||||
# bash-completion-devel@lists.alioth.debian.org/msg01942.html
|
@ -1,4 +1,4 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
@ -21,6 +21,7 @@
|
||||
most common Linux/UNIX commands, reducing the amount of typing sysadmins and
|
||||
programmers need to do on a daily basis.
|
||||
</longdescription>
|
||||
<stabilize-allarches/>
|
||||
<upstream>
|
||||
<remote-id type="bitbucket">mgorny/bashcomp2</remote-id>
|
||||
<remote-id type="github">scop/bash-completion</remote-id>
|
||||
|
@ -1,311 +0,0 @@
|
||||
# ChangeLog for dev-db/sqlite
|
||||
# Copyright 1999-2016 Gentoo Foundation; Distributed under the GPL v2
|
||||
# (auto-generated from git log)
|
||||
|
||||
*sqlite-3.8.10.2 (09 Aug 2015)
|
||||
*sqlite-3.8.10.1 (09 Aug 2015)
|
||||
*sqlite-2.8.16-r5 (09 Aug 2015)
|
||||
|
||||
09 Aug 2015; Robin H. Johnson <robbat2@gentoo.org> +files/maketcllib.sh,
|
||||
+files/sqlite-2.8.15-alignement-fix.patch, +files/sqlite-2.8.16-exit.patch,
|
||||
+files/sqlite-2.8.16-multilib.patch,
|
||||
+files/sqlite-3.8.1-autoconf-dlopen_check.patch,
|
||||
+files/sqlite-3.8.1-src-dlopen_check.patch,
|
||||
+files/sqlite-3.8.1-tests-icu-52.patch, +metadata.xml,
|
||||
+sqlite-2.8.16-r5.ebuild, +sqlite-3.8.10.1.ebuild, +sqlite-3.8.10.2.ebuild:
|
||||
proj/gentoo: Initial commit
|
||||
|
||||
This commit represents a new era for Gentoo:
|
||||
Storing the gentoo-x86 tree in Git, as converted from CVS.
|
||||
|
||||
This commit is the start of the NEW history.
|
||||
Any historical data is intended to be grafted onto this point.
|
||||
|
||||
Creation process:
|
||||
1. Take final CVS checkout snapshot
|
||||
2. Remove ALL ChangeLog* files
|
||||
3. Transform all Manifests to thin
|
||||
4. Remove empty Manifests
|
||||
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
|
||||
5.1. Do not touch files with -kb/-ko keyword flags.
|
||||
|
||||
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
||||
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration
|
||||
tests
|
||||
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this
|
||||
project
|
||||
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo
|
||||
developer, wrote Git features for the migration
|
||||
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve
|
||||
cvs2svn
|
||||
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
|
||||
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014
|
||||
work in migration
|
||||
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
|
||||
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on
|
||||
the bikeshed
|
||||
|
||||
24 Aug 2015; Justin Lecher <jlec@gentoo.org> metadata.xml:
|
||||
Use https by default
|
||||
|
||||
Convert all URLs for sites supporting encrypted connections from http to
|
||||
https
|
||||
|
||||
Signed-off-by: Justin Lecher <jlec@gentoo.org>
|
||||
|
||||
24 Aug 2015; Mike Gilbert <floppym@gentoo.org> metadata.xml:
|
||||
Revert DOCTYPE SYSTEM https changes in metadata.xml
|
||||
|
||||
repoman does not yet accept the https version.
|
||||
This partially reverts eaaface92ee81f30a6ac66fe7acbcc42c00dc450.
|
||||
|
||||
Bug: https://bugs.gentoo.org/552720
|
||||
|
||||
*sqlite-3.8.11.1 (25 Aug 2015)
|
||||
|
||||
25 Aug 2015; Mike Gilbert <floppym@gentoo.org> +sqlite-3.8.11.1.ebuild:
|
||||
Version bump.
|
||||
|
||||
25 Aug 2015; Mike Gilbert <floppym@gentoo.org> sqlite-3.8.11.1.ebuild:
|
||||
Downgrade accidental stable keywords
|
||||
|
||||
Package-Manager: portage-2.2.20_p40
|
||||
|
||||
*sqlite-3.9.1 (21 Oct 2015)
|
||||
|
||||
21 Oct 2015; Mike Gilbert <floppym@gentoo.org> +sqlite-3.9.1.ebuild:
|
||||
Version bump.
|
||||
|
||||
23 Oct 2015; Mike Gilbert <floppym@gentoo.org> sqlite-3.9.1.ebuild:
|
||||
Fix building with USE="-tcl -test tools".
|
||||
|
||||
*sqlite-3.9.2 (03 Nov 2015)
|
||||
|
||||
03 Nov 2015; Mike Gilbert <floppym@gentoo.org> +sqlite-3.9.2.ebuild:
|
||||
Version bump.
|
||||
|
||||
14 Dec 2015; Agostino Sarubbo <ago@gentoo.org> sqlite-3.9.2.ebuild:
|
||||
amd64 stable wrt bug #567998
|
||||
|
||||
Package-Manager: portage-2.2.24
|
||||
RepoMan-Options: --include-arches="amd64"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
19 Dec 2015; Markus Meier <maekke@gentoo.org> sqlite-3.9.2.ebuild:
|
||||
arm stable, bug #567998
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --include-arches="arm"
|
||||
|
||||
20 Dec 2015; Jeroen Roovers <jer@gentoo.org> sqlite-3.9.2.ebuild:
|
||||
Stable for HPPA PPC64 (bug #567998).
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --ignore-arches
|
||||
|
||||
25 Dec 2015; Agostino Sarubbo <ago@gentoo.org> sqlite-3.9.2.ebuild:
|
||||
x86 stable wrt bug #567998
|
||||
|
||||
Package-Manager: portage-2.2.24
|
||||
RepoMan-Options: --include-arches="x86"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
26 Dec 2015; Agostino Sarubbo <ago@gentoo.org> sqlite-3.9.2.ebuild:
|
||||
ppc stable wrt bug #567998
|
||||
|
||||
Package-Manager: portage-2.2.24
|
||||
RepoMan-Options: --include-arches="ppc"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
27 Dec 2015; Mikle Kolyada <zlogene@gentoo.org> sqlite-3.9.2.ebuild:
|
||||
sparc stable wrt bug #567998
|
||||
|
||||
Package-Manager: portage-2.2.24
|
||||
|
||||
*sqlite-3.10.0 (09 Jan 2016)
|
||||
|
||||
09 Jan 2016; Ian Delaney <idella4@gentoo.org> +sqlite-3.10.0.ebuild:
|
||||
Version bump.
|
||||
|
||||
10 Jan 2016; Agostino Sarubbo <ago@gentoo.org> sqlite-3.9.2.ebuild:
|
||||
alpha stable wrt bug #567998
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --include-arches="alpha"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
11 Jan 2016; Agostino Sarubbo <ago@gentoo.org> sqlite-3.9.2.ebuild:
|
||||
ia64 stable wrt bug #567998
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --include-arches="ia64"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
24 Jan 2016; Michał Górny <mgorny@gentoo.org> metadata.xml:
|
||||
Replace all herds with appropriate projects (GLEP 67)
|
||||
|
||||
Replace all uses of herd with appropriate project maintainers, or no
|
||||
maintainers in case of herds requested to be disbanded.
|
||||
|
||||
24 Jan 2016; Michał Górny <mgorny@gentoo.org> metadata.xml:
|
||||
Set appropriate maintainer types in metadata.xml (GLEP 67)
|
||||
|
||||
*sqlite-3.10.2 (01 Feb 2016)
|
||||
|
||||
01 Feb 2016; Mike Gilbert <floppym@gentoo.org> +sqlite-3.10.2.ebuild:
|
||||
Version bump.
|
||||
|
||||
20 Feb 2016; Pacho Ramos <pacho@gentoo.org>
|
||||
-files/sqlite-2.8.15-alignement-fix.patch, -files/sqlite-2.8.16-exit.patch,
|
||||
-files/sqlite-2.8.16-multilib.patch, -sqlite-2.8.16-r5.ebuild:
|
||||
Drop masked for removal version (#249418)
|
||||
|
||||
Package-Manager: portage-2.2.27
|
||||
|
||||
*sqlite-3.11.0 (03 Mar 2016)
|
||||
|
||||
03 Mar 2016; Mike Gilbert <floppym@gentoo.org> +files/sqlite-3.11.0-full_tar
|
||||
ball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch,
|
||||
+files/sqlite-3.11.0-full_tarball-build.patch, +files/sqlite-3.11.0-nonfull_
|
||||
tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch,
|
||||
+files/sqlite-3.11.0-nonfull_tarball-build.patch, +sqlite-3.11.0.ebuild:
|
||||
Version bump (3.11.0).
|
||||
|
||||
Link executables against libsqlite3.so instead of statically including code
|
||||
from sqlite3.c.
|
||||
Backport SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER from 3.12.0.
|
||||
|
||||
*sqlite-3.11.1 (04 Mar 2016)
|
||||
|
||||
04 Mar 2016; Mike Gilbert <floppym@gentoo.org> +sqlite-3.11.1.ebuild:
|
||||
Version bump (3.11.1).
|
||||
|
||||
06 Mar 2016; Jeroen Roovers <jer@gentoo.org> sqlite-3.11.1.ebuild:
|
||||
Stable for PPC64 (bug #574420).
|
||||
|
||||
Package-Manager: portage-2.2.27
|
||||
RepoMan-Options: --ignore-arches
|
||||
|
||||
06 Mar 2016; Agostino Sarubbo <ago@gentoo.org> sqlite-3.11.1.ebuild:
|
||||
amd64 stable wrt bug #574420
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --include-arches="amd64"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
06 Mar 2016; Jeroen Roovers <jer@gentoo.org> sqlite-3.11.1.ebuild:
|
||||
Stable for HPPA (bug #574420).
|
||||
|
||||
Package-Manager: portage-2.2.27
|
||||
RepoMan-Options: --ignore-arches
|
||||
|
||||
12 Mar 2016; Markus Meier <maekke@gentoo.org> sqlite-3.11.1.ebuild:
|
||||
arm stable, bug #574420
|
||||
|
||||
Package-Manager: portage-2.2.27
|
||||
RepoMan-Options: --include-arches="arm"
|
||||
|
||||
15 Mar 2016; Agostino Sarubbo <ago@gentoo.org> sqlite-3.11.1.ebuild:
|
||||
x86 stable wrt bug #574420
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --include-arches="x86"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
15 Mar 2016; Tobias Klausmann <klausman@gentoo.org> sqlite-3.11.1.ebuild:
|
||||
3.11.1-r0: add alpha keyword
|
||||
|
||||
Gentoo-Bug: 574420
|
||||
|
||||
Package-Manager: portage-2.2.28
|
||||
|
||||
16 Mar 2016; Agostino Sarubbo <ago@gentoo.org> sqlite-3.11.1.ebuild:
|
||||
ppc stable wrt bug #574420
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --include-arches="ppc"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
19 Mar 2016; Agostino Sarubbo <ago@gentoo.org> sqlite-3.11.1.ebuild:
|
||||
sparc stable wrt bug #574420
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --include-arches="sparc"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
20 Mar 2016; Agostino Sarubbo <ago@gentoo.org> sqlite-3.11.1.ebuild:
|
||||
ia64 stable wrt bug #574420
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --include-arches="ia64"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
31 Mar 2016; Steev Klimaszewski <steev@gentoo.org> sqlite-3.11.1.ebuild:
|
||||
Stabilize arm64 wrt bug #574420
|
||||
|
||||
Package-Manager: portage-2.2.28
|
||||
|
||||
*sqlite-3.12.0 (02 Apr 2016)
|
||||
|
||||
02 Apr 2016; Mike Gilbert <floppym@gentoo.org>
|
||||
+files/sqlite-3.12.0-nonfull_tarball-build.patch, +sqlite-3.12.0.ebuild:
|
||||
Version bump (3.12.0).
|
||||
|
||||
04 Apr 2016; Jeroen Roovers <jer@gentoo.org> sqlite-3.12.0.ebuild:
|
||||
Stable for HPPA PPC64 (bug #578940).
|
||||
|
||||
Package-Manager: portage-2.2.28
|
||||
RepoMan-Options: --ignore-arches
|
||||
|
||||
08 Apr 2016; Agostino Sarubbo <ago@gentoo.org> sqlite-3.12.0.ebuild:
|
||||
amd64 stable wrt bug #578940
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --include-arches="amd64"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
*sqlite-3.12.1 (09 Apr 2016)
|
||||
|
||||
09 Apr 2016; Mike Gilbert <floppym@gentoo.org> +sqlite-3.12.1.ebuild:
|
||||
Version bump (3.12.1).
|
||||
|
||||
11 Apr 2016; Agostino Sarubbo <ago@gentoo.org> sqlite-3.12.0.ebuild:
|
||||
x86 stable wrt bug #578940
|
||||
|
||||
Package-Manager: portage-2.2.26
|
||||
RepoMan-Options: --include-arches="x86"
|
||||
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
|
||||
|
||||
19 Apr 2016; Markus Meier <maekke@gentoo.org> sqlite-3.12.0.ebuild:
|
||||
arm stable, bug #578940
|
||||
|
||||
Package-Manager: portage-2.2.28
|
||||
RepoMan-Options: --include-arches="arm"
|
||||
|
||||
*sqlite-3.12.2 (20 Apr 2016)
|
||||
|
||||
20 Apr 2016; Mike Gilbert <floppym@gentoo.org> +sqlite-3.12.2.ebuild:
|
||||
Version bump (3.12.2).
|
||||
|
||||
28 Apr 2016; Mike Gilbert <floppym@gentoo.org> -files/maketcllib.sh,
|
||||
-files/sqlite-3.8.1-autoconf-dlopen_check.patch,
|
||||
-files/sqlite-3.8.1-src-dlopen_check.patch,
|
||||
-files/sqlite-3.8.1-tests-icu-52.patch, -sqlite-3.8.10.1.ebuild,
|
||||
-sqlite-3.8.10.2.ebuild, -sqlite-3.8.11.1.ebuild, -sqlite-3.9.1.ebuild,
|
||||
-sqlite-3.9.2.ebuild, -sqlite-3.10.0.ebuild, -sqlite-3.10.2.ebuild,
|
||||
-sqlite-3.11.0.ebuild:
|
||||
Delete old versions.
|
||||
|
||||
20 May 2016; Tobias Klausmann <klausman@gentoo.org> sqlite-3.12.0.ebuild:
|
||||
3.12.0-r0: add alpha keyword
|
||||
|
||||
Gentoo-Bug: 578940
|
||||
|
||||
Package-Manager: portage-2.3.0_rc1
|
||||
|
||||
*sqlite-3.13.0 (30 May 2016)
|
||||
|
||||
30 May 2016; Mike Gilbert <floppym@gentoo.org>
|
||||
+files/sqlite-3.13.0-full_tarball-build.patch, +sqlite-3.13.0.ebuild:
|
||||
Version bump (3.13.0).
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,29 +1,12 @@
|
||||
AUX sqlite-3.11.0-full_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch 14405 SHA256 ddce4fdc675e54a0a8a0537a315876cb881e5ae1f0c0193cea28f09b10bc7954 SHA512 4586762f41c6eeca64621e53a7369b9258a88880e52db2e8a98f02f46fe5db5d93cf3104ff8e2c99880c633bba2ce59bcb30552091efb34f6eb19f078fe3eedd WHIRLPOOL b95894b95a0f68378e61d59817de9709dc929f04625ff39a838dbeda57a07ddb636ac614b46e1c22bb0f071440a04c51b98a38d38d93b1d167022be3ee4d0080
|
||||
AUX sqlite-3.11.0-full_tarball-build.patch 4933 SHA256 9b76ab242a0486a94f9efeac6f6cab3364c4a5bd47c2b51be098d5db53015118 SHA512 303c419cbcff868249ae4691865f04b732faf0df09d49102ee35fd37df085a5a0e9e4e7ce7c856bb80af3177670ba0bac08ded1244dd452883ac32dab4727877 WHIRLPOOL 5abb65e9255b643af210fbd79d0f414b6393a026252f3faa4d12f40cf238295dfee3e922635879271916a7e817b8330fb459ea8c225dc13a9812d3161a6f5742
|
||||
AUX sqlite-3.11.0-nonfull_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch 8426 SHA256 097b2714ddddc7af74ecb8baa68ac1f7b18b73539aaab5315d1fcba52a6c222e SHA512 0ae94f82b016035b2ec415ab271701b7f48e21f0749c1f98dcf1e86f8fba6c5551121fa70791a8c0b1156dccbcf160f05d4f5e0003f53bc820ceff91eb9745f8 WHIRLPOOL b8eb1ccc0cbdf32bf572348aa93119f194b549d9b60d1a9aaf8e91b727bcd53d520247e2f3126c1acb5621338a9f35b32d0695e080a354cfc5a6dde29e181db9
|
||||
AUX sqlite-3.11.0-nonfull_tarball-build.patch 1325 SHA256 080dc8d6b7bc465326215bfa08592d5b5bdb7793c095141efa992de4d687f0d3 SHA512 07ef0eacb494a3bcec81cf6a10e86d7bb88b18807226efdffb35f28cd95032b92851db14fc8a1f465312201a866e5d4e1af02f863e89a16b718c6352680036b9 WHIRLPOOL 8bc0bef6f4ebd714ec4ce12660a956fc106f4f25d5514cc578114a4ac64d011ecd7e4597eb93793c79621e03c18a9f70e11c62c26c496eee4a4bdfe23ba9f813
|
||||
AUX sqlite-3.12.0-nonfull_tarball-build.patch 403 SHA256 8cc4b6d013c432fe59f4ee10f3b98a2c8ba3471a44f68c92e555e4884b9fe2ce SHA512 6c82a7be2d5f6e898469d8aed78470773617b9d77a9d491454e4b7b29abd6b29bb2854b96318f98eb71215deaa9bc7d753ac57cb52f73cf0aec12a23afdc8294 WHIRLPOOL 94dbe52c9cee7a07df5a647c95044fc3b356b2d2bfbbd0cc0566a31363e26f2990e0eb2ffaacaaf8922d5db4bc1268dba153860cf5f8d79b75ce9c5db3fa37de
|
||||
AUX sqlite-3.13.0-full_tarball-build.patch 5192 SHA256 76841d686bb96fbc68ac6fcc773bcf02ad432c900d18c3a4dcd8b5df396dddd1 SHA512 95d421b92cfee4772fea26f699b92a6cafdcbe087370d003960c14f75a714b23d24b15a9c8e31552d224fdaef89d871464519077b211b89e8b97bc1fb53c5428 WHIRLPOOL 8b5c5878c5690ae367f39032dba7cb9a38eb6e446e60f1db74b0272b29003ffaccde872dbec418a6a5fbcced1bc965ce2130b5da78f7151efa9d7a0f574e7e58
|
||||
DIST sqlite-autoconf-3110100.tar.gz 2359545 SHA256 533ff1d0271c2e666f01591271cef01a31648563affa0c95e80ef735077d4377 SHA512 c3efd2693e6a9526a2901d9879982a421e81e7e979aef65a160e71b255339344079a1943395480d5c37a1acc6243a8d45f45fa688f7e996774da38a3a99e71a1 WHIRLPOOL b8062e2030dffd8b44cc0eba32c93312b8ae20064004c460321a4251806037fe62ec5ef83499e491cb248786b9302f0495de0c0624128d0063cbff71b77b8864
|
||||
DIST sqlite-autoconf-3120000.tar.gz 2374101 SHA256 53ecdbb5287af673eca3710c5f6c2305e73bb2d034f2a28770bea2be92ed269e SHA512 84a9107ca9045ddc724d7e37dfe2b1dc00a106769260c7bd429a95beedc46a906985b65e0b2bf597de23dd56d132b9ef6888a8c4e5f8a731c8a5c026b971d89e WHIRLPOOL 4ec76b383670f2ee9c50870587696a3c86357161344851b487f54a03c668dac8c4272738b44e5a4048dd00bf2b3122904c53b6d2195f9b48aef3ad928f34b85b
|
||||
DIST sqlite-autoconf-3120100.tar.gz 2374576 SHA256 1c038519862b3983b0475f3ed3143ce4bbfcd21bfbd0741192f415838c831a7c SHA512 eb0b892bb6a1783df9b712d5f78c9f5fb5aa8ff1b1735fd2806e96b1c04e2a5f87b2e47469185195611a5cf6c446ec32935e9ae0b01734383a8fefc1bcaf5842 WHIRLPOOL 0284241a3fd6dbee16ba5fe4c1a0dc15b1b3134bd39ba8a2219c2da4e426e3572809459bbdc8bbf3fa4ea055406b85c547d8e7f05afcb57baa712653ce0d6f64
|
||||
DIST sqlite-autoconf-3120200.tar.gz 2374804 SHA256 fd00770c9afd39db555c78400e52f55e8bd6568c78be23561abb472a22d09abb SHA512 e56b8d5b8fb41d27437659db669259198663c266c0b3faf44ba9b130441550fb79bd040e6488f56280b33230d9cf4e51c7906f968ffdd36206354bfabc4b6eb4 WHIRLPOOL bd1231f0cce91281c9e42338ae698a06446078d2070f4f16b5472ed4004dbf1913339a3f0e5a34d87d0e71390a130c347f3c97353967530b65b23e1492664b7e
|
||||
DIST sqlite-autoconf-3130000.tar.gz 2459805 SHA256 e2797026b3310c9d08bd472f6d430058c6dd139ff9d4e30289884ccd9744086b SHA512 c2547ff9a144c46829344058b4f8dcc5b8c9c823cbc667be2944dc7beecb9cc213858cc9ce302a763200278397d9a0fc6bb35c542028a124ef0980fedd574c2f WHIRLPOOL b9bcfb2eecf30719f7a673d569949b4e497c9682de08ca6f0ccc6c67a8f1541a51e88108bebde94a14802516b114c9f8cad83fbdbb130774b3082a8107657255
|
||||
DIST sqlite-doc-3110100.zip 5386958 SHA256 3f127c51c7936d13de96255b00a6be3862693ff025f61a1d3d17d3d57ee295d0 SHA512 b8fe71a852ce2fa3d7da27c09e3a1e8d019a9c55eb7e5516425754148f8d8a6cc88571d006768d5fd5b2c72aa513544bfc0ce4208f376099f8f08b7fee480d06 WHIRLPOOL 8cf7b3495ff184622dbf2842931d6b77061dc166c9d66e6bb6e400525c59ccc5b689b22cea45dad0fa7a7117692a1c16fea46aa4789084ce8c4de3655e973812
|
||||
DIST sqlite-doc-3120000.zip 5402611 SHA256 346d9d56a0193d9396948192b7eca9e45c2adfeea6bbf71df62502830da510f3 SHA512 7879d006e528d692ea5718f27d03e2dfe2a5e54aa135be983b992836102720df4dc690d84795115a25ed19a663e895a3f3f8a59d0de079c451d215e07081281e WHIRLPOOL 00f5bc4b82af1ba8d43ae4d0761dacd2e608009812a12fee9aedd333baec9b36f74542c60de4acacd19f5ef898d3bd57dfb705f3b21219ba3862ca91c2f76402
|
||||
DIST sqlite-doc-3120100.zip 5410493 SHA256 dbe53c076922c711a467dde57432583fbf9a12eac57cb75f6116a310880eb088 SHA512 d0117618d97744255248b9160816203147ba2afdb0bea5fe02d5e464541e09bc9147189317c6f849cc56059d6ae96e3e4b2a30cd8d0bc7b0e1ecacb573cfcdd4 WHIRLPOOL e3f054eda83301b9e4b5170bf9c56895756e4ac78a1c6256467c990fafccaeadec5f7ca54f1bf118bcb950f25db63df6c0972a138d36a10a0a9cfdf688eb207b
|
||||
DIST sqlite-doc-3120200.zip 5416790 SHA256 67c640c4b01b961016717db61e3e43c63c33248c78ce0de9f10b88ea7ce97670 SHA512 4ded937565b2d9b63ae55495d4b536bc0056e0d9aa7119ee54ddea127c42ba7de17986db7b85c172043fab1112132cbc126a102b248770fca6cde9a8fda438ae WHIRLPOOL 7eefecb6d0450c85ec3f30cdeb853117f4067e1bace7d3c0524e5c6cb13d2e31772211aec8562f972491da413d9bd79022bc29c16968b086562e7f17bff984eb
|
||||
DIST sqlite-doc-3130000.zip 5550186 SHA256 510606a9cdd89814b2d44e7b7f284ebb0a58153e1800de6daadfab445190f79c SHA512 0bf4544a07bd92533bc248dc16ed43c4fcad870ab535591618d3006f38c2741a8c0ed1da082444ea1af2f57936575c678bc12b651252426b908660023b36cd39 WHIRLPOOL 78fd5de701224e39d07fbb03a9193dff45237845b215d83f27a623f289d9da0df7082d53115e90474856b775d350ee3f9d2970ca2c1a4a33b24543de06fd3b9a
|
||||
DIST sqlite-src-3110100.zip 9294249 SHA256 ade6aa93fd1d52dec0d8712f9ba4df59ecc6ec442f32ef28631c3b9341aadf97 SHA512 350c3019922a6adc1b7372f5e27c810a08f4bf576ea4e07d46bc59e1939a919d1bda1a29581f4df258f577202d79253292f719ca56ba30d1e7a1a2d801b65a48 WHIRLPOOL 3f7cc7baa7c59930e2e676d859478a68fddd392ccc4747630aa68c3909eb0b633d6031e9a998c1a741054594935dd52b3143ce05b574ff1b14f20f6ededc0a6e
|
||||
DIST sqlite-src-3120000.zip 9367749 SHA256 d891e7ffd56cd97d069a6ed99d7e85cbe655b0a97ca6b5398c7806e888642df1 SHA512 9669e33e328b826f4692725ec09e21d85f4f2c386c624a81b0535f41ca7d2f996ebf5018db8ecdfdac18cff39a881a953111801499705dfb599f00e3bb5d10e4 WHIRLPOOL 865aaecbe331ec93b1a8c5b965c3edc43d35994c2db79d336febb27860ee91d68753d3ea274b4639f3e05d3f0a589fb21aedac33bc2120a4de8d094383d7b923
|
||||
DIST sqlite-src-3120100.zip 9368459 SHA256 49b9819683f8f7329a78d2008e3f7c4e02126b556b95e5dfe3be102b9e741cff SHA512 6d0d7230343ca460215b5764d4a546631ddc2bcfc0777051379fb4632ccf9c36a53d26eda6811823156be166643c001c994a0f52498c6196ed13b34e931d55e1 WHIRLPOOL e41fd7a1ba870efb5421657975990c1d7e1ecc27023882771474a62e82b2ae305bc3d0b8556e0627de886d35e1b375fec223b3f70582d64fc5345c525b293131
|
||||
DIST sqlite-src-3120200.zip 9370396 SHA256 2c16caa653e57f3c71873aa88797c97117981d6b0974254ce24d933dd27f9a86 SHA512 6cc9718c23ca3f65a42cc715eb67c8d174ecf0e397457efb6bfc5bd2efc9a51ea2f84266d31826068bf46efc550eb277b3c8e93cb85c5d23645e8b8ae4e2fc07 WHIRLPOOL ffdbbc384189f0d62a93ee8219051ff936b7c0c2fd39449f6ff72a734ab219f23f049648de7c0ec510a74aad85ba07ef0c8bebea4c3b83e043464744d2c039f4
|
||||
DIST sqlite-src-3130000.zip 9506412 SHA256 b46b62dc27abbde52db69d8e2a710469b9af613ba251eb98e412d4f3827f915b SHA512 4cb7531105869ff7db5c08aa8e4d303fa3d80c8c67e21d9a835a09f7dddb4c9dbba837e2030dd4af6bcdb00a305b057cbd6430e11b3f2ae5e470f27b69b6c1e6 WHIRLPOOL 901f6cd343daaa62970f8d768e3c6ccb0b1da75fb5643b27e76f60d224005a08955fde9df5b8bb63250ab27994e2428ce19e21b4a1ccabec47cd4b8df4a13657
|
||||
EBUILD sqlite-3.11.1.ebuild 7518 SHA256 de50b5c26c744cfc34ea505f429a340f365efa800370497567c73d94e1c86ff7 SHA512 f95373f37c6b85781f86480fc5214b05e309b37864a6bf1366c021b7d17b6239d3bb17ecd1b2843099646bf0f266c2bbc8c917ab7f4eb1ffd541b39a6306112b WHIRLPOOL 52336e092edb6070ed61f662ca16fdb4557a32888bd6656a68072b985e18459573f506a318afd5f329aba6320fc57436cf1476b3a7dc56a7689d4c105f2b30dc
|
||||
EBUILD sqlite-3.12.0.ebuild 6986 SHA256 11a23d8e75c03c4e3515ddb20682d384504bebbdef896dc17c1e09460b2c1528 SHA512 504211d84f97e8da2f4d53c9de8afd89955410a9c91cb0fa5dc48726b4d6b314e1a48f1b6e40f8b6ba2cdec3f517a2b5623fe01e21f417780dfa640bb80b97b1 WHIRLPOOL f1fd886f3ad3ec224283a19287e9f5dbbab4796ce19fd1d57ba0bf76b3ffb2a9228500e5a7a4b6829032142bbc29c37d6cc793a6b9021ae8f2b9b81260eb40f5
|
||||
EBUILD sqlite-3.12.1.ebuild 6992 SHA256 6f2e0de7c7bfc1673bd97a0b9a5c0526bea85e08dc8ce742b46d1e0dc44c767e SHA512 2677c1c39a10715c41e0802a5e6df356bbd66f15eeebfd862f26b203e23b472520ac06a5ec823565b57f61e27817cb856de86a7e3861525acc228954eab1c205 WHIRLPOOL afc6c37f03fa6d4d5a5e5d5c7954f37af324e6426505e7653b1fd759f6f6c747278ddeaa48e5d8b9300839267cd140ea074d5be82970ead538588773a0f34a49
|
||||
EBUILD sqlite-3.12.2.ebuild 6992 SHA256 6f2e0de7c7bfc1673bd97a0b9a5c0526bea85e08dc8ce742b46d1e0dc44c767e SHA512 2677c1c39a10715c41e0802a5e6df356bbd66f15eeebfd862f26b203e23b472520ac06a5ec823565b57f61e27817cb856de86a7e3861525acc228954eab1c205 WHIRLPOOL afc6c37f03fa6d4d5a5e5d5c7954f37af324e6426505e7653b1fd759f6f6c747278ddeaa48e5d8b9300839267cd140ea074d5be82970ead538588773a0f34a49
|
||||
EBUILD sqlite-3.13.0.ebuild 7145 SHA256 e06db96b44d4622e92145f3d0e45a6c7aa41a9eab0c005a56ce11ca25a451b44 SHA512 420723f7fa7676f2b5f72968b75b27cc9fb88879a999ef4e4f4986b473a54477ae5d25859863d4a0682d20b6f219b903ded98ae38039fd9409d8f9b506b7cd2e WHIRLPOOL e727c4325f6e34fe096f3064a9f62a4362a2bad909a7ee0ab5e02735797b7a80772aa0b1e66d58413d993b951d66909b50c5234c523a41d8cacb90af1bc0e761
|
||||
MISC ChangeLog 10282 SHA256 54f018e6b56f9b11f23c362a1c94c1ea3dba338ce10f4a771526c6600d67f05f SHA512 88736ab0a9b46ca8d8593e72769267d4ca1454f5b502be243d9e9862c07d8d303891c173fddc61712e9a4ec825fb6fc77b67be8cf4829a540f3ea77a32eea478 WHIRLPOOL 684ac1be5f7af9f917640edada5a366f1591c47a867d3c18170f4e4585bdd11e31a84c3611310bc4e71c28df63128041169e673ec117ff64e92a213877eede68
|
||||
MISC ChangeLog-2015 77763 SHA256 c33481b0e8ff18658a72ce845ef033f46d7e2e47fd368f276485936b8249e366 SHA512 ae9ede8a42eb81bdbfd39c201aaed8a295c2eb61999d7961aed59f1d439241b57ffff0548b11317abdf2342a2e35daeb8ba98dea3fbd1904653192c3e2b3c86c WHIRLPOOL 892423e0771ee903650e396b9eb63ca76abe782ce5d3f2e1f993d0c65f3ee1b23e38a743557e09f7d11c6466ffe7c8bf7fb4a372ed58e33c1397d9c9b24f1783
|
||||
MISC metadata.xml 745 SHA256 0430582d0c0d1d5687f3e488e11f0b0c60f91fa51196df62c5ccd4a57b79912b SHA512 06ed7007e3ded9f29fadc70c583e9795a8ab5c27578159bb060b39c0cf7de6b4bca06ff0ceeab6710c50db96a44c976c52af2352ee7928211a46d5eca071b849 WHIRLPOOL 7c9f0a1ab683d8c10a5eccebdd88f1f470c72ae4b547fc0a465da4cd6c640d0b8658d9767dfd6e16bdfbb54219edc584b0c7e80ed6b4e963032b7aaeeab672d5
|
||||
DIST sqlite-autoconf-3200100.tar.gz 2565638 BLAKE2B bd1d32c211ea906cb2dbf78ea54d364db1a642d8a3b2751a427521a9da3391a2cd23c1ecdc5ff70b68f4166c583e69373f566cb04847295542185ab598e79c1b SHA512 56e3d326ea2225cadc628c3518d46d9f7c4bafa0e3612f2b7ab0dc0d79fcbb7e095f6d84a9a48e1c6d83adcdc8706ad5ac4404f0f622c7fe38cfde3a7e7e69f0
|
||||
DIST sqlite-autoconf-3210000.tar.gz 2568942 BLAKE2B 83a7095fd5fd5447a3c16816ceb9f51f393de9689942bd4eb4c6eafe357a1dd1783500f8faf2765fa6628da6a39f550237b661af1337ac063ca285f5f0a5218e SHA512 8f00708965eacef171620c49538f75768d350ec3f2bfef412a5c70af865ab03b6a64ce1e65d9fdb3d66f4d00262a30fc162b01fd69f63c05c14d5243374b6298
|
||||
DIST sqlite-autoconf-3220000.tar.gz 2644649 BLAKE2B e73fd7846362e6cc07eb96ea18e8883c1473c2b07c6e0c89e7e65726c5a6556b50bac71904a5b3a431ba40ff72b32e55c3e5ab7461567b5643560a0790a9a4dd SHA512 13e791bb1d7ba7edb5d84f4945f36ce2e03898a5bb1612d28799ef35a100f32e85cbb38f4ef65a7b43d020e5d48bf09b2e79cbb2003cc8aca2b09458b8c5d5bc
|
||||
DIST sqlite-autoconf-3230100.tar.gz 2675362 BLAKE2B 2dd075f0dc05425563a8e679bb463724296294b5845746f06b51a24c9601be203ee0f2213f43eaca0757fcbb54b777cee746d873c98f377a0b010d8066d7fcb5 SHA512 52cae7ed0678b763d40373ae260672b906861379428529a58a017cbc82419a6b109e0b2ac7ff5532e6d941693cc4ab68e6563f424b92b3b27c8916859a6e4826
|
||||
DIST sqlite-doc-3200100.zip 5759028 BLAKE2B a633672b739160873e64b89e1350c85b0002fd8f268b6ae0f5189de12f411125fbb309585175727b8915fe1468b3e70e7c33239826232c3e7bc8c1c59132bec0 SHA512 518ca59644cecfcd67f511268112e421c5d7bbd77ef1e33304bf306ef110becf1e2a7fe37c506ec6892edb9d5c6ee77657b374c2e061f49890d18af062dea2b3
|
||||
DIST sqlite-doc-3210000.zip 5800635 BLAKE2B c9e15fe7373045783d05bd7b0a70f980e3c8a3c0ec4243f85fe338788830a58e82f1c6b3c053efe75caa33e99a6162e2f9831e4f5b9577c0bf90a305ee2f0381 SHA512 799c7279166b489d1a5acc9410808c2d4b78e64037fc15b60764180fe1c698f35e27e86793140302f560cfa583baa2c33e416d5c9e1842ec58c6cb6093729334
|
||||
DIST sqlite-doc-3220000.zip 5856836 BLAKE2B 1be73848040f3ae9734a44c94e4c36cae269d79abb20467f9f8368754e1ae07f4c25490be985b44d08f427e281fc268c6569dc0f5bbb6254621c62798507d687 SHA512 f9141d3907e5c1a3008d3b7e111e46e7ff1f010358eb682d3e1187a67deb7cca7ba1d5fbc5b19da26ee8df3a0c71a098fd0e8d8ca89c25e5ad2b3e12ba7dc312
|
||||
DIST sqlite-doc-3230100.zip 8882546 BLAKE2B 1e80647e3789b9130a93e881933fb1260794d9ccf359969a16bdeb0df5a51787eaf8404641c4b760bedd45063d46f8874fd74a4da1fef0234f3d8e92db754d76 SHA512 d3a42621480a928446c5f71d0f2ee68e245b071971da38438f9070bd5bcbe1930ea5bd20e06c68543df75badd2e4565abc94420df50b7152c9cd129587471471
|
||||
DIST sqlite-src-3200100.zip 10575637 BLAKE2B e45bad50d728e749c258546dd75a9d647ca35584092c663fed176fdd69164623bbe58afd15cd74fcd32a0cec893cffdb0f096873188c42ec5595ef7d635c79ad SHA512 845a0d64c9356aadf178c04dd716bbd37a7353526b06cfa8e8f65653cf6a1893a5c5e8c78d20b43910c34d9167272cf517749c91ed0ba7686977e3d0327e8939
|
||||
DIST sqlite-src-3210000.zip 10577695 BLAKE2B 21f110d4cdda95864a39b9b9b65985d29e1409ed38a9bda692d33dde845c115476cd77dc3b9cd1b7359ff383dc3050cbf0437b113ea128392aef50dd3b778d46 SHA512 3a054422da80d750fd5ab297f9d2728f4e7b55fa790a72d55da8c381835571992d56b349e50d4680b04c9e2e44d6fa83009c2df3ffa045f43ff9059bb8736894
|
||||
DIST sqlite-src-3220000.zip 10721627 BLAKE2B ed4cf93c36c095edeccd6ee4dac5419c516264a42eb9d6d2e333b1d4a134c6198dfcd2bbae41dff811616f0dc7f9e9bb487f9c5b5f631fcb5885540a84bf527a SHA512 e35defb0ffcc10100399051bc734746de40fa3dc5cd673eac470fb58cd8bd6d911b6dacb5e8489e2dd79c6ae75faaeb8c02384f64c4595963e62bd3faeb9446c
|
||||
DIST sqlite-src-3230100.zip 10849436 BLAKE2B 6bed0a45c83ddb51d665835d174f623b30b1c3b81562fdea2317b58d876a0852136fe4f8a3ebc7679676f366e19c84d0ad2f54d3d8c73712145099975f80cf1a SHA512 69a87b76860c3b172d9e68b0fc0b8c157b606375e2b7d793ce4bd4b898ef737cd721189bc6a3342c749e224e60fa96203d449668c49dff2ebdc682b49630a59b
|
||||
|
@ -1,443 +0,0 @@
|
||||
https://www.sqlite.org/cgi/src/info/374b5108087a2eae
|
||||
|
||||
--- ext/fts3/fts3_tokenizer.c
|
||||
+++ ext/fts3/fts3_tokenizer.c
|
||||
@@ -30,6 +30,18 @@
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
+** Return true if the two-argument version of fts3_tokenizer()
|
||||
+** has been activated via a prior call to sqlite3_db_config(db,
|
||||
+** SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
|
||||
+*/
|
||||
+static int fts3TokenizerEnabled(sqlite3_context *context){
|
||||
+ sqlite3 *db = sqlite3_context_db_handle(context);
|
||||
+ int isEnabled = 0;
|
||||
+ sqlite3_db_config(db,SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER,-1,&isEnabled);
|
||||
+ return isEnabled;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
** Implementation of the SQL scalar function for accessing the underlying
|
||||
** hash table. This function may be called as follows:
|
||||
**
|
||||
@@ -49,7 +61,7 @@
|
||||
** is a blob containing the pointer stored as the hash data corresponding
|
||||
** to string <key-name> (after the hash-table is updated, if applicable).
|
||||
*/
|
||||
-static void scalarFunc(
|
||||
+static void fts3TokenizerFunc(
|
||||
sqlite3_context *context,
|
||||
int argc,
|
||||
sqlite3_value **argv
|
||||
@@ -67,27 +79,23 @@
|
||||
nName = sqlite3_value_bytes(argv[0])+1;
|
||||
|
||||
if( argc==2 ){
|
||||
-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
|
||||
- void *pOld;
|
||||
- int n = sqlite3_value_bytes(argv[1]);
|
||||
- if( zName==0 || n!=sizeof(pPtr) ){
|
||||
- sqlite3_result_error(context, "argument type mismatch", -1);
|
||||
- return;
|
||||
- }
|
||||
- pPtr = *(void **)sqlite3_value_blob(argv[1]);
|
||||
- pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
|
||||
- if( pOld==pPtr ){
|
||||
- sqlite3_result_error(context, "out of memory", -1);
|
||||
+ if( fts3TokenizerEnabled(context) ){
|
||||
+ void *pOld;
|
||||
+ int n = sqlite3_value_bytes(argv[1]);
|
||||
+ if( zName==0 || n!=sizeof(pPtr) ){
|
||||
+ sqlite3_result_error(context, "argument type mismatch", -1);
|
||||
+ return;
|
||||
+ }
|
||||
+ pPtr = *(void **)sqlite3_value_blob(argv[1]);
|
||||
+ pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
|
||||
+ if( pOld==pPtr ){
|
||||
+ sqlite3_result_error(context, "out of memory", -1);
|
||||
+ }
|
||||
+ }else{
|
||||
+ sqlite3_result_error(context, "fts3tokenize disabled", -1);
|
||||
return;
|
||||
}
|
||||
-#else
|
||||
- sqlite3_result_error(context, "fts3tokenize: "
|
||||
- "disabled - rebuild with -DSQLITE_ENABLE_FTS3_TOKENIZER", -1
|
||||
- );
|
||||
- return;
|
||||
-#endif /* SQLITE_ENABLE_FTS3_TOKENIZER */
|
||||
- }else
|
||||
- {
|
||||
+ }else{
|
||||
if( zName ){
|
||||
pPtr = sqlite3Fts3HashFind(pHash, zName, nName);
|
||||
}
|
||||
@@ -98,7 +106,6 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
-
|
||||
sqlite3_result_blob(context, (void *)&pPtr, sizeof(pPtr), SQLITE_TRANSIENT);
|
||||
}
|
||||
|
||||
@@ -336,7 +343,6 @@
|
||||
Tcl_DecrRefCount(pRet);
|
||||
}
|
||||
|
||||
-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
|
||||
static
|
||||
int registerTokenizer(
|
||||
sqlite3 *db,
|
||||
@@ -358,7 +364,6 @@
|
||||
|
||||
return sqlite3_finalize(pStmt);
|
||||
}
|
||||
-#endif /* SQLITE_ENABLE_FTS3_TOKENIZER */
|
||||
|
||||
|
||||
static
|
||||
@@ -431,13 +436,13 @@
|
||||
assert( 0==strcmp(sqlite3_errmsg(db), "unknown tokenizer: nosuchtokenizer") );
|
||||
|
||||
/* Test the storage function */
|
||||
-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
|
||||
- rc = registerTokenizer(db, "nosuchtokenizer", p1);
|
||||
- assert( rc==SQLITE_OK );
|
||||
- rc = queryTokenizer(db, "nosuchtokenizer", &p2);
|
||||
- assert( rc==SQLITE_OK );
|
||||
- assert( p2==p1 );
|
||||
-#endif
|
||||
+ if( fts3TokenizerEnabled(context) ){
|
||||
+ rc = registerTokenizer(db, "nosuchtokenizer", p1);
|
||||
+ assert( rc==SQLITE_OK );
|
||||
+ rc = queryTokenizer(db, "nosuchtokenizer", &p2);
|
||||
+ assert( rc==SQLITE_OK );
|
||||
+ assert( p2==p1 );
|
||||
+ }
|
||||
|
||||
sqlite3_result_text(context, "ok", -1, SQLITE_STATIC);
|
||||
}
|
||||
@@ -453,7 +458,7 @@
|
||||
** sqlite3Fts3HashInit(pHash, FTS3_HASH_STRING, 1);
|
||||
**
|
||||
** This function adds a scalar function (see header comment above
|
||||
-** scalarFunc() in this file for details) and, if ENABLE_TABLE is
|
||||
+** fts3TokenizerFunc() in this file for details) and, if ENABLE_TABLE is
|
||||
** defined at compilation time, a temporary virtual table (see header
|
||||
** comment above struct HashTableVtab) to the database schema. Both
|
||||
** provide read/write access to the contents of *pHash.
|
||||
@@ -482,10 +487,10 @@
|
||||
#endif
|
||||
|
||||
if( SQLITE_OK==rc ){
|
||||
- rc = sqlite3_create_function(db, zName, 1, any, p, scalarFunc, 0, 0);
|
||||
+ rc = sqlite3_create_function(db, zName, 1, any, p, fts3TokenizerFunc, 0, 0);
|
||||
}
|
||||
if( SQLITE_OK==rc ){
|
||||
- rc = sqlite3_create_function(db, zName, 2, any, p, scalarFunc, 0, 0);
|
||||
+ rc = sqlite3_create_function(db, zName, 2, any, p, fts3TokenizerFunc, 0, 0);
|
||||
}
|
||||
#ifdef SQLITE_TEST
|
||||
if( SQLITE_OK==rc ){
|
||||
--- src/main.c
|
||||
+++ src/main.c
|
||||
@@ -797,8 +797,9 @@
|
||||
int op; /* The opcode */
|
||||
u32 mask; /* Mask of the bit in sqlite3.flags to set/clear */
|
||||
} aFlagOp[] = {
|
||||
- { SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_ForeignKeys },
|
||||
- { SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_EnableTrigger },
|
||||
+ { SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_ForeignKeys },
|
||||
+ { SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_EnableTrigger },
|
||||
+ { SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, SQLITE_Fts3Tokenizer },
|
||||
};
|
||||
unsigned int i;
|
||||
rc = SQLITE_ERROR; /* IMP: R-42790-23372 */
|
||||
@@ -2815,6 +2816,9 @@
|
||||
#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
|
||||
| SQLITE_CellSizeCk
|
||||
#endif
|
||||
+#if defined(SQLITE_ENABLE_FTS3_TOKENIZER)
|
||||
+ | SQLITE_Fts3Tokenizer
|
||||
+#endif
|
||||
;
|
||||
sqlite3HashInit(&db->aCollSeq);
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
--- src/sqlite.h.in
|
||||
+++ src/sqlite.h.in
|
||||
@@ -1904,11 +1904,25 @@
|
||||
** following this call. The second parameter may be a NULL pointer, in
|
||||
** which case the trigger setting is not reported back. </dd>
|
||||
**
|
||||
+** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
|
||||
+** <dd> ^This option is used to enable or disable the two-argument
|
||||
+** version of the [fts3_tokenizer()] function which is part of the
|
||||
+** [FTS3] full-text search engine extension.
|
||||
+** There should be two additional arguments.
|
||||
+** The first argument is an integer which is 0 to disable fts3_tokenizer() or
|
||||
+** positive to enable fts3_tokenizer() or negative to leave the setting
|
||||
+** unchanged.
|
||||
+** The second parameter is a pointer to an integer into which
|
||||
+** is written 0 or 1 to indicate whether fts3_tokenizer is disabled or enabled
|
||||
+** following this call. The second parameter may be a NULL pointer, in
|
||||
+** which case the new setting is not reported back. </dd>
|
||||
+**
|
||||
** </dl>
|
||||
*/
|
||||
-#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
|
||||
-#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
|
||||
-#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
|
||||
+#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
|
||||
+#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
|
||||
+#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
|
||||
+#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
|
||||
|
||||
|
||||
/*
|
||||
--- src/sqliteInt.h
|
||||
+++ src/sqliteInt.h
|
||||
@@ -1317,6 +1317,7 @@
|
||||
#define SQLITE_VdbeEQP 0x04000000 /* Debug EXPLAIN QUERY PLAN */
|
||||
#define SQLITE_Vacuum 0x08000000 /* Currently in a VACUUM */
|
||||
#define SQLITE_CellSizeCk 0x10000000 /* Check btree cell sizes on load */
|
||||
+#define SQLITE_Fts3Tokenizer 0x20000000 /* Enable fts3_tokenizer(2) */
|
||||
|
||||
|
||||
/*
|
||||
--- src/test1.c
|
||||
+++ src/test1.c
|
||||
@@ -6921,6 +6921,53 @@
|
||||
}
|
||||
|
||||
/*
|
||||
+** tclcmd: sqlite3_db_config DB SETTING VALUE
|
||||
+**
|
||||
+** Invoke sqlite3_db_config() for one of the setting values.
|
||||
+*/
|
||||
+static int test_sqlite3_db_config(
|
||||
+ void *clientData,
|
||||
+ Tcl_Interp *interp,
|
||||
+ int objc,
|
||||
+ Tcl_Obj *CONST objv[]
|
||||
+){
|
||||
+ static const struct {
|
||||
+ const char *zName;
|
||||
+ int eVal;
|
||||
+ } aSetting[] = {
|
||||
+ { "FKEY", SQLITE_DBCONFIG_ENABLE_FKEY },
|
||||
+ { "TRIGGER", SQLITE_DBCONFIG_ENABLE_TRIGGER },
|
||||
+ { "FTS3_TOKENIZER", SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER },
|
||||
+ };
|
||||
+ int i;
|
||||
+ int v;
|
||||
+ const char *zSetting;
|
||||
+ sqlite3 *db;
|
||||
+
|
||||
+ if( objc!=4 ){
|
||||
+ Tcl_WrongNumArgs(interp, 1, objv, "DB SETTING VALUE");
|
||||
+ return TCL_ERROR;
|
||||
+ }
|
||||
+ if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
|
||||
+ zSetting = Tcl_GetString(objv[2]);
|
||||
+ if( sqlite3_strglob("SQLITE_*", zSetting)==0 ) zSetting += 7;
|
||||
+ if( sqlite3_strglob("DBCONFIG_*", zSetting)==0 ) zSetting += 9;
|
||||
+ if( sqlite3_strglob("ENABLE_*", zSetting)==0 ) zSetting += 7;
|
||||
+ for(i=0; i<ArraySize(aSetting); i++){
|
||||
+ if( strcmp(zSetting, aSetting[i].zName)==0 ) break;
|
||||
+ }
|
||||
+ if( i>=ArraySize(aSetting) ){
|
||||
+ Tcl_SetObjResult(interp,
|
||||
+ Tcl_NewStringObj("unknown sqlite3_db_config setting", -1));
|
||||
+ return TCL_ERROR;
|
||||
+ }
|
||||
+ if( Tcl_GetIntFromObj(interp, objv[3], &v) ) return TCL_ERROR;
|
||||
+ sqlite3_db_config(db, aSetting[i].eVal, v, &v);
|
||||
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(v));
|
||||
+ return TCL_OK;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
** Register commands with the TCL interpreter.
|
||||
*/
|
||||
int Sqlitetest1_Init(Tcl_Interp *interp){
|
||||
@@ -6989,6 +7036,7 @@
|
||||
Tcl_ObjCmdProc *xProc;
|
||||
void *clientData;
|
||||
} aObjCmd[] = {
|
||||
+ { "sqlite3_db_config", test_sqlite3_db_config, 0 },
|
||||
{ "bad_behavior", test_bad_behavior, (void*)&iZero },
|
||||
{ "register_dbstat_vtab", test_register_dbstat_vtab },
|
||||
{ "sqlite3_connection_pointer", get_sqlite_pointer, 0 },
|
||||
--- src/test_config.c
|
||||
+++ src/test_config.c
|
||||
@@ -370,12 +370,6 @@
|
||||
Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL_GLOBAL_ONLY);
|
||||
#endif
|
||||
|
||||
-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
|
||||
- Tcl_SetVar2(interp, "sqlite_options", "fts3_tokenizer", "1", TCL_GLOBAL_ONLY);
|
||||
-#else
|
||||
- Tcl_SetVar2(interp, "sqlite_options", "fts3_tokenizer", "0", TCL_GLOBAL_ONLY);
|
||||
-#endif
|
||||
-
|
||||
#ifdef SQLITE_ENABLE_FTS5
|
||||
Tcl_SetVar2(interp, "sqlite_options", "fts5", "1", TCL_GLOBAL_ONLY);
|
||||
#else
|
||||
--- test/fts3atoken.test
|
||||
+++ test/fts3atoken.test
|
||||
@@ -56,40 +56,41 @@
|
||||
#
|
||||
# 5: Test that the table created to use tokenizer 'blah' is usable.
|
||||
#
|
||||
-ifcapable fts3_tokenizer {
|
||||
- do_test fts3atoken-1.1 {
|
||||
- catchsql {
|
||||
- CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize blah);
|
||||
- }
|
||||
- } {1 {unknown tokenizer: blah}}
|
||||
- do_test fts3atoken-1.2 {
|
||||
- execsql {
|
||||
- SELECT fts3_tokenizer('blah', fts3_tokenizer('simple')) IS NULL;
|
||||
- }
|
||||
- } {0}
|
||||
- do_test fts3atoken-1.3 {
|
||||
- execsql {
|
||||
- SELECT fts3_tokenizer('blah') == fts3_tokenizer('simple');
|
||||
- }
|
||||
- } {1}
|
||||
- do_test fts3atoken-1.4 {
|
||||
- catchsql {
|
||||
- CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize blah);
|
||||
- }
|
||||
- } {0 {}}
|
||||
- do_test fts3atoken-1.5 {
|
||||
- execsql {
|
||||
- INSERT INTO t1(content) VALUES('There was movement at the station');
|
||||
- INSERT INTO t1(content) VALUES('For the word has passed around');
|
||||
- INSERT INTO t1(content) VALUES('That the colt from ol regret had got');
|
||||
- SELECT content FROM t1 WHERE content MATCH 'movement'
|
||||
- }
|
||||
- } {{There was movement at the station}}
|
||||
-} else {
|
||||
- do_catchsql_test 1.6 {
|
||||
+sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1
|
||||
+do_test fts3atoken-1.1 {
|
||||
+ catchsql {
|
||||
+ CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize blah);
|
||||
+ }
|
||||
+} {1 {unknown tokenizer: blah}}
|
||||
+do_test fts3atoken-1.2 {
|
||||
+ execsql {
|
||||
SELECT fts3_tokenizer('blah', fts3_tokenizer('simple')) IS NULL;
|
||||
- } {1 {fts3tokenize: disabled - rebuild with -DSQLITE_ENABLE_FTS3_TOKENIZER}}
|
||||
-}
|
||||
+ }
|
||||
+} {0}
|
||||
+do_test fts3atoken-1.3 {
|
||||
+ execsql {
|
||||
+ SELECT fts3_tokenizer('blah') == fts3_tokenizer('simple');
|
||||
+ }
|
||||
+} {1}
|
||||
+do_test fts3atoken-1.4 {
|
||||
+ catchsql {
|
||||
+ CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize blah);
|
||||
+ }
|
||||
+} {0 {}}
|
||||
+do_test fts3atoken-1.5 {
|
||||
+ execsql {
|
||||
+ INSERT INTO t1(content) VALUES('There was movement at the station');
|
||||
+ INSERT INTO t1(content) VALUES('For the word has passed around');
|
||||
+ INSERT INTO t1(content) VALUES('That the colt from ol regret had got');
|
||||
+ SELECT content FROM t1 WHERE content MATCH 'movement'
|
||||
+ }
|
||||
+} {{There was movement at the station}}
|
||||
+
|
||||
+sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 0
|
||||
+do_catchsql_test 1.6 {
|
||||
+ SELECT fts3_tokenizer('blah', fts3_tokenizer('simple')) IS NULL;
|
||||
+} {1 {fts3tokenize disabled}}
|
||||
+
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Test cases fts3atoken-2.* test error cases in the scalar function based
|
||||
@@ -212,14 +213,14 @@
|
||||
do_catchsql_test 6.2.1 {
|
||||
SELECT fts3_tokenizer(NULL);
|
||||
} {1 {unknown tokenizer: }}
|
||||
-ifcapable fts3_tokenizer {
|
||||
- do_catchsql_test 6.2.2 {
|
||||
- SELECT fts3_tokenizer(NULL, X'1234567812345678');
|
||||
- } {1 {argument type mismatch}}
|
||||
- do_catchsql_test 6.2.3 {
|
||||
- SELECT fts3_tokenizer(NULL, X'12345678');
|
||||
- } {1 {argument type mismatch}}
|
||||
-}
|
||||
+
|
||||
+sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1
|
||||
+do_catchsql_test 6.2.2 {
|
||||
+ SELECT fts3_tokenizer(NULL, X'1234567812345678');
|
||||
+} {1 {argument type mismatch}}
|
||||
+do_catchsql_test 6.2.3 {
|
||||
+ SELECT fts3_tokenizer(NULL, X'12345678');
|
||||
+} {1 {argument type mismatch}}
|
||||
|
||||
|
||||
finish_test
|
||||
--- test/fts4langid.test
|
||||
+++ test/fts4langid.test
|
||||
@@ -358,31 +358,30 @@
|
||||
}
|
||||
}
|
||||
|
||||
-ifcapable fts3_tokenizer {
|
||||
- do_test 4.1.0 {
|
||||
- reset_db
|
||||
- set ptr [fts3_test_tokenizer]
|
||||
- execsql { SELECT fts3_tokenizer('testtokenizer', $ptr) }
|
||||
- build_multilingual_db_2 db
|
||||
- } {}
|
||||
- do_execsql_test 4.1.1 {
|
||||
- SELECT docid FROM t4 WHERE t4 MATCH 'quick';
|
||||
- } {0}
|
||||
- do_execsql_test 4.1.2 {
|
||||
- SELECT docid FROM t4 WHERE t4 MATCH 'quick' AND lid=1;
|
||||
- } {}
|
||||
- do_execsql_test 4.1.3 {
|
||||
- SELECT docid FROM t4 WHERE t4 MATCH 'Quick' AND lid=1;
|
||||
- } {1}
|
||||
- for {set i 0} {$i < 50} {incr i} {
|
||||
- do_execsql_test 4.1.4.$i {
|
||||
- SELECT count(*) FROM t4 WHERE t4 MATCH 'fox' AND lid=$i;
|
||||
- } [expr 0==($i%2)]
|
||||
- }
|
||||
- do_catchsql_test 4.1.5 {
|
||||
- INSERT INTO t4(content, lid) VALUES('hello world', 101)
|
||||
- } {1 {SQL logic error or missing database}}
|
||||
+do_test 4.1.0 {
|
||||
+ reset_db
|
||||
+ set ptr [fts3_test_tokenizer]
|
||||
+ sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1
|
||||
+ execsql { SELECT fts3_tokenizer('testtokenizer', $ptr) }
|
||||
+ build_multilingual_db_2 db
|
||||
+} {}
|
||||
+do_execsql_test 4.1.1 {
|
||||
+ SELECT docid FROM t4 WHERE t4 MATCH 'quick';
|
||||
+} {0}
|
||||
+do_execsql_test 4.1.2 {
|
||||
+ SELECT docid FROM t4 WHERE t4 MATCH 'quick' AND lid=1;
|
||||
+} {}
|
||||
+do_execsql_test 4.1.3 {
|
||||
+ SELECT docid FROM t4 WHERE t4 MATCH 'Quick' AND lid=1;
|
||||
+} {1}
|
||||
+for {set i 0} {$i < 50} {incr i} {
|
||||
+ do_execsql_test 4.1.4.$i {
|
||||
+ SELECT count(*) FROM t4 WHERE t4 MATCH 'fox' AND lid=$i;
|
||||
+ } [expr 0==($i%2)]
|
||||
}
|
||||
+do_catchsql_test 4.1.5 {
|
||||
+ INSERT INTO t4(content, lid) VALUES('hello world', 101)
|
||||
+} {1 {SQL logic error or missing database}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Test cases 5.*
|
@ -1,232 +0,0 @@
|
||||
https://www.sqlite.org/cgi/src/info/374b5108087a2eae
|
||||
|
||||
--- sqlite3.c
|
||||
+++ sqlite3.c
|
||||
@@ -2121,11 +2121,25 @@
|
||||
** following this call. The second parameter may be a NULL pointer, in
|
||||
** which case the trigger setting is not reported back. </dd>
|
||||
**
|
||||
+** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
|
||||
+** <dd> ^This option is used to enable or disable the two-argument
|
||||
+** version of the [fts3_tokenizer()] function which is part of the
|
||||
+** [FTS3] full-text search engine extension.
|
||||
+** There should be two additional arguments.
|
||||
+** The first argument is an integer which is 0 to disable fts3_tokenizer() or
|
||||
+** positive to enable fts3_tokenizer() or negative to leave the setting
|
||||
+** unchanged.
|
||||
+** The second parameter is a pointer to an integer into which
|
||||
+** is written 0 or 1 to indicate whether fts3_tokenizer is disabled or enabled
|
||||
+** following this call. The second parameter may be a NULL pointer, in
|
||||
+** which case the new setting is not reported back. </dd>
|
||||
+**
|
||||
** </dl>
|
||||
*/
|
||||
-#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
|
||||
-#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
|
||||
-#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
|
||||
+#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
|
||||
+#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
|
||||
+#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
|
||||
+#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
|
||||
|
||||
|
||||
/*
|
||||
@@ -12206,6 +12220,7 @@
|
||||
#define SQLITE_VdbeEQP 0x04000000 /* Debug EXPLAIN QUERY PLAN */
|
||||
#define SQLITE_Vacuum 0x08000000 /* Currently in a VACUUM */
|
||||
#define SQLITE_CellSizeCk 0x10000000 /* Check btree cell sizes on load */
|
||||
+#define SQLITE_Fts3Tokenizer 0x20000000 /* Enable fts3_tokenizer(2) */
|
||||
|
||||
|
||||
/*
|
||||
@@ -133589,8 +133604,9 @@
|
||||
int op; /* The opcode */
|
||||
u32 mask; /* Mask of the bit in sqlite3.flags to set/clear */
|
||||
} aFlagOp[] = {
|
||||
- { SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_ForeignKeys },
|
||||
- { SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_EnableTrigger },
|
||||
+ { SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_ForeignKeys },
|
||||
+ { SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_EnableTrigger },
|
||||
+ { SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, SQLITE_Fts3Tokenizer },
|
||||
};
|
||||
unsigned int i;
|
||||
rc = SQLITE_ERROR; /* IMP: R-42790-23372 */
|
||||
@@ -135607,6 +135623,9 @@
|
||||
#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
|
||||
| SQLITE_CellSizeCk
|
||||
#endif
|
||||
+#if defined(SQLITE_ENABLE_FTS3_TOKENIZER)
|
||||
+ | SQLITE_Fts3Tokenizer
|
||||
+#endif
|
||||
;
|
||||
sqlite3HashInit(&db->aCollSeq);
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
@@ -146857,6 +146876,18 @@
|
||||
/* #include <string.h> */
|
||||
|
||||
/*
|
||||
+** Return true if the two-argument version of fts3_tokenizer()
|
||||
+** has been activated via a prior call to sqlite3_db_config(db,
|
||||
+** SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
|
||||
+*/
|
||||
+static int fts3TokenizerEnabled(sqlite3_context *context){
|
||||
+ sqlite3 *db = sqlite3_context_db_handle(context);
|
||||
+ int isEnabled = 0;
|
||||
+ sqlite3_db_config(db,SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER,-1,&isEnabled);
|
||||
+ return isEnabled;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
** Implementation of the SQL scalar function for accessing the underlying
|
||||
** hash table. This function may be called as follows:
|
||||
**
|
||||
@@ -146876,7 +146907,7 @@
|
||||
** is a blob containing the pointer stored as the hash data corresponding
|
||||
** to string <key-name> (after the hash-table is updated, if applicable).
|
||||
*/
|
||||
-static void scalarFunc(
|
||||
+static void fts3TokenizerFunc(
|
||||
sqlite3_context *context,
|
||||
int argc,
|
||||
sqlite3_value **argv
|
||||
@@ -146894,27 +146925,23 @@
|
||||
nName = sqlite3_value_bytes(argv[0])+1;
|
||||
|
||||
if( argc==2 ){
|
||||
-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
|
||||
- void *pOld;
|
||||
- int n = sqlite3_value_bytes(argv[1]);
|
||||
- if( zName==0 || n!=sizeof(pPtr) ){
|
||||
- sqlite3_result_error(context, "argument type mismatch", -1);
|
||||
- return;
|
||||
- }
|
||||
- pPtr = *(void **)sqlite3_value_blob(argv[1]);
|
||||
- pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
|
||||
- if( pOld==pPtr ){
|
||||
- sqlite3_result_error(context, "out of memory", -1);
|
||||
+ if( fts3TokenizerEnabled(context) ){
|
||||
+ void *pOld;
|
||||
+ int n = sqlite3_value_bytes(argv[1]);
|
||||
+ if( zName==0 || n!=sizeof(pPtr) ){
|
||||
+ sqlite3_result_error(context, "argument type mismatch", -1);
|
||||
+ return;
|
||||
+ }
|
||||
+ pPtr = *(void **)sqlite3_value_blob(argv[1]);
|
||||
+ pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
|
||||
+ if( pOld==pPtr ){
|
||||
+ sqlite3_result_error(context, "out of memory", -1);
|
||||
+ }
|
||||
+ }else{
|
||||
+ sqlite3_result_error(context, "fts3tokenize disabled", -1);
|
||||
return;
|
||||
}
|
||||
-#else
|
||||
- sqlite3_result_error(context, "fts3tokenize: "
|
||||
- "disabled - rebuild with -DSQLITE_ENABLE_FTS3_TOKENIZER", -1
|
||||
- );
|
||||
- return;
|
||||
-#endif /* SQLITE_ENABLE_FTS3_TOKENIZER */
|
||||
- }else
|
||||
- {
|
||||
+ }else{
|
||||
if( zName ){
|
||||
pPtr = sqlite3Fts3HashFind(pHash, zName, nName);
|
||||
}
|
||||
@@ -146925,7 +146952,6 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
-
|
||||
sqlite3_result_blob(context, (void *)&pPtr, sizeof(pPtr), SQLITE_TRANSIENT);
|
||||
}
|
||||
|
||||
@@ -147163,7 +147189,6 @@
|
||||
Tcl_DecrRefCount(pRet);
|
||||
}
|
||||
|
||||
-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
|
||||
static
|
||||
int registerTokenizer(
|
||||
sqlite3 *db,
|
||||
@@ -147185,7 +147210,6 @@
|
||||
|
||||
return sqlite3_finalize(pStmt);
|
||||
}
|
||||
-#endif /* SQLITE_ENABLE_FTS3_TOKENIZER */
|
||||
|
||||
|
||||
static
|
||||
@@ -147258,13 +147282,13 @@
|
||||
assert( 0==strcmp(sqlite3_errmsg(db), "unknown tokenizer: nosuchtokenizer") );
|
||||
|
||||
/* Test the storage function */
|
||||
-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
|
||||
- rc = registerTokenizer(db, "nosuchtokenizer", p1);
|
||||
- assert( rc==SQLITE_OK );
|
||||
- rc = queryTokenizer(db, "nosuchtokenizer", &p2);
|
||||
- assert( rc==SQLITE_OK );
|
||||
- assert( p2==p1 );
|
||||
-#endif
|
||||
+ if( fts3TokenizerEnabled(context) ){
|
||||
+ rc = registerTokenizer(db, "nosuchtokenizer", p1);
|
||||
+ assert( rc==SQLITE_OK );
|
||||
+ rc = queryTokenizer(db, "nosuchtokenizer", &p2);
|
||||
+ assert( rc==SQLITE_OK );
|
||||
+ assert( p2==p1 );
|
||||
+ }
|
||||
|
||||
sqlite3_result_text(context, "ok", -1, SQLITE_STATIC);
|
||||
}
|
||||
@@ -147280,7 +147304,7 @@
|
||||
** sqlite3Fts3HashInit(pHash, FTS3_HASH_STRING, 1);
|
||||
**
|
||||
** This function adds a scalar function (see header comment above
|
||||
-** scalarFunc() in this file for details) and, if ENABLE_TABLE is
|
||||
+** fts3TokenizerFunc() in this file for details) and, if ENABLE_TABLE is
|
||||
** defined at compilation time, a temporary virtual table (see header
|
||||
** comment above struct HashTableVtab) to the database schema. Both
|
||||
** provide read/write access to the contents of *pHash.
|
||||
@@ -147309,10 +147333,10 @@
|
||||
#endif
|
||||
|
||||
if( SQLITE_OK==rc ){
|
||||
- rc = sqlite3_create_function(db, zName, 1, any, p, scalarFunc, 0, 0);
|
||||
+ rc = sqlite3_create_function(db, zName, 1, any, p, fts3TokenizerFunc, 0, 0);
|
||||
}
|
||||
if( SQLITE_OK==rc ){
|
||||
- rc = sqlite3_create_function(db, zName, 2, any, p, scalarFunc, 0, 0);
|
||||
+ rc = sqlite3_create_function(db, zName, 2, any, p, fts3TokenizerFunc, 0, 0);
|
||||
}
|
||||
#ifdef SQLITE_TEST
|
||||
if( SQLITE_OK==rc ){
|
||||
--- sqlite3.h
|
||||
+++ sqlite3.h
|
||||
@@ -1904,11 +1904,25 @@
|
||||
** following this call. The second parameter may be a NULL pointer, in
|
||||
** which case the trigger setting is not reported back. </dd>
|
||||
**
|
||||
+** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
|
||||
+** <dd> ^This option is used to enable or disable the two-argument
|
||||
+** version of the [fts3_tokenizer()] function which is part of the
|
||||
+** [FTS3] full-text search engine extension.
|
||||
+** There should be two additional arguments.
|
||||
+** The first argument is an integer which is 0 to disable fts3_tokenizer() or
|
||||
+** positive to enable fts3_tokenizer() or negative to leave the setting
|
||||
+** unchanged.
|
||||
+** The second parameter is a pointer to an integer into which
|
||||
+** is written 0 or 1 to indicate whether fts3_tokenizer is disabled or enabled
|
||||
+** following this call. The second parameter may be a NULL pointer, in
|
||||
+** which case the new setting is not reported back. </dd>
|
||||
+**
|
||||
** </dl>
|
||||
*/
|
||||
-#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
|
||||
-#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
|
||||
-#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
|
||||
+#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
|
||||
+#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
|
||||
+#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
|
||||
+#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
|
||||
|
||||
|
||||
/*
|
@ -1,38 +0,0 @@
|
||||
Link executables against libsqlite3.so.
|
||||
Fix building with dlopen() not available.
|
||||
|
||||
--- Makefile.am
|
||||
+++ Makefile.am
|
||||
@@ -1,15 +1,16 @@
|
||||
|
||||
-AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
|
||||
+AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
|
||||
|
||||
lib_LTLIBRARIES = libsqlite3.la
|
||||
libsqlite3_la_SOURCES = sqlite3.c
|
||||
libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
|
||||
|
||||
bin_PROGRAMS = sqlite3
|
||||
-sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h
|
||||
-sqlite3_LDADD = @READLINE_LIBS@
|
||||
+sqlite3_SOURCES = shell.c sqlite3.h
|
||||
+EXTRA_sqlite3_SOURCES = sqlite3.c
|
||||
+sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@
|
||||
sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@
|
||||
-sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||
+sqlite3_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
include_HEADERS = sqlite3.h sqlite3ext.h
|
||||
|
||||
--- configure.ac
|
||||
+++ configure.ac
|
||||
@@ -89,6 +89,9 @@
|
||||
[], [enable_dynamic_extensions=yes])
|
||||
if test x"$enable_dynamic_extensions" != "xno"; then
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
+ if test "${ac_cv_search_dlopen}" = "no" ; then
|
||||
+ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
|
||||
+ fi
|
||||
else
|
||||
DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
|
||||
fi
|
@ -2,7 +2,7 @@ Fix building with dlopen() not available.
|
||||
|
||||
--- configure.ac
|
||||
+++ configure.ac
|
||||
@@ -89,6 +89,9 @@
|
||||
@@ -102,6 +102,9 @@
|
||||
[], [enable_dynamic_extensions=yes])
|
||||
if test x"$enable_dynamic_extensions" != "xno"; then
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
@ -4,16 +4,15 @@ Fix building with dlopen() not available.
|
||||
|
||||
--- Makefile.in
|
||||
+++ Makefile.in
|
||||
@@ -555,7 +555,7 @@
|
||||
# Extra compiler options for various shell tools
|
||||
@@ -565,6 +565,7 @@
|
||||
#
|
||||
SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
|
||||
-SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||
+SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||
FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
|
||||
FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
|
||||
|
||||
@@ -576,18 +576,18 @@
|
||||
# SHELL_OPT += -DSQLITE_ENABLE_FTS5
|
||||
+SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||
SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||
SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB
|
||||
@@ -591,25 +592,25 @@
|
||||
|
||||
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
|
||||
$(LTLINK) -no-undefined -o $@ tclsqlite.lo \
|
||||
@ -32,14 +31,25 @@ Fix building with dlopen() not available.
|
||||
+ $(TOP)/src/shell.c libsqlite3.la \
|
||||
+ $(LIBREADLINE)
|
||||
|
||||
-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS)
|
||||
-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
|
||||
+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
|
||||
|
||||
-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
|
||||
+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
|
||||
|
||||
-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
|
||||
+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
|
||||
$(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
|
||||
- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
|
||||
+ $(TOP)/ext/misc/scrub.c libsqlite3.la
|
||||
|
||||
srcck1$(BEXE): $(TOP)/tool/srcck1.c
|
||||
$(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
|
||||
@@ -656,7 +656,7 @@
|
||||
@@ -685,7 +686,7 @@
|
||||
# Rule to build the amalgamation
|
||||
#
|
||||
sqlite3.lo: sqlite3.c
|
||||
@ -48,7 +58,7 @@ Fix building with dlopen() not available.
|
||||
|
||||
# Rules to build the LEMON compiler generator
|
||||
#
|
||||
@@ -1082,13 +1082,13 @@
|
||||
@@ -1115,13 +1116,13 @@
|
||||
|
||||
# Fuzz testing
|
||||
fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
|
||||
@ -63,16 +73,16 @@ Fix building with dlopen() not available.
|
||||
- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
|
||||
+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
|
||||
|
||||
# Minimal testing that runs in less than 3 minutes
|
||||
# The veryquick.test TCL tests.
|
||||
#
|
||||
@@ -1114,32 +1114,32 @@
|
||||
@@ -1151,36 +1152,35 @@
|
||||
smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
|
||||
./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
|
||||
|
||||
-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
|
||||
+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
|
||||
echo "#define TCLSH 2" > $@
|
||||
echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
|
||||
- echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
|
||||
- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
|
||||
+ cat $(TOP)/src/tclsqlite.c >> $@
|
||||
echo "static const char *tclsh_main_loop(void){" >> $@
|
||||
@ -85,6 +95,12 @@ Fix building with dlopen() not available.
|
||||
+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
|
||||
+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
|
||||
|
||||
-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
|
||||
+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
|
||||
$(LTLINK) -DDBDUMP_STANDALONE -o $@ \
|
||||
- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
|
||||
+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
|
||||
|
||||
-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
|
||||
+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
|
||||
@ -112,20 +128,25 @@ Fix building with dlopen() not available.
|
||||
|
||||
rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
|
||||
$(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
|
||||
@@ -1153,8 +1153,8 @@
|
||||
speedtest1$(TEXE): $(TOP)/test/speedtest1.c sqlite3.lo
|
||||
$(LTLINK) -o $@ $(TOP)/test/speedtest1.c sqlite3.lo $(TLIBS)
|
||||
@@ -1199,11 +1199,11 @@
|
||||
kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
|
||||
$(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
|
||||
|
||||
-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
|
||||
- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
|
||||
+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
|
||||
+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
|
||||
|
||||
loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
|
||||
$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
|
||||
-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
|
||||
- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
|
||||
+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
|
||||
+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
|
||||
|
||||
# This target will fail if the SQLite amalgamation contains any exported
|
||||
# symbols that do not begin with "sqlite3_". It is run as part of the
|
||||
--- configure.ac
|
||||
+++ configure.ac
|
||||
@@ -570,6 +570,9 @@
|
||||
@@ -584,6 +584,9 @@
|
||||
if test "${use_loadextension}" = "yes" ; then
|
||||
OPT_FEATURE_FLAGS=""
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
@ -0,0 +1,33 @@
|
||||
https://sqlite.org/src/info/42f0777555675875
|
||||
|
||||
--- ext/misc/csv.c
|
||||
+++ ext/misc/csv.c
|
||||
@@ -78,7 +78,7 @@
|
||||
int nAlloc; /* Space allocated for z[] */
|
||||
int nLine; /* Current line number */
|
||||
int bNotFirst; /* True if prior text has been seen */
|
||||
- char cTerm; /* Character that terminated the most recent field */
|
||||
+ int cTerm; /* Character that terminated the most recent field */
|
||||
size_t iIn; /* Next unread character in the input buffer */
|
||||
size_t nIn; /* Number of characters in the input buffer */
|
||||
char *zIn; /* The input buffer */
|
||||
@@ -166,7 +166,7 @@
|
||||
if( p->in!=0 ) return csv_getc_refill(p);
|
||||
return EOF;
|
||||
}
|
||||
- return p->zIn[p->iIn++];
|
||||
+ return ((unsigned char*)p->zIn)[p->iIn++];
|
||||
}
|
||||
|
||||
/* Increase the size of p->z and append character c to the end.
|
||||
--- test/releasetest.tcl
|
||||
+++ test/releasetest.tcl
|
||||
@@ -114,7 +114,7 @@
|
||||
}
|
||||
"Debug-One" {
|
||||
--disable-shared
|
||||
- -O2
|
||||
+ -O2 -funsigned-char
|
||||
-DSQLITE_DEBUG=1
|
||||
-DSQLITE_MEMDEBUG=1
|
||||
-DSQLITE_MUTEX_NOOP=1
|
@ -0,0 +1,95 @@
|
||||
https://www.sqlite.org/src/info/87ccdf9cbb928455
|
||||
|
||||
--- test/fts3conf.test
|
||||
+++ test/fts3conf.test
|
||||
@@ -136,47 +136,49 @@
|
||||
do_execsql_test 2.2.3 { SELECT * FROM t1 } {{a b c} {a b c}}
|
||||
fts3_integrity 2.2.4 db t1
|
||||
|
||||
-do_execsql_test 3.1 {
|
||||
- CREATE VIRTUAL TABLE t3 USING fts4;
|
||||
- REPLACE INTO t3(docid, content) VALUES (1, 'one two');
|
||||
- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
|
||||
-} {X'0100000002000000'}
|
||||
-
|
||||
-do_execsql_test 3.2 {
|
||||
- REPLACE INTO t3(docid, content) VALUES (2, 'one two three four');
|
||||
- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four'
|
||||
-} {X'0200000003000000'}
|
||||
-
|
||||
-do_execsql_test 3.3 {
|
||||
- REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six');
|
||||
- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
|
||||
-} {X'0200000005000000'}
|
||||
-
|
||||
-do_execsql_test 3.4 {
|
||||
- UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1;
|
||||
- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
|
||||
-} {X'0100000006000000'}
|
||||
-
|
||||
-do_execsql_test 3.5 {
|
||||
- UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2;
|
||||
- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
|
||||
-} {X'0100000006000000'}
|
||||
-
|
||||
-do_execsql_test 3.6 {
|
||||
- REPLACE INTO t3(docid, content) VALUES (3, 'one two');
|
||||
- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
|
||||
-} {X'0100000002000000'}
|
||||
-
|
||||
-do_execsql_test 3.7 {
|
||||
- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four');
|
||||
- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four five six');
|
||||
- SELECT docid FROM t3;
|
||||
-} {3 4 5}
|
||||
-
|
||||
-do_execsql_test 3.8 {
|
||||
- UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4;
|
||||
- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
|
||||
-} {X'0200000002000000'}
|
||||
+if {$tcl_platform(byteOrder)=="littleEndian"} {
|
||||
+ do_execsql_test 3.1 {
|
||||
+ CREATE VIRTUAL TABLE t3 USING fts4;
|
||||
+ REPLACE INTO t3(docid, content) VALUES (1, 'one two');
|
||||
+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
|
||||
+ } {X'0100000002000000'}
|
||||
+
|
||||
+ do_execsql_test 3.2 {
|
||||
+ REPLACE INTO t3(docid, content) VALUES (2, 'one two three four');
|
||||
+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four'
|
||||
+ } {X'0200000003000000'}
|
||||
+
|
||||
+ do_execsql_test 3.3 {
|
||||
+ REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six');
|
||||
+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
|
||||
+ } {X'0200000005000000'}
|
||||
+
|
||||
+ do_execsql_test 3.4 {
|
||||
+ UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1;
|
||||
+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
|
||||
+ } {X'0100000006000000'}
|
||||
+
|
||||
+ do_execsql_test 3.5 {
|
||||
+ UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2;
|
||||
+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
|
||||
+ } {X'0100000006000000'}
|
||||
+
|
||||
+ do_execsql_test 3.6 {
|
||||
+ REPLACE INTO t3(docid, content) VALUES (3, 'one two');
|
||||
+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
|
||||
+ } {X'0100000002000000'}
|
||||
+
|
||||
+ do_execsql_test 3.7 {
|
||||
+ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four');
|
||||
+ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four five six');
|
||||
+ SELECT docid FROM t3;
|
||||
+ } {3 4 5}
|
||||
+
|
||||
+ do_execsql_test 3.8 {
|
||||
+ UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4;
|
||||
+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
|
||||
+ } {X'0200000002000000'}
|
||||
+}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Test that the xSavepoint is invoked correctly if the first write
|
@ -2,18 +2,9 @@ Link executables against libsqlite3.so.
|
||||
Increase timeout for fuzzcheck.
|
||||
Fix building with dlopen() not available.
|
||||
|
||||
--- Makefile.in
|
||||
+++ Makefile.in
|
||||
@@ -550,7 +550,7 @@
|
||||
# Extra compiler options for various shell tools
|
||||
#
|
||||
SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
|
||||
-SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||
+SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||
FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
|
||||
FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
|
||||
|
||||
@@ -571,18 +571,18 @@
|
||||
--- /Makefile.in
|
||||
+++ /Makefile.in
|
||||
@@ -600,25 +600,25 @@
|
||||
|
||||
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
|
||||
$(LTLINK) -no-undefined -o $@ tclsqlite.lo \
|
||||
@ -23,23 +14,34 @@ Fix building with dlopen() not available.
|
||||
-version-info "8:6:8" \
|
||||
-avoid-version
|
||||
|
||||
-sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
|
||||
-sqlite3$(TEXE): shell.c sqlite3.c
|
||||
- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
|
||||
- $(TOP)/src/shell.c sqlite3.c \
|
||||
- shell.c sqlite3.c \
|
||||
- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
|
||||
+sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la
|
||||
+sqlite3$(TEXE): shell.c libsqlite3.la
|
||||
+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
|
||||
+ $(TOP)/src/shell.c libsqlite3.la \
|
||||
+ shell.c libsqlite3.la \
|
||||
+ $(LIBREADLINE)
|
||||
|
||||
-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS)
|
||||
-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
|
||||
+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
|
||||
|
||||
-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
|
||||
+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
|
||||
|
||||
-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
|
||||
+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
|
||||
$(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
|
||||
- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
|
||||
+ $(TOP)/ext/misc/scrub.c libsqlite3.la
|
||||
|
||||
srcck1$(BEXE): $(TOP)/tool/srcck1.c
|
||||
$(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
|
||||
@@ -650,7 +650,7 @@
|
||||
@@ -694,7 +694,7 @@
|
||||
# Rule to build the amalgamation
|
||||
#
|
||||
sqlite3.lo: sqlite3.c
|
||||
@ -48,7 +50,7 @@ Fix building with dlopen() not available.
|
||||
|
||||
# Rules to build the LEMON compiler generator
|
||||
#
|
||||
@@ -1074,13 +1074,13 @@
|
||||
@@ -1145,13 +1145,13 @@
|
||||
|
||||
# Fuzz testing
|
||||
fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
|
||||
@ -63,28 +65,27 @@ Fix building with dlopen() not available.
|
||||
- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
|
||||
+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
|
||||
|
||||
# Minimal testing that runs in less than 3 minutes
|
||||
# The veryquick.test TCL tests.
|
||||
#
|
||||
@@ -1106,29 +1106,29 @@
|
||||
@@ -1181,30 +1181,30 @@
|
||||
smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
|
||||
./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
|
||||
|
||||
-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
|
||||
+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
|
||||
echo "#define TCLSH 2" > $@
|
||||
echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
|
||||
- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
|
||||
+ cat $(TOP)/src/tclsqlite.c >> $@
|
||||
echo "static const char *tclsh_main_loop(void){" >> $@
|
||||
echo "static const char *zMainloop = " >> $@
|
||||
$(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
|
||||
echo "; return zMainloop; }" >> $@
|
||||
-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
|
||||
+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
|
||||
$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
|
||||
|
||||
-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
|
||||
- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
|
||||
+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
|
||||
+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
|
||||
|
||||
-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
|
||||
+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
|
||||
$(LTLINK) -DDBDUMP_STANDALONE -o $@ \
|
||||
- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
|
||||
+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
|
||||
|
||||
-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
|
||||
+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
|
||||
@ -105,22 +106,32 @@ Fix building with dlopen() not available.
|
||||
+showwal$(TEXE): $(TOP)/tool/showwal.c
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
|
||||
|
||||
-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
|
||||
+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
|
||||
|
||||
rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
|
||||
$(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
|
||||
@@ -1142,8 +1142,8 @@
|
||||
speedtest1$(TEXE): $(TOP)/test/speedtest1.c sqlite3.lo
|
||||
$(LTLINK) -o $@ $(TOP)/test/speedtest1.c sqlite3.lo $(TLIBS)
|
||||
@@ -1223,11 +1223,11 @@
|
||||
kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
|
||||
$(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
|
||||
|
||||
-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
|
||||
- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
|
||||
+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
|
||||
+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
|
||||
|
||||
loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
|
||||
$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
|
||||
--- configure.ac
|
||||
+++ configure.ac
|
||||
@@ -570,6 +570,9 @@
|
||||
-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
|
||||
- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
|
||||
+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
|
||||
+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
|
||||
|
||||
# This target will fail if the SQLite amalgamation contains any exported
|
||||
# symbols that do not begin with "sqlite3_". It is run as part of the
|
||||
--- /configure.ac
|
||||
+++ /configure.ac
|
||||
@@ -584,6 +584,9 @@
|
||||
if test "${use_loadextension}" = "yes" ; then
|
||||
OPT_FEATURE_FLAGS=""
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
@ -130,3 +141,13 @@ Fix building with dlopen() not available.
|
||||
else
|
||||
OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
|
||||
fi
|
||||
--- /tool/sqlite3_analyzer.c.in
|
||||
+++ /tool/sqlite3_analyzer.c.in
|
||||
@@ -14,7 +14,6 @@
|
||||
#define SQLITE_DEFAULT_MEMSTATUS 0
|
||||
#define SQLITE_MAX_EXPR_DEPTH 0
|
||||
#define SQLITE_OMIT_LOAD_EXTENSION 1
|
||||
-INCLUDE sqlite3.c
|
||||
INCLUDE $ROOT/src/tclsqlite.c
|
||||
|
||||
const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
|
@ -0,0 +1,14 @@
|
||||
Fix building with dlopen() not available.
|
||||
|
||||
--- /configure.ac
|
||||
+++ /configure.ac
|
||||
@@ -102,6 +102,9 @@
|
||||
[], [enable_dynamic_extensions=yes])
|
||||
if test x"$enable_dynamic_extensions" != "xno"; then
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
+ if test "${ac_cv_search_dlopen}" = "no" ; then
|
||||
+ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
|
||||
+ fi
|
||||
else
|
||||
DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
|
||||
fi
|
@ -0,0 +1,405 @@
|
||||
Move some code to libsqlite3.so to avoid duplication.
|
||||
Link executables against libsqlite3.so.
|
||||
Increase timeout for fuzzcheck.
|
||||
Fix building with dlopen() not available.
|
||||
|
||||
--- /Makefile.in
|
||||
+++ /Makefile.in
|
||||
@@ -307,6 +307,9 @@
|
||||
# Source code for extensions
|
||||
#
|
||||
SRC += \
|
||||
+ $(TOP)/ext/expert/sqlite3expert.c \
|
||||
+ $(TOP)/ext/expert/sqlite3expert.h
|
||||
+SRC += \
|
||||
$(TOP)/ext/fts1/fts1.c \
|
||||
$(TOP)/ext/fts1/fts1.h \
|
||||
$(TOP)/ext/fts1/fts1_hash.c \
|
||||
@@ -355,8 +358,11 @@
|
||||
$(TOP)/ext/rbu/sqlite3rbu.h \
|
||||
$(TOP)/ext/rbu/sqlite3rbu.c
|
||||
SRC += \
|
||||
+ $(TOP)/ext/misc/appendvfs.c \
|
||||
$(TOP)/ext/misc/json1.c \
|
||||
- $(TOP)/ext/misc/stmt.c
|
||||
+ $(TOP)/ext/misc/sqlar.c \
|
||||
+ $(TOP)/ext/misc/stmt.c \
|
||||
+ $(TOP)/ext/misc/zipfile.c
|
||||
|
||||
# Generated source code files
|
||||
#
|
||||
@@ -425,7 +431,6 @@
|
||||
# Statically linked extensions
|
||||
#
|
||||
TESTSRC += \
|
||||
- $(TOP)/ext/expert/sqlite3expert.c \
|
||||
$(TOP)/ext/expert/test_expert.c \
|
||||
$(TOP)/ext/misc/amatch.c \
|
||||
$(TOP)/ext/misc/carray.c \
|
||||
@@ -447,8 +452,7 @@
|
||||
$(TOP)/ext/misc/spellfix.c \
|
||||
$(TOP)/ext/misc/totype.c \
|
||||
$(TOP)/ext/misc/unionvtab.c \
|
||||
- $(TOP)/ext/misc/wholenumber.c \
|
||||
- $(TOP)/ext/misc/zipfile.c
|
||||
+ $(TOP)/ext/misc/wholenumber.c
|
||||
|
||||
# Source code to the library files needed by the test fixture
|
||||
#
|
||||
@@ -610,25 +614,25 @@
|
||||
|
||||
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
|
||||
$(LTLINK) -no-undefined -o $@ tclsqlite.lo \
|
||||
- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
|
||||
+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
|
||||
-rpath "$(TCLLIBDIR)" \
|
||||
-version-info "8:6:8" \
|
||||
-avoid-version
|
||||
|
||||
-sqlite3$(TEXE): shell.c sqlite3.c
|
||||
- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
|
||||
- shell.c sqlite3.c \
|
||||
- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
|
||||
+sqlite3$(TEXE): shell.c libsqlite3.la
|
||||
+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
|
||||
+ shell.c libsqlite3.la \
|
||||
+ $(LIBREADLINE)
|
||||
|
||||
-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
|
||||
+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
|
||||
|
||||
-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
|
||||
+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
|
||||
|
||||
-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
|
||||
+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
|
||||
$(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
|
||||
- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
|
||||
+ $(TOP)/ext/misc/scrub.c libsqlite3.la
|
||||
|
||||
srcck1$(BEXE): $(TOP)/tool/srcck1.c
|
||||
$(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
|
||||
@@ -704,7 +708,7 @@
|
||||
# Rule to build the amalgamation
|
||||
#
|
||||
sqlite3.lo: sqlite3.c
|
||||
- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
|
||||
+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
|
||||
|
||||
# Rules to build the LEMON compiler generator
|
||||
#
|
||||
@@ -995,14 +999,9 @@
|
||||
# Source files that go into making shell.c
|
||||
SHELL_SRC = \
|
||||
$(TOP)/src/shell.c.in \
|
||||
- $(TOP)/ext/misc/appendvfs.c \
|
||||
$(TOP)/ext/misc/shathree.c \
|
||||
$(TOP)/ext/misc/fileio.c \
|
||||
$(TOP)/ext/misc/completion.c \
|
||||
- $(TOP)/ext/misc/sqlar.c \
|
||||
- $(TOP)/ext/expert/sqlite3expert.c \
|
||||
- $(TOP)/ext/expert/sqlite3expert.h \
|
||||
- $(TOP)/ext/misc/zipfile.c \
|
||||
$(TOP)/src/test_windirent.c
|
||||
|
||||
shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
|
||||
@@ -1161,13 +1160,13 @@
|
||||
|
||||
# Fuzz testing
|
||||
fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
|
||||
- ./fuzzcheck$(TEXE) $(FUZZDATA)
|
||||
+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
|
||||
|
||||
fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
|
||||
- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
|
||||
+ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
|
||||
|
||||
valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
|
||||
- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
|
||||
+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
|
||||
|
||||
# The veryquick.test TCL tests.
|
||||
#
|
||||
@@ -1197,24 +1196,23 @@
|
||||
smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
|
||||
./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
|
||||
|
||||
-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
|
||||
+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
|
||||
$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
|
||||
|
||||
-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
|
||||
- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
|
||||
+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
|
||||
+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
|
||||
|
||||
-sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
|
||||
+sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
|
||||
$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
|
||||
|
||||
-sqltclsh$(TEXE): sqltclsh.c
|
||||
- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
|
||||
+sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
|
||||
+ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
|
||||
|
||||
-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
|
||||
- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
|
||||
+sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
|
||||
+ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
|
||||
|
||||
CHECKER_DEPS =\
|
||||
$(TOP)/tool/mkccode.tcl \
|
||||
- sqlite3.c \
|
||||
$(TOP)/src/tclsqlite.c \
|
||||
$(TOP)/ext/repair/sqlite3_checker.tcl \
|
||||
$(TOP)/ext/repair/checkindex.c \
|
||||
@@ -1225,30 +1223,30 @@
|
||||
sqlite3_checker.c: $(CHECKER_DEPS)
|
||||
$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
|
||||
|
||||
-sqlite3_checker$(TEXE): sqlite3_checker.c
|
||||
- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
|
||||
+sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
|
||||
+ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
|
||||
|
||||
-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
|
||||
+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
|
||||
$(LTLINK) -DDBDUMP_STANDALONE -o $@ \
|
||||
- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
|
||||
+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
|
||||
|
||||
-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
|
||||
+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
|
||||
|
||||
-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
|
||||
+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
|
||||
|
||||
-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
|
||||
+showjournal$(TEXE): $(TOP)/tool/showjournal.c
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
|
||||
|
||||
-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
|
||||
+showwal$(TEXE): $(TOP)/tool/showwal.c
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
|
||||
|
||||
showshm$(TEXE): $(TOP)/tool/showshm.c
|
||||
$(LTLINK) -o $@ $(TOP)/tool/showshm.c
|
||||
|
||||
-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
|
||||
+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
|
||||
|
||||
rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
|
||||
$(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
|
||||
@@ -1267,11 +1265,11 @@
|
||||
kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
|
||||
$(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
|
||||
|
||||
-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
|
||||
- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
|
||||
+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
|
||||
+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
|
||||
|
||||
-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
|
||||
- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
|
||||
+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
|
||||
+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
|
||||
|
||||
# This target will fail if the SQLite amalgamation contains any exported
|
||||
# symbols that do not begin with "sqlite3_". It is run as part of the
|
||||
--- /configure.ac
|
||||
+++ /configure.ac
|
||||
@@ -590,6 +590,9 @@
|
||||
if test "${use_loadextension}" = "yes" ; then
|
||||
OPT_FEATURE_FLAGS=""
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
+ if test "${ac_cv_search_dlopen}" = "no" ; then
|
||||
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
|
||||
+ fi
|
||||
else
|
||||
OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
|
||||
fi
|
||||
--- /ext/misc/sqlar.c
|
||||
+++ /ext/misc/sqlar.c
|
||||
@@ -14,6 +14,8 @@
|
||||
** for working with sqlar archives and used by the shell tool's built-in
|
||||
** sqlar support.
|
||||
*/
|
||||
+#ifdef SQLITE_HAVE_ZLIB
|
||||
+
|
||||
#include "sqlite3ext.h"
|
||||
SQLITE_EXTENSION_INIT1
|
||||
#include <zlib.h>
|
||||
@@ -119,3 +121,5 @@
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
+
|
||||
+#endif /* SQLITE_HAVE_ZLIB */
|
||||
--- /ext/misc/zipfile.c
|
||||
+++ /ext/misc/zipfile.c
|
||||
@@ -24,6 +24,8 @@
|
||||
** * No support for zip64 extensions
|
||||
** * Only the "inflate/deflate" (zlib) compression method is supported
|
||||
*/
|
||||
+#ifdef SQLITE_HAVE_ZLIB
|
||||
+
|
||||
#include "sqlite3ext.h"
|
||||
SQLITE_EXTENSION_INIT1
|
||||
#include <stdio.h>
|
||||
@@ -1665,3 +1667,5 @@
|
||||
(void)pzErrMsg; /* Unused parameter */
|
||||
return zipfileRegister(db);
|
||||
}
|
||||
+
|
||||
+#endif /* SQLITE_HAVE_ZLIB */
|
||||
--- /ext/repair/sqlite3_checker.c.in
|
||||
+++ /ext/repair/sqlite3_checker.c.in
|
||||
@@ -2,6 +2,7 @@
|
||||
** Read an SQLite database file and analyze its space utilization. Generate
|
||||
** text on standard output.
|
||||
*/
|
||||
+#define SQLITE_CORE 1
|
||||
#define TCLSH_INIT_PROC sqlite3_checker_init_proc
|
||||
#define SQLITE_ENABLE_DBPAGE_VTAB 1
|
||||
#define SQLITE_ENABLE_JSON1 1
|
||||
@@ -14,7 +15,7 @@
|
||||
#define SQLITE_OMIT_SHARED_CACHE 1
|
||||
#define SQLITE_DEFAULT_MEMSTATUS 0
|
||||
#define SQLITE_MAX_EXPR_DEPTH 0
|
||||
-INCLUDE sqlite3.c
|
||||
+#include "sqlite3.h"
|
||||
INCLUDE $ROOT/src/tclsqlite.c
|
||||
INCLUDE $ROOT/ext/misc/btreeinfo.c
|
||||
INCLUDE $ROOT/ext/repair/checkindex.c
|
||||
--- /src/shell.c.in
|
||||
+++ /src/shell.c.in
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include "sqlite3.h"
|
||||
+#include "ext/expert/sqlite3expert.h"
|
||||
typedef sqlite3_int64 i64;
|
||||
typedef sqlite3_uint64 u64;
|
||||
typedef unsigned char u8;
|
||||
@@ -124,6 +125,10 @@
|
||||
# define SHELL_USE_LOCAL_GETLINE 1
|
||||
#endif
|
||||
|
||||
+#ifdef SQLITE_HAVE_ZLIB
|
||||
+#include <zlib.h>
|
||||
+#endif
|
||||
+
|
||||
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
# include <io.h>
|
||||
@@ -963,13 +968,6 @@
|
||||
INCLUDE ../ext/misc/shathree.c
|
||||
INCLUDE ../ext/misc/fileio.c
|
||||
INCLUDE ../ext/misc/completion.c
|
||||
-INCLUDE ../ext/misc/appendvfs.c
|
||||
-#ifdef SQLITE_HAVE_ZLIB
|
||||
-INCLUDE ../ext/misc/zipfile.c
|
||||
-INCLUDE ../ext/misc/sqlar.c
|
||||
-#endif
|
||||
-INCLUDE ../ext/expert/sqlite3expert.h
|
||||
-INCLUDE ../ext/expert/sqlite3expert.c
|
||||
|
||||
#if defined(SQLITE_ENABLE_SESSION)
|
||||
/*
|
||||
@@ -3467,7 +3465,9 @@
|
||||
sqlite3_shathree_init(p->db, 0, 0);
|
||||
sqlite3_completion_init(p->db, 0, 0);
|
||||
#ifdef SQLITE_HAVE_ZLIB
|
||||
+ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_zipfile_init(p->db, 0, 0);
|
||||
+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_sqlar_init(p->db, 0, 0);
|
||||
#endif
|
||||
sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
|
||||
@@ -5316,6 +5316,7 @@
|
||||
}
|
||||
sqlite3_fileio_init(cmd.db, 0, 0);
|
||||
#ifdef SQLITE_HAVE_ZLIB
|
||||
+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_sqlar_init(cmd.db, 0, 0);
|
||||
#endif
|
||||
sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
|
||||
@@ -8222,6 +8223,7 @@
|
||||
#endif
|
||||
}
|
||||
data.out = stdout;
|
||||
+ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_appendvfs_init(0,0,0);
|
||||
|
||||
/* Go ahead and open the database file if it already exists. If the
|
||||
--- /tool/mksqlite3c.tcl
|
||||
+++ /tool/mksqlite3c.tcl
|
||||
@@ -116,6 +116,7 @@
|
||||
rtree.h
|
||||
sqlite3session.h
|
||||
sqlite3.h
|
||||
+ sqlite3expert.h
|
||||
sqlite3ext.h
|
||||
sqlite3rbu.h
|
||||
sqliteicu.h
|
||||
@@ -399,6 +400,10 @@
|
||||
json1.c
|
||||
fts5.c
|
||||
stmt.c
|
||||
+ appendvfs.c
|
||||
+ sqlar.c
|
||||
+ sqlite3expert.c
|
||||
+ zipfile.c
|
||||
} {
|
||||
copy_file tsrc/$file
|
||||
}
|
||||
--- /tool/sqlite3_analyzer.c.in
|
||||
+++ /tool/sqlite3_analyzer.c.in
|
||||
@@ -14,9 +14,6 @@
|
||||
#define SQLITE_DEFAULT_MEMSTATUS 0
|
||||
#define SQLITE_MAX_EXPR_DEPTH 0
|
||||
#define SQLITE_OMIT_LOAD_EXTENSION 1
|
||||
-#ifndef USE_EXTERNAL_SQLITE
|
||||
-INCLUDE sqlite3.c
|
||||
-#endif
|
||||
INCLUDE $ROOT/src/tclsqlite.c
|
||||
|
||||
const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
|
||||
--- /tool/sqltclsh.c.in
|
||||
+++ /tool/sqltclsh.c.in
|
||||
@@ -27,19 +27,17 @@
|
||||
#define SQLITE_OMIT_SHARED_CACHE 1
|
||||
#define SQLITE_DEFAULT_MEMSTATUS 0
|
||||
#define SQLITE_MAX_EXPR_DEPTH 0
|
||||
-INCLUDE sqlite3.c
|
||||
-INCLUDE $ROOT/ext/misc/appendvfs.c
|
||||
-#ifdef SQLITE_HAVE_ZLIB
|
||||
-INCLUDE $ROOT/ext/misc/zipfile.c
|
||||
-INCLUDE $ROOT/ext/misc/sqlar.c
|
||||
-#endif
|
||||
+#include "sqlite3.h"
|
||||
INCLUDE $ROOT/src/tclsqlite.c
|
||||
|
||||
const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
|
||||
(void)interp;
|
||||
+ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
|
||||
sqlite3_appendvfs_init(0,0,0);
|
||||
#ifdef SQLITE_HAVE_ZLIB
|
||||
+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
|
||||
+ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
|
||||
#endif
|
||||
|
@ -0,0 +1,15 @@
|
||||
https://sqlite.org/src/info/6185d190e250faae
|
||||
|
||||
--- /src/sqlite3ext.h
|
||||
+++ /src/sqlite3ext.h
|
||||
@@ -563,8 +563,8 @@
|
||||
#define sqlite3_value_pointer sqlite3_api->value_pointer
|
||||
/* Version 3.22.0 and later */
|
||||
#define sqlite3_vtab_nochange sqlite3_api->vtab_nochange
|
||||
-#define sqlite3_value_nochange sqltie3_api->value_nochange
|
||||
-#define sqlite3_vtab_collation sqltie3_api->vtab_collation
|
||||
+#define sqlite3_value_nochange sqlite3_api->value_nochange
|
||||
+#define sqlite3_vtab_collation sqlite3_api->vtab_collation
|
||||
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
||||
|
||||
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
@ -0,0 +1,249 @@
|
||||
https://sqlite.org/src/info/e4766cabdf64d8e9
|
||||
https://sqlite.org/src/info/d9e59cfb8476e1ec
|
||||
https://sqlite.org/src/info/ba0631de60ca38bf
|
||||
https://sqlite.org/src/info/b685d3231097fb90
|
||||
|
||||
--- /test/fts3rank.test
|
||||
+++ /test/fts3rank.test
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
-set testprefix fts3expr5
|
||||
+set testprefix fts3rank
|
||||
|
||||
# If SQLITE_ENABLE_FTS3 is defined, omit this file.
|
||||
ifcapable !fts3 {
|
||||
@@ -56,9 +56,14 @@
|
||||
SELECT * FROM t1 ORDER BY rank(x'0000000000000000') DESC, rowid
|
||||
} {0 {{one two} one {one two} three {one two} two}}
|
||||
|
||||
-do_catchsql_test 1.5 {
|
||||
- SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
|
||||
-} {1 {invalid matchinfo blob passed to function rank()}}
|
||||
+if {$tcl_platform(byteOrder)=="littleEndian"} {
|
||||
+ do_catchsql_test 1.5le {
|
||||
+ SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
|
||||
+ } {1 {invalid matchinfo blob passed to function rank()}}
|
||||
+} else {
|
||||
+ do_catchsql_test 1.5be {
|
||||
+ SELECT * FROM t1 ORDER BY rank(x'0000000100000001') DESC, rowid
|
||||
+ } {1 {invalid matchinfo blob passed to function rank()}}
|
||||
+}
|
||||
|
||||
finish_test
|
||||
-
|
||||
--- /test/func6.test
|
||||
+++ /test/func6.test
|
||||
@@ -33,54 +33,125 @@
|
||||
CREATE TABLE t2(x TEXT PRIMARY KEY, y) WITHOUT ROWID;
|
||||
INSERT INTO t2(x,y) SELECT a, b FROM t1;
|
||||
}
|
||||
+
|
||||
+# Load the contents of $file from disk and return it encoded as a hex
|
||||
+# string.
|
||||
+proc loadhex {file} {
|
||||
+ set fd [open $file]
|
||||
+ fconfigure $fd -translation binary -encoding binary
|
||||
+ set data [read $fd]
|
||||
+ close $fd
|
||||
+ binary encode hex $data
|
||||
+}
|
||||
+
|
||||
+# Each argument is either an integer between 0 and 65535, a text value, or
|
||||
+# an empty string representing an SQL NULL. This command builds an SQLite
|
||||
+# record containing the values passed as arguments and returns it encoded
|
||||
+# as a hex string.
|
||||
+proc hexrecord {args} {
|
||||
+ set hdr ""
|
||||
+ set body ""
|
||||
+ foreach x $args {
|
||||
+ if {$x==""} {
|
||||
+ append hdr 00
|
||||
+ } elseif {[string is integer $x]==0} {
|
||||
+ set n [string length $x]
|
||||
+ append hdr [format %02x [expr $n*2 + 13]]
|
||||
+ append body [binary encode hex $x]
|
||||
+ } elseif {$x == 0} {
|
||||
+ append hdr 08
|
||||
+ } elseif {$x == 1} {
|
||||
+ append hdr 09
|
||||
+ } elseif {$x <= 127} {
|
||||
+ append hdr 01
|
||||
+ append body [format %02x $x]
|
||||
+ } else {
|
||||
+ append hdr 02
|
||||
+ append body [format %04x $x]
|
||||
+ }
|
||||
+ }
|
||||
+ set res [format %02x [expr 1 + [string length $hdr]/2]]
|
||||
+ append res $hdr
|
||||
+ append res $body
|
||||
+}
|
||||
+
|
||||
+# Argument $off is an offset into the database image encoded as a hex string
|
||||
+# in argument $hexdb. This command returns 0 if the offset contains the hex
|
||||
+# $hexrec, or throws an exception otherwise.
|
||||
+#
|
||||
+proc offset_contains_record {off hexdb hexrec} {
|
||||
+ set n [string length $hexrec]
|
||||
+ set off [expr $off*2]
|
||||
+ if { [string compare $hexrec [string range $hexdb $off [expr $off+$n-1]]] } {
|
||||
+ error "record not found!"
|
||||
+ }
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+# This command is the implementation of SQL function "offrec()". The first
|
||||
+# argument to this is an offset value. The remaining values are used to
|
||||
+# formulate an SQLite record. If database file test.db does not contain
|
||||
+# an equivalent record at the specified offset, an exception is thrown.
|
||||
+# Otherwise, 0 is returned.
|
||||
+#
|
||||
+proc offrec {args} {
|
||||
+ set offset [lindex $args 0]
|
||||
+ set rec [hexrecord {*}[lrange $args 1 end]]
|
||||
+ offset_contains_record $offset $::F $rec
|
||||
+}
|
||||
+set F [loadhex test.db]
|
||||
+db func offrec offrec
|
||||
+
|
||||
+# Test the sanity of the tests.
|
||||
+do_execsql_test func6-105 {
|
||||
+ SELECT sqlite_offset(d) FROM t1 ORDER BY rowid LIMIT 1;
|
||||
+} {8179}
|
||||
+do_test func6-106 {
|
||||
+ set r [hexrecord abc001 1 999 {}]
|
||||
+ offset_contains_record 8179 $F $r
|
||||
+} 0
|
||||
+
|
||||
+set z100 [string trim [string repeat "0 " 100]]
|
||||
+
|
||||
+# Test offsets within table b-tree t1.
|
||||
do_execsql_test func6-110 {
|
||||
- SELECT a, sqlite_offset(d)/4096 + 1,
|
||||
- sqlite_offset(d)%4096 FROM t1
|
||||
- ORDER BY rowid LIMIT 2;
|
||||
-} {abc001 2 4084 abc002 2 4069}
|
||||
+ SELECT offrec(sqlite_offset(d), a, b, c, d) FROM t1 ORDER BY rowid
|
||||
+} $z100
|
||||
+
|
||||
do_execsql_test func6-120 {
|
||||
SELECT a, typeof(sqlite_offset(+a)) FROM t1
|
||||
ORDER BY rowid LIMIT 2;
|
||||
} {abc001 null abc002 null}
|
||||
+
|
||||
+# Test offsets within index b-tree t1a.
|
||||
do_execsql_test func6-130 {
|
||||
- SELECT a, sqlite_offset(a)/4096+1,
|
||||
- sqlite_offset(a)%4096
|
||||
- FROM t1
|
||||
- ORDER BY a LIMIT 2;
|
||||
-} {abc001 3 4087 abc002 3 4076}
|
||||
+ SELECT offrec(sqlite_offset(a), a, rowid) FROM t1 ORDER BY a
|
||||
+} $z100
|
||||
+
|
||||
+# Test offsets within table b-tree t1 with a temp b-tree ORDER BY.
|
||||
do_execsql_test func6-140 {
|
||||
- SELECT a, sqlite_offset(d)/4096+1,
|
||||
- sqlite_offset(d)%4096
|
||||
- FROM t1
|
||||
- ORDER BY a LIMIT 2;
|
||||
-} {abc001 2 4084 abc002 2 4069}
|
||||
+ SELECT offrec(sqlite_offset(d), a, b, c, d) FROM t1 ORDER BY a
|
||||
+} $z100
|
||||
+
|
||||
+# Test offsets from both index t1a and table t1 in the same query.
|
||||
do_execsql_test func6-150 {
|
||||
- SELECT a,
|
||||
- sqlite_offset(a)/4096+1,
|
||||
- sqlite_offset(a)%4096,
|
||||
- sqlite_offset(d)/4096+1,
|
||||
- sqlite_offset(d)%4096
|
||||
- FROM t1
|
||||
- ORDER BY a LIMIT 2;
|
||||
-} {abc001 3 4087 2 4084 abc002 3 4076 2 4069}
|
||||
-do_execsql_test func6-160 {
|
||||
- SELECT b,
|
||||
- sqlite_offset(b)/4096+1,
|
||||
- sqlite_offset(b)%4096,
|
||||
- sqlite_offset(c)/4096+1,
|
||||
- sqlite_offset(c)%4096,
|
||||
- sqlite_offset(d)/4096+1,
|
||||
- sqlite_offset(d)%4096
|
||||
- FROM t1
|
||||
- ORDER BY b LIMIT 2;
|
||||
-} {1 4 4090 4 4090 2 4084 2 4 4081 4 4081 2 4069}
|
||||
+ SELECT offrec(sqlite_offset(a), a, rowid),
|
||||
+ offrec(sqlite_offset(d), a, b, c, d)
|
||||
+ FROM t1 ORDER BY a
|
||||
+} [concat $z100 $z100]
|
||||
|
||||
+# Test offsets from both index t1bc and table t1 in the same query.
|
||||
+do_execsql_test func6-160 {
|
||||
+ SELECT offrec(sqlite_offset(b), b, c, rowid),
|
||||
+ offrec(sqlite_offset(c), b, c, rowid),
|
||||
+ offrec(sqlite_offset(d), a, b, c, d)
|
||||
+ FROM t1
|
||||
+ ORDER BY b
|
||||
+} [concat $z100 $z100 $z100]
|
||||
|
||||
+# Test offsets in WITHOUT ROWID table t2.
|
||||
do_execsql_test func6-200 {
|
||||
- SELECT y, sqlite_offset(y)/4096+1,
|
||||
- sqlite_offset(y)%4096
|
||||
- FROM t2
|
||||
- ORDER BY x LIMIT 2;
|
||||
-} {1 5 4087 2 5 4076}
|
||||
+ SELECT offrec( sqlite_offset(y), x, y ) FROM t2 ORDER BY x
|
||||
+} $z100
|
||||
|
||||
finish_test
|
||||
--- /test/walro2.test
|
||||
+++ /test/walro2.test
|
||||
@@ -39,6 +39,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
+# Most systems allocate the *-shm file in 32KB trunks. But on UNIX systems
|
||||
+# for which the getpagesize() call returns greater than 32K, the *-shm
|
||||
+# file is allocated in page-sized units (since you cannot mmap part of
|
||||
+# a page). The following code sets variable $MINSHMSZ to the smallest
|
||||
+# possible *-shm file (i.e. the greater of 32KB and the system page-size).
|
||||
+#
|
||||
+do_execsql_test 0.0 {
|
||||
+ PRAGMA journal_mode = wal;
|
||||
+ CREATE TABLE t1(x);
|
||||
+} {wal}
|
||||
+set MINSHMSZ [file size test.db-shm]
|
||||
+
|
||||
foreach bZeroShm {0 1} {
|
||||
set TN [expr $bZeroShm+1]
|
||||
do_multiclient_test tn {
|
||||
@@ -169,7 +181,7 @@
|
||||
} {a b c d e f g h 1 2}
|
||||
do_test $TN.3.2.2 {
|
||||
list [file size test.db-wal] [file size test.db-shm]
|
||||
- } {0 32768}
|
||||
+ } [list 0 $MINSHMSZ]
|
||||
|
||||
do_test $TN.3.3.0 {
|
||||
code2 { sqlite3 db2 test.db }
|
||||
@@ -182,7 +194,7 @@
|
||||
code2 { db2 close }
|
||||
code1 { db close }
|
||||
list [file size test.db-wal] [file size test.db-shm]
|
||||
- } [list [wal_file_size 4 1024] 32768]
|
||||
+ } [list [wal_file_size 4 1024] $MINSHMSZ]
|
||||
do_test $TN.3.3.1 {
|
||||
code1 { sqlite3 db file:test.db?readonly_shm=1 }
|
||||
sql1 { SELECT * FROM t1 }
|
||||
@@ -196,7 +208,7 @@
|
||||
}
|
||||
code2 { db2 close }
|
||||
list [file size test.db-wal] [file size test.db-shm]
|
||||
- } [list [wal_file_size 4 1024] 32768]
|
||||
+ } [list [wal_file_size 4 1024] $MINSHMSZ]
|
||||
do_test $TN.3.3.3 {
|
||||
sql1 { SELECT * FROM t1 }
|
||||
} {i ii}
|
@ -0,0 +1,407 @@
|
||||
Move some code to libsqlite3.so to avoid duplication.
|
||||
Link executables against libsqlite3.so.
|
||||
Increase timeout for fuzzcheck.
|
||||
Fix building with dlopen() not available.
|
||||
|
||||
--- /Makefile.in
|
||||
+++ /Makefile.in
|
||||
@@ -308,6 +308,9 @@
|
||||
# Source code for extensions
|
||||
#
|
||||
SRC += \
|
||||
+ $(TOP)/ext/expert/sqlite3expert.c \
|
||||
+ $(TOP)/ext/expert/sqlite3expert.h
|
||||
+SRC += \
|
||||
$(TOP)/ext/fts1/fts1.c \
|
||||
$(TOP)/ext/fts1/fts1.h \
|
||||
$(TOP)/ext/fts1/fts1_hash.c \
|
||||
@@ -356,8 +359,11 @@
|
||||
$(TOP)/ext/rbu/sqlite3rbu.h \
|
||||
$(TOP)/ext/rbu/sqlite3rbu.c
|
||||
SRC += \
|
||||
+ $(TOP)/ext/misc/appendvfs.c \
|
||||
$(TOP)/ext/misc/json1.c \
|
||||
- $(TOP)/ext/misc/stmt.c
|
||||
+ $(TOP)/ext/misc/sqlar.c \
|
||||
+ $(TOP)/ext/misc/stmt.c \
|
||||
+ $(TOP)/ext/misc/zipfile.c
|
||||
|
||||
# Generated source code files
|
||||
#
|
||||
@@ -426,7 +432,6 @@
|
||||
# Statically linked extensions
|
||||
#
|
||||
TESTSRC += \
|
||||
- $(TOP)/ext/expert/sqlite3expert.c \
|
||||
$(TOP)/ext/expert/test_expert.c \
|
||||
$(TOP)/ext/misc/amatch.c \
|
||||
$(TOP)/ext/misc/carray.c \
|
||||
@@ -449,8 +454,7 @@
|
||||
$(TOP)/ext/misc/spellfix.c \
|
||||
$(TOP)/ext/misc/totype.c \
|
||||
$(TOP)/ext/misc/unionvtab.c \
|
||||
- $(TOP)/ext/misc/wholenumber.c \
|
||||
- $(TOP)/ext/misc/zipfile.c
|
||||
+ $(TOP)/ext/misc/wholenumber.c
|
||||
|
||||
# Source code to the library files needed by the test fixture
|
||||
#
|
||||
@@ -613,25 +617,25 @@
|
||||
|
||||
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
|
||||
$(LTLINK) -no-undefined -o $@ tclsqlite.lo \
|
||||
- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
|
||||
+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
|
||||
-rpath "$(TCLLIBDIR)" \
|
||||
-version-info "8:6:8" \
|
||||
-avoid-version
|
||||
|
||||
-sqlite3$(TEXE): shell.c sqlite3.c
|
||||
- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
|
||||
- shell.c sqlite3.c \
|
||||
- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
|
||||
+sqlite3$(TEXE): shell.c libsqlite3.la
|
||||
+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
|
||||
+ shell.c libsqlite3.la \
|
||||
+ $(LIBREADLINE)
|
||||
|
||||
-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
|
||||
+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
|
||||
|
||||
-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
|
||||
+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
|
||||
|
||||
-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
|
||||
+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
|
||||
$(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
|
||||
- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
|
||||
+ $(TOP)/ext/misc/scrub.c libsqlite3.la
|
||||
|
||||
srcck1$(BEXE): $(TOP)/tool/srcck1.c
|
||||
$(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
|
||||
@@ -710,7 +714,7 @@
|
||||
# Rule to build the amalgamation
|
||||
#
|
||||
sqlite3.lo: sqlite3.c
|
||||
- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
|
||||
+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
|
||||
|
||||
# Rules to build the LEMON compiler generator
|
||||
#
|
||||
@@ -1004,14 +1008,9 @@
|
||||
# Source files that go into making shell.c
|
||||
SHELL_SRC = \
|
||||
$(TOP)/src/shell.c.in \
|
||||
- $(TOP)/ext/misc/appendvfs.c \
|
||||
$(TOP)/ext/misc/shathree.c \
|
||||
$(TOP)/ext/misc/fileio.c \
|
||||
$(TOP)/ext/misc/completion.c \
|
||||
- $(TOP)/ext/misc/sqlar.c \
|
||||
- $(TOP)/ext/expert/sqlite3expert.c \
|
||||
- $(TOP)/ext/expert/sqlite3expert.h \
|
||||
- $(TOP)/ext/misc/zipfile.c \
|
||||
$(TOP)/src/test_windirent.c
|
||||
|
||||
shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
|
||||
@@ -1170,15 +1169,15 @@
|
||||
|
||||
# Fuzz testing
|
||||
fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
|
||||
- ./fuzzcheck$(TEXE) $(FUZZDATA)
|
||||
+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
|
||||
./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
|
||||
|
||||
fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
|
||||
- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
|
||||
+ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
|
||||
./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
|
||||
|
||||
valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
|
||||
- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
|
||||
+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
|
||||
valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
|
||||
|
||||
# The veryquick.test TCL tests.
|
||||
@@ -1209,24 +1208,23 @@
|
||||
smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
|
||||
./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
|
||||
|
||||
-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
|
||||
+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
|
||||
$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
|
||||
|
||||
-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
|
||||
- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
|
||||
+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
|
||||
+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
|
||||
|
||||
-sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
|
||||
+sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
|
||||
$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
|
||||
|
||||
-sqltclsh$(TEXE): sqltclsh.c
|
||||
- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
|
||||
+sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
|
||||
+ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
|
||||
|
||||
-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
|
||||
- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
|
||||
+sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
|
||||
+ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
|
||||
|
||||
CHECKER_DEPS =\
|
||||
$(TOP)/tool/mkccode.tcl \
|
||||
- sqlite3.c \
|
||||
$(TOP)/src/tclsqlite.c \
|
||||
$(TOP)/ext/repair/sqlite3_checker.tcl \
|
||||
$(TOP)/ext/repair/checkindex.c \
|
||||
@@ -1237,30 +1235,30 @@
|
||||
sqlite3_checker.c: $(CHECKER_DEPS)
|
||||
$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
|
||||
|
||||
-sqlite3_checker$(TEXE): sqlite3_checker.c
|
||||
- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
|
||||
+sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
|
||||
+ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
|
||||
|
||||
-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
|
||||
+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
|
||||
$(LTLINK) -DDBDUMP_STANDALONE -o $@ \
|
||||
- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
|
||||
+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
|
||||
|
||||
-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
|
||||
+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
|
||||
|
||||
-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
|
||||
+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
|
||||
|
||||
-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
|
||||
+showjournal$(TEXE): $(TOP)/tool/showjournal.c
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
|
||||
|
||||
-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
|
||||
+showwal$(TEXE): $(TOP)/tool/showwal.c
|
||||
+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
|
||||
|
||||
showshm$(TEXE): $(TOP)/tool/showshm.c
|
||||
$(LTLINK) -o $@ $(TOP)/tool/showshm.c
|
||||
|
||||
-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
|
||||
- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
|
||||
+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
|
||||
+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
|
||||
|
||||
rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
|
||||
$(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
|
||||
@@ -1279,11 +1277,11 @@
|
||||
kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
|
||||
$(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
|
||||
|
||||
-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
|
||||
- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
|
||||
+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
|
||||
+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
|
||||
|
||||
-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
|
||||
- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
|
||||
+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
|
||||
+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
|
||||
|
||||
# This target will fail if the SQLite amalgamation contains any exported
|
||||
# symbols that do not begin with "sqlite3_". It is run as part of the
|
||||
--- /configure.ac
|
||||
+++ /configure.ac
|
||||
@@ -590,6 +590,9 @@
|
||||
if test "${use_loadextension}" = "yes" ; then
|
||||
OPT_FEATURE_FLAGS=""
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
+ if test "${ac_cv_search_dlopen}" = "no" ; then
|
||||
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
|
||||
+ fi
|
||||
else
|
||||
OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
|
||||
fi
|
||||
--- /ext/misc/sqlar.c
|
||||
+++ /ext/misc/sqlar.c
|
||||
@@ -14,6 +14,8 @@
|
||||
** for working with sqlar archives and used by the shell tool's built-in
|
||||
** sqlar support.
|
||||
*/
|
||||
+#ifdef SQLITE_HAVE_ZLIB
|
||||
+
|
||||
#include "sqlite3ext.h"
|
||||
SQLITE_EXTENSION_INIT1
|
||||
#include <zlib.h>
|
||||
@@ -119,3 +121,5 @@
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
+
|
||||
+#endif /* SQLITE_HAVE_ZLIB */
|
||||
--- /ext/misc/zipfile.c
|
||||
+++ /ext/misc/zipfile.c
|
||||
@@ -24,6 +24,8 @@
|
||||
** * No support for zip64 extensions
|
||||
** * Only the "inflate/deflate" (zlib) compression method is supported
|
||||
*/
|
||||
+#ifdef SQLITE_HAVE_ZLIB
|
||||
+
|
||||
#include "sqlite3ext.h"
|
||||
SQLITE_EXTENSION_INIT1
|
||||
#include <stdio.h>
|
||||
@@ -2175,3 +2177,5 @@
|
||||
(void)pzErrMsg; /* Unused parameter */
|
||||
return zipfileRegister(db);
|
||||
}
|
||||
+
|
||||
+#endif /* SQLITE_HAVE_ZLIB */
|
||||
--- /ext/repair/sqlite3_checker.c.in
|
||||
+++ /ext/repair/sqlite3_checker.c.in
|
||||
@@ -2,6 +2,7 @@
|
||||
** Read an SQLite database file and analyze its space utilization. Generate
|
||||
** text on standard output.
|
||||
*/
|
||||
+#define SQLITE_CORE 1
|
||||
#define TCLSH_INIT_PROC sqlite3_checker_init_proc
|
||||
#define SQLITE_ENABLE_DBPAGE_VTAB 1
|
||||
#define SQLITE_ENABLE_JSON1 1
|
||||
@@ -14,7 +15,7 @@
|
||||
#define SQLITE_OMIT_SHARED_CACHE 1
|
||||
#define SQLITE_DEFAULT_MEMSTATUS 0
|
||||
#define SQLITE_MAX_EXPR_DEPTH 0
|
||||
-INCLUDE sqlite3.c
|
||||
+#include "sqlite3.h"
|
||||
INCLUDE $ROOT/src/tclsqlite.c
|
||||
INCLUDE $ROOT/ext/misc/btreeinfo.c
|
||||
INCLUDE $ROOT/ext/repair/checkindex.c
|
||||
--- /src/shell.c.in
|
||||
+++ /src/shell.c.in
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include "sqlite3.h"
|
||||
+#include "ext/expert/sqlite3expert.h"
|
||||
typedef sqlite3_int64 i64;
|
||||
typedef sqlite3_uint64 u64;
|
||||
typedef unsigned char u8;
|
||||
@@ -124,6 +125,10 @@
|
||||
# define SHELL_USE_LOCAL_GETLINE 1
|
||||
#endif
|
||||
|
||||
+#ifdef SQLITE_HAVE_ZLIB
|
||||
+#include <zlib.h>
|
||||
+#endif
|
||||
+
|
||||
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
# include <io.h>
|
||||
@@ -966,13 +971,6 @@
|
||||
INCLUDE ../ext/misc/shathree.c
|
||||
INCLUDE ../ext/misc/fileio.c
|
||||
INCLUDE ../ext/misc/completion.c
|
||||
-INCLUDE ../ext/misc/appendvfs.c
|
||||
-#ifdef SQLITE_HAVE_ZLIB
|
||||
-INCLUDE ../ext/misc/zipfile.c
|
||||
-INCLUDE ../ext/misc/sqlar.c
|
||||
-#endif
|
||||
-INCLUDE ../ext/expert/sqlite3expert.h
|
||||
-INCLUDE ../ext/expert/sqlite3expert.c
|
||||
|
||||
#if defined(SQLITE_ENABLE_SESSION)
|
||||
/*
|
||||
@@ -3522,7 +3520,9 @@
|
||||
sqlite3_shathree_init(p->db, 0, 0);
|
||||
sqlite3_completion_init(p->db, 0, 0);
|
||||
#ifdef SQLITE_HAVE_ZLIB
|
||||
+ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_zipfile_init(p->db, 0, 0);
|
||||
+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_sqlar_init(p->db, 0, 0);
|
||||
#endif
|
||||
sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
|
||||
@@ -5411,6 +5411,7 @@
|
||||
goto end_ar_command;
|
||||
}
|
||||
sqlite3_fileio_init(cmd.db, 0, 0);
|
||||
+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_sqlar_init(cmd.db, 0, 0);
|
||||
sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
|
||||
shellPutsFunc, 0, 0);
|
||||
@@ -8367,6 +8368,7 @@
|
||||
#endif
|
||||
}
|
||||
data.out = stdout;
|
||||
+ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_appendvfs_init(0,0,0);
|
||||
|
||||
/* Go ahead and open the database file if it already exists. If the
|
||||
--- /tool/mksqlite3c.tcl
|
||||
+++ /tool/mksqlite3c.tcl
|
||||
@@ -116,6 +116,7 @@
|
||||
rtree.h
|
||||
sqlite3session.h
|
||||
sqlite3.h
|
||||
+ sqlite3expert.h
|
||||
sqlite3ext.h
|
||||
sqlite3rbu.h
|
||||
sqliteicu.h
|
||||
@@ -400,6 +401,10 @@
|
||||
json1.c
|
||||
fts5.c
|
||||
stmt.c
|
||||
+ appendvfs.c
|
||||
+ sqlar.c
|
||||
+ sqlite3expert.c
|
||||
+ zipfile.c
|
||||
} {
|
||||
copy_file tsrc/$file
|
||||
}
|
||||
--- /tool/sqlite3_analyzer.c.in
|
||||
+++ /tool/sqlite3_analyzer.c.in
|
||||
@@ -14,9 +14,6 @@
|
||||
#define SQLITE_DEFAULT_MEMSTATUS 0
|
||||
#define SQLITE_MAX_EXPR_DEPTH 0
|
||||
#define SQLITE_OMIT_LOAD_EXTENSION 1
|
||||
-#ifndef USE_EXTERNAL_SQLITE
|
||||
-INCLUDE sqlite3.c
|
||||
-#endif
|
||||
INCLUDE $ROOT/src/tclsqlite.c
|
||||
|
||||
const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
|
||||
--- /tool/sqltclsh.c.in
|
||||
+++ /tool/sqltclsh.c.in
|
||||
@@ -27,19 +27,17 @@
|
||||
#define SQLITE_OMIT_SHARED_CACHE 1
|
||||
#define SQLITE_DEFAULT_MEMSTATUS 0
|
||||
#define SQLITE_MAX_EXPR_DEPTH 0
|
||||
-INCLUDE sqlite3.c
|
||||
-INCLUDE $ROOT/ext/misc/appendvfs.c
|
||||
-#ifdef SQLITE_HAVE_ZLIB
|
||||
-INCLUDE $ROOT/ext/misc/zipfile.c
|
||||
-INCLUDE $ROOT/ext/misc/sqlar.c
|
||||
-#endif
|
||||
+#include "sqlite3.h"
|
||||
INCLUDE $ROOT/src/tclsqlite.c
|
||||
|
||||
const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
|
||||
(void)interp;
|
||||
+ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
|
||||
sqlite3_appendvfs_init(0,0,0);
|
||||
#ifdef SQLITE_HAVE_ZLIB
|
||||
+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
|
||||
+ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
|
||||
#endif
|
||||
|
@ -0,0 +1,24 @@
|
||||
https://sqlite.org/src/info/b7178209152452e8
|
||||
|
||||
--- /src/attach.c
|
||||
+++ /src/attach.c
|
||||
@@ -502,6 +502,9 @@
|
||||
if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
|
||||
if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
|
||||
#endif
|
||||
+ if( pItem->fg.isTabFunc && sqlite3FixExprList(pFix, pItem->u1.pFuncArg) ){
|
||||
+ return 1;
|
||||
+ }
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
--- /test/triggerE.test
|
||||
+++ /test/triggerE.test
|
||||
@@ -57,6 +57,7 @@
|
||||
7 { BEFORE DELETE ON t1 BEGIN SELECT * FROM t2 ORDER BY ?; END; }
|
||||
8 { BEFORE UPDATE ON t1 BEGIN UPDATE t2 SET c = ?; END; }
|
||||
9 { BEFORE UPDATE ON t1 BEGIN UPDATE t2 SET c = 1 WHERE d = ?; END; }
|
||||
+ 10 { AFTER INSERT ON t1 BEGIN SELECT * FROM pragma_stats(?); END; }
|
||||
} {
|
||||
catchsql {drop trigger tr1}
|
||||
do_catchsql_test 1.1.$tn "CREATE TRIGGER tr1 $defn" [list 1 $errmsg]
|
@ -0,0 +1,224 @@
|
||||
https://sqlite.org/src/info/893e6089c875e947
|
||||
https://sqlite.org/src/info/576a8f69ae25883f
|
||||
https://sqlite.org/src/info/de508e831a43f02c
|
||||
|
||||
--- /ext/fts3/fts3.c
|
||||
+++ /ext/fts3/fts3.c
|
||||
@@ -3963,7 +3963,7 @@
|
||||
|
||||
#ifdef SQLITE_TEST
|
||||
if( rc==SQLITE_OK ){
|
||||
- rc = sqlite3Fts3ExprInitTestInterface(db);
|
||||
+ rc = sqlite3Fts3ExprInitTestInterface(db, pHash);
|
||||
}
|
||||
#endif
|
||||
|
||||
--- /ext/fts3/fts3Int.h
|
||||
+++ /ext/fts3/fts3Int.h
|
||||
@@ -584,7 +584,7 @@
|
||||
);
|
||||
void sqlite3Fts3ExprFree(Fts3Expr *);
|
||||
#ifdef SQLITE_TEST
|
||||
-int sqlite3Fts3ExprInitTestInterface(sqlite3 *db);
|
||||
+int sqlite3Fts3ExprInitTestInterface(sqlite3 *db, Fts3Hash*);
|
||||
int sqlite3Fts3InitTerm(sqlite3 *db);
|
||||
#endif
|
||||
|
||||
--- /ext/fts3/fts3_expr.c
|
||||
+++ /ext/fts3/fts3_expr.c
|
||||
@@ -1109,34 +1109,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
-** Function to query the hash-table of tokenizers (see README.tokenizers).
|
||||
-*/
|
||||
-static int queryTestTokenizer(
|
||||
- sqlite3 *db,
|
||||
- const char *zName,
|
||||
- const sqlite3_tokenizer_module **pp
|
||||
-){
|
||||
- int rc;
|
||||
- sqlite3_stmt *pStmt;
|
||||
- const char zSql[] = "SELECT fts3_tokenizer(?)";
|
||||
-
|
||||
- *pp = 0;
|
||||
- rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
|
||||
- if( rc!=SQLITE_OK ){
|
||||
- return rc;
|
||||
- }
|
||||
-
|
||||
- sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
|
||||
- if( SQLITE_ROW==sqlite3_step(pStmt) ){
|
||||
- if( sqlite3_column_type(pStmt, 0)==SQLITE_BLOB ){
|
||||
- memcpy((void *)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return sqlite3_finalize(pStmt);
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
** Return a pointer to a buffer containing a text representation of the
|
||||
** expression passed as the first argument. The buffer is obtained from
|
||||
** sqlite3_malloc(). It is the responsibility of the caller to use
|
||||
@@ -1203,12 +1175,12 @@
|
||||
**
|
||||
** SELECT fts3_exprtest('simple', 'Bill col2:Bloggs', 'col1', 'col2');
|
||||
*/
|
||||
-static void fts3ExprTest(
|
||||
+static void fts3ExprTestCommon(
|
||||
+ int bRebalance,
|
||||
sqlite3_context *context,
|
||||
int argc,
|
||||
sqlite3_value **argv
|
||||
){
|
||||
- sqlite3_tokenizer_module const *pModule = 0;
|
||||
sqlite3_tokenizer *pTokenizer = 0;
|
||||
int rc;
|
||||
char **azCol = 0;
|
||||
@@ -1218,7 +1190,9 @@
|
||||
int ii;
|
||||
Fts3Expr *pExpr;
|
||||
char *zBuf = 0;
|
||||
- sqlite3 *db = sqlite3_context_db_handle(context);
|
||||
+ Fts3Hash *pHash = (Fts3Hash*)sqlite3_user_data(context);
|
||||
+ const char *zTokenizer = 0;
|
||||
+ char *zErr = 0;
|
||||
|
||||
if( argc<3 ){
|
||||
sqlite3_result_error(context,
|
||||
@@ -1227,23 +1201,17 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- rc = queryTestTokenizer(db,
|
||||
- (const char *)sqlite3_value_text(argv[0]), &pModule);
|
||||
- if( rc==SQLITE_NOMEM ){
|
||||
- sqlite3_result_error_nomem(context);
|
||||
- goto exprtest_out;
|
||||
- }else if( !pModule ){
|
||||
- sqlite3_result_error(context, "No such tokenizer module", -1);
|
||||
- goto exprtest_out;
|
||||
- }
|
||||
-
|
||||
- rc = pModule->xCreate(0, 0, &pTokenizer);
|
||||
- assert( rc==SQLITE_NOMEM || rc==SQLITE_OK );
|
||||
- if( rc==SQLITE_NOMEM ){
|
||||
- sqlite3_result_error_nomem(context);
|
||||
- goto exprtest_out;
|
||||
+ zTokenizer = (const char*)sqlite3_value_text(argv[0]);
|
||||
+ rc = sqlite3Fts3InitTokenizer(pHash, zTokenizer, &pTokenizer, &zErr);
|
||||
+ if( rc!=SQLITE_OK ){
|
||||
+ if( rc==SQLITE_NOMEM ){
|
||||
+ sqlite3_result_error_nomem(context);
|
||||
+ }else{
|
||||
+ sqlite3_result_error(context, zErr, -1);
|
||||
+ }
|
||||
+ sqlite3_free(zErr);
|
||||
+ return;
|
||||
}
|
||||
- pTokenizer->pModule = pModule;
|
||||
|
||||
zExpr = (const char *)sqlite3_value_text(argv[1]);
|
||||
nExpr = sqlite3_value_bytes(argv[1]);
|
||||
@@ -1257,7 +1225,7 @@
|
||||
azCol[ii] = (char *)sqlite3_value_text(argv[ii+2]);
|
||||
}
|
||||
|
||||
- if( sqlite3_user_data(context) ){
|
||||
+ if( bRebalance ){
|
||||
char *zDummy = 0;
|
||||
rc = sqlite3Fts3ExprParse(
|
||||
pTokenizer, 0, azCol, 0, nCol, nCol, zExpr, nExpr, &pExpr, &zDummy
|
||||
@@ -1283,23 +1251,38 @@
|
||||
sqlite3Fts3ExprFree(pExpr);
|
||||
|
||||
exprtest_out:
|
||||
- if( pModule && pTokenizer ){
|
||||
- rc = pModule->xDestroy(pTokenizer);
|
||||
+ if( pTokenizer ){
|
||||
+ rc = pTokenizer->pModule->xDestroy(pTokenizer);
|
||||
}
|
||||
sqlite3_free(azCol);
|
||||
}
|
||||
|
||||
+static void fts3ExprTest(
|
||||
+ sqlite3_context *context,
|
||||
+ int argc,
|
||||
+ sqlite3_value **argv
|
||||
+){
|
||||
+ fts3ExprTestCommon(0, context, argc, argv);
|
||||
+}
|
||||
+static void fts3ExprTestRebalance(
|
||||
+ sqlite3_context *context,
|
||||
+ int argc,
|
||||
+ sqlite3_value **argv
|
||||
+){
|
||||
+ fts3ExprTestCommon(1, context, argc, argv);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
** Register the query expression parser test function fts3_exprtest()
|
||||
** with database connection db.
|
||||
*/
|
||||
-int sqlite3Fts3ExprInitTestInterface(sqlite3* db){
|
||||
+int sqlite3Fts3ExprInitTestInterface(sqlite3 *db, Fts3Hash *pHash){
|
||||
int rc = sqlite3_create_function(
|
||||
- db, "fts3_exprtest", -1, SQLITE_UTF8, 0, fts3ExprTest, 0, 0
|
||||
+ db, "fts3_exprtest", -1, SQLITE_UTF8, (void*)pHash, fts3ExprTest, 0, 0
|
||||
);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3_create_function(db, "fts3_exprtest_rebalance",
|
||||
- -1, SQLITE_UTF8, (void *)1, fts3ExprTest, 0, 0
|
||||
+ -1, SQLITE_UTF8, (void*)pHash, fts3ExprTestRebalance, 0, 0
|
||||
);
|
||||
}
|
||||
return rc;
|
||||
--- /test/fts3expr.test
|
||||
+++ /test/fts3expr.test
|
||||
@@ -409,7 +409,7 @@
|
||||
} {1 {Usage: fts3_exprtest(tokenizer, expr, col1, ...}}
|
||||
do_test fts3expr-5.2 {
|
||||
catchsql { SELECT fts3_exprtest('doesnotexist', 'a b', 'c') }
|
||||
-} {1 {No such tokenizer module}}
|
||||
+} {1 {unknown tokenizer: doesnotexist}}
|
||||
do_test fts3expr-5.3 {
|
||||
catchsql { SELECT fts3_exprtest('simple', 'a b OR', 'c') }
|
||||
} {1 {Error parsing expression}}
|
||||
--- /test/fts3expr4.test
|
||||
+++ /test/fts3expr4.test
|
||||
@@ -29,7 +29,8 @@
|
||||
}
|
||||
|
||||
proc do_icu_expr_test {tn expr res} {
|
||||
- uplevel [list do_test $tn [list test_fts3expr icu $expr] [list {*}$res]]
|
||||
+ set res2 [list {*}$res]
|
||||
+ uplevel [list do_test $tn [list test_fts3expr "icu en_US" $expr] $res2]
|
||||
}
|
||||
|
||||
proc do_simple_expr_test {tn expr res} {
|
||||
--- /test/zipfile2.test
|
||||
+++ /test/zipfile2.test
|
||||
@@ -52,17 +52,15 @@
|
||||
CREATE VIRTUAL TABLE fff USING zipfile('test''zip');
|
||||
}
|
||||
|
||||
-if {$::tcl_platform(platform)=="windows"} {
|
||||
- set res {1 {cannot open file: testdir}}
|
||||
-} else {
|
||||
- set res {1 {error in fread()}}
|
||||
-}
|
||||
do_test 2.0 {
|
||||
forcedelete testdir
|
||||
file mkdir testdir
|
||||
execsql { CREATE VIRTUAL TABLE hhh USING zipfile('testdir') }
|
||||
- catchsql { SELECT * FROM hhh }
|
||||
-} $res
|
||||
+ lindex [catchsql {
|
||||
+ SELECT * FROM hhh;
|
||||
+ INSERT INTO hhh(name, data) VALUES('1.txt', 'file data');
|
||||
+ }] 0
|
||||
+} 1
|
||||
|
||||
|
||||
set archive {
|
@ -0,0 +1,14 @@
|
||||
https://sqlite.org/src/info/b7178209152452e8
|
||||
|
||||
--- /sqlite3.c
|
||||
+++ /sqlite3.c
|
||||
@@ -102780,6 +102780,9 @@
|
||||
if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
|
||||
if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
|
||||
#endif
|
||||
+ if( pItem->fg.isTabFunc && sqlite3FixExprList(pFix, pItem->u1.pFuncArg) ){
|
||||
+ return 1;
|
||||
+ }
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,239 +0,0 @@
|
||||
# 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 multilib multilib-minimal toolchain-funcs versionator
|
||||
|
||||
SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
|
||||
DOC_PV="${SRC_PV}"
|
||||
# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
|
||||
|
||||
DESCRIPTION="A SQL Database Engine in a C Library"
|
||||
HOMEPAGE="https://sqlite.org/"
|
||||
SRC_URI="doc? ( https://sqlite.org/2016/${PN}-doc-${DOC_PV}.zip )
|
||||
tcl? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
test? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
tools? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
!tcl? ( !test? ( !tools? ( https://sqlite.org/2016/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="3"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
|
||||
|
||||
RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
|
||||
readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
|
||||
tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
|
||||
tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-arch/unzip )
|
||||
tcl? ( app-arch/unzip )
|
||||
test? (
|
||||
app-arch/unzip
|
||||
dev-lang/tcl:0[${MULTILIB_USEDEP}]
|
||||
)
|
||||
tools? ( app-arch/unzip )"
|
||||
|
||||
full_tarball() {
|
||||
use tcl || use test || use tools
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if full_tarball; then
|
||||
S="${WORKDIR}/${PN}-src-${SRC_PV}"
|
||||
else
|
||||
S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if full_tarball; then
|
||||
epatch "${FILESDIR}/${PN}-3.11.0-full_tarball-build.patch"
|
||||
epatch "${FILESDIR}/${PN}-3.11.0-full_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch"
|
||||
|
||||
# Fix shell1-5.0 test.
|
||||
# https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2015-May/002575.html
|
||||
sed -e "/if {\$i==0x0D /s/\$i==0x0D /&|| (\$i>=0xE0 \&\& \$i<=0xEF) /" -i test/shell1.test
|
||||
else
|
||||
epatch "${FILESDIR}/${PN}-3.11.0-nonfull_tarball-build.patch"
|
||||
epatch "${FILESDIR}/${PN}-3.11.0-nonfull_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch"
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local CPPFLAGS="${CPPFLAGS}" options=()
|
||||
|
||||
options+=(
|
||||
--enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
|
||||
--enable-threadsafe
|
||||
)
|
||||
if ! full_tarball; then
|
||||
options+=(--disable-static-shell)
|
||||
fi
|
||||
|
||||
# Support detection of misuse of SQLite API.
|
||||
# https://sqlite.org/compile.html#enable_api_armor
|
||||
append-cppflags -DSQLITE_ENABLE_API_ARMOR
|
||||
|
||||
# Support column metadata functions.
|
||||
# https://sqlite.org/c3ref/column_database_name.html
|
||||
append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
|
||||
|
||||
# Support dbstat virtual table.
|
||||
# https://sqlite.org/dbstat.html
|
||||
append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||
|
||||
# Support Full-Text Search versions 3, 4 and 5.
|
||||
# https://sqlite.org/fts3.html
|
||||
# https://sqlite.org/fts5.html
|
||||
append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
|
||||
options+=(--enable-fts5)
|
||||
|
||||
# Support hidden columns.
|
||||
append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
|
||||
|
||||
# Support JSON1 extension.
|
||||
# https://sqlite.org/json1.html
|
||||
append-cppflags -DSQLITE_ENABLE_JSON1
|
||||
|
||||
# Support Resumable Bulk Update extension.
|
||||
# https://sqlite.org/rbu.html
|
||||
append-cppflags -DSQLITE_ENABLE_RBU
|
||||
|
||||
# Support R*Trees.
|
||||
# https://sqlite.org/rtree.html
|
||||
append-cppflags -DSQLITE_ENABLE_RTREE
|
||||
|
||||
# Support scan status functions.
|
||||
# https://sqlite.org/c3ref/stmt_scanstatus.html
|
||||
# https://sqlite.org/c3ref/stmt_scanstatus_reset.html
|
||||
append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
|
||||
|
||||
# Support unlock notification.
|
||||
# https://sqlite.org/unlock_notify.html
|
||||
append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
|
||||
|
||||
# Support soundex() function.
|
||||
# https://sqlite.org/lang_corefunc.html#soundex
|
||||
append-cppflags -DSQLITE_SOUNDEX
|
||||
|
||||
# debug USE flag.
|
||||
if full_tarball; then
|
||||
options+=($(use_enable debug))
|
||||
else
|
||||
if use debug; then
|
||||
append-cppflags -DSQLITE_DEBUG
|
||||
else
|
||||
append-cppflags -DNDEBUG
|
||||
fi
|
||||
fi
|
||||
|
||||
# icu USE flag.
|
||||
if use icu; then
|
||||
# Support ICU extension.
|
||||
# https://sqlite.org/compile.html#enable_icu
|
||||
append-cppflags -DSQLITE_ENABLE_ICU
|
||||
if full_tarball; then
|
||||
sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
|
||||
else
|
||||
sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
# readline USE flag.
|
||||
options+=(
|
||||
--disable-editline
|
||||
$(use_enable readline)
|
||||
)
|
||||
if full_tarball && use readline; then
|
||||
options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
|
||||
fi
|
||||
|
||||
# secure-delete USE flag.
|
||||
if use secure-delete; then
|
||||
# Enable secure_delete pragma by default.
|
||||
# https://sqlite.org/pragma.html#pragma_secure_delete
|
||||
append-cppflags -DSQLITE_SECURE_DELETE
|
||||
fi
|
||||
|
||||
# static-libs USE flag.
|
||||
options+=($(use_enable static-libs static))
|
||||
|
||||
# tcl, test, tools USE flags.
|
||||
if full_tarball; then
|
||||
options+=(--enable-tcl)
|
||||
fi
|
||||
|
||||
if [[ "${CHOST}" == *-mint* ]]; then
|
||||
append-cppflags -DSQLITE_OMIT_WAL
|
||||
fi
|
||||
|
||||
# Use pread(), pread64(), pwrite(), pwrite64() functions for better performance if they are available.
|
||||
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -Werror=implicit-function-declaration -x c - -o "${T}/pread_pwrite_test" <<< $'#include <unistd.h>\nint main()\n{\n pread(0, NULL, 0, 0);\n pwrite(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then
|
||||
append-cppflags -DUSE_PREAD
|
||||
fi
|
||||
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -Werror=implicit-function-declaration -x c - -o "${T}/pread64_pwrite64_test" <<< $'#include <unistd.h>\nint main()\n{\n pread64(0, NULL, 0, 0);\n pwrite64(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then
|
||||
append-cppflags -DUSE_PREAD64
|
||||
elif $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -D_LARGEFILE64_SOURCE -Werror=implicit-function-declaration -x c - -o "${T}/pread64_pwrite64_test" <<< $'#include <unistd.h>\nint main()\n{\n pread64(0, NULL, 0, 0);\n pwrite64(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then
|
||||
append-cppflags -DUSE_PREAD64 -D_LARGEFILE64_SOURCE
|
||||
fi
|
||||
|
||||
econf "${options[@]}"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
|
||||
|
||||
if use tools && multilib_is_native_abi; then
|
||||
emake rbu showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
if [[ "${EUID}" -eq 0 ]]; then
|
||||
ewarn "Skipping tests due to root permissions"
|
||||
return
|
||||
fi
|
||||
|
||||
emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
|
||||
|
||||
if use tools && multilib_is_native_abi; then
|
||||
install_tool() {
|
||||
if [[ -f ".libs/${1}" ]]; then
|
||||
newbin ".libs/${1}" "${2}"
|
||||
else
|
||||
newbin "${1}" "${2}"
|
||||
fi
|
||||
}
|
||||
|
||||
install_tool rbu sqlite3-rbu
|
||||
install_tool showdb sqlite3-show-db
|
||||
install_tool showjournal sqlite3-show-journal
|
||||
install_tool showstat4 sqlite3-show-stat4
|
||||
install_tool showwal sqlite3-show-wal
|
||||
install_tool sqldiff sqlite3-diff
|
||||
install_tool sqlite3_analyzer sqlite3-analyzer
|
||||
|
||||
unset -f install_tool
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
prune_libtool_files
|
||||
|
||||
doman sqlite3.1
|
||||
|
||||
if use doc; then
|
||||
dohtml -A ico,odf,odg,pdf,svg -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"
|
||||
fi
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
|
||||
|
||||
@ -12,15 +11,15 @@ DOC_PV="${SRC_PV}"
|
||||
|
||||
DESCRIPTION="A SQL Database Engine in a C Library"
|
||||
HOMEPAGE="https://sqlite.org/"
|
||||
SRC_URI="doc? ( https://sqlite.org/2016/${PN}-doc-${DOC_PV}.zip )
|
||||
tcl? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
test? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
tools? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
!tcl? ( !test? ( !tools? ( https://sqlite.org/2016/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
|
||||
SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
|
||||
tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
|
||||
test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
|
||||
tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
|
||||
!tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="3"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
|
||||
|
||||
RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
|
||||
@ -50,25 +49,43 @@ pkg_setup() {
|
||||
|
||||
src_prepare() {
|
||||
if full_tarball; then
|
||||
epatch "${FILESDIR}/${PN}-3.13.0-full_tarball-build.patch"
|
||||
eapply -p0 "${FILESDIR}/${PN}-3.20.0-full_tarball-build.patch"
|
||||
eapply -p0 "${FILESDIR}/${PN}-3.20.1-full_tarball-csv-unsigned_char.patch"
|
||||
eapply -p0 "${FILESDIR}/${PN}-3.20.1-full_tarball-tests-big-endian.patch"
|
||||
|
||||
eapply_user
|
||||
|
||||
# Fix AC_CHECK_FUNCS.
|
||||
# https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
|
||||
sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac
|
||||
sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac || die "sed failed"
|
||||
else
|
||||
epatch "${FILESDIR}/${PN}-3.12.0-nonfull_tarball-build.patch"
|
||||
eapply -p0 "${FILESDIR}/${PN}-3.16.0-nonfull_tarball-build.patch"
|
||||
|
||||
eapply_user
|
||||
|
||||
# Fix AC_CHECK_FUNCS.
|
||||
# https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
|
||||
sed \
|
||||
-e "s/AC_CHECK_FUNCS(\[fdatasync.*/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" \
|
||||
-e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
|
||||
-i configure.ac
|
||||
-i configure.ac || die "sed failed"
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
|
||||
multilib_copy_sources
|
||||
|
||||
preparation() {
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
|
||||
if full_tarball && [[ "${ABI}" == "x86" ]]; then
|
||||
# Disable tests broken on x86.
|
||||
sed -e "/^for {set i 0} {\$i<1000} {incr i} {$/,/^}$/d" -i test/date.test || die "sed failed"
|
||||
fi
|
||||
|
||||
popd > /dev/null || die
|
||||
}
|
||||
multilib_foreach_abi preparation
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
@ -111,6 +128,10 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/json1.html
|
||||
append-cppflags -DSQLITE_ENABLE_JSON1
|
||||
|
||||
# Support memsys5 memory allocator.
|
||||
# https://sqlite.org/malloc.html#memsys5
|
||||
append-cppflags -DSQLITE_ENABLE_MEMSYS5
|
||||
|
||||
# Support Resumable Bulk Update extension.
|
||||
# https://sqlite.org/rbu.html
|
||||
append-cppflags -DSQLITE_ENABLE_RBU
|
||||
@ -128,6 +149,10 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/sessionintro.html
|
||||
options+=(--enable-session)
|
||||
|
||||
# Support unknown() function.
|
||||
# https://sqlite.org/compile.html#enable_unknown_sql_function
|
||||
append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
|
||||
# Support unlock notification.
|
||||
# https://sqlite.org/unlock_notify.html
|
||||
append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
|
||||
@ -194,7 +219,7 @@ multilib_src_compile() {
|
||||
emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
|
||||
|
||||
if use tools && multilib_is_native_abi; then
|
||||
emake changeset rbu showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
|
||||
emake changeset dbdump dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
|
||||
fi
|
||||
}
|
||||
|
||||
@ -220,7 +245,10 @@ multilib_src_install() {
|
||||
}
|
||||
|
||||
install_tool changeset sqlite3-changeset
|
||||
install_tool dbdump sqlite3-db-dump
|
||||
install_tool dbhash sqlite3-db-hash
|
||||
install_tool rbu sqlite3-rbu
|
||||
install_tool scrub sqlite3-scrub
|
||||
install_tool showdb sqlite3-show-db
|
||||
install_tool showjournal sqlite3-show-journal
|
||||
install_tool showstat4 sqlite3-show-stat4
|
||||
@ -238,6 +266,10 @@ multilib_src_install_all() {
|
||||
doman sqlite3.1
|
||||
|
||||
if use doc; then
|
||||
dohtml -A ico,odf,odg,pdf,svg -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"
|
||||
rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
|
||||
(
|
||||
docinto html
|
||||
dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
|
||||
)
|
||||
fi
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
|
||||
|
||||
@ -12,15 +11,15 @@ DOC_PV="${SRC_PV}"
|
||||
|
||||
DESCRIPTION="A SQL Database Engine in a C Library"
|
||||
HOMEPAGE="https://sqlite.org/"
|
||||
SRC_URI="doc? ( https://sqlite.org/2016/${PN}-doc-${DOC_PV}.zip )
|
||||
tcl? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
test? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
tools? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
!tcl? ( !test? ( !tools? ( https://sqlite.org/2016/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
|
||||
SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
|
||||
tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
|
||||
test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
|
||||
tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
|
||||
!tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="3"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
|
||||
|
||||
RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
|
||||
@ -36,12 +35,12 @@ DEPEND="${RDEPEND}
|
||||
)
|
||||
tools? ( app-arch/unzip )"
|
||||
|
||||
full_tarball() {
|
||||
full_archive() {
|
||||
use tcl || use test || use tools
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
S="${WORKDIR}/${PN}-src-${SRC_PV}"
|
||||
else
|
||||
S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
|
||||
@ -49,21 +48,28 @@ pkg_setup() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if full_tarball; then
|
||||
epatch "${FILESDIR}/${PN}-3.11.0-full_tarball-build.patch"
|
||||
if full_archive; then
|
||||
eapply "${FILESDIR}/${PN}-3.21.0-full_archive-build.patch"
|
||||
|
||||
eapply_user
|
||||
|
||||
# Fix AC_CHECK_FUNCS.
|
||||
# https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
|
||||
sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac
|
||||
sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac || die "sed failed"
|
||||
|
||||
# https://sqlite.org/src/info/bf09fa683ea42b75
|
||||
sed -e "s:cp tsrc/shell\.c tsrc/sqlite3ext\.h \.:cp tsrc/sqlite3ext.h .:" -i Makefile.in || die "sed failed"
|
||||
else
|
||||
epatch "${FILESDIR}/${PN}-3.12.0-nonfull_tarball-build.patch"
|
||||
eapply "${FILESDIR}/${PN}-3.21.0-nonfull_archive-build.patch"
|
||||
|
||||
eapply_user
|
||||
|
||||
# Fix AC_CHECK_FUNCS.
|
||||
# https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
|
||||
sed \
|
||||
-e "s/AC_CHECK_FUNCS(\[fdatasync.*/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" \
|
||||
-e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
|
||||
-i configure.ac
|
||||
-i configure.ac || die "sed failed"
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
@ -72,13 +78,13 @@ src_prepare() {
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local CPPFLAGS="${CPPFLAGS}" options=()
|
||||
local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
|
||||
|
||||
options+=(
|
||||
--enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
|
||||
--enable-$(full_archive && echo load-extension || echo dynamic-extensions)
|
||||
--enable-threadsafe
|
||||
)
|
||||
if ! full_tarball; then
|
||||
if ! full_archive; then
|
||||
options+=(--disable-static-shell)
|
||||
fi
|
||||
|
||||
@ -90,6 +96,10 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/c3ref/column_database_name.html
|
||||
append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
|
||||
|
||||
# Support sqlite_dbpage virtual table.
|
||||
# https://sqlite.org/compile.html#enable_dbpage_vtab
|
||||
append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
|
||||
|
||||
# Support dbstat virtual table.
|
||||
# https://sqlite.org/dbstat.html
|
||||
append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||
@ -111,6 +121,10 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/json1.html
|
||||
append-cppflags -DSQLITE_ENABLE_JSON1
|
||||
|
||||
# Support memsys5 memory allocator.
|
||||
# https://sqlite.org/malloc.html#memsys5
|
||||
append-cppflags -DSQLITE_ENABLE_MEMSYS5
|
||||
|
||||
# Support Resumable Bulk Update extension.
|
||||
# https://sqlite.org/rbu.html
|
||||
append-cppflags -DSQLITE_ENABLE_RBU
|
||||
@ -124,16 +138,32 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/c3ref/stmt_scanstatus_reset.html
|
||||
append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
|
||||
|
||||
# Support sqlite_stmt virtual table.
|
||||
# https://sqlite.org/stmt.html
|
||||
append-cppflags -DSQLITE_ENABLE_STMTVTAB
|
||||
|
||||
# Support Session extension.
|
||||
# https://sqlite.org/sessionintro.html
|
||||
options+=(--enable-session)
|
||||
|
||||
# Support unknown() function.
|
||||
# https://sqlite.org/compile.html#enable_unknown_sql_function
|
||||
append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
|
||||
# Support unlock notification.
|
||||
# https://sqlite.org/unlock_notify.html
|
||||
append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
|
||||
|
||||
# Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
|
||||
# https://sqlite.org/compile.html#enable_update_delete_limit
|
||||
append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
|
||||
|
||||
# Support soundex() function.
|
||||
# https://sqlite.org/lang_corefunc.html#soundex
|
||||
append-cppflags -DSQLITE_SOUNDEX
|
||||
|
||||
# debug USE flag.
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
options+=($(use_enable debug))
|
||||
else
|
||||
if use debug; then
|
||||
@ -148,7 +178,7 @@ multilib_src_configure() {
|
||||
# Support ICU extension.
|
||||
# https://sqlite.org/compile.html#enable_icu
|
||||
append-cppflags -DSQLITE_ENABLE_ICU
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
|
||||
else
|
||||
sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
|
||||
@ -160,7 +190,7 @@ multilib_src_configure() {
|
||||
--disable-editline
|
||||
$(use_enable readline)
|
||||
)
|
||||
if full_tarball && use readline; then
|
||||
if full_archive && use readline; then
|
||||
options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
|
||||
fi
|
||||
|
||||
@ -175,7 +205,7 @@ multilib_src_configure() {
|
||||
options+=($(use_enable static-libs static))
|
||||
|
||||
# tcl, test, tools USE flags.
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
options+=(--enable-tcl)
|
||||
fi
|
||||
|
||||
@ -183,6 +213,14 @@ multilib_src_configure() {
|
||||
append-cppflags -DSQLITE_OMIT_WAL
|
||||
fi
|
||||
|
||||
if [[ "${ABI}" == "x86" ]]; then
|
||||
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
|
||||
append-cflags -mfpmath=sse
|
||||
else
|
||||
append-cflags -ffloat-store
|
||||
fi
|
||||
fi
|
||||
|
||||
econf "${options[@]}"
|
||||
}
|
||||
|
||||
@ -190,7 +228,7 @@ multilib_src_compile() {
|
||||
emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
|
||||
|
||||
if use tools && multilib_is_native_abi; then
|
||||
emake rbu showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
|
||||
emake changeset dbdump dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
|
||||
fi
|
||||
}
|
||||
|
||||
@ -215,7 +253,11 @@ multilib_src_install() {
|
||||
fi
|
||||
}
|
||||
|
||||
install_tool changeset sqlite3-changeset
|
||||
install_tool dbdump sqlite3-db-dump
|
||||
install_tool dbhash sqlite3-db-hash
|
||||
install_tool rbu sqlite3-rbu
|
||||
install_tool scrub sqlite3-scrub
|
||||
install_tool showdb sqlite3-show-db
|
||||
install_tool showjournal sqlite3-show-journal
|
||||
install_tool showstat4 sqlite3-show-stat4
|
||||
@ -233,6 +275,10 @@ multilib_src_install_all() {
|
||||
doman sqlite3.1
|
||||
|
||||
if use doc; then
|
||||
dohtml -A ico,odf,odg,pdf,svg -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"
|
||||
rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
|
||||
(
|
||||
docinto html
|
||||
dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
|
||||
)
|
||||
fi
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
|
||||
|
||||
@ -12,18 +11,19 @@ DOC_PV="${SRC_PV}"
|
||||
|
||||
DESCRIPTION="A SQL Database Engine in a C Library"
|
||||
HOMEPAGE="https://sqlite.org/"
|
||||
SRC_URI="doc? ( https://sqlite.org/2016/${PN}-doc-${DOC_PV}.zip )
|
||||
tcl? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
test? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
tools? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
!tcl? ( !test? ( !tools? ( https://sqlite.org/2016/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
|
||||
SRC_URI="doc? ( https://sqlite.org/2018/${PN}-doc-${DOC_PV}.zip )
|
||||
tcl? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
|
||||
test? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
|
||||
tools? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
|
||||
!tcl? ( !test? ( !tools? ( https://sqlite.org/2018/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="3"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
|
||||
|
||||
RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
|
||||
RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
|
||||
icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
|
||||
readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
|
||||
tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
|
||||
tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
|
||||
@ -36,12 +36,12 @@ DEPEND="${RDEPEND}
|
||||
)
|
||||
tools? ( app-arch/unzip )"
|
||||
|
||||
full_tarball() {
|
||||
full_archive() {
|
||||
use tcl || use test || use tools
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
S="${WORKDIR}/${PN}-src-${SRC_PV}"
|
||||
else
|
||||
S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
|
||||
@ -49,21 +49,28 @@ pkg_setup() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if full_tarball; then
|
||||
epatch "${FILESDIR}/${PN}-3.11.0-full_tarball-build.patch"
|
||||
if full_archive; then
|
||||
eapply "${FILESDIR}/${PN}-3.22.0-full_archive-build.patch"
|
||||
eapply "${FILESDIR}/${PN}-3.22.0-full_archive-headers.patch"
|
||||
eapply "${FILESDIR}/${PN}-3.22.0-full_archive-tests.patch"
|
||||
|
||||
eapply_user
|
||||
|
||||
# Fix AC_CHECK_FUNCS.
|
||||
# https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
|
||||
sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac
|
||||
sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac || die "sed failed"
|
||||
else
|
||||
epatch "${FILESDIR}/${PN}-3.12.0-nonfull_tarball-build.patch"
|
||||
eapply "${FILESDIR}/${PN}-3.21.0-nonfull_archive-build.patch"
|
||||
eapply -p2 "${FILESDIR}/${PN}-3.22.0-full_archive-headers.patch"
|
||||
|
||||
eapply_user
|
||||
|
||||
# Fix AC_CHECK_FUNCS.
|
||||
# https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
|
||||
sed \
|
||||
-e "s/AC_CHECK_FUNCS(\[fdatasync.*/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" \
|
||||
-e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
|
||||
-i configure.ac
|
||||
-i configure.ac || die "sed failed"
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
@ -72,13 +79,13 @@ src_prepare() {
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local CPPFLAGS="${CPPFLAGS}" options=()
|
||||
local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
|
||||
|
||||
options+=(
|
||||
--enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
|
||||
--enable-$(full_archive && echo load-extension || echo dynamic-extensions)
|
||||
--enable-threadsafe
|
||||
)
|
||||
if ! full_tarball; then
|
||||
if ! full_archive; then
|
||||
options+=(--disable-static-shell)
|
||||
fi
|
||||
|
||||
@ -90,6 +97,10 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/c3ref/column_database_name.html
|
||||
append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
|
||||
|
||||
# Support sqlite_dbpage virtual table.
|
||||
# https://sqlite.org/compile.html#enable_dbpage_vtab
|
||||
append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
|
||||
|
||||
# Support dbstat virtual table.
|
||||
# https://sqlite.org/dbstat.html
|
||||
append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||
@ -111,6 +122,18 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/json1.html
|
||||
append-cppflags -DSQLITE_ENABLE_JSON1
|
||||
|
||||
# Support memsys5 memory allocator.
|
||||
# https://sqlite.org/malloc.html#memsys5
|
||||
append-cppflags -DSQLITE_ENABLE_MEMSYS5
|
||||
|
||||
# Support sqlite_offset() function.
|
||||
# https://sqlite.org/lang_corefunc.html#sqlite_offset
|
||||
append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
|
||||
|
||||
# Support pre-update hook functions.
|
||||
# https://sqlite.org/c3ref/preupdate_count.html
|
||||
append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
|
||||
|
||||
# Support Resumable Bulk Update extension.
|
||||
# https://sqlite.org/rbu.html
|
||||
append-cppflags -DSQLITE_ENABLE_RBU
|
||||
@ -124,16 +147,38 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/c3ref/stmt_scanstatus_reset.html
|
||||
append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
|
||||
|
||||
# Support sqlite_stmt virtual table.
|
||||
# https://sqlite.org/stmt.html
|
||||
append-cppflags -DSQLITE_ENABLE_STMTVTAB
|
||||
|
||||
# Support Session extension.
|
||||
# https://sqlite.org/sessionintro.html
|
||||
options+=(--enable-session)
|
||||
|
||||
# Support unknown() function.
|
||||
# https://sqlite.org/compile.html#enable_unknown_sql_function
|
||||
append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
|
||||
# Support unlock notification.
|
||||
# https://sqlite.org/unlock_notify.html
|
||||
append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
|
||||
|
||||
# Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
|
||||
# https://sqlite.org/compile.html#enable_update_delete_limit
|
||||
append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
|
||||
|
||||
# Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
|
||||
# https://sqlite.org/pragma.html#pragma_function_list
|
||||
# https://sqlite.org/pragma.html#pragma_module_list
|
||||
# https://sqlite.org/pragma.html#pragma_pragma_list
|
||||
append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
|
||||
|
||||
# Support soundex() function.
|
||||
# https://sqlite.org/lang_corefunc.html#soundex
|
||||
append-cppflags -DSQLITE_SOUNDEX
|
||||
|
||||
# debug USE flag.
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
options+=($(use_enable debug))
|
||||
else
|
||||
if use debug; then
|
||||
@ -148,7 +193,7 @@ multilib_src_configure() {
|
||||
# Support ICU extension.
|
||||
# https://sqlite.org/compile.html#enable_icu
|
||||
append-cppflags -DSQLITE_ENABLE_ICU
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
|
||||
else
|
||||
sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
|
||||
@ -160,7 +205,7 @@ multilib_src_configure() {
|
||||
--disable-editline
|
||||
$(use_enable readline)
|
||||
)
|
||||
if full_tarball && use readline; then
|
||||
if full_archive && use readline; then
|
||||
options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
|
||||
fi
|
||||
|
||||
@ -175,7 +220,7 @@ multilib_src_configure() {
|
||||
options+=($(use_enable static-libs static))
|
||||
|
||||
# tcl, test, tools USE flags.
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
options+=(--enable-tcl)
|
||||
fi
|
||||
|
||||
@ -183,6 +228,14 @@ multilib_src_configure() {
|
||||
append-cppflags -DSQLITE_OMIT_WAL
|
||||
fi
|
||||
|
||||
if [[ "${ABI}" == "x86" ]]; then
|
||||
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
|
||||
append-cflags -mfpmath=sse
|
||||
else
|
||||
append-cflags -ffloat-store
|
||||
fi
|
||||
fi
|
||||
|
||||
econf "${options[@]}"
|
||||
}
|
||||
|
||||
@ -190,7 +243,7 @@ multilib_src_compile() {
|
||||
emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
|
||||
|
||||
if use tools && multilib_is_native_abi; then
|
||||
emake rbu showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
|
||||
emake changeset dbdump dbhash rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
|
||||
fi
|
||||
}
|
||||
|
||||
@ -215,13 +268,21 @@ multilib_src_install() {
|
||||
fi
|
||||
}
|
||||
|
||||
install_tool changeset sqlite3-changeset
|
||||
install_tool dbdump sqlite3-db-dump
|
||||
install_tool dbhash sqlite3-db-hash
|
||||
install_tool rbu sqlite3-rbu
|
||||
install_tool scrub sqlite3-scrub
|
||||
install_tool showdb sqlite3-show-db
|
||||
install_tool showjournal sqlite3-show-journal
|
||||
install_tool showshm sqlite3-show-shm
|
||||
install_tool showstat4 sqlite3-show-stat4
|
||||
install_tool showwal sqlite3-show-wal
|
||||
install_tool sqldiff sqlite3-diff
|
||||
install_tool sqlite3_analyzer sqlite3-analyzer
|
||||
install_tool sqlite3_checker sqlite3-checker
|
||||
install_tool sqlite3_expert sqlite3-expert
|
||||
install_tool sqltclsh sqlite3-tclsh
|
||||
|
||||
unset -f install_tool
|
||||
fi
|
||||
@ -233,6 +294,10 @@ multilib_src_install_all() {
|
||||
doman sqlite3.1
|
||||
|
||||
if use doc; then
|
||||
dohtml -A ico,odf,odg,pdf,svg -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"
|
||||
rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
|
||||
(
|
||||
docinto html
|
||||
dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
|
||||
)
|
||||
fi
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
|
||||
|
||||
@ -12,18 +11,19 @@ DOC_PV="${SRC_PV}"
|
||||
|
||||
DESCRIPTION="A SQL Database Engine in a C Library"
|
||||
HOMEPAGE="https://sqlite.org/"
|
||||
SRC_URI="doc? ( https://sqlite.org/2016/${PN}-doc-${DOC_PV}.zip )
|
||||
tcl? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
test? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
tools? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
|
||||
!tcl? ( !test? ( !tools? ( https://sqlite.org/2016/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
|
||||
SRC_URI="doc? ( https://sqlite.org/2018/${PN}-doc-${DOC_PV}.zip )
|
||||
tcl? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
|
||||
test? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
|
||||
tools? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
|
||||
!tcl? ( !test? ( !tools? ( https://sqlite.org/2018/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="3"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
|
||||
|
||||
RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
|
||||
RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
|
||||
icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
|
||||
readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
|
||||
tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
|
||||
tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
|
||||
@ -36,12 +36,12 @@ DEPEND="${RDEPEND}
|
||||
)
|
||||
tools? ( app-arch/unzip )"
|
||||
|
||||
full_tarball() {
|
||||
full_archive() {
|
||||
use tcl || use test || use tools
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
S="${WORKDIR}/${PN}-src-${SRC_PV}"
|
||||
else
|
||||
S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
|
||||
@ -49,21 +49,28 @@ pkg_setup() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if full_tarball; then
|
||||
epatch "${FILESDIR}/${PN}-3.11.0-full_tarball-build.patch"
|
||||
if full_archive; then
|
||||
eapply "${FILESDIR}/${PN}-3.23.0-full_archive-build.patch"
|
||||
eapply "${FILESDIR}/${PN}-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch"
|
||||
eapply "${FILESDIR}/${PN}-3.23.1-full_archive-tests.patch"
|
||||
|
||||
eapply_user
|
||||
|
||||
# Fix AC_CHECK_FUNCS.
|
||||
# https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
|
||||
sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac
|
||||
sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac || die "sed failed"
|
||||
else
|
||||
epatch "${FILESDIR}/${PN}-3.12.0-nonfull_tarball-build.patch"
|
||||
eapply "${FILESDIR}/${PN}-3.21.0-nonfull_archive-build.patch"
|
||||
eapply "${FILESDIR}/${PN}-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch"
|
||||
|
||||
eapply_user
|
||||
|
||||
# Fix AC_CHECK_FUNCS.
|
||||
# https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
|
||||
sed \
|
||||
-e "s/AC_CHECK_FUNCS(\[fdatasync.*/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" \
|
||||
-e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
|
||||
-i configure.ac
|
||||
-i configure.ac || die "sed failed"
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
@ -72,13 +79,13 @@ src_prepare() {
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local CPPFLAGS="${CPPFLAGS}" options=()
|
||||
local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
|
||||
|
||||
options+=(
|
||||
--enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
|
||||
--enable-$(full_archive && echo load-extension || echo dynamic-extensions)
|
||||
--enable-threadsafe
|
||||
)
|
||||
if ! full_tarball; then
|
||||
if ! full_archive; then
|
||||
options+=(--disable-static-shell)
|
||||
fi
|
||||
|
||||
@ -90,10 +97,20 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/c3ref/column_database_name.html
|
||||
append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
|
||||
|
||||
# Support sqlite_dbpage virtual table.
|
||||
# https://sqlite.org/compile.html#enable_dbpage_vtab
|
||||
append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
|
||||
|
||||
# Support dbstat virtual table.
|
||||
# https://sqlite.org/dbstat.html
|
||||
append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||
|
||||
# Support sqlite3_serialize() and sqlite3_deserialize() functions.
|
||||
# https://sqlite.org/compile.html#enable_deserialize
|
||||
# https://sqlite.org/c3ref/serialize.html
|
||||
# https://sqlite.org/c3ref/deserialize.html
|
||||
append-cppflags -DSQLITE_ENABLE_DESERIALIZE
|
||||
|
||||
# Support comments in output of EXPLAIN.
|
||||
# https://sqlite.org/compile.html#enable_explain_comments
|
||||
append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||
@ -111,6 +128,18 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/json1.html
|
||||
append-cppflags -DSQLITE_ENABLE_JSON1
|
||||
|
||||
# Support memsys5 memory allocator.
|
||||
# https://sqlite.org/malloc.html#memsys5
|
||||
append-cppflags -DSQLITE_ENABLE_MEMSYS5
|
||||
|
||||
# Support sqlite_offset() function.
|
||||
# https://sqlite.org/lang_corefunc.html#sqlite_offset
|
||||
append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
|
||||
|
||||
# Support pre-update hook functions.
|
||||
# https://sqlite.org/c3ref/preupdate_count.html
|
||||
append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
|
||||
|
||||
# Support Resumable Bulk Update extension.
|
||||
# https://sqlite.org/rbu.html
|
||||
append-cppflags -DSQLITE_ENABLE_RBU
|
||||
@ -124,16 +153,38 @@ multilib_src_configure() {
|
||||
# https://sqlite.org/c3ref/stmt_scanstatus_reset.html
|
||||
append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
|
||||
|
||||
# Support sqlite_stmt virtual table.
|
||||
# https://sqlite.org/stmt.html
|
||||
append-cppflags -DSQLITE_ENABLE_STMTVTAB
|
||||
|
||||
# Support Session extension.
|
||||
# https://sqlite.org/sessionintro.html
|
||||
options+=(--enable-session)
|
||||
|
||||
# Support unknown() function.
|
||||
# https://sqlite.org/compile.html#enable_unknown_sql_function
|
||||
append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
|
||||
# Support unlock notification.
|
||||
# https://sqlite.org/unlock_notify.html
|
||||
append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
|
||||
|
||||
# Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
|
||||
# https://sqlite.org/compile.html#enable_update_delete_limit
|
||||
append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
|
||||
|
||||
# Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
|
||||
# https://sqlite.org/pragma.html#pragma_function_list
|
||||
# https://sqlite.org/pragma.html#pragma_module_list
|
||||
# https://sqlite.org/pragma.html#pragma_pragma_list
|
||||
append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
|
||||
|
||||
# Support soundex() function.
|
||||
# https://sqlite.org/lang_corefunc.html#soundex
|
||||
append-cppflags -DSQLITE_SOUNDEX
|
||||
|
||||
# debug USE flag.
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
options+=($(use_enable debug))
|
||||
else
|
||||
if use debug; then
|
||||
@ -148,7 +199,7 @@ multilib_src_configure() {
|
||||
# Support ICU extension.
|
||||
# https://sqlite.org/compile.html#enable_icu
|
||||
append-cppflags -DSQLITE_ENABLE_ICU
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
|
||||
else
|
||||
sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
|
||||
@ -160,7 +211,7 @@ multilib_src_configure() {
|
||||
--disable-editline
|
||||
$(use_enable readline)
|
||||
)
|
||||
if full_tarball && use readline; then
|
||||
if full_archive && use readline; then
|
||||
options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
|
||||
fi
|
||||
|
||||
@ -175,7 +226,7 @@ multilib_src_configure() {
|
||||
options+=($(use_enable static-libs static))
|
||||
|
||||
# tcl, test, tools USE flags.
|
||||
if full_tarball; then
|
||||
if full_archive; then
|
||||
options+=(--enable-tcl)
|
||||
fi
|
||||
|
||||
@ -183,6 +234,14 @@ multilib_src_configure() {
|
||||
append-cppflags -DSQLITE_OMIT_WAL
|
||||
fi
|
||||
|
||||
if [[ "${ABI}" == "x86" ]]; then
|
||||
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
|
||||
append-cflags -mfpmath=sse
|
||||
else
|
||||
append-cflags -ffloat-store
|
||||
fi
|
||||
fi
|
||||
|
||||
econf "${options[@]}"
|
||||
}
|
||||
|
||||
@ -190,7 +249,7 @@ multilib_src_compile() {
|
||||
emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
|
||||
|
||||
if use tools && multilib_is_native_abi; then
|
||||
emake rbu showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
|
||||
emake changeset dbdump dbhash rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
|
||||
fi
|
||||
}
|
||||
|
||||
@ -215,13 +274,21 @@ multilib_src_install() {
|
||||
fi
|
||||
}
|
||||
|
||||
install_tool changeset sqlite3-changeset
|
||||
install_tool dbdump sqlite3-db-dump
|
||||
install_tool dbhash sqlite3-db-hash
|
||||
install_tool rbu sqlite3-rbu
|
||||
install_tool scrub sqlite3-scrub
|
||||
install_tool showdb sqlite3-show-db
|
||||
install_tool showjournal sqlite3-show-journal
|
||||
install_tool showshm sqlite3-show-shm
|
||||
install_tool showstat4 sqlite3-show-stat4
|
||||
install_tool showwal sqlite3-show-wal
|
||||
install_tool sqldiff sqlite3-diff
|
||||
install_tool sqlite3_analyzer sqlite3-analyzer
|
||||
install_tool sqlite3_checker sqlite3-checker
|
||||
install_tool sqlite3_expert sqlite3-expert
|
||||
install_tool sqltclsh sqlite3-tclsh
|
||||
|
||||
unset -f install_tool
|
||||
fi
|
||||
@ -233,6 +300,10 @@ multilib_src_install_all() {
|
||||
doman sqlite3.1
|
||||
|
||||
if use doc; then
|
||||
dohtml -A ico,odf,odg,pdf,svg -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"
|
||||
rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
|
||||
(
|
||||
docinto html
|
||||
dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
|
||||
)
|
||||
fi
|
||||
}
|
@ -1,2 +1,2 @@
|
||||
DIST pcre-8.40.tar.bz2 1560119 SHA256 00e27a29ead4267e3de8111fcaa59b132d0533cdfdbdddf4b0604279acbcf4f4 SHA512 b4c27eafbdf33bd7a1384655b1936f4be3bc6745c072347eb26e988896c52664bd85ac42444da1be78b6e20f45b6c7e5921f5f20f5b0741b5bd3d9844e5bd4e2 WHIRLPOOL 6711688972b3db4b98902d548b84e8b03b61c3a12d24a4e42fc49ddc5e2b4be51f98f91873166e550866e88b6cd55092ea27704a3b7e71d58a2af21148ad3340
|
||||
DIST pcre-8.41.tar.bz2 1561874 SHA256 e62c7eac5ae7c0e7286db61ff82912e1c0b7a0c13706616e94a7dd729321b530 SHA512 cc9cdbeb98c010fe4f093a019bebfb91965dae4c6a48f8e49c38ec8df7d9da7f0d32c12fc58f22c51f1c2f010e72b65bcbf8bbf180060e93edf464fa9a7c3551 WHIRLPOOL 24d891c4f6580af20aa07a166038a2bacb52cdb305987f8b91b2fecae65e7b5277d3ef0b26ddbb3a33fd34794e6340e77df6a321e770b3aca4393d1ed144cf64
|
||||
DIST pcre-8.41.tar.bz2 1561874 BLAKE2B 2a97a859237994137190da00c30ba7c15e8631b82b7f200858cf722f1fdd0405d36c24bb716eb099d8107f2f829a85fd7d3497f36cdac51769636989331e7a79 SHA512 cc9cdbeb98c010fe4f093a019bebfb91965dae4c6a48f8e49c38ec8df7d9da7f0d32c12fc58f22c51f1c2f010e72b65bcbf8bbf180060e93edf464fa9a7c3551
|
||||
DIST pcre-8.42.tar.bz2 1570171 BLAKE2B f68bac3cf8ff5a81ccba31fd4d8926e05143a25a756e7daba9793467cec9cd8a4766f394f958ffca088b472463a43a31ea77014f2d4505082c1f366a18f30c7a SHA512 b47b923108f6ee0c31409b79d0888314271b482a22590e164d02f21d2112fba22dd0342c24f9ba0f5fcc5b8c65550bad08c476e30a2fc79b34ecf4601ed82f3d
|
||||
|
@ -1,68 +0,0 @@
|
||||
https://bugs.gentoo.org/609592
|
||||
https://bugs.exim.org/show_bug.cgi?id=2035
|
||||
|
||||
From 7ddfbe9d0b9f43402f8043e940172a318cc407c6 Mon Sep 17 00:00:00 2001
|
||||
From: Zoltan Herczeg <hzmester@freemail.hu>
|
||||
Date: Tue, 14 Feb 2017 08:48:18 +0000
|
||||
Subject: [PATCH] Fix a missing else in the JIT compiler reported by
|
||||
'idaifish'.
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1680 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
---
|
||||
ChangeLog | 2 ++
|
||||
pcre_jit_compile.c | 2 +-
|
||||
testdata/testinput12 | 2 ++
|
||||
testdata/testoutput12 | 2 ++
|
||||
4 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ChangeLog b/ChangeLog
|
||||
index 373ee8422ef5..d813935539bd 100644
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -15,6 +15,8 @@ mode with --only-matching matched several lines, it restarted scanning at the
|
||||
next line instead of moving on to the end of the matched string, which can be
|
||||
several lines after the start.
|
||||
|
||||
+3. Fix a missing else in the JIT compiler reported by 'idaifish'.
|
||||
+
|
||||
|
||||
Version 8.40 11-January-2017
|
||||
----------------------------
|
||||
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
|
||||
index c301f05d5e3f..6ef8e48ff5e8 100644
|
||||
--- a/pcre_jit_compile.c
|
||||
+++ b/pcre_jit_compile.c
|
||||
@@ -8110,7 +8110,7 @@ if (opcode == OP_COND || opcode == OP_SCOND)
|
||||
|
||||
if (*matchingpath == OP_FAIL)
|
||||
stacksize = 0;
|
||||
- if (*matchingpath == OP_RREF)
|
||||
+ else if (*matchingpath == OP_RREF)
|
||||
{
|
||||
stacksize = GET2(matchingpath, 1);
|
||||
if (common->currententry == NULL)
|
||||
diff --git a/testdata/testinput12 b/testdata/testinput12
|
||||
index 944be6943f5e..89ed4564bcd4 100644
|
||||
--- a/testdata/testinput12
|
||||
+++ b/testdata/testinput12
|
||||
@@ -104,4 +104,6 @@ and a couple of things that are different with JIT. --/
|
||||
/(.|.)*?bx/
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
|
||||
|
||||
+/((?(?!))x)(?'name')(?1)/S++
|
||||
+
|
||||
/-- End of testinput12 --/
|
||||
diff --git a/testdata/testoutput12 b/testdata/testoutput12
|
||||
index 87911086f498..7632c4e58013 100644
|
||||
--- a/testdata/testoutput12
|
||||
+++ b/testdata/testoutput12
|
||||
@@ -201,4 +201,6 @@ No match, mark = m (JIT)
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
|
||||
Error -8 (match limit exceeded)
|
||||
|
||||
+/((?(?!))x)(?'name')(?1)/S++
|
||||
+
|
||||
/-- End of testinput12 --/
|
||||
--
|
||||
2.12.0
|
||||
|
@ -1,69 +0,0 @@
|
||||
From 5be027b624bc866702808abadfe5f99360414086 Mon Sep 17 00:00:00 2001
|
||||
From: Philip Hazel <ph10@cam.ac.uk>
|
||||
Date: Fri, 10 Feb 2017 17:47:34 +0000
|
||||
Subject: [PATCH] Correct fix for pcre2grep multiline with --only-matching.
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1678 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
---
|
||||
ChangeLog | 5 +++++
|
||||
configure.ac | 6 +++---
|
||||
pcregrep.c | 20 +++++++++++++++-----
|
||||
3 files changed, 23 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/ChangeLog b/ChangeLog
|
||||
index ab4e053e601e..373ee8422ef5 100644
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -10,6 +10,11 @@ Version 8.41
|
||||
1. Fixed typo in CMakeLists.txt (wrong number of arguments for
|
||||
PCRE_STATIC_RUNTIME (affects MSVC only).
|
||||
|
||||
+2. Issue 1 for 8.40 below was not correctly fixed. If pcregrep in multiline
|
||||
+mode with --only-matching matched several lines, it restarted scanning at the
|
||||
+next line instead of moving on to the end of the matched string, which can be
|
||||
+several lines after the start.
|
||||
+
|
||||
|
||||
Version 8.40 11-January-2017
|
||||
----------------------------
|
||||
diff --git a/pcregrep.c b/pcregrep.c
|
||||
index fd2a67622baa..2070c057e4a0 100644
|
||||
--- a/pcregrep.c
|
||||
+++ b/pcregrep.c
|
||||
@@ -1804,11 +1804,6 @@ while (ptr < endptr)
|
||||
if (line_buffered) fflush(stdout);
|
||||
rc = 0; /* Had some success */
|
||||
|
||||
- /* If the current match ended past the end of the line (only possible
|
||||
- in multiline mode), we are done with this line. */
|
||||
-
|
||||
- if ((unsigned int)offsets[1] > linelength) goto END_ONE_MATCH;
|
||||
-
|
||||
startoffset = offsets[1]; /* Restart after the match */
|
||||
if (startoffset <= oldstartoffset)
|
||||
{
|
||||
@@ -1818,6 +1813,21 @@ while (ptr < endptr)
|
||||
if (utf8)
|
||||
while ((matchptr[startoffset] & 0xc0) == 0x80) startoffset++;
|
||||
}
|
||||
+
|
||||
+ /* If the current match ended past the end of the line (only possible
|
||||
+ in multiline mode), we must move on to the line in which it did end
|
||||
+ before searching for more matches. */
|
||||
+
|
||||
+ while (startoffset > (int)linelength)
|
||||
+ {
|
||||
+ matchptr = ptr += linelength + endlinelength;
|
||||
+ filepos += (int)(linelength + endlinelength);
|
||||
+ linenumber++;
|
||||
+ startoffset -= (int)(linelength + endlinelength);
|
||||
+ t = end_of_line(ptr, endptr, &endlinelength);
|
||||
+ linelength = t - ptr - endlinelength;
|
||||
+ }
|
||||
+
|
||||
goto ONLY_MATCHING_RESTART;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.12.0
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 8b0fdf16e57ce9a653a0a03c39f6cc061e8122e8 Mon Sep 17 00:00:00 2001
|
||||
From: Philip Hazel <ph10@cam.ac.uk>
|
||||
Date: Sun, 12 Feb 2017 13:28:11 +0000
|
||||
Subject: [PATCH] Fix bug in most recent fix for multiline pcre2grep.
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1679 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
---
|
||||
pcregrep.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/pcregrep.c b/pcregrep.c
|
||||
index 2070c057e4a0..3cd70eeb4261 100644
|
||||
--- a/pcregrep.c
|
||||
+++ b/pcregrep.c
|
||||
@@ -1826,6 +1826,7 @@ while (ptr < endptr)
|
||||
startoffset -= (int)(linelength + endlinelength);
|
||||
t = end_of_line(ptr, endptr, &endlinelength);
|
||||
linelength = t - ptr - endlinelength;
|
||||
+ length = (size_t)(endptr - ptr);
|
||||
}
|
||||
|
||||
goto ONLY_MATCHING_RESTART;
|
||||
--
|
||||
2.12.0
|
||||
|
@ -0,0 +1,17 @@
|
||||
https://bugs.exim.org/show_bug.cgi?id=2173#c4
|
||||
|
||||
--- a/pcre_exec.c
|
||||
+++ b/pcre_exec.c
|
||||
@@ -509,6 +509,12 @@
|
||||
(e.g. stopped by repeated call or recursion limit)
|
||||
*/
|
||||
|
||||
+#ifdef __GNUC__
|
||||
+static int
|
||||
+match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
|
||||
+ PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
|
||||
+ unsigned int rdepth) __attribute__((noinline,noclone));
|
||||
+#endif
|
||||
static int
|
||||
match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
|
||||
PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
|
@ -1,96 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils multilib libtool flag-o-matic toolchain-funcs multilib-minimal
|
||||
|
||||
DESCRIPTION="Perl-compatible regular expression library"
|
||||
HOMEPAGE="http://www.pcre.org/"
|
||||
MY_P="pcre-${PV/_rc/-RC}"
|
||||
if [[ ${PV} != *_rc* ]] ; then
|
||||
# Only the final releases are available here.
|
||||
SRC_URI="mirror://sourceforge/pcre/${MY_P}.tar.bz2
|
||||
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${MY_P}.tar.bz2"
|
||||
else
|
||||
SRC_URI="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Testing/${MY_P}.tar.bz2"
|
||||
fi
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="3"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bzip2 +cxx +jit libedit pcre16 pcre32 +readline +recursion-limit static-libs unicode zlib"
|
||||
REQUIRED_USE="readline? ( !libedit )
|
||||
libedit? ( !readline )"
|
||||
|
||||
RDEPEND="bzip2? ( app-arch/bzip2 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
libedit? ( dev-libs/libedit )
|
||||
readline? ( sys-libs/readline:0= )"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
RDEPEND="${RDEPEND}
|
||||
abi_x86_32? (
|
||||
!<=app-emulation/emul-linux-x86-baselibs-20131008-r2
|
||||
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/pcre-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-pcregrep-multiline-{1,2}.patch
|
||||
"${FILESDIR}"/${P}-jit-else.patch #609592
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
epatch "${PATCHES[@]}"
|
||||
sed -i -e "s:-lpcre ::" libpcrecpp.pc.in || die
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
ECONF_SOURCE="${S}" econf \
|
||||
--with-match-limit-recursion=$(usex recursion-limit 8192 MATCH_LIMIT) \
|
||||
$(multilib_native_use_enable bzip2 pcregrep-libbz2) \
|
||||
$(use_enable cxx cpp) \
|
||||
$(use_enable jit) $(use_enable jit pcregrep-jit) \
|
||||
$(use_enable pcre16) \
|
||||
$(use_enable pcre32) \
|
||||
$(multilib_native_use_enable libedit pcretest-libedit) \
|
||||
$(multilib_native_use_enable readline pcretest-libreadline) \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable unicode utf) $(use_enable unicode unicode-properties) \
|
||||
$(multilib_native_use_enable zlib pcregrep-libz) \
|
||||
--enable-pcre8 \
|
||||
--enable-shared \
|
||||
--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
||||
--docdir="${EPREFIX}"/usr/share/doc/${PF}
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake V=1 $(multilib_is_native_abi || echo "bin_PROGRAMS=")
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
$(multilib_is_native_abi || echo "bin_PROGRAMS= dist_html_DATA=") \
|
||||
install
|
||||
gen_usr_ldscript -a pcre
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
prune_libtool_files
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
preserve_old_lib /$(get_libdir)/libpcre.so.0
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
preserve_old_lib_notify /$(get_libdir)/libpcre.so.0
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
@ -18,7 +18,7 @@ fi
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="3"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bzip2 +cxx +jit libedit pcre16 pcre32 +readline +recursion-limit static-libs unicode zlib"
|
||||
REQUIRED_USE="readline? ( !libedit )
|
||||
libedit? ( !readline )"
|
||||
@ -35,10 +35,6 @@ DEPEND="
|
||||
"
|
||||
RDEPEND="
|
||||
${RDEPEND}
|
||||
abi_x86_32? (
|
||||
!<=app-emulation/emul-linux-x86-baselibs-20131008-r2
|
||||
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
|
||||
)
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
@ -49,6 +45,7 @@ MULTILIB_CHOST_TOOLS=(
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.41-sljit_mips-label-statement-fix.patch
|
||||
"${FILESDIR}"/${PN}-8.41-fix-stack-size-detection.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
96
sdk_container/src/third_party/portage-stable/dev-libs/libpcre/libpcre-8.42.ebuild
vendored
Normal file
96
sdk_container/src/third_party/portage-stable/dev-libs/libpcre/libpcre-8.42.ebuild
vendored
Normal file
@ -0,0 +1,96 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit multilib libtool flag-o-matic toolchain-funcs multilib-minimal
|
||||
|
||||
DESCRIPTION="Perl-compatible regular expression library"
|
||||
HOMEPAGE="http://www.pcre.org/"
|
||||
MY_P="pcre-${PV/_rc/-RC}"
|
||||
if [[ ${PV} != *_rc* ]] ; then
|
||||
# Only the final releases are available here.
|
||||
SRC_URI="mirror://sourceforge/pcre/${MY_P}.tar.bz2
|
||||
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${MY_P}.tar.bz2"
|
||||
else
|
||||
SRC_URI="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Testing/${MY_P}.tar.bz2"
|
||||
fi
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="3"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bzip2 +cxx +jit libedit pcre16 pcre32 +readline +recursion-limit static-libs unicode zlib"
|
||||
REQUIRED_USE="readline? ( !libedit )
|
||||
libedit? ( !readline )"
|
||||
|
||||
RDEPEND="
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
libedit? ( dev-libs/libedit )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/pcre-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.41-fix-stack-size-detection.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e "s:-lpcre ::" libpcrecpp.pc.in || die
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myeconfargs=(
|
||||
--with-match-limit-recursion=$(usex recursion-limit 8192 MATCH_LIMIT)
|
||||
$(multilib_native_use_enable bzip2 pcregrep-libbz2)
|
||||
$(use_enable cxx cpp)
|
||||
$(use_enable jit)
|
||||
$(use_enable jit pcregrep-jit)
|
||||
$(use_enable pcre16)
|
||||
$(use_enable pcre32)
|
||||
$(multilib_native_use_enable libedit pcretest-libedit)
|
||||
$(multilib_native_use_enable readline pcretest-libreadline)
|
||||
$(use_enable static-libs static)
|
||||
$(use_enable unicode utf)
|
||||
$(use_enable unicode unicode-properties)
|
||||
$(multilib_native_use_enable zlib pcregrep-libz)
|
||||
--enable-pcre8
|
||||
--enable-shared
|
||||
)
|
||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake V=1 $(multilib_is_native_abi || echo "bin_PROGRAMS=")
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
$(multilib_is_native_abi || echo "bin_PROGRAMS= dist_html_DATA=") \
|
||||
install
|
||||
gen_usr_ldscript -a pcre
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
find "${ED}" -name "*.la" -delete || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
preserve_old_lib /$(get_libdir)/libpcre.so.0
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
preserve_old_lib_notify /$(get_libdir)/libpcre.so.0
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
DIST libxml2-2.9.4.tar.gz 5374830 SHA256 ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c SHA512 f5174ab1a3a0ec0037a47f47aa47def36674e02bfb42b57f609563f84c6247c585dbbb133c056953a5adb968d328f18cbc102eb0d00d48eb7c95478389e5daf9 WHIRLPOOL 268d3364a3d293810dff060b3ab92042c5550e50dbe9038c4d5b54ea6a22ed77f9572575517ae3bacfe518d634047eb9d5345e903b125e56a3d32ad1ba96dabf
|
||||
DIST libxml2-2.9.5.tar.gz 5466888 SHA256 4031c1ecee9ce7ba4f313e91ef6284164885cdb69937a123f6a83bb6a72dcd38 SHA512 197dbd1722e5f90eea43837323352f48d215e198aa6b95685645ef7511e2beba8aadc0dd67e099c945120c5dbe7f8c9da5f376b22f447059e9ffa941c1bfd175 WHIRLPOOL 14cfeaa1c18af4e64131505010484b2e64d83d617984c6321b77c4263901b16b24c945eb9af17763fe63048c3910111fdc498fe9183c04ecea9182ea8f9214fa
|
||||
DIST libxml2-2.9.6.tar.gz 5469624 SHA256 8b9038cca7240e881d462ea391882092dfdc6d4f483f72683e817be08df5ebbc SHA512 5ef80f895374bd5dd3bcd5f00c715795f026bf45d998f8f762c0cdb739b8755e01de40cf853d98a3826eacef95c4adebe4777db11020e8d98d0bda921f55a0ed WHIRLPOOL 1fa2b10f8715f3718863957e6a5173400b42c6587c4602f52c0ae9103fafd7a515c28158c9bc928c532139cd73274f070015c64677434a0a6fa83f0a9e8425ff
|
||||
DIST xmlts20080827.tar.gz 638940 SHA256 96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7 SHA512 7325d0977c4427fc4944b291ccf896a665f654cc24399e5565c12a849c2bc3aef4fa3ee42a09ac115abcb6570c51a8fbd052c38d64d164279ecdecad5a4e884d WHIRLPOOL 50835380c3ea208df0bf9ce032ed2df69c4c6cb5a53ffdd39a08fb4f1d166f311b2ef2fe0d9911ae1ebff92aeb42f6ea55e727dfe0b7a3b95e6c7240315b3eda
|
||||
DIST xsts-2002-01-16.tar.gz 6894439 SHA256 55e5c08db29946a91ea8e70e8f2418d3fd30d8b6777941dfba7f54726ffd9914 SHA512 43300af6d39c1e2221b0ed7318fe14c7464eeb6eb030ed1e22eb29b4ab17f014e2a4c8887c3a46ae5d243e3072da27f00f4e285498ae6f1288177d38d1108288 WHIRLPOOL 84dd51959460a4f8aa582d57ad39229c546ca7fe155012c57c368b59f5d31400d8b940a343a7320058330ca611303139cacdffed514783f96406ac5366026b11
|
||||
DIST xsts-2004-01-14.tar.gz 2761085 SHA256 09bdf9f81f381ebf9bc158a9472e498e896f7a02eb7461146e9abe1b9493ca17 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe WHIRLPOOL c46a3bf7d6dd771757f4304995cc177cf51c6cdd0e9778851fc13d3809c7b984690b4f273b3e075abe018110968eb7fc78f5b83170d3e18bacf00a4ed64b213d
|
||||
DIST libxml2-2.9.6.tar.gz 5469624 BLAKE2B cb8fc74044876b2ddf9742a4a84d685ce6cd1e41a991ee79fd70a9175c54d2a9a3d3a2c3229a4ce177fcd4e30b0cee08c7cf3a36fef68b179db0ce521fbbf3b0 SHA512 5ef80f895374bd5dd3bcd5f00c715795f026bf45d998f8f762c0cdb739b8755e01de40cf853d98a3826eacef95c4adebe4777db11020e8d98d0bda921f55a0ed
|
||||
DIST libxml2-2.9.7.tar.gz 5467389 BLAKE2B e15082fb87fb41a7aab6f39120b1d1bbd0325af8009bb3b74c69a98bf7347a39f59055762df157dcf223a79ac84f17535cb40af0a9a461ee3d2c1d55f4832e1b SHA512 da06cb7c5032ef4b7c8e902fabb9d2c74634c42c161be07a7c66a00d53a68029f89b0d4de32a6b9d4ff338c2d1d9c4e53aefb9cf50cb1c2d6c6b06b442ef42d5
|
||||
DIST libxml2-2.9.8.tar.gz 5469097 BLAKE2B 0b7836db46edebf6e7108c28da4bb7e3fb5ddc695aaa3e456ba51a66c0294a741d7b60eb4c31c7040443bbd54712c019424078bd533856a9650b39a703a926d5 SHA512 28903282c7672206effa1362fd564cbe4cf5be44264b083a7d14e383f73bccd1b81bcafb5f4f2f56f5e7e05914c660e27668c9ce91b1b9f256ef5358d55ba917
|
||||
DIST xmlts20080827.tar.gz 638940 BLAKE2B c5aab959c6e0698acd5b9be82b48a8ac26f4d01cc03f9acfff20d344f97f4711fc6d4a524ae70457147e8e30c72e27b6726829e1dd21896286aa974ed60774e7 SHA512 7325d0977c4427fc4944b291ccf896a665f654cc24399e5565c12a849c2bc3aef4fa3ee42a09ac115abcb6570c51a8fbd052c38d64d164279ecdecad5a4e884d
|
||||
DIST xsts-2002-01-16.tar.gz 6894439 BLAKE2B 1e9ec63d2c104655e64249e07440a04d862fcbcd4d4e19745d81b34994319b510a531c9d6df1491fae1e90b5d0764f0f1a827251ca8df5d613178b0eab01ef25 SHA512 43300af6d39c1e2221b0ed7318fe14c7464eeb6eb030ed1e22eb29b4ab17f014e2a4c8887c3a46ae5d243e3072da27f00f4e285498ae6f1288177d38d1108288
|
||||
DIST xsts-2004-01-14.tar.gz 2761085 BLAKE2B 41545995fb3a65d053257c376c07d45ffd1041a433bfbdb46d4dd87a5afb60c18c8629a3d988323f9e7a1d709775b5a7e5930276a7121c0725a22705c0976e36 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe
|
||||
|
@ -1,68 +0,0 @@
|
||||
do not build test programs as we don't install them
|
||||
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS)
|
||||
|
||||
-noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \
|
||||
+check_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \
|
||||
testThreads testC14N testAutomata testRegexp \
|
||||
testReader testapi testModule runtest runsuite testchar \
|
||||
testdict runxmlconf testrecurse testlimits
|
||||
@@ -170,7 +170,7 @@
|
||||
testModule_DEPENDENCIES = $(DEPS)
|
||||
testModule_LDADD= $(LDADDS)
|
||||
|
||||
-noinst_LTLIBRARIES = testdso.la
|
||||
+check_LTLIBRARIES = testdso.la
|
||||
testdso_la_SOURCES = testdso.c
|
||||
testdso_la_LDFLAGS = -module -no-undefined -avoid-version -rpath $(libdir)
|
||||
|
||||
@@ -202,7 +202,7 @@ runxmlconf_LDADD= $(LDADDS)
|
||||
#testOOM_DEPENDENCIES = $(DEPS)
|
||||
#testOOM_LDADD= $(LDADDS)
|
||||
|
||||
-runtests:
|
||||
+runtests: $(check_PROGRAMS)
|
||||
[ -d test ] || $(LN_S) $(srcdir)/test .
|
||||
[ -d result ] || $(LN_S) $(srcdir)/result .
|
||||
$(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
|
||||
--- a/doc/examples/Makefile.am
|
||||
+++ b/doc/examples/Makefile.am
|
||||
@@ -13,7 +13,7 @@
|
||||
rebuild: examples.xml index.html
|
||||
.PHONY: rebuild
|
||||
|
||||
-examples.xml: index.py $(noinst_PROGRAMS:=.c)
|
||||
+examples.xml: index.py $(check_PROGRAMS:=.c)
|
||||
cd $(srcdir) && $(PYTHON) index.py
|
||||
$(MAKE) Makefile
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
xpath1.res \
|
||||
xpath2.res
|
||||
|
||||
-noinst_PROGRAMS = \
|
||||
+check_PROGRAMS = \
|
||||
io1 \
|
||||
io2 \
|
||||
parse1 \
|
||||
@@ -99,7 +99,7 @@
|
||||
valgrind:
|
||||
$(MAKE) CHECKER='valgrind' tests
|
||||
|
||||
-tests: $(noinst_PROGRAMS)
|
||||
+tests: $(check_PROGRAMS)
|
||||
test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml .
|
||||
@(echo '## examples regression tests')
|
||||
@(echo > .memdump)
|
||||
--- a/example/Makefile.am
|
||||
+++ b/example/Makefile.am
|
||||
@@ -1,4 +1,4 @@
|
||||
-noinst_PROGRAMS = gjobread
|
||||
+check_PROGRAMS = gjobread
|
||||
|
||||
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include
|
||||
AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS)
|
@ -1,249 +0,0 @@
|
||||
From c1d1f7121194036608bf555f08d3062a36fd344b Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Tue, 28 Jun 2016 18:34:52 +0200
|
||||
Subject: Disallow namespace nodes in XPointer ranges
|
||||
|
||||
Namespace nodes must be copied to avoid use-after-free errors.
|
||||
But they don't necessarily have a physical representation in a
|
||||
document, so simply disallow them in XPointer ranges.
|
||||
|
||||
Found with afl-fuzz.
|
||||
|
||||
Fixes CVE-2016-4658.
|
||||
---
|
||||
xpointer.c | 149 +++++++++++++++++++++++--------------------------------------
|
||||
1 file changed, 56 insertions(+), 93 deletions(-)
|
||||
|
||||
diff --git a/xpointer.c b/xpointer.c
|
||||
index a7b03fb..694d120 100644
|
||||
--- a/xpointer.c
|
||||
+++ b/xpointer.c
|
||||
@@ -320,6 +320,45 @@ xmlXPtrRangesEqual(xmlXPathObjectPtr range1, xmlXPathObjectPtr range2) {
|
||||
}
|
||||
|
||||
/**
|
||||
+ * xmlXPtrNewRangeInternal:
|
||||
+ * @start: the starting node
|
||||
+ * @startindex: the start index
|
||||
+ * @end: the ending point
|
||||
+ * @endindex: the ending index
|
||||
+ *
|
||||
+ * Internal function to create a new xmlXPathObjectPtr of type range
|
||||
+ *
|
||||
+ * Returns the newly created object.
|
||||
+ */
|
||||
+static xmlXPathObjectPtr
|
||||
+xmlXPtrNewRangeInternal(xmlNodePtr start, int startindex,
|
||||
+ xmlNodePtr end, int endindex) {
|
||||
+ xmlXPathObjectPtr ret;
|
||||
+
|
||||
+ /*
|
||||
+ * Namespace nodes must be copied (see xmlXPathNodeSetDupNs).
|
||||
+ * Disallow them for now.
|
||||
+ */
|
||||
+ if ((start != NULL) && (start->type == XML_NAMESPACE_DECL))
|
||||
+ return(NULL);
|
||||
+ if ((end != NULL) && (end->type == XML_NAMESPACE_DECL))
|
||||
+ return(NULL);
|
||||
+
|
||||
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
|
||||
+ if (ret == NULL) {
|
||||
+ xmlXPtrErrMemory("allocating range");
|
||||
+ return(NULL);
|
||||
+ }
|
||||
+ memset(ret, 0, sizeof(xmlXPathObject));
|
||||
+ ret->type = XPATH_RANGE;
|
||||
+ ret->user = start;
|
||||
+ ret->index = startindex;
|
||||
+ ret->user2 = end;
|
||||
+ ret->index2 = endindex;
|
||||
+ return(ret);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* xmlXPtrNewRange:
|
||||
* @start: the starting node
|
||||
* @startindex: the start index
|
||||
@@ -344,17 +383,7 @@ xmlXPtrNewRange(xmlNodePtr start, int startindex,
|
||||
if (endindex < 0)
|
||||
return(NULL);
|
||||
|
||||
- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
|
||||
- if (ret == NULL) {
|
||||
- xmlXPtrErrMemory("allocating range");
|
||||
- return(NULL);
|
||||
- }
|
||||
- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
|
||||
- ret->type = XPATH_RANGE;
|
||||
- ret->user = start;
|
||||
- ret->index = startindex;
|
||||
- ret->user2 = end;
|
||||
- ret->index2 = endindex;
|
||||
+ ret = xmlXPtrNewRangeInternal(start, startindex, end, endindex);
|
||||
xmlXPtrRangeCheckOrder(ret);
|
||||
return(ret);
|
||||
}
|
||||
@@ -381,17 +410,8 @@ xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end) {
|
||||
if (end->type != XPATH_POINT)
|
||||
return(NULL);
|
||||
|
||||
- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
|
||||
- if (ret == NULL) {
|
||||
- xmlXPtrErrMemory("allocating range");
|
||||
- return(NULL);
|
||||
- }
|
||||
- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
|
||||
- ret->type = XPATH_RANGE;
|
||||
- ret->user = start->user;
|
||||
- ret->index = start->index;
|
||||
- ret->user2 = end->user;
|
||||
- ret->index2 = end->index;
|
||||
+ ret = xmlXPtrNewRangeInternal(start->user, start->index, end->user,
|
||||
+ end->index);
|
||||
xmlXPtrRangeCheckOrder(ret);
|
||||
return(ret);
|
||||
}
|
||||
@@ -416,17 +436,7 @@ xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end) {
|
||||
if (start->type != XPATH_POINT)
|
||||
return(NULL);
|
||||
|
||||
- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
|
||||
- if (ret == NULL) {
|
||||
- xmlXPtrErrMemory("allocating range");
|
||||
- return(NULL);
|
||||
- }
|
||||
- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
|
||||
- ret->type = XPATH_RANGE;
|
||||
- ret->user = start->user;
|
||||
- ret->index = start->index;
|
||||
- ret->user2 = end;
|
||||
- ret->index2 = -1;
|
||||
+ ret = xmlXPtrNewRangeInternal(start->user, start->index, end, -1);
|
||||
xmlXPtrRangeCheckOrder(ret);
|
||||
return(ret);
|
||||
}
|
||||
@@ -453,17 +463,7 @@ xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end) {
|
||||
if (end->type != XPATH_POINT)
|
||||
return(NULL);
|
||||
|
||||
- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
|
||||
- if (ret == NULL) {
|
||||
- xmlXPtrErrMemory("allocating range");
|
||||
- return(NULL);
|
||||
- }
|
||||
- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
|
||||
- ret->type = XPATH_RANGE;
|
||||
- ret->user = start;
|
||||
- ret->index = -1;
|
||||
- ret->user2 = end->user;
|
||||
- ret->index2 = end->index;
|
||||
+ ret = xmlXPtrNewRangeInternal(start, -1, end->user, end->index);
|
||||
xmlXPtrRangeCheckOrder(ret);
|
||||
return(ret);
|
||||
}
|
||||
@@ -486,17 +486,7 @@ xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end) {
|
||||
if (end == NULL)
|
||||
return(NULL);
|
||||
|
||||
- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
|
||||
- if (ret == NULL) {
|
||||
- xmlXPtrErrMemory("allocating range");
|
||||
- return(NULL);
|
||||
- }
|
||||
- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
|
||||
- ret->type = XPATH_RANGE;
|
||||
- ret->user = start;
|
||||
- ret->index = -1;
|
||||
- ret->user2 = end;
|
||||
- ret->index2 = -1;
|
||||
+ ret = xmlXPtrNewRangeInternal(start, -1, end, -1);
|
||||
xmlXPtrRangeCheckOrder(ret);
|
||||
return(ret);
|
||||
}
|
||||
@@ -516,17 +506,7 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) {
|
||||
if (start == NULL)
|
||||
return(NULL);
|
||||
|
||||
- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
|
||||
- if (ret == NULL) {
|
||||
- xmlXPtrErrMemory("allocating range");
|
||||
- return(NULL);
|
||||
- }
|
||||
- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
|
||||
- ret->type = XPATH_RANGE;
|
||||
- ret->user = start;
|
||||
- ret->index = -1;
|
||||
- ret->user2 = NULL;
|
||||
- ret->index2 = -1;
|
||||
+ ret = xmlXPtrNewRangeInternal(start, -1, NULL, -1);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@@ -541,6 +521,8 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) {
|
||||
*/
|
||||
xmlXPathObjectPtr
|
||||
xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
|
||||
+ xmlNodePtr endNode;
|
||||
+ int endIndex;
|
||||
xmlXPathObjectPtr ret;
|
||||
|
||||
if (start == NULL)
|
||||
@@ -549,7 +531,12 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
|
||||
return(NULL);
|
||||
switch (end->type) {
|
||||
case XPATH_POINT:
|
||||
+ endNode = end->user;
|
||||
+ endIndex = end->index;
|
||||
+ break;
|
||||
case XPATH_RANGE:
|
||||
+ endNode = end->user2;
|
||||
+ endIndex = end->index2;
|
||||
break;
|
||||
case XPATH_NODESET:
|
||||
/*
|
||||
@@ -557,39 +544,15 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
|
||||
*/
|
||||
if (end->nodesetval->nodeNr <= 0)
|
||||
return(NULL);
|
||||
+ endNode = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
|
||||
+ endIndex = -1;
|
||||
break;
|
||||
default:
|
||||
/* TODO */
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
|
||||
- if (ret == NULL) {
|
||||
- xmlXPtrErrMemory("allocating range");
|
||||
- return(NULL);
|
||||
- }
|
||||
- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
|
||||
- ret->type = XPATH_RANGE;
|
||||
- ret->user = start;
|
||||
- ret->index = -1;
|
||||
- switch (end->type) {
|
||||
- case XPATH_POINT:
|
||||
- ret->user2 = end->user;
|
||||
- ret->index2 = end->index;
|
||||
- break;
|
||||
- case XPATH_RANGE:
|
||||
- ret->user2 = end->user2;
|
||||
- ret->index2 = end->index2;
|
||||
- break;
|
||||
- case XPATH_NODESET: {
|
||||
- ret->user2 = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
|
||||
- ret->index2 = -1;
|
||||
- break;
|
||||
- }
|
||||
- default:
|
||||
- STRANGE
|
||||
- return(NULL);
|
||||
- }
|
||||
+ ret = xmlXPtrNewRangeInternal(start, -1, endNode, endIndex);
|
||||
xmlXPtrRangeCheckOrder(ret);
|
||||
return(ret);
|
||||
}
|
||||
--
|
||||
cgit v0.12
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user