From 567277099a487508fd228a4c56f3583db3fa96c9 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 29 May 2017 22:32:38 -0700 Subject: Fix the references to old config variables Signed-off-by: Alexey Neyman --- scripts/build/libc/uClibc.sh | 42 +++++++++--------------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) (limited to 'scripts/build/libc/uClibc.sh') diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index a730a1dd..e428349a 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -7,48 +7,24 @@ uclibc_locales_version=030818 uclibc_locale_tarball="uClibc-locale-${uclibc_locales_version}" -if [ "${CT_LIBC_UCLIBC_NG}" = "y" ]; then +if [ "${CT_UCLIBC_NG_USE_UCLIBC_NG_ORG}" = "y" ]; then + # TBD make the name come from config/versions/uclibc.in uclibc_name="uClibc-ng" - libc_src="http://downloads.uclibc-ng.org/releases/${CT_LIBC_VERSION}" -else +elif [ "${CT_UCLIBC_NG_USE_UCLIBC_ORG}" = "y" ]; then uclibc_name="uClibc" - libc_src="http://www.uclibc.org/downloads - http://www.uclibc.org/downloads/old-releases" fi # Download uClibc do_libc_get() { - if [ "${CT_LIBC_UCLIBC_CUSTOM}" = "y" ]; then - CT_GetCustom "${uclibc_name}" "${CT_LIBC_UCLIBC_CUSTOM_VERSION}" \ - "${CT_LIBC_UCLIBC_CUSTOM_LOCATION}" - else - CT_GetFile "${uclibc_name}-${CT_LIBC_VERSION}" ${libc_src} - fi - # uClibc locales - if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then - CT_GetFile "${uclibc_locale_tarball}" ${libc_src} - fi - - return 0 + # TBD allow for "default fork" selection in package.desc and select uClibc-NG (and then use just UCLIBC moniker) + CT_Fetch UCLIBC_NG + # TBD locales } # Extract uClibc do_libc_extract() { - CT_Extract "${uclibc_name}-${CT_LIBC_VERSION}" - CT_Patch "${uclibc_name}" "${CT_LIBC_VERSION}" - - # uClibc locales - # Extracting pregen locales ourselves is kinda - # broken, so just link it in place... - if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" \ - -a ! -f "${CT_SRC_DIR}/.${uclibc_locale_tarball}.extracted" ]; then - CT_Pushd "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}/extra/locale" - CT_DoExecLog ALL ln -s "${CT_TARBALLS_DIR}/${uclibc_locale_tarball}.tgz" . - CT_Popd - touch "${CT_SRC_DIR}/.${uclibc_locale_tarball}.extracted" - fi - - return 0 + CT_ExtractPatch UCLIBC_NG + # TBD locales } # Build and install headers and start files @@ -102,7 +78,7 @@ do_libc_backend_once() { # Simply copy files until uClibc has the ability to build out-of-tree CT_DoLog EXTRA "Copying sources to build dir" - CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}/." . + CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/${uclibc_name}/." . multilib_dir="lib/${multi_os_dir}" startfiles_dir="${multi_root}/usr/${multilib_dir}" -- cgit v1.2.3 From d0ff020e23372a8eccd319c142c72d266c652f56 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 1 Jul 2017 20:17:56 -0700 Subject: Fixes for building - Need GDB8.0 milestone - Make uClibc "master" package - Rename bionic -> android-ndk to match the package name and support suffixes for archives Signed-off-by: Alexey Neyman --- config/libc/bionic.in | 2 +- config/libc/uClibc.in | 2 +- maintainer/gen-versions.sh | 19 +++++++++++++------ maintainer/kconfig-versions.template | 4 ++++ packages/android-ndk/package.desc | 3 +++ packages/android-ndk/r10e/version.desc | 1 + packages/android-ndk/r11c/version.desc | 1 + packages/android-ndk/r12b/version.desc | 1 + packages/android-ndk/r13b/version.desc | 1 + packages/android-ndk/r14b/version.desc | 0 packages/android-ndk/r15b/version.desc | 0 packages/bionic/10e/version.desc | 1 - packages/bionic/11c/version.desc | 1 - packages/bionic/12b/version.desc | 1 - packages/bionic/13b/version.desc | 1 - packages/bionic/14b/version.desc | 0 packages/bionic/15-beta2/version.desc | 1 - packages/bionic/package.desc | 2 -- packages/gdb/package.desc | 2 +- packages/uClibc-ng/package.desc | 2 +- packages/uClibc/package.desc | 7 ++++--- scripts/build/libc/bionic.sh | 8 ++++---- scripts/build/libc/uClibc.sh | 5 ++--- scripts/functions | 18 +++++++++--------- 24 files changed, 47 insertions(+), 36 deletions(-) create mode 100644 packages/android-ndk/package.desc create mode 100644 packages/android-ndk/r10e/version.desc create mode 100644 packages/android-ndk/r11c/version.desc create mode 100644 packages/android-ndk/r12b/version.desc create mode 100644 packages/android-ndk/r13b/version.desc create mode 100644 packages/android-ndk/r14b/version.desc create mode 100644 packages/android-ndk/r15b/version.desc delete mode 100644 packages/bionic/10e/version.desc delete mode 100644 packages/bionic/11c/version.desc delete mode 100644 packages/bionic/12b/version.desc delete mode 100644 packages/bionic/13b/version.desc delete mode 100644 packages/bionic/14b/version.desc delete mode 100644 packages/bionic/15-beta2/version.desc delete mode 100644 packages/bionic/package.desc (limited to 'scripts/build/libc/uClibc.sh') diff --git a/config/libc/bionic.in b/config/libc/bionic.in index 6bf708b5..4d6b857a 100644 --- a/config/libc/bionic.in +++ b/config/libc/bionic.in @@ -11,7 +11,7 @@ ## help This platform has no TLS (Thread Local Storage) support so that option must be ## help disabled in the Compiler options. -source "config/versions/bionic.in" +source "config/versions/android-ndk.in" config THREADS default "posix" diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index 8f91aa01..c1530b21 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -12,7 +12,7 @@ ## help Highly configurable, thus as feature-rich as you ## help need, without compromising for size. -source "config/versions/uClibc-ng.in" +source "config/versions/uClibc.in" config THREADS default "nptl" if THREADS_NATIVE diff --git a/maintainer/gen-versions.sh b/maintainer/gen-versions.sh index 099cdaea..8144b62c 100755 --- a/maintainer/gen-versions.sh +++ b/maintainer/gen-versions.sh @@ -201,7 +201,7 @@ config_dir=config/versions template=maintainer/kconfig-versions.template declare -A pkg_forks pkg_milestones pkg_nforks -declare -a pkg_masters pkg_all +declare -a pkg_masters pkg_all pkg_preferred # Convert the argument to a Kconfig-style macro kconfigize() @@ -406,17 +406,23 @@ find_forks() { local -A info + info[preferred]=${1} eval `read_package_desc ${1}` if [ -n "${info[master]}" ]; then pkg_nforks[${info[master]}]=$[pkg_nforks[${info[master]}]+1] - pkg_forks[${info[master]}]+=" ${1}" + pkg_forks[${info[master]}]+=" ${1} " else + pkg_preferred[${1}]=${info[preferred]} pkg_nforks[${1}]=$[pkg_nforks[${1}]+1] - pkg_forks[${1}]="${1}${pkg_forks[${1}]}" + pkg_forks[${1}]+=" ${1} " pkg_milestones[${1}]=`sort_versions ${info[milestones]}` pkg_masters+=( "${1}" ) fi + # Keep sorting so that preferred fork is first + if [ -n "${pkg_preferred[${1}]}" ]; then + pkg_forks[${1}]="${pkg_preferred[${1}]} ${pkg_forks[${1}]##* ${pkg_preferred[${1}]} } ${pkg_forks[${1}]%% ${pkg_preferred[${1}]} *}" + fi } check_obsolete_experimental() @@ -442,15 +448,16 @@ enter_fork() info[fork]=${fork} info[name]=${fork} info[mirrors]= + info[archivesuffix]= eval `read_package_desc ${fork}` info[pfx]=`kconfigize ${fork}` info[originpfx]=`kconfigize ${info[origin]}` if [ -r "packages/${info[origin]}.help" ]; then - info[originhelp]=`sed 's/^/\t /' "packages/${info[origin]}.help"` + info[originhelp]=`sed 's/^/ /' "packages/${info[origin]}.help"` else - info[originhelp]="${info[master]} from ${info[origin]}." + info[originhelp]=" ${info[master]} from ${info[origin]}." fi if [ -n "${info[repository]}" ]; then @@ -467,7 +474,7 @@ enter_fork() info[all_versions]=${versions} # If a fork does not define any versions at all ("rolling release"), do not - # consider it obsolete/experimental unless it is marked in the fork's + # consider it obsolete/experimental unless it is so marked in the fork's # description. if [ -n "${versions}" ]; then only_obsolete=yes diff --git a/maintainer/kconfig-versions.template b/maintainer/kconfig-versions.template index c1350914..c7ab461f 100644 --- a/maintainer/kconfig-versions.template +++ b/maintainer/kconfig-versions.template @@ -172,6 +172,10 @@ config @@pfx@@_MIRRORS string default "@@mirrors@@" +config @@pfx@@_ARCHIVE_SUFFIX + string + default "@@archivesuffix@@" + #!end-if #!// Below, we explicitly select all milestones to which a given version diff --git a/packages/android-ndk/package.desc b/packages/android-ndk/package.desc new file mode 100644 index 00000000..a422ee83 --- /dev/null +++ b/packages/android-ndk/package.desc @@ -0,0 +1,3 @@ +# We don't support building bionic (yet) so no official repository +archivesuffix='-linux-x86_64' +mirrors='https://dl.google.com/android/repository' diff --git a/packages/android-ndk/r10e/version.desc b/packages/android-ndk/r10e/version.desc new file mode 100644 index 00000000..fcfe3891 --- /dev/null +++ b/packages/android-ndk/r10e/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/android-ndk/r11c/version.desc b/packages/android-ndk/r11c/version.desc new file mode 100644 index 00000000..fcfe3891 --- /dev/null +++ b/packages/android-ndk/r11c/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/android-ndk/r12b/version.desc b/packages/android-ndk/r12b/version.desc new file mode 100644 index 00000000..fcfe3891 --- /dev/null +++ b/packages/android-ndk/r12b/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/android-ndk/r13b/version.desc b/packages/android-ndk/r13b/version.desc new file mode 100644 index 00000000..fcfe3891 --- /dev/null +++ b/packages/android-ndk/r13b/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/android-ndk/r14b/version.desc b/packages/android-ndk/r14b/version.desc new file mode 100644 index 00000000..e69de29b diff --git a/packages/android-ndk/r15b/version.desc b/packages/android-ndk/r15b/version.desc new file mode 100644 index 00000000..e69de29b diff --git a/packages/bionic/10e/version.desc b/packages/bionic/10e/version.desc deleted file mode 100644 index fcfe3891..00000000 --- a/packages/bionic/10e/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/bionic/11c/version.desc b/packages/bionic/11c/version.desc deleted file mode 100644 index fcfe3891..00000000 --- a/packages/bionic/11c/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/bionic/12b/version.desc b/packages/bionic/12b/version.desc deleted file mode 100644 index fcfe3891..00000000 --- a/packages/bionic/12b/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/bionic/13b/version.desc b/packages/bionic/13b/version.desc deleted file mode 100644 index fcfe3891..00000000 --- a/packages/bionic/13b/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/bionic/14b/version.desc b/packages/bionic/14b/version.desc deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/bionic/15-beta2/version.desc b/packages/bionic/15-beta2/version.desc deleted file mode 100644 index 76f14476..00000000 --- a/packages/bionic/15-beta2/version.desc +++ /dev/null @@ -1 +0,0 @@ -experimental='yes' diff --git a/packages/bionic/package.desc b/packages/bionic/package.desc deleted file mode 100644 index 6e3d374a..00000000 --- a/packages/bionic/package.desc +++ /dev/null @@ -1,2 +0,0 @@ -# We don't support building bionic (yet) so no official repository -mirrors='https://dl.google.com/android/repository' diff --git a/packages/gdb/package.desc b/packages/gdb/package.desc index 90cef6a6..c23c701e 100644 --- a/packages/gdb/package.desc +++ b/packages/gdb/package.desc @@ -1,4 +1,4 @@ origin='GNU' repository='git git://sourceware.org/git/binutils-gdb.git' mirrors='$(CT_Mirrors GNU gdb) $(CT_Mirrors sourceware gdb)' -milestones='7.0 7.2' +milestones='7.0 7.2 8.0' diff --git a/packages/uClibc-ng/package.desc b/packages/uClibc-ng/package.desc index 1d514fb7..f03bd804 100644 --- a/packages/uClibc-ng/package.desc +++ b/packages/uClibc-ng/package.desc @@ -1,4 +1,4 @@ +master='uClibc' origin='uclibc-ng.org' repository='git git://uclibc-ng.org/git/uclibc-ng' mirrors='http://downloads.uclibc-ng.org/releases/${CT_UCLIBC_NG_VERSION}' -milestones='0.9.33.2 1.0.0 1.0.15' diff --git a/packages/uClibc/package.desc b/packages/uClibc/package.desc index fd2050aa..887e4c26 100644 --- a/packages/uClibc/package.desc +++ b/packages/uClibc/package.desc @@ -1,6 +1,7 @@ -# Technically, it is the other way around: uClibc-ng is a fork of uClibc. But -# uClibc is no longer maintained, so we want people to use uClibc-ng. -master='uClibc-ng' +# Even though this is the "master" package, we really want to steer the users +# towards uClibc-ng, as the original uClibc is no longer maintained. +preferred='uClibc-ng' origin='uclibc.org' repository='git git://git.busybox.net/uClibc' mirrors='http://www.uclibc.org/downloads http://www.uclibc.org/downloads/old-releases' +milestones='0.9.33.2 1.0.0 1.0.15' diff --git a/scripts/build/libc/bionic.sh b/scripts/build/libc/bionic.sh index a52078d0..027493d4 100644 --- a/scripts/build/libc/bionic.sh +++ b/scripts/build/libc/bionic.sh @@ -3,17 +3,17 @@ # Licensed under the GPL v2. See COPYING in the root of this package do_libc_get() { - CT_Fetch BIONIC + CT_Fetch ANDROID_NDK } do_libc_extract() { - CT_ExtractPatch BIONIC + CT_ExtractPatch ANDROID_NDK } # Install Unified headers do_libc_start_files() { CT_DoStep INFO "Installing C library headers" - CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/bionic/sysroot/usr" "${CT_SYSROOT_DIR}" + CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/sysroot/usr" "${CT_SYSROOT_DIR}" } do_libc() { @@ -25,7 +25,7 @@ do_libc() { arch="${arch}64" fi CT_DoStep INFO "Installing C library binaries" - CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/bionic/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}" + CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}" CT_EnvModify CT_TARGET_CFLAGS "${CT_TARGET_CFLAGS} -D__ANDROID_API__=${CT_ANDROID_API}" } diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index e428349a..1e6db21b 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -7,16 +7,15 @@ uclibc_locales_version=030818 uclibc_locale_tarball="uClibc-locale-${uclibc_locales_version}" -if [ "${CT_UCLIBC_NG_USE_UCLIBC_NG_ORG}" = "y" ]; then +if [ "${CT_UCLIBC_USE_UCLIBC_NG_ORG}" = "y" ]; then # TBD make the name come from config/versions/uclibc.in uclibc_name="uClibc-ng" -elif [ "${CT_UCLIBC_NG_USE_UCLIBC_ORG}" = "y" ]; then +elif [ "${CT_UCLIBC_USE_UCLIBC_ORG}" = "y" ]; then uclibc_name="uClibc" fi # Download uClibc do_libc_get() { - # TBD allow for "default fork" selection in package.desc and select uClibc-NG (and then use just UCLIBC moniker) CT_Fetch UCLIBC_NG # TBD locales } diff --git a/scripts/functions b/scripts/functions index 24cc6679..e3c04efd 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1688,7 +1688,7 @@ CT_PackageRun() use="${use:-${sym}}" # Variables that are per-fork - for v in basename pkg_name version src_release mirrors src_devel src_custom \ + for v in basename pkg_name version src_release mirrors archive_suffix src_devel src_custom \ devel_vcs devel_url devel_branch devel_revision devel_subdir devel_bootstrap \ custom_location; do eval "local ${v}=\${CT_${use}_${v^^}}" @@ -1711,7 +1711,7 @@ CT_DoFetch() if [ "${src_release}" = "y" ]; then basename="${pkg_name}-${version}" - if ! CT_GetFile "${basename}" ${mirrors}; then + if ! CT_GetFile "${basename}${archive_suffix}" ${mirrors}; then CT_Abort "${pkg_name}: download failed" fi @@ -1798,19 +1798,19 @@ CT_Extract() CT_DoExecLog ALL mkdir -p "${dir}" case "${file}" in *.tar.xz) - xz -fdc "${file}" | CT_DoExecLog FILE tar x -f - -C "${dir}" ${components} + xz -fdc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components} ;; *.tar.lzma) - xz -fdc "${file}" | CT_DoExecLog FILE tar x -f - -C "${dir}" ${components} + xz -fdc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components} ;; *.tar.bz2) - bzip2 -dc "${file}" | CT_DoExecLog FILE tar x -f - -C "${dir}" ${components} + bzip2 -dc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components} ;; *.tar.gz|*.tgz) - gzip -dc "${file}" | CT_DoExecLog FILE tar x -f - -C "${dir}" ${components} + gzip -dc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components} ;; *.tar) - CT_DoExecLog FILE tar x -f "${file}" -C "${dir}" ${components} + CT_DoExecLog FILE tar x -v -f "${file}" -C "${dir}" ${components} ;; *.zip) CT_Pushd "${dir}" @@ -1855,8 +1855,8 @@ CT_DoExtractPatch() CT_DoLog EXTRA "Extracting ${basename}" CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracting" # TBD save/discover the extension while fetching - ext=`CT_GetFileExtension "${basename}"` - CT_Extract "${CT_TARBALLS_DIR}/${basename}${ext}" "${CT_COMMON_SRC_DIR}" + ext=`CT_GetFileExtension "${basename}${archive_suffix}"` + CT_Extract "${CT_TARBALLS_DIR}/${basename}${archive_suffix}${ext}" "${CT_COMMON_SRC_DIR}" CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracted" CT_DoExecLog ALL rm -f "${CT_COMMON_SRC_DIR}/.${basename}.extracting" fi -- cgit v1.2.3 From 16a56ed75b489186ae49a8c62945ca914e263477 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 3 Jul 2017 14:49:54 -0700 Subject: uClibc locale "package" Does not build, though. Signed-off-by: Alexey Neyman --- TODO | 8 ++--- config/arch/xtensa.in | 1 - config/libc/uClibc.in.2 | 4 +++ packages/uClibc-locale/030818/version.desc | 0 packages/uClibc-locale/package.desc | 3 ++ scripts/build/libc/uClibc.sh | 58 +++++++++++++++--------------- scripts/functions | 39 +++++++++++--------- 7 files changed, 64 insertions(+), 49 deletions(-) create mode 100644 packages/uClibc-locale/030818/version.desc create mode 100644 packages/uClibc-locale/package.desc (limited to 'scripts/build/libc/uClibc.sh') diff --git a/TODO b/TODO index 386ad143..47c30590 100644 --- a/TODO +++ b/TODO @@ -1,19 +1,19 @@ TBD packages todo -[ ] mention custom glibc addons are no longer handled (even though they never fully were, ct-ng would be unable to fetch them unless they were secretly placed into the download area) -[ ] mention incompatibility of sample options +[X] mention custom glibc addons are no longer handled (even though they never fully were, ct-ng would be unable to fetch them unless they were secretly placed into the download area) +[x] mention incompatibility of sample options [X] version-locked packages [X] make glibc-ports package for glibc <2.17 (it has its own repo) [ ] convert gen-kconfig to use templates -[ ] switch to checked in generated files (config/versions, config/gen) - take too long to generate [ ] new packages [ ] config.guess [ ] gnulib [ ] use gnulib in m4, gettext, libiconv, libtool [ ] autoconf-archive [ ] use to retrieve ax_pthread.m4 (gettext?) + [ ] uclibc-locales [ ] some way of patching development sources - version based? or just directory with "apply-to-any-revision" patches. -[ ] dependencies like cloog +[x] dependencies like cloog A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic language; contact me if you want to help with any of these :) diff --git a/config/arch/xtensa.in b/config/arch/xtensa.in index c247f62a..3ffa4e80 100644 --- a/config/arch/xtensa.in +++ b/config/arch/xtensa.in @@ -5,7 +5,6 @@ ## select ARCH_DEFAULT_LE ## select ARCH_SUPPORTS_BOTH_MMU ## select ARCH_DEFAULT_HAS_MMU -## select USE_OVERLAY ## ## help The xtensa architecture ## help diff --git a/config/libc/uClibc.in.2 b/config/libc/uClibc.in.2 index 7bf8f2aa..0883959f 100644 --- a/config/libc/uClibc.in.2 +++ b/config/libc/uClibc.in.2 @@ -60,6 +60,10 @@ config LIBC_UCLIBC_LOCALES_PREGEN_DATA If so, please report the issue, so we can default this to off if too many people complain. +if LIBC_UCLIBC_LOCALES_PREGEN_DATA +source "config/versions/uClibc-locale.in" +endif + config LIBC_UCLIBC_IPV6 bool prompt "Add support for IPv6" diff --git a/packages/uClibc-locale/030818/version.desc b/packages/uClibc-locale/030818/version.desc new file mode 100644 index 00000000..e69de29b diff --git a/packages/uClibc-locale/package.desc b/packages/uClibc-locale/package.desc new file mode 100644 index 00000000..a14de388 --- /dev/null +++ b/packages/uClibc-locale/package.desc @@ -0,0 +1,3 @@ +# TBD repository='git git://git.busybox.net/uClibc' +mirrors='http://www.uclibc.org/downloads' +archive_dirname='.' diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index 1e6db21b..fdaded8e 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -2,28 +2,20 @@ # Copyright 2007 Yann E. MORIN # Licensed under the GPL v2. See COPYING in the root of this package -# This is a constant because it does not change very often. -# We're in 2010, and are still using data from 7 years ago. -uclibc_locales_version=030818 -uclibc_locale_tarball="uClibc-locale-${uclibc_locales_version}" - -if [ "${CT_UCLIBC_USE_UCLIBC_NG_ORG}" = "y" ]; then - # TBD make the name come from config/versions/uclibc.in - uclibc_name="uClibc-ng" -elif [ "${CT_UCLIBC_USE_UCLIBC_ORG}" = "y" ]; then - uclibc_name="uClibc" -fi - # Download uClibc do_libc_get() { - CT_Fetch UCLIBC_NG - # TBD locales + CT_Fetch UCLIBC + if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then + CT_Fetch UCLIBC_LOCALE + fi } # Extract uClibc do_libc_extract() { - CT_ExtractPatch UCLIBC_NG - # TBD locales + CT_ExtractPatch UCLIBC + if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then + CT_ExtractPatch UCLIBC_LOCALE + fi } # Build and install headers and start files @@ -68,16 +60,19 @@ do_libc_backend_once() { local -a make_args local extra_cflags f cfg_cflags cf local hdr_install_subdir + local uclibc_name for arg in "$@"; do eval "${arg// /\\ }" done - CT_DoStep INFO "Building for multilib ${multi_index}/${multi_count}: '${multi_flags}'" + if [ "${CT_UCLIBC_USE_UCLIBC_NG_ORG}" = "y" ]; then + uclibc_name="uClibc-ng" + elif [ "${CT_UCLIBC_USE_UCLIBC_ORG}" = "y" ]; then + uclibc_name="uClibc" + fi - # Simply copy files until uClibc has the ability to build out-of-tree - CT_DoLog EXTRA "Copying sources to build dir" - CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/${uclibc_name}/." . + CT_DoStep INFO "Building for multilib ${multi_index}/${multi_count}: '${multi_flags}'" multilib_dir="lib/${multi_os_dir}" startfiles_dir="${multi_root}/usr/${multilib_dir}" @@ -97,11 +92,22 @@ do_libc_backend_once() { HOSTCC="${CT_BUILD}-gcc" \ PREFIX="${multi_root}/" \ MULTILIB_DIR="${multilib_dir}" \ - LOCALE_DATA_FILENAME="${uclibc_locale_tarball}.tgz" \ STRIPTOOL=true \ ${CT_LIBC_UCLIBC_VERBOSITY} \ ) + # Simply copy files until uClibc has the ability to build out-of-tree + CT_DoLog EXTRA "Copying sources to build dir" + CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc/." . + if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then + # uClibc's makefile insists on unpacking, but that would screw fetching from + # non-tarball locations. + CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc-locale/." extra/locale + CT_DoExecLog ALL touch extra/locale/dummy-file + CT_DoExecLog ALL tar czf extra/locale/dummy.tar.gz -C extra/locale dummy-file + make_args+=( LOCALE_DATA_FILENAME=dummy.tar.gz ) + fi + # Force the date of the pregen locale data, as the # newer ones that are referenced are not available CT_DoLog EXTRA "Applying configuration" @@ -298,24 +304,20 @@ manage_uClibc_config() { # entirely if LOCALE is not set. If LOCALE was already set, we'll # assume the user has already made all the appropriate generation # arrangements. Note that having the uClibc Makefile download the - # pregenerated locales is not compatible with crosstool; besides, - # crosstool downloads them as part of getandpatch.sh. - CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE" "${dst}" + # pregenerated locales is not compatible with crosstool. case "${CT_LIBC_UCLIBC_LOCALES}:${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" in :*) ;; y:) CT_KconfigEnableOption "UCLIBC_HAS_LOCALE" "${dst}" CT_KconfigDeleteOption "UCLIBC_PREGENERATED_LOCALE_DATA" "${dst}" - CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" \ - "${dst}" + CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" "${dst}" CT_KconfigDeleteOption "UCLIBC_HAS_XLOCALE" "${dst}" ;; y:y) CT_KconfigEnableOption "UCLIBC_HAS_LOCALE" "${dst}" CT_KconfigEnableOption "UCLIBC_PREGENERATED_LOCALE_DATA" "${dst}" - CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" \ - "${dst}" + CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" "${dst}" CT_KconfigDeleteOption "UCLIBC_HAS_XLOCALE" "${dst}" ;; esac diff --git a/scripts/functions b/scripts/functions index 45883156..cea001f2 100644 --- a/scripts/functions +++ b/scripts/functions @@ -537,18 +537,14 @@ CT_Pushd() { pushd "$1" >/dev/null 2>&1 } CT_Popd() { + local dir=`dirs +0` + + CT_DoLog DEBUG "Leaving '${dir}'" popd >/dev/null 2>&1 } -# Create a dir and cd or pushd into it -# Usage: CT_mkdir_cd -# CT_mkdir_pushd -CT_mkdir_cd() { - local dir="${1}" - - mkdir -p "${dir}" - cd "${dir}" -} +# Create a dir and pushd into it +# Usage: CT_mkdir_pushd CT_mkdir_pushd() { local dir="${1}" @@ -1718,7 +1714,12 @@ CT_DoFetch() local tmp_dir if [ "${src_release}" = "y" ]; then - basename="${archive_dirname}" + # Some packages do not contain any directory level at all + if [ "${archive_dirname}" != "." ]; then + basename="${archive_dirname}" + else + basename="${pkg_name}-${version}" + fi if ! CT_GetFile "${archive_filename}" ${mirrors}; then CT_Abort "${pkg_name}: download failed" fi @@ -1869,7 +1870,13 @@ CT_DoExtractPatch() fi # TBD save/discover the extension while fetching ext=`CT_GetFileExtension "${archive}"` - CT_Extract "${CT_TARBALLS_DIR}/${archive}${ext}" "${CT_COMMON_SRC_DIR}" + if [ "${archive_dirname}" = "." ]; then + CT_mkdir_pushd "${CT_COMMON_SRC_DIR}/${basename}" + CT_Extract "${CT_TARBALLS_DIR}/${archive}${ext}" "${CT_COMMON_SRC_DIR}/${basename}" + CT_Popd + else + CT_Extract "${CT_TARBALLS_DIR}/${archive}${ext}" "${CT_COMMON_SRC_DIR}" + fi CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracted" CT_DoExecLog ALL rm -f "${CT_COMMON_SRC_DIR}/.${basename}.extracting" fi @@ -1937,7 +1944,7 @@ CT_DoExtractPatch() CT_DoLog WARN "${pkg_name}: using custom location, no overlays applied" fi if [ -d "${custom_location}" ]; then - CT_DoExecLog ALL cp -av "${custom_location}" "${CT_SRC_DIR}/${pkg_name}" + CT_DoExecLog ALL cp -av "${custom_location}" "${CT_SRC_DIR}/${dir_name}" elif [ -f "${custom_location}" ]; then # Assume "foo.tar.gz" (or likes) contain the "foo" directory local bn @@ -1945,7 +1952,7 @@ CT_DoExtractPatch() CT_Extract "${custom_location}" "${CT_SRC_DIR}" bn=`CT_GetFileBasename "${custom_location##*/}"` CT_TestOrAbort "Unknown file extension: ${custom_location}" -n "${bn}" - CT_DoExecLog ALL mv -v "${CT_SRC_DIR}/${bn%${ext}}" "${CT_SRC_DIR}/${pkg_name}" + CT_DoExecLog ALL mv -v "${CT_SRC_DIR}/${bn%${ext}}" "${CT_SRC_DIR}/${dir_name}" else CT_Abort "Neither file nor directory: ${custom_location}" fi @@ -1953,13 +1960,13 @@ CT_DoExtractPatch() # Possibly has overlays; copy from common source and apply overlays if any local overlay - CT_DoExecLog ALL cp -av "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${pkg_name}" + CT_DoExecLog ALL cp -av "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${dir_name}" overlay="${CT_OVERLAY_LOCATION}/${CT_ARCH}-${CT_OVERLAY_NAME:-overlay}" ext=`CT_GetFileExtension "${overlay}"` - CT_Extract "${overlay}${ext}" "${CT_SRC_DIR}" "${pkg_name}" + CT_Extract "${overlay}${ext}" "${CT_SRC_DIR}" "${dir_name}" else # Common source, just symlink - CT_DoExecLog ALL ln -s "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${pkg_name}" + CT_DoExecLog ALL ln -s "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${dir_name}" fi } -- cgit v1.2.3 From 50a387afa7abd24255ef865dada5d324265e1250 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 3 Jul 2017 17:45:37 -0700 Subject: Remove support for pregenerated locales in uClibc It fails to compile with the only locale version available (030818) (on master too, with exactly the same error). uClibc-ng does not use pregenerated locales. Signed-off-by: Alexey Neyman --- config/libc/uClibc.in.2 | 17 ----------------- packages/uClibc-locale/030818/version.desc | 0 packages/uClibc-locale/package.desc | 3 --- scripts/build/libc/uClibc.sh | 30 ++++-------------------------- 4 files changed, 4 insertions(+), 46 deletions(-) delete mode 100644 packages/uClibc-locale/030818/version.desc delete mode 100644 packages/uClibc-locale/package.desc (limited to 'scripts/build/libc/uClibc.sh') diff --git a/config/libc/uClibc.in.2 b/config/libc/uClibc.in.2 index 0883959f..2ff0d150 100644 --- a/config/libc/uClibc.in.2 +++ b/config/libc/uClibc.in.2 @@ -47,23 +47,6 @@ config LIBC_UCLIBC_LOCALES Note that seems to be broken on recent uClibc releases. -config LIBC_UCLIBC_LOCALES_PREGEN_DATA - bool - prompt "Use pregen locales" - depends on LIBC_UCLIBC_LOCALES - depends on ! LIBC_UCLIBC_NG - default y - help - If you see issues with using pre-generated locales data, - you can try switching this off. - - If so, please report the issue, so we can default this - to off if too many people complain. - -if LIBC_UCLIBC_LOCALES_PREGEN_DATA -source "config/versions/uClibc-locale.in" -endif - config LIBC_UCLIBC_IPV6 bool prompt "Add support for IPv6" diff --git a/packages/uClibc-locale/030818/version.desc b/packages/uClibc-locale/030818/version.desc deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/uClibc-locale/package.desc b/packages/uClibc-locale/package.desc deleted file mode 100644 index a14de388..00000000 --- a/packages/uClibc-locale/package.desc +++ /dev/null @@ -1,3 +0,0 @@ -# TBD repository='git git://git.busybox.net/uClibc' -mirrors='http://www.uclibc.org/downloads' -archive_dirname='.' diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index fdaded8e..af078889 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -5,17 +5,11 @@ # Download uClibc do_libc_get() { CT_Fetch UCLIBC - if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then - CT_Fetch UCLIBC_LOCALE - fi } # Extract uClibc do_libc_extract() { CT_ExtractPatch UCLIBC - if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then - CT_ExtractPatch UCLIBC_LOCALE - fi } # Build and install headers and start files @@ -99,14 +93,6 @@ do_libc_backend_once() { # Simply copy files until uClibc has the ability to build out-of-tree CT_DoLog EXTRA "Copying sources to build dir" CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc/." . - if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then - # uClibc's makefile insists on unpacking, but that would screw fetching from - # non-tarball locations. - CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc-locale/." extra/locale - CT_DoExecLog ALL touch extra/locale/dummy-file - CT_DoExecLog ALL tar czf extra/locale/dummy.tar.gz -C extra/locale dummy-file - make_args+=( LOCALE_DATA_FILENAME=dummy.tar.gz ) - fi # Force the date of the pregen locale data, as the # newer ones that are referenced are not available @@ -305,22 +291,14 @@ manage_uClibc_config() { # assume the user has already made all the appropriate generation # arrangements. Note that having the uClibc Makefile download the # pregenerated locales is not compatible with crosstool. - case "${CT_LIBC_UCLIBC_LOCALES}:${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" in - :*) - ;; - y:) + if [ -z "${CT_LIBC_UCLIBC_LOCALES}" ]; then + CT_KconfigDisableOption "UCLIBC_HAS_LOCALE" "${dst}" + else CT_KconfigEnableOption "UCLIBC_HAS_LOCALE" "${dst}" CT_KconfigDeleteOption "UCLIBC_PREGENERATED_LOCALE_DATA" "${dst}" CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" "${dst}" CT_KconfigDeleteOption "UCLIBC_HAS_XLOCALE" "${dst}" - ;; - y:y) - CT_KconfigEnableOption "UCLIBC_HAS_LOCALE" "${dst}" - CT_KconfigEnableOption "UCLIBC_PREGENERATED_LOCALE_DATA" "${dst}" - CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" "${dst}" - CT_KconfigDeleteOption "UCLIBC_HAS_XLOCALE" "${dst}" - ;; - esac + fi # WCHAR support if [ "${CT_LIBC_UCLIBC_WCHAR}" = "y" ]; then -- cgit v1.2.3