source: rtems-source-builder/source-builder/defaults.mc @ 85d51a4

4.10
Last change on this file since 85d51a4 was f5e724f, checked in by Chris Johns <chrisj@…>, on 04/15/16 at 01:56:36

graphics: Add 3rd party graphics support back to the master branch.

The support is added at the top level and so not lost when we
move to a new version of RTEMS.

The change also moves all 3rd party packages to use a common
rtems-package.bset build set file.

All packages except Microwindows itself build cleanly.

  • Property mode set to 100644
File size: 16.5 KB
Line 
1#
2# RTEMS Tools Project (http://www.rtems.org/)
3# Copyright 2010-2013 Chris Johns (chrisj@rtems.org)
4# All rights reserved.
5#
6# This file is part of the RTEMS Tools package in 'rtems-tools'.
7#
8# Permission to use, copy, modify, and/or distribute this software for any
9# purpose with or without fee is hereby granted, provided that the above
10# copyright notice and this permission notice appear in all copies.
11#
12# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
20#
21# All paths in defaults must be Unix format. Do not store any Windows format
22# paths in the defaults.
23#
24# Every entry must describe the type of checking a host must pass.
25#
26# Records:
27#  key: type, attribute, value
28#   type     : none, dir, exe, triplet
29#   attribute: none, required, optional
30#   value    : 'single line', '''multi line'''
31#
32
33#
34# Global defaults
35#
36[global]
37
38# Nothing
39nil:                 none,    none,     ''
40
41# Set to invalid values.
42_bset:               none,    none,     ''
43name:                none,    none,     ''
44version:             none,    none,     ''
45release:             none,    none,     ''
46buildname:           none,    none,     '%{name}'
47
48# The default is not released.
49rsb_released:        none,    none,     '0'
50rsb_version:         none,    none,     'no-version'
51
52# GNU triples needed to build packages
53_host:               triplet, required, ''
54_build:              triplet, required, ''
55_target:             none,    optional, ''
56
57# RTEMS release URL
58rtems_release_url:   none,    none,     'ftp://ftp.rtems.org/pub/rtems/releases/%{rtems_version}'
59
60# The user
61_uid:                none,    convert,  '%(%{__id_u} -n)'
62
63# Default flags that can be overridded to supply specific host or build
64# flags and include paths to the tools. The host is the final platform
65# the tools will run on and build is the host building the tools.
66host_cflags:         none,    convert,  '-O2 -pipe'
67host_cxxflags:       none,    convert,  '-O2 -pipe'
68host_includes:       none,    convert,  ''
69build_cflags:        none,    convert,  '-O2 -pipe'
70build_cxxflags:      none,    convert,  '-O2 -pipe'
71build_includes:      none,    convert,  ''
72
73# Extra path a platform can override.
74_extra_path:         none,    none,     '%{_sbdir}'
75_ld_library_path:    none,    none,     'LD_LIBRARY_PATH'
76
77# Paths
78_host_platform:      none,    none,     '%{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}'
79_host_cc:            none,    none,     'gcc'
80_host_cxx:           none,    none,     'g++'
81_arch:               none,    none,     '%{_host_arch}'
82_topdir:             dir,     required, '%{_cwd}'
83_configdir:          dir,     optional, '%{_topdir}/config:%{_sbdir}/config:%{_sbtop}/bare/config'
84_tardir:             dir,     optional, '%{_topdir}/tar'
85_sourcedir:          dir,     optional, '%{_topdir}/sources'
86_patchdir:           dir,     optional, '%{_topdir}/patches:%{_sbdir}/patches'
87_builddir:           dir,     optional, '%{_topdir}/build/%{buildname}'
88_buildcxcdir:        dir,     optional, '%{_topdir}/build/%{buildname}-cxc'
89_buildxcdir:         dir,     optional, '%{_topdir}/build/%{buildname}-xc'
90_docdir:             dir,     none,     '%{_defaultdocdir}'
91_tmppath:            dir,     none,     '%{_topdir}/build/tmp'
92_tmproot:            dir,     none,     '%{_tmppath}/sb-%{_uid}/%{_bset}'
93_tmpcxcroot:         dir,     none,     '%{_tmppath}/sb-%{_uid}-cxc/%{_bset}'
94buildroot:           dir,     none,     '%{_tmppath}/%{buildname}-%{_uid}'
95buildcxcroot:        dir,     none,     '%{_tmppath}/%{buildname}-%{_uid}-cxc'
96buildxcroot:         dir,     none,     '%{_tmppath}/%{buildname}-%{_uid}-xx'
97_datadir:            dir,     none,     '%{_prefix}/share'
98_defaultdocdir:      dir,     none,     '%{_prefix}/share/doc'
99_exeext:             none,    none,     ''
100_exec_prefix:        dir,     none,     '%{_prefix}'
101_bindir:             dir,     none,     '%{_exec_prefix}/bin'
102_sbindir:            dir,     none,     '%{_exec_prefix}/sbin'
103_libexecdir:         dir,     none,     '%{_exec_prefix}/libexec'
104_datarootdir:        dir,     none,     '%{_prefix}/share'
105_datadir:            dir,     none,     '%{_datarootdir}'
106_sysconfdir:         dir,     none,     '%{_prefix}/etc'
107_sharedstatedir:     dir,     none,     '%{_prefix}/com'
108_localstatedir:      dir,     none,     '%{prefix}/var'
109_includedir:         dir,     none,     '%{_prefix}/include'
110_lib:                dir,     none,     'lib'
111_libdir:             dir,     none,     '%{_exec_prefix}/%{_lib}'
112_libexecdir:         dir,     none,     '%{_exec_prefix}/libexec'
113_mandir:             dir,     none,     '%{_datarootdir}/man'
114_infodir:            dir,     none,     '%{_datarootdir}/info'
115_localedir:          dir,     none,     '%{_datarootdir}/locale'
116_localedir:          dir,     none,     '%{_datadir}/locale'
117_localstatedir:      dir,     none,     '%{_prefix}/var'
118_pathprepend:        none,    none,     ''
119_pathpostpend:       none,    none,     ''
120_prefix:             dir,     none,     '%{_usr}'
121_usr:                dir,     none,     '/usr/local'
122_usrsrc:             dir,     none,     '%{_usr}/src'
123_var:                dir,     none,     '/usr/local/var'
124_varrun:             dir,     none,     '%{_var}/run'
125
126# Defaults, override in platform specific modules.
127___setup_shell:      exe,     required, '/bin/sh'
128__aclocal:           exe,     optional, 'aclocal'
129__ar:                exe,     required, 'ar'
130__arch_install_post: exe,     none,     '%{nil}'
131__as:                exe,     required, 'as'
132__autoconf:          exe,     optional, 'autoconf'
133__autoheader:        exe,     optional, 'autoheader'
134__automake:          exe,     optional, 'automake'
135__autoreconf:        exe,     optional, 'autoreconf'
136__awk:               exe,     required, 'awk'
137__bash:              exe,     optional, '/bin/bash'
138__bison:             exe,     required, '/usr/bin/bison'
139__bzip2:             exe,     required, '/usr/bin/bzip2'
140__cat:               exe,     required, '/bin/cat'
141__cc:                exe,     required, '/usr/bin/gcc'
142__chgrp:             exe,     required, '/usr/bin/chgrp'
143__chmod:             exe,     required, '/bin/chmod'
144__chown:             exe,     required, '/usr/sbin/chown'
145__cp:                exe,     required, '/bin/cp'
146__cpp:               exe,     none,     '%{__cc} -E'
147__cvs:               exe,     optional, '/usr/bin/cvs'
148__cvs_z:             none,    none,     '%{__cvs} -z 9'
149__cxx:               exe,     required, '/usr/bin/g++'
150__flex:              exe,     required, '/usr/bin/flex'
151__git:               exe,     required, '/usr/bin/git'
152__grep:              exe,     required, '/usr/bin/grep'
153__gzip:              exe,     required, '/usr/bin/gzip'
154__id:                exe,     required, '/usr/bin/id'
155__id_u:              exe,     none,     '%{__id} -u'
156__install:           exe,     required, '/usr/bin/install'
157__install_info:      exe,     optional, '/usr/bin/install-info'
158__ld:                exe,     required, '/usr/bin/ld'
159__ldconfig:          exe,     required, '/sbin/ldconfig'
160__ln_s:              exe,     none,     'ln -s'
161__make:              exe,     required, 'make'
162__makeinfo:          exe,     required, '/usr/bin/makeinfo'
163__mkdir:             exe,     required, '/bin/mkdir'
164__mkdir_p:           exe,     none,     '/bin/mkdir -p'
165__mv:                exe,     required, '/bin/mv'
166__nm:                exe,     required, '/usr/bin/nm'
167__objcopy:           exe,     optional, '/usr/bin/objcopy'
168__objdump:           exe,     optional, '/usr/bin/objdump'
169__patch_bin:         exe,     required, '/usr/bin/patch'
170__patch_opts:        none,    none,     '%{nil}'
171__patch:             exe,     none,     '%{__patch_bin} %{__patch_opts}'
172__perl:              exe,     optional, 'perl'
173__svn:               exe,     optional, '/usr/bin/svn'
174__ranlib:            exe,     required, 'ranlib'
175__rm:                exe,     required, '/bin/rm'
176__rmfile:            exe,     none,     '%{__rm} -f'
177__rmdir:             exe,     none,     '%{__rm} -rf'
178__sed:               exe,     required, '/usr/bin/sed'
179__setup_post:        exe,     none,     '%{__chmod} -R a+rX,g-w,o-w .'
180__sh:                exe,     required, '/bin/sh'
181__tar:               exe,     required, '/usr/bin/tar'
182__tar_extract:       exe,     none,     '%{__tar} -xvvf'
183__touch:             exe,     required, '/usr/bin/touch'
184__unzip:             exe,     required, '/usr/bin/unzip'
185__xz:                exe,     required, '/usr/bin/xz'
186
187# Shell Build Settings.
188___build_args:       none,    none,     '-e'
189___build_cmd:        none,    none,     '%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}'
190___build_post:       none,    none,     'exit 0'
191
192# Prebuild set up script.
193___build_pre:        none,    none,     '''# ___build_pre in as set up in defaults.py
194# Save the original path away.
195export SB_ORIG_PATH=${PATH}
196# Directories
197%{?_prefix:SB_PREFIX="%{_prefix}"}
198%{?_prefix:SB_PREFIX_CLEAN=$(echo "%{_prefix}" | %{__sed} -e 's/^\///')}
199SB_SOURCE_DIR="%{_sourcedir}"
200SB_BUILD_DIR="%{_builddir}"
201# host == build, use build; host != build, host uses host and build uses build
202SB_HOST_CPPFLAGS="%{host_includes}"
203SB_HOST_CFLAGS="%{host_cflags} %{host_includes}"
204SB_HOST_CXXFLAGS="%{host_cxxflags} %{host_includes}"
205SB_HOST_LDFLAGS="%{?host_ldflags:%{host_ldflags}} %{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}"
206SB_BUILD_CFLAGS="%{build_cflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}"
207SB_BUILD_CXXFLAGS="%{build_cxxflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}"
208SB_BUILD_LDFLAGS="%{?build_ldflags:%{build_ldflags}} %{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}"
209SB_CFLAGS="${SB_BUILD_CFLAGS} %{build_includes}"
210SB_CXXFLAGS="${SB_BUILD_CXXFLAGS} %{build_includes}"
211SB_ARCH="%{_arch}"
212SB_OS="%{_os}"
213export SB_SOURCE_DIR SB_BUILD_DIR SB_ARCH SB_OS
214export SB_HOST_CPPFLAGS SB_HOST_CFLAGS SB_HOST_CXXFLAGS SB_HOST_LDFLAGS
215export SB_BUILD_CFLAGS SB_BUILD_CXXFLAGS SB_BUILD_LDFLAGS
216export SB_CFLAGS SB_CXXFLAGS
217# Documentation
218SB_DOC_DIR="%{_docdir}"
219export SB_DOC_DIR
220# Packages
221SB_PACKAGE_NAME="%{name}"
222SB_PACKAGE_BUILDNAME="%{buildname}"
223SB_PACKAGE_VERSION="%{version}"
224SB_PACKAGE_RELEASE="%{release}"
225export SB_PACKAGE_NAME SB_PACKAGE_VERSION SB_PACKAGE_RELEASE
226# Build directories
227export SB_PREFIX
228%{?_builddir:SB_BUILD_DIR="%{_builddir}"}
229%{?buildroot:SB_BUILD_ROOT="%{buildroot}"}
230%{?buildroot:%{?_prefix:SB_BUILD_ROOT_BINDIR="%{buildroot}/${SB_PREFIX_CLEAN}/bin"}}
231export SB_BUILD_ROOT SB_BUILD_DIR SB_BUILD_ROOT_BINDIR
232%{?_buildcxcdir:SB_BUILD_CXC_DIR="%{_buildcxcdir}"}
233%{?buildcxcroot:SB_BUILD_CXC_ROOT="%{buildcxcroot}"}
234%{?buildcxcroot:%{?_prefix:SB_BUILD_CXC_ROOT_BINDIR="%{buildcxcroot}/${SB_PREFIX_CLEAN}/bin"}}
235export SB_BUILD_CXC_ROOT SB_BUILD_CXC_DIR SB_BUILD_CXC_ROOT_BINDIR
236%{?_tmproot:SB_TMPROOT="%{_tmproot}"}
237%{?_tmproot:%{?_prefix:SB_TMPPREFIX="%{_tmproot}/${SB_PREFIX_CLEAN}"}}
238%{?_tmproot:%{?_prefix:SB_TMPBINDIR="%{_tmproot}/${SB_PREFIX_CLEAN}/bin"}}
239export SB_TMPROOT SB_TMPPREFIX SB_TMPBINDIR
240%{?_tmpcxcroot:SB_TMPCXCROOT="%{_tmproot}"}
241%{?_tmpcxcroot:%{?_prefix:SB_TMPCXCPREFIX="%{_tmpcxcroot}/${SB_PREFIX_CLEAN}"}}
242%{?_tmpcxcroot:%{?_prefix:SB_TMPCXCBINDIR="%{_tmpcxcroot}/${SB_PREFIX_CLEAN}/bin"}}
243export SB_TMPCXCROOT SB_TMPCXCPREFIX SB_TMPCXCBINDIR
244# Extra path support
245%{?_extra_path:SB_EXTRAPATH="%{_extra_path}"}
246# The compiler flags
247%{?_targetcflags:CFLAGS_FOR_TARGET="%{_targetcflags}"}
248%{?_targetcxxflags:CXXFLAGS_FOR_TARGET="%{_targetcxxflags}"}
249export CFLAGS_FOR_TARGET
250export CXXFLAGS_FOR_TARGET
251# Set up the path. Put the CXC path first.
252if test -n "${SB_TMPBINDIR}" ; then
253 PATH="${SB_TMPBINDIR}:$PATH"
254fi
255if test -n "${SB_TMPCXCBINDIR}" ; then
256 PATH="${SB_TMPCXCBINDIR}:$PATH"
257fi
258if test -n "${SB_EXTRAPATH}" ; then
259 PATH="${SB_EXTRAPATH}:$PATH"
260fi
261%{?_pathprepend:PATH="%{_pathprepend}:$PATH"}
262%{?_pathpostpend:PATH="$PATH:%{_pathpostpend}"}
263export PATH
264# Default environment set up.
265LANG=C
266export LANG
267unset DISPLAY || :
268umask 022
269cd "%{_builddir}"'''
270
271___build_shell:      none,    none,     '%{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}'
272
273___build_template:   none,    none,     '''#!%{___build_shell}
274%{___build_pre}
275%{nil}'''
276
277# Configure command
278configure:           none,    none,     '''
279CFLAGS="${CFLAGS:-${SB_CFLAGS}" ; export CFLAGS ;
280CXXFLAGS="${CXXFLAGS:-${SB_CFLAGS}}" ; export CXXFLAGS ;
281FFLAGS="${FFLAGS:-${SB_CFLAGS}}" ; export FFLAGS ;
282./configure --build=%{_build} --host=%{_host} \
283      --target=%{_target_platform} \
284      --program-prefix=%{?_program_prefix} \
285      --prefix=%{_prefix} \
286      --exec-prefix=%{_exec_prefix} \
287      --bindir=%{_bindir} \
288      --sbindir=%{_sbindir} \
289      --sysconfdir=%{_sysconfdir} \
290      --datadir=%{_datadir} \
291      --includedir=%{_includedir} \
292      --libdir=%{_libdir} \
293      --libexecdir=%{_libexecdir} \
294      --localstatedir=%{_localstatedir} \
295      --sharedstatedir=%{_sharedstatedir} \
296      --mandir=%{_mandir} \
297      --infodir=%{_infodir}'''
298
299# Build script support.
300build_directory:     none,    none,     '''
301if test "%{_build}" != "%{_host}" ; then
302  # Cross-build (Xc) if no target or the host and target match.
303  # Canadian-cross (Cxc) if build, host and target are all different.
304  if test -z "%{_target}" -o "%{_host}" == "%{_target}" ; then
305    build_dir="build-xc"
306  else
307    build_dir="build-cxc"
308  fi
309else
310  build_dir="build"
311fi'''
312
313# Host/build flags.
314host_build_flags:    none,    none,     '''
315# Host and build flags, Cross build if host and build are different and
316# Cxc build if target is deifned and also different.
317# Note, gcc is not ready to be compiled with -std=gnu99 (this needs to be checked).
318if test "%{_build}" != "%{_host}" ; then
319  # Cross build
320  CC=$(echo "%{_host}-%{_host_cc}" | sed -e 's,-std=gnu99 ,,')
321  CXX=$(echo "%{_host}-%{_host_cxx}" | sed -e 's,-std=gnu99 ,,')
322  CPPFLAGS="${SB_HOST_CPPFLAGS}"
323  CFLAGS="${SB_HOST_CFLAGS}"
324  CXXFLAGS="${SB_HOST_CXXFLAGS}"
325  LDFLAGS="${SB_HOST_LDFLAGS}"
326  # Host
327  CPPFLAGS_FOR_HOST="${SB_HOST_CPPFLAGS}"
328  CFLAGS_FOR_HOST="${SB_HOST_CFLAGS}"
329  CXXFLAGS_FOR_HOST="${SB_HOST_CXXFLAGS}"
330  LDFLAGS_FOR_HOST="${SB_HOST_LDFLAGS}"
331  CXXFLAGS_FOR_HOST="${SB_HOST_CFLAGS}"
332  CC_FOR_HOST=$(echo "%{_host_cc} ${SB_HOST_CFLAGS}" | sed -e 's,-std=gnu99 ,,')
333  CXX_FOR_HOST=$(echo "%{_host_cxx} ${SB_HOST_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,')
334  # Build
335  CFLAGS_FOR_BUILD="${SB_BUILD_CFLAGS}"
336  CXXFLAGS_FOR_BUILD="${SB_BUILD_CXXFLAGS}"
337  LDFLAGS_FOR_BUILD="${SB_BUILD_LDFLAGS}"
338  CXXFLAGS_FOR_BUILD="${SB_BUILD_CFLAGS}"
339  CC_FOR_BUILD=$(echo "%{__cc} ${SB_BUILD_CFLAGS}" | sed -e 's,-std=gnu99 ,,')
340  CXX_FOR_BUILD=$(echo "%{__cxx} ${SB_BUILD_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,')
341else
342  LDFLAGS="${SB_BUILD_LDFLAGS}"
343  CC=$(echo "%{__cc} ${SB_BUILD_CFLAGS}" | sed -e 's,-std=gnu99 ,,')
344  CXX=$(echo "%{__cxx} ${SB_BUILD_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,')
345  CC_FOR_BUILD=${CC}
346  CXX_FOR_BUILD=${CXX}
347fi
348export CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS
349export CC_FOR_HOST CXX_FOR_HOST CPPFLAGS_FOR_HOST CFLAGS_FOR_HOST CXXFLAGS_FOR_HOST LDFLAGS_FOR_HOST
350export CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD'''
351
352# Build/build flags.
353build_build_flags:    none,    none,     '''
354# Build and build flags means force build == host
355# gcc is not ready to be compiled with -std=gnu99
356LDFLAGS="${SB_HOST_LDFLAGS}"
357CC=$(echo "%{__cc} ${SB_CFLAGS}" | sed -e 's,-std=gnu99 ,,')
358CXX=$(echo "%{__cxx} ${SB_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,')
359CC_FOR_BUILD=${CC}
360CXX_FOR_BUILD=${CXX}
361export CC CXX CC_FOR_BUILD CXX_FOR_BUILD CFLAGS LDFLAGS'''
362
363# Default package settings
364_forced_static:     none,         none, '-Xlinker -Bstatic ${LIBS_STATIC} -Xlinker -Bdynamic'
365__xz:                exe,     required, '/usr/bin/xz'
366
367# Mail Support
368_mail_smtp_host:   none,         none, 'localhost'
369_mail_tools_to:    none,         none, 'rtems-tooltestresults@rtems.org'
370
371# Newlib ICONV encodings
372_newlib_iconv_encodings: none,      none, '''big5,cp775,cp850,cp852,cp855,\
373cp866,euc_jp,euc_kr,euc_tw,iso_8859_1,iso_8859_10,iso_8859_11,\
374iso_8859_13,iso_8859_14,iso_8859_15,iso_8859_2,iso_8859_3,\
375iso_8859_4,iso_8859_5,iso_8859_6,iso_8859_7,iso_8859_8,iso_8859_9,\
376iso_ir_111,koi8_r,koi8_ru,koi8_u,koi8_uni,ucs_2,ucs_2_internal,\
377ucs_2be,ucs_2le,ucs_4,ucs_4_internal,ucs_4be,ucs_4le,us_ascii,\
378utf_16,utf_16be,utf_16le,utf_8,win_1250,win_1251,win_1252,\
379win_1253,win_1254,win_1255,win_1256,win_1257,win_1258'''
Note: See TracBrowser for help on using the repository browser.