sb: Implement %source and %patch to manage source and patches.

Remove the numbered source and patches and automatically manage
sources and patches. This removes the overhead in maintaining large
collections of patches.
This commit is contained in:
Chris Johns 2014-05-13 23:26:09 +10:00
parent e074e75ef3
commit 9a15c40e1b
71 changed files with 483 additions and 734 deletions

View File

@ -20,7 +20,7 @@
#
# GDB simulator fix for the sed command.
#
%define rtems_gdb_patch2 %{rtems_gdb_patches}/bfin/gdb-7.3.1-bfin-sim-fix-sed-20130319.diff
%patch add gdb %{rtems_gdb_patches}/bfin/gdb-7.3.1-bfin-sim-fix-sed-20130319.diff
#
# Tools configuration.

View File

@ -20,7 +20,7 @@
#
# Fix the simulator UART interface.
#
%define rtems_gdb_patch3 %{rtems_gdb_patches}/lm32/gdb-sim-lm32uart.diff
%patch add gdb %{rtems_gdb_patches}/lm32/gdb-sim-lm32uart.diff
#
# Tools configuration.

View File

@ -20,12 +20,12 @@
#
# GCC 4.7.2 Microblaze Patch
#
%define rtems_gcc_patch2 %{rtems_gcc_patches}/microblaze/gcc-4.7.2-microblaze-ldscript-2.diff
%patch add gcc %{rtems_gcc_patches}/microblaze/gcc-4.7.2-microblaze-ldscript-2.diff
#
# GCC 4.8.2 Microblaze Patch for libgcc.
#
%define rtems_gcc_patch3 %{rtems_gcc_patches}/microblaze/rtems-gcc-microblaze-libgcc-20131017.diff
%patch add gcc %{rtems_gcc_patches}/microblaze/rtems-gcc-microblaze-libgcc-20131017.diff
#
# Tools configuration.

View File

@ -20,7 +20,7 @@
#
# GDB patche
#
%define rtems_gdb_patch1 %{rtems_gdb_patches}/sparc/gdb-7.6.2-sis-output-nouartrx.diff
%patch add gdb %{rtems_gdb_patches}/sparc/gdb-7.6.2-sis-output-nouartrx.diff
#
# Tools configuration.

View File

@ -20,7 +20,7 @@
#
# GCC 4.8 V850 Patch
#
%define rtems_gcc_patch3 %{rtems_gcc_patches}/v850/gcc-4.8.2-rtems4.11-20140349.diff
%patch add gcc %{rtems_gcc_patches}/v850/gcc-4.8.2-rtems4.11-20140349.diff
#
# Tools configuration.

View File

@ -1,27 +0,0 @@
#
# Manage RTEMS Binutils specific patches in the build sets
#
%if %{defined rtems_binutils_patch1}
Patch1: %{rtems_binutils_patch1}
%endif
%if %{defined rtems_binutils_patch2}
Patch2: %{rtems_binutils_patch2}
%endif
%if %{defined rtems_binutils_patch3}
Patch3: %{rtems_binutils_patch3}
%endif
%if %{defined rtems_binutils_patch4}
Patch4: %{rtems_binutils_patch4}
%endif
%if %{defined rtems_binutils_patch11}
Patch11: %{rtems_binutils_patch11}
%endif
%if %{defined rtems_binutils_patch12}
Patch12: %{rtems_binutils_patch12}
%endif
%if %{defined rtems_binutils_patch13}
Patch13: %{rtems_binutils_patch13}
%endif
%if %{defined rtems_binutils_patch14}
Patch14: %{rtems_binutils_patch14}
%endif

View File

@ -1,51 +0,0 @@
#
# Manage RTEMS GCC/Newlib specific patches in the build sets
#
%if %{defined rtems_gcc_patch1}
Patch1: %{rtems_gcc_patch1}
%if %{defined rtems_gcc_patch1_opts}
%define patch1_opts %{rtems_gcc_patch1_opts}
%endif
%endif
%if %{defined rtems_gcc_patch2}
Patch2: %{rtems_gcc_patch2}
%if %{defined rtems_gcc_patch2_opts}
%define patch2_opts %{rtems_gcc_patch2_opts}
%endif
%endif
%if %{defined rtems_gcc_patch3}
Patch3: %{rtems_gcc_patch3}
%if %{defined rtems_gcc_patch3_opts}
%define patch3_opts %{rtems_gcc_patch3_opts}
%endif
%endif
%if %{defined rtems_gcc_patch4}
Patch4: %{rtems_gcc_patch4}
%if %{defined rtems_gcc_patch4_opts}
%define patch4_opts %{rtems_gcc_patch4_opts}
%endif
%endif
%if %{defined rtems_gcc_patch11}
Patch11: %{rtems_gcc_patch11}
%if %{defined rtems_gcc_patch11_opts}
%define patch11_opts %{rtems_gcc_patch11_opts}
%endif
%endif
%if %{defined rtems_gcc_patch12}
Patch12: %{rtems_gcc_patch12}
%if %{defined rtems_gcc_patch12_opts}
%define patch12_opts %{rtems_gcc_patch12_opts}
%endif
%endif
%if %{defined rtems_gcc_patch13}
Patch13: %{rtems_gcc_patch13}
%if %{defined rtems_gcc_patch13_opts}
%define patch13_opts %{rtems_gcc_patch13_opts}
%endif
%endif
%if %{defined rtems_gcc_patch14}
Patch14: %{rtems_gcc_patch14}
%if %{defined rtems_gcc_patch14_opts}
%define patch14_opts %{rtems_gcc_patch14_opts}
%endif
%endif

View File

@ -1,27 +0,0 @@
#
# Manage RTEMS GDB specific patches in the build sets
#
%if %{defined rtems_gdb_patch1}
Patch1: %{rtems_gdb_patch1}
%endif
%if %{defined rtems_gdb_patch2}
Patch2: %{rtems_gdb_patch2}
%endif
%if %{defined rtems_gdb_patch3}
Patch3: %{rtems_gdb_patch3}
%endif
%if %{defined rtems_gdb_patch4}
Patch4: %{rtems_gdb_patch4}
%endif
%if %{defined rtems_gdb_patch11}
Patch11: %{rtems_gdb_patch11}
%endif
%if %{defined rtems_gdb_patch12}
Patch12: %{rtems_gdb_patch12}
%endif
%if %{defined rtems_gdb_patch13}
Patch13: %{rtems_gdb_patch13}
%endif
%if %{defined rtems_gdb_patch14}
Patch14: %{rtems_gdb_patch14}
%endif

View File

@ -7,16 +7,11 @@
%define binutils_version 2.20.1
Patch0: %{rtems_binutils_patches}/binutils-2.20.1-rtems4.10-20100826.diff
%patch add binutils %{rtems_binutils_patches}/binutils-2.20.1-rtems4.10-20100826.diff
%ifos win32 mingw ming32 cygwin
Patch1: %{rtems_binutils_patches}/cygwin/binutils-2.20.1-cygwin-w64-20130324.diff
%patch add binutils %{rtems_binutils_patches}/cygwin/binutils-2.20.1-cygwin-w64-20130324.diff
%endif
#
# RTEMS Build Set patches.
#
%include rtems-binutils-patches.cfg
#
# The binutils build instructions. We use 2.xx Release 1.
#

View File

@ -7,8 +7,7 @@
%define binutils_version 2.22
Patch0: %{rtems_binutils_patches}/binutils-2.22-rtems4.11-20120427.diff
%include rtems-binutils-patches.cfg
%patch add binutils %{rtems_binutils_patches}/binutils-2.22-rtems4.11-20120427.diff
#
# The binutils build instructions. We use 2.xx Release 1.

View File

@ -14,11 +14,6 @@
#
%define with_deterministic_archives 1
#
# Include the RTEMS specific patches
#
%include rtems-binutils-patches.cfg
#
# The binutils build instructions. We use 2.xx Release 1.
#

View File

@ -14,11 +14,6 @@
#
%define with_deterministic_archives 1
#
# Include the RTEMS specific patches
#
%include rtems-binutils-patches.cfg
#
# The binutils build instructions. We use 2.xx Release 1.
#

View File

@ -14,11 +14,6 @@
#
%define with_deterministic_archives 1
#
# Include the RTEMS specific patches
#
%include rtems-binutils-patches.cfg
#
# The binutils build instructions. We use 2.xx Release 1.
#

View File

@ -18,15 +18,10 @@
#
# The RTEMS 4.9 patches
#
Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
Patch0: %{rtems_gcc_patches}/gcc-core-4.3.2-rtems4.9-20090825.diff
Source1: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.bz2
Patch10: %{rtems_newlib_patches}/newlib-1.16.0-rtems4.9-20090324.diff
#
# Generic RTEMS patch handling.
#
%include rtems-gcc-patches.cfg
%source set gcc ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
%patch add gcc %{rtems_gcc_patches}/gcc-core-4.3.2-rtems4.9-20090825.diff
%source add gcc ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.bz2
%patch add gcc %{rtems_newlib_patches}/newlib-1.16.0-rtems4.9-20090324.diff
#
# The gcc/newlib build instructions. We use 4.7 Release 1.

View File

@ -26,12 +26,11 @@
#
# The RTEMS 4.10 patches
#
Patch0: %{rtems_gcc_patches}/gcc-core-4.4.7-rtems4.10-20120314.diff
%patch add gcc %{rtems_gcc_patches}/gcc-core-4.4.7-rtems4.10-20120314.diff
%if %{enable_cxx}
Patch1: %{rtems_gcc_patches}/gcc-g++-4.4.7-rtems4.10-20120314.diff
%patch add gcc %{rtems_gcc_patches}/gcc-g++-4.4.7-rtems4.10-20120314.diff
%endif
Patch10: %{rtems_newlib_patches}/newlib-1.18.0-rtems4.10-20110518.diff
%include rtems-gcc-patches.cfg
%patch add newlib %{rtems_newlib_patches}/newlib-1.18.0-rtems4.10-20110518.diff
#
# The gcc/newlib build instructions. We use 4.4 Release 1.

View File

@ -18,8 +18,7 @@
#
# Libiberty strsignal fix
#
Patch0: %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
%include rtems-gcc-patches.cfg
%patch add gcc %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
#
# The gcc/newlib build instructions. We use 4.5 Release 1.

View File

@ -18,8 +18,7 @@
#
# Libiberty strsignal fix
#
Patch0: %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
%include rtems-gcc-patches.cfg
%patch add gcc %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
#
# The gcc/newlib build instructions. We use 4.5 Release 1.

View File

@ -34,8 +34,8 @@
#
# The RTEMS 4.11 patches
#
Patch0: gcc-core-4.6.3-rtems4.11-20120303.diff
Patch10: newlib-1.20.0-rtems4.11-20121011.diff
%patch add gcc gcc-core-4.6.3-rtems4.11-20120303.diff
%patch add newlib newlib-1.20.0-rtems4.11-20121011.diff
#
# The gcc/newlib build instructions. We use 4.4 Release 1.

View File

@ -43,9 +43,8 @@
#
# The RTEMS 4.11 patches
#
Patch0: %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
Patch10: %{rtems_newlib_patches}/newlib-1.20.0-rtems4.11-20121011.diff
%include rtems-gcc-patches.cfg
%patch add gcc %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
%patch add newlib %{rtems_newlib_patches}/newlib-1.20.0-rtems4.11-20121011.diff
#
# The gcc/newlib build instructions. We use 4.7 Release 1.

View File

@ -19,8 +19,7 @@
#
# The RTEMS 4.11 patches
#
Patch0: %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
%include rtems-gcc-patches.cfg
%patch add gcc %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
# Incompatible with Texinfo 5
%if %{__makeinfo_ver} >= 5.0

View File

@ -19,8 +19,7 @@
#
# The RTEMS 4.11 patches
#
Patch0: %{rtems_gcc_patches}/gcc-4.7.3-rtems4.11-20130414.diff
%include rtems-gcc-patches.cfg
%patch add gcc %{rtems_gcc_patches}/gcc-4.7.3-rtems4.11-20130414.diff
# Incompatible with Texinfo 5
%if %{__makeinfo_ver} >= 5.0

View File

@ -18,7 +18,7 @@
#
# The RTEMS 4.11 patches
#
Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/%{gcc_version}/gcc-%{gcc_version}.tar.bz2
%source set gcc ftp://gcc.gnu.org/pub/gcc/snapshots/%{gcc_version}/gcc-%{gcc_version}.tar.bz2
#
# The gcc/newlib build instructions. We use 4.7 Release 1.

View File

@ -24,20 +24,14 @@
#
# Newlib is from CVS.
#
Source10: cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
%source set newlib cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
#
# Joel's stack_t patch.
#
%define rtems_gcc_patch11 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
%define rtems_gcc_patch11_opts -p0
%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
#
#
# Manage RTEMS patches
#
%include rtems-gcc-patches.cfg
# The gcc/newlib build instructions. We use 4.8 Release 1.
#
%include %{_configdir}/gcc-4.8-1.cfg

View File

@ -27,30 +27,24 @@
#
# Newlib is from CVS.
#
Source10: cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
%source set newlib cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
#
# Sebastian's atexit patch.
#
%define rtems_gcc_patch1 %{rtems_gcc_patches}/gcc-4.8.1-rtems4.11-20130709.diff
%patch add gcc %{rtems_gcc_patches}/gcc-4.8.1-rtems4.11-20130709.diff
#
# Chris's patch to use the POSIX thread model for C++.
#
%define rtems_gcc_patch2 %{rtems_gcc_patches}/gcc-rtems-thread-model-posix-1.diff
%patch add gcc %{rtems_gcc_patches}/gcc-rtems-thread-model-posix-1.diff
#
# Joel's stack_t patch.
#
%define rtems_gcc_patch11 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
%define rtems_gcc_patch11_opts -p0
%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
#
#
# Manage RTEMS patches
#
%include rtems-gcc-patches.cfg
# The gcc/newlib build instructions. We use 4.8 Release 1.
#
%include %{_configdir}/gcc-4.8-1.cfg

View File

@ -1,5 +1,5 @@
#
# GCC 4.8.2., Newlib CVS
# GCC 4.8.2., Newlib 2.1.0
#
%include %{_configdir}/checks.cfg
@ -22,14 +22,7 @@
#
# Joel's stack_t patch.
#
%define rtems_gcc_patch11 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
%define rtems_gcc_patch11_opts -p0
#
#
# Manage RTEMS patches
#
%include rtems-gcc-patches.cfg
%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
# The gcc/newlib build instructions. We use 4.8 Release 1.
#

View File

@ -22,25 +22,19 @@
#
# Newlib is from CVS.
#
Source10: cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
%source set newlib cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
#
# Chris's patch to use the POSIX thread model for C++.
#
%define rtems_gcc_patch2 %{rtems_gcc_patches}/gcc-rtems-thread-model-posix-1.diff
%patch add gcc %{rtems_gcc_patches}/gcc-rtems-thread-model-posix-1.diff
#
# Joel's stack_t patch.
#
%define rtems_gcc_patch11 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
%define rtems_gcc_patch11_opts -p0
%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
#
#
# Manage RTEMS patches
#
%include rtems-gcc-patches.cfg
# The gcc/newlib build instructions. We use 4.8 Release 1.
#
%include %{_configdir}/gcc-4.8-1.cfg

View File

@ -22,14 +22,7 @@
#
# Joel's stack_t patch.
#
%define rtems_gcc_patch11 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
%define rtems_gcc_patch11_opts -p0
#
#
# Manage RTEMS patches
#
%include rtems-gcc-patches.cfg
%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
#
# The gcc/newlib build instructions. We use 4.9 Release 1.

View File

@ -10,10 +10,8 @@
#
# RTEMS Build Set patches.
#
Source0: http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.bz2
Patch0: %{rtems_gdb_patches}/gdb-6.8-rtems4.9-20091111.diff
%include rtems-gdb-patches.cfg
%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.bz2
%patch add gdb %{rtems_gdb_patches}/gdb-6.8-rtems4.9-20091111.diff
#
# The gdb build instructions. We use 6.xx Release 1.

View File

@ -7,12 +7,7 @@
%define gdb_version 7.3.1
Patch0: %{rtems_gdb_patches}/gdb-7.3.1-rtems4.10-20120918.diff
#
# RTEMS Build Set patches.
#
%include rtems-gdb-patches.cfg
%patch add gdb %{rtems_gdb_patches}/gdb-7.3.1-rtems4.10-20120918.diff
#
# The gdb build instructions. We use 7.xx Release 1.

View File

@ -7,8 +7,7 @@
%define gdb_version 7.5
Patch0: %{rtems_gdb_patches}/gdb-7.5-rtems4.11-20121003.diff
%include rtems-gdb-patches.cfg
%patch add gdb %{rtems_gdb_patches}/gdb-7.5-rtems4.11-20121003.diff
#
# The gdb build instructions. We use 7.xx Release 1.

View File

@ -7,11 +7,6 @@
%define gdb_version 7.5.1
#
# RTEMS Build Set patches.
#
%include rtems-gdb-patches.cfg
#
# The gdb build instructions. We use 7.xx Release 1.
#

View File

@ -7,11 +7,6 @@
%define gdb_version 7.6
#
# RTEMS Build Set patches.
#
%include rtems-gdb-patches.cfg
#
# The gdb build instructions. We use 7.xx Release 1.
#

View File

@ -7,11 +7,6 @@
%define gdb_version 7.6.1
#
# RTEMS Build Set patches.
#
%include rtems-gdb-patches.cfg
#
# The gdb build instructions. We use 7.xx Release 1.
#

View File

@ -7,14 +7,8 @@
%define gdb_version 7.6.2
#
# RTEMS Build Set patches.
#
%include rtems-gdb-patches.cfg
%if %{_build_os} == freebsd
%define patch5 %{rtems_gdb_patches}/patch-gdb-python-python-config.py
%define patch5_opts -p0
%patch add gdb -p0 %{rtems_gdb_patches}/patch-gdb-python-python-config.py
%endif
#

View File

@ -7,20 +7,14 @@
%define gdb_version 7.7
#
# RTEMS Build Set patches.
#
%include rtems-gdb-patches.cfg
#
# Clean up the sim-arange inline code so it builds.
#
%define patch1 %{rtems_gdb_patches}/gdb-sim-arange-inline.diff
%define patch2 %{rtems_gdb_patches}/gdb-sim-cgen-inline.diff
%patch add gdb %{rtems_gdb_patches}/gdb-sim-arange-inline.diff
%patch add gdb %{rtems_gdb_patches}/gdb-sim-cgen-inline.diff
%if %{_build_os} == freebsd
%define patch5 %{rtems_gdb_patches}/patch-gdb-python-python-config.py
%define patch5_opts -p0
%patch add gdb -p0 %{rtems_gdb_patches}/patch-gdb-python-python-config.py
%endif
#

View File

@ -16,9 +16,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
%ifn %{defined Source0}
Source0: http://ftp.rtems.org/ftp/pub/rtems/%{rtems_kernel_version}/rtems-%{rtems_kernel_version}.tar.bz2
%endif
%source set rtems http://ftp.rtems.org/ftp/pub/rtems/%{rtems_kernel_version}/rtems-%{rtems_kernel_version}.tar.bz2
#
# If C++ defined for the tool set use it to control RTEMS's setting..
@ -60,19 +58,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
# Prepare the source code.
#
%prep
source_dir_0="rtems-%{rtems_kernel_version}"
%setup -q -c -n %{name}-%{version}
cd ${source_dir_0}
%{?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}}
source_dir_rtems="rtems-%{rtems_kernel_version}"
%source setup rtems -q -c -n %{name}-%{version}
cd ${source_dir_rtems}
%patch setup rtems -p1
%if %{rtems_bootstrap}
%if %{defined _internal_autotools_path}
export PATH="%{_internal_autotools_path}/bin:${PATH}"
@ -93,7 +82,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
mkdir -p ${build_dir}
cd ${build_dir}
../${source_dir_0}/configure \
../${source_dir_rtems}/configure \
--build=%{_build} --host=%{_host} \
--target=%{_target} \
%{?rtems_posix:--enable-posix}%{!?rtems_posix:--disable-posix} \

View File

@ -38,7 +38,7 @@
# Pull the latest changes from git each build. Override if this is not what you
# want.
#
Source0: git://git.rtems.org/rtems.git?reset=hard?pull
%source set rtems git://git.rtems.org/rtems.git?reset=hard?pull
#
# The code in git needs to be bootstrapped. Do each build because we have

View File

@ -15,8 +15,8 @@
#
# Source
#
Source0: http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-binutils-2.20.tar.bz2
Patch0: %{rtems_binutils_patches}/nios2/nios2-binutils-2.20-rtems-20110703.diff
%source set binutils http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-binutils-2.20.tar.bz2
%patch add binutils %{rtems_binutils_patches}/nios2/nios2-binutils-2.20-rtems-20110703.diff
#
# The binutils build instructions. We use 2.xx Release 1.

View File

@ -20,8 +20,8 @@
#
# The RTEMS 4.11 patches
#
Patch0: %{rtems_gcc_patches}/nios2/nios2-gcc-4.1-rtems-20110818.diff
Patch10: %{rtems_newlib_patches}/nios2/nios2-newlib-1.19.0-rtems-20110720.diff
%patch add gcc %{rtems_gcc_patches}/nios2/nios2-gcc-4.1-rtems-20110818.diff
%patch add newlib %{rtems_newlib_patches}/nios2/nios2-newlib-1.19.0-rtems-20110720.diff
Name: %{_target}-gcc-%{gcc_version}-newlib-%{newlib_version}-%{release}
Summary: GCC v%{gcc_version} and Newlib v%{newlib_version} for target %{_target} on host %{_host}
@ -41,12 +41,12 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# GCC core and G++
#
Source0: http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-gcc-4.1.tar.bz2
%source set gcc http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-gcc-4.1.tar.bz2
#
# Newlib
#
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
# The GCC library directory
@ -57,48 +57,35 @@ Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
# Prepare the source code.
#
%prep
# save the build top directory and cd back to it rather than
# using 'cd ..' because some shells change $PWD to a symlink's
# target location and 'cd ..' fails.
build_top=$(pwd)
# gcc
source_dir_0="gcc-%{gcc_version}"
%setup -q -c -n %{name}-%{version}
cd ${source_dir_0}
%{?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 ..
source_dir_gcc="gcc-%{gcc_version}"
%source setup gcc -q -c -n %{name}-%{version}
cd ${source_dir_gcc}
%patch setup gcc -p1
cd ${build_top}
# newlib
source_dir_10="newlib-%{newlib_version}"
%setup -q -D -T -n %{name}-%{version} -a10
cd ${source_dir_10}
%{?patch10:%patch10 %{?patch10_opts:%{patch10_opts}}%{!?patch10_opts:-p1}}
%{?patch11:%patch11 %{?patch11_opts:%{patch11_opts}}%{!?patch11_opts:-p1}}
%{?patch12:%patch12 %{?patch12_opts:%{patch12_opts}}%{!?patch12_opts:-p1}}
%{?patch13:%patch13 %{?patch13_opts:%{patch13_opts}}%{!?patch13_opts:-p1}}
%{?patch14:%patch14 %{?patch14_opts:%{patch14_opts}}%{!?patch14_opts:-p1}}
%{?patch15:%patch15 %{?patch15_opts:%{patch15_opts}}%{!?patch15_opts:-p1}}
%{?patch16:%patch16 %{?patch16_opts:%{patch16_opts}}%{!?patch16_opts:-p1}}
%{?patch17:%patch17 %{?patch17_opts:%{patch17_opts}}%{!?patch17_opts:-p1}}
%{?patch18:%patch18 %{?patch18_opts:%{patch18_opts}}%{!?patch18_opts:-p1}}
%{?patch19:%patch19 %{?patch19_opts:%{patch19_opts}}%{!?patch19_opts:-p1}}
cd ..
source_dir_newlib="newlib-%{newlib_version}"
%source setup newlib -q -D -n %{name}-%{version}
cd ${source_dir_newlib}
%patch setup newlib -p1
cd ${build_top}
# Link newlib into the gcc source tree
%{__rmfile} ${source_dir_0}/newlib
%{__ln_s} $PWD/${source_dir_10}/newlib ${source_dir_0}/newlib
%{__rmfile} ${source_dir_gcc}/newlib
%{__ln_s} $PWD/${source_dir_newlib}/newlib ${source_dir_gcc}/newlib
echo "%{gcc_version_message}" > gcc-%{gcc_version}/gcc/DEV-PHASE
# Fix timestamps
cd ${source_dir_0}
cd ${source_dir_gcc}
contrib/gcc_update --touch
cd ..
cd ${build_top}
%build
%{build_directory}
@ -113,7 +100,7 @@ Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
%{host_build_flags}
../${source_dir_0}/configure \
../${source_dir_gcc}/configure \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--exec_prefix=%{_exec_prefix} \
@ -142,7 +129,7 @@ Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
# Bug in gcc-3.2.1:
# Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
mkdir -p gcc/include
cp ../${source_dir_0}/gcc/gsyslimits.h gcc/include/syslimits.h
cp ../${source_dir_gcc}/gcc/gsyslimits.h gcc/include/syslimits.h
fi
# jobs > 1 is broken with this version of gcc
@ -189,4 +176,4 @@ Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
%{__rmfile} $SB_BUILD_ROOT%{_mandir}/man3/*ffi*
# Clean the symlinks away incase the source is a repo
%{__rmfile} ${source_dir_0}/newlib
%{__rmfile} ${source_dir_gcc}/newlib

View File

@ -11,7 +11,7 @@
%define without_python
Source0: http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-gdb-7.0.tar.bz2
%source set gdb http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-gdb-7.0.tar.bz2
#
# The gdb build instructions. We use 7.xx Release 1.

View File

@ -21,8 +21,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
VersionControl0: git clone git://git.sv.gnu.org/autoconf
%source set autoconf ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
#
# Prepare the source code.
@ -30,8 +29,8 @@ VersionControl0: git clone git://git.sv.gnu.org/autoconf
%prep
build_top=$(pwd)
%setup -q -n autoconf-%{autoconf_version}
%{?patch0:%patch0 -p1}
%source setup autoconf -q -n autoconf-%{autoconf_version}
%patch setup autoconf -p1
cd ${build_top}

View File

@ -21,8 +21,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz
VersionControl0: git clone git://git.savannah.gnu.org/automake.git
%source set automake ftp://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz
#
# Prepare the source code.
@ -30,8 +29,8 @@ VersionControl0: git clone git://git.savannah.gnu.org/automake.git
%prep
build_top=$(pwd)
%setup -q -n automake-%{automake_version}
%{?patch0:%patch0 -p1}
%source setup automake -q -n automake-%{automake_version}
%patch setup automake -p1
cd ${build_top}

View File

@ -29,10 +29,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
%ifn %{defined Source0}
Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2
VersionControl0: cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src co binutils
%endif
%source set binutils ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2
#
# Prepare the source code.
@ -40,18 +37,9 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%prep
build_top=$(pwd)
source_dir_0="binutils-%{binutils_version}"
%setup -q -n binutils-%{binutils_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}}
source_dir_binutils="binutils-%{binutils_version}"
%source setup binutils -q -n binutils-%{binutils_version}
%patch setup binutils -p1
cd ${build_top}
@ -65,7 +53,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%{host_build_flags}
../${source_dir_0}/configure \
../${source_dir_binutils}/configure \
--build=%{_build} --host=%{_host} \
--target=%{_target} \
--verbose --disable-nls \

View File

@ -18,7 +18,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: http://www.jdl.com/software/dtc-v%{dtc_version}.tgz
%source set dtc http://www.jdl.com/software/dtc-v%{dtc_version}.tgz
#
# Prepare the source code.
@ -26,15 +26,8 @@ Source0: http://www.jdl.com/software/dtc-v%{dtc_version}.tgz
%prep
build_top=$(pwd)
%setup -q -n dtc-v%{dtc_version}
%{?patch0:%patch0 -p1}
%{?patch1:%patch1 -p1}
%{?patch2:%patch2 -p1}
%{?patch3:%patch3 -p1}
%{?patch4:%patch4 -p1}
%{?patch5:%patch5 -p1}
%{?patch6:%patch6 -p1}
%{?patch7:%patch7 -p1}
%source setup dtc -q -n dtc-v%{dtc_version}
%patch setup dtc -p1
cd ${build_top}

View File

@ -18,7 +18,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: http://downloads.sourceforge.net/project/expat/expat/%{expat_version}/expat-%{expat_version}.tar.gz
%source set expat http://downloads.sourceforge.net/project/expat/expat/%{expat_version}/expat-%{expat_version}.tar.gz
#
# Prepare the source code.
@ -26,8 +26,8 @@ Source0: http://downloads.sourceforge.net/project/expat/expat/%{expat_version}/e
%prep
build_top=$(pwd)
%setup -q -n expat-%{expat_version}
%{?patch0:%patch0 -p1}
%source setup expat -q -n expat-%{expat_version}
%patch setup expat -p1
cd ${build_top}

View File

@ -11,23 +11,19 @@
#
# GCC core and G++
#
%ifn %{defined Source0}
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
VersionContro0: git clone git://gcc.gnu.org/git/gcc.git
%endif
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
#
# Newlib
#
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
# Packages GCC requires
#
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
#
# GCC Common build script.

View File

@ -11,25 +11,23 @@
#
# GCC core and G++
#
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
VersionContro0: git clone git://gcc.gnu.org/git/gcc.git
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
%if %{enable_cxx}
Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz
%source add gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz
%endif
#
# Newlib
#
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
# Packages GCC requires
#
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
#
# GCC Common build script.

View File

@ -11,29 +11,19 @@
#
# GCC core and G++
#
%ifn %{defined Source0}
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
%endif
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
#
# Newlib
#
%ifn %{defined Source10}
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
%endif
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
# Packages GCC requires
#
%ifn %{defined Source20}
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
%endif
%ifn %{defined Source21}
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
%endif
%ifn %{defined Source22}
Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
%endif
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
#
# GCC Common build script.

View File

@ -11,25 +11,23 @@
#
# GCC core and G++
#
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
VersionContro0: git clone git://gcc.gnu.org/git/gcc.git
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
%if %{enable_cxx}
Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz
%source add gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz
%endif
#
# Newlib
#
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
# Packages GCC requires
#
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
#
# GCC Common build script.

View File

@ -20,23 +20,19 @@
#
# GCC core and G++
#
%ifn %{defined Source0}
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
VersionContro0: git clone git://gcc.gnu.org/git/gcc.git
%endif
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
#
# Newlib
#
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
# Packages GCC requires
#
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
#
# GCC Common build script.

View File

@ -11,29 +11,19 @@
#
# GCC core and G++
#
%ifn %{defined Source0}
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
%endif
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
#
# Newlib
#
%ifn %{defined Source10}
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
%endif
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
# Packages GCC requires
#
%ifn %{defined Source20}
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
%endif
%ifn %{defined Source21}
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
%endif
%ifn %{defined Source22}
Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
%endif
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
#
# GCC Common build script.

View File

@ -11,29 +11,19 @@
#
# GCC core and G++
#
%ifn %{defined Source0}
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
%endif
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
#
# Newlib
#
%ifn %{defined Source10}
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
%endif
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
# Packages GCC requires
#
%ifn %{defined Source20}
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
%endif
%ifn %{defined Source21}
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
%endif
%ifn %{defined Source22}
Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
%endif
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
#
# GCC Common build script.

View File

@ -11,15 +11,6 @@
%error No GCC Version message defined.
%endif
#
# Select Snapshot Macro Maps if they have been added.
#
%select gcc-snapshot
%select newlib-snapshot
%select mpfr-snapshot
%select mpc-snapshot
%select gmp-snapshot
#
# The package description.
#
@ -50,71 +41,52 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
build_top=$(pwd)
# gcc and optional the g++ core if separate packages
source_dir_0="gcc-%{gcc_version}"
%setup -q -n gcc-%{gcc_version}
%{?source1:%setup -q -D -T -n gcc-%{gcc_version} -b1}
%{?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}}
source_dir_gcc="gcc-%{gcc_version}"
%source setup gcc -q -n gcc-%{gcc_version}
%patch setup gcc -p1
cd ${build_top}
# newlib
source_dir_10="newlib-%{newlib_version}"
%setup -q -D -T -n newlib-%{newlib_version} -b10
%{?patch10:%patch10 %{?patch10_opts:%{patch10_opts}}%{!?patch10_opts:-p1}}
%{?patch11:%patch11 %{?patch11_opts:%{patch11_opts}}%{!?patch11_opts:-p1}}
%{?patch12:%patch12 %{?patch12_opts:%{patch12_opts}}%{!?patch12_opts:-p1}}
%{?patch13:%patch13 %{?patch13_opts:%{patch13_opts}}%{!?patch13_opts:-p1}}
%{?patch14:%patch14 %{?patch14_opts:%{patch14_opts}}%{!?patch14_opts:-p1}}
%{?patch15:%patch15 %{?patch15_opts:%{patch15_opts}}%{!?patch15_opts:-p1}}
%{?patch16:%patch16 %{?patch16_opts:%{patch16_opts}}%{!?patch16_opts:-p1}}
%{?patch17:%patch17 %{?patch17_opts:%{patch17_opts}}%{!?patch17_opts:-p1}}
%{?patch18:%patch18 %{?patch18_opts:%{patch18_opts}}%{!?patch18_opts:-p1}}
%{?patch19:%patch19 %{?patch19_opts:%{patch19_opts}}%{!?patch19_opts:-p1}}
source_dir_newlib="newlib-%{newlib_version}"
%source setup newlib -q -D -n newlib-%{newlib_version}
%patch setup newlib -p1
cd ${build_top}
# Link newlib into the gcc source tree
%{__rmfile} ${source_dir_0}/newlib
%{__ln_s} $PWD/${source_dir_10}/newlib ${source_dir_0}/newlib
%{__rmfile} ${source_dir_gcc}/newlib
%{__ln_s} $PWD/${source_dir_newlib}/newlib ${source_dir_gcc}/newlib
# MPFR
source_dir_20="mpfr-%{mpfr_version}"
%setup -q -D -T -n mpfr-%{mpfr_version} -b20
%{?patch20:%patch20 -p1}
source_dir_mpfr="mpfr-%{mpfr_version}"
%source setup mpfr -q -D -n mpfr-%{mpfr_version}
%patch setup mpfr -p1
cd ${build_top}
# Build MPFR one-tree style
%{__rmfile} ${source_dir_0}/mpfr
%{__ln_s} $PWD/${source_dir_20} ${source_dir_0}/mpfr
%{__rmfile} ${source_dir_gcc}/mpfr
%{__ln_s} $PWD/${source_dir_mpfr} ${source_dir_gcc}/mpfr
# MPC
source_dir_21="mpc-%{mpc_version}"
%setup -q -D -T -n mpc-%{mpc_version} -b21
%{?patch21:%patch21 -p1}
source_dir_mpc="mpc-%{mpc_version}"
%source setup mpc -q -D -n mpc-%{mpc_version}
%patch setup mpc -p1
cd ${build_top}
# Build MPC one-tree style
%{__rmfile} ${source_dir_0}/mpc
%{__ln_s} $PWD/${source_dir_21} ${source_dir_0}/mpc
%{__rmfile} ${source_dir_gcc}/mpc
%{__ln_s} $PWD/${source_dir_mpc} ${source_dir_gcc}/mpc
# GMP
source_dir_22="gmp-%{gmp_version}"
%setup -q -D -T -n gmp-%{gmp_version} -b22
%{?patch22:%patch22 -p1}
source_dir_gmp="gmp-%{gmp_version}"
%source setup gmp -q -D -n gmp-%{gmp_version}
%patch setup gmp -p1
cd ${build_top}
# Build GMP one-tree style
%{__rmfile} ${source_dir_0}/gmp
%{__ln_s} $PWD/${source_dir_22} ${source_dir_0}/gmp
%{__rmfile} ${source_dir_gcc}/gmp
%{__ln_s} $PWD/${source_dir_gmp} ${source_dir_gcc}/gmp
echo "%{gcc_version_message}" > ${source_dir_0}/gcc/DEV-PHASE
echo "%{gcc_version_message}" > ${source_dir_gcc}/gcc/DEV-PHASE
# Fix timestamps
cd ${source_dir_0}
cd ${source_dir_gcc}
contrib/gcc_update --touch
cd ${build_top}
@ -149,7 +121,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%{host_build_flags}
../${source_dir_0}/configure \
../${source_dir_gcc}/configure \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--exec_prefix=%{_exec_prefix} \
@ -182,7 +154,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
# Bug in gcc-3.2.1:
# Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
mkdir -p gcc/include
cp ../${source_dir_0}/gcc/gsyslimits.h gcc/include/syslimits.h
cp ../${source_dir_gcc}/gcc/gsyslimits.h gcc/include/syslimits.h
fi
%{__make} %{?_smp_mflags} all
@ -212,10 +184,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%{__rmfile} $SB_BUILD_ROOT%{_mandir}/man3/*ffi*
# Clean the symlinks away incase the source is a repo
%{__rmfile} ${source_dir_0}/newlib
%{__rmfile} ${source_dir_0}/mpfr
%{__rmfile} ${source_dir_0}/mpc
%{__rmfile} ${source_dir_0}/gmp
%{__rmfile} ${source_dir_gcc}/newlib
%{__rmfile} ${source_dir_gcc}/mpfr
%{__rmfile} ${source_dir_gcc}/mpc
%{__rmfile} ${source_dir_gcc}/gmp
%testing
# Add testing here.

View File

@ -16,27 +16,15 @@ 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
%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
#
# Prepare the source code.
#
%prep
%setup -q -c -n %{name}-%{version}
%source setup gdb -q -c -n %{name}-%{version}
cd 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}}
%patch setup gdb -p1
cd ..
%build

View File

@ -25,10 +25,7 @@ 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
%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
#
# Disable Python on Cxc builds for now.
@ -44,18 +41,9 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%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}}
source_dir_gdb="gdb-%{gdb_version}"
%source setup gdb -q -n gdb-%{gdb_version}
%patch setup gdb -p1
cd ${build_top}
@ -78,7 +66,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
LIBS_STATIC=${GDB_LIBS_STATIC} \
LIBS=${GDB_LIBS} \
../${source_dir_0}/configure \
../${source_dir_gdb}/configure \
--build=%{_build} --host=%{_host} \
--target=%{_target} \
--verbose --disable-nls \

View File

@ -19,7 +19,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.1.tar.gz
%source set gettext http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.1.tar.gz
#
# Fix the mess iconv is on FreeBSD 10.0.
@ -34,18 +34,9 @@ Source0: http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.1.tar.gz
%prep
build_top=$(pwd)
source_dir_0="gettext-%{gettext_version}"
%setup -q -n gettext-%{gettext_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}}
source_dir_gettext="gettext-%{gettext_version}"
%source setup gettext -q -n gettext-%{gettext_version}
%patch setup gettext -p1
cd ${build_top}
@ -59,7 +50,7 @@ Source0: http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.1.tar.gz
%{host_build_flags}
../${source_dir_0}/configure \
../${source_dir_gettext}/configure \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--exec_prefix=%{_exec_prefix} \

View File

@ -19,7 +19,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: http://ftp.gnome.org/pub/gnome/sources/glib/%{glib_version_major}/glib-%{glib_version}.tar.xz
%source set glib http://ftp.gnome.org/pub/gnome/sources/glib/%{glib_version_major}/glib-%{glib_version}.tar.xz
#
# Prepare the source code.
@ -27,18 +27,9 @@ Source0: http://ftp.gnome.org/pub/gnome/sources/glib/%{glib_version_major}/glib-
%prep
build_top=$(pwd)
source_dir_0="glib-%{glib_version}"
%setup -q -n glib-%{glib_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}}
source_dir_glib="glib-%{glib_version}"
%source setup glib -q -n glib-%{glib_version}
%patch setup glib -p1
cd ${build_top}
@ -57,7 +48,7 @@ Source0: http://ftp.gnome.org/pub/gnome/sources/glib/%{glib_version_major}/glib-
PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
%{_ld_library_path}=$SYSROOT/lib \
../${source_dir_0}/configure \
../${source_dir_glib}/configure \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--exec_prefix=%{_exec_prefix} \

View File

@ -19,7 +19,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: ftp://sourceware.org/pub/libffi/libffi-%{libffi_version}.tar.gz
%source set libffi ftp://sourceware.org/pub/libffi/libffi-%{libffi_version}.tar.gz
#
# Prepare the source code.
@ -27,18 +27,9 @@ Source0: ftp://sourceware.org/pub/libffi/libffi-%{libffi_version}.tar.gz
%prep
build_top=$(pwd)
source_dir_0="libffi-%{libffi_version}"
%setup -q -n libffi-%{libffi_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}}
source_dir_libffi="libffi-%{libffi_version}"
%source setup libffi -q -n libffi-%{libffi_version}
%patch setup libffi -p1
cd ${build_top}
@ -52,7 +43,7 @@ Source0: ftp://sourceware.org/pub/libffi/libffi-%{libffi_version}.tar.gz
%{host_build_flags}
../${source_dir_0}/configure \
../${source_dir_libffi}/configure \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--exec_prefix=%{_exec_prefix} \

View File

@ -20,7 +20,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{libiconv_version}.tar.gz
%source set libiconv http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{libiconv_version}.tar.gz
#
# Prepare the source code.
@ -28,18 +28,9 @@ Source0: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{libiconv_version}.tar.gz
%prep
build_top=$(pwd)
source_dir_0="libiconv-%{libiconv_version}"
%setup -q -n libiconv-%{libiconv_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}}
source_dir_libiconv="libiconv-%{libiconv_version}"
%source setup libiconv -q -n libiconv-%{libiconv_version}
%patch setup libiconv -p1
cd ${build_top}
@ -53,7 +44,7 @@ Source0: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{libiconv_version}.tar.gz
%{host_build_flags}
../${source_dir_0}/configure \
../${source_dir_libiconv}/configure \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--exec_prefix=%{_exec_prefix} \

View File

@ -21,8 +21,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: ftp://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz
VersionControl0: git clone git://git.sv.gnu.org/libtool
%source set libtool ftp://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz
#
# Prepare the source code.
@ -30,8 +29,8 @@ VersionControl0: git clone git://git.sv.gnu.org/libtool
%prep
build_top=$(pwd)
%setup -q -n libtool-%{libtool_version}
%{?patch0:%patch0 -p1}
%source setup libtool -q -n libtool-%{libtool_version}
%patch setup libtool -p1
cd ${build_top}

View File

@ -17,17 +17,17 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-%{libusb_version}/libusb-%{libusb_version}.tar.bz2
VersionControl0: git clone git://git.libusb.org/libusb.git
%source set libusb http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-%{libusb_version}/libusb-%{libusb_version}.tar.bz2
#
# Prepare the source code.
#
%prep
%setup -q -c -n %{name}-%{version}
cd libusb-%{libusb_version}
%{?patch0:%patch0 -p1}
cd ..
%source setup libusb -q -c -n %{name}-%{version}
cd libusb-%{libusb_version}
%patch setup libusb -p1
cd ..
%build
export PATH="%{_bindir}:${PATH}"

View File

@ -17,16 +17,16 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: ftp://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.gz
%source set m4 ftp://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.gz
#
# Prepare the source code.
#
%prep
%setup -q -c -n %{name}-%{version}
cd m4-%{m4_version}
%{?patch0:%patch0 -p1}
cd ..
%source setup m4 -q -c -n %{name}-%{version}
cd m4-%{m4_version}
%patch setup m4 -p1
cd ..
%build
export PATH="%{_bindir}:${PATH}"

View File

@ -20,7 +20,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: http://cairographics.org/releases/pixman-%{pixman_version}.tar.gz
%source set pixman http://cairographics.org/releases/pixman-%{pixman_version}.tar.gz
#
# Prepare the source code.
@ -28,18 +28,9 @@ Source0: http://cairographics.org/releases/pixman-%{pixman_version}.tar.gz
%prep
build_top=$(pwd)
source_dir_0="pixman-%{pixman_version}"
%setup -q -n pixman-%{pixman_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}}
source_dir_pixman="pixman-%{pixman_version}"
%source setup pixman -q -n pixman-%{pixman_version}
%patch setup pixman -p1
cd ${build_top}
@ -53,7 +44,7 @@ Source0: http://cairographics.org/releases/pixman-%{pixman_version}.tar.gz
%{host_build_flags}
../${source_dir_0}/configure \
../${source_dir_pixman}/configure \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--exec_prefix=%{_exec_prefix} \

View File

@ -18,7 +18,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
#
# Prepare the source code.
@ -26,18 +26,9 @@ Source0: http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
%prep
build_top=$(pwd)
source_dir_0="qemu-%{qemu_version}"
%setup -q -n qemu-%{qemu_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}}
source_dir_qemu="qemu-%{qemu_version}"
%source setup qemu -q -n qemu-%{qemu_version}
%patch setup qemu -p1
cd ${build_top}
@ -61,7 +52,7 @@ Source0: http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
%{_ld_library_path}=$SYSROOT/lib \
LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib" \
../${source_dir_0}/configure \
../${source_dir_qemu}/configure \
--prefix=%{_prefix} \
${CROSS_PREFIX_OPTION} \
--make=%{__make} \

View File

@ -41,6 +41,7 @@ try:
import log
import options
import path
import sources
import version
except KeyboardInterrupt:
print 'abort: user terminated'
@ -131,63 +132,6 @@ class build:
if not self.opts.dry_run():
path.mkdir(mkpath)
def source(self, package, source_tag):
#
# Scan the sources found in the config file for the one we are
# after. Infos or tags are lists. Merge in any macro defined
# sources as these may be overridden by user loaded macros.
#
sources = package.sources()
url = None
for s in sources:
tag = s[len('source'):]
if tag.isdigit():
if int(tag) == source_tag:
url = sources[s][0]
break
if url is None:
raise error.general('source tag not found: source%d' % (source_tag))
source = download.parse_url(url, '_sourcedir', self.config, self.opts)
download.get_file(source['url'], source['local'], self.opts, self.config)
if 'symlink' in source:
source['script'] = '%%{__ln_s} %s ${source_dir_%d}' % (source['symlink'], source_tag)
elif 'compressed' in source:
source['script'] = source['compressed'] + ' ' + \
source['local'] + ' | %{__tar_extract} -'
else:
source['script'] = '%{__tar_extract} ' + source['local']
return source
def patch(self, package, args):
#
# Scan the patches found in the config file for the one we are
# after. Infos or tags are lists.
#
patches = package.patches()
url = None
for p in patches:
if args[0][1:].lower() == p:
url = patches[p][0]
break
if url is None:
raise error.general('patch tag not found: %s' % (args[0]))
#
# Parse the URL first in the source builder's patch directory.
#
patch = download.parse_url(url, '_patchdir', self.config, self.opts)
#
# If not in the source builder package check the source directory.
#
if not path.exists(patch['local']):
patch = download.parse_url(url, '_patchdir', self.config, self.opts)
download.get_file(patch['url'], patch['local'], self.opts, self.config)
if 'compressed' in patch:
patch['script'] = patch['compressed'] + ' ' + patch['local']
else:
patch['script'] = '%{__cat} ' + patch['local']
patch['script'] += ' | %{__patch} ' + ' '.join(args[1:])
self.script.append(self.config.expand(patch['script']))
def canadian_cross(self):
_host = self.config.expand('%{_host}')
_build = self.config.expand('%{_build}')
@ -195,16 +139,54 @@ class build:
return self.config.defined('%{allow_cxc}') and \
_host != _build and _host != _target
def setup(self, package, args):
log.output('prep: %s: %s' % (package.name(), ' '.join(args)))
opts, args = getopt.getopt(args[1:], 'qDcTn:b:a:')
source_tag = 0
def source(self, name):
#
# Return the list of sources. Merge in any macro defined sources as
# these may be overridden by user loaded macros.
#
_map = 'source-%s' % (name)
src_keys = self.macros.map_keys(_map)
if len(src_keys) == 0:
raise error.general('no source set: %s (%s)' % (name, _map))
srcs = []
for s in src_keys:
sm = self.macros.get(s, globals = False, maps = _map)
if sm is None:
raise error.internal('source macro not found: %s in %s (%s)' % \
(s, name, _map))
url = self.config.expand(sm[2])
src = download.parse_url(url, '_sourcedir', self.config, self.opts)
download.get_file(src['url'], src['local'], self.opts, self.config)
if 'symlink' in src:
src['script'] = '%%{__ln_s} %s ${source_dir_%s}' % (src['symlink'], name)
elif 'compressed' in src:
#
# Zip files unpack as well so do not use tar.
#
src['script'] = '%s %s' % (src['compressed'], src['local'])
if src['compressed-type'] != 'zip':
src['script'] += ' | %{__tar_extract} -'
else:
src['script'] = '%{__tar_extract} %s' % (src['local'])
srcs += [src]
return srcs
def source_setup(self, package, args):
log.output('source setup: %s: %s' % (package.name(), ' '.join(args)))
setup_name = args[1]
args = args[1:]
try:
opts, args = getopt.getopt(args[1:], 'qDcn:b:a:')
except getopt.GetoptError, ge:
raise error.general('source setup error: %s' % str(ge))
quiet = False
unpack_default_source = True
unpack_before_chdir = True
delete_before_unpack = True
create_dir = False
name = None
deleted_dir = False
created_dir = False
changed_dir = False
opt_name = None
for o in opts:
if o[0] == '-q':
quiet = True
@ -212,51 +194,83 @@ class build:
delete_before_unpack = False
elif o[0] == '-c':
create_dir = True
elif o[0] == '-T':
unpack_default_source = False
elif o[0] == '-n':
name = o[1]
opt_name = o[1]
elif o[0] == '-b':
unpack_before_chdir = True
if not o[1].isdigit():
raise error.general('setup -b source tag is not a number: %s' % (o[1]))
source_tag = int(o[1])
elif o[0] == '-a':
unpack_before_chdir = False
if not o[1].isdigit():
raise error.general('setup -a source tag is not a number: %s' % (o[1]))
source_tag = int(o[1])
source0 = None
source = self.source(package, source_tag)
if name is None:
if source:
name = source['name']
else:
raise error.general('setup source tag not found: %d' % (source_tag))
name = self._name_(name)
self.script.append(self.config.expand('cd %{_builddir}'))
if delete_before_unpack:
self.script.append(self.config.expand('%{__rm} -rf ' + name))
if create_dir:
self.script.append(self.config.expand('%{__mkdir_p} ' + name))
#
# If -a? then change directory before unpacking.
#
if not unpack_before_chdir or create_dir:
self.script.append(self.config.expand('cd ' + name))
#
# Unpacking the source. Note, treated the same as -a0.
#
if unpack_default_source and source_tag != 0:
source0 = self.source(package, 0)
if source0 is None:
raise error.general('no setup source0 tag found')
self.script.append(self.config.expand(source0['script']))
self.script.append(self.config.expand(source['script']))
if unpack_before_chdir and not create_dir:
name = None
for source in self.source(setup_name):
if name is None:
if opt_name is None:
if source:
opt_name = source['name']
else:
raise error.general('setup source tag not found: %d' % (source_tag))
else:
name = opt_name
name = self._name_(name)
self.script.append(self.config.expand('cd %{_builddir}'))
if not deleted_dir and delete_before_unpack:
self.script.append(self.config.expand('%{__rm} -rf ' + name))
deleted_dir = True
if not created_dir and create_dir:
self.script.append(self.config.expand('%{__mkdir_p} ' + name))
created_dir = True
if not changed_dir and (not unpack_before_chdir or create_dir):
self.script.append(self.config.expand('cd ' + name))
changed_dir = True
self.script.append(self.config.expand(source['script']))
if not changed_dir and (unpack_before_chdir and not create_dir):
self.script.append(self.config.expand('cd ' + name))
changed_dir = True
self.script.append(self.config.expand('%{__setup_post}'))
def patch_setup(self, package, args):
name = args[1]
args = args[2:]
_map = 'patch-%s' % (name)
default_opts = ' '.join(args)
patch_keys = self.macros.map_keys(_map)
patches = []
for p in patch_keys:
pm = self.macros.get(p, globals = False, maps = _map)
if pm is None:
raise error.internal('patch macro not found: %s in %s (%s)' % \
(p, name, _map))
opts = []
url = []
for pp in pm[2].split():
if len(url) == 0 and pp[0] == '-':
opts += [pp]
else:
url += [pp]
if len(url) == 0:
raise error.general('patch URL not found: %s' % (' '.join(args)))
if len(opts) == 0:
opts = default_opts
else:
opts = ' '.join(opts)
opts = self.config.expand(opts)
url = self.config.expand(' '.join(url))
#
# Parse the URL first in the source builder's patch directory.
#
patch = download.parse_url(url, '_patchdir', self.config, self.opts)
#
# If not in the source builder package check the source directory.
#
if not path.exists(patch['local']):
patch = download.parse_url(url, '_patchdir', self.config, self.opts)
download.get_file(patch['url'], patch['local'], self.opts, self.config)
if 'compressed' in patch:
patch['script'] = patch['compressed'] + ' ' + patch['local']
else:
patch['script'] = '%{__cat} ' + patch['local']
patch['script'] += ' | %%{__patch} %s' % (opts)
self.script.append(self.config.expand(patch['script']))
def run(self, command, shell_opts = '', cwd = None):
e = execute.capture_execution(log = log.default, dump = self.opts.quiet())
cmd = self.config.expand('%{___build_shell} -ex ' + shell_opts + ' ' + command)
@ -278,12 +292,18 @@ class build:
if _prep:
for l in _prep:
args = l.split()
if args[0] == '%setup':
self.setup(package, args)
elif args[0].startswith('%patch'):
self.patch(package, args)
else:
self.script.append(' '.join(args))
if len(args):
if args[0] == '%setup':
if len(args) == 1:
raise error.general('invalid %%setup directive: %s' % (' '.join(args)))
if args[1] == 'source':
self.source_setup(package, args[1:])
elif args[1] == 'patch':
self.patch_setup(package, args[1:])
elif args[0].startswith('%patch'):
self.patch(package, args)
else:
self.script.append(' '.join(args))
def build(self, package):
self.script.append('echo "==> clean %{buildroot}: ${SB_BUILD_ROOT}"')

View File

@ -37,6 +37,7 @@ try:
import options
import path
import pkgconfig
import sources
except KeyboardInterrupt:
print 'user terminated'
sys.exit(1)
@ -580,6 +581,9 @@ class file:
log.trace('config: %s: _select: %s %s %r' % \
(self.init_name, r, ls[1], self.macros.maps()))
def _sources(self, ls):
return sources.process(ls[0][1:], ls[1:], self.macros, self._error)
def _define(self, config, ls):
if len(ls) <= 1:
log.warning('invalid macro definition')
@ -796,6 +800,14 @@ class file:
elif ls[0] == '%select':
if isvalid:
self._select(config, ls)
elif ls[0] == '%source' or ls[0] == '%patch':
if isvalid:
d = self._sources(ls)
if d is not None:
return ('data', d)
elif ls[0] == '%patch':
if isvalid:
self._select(config, ls)
elif ls[0] == '%error':
if isvalid:
return ('data', ['%%error %s' % (self._name_line_msg(l[7:]))])

View File

@ -40,12 +40,16 @@ def _http_parser(source, config, opts):
#
esl = source['ext'].split('.')
if esl[-1:][0] == 'gz':
source['compressed-type'] = 'gzip'
source['compressed'] = '%{__gzip} -dc'
elif esl[-1:][0] == 'bz2':
source['compressed-type'] = 'bzip2'
source['compressed'] = '%{__bzip2} -dc'
elif esl[-1:][0] == 'zip':
source['compressed-type'] = 'zip'
source['compressed'] = '%{__zip} -u'
elif esl[-1:][0] == 'xz':
source['compressed-type'] = 'xz'
source['compressed'] = '%{__xz} -dc'
def _patchworks_parser(source, config, opts):
@ -138,6 +142,9 @@ def parse_url(url, pathkey, config, opts):
source['path'] = url[:colon + 3] + path.dirname(url[colon + 3:])
source['file'] = path.basename(url)
source['name'], source['ext'] = path.splitext(source['file'])
if source['name'].endswith('.tar'):
source['name'] = source['name'][:-4]
source['ext'] = '.tar' + source['ext']
#
# Get the file. Checks the local source directory first.
#

View File

@ -84,7 +84,10 @@ class macros:
text = ''
for f in self.files:
text += '> %s%s' % (f, os.linesep)
for map in self.macros:
maps = sorted(self.macros)
maps.remove('global')
maps += ['global']
for map in maps:
text += '[%s]%s' % (map, os.linesep)
for k in sorted(self.macros[map].keys()):
d = self.macros[map][k]
@ -162,8 +165,11 @@ class macros:
def __len__(self):
return len(self.keys())
def keys(self):
keys = self.macros['global'].keys()
def keys(self, globals = True):
if globals:
keys = self.macros['global'].keys()
else:
keys = []
for rm in self.get_read_maps():
for mk in self.macros[rm]:
if self.macros[rm][mk][1] == 'undefine':
@ -180,9 +186,25 @@ class macros:
return False
return True
def create_map(self, _map):
if _map not in self.macros:
self.macros[_map] = {}
def delete_map(self, _map):
if _map in self.macros:
self.macros.pop(_map, None)
def maps(self):
return self.macros.keys()
def map_keys(self, _map):
if _map in self.macros:
return self.macros[_map].keys()
return []
def map_num_keys(self, _map):
return len(self.map_keys(_map))
def get_read_maps(self):
return [rm[5:] for rm in self.read_maps]
@ -348,14 +370,21 @@ class macros:
raise error.general('opening macro file: %s' % \
(path.host(self.expand(name))))
def get(self, key):
def get(self, key, globals = True, maps = None):
if type(key) is not str:
raise TypeError('bad key type: %s' % (type(key)))
key = self.key_filter(key)
for rm in self.get_read_maps():
if maps is None:
maps = self.get_read_maps()
else:
if type(maps) is str:
maps = [maps]
if type(maps) != list:
raise TypeError('bad maps type: %s' % (type(map)))
for rm in maps:
if key in self.macros[rm]:
return self.macros[rm][key]
if key in self.macros['global']:
if globals and key in self.macros['global']:
return self.macros['global'][key]
return None
@ -408,10 +437,10 @@ class macros:
expanded = True
return _str
def find(self, regex):
def find(self, regex, globals = True):
what = re.compile(regex)
keys = []
for key in self.keys():
for key in self.keys(globals):
if what.match(key):
keys += [key]
return keys
@ -440,6 +469,9 @@ class macros:
return True
return False
def unset_write_map(self):
self.write_map = 'global'
def lock_read_map(self):
self.read_map_locked = True

View File

@ -39,6 +39,7 @@ try:
import options
import path
import reports
import sources
import version
except KeyboardInterrupt:
print 'abort: user terminated'
@ -248,9 +249,10 @@ class buildset:
self.macros.undefine(ls[1].strip())
elif ls[0] == '%include':
configs += self.parse(ls[1].strip())
else:
raise error.general('%s:%d: invalid directive in build set files: %s' % \
(self.bset, lc, l))
elif ls[0] == '%patch' or ls[0] == '%source':
def err(msg):
raise error.general('%s:%d: %s' % (self.bset, lc, msg))
sources.process(ls[0][1:], ls[1:], self.macros, err)
else:
l = l.strip()
c = build.find_config(l, self.configs)

View File

@ -0,0 +1,74 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2014 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Manage sources and patches
#
import log
def _args(args):
return [i for s in [ii.split() for ii in args] for i in s]
def add(label, args, macros, error):
args = _args(args)
if len(args) < 2:
error('%%%s requires at least 2 arguments' % (label))
_map = '%s-%s' % (label, args[0])
macros.create_map(_map)
macros.set_write_map(_map)
index = macros.map_num_keys(_map)
macros.define('%s%d' % (label, index), ' '.join(args[1:]))
macros.unset_write_map()
return None
def set(label, args, macros, error):
args = _args(args)
if len(args) < 2:
error('%%%s requires at least 2 arguments' % (label))
_map = '%s-%s' % (label, args[0])
macros.create_map(_map)
key = '%s0' % (label)
if key not in macros.map_keys(_map):
macros.set_write_map(_map)
macros.define(key, ' '.join(args[1:]))
macros.unset_write_map()
return None
def setup(label, args, macros, error):
args = _args(args)
if len(args) < 2:
error('%%%s requires at least 2 arguments: %s' % (label, ' '.join(args)))
_map = '%s-%s' % (label, args[0])
return ['%%setup %s %s' % (label, ' '.join(args))]
def process(label, args, macros, error):
if label != 'source' and label != 'patch':
error('invalid source type: %s' % (label))
args = _args(args)
log.output('sources: %s' % (' '.join(args)))
if len(args) < 3:
error('%%%s requires at least 3 arguments: %s' % (label, ' '.join(args)))
if args[0] == 'set':
return set(label, args[1:], macros, error)
elif args[0] == 'add':
return add(label, args[1:], macros, error)
elif args[0] == 'setup':
return setup(label, args[1:], macros, error)
error('invalid %%%s command: %s' % (label, args[0]))

View File

@ -24,7 +24,7 @@
#
major = 0
minor = 2
minor = 3
revision = 0
def str():