adymo / homebrew-kde

Homebrew tap with some KDE packages. For now contains KDevelop and Kate
BSD 2-Clause "Simplified" License
106 stars 33 forks source link

grantlee build failure #72

Open giovariot opened 8 years ago

giovariot commented 8 years ago

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

xevix commented 8 years ago

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 commented 8 years ago

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