Difference between revisions of "Scribus and Homebrew"

From Scribus Wiki
Jump to: navigation, search
m (Formula: removed DEPRECATED Cmake flags)
(Formula Options)
Line 122: Line 122:
:: '''cmake''': <code>"-DWANT_SCRIPTER2=1"</code>
:: '''cmake''': <code>"-DWANT_SCRIPTER2=1"</code>
* Debugging. If you want to debug the compile process add this to cmake  
* Debugging. If you want to debug the compile process add this to cmake  
:: '''cmake''': <code>-DWANT_DEBUG=1</code> for Dev build
:: '''cmake''': <code>"-DWANT_DEBUG=1"</code> for Dev build
=== Command Line ===
=== Command Line ===

Revision as of 19:57, 11 June 2014

Announcement: Extremely Experimental OSX Build
Updated 2014/06/11 Any feedback contact: scribus dot user at gmail dot com


Homebrew is a MacOSX Package Manager. Currently it is the younger of the Package Managers available. Other package managers include:


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/ and symlinking it to ~/Applications
  6. rejoice


  • (OSX 10.8) an updated zlib package installed as dependency through Homebrew (addressed through the Homebrew Formula below)
  • 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)



This formula will install the most basic dependencies (libraries) that Homebrew needs to compile (see below 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. CRITICAL NOTE:

  1. You'll need to download Qt from URL mentioned above
  2. install into ~/Qt (~ means home directory, i.e. /Users/<name of you computer>/Qt)
  3. then on your cmake line add something like this:
x.y.z indicates the version of Qt

Note: OSX 10.6 is for sure not supported because Qt5 will not install on it


Warning Warning: The following Homebrew formula is extremely experimental (and unstable). Should only be used for testing bleeding edge builds. Not recommended to be used for production purposes. The formula is subject to change and may actually be out of date. In fact it's just here for educational purposes. To use the most up-to-date forumla refer to the instructions below
require 'formula'
  class ScribusDev < Formula
  head 'svn://scribus.net//trunk/Scribus', :using => :svn
  depends_on 'cmake' => :build
  depends_on 'little-cms2'
  # Install Qt5 beforehand and link to it via CMAKE below
  # depends_on 'qt5'
  depends_on 'cairo'
  depends_on 'jpeg'
  depends_on 'libtiff'
  depends_on 'libart'
  depends_on 'fontconfig'
  depends_on 'openssl'
  depends_on 'pkg-config' => :build
  depends_on 'python'
  depends_on 'hunspell'
  # zlib on 10.8.5 is not up to date enough hence the following:
  depends_on 'homebrew/dupes/zlib'
  depends_on 'ghostscript' => :recommended
  depends_on 'graphicsmagick' => :recommended
  depends_on 'boost' => :recommended
  # depends_on 'podofo' => :recommended
  def install
    system "cmake",
                    # Change ~/Qt/x.y.z/clang_64 based on what version Qt you have installed
                    # "-DWANT_SCRIPTER2=1",
    system "make"
    system "make install"

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'
  • 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

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 with:

  1. Install this temporary patched podofo forumla (based on this issue) brew install https://raw.github.com/MeckiCologne/homebrew/804f42d170ba3a61a124a69c72e3a312e47c4e88/Library/Formula/podofo.rb
  2. brew install -v --HEAD https://gist.githubusercontent.com/luzpaz/9042115/raw/scribus-dev.rb
  3. brew linkapps symbolically linking to /Applications folder


Ordered by priority

  • Clean up formula, does it really need some of the deps like depends_on 'pkg-config' => :build ?
  • Add Homebrew formula jargon to choose optional dependencies at compile time
  • Fix the formula to use home directory (~) instead of current /Users/YourUserName/
  • Mac OS X v10.8 (Mountain Lion) option to compile with Python v3 (in order to use Scripter2(?) FIX: Add "-DWANT_SCRIPTER2=1" to Cmake
  • Circumvent compiling for Mac OS X users by creating a homebrew-cask to distribute the binary directly. (Done)
  • Mac OS X v10.9 (Mavericks) needs someone to test it (Patrice tested on 10.9.2) + add python 3 functionality
  • Mac OS X v10.7 (Lion): need someone to test this + add python 3 functionality
  • Consider submitting bleeding edge nightly to Homebrew or just turn into a gist through Scribus's official Github account
  • Create a stable formula and submit to Homebrew (1.4.x uses Qt4 framework) <-- probably not going to happen


  • freenode #scribus MrB, s_uv, a-l-e
  • freenode #machomebrew mistym and durka42



Still trying to understand Homebrew's formula syntax based on Homebrew Example Formula

  # The optional devel block is only executed if the user passes `--devel`.
  # Use this to specify a not-yet-released version of a software.
  devel do
   url 'https://example.com/archive-2.0-beta.tar.gz'
   sha1 '1234567890123456789012345678901234567890'
  • Good example of the complex formula Git