diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-04-28 09:54:45 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-04-28 09:54:45 +0100 |
commit | b7ebc951da8800f711142f69d9d958bde67a112d (patch) | |
tree | e318514216845acb8f2e49fff7a5cba4027e9d91 /dev-db/redis | |
parent | dc7cbdfa65fd814b3b9aa3c56257da201109e807 (diff) |
gentoo resync : 28.04.2019
Diffstat (limited to 'dev-db/redis')
-rw-r--r-- | dev-db/redis/Manifest | 8 | ||||
-rw-r--r-- | dev-db/redis/files/redis.service-3 | 14 | ||||
-rw-r--r-- | dev-db/redis/files/redis.tmpfiles-2 | 2 | ||||
-rw-r--r-- | dev-db/redis/metadata.xml | 3 | ||||
-rw-r--r-- | dev-db/redis/redis-4.0.14.ebuild | 155 | ||||
-rw-r--r-- | dev-db/redis/redis-5.0.4.ebuild | 155 |
6 files changed, 333 insertions, 4 deletions
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest index 141c49db91d2..43c53c8c303e 100644 --- a/dev-db/redis/Manifest +++ b/dev-db/redis/Manifest @@ -12,17 +12,23 @@ AUX redis.confd-r1 511 BLAKE2B 911e6f7ca70013d4feefb6ec7ee3f98220f303d48c95f27c2 AUX redis.initd-5 696 BLAKE2B 11b2a50a74c9aea57b01ee7be7d3e1d70ca21db994c35b6d386115eb4f9c329ad6f77b80ce46c17e026a440e532e976c3e1a1f7c550e9f50cc812ef557c5f8d9 SHA512 cd5ae1cb0beded7c70fc7ab0bcbfe378dbac5bf78235877fedb4599c01bfcffc36909e638b032b29c79c5a5c55da11795c58a845b6eadf4cc41174903070183d AUX redis.logrotate 105 BLAKE2B 1281fd86d399b40aaaa69d1fe170b2c49523c074e14b12907428b676b03d510b680363dd5041428d5fddecb91a510baf53dfa57df66d697ba4846f1e49ab59fe SHA512 9cbd27732c7f8270bf9b8563df0964af142d1ac4e97417e495fcb02e730e93fdfafac9370188a2fce040d55d6c3704e284a50b6300616a3f13a03a6e25c1ae49 AUX redis.service-2 253 BLAKE2B 0b78b45eaed3c7adbc68703968e1c843eeff785261cf7f4636df215d742c717d6fe95bb24e0aa947d64962ad20adacd48a4dd59b98eae479e7a33c1a0f2af7e1 SHA512 b42b73bb54ccc0d16adafb91aabe010092f548ec7979d8a0ed1c4563d9fca378eeb74c0c556f7565a32199ed30ca8a13d6b610d9cda39fd23da1428a410f62cc +AUX redis.service-3 249 BLAKE2B 92a6914601fa9b587f439e5cb30c9b00ed53d6dc9d18f7ca8f34075f3d77836b82018baf3d6e46ad27ab90ed5de5a553fd5ffe4305afadb7b173b56dcb328de3 SHA512 5af7d61282e90e72faa8b328c11c70bd2cb255265e3a29c4f2208795c4876a08f9e01cb473d2a537362ed0b282b22aa51612cb95e192f96fa9a7b974a99da369 AUX redis.tmpfiles 61 BLAKE2B 1c3bf8aa105940c408163f61c63ed16b86de7a979cb5143d15700cac329970f351cb9b9377aa82e6f4dae377b00c1710a1e0f54334f007cfed64551f761034d4 SHA512 741ff5a4df5b04e7af4e81357812bf5b6cf992bc18b6052074aef134401d0a92703a2e41f52966012c05ea80fac5636435c8d3e6ed55e62a5711526ba67ee738 +AUX redis.tmpfiles-2 57 BLAKE2B 1e0577c1828bb693cf820f3ba5e77d7d748adf4df2d1910d465ce097765308c7b7ea729526404120d04a79b547e865df93f7bfce1e63341c73563496f1dce691 SHA512 3de050ce044b7daf71219ec61dee2bc31acef161319b87ec2963b23c72e8a4807f1302c4932897664a63ef94507449f6ab75ce18d59f5e1a4558c330a7042e43 DIST redis-4.0.10.tar.gz 1738465 BLAKE2B 572cbb3d2d5d7209f81ebd53ee68f40b404d0e4623bd1864845bf1f47135d4e097a6974d346ffd845d848c39ace6d3fb9f1a347e0c9d16d06d22aed7a8b3ae7b SHA512 0978dabaf637e61889d492fd3629acd58ca8fb0c0088cdd7036ffd1a7ed3f018c107039d4c96bd61d0b7d35757df2366d051f57d77ffb5642aca0e5651b30603 DIST redis-4.0.11.tar.gz 1739656 BLAKE2B d94f380ad1600e58942cc5b27b512984396cdbb06ea6e947c7d7ce5b8ecdb8a2a56c6356af2caa82a96887a610716c9575b78eb2f46da89efb940febc1c30f22 SHA512 f0054af9ca2143731a397b2b21285387707b7f40d9326ba15225feb1a2ff470fab5194308342f63bbe1081f84c7e9ef19543c5a8e3eae49e17bfc515c64201f0 DIST redis-4.0.12.tar.gz 1740544 BLAKE2B 620dba8b81fc76a46880c3a4a7ee9d9835e7b19e6d321598a717892f6f03fa805db79847442744a2af8f77ae403b6e1df02299da9a0835f6092a74e3804dde48 SHA512 d19020f7ebed9ad5d04c6e1cb7e2a49dd1e226fe17d86e860df11bcb798c61c09f6f9fc3572a7ee32232ac34ec5eb1d6189f8139b5991bd87297c5243c3b54d2 DIST redis-4.0.13.tar.gz 1740715 BLAKE2B 73d129906b2a2ceb91d1144f8c8aeb970221f7ef4d1d0f0bac0aada6976ba6b2b4fdbe7cca29e350e8258986ee2607526896fcfb90536596a5fd556c6186faa6 SHA512 c220420bf6cb2781a3fb9e002188b1663743c89c262fd5aff02e585c969b56e7691fe1073e7427e6d38cf7b5a096f86b83af84cfa6b01a5bdf56048789e0bb70 +DIST redis-4.0.14.tar.gz 1740967 BLAKE2B d9122565ba890416d8936db936bc1410af840cc7617b485b94428891806d5889f5f02c2e722a7e68fe6c0b2690c1ef3479cc8837c55fb154f2b43af9986647a4 SHA512 7730a4083962046f8fee674a8ce95e1d3e8c8dcc2d64a65491dc3b851413b2d745942be7a94ee77074aa530da5f3d458c4e7388d7950a8495d8ee9f4862b7e06 DIST redis-4.0.2.tar.gz 1713990 BLAKE2B 307ab76b336f7520e14a23a1577c46e1b63cc5a5a5b6afb725cb87934fbcb62107085671fd1072d1142ce8e92f069e6b6064c9f4468335bc6997897c8f494471 SHA512 1458909c6fc16cff8ca5e6dddff23b988ee1e447f2d0bccf5941553b22bab6abb851732b3fe53dafb8a69d6c0939c3ce7e0686d51e03be720fb018c038d3b1b4 DIST redis-5.0.3.tar.gz 1959445 BLAKE2B d1c3247d77aa3b1076d0e1a0dcce74dcfb14a0ad3776603ef8154d7868f9f3efcf2138cb08581eee1974e9d76658d07456d6e9795391321b1f1f8bca7f9d40f5 SHA512 5915b14502438bf7c3f56e38640dda54b095bd87501aefa6e386c9cef48e8d1e625e980643d128d91b8cab26dd51d5d99ca66fa638dc04e5ba315fe43f11f58b +DIST redis-5.0.4.tar.gz 1966337 BLAKE2B 9195e970d7c987c2540da3a89f4fc33620f6a45ed243fa24715fe20f174d5e569e5ff940834176b3f26b13d9cca95f1d2914d65ad71f295787553c6bb8552089 SHA512 336929c81a476e2a23a64f867823d70c3aab66fb0098eef2e61630be6522ff2f6af680169ffcae35d559758b2c6b56f88c5a953a538291fea886449cba33b8ad EBUILD redis-4.0.10.ebuild 4069 BLAKE2B 33bf7fbd67db2035d3bdc92f01f1252c9a27a1a3c736f555d21c6670920e03057b30bc51594898414dc5a18312c1af5f74f01b86ede936025cb44d6f0e478855 SHA512 52c9a38d8823fa87ddb8aea6db611bf43b0e3543eddb275a991da075095e27758de2f5456685a01eb79e3166a642a38256cd95f75d5cf7b1a432dcb3af29f671 EBUILD redis-4.0.11.ebuild 4074 BLAKE2B 609631167471b07d3caccad80d601e4d73a594a97979b25f828c171c341f2f8d24c12e2399ad81b8952e5f459f0a340726a4e8ee69a1f51b0626b52d18e7ce3c SHA512 86c003235c630c87a551b31f359a5fe824d7114016f22788cf8dc84dec56d5bea24c3fdbc86efd15734ccb636394bb6fc4f4d757566ac857605fa23c841db4d4 EBUILD redis-4.0.12.ebuild 4071 BLAKE2B 712cefef53f55c9e60a1461a5bc843866fdf60815ecb42675b929b6b4fdd98dc270fa3544e6739ce22616f5f5a15efac7ecb4f78a910271bb15acaeacde07516 SHA512 2df15597298b24a7c2f317ce52d9efdb810a558da8f40902cda5865e43a8f59d699f0c92f025bfdfae183ac6b019eb0ad130a745ace48d8865a9642c0bacd7c1 EBUILD redis-4.0.13.ebuild 4071 BLAKE2B ce447abe1db2a9bf75fb506cb910a0906447ddd64d251907a4a4fce753189c41c7b42938a97f716169eae19d1868440bdc4b993b937dc896124f025df0453a85 SHA512 40b346d0d67fdc1f8fa5d80b3c502230b78a59ec9a2242e87c0091bd18ae33a76904ab1ccff4a197b867a7a3bdfd6d7462db93b127f59f628aa01e1bce3b098e +EBUILD redis-4.0.14.ebuild 4620 BLAKE2B bb0066857876fff3a79adcd97f07ed73013b64595b8c221ee86c7d5196daba669b1abd66ea66ea4690b08ebdc43c9d06ea723ef98c60df15f6752e1c799e8a3c SHA512 071eb5bcf0a7c9757a870f2c9be0896e862792c090eeb324ec628f1a20d636bb38e53716ce295816d9bc26f655ac0c6fa65acbebaf7828f750dbd5e904e801f0 EBUILD redis-4.0.2-r1.ebuild 3807 BLAKE2B 7dbd27ad7593b53f1f7184321ba33f140072ef946859b33cf8dacf7eb98c9d7398c512ce403132bf3b9fece12e73cc0e4dd5cca1dbc220d50dea105ea87ef774 SHA512 d7744c01cbf4b6f1fec17ce7733a31f4deb3e925afbafb3a9aaa360d9598aff78b44c3bcadc54e82c809ff6ba0211e475d32f96ec4244f6081e3f5cfde1b1daa EBUILD redis-5.0.3.ebuild 4559 BLAKE2B c7c725eb0117a509f8e56c8d57bbf64cc1970e6e90819f284cd3b5c982a3400d53be7dd3c3552001dffd6ef6440d8164ccb3b2a4e76613388a4b50e541e9eb2a SHA512 36ddfc7f091e48daee3b7c3ff7230a6b1137fd143a40c861597699071941262b1d7575c1141c1fa0783df0f09a42381112d77a88e6d16d10fb712b218a50ae6d -MISC metadata.xml 440 BLAKE2B b853160a8483ff59c413a37b8fd1703283cc80c5ea9de092654dd1809bdc6ed3dc98fb6285a3f33bfea136bdf3db4065b3e22c34f7458e9e83aa63e137a13eb3 SHA512 7c125eed761e5f4c868a3fd5539d5182b9c4da6ddeb0cb82a46dc6d0cc682410eb100168ddb4b5fb214d6092395394cefef5bc8fd3dcce818542d30748f9bd17 +EBUILD redis-5.0.4.ebuild 4616 BLAKE2B 92c18f4d7d8be03e6d238966d585e29c65643fdb4ba2067c80615105e688518e78ef6d8383be6c8c777b598317b7223a427859a0cbd63c9dfefcf8962503535b SHA512 e14d9c0c1195ad474fcdea771f2ebc6dc1e8bbac00888fe842800ee926e0a0c9056d98f31f5c44b41bc3215af5ac029ec0c3057f3ce68da2bc72877b15d5e969 +MISC metadata.xml 356 BLAKE2B 19e27b12be84927b990fc2f481d8dd1f88f05b5e029fdd91c7ce9517e7fd378d6e1df1eb55052a04fefe781da09b371da1c28fd269c72f4222aa896897222bf7 SHA512 ab06f694c5b20072f40e85b3a8e05d2c333f3b29fc145733fde1e3f42ea78ac7c51550afc29e671ef9b4a163597ac9f44bc182344c18db52036595e5d65f7e22 diff --git a/dev-db/redis/files/redis.service-3 b/dev-db/redis/files/redis.service-3 new file mode 100644 index 000000000000..1c733fcec172 --- /dev/null +++ b/dev-db/redis/files/redis.service-3 @@ -0,0 +1,14 @@ +[Unit] +Description=A persistent key-value database +After=syslog.target network.target + +[Service] +Type=simple +PIDFile=/run/redis/redis.pid +ExecStart=/usr/sbin/redis-server /etc/redis.conf +User=redis +Group=redis + +[Install] +WantedBy=multi-user.target + diff --git a/dev-db/redis/files/redis.tmpfiles-2 b/dev-db/redis/files/redis.tmpfiles-2 new file mode 100644 index 000000000000..87087d2b773f --- /dev/null +++ b/dev-db/redis/files/redis.tmpfiles-2 @@ -0,0 +1,2 @@ +# redis runtime directory +d /run/redis 0755 redis root - diff --git a/dev-db/redis/metadata.xml b/dev-db/redis/metadata.xml index 96eae677a075..d0450c61b48e 100644 --- a/dev-db/redis/metadata.xml +++ b/dev-db/redis/metadata.xml @@ -2,9 +2,6 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>ultrabug@gentoo.org</email> - </maintainer> - <maintainer type="person"> <email>robbat2@gentoo.org</email> </maintainer> <use> diff --git a/dev-db/redis/redis-4.0.14.ebuild b/dev-db/redis/redis-4.0.14.ebuild new file mode 100644 index 000000000000..08d29146a9bc --- /dev/null +++ b/dev-db/redis/redis-4.0.14.ebuild @@ -0,0 +1,155 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="https://redis.io" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc luajit test" +SLOT="0" + +# Redis does NOT build with Lua 5.2 or newer at this time. +# This should link correctly with both unslotted & slotted Lua, without +# changes. +RDEPEND=" + luajit? ( dev-lang/luajit:2 ) + !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) + tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" + +BDEPEND=" + ${RDEPEND} + virtual/pkgconfig" + +# Tcl is only needed in the CHOST test env +DEPEND="${RDEPEND} + test? ( dev-lang/tcl:0= )" + +REQUIRED_USE="?? ( tcmalloc jemalloc )" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + eapply \ + "${FILESDIR}"/${PN}-3.2.3-config.patch \ + "${FILESDIR}"/${PN}-4.0.1-shared.patch \ + "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \ + "${FILESDIR}"/${PN}-sentinel-4.0.6-config.patch + eapply_user + + # Copy lua modules into build dir + cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die + cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die + # Append cflag for lua_cjson + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61 + append-cflags "-DENABLE_CJSON_GLOBAL" + + # now we will rewrite present Makefiles + local makefiles="" MKF + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die + + # Use the correct pkgconfig name for Lua + if false && has_version 'dev-lang/lua:5.3'; then + # Lua5.3 gives: + #lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h" + LUAPKGCONFIG=lua5.3 + elif false && has_version 'dev-lang/lua:5.2'; then + # Lua5.2 fails with: + # scripting.c:(.text+0x1f9b): undefined reference to `lua_open' + # Because lua_open because lua_newstate in 5.2 + LUAPKGCONFIG=lua5.2 + elif has_version 'dev-lang/lua:5.1'; then + LUAPKGCONFIG=lua5.1 + else + LUAPKGCONFIG=lua + fi + # The upstream configure script handles luajit specially, and is not + # effected by these changes. + einfo "Selected LUAPKGCONFIG=${LUAPKGCONFIG}" + sed -i \ + -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \ + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \ + configure.ac || die "Sed failed for configure.ac" + eautoreconf +} + +src_configure() { + econf \ + $(use_with luajit) + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd-r1" redis + newinitd "${FILESDIR}/redis.initd-5" redis + + systemd_newunit "${FILESDIR}/redis.service-3" redis.service + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf + + newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel + newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb + fperms 0750 /usr/sbin/redis-benchmark + dosym redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} diff --git a/dev-db/redis/redis-5.0.4.ebuild b/dev-db/redis/redis-5.0.4.ebuild new file mode 100644 index 000000000000..07c6466e9a12 --- /dev/null +++ b/dev-db/redis/redis-5.0.4.ebuild @@ -0,0 +1,155 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="https://redis.io" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc luajit test" +SLOT="0" + +# Redis does NOT build with Lua 5.2 or newer at this time. +# This should link correctly with both unslotted & slotted Lua, without +# changes. +RDEPEND=" + luajit? ( dev-lang/luajit:2 ) + !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) + tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-5.1:= )" + +BDEPEND=" + ${RDEPEND} + virtual/pkgconfig" + +# Tcl is only needed in the CHOST test env +DEPEND="${RDEPEND} + test? ( dev-lang/tcl:0= )" + +REQUIRED_USE="?? ( tcmalloc jemalloc )" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + eapply \ + "${FILESDIR}"/${PN}-3.2.3-config.patch \ + "${FILESDIR}"/${PN}-5.0-shared.patch \ + "${FILESDIR}"/${PN}-5.0-sharedlua.patch \ + "${FILESDIR}"/${PN}-sentinel-5.0-config.patch + eapply_user + + # Copy lua modules into build dir + cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die + cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die + # Append cflag for lua_cjson + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61 + append-cflags "-DENABLE_CJSON_GLOBAL" + + # now we will rewrite present Makefiles + local makefiles="" MKF + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die + + # Use the correct pkgconfig name for Lua + if false && has_version 'dev-lang/lua:5.3'; then + # Lua5.3 gives: + #lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h" + LUAPKGCONFIG=lua5.3 + elif false && has_version 'dev-lang/lua:5.2'; then + # Lua5.2 fails with: + # scripting.c:(.text+0x1f9b): undefined reference to `lua_open' + # Because lua_open because lua_newstate in 5.2 + LUAPKGCONFIG=lua5.2 + elif has_version 'dev-lang/lua:5.1'; then + LUAPKGCONFIG=lua5.1 + else + LUAPKGCONFIG=lua + fi + # The upstream configure script handles luajit specially, and is not + # effected by these changes. + einfo "Selected LUAPKGCONFIG=${LUAPKGCONFIG}" + sed -i \ + -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \ + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \ + configure.ac || die "Sed failed for configure.ac" + eautoreconf +} + +src_configure() { + econf \ + $(use_with luajit) + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd-r1" redis + newinitd "${FILESDIR}/redis.initd-5" redis + + systemd_newunit "${FILESDIR}/redis.service-3" redis.service + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf + + newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel + newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb + fperms 0750 /usr/sbin/redis-benchmark + dosym redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} |