summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-12-03 19:46:36 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-12-03 19:46:36 +0000
commit0ddc1e323bdcfb9c3bc544327e480da8e4a74a85 (patch)
tree6230fcba02551c5c9bdf26ba61ece504e66bde45
parent430898235832e333d5d05042bcc47a26d297c985 (diff)
downloadmidipix_build-0ddc1e323bdcfb9c3bc544327e480da8e4a74a85.tar.bz2
midipix_build-0ddc1e323bdcfb9c3bc544327e480da8e4a74a85.tar.xz
vars/build.vars:*_minipix: fixed.
patches/{bash,bzip2,coreutils}_minipix-*.patch: linked. subr/ex_pkg_env.subr, var/env.vars: replaces flavours mechanism w/ non-recursive per-package ${PKG_INHERIT_FROM}. subr/pkg_configure_patch.subr: remove ${PKG_NAME_PARENT} bits. vars/{bash,xz}_minipix.vars: added/linked.
l---------patches/bash_minipix-4.4.local.patch1
l---------patches/bzip2_minipix1
l---------patches/coreutils_minipix-8.28.local.patch1
-rw-r--r--subr/ex_pkg_env.subr26
-rw-r--r--subr/pkg_configure_patch.subr36
l---------vars/bash_minipix.vars1
-rw-r--r--vars/build.vars75
-rw-r--r--vars/env.vars4
-rw-r--r--vars/xz_minipix.vars (renamed from vars/xz_flavour_minipix.vars)2
9 files changed, 81 insertions, 66 deletions
diff --git a/patches/bash_minipix-4.4.local.patch b/patches/bash_minipix-4.4.local.patch
new file mode 120000
index 00000000..4ba2963c
--- /dev/null
+++ b/patches/bash_minipix-4.4.local.patch
@@ -0,0 +1 @@
+bash-4.4.local.patch \ No newline at end of file
diff --git a/patches/bzip2_minipix b/patches/bzip2_minipix
new file mode 120000
index 00000000..a989e1da
--- /dev/null
+++ b/patches/bzip2_minipix
@@ -0,0 +1 @@
+bzip2 \ No newline at end of file
diff --git a/patches/coreutils_minipix-8.28.local.patch b/patches/coreutils_minipix-8.28.local.patch
new file mode 120000
index 00000000..fd046725
--- /dev/null
+++ b/patches/coreutils_minipix-8.28.local.patch
@@ -0,0 +1 @@
+coreutils-8.28.local.patch \ No newline at end of file
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr
index 822ac054..439041d9 100644
--- a/subr/ex_pkg_env.subr
+++ b/subr/ex_pkg_env.subr
@@ -4,12 +4,8 @@
exp_pkg_env_source() {
local _pkg_name="${1}" _tgt_name="${2}" \
- _tgt_name_uc _pkg_name_uc _build_type_uc \
- _vname_dst _vars_set="";
- if [ "${_pkg_name#*_flavour_*}" != "${_pkg_name}" ]; then
- PKG_NAME_PARENT="${PKG_NAME%_flavour_*}";
- ex_pkg_env_source "${PKG_NAME_PARENT}";
- fi;
+ _tgt_name_uc _pkg_name_uc _pkg_name_inherit_uc \
+ _build_type_uc _vname_dst _vars_set="";
ex_rtl_fileop source_opt "vars/${_pkg_name}.vars";
_tgt_name_uc="$(ex_rtl_toupper "${_tgt_name}")";
_pkg_name_uc="$(ex_rtl_toupper "${_pkg_name}")";
@@ -17,12 +13,22 @@ exp_pkg_env_source() {
"DEFAULT ${_tgt_name_uc} PKG_${_pkg_name_uc}" \
_vars_set;
_build_type_uc="$(ex_rtl_toupper "${PKG_BUILD_TYPE}")";
+ ex_rtl_set_vars INHERIT_FROM "PKG_${_pkg_name_uc}" _vars_set;
+ _pkg_name_inherit_uc="$(ex_rtl_toupper "${PKG_INHERIT_FROM}")";
for _vname_dst in $(ex_rtl_lfilter_not \
"${DEFAULT_BUILD_VARS}" BUILD_TYPE); do
- ex_rtl_set_vars "${_vname_dst}" \
- "DEFAULT DEFAULT_${_build_type_uc} \
- ${_tgt_name_uc} PKG_${_pkg_name_uc}" \
- _vars_set;
+ if [ -n "${_pkg_name_inherit_uc}" ]; then
+ ex_rtl_set_vars "${_vname_dst}" \
+ "DEFAULT DEFAULT_${_build_type_uc} \
+ ${_tgt_name_uc} \
+ PKG_${_pkg_name_inherit_uc} \
+ PKG_${_pkg_name_uc}" _vars_set;
+ else
+ ex_rtl_set_vars "${_vname_dst}" \
+ "DEFAULT DEFAULT_${_build_type_uc} \
+ ${_tgt_name_uc} PKG_${_pkg_name_uc}" \
+ _vars_set;
+ fi;
done;
ex_rtl_unset_vars $(ex_rtl_lfilter_not \
"$(set | awk -F= '/^PKG_/{print $1}' | sort)" \
diff --git a/subr/pkg_configure_patch.subr b/subr/pkg_configure_patch.subr
index 57939126..ab6ec61c 100644
--- a/subr/pkg_configure_patch.subr
+++ b/subr/pkg_configure_patch.subr
@@ -3,26 +3,24 @@
#
pkg_configure_patch() {
- local _pkg_name _pkg_name_full _patch_dir _patch_fname _patches_done;
- for _pkg_name in "${PKG_NAME}" "${PKG_NAME_PARENT}"; do
- if [ -z "${_pkg_name}" ]; then
- continue;
- else
- _pkg_name_full="${_pkg_name}${PKG_VERSION:+-${PKG_VERSION}}";
- _patch_dir="${MIDIPIX_BUILD_PWD}/patches";
+ local _pkg_name="${PKG_NAME}" _pkg_name_full _patch_dir _patch_fname _patches_done;
+ if [ -z "${_pkg_name}" ]; then
+ continue;
+ else
+ _pkg_name_full="${_pkg_name}${PKG_VERSION:+-${PKG_VERSION}}";
+ _patch_dir="${MIDIPIX_BUILD_PWD}/patches";
+ fi;
+ set +o noglob; for _patch_fname in \
+ ${_patch_dir}/${_pkg_name}/*.patch \
+ ${_patch_dir}/${_pkg_name_full}.local.patch \
+ ${_patch_dir}/${_pkg_name_full}.local@${BUILD_HNAME}.patch \
+ "${PKG_PATCHES_EXTRA}"; do
+ if [ -r "${_patch_fname}" ]\
+ && ! ex_rtl_lmatch "${_patches_done}" " " "${_patch_fname}"; then
+ patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}";
+ _patches_done="${_patches_done:+${_patches_done} }${_patch_fname}";
fi;
- set +o noglob; for _patch_fname in \
- ${_patch_dir}/${_pkg_name}/*.patch \
- ${_patch_dir}/${_pkg_name_full}.local.patch \
- ${_patch_dir}/${_pkg_name_full}.local@${BUILD_HNAME}.patch \
- "${PKG_PATCHES_EXTRA}"; do
- if [ -r "${_patch_fname}" ]\
- && ! ex_rtl_lmatch "${_patches_done}" " " "${_patch_fname}"; then
- patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}";
- _patches_done="${_patches_done:+${_patches_done} }${_patch_fname}";
- fi;
- done; set -o noglob;
- done;
+ done; set -o noglob;
};
# vim:filetype=sh
diff --git a/vars/bash_minipix.vars b/vars/bash_minipix.vars
new file mode 120000
index 00000000..f4e9402f
--- /dev/null
+++ b/vars/bash_minipix.vars
@@ -0,0 +1 @@
+bash.vars \ No newline at end of file
diff --git a/vars/build.vars b/vars/build.vars
index 93dfcc60..442b9cc6 100644
--- a/vars/build.vars
+++ b/vars/build.vars
@@ -1043,41 +1043,48 @@ DIST_MINIPIX_INSTALL_FILES_DESTDIR_EXTRA="@bin=lib @bin=libexec @bin=share";
DIST_MINIPIX_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}";
DIST_MINIPIX_MAKEFLAGS_INSTALL="PREFIX= prefix=";
DIST_MINIPIX_PACKAGES="
-bzip2_flavour_minipix gzip_flavour_minipix xz_flavour_minipix
-bash_flavour_minipix coreutils_flavour_minipix tar_flavour_minipix
-ntctty_flavour_minipix ptycon_flavour_minipix";
+bzip2_minipix gzip_minipix xz_minipix bash_minipix
+coreutils_minipix tar_minipix ntctty_minipix ptycon_minipix";
DIST_MINIPIX_PREFIX="${PREFIX_MINIPIX}";
-: ${PKG_BZIP2_FLAVOUR_MINIPIX_BUILD_STEPS_DISABLE:="${PKG_BZIP2_BUILD_STEPS_DISABLE:+${PKG_BZIP2_BUILD_STEPS_DISABLE} }install_make"};
-: ${PKG_BZIP2_FLAVOUR_MINIPIX_INSTALL_FILES:="bzip2=bin/ @bzip2=bin/bunzip2 @bzip2=bin/bzcat @bzip2=bin/bzip2recover @bzip2=bin/bzgrep @bzip2=bin/bzmore @bzip2=bin/bzdiff"};
-: ${PKG_BZIP2_FLAVOUR_MINIPIX_LDFLAGS_BUILD_EXTRA:="--sysroot=${PREFIX_NATIVE} -mvrfs"};
-: ${PKG_BZIP2_FLAVOUR_MINIPIX_MAKEFLAGS_BUILD_EXTRA:="-f Makefile"};
-: ${PKG_BZIP2_FLAVOUR_MINIPIX_PREFIX:=${PREFIX_MINIPIX}};
-: ${PKG_GZIP_FLAVOUR_MINIPIX_INSTALL_TARGET:=install-binPROGRAMS};
-: ${PKG_GZIP_FLAVOUR_MINIPIX_LDFLAGS_BUILD_EXTRA:="-mvrfs"};
-: ${PKG_GZIP_FLAVOUR_MINIPIX_LDFLAGS_INSTALL_EXTRA:="-mvrfs"};
-: ${PKG_GZIP_FLAVOUR_MINIPIX_MAKEFLAGS_INSTALL_EXTRA:="OBJA="};
-: ${PKG_XZ_FLAVOUR_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
-: ${PKG_XZ_FLAVOUR_MINIPIX_MAKEFLAGS_BUILD:="LIBTOOLFLAGS=-all-static"};
-: ${PKG_XZ_FLAVOUR_MINIPIX_PREFIX:=${PREFIX_MINIPIX}};
-: ${PKG_BASH_FLAVOUR_MINIPIX_BUILD_STEPS_DISABLE:=install_make};
-: ${PKG_BASH_FLAVOUR_MINIPIX_CONFIGURE_ARGS_EXTRA:="--enable-static-link --without-bash-malloc --with-curses"};
-: ${PKG_BASH_FLAVOUR_MINIPIX_INSTALL_FILES:="bash=bin/ bashbug=bin/"};
-: ${PKG_BASH_FLAVOUR_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
-: ${PKG_COREUTILS_FLAVOUR_MINIPIX_INSTALL_TARGET:=install-binPROGRAMS};
-: ${PKG_COREUTILS_FLAVOUR_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
-: ${PKG_COREUTILS_FLAVOUR_MINIPIX_MAKEFLAGS_BUILD_EXTRA:="SHARED=0"};
-: ${PKG_COREUTILS_FLAVOUR_MINIPIX_MAKEFLAGS_INSTALL_EXTRA:=INSTALL_PROGRAM=${DEFAULT_TARGET}-install-strip};
-: ${PKG_TAR_FLAVOUR_MINIPIX_LDFLAGS_BUILD_EXTRA:="-mvrfs"};
-: ${PKG_TAR_FLAVOUR_MINIPIX_MAKEFLAGS_BUILD_EXTRA:="SHARED=0"};
-: ${PKG_TAR_FLAVOUR_MINIPIX_MAKEFLAGS_INSTALL:="-C src install-binPROGRAMS"};
-: ${PKG_NTCTTY_FLAVOUR_MINIPIX_CONFIGURE_ARGS:="--prefix= --strict --host=${DEFAULT_TARGET}"};
-: ${PKG_NTCTTY_FLAVOUR_MINIPIX_ENV_VARS_EXTRA:="CFLAGS_PATH=-I${PREFIX_NATIVE}/include:LDFLAGS_PATH=-L${PREFIX_NATIVE}/lib"};
-: ${PKG_NTCTTY_FLAVOUR_MINIPIX_INSTALL_TARGET:=install-static-app};
-: ${PKG_NTCTTY_FLAVOUR_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
-: ${PKG_PTYCON_FLAVOUR_MINIPIX_CONFIGURE_ARGS:="--prefix= --strict --host=${DEFAULT_TARGET}"};
-: ${PKG_PTYCON_FLAVOUR_MINIPIX_ENV_VARS_EXTRA:="CFLAGS_PATH=-I${PREFIX_NATIVE}/include:LDFLAGS_PATH=-L${PREFIX_NATIVE}/lib"};
-: ${PKG_PTYCON_FLAVOUR_MINIPIX_INSTALL_TARGET:=install-static-app};
-: ${PKG_PTYCON_FLAVOUR_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
+: ${PKG_BZIP2_MINIPIX_INHERIT_FROM:=bzip2};
+: ${PKG_BZIP2_MINIPIX_BUILD_STEPS_DISABLE:="${PKG_BZIP2_BUILD_STEPS_DISABLE:+${PKG_BZIP2_BUILD_STEPS_DISABLE} }install_make"};
+: ${PKG_BZIP2_MINIPIX_INSTALL_FILES:="bzip2=bin/ @bzip2=bin/bunzip2 @bzip2=bin/bzcat @bzip2=bin/bzip2recover @bzip2=bin/bzgrep @bzip2=bin/bzmore @bzip2=bin/bzdiff"};
+: ${PKG_BZIP2_MINIPIX_LDFLAGS_BUILD_EXTRA:="--sysroot=${PREFIX_NATIVE} -mvrfs"};
+: ${PKG_BZIP2_MINIPIX_MAKEFLAGS_BUILD_EXTRA:="-f Makefile"};
+: ${PKG_BZIP2_MINIPIX_PREFIX:=${PREFIX_MINIPIX}};
+: ${PKG_GZIP_MINIPIX_INHERIT_FROM:=gzip};
+: ${PKG_GZIP_MINIPIX_INSTALL_TARGET:=install-binPROGRAMS};
+: ${PKG_GZIP_MINIPIX_LDFLAGS_BUILD_EXTRA:="-mvrfs"};
+: ${PKG_GZIP_MINIPIX_LDFLAGS_INSTALL_EXTRA:="-mvrfs"};
+: ${PKG_GZIP_MINIPIX_MAKEFLAGS_INSTALL_EXTRA:="OBJA="};
+: ${PKG_XZ_MINIPIX_INHERIT_FROM:=xz};
+: ${PKG_XZ_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
+: ${PKG_XZ_MINIPIX_MAKEFLAGS_BUILD:="LIBTOOLFLAGS=-all-static"};
+: ${PKG_XZ_MINIPIX_PREFIX:=${PREFIX_MINIPIX}};
+: ${PKG_BASH_MINIPIX_INHERIT_FROM:=bash};
+: ${PKG_BASH_MINIPIX_BUILD_STEPS_DISABLE:=install_make};
+: ${PKG_BASH_MINIPIX_CONFIGURE_ARGS_EXTRA:="--enable-static-link --without-bash-malloc --with-curses"};
+: ${PKG_BASH_MINIPIX_INSTALL_FILES:="bash=bin/ bashbug=bin/"};
+: ${PKG_BASH_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
+: ${PKG_COREUTILS_MINIPIX_INHERIT_FROM:=coreutils};
+: ${PKG_COREUTILS_MINIPIX_INSTALL_TARGET:=install-binPROGRAMS};
+: ${PKG_COREUTILS_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
+: ${PKG_COREUTILS_MINIPIX_MAKEFLAGS_BUILD_EXTRA:="SHARED=0"};
+: ${PKG_COREUTILS_MINIPIX_MAKEFLAGS_INSTALL_EXTRA:=INSTALL_PROGRAM=${DEFAULT_TARGET}-install-strip};
+: ${PKG_TAR_MINIPIX_INHERIT_FROM:=tar};
+: ${PKG_TAR_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
+: ${PKG_TAR_MINIPIX_MAKEFLAGS_BUILD_EXTRA:="SHARED=0"};
+: ${PKG_TAR_MINIPIX_MAKEFLAGS_INSTALL:="-C src install-binPROGRAMS"};
+: ${PKG_NTCTTY_MINIPIX_INHERIT_FROM:=ntctty};
+: ${PKG_NTCTTY_MINIPIX_CONFIGURE_ARGS:="--prefix= --strict --host=${DEFAULT_TARGET}"};
+: ${PKG_NTCTTY_MINIPIX_ENV_VARS_EXTRA:="CFLAGS_PATH=-I${PREFIX_NATIVE}/include:LDFLAGS_PATH=-L${PREFIX_NATIVE}/lib"};
+: ${PKG_NTCTTY_MINIPIX_INSTALL_TARGET:=install-static-app};
+: ${PKG_NTCTTY_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
+: ${PKG_PTYCON_MINIPIX_INHERIT_FROM:=ptycon};
+: ${PKG_PTYCON_MINIPIX_CONFIGURE_ARGS:="--prefix= --strict --host=${DEFAULT_TARGET}"};
+: ${PKG_PTYCON_MINIPIX_ENV_VARS_EXTRA:="CFLAGS_PATH=-I${PREFIX_NATIVE}/include:LDFLAGS_PATH=-L${PREFIX_NATIVE}/lib"};
+: ${PKG_PTYCON_MINIPIX_INSTALL_TARGET:=install-static-app};
+: ${PKG_PTYCON_MINIPIX_LDFLAGS_CONFIGURE_EXTRA:="-mvrfs"};
#
# Build target dist_target
diff --git a/vars/env.vars b/vars/env.vars
index 8d76b810..fcfc3cc8 100644
--- a/vars/env.vars
+++ b/vars/env.vars
@@ -9,8 +9,8 @@ DEFAULT_BUILD_VARS="
CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA \
CFLAGS_INSTALL_EXTRA CONFIG_CACHE CONFIG_CACHE_EXTRA CONFIGURE \
CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA CXX CXXFLAGS_CONFIGURE_EXTRA \
- DISABLED ENV_VARS_EXTRA FNAME INSTALL_FILES INSTALL_FILES_DESTDIR \
- INSTALL_FILES_DESTDIR_EXTRA INSTALL_TARGET INSTALL_TARGET_EXTRA \
+ DISABLED ENV_VARS_EXTRA FNAME INHERIT_FROM INSTALL_FILES INSTALL_FILES \
+ DESTDIR INSTALL_FILES_DESTDIR_EXTRA INSTALL_TARGET INSTALL_TARGET_EXTRA \
IN_TREE LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA \
LDFLAGS_INSTALL_EXTRA LIBTOOL MAKE MAKE_INSTALL_VNAME MAKEFLAGS_BUILD \
MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA \
diff --git a/vars/xz_flavour_minipix.vars b/vars/xz_minipix.vars
index 18820f1d..45b23772 100644
--- a/vars/xz_flavour_minipix.vars
+++ b/vars/xz_minipix.vars
@@ -2,7 +2,7 @@
# set -o errexit -o noglob are assumed.
#
-pkg_xz_flavour_minipix_install_make() {
+pkg_xz_minipix_install_make() {
make LIBTOOL=slibtool -C src/lzmainfo install-binPROGRAMS DESTDIR=${PREFIX_MINIPIX};
make LIBTOOL=slibtool -C src/scripts install-nodist_binSCRIPTS DESTDIR=${PREFIX_MINIPIX};
make LIBTOOL=slibtool -C src/xz install-binPROGRAMS DESTDIR=${PREFIX_MINIPIX};