Update environment shell snippets for xbps-src>=101.
This commit is contained in:
parent
2d540461e5
commit
16ed344975
22 changed files with 96 additions and 73 deletions
|
@ -1,6 +0,0 @@
|
||||||
# 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"
|
|
|
@ -1,6 +0,0 @@
|
||||||
# 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
|
|
|
@ -1,58 +0,0 @@
|
||||||
# This file sets some envvars to allow cross compiling packages.
|
|
||||||
|
|
||||||
[ -z "$CROSS_BUILD" ] && return 0
|
|
||||||
|
|
||||||
# Export all variables from now on...
|
|
||||||
set -a
|
|
||||||
|
|
||||||
PKG_CONFIG_SYSROOT_DIR="$XBPS_CROSS_BASE"
|
|
||||||
PKG_CONFIG_PATH="$XBPS_CROSS_BASE/lib/pkgconfig:$XBPS_CROSS_BASE/usr/share/pkgconfig"
|
|
||||||
PKG_CONFIG_LIBDIR="$XBPS_CROSS_BASE/lib/pkgconfig"
|
|
||||||
|
|
||||||
configure_args+=" --host=$XBPS_CROSS_TRIPLET --with-sysroot=$XBPS_CROSS_BASE --with-libtool-sysroot=$XBPS_CROSS_BASE "
|
|
||||||
|
|
||||||
if [ -z "$build_style" -o "$build_style" != "gnu-configure" ]; then
|
|
||||||
set +a; return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Read autoconf cache variables for cross target (taken from OE).
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
|
||||||
# musl libc, empty for now
|
|
||||||
*-musl) ;;
|
|
||||||
|
|
||||||
# gnu libc
|
|
||||||
*) . ${XBPS_COMMONDIR}/environment/autoconf_cache/common-glibc
|
|
||||||
. ${XBPS_COMMONDIR}/environment/autoconf_cache/common-linux
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Read apropiate autoconf cache files for target machine.
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
|
||||||
armv?l) . ${XBPS_COMMONDIR}/environment/autoconf_cache/endian-little
|
|
||||||
. ${XBPS_COMMONDIR}/environment/autoconf_cache/arm-common
|
|
||||||
. ${XBPS_COMMONDIR}/environment/autoconf_cache/arm-linux
|
|
||||||
;;
|
|
||||||
|
|
||||||
i686) . ${XBPS_COMMONDIR}/environment/autoconf_cache/endian-little
|
|
||||||
. ${XBPS_COMMONDIR}/environment/autoconf_cache/ix86-common
|
|
||||||
;;
|
|
||||||
|
|
||||||
mips) . ${XBPS_COMMONDIR}/environment/autoconf_cache/endian-big
|
|
||||||
. ${XBPS_COMMONDIR}/environment/autoconf_cache/mips-common
|
|
||||||
. ${XBPS_COMMONDIR}/environment/autoconf_cache/mips-linux
|
|
||||||
;;
|
|
||||||
|
|
||||||
mipsel) . ${XBPS_COMMONDIR}/environment/autoconf_cache/endian-little
|
|
||||||
. ${XBPS_COMMONDIR}/environment/autoconf_cache/mips-common
|
|
||||||
. ${XBPS_COMMONDIR}/environment/autoconf_cache/mips-linux
|
|
||||||
;;
|
|
||||||
|
|
||||||
x86_64) . ${XBPS_COMMONDIR}/environment/autoconf_cache/endian-little
|
|
||||||
. ${XBPS_COMMONDIR}/environment/autoconf_cache/x86_64-linux
|
|
||||||
;;
|
|
||||||
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# until now :-)
|
|
||||||
set +a
|
|
|
@ -9,3 +9,21 @@ 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
|
(libexec/xbps-src-*). Only files with the `.sh' extension are read, so this file
|
||||||
will be simply ignored.
|
will be simply ignored.
|
||||||
|
|
||||||
|
The following directories are used to set the order in which the shell snippets
|
||||||
|
should be read by xbps-src:
|
||||||
|
|
||||||
|
* setup (before reading template)
|
||||||
|
* fetch (before running fetch phase)
|
||||||
|
* extract (before running extract phase)
|
||||||
|
* configure (before running configure phase)
|
||||||
|
* build (before running build phase)
|
||||||
|
* install (before running install phase)
|
||||||
|
* pkg (before running pkg phase)
|
||||||
|
|
||||||
|
NOTES
|
||||||
|
~~~~~
|
||||||
|
* All variables are exported to the environment, so please be careful when
|
||||||
|
declaring new variables in the shell snippets.
|
||||||
|
|
||||||
|
* Symlinks can be created (relative) to make a shell snippet available in
|
||||||
|
multiple phases.
|
||||||
|
|
1
common/environment/build/pkg-config.sh
Symbolic link
1
common/environment/build/pkg-config.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../configure/pkg-config.sh
|
61
common/environment/configure/gnu-configure-args.sh
Normal file
61
common/environment/configure/gnu-configure-args.sh
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
# This file sets up configure_args with common settings.
|
||||||
|
|
||||||
|
if [ -z "$build_style" -o "$build_style" = "gnu-configure" ]; then
|
||||||
|
configure_args="--prefix=/usr --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man --localstatedir=/var ${configure_args}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Cross compilation vars
|
||||||
|
if [ -z "$CROSS_BUILD" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
configure_args+=" --host=$XBPS_CROSS_TRIPLET --with-sysroot=$XBPS_CROSS_BASE --with-libtool-sysroot=$XBPS_CROSS_BASE "
|
||||||
|
|
||||||
|
if [ "$build_style" != "gnu-configure" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
_AUTOCONFCACHEDIR=${XBPS_COMMONDIR}/environment/configure/autoconf_cache
|
||||||
|
|
||||||
|
# Read autoconf cache variables for cross target (taken from OE).
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
# musl libc
|
||||||
|
*-musl) . ${_AUTOCONFCACHEDIR}/common-linux
|
||||||
|
;;
|
||||||
|
# gnu libc
|
||||||
|
*) . ${_AUTOCONFCACHEDIR}/common-glibc
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Read apropiate autoconf cache files for target machine.
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
armv?l*)
|
||||||
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
||||||
|
. ${_AUTOCONFCACHEDIR}/arm-common
|
||||||
|
. ${_AUTOCONFCACHEDIR}/arm-linux
|
||||||
|
;;
|
||||||
|
|
||||||
|
i686*) . ${_AUTOCONFCACHEDIR}/endian-little
|
||||||
|
. ${_AUTOCONFCACHEDIR}/ix86-common
|
||||||
|
;;
|
||||||
|
|
||||||
|
mips) . ${_AUTOCONFCACHEDIR}/endian-big
|
||||||
|
. ${_AUTOCONFCACHEDIR}/mips-common
|
||||||
|
. ${_AUTOCONFCACHEDIR}/mips-linux
|
||||||
|
;;
|
||||||
|
|
||||||
|
mipsel) . ${_AUTOCONFCACHEDIR}/endian-little
|
||||||
|
. ${_AUTOCONFCACHEDIR}/mips-common
|
||||||
|
. ${_AUTOCONFCACHEDIR}/mips-linux
|
||||||
|
;;
|
||||||
|
|
||||||
|
x86_64*)
|
||||||
|
. ${_AUTOCONFCACHEDIR}/endian-little
|
||||||
|
. ${_AUTOCONFCACHEDIR}/x86_64-linux
|
||||||
|
;;
|
||||||
|
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
unset _AUTOCONFCACHEDIR
|
11
common/environment/configure/pkg-config.sh
Normal file
11
common/environment/configure/pkg-config.sh
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# This snippet setups pkg-config vars.
|
||||||
|
|
||||||
|
if [ -z "$CHROOT_READY" ]; then
|
||||||
|
PKG_CONFIG_PATH="${XBPS_MASTERDIR}/usr/lib/pkgconfig:${XBPS_MASTERDIR}/usr/share/pkgconfig"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
PKG_CONFIG_SYSROOT_DIR="$XBPS_CROSS_BASE"
|
||||||
|
PKG_CONFIG_PATH="$XBPS_CROSS_BASE/lib/pkgconfig:$XBPS_CROSS_BASE/usr/share/pkgconfig"
|
||||||
|
PKG_CONFIG_LIBDIR="$XBPS_CROSS_BASE/lib/pkgconfig"
|
||||||
|
fi
|
1
common/environment/fetch/misc.sh
Symbolic link
1
common/environment/fetch/misc.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../setup/misc.sh
|
1
common/environment/install/pkg-config.sh
Symbolic link
1
common/environment/install/pkg-config.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../configure/pkg-config.sh
|
|
@ -7,10 +7,10 @@
|
||||||
# =========================================================
|
# =========================================================
|
||||||
#
|
#
|
||||||
# xbps-src version.
|
# xbps-src version.
|
||||||
export XBPS_SRC_REQ=100
|
XBPS_SRC_REQ=100
|
||||||
|
|
||||||
# XBPS utils version.
|
# XBPS utils version.
|
||||||
export XBPS_UTILS_REQ=0.29
|
XBPS_UTILS_REQ=0.29
|
||||||
|
|
||||||
# XBPS utils API version.
|
# XBPS utils API version.
|
||||||
export XBPS_UTILS_API_REQ=20131224
|
XBPS_UTILS_API_REQ=20131224
|
Loading…
Reference in a new issue