Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

adding Audiotools formula #11825

Closed
wants to merge 4 commits into from

2 participants

@meduz

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

meduz added some commits
@meduz meduz fixing issue 2320 99bd346
@meduz meduz getting back to the present
this demonstrates my noobiness in git. at least, I destroy only things
in my fork…
6296900
@meduz meduz Merge remote-tracking branch 'upstream/master' 051c13b
@meduz meduz 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
@jacknagel jacknagel commented on the diff
Library/Formula/audiotools.rb
((8 lines not shown))
+ depends_on 'libcdio'
+ depends_on 'lame'
+ depends_on 'two-lame'
+ depends_on 'mp3gain'
+ depends_on 'mpg123'
+ depends_on 'faac'
+ depends_on 'faad2'
+ depends_on 'libogg'
+ depends_on 'libvorbis'
+ depends_on 'vorbisgain'
+ depends_on 'vorbis-tools'
+
+ def install
+ system "make install"
+ end
+
@jacknagel Owner

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}", ...
@meduz
meduz added a note

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
@jacknagel
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.

@meduz

(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?

@meduz

This is what I did in #12718

@meduz meduz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 31, 2010
  1. @meduz

    fixing issue 2320

    meduz authored
Commits on Apr 12, 2012
  1. @meduz

    getting back to the present

    meduz authored
    this demonstrates my noobiness in git. at least, I destroy only things
    in my fork…
Commits on Apr 23, 2012
  1. @meduz
  2. @meduz

    AudioTools, an utility for converting audio files.

    meduz authored
    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.
This page is out of date. Refresh to see the latest.
Showing with 54 additions and 97 deletions.
  1. +54 −0 Library/Formula/audiotools.rb
  2. +0 −97 Library/Formula/sip.rb
View
54 Library/Formula/audiotools.rb
@@ -0,0 +1,54 @@
+require 'formula'
+
+class Audiotools < Formula
+ url 'http://sourceforge.net/project/audiotools/audiotools/2.18/audiotools-2.18.tar.gz'
+ homepage 'http://audiotools.sourceforge.net/'
+ md5 'b168a7e925941cadb1ee0506148db74d'
+
+ depends_on 'libcdio'
+ depends_on 'lame'
+ depends_on 'two-lame'
+ depends_on 'mp3gain'
+ depends_on 'mpg123'
+ depends_on 'faac'
+ depends_on 'faad2'
+ depends_on 'libogg'
+ depends_on 'libvorbis'
+ depends_on 'vorbisgain'
+ depends_on 'vorbis-tools'
+
+ def install
+ system "make install"
+ end
+
@jacknagel Owner

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}", ...
@meduz
meduz added a note

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
+ def patches
+ # fixes wrong paths and directs to /usr/local
+ DATA
+ end
+end
+
+__END__
+diff --git a/docs/Makefile b/docs/Makefile
+index 1c33b0b..e35a6ce 100644
+--- a/docs/Makefile
++++ b/docs/Makefile
+@@ -1,5 +1,5 @@
+ PYTHON = python
+-MAN_PATH = /usr/share/man
++MAN_PATH = /usr/local/share/man
+ MAN_PAGES = \
+ audiotools-config.1 \
+ audiotools.cfg.5 \
+diff --git a/setup.py b/setup.py
+index dd5bd6f..5ab3d6d 100755
+--- a/setup.py
++++ b/setup.py
+@@ -115,7 +115,7 @@ setup(name='Python Audio Tools',
+ encodersmodule,
+ bitstreammodule,
+ verifymodule],
+- data_files=[("/etc", ["audiotools.cfg"])],
++ data_files=[("/usr/local/etc", ["audiotools.cfg"])],
+ scripts=["cd2track", "cdinfo", "cdplay",
+ "track2track", "trackrename", "trackinfo",
+ "tracklength", "track2cd", "trackcmp", "trackplay",
View
97 Library/Formula/sip.rb
@@ -1,97 +0,0 @@
-require 'formula'
-
-# NOTE TO MAINTAINERS:
-#
-# Unless Riverbank policy changes in the future or the Mercurial archive
-# becomes unavailable, *do not use* the SIP download URL from the Riverbank
-# website. This URL will break as soon as a new version of SIP is released
-# which causes panic and terror to flood the Homebrew issue tracker.
-
-class Sip < Formula
- url 'http://www.riverbankcomputing.co.uk/hg/sip/archive/4.13.2.tar.gz'
- sha1 'd6c0835738438f8ccff012164a6c6192abc52792'
- head 'http://www.riverbankcomputing.co.uk/hg/sip', :using => :hg
- homepage 'http://www.riverbankcomputing.co.uk/software/sip'
-
- def patches
- DATA
- end
-
- def install
- if ARGV.build_head?
- # Set fallback version to the same value it would have without the patch
- # and link the Mercurial repository into the download directory so
- # buid.py can use it to figure out a version number.
- sip_version = "0.1.0"
- ln_s downloader.cached_location + '.hg', '.hg'
- else
- sip_version = version
- end
- inreplace 'build.py', /@SIP_VERSION@/, (sip_version.gsub '.', ',')
-
- system "python", "build.py", "prepare"
- # Set --destdir such that the python modules will be in the HOMEBREWPREFIX/lib/pythonX.Y/site-packages
- system "python", "configure.py",
- "--destdir=#{lib}/#{which_python}/site-packages",
- "--bindir=#{bin}",
- "--incdir=#{include}"
- system "make install"
- end
-
- def caveats; <<-EOS.undent
- For non-homebrew Python, you need to amend your PYTHONPATH like so:
- export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages:$PYTHONPATH
- EOS
- end
-
- def which_python
- "python" + `python -c 'import sys;print(sys.version[:3])'`.strip
- end
-end
-
-
-__END__
-Patch to allow the SIP build.py script to generate a reasonable version number
-for installing from a Mercurial snapshot without the .hg directory from the
-Mercurial repository. The install code hooks on to the @SIP_VERSION@ tag and
-inserts a real version tuple
-
-diff --git a/build.py b/build.py
-index 927d7f1..fdf13a3 100755
---- a/build.py
-+++ b/build.py
-@@ -179,7 +179,7 @@ def _get_release():
- changelog = None
- name = os.path.basename(_RootDir)
-
-- release_suffix = "-unknown"
-+ release_suffix = ""
- version = None
-
- parts = name.split('-')
-@@ -192,7 +192,7 @@ def _get_release():
-
- # Format the results.
- if version is None:
-- version = (0, 1, 0)
-+ version = (@SIP_VERSION@)
-
- major, minor, micro = version
-
-
-Patch to remove the seemingly unnecessary framework build requirement
-diff --git a/siputils.py b/siputils.py
-index 57e8911..1af6152 100644
---- a/siputils.py
-+++ b/siputils.py
-@@ -1434,8 +1434,8 @@ class ModuleMakefile(Makefile):
- # 'real_prefix' exists if virtualenv is being used.
- dl = getattr(sys, 'real_prefix', sys.exec_prefix).split(os.sep)
-
-- if "Python.framework" not in dl:
-- error("SIP requires Python to be built as a framework")
-+ # if "Python.framework" not in dl:
-+ # error("SIP requires Python to be built as a framework")
-
- self.LFLAGS.append("-undefined dynamic_lookup")
-
Something went wrong with that request. Please try again.