Difference between revisions of "Building Myth for Mac with MacPorts"

From MythTV Official Wiki
Jump to: navigation, search
(tweak upgrade command)
(fix path)
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
This page provides a cookbook for building MythTV for Mac OS X via [http://www.macports.org 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. OS X 10.9 (Mavericks) now supported.
 
This page provides a cookbook for building MythTV for Mac OS X via [http://www.macports.org 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. OS X 10.9 (Mavericks) now supported.
 +
 +
 +
=About MacPorts=
 +
[http://www.macports.org MacPorts] is a stable and mature system for bringing open-source software to the Mac platform.  Changes are tested and reviewed before being committed to MacPorts.  MacPorts operates some build slaves (Mavericks, Mountain Lion, Lion and Snow Leopard, all on 64 bit machines, currently) which automatically build the default variant of each port.  All this means that if you decide to try building with MacPorts, there is a strong likelihood that it will just work.  And, if it doesn't, there is an active support system working to resolve any problems.
  
  
Line 9: Line 13:
  
 
=Myth 0.27=
 
=Myth 0.27=
Myth 0.27 is the current release of MythTV and is recommended for all users.
+
Myth 0.27.4 is the current release of MythTV and is recommended for all users.
  
 
==Upgrading from a previous version of Myth?==
 
==Upgrading from a previous version of Myth?==
Line 15: Line 19:
  
 
*Backup your database:
 
*Backup your database:
 +
 +
The previous versions of MythTV on MacPorts used MySQL 5.1 as the database.
  
 
{| width:90%; height:200px border="1"
 
{| width:90%; height:200px border="1"
Line 21: Line 27:
 
| What happens
 
| What happens
 
|-  
 
|-  
| <pre>/opt/local/share/mythtv/mythconverg_backup.pl \
+
| <pre>/opt/local/share/mythtv/mythconverg_backup.pl -directory ~/Desktop
--mysqldump /opt/local/lib/mysql5/bin/mysqldump \
+
--mysqldump /opt/local/bin/mysqldump5 --verbose</pre>
--directory ~/Desktop --verbose</pre>
 
 
| Saves the current state of your Myth software (settings, rules, guide data, etc) into a compressed backup file.  If the upgrade fails, you can restore this file and restart your previous version of Myth.
 
| Saves the current state of your Myth software (settings, rules, guide data, etc) into a compressed backup file.  If the upgrade fails, you can restore this file and restart your previous version of Myth.
 
|}
 
|}
 +
 +
Effective with the 0.27.4 version, we're using MariaDB 5.5 for the database.  Therefore the appropriate backup command is:
 +
 +
{| width:90%; height:200px border="1"
 +
|-
 +
| Using Terminal, enter the following
 +
| What happens
 +
|-
 +
| <pre>/opt/local/share/mythtv/mythconverg_backup.pl -directory ~/Desktop
 +
--mysqldump /opt/local/lib/mariadb/bin/mysqldump --verbose</pre>
 +
| Saves the current state of your Myth software (settings, rules, guide data, etc) into a compressed backup file.  If the upgrade fails, you can restore this file and restart your previous version of Myth.
 +
|}
 +
  
 
*Deactivate the MythTV software
 
*Deactivate the MythTV software
Line 31: Line 49:
 
See the instructions in the relevant section below, [[Building Myth for Mac with MacPorts#Uninstall Myth 0.26|Uninstall Myth 0.26]] or [[Building Myth for Mac with MacPorts#Uninstall Myth 0.25|Uninstall Myth 0.25]], to deactivate your version of Myth.
 
See the instructions in the relevant section below, [[Building Myth for Mac with MacPorts#Uninstall Myth 0.26|Uninstall Myth 0.26]] or [[Building Myth for Mac with MacPorts#Uninstall Myth 0.25|Uninstall Myth 0.25]], to deactivate your version of Myth.
  
==Build and Install Myth 0.27==
+
==Build and Install Myth 0.27.4==
 
With XCode and MacPorts installed, use Terminal to run the following commands:
 
With XCode and MacPorts installed, use Terminal to run the following commands:
  
Line 39: Line 57:
 
| What happens
 
| What happens
 
|-
 
|-
| <pre>sudo port install mythtv-core.27</pre>
+
| <pre>sudo port install mythtv-core.27  
 +
+mariadb+mariadb55+python27+perl5_16</pre>
 
| 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.
 
| 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.
 
|-  
 
|-  
| <pre>sudo port install mysql5-server</pre>
+
| <pre>sudo port install mariadb-server</pre>
| style="width:70%" | 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.
+
| style="width:70%" | OPTIONAL.  Download, build and install the MariaDB database server software* (version 5.5).  Myth needs a database server running--this command allows you to run the server on this machine.
 
|-  
 
|-  
 
| <pre>sudo port install logrotate +startupitem</pre>
 
| <pre>sudo port install logrotate +startupitem</pre>
 
| style="width:70%" | OPTIONAL.  Download, build and install logrotate.  Myth generates a lot of log files, even when just the frontend is used.  Logrotate prunes out older ones on a daily basis.
 
| style="width:70%" | OPTIONAL.  Download, build and install logrotate.  Myth generates a lot of log files, even when just the frontend is used.  Logrotate prunes out older ones on a daily basis.
 
|}
 
|}
 
* 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.
 
  
  
Line 55: Line 72:
  
 
==Upgrading Myth 0.27==
 
==Upgrading Myth 0.27==
The mythtv-core.26 port is based on Myth's 0.27-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:
+
The mythtv-core.27 port is based on Myth's 0.27-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:
  
 
{| width:90%; height:200px border="1"
 
{| width:90%; height:200px border="1"
Line 94: Line 111:
 
| 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.
 
| 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.
 
|}
 
|}
 
  
 
=Myth 0.26=
 
=Myth 0.26=

Revision as of 16:02, 28 October 2014

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. OS X 10.9 (Mavericks) now supported.


About MacPorts

MacPorts is a stable and mature system for bringing open-source software to the Mac platform. Changes are tested and reviewed before being committed to MacPorts. MacPorts operates some build slaves (Mavericks, Mountain Lion, Lion and Snow Leopard, all on 64 bit machines, currently) which automatically build the default variant of each port. All this means that if you decide to try building with MacPorts, there is a strong likelihood that it will just work. And, if it doesn't, there is an active support system working to resolve any problems.


Install XCode and MacPorts

In order to install any version of Myth via MacPorts, you first 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:

see http://www.macports.org/install.php


Myth 0.27

Myth 0.27.4 is the current release of MythTV and is recommended for all users.

Upgrading from a previous version of Myth?

  • Shutdown Myth with Myth_Stop_Start
  • Backup your database:

The previous versions of MythTV on MacPorts used MySQL 5.1 as the database.

Using Terminal, enter the following What happens
/opt/local/share/mythtv/mythconverg_backup.pl -directory ~/Desktop 
 --mysqldump /opt/local/bin/mysqldump5 --verbose
Saves the current state of your Myth software (settings, rules, guide data, etc) into a compressed backup file. If the upgrade fails, you can restore this file and restart your previous version of Myth.

Effective with the 0.27.4 version, we're using MariaDB 5.5 for the database. Therefore the appropriate backup command is:

Using Terminal, enter the following What happens
/opt/local/share/mythtv/mythconverg_backup.pl -directory ~/Desktop 
 --mysqldump /opt/local/lib/mariadb/bin/mysqldump --verbose
Saves the current state of your Myth software (settings, rules, guide data, etc) into a compressed backup file. If the upgrade fails, you can restore this file and restart your previous version of Myth.


  • Deactivate the MythTV software

See the instructions in the relevant section below, Uninstall Myth 0.26 or Uninstall Myth 0.25, to deactivate your version of Myth.

Build and Install Myth 0.27.4

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

At the Terminal prompt, you enter What happens
sudo port install mythtv-core.27 
+mariadb+mariadb55+python27+perl5_16
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 mariadb-server
OPTIONAL. Download, build and install the MariaDB database server software* (version 5.5). Myth needs a database server running--this command allows you to run the server on this machine.
sudo port install logrotate +startupitem
OPTIONAL. Download, build and install logrotate. Myth generates a lot of log files, even when just the frontend is used. Logrotate prunes out older ones on a daily basis.


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.

Upgrading Myth 0.27

The mythtv-core.27 port is based on Myth's 0.27-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.27
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 0.27

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.27
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.27
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.27
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.

Myth 0.26

Myth 0.26 is the previous release of MythTV and is supported but users are strongly encouraged to upgrade to 0.27.

Upgrading from Myth 0.25?

  • Shutdown Myth 0.25 with Myth_Stop_Start
  • Backup your database:
Using Terminal, enter the following What happens
/opt/local/share/mythtv/mythconverg_backup.pl \
--mysqldump /opt/local/lib/mysql5/bin/mysqldump \
--directory ~/Desktop --verbose
Saves the current state of your Myth software (settings, rules, guide data, etc) into a compressed backup file. If the upgrade fails, you can restore this file and restart Myth 0.25.
  • Deactivate the previous MythTV software

See the instructions in the relevant section below, Uninstall Myth 0.25, to deactivate your version of Myth.

Build and Install Myth 0.26

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

At the Terminal prompt, you enter What happens
sudo port install mythtv-core.26
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.
sudo port install logrotate +startupitem
OPTIONAL. Download, build and install logrotate. Myth generates a lot of log files, even when just the frontend is used. Logrotate prunes out older ones on a daily basis.
  • 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.

Upgrading Myth 0.26

The mythtv-core.26 port is based on Myth's 0.26-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.26
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 0.26

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.26
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.26
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.26
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.


Myth 0.25

Myth 0.25 End of Life

Myth 0.25 is no longer supported by the MythTV project and users are encouraged to upgrade to 0.27. MacPorts will retain the mythtv-core.25 port until Myth 0.28 is released or until it becomes too difficult to maintain.

Upgrading Myth 0.25

The mythtv-core.25 port has been updated to the most recent 0.25-Fixes. If you are not willing to upgrade to 0.26 or 0.27, you should ensure that you are running the most recent revision of 0.25:

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 0.25

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.


Problems?

If you have any problems building MythTV via MacPorts, please post to the macports-users mailing list. If necessary, please file a bug with the MacPorts bug tracker.

MacPorts-users mailing list == https://lists.macosforge.org/mailman/listinfo/macports-users

MacPorts ticket system == http://guide.macports.org/#project.tickets