Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Digikam, closes #8 #9

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions digikam.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
require File.join(File.dirname(__FILE__), 'base_kde_formula')

class Digikam < BaseKdeFormula
homepage 'http://www.digikam.org/'
url 'http://download.kde.org/stable/digikam/digikam-3.5.0.tar.bz2'
sha1 '9e44fcf219312cbcbbaee0cc9a7f460a01769224'

# Ref: https://trac.macports.org/browser/trunk/dports/kde/digikam/Portfile
# Digikam and kipi-plugins dependencies
depends_on 'kdelibs'
depends_on 'kdepimlibs'
depends_on 'qt'
depends_on 'libtiff'
#depends_on 'libjpg'
depends_on 'libpng'
depends_on 'opencv'
depends_on 'marble'

# kipi-plugins dependencies
#depends_on 'expat'
depends_on 'gdk-pixbuf'
#depends_on 'libgpod'
depends_on 'libxml2'
depends_on 'libxslt'
depends_on 'qca'
depends_on 'qjson'
depends_on 'imagemagick'
depends_on 'eigen'

# Digikam dependencies
#depends_on 'boost'
#depends_on 'gettext'
depends_on 'glib'
depends_on 'lensfun'
depends_on 'libgphoto2'
depends_on 'liblqr'
depends_on 'libusb'
depends_on 'jasper'
depends_on 'shared-desktop-ontologies'
depends_on 'libraw'
depends_on 'sane-backends'

# If building with external KDEGraphics libs
#depends_on 'libkdcraw'
#depends_on 'libkexiv2'
#depends_on 'libkipi'
#depends_on 'libksane'

# Runtime dependencies
depends_on 'kde-runtime'
depends_on 'oxygen-icons'

def patches
# Build fails with 'Unknown CMake command "FLEX_TARGET".'
# Suspect missing 'hugin' package. Disable panorama plugin for now:
{:p0 => 'https://gist.github.com/tlvince/8004513/raw/b61f7213d56058e7d97f00c0bfbf9701eea03aac/disable-panorama.diff'}
end

def extra_cmake_args
[
'-DDIGIKAMSC_USE_PRIVATE_KDEGRAPHICS=on',
'-DDIGIKAMSC_COMPILE_DOC=off'
]
end

kde_build_deps
end
19 changes: 19 additions & 0 deletions marble.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require File.join(File.dirname(__FILE__), 'base_kde_formula')

class Marble < BaseKdeFormula
homepage 'http://marble.kde.org/'
url 'http://download.kde.org/stable/4.11.4/src/marble-4.11.4.tar.xz'
sha1 '7569630e8b2fdaafb2fdf6da79aa165ead17e842'

def patches
# Preserve CMake files (needed by Digikam)
{:p0 => 'https://gist.github.com/tlvince/7960812/raw/f96e2f2d1a681c6329da9fc9ac3dbf6c18577b0a/marble-homebrew-cmakelists.diff'}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preserving CMake files seems like a useful addition to homebrew itself.
could this patch be turn into a generic helper?

end

def extra_cmake_args
# Prevent 'marble-qt.app' from being installed in '/usr/local'
"-DCMAKE_INSTALL_PREFIX=#{prefix}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, BaseKdeFormulate sets an install prefix already.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does and defaults to /usr/local. This puts it in $(brew --prefix)/Cellar/marble/x.x.x.

Also note in Marble's INSTALL file:

  1. Known Issues:
  • If you don't specify any install path using cmake then Marble will probably install under /usr/local.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prefix makes linking fail:
Warning: Could not link marble. Unlinking...
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local

I personally would rather install to /usr/local for now. Is there anything wrong with marble-qt app?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KDE apps can't be all sandboxed into their own separate folder.
but I'd be happy to learn that I am wrong on this.
in which case, you would probably take it out from BaseKdeFormula, or not use it at all....
instead of reimplementing homebrew's default in this recipe

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marble is currently creating two .app files: marble-qt.app and marble.app. As I posted on marble-devel, I think this is a bug as neither run independently; if I manually move the contents of marble-qt.app into marble.app, it runs fine. We might consider scripting it in a post-install hook, like Macports.

end

kde_build_deps
end