parent
43b6a54c93
commit
151f8b3c2c
@ -1,4 +1,3 @@
|
||||
DIST conky-1.10.4.tar.gz 365145 SHA256 ed61ffb3be9fd24965d40401c7d54553e732038f3da2e03454915779384f59b4 SHA512 665a3c2a9b150576d7c29964dafb7030f5aa5955530142cf0d00f0f49f4a3b320924d389b3a833ef6eb18468000f5c62d918e8f067c7b40cd9e205d0bf0d8e0c WHIRLPOOL 6ca2a043dbc20aaff94bd0c05367b535cd71819543d76dd9a90b79417e2ebb0462c9203901f4e26e887bc249388ec041e0f76dcccf24a88fed9ce4bb532af558
|
||||
DIST conky-1.10.5.tar.gz 365176 SHA256 3bcf1ae93721e0575cd4ef8fd60da9e5bf1b2fbceb365fb9792f2aec6139f569 SHA512 b432e79a02954dc8b5f33e8dd2f19aaf3bb2030449329d037fd12764773bfc3521becb7699ac161bcecbbc431c2a6a8368787a1c8bbe3418ea83983df48cc6d8 WHIRLPOOL 7a1bc0e6b3445d322a7bea73a7cb952fd00926ba6d2b0a3ddaf6aca9d7be9d49b0ab614f5daa524bb24fbeed57d9a69472e2bd3eac8c3eb5e6639774d19b7890
|
||||
DIST conky-1.10.6.tar.gz 365669 SHA256 4c80982960b2a72e3e33cef33347c97b9239ed110d9584da4e7f17f28faf60ca SHA512 ddd0b087e89654f8dace7d9682935a802b3bb22b7e65acd25dcc0f06e90b46bee695502d78b6e40a409f8eaffcd65a78d5f861ee6dbcbff6e48f88c2f20319c9 WHIRLPOOL 65a43baf0ec1b5e298a81a062d2aa511488026baf440a470eecc89d15aac010d0f89f86b60a16040ae1941fedbdb46f9aed82431a79f59b7f97439f148b9c5f5
|
||||
DIST conky-1.9.0.tar.bz2 626555 SHA256 baf1b550f135fbfb53e5e286a33aadc03a667d63bf6c4d52ba7637366295bb6f SHA512 98c9f69fd8bee2062e3eddeb7a394cce932199ffd6c8664006d1222f0453569406613e63637848c77a455f7dae3f16be3079a2cab56ecafea51ec043de23c889 WHIRLPOOL 41bbe95ec838dbda2c2d4a9422d2f2f7d22d0cb99e87c59fbd32c0c7856cc83de36cbeefd982c964ec5229ae0b0342e84525aa5343d8c5cf9525205cea4a274a
|
||||
|
@ -1,183 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit cmake-utils linux-info readme.gentoo-r1
|
||||
|
||||
DESCRIPTION="An advanced, highly configurable system monitor for X"
|
||||
HOMEPAGE="https://github.com/brndnmtthws/conky"
|
||||
SRC_URI="https://github.com/brndnmtthws/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3 BSD LGPL-2.1 MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86"
|
||||
IUSE="apcupsd audacious cmus curl eve hddtemp ical iconv imlib iostats ipv6 irc
|
||||
lua-cairo lua-imlib lua-rsvg math moc mpd mysql nano-syntax ncurses
|
||||
nvidia +portmon pulseaudio rss systemd thinkpad truetype vim-syntax
|
||||
weather-metar weather-xoap webserver wifi X xmms2"
|
||||
|
||||
DEPEND_COMMON="
|
||||
X? (
|
||||
imlib? ( media-libs/imlib2[X] )
|
||||
lua-cairo? (
|
||||
>=dev-lua/toluapp-1.0.93
|
||||
x11-libs/cairo[X] )
|
||||
lua-imlib? (
|
||||
>=dev-lua/toluapp-1.0.93
|
||||
media-libs/imlib2[X] )
|
||||
lua-rsvg? (
|
||||
>=dev-lua/toluapp-1.0.93
|
||||
gnome-base/librsvg )
|
||||
nvidia? ( || ( x11-drivers/nvidia-drivers[tools,static-libs] media-video/nvidia-settings ) )
|
||||
truetype? ( x11-libs/libXft >=media-libs/freetype-2 )
|
||||
x11-libs/libX11
|
||||
x11-libs/libXdamage
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libXext
|
||||
audacious? ( >=media-sound/audacious-1.5 dev-libs/glib:2 )
|
||||
xmms2? ( media-sound/xmms2 )
|
||||
)
|
||||
cmus? ( media-sound/cmus )
|
||||
curl? ( net-misc/curl )
|
||||
eve? ( net-misc/curl dev-libs/libxml2 )
|
||||
ical? ( dev-libs/libical )
|
||||
iconv? ( virtual/libiconv )
|
||||
irc? ( net-libs/libircclient )
|
||||
mysql? ( >=virtual/mysql-5.0 )
|
||||
ncurses? ( sys-libs/ncurses:= )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
rss? ( dev-libs/libxml2 net-misc/curl dev-libs/glib:2 )
|
||||
systemd? ( sys-apps/systemd )
|
||||
wifi? ( net-wireless/wireless-tools )
|
||||
weather-metar? ( net-misc/curl )
|
||||
weather-xoap? ( dev-libs/libxml2 net-misc/curl )
|
||||
webserver? ( net-libs/libmicrohttpd )
|
||||
>=dev-lang/lua-5.1.4-r8:0
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND_COMMON}
|
||||
apcupsd? ( sys-power/apcupsd )
|
||||
hddtemp? ( app-admin/hddtemp )
|
||||
moc? ( media-sound/moc )
|
||||
nano-syntax? ( app-editors/nano )
|
||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
"
|
||||
DEPEND="
|
||||
${DEPEND_COMMON}
|
||||
app-text/docbook2X
|
||||
"
|
||||
|
||||
CONFIG_CHECK=~IPV6
|
||||
|
||||
DOCS=( README.md TODO ChangeLog NEWS AUTHORS )
|
||||
|
||||
DISABLE_AUTOFORMATTING="yes"
|
||||
DOC_CONTENTS="You can find sample configurations at ${ROOT%/}/usr/share/doc/${PF}.
|
||||
To customize, copy to ${XDG_CONFIG_HOME}/conky/conky.conf
|
||||
and edit it to your liking.
|
||||
|
||||
There are pretty html docs available at the conky homepage
|
||||
or in ${ROOT%/}/usr/share/doc/${PF}/html.
|
||||
|
||||
Also see https://wiki.gentoo.org/wiki/Conky/HOWTO"
|
||||
|
||||
pkg_setup() {
|
||||
use ipv6 && linux-info_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs
|
||||
|
||||
if use X; then
|
||||
mycmakeargs=(
|
||||
-DBUILD_X11=ON
|
||||
-DOWN_WINDOW=ON
|
||||
-DBUILD_XDAMAGE=ON
|
||||
-DBUILD_XINERAMA=ON
|
||||
-DBUILD_XDBE=ON
|
||||
-DBUILD_XFT=$(usex truetype)
|
||||
-DBUILD_IMLIB2=$(usex imlib)
|
||||
-DBUILD_XSHAPE=ON
|
||||
-DBUILD_ARGB=ON
|
||||
-DBUILD_LUA_CAIRO=$(usex lua-cairo)
|
||||
-DBUILD_LUA_IMLIB2=$(usex lua-imlib)
|
||||
-DBUILD_LUA_RSVG=$(usex lua-rsvg)
|
||||
-DBUILD_NVIDIA=$(usex nvidia)
|
||||
-DBUILD_AUDACIOUS=$(usex audacious)
|
||||
-DBUILD_XMMS2=$(usex xmms2)
|
||||
)
|
||||
else
|
||||
mycmakeargs=(
|
||||
-DBUILD_X11=OFF
|
||||
-DBUILD_NVIDIA=OFF
|
||||
-DBUILD_LUA_CAIRO=OFF
|
||||
-DBUILD_LUA_IMLIB2=OFF
|
||||
-DBUILD_LUA_RSVG=OFF
|
||||
-DBUILD_AUDACIOUS=OFF
|
||||
-DBUILD_XMMS2=OFF
|
||||
)
|
||||
fi
|
||||
|
||||
mycmakeargs+=(
|
||||
-DBUILD_APCUPSD=$(usex apcupsd)
|
||||
-DBUILD_CMUS=$(usex cmus)
|
||||
-DBUILD_CURL=$(usex curl)
|
||||
-DBUILD_EVE=$(usex eve)
|
||||
-DBUILD_HDDTEMP=$(usex hddtemp)
|
||||
-DBUILD_IOSTATS=$(usex iostats)
|
||||
-DBUILD_ICAL=$(usex ical)
|
||||
-DBUILD_ICONV=$(usex iconv)
|
||||
-DBUILD_IPV6=$(usex ipv6)
|
||||
-DBUILD_IRC=$(usex irc)
|
||||
-DBUILD_MATH=$(usex math)
|
||||
-DBUILD_MOC=$(usex moc)
|
||||
-DBUILD_MPD=$(usex mpd)
|
||||
-DBUILD_MYSQL=$(usex mysql)
|
||||
-DBUILD_NCURSES=$(usex ncurses)
|
||||
-DBUILD_PORT_MONITORS=$(usex portmon)
|
||||
-DBUILD_PULSEAUDIO=$(usex pulseaudio)
|
||||
-DBUILD_RSS=$(usex rss)
|
||||
-DBUILD_JOURNAL=$(usex systemd)
|
||||
-DBUILD_IBM=$(usex thinkpad)
|
||||
-DBUILD_WEATHER_METAR=$(usex weather-metar)
|
||||
-DBUILD_WEATHER_XOAP=$(usex weather-xoap)
|
||||
-DBUILD_HTTP=$(usex webserver)
|
||||
-DBUILD_WLAN=$(usex wifi)
|
||||
-DBUILD_BUILTIN_CONFIG=ON
|
||||
-DBUILD_OLD_CONFIG=ON
|
||||
-DBUILD_I18N=ON
|
||||
-DMAINTAINER_MODE=OFF
|
||||
-DRELEASE=ON
|
||||
-DBUILD_BMPX=OFF
|
||||
-DDOC_PATH=/usr/share/doc/${PF}
|
||||
)
|
||||
# -DMAINTAINER_MODE=OFF disables building documentation and fixes bug #486270
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
if use vim-syntax; then
|
||||
insinto /usr/share/vim/vimfiles/ftdetect
|
||||
doins "${S}"/extras/vim/ftdetect/conkyrc.vim
|
||||
|
||||
insinto /usr/share/vim/vimfiles/syntax
|
||||
doins "${S}"/extras/vim/syntax/conkyrc.vim
|
||||
fi
|
||||
|
||||
if use nano-syntax; then
|
||||
insinto /usr/share/nano/
|
||||
doins "${S}"/extras/nano/conky.nanorc
|
||||
fi
|
||||
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
readme.gentoo_print_elog
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
|
||||
# (since we're building shared libs) ...
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils toolchain-funcs multilib multilib-minimal
|
||||
|
||||
DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
|
||||
HOMEPAGE="http://www.bzip.org/"
|
||||
SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BZIP2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="static static-libs"
|
||||
|
||||
RDEPEND="abi_x86_32? (
|
||||
!<=app-emulation/emul-linux-x86-baselibs-20130224
|
||||
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
|
||||
)"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
|
||||
epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
|
||||
epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
|
||||
epatch "${FILESDIR}"/${PN}-1.0.6-progress.patch
|
||||
epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
|
||||
epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
|
||||
epatch "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
|
||||
epatch "${FILESDIR}"/${PN}-1.0.6-out-of-tree-build.patch
|
||||
|
||||
# - Use right man path
|
||||
# - Generate symlinks instead of hardlinks
|
||||
# - pass custom variables to control libdir
|
||||
sed -i \
|
||||
-e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
|
||||
-e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \
|
||||
-e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
|
||||
Makefile || die
|
||||
}
|
||||
|
||||
bemake() {
|
||||
emake \
|
||||
VPATH="${S}" \
|
||||
CC="$(tc-getCC)" \
|
||||
AR="$(tc-getAR)" \
|
||||
RANLIB="$(tc-getRANLIB)" \
|
||||
"$@"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
bemake -f "${S}"/Makefile-libbz2_so all
|
||||
bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')"
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
into /usr
|
||||
|
||||
# Install the shared lib manually. We install:
|
||||
# .x.x.x - standard shared lib behavior
|
||||
# .x.x - SONAME some distros use #338321
|
||||
# .x - SONAME Gentoo uses
|
||||
dolib.so libbz2.so.${PV}
|
||||
local v
|
||||
for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
|
||||
dosym libbz2.so.${PV} /usr/$(get_libdir)/${v}
|
||||
done
|
||||
use static-libs && dolib.a libbz2.a
|
||||
|
||||
if multilib_is_native_abi ; then
|
||||
gen_usr_ldscript -a bz2
|
||||
|
||||
dobin bzip2recover
|
||||
into /
|
||||
dobin bzip2
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
# `make install` doesn't cope with out-of-tree builds, nor with
|
||||
# installing just non-binaries, so handle things ourselves.
|
||||
insinto /usr/include
|
||||
doins bzlib.h
|
||||
into /usr
|
||||
dobin bz{diff,grep,more}
|
||||
doman *.1
|
||||
|
||||
dosym bzdiff /usr/bin/bzcmp
|
||||
dosym bzdiff.1 /usr/share/man/man1/bzcmp.1
|
||||
|
||||
dosym bzmore /usr/bin/bzless
|
||||
dosym bzmore.1 /usr/share/man/man1/bzless.1
|
||||
|
||||
local x
|
||||
for x in bunzip2 bzcat bzip2recover ; do
|
||||
dosym bzip2.1 /usr/share/man/man1/${x}.1
|
||||
done
|
||||
for x in bz{e,f}grep ; do
|
||||
dosym bzgrep /usr/bin/${x}
|
||||
dosym bzgrep.1 /usr/share/man/man1/${x}.1
|
||||
done
|
||||
|
||||
dodoc README* CHANGES manual.pdf
|
||||
dohtml manual.html
|
||||
|
||||
# move "important" bzip2 binaries to /bin and use the shared libbz2.so
|
||||
dosym bzip2 /bin/bzcat
|
||||
dosym bzip2 /bin/bunzip2
|
||||
}
|
@ -1,167 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit fcaps multilib toolchain-funcs flag-o-matic gnuconfig
|
||||
|
||||
MY_P="${P/_alpha/a}"
|
||||
|
||||
DESCRIPTION="A set of tools for CD/DVD reading and recording, including cdrecord"
|
||||
HOMEPAGE="https://sourceforge.net/projects/cdrtools/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/$([[ -z ${PV/*_alpha*} ]] && echo 'alpha')/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1 CDDL-Schily"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
|
||||
IUSE="acl caps nls unicode"
|
||||
|
||||
RDEPEND="acl? ( virtual/acl )
|
||||
caps? ( sys-libs/libcap )
|
||||
nls? ( virtual/libintl )
|
||||
!app-cdr/cdrkit"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-misc/makedepend
|
||||
nls? ( >=sys-devel/gettext-0.18.1.1 )"
|
||||
|
||||
S=${WORKDIR}/${P/_alpha[0-9][0-9]}
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-clang-include-schily-sha2.patch"
|
||||
)
|
||||
|
||||
FILECAPS=(
|
||||
cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep usr/bin/cdrecord --
|
||||
cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep usr/bin/cdda2wav --
|
||||
cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep usr/bin/readcd
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
gnuconfig_update
|
||||
|
||||
# Remove profiled make files.
|
||||
find -name '*_p.mk' -delete || die
|
||||
|
||||
# Adjusting hardcoded paths.
|
||||
sed -i -e 's:opt/schily:usr:' \
|
||||
$(find ./ -type f -name \*.[0-9ch] -exec grep -l 'opt/schily' '{}' '+') \
|
||||
|| die "sed opt/schily"
|
||||
|
||||
sed -i -e "s:\(^INSDIR=\t\tshare/doc/\):\1${PF}/:" \
|
||||
$(find ./ -type f -exec grep -l 'INSDIR.\+doc' '{}' '+') \
|
||||
|| die "sed doc"
|
||||
|
||||
# Respect libdir.
|
||||
sed -i -e "s:\(^INSDIR=\t\t\)lib:\1$(get_libdir):" \
|
||||
$(find ./ -type f -exec grep -l '^INSDIR.\+lib\(/siconv\)\?$' '{}' '+') \
|
||||
|| die "sed multilib"
|
||||
|
||||
# Do not install static libraries.
|
||||
sed -i -e 's:include\t\t.*rules.lib::' \
|
||||
$(find ./ -type f -exec grep -l '^include.\+rules\.lib' '{}' '+') \
|
||||
|| die "sed rules"
|
||||
|
||||
# Respect CC/CXX variables.
|
||||
cd "${S}"/RULES || die
|
||||
local tcCC=$(tc-getCC)
|
||||
local tcCXX=$(tc-getCXX)
|
||||
sed -i -e "/cc-config.sh/s|\$(C_ARCH:%64=%) \$(CCOM_DEF)|${tcCC} ${tcCC}|" \
|
||||
rules1.top || die "sed rules1.top"
|
||||
sed -i -e "/^\(CC\|DYNLD\|LDCC\|MKDEP\)/s|gcc|${tcCC}|" \
|
||||
-e "/^\(CC++\|DYNLDC++\|LDCC++\|MKC++DEP\)/s|g++|${tcCXX}|" \
|
||||
-e "/COPTOPT=/s/-O//" \
|
||||
-e 's/$(GCCOPTOPT)//' \
|
||||
cc-gcc.rul || die "sed cc-gcc.rul"
|
||||
sed -i -e "s|^#CONFFLAGS +=\t-cc=\$(XCC_COM)$|CONFFLAGS +=\t-cc=${tcCC}|g" \
|
||||
rules.cnf || die "sed rules.cnf"
|
||||
|
||||
# Create additional symlinks needed for some archs (armv4l already created)
|
||||
local t
|
||||
for t in armv4tl armv5tel armv7l ppc64 s390x; do
|
||||
ln -s i586-linux-cc.rul ${t}-linux-cc.rul || die
|
||||
ln -s i586-linux-gcc.rul ${t}-linux-gcc.rul || die
|
||||
done
|
||||
|
||||
# Schily make setup.
|
||||
cd "${S}"/DEFAULTS || die
|
||||
local os="linux"
|
||||
[[ ${CHOST} == *-darwin* ]] && os="mac-os10"
|
||||
|
||||
sed -i \
|
||||
-e "s:/opt/schily:/usr:g" \
|
||||
-e "s:/usr/src/linux/include::g" \
|
||||
-e "s:bin:root:g" \
|
||||
-e '/^DEFUMASK/s,002,022,g' \
|
||||
Defaults.${os} || die "sed Schily make setup"
|
||||
# re DEFUMASK above:
|
||||
# bug 486680: grsec TPE will block the exec if the directory is
|
||||
# group-writable. This is painful with cdrtools, because it makes a bunch of
|
||||
# group-writable directories during build. Change the umask on their
|
||||
# creation to prevent this.
|
||||
}
|
||||
|
||||
# skip obsolete configure script
|
||||
src_configure() { : ; }
|
||||
|
||||
src_compile() {
|
||||
if use unicode; then
|
||||
local flags="$(test-flags -finput-charset=ISO-8859-1 -fexec-charset=UTF-8)"
|
||||
if [[ -n ${flags} ]]; then
|
||||
append-flags ${flags}
|
||||
else
|
||||
ewarn "Your compiler does not support the options required to build"
|
||||
ewarn "cdrtools with unicode in USE. unicode flag will be ignored."
|
||||
fi
|
||||
fi
|
||||
|
||||
! use acl && append-cppflags "-DNO_ACL"
|
||||
! use caps && append-cppflags "-DNO_LINUX_CAPS"
|
||||
|
||||
# If not built with -j1, "sometimes" cdda2wav will not be built.
|
||||
emake -j1 CC="$(tc-getCC)" CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" \
|
||||
LDOPTX="${LDFLAGS}" \
|
||||
INS_BASE="${ED}/usr" INS_RBASE="${ED}" LINKMODE="dynamic" \
|
||||
RUNPATH="" GMAKE_NOWARN="true"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# If not built with -j1, "sometimes" manpages are not installed.
|
||||
emake -j1 CC="$(tc-getCC)" CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" \
|
||||
LDOPTX="${LDFLAGS}" \
|
||||
INS_BASE="${ED}/usr" INS_RBASE="${ED}" LINKMODE="dynamic" \
|
||||
RUNPATH="" GMAKE_NOWARN="true" install
|
||||
|
||||
# These symlinks are for compat with cdrkit.
|
||||
dosym schily /usr/include/scsilib
|
||||
dosym ../scg /usr/include/schily/scg
|
||||
|
||||
dodoc ABOUT Changelog* CONTRIBUTING PORTING README.linux-shm READMEs/README.linux
|
||||
|
||||
cd "${S}"/cdda2wav || die
|
||||
docinto cdda2wav
|
||||
dodoc Changelog FAQ Frontends HOWTOUSE NEEDED README THANKS TODO
|
||||
|
||||
cd "${S}"/mkisofs || die
|
||||
docinto mkisofs
|
||||
dodoc ChangeLog* TODO
|
||||
|
||||
# Remove man pages related to the build system
|
||||
rm -rvf "${ED}"/usr/share/man/man5 || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
fcaps_pkg_postinst
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
einfo
|
||||
einfo "Darwin/OS X use the following device names:"
|
||||
einfo
|
||||
einfo "CD burners: (probably) ./cdrecord dev=IOCompactDiscServices"
|
||||
einfo
|
||||
einfo "DVD burners: (probably) ./cdrecord dev=IODVDServices"
|
||||
einfo
|
||||
fi
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
DIST doxygen-1.8.10.src.tar.gz 4818276 SHA256 cedf78f6d213226464784ecb999b54515c97eab8a2f9b82514292f837cf88b93 SHA512 a7f29b5f7b9f55b7e5382b7b7dc7212247a27869bc265433c0ee51480645b3f5f0732d1f5aefd54952204c8a1c98b96ec1ecc22c1ff7a072db5b2356b5981074 WHIRLPOOL 5607e1da5cf8e653ec895a7601a3a6585790a555207928bde6d154ab06173c68e088a61c1963da8d8cdc1a571b66eeaa102acc2a2e4291e0be87634d8e554962
|
||||
DIST doxygen-1.8.11.src.tar.gz 4834291 SHA256 65d08b46e48bd97186aef562dc366681045b119e00f83c5b61d05d37ea154049 SHA512 44f3f9d2715c4cfe628b988809a6264681c43634dfa830f604b6cc853fa6679eca112cc9c01cee5b019f7f01f0a0acdf4f7d3aaec0848783399d17904caf1a3e WHIRLPOOL 240c84bd02ea3ab747e59bb8db434e40e743ed24cbb8ca78b8846d3bb4f7672497106fd620c14851c06d80e474301811978def5d85db5b01df97b40a4ec74813
|
||||
DIST doxygen-1.8.12.src.tar.gz 4880613 SHA256 792d4091cbdf228549ff2033dd71ff7ea5029c6b436317cc5ec866e71302df6c SHA512 12fb5f19d0de382c7510b7c517d7c781a1e6e11720c7d9ecfd81d29d5ed030984e8d55ffcc25cc52703020e880edad341136e2795a2a36a842fc275b31ae203d WHIRLPOOL 4bd12f16ce9dba73f5bf836032d8ce25d5be7e6b3cbe3c11ce7c662a8059fa30ef2f75c008fb2050fd4eb99d80ba134d068b452dfd577a651291dba5315c0726
|
||||
DIST doxygen-1.8.13.src.tar.gz 4893912 SHA256 af667887bd7a87dc0dbf9ac8d86c96b552dfb8ca9c790ed1cbffaa6131573f6b SHA512 85da5bd28ad9f33a8e50fa92796817d31e59c024127cb647cb967e4321dd51378feaacdf099d578b7e6020fd646a3c63e99c77420e49e3894fc18ca89ba3e0a2 WHIRLPOOL fb26f85c22ae2197b52bb7fb4a46ee840c3af700bedfce41d3fed84e5ac62408abcfc3e2a147a8e15c290f7bbc2e4cf3efabbe490ea1a78504680b9b299fa93f
|
||||
DIST doxywizard.png 4231 SHA256 eb648ebd3a194a56d9ed6e47cc8dbf1af2e124d83c2c42af9bf86bd837984209 SHA512 5e2d26e7427b86866ebe75ec2c66c0f1100d230f3f3e4d66bac424a8dd0d42f0831d936ff03318dfa1bf73cbd9fb53717636d0c91ae3eea0f4e24641479d25d5 WHIRLPOOL bb0c13b382c4069ca310ff53a03b36499a2bf6e0e8c0647efc032530f429f483b5d6f2925b7e996d4f84c8f2b77eb883533f4b7abc88745a2cfa596d3dd4f3fb
|
||||
|
@ -0,0 +1,151 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
|
||||
|
||||
inherit cmake-utils eutils fdo-mime flag-o-matic python-any-r1
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://github.com/doxygen/doxygen.git"
|
||||
SRC_URI=""
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="http://ftp.stack.nl/pub/users/dimitri/${P}.src.tar.gz"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
|
||||
fi
|
||||
SRC_URI+=" https://dev.gentoo.org/~xarthisius/distfiles/doxywizard.png"
|
||||
|
||||
DESCRIPTION="Documentation system for most programming languages"
|
||||
HOMEPAGE="http://www.doxygen.org/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="clang debug doc dot doxysearch latex qt5 sqlite userland_GNU"
|
||||
|
||||
RDEPEND="app-text/ghostscript-gpl
|
||||
dev-lang/perl
|
||||
media-libs/libpng:0=
|
||||
virtual/libiconv
|
||||
clang? ( sys-devel/clang )
|
||||
dot? (
|
||||
media-gfx/graphviz
|
||||
media-libs/freetype
|
||||
)
|
||||
doxysearch? ( =dev-libs/xapian-1.2* )
|
||||
latex? ( app-text/texlive[extra] )
|
||||
qt5? (
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
)
|
||||
sqlite? ( dev-db/sqlite:3 )
|
||||
"
|
||||
|
||||
REQUIRED_USE="doc? ( latex )"
|
||||
|
||||
DEPEND="sys-devel/flex
|
||||
sys-devel/bison
|
||||
doc? ( ${PYTHON_DEPS} )
|
||||
${RDEPEND}"
|
||||
|
||||
# src_test() defaults to make -C testing but there is no such directory (bug #504448)
|
||||
RESTRICT="test"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.8.9.1-empty-line-sigsegv.patch" #454348
|
||||
"${FILESDIR}/${PN}-1.8.12-link_with_pthread.patch"
|
||||
)
|
||||
|
||||
DOCS=( LANGUAGE.HOWTO README.md )
|
||||
|
||||
pkg_setup() {
|
||||
use doc && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Ensure we link to -liconv
|
||||
if use elibc_FreeBSD && has_version dev-libs/libiconv || use elibc_uclibc; then
|
||||
local pro
|
||||
for pro in */*.pro.in */*/*.pro.in; do
|
||||
echo "unix:LIBS += -liconv" >> "${pro}" || die
|
||||
done
|
||||
fi
|
||||
|
||||
# Call dot with -Teps instead of -Tps for EPS generation - bug #282150
|
||||
sed -i -e '/addJob("ps"/ s/"ps"/"eps"/g' src/dot.cpp || die
|
||||
|
||||
# fix pdf doc
|
||||
sed -i.orig -e "s:g_kowal:g kowal:" \
|
||||
doc/maintainers.txt || die
|
||||
|
||||
if is-flagq "-O3" ; then
|
||||
echo
|
||||
ewarn "Compiling with -O3 is known to produce incorrectly"
|
||||
ewarn "optimized code which breaks doxygen."
|
||||
echo
|
||||
elog "Continuing with -O2 instead ..."
|
||||
echo
|
||||
replace-flags "-O3" "-O2"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DDOC_INSTALL_DIR="share/doc/${P}"
|
||||
-Duse_libclang=$(usex clang)
|
||||
-Dbuild_doc=$(usex doc)
|
||||
-Dbuild_search=$(usex doxysearch)
|
||||
-Dbuild_wizard=$(usex qt5)
|
||||
-Duse_sqlite3=$(usex sqlite)
|
||||
)
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
|
||||
if use doc; then
|
||||
export VARTEXFONTS="${T}/fonts" # bug #564944
|
||||
|
||||
if ! use dot; then
|
||||
sed -i -e "s/HAVE_DOT = YES/HAVE_DOT = NO/" \
|
||||
{Doxyfile,doc/Doxyfile} \
|
||||
|| die "disabling dot failed"
|
||||
fi
|
||||
emake -C "${BUILD_DIR}" docs
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
if use qt5; then
|
||||
doicon "${DISTDIR}/doxywizard.png"
|
||||
make_desktop_entry doxywizard "DoxyWizard ${PV}" \
|
||||
"/usr/share/pixmaps/doxywizard.png" \
|
||||
"Development"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
fdo-mime_desktop_database_update
|
||||
|
||||
elog
|
||||
elog "For examples and other goodies, see the source tarball. For some"
|
||||
elog "example output, run doxygen on the doxygen source using the"
|
||||
elog "Doxyfile provided in the top-level source dir."
|
||||
elog
|
||||
elog "Disabling the dot USE flag will remove the GraphViz dependency,"
|
||||
elog "along with Doxygen's ability to generate diagrams in the docs."
|
||||
elog "See the Doxygen homepage for additional helper tools to parse"
|
||||
elog "more languages."
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
fdo-mime_desktop_database_update
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
AUTOTOOLS_AUTORECONF=true
|
||||
|
||||
inherit autotools-utils bash-completion-r1 flag-o-matic versionator
|
||||
|
||||
DESCRIPTION="Terminal multiplexer"
|
||||
HOMEPAGE="http://tmux.github.io/"
|
||||
SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="ISC"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="debug selinux vim-syntax kernel_FreeBSD kernel_linux"
|
||||
|
||||
CDEPEND="
|
||||
|| (
|
||||
=dev-libs/libevent-2.0*
|
||||
>=dev-libs/libevent-2.1.5-r4
|
||||
)
|
||||
kernel_linux? ( sys-libs/libutempter )
|
||||
kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-lib-9.0 sys-libs/libutempter ) )
|
||||
sys-libs/ncurses:0="
|
||||
DEPEND="${CDEPEND}
|
||||
virtual/pkgconfig"
|
||||
RDEPEND="${CDEPEND}
|
||||
dev-libs/libevent:=
|
||||
selinux? ( sec-policy/selinux-screen )
|
||||
vim-syntax? (
|
||||
|| (
|
||||
app-editors/vim
|
||||
app-editors/gvim
|
||||
)
|
||||
)"
|
||||
|
||||
DOCS=( CHANGES FAQ README TODO )
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-2.0-flags.patch )
|
||||
|
||||
src_prepare() {
|
||||
# bug 438558
|
||||
# 1.7 segfaults when entering copy mode if compiled with -Os
|
||||
replace-flags -Os -O2
|
||||
|
||||
# regenerate aclocal.m4 to support earlier automake versions
|
||||
rm aclocal.m4 || die
|
||||
|
||||
autotools-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
--sysconfdir="${EPREFIX}"/etc
|
||||
$(use_enable debug)
|
||||
)
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
autotools-utils_src_install
|
||||
|
||||
newbashcomp examples/bash_completion_tmux.sh ${PN}
|
||||
|
||||
docinto examples
|
||||
dodoc examples/*.conf
|
||||
|
||||
if use vim-syntax; then
|
||||
insinto /usr/share/vim/vimfiles/syntax
|
||||
doins examples/tmux.vim
|
||||
|
||||
insinto /usr/share/vim/vimfiles/ftdetect
|
||||
doins "${FILESDIR}"/tmux.vim
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! version_is_at_least 1.9a ${REPLACING_VERSIONS:-1.9a}; then
|
||||
echo
|
||||
ewarn "Some configuration options changed in this release."
|
||||
ewarn "Please read the CHANGES file in /usr/share/doc/${PF}/"
|
||||
ewarn
|
||||
ewarn "WARNING: After updating to ${P} you will _not_ be able to connect to any"
|
||||
ewarn "older, running tmux server instances. You'll have to use an existing client to"
|
||||
ewarn "end your old sessions or kill the old server instances. Otherwise you'll have"
|
||||
ewarn "to temporarily downgrade to access them."
|
||||
echo
|
||||
fi
|
||||
}
|
@ -1,12 +1,295 @@
|
||||
https://github.com/thom311/libnl/pull/121
|
||||
|
||||
--- a/include/linux-private/linux/if_bridge.h
|
||||
+++ b/include/linux-private/linux/if_bridge.h
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/if_ether.h>
|
||||
-#include <linux/in6.h>
|
||||
|
||||
#define SYSFS_BRIDGE_ATTR "bridge"
|
||||
#define SYSFS_BRIDGE_FDB "brforward"
|
||||
--- a/dev/null
|
||||
+++ b/include/linux-private/linux/in6.h
|
||||
@@ -0,0 +1,292 @@
|
||||
+/*
|
||||
+ * Types and definitions for AF_INET6
|
||||
+ * Linux INET6 implementation
|
||||
+ *
|
||||
+ * Authors:
|
||||
+ * Pedro Roque <roque@di.fc.ul.pt>
|
||||
+ *
|
||||
+ * Sources:
|
||||
+ * IPv6 Program Interfaces for BSD Systems
|
||||
+ * <draft-ietf-ipngwg-bsd-api-05.txt>
|
||||
+ *
|
||||
+ * Advanced Sockets API for IPv6
|
||||
+ * <draft-stevens-advanced-api-00.txt>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the License, or (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _LINUX_IN6_H
|
||||
+#define _LINUX_IN6_H
|
||||
+
|
||||
+#include <linux/types.h>
|
||||
+
|
||||
+/*
|
||||
+ * IPv6 address structure
|
||||
+ */
|
||||
+
|
||||
+#if __UAPI_DEF_IN6_ADDR
|
||||
+struct in6_addr {
|
||||
+ union {
|
||||
+ __u8 u6_addr8[16];
|
||||
+#if __UAPI_DEF_IN6_ADDR_ALT
|
||||
+ __be16 u6_addr16[8];
|
||||
+ __be32 u6_addr32[4];
|
||||
+#endif
|
||||
+ } in6_u;
|
||||
+#define s6_addr in6_u.u6_addr8
|
||||
+#if __UAPI_DEF_IN6_ADDR_ALT
|
||||
+#define s6_addr16 in6_u.u6_addr16
|
||||
+#define s6_addr32 in6_u.u6_addr32
|
||||
+#endif
|
||||
+};
|
||||
+#endif /* __UAPI_DEF_IN6_ADDR */
|
||||
+
|
||||
+#if __UAPI_DEF_SOCKADDR_IN6
|
||||
+struct sockaddr_in6 {
|
||||
+ unsigned short int sin6_family; /* AF_INET6 */
|
||||
+ __be16 sin6_port; /* Transport layer port # */
|
||||
+ __be32 sin6_flowinfo; /* IPv6 flow information */
|
||||
+ struct in6_addr sin6_addr; /* IPv6 address */
|
||||
+ __u32 sin6_scope_id; /* scope id (new in RFC2553) */
|
||||
+};
|
||||
+#endif /* __UAPI_DEF_SOCKADDR_IN6 */
|
||||
+
|
||||
+#if __UAPI_DEF_IPV6_MREQ
|
||||
+struct ipv6_mreq {
|
||||
+ /* IPv6 multicast address of group */
|
||||
+ struct in6_addr ipv6mr_multiaddr;
|
||||
+
|
||||
+ /* local IPv6 address of interface */
|
||||
+ int ipv6mr_ifindex;
|
||||
+};
|
||||
+#endif /* __UAPI_DEF_IVP6_MREQ */
|
||||
+
|
||||
+#define ipv6mr_acaddr ipv6mr_multiaddr
|
||||
+
|
||||
+struct in6_flowlabel_req {
|
||||
+ struct in6_addr flr_dst;
|
||||
+ __be32 flr_label;
|
||||
+ __u8 flr_action;
|
||||
+ __u8 flr_share;
|
||||
+ __u16 flr_flags;
|
||||
+ __u16 flr_expires;
|
||||
+ __u16 flr_linger;
|
||||
+ __u32 __flr_pad;
|
||||
+ /* Options in format of IPV6_PKTOPTIONS */
|
||||
+};
|
||||
+
|
||||
+#define IPV6_FL_A_GET 0
|
||||
+#define IPV6_FL_A_PUT 1
|
||||
+#define IPV6_FL_A_RENEW 2
|
||||
+
|
||||
+#define IPV6_FL_F_CREATE 1
|
||||
+#define IPV6_FL_F_EXCL 2
|
||||
+#define IPV6_FL_F_REFLECT 4
|
||||
+#define IPV6_FL_F_REMOTE 8
|
||||
+
|
||||
+#define IPV6_FL_S_NONE 0
|
||||
+#define IPV6_FL_S_EXCL 1
|
||||
+#define IPV6_FL_S_PROCESS 2
|
||||
+#define IPV6_FL_S_USER 3
|
||||
+#define IPV6_FL_S_ANY 255
|
||||
+
|
||||
+
|
||||
+/*
|
||||
+ * Bitmask constant declarations to help applications select out the
|
||||
+ * flow label and priority fields.
|
||||
+ *
|
||||
+ * Note that this are in host byte order while the flowinfo field of
|
||||
+ * sockaddr_in6 is in network byte order.
|
||||
+ */
|
||||
+
|
||||
+#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff
|
||||
+#define IPV6_FLOWINFO_PRIORITY 0x0ff00000
|
||||
+
|
||||
+/* These definitions are obsolete */
|
||||
+#define IPV6_PRIORITY_UNCHARACTERIZED 0x0000
|
||||
+#define IPV6_PRIORITY_FILLER 0x0100
|
||||
+#define IPV6_PRIORITY_UNATTENDED 0x0200
|
||||
+#define IPV6_PRIORITY_RESERVED1 0x0300
|
||||
+#define IPV6_PRIORITY_BULK 0x0400
|
||||
+#define IPV6_PRIORITY_RESERVED2 0x0500
|
||||
+#define IPV6_PRIORITY_INTERACTIVE 0x0600
|
||||
+#define IPV6_PRIORITY_CONTROL 0x0700
|
||||
+#define IPV6_PRIORITY_8 0x0800
|
||||
+#define IPV6_PRIORITY_9 0x0900
|
||||
+#define IPV6_PRIORITY_10 0x0a00
|
||||
+#define IPV6_PRIORITY_11 0x0b00
|
||||
+#define IPV6_PRIORITY_12 0x0c00
|
||||
+#define IPV6_PRIORITY_13 0x0d00
|
||||
+#define IPV6_PRIORITY_14 0x0e00
|
||||
+#define IPV6_PRIORITY_15 0x0f00
|
||||
+
|
||||
+/*
|
||||
+ * IPV6 extension headers
|
||||
+ */
|
||||
+#if __UAPI_DEF_IPPROTO_V6
|
||||
+#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */
|
||||
+#define IPPROTO_ROUTING 43 /* IPv6 routing header */
|
||||
+#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */
|
||||
+#define IPPROTO_ICMPV6 58 /* ICMPv6 */
|
||||
+#define IPPROTO_NONE 59 /* IPv6 no next header */
|
||||
+#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */
|
||||
+#define IPPROTO_MH 135 /* IPv6 mobility header */
|
||||
+#endif /* __UAPI_DEF_IPPROTO_V6 */
|
||||
+
|
||||
+/*
|
||||
+ * IPv6 TLV options.
|
||||
+ */
|
||||
+#define IPV6_TLV_PAD1 0
|
||||
+#define IPV6_TLV_PADN 1
|
||||
+#define IPV6_TLV_ROUTERALERT 5
|
||||
+#define IPV6_TLV_JUMBO 194
|
||||
+#define IPV6_TLV_HAO 201 /* home address option */
|
||||
+
|
||||
+/*
|
||||
+ * IPV6 socket options
|
||||
+ */
|
||||
+#if __UAPI_DEF_IPV6_OPTIONS
|
||||
+#define IPV6_ADDRFORM 1
|
||||
+#define IPV6_2292PKTINFO 2
|
||||
+#define IPV6_2292HOPOPTS 3
|
||||
+#define IPV6_2292DSTOPTS 4
|
||||
+#define IPV6_2292RTHDR 5
|
||||
+#define IPV6_2292PKTOPTIONS 6
|
||||
+#define IPV6_CHECKSUM 7
|
||||
+#define IPV6_2292HOPLIMIT 8
|
||||
+#define IPV6_NEXTHOP 9
|
||||
+#define IPV6_AUTHHDR 10 /* obsolete */
|
||||
+#define IPV6_FLOWINFO 11
|
||||
+
|
||||
+#define IPV6_UNICAST_HOPS 16
|
||||
+#define IPV6_MULTICAST_IF 17
|
||||
+#define IPV6_MULTICAST_HOPS 18
|
||||
+#define IPV6_MULTICAST_LOOP 19
|
||||
+#define IPV6_ADD_MEMBERSHIP 20
|
||||
+#define IPV6_DROP_MEMBERSHIP 21
|
||||
+#define IPV6_ROUTER_ALERT 22
|
||||
+#define IPV6_MTU_DISCOVER 23
|
||||
+#define IPV6_MTU 24
|
||||
+#define IPV6_RECVERR 25
|
||||
+#define IPV6_V6ONLY 26
|
||||
+#define IPV6_JOIN_ANYCAST 27
|
||||
+#define IPV6_LEAVE_ANYCAST 28
|
||||
+
|
||||
+/* IPV6_MTU_DISCOVER values */
|
||||
+#define IPV6_PMTUDISC_DONT 0
|
||||
+#define IPV6_PMTUDISC_WANT 1
|
||||
+#define IPV6_PMTUDISC_DO 2
|
||||
+#define IPV6_PMTUDISC_PROBE 3
|
||||
+/* same as IPV6_PMTUDISC_PROBE, provided for symetry with IPv4
|
||||
+ * also see comments on IP_PMTUDISC_INTERFACE
|
||||
+ */
|
||||
+#define IPV6_PMTUDISC_INTERFACE 4
|
||||
+/* weaker version of IPV6_PMTUDISC_INTERFACE, which allows packets to
|
||||
+ * get fragmented if they exceed the interface mtu
|
||||
+ */
|
||||
+#define IPV6_PMTUDISC_OMIT 5
|
||||
+
|
||||
+/* Flowlabel */
|
||||
+#define IPV6_FLOWLABEL_MGR 32
|
||||
+#define IPV6_FLOWINFO_SEND 33
|
||||
+
|
||||
+#define IPV6_IPSEC_POLICY 34
|
||||
+#define IPV6_XFRM_POLICY 35
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * Multicast:
|
||||
+ * Following socket options are shared between IPv4 and IPv6.
|
||||
+ *
|
||||
+ * MCAST_JOIN_GROUP 42
|
||||
+ * MCAST_BLOCK_SOURCE 43
|
||||
+ * MCAST_UNBLOCK_SOURCE 44
|
||||
+ * MCAST_LEAVE_GROUP 45
|
||||
+ * MCAST_JOIN_SOURCE_GROUP 46
|
||||
+ * MCAST_LEAVE_SOURCE_GROUP 47
|
||||
+ * MCAST_MSFILTER 48
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * Advanced API (RFC3542) (1)
|
||||
+ *
|
||||
+ * Note: IPV6_RECVRTHDRDSTOPTS does not exist. see net/ipv6/datagram.c.
|
||||
+ */
|
||||
+
|
||||
+#define IPV6_RECVPKTINFO 49
|
||||
+#define IPV6_PKTINFO 50
|
||||
+#define IPV6_RECVHOPLIMIT 51
|
||||
+#define IPV6_HOPLIMIT 52
|
||||
+#define IPV6_RECVHOPOPTS 53
|
||||
+#define IPV6_HOPOPTS 54
|
||||
+#define IPV6_RTHDRDSTOPTS 55
|
||||
+#define IPV6_RECVRTHDR 56
|
||||
+#define IPV6_RTHDR 57
|
||||
+#define IPV6_RECVDSTOPTS 58
|
||||
+#define IPV6_DSTOPTS 59
|
||||
+#define IPV6_RECVPATHMTU 60
|
||||
+#define IPV6_PATHMTU 61
|
||||
+#define IPV6_DONTFRAG 62
|
||||
+#if 0 /* not yet */
|
||||
+#define IPV6_USE_MIN_MTU 63
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * Netfilter (1)
|
||||
+ *
|
||||
+ * Following socket options are used in ip6_tables;
|
||||
+ * see include/linux/netfilter_ipv6/ip6_tables.h.
|
||||
+ *
|
||||
+ * IP6T_SO_SET_REPLACE / IP6T_SO_GET_INFO 64
|
||||
+ * IP6T_SO_SET_ADD_COUNTERS / IP6T_SO_GET_ENTRIES 65
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * Advanced API (RFC3542) (2)
|
||||
+ */
|
||||
+#define IPV6_RECVTCLASS 66
|
||||
+#define IPV6_TCLASS 67
|
||||
+
|
||||
+/*
|
||||
+ * Netfilter (2)
|
||||
+ *
|
||||
+ * Following socket options are used in ip6_tables;
|
||||
+ * see include/linux/netfilter_ipv6/ip6_tables.h.
|
||||
+ *
|
||||
+ * IP6T_SO_GET_REVISION_MATCH 68
|
||||
+ * IP6T_SO_GET_REVISION_TARGET 69
|
||||
+ * IP6T_SO_ORIGINAL_DST 80
|
||||
+ */
|
||||
+
|
||||
+#define IPV6_AUTOFLOWLABEL 70
|
||||
+/* RFC5014: Source address selection */
|
||||
+#define IPV6_ADDR_PREFERENCES 72
|
||||
+
|
||||
+#define IPV6_PREFER_SRC_TMP 0x0001
|
||||
+#define IPV6_PREFER_SRC_PUBLIC 0x0002
|
||||
+#define IPV6_PREFER_SRC_PUBTMP_DEFAULT 0x0100
|
||||
+#define IPV6_PREFER_SRC_COA 0x0004
|
||||
+#define IPV6_PREFER_SRC_HOME 0x0400
|
||||
+#define IPV6_PREFER_SRC_CGA 0x0008
|
||||
+#define IPV6_PREFER_SRC_NONCGA 0x0800
|
||||
+
|
||||
+/* RFC5082: Generalized Ttl Security Mechanism */
|
||||
+#define IPV6_MINHOPCOUNT 73
|
||||
+
|
||||
+#define IPV6_ORIGDSTADDR 74
|
||||
+#define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR
|
||||
+#define IPV6_TRANSPARENT 75
|
||||
+#define IPV6_UNICAST_IF 76
|
||||
+
|
||||
+/*
|
||||
+ * Multicast Routing:
|
||||
+ * see include/uapi/linux/mroute6.h.
|
||||
+ *
|
||||
+ * MRT6_BASE 200
|
||||
+ * ...
|
||||
+ * MRT6_MAX
|
||||
+ */
|
||||
+#endif /* _LINUX_IN6_H */
|
||||
|
@ -1,3 +1,2 @@
|
||||
DIST pcre-8.38.tar.bz2 1562265 SHA256 b9e02d36e23024d6c02a2e5b25204b3a4fa6ade43e0a5f869f254f49535079df SHA512 ad3412ceee8f992787a3e7cbe0155ffba67affd4b2dfece6c4501dc8d2012f52dcc1ee1f56759362e04bbbd10ea9370b3e46f238e2f75005cb69f6c8439e52c0 WHIRLPOOL 68533f741a3faa618f4d7341bfa59aaac295ac6af6085772e4c169ad73fae38e98cace2ce2af2899a619bb05dce79859dcd175a158a73729082f7cf52107d1df
|
||||
DIST pcre-8.39.tar.bz2 1560758 SHA256 b858099f82483031ee02092711689e7245586ada49e534a06e678b8ea9549e8b SHA512 8b0f14ae5947c4b2d74876a795b04e532fd71c2479a64dbe0ed817e7c7894ea3cae533413de8c17322d305cb7f4e275d72b43e4e828eaca77dc4bcaf04529cf6 WHIRLPOOL 00e8e7fb3dc60cbbd2ee185e269696058b568a0f269749386bad44cb474f723c9ed3dfd2af91ddce0b5047aab459864f07e05940af17d3d51d2f1b068415b1ed
|
||||
DIST pcre-8.40.tar.bz2 1560119 SHA256 00e27a29ead4267e3de8111fcaa59b132d0533cdfdbdddf4b0604279acbcf4f4 SHA512 b4c27eafbdf33bd7a1384655b1936f4be3bc6745c072347eb26e988896c52664bd85ac42444da1be78b6e20f45b6c7e5921f5f20f5b0741b5bd3d9844e5bd4e2 WHIRLPOOL 6711688972b3db4b98902d548b84e8b03b61c3a12d24a4e42fc49ddc5e2b4be51f98f91873166e550866e88b6cd55092ea27704a3b7e71d58a2af21148ad3340
|
||||
|
@ -1,42 +0,0 @@
|
||||
From b7537308b7c758f33c347cb0bec62754c43c271f Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Sat, 27 Feb 2016 17:38:11 +0000
|
||||
Subject: [PATCH] Yet another duplicate name bugfix by overestimating the
|
||||
memory needed (i.e. another hack - PCRE2 has this "properly" fixed).
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1636 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
---
|
||||
ChangeLog | 7 +++++++
|
||||
pcre_compile.c | 7 ++++++-
|
||||
testdata/testinput2 | 2 ++
|
||||
testdata/testoutput2 | 2 ++
|
||||
4 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
14. And yet another buffer overflow bug involving duplicate named groups, this
|
||||
time nested, with a nested back reference. Yet again, I have just allowed
|
||||
for more memory, because anything more needs all the refactoring that has
|
||||
been done for PCRE2. An example pattern that provoked this bug is:
|
||||
/((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/ and the bug was
|
||||
registered as CVE-2016-1283.
|
||||
|
||||
diff --git a/pcre_compile.c b/pcre_compile.c
|
||||
index 5019854..4ffea0c 100644
|
||||
--- a/pcre_compile.c
|
||||
+++ b/pcre_compile.c
|
||||
@@ -7311,7 +7311,12 @@ for (;; ptr++)
|
||||
so far in order to get the number. If the name is not found, leave
|
||||
the value of recno as 0 for a forward reference. */
|
||||
|
||||
- else
|
||||
+ /* This patch (removing "else") fixes a problem when a reference is
|
||||
+ to multiple identically named nested groups from within the nest.
|
||||
+ Once again, it is not the "proper" fix, and it results in an
|
||||
+ over-allocation of memory. */
|
||||
+
|
||||
+ /* else */
|
||||
{
|
||||
ng = cd->named_groups;
|
||||
for (i = 0; i < cd->names_found; i++, ng++)
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,172 +0,0 @@
|
||||
From 943a5105b9fe2842851003f692c7077a6cdbeefe Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Wed, 10 Feb 2016 19:13:17 +0000
|
||||
Subject: [PATCH] Fix workspace overflow for (*ACCEPT) with deeply nested
|
||||
parentheses.
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1631 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
---
|
||||
ChangeLog | 32 ++++++++++++++++++--------------
|
||||
pcre_compile.c | 23 +++++++++++++++++++----
|
||||
pcre_internal.h | 4 ++--
|
||||
pcreposix.c | 5 +++--
|
||||
testdata/testinput11 | 2 ++
|
||||
testdata/testoutput11-16 | 3 +++
|
||||
testdata/testoutput11-32 | 3 +++
|
||||
testdata/testoutput11-8 | 3 +++
|
||||
8 files changed, 53 insertions(+), 22 deletions(-)
|
||||
|
||||
13. A pattern that included (*ACCEPT) in the middle of a sufficiently deeply
|
||||
nested set of parentheses of sufficient size caused an overflow of the
|
||||
compiling workspace (which was diagnosed, but of course is not desirable).
|
||||
|
||||
diff --git a/pcre_compile.c b/pcre_compile.c
|
||||
index b9a239e..5019854 100644
|
||||
--- a/pcre_compile.c
|
||||
+++ b/pcre_compile.c
|
||||
@@ -6,7 +6,7 @@
|
||||
and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
- Copyright (c) 1997-2014 University of Cambridge
|
||||
+ Copyright (c) 1997-2016 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -560,6 +560,7 @@ static const char error_texts[] =
|
||||
/* 85 */
|
||||
"parentheses are too deeply nested (stack check)\0"
|
||||
"digits missing in \\x{} or \\o{}\0"
|
||||
+ "regular expression is too complicated\0"
|
||||
;
|
||||
|
||||
/* Table to identify digits and hex digits. This is used when compiling
|
||||
@@ -4591,7 +4592,8 @@ for (;; ptr++)
|
||||
if (code > cd->start_workspace + cd->workspace_size -
|
||||
WORK_SIZE_SAFETY_MARGIN) /* Check for overrun */
|
||||
{
|
||||
- *errorcodeptr = ERR52;
|
||||
+ *errorcodeptr = (code >= cd->start_workspace + cd->workspace_size)?
|
||||
+ ERR52 : ERR87;
|
||||
goto FAILED;
|
||||
}
|
||||
|
||||
@@ -6626,8 +6628,21 @@ for (;; ptr++)
|
||||
cd->had_accept = TRUE;
|
||||
for (oc = cd->open_caps; oc != NULL; oc = oc->next)
|
||||
{
|
||||
- *code++ = OP_CLOSE;
|
||||
- PUT2INC(code, 0, oc->number);
|
||||
+ if (lengthptr != NULL)
|
||||
+ {
|
||||
+#ifdef COMPILE_PCRE8
|
||||
+ *lengthptr += 1 + IMM2_SIZE;
|
||||
+#elif defined COMPILE_PCRE16
|
||||
+ *lengthptr += 2 + IMM2_SIZE;
|
||||
+#elif defined COMPILE_PCRE32
|
||||
+ *lengthptr += 4 + IMM2_SIZE;
|
||||
+#endif
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ *code++ = OP_CLOSE;
|
||||
+ PUT2INC(code, 0, oc->number);
|
||||
+ }
|
||||
}
|
||||
setverb = *code++ =
|
||||
(cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
|
||||
diff --git a/pcre_internal.h b/pcre_internal.h
|
||||
index f7a5ee7..dbfe80e 100644
|
||||
--- a/pcre_internal.h
|
||||
+++ b/pcre_internal.h
|
||||
@@ -7,7 +7,7 @@
|
||||
and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
- Copyright (c) 1997-2014 University of Cambridge
|
||||
+ Copyright (c) 1997-2016 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -2289,7 +2289,7 @@ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9,
|
||||
ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
|
||||
ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,
|
||||
ERR70, ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERR79,
|
||||
- ERR80, ERR81, ERR82, ERR83, ERR84, ERR85, ERR86, ERRCOUNT };
|
||||
+ ERR80, ERR81, ERR82, ERR83, ERR84, ERR85, ERR86, ERR87, ERRCOUNT };
|
||||
|
||||
/* JIT compiling modes. The function list is indexed by them. */
|
||||
|
||||
diff --git a/pcreposix.c b/pcreposix.c
|
||||
index dcc13ef..55b6ddc 100644
|
||||
--- a/pcreposix.c
|
||||
+++ b/pcreposix.c
|
||||
@@ -6,7 +6,7 @@
|
||||
and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
- Copyright (c) 1997-2014 University of Cambridge
|
||||
+ Copyright (c) 1997-2016 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -173,7 +173,8 @@ static const int eint[] = {
|
||||
REG_BADPAT, /* group name must start with a non-digit */
|
||||
/* 85 */
|
||||
REG_BADPAT, /* parentheses too deeply nested (stack check) */
|
||||
- REG_BADPAT /* missing digits in \x{} or \o{} */
|
||||
+ REG_BADPAT, /* missing digits in \x{} or \o{} */
|
||||
+ REG_BADPAT /* pattern too complicated */
|
||||
};
|
||||
|
||||
/* Table of texts corresponding to POSIX error codes */
|
||||
diff --git a/testdata/testinput11 b/testdata/testinput11
|
||||
index ac9d228..6f0989a 100644
|
||||
--- a/testdata/testinput11
|
||||
+++ b/testdata/testinput11
|
||||
@@ -138,4 +138,6 @@ is required for these tests. --/
|
||||
|
||||
/.((?2)(?R)\1)()/B
|
||||
|
||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
||||
+
|
||||
/-- End of testinput11 --/
|
||||
diff --git a/testdata/testoutput11-16 b/testdata/testoutput11-16
|
||||
index 280692e..3c485da 100644
|
||||
--- a/testdata/testoutput11-16
|
||||
+++ b/testdata/testoutput11-16
|
||||
@@ -765,4 +765,7 @@ Memory allocation (code space): 14
|
||||
25 End
|
||||
------------------------------------------------------------------
|
||||
|
||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
||||
+Failed: regular expression is too complicated at offset 490
|
||||
+
|
||||
/-- End of testinput11 --/
|
||||
diff --git a/testdata/testoutput11-32 b/testdata/testoutput11-32
|
||||
index cdbda74..e19518d 100644
|
||||
--- a/testdata/testoutput11-32
|
||||
+++ b/testdata/testoutput11-32
|
||||
@@ -765,4 +765,7 @@ Memory allocation (code space): 28
|
||||
25 End
|
||||
------------------------------------------------------------------
|
||||
|
||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
||||
+Failed: missing ) at offset 509
|
||||
+
|
||||
/-- End of testinput11 --/
|
||||
diff --git a/testdata/testoutput11-8 b/testdata/testoutput11-8
|
||||
index cb37896..5a4fbb2 100644
|
||||
--- a/testdata/testoutput11-8
|
||||
+++ b/testdata/testoutput11-8
|
||||
@@ -765,4 +765,7 @@ Memory allocation (code space): 10
|
||||
38 End
|
||||
------------------------------------------------------------------
|
||||
|
||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
||||
+Failed: missing ) at offset 509
|
||||
+
|
||||
/-- End of testinput11 --/
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,93 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
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 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~ia64-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
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${P}-ZDI-CAN-3542.patch #575546
|
||||
epatch "${FILESDIR}"/${P}-CVE-2016-1283.patch #570694
|
||||
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,176 +0,0 @@
|
||||
From 213f1fe0d76d30eaed6e5853057defc43e6df2c9 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Tue, 14 Apr 2015 17:41:48 +0800
|
||||
Subject: [PATCH] CVE-2015-1819 Enforce the reader to run in constant memory
|
||||
|
||||
One of the operation on the reader could resolve entities
|
||||
leading to the classic expansion issue. Make sure the
|
||||
buffer used for xmlreader operation is bounded.
|
||||
Introduce a new allocation type for the buffers for this effect.
|
||||
---
|
||||
buf.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
|
||||
include/libxml/tree.h | 3 ++-
|
||||
xmlreader.c | 20 +++++++++++++++++++-
|
||||
3 files changed, 63 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/buf.c b/buf.c
|
||||
index 6efc7b6..07922ff 100644
|
||||
--- a/buf.c
|
||||
+++ b/buf.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/tree.h>
|
||||
+#include <libxml/parserInternals.h> /* for XML_MAX_TEXT_LENGTH */
|
||||
#include "buf.h"
|
||||
|
||||
#define WITH_BUFFER_COMPAT
|
||||
@@ -299,7 +300,8 @@ xmlBufSetAllocationScheme(xmlBufPtr buf,
|
||||
if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
|
||||
(scheme == XML_BUFFER_ALLOC_EXACT) ||
|
||||
(scheme == XML_BUFFER_ALLOC_HYBRID) ||
|
||||
- (scheme == XML_BUFFER_ALLOC_IMMUTABLE)) {
|
||||
+ (scheme == XML_BUFFER_ALLOC_IMMUTABLE) ||
|
||||
+ (scheme == XML_BUFFER_ALLOC_BOUNDED)) {
|
||||
buf->alloc = scheme;
|
||||
if (buf->buffer)
|
||||
buf->buffer->alloc = scheme;
|
||||
@@ -458,6 +460,18 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
|
||||
size = buf->use + len + 100;
|
||||
#endif
|
||||
|
||||
+ if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
|
||||
+ /*
|
||||
+ * Used to provide parsing limits
|
||||
+ */
|
||||
+ if ((buf->use + len >= XML_MAX_TEXT_LENGTH) ||
|
||||
+ (buf->size >= XML_MAX_TEXT_LENGTH)) {
|
||||
+ xmlBufMemoryError(buf, "buffer error: text too long\n");
|
||||
+ return(0);
|
||||
+ }
|
||||
+ if (size >= XML_MAX_TEXT_LENGTH)
|
||||
+ size = XML_MAX_TEXT_LENGTH;
|
||||
+ }
|
||||
if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
|
||||
size_t start_buf = buf->content - buf->contentIO;
|
||||
|
||||
@@ -739,6 +753,15 @@ xmlBufResize(xmlBufPtr buf, size_t size)
|
||||
CHECK_COMPAT(buf)
|
||||
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
|
||||
+ if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
|
||||
+ /*
|
||||
+ * Used to provide parsing limits
|
||||
+ */
|
||||
+ if (size >= XML_MAX_TEXT_LENGTH) {
|
||||
+ xmlBufMemoryError(buf, "buffer error: text too long\n");
|
||||
+ return(0);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/* Don't resize if we don't have to */
|
||||
if (size < buf->size)
|
||||
@@ -867,6 +890,15 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
|
||||
|
||||
needSize = buf->use + len + 2;
|
||||
if (needSize > buf->size){
|
||||
+ if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
|
||||
+ /*
|
||||
+ * Used to provide parsing limits
|
||||
+ */
|
||||
+ if (needSize >= XML_MAX_TEXT_LENGTH) {
|
||||
+ xmlBufMemoryError(buf, "buffer error: text too long\n");
|
||||
+ return(-1);
|
||||
+ }
|
||||
+ }
|
||||
if (!xmlBufResize(buf, needSize)){
|
||||
xmlBufMemoryError(buf, "growing buffer");
|
||||
return XML_ERR_NO_MEMORY;
|
||||
@@ -938,6 +970,15 @@ xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len) {
|
||||
}
|
||||
needSize = buf->use + len + 2;
|
||||
if (needSize > buf->size){
|
||||
+ if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
|
||||
+ /*
|
||||
+ * Used to provide parsing limits
|
||||
+ */
|
||||
+ if (needSize >= XML_MAX_TEXT_LENGTH) {
|
||||
+ xmlBufMemoryError(buf, "buffer error: text too long\n");
|
||||
+ return(-1);
|
||||
+ }
|
||||
+ }
|
||||
if (!xmlBufResize(buf, needSize)){
|
||||
xmlBufMemoryError(buf, "growing buffer");
|
||||
return XML_ERR_NO_MEMORY;
|
||||
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
|
||||
index 2f90717..4a9b3bc 100644
|
||||
--- a/include/libxml/tree.h
|
||||
+++ b/include/libxml/tree.h
|
||||
@@ -76,7 +76,8 @@ typedef enum {
|
||||
XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
|
||||
XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
|
||||
XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
|
||||
- XML_BUFFER_ALLOC_HYBRID /* exact up to a threshold, and doubleit thereafter */
|
||||
+ XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
|
||||
+ XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
|
||||
} xmlBufferAllocationScheme;
|
||||
|
||||
/**
|
||||
diff --git a/xmlreader.c b/xmlreader.c
|
||||
index f19e123..471e7e2 100644
|
||||
--- a/xmlreader.c
|
||||
+++ b/xmlreader.c
|
||||
@@ -2091,6 +2091,9 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
|
||||
"xmlNewTextReader : malloc failed\n");
|
||||
return(NULL);
|
||||
}
|
||||
+ /* no operation on a reader should require a huge buffer */
|
||||
+ xmlBufSetAllocationScheme(ret->buffer,
|
||||
+ XML_BUFFER_ALLOC_BOUNDED);
|
||||
ret->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
|
||||
if (ret->sax == NULL) {
|
||||
xmlBufFree(ret->buffer);
|
||||
@@ -3616,6 +3619,7 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
|
||||
return(((xmlNsPtr) node)->href);
|
||||
case XML_ATTRIBUTE_NODE:{
|
||||
xmlAttrPtr attr = (xmlAttrPtr) node;
|
||||
+ const xmlChar *ret;
|
||||
|
||||
if ((attr->children != NULL) &&
|
||||
(attr->children->type == XML_TEXT_NODE) &&
|
||||
@@ -3629,10 +3633,21 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
|
||||
"xmlTextReaderSetup : malloc failed\n");
|
||||
return (NULL);
|
||||
}
|
||||
+ xmlBufSetAllocationScheme(reader->buffer,
|
||||
+ XML_BUFFER_ALLOC_BOUNDED);
|
||||
} else
|
||||
xmlBufEmpty(reader->buffer);
|
||||
xmlBufGetNodeContent(reader->buffer, node);
|
||||
- return(xmlBufContent(reader->buffer));
|
||||
+ ret = xmlBufContent(reader->buffer);
|
||||
+ if (ret == NULL) {
|
||||
+ /* error on the buffer best to reallocate */
|
||||
+ xmlBufFree(reader->buffer);
|
||||
+ reader->buffer = xmlBufCreateSize(100);
|
||||
+ xmlBufSetAllocationScheme(reader->buffer,
|
||||
+ XML_BUFFER_ALLOC_BOUNDED);
|
||||
+ ret = BAD_CAST "";
|
||||
+ }
|
||||
+ return(ret);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -5131,6 +5146,9 @@ xmlTextReaderSetup(xmlTextReaderPtr reader,
|
||||
"xmlTextReaderSetup : malloc failed\n");
|
||||
return (-1);
|
||||
}
|
||||
+ /* no operation on a reader should require a huge buffer */
|
||||
+ xmlBufSetAllocationScheme(reader->buffer,
|
||||
+ XML_BUFFER_ALLOC_BOUNDED);
|
||||
if (reader->sax == NULL)
|
||||
reader->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
|
||||
if (reader->sax == NULL) {
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1,17 +0,0 @@
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=749416
|
||||
|
||||
do not use -L$Z_DIR/lib when Z_DIR isn't actually set
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -392,7 +392,9 @@ if test "$with_zlib" = "no"; then
|
||||
else
|
||||
AC_CHECK_HEADERS(zlib.h,
|
||||
[SAVE_LDFLAGS="${LDFLAGS}"
|
||||
- LDFLAGS="-L${Z_DIR}/lib"
|
||||
+ if test "x${Z_DIR}" != "x"; then
|
||||
+ LDFLAGS="${LDFLAGS} -L${Z_DIR}/lib"
|
||||
+ fi
|
||||
AC_CHECK_LIB(z, gzread,[
|
||||
AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
|
||||
WITH_ZLIB=1
|
@ -1,32 +0,0 @@
|
||||
From a7dfab7411cbf545f359dd3157e5df1eb0e7ce31 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Mon, 23 Feb 2015 11:17:35 +0800
|
||||
Subject: [PATCH] Stop parsing on entities boundaries errors
|
||||
|
||||
For https://bugzilla.gnome.org/show_bug.cgi?id=744980
|
||||
|
||||
There are times, like on unterminated entities that it's preferable to
|
||||
stop parsing, even if that means less error reporting. Entities are
|
||||
feeding the parser on further processing, and if they are ill defined
|
||||
then it's possible to get the parser to bug. Also do the same on
|
||||
Conditional Sections if the input is broken, as the structure of
|
||||
the document can't be guessed.
|
||||
---
|
||||
parser.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/parser.c b/parser.c
|
||||
index a8d1b67..bbe97eb 100644
|
||||
--- a/parser.c
|
||||
+++ b/parser.c
|
||||
@@ -5658,6 +5658,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
|
||||
if (RAW != '>') {
|
||||
xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_NOT_FINISHED,
|
||||
"xmlParseEntityDecl: entity %s not terminated\n", name);
|
||||
+ xmlStopParser(ctxt);
|
||||
} else {
|
||||
if (input != ctxt->input) {
|
||||
xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
|
||||
--
|
||||
2.4.10
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 9b8512337d14c8ddf662fcb98b0135f225a1c489 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Mon, 23 Feb 2015 11:29:20 +0800
|
||||
Subject: [PATCH] Cleanup conditional section error handling
|
||||
|
||||
For https://bugzilla.gnome.org/show_bug.cgi?id=744980
|
||||
|
||||
The error handling of Conditional Section also need to be
|
||||
straightened as the structure of the document can't be
|
||||
guessed on a failure there and it's better to stop parsing
|
||||
as further errors are likely to be irrelevant.
|
||||
---
|
||||
parser.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/parser.c b/parser.c
|
||||
index bbe97eb..fe603ac 100644
|
||||
--- a/parser.c
|
||||
+++ b/parser.c
|
||||
@@ -6770,6 +6770,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
SKIP_BLANKS;
|
||||
if (RAW != '[') {
|
||||
xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
|
||||
+ xmlStopParser(ctxt);
|
||||
+ return;
|
||||
} else {
|
||||
if (ctxt->input->id != id) {
|
||||
xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
|
||||
@@ -6830,6 +6832,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
SKIP_BLANKS;
|
||||
if (RAW != '[') {
|
||||
xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
|
||||
+ xmlStopParser(ctxt);
|
||||
+ return;
|
||||
} else {
|
||||
if (ctxt->input->id != id) {
|
||||
xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
|
||||
@@ -6885,6 +6889,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
|
||||
} else {
|
||||
xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID_KEYWORD, NULL);
|
||||
+ xmlStopParser(ctxt);
|
||||
+ return;
|
||||
}
|
||||
|
||||
if (RAW == 0)
|
||||
--
|
||||
2.4.10
|
||||
|
@ -1,31 +0,0 @@
|
||||
From f0709e3ca8f8947f2d91ed34e92e38a4c23eae63 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Tue, 3 Nov 2015 15:31:25 +0800
|
||||
Subject: [PATCH] CVE-2015-8035 Fix XZ compression support loop
|
||||
|
||||
For https://bugzilla.gnome.org/show_bug.cgi?id=757466
|
||||
DoS when parsing specially crafted XML document if XZ support
|
||||
is compiled in (which wasn't the case for 2.9.2 and master since
|
||||
Nov 2013, fixed in next commit !)
|
||||
---
|
||||
xzlib.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/xzlib.c b/xzlib.c
|
||||
index 0dcb9f4..1fab546 100644
|
||||
--- a/xzlib.c
|
||||
+++ b/xzlib.c
|
||||
@@ -581,6 +581,10 @@ xz_decomp(xz_statep state)
|
||||
xz_error(state, LZMA_DATA_ERROR, "compressed data error");
|
||||
return -1;
|
||||
}
|
||||
+ if (ret == LZMA_PROG_ERROR) {
|
||||
+ xz_error(state, LZMA_PROG_ERROR, "compression error");
|
||||
+ return -1;
|
||||
+ }
|
||||
} while (strm->avail_out && ret != LZMA_STREAM_END);
|
||||
|
||||
/* update available output and crc check value */
|
||||
--
|
||||
2.4.10
|
||||
|
@ -1,114 +0,0 @@
|
||||
From 18b8988511b0954272cac4d6c3e6724f9dbf6e0a Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Tue, 3 Nov 2015 15:46:29 +0800
|
||||
Subject: [PATCH] Reenable xz support by default
|
||||
|
||||
For https://bugzilla.gnome.org/show_bug.cgi?id=757466
|
||||
|
||||
problem was introduced by commit f3f86ff465c92c79f834d7b981f3c7274a8bb5c8
|
||||
for https://bugzilla.gnome.org/show_bug.cgi?id=711026
|
||||
---
|
||||
configure.ac | 3 +++
|
||||
xmlIO.c | 12 ++++++------
|
||||
xzlib.c | 6 ++++--
|
||||
3 files changed, 13 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 14ac0a8..48e0577 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -445,6 +445,9 @@ else
|
||||
fi],
|
||||
[have_liblzma=no])
|
||||
LDFLAGS="${SAVE_LDFLAGS}"])
|
||||
+ else
|
||||
+ # we still need to check for lzma,h header
|
||||
+ AC_CHECK_HEADERS([lzma.h])
|
||||
fi
|
||||
|
||||
# Found the library via either method?
|
||||
diff --git a/xmlIO.c b/xmlIO.c
|
||||
index e628ab0..8b13184 100644
|
||||
--- a/xmlIO.c
|
||||
+++ b/xmlIO.c
|
||||
@@ -1334,7 +1334,7 @@ xmlGzfileClose (void * context) {
|
||||
}
|
||||
#endif /* HAVE_ZLIB_H */
|
||||
|
||||
-#ifdef HAVE_LZMA_H
|
||||
+#ifdef LIBXML_LZMA_ENABLED
|
||||
/************************************************************************
|
||||
* *
|
||||
* I/O for compressed file accesses *
|
||||
@@ -1451,7 +1451,7 @@ xmlXzfileClose (void * context) {
|
||||
if (ret < 0) xmlIOErr(0, "xzclose()");
|
||||
return(ret);
|
||||
}
|
||||
-#endif /* HAVE_LZMA_H */
|
||||
+#endif /* LIBXML_LZMA_ENABLED */
|
||||
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
/************************************************************************
|
||||
@@ -2328,10 +2328,10 @@ xmlRegisterDefaultInputCallbacks(void) {
|
||||
xmlRegisterInputCallbacks(xmlGzfileMatch, xmlGzfileOpen,
|
||||
xmlGzfileRead, xmlGzfileClose);
|
||||
#endif /* HAVE_ZLIB_H */
|
||||
-#ifdef HAVE_LZMA_H
|
||||
+#ifdef LIBXML_LZMA_ENABLED
|
||||
xmlRegisterInputCallbacks(xmlXzfileMatch, xmlXzfileOpen,
|
||||
xmlXzfileRead, xmlXzfileClose);
|
||||
-#endif /* HAVE_ZLIB_H */
|
||||
+#endif /* LIBXML_LZMA_ENABLED */
|
||||
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
xmlRegisterInputCallbacks(xmlIOHTTPMatch, xmlIOHTTPOpen,
|
||||
@@ -2683,7 +2683,7 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
-#ifdef HAVE_LZMA_H
|
||||
+#ifdef LIBXML_LZMA_ENABLED
|
||||
if ((xmlInputCallbackTable[i].opencallback == xmlXzfileOpen) &&
|
||||
(strcmp(URI, "-") != 0)) {
|
||||
ret->compressed = __libxml2_xzcompressed(context);
|
||||
@@ -3350,7 +3350,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
|
||||
* try to establish compressed status of input if not done already
|
||||
*/
|
||||
if (in->compressed == -1) {
|
||||
-#ifdef HAVE_LZMA_H
|
||||
+#ifdef LIBXML_LZMA_ENABLED
|
||||
if (in->readcallback == xmlXzfileRead)
|
||||
in->compressed = __libxml2_xzcompressed(in->context);
|
||||
#endif
|
||||
diff --git a/xzlib.c b/xzlib.c
|
||||
index 1fab546..782957f 100644
|
||||
--- a/xzlib.c
|
||||
+++ b/xzlib.c
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
#define IN_LIBXML
|
||||
#include "libxml.h"
|
||||
-#ifdef HAVE_LZMA_H
|
||||
+#ifdef LIBXML_LZMA_ENABLED
|
||||
|
||||
#include <string.h>
|
||||
#ifdef HAVE_ERRNO_H
|
||||
@@ -34,7 +34,9 @@
|
||||
#ifdef HAVE_ZLIB_H
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
+#ifdef HAVE_LZMA_H
|
||||
#include <lzma.h>
|
||||
+#endif
|
||||
|
||||
#include "xzlib.h"
|
||||
#include <libxml/xmlmemory.h>
|
||||
@@ -799,4 +801,4 @@ __libxml2_xzclose(xzFile file)
|
||||
xmlFree(state);
|
||||
return ret ? ret : LZMA_OK;
|
||||
}
|
||||
-#endif /* HAVE_LZMA_H */
|
||||
+#endif /* LIBXML_LZMA_ENABLED */
|
||||
--
|
||||
2.4.10
|
||||
|
@ -1,26 +0,0 @@
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 7374564..13c8d4e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1444,19 +1444,11 @@ XML_LIBTOOLLIBS="libxml2.la"
|
||||
AC_SUBST(WITH_ICONV)
|
||||
|
||||
WITH_ICU=0
|
||||
-ICU_LIBS=""
|
||||
if test "$with_icu" != "yes" ; then
|
||||
echo Disabling ICU support
|
||||
else
|
||||
- ICU_CONFIG=icu-config
|
||||
- if ${ICU_CONFIG} --cflags >/dev/null 2>&1
|
||||
- then
|
||||
- ICU_LIBS=`${ICU_CONFIG} --ldflags`
|
||||
- WITH_ICU=1
|
||||
- echo Enabling ICU support
|
||||
- else
|
||||
- AC_MSG_ERROR([libicu config program icu-config not found])
|
||||
- fi
|
||||
+ PKG_CHECK_MODULES(ICU, icu-i18n)
|
||||
+ WITH_ICU=1
|
||||
fi
|
||||
AC_SUBST(WITH_ICU)
|
||||
AC_SUBST(ICU_LIBS)
|
@ -1,31 +0,0 @@
|
||||
From 72a46a519ce7326d9a00f0b6a7f2a8e958cd1675 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Thu, 23 Oct 2014 11:35:36 +0800
|
||||
Subject: [PATCH] Fix missing entities after CVE-2014-3660 fix
|
||||
|
||||
For https://bugzilla.gnome.org/show_bug.cgi?id=738805
|
||||
|
||||
The fix for CVE-2014-3660 introduced a regression in some case
|
||||
where entity substitution is required and the entity is used
|
||||
first in anotther entity referenced from an attribute value
|
||||
---
|
||||
parser.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/parser.c b/parser.c
|
||||
index 67c9dfd..a8d1b67 100644
|
||||
--- a/parser.c
|
||||
+++ b/parser.c
|
||||
@@ -7235,7 +7235,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
|
||||
* far more secure as the parser will only process data coming from
|
||||
* the document entity by default.
|
||||
*/
|
||||
- if ((ent->checked == 0) &&
|
||||
+ if (((ent->checked == 0) ||
|
||||
+ ((ent->children == NULL) && (ctxt->options & XML_PARSE_NOENT))) &&
|
||||
((ent->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY) ||
|
||||
(ctxt->options & (XML_PARSE_NOENT | XML_PARSE_DTDVALID)))) {
|
||||
unsigned long oldnbent = ctxt->nbentities;
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1,32 +0,0 @@
|
||||
From bd0526e66a56e75a18da8c15c4750db8f801c52d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Fri, 23 Oct 2015 19:02:28 +0800
|
||||
Subject: Another variation of overflow in Conditional sections
|
||||
|
||||
Which happen after the previous fix to
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=756456
|
||||
|
||||
But stopping the parser and exiting we didn't pop the intermediary entities
|
||||
and doing the SKIP there applies on an input which may be too small
|
||||
---
|
||||
parser.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/parser.c b/parser.c
|
||||
index a65e4cc..b9217ff 100644
|
||||
--- a/parser.c
|
||||
+++ b/parser.c
|
||||
@@ -6915,7 +6915,9 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
"All markup of the conditional section is not in the same entity\n",
|
||||
NULL, NULL);
|
||||
}
|
||||
- SKIP(3);
|
||||
+ if ((ctxt-> instate != XML_PARSER_EOF) &&
|
||||
+ ((ctxt->input->cur + 3) < ctxt->input->end))
|
||||
+ SKIP(3);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
@ -1,28 +0,0 @@
|
||||
From 41ac9049a27f52e7a1f3b341f8714149fc88d450 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Tue, 27 Oct 2015 10:53:44 +0800
|
||||
Subject: Fix an error in previous Conditional section patch
|
||||
|
||||
an off by one mistake in the change, led to error on correct
|
||||
document where the end of the included entity was exactly
|
||||
the end of the conditional section, leading to regtest failure
|
||||
---
|
||||
parser.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/parser.c b/parser.c
|
||||
index b9217ff..d67b300 100644
|
||||
--- a/parser.c
|
||||
+++ b/parser.c
|
||||
@@ -6916,7 +6916,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
NULL, NULL);
|
||||
}
|
||||
if ((ctxt-> instate != XML_PARSER_EOF) &&
|
||||
- ((ctxt->input->cur + 3) < ctxt->input->end))
|
||||
+ ((ctxt->input->cur + 3) <= ctxt->input->end))
|
||||
SKIP(3);
|
||||
}
|
||||
}
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
@ -1,26 +0,0 @@
|
||||
From f65128f38289d77ff322d63aef2858cc0a819c34 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Fri, 17 Oct 2014 17:13:41 +0800
|
||||
Subject: Revert "Missing initialization for the catalog module"
|
||||
|
||||
This reverts commit 054c716ea1bf001544127a4ab4f4346d1b9947e7.
|
||||
As this break xmlcatalog command
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1153753
|
||||
|
||||
diff --git a/parser.c b/parser.c
|
||||
index 1d93967..67c9dfd 100644
|
||||
--- a/parser.c
|
||||
+++ b/parser.c
|
||||
@@ -14830,9 +14830,6 @@ xmlInitParser(void) {
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
xmlXPathInit();
|
||||
#endif
|
||||
-#ifdef LIBXML_CATALOG_ENABLED
|
||||
- xmlInitializeCatalog();
|
||||
-#endif
|
||||
xmlParserInitialized = 1;
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
}
|
||||
--
|
||||
cgit v0.10.1
|
||||
|
@ -1,48 +0,0 @@
|
||||
From fff8a6b87e05200a0ad0af6f86c2e859c7de9172 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Heimpold <mhei@heimpold.de>
|
||||
Date: Mon, 22 Dec 2014 11:12:12 +0800
|
||||
Subject: [PATCH] threads: use forward declarations only for glibc
|
||||
|
||||
Fixes bug #704908
|
||||
|
||||
The declarations of pthread functions, used to generate weak references
|
||||
to them, fail to suppress macros. Thus, if any pthread function has
|
||||
been provided as a macro, compiling threads.c will fail.
|
||||
This breaks on musl libc, which defines pthread_equal as a macro (in
|
||||
addition to providing the function, as required).
|
||||
|
||||
Prevent the declarations for e.g. musl libc by refining the condition.
|
||||
|
||||
The idea for this solution was borrowed from the alpine linux guys, see
|
||||
http://git.alpinelinux.org/cgit/aports/tree/main/libxml2/libxml2-pthread.patch
|
||||
|
||||
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
|
||||
---
|
||||
threads.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/threads.c b/threads.c
|
||||
index 8921204..78006a2 100644
|
||||
--- a/threads.c
|
||||
+++ b/threads.c
|
||||
@@ -47,7 +47,7 @@
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
|
||||
static int libxml_is_threaded = -1;
|
||||
-#ifdef __GNUC__
|
||||
+#if defined(__GNUC__) && defined(__GLIBC__)
|
||||
#ifdef linux
|
||||
#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
|
||||
extern int pthread_once (pthread_once_t *__once_control,
|
||||
@@ -89,7 +89,7 @@ extern int pthread_cond_signal ()
|
||||
__attribute((weak));
|
||||
#endif
|
||||
#endif /* linux */
|
||||
-#endif /* __GNUC__ */
|
||||
+#endif /* defined(__GNUC__) && defined(__GLIBC__) */
|
||||
#endif /* HAVE_PTHREAD_H */
|
||||
|
||||
/*
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1,128 +0,0 @@
|
||||
From 9b987f8c98763ee569bde90b5268b43474ca106c Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Swenson <chris@caswenson.com>
|
||||
Date: Fri, 27 Feb 2015 14:55:49 +0800
|
||||
Subject: [PATCH] Fix timsort invariant loop re: Envisage article
|
||||
|
||||
See http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/
|
||||
|
||||
We use a "runLen" array of size 128, so it should be nearly impossible
|
||||
to have our implementation overflow.
|
||||
|
||||
But in any case, the fix is relatively simple -- checking two extra
|
||||
conditions in the invariant calculation.
|
||||
|
||||
I also took this opportunity to remove some redundancy in the
|
||||
left/right merge logic in the invariant loop.
|
||||
---
|
||||
timsort.h | 74 +++++++++++++++++++++++++++++++++------------------------------
|
||||
1 file changed, 39 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/timsort.h b/timsort.h
|
||||
index efa3aab..795f272 100644
|
||||
--- a/timsort.h
|
||||
+++ b/timsort.h
|
||||
@@ -392,62 +392,66 @@ static void TIM_SORT_MERGE(SORT_TYPE *dst, const TIM_SORT_RUN_T *stack, const in
|
||||
|
||||
static int TIM_SORT_COLLAPSE(SORT_TYPE *dst, TIM_SORT_RUN_T *stack, int stack_curr, TEMP_STORAGE_T *store, const size_t size)
|
||||
{
|
||||
- while (1)
|
||||
- {
|
||||
- int64_t A, B, C;
|
||||
+ while (1) {
|
||||
+ int64_t A, B, C, D;
|
||||
+ int ABC, BCD, BD, CD;
|
||||
+
|
||||
/* if the stack only has one thing on it, we are done with the collapse */
|
||||
- if (stack_curr <= 1) break;
|
||||
+ if (stack_curr <= 1) {
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
/* if this is the last merge, just do it */
|
||||
- if ((stack_curr == 2) &&
|
||||
- (stack[0].length + stack[1].length == (int64_t) size))
|
||||
- {
|
||||
+ if ((stack_curr == 2) && (stack[0].length + stack[1].length == size)) {
|
||||
TIM_SORT_MERGE(dst, stack, stack_curr, store);
|
||||
stack[0].length += stack[1].length;
|
||||
stack_curr--;
|
||||
break;
|
||||
}
|
||||
/* check if the invariant is off for a stack of 2 elements */
|
||||
- else if ((stack_curr == 2) && (stack[0].length <= stack[1].length))
|
||||
- {
|
||||
+ else if ((stack_curr == 2) && (stack[0].length <= stack[1].length)) {
|
||||
TIM_SORT_MERGE(dst, stack, stack_curr, store);
|
||||
stack[0].length += stack[1].length;
|
||||
stack_curr--;
|
||||
break;
|
||||
- }
|
||||
- else if (stack_curr == 2)
|
||||
+ } else if (stack_curr == 2) {
|
||||
break;
|
||||
+ }
|
||||
|
||||
- A = stack[stack_curr - 3].length;
|
||||
- B = stack[stack_curr - 2].length;
|
||||
- C = stack[stack_curr - 1].length;
|
||||
+ B = stack[stack_curr - 3].length;
|
||||
+ C = stack[stack_curr - 2].length;
|
||||
+ D = stack[stack_curr - 1].length;
|
||||
|
||||
- /* check first invariant */
|
||||
- if (A <= B + C)
|
||||
- {
|
||||
- if (A < C)
|
||||
- {
|
||||
- TIM_SORT_MERGE(dst, stack, stack_curr - 1, store);
|
||||
- stack[stack_curr - 3].length += stack[stack_curr - 2].length;
|
||||
- stack[stack_curr - 2] = stack[stack_curr - 1];
|
||||
- stack_curr--;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- TIM_SORT_MERGE(dst, stack, stack_curr, store);
|
||||
- stack[stack_curr - 2].length += stack[stack_curr - 1].length;
|
||||
- stack_curr--;
|
||||
- }
|
||||
+ if (stack_curr >= 4) {
|
||||
+ A = stack[stack_curr - 4].length;
|
||||
+ ABC = (A <= B + C);
|
||||
+ } else {
|
||||
+ ABC = 0;
|
||||
}
|
||||
- /* check second invariant */
|
||||
- else if (B <= C)
|
||||
- {
|
||||
+
|
||||
+ BCD = (B <= C + D) || ABC;
|
||||
+ CD = (C <= D);
|
||||
+ BD = (B < D);
|
||||
+
|
||||
+ /* Both invariants are good */
|
||||
+ if (!BCD && !CD) {
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* left merge */
|
||||
+ if (BCD && !CD) {
|
||||
+ TIM_SORT_MERGE(dst, stack, stack_curr - 1, store);
|
||||
+ stack[stack_curr - 3].length += stack[stack_curr - 2].length;
|
||||
+ stack[stack_curr - 2] = stack[stack_curr - 1];
|
||||
+ stack_curr--;
|
||||
+ } else {
|
||||
+ /* right merge */
|
||||
TIM_SORT_MERGE(dst, stack, stack_curr, store);
|
||||
stack[stack_curr - 2].length += stack[stack_curr - 1].length;
|
||||
stack_curr--;
|
||||
}
|
||||
- else
|
||||
- break;
|
||||
}
|
||||
+
|
||||
return stack_curr;
|
||||
}
|
||||
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1,65 +0,0 @@
|
||||
From e724879d964d774df9b7969fc846605aa1bac54c Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Veillard <veillard@redhat.com>
|
||||
Date: Fri, 30 Oct 2015 21:14:55 +0800
|
||||
Subject: Fix parsing short unclosed comment uninitialized access
|
||||
|
||||
For https://bugzilla.gnome.org/show_bug.cgi?id=746048
|
||||
The HTML parser was too optimistic when processing comments and
|
||||
didn't check for the end of the stream on the first 2 characters
|
||||
---
|
||||
HTMLparser.c | 21 ++++++++++++++-------
|
||||
1 file changed, 14 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/HTMLparser.c b/HTMLparser.c
|
||||
index 19c10c3..bdf7807 100644
|
||||
--- a/HTMLparser.c
|
||||
+++ b/HTMLparser.c
|
||||
@@ -3264,12 +3264,17 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
|
||||
ctxt->instate = state;
|
||||
return;
|
||||
}
|
||||
+ len = 0;
|
||||
+ buf[len] = 0;
|
||||
q = CUR_CHAR(ql);
|
||||
+ if (!IS_CHAR(q))
|
||||
+ goto unfinished;
|
||||
NEXTL(ql);
|
||||
r = CUR_CHAR(rl);
|
||||
+ if (!IS_CHAR(r))
|
||||
+ goto unfinished;
|
||||
NEXTL(rl);
|
||||
cur = CUR_CHAR(l);
|
||||
- len = 0;
|
||||
while (IS_CHAR(cur) &&
|
||||
((cur != '>') ||
|
||||
(r != '-') || (q != '-'))) {
|
||||
@@ -3300,18 +3305,20 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
|
||||
}
|
||||
}
|
||||
buf[len] = 0;
|
||||
- if (!IS_CHAR(cur)) {
|
||||
- htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
|
||||
- "Comment not terminated \n<!--%.50s\n", buf, NULL);
|
||||
- xmlFree(buf);
|
||||
- } else {
|
||||
+ if (IS_CHAR(cur)) {
|
||||
NEXT;
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) &&
|
||||
(!ctxt->disableSAX))
|
||||
ctxt->sax->comment(ctxt->userData, buf);
|
||||
xmlFree(buf);
|
||||
+ ctxt->instate = state;
|
||||
+ return;
|
||||
}
|
||||
- ctxt->instate = state;
|
||||
+
|
||||
+unfinished:
|
||||
+ htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
|
||||
+ "Comment not terminated \n<!--%.50s\n", buf, NULL);
|
||||
+ xmlFree(buf);
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
@ -1,215 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5} )
|
||||
PYTHON_REQ_USE="xml"
|
||||
|
||||
inherit libtool flag-o-matic eutils python-r1 autotools prefix multilib-minimal
|
||||
|
||||
DESCRIPTION="Version 2 of the library to manipulate XML files"
|
||||
HOMEPAGE="http://www.xmlsoft.org/"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="2"
|
||||
KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
|
||||
IUSE="debug examples icu ipv6 lzma python readline static-libs test"
|
||||
|
||||
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
|
||||
XSTS_NAME_1="xmlschema2002-01-16"
|
||||
XSTS_NAME_2="xmlschema2004-01-14"
|
||||
XSTS_TARBALL_1="xsts-2002-01-16.tar.gz"
|
||||
XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
|
||||
XMLCONF_TARBALL="xmlts20080827.tar.gz"
|
||||
|
||||
SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz
|
||||
test? (
|
||||
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
|
||||
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
|
||||
http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )"
|
||||
|
||||
RDEPEND="
|
||||
>=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
|
||||
icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
|
||||
lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
readline? ( sys-libs/readline:= )
|
||||
"
|
||||
DEPEND="${EDEPEND}
|
||||
dev-util/gtk-doc-am
|
||||
virtual/pkgconfig
|
||||
hppa? ( >=sys-devel/binutils-2.15.92.0.2 )
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${PN}-${PV%_rc*}"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/xml2-config
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
# ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
|
||||
# as they are needed as tarballs in ${S}/xstc instead and not unpacked
|
||||
unpack ${P/_rc/-rc}.tar.gz
|
||||
cd "${S}"
|
||||
|
||||
if use test; then
|
||||
cp "${DISTDIR}/${XSTS_TARBALL_1}" \
|
||||
"${DISTDIR}/${XSTS_TARBALL_2}" \
|
||||
"${S}"/xstc/ \
|
||||
|| die "Failed to install test tarballs"
|
||||
unpack ${XMLCONF_TARBALL}
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
DOCS=( AUTHORS ChangeLog NEWS README* TODO* )
|
||||
|
||||
# Patches needed for prefix support
|
||||
epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
|
||||
|
||||
eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c
|
||||
|
||||
# Fix build for Windows platform
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=760456
|
||||
epatch "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch
|
||||
|
||||
# Disable programs that we don't actually install.
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=760457
|
||||
epatch "${FILESDIR}"/${PN}-2.9.2-disable-tests.patch
|
||||
|
||||
# Fix zlib parameter handling for cross-compilation
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=749416
|
||||
epatch "${FILESDIR}"/${PN}-2.9.2-cross-compile.patch
|
||||
|
||||
# Use pkgconfig to find icu to properly support multilib
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=738751
|
||||
epatch "${FILESDIR}"/${PN}-2.9.2-icu-pkgconfig.patch
|
||||
|
||||
# Fix python detection, bug #567066
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=760458
|
||||
epatch "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch
|
||||
|
||||
# Please do not remove, as else we get references to PORTAGE_TMPDIR
|
||||
# in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
|
||||
# We now need to run eautoreconf at the end to prevent maintainer mode.
|
||||
# elibtoolize
|
||||
# epunt_cxx # if we don't eautoreconf
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# filter seemingly problematic CFLAGS (#26320)
|
||||
filter-flags -fprefetch-loop-arrays -funroll-loops
|
||||
|
||||
# USE zlib support breaks gnome2
|
||||
# (libgnomeprint for instance fails to compile with
|
||||
# fresh install, and existing) - <azarah@gentoo.org> (22 Dec 2002).
|
||||
|
||||
# The meaning of the 'debug' USE flag does not apply to the --with-debug
|
||||
# switch (enabling the libxml2 debug module). See bug #100898.
|
||||
|
||||
# --with-mem-debug causes unusual segmentation faults (bug #105120).
|
||||
|
||||
libxml2_configure() {
|
||||
ECONF_SOURCE="${S}" econf \
|
||||
--with-html-subdir=${PF}/html \
|
||||
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
||||
$(use_with debug run-debug) \
|
||||
$(use_with icu) \
|
||||
$(use_with lzma) \
|
||||
$(use_enable ipv6) \
|
||||
$(use_enable static-libs static) \
|
||||
$(multilib_native_use_with readline) \
|
||||
$(multilib_native_use_with readline history) \
|
||||
"$@"
|
||||
}
|
||||
|
||||
libxml2_py_configure() {
|
||||
mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
|
||||
run_in_build_dir libxml2_configure "--with-python=${PYTHON}" # odd build system
|
||||
}
|
||||
|
||||
libxml2_configure --without-python # build python bindings separately
|
||||
|
||||
if multilib_is_native_abi && use python; then
|
||||
python_foreach_impl libxml2_py_configure
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
default
|
||||
if multilib_is_native_abi && use python; then
|
||||
local native_builddir=${BUILD_DIR}
|
||||
python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
default
|
||||
multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install
|
||||
|
||||
if multilib_is_native_abi && use python; then
|
||||
python_foreach_impl libxml2_py_emake \
|
||||
DESTDIR="${D}" \
|
||||
docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
|
||||
exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
|
||||
install
|
||||
python_foreach_impl python_optimize
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
# on windows, xmllint is installed by interix libxml2 in parent prefix.
|
||||
# this is the version to use. the native winnt version does not support
|
||||
# symlinks, which makes repoman fail if the portage tree is linked in
|
||||
# from another location (which is my default). -- mduft
|
||||
if [[ ${CHOST} == *-winnt* ]]; then
|
||||
rm -rf "${ED}"/usr/bin/xmllint
|
||||
rm -rf "${ED}"/usr/bin/xmlcatalog
|
||||
fi
|
||||
|
||||
rm -rf "${ED}"/usr/share/doc/${P}
|
||||
einstalldocs
|
||||
|
||||
if ! use examples; then
|
||||
rm -rf "${ED}"/usr/share/doc/${PF}/examples
|
||||
rm -rf "${ED}"/usr/share/doc/${PF}/python/examples
|
||||
fi
|
||||
|
||||
prune_libtool_files --modules
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# We don't want to do the xmlcatalog during stage1, as xmlcatalog will not
|
||||
# be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887.
|
||||
if [[ "${ROOT}" != "/" ]]; then
|
||||
elog "Skipping XML catalog creation for stage building (bug #208887)."
|
||||
else
|
||||
# need an XML catalog, so no-one writes to a non-existent one
|
||||
CATALOG="${EROOT}etc/xml/catalog"
|
||||
|
||||
# we dont want to clobber an existing catalog though,
|
||||
# only ensure that one is there
|
||||
# <obz@gentoo.org>
|
||||
if [[ ! -e ${CATALOG} ]]; then
|
||||
[[ -d "${EROOT}etc/xml" ]] || mkdir -p "${EROOT}etc/xml"
|
||||
"${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}"
|
||||
einfo "Created XML catalog in ${CATALOG}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
libxml2_py_emake() {
|
||||
pushd "${BUILD_DIR}/python" > /dev/null || die
|
||||
emake "$@"
|
||||
popd > /dev/null
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue