This was mostly used to prevent stripping. Now we don't strip. Force formula to remove this setting or be more specific about folders they don't want pruned.
Since we are moving towards only depending on X11 for X-headers, superenv now doesn't automatically add X11 compilation. I was reluctant to do this, but it is the right thing to do now that X11 is not automatically installed by OS X or Xcode.
I didn't implement ENV.x11 because the order that the X headers are inserted is important. It must be done at initial setup to ensure that brewed versions of e.g. freetype and Cairo are used and not the ones installed by XQuartz.
This is safe, I tested various scenarios, including Homebrew installed in ~. The only files that are removed are unexpected files in Homebrew's already managed directories.
Adding MacOS.dev_tools_path to our PATH was slow. We no longer need to do this because of the previous commit making a script wrapper for git and svn. It was slow because the function calls out to lots of slow utilities to determine this path.
Two wrapper scripts that find git and svn using the ENV variables we support and then searching through the PATH and looking inside Xcode.app if necessary.
Now just calling git or svn in Homebrew code will find and exec the right tool and we can stop fussing.
Apologies to @adamv who is probably unimpressed that the cmds directory has non-commands in it now. If it's consolation these are temporary pending some more work on superenv whereby some more directories are created under the superenv root.
Rationale: if ack is unlinked but installed, typing ack does nothing, but then user tries to install and it says it is already installed. What gives? The user thinks.
Formula ending up unlinked can happen due to failures during the link phase and we recommend unlinking formula for conflicts. So common enough to justify this amendment.
Let's not show weird error messages when user interrupts during various stages of brew initialization.
Tested by doing `for x in $(brew search); do brew install $x; done` and pressing CTRL-C at random short intervals.
Python et al, require stdenv because otherwise pip, gem, etc. don't work. Can be fixed, just I'm not doing it now.
We want a DSL to do this but I couldn't be bothered to make that work etc. I want to commit. Apologies.
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.
Similar to the LinkedKegs record, we write a symlink for installed kegs to PREFIX/opt.
Unlike the linked-keg record, unlinking doesn't remove the link, only uninstalling, and keg-only formula have a record too.
The reason for this addition is so that formula that depend on keg-only formula can build against the opt directory and not the cellar keg. Thus surviving upgrades.
To enforce this fix_install_names and built were adapted to use the opt path.
Standard kegs also create an opt symlink so that caveats can now refer to the opt directory and thus provide steps that survive upgrades too.
Thus the choice of /opt. It is short, neat and the right choice: POSIX dictates that opt is for stand-alone prefixes of software.
The recent fix that prevents "-v" from triggering source downloads
exposed a different bug that allowed the build script to download the
bottled package instead of the source package; fix the logic.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The == comparison was comparing the versions rather than directly
comparing the strings, which lead to false positives.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
When building software "linking step did not complete" sounds
like ld failed. Let's be clear about this.
ClosesHomebrew/homebrew#14407.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Clarify the error message arising from XCodeDependency so that users know
XCode.app is needed and that just installing the CLT does not count as
"installing XCode".
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>
Specifying dependencies with a URL works, even if by accident, but
factory is called repeatedly on this URL and this results in multiple
downloads of the same file.
Fix this by checking const_defined? here too, and DRY up the code a bit.
FixesHomebrew/homebrew#14285.
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>