This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-db.git
The following commit(s) were added to refs/heads/main by this push:
new a81db2c fix(r/sedonadb): Add missing settings to configure.win and
Makevars.win.in (#116)
a81db2c is described below
commit a81db2ca4b29a90830f1a2f9a9b3c3f3a481107e
Author: Hiroaki Yutani <[email protected]>
AuthorDate: Sun Sep 21 04:33:48 2025 +0900
fix(r/sedonadb): Add missing settings to configure.win and Makevars.win.in
(#116)
---
r/sedonadb/configure.win | 19 +++++++++++++++++++
r/sedonadb/src/Makevars.win.in | 4 ++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/r/sedonadb/configure.win b/r/sedonadb/configure.win
index 6db580b..b7f8b53 100755
--- a/r/sedonadb/configure.win
+++ b/r/sedonadb/configure.win
@@ -15,6 +15,24 @@
# specific language governing permissions and limitations
# under the License.
+# We need to link GEOS libs. The cargo build will use pkg-config
+# and then geos-config, in that order, and requires pkg-config to be
+# available (even if it isn't used). Here we just try pkg-config (LIB_DIR
+# can be used to specify the location of -lgeos_c)
+
+pkg-config geos 2>/dev/null
+if [ $? -eq 0 ]; then
+ PKGCONFIG_LIBS=`pkg-config --libs geos`
+fi
+
+if [ "$LIB_DIR" ]; then
+ echo "Found LIB_DIR!"
+ PKG_LIBS="-L$LIB_DIR -lgeos_c $PKG_LIBS"
+elif [ "$PKGCONFIG_CFLAGS" ] || [ "$PKGCONFIG_LIBS" ]; then
+ echo "Found GEOS pkg-config libs!"
+ PKG_LIBS=${PKGCONFIG_LIBS}
+fi
+
CARGO_VERSION="$(cargo --version)"
if [ $? -ne 0 ]; then
@@ -57,4 +75,5 @@ sed \
-e "s/@TARGET@/x86_64-pc-windows-gnu/" \
-e "s/@PROFILE@/${PROFILE}/" \
-e "s/@FEATURE_FLAGS@/${FEATURE_FLAGS}/" \
+ -e "s|@PKG_LIBS@|${PKG_LIBS}|" \
src/Makevars.win.in > src/Makevars.win
diff --git a/r/sedonadb/src/Makevars.win.in b/r/sedonadb/src/Makevars.win.in
index aaee642..096e0a4 100644
--- a/r/sedonadb/src/Makevars.win.in
+++ b/r/sedonadb/src/Makevars.win.in
@@ -25,8 +25,8 @@ RUSTFLAGS =
TARGET_DIR = $(CURDIR)/rust/target
LIBDIR = $(TARGET_DIR)/$(TARGET)/$(subst dev,debug,$(PROFILE))
-STATLIB = $(LIBDIR)/libsedonadb.a
-PKG_LIBS = -L$(LIBDIR) -lsedonadb -lws2_32 -ladvapi32 -luserenv -lbcrypt
-lntdll
+STATLIB = $(LIBDIR)/libsedonadbr.a
+PKG_LIBS = -L$(LIBDIR) -lsedonadbr -lws2_32 -ladvapi32 -luserenv -lbcrypt
-lntdll @PKG_LIBS@
# Rtools doesn't have the linker in the location that cargo expects, so we need
# to overwrite it via configuration.