[slang] fix building without oniguruma

Miroslav Lichvar mlichvar at fedoraproject.org
Thu Jan 24 12:43:14 UTC 2013


commit 377874afd26e84c80d3b2e3a60a65959c07686a0
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date:   Thu Jan 24 13:41:30 2013 +0100

    fix building without oniguruma

 slang.spec |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)
---
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}


More information about the scm-commits mailing list