Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

(WIP) ddar: installation fixed #43358

Closed
wants to merge 1 commit into from
Closed
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
20 changes: 13 additions & 7 deletions Library/Formula/ddar.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Ddar < Formula
desc "De-duplicating archiver"
homepage "http://www.synctus.com/ddar/"
homepage "https://github.com/basak/ddar/wiki"
url "https://github.com/basak/ddar/archive/v1.0.tar.gz"
sha256 "b95a11f73aa872a75a6c2cb29d91b542233afa73a8eb00e8826633b8323c9b22"
revision 1
Expand All @@ -9,16 +9,22 @@ class Ddar < Formula

depends_on "xmltoman" => :build
depends_on :python if MacOS.version <= :snow_leopard
depends_on "protobuf" => "with-python"
depends_on "protobuf"

def install
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
ENV.prepend_path "PYTHONPATH", Language::Python.homebrew_site_packages
Copy link
Contributor

Choose a reason for hiding this comment

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

this should not be necessary; it won't help pick up protobuf because protobuf is brought in through a .pth file and pythonpath doesn't help python pick up .pths


system "make", "-f", "Makefile.prep", "pydist"
system "python", "setup.py", "install",
"--prefix=#{prefix}",
"--single-version-externally-managed",
"--record=installed.txt"
system "python", *Language::Python.setup_install_args(libexec)

bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"])
bin.install Dir[libexec/"bin/*"]
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
man1.install Dir["*.1"]
end

test do
# WIP don't merge this
system "ddar", "-h"
end
end