This allows formulae which won't build with Tiger's ld to conditionally
request a dependency on the ld64 formula. This modifies the build
environment appropriately, and will only be active on Tiger.
The depends_on 'nose' => :python
tests fails even if people did `pip install nose`
with their brewed pythons because during
the tests the PATH is set up such that
/usr/bin comes before HOMEBRE_PREFIX/bin.
This is a hot fix. Proper fix need resorting
the PATH.
* CPU functions now exist in Hardware::CPU
* Added compatibility functions in compat/hardware_compat.rb
* Names are less specific to Mac hardware, e.g. CPU.family instead of
Hardware.intel_family
* Hardware::CPU.family works for both Intel and PowerPC
* New helper methods on CPU, like .sse4? and .altivec?
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
We use PKG_CONFIG_LIBDIR to reset the default search path, overriding
whatever is baked into the pkg-config executable. This way, we can later
append XQuartz paths here while still allowing any brewed libs to take
precedence, keg-only or not.
Hopefully this will resolve any remaining issues, and let us get rid of
some per-formula hacks.
c.f. Homebrew/homebrew#14474.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
It has been long enough since `depends_on :x11` was introduced that we
can make it the caller's responsibility to ensure X11 is present before
invoking ENV.x11, so stop outputting a warning.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
1. A minimal build environment, we don't set CFLAGS, CPPFLAGS, LDFLAGS, etc. the rationale being, the less that is set, the less variables we are introducing that can break builds.
2. A set of scripts that replace cc, ld, etc. and inject the -I, -L, etc. flags we need into the args passed to the build-tools.
Because we now have complete control over compiler instantiations we do a variety of clean-up tasks, like removing bad flags, enforcing universal builds and ensuring makefiles don't try to change the order of library and include paths from ones that work to ones that don't.
The previous ENV-system is still available when --env=std is specified.
superenv applies to Xcode >= 4.3 only currently.
This prevents multiple calls to flag-modifying ENV methods from
resulting in large amounts of consecutive spaces.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
- When using CPATH, we only need -isysroot and not the other -I spam.
- LDFLAGS use -isysroot instead of -L
Turns out that the linker also understands the
-isysroot flag which behaves more natural (in the
sense: "like the internal defaults `/usr/lib` etc.)
than adding `-L$(SDKROOT).
Especially for duplicates, the linker first searches
through all `-L` dirs and then looks at the sysroot
or internal defaults. This is what we want.
- Pkg-config needs CC with CFLAGS passed to configure.
ClosesHomebrew/homebrew#14351.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
In order to better support Xcode-only systems, where X11 libs and
executables live under /usr/X11 but headers live in the SDK, move the
x11_* helper methods into a new module.
This allows us to keep some of the CLT/Xcode-only and Apple X11/XQuartz
logic hidden from outside code, like ENV.x11.
Since Apple's X11 is actually XQuartz, name the module "MacOS::XQuartz".
10.8 no longer ships four .pc files which were included in previous
versions, though it does still include the libraries which they pointed
to. This commit provides copies of the .pc files for all of these, and
prepends Library/Homebrew/pkgconfig to PKG_CONFIG_PATH on 10.8.
The .pc files in question are: lib curl, lubexslt, libxml-2.0, libxslt
FixesHomebrew/homebrew#13673.
FixesHomebrew/homebrew#13627.
FixesHomebrew/homebrew#13652.
FixesHomebrew/homebrew#13482.
ClosesHomebrew/homebrew#13572.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
SDK/usr/include and lib now appended instead of prepended.
Prepending overwrote our precedence of HOMEBREW_PREFIX/include and lib.
ClosesHomebrew/homebrew#13292.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Undoing parts of the hot fix 78b9e8548e771a59e382e6f13339664ec5498391.
The only thing missing was to check for `system "/usr/bin/xcrun -find make 1>/dev/null 2>&1"`
and then it's safe to call locate.
This commit restores the original functionality but without the risk for recursion
and improves the logic of `MacOS.locate`. See below.
To important changes in this commit:
- For Xcode _and_ CLT: don't add the SDK and leave things as before.
So if `MacOS.clt_installed?`, then no `SDKROOT` and `-L` and `-I`
directories are set in `ENV.macosxsdk`.
- Improved the logic for `MacOS.locate` for Xcode-only situations
by assuring that the xcode-select path is correct. This is done
by checking that `bin/make` exists and is executable. Otherwise it
was possible to set xcode-select to an empty dir.
This check is done in `MacOS.sdk_path` too.
We are now able to use Xcode wherever it is and can work even, if
xcode-select is set to invalid values. (Remember some users don't
have sudo access and that is needed to fix xcode-select).
Some minor whitespace fixes.
Minor backtick fix in doctor.rb's printout.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Allow XCode without the Command Line Tools to
work with homebrew, so it's not necessary
to register an Apple Dev ID and/or go to the
XCode prefs and download the CLT. Yay!
Further, this commit allows to use the CLT
solely (without the need for XCode).
Saves quite some megs.
(Some furmulae require xcodebuild)
Of course XCode together with the CLT is still
fine and has been tested on 10.7 and 10.6
with Xcode 4 and Xcode 3.
Only on Lion or above, tell the user about the options,
which are
- Xcode without CLT
- CLT without Xcode
- both (ok, it's not directly stated, but implicit)
So if no Xcode is found and we are on Lion or above,
we don't fail but check for the CLTs now.
For older Macs, the old message that Xcode is needed
and the installer should be run is still displayed.
If the CLT are not found but Xcode is, then we
print out about the experimental status of this setup.
ClosesHomebrew/homebrew#10510.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
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.
FixesHomebrew/homebrew#12033.
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.
FixesHomebrew/homebrew#12033.