diff --git a/slang.spec b/slang.spec index bfacc0f..af0746a 100644 --- a/slang.spec +++ b/slang.spec @@ -1,3 +1,8 @@ +%if 0%{?fedora:1} +%bcond_without oniguruma +%else +%bcond_with oniguruma +%endif Summary: The shared library for the S-Lang extension language Name: slang Version: 2.2.4 @@ -9,9 +14,7 @@ Source: ftp://space.mit.edu/pub/davis/slang/v2.2/%{name}-%{version}.tar.bz2 Patch1: slang-2.2.4-perms.patch URL: http://www.jedsoft.org/slang/ BuildRequires: libpng-devel pcre-devel zlib-devel -%if 0%{?fedora:1} -BuildRequires: oniguruma-devel -%endif +%{?with_oniguruma:BuildRequires: oniguruma-devel} %description S-Lang is an interpreted language and a programming library. The @@ -67,8 +70,12 @@ head -n -1800 < changes.txt > changes.txt_ && tail -n 1800 < changes.txt | \ %build %configure \ - --with-{pcre,onig,png,z}lib=%{_libdir} \ - --with-{pcre,onig,png,z}inc=%{_includedir} \ + --with-{pcre,png,z}lib=%{_libdir} \ + --with-{pcre,png,z}inc=%{_includedir} \ +%if %{with oniguruma} + --with-oniglib=%{_libdir} \ + --with-oniginc=%{_includedir} \ +%endif ; # fails with %{?_smp_mflags}