Browse Source

Stefan Fiedler:


			
			
				rocklinux
			
			
		
Stefan Fiedler 19 years ago
parent
commit
05e50acc89
33 changed files with 644 additions and 739 deletions
  1. +90
    -0
      misc/config/config-200-defaults.in
  2. +4
    -4
      misc/config/config-900-crosstools.in
  3. +6
    -6
      misc/jailing/config.in
  4. +14
    -0
      misc/output/noexpertconfig.in
  5. +3
    -2
      misc/pkgsel/config-100.in
  6. +5
    -7
      package/base/automake/preconfig.in
  7. +3
    -6
      package/base/bash/preconfig.in
  8. +6
    -9
      package/base/bdb/preconfig.in
  9. +2
    -60
      package/base/gcc/config-300.in
  10. +10
    -0
      package/base/gcc/preconfig.in
  11. +2
    -4
      package/base/hfsutils/preconfig.in
  12. +8
    -9
      package/base/linux/preconfig.in
  13. +0
    -35
      package/base/lprng/config.in
  14. +0
    -35
      package/base/sendmail/config.in
  15. +3
    -5
      package/blindcoder/ksimus/preconfig.in
  16. +2
    -5
      package/import/cpan/preconfig.in
  17. +2
    -5
      package/import/kde-i18n/preconfig.in
  18. +2
    -5
      package/import/koffice-l10n/preconfig.in
  19. +3
    -7
      package/kasc/clanlib/preconfig.in
  20. +3
    -6
      package/public/vnc/preconfig.in
  21. +1
    -1
      package/stf/gatos-ati-remote/config.in
  22. +3
    -6
      package/tsa/nvidia/preconfig.in
  23. +3
    -5
      package/x11/qt/preconfig.in
  24. +5
    -0
      package/x11/xfree86/postconfig.in
  25. +1
    -0
      package/x11/xfree86/preconfig.in
  26. +2
    -0
      package/x86/icc/preconfig.in
  27. +1
    -3
      package/xorg/mesalib/preconfig.in
  28. +0
    -32
      package/xorg/xorg-server/config.in
  29. +5
    -0
      package/xorg/xorg-server/postconfig.in
  30. +1
    -0
      package/xorg/xorg-server/preconfig.in
  31. +204
    -166
      scripts/Config
  32. +146
    -153
      scripts/config.func
  33. +104
    -163
      scripts/config.in

+ 90
- 0
misc/config/config-200-defaults.in

@ -0,0 +1,90 @@
#!/bin/bash
comment ' '
menu_begin MENU_DEFAULTS 'Package Defaults'
comment "Default compilers"
block_begin 3
choice ROCKCFG_DEFAULT_CC gcc42 $CFGTEMP_DEFAULT_CC
choice ROCKCFG_DEFAULT_KCC gcc42 $CFGTEMP_DEFAULT_KCC
choice ROCKCFG_DEFAULT_CXX gcc42 $CFGTEMP_DEFAULT_CXX
choice ROCKCFG_DEFAULT_F77 gcc42 $CFGTEMP_DEFAULT_F77
choice ROCKCFG_DEFAULT_F95 gcc42 $CFGTEMP_DEFAULT_F95
pkgenable $ROCKCFG_DEFAULT_CC
pkgenable $ROCKCFG_DEFAULT_KCC
pkgenable $ROCKCFG_DEFAULT_CXX
pkgenable $ROCKCFG_DEFAULT_F77
pkgenable $ROCKCFG_DEFAULT_F95
block_end
# build non-default CCs in stages 5 and 9
# and dedicated C++ and Fortran77 compilers in stages 2 and 9
k=""; for x in $CFGTEMP_DEFAULT_CC $CFGTEMP_DEFAULT_CXX $CFGTEMP_DEFAULT_F77 ; do
if [ "$ROCKCFG_DEFAULT_CC" != "$x" ] ; then
if [[ "$ROCKCFG_DEFAULT_CXX" != "$x" && \
"$ROCKCFG_DEFAULT_F77" != "$x" ]]; then
k="$k /[ =]$x / s/^\(.\) [0-9-]*/\1 -----5---9/;";
else
k="$k /[ =]$x / s/^\(.\) [0-9-]*/\1 --2------9/;"
fi
fi
done
pkgfilter sed -e "$k"
comment ' '
comment "Default X server"
block_begin 3
choice ROCKCFG_DEFAULT_X11 xorg $CFGTEMP_DEFAULT_X11
block_end
# comment ' '
# comment "Default shell"
# block_begin 3
# choice ROCKCFG_DEFAULT_SH bash3 $CFGTEMP_DEFAULT_SH
# block_end
#
# comment ' '
# comment "Default C library"
# block_begin 3
# choice ROCKCFG_DEFAULT_LIBC glibc26 $CFGTEMP_DEFAULT_LIBC
# block_end
# the options below read the packages file
pkgout
comment ' '
comment "Default Printer Package"
block_begin 3
default='none'; list=' '
while read pkg ver ; do
default=${default:-$pkg}
[ $pkg = lprng ] && default=$pkg
list="$list $pkg Use_${pkg}_($ver)_as_standard_print_system"
done < <(grep " PRINTER " $swpdir/packages | cut -f5,6 -d' ')
list="$list none Do_not_configure_a_default_print_system"
choice ROCKCFG_DEFAULT_PRINTER $default $list
if [ "$ROCKCFG_DEFAULT_PRINTER" != none ] ; then
pkgenable $ROCKCFG_DEFAULT_PRINTER
fi
block_end
comment ' '
comment "Default MTA"
block_begin 3
default='none'; list=' '
while read pkg ver ; do
default=${default:-$pkg}
[ $pkg = sendmail ] && default=sendmail
list="$list $pkg Use_${pkg}_($ver)_as_standard_MTA"
done < <(grep " MTA " $swpdir/packages | cut -f5,6 -d' ')
list="$list none Do_not_configure_a_default_MTA"
choice ROCKCFG_DEFAULT_MTA $default $list
if [ "$ROCKCFG_DEFAULT_MTA" != none ] ; then
pkgenable $ROCKCFG_DEFAULT_MTA
fi
block_end
menu_end

misc/config/config-200-crosstools.in → misc/config/config-900-crosstools.in

@ -36,19 +36,19 @@ menu_begin MENU_CROSSTOOLS 'Cross Toolchain Creation'
else
stages="-1--------"
fi
if [ "$( eval echo \$ROCKCFG_PKG_CROSSTOOL_$crosstarget )" == 1 ] ; then
pkgfork binutils binutils-cross-$crosstarget stages $stages
pkgfork linux-libc-headers linux-libc-headers-cross-$crosstarget \
stages $stages
if [ "$ROCKCFG_PKG_GLIBC22_USEIT" = 1 ] ; then
pkgfork glibc glibc22-cross-$crosstarget stages $stages
else
pkgfork glibc glibc23-cross-$crosstarget stages $stages
fi
pkgfork gcc $ROCKCFG_DEFAULT_CC-cross-$crosstarget stages $stages
fi
done

+ 6
- 6
misc/jailing/config.in

@ -28,18 +28,18 @@ menu_begin MENU_JAILING 'Chroot-Jailing Options'
text 'Base directory for jail' ROCKCFG_BASEJAIL jail
if pkgcheck libsafe X ; then
bool 'Install and enable libsafe in jails' \
ROCKCFG_JAILING_LIBSAFE 1
ROCKCFG_JAILING_LIBSAFE 1
fi
comment "-- Packages --"
for y in `grep '^X.* JAIL ' \
config/$config.$swpid/packages | cut -d' ' -f5`
config/$config.$swpid/packages | cut -d' ' -f5`
do
bool "Enable jailing in package $y" \
ROCKCFG_JAILING_$y 1
if eval "[ \"\${ROCKCFG_JAILING_$y}\" = 1 ]" ; then
ROCKCFG_JAILING_${y#*=} 1
if eval "[ \"\$ROCKCFG_JAILING_${y#*=}\" = 1 ]" ; then
block_begin 2
text "$y jail directory" ROCKCFG_JAILDIR_$y \
"$ROCKCFG_BASEJAIL/$y"
text "$y jail directory" ROCKCFG_JAILDIR_${y#*=} \
"$ROCKCFG_BASEJAIL/${y#*=}"
block_end
fi
done

+ 14
- 0
misc/output/noexpertconfig.in

@ -23,6 +23,20 @@
comment ' '
comment '- Build Output (terminal and others) Configuration'
block_begin 3
bool 'Send emails on special events' ROCKCFG_SENDMAIL 0
if [ "$ROCKCFG_SENDMAIL" = 1 ] ; then
block_begin
text 'Sendmail program' ROCKCFG_SENDMAIL_BIN 'sendmail'
text 'Recipient address' ROCKCFG_SENDMAIL_TO 'root'
block_end
fi
bool 'HTTP GET request on special events' ROCKCFG_HTTP 0
if [ "$ROCKCFG_HTTP" = 1 ] ; then
block_begin
text 'Website' ROCKCFG_HTTP_SITE 'http://pallas.crash-override.net/cgi-bin/rocklogbot?package=PACKAGE&config=CONFIG&status=STATUS&stage=STAGE'
block_end
fi
bool 'Use ANSI colors for terminal output' \
ROCKCFG_OUTPUT_TERM_COLOR 1
bool 'Print Build-Output to terminal when building' \

+ 3
- 2
misc/pkgsel/config-100.in

@ -1,5 +1,6 @@
#!/bin/bash
expert_begin
comment ' '
comment '- Additional Package Selection'
block_begin 3
choice ROCKCFG_PKGSEL_TPL none none 'No package preselection template' \
@ -57,4 +58,4 @@
--textbox config/$config.$swpid/packages.txt \
$(( $lines - 4 )) $(( $columns - 5 ))"
block_end
comment ' '
expert_end

+ 5
- 7
package/base/automake/preconfig.in

@ -20,11 +20,9 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck automake X
then
pkgfork automake automake17 unflag CORE
pkgfork automake automake18 unflag CORE
pkgfork automake automake19
pkgremove automake
fi
pkgfork automake automake17 unflag CORE
pkgfork automake automake18 unflag CORE
pkgfork automake automake19
pkgremove automake

+ 3
- 6
package/base/bash/preconfig.in

@ -20,9 +20,6 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck bash X
then
pkgfork bash bash2
pkgfork bash bash3
pkgremove bash
fi
pkgfork bash bash2
pkgfork bash bash3
pkgremove bash

+ 6
- 9
package/base/bdb/preconfig.in

@ -20,12 +20,9 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck bdb X
then
pkgfork bdb bdb33 unflag CORE
pkgfork bdb bdb40 unflag CORE
pkgfork bdb bdb41 unflag CORE
pkgfork bdb bdb42 unflag CORE
pkgfork bdb bdb44
pkgremove bdb
fi
pkgfork bdb bdb33 unflag CORE
pkgfork bdb bdb40 unflag CORE
pkgfork bdb bdb41 unflag CORE
pkgfork bdb bdb42 unflag CORE
pkgfork bdb bdb44
pkgremove bdb

+ 2
- 60
package/base/gcc/config-300.in

@ -1,3 +1,4 @@
#!/bin/bash
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
@ -20,66 +21,8 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck gcc X
then
if pkgcheck "gcc=.*" X ; then
menu_begin MENU_COMPILER 'GCC Compiler Options'
bool 'Building gcc 2.x package' ROCKCFG_PKG_GCC_GCC2 0
bool 'Building gcc 3.2.x package' ROCKCFG_PKG_GCC_GCC32 0
bool 'Building gcc 3.3.x package' ROCKCFG_PKG_GCC_GCC33 0
bool 'Building gcc 3.4.x package' ROCKCFG_PKG_GCC_GCC34 0
bool 'Building gcc 4.0.x package' ROCKCFG_PKG_GCC_GCC40 0
bool 'Building gcc 4.1.x package' ROCKCFG_PKG_GCC_GCC41 0
bool 'Building gcc 4.2.x package' ROCKCFG_PKG_GCC_GCC42 1
d="none" ; l="" ; m=""
if [ $ROCKCFG_PKG_GCC_GCC2 = 1 ]; then pkgfork gcc gcc2; d="gcc2"; l="$l $d"; fi
if [ $ROCKCFG_PKG_GCC_GCC32 = 1 ]; then pkgfork gcc gcc32; d="gcc32"; l="$l $d"; fi
if [ $ROCKCFG_PKG_GCC_GCC33 = 1 ]; then pkgfork gcc gcc33; d="gcc33"; l="$l $d"; fi
if [ $ROCKCFG_PKG_GCC_GCC34 = 1 ]; then pkgfork gcc gcc34; d="gcc34"; l="$l $d"; fi
if [ $ROCKCFG_PKG_GCC_GCC40 = 1 ]; then pkgfork gcc gcc40; d="gcc40"; l="$l $d"; m="$m $d"; fi
if [ $ROCKCFG_PKG_GCC_GCC41 = 1 ]; then pkgfork gcc gcc41; d="gcc41"; l="$l $d"; m="$m $d"; fi
if [ $ROCKCFG_PKG_GCC_GCC42 = 1 ]; then pkgfork gcc gcc42; d="gcc42"; l="$l $d"; m="$m $d"; fi
pkgremove gcc
k=""; for x in $l; do
k="$k $x Use_${x}_as_standard_C_compiler"
done
choice ROCKCFG_DEFAULT_CC $d $k
k=""; for x in $l; do
k="$k $x Use_${x}_as_standard_Kernel_C_compiler"
done
choice ROCKCFG_DEFAULT_KCC $d $k
k=""; for x in $l; do
k="$k $x Use_${x}_as_standard_C++_compiler"
done
choice ROCKCFG_DEFAULT_CXX $d $k
k=""; for x in $l; do
k="$k $x Use_${x}_as_standard_Fortran_77_compiler"
done
choice ROCKCFG_DEFAULT_F77 $d $k
k=""; for x in $m; do
k="$k $x Use_${x}_as_standard_Fortran_95_compiler"
done
[ "$k" ] && choice ROCKCFG_DEFAULT_F95 $d $k
# build non-default CCs in stages 5 and 9
# and dedicated C++ and Fortran77 compilers in stages 2 and 9
k=""; for x in gcc2 gcc32 gcc33 gcc34 gcc40 gcc41 gcc42; do
if [ "$ROCKCFG_DEFAULT_CC" != "$x" ] ; then
if [[ "$ROCKCFG_DEFAULT_CXX" != "$x" && "$ROCKCFG_DEFAULT_F77" != "$x" ]]; then
k="$k / gcc=$x / s/^\(.\) [0-9-]*/\1 -----5---9/;";
else
k="$k / gcc=$x / s/^\(.\) [0-9-]*/\1 --2------9/;"
fi
fi
done
pkgfilter sed -e "$k"
bool 'Use Stack-Smashing Protector when available' \
ROCKCFG_PKG_GCC_STACKPRO 0
include "package/*/*/subconfig-gcc.in"
@ -141,7 +84,6 @@ then
ROCKCFG_PKG_GCC42_PROFILED 1
include "package/*/*/subconfig-gcc42.in"
fi
menu_end
fi

+ 10
- 0
package/base/gcc/preconfig.in

@ -0,0 +1,10 @@
#!/bin/bash
for x in gcc2 gcc32 gcc33 gcc34 gcc40 gcc41 gcc42 ; do
pkgfork gcc $x status O
CFGTEMP_DEFAULT_CC="$x Use_${x}_as_default_C_compiler $CFGTEMP_DEFAULT_CC"
CFGTEMP_DEFAULT_KCC="$x Use_${x}_as_default_kernel_compiler $CFGTEMP_DEFAULT_KCC"
CFGTEMP_DEFAULT_CXX="$x Use_${x}_as_default_C++_compiler $CFGTEMP_DEFAULT_CXX"
CFGTEMP_DEFAULT_F77="$x Use_${x}_as_default_Fortran_77_compiler $CFGTEMP_DEFAULT_F77"
[[ "$x" == gcc4* ]] && CFGTEMP_DEFAULT_F95="$x Use_${x}_as_default_Fortran_95_compiler $CFGTEMP_DEFAULT_F95"
done
pkgremove gcc

+ 2
- 4
package/base/hfsutils/preconfig.in

@ -21,9 +21,7 @@
# --- ROCK-COPYRIGHT-NOTE-END ---
if [ "$ROCKCFG_ARCH" = powerpc ]; then
if pkgcheck hfsutils X; then
pkgfork hfsutils hfsutils flag CORE
pkgremove hfsutils
fi
pkgfork hfsutils hfsutils flag CORE
pkgremove hfsutils
fi

+ 8
- 9
package/base/linux/preconfig.in

@ -1,9 +1,8 @@
if pkgcheck linux X
then
pkgfork linux linux24 unflag CORE
pkgfork linux linux24-source unflag CORE
pkgfork linux linux26 stages -X---5---9
pkgfork linux linux26-source
pkgfork linux linux26-headers stages 01-------9 priority 100.200
pkgremove linux
fi
pkgfork linux linux24 unflag CORE
pkgfork linux linux24-source unflag CORE
pkgfork linux linux26 stages -X---5---9
pkgfork linux linux26-source
pkgfork linux linux26-headers stages 01-------9 priority 100.200
pkgremove linux
CFGTEMP_LINUX_HEADERS="$CFGTEMP_LINUX_HEADERS linux26-headers"

+ 0
- 35
package/base/lprng/config.in

@ -1,35 +0,0 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/lprng/config.in
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
menu_begin MENU_PRINTER 'Selecting Print System'
pkgout
default=''; list=''
while read pkg ver ; do
default=${default:-$pkg}
[ $pkg = lprng ] && default=$pkg
list="$list $pkg Use_${pkg}_($ver)_as_standard_print_system"
done < <(grep "^X .* PRINTER " config/$config.$swpid/packages | cut -f5,6 -d' ')
default=${default:-none}
list="$list none Do_not_configure_a_default_print_system"
choice ROCKCFG_DEFAULT_PRINTER $default $list
menu_end

+ 0
- 35
package/base/sendmail/config.in

@ -1,35 +0,0 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/sendmail/config.in
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
menu_begin MENU_MAILER 'Selecting MTA (mail transfer agent)'
pkgout
default=''; list=''
while read pkg ver ; do
default=${default:-$pkg}
[ $pkg = sendmail ] && default=sendmail
list="$list $pkg Use_${pkg}_($ver)_as_standard_MTA"
done < <(grep "^X .* MTA " config/$config.$swpid/packages | cut -f5,6 -d' ')
default=${default:-none}
list="$list none Do_not_configure_a_default_MTA"
choice ROCKCFG_DEFAULT_MTA $default $list
menu_end

+ 3
- 5
package/blindcoder/ksimus/preconfig.in

@ -20,8 +20,6 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck ksimus X ; then
pkgfork ksimus ksimus-boolean
pkgfork ksimus ksimus-datarecorder
pkgfork ksimus ksimus-floatingpoint
fi
pkgfork ksimus ksimus-boolean
pkgfork ksimus ksimus-datarecorder
pkgfork ksimus ksimus-floatingpoint

+ 2
- 5
package/import/cpan/preconfig.in

@ -20,9 +20,6 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck cpan X
then
. package/import/cpan/hosted_cpan.cfg
pkgremove cpan
fi
. package/import/cpan/hosted_cpan.cfg
pkgremove cpan

+ 2
- 5
package/import/kde-i18n/preconfig.in

@ -20,8 +20,5 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck kde-i18n X
then
. package/import/kde-i18n/hosted.cfg
pkgremove kde-i18n
fi
. package/import/kde-i18n/hosted.cfg
pkgremove kde-i18n

+ 2
- 5
package/import/koffice-l10n/preconfig.in

@ -20,8 +20,5 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck koffice-l10n X
then
. package/import/koffice-l10n/hosted.cfg
pkgremove koffice-l10n
fi
. package/import/koffice-l10n/hosted.cfg
pkgremove koffice-l10n

+ 3
- 7
package/kasc/clanlib/preconfig.in

@ -20,10 +20,6 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck clanlib X
then
pkgfork clanlib clanlib06
pkgfork clanlib clanlib07
pkgremove clanlib
fi
pkgfork clanlib clanlib06
pkgfork clanlib clanlib07
pkgremove clanlib

+ 3
- 6
package/public/vnc/preconfig.in

@ -20,9 +20,6 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck vnc X
then
pkgfork vnc vnc-xfree86
pkgfork vnc vnc-xorg
pkgremove vnc
fi
pkgfork vnc vnc-xfree86
pkgfork vnc vnc-xorg
pkgremove vnc

+ 1
- 1
package/stf/gatos-ati-remote/config.in

@ -21,7 +21,7 @@
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck gatos-ati-remote X; then
if [ $ROCKCFG_PKG_LINUX_IMG24 == 0 ]; then
if [ "$ROCKCFG_PKG_LINUX_IMG24" == 0 ]; then
pkgdisable gatos-ati-remote
fi
fi

+ 3
- 6
package/tsa/nvidia/preconfig.in

@ -20,9 +20,6 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck nvidia X
then
pkgfork nvidia nvidia
pkgfork nvidia nvidia-legacy
pkgremove nvidia
fi
pkgfork nvidia nvidia
pkgfork nvidia nvidia-legacy
pkgremove nvidia

+ 3
- 5
package/x11/qt/preconfig.in

@ -1,5 +1,3 @@
if pkgcheck qt X; then
pkgfork qt qt33
pkgfork qt qt42 unflag CORE
pkgremove qt
fi
pkgfork qt qt33
pkgfork qt qt42 unflag CORE
pkgremove qt

+ 5
- 0
package/x11/xfree86/postconfig.in

@ -0,0 +1,5 @@
if [ "$ROCKCFG_DEFAULT_X11" != xfree86 ] ; then
pkgremove xfree86
pkgremove xfree86-cyrillic-fonts
pkgremove xfree86-doc
fi

+ 1
- 0
package/x11/xfree86/preconfig.in

@ -0,0 +1 @@
CFGTEMP_DEFAULT_X11="$CFGTEMP_DEFAULT_X11 xfree86 Use_XFree86_as_default_X11_server"

+ 2
- 0
package/x86/icc/preconfig.in

@ -0,0 +1,2 @@
CFGTEMP_DEFAULT_CC="icc Use_icc_as_default_C_compiler $CFGTEMP_DEFAULT_CC"
CFGTEMP_DEFAULT_CXX="icc Use_icc_as_default_C++_compiler $CFGTEMP_DEFAULT_CXX"

+ 1
- 3
package/xorg/mesalib/preconfig.in

@ -1,3 +1 @@
if pkgcheck mesalib X; then
pkgfork mesalib mesademos stages ------6--9
fi
pkgfork mesalib mesademos stages ------6--9

+ 0
- 32
package/xorg/xorg-server/config.in

@ -23,39 +23,7 @@
if pkgcheck xfree86 X || pkgcheck xorg-server X
then
menu_begin MENU_PKG_XORG 'X.Org / XFree86 Options'
if pkgcheck xfree86 X && pkgcheck xorg-server X
then
bool 'Build X.Org (instead of Xfree86)' \
ROCKCFG_PKG_XORG_BUILD 1
if [ $ROCKCFG_PKG_XORG_BUILD = 1 ] ; then
pkgremove xfree86
else
pkgremove xorg
fi
else
if pkgcheck xfree86 X; then
comment 'Using XFree86 (xorg already disabled)'
fi
if pkgcheck xorg X; then
comment 'Using X.Org (xfree86 already disabled)'
fi
fi
bool 'Enable Xinerama support globally' \
ROCKCFG_PKG_XORG_XINERAMA 1
menu_end
fi
if ! pkgcheck xfree86 X; then
pkgremove xfree86
pkgremove xfree86-cyrillic-fonts
pkgremove xfree86-doc
fi
if ! pkgcheck xorg-server X; then
pkgremove libdrm
pkgremove fontconfig
fi

+ 5
- 0
package/xorg/xorg-server/postconfig.in

@ -0,0 +1,5 @@
if [ "$ROCKCFG_DEFAULT_X11" != xorg ] ; then
pkgremove xorg
pkgremove libdrm
pkgremove fontconfig
fi

+ 1
- 0
package/xorg/xorg-server/preconfig.in

@ -0,0 +1 @@
CFGTEMP_DEFAULT_X11="$CFGTEMP_DEFAULT_X11 xorg Use_X.Org_as_default_X11_server"

+ 204
- 166
scripts/Config

@ -38,11 +38,11 @@ do_config_cycle=0
delete_mode=0
oldconfig=''
nobashmod=''
profile=""
profile=''
while [ "$1" ] ; do
case "$1" in
-cycle) do_config_cycle=1 ; shift ;;
# -cycle) do_config_cycle=1 ; shift ;;
-delete) delete_mode=1 ; shift ;;
-profile) profile='-profile' ; shift ;;
-oldconfig) oldconfig='-oldconfig' ; shift ;;
@ -80,42 +80,22 @@ if [ $delete_mode = 1 ] ; then
fi
# hook for third-party targets that need to insert additional packages before config runs, for example.
for precnf in target/*/preconfig.sh ; do
[ -f $precnf ] && . $precnf
done
if [ $do_config_cycle = 0 ]
then
export swpid=swp$$
rm -f config.{data,dialog,out,help}{,.*}.$swpid
rm -f config.pcache.*.$swpid
rm -f rockdialog.scrltmp # src/rockdialog.bin
mkdir -p src
if [ -z "$oldconfig" -a ! -f src/rockdialog.bin ] ; then
echo "Creating rockdialog tool."
command="gcc misc/rockdialog/*.c `
`-Imisc/rockdialog -lncurses -o src/rockdialog.bin"
echo "$command" ; eval "$command.$swpid"
mv src/rockdialog.bin.$swpid src/rockdialog.bin
fi
arch=none
if expr "`uname -m`" : "x86_64" > /dev/null ; then arch=x86 ; fi
if expr "`uname -m`" : "i.86" > /dev/null ; then arch=x86 ; fi
if expr "`uname -m`" : "alpha" > /dev/null ; then arch=alpha ; fi
if expr "`uname -m`" : "ppc" > /dev/null ; then arch=powerpc ; fi
if expr "`uname -m`" : "powerpc" > /dev/null ; then arch=powerpc ; fi
if expr "`uname -m`" : "sparc" > /dev/null ; then arch=sparc ; fi
if expr "`uname -m`" : "mips" > /dev/null ; then arch=mips ; fi
export ROCKCFG_ARCH="$arch" ; export ROCKCFG_EXPERT=0
export ROCKCFG_ID="$rockver"
echo "Running ROCK Linux $rockver configuration ..."
while "$0" -cfg $config $oldconfig $profile $nobashmod -cycle ; do : ; done
exit 0
# for precnf in target/*/preconfig.sh ; do
# [ -f $precnf ] && . $precnf
# done
swpid=swp$$
swpdir="config/$config.$swpid"
rm -f rockdialog.scrltmp # src/rockdialog.bin
mkdir -p src
if [ -z "$oldconfig" -a ! -f src/rockdialog.bin ] ; then
echo "Creating rockdialog tool."
command="gcc misc/rockdialog/*.c `
`-Imisc/rockdialog -lncurses -o src/rockdialog.bin"
eval "$command.$swpid"
mv src/rockdialog.bin{.$swpid,}
fi
if [ -z "$nobashmod" ]; then
@ -151,151 +131,209 @@ else
fi
bprof main start
. scripts/config.func
current=""
menu_this=0 ; menu_current=0 ; menu_counter=0
menu_stack=x
echo "Running ROCK Linux $rockver configuration ..."
if [ ! -e config/$config ] ; then
mkdir config/$config
echo "Creating new configuration $config ..."
$0 -oldconfig $profile $nobashmod -cfg $config
fi
. scripts/config.func
mkdir -p config/$config
touch config/$config/{config,packages}
touch config/$config/{config{,_usr},packages}
rm -rf config/$config.$swpid
cp -r config/$config{,.$swpid}
rm -rf $swpdir
cp -r config/$config $swpdir
rm -f config.{dialog,data,help}{,.*}.$swpid
touch config.{dialog,data,help}.$swpid
bprof main stop
. $swpdir/config
. $swpdir/config_usr
if [ -f config/$config.$swpid/config_usr ]; then
nousrconfig=0
. ./config/$config.$swpid/config_usr
else
nousrconfig=1
fi
current=""
menu_this=0 ; menu_current=0 ; menu_counter=0
menu_stack=x
bprof main start
spacer="" ; expert=0 ; tabspace="5" ; tabspace_list=""
commentnr=0 ; editfilenr=0
cmd="$ROCKCFG_ARCH"
[ "$ROCKCFG_DISABLE_BROKEN" = 1 ] && cmd="${cmd}-nobroken"
if [ -f config.pcache.$cmd.$swpid ] ; then
cat config.pcache.$cmd.$swpid > config/$config.$swpid/packages
else
eval "./scripts/Create-PkgList $cmd" | tee config.pcache.data.$swpid \
> config/$config.$swpid/packages
fi
bprof main stop
echo -e "#\n# ROCK Linux $rockver Config File\n#\n" \
> config/$config.$swpid/config
echo -e "#\n# ROCK Linux $rockver User Config File\n#" \
> config/$config.$swpid/config_usr
pkgin
bprof rockconfig start
. scripts/config.in
bprof rockconfig stop
pkgout
bprof main start
rm -f config/$config.$swpid/*.tmp
for x in ${!ROCKCFGUSR_*}; do
echo "${x}=\"${!x}\""
done >> config/$config.$swpid/config_usr
configtitle="$(printf ' %-50s %6s active packages ]' \
"ROCK Linux $rockver Configuration - $config" \
"[ $(echo `grep '^X' config/$config.$swpid/packages | wc -l`)" )"
bprof main stop
do_dialog_cycle=1
while [ "$do_dialog_cycle" = 1 ] ; do
if [ -z "$oldconfig" ] ; then
bprof rockdialog start
eval "./src/rockdialog.bin --title 'Build Config' \
--backtitle '$configtitle' \
--menu 'Arrow keys navigate the menu. Press <Enter> to activate menu items. Highlighted letters are hotkeys.' \
$(( $lines - 4 )) $(( $columns - 5 )) $(( $lines - 12 )) \
'$current' `tr '\n' ' ' < config.dialog.$menu_current.$swpid`" 2> config.out.$swpid
returncode=$? ; item="`cat config.out.$swpid`"
bprof rockdialog stop
else
returncode=1
fi
bprof main start
[ "$returncode" = 1 -a "$menu_current" -ne 0 ] && returncode="menu-back"
writeback() {
sort -k1,1r -k3,3 config/$config.$swpid/packages \
> config/$config.$swpid/packages.sorted
mv -f config/$config.$swpid/packages{.sorted,}
for x in $( ls config/$config.$swpid ); do
cp config/$config.$swpid/{$x,__tmp}
mv config/$config{.$swpid/__tmp,/$x}
include ()
{
local x
for x in $@ ; do
[ -f "$x" ] && . "./$x"
done
for x in $( ls config/$config ); do
[ -e config/$config.$swpid/$x ] || rm -f config/$config/$x
done
rm -rf config/$config.$swpid
}
exit_code=0
case "$returncode" in
0|6)
command="`grep "^$item " config.data.$menu_current.$swpid | cut -f2-`"
if [[ "$command" != menu_current=* ]] ; then
do_dialog_cycle=0
{ echo -e "\n# Remember menu position:\ncurrent='$item'"
echo -e "\n# Remember sub-menu:\nmenu_current='$menu_current'"
echo -e "\n# Execute this config command:\n$command"
} >> config/$config.$swpid/config_usr
arch=none
if expr "`uname -m`" : "x86_64" > /dev/null ; then arch=x86 ; fi
if expr "`uname -m`" : "i.86" > /dev/null ; then arch=x86 ; fi
if expr "`uname -m`" : "alpha" > /dev/null ; then arch=alpha ; fi
if expr "`uname -m`" : "ppc" > /dev/null ; then arch=powerpc ; fi
if expr "`uname -m`" : "powerpc" > /dev/null ; then arch=powerpc ; fi
if expr "`uname -m`" : "sparc" > /dev/null ; then arch=sparc ; fi
if expr "`uname -m`" : "mips" > /dev/null ; then arch=mips ; fi
export CFGTEMP_ARCH="$arch"
export CFGTEMP_ID="$rockver"
export ROCKCFG_EXPERT=0
include "architecture/*/preconfig.in"
include "misc/*/preconfig.in"
include "target/*/preconfig.in"
old_pkg_cmd=""
do_config_cycle=1
recreate_packages=1
while [ "$do_config_cycle" == 1 ] ; do
pkg_cmd="$ROCKCFG_ARCH"
[ "$ROCKCFG_DISABLE_BROKEN" = 1 ] && pkg_cmd="${pkg_cmd}-nobroken"
if [ "$old_pkg_cmd" != "$pkg_cmd" ] ; then
recreate_packages=1
fi
if [ "$recreate_packages" == 1 ] ; then
recreate_packages=0
if [ -f $swpdir/config.pcache.$pkg_cmd ] ; then
cp -a $swpdir/config.pcache.$pkg_cmd $swpdir/packages
pkgin
else
eval "$command"
eval "./scripts/Create-PkgList $pkg_cmd" \
> $swpdir/packages
pkgin
if [ ! -e "$swpdir/preconfig.in.tmp" ] ; then
cat package/*/*/preconfig.in | grep -v "^#" \
> "$swpdir/preconfig.in.tmp"
fi
include "$swpdir/preconfig.in.tmp"
pkgout
cp -a $swpdir/packages $swpdir/config.pcache.$pkg_cmd
fi
;;
menu-back)
command="`grep "^MENU_BACK " config.data.$menu_current.$swpid | cut -f2-`"
eval "$command"
;;
1|255)
do_dialog_cycle=0
rm -f config.{data,dialog,out,help}{,.*}.$swpid
rm -f config.pcache.*.$swpid
rm -f rockdialog.scrltmp # src/rockdialog.bin
echo "New config written to config/$config/*."
echo "Cleaning up. Configuration finished."
exit_code=1 ;;
2)
item=$(echo $item | cut -f1 -d' ') # dialog(1) bug?
current="$item"
get_help $item > config.dialog.$swpid
bprof main stop
./src/rockdialog.bin --title 'ROCK Linux Config - Help' \
--backtitle "ROCK Linux $rockver Configuration" \
--textbox config.dialog.$swpid \
$(( $lines - 4 )) $(( $columns - 5 ))
bprof main start
;;
*)
do_dialog_cycle=0
echo "unknown returncode: $returncode"
exit_code=1 ;;
esac
old_pkg_cmd="$pkg_cmd"
else
cp -a $swpdir/config.pcache.$pkg_cmd $swpdir/packages
pkgin
fi
rm -f $swpdir/config.{dialog,data,help}{,.*}
config_cycle
bprof main stop
bprof rockconfig start
. scripts/config.in
if [ ! -e "$swpdir/postconfig.in.tmp" ] ; then
{
ls misc/*/postconfig{,-*}.in 2>/dev/null \
| LC_ALL=C sort -k3,3 -t"/" | tr '\n' ' ' | xargs cat
cat package/*/*/postconfig.in
} | grep -v "^#" > "$swpdir/postconfig.in.tmp"
fi
include "$swpdir/postconfig.in.tmp"
include architecture/$ROCKCFG_ARCH/postconfig.in
include target/$ROCKCFG_TARGET/postconfig.in
bprof rockconfig stop
bprof main start
configtitle="$(printf ' %-50s %6s active packages ]' \
"ROCK Linux $rockver Configuration - $config" \
"[ $(echo `grep '^X' $swpdir/packages | wc -l`)" )"
do_dialog_cycle=1
while [ "$do_dialog_cycle" = 1 ] ; do
if [ -z "$oldconfig" ] ; then
bprof main stop
bprof rockdialog start
eval "./src/rockdialog.bin --title 'Build Config' \
--backtitle '$configtitle' \
--menu 'Arrow keys navigate the menu. Press <Enter> to activate menu items. Highlighted letters are hotkeys.' \
$(( $lines - 4 )) $(( $columns - 5 )) $(( $lines - 12 )) \
'$current' `tr '\n' ' ' \
< $swpdir/config.dialog.$menu_current`" \
2> $swpdir/config.out
returncode=$? ; item="`cat $swpdir/config.out`"
bprof rockdialog stop
bprof main start
else
returncode=1
fi
[ "$returncode" = 1 -a "$menu_current" -ne 0 ] && returncode="menu-back"
case "$returncode" in
0|6)
command="`grep "^$item " \
$swpdir/config.data.$menu_current | cut -f2-`"
if [[ "$command" != menu_current=* ]] ; then
[ -n "$command" ] && do_dialog_cycle=0
current="$item"
fi
eval "$command"
;;
menu-back)
command="`grep "^MENU_BACK " \
$swpdir/config.data.$menu_current | cut -f2-`"
eval "$command"
;;
1|255)
do_dialog_cycle=0
do_config_cycle=0
rm -f $swpdir/config.{data,dialog,out,help}{,.*}
rm -f $swpdir/config.pcache.*
rm -f rockdialog.scrltmp # src/rockdialog.bin
echo "New config written to config/$config/*."
echo "Cleaning up. Configuration finished."
;;
2)
item=$(echo $item | cut -f1 -d' ') # dialog(1) bug?
current="$item"
get_help $item > $swpdir/config.dialog
bprof main stop
./src/rockdialog.bin --title 'ROCK Linux Config - Help' \
--backtitle "ROCK Linux $rockver Configuration" \
--textbox $swpdir/config.dialog \
$(( $lines - 4 )) $(( $columns - 5 ))
bprof main start
;;
*)
do_dialog_cycle=0
do_config_cycle=0
echo "unknown returncode: $returncode"
;;
esac
done
bprof main stop
bprof_print
done
pkgout
writeback
rm -f $swpdir/*.tmp
bprof main stop
bprof_print
echo -e "#\n# ROCK Linux $rockver Config File\n#\n" \
> $swpdir/config
echo -e "#\n# ROCK Linux $rockver User Config File\n#" \
> $swpdir/config_usr
for x in ${!ROCKCFG_*}; do
echo "export ${x}='${!x}'"
done >> $swpdir/config
for x in ${!ROCKCFGUSR_*}; do
echo "${x}='${!x}'"
done >> $swpdir/config_usr
exit $exit_code
sort -k1,1r -k3,3 $swpdir/packages > $swpdir/packages.sorted
mv -f $swpdir/packages{.sorted,}
for x in $( ls $swpdir/ ); do
cp $swpdir/{$x,__tmp}
mv $swpdir/__tmp config/$config/$x
done
for x in $( ls config/$config ); do
[ -e $swpdir/$x ] || rm -f config/$config/$x
done
rm -rf $swpdir

+ 146
- 153
scripts/config.func

@ -35,7 +35,7 @@ var_insert() {
eval "$1=\"$3\$$1\""
}
# Functions for working with config/$config.$swpid/packages
# Functions for working with $swpdir/packages
#
# pkgenable package-list
# pkgdisable package-list
@ -49,8 +49,8 @@ then
pkgin() { :; }
pkgout() { :; }
__pkgfilter() {
"$@" < config/$config.$swpid/packages > config/$config.$swpid/packages.new
mv config/$config.$swpid/packages.new config/$config.$swpid/packages
"$@" < $swpdir/packages > $swpdir/packages.new
mv $swpdir/packages.new $swpdir/packages
}
pkgfilter() {
bprof pkgfilter start
@ -95,8 +95,8 @@ then
bprof pkgcheck start
local pattern="$1" stat="$2"
sed -n -e "/^$stat.*[ =]$pattern / q0 ; $ q1 ;" \
< config/$config.$swpid/packages
sed -n -e "/^$stat.*[ =]${pattern} / q0 ; $ q1 ;" \
< $swpdir/packages
local ret=$?
bprof pkgcheck stop
return $ret
@ -140,19 +140,19 @@ then
script="$script sub(\" $2 \", \" \");"
;;
esac
shift; shift;
shift 2
done
script="$script} {print;}"
pkgfilter "awk" "--" "$script"
}
else
pkgin() { cfghlp pkg_in config/$config.$swpid/packages; }
pkgout() { cfghlp pkg_out config/$config.$swpid/packages ; }
pkgin() { cfghlp pkg_in $swpdir/packages; }
pkgout() { cfghlp pkg_out $swpdir/packages ; }
pkgfilter() {
bprof pkgfilter start
cfghlp pkg_out config/$config.$swpid/packages.tmp
"$@" < config/$config.$swpid/packages.tmp > config/$config.$swpid/packages
cfghlp pkg_in config/$config.$swpid/packages
cfghlp pkg_out $swpdir/packages.tmp
"$@" < $swpdir/packages.tmp > $swpdir/packages
cfghlp pkg_in $swpdir/packages
bprof pkgfilter stop
}
pkgenable() {
@ -184,83 +184,64 @@ else
fi
comment() {
local text="$1" help="$2"
bprof comment start
if [ $ROCKCFG_EXPERT -eq 1 -o $expert -eq 0 ]
if [ "$ROCKCFG_EXPERT" -eq 1 -o $expert -eq 0 ]
then
commentnr=$(( $commentnr + 1 ))
echo "COMMENT_$commentnr '$spacer$1'" >> config.dialog.$menu_this.$swpid
# Hi, esden here, very ill stuff here I save the help
# strings here to a temporary file named config.help.$swpid
# this sed tr sandwitch formats the string so that
# \n are masked and the Help strings are not killed some way
if [ "$2" != "" ] ; then
set_help "COMMENT_$commentnr" "$2"
fi
echo "COMMENT_$commentnr '$spacer$text'" >> $swpdir/config.dialog.$menu_this
set_help "COMMENT_$commentnr" "$help"
fi
bprof comment stop
}
comment_id() {
local text="$1" id="$2" help="$3"
bprof comment_id start
if [ $ROCKCFG_EXPERT -eq 1 -o $expert -eq 0 ]
if [ "$ROCKCFG_EXPERT" -eq 1 -o "$expert" -eq 0 ]
then
echo "$2 '$spacer$1'" >> config.dialog.$menu_this.$swpid
echo "$id '$spacer$text'" >> $swpdir/config.dialog.$menu_this
# If you do not know what mighty esden
# is doing here see comment()
if [ "$3" != "" ] ; then
set_help "$2" "$3"
fi
set_help "$id" "$help"
fi
bprof comment_id stop
}
const() {
bprof const start
local q="'"
local v="${2//$q/$q\\$q$q}"
eval "$1=\"\$2\""
echo "export $1='$v'" >> config/$config.$swpid/config
bprof const stop
}
# Usage: set_data NAME DEFAULT
#
set_data() {
local name="$1" q="'"
data="$2"
bprof set_data start
local q="'"
set_name="ROCKCFGSET_${1#ROCKCFG_}"
usr_name="ROCKCFGUSR_${1#ROCKCFG_}"
set_name="ROCKCFGSET_${name#ROCKCFG_}"
usr_name="ROCKCFGUSR_${name#ROCKCFG_}"
usr_data="${!usr_name}"
menumode=0
data="$2"
if [ "${!set_name}" ]; then
data="${!set_name}"
fi
dfl_data="$data"
if [ $ROCKCFG_EXPERT -eq 1 -o $expert -eq 0 ]; then
menumode=2
if [ $nousrconfig -eq 1 ] && [ -n "${!1}" -a "${!1}" != "$data" ] ; then
eval "$usr_name=\"${!1}\""
usr_data="${!1}"
fi
if [ "$ROCKCFG_EXPERT" -eq 1 -o "$expert" -eq 0 ]; then
if [ -n "$usr_data" ]; then
data="$usr_data"
obegin="<" oend=">" menumode=1
obegin="<" oend=">"
else
unset $usr_name
fi
fi
eval "$1=\"\$data\""
item="$1"
echo "export $1='${data//$q/$q\\$q$q}'" >> config/$config.$swpid/config
eval "$name=\"\$data\""
item="$name"
bprof set_data stop
}
@ -268,58 +249,62 @@ choice() {
bprof choice start
local obegin="(" oend=")"
local q="'"
local name="$1" default="$2"
set_data "$1" "$2"
set_data "$name" "$default"
# if data is not in list, leave usr_data unmodified
# but set the current value to the default
local fallback_hack=0
eval $(
shift; shift
shift 2
while [ "$#" != 0 ] ; do
[ "$data" = "$1" ] && exit
shift; shift
[ "$1" = "$default" ] && exit
shift 2
done
echo "fallback_hack=1"
)
if [ "$fallback_hack" = 1 ]; then
obegin="?"; oend="?"; data="$dfl_data"; eval "$1=\"\$data\""
echo "export $1='${data//$q/$q\\$q$q}'" >> config/$config.$swpid/config
obegin="?"; oend="?"; data="$dfl_data"; eval "$name=\"\$data\""
fi
if [ "$menumode" -gt 0 ]
if [ "$ROCKCFG_EXPERT" -eq 1 -o "$expert" -eq 0 ]
then
{ echo -en "$item\tchoice_action '$usr_name' '$usr_data'" ; shift ; shift
echo -n " '' 'Reset_this_switch_to_default_value'"
for x ; do echo -n " '$x'" ; done ; echo ; } >> config.data.$menu_this.$swpid
{ echo -en "$item\tchoice_action '$usr_name' '$usr_data'"
echo -n " '' 'Reset_this_switch_to_default_value'"
shift 2 ; printf " '%s'" "$@" ; echo
} >> $swpdir/config.data.$menu_this
xdata="$obegin$data$oend"
while [ "$1" -a "$1" != "$data" ] ; do shift ; shift ; done
while [ "$1" -a "$1" != "$data" ] ; do shift 2 ; done
printf "'$item' '$spacer%-${tabspace}s ${2//_/ }'\n" "$xdata" \
>> config.dialog.$menu_this.$swpid
>> $swpdir/config.dialog.$menu_this
fi
bprof choice stop
}
choice_action() {
item="$1" ; default="$2" ; shift 2
command="./src/rockdialog.bin --title 'Build Config' \
--backtitle '$configtitle' \
--radiolist 'Arrow keys navigate the menu. Press <Enter> to activate menu items. Highlighted letters are hotkeys.' \
$(( $lines - 4 )) $(( $columns - 5 )) $(( $lines - 12 ))"
default=$2 ; item=$1 ; shift ; shift
while [ "$#" -gt 1 ] ; do
command="$command '$1' '${2//_/ }'"
if [ "$1" = "$default" ]
then command="$command '$1' '${2//_/ }' ON"
else command="$command '$1' '${2//_/ }' OFF" ; fi
shift ; shift
then command="$command ON"
else command="$command OFF" ; fi
shift 2
done
eval "$command" 2> config.out.$swpid
eval "$command" 2> $swpdir/config.out
case "$?" in
0|6)
eval "$item='`cat config.out.$swpid`'"
eval "$item='`cat $swpdir/config.out`'"
set_data "${item/ROCKCFGUSR/ROCKCFG}" "$default"
;;
1|255) return 0 ;;
2) echo "No help." ; sleep 1 ;;
@ -328,63 +313,69 @@ choice_action() {
}
text() {
local name="$1" id="$2" default="$3" help="$4"
bprof text start
local q="'" obegin="(" oend=")"
set_data "$2" "$3"
if [ "$menumode" -gt 0 ]
set_data "$id" "$default"
if [ "$ROCKCFG_EXPERT" -eq 1 -o "$expert" -eq 0 ]
then
echo -e "$2\ttext_action '$1' '$usr_name'" \
"'${data//$q/$q\\$q$q}'" >> config.data.$menu_this.$swpid
echo -e "$id\ttext_action '$name' '$usr_name'" \
"'${data//$q/$q\\$q$q}'" >> $swpdir/config.data.$menu_this
xdata="${obegin}$( printf "%-${tabspace}s" \
"$(echo $data | cut -c1-20)")${oend}"
"$(echo $data | cut -c1-20)")${oend}"
printf "'$2' '$spacer%s $1'\n" \
"${xdata//$q/$q\\$q$q}" >> config.dialog.$menu_this.$swpid
printf "'$id' '$spacer%s $name'\n" \
"${xdata//$q/$q\\$q$q}" >> $swpdir/config.dialog.$menu_this
# If you do not know what mighty esden
# is doin here see comment()
if [ "$4" != "" ] ; then
set_help "$2" "$4"
fi
set_help "$id" "$help"
fi
bprof text stop
}
text_action() {
local label="$1" usrvar="$2" data="$3"
./src/rockdialog.bin --title 'Build Config' \
--backtitle "$configtitle" \
--inputbox "$1" 9 $(( $columns - 5 )) "$3" 2> config.out.$swpid
[ "$?" -eq 0 -o "$?" -eq 1 ] && eval "$2=\"\$(cat config.out.$swpid)\""
--inputbox "$label" 9 $(( $columns - 5 )) "$data" 2> $swpdir/config.out
if [ "$?" -eq 0 -o "$?" -eq 1 ] ; then
eval "$usrvar=\"\$(cat $swpdir/config.out)\""
set_data "${usrvar/ROCKCFGUSR/ROCKCFG}" "$data"
fi
}
bool() {
bprof bool start
local name="$1" id="$2" default="$3" help="$4"
local x obegin="[" oend="]"
set_data "$2" "$3"
if [ "$menumode" -gt 0 ]
bprof bool start
set_data "$id" "$default"
if [ "$ROCKCFG_EXPERT" -eq 1 -o "$expert" -eq 0 ]
then
if [ $data -eq 0 ] ; then x="${obegin} ${oend}" ; else x="${obegin}*${oend}" ; fi
echo -e "$2\tbool_action '$usr_name' '$usr_data' '$3'" >> config.data.$menu_this.$swpid
if [ $data -eq 0 ] ; then
x="${obegin} ${oend}"
else
x="${obegin}*${oend}"
fi
echo -e "$id\tbool_action '$usr_name' '$usr_data' '$default'" \
>> $swpdir/config.data.$menu_this
printf "$2 '$spacer%-${tabspace}s ${1//_/ }'\n" "$x" >> config.dialog.$menu_this.$swpid
printf "$id '$spacer%-${tabspace}s ${name//_/ }'\n" "$x" \
>> $swpdir/config.dialog.$menu_this
# If you do not know what mighty esden is doin here see comment()
if [ "$4" != "" ] ; then
set_help "$2" "$4"
fi
set_help "$id" "$help"
fi
bprof bool stop
}
bool_action() {
local usrvar=$1
local origval=$3
local usrval
eval "usrval=\${$usrvar}"
case "$usrval" in
local usrvar=$1 origval=$3
case "${!usrvar}" in
"") [ "$origval" == "0" ] && eval "$usrvar=1"
[ "$origval" == "1" ] && eval "$usrvar=0"
;;
@ -395,66 +386,64 @@ bool_action() {
[ "$origval" == "1" ] && eval "$usrvar=1"
;;
esac
set_data "${usrvar/ROCKCFGUSR/ROCKCFG}" "$3"
}
editfile() {
local id="$1" file="$2" label="$3"
bprof editfile start
if [ $ROCKCFG_EXPERT -eq 1 -o $expert -eq 0 ] ; then
if [ "$ROCKCFG_EXPERT" -eq 1 -o $expert -eq 0 ] ; then
local x="$spacer" q="'"
comment ",----< $3 >----."
comment ",----< $label >----."
block_begin 0 ; spacer="${spacer%??}| "
touch "$2"
touch "$file"
line_nr=1
while read line ; do
line="${line//$q/$q\\$q$q}"
printf "$1:${editfilenr} '$spacer%-${tabspace}s %s'\n" \
`printf "%03d:" $line_nr` "$line" >> config.dialog.$menu_this.$swpid
printf "$id:${editfilenr} '$spacer%-${tabspace}s %s'\n" \
`printf "%03d:" $line_nr` "$line" >> $swpdir/config.dialog.$menu_this
echo -e "$1:${editfilenr}\teditfile_action $2" \
"$line_nr '$3'" >> config.data.$menu_this.$swpid
echo -e "$id:${editfilenr}\teditfile_action $file" \
"$line_nr '$label'" >> $swpdir/config.data.$menu_this
editfilenr=$(( $editfilenr + 1 ))
line_nr=$(( $line_nr + 1 ))
done < "$2"
done < "$file"
printf "$1:${editfilenr} '$spacer%-${tabspace}s %s'\n" \
`printf "%03d:" $line_nr` "<add new rule>" >> config.dialog.$menu_this.$swpid
printf "$id:${editfilenr} '$spacer%-${tabspace}s %s'\n" \
`printf "%03d:" $line_nr` "<add new rule>" >> $swpdir/config.dialog.$menu_this
echo -e "$1:${editfilenr}\teditfile_action $2" \
"$line_nr '$3'" >> config.data.$menu_this.$swpid
echo -e "$id:${editfilenr}\teditfile_action $file" \
"$line_nr '$label'" >> $swpdir/config.data.$menu_this
editfilenr=$(( $editfilenr + 1 ))
block_end
comment "\`------${3//?/-}------'\''"
comment "\`------${label//?/-}------'\''"
spacer="$x"
fi
bprof editfile stop
}
editfile_action() {
line="`tail -n +$2 $1 | head -n 1`"
./src/rockdialog.bin --title 'Build Config' \
--backtitle "$configtitle" \
--inputbox "$3 - Line $3" \
9 $(( $columns - 5 )) "$line" 2> config.out.$swpid
head -n $(( $2 - 1 )) $1 > $1.new
[ -s config.out.$swpid ] && echo "`cat config.out.$swpid`" >> $1.new
tail -n +$(( $2 + 1 )) $1 >> $1.new
local filename="$1"
mv $1.new $1
cp -a "$filename"{,.orig}
${EDITOR:-vim} "$filename" && rm -f "$filename.orig" \
|| mv "$filename"{.orig,}
}
startprog() {
local id="$1" label="$2" prog="$3"
bprof startprog start
if [ $ROCKCFG_EXPERT -eq 1 -o $expert -eq 0 ]
if [ "$ROCKCFG_EXPERT" -eq 1 -o $expert -eq 0 ]
then
printf "$1 '$spacer%-${tabspace}s %s'\n" \
"-->" "$2" >> config.dialog.$menu_this.$swpid
echo -e "$1\t$3" >> config.data.$menu_this.$swpid
printf "$id '$spacer%-${tabspace}s %s'\n" \
"-->" "$label" >> $swpdir/config.dialog.$menu_this
echo -e "$id\t$prog" >> $swpdir/config.data.$menu_this
fi
bprof startprog stop
}
@ -475,6 +464,12 @@ block_end() {
bprof block_end stop
}
# has to be called at the beginning of each config cycle
config_cycle() {
expert=0;
menu_counter=0;
}
expert_begin() {
expert=$(( $expert + 1 ))
}
@ -484,18 +479,22 @@ expert_end() {
}
menu_begin() {
local id="$1" name="$2"
bprof menu_begin start
menu_counter=$(( $menu_counter + 1 ))
if [ $ROCKCFG_EXPERT -eq 1 -o $expert -eq 0 ]
if [ "$ROCKCFG_EXPERT" -eq 1 -o $expert -eq 0 ]
then
printf "$1 '$spacer%-${tabspace}s %s'\n" \
"===>" "$2" >> config.dialog.$menu_this.$swpid
echo -e "$1\tmenu_current=$menu_counter" >> config.data.$menu_this.$swpid
echo "$1 '===> $2'" >> config.dialog.$menu_counter.$swpid
echo -e "$1\tmenu_current=$menu_this current=$1" >> config.data.$menu_counter.$swpid
echo -e "MENU_BACK\tmenu_current=$menu_this current=$1" >> config.data.$menu_counter.$swpid
printf "$id '$spacer%-${tabspace}s %s'\n" \
"===>" "$name" >> $swpdir/config.dialog.$menu_this
echo -e "$id\tmenu_current=$menu_counter" \
>> $swpdir/config.data.$menu_this
echo "$id '===> $name'" >> $swpdir/config.dialog.$menu_counter
echo -e "$id\tmenu_current=$menu_this current=$id" \
>> $swpdir/config.data.$menu_counter
echo -e "MENU_BACK\tmenu_current=$menu_this current=$id" \
>> $swpdir/config.data.$menu_counter
fi
menu_stack="$menu_this $menu_stack"
@ -514,13 +513,18 @@ menu_end() {
}
set_help() {
local id="$1" help="$2"
bprof set_help start
(echo -ne "$1 '$1:\n\n$2'" | sed 's,$,\\n,' |
tr -d '\n' | sed 's,\\n$,,'; echo ) >> config.help.$swpid
if [ "$help" != "" ] ; then
echo -e "$id $help\n\n" >> $swpdir/config.help
fi
bprof set_help stop
}
get_help() {
local item_name="$1" tmp_text hlp_text default_text
bprof get_help start
cat << EOT
@ -545,7 +549,7 @@ EOT
# Create standard help output ...
default_text="
There is no help on '$1' available.
There is no help on '$item_name' available.
Please read the build Documentation (Documentation/BUILD)
before building ROCK Linux.
@ -557,27 +561,17 @@ More information can be found on the ROCK Linux Homepage:
Information about the ROCK Linux mailing lists and the mailing
list archive can be found at:
http://www.rocklinux.org/mail.html and
http://www.rocklinux.org/wiki/Mailing_Lists and
http://www.rocklinux.net/lurker/splash"
# Ok let us find a help for the current item ...
# First of all mask all special chars in the item name
# Comment: this is sick. You can't get any \n this way !!!
item_name=$( echo "$1" | sed 's/[][\/.^$*]/\\&/g' )
# Now search *.hlp files
hlp_text=$( sed -n "/^$item_name[ ]*\$/,\${
/^$item_name[ ]*\$/c\\
$item_name:\\
/^#/d
/^[^ ]/q
s/^ //
p
}" scripts/config*.hlp package/*/*/subconfig-*.hlp package/*/*/config*.hlp target/*/config*.hlp misc/*/config*.hlp misc/*/*/config*.hlp 2>/dev/null )
hlp_text="$( sed -e "/^$item_name\$/,/^\$/ p ; d" \
misc/*/{,*/}config*.hlp package/*/*/{sub,}config-*.hlp \
{scripts,target/*}/config*.hlp 2>/dev/null )"
# Get help strings out of the temporary file.
tmp_text=$(grep "^$item_name" config.help.$swpid | cut -f2- -d' ' | sed -e "s,^',," -e "s,'$,," )
tmp_text="$( sed -e "/^[ ]*$item_name\([ ]\|\$\)/,/^\$/ p ; d" \
$swpdir/config.help 2>/dev/null )"
# Let us see what we have ...
if [ "$hlp_text" -a "$tmp_text" ] ; then
@ -594,12 +588,11 @@ Here the one out of config.hlp:
$hlp_text"
elif [ "$hlp_text" ] ; then
echo "$hlp_text"
echo "config.hlp: $hlp_text"
elif [ "$tmp_text" ] ; then
echo "$tmp_text"
echo "config.in: $tmp_text"
else
echo "$default_text"
fi
bprof get_help stop
}

+ 104
- 163
scripts/config.in

@ -70,36 +70,35 @@
# Config Presets: ROCKCFGSET_*
#
CFGTEMP_ARCHLIST=""
CFGTEMP_TARGETLIST=""
include ()
{
local x
for x in $@ ; do
[ -f "$x" ] && . "./$x"
done
}
include "architecture/*/preconfig.in"
comment_id '- Architecture, CPU and Optimization' COMMENT_ARCHCPUOPT
block_begin 7
choice ROCKCFG_ARCH $ROCKCFG_ARCH $CFGTEMP_ARCHLIST
ROCKCFG_ID="$ROCKCFG_ID-$ROCKCFG_ARCH"
choice ROCKCFG_ARCH $CFGTEMP_ARCH $CFGTEMP_ARCHLIST
if [ -f architecture/$ROCKCFG_ARCH/config.in ]
then . architecture/$ROCKCFG_ARCH/config.in ; fi
expert_begin
choice ROCKCFG_OPT size \
smart 'Smart optimisation using a profile database' \
bizarre 'Inverse smart optimisation (this is bizarre)' \
speed 'Hard optimise for speed (often pretty slow)' \
size 'Hard optimise for size (recommended)' \
lazy 'Lazy optimisation (for debugging binaries)' \
test 'Only optimize toolchain (for fast builds)'
bool 'Build and use a (pseudo-)cross compiler' ROCKCFG_USE_CROSSCC 1
expert_end
bool 'This is a cross-build between architectures' ROCKCFG_CROSSBUILD 0
if [ "$ROCKCFG_CROSSBUILD" = 1 ] ; then
block_begin
bool 'Test-build the packages which are not known to cross build' ROCKCFG_CROSS_TESTALL 0
bool 'Test-build the packages which are not known to cross build' \
ROCKCFG_CROSS_TESTALL 0
if [ $ROCKCFG_CROSS_TESTALL = 1 ]; then
comment '-- WARNING: Test-building packages which are not known to cross build'
comment '-- might cause damage on your build system if it is not read-only. So'
comment '-- only run this if your /{bin,lib,usr,..} is somehow write-protected.'
fi
ROCKCFG_ID="$ROCKCFG_ID-cross" ; ROCKCFGSET_USE_CROSSCC=1
ROCKCFGSET_USE_CROSSCC=1
const ROCKCFG_PSEUDONATIVE 0
block_end
else
@ -108,57 +107,40 @@ block_begin 7
comment '-- WARNING: Doing pseudo native builds is a tricky thing.'
comment '-- Better write the documentation first... ;-)'
text 'IP of native host for command forwarding' ROCKCFG_PSEUDONATIVE_NATIVEHOST ''
text 'NFSROOT to be mounted on native host' ROCKCFG_PSEUDONATIVE_NFSROOT "$HOSTNAME:$PWD"
text 'IP of native host for command forwarding' \
ROCKCFG_PSEUDONATIVE_NATIVEHOST ''
text 'NFSROOT to be mounted on native host' \
ROCKCFG_PSEUDONATIVE_NFSROOT "$HOSTNAME:$PWD"
ROCKCFG_ID="$ROCKCFG_ID-pseudonative" ; ROCKCFGSET_USE_CROSSCC=1
ROCKCFGSET_USE_CROSSCC=1
fi
fi
block_end
include "misc/*/preconfig.in"
include "target/*/preconfig.in"
include "package/*/*/preconfig.in"
if [ "$ROCKCFG_CROSSBUILD" = 1 ] ; then
pkgfilter sed -e 's,^\(. ..\)[^ ]*,\1--------, ;'
if [ $ROCKCFG_CROSS_TESTALL = 1 ]; then
pkgfilter sed -e 's,^\(. .\)?,\11, ;'
else
pkgfilter sed -e 's,^\(. .\)?,\1-, ;'
fi
pkgfilter sed -e 's,^\(. .\)X,\11, ; s,^\(. \)X,\1-, ;'
else
pkgfilter sed -e 's,^\(. .\)[?X],\1-, ;'
if [ "$ROCKCFG_PSEUDONATIVE" = 1 ] ; then
pkgfilter sed -e 's,^\(. \)X,\10, ;'
else
pkgfilter sed -e 's,^\(. \)X,\1-, ;'
fi
fi
comment ' '
comment_id '- Target Distribution' COMMENT_TARGET
block_begin 7
choice ROCKCFG_TARGET crystal $CFGTEMP_TARGETLIST
ROCKCFG_ID="$ROCKCFG_ID-$ROCKCFG_TARGET"
include target/$ROCKCFG_TARGET/config.in
text 'Linguas (translations)' ROCKCFG_LINGUAS 'de es fr it ru'
bool 'Show expert-only and experimental options' ROCKCFG_EXPERT 0
bool 'Abbreviate ROCK Config ID with checksum' ROCKCFG_IDCKSUM 0
block_end
echo "## BUILDENV_SETTINGS_BEGIN" >> config/$config.$swpid/config
comment ' '
comment_id '- Build System Configuration' COMMENT_BUILD_SYS_CONF
block_begin 3
bool 'Run Paranoia Checks in Build-Target and Build-Pkg' \
ROCKCFG_PARANOIA_CHECK 1
bool 'Make rebuild stage (stage 9)' ROCKCFG_DO_REBUILD_STAGE 1
bool 'Make a parallel (cluster) build' ROCKCFG_PARALLEL 0
if [ "$ROCKCFG_PARALLEL" = 1 ] ; then
block_begin 10
ROCKCFG_PARALLEL_MAX="`echo $ROCKCFG_PARALLEL_MAX |
sed 's,[^0-9],,g'`"
sed 's,[^0-9],,g'`"
text 'Maximum size of job queue' ROCKCFG_PARALLEL_MAX 10
text 'Command for adding jobs' ROCKCFG_PARALLEL_ADDJOB ''
block_end
@ -166,7 +148,6 @@ block_begin 3
bool 'Abort when a package-build fails' \
ROCKCFG_ABORT_ON_ERROR 0
fi
bool 'Retry building broken packages' ROCKCFG_RETRY_BROKEN 0
bool 'Disable packages which are marked as broken' \
ROCKCFG_DISABLE_BROKEN 0
@ -175,7 +156,6 @@ block_begin 3
bool 'Always clean up src dirs (even on pkg fail)' \
ROCKCFG_ALWAYS_CLEAN 0
bool 'Create debug information (xtrace) for builds' ROCKCFG_XTRACE 0
bool 'Use tmpfs for building packages' ROCKCFG_SRC_TMPFS 0
if [ "$ROCKCFG_SRC_TMPFS" = 1 ] ; then
block_begin
@ -184,67 +164,66 @@ block_begin 3
text 'tmpfs mount options' ROCKCFG_SRC_TMPFS_OPT \
'size=1024M,nr_inodes=100k'
bool 'Write tmpfs log to var/adm/rock-debug/tmpfslog.txt' \
ROCKCFG_SRC_TMPFS_LOG 0
ROCKCFG_SRC_TMPFS_LOG 0
block_end
fi
expert_begin
bool 'Automatic documentation creation' ROCKCFG_CREATE_DOCS 1
bool 'Send emails on special events' ROCKCFG_SENDMAIL 0
if [ "$ROCKCFG_SENDMAIL" = 1 ] ; then
block_begin
text 'Sendmail program' ROCKCFG_SENDMAIL_BIN 'sendmail'
text 'Recipient address' ROCKCFG_SENDMAIL_TO 'root'
block_end
bool 'Create cache files after packages have been built' \
ROCKCFG_CREATE_CACHE 1
if [ $ROCKCFG_CROSSBUILD != 1 ]; then
bool 'Run a check/test for packages with support' ROCKCFG_DO_CHECK 0
fi
bool 'HTTP GET request on special events' ROCKCFG_HTTP 0
if [ "$ROCKCFG_HTTP" = 1 ] ; then
block_begin
text 'Website' ROCKCFG_HTTP_SITE 'http://pallas.crash-override.net/cgi-bin/rocklogbot?package=PACKAGE&config=CONFIG&status=STATUS&stage=STAGE'
block_end
comment ' '
comment_id '- Flist detection technique' COMMENT_FLIST
choice ROCKCFG_FLIST flwrapper \
flwrapper 'Use the flist wrapper library for flist creation' \
strace 'Use strace to get the file list' \
find 'Use find on timestamp-file for flist creation'
if [ "$ROCKCFG_FLIST" = strace ]; then
pkgenable strace
fi
expert_end
block_end
include "misc/*/noexpertconfig.in"
echo "## BUILDENV_SETTINGS_END" >> config/$config.$swpid/config
expert_begin
comment ' '
comment '- Binary package format'
block_begin 3
bool 'Show expert-only and experimental options' ROCKCFG_EXPERT 0
block_end
if [ $ROCKCFG_EXPERT == 1 ] ; then
ROCKCFG_ID="$ROCKCFG_ID-expert"
else
ROCKCFG_ID="$ROCKCFG_ID-noexpert"
fi
expert_begin
comment ' '
comment '- Binary package format'
block_begin 3
bool 'Create Checksums for installed files' ROCKCFG_CREATE_CKSUM 1
bool 'Create Checksums for installed files' ROCKCFG_CREATE_CKSUM 1
bool 'Create *.tar.bz2 binary packages' ROCKCFG_CREATE_TARBZ2 0
bool 'Create *.gem binary packages' ROCKCFG_CREATE_GEM 1
bool 'Append version number to package files' ROCKCFG_PKGFILE_VER 1
block_end
block_end
comment ' '
comment '- Package splitting'
block_begin 3
comment ' '
comment '- Package splitting'
block_begin 3
bool 'Create extra *:doc packages' ROCKCFG_SPLIT_DOC 1
bool 'Create extra *:dev packages' ROCKCFG_SPLIT_DEV 1
block_end
block_end
comment ' '
include "$(ls misc/*/config{,-*}.in 2>/dev/null \
| LC_ALL=C sort -k3,3 -t"/" | tr '\n' ' ')"
include "$(ls package/*/*/config{,-*}.in 2>/dev/null \
| LC_ALL=C sort -k4,4 -t"/" | tr '\n' ' ')"
comment ' '
comment '- Compiler Options'
block_begin 3
bool 'Create binaries with debug symbols' ROCKCFG_DEBUG 0
bool 'Create statically linked binaries' ROCKCFG_STATIC 0
bool 'Enable C compiler multilib support' ROCKCFG_MULTILIB 0
bool 'Disable exceptions and rtti in C++' ROCKCFG_LIMITCXX 0
bool 'Use automatically precompiled C++ headers (EXPERIMENTAL)' ROCKCFG_AUTOPCH 0
bool 'Disable National Language Support' ROCKCFG_DISABLE_NLS 0
if [ "$ROCKCFG_DISABLE_NLS" = 1 ] ; then
pkgremove gettext
fi
text 'Additional compiler flags' ROCKCFG_C_FLAGS ""
block_end
comment ' '
comment '- Additional GNU Configure Options'
block_begin 5
comment ' '
comment '- Additional GNU Configure Options'
block_begin 3
editfile ROCKCFG_CONFOPT_FILE config/$config.$swpid/confopt \
'GNU Configure Options'
if [ -f config/$config.$swpid/confopt ] ; then
@ -257,94 +236,56 @@ expert_begin
if [ "${option#--with-}" = "$option" -a \
"${option#--without-}" = "$option" ]
then
comment '---- Warning! The custom options may
break packages!'
comment '---- Warning! The custom options may break packages!'
break
fi
done
block_end
comment ' '
text 'Additional compiler flags' ROCKCFG_C_FLAGS ""
comment ' '
comment_id '- Flist detection technique' COMMENT_FLIST
block_begin 5
choice ROCKCFG_FLIST flwrapper \
flwrapper 'Use the flist wrapper library for flist creation' \
strace 'Use strace to get the file list' \
find 'Use find on timestamp-file for flist creation'
if [ "$ROCKCFG_FLIST" = strace ]; then
pkgenable strace
fi
block_end
comment ' '
comment '- Various Options'
block_begin 5
bool 'Build and use a (pseudo-)cross compiler' ROCKCFG_USE_CROSSCC 1
bool 'Make rebuild stage (stage 9)' ROCKCFG_DO_REBUILD_STAGE 1
block_end
if [ $ROCKCFG_CROSSBUILD != 1 ]; then
bool 'Run a check/test for packages with support' ROCKCFG_DO_CHECK 0
fi
if [ $ROCKCFG_USE_CROSSCC != 1 ]; then
pkgfilter sed -e 's,^\([XO] \)0,\1-, ;'
fi
if [ ! -e "$swpdir/config.in.tmp" ] ; then
ls package/*/*/config{,-*}.in ./misc/*/config{,-*}.in | \
LC_ALL=C sort -k4,4 -t"/" | tr '\n' ' ' | xargs cat | \
grep -v "^#" > "$swpdir/config.in.tmp"
fi
include "$swpdir/config.in.tmp"
expert_end
if [ $ROCKCFG_DO_REBUILD_STAGE != 1 ]; then
pkgfilter sed -e 's,^\([XO] [^ ]*\)9 ,\1- , ;'
filterscript=""
if [ "$ROCKCFG_CROSSBUILD" = 1 ] ; then
var_append filterscript ' ' 's,^\(. ..\)[^ ]*,\1--------, ;'
if [ $ROCKCFG_CROSS_TESTALL = 1 ]; then
var_append filterscript ' ' 's,^\(. .\)?,\11, ;'
else
var_append filterscript ' ' 's,^\(. .\)?,\1-, ;'
fi
choice ROCKCFG_OPT size \
smart 'Smart optimisation using a profile database' \
bizarre 'Inverse smart optimisation (this is bizarre)' \
speed 'Hard optimise for speed (often pretty slow)' \
size 'Hard optimise for size (recommended)' \
lazy 'Lazy optimisation (for debugging binaries)' \
test 'Only optimize toolchain (for fast builds)'
bool 'Create binaries with debug symbols' ROCKCFG_DEBUG 0
bool 'Create statically linked binaries' ROCKCFG_STATIC 0
bool 'Disable exceptions and rtti in C++' ROCKCFG_LIMITCXX 0
bool 'Enable C compiler multilib support' ROCKCFG_MULTILIB 0
bool 'Use automatically precompiled C++ headers' ROCKCFG_AUTOPCH 0
bool 'Disable National Language Support' ROCKCFG_DISABLE_NLS 0
if [ "$ROCKCFG_DISABLE_NLS" = 1 ] ; then
pkgremove gettext
var_append filterscript ' ' 's,^\(. .\)X,\11, ; s,^\(. \)X,\1-, ;'
else
var_append filterscript ' ' 's,^\(. .\)[?X],\1-, ;'
if [ "$ROCKCFG_PSEUDONATIVE" = 1 ] ; then
var_append filterscript ' ' 's,^\(. \)X,\10, ;'
else
var_append filterscript ' ' 's,^\(. \)X,\1-, ;'
fi
fi
bool 'Automatic documentation creation' ROCKCFG_CREATE_DOCS 1
bool 'Create cache files after packages have been built' \
ROCKCFG_CREATE_CACHE 1
bool 'Run Paranoia Checks in Build-Target and Build-Pkg' \
ROCKCFG_PARANOIA_CHECK 1
bool 'Abbreviate ROCK Config ID with checksum' ROCKCFG_IDCKSUM 0
block_end
expert_end
include "package/*/*/postconfig.in"
include "misc/*/postconfig.in"
include architecture/$ROCKCFG_ARCH/postconfig.in
include target/$ROCKCFG_TARGET/postconfig.in
if [ $ROCKCFG_USE_CROSSCC != 1 ]; then
var_append filterscript ' ' 's,^\([XO] \)0,\1-, ;'
fi
if [ "$ROCKCFG_CROSSBUILD" = 1 ] ; then
pkgfilter sed -e 's,^\(. ..\)[^ ]*,\1--------, ;'
if [ $ROCKCFG_DO_REBUILD_STAGE != 1 ]; then
var_append filterscript ' ' 's,^\([XO] [^ ]*\)9 ,\1- , ;'
fi
pkgfilter sed -e '/^[XO] --* / d ;'
var_append filterscript ' ' '/^[XO] --* / d ;'
[ "$ROCKCFG_EXPERT" = 1 ] ||
ROCKCFG_ID="`echo $ROCKCFG_ID | sed 's,-noexpert.*,,'`"
pkgfilter sed -e "$filterscript"
[ "$ROCKCFG_IDCKSUM" = 1 ] &&
ROCKCFG_ID="$CFGTEMP_ID-$ROCKCFG_ARCH-$ROCKCFG_TARGET"
[ "$ROCKCFG_CROSSBUILD" = 1 ] && ROCKCFG_ID="$ROCKCFG_ID-cross"
[ "$ROCKCFG_PSEUDONATIVE" = 1 ] && ROCKCFG_ID="$ROCKCFG_ID-pseudonative"
[ $ROCKCFG_EXPERT == 1 ] && ROCKCFG_ID="$ROCKCFG_ID-expert"
[ "$ROCKCFG_IDCKSUM" = 1 ] && \
ROCKCFG_ID="`echo $ROCKCFG_ID | cksum | cut -f1 -d' '`"
const ROCKCFG_SHORTID "$ROCKCFG_ID"

Loading…
Cancel
Save