Diff redis-4.0.2-r1 with a redis-4.0.14

/usr/portage/dev-db/redis/redis-4.0.14.ebuild 2019-12-11 02:41:00.000000000 +0300
1 1
# Copyright 1999-2019 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
4
EAPI=7
5 5

  
6
inherit autotools eutils flag-o-matic systemd toolchain-funcs user
6
inherit autotools flag-o-matic systemd toolchain-funcs user
7 7

  
8 8
DESCRIPTION="A persistent caching system, key-value and data structures database"
9
HOMEPAGE="http://redis.io/"
9
HOMEPAGE="https://redis.io"
10 10
SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
11 11

  
12 12
LICENSE="BSD"
13
KEYWORDS="amd64 arm arm64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
13
KEYWORDS="amd64 arm arm64 hppa ~ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
14 14
IUSE="+jemalloc tcmalloc luajit test"
15 15
RESTRICT="!test? ( test )"
16 16
SLOT="0"
......
18 18
# Redis does NOT build with Lua 5.2 or newer at this time.
19 19
# This should link correctly with both unslotted & slotted Lua, without
20 20
# changes.
21
RDEPEND="luajit? ( dev-lang/luajit:2 )
21
RDEPEND="
22
	luajit? ( dev-lang/luajit:2 )
22 23
	!luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
23 24
	tcmalloc? ( dev-util/google-perftools )
24 25
	jemalloc? ( >=dev-libs/jemalloc-3.2 )"
25
DEPEND="virtual/pkgconfig
26
	>=sys-devel/autoconf-2.63
27
	test? ( dev-lang/tcl:0= )
28
	${RDEPEND}"
29
REQUIRED_USE="?? ( tcmalloc jemalloc )"
30 26

  
31
S="${WORKDIR}/${PN}-${PV/_/-}"
27
BDEPEND="
28
	${RDEPEND}
29
	virtual/pkgconfig"
30

  
31
# Tcl is only needed in the CHOST test env
32
DEPEND="${RDEPEND}
33
	test? ( dev-lang/tcl:0= )"
34

  
35
REQUIRED_USE="?? ( tcmalloc jemalloc )"
32 36

  
33 37
pkg_setup() {
34 38
	enewgroup redis 75
......
36 40
}
37 41

  
38 42
src_prepare() {
39
	epatch \
40
		"${FILESDIR}"/${PN}-4.0.1-shared.patch \
43
	eapply \
41 44
		"${FILESDIR}"/${PN}-3.2.3-config.patch \
42
		"${FILESDIR}"/${PN}-4.0.1-sharedlua.patch
45
		"${FILESDIR}"/${PN}-4.0.1-shared.patch \
46
		"${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \
47
		"${FILESDIR}"/${PN}-sentinel-4.0.6-config.patch
43 48
	eapply_user
44 49

  
45 50
	# Copy lua modules into build dir
......
50 55
	append-cflags "-DENABLE_CJSON_GLOBAL"
51 56

  
52 57
	# now we will rewrite present Makefiles
53
	local makefiles=""
58
	local makefiles="" MKF
54 59
	for MKF in $(find -name 'Makefile' | cut -b 3-); do
55 60
		mv "${MKF}" "${MKF}.in"
56 61
		sed -i	-e 's:$(CC):@CC@:g' \
......
64 69
		makefiles+=" ${MKF}"
65 70
	done
66 71
	# autodetection of compiler and settings; generates the modified Makefiles
67
	cp "${FILESDIR}"/configure.ac-3.2 configure.ac
72
	cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
68 73

  
69 74
	# Use the correct pkgconfig name for Lua
70
	has_version 'dev-lang/lua:5.1' \
71
		&& LUAPKGCONFIG=lua5.1 \
72
		|| LUAPKGCONFIG=lua
75
	if false && has_version 'dev-lang/lua:5.3'; then
76
		# Lua5.3 gives:
77
		#lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h"
78
		LUAPKGCONFIG=lua5.3
79
	elif false && has_version 'dev-lang/lua:5.2'; then
80
		# Lua5.2 fails with:
81
		# scripting.c:(.text+0x1f9b): undefined reference to `lua_open'
82
		# Because lua_open because lua_newstate in 5.2
83
		LUAPKGCONFIG=lua5.2
84
	elif has_version 'dev-lang/lua:5.1'; then
85
		LUAPKGCONFIG=lua5.1
86
	else
87
		LUAPKGCONFIG=lua
88
	fi
89
	# The upstream configure script handles luajit specially, and is not
90
	# effected by these changes.
91
	einfo "Selected LUAPKGCONFIG=${LUAPKGCONFIG}"
73 92
	sed -i	\
74 93
		-e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
75 94
		-e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
......
92 111

  
93 112
	local myconf=""
94 113

  
95
	if use tcmalloc ; then
114
	if use tcmalloc; then
96 115
		myconf="${myconf} USE_TCMALLOC=yes"
97
	elif use jemalloc ; then
116
	elif use jemalloc; then
98 117
		myconf="${myconf} JEMALLOC_SHARED=yes"
99 118
	else
100 119
		myconf="${myconf} MALLOC=yes"
......
112 131
	newconfd "${FILESDIR}/redis.confd-r1" redis
113 132
	newinitd "${FILESDIR}/redis.initd-5" redis
114 133

  
115
	systemd_newunit "${FILESDIR}/redis.service-2" redis.service
116
	systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
134
	systemd_newunit "${FILESDIR}/redis.service-3" redis.service
135
	systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf
136

  
137
	newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
138
	newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
139

  
140
	insinto /etc/logrotate.d/
141
	newins "${FILESDIR}/${PN}.logrotate" ${PN}
117 142

  
118 143
	dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
119 144

  
Thank you!