mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
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:
parent
e074e75ef3
commit
9a15c40e1b
@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
# GDB simulator fix for the sed command.
|
# 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.
|
# Tools configuration.
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
# Fix the simulator UART interface.
|
# 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.
|
# Tools configuration.
|
||||||
|
@ -20,12 +20,12 @@
|
|||||||
#
|
#
|
||||||
# GCC 4.7.2 Microblaze Patch
|
# 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.
|
# 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.
|
# Tools configuration.
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
# GDB patche
|
# 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.
|
# Tools configuration.
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
# GCC 4.8 V850 Patch
|
# 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.
|
# Tools configuration.
|
||||||
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -7,16 +7,11 @@
|
|||||||
|
|
||||||
%define binutils_version 2.20.1
|
%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
|
%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
|
%endif
|
||||||
|
|
||||||
#
|
|
||||||
# RTEMS Build Set patches.
|
|
||||||
#
|
|
||||||
%include rtems-binutils-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The binutils build instructions. We use 2.xx Release 1.
|
# The binutils build instructions. We use 2.xx Release 1.
|
||||||
#
|
#
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
%define binutils_version 2.22
|
%define binutils_version 2.22
|
||||||
|
|
||||||
Patch0: %{rtems_binutils_patches}/binutils-2.22-rtems4.11-20120427.diff
|
%patch add binutils %{rtems_binutils_patches}/binutils-2.22-rtems4.11-20120427.diff
|
||||||
%include rtems-binutils-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The binutils build instructions. We use 2.xx Release 1.
|
# The binutils build instructions. We use 2.xx Release 1.
|
||||||
|
@ -14,11 +14,6 @@
|
|||||||
#
|
#
|
||||||
%define with_deterministic_archives 1
|
%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.
|
# The binutils build instructions. We use 2.xx Release 1.
|
||||||
#
|
#
|
||||||
|
@ -14,11 +14,6 @@
|
|||||||
#
|
#
|
||||||
%define with_deterministic_archives 1
|
%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.
|
# The binutils build instructions. We use 2.xx Release 1.
|
||||||
#
|
#
|
||||||
|
@ -14,11 +14,6 @@
|
|||||||
#
|
#
|
||||||
%define with_deterministic_archives 1
|
%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.
|
# The binutils build instructions. We use 2.xx Release 1.
|
||||||
#
|
#
|
||||||
|
@ -18,15 +18,10 @@
|
|||||||
#
|
#
|
||||||
# The RTEMS 4.9 patches
|
# The RTEMS 4.9 patches
|
||||||
#
|
#
|
||||||
Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
|
%source set gcc 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
|
%patch add gcc %{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
|
%source add gcc 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
|
%patch add gcc %{rtems_newlib_patches}/newlib-1.16.0-rtems4.9-20090324.diff
|
||||||
|
|
||||||
#
|
|
||||||
# Generic RTEMS patch handling.
|
|
||||||
#
|
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gcc/newlib build instructions. We use 4.7 Release 1.
|
# The gcc/newlib build instructions. We use 4.7 Release 1.
|
||||||
|
@ -26,12 +26,11 @@
|
|||||||
#
|
#
|
||||||
# The RTEMS 4.10 patches
|
# 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}
|
%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
|
%endif
|
||||||
Patch10: %{rtems_newlib_patches}/newlib-1.18.0-rtems4.10-20110518.diff
|
%patch add newlib %{rtems_newlib_patches}/newlib-1.18.0-rtems4.10-20110518.diff
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gcc/newlib build instructions. We use 4.4 Release 1.
|
# The gcc/newlib build instructions. We use 4.4 Release 1.
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
#
|
#
|
||||||
# Libiberty strsignal fix
|
# Libiberty strsignal fix
|
||||||
#
|
#
|
||||||
Patch0: %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
|
%patch add gcc %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gcc/newlib build instructions. We use 4.5 Release 1.
|
# The gcc/newlib build instructions. We use 4.5 Release 1.
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
#
|
#
|
||||||
# Libiberty strsignal fix
|
# Libiberty strsignal fix
|
||||||
#
|
#
|
||||||
Patch0: %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
|
%patch add gcc %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gcc/newlib build instructions. We use 4.5 Release 1.
|
# The gcc/newlib build instructions. We use 4.5 Release 1.
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
#
|
#
|
||||||
# The RTEMS 4.11 patches
|
# The RTEMS 4.11 patches
|
||||||
#
|
#
|
||||||
Patch0: gcc-core-4.6.3-rtems4.11-20120303.diff
|
%patch add gcc gcc-core-4.6.3-rtems4.11-20120303.diff
|
||||||
Patch10: newlib-1.20.0-rtems4.11-20121011.diff
|
%patch add newlib newlib-1.20.0-rtems4.11-20121011.diff
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gcc/newlib build instructions. We use 4.4 Release 1.
|
# The gcc/newlib build instructions. We use 4.4 Release 1.
|
||||||
|
@ -43,9 +43,8 @@
|
|||||||
#
|
#
|
||||||
# The RTEMS 4.11 patches
|
# The RTEMS 4.11 patches
|
||||||
#
|
#
|
||||||
Patch0: %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
|
%patch add gcc %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
|
||||||
Patch10: %{rtems_newlib_patches}/newlib-1.20.0-rtems4.11-20121011.diff
|
%patch add newlib %{rtems_newlib_patches}/newlib-1.20.0-rtems4.11-20121011.diff
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gcc/newlib build instructions. We use 4.7 Release 1.
|
# The gcc/newlib build instructions. We use 4.7 Release 1.
|
||||||
|
@ -19,8 +19,7 @@
|
|||||||
#
|
#
|
||||||
# The RTEMS 4.11 patches
|
# The RTEMS 4.11 patches
|
||||||
#
|
#
|
||||||
Patch0: %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
|
%patch add gcc %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
# Incompatible with Texinfo 5
|
# Incompatible with Texinfo 5
|
||||||
%if %{__makeinfo_ver} >= 5.0
|
%if %{__makeinfo_ver} >= 5.0
|
||||||
|
@ -19,8 +19,7 @@
|
|||||||
#
|
#
|
||||||
# The RTEMS 4.11 patches
|
# The RTEMS 4.11 patches
|
||||||
#
|
#
|
||||||
Patch0: %{rtems_gcc_patches}/gcc-4.7.3-rtems4.11-20130414.diff
|
%patch add gcc %{rtems_gcc_patches}/gcc-4.7.3-rtems4.11-20130414.diff
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
# Incompatible with Texinfo 5
|
# Incompatible with Texinfo 5
|
||||||
%if %{__makeinfo_ver} >= 5.0
|
%if %{__makeinfo_ver} >= 5.0
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
# The RTEMS 4.11 patches
|
# 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.
|
# The gcc/newlib build instructions. We use 4.7 Release 1.
|
||||||
|
@ -24,20 +24,14 @@
|
|||||||
#
|
#
|
||||||
# Newlib is from CVS.
|
# 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.
|
# Joel's stack_t patch.
|
||||||
#
|
#
|
||||||
%define rtems_gcc_patch11 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
|
%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
|
||||||
%define rtems_gcc_patch11_opts -p0
|
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# Manage RTEMS patches
|
|
||||||
#
|
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
# The gcc/newlib build instructions. We use 4.8 Release 1.
|
# The gcc/newlib build instructions. We use 4.8 Release 1.
|
||||||
#
|
#
|
||||||
%include %{_configdir}/gcc-4.8-1.cfg
|
%include %{_configdir}/gcc-4.8-1.cfg
|
||||||
|
@ -27,30 +27,24 @@
|
|||||||
#
|
#
|
||||||
# Newlib is from CVS.
|
# 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.
|
# 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++.
|
# 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.
|
# Joel's stack_t patch.
|
||||||
#
|
#
|
||||||
%define rtems_gcc_patch11 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
|
%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
|
||||||
%define rtems_gcc_patch11_opts -p0
|
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# Manage RTEMS patches
|
|
||||||
#
|
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
# The gcc/newlib build instructions. We use 4.8 Release 1.
|
# The gcc/newlib build instructions. We use 4.8 Release 1.
|
||||||
#
|
#
|
||||||
%include %{_configdir}/gcc-4.8-1.cfg
|
%include %{_configdir}/gcc-4.8-1.cfg
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# GCC 4.8.2., Newlib CVS
|
# GCC 4.8.2., Newlib 2.1.0
|
||||||
#
|
#
|
||||||
|
|
||||||
%include %{_configdir}/checks.cfg
|
%include %{_configdir}/checks.cfg
|
||||||
@ -22,14 +22,7 @@
|
|||||||
#
|
#
|
||||||
# Joel's stack_t patch.
|
# Joel's stack_t patch.
|
||||||
#
|
#
|
||||||
%define rtems_gcc_patch11 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
|
%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
|
||||||
%define rtems_gcc_patch11_opts -p0
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Manage RTEMS patches
|
|
||||||
#
|
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
# The gcc/newlib build instructions. We use 4.8 Release 1.
|
# The gcc/newlib build instructions. We use 4.8 Release 1.
|
||||||
#
|
#
|
||||||
|
@ -22,25 +22,19 @@
|
|||||||
#
|
#
|
||||||
# Newlib is from CVS.
|
# 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++.
|
# 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.
|
# Joel's stack_t patch.
|
||||||
#
|
#
|
||||||
%define rtems_gcc_patch11 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
|
%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
|
||||||
%define rtems_gcc_patch11_opts -p0
|
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# Manage RTEMS patches
|
|
||||||
#
|
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
# The gcc/newlib build instructions. We use 4.8 Release 1.
|
# The gcc/newlib build instructions. We use 4.8 Release 1.
|
||||||
#
|
#
|
||||||
%include %{_configdir}/gcc-4.8-1.cfg
|
%include %{_configdir}/gcc-4.8-1.cfg
|
||||||
|
@ -22,14 +22,7 @@
|
|||||||
#
|
#
|
||||||
# Joel's stack_t patch.
|
# Joel's stack_t patch.
|
||||||
#
|
#
|
||||||
%define rtems_gcc_patch11 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
|
%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
|
||||||
%define rtems_gcc_patch11_opts -p0
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Manage RTEMS patches
|
|
||||||
#
|
|
||||||
%include rtems-gcc-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gcc/newlib build instructions. We use 4.9 Release 1.
|
# The gcc/newlib build instructions. We use 4.9 Release 1.
|
||||||
|
@ -10,10 +10,8 @@
|
|||||||
#
|
#
|
||||||
# RTEMS Build Set patches.
|
# RTEMS Build Set patches.
|
||||||
#
|
#
|
||||||
Source0: http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.bz2
|
%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.bz2
|
||||||
Patch0: %{rtems_gdb_patches}/gdb-6.8-rtems4.9-20091111.diff
|
%patch add gdb %{rtems_gdb_patches}/gdb-6.8-rtems4.9-20091111.diff
|
||||||
|
|
||||||
%include rtems-gdb-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gdb build instructions. We use 6.xx Release 1.
|
# The gdb build instructions. We use 6.xx Release 1.
|
||||||
|
@ -7,12 +7,7 @@
|
|||||||
|
|
||||||
%define gdb_version 7.3.1
|
%define gdb_version 7.3.1
|
||||||
|
|
||||||
Patch0: %{rtems_gdb_patches}/gdb-7.3.1-rtems4.10-20120918.diff
|
%patch add gdb %{rtems_gdb_patches}/gdb-7.3.1-rtems4.10-20120918.diff
|
||||||
|
|
||||||
#
|
|
||||||
# RTEMS Build Set patches.
|
|
||||||
#
|
|
||||||
%include rtems-gdb-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gdb build instructions. We use 7.xx Release 1.
|
# The gdb build instructions. We use 7.xx Release 1.
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
%define gdb_version 7.5
|
%define gdb_version 7.5
|
||||||
|
|
||||||
Patch0: %{rtems_gdb_patches}/gdb-7.5-rtems4.11-20121003.diff
|
%patch add gdb %{rtems_gdb_patches}/gdb-7.5-rtems4.11-20121003.diff
|
||||||
%include rtems-gdb-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gdb build instructions. We use 7.xx Release 1.
|
# The gdb build instructions. We use 7.xx Release 1.
|
||||||
|
@ -7,11 +7,6 @@
|
|||||||
|
|
||||||
%define gdb_version 7.5.1
|
%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.
|
# The gdb build instructions. We use 7.xx Release 1.
|
||||||
#
|
#
|
||||||
|
@ -7,11 +7,6 @@
|
|||||||
|
|
||||||
%define gdb_version 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.
|
# The gdb build instructions. We use 7.xx Release 1.
|
||||||
#
|
#
|
||||||
|
@ -7,11 +7,6 @@
|
|||||||
|
|
||||||
%define gdb_version 7.6.1
|
%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.
|
# The gdb build instructions. We use 7.xx Release 1.
|
||||||
#
|
#
|
||||||
|
@ -7,14 +7,8 @@
|
|||||||
|
|
||||||
%define gdb_version 7.6.2
|
%define gdb_version 7.6.2
|
||||||
|
|
||||||
#
|
|
||||||
# RTEMS Build Set patches.
|
|
||||||
#
|
|
||||||
%include rtems-gdb-patches.cfg
|
|
||||||
|
|
||||||
%if %{_build_os} == freebsd
|
%if %{_build_os} == freebsd
|
||||||
%define patch5 %{rtems_gdb_patches}/patch-gdb-python-python-config.py
|
%patch add gdb -p0 %{rtems_gdb_patches}/patch-gdb-python-python-config.py
|
||||||
%define patch5_opts -p0
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -7,20 +7,14 @@
|
|||||||
|
|
||||||
%define gdb_version 7.7
|
%define gdb_version 7.7
|
||||||
|
|
||||||
#
|
|
||||||
# RTEMS Build Set patches.
|
|
||||||
#
|
|
||||||
%include rtems-gdb-patches.cfg
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Clean up the sim-arange inline code so it builds.
|
# Clean up the sim-arange inline code so it builds.
|
||||||
#
|
#
|
||||||
%define patch1 %{rtems_gdb_patches}/gdb-sim-arange-inline.diff
|
%patch add gdb %{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-cgen-inline.diff
|
||||||
|
|
||||||
%if %{_build_os} == freebsd
|
%if %{_build_os} == freebsd
|
||||||
%define patch5 %{rtems_gdb_patches}/patch-gdb-python-python-config.py
|
%patch add gdb -p0 %{rtems_gdb_patches}/patch-gdb-python-python-config.py
|
||||||
%define patch5_opts -p0
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -16,9 +16,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# Source
|
||||||
#
|
#
|
||||||
%ifn %{defined Source0}
|
%source set rtems http://ftp.rtems.org/ftp/pub/rtems/%{rtems_kernel_version}/rtems-%{rtems_kernel_version}.tar.bz2
|
||||||
Source0: http://ftp.rtems.org/ftp/pub/rtems/%{rtems_kernel_version}/rtems-%{rtems_kernel_version}.tar.bz2
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# If C++ defined for the tool set use it to control RTEMS's setting..
|
# 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.
|
# Prepare the source code.
|
||||||
#
|
#
|
||||||
%prep
|
%prep
|
||||||
source_dir_0="rtems-%{rtems_kernel_version}"
|
source_dir_rtems="rtems-%{rtems_kernel_version}"
|
||||||
%setup -q -c -n %{name}-%{version}
|
%source setup rtems -q -c -n %{name}-%{version}
|
||||||
cd ${source_dir_0}
|
cd ${source_dir_rtems}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup rtems -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}}
|
|
||||||
%if %{rtems_bootstrap}
|
%if %{rtems_bootstrap}
|
||||||
%if %{defined _internal_autotools_path}
|
%if %{defined _internal_autotools_path}
|
||||||
export PATH="%{_internal_autotools_path}/bin:${PATH}"
|
export PATH="%{_internal_autotools_path}/bin:${PATH}"
|
||||||
@ -93,7 +82,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
mkdir -p ${build_dir}
|
mkdir -p ${build_dir}
|
||||||
cd ${build_dir}
|
cd ${build_dir}
|
||||||
|
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_rtems}/configure \
|
||||||
--build=%{_build} --host=%{_host} \
|
--build=%{_build} --host=%{_host} \
|
||||||
--target=%{_target} \
|
--target=%{_target} \
|
||||||
%{?rtems_posix:--enable-posix}%{!?rtems_posix:--disable-posix} \
|
%{?rtems_posix:--enable-posix}%{!?rtems_posix:--disable-posix} \
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
# Pull the latest changes from git each build. Override if this is not what you
|
# Pull the latest changes from git each build. Override if this is not what you
|
||||||
# want.
|
# 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
|
# The code in git needs to be bootstrapped. Do each build because we have
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
#
|
#
|
||||||
# Source
|
# Source
|
||||||
#
|
#
|
||||||
Source0: http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-binutils-2.20.tar.bz2
|
%source set binutils 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
|
%patch add binutils %{rtems_binutils_patches}/nios2/nios2-binutils-2.20-rtems-20110703.diff
|
||||||
|
|
||||||
#
|
#
|
||||||
# The binutils build instructions. We use 2.xx Release 1.
|
# The binutils build instructions. We use 2.xx Release 1.
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
#
|
#
|
||||||
# The RTEMS 4.11 patches
|
# The RTEMS 4.11 patches
|
||||||
#
|
#
|
||||||
Patch0: %{rtems_gcc_patches}/nios2/nios2-gcc-4.1-rtems-20110818.diff
|
%patch add gcc %{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 newlib %{rtems_newlib_patches}/nios2/nios2-newlib-1.19.0-rtems-20110720.diff
|
||||||
|
|
||||||
Name: %{_target}-gcc-%{gcc_version}-newlib-%{newlib_version}-%{release}
|
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}
|
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++
|
# 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
|
# 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
|
# The GCC library directory
|
||||||
@ -57,48 +57,35 @@ Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
|
|||||||
# Prepare the source code.
|
# Prepare the source code.
|
||||||
#
|
#
|
||||||
%prep
|
%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
|
# gcc
|
||||||
source_dir_0="gcc-%{gcc_version}"
|
source_dir_gcc="gcc-%{gcc_version}"
|
||||||
%setup -q -c -n %{name}-%{version}
|
%source setup gcc -q -c -n %{name}-%{version}
|
||||||
cd ${source_dir_0}
|
cd ${source_dir_gcc}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup gcc -p1
|
||||||
%{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
|
cd ${build_top}
|
||||||
%{?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 ..
|
|
||||||
|
|
||||||
# newlib
|
# newlib
|
||||||
source_dir_10="newlib-%{newlib_version}"
|
source_dir_newlib="newlib-%{newlib_version}"
|
||||||
%setup -q -D -T -n %{name}-%{version} -a10
|
%source setup newlib -q -D -n %{name}-%{version}
|
||||||
cd ${source_dir_10}
|
cd ${source_dir_newlib}
|
||||||
%{?patch10:%patch10 %{?patch10_opts:%{patch10_opts}}%{!?patch10_opts:-p1}}
|
%patch setup newlib -p1
|
||||||
%{?patch11:%patch11 %{?patch11_opts:%{patch11_opts}}%{!?patch11_opts:-p1}}
|
cd ${build_top}
|
||||||
%{?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 ..
|
|
||||||
|
|
||||||
# Link newlib into the gcc source tree
|
# Link newlib into the gcc source tree
|
||||||
%{__rmfile} ${source_dir_0}/newlib
|
%{__rmfile} ${source_dir_gcc}/newlib
|
||||||
%{__ln_s} $PWD/${source_dir_10}/newlib ${source_dir_0}/newlib
|
%{__ln_s} $PWD/${source_dir_newlib}/newlib ${source_dir_gcc}/newlib
|
||||||
|
|
||||||
echo "%{gcc_version_message}" > gcc-%{gcc_version}/gcc/DEV-PHASE
|
echo "%{gcc_version_message}" > gcc-%{gcc_version}/gcc/DEV-PHASE
|
||||||
|
|
||||||
# Fix timestamps
|
# Fix timestamps
|
||||||
cd ${source_dir_0}
|
cd ${source_dir_gcc}
|
||||||
contrib/gcc_update --touch
|
contrib/gcc_update --touch
|
||||||
cd ..
|
cd ${build_top}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{build_directory}
|
%{build_directory}
|
||||||
@ -113,7 +100,7 @@ Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
|
|||||||
|
|
||||||
%{host_build_flags}
|
%{host_build_flags}
|
||||||
|
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_gcc}/configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--bindir=%{_bindir} \
|
--bindir=%{_bindir} \
|
||||||
--exec_prefix=%{_exec_prefix} \
|
--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:
|
# Bug in gcc-3.2.1:
|
||||||
# Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
|
# Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
|
||||||
mkdir -p gcc/include
|
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
|
fi
|
||||||
|
|
||||||
# jobs > 1 is broken with this version of gcc
|
# 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*
|
%{__rmfile} $SB_BUILD_ROOT%{_mandir}/man3/*ffi*
|
||||||
|
|
||||||
# Clean the symlinks away incase the source is a repo
|
# Clean the symlinks away incase the source is a repo
|
||||||
%{__rmfile} ${source_dir_0}/newlib
|
%{__rmfile} ${source_dir_gcc}/newlib
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
%define without_python
|
%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.
|
# The gdb build instructions. We use 7.xx Release 1.
|
||||||
|
@ -21,8 +21,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# Source
|
||||||
#
|
#
|
||||||
Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
|
%source set autoconf ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
|
||||||
VersionControl0: git clone git://git.sv.gnu.org/autoconf
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Prepare the source code.
|
# Prepare the source code.
|
||||||
@ -30,8 +29,8 @@ VersionControl0: git clone git://git.sv.gnu.org/autoconf
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
%setup -q -n autoconf-%{autoconf_version}
|
%source setup autoconf -q -n autoconf-%{autoconf_version}
|
||||||
%{?patch0:%patch0 -p1}
|
%patch setup autoconf -p1
|
||||||
|
|
||||||
cd ${build_top}
|
cd ${build_top}
|
||||||
|
|
||||||
|
@ -21,8 +21,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# Source
|
||||||
#
|
#
|
||||||
Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz
|
%source set automake ftp://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz
|
||||||
VersionControl0: git clone git://git.savannah.gnu.org/automake.git
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Prepare the source code.
|
# Prepare the source code.
|
||||||
@ -30,8 +29,8 @@ VersionControl0: git clone git://git.savannah.gnu.org/automake.git
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
%setup -q -n automake-%{automake_version}
|
%source setup automake -q -n automake-%{automake_version}
|
||||||
%{?patch0:%patch0 -p1}
|
%patch setup automake -p1
|
||||||
|
|
||||||
cd ${build_top}
|
cd ${build_top}
|
||||||
|
|
||||||
|
@ -29,10 +29,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# Source
|
||||||
#
|
#
|
||||||
%ifn %{defined Source0}
|
%source set binutils ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2
|
||||||
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
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Prepare the source code.
|
# Prepare the source code.
|
||||||
@ -40,18 +37,9 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
source_dir_0="binutils-%{binutils_version}"
|
source_dir_binutils="binutils-%{binutils_version}"
|
||||||
%setup -q -n binutils-%{binutils_version}
|
%source setup binutils -q -n binutils-%{binutils_version}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup binutils -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}
|
cd ${build_top}
|
||||||
|
|
||||||
@ -65,7 +53,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
|
|
||||||
%{host_build_flags}
|
%{host_build_flags}
|
||||||
|
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_binutils}/configure \
|
||||||
--build=%{_build} --host=%{_host} \
|
--build=%{_build} --host=%{_host} \
|
||||||
--target=%{_target} \
|
--target=%{_target} \
|
||||||
--verbose --disable-nls \
|
--verbose --disable-nls \
|
||||||
|
@ -18,7 +18,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# 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.
|
# Prepare the source code.
|
||||||
@ -26,15 +26,8 @@ Source0: http://www.jdl.com/software/dtc-v%{dtc_version}.tgz
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
%setup -q -n dtc-v%{dtc_version}
|
%source setup dtc -q -n dtc-v%{dtc_version}
|
||||||
%{?patch0:%patch0 -p1}
|
%patch setup dtc -p1
|
||||||
%{?patch1:%patch1 -p1}
|
|
||||||
%{?patch2:%patch2 -p1}
|
|
||||||
%{?patch3:%patch3 -p1}
|
|
||||||
%{?patch4:%patch4 -p1}
|
|
||||||
%{?patch5:%patch5 -p1}
|
|
||||||
%{?patch6:%patch6 -p1}
|
|
||||||
%{?patch7:%patch7 -p1}
|
|
||||||
|
|
||||||
cd ${build_top}
|
cd ${build_top}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# 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.
|
# Prepare the source code.
|
||||||
@ -26,8 +26,8 @@ Source0: http://downloads.sourceforge.net/project/expat/expat/%{expat_version}/e
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
%setup -q -n expat-%{expat_version}
|
%source setup expat -q -n expat-%{expat_version}
|
||||||
%{?patch0:%patch0 -p1}
|
%patch setup expat -p1
|
||||||
|
|
||||||
cd ${build_top}
|
cd ${build_top}
|
||||||
|
|
||||||
|
@ -11,23 +11,19 @@
|
|||||||
#
|
#
|
||||||
# GCC core and G++
|
# GCC core and G++
|
||||||
#
|
#
|
||||||
%ifn %{defined Source0}
|
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
|
||||||
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
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Newlib
|
# 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
|
||||||
VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Packages GCC requires
|
# Packages GCC requires
|
||||||
#
|
#
|
||||||
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
||||||
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
|
%source set mpc 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 gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
|
||||||
|
|
||||||
#
|
#
|
||||||
# GCC Common build script.
|
# GCC Common build script.
|
||||||
|
@ -11,25 +11,23 @@
|
|||||||
#
|
#
|
||||||
# GCC core and G++
|
# GCC core and G++
|
||||||
#
|
#
|
||||||
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
|
%source set gcc 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
|
|
||||||
|
|
||||||
%if %{enable_cxx}
|
%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
|
%endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Newlib
|
# 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
|
||||||
VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Packages GCC requires
|
# Packages GCC requires
|
||||||
#
|
#
|
||||||
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
||||||
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
|
%source set mpc 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 gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
|
||||||
|
|
||||||
#
|
#
|
||||||
# GCC Common build script.
|
# GCC Common build script.
|
||||||
|
@ -11,29 +11,19 @@
|
|||||||
#
|
#
|
||||||
# GCC core and G++
|
# GCC core and G++
|
||||||
#
|
#
|
||||||
%ifn %{defined Source0}
|
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
|
||||||
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Newlib
|
# Newlib
|
||||||
#
|
#
|
||||||
%ifn %{defined Source10}
|
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
|
||||||
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Packages GCC requires
|
# Packages GCC requires
|
||||||
#
|
#
|
||||||
%ifn %{defined Source20}
|
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
||||||
Source20: 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
|
||||||
%endif
|
%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
|
||||||
%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
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# GCC Common build script.
|
# GCC Common build script.
|
||||||
|
@ -11,25 +11,23 @@
|
|||||||
#
|
#
|
||||||
# GCC core and G++
|
# GCC core and G++
|
||||||
#
|
#
|
||||||
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
|
%source set gcc 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
|
|
||||||
|
|
||||||
%if %{enable_cxx}
|
%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
|
%endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Newlib
|
# 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
|
||||||
VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Packages GCC requires
|
# Packages GCC requires
|
||||||
#
|
#
|
||||||
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
||||||
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
|
%source set mpc 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 gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
|
||||||
|
|
||||||
#
|
#
|
||||||
# GCC Common build script.
|
# GCC Common build script.
|
||||||
|
@ -20,23 +20,19 @@
|
|||||||
#
|
#
|
||||||
# GCC core and G++
|
# GCC core and G++
|
||||||
#
|
#
|
||||||
%ifn %{defined Source0}
|
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
|
||||||
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
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Newlib
|
# 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
|
||||||
VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Packages GCC requires
|
# Packages GCC requires
|
||||||
#
|
#
|
||||||
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
||||||
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
|
%source set mpc 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 gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
|
||||||
|
|
||||||
#
|
#
|
||||||
# GCC Common build script.
|
# GCC Common build script.
|
||||||
|
@ -11,29 +11,19 @@
|
|||||||
#
|
#
|
||||||
# GCC core and G++
|
# GCC core and G++
|
||||||
#
|
#
|
||||||
%ifn %{defined Source0}
|
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
|
||||||
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Newlib
|
# Newlib
|
||||||
#
|
#
|
||||||
%ifn %{defined Source10}
|
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
|
||||||
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Packages GCC requires
|
# Packages GCC requires
|
||||||
#
|
#
|
||||||
%ifn %{defined Source20}
|
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
||||||
Source20: 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
|
||||||
%endif
|
%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
|
||||||
%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
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# GCC Common build script.
|
# GCC Common build script.
|
||||||
|
@ -11,29 +11,19 @@
|
|||||||
#
|
#
|
||||||
# GCC core and G++
|
# GCC core and G++
|
||||||
#
|
#
|
||||||
%ifn %{defined Source0}
|
%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
|
||||||
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Newlib
|
# Newlib
|
||||||
#
|
#
|
||||||
%ifn %{defined Source10}
|
%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
|
||||||
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Packages GCC requires
|
# Packages GCC requires
|
||||||
#
|
#
|
||||||
%ifn %{defined Source20}
|
%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
|
||||||
Source20: 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
|
||||||
%endif
|
%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
|
||||||
%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
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# GCC Common build script.
|
# GCC Common build script.
|
||||||
|
@ -11,15 +11,6 @@
|
|||||||
%error No GCC Version message defined.
|
%error No GCC Version message defined.
|
||||||
%endif
|
%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.
|
# The package description.
|
||||||
#
|
#
|
||||||
@ -50,71 +41,52 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
# gcc and optional the g++ core if separate packages
|
# gcc and optional the g++ core if separate packages
|
||||||
source_dir_0="gcc-%{gcc_version}"
|
source_dir_gcc="gcc-%{gcc_version}"
|
||||||
%setup -q -n gcc-%{gcc_version}
|
%source setup gcc -q -n gcc-%{gcc_version}
|
||||||
%{?source1:%setup -q -D -T -n gcc-%{gcc_version} -b1}
|
%patch setup gcc -p1
|
||||||
%{?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}
|
cd ${build_top}
|
||||||
|
|
||||||
# newlib
|
# newlib
|
||||||
source_dir_10="newlib-%{newlib_version}"
|
source_dir_newlib="newlib-%{newlib_version}"
|
||||||
%setup -q -D -T -n newlib-%{newlib_version} -b10
|
%source setup newlib -q -D -n newlib-%{newlib_version}
|
||||||
%{?patch10:%patch10 %{?patch10_opts:%{patch10_opts}}%{!?patch10_opts:-p1}}
|
%patch setup newlib -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 ${build_top}
|
cd ${build_top}
|
||||||
|
|
||||||
# Link newlib into the gcc source tree
|
# Link newlib into the gcc source tree
|
||||||
%{__rmfile} ${source_dir_0}/newlib
|
%{__rmfile} ${source_dir_gcc}/newlib
|
||||||
%{__ln_s} $PWD/${source_dir_10}/newlib ${source_dir_0}/newlib
|
%{__ln_s} $PWD/${source_dir_newlib}/newlib ${source_dir_gcc}/newlib
|
||||||
|
|
||||||
# MPFR
|
# MPFR
|
||||||
source_dir_20="mpfr-%{mpfr_version}"
|
source_dir_mpfr="mpfr-%{mpfr_version}"
|
||||||
%setup -q -D -T -n mpfr-%{mpfr_version} -b20
|
%source setup mpfr -q -D -n mpfr-%{mpfr_version}
|
||||||
%{?patch20:%patch20 -p1}
|
%patch setup mpfr -p1
|
||||||
cd ${build_top}
|
cd ${build_top}
|
||||||
# Build MPFR one-tree style
|
# Build MPFR one-tree style
|
||||||
%{__rmfile} ${source_dir_0}/mpfr
|
%{__rmfile} ${source_dir_gcc}/mpfr
|
||||||
%{__ln_s} $PWD/${source_dir_20} ${source_dir_0}/mpfr
|
%{__ln_s} $PWD/${source_dir_mpfr} ${source_dir_gcc}/mpfr
|
||||||
|
|
||||||
# MPC
|
# MPC
|
||||||
source_dir_21="mpc-%{mpc_version}"
|
source_dir_mpc="mpc-%{mpc_version}"
|
||||||
%setup -q -D -T -n mpc-%{mpc_version} -b21
|
%source setup mpc -q -D -n mpc-%{mpc_version}
|
||||||
%{?patch21:%patch21 -p1}
|
%patch setup mpc -p1
|
||||||
cd ${build_top}
|
cd ${build_top}
|
||||||
# Build MPC one-tree style
|
# Build MPC one-tree style
|
||||||
%{__rmfile} ${source_dir_0}/mpc
|
%{__rmfile} ${source_dir_gcc}/mpc
|
||||||
%{__ln_s} $PWD/${source_dir_21} ${source_dir_0}/mpc
|
%{__ln_s} $PWD/${source_dir_mpc} ${source_dir_gcc}/mpc
|
||||||
|
|
||||||
# GMP
|
# GMP
|
||||||
source_dir_22="gmp-%{gmp_version}"
|
source_dir_gmp="gmp-%{gmp_version}"
|
||||||
%setup -q -D -T -n gmp-%{gmp_version} -b22
|
%source setup gmp -q -D -n gmp-%{gmp_version}
|
||||||
%{?patch22:%patch22 -p1}
|
%patch setup gmp -p1
|
||||||
cd ${build_top}
|
cd ${build_top}
|
||||||
# Build GMP one-tree style
|
# Build GMP one-tree style
|
||||||
%{__rmfile} ${source_dir_0}/gmp
|
%{__rmfile} ${source_dir_gcc}/gmp
|
||||||
%{__ln_s} $PWD/${source_dir_22} ${source_dir_0}/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
|
# Fix timestamps
|
||||||
cd ${source_dir_0}
|
cd ${source_dir_gcc}
|
||||||
contrib/gcc_update --touch
|
contrib/gcc_update --touch
|
||||||
cd ${build_top}
|
cd ${build_top}
|
||||||
|
|
||||||
@ -149,7 +121,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
|
|
||||||
%{host_build_flags}
|
%{host_build_flags}
|
||||||
|
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_gcc}/configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--bindir=%{_bindir} \
|
--bindir=%{_bindir} \
|
||||||
--exec_prefix=%{_exec_prefix} \
|
--exec_prefix=%{_exec_prefix} \
|
||||||
@ -182,7 +154,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
# Bug in gcc-3.2.1:
|
# Bug in gcc-3.2.1:
|
||||||
# Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
|
# Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
|
||||||
mkdir -p gcc/include
|
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
|
fi
|
||||||
|
|
||||||
%{__make} %{?_smp_mflags} all
|
%{__make} %{?_smp_mflags} all
|
||||||
@ -212,10 +184,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
%{__rmfile} $SB_BUILD_ROOT%{_mandir}/man3/*ffi*
|
%{__rmfile} $SB_BUILD_ROOT%{_mandir}/man3/*ffi*
|
||||||
|
|
||||||
# Clean the symlinks away incase the source is a repo
|
# Clean the symlinks away incase the source is a repo
|
||||||
%{__rmfile} ${source_dir_0}/newlib
|
%{__rmfile} ${source_dir_gcc}/newlib
|
||||||
%{__rmfile} ${source_dir_0}/mpfr
|
%{__rmfile} ${source_dir_gcc}/mpfr
|
||||||
%{__rmfile} ${source_dir_0}/mpc
|
%{__rmfile} ${source_dir_gcc}/mpc
|
||||||
%{__rmfile} ${source_dir_0}/gmp
|
%{__rmfile} ${source_dir_gcc}/gmp
|
||||||
|
|
||||||
%testing
|
%testing
|
||||||
# Add testing here.
|
# Add testing here.
|
||||||
|
@ -16,27 +16,15 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# Source
|
||||||
#
|
#
|
||||||
%ifn %{defined Source0}
|
%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
|
||||||
Source0: http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
|
|
||||||
VersionControl0 git clone git://sourceware.org/git/gdb.git
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Prepare the source code.
|
# Prepare the source code.
|
||||||
#
|
#
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c -n %{name}-%{version}
|
%source setup gdb -q -c -n %{name}-%{version}
|
||||||
cd gdb-%{gdb_version}
|
cd gdb-%{gdb_version}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup gdb -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 ..
|
cd ..
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
@ -25,10 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# Source
|
||||||
#
|
#
|
||||||
%ifn %{defined Source0}
|
%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
|
||||||
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.
|
# Disable Python on Cxc builds for now.
|
||||||
@ -44,18 +41,9 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
source_dir_0="gdb-%{gdb_version}"
|
source_dir_gdb="gdb-%{gdb_version}"
|
||||||
%setup -q -n gdb-%{gdb_version}
|
%source setup gdb -q -n gdb-%{gdb_version}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup gdb -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}
|
cd ${build_top}
|
||||||
|
|
||||||
@ -78,7 +66,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
|
|
||||||
LIBS_STATIC=${GDB_LIBS_STATIC} \
|
LIBS_STATIC=${GDB_LIBS_STATIC} \
|
||||||
LIBS=${GDB_LIBS} \
|
LIBS=${GDB_LIBS} \
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_gdb}/configure \
|
||||||
--build=%{_build} --host=%{_host} \
|
--build=%{_build} --host=%{_host} \
|
||||||
--target=%{_target} \
|
--target=%{_target} \
|
||||||
--verbose --disable-nls \
|
--verbose --disable-nls \
|
||||||
|
@ -19,7 +19,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# 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.
|
# 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
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
source_dir_0="gettext-%{gettext_version}"
|
source_dir_gettext="gettext-%{gettext_version}"
|
||||||
%setup -q -n gettext-%{gettext_version}
|
%source setup gettext -q -n gettext-%{gettext_version}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup gettext -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}
|
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}
|
%{host_build_flags}
|
||||||
|
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_gettext}/configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--bindir=%{_bindir} \
|
--bindir=%{_bindir} \
|
||||||
--exec_prefix=%{_exec_prefix} \
|
--exec_prefix=%{_exec_prefix} \
|
||||||
|
@ -19,7 +19,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# 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.
|
# Prepare the source code.
|
||||||
@ -27,18 +27,9 @@ Source0: http://ftp.gnome.org/pub/gnome/sources/glib/%{glib_version_major}/glib-
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
source_dir_0="glib-%{glib_version}"
|
source_dir_glib="glib-%{glib_version}"
|
||||||
%setup -q -n glib-%{glib_version}
|
%source setup glib -q -n glib-%{glib_version}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup glib -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}
|
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_PATH=$SYSROOT/lib/pkgconfig \
|
||||||
PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
|
PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
|
||||||
%{_ld_library_path}=$SYSROOT/lib \
|
%{_ld_library_path}=$SYSROOT/lib \
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_glib}/configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--bindir=%{_bindir} \
|
--bindir=%{_bindir} \
|
||||||
--exec_prefix=%{_exec_prefix} \
|
--exec_prefix=%{_exec_prefix} \
|
||||||
|
@ -19,7 +19,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# 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.
|
# Prepare the source code.
|
||||||
@ -27,18 +27,9 @@ Source0: ftp://sourceware.org/pub/libffi/libffi-%{libffi_version}.tar.gz
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
source_dir_0="libffi-%{libffi_version}"
|
source_dir_libffi="libffi-%{libffi_version}"
|
||||||
%setup -q -n libffi-%{libffi_version}
|
%source setup libffi -q -n libffi-%{libffi_version}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup libffi -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}
|
cd ${build_top}
|
||||||
|
|
||||||
@ -52,7 +43,7 @@ Source0: ftp://sourceware.org/pub/libffi/libffi-%{libffi_version}.tar.gz
|
|||||||
|
|
||||||
%{host_build_flags}
|
%{host_build_flags}
|
||||||
|
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_libffi}/configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--bindir=%{_bindir} \
|
--bindir=%{_bindir} \
|
||||||
--exec_prefix=%{_exec_prefix} \
|
--exec_prefix=%{_exec_prefix} \
|
||||||
|
@ -20,7 +20,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# 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.
|
# Prepare the source code.
|
||||||
@ -28,18 +28,9 @@ Source0: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{libiconv_version}.tar.gz
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
source_dir_0="libiconv-%{libiconv_version}"
|
source_dir_libiconv="libiconv-%{libiconv_version}"
|
||||||
%setup -q -n libiconv-%{libiconv_version}
|
%source setup libiconv -q -n libiconv-%{libiconv_version}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup libiconv -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}
|
cd ${build_top}
|
||||||
|
|
||||||
@ -53,7 +44,7 @@ Source0: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{libiconv_version}.tar.gz
|
|||||||
|
|
||||||
%{host_build_flags}
|
%{host_build_flags}
|
||||||
|
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_libiconv}/configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--bindir=%{_bindir} \
|
--bindir=%{_bindir} \
|
||||||
--exec_prefix=%{_exec_prefix} \
|
--exec_prefix=%{_exec_prefix} \
|
||||||
|
@ -21,8 +21,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# Source
|
||||||
#
|
#
|
||||||
Source0: ftp://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz
|
%source set libtool ftp://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz
|
||||||
VersionControl0: git clone git://git.sv.gnu.org/libtool
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Prepare the source code.
|
# Prepare the source code.
|
||||||
@ -30,8 +29,8 @@ VersionControl0: git clone git://git.sv.gnu.org/libtool
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
%setup -q -n libtool-%{libtool_version}
|
%source setup libtool -q -n libtool-%{libtool_version}
|
||||||
%{?patch0:%patch0 -p1}
|
%patch setup libtool -p1
|
||||||
|
|
||||||
cd ${build_top}
|
cd ${build_top}
|
||||||
|
|
||||||
|
@ -17,17 +17,17 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# Source
|
||||||
#
|
#
|
||||||
Source0: http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-%{libusb_version}/libusb-%{libusb_version}.tar.bz2
|
%source set libusb 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
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Prepare the source code.
|
# Prepare the source code.
|
||||||
#
|
#
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c -n %{name}-%{version}
|
|
||||||
cd libusb-%{libusb_version}
|
%source setup libusb -q -c -n %{name}-%{version}
|
||||||
%{?patch0:%patch0 -p1}
|
cd libusb-%{libusb_version}
|
||||||
cd ..
|
%patch setup libusb -p1
|
||||||
|
cd ..
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export PATH="%{_bindir}:${PATH}"
|
export PATH="%{_bindir}:${PATH}"
|
||||||
|
@ -17,16 +17,16 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# 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.
|
# Prepare the source code.
|
||||||
#
|
#
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c -n %{name}-%{version}
|
%source setup m4 -q -c -n %{name}-%{version}
|
||||||
cd m4-%{m4_version}
|
cd m4-%{m4_version}
|
||||||
%{?patch0:%patch0 -p1}
|
%patch setup m4 -p1
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export PATH="%{_bindir}:${PATH}"
|
export PATH="%{_bindir}:${PATH}"
|
||||||
|
@ -20,7 +20,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# 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.
|
# Prepare the source code.
|
||||||
@ -28,18 +28,9 @@ Source0: http://cairographics.org/releases/pixman-%{pixman_version}.tar.gz
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
source_dir_0="pixman-%{pixman_version}"
|
source_dir_pixman="pixman-%{pixman_version}"
|
||||||
%setup -q -n pixman-%{pixman_version}
|
%source setup pixman -q -n pixman-%{pixman_version}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup pixman -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}
|
cd ${build_top}
|
||||||
|
|
||||||
@ -53,7 +44,7 @@ Source0: http://cairographics.org/releases/pixman-%{pixman_version}.tar.gz
|
|||||||
|
|
||||||
%{host_build_flags}
|
%{host_build_flags}
|
||||||
|
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_pixman}/configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--bindir=%{_bindir} \
|
--bindir=%{_bindir} \
|
||||||
--exec_prefix=%{_exec_prefix} \
|
--exec_prefix=%{_exec_prefix} \
|
||||||
|
@ -18,7 +18,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
# Source
|
# 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.
|
# Prepare the source code.
|
||||||
@ -26,18 +26,9 @@ Source0: http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
|
|||||||
%prep
|
%prep
|
||||||
build_top=$(pwd)
|
build_top=$(pwd)
|
||||||
|
|
||||||
source_dir_0="qemu-%{qemu_version}"
|
source_dir_qemu="qemu-%{qemu_version}"
|
||||||
%setup -q -n qemu-%{qemu_version}
|
%source setup qemu -q -n qemu-%{qemu_version}
|
||||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
%patch setup qemu -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}
|
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 \
|
PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
|
||||||
%{_ld_library_path}=$SYSROOT/lib \
|
%{_ld_library_path}=$SYSROOT/lib \
|
||||||
LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib" \
|
LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib" \
|
||||||
../${source_dir_0}/configure \
|
../${source_dir_qemu}/configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
${CROSS_PREFIX_OPTION} \
|
${CROSS_PREFIX_OPTION} \
|
||||||
--make=%{__make} \
|
--make=%{__make} \
|
||||||
|
@ -41,6 +41,7 @@ try:
|
|||||||
import log
|
import log
|
||||||
import options
|
import options
|
||||||
import path
|
import path
|
||||||
|
import sources
|
||||||
import version
|
import version
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print 'abort: user terminated'
|
print 'abort: user terminated'
|
||||||
@ -131,46 +132,128 @@ class build:
|
|||||||
if not self.opts.dry_run():
|
if not self.opts.dry_run():
|
||||||
path.mkdir(mkpath)
|
path.mkdir(mkpath)
|
||||||
|
|
||||||
def source(self, package, source_tag):
|
def canadian_cross(self):
|
||||||
#
|
_host = self.config.expand('%{_host}')
|
||||||
# Scan the sources found in the config file for the one we are
|
_build = self.config.expand('%{_build}')
|
||||||
# after. Infos or tags are lists. Merge in any macro defined
|
_target = self.config.expand('%{_target}')
|
||||||
# sources as these may be overridden by user loaded macros.
|
return self.config.defined('%{allow_cxc}') and \
|
||||||
#
|
_host != _build and _host != _target
|
||||||
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):
|
def source(self, name):
|
||||||
#
|
#
|
||||||
# Scan the patches found in the config file for the one we are
|
# Return the list of sources. Merge in any macro defined sources as
|
||||||
# after. Infos or tags are lists.
|
# these may be overridden by user loaded macros.
|
||||||
#
|
#
|
||||||
patches = package.patches()
|
_map = 'source-%s' % (name)
|
||||||
url = None
|
src_keys = self.macros.map_keys(_map)
|
||||||
for p in patches:
|
if len(src_keys) == 0:
|
||||||
if args[0][1:].lower() == p:
|
raise error.general('no source set: %s (%s)' % (name, _map))
|
||||||
url = patches[p][0]
|
srcs = []
|
||||||
break
|
for s in src_keys:
|
||||||
if url is None:
|
sm = self.macros.get(s, globals = False, maps = _map)
|
||||||
raise error.general('patch tag not found: %s' % (args[0]))
|
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_before_chdir = True
|
||||||
|
delete_before_unpack = True
|
||||||
|
create_dir = False
|
||||||
|
deleted_dir = False
|
||||||
|
created_dir = False
|
||||||
|
changed_dir = False
|
||||||
|
opt_name = None
|
||||||
|
for o in opts:
|
||||||
|
if o[0] == '-q':
|
||||||
|
quiet = True
|
||||||
|
elif o[0] == '-D':
|
||||||
|
delete_before_unpack = False
|
||||||
|
elif o[0] == '-c':
|
||||||
|
create_dir = True
|
||||||
|
elif o[0] == '-n':
|
||||||
|
opt_name = o[1]
|
||||||
|
elif o[0] == '-b':
|
||||||
|
unpack_before_chdir = True
|
||||||
|
elif o[0] == '-a':
|
||||||
|
unpack_before_chdir = False
|
||||||
|
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.
|
# Parse the URL first in the source builder's patch directory.
|
||||||
#
|
#
|
||||||
@ -185,78 +268,9 @@ class build:
|
|||||||
patch['script'] = patch['compressed'] + ' ' + patch['local']
|
patch['script'] = patch['compressed'] + ' ' + patch['local']
|
||||||
else:
|
else:
|
||||||
patch['script'] = '%{__cat} ' + patch['local']
|
patch['script'] = '%{__cat} ' + patch['local']
|
||||||
patch['script'] += ' | %{__patch} ' + ' '.join(args[1:])
|
patch['script'] += ' | %%{__patch} %s' % (opts)
|
||||||
self.script.append(self.config.expand(patch['script']))
|
self.script.append(self.config.expand(patch['script']))
|
||||||
|
|
||||||
def canadian_cross(self):
|
|
||||||
_host = self.config.expand('%{_host}')
|
|
||||||
_build = self.config.expand('%{_build}')
|
|
||||||
_target = self.config.expand('%{_target}')
|
|
||||||
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
|
|
||||||
quiet = False
|
|
||||||
unpack_default_source = True
|
|
||||||
unpack_before_chdir = True
|
|
||||||
delete_before_unpack = True
|
|
||||||
create_dir = False
|
|
||||||
name = None
|
|
||||||
for o in opts:
|
|
||||||
if o[0] == '-q':
|
|
||||||
quiet = True
|
|
||||||
elif o[0] == '-D':
|
|
||||||
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]
|
|
||||||
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:
|
|
||||||
self.script.append(self.config.expand('cd ' + name))
|
|
||||||
self.script.append(self.config.expand('%{__setup_post}'))
|
|
||||||
|
|
||||||
def run(self, command, shell_opts = '', cwd = None):
|
def run(self, command, shell_opts = '', cwd = None):
|
||||||
e = execute.capture_execution(log = log.default, dump = self.opts.quiet())
|
e = execute.capture_execution(log = log.default, dump = self.opts.quiet())
|
||||||
cmd = self.config.expand('%{___build_shell} -ex ' + shell_opts + ' ' + command)
|
cmd = self.config.expand('%{___build_shell} -ex ' + shell_opts + ' ' + command)
|
||||||
@ -278,8 +292,14 @@ class build:
|
|||||||
if _prep:
|
if _prep:
|
||||||
for l in _prep:
|
for l in _prep:
|
||||||
args = l.split()
|
args = l.split()
|
||||||
|
if len(args):
|
||||||
if args[0] == '%setup':
|
if args[0] == '%setup':
|
||||||
self.setup(package, args)
|
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'):
|
elif args[0].startswith('%patch'):
|
||||||
self.patch(package, args)
|
self.patch(package, args)
|
||||||
else:
|
else:
|
||||||
|
@ -37,6 +37,7 @@ try:
|
|||||||
import options
|
import options
|
||||||
import path
|
import path
|
||||||
import pkgconfig
|
import pkgconfig
|
||||||
|
import sources
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print 'user terminated'
|
print 'user terminated'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -580,6 +581,9 @@ class file:
|
|||||||
log.trace('config: %s: _select: %s %s %r' % \
|
log.trace('config: %s: _select: %s %s %r' % \
|
||||||
(self.init_name, r, ls[1], self.macros.maps()))
|
(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):
|
def _define(self, config, ls):
|
||||||
if len(ls) <= 1:
|
if len(ls) <= 1:
|
||||||
log.warning('invalid macro definition')
|
log.warning('invalid macro definition')
|
||||||
@ -796,6 +800,14 @@ class file:
|
|||||||
elif ls[0] == '%select':
|
elif ls[0] == '%select':
|
||||||
if isvalid:
|
if isvalid:
|
||||||
self._select(config, ls)
|
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':
|
elif ls[0] == '%error':
|
||||||
if isvalid:
|
if isvalid:
|
||||||
return ('data', ['%%error %s' % (self._name_line_msg(l[7:]))])
|
return ('data', ['%%error %s' % (self._name_line_msg(l[7:]))])
|
||||||
|
@ -40,12 +40,16 @@ def _http_parser(source, config, opts):
|
|||||||
#
|
#
|
||||||
esl = source['ext'].split('.')
|
esl = source['ext'].split('.')
|
||||||
if esl[-1:][0] == 'gz':
|
if esl[-1:][0] == 'gz':
|
||||||
|
source['compressed-type'] = 'gzip'
|
||||||
source['compressed'] = '%{__gzip} -dc'
|
source['compressed'] = '%{__gzip} -dc'
|
||||||
elif esl[-1:][0] == 'bz2':
|
elif esl[-1:][0] == 'bz2':
|
||||||
|
source['compressed-type'] = 'bzip2'
|
||||||
source['compressed'] = '%{__bzip2} -dc'
|
source['compressed'] = '%{__bzip2} -dc'
|
||||||
elif esl[-1:][0] == 'zip':
|
elif esl[-1:][0] == 'zip':
|
||||||
|
source['compressed-type'] = 'zip'
|
||||||
source['compressed'] = '%{__zip} -u'
|
source['compressed'] = '%{__zip} -u'
|
||||||
elif esl[-1:][0] == 'xz':
|
elif esl[-1:][0] == 'xz':
|
||||||
|
source['compressed-type'] = 'xz'
|
||||||
source['compressed'] = '%{__xz} -dc'
|
source['compressed'] = '%{__xz} -dc'
|
||||||
|
|
||||||
def _patchworks_parser(source, config, opts):
|
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['path'] = url[:colon + 3] + path.dirname(url[colon + 3:])
|
||||||
source['file'] = path.basename(url)
|
source['file'] = path.basename(url)
|
||||||
source['name'], source['ext'] = path.splitext(source['file'])
|
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.
|
# Get the file. Checks the local source directory first.
|
||||||
#
|
#
|
||||||
|
@ -84,7 +84,10 @@ class macros:
|
|||||||
text = ''
|
text = ''
|
||||||
for f in self.files:
|
for f in self.files:
|
||||||
text += '> %s%s' % (f, os.linesep)
|
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)
|
text += '[%s]%s' % (map, os.linesep)
|
||||||
for k in sorted(self.macros[map].keys()):
|
for k in sorted(self.macros[map].keys()):
|
||||||
d = self.macros[map][k]
|
d = self.macros[map][k]
|
||||||
@ -162,8 +165,11 @@ class macros:
|
|||||||
def __len__(self):
|
def __len__(self):
|
||||||
return len(self.keys())
|
return len(self.keys())
|
||||||
|
|
||||||
def keys(self):
|
def keys(self, globals = True):
|
||||||
|
if globals:
|
||||||
keys = self.macros['global'].keys()
|
keys = self.macros['global'].keys()
|
||||||
|
else:
|
||||||
|
keys = []
|
||||||
for rm in self.get_read_maps():
|
for rm in self.get_read_maps():
|
||||||
for mk in self.macros[rm]:
|
for mk in self.macros[rm]:
|
||||||
if self.macros[rm][mk][1] == 'undefine':
|
if self.macros[rm][mk][1] == 'undefine':
|
||||||
@ -180,9 +186,25 @@ class macros:
|
|||||||
return False
|
return False
|
||||||
return True
|
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):
|
def maps(self):
|
||||||
return self.macros.keys()
|
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):
|
def get_read_maps(self):
|
||||||
return [rm[5:] for rm in self.read_maps]
|
return [rm[5:] for rm in self.read_maps]
|
||||||
|
|
||||||
@ -348,14 +370,21 @@ class macros:
|
|||||||
raise error.general('opening macro file: %s' % \
|
raise error.general('opening macro file: %s' % \
|
||||||
(path.host(self.expand(name))))
|
(path.host(self.expand(name))))
|
||||||
|
|
||||||
def get(self, key):
|
def get(self, key, globals = True, maps = None):
|
||||||
if type(key) is not str:
|
if type(key) is not str:
|
||||||
raise TypeError('bad key type: %s' % (type(key)))
|
raise TypeError('bad key type: %s' % (type(key)))
|
||||||
key = self.key_filter(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]:
|
if key in self.macros[rm]:
|
||||||
return self.macros[rm][key]
|
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 self.macros['global'][key]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -408,10 +437,10 @@ class macros:
|
|||||||
expanded = True
|
expanded = True
|
||||||
return _str
|
return _str
|
||||||
|
|
||||||
def find(self, regex):
|
def find(self, regex, globals = True):
|
||||||
what = re.compile(regex)
|
what = re.compile(regex)
|
||||||
keys = []
|
keys = []
|
||||||
for key in self.keys():
|
for key in self.keys(globals):
|
||||||
if what.match(key):
|
if what.match(key):
|
||||||
keys += [key]
|
keys += [key]
|
||||||
return keys
|
return keys
|
||||||
@ -440,6 +469,9 @@ class macros:
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def unset_write_map(self):
|
||||||
|
self.write_map = 'global'
|
||||||
|
|
||||||
def lock_read_map(self):
|
def lock_read_map(self):
|
||||||
self.read_map_locked = True
|
self.read_map_locked = True
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ try:
|
|||||||
import options
|
import options
|
||||||
import path
|
import path
|
||||||
import reports
|
import reports
|
||||||
|
import sources
|
||||||
import version
|
import version
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print 'abort: user terminated'
|
print 'abort: user terminated'
|
||||||
@ -248,9 +249,10 @@ class buildset:
|
|||||||
self.macros.undefine(ls[1].strip())
|
self.macros.undefine(ls[1].strip())
|
||||||
elif ls[0] == '%include':
|
elif ls[0] == '%include':
|
||||||
configs += self.parse(ls[1].strip())
|
configs += self.parse(ls[1].strip())
|
||||||
else:
|
elif ls[0] == '%patch' or ls[0] == '%source':
|
||||||
raise error.general('%s:%d: invalid directive in build set files: %s' % \
|
def err(msg):
|
||||||
(self.bset, lc, l))
|
raise error.general('%s:%d: %s' % (self.bset, lc, msg))
|
||||||
|
sources.process(ls[0][1:], ls[1:], self.macros, err)
|
||||||
else:
|
else:
|
||||||
l = l.strip()
|
l = l.strip()
|
||||||
c = build.find_config(l, self.configs)
|
c = build.find_config(l, self.configs)
|
||||||
|
74
source-builder/sb/sources.py
Normal file
74
source-builder/sb/sources.py
Normal 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]))
|
@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
major = 0
|
major = 0
|
||||||
minor = 2
|
minor = 3
|
||||||
revision = 0
|
revision = 0
|
||||||
|
|
||||||
def str():
|
def str():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user