Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions dvs-rpkg/configure
Original file line number Diff line number Diff line change
Expand Up @@ -614,22 +614,18 @@ CDYLIB_EXT
CDYLIB_PREFIX
TAR_FORCE_LOCAL
CARGO_STATICLIB_NAME
PACKAGE_TARNAME_RS_UPPERCASE
PACKAGE_TARNAME_RS
CARGO_LIBDIR
CARGO_BUILD_TARGET
ENV_RUSTFLAGS
CARGO_PROFILE
CARGO_TARGET_DIR_CARGO
CARGO_TARGET_DIR
CARGO_CMD
RUST_TOOLCHAIN
ABS_RPKG_SRC_CARGO
CYGPATH
SED
RUSTC
CARGO
ROOT_MINIEXTENDR_REPO
ABS_RPKG_SRCDIR
ABS_TOP_SRCDIR
CARGO_FEATURES_FLAG
Expand Down Expand Up @@ -2019,8 +2015,6 @@ ABS_RPKG_SRCDIR="$abs_rpkg_src"
RUST_SRC_DIR="$abs_rpkg_src/rust"

root_miniextendr_repo="$(cd "$abs_rpkg_src/../.." && pwd)"
ROOT_MINIEXTENDR_REPO="$root_miniextendr_repo"


if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cargo", so it can be a program name with args.
Expand Down Expand Up @@ -2350,9 +2344,6 @@ then :
fi





abs_rpkg_src_cargo="$abs_rpkg_src"
case "$host_os" in
*msys*|*cygwin*|*mingw*)
Expand Down Expand Up @@ -2385,7 +2376,6 @@ fi
CARGO_CMD="$CARGO $RUST_TOOLCHAIN"



: ${CARGO_TARGET_DIR="$abs_top_srcdir/rust-target"}


Expand Down Expand Up @@ -2466,22 +2456,13 @@ then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: CARGO_BUILD_TARGET = $CARGO_BUILD_TARGET" >&5
printf "%s\n" "$as_me: CARGO_BUILD_TARGET = $CARGO_BUILD_TARGET" >&6;}
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ROOT_MINIEXTENDR_REPO = $ROOT_MINIEXTENDR_REPO" >&5
printf "%s\n" "$as_me: ROOT_MINIEXTENDR_REPO = $ROOT_MINIEXTENDR_REPO" >&6;}
if test -n "$DVS_FEATURES"
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: DVS_FEATURES = $DVS_FEATURES" >&5
printf "%s\n" "$as_me: DVS_FEATURES = $DVS_FEATURES" >&6;}
fi

pkg_rs="$(echo "$PACKAGE_NAME" | $SED 's/-/_/g; s/\./_/g')"
PACKAGE_TARNAME_RS=$pkg_rs

pkg_rs_upper=`printf '%s' "$pkg_rs" | tr 'a-z' 'A-Z'`
PACKAGE_TARNAME_RS_UPPERCASE=$pkg_rs_upper


CARGO_STATICLIB_NAME="$pkg_rs"
CARGO_STATICLIB_NAME="$(echo "$PACKAGE_NAME" | $SED 's/-/_/g; s/\./_/g')"

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: CARGO_STATICLIB_NAME = $CARGO_STATICLIB_NAME" >&5
printf "%s\n" "$as_me: CARGO_STATICLIB_NAME = $CARGO_STATICLIB_NAME" >&6;}
Expand Down
15 changes: 2 additions & 13 deletions dvs-rpkg/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ RUST_SRC_DIR="$abs_rpkg_src/rust"

dnl Canonical path two levels above src (rpkg/src → miniextendr)
root_miniextendr_repo="$(cd "$abs_rpkg_src/../.." && pwd)"
AC_SUBST([ROOT_MINIEXTENDR_REPO], ["$root_miniextendr_repo"])

dnl ---- tool discovery ----
AC_PATH_TOOL([CARGO],[cargo],[no])
Expand All @@ -107,9 +106,7 @@ AS_IF([test "x$CARGO" = "xno"], [AC_MSG_ERROR([`cargo` not found])])
AS_IF([test "x$RUSTC" = "xno"], [AC_MSG_ERROR([`rustc` not found])])
AS_IF([test "x$SED" = "xno"], [AC_MSG_ERROR([`sed` not found])])
AC_SUBST([CARGO])
AC_SUBST([RUSTC])
AC_SUBST([SED])
AC_SUBST([CYGPATH])
dnl RUSTC, SED, CYGPATH used only within configure.ac — no AC_SUBST needed

dnl Use native paths for Cargo on Windows/MSYS to avoid path mangling.
dnl MSYS2 paths like /d/a/foo become D:/d/a/foo when interpreted by Cargo,
Expand Down Expand Up @@ -147,7 +144,6 @@ AC_SUBST([RUST_TOOLCHAIN])

dnl Convenience: cargo command that includes optional toolchain selector
CARGO_CMD="$CARGO $RUST_TOOLCHAIN"
AC_SUBST([CARGO_CMD])

dnl ---- Cargo configuration ----
dnl IMPORTANT: target directory MUST be outside src/ to avoid pkgbuild scanning
Expand Down Expand Up @@ -231,20 +227,13 @@ AS_IF([test -n "$RUST_TOOLCHAIN"],
[AC_MSG_NOTICE([RUST_TOOLCHAIN = $RUST_TOOLCHAIN])])
AS_IF([test -n "$CARGO_BUILD_TARGET"],
[AC_MSG_NOTICE([CARGO_BUILD_TARGET = $CARGO_BUILD_TARGET])])
AC_MSG_NOTICE([ROOT_MINIEXTENDR_REPO = $ROOT_MINIEXTENDR_REPO])
AS_IF([test -n "$DVS_FEATURES"],
[AC_MSG_NOTICE([DVS_FEATURES = $DVS_FEATURES])])

dnl ---- package name → Rust-safe variants ----
dnl Use PACKAGE_NAME (case-preserving) not PACKAGE_TARNAME (lowercased)
dnl so the entrypoint's R_init_*_miniextendr symbol matches the Rust module exactly.
pkg_rs="$(echo "$PACKAGE_NAME" | $SED 's/-/_/g; s/\./_/g')"
AC_SUBST([PACKAGE_TARNAME_RS], [$pkg_rs])
pkg_rs_upper=`printf '%s' "$pkg_rs" | tr 'a-z' 'A-Z'`
AC_SUBST([PACKAGE_TARNAME_RS_UPPERCASE], [$pkg_rs_upper])

dnl Staticlib name matches the Rust crate name (= pkg_rs)
CARGO_STATICLIB_NAME="$pkg_rs"
CARGO_STATICLIB_NAME="$(echo "$PACKAGE_NAME" | $SED 's/-/_/g; s/\./_/g')"
AC_SUBST([CARGO_STATICLIB_NAME])
AC_MSG_NOTICE([CARGO_STATICLIB_NAME = $CARGO_STATICLIB_NAME])

Expand Down
Loading