diff --git a/etc/makepkg.conf.d/rust.conf.in b/etc/makepkg.conf.d/rust.conf.in new file mode 100644 index 00000000..003be6a9 --- /dev/null +++ b/etc/makepkg.conf.d/rust.conf.in @@ -0,0 +1,11 @@ +#!/hint/bash +# +# @sysconfdir@/makepkg.conf.d/rust.conf +# + +######################################################################### +# RUST LANGUAGE SUPPORT +######################################################################### +# +#RUSTFLAGS="-C opt-level=2" +#DEBUG_RUSTFLAGS="-C debuginfo=2" diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in index edc5f442..90d3f20a 100644 --- a/etc/makepkg.conf.in +++ b/etc/makepkg.conf.in @@ -42,13 +42,11 @@ CHOST="@CHOST@" #CXXFLAGS="-O2 -pipe" #LDFLAGS="" #LTOFLAGS="-flto" -#RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems #MAKEFLAGS="-j2" #-- Debugging flags #DEBUG_CFLAGS="-g" #DEBUG_CXXFLAGS="-g" -#DEBUG_RUSTFLAGS="-C debuginfo=2" ######################################################################### # BUILD ENVIRONMENT diff --git a/meson.build b/meson.build index 4fd92d3f..89712c97 100644 --- a/meson.build +++ b/meson.build @@ -401,6 +401,12 @@ configure_file( configuration : substs, install_dir : SYSCONFDIR) +configure_file( + input : 'etc/makepkg.conf.d/rust.conf.in', + output : 'rust.conf', + configuration : substs, + install_dir : join_paths(SYSCONFDIR, 'makepkg.conf.d/')) + configure_file( input : 'etc/pacman.conf.in', output : 'pacman.conf', diff --git a/scripts/libmakepkg/util/config.sh.in b/scripts/libmakepkg/util/config.sh.in index f38e5c83..2045fa9e 100644 --- a/scripts/libmakepkg/util/config.sh.in +++ b/scripts/libmakepkg/util/config.sh.in @@ -37,6 +37,11 @@ source_makepkg_config() { # Source the config file; fail if it is not found if [[ -r $MAKEPKG_CONF ]]; then source_safe "$MAKEPKG_CONF" + if [[ -d "$MAKEPKG_CONF.d" ]]; then + for c in "$MAKEPKG_CONF.d"/*.conf; do + source_safe $c + done + fi else error "$(gettext "%s not found.")" "$MAKEPKG_CONF" plainerr "$(gettext "Aborting...")"