diff --git a/gdb.spec b/gdb.spec index 6f7cf3b..bf0ff68 100644 --- a/gdb.spec +++ b/gdb.spec @@ -2,6 +2,7 @@ # --with testsuite: Run the testsuite (biarch if possible). Default is without. # --with debug: Build without optimizations and without splitting the debuginfo. # --with upstream: No Fedora specific patches get applied. +# --without python: No python support. Summary: A GNU source-level debugger for C, C++, Java and other languages Name: gdb%{?_with_debug:-debug} @@ -13,7 +14,7 @@ Version: 6.8.50.20090302 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 25%{?_with_upstream:.upstream}%{?dist} +Release: 26%{?_with_upstream:.upstream}%{?dist} License: GPLv3+ Group: Development/Debuggers @@ -388,9 +389,11 @@ BuildRequires: readline-devel # dlopen() no longer makes rpm-libs a mandatory dependency. #Requires: rpm-libs BuildRequires: rpm-devel +%if 0%{!?_without_python:1} %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Requires: python-libs BuildRequires: python-devel +%endif # 0%{!?_without_python:1} # Temporarily before it gets moved to libstdc++.rpm BuildRequires: libstdc++ @@ -647,7 +650,11 @@ CFLAGS="$CFLAGS -O0 -ggdb2" --with-system-readline \ --with-expat \ --enable-tui \ +%if 0%{!?_without_python:1} --with-python \ +%else + --without-python \ +%endif --with-rpm=librpm.so \ %ifarch ia64 --with-libunwind \ @@ -774,6 +781,7 @@ ln -sf gdb $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui cmp $RPM_BUILD_ROOT%{_mandir}/*/gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1 ln -sf gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1 +%if 0%{!?_without_python:1} # In the future: #%# A part of the libstdc++ rpm. #%rm -rf $RPM_BUILD_ROOT%{python_sitelib}/gdb/libstdcxx @@ -785,6 +793,7 @@ for LIB in lib lib64;do sed -e 's,@dir@,%{python_sitelib}/gdb,' <$RPM_BUILD_DIR/%{gdb_src}/gdb/python/lib/gdb/libstdcxx/v6/hook.in \ >$LIBPATH/$(basename %{_prefix}/%{_lib}/libstdc++.so.6.*)-gdb.py done +%endif # 0%{!?_without_python:1} # Remove the files that are part of a gdb build but that are owned and # provided by other packages. @@ -844,7 +853,9 @@ fi %{_bindir}/pstack %{_mandir}/*/gstack.1* %{_mandir}/*/pstack.1* +%if 0%{!?_without_python:1} %{python_sitelib}/gdb +%endif # 0%{!?_without_python:1} %{_datadir}/gdb %endif # 0%{!?_with_upstream:1} %{_infodir}/annotate.info* @@ -861,6 +872,9 @@ fi %endif %changelog +* Mon Apr 27 2009 Jan Kratochvil - 6.8.50.20090302-26 +- Support a new rpmbuild option: --without python + * Mon Apr 27 2009 Jan Kratochvil - 6.8.50.20090302-25 - The Koji build failures may have been by forgotten check-in of the Patch360.