Skip to content

Commit f0f9864

Browse files
add support for appleclang and homebrew
1 parent 00e42e4 commit f0f9864

5 files changed

Lines changed: 21 additions & 4 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
/cassandra.log
1313
/composer.phar
1414
/composer.lock
15-
/tmp/*
15+
/tmp/*

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "lib/cpp-driver"]
22
path = lib/cpp-driver
3-
url = https://github.com/datastax/cpp-driver.git
3+
url = https://github.com/gold-development/cassandra-cpp-driver.git

ext/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*.libs
1010
*.sw*
1111
*.loT
12+
*.dep
1213
Makefile
1314
Makefile.fragments
1415
Makefile.global
@@ -19,6 +20,7 @@ config.*
1920
!config.w32
2021
configure
2122
configure.in
23+
configure.ac
2224
.sconf_temp
2325
.sconsign.dblite
2426
.deps

ext/install.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,23 @@ popd
4040
echo "Compiling and installing the extension..."
4141
phpize
4242

43+
# Detect OpenSSL location
44+
if [ -d "/opt/homebrew/opt/openssl@3" ]; then
45+
OPENSSL_PREFIX="/opt/homebrew/opt/openssl@3"
46+
elif [ -d "/opt/homebrew/opt/openssl" ]; then
47+
OPENSSL_PREFIX="/opt/homebrew/opt/openssl"
48+
elif [ -d "/usr/local/opt/openssl" ]; then
49+
OPENSSL_PREFIX="/usr/local/opt/openssl"
50+
else
51+
OPENSSL_PREFIX=""
52+
fi
53+
4354
echo ./configure --with-cassandra=$builddir --with-libdir=lib
44-
LIBS="-lssl -lz -luv -lm -lstdc++" LDFLAGS="-L$builddir/lib" ./configure --with-cassandra=$builddir --with-libdir=lib
55+
if [ -n "$OPENSSL_PREFIX" ]; then
56+
LIBS="-lssl -lcrypto -lz -luv -lm -lstdc++" LDFLAGS="-L$builddir/lib -L$OPENSSL_PREFIX/lib" ./configure --with-cassandra=$builddir --with-libdir=lib
57+
else
58+
LIBS="-lssl -lcrypto -lz -luv -lm -lstdc++" LDFLAGS="-L$builddir/lib" ./configure --with-cassandra=$builddir --with-libdir=lib
59+
fi
4560
make
4661
make install
4762

lib/cpp-driver

Submodule cpp-driver updated 556 files

0 commit comments

Comments
 (0)