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
0859115a
Unverified
Commit
0859115a
authored
4 years ago
by
Mike McQuaid
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #7270 from Bo98/xcode
ENV/super: prioritise Xcode if Xcode is a build req
parents
e94fff89
cb6128fc
No related branches found
No related tags found
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 @
0859115a
...
@@ -44,47 +44,43 @@ module Superenv
...
@@ -44,47 +44,43 @@ module Superenv
def
homebrew_extra_isystem_paths
def
homebrew_extra_isystem_paths
paths
=
[]
paths
=
[]
paths
<<
"
#{
effective_sysroot
}
/usr/include/libxml2"
unless
deps
.
any?
{
|
d
|
d
.
name
==
"libxml2"
}
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/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/apache2"
if
MacOS
::
Xcode
.
without_clt?
paths
<<
MacOS
::
X11
.
include
.
to_s
<<
"
#{
MacOS
::
X11
.
include
}
/freetype2"
if
x11?
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
paths
end
end
def
homebrew_extra_library_paths
def
homebrew_extra_library_paths
paths
=
[]
paths
=
[]
if
compiler
==
:llvm_clang
if
compiler
==
:llvm_clang
paths
<<
if
!
MacOS
.
sdk_path_if_needed
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/usr/lib"
"/usr/lib"
else
"
#{
MacOS
.
sdk_path
}
/usr/lib"
end
paths
<<
Formula
[
"llvm"
].
opt_lib
.
to_s
paths
<<
Formula
[
"llvm"
].
opt_lib
.
to_s
end
end
paths
<<
MacOS
::
X11
.
lib
.
to_s
if
x11?
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
paths
end
end
def
homebrew_extra_cmake_include_paths
def
homebrew_extra_cmake_include_paths
paths
=
[]
paths
=
[]
paths
<<
"
#{
effective_sysroot
}
/usr/include/libxml2"
unless
deps
.
any?
{
|
d
|
d
.
name
==
"libxml2"
}
paths
<<
"
#{
self
[
"HOMEBREW_SDKROOT"
]
}
/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/apache2"
if
MacOS
::
Xcode
.
without_clt?
paths
<<
MacOS
::
X11
.
include
.
to_s
<<
"
#{
MacOS
::
X11
.
include
}
/freetype2"
if
x11?
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
paths
end
end
def
homebrew_extra_cmake_library_paths
def
homebrew_extra_cmake_library_paths
paths
=
[]
paths
=
[]
paths
<<
MacOS
::
X11
.
lib
.
to_s
if
x11?
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
paths
end
end
def
homebrew_extra_cmake_frameworks_paths
def
homebrew_extra_cmake_frameworks_paths
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
paths
end
end
...
@@ -97,23 +93,24 @@ module Superenv
...
@@ -97,23 +93,24 @@ module Superenv
s
.
freeze
s
.
freeze
end
end
def
effective_sysroot
MacOS
.
sdk_path_if_needed
&
.
to_s
end
def
set_x11_env_if_installed
def
set_x11_env_if_installed
ENV
.
x11
=
MacOS
::
X11
.
installed?
ENV
.
x11
=
MacOS
::
X11
.
installed?
end
end
# @private
# @private
def
setup_build_environment
(
formula
=
nil
)
def
setup_build_environment
(
formula
=
nil
)
generic_setup_build_environment
(
formula
)
if
formula
&
.
requirements
&
.
find
{
|
req
|
req
.
is_a?
XcodeRequirement
}
self
[
"HOMEBREW_SDKROOT"
]
=
effective_sysroot
self
[
"HOMEBREW_SDKROOT"
]
=
MacOS
.
sdk_path_if_needed
&&
MacOS
::
Xcode
.
sdk_path
self
[
"HOMEBREW_DEVELOPER_DIR"
]
=
if
MacOS
::
CLT
.
installed?
&&
MacOS
::
CLT
.
provides_sdk?
self
[
"HOMEBREW_DEVELOPER_DIR"
]
=
MacOS
::
Xcode
.
prefix
MacOS
::
CLT
::
PKG_PATH
else
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
end
generic_setup_build_environment
(
formula
)
# Filter out symbols known not to be defined since GNU Autotools can't
# Filter out symbols known not to be defined since GNU Autotools can't
# reliably figure this out with Xcode 8 and above.
# 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