Commit Graph
160 Commits
Author SHA1 Message Date
Jack Nagel 73a949b769 Fix another constant reference 2013-06-14 11:49:00 -05:00
Jack Nagel 0cc9b4d416 Fix constant reference 2013-06-14 11:09:53 -05:00
Jack Nagel 53fbb54af7 Favor compound if over compound unless 2013-06-14 10:34:20 -05:00
Jack Nagel e955cf55ca Use ||= instead of unless 2013-06-14 10:34:20 -05:00
Jack Nagel 47d07b24b0 Remove outdated comment 2013-06-14 10:34:20 -05:00
Jack Nagel c3b163fab8 Assign this inline 2013-06-14 10:34:19 -05:00
Jack Nagel e539faabff Delete rather than assign nil 2013-06-14 10:34:19 -05:00
Jack Nagel f9d73212ac Simplify nested conditional 2013-06-14 10:34:19 -05:00
Jack Nagel 343ad0cbb3 Use has_key? rather than accessing the value 2013-06-14 10:34:18 -05:00
Jack Nagel aaec242d11 Rename single-letter variable 2013-06-14 10:34:18 -05:00
Jack Nagel f9c0275797 Make flag lists into constants 2013-06-14 10:34:18 -05:00
Jack Nagel b5105dc693 ENV: clean up set_cpu_flags and set_cpu_cflags usage 2013-06-14 10:34:18 -05:00
Jack Nagel e17d2a24fc Use Hardware::CPU module 2013-06-14 10:34:17 -05:00
Misty De Meo 30c79ab65b Add :ld64 dependency
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.
2013-06-08 19:10:38 -05:00
Jack Nagel 1f19374e37 Move oldest_cpu to Hardware 2013-06-06 16:02:27 -05:00
Samuel John 072e8f903c ENV.userpaths! Hotfix to prefer brewed stuff
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.
2013-06-04 22:33:24 +02:00
Jack Nagel b433d51586 Require hardware where it is needed 2013-06-01 19:38:48 -05:00
Jack Nagel e697c1ab6f Fix set_cpu_flags invocations in ENV.fortran
Fixes #19013.
Fixes #19862.
Fixes #19921.
2013-05-19 11:18:53 -05:00
Mike McQuaid 646150ade9 Fix --build-bottle CFLAGS.
The CFLAGS were previously not generic enough.

References #18944.
References #19179.
2013-05-11 12:18:25 +01:00
Misty De Meo e7f66519dc Hardware: separate out CPU values into CPU module
* 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>
2013-03-23 13:40:18 -05:00
Misty De Meo 3608c33429 Replace remaining shelled-out whiches 2013-03-21 08:37:51 -05:00
Jack Nagel 832288e2fc ENV: clear influential include path vars 2013-03-16 13:51:30 -05:00
Mike McQuaid 22322867a1 Don't run certain functions on non-MACOS. 2013-03-11 18:26:25 +00:00
Jack Nagel 79a7cf6ab1 Index pkgconfig directories by MacOS.version 2013-03-09 14:46:01 -06:00
Jack Nagel 4d341f2115 Don't shadow outer local variables 2013-02-18 12:13:36 -06:00
Jack Nagel 3270fd2cd9 ENV.with_build_environment 2013-01-21 17:24:10 -06:00
Adam Vandenberg 34f5995e24 Only add -F if the frameworks folder exists
Closes #16901.
2013-01-04 21:30:10 -08:00
Jack Nagel bb03a39ad8 Allow requirements to specify env options 2012-12-26 14:37:03 -06:00
Camillo Lugaresi e0d0ae92d5 separate ENV/pkgconfig dirs by OS version
Closes #16063.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-11-19 22:04:04 -06:00
Camillo Lugaresi bfc71f6450 add necessary .pc files for Leopard
add missing libcrypto.pc
override broken system libcurl.pc

Closes #16063.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-11-19 22:03:00 -06:00
Charlie Sharpsteen 0794c8e8fd ENV.rb: Configure Objective-C++ compiler
Ensures the `OBJCXX` environment variable is correctly set. Also adds `OBJC`
and `OBJCXX` to `ENV.remove_cc_etc`.
2012-11-13 20:54:33 -08:00
Adam Vandenberg 95411a80aa Move vendored .pc files to ENV
Closes #15961.
2012-11-11 09:55:12 -08:00
Jack Nagel fdab0f48fd Inject framework paths into stdenv compiler flags 2012-11-06 12:32:10 -06:00
Max Howell c29311a23c Fix ENV.fortran info texts
They were being truncated.
2012-09-28 17:14:56 -04:00
Misty De Meo 7d15eda4a4 stdenv: stop setting LD
superenv stopped setting LD in
8e4c0a1411, seems sensible to follow
suit in stdenv too.

See #14943.

Fixes #15090.
2012-09-26 13:22:30 -05:00
Max Howell 4a554dd5b2 ENV.fortran adds back superenv removed PATHs
Fixes #15103.
2012-09-25 12:04:42 -04:00
Jack Nagel 9783ce476c ENV: put X11 aclocal dir in ACLOCAL_PATH when appropriate
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-05 19:49:50 -05:00
Jack Nagel 93a4c48e36 Sort out remaining XQuartz/stdenv issues
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. #14474.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 22:39:38 -05:00
Jack Nagel fb93fb2b2e ENV: update comment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 22:38:05 -05:00
Jack Nagel c985c6c057 Stop warning in ENV.x11
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>
2012-09-03 21:04:49 -05:00
Max Howell 6c21f8dc16 Use fortran from std-env in superenv
Fixes #14524.
2012-08-29 14:45:04 -04:00
Max Howell 59736fb537 superenv: build-environments that just work
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.
2012-08-29 12:41:34 -04:00
Mike McQuaid 7dc7c38324 Fix tests and NoMethodError with no X11 installed. 2012-08-25 10:21:48 -07:00
Jack Nagel 84a084a083 Compact whitespace when removing flags
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>
2012-08-23 22:29:56 -05:00
samueljohn 17469d7ad6 Xcode-only: Clean up compiler flags. Use CPATH.
- 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.

Closes #14351.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-23 16:26:28 -05:00
Jack Nagel ce604c642d Deprecate MacOS.version? style methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:25:59 -05:00
Jack Nagel 524e42a7e1 Adjust XQuartz/X11 module naming scheme
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-06 00:39:06 -05:00
Mike McQuaid 53d5bfb44e Use LC_CTYPE rather than LANG for most specific ML sed fix.
Fix #11728, fix #12890, fix #13653, fix #13734, fix #13787, fix #13818,
fix #13939.
2012-08-04 10:48:23 +01:00
Mike McQuaid 00ba4dfd1e Fix Mountain Lion sed by setting LANG.
It's also necessary to delete LC_ALL or it overrides the new LANG.
LC_COLLATE is the problem variable but is affected by LANG and LC_ALL
so just use them instead. Extends the fix made to geoip in dc955c.

Fix #11728, fix #12890, fix #13653, fix #13734, fix #13787, fix #13818.
2012-08-02 20:26:01 +01:00
Jack Nagel 68b5fe1ca5 Move X11 machinery into MacOS::XQuartz namespace
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".
2012-08-01 00:31:38 -05:00