diff options
Diffstat (limited to 'meta/recipes-extended/bash/bash.inc')
| -rw-r--r-- | meta/recipes-extended/bash/bash.inc | 137 |
1 files changed, 0 insertions, 137 deletions
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc deleted file mode 100644 index 634209c911..0000000000 --- a/meta/recipes-extended/bash/bash.inc +++ /dev/null | |||
| @@ -1,137 +0,0 @@ | |||
| 1 | SUMMARY = "An sh-compatible command language interpreter" | ||
| 2 | HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html" | ||
| 3 | DESCRIPTION = "Bash is the GNU Project's Bourne Again SHell, a complete implementation of the IEEE POSIX and Open Group shell specification with interactive command line editing, job control on architectures that support it, csh-like features such as history substitution and brace expansion, and a slew of other features." | ||
| 4 | SECTION = "base/shell" | ||
| 5 | |||
| 6 | DEPENDS = "ncurses bison-native virtual/libiconv" | ||
| 7 | |||
| 8 | inherit autotools gettext texinfo update-alternatives ptest | ||
| 9 | |||
| 10 | EXTRA_AUTORECONF += "--exclude=autoheader,aclocal" | ||
| 11 | EXTRA_OECONF = "--enable-job-control --without-bash-malloc bash_cv_wexitstatus_offset=8" | ||
| 12 | |||
| 13 | # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the | ||
| 14 | # startup files, even if they are not interactive. | ||
| 15 | # This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137. | ||
| 16 | CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS" | ||
| 17 | |||
| 18 | # This can vary depending upon the host | ||
| 19 | CFLAGS += "-DHEREDOC_PIPESIZE=65536" | ||
| 20 | |||
| 21 | # Disable bracketed paste mode by default (enabled by default in bash 5.1). It | ||
| 22 | # causes a lot of garbage in non-interactive shells | ||
| 23 | CFLAGS += "-DBRACKETED_PASTE_DEFAULT=0" | ||
| 24 | |||
| 25 | ALTERNATIVE:${PN} = "bash sh" | ||
| 26 | ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash" | ||
| 27 | ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash" | ||
| 28 | ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" | ||
| 29 | ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}" | ||
| 30 | ALTERNATIVE_PRIORITY = "100" | ||
| 31 | |||
| 32 | RDEPENDS:${PN} += "base-files" | ||
| 33 | RDEPENDS:${PN}:class-nativesdk = "" | ||
| 34 | RDEPENDS:${PN}-ptest += "make coreutils perl sed shadow util-linux-setpriv" | ||
| 35 | |||
| 36 | RDEPENDS:${PN}-ptest:append:libc-glibc = " \ | ||
| 37 | glibc-gconv-big5hkscs \ | ||
| 38 | glibc-gconv-iso8859-1 \ | ||
| 39 | glibc-utils \ | ||
| 40 | locale-base-de-de \ | ||
| 41 | locale-base-en-us \ | ||
| 42 | locale-base-fr-fr \ | ||
| 43 | locale-base-fr-fr.iso-8859-1 \ | ||
| 44 | locale-base-zh-hk.big5-hkscs \ | ||
| 45 | " | ||
| 46 | |||
| 47 | CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}" | ||
| 48 | |||
| 49 | do_compile:prepend() { | ||
| 50 | # Remove any leftover .build files. This ensures that bash always has the | ||
| 51 | # same version number and keeps builds reproducible | ||
| 52 | rm -f ${B}/.build | ||
| 53 | } | ||
| 54 | |||
| 55 | do_compile_ptest () { | ||
| 56 | oe_runmake buildtest | ||
| 57 | } | ||
| 58 | |||
| 59 | do_install:prepend () { | ||
| 60 | # Ensure determinism as this counter increases for each make call | ||
| 61 | rm -f ${B}/.build | ||
| 62 | } | ||
| 63 | |||
| 64 | do_install:append () { | ||
| 65 | # Move /usr/bin/bash to /bin/bash, if need | ||
| 66 | if [ "${base_bindir}" != "${bindir}" ]; then | ||
| 67 | mkdir -p ${D}${base_bindir} | ||
| 68 | mv ${D}${bindir}/bash ${D}${base_bindir} | ||
| 69 | fi | ||
| 70 | } | ||
| 71 | |||
| 72 | fix_absolute_paths () { | ||
| 73 | # Clean buildhost references in bashbug | ||
| 74 | sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ | ||
| 75 | -e "s,-I${WORKDIR}/\S* ,,g" \ | ||
| 76 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
| 77 | ${D}${bindir}/bashbug | ||
| 78 | |||
| 79 | # Clean buildhost references in bash.pc | ||
| 80 | sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ | ||
| 81 | ${D}${libdir}/pkgconfig/bash.pc | ||
| 82 | |||
| 83 | # Clean buildhost references in Makefile.inc | ||
| 84 | sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ | ||
| 85 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
| 86 | -e 's:${HOSTTOOLS_DIR}/::g' \ | ||
| 87 | -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ | ||
| 88 | ${D}${libdir}/bash/Makefile.inc | ||
| 89 | } | ||
| 90 | |||
| 91 | do_install:append:class-target () { | ||
| 92 | fix_absolute_paths | ||
| 93 | } | ||
| 94 | |||
| 95 | do_install:append:class-nativesdk () { | ||
| 96 | fix_absolute_paths | ||
| 97 | } | ||
| 98 | |||
| 99 | do_install_ptest () { | ||
| 100 | make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test | ||
| 101 | cp ${B}/Makefile ${D}${PTEST_PATH} | ||
| 102 | cp ${B}/config.h ${D}${PTEST_PATH} | ||
| 103 | cp ${B}/version.h ${D}${PTEST_PATH} | ||
| 104 | cp ${S}/y.tab.[ch] ${D}${PTEST_PATH} | ||
| 105 | install -D ${UNPACKDIR}/run-bash-ptests ${D}${PTEST_PATH}/run-bash-ptests | ||
| 106 | sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ | ||
| 107 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
| 108 | -e 's|${BUILD_LDFLAGS}||g' \ | ||
| 109 | -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" \ | ||
| 110 | -e 's:${HOSTTOOLS_DIR}/::g' \ | ||
| 111 | -e 's:${UNINATIVE_LOADER}:${base_bindir}/false:g' \ | ||
| 112 | ${D}${PTEST_PATH}/Makefile | ||
| 113 | } | ||
| 114 | # The uninative loader is different on i386 & x86_64 hosts. Since it is only | ||
| 115 | # being replaced with /bin/false anyway, it doesn't need to be part of the task | ||
| 116 | # hash | ||
| 117 | do_install_ptest[vardepsexclude] += "UNINATIVE_LOADER" | ||
| 118 | |||
| 119 | pkg_postinst:${PN} () { | ||
| 120 | grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells | ||
| 121 | } | ||
| 122 | |||
| 123 | pkg_postrm:${PN} () { | ||
| 124 | printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells | ||
| 125 | } | ||
| 126 | |||
| 127 | PACKAGES += "${PN}-bashbug" | ||
| 128 | FILES:${PN} = "${bindir}/bash ${base_bindir}/bash.bash" | ||
| 129 | FILES:${PN}-bashbug = "${bindir}/bashbug" | ||
| 130 | |||
| 131 | PACKAGE_BEFORE_PN += "${PN}-loadable" | ||
| 132 | RDEPENDS:${PN}-loadable += "${PN}" | ||
| 133 | FILES:${PN}-loadable += "${libdir}/bash/*" | ||
| 134 | |||
| 135 | # Limit the RPROVIDES here to class target so that if usrmerge is enabled for nativesdk, it does not | ||
| 136 | # include host system paths in /bin/ | ||
| 137 | RPROVIDES:${PN}:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/bash', '', d)}" | ||
