24630 Commits

Author SHA1 Message Date
Charlie Sharpsteen
275d22db9e ENV.rb: Set GCC-style CPU flags for GFortran
GFortran chokes when it is passed CPU flags specific to Clang. This change
ensures the environment variables `FCFLAGS` and `FFLAGS` contain the same CPU
flags that would be set for the GCC compiler.

Fixes Homebrew/homebrew#10424.
Fixes Homebrew/homebrew#10744.

Closes Homebrew/homebrew#10774.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-03-09 12:14:08 -08:00
Charlie Sharpsteen
55d4f48746 ENV.rb: Generalize method for setting CPU flags
All logic has been copied into a new method `set_cpu_flags` that accepts an
additional argument, `flags`, which contains a list of environment variables
for which the CPU flags are to be adjusted.

`set_cpu_cflags` now recalls `set_cpu_flags` and passes `cflags_flags` as the
first argument.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-03-09 12:14:05 -08:00
Charlie Sharpsteen
1805e87529 ENV.rb: Modifier methods accept lists of flags
`ENV` methods that modify environment variables, `prepend`, `append` and
`remove`, can now accept lists of flags as well as a single flag.

The list of flags affected by `append_to_cflags` and `remove_from_cflags` are
now definied in a shortcut method `cc_flag_vars`.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-03-09 12:14:04 -08:00
Jack Nagel
880f566867 Remove unnecessary hyphen
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-09 13:29:56 -06:00
Mike McQuaid
cd13553d59 Remove bad exit status; need to fix another way. 2012-03-10 08:18:42 +13:00
Jack Nagel
d60f4ffcd8 Restore cleaning of lib/charset.alias
Even though we now prevent linking of this file into the prefix in
Keg#link, its presence still triggers a "non-lib in lib" warning during
installation. So keep cleaning it, and leave the check in Keg#link so
things that skip_clean 'lib' still won't have it linked.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-09 12:41:22 -06:00
Jack Nagel
fe25e4f7ec Fix typo in test_arch_for_command
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-09 11:50:27 -06:00
Max Howell
981605d199 Don't cleanup the wrong things
This still isn't perfect, but it will handle hyphens in formula-names better now. A proper solution is not easy or maybe even possible unless we ban hyphens in versions AND formula names, or use a different character as a separate in downloaded cache files which we then ban from formula-name and version strings.

Refs Homebrew/homebrew#2923.
2012-03-09 15:25:09 +00:00
Max Howell
fc2cc57ce8 Move install_homebrew into Contributions 2012-03-09 12:25:55 +00:00
Max Howell
7757b57ce2 Merge branch 'installer' 2012-03-09 12:24:17 +00:00
Max Howell
6345ceef1f Update Xcode checks and URLs 2012-03-09 12:17:49 +00:00
Max Howell
a7ac3c539d rm bad-dylibs check, brew doctor does this better 2012-03-09 12:17:36 +00:00
Max Howell
af3e5ad979 Improve messaging for this 0.01% edge case 2012-03-09 12:10:50 +00:00
Max Howell
f37e22838c Encourage usage of the new CLT4Xcode 2012-03-09 12:10:50 +00:00
Max Howell
dfa75f9230 Allow "Press Enter" to be a \r
Some wrapper-tools push \r rather than \n and break the installer.
2012-03-09 12:10:50 +00:00
Max Howell
98ec342ecc Use admin group and not staff
Staff is overly permissive, require user to be an  Administrator to use Homebrew.
2012-03-09 12:10:50 +00:00
Max Howell
cadc0506f9 cd KNOWN_DIR before executing any functions or tools
It is fucking amazing how much shit breaks if CWD is invalid. Fucking amazing.

Also fuck you dumb user who can't figure out what "No such file or directory - getcwd" means so you force me to waste half an hour fixing it for you.
2012-03-09 12:10:50 +00:00
Max Howell
63d8cb1a6b We need the executable permission to create files in directories
Fixes Homebrew/homebrew#6512.

I also set +r as a bunch of Homebrew will fail without that.
2012-03-09 12:10:50 +00:00
Max Howell
d053188da4 curl -k 2012-03-09 12:10:50 +00:00
Max Howell
488252ddbf Tidy ohais 2012-03-09 12:10:50 +00:00
Max Howell
283cefa163 Revert "Ensure resulting /usr/local is not user writable"
This reverts commit 549e7c1c2046010430849a3e92ecefb64b21a733.
2012-03-09 12:10:50 +00:00
Max Howell
cb3ffba635 Revert "Ensure that we undo the o+w chmod"
This reverts commit b3d5ac0c8500006ef4fbd0bf3bd53b22a06869ab.
2012-03-09 12:10:50 +00:00
Max Howell
9c5ad5c978 Error out with link to help if OS X < 10.5 2012-03-09 12:10:49 +00:00
Max Howell
c1568ab277 Fix install script for Ruby 1.9.x 2012-03-09 12:10:49 +00:00
Max Howell
ab66113f0b Ensure that we undo the o+w chmod 2012-03-09 12:10:49 +00:00
Max Howell
4696401e5d Look for bad dylibs in the installer
A common source of compile error, lets tell the user straight away.

Removed relevant documentation from the installation instructions as a consequence.
2012-03-09 12:10:49 +00:00
Max Howell
1fb3a2e20c Ensure resulting /usr/local is not user writable
Because we should do as little modification to the system as possible.

Even though /usr/local doesn't exist on a virgin OS X, many tools create it, and some of them expect /usr/local to be root owned for security reasons.

This modification fixes Airfoil on systems where it is installed.

The result of this is we can no longer create new directories in the HOMEBREW_PREFIX unless we check and prompt for sudo first when required.
2012-03-09 12:10:49 +00:00
Max Howell
3c2656c933 Better check for already installed 2012-03-09 12:10:49 +00:00
Max Howell
2332a564aa Less documentation
Changelog documentation, what were we thinking?
2012-03-09 12:10:49 +00:00
Max Howell
06450d4924 We don't care about var/log
Actually not sure about this commit's purpose. It was a gist edit, so no commit message was provided.
2012-03-09 12:10:49 +00:00
Max Howell
2cb0bd2cae Github URLS now are https 2012-03-09 12:10:49 +00:00
Max Howell
a721e736c5 If curl fails propagate its exit status through the pipe 2012-03-09 12:09:38 +00:00
Max Howell
bdbb8dc2a4 Check for all manpaths 2012-03-09 12:09:38 +00:00
Max Howell
d39364b70a Use full path to sudo 2012-03-09 12:09:38 +00:00
Max Howell
897dd14ae5 Amend paths to check for chmods 2012-03-09 12:09:38 +00:00
Max Howell
76ad14507c Direct the user to Xcode download 2012-03-09 12:09:38 +00:00
Max Howell
dec885bc16 Check for tty before trying to grab it 2012-03-09 12:09:37 +00:00
Max Howell
d9f1be7ef2 Use original system function for gcc check 2012-03-09 12:09:37 +00:00
Max Howell
f939a2c8b2 chmod Library and libexec too 2012-03-09 12:09:37 +00:00
Max Howell
13e73a2c55 Duplicating installation steps sucks 2012-03-09 12:09:37 +00:00
Max Howell
7a193f39b7 Support Ruby < 1.8.7 2012-03-09 12:08:52 +00:00
Max Howell
97b5808cac Warn if Xcode is not installed. 2012-03-09 12:08:52 +00:00
mattetti
4c0545619d Use getbyte and not getc 2012-03-09 12:08:51 +00:00
Max Howell
ebbc2e5b3f Use full path to stty 2012-03-09 12:08:51 +00:00
Max Howell
ca5bccd2d9 Only abort if user is not in staff group
Rationale: We aren't sure if the suggested command works on 10.5 and this is
an edge case.
2012-03-09 12:08:51 +00:00
Max Howell
16352d90b4 Moved code to top ready for amend 2012-03-09 12:08:51 +00:00
Max Howell
e12165138f Add user to staff if necessary 2012-03-09 12:08:51 +00:00
mxcl
3529226865 Advise user if they are not in the right group 2012-03-09 12:08:51 +00:00
Mike McQuaid
5f1a9098c9 Add better Unix exit codes.
Closes Homebrew/homebrew#10809.
2012-03-09 19:16:33 +13:00
Mike McQuaid
a005834d7a Run tests from anywhere and provide an exit code. 2012-03-09 18:28:47 +13:00