mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00

On NetBSD with ksh changing into a symlink made PWD the link's target path so a 'cd ..' returned you to that parent and not the parent you started from. Record the build top and then change back to that path. Change the package names to the actual packages and remove the extra directory in the build tree. This makes the paths simpler.
115 lines
2.8 KiB
INI
115 lines
2.8 KiB
INI
#
|
|
# GDB 7.xx Version 1.
|
|
#
|
|
# This configuration file configure's, make's and install's gdb.
|
|
#
|
|
|
|
%include %{_configdir}/checks.cfg
|
|
|
|
#
|
|
# Select Snapshot Macro Maps
|
|
#
|
|
%select gdb-snapshot
|
|
%select expat-snapshot
|
|
|
|
#
|
|
# The description.
|
|
#
|
|
Name: %{_target}-gdb-%{gdb_version}-%{release}
|
|
Summary: GDB v%{gdb_version} for target %{_target} on host %{_host}
|
|
Version: %{gdb_version}
|
|
Release: %{release}
|
|
URL: http://www.gnu.org/software/gdb/
|
|
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|
|
|
#
|
|
# Source
|
|
#
|
|
%ifn %{defined Source0}
|
|
Source0: http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
|
|
VersionControl0 git clone git://sourceware.org/git/gdb.git
|
|
%endif
|
|
|
|
#
|
|
# Disable Python on Cxc builds for now.
|
|
#
|
|
%if "%{_build}" != "%{_host}"
|
|
%define without_python
|
|
%endif
|
|
|
|
#
|
|
#
|
|
# Prepare the source code.
|
|
#
|
|
%prep
|
|
build_top=$(pwd)
|
|
|
|
source_dir_0="gdb-%{gdb_version}"
|
|
%setup -q -n gdb-%{gdb_version}
|
|
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
|
%{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
|
|
%{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
|
|
%{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
|
|
%{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
|
|
%{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
|
|
%{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
|
|
%{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
|
|
%{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
|
|
%{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
|
|
|
|
cd ${build_top}
|
|
|
|
%build
|
|
build_top=$(pwd)
|
|
|
|
%{build_directory}
|
|
|
|
mkdir -p ${build_dir}
|
|
cd ${build_dir}
|
|
|
|
%{host_build_flags}
|
|
|
|
if test "%{_build}" != "%{_host}" ; then
|
|
GDB_LIBS_STATIC="-lexpat"
|
|
else
|
|
GDB_LIBS_STATIC="-lexpat"
|
|
GDB_LIBS="%{_forced_static}"
|
|
fi
|
|
|
|
LIBS_STATIC=${GDB_LIBS_STATIC} \
|
|
LIBS=${GDB_LIBS} \
|
|
../${source_dir_0}/configure \
|
|
--build=%{_build} --host=%{_host} \
|
|
--target=%{_target} \
|
|
--verbose --disable-nls \
|
|
--without-included-gettext \
|
|
--disable-win32-registry \
|
|
--disable-werror \
|
|
--enable-sim \
|
|
--with-expat \
|
|
%{!?without_python:--with-python} \
|
|
--prefix=%{_prefix} --bindir=%{_bindir} \
|
|
--exec-prefix=%{_exec_prefix} \
|
|
--includedir=%{_includedir} --libdir=%{_libdir} \
|
|
--mandir=%{_mandir} --infodir=%{_infodir}
|
|
|
|
%{__make} %{?_smp_mflags} all
|
|
|
|
cd ${build_top}
|
|
|
|
%install
|
|
build_top=$(pwd)
|
|
|
|
%{__rmdir} $SB_BUILD_ROOT
|
|
|
|
cd ${build_dir}
|
|
%{__make} DESTDIR=$SB_BUILD_ROOT install
|
|
|
|
# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
|
|
%{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info*
|
|
|
|
%{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir
|
|
touch $SB_BUILD_ROOT%{_infodir}/dir
|
|
|
|
cd ${build_top}
|