129 Commits

Author SHA1 Message Date
Jack Nagel
e40b735217 Decouple detect_stdlibs from ENV
I want to decouple from the global ENV constant as much as possible so
that eventually we can change the build environment implementation.
detect_stdlibs only cares about the compiler, not the whole ENV.
2015-06-25 23:42:54 -04:00
Jack Nagel
7edf3c88f6 Pass formula objects, not strings, into the build environment 2015-06-18 23:13:48 -04:00
Mike McQuaid
1e86730289 Rename requirements named *Dependency.
Dependency is another similar, related class and it's super confusing
to have some Requirements that are named *Dependency.

Closes Homebrew/homebrew#38891.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-06-16 08:12:01 +01:00
Xu Cheng
d2cd7ffdf2 build: use Formula#full_name 2015-05-29 17:01:53 +08:00
Jack Nagel
c2dcd91bd1 Eliminate a place where ARGV is mutated 2015-04-16 22:20:59 -04:00
Xu Cheng
c952fda202 build: fix typo 2015-04-15 19:51:54 +08:00
Xu Cheng
f5c8e3fdbd Use UNIXSocket to pass file descriptor
This is a more standard way to pass fd in UNIX world.
At the same time, it helps to remove a few hacks and
simplifies the code in the sandbox.

Closes Homebrew/homebrew#38434.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-04-09 15:31:47 +08:00
Xu Cheng
d632294f0f ensure metafiles being installed to prefix rather than libexec
This is a follow-up of Homebrew/homebrew#37734. I think we should treat `install_metafiles` as
a general issue rather than a formula-specific one.

Closes Homebrew/homebrew#37968.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-03-27 16:00:37 +08:00
Jack Nagel
0b8cf49386 Remove unnecessary code from debugger 2014-12-26 22:58:36 -05:00
Jack Nagel
2ff86eb417 Decouple applying patches from staging the source 2014-12-26 17:44:44 -05:00
Jack Nagel
3c9cc18c17 Add ARGV.git? 2014-11-03 21:39:11 -06:00
Jack Nagel
3bbc9998a5 Rewrite debugger to remove monkeypatches and use of call/cc 2014-09-18 14:16:07 -05:00
Jack Nagel
f3b7c3236b Consistently call name on formula instead of relying on to_s 2014-09-14 11:19:30 -05:00
Jack Nagel
b14851903c Add a method for retrieving only flags from ARGV 2014-08-29 19:38:32 -05:00
Jack Nagel
26467fa9d7 Make sure all exceptions are sent back to the parent process 2014-08-27 17:25:13 -05:00
Jack Nagel
9386902cf8 Explicitly pass options into the build object 2014-08-27 17:25:13 -05:00
Jack Nagel
889996daf1 Spell out formula in parameter and attribute names 2014-08-27 17:25:13 -05:00
Jack Nagel
f5d18cceb6 Structure the build process so that we don't need an at_exit hook 2014-08-26 22:06:43 -05:00
Jack Nagel
8aabba670f Consider on-disk state when computing dependencies
Fixes Homebrew/homebrew#28754.
Fixes Homebrew/homebrew#29846.
Fixes Homebrew/homebrew#30920.
2014-08-24 14:46:34 -05:00
Jack Nagel
05bb612ce7 Use opt_prefix instead of constructing it manually 2014-08-23 17:42:13 -05:00
Jack Nagel
3d26b75847 Pull common stdlib checking code into a method 2014-08-22 22:18:03 -05:00
Jack Nagel
2a5218dacc Remove unnecessary lasgn 2014-08-09 17:50:55 -05:00
Jack Nagel
47a82b036e Move tab creation outside of the debug loop 2014-08-09 17:50:53 -05:00
Jack Nagel
105db77fc0 Extract build-time stdlib check to a method 2014-08-09 17:50:52 -05:00
Jack Nagel
142beddd7a Use polymorphism to simplify stdlib compatibility check 2014-08-02 19:29:59 -05:00
Jack Nagel
393e10849b Pass the build object into the Tab
Since the Tab is written in the build process, the formula's build
object will have the correct args attached to it already, so we don't
need to reconstruct it.
2014-07-30 20:27:46 -05:00
Jack Nagel
c1ba34734d Remove unused require 2014-07-29 17:09:04 -05:00
Jack Nagel
3f12ddbccd Decouple DATA patches from the executing script 2014-07-29 16:22:06 -05:00
Jack Nagel
8ca8ec3993 Fix up dep directories before activating ENV extensions 2014-07-28 23:20:23 -05:00
Jack Nagel
8a971f7268 Move the fixopt method into the Build class 2014-07-28 21:25:49 -05:00
Jack Nagel
001b2ee471 Reuse existing keg object 2014-06-26 17:21:10 -05:00
Jack Nagel
10fda9e9b9 Decouple spec selection from ARGV 2014-06-20 21:32:36 -05:00
Jack Nagel
f0e13ee97b Use multiple argument form of system 2014-06-20 18:37:24 -05:00
Jack Nagel
e3f082c294 Stop joining symbols to pathnames
Ruby 2.2's native Pathname#/ accepts only string-like objects.
2014-06-09 14:57:21 -05:00
Jack Nagel
974b7e71ef Use opt shortcut methods 2014-06-09 14:57:21 -05:00
Jack Nagel
59515ea126 Remove executable bit from build.rb
- the executed script is the formula file, build.rb is a library
 - ruby is invoked directly, so it wouldn't need to be executable anyway
2014-05-03 10:01:30 -05:00
Jack Nagel
ce1f598e98 Avoid realpath where it is not necessary
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so
only resolving one symlink should suffice, and make it clear what path
we are actually interested in.
2014-04-05 12:17:19 -05:00
Jack Nagel
c7a54f8da1 Use ARGV.env 2014-03-13 16:37:11 -05:00
Jack Nagel
d965bbba47 Allow the debugger to work from inside staged resources
References Homebrew/homebrew#23263.
Closes Homebrew/homebrew#27445.
2014-03-13 10:05:57 -05:00
Jack Nagel
9a83f63c21 Prefer Formula#name method over Formula#to_s 2014-03-03 23:51:30 -06:00
Jack Nagel
caa12678d8 Skip dependency expansion completely when ignore_deps? is true 2014-03-03 23:48:25 -06:00
Misty De Meo
d885d98164 C++ stdlibs: issue warning, don't fail the build 2014-02-02 11:04:30 -08:00
Misty De Meo
edf474cb63 C++ stdlib check: don't check executables for deps
This avoids some possible false positives, as happens with, e.g., qt4.
2014-02-02 11:04:30 -08:00
Jack Nagel
08055e1776 Ensure option names are consistent for default formula requirements 2013-12-09 14:36:10 -06:00
Jack Nagel
69dcc2592c Don't mutate deps collection when expanding requirements
Fixes Homebrew/homebrew-science#213.
2013-12-02 12:47:50 -06:00
Jack Nagel
ae1d00e31f Revert "FormulaInstaller: flush before closing writes."
This reverts commit 5ce8f7a3a494e1d8e812369301fd4c4a05a7d9b7.
2013-11-29 21:05:27 -06:00
Mike McQuaid
3c3bd76528 FormulaInstaller: flush before closing writes.
This seems to help the problem with `brew install -v` sometimes truncating output.

Closes Homebrew/homebrew#24666.
2013-11-26 16:28:27 +00:00
Jack Nagel
2fb5ead38a Prevent deps of build-time deps from leaking into the build environment
When decided what dependencies should be part of the build environment
(and have appropriate entries added to variables like PKG_CONFIG_PATH),
we select the entire dependency tree except for

 (1) inactive optional and recommended deps (2) indirect build-time deps
 (i.e., build-time deps of other deps)

There is a third category that sould be excluded: dependencies of direct
build-time deps. These are irrelevant to the build, and including them
can cause unexpected linkages.
2013-11-13 10:38:14 -06:00
Misty De Meo
3657393017 Move stdlib tracking postinstall
This moves stdlib tracking after the install completes, which allows
the tracking to have access to the actual stdlib in use.

This unfortunately means that builds can error out *after* a build,
resulting in wasted time; however, it reduces false positives, and the
overall user experience is still likely to be better this way.
2013-10-26 21:54:29 -07:00
Misty De Meo
80c77e6113 build: fix typo 2013-10-06 19:34:39 -07:00