Skip to content

Commit

Permalink
mysql: fix bad linker flags in mysql_config
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab committed May 17, 2023
1 parent d46b2d3 commit 981bd05
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Formula/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def install

# -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`)
args = %W[
-DFORCE_INSOURCE_BUILD=1
-DCOMPILATION_COMMENT=Homebrew
-DINSTALL_DOCDIR=share/doc/#{name}
-DINSTALL_INCLUDEDIR=include/mysql
Expand All @@ -100,9 +99,13 @@ def install
-DWITH_INNODB_MEMCACHED=ON
]

system "cmake", ".", *std_cmake_args, *args
system "make"
system "make", "install"
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"

# Fix bad linker flags in `mysql_config`.
# https://bugs.mysql.com/bug.php?id=111011
inreplace bin/"mysql_config", "-lzlib", "-lz"

(prefix/"mysql-test").cd do
system "./mysql-test-run.pl", "status", "--vardir=#{Dir.mktmpdir}"
Expand Down

0 comments on commit 981bd05

Please sign in to comment.