+# TODO:
+# - MPI support (if with jumbo)
+# - CUDA support on bcond (if with jumbo)
#
# Conditional build:
%bcond_without jumbo # Build community-enhanced version with lots of contributed
# patches adding support for over 30
# of additional hash types, and more.
+%bcond_without gomp # OpenMP support (in jumbo version)
+%bcond_without opencl # OpenCL support (in jumbo version)
%bcond_with avx # use x86 AVX instructions
%bcond_with xop # use x86 XOP instructions
%bcond_with altivec # use PPC Altivec instructions
Patch2: jumbo-optflags.patch
Patch3: jumbo-x32.patch
URL: http://www.openwall.com/john/
-%{?with_jumbo:BuildRequires: openssl-devel >= 0.9.7}
BuildRequires: rpmbuild(macros) >= 1.213
BuildRequires: tar >= 1:1.22
BuildRequires: xz
+%if %{with jumbo}
+%{?with_opencl:BuildRequires: OpenCL-devel}
+BuildRequires: bzip2-devel
+%{?with_gomp:BuildRequires: gcc >= 6:4.2}
+BuildRequires: gmp-devel
+%{?with_gomp:BuildRequires: libgomp-devel}
+# for SIPdump and vncpcap2john binaries, which are not packaged
+#BuildRequires: libpcap-devel
+BuildRequires: openssl-devel >= 0.9.7
+BuildRequires: pkgconfig
+%ifarch %{ix86} %{x8664} x32
+BuildRequires: yasm
+%endif
+BuildRequires: zlib-devel
+%endif
Requires: words
%ifarch %{ix86} %{x8664}
%if %{with xop}
%ifarch x32
ax_intel_x32=yes \
%endif
-%configure
+%configure \
+ %{!?with_opencl:--disable-opencl} \
+ %{!?with_gomp:--disable-openmp}
%{__make}
%else
cat > defs.h <<'EOF'