parent
b99cb03844
commit
e662223935
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST libu2f-server-1.0.1.tar.xz 268648 BLAKE2B 9c6c2e5bafb2a95fcc5c2773de49b4db197ee6283e90cf0e4e62ff3982bdde8a51635cd9771e4dd35d27c71634367197d3b01b9c26d8a3847fccf1daf676f04b SHA512 51020722f49f787c793808b667e91923bde46e9137bfe5065106f83bcdb678e8d11cca12cb605d9622cafc15a9794c9080cf08e2a704293a791ab6f27ac47f47
|
||||
DIST libu2f-server-1.1.0.tar.xz 269128 BLAKE2B 084b177a878e8216f2ee5af9eeee11e691edcd12b7ed1b1c57f74bcc45f0418a0d44a9e72423c41b4104aa9f69807a0289172d08d21d168c6be5b36ee8c70bc3 SHA512 ebdb7c8c20727f37f4e31d8f16df7966603374f78478ada723a7b9bec1b0b0622caf6d12a65067ac8651f6088aaad61b2ad6ed51b9d6ef0dc45f031c974d8ff9
|
||||
|
@ -0,0 +1,37 @@
|
||||
Reverted, removed the second hunk about dev-libs/check, and further
|
||||
adjusted. The tarball already contains the man page and gengetopt
|
||||
generated command line parsing, so these checks are useless to us.
|
||||
|
||||
From fbd340d1c777e23b66ef27ce1c03c4eb3bafc511 Mon Sep 17 00:00:00 2001
|
||||
From: Thordur Bjornsson <thorduri@yubico.com>
|
||||
Date: Thu, 12 Jan 2017 14:28:31 +0100
|
||||
Subject: [PATCH] auto: Check for help2man/gengetopt, and bail out if not
|
||||
found.
|
||||
|
||||
Both are required to build.
|
||||
|
||||
While here, if `--enable-tests` passed, check for `check` and
|
||||
if not found, bail out as well.
|
||||
---
|
||||
configure.ac | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ad409a2..6decb78 100644
|
||||
--- b/configure.ac
|
||||
+++ a/configure.ac
|
||||
@@ -43,14 +43,7 @@
|
||||
LT_INIT([win32-dll])
|
||||
|
||||
AM_MISSING_PROG(HELP2ADOC, help2adoc, $missing_dir)
|
||||
AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
|
||||
-if ! which help2man >/dev/null ; then
|
||||
- AC_MSG_ERROR([help2man missing])
|
||||
-fi
|
||||
-if ! which gengetopt >/dev/null ; then
|
||||
- AC_MSG_ERROR([gengetopt missing])
|
||||
-fi
|
||||
-
|
||||
gl_LD_VERSION_SCRIPT
|
||||
|
||||
PKG_CHECK_MODULES([LIBJSON], [json-c], [], [
|
@ -0,0 +1,51 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools multilib-minimal
|
||||
|
||||
DESCRIPTION="Yubico Universal 2nd Factor (U2F) server C Library"
|
||||
HOMEPAGE="https://developers.yubico.com/libu2f-server/"
|
||||
SRC_URI="https://developers.yubico.com/${PN}/Releases/${P}.tar.xz"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0/0.1"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="libressl static-libs test"
|
||||
|
||||
RDEPEND="
|
||||
!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
|
||||
libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
|
||||
dev-libs/hidapi[${MULTILIB_USEDEP}]
|
||||
dev-libs/json-c:=[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
test? ( dev-libs/check[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.1.0-disable-help2man-gengetopt-checks.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
touch man/u2f-server.1 || die # do not rebuild the man page
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
myeconfargs=(
|
||||
--disable-h2a # tarball already contains the manpage
|
||||
$(use_enable static-libs static)
|
||||
$(use_enable test tests)
|
||||
)
|
||||
|
||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
default
|
||||
find "${D}" -name '*.la' -delete || die
|
||||
}
|
Binary file not shown.
@ -0,0 +1,82 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="Vim-fork focused on extensibility and agility."
|
||||
HOMEPAGE="https://neovim.io"
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/neovim/neovim.git"
|
||||
else
|
||||
SRC_URI="https://github.com/neovim/neovim/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="Apache-2.0 vim"
|
||||
SLOT="0"
|
||||
IUSE="+clipboard +luajit +nvimpager python remote ruby +tui +jemalloc"
|
||||
|
||||
CDEPEND=">=dev-libs/libuv-1.2.0
|
||||
>=dev-libs/msgpack-1.0.0
|
||||
luajit? ( dev-lang/luajit:2 )
|
||||
!luajit? (
|
||||
dev-lang/lua:=
|
||||
dev-lua/LuaBitOp
|
||||
)
|
||||
tui? (
|
||||
>=dev-libs/libtermkey-0.19
|
||||
>=dev-libs/unibilium-1.1.1
|
||||
)
|
||||
dev-libs/libvterm
|
||||
dev-lua/lpeg[luajit=]
|
||||
dev-lua/mpack[luajit=]
|
||||
jemalloc? ( dev-libs/jemalloc )"
|
||||
|
||||
DEPEND="
|
||||
${CDEPEND}
|
||||
dev-util/gperf
|
||||
virtual/libiconv
|
||||
virtual/libintl"
|
||||
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
python? ( dev-python/neovim-python-client )
|
||||
ruby? ( dev-ruby/neovim-ruby-client )
|
||||
remote? ( dev-python/neovim-remote )
|
||||
clipboard? ( || ( x11-misc/xsel x11-misc/xclip ) )"
|
||||
|
||||
CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
|
||||
src_prepare() {
|
||||
# use our system vim dir
|
||||
sed -e '/^# define SYS_VIMRC_FILE/s|$VIM|'"${EPREFIX}"'/etc/vim|' \
|
||||
-i src/nvim/globals.h || die
|
||||
|
||||
# add eclass to bash filetypes
|
||||
sed -e 's|*.ebuild|*.ebuild,*.eclass|' -i runtime/filetype.vim || die
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DFEAT_TUI=$(usex tui)
|
||||
-DENABLE_JEMALLOC=$(usex jemalloc)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
# install a default configuration file
|
||||
insinto /etc/vim
|
||||
doins "${FILESDIR}"/sysinit.vim
|
||||
|
||||
# conditionally install a symlink for nvimpager
|
||||
if use nvimpager; then
|
||||
dosym ../share/nvim/runtime/macros/less.sh /usr/bin/nvimpager
|
||||
fi
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="Vim-fork focused on extensibility and agility."
|
||||
HOMEPAGE="https://neovim.io"
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/neovim/neovim.git"
|
||||
else
|
||||
SRC_URI="https://github.com/neovim/neovim/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="Apache-2.0 vim"
|
||||
SLOT="0"
|
||||
IUSE="+clipboard +luajit +nvimpager python remote ruby +tui +jemalloc"
|
||||
|
||||
CDEPEND=">=dev-libs/libuv-1.2.0
|
||||
>=dev-libs/msgpack-1.0.0
|
||||
luajit? ( dev-lang/luajit:2 )
|
||||
!luajit? (
|
||||
dev-lang/lua:=
|
||||
dev-lua/LuaBitOp
|
||||
)
|
||||
tui? (
|
||||
>=dev-libs/libtermkey-0.19
|
||||
>=dev-libs/unibilium-1.1.1
|
||||
)
|
||||
dev-libs/libvterm
|
||||
dev-lua/lpeg[luajit=]
|
||||
dev-lua/mpack[luajit=]
|
||||
jemalloc? ( dev-libs/jemalloc )"
|
||||
|
||||
DEPEND="
|
||||
${CDEPEND}
|
||||
dev-util/gperf
|
||||
virtual/libiconv
|
||||
virtual/libintl"
|
||||
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
python? ( dev-python/neovim-python-client )
|
||||
ruby? ( dev-ruby/neovim-ruby-client )
|
||||
remote? ( dev-python/neovim-remote )
|
||||
clipboard? ( || ( x11-misc/xsel x11-misc/xclip ) )"
|
||||
|
||||
CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
|
||||
src_prepare() {
|
||||
# use our system vim dir
|
||||
sed -e '/^# define SYS_VIMRC_FILE/s|$VIM|'"${EPREFIX}"'/etc/vim|' \
|
||||
-i src/nvim/globals.h || die
|
||||
|
||||
# add eclass to bash filetypes
|
||||
sed -e 's|*.ebuild|*.ebuild,*.eclass|' -i runtime/filetype.vim || die
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DFEAT_TUI=$(usex tui)
|
||||
-DENABLE_JEMALLOC=$(usex jemalloc)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
# install a default configuration file
|
||||
insinto /etc/vim
|
||||
doins "${FILESDIR}"/sysinit.vim
|
||||
|
||||
# conditionally install a symlink for nvimpager
|
||||
if use nvimpager; then
|
||||
dosym ../share/nvim/runtime/macros/less.sh /usr/bin/nvimpager
|
||||
fi
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST etcd-2.3.8.tar.gz 2206562 BLAKE2B 754930b4b5f0e90386b2b4765a9dbb6790ae509a81d3430c3f7c2c828d90318db3b01a2faea0c7075078096ce74302f2be7444245047534749f49d13a927851e SHA512 4268de32797cab23e9e47784d31d5abd6982068c53d3cc9735a06719740dba45b73f4e067cbc7aa8aef5ca7c56d8be067f1076685ac82f64012b760d8b7f2bfc
|
||||
DIST etcd-3.2.11.tar.gz 3016255 BLAKE2B b57d70ab50e9b8c7bf11920c0bf18789975af7f4f1d66b0afb17ba1d4830250972ba2e276de4d67b80bec317cf9d35eac7f63f8ca7c7c25fce2947807dcc42f8 SHA512 e0a71d43d6595c0a08a6068addcf13c98d3d8bd6873c9b5ac39b6183daea34191c1b81a2c81f5c7ec98d587c85f3b1af8cd584d7a0857668f77fb80151858fdb
|
||||
DIST etcd-3.2.12.tar.gz 3046578 BLAKE2B 7b7a071c6856a7f1b5b7ceb68a4efbac74fde6ed1211dabda7d715ea79cd4dc9c10b0f1345d70b8a21e52cb3ac6adfc37c232ea28ff88e5f401212b5a8610d73 SHA512 b672a35ba62efccffa09be6b3d2a84b99e8abcae87093539c705d82e13c0f985a9f07a3d885af7386595f12d433756176db107739749c301e7e5d096e85d018b
|
||||
DIST etcd-3.2.13.tar.gz 3047049 BLAKE2B f0ac987aef60fcc28636cfb60d5f4e00daee29a3d5167900599760090c3fa3d7932abb6224df5fb66ea5bdbc29a9ce7f7263a0e81522853ab190be94a6551ebc SHA512 4f3c5856ecf9e8a725d0ef80bb584e7b2edaf7215635a5c74fe32b175ce9f8d07ba57685586dfd79b893d04641d4169382d22f2eea442efc1112fa91c8175d45
|
||||
|
@ -0,0 +1,977 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
MY_EXTRAS_VER="20170926-1321Z"
|
||||
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-minimal
|
||||
|
||||
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="http://mariadb.org/"
|
||||
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
|
||||
LICENSE="GPL-2 LGPL-2.1+"
|
||||
SLOT="0/${SUBSLOT:-0}"
|
||||
IUSE="+backup bindist cracklib debug embedded extraengine galera innodb-lz4
|
||||
innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
|
||||
numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
|
||||
sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap 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 )"
|
||||
|
||||
REQUIRED_USE="jdbc? ( extraengine server !static )
|
||||
server? ( tokudb? ( jemalloc !tcmalloc ) )
|
||||
!server? ( !extraengine !embedded )
|
||||
?? ( tcmalloc jemalloc )
|
||||
static? ( yassl !pam )"
|
||||
|
||||
# REMEMBER: also update eclass/mysql*.eclass before committing!
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~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"
|
||||
else
|
||||
MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mariadb-10.2.8-without-clientlibs-tools.patch
|
||||
"${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
|
||||
"${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
|
||||
)
|
||||
|
||||
# Be warned, *DEPEND are version-dependant
|
||||
# These are used for both runtime and compiletime
|
||||
# MULTILIB_USEDEP only set for libraries used by the client library
|
||||
COMMON_DEPEND="
|
||||
kernel_linux? (
|
||||
sys-process/procps:0=
|
||||
dev-libs/libaio:0=
|
||||
)
|
||||
>=sys-apps/sed-4
|
||||
>=sys-apps/texinfo-4.7-r1
|
||||
!dev-db/mariadb-connector-c[mysqlcompat]
|
||||
jemalloc? ( dev-libs/jemalloc:0= )
|
||||
tcmalloc? ( dev-util/google-perftools:0= )
|
||||
systemtap? ( >=dev-util/systemtap-1.3:0= )
|
||||
!yassl? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
|
||||
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
|
||||
)
|
||||
>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
|
||||
sys-libs/ncurses:0=
|
||||
mroonga? ( app-text/groonga-normalizer-mysql )
|
||||
kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
|
||||
!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= )
|
||||
)
|
||||
innodb-lz4? ( app-arch/lz4 )
|
||||
innodb-lzo? ( dev-libs/lzo )
|
||||
innodb-snappy? ( app-arch/snappy )
|
||||
numa? ( sys-process/numactl )
|
||||
oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
|
||||
pam? ( virtual/pam:0= )
|
||||
systemd? ( sys-apps/systemd:= )
|
||||
tokudb? ( app-arch/snappy )
|
||||
)
|
||||
>=dev-libs/libpcre-8.41-r1:3=
|
||||
"
|
||||
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 )
|
||||
abi_x86_32? ( !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] )
|
||||
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
|
||||
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
|
||||
!<virtual/mysql-5.6-r9
|
||||
${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
|
||||
# xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
|
||||
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
|
||||
server? ( ~virtual/mysql-5.6[embedded=,static=] )
|
||||
virtual/libmysqlclient:${SLOT}[${MULTILIB_USEDEP},static-libs=]
|
||||
server? ( galera? ( sst-xtrabackup? ( || ( >=dev-db/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
|
||||
|
||||
# Here we need to see if the implementation switched client libraries
|
||||
# We check if this is a new instance of the package and a client library already exists
|
||||
local SHOW_ABI_MESSAGE libpath
|
||||
if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
|
||||
libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
|
||||
elog "Due to ABI changes when switching between different client libraries,"
|
||||
elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
|
||||
elog "Please run: revdep-rebuild --library ${libpath}"
|
||||
ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
|
||||
fi
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
if use galera ; then
|
||||
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
|
||||
fi
|
||||
|
||||
# Note about configuration change
|
||||
einfo
|
||||
elog "This version of mariadb reorganizes the configuration from a single my.cnf"
|
||||
elog "to several files in /etc/mysql/${PN}.d."
|
||||
elog "Please backup any changes you made to /etc/mysql/my.cnf"
|
||||
elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
|
||||
elog "You may have as many files as needed and they are read alphabetically."
|
||||
elog "Be sure the options have the appropitate section headers, i.e. [mysqld]."
|
||||
einfo
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
|
||||
# Initialize the proper variables first
|
||||
mysql_init_vars
|
||||
|
||||
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() {
|
||||
java-pkg-opt-2_src_prepare
|
||||
if use tcmalloc; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
|
||||
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
|
||||
|
||||
# Remove the bundled groonga
|
||||
# There is no CMake flag, it simply checks for existance
|
||||
rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
|
||||
|
||||
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
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
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"
|
||||
-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
|
||||
-DSYSCONFDIR="${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"
|
||||
-DWITH_COMMENT="Gentoo Linux ${PF}"
|
||||
-DWITH_UNIT_TESTS=$(usex test ON OFF)
|
||||
-DWITH_LIBEDIT=0
|
||||
-DWITH_ZLIB=system
|
||||
-DWITHOUT_LIBWRAP=1
|
||||
-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)"
|
||||
-DENABLE_STATIC_LIBS=$(usex static-libs ON OFF)
|
||||
# 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)
|
||||
-DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
|
||||
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
|
||||
-DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
|
||||
-DCONC_WITH_EXTERNAL_ZLIB=YES
|
||||
-DWITH_EXTERNAL_ZLIB=YES
|
||||
-DSUFFIX_INSTALL_DIR=""
|
||||
-DWITH_UNITTEST=OFF
|
||||
)
|
||||
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
|
||||
|
||||
# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
|
||||
# systemtap only works on native ABI bug 530132
|
||||
if multilib_is_native_abi; then
|
||||
mycmakeargs+=(
|
||||
-DWITH_READLINE=$(usex bindist 1 0)
|
||||
-DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
|
||||
-DENABLE_DTRACE=$(usex systemtap)
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_TOOLS=1
|
||||
-DWITH_READLINE=1
|
||||
-DNOT_FOR_DISTRIBUTION=0
|
||||
-DENABLE_DTRACE=0
|
||||
)
|
||||
fi
|
||||
|
||||
if multilib_is_native_abi && 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)
|
||||
-DWITH_MARIABACKUP=$(usex backup ON OFF)
|
||||
-DWITH_LIBARCHIVE=$(usex backup ON OFF)
|
||||
-DINSTALL_SQLBENCHDIR=share/mariadb
|
||||
-DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
|
||||
# systemd is only linked to for server notification
|
||||
-DWITH_SYSTEMD=$(usex systemd yes no)
|
||||
-DWITH_NUMA=$(usex numa ON OFF)
|
||||
)
|
||||
|
||||
# Workaround for MDEV-14524
|
||||
use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
|
||||
|
||||
if use test ; then
|
||||
# This is needed for the new client lib which tests a real, open server
|
||||
mycmakeargs+=( -DSKIP_TESTS=ON )
|
||||
fi
|
||||
|
||||
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=$(usex embedded)
|
||||
-DWITH_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
|
||||
-DWITHOUT_EMBEDDED_SERVER=1
|
||||
-DEXTRA_CHARSETS=none
|
||||
-DINSTALL_SQLBENCHDIR=
|
||||
-DWITH_SYSTEMD=no
|
||||
)
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
multilib-minimal_src_compile
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# headers with ABI specific data
|
||||
local MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/mysql/server/my_config.h
|
||||
/usr/include/mysql/server/private/embedded_priv.h
|
||||
/usr/include/mysql/server/mysql_version.h
|
||||
/usr/include/mariadb/mariadb_version.h
|
||||
/usr/include/mysql/mariadb_version.h
|
||||
/usr/include/mysql/server/private/probes_mysql_nodtrace.h
|
||||
/usr/include/mysql/server/private/probes_mysql_dtrace.h )
|
||||
|
||||
# wrap the config scripts
|
||||
local MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config /usr/bin/mysql_config )
|
||||
multilib-minimal_src_install
|
||||
}
|
||||
|
||||
# Intentionally override eclass function
|
||||
multilib_src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
|
||||
if [[ -f "${D}/usr/include/mysql/server/private/config.h" ]] ; then
|
||||
rm "${D}/usr/include/mysql/server/private/config.h" || die
|
||||
fi
|
||||
|
||||
if ! multilib_is_native_abi && use server ; then
|
||||
insinto /usr/include/mysql/server/private
|
||||
doins "${S}"/sql/*.h
|
||||
fi
|
||||
|
||||
# Install compatible symlinks to libmysqlclient
|
||||
# use static-libs && dosym libmariadbclient.a "${EPREFIX}/usr/$(get_libdir)/libmysqlclient.a"
|
||||
# dosym libmariadb.so.3 "${EPREFIX}/usr/$(get_libdir)/libmysqlclient.so"
|
||||
dosym libmariadb.so.3 "${EPREFIX}/usr/$(get_libdir)/libmysqlclient.so.${SUBSLOT}"
|
||||
|
||||
# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
|
||||
find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
# 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
|
||||
cp "${FILESDIR}/my.cnf-10.2" "${TMPDIR}/my.cnf" || die
|
||||
eprefixify "${TMPDIR}/my.cnf"
|
||||
doins "${TMPDIR}/my.cnf"
|
||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
|
||||
cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
|
||||
eprefixify "${TMPDIR}/50-distro-client.cnf"
|
||||
doins "${TMPDIR}/50-distro-client.cnf"
|
||||
|
||||
if use server ; then
|
||||
mycnf_src="my.cnf.distro-server"
|
||||
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
|
||||
"${FILESDIR}/${mycnf_src}" \
|
||||
> "${TMPDIR}/my.cnf.ok" || die
|
||||
if use prefix ; then
|
||||
sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
|
||||
"${TMPDIR}/my.cnf.ok" || die
|
||||
fi
|
||||
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" 50-distro-server.cnf
|
||||
|
||||
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
|
||||
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 static-libs' \
|
||||
# FEATURES='test userpriv -usersandbox' \
|
||||
# ebuild mariadb-X.X.XX.ebuild \
|
||||
# digest clean package
|
||||
multilib_src_test() {
|
||||
|
||||
if ! multilib_is_native_abi ; then
|
||||
einfo "Server tests not available on non-native abi".
|
||||
return 0;
|
||||
fi
|
||||
|
||||
_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 \
|
||||
main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
|
||||
_disable_test "$t" "False positives in Gentoo"
|
||||
done
|
||||
|
||||
# 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/bin/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)"
|
||||
# These are dir+prefix
|
||||
MYSQL_RELAY_LOG="$(_getoptval '--mysqld' relay-log)"
|
||||
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
|
||||
MYSQL_LOG_BIN="$(_getoptval '--mysqld' log-bin)"
|
||||
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 http://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
|
||||
# http://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"
|
||||
}
|
@ -1,4 +1 @@
|
||||
DIST postgis-2.1.8.tar.gz 6811272 BLAKE2B f39debafea797fec2595b1ba2256ce3ed19875f15e57829f3480b15ec82ddfbc51702bb29513a9b1cd381696ee0b0857c34e79395a1f627f38a1e41344485ba7 SHA512 e8aeb739a1ecf95b224a3908d2af3aa38933b56c63713af30d14243653745436165b418a3368601a699b744f6fe61ce645c980319eb159395d68166a3815c5f4
|
||||
DIST postgis-2.3.3.tar.gz 11342032 BLAKE2B d50eb0b43f56c31768c40083677e54f547e183287feaab6b21d223b49bb19c3599031f186f0f783b9c9c948e7ed0bcd4a0918e65e61babad35f6c37eacc8f981 SHA512 c0ec4b4b5c470e5f88d1bb72c528269a0cf954981385580db3333502c2da74e431b5a86e3d6427c839c3d4440122be18a69261c8205aa71c8aa4b790550c5e9c
|
||||
DIST postgis-2.4.0.tar.gz 12576979 BLAKE2B 2d0312ca9202f92f55700e78881ecdd7128064393b1e7197dd658f8fcee676723c048fa2c7f199aa9d61a5638c0ad0129b6d2dc61d6324caeec3b7163f0f4edc SHA512 813e8e9feb75b58673afaec2dda3b5d8fc586a0f483c553795c8ae2b917bb67a9741e8c901787a0b914c327848323239346f1d816aa60b47d5a7065596de0067
|
||||
DIST postgis-2.4.2.tar.gz 12470881 BLAKE2B 116bb5d1c8f6066d537cac950254923a681babac456d155139dbdd2853b80499f4f9445dad985b94bffffd1d1285a6c78fee0fccb24e301d18147f3cd9230416 SHA512 e268572d5cd009754ef05f5d2eedcac7e362fa47199459c637cd4d9050d2b648d4b2b3746cde0dce5a42be2606a432b64dc905f193e12cf0869e3dd6f820b425
|
||||
|
@ -1,18 +0,0 @@
|
||||
diff -Naruw a/raster/rt_core/Makefile.in b/raster/rt_core/Makefile.in
|
||||
--- a/raster/rt_core/Makefile.in 2012-03-21 21:36:59.000000000 +0000
|
||||
+++ b/raster/rt_core/Makefile.in 2013-04-28 13:23:21.055728249 +0000
|
||||
@@ -8,7 +8,7 @@
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
-AR=ar rs
|
||||
+ARFLAGS=rs
|
||||
|
||||
CC=@CC@
|
||||
LIBLWGEOM_LDFLAGS=../../liblwgeom/.libs/liblwgeom.a
|
||||
@@ -35,4 +35,4 @@
|
||||
rm -f Makefile
|
||||
|
||||
librtcore.a: $(RT_OBJS) $(RT_HEADERS)
|
||||
- $(AR) $(RT_LIB) $(RT_OBJS)
|
||||
+ $(AR) $(ARFLAGS) $(RT_LIB) $(RT_OBJS)
|
@ -1,26 +0,0 @@
|
||||
diff -Naruw postgis-2.1.0rc1.orig/loader/Makefile.in postgis-2.1.0rc1/loader/Makefile.in
|
||||
--- postgis-2.1.0rc1.orig/loader/Makefile.in 2013-05-06 08:30:51.000000000 +0000
|
||||
+++ postgis-2.1.0rc1/loader/Makefile.in 2013-07-14 17:19:19.313306844 +0000
|
||||
@@ -97,11 +97,11 @@
|
||||
|
||||
$(PGSQL2SHP-CLI): $(SHPLIB_OBJS) pgsql2shp-core.o pgsql2shp-cli.o $(LIBLWGEOM)
|
||||
$(LIBTOOL) --mode=link \
|
||||
- $(CC) $(CFLAGS) $^ $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@
|
||||
+ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@
|
||||
|
||||
$(SHP2PGSQL-CLI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM)
|
||||
$(LIBTOOL) --mode=link \
|
||||
- $(CC) $(CFLAGS) $^ -o $@ $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS)
|
||||
|
||||
shp2pgsql-gui.o: shp2pgsql-gui.c shp2pgsql-core.h shpcommon.h
|
||||
$(CC) $(CFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -o $@ -c shp2pgsql-gui.c
|
||||
@@ -109,7 +109,7 @@
|
||||
$(SHP2PGSQL-GUI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-gui.o pgsql2shp-core.o $(LIBLWGEOM) $(GTK_WIN32_RES)
|
||||
$(LIBTOOL) --mode=link \
|
||||
$(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ \
|
||||
- $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS)
|
||||
+ $(LDFLAGS) $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS)
|
||||
|
||||
installdir:
|
||||
@mkdir -p $(DESTDIR)$(bindir)
|
@ -1,122 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a13cf13..c0a7842 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -780,61 +780,19 @@ dnl ===========================================================================
|
||||
dnl Detect if json-c installed
|
||||
dnl ===========================================================================
|
||||
|
||||
-CHECK_JSON=yes
|
||||
-HAVE_JSON=no
|
||||
-HAVE_JSON_C=no
|
||||
-
|
||||
-AC_ARG_WITH([json],
|
||||
- [AS_HELP_STRING([--without-json], [build without json-c support])],
|
||||
- [CHECK_JSON="$withval"], [])
|
||||
-
|
||||
-if test "$CHECK_JSON" != "no"; then dnl {
|
||||
-
|
||||
-AC_ARG_WITH([jsondir],
|
||||
- [AS_HELP_STRING([--with-jsondir=PATH], [specify the json-c installation directory])],
|
||||
- [JSONDIR="$withval"], [JSONDIR=])
|
||||
-
|
||||
-if test ! "x$JSONDIR" = "x"; then
|
||||
- dnl Make sure that the directory exists
|
||||
- if test "x$JSONDIR" = "xyes"; then
|
||||
- AC_MSG_ERROR([you must specify a parameter to --with-jsondir, e.g. --with-jsondir=/path/to])
|
||||
- else
|
||||
- AC_MSG_RESULT([Using user-specified json-c directory: $JSONDIR])
|
||||
-
|
||||
- dnl Add the include directory to JSON_CPPFLAGS
|
||||
- JSON_CPPFLAGS="-I$JSONDIR/include"
|
||||
- JSON_LDFLAGS="-L$JSONDIR/lib"
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
-dnl Check that we can find the json/json.h header file
|
||||
-CPPFLAGS_SAVE="$CPPFLAGS"
|
||||
-CPPFLAGS="$JSON_CPPFLAGS"
|
||||
-AC_CHECK_HEADER([json/json.h], [HAVE_JSON=yes], [
|
||||
- AC_CHECK_HEADER([json-c/json.h], [HAVE_JSON=yes; HAVE_JSON_C=yes], [])
|
||||
-])
|
||||
-CPPFLAGS="$CPPFLAGS_SAVE"
|
||||
-
|
||||
-dnl Ensure we can link against libjson
|
||||
-LIBS_SAVE="$LIBS"
|
||||
-LIBS="$JSON_LDFLAGS"
|
||||
-AC_CHECK_LIB([json-c], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson-c"], [
|
||||
- AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson"], [], [])
|
||||
-], [])
|
||||
-LIBS="$LIBS_SAVE"
|
||||
-
|
||||
-if test "$HAVE_JSON" = "yes"; then
|
||||
+PKG_CHECK_MODULES([JSON], [json],
|
||||
+ [
|
||||
+ HAVE_JSON=yes
|
||||
AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present])
|
||||
-fi
|
||||
-if test "$HAVE_JSON_C" = "yes"; then
|
||||
- AC_DEFINE([HAVE_LIBJSON_C], 1, [Define to 1 if libjson resides in a json-c subdir])
|
||||
-fi
|
||||
-
|
||||
-AC_SUBST([JSON_CPPFLAGS])
|
||||
-AC_SUBST([JSON_LDFLAGS])
|
||||
-AC_SUBST([HAVE_JSON])
|
||||
-
|
||||
-fi dnl }
|
||||
+ ],
|
||||
+ [
|
||||
+ PKG_CHECK_MODULES([JSON], [json-c],
|
||||
+ [
|
||||
+ HAVE_JSON=yes
|
||||
+ AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present])
|
||||
+ ],
|
||||
+ [HAVE_JSON=no])
|
||||
+ ])
|
||||
|
||||
dnl ===========================================================================
|
||||
dnl Detect GTK+2.0 for GUI
|
||||
@@ -927,7 +885,7 @@ AC_DEFINE_UNQUOTED([POSTGIS_USE_STATS], [1], [Enable use of ANALYZE statistics])
|
||||
CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $XML2_CPPFLAGS $SFCGAL_CPPFLAGS $CPPFLAGS"
|
||||
AC_MSG_RESULT([CPPFLAGS: $CPPFLAGS])
|
||||
|
||||
-SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS $SFCGAL_LDFLAGS"
|
||||
+SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LIBS $XML2_LDFLAGS $SFCGAL_LDFLAGS"
|
||||
AC_SUBST([SHLIB_LINK])
|
||||
dnl AC_MSG_RESULT([SHLIB_LINK: $SHLIB_LINK])
|
||||
|
||||
diff --git a/liblwgeom/Makefile.in b/liblwgeom/Makefile.in
|
||||
index 3cc6256..5ccbb3b 100644
|
||||
--- a/liblwgeom/Makefile.in
|
||||
+++ b/liblwgeom/Makefile.in
|
||||
@@ -11,8 +11,8 @@
|
||||
# **********************************************************************
|
||||
|
||||
CC = @CC@
|
||||
-CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ @JSON_CPPFLAGS@
|
||||
-LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj @JSON_LDFLAGS@
|
||||
+CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ @JSON_CFLAGS@
|
||||
+LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj @JSON_LIBS@
|
||||
NUMERICFLAGS = @NUMERICFLAGS@
|
||||
top_builddir = @top_builddir@
|
||||
prefix = @prefix@
|
||||
diff --git a/liblwgeom/lwin_geojson.c b/liblwgeom/lwin_geojson.c
|
||||
index 7019626..ec1d594 100644
|
||||
--- a/liblwgeom/lwin_geojson.c
|
||||
+++ b/liblwgeom/lwin_geojson.c
|
||||
@@ -19,13 +19,8 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
-#ifdef HAVE_LIBJSON_C
|
||||
-#include <json-c/json.h>
|
||||
-#include <json-c/json_object_private.h>
|
||||
-#else
|
||||
-#include <json/json.h>
|
||||
-#include <json/json_object_private.h>
|
||||
-#endif
|
||||
+#include <json.h>
|
||||
+#include <json_object_private.h>
|
||||
|
||||
#ifndef JSON_C_VERSION
|
||||
// Adds support for libjson < 0.10
|
@ -1,49 +0,0 @@
|
||||
# This file is used by 'emerge --config dev-db/postgis' to determine which
|
||||
# databases it should install to, upgrade or create as a template.
|
||||
|
||||
# Unlike the previous versions of the PostGIS ebuilds, it no longer creates any
|
||||
# databases except for templates. All databases you list must already exist in
|
||||
# the cluster.
|
||||
|
||||
# The user to perform the updates as. This user must have the privileges to
|
||||
# modify all of the databases you list here.
|
||||
pguser="postgres"
|
||||
|
||||
# By default, no databases will have PostGIS enabled. The databases listed here
|
||||
# must already exist. The databases you list here must not already be PostGIS
|
||||
# enabled. Instead, use the upgrade lists further down.
|
||||
#databases=( "your" "databases" )
|
||||
|
||||
# Anything you place in this list will create a database and make it a template.
|
||||
# It will be PostGIS-enabled. To add additional features, add the template names
|
||||
# to the following lists.
|
||||
#templates=( "template_postgis" )
|
||||
|
||||
# The PostGIS enabled templates will be created using this template.
|
||||
from_template="template1"
|
||||
|
||||
# For a complete set of EPSG coordinate system definition identifiers, you can
|
||||
# also load the spatial_ref_sys.sql definitions file and populate the
|
||||
# spatial_ref_sys table. This will permit you to perform ST_Transform()
|
||||
# operations on geometries.
|
||||
#epsg_databases=( "enable" "epsg" "on" "these" "databases" )
|
||||
|
||||
# Add comments to PostGIS functions to the databases in this list.
|
||||
#comment_databases=( "comments" "on" "these" "databases" )
|
||||
|
||||
# Any databases you have that are already PostGIS enabled can be listed among
|
||||
# the following list to perform a soft upgrade. If the soft upgrade fails,
|
||||
# you'll need to do a hard upgrade.
|
||||
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#hard_upgrade
|
||||
|
||||
# Upgrade from PostGIS 1.3 to 1.5
|
||||
#upgrade_from_1_3=( "upgrade" "these" "databases" )
|
||||
|
||||
# Upgrade from PostGIS 1.4 to 1.5
|
||||
#upgrade_from_1_4=( "upgrade" "these" "databases" )
|
||||
|
||||
# Perform a minor upgrade for PostGIS 1.5
|
||||
#upgrade_from_1_5=( "upgrade" "these" "databases" )
|
||||
|
||||
# Uncomment this once you're satisfied with the settings in this file.
|
||||
#configured="true"
|
@ -1,281 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
POSTGRES_COMPAT=( 9.{2,3,4} )
|
||||
|
||||
inherit autotools eutils versionator
|
||||
|
||||
MY_PV=$(replace_version_separator 3 '')
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DESCRIPTION="Geographic Objects for PostgreSQL"
|
||||
HOMEPAGE="http://postgis.net"
|
||||
SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc gtk static-libs test"
|
||||
|
||||
RDEPEND="
|
||||
|| (
|
||||
dev-db/postgresql:9.4[server]
|
||||
dev-db/postgresql:9.3[server]
|
||||
dev-db/postgresql:9.2[server]
|
||||
)
|
||||
dev-libs/json-c:=
|
||||
dev-libs/libxml2:2
|
||||
>=sci-libs/geos-3.4.2
|
||||
>=sci-libs/proj-4.6.0
|
||||
>=sci-libs/gdal-1.10.0:=
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
doc? (
|
||||
app-text/docbook-xsl-stylesheets
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
dev-libs/libxslt
|
||||
virtual/imagemagick-tools[png]
|
||||
)
|
||||
virtual/pkgconfig
|
||||
test? ( dev-util/cunit )
|
||||
"
|
||||
|
||||
PGIS="$(get_version_component_range 1-2)"
|
||||
|
||||
REQUIRED_USE="test? ( doc )"
|
||||
|
||||
# Needs a running psql instance, doesn't work out of the box
|
||||
RESTRICT="test"
|
||||
|
||||
MAKEOPTS+=' -j1'
|
||||
|
||||
# These modules are built using the same *FLAGS that were used to build
|
||||
# dev-db/postgresql. The right thing to do is to ignore the current
|
||||
# *FLAGS settings.
|
||||
QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
|
||||
|
||||
postgres_check_slot() {
|
||||
if ! declare -p POSTGRES_COMPAT &>/dev/null; then
|
||||
die 'POSTGRES_COMPAT not declared.'
|
||||
fi
|
||||
|
||||
# Don't die because we can't run postgresql-config during pretend.
|
||||
[[ "$EBUILD_PHASE" = "pretend" \
|
||||
&& -z "$(which postgresql-config 2> /dev/null)" ]] && return 0
|
||||
|
||||
local res=$(echo ${POSTGRES_COMPAT[@]} \
|
||||
| grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null)
|
||||
|
||||
if [[ "$res" -eq "0" ]] ; then
|
||||
eerror "PostgreSQL slot must be set to one of: "
|
||||
eerror " ${POSTGRES_COMPAT[@]}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
postgres_check_slot || die
|
||||
export PGSLOT="$(postgresql-config show)"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${PN}-2.1-ldflags.patch" \
|
||||
"${FILESDIR}/${PN}-2.0-arflags.patch" \
|
||||
"${FILESDIR}/${PN}-2.1.4-pkgconfig-json.patch"
|
||||
|
||||
local AT_M4DIR="macros"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myargs=""
|
||||
use gtk && myargs+=" --with-gui"
|
||||
econf \
|
||||
--with-pgconfig="/usr/lib/postgresql-${PGSLOT}/bin/pg_config" \
|
||||
${myargs}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
emake -C topology
|
||||
|
||||
if use doc ; then
|
||||
emake comments
|
||||
emake cheatsheets
|
||||
emake -C doc html
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
use doc && emake DESTDIR="${D}" comments-install
|
||||
emake -C topology DESTDIR="${D}" install
|
||||
dobin ./utils/postgis_restore.pl
|
||||
|
||||
dodoc CREDITS TODO loader/README.* doc/*txt
|
||||
|
||||
use doc && dohtml -r doc/html/*
|
||||
|
||||
docinto topology
|
||||
dodoc topology/{TODO,README}
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}/postgis_dbs"
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "To finish installing or updating PostGIS edit:"
|
||||
elog " ${EROOT%/}/etc/postgis_dbs"
|
||||
elog
|
||||
elog "Then, run:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_config(){
|
||||
source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}"
|
||||
source "${EROOT%/}/etc/postgis_dbs"
|
||||
local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}"
|
||||
|
||||
if [[ -n ${configured} ]] ; then
|
||||
einfon "Password for PostgreSQL user '${pguser}': "
|
||||
read -s PGPASSWORD
|
||||
export PGPASSWORD
|
||||
echo
|
||||
else
|
||||
eerror "You must edit:"
|
||||
eerror " ${EROOT%/}/etc/postgis_dbs"
|
||||
eerror "Before running 'emerge --config =${CATEGORY}/${PF}'"
|
||||
eerror
|
||||
die "Edit postgis_dbs"
|
||||
fi
|
||||
|
||||
# The server we work with must be the same slot we built against.
|
||||
local server_match
|
||||
server_match=$(psql -U ${pguser} -d postgres -p ${PGPORT} \
|
||||
-Aqwtc 'SELECT version()' 2> /dev/null | grep -c "PostgreSQL ${PGSLOT}")
|
||||
if [[ $? = 0 ]] ; then
|
||||
if [[ $server_match -ne 1 ]] ; then
|
||||
unset PGPASSWORD
|
||||
eerror "Server version must be ${PGSLOT}.x"
|
||||
die "Server version isn't ${PGSLOT}.x"
|
||||
fi
|
||||
else
|
||||
unset PGPASSWORD
|
||||
eerror "Is the server running?"
|
||||
die "Couldn't connect to server."
|
||||
fi
|
||||
|
||||
local retval
|
||||
safe_exit() {
|
||||
unset PGPASSWORD
|
||||
sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs"
|
||||
eend $retval
|
||||
eerror "All actions could not be performed."
|
||||
eerror "Read above to see what failed."
|
||||
eerror "Once you fix the issue, you'll need to edit:"
|
||||
eerror " ${EROOT%/}/etc/postgis_dbs"
|
||||
eerror "As some things may have succeeded."
|
||||
eerror
|
||||
die "All actions could not be performed"
|
||||
}
|
||||
|
||||
local db
|
||||
for db in ${databases[@]} ; do
|
||||
ebegin "Performing CREATE LANGUAGE on ${db}"
|
||||
createlang -U ${pguser} -p ${PGPORT} plpgsql ${db}
|
||||
retval=$?
|
||||
# In this case, only error code 1 is fatal
|
||||
[[ $retval == 1 ]] && safe_exit || eend 0
|
||||
|
||||
ebegin "Enabling PostGIS on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${templates[@]} ; do
|
||||
ebegin "Creating template database '${db}'"
|
||||
createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \
|
||||
${db} "PostGIS Template"
|
||||
retval=$?
|
||||
[[ $retval != 0 ]] && safe_exit
|
||||
|
||||
psql -q -U ${pguser} -p ${PGPORT} -c \
|
||||
"UPDATE pg_database \
|
||||
SET datistemplate = TRUE, datallowconn = TRUE \
|
||||
WHERE datname = '${db}'"
|
||||
retval=$?
|
||||
[[ $retval != 0 ]] && safe_exit
|
||||
|
||||
createlang -U ${pguser} -p ${PGPORT} plpgsql ${db}
|
||||
retval=$?
|
||||
# In this case, only error code 1 is fatal
|
||||
[[ $retval == 1 ]] && safe_exit
|
||||
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${epsg_databases[@]} ; do
|
||||
ebegin "Adding EPSG to ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/spatial_ref_sys.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${comment_databases[@]} ; do
|
||||
ebegin "Adding comments on ${db}"
|
||||
local comment_file
|
||||
for comment_file in "${postgis_path}"/*_comments.sql ; do
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && continue || safe_exit
|
||||
done
|
||||
eend 0
|
||||
done
|
||||
|
||||
for db in ${upgrade_from_1_3[@]} ; do
|
||||
ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${upgrade_from_1_4[@]} ; do
|
||||
ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${upgrade_from_1_5[@]} ; do
|
||||
ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
# Clean up and make it so the user has to edit postgis_dbs again that
|
||||
# way this script won't step on any toes due to user error.
|
||||
unset PGPASSWORD
|
||||
sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs"
|
||||
einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled."
|
||||
einfo
|
||||
einfo "Currently, only one PostgreSQL slot at a time can be PostGIS enabled."
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
POSTGRES_COMPAT=( 9.{2..6} )
|
||||
POSTGRES_USEDEP="server"
|
||||
|
||||
inherit autotools eutils postgres-multi versionator
|
||||
|
||||
MY_PV=$(replace_version_separator 3 '')
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DESCRIPTION="Geographic Objects for PostgreSQL"
|
||||
HOMEPAGE="http://postgis.net"
|
||||
SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc gtk static-libs test"
|
||||
|
||||
RDEPEND="
|
||||
${POSTGRES_DEP}
|
||||
dev-libs/json-c:=
|
||||
dev-libs/libxml2:2
|
||||
>=sci-libs/geos-3.5.0
|
||||
>=sci-libs/proj-4.6.0
|
||||
>=sci-libs/gdal-1.10.0
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
doc? (
|
||||
app-text/docbook-xsl-stylesheets
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
dev-libs/libxslt
|
||||
|| (
|
||||
media-gfx/imagemagick[png]
|
||||
media-gfx/graphicsmagick[imagemagick,png]
|
||||
)
|
||||
)
|
||||
virtual/pkgconfig
|
||||
test? ( dev-util/cunit )
|
||||
"
|
||||
|
||||
PGIS="$(get_version_component_range 1-2)"
|
||||
|
||||
REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
|
||||
|
||||
# Needs a running psql instance, doesn't work out of the box
|
||||
RESTRICT="test"
|
||||
|
||||
MAKEOPTS+=' -j1'
|
||||
|
||||
# These modules are built using the same *FLAGS that were used to build
|
||||
# dev-db/postgresql. The right thing to do is to ignore the current
|
||||
# *FLAGS settings.
|
||||
QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
|
||||
|
||||
src_prepare() {
|
||||
eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch"
|
||||
|
||||
local AT_M4DIR="macros"
|
||||
eautoreconf
|
||||
postgres-multi_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myargs=""
|
||||
use gtk && myargs+=" --with-gui"
|
||||
postgres-multi_foreach econf ${myargs}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
postgres-multi_foreach emake
|
||||
postgres-multi_foreach emake -C topology
|
||||
|
||||
if use doc ; then
|
||||
postgres-multi_foreach emake comments
|
||||
postgres-multi_foreach emake cheatsheets
|
||||
postgres-multi_forbest emake -C doc html
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
postgres-multi_foreach emake DESTDIR="${D}" install
|
||||
postgres-multi_foreach emake -C topology DESTDIR="${D}" install
|
||||
postgres-multi_forbest dobin ./utils/postgis_restore.pl
|
||||
|
||||
dodoc CREDITS TODO loader/README.* doc/*txt
|
||||
|
||||
docinto topology
|
||||
dodoc topology/{TODO,README}
|
||||
|
||||
if use doc ; then
|
||||
postgres-multi_foreach emake DESTDIR="${D}" comments-install
|
||||
|
||||
docinto html
|
||||
postgres-multi_forbest dodoc doc/html/{postgis.html,style.css}
|
||||
|
||||
docinto html/images
|
||||
postgres-multi_forbest dodoc doc/html/images/*
|
||||
fi
|
||||
|
||||
use static-libs || find "${ED}" -name '*.a' -delete
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ebegin "Refreshing PostgreSQL symlinks"
|
||||
postgresql-config update
|
||||
eend $?
|
||||
|
||||
elog "To finish installing PostGIS, follow the directions detailed at:"
|
||||
elog "http://postgis.net/docs/manual-${PGIS}/postgis_installation.html#create_new_db_extensions"
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue