homebrew-kde icon indicating copy to clipboard operation
homebrew-kde copied to clipboard

grantlee build failure

Open giovariot opened this issue 9 years ago • 2 comments

Here is the error given:

==> Installing kdevelop from adymo/kde
==> Installing dependencies for adymo/kde/kdevelop: grantlee, strigi, doc
==> Installing adymo/kde/kdevelop dependency: grantlee
==> Downloading http://www.grantlee.org/downloads/grantlee-0.5.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/grantlee-0.5.1.tar.gz
==> cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/kde4 -Wdev --trace --debug-output
==> make
==> make install
Error: Empty installation

And here is the full output

gist: https://gist.github.com/giovariot/288f7f851d884acd1169

giovariot avatar Feb 18 '16 09:02 giovariot

This seems to be because Homebrew tests for an empty installation, and it's looking in /usr/local/Cellar/grantlee/0.5.1 which only gets so-called "metafiles" like AUTHORS and README. Homebrew doesn't count these as real files, and concludes nothing was installed and errors out.

Adding a dummy file in the formula to be installed would get around this.

xevix avatar Mar 31 '16 13:03 xevix

A hackish way to do this would be to manually disable this checking functionality in Homebrew itself.

# /usr/local/Library/Homebrew/keg.rb
def empty_installation?
  # HACK: ignore "empty installations"
  return false

  Pathname.glob("#{path}/**/*") do |file|
    next if file.directory?
    basename = file.basename.to_s
    next if Metafiles.copy?(basename)
    next if %w[.DS_Store INSTALL_RECEIPT.json].include?(basename)
    return false
  end

  true
end

https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/keg.rb#L153-L163

xevix avatar Mar 31 '16 13:03 xevix