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

From MythTV Official Wiki
Jump to: navigation, search
(Dependencies are updated)
(Assert the startupitem variant (which is used by logrotate))
(16 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.  
+
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), or newer, is now required.
  
==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:
+
=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 several build slaves (10.4 through 10.12 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
 
see http://www.macports.org/install.php
  
Once XCode and MacPorts are installed, use Terminal to run the following commands:
+
 
 +
=Myth 0.28.1=
 +
Myth 0.28.1 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:
  
 
{| width:90%; height:200px border="1"
 
{| width:90%; height:200px border="1"
 
|-  
 
|-  
| At the Terminal prompt, you enter
+
| Using Terminal, enter the following
 
| What happens
 
| What happens
|-
 
| <pre>sudo port install mythtv-core.25</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.
 
 
|-  
 
|-  
| <pre>sudo port install mysql5-server</pre>
+
| <pre>/opt/local/share/mythtv/mythconverg_backup.pl -directory ~/Desktop
| 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.
+
--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 fileIf the upgrade fails, you can restore this file and restart your previous version of Myth.
 
|}
 
|}
  
* 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.
 
  
 +
==Build and Install Myth 0.28.1==
 +
With XCode and MacPorts installed, use Terminal to run the following commands:
  
Congratulations, you just built Myth for MacVirtually all of the installed software and support files are under '/opt/local/' at the root of your hard driveFeel free to use the Finder to explore.
+
{| width:90%; height:200px border="1"
 +
|-
 +
| At the Terminal prompt, you enter
 +
| What happens
 +
|-
 +
| <pre>sudo port install mythtv.28
 +
+mariadb+mariadb55+python27+perl5_24-x11+startupitem</pre>
 +
| Download, build and install the MythTV.  This includes the frontend, backend, perl and python bindingsAll relevant dependencies, including the database client software, will also be installed and, therefore, the first time through, it may take 1 hour or moreDepending on the speed of your Mac, future updates can take as little as 15 minutes.
 +
|}
  
===Problems?===
 
MacPorts-users mailing list == http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
 
  
MacPorts ticket system == http://guide.macports.org/#project.tickets
+
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==
+
==Upgrading Myth 0.28==
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:
+
The mythtv.28 port is based on Myth's 0.28-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 44: Line 61:
 
| 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.
 
| 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.
 
|-  
 
|-  
| <pre>sudo port upgrade mythtv-core.25</pre>
+
| <pre>sudo port upgrade mythtv.28</pre>
 
| 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.
 
| 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.
 
|-
 
|-
Line 51: Line 68:
 
|}
 
|}
  
==Uninstall Myth==
+
==Uninstall Myth 0.28.1==
 
MacPorts keeps track of every file it installed and makes it easy to <em>uninstall</em> software, if needed.  Use Terminal to run one of the following commands.
 
MacPorts keeps track of every file it installed and makes it easy to <em>uninstall</em> software, if needed.  Use Terminal to run one of the following commands.
  
Line 61: Line 78:
 
| What happens
 
| What happens
 
|-  
 
|-  
| <pre>sudo port uninstall --follow-dependencies mythtv-core.25</pre>
+
| <pre>sudo port uninstall --follow-dependencies mythtv.28</pre>
 
| style="width:70%" | 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.
 
| style="width:70%" | 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.
 
|-  
 
|-  
| <pre>sudo port uninstall mythtv-core.25</pre>
+
| <pre>sudo port uninstall mythtv.28</pre>
| 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.
+
| This option completely removes the MythTV software from your machine but leaves all the dependencies installed. Reinstalling Myth will be faster than the above option and slower than the following.
 
|-
 
|-
| <pre>sudo port deactivate mythtv-core.25</pre>
+
| <pre>sudo port deactivate mythtv.28</pre>
 
| 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.
 
|}
 
|}
 +
 +
 +
=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
 +
  
  

Revision as of 12:37, 26 May 2017

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), or newer, is now required.


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 several build slaves (10.4 through 10.12 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.28.1

Myth 0.28.1 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:
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.


Build and Install Myth 0.28.1

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

At the Terminal prompt, you enter What happens
sudo port install mythtv.28 
+mariadb+mariadb55+python27+perl5_24-x11+startupitem
Download, build and install the MythTV. This includes the frontend, backend, perl and python bindings. All relevant dependencies, including the database 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.


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

The mythtv.28 port is based on Myth's 0.28-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.28
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.28.1

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.28
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.28
This option completely removes the MythTV software from your machine but leaves all the dependencies installed. Reinstalling Myth will be faster than the above option and slower than the following.
sudo port deactivate mythtv.28
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