summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Byrne <salah.coronya@gmail.com>2022-03-28 22:22:43 -0500
committerJoonas Niilola <juippis@gentoo.org>2022-04-14 11:54:34 +0300
commitb239ccbe1e3cf5b397e1303fecb2ebf57bd35570 (patch)
treeceb9dd9e72da7f1621df8f8d528e074386c17f5a /app-crypt/swtpm
parentmedia-gfx/freecad: add option to build designer plugin (diff)
downloadgentoo-b239ccbe1e3cf5b397e1303fecb2ebf57bd35570.tar.gz
gentoo-b239ccbe1e3cf5b397e1303fecb2ebf57bd35570.tar.bz2
gentoo-b239ccbe1e3cf5b397e1303fecb2ebf57bd35570.zip
app-crypt/swtpm: Fix conditional patching
Signed-off-by: Christopher Byrne <salah.coronya@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/24797 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-crypt/swtpm')
-rw-r--r--app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch26
-rw-r--r--app-crypt/swtpm/files/swtpm-0.7.2-Conditionalize-test-dependencies.patch42
-rw-r--r--app-crypt/swtpm/swtpm-0.7.2.ebuild5
3 files changed, 45 insertions, 28 deletions
diff --git a/app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch b/app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch
deleted file mode 100644
index 3880385256e3..000000000000
--- a/app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index d035653..0728a2e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -325,21 +325,11 @@ fi
- AM_CONDITIONAL([WITH_GNUTLS], [test "x$with_gnutls" = "xyes"])
- AC_SUBST([GNUTLS_LIBS])
-
--AC_PATH_PROG([EXPECT], expect)
--if test "x$EXPECT" = "x"; then
-- AC_MSG_ERROR([expect is required: expect package])
--fi
--
- AC_PATH_PROG([GAWK], gawk)
- if test "x$GAWK" = "x"; then
- AC_MSG_ERROR([gawk is required: gawk package])
- fi
-
--AC_PATH_PROG([SOCAT], socat)
--if test "x$SOCAT" = "x"; then
-- AC_MSG_ERROR([socat is required: socat package])
--fi
--
- AC_PATH_PROG([BASE64], base64)
- if test "x$BASE64" = "x"; then
- AC_MSG_ERROR([base64 is required: base64 package])
diff --git a/app-crypt/swtpm/files/swtpm-0.7.2-Conditionalize-test-dependencies.patch b/app-crypt/swtpm/files/swtpm-0.7.2-Conditionalize-test-dependencies.patch
new file mode 100644
index 000000000000..b17e1c2470fc
--- /dev/null
+++ b/app-crypt/swtpm/files/swtpm-0.7.2-Conditionalize-test-dependencies.patch
@@ -0,0 +1,42 @@
+configure.ac: Conditionalize test dependencies
+
+Signed-off-by: Christopher Byrne <salah.coronya@gmail.com>
+--- a/configure.ac
++++ b/configure.ac
+@@ -369,20 +369,25 @@ else
+ fi
+ AC_SUBST([DEFAULT_PCR_BANKS])
+
+-AC_PATH_PROG([EXPECT], expect)
+-if test "x$EXPECT" = "x"; then
+- AC_MSG_ERROR([expect is required: expect package])
+-fi
++AC_ARG_ENABLE([test],
++ [AS_HELP_STRING([--enable-test],
++ [enable tests (default is yes)])],
++ [enable_test=$enableval],
++ [enable_test=yes])
++
++AS_IF([test "x$enable_test" != xno],
++ [AC_PATH_PROG([EXPECT], expect)
++ AS_IF([test "x$EXPECT" = "x"],
++ AC_MSG_ERROR([expect is required: expect package]))
++ AC_PATH_PROG([SOCAT], socat)
++ AS_IF([test "x$SOCAT" = "x"],
++ AC_MSG_ERROR([socat is required: socat package]))])
+
+ AC_PATH_PROG([GAWK], gawk)
+ if test "x$GAWK" = "x"; then
+ AC_MSG_ERROR([gawk is required: gawk package])
+ fi
+
+-AC_PATH_PROG([SOCAT], socat)
+-if test "x$SOCAT" = "x"; then
+- AC_MSG_ERROR([socat is required: socat package])
+-fi
+
+ AC_PATH_PROG([BASE64], base64)
+ if test "x$BASE64" = "x"; then
+--
+2.34.1
+
diff --git a/app-crypt/swtpm/swtpm-0.7.2.ebuild b/app-crypt/swtpm/swtpm-0.7.2.ebuild
index 445bd551d578..5563aa1b7f60 100644
--- a/app-crypt/swtpm/swtpm-0.7.2.ebuild
+++ b/app-crypt/swtpm/swtpm-0.7.2.ebuild
@@ -44,10 +44,10 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${PN}-0.6.0-fix-localca-path.patch"
"${FILESDIR}/${PN}-0.5.0-build-sys-Remove-WError.patch"
+ "${FILESDIR}/${PN}-0.7.2-Conditionalize-test-dependencies.patch"
)
src_prepare() {
- use test || eapply "${FILESDIR}/${PN}-0.5.0-disable-test-dependencies.patch"
default
eautoreconf
}
@@ -58,7 +58,8 @@ src_configure() {
--without-selinux \
$(use_with fuse cuse) \
$(use_with gnutls) \
- $(use_with seccomp)
+ $(use_with seccomp) \
+ $(use_enable test)
}
src_install() {