Changes

Jump to: navigation, search

Mac OS X:Build from source:MacPorts

9,731 bytes removed, 11:01, 24 February 2012
m
moved Mac OS X MacPorts to Mac OS X:Build from source:MacPorts: Structure the Mac OS pages
{{languages}}
== Installing gramps for X11 using MacPorts ==
This page has been updated with information gleaned # Install Mac OS X Leopard and update to the latest version. (X11 will be installed by default on Leopard - older OSes may require it to be manually installed.)# Download and install the latest Xcode tools from installing gramps 3http://developer.apple.com/technology/Xcode.html # Download and install Macports from http://www.0macports.4org/install.1php# Open Terminal. app from Macports onto a brand new iMac with OS X 10/Applications/Utilities and enter these commands: sudo port -v selfupdate sudo port install gramps sudo port install python_select sudo python_select python25 sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist sudo launchctl load -w /Library/LaunchAgents/org.5freedesktop.6 on 14 March 2009dbus-session.plist
=== Starting ======= X11 ===={{man note| Time for several cups of coffee! |The step 'sudo port install gramps' on a completely fresh installation of MacPorts information says that you have to install X11, either from an Apple disk or from an open source versionon Mac OS X 10.4. My 11 iMac came pre-installed with X11 out of the Apple box, so that is probably the default nowadaysiSight (2. In that case, no action is needed1 GHx PowerPC G5) took 12 hours 53 minutes.}}
==== Superuser ====All # After the 'ports' installation operations require superuser accesslast command, also known as root access, also known as an admin account. If wait 5 minutes to be sure that launchctl has finished# When you don't have this on your Mac, you have want to ask an admin account holder to change your account settingsrun GRAMPS, with system preferences - accounts from the Apple menu in the top left of the menu barenter these commands open /Applications/Utilities/X11. To check app grampsOn older OSes it may be necessary to see if you are an admin account holder, instead use open a terminal window (with applications - utility - terminal) and type 'sudo ls'. A directory listing means you have an admin account. A grumpy error message means you do not.x11 gramps[[Category:Developers/Packaging]]
==== BackupThere are a number of issues, Desirability Of ====some of which are probably specific to particular versions of Mac OS X::
# If you had a previous installation of MacPorts installs everything as a superuserand Gramps, and you want to start again from scratch, using sudothen simply deleting the folder /opt is not enough to uninstall MacPorts. The correct instructions for doing so are at [[http://guide.macports.org/chunked/installing. That could cause macports.uninstalling.html MacPorts Guide: uninstalling]]. In particular, you have to rename/move aside /Applications/MacPorts when you do a lot of grief if it didn't fresh install.# libproxy 0.4.0 does not build properly on Tiger see [[http://trac.macports.org/ticket/24127 MacPorts ticket 24127]]. Reverting to the Portfile for 0.3.0 works.# The WriteCD plugin is unavailable. This relies on GNOME and has not been made to work, so it is well worth while setting up the Apple Time Machine backup software before starting any of this on OS X.# The spelling checker may or may not work. With that gnome-python-extras needs to be build after gtkspell (which may not happen in placean entirely automated build). In addition, there appear to be some other problems which affect whether it works or not. See [[http://trac.macports.org/ticket/24266 MacPorts ticket 24266]].# The latest version of MacPorts Gramps is possible to undo any disasters more or less however bad they getbased on Python 2. I've 6, but this does not needed build _bsddb correctly on some OS/architecture combinations. See [[http://trac.macports.org/ticket/23768 MacPorts ticket 23768]] and [[http://trac.macports.org/ticket/24310 MacPorts ticket 24310]].# A warning message is produced when running Gramps: "Xlib: extension "RANDR" missing on display ":0.0"." According to use it but itthe MacPorts FAQ [[http://trac.macports.org/wiki/FAQ#randr]] "It's a warm feelingharmless and you should ignore it". # The Time Machine software works either with an Apple branded network drive, Time Capsule, Geographic View is not available because webkit-gtk does not build under MacPorts [[http://trac.macports.org/ticket/23464 MacPorts ticket 23464]] and [[http://bugs.webkit.org/show_bug.cgi?id=36088 webkitgtk bug]]).# When going into the file chooser (for example on export or with a generic direct-wired USB import or firewire disk plugged in plugin manager, you may get the back of the iMacwarning: "GtkWarning: Unable to find default local directory monitor type". I picked a generic disk, plugged it inThis doesn't seem to be very serious, and the Time Machine software sprang seems to life and I completed the process in be a couple of clicks (and several hours of writing the new disk)"more general gtk issue". See [[http://www.mail-archive.com/bug-gnubg@.../msg03464. Well worth whilehtml]].
==== OpenOffice ====
The advice from the [[Mac OS X]] page to install [http://www.openoffice.org/ OpenOffice] first is sound. That should complete without any errors. Be aware that the running openoffice icon in the Mac dock doesn't do anything when clicked. It has to be ctrl-clicked to pop up a menu.
==== MacPorts ====[http://www.macports.org/ MacPorts] should now install successfully with a couple of clicks. I just clicked on the "leopard" link on the [http://www.macports.org/install.php install] page and it just worked. ==== xCode ====Before going further, it's worth finding out whether your Mac is set up for software development. open a terminal window (in finder-applications-utilities-terminal) and type in the line ended with the <CR> key  type make and if it says  make is /usr/bin/make then all is well, but if it says  -bash: type: make: not found then the Mac doesn't have the software development code loaded. This was the case with my new iMac straight from the store. If you don't already have the software development code, you need the [http://developer.apple.com/TOOLS/xcode/ Xcode] package start gramps from Apple. This free and installs with just a click, despite its size (1 Gbyte download). However, you do have to become a member of the [http://developer.apple.com/ Apple Developer Connection] in order to get it. This too is free and can be done straight away online, but does require you to agree to a large legal contract which allows, among other things, Apple staff to enter your home. To complicate matters, I had trouble with the Apple website while applying for membership and had to try three times. Howeverxterm window, eventually, the sign-up email came through and all was well and I could go ahead and download xCode. Succeeding in this turns the iMac into a full-fledged software development workstation. You don't actually need to develop any software - not one line of code - to install gramps, but the MacPort software does need the software development tools forget to do follow the installation. After all that (it takes a couple of hours to download and install xCode) the "type make" test above should succeed. ==== GRAMPS and the packages it depends on ====The following text here was from the original version of this page and was what I used to install GRAMPS. In fact, it's out of date. A current experience is shown on the discussion page of this article, and it would have been better instructions about setting paths for me to do that instead. We should re-hash this page to make more sense, but none of us quite has the courage to go ahead and do it! ==== This is what used to happen ==== So, assuming you have MacPorts installed and updated, you might as well try:<code>sudo port install gramps</code>Now, if you're like me and didn't have GNOME or anything like that installed, calling that command will attempt to go through all of the dependencies and install them all. This will take a while, and you might be at this installing gramps for a couple hours (there are a lot of dependencies) What I did instead was run <code>port deps gramps</code>, which listed the major dependencies that gramps has. Then, I installed each separately. They are:<code>shared-mime-infopy-gnomepy-bsddb</code>I installed them X11 environment in the following order:# shared-mime-info# py-bsddb# py-gnome (the tough one) === shared-mime-info ===In order to successfully install this, I first had to run:<code>sudo port install p5-xml-saxsudo port install p5-xml-sax-expat</code>After that, things installed smoothly === py-bsddb === This actually installed smoothly on my computer.  === py-gnome ===For now, I merely list the libraries and what I did to fix the problem.# py-gtk2#* I had to make sure to upgrade expat. After that, it installed fine.#* ''I had a real difficulty getting this to fully install. It kept choking on Cairo. After updating XTools to 2.5, Cairo installed without a problem.'' --[[User:A.southern.yankee|A.southern.yankee]] 23:46, 1 May 2008 (EDT)# py-orbit#* This installed without any problems for me. # libzvt#* This package needs "dbus" which in turn needs "xmlto". It appears, however, that "xmlto" is not listed as a dependent of "dbus". Hence, I ran <code>sudo port install xmlto</code> by hand. This installed without any problems on my computer. #* After installing that, and upgrading gtk2 (do this first), this seems to be installing correctly. # gnome-desktop#* This was the next problem for me. I installed ''p5-libxml-perl, p5-xml-simple, py-xml'' by hand, cleaned ''gnome-desktop'', and then tried the installation again. Worked fine!# gstreamer#* This was the next problem for me. I installed ''p5-xml-libxslt, py-libxslt by hand'', cleaned gstreamer, and then tried the installation again. Worked fine!#liboil#* First, I ran <code>sudo port upgrade gtk-doc</code>#* Then, I installed the newest version of the liboil library from [http://liboiltrac.freedesktopmacports.org/downloadwiki/] and then tried to make the liboil library again. (From the manual download). This worked. I would assume it would work for the port version as well. InstallingMacPorts# nautilus#* This was the last problem for me. To get around the error, I had to create a soft link for the ''libintl.3.dylib'' file in my /opt/local/lib/ directory. ==== And this is another error message that happened in March 2009 ==== When I did sudo port install gnome-desktopI saw ErrorOptionsfortheMacPortsshellandX11environment MacPorts wiki: Target org.macports.activate returned: Image error: /opt/local/bin/nosetests is being used by the active py-nose port. Please deactivate this port first, or use the -f flag to force the activation. Error: The following dependencies failed to build: py25-gnome py25-gtk py25-cairo py25-numpy py25-nose py25-gobject py25-orbit startup-notification xorg-libsm xorg-libice Error: Status 1 encountered during processing. and I have no idea what it means or what deactivating a port implies. I typed sudo port -f install gnome-desktopand got Registry error: py25-nose @0.10.4_0 already registered as installed. Please uninstall it first.so I typed sudo port uninstall py25-nose sudo port -f install gnome-desktopand that seemed to work. Goodness knows what chaos I caused! === Finishing ===As well as OpenOffice, [http://www.graphviz.org/ GraphvizInstalling MacPorts] is needed to view reports. You have to download and install this separately from gramps but it's a simple click-to-install procedure. Once it's installed, the graphviz application appears in finder - applications, and running that gives a menu bar that allows the report.dot file to be opened and displayed. The command line version of graphviz, dot, documented at the graphviz website, works too. === Conclusion ===It seems that the missing packages that one may trip over when installing via MacPorts vary depending on just who has last modified all the installation scripts. There may be some; it's easy to fix by guesswork; it's odd that the computer doesn't just go ahead and fix them by itself because it sure does everything else! In fact the whole process of installing xCode and MacPorts and then gramps is an astonishing ''tour de force'' and a tribute to the good architecture of the Linux and unix software development system. But it is scary! == Glitches == There are some problems. An update of Mac OS X on about 15 May 2009 changed gramps's behaviour in several ways, too. Presumably, these changes are the results of fixing bugs in the Apple X11 implementation. After 15 May 2009, this was "XQuartz 2.1.6 (xorg-server 1.4.2-apple33)", running on Mac OS X 10.5.7. * Following the 15 May 2009 update, the font used in the gramps window is too large and too bold for convenience.* Gramps on Mac uses ctrl-x, ctrl-c, ctrl-v for cut, copy, paste. The standard for mac programs, including X11 programs, is cmd-x, cmd-c, cmd-v. Before the 15 May 2009 update, ctrl-click or right-click would allow a paste into gramps. After the 15 May 2009 update, right-click now allows paste into gramps, but the item pasted is only one copied from within gramps. For example, it is no longer possible to copy a cell from an openoffice spreadsheet and paste it into gramps in any way.* Some text pasted in - notably the contents of a cell from an Openoffice spreadsheet, but possibly other as well - has a <LF> character at the end, unexpectedly. (This can no longer be demonstrated after the 15 May 2009 update).* Double clicking an image in the media reference editor doen't bring up an external viewer to show the picture full size. In fact, there seems to be no way to do this from within gramps on Mac.* Before the 15 May 2009 update: Little popup yellow help notices notices which are supposed to appear when you hover over a button do appear, but do so even when the gramps window isn't in focus and there's a window from another application covering it up. After the 15 May 2009 update, this seems to be fixed, and popup notices only appear when the gramps window is in focus.* Switching to another user, using the OS X fast user switching feature, gramps can mess up the display on returning to the orignal user. The cure is to quit gramps and restart it.* It is not possible to start Gramps by double clicking on a Mac OS icon, nor by double clicking on a Gramps database that is associated with the application. (It should be possible to create an installation that allows this, just as it is available for OpenOffice).* The PdfDoc.py plugin cannot be installed because ReportLab is not installed.** Note, using macports, run <code> sudo port install py-reportlab </code>. This will take care of this problem. ** For fink, run <code>fink install reportlab-py25</code> (py24 or py23, for earlier versions of python).* The LPRDoc.py plugin cannot be loaded because the python bindings for GNOME print are not installed.* Spell checking does not work (on starting Gramps, an error warning "Spelling checker is not installed" appears on the xterm). The python "bindings for [GNOME print and spell checking] are probably in fink's gnome-python2-desktop-py24 and gnome-python2-extras-py24 packages. Or would be, if fink had them at all, which we don't. They are only viable for for newer versions of gnome itself than fink presently has, or have other dependencies that are not yet satisfiable within fink. We're working on it".* All ODF (ODT) output failed with a "Could not create file" error on an Gramps installed via Macports as described above, on a 'virgin' Mac. Benny Malengier forwarded the suggestion from guylinton that <code>zlib</code> should be installed: with <code> sudo port install py25-zlib </code> all ODT output jumped into action. In the past the following have been noted on Mac systems, but they worked fine when I tried them: * Help does not work (clicking Help or FAQ etc on the Help menu does nothing).* 'Enter' or 'return' does not act as OK for closing windows (the button has to be pressed with the mouse). However Esc does work to exit from the window.* The browser and email links under the help menu do nothing. ==Starting Gramps using X11==Once you have successfully installed gramps using MacPorts, you will need to make a note of where the executable is. You can do this in your terminal, by typing "which gramps" (no quotes, of course). You should make a note of this and then start X11 from the Applications folder (in my case from within the Utilities folder). Once you have an X terminal you can type the command, in my case "/opt/local/bin/gramps". If /opt/local/bin is in the PATH for X11, then you should just be able to type "gramps".
manual
389
edits

Navigation menu