38364 Commits

Author SHA1 Message Date
Jack Nagel
7bb1894df5 fix_install_names: use Mach-O methods to find dylibs
Some libraries do not have the .dylib extension (e.g. Qt framework
libs), but need to have their install names rewritten to prevent other
packages from breaking due to upgrades. Use the new Pathname#dylib?
instead.
2012-05-30 22:32:48 -05:00
Jack Nagel
a786178382 Pathname: add Mach-O module
The MachO module contains methods for learning about Mach-O binaries,
and can be used where one might normally shell out to file(1).

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30 22:32:48 -05:00
Jack Nagel
b6e0dfed23 Recurse into subdirectories when fixing install names 2012-05-30 22:32:48 -05:00
Will Ross
beb85c0d90 Do not warn about JNI libraries in lib
JNI libraries in OS X are suffixed with jnilib. Additionally,
/usr/local/lib is a default search location for JNI libraries,
so Homebrew shouldn't complain when it installs .jnilibs into lib.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-05-26 21:10:04 -07:00
Jack Nagel
d9fe48cf54 Set close-on-exec on the error pipe
We use a pipe to marshal exceptions from the build script back to the
main Homebrew process; the associated file descriptor is stored in an
environment variable so that the script can figure out which descriptor
to use after being exec'd.

However, any child processes of the build script inherit this
descriptor (i.e. anything spawned via "system" by the formula during
installation). Normally this is not an issue, but if a formula executes
a long-running process such as a daemon, the main Homebrew process will
never see EOF on the error pipe because the daemon still has an open
descriptor.

We can fix this while preserving current behavior by setting the
close-on-exec flag on the build script's error pipe descriptor.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-23 17:43:14 -05:00
Jack Nagel
01bcf58e6a create: update cmake calls in template
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-22 22:32:16 -05:00
Jack Nagel
a13857b150 Introduce std_cmake_args method
This differs from the current std_cmake_parameters in that it returns an
array instead of a string. Doing so makes dealing with it in formulae
much more pleasant, and for new formula hackers, less surprising.

std_cmake_parameters is retained in compat to maintain compatibility
with external formulae.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-22 16:32:12 -05:00
Jack Nagel
4dfa2806b9 audit: fix broken deps check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-15 17:45:26 -05:00
Max Howell
4a48a5f7a3 Don't fall into the no-extension OK trap
`require` is OK without an .rb extension, but the rest of our code will be confused and generate weird errors.

Fixes Homebrew/homebrew#11558.
2012-05-15 02:27:11 -04:00
Max Howell
1a63e93875 sudo -k before calling build scripts
Potentially build scripts would call sudo, if so we don't want that to automatically succeed just because the time-period in which sudo works is still active after a previous incantation.

Closes Homebrew/homebrew#10629.

In fact I don't see how this can have been the problem, but if this isn't the problem then I don't see what else can be the problem.
2012-05-15 01:56:33 -04:00
Jack Nagel
ec3615fec7 doctor: rework check_pkg_config_paths
pkg-config can give us this information a colon-separated list; use
that.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 19:28:03 -05:00
Jack Nagel
210c9ac205 Use 'which' helper method more
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 19:28:03 -05:00
Jack Nagel
28f89c59a2 FormulaInstaller: fold dirlist helper into check_m4
Having in_aclocal_dirlist? defined as a method on FormulaInstaller is a
little weird; since its just a return condition of check_m4, move the
code there.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 18:43:14 -05:00
Misty De Meo
71d34a86d6 doctor: report if a path element is invalid
Under certain circumstances, an invalid path element would cause
File.expand_path to bail out. Catch mistakes and report them, then
continue instead.

Fixes Homebrew/homebrew#12154
2012-05-11 09:48:51 -05:00
Adam Vandenberg
f8a6075af3 Detect http://svn... as svn 2012-05-10 07:09:51 -07:00
Jack Nagel
68124d481f Unify 'which' and which_s' utility methods
'which' only returns a Pathname or nil, and doesn't care about anything
sent to stderr, so just silence it by default and combine the two
methods.

Closes Homebrew/homebrew#12115.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 21:05:47 -05:00
Jack Nagel
fa1edd6846 audit: don't count printed URLs as problems
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 17:50:05 -05:00
Jack Nagel
4d027874b0 audit: check MacPorts patch URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 17:44:57 -05:00
Nicolas Despres
c2fdcf1a34 Honor build options and bottles when upgrading
Fixes Homebrew/homebrew#11552.
Closes Homebrew/homebrew#11777.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-05 12:24:56 -05:00
Adam Vandenberg
32ea2e3ad0 Don't unzip war files 2012-05-03 20:40:04 -07:00
Adam Vandenberg
428781723b Detect uncompressed tars
From a patch by @RuiPereira

Closes Homebrew/homebrew#12011.
2012-05-03 20:31:00 -07:00
Adam Vandenberg
fc77a38d03 Fix brew audit 2012-05-03 20:22:47 -07:00
Jack Nagel
df2803ece5 GitDownloadStrategy: don't pass --depth to fetch
The --depth option is apparently more nuanced that I had originally
thought, and while it does not actually break repositories, repeatedly
using "--depth 1" can cause problems depending on the structure of the
history.

Luckily, we don't actually need it to prevent the entire repository from
being fetched as long as the fetch respec is set correctly, which we do
since 7718c939b06987ff8f1ecd599c8ace6f998ce180.

Fixes Homebrew/homebrew#12024.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-03 19:33:30 -05:00
Charlie Sharpsteen
c9652760ed ENV.rb: Always return integers from make_jobs
When referencing `Hardware.processor_count`, `ENV.make_jobs` will return an
integer. If referencing the environment variable `HOMEBREW_MAKE_JOBS`, it
returned a string.

Now, the function always returns an integer.

Fixes Homebrew/homebrew#12033.
2012-05-03 15:49:27 -07:00
Charlie Sharpsteen
5582ca2548 Revert "ENV.rb: Always return integers from make_jobs"
This reverts commit ea1a9e603abe3dab90bf5b157d2614cf58e2cc8e.

Argh. Unrelated PySide changes slipped in.
2012-05-03 15:48:51 -07:00
Charlie Sharpsteen
52834b8617 ENV.rb: Always return integers from make_jobs
When referencing `Hardware.processor_count`, `ENV.make_jobs` will return an
integer. If referencing the environment variable `HOMEBREW_MAKE_JOBS`, it
returned a string.

Now, the function always returns an integer.

Fixes Homebrew/homebrew#12033.
2012-05-03 15:45:31 -07:00
Christian Höltje
7b24382d14 zsh: support site specific files
This fixes the `site-scripts` and `site-functions` directories
so that zsh points to the HOMEBREW_PREFIX version of these files
instead of the Cellar version.

This means you can drop files in these directories and the files
will persist when you upgrade zsh. Otherwise they disappear when
you upgrade zsh.

Closes Homebrew/homebrew#11955.

[jn: mkpath everything under share/zsh]

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-02 23:43:30 -05:00
Adam Vandenberg
e8c0b01f24 patches - support detection of compression types 2012-05-02 19:57:33 -07:00
Adam Vandenberg
3ad19e08b7 Extract detection of compression types
Separate out detecting compression types from uncompressing and staging.
2012-05-02 19:57:33 -07:00
Jack Nagel
837d206a62 GitDownloadStrategy: don't assume --single-branch is available
git-clone's --single-branch is too new, and Xcode 4.3's stock git
doesn't have it. Since we don't require git from Homebrew, don't use it.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-02 21:55:24 -05:00
Jack Nagel
b8715f6d97 GitDownloadStrategy optimization
The current series of fetch invocations in GitDownloadStrategy has the
unfortunate behavior of fetching full history even in shallow clones
that only need the history between the clone point and the remote HEAD.
It should be possible to determine if it is actually necessary to fetch
the full history, including all tags, and if it is not to avoid this
overhead.

Fixes Homebrew/homebrew#11958, and several other recurring problems.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-01 21:46:42 -05:00
Jack Nagel
b1d490cbed Don't set GIT_DIR when staging git clones
GIT_DIR is convenient, but it does not work when both a formula and
subformula try to stage a git checkout, as git will use the main
formula's repository when staging the subformula.

Stop setting it, and restore the kludge to the git-multipush formula.

Fixes Homebrew/homebrew#10893.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-01 18:07:58 -05:00
Mike McQuaid
995186a72c Fix Ruby warnings.
Fixes Homebrew/homebrew#11966.
2012-05-01 20:45:17 +08:00
lukas
b6fecf5e1d Add brew services command: a wrapper for launchctl
If a formula implements startup_plist it has out-of-the-box support by
brew services. If not it's possible to specify the path to a plist file:
`brew services couchdb-lucence /usr/local/Cellar/..../couchdb-lucene.plist`.

Fixes Homebrew/homebrew#3422.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-05-01 20:32:21 +08:00
Misty De Meo
827d263d01 brew tap: allow dashes in GitHub usernames 2012-04-30 14:02:23 -05:00
Mike McQuaid
9d81b0d847 Improve Formula.resolve_alias warning. 2012-04-30 21:38:14 +08:00
Mike McQuaid
fe969c21ad Add ofail command and fix bottle command output. 2012-04-30 21:38:08 +08:00
Mike McQuaid
a1ce504e7d Cleanup old bottles. 2012-04-30 21:37:58 +08:00
Mike McQuaid
7c12324e0f Fix native bottle regex. 2012-04-30 21:37:46 +08:00
Adam Vandenberg
162b1ee936 audit: reduce false-positives 2012-04-29 09:32:39 -07:00
Adam Vandenberg
1d975de41b doctor: add another path to the macgpg2 check 2012-04-28 14:08:05 -07:00
Jack Nagel
cd4428bcb9 CurlDownloadStrategy: fix .rar detection
We now read six bytes instead of four in order to detect xz compression;
this broke rar detection which used a string literal instead of a regexp
for comparison.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-26 20:54:30 -05:00
Jack Nagel
07e24dda76 mkpath all directories under lib/python*
The python formula explicity creates lib/python2.7/site-packages.
However, that path may already exist as a symlink if something that
installs python bindings is installed before python itself. The result
is that some random keg will end up hosting the site-packages directory
instead of the top-level directory.

Fix this by explicitly creating directories under lib/python* during
linking.

Fixes Homebrew/homebrew#11882.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-26 20:35:09 -05:00
Misty De Meo
797a3843c9 Revert zsh completion installation
This reverts commit c5a9ff8eaac30e4ac468ac199167d791661a0c69.

Fixes Homebrew/homebrew#11871.
2012-04-25 11:36:56 -05:00
Mike McQuaid
580d4c0de4 Symlink brew zsh completion to default location.
Fixes Homebrew/homebrew#11867.
2012-04-25 17:19:03 +10:00
Mike McQuaid
a67478488f Add Brew Test Bot for comprehensive testing.
Closes Homebrew/homebrew#11642.
2012-04-24 19:00:08 +10:00
Mike McQuaid
0eb97d5c32 Generate the bottle download URL correctly.
Fixes Homebrew/homebrew#11561.
Fixes Homebrew/homebrew#11614.
2012-04-24 18:53:45 +10:00
Mike McQuaid
ebe4e07fa3 Change versioned bottle syntax and fix issues.
Fixed Homebrew/homebrew#11562.
2012-04-24 18:53:45 +10:00
Mike McQuaid
11f382705c Add and correctly find erlang bottle.
Fixes Homebrew/homebrew#11780.
2012-04-24 18:53:33 +10:00
Mike McQuaid
f729a0df44 Fix screwup. 2012-04-24 18:46:43 +10:00