Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
cb6128fc
Commit
cb6128fc
authored
4 years ago
by
Bo Anderson
Browse files
Options
Downloads
Patches
Plain Diff
ENV/super: prioritise Xcode if Xcode is a build req
parent
93e323ff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/extend/os/mac/extend/ENV/super.rb
+20
-23
20 additions, 23 deletions
Library/Homebrew/extend/os/mac/extend/ENV/super.rb
with
20 additions
and
23 deletions
Library/Homebrew/extend/os/mac/extend/ENV/super.rb
+
20
−
23
View file @
cb6128fc
...
...
@@ -44,47 +44,43 @@ module Superenv
def
homebrew_extra_isystem_paths
paths
=
[]
paths
<<
"
#{
effective_sysroot
}
/usr/include/libxml2"
unless
deps
.
any?
{
|
d
|
d
.
name
==
"libxml2"
}
paths
<<
"
#{
effective_sysroot
}
/usr/include/apache2"
if
MacOS
::
Xcode
.
without_clt?
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/usr/include/libxml2"
unless
deps
.
any?
{
|
d
|
d
.
name
==
"libxml2"
}
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/usr/include/apache2"
if
MacOS
::
Xcode
.
without_clt?
paths
<<
MacOS
::
X11
.
include
.
to_s
<<
"
#{
MacOS
::
X11
.
include
}
/freetype2"
if
x11?
paths
<<
"
#{
effective_sysroot
}
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
paths
end
def
homebrew_extra_library_paths
paths
=
[]
if
compiler
==
:llvm_clang
paths
<<
if
!
MacOS
.
sdk_path_if_needed
"/usr/lib"
else
"
#{
MacOS
.
sdk_path
}
/usr/lib"
end
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/usr/lib"
paths
<<
Formula
[
"llvm"
].
opt_lib
.
to_s
end
paths
<<
MacOS
::
X11
.
lib
.
to_s
if
x11?
paths
<<
"
#{
effective_sysroot
}
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
paths
end
def
homebrew_extra_cmake_include_paths
paths
=
[]
paths
<<
"
#{
effective_sysroot
}
/usr/include/libxml2"
unless
deps
.
any?
{
|
d
|
d
.
name
==
"libxml2"
}
paths
<<
"
#{
effective_sysroot
}
/usr/include/apache2"
if
MacOS
::
Xcode
.
without_clt?
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/usr/include/libxml2"
unless
deps
.
any?
{
|
d
|
d
.
name
==
"libxml2"
}
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/usr/include/apache2"
if
MacOS
::
Xcode
.
without_clt?
paths
<<
MacOS
::
X11
.
include
.
to_s
<<
"
#{
MacOS
::
X11
.
include
}
/freetype2"
if
x11?
paths
<<
"
#{
effective_sysroot
}
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
paths
end
def
homebrew_extra_cmake_library_paths
paths
=
[]
paths
<<
MacOS
::
X11
.
lib
.
to_s
if
x11?
paths
<<
"
#{
effective_sysroot
}
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
paths
end
def
homebrew_extra_cmake_frameworks_paths
paths
=
[]
paths
<<
"
#{
effective_sysroot
}
/System/Library/Frameworks"
if
MacOS
::
Xcode
.
without_clt?
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/System/Library/Frameworks"
if
MacOS
::
Xcode
.
without_clt?
paths
end
...
...
@@ -97,23 +93,24 @@ module Superenv
s
.
freeze
end
def
effective_sysroot
MacOS
.
sdk_path_if_needed
&
.
to_s
end
def
set_x11_env_if_installed
ENV
.
x11
=
MacOS
::
X11
.
installed?
end
# @private
def
setup_build_environment
(
formula
=
nil
)
generic_setup_build_environment
(
formula
)
self
[
"HOMEBREW_SDKROOT"
]
=
effective_sysroot
self
[
"HOMEBREW_DEVELOPER_DIR"
]
=
if
MacOS
::
CLT
.
installed?
&&
MacOS
::
CLT
.
provides_sdk?
MacOS
::
CLT
::
PKG_PATH
if
formula
&
.
requirements
&
.
find
{
|
req
|
req
.
is_a?
XcodeRequirement
}
self
[
"HOMEBREW_SDKROOT"
]
=
MacOS
.
sdk_path_if_needed
&&
MacOS
::
Xcode
.
sdk_path
self
[
"HOMEBREW_DEVELOPER_DIR"
]
=
MacOS
::
Xcode
.
prefix
else
MacOS
::
Xcode
.
prefix
self
[
"HOMEBREW_SDKROOT"
]
=
MacOS
.
sdk_path_if_needed
&
.
to_s
self
[
"HOMEBREW_DEVELOPER_DIR"
]
=
if
MacOS
::
CLT
.
installed?
&&
MacOS
::
CLT
.
provides_sdk?
MacOS
::
CLT
::
PKG_PATH
else
MacOS
::
Xcode
.
prefix
end
end
generic_setup_build_environment
(
formula
)
# Filter out symbols known not to be defined since GNU Autotools can't
# reliably figure this out with Xcode 8 and above.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment