Add expat and gdb support.

This commit is contained in:
Chris Johns 2012-10-31 13:35:28 +11:00
parent f107171e4f
commit 4861d2e6a6
4 changed files with 166 additions and 0 deletions

59
config/expat-2-1.cfg Normal file
View File

@ -0,0 +1,59 @@
#
# Expat 2.xx Version 1.
#
# This configuration file configure's, make's and install's expat.
#
%ifn %{defined release}
%error No 'release' defined
%endif
Summary: Expat XML Parser v%{expat_version} for target %{_target} on host %{_host}
Version: %{expat_version}
Release: %{release}
URL: http://expat.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: http://downloads.sourceforge.net/project/expat/expat/%{expat_version}/expat-%{expat_version}.tar.gz
#
# Prepare the source code.
#
%prep
%setup -q -c -T -n %{name}-%{version}
cd expat-%{expat_version}
%{?patch0:%patch0 -p1}
cd ..
%build
export PATH="%{_bindir}:${PATH}"
cd expat-%{expat_version}
%if "%{_build}" != "%{_host}"
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
%endif
CFLAGS="$TB_OPT_FLAGS" \
./configure \
--build=%{_build} --host=%{_host} \
--verbose --disable-nls \
--without-included-gettext \
--prefix=%{_prefix} --bindir=%{_bindir} \
--exec-prefix=%{_exec_prefix} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
%{__make} %{?_smp_mflags} all
cd ..
%install
export PATH="%{_bindir}:${PATH}"
rm -rf $TB_BUILD_ROOT
cd expat-%{expat_version}
%{__make} DESTDIR=$TB_BUILD_ROOT install
cd ..

21
config/expat-2.1.0-1.cfg Normal file
View File

@ -0,0 +1,21 @@
#
# Expat 2.1.0
#
%ifn %{defined release}
%error No 'release' defined
%endif
%include %{_configdir}/base.cfg
%define expat_version 2.1.0
Name: expat-%{expat_version}-%{_host}-%{release}
%description
Expat for host %{_host}.
#
# The Expat build instructions. We use 2.xx Release 1.
#
%include %{_configdir}/expat-2-1.cfg

68
config/gdb-7-1.cfg Normal file
View File

@ -0,0 +1,68 @@
#
# GDB 7.xx Version 1.
#
# This configuration file configure's, make's and install's gdb.
#
%include %{_configdir}/checks.cfg
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
#
Source0: http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
#
# Prepare the source code.
#
%prep
%setup -q -c -T -n %{name}-%{version}
cd gdb-%{gdb_version}
%{?patch0:%patch0 -p1}
cd ..
%build
export PATH="%{_bindir}:${PATH}"
mkdir -p build
cd build
%if "%{_build}" != "%{_host}"
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
%endif
CFLAGS="$TB_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%{_build} --host=%{_host} \
--target=%{_target} \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--with-expat \
--with-python \
--prefix=%{_prefix} --bindir=%{_bindir} \
--exec-prefix=%{_exec_prefix} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
%{__make} %{?_smp_mflags} all
cd ..
%install
export PATH="%{_bindir}:${PATH}"
rm -rf $TB_BUILD_ROOT
cd build
%{__make} DESTDIR=$TB_BUILD_ROOT install
# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
rm -rf $TB_BUILD_ROOT%{_infodir}/configure.info*
rm -f $TB_BUILD_ROOT%{_infodir}/dir
touch $TB_BUILD_ROOT%{_infodir}/dir
cd ..

18
config/gdb-7.5-1.cfg Normal file
View File

@ -0,0 +1,18 @@
#
# GDB 7.5.
#
%include %{_configdir}/checks.cfg
%include %{_configdir}/base.cfg
%define gdb_version 7.5
Name: %{_target}-gdb-%{gdb_version}-%{release}
%description
Cross gdb for target %{_target}.
#
# The gdb build instructions. We use 7.xx Release 1.
#
%include %{_configdir}/gdb-7-1.cfg