Skip to content
This repository

adding Audiotools formula #11825

Closed
wants to merge 4 commits into from

2 participants

Laurent Perrinet Jack Nagel
Laurent Perrinet
meduz commented April 23, 2012

A great tool for manipulating files (see http://invibe.net/LaurentPerrinet/SciBlog/2012-04-22 ).

I am quite a newbie in gitland, so sorry about sending a pull request for 4 commits and not just for adding this one formula... (I can refork / or rollback if that's necessary but lack some knowledge for that level pof gitness)

cheers,
Laurent

and others added some commits August 31, 2010
Laurent Perrinet fixing issue 2320 99bd346
Laurent Perrinet getting back to the present
this demonstrates my noobiness in git. at least, I destroy only things
in my fork…
6296900
Laurent Perrinet Merge remote-tracking branch 'upstream/master' 051c13b
Laurent Perrinet AudioTools, an utility for converting audio files.
Python Audio Tools are a collection of audio handling programs which
work from the command line.

It is relatively easy to compile as it is based on known libraries,
but homebrew automates the process. Besides, it was not MacOsX cen-
tered, so a few minor patches are needed.
339f9bb
Jack Nagel jacknagel commented on the diff April 27, 2012
Library/Formula/audiotools.rb
((8 lines not shown))
  8
+  depends_on 'libcdio'
  9
+  depends_on 'lame'
  10
+  depends_on 'two-lame'
  11
+  depends_on 'mp3gain'
  12
+  depends_on 'mpg123'
  13
+  depends_on 'faac'
  14
+  depends_on 'faad2'
  15
+  depends_on 'libogg'
  16
+  depends_on 'libvorbis'
  17
+  depends_on 'vorbisgain'
  18
+  depends_on 'vorbis-tools'
  19
+
  20
+  def install
  21
+    system "make install"
  22
+  end
  23
+
2
Jack Nagel Owner
jacknagel added a note April 27, 2012

Can't assume /usr/local here, and we don't install things to HOMEBREW_PREFIX (usually /usr/local) directly, but rather packages get their own prefixes under HOMEBREW_PREFIX/Cellar and are then symlinked into HOMEBREW_PREFIX.

The correct way of doing this is usually something like

system "make", "install", "PREFIX=#{prefix}", ...
Laurent Perrinet
meduz added a note May 08, 2012

ok, got that with

def install
     system "python setup.py build"
     system "python setup.py install", "--prefix=#{prefix}"
end

I will try to find a solution to your other comment first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Jack Nagel
Owner

This needs to be squashed to a single commit. Note that currently this pull request removes the sip formula.

The best approach is to make changes on a branch other than master, and then you can amend commits or rebase on the branch and force push to update the pull request.

Laurent Perrinet
meduz commented May 08, 2012

(sorry for this confusion I introduced, I am learning git the hard way....)

I was thinking the easiest would be to remove my fork, create a branch, reintroduce my new formula and do a new pull. what do you think?

Laurent Perrinet
meduz commented June 10, 2012

This is what I did in #12718

Laurent Perrinet meduz closed this June 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 4 unique commits by 2 authors.

Aug 31, 2010
Laurent Perrinet fixing issue 2320 99bd346
Apr 12, 2012
Laurent Perrinet getting back to the present
this demonstrates my noobiness in git. at least, I destroy only things
in my fork…
6296900
Apr 23, 2012
Laurent Perrinet Merge remote-tracking branch 'upstream/master' 051c13b
Laurent Perrinet AudioTools, an utility for converting audio files.
Python Audio Tools are a collection of audio handling programs which
work from the command line.

It is relatively easy to compile as it is based on known libraries,
but homebrew automates the process. Besides, it was not MacOsX cen-
tered, so a few minor patches are needed.
339f9bb
This page is out of date. Refresh to see the latest.
54  Library/Formula/audiotools.rb
... ...
@@ -0,0 +1,54 @@
  1
+require 'formula'
  2
+
  3
+class Audiotools < Formula
  4
+  url 'http://sourceforge.net/project/audiotools/audiotools/2.18/audiotools-2.18.tar.gz'
  5
+  homepage 'http://audiotools.sourceforge.net/'
  6
+  md5 'b168a7e925941cadb1ee0506148db74d'
  7
+
  8
+  depends_on 'libcdio'
  9
+  depends_on 'lame'
  10
+  depends_on 'two-lame'
  11
+  depends_on 'mp3gain'
  12
+  depends_on 'mpg123'
  13
+  depends_on 'faac'
  14
+  depends_on 'faad2'
  15
+  depends_on 'libogg'
  16
+  depends_on 'libvorbis'
  17
+  depends_on 'vorbisgain'
  18
+  depends_on 'vorbis-tools'
  19
+
  20
+  def install
  21
+    system "make install"
  22
+  end
  23
+
  24
+  def patches
  25
+    # fixes wrong paths and directs to /usr/local
  26
+    DATA
  27
+  end
  28
+end
  29
+
  30
+__END__
  31
+diff --git a/docs/Makefile b/docs/Makefile
  32
+index 1c33b0b..e35a6ce 100644
  33
+--- a/docs/Makefile
  34
++++ b/docs/Makefile
  35
+@@ -1,5 +1,5 @@
  36
+ PYTHON = python
  37
+-MAN_PATH = /usr/share/man
  38
++MAN_PATH = /usr/local/share/man
  39
+ MAN_PAGES = \
  40
+ audiotools-config.1 \
  41
+ audiotools.cfg.5 \
  42
+diff --git a/setup.py b/setup.py
  43
+index dd5bd6f..5ab3d6d 100755
  44
+--- a/setup.py
  45
++++ b/setup.py
  46
+@@ -115,7 +115,7 @@ setup(name='Python Audio Tools',
  47
+                    encodersmodule,
  48
+                    bitstreammodule,
  49
+                    verifymodule],
  50
+-      data_files=[("/etc", ["audiotools.cfg"])],
  51
++      data_files=[("/usr/local/etc", ["audiotools.cfg"])],
  52
+       scripts=["cd2track", "cdinfo", "cdplay",
  53
+                "track2track", "trackrename", "trackinfo",
  54
+                "tracklength", "track2cd", "trackcmp", "trackplay",
97  Library/Formula/sip.rb
... ...
@@ -1,97 +0,0 @@
1  
-require 'formula'
2  
-
3  
-# NOTE TO MAINTAINERS:
4  
-#
5  
-# Unless Riverbank policy changes in the future or the Mercurial archive
6  
-# becomes unavailable, *do not use* the SIP download URL from the Riverbank
7  
-# website. This URL will break as soon as a new version of SIP is released
8  
-# which causes panic and terror to flood the Homebrew issue tracker.
9  
-
10  
-class Sip < Formula
11  
-  url 'http://www.riverbankcomputing.co.uk/hg/sip/archive/4.13.2.tar.gz'
12  
-  sha1 'd6c0835738438f8ccff012164a6c6192abc52792'
13  
-  head 'http://www.riverbankcomputing.co.uk/hg/sip', :using => :hg
14  
-  homepage 'http://www.riverbankcomputing.co.uk/software/sip'
15  
-
16  
-  def patches
17  
-    DATA
18  
-  end
19  
-
20  
-  def install
21  
-    if ARGV.build_head?
22  
-      # Set fallback version to the same value it would have without the patch
23  
-      # and link the Mercurial repository into the download directory so
24  
-      # buid.py can use it to figure out a version number.
25  
-      sip_version = "0.1.0"
26  
-      ln_s downloader.cached_location + '.hg', '.hg'
27  
-    else
28  
-      sip_version = version
29  
-    end
30  
-    inreplace 'build.py', /@SIP_VERSION@/, (sip_version.gsub '.', ',')
31  
-
32  
-    system "python", "build.py", "prepare"
33  
-    # Set --destdir such that the python modules will be in the HOMEBREWPREFIX/lib/pythonX.Y/site-packages
34  
-    system "python", "configure.py",
35  
-                              "--destdir=#{lib}/#{which_python}/site-packages",
36  
-                              "--bindir=#{bin}",
37  
-                              "--incdir=#{include}"
38  
-    system "make install"
39  
-  end
40  
-
41  
-  def caveats; <<-EOS.undent
42  
-    For non-homebrew Python, you need to amend your PYTHONPATH like so:
43  
-      export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages:$PYTHONPATH
44  
-    EOS
45  
-  end
46  
-
47  
-  def which_python
48  
-    "python" + `python -c 'import sys;print(sys.version[:3])'`.strip
49  
-  end
50  
-end
51  
-
52  
-
53  
-__END__
54  
-Patch to allow the SIP build.py script to generate a reasonable version number
55  
-for installing from a Mercurial snapshot without the .hg directory from the
56  
-Mercurial repository. The install code hooks on to the @SIP_VERSION@ tag and
57  
-inserts a real version tuple
58  
-
59  
-diff --git a/build.py b/build.py
60  
-index 927d7f1..fdf13a3 100755
61  
---- a/build.py
62  
-+++ b/build.py
63  
-@@ -179,7 +179,7 @@ def _get_release():
64  
-         changelog = None
65  
-         name = os.path.basename(_RootDir)
66  
- 
67  
--        release_suffix = "-unknown"
68  
-+        release_suffix = ""
69  
-         version = None
70  
- 
71  
-         parts = name.split('-')
72  
-@@ -192,7 +192,7 @@ def _get_release():
73  
- 
74  
-     # Format the results.
75  
-     if version is None:
76  
--        version = (0, 1, 0)
77  
-+        version = (@SIP_VERSION@)
78  
- 
79  
-     major, minor, micro = version
80  
- 
81  
-
82  
-Patch to remove the seemingly unnecessary framework build requirement
83  
-diff --git a/siputils.py b/siputils.py
84  
-index 57e8911..1af6152 100644
85  
---- a/siputils.py
86  
-+++ b/siputils.py
87  
-@@ -1434,8 +1434,8 @@ class ModuleMakefile(Makefile):
88  
-             # 'real_prefix' exists if virtualenv is being used.
89  
-             dl = getattr(sys, 'real_prefix', sys.exec_prefix).split(os.sep)
90  
- 
91  
--            if "Python.framework" not in dl:
92  
--                error("SIP requires Python to be built as a framework")
93  
-+            # if "Python.framework" not in dl:
94  
-+                # error("SIP requires Python to be built as a framework")
95  
- 
96  
-             self.LFLAGS.append("-undefined dynamic_lookup")
97  
- 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.