Init, adding corrade,magnum,magnum-plugins,magnum-integration,magnum-extras, and magnum-examples 2025.47_1
This commit is contained in:
140
common/xbps-src/libexec/build.sh
Executable file
140
common/xbps-src/libexec/build.sh
Executable file
@@ -0,0 +1,140 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# Passed arguments:
|
||||
# $1 - current pkgname to build [REQUIRED]
|
||||
# $2 - target pkgname (origin) to build [REQUIRED]
|
||||
# $3 - xbps target [REQUIRED]
|
||||
# $4 - cross target [OPTIONAL]
|
||||
# $5 - internal [OPTIONAL]
|
||||
|
||||
if [ $# -lt 3 -o $# -gt 5 ]; then
|
||||
echo "${0##*/}: invalid number of arguments: pkgname targetpkg target [cross-target]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
readonly PKGNAME="$1"
|
||||
readonly XBPS_TARGET_PKG="$2"
|
||||
readonly XBPS_TARGET="$3"
|
||||
readonly XBPS_CROSS_BUILD="$4"
|
||||
readonly XBPS_CROSS_PREPARE="$5"
|
||||
|
||||
export XBPS_TARGET
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
done
|
||||
|
||||
last="${XBPS_DEPENDS_CHAIN##*,}"
|
||||
case "$XBPS_DEPENDS_CHAIN" in
|
||||
*,$last,*)
|
||||
msg_error "Build-time cyclic dependency$last,${XBPS_DEPENDS_CHAIN##*,$last,} detected.\n"
|
||||
esac
|
||||
|
||||
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
|
||||
readonly SOURCEPKG="$sourcepkg"
|
||||
|
||||
check_existing_pkg
|
||||
|
||||
show_pkg_build_options
|
||||
check_pkg_arch $XBPS_CROSS_BUILD
|
||||
|
||||
if [ -z "$XBPS_CROSS_PREPARE" ]; then
|
||||
prepare_cross_sysroot $XBPS_CROSS_BUILD || exit $?
|
||||
fi
|
||||
# Install dependencies from binary packages
|
||||
if [ "$PKGNAME" != "$XBPS_TARGET_PKG" -o -z "$XBPS_SKIP_DEPS" ]; then
|
||||
install_pkg_deps $PKGNAME $XBPS_TARGET_PKG pkg $XBPS_CROSS_BUILD $XBPS_CROSS_PREPARE || exit $?
|
||||
fi
|
||||
|
||||
if [ "$XBPS_CROSS_BUILD" ]; then
|
||||
install_cross_pkg $XBPS_CROSS_BUILD || exit $?
|
||||
fi
|
||||
|
||||
# Fetch distfiles after installing required dependencies,
|
||||
# because some of them might be required for do_fetch().
|
||||
$XBPS_LIBEXECDIR/xbps-src-dofetch.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
||||
[ "$XBPS_TARGET" = "fetch" ] && exit 0
|
||||
|
||||
# Fetch, extract, build and install into the destination directory.
|
||||
$XBPS_LIBEXECDIR/xbps-src-doextract.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
||||
[ "$XBPS_TARGET" = "extract" ] && exit 0
|
||||
|
||||
# Run patch phrase
|
||||
$XBPS_LIBEXECDIR/xbps-src-dopatch.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
||||
[ "$XBPS_TARGET" = "patch" ] && exit 0
|
||||
|
||||
# Run configure phase
|
||||
$XBPS_LIBEXECDIR/xbps-src-doconfigure.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
||||
[ "$XBPS_TARGET" = "configure" ] && exit 0
|
||||
|
||||
# Run build phase
|
||||
$XBPS_LIBEXECDIR/xbps-src-dobuild.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
||||
[ "$XBPS_TARGET" = "build" ] && exit 0
|
||||
|
||||
# Run check phase
|
||||
$XBPS_LIBEXECDIR/xbps-src-docheck.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
||||
[ "$XBPS_TARGET" = "check" ] && exit 0
|
||||
|
||||
# Install pkgs into destdir.
|
||||
$XBPS_LIBEXECDIR/xbps-src-doinstall.sh $SOURCEPKG no $XBPS_CROSS_BUILD || exit 1
|
||||
|
||||
for subpkg in ${subpackages} ${sourcepkg}; do
|
||||
$XBPS_LIBEXECDIR/xbps-src-doinstall.sh $subpkg yes $XBPS_CROSS_BUILD || exit 1
|
||||
done
|
||||
for subpkg in ${subpackages} ${sourcepkg}; do
|
||||
$XBPS_LIBEXECDIR/xbps-src-prepkg.sh $subpkg $XBPS_CROSS_BUILD || exit 1
|
||||
done
|
||||
|
||||
for subpkg in ${subpackages} ${sourcepkg}; do
|
||||
if [ "$PKGNAME" = "${subpkg}" -a "$XBPS_TARGET" = "install" ]; then
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Clean list of preregistered packages
|
||||
printf "" > ${XBPS_STATEDIR}/.${sourcepkg}_register_pkg
|
||||
# If install went ok generate the binpkgs.
|
||||
for subpkg in ${subpackages} ${sourcepkg}; do
|
||||
$XBPS_LIBEXECDIR/xbps-src-dopkg.sh $subpkg "$XBPS_REPOSITORY" "$XBPS_CROSS_BUILD" || exit 1
|
||||
done
|
||||
|
||||
# Registering packages at once per repository. This makes sure that staging is
|
||||
# triggered for all new packages if any of them introduces inconsistencies.
|
||||
cut -d: -f 1,2 ${XBPS_STATEDIR}/.${sourcepkg}_register_pkg | sort -u | \
|
||||
while IFS=: read -r arch repo; do
|
||||
paths=$(grep "^$arch:$repo:" "${XBPS_STATEDIR}/.${sourcepkg}_register_pkg" | \
|
||||
cut -d : -f 2,3 | tr ':' '/')
|
||||
if [ -z "$XBPS_PRESERVE_PKGS" ] || [ "$XBPS_BUILD_FORCEMODE" ]; then
|
||||
force=-f
|
||||
fi
|
||||
if [ -n "${arch}" ]; then
|
||||
msg_normal "Registering new packages to $repo ($arch)\n"
|
||||
XBPS_TARGET_ARCH=${arch} $XBPS_RINDEX_CMD \
|
||||
${XBPS_REPO_COMPTYPE:+--compression $XBPS_REPO_COMPTYPE} ${force} -a ${paths}
|
||||
else
|
||||
msg_normal "Registering new packages to $repo\n"
|
||||
if [ -n "$XBPS_CROSS_BUILD" ]; then
|
||||
$XBPS_RINDEX_XCMD ${XBPS_REPO_COMPTYPE:+--compression $XBPS_REPO_COMPTYPE} \
|
||||
${force} -a ${paths}
|
||||
else
|
||||
$XBPS_RINDEX_CMD ${XBPS_REPO_COMPTYPE:+--compression $XBPS_REPO_COMPTYPE} \
|
||||
${force} -a ${paths}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# pkg cleanup
|
||||
if declare -f do_clean >/dev/null; then
|
||||
run_func do_clean
|
||||
fi
|
||||
|
||||
if [ -n "$XBPS_DEPENDENCY" -o -z "$XBPS_KEEP_ALL" ]; then
|
||||
remove_pkg_autodeps
|
||||
remove_pkg_wrksrc
|
||||
remove_pkg $XBPS_CROSS_BUILD
|
||||
remove_pkg_statedir
|
||||
fi
|
||||
|
||||
exit 0
|
||||
38
common/xbps-src/libexec/xbps-src-dobuild.sh
Executable file
38
common/xbps-src/libexec/xbps-src-dobuild.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# Passed arguments:
|
||||
# $1 - pkgname to build [REQUIRED]
|
||||
# $2 - cross target [OPTIONAL]
|
||||
|
||||
if [ $# -lt 1 -o $# -gt 2 ]; then
|
||||
echo "${0##*/}: invalid number of arguments: pkgname [cross-target]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKGNAME="$1"
|
||||
XBPS_CROSS_BUILD="$2"
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
done
|
||||
|
||||
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
|
||||
|
||||
XBPS_BUILD_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_build_done"
|
||||
|
||||
if [ -f $XBPS_BUILD_DONE -a -z "$XBPS_BUILD_FORCEMODE" ] ||
|
||||
[ -f $XBPS_BUILD_DONE -a -n "$XBPS_BUILD_FORCEMODE" -a $XBPS_TARGET != "build" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for f in $XBPS_COMMONDIR/environment/build/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
run_step build optional
|
||||
|
||||
touch -f $XBPS_BUILD_DONE
|
||||
|
||||
exit 0
|
||||
67
common/xbps-src/libexec/xbps-src-docheck.sh
Executable file
67
common/xbps-src/libexec/xbps-src-docheck.sh
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# Passed arguments:
|
||||
# $1 - pkgname to build [REQUIRED]
|
||||
# $2 - cross target [OPTIONAL]
|
||||
|
||||
if [ $# -lt 1 -o $# -gt 2 ]; then
|
||||
echo "${0##*/}: invalid number of arguments: pkgname [cross-target]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKGNAME="$1"
|
||||
XBPS_CROSS_BUILD="$2"
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
done
|
||||
|
||||
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
|
||||
|
||||
if [ -n "$disable_parallel_check" ]; then
|
||||
XBPS_MAKEJOBS=1
|
||||
else
|
||||
XBPS_MAKEJOBS="$XBPS_ORIG_MAKEJOBS"
|
||||
fi
|
||||
makejobs="-j$XBPS_MAKEJOBS"
|
||||
|
||||
XBPS_CHECK_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_check_done"
|
||||
|
||||
if [ -n "$XBPS_CROSS_BUILD" ]; then
|
||||
msg_normal "${pkgname}-${version}_${revision}: skipping check (cross build for $XBPS_CROSS_BUILD) ...\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "$XBPS_CHECK_PKGS" ]; then
|
||||
msg_normal "${pkgname}-${version}_${revision}: skipping check (XBPS_CHECK_PKGS is disabled) ...\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$make_check" = no ]; then
|
||||
msg_normal "${pkgname}-${version}_${revision}: skipping check (make_check=no) ...\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$make_check" = extended -a "$XBPS_CHECK_PKGS" != full ]; then
|
||||
msg_normal \
|
||||
"${pkgname}-${version}_${revision}: skipping check (make_check=extended and XBPS_CHECK_PKGS is not 'full') ...\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$make_check" = ci-skip ] && [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
|
||||
msg_warn \
|
||||
"${pkgname}-${version}_${revision}: skipping here because of make_check=ci-skip. Tests should be run locally.\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for f in $XBPS_COMMONDIR/environment/check/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
run_step check optional
|
||||
|
||||
touch -f $XBPS_CHECK_DONE
|
||||
|
||||
exit 0
|
||||
38
common/xbps-src/libexec/xbps-src-doconfigure.sh
Executable file
38
common/xbps-src/libexec/xbps-src-doconfigure.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# Passed arguments:
|
||||
# $1 - pkgname to configure [REQUIRED]
|
||||
# $2 - cross target [OPTIONAL]
|
||||
|
||||
if [ $# -lt 1 -o $# -gt 2 ]; then
|
||||
echo "${0##*/}: invalid number of arguments: pkgname [cross-target]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKGNAME="$1"
|
||||
XBPS_CROSS_BUILD="$2"
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
done
|
||||
|
||||
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
|
||||
|
||||
XBPS_CONFIGURE_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_configure_done"
|
||||
|
||||
if [ -f $XBPS_CONFIGURE_DONE -a -z "$XBPS_BUILD_FORCEMODE" ] ||
|
||||
[ -f $XBPS_CONFIGURE_DONE -a -n "$XBPS_BUILD_FORCEMODE" -a $XBPS_TARGET != "configure" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for f in $XBPS_COMMONDIR/environment/configure/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
run_step configure optional
|
||||
|
||||
touch -f $XBPS_CONFIGURE_DONE
|
||||
|
||||
exit 0
|
||||
75
common/xbps-src/libexec/xbps-src-doextract.sh
Executable file
75
common/xbps-src/libexec/xbps-src-doextract.sh
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# Passed arguments:
|
||||
# $1 - pkgname [REQUIRED]
|
||||
# $2 - cross target [OPTIONAL]
|
||||
|
||||
if [ $# -lt 1 -o $# -gt 2 ]; then
|
||||
echo "${0##*/}: invalid number of arguments: pkgname [cross-target]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKGNAME="$1"
|
||||
XBPS_CROSS_BUILD="$2"
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
done
|
||||
|
||||
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
|
||||
|
||||
for f in $XBPS_COMMONDIR/environment/extract/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
XBPS_EXTRACT_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_extract_done"
|
||||
|
||||
if [ -f $XBPS_EXTRACT_DONE ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Run pre-extract hooks
|
||||
run_pkg_hooks pre-extract
|
||||
|
||||
# If template defines pre_extract(), use it.
|
||||
if declare -f pre_extract >/dev/null; then
|
||||
run_func pre_extract
|
||||
fi
|
||||
|
||||
# If template defines do_extract() use it rather than the hooks.
|
||||
if declare -f do_extract >/dev/null; then
|
||||
[ ! -d "$wrksrc" ] && mkdir -p "$wrksrc"
|
||||
cd "$wrksrc"
|
||||
run_func do_extract
|
||||
else
|
||||
if [ -n "$build_style" ]; then
|
||||
if [ ! -r $XBPS_BUILDSTYLEDIR/${build_style}.sh ]; then
|
||||
msg_error "$pkgver: cannot find build helper $XBPS_BUILDSTYLEDIR/${build_style}.sh!\n"
|
||||
fi
|
||||
. $XBPS_BUILDSTYLEDIR/${build_style}.sh
|
||||
fi
|
||||
# If the build_style script declares do_extract(), use it rather than hooks.
|
||||
if declare -f do_extract >/dev/null; then
|
||||
run_func do_extract
|
||||
else
|
||||
# Run do-extract hooks
|
||||
run_pkg_hooks "do-extract"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
[ -d "$wrksrc" ] && cd "$wrksrc"
|
||||
|
||||
# If template defines post_extract(), use it.
|
||||
if declare -f post_extract >/dev/null; then
|
||||
run_func post_extract
|
||||
fi
|
||||
|
||||
# Run post-extract hooks
|
||||
run_pkg_hooks post-extract
|
||||
|
||||
touch -f $XBPS_EXTRACT_DONE
|
||||
|
||||
exit 0
|
||||
62
common/xbps-src/libexec/xbps-src-dofetch.sh
Executable file
62
common/xbps-src/libexec/xbps-src-dofetch.sh
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# Passed arguments:
|
||||
# $1 - pkgname [REQUIRED]
|
||||
# $2 - cross target [OPTIONAL]
|
||||
|
||||
if [ $# -lt 1 -o $# -gt 2 ]; then
|
||||
echo "${0##*/}: invalid number of arguments: pkgname [cross-target]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKGNAME="$1"
|
||||
XBPS_CROSS_BUILD="$2"
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
done
|
||||
|
||||
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
|
||||
|
||||
for f in $XBPS_COMMONDIR/environment/fetch/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
XBPS_FETCH_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_fetch_done"
|
||||
|
||||
if [ -f "$XBPS_FETCH_DONE" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Run pre-fetch hooks.
|
||||
run_pkg_hooks pre-fetch
|
||||
|
||||
# If template defines pre_fetch(), use it.
|
||||
if declare -f pre_fetch >/dev/null; then
|
||||
run_func pre_fetch
|
||||
fi
|
||||
|
||||
# If template defines do_fetch(), use it rather than the hooks.
|
||||
if declare -f do_fetch >/dev/null; then
|
||||
cd ${XBPS_BUILDDIR}
|
||||
[ -n "$build_wrksrc" ] && mkdir -p "$wrksrc"
|
||||
run_func do_fetch
|
||||
else
|
||||
# Run do-fetch hooks.
|
||||
run_pkg_hooks "do-fetch"
|
||||
fi
|
||||
|
||||
cd ${XBPS_BUILDDIR} || msg_error "$pkgver: cannot access wrksrc directory [$wrksrc]\n"
|
||||
# if templates defines post_fetch(), use it.
|
||||
if declare -f post_fetch >/dev/null; then
|
||||
run_func post_fetch
|
||||
fi
|
||||
|
||||
# Run post-fetch hooks.
|
||||
run_pkg_hooks post-fetch
|
||||
|
||||
touch -f $XBPS_FETCH_DONE
|
||||
|
||||
exit 0
|
||||
80
common/xbps-src/libexec/xbps-src-doinstall.sh
Executable file
80
common/xbps-src/libexec/xbps-src-doinstall.sh
Executable file
@@ -0,0 +1,80 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# Passed arguments:
|
||||
# $1 - pkgname [REQUIRED]
|
||||
# $2 - subpkg mode [REQUIRED]
|
||||
# $2 - cross target [OPTIONAL]
|
||||
|
||||
if [ $# -lt 2 -o $# -gt 3 ]; then
|
||||
echo "${0##*/}: invalid number of arguments: pkgname subpkg-mode [cross-target]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKGNAME="$1"
|
||||
SUBPKG_MODE="$2"
|
||||
XBPS_CROSS_BUILD="$3"
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
done
|
||||
|
||||
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
|
||||
|
||||
for f in $XBPS_COMMONDIR/environment/install/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
XBPS_INSTALL_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_install_done"
|
||||
|
||||
ch_wrksrc
|
||||
|
||||
if [ "$SUBPKG_MODE" = "no" ]; then
|
||||
if [ ! -f $XBPS_INSTALL_DONE ] || [ -f $XBPS_INSTALL_DONE -a -n "$XBPS_BUILD_FORCEMODE" ]; then
|
||||
mkdir -p $XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/$pkgname-$version
|
||||
|
||||
if [ "$metapackage" = yes ]; then
|
||||
optional="optional"
|
||||
else
|
||||
optional=""
|
||||
fi
|
||||
|
||||
run_step install "$optional" skip
|
||||
|
||||
touch -f $XBPS_INSTALL_DONE
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
XBPS_SUBPKG_INSTALL_DONE="${XBPS_STATEDIR}/${PKGNAME}_${XBPS_CROSS_BUILD}_subpkg_install_done"
|
||||
|
||||
# If it's a subpkg execute the pkg_install() function.
|
||||
if [ ! -f $XBPS_SUBPKG_INSTALL_DONE -o -n "$XBPS_BUILD_FORCEMODE" ]; then
|
||||
if [ "$sourcepkg" != "$PKGNAME" ]; then
|
||||
# Source all subpkg environment setup snippets.
|
||||
for f in ${XBPS_COMMONDIR}/environment/setup-subpkg/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
${PKGNAME}_package
|
||||
pkgname=$PKGNAME
|
||||
|
||||
if [ "$build_style" = meta ]; then
|
||||
msg_error "$pkgver: build_style=meta is deprecated, replace with metapackage=yes\n"
|
||||
fi
|
||||
|
||||
source_file $XBPS_COMMONDIR/environment/build-style/${build_style}.sh
|
||||
|
||||
install -d $PKGDESTDIR
|
||||
if declare -f pkg_install >/dev/null; then
|
||||
run_pkg_hooks pre-install
|
||||
run_func pkg_install
|
||||
fi
|
||||
fi
|
||||
setup_pkg_depends ${pkgname:=$PKGNAME} || exit 1
|
||||
run_pkg_hooks post-install
|
||||
touch -f $XBPS_SUBPKG_INSTALL_DONE
|
||||
fi
|
||||
|
||||
exit 0
|
||||
37
common/xbps-src/libexec/xbps-src-dopatch.sh
Executable file
37
common/xbps-src/libexec/xbps-src-dopatch.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# Passed arguments:
|
||||
# $1 - pkgname [REQUIRED]
|
||||
# $2 - cross target [OPTIONAL]
|
||||
|
||||
if [ $# -lt 1 -o $# -gt 2 ]; then
|
||||
echo "${0##*/}: invalid number of arguments: pkgname [cross-target]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKGNAME="$1"
|
||||
XBPS_CROSS_BUILD="$2"
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
done
|
||||
|
||||
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
|
||||
|
||||
XBPS_PATCH_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_patch_done"
|
||||
|
||||
if [ -f $XBPS_PATCH_DONE ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for f in $XBPS_COMMONDIR/environment/patch/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
run_step patch optional
|
||||
|
||||
touch -f $XBPS_PATCH_DONE
|
||||
|
||||
exit 0
|
||||
49
common/xbps-src/libexec/xbps-src-dopkg.sh
Executable file
49
common/xbps-src/libexec/xbps-src-dopkg.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# Passed arguments:
|
||||
# $1 - pkgname [REQUIRED]
|
||||
# $2 - path to local repository [REQUIRED]
|
||||
# $3 - cross-target [OPTIONAL]
|
||||
|
||||
if [ $# -lt 2 -o $# -gt 3 ]; then
|
||||
echo "${0##*/}: invalid number of arguments: pkgname repository [cross-target]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKGNAME="$1"
|
||||
XBPS_REPOSITORY="$2"
|
||||
XBPS_CROSS_BUILD="$3"
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
done
|
||||
|
||||
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
|
||||
|
||||
for f in $XBPS_COMMONDIR/environment/pkg/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
if [ "$sourcepkg" != "$PKGNAME" ]; then
|
||||
# Source all subpkg environment setup snippets.
|
||||
for f in ${XBPS_COMMONDIR}/environment/setup-subpkg/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
${PKGNAME}_package
|
||||
pkgname=$PKGNAME
|
||||
fi
|
||||
|
||||
if [ -s $XBPS_MASTERDIR/.xbps_chroot_init ]; then
|
||||
export XBPS_ARCH=$(<$XBPS_MASTERDIR/.xbps_chroot_init)
|
||||
fi
|
||||
|
||||
# Run do-pkg hooks.
|
||||
run_pkg_hooks "do-pkg"
|
||||
|
||||
# Run post-pkg hooks.
|
||||
run_pkg_hooks post-pkg
|
||||
|
||||
exit 0
|
||||
51
common/xbps-src/libexec/xbps-src-prepkg.sh
Executable file
51
common/xbps-src/libexec/xbps-src-prepkg.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# vim: set ts=4 sw=4 et:
|
||||
#
|
||||
# Passed arguments:
|
||||
# $1 - pkgname [REQUIRED]
|
||||
# $2 - cross target [OPTIONAL]
|
||||
|
||||
if [ $# -lt 1 -o $# -gt 2 ]; then
|
||||
echo "${0##*/}: invalid number of arguments: pkgname [cross-target]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKGNAME="$1"
|
||||
XBPS_CROSS_BUILD="$2"
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
done
|
||||
|
||||
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
|
||||
|
||||
for f in $XBPS_COMMONDIR/environment/install/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
|
||||
XBPS_PREPKG_DONE="${XBPS_STATEDIR}/${PKGNAME}_${XBPS_CROSS_BUILD}_prepkg_done"
|
||||
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a -f $XBPS_PREPKG_DONE ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# If it's a subpkg execute the pkg_install() function.
|
||||
if [ "$sourcepkg" != "$PKGNAME" ]; then
|
||||
# Source all subpkg environment setup snippets.
|
||||
for f in ${XBPS_COMMONDIR}/environment/setup-subpkg/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
|
||||
${PKGNAME}_package
|
||||
pkgname=$PKGNAME
|
||||
fi
|
||||
|
||||
source_file $XBPS_COMMONDIR/environment/build-style/${build_style}.sh
|
||||
setup_pkg_depends $pkgname || exit 1
|
||||
run_pkg_hooks pre-pkg
|
||||
|
||||
touch -f $XBPS_PREPKG_DONE
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user