diff --git a/misc/tools-source/config_helper.c b/misc/tools-source/config_helper.c index c8f2f6f09..9db965896 100644 --- a/misc/tools-source/config_helper.c +++ b/misc/tools-source/config_helper.c @@ -47,7 +47,7 @@ struct builtin { struct package; struct package { int status; - int stages[10]; + char stages[10]; char *prio; char *repository; char *name; @@ -89,7 +89,7 @@ int read_pkg_list(const char *file) { tok = strtok(0, " "); for (i=0; i<10; i++) - pkg_tmp->stages[i] = tok[i] != '-'; + pkg_tmp->stages[i] = tok[i] != '-' ? tok[i] : 0; tok = strtok(0, " "); pkg_tmp->prio = strdup(tok); @@ -130,7 +130,7 @@ int write_pkg_list(const char *file) { while (pkg) { fprintf(f, "%c ", pkg->status ? 'X' : 'O'); for (i=0; i<10; i++) - fprintf(f, "%c", pkg->stages[i] ? '0'+i : '-'); + fprintf(f, "%c", pkg->stages[i] ? pkg->stages[i] : '-'); fprintf(f, " %s %s %s", pkg->prio, pkg->repository, pkg->name); if (strcmp(pkg->name, pkg->alias)) fprintf(f, "=%s", pkg->alias); diff --git a/package/base/bdb/bdb.conf b/package/base/bdb/bdb.conf index 3aff80d52..a5c25b81e 100644 --- a/package/base/bdb/bdb.conf +++ b/package/base/bdb/bdb.conf @@ -25,8 +25,11 @@ echo_status "Set package version number based on name: $ver" hook_add preconf 2 'cd build_unix' configscript="../dist/configure" +if [ $stagelevel -gt 1 ] ; then + var_append confopt ' ' '--enable-cxx' +fi + var_append confopt ' ' '--enable-compat185' -var_append confopt ' ' '--enable-cxx' var_append confopt ' ' "--includedir=$root/$prefix/include/${xpkg:1}" is_bdb_default() { diff --git a/package/base/glibc/glibc.conf b/package/base/glibc/glibc.conf index 1c8aa0a5a..224a16b2c 100644 --- a/package/base/glibc/glibc.conf +++ b/package/base/glibc/glibc.conf @@ -184,13 +184,12 @@ glibc_custmain() { install_init nscd $confdir/nscd.init fi - # No wrong absolute path in libc.so + # No wrong absolute path in *.so linker scripts # if [ $stagelevel -le 1 ] then - libcso=$root/$prefix/lib/libc.so - sed 's,/[^ ]*/,,g' < $libcso > $libcso.new - mv $libcso.new $libcso + sed -i 's,/[^ ]*/,,g' $root/$prefix/lib/libc.so + sed -i 's,/[^ ]*/,,g' $root/$prefix/lib/libpthread.so fi # Install ld.so.conf diff --git a/package/base/ncurses/ncurses.conf b/package/base/ncurses/ncurses.conf index b0e9ebc00..b52a076b6 100644 --- a/package/base/ncurses/ncurses.conf +++ b/package/base/ncurses/ncurses.conf @@ -45,4 +45,8 @@ hook_add postmake 7 "\ ln -svf libncurses.so $libdir/libcurses.so; \ ln -svf libncurses.a $libdir/libcurses.a" +if [ $stagelevel = 1 ] ; then + var_append confopt ' ' '--without-cxx --without-cxx-bindings' +fi + var_append makeinstopt ' ' "'INSTALL_LIB=\$(INSTALL) -m 755'" diff --git a/package/base/openssl/openssl.conf b/package/base/openssl/openssl.conf index 0b86c4fe5..80ed1b3a8 100644 --- a/package/base/openssl/openssl.conf +++ b/package/base/openssl/openssl.conf @@ -20,10 +20,9 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- - -openssl_main() { - - # We can't use ./config becouse that would probably add optimize +openssl_main() +{ + # We can't use ./config because that would probably add optimize # options which won't work on our taget system. case "$arch_machine" in i?86) trg=linux-elf ;; @@ -44,12 +43,17 @@ openssl_main() { esac ./Configure --prefix=/usr --openssldir=/etc/ssl $trg shared - mkdir -p /etc/ssl ; rm -rf /etc/ssl/man /etc/ssl/lib /etc/ssl/include - rm -rf $docdir/* - cp -r doc $docdir ; mkdir $docdir/man ; ln -s $docdir/man /etc/ssl/man + mkdir -p $root/etc/ssl ; rm -rf $docdir/* + rm -rf $root/etc/ssl/man $root/etc/ssl/lib $root/etc/ssl/include + cp -r doc $docdir ; mkdir $docdir/man ; ln -s $docdir/man $root/etc/ssl/man + ln -s /usr/lib /usr/include $root/etc/ssl/ - ln -s /usr/lib /usr/include /etc/ssl/ - eval $MAKE install + # the openssl makefile expects the 'r' mode to be passed + # already in the $(AR) variable .. + AR="$AR r" + + eval "$MAKE $makeopt all" + eval "$MAKE INSTALL_PREFIX=$root install" } custmain="openssl_main" diff --git a/package/base/sendmail/parse-config b/package/base/sendmail/parse-config index f8a6c1387..7efb782f6 100644 --- a/package/base/sendmail/parse-config +++ b/package/base/sendmail/parse-config @@ -22,11 +22,11 @@ install_setmailer() { - sed "s,@mailer@,$1,g" > /usr/sbin/setmailer_$1 \ + sed "s,@mailer@,$1,g" > $root/usr/sbin/setmailer_$1 \ < $base/package/base/sendmail/setmailer.sh - chmod +x /usr/sbin/setmailer_$1 + chmod +x $root/usr/sbin/setmailer_$1 - if [ "$ROCKCFG_DEFAULT_MTA" = "$1" ] ; then + if [ "$ROCKCFG_DEFAULT_MTA" = "$1" -a $stagelevel -gt 1 ] ; then /usr/sbin/setmailer_$1 fi } diff --git a/package/base/unzip/unzip.conf b/package/base/unzip/unzip.conf index ede02e051..c3f8b1db0 100644 --- a/package/base/unzip/unzip.conf +++ b/package/base/unzip/unzip.conf @@ -22,8 +22,12 @@ uz_main() { - eval $MAKE generic -f unix/Makefile prefix=/usr - eval $MAKE install -f unix/Makefile prefix=/usr + # the unzipo makefile calls LD as it would be a CC. so we + # simply pass the compiler as linker and everyone is happy. + LD="$CC" + + eval $MAKE $makeopt generic -f unix/Makefile prefix=/usr + eval $MAKE install -f unix/Makefile prefix=$root/usr } custmain=uz_main diff --git a/package/base/zip/zip.conf b/package/base/zip/zip.conf index 7c2e87ad6..8192b5090 100644 --- a/package/base/zip/zip.conf +++ b/package/base/zip/zip.conf @@ -24,8 +24,8 @@ uz_main() { mkdir zip-$ver ; cd zip-$ver unzip $archdir/zip$ver.zip - eval $MAKE generic -f unix/Makefile prefix=/usr - eval $MAKE install -f unix/Makefile prefix=/usr + eval $MAKE $makeopt generic -f unix/Makefile prefix=/usr + eval $MAKE install -f unix/Makefile prefix=$root/usr } custmain=uz_main diff --git a/package/rene/exim/exim.conf b/package/rene/exim/exim.conf index 5f890a010..3d410d1a2 100644 --- a/package/rene/exim/exim.conf +++ b/package/rene/exim/exim.conf @@ -37,6 +37,7 @@ EXIM_GROUP=30 AUTH_CRAM_MD5=yes COMPRESS_COMMAND=/bin/gzip ZCAT_COMMAND=/bin/zcat +CC=$CC EOT } diff --git a/package/valentin/asterisk/asterisk.desc b/package/valentin/asterisk/asterisk.desc index 2feb1e700..bfd867288 100644 --- a/package/valentin/asterisk/asterisk.desc +++ b/package/valentin/asterisk/asterisk.desc @@ -19,6 +19,7 @@ [COPY] file for details. [COPY] [COPY] --- ROCK-COPYRIGHT-NOTE-END --- + [I] open source linux pbx [T] Asterisk is a complete PBX in software. It does voice over IP in @@ -37,6 +38,6 @@ [L] GPL [S] Stable [V] 0.9.1 -[P] X -?---X---X 201.300 +[P] X -?---5---9 201.300 [D] 2067899276 asterisk-0.9.1.tar.gz ftp://ftp.asterisk.org/pub/telephony/asterisk/ diff --git a/scripts/config.cache b/scripts/config.cache index 2bc0371a6..e306d5874 100644 --- a/scripts/config.cache +++ b/scripts/config.cache @@ -26,7 +26,8 @@ ac_cv_func_closedir_void=no ac_cv_func_fnmatch_works=yes ac_cv_func_getpgrp_void=yes ac_cv_func_setpgrp_void=yes -ac_cv_func_setrlimit=no +ac_cv_func_setresuid=yes +ac_cv_func_setrlimit=yes ac_cv_func_setvbuf_reversed=no compat_cv_func_makedev_three_args=no @@ -48,7 +49,29 @@ ksh_cv_rlim_check=long ac_cv_lib_intl=no ac_cv_file___dev_urandom_=yes +db_cv_gcc_2_96_forloop_bug=no +db_cv_posixmutexes=yes +db_cv_mutex=POSIX/pthreads/library +db_cv_fcntl_f_setfd=yes +db_cv_sprintf_count=yes + sudo_cv_ebcdic=no utils_cv_sys_open_max=1021 - am_cv_func_working_getline=yes + +ac_cv_sizeof___int16=0 +ac_cv_sizeof___int32=0 +ac_cv_sizeof___int64=0 + +ac_cv_sizeof_int16_t=2 +ac_cv_sizeof_int32_t=4 +ac_cv_sizeof_int64_t=8 + +ac_cv_sizeof_u_int16_t=2 +ac_cv_sizeof_u_int32_t=4 +ac_cv_sizeof_u_int64_t=8 + +ac_cv_sizeof_uint16_t=2 +ac_cv_sizeof_uint32_t=4 +ac_cv_sizeof_uint64_t=8 + diff --git a/scripts/config.in b/scripts/config.in index f8493d670..64ad9863f 100644 --- a/scripts/config.in +++ b/scripts/config.in @@ -81,8 +81,20 @@ block_begin 7 then . architecture/$ROCKCFG_ARCH/config.in ; fi bool 'This is a cross-build between architectures' ROCKCFG_CROSSBUILD 0 if [ "$ROCKCFG_CROSSBUILD" = 1 ] ; then - pkgfilter sed -e 's,^\(. ..\)[^ ]*,\1--------,' + block_begin + 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.' + pkgfilter sed -e 's,^\(. .\)[1X?][^ ]*,\11--------,; s,\(. .\)[-][^ ]*,\1---------,;' + else + pkgfilter sed -e 's,^\(. .\)[1X][^ ]*,\11--------,; s,\(. .\)[?-][^ ]*,\1---------,;' + fi ROCKCFG_ID="$ROCKCFG_ID-cross" ; ROCKCFGSET_USE_CROSSCC=1 + block_end + else + pkgfilter sed -e 's,\(. .\)[?X],\1-,;' fi block_end diff --git a/scripts/functions b/scripts/functions index 306a3594c..4f5f579c9 100644 --- a/scripts/functions +++ b/scripts/functions @@ -363,13 +363,23 @@ rock_substitute() { # create_config_cache() { cat $base/scripts/config.cache + echo -e "\n# Architecture specific stuff\n" + echo "arch_sizeof_char=1" echo "ac_cv_sizeof_short=$arch_sizeof_short" echo "ac_cv_sizeof_int=$arch_sizeof_int" echo "ac_cv_sizeof_long=$arch_sizeof_long" echo "ac_cv_sizeof_long_long=$arch_sizeof_long_long" echo "ac_cv_sizeof_char_p=$arch_sizeof_char_p" + echo "ac_cv_sizeof_void_p=$arch_sizeof_char_p" echo "ac_cv_c_bigendian=$arch_bigendian" + + local pt="" + [ $arch_sizeof_char_p -eq $arch_sizeof_int ] && pt="int" + [ $arch_sizeof_char_p -eq $arch_sizeof_long ] && pt="long" + [ $arch_sizeof_char_p -eq $arch_sizeof_long_long ] && pt="long long" + [ -n "$pt" ] && echo "db_cv_alignp_t=\"unsigned $pt\"" + echo "ac_cv_prog_CC=$CC" }