├── tap_migrations.json ├── hfdisk.rb ├── jhove2.rb ├── fidget.rb ├── disc-image-creator.rb ├── percipio.rb ├── redumper.rb ├── avi-metaedit.rb ├── droid.rb ├── jhove.rb ├── meta-extractor.rb ├── fluxengine.rb ├── jwattools.rb ├── edccchk.rb ├── siegfried.rb ├── README.md ├── greaseweazle.rb ├── fido.rb └── ld-decode.rb /tap_migrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "dvanalyzer": "homebrew/core" 3 | } 4 | -------------------------------------------------------------------------------- /hfdisk.rb: -------------------------------------------------------------------------------- 1 | class Hfdisk < Formula 2 | desc "Classic Mac disk partitioning tool" 3 | homepage "http://www.codesrc.com/gitweb/index.cgi?p=hfdisk.git;a=summary" 4 | head "git://www.codesrc.com/git/hfdisk.git" 5 | 6 | def install 7 | system "make" 8 | bin.install "hfdisk" 9 | man8.install "hfdisk.8" 10 | end 11 | 12 | test do 13 | assert_equal(shell_output("#{bin}/hfdisk --version"), "version 1.0-rc3 (28 May 2014)\n") 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /jhove2.rb: -------------------------------------------------------------------------------- 1 | class Jhove2 < Formula 2 | homepage "https://bitbucket.org/jhove2/main/wiki/Home" 3 | url "http://bitbucket.org/jhove2/main/downloads/jhove2-2.1.0.tar.gz" 4 | sha256 "d5036b76775b4c25d38c611f523010d65e426a70c809a04e7059b113ccd92087" 5 | 6 | def install 7 | inreplace "jhove2.sh" do |s| 8 | s.change_make_var! "ProgDir", libexec 9 | end 10 | libexec.install Dir["*"] 11 | (bin/"jhove2").make_relative_symlink libexec/"jhove2.sh" 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /fidget.rb: -------------------------------------------------------------------------------- 1 | class Fidget < Formula 2 | homepage "https://github.com/openplanets/format-corpus" 3 | url "https://github.com/downloads/openplanets/format-corpus/fidget-0.0.3-SNAPSHOT-bin-unix.tar.gz" 4 | version "0.0.3-snapshot" 5 | sha256 "f118a2a204e0f2ed9a9df139614c1dc9973724e8eddee910a12008cfa214051a" 6 | 7 | def install 8 | inreplace "bin/fidget" do |s| 9 | s.change_make_var! "BASEDIR", libexec 10 | end 11 | bin.install "bin/fidget" 12 | (libexec/"lib").install Dir["lib/*"] 13 | end 14 | 15 | def test 16 | system "#{bin}/fidget --help" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /disc-image-creator.rb: -------------------------------------------------------------------------------- 1 | class DiscImageCreator < Formula 2 | desc "Low-level optical disc archiving tool" 3 | homepage "https://github.com/saramibreak/DiscImageCreator" 4 | url "https://github.com/user-attachments/files/17211442/DiscImageCreator_20241001.zip" 5 | sha256 "8bec694331f9faa546880631d3f675d92d56b5f27d4bfcb1252656b0c31db953" 6 | license "Apache-2.0" 7 | 8 | def install 9 | libexec.install Dir["*"] 10 | bin.write_exec_script libexec/"DiscImageCreator" 11 | end 12 | 13 | test do 14 | assert_match /#{version}/, shell_output("#{bin}/DiscImageCreator /v") 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /percipio.rb: -------------------------------------------------------------------------------- 1 | class Percipio < Formula 2 | homepage "https://github.com/anjackson/percipio" 3 | url "https://github.com/downloads/anjackson/percipio/percipio-0.0.2-SNAPSHOT-jar-with-dependencies.jar", 4 | :using => :nounzip 5 | version "0.0.2-snapshot-20121116" 6 | sha256 "8df3fdd01cfb549ed97e979ee86e94846d36ef38511859e5b363ccab1ff3fc7c" 7 | 8 | def install 9 | libexec.install "percipio-0.0.2-SNAPSHOT-jar-with-dependencies.jar" => "percipio.jar" 10 | bin.write_jar_script libexec/"percipio.jar", "percipio" 11 | end 12 | 13 | def test 14 | system "#{bin}/percipio" 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /redumper.rb: -------------------------------------------------------------------------------- 1 | class Redumper < Formula 2 | desc "Low level CD dumper utility" 3 | homepage "https://github.com/superg/redumper" 4 | # From-source build currently requires a newer clang than Apple ships 5 | url "https://github.com/superg/redumper/releases/download/b662/redumper-b662-macos-arm64.zip" 6 | version "662" 7 | sha256 "12b33c0e2dede48b21a742a39fefe89b30fc415278a2111e92a3e4c438baf8ce" 8 | license "GPL-3.0-only" 9 | 10 | def install 11 | # Bundles a libc++ in lib, which we want to avoid making public 12 | libexec.install Dir["*"] 13 | bin.install_symlink libexec/"bin/redumper" 14 | end 15 | 16 | test do 17 | assert_match(/build_#{version}/, shell_output("#{bin}/redumper --version")) 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /avi-metaedit.rb: -------------------------------------------------------------------------------- 1 | class AviMetaedit < Formula 2 | homepage "https://github.com/usnationalarchives/AVI-MetaEdit" 3 | url "https://github.com/mistydemeo/AVI-MetaEdit/tarball/1.0.0" 4 | sha256 "cfc2d135a4b58108fdf0de9f8ba3b581e5c9f5a50fa891e87c745d3b8bd46af6" 5 | 6 | depends_on "autoconf" => :build 7 | depends_on "automake" => :build 8 | 9 | def install 10 | cd "Project/GNU/CLI" do 11 | # autogen is missing a shebang 12 | system "/bin/sh", "autogen" 13 | 14 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 15 | "--prefix=#{prefix}" 16 | system "make", "install" 17 | end 18 | end 19 | 20 | def test 21 | system "#{bin}/avimetaedit" 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /droid.rb: -------------------------------------------------------------------------------- 1 | class Droid < Formula 2 | desc "Java-based PRONOM file identification tool" 3 | homepage "http://digital-preservation.github.com/droid/" 4 | url "http://www.nationalarchives.gov.uk/documents/information-management/droid-binary-6.4-bin.zip" 5 | sha256 "9dd6289c1f03d8a9d628ab0127954e05acf4aa2f5f7d606b8a1b78996a98b815" 6 | 7 | def install 8 | libexec.install Dir["*.jar"] 9 | libexec.install "lib" 10 | inreplace "droid.sh" do |s| 11 | s.gsub! "$DROID_HOME/droid-command-line-6.4.jar", "#{libexec}/droid-command-line-6.4.jar" 12 | s.gsub! "$DROID_HOME/droid-ui-6.4.jar", "#{libexec}/droid-ui-6.4.jar" 13 | end 14 | bin.install "droid.sh" => "droid" 15 | end 16 | 17 | test do 18 | assert_equal "6.4", shell_output("#{bin}/droid --version").chomp 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /jhove.rb: -------------------------------------------------------------------------------- 1 | class Jhove < Formula 2 | homepage "http://jhove.openpreservation.org/" 3 | url "https://github.com/openpreserve/jhove/releases/download/v1.11/jhove-1_11.tar.gz" 4 | sha256 "c8099da227f5c48da8b45c41b0528054fbb9dd7545c33dd5bbf19c31281df614" 5 | 6 | def install 7 | inreplace "conf/jhove.conf", "/users/stephen/projects/jhove", libexec 8 | inreplace "jhove.tmpl" do |s| 9 | s.change_make_var! "JHOVE_HOME", libexec 10 | s.change_make_var! "JAVA_HOME", "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" 11 | s.gsub! "${JHOVE_HOME}/bin/", "${JHOVE_HOME}/" 12 | end 13 | 14 | bin.install "jhove.tmpl" => "jhove" 15 | libexec.install Dir["bin/*.jar"] 16 | libexec.install "conf" 17 | end 18 | 19 | test do 20 | system "#{bin}/jhove" 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /meta-extractor.rb: -------------------------------------------------------------------------------- 1 | class MetaExtractor < Formula 2 | homepage "http://meta-extractor.sourceforge.net/" 3 | url "http://downloads.sourceforge.net/project/meta-extractor/meta-extractor/3.5GA/meta-extractor-bin-3-5GA.tar.gz" 4 | version "3.5GA" 5 | sha256 "600383a58ddec94ad45902638328f01db086eef054cf1d52679d41b949e152ad" 6 | 7 | def install 8 | %w[metadata.sh extract.sh].each do |file| 9 | inreplace file do |s| 10 | # yeah, Windows line endings in a bash script :( 11 | s.gsub! /\r\n/, "\n" 12 | s.gsub! "$JAVA_HOME", "/usr" 13 | s.gsub! '$(cd -P -- "$(dirname -- "$0")" && pwd -P)', libexec 14 | end 15 | end 16 | 17 | bin.install "extract.sh" => "extract" 18 | bin.install "metadata.sh" => "metadata" 19 | libexec.install Dir['*'] 20 | end 21 | 22 | def test 23 | system "#{bin}/extract" 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /fluxengine.rb: -------------------------------------------------------------------------------- 1 | class Fluxengine < Formula 2 | desc "PSOC5 floppy disk imaging interface" 3 | homepage "https://github.com/davidgiven/fluxengine" 4 | url "https://github.com/davidgiven/fluxengine.git", revision: "9ce405cec50ded5f64774d2448d9438a7e20b713" 5 | version "2024-11-24" 6 | license "MIT" 7 | head "https://github.com/davidgiven/fluxengine.git" 8 | 9 | depends_on "coreutils" => :build 10 | depends_on "make" => :build 11 | depends_on "ninja" => :build 12 | depends_on "pkg-config" => :build 13 | depends_on "abseil" 14 | depends_on "fmt" 15 | depends_on "protobuf" 16 | depends_on "sqlite3" 17 | depends_on "zlib" 18 | 19 | def install 20 | system "#{Formula["make"].opt_bin}/gmake", "fluxengine" 21 | bin.install "fluxengine" 22 | end 23 | 24 | test do 25 | assert_match("fluxengine: syntax", shell_output("#{bin}/fluxengine")) 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /jwattools.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Some inspiration taken from here: 3 | # https://github.com/mxcl/homebrew/blob/master/Library/Formula/jruby.rb 4 | # 5 | # Awkward as JWAT-Tools relies on an additional helper script to set up the 6 | # classpath. Will look at simplifying this. 7 | # 8 | 9 | class Jwattools < Formula 10 | homepage "https://sbforge.org/display/JWAT/JWAT-Tools" 11 | url "https://bitbucket.org/nclarkekb/jwat-tools/downloads/jwat-tools-0.5.6-SNAPSHOT.zip" 12 | version "0.5.6-SNAPSHOT" 13 | sha256 "36949ed3e80313b258d9ac4ced000177b70a0c35fb44343600c6c13fb52865d5" 14 | 15 | def install 16 | mv "jwattools.sh", "jwattools" 17 | libexec.install Dir['*'] 18 | bin.install_symlink "#{libexec}/jwattools" 19 | bin.install_symlink "#{libexec}/env.sh" 20 | end 21 | 22 | test do 23 | # Simple test that checks that the classpath loading worked correctly. 24 | system "#{bin}/jwattools", "help", "test" 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /edccchk.rb: -------------------------------------------------------------------------------- 1 | class Edccchk < Formula 2 | desc "EDC/ECC checker for RAW (2352 bytes/sector) CD images" 3 | homepage "https://github.com/claunia/edccchk" 4 | url "https://github.com/claunia/edccchk/archive/refs/tags/v1.27.tar.gz" 5 | sha256 "6546ea1b760541d71acb1c9b8042a168c9088249b4cdd2f854c63aaaf658f629" 6 | license "GPL-3.0-only" 7 | 8 | # Necessary to build with clang 9 | # https://github.com/claunia/edccchk/pull/2 10 | patch do 11 | url "https://github.com/claunia/edccchk/commit/199a6f910de370581aa7a87ad5d0cbde53a1eb7f.patch?full_index=1" 12 | sha256 "df42f6e6b51a14a46eb0ebc74d9a14d4a832ef44e96cb355025a2a81ffb2e5ec" 13 | end 14 | 15 | def install 16 | system "make" 17 | bin.install "edccchk" 18 | end 19 | 20 | test do 21 | # Produce a 2352-byte pseudo disc image 22 | (testpath/"data.img").open("w") do |f| 23 | data = ([0] * 294).pack("C*") 24 | 8.times do 25 | f.write(data) 26 | end 27 | end 28 | 29 | assert_match("Non-data sectors........ 1", shell_output("#{bin}/edccchk #{testpath}/data.img")) 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /siegfried.rb: -------------------------------------------------------------------------------- 1 | require "language/go" 2 | require "yaml" 3 | 4 | class Siegfried < Formula 5 | desc "Fast PRONOM-based file identification tool" 6 | homepage "http://www.itforarchivists.com/siegfried" 7 | url "https://github.com/richardlehane/siegfried/archive/v1.4.5.tar.gz" 8 | sha256 "7d32f523e2697f32fc3e9e8d61d3174e26edb86280ef26bbc1d09a930382c8c7" 9 | head "https://github.com/richardlehane/siegfried.git", :branch => "develop" 10 | 11 | depends_on "go" => :build 12 | 13 | def install 14 | # Avoid installing signature files into the user's home directory; 15 | # install them into share instead. 16 | inreplace "config/brew.go", "/usr/share/siegfried", share/"siegfried" 17 | 18 | mkdir_p buildpath/"src/github.com/richardlehane" 19 | ln_s buildpath, buildpath/"src/github.com/richardlehane/siegfried" 20 | 21 | ENV["GOPATH"] = buildpath 22 | 23 | system "go", "build", "-tags", "brew", 24 | "github.com/richardlehane/siegfried/cmd/sf" 25 | system "go", "build", "-tags", "brew", 26 | "github.com/richardlehane/siegfried/cmd/roy" 27 | 28 | bin.install "sf", "roy" 29 | (share/"siegfried").install Dir["src/github.com/richardlehane/siegfried/cmd/roy/data/*"] 30 | end 31 | 32 | test do 33 | results = YAML.load_documents `"#{bin}/sf" "#{test_fixtures("test.jpg")}"` 34 | assert_equal version.to_s, results[0]["siegfried"] 35 | assert_equal "fmt/43", results[1]["matches"][0]["puid"] 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | homebrew-digipres 2 | ================= 3 | 4 | This is a set of [homebrew](http://mxcl.github.com/homebrew) formulae for digital preservation 5 | tools. 6 | 7 | To install, you first need to: `brew tap mistydemeo/digipres` 8 | 9 | Contributing 10 | ------------ 11 | 12 | * Fork this repository on Github 13 | * Create a new local branch (`git checkout -b mybranch`) 14 | * `brew edit` the formula, or `brew create` a new one and place it in the repository in /usr/local/Library/Taps/mistydemeo-digipres 15 | * `git add` your file, then `git commit` with a descriptive commit message 16 | * `git push` your local branch to Github 17 | * Submit a pull request 18 | 19 | And I'll merge it! Thanks! 20 | 21 | Available tools 22 | --------------- 23 | 24 | ### [avi-metaedit](https://github.com/usnationalarchives/AVI-MetaEdit) 25 | 26 | AVI metadata editing tool from NARA. 27 | 28 | ### [DROID](http://digital-preservation.github.com/droid/) 29 | 30 | File identification tool from the National Archives (UK), based on information from PRONOM. 31 | 32 | ### [dvanalyzer](http://www.avpreserve.com/dvanalyzer/) 33 | 34 | Tool for analyzing the properties of captured DV video. 35 | 36 | ### [fidget](https://github.com/openplanets/format-corpus) 37 | 38 | Tool for creation of new file identification signatures, from Open Planets. 39 | 40 | ### [JHOVE](http://jhove.sourceforge.net/) 41 | 42 | JSTOR/Harvard Object Validation Environment, intended to identify and validate the correctness 43 | of digital objects. 44 | 45 | ### [JHOVE2](https://bitbucket.org/jhove2/main/wiki/Home) 46 | 47 | Next-generation version of JHOVE. 48 | 49 | ### [Metadata Extraction Tool](http://meta-extractor.sourceforge.net/) 50 | 51 | Metadata extraction tool developed by the National Library of New Zealand. 52 | 53 | ### [percipio](https://github.com/anjackson/percipio) 54 | 55 | "Yet another file identification tool", with the ability to refine its own file signatures 56 | through scanning known-good files. 57 | 58 | ### [siegfried](http://www.itforarchivists.com/siegfried) 59 | 60 | PRONOM signature-based identification tool. 61 | 62 | -------------------------------------------------------------------------------- /greaseweazle.rb: -------------------------------------------------------------------------------- 1 | class Greaseweazle < Formula 2 | include Language::Python::Virtualenv 3 | 4 | desc "Tools for accessing a floppy drive at the raw flux level" 5 | homepage "https://github.com/keirf/greaseweazle" 6 | url "https://github.com/keirf/greaseweazle/releases/download/v1.4/greaseweazle-1.4.zip" 7 | sha256 "e9748d3f4a687579485093ad0732d570da9e242bda5bc600a1c10df46f9f9d2d" 8 | license "Unlicense" 9 | 10 | depends_on "python@3.10" 11 | 12 | resource "crcmod" do 13 | url "https://downloads.sourceforge.net/project/crcmod/crcmod/crcmod-1.7/crcmod-1.7.tar.gz" 14 | sha256 "dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e" 15 | end 16 | 17 | resource "bitarray" do 18 | url "https://files.pythonhosted.org/packages/f6/a7/d9c9bb5b029faf4a1df9db638de7b2d8092cb57e2707e59657043a049b79/bitarray-2.5.1.tar.gz" 19 | sha256 "8d38f60751008099a659d5acfb35ef4150183effd5b2bfa6c10199270ddf4c9c" 20 | end 21 | 22 | resource "pyserial" do 23 | url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" 24 | sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" 25 | end 26 | 27 | resource "requests" do 28 | url "https://files.pythonhosted.org/packages/60/f3/26ff3767f099b73e0efa138a9998da67890793bfa475d8278f84a30fec77/requests-2.27.1.tar.gz" 29 | sha256 "68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61" 30 | end 31 | 32 | resource "urllib3" do 33 | url "https://files.pythonhosted.org/packages/1b/a5/4eab74853625505725cefdf168f48661b2cd04e7843ab836f3f63abf81da/urllib3-1.26.9.tar.gz" 34 | sha256 "aabaf16477806a5e1dd19aa41f8c2b7950dd3c746362d7e3223dbe6de6ac448e" 35 | end 36 | 37 | resource "charset-normalizer" do 38 | url "https://files.pythonhosted.org/packages/56/31/7bcaf657fafb3c6db8c787a865434290b726653c912085fbd371e9b92e1c/charset-normalizer-2.0.12.tar.gz" 39 | sha256 "2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597" 40 | end 41 | 42 | resource "certifi" do 43 | url "https://files.pythonhosted.org/packages/07/10/75277f313d13a2b74fc56e29239d5c840c2bf09f17bf25c02b35558812c6/certifi-2022.5.18.1.tar.gz" 44 | sha256 "9c5705e395cd70084351dd8ad5c41e65655e08ce46f2ec9cf6c2c08390f71eb7" 45 | end 46 | 47 | resource "idna" do 48 | url "https://files.pythonhosted.org/packages/62/08/e3fc7c8161090f742f504f40b1bccbfc544d4a4e09eb774bf40aafce5436/idna-3.3.tar.gz" 49 | sha256 "9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" 50 | end 51 | 52 | def install 53 | virtualenv_install_with_resources 54 | end 55 | 56 | test do 57 | assert_match("Usage: #{bin}/gw", shell_output("#{bin}/gw --help 2>&1", 1)) 58 | end 59 | end 60 | -------------------------------------------------------------------------------- /fido.rb: -------------------------------------------------------------------------------- 1 | class Fido < Formula 2 | include Language::Python::Virtualenv 3 | 4 | desc "Python command-line tool to identify the file formats of digital objects" 5 | homepage "https://github.com/openplanets/fido" 6 | url "https://files.pythonhosted.org/packages/26/34/7b997b3ba504d7ddb82007cda9cce37dc38db05ab58ba733a2eecd44cd60/opf-fido-1.6.1.tar.gz" 7 | sha256 "b601650af4adca0b9d05274c39505f4c592cf868598aa09ad21857f70ceda795" 8 | 9 | head "https://github.com/openplanets/fido.git" 10 | 11 | depends_on "python@3.11" 12 | 13 | resource "certifi" do 14 | url "https://files.pythonhosted.org/packages/37/f7/2b1b0ec44fdc30a3d31dfebe52226be9ddc40cd6c0f34ffc8923ba423b69/certifi-2022.12.7.tar.gz" 15 | sha256 "35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3" 16 | end 17 | 18 | resource "charset-normalizer" do 19 | url "https://files.pythonhosted.org/packages/a1/34/44964211e5410b051e4b8d2869c470ae8a68ae274953b1c7de6d98bbcf94/charset-normalizer-2.1.1.tar.gz" 20 | sha256 "5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845" 21 | end 22 | 23 | resource "idna" do 24 | url "https://files.pythonhosted.org/packages/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438/idna-3.4.tar.gz" 25 | sha256 "814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4" 26 | end 27 | 28 | resource "importlib-resources" do 29 | url "https://files.pythonhosted.org/packages/1c/c8/cfc6ae38e378be60925f121cce01e7f4996dc3aca424799a693e48c9ce4d/importlib_resources-5.10.1.tar.gz" 30 | sha256 "32bb095bda29741f6ef0e5278c42df98d135391bee5f932841efc0041f748dc3" 31 | end 32 | 33 | resource "olefile" do 34 | url "https://files.pythonhosted.org/packages/34/81/e1ac43c6b45b4c5f8d9352396a14144bba52c8fec72a80f425f6a4d653ad/olefile-0.46.zip" 35 | sha256 "133b031eaf8fd2c9399b78b8bc5b8fcbe4c31e85295749bb17a87cba8f3c3964" 36 | end 37 | 38 | resource "requests" do 39 | url "https://files.pythonhosted.org/packages/a5/61/a867851fd5ab77277495a8709ddda0861b28163c4613b011bc00228cc724/requests-2.28.1.tar.gz" 40 | sha256 "7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983" 41 | end 42 | 43 | resource "six" do 44 | url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" 45 | sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" 46 | end 47 | 48 | resource "urllib3" do 49 | url "https://files.pythonhosted.org/packages/c2/51/32da03cf19d17d46cce5c731967bf58de9bd71db3a379932f53b094deda4/urllib3-1.26.13.tar.gz" 50 | sha256 "c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8" 51 | end 52 | 53 | def install 54 | virtualenv_install_with_resources 55 | end 56 | 57 | test do 58 | system "#{bin}/fido", "-v" 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /ld-decode.rb: -------------------------------------------------------------------------------- 1 | require "language/python" 2 | 3 | class LdDecode < Formula 4 | include Language::Python::Virtualenv 5 | 6 | desc "Software defined LaserDisc decoder" 7 | homepage "https://github.com/happycube/ld-decode" 8 | url "https://github.com/happycube/ld-decode/archive/rev6.tar.gz" 9 | version "6.0" 10 | sha256 "9a861020ae50bf9ad6a4da2cf61d33e6b4f03ec8790308b45d6b9b0667671095" 11 | head "https://github.com/happycube/ld-decode.git" 12 | 13 | depends_on "ffmpeg" 14 | depends_on "fftw" 15 | depends_on "llvm@8" # newest version supported by llvmlite 16 | depends_on "numpy" 17 | depends_on "openssl@1.1" 18 | depends_on "python@3.8" 19 | depends_on "qt" 20 | depends_on "qwt" 21 | depends_on "scipy" 22 | 23 | # matplotlib 24 | resource "cycler" do 25 | url "https://files.pythonhosted.org/packages/c2/4b/137dea450d6e1e3d474e1d873cd1d4f7d3beed7e0dc973b06e8e10d32488/cycler-0.10.0.tar.gz" 26 | sha256 "cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8" 27 | end 28 | 29 | # matplotlib 30 | resource "kiwisolver" do 31 | url "https://files.pythonhosted.org/packages/62/b8/db619d97819afb52a3ff5ff6ad3f7de408cc83a8ec2dfb31a1731c0a97c2/kiwisolver-1.2.0.tar.gz" 32 | sha256 "247800260cd38160c362d211dcaf4ed0f7816afb5efe56544748b21d6ad6d17f" 33 | end 34 | 35 | # matplotlib 36 | resource "pyparsing" do 37 | url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" 38 | sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" 39 | end 40 | 41 | # matplotlib 42 | resource "python-dateutil" do 43 | url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" 44 | sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" 45 | end 46 | 47 | # matplotlib 48 | resource "six" do 49 | url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" 50 | sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" 51 | end 52 | 53 | # numba 54 | resource "llvmlite" do 55 | url "https://files.pythonhosted.org/packages/50/cc/04526507e80d546be5688ce0246e40277b61e7949c3347c6609b6a4154cf/llvmlite-0.32.1.tar.gz" 56 | sha256 "41262a47b8cbba5a09203b15b65fbdf11192f92aa226c81e99115acdee8f3b8d" 57 | end 58 | 59 | resource "matplotlib" do 60 | url "https://files.pythonhosted.org/packages/4a/30/eb8e7dd8e3609f05c6920fa82f189302c832e5a0f6667aa96f952056bc0c/matplotlib-3.2.1.tar.gz" 61 | sha256 "ffe2f9cdcea1086fc414e82f42271ecf1976700b8edd16ca9d376189c6d93aee" 62 | end 63 | 64 | resource "numba" do 65 | url "https://files.pythonhosted.org/packages/a8/23/d56b70e79c18c34c1787bf2cda957f821790ec7ccd35a1962d5be102d572/numba-0.49.1.tar.gz" 66 | sha256 "89e1ad8215918036b0ffc53501888d44ed44c1f2cb09a9e047d06af5cd7e7a5a" 67 | end 68 | 69 | resource "pandas" do 70 | url "https://files.pythonhosted.org/packages/2f/79/f236ab1cfde94bac03d7b58f3f2ab0b1cc71d6a8bda3b25ce370a9fe4ab1/pandas-1.0.3.tar.gz" 71 | sha256 "32f42e322fb903d0e189a4c10b75ba70d90958cc4f66a1781ed027f1a1d14586" 72 | end 73 | 74 | def install 75 | virtualenv_install_with_resources 76 | 77 | if build.stable? 78 | inreplace "Makefile" do |s| 79 | # Makefile authoring error 80 | # https://github.com/happycube/ld-decode/commit/af61091ce0232d43e4b1d1f16e55467a738484ca#diff-b67911656ef5d18c4ae36cb6741b7965 81 | s.gsub! "TARGETS=cx", "TARGETS=" 82 | # prefix was added in a post-6.0 release 83 | s.gsub! "/usr/local/bin", bin.to_s 84 | end 85 | 86 | Dir["tools/**/*.pro"].each do |f| 87 | inreplace f, "/usr/local/bin", bin.to_s 88 | end 89 | end 90 | 91 | bin.mkpath 92 | system "make", "prefix=#{prefix}" 93 | system "make", "install", "prefix=#{prefix}" 94 | 95 | # These two app bundles shouldn't go in bin. 96 | prefix.install "#{bin}/ld-analyse.app" 97 | prefix.install "#{bin}/ld-process-efm.app" 98 | end 99 | 100 | test do 101 | system "#{bin}/ld-decode", "-h" 102 | end 103 | end 104 | --------------------------------------------------------------------------------