diff options
author | Göktürk Yüksek <gokturk@gentoo.org> | 2016-11-22 03:24:13 -0500 |
---|---|---|
committer | Göktürk Yüksek <gokturk@gentoo.org> | 2016-11-22 03:36:43 -0500 |
commit | 1c22f394b2c25a3cc427c685c4369da015f1863f (patch) | |
tree | 22a659c992f0a336d9e1df0bdef22dc68d04725b /app-crypt | |
parent | www-client/seamonkey: Bump to version 2.46_pre6 (latest rc). (diff) | |
download | gentoo-1c22f394b2c25a3cc427c685c4369da015f1863f.tar.gz gentoo-1c22f394b2c25a3cc427c685c4369da015f1863f.tar.bz2 gentoo-1c22f394b2c25a3cc427c685c4369da015f1863f.zip |
app-crypt/libu2f-server: backport optional tests patch #587472
Package-Manager: portage-2.3.0
Diffstat (limited to 'app-crypt')
-rw-r--r-- | app-crypt/libu2f-server/files/libu2f-server-1.0.1-tests-fix.patch | 54 | ||||
-rw-r--r-- | app-crypt/libu2f-server/libu2f-server-1.0.1.ebuild | 10 |
2 files changed, 62 insertions, 2 deletions
diff --git a/app-crypt/libu2f-server/files/libu2f-server-1.0.1-tests-fix.patch b/app-crypt/libu2f-server/files/libu2f-server-1.0.1-tests-fix.patch new file mode 100644 index 000000000000..3cbb9c93868c --- /dev/null +++ b/app-crypt/libu2f-server/files/libu2f-server-1.0.1-tests-fix.patch @@ -0,0 +1,54 @@ +From: Gokturk Yuksek <gokturk@gentoo.org> +Subject: [PATCH] Make tests with CHECK optional at configure time + +--- a/configure.ac ++++ b/configure.ac +@@ -63,7 +63,15 @@ + + PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto], [], []) + +-PKG_CHECK_MODULES([CHECK], [check], [], []) ++AC_ARG_ENABLE([tests], ++ [AS_HELP_STRING([--enable-tests], ++ [use check to run the unit tests])], ++ [enable_tests=$enableval], ++ [enable_tests=no]) ++AM_CONDITIONAL([ENABLE_TESTS],[test '!' "$enable_tests" = no]) ++if test '!' "$enable_tests" = no; then ++ PKG_CHECK_MODULES([CHECK], [check], [], [AC_MSG_NOTICE(Check package not found `make check` won't work)]) ++fi + + AC_ARG_ENABLE([coverage], + [AS_HELP_STRING([--enable-coverage], +@@ -123,11 +131,15 @@ + Makefile + gtk-doc/Makefile + src/Makefile +- tests/Makefile + u2f-server/Makefile + u2f-server/u2f-server-version.h + u2f-server/u2f-server.pc + ]) ++if test '!' "$enable_tests" = no; then ++ AC_CONFIG_FILES([ ++ tests/Makefile ++ ]) ++fi + AC_OUTPUT + + AC_MSG_NOTICE([summary of build options: +--- a/Makefile.am ++++ b/Makefile.am +@@ -25,7 +25,11 @@ + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-SUBDIRS = u2f-server src tests gtk-doc ++SUBDIRS = u2f-server src gtk-doc ++ ++if ENABLE_TESTS ++SUBDIRS+=tests ++endif + + ACLOCAL_AMFLAGS = -I m4 + diff --git a/app-crypt/libu2f-server/libu2f-server-1.0.1.ebuild b/app-crypt/libu2f-server/libu2f-server-1.0.1.ebuild index 1ff2ecd28903..e59d5748197f 100644 --- a/app-crypt/libu2f-server/libu2f-server-1.0.1.ebuild +++ b/app-crypt/libu2f-server/libu2f-server-1.0.1.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://developers.yubico.com/${PN}/Releases/${P}.tar.xz" LICENSE="BSD-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="static-libs" +IUSE="static-libs test" RDEPEND=" dev-libs/openssl:0=[${MULTILIB_USEDEP}] @@ -22,18 +22,24 @@ RDEPEND=" " DEPEND="${RDEPEND} virtual/pkgconfig - dev-libs/check[${MULTILIB_USEDEP}] + test? ( dev-libs/check[${MULTILIB_USEDEP}] ) " +PATCHES=( + "${FILESDIR}/${P}-tests-fix.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[@]}" |