parent
a5fce7260a
commit
d466718535
Binary file not shown.
Binary file not shown.
@ -0,0 +1,194 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
LUA_COMPAT=( lua5-3 )
|
||||||
|
|
||||||
|
inherit cmake linux-info lua-single readme.gentoo-r1 xdg
|
||||||
|
|
||||||
|
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 ~ppc64 ~sparc ~x86"
|
||||||
|
IUSE="apcupsd bundled-toluapp cmus curl doc 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 webserver wifi X xinerama xmms2"
|
||||||
|
|
||||||
|
COMMON_DEPEND="
|
||||||
|
cmus? ( media-sound/cmus )
|
||||||
|
curl? ( net-misc/curl )
|
||||||
|
ical? ( dev-libs/libical:= )
|
||||||
|
iconv? ( virtual/libiconv )
|
||||||
|
imlib? ( media-libs/imlib2[X] )
|
||||||
|
irc? ( net-libs/libircclient )
|
||||||
|
lua-cairo? ( x11-libs/cairo[X] )
|
||||||
|
lua-imlib? ( media-libs/imlib2[X] )
|
||||||
|
lua-rsvg? ( gnome-base/librsvg )
|
||||||
|
mysql? ( dev-db/mysql-connector-c )
|
||||||
|
ncurses? ( sys-libs/ncurses:= )
|
||||||
|
nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
|
||||||
|
pulseaudio? ( media-sound/pulseaudio )
|
||||||
|
rss? ( dev-libs/libxml2 net-misc/curl dev-libs/glib:2 )
|
||||||
|
systemd? ( sys-apps/systemd )
|
||||||
|
truetype? ( x11-libs/libXft >=media-libs/freetype-2 )
|
||||||
|
wifi? ( net-wireless/wireless-tools )
|
||||||
|
weather-metar? ( net-misc/curl )
|
||||||
|
webserver? ( net-libs/libmicrohttpd )
|
||||||
|
X? (
|
||||||
|
x11-libs/libX11
|
||||||
|
x11-libs/libXdamage
|
||||||
|
x11-libs/libXfixes
|
||||||
|
x11-libs/libXext
|
||||||
|
)
|
||||||
|
xinerama? ( x11-libs/libXinerama )
|
||||||
|
xmms2? ( media-sound/xmms2 )
|
||||||
|
${LUA_DEPS}
|
||||||
|
"
|
||||||
|
RDEPEND="
|
||||||
|
${COMMON_DEPEND}
|
||||||
|
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="
|
||||||
|
${COMMON_DEPEND}
|
||||||
|
doc? ( app-text/docbook2X dev-libs/libxslt )
|
||||||
|
"
|
||||||
|
|
||||||
|
REQUIRED_USE="
|
||||||
|
imlib? ( X )
|
||||||
|
lua-cairo? ( X bundled-toluapp )
|
||||||
|
lua-imlib? ( X bundled-toluapp )
|
||||||
|
lua-rsvg? ( X bundled-toluapp )
|
||||||
|
nvidia? ( X )
|
||||||
|
truetype? ( X )
|
||||||
|
xinerama? ( X )
|
||||||
|
"
|
||||||
|
|
||||||
|
CONFIG_CHECK="~IPV6"
|
||||||
|
|
||||||
|
DOCS=( README.md AUTHORS )
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-1.11.6-ipv6.patch
|
||||||
|
"${FILESDIR}"/${P}-network-speed.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
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 when built with USE=doc.
|
||||||
|
|
||||||
|
Also see https://wiki.gentoo.org/wiki/Conky/HOWTO"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
use ipv6 && linux-info_pkg_setup
|
||||||
|
|
||||||
|
lua-single_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
cmake_src_prepare
|
||||||
|
|
||||||
|
xdg_environment_reset
|
||||||
|
|
||||||
|
sed -i -e "s|find_program(APP_MAN man)|set(APP_MAN $(which man) CACHE FILEPATH MAN_BINARY)|" \
|
||||||
|
cmake/ConkyPlatformChecks.cmake || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local mycmakeargs
|
||||||
|
|
||||||
|
if use X; then
|
||||||
|
mycmakeargs=(
|
||||||
|
-DBUILD_ARGB=yes
|
||||||
|
-DBUILD_X11=yes
|
||||||
|
-DBUILD_XDAMAGE=yes
|
||||||
|
-DBUILD_XDBE=yes
|
||||||
|
-DBUILD_XSHAPE=yes
|
||||||
|
-DOWN_WINDOW=yes
|
||||||
|
)
|
||||||
|
else
|
||||||
|
mycmakeargs=(
|
||||||
|
-DBUILD_X11=no
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
mycmakeargs+=(
|
||||||
|
-DBUILD_APCUPSD=$(usex apcupsd)
|
||||||
|
-DBUILD_AUDACIOUS=no
|
||||||
|
-DBUILD_BUILTIN_CONFIG=yes
|
||||||
|
-DBUILD_CMUS=$(usex cmus)
|
||||||
|
-DBUILD_CURL=$(usex curl)
|
||||||
|
-DBUILD_DOCS=$(usex doc)
|
||||||
|
-DBUILD_HDDTEMP=$(usex hddtemp)
|
||||||
|
-DBUILD_HTTP=$(usex webserver)
|
||||||
|
-DBUILD_I18N=yes
|
||||||
|
-DBUILD_IBM=$(usex thinkpad)
|
||||||
|
-DBUILD_ICAL=$(usex ical)
|
||||||
|
-DBUILD_ICONV=$(usex iconv)
|
||||||
|
-DBUILD_IMLIB2=$(usex imlib)
|
||||||
|
-DBUILD_IOSTATS=$(usex iostats)
|
||||||
|
-DBUILD_IPV6=$(usex ipv6)
|
||||||
|
-DBUILD_IRC=$(usex irc)
|
||||||
|
-DBUILD_JOURNAL=$(usex systemd)
|
||||||
|
-DBUILD_LUA_CAIRO=$(usex lua-cairo)
|
||||||
|
-DBUILD_LUA_IMLIB2=$(usex lua-imlib)
|
||||||
|
-DBUILD_LUA_RSVG=$(usex lua-rsvg)
|
||||||
|
-DBUILD_MATH=$(usex math)
|
||||||
|
-DBUILD_MOC=$(usex moc)
|
||||||
|
-DBUILD_MPD=$(usex mpd)
|
||||||
|
-DBUILD_MYSQL=$(usex mysql)
|
||||||
|
-DBUILD_NCURSES=$(usex ncurses)
|
||||||
|
-DBUILD_NVIDIA=$(usex nvidia)
|
||||||
|
-DBUILD_OLD_CONFIG=yes
|
||||||
|
-DBUILD_PORT_MONITORS=$(usex portmon)
|
||||||
|
-DBUILD_PULSEAUDIO=$(usex pulseaudio)
|
||||||
|
-DBUILD_RSS=$(usex rss)
|
||||||
|
-DBUILD_WEATHER_METAR=$(usex weather-metar)
|
||||||
|
-DBUILD_WLAN=$(usex wifi)
|
||||||
|
-DBUILD_XFT=$(usex truetype)
|
||||||
|
-DBUILD_XINERAMA=$(usex xinerama)
|
||||||
|
-DBUILD_XMMS2=$(usex xmms2)
|
||||||
|
-DDOC_PATH=/usr/share/doc/${PF}
|
||||||
|
-DMAINTAINER_MODE=no
|
||||||
|
-DRELEASE=yes
|
||||||
|
)
|
||||||
|
|
||||||
|
cmake_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
cmake_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
|
||||||
|
|
||||||
|
xdg_pkg_postinst
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
From 415c730133476d6652f479242b0638496b5f673b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steven Xu <stevenxxiu@gmail.com>
|
||||||
|
Date: Tue, 23 Mar 2021 20:12:52 +1100
|
||||||
|
Subject: [PATCH] fix: update `update last_update_time` earlier, so the network
|
||||||
|
speed is correctly displayed, otherwise the speed shown is much lower than
|
||||||
|
the actual speed (resolves #863)
|
||||||
|
|
||||||
|
---
|
||||||
|
src/conky.cc | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/conky.cc b/src/conky.cc
|
||||||
|
index b116b2bed..af5602c5b 100644
|
||||||
|
--- a/src/conky.cc
|
||||||
|
+++ b/src/conky.cc
|
||||||
|
@@ -766,6 +766,12 @@ static void generate_text() {
|
||||||
|
* some info.mem entries */
|
||||||
|
update_stuff();
|
||||||
|
|
||||||
|
+ /* Update `last_update_time` before `generate_text_internal()`, as the latter
|
||||||
|
+ * calls `evaluate()` -> `update_net_stats()`, which needs `last_update_time`
|
||||||
|
+ * to be set correctly. If this is not done, than the network speed being
|
||||||
|
+ * shown will be much lower than the actual speed.*/
|
||||||
|
+ last_update_time = current_update_time;
|
||||||
|
+
|
||||||
|
/* populate the text buffer; generate_text_internal() iterates through
|
||||||
|
* global_root_object (an instance of the text_object struct) and calls
|
||||||
|
* any callbacks that were set on startup by construct_text_object(). */
|
||||||
|
@@ -822,7 +828,6 @@ static void generate_text() {
|
||||||
|
if (next_update_time < time || next_update_time > time + ui) {
|
||||||
|
next_update_time = time - fmod(time, ui) + ui;
|
||||||
|
}
|
||||||
|
- last_update_time = current_update_time;
|
||||||
|
total_updates++;
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
@ -1,27 +0,0 @@
|
|||||||
https://github.com/digint/btrbk/pull/341
|
|
||||||
|
|
||||||
From ec123405669762aefe813801e2c49183800cc3a9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Xiretza <xiretza@xiretza.xyz>
|
|
||||||
Date: Mon, 28 Sep 2020 16:49:19 +0200
|
|
||||||
Subject: [PATCH] Fix race condition in `make install`
|
|
||||||
|
|
||||||
If run with -j, it's possible for install-bin-links to run before
|
|
||||||
install-bin and subsequently fail because $(BINDIR) hasn't been created
|
|
||||||
yet.
|
|
||||||
---
|
|
||||||
Makefile | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 030b577..44ab19f 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -54,7 +54,7 @@ install-bin:
|
|
||||||
install -d -m 755 "$(DESTDIR)$(BINDIR)"
|
|
||||||
install -p -m 755 $(BIN) "$(DESTDIR)$(BINDIR)"
|
|
||||||
|
|
||||||
-install-bin-links:
|
|
||||||
+install-bin-links: install-bin
|
|
||||||
@echo 'installing symlinks...'
|
|
||||||
for name in $(BIN_LINKS); do \
|
|
||||||
ln -s -n -f $(BIN) "$(DESTDIR)$(BINDIR)/$$name"; \
|
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
DIST stress-ng-0.12.05.tar.xz 529660 BLAKE2B 3ba32dceddeae0910a20fe2a6dda783845059a8d022c372ffef9fc2908ef8b724eb9ce9fef111102f4a07c6f3f05e80560d74285c15a6f82f665a716163b4f1e SHA512 c7be3bfbded5e0d953a02d59fdd983af46e9588b21c4858b26a9432b72f4c6bd5710f5294372746adcb52aeb8d0e9800c99c3256d269b25458af31591f63a758
|
DIST stress-ng-0.12.06.tar.xz 530940 BLAKE2B dcf1c97df38cdfd15c88fa71497477d83a0ab8e18ca506717f360b8a1f284be00163f6de956d686cdd6d479bd6fb2075ec2dc4dea55b4af4c623caf4a412e7a0 SHA512 bdfbee6c1d339dc4d288aa28b08bdaf158f49bb023b527c653e7956d80607690fe4aab763acc8c6659e822f2e225ee2be39ff60effa972b05c4c5e0fe067d6fc
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
# Codename "synthetic system strainer"
|
|
||||||
#
|
|
||||||
|
|
||||||
-CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 -std=gnu99
|
|
||||||
+CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -std=gnu99
|
|
||||||
|
|
||||||
#
|
|
||||||
# Pedantic flags
|
|
||||||
@@ -364,12 +364,10 @@
|
|
||||||
.o: stress-ng.h Makefile
|
|
||||||
|
|
||||||
.c.o:
|
|
||||||
- @echo "CC $<"
|
|
||||||
- @$(CC) $(CFLAGS) -c -o $@ $<
|
|
||||||
+ $(CC) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
stress-ng: $(OBJS)
|
|
||||||
- @echo "LD $@"
|
|
||||||
- @$(CC) $(CPPFLAGS) $(CFLAGS) $(OBJS) -lm $(LDFLAGS) -o $@
|
|
||||||
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(OBJS) -lm $(LDFLAGS) -o $@
|
|
||||||
@sync
|
|
||||||
|
|
||||||
makeconfig:
|
|
||||||
@@ -390,8 +388,7 @@
|
|
||||||
sed '$$ s/.$$//' >> apparmor-data.c
|
|
||||||
@echo "};" >> apparmor-data.c
|
|
||||||
@echo "const size_t g_apparmor_data_len = sizeof(g_apparmor_data);" >> apparmor-data.c
|
|
||||||
- @echo "CC $<"
|
|
||||||
- @$(CC) -c apparmor-data.c -o apparmor-data.o
|
|
||||||
+ $(CC) -c apparmor-data.c -o apparmor-data.o
|
|
||||||
@rm -rf apparmor-data.c apparmor-data.bin
|
|
||||||
|
|
||||||
#
|
|
||||||
@@ -419,12 +416,10 @@
|
|
||||||
@$(CC) $(CFLAGS) -E core-perf-event.c | $(GREP) "PERF_COUNT" | \
|
|
||||||
sed 's/,/ /' | sed s/'^ *//' | \
|
|
||||||
awk {'print "#define _SNG_" $$1 " (1)"'} > core-perf-event.h
|
|
||||||
- @echo CC $<
|
|
||||||
- @$(CC) $(CFLAGS) -c -o $@ $<
|
|
||||||
+ $(CC) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
stress-vecmath.o: stress-vecmath.c
|
|
||||||
- @echo CC $<
|
|
||||||
- @$(CC) $(CFLAGS) -fno-builtin -c -o $@ $<
|
|
||||||
+ $(CC) $(CFLAGS) -fno-builtin -c -o $@ $<
|
|
||||||
|
|
||||||
$(OBJS): stress-ng.h Makefile
|
|
||||||
|
|
||||||
@@ -478,7 +473,7 @@
|
|
||||||
mkdir -p ${DESTDIR}${BINDIR}
|
|
||||||
cp stress-ng ${DESTDIR}${BINDIR}
|
|
||||||
mkdir -p ${DESTDIR}${MANDIR}
|
|
||||||
- cp stress-ng.1.gz ${DESTDIR}${MANDIR}
|
|
||||||
+ cp stress-ng.1 ${DESTDIR}${MANDIR}
|
|
||||||
mkdir -p ${DESTDIR}${JOBDIR}
|
|
||||||
cp -rp example-jobs/*.job ${DESTDIR}${JOBDIR}
|
|
||||||
mkdir -p ${DESTDIR}${BASHDIR}
|
|
Binary file not shown.
@ -0,0 +1,35 @@
|
|||||||
|
https://bugs.gentoo.org/778167
|
||||||
|
|
||||||
|
From f78edbe30816f049e1360cb6e203fabfdf7b98df Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergei Trofimovich <slyfox@gentoo.org>
|
||||||
|
Date: Fri, 6 Nov 2020 08:14:57 +0000
|
||||||
|
Subject: [PATCH] Fix compatibility with upcoming autoconf 2.70
|
||||||
|
|
||||||
|
Mainline autoconf generates no shell code for AC_CONFIG_AUX_DIR().
|
||||||
|
Call it unconditionally to avoid a syntax error.
|
||||||
|
|
||||||
|
[ghudson@mit.edu: rewrote commit message]
|
||||||
|
|
||||||
|
ticket: 8960 (new)
|
||||||
|
tags: pullup
|
||||||
|
target_version: 1.18-next
|
||||||
|
target_version: 1.17-next
|
||||||
|
---
|
||||||
|
src/aclocal.m4 | 6 +-----
|
||||||
|
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||||
|
|
||||||
|
--- src/aclocal.m4
|
||||||
|
+++ src/aclocal.m4
|
||||||
|
@@ -13,11 +13,7 @@ fi
|
||||||
|
ac_topdir=$srcdir/$ac_reltopdir
|
||||||
|
ac_config_fragdir=$ac_reltopdir/config
|
||||||
|
# echo "Looking for $srcdir/$ac_config_fragdir"
|
||||||
|
-if test -d "$srcdir/$ac_config_fragdir"; then
|
||||||
|
- AC_CONFIG_AUX_DIR(K5_TOPDIR/config)
|
||||||
|
-else
|
||||||
|
- AC_MSG_ERROR([can not find config/ directory in $ac_reltopdir])
|
||||||
|
-fi
|
||||||
|
+AC_CONFIG_AUX_DIR(K5_TOPDIR/config)
|
||||||
|
])dnl
|
||||||
|
dnl
|
||||||
|
dnl Version info.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,147 +0,0 @@
|
|||||||
# Copyright 2003-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="7"
|
|
||||||
|
|
||||||
inherit cmake gnome2-utils xdg-utils
|
|
||||||
|
|
||||||
if [[ "${PV}" =~ (^|\.)9999$ ]]; then
|
|
||||||
inherit git-r3
|
|
||||||
|
|
||||||
EGIT_REPO_URI="https://github.com/fcitx/fcitx"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DESCRIPTION="Fcitx (Flexible Context-aware Input Tool with eXtension) input method framework"
|
|
||||||
HOMEPAGE="https://fcitx-im.org/ https://github.com/fcitx/fcitx"
|
|
||||||
if [[ "${PV}" =~ (^|\.)9999$ ]]; then
|
|
||||||
SRC_URI="https://download.fcitx-im.org/data/pinyin.tar.gz -> fcitx-data-pinyin.tar.gz
|
|
||||||
https://download.fcitx-im.org/data/table.tar.gz -> fcitx-data-table.tar.gz
|
|
||||||
https://download.fcitx-im.org/data/py_stroke-20121124.tar.gz -> fcitx-data-py_stroke-20121124.tar.gz
|
|
||||||
https://download.fcitx-im.org/data/py_table-20121124.tar.gz -> fcitx-data-py_table-20121124.tar.gz
|
|
||||||
https://download.fcitx-im.org/data/en_dict-20121020.tar.gz -> fcitx-data-en_dict-20121020.tar.gz"
|
|
||||||
else
|
|
||||||
SRC_URI="https://download.fcitx-im.org/${PN}/${P}_dict.tar.xz"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LICENSE="BSD-1 GPL-2+ LGPL-2+ MIT"
|
|
||||||
SLOT="4"
|
|
||||||
KEYWORDS="amd64 ~arm64 ~hppa ppc ppc64 x86"
|
|
||||||
IUSE="+X +autostart +cairo debug +enchant gtk2 +gtk3 +introspection lua nls opencc +pango static-libs +table test +xkb"
|
|
||||||
REQUIRED_USE="cairo? ( X ) pango? ( cairo )"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
BDEPEND="dev-util/glib-utils
|
|
||||||
kde-frameworks/extra-cmake-modules:5
|
|
||||||
virtual/pkgconfig
|
|
||||||
introspection? ( dev-libs/gobject-introspection )
|
|
||||||
nls? ( sys-devel/gettext )"
|
|
||||||
DEPEND="dev-libs/glib:2
|
|
||||||
sys-apps/dbus
|
|
||||||
sys-apps/util-linux
|
|
||||||
virtual/libiconv
|
|
||||||
virtual/libintl
|
|
||||||
x11-libs/libxkbcommon
|
|
||||||
X? (
|
|
||||||
x11-libs/libX11
|
|
||||||
x11-libs/libXfixes
|
|
||||||
x11-libs/libXinerama
|
|
||||||
x11-libs/libXrender
|
|
||||||
xkb? (
|
|
||||||
x11-libs/libxkbfile
|
|
||||||
x11-misc/xkeyboard-config
|
|
||||||
)
|
|
||||||
)
|
|
||||||
cairo? (
|
|
||||||
x11-libs/cairo[X]
|
|
||||||
x11-libs/libXext
|
|
||||||
pango? ( x11-libs/pango )
|
|
||||||
!pango? ( media-libs/fontconfig )
|
|
||||||
)
|
|
||||||
enchant? ( app-text/enchant:0= )
|
|
||||||
gtk2? ( x11-libs/gtk+:2 )
|
|
||||||
gtk3? ( x11-libs/gtk+:3 )
|
|
||||||
lua? ( dev-lang/lua:0= )
|
|
||||||
nls? ( sys-devel/gettext )
|
|
||||||
opencc? ( app-i18n/opencc:0= )
|
|
||||||
xkb? (
|
|
||||||
app-text/iso-codes
|
|
||||||
dev-libs/libxml2
|
|
||||||
)"
|
|
||||||
RDEPEND="${DEPEND}"
|
|
||||||
|
|
||||||
DOCS=(AUTHORS ChangeLog THANKS)
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
if [[ "${PV}" =~ (^|\.)9999$ ]]; then
|
|
||||||
ln -s "${DISTDIR}/fcitx-data-pinyin.tar.gz" src/im/pinyin/data/pinyin.tar.gz || die
|
|
||||||
ln -s "${DISTDIR}/fcitx-data-table.tar.gz" src/im/table/data/table.tar.gz || die
|
|
||||||
ln -s "${DISTDIR}/fcitx-data-py_stroke-20121124.tar.gz" src/module/pinyin-enhance/data/py_stroke-20121124.tar.gz || die
|
|
||||||
ln -s "${DISTDIR}/fcitx-data-py_table-20121124.tar.gz" src/module/pinyin-enhance/data/py_table-20121124.tar.gz || die
|
|
||||||
ln -s "${DISTDIR}/fcitx-data-en_dict-20121020.tar.gz" src/module/spell/dict/en_dict-20121020.tar.gz || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# https://github.com/fcitx/fcitx/issues/250
|
|
||||||
sed \
|
|
||||||
-e "/find_package(XkbFile REQUIRED)/i\\ if(ENABLE_X11)" \
|
|
||||||
-e "/find_package(XkbFile REQUIRED)/s/^/ /" \
|
|
||||||
-e "/find_package(XkbFile REQUIRED)/a\\ find_package(XKeyboardConfig REQUIRED)\n endif(ENABLE_X11)" \
|
|
||||||
-e "/^find_package(XKeyboardConfig REQUIRED)/,+1d" \
|
|
||||||
-i CMakeLists.txt
|
|
||||||
|
|
||||||
cmake_src_prepare
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local mycmakeargs=(
|
|
||||||
-DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
|
|
||||||
-DSYSCONFDIR="${EPREFIX}/etc"
|
|
||||||
-DENABLE_CAIRO=$(usex cairo ON OFF)
|
|
||||||
-DENABLE_DEBUG=$(usex debug ON OFF)
|
|
||||||
-DENABLE_ENCHANT=$(usex enchant ON OFF)
|
|
||||||
-DENABLE_GETTEXT=$(usex nls ON OFF)
|
|
||||||
-DENABLE_GIR=$(usex introspection ON OFF)
|
|
||||||
-DENABLE_GTK2_IM_MODULE=$(usex gtk2 ON OFF)
|
|
||||||
-DENABLE_GTK3_IM_MODULE=$(usex gtk3 ON OFF)
|
|
||||||
-DENABLE_LIBXML2=$(usex xkb ON OFF)
|
|
||||||
-DENABLE_LUA=$(usex lua ON OFF)
|
|
||||||
-DENABLE_OPENCC=$(usex opencc ON OFF)
|
|
||||||
-DENABLE_PANGO=$(usex pango ON OFF)
|
|
||||||
-DENABLE_QT=OFF
|
|
||||||
-DENABLE_QT_GUI=OFF
|
|
||||||
-DENABLE_QT_IM_MODULE=OFF
|
|
||||||
-DENABLE_SNOOPER=$(if use gtk2 || use gtk3; then echo ON; else echo OFF; fi)
|
|
||||||
-DENABLE_STATIC=$(usex static-libs ON OFF)
|
|
||||||
-DENABLE_TABLE=$(usex table ON OFF)
|
|
||||||
-DENABLE_TEST=$(usex test ON OFF)
|
|
||||||
-DENABLE_X11=$(usex X ON OFF)
|
|
||||||
-DENABLE_XDGAUTOSTART=$(usex autostart ON OFF)
|
|
||||||
)
|
|
||||||
|
|
||||||
cmake_src_configure
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
cmake_src_install
|
|
||||||
rm -r "${ED}/usr/share/doc/${PN}"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
xdg_desktop_database_update
|
|
||||||
xdg_icon_cache_update
|
|
||||||
xdg_mimeinfo_database_update
|
|
||||||
use gtk2 && gnome2_query_immodules_gtk2
|
|
||||||
use gtk3 && gnome2_query_immodules_gtk3
|
|
||||||
|
|
||||||
elog
|
|
||||||
elog "Quick Phrase Editor is provided by:"
|
|
||||||
elog " app-i18n/fcitx-qt5:4"
|
|
||||||
elog
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
xdg_desktop_database_update
|
|
||||||
xdg_icon_cache_update
|
|
||||||
xdg_mimeinfo_database_update
|
|
||||||
use gtk2 && gnome2_query_immodules_gtk2
|
|
||||||
use gtk3 && gnome2_query_immodules_gtk3
|
|
||||||
}
|
|
@ -1,143 +0,0 @@
|
|||||||
# Copyright 2003-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="7"
|
|
||||||
|
|
||||||
inherit cmake gnome2-utils xdg-utils
|
|
||||||
|
|
||||||
if [[ "${PV}" =~ (^|\.)9999$ ]]; then
|
|
||||||
inherit git-r3
|
|
||||||
|
|
||||||
EGIT_REPO_URI="https://github.com/fcitx/fcitx"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DESCRIPTION="Fcitx (Flexible Context-aware Input Tool with eXtension) input method framework"
|
|
||||||
HOMEPAGE="https://fcitx-im.org/ https://github.com/fcitx/fcitx"
|
|
||||||
if [[ "${PV}" =~ (^|\.)9999$ ]]; then
|
|
||||||
SRC_URI="https://download.fcitx-im.org/data/pinyin.tar.gz -> fcitx-data-pinyin.tar.gz
|
|
||||||
https://download.fcitx-im.org/data/table.tar.gz -> fcitx-data-table.tar.gz
|
|
||||||
https://download.fcitx-im.org/data/py_stroke-20121124.tar.gz -> fcitx-data-py_stroke-20121124.tar.gz
|
|
||||||
https://download.fcitx-im.org/data/py_table-20121124.tar.gz -> fcitx-data-py_table-20121124.tar.gz
|
|
||||||
https://download.fcitx-im.org/data/en_dict-20121020.tar.gz -> fcitx-data-en_dict-20121020.tar.gz"
|
|
||||||
else
|
|
||||||
SRC_URI="https://download.fcitx-im.org/${PN}/${P}_dict.tar.xz"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LICENSE="BSD-1 GPL-2+ LGPL-2+ MIT"
|
|
||||||
SLOT="4"
|
|
||||||
KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~x86"
|
|
||||||
IUSE="+X +autostart +cairo debug +enchant gtk2 +gtk3 +introspection lua nls opencc +pango +table test +xkb"
|
|
||||||
REQUIRED_USE="cairo? ( X ) pango? ( cairo )"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
BDEPEND="dev-util/glib-utils
|
|
||||||
kde-frameworks/extra-cmake-modules:5
|
|
||||||
virtual/pkgconfig
|
|
||||||
introspection? ( dev-libs/gobject-introspection )
|
|
||||||
nls? ( sys-devel/gettext )"
|
|
||||||
DEPEND="dev-libs/glib:2
|
|
||||||
sys-apps/dbus
|
|
||||||
sys-apps/util-linux
|
|
||||||
virtual/libiconv
|
|
||||||
virtual/libintl
|
|
||||||
x11-libs/libxkbcommon
|
|
||||||
X? (
|
|
||||||
x11-libs/libX11
|
|
||||||
x11-libs/libXfixes
|
|
||||||
x11-libs/libXinerama
|
|
||||||
x11-libs/libXrender
|
|
||||||
xkb? (
|
|
||||||
dev-libs/libxml2
|
|
||||||
x11-libs/libxkbfile
|
|
||||||
x11-misc/xkeyboard-config
|
|
||||||
)
|
|
||||||
)
|
|
||||||
cairo? (
|
|
||||||
x11-libs/cairo[X]
|
|
||||||
x11-libs/libXext
|
|
||||||
pango? ( x11-libs/pango )
|
|
||||||
!pango? ( media-libs/fontconfig )
|
|
||||||
)
|
|
||||||
enchant? ( app-text/enchant:0= )
|
|
||||||
gtk2? ( x11-libs/gtk+:2 )
|
|
||||||
gtk3? ( x11-libs/gtk+:3 )
|
|
||||||
lua? ( dev-lang/lua:0= )
|
|
||||||
nls? ( sys-devel/gettext )
|
|
||||||
opencc? ( app-i18n/opencc:0= )
|
|
||||||
xkb? (
|
|
||||||
app-text/iso-codes
|
|
||||||
dev-libs/json-c:0=
|
|
||||||
)"
|
|
||||||
RDEPEND="${DEPEND}"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}/${PN}-4.2.9.8-xkb.patch"
|
|
||||||
)
|
|
||||||
|
|
||||||
DOCS=(AUTHORS ChangeLog THANKS)
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
if [[ "${PV}" =~ (^|\.)9999$ ]]; then
|
|
||||||
ln -s "${DISTDIR}/fcitx-data-pinyin.tar.gz" src/im/pinyin/data/pinyin.tar.gz || die
|
|
||||||
ln -s "${DISTDIR}/fcitx-data-table.tar.gz" src/im/table/data/table.tar.gz || die
|
|
||||||
ln -s "${DISTDIR}/fcitx-data-py_stroke-20121124.tar.gz" src/module/pinyin-enhance/data/py_stroke-20121124.tar.gz || die
|
|
||||||
ln -s "${DISTDIR}/fcitx-data-py_table-20121124.tar.gz" src/module/pinyin-enhance/data/py_table-20121124.tar.gz || die
|
|
||||||
ln -s "${DISTDIR}/fcitx-data-en_dict-20121020.tar.gz" src/module/spell/dict/en_dict-20121020.tar.gz || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmake_src_prepare
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local mycmakeargs=(
|
|
||||||
-DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
|
|
||||||
-DSYSCONFDIR="${EPREFIX}/etc"
|
|
||||||
-DENABLE_CAIRO=$(usex cairo ON OFF)
|
|
||||||
-DENABLE_DEBUG=$(usex debug ON OFF)
|
|
||||||
-DENABLE_ENCHANT=$(usex enchant ON OFF)
|
|
||||||
-DENABLE_GETTEXT=$(usex nls ON OFF)
|
|
||||||
-DENABLE_GIR=$(usex introspection ON OFF)
|
|
||||||
-DENABLE_GTK2_IM_MODULE=$(usex gtk2 ON OFF)
|
|
||||||
-DENABLE_GTK3_IM_MODULE=$(usex gtk3 ON OFF)
|
|
||||||
-DENABLE_LUA=$(usex lua ON OFF)
|
|
||||||
-DENABLE_OPENCC=$(usex opencc ON OFF)
|
|
||||||
-DENABLE_PANGO=$(usex pango ON OFF)
|
|
||||||
-DENABLE_QT=OFF
|
|
||||||
-DENABLE_QT_GUI=OFF
|
|
||||||
-DENABLE_QT_IM_MODULE=OFF
|
|
||||||
-DENABLE_SNOOPER=$(if use gtk2 || use gtk3; then echo ON; else echo OFF; fi)
|
|
||||||
-DENABLE_TABLE=$(usex table ON OFF)
|
|
||||||
-DENABLE_TEST=$(usex test ON OFF)
|
|
||||||
-DENABLE_X11=$(usex X ON OFF)
|
|
||||||
-DENABLE_XDGAUTOSTART=$(usex autostart ON OFF)
|
|
||||||
-DENABLE_XKB=$(usex xkb ON OFF)
|
|
||||||
)
|
|
||||||
|
|
||||||
cmake_src_configure
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
cmake_src_install
|
|
||||||
rm -r "${ED}/usr/share/doc/${PN}"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
xdg_desktop_database_update
|
|
||||||
xdg_icon_cache_update
|
|
||||||
xdg_mimeinfo_database_update
|
|
||||||
use gtk2 && gnome2_query_immodules_gtk2
|
|
||||||
use gtk3 && gnome2_query_immodules_gtk3
|
|
||||||
|
|
||||||
elog
|
|
||||||
elog "Quick Phrase Editor is provided by:"
|
|
||||||
elog " app-i18n/fcitx-qt5:4"
|
|
||||||
elog
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
xdg_desktop_database_update
|
|
||||||
xdg_icon_cache_update
|
|
||||||
xdg_mimeinfo_database_update
|
|
||||||
use gtk2 && gnome2_query_immodules_gtk2
|
|
||||||
use gtk3 && gnome2_query_immodules_gtk3
|
|
||||||
}
|
|
@ -1,2 +1 @@
|
|||||||
DIST ibus-libpinyin-1.11.1.tar.gz 1728202 BLAKE2B 6e2273c4ff1be76bb8b0e65b915e039c0a181981d20ed94662184e161e8639ad3d548de981d7bbae950ab8b5019bedaed9593e03282e2f9d207f831929d422bc SHA512 48691952a10f4ab545d8e233dc3cd75fc54270c03a687820048152636df26d233ee0fba89e4ec2ccd5a6e410b41e556872e3dd2468d59d44b3440e904b93528b
|
|
||||||
DIST ibus-libpinyin-1.11.92.tar.gz 1730065 BLAKE2B 376bec6fa7616364c8ed4dc5b269edabda892ba4759ff03e93b4099c99440925126800ea3bf11eef91ea62c558fa7dbf05f3d68be5e25e701aaaeb37618b90a8 SHA512 b875b2fed6875806971b91e2abc62cdab1f70baef78840915f89466a7bcf3d1dfc70438ba85e7580bba92dec0ade50a2b05955fe6cd148bffd3888fa69f1c851
|
DIST ibus-libpinyin-1.11.92.tar.gz 1730065 BLAKE2B 376bec6fa7616364c8ed4dc5b269edabda892ba4759ff03e93b4099c99440925126800ea3bf11eef91ea62c558fa7dbf05f3d68be5e25e701aaaeb37618b90a8 SHA512 b875b2fed6875806971b91e2abc62cdab1f70baef78840915f89466a7bcf3d1dfc70438ba85e7580bba92dec0ade50a2b05955fe6cd148bffd3888fa69f1c851
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
# Copyright 2015-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="7"
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_7 )
|
|
||||||
|
|
||||||
inherit autotools gnome2-utils python-single-r1
|
|
||||||
|
|
||||||
DESCRIPTION="Intelligent Pinyin and Bopomofo input methods based on LibPinyin for IBus"
|
|
||||||
HOMEPAGE="https://github.com/libpinyin/ibus-libpinyin https://sourceforge.net/projects/libpinyin/"
|
|
||||||
SRC_URI="https://github.com/libpinyin/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
|
|
||||||
"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64 x86"
|
|
||||||
IUSE="boost lua opencc"
|
|
||||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
|
||||||
|
|
||||||
BDEPEND="dev-db/sqlite:3
|
|
||||||
virtual/pkgconfig"
|
|
||||||
|
|
||||||
DEPEND="${PYTHON_DEPS}
|
|
||||||
>=app-i18n/libpinyin-2.1.0:=
|
|
||||||
dev-db/sqlite:3
|
|
||||||
dev-libs/glib:2
|
|
||||||
virtual/libintl
|
|
||||||
$(python_gen_cond_dep '
|
|
||||||
app-i18n/ibus[python(+),${PYTHON_MULTI_USEDEP}]
|
|
||||||
dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
|
|
||||||
')
|
|
||||||
boost? ( dev-libs/boost:= )
|
|
||||||
lua? ( dev-lang/lua:0 )
|
|
||||||
opencc? ( app-i18n/opencc:= )"
|
|
||||||
|
|
||||||
RDEPEND="${DEPEND}"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
eautoreconf
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf \
|
|
||||||
--enable-english-input-mode \
|
|
||||||
$(use_enable boost) \
|
|
||||||
$(use_enable lua lua-extension) \
|
|
||||||
$(use_enable opencc)
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
gnome2_schemas_update
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
gnome2_schemas_update
|
|
||||||
}
|
|
Binary file not shown.
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 0441d4a..592ceb9 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -1,8 +1,3 @@
|
||||||
|
-m4_define([jq_version],
|
||||||
|
- m4_esyscmd_s([(git rev-parse --verify -q jq-1.0 > /dev/null &&
|
||||||
|
- (git describe --tags --dirty --match 'jq-*'|sed 's/^jq-//')) ||
|
||||||
|
- echo `git rev-parse --abbrev-ref HEAD`-`git describe --always --dirty`])))
|
||||||
|
-
|
||||||
|
AC_INIT([jq], [jq_version], [https://github.com/stedolan/jq/issues],
|
||||||
|
[jq], [https://stedolan.github.io/jq])
|
||||||
|
|
Binary file not shown.
Binary file not shown.
@ -1,111 +0,0 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
inherit qmake-utils toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="Converts source code to formatted text (HTML, LaTeX, etc.) with syntax highlight"
|
|
||||||
HOMEPAGE="http://www.andre-simon.de/"
|
|
||||||
SRC_URI="http://www.andre-simon.de/zip/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-3"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
|
||||||
IUSE="examples qt5"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
|| ( dev-lang/lua:0 dev-lang/lua:5.3 dev-lang/lua:5.2 dev-lang/lua:5.1 )
|
|
||||||
qt5? (
|
|
||||||
dev-qt/qtcore:5
|
|
||||||
dev-qt/qtgui:5
|
|
||||||
dev-qt/qtwidgets:5
|
|
||||||
)
|
|
||||||
"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
dev-libs/boost
|
|
||||||
"
|
|
||||||
BDEPEND="
|
|
||||||
virtual/pkgconfig
|
|
||||||
qt5? ( dev-qt/linguist-tools:5 )
|
|
||||||
"
|
|
||||||
|
|
||||||
myhlopts=(
|
|
||||||
"CXX=$(tc-getCXX)"
|
|
||||||
"AR=$(tc-getAR)"
|
|
||||||
"LDFLAGS=${LDFLAGS}"
|
|
||||||
"CFLAGS=${CXXFLAGS} -DNDEBUG -std=c++11"
|
|
||||||
"DESTDIR=${D}"
|
|
||||||
"PREFIX=${EPREFIX}/usr"
|
|
||||||
"HL_CONFIG_DIR=${EPREFIX}/etc/highlight/"
|
|
||||||
"HL_DATA_DIR=${EPREFIX}/usr/share/highlight/"
|
|
||||||
"doc_dir=${EPREFIX}/usr/share/doc/${PF}/"
|
|
||||||
"conf_dir=${EPREFIX}/etc/highlight/"
|
|
||||||
)
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# disable man page compression
|
|
||||||
sed -e "/GZIP/d" -i makefile || die
|
|
||||||
|
|
||||||
sed -e "/LSB_DOC_DIR/s:doc/${PN}:doc/${PF}:" \
|
|
||||||
-i src/core/datadir.cpp || die
|
|
||||||
|
|
||||||
# Use the correct pkgconfig name for Lua
|
|
||||||
# Upstream codebase supports up to and including Lua 5.3!
|
|
||||||
if has_version 'dev-lang/lua:5.3'; then
|
|
||||||
LUAPKGCONFIG=lua5.3
|
|
||||||
elif has_version 'dev-lang/lua:5.2'; then
|
|
||||||
LUAPKGCONFIG=lua5.2
|
|
||||||
elif has_version 'dev-lang/lua:5.1'; then
|
|
||||||
LUAPKGCONFIG=lua5.1
|
|
||||||
elif has_version 'dev-lang/lua:0'; then
|
|
||||||
LUAPKGCONFIG=lua
|
|
||||||
else
|
|
||||||
die "Could not detect Lua version"
|
|
||||||
fi
|
|
||||||
einfo "Using pkg-config ${LUAPKGCONFIG}"
|
|
||||||
sed -r -i \
|
|
||||||
-e "/^LUA_.*pkg-config/s,\<lua\>,${LUAPKGCONFIG},g" \
|
|
||||||
"${S}"/extras/tcl/makefile \
|
|
||||||
"${S}"/extras/swig/makefile \
|
|
||||||
"${S}"/makefile \
|
|
||||||
"${S}"/src/makefile \
|
|
||||||
|| die "Failed to set Lua version"
|
|
||||||
|
|
||||||
# We set it via eqmake5, otherwise it forces clang...
|
|
||||||
sed -e "s/QMAKE_CC/#QMAKE_CC/g" \
|
|
||||||
-e "s/QMAKE_CXX /#QMAKE_CXX /g" \
|
|
||||||
-i src/gui-qt/highlight.pro || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
if use qt5 ; then
|
|
||||||
pushd src/gui-qt > /dev/null || die
|
|
||||||
eqmake5 \
|
|
||||||
'DEFINES+=DATA_DIR=\\\"'"${EPREFIX}"'/usr/share/${PN}/\\\" CONFIG_DIR=\\\"'"${EPREFIX}"'/etc/${PN}/\\\" DOC_DIR=\\\"'"${EPREFIX}"'/usr/share/doc/${PF}/\\\"'
|
|
||||||
popd > /dev/null || die
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake -f makefile "${myhlopts[@]}"
|
|
||||||
if use qt5 ; then
|
|
||||||
pushd src/gui-qt > /dev/null || die
|
|
||||||
emake
|
|
||||||
popd > /dev/null || die
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake -f makefile "${myhlopts[@]}" install
|
|
||||||
if use qt5; then
|
|
||||||
emake -f makefile "${myhlopts[@]}" install-gui
|
|
||||||
docompress -x /usr/share/doc/${PF}/{ChangeLog,COPYING,README,README_PLUGINS}
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! use examples ; then
|
|
||||||
rm -r "${ED}"/usr/share/doc/${PF}/extras || die
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,146 +0,0 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
inherit cmake flag-o-matic multilib toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="PoDoFo is a C++ library to work with the PDF file format"
|
|
||||||
HOMEPAGE="https://sourceforge.net/projects/podofo/"
|
|
||||||
SRC_URI="https://dev.gentoo.org/~zmedico/dist/${P}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="GPL-2 LGPL-2.1"
|
|
||||||
SLOT="0/${PV%_*}"
|
|
||||||
KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 ~sparc x86"
|
|
||||||
IUSE="+boost idn libressl debug test +tools"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
REQUIRED_USE="test? ( tools )"
|
|
||||||
|
|
||||||
RDEPEND="dev-lang/lua:0=
|
|
||||||
idn? ( net-dns/libidn:= )
|
|
||||||
!libressl? ( dev-libs/openssl:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
media-libs/fontconfig:=
|
|
||||||
media-libs/freetype:2=
|
|
||||||
virtual/jpeg:0=
|
|
||||||
media-libs/libpng:0=
|
|
||||||
media-libs/tiff:0=
|
|
||||||
sys-libs/zlib:="
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
virtual/pkgconfig
|
|
||||||
boost? ( dev-util/boost-build )
|
|
||||||
test? ( dev-util/cppunit )"
|
|
||||||
|
|
||||||
DOCS="AUTHORS ChangeLog TODO"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
cmake_src_prepare
|
|
||||||
local x sed_args
|
|
||||||
|
|
||||||
if use libressl; then
|
|
||||||
sed -e 's:^#ifdef PODOFO_HAVE_OPENSSL_1_1$:#ifndef PODOFO_HAVE_OPENSSL_1_1:' \
|
|
||||||
-i tools/podofosign/podofosign.cpp || die #663602
|
|
||||||
fi
|
|
||||||
|
|
||||||
# bug 620934 - Disable linking with cppunit when possible, since it
|
|
||||||
# triggers errors with some older compilers.
|
|
||||||
use test || sed -e 's:^FIND_PACKAGE(CppUnit):#\0:' -i CMakeLists.txt || die
|
|
||||||
|
|
||||||
# bug 556962
|
|
||||||
sed -i -e 's|Decrypt( pEncryptedBuffer, nOutputLen, pDecryptedBuffer, m_lLen );|Decrypt( pEncryptedBuffer, (pdf_long)nOutputLen, pDecryptedBuffer, (pdf_long\&)m_lLen );|' \
|
|
||||||
test/unit/EncryptTest.cpp || die
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e "s:LIBDIRNAME \"lib\":LIBDIRNAME \"$(get_libdir)\":" \
|
|
||||||
-e "s:LIBIDN_FOUND:HAVE_LIBIDN:g" \
|
|
||||||
CMakeLists.txt || die
|
|
||||||
|
|
||||||
# Use pkg-config to find headers for bug #459404.
|
|
||||||
sed_args=
|
|
||||||
for x in $($(tc-getPKG_CONFIG) --cflags freetype2) ; do
|
|
||||||
[[ ${x} == -I* ]] || continue
|
|
||||||
x=${x#-I}
|
|
||||||
if [[ -f ${x}/ft2build.h ]] ; then
|
|
||||||
sed_args+=" -e s:/usr/include/\\r\$:${x}:"
|
|
||||||
elif [[ -f ${x}/freetype/config/ftheader.h ]] ; then
|
|
||||||
sed_args+=" -e s:/usr/include/freetype2\\r\$:${x}:"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
[[ -n ${sed_args} ]] && \
|
|
||||||
{ sed -i ${sed_args} cmake/modules/FindFREETYPE.cmake || die; }
|
|
||||||
|
|
||||||
# Bug #439784: Add missing unistd include for close() and unlink().
|
|
||||||
sed -i 's:^#include <stdio.h>$:#include <unistd.h>\n\0:' -i \
|
|
||||||
test/unit/TestUtils.cpp || die
|
|
||||||
|
|
||||||
# TODO: fix these test cases
|
|
||||||
# ColorTest.cpp:62:Assertion
|
|
||||||
# Test name: ColorTest::testDefaultConstructor
|
|
||||||
# expected exception not thrown
|
|
||||||
# - Expected: PdfError
|
|
||||||
sed -e 's:CPPUNIT_TEST( testDefaultConstructor ://\0:' \
|
|
||||||
-e 's:CPPUNIT_TEST( testGreyConstructor ://\0:' \
|
|
||||||
-e 's:CPPUNIT_TEST( testRGBConstructor ://\0:' \
|
|
||||||
-e 's:CPPUNIT_TEST( testCMYKConstructor ://\0:' \
|
|
||||||
-e 's:CPPUNIT_TEST( testColorSeparationAllConstructor ://\0:' \
|
|
||||||
-e 's:CPPUNIT_TEST( testColorSeparationNoneConstructor ://\0:' \
|
|
||||||
-e 's:CPPUNIT_TEST( testColorSeparationConstructor ://\0:' \
|
|
||||||
-e 's:CPPUNIT_TEST( testColorCieLabConstructor ://\0:' \
|
|
||||||
-i test/unit/ColorTest.h || die
|
|
||||||
|
|
||||||
# ColorTest.cpp:42:Assertion
|
|
||||||
# Test name: ColorTest::testHexNames
|
|
||||||
# assertion failed
|
|
||||||
# - Expression: static_cast<int>(rgb.GetGreen() * 255.0) == 0x0A
|
|
||||||
sed -e 's:CPPUNIT_TEST( testHexNames ://\0:' \
|
|
||||||
-i test/unit/ColorTest.h || die
|
|
||||||
|
|
||||||
# Bug #352125: test failure, depending on installed fonts
|
|
||||||
# ##Failure Location unknown## : Error
|
|
||||||
# Test name: FontTest::testFonts
|
|
||||||
# uncaught exception of type PoDoFo::PdfError
|
|
||||||
# - ePdfError_UnsupportedFontFormat
|
|
||||||
sed -e 's:CPPUNIT_TEST( testFonts ://\0:' \
|
|
||||||
-i test/unit/FontTest.h || die
|
|
||||||
|
|
||||||
# Test name: EncodingTest::testDifferencesEncoding
|
|
||||||
# equality assertion failed
|
|
||||||
# - Expected: 1
|
|
||||||
# - Actual : 0
|
|
||||||
sed -e 's:CPPUNIT_TEST( testDifferencesEncoding ://\0:' \
|
|
||||||
-i test/unit/EncodingTest.h || die
|
|
||||||
|
|
||||||
# Bug #407015: fix to compile with Lua 5.2
|
|
||||||
if has_version '>=dev-lang/lua-5.2' ; then
|
|
||||||
sed -e 's: lua_open(: luaL_newstate(:' \
|
|
||||||
-e 's: luaL_getn(: lua_rawlen(:' -i \
|
|
||||||
tools/podofocolor/luaconverter.cpp \
|
|
||||||
tools/podofoimpose/planreader_lua.cpp || die
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
|
|
||||||
# Bug #381359: undefined reference to `PoDoFo::PdfVariant::DelayedLoadImpl()'
|
|
||||||
filter-flags -fvisibility-inlines-hidden
|
|
||||||
|
|
||||||
mycmakeargs+=(
|
|
||||||
"-DPODOFO_BUILD_SHARED=1"
|
|
||||||
"-DPODOFO_HAVE_JPEG_LIB=1"
|
|
||||||
"-DPODOFO_HAVE_PNG_LIB=1"
|
|
||||||
"-DPODOFO_HAVE_TIFF_LIB=1"
|
|
||||||
"-DWANT_FONTCONFIG=1"
|
|
||||||
"-DUSE_STLPORT=0"
|
|
||||||
-DWANT_BOOST=$(usex boost ON OFF)
|
|
||||||
-DHAVE_LIBIDN=$(usex idn ON OFF)
|
|
||||||
-DPODOFO_HAVE_CPPUNIT=$(usex test ON OFF)
|
|
||||||
-DPODOFO_BUILD_LIB_ONLY=$(usex tools OFF ON)
|
|
||||||
)
|
|
||||||
|
|
||||||
cmake_src_configure
|
|
||||||
mkdir -p "${S}/test/TokenizerTest/objects" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
cd "${BUILD_DIR}"/test/unit || die
|
|
||||||
./podofo-test --selftest || die "self test failed"
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
@ -1,123 +0,0 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
# TODO: multiple ABI?
|
|
||||||
PYTHON_COMPAT=( python3_8 )
|
|
||||||
inherit flag-o-matic cmake python-single-r1
|
|
||||||
|
|
||||||
DESCRIPTION="Crazy Eddie's GUI System"
|
|
||||||
HOMEPAGE="http://www.cegui.org.uk/"
|
|
||||||
SRC_URI="mirror://sourceforge/crayzedsgui/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86"
|
|
||||||
IUSE="bidi debug devil doc freeimage expat irrlicht lua ogre opengl pcre python static-libs tinyxml truetype xerces-c +xml zip"
|
|
||||||
REQUIRED_USE="|| ( expat tinyxml xerces-c xml )
|
|
||||||
python? ( ${PYTHON_REQUIRED_USE} )" # bug 362223
|
|
||||||
|
|
||||||
# gles broken
|
|
||||||
# gles? ( media-libs/mesa[gles1] )
|
|
||||||
# directfb broken
|
|
||||||
# directfb? ( dev-libs/DirectFB )
|
|
||||||
RDEPEND="
|
|
||||||
dev-libs/boost:=
|
|
||||||
virtual/libiconv
|
|
||||||
bidi? ( dev-libs/fribidi )
|
|
||||||
devil? ( media-libs/devil )
|
|
||||||
expat? ( dev-libs/expat )
|
|
||||||
freeimage? ( media-libs/freeimage )
|
|
||||||
irrlicht? ( dev-games/irrlicht )
|
|
||||||
lua? (
|
|
||||||
dev-lang/lua:0
|
|
||||||
dev-lua/toluapp
|
|
||||||
)
|
|
||||||
ogre? ( >=dev-games/ogre-1.7:= )
|
|
||||||
opengl? (
|
|
||||||
virtual/opengl
|
|
||||||
virtual/glu
|
|
||||||
media-libs/glew:=
|
|
||||||
)
|
|
||||||
pcre? ( dev-libs/libpcre )
|
|
||||||
python? (
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
$(python_gen_cond_dep '
|
|
||||||
dev-libs/boost:=[python,${PYTHON_MULTI_USEDEP}]
|
|
||||||
')
|
|
||||||
)
|
|
||||||
tinyxml? ( dev-libs/tinyxml )
|
|
||||||
truetype? ( media-libs/freetype:2 )
|
|
||||||
xerces-c? ( dev-libs/xerces-c )
|
|
||||||
xml? ( dev-libs/libxml2:2 )
|
|
||||||
zip? ( sys-libs/zlib[minizip] )"
|
|
||||||
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
opengl? ( media-libs/glm )"
|
|
||||||
|
|
||||||
BDEPEND="
|
|
||||||
virtual/pkgconfig
|
|
||||||
doc? ( app-doc/doxygen )
|
|
||||||
"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${P}-icu-59.patch
|
|
||||||
"${FILESDIR}"/${P}-python3.patch
|
|
||||||
"${FILESDIR}"/${P}-musl.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
use python && python-single-r1_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
# http://www.cegui.org.uk/mantis/view.php?id=991
|
|
||||||
append-ldflags $(no-as-needed)
|
|
||||||
|
|
||||||
local mycmakeargs=(
|
|
||||||
-DCEGUI_BUILD_IMAGECODEC_CORONA=OFF
|
|
||||||
-DCEGUI_BUILD_IMAGECODEC_DEVIL=$(usex devil)
|
|
||||||
-DCEGUI_BUILD_IMAGECODEC_FREEIMAGE=$(usex freeimage)
|
|
||||||
-DCEGUI_BUILD_IMAGECODEC_PVR=OFF
|
|
||||||
-DCEGUI_BUILD_IMAGECODEC_SILLY=OFF
|
|
||||||
-DCEGUI_BUILD_IMAGECODEC_STB=ON
|
|
||||||
-DCEGUI_BUILD_IMAGECODEC_TGA=ON
|
|
||||||
-DCEGUI_BUILD_LUA_GENERATOR=$(usex lua)
|
|
||||||
-DCEGUI_BUILD_LUA_MODULE=$(usex lua)
|
|
||||||
-DCEGUI_BUILD_PYTHON_MODULES=$(usex python)
|
|
||||||
-DCEGUI_BUILD_RENDERER_DIRECTFB=OFF
|
|
||||||
-DCEGUI_BUILD_RENDERER_IRRLICHT=$(usex irrlicht)
|
|
||||||
-DCEGUI_BUILD_RENDERER_NULL=ON
|
|
||||||
-DCEGUI_BUILD_RENDERER_OGRE=$(usex ogre)
|
|
||||||
-DCEGUI_BUILD_RENDERER_OPENGL=$(usex opengl)
|
|
||||||
-DCEGUI_BUILD_RENDERER_OPENGL3=$(usex opengl)
|
|
||||||
-DCEGUI_BUILD_RENDERER_OPENGLES=OFF
|
|
||||||
-DCEGUI_BUILD_STATIC_CONFIGURATION=$(usex static-libs)
|
|
||||||
-DCEGUI_BUILD_TESTS=OFF
|
|
||||||
-DCEGUI_BUILD_XMLPARSER_EXPAT=$(usex expat)
|
|
||||||
-DCEGUI_BUILD_XMLPARSER_LIBXML2=$(usex xml)
|
|
||||||
-DCEGUI_BUILD_XMLPARSER_RAPIDXML=OFF
|
|
||||||
-DCEGUI_BUILD_XMLPARSER_TINYXML=$(usex tinyxml)
|
|
||||||
-DCEGUI_BUILD_XMLPARSER_XERCES=$(usex xerces-c)
|
|
||||||
-DCEGUI_HAS_FREETYPE=$(usex truetype)
|
|
||||||
-DCEGUI_HAS_MINIZIP_RESOURCE_PROVIDER=$(usex zip)
|
|
||||||
-DCEGUI_HAS_PCRE_REGEX=$(usex pcre)
|
|
||||||
-DCEGUI_SAMPLES_ENABLED=OFF
|
|
||||||
-DCEGUI_USE_FRIBIDI=$(usex bidi)
|
|
||||||
-DCEGUI_USE_MINIBIDI=OFF
|
|
||||||
)
|
|
||||||
|
|
||||||
cmake_src_configure
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
cmake_src_compile all $(usex doc html "")
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
cmake_src_install
|
|
||||||
docinto html
|
|
||||||
use doc && dodoc -r "${BUILD_DIR}"/doc/doxygen/html/*
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,4 @@
|
|||||||
DIST php-7.3.27.tar.xz 12137924 BLAKE2B f4648fdc2b8903ce1b68221eeb49e7764c5446a3d0d0d93e9cd2d8b4cb08e57229261f6fac4ebf35127e94afd5f157ec8f27659ce463e281784c755a3759481e SHA512 a5c186663d656b473f6165b433077057972b1454013ca0f99831be61bd7b7f1c841b8dae69951fa371f678ea3f0e5410518427ee08cb20611bfc00f263d4d47a
|
DIST php-7.3.27.tar.xz 12137924 BLAKE2B f4648fdc2b8903ce1b68221eeb49e7764c5446a3d0d0d93e9cd2d8b4cb08e57229261f6fac4ebf35127e94afd5f157ec8f27659ce463e281784c755a3759481e SHA512 a5c186663d656b473f6165b433077057972b1454013ca0f99831be61bd7b7f1c841b8dae69951fa371f678ea3f0e5410518427ee08cb20611bfc00f263d4d47a
|
||||||
DIST php-7.4.15.tar.xz 10332360 BLAKE2B 3217378a2fa9e3cd030f585696ac48c50bf4f2509401276783ceb3c757155fb4a06dde8fbb93588e96b16f1f8bbcb32337f58a31c2c0c2009d3659136453c4e1 SHA512 51a815852c08518d6706fc719e3bafd214889580cc5ca0e5049ae7e8f6173e83b9486bc9a69afd1ea4ab1778bb2879bd917595cd04cbcc50b182a10230f08175
|
DIST php-7.4.15.tar.xz 10332360 BLAKE2B 3217378a2fa9e3cd030f585696ac48c50bf4f2509401276783ceb3c757155fb4a06dde8fbb93588e96b16f1f8bbcb32337f58a31c2c0c2009d3659136453c4e1 SHA512 51a815852c08518d6706fc719e3bafd214889580cc5ca0e5049ae7e8f6173e83b9486bc9a69afd1ea4ab1778bb2879bd917595cd04cbcc50b182a10230f08175
|
||||||
DIST php-7.4.16.tar.xz 10334672 BLAKE2B 685717509115e9607fb8ff4ae439bd3b70e5c1f2a11ab83f4944be74cb1502868b9e3aceb6898288ae6e5cdd50c8dba294c03618eaa7accd10c0b425069ef0cb SHA512 a7845fe0a7c334829bfa9518d3f2947036e1b03c8f4346622f9ab37563ff3af03f6559878b83aa0e6ad69e9919b6478345a0cc6ec59161ef36c64a5073e83f84
|
DIST php-7.4.16.tar.xz 10334672 BLAKE2B 685717509115e9607fb8ff4ae439bd3b70e5c1f2a11ab83f4944be74cb1502868b9e3aceb6898288ae6e5cdd50c8dba294c03618eaa7accd10c0b425069ef0cb SHA512 a7845fe0a7c334829bfa9518d3f2947036e1b03c8f4346622f9ab37563ff3af03f6559878b83aa0e6ad69e9919b6478345a0cc6ec59161ef36c64a5073e83f84
|
||||||
DIST php-8.0.2.tar.xz 10650500 BLAKE2B cd087768e007e042f172d59b4c9f323b9ce98207c1a4d740a75f569e16eaaf4f1ac18ccc3fdaedde38c142435498a7fdb503a53e1c119d1b046c59ee403ef606 SHA512 a61056f07e55360fa0219a8fbe73bf559eef64bb854f968cf3d139c9375c399969dea6383a0da276539fbb70d6eaa93d26983f1696cc341aca7ca0fff25c1f08
|
|
||||||
DIST php-8.0.3.tar.xz 10755796 BLAKE2B 5dd6afe985b4f5e33f456f05edda0207d8dfffbdc35d0b2290e1bd30a93bcfd94d6ef23e7d2c8d77b774a7ff95f49832687c75593d7ab38704b60ba3d9331598 SHA512 9b3631fea5280ed11c14a3ef1badb3da5b8ab19f29faa6b828ab033008ebebc487013d74d401d10b9cf21f354cd81100ba83562f3f080e23220ad38c02fb5a0d
|
DIST php-8.0.3.tar.xz 10755796 BLAKE2B 5dd6afe985b4f5e33f456f05edda0207d8dfffbdc35d0b2290e1bd30a93bcfd94d6ef23e7d2c8d77b774a7ff95f49832687c75593d7ab38704b60ba3d9331598 SHA512 9b3631fea5280ed11c14a3ef1badb3da5b8ab19f29faa6b828ab033008ebebc487013d74d401d10b9cf21f354cd81100ba83562f3f080e23220ad38c02fb5a0d
|
||||||
|
@ -0,0 +1,56 @@
|
|||||||
|
From c288b5294bb0e13ad2904a3ec79265f727baaea3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nikita Popov <nikita.ppv@gmail.com>
|
||||||
|
Date: Mon, 14 Dec 2020 10:36:36 +0100
|
||||||
|
Subject: [PATCH] Fix compile warnings in PDO Firebird
|
||||||
|
|
||||||
|
---
|
||||||
|
ext/pdo_firebird/firebird_driver.c | 9 +++++----
|
||||||
|
ext/pdo_firebird/php_pdo_firebird_int.h | 3 +--
|
||||||
|
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c
|
||||||
|
index c299907f0fea1..390871cc200c8 100644
|
||||||
|
--- a/ext/pdo_firebird/firebird_driver.c
|
||||||
|
+++ b/ext/pdo_firebird/firebird_driver.c
|
||||||
|
@@ -171,10 +171,11 @@ static const char classes_array[] = {
|
||||||
|
/* 127 */ 0
|
||||||
|
};
|
||||||
|
|
||||||
|
-inline char classes(char idx)
|
||||||
|
+static inline char classes(char idx)
|
||||||
|
{
|
||||||
|
- if (idx > 127) return 0;
|
||||||
|
- return classes_array[idx];
|
||||||
|
+ unsigned char uidx = (unsigned char) idx;
|
||||||
|
+ if (uidx > 127) return 0;
|
||||||
|
+ return classes_array[uidx];
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
@@ -1085,7 +1086,7 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /*
|
||||||
|
char errmsg[512];
|
||||||
|
const ISC_STATUS *s = H->isc_status;
|
||||||
|
fb_interpret(errmsg, sizeof(errmsg),&s);
|
||||||
|
- zend_throw_exception_ex(php_pdo_get_exception(), H->isc_status[1], "SQLSTATE[%s] [%d] %s",
|
||||||
|
+ zend_throw_exception_ex(php_pdo_get_exception(), H->isc_status[1], "SQLSTATE[%s] [%ld] %s",
|
||||||
|
"HY000", H->isc_status[1], errmsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h
|
||||||
|
index 094767fa355d3..70a895b4b9f83 100644
|
||||||
|
--- a/ext/pdo_firebird/php_pdo_firebird_int.h
|
||||||
|
+++ b/ext/pdo_firebird/php_pdo_firebird_int.h
|
||||||
|
@@ -34,12 +34,11 @@
|
||||||
|
#define SHORT_MAX (1 << (8*sizeof(short)-1))
|
||||||
|
|
||||||
|
#if SIZEOF_ZEND_LONG == 8 && !defined(PHP_WIN32)
|
||||||
|
-# define LL_MASK "l"
|
||||||
|
# define LL_LIT(lit) lit ## L
|
||||||
|
#else
|
||||||
|
-# define LL_MASK "ll"
|
||||||
|
# define LL_LIT(lit) lit ## LL
|
||||||
|
#endif
|
||||||
|
+#define LL_MASK "ll"
|
||||||
|
|
||||||
|
/* Firebird API has a couple of missing const decls in its API */
|
||||||
|
#define const_cast(s) ((char*)(s))
|
@ -1,753 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="7"
|
|
||||||
|
|
||||||
WANT_AUTOMAKE="none"
|
|
||||||
|
|
||||||
inherit flag-o-matic systemd autotools
|
|
||||||
|
|
||||||
MY_PV=${PV/_rc/RC}
|
|
||||||
DESCRIPTION="The PHP language runtime engine"
|
|
||||||
HOMEPAGE="https://www.php.net/"
|
|
||||||
SRC_URI="https://www.php.net/distributions/${P}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="PHP-3.01
|
|
||||||
BSD
|
|
||||||
Zend-2.0
|
|
||||||
bcmath? ( LGPL-2.1+ )
|
|
||||||
fpm? ( BSD-2 )
|
|
||||||
gd? ( gd )
|
|
||||||
unicode? ( BSD-2 LGPL-2.1 )"
|
|
||||||
|
|
||||||
SLOT="$(ver_cut 1-2)"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
|
||||||
|
|
||||||
# We can build the following SAPIs in the given order
|
|
||||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
|
||||||
|
|
||||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
|
||||||
IUSE="${IUSE}
|
|
||||||
${SAPIS/cli/+cli}
|
|
||||||
threads"
|
|
||||||
|
|
||||||
IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
|
|
||||||
coverage +ctype curl debug
|
|
||||||
enchant exif ffi +fileinfo +filter firebird
|
|
||||||
+flatfile ftp gd gdbm gmp +iconv imap inifile
|
|
||||||
intl iodbc ipv6 +jit +json kerberos ldap ldap-sasl libedit libressl lmdb
|
|
||||||
mhash mssql mysql mysqli nls
|
|
||||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
|
||||||
readline selinux +session session-mm sharedmem
|
|
||||||
+simplexml snmp soap sockets sodium spell sqlite ssl
|
|
||||||
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode webp
|
|
||||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
|
||||||
|
|
||||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
|
||||||
# The Oracle instant client provides its own incompatible ldap library.
|
|
||||||
REQUIRED_USE="
|
|
||||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
|
||||||
cli? ( ^^ ( readline libedit ) )
|
|
||||||
!cli? ( ?? ( readline libedit ) )
|
|
||||||
truetype? ( gd zlib )
|
|
||||||
webp? ( gd zlib )
|
|
||||||
cjk? ( gd zlib )
|
|
||||||
exif? ( gd zlib )
|
|
||||||
xpm? ( gd zlib )
|
|
||||||
gd? ( zlib )
|
|
||||||
simplexml? ( xml )
|
|
||||||
soap? ( xml )
|
|
||||||
xmlrpc? ( xml iconv )
|
|
||||||
xmlreader? ( xml )
|
|
||||||
xmlwriter? ( xml )
|
|
||||||
xslt? ( xml )
|
|
||||||
ldap-sasl? ( ldap )
|
|
||||||
oci8-instant-client? ( !ldap )
|
|
||||||
qdbm? ( !gdbm )
|
|
||||||
session-mm? ( session !threads )
|
|
||||||
mysql? ( || ( mysqli pdo ) )
|
|
||||||
firebird? ( pdo )
|
|
||||||
mssql? ( pdo )
|
|
||||||
"
|
|
||||||
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
# The supported (that is, autodetected) versions of BDB are listed in
|
|
||||||
# the ./configure script. Other versions *work*, but we need to stick to
|
|
||||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
|
||||||
COMMON_DEPEND="
|
|
||||||
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
|
||||||
>=dev-libs/libpcre2-10.30[jit?,unicode]
|
|
||||||
fpm? ( acl? ( sys-apps/acl ) )
|
|
||||||
apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
|
|
||||||
argon2? ( app-crypt/argon2:= )
|
|
||||||
berkdb? ( || ( sys-libs/db:5.3
|
|
||||||
sys-libs/db:5.1
|
|
||||||
sys-libs/db:4.8
|
|
||||||
sys-libs/db:4.7
|
|
||||||
sys-libs/db:4.6
|
|
||||||
sys-libs/db:4.5 ) )
|
|
||||||
bzip2? ( app-arch/bzip2:0= )
|
|
||||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
|
||||||
coverage? ( dev-util/lcov )
|
|
||||||
curl? ( >=net-misc/curl-7.10.5 )
|
|
||||||
enchant? ( <app-text/enchant-2.0:0 )
|
|
||||||
ffi? ( >=dev-libs/libffi-3.0.11 )
|
|
||||||
firebird? ( dev-db/firebird )
|
|
||||||
gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= )
|
|
||||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
|
||||||
gmp? ( dev-libs/gmp:0= )
|
|
||||||
iconv? ( virtual/libiconv )
|
|
||||||
imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
|
|
||||||
intl? ( dev-libs/icu:= )
|
|
||||||
kerberos? ( virtual/krb5 )
|
|
||||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
|
||||||
ldap-sasl? ( dev-libs/cyrus-sasl )
|
|
||||||
libedit? ( dev-libs/libedit )
|
|
||||||
lmdb? ( dev-db/lmdb:= )
|
|
||||||
mssql? ( dev-db/freetds[mssql] )
|
|
||||||
nls? ( sys-devel/gettext )
|
|
||||||
oci8-instant-client? ( dev-db/oracle-instantclient[sdk] )
|
|
||||||
odbc? ( iodbc? ( dev-db/libiodbc ) !iodbc? ( >=dev-db/unixODBC-1.8.13 ) )
|
|
||||||
postgres? ( dev-db/postgresql:* )
|
|
||||||
qdbm? ( dev-db/qdbm )
|
|
||||||
readline? ( sys-libs/readline:0= )
|
|
||||||
session-mm? ( dev-libs/mm )
|
|
||||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
|
||||||
sodium? ( dev-libs/libsodium:= )
|
|
||||||
spell? ( >=app-text/aspell-0.50 )
|
|
||||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( >=dev-libs/openssl-1.0.1:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
)
|
|
||||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
|
||||||
tokyocabinet? ( dev-db/tokyocabinet )
|
|
||||||
truetype? ( =media-libs/freetype-2* )
|
|
||||||
unicode? ( dev-libs/oniguruma:= )
|
|
||||||
webp? ( media-libs/libwebp:0= )
|
|
||||||
xml? ( >=dev-libs/libxml2-2.7.6 )
|
|
||||||
xpm? ( x11-libs/libXpm )
|
|
||||||
xslt? ( dev-libs/libxslt )
|
|
||||||
zip? ( >=dev-libs/libzip-1.2.0:= )
|
|
||||||
zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
|
|
||||||
"
|
|
||||||
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
virtual/mta
|
|
||||||
fpm? (
|
|
||||||
selinux? ( sec-policy/selinux-phpfpm )
|
|
||||||
systemd? ( sys-apps/systemd ) )"
|
|
||||||
|
|
||||||
# Bison isn't actually needed when building from a release tarball
|
|
||||||
# However, the configure script will warn if it's absent or if you
|
|
||||||
# have an incompatible version installed. See bug 593278.
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
app-arch/xz-utils
|
|
||||||
>=sys-devel/bison-3.0.1"
|
|
||||||
|
|
||||||
BDEPEND="virtual/pkgconfig"
|
|
||||||
|
|
||||||
PHP_MV="$(ver_cut 1)"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/php-iodbc-header-location.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
php_install_ini() {
|
|
||||||
local phpsapi="${1}"
|
|
||||||
|
|
||||||
# work out where we are installing the ini file
|
|
||||||
php_set_ini_dir "${phpsapi}"
|
|
||||||
|
|
||||||
# Always install the production INI file, bug 611214.
|
|
||||||
local phpinisrc="php.ini-production-${phpsapi}"
|
|
||||||
cp php.ini-production "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# default to /tmp for save_path, bug #282768
|
|
||||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# Set the extension dir
|
|
||||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
|
|
||||||
-i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# Set the include path to point to where we want to find PEAR packages
|
|
||||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
newins "${phpinisrc}" php.ini
|
|
||||||
|
|
||||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
elog
|
|
||||||
|
|
||||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
|
||||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
|
||||||
|
|
||||||
if use opcache; then
|
|
||||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
|
||||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
|
||||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
|
||||||
dosym "../ext/opcache.ini" \
|
|
||||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# SAPI-specific handling
|
|
||||||
if [[ "${sapi}" == "fpm" ]] ; then
|
|
||||||
einfo "Installing FPM config files php-fpm.conf and www.conf"
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
doins sapi/fpm/php-fpm.conf
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
|
||||||
doins sapi/fpm/www.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
dodoc php.ini-{development,production}
|
|
||||||
}
|
|
||||||
|
|
||||||
php_set_ini_dir() {
|
|
||||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
|
||||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
|
||||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# In php-7.x, the FPM pool configuration files have been split off
|
|
||||||
# of the main config. By default the pool config files go in
|
|
||||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
|
||||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
|
||||||
# we'll install the pool configuration file "www.conf" there.
|
|
||||||
php_set_ini_dir fpm
|
|
||||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
|
||||||
sapi/fpm/php-fpm.conf.in \
|
|
||||||
|| die 'failed to move the include directory in php-fpm.conf'
|
|
||||||
|
|
||||||
# Emulate buildconf to support cross-compilation
|
|
||||||
rm -fr aclocal.m4 autom4te.cache config.cache \
|
|
||||||
configure main/php_config.h.in || die
|
|
||||||
eautoconf --force
|
|
||||||
eautoheader
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
|
||||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
|
||||||
|
|
||||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
|
||||||
|
|
||||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
|
||||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
|
||||||
local our_conf=(
|
|
||||||
--prefix="${PHP_DESTDIR}"
|
|
||||||
--mandir="${PHP_DESTDIR}/man"
|
|
||||||
--infodir="${PHP_DESTDIR}/info"
|
|
||||||
--libdir="${PHP_DESTDIR}/lib"
|
|
||||||
--with-libdir="$(get_libdir)"
|
|
||||||
--localstatedir="${EPREFIX}/var"
|
|
||||||
--without-pear
|
|
||||||
$(use_enable threads maintainer-zts)
|
|
||||||
)
|
|
||||||
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with argon2 password-argon2 "${EPREFIX}/usr")
|
|
||||||
$(use_enable bcmath)
|
|
||||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
|
||||||
$(use_enable calendar)
|
|
||||||
$(use_enable coverage gcov)
|
|
||||||
$(use_enable ctype)
|
|
||||||
$(use_with curl)
|
|
||||||
$(use_enable xml dom)
|
|
||||||
$(use_with enchant)
|
|
||||||
$(use_enable exif)
|
|
||||||
$(use_with ffi)
|
|
||||||
$(use_enable fileinfo)
|
|
||||||
$(use_enable filter)
|
|
||||||
$(use_enable ftp)
|
|
||||||
$(use_with nls gettext "${EPREFIX}/usr")
|
|
||||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
|
||||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
|
||||||
$(use_with iconv iconv \
|
|
||||||
$(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
|
|
||||||
$(use_enable intl)
|
|
||||||
$(use_enable ipv6)
|
|
||||||
$(use_enable json)
|
|
||||||
$(use_with kerberos)
|
|
||||||
$(use_with xml libxml)
|
|
||||||
$(use_enable unicode mbstring)
|
|
||||||
$(use_with ssl openssl)
|
|
||||||
$(use_enable pcntl)
|
|
||||||
$(use_enable phar)
|
|
||||||
$(use_enable pdo)
|
|
||||||
$(use_enable opcache)
|
|
||||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
|
||||||
$(use_enable posix)
|
|
||||||
$(use_with spell pspell "${EPREFIX}/usr")
|
|
||||||
$(use_enable simplexml)
|
|
||||||
$(use_enable sharedmem shmop)
|
|
||||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
|
||||||
$(use_enable soap)
|
|
||||||
$(use_enable sockets)
|
|
||||||
$(use_with sodium)
|
|
||||||
$(use_with sqlite sqlite3)
|
|
||||||
$(use_enable sysvipc sysvmsg)
|
|
||||||
$(use_enable sysvipc sysvsem)
|
|
||||||
$(use_enable sysvipc sysvshm)
|
|
||||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
|
||||||
$(use_enable tokenizer)
|
|
||||||
$(use_enable xml)
|
|
||||||
$(use_enable xmlreader)
|
|
||||||
$(use_enable xmlwriter)
|
|
||||||
$(use_with xmlrpc)
|
|
||||||
$(use_with xslt xsl)
|
|
||||||
$(use_with zip)
|
|
||||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
|
||||||
$(use_enable debug)
|
|
||||||
)
|
|
||||||
|
|
||||||
# DBA support
|
|
||||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
|
||||||
|| use qdbm || use lmdb || use tokyocabinet ; then
|
|
||||||
our_conf+=( "--enable-dba" )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# DBA drivers support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with cdb)
|
|
||||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
|
||||||
$(use_enable flatfile)
|
|
||||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
|
||||||
$(use_enable inifile)
|
|
||||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
|
||||||
$(use_with tokyocabinet tcadb "${EPREFIX}/usr")
|
|
||||||
$(use_with lmdb lmdb "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Support for the GD graphics library
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with truetype freetype)
|
|
||||||
$(use_enable cjk gd-jis-conv)
|
|
||||||
$(use_with gd jpeg)
|
|
||||||
$(use_with xpm)
|
|
||||||
$(use_with webp)
|
|
||||||
)
|
|
||||||
# enable gd last, so configure can pick up the previous settings
|
|
||||||
our_conf+=( $(use_enable gd) )
|
|
||||||
|
|
||||||
# IMAP support
|
|
||||||
if use imap ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with imap imap "${EPREFIX}/usr")
|
|
||||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# LDAP support
|
|
||||||
if use ldap ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
|
||||||
$(use_with ldap-sasl)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# MySQL support
|
|
||||||
local mysqllib="mysqlnd"
|
|
||||||
local mysqlilib="mysqlnd"
|
|
||||||
|
|
||||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
|
||||||
|
|
||||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
|
||||||
if use mysql || use mysqli ; then
|
|
||||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ODBC support
|
|
||||||
if use odbc && use iodbc ; then
|
|
||||||
our_conf+=(
|
|
||||||
--without-unixODBC
|
|
||||||
--with-iodbc
|
|
||||||
$(use_with pdo pdo-odbc "iODBC,${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
elif use odbc ; then
|
|
||||||
our_conf+=(
|
|
||||||
--with-unixODBC="${EPREFIX}/usr"
|
|
||||||
--without-iodbc
|
|
||||||
$(use_with pdo pdo-odbc "unixODBC,${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
else
|
|
||||||
our_conf+=(
|
|
||||||
--without-unixODBC
|
|
||||||
--without-iodbc
|
|
||||||
--without-pdo-odbc
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Oracle support
|
|
||||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
|
||||||
|
|
||||||
# PDO support
|
|
||||||
if use pdo ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with mssql pdo-dblib "${EPREFIX}/usr")
|
|
||||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
|
||||||
$(use_with postgres pdo-pgsql)
|
|
||||||
$(use_with sqlite pdo-sqlite)
|
|
||||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
|
||||||
$(use_with oci8-instant-client pdo-oci)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# readline/libedit support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with readline readline "${EPREFIX}/usr")
|
|
||||||
$(use_with libedit)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Session support
|
|
||||||
if use session ; then
|
|
||||||
our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
|
|
||||||
else
|
|
||||||
our_conf+=( $(use_enable session) )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use pic for shared modules such as apache2's mod_php
|
|
||||||
our_conf+=( --with-pic )
|
|
||||||
|
|
||||||
# we use the system copy of pcre
|
|
||||||
# --with-external-pcre affects ext/pcre
|
|
||||||
our_conf+=(
|
|
||||||
--with-external-pcre
|
|
||||||
$(use_with jit pcre-jit)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Catch CFLAGS problems
|
|
||||||
# Fixes bug #14067.
|
|
||||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
|
||||||
replace-cpu-flags "k6*" "i586"
|
|
||||||
|
|
||||||
# Cache the ./configure test results between SAPIs.
|
|
||||||
our_conf+=( --cache-file="${T}/config.cache" )
|
|
||||||
|
|
||||||
# Support user-passed configuration parameters
|
|
||||||
our_conf+=( ${EXTRA_ECONF:-} )
|
|
||||||
|
|
||||||
# Support the Apache2 extras, they must be set globally for all
|
|
||||||
# SAPIs to work correctly, especially for external PHP extensions
|
|
||||||
|
|
||||||
local one_sapi
|
|
||||||
local sapi
|
|
||||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
|
||||||
for one_sapi in $SAPIS ; do
|
|
||||||
use "${one_sapi}" || continue
|
|
||||||
php_set_ini_dir "${one_sapi}"
|
|
||||||
|
|
||||||
# The BUILD_DIR variable is used to determine where to output
|
|
||||||
# the files that autotools creates. This was all originally
|
|
||||||
# based on the autotools-utils eclass.
|
|
||||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
|
||||||
cp -a "${S}" "${BUILD_DIR}" || die
|
|
||||||
cd "${BUILD_DIR}" || die
|
|
||||||
|
|
||||||
local sapi_conf=(
|
|
||||||
--with-config-file-path="${PHP_INI_DIR}"
|
|
||||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
|
||||||
)
|
|
||||||
|
|
||||||
for sapi in $SAPIS ; do
|
|
||||||
case "$sapi" in
|
|
||||||
cli|cgi|embed|fpm|phpdbg)
|
|
||||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=( "--enable-${sapi}" )
|
|
||||||
if [[ "fpm" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=(
|
|
||||||
$(use_with acl fpm-acl)
|
|
||||||
$(use_with systemd fpm-systemd)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
sapi_conf+=( "--disable-${sapi}" )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
apache2)
|
|
||||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
|
|
||||||
else
|
|
||||||
sapi_conf+=( --without-apxs2 )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Construct the $myeconfargs array by concatenating $our_conf
|
|
||||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
|
||||||
local myeconfargs=( "${our_conf[@]}" )
|
|
||||||
myeconfargs+=( "${sapi_conf[@]}" )
|
|
||||||
|
|
||||||
pushd "${BUILD_DIR}" > /dev/null || die
|
|
||||||
econf "${myeconfargs[@]}"
|
|
||||||
popd > /dev/null || die
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# snmp seems to run during src_compile, too (bug #324739)
|
|
||||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
|
||||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
|
||||||
|
|
||||||
local sapi
|
|
||||||
for sapi in ${SAPIS} ; do
|
|
||||||
if use "${sapi}"; then
|
|
||||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
|
||||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
|
||||||
emake
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# see bug #324739 for what happens when we don't have that
|
|
||||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
|
||||||
|
|
||||||
# grab the first SAPI that got built and install common files from there
|
|
||||||
local first_sapi="", sapi=""
|
|
||||||
for sapi in $SAPIS ; do
|
|
||||||
if use $sapi ; then
|
|
||||||
first_sapi=$sapi
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Makefile forgets to create this before trying to write to it...
|
|
||||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
|
||||||
|
|
||||||
# Install php environment (without any sapis)
|
|
||||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
|
||||||
emake INSTALL_ROOT="${D}" \
|
|
||||||
install-build install-headers install-programs
|
|
||||||
|
|
||||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
|
||||||
|
|
||||||
# Create the directory where we'll put version-specific php scripts
|
|
||||||
keepdir "/usr/share/php${PHP_MV}"
|
|
||||||
|
|
||||||
local file=""
|
|
||||||
local sapi_list=""
|
|
||||||
|
|
||||||
for sapi in ${SAPIS}; do
|
|
||||||
if use "${sapi}" ; then
|
|
||||||
einfo "Installing SAPI: ${sapi}"
|
|
||||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
|
||||||
|
|
||||||
if [[ "${sapi}" == "apache2" ]] ; then
|
|
||||||
# We're specifically not using emake install-sapi as libtool
|
|
||||||
# may cause unnecessary relink failures (see bug #351266)
|
|
||||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
|
||||||
newins ".libs/libphp${PHP_MV}$(get_libname)" \
|
|
||||||
"libphp${PHP_MV}$(get_libname)"
|
|
||||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
|
||||||
else
|
|
||||||
# needed each time, php_install_ini would reset it
|
|
||||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
|
||||||
into "${dest}"
|
|
||||||
case "$sapi" in
|
|
||||||
cli)
|
|
||||||
source="sapi/cli/php"
|
|
||||||
# Install the "phar" archive utility.
|
|
||||||
if use phar ; then
|
|
||||||
emake INSTALL_ROOT="${D}" install-pharcmd
|
|
||||||
dosym "..${dest#/usr}/bin/phar" "/usr/bin/phar${SLOT}"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
cgi)
|
|
||||||
source="sapi/cgi/php-cgi"
|
|
||||||
;;
|
|
||||||
fpm)
|
|
||||||
source="sapi/fpm/php-fpm"
|
|
||||||
;;
|
|
||||||
embed)
|
|
||||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
|
||||||
;;
|
|
||||||
phpdbg)
|
|
||||||
source="sapi/phpdbg/phpdbg"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "unhandled sapi in src_install"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
|
||||||
dolib.so "${source}"
|
|
||||||
else
|
|
||||||
dobin "${source}"
|
|
||||||
local name="$(basename ${source})"
|
|
||||||
dosym "..${dest#/usr}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
php_install_ini "${sapi}"
|
|
||||||
|
|
||||||
# construct correct SAPI string for php-config
|
|
||||||
# thanks to ferringb for the bash voodoo
|
|
||||||
if [[ "${sapi}" == "apache2" ]]; then
|
|
||||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
|
||||||
else
|
|
||||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Installing opcache module
|
|
||||||
if use opcache ; then
|
|
||||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
|
||||||
dolib.so "modules/opcache$(get_libname)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install env.d files
|
|
||||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
|
||||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
|
||||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
|
||||||
|
|
||||||
# set php-config variable correctly (bug #278439)
|
|
||||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
|
||||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
|
||||||
|
|
||||||
if use fpm ; then
|
|
||||||
if use systemd; then
|
|
||||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
|
||||||
"php-fpm@${SLOT}.service"
|
|
||||||
else
|
|
||||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
|
||||||
"php-fpm@${SLOT}.service"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
|
||||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
|
||||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
|
||||||
ewarn "Test phase requires USE=cli, skipping"
|
|
||||||
return
|
|
||||||
else
|
|
||||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
|
||||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
|
||||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
|
||||||
"session.save_path=${T}" \
|
|
||||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
|
||||||
"session.save_path=${T}"
|
|
||||||
|
|
||||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
|
||||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
|
||||||
done
|
|
||||||
|
|
||||||
local failed="$(find -name '*.out')"
|
|
||||||
if [[ ${failed} != "" ]] ; then
|
|
||||||
ewarn "The following test cases failed unexpectedly:"
|
|
||||||
for name in ${failed}; do
|
|
||||||
ewarn " ${name/.out/}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "No unexpected test failures, all fine"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
|
||||||
local passed=""
|
|
||||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
|
||||||
[[ -f "${name}.diff" ]] && continue
|
|
||||||
passed="${passed} ${name}"
|
|
||||||
done
|
|
||||||
if [[ ${passed} != "" ]] ; then
|
|
||||||
einfo "The following test cases passed unexpectedly:"
|
|
||||||
for name in ${passed}; do
|
|
||||||
ewarn " ${passed}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "None of the known-to-fail tests passed, all fine"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
# Output some general info to the user
|
|
||||||
if use apache2 ; then
|
|
||||||
elog
|
|
||||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
|
||||||
elog "your apache2 command. OpenRC users can append that string to"
|
|
||||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
|
||||||
elog
|
|
||||||
elog "The apache module configuration file 70_mod_php.conf is"
|
|
||||||
elog "provided (and maintained) by eselect-php."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create the symlinks for php
|
|
||||||
local m
|
|
||||||
for m in ${SAPIS}; do
|
|
||||||
[[ ${m} == 'embed' ]] && continue;
|
|
||||||
if use $m ; then
|
|
||||||
local ci=$(eselect php show $m)
|
|
||||||
if [[ -z $ci ]]; then
|
|
||||||
eselect php set $m php${SLOT} || die
|
|
||||||
einfo "Switched ${m} to use php:${SLOT}"
|
|
||||||
einfo
|
|
||||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
|
||||||
elog "To switch $m to use php:${SLOT}, run"
|
|
||||||
elog " eselect php set $m php${SLOT}"
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
|
||||||
# example, if the user has the cgi SAPI enabled, then he has an
|
|
||||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
|
||||||
# USE="-cgi", that symlink will break. This call to eselect is
|
|
||||||
# supposed to remove that dead link per bug 572436.
|
|
||||||
eselect php cleanup || die
|
|
||||||
|
|
||||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
|
||||||
elog "To build extensions for this version of PHP, you will need to"
|
|
||||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
|
||||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
|
||||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
|
||||||
ewarn 'remove it from your configuration at your convenience. See'
|
|
||||||
ewarn
|
|
||||||
ewarn ' https://bugs.gentoo.org/611214'
|
|
||||||
ewarn
|
|
||||||
ewarn 'for more information.'
|
|
||||||
fi
|
|
||||||
|
|
||||||
elog "For details on how version slotting works, please see"
|
|
||||||
elog "the wiki:"
|
|
||||||
elog
|
|
||||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
|
||||||
elog
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
# This serves two purposes. First, if we have just removed the last
|
|
||||||
# installed version of PHP, then this will remove any dead symlinks
|
|
||||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
|
||||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
|
||||||
# his existing symlinks to point to the new 7.0 installation. The
|
|
||||||
# latter is bug 432962.
|
|
||||||
#
|
|
||||||
# Note: the eselect-php package may not be installed at this point,
|
|
||||||
# so we can't die() if this command fails.
|
|
||||||
eselect php cleanup
|
|
||||||
}
|
|
@ -1,748 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="7"
|
|
||||||
|
|
||||||
WANT_AUTOMAKE="none"
|
|
||||||
|
|
||||||
inherit flag-o-matic systemd autotools
|
|
||||||
|
|
||||||
MY_PV=${PV/_rc/rc}
|
|
||||||
DESCRIPTION="The PHP language runtime engine"
|
|
||||||
HOMEPAGE="https://www.php.net/"
|
|
||||||
SRC_URI="https://www.php.net/distributions/${P}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="PHP-3.01
|
|
||||||
BSD
|
|
||||||
Zend-2.0
|
|
||||||
bcmath? ( LGPL-2.1+ )
|
|
||||||
fpm? ( BSD-2 )
|
|
||||||
gd? ( gd )
|
|
||||||
unicode? ( BSD-2 LGPL-2.1 )"
|
|
||||||
|
|
||||||
SLOT="$(ver_cut 1-2)"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
|
||||||
|
|
||||||
# We can build the following SAPIs in the given order
|
|
||||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
|
||||||
|
|
||||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
|
||||||
IUSE="${IUSE}
|
|
||||||
${SAPIS/cli/+cli}
|
|
||||||
threads"
|
|
||||||
|
|
||||||
IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
|
|
||||||
coverage +ctype curl debug
|
|
||||||
enchant exif ffi +fileinfo +filter firebird
|
|
||||||
+flatfile ftp gd gdbm gmp +iconv imap inifile
|
|
||||||
intl iodbc ipv6 +jit kerberos ldap ldap-sasl libedit libressl lmdb
|
|
||||||
mhash mssql mysql mysqli nls
|
|
||||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
|
||||||
readline selinux +session session-mm sharedmem
|
|
||||||
+simplexml snmp soap sockets sodium spell sqlite ssl
|
|
||||||
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode webp
|
|
||||||
+xml xmlreader xmlwriter xpm xslt zip zlib"
|
|
||||||
|
|
||||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
|
||||||
# The Oracle instant client provides its own incompatible ldap library.
|
|
||||||
REQUIRED_USE="
|
|
||||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
|
||||||
cli? ( ^^ ( readline libedit ) )
|
|
||||||
!cli? ( ?? ( readline libedit ) )
|
|
||||||
truetype? ( gd zlib )
|
|
||||||
webp? ( gd zlib )
|
|
||||||
cjk? ( gd zlib )
|
|
||||||
exif? ( gd zlib )
|
|
||||||
xpm? ( gd zlib )
|
|
||||||
gd? ( zlib )
|
|
||||||
simplexml? ( xml )
|
|
||||||
soap? ( xml )
|
|
||||||
xmlreader? ( xml )
|
|
||||||
xmlwriter? ( xml )
|
|
||||||
xslt? ( xml )
|
|
||||||
ldap-sasl? ( ldap )
|
|
||||||
oci8-instant-client? ( !ldap )
|
|
||||||
qdbm? ( !gdbm )
|
|
||||||
session-mm? ( session !threads )
|
|
||||||
mysql? ( || ( mysqli pdo ) )
|
|
||||||
firebird? ( pdo )
|
|
||||||
mssql? ( pdo )
|
|
||||||
"
|
|
||||||
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
# The supported (that is, autodetected) versions of BDB are listed in
|
|
||||||
# the ./configure script. Other versions *work*, but we need to stick to
|
|
||||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
|
||||||
COMMON_DEPEND="
|
|
||||||
>=app-eselect/eselect-php-0.9.7[apache2?,fpm?]
|
|
||||||
>=dev-libs/libpcre2-10.30[jit?,unicode]
|
|
||||||
fpm? ( acl? ( sys-apps/acl ) )
|
|
||||||
apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
|
|
||||||
argon2? ( app-crypt/argon2:= )
|
|
||||||
berkdb? ( || ( sys-libs/db:5.3
|
|
||||||
sys-libs/db:5.1
|
|
||||||
sys-libs/db:4.8
|
|
||||||
sys-libs/db:4.7
|
|
||||||
sys-libs/db:4.6
|
|
||||||
sys-libs/db:4.5 ) )
|
|
||||||
bzip2? ( app-arch/bzip2:0= )
|
|
||||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
|
||||||
coverage? ( dev-util/lcov )
|
|
||||||
curl? ( >=net-misc/curl-7.29.0 )
|
|
||||||
enchant? ( app-text/enchant:2 )
|
|
||||||
ffi? ( >=dev-libs/libffi-3.0.11 )
|
|
||||||
firebird? ( dev-db/firebird )
|
|
||||||
gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= )
|
|
||||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
|
||||||
gmp? ( dev-libs/gmp:0= )
|
|
||||||
iconv? ( virtual/libiconv )
|
|
||||||
imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
|
|
||||||
intl? ( dev-libs/icu:= )
|
|
||||||
kerberos? ( virtual/krb5 )
|
|
||||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
|
||||||
ldap-sasl? ( dev-libs/cyrus-sasl )
|
|
||||||
libedit? ( dev-libs/libedit )
|
|
||||||
lmdb? ( dev-db/lmdb:= )
|
|
||||||
mssql? ( dev-db/freetds[mssql] )
|
|
||||||
nls? ( sys-devel/gettext )
|
|
||||||
oci8-instant-client? ( dev-db/oracle-instantclient[sdk] )
|
|
||||||
odbc? ( iodbc? ( dev-db/libiodbc ) !iodbc? ( >=dev-db/unixODBC-1.8.13 ) )
|
|
||||||
postgres? ( >=dev-db/postgresql-9.1:* )
|
|
||||||
qdbm? ( dev-db/qdbm )
|
|
||||||
readline? ( sys-libs/readline:0= )
|
|
||||||
session-mm? ( dev-libs/mm )
|
|
||||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
|
||||||
sodium? ( dev-libs/libsodium:= )
|
|
||||||
spell? ( >=app-text/aspell-0.50 )
|
|
||||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( >=dev-libs/openssl-1.0.1:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
)
|
|
||||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
|
||||||
tokyocabinet? ( dev-db/tokyocabinet )
|
|
||||||
truetype? ( =media-libs/freetype-2* )
|
|
||||||
unicode? ( dev-libs/oniguruma:= )
|
|
||||||
webp? ( media-libs/libwebp:0= )
|
|
||||||
xml? ( >=dev-libs/libxml2-2.9.0 )
|
|
||||||
xpm? ( x11-libs/libXpm )
|
|
||||||
xslt? ( dev-libs/libxslt )
|
|
||||||
zip? ( >=dev-libs/libzip-1.2.0:= )
|
|
||||||
zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
|
|
||||||
"
|
|
||||||
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
virtual/mta
|
|
||||||
fpm? (
|
|
||||||
selinux? ( sec-policy/selinux-phpfpm )
|
|
||||||
systemd? ( sys-apps/systemd ) )"
|
|
||||||
|
|
||||||
# Bison isn't actually needed when building from a release tarball
|
|
||||||
# However, the configure script will warn if it's absent or if you
|
|
||||||
# have an incompatible version installed. See bug 593278.
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
app-arch/xz-utils
|
|
||||||
>=sys-devel/bison-3.0.1"
|
|
||||||
|
|
||||||
BDEPEND="virtual/pkgconfig"
|
|
||||||
|
|
||||||
PHP_MV="$(ver_cut 1)"
|
|
||||||
|
|
||||||
PATCHES=( "${FILESDIR}/php-iodbc-header-location.patch" )
|
|
||||||
|
|
||||||
php_install_ini() {
|
|
||||||
local phpsapi="${1}"
|
|
||||||
|
|
||||||
# work out where we are installing the ini file
|
|
||||||
php_set_ini_dir "${phpsapi}"
|
|
||||||
|
|
||||||
# Always install the production INI file, bug 611214.
|
|
||||||
local phpinisrc="php.ini-production-${phpsapi}"
|
|
||||||
cp php.ini-production "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# default to /tmp for save_path, bug #282768
|
|
||||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# Set the extension dir
|
|
||||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
|
|
||||||
-i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# Set the include path to point to where we want to find PEAR packages
|
|
||||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
newins "${phpinisrc}" php.ini
|
|
||||||
|
|
||||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
elog
|
|
||||||
|
|
||||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
|
||||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
|
||||||
|
|
||||||
if use opcache; then
|
|
||||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
|
||||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
|
||||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
|
||||||
dosym "../ext/opcache.ini" \
|
|
||||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# SAPI-specific handling
|
|
||||||
if [[ "${sapi}" == "fpm" ]] ; then
|
|
||||||
einfo "Installing FPM config files php-fpm.conf and www.conf"
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
doins sapi/fpm/php-fpm.conf
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
|
||||||
doins sapi/fpm/www.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
dodoc php.ini-{development,production}
|
|
||||||
}
|
|
||||||
|
|
||||||
php_set_ini_dir() {
|
|
||||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
|
||||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
|
||||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# In php-7.x, the FPM pool configuration files have been split off
|
|
||||||
# of the main config. By default the pool config files go in
|
|
||||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
|
||||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
|
||||||
# we'll install the pool configuration file "www.conf" there.
|
|
||||||
php_set_ini_dir fpm
|
|
||||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
|
||||||
sapi/fpm/php-fpm.conf.in \
|
|
||||||
|| die 'failed to move the include directory in php-fpm.conf'
|
|
||||||
|
|
||||||
# Emulate buildconf to support cross-compilation
|
|
||||||
rm -fr aclocal.m4 autom4te.cache config.cache \
|
|
||||||
configure main/php_config.h.in || die
|
|
||||||
eautoconf --force
|
|
||||||
eautoheader
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
|
||||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
|
||||||
|
|
||||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
|
||||||
|
|
||||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
|
||||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
|
||||||
local our_conf=(
|
|
||||||
--prefix="${PHP_DESTDIR}"
|
|
||||||
--mandir="${PHP_DESTDIR}/man"
|
|
||||||
--infodir="${PHP_DESTDIR}/info"
|
|
||||||
--libdir="${PHP_DESTDIR}/lib"
|
|
||||||
--with-libdir="$(get_libdir)"
|
|
||||||
--localstatedir="${EPREFIX}/var"
|
|
||||||
--without-pear
|
|
||||||
$(use_enable threads zts)
|
|
||||||
)
|
|
||||||
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with argon2 password-argon2 "${EPREFIX}/usr")
|
|
||||||
$(use_enable bcmath)
|
|
||||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
|
||||||
$(use_enable calendar)
|
|
||||||
$(use_enable coverage gcov)
|
|
||||||
$(use_enable ctype)
|
|
||||||
$(use_with curl)
|
|
||||||
$(use_enable xml dom)
|
|
||||||
$(use_with enchant)
|
|
||||||
$(use_enable exif)
|
|
||||||
$(use_with ffi)
|
|
||||||
$(use_enable fileinfo)
|
|
||||||
$(use_enable filter)
|
|
||||||
$(use_enable ftp)
|
|
||||||
$(use_with nls gettext "${EPREFIX}/usr")
|
|
||||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
|
||||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
|
||||||
$(use_with iconv iconv \
|
|
||||||
$(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
|
|
||||||
$(use_enable intl)
|
|
||||||
$(use_enable ipv6)
|
|
||||||
$(use_with kerberos)
|
|
||||||
$(use_with xml libxml)
|
|
||||||
$(use_enable unicode mbstring)
|
|
||||||
$(use_with ssl openssl)
|
|
||||||
$(use_enable pcntl)
|
|
||||||
$(use_enable phar)
|
|
||||||
$(use_enable pdo)
|
|
||||||
$(use_enable opcache)
|
|
||||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
|
||||||
$(use_enable posix)
|
|
||||||
$(use_with spell pspell "${EPREFIX}/usr")
|
|
||||||
$(use_enable simplexml)
|
|
||||||
$(use_enable sharedmem shmop)
|
|
||||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
|
||||||
$(use_enable soap)
|
|
||||||
$(use_enable sockets)
|
|
||||||
$(use_with sodium)
|
|
||||||
$(use_with sqlite sqlite3)
|
|
||||||
$(use_enable sysvipc sysvmsg)
|
|
||||||
$(use_enable sysvipc sysvsem)
|
|
||||||
$(use_enable sysvipc sysvshm)
|
|
||||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
|
||||||
$(use_enable tokenizer)
|
|
||||||
$(use_enable xml)
|
|
||||||
$(use_enable xmlreader)
|
|
||||||
$(use_enable xmlwriter)
|
|
||||||
$(use_with xslt xsl)
|
|
||||||
$(use_with zip)
|
|
||||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
|
||||||
$(use_enable debug)
|
|
||||||
)
|
|
||||||
|
|
||||||
# DBA support
|
|
||||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
|
||||||
|| use qdbm || use lmdb || use tokyocabinet ; then
|
|
||||||
our_conf+=( "--enable-dba" )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# DBA drivers support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with cdb)
|
|
||||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
|
||||||
$(use_enable flatfile)
|
|
||||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
|
||||||
$(use_enable inifile)
|
|
||||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
|
||||||
$(use_with tokyocabinet tcadb "${EPREFIX}/usr")
|
|
||||||
$(use_with lmdb lmdb "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Support for the GD graphics library
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with truetype freetype)
|
|
||||||
$(use_enable cjk gd-jis-conv)
|
|
||||||
$(use_with gd jpeg)
|
|
||||||
$(use_with xpm)
|
|
||||||
$(use_with webp)
|
|
||||||
)
|
|
||||||
# enable gd last, so configure can pick up the previous settings
|
|
||||||
our_conf+=( $(use_enable gd) )
|
|
||||||
|
|
||||||
# IMAP support
|
|
||||||
if use imap ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with imap imap "${EPREFIX}/usr")
|
|
||||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# LDAP support
|
|
||||||
if use ldap ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
|
||||||
$(use_with ldap-sasl)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# MySQL support
|
|
||||||
local mysqllib="mysqlnd"
|
|
||||||
local mysqlilib="mysqlnd"
|
|
||||||
|
|
||||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
|
||||||
|
|
||||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
|
||||||
if use mysql || use mysqli ; then
|
|
||||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ODBC support
|
|
||||||
if use odbc && use iodbc ; then
|
|
||||||
our_conf+=(
|
|
||||||
--without-unixODBC
|
|
||||||
--with-iodbc
|
|
||||||
$(use_with pdo pdo-odbc "iODBC,${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
elif use odbc ; then
|
|
||||||
our_conf+=(
|
|
||||||
--with-unixODBC="${EPREFIX}/usr"
|
|
||||||
--without-iodbc
|
|
||||||
$(use_with pdo pdo-odbc "unixODBC,${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
else
|
|
||||||
our_conf+=(
|
|
||||||
--without-unixODBC
|
|
||||||
--without-iodbc
|
|
||||||
--without-pdo-odbc
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Oracle support
|
|
||||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
|
||||||
|
|
||||||
# PDO support
|
|
||||||
if use pdo ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with mssql pdo-dblib "${EPREFIX}/usr")
|
|
||||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
|
||||||
$(use_with postgres pdo-pgsql)
|
|
||||||
$(use_with sqlite pdo-sqlite)
|
|
||||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
|
||||||
$(use_with oci8-instant-client pdo-oci)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# readline/libedit support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with readline readline "${EPREFIX}/usr")
|
|
||||||
$(use_with libedit)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Session support
|
|
||||||
if use session ; then
|
|
||||||
our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
|
|
||||||
else
|
|
||||||
our_conf+=( $(use_enable session) )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use pic for shared modules such as apache2's mod_php
|
|
||||||
our_conf+=( --with-pic )
|
|
||||||
|
|
||||||
# we use the system copy of pcre
|
|
||||||
# --with-external-pcre affects ext/pcre
|
|
||||||
our_conf+=(
|
|
||||||
--with-external-pcre
|
|
||||||
$(use_with jit pcre-jit)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Catch CFLAGS problems
|
|
||||||
# Fixes bug #14067.
|
|
||||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
|
||||||
replace-cpu-flags "k6*" "i586"
|
|
||||||
|
|
||||||
# Cache the ./configure test results between SAPIs.
|
|
||||||
our_conf+=( --cache-file="${T}/config.cache" )
|
|
||||||
|
|
||||||
# Support user-passed configuration parameters
|
|
||||||
our_conf+=( ${EXTRA_ECONF:-} )
|
|
||||||
|
|
||||||
# Support the Apache2 extras, they must be set globally for all
|
|
||||||
# SAPIs to work correctly, especially for external PHP extensions
|
|
||||||
|
|
||||||
local one_sapi
|
|
||||||
local sapi
|
|
||||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
|
||||||
for one_sapi in $SAPIS ; do
|
|
||||||
use "${one_sapi}" || continue
|
|
||||||
php_set_ini_dir "${one_sapi}"
|
|
||||||
|
|
||||||
# The BUILD_DIR variable is used to determine where to output
|
|
||||||
# the files that autotools creates. This was all originally
|
|
||||||
# based on the autotools-utils eclass.
|
|
||||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
|
||||||
cp -a "${S}" "${BUILD_DIR}" || die
|
|
||||||
cd "${BUILD_DIR}" || die
|
|
||||||
|
|
||||||
local sapi_conf=(
|
|
||||||
--with-config-file-path="${PHP_INI_DIR}"
|
|
||||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
|
||||||
)
|
|
||||||
|
|
||||||
for sapi in $SAPIS ; do
|
|
||||||
case "$sapi" in
|
|
||||||
cli|cgi|embed|fpm|phpdbg)
|
|
||||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=( "--enable-${sapi}" )
|
|
||||||
if [[ "fpm" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=(
|
|
||||||
$(use_with acl fpm-acl)
|
|
||||||
$(use_with systemd fpm-systemd)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
sapi_conf+=( "--disable-${sapi}" )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
apache2)
|
|
||||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
|
|
||||||
else
|
|
||||||
sapi_conf+=( --without-apxs2 )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Construct the $myeconfargs array by concatenating $our_conf
|
|
||||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
|
||||||
local myeconfargs=( "${our_conf[@]}" )
|
|
||||||
myeconfargs+=( "${sapi_conf[@]}" )
|
|
||||||
|
|
||||||
pushd "${BUILD_DIR}" > /dev/null || die
|
|
||||||
econf "${myeconfargs[@]}"
|
|
||||||
popd > /dev/null || die
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# snmp seems to run during src_compile, too (bug #324739)
|
|
||||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
|
||||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
|
||||||
|
|
||||||
local sapi
|
|
||||||
for sapi in ${SAPIS} ; do
|
|
||||||
if use "${sapi}"; then
|
|
||||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
|
||||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
|
||||||
emake
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# see bug #324739 for what happens when we don't have that
|
|
||||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
|
||||||
|
|
||||||
# grab the first SAPI that got built and install common files from there
|
|
||||||
local first_sapi="", sapi=""
|
|
||||||
for sapi in $SAPIS ; do
|
|
||||||
if use $sapi ; then
|
|
||||||
first_sapi=$sapi
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Makefile forgets to create this before trying to write to it...
|
|
||||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
|
||||||
|
|
||||||
# Install php environment (without any sapis)
|
|
||||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
|
||||||
emake INSTALL_ROOT="${D}" \
|
|
||||||
install-build install-headers install-programs
|
|
||||||
|
|
||||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
|
||||||
|
|
||||||
# Create the directory where we'll put version-specific php scripts
|
|
||||||
keepdir "/usr/share/php${PHP_MV}"
|
|
||||||
|
|
||||||
local file=""
|
|
||||||
local sapi_list=""
|
|
||||||
|
|
||||||
for sapi in ${SAPIS}; do
|
|
||||||
if use "${sapi}" ; then
|
|
||||||
einfo "Installing SAPI: ${sapi}"
|
|
||||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
|
||||||
|
|
||||||
if [[ "${sapi}" == "apache2" ]] ; then
|
|
||||||
# We're specifically not using emake install-sapi as libtool
|
|
||||||
# may cause unnecessary relink failures (see bug #351266)
|
|
||||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
|
||||||
newins ".libs/libphp$(get_libname)" \
|
|
||||||
"libphp${PHP_MV}$(get_libname)"
|
|
||||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
|
||||||
else
|
|
||||||
# needed each time, php_install_ini would reset it
|
|
||||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
|
||||||
into "${dest}"
|
|
||||||
case "$sapi" in
|
|
||||||
cli)
|
|
||||||
source="sapi/cli/php"
|
|
||||||
# Install the "phar" archive utility.
|
|
||||||
if use phar ; then
|
|
||||||
emake INSTALL_ROOT="${D}" install-pharcmd
|
|
||||||
dosym "..${dest#/usr}/bin/phar" "/usr/bin/phar${SLOT}"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
cgi)
|
|
||||||
source="sapi/cgi/php-cgi"
|
|
||||||
;;
|
|
||||||
fpm)
|
|
||||||
source="sapi/fpm/php-fpm"
|
|
||||||
;;
|
|
||||||
embed)
|
|
||||||
source="libs/libphp$(get_libname)"
|
|
||||||
;;
|
|
||||||
phpdbg)
|
|
||||||
source="sapi/phpdbg/phpdbg"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "unhandled sapi in src_install"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
|
||||||
dolib.so "${source}"
|
|
||||||
else
|
|
||||||
dobin "${source}"
|
|
||||||
local name="$(basename ${source})"
|
|
||||||
dosym "..${dest#/usr}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
php_install_ini "${sapi}"
|
|
||||||
|
|
||||||
# construct correct SAPI string for php-config
|
|
||||||
# thanks to ferringb for the bash voodoo
|
|
||||||
if [[ "${sapi}" == "apache2" ]]; then
|
|
||||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
|
||||||
else
|
|
||||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Installing opcache module
|
|
||||||
if use opcache ; then
|
|
||||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
|
||||||
dolib.so "modules/opcache$(get_libname)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install env.d files
|
|
||||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
|
||||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
|
||||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
|
||||||
|
|
||||||
# set php-config variable correctly (bug #278439)
|
|
||||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
|
||||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
|
||||||
|
|
||||||
if use fpm ; then
|
|
||||||
if use systemd; then
|
|
||||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
|
||||||
"php-fpm@${SLOT}.service"
|
|
||||||
else
|
|
||||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
|
||||||
"php-fpm@${SLOT}.service"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
|
||||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
|
||||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
|
||||||
ewarn "Test phase requires USE=cli, skipping"
|
|
||||||
return
|
|
||||||
else
|
|
||||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
|
||||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
|
||||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
|
||||||
"session.save_path=${T}" \
|
|
||||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
|
||||||
"session.save_path=${T}"
|
|
||||||
|
|
||||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
|
||||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
|
||||||
done
|
|
||||||
|
|
||||||
local failed="$(find -name '*.out')"
|
|
||||||
if [[ ${failed} != "" ]] ; then
|
|
||||||
ewarn "The following test cases failed unexpectedly:"
|
|
||||||
for name in ${failed}; do
|
|
||||||
ewarn " ${name/.out/}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "No unexpected test failures, all fine"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
|
||||||
local passed=""
|
|
||||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
|
||||||
[[ -f "${name}.diff" ]] && continue
|
|
||||||
passed="${passed} ${name}"
|
|
||||||
done
|
|
||||||
if [[ ${passed} != "" ]] ; then
|
|
||||||
einfo "The following test cases passed unexpectedly:"
|
|
||||||
for name in ${passed}; do
|
|
||||||
ewarn " ${passed}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "None of the known-to-fail tests passed, all fine"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
# Output some general info to the user
|
|
||||||
if use apache2 ; then
|
|
||||||
elog
|
|
||||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
|
||||||
elog "your apache2 command. OpenRC users can append that string to"
|
|
||||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
|
||||||
elog
|
|
||||||
elog "The apache module configuration file 70_mod_php.conf is"
|
|
||||||
elog "provided (and maintained) by eselect-php."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create the symlinks for php
|
|
||||||
local m
|
|
||||||
for m in ${SAPIS}; do
|
|
||||||
[[ ${m} == 'embed' ]] && continue;
|
|
||||||
if use $m ; then
|
|
||||||
local ci=$(eselect php show $m)
|
|
||||||
if [[ -z $ci ]]; then
|
|
||||||
eselect php set $m php${SLOT} || die
|
|
||||||
einfo "Switched ${m} to use php:${SLOT}"
|
|
||||||
einfo
|
|
||||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
|
||||||
elog "To switch $m to use php:${SLOT}, run"
|
|
||||||
elog " eselect php set $m php${SLOT}"
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
|
||||||
# example, if the user has the cgi SAPI enabled, then he has an
|
|
||||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
|
||||||
# USE="-cgi", that symlink will break. This call to eselect is
|
|
||||||
# supposed to remove that dead link per bug 572436.
|
|
||||||
eselect php cleanup || die
|
|
||||||
|
|
||||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
|
||||||
elog "To build extensions for this version of PHP, you will need to"
|
|
||||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
|
||||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
|
||||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
|
||||||
ewarn 'remove it from your configuration at your convenience. See'
|
|
||||||
ewarn
|
|
||||||
ewarn ' https://bugs.gentoo.org/611214'
|
|
||||||
ewarn
|
|
||||||
ewarn 'for more information.'
|
|
||||||
fi
|
|
||||||
|
|
||||||
elog "For details on how version slotting works, please see"
|
|
||||||
elog "the wiki:"
|
|
||||||
elog
|
|
||||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
|
||||||
elog
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
# This serves two purposes. First, if we have just removed the last
|
|
||||||
# installed version of PHP, then this will remove any dead symlinks
|
|
||||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
|
||||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
|
||||||
# his existing symlinks to point to the new 7.0 installation. The
|
|
||||||
# latter is bug 432962.
|
|
||||||
#
|
|
||||||
# Note: the eselect-php package may not be installed at this point,
|
|
||||||
# so we can't die() if this command fails.
|
|
||||||
eselect php cleanup
|
|
||||||
}
|
|
@ -1,749 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="7"
|
|
||||||
|
|
||||||
WANT_AUTOMAKE="none"
|
|
||||||
|
|
||||||
inherit flag-o-matic systemd autotools
|
|
||||||
|
|
||||||
MY_PV=${PV/_rc/rc}
|
|
||||||
DESCRIPTION="The PHP language runtime engine"
|
|
||||||
HOMEPAGE="https://www.php.net/"
|
|
||||||
SRC_URI="https://www.php.net/distributions/${P}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="PHP-3.01
|
|
||||||
BSD
|
|
||||||
Zend-2.0
|
|
||||||
bcmath? ( LGPL-2.1+ )
|
|
||||||
fpm? ( BSD-2 )
|
|
||||||
gd? ( gd )
|
|
||||||
unicode? ( BSD-2 LGPL-2.1 )"
|
|
||||||
|
|
||||||
SLOT="$(ver_cut 1-2)"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
|
||||||
|
|
||||||
# We can build the following SAPIs in the given order
|
|
||||||
SAPIS="embed cli cgi fpm apache2 phpdbg"
|
|
||||||
|
|
||||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
|
||||||
IUSE="${IUSE}
|
|
||||||
${SAPIS/cli/+cli}
|
|
||||||
threads"
|
|
||||||
|
|
||||||
IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
|
|
||||||
coverage +ctype curl debug
|
|
||||||
enchant exif ffi +fileinfo +filter firebird
|
|
||||||
+flatfile ftp gd gdbm gmp +iconv imap inifile
|
|
||||||
intl iodbc ipv6 kerberos ldap ldap-sasl libedit libressl lmdb
|
|
||||||
mhash mssql mysql mysqli nls
|
|
||||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
|
||||||
readline selinux +session session-mm sharedmem
|
|
||||||
+simplexml snmp soap sockets sodium spell sqlite ssl
|
|
||||||
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode webp
|
|
||||||
+xml xmlreader xmlwriter xpm xslt zip zlib"
|
|
||||||
|
|
||||||
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
|
||||||
# The Oracle instant client provides its own incompatible ldap library.
|
|
||||||
REQUIRED_USE="
|
|
||||||
|| ( cli cgi fpm apache2 embed phpdbg )
|
|
||||||
cli? ( ^^ ( readline libedit ) )
|
|
||||||
!cli? ( ?? ( readline libedit ) )
|
|
||||||
truetype? ( gd zlib )
|
|
||||||
webp? ( gd zlib )
|
|
||||||
cjk? ( gd zlib )
|
|
||||||
exif? ( gd zlib )
|
|
||||||
xpm? ( gd zlib )
|
|
||||||
gd? ( zlib )
|
|
||||||
simplexml? ( xml )
|
|
||||||
soap? ( xml )
|
|
||||||
xmlreader? ( xml )
|
|
||||||
xmlwriter? ( xml )
|
|
||||||
xslt? ( xml )
|
|
||||||
ldap-sasl? ( ldap )
|
|
||||||
oci8-instant-client? ( !ldap )
|
|
||||||
qdbm? ( !gdbm )
|
|
||||||
session-mm? ( session !threads )
|
|
||||||
mysql? ( || ( mysqli pdo ) )
|
|
||||||
firebird? ( pdo )
|
|
||||||
mssql? ( pdo )
|
|
||||||
"
|
|
||||||
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
# The supported (that is, autodetected) versions of BDB are listed in
|
|
||||||
# the ./configure script. Other versions *work*, but we need to stick to
|
|
||||||
# the ones that can be detected to avoid a repeat of bug #564824.
|
|
||||||
COMMON_DEPEND="
|
|
||||||
>=app-eselect/eselect-php-0.9.7[apache2?,fpm?]
|
|
||||||
>=dev-libs/libpcre2-10.30[unicode]
|
|
||||||
fpm? ( acl? ( sys-apps/acl ) )
|
|
||||||
apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
|
|
||||||
argon2? ( app-crypt/argon2:= )
|
|
||||||
berkdb? ( || ( sys-libs/db:5.3
|
|
||||||
sys-libs/db:5.1
|
|
||||||
sys-libs/db:4.8
|
|
||||||
sys-libs/db:4.7
|
|
||||||
sys-libs/db:4.6
|
|
||||||
sys-libs/db:4.5 ) )
|
|
||||||
bzip2? ( app-arch/bzip2:0= )
|
|
||||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
|
||||||
coverage? ( dev-util/lcov )
|
|
||||||
curl? ( >=net-misc/curl-7.29.0 )
|
|
||||||
enchant? ( app-text/enchant:2 )
|
|
||||||
ffi? ( >=dev-libs/libffi-3.0.11 )
|
|
||||||
firebird? ( dev-db/firebird )
|
|
||||||
gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= )
|
|
||||||
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
|
||||||
gmp? ( dev-libs/gmp:0= )
|
|
||||||
iconv? ( virtual/libiconv )
|
|
||||||
imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
|
|
||||||
intl? ( dev-libs/icu:= )
|
|
||||||
kerberos? ( virtual/krb5 )
|
|
||||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
|
||||||
ldap-sasl? ( dev-libs/cyrus-sasl )
|
|
||||||
libedit? ( dev-libs/libedit )
|
|
||||||
lmdb? ( dev-db/lmdb:= )
|
|
||||||
mssql? ( dev-db/freetds[mssql] )
|
|
||||||
nls? ( sys-devel/gettext )
|
|
||||||
oci8-instant-client? ( dev-db/oracle-instantclient[sdk] )
|
|
||||||
odbc? ( iodbc? ( dev-db/libiodbc ) !iodbc? ( >=dev-db/unixODBC-1.8.13 ) )
|
|
||||||
postgres? ( >=dev-db/postgresql-9.1:* )
|
|
||||||
qdbm? ( dev-db/qdbm )
|
|
||||||
readline? ( sys-libs/readline:0= )
|
|
||||||
session-mm? ( dev-libs/mm )
|
|
||||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
|
||||||
sodium? ( dev-libs/libsodium:= )
|
|
||||||
spell? ( >=app-text/aspell-0.50 )
|
|
||||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( >=dev-libs/openssl-1.0.1:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
)
|
|
||||||
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
|
|
||||||
tokyocabinet? ( dev-db/tokyocabinet )
|
|
||||||
truetype? ( =media-libs/freetype-2* )
|
|
||||||
unicode? ( dev-libs/oniguruma:= )
|
|
||||||
webp? ( media-libs/libwebp:0= )
|
|
||||||
xml? ( >=dev-libs/libxml2-2.9.0 )
|
|
||||||
xpm? ( x11-libs/libXpm )
|
|
||||||
xslt? ( dev-libs/libxslt )
|
|
||||||
zip? ( >=dev-libs/libzip-1.2.0:= )
|
|
||||||
zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
|
|
||||||
"
|
|
||||||
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
virtual/mta
|
|
||||||
fpm? (
|
|
||||||
selinux? ( sec-policy/selinux-phpfpm )
|
|
||||||
systemd? ( sys-apps/systemd ) )"
|
|
||||||
|
|
||||||
# Bison isn't actually needed when building from a release tarball
|
|
||||||
# However, the configure script will warn if it's absent or if you
|
|
||||||
# have an incompatible version installed. See bug 593278.
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
app-arch/xz-utils
|
|
||||||
>=sys-devel/bison-3.0.1"
|
|
||||||
|
|
||||||
BDEPEND="virtual/pkgconfig"
|
|
||||||
|
|
||||||
PHP_MV="$(ver_cut 1)"
|
|
||||||
|
|
||||||
PATCHES=( "${FILESDIR}/php-iodbc-header-location.patch" )
|
|
||||||
|
|
||||||
php_install_ini() {
|
|
||||||
local phpsapi="${1}"
|
|
||||||
|
|
||||||
# work out where we are installing the ini file
|
|
||||||
php_set_ini_dir "${phpsapi}"
|
|
||||||
|
|
||||||
# Always install the production INI file, bug 611214.
|
|
||||||
local phpinisrc="php.ini-production-${phpsapi}"
|
|
||||||
cp php.ini-production "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# default to /tmp for save_path, bug #282768
|
|
||||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# Set the extension dir
|
|
||||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
|
|
||||||
-i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
# Set the include path to point to where we want to find PEAR packages
|
|
||||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
|
|
||||||
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
newins "${phpinisrc}" php.ini
|
|
||||||
|
|
||||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
elog
|
|
||||||
|
|
||||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
|
||||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
|
||||||
|
|
||||||
if use opcache; then
|
|
||||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
|
||||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
|
|
||||||
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
|
||||||
dosym "../ext/opcache.ini" \
|
|
||||||
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# SAPI-specific handling
|
|
||||||
if [[ "${sapi}" == "fpm" ]] ; then
|
|
||||||
einfo "Installing FPM config files php-fpm.conf and www.conf"
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
|
||||||
doins sapi/fpm/php-fpm.conf
|
|
||||||
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
|
|
||||||
doins sapi/fpm/www.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
dodoc php.ini-{development,production}
|
|
||||||
}
|
|
||||||
|
|
||||||
php_set_ini_dir() {
|
|
||||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
|
||||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
|
||||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# In php-7.x, the FPM pool configuration files have been split off
|
|
||||||
# of the main config. By default the pool config files go in
|
|
||||||
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
|
|
||||||
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
|
|
||||||
# we'll install the pool configuration file "www.conf" there.
|
|
||||||
php_set_ini_dir fpm
|
|
||||||
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
|
|
||||||
sapi/fpm/php-fpm.conf.in \
|
|
||||||
|| die 'failed to move the include directory in php-fpm.conf'
|
|
||||||
|
|
||||||
# Emulate buildconf to support cross-compilation
|
|
||||||
rm -fr aclocal.m4 autom4te.cache config.cache \
|
|
||||||
configure main/php_config.h.in || die
|
|
||||||
eautoconf --force
|
|
||||||
eautoheader
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
|
||||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
|
||||||
|
|
||||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
|
||||||
|
|
||||||
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
|
|
||||||
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
|
|
||||||
local our_conf=(
|
|
||||||
--prefix="${PHP_DESTDIR}"
|
|
||||||
--mandir="${PHP_DESTDIR}/man"
|
|
||||||
--infodir="${PHP_DESTDIR}/info"
|
|
||||||
--libdir="${PHP_DESTDIR}/lib"
|
|
||||||
--with-libdir="$(get_libdir)"
|
|
||||||
--localstatedir="${EPREFIX}/var"
|
|
||||||
--without-pear
|
|
||||||
$(use_enable threads zts)
|
|
||||||
)
|
|
||||||
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with argon2 password-argon2 "${EPREFIX}/usr")
|
|
||||||
$(use_enable bcmath)
|
|
||||||
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
|
||||||
$(use_enable calendar)
|
|
||||||
$(use_enable coverage gcov)
|
|
||||||
$(use_enable ctype)
|
|
||||||
$(use_with curl)
|
|
||||||
$(use_enable xml dom)
|
|
||||||
$(use_with enchant)
|
|
||||||
$(use_enable exif)
|
|
||||||
$(use_with ffi)
|
|
||||||
$(use_enable fileinfo)
|
|
||||||
$(use_enable filter)
|
|
||||||
$(use_enable ftp)
|
|
||||||
$(use_with nls gettext "${EPREFIX}/usr")
|
|
||||||
$(use_with gmp gmp "${EPREFIX}/usr")
|
|
||||||
$(use_with mhash mhash "${EPREFIX}/usr")
|
|
||||||
$(use_with iconv iconv \
|
|
||||||
$(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
|
|
||||||
$(use_enable intl)
|
|
||||||
$(use_enable ipv6)
|
|
||||||
$(use_with kerberos)
|
|
||||||
$(use_with xml libxml)
|
|
||||||
$(use_enable unicode mbstring)
|
|
||||||
$(use_with ssl openssl)
|
|
||||||
$(use_enable pcntl)
|
|
||||||
$(use_enable phar)
|
|
||||||
$(use_enable pdo)
|
|
||||||
$(use_enable opcache)
|
|
||||||
$(use_with postgres pgsql "${EPREFIX}/usr")
|
|
||||||
$(use_enable posix)
|
|
||||||
$(use_with spell pspell "${EPREFIX}/usr")
|
|
||||||
$(use_enable simplexml)
|
|
||||||
$(use_enable sharedmem shmop)
|
|
||||||
$(use_with snmp snmp "${EPREFIX}/usr")
|
|
||||||
$(use_enable soap)
|
|
||||||
$(use_enable sockets)
|
|
||||||
$(use_with sodium)
|
|
||||||
$(use_with sqlite sqlite3)
|
|
||||||
$(use_enable sysvipc sysvmsg)
|
|
||||||
$(use_enable sysvipc sysvsem)
|
|
||||||
$(use_enable sysvipc sysvshm)
|
|
||||||
$(use_with tidy tidy "${EPREFIX}/usr")
|
|
||||||
$(use_enable tokenizer)
|
|
||||||
$(use_enable xml)
|
|
||||||
$(use_enable xmlreader)
|
|
||||||
$(use_enable xmlwriter)
|
|
||||||
$(use_with xslt xsl)
|
|
||||||
$(use_with zip)
|
|
||||||
$(use_with zlib zlib "${EPREFIX}/usr")
|
|
||||||
$(use_enable debug)
|
|
||||||
)
|
|
||||||
|
|
||||||
# DBA support
|
|
||||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
|
||||||
|| use qdbm || use lmdb || use tokyocabinet ; then
|
|
||||||
our_conf+=( "--enable-dba" )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# DBA drivers support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with cdb)
|
|
||||||
$(use_with berkdb db4 "${EPREFIX}/usr")
|
|
||||||
$(use_enable flatfile)
|
|
||||||
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
|
||||||
$(use_enable inifile)
|
|
||||||
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
|
||||||
$(use_with tokyocabinet tcadb "${EPREFIX}/usr")
|
|
||||||
$(use_with lmdb lmdb "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Support for the GD graphics library
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with truetype freetype)
|
|
||||||
$(use_enable cjk gd-jis-conv)
|
|
||||||
$(use_with gd jpeg)
|
|
||||||
$(use_with xpm)
|
|
||||||
$(use_with webp)
|
|
||||||
)
|
|
||||||
# enable gd last, so configure can pick up the previous settings
|
|
||||||
our_conf+=( $(use_enable gd) )
|
|
||||||
|
|
||||||
# IMAP support
|
|
||||||
if use imap ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with imap imap "${EPREFIX}/usr")
|
|
||||||
$(use_with ssl imap-ssl "${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# LDAP support
|
|
||||||
if use ldap ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with ldap ldap "${EPREFIX}/usr")
|
|
||||||
$(use_with ldap-sasl)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# MySQL support
|
|
||||||
local mysqllib="mysqlnd"
|
|
||||||
local mysqlilib="mysqlnd"
|
|
||||||
|
|
||||||
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
|
|
||||||
|
|
||||||
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
|
||||||
if use mysql || use mysqli ; then
|
|
||||||
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ODBC support
|
|
||||||
if use odbc && use iodbc ; then
|
|
||||||
our_conf+=(
|
|
||||||
--without-unixODBC
|
|
||||||
--with-iodbc
|
|
||||||
$(use_with pdo pdo-odbc "iODBC,${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
elif use odbc ; then
|
|
||||||
our_conf+=(
|
|
||||||
--with-unixODBC="${EPREFIX}/usr"
|
|
||||||
--without-iodbc
|
|
||||||
$(use_with pdo pdo-odbc "unixODBC,${EPREFIX}/usr")
|
|
||||||
)
|
|
||||||
else
|
|
||||||
our_conf+=(
|
|
||||||
--without-unixODBC
|
|
||||||
--without-iodbc
|
|
||||||
--without-pdo-odbc
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Oracle support
|
|
||||||
our_conf+=( $(use_with oci8-instant-client oci8) )
|
|
||||||
|
|
||||||
# PDO support
|
|
||||||
if use pdo ; then
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with mssql pdo-dblib "${EPREFIX}/usr")
|
|
||||||
$(use_with mysql pdo-mysql "${mysqllib}")
|
|
||||||
$(use_with postgres pdo-pgsql)
|
|
||||||
$(use_with sqlite pdo-sqlite)
|
|
||||||
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
|
||||||
$(use_with oci8-instant-client pdo-oci)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# readline/libedit support
|
|
||||||
our_conf+=(
|
|
||||||
$(use_with readline readline "${EPREFIX}/usr")
|
|
||||||
$(use_with libedit)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Session support
|
|
||||||
if use session ; then
|
|
||||||
our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
|
|
||||||
else
|
|
||||||
our_conf+=( $(use_enable session) )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use pic for shared modules such as apache2's mod_php
|
|
||||||
our_conf+=( --with-pic )
|
|
||||||
|
|
||||||
# we use the system copy of pcre
|
|
||||||
# --with-external-pcre affects ext/pcre
|
|
||||||
# Many arches don't support pcre-jit
|
|
||||||
our_conf+=(
|
|
||||||
--with-external-pcre
|
|
||||||
--without-pcre-jit
|
|
||||||
)
|
|
||||||
|
|
||||||
# Catch CFLAGS problems
|
|
||||||
# Fixes bug #14067.
|
|
||||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
|
||||||
replace-cpu-flags "k6*" "i586"
|
|
||||||
|
|
||||||
# Cache the ./configure test results between SAPIs.
|
|
||||||
our_conf+=( --cache-file="${T}/config.cache" )
|
|
||||||
|
|
||||||
# Support user-passed configuration parameters
|
|
||||||
our_conf+=( ${EXTRA_ECONF:-} )
|
|
||||||
|
|
||||||
# Support the Apache2 extras, they must be set globally for all
|
|
||||||
# SAPIs to work correctly, especially for external PHP extensions
|
|
||||||
|
|
||||||
local one_sapi
|
|
||||||
local sapi
|
|
||||||
mkdir -p "${WORKDIR}/sapis-build" || die
|
|
||||||
for one_sapi in $SAPIS ; do
|
|
||||||
use "${one_sapi}" || continue
|
|
||||||
php_set_ini_dir "${one_sapi}"
|
|
||||||
|
|
||||||
# The BUILD_DIR variable is used to determine where to output
|
|
||||||
# the files that autotools creates. This was all originally
|
|
||||||
# based on the autotools-utils eclass.
|
|
||||||
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
|
|
||||||
cp -a "${S}" "${BUILD_DIR}" || die
|
|
||||||
cd "${BUILD_DIR}" || die
|
|
||||||
|
|
||||||
local sapi_conf=(
|
|
||||||
--with-config-file-path="${PHP_INI_DIR}"
|
|
||||||
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
|
|
||||||
)
|
|
||||||
|
|
||||||
for sapi in $SAPIS ; do
|
|
||||||
case "$sapi" in
|
|
||||||
cli|cgi|embed|fpm|phpdbg)
|
|
||||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=( "--enable-${sapi}" )
|
|
||||||
if [[ "fpm" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=(
|
|
||||||
$(use_with acl fpm-acl)
|
|
||||||
$(use_with systemd fpm-systemd)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
sapi_conf+=( "--disable-${sapi}" )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
apache2)
|
|
||||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
|
||||||
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
|
|
||||||
else
|
|
||||||
sapi_conf+=( --without-apxs2 )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Construct the $myeconfargs array by concatenating $our_conf
|
|
||||||
# (the common args) and $sapi_conf (the SAPI-specific args).
|
|
||||||
local myeconfargs=( "${our_conf[@]}" )
|
|
||||||
myeconfargs+=( "${sapi_conf[@]}" )
|
|
||||||
|
|
||||||
pushd "${BUILD_DIR}" > /dev/null || die
|
|
||||||
econf "${myeconfargs[@]}"
|
|
||||||
popd > /dev/null || die
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# snmp seems to run during src_compile, too (bug #324739)
|
|
||||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
|
||||||
addpredict /var/lib/net-snmp/mib_indexes #nowarn
|
|
||||||
|
|
||||||
local sapi
|
|
||||||
for sapi in ${SAPIS} ; do
|
|
||||||
if use "${sapi}"; then
|
|
||||||
cd "${WORKDIR}/sapis-build/$sapi" || \
|
|
||||||
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
|
||||||
emake
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# see bug #324739 for what happens when we don't have that
|
|
||||||
addpredict /usr/share/snmp/mibs/.index #nowarn
|
|
||||||
|
|
||||||
# grab the first SAPI that got built and install common files from there
|
|
||||||
local first_sapi="", sapi=""
|
|
||||||
for sapi in $SAPIS ; do
|
|
||||||
if use $sapi ; then
|
|
||||||
first_sapi=$sapi
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Makefile forgets to create this before trying to write to it...
|
|
||||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
|
||||||
|
|
||||||
# Install php environment (without any sapis)
|
|
||||||
cd "${WORKDIR}/sapis-build/$first_sapi" || die
|
|
||||||
emake INSTALL_ROOT="${D}" \
|
|
||||||
install-build install-headers install-programs
|
|
||||||
|
|
||||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
|
||||||
|
|
||||||
# Create the directory where we'll put version-specific php scripts
|
|
||||||
keepdir "/usr/share/php${PHP_MV}"
|
|
||||||
|
|
||||||
local file=""
|
|
||||||
local sapi_list=""
|
|
||||||
|
|
||||||
for sapi in ${SAPIS}; do
|
|
||||||
if use "${sapi}" ; then
|
|
||||||
einfo "Installing SAPI: ${sapi}"
|
|
||||||
cd "${WORKDIR}/sapis-build/${sapi}" || die
|
|
||||||
|
|
||||||
if [[ "${sapi}" == "apache2" ]] ; then
|
|
||||||
# We're specifically not using emake install-sapi as libtool
|
|
||||||
# may cause unnecessary relink failures (see bug #351266)
|
|
||||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
|
||||||
newins ".libs/libphp$(get_libname)" \
|
|
||||||
"libphp${PHP_MV}$(get_libname)"
|
|
||||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
|
||||||
else
|
|
||||||
# needed each time, php_install_ini would reset it
|
|
||||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
|
||||||
into "${dest}"
|
|
||||||
case "$sapi" in
|
|
||||||
cli)
|
|
||||||
source="sapi/cli/php"
|
|
||||||
# Install the "phar" archive utility.
|
|
||||||
if use phar ; then
|
|
||||||
emake INSTALL_ROOT="${D}" install-pharcmd
|
|
||||||
dosym "..${dest#/usr}/bin/phar" "/usr/bin/phar${SLOT}"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
cgi)
|
|
||||||
source="sapi/cgi/php-cgi"
|
|
||||||
;;
|
|
||||||
fpm)
|
|
||||||
source="sapi/fpm/php-fpm"
|
|
||||||
;;
|
|
||||||
embed)
|
|
||||||
source="libs/libphp$(get_libname)"
|
|
||||||
;;
|
|
||||||
phpdbg)
|
|
||||||
source="sapi/phpdbg/phpdbg"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "unhandled sapi in src_install"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
|
||||||
dolib.so "${source}"
|
|
||||||
else
|
|
||||||
dobin "${source}"
|
|
||||||
local name="$(basename ${source})"
|
|
||||||
dosym "..${dest#/usr}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
php_install_ini "${sapi}"
|
|
||||||
|
|
||||||
# construct correct SAPI string for php-config
|
|
||||||
# thanks to ferringb for the bash voodoo
|
|
||||||
if [[ "${sapi}" == "apache2" ]]; then
|
|
||||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
|
||||||
else
|
|
||||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Installing opcache module
|
|
||||||
if use opcache ; then
|
|
||||||
into "${PHP_DESTDIR#${EPREFIX}}"
|
|
||||||
dolib.so "modules/opcache$(get_libname)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install env.d files
|
|
||||||
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
|
|
||||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
|
||||||
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
|
|
||||||
|
|
||||||
# set php-config variable correctly (bug #278439)
|
|
||||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
|
||||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
|
|
||||||
|
|
||||||
if use fpm ; then
|
|
||||||
if use systemd; then
|
|
||||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
|
|
||||||
"php-fpm@${SLOT}.service"
|
|
||||||
else
|
|
||||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
|
|
||||||
"php-fpm@${SLOT}.service"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
|
||||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
|
||||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
|
||||||
ewarn "Test phase requires USE=cli, skipping"
|
|
||||||
return
|
|
||||||
else
|
|
||||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
|
|
||||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
|
|
||||||
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
|
|
||||||
"session.save_path=${T}" \
|
|
||||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
|
|
||||||
"session.save_path=${T}"
|
|
||||||
|
|
||||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
|
||||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
|
|
||||||
done
|
|
||||||
|
|
||||||
local failed="$(find -name '*.out')"
|
|
||||||
if [[ ${failed} != "" ]] ; then
|
|
||||||
ewarn "The following test cases failed unexpectedly:"
|
|
||||||
for name in ${failed}; do
|
|
||||||
ewarn " ${name/.out/}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "No unexpected test failures, all fine"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
|
||||||
local passed=""
|
|
||||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
|
||||||
[[ -f "${name}.diff" ]] && continue
|
|
||||||
passed="${passed} ${name}"
|
|
||||||
done
|
|
||||||
if [[ ${passed} != "" ]] ; then
|
|
||||||
einfo "The following test cases passed unexpectedly:"
|
|
||||||
for name in ${passed}; do
|
|
||||||
ewarn " ${passed}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "None of the known-to-fail tests passed, all fine"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
# Output some general info to the user
|
|
||||||
if use apache2 ; then
|
|
||||||
elog
|
|
||||||
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
|
|
||||||
elog "your apache2 command. OpenRC users can append that string to"
|
|
||||||
elog "APACHE2_OPTS in /etc/conf.d/apache2."
|
|
||||||
elog
|
|
||||||
elog "The apache module configuration file 70_mod_php.conf is"
|
|
||||||
elog "provided (and maintained) by eselect-php."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create the symlinks for php
|
|
||||||
local m
|
|
||||||
for m in ${SAPIS}; do
|
|
||||||
[[ ${m} == 'embed' ]] && continue;
|
|
||||||
if use $m ; then
|
|
||||||
local ci=$(eselect php show $m)
|
|
||||||
if [[ -z $ci ]]; then
|
|
||||||
eselect php set $m php${SLOT} || die
|
|
||||||
einfo "Switched ${m} to use php:${SLOT}"
|
|
||||||
einfo
|
|
||||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
|
||||||
elog "To switch $m to use php:${SLOT}, run"
|
|
||||||
elog " eselect php set $m php${SLOT}"
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Remove dead symlinks for SAPIs that were just disabled. For
|
|
||||||
# example, if the user has the cgi SAPI enabled, then he has an
|
|
||||||
# eselect-php symlink for it. If he later reinstalls PHP with
|
|
||||||
# USE="-cgi", that symlink will break. This call to eselect is
|
|
||||||
# supposed to remove that dead link per bug 572436.
|
|
||||||
eselect php cleanup || die
|
|
||||||
|
|
||||||
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
|
|
||||||
elog "To build extensions for this version of PHP, you will need to"
|
|
||||||
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Warn about the removal of PHP_INI_VERSION if the user has it set.
|
|
||||||
if [[ -n "${PHP_INI_VERSION}" ]]; then
|
|
||||||
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
|
|
||||||
ewarn 'remove it from your configuration at your convenience. See'
|
|
||||||
ewarn
|
|
||||||
ewarn ' https://bugs.gentoo.org/611214'
|
|
||||||
ewarn
|
|
||||||
ewarn 'for more information.'
|
|
||||||
fi
|
|
||||||
|
|
||||||
elog "For details on how version slotting works, please see"
|
|
||||||
elog "the wiki:"
|
|
||||||
elog
|
|
||||||
elog " https://wiki.gentoo.org/wiki/PHP"
|
|
||||||
elog
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
# This serves two purposes. First, if we have just removed the last
|
|
||||||
# installed version of PHP, then this will remove any dead symlinks
|
|
||||||
# belonging to eselect-php. Second, if a user upgrades slots from
|
|
||||||
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
|
|
||||||
# his existing symlinks to point to the new 7.0 installation. The
|
|
||||||
# latter is bug 432962.
|
|
||||||
#
|
|
||||||
# Note: the eselect-php package may not be installed at this point,
|
|
||||||
# so we can't die() if this command fails.
|
|
||||||
eselect php cleanup
|
|
||||||
}
|
|
Binary file not shown.
@ -1 +1,2 @@
|
|||||||
DIST distorm3-3.5.1.tar.gz 137638 BLAKE2B cecd29dd30a78514e8f8275fef6d0d8338f8d3f5c22b9b48abf2a156b9dc14626455db92172a9bcf6ce36fab8975149395437697a464ce8dd7fb73e9acfcad9d SHA512 0f4cc669c0c562f8458f29d7d6c5d6c308e4681c1c1737d9d81dd2d02e11e5af236b7084d1b24980d1bd0fac514a043bb83d3b6c499b731d43cb4b7458172c48
|
DIST distorm3-3.5.1.tar.gz 137638 BLAKE2B cecd29dd30a78514e8f8275fef6d0d8338f8d3f5c22b9b48abf2a156b9dc14626455db92172a9bcf6ce36fab8975149395437697a464ce8dd7fb73e9acfcad9d SHA512 0f4cc669c0c562f8458f29d7d6c5d6c308e4681c1c1737d9d81dd2d02e11e5af236b7084d1b24980d1bd0fac514a043bb83d3b6c499b731d43cb4b7458172c48
|
||||||
|
DIST distorm3-3.5.2.tar.gz 138371 BLAKE2B 76cc9c987d53a5c7336632ee96878df62865a862bba9b3d07fa95cd585aff428a0187033b78e0731f14a24cc37d7d19f290b2ca06a5a3dd6ee8116a0e68678c8 SHA512 bc08a12f87e6bf22ff9bbba8a34b88b0988b80ddec405c669ba5cd863545128f8b3df4b122a69f4849af3d08818c836b368332e6546871bdfee99e611b3f8d19
|
@ -0,0 +1,27 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{7,8,9} )
|
||||||
|
|
||||||
|
inherit distutils-r1
|
||||||
|
|
||||||
|
DESCRIPTION="The ultimate disassembler library (X86-32, X86-64)"
|
||||||
|
HOMEPAGE="http://www.ragestorm.net/distorm/"
|
||||||
|
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||||
|
|
||||||
|
DEPEND=""
|
||||||
|
RDEPEND=""
|
||||||
|
|
||||||
|
LICENSE="BSD-4"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
python_install() {
|
||||||
|
distutils-r1_python_install
|
||||||
|
|
||||||
|
# don't know why it does not happen by default
|
||||||
|
python_optimize
|
||||||
|
}
|
@ -1,3 +1,2 @@
|
|||||||
DIST expat-2.2.10.tar.xz 425432 BLAKE2B 5d84d7dec5aae6ca7906bd2a2b8a249457111e064295b83b6c9927b5ef0dc97e7220bac1da17781e24541259ae81b60a2314cd372bfbdfc2e08fab082377df4a SHA512 a8e0c8a9cf7e6fbacdc6e709f3c99c533ab550fba52557d24259bb8b360f9697624c7500c0e9886fa57ee2b529aadd0d1835d66fe8112e15c20df75cd3eb090f
|
DIST expat-2.2.10.tar.xz 425432 BLAKE2B 5d84d7dec5aae6ca7906bd2a2b8a249457111e064295b83b6c9927b5ef0dc97e7220bac1da17781e24541259ae81b60a2314cd372bfbdfc2e08fab082377df4a SHA512 a8e0c8a9cf7e6fbacdc6e709f3c99c533ab550fba52557d24259bb8b360f9697624c7500c0e9886fa57ee2b529aadd0d1835d66fe8112e15c20df75cd3eb090f
|
||||||
DIST expat-2.2.8.tar.xz 422324 BLAKE2B 1f3e8bbce7f05aa080ca647d12a4ff9bf6d21cd31366d70daabcf8db48985e0b644faac5e251e0a559a74f0a27b247ede64b6f117940a5f7f70dc1cce0f0036a SHA512 102a3af89af37a961f81ade2dfb4f3e13bf779110decff9f1462f21079aa6959009871c39b933d9bf47ebc3ee50d3f8d5b41859dce833d290f17886a2aa80aa9
|
DIST expat-2.3.0.tar.xz 433508 BLAKE2B b547cbca23f2ca11bef326225b8e2958a3539dbb14789c33fb0f2aede35bfbe12981d151624b0497ab2ad488ec06529ae2a996e514b19b39622ae7fc29f47832 SHA512 dde8a9a094b18d795a0e86ca4aa68488b352dc67019e0d669e8b910ed149628de4c2a49bc3a5b832f624319336a01f9e4debe03433a43e1c420f36356d886820
|
||||||
DIST expat-2.2.9.tar.xz 422460 BLAKE2B ea0e0bd005bbfd355e819e2b157859878a20ad9a6807cc5a10a6656f062e2443adb483adb0452d751b3d460834e3f613b8ecf7cdaf743be1b15815d005d01fa6 SHA512 e082874efcc4b00709e2c0192c88fb15dfc4f33fc3a2b09e619b010ea93baaf7e7572683f738463db0ce2350cab3de48a0c38af6b74d1c4f5a9e311f499edab0
|
|
||||||
|
@ -1,98 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
AUTOTOOLS_AUTO_DEPEND=no
|
|
||||||
inherit autotools eutils libtool multilib toolchain-funcs multilib-minimal usr-ldscript
|
|
||||||
|
|
||||||
DESCRIPTION="Stream-oriented XML parser library"
|
|
||||||
HOMEPAGE="https://libexpat.github.io/"
|
|
||||||
SRC_URI="https://github.com/libexpat/libexpat/releases/download/R_${PV//\./_}/expat-${PV}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
|
|
||||||
IUSE="elibc_FreeBSD examples static-libs unicode"
|
|
||||||
BDEPEND="unicode? ( ${AUTOTOOLS_DEPEND} )"
|
|
||||||
|
|
||||||
DOCS=( README.md )
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# fix interpreter to be a recent/good shell
|
|
||||||
sed -i -e "1s:/bin/sh:${BASH}:" conftools/get-version.sh || die
|
|
||||||
if use unicode; then
|
|
||||||
cp -R "${S}" "${S}"w || die
|
|
||||||
pushd "${S}"w >/dev/null
|
|
||||||
find -name Makefile.am \
|
|
||||||
-exec sed \
|
|
||||||
-e 's,libexpat\.la,libexpatw.la,' \
|
|
||||||
-e 's,libexpat_la,libexpatw_la,' \
|
|
||||||
-i {} + || die
|
|
||||||
eautoreconf
|
|
||||||
popd >/dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_configure() {
|
|
||||||
local myconf="$(use_enable static-libs static) --without-docbook"
|
|
||||||
|
|
||||||
mkdir -p "${BUILD_DIR}"w || die
|
|
||||||
|
|
||||||
if use unicode; then
|
|
||||||
pushd "${BUILD_DIR}"w >/dev/null
|
|
||||||
CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}"w econf ${myconf}
|
|
||||||
popd >/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
ECONF_SOURCE="${S}" econf ${myconf}
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_compile() {
|
|
||||||
emake
|
|
||||||
|
|
||||||
if use unicode; then
|
|
||||||
pushd "${BUILD_DIR}"w >/dev/null
|
|
||||||
emake -C lib
|
|
||||||
popd >/dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_install() {
|
|
||||||
emake install DESTDIR="${D}"
|
|
||||||
|
|
||||||
if use unicode; then
|
|
||||||
pushd "${BUILD_DIR}"w >/dev/null
|
|
||||||
emake -C lib install DESTDIR="${D}"
|
|
||||||
popd >/dev/null
|
|
||||||
|
|
||||||
pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
|
|
||||||
cp expat.pc expatw.pc
|
|
||||||
sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
|
|
||||||
popd >/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
if multilib_is_native_abi ; then
|
|
||||||
# libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
|
|
||||||
# we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
|
|
||||||
use elibc_FreeBSD && gen_usr_ldscript -a expat
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_install_all() {
|
|
||||||
einstalldocs
|
|
||||||
|
|
||||||
doman doc/xmlwf.1
|
|
||||||
|
|
||||||
# Note: Use of HTML_DOCS would add unwanted "doc" subfolder
|
|
||||||
docinto html
|
|
||||||
dodoc doc/*.{css,html,png}
|
|
||||||
|
|
||||||
if use examples; then
|
|
||||||
insinto /usr/share/doc/${PF}/examples
|
|
||||||
doins examples/*.c
|
|
||||||
fi
|
|
||||||
|
|
||||||
find "${D}" -name '*.la' -type f -delete || die
|
|
||||||
}
|
|
@ -0,0 +1,326 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="7"
|
||||||
|
|
||||||
|
inherit flag-o-matic toolchain-funcs multilib multilib-minimal
|
||||||
|
|
||||||
|
MY_P=${P/_/-}
|
||||||
|
|
||||||
|
# This patch set is based on the following files from Fedora 31,
|
||||||
|
# see https://src.fedoraproject.org/rpms/openssl/blob/f31/f/openssl.spec
|
||||||
|
# for more details:
|
||||||
|
# - hobble-openssl (SOURCE1)
|
||||||
|
# - ec_curve.c (SOURCE12) -- MODIFIED
|
||||||
|
# - ectest.c (SOURCE13)
|
||||||
|
# - openssl-1.1.1-ec-curves.patch (PATCH37) -- MODIFIED
|
||||||
|
BINDIST_PATCH_SET="openssl-1.1.1i-bindist-1.0.tar.xz"
|
||||||
|
|
||||||
|
DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
|
||||||
|
HOMEPAGE="https://www.openssl.org/"
|
||||||
|
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
|
||||||
|
bindist? (
|
||||||
|
mirror://gentoo/${BINDIST_PATCH_SET}
|
||||||
|
https://dev.gentoo.org/~whissi/dist/openssl/${BINDIST_PATCH_SET}
|
||||||
|
)"
|
||||||
|
|
||||||
|
LICENSE="openssl"
|
||||||
|
SLOT="0/1.1" # .so version of libssl/libcrypto
|
||||||
|
[[ "${PV}" = *_pre* ]] || \
|
||||||
|
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
|
||||||
|
IUSE="+asm bindist elibc_musl rfc3779 sctp cpu_flags_x86_sse2 sslv3 static-libs test tls-heartbeat vanilla zlib"
|
||||||
|
RESTRICT="!bindist? ( bindist )
|
||||||
|
!test? ( test )"
|
||||||
|
|
||||||
|
RDEPEND=">=app-misc/c_rehash-1.7-r1
|
||||||
|
zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
BDEPEND="
|
||||||
|
>=dev-lang/perl-5
|
||||||
|
sctp? ( >=net-misc/lksctp-tools-1.0.12 )
|
||||||
|
test? (
|
||||||
|
sys-apps/diffutils
|
||||||
|
sys-devel/bc
|
||||||
|
sys-process/procps
|
||||||
|
)"
|
||||||
|
PDEPEND="app-misc/ca-certificates"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-1.1.0j-parallel_install_fix.patch #671602
|
||||||
|
"${FILESDIR}"/${PN}-1.1.1i-riscv32.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
# force upgrade to prevent broken login, bug 696950
|
||||||
|
RDEPEND+=" !<net-misc/openssh-8.0_p1-r3"
|
||||||
|
|
||||||
|
MULTILIB_WRAPPED_HEADERS=(
|
||||||
|
usr/include/openssl/opensslconf.h
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
[[ ${MERGE_TYPE} == binary ]] && return
|
||||||
|
|
||||||
|
# must check in pkg_setup; sysctl don't work with userpriv!
|
||||||
|
if has test ${FEATURES} && use sctp; then
|
||||||
|
# test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel"
|
||||||
|
# if sctp.auth_enable is not enabled.
|
||||||
|
local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null)
|
||||||
|
if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]]; then
|
||||||
|
die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# allow openssl to be cross-compiled
|
||||||
|
cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die
|
||||||
|
chmod a+rx gentoo.config || die
|
||||||
|
|
||||||
|
if use bindist; then
|
||||||
|
mv "${WORKDIR}"/bindist-patches/hobble-openssl "${WORKDIR}" || die
|
||||||
|
bash "${WORKDIR}"/hobble-openssl || die
|
||||||
|
|
||||||
|
cp -f "${WORKDIR}"/bindist-patches/ec_curve.c "${S}"/crypto/ec/ || die
|
||||||
|
cp -f "${WORKDIR}"/bindist-patches/ectest.c "${S}"/test/ || die
|
||||||
|
|
||||||
|
eapply "${WORKDIR}"/bindist-patches/ec-curves.patch
|
||||||
|
|
||||||
|
local known_failing_test
|
||||||
|
for known_failing_test in \
|
||||||
|
30-test_evp_extra.t \
|
||||||
|
80-test_ssl_new.t \
|
||||||
|
; do
|
||||||
|
ebegin "Disabling test '${known_failing_test}' which is known to fail with USE=bindist"
|
||||||
|
rm test/recipes/${known_failing_test} || die
|
||||||
|
eend $?
|
||||||
|
done
|
||||||
|
|
||||||
|
# Also see the configure parts below:
|
||||||
|
# enable-ec \
|
||||||
|
# $(use_ssl !bindist ec2m) \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# keep this in sync with app-misc/c_rehash
|
||||||
|
SSL_CNF_DIR="/etc/ssl"
|
||||||
|
|
||||||
|
# Make sure we only ever touch Makefile.org and avoid patching a file
|
||||||
|
# that gets blown away anyways by the Configure script in src_configure
|
||||||
|
rm -f Makefile
|
||||||
|
|
||||||
|
if ! use vanilla ; then
|
||||||
|
if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]] ; then
|
||||||
|
[[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
eapply_user #332661
|
||||||
|
|
||||||
|
if has test ${FEATURES} && use sctp && has network-sandbox ${FEATURES}; then
|
||||||
|
ebegin "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox"
|
||||||
|
rm test/recipes/80-test_ssl_new.t || die
|
||||||
|
eend $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
# make sure the man pages are suffixed #302165
|
||||||
|
# don't bother building man pages if they're disabled
|
||||||
|
# Make DOCDIR Gentoo compliant
|
||||||
|
sed -i \
|
||||||
|
-e '/^MANSUFFIX/s:=.*:=ssl:' \
|
||||||
|
-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
|
||||||
|
-e $(has noman FEATURES \
|
||||||
|
&& echo '/^install:/s:install_docs::' \
|
||||||
|
|| echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \
|
||||||
|
-e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \
|
||||||
|
Configurations/unix-Makefile.tmpl \
|
||||||
|
|| die
|
||||||
|
|
||||||
|
# quiet out unknown driver argument warnings since openssl
|
||||||
|
# doesn't have well-split CFLAGS and we're making it even worse
|
||||||
|
# and 'make depend' uses -Werror for added fun (#417795 again)
|
||||||
|
[[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
|
||||||
|
|
||||||
|
append-flags -fno-strict-aliasing
|
||||||
|
append-flags $(test-flags-CC -Wa,--noexecstack)
|
||||||
|
append-cppflags -DOPENSSL_NO_BUF_FREELISTS
|
||||||
|
|
||||||
|
# Prefixify Configure shebang (#141906)
|
||||||
|
sed \
|
||||||
|
-e "1s,/usr/bin/env,${EPREFIX}&," \
|
||||||
|
-i Configure || die
|
||||||
|
# Remove test target when FEATURES=test isn't set
|
||||||
|
if ! use test ; then
|
||||||
|
sed \
|
||||||
|
-e '/^$config{dirs}/s@ "test",@@' \
|
||||||
|
-i Configure || die
|
||||||
|
fi
|
||||||
|
# The config script does stupid stuff to prompt the user. Kill it.
|
||||||
|
sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
|
||||||
|
./config --test-sanity || die "I AM NOT SANE"
|
||||||
|
|
||||||
|
multilib_copy_sources
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_configure() {
|
||||||
|
unset APPS #197996
|
||||||
|
unset SCRIPTS #312551
|
||||||
|
unset CROSS_COMPILE #311473
|
||||||
|
|
||||||
|
tc-export CC AR RANLIB RC
|
||||||
|
|
||||||
|
# Clean out patent-or-otherwise-encumbered code
|
||||||
|
# Camellia: Royalty Free https://en.wikipedia.org/wiki/Camellia_(cipher)
|
||||||
|
# IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
|
||||||
|
# EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
|
||||||
|
# MDC2: Expired https://en.wikipedia.org/wiki/MDC-2
|
||||||
|
# RC5: Expired https://en.wikipedia.org/wiki/RC5
|
||||||
|
|
||||||
|
use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
|
||||||
|
echoit() { echo "$@" ; "$@" ; }
|
||||||
|
|
||||||
|
local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
|
||||||
|
|
||||||
|
# See if our toolchain supports __uint128_t. If so, it's 64bit
|
||||||
|
# friendly and can use the nicely optimized code paths. #460790
|
||||||
|
local ec_nistp_64_gcc_128
|
||||||
|
# Disable it for now though #469976
|
||||||
|
#if ! use bindist ; then
|
||||||
|
# echo "__uint128_t i;" > "${T}"/128.c
|
||||||
|
# if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then
|
||||||
|
# ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
|
||||||
|
# fi
|
||||||
|
#fi
|
||||||
|
|
||||||
|
local sslout=$(./gentoo.config)
|
||||||
|
einfo "Use configuration ${sslout:-(openssl knows best)}"
|
||||||
|
local config="Configure"
|
||||||
|
[[ -z ${sslout} ]] && config="config"
|
||||||
|
|
||||||
|
# Fedora hobbled-EC needs 'no-ec2m'
|
||||||
|
# 'srp' was restricted until early 2017 as well.
|
||||||
|
# "disable-deprecated" option breaks too many consumers.
|
||||||
|
# Don't set it without thorough revdeps testing.
|
||||||
|
# Make sure user flags don't get added *yet* to avoid duplicated
|
||||||
|
# flags.
|
||||||
|
CFLAGS= LDFLAGS= echoit \
|
||||||
|
./${config} \
|
||||||
|
${sslout} \
|
||||||
|
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
|
||||||
|
enable-camellia \
|
||||||
|
enable-ec \
|
||||||
|
$(use_ssl !bindist ec2m) \
|
||||||
|
$(use_ssl !bindist sm2) \
|
||||||
|
enable-srp \
|
||||||
|
$(use elibc_musl && echo "no-async") \
|
||||||
|
${ec_nistp_64_gcc_128} \
|
||||||
|
enable-idea \
|
||||||
|
enable-mdc2 \
|
||||||
|
enable-rc5 \
|
||||||
|
$(use_ssl sslv3 ssl3) \
|
||||||
|
$(use_ssl sslv3 ssl3-method) \
|
||||||
|
$(use_ssl asm) \
|
||||||
|
$(use_ssl rfc3779) \
|
||||||
|
$(use_ssl sctp) \
|
||||||
|
$(use_ssl tls-heartbeat heartbeats) \
|
||||||
|
$(use_ssl zlib) \
|
||||||
|
--prefix="${EPREFIX}"/usr \
|
||||||
|
--openssldir="${EPREFIX}"${SSL_CNF_DIR} \
|
||||||
|
--libdir=$(get_libdir) \
|
||||||
|
shared threads \
|
||||||
|
|| die
|
||||||
|
|
||||||
|
# Clean out hardcoded flags that openssl uses
|
||||||
|
local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
|
||||||
|
-e 's:^CFLAGS=::' \
|
||||||
|
-e 's:\(^\| \)-fomit-frame-pointer::g' \
|
||||||
|
-e 's:\(^\| \)-O[^ ]*::g' \
|
||||||
|
-e 's:\(^\| \)-march=[^ ]*::g' \
|
||||||
|
-e 's:\(^\| \)-mcpu=[^ ]*::g' \
|
||||||
|
-e 's:\(^\| \)-m[^ ]*::g' \
|
||||||
|
-e 's:^ *::' \
|
||||||
|
-e 's: *$::' \
|
||||||
|
-e 's: \+: :g' \
|
||||||
|
-e 's:\\:\\\\:g'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Now insert clean default flags with user flags
|
||||||
|
sed -i \
|
||||||
|
-e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
|
||||||
|
-e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
|
||||||
|
Makefile || die
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_compile() {
|
||||||
|
# depend is needed to use $confopts; it also doesn't matter
|
||||||
|
# that it's -j1 as the code itself serializes subdirs
|
||||||
|
emake -j1 depend
|
||||||
|
emake all
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_test() {
|
||||||
|
emake -j1 test
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_install() {
|
||||||
|
# We need to create $ED/usr on our own to avoid a race condition #665130
|
||||||
|
if [[ ! -d "${ED}/usr" ]]; then
|
||||||
|
# We can only create this directory once
|
||||||
|
mkdir "${ED}"/usr || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
emake DESTDIR="${D}" install
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_install_all() {
|
||||||
|
# openssl installs perl version of c_rehash by default, but
|
||||||
|
# we provide a shell version via app-misc/c_rehash
|
||||||
|
rm "${ED}"/usr/bin/c_rehash || die
|
||||||
|
|
||||||
|
dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el
|
||||||
|
|
||||||
|
# This is crappy in that the static archives are still built even
|
||||||
|
# when USE=static-libs. But this is due to a failing in the openssl
|
||||||
|
# build system: the static archives are built as PIC all the time.
|
||||||
|
# Only way around this would be to manually configure+compile openssl
|
||||||
|
# twice; once with shared lib support enabled and once without.
|
||||||
|
use static-libs || rm -f "${ED}"/usr/lib*/lib*.a
|
||||||
|
|
||||||
|
# create the certs directory
|
||||||
|
keepdir ${SSL_CNF_DIR}/certs
|
||||||
|
|
||||||
|
# Namespace openssl programs to prevent conflicts with other man pages
|
||||||
|
cd "${ED}"/usr/share/man || die
|
||||||
|
local m d s
|
||||||
|
for m in $(find . -type f | xargs grep -L '#include') ; do
|
||||||
|
d=${m%/*} ; d=${d#./} ; m=${m##*/}
|
||||||
|
[[ ${m} == openssl.1* ]] && continue
|
||||||
|
[[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
|
||||||
|
mv ${d}/{,ssl-}${m}
|
||||||
|
# fix up references to renamed man pages
|
||||||
|
sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
|
||||||
|
ln -s ssl-${m} ${d}/openssl-${m}
|
||||||
|
# locate any symlinks that point to this man page ... we assume
|
||||||
|
# that any broken links are due to the above renaming
|
||||||
|
for s in $(find -L ${d} -type l) ; do
|
||||||
|
s=${s##*/}
|
||||||
|
rm -f ${d}/${s}
|
||||||
|
# We don't want to "|| die" here
|
||||||
|
ln -s ssl-${m} ${d}/ssl-${s}
|
||||||
|
ln -s ssl-${s} ${d}/openssl-${s}
|
||||||
|
done
|
||||||
|
done
|
||||||
|
[[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
|
||||||
|
|
||||||
|
dodir /etc/sandbox.d #254521
|
||||||
|
echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
|
||||||
|
|
||||||
|
diropts -m0700
|
||||||
|
keepdir ${SSL_CNF_DIR}/private
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
ebegin "Running 'c_rehash ${EROOT}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069"
|
||||||
|
c_rehash "${EROOT}${SSL_CNF_DIR}/certs" >/dev/null
|
||||||
|
eend $?
|
||||||
|
}
|
Binary file not shown.
@ -1 +1,2 @@
|
|||||||
DIST luasec-0.9.tar.gz 52163 BLAKE2B fa95ae63b36f138f923dc412f527ff527e4f7562ad177ca7f450ef889e75c204d1bfec3773523fb68865c3846a0edc583cbf903db5233ff080074147f33bfb30 SHA512 ea601016328232ca0ff12be72897eeedac88a78834a63e1c36d2828a3187039665a2c60597b5af1fa6917b6fe87cd292fbcdfabcd67bab968f587e038d52a933
|
DIST luasec-0.9.tar.gz 52163 BLAKE2B fa95ae63b36f138f923dc412f527ff527e4f7562ad177ca7f450ef889e75c204d1bfec3773523fb68865c3846a0edc583cbf903db5233ff080074147f33bfb30 SHA512 ea601016328232ca0ff12be72897eeedac88a78834a63e1c36d2828a3187039665a2c60597b5af1fa6917b6fe87cd292fbcdfabcd67bab968f587e038d52a933
|
||||||
|
DIST luasec-1.0.tar.gz 52264 BLAKE2B 0537592ec9a33559c233448bee84a5b1b4e84448e89d50adbef75ba9b67c175e8a10739d727991051e48afca9bf78b0b115f70b2a341d25217b5b730a66a690f SHA512 70e81291b71111fb4976477d1c8ddbdaace17f017476b4e74b0ed88498e9e016d4ece1658f7fcce30f21aecab8dcf3734ce620940f61f2c70efb911c09a95bb9
|
||||||
|
@ -0,0 +1,88 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
LUA_COMPAT=( lua5-{1..4} luajit )
|
||||||
|
LUA_REQ_USE="deprecated(+)"
|
||||||
|
|
||||||
|
inherit lua toolchain-funcs
|
||||||
|
|
||||||
|
DESCRIPTION="Lua binding for OpenSSL library to provide TLS/SSL communication"
|
||||||
|
HOMEPAGE="https://github.com/brunoos/luasec"
|
||||||
|
SRC_URI="https://github.com/brunoos/luasec/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||||
|
IUSE="libressl"
|
||||||
|
REQUIRED_USE="${LUA_REQUIRED_USE}"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
dev-lua/luasocket[${LUA_USEDEP}]
|
||||||
|
libressl? ( dev-libs/libressl:= )
|
||||||
|
!libressl? ( dev-libs/openssl:0= )
|
||||||
|
${LUA_DEPS}
|
||||||
|
"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
BDEPEND="virtual/pkgconfig"
|
||||||
|
|
||||||
|
lua_src_prepare() {
|
||||||
|
pushd "${BUILD_DIR}" || die
|
||||||
|
|
||||||
|
${ELUA} src/options.lua -g /usr/include/openssl/ssl.h > src/options.c || die
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
# Respect users CFLAGS
|
||||||
|
sed -e 's/-O2//g' -i src/Makefile || die
|
||||||
|
|
||||||
|
lua_copy_sources
|
||||||
|
|
||||||
|
lua_foreach_impl lua_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
lua_src_compile() {
|
||||||
|
pushd "${BUILD_DIR}" || die
|
||||||
|
|
||||||
|
local myemakeargs=(
|
||||||
|
"CC=$(tc-getCC)"
|
||||||
|
"LD=$(tc-getCC)"
|
||||||
|
"INC_PATH=-I$(lua_get_include_dir)"
|
||||||
|
"LIB_PATH=$(lua_get_CFLAGS)"
|
||||||
|
"MYCFLAGS=${CFLAGS}"
|
||||||
|
"MYLDFLAGS=${LDFLAGS}"
|
||||||
|
)
|
||||||
|
|
||||||
|
emake "${myemakeargs[@]}" linux
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
lua_foreach_impl lua_src_compile
|
||||||
|
}
|
||||||
|
|
||||||
|
lua_src_install() {
|
||||||
|
pushd "${BUILD_DIR}" || die
|
||||||
|
|
||||||
|
local emakeargs=(
|
||||||
|
"DESTDIR=${ED}"
|
||||||
|
"LUAPATH=$(lua_get_lmod_dir)"
|
||||||
|
"LUACPATH=$(lua_get_cmod_dir)"
|
||||||
|
)
|
||||||
|
|
||||||
|
emake "${emakeargs[@]}" install
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
lua_foreach_impl lua_src_install
|
||||||
|
|
||||||
|
einstalldocs
|
||||||
|
}
|
@ -1,36 +0,0 @@
|
|||||||
# Copyright 2017-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit ltprune
|
|
||||||
|
|
||||||
DESCRIPTION="Lightweight C++ API library for Lua"
|
|
||||||
HOMEPAGE="https://github.com/jmmv/lutok"
|
|
||||||
SRC_URI="https://github.com/jmmv/lutok/releases/download/${P}/${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="BSD"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE="test"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
dev-lang/lua:0
|
|
||||||
"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
virtual/pkgconfig
|
|
||||||
test? (
|
|
||||||
dev-libs/atf
|
|
||||||
dev-util/kyua
|
|
||||||
)
|
|
||||||
"
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf --disable-shared --enable-static
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
default
|
|
||||||
prune_libtool_files
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
# Copyright 2017-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
DESCRIPTION="Lightweight C++ API library for Lua"
|
|
||||||
HOMEPAGE="https://github.com/jmmv/lutok"
|
|
||||||
SRC_URI="https://github.com/jmmv/lutok/releases/download/${P}/${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="BSD"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE="static-libs test"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
dev-lang/lua:0[static-libs(+)?]
|
|
||||||
"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
virtual/pkgconfig
|
|
||||||
test? (
|
|
||||||
dev-libs/atf
|
|
||||||
dev-util/kyua
|
|
||||||
)
|
|
||||||
"
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf $(use_enable static-libs static)
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
default
|
|
||||||
rm -rf "${ED}"/usr/tests || die
|
|
||||||
find "${ED}" -name '*.la' -type f -delete || die
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
|||||||
DIST amqp-1.10.2.tgz 107350 BLAKE2B dd32873d5288ced2ef2c05e6b131f35c31a3514a98d5d3cb8784a989ca1d8637c5ddc7ffa2d73f5bfc2daa4fe718ecf1f08c7ceae64d2e613ef430d18161393b SHA512 a17176bcc02d35a9686d3ca120cca98d808b2a896733f41a28b5d29d43127a0a45b012bc6566de3604f41b8bcc453408a37a8254bcf47e940ebe12bb6f4d4265
|
DIST amqp-1.10.2.tgz 107350 BLAKE2B dd32873d5288ced2ef2c05e6b131f35c31a3514a98d5d3cb8784a989ca1d8637c5ddc7ffa2d73f5bfc2daa4fe718ecf1f08c7ceae64d2e613ef430d18161393b SHA512 a17176bcc02d35a9686d3ca120cca98d808b2a896733f41a28b5d29d43127a0a45b012bc6566de3604f41b8bcc453408a37a8254bcf47e940ebe12bb6f4d4265
|
||||||
|
DIST amqp-1.11.0beta.tgz 108054 BLAKE2B 821359d165f4152e423164692b7f7faf367ae33674fd9dd08e4fa91e7b0f33924a81c81e54153e4bcd76336059691751d331059e6f61b34612aea68b4571d6b4 SHA512 e2625cf5e4f1614911d824aa8ab40600502847847808104f101fa409ad0a5df3007594e8a012620bb3ae26632fe20068905100cc2dac35973f9b8e5457d41768
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="7"
|
||||||
|
|
||||||
|
USE_PHP="php7-3 php7-4 php8-0"
|
||||||
|
|
||||||
|
inherit php-ext-pecl-r3
|
||||||
|
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
|
||||||
|
DESCRIPTION="PHP Bindings for AMQP 0-9-1 compatible brokers"
|
||||||
|
LICENSE="PHP-3.01"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
# Tests require running rabbitmq-server on localhost which requires epmd
|
||||||
|
# which only accepts /var/run/epmd.pid as pidfile.
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
|
BDEPEND="virtual/pkgconfig"
|
||||||
|
RDEPEND=">=net-libs/rabbitmq-c-0.5.2:=[ssl]"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
PHP_EXT_ECONF_ARGS=()
|
@ -1 +1,2 @@
|
|||||||
DIST gnupg-1.4.0.tgz 28349 BLAKE2B d023746b104db38bcf7617d79570aa3c38d318879d34b1d4df7fc0c28b4e435deadc2a1a4827922cc14a8068b578896e297c8fe8461afebd2768ffb63ddc502d SHA512 70fa1d2956bc5caedbeadf556f9f40a7b963d3b519d6574b0c7695d9fb4c7f9d612306f475a90a1125661407c11de97040e54b158f38d71f239c1fe436d48018
|
DIST gnupg-1.4.0.tgz 28349 BLAKE2B d023746b104db38bcf7617d79570aa3c38d318879d34b1d4df7fc0c28b4e435deadc2a1a4827922cc14a8068b578896e297c8fe8461afebd2768ffb63ddc502d SHA512 70fa1d2956bc5caedbeadf556f9f40a7b963d3b519d6574b0c7695d9fb4c7f9d612306f475a90a1125661407c11de97040e54b158f38d71f239c1fe436d48018
|
||||||
|
DIST gnupg-1.5.0RC2.tgz 36544 BLAKE2B 9362fde5090381e58eebb79b0c90c89e26d1abd3e68947497fcc760b4c8a847d9bf6535733b6c649621c585ad6a5691a2c7311e7f27185016812012acccc8a1b SHA512 55a05afe276679a8571e457351cf7dc2623b6f5c2c59f632d973d59a0feba0cca459d3fbe042e51fe64af2c400b9996e423b2f585bcc5eefbae42132865f7e82
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue