mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
Add bare/config and move the source-builder/config to it.
Rework the RTEMS build set files to point to the new location. Move the files into devel, this follows the ports naming in FreeBSD. Update the macros, defaults, and options to support this.
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Autoconf 2.68.
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define autoconf_version 2.68
|
||||
|
||||
#
|
||||
# The autoconf build instructions. We use 2.xx Release 1.
|
||||
#
|
||||
%include %{_configdir}/autoconf-2-1.cfg
|
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Autoconf 2.69.
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define autoconf_version 2.69
|
||||
|
||||
#
|
||||
# The autoconf build instructions. We use 2.xx Release 1.
|
||||
#
|
||||
%include %{_configdir}/autoconf-2-1.cfg
|
@@ -1,8 +0,0 @@
|
||||
#
|
||||
# Internal Autoconf 2.68.
|
||||
#
|
||||
|
||||
%warning This autoconf build is for internal bootstraps, no package created
|
||||
|
||||
%define _internal_autotools yes
|
||||
%include %{_configdir}/autoconf-2.68-1.cfg
|
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Automake 1.12
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define automake_version 1.12
|
||||
|
||||
#
|
||||
# The automake build instructions. We use 1.xx Release 1.
|
||||
#
|
||||
%include %{_configdir}/automake-1-1.cfg
|
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Automake 1.12.2
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define automake_version 1.12.2
|
||||
|
||||
#
|
||||
# The automake build instructions. We use 1.xx Release 1.
|
||||
#
|
||||
%include %{_configdir}/automake-1-1.cfg
|
@@ -1,8 +0,0 @@
|
||||
#
|
||||
# Internal Automake 1.12
|
||||
#
|
||||
|
||||
%warning This automake build is for internal bootstraps, no package created
|
||||
|
||||
%define _internal_autotools yes
|
||||
%include %{_configdir}/automake-1.12-1.cfg
|
@@ -1,17 +0,0 @@
|
||||
#
|
||||
# Binutils 2.22.
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/checks.cfg
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define binutils_version 2.22
|
||||
|
||||
#
|
||||
# The binutils build instructions. We use 2.xx Release 1.
|
||||
#
|
||||
%include %{_configdir}/binutils-2-1.cfg
|
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# DTC (Device Tree Compiler) 1.2.0
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define dtc_version 1.2.0
|
||||
|
||||
#
|
||||
# The DTC build instructions. We use 1.x.x Release 1.
|
||||
#
|
||||
%include %{_configdir}/dtc-1-1.cfg
|
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Expat 2.1.0
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define expat_version 2.1.0
|
||||
|
||||
#
|
||||
# The Expat build instructions. We use 2.xx Release 1.
|
||||
#
|
||||
%include %{_configdir}/expat-2-1.cfg
|
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# GCC 2.6, Newlib 1.20
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/checks.cfg
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define gcc_version 4.6.3
|
||||
%define newlib_version 1.20.0
|
||||
%define mpfr_version 3.0.1
|
||||
%define mpc_version 0.8.2
|
||||
%define gmp_version 5.0.5
|
||||
|
||||
#
|
||||
# Project custom message
|
||||
#
|
||||
%define gcc_version_message GCC %{release}-RSB(%{_sbgit_id}),gcc-%{gcc_version}/newlib-%{newlib_version}
|
||||
|
||||
#
|
||||
# The gcc/newlib build instructions. We use 4.6 Release 1.
|
||||
#
|
||||
%include %{_configdir}/gcc-4.6-1.cfg
|
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# GCC 4.7.2, Newlib 1.20
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/checks.cfg
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define gcc_version 4.7.2
|
||||
%define newlib_version 1.20.0
|
||||
%define mpfr_version 3.0.1
|
||||
%define mpc_version 1.0.1
|
||||
%define gmp_version 5.0.5
|
||||
|
||||
#
|
||||
# Project custom message
|
||||
#
|
||||
%define gcc_version_message GCC %{release}-RSB(%{_sbgit_id}),gcc-%{gcc_version}/newlib-%{newlib_version}
|
||||
|
||||
#
|
||||
# The gcc/newlib build instructions. We use 4.7 Release 1.
|
||||
#
|
||||
%include %{_configdir}/gcc-4.7-1.cfg
|
@@ -1,25 +0,0 @@
|
||||
#
|
||||
# GNU Tools Set
|
||||
#
|
||||
|
||||
%define release 1
|
||||
|
||||
package: gnu-tool-%{_target}-%{release}
|
||||
|
||||
#
|
||||
# Project custom message
|
||||
#
|
||||
%define gcc_version_message SB-%{release},gcc-%{gcc_version}/newlib-%{newlib_version}
|
||||
|
||||
#
|
||||
# Enable G++
|
||||
#
|
||||
%define enable_cxx 1
|
||||
|
||||
#
|
||||
# Tool configuration.
|
||||
#
|
||||
binutils-2.22-1
|
||||
gcc-4.6-newlib-1.20-1
|
||||
expat-2.1.0-1
|
||||
gdb-7.5-1
|
@@ -1,21 +0,0 @@
|
||||
#
|
||||
# LibUSB 1.0.9
|
||||
#
|
||||
|
||||
%ifn %{defined release}
|
||||
%error No 'release' defined
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define libusb_version 1.0.9
|
||||
|
||||
Name: libusb-%{libusb_version}-%{_host}-%{release}
|
||||
|
||||
%description
|
||||
LibUSB for host %{_host}.
|
||||
|
||||
#
|
||||
# The Libuxb build instructions. We use 1.xx Release 1.
|
||||
#
|
||||
%include %{_configdir}/libusb-1-1.cfg
|
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# M4 1.4.16
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define m4_version 1.4.16
|
||||
|
||||
#
|
||||
# The m4 build instructions. We use 1.x.x Release 1.
|
||||
#
|
||||
%include %{_configdir}/m4-1-1.cfg
|
@@ -1,70 +0,0 @@
|
||||
#
|
||||
# ST-Link Version 1.
|
||||
#
|
||||
# This configuration file configure's, make's and install's SL-Link.
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define stlink_version 3494c11
|
||||
|
||||
Name: texane-stlink-%{stlink_version}-%{release}
|
||||
Summary: ST-Link v%{stlink_version} for host %{_host}
|
||||
Version: %{stlink_version}
|
||||
Release: %{release}
|
||||
URL: https://github.com/texane/stlink/
|
||||
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
|
||||
#
|
||||
# Source
|
||||
#
|
||||
Source0: https://api.github.com/repos/texane/stlink/texane-stlink-%{stlink_version}.tar.gz
|
||||
VersionControl0: git clone https://github.com/texane/stlink.git
|
||||
Patch0: texane-stlink-3494c11-2.diff
|
||||
|
||||
#
|
||||
# Prepare the source code.
|
||||
#
|
||||
%prep
|
||||
%setup -q -c -n %{name}-%{version}
|
||||
cd texane-stlink-%{stlink_version}
|
||||
%{?patch0:%patch0 -p1}
|
||||
cd ..
|
||||
|
||||
%build
|
||||
export PATH="%{_bindir}:${PATH}"
|
||||
|
||||
cd texane-stlink-%{stlink_version}
|
||||
|
||||
./autogen.sh
|
||||
|
||||
%if "%{_build}" != "%{_host}"
|
||||
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
|
||||
%endif
|
||||
CPPFLAGS="-I $SB_TMPPREFIX/include/libusb-1.0" \
|
||||
CFLAGS="$SB_OPT_FLAGS" \
|
||||
LDFLAGS="-L $SB_TMPPREFIX/lib" \
|
||||
./configure \
|
||||
--build=%{_build} --host=%{_host} \
|
||||
--verbose \
|
||||
--prefix=%{_prefix} --bindir=%{_bindir} \
|
||||
--exec-prefix=%{_exec_prefix} \
|
||||
--includedir=%{_includedir} --libdir=%{_libdir} \
|
||||
--mandir=%{_mandir} --infodir=%{_infodir}
|
||||
|
||||
%{__make} %{?_smp_mflags} all
|
||||
|
||||
cd ..
|
||||
|
||||
%install
|
||||
export PATH="%{_bindir}:${PATH}"
|
||||
rm -rf $SB_BUILD_ROOT
|
||||
|
||||
cd texane-stlink-%{stlink_version}
|
||||
%{__make} DESTDIR=$SB_BUILD_ROOT install
|
||||
|
||||
cd ..
|
@@ -47,7 +47,7 @@ buildname: none, none, '%{name}'
|
||||
|
||||
# GNU triples needed to build packages
|
||||
_host: triplet, required, ''
|
||||
_build: triplet, required, '%{_host}'
|
||||
_build: triplet, required, ''
|
||||
_target: none, optional, ''
|
||||
|
||||
# The user
|
||||
@@ -57,7 +57,7 @@ _uid: none, convert, '%(%{__id_u} -n)'
|
||||
_host_platform: none, none, '%{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}'
|
||||
_arch: none, none, '%{_host_arch}'
|
||||
_topdir: dir, required, '%{_cwd}'
|
||||
_configdir: dir, optional, '%{_topdir}/config:%{_sbdir}/config'
|
||||
_configdir: dir, optional, '%{_topdir}/config:%{_sbdir}/config:%{_sbtop}/bare/config'
|
||||
_tardir: dir, optional, '%{_topdir}/tar'
|
||||
_sourcedir: dir, optional, '%{_topdir}/sources'
|
||||
_patchdir: dir, optional, '%{_topdir}/patches:%{_sbdir}/patches'
|
||||
|
@@ -62,6 +62,7 @@ class macros:
|
||||
self.macros['global'] = {}
|
||||
self.macros['global']['_cwd'] = ('dir', 'required', path.abspath(os.getcwd()))
|
||||
self.macros['global']['_sbdir'] = ('dir', 'required', path.abspath(sbdir))
|
||||
self.macros['global']['_sbtop'] = ('dir', 'required', path.abspath(path.dirname(sbdir)))
|
||||
else:
|
||||
self.macros = {}
|
||||
for m in original.macros:
|
||||
@@ -145,7 +146,7 @@ class macros:
|
||||
raise TypeError('bad value tuple value field: %s' % (type(value[2])))
|
||||
if value[0] not in ['none', 'triplet', 'dir', 'file', 'exe']:
|
||||
raise TypeError('bad value tuple (type field): %s' % (value[0]))
|
||||
if value[1] not in ['none', 'optional', 'required',
|
||||
if value[1] not in ['none', 'optional', 'required',
|
||||
'override', 'undefine', 'convert']:
|
||||
raise TypeError('bad value tuple (attrib field): %s' % (value[1]))
|
||||
if value[1] == 'convert':
|
||||
|
@@ -258,7 +258,10 @@ class command_line:
|
||||
log.quiet = True
|
||||
# Must have a host
|
||||
if self.defaults['_host'] == self.defaults['nil']:
|
||||
raise error.general('host not set')
|
||||
raise error.general('--host not set')
|
||||
# Must have a host
|
||||
if self.defaults['_build'] == self.defaults['nil']:
|
||||
raise error.general('--build not set')
|
||||
# Manage the regression option
|
||||
if self.opts['regression'] != '0':
|
||||
self.opts['no-install'] = '1'
|
||||
@@ -508,7 +511,7 @@ def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'):
|
||||
import linux
|
||||
overrides = linux.load()
|
||||
except:
|
||||
raise error.general('failed to load %s host support' % (uname))
|
||||
raise error.general('failed to load %s host support' % (uname[0]))
|
||||
else:
|
||||
raise error.general('unsupported host type; please add')
|
||||
if overrides is None:
|
||||
@@ -524,7 +527,7 @@ def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'):
|
||||
|
||||
def run(args):
|
||||
try:
|
||||
_opts = load(args = args)
|
||||
_opts = load(args = args, defaults = 'defaults.mc')
|
||||
print 'Options:'
|
||||
print _opts
|
||||
print 'Defaults:'
|
||||
|
Reference in New Issue
Block a user