From 75cb84da6274d97fb7d146499b96b5a4973367cd Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: Mar 05 2016 22:23:56 +0000 Subject: - Followup to last commit. - Replaced -[LI]${PREFIX_LVL3}/{lib,include} w/ --sysroot ${PREFIX_LVL3}. --- diff --git a/build.sh b/build.sh index 6cc25f6..e12a9d4 100755 --- a/build.sh +++ b/build.sh @@ -26,10 +26,8 @@ esac; shift; done; clear_env_with_except ${CLEAR_ENV_VARS_EXCEPT}; check_path_vars ${CHECK_PATH_VARS}; check_prereqs ${PREREQ_CMDS}; mkdir -p ${PREFIX} ${PREFIX_NATIVE} ${PREFIX_TARGET} ${WORKDIR}; -update_build_status build_start; build_times_init; -trap clean_build_status HUP INT TERM USR1 USR2; - {( +update_build_status build_start; build_times_init; trap clean_build_status\ abort HUP INT TERM USR1 USR2; log_msg info "Build started by ${BUILD_USER:=${USER}}@${BUILD_HNAME:=$(hostname)} at ${BUILD_DATE_START}."; log_env_vars ${LOG_ENV_VARS}; [ ${ARG_CLEAN:-0} -eq 1 ] && clean_prefix; BUILD_NFINI=${BUILD_NSKIP:=${BUILD_NFAIL:=${BUILD_NBUILT:=0}}}; @@ -118,7 +116,8 @@ if [ $(( ${BUILD_NFINI} + ${BUILD_NSKIP} )) -ge 0 ] \ wait; log_msg info "Finished building distribution tarball."; update_build_status tarball_finish; fi; -update_build_status finish; -exit ${BUILD_SCRIPT_RC})} 2>&1 | tee ${PREFIX}/build.log; +update_build_status finish; clean_build_status; +exit ${BUILD_SCRIPT_RC})} 2>&1 | tee ${PREFIX}/build.log & +trap "kill -INT $!" HUP INT TERM USR1 USR2; wait; # vim:filetype=sh diff --git a/build.subr b/build.subr index 0da5507..8e6b197 100644 --- a/build.subr +++ b/build.subr @@ -46,8 +46,11 @@ clean_build_status() { set -- BUILD_STATUS_IN_PROGRESS_FNAME BUILD_STATUS_PROGRESS_FNAME BUILD_STATUS_TARBALL_PROGRESS_FNAME; while [ ${#} -gt 0 ]; do rm -f $(get_var_unsafe ${1}); shift; - done; touch ${PREFIX}/BUILD_ABORTED_AT_$(date %Y-%m-%d-%H-%M-%S); - log_msg fail "Build aborted at $(date %Y-%m-%d-%H-%M-%S)."; + done; + if [ "${1}" = abort ]; then + touch ${PREFIX}/BUILD_ABORTED_AT_$(date %Y-%m-%d-%H-%M-%S); + log_msg fail "Build aborted at $(date %Y-%m-%d-%H-%M-%S)."; + fi; }; export_vars_subst() { @@ -60,8 +63,8 @@ export_vars_subst() { }; fetch_git() { - [ ${ARG_NO_DOWNLOAD:-0} -eq 0 ] &&\ - rm_if_exists ${1}; + [ ${ARG_NO_DOWNLOAD:-0} -eq 1 ] && return; + rm_if_exists ${1}; [ -d ${1} ] && (cd ${1} && git pull origin main)\ || git clone ${3} ${2} ${1}; }; @@ -171,8 +174,8 @@ clear_env_with_except() { }; fetch() { - [ ${ARG_NO_DOWNLOAD:-0} -eq 0 ] &&\ - rm_if_exists $(get_basename ${1}); + [ ${ARG_NO_DOWNLOAD:-0} -eq 1 ] && return; + rm_if_exists $(get_basename ${1}); wget ${WGET_ARGS} ${1}; if [ ${#} -eq 2 ]; then set -- $(get_basename ${1}) "$(compare_hash $(get_basename ${1}) ${2})" ${2}; diff --git a/build.vars b/build.vars index d51dd4f..91147d5 100644 --- a/build.vars +++ b/build.vars @@ -42,7 +42,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${WORKDIR:=${PREFIX}/tmp}; : ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils dalist dash diffutils findutils gawk git gmp grep gzip hexcurse less libelf libressl libz make mpc mpfr nano ncurses ncursestw ncursesw ntapi ntcon ntctty openssh patch pemagine popt psxscl psxstub psxtypes rsync sed tar util_linux which xz"}; -: ${PKG_BUILD_VARS:="AR_BUILD AR_CONFIGURE BUILD_DIR BUILD_TYPE CC_BUILD CC_CONFIGURE CC_INSTALL CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA CFLAGS_INSTALL_EXTRA CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA ENV_VARS_EXTRA GIT_ARGS_EXTRA INSTALL_TARGET LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE_EXTRA LDFLAGS_INSTALL_EXTRA LIBTOOL_MIDIPIX LIBTOOL_MIDIPIX_FIX MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN PATCHES_EXTRA_URL PREFIX_EXTRA RANLIB_INSTALL SHA256SUM SUBDIR URL URL_TYPE VERSION"}; +: ${PKG_BUILD_VARS:="AR_BUILD AR_CONFIGURE BUILD_DIR BUILD_TYPE CC_BUILD CC_CONFIGURE CC_INSTALL CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA CFLAGS_INSTALL_EXTRA CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA ENV_VARS_EXTRA GIT_ARGS_EXTRA INSTALL_TARGET LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA LDFLAGS_INSTALL_EXTRA LIBTOOL_MIDIPIX LIBTOOL_MIDIPIX_FIX MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN PATCHES_EXTRA_URL PREFIX_EXTRA RANLIB_INSTALL SHA256SUM SUBDIR URL URL_TYPE VERSION"}; : ${PKG_LVL0_CFLAGS_CONFIGURE:=-O0}; : ${PKG_LVL0_CONFIGURE_ARGS:="-C --host=${HOST_NATIVE} --prefix= --target=${TARGET}"}; : ${PKG_LVL0_MAKEFLAGS_BUILD:=${MAKEFLAGS_DEFAULT}}; @@ -56,7 +56,8 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_LVL2_ENV_VARS_EXTRA:="CFLAGS_PATH=-I${PREFIX_LVL2}/include,LDFLAGS_PATH=-L${PREFIX_LVL2}/lib"}; : ${PKG_LVL2_MAKEFLAGS_BUILD:=${MAKEFLAGS_DEFAULT}}; : ${PKG_LVL2_URL_TYPE:=git}; -: ${PKG_LVL3_CFLAGS_CONFIGURE:=${CFLAGS_DEFAULT}}; +: ${PKG_LVL3_CFLAGS_CONFIGURE:=${CFLAGS_DEFAULT} --sysroot=${PREFIX_LVL3}}; +: ${PKG_LVL3_LDFLAGS_CONFIGURE:=--sysroot=${PREFIX_LVL3}}; : ${PKG_LVL3_MAKEFLAGS_BUILD:=${MAKEFLAGS_DEFAULT}}; : ${PKG_LVL3_MAKEFLAGS_INSTALL:=DESTDIR=${PREFIX_LVL3}}; : ${PKG_LVL3_CONFIGURE_ARGS:="-C --host=${HOST_NATIVE} --prefix= --target=${TARGET}"}; @@ -64,8 +65,6 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_APK_TOOLS_VERSION:=2.6.6}; : ${PKG_APK_TOOLS_SHA256SUM:=7e5e86c856ce236c7fd54605ee0b1dbf59920398d3b33f9f6ff0e5f98e6828af}; : ${PKG_APK_TOOLS_URL:=http://git.alpinelinux.org/cgit/apk-tools/snapshot/apk-tools-${PKG_APK_TOOLS_VERSION}.tar.bz2}; -: ${PKG_APK_TOOLS_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include}; -: ${PKG_APK_TOOLS_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_LVL3}/lib}; : ${PKG_APK_TOOLS_MAKEFLAGS_BUILD_EXTRA:=CROSS_COMPILE=${HOST_NATIVE}- LUAAPK= PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig VERBOSE=1}; : ${PKG_BZIP2_VERSION:=1.0.6}; : ${PKG_BZIP2_SHA256SUM:=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd}; @@ -83,7 +82,6 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_BASH_SHA256SUM:=afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4}; : ${PKG_BASH_URL:=https://ftp.gnu.org/gnu/bash/bash-${PKG_BASH_VERSION}.tar.gz}; : ${PKG_BASH_CONFIGURE_ARGS_EXTRA:=--without-bash-malloc --with-curses}; -: ${PKG_BASH_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_LVL3}/lib}; : ${PKG_BASH_PATCHES_EXTRA_URL:=https://ftp.gnu.org/gnu/bash/bash-${PKG_BASH_VERSION}-patches/}; : ${PKG_BINUTILS_VERSION:=2.24.51}; : ${PKG_BINUTILS_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa}; @@ -114,11 +112,11 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_GIT_BUILD_DIR:=git}; : ${PKG_GIT_CC_BUILD:=${HOST_NATIVE}-gcc}; : ${PKG_GIT_CC_INSTALL:=${HOST_NATIVE}-gcc}; -: ${PKG_GIT_CFLAGS_BUILD_EXTRA:=-I. -I${PREFIX_LVL3}/include}; -: ${PKG_GIT_CFLAGS_INSTALL_EXTRA:=-I. -I${PREFIX_LVL3}/include}; +: ${PKG_GIT_CFLAGS_BUILD_EXTRA:=--sysroot=${PREFIX_LVL3} -I.}; +: ${PKG_GIT_CFLAGS_INSTALL_EXTRA:=--sysroot=${PREFIX_LVL3} -I.}; : ${PKG_GIT_GIT_ARGS_EXTRA:=--branch v2.7.1}; -: ${PKG_GIT_LDFLAGS_BUILD_EXTRA:=-L${PREFIX_LVL3}/lib}; -: ${PKG_GIT_LDFLAGS_INSTALL_EXTRA:=-L${PREFIX_LVL3}/lib}; +: ${PKG_GIT_LDFLAGS_BUILD_EXTRA:=--sysroot=${PREFIX_LVL3}}; +: ${PKG_GIT_LDFLAGS_INSTALL_EXTRA:=--sysroot=${PREFIX_LVL3}}; : ${PKG_GIT_MAKEFLAGS_BUILD_EXTRA:=NO_CURL=1 NO_PERL=1 prefix=${PREFIX_LVL3} V=99}; : ${PKG_GIT_MAKEFLAGS_INSTALL:=NO_CURL=1 NO_PERL=1 prefix=${PREFIX_LVL3} V=99}; : ${PKG_GIT_RANLIB_INSTALL:=${HOST_NATIVE}-ranlib}; @@ -138,17 +136,13 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_GZIP_SHA256SUM:=1ca41818a23c9c59ef1d5e1d00c0d5eaa2285d931c0fb059637d7c0cc02ad967}; : ${PKG_GZIP_URL:=https://ftp.gnu.org/gnu/gzip/gzip-${PKG_GZIP_VERSION}.tar.gz}; : ${PKG_GZIP_CC_BUILD:=${HOST_NATIVE}-gcc}; -: ${PKG_GZIP_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_NATIVE}/include}; -: ${PKG_GZIP_LDFLAGS_CONFIGURE_EXTRA:=--sysroot=${PREFIX_NATIVE}}; -: ${PKG_GZIP_CONFIGURE_ARGS:=--host=${HOST_NATIVE} --prefix= --target=${TARGET}}; -: ${PKG_HEXCURSE_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include/ncursesw -I${PREFIX_LVL3}/include}; -: ${PKG_HEXCURSE_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_LVL3}/lib}; +: ${PKG_GZIP_CONFIGURE_ARGS:=--host=${HOST_NATIVE} --prefix= --target=${TARGET} --sysroot=${PREFIX_LVL3}}; +: ${PKG_HEXCURSE_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include/ncursesw}; : ${PKG_HEXCURSE_URL:=https://github.com/LonnyGomes/hexcurse}; : ${PKG_HEXCURSE_URL_TYPE:=git}; : ${PKG_LESS_VERSION:=481}; : ${PKG_LESS_SHA256SUM:=3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5}; : ${PKG_LESS_URL:=http://www.greenwoodsoftware.com/less/less-${PKG_LESS_VERSION}.tar.gz}; -: ${PKG_LESS_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_LVL3}/lib}; : ${PKG_LIBELF_VERSION:=0.8.13}; : ${PKG_LIBELF_SHA256SUM:=591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d}; : ${PKG_LIBELF_URL:=http://www.mr511.de/software/libelf-${PKG_LIBELF_VERSION}.tar.gz}; @@ -185,9 +179,8 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_MUSL_VERSION:=1.1.12}; : ${PKG_MUSL_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e}; : ${PKG_MUSL_URL:=http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz}; -: ${PKG_NANO_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include/ncursesw -I${PREFIX_LVL3}/include}; +: ${PKG_NANO_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include/ncursesw}; : ${PKG_NANO_ENV_VARS_EXTRA:="NCURSESW_LIBS=-lformw -lmenuw -lncursesw -lpanelw,PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig"}; -: ${PKG_NANO_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_LVL3}/lib}; : ${PKG_NANO_VERSION:=2.5.3}; : ${PKG_NANO_SHA256SUM:=b2b060129b9feff2d4870d803a441178c96531de9aed144ec0b83bd63ccb12ee}; : ${PKG_NANO_URL:=http://www.nano-editor.org/dist/v${PKG_NANO_VERSION%.[0-9]}/nano-${PKG_NANO_VERSION}.tar.gz}; @@ -209,18 +202,14 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_OPENSSH_VERSION:=7.1p2}; : ${PKG_OPENSSH_SHA256SUM:=dd75f024dcf21e06a0d6421d582690bf987a1f6323e32ad6619392f3bfde6bbd}; : ${PKG_OPENSSH_URL:=http://artfiles.org/openbsd/OpenSSH/portable/openssh-${PKG_OPENSSH_VERSION}.tar.gz}; -: ${PKG_OPENSSH_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include}; : ${PKG_OPENSSH_INSTALL_TARGET:=install-nokeys}; -: ${PKG_OPENSSH_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_LVL3}/lib}; : ${PKG_PATCH_VERSION:=2.7}; : ${PKG_PATCH_SHA256SUM:=59c29f56faa0a924827e6a60c6accd6e2900eae5c6aaa922268c717f06a62048}; : ${PKG_PATCH_URL:=https://ftp.gnu.org/gnu/patch/patch-${PKG_PATCH_VERSION}.tar.gz}; : ${PKG_RSYNC_VERSION:=3.1.2}; : ${PKG_RSYNC_SHA256SUM:=ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2}; : ${PKG_RSYNC_URL:=https://download.samba.org/pub/rsync/src/rsync-${PKG_RSYNC_VERSION}.tar.gz}; -: ${PKG_RSYNC_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include}; : ${PKG_RSYNC_CONFIGURE_ARGS_EXTRA:=--with-included-popt --with-included-zlib}; -: ${PKG_RSYNC_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_LVL3}/lib}; : ${PKG_TAR_VERSION:=1.28}; : ${PKG_TAR_SHA256SUM:=6a6b65bac00a127a508533c604d5bf1a3d40f82707d56f20cefd38a05e8237de}; : ${PKG_TAR_URL:=https://ftp.gnu.org/gnu/tar/tar-${PKG_TAR_VERSION}.tar.gz}; @@ -230,9 +219,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_UTIL_LINUX_VERSION:=2.27.1}; : ${PKG_UTIL_LINUX_SHA256SUM:=133c14f625d40e90e73e9d200faf3f2ce87937b99f923c84e5504ac0badc71d6}; : ${PKG_UTIL_LINUX_URL:=https://www.kernel.org/pub/linux/utils/util-linux/v2.27/util-linux-${PKG_UTIL_LINUX_VERSION}.tar.gz}; -: ${PKG_UTIL_LINUX_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include}; : ${PKG_UTIL_LINUX_CONFIGURE_ARGS_EXTRA:=--disable-agetty --disable-wall --disable-write}; -: ${PKG_UTIL_LINUX_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_LVL3}/lib}; : ${PKG_UTIL_LINUX_MAKEFLAGS_BUILD_EXTRA:=V=99}; : ${PKG_WHICH_VERSION:=2.21}; : ${PKG_WHICH_SHA256SUM:=f4a245b94124b377d8b49646bf421f9155d36aa7614b6ebf83705d3ffc76eaad}; diff --git a/hexcurse.local.patch b/hexcurse.local.patch index f225eda..2ae72da 100644 --- a/hexcurse.local.patch +++ b/hexcurse.local.patch @@ -20,21 +20,3 @@ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ ---- hexcurse/src/Makefile.in.orig 2016-03-05 13:45:43.656822716 +0000 -+++ hexcurse/src/Makefile.in 2016-03-05 13:47:34.832820248 +0000 -@@ -258,7 +258,7 @@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --AM_CPPFLAGS = -I$(top_srcdir)/include -Wall -Werror -Wextra -+AM_CPPFLAGS = -I$(top_srcdir)/include -Wall -Wextra - hexcurse_SOURCES = file.c llist.c screen.c hexcurse.c stack.c getopt.c acceptch.c color.c - all: all-am - ---- hexcurse/src/Makefile.am.orig 2016-03-05 13:48:01.896819648 +0000 -+++ hexcurse/src/Makefile.am 2016-03-05 13:48:58.960818381 +0000 -@@ -1,3 +1,3 @@ - bin_PROGRAMS = hexcurse --AM_CPPFLAGS = -I$(top_srcdir)/include -Wall -Werror -Wextra -+AM_CPPFLAGS = -I$(top_srcdir)/include -Wall -Wextra - hexcurse_SOURCES = file.c llist.c screen.c hexcurse.c stack.c getopt.c acceptch.c color.c