parent
a98c9b7f40
commit
284f7f050f
Binary file not shown.
Binary file not shown.
@ -1,4 +1,3 @@
|
||||
DIST sysstat-12.0.5.tar.gz 711967 BLAKE2B 96aa49d82e71407dbd99d840ca5f71af83f54ba6315c858fae71f97290e8cf9c4f5358ad6389c7489366a62667c35835151e3187382a56c98153d3a04bcc2b8d SHA512 c1061f1af35430e81e488e4b2f18b8588ec4f3c419ade004c49ca24baf60b5b76a6a59eb25f3b17b51a9f60c5833a914a514872d0235b2ca405341a2f4a32cb3
|
||||
DIST sysstat-12.0.6.tar.gz 712148 BLAKE2B 1118ce071e06c2853ffdec2be1b8b3bf060571caf988e17e04ff62cbf43e7111c5951a131d176b49ad35e1da75d2b8936e23f1a385e1c83a013b802a0fc36003 SHA512 e8f542b26c2b0b7b3aadbf34dce640879d27f8f1659447f15ffb5a210987c74840418046409403da85a9eb4c01484615d230ddc700611b7c0088d72165bffe86
|
||||
DIST sysstat-12.1.6.tar.gz 1089333 BLAKE2B 3a3c3867b6b78ca1da7d5ef5838f5aad490e6d454aff3e8db266136ce7666112bcd1ad05b727c2455c16e53f6c84e0e75e32e8f4cc9318300aa9076921f68c1c SHA512 9c03e911fd6843b1719e080fce429e0d33f73f01619251f425dd4bbcc9d2764cd9beb8f8ebb4406b9540634d36c83303c10abcf682b079d35045454b1541984d
|
||||
DIST sysstat-12.1.7.tar.gz 1213236 BLAKE2B 11e54c8ef940d057b7494fc09620f644aeb9622c41756466835e4daf14c145ff0f3a06954657c4f065f20c172659c54bfaed5b3dcf084b8bc1f8d565420c0f1f SHA512 0ee3b246619ff6e904db1359b4dc05789fe1f55759d170f78de918b001a81137823801bdcb4c9d9137c3337d38259e79ccef9c76310d361e0a81bb2731b7a3d1
|
||||
DIST sysstat-12.2.0.tar.gz 1227684 BLAKE2B 1ca5cc3f0fd5dca6655d7b483fa853bf9f0256ae5e8dabf56f698d736faadd38f64af699158f4d637d7c8564f12b0992d866e503d01c647be274fc87ee04a9b4 SHA512 2398be1d5181616c337ead8f62b6bfb1144b89c747800140503c6a94793976f7909c81b656290577d51ebdee2f380418902846271b48ed79c6d7f02306f0a8a1
|
||||
|
@ -1,81 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
inherit flag-o-matic systemd toolchain-funcs
|
||||
|
||||
DESCRIPTION="System performance tools for Linux"
|
||||
HOMEPAGE="http://pagesperso-orange.fr/sebastien.godard/"
|
||||
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
|
||||
IUSE="debug nls lm-sensors selinux static"
|
||||
|
||||
CDEPEND="
|
||||
nls? ( virtual/libintl )
|
||||
lm-sensors? ( sys-apps/lm-sensors:= )
|
||||
"
|
||||
DEPEND="
|
||||
${CDEPEND}
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-sysstat )
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-11.0.4-cron.patch
|
||||
"${FILESDIR}"/${PN}-11.7.3-flags.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if use nls; then
|
||||
strip-linguas -i nls/
|
||||
local lingua pofile
|
||||
for pofile in nls/*.po; do
|
||||
lingua=${pofile/nls\/}
|
||||
lingua=${lingua/.po}
|
||||
if ! has ${lingua} ${LINGUAS}; then
|
||||
rm "nls/${lingua}.po" || die
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export AR
|
||||
use static && append-ldflags -static
|
||||
|
||||
sa_lib_dir=/usr/lib/sa \
|
||||
conf_dir=/etc \
|
||||
econf \
|
||||
$(use_enable debug debuginfo) \
|
||||
$(use_enable lm-sensors sensors) \
|
||||
$(use_enable nls) \
|
||||
--enable-copy-only \
|
||||
--enable-documentation \
|
||||
--enable-install-cron \
|
||||
--with-systemdsystemunitdir=$(systemd_get_systemunitdir)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
keepdir /var/log/sa
|
||||
|
||||
emake \
|
||||
CHOWN=true \
|
||||
DESTDIR="${D}" \
|
||||
DOC_DIR=/usr/share/doc/${PF} \
|
||||
MANGRPARG='' \
|
||||
install
|
||||
|
||||
dodoc -r contrib/
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}.init.d ${PN}
|
||||
systemd_dounit ${PN}.service
|
||||
|
||||
rm "${D}"/usr/share/doc/${PF}/COPYING || die
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,52 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit golang-build systemd
|
||||
|
||||
DESCRIPTION="Client for keybase.io"
|
||||
HOMEPAGE="https://keybase.io/"
|
||||
SRC_URI="https://github.com/keybase/client/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0 BSD BSD-2 LGPL-3 MIT MPL-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="app-crypt/gnupg"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${P}.tar.gz"
|
||||
ln -vs "client-${PV}" "${P}" || die
|
||||
mkdir -vp "${S}/src/github.com/keybase" || die
|
||||
ln -vs "${S}" "${S}/src/github.com/keybase/client" || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
EGO_PN="github.com/keybase/client/go/keybase" \
|
||||
EGO_BUILD_FLAGS="-tags production -o ${T}/keybase" \
|
||||
golang-build_src_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
EGO_PN="github.com/keybase/client/go/keybase" \
|
||||
golang-build_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin "${T}/keybase"
|
||||
dobin "${S}/packaging/linux/run_keybase"
|
||||
systemd_douserunit "${S}/packaging/linux/systemd/keybase.service"
|
||||
dodir "/opt/keybase"
|
||||
insinto "/opt/keybase"
|
||||
doins "${S}/packaging/linux/crypto_squirrel.txt"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Start/Restart keybase: run_keybase"
|
||||
elog "Run the service: keybase service"
|
||||
elog "Run the client: keybase login"
|
||||
ewarn "Note that the user keybasehelper is obsolete and can be removed"
|
||||
}
|
Binary file not shown.
@ -1,8 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=SciTE Text Editor
|
||||
Comment=Text Editor
|
||||
Exec=scite
|
||||
Icon=Sci48M
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Development;
|
Binary file not shown.
@ -1 +1 @@
|
||||
DIST muse-3.20.tar.gz 411316 BLAKE2B a67c72a470e7e2d75cf94ed262b0e9503166326666a119f41968a603b4e48f3527705691a1b4b819ae6ec69c382a09074eef74ddad598faa08be6c74793b1e97 SHA512 23cd0e864586f907418753bc3284afde51b4f8559c5d043c52baa70de70ec4a845d9e8362b93e701308dbbd662e3429035df8ad440916e61d5909498cd55f7be
|
||||
DIST muse-3.20.tar.gz 407054 BLAKE2B ff2babe2caf109c9de7504c4f82e04a7769b5e708455439e59faf96fa939423d6439e34f912cd79df420ec8498f7e91e5faa2e7410d4df236207fded66eff532 SHA512 864eca508d34f4c329ffd31cd3c169b67dff6d19c6695a85d8190511fa05d85f4a68f12e58c1679f91940ebcd823766e9f60309f2bfba17c985f811a3f342dda
|
||||
|
@ -1 +1 @@
|
||||
DIST remember-2.0.tar.gz 48096 BLAKE2B 7296760b561ab3c626a4c356aeaf02f9783d0ce84fb2e1bfbcfd46f392a5128bc956e378f646394645589ca6dd2a9bf1ff364ade25787ffa58f580d4decc485f SHA512 c5d1a55904699565af6375d19e88924a31364cf6f9b09b6e5510ac3e65c9bddbb2e0a5aa668dfd6e541ea6572209cad8af68694b7376b1bfe964032d247e5e01
|
||||
DIST remember-2.0.tar.gz 44481 BLAKE2B 2419ff87c7cf45e86102e02b51e7941e101ea6540d34bf8ad3df1c59c733042bea03d95508e1fb5f724148999e68bd177732bf8748f5ccc0158c36c983816536 SHA512 9744a4f5893f6191de667d6fe5f5fe8d5730b46115f290993a082a14d3bd51ebb4e0ac3dd7f8b29de4db0aeb10259d6bf9f5833fd98b95077fb963683cb0f859
|
||||
|
Binary file not shown.
@ -1,75 +0,0 @@
|
||||
diff -ur xen-4.3.0.orig/stubdom/Makefile xen-4.3.0/stubdom/Makefile
|
||||
--- stubdom/Makefile 2013-07-09 18:46:56.000000000 +0800
|
||||
+++ stubdom/Makefile 2013-07-21 16:07:08.094663570 +0800
|
||||
@@ -68,12 +68,12 @@
|
||||
##############
|
||||
|
||||
newlib-$(NEWLIB_VERSION).tar.gz:
|
||||
- $(FETCHER) $@ $(NEWLIB_URL)/$@
|
||||
|
||||
newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz
|
||||
tar xzf $<
|
||||
patch -d $@ -p0 < newlib.patch
|
||||
patch -d $@ -p0 < newlib-chk.patch
|
||||
+ patch -d $@ -p0 < newlib-implicits.patch
|
||||
patch -d $@ -p1 < newlib-stdint-size_max-fix-from-1.17.0.patch
|
||||
find $@ -type f | xargs perl -i.bak \
|
||||
-pe 's/\b_(tzname|daylight|timezone)\b/$$1/g'
|
||||
@@ -85,7 +85,7 @@
|
||||
$(NEWLIB_STAMPFILE): mk-headers-$(XEN_TARGET_ARCH) newlib-$(NEWLIB_VERSION)
|
||||
mkdir -p newlib-$(XEN_TARGET_ARCH)
|
||||
( cd newlib-$(XEN_TARGET_ARCH) && \
|
||||
- CC_FOR_TARGET="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(NEWLIB_CFLAGS)" AR_FOR_TARGET=$(AR) LD_FOR_TARGET=$(LD) RANLIB_FOR_TARGET=$(RANLIB) ../newlib-$(NEWLIB_VERSION)/configure --prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf --enable-newlib-io-long-long --disable-multilib && \
|
||||
+ CC_FOR_TARGET="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(NEWLIB_CFLAGS)" AR_FOR_TARGET=$(AR) LD_FOR_TARGET=$(LD) LDFLAGS= RANLIB_FOR_TARGET=$(RANLIB) ../newlib-$(NEWLIB_VERSION)/configure --prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf --enable-newlib-io-long-long --disable-multilib && \
|
||||
$(MAKE) DESTDIR= && \
|
||||
$(MAKE) DESTDIR= install )
|
||||
|
||||
@@ -94,7 +94,6 @@
|
||||
############
|
||||
|
||||
zlib-$(ZLIB_VERSION).tar.gz:
|
||||
- $(FETCHER) $@ $(ZLIB_URL)/$@
|
||||
|
||||
zlib-$(XEN_TARGET_ARCH): zlib-$(ZLIB_VERSION).tar.gz
|
||||
tar xzf $<
|
||||
@@ -105,7 +104,7 @@
|
||||
cross-zlib: $(ZLIB_STAMPFILE)
|
||||
$(ZLIB_STAMPFILE): zlib-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
|
||||
( cd $< && \
|
||||
- CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" CC=$(CC) ./configure --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf && \
|
||||
+ CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" CC="$(CC)" ./configure --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf && \
|
||||
$(MAKE) DESTDIR= libz.a && \
|
||||
$(MAKE) DESTDIR= install )
|
||||
|
||||
@@ -114,7 +113,6 @@
|
||||
##############
|
||||
|
||||
pciutils-$(LIBPCI_VERSION).tar.bz2:
|
||||
- $(FETCHER) $@ $(LIBPCI_URL)/$@
|
||||
|
||||
pciutils-$(XEN_TARGET_ARCH): pciutils-$(LIBPCI_VERSION).tar.bz2
|
||||
tar xjf $<
|
||||
@@ -142,7 +140,6 @@
|
||||
######
|
||||
|
||||
lwip-$(LWIP_VERSION).tar.gz:
|
||||
- $(FETCHER) $@ $(LWIP_URL)/$@
|
||||
|
||||
lwip-$(XEN_TARGET_ARCH): lwip-$(LWIP_VERSION).tar.gz
|
||||
tar xzf $<
|
||||
@@ -180,7 +177,6 @@
|
||||
# cross-polarssl
|
||||
#############
|
||||
polarssl-$(POLARSSL_VERSION)-gpl.tgz:
|
||||
- $(FETCHER) $@ $(POLARSSL_URL)/$@
|
||||
|
||||
polarssl-$(XEN_TARGET_ARCH): polarssl-$(POLARSSL_VERSION)-gpl.tgz
|
||||
tar xzf $<
|
||||
@@ -385,7 +382,6 @@
|
||||
######
|
||||
|
||||
grub-$(GRUB_VERSION).tar.gz:
|
||||
- $(FETCHER) $@ $(GRUB_URL)/$@
|
||||
|
||||
grub-upstream: grub-$(GRUB_VERSION).tar.gz
|
||||
tar xzf $<
|
Binary file not shown.
@ -1,2 +1 @@
|
||||
DIST djvulibre-3.5.25.3.tar.gz 2543949 BLAKE2B 8ae6004e74a7db0fa666a3cf15f5a3b335690984838e8d674ccd7fa7dda0728771f6fab5f61747b505646e3bb206effd0bbaf9c6035fb27993d587693ad1fa43 SHA512 0e38f56d77915ee6707dd19a36a8ca9167608c39449a5c73de9cd784d712852c07c068b79a794e25f6d3ded0f927d083413dde197c9fc8f7b68c03cffe68035b
|
||||
DIST djvulibre-3.5.27.tar.gz 3648522 BLAKE2B e1907b4b64c48304ceb24360cfd451e4690d38803f22231d4e136dbe754715527fa0300c623bb709fa05bba206348257137b2a755651bb51ca26259680e142d0 SHA512 62abcaa2fe7edab536477929ba38b882453dab1a06e119a3f838b38d5c61f5d8c252e4769e6534582b826e49bcfb490513179580fab9c3afa84aa92053ccebee
|
||||
|
@ -1,72 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit autotools eutils flag-o-matic xdg-utils
|
||||
|
||||
MY_P="${PN}libre-${PV#*_p}"
|
||||
|
||||
DESCRIPTION="DjVu viewers, encoders and utilities"
|
||||
HOMEPAGE="http://djvu.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/djvu/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
|
||||
IUSE="debug doc jpeg tiff xml"
|
||||
|
||||
RDEPEND="jpeg? ( virtual/jpeg:0 )
|
||||
tiff? ( media-libs/tiff:0= )"
|
||||
DEPEND="${RDEPEND}
|
||||
|| ( gnome-base/librsvg media-gfx/inkscape )"
|
||||
|
||||
S=${WORKDIR}/${MY_P%%.3}
|
||||
|
||||
src_prepare() {
|
||||
sed -i \
|
||||
-e 's/AC_CXX_OPTIMIZE/OPTS=;AC_SUBST(OPTS)/' \
|
||||
configure.ac || die #263688
|
||||
rm aclocal.m4 config/{libtool.m4,ltmain.sh,install-sh,config.sub,config.guess,ltoptions.m4,ltversion.m4,lt~obsolete.m4}
|
||||
# epatch "${FILESDIR}/${PN}-3.5.24-gcc46.patch"
|
||||
AT_M4DIR="config" eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use debug && append-cppflags "-DRUNTIME_DEBUG_ONLY"
|
||||
|
||||
# We install all desktop files by hand.
|
||||
econf \
|
||||
$(use_enable xml xmltools) \
|
||||
$(use_with jpeg) \
|
||||
$(use_with tiff) \
|
||||
--disable-desktopfiles
|
||||
}
|
||||
|
||||
DOCS=( NEWS README )
|
||||
|
||||
src_install() {
|
||||
default
|
||||
prune_libtool_files
|
||||
|
||||
use doc && dodoc -r doc
|
||||
|
||||
# Install desktop files.
|
||||
cd desktopfiles
|
||||
for i in {22,32,48,64}; do
|
||||
insinto /usr/share/icons/hicolor/${i}x${i}/mimetypes
|
||||
newins hi${i}-djvu.png image-vnd.djvu.png
|
||||
done
|
||||
insinto /usr/share/mime/packages
|
||||
doins djvulibre-mime.xml
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_mimeinfo_database_update
|
||||
has_version app-text/djview || \
|
||||
optfeature "For djviewer or browser plugin" app-text/djview
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
http://bugs.gentoo.org/361057 for GSmartPointer.h change
|
||||
|
||||
Then include stddef.h in the installed headers to fix building of reverse
|
||||
dependencies, such as app-text/zathura-djvu
|
||||
|
||||
These are all in upstream GIT
|
||||
|
||||
--- a/libdjvu/ddjvuapi.h
|
||||
+++ b/libdjvu/ddjvuapi.h
|
||||
@@ -64,6 +64,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
--- a/libdjvu/GSmartPointer.h
|
||||
+++ b/libdjvu/GSmartPointer.h
|
||||
@@ -62,6 +62,8 @@
|
||||
# pragma interface
|
||||
#endif
|
||||
|
||||
+#include <cstddef>
|
||||
+
|
||||
/** @name GSmartPointer.h
|
||||
|
||||
Files #"GSmartPointer.h"# and #"GSmartPointer.cpp"# define a smart-pointer
|
||||
--- a/libdjvu/miniexp.h
|
||||
+++ b/libdjvu/miniexp.h
|
||||
@@ -38,7 +38,8 @@
|
||||
#ifndef MINILISPAPI
|
||||
# define MINILISPAPI /**/
|
||||
#endif
|
||||
-
|
||||
+
|
||||
+#include <stddef.h>
|
||||
|
||||
/* -------------------------------------------------- */
|
||||
/* LISP EXPRESSIONS */
|
@ -0,0 +1,39 @@
|
||||
From c8bec6549c10ffaa2f2fbad8bbc629efdf0dd125 Mon Sep 17 00:00:00 2001
|
||||
From: Leon Bottou <leon@bottou.org>
|
||||
Date: Thu, 17 Oct 2019 22:20:31 -0400
|
||||
Subject: [PATCH] Fixed bug 309
|
||||
|
||||
---
|
||||
libdjvu/IW44EncodeCodec.cpp | 2 +-
|
||||
tools/ddjvu.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libdjvu/IW44EncodeCodec.cpp b/libdjvu/IW44EncodeCodec.cpp
|
||||
index 00752a0..f81eaeb 100644
|
||||
--- a/libdjvu/IW44EncodeCodec.cpp
|
||||
+++ b/libdjvu/IW44EncodeCodec.cpp
|
||||
@@ -405,7 +405,7 @@ filter_fv(short *p, int w, int h, int rowsize, int scale)
|
||||
int y = 0;
|
||||
int s = scale*rowsize;
|
||||
int s3 = s+s+s;
|
||||
- h = ((h-1)/scale)+1;
|
||||
+ h = (h>0) ? ((h-1)/scale)+1 : 0;
|
||||
y += 1;
|
||||
p += s;
|
||||
while (y-3 < h)
|
||||
diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp
|
||||
index 6d0df3b..7109952 100644
|
||||
--- a/tools/ddjvu.cpp
|
||||
+++ b/tools/ddjvu.cpp
|
||||
@@ -279,7 +279,7 @@ render(ddjvu_page_t *page, int pageno)
|
||||
prect.h = (ih * 100) / dpi;
|
||||
}
|
||||
/* Process aspect ratio */
|
||||
- if (flag_aspect <= 0)
|
||||
+ if (flag_aspect <= 0 && iw>0 && ih>0)
|
||||
{
|
||||
double dw = (double)iw / prect.w;
|
||||
double dh = (double)ih / prect.h;
|
||||
--
|
||||
2.23.0
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,897 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
MY_EXTRAS_VER="20190305-2052Z"
|
||||
SUBSLOT="18"
|
||||
|
||||
JAVA_PKG_OPT_USE="jdbc"
|
||||
|
||||
# Keeping eutils in EAPI=6 for emktemp in pkg_config
|
||||
|
||||
inherit eutils systemd flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build
|
||||
|
||||
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
|
||||
|
||||
# Gentoo patches to MySQL
|
||||
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
|
||||
SRC_URI="${SRC_URI}
|
||||
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
|
||||
fi
|
||||
|
||||
HOMEPAGE="https://mariadb.org/"
|
||||
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/${SUBSLOT:-0}"
|
||||
IUSE="+backup bindist client-libs cracklib debug extraengine galera jdbc jemalloc kerberos
|
||||
innodb-lz4 innodb-lzo innodb-snappy latin1 libressl mroonga numa odbc oqgraph pam
|
||||
+perl profiling selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup
|
||||
systemd systemtap static static-libs tcmalloc test tokudb xml yassl"
|
||||
|
||||
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
|
||||
RESTRICT="!bindist? ( bindist ) libressl? ( test ) !test? ( test )"
|
||||
|
||||
REQUIRED_USE="jdbc? ( extraengine server !static )
|
||||
server? ( tokudb? ( jemalloc !tcmalloc ) )
|
||||
?? ( tcmalloc jemalloc )
|
||||
static? ( yassl !pam )"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
||||
|
||||
# Shorten the path because the socket path length must be shorter than 107 chars
|
||||
# and we will run a mysql server during test phase
|
||||
S="${WORKDIR}/mysql"
|
||||
|
||||
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
|
||||
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
|
||||
EGIT_CLONE_TYPE=shallow
|
||||
else
|
||||
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${MY_PATCH_DIR}"/20006_all_cmake_elib-mariadb-10.1.27.patch
|
||||
"${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch
|
||||
"${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch
|
||||
"${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch
|
||||
"${MY_PATCH_DIR}"/20029_all_mariadb-10.1.37-enable-numa.patch
|
||||
"${MY_PATCH_DIR}"/20035_all_mariadb-10.1-atomic-detection.patch
|
||||
)
|
||||
|
||||
# Be warned, *DEPEND are version-dependant
|
||||
# These are used for both runtime and compiletime
|
||||
COMMON_DEPEND="
|
||||
kernel_linux? (
|
||||
sys-process/procps:0=
|
||||
dev-libs/libaio:0=
|
||||
)
|
||||
>=sys-apps/sed-4
|
||||
>=sys-apps/texinfo-4.7-r1
|
||||
jemalloc? ( dev-libs/jemalloc:0= )
|
||||
tcmalloc? ( dev-util/google-perftools:0= )
|
||||
systemtap? ( >=dev-util/systemtap-1.3:0= )
|
||||
!yassl? (
|
||||
!libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
>=sys-libs/zlib-1.2.3:0=
|
||||
sys-libs/ncurses:0=
|
||||
!bindist? (
|
||||
sys-libs/binutils-libs:0=
|
||||
>=sys-libs/readline-4.1:0=
|
||||
)
|
||||
server? (
|
||||
backup? ( app-arch/libarchive:0= )
|
||||
cracklib? ( sys-libs/cracklib:0= )
|
||||
extraengine? (
|
||||
odbc? ( dev-db/unixODBC:0= )
|
||||
xml? ( dev-libs/libxml2:2= )
|
||||
sys-libs/zlib[minizip]
|
||||
)
|
||||
innodb-lz4? ( app-arch/lz4 )
|
||||
innodb-lzo? ( dev-libs/lzo )
|
||||
innodb-snappy? ( app-arch/snappy )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
|
||||
numa? ( sys-process/numactl )
|
||||
oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
|
||||
pam? ( sys-libs/pam:0= )
|
||||
systemd? ( sys-apps/systemd:= )
|
||||
tokudb? ( app-arch/snappy )
|
||||
)
|
||||
!yassl? ( !libressl? ( !>=dev-libs/openssl-1.1.0 ) )
|
||||
>=dev-libs/libpcre-8.41-r1:3=
|
||||
!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
|
||||
"
|
||||
DEPEND="virtual/yacc
|
||||
static? ( sys-libs/ncurses[static-libs] )
|
||||
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
|
||||
server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
|
||||
${COMMON_DEPEND}"
|
||||
RDEPEND="selinux? ( sec-policy/selinux-mysql )
|
||||
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
|
||||
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
|
||||
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
|
||||
${COMMON_DEPEND}
|
||||
server? ( galera? (
|
||||
sys-apps/iproute2
|
||||
=sys-cluster/galera-25*
|
||||
sst-rsync? ( sys-process/lsof )
|
||||
sst-mariabackup? ( net-misc/socat[ssl] )
|
||||
sst-xtrabackup? ( net-misc/socat[ssl] )
|
||||
) )
|
||||
perl? ( !dev-db/mytop
|
||||
virtual/perl-Getopt-Long
|
||||
dev-perl/TermReadKey
|
||||
virtual/perl-Term-ANSIColor
|
||||
virtual/perl-Time-HiRes )
|
||||
server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
|
||||
"
|
||||
# For other stuff to bring us in
|
||||
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
|
||||
# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
|
||||
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
|
||||
server? ( galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
|
||||
|
||||
pkg_setup() {
|
||||
if [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
local GCC_MAJOR_SET=$(gcc-major-version)
|
||||
local GCC_MINOR_SET=$(gcc-minor-version)
|
||||
if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
|
||||
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
|
||||
eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
|
||||
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
|
||||
die
|
||||
fi
|
||||
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
|
||||
# non x86{,_64} arches
|
||||
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
|
||||
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
|
||||
eerror "${PN} needs to be built with gcc-4.7 or later."
|
||||
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
|
||||
die
|
||||
fi
|
||||
fi
|
||||
java-pkg-opt-2_pkg_setup
|
||||
if has test ${FEATURES} && \
|
||||
use server && ! has userpriv ${FEATURES} ; then
|
||||
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
|
||||
fi
|
||||
|
||||
# This should come after all of the die statements
|
||||
enewgroup mysql 60 || die "problem adding 'mysql' group"
|
||||
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
java-pkg-opt-2_pkg_preinst
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Create log directory securely if it does not exist
|
||||
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
|
||||
|
||||
if use server ; then
|
||||
if use pam; then
|
||||
einfo
|
||||
elog "This install includes the PAM authentication plugin."
|
||||
elog "To activate and configure the PAM plugin, please read:"
|
||||
elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
|
||||
einfo
|
||||
fi
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
|
||||
einfo
|
||||
elog "You might want to run:"
|
||||
elog "\"emerge --config =${CATEGORY}/${PF}\""
|
||||
elog "if this is a new install."
|
||||
elog
|
||||
elog "If you are switching server implentations, you should run the"
|
||||
elog "mysql_upgrade tool."
|
||||
einfo
|
||||
else
|
||||
einfo
|
||||
elog "If you are upgrading major versions, you should run the"
|
||||
elog "mysql_upgrade tool."
|
||||
einfo
|
||||
fi
|
||||
|
||||
einfo
|
||||
elog "Be sure to edit the my.cnf file to activate your cluster settings."
|
||||
elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
|
||||
elog "The first time the cluster is activated, you should add"
|
||||
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
|
||||
elog "This option should then be removed for subsequent starts."
|
||||
einfo
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
# Grab the patches
|
||||
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
|
||||
|
||||
mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
_disable_engine() {
|
||||
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
_disable_plugin() {
|
||||
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
if use tcmalloc; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
# Don't build bundled xz-utils for tokudb
|
||||
echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
|
||||
sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
|
||||
sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
|
||||
|
||||
local plugin
|
||||
local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
|
||||
locale_info qc_info server_audit semisync sql_errlog )
|
||||
local test_plugins=( audit_null auth_examples daemon_example fulltext )
|
||||
if ! use server; then # These plugins are for the server
|
||||
for plugin in "${server_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
if ! use test; then # These plugins are only used during testing
|
||||
for plugin in "${test_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Collides with mariadb-connector-c bug 655980
|
||||
_disable_plugin auth_dialog
|
||||
|
||||
# Avoid useless library checks
|
||||
use mroonga || _disable_engine mroonga
|
||||
use oqgraph || _disable_engine oqgraph
|
||||
_disable_engine example
|
||||
|
||||
# Don't clash with dev-db/mysql-connector-c
|
||||
sed -i -e 's/ my_print_defaults.1//' \
|
||||
-e 's/ perror.1//' \
|
||||
"${S}"/man/CMakeLists.txt || die
|
||||
|
||||
cmake-utils_src_prepare
|
||||
java-pkg-opt-2_src_prepare
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
# bug 508724 mariadb cannot use ld.gold
|
||||
tc-ld-disable-gold
|
||||
# Bug #114895, bug #110149
|
||||
filter-flags "-O" "-O[01]"
|
||||
|
||||
append-cxxflags -felide-constructors
|
||||
|
||||
# bug #283926, with GCC4.4, this is required to get correct behavior.
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# debug hack wrt #497532
|
||||
mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
|
||||
-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
|
||||
-DINSTALL_BINDIR=bin
|
||||
-DINSTALL_DOCDIR=share/doc/${PF}
|
||||
-DINSTALL_DOCREADMEDIR=share/doc/${PF}
|
||||
-DINSTALL_INCLUDEDIR=include/mysql
|
||||
-DINSTALL_INFODIR=share/info
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DINSTALL_MANDIR=share/man
|
||||
-DINSTALL_MYSQLSHAREDIR=share/mariadb
|
||||
-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mariadb/mysql-test' '')
|
||||
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
|
||||
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
|
||||
-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
|
||||
-DINSTALL_SBINDIR=sbin
|
||||
-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
|
||||
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
|
||||
-DWITH_UNIT_TESTS=$(usex test ON OFF)
|
||||
-DWITH_ZLIB=system
|
||||
-DENABLED_LOCAL_INFILE=1
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
|
||||
-DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=0
|
||||
-DWITH_DEFAULT_FEATURE_SET=0
|
||||
-DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
|
||||
# The build forces this to be defined when cross-compiling. We pass it
|
||||
# all the time for simplicity and to make sure it is actually correct.
|
||||
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
|
||||
-DWITHOUT_CLIENTLIBS=YES
|
||||
-DWITH_READLINE=$(usex bindist 1 0)
|
||||
-DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
|
||||
-DENABLE_DTRACE=$(usex systemtap)
|
||||
-DWITH_SSL=$(usex yassl bundled system)
|
||||
-DPLUGIN_CLIENT_ED25519=NO
|
||||
-DPLUGIN_AUTH_GSSAPI_CLIENT=NO
|
||||
)
|
||||
|
||||
if use server ; then
|
||||
|
||||
# Federated{,X} must be treated special otherwise they will not be built as plugins
|
||||
if ! use extraengine ; then
|
||||
mycmakeargs+=(
|
||||
-DPLUGIN_FEDERATED=NO
|
||||
-DPLUGIN_FEDERATEDX=NO )
|
||||
fi
|
||||
|
||||
mycmakeargs+=(
|
||||
-DWITH_JEMALLOC=$(usex jemalloc system)
|
||||
-DWITH_PCRE=system
|
||||
-DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
|
||||
-DPLUGIN_SPHINX=$(usex sphinx YES NO)
|
||||
-DPLUGIN_TOKUDB=$(usex tokudb YES NO)
|
||||
-DPLUGIN_AUTH_PAM=$(usex pam YES NO)
|
||||
-DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
|
||||
-DPLUGIN_CASSANDRA=NO
|
||||
-DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
|
||||
-DPLUGIN_SPIDER=$(usex extraengine YES NO)
|
||||
-DPLUGIN_CONNECT=$(usex extraengine YES NO)
|
||||
-DCONNECT_WITH_MYSQL=1
|
||||
-DCONNECT_WITH_LIBXML2=$(usex xml)
|
||||
-DCONNECT_WITH_ODBC=$(usex odbc)
|
||||
-DCONNECT_WITH_JDBC=$(usex jdbc)
|
||||
# Build failure and autodep wrt bug 639144
|
||||
-DCONNECT_WITH_MONGO=OFF
|
||||
-DWITH_WSREP=$(usex galera)
|
||||
-DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
|
||||
-DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
|
||||
-DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
|
||||
-DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
|
||||
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
|
||||
-DPLUGIN_AUTH_GSSAPI_CLIENT=NO
|
||||
-DWITH_MARIABACKUP=$(usex backup ON OFF)
|
||||
-DWITH_LIBARCHIVE=$(usex backup ON OFF)
|
||||
-DWITH_SYSTEMD=$(usex systemd yes no)
|
||||
-DWITH_NUMA=$(usex numa ON OFF)
|
||||
-DINSTALL_SQLBENCHDIR=''
|
||||
)
|
||||
|
||||
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
|
||||
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
|
||||
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
|
||||
ewarn "You MUST file bugs without these variables set."
|
||||
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
|
||||
-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
|
||||
)
|
||||
|
||||
elif ! use latin1 ; then
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=utf8
|
||||
-DDEFAULT_COLLATION=utf8_general_ci
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=latin1
|
||||
-DDEFAULT_COLLATION=latin1_swedish_ci
|
||||
)
|
||||
fi
|
||||
mycmakeargs+=(
|
||||
-DEXTRA_CHARSETS=all
|
||||
-DMYSQL_USER=mysql
|
||||
-DDISABLE_SHARED=$(usex static YES NO)
|
||||
-DWITH_DEBUG=$(usex debug)
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
-DENABLED_PROFILING=$(usex profiling)
|
||||
)
|
||||
|
||||
if use static; then
|
||||
mycmakeargs+=( -DWITH_PIC=1 )
|
||||
fi
|
||||
|
||||
if use jemalloc || use tcmalloc ; then
|
||||
mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
|
||||
fi
|
||||
|
||||
# Storage engines
|
||||
mycmakeargs+=(
|
||||
-DWITH_ARCHIVE_STORAGE_ENGINE=1
|
||||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
|
||||
-DWITH_CSV_STORAGE_ENGINE=1
|
||||
-DWITH_HEAP_STORAGE_ENGINE=1
|
||||
-DWITH_INNOBASE_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAM_STORAGE_ENGINE=1
|
||||
-DWITH_PARTITION_STORAGE_ENGINE=1
|
||||
)
|
||||
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_SERVER=1
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
-DEXTRA_CHARSETS=none
|
||||
-DINSTALL_SQLBENCHDIR=
|
||||
-DWITH_SYSTEMD=no
|
||||
)
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
|
||||
if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
|
||||
rm "${ED}/usr/include/mysql/server/private/config.h" || die
|
||||
fi
|
||||
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Convenience links
|
||||
einfo "Making Convenience links for mysqlcheck multi-call binary"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqlrepair"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqloptimize"
|
||||
|
||||
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
|
||||
if [[ -d "${ED}/usr/data" ]] ; then
|
||||
rm -Rf "${ED}/usr/data" || die
|
||||
fi
|
||||
|
||||
# Unless they explicitly specific USE=test, then do not install the
|
||||
# testsuite. It DOES have a use to be installed, esp. when you want to do a
|
||||
# validation of your database configuration after tuning it.
|
||||
if ! use test ; then
|
||||
rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
|
||||
fi
|
||||
|
||||
# Configuration stuff
|
||||
einfo "Building default configuration ..."
|
||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
|
||||
[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
|
||||
local mycnf_src="my.cnf-5.6-r1"
|
||||
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
|
||||
"${FILESDIR}/${mycnf_src}" \
|
||||
> "${TMPDIR}/my.cnf.ok" || die
|
||||
use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
|
||||
if use latin1 ; then
|
||||
sed -i \
|
||||
-e "/character-set/s|utf8|latin1|g" \
|
||||
"${TMPDIR}/my.cnf.ok" || die
|
||||
fi
|
||||
eprefixify "${TMPDIR}/my.cnf.ok"
|
||||
newins "${TMPDIR}/my.cnf.ok" my.cnf
|
||||
|
||||
if use server ; then
|
||||
einfo "Including support files and sample configurations"
|
||||
docinto "support-files"
|
||||
local script
|
||||
for script in \
|
||||
"${S}"/support-files/magic
|
||||
do
|
||||
[[ -f "$script" ]] && dodoc "${script}"
|
||||
done
|
||||
|
||||
docinto "scripts"
|
||||
for script in "${S}"/scripts/mysql* ; do
|
||||
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
|
||||
done
|
||||
# Manually install supporting files that conflict with other packages
|
||||
# but are needed for galera and initial installation
|
||||
exeinto /usr/libexec/mariadb
|
||||
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
|
||||
fi
|
||||
|
||||
#Remove mytop if perl is not selected
|
||||
[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
|
||||
}
|
||||
|
||||
# Official test instructions:
|
||||
# USE='extraengine perl server' \
|
||||
# FEATURES='test userpriv -usersandbox' \
|
||||
# ebuild mariadb-X.X.XX.ebuild \
|
||||
# digest clean package
|
||||
src_test() {
|
||||
|
||||
_disable_test() {
|
||||
local rawtestname reason
|
||||
rawtestname="${1}" ; shift
|
||||
reason="${@}"
|
||||
ewarn "test '${rawtestname}' disabled: '${reason}'"
|
||||
echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
|
||||
}
|
||||
|
||||
local TESTDIR="${BUILD_DIR}/mysql-test"
|
||||
local retstatus_unit
|
||||
local retstatus_tests
|
||||
|
||||
if ! use server ; then
|
||||
einfo "Skipping server tests due to minimal build."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Bug #213475 - MySQL _will_ object strenously if your machine is named
|
||||
# localhost. Also causes weird failures.
|
||||
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
|
||||
|
||||
if [[ $UID -eq 0 ]]; then
|
||||
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
|
||||
fi
|
||||
has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
|
||||
|
||||
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
|
||||
# Run CTest (test-units)
|
||||
# cmake-utils_src_test
|
||||
# retstatus_unit=$?
|
||||
|
||||
# Ensure that parallel runs don't die
|
||||
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
|
||||
# Enable parallel testing, auto will try to detect number of cores
|
||||
# You may set this by hand.
|
||||
# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
|
||||
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
|
||||
|
||||
# create directories because mysqladmin might run out of order
|
||||
mkdir -p "${T}"/var-tests{,/log} || die
|
||||
|
||||
# Run mysql tests
|
||||
pushd "${TESTDIR}" > /dev/null || die
|
||||
|
||||
touch "${T}/disabled.def"
|
||||
# These are failing in MariaDB 10.0 for now and are believed to be
|
||||
# false positives:
|
||||
#
|
||||
# main.mysql_client_test, main.mysql_client_test_nonblock
|
||||
# main.mysql_client_test_comp:
|
||||
# segfaults at random under Portage only, suspect resource limits.
|
||||
|
||||
local t
|
||||
for t in plugins.cracklib_password_check plugins.two_password_validations ; do
|
||||
_disable_test "$t" "False positive due to varying policies"
|
||||
done
|
||||
|
||||
for t in main.mysql_client_test main.mysql_client_test_nonblock \
|
||||
rpl.rpl_semi_sync_uninstall_plugin main.mysql \
|
||||
main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
|
||||
_disable_test "$t" "False positives in Gentoo"
|
||||
done
|
||||
|
||||
if ! use client-libs ; then
|
||||
_disable_test main.plugin_auth "Needs client libraries built"
|
||||
_disable_test plugins.auth_ed25519 "Needs client libraries built"
|
||||
fi
|
||||
|
||||
_disable_test main.gis_notembedded "Fails when latin1 USE is not set"
|
||||
|
||||
_disable_test sys_vars.sysvars_server_notembedded "Broken test" # bug #661700 required profiling always on
|
||||
|
||||
# run mysql-test tests
|
||||
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
|
||||
retstatus_tests=$?
|
||||
|
||||
popd > /dev/null || die
|
||||
|
||||
# Cleanup is important for these testcases.
|
||||
pkill -9 -f "${S}/ndb" 2>/dev/null
|
||||
pkill -9 -f "${S}/sql" 2>/dev/null
|
||||
|
||||
local failures=""
|
||||
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
|
||||
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
|
||||
|
||||
[[ -z "$failures" ]] || die "Test failures: $failures"
|
||||
einfo "Tests successfully completed"
|
||||
}
|
||||
|
||||
mysql_init_vars() {
|
||||
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
|
||||
MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
|
||||
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
|
||||
MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
|
||||
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR=""
|
||||
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
|
||||
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
|
||||
| sed -ne '/datadir/s|^--datadir=||p' \
|
||||
| tail -n1`
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
|
||||
| sed -e 's/.*=\s*//' \
|
||||
| tail -n1`
|
||||
fi
|
||||
fi
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR="${MY_LOCALSTATEDIR}"
|
||||
einfo "Using default MY_DATADIR"
|
||||
fi
|
||||
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
|
||||
|
||||
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
|
||||
if [[ -e "${MY_DATADIR}" ]] ; then
|
||||
# If you get this and you're wondering about it, see bug #207636
|
||||
elog "MySQL datadir found in ${MY_DATADIR}"
|
||||
elog "A new one will not be created."
|
||||
PREVIOUS_DATADIR="yes"
|
||||
else
|
||||
PREVIOUS_DATADIR="no"
|
||||
fi
|
||||
export PREVIOUS_DATADIR
|
||||
fi
|
||||
else
|
||||
if [[ ${EBUILD_PHASE} == "config" ]]; then
|
||||
local new_MY_DATADIR
|
||||
new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
|
||||
| sed -ne '/datadir/s|^--datadir=||p' \
|
||||
| tail -n1`
|
||||
|
||||
if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
|
||||
ewarn "MySQL MY_DATADIR has changed"
|
||||
ewarn "from ${MY_DATADIR}"
|
||||
ewarn "to ${new_MY_DATADIR}"
|
||||
MY_DATADIR="${new_MY_DATADIR}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
|
||||
export MY_LOCALSTATEDIR MY_LOGDIR
|
||||
export MY_DATADIR
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
_getoptval() {
|
||||
local mypd="${EROOT}"usr/libexec/mariadb/my_print_defaults
|
||||
local section="$1"
|
||||
local flag="--${2}="
|
||||
local extra_options="${3}"
|
||||
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
|
||||
}
|
||||
local old_MY_DATADIR="${MY_DATADIR}"
|
||||
local old_HOME="${HOME}"
|
||||
# my_print_defaults needs to read stuff in $HOME/.my.cnf
|
||||
export HOME=${EPREFIX}/root
|
||||
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
|
||||
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
|
||||
die "Minimal builds do NOT include the MySQL server"
|
||||
fi
|
||||
|
||||
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
|
||||
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
|
||||
MY_DATADIR_s="${MY_DATADIR_s%%/}"
|
||||
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
|
||||
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
|
||||
|
||||
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
|
||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
|
||||
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
|
||||
else
|
||||
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
|
||||
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|
||||
|| die "Moving MY_DATADIR failed"
|
||||
fi
|
||||
else
|
||||
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
|
||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||
ewarn "Attempting to use ${MY_DATADIR_s}"
|
||||
else
|
||||
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
|
||||
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
local pwd1="a"
|
||||
local pwd2="b"
|
||||
local maxtry=15
|
||||
|
||||
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
|
||||
local tmp_mysqld_password_source=
|
||||
|
||||
for tmp_mysqld_password_source in mysql client; do
|
||||
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
|
||||
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
|
||||
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
|
||||
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
|
||||
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
|
||||
MYSQL_ROOT_PASSWORD=
|
||||
continue
|
||||
fi
|
||||
|
||||
einfo "Found password in '${tmp_mysqld_password_source}' section!"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
|
||||
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
|
||||
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
|
||||
fi
|
||||
|
||||
unset tmp_mysqld_password_source
|
||||
fi
|
||||
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)"
|
||||
# These are dir+prefix
|
||||
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
|
||||
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
|
||||
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
|
||||
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
|
||||
|
||||
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
|
||||
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
|
||||
fi
|
||||
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
|
||||
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
|
||||
fi
|
||||
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
|
||||
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
|
||||
fi
|
||||
|
||||
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
|
||||
ewarn "You have already a MySQL database in place."
|
||||
ewarn "(${ROOT}/${MY_DATADIR}/*)"
|
||||
ewarn "Please rename or delete it if you wish to replace it."
|
||||
die "MySQL database already exists!"
|
||||
fi
|
||||
|
||||
# Bug #213475 - MySQL _will_ object strenously if your machine is named
|
||||
# localhost. Also causes weird failures.
|
||||
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
|
||||
|
||||
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
|
||||
|
||||
einfo "Please provide a password for the mysql 'root' user now"
|
||||
einfo "or through the ${HOME}/.my.cnf file."
|
||||
ewarn "Avoid [\"'\\_%] characters in the password"
|
||||
read -rsp " >" pwd1 ; echo
|
||||
|
||||
einfo "Retype the password"
|
||||
read -rsp " >" pwd2 ; echo
|
||||
|
||||
if [[ "x$pwd1" != "x$pwd2" ]] ; then
|
||||
die "Passwords are not the same"
|
||||
fi
|
||||
MYSQL_ROOT_PASSWORD="${pwd1}"
|
||||
unset pwd1 pwd2
|
||||
fi
|
||||
|
||||
local options
|
||||
local sqltmp="$(emktemp)"
|
||||
|
||||
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
|
||||
# see https://bugs.mysql.com/bug.php?id=31312
|
||||
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
|
||||
|
||||
# Figure out which options we need to disable to do the setup
|
||||
local helpfile="${TMPDIR}/mysqld-help"
|
||||
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
|
||||
for opt in grant-tables host-cache name-resolve networking slave-start \
|
||||
federated ssl log-bin relay-log slow-query-log external-locking \
|
||||
log-slave-updates \
|
||||
; do
|
||||
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
|
||||
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
|
||||
done
|
||||
|
||||
einfo "Creating the mysql database and setting proper permissions on it ..."
|
||||
|
||||
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
|
||||
PID_DIR="${EROOT}/var/run/mysqld"
|
||||
if [[ ! -d "${PID_DIR}" ]]; then
|
||||
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${MY_DATADIR}" ]]; then
|
||||
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
|
||||
fi
|
||||
|
||||
pushd "${TMPDIR}" &>/dev/null || die
|
||||
|
||||
# Filling timezones, see
|
||||
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
|
||||
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
|
||||
|
||||
local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
|
||||
[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
|
||||
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
|
||||
einfo "Command: ${cmd[*]}"
|
||||
su -s /bin/sh -c "${cmd[*]}" mysql \
|
||||
>"${TMPDIR}"/mysql_install_db.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
|
||||
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|
||||
|| die "MySQL databases not installed"
|
||||
|
||||
use prefix || options="${options} --user=mysql"
|
||||
|
||||
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
|
||||
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
|
||||
local mysqld="${EROOT}/usr/sbin/mysqld \
|
||||
${options} \
|
||||
--log-warnings=0 \
|
||||
--basedir=${EROOT}/usr \
|
||||
--datadir=${ROOT}/${MY_DATADIR} \
|
||||
--max_allowed_packet=8M \
|
||||
--net_buffer_length=16K \
|
||||
--socket=${socket} \
|
||||
--pid-file=${pidfile} \
|
||||
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
|
||||
#einfo "About to start mysqld: ${mysqld}"
|
||||
ebegin "Starting mysqld"
|
||||
einfo "Command ${mysqld}"
|
||||
${mysqld} &
|
||||
rc=$?
|
||||
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
|
||||
maxtry=$((${maxtry}-1))
|
||||
echo -n "."
|
||||
sleep 1
|
||||
done
|
||||
eend $rc
|
||||
|
||||
if ! [[ -S "${socket}" ]]; then
|
||||
die "Completely failed to start up mysqld with: ${mysqld}"
|
||||
fi
|
||||
|
||||
ebegin "Setting root password"
|
||||
# Do this from memory, as we don't want clear text passwords in temp files
|
||||
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
|
||||
"${EROOT}/usr/bin/mysql" \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-e "${sql}"
|
||||
eend $?
|
||||
|
||||
if [[ -n "${sqltmp}" ]] ; then
|
||||
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
|
||||
"${EROOT}/usr/bin/mysql" \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-uroot \
|
||||
--password="${MYSQL_ROOT_PASSWORD}" \
|
||||
mysql < "${sqltmp}"
|
||||
rc=$?
|
||||
eend $?
|
||||
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
|
||||
fi
|
||||
|
||||
# Stop the server and cleanup
|
||||
einfo "Stopping the server ..."
|
||||
kill $(< "${pidfile}" )
|
||||
rm -f "${sqltmp}"
|
||||
wait %1
|
||||
einfo "Done"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,836 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
MY_EXTRAS_VER="20180809-1700Z"
|
||||
SUBSLOT="18"
|
||||
|
||||
# Keeping eutils in EAPI=6 for emktemp in pkg_config
|
||||
|
||||
inherit eutils flag-o-matic prefix toolchain-funcs user cmake-utils multilib-build
|
||||
|
||||
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
|
||||
|
||||
# Gentoo patches to MySQL
|
||||
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
|
||||
SRC_URI="${SRC_URI}
|
||||
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
|
||||
fi
|
||||
|
||||
HOMEPAGE="https://mariadb.org/"
|
||||
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/${SUBSLOT:-0}"
|
||||
IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl
|
||||
oqgraph pam +perl profiling selinux +server sphinx
|
||||
static static-libs systemtap tcmalloc
|
||||
test tokudb yassl"
|
||||
|
||||
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
|
||||
RESTRICT="!bindist? ( bindist ) libressl? ( test ) !test? ( test )"
|
||||
|
||||
REQUIRED_USE="server? ( tokudb? ( jemalloc !tcmalloc ) )
|
||||
?? ( tcmalloc jemalloc )
|
||||
static? ( yassl !pam )"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
||||
|
||||
# Shorten the path because the socket path length must be shorter than 107 chars
|
||||
# and we will run a mysql server during test phase
|
||||
S="${WORKDIR}/mysql"
|
||||
|
||||
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
|
||||
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
|
||||
EGIT_CLONE_TYPE=shallow
|
||||
else
|
||||
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
|
||||
"${MY_PATCH_DIR}/20004_all_mariadb-filter-tokudb-flags.patch"
|
||||
"${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-5.5.50.patch"
|
||||
"${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
|
||||
"${MY_PATCH_DIR}/20018_all_mariadb-5.5.60-without-clientlibs-tools.patch"
|
||||
)
|
||||
|
||||
# Be warned, *DEPEND are version-dependant
|
||||
# These are used for both runtime and compiletime
|
||||
COMMON_DEPEND="
|
||||
kernel_linux? (
|
||||
sys-process/procps:0=
|
||||
dev-libs/libaio:0=
|
||||
)
|
||||
>=sys-apps/sed-4
|
||||
>=sys-apps/texinfo-4.7-r1
|
||||
jemalloc? ( dev-libs/jemalloc:0= )
|
||||
tcmalloc? ( dev-util/google-perftools:0= )
|
||||
systemtap? ( >=dev-util/systemtap-1.3:0= )
|
||||
!yassl? (
|
||||
!libressl? ( <dev-libs/openssl-1.1.0:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
>=sys-libs/zlib-1.2.3:0=
|
||||
sys-libs/ncurses:0=
|
||||
!bindist? (
|
||||
>=sys-libs/readline-4.1:0=
|
||||
)
|
||||
server? (
|
||||
oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
|
||||
pam? ( sys-libs/pam:0= )
|
||||
)
|
||||
!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
|
||||
"
|
||||
DEPEND="virtual/yacc
|
||||
static? ( sys-libs/ncurses[static-libs] )
|
||||
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
|
||||
${COMMON_DEPEND}"
|
||||
RDEPEND="selinux? ( sec-policy/selinux-mysql )
|
||||
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
|
||||
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
|
||||
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
|
||||
${COMMON_DEPEND}
|
||||
perl? ( !dev-db/mytop
|
||||
virtual/perl-Getopt-Long
|
||||
dev-perl/TermReadKey
|
||||
virtual/perl-Term-ANSIColor
|
||||
virtual/perl-Time-HiRes )
|
||||
"
|
||||
# For other stuff to bring us in
|
||||
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
|
||||
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
|
||||
|
||||
pkg_setup() {
|
||||
if [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
local GCC_MAJOR_SET=$(gcc-major-version)
|
||||
local GCC_MINOR_SET=$(gcc-minor-version)
|
||||
if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
|
||||
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
|
||||
eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
|
||||
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
|
||||
die
|
||||
fi
|
||||
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
|
||||
# non x86{,_64} arches
|
||||
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
|
||||
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
|
||||
eerror "${PN} needs to be built with gcc-4.7 or later."
|
||||
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
|
||||
die
|
||||
fi
|
||||
fi
|
||||
if has test ${FEATURES} && \
|
||||
use server && ! has userpriv ${FEATURES} ; then
|
||||
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
|
||||
fi
|
||||
|
||||
# This should come after all of the die statements
|
||||
enewgroup mysql 60 || die "problem adding 'mysql' group"
|
||||
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Create log directory securely if it does not exist
|
||||
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
|
||||
|
||||
if use server ; then
|
||||
if use pam; then
|
||||
einfo
|
||||
elog "This install includes the PAM authentication plugin."
|
||||
elog "To activate and configure the PAM plugin, please read:"
|
||||
elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
|
||||
einfo
|
||||
fi
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
|
||||
einfo
|
||||
elog "You might want to run:"
|
||||
elog "\"emerge --config =${CATEGORY}/${PF}\""
|
||||
elog "if this is a new install."
|
||||
elog
|
||||
elog "If you are switching server implentations, you should run the"
|
||||
elog "mysql_upgrade tool."
|
||||
einfo
|
||||
else
|
||||
einfo
|
||||
elog "If you are upgrading major versions, you should run the"
|
||||
elog "mysql_upgrade tool."
|
||||
einfo
|
||||
fi
|
||||
|
||||
einfo
|
||||
elog "Be sure to edit the my.cnf file to activate your cluster settings."
|
||||
elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
|
||||
elog "The first time the cluster is activated, you should add"
|
||||
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
|
||||
elog "This option should then be removed for subsequent starts."
|
||||
einfo
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
# Grab the patches
|
||||
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
|
||||
|
||||
mv -f "${WORKDIR%/}/${P}" "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
_disable_engine() {
|
||||
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
_disable_plugin() {
|
||||
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
if use tcmalloc; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
# Don't build bundled xz-utils for tokudb
|
||||
echo > "${S%/}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
|
||||
sed -i -e 's/ build_lzma//' "${S%/}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
|
||||
sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/ft-index/portability/CMakeLists.txt" || die
|
||||
|
||||
local plugin
|
||||
local server_plugins=( handler_socket auth_socket feedback qc_info server_audit semisync sql_errlog )
|
||||
local test_plugins=( audit_null auth_examples daemon_example fulltext )
|
||||
if ! use server; then # These plugins are for the server
|
||||
for plugin in "${server_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
if ! use test; then # These plugins are only used during testing
|
||||
for plugin in "${test_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Collides with mariadb-connector-c bug 655980
|
||||
_disable_plugin auth_dialog
|
||||
|
||||
# Don't build example
|
||||
_disable_engine example
|
||||
|
||||
if ! use oqgraph ; then # avoids extra library checks
|
||||
_disable_engine oqgraph
|
||||
fi
|
||||
|
||||
# Don't clash with dev-db/mysql-connector-c
|
||||
sed -i -e 's/ my_print_defaults.1//' \
|
||||
-e 's/ perror.1//' \
|
||||
"${S}"/man/CMakeLists.txt || die
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
# bug 508724 mariadb cannot use ld.gold
|
||||
tc-ld-disable-gold
|
||||
# Bug #114895, bug #110149
|
||||
filter-flags "-O" "-O[01]"
|
||||
|
||||
append-cxxflags -felide-constructors
|
||||
|
||||
# bug #283926, with GCC4.4, this is required to get correct behavior.
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# debug hack wrt #497532
|
||||
mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
|
||||
-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
|
||||
-DINSTALL_BINDIR=bin
|
||||
-DINSTALL_DOCDIR=share/doc/${PF}
|
||||
-DINSTALL_DOCREADMEDIR=share/doc/${PF}
|
||||
-DINSTALL_INCLUDEDIR=include/mysql
|
||||
-DINSTALL_INFODIR=share/info
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DINSTALL_MANDIR=share/man
|
||||
-DINSTALL_MYSQLSHAREDIR=share/mariadb
|
||||
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
|
||||
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
|
||||
-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
|
||||
-DINSTALL_SBINDIR=sbin
|
||||
-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
|
||||
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
|
||||
-DWITH_UNIT_TESTS=$(usex test ON OFF)
|
||||
-DWITH_ZLIB=system
|
||||
-DENABLED_LOCAL_INFILE=1
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
|
||||
-DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
|
||||
# The build forces this to be defined when cross-compiling. We pass it
|
||||
# all the time for simplicity and to make sure it is actually correct.
|
||||
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
|
||||
-DWITHOUT_CLIENTLIBS=YES
|
||||
-DWITH_READLINE=$(usex bindist 1 0)
|
||||
-DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
|
||||
-DENABLE_DTRACE=$(usex systemtap)
|
||||
)
|
||||
if use test ; then
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
|
||||
else
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
|
||||
fi
|
||||
|
||||
if ! use yassl ; then
|
||||
mycmakeargs+=( -DWITH_SSL=system )
|
||||
else
|
||||
mycmakeargs+=( -DWITH_SSL=bundled )
|
||||
fi
|
||||
|
||||
if use server ; then
|
||||
|
||||
# Federated{,X} must be treated special otherwise they will not be built as plugins
|
||||
if ! use extraengine ; then
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
|
||||
-DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
|
||||
fi
|
||||
|
||||
mycmakeargs+=(
|
||||
-DWITH_JEMALLOC=$(usex jemalloc system)
|
||||
-D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1
|
||||
-D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1
|
||||
-D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1
|
||||
-DINSTALL_SQLBENCHDIR=share/mariadb
|
||||
)
|
||||
|
||||
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
|
||||
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
|
||||
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
|
||||
ewarn "You MUST file bugs without these variables set."
|
||||
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
|
||||
-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
|
||||
)
|
||||
|
||||
elif ! use latin1 ; then
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=utf8
|
||||
-DDEFAULT_COLLATION=utf8_general_ci
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=latin1
|
||||
-DDEFAULT_COLLATION=latin1_swedish_ci
|
||||
)
|
||||
fi
|
||||
mycmakeargs+=(
|
||||
-DEXTRA_CHARSETS=all
|
||||
-DDISABLE_SHARED=$(usex static YES NO)
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
-DENABLED_PROFILING=$(usex profiling)
|
||||
)
|
||||
|
||||
if use static; then
|
||||
mycmakeargs+=( -DWITH_PIC=1 )
|
||||
fi
|
||||
|
||||
if use jemalloc || use tcmalloc ; then
|
||||
mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
|
||||
fi
|
||||
|
||||
# Storage engines
|
||||
mycmakeargs+=(
|
||||
-DWITH_ARCHIVE_STORAGE_ENGINE=1
|
||||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
|
||||
-DWITH_CSV_STORAGE_ENGINE=1
|
||||
-DWITH_HEAP_STORAGE_ENGINE=1
|
||||
-DWITH_INNOBASE_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAM_STORAGE_ENGINE=1
|
||||
-DWITH_PARTITION_STORAGE_ENGINE=1
|
||||
)
|
||||
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_SERVER=1
|
||||
-DEXTRA_CHARSETS=none
|
||||
-DINSTALL_SQLBENCHDIR=
|
||||
)
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
|
||||
if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
|
||||
rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
|
||||
fi
|
||||
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Convenience links
|
||||
einfo "Making Convenience links for mysqlcheck multi-call binary"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqlrepair"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqloptimize"
|
||||
|
||||
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
|
||||
if [[ -d "${ED%/}/usr/data" ]] ; then
|
||||
rm -Rf "${ED%/}/usr/data" || die
|
||||
fi
|
||||
|
||||
# Unless they explicitly specific USE=test, then do not install the
|
||||
# testsuite. It DOES have a use to be installed, esp. when you want to do a
|
||||
# validation of your database configuration after tuning it.
|
||||
if ! use test ; then
|
||||
rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
|
||||
fi
|
||||
|
||||
# Configuration stuff
|
||||
einfo "Building default configuration ..."
|
||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
|
||||
[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
|
||||
local mycnf_src="my.cnf-5.5"
|
||||
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
|
||||
"${FILESDIR%/}/${mycnf_src}" \
|
||||
> "${TMPDIR%/}/my.cnf.ok" || die
|
||||
use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
|
||||
if use latin1 ; then
|
||||
sed -i \
|
||||
-e "/character-set/s|utf8|latin1|g" \
|
||||
"${TMPDIR%/}/my.cnf.ok" || die
|
||||
fi
|
||||
eprefixify "${TMPDIR%/}/my.cnf.ok"
|
||||
newins "${TMPDIR}/my.cnf.ok" my.cnf
|
||||
|
||||
if use server ; then
|
||||
einfo "Including support files and sample configurations"
|
||||
docinto "support-files"
|
||||
local script
|
||||
for script in \
|
||||
"${S%/}"/support-files/magic
|
||||
do
|
||||
[[ -f "$script" ]] && dodoc "${script}"
|
||||
done
|
||||
|
||||
docinto "scripts"
|
||||
for script in "${S%/}"/scripts/mysql* ; do
|
||||
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
|
||||
done
|
||||
# Manually install supporting files that conflict with other packages
|
||||
# but are needed for galera and initial installation
|
||||
exeinto /usr/libexec/mariadb
|
||||
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
|
||||
fi
|
||||
|
||||
#Remove mytop if perl is not selected
|
||||
[[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
|
||||
}
|
||||
|
||||
# Official test instructions:
|
||||
# USE='extraengine perl server' \
|
||||
# FEATURES='test userpriv -usersandbox' \
|
||||
# ebuild mariadb-X.X.XX.ebuild \
|
||||
# digest clean package
|
||||
src_test() {
|
||||
|
||||
_disable_test() {
|
||||
local rawtestname reason
|
||||
rawtestname="${1}" ; shift
|
||||
reason="${@}"
|
||||
ewarn "test '${rawtestname}' disabled: '${reason}'"
|
||||
echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
|
||||
}
|
||||
|
||||
local TESTDIR="${BUILD_DIR}/mysql-test"
|
||||
local retstatus_unit
|
||||
local retstatus_tests
|
||||
|
||||
if ! use server ; then
|
||||
einfo "Skipping server tests due to minimal build."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Bug #213475 - MySQL _will_ object strenously if your machine is named
|
||||
# localhost. Also causes weird failures.
|
||||
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
|
||||
|
||||
if [[ $UID -eq 0 ]]; then
|
||||
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
|
||||
fi
|
||||
has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
|
||||
|
||||
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
|
||||
# Run CTest (test-units)
|
||||
cmake-utils_src_test
|
||||
retstatus_unit=$?
|
||||
|
||||
# Ensure that parallel runs don't die
|
||||
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
|
||||
# Enable parallel testing, auto will try to detect number of cores
|
||||
# You may set this by hand.
|
||||
# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
|
||||
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
|
||||
|
||||
# create directories because mysqladmin might run out of order
|
||||
mkdir -p "${T}"/var-tests{,/log} || die
|
||||
|
||||
# Run mysql tests
|
||||
pushd "${TESTDIR}" > /dev/null || die
|
||||
|
||||
touch "${T}/disabled.def"
|
||||
# These are failing in MariaDB 5.5 for now and are believed to be
|
||||
# false positives:
|
||||
#
|
||||
# main.information_schema, binlog.binlog_statement_insert_delayed,
|
||||
# main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql,
|
||||
# funcs_1.is_columns_mysql
|
||||
# fails due to USE=-latin1 / utf8 default
|
||||
#
|
||||
# main.mysql_client_test, main.mysql_client_test_nonblock:
|
||||
# segfaults at random under Portage only, suspect resource limits.
|
||||
#
|
||||
# archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam
|
||||
# fails due to bad cleanup of previous tests when run in parallel
|
||||
# The tool is deprecated anyway
|
||||
# Bug 532288
|
||||
|
||||
local t
|
||||
for t in main.mysql_client_test main.mysql_client_test_nonblock \
|
||||
binlog.binlog_statement_insert_delayed main.information_schema \
|
||||
main.mysqld--help \
|
||||
archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
|
||||
funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do
|
||||
_disable_test "$t" "False positives in Gentoo"
|
||||
done
|
||||
|
||||
if ! use client-libs ; then
|
||||
_disable_test main.plugin_auth "Needs client libraries built"
|
||||
fi
|
||||
|
||||
# run mysql-test tests
|
||||
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
|
||||
retstatus_tests=$?
|
||||
|
||||
popd > /dev/null || die
|
||||
|
||||
# Cleanup is important for these testcases.
|
||||
pkill -9 -f "${S}/ndb" 2>/dev/null
|
||||
pkill -9 -f "${S}/sql" 2>/dev/null
|
||||
|
||||
local failures=""
|
||||
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
|
||||
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
|
||||
|
||||
[[ -z "$failures" ]] || die "Test failures: $failures"
|
||||
einfo "Tests successfully completed"
|
||||
}
|
||||
|
||||
mysql_init_vars() {
|
||||
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
|
||||
MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
|
||||
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
|
||||
MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
|
||||
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR=""
|
||||
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
|
||||
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
|
||||
| sed -ne '/datadir/s|^--datadir=||p' \
|
||||
| tail -n1`
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
|
||||
| sed -e 's/.*=\s*//' \
|
||||
| tail -n1`
|
||||
fi
|
||||
fi
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR="${MY_LOCALSTATEDIR}"
|
||||
einfo "Using default MY_DATADIR"
|
||||
fi
|
||||
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
|
||||
|
||||
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
|
||||
if [[ -e "${MY_DATADIR}" ]] ; then
|
||||
# If you get this and you're wondering about it, see bug #207636
|
||||
elog "MySQL datadir found in ${MY_DATADIR}"
|
||||
elog "A new one will not be created."
|
||||
PREVIOUS_DATADIR="yes"
|
||||
else
|
||||
PREVIOUS_DATADIR="no"
|
||||
fi
|
||||
export PREVIOUS_DATADIR
|
||||
fi
|
||||
else
|
||||
if [[ ${EBUILD_PHASE} == "config" ]]; then
|
||||
local new_MY_DATADIR
|
||||
new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
|
||||
| sed -ne '/datadir/s|^--datadir=||p' \
|
||||
| tail -n1`
|
||||
|
||||
if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
|
||||
ewarn "MySQL MY_DATADIR has changed"
|
||||
ewarn "from ${MY_DATADIR}"
|
||||
ewarn "to ${new_MY_DATADIR}"
|
||||
MY_DATADIR="${new_MY_DATADIR}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
|
||||
export MY_LOCALSTATEDIR MY_LOGDIR
|
||||
export MY_DATADIR
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
_getoptval() {
|
||||
local mypd="${EROOT}"usr/libexec/mariadb/my_print_defaults
|
||||
local section="$1"
|
||||
local flag="--${2}="
|
||||
local extra_options="${3}"
|
||||
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
|
||||
}
|
||||
local old_MY_DATADIR="${MY_DATADIR}"
|
||||
local old_HOME="${HOME}"
|
||||
# my_print_defaults needs to read stuff in $HOME/.my.cnf
|
||||
export HOME=${EPREFIX}/root
|
||||
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
|
||||
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
|
||||
die "Minimal builds do NOT include the MySQL server"
|
||||
fi
|
||||
|
||||
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
|
||||
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
|
||||
MY_DATADIR_s="${MY_DATADIR_s%%/}"
|
||||
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
|
||||
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
|
||||
|
||||
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
|
||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
|
||||
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
|
||||
else
|
||||
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
|
||||
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|
||||
|| die "Moving MY_DATADIR failed"
|
||||
fi
|
||||
else
|
||||
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
|
||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||
ewarn "Attempting to use ${MY_DATADIR_s}"
|
||||
else
|
||||
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
|
||||
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
local pwd1="a"
|
||||
local pwd2="b"
|
||||
local maxtry=15
|
||||
|
||||
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
|
||||
local tmp_mysqld_password_source=
|
||||
|
||||
for tmp_mysqld_password_source in mysql client; do
|
||||
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
|
||||
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
|
||||
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
|
||||
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
|
||||
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
|
||||
MYSQL_ROOT_PASSWORD=
|
||||
continue
|
||||
fi
|
||||
|
||||
einfo "Found password in '${tmp_mysqld_password_source}' section!"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
|
||||
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
|
||||
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
|
||||
fi
|
||||
|
||||
unset tmp_mysqld_password_source
|
||||
fi
|
||||
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n 1)"
|
||||
# These are dir+prefix
|
||||
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n 1)"
|
||||
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
|
||||
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n 1)"
|
||||
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
|
||||
|
||||
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
|
||||
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
|
||||
fi
|
||||
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
|
||||
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
|
||||
fi
|
||||
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
|
||||
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
|
||||
fi
|
||||
|
||||
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
|
||||
ewarn "You have already a MySQL database in place."
|
||||
ewarn "(${ROOT}/${MY_DATADIR}/*)"
|
||||
ewarn "Please rename or delete it if you wish to replace it."
|
||||
die "MySQL database already exists!"
|
||||
fi
|
||||
|
||||
# Bug #213475 - MySQL _will_ object strenously if your machine is named
|
||||
# localhost. Also causes weird failures.
|
||||
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
|
||||
|
||||
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
|
||||
|
||||
einfo "Please provide a password for the mysql 'root' user now"
|
||||
einfo "or through the ${HOME}/.my.cnf file."
|
||||
ewarn "Avoid [\"'\\_%] characters in the password"
|
||||
read -rsp " >" pwd1 ; echo
|
||||
|
||||
einfo "Retype the password"
|
||||
read -rsp " >" pwd2 ; echo
|
||||
|
||||
if [[ "x$pwd1" != "x$pwd2" ]] ; then
|
||||
die "Passwords are not the same"
|
||||
fi
|
||||
MYSQL_ROOT_PASSWORD="${pwd1}"
|
||||
unset pwd1 pwd2
|
||||
fi
|
||||
|
||||
local options
|
||||
local sqltmp="$(emktemp)"
|
||||
|
||||
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
|
||||
# see https://bugs.mysql.com/bug.php?id=31312
|
||||
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
|
||||
|
||||
# Figure out which options we need to disable to do the setup
|
||||
local helpfile="${TMPDIR}/mysqld-help"
|
||||
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
|
||||
for opt in grant-tables host-cache name-resolve networking slave-start \
|
||||
federated ssl log-bin relay-log slow-query-log external-locking \
|
||||
log-slave-updates \
|
||||
; do
|
||||
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
|
||||
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
|
||||
done
|
||||
|
||||
einfo "Creating the mysql database and setting proper permissions on it ..."
|
||||
|
||||
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
|
||||
PID_DIR="${EROOT}/var/run/mysqld"
|
||||
if [[ ! -d "${PID_DIR}" ]]; then
|
||||
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${MY_DATADIR}" ]]; then
|
||||
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
|
||||
fi
|
||||
|
||||
pushd "${TMPDIR}" &>/dev/null || die
|
||||
|
||||
# Filling timezones, see
|
||||
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
|
||||
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
|
||||
|
||||
local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
|
||||
[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
|
||||
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
|
||||
einfo "Command: ${cmd[*]}"
|
||||
su -s /bin/sh -c "${cmd[*]}" mysql \
|
||||
>"${TMPDIR}"/mysql_install_db.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
|
||||
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|
||||
|| die "MySQL databases not installed"
|
||||
|
||||
use prefix || options="${options} --user=mysql"
|
||||
|
||||
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
|
||||
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
|
||||
local mysqld="${EROOT}/usr/sbin/mysqld \
|
||||
${options} \
|
||||
--log-warnings=0 \
|
||||
--basedir=${EROOT}/usr \
|
||||
--datadir=${ROOT}/${MY_DATADIR} \
|
||||
--max_allowed_packet=8M \
|
||||
--net_buffer_length=16K \
|
||||
--socket=${socket} \
|
||||
--pid-file=${pidfile} \
|
||||
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
|
||||
#einfo "About to start mysqld: ${mysqld}"
|
||||
ebegin "Starting mysqld"
|
||||
einfo "Command ${mysqld}"
|
||||
${mysqld} &
|
||||
rc=$?
|
||||
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
|
||||
maxtry=$((${maxtry}-1))
|
||||
echo -n "."
|
||||
sleep 1
|
||||
done
|
||||
eend $rc
|
||||
|
||||
if ! [[ -S "${socket}" ]]; then
|
||||
die "Completely failed to start up mysqld with: ${mysqld}"
|
||||
fi
|
||||
|
||||
ebegin "Setting root password"
|
||||
# Do this from memory, as we don't want clear text passwords in temp files
|
||||
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
|
||||
"${EROOT}/usr/bin/mysql" \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-e "${sql}"
|
||||
eend $?
|
||||
|
||||
if [[ -n "${sqltmp}" ]] ; then
|
||||
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
|
||||
"${EROOT}/usr/bin/mysql" \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-uroot \
|
||||
--password="${MYSQL_ROOT_PASSWORD}" \
|
||||
mysql < "${sqltmp}"
|
||||
rc=$?
|
||||
eend $?
|
||||
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
|
||||
fi
|
||||
|
||||
# Stop the server and cleanup
|
||||
einfo "Stopping the server ..."
|
||||
kill $(< "${pidfile}" )
|
||||
rm -f "${sqltmp}"
|
||||
wait %1
|
||||
einfo "Done"
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,361 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
|
||||
|
||||
MY_P="Python-${PV}"
|
||||
PATCHSET_VERSION="2.7.17"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="https://www.python.org/"
|
||||
SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="2.7"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
|
||||
IUSE="-berkdb bluetooth build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="app-arch/bzip2:0=
|
||||
>=sys-libs/zlib-1.1.3:0=
|
||||
virtual/libffi:=
|
||||
virtual/libintl
|
||||
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
|
||||
sys-libs/db:4.4
|
||||
sys-libs/db:4.3
|
||||
sys-libs/db:4.2
|
||||
) )
|
||||
gdbm? ( sys-libs/gdbm:0=[berkdb] )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:0= )
|
||||
readline? ( >=sys-libs/readline-4.1:0= )
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:0=
|
||||
>=dev-lang/tk-8.0:0=
|
||||
dev-tcltk/blt:0=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
xml? ( >=dev-libs/expat-2.1 )
|
||||
!!<sys-apps/portage-2.1.9"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/autoconf-2.65
|
||||
!sys-devel/gcc[libffi(-)]"
|
||||
RDEPEND+=" !build? ( app-misc/mime-types )
|
||||
doc? ( dev-python/python-docs:${SLOT} )"
|
||||
PDEPEND=">=app-eselect/eselect-python-20140125-r1"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
pkg_setup() {
|
||||
if use berkdb; then
|
||||
ewarn "'bsddb' module is out-of-date and no longer maintained inside"
|
||||
ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
|
||||
ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
|
||||
ewarn "is provided by dev-python/bsddb3."
|
||||
else
|
||||
if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
|
||||
ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
|
||||
ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
|
||||
ewarn "You might need to migrate your databases."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat, libffi and zlib are not used.
|
||||
rm -r Modules/expat || die
|
||||
rm -r Modules/_ctypes/libffi* || die
|
||||
rm -r Modules/zlib || die
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
rm "${WORKDIR}/patches/0006-Regenerate-platform-specific-modules.patch" || die
|
||||
fi
|
||||
|
||||
local PATCHES=(
|
||||
"${WORKDIR}/patches"
|
||||
# Fix for cross-compiling.
|
||||
"${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
|
||||
"${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
|
||||
"${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
|
||||
"${FILESDIR}/python-2.7.10-system-libffi.patch"
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
|
||||
Lib/distutils/command/install.py \
|
||||
Lib/distutils/sysconfig.py \
|
||||
Lib/site.py \
|
||||
Lib/sysconfig.py \
|
||||
Lib/test/test_site.py \
|
||||
Makefile.pre.in \
|
||||
Modules/Setup.dist \
|
||||
Modules/getpath.c \
|
||||
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# dbm module can be linked against berkdb or gdbm.
|
||||
# Defaults to gdbm when both are enabled, #204343.
|
||||
local disable
|
||||
use berkdb || use gdbm || disable+=" dbm"
|
||||
use berkdb || disable+=" _bsddb"
|
||||
# disable automagic bluetooth headers detection
|
||||
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
|
||||
use gdbm || disable+=" gdbm"
|
||||
use ncurses || disable+=" _curses _curses_panel"
|
||||
use readline || disable+=" readline"
|
||||
use sqlite || disable+=" _sqlite3"
|
||||
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||
use tk || disable+=" _tkinter"
|
||||
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
|
||||
export PYTHON_DISABLE_MODULES="${disable}"
|
||||
|
||||
if ! use xml; then
|
||||
ewarn "You have configured Python without XML support."
|
||||
ewarn "This is NOT a recommended configuration as you"
|
||||
ewarn "may face problems parsing any XML documents."
|
||||
fi
|
||||
|
||||
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||
fi
|
||||
|
||||
if [[ "$(gcc-major-version)" -ge 4 ]]; then
|
||||
append-flags -fwrapv
|
||||
fi
|
||||
|
||||
filter-flags -malign-double
|
||||
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=50309
|
||||
if is-flagq -O3; then
|
||||
is-flagq -fstack-protector-all && replace-flags -O3 -O2
|
||||
use hardened && replace-flags -O3 -O2
|
||||
fi
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
# Force some tests that try to poke fs paths.
|
||||
export ac_cv_file__dev_ptc=no
|
||||
export ac_cv_file__dev_ptmx=yes
|
||||
fi
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
|
||||
tc-export CXX
|
||||
# The configure script fails to use pkg-config correctly.
|
||||
# http://bugs.python.org/issue15506
|
||||
export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
|
||||
|
||||
# Set LDFLAGS so we link modules with -lpython2.7 correctly.
|
||||
# Needed on FreeBSD unless Python 2.7 is already installed.
|
||||
# Please query BSD team before removing this!
|
||||
append-ldflags "-L."
|
||||
|
||||
local dbmliborder
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
if use berkdb; then
|
||||
dbmliborder+="${dbmliborder:+:}bdb"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
# The check is broken on clang, and gives false positive:
|
||||
# https://bugs.gentoo.org/596798
|
||||
# (upstream dropped this flag in 3.2a4 anyway)
|
||||
ac_cv_opt_olimit_ok=no
|
||||
|
||||
--with-fpectl
|
||||
--enable-shared
|
||||
$(use_enable ipv6)
|
||||
$(use_with threads)
|
||||
$(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2")
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--with-system-expat
|
||||
--with-system-ffi
|
||||
--without-ensurepip
|
||||
)
|
||||
|
||||
OPT= econf "${myeconfargs[@]}"
|
||||
|
||||
if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||
eerror "configure has detected that the sem_open function is broken."
|
||||
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||
die "Broken sem_open function (bug 496328)"
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Avoid invoking pgen for cross-compiles.
|
||||
touch Include/graminit.h Python/graminit.c
|
||||
|
||||
emake
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax_kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
# Skip failing tests.
|
||||
local skipped_tests="distutils gdb"
|
||||
|
||||
for test in ${skipped_tests}; do
|
||||
mv "${S}"/Lib/test/test_${test}.py "${T}"
|
||||
done
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
|
||||
# Daylight saving time problem
|
||||
# https://bugs.python.org/issue22067
|
||||
# https://bugs.gentoo.org/610628
|
||||
local -x TZ=UTC
|
||||
|
||||
# Rerun failed tests in verbose mode (regrtest -w).
|
||||
emake test EXTRATESTOPTS="-w" < /dev/tty
|
||||
local result="$?"
|
||||
|
||||
for test in ${skipped_tests}; do
|
||||
mv "${T}/test_${test}.py" "${S}"/Lib/test
|
||||
done
|
||||
|
||||
elog "The following tests have been skipped:"
|
||||
for test in ${skipped_tests}; do
|
||||
elog "test_${test}.py"
|
||||
done
|
||||
|
||||
elog "If you would like to run them, you may:"
|
||||
elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
|
||||
elog "and run the tests separately."
|
||||
|
||||
if [[ "${result}" -ne 0 ]]; then
|
||||
die "emake test failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
|
||||
|
||||
emake DESTDIR="${D}" altinstall
|
||||
|
||||
sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed"
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}"
|
||||
mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}"
|
||||
mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}"
|
||||
rm -f "${ED}usr/bin/smtpd.py"
|
||||
|
||||
use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die
|
||||
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
|
||||
use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die
|
||||
use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
|
||||
|
||||
use threads || rm -r "${libdir}/multiprocessing" || die
|
||||
use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die
|
||||
|
||||
dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
dodoc -r "${S}"/Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
|
||||
emake --no-print-directory -s -f - 2>/dev/null)
|
||||
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${SLOT}:" \
|
||||
-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
|
||||
|
||||
# for python-exec
|
||||
local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
|
||||
|
||||
# if not using a cross-compiler, use the fresh binary
|
||||
if ! tc-is-cross-compiler; then
|
||||
local -x PYTHON=./python
|
||||
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
|
||||
else
|
||||
vars=( PYTHON "${vars[@]}" )
|
||||
fi
|
||||
|
||||
python_export "python${SLOT}" "${vars[@]}"
|
||||
echo "EPYTHON='${EPYTHON}'" > epython.py || die
|
||||
python_domodule epython.py
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${SLOT%.*}
|
||||
mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/python${SLOT}" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die
|
||||
# python-config and pythonX-config
|
||||
ln -s "../../../bin/python${SLOT}-config" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" "${D}${PYTHON_SCRIPTDIR}/python-config" || die
|
||||
# 2to3, pydoc, pyvenv
|
||||
ln -s "../../../bin/2to3-${SLOT}" "${D}${PYTHON_SCRIPTDIR}/2to3" || die
|
||||
ln -s "../../../bin/pydoc${SLOT}" "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${SLOT}" "${D}${PYTHON_SCRIPTDIR}/idle" || die
|
||||
fi
|
||||
}
|
||||
|
||||
eselect_python_update() {
|
||||
if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
|
||||
eselect python update
|
||||
fi
|
||||
|
||||
if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
|
||||
eselect python update --python${PV%%.*}
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect_python_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect_python_update
|
||||
}
|
@ -0,0 +1,368 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
|
||||
|
||||
MY_P="Python-${PV/_/}"
|
||||
PATCHSET_VERSION="3.5.4-0"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="https://www.python.org/"
|
||||
SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="3.5/3.5m"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
|
||||
IUSE="bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="app-arch/bzip2:0=
|
||||
app-arch/xz-utils:0=
|
||||
>=sys-libs/zlib-1.1.3:0=
|
||||
virtual/libffi:=
|
||||
virtual/libintl
|
||||
gdbm? ( sys-libs/gdbm:0=[berkdb] )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:0= )
|
||||
readline? ( >=sys-libs/readline-4.1:0= )
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:0=
|
||||
>=dev-lang/tk-8.0:0=
|
||||
dev-tcltk/blt:0=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
xml? ( >=dev-libs/expat-2.1:0= )
|
||||
!!<sys-apps/sandbox-2.6-r1"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
virtual/pkgconfig
|
||||
!sys-devel/gcc[libffi(-)]"
|
||||
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||
PDEPEND=">=app-eselect/eselect-python-20140125-r1"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
PYVER=${SLOT%/*}
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat, libffi and zlib are not used.
|
||||
rm -fr Modules/expat
|
||||
rm -fr Modules/_ctypes/libffi*
|
||||
rm -fr Modules/zlib
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
# Invokes BUILDPYTHON, which is built for the host arch
|
||||
local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
|
||||
fi
|
||||
|
||||
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
|
||||
epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
|
||||
epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
|
||||
epatch "${FILESDIR}/3.6-disable-nis.patch"
|
||||
# epatch "${FILESDIR}/python-3.5.5-libressl-compatibility.patch"
|
||||
epatch "${FILESDIR}/python-3.5.5-hash-unaligned.patch"
|
||||
|
||||
epatch_user
|
||||
|
||||
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
|
||||
configure.ac \
|
||||
Lib/distutils/command/install.py \
|
||||
Lib/distutils/sysconfig.py \
|
||||
Lib/site.py \
|
||||
Lib/sysconfig.py \
|
||||
Lib/test/test_site.py \
|
||||
Makefile.pre.in \
|
||||
Modules/getpath.c \
|
||||
Modules/Setup.dist \
|
||||
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local disable
|
||||
# disable automagic bluetooth headers detection
|
||||
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
|
||||
use gdbm || disable+=" gdbm"
|
||||
use ncurses || disable+=" _curses _curses_panel"
|
||||
use readline || disable+=" readline"
|
||||
use sqlite || disable+=" _sqlite3"
|
||||
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||
use tk || disable+=" _tkinter"
|
||||
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
|
||||
export PYTHON_DISABLE_MODULES="${disable}"
|
||||
|
||||
if ! use xml; then
|
||||
ewarn "You have configured Python without XML support."
|
||||
ewarn "This is NOT a recommended configuration as you"
|
||||
ewarn "may face problems parsing any XML documents."
|
||||
fi
|
||||
|
||||
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||
fi
|
||||
|
||||
if [[ "$(gcc-major-version)" -ge 4 ]]; then
|
||||
append-flags -fwrapv
|
||||
fi
|
||||
|
||||
filter-flags -malign-double
|
||||
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=50309
|
||||
if is-flagq -O3; then
|
||||
is-flagq -fstack-protector-all && replace-flags -O3 -O2
|
||||
use hardened && replace-flags -O3 -O2
|
||||
fi
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||
tc-export CXX
|
||||
|
||||
# The configure script fails to use pkg-config correctly.
|
||||
# http://bugs.python.org/issue15506
|
||||
export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
|
||||
|
||||
# Set LDFLAGS so we link modules with -lpython3.2 correctly.
|
||||
# Needed on FreeBSD unless Python 3.2 is already installed.
|
||||
# Please query BSD team before removing this!
|
||||
append-ldflags "-L."
|
||||
|
||||
local dbmliborder
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
|
||||
BUILD_DIR="${WORKDIR}/${CHOST}"
|
||||
mkdir -p "${BUILD_DIR}" || die
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
local myeconfargs=(
|
||||
--with-fpectl
|
||||
--enable-shared
|
||||
$(use_enable ipv6)
|
||||
$(use_with threads)
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--with-system-expat
|
||||
--with-system-ffi
|
||||
)
|
||||
|
||||
ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}"
|
||||
|
||||
if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||
eerror "configure has detected that the sem_open function is broken."
|
||||
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||
die "Broken sem_open function (bug 496328)"
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax_kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
# Skip failing tests.
|
||||
local skipped_tests="gdb"
|
||||
|
||||
for test in ${skipped_tests}; do
|
||||
mv "${S}"/Lib/test/test_${test}.py "${T}"
|
||||
done
|
||||
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||
local result=$?
|
||||
|
||||
for test in ${skipped_tests}; do
|
||||
mv "${T}/test_${test}.py" "${S}"/Lib/test
|
||||
done
|
||||
|
||||
elog "The following tests have been skipped:"
|
||||
for test in ${skipped_tests}; do
|
||||
elog "test_${test}.py"
|
||||
done
|
||||
|
||||
elog "If you would like to run them, you may:"
|
||||
elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
|
||||
elog "and run the tests separately."
|
||||
|
||||
if [[ ${result} -ne 0 ]]; then
|
||||
die "emake test failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
|
||||
|
||||
cd "${BUILD_DIR}" || die
|
||||
|
||||
emake DESTDIR="${D}" altinstall
|
||||
|
||||
sed \
|
||||
-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
|
||||
-e "s/\(PY_LDFLAGS=\).*/\1/" \
|
||||
-i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
rm -f "${ED}usr/$(get_libdir)/libpython3.so"
|
||||
|
||||
# Cheap hack to get version with ABIFLAGS
|
||||
local abiver=$(cd "${ED}usr/include"; echo python*)
|
||||
if [[ ${abiver} != python${PYVER} ]]; then
|
||||
# Replace python3.X with a symlink to python3.Xm
|
||||
rm "${ED}usr/bin/python${PYVER}" || die
|
||||
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||
# Create python3.X-config symlink
|
||||
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||
# Create python-3.5m.pc symlink
|
||||
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||
fi
|
||||
|
||||
# python seems to get rebuilt in src_install (bug 569908)
|
||||
# Work around it for now.
|
||||
if has_version dev-libs/libffi[pax_kernel]; then
|
||||
pax-mark E "${ED}usr/bin/${abiver}"
|
||||
else
|
||||
pax-mark m "${ED}usr/bin/${abiver}"
|
||||
fi
|
||||
|
||||
use elibc_uclibc && rm -fr "${libdir}/test"
|
||||
use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
|
||||
use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
|
||||
|
||||
use threads || rm -fr "${libdir}/multiprocessing"
|
||||
use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
|
||||
|
||||
dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
|
||||
dodoc -r "${S}"/Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
|
||||
emake --no-print-directory -s -f - 2>/dev/null)
|
||||
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||
-i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||
|
||||
# for python-exec
|
||||
local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
|
||||
|
||||
# if not using a cross-compiler, use the fresh binary
|
||||
if ! tc-is-cross-compiler; then
|
||||
local -x PYTHON=./python
|
||||
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
|
||||
else
|
||||
vars=( PYTHON "${vars[@]}" )
|
||||
fi
|
||||
|
||||
python_export "python${PYVER}" "${vars[@]}"
|
||||
echo "EPYTHON='${EPYTHON}'" > epython.py || die
|
||||
python_domodule epython.py
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${PYVER%.*}
|
||||
mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/${abiver}" \
|
||||
"${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" \
|
||||
"${D}${PYTHON_SCRIPTDIR}/python" || die
|
||||
# python-config and pythonX-config
|
||||
# note: we need to create a wrapper rather than symlinking it due
|
||||
# to some random dirname(argv[0]) magic performed by python-config
|
||||
cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
|
||||
#!/bin/sh
|
||||
exec "${abiver}-config" "\${@}"
|
||||
EOF
|
||||
chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" \
|
||||
"${D}${PYTHON_SCRIPTDIR}/python-config" || die
|
||||
# 2to3, pydoc, pyvenv
|
||||
ln -s "../../../bin/2to3-${PYVER}" \
|
||||
"${D}${PYTHON_SCRIPTDIR}/2to3" || die
|
||||
ln -s "../../../bin/pydoc${PYVER}" \
|
||||
"${D}${PYTHON_SCRIPTDIR}/pydoc" || die
|
||||
ln -s "../../../bin/pyvenv-${PYVER}" \
|
||||
"${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${PYVER}" \
|
||||
"${D}${PYTHON_SCRIPTDIR}/idle" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
|
||||
python_updater_warning="1"
|
||||
fi
|
||||
}
|
||||
|
||||
eselect_python_update() {
|
||||
if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
|
||||
eselect python update
|
||||
fi
|
||||
|
||||
if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
|
||||
eselect python update --python${PV%%.*}
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect_python_update
|
||||
|
||||
if [[ "${python_updater_warning}" == "1" ]]; then
|
||||
ewarn "You have just upgraded from an older version of Python."
|
||||
ewarn
|
||||
ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect_python_update
|
||||
}
|
@ -0,0 +1,331 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
|
||||
|
||||
MY_P="Python-${PV}"
|
||||
PYVER=$(ver_cut 1-2)
|
||||
PATCHSET_VERSION="3.8.0"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="https://www.python.org/"
|
||||
SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="${PYVER}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
|
||||
IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="app-arch/bzip2:=
|
||||
app-arch/xz-utils:=
|
||||
sys-apps/util-linux:=
|
||||
>=sys-libs/zlib-1.1.3:=
|
||||
virtual/libffi:=
|
||||
virtual/libintl
|
||||
gdbm? ( sys-libs/gdbm:0=[berkdb] )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||
readline? ( >=sys-libs/readline-4.1:= )
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
xml? ( >=dev-libs/expat-2.1:= )
|
||||
!!<sys-apps/sandbox-2.6-r1"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
test? ( app-arch/xz-utils[extra-filters(+)] )
|
||||
virtual/pkgconfig
|
||||
!sys-devel/gcc[libffi(-)]"
|
||||
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||
PDEPEND=">=app-eselect/eselect-python-20140125-r1"
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat, libffi and zlib are not used.
|
||||
rm -fr Modules/expat || die
|
||||
rm -fr Modules/_ctypes/libffi* || die
|
||||
rm -fr Modules/zlib || die
|
||||
|
||||
local PATCHES=(
|
||||
"${FILESDIR}/python-3.7.5-hashlib.patch"
|
||||
"${WORKDIR}/patches"
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
|
||||
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local disable
|
||||
# disable automagic bluetooth headers detection
|
||||
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
|
||||
use gdbm || disable+=" gdbm"
|
||||
use ncurses || disable+=" _curses _curses_panel"
|
||||
use readline || disable+=" readline"
|
||||
use sqlite || disable+=" _sqlite3"
|
||||
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||
use tk || disable+=" _tkinter"
|
||||
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
|
||||
export PYTHON_DISABLE_MODULES="${disable}"
|
||||
|
||||
if ! use xml; then
|
||||
ewarn "You have configured Python without XML support."
|
||||
ewarn "This is NOT a recommended configuration as you"
|
||||
ewarn "may face problems parsing any XML documents."
|
||||
fi
|
||||
|
||||
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||
fi
|
||||
|
||||
if [[ "$(gcc-major-version)" -ge 4 ]]; then
|
||||
append-flags -fwrapv
|
||||
fi
|
||||
|
||||
filter-flags -malign-double
|
||||
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=50309
|
||||
if is-flagq -O3; then
|
||||
is-flagq -fstack-protector-all && replace-flags -O3 -O2
|
||||
use hardened && replace-flags -O3 -O2
|
||||
fi
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||
tc-export CXX
|
||||
|
||||
# Set LDFLAGS so we link modules with -lpython3.2 correctly.
|
||||
# Needed on FreeBSD unless Python 3.2 is already installed.
|
||||
# Please query BSD team before removing this!
|
||||
append-ldflags "-L."
|
||||
|
||||
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||
use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||
|
||||
local dbmliborder
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
--enable-shared
|
||||
$(use_enable ipv6)
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--with-system-expat
|
||||
--with-system-ffi
|
||||
)
|
||||
|
||||
OPT="" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
|
||||
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax_kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
# Skip failing tests.
|
||||
local skipped_tests="gdb"
|
||||
|
||||
for test in ${skipped_tests}; do
|
||||
mv "${S}"/Lib/test/test_${test}.py "${T}"
|
||||
done
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||
local result=$?
|
||||
|
||||
for test in ${skipped_tests}; do
|
||||
mv "${T}/test_${test}.py" "${S}"/Lib/test
|
||||
done
|
||||
|
||||
elog "The following tests have been skipped:"
|
||||
for test in ${skipped_tests}; do
|
||||
elog "test_${test}.py"
|
||||
done
|
||||
|
||||
elog "If you would like to run them, you may:"
|
||||
elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
|
||||
elog "and run the tests separately."
|
||||
|
||||
if [[ ${result} -ne 0 ]]; then
|
||||
die "emake test failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/lib/python${PYVER}
|
||||
|
||||
emake DESTDIR="${D}" altinstall
|
||||
|
||||
# Remove static library
|
||||
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
|
||||
|
||||
sed \
|
||||
-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
|
||||
-e "s/\(PY_LDFLAGS=\).*/\1/" \
|
||||
-i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||
|
||||
# Cheap hack to get version with ABIFLAGS
|
||||
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||
if [[ ${abiver} != python${PYVER} ]]; then
|
||||
# Replace python3.X with a symlink to python3.Xm
|
||||
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||
# Create python3.X-config symlink
|
||||
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||
# Create python-3.5m.pc symlink
|
||||
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||
fi
|
||||
|
||||
# python seems to get rebuilt in src_install (bug 569908)
|
||||
# Work around it for now.
|
||||
if has_version dev-libs/libffi[pax_kernel]; then
|
||||
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||
else
|
||||
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||
fi
|
||||
|
||||
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
|
||||
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||
|
||||
use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
|
||||
|
||||
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||
dodoc -r Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
|
||||
emake --no-print-directory -s -f - 2>/dev/null)
|
||||
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||
|
||||
# for python-exec
|
||||
local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
|
||||
|
||||
# if not using a cross-compiler, use the fresh binary
|
||||
if ! tc-is-cross-compiler; then
|
||||
local -x PYTHON=./python
|
||||
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
|
||||
else
|
||||
vars=( PYTHON "${vars[@]}" )
|
||||
fi
|
||||
|
||||
python_export "python${PYVER}" "${vars[@]}"
|
||||
echo "EPYTHON='${EPYTHON}'" > epython.py || die
|
||||
python_domodule epython.py
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${PYVER%.*}
|
||||
mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/${abiver}" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die
|
||||
# python-config and pythonX-config
|
||||
# note: we need to create a wrapper rather than symlinking it due
|
||||
# to some random dirname(argv[0]) magic performed by python-config
|
||||
cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
|
||||
#!/bin/sh
|
||||
exec "${abiver}-config" "\${@}"
|
||||
EOF
|
||||
chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" "${D}${PYTHON_SCRIPTDIR}/python-config" || die
|
||||
# 2to3, pydoc
|
||||
ln -s "../../../bin/2to3-${PYVER}" "${D}${PYTHON_SCRIPTDIR}/2to3" || die
|
||||
ln -s "../../../bin/pydoc${PYVER}" "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${PYVER}" "${D}${PYTHON_SCRIPTDIR}/idle" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
|
||||
python_updater_warning="1"
|
||||
fi
|
||||
}
|
||||
|
||||
eselect_python_update() {
|
||||
if [[ -z "$(eselect python show)" || ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then
|
||||
eselect python update
|
||||
fi
|
||||
|
||||
if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
|
||||
eselect python update --python${PV%%.*}
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect_python_update
|
||||
|
||||
if [[ "${python_updater_warning}" == "1" ]]; then
|
||||
ewarn "You have just upgraded from an older version of Python."
|
||||
ewarn
|
||||
ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect_python_update
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,2 @@
|
||||
DIST haml-4.0.7.gem 121856 BLAKE2B e2598df73b9bf7337c06f60b30fcf7925fa5948f4643051aabbbdf600d25dbc2f614c4cf2054a916f69ef431847279eee1fbdf02e9bf2811369f2c195ed00413 SHA512 5736ded231bb10a0c0932453294604075e24a9020c2658e703c13ebf7a8d148327188157f982a3aea5db6d6938beb372c0167dfbc4ff06325517b2c8bd71a568
|
||||
DIST haml-5.0.4.tar.gz 124580 BLAKE2B c22e464be26f65bd94b202b21604bb9fe3d740865832c9299d93606293794316a5262504e15583fdc2628a3015ea58f9924a9b3aab2f46340b305ad5af7968ac SHA512 125ae514f800b2dd58f7f339ef3bf8c15114c5738813d911985182d4e4b1e8551c92a89149427aa8bf3326f45c8f71f4f13f37ecb7e2bee5cb75163538f6a3a8
|
||||
DIST haml-5.1.0.tar.gz 125693 BLAKE2B 0a2e9044e7468a93b5fa62adc77131a67e79fe3701f86ba9dc341a5e33a52701bad09115137c7decfac92bd7e1aa92bbe6bd0a063ef5917c9c6cf4d072a9278a SHA512 97ed4eef3f1b0748c8d7c717dffc466db9da92c862bc90f9db05043facdbe58e605f83193a0d94b8bbcf2863ca0ab95de0a31ec266ee2907aacb94346fddd875
|
||||
DIST haml-5.1.1.tar.gz 125902 BLAKE2B b8564dca6a381038dae1b737b6f4a51089b96f618d684f43db6947bc738e06b073aa17241b406ed06fea48fda9c7ec759149829a5727f8da3df21da3cce22318 SHA512 fdc01762280cbece243d1ac1a3c8b6b484e3b01fcb2ff80df591d172ec6aed7240736095aa5a09149049ebb54cf24af32706772a6090c3171c84ccb069d12826
|
||||
DIST haml-5.1.2.tar.gz 126059 BLAKE2B 5d805f29c28d0f6355f7b79e5724ec1639a808cfae75c26633edddcc82d964a48dbc1654b780fb706529ca22abcaba953a1af6f483386c336035c079a719e585 SHA512 405976de297bfdbd6f010442d940205c404f057a54cd7162feb400b1831af3e4e60fd05a637a2f480204428512ca7dd66c02aca22b0006d6d515c06968eb08a3
|
||||
|
@ -1,57 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25 ruby26"
|
||||
|
||||
RUBY_FAKEGEM_TASK_TEST="MT_NO_PLUGINS=true test"
|
||||
RUBY_FAKEGEM_TASK_DOC="-Ilib doc"
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md FAQ.md README.md REFERENCE.md"
|
||||
RUBY_FAKEGEM_DOCDIR="doc"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="A ruby web page templating engine"
|
||||
HOMEPAGE="http://haml.info/"
|
||||
SRC_URI="https://github.com/haml/haml/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="5"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
IUSE="doc test"
|
||||
|
||||
RDEPEND="${RDEPEND} !!<dev-ruby/haml-4.0.7-r2"
|
||||
|
||||
ruby_add_rdepend ">=dev-ruby/temple-0.8.0 dev-ruby/tilt:*"
|
||||
|
||||
ruby_add_bdepend "
|
||||
test? (
|
||||
dev-ruby/minitest:5
|
||||
dev-ruby/nokogiri
|
||||
dev-ruby/railties:5.2
|
||||
dev-ruby/activemodel:5.2
|
||||
dev-ruby/actionpack:5.2
|
||||
)
|
||||
doc? (
|
||||
dev-ruby/yard
|
||||
>=dev-ruby/maruku-0.7.2-r1
|
||||
)"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e 's/git ls-files -z/find . -print0/' ${RUBY_FAKEGEM_GEMSPEC} || die
|
||||
|
||||
sed -i -e '/bundler/I s:^:#:' \
|
||||
-e 's/gem "minitest"/gem "minitest", "~>5.0"/'\
|
||||
-e '1igem "actionpack", "~>5.2"'\
|
||||
-e '1igem "activesupport", "~>5.2"; gem "activemodel", "~>5.2"'\
|
||||
-e '1igem "railties", "~>5.2"'\
|
||||
test/test_helper.rb || die
|
||||
# Remove test that fails when RedCloth is available
|
||||
sed -i -e "/should raise error when a Tilt filters dependencies are unavailable for extension/,/^ end/ s/^/#/"\
|
||||
test/filters_test.rb || die
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
USE_RUBY="ruby24 ruby25 ruby26"
|
||||
|
||||
RUBY_FAKEGEM_TASK_TEST="MT_NO_PLUGINS=true test"
|
||||
RUBY_FAKEGEM_TASK_DOC="-Ilib doc"
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md FAQ.md README.md REFERENCE.md"
|
||||
RUBY_FAKEGEM_DOCDIR="doc"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="A ruby web page templating engine"
|
||||
HOMEPAGE="http://haml.info/"
|
||||
SRC_URI="https://github.com/haml/haml/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="5"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
IUSE="doc test"
|
||||
|
||||
RDEPEND="${RDEPEND} !!<dev-ruby/haml-4.0.7-r2"
|
||||
|
||||
ruby_add_rdepend ">=dev-ruby/temple-0.8.0 dev-ruby/tilt:*"
|
||||
|
||||
ruby_add_bdepend "
|
||||
test? (
|
||||
dev-ruby/minitest:5
|
||||
dev-ruby/nokogiri
|
||||
dev-ruby/railties:5.2
|
||||
dev-ruby/activemodel:5.2
|
||||
dev-ruby/actionpack:5.2
|
||||
)
|
||||
doc? (
|
||||
dev-ruby/yard
|
||||
>=dev-ruby/maruku-0.7.2-r1
|
||||
)"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e 's/git ls-files -z/find . -print0/' ${RUBY_FAKEGEM_GEMSPEC} || die
|
||||
|
||||
sed -i -e '/bundler/I s:^:#:' \
|
||||
-e 's/gem "minitest"/gem "minitest", "~>5.0"/'\
|
||||
-e '1igem "actionpack", "~>5.2"'\
|
||||
-e '1igem "activesupport", "~>5.2"; gem "activemodel", "~>5.2"'\
|
||||
-e '1igem "railties", "~>5.2"'\
|
||||
test/test_helper.rb || die
|
||||
# Remove test that fails when RedCloth is available
|
||||
sed -i -e "/should raise error when a Tilt filters dependencies are unavailable for extension/,/^ end/ s/^/#/"\
|
||||
test/filters_test.rb || die
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
USE_RUBY="ruby24 ruby25 ruby26"
|
||||
|
||||
RUBY_FAKEGEM_TASK_TEST="MT_NO_PLUGINS=true test"
|
||||
RUBY_FAKEGEM_TASK_DOC="-Ilib doc"
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md FAQ.md README.md REFERENCE.md"
|
||||
RUBY_FAKEGEM_DOCDIR="doc"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="A ruby web page templating engine"
|
||||
HOMEPAGE="http://haml.info/"
|
||||
SRC_URI="https://github.com/haml/haml/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="5"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
IUSE="doc test"
|
||||
|
||||
RDEPEND="${RDEPEND} !!<dev-ruby/haml-4.0.7-r2"
|
||||
|
||||
ruby_add_rdepend ">=dev-ruby/temple-0.8.0 dev-ruby/tilt:*"
|
||||
|
||||
ruby_add_bdepend "
|
||||
test? (
|
||||
dev-ruby/minitest:5
|
||||
dev-ruby/nokogiri
|
||||
dev-ruby/railties:5.2
|
||||
dev-ruby/activemodel:5.2
|
||||
dev-ruby/actionpack:5.2
|
||||
)
|
||||
doc? (
|
||||
dev-ruby/yard
|
||||
>=dev-ruby/maruku-0.7.2-r1
|
||||
)"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e 's/git ls-files -z/find . -print0/' ${RUBY_FAKEGEM_GEMSPEC} || die
|
||||
|
||||
sed -i -e '/bundler/I s:^:#:' \
|
||||
-e 's/gem "minitest"/gem "minitest", "~>5.0"/'\
|
||||
-e '1igem "actionpack", "~>5.2"'\
|
||||
-e '1igem "activesupport", "~>5.2"; gem "activemodel", "~>5.2"'\
|
||||
-e '1igem "railties", "~>5.2"'\
|
||||
test/test_helper.rb || die
|
||||
# Remove test that fails when RedCloth is available
|
||||
sed -i -e "/should raise error when a Tilt filters dependencies are unavailable for extension/,/^ end/ s/^/#/"\
|
||||
test/filters_test.rb || die
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST loofah-2.2.3.gem 65536 BLAKE2B ce1dd5255b0089862d26926624ef6007416318b77f4eb818ff462d8f680f8ef901ecb6ae751e33e1881e303fd005a4bd776c0e6a575562ffb7fb0b62e376b753 SHA512 8e63e1d4e3719c2ffcc8cf3208dbdfa3eb6e328bb91fc8dc6de88c472aac47f1a22771928b08f3c6816c159c6a9672299823f5d48177ae543358e73444b8ac56
|
||||
DIST loofah-2.3.1.gem 68096 BLAKE2B 367cf64fe458cdfb0af3dc57012d892f830a7aa0df2d30f66cde7c2f5c31c1f29be4d1b83b85f3167bca1bc02fb750a420bce655b803ca4992ded3061c8fc82c SHA512 188e84818abc3a3eed39afd66a75e7fa3c0a29f8ec957441f43f4cbfd962c8c3ea848e83f435a3d61ffc667273b5ff006df39d718b7631a11b62ae2d3f78b6ba
|
||||
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
USE_RUBY="ruby23 ruby24 ruby25 ruby26"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_DOC="rdoc"
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Library for manipulating and transforming HTML/XML documents and fragments."
|
||||
HOMEPAGE="https://github.com/flavorjones/loofah"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_rdepend "=dev-ruby/crass-1.0* >=dev-ruby/crass-1.0.2 >=dev-ruby/nokogiri-1.5.9"
|
||||
|
||||
ruby_add_bdepend "test? ( >=dev-ruby/rr-1.1.0 )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
# Avoid unneeded development dependencies
|
||||
sed -i -e '/concourse/I s:^:#:' Rakefile || die
|
||||
|
||||
# Avoid test failing on different whitespace.
|
||||
sed -i -e '/test_fragment_whitewash_on_microsofty_markup/askip "gentoo"' test/integration/test_ad_hoc.rb || die
|
||||
}
|
||||
|
||||
each_ruby_test() {
|
||||
${RUBY} -Ilib:. -e 'Dir["test/test_*.rb"].each{|f| require f}' || die
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,38 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit xdg
|
||||
|
||||
DESCRIPTION="Nintendo DS emulator"
|
||||
HOMEPAGE="http://desmume.org/"
|
||||
SRC_URI="mirror://sourceforge/desmume/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/zziplib
|
||||
gnome-base/libglade
|
||||
media-libs/libsdl[joystick,opengl,video]
|
||||
sys-libs/zlib
|
||||
virtual/opengl
|
||||
x11-libs/agg
|
||||
>=x11-libs/gtk+-2.8.0:2
|
||||
x11-libs/gtkglext"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/intltool
|
||||
virtual/pkgconfig"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog README README.LIN )
|
||||
|
||||
# fix QA compiler warning, see
|
||||
# https://sourceforge.net/p/desmume/patches/172/
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-fix-pointer-conversion-warning.diff"
|
||||
"${FILESDIR}/${P}-gcc6.patch"
|
||||
"${FILESDIR}/${P}-gcc7.patch"
|
||||
)
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST freedroidRPG-0.16.tar.gz 225570013 BLAKE2B ad87ad3d368c94eb1f3dae2d4c3df97b9bc88acccbec4cbcd31e42b411bb96506faac23f8de9b0317a1ab926b34bd01196adce617ab7b731354049d3fb010643 SHA512 039ee4bfcd58e29a3cfa26ae7f2bc8aed7c289119476bb8f8486006910cf6a2127ba49f7526fac887392ca9e5320fb1a59ba068834e162348905423908b0755a
|
||||
DIST freedroidRPG-1.0rc2.tar.gz 233852127 BLAKE2B c87c2314d17037873acf4fc24ce20790c9ec40c8f7b1ea27e6ab9c543abb671bc50b3ff5b86900f7111d1f1a899213dcb90529d2e39918801c9cc3a42585f02e SHA512 a79afdb089691dd59b0128f34f7068c69fac8c057a0485bca3275f4914b1c9c0f21cbb9102ecdc99911b70456c078dbdeb8981fd7714836cd9535677bcc4d1e7
|
||||
|
@ -0,0 +1,97 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
|
||||
inherit autotools flag-o-matic desktop python-any-r1 xdg
|
||||
|
||||
MY_PV=$(ver_rs 2 '')
|
||||
DESCRIPTION="A modification of the classical Freedroid engine into an RPG"
|
||||
HOMEPAGE="http://www.freedroid.org"
|
||||
SRC_URI="ftp://ftp.osuosl.org/pub/freedroid/freedroidRPG-$(ver_cut 1-2)/freedroidRPG-${MY_PV}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="debug devtools nls opengl profile sanitize sound"
|
||||
|
||||
RDEPEND="
|
||||
sys-libs/zlib
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0
|
||||
media-libs/libsdl[opengl?,sound?,video]
|
||||
media-libs/sdl-image[jpeg,png]
|
||||
>=media-libs/sdl-gfx-2.0.21
|
||||
nls? ( virtual/libintl )
|
||||
opengl? ( virtual/opengl )
|
||||
sound? (
|
||||
media-libs/libogg
|
||||
media-libs/libvorbis
|
||||
media-libs/sdl-mixer[vorbis] )
|
||||
devtools? ( media-libs/sdl-ttf )"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
nls? ( sys-devel/gettext )
|
||||
sanitize? ( || ( sys-devel/gcc[sanitize] sys-devel/clang-runtime[sanitize] ) )"
|
||||
|
||||
S="${WORKDIR}/${PN}-${MY_PV^^}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e '/^dist_doc_DATA/d' \
|
||||
-e '/-pipe/d' \
|
||||
-e '/^SUBDIRS/s/pkgs//' \
|
||||
Makefile.am || die
|
||||
python_fix_shebang src data/sound
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# this can produce strange results due to 'imprecise' math computations
|
||||
filter-flags -ffast-math
|
||||
|
||||
local myconf=(
|
||||
--disable-fastmath
|
||||
--with-embedded-lua
|
||||
--localedir=/usr/share/locale
|
||||
$(use_enable nls)
|
||||
$(use_enable opengl)
|
||||
$(use_enable sound)
|
||||
$(use_enable debug)
|
||||
$(use_with debug extra-warnings)
|
||||
$(use_enable debug backtrace)
|
||||
$(use_enable sanitize sanitize-address)
|
||||
$(use_enable profile rtprof)
|
||||
$(use_enable devtools dev-tools)
|
||||
)
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local i
|
||||
|
||||
default
|
||||
for i in 48 64 96 128
|
||||
do
|
||||
doicon -s ${i} pkgs/freedesktop/icons/hicolor/${i}x${i}/apps/"${PN}".png
|
||||
done
|
||||
doicon -s scalable pkgs/freedesktop/icons/hicolor/scalable/apps/freedroidRPG.svg
|
||||
make_desktop_entry "${PN}" "Freedroid RPG" "${PN}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
local v min="1.0_rc1"
|
||||
for v in ${REPLACING_VERSIONS}; do
|
||||
if ver_test "${v}" -lt "${min}"; then
|
||||
echo
|
||||
ewarn "${P} is not compatible with save games before ${min}."
|
||||
ewarn "Please start a new character."
|
||||
echo
|
||||
fi
|
||||
done
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST SearchAndRescue-1.5.0.tar.gz 1473765 BLAKE2B cf7dcbb4d250a124a5450115e4fa6f016e83ba16a5ba12cbc53a3c3725643f0a0d306853a3239471ae87d4fc5bef16f2fe903601daf24e2c7a8e3dc71b1a1c2f SHA512 72a8e5c375bb2f5d11d1346bb3c81ea4678a9c58c36f53c048e9a16d32a926ff93c3ec9756867f0869aa2a8da5fb0bfe7764f704c4e79519ee0834d225513657
|
||||
DIST SearchAndRescue-data-1.3.0.tar.gz 52152370 BLAKE2B e6f19b03f45d971c43cfeb72e3202fbf99c1e3d276acc8e133e6c345b08f19cfdc1ae997fdb3d90e173fe5a6bd46685ac3903b1e1da3eda7fa105fc8d9547c7f SHA512 5419376aeecb0f05570a8d2a0a6f830f3b22ce9d1d34a5e490485767546c6d0d1d2a2a3f37e5dfcef69e271a94a9c7dfc6b592e3c0dd62a8a6c38e4bf7d25ccd
|
||||
DIST SearchAndRescue-1.7.0.tar 6256640 BLAKE2B 9ccf63408499bd5f44a1eb6d24656ca5403eb732bd166ccd263d5fdd6f29e5168a563cda4e59eff74d39fa832876f0f04451042baf99d332d748828d0f03b7de SHA512 36295e7c20e685068ba6448b5f579eb53fedba663f76ac1d0db1da1765fbbfe6c1c4728e8a90680250ebbb3f4ad181fbe5bdd2f0fc703c774ec27dc829feacc9
|
||||
DIST SearchAndRescue-data-1.7.0.tar 52141474 BLAKE2B 2f43e1349d27c11e441d01d7421d9e5b9145d99c6685ddfb1e2a713269123f9cfc2c655359fa65fa09844dcbf3958bc9d4b2c51c4f9c03e401e2bc40f8953f40 SHA512 a323c50a2c64705ebd43c27e836f088094085bc4f5d219a9b0341cc3b16aafe96e364eb36162a7acb6a59aefe6304767f497e2d7bb0dc29d881f51e6535a6295
|
||||
DIST SearchAndRescue-data-guadarrama-1.7.0.tar 41738769 BLAKE2B 8c0d02ca8bce7d70eb1016d4676eb35da5c20d1e2c5e65602d8d7414e2ee8bec9bf13399dd3576a3379b62ebc3d7fd7ba85ea33cc1ff2c179278a59bf623daf3 SHA512 1c9615858fc778832566991ee4802c0929c81a9b0b720e5db90b4bb0baff718fa0ba589fe33444ee7eb040622081d60c10036af2b199bf2bd0a7f5f45ba71c72
|
||||
|
@ -1,66 +0,0 @@
|
||||
--- searchandrescue_1.3.0.orig/sar/makefile_append.ini
|
||||
+++ searchandrescue_1.3.0/sar/makefile_append.ini
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
# C++ flags:
|
||||
-CPPFLAGS = -D__cplusplus -Dc_plusplus
|
||||
+CPPFLAGS += -D__cplusplus -Dc_plusplus
|
||||
|
||||
|
||||
# Source files list:
|
||||
@@ -16,14 +16,12 @@
|
||||
OBJ_CPP = $(SRC_CPP:.cpp=.o)
|
||||
.c.o:
|
||||
@echo "Compiling module $*.o"
|
||||
- @$(CC) -c $*.c $(INC_DIRS) $(CFLAGS)
|
||||
+ $(CC) -c $*.c $(INC_DIRS) $(CFLAGS)
|
||||
.cpp.o:
|
||||
@echo "Compiling module $*.o"
|
||||
- @$(CPP) -c $*.cpp $(INC_DIRS) $(CFLAGS) $(CPPFLAGS)
|
||||
+ $(CPP) -c $*.cpp $(INC_DIRS) $(CPPFLAGS)
|
||||
|
||||
# Programs
|
||||
-LS = ls
|
||||
-LSFLAGS = -s -h -c --color=auto
|
||||
RM = rm
|
||||
RMFLAGS = -f
|
||||
|
||||
@@ -32,9 +30,8 @@
|
||||
|
||||
modules: $(OBJ_C) $(OBJ_CPP)
|
||||
@echo -n "Linking modules..."
|
||||
- @$(CPP) $(OBJ_C) $(OBJ_CPP) -o $(BIN) $(LIBS) $(LIB_DIRS)
|
||||
+ $(CPP) $(OBJ_C) $(OBJ_CPP) $(LDFLAGS) -o $(BIN) $(LIBS) $(LIB_DIRS)
|
||||
@echo -n " "
|
||||
- @-$(LS) $(LSFLAGS) $(BIN)
|
||||
|
||||
prebuild:
|
||||
@echo "Building program \"$(BIN)\"..."
|
||||
@@ -54,5 +51,5 @@
|
||||
clean:
|
||||
@echo "Cleaning program \"$(BIN)\"..."
|
||||
@echo "Deleting all intermediate files..."
|
||||
- @$(RM) $(RMFLAGS) a.out core *.o $(BIN)
|
||||
+ $(RM) $(RMFLAGS) a.out core *.o $(BIN)
|
||||
@echo "Clean done."
|
||||
--- searchandrescue_1.3.0.orig/sar/platforms.ini
|
||||
+++ searchandrescue_1.3.0/sar/platforms.ini
|
||||
@@ -102,7 +102,7 @@
|
||||
FeatureDepend = xf86vidmode-lib
|
||||
DependType = Library
|
||||
MustExist = Yes
|
||||
- DependPath = libXxf86vm.a
|
||||
+ DependPath = libXxf86vm.so
|
||||
DependGrepString = XF86VidModeQueryExtension
|
||||
FeatureDepend = xf86vidmode-devel
|
||||
DependType = Header
|
||||
@@ -223,7 +223,7 @@
|
||||
FeatureDepend = xf86vidmode-lib
|
||||
DependType = Library
|
||||
MustExist = Yes
|
||||
- DependPath = libXxf86vm.a
|
||||
+ DependPath = libXxf86vm.so
|
||||
DependGrepString = XF86VidModeQueryExtension
|
||||
FeatureDepend = xf86vidmode-devel
|
||||
DependType = Header
|
@ -1,77 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit eutils flag-o-matic toolchain-funcs
|
||||
|
||||
MY_DATA_PV=1.3.0
|
||||
MY_PN=SearchAndRescue
|
||||
DESCRIPTION="Helicopter based air rescue flight simulator"
|
||||
HOMEPAGE="http://searchandrescue.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/searchandrescue/${MY_PN}-${PV}.tar.gz
|
||||
mirror://sourceforge/searchandrescue/${MY_PN}-data-${MY_DATA_PV}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
media-libs/libsdl
|
||||
media-libs/sdl-mixer
|
||||
x11-libs/libICE
|
||||
x11-libs/libSM
|
||||
x11-libs/libXi
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXpm
|
||||
x11-libs/libXxf86vm
|
||||
virtual/opengl
|
||||
virtual/glu"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-base/xorg-proto"
|
||||
|
||||
S=${WORKDIR}/${PN}_${PV}
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-build.patch
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
unpack ${MY_PN}-${PV}.tar.gz
|
||||
mkdir data && cd data && \
|
||||
unpack ${MY_PN}-data-${MY_DATA_PV}.tar.gz
|
||||
bunzip2 "${S}"/sar/man/${MY_PN}.6.bz2 || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
rm pconf/pconf || die
|
||||
sed -i -e '/Wall/s/$/ $(CFLAGS)/' pconf/Makefile || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
emake CC=$(tc-getCC) -C pconf pconf # Needed for the configure script
|
||||
|
||||
append-cppflags -DNEW_GRAPHICS -DHAVE_SDL_MIXER
|
||||
export CPP="$(tc-getCXX)"
|
||||
export CPPFLAGS="${CXXFLAGS}"
|
||||
# NOTE: not an autoconf script
|
||||
./configure Linux --prefix="/usr" || die
|
||||
sed -i -e 's/@\$/$/' sar/Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -C sar
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin sar/${MY_PN}
|
||||
doman sar/man/${MY_PN}.6
|
||||
dodoc AUTHORS HACKING README
|
||||
doicon sar/icons/SearchAndRescue.xpm
|
||||
newicon sar/icons/SearchAndRescue.xpm ${PN}.xpm
|
||||
dodir /usr/share/games/${PN}
|
||||
cp -r "${WORKDIR}"/data/* "${D}/usr/share/games/${PN}/" || die
|
||||
make_desktop_entry SearchAndRescue "SearchAndRescue" /usr/share/pixmaps/${PN}.xpm
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
inherit desktop flag-o-matic prefix toolchain-funcs xdg
|
||||
|
||||
MY_PN=SearchAndRescue
|
||||
DESCRIPTION="Helicopter based air rescue flight simulator"
|
||||
HOMEPAGE="http://searchandrescue.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/searchandrescue/${MY_PN}-${PV}.tar.gz -> ${MY_PN}-${PV}.tar
|
||||
mirror://sourceforge/searchandrescue/${MY_PN}-data-${PV}.tar.gz -> ${MY_PN}-data-${PV}.tar
|
||||
mirror://sourceforge/searchandrescue/${MY_PN}-data-guadarrama-${PV}.tar.gz -> ${MY_PN}-data-guadarrama-${PV}.tar"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
media-libs/libsdl
|
||||
media-libs/sdl-mixer
|
||||
virtual/glu
|
||||
virtual/opengl
|
||||
x11-libs/libICE
|
||||
x11-libs/libSM
|
||||
x11-libs/libXi
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXpm
|
||||
x11-libs/libXxf86vm
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
x11-base/xorg-proto"
|
||||
|
||||
S=${WORKDIR}/${PN}_${PV}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${MY_PN}-${PV}.tar
|
||||
mkdir data || die
|
||||
cd data || die
|
||||
unpack ${MY_PN}-data-${PV}.tar
|
||||
unpack ${MY_PN}-data-guadarrama-${PV}.tar
|
||||
bunzip2 "${S}"/sar/man/${MY_PN}.6.bz2 || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
xdg_src_prepare
|
||||
|
||||
chmod +x configure || die
|
||||
rm pconf/pconf || die
|
||||
sed -i "/PlatformSearchPathLib/s:/lib/:/$(get_libdir)/:g" sar/platforms.ini || die
|
||||
hprefixify sar/platforms.ini
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export CC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}" \
|
||||
CPP="$(tc-getCXX) ${LDFLAGS}"
|
||||
|
||||
append-flags -DNEW_GRAPHICS -DHAVE_SDL_MIXER
|
||||
|
||||
# Needed for the configure script
|
||||
emake -C pconf pconf CC="${CC}"
|
||||
|
||||
# NOTE: not an autoconf script
|
||||
./configure Linux --prefix="${EPREFIX}/usr" || die
|
||||
sed -i -r 's/^(\s+)@/\1/' sar/Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -C sar LIB_DIRS=
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin sar/${MY_PN}
|
||||
doman sar/man/${MY_PN}.6
|
||||
dodoc AUTHORS HACKING README
|
||||
doicon sar/icons/${MY_PN}.xpm
|
||||
insinto /usr/share/games/${PN}
|
||||
doins -r ../data/*
|
||||
make_desktop_entry ${MY_PN} "Search and Rescue" ${MY_PN}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST kshutdown-source-5.0.zip 454848 BLAKE2B 481cafbf5bd3831088ec9168b6eb82e342106b9b570279b6b8ca1db1f2df8c5640b3942f76032559396b504903b18fe106eb940e81822472a63f235e1a004644 SHA512 7a3920315db142f150227e624fa4a765966ec8367a08686214cb072d94a62d24f3a22fbef8fc84411d385be935102cf85df1b001b2922399455cc320c1e0f0db
|
||||
DIST kshutdown-source-5.1-beta.zip 458881 BLAKE2B f07b1c3ab4d8c272eb4a9dd5e09d5606c175590791878663c784fdd457afc8850f7ad90b707edb3294e67418e58798731adc1304f9b8cc5f66251dade8e32186 SHA512 6afb050428e34cdfc25c9f899ecc117a7eee91b6f55ba4bb090b6b7825bad4cee113a155d053d2fc554c4d4846576f28e3d5c43b90c855f5f1884c26c04afaad
|
||||
|
@ -0,0 +1,63 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake-utils kde.org xdg
|
||||
|
||||
DESCRIPTION="Shutdown manager for desktop environments like KDE Plasma"
|
||||
HOMEPAGE="https://kshutdown.sourceforge.io"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${PN}-source-${PV/_/-}.zip"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="5"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+kde"
|
||||
|
||||
BDEPEND="
|
||||
app-arch/unzip
|
||||
sys-devel/gettext
|
||||
kde? ( kde-frameworks/extra-cmake-modules:5 )
|
||||
"
|
||||
DEPEND="
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtdbus:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
kde? (
|
||||
kde-frameworks/kconfig:5
|
||||
kde-frameworks/kconfigwidgets:5
|
||||
kde-frameworks/kcoreaddons:5
|
||||
kde-frameworks/kcrash:5
|
||||
kde-frameworks/kdbusaddons:5
|
||||
kde-frameworks/kglobalaccel:5
|
||||
kde-frameworks/ki18n:5
|
||||
kde-frameworks/kidletime:5
|
||||
kde-frameworks/knotifications:5
|
||||
kde-frameworks/knotifyconfig:5
|
||||
kde-frameworks/kwidgetsaddons:5
|
||||
kde-frameworks/kxmlgui:5
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
|| (
|
||||
kde-frameworks/breeze-icons:*
|
||||
kde-frameworks/oxygen-icons:*
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-5.0-cmake-3.15.patch" )
|
||||
|
||||
S="${WORKDIR}/${P/_/-}"
|
||||
|
||||
src_prepare() {
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DKS_PURE_QT=$(usex !kde)
|
||||
)
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST tellico-3.2.1.tar.xz 5604632 BLAKE2B 4e0f156a315eca387b60f254df9824615aca3a917a1a256bfd3612e6babd7495e22d79234bdd92297167c323d5a3aabed253ddc38d757e41b64c289392b6e827 SHA512 ada45c66fce2e73f301e3f7d69acb20caf5ebde85ac77bd6e6f0701f55044f5f1a44f8e6ae5d6d6bd244fd6538fba88591caf70178855b6910ce5132508fba9b
|
||||
DIST tellico-3.2.2.tar.xz 5589296 BLAKE2B 7a9bb2afd4f0111d4b5173f060bfcf3b0530ddf9582e796adc08d5881da2afdbd689f1527d69e344dbd4daaf2879ba2871b2bda529bad110a6ee2926f3082761 SHA512 20af0a3017054c371dbeae7412d66b7f3cc7f0ab5119079c2da4373c23bd2eaa2f457955f8ace7448cbe69d8f0f4971f87127b25e06e3e26b07cfe47cf93b34b
|
||||
|
@ -0,0 +1,89 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
ECM_HANDBOOK="forceoptional"
|
||||
ECM_TEST="forceoptional"
|
||||
VIRTUALX_REQUIRED="test"
|
||||
inherit ecm kde.org
|
||||
|
||||
DESCRIPTION="Collection manager based on KDE Frameworks"
|
||||
HOMEPAGE="https://tellico-project.org/"
|
||||
|
||||
if [[ ${KDE_BUILD_TYPE} != live ]]; then
|
||||
SRC_URI="https://tellico-project.org/files/${P}.tar.xz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="|| ( GPL-2 GPL-3 )"
|
||||
SLOT="5"
|
||||
IUSE="cddb discid pdf scanner semantic-desktop taglib v4l xmp yaz"
|
||||
|
||||
BDEPEND="
|
||||
sys-devel/gettext
|
||||
"
|
||||
RDEPEND="
|
||||
kde-frameworks/karchive:5
|
||||
kde-frameworks/kcodecs:5
|
||||
kde-frameworks/kcompletion:5
|
||||
kde-frameworks/kconfig:5
|
||||
kde-frameworks/kconfigwidgets:5
|
||||
kde-frameworks/kcoreaddons:5
|
||||
kde-frameworks/kcrash:5
|
||||
kde-frameworks/kguiaddons:5
|
||||
kde-frameworks/khtml:5
|
||||
kde-frameworks/kiconthemes:5
|
||||
kde-frameworks/kitemmodels:5
|
||||
kde-frameworks/ki18n:5
|
||||
kde-frameworks/kjobwidgets:5
|
||||
kde-frameworks/kio:5
|
||||
kde-frameworks/knewstuff:5
|
||||
kde-frameworks/kparts:5
|
||||
kde-frameworks/kservice:5
|
||||
kde-frameworks/ktextwidgets:5
|
||||
kde-frameworks/kwallet:5
|
||||
kde-frameworks/kwidgetsaddons:5
|
||||
kde-frameworks/kwindowsystem:5
|
||||
kde-frameworks/kxmlgui:5
|
||||
kde-frameworks/solid:5
|
||||
kde-frameworks/sonnet:5
|
||||
dev-qt/qtdbus:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtnetwork:5
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtxml:5
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
>=dev-perl/Text-BibTeX-0.780.0-r1
|
||||
cddb? ( kde-apps/libkcddb:5 )
|
||||
discid? ( dev-libs/libcdio:= )
|
||||
pdf? ( app-text/poppler[qt5] )
|
||||
scanner? ( kde-apps/libksane:5 )
|
||||
semantic-desktop? ( kde-frameworks/kfilemetadata:5 )
|
||||
taglib? ( >=media-libs/taglib-1.5 )
|
||||
v4l? ( >=media-libs/libv4l-0.8.3 )
|
||||
xmp? ( >=media-libs/exempi-2 )
|
||||
yaz? ( >=dev-libs/yaz-2:0 )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# tests need network access
|
||||
RESTRICT+=" test"
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Csv=ON
|
||||
$(cmake-utils_use_find_package cddb KF5Cddb)
|
||||
$(cmake-utils_use_find_package discid CDIO)
|
||||
$(cmake-utils_use_find_package pdf Poppler)
|
||||
$(cmake-utils_use_find_package scanner KF5Sane)
|
||||
$(cmake-utils_use_find_package semantic-desktop KF5FileMetaData)
|
||||
$(cmake-utils_use_find_package taglib Taglib)
|
||||
-DENABLE_WEBCAM=$(usex v4l)
|
||||
$(cmake-utils_use_find_package xmp Exempi)
|
||||
$(cmake-utils_use_find_package yaz Yaz)
|
||||
)
|
||||
|
||||
ecm_src_configure
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,130 @@
|
||||
From 09319f688e10d47f9fc9be2b6feb831fb132660a Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Storz <eduard.braun2@gmx.de>
|
||||
Date: Sat, 12 Oct 2019 15:56:14 +0200
|
||||
Subject: [PATCH] CMake: Avoid reordering CMAKE_CXX_FLAGS
|
||||
|
||||
Order matters; the reordering caused the _FORTIFY_SOURCE flag to be
|
||||
always undefined (as we flipped a "-U" and "-D")
|
||||
|
||||
Also skip removing duplicates to avoid similar pitfalls (we kept
|
||||
only the first occurrence but should've kept the last)
|
||||
It did not work properly anyway (we still had duplicates in the end)
|
||||
and was only required as we wrote the final CMAKE_CXX_FLAGS back to
|
||||
cache and consequently appended new flags with every run of CMAKE.
|
||||
---
|
||||
CMakeLists.txt | 13 -----------
|
||||
CMakeScripts/CanonicalizeFlagsVar.cmake | 11 ----------
|
||||
CMakeScripts/DefineDependsandFlags.cmake | 28 ++++++++++++++----------
|
||||
3 files changed, 17 insertions(+), 35 deletions(-)
|
||||
delete mode 100644 CMakeScripts/CanonicalizeFlagsVar.cmake
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b30f013f38..aa14e13e01 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -207,19 +207,6 @@ if(GMOCK_PRESENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-# -----------------------------------------------------------------------------
|
||||
-# Canonicalize the flags to speed up recompilation using ccache/etc.
|
||||
-# This should be the last thing we do:
|
||||
-# -----------------------------------------------------------------------------
|
||||
-include(CMakeScripts/CanonicalizeFlagsVar.cmake)
|
||||
-canonicalize_flags_var("${CMAKE_CXX_FLAGS}" _new_cxx)
|
||||
-set(CMAKE_CXX_FLAGS "${_new_cxx}" CACHE STRING "" FORCE)
|
||||
-canonicalize_flags_var("${CMAKE_CXX_FLAGS_DEBUG}" _new_cxx)
|
||||
-set(CMAKE_CXX_FLAGS_DEBUG "${_new_cxx}" CACHE STRING "" FORCE)
|
||||
-# message(FATAL_ERROR "CMAKE_CXX_FLAGS = <${CMAKE_CXX_FLAGS}>")
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Clean Targets
|
||||
diff --git a/CMakeScripts/CanonicalizeFlagsVar.cmake b/CMakeScripts/CanonicalizeFlagsVar.cmake
|
||||
deleted file mode 100644
|
||||
index ddc5b7b5d3..0000000000
|
||||
--- a/CMakeScripts/CanonicalizeFlagsVar.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,11 +0,0 @@
|
||||
-# This file is copyright by Shlomi Fish, 2016.
|
||||
-#
|
||||
-# This file is licensed under the MIT/X11 license:
|
||||
-# https://opensource.org/licenses/mit-license.php
|
||||
-
|
||||
-macro (canonicalize_flags_var in_val out_var)
|
||||
- string(REPLACE " " ";" _c "${in_val}")
|
||||
- list(REMOVE_DUPLICATES _c)
|
||||
- list(SORT _c)
|
||||
- string(REPLACE ";" " " "${out_var}" "${_c}")
|
||||
-endmacro()
|
||||
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
|
||||
index 996100b4d7..9dd7f7785f 100644
|
||||
--- a/CMakeScripts/DefineDependsandFlags.cmake
|
||||
+++ b/CMakeScripts/DefineDependsandFlags.cmake
|
||||
@@ -2,6 +2,7 @@ set(INKSCAPE_LIBS "")
|
||||
set(INKSCAPE_INCS "")
|
||||
set(INKSCAPE_INCS_SYS "")
|
||||
set(INKSCAPE_CXX_FLAGS "")
|
||||
+set(INKSCAPE_CXX_FLAGS_DEBUG "")
|
||||
|
||||
list(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR}
|
||||
${PROJECT_SOURCE_DIR}/src
|
||||
@@ -98,7 +99,7 @@ list(APPEND INKSCAPE_INCS_SYS ${INKSCAPE_DEP_INCLUDE_DIRS})
|
||||
add_definitions(${INKSCAPE_DEP_CFLAGS_OTHER})
|
||||
|
||||
find_package(DoubleConversion REQUIRED) # lib2geom dependency
|
||||
-
|
||||
+
|
||||
if(WITH_JEMALLOC)
|
||||
find_package(JeMalloc)
|
||||
if (JEMALLOC_FOUND)
|
||||
@@ -369,14 +370,6 @@ sanitize_ldflags_for_libs(SIGC++_LDFLAGS)
|
||||
list(APPEND INKSCAPE_LIBS ${SIGC++_LDFLAGS})
|
||||
list(APPEND INKSCAPE_CXX_FLAGS ${SIGC++_CFLAGS_OTHER})
|
||||
|
||||
-list(REMOVE_DUPLICATES INKSCAPE_CXX_FLAGS)
|
||||
-foreach(flag ${INKSCAPE_CXX_FLAGS})
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" CACHE STRING "" FORCE)
|
||||
-endforeach()
|
||||
-foreach(flag ${INKSCAPE_CXX_FLAGS_DEBUG})
|
||||
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${flag}" CACHE STRING "" FORCE)
|
||||
-endforeach()
|
||||
-
|
||||
# Some linkers, like gold, don't find symbols recursively. So we have to link against X11 explicitly
|
||||
find_package(X11)
|
||||
if(X11_FOUND)
|
||||
@@ -386,14 +379,27 @@ endif(X11_FOUND)
|
||||
|
||||
# end Dependencies
|
||||
|
||||
+
|
||||
+
|
||||
+# Set include directories and CXX flags
|
||||
+# (INKSCAPE_LIBS are set as target_link_libraries for inkscape_base in src/CMakeLists.txt)
|
||||
+
|
||||
+foreach(flag ${INKSCAPE_CXX_FLAGS})
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
|
||||
+endforeach()
|
||||
+foreach(flag ${INKSCAPE_CXX_FLAGS_DEBUG})
|
||||
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${flag}")
|
||||
+endforeach()
|
||||
+
|
||||
list(REMOVE_DUPLICATES INKSCAPE_LIBS)
|
||||
list(REMOVE_DUPLICATES INKSCAPE_INCS_SYS)
|
||||
|
||||
-# C/C++ Flags
|
||||
include_directories(${INKSCAPE_INCS})
|
||||
include_directories(SYSTEM ${INKSCAPE_INCS_SYS})
|
||||
|
||||
-include(${CMAKE_CURRENT_LIST_DIR}/ConfigChecks.cmake)
|
||||
+include(${CMAKE_CURRENT_LIST_DIR}/ConfigChecks.cmake) # TODO: Check if this needs to be "hidden" here
|
||||
|
||||
unset(INKSCAPE_INCS)
|
||||
unset(INKSCAPE_INCS_SYS)
|
||||
+unset(INKSCAPE_CXX_FLAGS)
|
||||
+unset(INKSCAPE_CXX_FLAGS_DEBUG)
|
||||
--
|
||||
2.22.0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue