sys-apps/nix: add USE=s3 for AWS S3support, bug #670256
authorSergei Trofimovich <slyfox@gentoo.org>
Sun, 4 Nov 2018 22:49:58 +0000 (22:49 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Sun, 4 Nov 2018 22:50:17 +0000 (22:50 +0000)
Disable automagic autodetection of S3 backend. Does not
fix originally reported build failure in bug #670256 yet.

Reported-by: Toralf Förster
Bug: https://bugs.gentoo.org/670256
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

sys-apps/nix/metadata.xml
sys-apps/nix/nix-2.0.4.ebuild
sys-apps/nix/nix-2.1.3.ebuild

index ad64c7e5102b56fc939126158975cc0f5f9b7dcd..c7035d7472ffe72a529cc238c580ace7eb2bc0e0 100644 (file)
@@ -8,6 +8,7 @@
        <use>
                <flag name="etc_profile">Install /etc/profile.d/ entry to inject nix support for all users.</flag>
                <flag name="gc">Enable garbage collection in the Nix expression evaluator (use <pkg>dev-libs/boehm-gc</pkg>).</flag>
+               <flag name="s3">Enable Amazon S3 bucket to load and store packages (use <pkg>dev-libs/aws-sdk-cpp</pkg>).</flag>
                <flag name="sodium">Use <pkg>dev-libs/libsodium</pkg> for cryptography</flag>
        </use>
 </pkgmetadata>
index bea6bd1a4240a4527738ce37b1e133abf32a1a19..965584cf6f01e5522ecbecba0f3a315ca5abd1ee 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -12,7 +12,7 @@ SRC_URI="http://nixos.org/releases/${PN}/${P}/${P}.tar.xz"
 LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="+etc_profile +gc doc sodium"
+IUSE="+etc_profile +gc doc s3 sodium"
 
 RDEPEND="
        app-arch/brotli
@@ -28,6 +28,7 @@ RDEPEND="
                dev-libs/libxslt
                app-text/docbook-xsl-stylesheets
        )
+       s3? ( dev-libs/aws-sdk-cpp )
        sodium? ( dev-libs/libsodium:0= )
 "
 DEPEND="${RDEPEND}
@@ -79,9 +80,17 @@ src_prepare() {
 }
 
 src_configure() {
+       local econf_args=()
+
+       if ! use s3; then
+               # Disable automagic depend: bug #670256
+               export ac_cv_header_aws_s3_S3Client_h=no
+       fi
+
        econf \
                --localstatedir="${EPREFIX}"/nix/var \
-               $(use_enable gc)
+               $(use_enable gc) \
+               "${args[@]}"
 }
 
 src_compile() {
index a104f3b883a04f8dcd04a8412cf7103f535f41d3..4eb0d459fc846485da74227d8ae22f23f77f4883 100644 (file)
@@ -13,7 +13,7 @@ LICENSE="LGPL-2.1"
 SLOT="0"
 #keywords are blocked by boost-1.66
 #KEYWORDS="~amd64 ~x86"
-IUSE="+etc_profile +gc doc sodium"
+IUSE="+etc_profile +gc doc s3 sodium"
 
 RDEPEND="
        app-arch/brotli
@@ -30,6 +30,7 @@ RDEPEND="
                dev-libs/libxslt
                app-text/docbook-xsl-stylesheets
        )
+       s3? ( dev-libs/aws-sdk-cpp )
        sodium? ( dev-libs/libsodium:0= )
 "
 DEPEND="${RDEPEND}
@@ -81,9 +82,16 @@ src_prepare() {
 }
 
 src_configure() {
+       local econf_args=()
+
+       if ! use s3; then
+               # Disable automagic depend: bug #670256
+               export ac_cv_header_aws_s3_S3Client_h=no
+       fi
        econf \
                --localstatedir="${EPREFIX}"/nix/var \
-               $(use_enable gc)
+               $(use_enable gc) \
+               "${args[@]}"
 }
 
 src_compile() {