Scribus and Homebrew

From Scribus Wiki
(Redirected from Homebrew)
Jump to: navigation, search
Announcement: Extremely Experimental OSX Build
Updated 2014/10/01
Any feedback contact: kundaatscribusdotnet
Please follow exact instructions for successful results

Background

Homebrew is a MacOSX Package Manager. Currently it is the younger of the Package Managers available[1][2].

We utilize the brew tap (link) feature which allows one to add Scribus's official Github repo to the list of formulae that homebrew tracks, updates and installs from.

Goal

Essentially by using Homebrew, one can automatically:

  1. download the source code directly from the SVN
  2. download the dependencies Scribus needs to compile
  3. run the compiler on the source with the appropriate flags
  4. generate the Scribus executable
  5. install Scribus executable by placing it in /usr/local/Cellar/
  6. rejoice


Prerequisites

  • Make note where you install this because you will need to specify it in the formula below unless it's placed in ~/Qt/5.x.x/
  • Python (>=v2.7) (could possibly work with 2.6 not sure)
  • The Cairo dependency may require installing xQuartz (from http://xquartz.macosforge.org/landing/) if you haven't already (Inkscape & Synfig require it)


Dependencies

v1.5.0svn

Note: OSX 10.6 is for sure not supported because Qt5 will not install on it
This formula will install the most basic dependencies (libraries) that Homebrew needs to compile (see Formula Options for adding optional dependencies that offer extended functionality). Then it will connect to the SVN and pull whatever the most current source of the Scribus trunk is hence it will build an unstable 1.5.0 release not to be used in a production environment.

List of 1.5svn depenedencies

List of dependencies generated from either---->
brew tap scribusproject/scribus; brew deps scribus;
or
brew deps https://raw.githubusercontent.com/scribusproject/homebrew-scribus/master/scribus.rb

 boost
 cairo
 cmake
 fontconfig
 freetype
 gdbm
 gettext
 ghostscript
 glib
 gobject-introspection
 graphicsmagick
 homebrew/dupes/zlib
 hunspell
 icu4c
 intltool
 jbig2dec
 jpeg
 libffi
 libgsf
 libmspub
 libpng
 librevenge
 libtiff
 libtool
 libvisio
 libwpd
 libwpg
 little-cms2
 makedepend
 openjpeg
 openssl
 pixman
 pkg-config
 podofo
 poppler
 python
 python
 qt5
 readline
 sqlite
 xz


Formula

Warning Warning: The Homebrew formula is extremely experimental (and unstable). Should only be used for testing bleeding edge builds.

Not recommended to be used for production purposes. Scribus core-devs will not support any questions regarding Homebrew.

Please direct questions to the 'Announcement' email at the top of this wiki page

To view the formula type in the CLI (or use your browser):
brew cat https://raw.githubusercontent.com/scribusproject/homebrew-scribus/master/scribus.rb

Formula Options

These need to be added in to brew formula as options at compile time: ---->

  • PoDoFo (highly recommended) is a library to work with the PDF file format and includes also a few tools.
homebrew: depends_on 'podofo'
cmake: "-DWITH_PODOFO=1" Enable support for PDF embedded in AI import
  • Boost (recommended) is a set of C++ libraries
homebrew: depends_on 'boost'
cmake: "-D?????=1" (Incomplete here)
  • Ghostscript (highly recommended) an interpreter for the PostScript language and for PDF.
homebrew: depends_on 'ghostscript'
  • GraphicsMagick (recommended) to install for ...
homebrew: depends_on 'graphicsmagick'
cmake: "-DWANT_GRAPHICSMAGICK=1'"
  • Hunspell
cmake: "-DWANT_HUNSPELL=1"
  • Scripter2 (experimental and may crash) experimental next gen scribus python script interpreter
cmake: "-DWANT_SCRIPTER2=1"
  • Debugging. If you want to debug the compile process add this to cmake
cmake: "-DWANT_DEBUG=1" for Dev build
  • To show the revision in about.cpp
cmake: "-DWANT_SVNVERSION=1




Invoke from Command Line

Warning Warning: The following Homebrew formula for Scribus development snapshop testing is extremely experimental (and unstable). Use at your own risk for production purposes. The formula is subject to change.

Invoke from the CLI with:

  1. brew tap scribusproject/scribus
    This tells brew to find the official scribusproject/homebrew-scribus repo formula(s) AND from now on check the repo formula for updates everytime brew update is invoked
  2. brew install --HEAD scribus --verbose
    Executes an install by running
    1. svn switch svn://scribus.net//trunk/Scribus /Library/Caches/Homebrew/scribus--svn-HEAD
    2. svn up --force /Library/Caches/Homebrew/scribus--svn-HEAD
    3. Build the code with cmake
  3. ln -s /usr/local/Cellar/scribus/HEAD/Scribus.app/Contents/MacOS/Scribus /Applications/Scribus\(Homebrew-Dev\).app
    (1st time only) Symbolically link build to /Applications folder as Scribus(Homebrew-Dev).app

Notes:

Function Command Line for Homebrew
To Reinstall (uninstall + install) brew update && brew upgrade;
brew reinstall --HEAD scribus --verbose
To Uninstall brew uninstall scribus
Build without boost support [3] --without-boost
Build without freetype support --without-freetype
Build without ghostscript support --without-ghostscript
Build without graphicsmagick support --without-graphicsmagick
Build without libmspub support --without-libmspub
Build without librevenge support --without-librevenge
Build without libvisio support --without-libvisio
Build without libwpg support --without-libwpg
Build without podofo support --without-podofo
Build without poppler support --without-poppler

Problems

Problem Solution
Quickly upload all log files to a GitHub gist brew gist-logs scribus

Note: If your installation fails then collect log files to the email in the announcement at the top of the page or via:



Debugging Scribus with gdb (GNU Debugger)

In order for us to troubleshoot Scribus problems on MacOS X we need to install the GNU Debugger and invoke Scribus within it. This will generate a backtrace that we can Submit to the BugTracker
Note: The file paths used below assume that you installed via Homebrew Package Manager[4] and [5].

  • Install gdb via: brew install gdb
  • gdb requires that a signed certificate be made
codesign -s gdb-cert /usr/local/Cellar/gdb/7.7.1/bin/gdb
  • Invoke Scribus through gdb with: gdb /usr/local/Cellar/scribus/HEAD/scribus.app/Contents/MacOS/Scribus
  • What are the commands that need to be used?
bt = backtrace
run = run the program


ToDo

Moved to GitHub

Acknowledgements

  • freenode #scribus MrB, s_uv, a-l-e, jghali
  • freenode #machomebrew mistym, durka42, Argon]

References

  1. Fink. See compile Scribus on OSX using Fink
  2. Macports See compile Scribus on OSX using Macports.
  3. Generated from brew info scribus
  4. http://blog.panks.me/posts/2013/11/install-gdb-on-os-x-mavericks-from-source/
  5. http://www-scf.usc.edu/~csci104/installation/gccmac.html

Related