From 9cfc13ad6c16984230e81354d064e1b743ba1138 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 23 Mar 2022 15:15:41 +0000 Subject: [PATCH] made mod-ffi build optional in the rpm spec file --- hawk/pkgs/hawk.spec.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hawk/pkgs/hawk.spec.in b/hawk/pkgs/hawk.spec.in index 6a2b4564..38cafa01 100644 --- a/hawk/pkgs/hawk.spec.in +++ b/hawk/pkgs/hawk.spec.in @@ -1,6 +1,8 @@ %define _prefix /usr %define _sysconfdir /etc +%define enable_mod_ffi 0 + Summary: HAWK Interpreter Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ @@ -12,7 +14,10 @@ Group: System Environment/Libraries Source0: %{name}-%{version}.tar.gz #Requires: -BuildRequires: mysql-devel, libffi-devel +BuildRequires: mysql-devel +%if %{enable_mod_ffi} +BuildRequires: libffi-devel +%endif BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %description @@ -48,7 +53,11 @@ CFLAGS="${RPM_OPT_FLAGS} -fPIC" CXXFLAGS="${RPM_OPT_FLAGS} -fPIC" ./configure \ --enable-pthread-flags=yes \ --enable-libltdl=no \ --enable-libunwind=no \ +%if %{enable_mod_ffi} --enable-mod-ffi=yes \ +%else + --enable-mod-ffi=no \ +%endif --with-mysql=yes \ --enable-mod-mysql=yes \ --enable-mod-uci=no ##CC=gcc44 CXX=g++44