]> git.pld-linux.org Git - packages/gdb.git/blobdiff - gdb.spec
- updated to 14.1 + rebased Fedora buildid patches set
[packages/gdb.git] / gdb.spec
index 0f0a29800b627265b2a60e1d451d770e4e262421..5ce5af420f0473201ce6bc588acc33d1d6e210b1 100644 (file)
--- a/gdb.spec
+++ b/gdb.spec
@@ -1,7 +1,8 @@
 # NOTE: -lib package is used by fpc.spec
 
 # TODO
-# - rpm5 librpm support (gdb/configure.ac checks for 4.x or so)
+# - debuginfod (BR: elfutils-debuginfod-devel >= 0.179)
+# - amd-dbgapi (BR: pkgconfig(amd-dbgapi) >= 0.68.0) <https://github.com/ROCm/ROCdbgapi>
 # - change install msg to poldek in buildid-locate-rpm-pld.patch when poldek allows it. LP#493922
 #
 # Conditional build:
@@ -19,32 +20,22 @@ Summary(tr.UTF-8):  C ve diğer diller için sembolik hata ayıklayıcı
 Summary(uk.UTF-8):     Символьний відладчик для С та інших мов
 Summary(zh_CN.UTF-8):  [开发]C和其他语言的调试器
 Summary(zh_TW.UTF-8):  [.-A開發]C和.$)B其.-A他語.$)B言的調試器
-%define                snap    20120926
 Name:          gdb
-Version:       8.0
+Version:       14.1
 Release:       1
 License:       GPL v3+
 Group:         Development/Debuggers
-Source0:       http://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.xz
-# Source0-md5: c3d35cd949084be53b92cc1e03485f88
+Source0:       https://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.xz
+# Source0-md5: 4a084d03915b271f67e9b8ea2ab24972
 Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: 2e8a48939ae282c12bbacdd54e398247
 Source3:       %{name}-gstack.man
-Patch0:                x32.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-scl.patch
 Patch110:      gdb-6.3-gstack-20050411.patch
-Patch111:      gdb-gdb-add-index-script.patch
-Patch112:      gdb-archer-vla-tests.patch
-Patch113:      gdb-vla-intel-fortran-strides.patch
-Patch114:      gdb-vla-intel-stringbt-fix.patch
-Patch115:      gdb-vla-intel-fortran-vla-strings.patch
-Patch116:      gdb-vla-intel-tests.patch
 Patch1000:     %{name}-readline.patch
 Patch1001:     %{name}-info.patch
 Patch1002:     %{name}-passflags.patch
@@ -53,33 +44,51 @@ Patch1006:  buildid-locate-rpm-pld.patch
 URL:           http://www.gnu.org/software/gdb/
 BuildRequires: autoconf >= 2.69
 BuildRequires: automake
-BuildRequires: bison
 BuildRequires: babeltrace-devel >= 1.1.0
+BuildRequires: bison
 BuildRequires: expat-devel
 BuildRequires: flex >= 2.6.4
 BuildRequires: gettext-tools >= 0.12.1
-%{?with_guile:BuildRequires:   guile-devel >= 2.0}
+BuildRequires: gmp-devel >= 4.3.2
+%if %{with guile}
+BuildRequires: guile-devel >= 5:2.0
+BuildRequires: guile-devel < 5:3.2
+%endif
+%ifarch %{ix86} %{x8664}
+BuildRequires: libipt-devel
+%endif
+BuildRequires: libmpc-devel >= 0.8.1
 BuildRequires: libselinux-devel
 BuildRequires: libstdc++-devel >= 6:4.8
-BuildRequires: libtool
+BuildRequires: libtool >= 2:2
 BuildRequires: make >= 3.81
+BuildRequires: mpfr-devel >= 3.1.6
 BuildRequires: ncurses-devel >= 5.2
 BuildRequires: pkgconfig
 BuildRequires: readline-devel
+BuildRequires: rpm-devel >= 1:4.6
 BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: source-highlight-devel >= 3.0
+BuildRequires: tar >= 1:1.22
 BuildRequires: texinfo >= 4.4
+BuildRequires: xxHash-devel
+BuildRequires: xz
 BuildRequires: xz-devel
 BuildRequires: zlib-devel
 %if %{with python}
-BuildRequires: python-devel
+BuildRequires: python3-devel >= 1:3.2
 BuildRequires: rpm-pythonprov
-Obsoletes:     python-gdb
+Obsoletes:     python-gdb < 7.3
 # for traceback module
-Requires:      python-modules
+Requires:      python3-modules >= 1:3.2
 %endif
-%{?with_guile:Requires:        guile >= 2.0}
+%{?with_guile:Requires:        guile >= 2.0.12}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                autoconf_ver    %(rpm -q --qf='%%{VERSION}' autoconf)
+
+%define                _noautostrip    .*%{_datadir}/gdb/guile/.*\.go
+
 %description
 Gdb is a full featured, command driven debugger. Gdb allows you to
 trace the execution of programs and examine their internal state at
@@ -164,7 +173,7 @@ Requires:   expat-devel
 Requires:      libselinux-devel
 Requires:      libsepol-devel
 Requires:      ncurses-devel
-Requires:      python-devel
+Requires:      python3-devel
 Requires:      readline-devel
 Requires:      xz-devel
 Requires:      zlib-devel
@@ -178,26 +187,16 @@ GDB w postaci biblioteki statycznej.
 %prep
 %setup -q
 
-%patch0 -p1
-
 # Files have `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
-rm -f gdb/ada-exp.c gdb/ada-lex.c gdb/c-exp.c gdb/cp-name-parser.c gdb/f-exp.c
-rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
+%{__rm} gdb/ada-exp.c gdb/ada-lex.c gdb/c-exp.c gdb/cp-name-parser.c gdb/f-exp.c
+%{__rm} gdb/m2-exp.c gdb/p-exp.c
 
 %patch100 -p1
 %patch101 -p1
 %patch102 -p1
-%patch103 -p1
 %patch104 -p1
 %patch105 -p1
-%patch106 -p1
 %patch110 -p1
-%patch111 -p1
-%patch112 -p1
-%patch113 -p1
-%patch114 -p1
-%patch115 -p1
-%patch116 -p1
 
 %patch1000 -p1
 %patch1001 -p1
@@ -210,11 +209,27 @@ cat > gdb/version.in << EOF
 %{version}-%{release} (PLD Linux)
 EOF
 
-sed -i -e 's#_GCC_AUTOCONF_VERSION\], \[2\.64\]#_GCC_AUTOCONF_VERSION], [2.69]#g' config/override.m4
+%{__sed} -i -e '1s,/usr/bin/python$,%{__python},' \
+      contrib/dg-extract-results.py \
+
+%{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' \
+      gdb/contrib/test_pubnames_and_indexes.py \
+      gdb/testsuite/print-ts.py
+
+%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
+      gdb/testsuite/analyze-racy-logs.py \
+      gdb/copyright.py
+
+%{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' \
+      gdb/contrib/cc-with-tweaks.sh \
+      gdb/gcore.in \
+      src-release.sh
+
+sed -i -e 's/\[2\.69\]/[%{autoconf_ver}]/' config/override.m4
 
 %build
 # omit hand-written gdb/testsuite aclocal.m4
-for dir in gdb gdb/gdbserver ; do
+for dir in gdb gdbserver ; do
        olddir=$(pwd)
        cd $dir
        %{__rm} aclocal.m4
@@ -230,52 +245,54 @@ for dir in $(find gdb -name 'configure.in' -o -name 'configure.ac'); do
        cd $olddir
 done
 cp -f /usr/share/automake/config.* .
+install -d build && cd build
 # don't --enable-shared here, there would be libs version mismatch with binutils
-%configure \
-       --with-gdb-datadir=%{_datadir}/gdb \
-       --with-separate-debug-dir=/usr/lib/debug \
-%if %{with python}
-       --with-python=yes \
-       --with-pythondir=%{py_sitescriptdir} \
-%else
-       --without-python \
-%endif
-%if %{with guile}
-       --with-guile \
-%else
-       --without-guile \
-%endif
+../%configure \
        --disable-gdbtk \
        --disable-shared \
+       --disable-silent-rules \
        --enable-gdbcli \
        --enable-gdbmi \
        --enable-multi-ice \
        --enable-netrom \
        --enable-nls \
        --enable-tui \
-       --with-system-readline \
        --with-cpu=%{_target_cpu} \
+       --with-gdb-datadir=%{_datadir}/gdb \
+       --with-guile%{!?with_guile:=no} \
 %ifnarch alpha
        --with-mmalloc \
 %endif
+%if %{with python}
+       --with-python="%{__python3}" \
+       --with-pythondir=%{py3_sitescriptdir} \
+%else
+       --without-python \
+%endif
+       --with-separate-debug-dir=/usr/lib/debug \
+       --with-system-readline \
        --without-included-gettext \
        --without-included-regex \
        --without-x
 
-%{__make}
+# V=1 because only some subdirs honour --enable-silent-rules
+%{__make} \
+       V=1
+
 %{__make} -j1 info
 
 # gdb/ChangeLog: Build gdb directly from *.o files not using libgdb.a.
-%{__make} -C gdb libgdb.a
+%{__make} -C gdb libgdb.a \
+       V=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_infodir}
 
-%{__make} -j1 install install-info \
+%{__make} -C build -j1 install install-info \
        DESTDIR=$RPM_BUILD_ROOT
 
-cp -a gdb/libgdb.a $RPM_BUILD_ROOT%{_libdir}
+cp -a build/gdb/libgdb.a $RPM_BUILD_ROOT%{_libdir}
 
 # gdbtui seems all identical to gdb except when invoked as gdbtui, ncurses
 # window is created too.
@@ -294,22 +311,21 @@ for LIB in lib lib64 libx32; do
        install -d $LIBPATH
 done
 
-%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_postclean
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
+%py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
 %endif
 
 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man1/gstack.1
 
-install libdecnumber/libdecnumber.a $RPM_BUILD_ROOT%{_libdir}
+cp -p build/libdecnumber/libdecnumber.a $RPM_BUILD_ROOT%{_libdir}
 
 # Remove the files that are part of a gdb build but that are owned and provided by other packages.
 # These are part of binutils:
 %{__rm} $RPM_BUILD_ROOT%{_localedir}/*/LC_MESSAGES/{bfd,opcodes}.mo
-%{__rm} $RPM_BUILD_ROOT%{_infodir}/bfd.info*
-%{__rm} $RPM_BUILD_ROOT%{_includedir}/{ansidecl,bfd,bfdlink,dis-asm,symcat,plugin-api}.h
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.a
+%{__rm} $RPM_BUILD_ROOT%{_infodir}/{bfd,ctf-spec,sframe-spec}.info*
+%{__rm} $RPM_BUILD_ROOT%{_includedir}/{ansidecl,bfd,bfdlink,ctf,ctf-api,diagnostics,dis-asm,symcat,plugin-api}.h
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{bfd,ctf,ctf-nobfd,opcodes}.la
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{bfd,ctf,ctf-nobfd,opcodes}.a
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -322,7 +338,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc gdb/{ChangeLog,NEWS,PROBLEMS,README}
+%doc gdb/{NEWS,PROBLEMS,README}
 %attr(755,root,root) %{_bindir}/gdb
 %attr(755,root,root) %{_bindir}/gdbtui
 %attr(755,root,root) %{_bindir}/gdb-add-index
@@ -336,6 +352,9 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_datadir}/gdb/auto-load%{_prefix}/lib64
 %dir %{_datadir}/gdb/auto-load%{_prefix}/libx32
 %endif
+%ifarch aarch64
+%dir %{_datadir}/gdb/auto-load%{_prefix}/lib64
+%endif
 %{?with_guile:%{_datadir}/gdb/guile}
 %{_datadir}/gdb/syscalls
 %{_datadir}/gdb/system-gdbinit
@@ -359,7 +378,9 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/gdbserver
 %{_mandir}/man1/gdbserver.1*
+%ifnarch %{arm}
 %attr(755,root,root) %{_libdir}/libinproctrace.so
+%endif
 
 %files lib
 %defattr(644,root,root,755)
This page took 0.059265 seconds and 4 git commands to generate.