Search code examples
macosmariadbmacports

How to replace binary installed via Macports?


I'd like to replace my current MariaDB installation with one compiled with the debug flag. Can I compile a binary and copy/paste over the one installed via Macports or is there something else to it?


Solution

  • So this is how I did it. It was a mix of @neverpanic's answer and some more questions from the MariaDB #irc channel:

    1. Find the port file for MariaDB: port file mariadb-10.1
    2. Add debug flags for the build. Under configure.args-append add -DCMAKE_BUILD_TYPE=Debug and after the last variant add a new one: variant debug { configure.optflags -O0 -g3 }
    3. Force a rebuild: sudo port -sn upgrade --force mariadb-10.1 +debug
    4. Finally do port contents mariadb-10.1-server to find the LaunchCtl plist file and add the --debug flag after the name of the program.