Changeset 9a15c40 in rtems-source-builder


Ignore:
Timestamp:
May 13, 2014, 1:26:09 PM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
1b29191
Parents:
e074e75
Message:

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.

Files:
1 added
3 deleted
67 edited

Legend:

Unmodified
Added
Removed
  • rtems/config/4.10/rtems-bfin.bset

    re074e75 r9a15c40  
    2121# GDB simulator fix for the sed command.
    2222#
    23 %define rtems_gdb_patch2 %{rtems_gdb_patches}/bfin/gdb-7.3.1-bfin-sim-fix-sed-20130319.diff
     23%patch add gdb %{rtems_gdb_patches}/bfin/gdb-7.3.1-bfin-sim-fix-sed-20130319.diff
    2424
    2525#
  • rtems/config/4.11/rtems-lm32.bset

    re074e75 r9a15c40  
    2121# Fix the simulator UART interface.
    2222#
    23 %define rtems_gdb_patch3 %{rtems_gdb_patches}/lm32/gdb-sim-lm32uart.diff
     23%patch add gdb %{rtems_gdb_patches}/lm32/gdb-sim-lm32uart.diff
    2424
    2525#
  • rtems/config/4.11/rtems-microblaze.bset

    re074e75 r9a15c40  
    2121# GCC 4.7.2 Microblaze Patch
    2222#
    23 %define rtems_gcc_patch2 %{rtems_gcc_patches}/microblaze/gcc-4.7.2-microblaze-ldscript-2.diff
     23%patch add gcc %{rtems_gcc_patches}/microblaze/gcc-4.7.2-microblaze-ldscript-2.diff
    2424
    2525#
    2626# GCC 4.8.2 Microblaze Patch for libgcc.
    2727#
    28 %define rtems_gcc_patch3 %{rtems_gcc_patches}/microblaze/rtems-gcc-microblaze-libgcc-20131017.diff
     28%patch add gcc %{rtems_gcc_patches}/microblaze/rtems-gcc-microblaze-libgcc-20131017.diff
    2929
    3030#
  • rtems/config/4.11/rtems-sparc.bset

    re074e75 r9a15c40  
    2121# GDB patche
    2222#
    23 %define rtems_gdb_patch1 %{rtems_gdb_patches}/sparc/gdb-7.6.2-sis-output-nouartrx.diff
     23%patch add gdb %{rtems_gdb_patches}/sparc/gdb-7.6.2-sis-output-nouartrx.diff
    2424
    2525#
  • rtems/config/4.11/rtems-v850.bset

    re074e75 r9a15c40  
    2121# GCC 4.8 V850 Patch
    2222#
    23 %define rtems_gcc_patch3 %{rtems_gcc_patches}/v850/gcc-4.8.2-rtems4.11-20140349.diff
     23%patch add gcc %{rtems_gcc_patches}/v850/gcc-4.8.2-rtems4.11-20140349.diff
    2424
    2525#
  • rtems/config/tools/rtems-binutils-2.20.1-1.cfg

    re074e75 r9a15c40  
    88%define binutils_version 2.20.1
    99
    10 Patch0: %{rtems_binutils_patches}/binutils-2.20.1-rtems4.10-20100826.diff
     10%patch add binutils %{rtems_binutils_patches}/binutils-2.20.1-rtems4.10-20100826.diff
    1111%ifos win32 mingw ming32 cygwin
    12  Patch1: %{rtems_binutils_patches}/cygwin/binutils-2.20.1-cygwin-w64-20130324.diff
     12 %patch add binutils %{rtems_binutils_patches}/cygwin/binutils-2.20.1-cygwin-w64-20130324.diff
    1313%endif
    14 
    15 #
    16 # RTEMS Build Set patches.
    17 #
    18 %include rtems-binutils-patches.cfg
    1914
    2015#
  • rtems/config/tools/rtems-binutils-2.22-1.cfg

    re074e75 r9a15c40  
    88%define binutils_version 2.22
    99
    10 Patch0: %{rtems_binutils_patches}/binutils-2.22-rtems4.11-20120427.diff
    11 %include rtems-binutils-patches.cfg
     10%patch add binutils %{rtems_binutils_patches}/binutils-2.22-rtems4.11-20120427.diff
    1211
    1312#
  • rtems/config/tools/rtems-binutils-2.23.1-1.cfg

    re074e75 r9a15c40  
    1616
    1717#
    18 # Include the RTEMS specific patches
    19 #
    20 %include rtems-binutils-patches.cfg
    21 
    22 #
    2318# The binutils build instructions. We use 2.xx Release 1.
    2419#
  • rtems/config/tools/rtems-binutils-2.23.2-1.cfg

    re074e75 r9a15c40  
    1616
    1717#
    18 # Include the RTEMS specific patches
    19 #
    20 %include rtems-binutils-patches.cfg
    21 
    22 #
    2318# The binutils build instructions. We use 2.xx Release 1.
    2419#
  • rtems/config/tools/rtems-binutils-2.24-1.cfg

    re074e75 r9a15c40  
    1616
    1717#
    18 # Include the RTEMS specific patches
    19 #
    20 %include rtems-binutils-patches.cfg
    21 
    22 #
    2318# The binutils build instructions. We use 2.xx Release 1.
    2419#
  • rtems/config/tools/rtems-gcc-4.3.2-newlib-1.16.0-1.cfg

    re074e75 r9a15c40  
    1919# The RTEMS 4.9 patches
    2020#
    21 Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
    22 Patch0:  %{rtems_gcc_patches}/gcc-core-4.3.2-rtems4.9-20090825.diff
    23 Source1: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.bz2
    24 Patch10: %{rtems_newlib_patches}/newlib-1.16.0-rtems4.9-20090324.diff
    25 
    26 #
    27 # Generic RTEMS patch handling.
    28 #
    29 %include rtems-gcc-patches.cfg
     21%source set gcc ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
     22%patch  add gcc %{rtems_gcc_patches}/gcc-core-4.3.2-rtems4.9-20090825.diff
     23%source add gcc ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.bz2
     24%patch  add gcc %{rtems_newlib_patches}/newlib-1.16.0-rtems4.9-20090324.diff
    3025
    3126#
  • rtems/config/tools/rtems-gcc-4.4.7-newlib-1.18.0-1.cfg

    re074e75 r9a15c40  
    2727# The RTEMS 4.10 patches
    2828#
    29 Patch0: %{rtems_gcc_patches}/gcc-core-4.4.7-rtems4.10-20120314.diff
     29%patch add gcc %{rtems_gcc_patches}/gcc-core-4.4.7-rtems4.10-20120314.diff
    3030%if %{enable_cxx}
    31 Patch1: %{rtems_gcc_patches}/gcc-g++-4.4.7-rtems4.10-20120314.diff
     31 %patch add gcc %{rtems_gcc_patches}/gcc-g++-4.4.7-rtems4.10-20120314.diff
    3232%endif
    33 Patch10: %{rtems_newlib_patches}/newlib-1.18.0-rtems4.10-20110518.diff
    34 %include rtems-gcc-patches.cfg
     33%patch add newlib %{rtems_newlib_patches}/newlib-1.18.0-rtems4.10-20110518.diff
    3534
    3635#
  • rtems/config/tools/rtems-gcc-4.5.3-newlib-2.0.0-1.cfg

    re074e75 r9a15c40  
    1919# Libiberty strsignal fix
    2020#
    21 Patch0: %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
    22 %include rtems-gcc-patches.cfg
     21%patch add gcc %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
    2322
    2423#
  • rtems/config/tools/rtems-gcc-4.5.3-newlib-2.1.0-1.cfg

    re074e75 r9a15c40  
    1919# Libiberty strsignal fix
    2020#
    21 Patch0: %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
    22 %include rtems-gcc-patches.cfg
     21%patch add gcc %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
    2322
    2423#
  • rtems/config/tools/rtems-gcc-4.6.3-newlib-1.20.0-1.cfg

    re074e75 r9a15c40  
    3535# The RTEMS 4.11 patches
    3636#
    37 Patch0: gcc-core-4.6.3-rtems4.11-20120303.diff
    38 Patch10: newlib-1.20.0-rtems4.11-20121011.diff
     37%patch add gcc gcc-core-4.6.3-rtems4.11-20120303.diff
     38%patch add newlib newlib-1.20.0-rtems4.11-20121011.diff
    3939
    4040#
  • rtems/config/tools/rtems-gcc-4.7.2-newlib-1.20.0-1.cfg

    re074e75 r9a15c40  
    4444# The RTEMS 4.11 patches
    4545#
    46 Patch0:  %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
    47 Patch10: %{rtems_newlib_patches}/newlib-1.20.0-rtems4.11-20121011.diff
    48 %include rtems-gcc-patches.cfg
     46%patch add gcc %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
     47%patch add newlib %{rtems_newlib_patches}/newlib-1.20.0-rtems4.11-20121011.diff
    4948
    5049#
  • rtems/config/tools/rtems-gcc-4.7.2-newlib-2.0.0-1.cfg

    re074e75 r9a15c40  
    2020# The RTEMS 4.11 patches
    2121#
    22 Patch0: %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
    23 %include rtems-gcc-patches.cfg
     22%patch add gcc %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
    2423
    2524# Incompatible with Texinfo 5
  • rtems/config/tools/rtems-gcc-4.7.3-newlib-2.0.0-1.cfg

    re074e75 r9a15c40  
    2020# The RTEMS 4.11 patches
    2121#
    22 Patch0: %{rtems_gcc_patches}/gcc-4.7.3-rtems4.11-20130414.diff
    23 %include rtems-gcc-patches.cfg
     22%patch add gcc %{rtems_gcc_patches}/gcc-4.7.3-rtems4.11-20130414.diff
    2423
    2524# Incompatible with Texinfo 5
  • rtems/config/tools/rtems-gcc-4.8-ss-newlib-2.0.0-1.cfg

    re074e75 r9a15c40  
    1919# The RTEMS 4.11 patches
    2020#
    21 Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/%{gcc_version}/gcc-%{gcc_version}.tar.bz2
     21%source set gcc ftp://gcc.gnu.org/pub/gcc/snapshots/%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    2222
    2323#
  • rtems/config/tools/rtems-gcc-4.8.0-newlib-cvs-1.cfg

    re074e75 r9a15c40  
    2525# Newlib is from CVS.
    2626#
    27 Source10: cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
     27%source set newlib cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
    2828
    2929#
    3030# Joel's stack_t patch.
    3131#
    32 %define rtems_gcc_patch11      %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
    33 %define rtems_gcc_patch11_opts -p0
     32%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
    3433
    3534#
    36 #
    37 # Manage RTEMS patches
    38 #
    39 %include rtems-gcc-patches.cfg
    40 
    4135# The gcc/newlib build instructions. We use 4.8 Release 1.
    4236#
  • rtems/config/tools/rtems-gcc-4.8.1-newlib-cvs-1.cfg

    re074e75 r9a15c40  
    2828# Newlib is from CVS.
    2929#
    30 Source10: cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
     30%source set newlib cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
    3131
    3232#
    3333# Sebastian's atexit patch.
    3434#
    35 %define rtems_gcc_patch1 %{rtems_gcc_patches}/gcc-4.8.1-rtems4.11-20130709.diff
     35%patch add gcc %{rtems_gcc_patches}/gcc-4.8.1-rtems4.11-20130709.diff
    3636
    3737#
    3838# Chris's patch to use the POSIX thread model for C++.
    3939#
    40 %define rtems_gcc_patch2 %{rtems_gcc_patches}/gcc-rtems-thread-model-posix-1.diff
     40%patch add gcc %{rtems_gcc_patches}/gcc-rtems-thread-model-posix-1.diff
    4141
    4242#
    4343# Joel's stack_t patch.
    4444#
    45 %define rtems_gcc_patch11      %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
    46 %define rtems_gcc_patch11_opts -p0
     45%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
    4746
    4847#
    49 #
    50 # Manage RTEMS patches
    51 #
    52 %include rtems-gcc-patches.cfg
    53 
    5448# The gcc/newlib build instructions. We use 4.8 Release 1.
    5549#
  • rtems/config/tools/rtems-gcc-4.8.2-newlib-2.1.0-1.cfg

    re074e75 r9a15c40  
    11#
    2 # GCC 4.8.2., Newlib CVS
     2# GCC 4.8.2., Newlib 2.1.0
    33#
    44
     
    2323# Joel's stack_t patch.
    2424#
    25 %define rtems_gcc_patch11      %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
    26 %define rtems_gcc_patch11_opts -p0
    27 
    28 #
    29 #
    30 # Manage RTEMS patches
    31 #
    32 %include rtems-gcc-patches.cfg
     25%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
    3326
    3427# The gcc/newlib build instructions. We use 4.8 Release 1.
  • rtems/config/tools/rtems-gcc-4.8.2-newlib-cvs-1.cfg

    re074e75 r9a15c40  
    2323# Newlib is from CVS.
    2424#
    25 Source10: cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
     25%source set newlib cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src?date=%{newlib_version}?reset
    2626
    2727#
    2828# Chris's patch to use the POSIX thread model for C++.
    2929#
    30 %define rtems_gcc_patch2 %{rtems_gcc_patches}/gcc-rtems-thread-model-posix-1.diff
     30%patch add gcc %{rtems_gcc_patches}/gcc-rtems-thread-model-posix-1.diff
    3131
    3232#
    3333# Joel's stack_t patch.
    3434#
    35 %define rtems_gcc_patch11      %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
    36 %define rtems_gcc_patch11_opts -p0
     35%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
    3736
    3837#
    39 #
    40 # Manage RTEMS patches
    41 #
    42 %include rtems-gcc-patches.cfg
    43 
    4438# The gcc/newlib build instructions. We use 4.8 Release 1.
    4539#
  • rtems/config/tools/rtems-gcc-4.9.0-newlib-2.1.0-1.cfg

    re074e75 r9a15c40  
    2323# Joel's stack_t patch.
    2424#
    25 %define rtems_gcc_patch11      %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
    26 %define rtems_gcc_patch11_opts -p0
    27 
    28 #
    29 #
    30 # Manage RTEMS patches
    31 #
    32 %include rtems-gcc-patches.cfg
     25%patch add newlib -p0 %{rtems_newlib_patches}/newlib-sys-signal-20130532.diff
    3326
    3427#
  • rtems/config/tools/rtems-gdb-6.8-1.cfg

    re074e75 r9a15c40  
    1111# RTEMS Build Set patches.
    1212#
    13 Source0: http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.bz2
    14 Patch0:  %{rtems_gdb_patches}/gdb-6.8-rtems4.9-20091111.diff
    15 
    16 %include rtems-gdb-patches.cfg
     13%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.bz2
     14%patch  add gdb %{rtems_gdb_patches}/gdb-6.8-rtems4.9-20091111.diff
    1715
    1816#
  • rtems/config/tools/rtems-gdb-7.3.1-1.cfg

    re074e75 r9a15c40  
    88%define gdb_version 7.3.1
    99
    10 Patch0: %{rtems_gdb_patches}/gdb-7.3.1-rtems4.10-20120918.diff
    11 
    12 #
    13 # RTEMS Build Set patches.
    14 #
    15 %include rtems-gdb-patches.cfg
     10%patch add gdb %{rtems_gdb_patches}/gdb-7.3.1-rtems4.10-20120918.diff
    1611
    1712#
  • rtems/config/tools/rtems-gdb-7.5-1.cfg

    re074e75 r9a15c40  
    88%define gdb_version 7.5
    99
    10 Patch0: %{rtems_gdb_patches}/gdb-7.5-rtems4.11-20121003.diff
    11 %include rtems-gdb-patches.cfg
     10%patch add gdb %{rtems_gdb_patches}/gdb-7.5-rtems4.11-20121003.diff
    1211
    1312#
  • rtems/config/tools/rtems-gdb-7.5.1-1.cfg

    re074e75 r9a15c40  
    99
    1010#
    11 # RTEMS Build Set patches.
    12 #
    13 %include rtems-gdb-patches.cfg
    14 
    15 #
    1611# The gdb build instructions. We use 7.xx Release 1.
    1712#
  • rtems/config/tools/rtems-gdb-7.6-1.cfg

    re074e75 r9a15c40  
    99
    1010#
    11 # RTEMS Build Set patches.
    12 #
    13 %include rtems-gdb-patches.cfg
    14 
    15 #
    1611# The gdb build instructions. We use 7.xx Release 1.
    1712#
  • rtems/config/tools/rtems-gdb-7.6.1-1.cfg

    re074e75 r9a15c40  
    99
    1010#
    11 # RTEMS Build Set patches.
    12 #
    13 %include rtems-gdb-patches.cfg
    14 
    15 #
    1611# The gdb build instructions. We use 7.xx Release 1.
    1712#
  • rtems/config/tools/rtems-gdb-7.6.2-1.cfg

    re074e75 r9a15c40  
    88%define gdb_version 7.6.2
    99
    10 #
    11 # RTEMS Build Set patches.
    12 #
    13 %include rtems-gdb-patches.cfg
    14 
    1510%if %{_build_os} == freebsd
    16 %define patch5      %{rtems_gdb_patches}/patch-gdb-python-python-config.py
    17 %define patch5_opts -p0
     11 %patch add gdb -p0 %{rtems_gdb_patches}/patch-gdb-python-python-config.py
    1812%endif
    1913
  • rtems/config/tools/rtems-gdb-7.7-1.cfg

    re074e75 r9a15c40  
    99
    1010#
    11 # RTEMS Build Set patches.
    12 #
    13 %include rtems-gdb-patches.cfg
    14 
    15 #
    1611# Clean up the sim-arange inline code so it builds.
    1712#
    18 %define patch1 %{rtems_gdb_patches}/gdb-sim-arange-inline.diff
    19 %define patch2 %{rtems_gdb_patches}/gdb-sim-cgen-inline.diff
     13%patch add gdb %{rtems_gdb_patches}/gdb-sim-arange-inline.diff
     14%patch add gdb %{rtems_gdb_patches}/gdb-sim-cgen-inline.diff
    2015
    2116%if %{_build_os} == freebsd
    22 %define patch5      %{rtems_gdb_patches}/patch-gdb-python-python-config.py
    23 %define patch5_opts -p0
     17 %patch add gdb -p0 %{rtems_gdb_patches}/patch-gdb-python-python-config.py
    2418%endif
    2519
  • rtems/config/tools/rtems-kernel-4-1.cfg

    re074e75 r9a15c40  
    1717# Source
    1818#
    19 %ifn %{defined Source0}
    20  Source0: http://ftp.rtems.org/ftp/pub/rtems/%{rtems_kernel_version}/rtems-%{rtems_kernel_version}.tar.bz2
    21 %endif
     19%source set rtems http://ftp.rtems.org/ftp/pub/rtems/%{rtems_kernel_version}/rtems-%{rtems_kernel_version}.tar.bz2
    2220
    2321#
     
    6159#
    6260%prep
    63   source_dir_0="rtems-%{rtems_kernel_version}"
    64   %setup -q -c -n %{name}-%{version}
    65   cd ${source_dir_0}
    66   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    67   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    68   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    69   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    70   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    71   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    72   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    73   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    74   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    75   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     61  source_dir_rtems="rtems-%{rtems_kernel_version}"
     62  %source setup rtems -q -c -n %{name}-%{version}
     63  cd ${source_dir_rtems}
     64  %patch setup rtems -p1
    7665%if %{rtems_bootstrap}
    7766  %if %{defined _internal_autotools_path}
     
    9483  cd ${build_dir}
    9584
    96   ../${source_dir_0}/configure \
     85  ../${source_dir_rtems}/configure \
    9786    --build=%{_build} --host=%{_host} \
    9887    --target=%{_target} \
  • rtems/config/tools/rtems-kernel-4.11.cfg

    re074e75 r9a15c40  
    3939 # want.
    4040 #
    41  Source0: git://git.rtems.org/rtems.git?reset=hard?pull
     41 %source set rtems git://git.rtems.org/rtems.git?reset=hard?pull
    4242
    4343 #
  • rtems/config/tools/rtems-nios2-binutils-2.20-1.cfg

    re074e75 r9a15c40  
    1616# Source
    1717#
    18 Source0: http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-binutils-2.20.tar.bz2
    19 Patch0: %{rtems_binutils_patches}/nios2/nios2-binutils-2.20-rtems-20110703.diff
     18%source set binutils http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-binutils-2.20.tar.bz2
     19%patch  add binutils %{rtems_binutils_patches}/nios2/nios2-binutils-2.20-rtems-20110703.diff
    2020
    2121#
  • rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg

    re074e75 r9a15c40  
    2121# The RTEMS 4.11 patches
    2222#
    23 Patch0: %{rtems_gcc_patches}/nios2/nios2-gcc-4.1-rtems-20110818.diff
    24 Patch10: %{rtems_newlib_patches}/nios2/nios2-newlib-1.19.0-rtems-20110720.diff
     23%patch add gcc %{rtems_gcc_patches}/nios2/nios2-gcc-4.1-rtems-20110818.diff
     24%patch add newlib %{rtems_newlib_patches}/nios2/nios2-newlib-1.19.0-rtems-20110720.diff
    2525
    2626Name:      %{_target}-gcc-%{gcc_version}-newlib-%{newlib_version}-%{release}
     
    4242# GCC core and G++
    4343#
    44 Source0: http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-gcc-4.1.tar.bz2
     44%source set gcc http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-gcc-4.1.tar.bz2
    4545
    4646#
    4747# Newlib
    4848#
    49 Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
     49%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    5050
    5151#
     
    5858#
    5959%prep
     60  # save the build top directory and cd back to it rather than
     61  # using 'cd ..' because some shells change $PWD to a symlink's
     62  # target location and 'cd ..' fails.
     63  build_top=$(pwd)
     64
    6065  # gcc
    61   source_dir_0="gcc-%{gcc_version}"
    62   %setup -q -c -n %{name}-%{version}
    63   cd ${source_dir_0}
    64   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    65   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    66   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    67   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    68   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    69   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    70   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    71   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    72   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    73   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
    74   cd ..
     66  source_dir_gcc="gcc-%{gcc_version}"
     67  %source setup gcc -q -c -n %{name}-%{version}
     68  cd ${source_dir_gcc}
     69  %patch setup gcc -p1
     70  cd ${build_top}
    7571
    7672  # newlib
    77   source_dir_10="newlib-%{newlib_version}"
    78   %setup -q -D -T -n %{name}-%{version} -a10
    79   cd ${source_dir_10}
    80   %{?patch10:%patch10 %{?patch10_opts:%{patch10_opts}}%{!?patch10_opts:-p1}}
    81   %{?patch11:%patch11 %{?patch11_opts:%{patch11_opts}}%{!?patch11_opts:-p1}}
    82   %{?patch12:%patch12 %{?patch12_opts:%{patch12_opts}}%{!?patch12_opts:-p1}}
    83   %{?patch13:%patch13 %{?patch13_opts:%{patch13_opts}}%{!?patch13_opts:-p1}}
    84   %{?patch14:%patch14 %{?patch14_opts:%{patch14_opts}}%{!?patch14_opts:-p1}}
    85   %{?patch15:%patch15 %{?patch15_opts:%{patch15_opts}}%{!?patch15_opts:-p1}}
    86   %{?patch16:%patch16 %{?patch16_opts:%{patch16_opts}}%{!?patch16_opts:-p1}}
    87   %{?patch17:%patch17 %{?patch17_opts:%{patch17_opts}}%{!?patch17_opts:-p1}}
    88   %{?patch18:%patch18 %{?patch18_opts:%{patch18_opts}}%{!?patch18_opts:-p1}}
    89   %{?patch19:%patch19 %{?patch19_opts:%{patch19_opts}}%{!?patch19_opts:-p1}}
    90   cd ..
     73  source_dir_newlib="newlib-%{newlib_version}"
     74  %source setup newlib -q -D -n %{name}-%{version}
     75  cd ${source_dir_newlib}
     76  %patch setup newlib -p1
     77  cd ${build_top}
    9178
    9279  # Link newlib into the gcc source tree
    93   %{__rmfile} ${source_dir_0}/newlib
    94   %{__ln_s} $PWD/${source_dir_10}/newlib ${source_dir_0}/newlib
     80  %{__rmfile} ${source_dir_gcc}/newlib
     81  %{__ln_s} $PWD/${source_dir_newlib}/newlib ${source_dir_gcc}/newlib
    9582
    9683  echo "%{gcc_version_message}" > gcc-%{gcc_version}/gcc/DEV-PHASE
    9784
    9885  # Fix timestamps
    99   cd ${source_dir_0}
     86  cd ${source_dir_gcc}
    10087  contrib/gcc_update --touch
    101   cd ..
     88  cd ${build_top}
    10289
    10390%build
     
    114101  %{host_build_flags}
    115102
    116   ../${source_dir_0}/configure \
     103  ../${source_dir_gcc}/configure \
    117104    --prefix=%{_prefix} \
    118105    --bindir=%{_bindir} \
     
    143130    # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
    144131    mkdir -p gcc/include
    145     cp ../${source_dir_0}/gcc/gsyslimits.h gcc/include/syslimits.h
     132    cp ../${source_dir_gcc}/gcc/gsyslimits.h gcc/include/syslimits.h
    146133  fi
    147134
     
    190177
    191178  # Clean the symlinks away incase the source is a repo
    192   %{__rmfile} ${source_dir_0}/newlib
     179  %{__rmfile} ${source_dir_gcc}/newlib
  • rtems/config/tools/rtems-nios2-gdb-7.0-1.cfg

    re074e75 r9a15c40  
    1212%define without_python
    1313
    14 Source0: http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-gdb-7.0.tar.bz2
     14%source set gdb http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-gdb-7.0.tar.bz2
    1515
    1616#
  • source-builder/config/autoconf-2-1.cfg

    re074e75 r9a15c40  
    2222# Source
    2323#
    24 Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
    25 VersionControl0: git clone git://git.sv.gnu.org/autoconf
     24%source set autoconf ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
    2625
    2726#
     
    3130  build_top=$(pwd)
    3231
    33   %setup -q -n autoconf-%{autoconf_version}
    34   %{?patch0:%patch0 -p1}
     32  %source setup autoconf -q -n autoconf-%{autoconf_version}
     33  %patch setup autoconf -p1
    3534
    3635  cd ${build_top}
  • source-builder/config/automake-1-1.cfg

    re074e75 r9a15c40  
    2222# Source
    2323#
    24 Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz
    25 VersionControl0: git clone git://git.savannah.gnu.org/automake.git
     24%source set automake ftp://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz
    2625
    2726#
     
    3130  build_top=$(pwd)
    3231
    33   %setup -q -n automake-%{automake_version}
    34   %{?patch0:%patch0 -p1}
     32  %source setup automake -q -n automake-%{automake_version}
     33  %patch setup automake -p1
    3534
    3635  cd ${build_top}
  • source-builder/config/binutils-2-1.cfg

    re074e75 r9a15c40  
    3030# Source
    3131#
    32 %ifn %{defined Source0}
    33  Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2
    34  VersionControl0: cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src co binutils
    35 %endif
     32%source set binutils ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2
    3633
    3734#
     
    4138  build_top=$(pwd)
    4239
    43   source_dir_0="binutils-%{binutils_version}"
    44   %setup -q -n binutils-%{binutils_version}
    45   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    46   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    47   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    48   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    49   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    50   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    51   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    52   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    53   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    54   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     40  source_dir_binutils="binutils-%{binutils_version}"
     41  %source setup binutils -q -n binutils-%{binutils_version}
     42  %patch setup binutils -p1
    5543
    5644  cd ${build_top}
     
    6654  %{host_build_flags}
    6755
    68   ../${source_dir_0}/configure \
     56  ../${source_dir_binutils}/configure \
    6957    --build=%{_build} --host=%{_host} \
    7058    --target=%{_target} \
  • source-builder/config/dtc-1-1.cfg

    re074e75 r9a15c40  
    1919# Source
    2020#
    21 Source0: http://www.jdl.com/software/dtc-v%{dtc_version}.tgz
     21%source set dtc http://www.jdl.com/software/dtc-v%{dtc_version}.tgz
    2222
    2323#
     
    2727  build_top=$(pwd)
    2828
    29   %setup -q -n dtc-v%{dtc_version}
    30   %{?patch0:%patch0 -p1}
    31   %{?patch1:%patch1 -p1}
    32   %{?patch2:%patch2 -p1}
    33   %{?patch3:%patch3 -p1}
    34   %{?patch4:%patch4 -p1}
    35   %{?patch5:%patch5 -p1}
    36   %{?patch6:%patch6 -p1}
    37   %{?patch7:%patch7 -p1}
     29  %source setup dtc -q -n dtc-v%{dtc_version}
     30  %patch setup dtc -p1
    3831
    3932  cd ${build_top}
  • source-builder/config/expat-2-1.cfg

    re074e75 r9a15c40  
    1919# Source
    2020#
    21 Source0: http://downloads.sourceforge.net/project/expat/expat/%{expat_version}/expat-%{expat_version}.tar.gz
     21%source set expat http://downloads.sourceforge.net/project/expat/expat/%{expat_version}/expat-%{expat_version}.tar.gz
    2222
    2323#
     
    2727  build_top=$(pwd)
    2828
    29   %setup -q -n expat-%{expat_version}
    30   %{?patch0:%patch0 -p1}
     29  %source setup expat -q -n expat-%{expat_version}
     30  %patch setup expat -p1
    3131
    3232  cd ${build_top}
  • source-builder/config/gcc-4.3-1.cfg

    re074e75 r9a15c40  
    1212# GCC core and G++
    1313#
    14 %ifn %{defined Source0}
    15  Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    16  VersionContro0: git clone git://gcc.gnu.org/git/gcc.git
    17 %endif
     14%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    1815
    1916#
    2017# Newlib
    2118#
    22 Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    23 VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
     19%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    2420
    2521#
    2622# Packages GCC requires
    2723#
    28 Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
    29 Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
    30 Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
     24%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
     25%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
     26%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
    3127
    3228#
  • source-builder/config/gcc-4.4-1.cfg

    re074e75 r9a15c40  
    1212# GCC core and G++
    1313#
    14 Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
    15 VersionContro0: git clone git://gcc.gnu.org/git/gcc.git
     14%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
    1615
    1716%if %{enable_cxx}
    18 Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz
     17 %source add gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz
    1918%endif
    2019
     
    2221# Newlib
    2322#
    24 Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    25 VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
     23%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    2624
    2725#
    2826# Packages GCC requires
    2927#
    30 Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
    31 Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
    32 Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
     28%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
     29%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
     30%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
    3331
    3432#
  • source-builder/config/gcc-4.5-1.cfg

    re074e75 r9a15c40  
    1212# GCC core and G++
    1313#
    14 %ifn %{defined Source0}
    15  Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    16 %endif
     14%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    1715
    1816#
    1917# Newlib
    2018#
    21 %ifn %{defined Source10}
    22  Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    23 %endif
     19%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    2420
    2521#
    2622# Packages GCC requires
    2723#
    28 %ifn %{defined Source20}
    29  Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
    30 %endif
    31 %ifn %{defined Source21}
    32  Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
    33 %endif
    34 %ifn %{defined Source22}
    35  Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
    36 %endif
     24%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
     25%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
     26%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
    3727
    3828#
  • source-builder/config/gcc-4.6-1.cfg

    re074e75 r9a15c40  
    1212# GCC core and G++
    1313#
    14 Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
    15 VersionContro0: git clone git://gcc.gnu.org/git/gcc.git
     14%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2
    1615
    1716%if %{enable_cxx}
    18 Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz
     17 %source add gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz
    1918%endif
    2019
     
    2221# Newlib
    2322#
    24 Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    25 VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
     23%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    2624
    2725#
    2826# Packages GCC requires
    2927#
    30 Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
    31 Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
    32 Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
     28%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
     29%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
     30%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
    3331
    3432#
  • source-builder/config/gcc-4.7-1.cfg

    re074e75 r9a15c40  
    2121# GCC core and G++
    2222#
    23 %ifn %{defined Source0}
    24  Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    25  VersionContro0: git clone git://gcc.gnu.org/git/gcc.git
    26 %endif
     23%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    2724
    2825#
    2926# Newlib
    3027#
    31 Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    32 VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
     28%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    3329
    3430#
    3531# Packages GCC requires
    3632#
    37 Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
    38 Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
    39 Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
     33%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
     34%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
     35%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
    4036
    4137#
  • source-builder/config/gcc-4.8-1.cfg

    re074e75 r9a15c40  
    1212# GCC core and G++
    1313#
    14 %ifn %{defined Source0}
    15  Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    16 %endif
     14%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    1715
    1816#
    1917# Newlib
    2018#
    21 %ifn %{defined Source10}
    22  Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    23 %endif
     19%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    2420
    2521#
    2622# Packages GCC requires
    2723#
    28 %ifn %{defined Source20}
    29  Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
    30 %endif
    31 %ifn %{defined Source21}
    32  Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
    33 %endif
    34 %ifn %{defined Source22}
    35  Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
    36 %endif
     24%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
     25%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
     26%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
    3727
    3828#
  • source-builder/config/gcc-4.9-1.cfg

    re074e75 r9a15c40  
    1212# GCC core and G++
    1313#
    14 %ifn %{defined Source0}
    15  Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    16 %endif
     14%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    1715
    1816#
    1917# Newlib
    2018#
    21 %ifn %{defined Source10}
    22  Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    23 %endif
     19%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
    2420
    2521#
    2622# Packages GCC requires
    2723#
    28 %ifn %{defined Source20}
    29  Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
    30 %endif
    31 %ifn %{defined Source21}
    32  Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
    33 %endif
    34 %ifn %{defined Source22}
    35  Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
    36 %endif
     24%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
     25%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
     26%source set gmp ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
    3727
    3828#
  • source-builder/config/gcc-common-1.cfg

    re074e75 r9a15c40  
    1111%error No GCC Version message defined.
    1212%endif
    13 
    14 #
    15 # Select Snapshot Macro Maps if they have been added.
    16 #
    17 %select gcc-snapshot
    18 %select newlib-snapshot
    19 %select mpfr-snapshot
    20 %select mpc-snapshot
    21 %select gmp-snapshot
    2213
    2314#
     
    5142
    5243  # gcc and optional the g++ core if separate packages
    53   source_dir_0="gcc-%{gcc_version}"
    54   %setup -q -n gcc-%{gcc_version}
    55   %{?source1:%setup -q -D -T -n gcc-%{gcc_version} -b1}
    56   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    57   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    58   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    59   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    60   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    61   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    62   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    63   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    64   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    65   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     44  source_dir_gcc="gcc-%{gcc_version}"
     45  %source setup gcc -q -n gcc-%{gcc_version}
     46  %patch setup gcc -p1
    6647  cd ${build_top}
    6748
    6849  # newlib
    69   source_dir_10="newlib-%{newlib_version}"
    70   %setup -q -D -T -n newlib-%{newlib_version} -b10
    71   %{?patch10:%patch10 %{?patch10_opts:%{patch10_opts}}%{!?patch10_opts:-p1}}
    72   %{?patch11:%patch11 %{?patch11_opts:%{patch11_opts}}%{!?patch11_opts:-p1}}
    73   %{?patch12:%patch12 %{?patch12_opts:%{patch12_opts}}%{!?patch12_opts:-p1}}
    74   %{?patch13:%patch13 %{?patch13_opts:%{patch13_opts}}%{!?patch13_opts:-p1}}
    75   %{?patch14:%patch14 %{?patch14_opts:%{patch14_opts}}%{!?patch14_opts:-p1}}
    76   %{?patch15:%patch15 %{?patch15_opts:%{patch15_opts}}%{!?patch15_opts:-p1}}
    77   %{?patch16:%patch16 %{?patch16_opts:%{patch16_opts}}%{!?patch16_opts:-p1}}
    78   %{?patch17:%patch17 %{?patch17_opts:%{patch17_opts}}%{!?patch17_opts:-p1}}
    79   %{?patch18:%patch18 %{?patch18_opts:%{patch18_opts}}%{!?patch18_opts:-p1}}
    80   %{?patch19:%patch19 %{?patch19_opts:%{patch19_opts}}%{!?patch19_opts:-p1}}
     50  source_dir_newlib="newlib-%{newlib_version}"
     51  %source setup newlib -q -D -n newlib-%{newlib_version}
     52  %patch setup newlib -p1
    8153  cd ${build_top}
    8254
    8355  # Link newlib into the gcc source tree
    84   %{__rmfile} ${source_dir_0}/newlib
    85   %{__ln_s} $PWD/${source_dir_10}/newlib ${source_dir_0}/newlib
     56  %{__rmfile} ${source_dir_gcc}/newlib
     57  %{__ln_s} $PWD/${source_dir_newlib}/newlib ${source_dir_gcc}/newlib
    8658
    8759  # MPFR
    88   source_dir_20="mpfr-%{mpfr_version}"
    89   %setup -q -D -T -n mpfr-%{mpfr_version} -b20
    90   %{?patch20:%patch20 -p1}
     60  source_dir_mpfr="mpfr-%{mpfr_version}"
     61  %source setup mpfr -q -D -n mpfr-%{mpfr_version}
     62  %patch setup mpfr -p1
    9163  cd ${build_top}
    9264  # Build MPFR one-tree style
    93   %{__rmfile} ${source_dir_0}/mpfr
    94   %{__ln_s} $PWD/${source_dir_20} ${source_dir_0}/mpfr
     65  %{__rmfile} ${source_dir_gcc}/mpfr
     66  %{__ln_s} $PWD/${source_dir_mpfr} ${source_dir_gcc}/mpfr
    9567
    9668  # MPC
    97   source_dir_21="mpc-%{mpc_version}"
    98   %setup -q -D -T -n mpc-%{mpc_version} -b21
    99   %{?patch21:%patch21 -p1}
     69  source_dir_mpc="mpc-%{mpc_version}"
     70  %source setup mpc -q -D -n mpc-%{mpc_version}
     71  %patch setup mpc -p1
    10072  cd ${build_top}
    10173  # Build MPC one-tree style
    102   %{__rmfile} ${source_dir_0}/mpc
    103   %{__ln_s} $PWD/${source_dir_21} ${source_dir_0}/mpc
     74  %{__rmfile} ${source_dir_gcc}/mpc
     75  %{__ln_s} $PWD/${source_dir_mpc} ${source_dir_gcc}/mpc
    10476
    10577  # GMP
    106   source_dir_22="gmp-%{gmp_version}"
    107   %setup -q -D -T -n gmp-%{gmp_version} -b22
    108   %{?patch22:%patch22 -p1}
     78  source_dir_gmp="gmp-%{gmp_version}"
     79  %source setup gmp -q -D -n gmp-%{gmp_version}
     80  %patch setup gmp -p1
    10981  cd ${build_top}
    11082  # Build GMP one-tree style
    111   %{__rmfile} ${source_dir_0}/gmp
    112   %{__ln_s} $PWD/${source_dir_22} ${source_dir_0}/gmp
     83  %{__rmfile} ${source_dir_gcc}/gmp
     84  %{__ln_s} $PWD/${source_dir_gmp} ${source_dir_gcc}/gmp
    11385
    114   echo "%{gcc_version_message}" > ${source_dir_0}/gcc/DEV-PHASE
     86  echo "%{gcc_version_message}" > ${source_dir_gcc}/gcc/DEV-PHASE
    11587
    11688  # Fix timestamps
    117   cd ${source_dir_0}
     89  cd ${source_dir_gcc}
    11890  contrib/gcc_update --touch
    11991  cd ${build_top}
     
    150122  %{host_build_flags}
    151123
    152   ../${source_dir_0}/configure \
     124  ../${source_dir_gcc}/configure \
    153125    --prefix=%{_prefix} \
    154126    --bindir=%{_bindir} \
     
    183155    # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
    184156    mkdir -p gcc/include
    185     cp ../${source_dir_0}/gcc/gsyslimits.h gcc/include/syslimits.h
     157    cp ../${source_dir_gcc}/gcc/gsyslimits.h gcc/include/syslimits.h
    186158  fi
    187159
     
    213185
    214186  # Clean the symlinks away incase the source is a repo
    215   %{__rmfile} ${source_dir_0}/newlib
    216   %{__rmfile} ${source_dir_0}/mpfr
    217   %{__rmfile} ${source_dir_0}/mpc
    218   %{__rmfile} ${source_dir_0}/gmp
     187  %{__rmfile} ${source_dir_gcc}/newlib
     188  %{__rmfile} ${source_dir_gcc}/mpfr
     189  %{__rmfile} ${source_dir_gcc}/mpc
     190  %{__rmfile} ${source_dir_gcc}/gmp
    219191
    220192%testing
  • source-builder/config/gdb-6-1.cfg

    re074e75 r9a15c40  
    1717# Source
    1818#
    19 %ifn %{defined Source0}
    20  Source0: http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
    21  VersionControl0 git clone git://sourceware.org/git/gdb.git
    22 %endif
     19%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
    2320
    2421#
     
    2623#
    2724%prep
    28   %setup -q -c -n %{name}-%{version}
     25  %source setup gdb -q -c -n %{name}-%{version}
    2926  cd gdb-%{gdb_version}
    30   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    31   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    32   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    33   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    34   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    35   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    36   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    37   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    38   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    39   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     27  %patch setup gdb -p1
    4028  cd ..
    4129
  • source-builder/config/gdb-7-1.cfg

    re074e75 r9a15c40  
    2626# Source
    2727#
    28 %ifn %{defined Source0}
    29  Source0: http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
    30  VersionControl0 git clone git://sourceware.org/git/gdb.git
    31 %endif
     28%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
    3229
    3330#
     
    4542  build_top=$(pwd)
    4643
    47   source_dir_0="gdb-%{gdb_version}"
    48   %setup -q -n gdb-%{gdb_version}
    49   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    50   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    51   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    52   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    53   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    54   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    55   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    56   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    57   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    58   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     44  source_dir_gdb="gdb-%{gdb_version}"
     45  %source setup gdb -q -n gdb-%{gdb_version}
     46  %patch setup gdb -p1
    5947
    6048  cd ${build_top}
     
    7967  LIBS_STATIC=${GDB_LIBS_STATIC} \
    8068  LIBS=${GDB_LIBS} \
    81   ../${source_dir_0}/configure \
     69  ../${source_dir_gdb}/configure \
    8270    --build=%{_build} --host=%{_host} \
    8371    --target=%{_target} \
  • source-builder/config/gettext-0-1.cfg

    re074e75 r9a15c40  
    2020# Source
    2121#
    22 Source0: http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.1.tar.gz
     22%source set gettext http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.1.tar.gz
    2323
    2424#
     
    3535  build_top=$(pwd)
    3636
    37   source_dir_0="gettext-%{gettext_version}"
    38   %setup -q -n gettext-%{gettext_version}
    39   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    40   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    41   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    42   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    43   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    44   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    45   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    46   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    47   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    48   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     37  source_dir_gettext="gettext-%{gettext_version}"
     38  %source setup gettext -q -n gettext-%{gettext_version}
     39  %patch setup gettext -p1
    4940
    5041  cd ${build_top}
     
    6051  %{host_build_flags}
    6152
    62   ../${source_dir_0}/configure \
     53  ../${source_dir_gettext}/configure \
    6354    --prefix=%{_prefix} \
    6455    --bindir=%{_bindir} \
  • source-builder/config/glib-2-1.cfg

    re074e75 r9a15c40  
    2020# Source
    2121#
    22 Source0: http://ftp.gnome.org/pub/gnome/sources/glib/%{glib_version_major}/glib-%{glib_version}.tar.xz
     22%source set glib http://ftp.gnome.org/pub/gnome/sources/glib/%{glib_version_major}/glib-%{glib_version}.tar.xz
    2323
    2424#
     
    2828  build_top=$(pwd)
    2929
    30   source_dir_0="glib-%{glib_version}"
    31   %setup -q -n glib-%{glib_version}
    32   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    33   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    34   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    35   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    36   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    37   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    38   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    39   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    40   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    41   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     30  source_dir_glib="glib-%{glib_version}"
     31  %source setup glib -q -n glib-%{glib_version}
     32  %patch setup glib -p1
    4233
    4334  cd ${build_top}
     
    5849  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
    5950  %{_ld_library_path}=$SYSROOT/lib \
    60   ../${source_dir_0}/configure \
     51  ../${source_dir_glib}/configure \
    6152    --prefix=%{_prefix} \
    6253    --bindir=%{_bindir} \
  • source-builder/config/libffi-3-1.cfg

    re074e75 r9a15c40  
    2020# Source
    2121#
    22 Source0: ftp://sourceware.org/pub/libffi/libffi-%{libffi_version}.tar.gz
     22%source set libffi ftp://sourceware.org/pub/libffi/libffi-%{libffi_version}.tar.gz
    2323
    2424#
     
    2828  build_top=$(pwd)
    2929
    30   source_dir_0="libffi-%{libffi_version}"
    31   %setup -q -n libffi-%{libffi_version}
    32   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    33   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    34   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    35   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    36   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    37   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    38   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    39   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    40   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    41   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     30  source_dir_libffi="libffi-%{libffi_version}"
     31  %source setup libffi -q -n libffi-%{libffi_version}
     32  %patch setup libffi -p1
    4233
    4334  cd ${build_top}
     
    5344  %{host_build_flags}
    5445
    55   ../${source_dir_0}/configure \
     46  ../${source_dir_libffi}/configure \
    5647    --prefix=%{_prefix} \
    5748    --bindir=%{_bindir} \
  • source-builder/config/libiconv-1-1.cfg

    re074e75 r9a15c40  
    2121# Source
    2222#
    23 Source0: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{libiconv_version}.tar.gz
     23%source set libiconv http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{libiconv_version}.tar.gz
    2424
    2525#
     
    2929  build_top=$(pwd)
    3030
    31   source_dir_0="libiconv-%{libiconv_version}"
    32   %setup -q -n libiconv-%{libiconv_version}
    33   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    34   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    35   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    36   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    37   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    38   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    39   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    40   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    41   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    42   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     31  source_dir_libiconv="libiconv-%{libiconv_version}"
     32  %source setup libiconv -q -n libiconv-%{libiconv_version}
     33  %patch setup libiconv -p1
    4334
    4435  cd ${build_top}
     
    5445  %{host_build_flags}
    5546
    56   ../${source_dir_0}/configure \
     47  ../${source_dir_libiconv}/configure \
    5748    --prefix=%{_prefix} \
    5849    --bindir=%{_bindir} \
  • source-builder/config/libtool-2-1.cfg

    re074e75 r9a15c40  
    2222# Source
    2323#
    24 Source0: ftp://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz
    25 VersionControl0: git clone git://git.sv.gnu.org/libtool
     24%source set libtool ftp://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz
    2625
    2726#
     
    3130  build_top=$(pwd)
    3231
    33   %setup -q -n libtool-%{libtool_version}
    34   %{?patch0:%patch0 -p1}
     32  %source setup libtool -q -n libtool-%{libtool_version}
     33  %patch setup libtool -p1
    3534
    3635  cd ${build_top}
  • source-builder/config/libusb-1-1.cfg

    re074e75 r9a15c40  
    1818# Source
    1919#
    20 Source0: http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-%{libusb_version}/libusb-%{libusb_version}.tar.bz2
    21 VersionControl0: git clone git://git.libusb.org/libusb.git
     20%source set libusb http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-%{libusb_version}/libusb-%{libusb_version}.tar.bz2
    2221
    2322#
     
    2524#
    2625%prep
    27 %setup -q -c -n %{name}-%{version}
    28 cd libusb-%{libusb_version}
    29 %{?patch0:%patch0 -p1}
    30 cd ..
     26
     27  %source setup libusb -q -c -n %{name}-%{version}
     28  cd libusb-%{libusb_version}
     29  %patch setup libusb -p1
     30  cd ..
    3131
    3232%build
  • source-builder/config/m4-1-1.cfg

    re074e75 r9a15c40  
    1818# Source
    1919#
    20 Source0: ftp://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.gz
     20%source set m4 ftp://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.gz
    2121
    2222#
     
    2424#
    2525%prep
    26 %setup -q -c -n %{name}-%{version}
    27 cd m4-%{m4_version}
    28 %{?patch0:%patch0 -p1}
    29 cd ..
     26  %source setup m4 -q -c -n %{name}-%{version}
     27  cd m4-%{m4_version}
     28  %patch setup m4 -p1
     29  cd ..
    3030
    3131%build
  • source-builder/config/pixman-0-1.cfg

    re074e75 r9a15c40  
    2121# Source
    2222#
    23 Source0: http://cairographics.org/releases/pixman-%{pixman_version}.tar.gz
     23%source set pixman http://cairographics.org/releases/pixman-%{pixman_version}.tar.gz
    2424
    2525#
     
    2929  build_top=$(pwd)
    3030
    31   source_dir_0="pixman-%{pixman_version}"
    32   %setup -q -n pixman-%{pixman_version}
    33   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    34   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    35   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    36   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    37   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    38   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    39   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    40   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    41   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    42   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     31  source_dir_pixman="pixman-%{pixman_version}"
     32  %source setup pixman -q -n pixman-%{pixman_version}
     33  %patch setup pixman -p1
    4334
    4435  cd ${build_top}
     
    5445  %{host_build_flags}
    5546
    56   ../${source_dir_0}/configure \
     47  ../${source_dir_pixman}/configure \
    5748    --prefix=%{_prefix} \
    5849    --bindir=%{_bindir} \
  • source-builder/config/qemu-1-1.cfg

    re074e75 r9a15c40  
    1919# Source
    2020#
    21 Source0: http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
     21%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
    2222
    2323#
     
    2727  build_top=$(pwd)
    2828
    29   source_dir_0="qemu-%{qemu_version}"
    30   %setup -q -n qemu-%{qemu_version}
    31   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
    32   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
    33   %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
    34   %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
    35   %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
    36   %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
    37   %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
    38   %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
    39   %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
    40   %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
     29  source_dir_qemu="qemu-%{qemu_version}"
     30  %source setup qemu -q -n qemu-%{qemu_version}
     31  %patch setup qemu -p1
    4132
    4233  cd ${build_top}
     
    6253  %{_ld_library_path}=$SYSROOT/lib \
    6354  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib" \
    64   ../${source_dir_0}/configure \
     55  ../${source_dir_qemu}/configure \
    6556    --prefix=%{_prefix} \
    6657    ${CROSS_PREFIX_OPTION} \
  • source-builder/sb/build.py

    re074e75 r9a15c40  
    4242    import options
    4343    import path
     44    import sources
    4445    import version
    4546except KeyboardInterrupt:
     
    132133            path.mkdir(mkpath)
    133134
    134     def source(self, package, source_tag):
    135         #
    136         # Scan the sources found in the config file for the one we are
    137         # after. Infos or tags are lists. Merge in any macro defined
    138         # sources as these may be overridden by user loaded macros.
    139         #
    140         sources = package.sources()
    141         url = None
    142         for s in sources:
    143             tag = s[len('source'):]
    144             if tag.isdigit():
    145                 if int(tag) == source_tag:
    146                     url = sources[s][0]
    147                     break
    148         if url is None:
    149             raise error.general('source tag not found: source%d' % (source_tag))
    150         source = download.parse_url(url, '_sourcedir', self.config, self.opts)
    151         download.get_file(source['url'], source['local'], self.opts, self.config)
    152         if 'symlink' in source:
    153             source['script'] = '%%{__ln_s} %s ${source_dir_%d}' % (source['symlink'], source_tag)
    154         elif 'compressed' in source:
    155             source['script'] = source['compressed'] + ' ' + \
    156                 source['local'] + ' | %{__tar_extract} -'
    157         else:
    158             source['script'] = '%{__tar_extract} ' + source['local']
    159         return source
    160 
    161     def patch(self, package, args):
    162         #
    163         # Scan the patches found in the config file for the one we are
    164         # after. Infos or tags are lists.
    165         #
    166         patches = package.patches()
    167         url = None
    168         for p in patches:
    169             if args[0][1:].lower() == p:
    170                 url = patches[p][0]
    171                 break
    172         if url is None:
    173             raise error.general('patch tag not found: %s' % (args[0]))
    174         #
    175         # Parse the URL first in the source builder's patch directory.
    176         #
    177         patch = download.parse_url(url, '_patchdir', self.config, self.opts)
    178         #
    179         # If not in the source builder package check the source directory.
    180         #
    181         if not path.exists(patch['local']):
    182             patch = download.parse_url(url, '_patchdir', self.config, self.opts)
    183         download.get_file(patch['url'], patch['local'], self.opts, self.config)
    184         if 'compressed' in patch:
    185             patch['script'] = patch['compressed'] + ' ' +  patch['local']
    186         else:
    187             patch['script'] = '%{__cat} ' + patch['local']
    188         patch['script'] += ' | %{__patch} ' + ' '.join(args[1:])
    189         self.script.append(self.config.expand(patch['script']))
    190 
    191135    def canadian_cross(self):
    192136        _host = self.config.expand('%{_host}')
     
    196140            _host != _build and _host != _target
    197141
    198     def setup(self, package, args):
    199         log.output('prep: %s: %s' % (package.name(), ' '.join(args)))
    200         opts, args = getopt.getopt(args[1:], 'qDcTn:b:a:')
    201         source_tag = 0
     142    def source(self, name):
     143        #
     144        # Return the list of sources. Merge in any macro defined sources as
     145        # these may be overridden by user loaded macros.
     146        #
     147        _map = 'source-%s' % (name)
     148        src_keys = self.macros.map_keys(_map)
     149        if len(src_keys) == 0:
     150            raise error.general('no source set: %s (%s)' % (name, _map))
     151        srcs = []
     152        for s in src_keys:
     153            sm = self.macros.get(s, globals = False, maps = _map)
     154            if sm is None:
     155                raise error.internal('source macro not found: %s in %s (%s)' % \
     156                                         (s, name, _map))
     157            url = self.config.expand(sm[2])
     158            src = download.parse_url(url, '_sourcedir', self.config, self.opts)
     159            download.get_file(src['url'], src['local'], self.opts, self.config)
     160            if 'symlink' in src:
     161                src['script'] = '%%{__ln_s} %s ${source_dir_%s}' % (src['symlink'], name)
     162            elif 'compressed' in src:
     163                #
     164                # Zip files unpack as well so do not use tar.
     165                #
     166                src['script'] = '%s %s' % (src['compressed'], src['local'])
     167                if src['compressed-type'] != 'zip':
     168                    src['script'] += ' | %{__tar_extract} -'
     169            else:
     170                src['script'] = '%{__tar_extract} %s' % (src['local'])
     171            srcs += [src]
     172        return srcs
     173
     174    def source_setup(self, package, args):
     175        log.output('source setup: %s: %s' % (package.name(), ' '.join(args)))
     176        setup_name = args[1]
     177        args = args[1:]
     178        try:
     179            opts, args = getopt.getopt(args[1:], 'qDcn:b:a:')
     180        except getopt.GetoptError, ge:
     181            raise error.general('source setup error: %s' % str(ge))
    202182        quiet = False
    203         unpack_default_source = True
    204183        unpack_before_chdir = True
    205184        delete_before_unpack = True
    206185        create_dir = False
    207         name = None
     186        deleted_dir = False
     187        created_dir = False
     188        changed_dir = False
     189        opt_name = None
    208190        for o in opts:
    209191            if o[0] == '-q':
     
    213195            elif o[0] == '-c':
    214196                create_dir = True
    215             elif o[0] == '-T':
    216                 unpack_default_source = False
    217197            elif o[0] == '-n':
    218                 name = o[1]
     198                opt_name = o[1]
    219199            elif o[0] == '-b':
    220200                unpack_before_chdir = True
    221                 if not o[1].isdigit():
    222                     raise error.general('setup -b source tag is not a number: %s' % (o[1]))
    223                 source_tag = int(o[1])
    224201            elif o[0] == '-a':
    225202                unpack_before_chdir = False
    226                 if not o[1].isdigit():
    227                     raise error.general('setup -a source tag is not a number: %s' % (o[1]))
    228                 source_tag = int(o[1])
    229         source0 = None
    230         source = self.source(package, source_tag)
    231         if name is None:
    232             if source:
    233                 name = source['name']
     203        name = None
     204        for source in self.source(setup_name):
     205            if name is None:
     206                if opt_name is None:
     207                    if source:
     208                        opt_name = source['name']
     209                    else:
     210                        raise error.general('setup source tag not found: %d' % (source_tag))
     211                else:
     212                    name = opt_name
     213                name = self._name_(name)
     214            self.script.append(self.config.expand('cd %{_builddir}'))
     215            if not deleted_dir and  delete_before_unpack:
     216                self.script.append(self.config.expand('%{__rm} -rf ' + name))
     217                deleted_dir = True
     218            if not created_dir and create_dir:
     219                self.script.append(self.config.expand('%{__mkdir_p} ' + name))
     220                created_dir = True
     221            if not changed_dir and (not unpack_before_chdir or create_dir):
     222                self.script.append(self.config.expand('cd ' + name))
     223                changed_dir = True
     224            self.script.append(self.config.expand(source['script']))
     225        if not changed_dir and (unpack_before_chdir and not create_dir):
     226            self.script.append(self.config.expand('cd ' + name))
     227            changed_dir = True
     228        self.script.append(self.config.expand('%{__setup_post}'))
     229
     230    def patch_setup(self, package, args):
     231        name = args[1]
     232        args = args[2:]
     233        _map = 'patch-%s' % (name)
     234        default_opts = ' '.join(args)
     235        patch_keys = self.macros.map_keys(_map)
     236        patches = []
     237        for p in patch_keys:
     238            pm = self.macros.get(p, globals = False, maps = _map)
     239            if pm is None:
     240                raise error.internal('patch macro not found: %s in %s (%s)' % \
     241                                         (p, name, _map))
     242            opts = []
     243            url = []
     244            for pp in pm[2].split():
     245                if len(url) == 0 and pp[0] == '-':
     246                    opts += [pp]
     247                else:
     248                    url += [pp]
     249            if len(url) == 0:
     250                raise error.general('patch URL not found: %s' % (' '.join(args)))
     251            if len(opts) == 0:
     252                opts = default_opts
    234253            else:
    235                 raise error.general('setup source tag not found: %d' % (source_tag))
    236         name = self._name_(name)
    237         self.script.append(self.config.expand('cd %{_builddir}'))
    238         if delete_before_unpack:
    239             self.script.append(self.config.expand('%{__rm} -rf ' + name))
    240         if create_dir:
    241             self.script.append(self.config.expand('%{__mkdir_p} ' + name))
    242         #
    243         # If -a? then change directory before unpacking.
    244         #
    245         if not unpack_before_chdir or create_dir:
    246             self.script.append(self.config.expand('cd ' + name))
    247         #
    248         # Unpacking the source. Note, treated the same as -a0.
    249         #
    250         if unpack_default_source and source_tag != 0:
    251             source0 = self.source(package, 0)
    252             if source0 is None:
    253                 raise error.general('no setup source0 tag found')
    254             self.script.append(self.config.expand(source0['script']))
    255         self.script.append(self.config.expand(source['script']))
    256         if unpack_before_chdir and not create_dir:
    257             self.script.append(self.config.expand('cd ' + name))
    258         self.script.append(self.config.expand('%{__setup_post}'))
     254                opts = ' '.join(opts)
     255            opts = self.config.expand(opts)
     256            url = self.config.expand(' '.join(url))
     257            #
     258            # Parse the URL first in the source builder's patch directory.
     259            #
     260            patch = download.parse_url(url, '_patchdir', self.config, self.opts)
     261            #
     262            # If not in the source builder package check the source directory.
     263            #
     264            if not path.exists(patch['local']):
     265                patch = download.parse_url(url, '_patchdir', self.config, self.opts)
     266            download.get_file(patch['url'], patch['local'], self.opts, self.config)
     267            if 'compressed' in patch:
     268                patch['script'] = patch['compressed'] + ' ' +  patch['local']
     269            else:
     270                patch['script'] = '%{__cat} ' + patch['local']
     271            patch['script'] += ' | %%{__patch} %s' % (opts)
     272            self.script.append(self.config.expand(patch['script']))
    259273
    260274    def run(self, command, shell_opts = '', cwd = None):
     
    279293            for l in _prep:
    280294                args = l.split()
    281                 if args[0] == '%setup':
    282                     self.setup(package, args)
    283                 elif args[0].startswith('%patch'):
    284                     self.patch(package, args)
    285                 else:
    286                     self.script.append(' '.join(args))
     295                if len(args):
     296                    if args[0] == '%setup':
     297                        if len(args) == 1:
     298                            raise error.general('invalid %%setup directive: %s' % (' '.join(args)))
     299                        if args[1] == 'source':
     300                            self.source_setup(package, args[1:])
     301                        elif args[1] == 'patch':
     302                            self.patch_setup(package, args[1:])
     303                    elif args[0].startswith('%patch'):
     304                        self.patch(package, args)
     305                    else:
     306                        self.script.append(' '.join(args))
    287307
    288308    def build(self, package):
  • source-builder/sb/config.py

    re074e75 r9a15c40  
    3838    import path
    3939    import pkgconfig
     40    import sources
    4041except KeyboardInterrupt:
    4142    print 'user terminated'
     
    581582                          (self.init_name, r, ls[1], self.macros.maps()))
    582583
     584    def _sources(self, ls):
     585        return sources.process(ls[0][1:], ls[1:], self.macros, self._error)
     586
    583587    def _define(self, config, ls):
    584588        if len(ls) <= 1:
     
    795799                        self._disable(config, ls)
    796800                elif ls[0] == '%select':
     801                    if isvalid:
     802                        self._select(config, ls)
     803                elif ls[0] == '%source' or ls[0] == '%patch':
     804                    if isvalid:
     805                        d = self._sources(ls)
     806                        if d is not None:
     807                            return ('data', d)
     808                elif ls[0] == '%patch':
    797809                    if isvalid:
    798810                        self._select(config, ls)
  • source-builder/sb/download.py

    re074e75 r9a15c40  
    4141    esl = source['ext'].split('.')
    4242    if esl[-1:][0] == 'gz':
     43        source['compressed-type'] = 'gzip'
    4344        source['compressed'] = '%{__gzip} -dc'
    4445    elif esl[-1:][0] == 'bz2':
     46        source['compressed-type'] = 'bzip2'
    4547        source['compressed'] = '%{__bzip2} -dc'
    4648    elif esl[-1:][0] == 'zip':
     49        source['compressed-type'] = 'zip'
    4750        source['compressed'] = '%{__zip} -u'
    4851    elif esl[-1:][0] == 'xz':
     52        source['compressed-type'] = 'xz'
    4953        source['compressed'] = '%{__xz} -dc'
    5054
     
    139143    source['file'] = path.basename(url)
    140144    source['name'], source['ext'] = path.splitext(source['file'])
     145    if source['name'].endswith('.tar'):
     146        source['name'] = source['name'][:-4]
     147        source['ext'] = '.tar' + source['ext']
    141148    #
    142149    # Get the file. Checks the local source directory first.
  • source-builder/sb/macros.py

    re074e75 r9a15c40  
    8585        for f in self.files:
    8686            text += '> %s%s' % (f, os.linesep)
    87         for map in self.macros:
     87        maps = sorted(self.macros)
     88        maps.remove('global')
     89        maps += ['global']
     90        for map in maps:
    8891            text += '[%s]%s' % (map, os.linesep)
    8992            for k in sorted(self.macros[map].keys()):
     
    163166        return len(self.keys())
    164167
    165     def keys(self):
    166         keys = self.macros['global'].keys()
     168    def keys(self, globals = True):
     169        if globals:
     170            keys = self.macros['global'].keys()
     171        else:
     172            keys = []
    167173        for rm in self.get_read_maps():
    168174            for mk in self.macros[rm]:
     
    181187        return True
    182188
     189    def create_map(self, _map):
     190        if _map not in self.macros:
     191            self.macros[_map] = {}
     192
     193    def delete_map(self, _map):
     194        if _map in self.macros:
     195            self.macros.pop(_map, None)
     196
    183197    def maps(self):
    184198        return self.macros.keys()
     199
     200    def map_keys(self, _map):
     201        if _map in self.macros:
     202            return self.macros[_map].keys()
     203        return []
     204
     205    def map_num_keys(self, _map):
     206        return len(self.map_keys(_map))
    185207
    186208    def get_read_maps(self):
     
    349371                                (path.host(self.expand(name))))
    350372
    351     def get(self, key):
     373    def get(self, key, globals = True, maps = None):
    352374        if type(key) is not str:
    353375            raise TypeError('bad key type: %s' % (type(key)))
    354376        key = self.key_filter(key)
    355         for rm in self.get_read_maps():
     377        if maps is None:
     378            maps = self.get_read_maps()
     379        else:
     380            if type(maps) is str:
     381                maps = [maps]
     382            if type(maps) != list:
     383                raise TypeError('bad maps type: %s' % (type(map)))
     384        for rm in maps:
    356385            if key in self.macros[rm]:
    357386                return self.macros[rm][key]
    358         if key in self.macros['global']:
     387        if globals and key in self.macros['global']:
    359388            return self.macros['global'][key]
    360389        return None
     
    409438        return _str
    410439
    411     def find(self, regex):
     440    def find(self, regex, globals = True):
    412441        what = re.compile(regex)
    413442        keys = []
    414         for key in self.keys():
     443        for key in self.keys(globals):
    415444            if what.match(key):
    416445                keys += [key]
     
    440469            return True
    441470        return False
     471
     472    def unset_write_map(self):
     473        self.write_map = 'global'
    442474
    443475    def lock_read_map(self):
  • source-builder/sb/setbuilder.py

    re074e75 r9a15c40  
    4040    import path
    4141    import reports
     42    import sources
    4243    import version
    4344except KeyboardInterrupt:
     
    249250                    elif ls[0] == '%include':
    250251                        configs += self.parse(ls[1].strip())
    251                     else:
    252                         raise error.general('%s:%d: invalid directive in build set files: %s' % \
    253                                                 (self.bset, lc, l))
     252                    elif ls[0] == '%patch' or ls[0] == '%source':
     253                        def err(msg):
     254                            raise error.general('%s:%d: %s' % (self.bset, lc, msg))
     255                        sources.process(ls[0][1:], ls[1:], self.macros, err)
    254256                else:
    255257                    l = l.strip()
  • source-builder/sb/version.py

    re074e75 r9a15c40  
    2525
    2626major = 0
    27 minor = 2
     27minor = 3
    2828revision = 0
    2929
Note: See TracChangeset for help on using the changeset viewer.