|
|
@@ -139,24 +139,24 @@
|
|
|
%l_bash %{l_prefix}/lib/openpkg/bash
|
|
|
|
|
|
# provide smart paths to tools
|
|
|
-%l_tool_check test -f %{l_bindir}/$tool && tool="%{l_bindir}/$tool"; echo $tool
|
|
|
-%l_gzip %(tool=gzip; %{l_tool_check})
|
|
|
-%l_bzip2 %(tool=bzip2; %{l_tool_check})
|
|
|
-%l_tar %(tool=tar; %{l_tool_check})
|
|
|
-%l_cc %(tool=cc; %{l_tool_check})
|
|
|
-%l_cxx %(tool=c++; %{l_tool_check})
|
|
|
-%l_make %(tool=make; %{l_tool_check})
|
|
|
-%l_patch %(tool=patch; %{l_tool_check})
|
|
|
-%l_sed %(tool=sed; %{l_tool_check})
|
|
|
-%l_grep %(tool=grep; %{l_tool_check})
|
|
|
-%l_awk %(tool=awk; %{l_tool_check})
|
|
|
-%l_autoconf %(tool=autoconf; %{l_tool_check})
|
|
|
-%l_automake %(tool=automake; %{l_tool_check})
|
|
|
-%l_libtool %(tool=libtool; %{l_tool_check})
|
|
|
-%l_flex %(tool=flex; %{l_tool_check})
|
|
|
-%l_bison %(tool=bison; %{l_tool_check})
|
|
|
-%l_perl %(tool=perl; %{l_tool_check})
|
|
|
-%l_xmkmf %(tool=xmkmf; %{l_tool_check})
|
|
|
+%l_tool_locate() %(if [ ".%{expand:%%{?with_%1}}" != . ]; then tool="%{expand:%%{with_%1}}"; elif [ -f "%{l_bindir}/%1" ]; then tool="%{l_bindir}/%1"; else tool="%1"; fi; echo $tool)
|
|
|
+%l_gzip %{l_tool_locate gzip}
|
|
|
+%l_bzip2 %{l_tool_locate bzip2}
|
|
|
+%l_tar %{l_tool_locate tar}
|
|
|
+%l_cc %{l_tool_locate cc}
|
|
|
+%l_cxx %{l_tool_locate c++}
|
|
|
+%l_make %{l_tool_locate make}
|
|
|
+%l_patch %{l_tool_locate patch}
|
|
|
+%l_sed %{l_tool_locate sed}
|
|
|
+%l_grep %{l_tool_locate grep}
|
|
|
+%l_awk %{l_tool_locate awk}
|
|
|
+%l_autoconf %{l_tool_locate autoconf}
|
|
|
+%l_automake %{l_tool_locate automake}
|
|
|
+%l_libtool %{l_tool_locate libtool}
|
|
|
+%l_flex %{l_tool_locate flex}
|
|
|
+%l_bison %{l_tool_locate bison}
|
|
|
+%l_perl %{l_tool_locate perl}
|
|
|
+%l_xmkmf %{l_tool_locate xmkmf}
|
|
|
|
|
|
# tool options
|
|
|
%l_mflags(O) %(%{l_rpmtool} flags -m %{-O:-O} %{l_make})
|