Building Myth for Mac with MacPorts

From MythTV Official Wiki
Revision as of 02:18, 20 November 2012 by Pvr4me (talk | contribs) (Dependencies are updated)

Jump to: navigation, search

This page provides a cookbook for building MythTV for Mac OS X via MacPorts. It is assumed that you have at least a little experience using Terminal on the Mac to run command-line driven programs. See the page Myth for Mac with MacPorts for more information.

Build and Install Myth

You need to obtain the appropriate version of XCode for your version of OS X. Then install the latest version of MacPorts. The MacPorts web site has a good summary:


Once XCode and MacPorts are installed, use Terminal to run the following commands:

At the Terminal prompt, you enter What happens
sudo port install mythtv-core.25
Download, build and install the MythTV. This includes the frontend, backend, perl and python bindings but not Myth's plug-ins. All relevant dependencies, including the MySQL client software, will also be installed and, therefore, the first time through, it may take 1 hour or more. Depending on the speed of your Mac, future updates can take as little as 15 minutes.
sudo port install mysql5-server
OPTIONAL. Download, build and install the MySQL database server software* (version 5.1). Myth needs a database server running--this command allows you to run the server on this machine.
  • MacPorts offers several versions/forks of MySQL. Please select "mysql5" for maximum compatibility at the present time. We hope to allow MySQL 5.5 or even MariaDB or Percona at some point in the future.

Congratulations, you just built Myth for Mac. Virtually all of the installed software and support files are under '/opt/local/' at the root of your hard drive. Feel free to use the Finder to explore.


MacPorts-users mailing list ==

MacPorts ticket system ==

Upgrading Myth

The mythtv-core.25 port is based on Myth's 0.25-Fixes branch and is updated periodically as important commits are applied. MacPorts also regularly updates other ports which Myth may rely on. To check for and apply upgrades:

At the Terminal prompt, you enter What happens
sudo port selfupdate
MacPorts downloads an updated list of available ports and, if necessary, updates the MacPorts software itself.
port outdated
MacPorts compares, for each installed port, your installed version versus the currently available version. It lists any ports that are not at the latest version.
sudo port upgrade mythtv-core.25
Upgrade to the latest version of MythTV available through MacPorts. This upgrades the MythTV software and any of the dependencies that were installed to support it.
sudo port upgrade outdated
This upgrades any and all ports that are not at the current version supplied by MacPorts. Obviously, this may take a long time if there are a large number of outdated ports or if something like Qt is affected.

Uninstall Myth

MacPorts keeps track of every file it installed and makes it easy to uninstall software, if needed. Use Terminal to run one of the following commands.

Before uninstalling Myth, make sure mythbackend is not running. Check Activity Monitor, the 'top' utility or similar. See Myth for Mac with MacPorts for information on stopping the backend.

Enter one of the following What happens
sudo port uninstall --follow-dependencies mythtv-core.25
This option completely removes the MythTV software and all the other dependencies that were installed to support it (such as Qt, MySQL, etc). If, later, you want to reinstall Myth, it may take multiple hours to build everything again.
sudo port uninstall mythtv-core.25
This option completely removes the MythTV software from your machine but leaves all the dependencies installed. Reinstalling Myth faster than the above option and slower than the following.
sudo port deactivate mythtv-core.25
This option saves the current version of MythTV in an archive but otherwise removes the software from your machine. Again, it leaves all dependencies installed. The advantage is that Myth can be re-installed in a minute or two with the "activate" command.