From 9b3f5617f4d804c6004b7455074db1155d885f76 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 13:07:02 +0100 Subject: [PATCH] Update infrastructure for xbps-src >= 100. --- .../0000-REQUIREMENTS.sh} | 9 +++------ common/environment/0001-bootstrap.sh | 6 ++++++ common/environment/0001-configure-args.sh | 6 ++++++ common/environment/0002-cross.sh | 8 ++++++++ common/{vars.sh => environment/0003-misc.sh} | 0 common/environment/README | 11 +++++++++++ 6 files changed, 34 insertions(+), 6 deletions(-) rename common/{global-defs.sh => environment/0000-REQUIREMENTS.sh} (70%) create mode 100644 common/environment/0001-bootstrap.sh create mode 100644 common/environment/0001-configure-args.sh create mode 100644 common/environment/0002-cross.sh rename common/{vars.sh => environment/0003-misc.sh} (100%) create mode 100644 common/environment/README diff --git a/common/global-defs.sh b/common/environment/0000-REQUIREMENTS.sh similarity index 70% rename from common/global-defs.sh rename to common/environment/0000-REQUIREMENTS.sh index 269c5a58d78..04bf5e7f6e6 100644 --- a/common/global-defs.sh +++ b/common/environment/0000-REQUIREMENTS.sh @@ -7,13 +7,10 @@ # ========================================================= # # xbps-src version. -XBPS_SRC_REQ=98 +export XBPS_SRC_REQ=98 # XBPS utils version. -XBPS_UTILS_REQ=0.29 +export XBPS_UTILS_REQ=0.29 # XBPS utils API version. -XBPS_UTILS_API_REQ=20131224 - -# Obsolete since xbps-src>=96 (base-chroot version). -BASE_CHROOT_REQ=0.40_1 +export XBPS_UTILS_API_REQ=20131224 diff --git a/common/environment/0001-bootstrap.sh b/common/environment/0001-bootstrap.sh new file mode 100644 index 00000000000..5d4aed052e8 --- /dev/null +++ b/common/environment/0001-bootstrap.sh @@ -0,0 +1,6 @@ +# This file sets some envvars to allow building bootstrap packages +# when the chroot is not yet ready. + +[ -z "$CHROOT_READY" ] && return 0 + +export PKG_CONFIG_PATH="${XBPS_MASTERDIR}/usr/lib/pkgconfig:${XBPS_MASTERDIR}/usr/share/pkgconfig" diff --git a/common/environment/0001-configure-args.sh b/common/environment/0001-configure-args.sh new file mode 100644 index 00000000000..e9b5fb7e5e6 --- /dev/null +++ b/common/environment/0001-configure-args.sh @@ -0,0 +1,6 @@ +# This file sets up configure_args with commong settings for packages +# that don't set $build_style or set it to gnu-configure. + +if [ "$build_style" = "gnu-configure" -o -z "$build_style" ]; then + export configure_args="--prefix=/usr --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man --localstatedir=/var ${configure_args}" +fi diff --git a/common/environment/0002-cross.sh b/common/environment/0002-cross.sh new file mode 100644 index 00000000000..bfcec33a863 --- /dev/null +++ b/common/environment/0002-cross.sh @@ -0,0 +1,8 @@ +# This file sets some envvars to allow cross compiling packages. + +[ -z "$CROSS_BUILD" ] && return 0 + +export PKG_CONFIG_SYSROOT_DIR="$XBPS_CROSS_BASE" +export PKG_CONFIG_PATH="$XBPS_CROSS_BASE/lib/pkgconfig:$XBPS_CROSS_BASE/usr/share/pkgconfig" +export PKG_CONFIG_LIBDIR="$XBPS_CROSS_BASE/lib/pkgconfig" +export configure_args+=" --host=$XBPS_CROSS_TRIPLET --with-sysroot=$XBPS_CROSS_BASE --with-libtool-sysroot=$XBPS_CROSS_BASE " diff --git a/common/vars.sh b/common/environment/0003-misc.sh similarity index 100% rename from common/vars.sh rename to common/environment/0003-misc.sh diff --git a/common/environment/README b/common/environment/README new file mode 100644 index 00000000000..99812870e10 --- /dev/null +++ b/common/environment/README @@ -0,0 +1,11 @@ +ENVIRONMENT SHELL SNIPPETS +========================== + +This directory contains shell files (must not be executable nor contain a shebang) +that are read by xbps-src when building source packages. The shell files +are read in lexical order (as ordered by shell rules). + +These files shall set environment variables for use in the xbps-src helpers +(libexec/xbps-src-*). Only files with the `.sh' extension are read, so this file +will be simply ignored. +