Skip to content

Commit

Permalink
mssql: test darwin patch
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jul 16, 2023
1 parent ee68559 commit 0e66753
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkgs/package-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,13 @@ in
if lib.versionOlder prev.php.version "7.0" then
prev.mkExtension {
name = "mssql";
nativeBuildInputs = [ pkgs.freetds ];
configureFlags = [
"--with-mssql=${pkgs.freetds}"
"--with-pdo-dblib=${pkgs.freetds}"
];
patches = [
# Make sure it looks for the proper freetds .dylib files when
# building on Darwin.
./patches/mssql-php56-darwin.patch
];
}
else
Expand Down
18 changes: 18 additions & 0 deletions pkgs/patches/mssql-php56-darwin.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git i/ext/mssql/config.m4 w/ext/mssql/config.m4
index 2a298af734..d80feaf7b5 100644
--- i/ext/mssql/config.m4
+++ w/ext/mssql/config.m4
@@ -36,10 +36,10 @@ if test "$PHP_MSSQL" != "no"; then
else
AC_MSG_ERROR(Directory $PHP_MSSQL is not a FreeTDS installation directory)
fi
- fi
+ fi

- if test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a" && test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so"; then
- AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so])
+ if test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a" && test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so" && test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.dylib"; then
+ AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so|dylib])
fi

PHP_ADD_INCLUDE($FREETDS_INCLUDE_DIR)

0 comments on commit 0e66753

Please sign in to comment.