Package not found: openSUSE:Slowroll/fetchmail.20251028220804

File gdb.spec of Package gdb

#
# spec file for package gdb
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           gdb
Version:        13.1
Release:        0
Summary:        The GNU Debugger
License:        GFDL-1.2 and GPL-2.0+ and GPL-3.0+
Group:          Development/Tools/Debuggers
Url:            http://www.gnu.org/software/gdb/
Source:         http://ftp.gnu.org/gnu/gdb/gdb-%{version}.tar.xz
Patch5:         gstack.patch
Patch100:       gdb-6.6-buildid-locate.patch
Patch101:       gdb-6.6-buildid-locate-solib-missing-ids.patch
Patch102:       gdb-6.6-buildid-locate-rpm.patch
Patch103:       gdb-6.6-buildid-locate-core-as-arg.patch
Patch104:       gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
Patch105:       gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
Patch106:       gdb-6.6-buildid-locate-rpm-suse.patch
BuildRequires:  bison
BuildRequires:  dejagnu
BuildRequires:  flex
%ifnarch s390x ppc64le
BuildRequires:  gcc-ada
%endif
BuildRequires:  gcc-c++
BuildRequires:  gcc-fortran
BuildRequires:  gcc-objc
BuildRequires:  glibc-devel-static
BuildRequires:  guile-devel
%if 0%{?suse_version} > 1020
BuildRequires:  libexpat-devel
%else
BuildRequires:  expat
%endif
%ifarch ia64
BuildRequires:  libunwind-devel
%endif
BuildRequires:  procps
BuildRequires:  python-devel
BuildRequires:  readline-devel
BuildRequires:  rpm-devel
BuildRequires:  texinfo
BuildRequires:  zlib-devel
Requires:       python-base
Requires(post): %{install_info_prereq}
Requires(postun): %{install_info_prereq}
%ifarch ppc64
Obsoletes:      gdb-64bit
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
You can use GDB to debug programs written in C, C++, Ada, and Modula-2.
GNU Fortran 77 support is also partially included.

%package -n gdbserver
Summary:        Remote Server for the GNU Debugger
License:        GPL-2.0+ and GPL-3.0+
Group:          Development/Tools/Debuggers
Provides:       gdb:%{_bindir}/gdbserver

%description -n gdbserver
GDBSERVER is a program that allows you to run GDB on a different
machine than the one which is running the program being debugged.

%prep
%setup -q
%patch5
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1

%global gdb_build build-%{_target_platform}

rm -f gdb/doc/GDBvn.texi

%build
mkdir %{gdb_build}
cd %{gdb_build}

%ifarch %ix86 ia64 ppc ppc64 ppc64le s390 s390x x86_64 aarch4
%define build_multitarget 1
%else
%define build_multitarget 0
%endif

%define target_list i686 ia64 powerpc powerpc64 powerpc64le riscv64 s390 s390x x86_64 arm aarch64 m68k
%define DIST %(echo '%{distribution}' | sed 's/ (.*)//')
%if %{build_multitarget}
EXTRA_TARGETS="%(printf ,%%s-suse-linux %{target_list})"
EXTRA_TARGETS="$EXTRA_TARGETS,spu-elf"
%else
EXTRA_TARGETS=
%endif
export LIBRPM=$(ldd /bin/rpm \
                    | grep librpm.so \
                    | awk '{print $3}')
if [ "$LIBRPM" != "" ]; then
    [ -f "$LIBRPM" ]
else
    export LIBRPM=no
fi
../configure CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" \
  --prefix=%{_prefix} --libdir=%{_libdir} --infodir=%{_infodir} \
  --mandir=%{_mandir} --with-system-readline \
%ifarch ia64
  --with-libunwind \
%else
  --without-libunwind \
%endif
  --with-separate-debug-dir=%{_libexecdir}/debug \
  --enable-64-bit-bfd --disable-werror --disable-sim \
  --with-bugurl=http://bugs.opensuse.org/ \
%if 0%{?distribution:1}
  --with-pkgversion="GDB; %{DIST}" \
%endif
  --with-rpm=$LIBRPM \
  --build=%{_target_cpu}-suse-linux \
  ${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}" --enable-obsolete}
make %{?_smp_mflags} V=1
make info V=1

%check
cd %{gdb_build}
ulimit -c $(ulimit -Hc)
TERM=dumb \
%ifarch ppc64
make -k check RUNTESTFLAGS=--target_board=unix/-m64 || :
%else
make -k check || :
%endif

%install
cd %{gdb_build}
make install-gdb install-info-gdb install-gdbserver DESTDIR="$RPM_BUILD_ROOT"
rm -f %{buildroot}%{_bindir}/gdbtui
rm -f %{buildroot}%{_mandir}/man1/gdbtui.1
rm -f %{buildroot}%{_infodir}/stabs.info*

%post
%install_info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz

%files
%defattr(-,root,root)
%doc COPYING COPYING.LIB gdb/README gdb/NEWS
%{_bindir}/gdb
%{_bindir}/gdb-add-index
%{_bindir}/gstack
%{_bindir}/gcore
%{_datadir}/gdb
%{_includedir}/gdb
%{_mandir}/man1/gdb.1.gz
%{_mandir}/man1/gdb-add-index.1.gz
%{_mandir}/man1/gcore.1.gz
%{_mandir}/man5/gdbinit.5.gz
%{_infodir}/annotate.info*.gz
%{_infodir}/gdb.info*.gz

%ifnarch alpha sparc sparc64
%files -n gdbserver
%defattr(-,root,root)
%doc gdbserver/README
%{_bindir}/gdbserver
%{_libdir}/*.so
%{_mandir}/man1/gdbserver.1.gz
%endif

%changelog
openSUSE Build Service is sponsored by