mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
5 Commits
feature/de
...
v1.3.2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4926d9d8c5 | ||
![]() |
7165e0d73e | ||
![]() |
8776dd39e8 | ||
![]() |
fb4bf96d24 | ||
![]() |
96eff02801 |
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
|||||||
SHELL=/bin/bash -o pipefail
|
SHELL=/bin/bash -o pipefail
|
||||||
|
|
||||||
V=1.3.1
|
V=1.3.2
|
||||||
BUILDTOOLVER ?= $(V)
|
BUILDTOOLVER ?= $(V)
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
# Flags used for the Rust compiler, similar in spirit to CFLAGS. Read
|
# Flags used for the Rust compiler, similar in spirit to CFLAGS. Read
|
||||||
# linkman:rustc[1] for more details on the available flags.
|
# linkman:rustc[1] for more details on the available flags.
|
||||||
RUSTFLAGS="-Cforce-frame-pointers=yes"
|
RUSTFLAGS="-C force-frame-pointers=yes"
|
||||||
|
|
||||||
# Additional compiler flags appended to `RUSTFLAGS` for use in debugging.
|
# Additional compiler flags appended to `RUSTFLAGS` for use in debugging.
|
||||||
# Usually this would include: ``-C debuginfo=2''. Read linkman:rustc[1] for
|
# Usually this would include: ``-C debuginfo=2''. Read linkman:rustc[1] for
|
||||||
|
@@ -23,7 +23,8 @@ Options
|
|||||||
Location of a pacman config file
|
Location of a pacman config file
|
||||||
|
|
||||||
*-M* <file>::
|
*-M* <file>::
|
||||||
Location of a makepkg config file
|
Location of a makepkg config file. Specific additions (e.g. build flags for
|
||||||
|
additional languages) can be placed in '<file>.d/*.conf'.
|
||||||
|
|
||||||
*-c* <dir>::
|
*-c* <dir>::
|
||||||
Set pacman cache, if no directory is specified the passed pacman.conf's cachedir is used with a fallback to '/etc/pacman.conf'
|
Set pacman cache, if no directory is specified the passed pacman.conf's cachedir is used with a fallback to '/etc/pacman.conf'
|
||||||
|
@@ -49,7 +49,8 @@ Options
|
|||||||
Set the pacman cache directory.
|
Set the pacman cache directory.
|
||||||
|
|
||||||
*-M* <file>::
|
*-M* <file>::
|
||||||
Location of a makepkg config file.
|
Location of a makepkg config file. Specific additions (e.g. build flags for
|
||||||
|
additional languages) can be placed in '<file>.d/*.conf'.
|
||||||
|
|
||||||
*-l* <chroot>::
|
*-l* <chroot>::
|
||||||
The directory name to use as the chroot namespace
|
The directory name to use as the chroot namespace
|
||||||
|
@@ -112,7 +112,13 @@ copy_hostconf () {
|
|||||||
[[ -n $host_cachemirrors ]] && printf 'CacheServer = %s\n' "${host_cachemirrors[@]}" >>"$working_dir/etc/pacman.d/mirrorlist"
|
[[ -n $host_cachemirrors ]] && printf 'CacheServer = %s\n' "${host_cachemirrors[@]}" >>"$working_dir/etc/pacman.d/mirrorlist"
|
||||||
|
|
||||||
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
|
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
|
||||||
[[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"
|
if [[ -n $makepkg_conf ]]; then
|
||||||
|
cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"
|
||||||
|
if [[ -d "${makepkg_conf}.d" ]] && is_globfile "${makepkg_conf}.d"/*.conf; then
|
||||||
|
mkdir --parents "$working_dir/etc/makepkg.conf.d/"
|
||||||
|
cp "${makepkg_conf}.d/"*.conf "$working_dir/etc/makepkg.conf.d/"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
local file
|
local file
|
||||||
for file in "${files[@]}"; do
|
for file in "${files[@]}"; do
|
||||||
|
@@ -93,14 +93,36 @@ get_makepkg_conf() {
|
|||||||
local fname=${1}
|
local fname=${1}
|
||||||
local arch="${2}"
|
local arch="${2}"
|
||||||
local makepkg_conf="${3}"
|
local makepkg_conf="${3}"
|
||||||
|
|
||||||
if ! buildtool_file=$(get_pkgfile "${fname}"); then
|
if ! buildtool_file=$(get_pkgfile "${fname}"); then
|
||||||
error "failed to retrieve ${fname}"
|
error "failed to retrieve ${fname}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
buildtool_file="${buildtool_file/file:\/\//}"
|
||||||
|
msg "using makepkg.conf from ${fname}"
|
||||||
|
|
||||||
|
# try to handle config of legacy devtools
|
||||||
|
if bsdtar --list --file "${buildtool_file}" "usr/share/devtools/makepkg-${arch}.conf" &>/dev/null; then
|
||||||
|
bsdtar --extract --to-stdout --fast-read --file "${buildtool_file}" "usr/share/devtools/makepkg-${arch}.conf" > "${makepkg_conf}"
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg2 "extracting ${arch}.conf from devtools archive"
|
||||||
|
if ! bsdtar --extract --to-stdout --fast-read --file "${buildtool_file}" "usr/share/devtools/makepkg.conf.d/${arch}.conf" > "${makepkg_conf}"; then
|
||||||
|
error "failed to extract 'usr/share/devtools/makepkg.conf.d/${arch}.conf' from devtools archive"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
msg2 "using makepkg.conf from ${fname}"
|
|
||||||
if ! bsdtar xOqf "${buildtool_file/file:\/\//}" "usr/share/devtools/makepkg.conf.d/${arch}.conf" > "${makepkg_conf}"; then
|
mkdir --parents "${makepkg_conf}.d"
|
||||||
bsdtar xOqf "${buildtool_file/file:\/\//}" "usr/share/devtools/makepkg-${arch}.conf" > "${makepkg_conf}"
|
if bsdtar --list --file "${buildtool_file}" "usr/share/devtools/makepkg.conf.d/conf.d" &>/dev/null; then
|
||||||
fi
|
msg2 "extracting conf.d from devtools archive"
|
||||||
|
bsdtar --extract --file "${buildtool_file}" --cd "${makepkg_conf}.d" --strip-components 4 "usr/share/devtools/makepkg.conf.d/conf.d"
|
||||||
|
fi
|
||||||
|
if bsdtar --list --file "${buildtool_file}" "usr/share/devtools/makepkg.conf.d/${arch}.conf.d" &>/dev/null; then
|
||||||
|
msg2 "extracting ${arch}.conf.d from devtools archive"
|
||||||
|
bsdtar --extract --file "${buildtool_file}" --cd "${makepkg_conf}.d" --strip-components 4 "usr/share/devtools/makepkg.conf.d/${arch}.conf.d"
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,7 +208,7 @@ for f in "${splitpkgs[@]}"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if (( ${#cache_dirs[@]} == 0 )); then
|
if (( ${#cache_dirs[@]} == 0 )); then
|
||||||
mapfile -t cache_dirs < <(pacman-conf CacheDir)
|
mapfile -t cache_dirs < <(pacman-conf CacheDir)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ORIG_HOME=${HOME}
|
ORIG_HOME=${HOME}
|
||||||
|
Reference in New Issue
Block a user