HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //lib/python2.7/dist-packages/gyp/xcode_emulation.pyc
�
�M(^c@s�dZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZea
eaed�Zdefd��YZd�Zdefd	��YZd
efd��YZd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zed�Zd�Zd�Zd�Z ed�Z!e"d�Z#d�Z$d�Z%d�Z&dS(s~
This module contains classes that help to emulate xcodebuild behavior on top of
other build systems, such as make and ninja.
i����N(tGypErrorcCs$i|d6}|r ||d<n|S(sConstructs a dictionary with expansion for $(ARCHS_STANDARD) variable,
  and optionally for $(ARCHS_STANDARD_INCLUDING_64_BIT).s$(ARCHS_STANDARD)s"$(ARCHS_STANDARD_INCLUDING_64_BIT)((tarchstarchs_including_64_bittmapping((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytXcodeArchsVariableMappings

tXcodeArchsDefaultcBsAeZdZejd�Zd�Zd�Zd�Zd�Z	RS(s�A class to resolve ARCHS variable from xcode_settings, resolving Xcode
  macros and implementing filtering by VALID_ARCHS. The expansion of macros
  depends on the SDKROOT used ("macosx", "iphoneos", "iphonesimulator") and
  on the version of Xcode.
  s\$\([a-zA-Z_][a-zA-Z0-9_]*\)$cCs.|f|_i|d6|d6|d6|_dS(Ntmactiostiossim(t_defaultt_archs(tselftdefaultRtiphonesimulatortiphoneos((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt__init__1scCsI|j�}d|kr#|jdSd|kr:|jdS|jdSdS(sDReturns the dictionary of variable mapping depending on the SDKROOT.RRR
RRN(tlowerR
(Rtsdkroot((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_VariableMapping5sc	Cs�|j|�}g}x�|D]�}|jj|�r�|}y;||}x*|D]"}||krN|j|�qNqNWWq�tk
r�}d|GHq�Xq||kr|j|�qqW|S(s=Expands variables references in ARCHS, and remove duplicates.s,Warning: Ignoring unsupported variable "%s".(Rtvariable_patterntmatchtappendtKeyError(	RRRtvariable_mappingtexpanded_archstarchtvariabletvariable_expansionte((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_ExpandArchs?s


cCsg|j|p|j|pd�}|rcg}x*|D]"}||kr4|j|�q4q4W|}n|S(s�Expands variables references in ARCHS, and filter by VALID_ARCHS if it
    is defined (if not set, Xcode accept any value in ARCHS, otherwise, only
    values present in VALID_ARCHS are kept).t(RR	R(RRtvalid_archsRRtfiltered_archsR((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytActiveArchsQs!
	(
t__name__t
__module__t__doc__tretcompileRRRRR!(((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR's		
	c	Cs
tr
tSt�\}}|dkrXtdtdg�tdg�tdg��an�|dkr�tdtdgdg�tdgddg�tddgddd	g��anTtdtdgdg�tddgddg�tddd	gddd	g��atS(
s�Returns the |XcodeArchsDefault| object to use to expand ARCHS for the
  installed version of Xcode. The default values used by Xcode for ARCHS
  and the expansion of the variables depends on the version of Xcode used.

  For all version anterior to Xcode 5.0 or posterior to Xcode 5.1 included
  uses $(ARCHS_STANDARD) if ARCHS is unset, while Xcode 5.0 to 5.0.2 uses
  $(ARCHS_STANDARD_INCLUDING_64_BIT). This variable was added to Xcode 5.0
  and deprecated with Xcode 5.1.

  For "macosx" SDKROOT, all version starting with Xcode 5.0 includes 64-bit
  architecture as part of $(ARCHS_STANDARD) and default to only building it.

  For "iphoneos" and "iphonesimulator" SDKROOT, 64-bit architectures are part
  of $(ARCHS_STANDARD_INCLUDING_64_BIT) from Xcode 5.0. From Xcode 5.1, they
  are also part of $(ARCHS_STANDARD).

  All thoses rules are coded in the construction of the |XcodeArchsDefault|
  object to use depending on the version of Xcode detected. The object is
  for performance reason.t0500s$(ARCHS_STANDARD)ti386tarmv7t0510s"$(ARCHS_STANDARD_INCLUDING_64_BIT)tx86_64tarmv7starm64(tXCODE_ARCHS_DEFAULT_CACHEtXcodeVersionRR(t
xcode_versiont_((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetXcodeArchsDefault_s2	t
XcodeSettingscBs�eZdZiZiZiZiZiZd�Zd�Z	d�Z
d�ZdJd�Z
d�Zd�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d�Z'd �Z(d!�Z)d"�Z*d#�Z+d$�Z,d%�Z-d&�Z.d'�Z/d(�Z0dJd)�Z1dJd*�Z2d+�Z3d,�Z4dJd-�Z5d.�Z6d/�Z7d0�Z8d1�Z9d2�Z:d3�Z;d4�Z<d5�Z=d6�Z>d7�Z?d8�Z@dJd9�ZAd:�ZBd;�ZCdJd<�ZDdJd=�ZEd>�ZFd?�ZGeHd@�ZIdA�ZJdB�ZKgeHdC�ZLdJdD�ZMdJdE�ZNdF�ZOdG�ZPdJdH�ZQdI�ZRRS(Ks9A class that understands the gyp 'xcode_settings' object.cCs�||_t|_d|_d|_i|_|d}xe|j�D]W\}}|jdi�|j|<|j	|�|j|jdd�rDt
|_qDqDWd|_tj
d�|_dS(Ntconfigurationstxcode_settingstIPHONEOS_DEPLOYMENT_TARGETs^lib([^/]+)\.(a|dylib)$(tspectFalsetisIOStNonetmac_toolchain_dirtheader_map_pathR5t	iteritemstgett_ConvertConditionalKeystTruet
confignameR%R&t
library_re(RR7tconfigsRAtconfig((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR�s					

		cCs�|j|}g|D]}|jd�r|^q}xl|D]d}|jd�r�|jd�r�|jd�d}||||<q�ndGdj|�GH||=q<WdS(	s�Converts or warns on conditional keys.  Xcode supports conditional keys,
    such as CODE_SIGN_IDENTITY[sdk=iphoneos*].  This is a partial implementation
    with some keys converted while the rest force a warning.t]s[sdk=iphoneos*]Rt[is4Warning: Conditional keys not implemented, ignoring:t N(R5tendswithtsplittjoin(RRAtsettingstkeytconditional_keystnew_key((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR?�s
(
cCs|jst�|j|jS(N(RAtAssertionErrorR5(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt	_Settings�scCs|j�j||�|kS(N(RPR>(Rttest_keytcond_keyR((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_Test�scCsZ||j�kr6|j|t|j�|��n |rV|j|t|��ndS(N(RPRtstr(RtlstRQt
format_strR((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_Appendf�s$cCs"||j�krd|GHndS(Ns/Warning: Ignoring not yet implemented key "%s".(RP(RRQ((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_WarnUnimplemented�scCs8|jrdnd}|j|jd|�}|dkS(NtbinarytxmltINFOPLIST_OUTPUT_FORMAT(R9R5R>(RRARtformat((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytIsBinaryOutputFormat�s	cCs&|jddko%|j�o%|jS(Nttypetshared_library(R7t	_IsBundleR9(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytIsIosFramework�scCs7t|jjdd��dkp6|j�p6|j�S(Nt
mac_bundlei(tintR7R>t	_IsXCTestt_IsXCUiTest(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR`�s-cCst|jjdd��dkS(Ntmac_xctest_bundlei(RcR7R>(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyRd�scCst|jjdd��dkS(Ntmac_xcuitest_bundlei(RcR7R>(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyRe�scCst|jjdd��dkS(Ntios_app_extensioni(RcR7R>(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_IsIosAppExtension�scCst|jjdd��dkS(Ntios_watchkit_extensioni(RcR7R>(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_IsIosWatchKitExtension�scCst|jjdd��dkS(Nt
ios_watch_appi(RcR7R>(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_IsIosWatchApp�scCs%|j�st�|jddd�S(sPReturns the framework version of the current target. Only valid for
    bundles.tFRAMEWORK_VERSIONRtA(R`ROtGetPerTargetSetting(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetFrameworkVersion�scCs�|j�st�|jddkrpidd6dd6|jd}|jdd|�}d|jjd	|�S|jdd
kr�|j�s�|j�r�d|jjd	d�Sd|jjd	d�Sn*ts�td
|jd|jdf��dS(s[Returns the bundle extension (.app, .framework, .plugin, etc).  Only
    valid for bundles.R^tloadable_moduleR_tbundlet	frameworktWRAPPER_EXTENSIONRt.tproduct_extensiont
executabletappextapps*Don't know extension for '%s', target '%s'ttarget_nameN(RrR_(R`ROR7RpR>RiRkR8(Rtdefault_wrapper_extensiontwrapper_extension((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetWrapperExtensionscCs|jjd|jd�S(sReturns PRODUCT_NAME.tproduct_nameR{(R7R>(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetProductNamescCs$|j�r|j�S|j�SdS(sReturns FULL_PRODUCT_NAME.N(R`tGetWrapperNamet_GetStandaloneBinaryPath(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetFullProductNames
cCs&|j�st�|j�|j�S(s`Returns the directory name of the bundle represented by this target.
    Only valid for bundles.(R`ROR�R~(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR� scCsw|jr|j�S|j�s%t�|jddkrZtjj|j�d|j��Stjj|j�d�SdS(s�Returns the qualified path to the bundle's contents folder. E.g.
    Chromium.app/Contents or Foo.bundle/Versions/A. Only valid for bundles.R^R_tVersionstContentsN(	R9R�R`ROR7tostpathRJRq(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetBundleContentsFolderPath&s	
	cCs>|j�st�|jr%|j�Stjj|j�d�S(s}Returns the qualified path to the bundle's resource folder. E.g.
    Chromium.app/Contents/Resources. Only valid for bundles.t	Resources(R`ROR9R�R�R�RJ(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetBundleResourceFolder3s	
cCsh|j�st�|jddks.|jr8|j�S|jddkrdtjj|j�d�SdS(s|Returns the qualified path to the bundle's executables folder. E.g.
    Chromium.app/Contents/MacOS. Only valid for bundles.R^R_RxRrtMacOSN(RxRr(R`ROR7R9R�R�R�RJ(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetBundleExecutableFolderPath;s

cCs+|j�st�tjj|j�d�S(s�Returns the qualified path to the bundle's Java resource folder.
    E.g. Chromium.app/Contents/Resources/Java. Only valid for bundles.tJava(R`ROR�R�RJR�(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetBundleJavaFolderPathDscCs+|j�st�tjj|j�d�S(s�Returns the qualified path to the bundle's frameworks folder. E.g,
    Chromium.app/Contents/Frameworks. Only valid for bundles.t
Frameworks(R`ROR�R�RJR�(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetBundleFrameworksFolderPathJscCs+|j�st�tjj|j�d�S(s�Returns the qualified path to the bundle's frameworks folder. E.g,
    Chromium.app/Contents/SharedFrameworks. Only valid for bundles.tSharedFrameworks(R`ROR�R�RJR�(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt#GetBundleSharedFrameworksFolderPathPscCsL|j�st�|jddkr/|j�Stjj|j�d�SdS(s�Returns the qualified path to the bundle's shared support folder. E.g,
    Chromium.app/Contents/SharedSupport. Only valid for bundles.R^R_t
SharedSupportN(R`ROR7R�R�R�RJR�(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt GetBundleSharedSupportFolderPathWs

cCs+|j�st�tjj|j�d�S(szReturns the qualified path to the bundle's plugins folder. E.g,
    Chromium.app/Contents/PlugIns. Only valid for bundles.tPlugIns(R`ROR�R�RJR�(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetBundlePlugInsFolderPathascCs+|j�st�tjj|j�d�S(s�Returns the qualified path to the bundle's XPC services folder. E.g,
    Chromium.app/Contents/XPCServices. Only valid for bundles.tXPCServices(R`ROR�R�RJR�(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetBundleXPCServicesFolderPathgscCsj|j�st�|jddks1|j�rJtjj|j�d�Stjj|j�dd�SdS(syReturns the qualified path to the bundle's plist file. E.g.
    Chromium.app/Contents/Info.plist. Only valid for bundles.R^RxRrs
Info.plistR�N(RxRr(R`ROR7RaR�R�RJR�(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetBundlePlistPathmscCs+|j�r3|j�s/td|jd��dS|j�rf|j�sbtd|jd��dS|j�r�|j�s�td|jd��dS|j�r�|j�s�td|jd��d	S|j�r�id
d6dd
6dd6|jdSidd6dd
6dd6dd6|jdSdS(s(Returns the PRODUCT_TYPE of this target.s6ios_app_extension flag requires mac_bundle (target %s)R{s$com.apple.product-type.app-extensions;ios_watchkit_extension flag requires mac_bundle (target %s)s)com.apple.product-type.watchkit-extensions2ios_watch_app flag requires mac_bundle (target %s)s+com.apple.product-type.application.watchapps8mac_xcuitest_bundle flag requires mac_bundle (target %s)s(com.apple.product-type.bundle.ui-testings"com.apple.product-type.applicationRxscom.apple.product-type.bundleRrs com.apple.product-type.frameworkR_R^scom.apple.product-type.tools&com.apple.product-type.library.dynamics%com.apple.product-type.library.statictstatic_libraryN(RiR`ROR7RkRmRe(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetProductTypexs8cCsO|j�r$|jddkr$dSidd6dd6dd6d	d
6|jdS(s'Returns the MACH_O_TYPE of this target.R^RxRt
mh_executet	staticlibR�tmh_dylibR_t	mh_bundleRr(R`R7(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetMachOType�s cCs1|j�st�tjj|j�|j��S(sReturns the name of the bundle binary of by this target.
    E.g. Chromium.app/Contents/MacOS/Chromium. Only valid for bundles.(R`ROR�R�RJR�tGetExecutableName(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_GetBundleBinaryPath�scCsId|jkrd|jdSidd6dd6dd6d	d
6|jdS(NRwRvRRxs.aR�s.dylibR_s.soRrR^(R7(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_GetStandaloneExecutableSuffix�scCs:|jjdidd6dd6dd6dd6|jd�S(	Ntproduct_prefixRRxtlibR�R_RrR^(R7R>(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_GetStandaloneExecutablePrefix�scCs�|j�st�|jddks=td|jd��|jd}|jddkr}|d d	kr�|d}q�n3|jddkr�|d d	kr�|d}q�n|j�}|jjd
|�}|j�}|||S(
swReturns the name of the non-bundle binary represented by this target.
    E.g. hello_world. Only valid for non-bundles.R^RxR_R�RrsUnexpected type %sR{iR�R(RxR_R�Rr(RrR_(R`ROR7R�R>R�(Rttargett
target_prefixt
target_ext((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR��s

cCs4|j�r&|jjd|jd�S|j�SdS(sXReturns the executable name of the bundle represented by this target.
    E.g. Chromium.RR{N(R`R7R>R�(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR��scCs$|j�r|j�S|j�SdS(s�Returns the qualified path to the primary executable of the bundle
    represented by this target. E.g. Chromium.app/Contents/MacOS/Chromium.N(R`R�R�(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetExecutablePath�s
cCsD|j|}t�}|j|jd�|jd�|jd��S(s:Returns the architectures this target should be built for.tARCHStVALID_ARCHStSDKROOT(R5R2R!R>(RRAtconfig_settingstxcode_archs_default((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetActiveArchs�s
	cCs(ytdd||g�SWnnXdS(Ntxcruns--sdk(tGetStdoutQuiet(Rtsdktinfoitem((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_GetSdkVersionInfoItem�scCs.|dkr|j}n|jd|dd�S(NR�RR(R:RAtGetPerConfigSetting(RRA((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_SdkRoot�scCsK|j|�}|tjkr@|j|d�}|tj|<ntj|S(Ns--show-sdk-platform-path(R�R3t_platform_path_cacheR�(RRAtsdk_roott
platform_path((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_XcodePlatformPath�s		cCs/|j|�}|jd�r"|S|j|�S(Nt/(R�t
startswitht
_XcodeSdkPath(RRAR�((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_SdkPathscCsR|tjkrG|j|d�}|tj|<|rG|tj|<qGntj|S(Ns--show-sdk-path(R3t_sdk_path_cacheR�t_sdk_root_cache(RR�tsdk_path((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR�	s
cCs�|j|dd�d|j�kr~tjj|j��}|j�jd�rh|j|dd�q~|j|dd�ndS(NtMACOSX_DEPLOYMENT_TARGETs-mmacosx-version-min=%sR6R
s-mios-simulator-version-min=%ss-miphoneos-version-min=%s(RWRPR�R�tbasenameR�RR�(RRUtsdk_path_basename((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_AppendPlatformVersionMinFlagss
cCsJ||_g}|j�}d|j�krG|rG|jd|�n|jrg|jd|j�n|jdddd�r�|jd�n|jd	ddd�r�|jd
�n|jdddd�r�|jd�nd
|j�kr|j�d
dkr|jd�qn|jdddd�rB|jd�n|j|dddd�|jdddd�r�|j�jdd�}|dkr�|jd�q�|dkr�td��q�|dkr�|jd�q�td|��n|j�jd�dkr|jd�n+|j�jd�dkrG|jd�n|jdddd�ro|jd �n|jd!ddd�r�|jd"�n|jd#ddd�r�|jd$�n|jd%ddd�r�|jd&�n|j	|�|jd'ddd�r|j
d'�n|j
d(�|j
d)�|j
d*�|j
d+�|dAk	rh|g}n!|jswt�|j
|j�}t|�d,kr�|j
d-�d.g}n|jd/|d0�|d0dBkr||jd2ddd�r|jd3�n|jd4ddd�r)|jd5�n|jd6ddd�rQ|jd7�n|jd8ddd�r||jd9�q|n||j�jd:g�7}|j�r�|j|�}|r�|jd;|d<�q�n|r�|}nd=}|jd>|j}	|	jd?g�}
x+|
D]#}|jd;|jd@|��qWdA|_|S(CsMReturns flags that need to be added to .c, .cc, .m, and .mm
    compilations.R�s-isysroot %ss-I%stCLANG_WARN_CONSTANT_CONVERSIONtYESRtNOs-Wconstant-conversiontGCC_CHAR_IS_UNSIGNED_CHARs-funsigned-chartGCC_CW_ASM_SYNTAXs-fasm-blockstGCC_DYNAMIC_NO_PICs-mdynamic-no-pictGCC_ENABLE_PASCAL_STRINGSs-mpascal-stringstGCC_OPTIMIZATION_LEVELs-O%ststGCC_GENERATE_DEBUGGING_SYMBOLStDEBUG_INFORMATION_FORMATtdwarfs	-gdwarf-2tstabss(stabs debug format is not supported yet.sdwarf-with-dsymsUnknown debug format %stGCC_STRICT_ALIASINGs-fstrict-aliasings-fno-strict-aliasingtGCC_SYMBOLS_PRIVATE_EXTERNs-fvisibility=hiddentGCC_TREAT_WARNINGS_AS_ERRORSs-WerrortGCC_WARN_ABOUT_MISSING_NEWLINEs
-Wnewline-eoftLLVM_LTOs-fltotCOPY_PHASE_STRIPtGCC_DEBUGGING_SYMBOLStGCC_ENABLE_OBJC_EXCEPTIONStMACH_O_TYPEtPRODUCT_TYPEiR�R(s-arch iR+tGCC_ENABLE_SSE3_EXTENSIONSs-msse3t)GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONSs-mssse3tGCC_ENABLE_SSE41_EXTENSIONSs-msse4.1tGCC_ENABLE_SSE42_EXTENSIONSs-msse4.2tWARNING_CFLAGSs-Fs/Developer/Library/Frameworks/RR4tmac_framework_dirss
$(SDKROOT)N(R(R+(RAR�RPRR<RSRWR>tNotImplementedErrorR�RXR:ROR�tlenRdR�R7treplace(RRARtcflagsR�t
dbg_formatRt
platform_roottframework_rootRDtframework_dirst	directory((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt	GetCflagss�		





		
!	cCsy||_g}|j�jdd�dkr=|jd�n|j|dd�||j�jdg�7}d|_|S(s?Returns flags that need to be added to .c, and .m compilations.tGCC_C_LANGUAGE_STANDARDRtansis-ansis-std=%stOTHER_CFLAGSN(RARPR>RRWR:(RRAtcflags_c((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt
GetCflagsC�s		cCs�||_g}|j�jd�}|r>|jd|�n|j|dd�|jdddd�ry|jd	�n|jd
ddd�r�|jd�n|jdddd�r�|jd
�n|jdddd�r�|jd�n|jdddd�r|jd�ng}xp|j�jddg�D]S}|dkrVd}n|dkr�||j�jdg�7}q;|j|�q;W||7}d|_|S(sAReturns flags that need to be added to .cc, and .mm compilations.tCLANG_CXX_LANGUAGE_STANDARDs-std=%stCLANG_CXX_LIBRARYs
-stdlib=%stGCC_ENABLE_CPP_RTTIR�RR�s	-fno-rttitGCC_ENABLE_CPP_EXCEPTIONSs-fno-exceptionstGCC_INLINES_ARE_PRIVATE_EXTERNs-fvisibility-inlines-hiddentGCC_THREADSAFE_STATICSs-fno-threadsafe-staticst%GCC_WARN_ABOUT_INVALID_OFFSETOF_MACROs-Wno-invalid-offsetoftOTHER_CPLUSPLUSFLAGSs$(inherited)s
$inheriteds${inherited}s
$OTHER_CFLAGSs$(OTHER_CFLAGS)s${OTHER_CFLAGS}R�(s
$inheriteds$(inherited)s${inherited}(s
$OTHER_CFLAGSs$(OTHER_CFLAGS)s${OTHER_CFLAGS}N(RARPR>RRWRSR:(RRAt	cflags_cctclang_cxx_language_standardt
other_ccflagstflag((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetCflagsCC�s6		"	
	cCsT|j�jdd�}|dkr4|jd�n|dkrP|jd�ndS(NtGCC_ENABLE_OBJC_GCtunsupportedt	supporteds	-fobjc-gctrequireds-fobjc-gc-only(RPR>R(Rtflagst	gc_policy((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt$_AddObjectiveCGarbageCollectionFlags�s
cCs,|jdddd�r(|jd�ndS(NtCLANG_ENABLE_OBJC_ARCR�RR�s
-fobjc-arc(RSR(RR((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_AddObjectiveCARCFlags�scCs,|jdddd�r(|jd�ndS(Nt*CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESISR�RR�s!-Wobjc-missing-property-synthesis(RSR(RR((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt+_AddObjectiveCMissingPropertySynthesisFlags�s	cCsC||_g}|j|�|j|�|j|�d|_|S(s7Returns flags that need to be added to .m compilations.N(RARRR
R:(RRAtcflags_objc((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt
GetCflagsObjC�s	


	cCsk||_g}|j|�|j|�|j|�|jdddd�r^|jd�nd|_|S(s8Returns flags that need to be added to .mm compilations.tGCC_OBJC_CALL_CXX_CDTORSR�RR�s-fobjc-call-cxx-cdtorsN(RARRR
RSRR:(RRAtcflags_objcc((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetCflagsObjCC�s	


	cCsa|jddkr6|jddks2|j�r6dS|jdd|j�rTdnd�}|S(	s/Return DYLIB_INSTALL_NAME_BASE for this target.R^R_RrtDYLIB_INSTALL_NAME_BASERs/Library/Frameworkss/usr/local/libN(R7R`R:Rp(Rtinstall_base((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetInstallNameBase�scCsqd|krmd|}}|jd�rC|jdd�\}}ntjj|�}tjj||�}n|S(s(Do :standardizepath processing for path.R�Rt@i(R�RIR�R�tnormpathRJ(RR�tprefixtrest((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_StandardizePath�s
cCs/|jddkr6|jddks2|j�r6dSd}|jdd|�}d|kr+|d|fks�td	|jd
|f��|jd|j|j���}|j�r�|jd|j��}|jd
|j	��}n$d|ks�t�d
|kst�|jd|j
��}n|S(s-Return LD_DYLIB_INSTALL_NAME for this target.R^R_Rrs=$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)tLD_DYLIB_INSTALL_NAMERt$sJ$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)s\Variables in LD_DYLIB_INSTALL_NAME are not generally supported yet in target '%s' (got '%s')R{s*$(DYLIB_INSTALL_NAME_BASE:standardizepath)s$(WRAPPER_NAME)s$(PRODUCT_NAME)s$(EXECUTABLE_PATH)N(R7R`R:RpROR�RRR�R�R�(Rtdefault_install_nametinstall_name((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetInstallNames0c	Cs�d}d}d|gd|gd|gd|||gg}xy|D]q}tjddj|��}|j|�}|rC||jd	� ||jd	��||jd	�}qCqCW|jd
�r�d
||td
��}n|S(suChecks if ldflag contains a filename and if so remaps it from
    gyp-directory-relative to build-directory-relative.s(\S+)s\S+s-exported_symbols_lists-unexported_symbols_lists-reexported_symbols_lists-sectcreates	(?:-Wl,)?s[ ,]is-L(	R%R&RJRtstarttgrouptendR�R�(	Rtldflagtgyp_to_build_pathtLINKER_FILEtWORDtlinker_flagstflag_patterntregextm((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_MapLinkerFlagFilename1s			
#cCs�||_g}x9|j�jdg�D]}|j|j||��q(W|jdddd�rs|jd�n|jdddd�r�|jd�n|j|d	d
�|j|dd�|j|�d
|j�kr|j�r|jd|j��nx7|j�jdg�D]}|jd||��qWd|j�krv|jd0||j�d��n|d1k	r�|g}n!|js�t
�|j|j�}t|�dkr�|j
d�dg}n|jd|d�|jd|dkr
|nd�|j�}	|	rW|jddkrW|jd|	jdd��nx1|j�jd g�D]}
|jd!|
�qpW|j�}|s�d"}n|jd#|j}|jd$g�}
x+|
D]#}|jd%|jd&|��q�W|j�rI|j|�}|rI|rI|jd%|d'�|jd(�qIn|j�p^|j�}|r�|r�t�d)kr�|jd*�|j|d+�n
|jd,�|jd-�n|j|d.d/�d1|_|S(2s�Returns flags that need to be passed to the linker.

    Args:
        configname: The name of the configuration to get ld flags for.
        product_dir: The directory where products such static and dynamic
            libraries are placed. This is added to the library search path.
        gyp_to_build_path: A function that converts paths relative to the
            current gyp file to paths relative to the build direcotry.
    t
OTHER_LDFLAGStDEAD_CODE_STRIPPINGR�RR�s-Wl,-dead_stript
PREBINDINGs-Wl,-prebindtDYLIB_COMPATIBILITY_VERSIONs-compatibility_version %stDYLIB_CURRENT_VERSIONs-current_version %sR�s
-isysroot tLIBRARY_SEARCH_PATHSs-Lt
ORDER_FILEs-Wl,-order_file s-Wl,iR�R(s-arch iRvs./R^Rrs-install_name RGs\ tLD_RUNPATH_SEARCH_PATHSs-Wl,-rpath,RR4R�s-Fs
$(SDKROOT)s/Developer/Library/Frameworks/s-framework XCTestt0900s	-lpkstarts?/System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKits-e _NSExtensionMains-fapplication-extensionR�s
-stdlib=%ss-Wl,-order_file -Wl,N(RARPR>RR(RSRWR�R�R:ROR�R�RXRR7R�RdR�RiRkR/(RRAtproduct_dirR!RtldflagsR tlibrary_pathRRtrpathR�RDR�R�R�tis_extension((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt
GetLdflagsMst
	



# 	
!
	
	cCsL||_g}x-|j�jdg�D]}|j|�q(Wd|_|S(s�Returns flags that need to be passed to the static linker.

    Args:
        configname: The name of the configuration to get ld flags for.
    R)N(RARPR>RR:(RRAtlibtoolflagstlibtoolflag((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetLibtoolflags�s		cCs�t}i}x�t|jj��D]x}|rJt|j|�}t}q"xM|j|j�D]8\}}||kr|q^q^|||kr^||=q^q^Wq"W|S(s~Gets a list of all the per-target settings. This will only fetch keys
    whose values are the same across all configurations.(R@tsortedR5tkeystdictR8R=(Rt
first_passtresultRARLtvalue((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetPerTargetSettings�s	 cCs:||jkr&|j|j||�S|j||�SdS(N(R5R>Rp(RtsettingRAR((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR��scCs�t}d}x�t|jj��D]j}|rP|j|j|d�}t}q"||j|j|d�ks"td||jdf��q"W|dkr�|S|S(s�Tries to get xcode_settings.setting from spec. Assumes that the setting
       has the same value in all configurations and throws otherwise.sHExpected per-target setting for '%s', got per-config setting (target %s)R{N(	R@R:R;R5R<R>R8ROR7(RRBRt
is_first_passR?RA((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyRp�s	"c	CsI||_g}|jdddd�r<|jdddd�r<d}|jddksd|j�ry|j�ryd	}n|jdd
kr�d}n|j�jd|�}id
d6dd	6dd6|}|j�jdd
�}|r|dt|�7}n|s"|jd|jd�n|jd||f�nd|_|S(s�Returns a list of shell commands that contain the shell commands
    neccessary to strip this target's binary. These should be run as postbuilds
    before the actual postbuilds run.tDEPLOYMENT_POSTPROCESSINGR�RR�tSTRIP_INSTALLED_PRODUCTt	debuggingR^Rrs
non-globalRxtalltSTRIP_STYLERs-xs-St
STRIPFLAGSRGsecho STRIP\(%s\)R{sstrip %s %sN(
RARSR7RiR`RPR>t_NormalizeEnvVarReferencesRR:(	RRAt
output_binarytquietR?tdefault_strip_styletstrip_styletstrip_flagstexplicit_strip_flags((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_GetStripPostbuilds�s0				cCs�||_g}|jdddd�r�|jdddd�r�|jddkr�|ss|jd	|jd
�n|jd||df�nd
|_|S(s�Returns a list of shell commands that contain the shell commands
    neccessary to massage this target's debug information. These should be run
    as postbuilds before the actual postbuilds run.R�R�RR�sdwarf-with-dsymR�R^R�secho DSYMUTIL\(%s\)R{sdsymutil %s -o %ss.dSYMN(RARSR7RR:(RRAtoutputRKRLR?((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_GetDebugInfoPostbuilds	s		cCs)|j||||�|j|||�S(s�Returns a list of shell commands that contain the shell commands
    to run as postbuilds for this target, before the actual postbuilds.(RSRQ(RRARRRKRL((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_GetTargetPostbuildssc	Cs$|jr(|jddkp1|j�p1|j�s8gSg}|j�}|j|}|j�r�tjjd|�}tjj	|j
d��}tjj|d|�}|jd||fg�n|j|�}	|	s�|Sdg}
t
|
�t
|j|j��@}
|
r.dd	jt|
��GHn|j�r�tjj	|j
d��}tjj|d
�}|j|�}ddg}
x�|
D]�}tjj||�}tjj|tjj|��}|jd||fg�|jd
tjjdd�|	|j
dd�|j
dd�|tfg�q�Wtjj|d�}tjj||�|g}x^|D]S}|jd
tjjdd�|	|j
dd�|j
dd�|tfg�qjWn|jd
tjjdd�|	|j
dd�|j
dd�tjjd|�tfg�|S(s�Return a shell command to codesign the iOS output binary so it can
    be deployed to a device.  This should be run as the very last step of the
    build.R^Rxs${BUILT_PRODUCTS_DIR}t	TEST_HOSTR�sditto %s %stOTHER_CODE_SIGN_FLAGSs9Warning: Some codesign keys not implemented, ignoring: %ss, R�s@Developer/Library/PrivateFrameworks/IDEBundleInjection.frameworks-Developer/Library/Frameworks/XCTest.frameworks*%s code-sign-bundle "%s" "%s" "%s" "%s" %ss${TARGET_BUILD_DIR}sgyp-mac-tooltCODE_SIGN_ENTITLEMENTSRtPROVISIONING_PROFILE(R9R7RdRaR�R5R�R�RJtdirnameR>textendt_GetIOSCodeSignIdentityKeytsetR<R;R�R�R@R8(RRARKt
postbuildsRRKtsourcet	test_hosttxctest_destinationRLtunimpltframeworks_dirR�t
frameworksRttdestinationt
plugin_dirttargetsR�((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_GetIOSPostbuilds%s^	
	#	
!	$
	'	 cCs�|jd�}|sdS|tjkr�tjdddddg�}xx|j�D]g}||krS|j�d}tj}||ks�|||ks�td|��|tj|<qSqSWntjj|d	�S(
NtCODE_SIGN_IDENTITYtsecuritys
find-identitys-ptcodesignings-vis2Multiple codesigning fingerprints for identity: %sR(	R>R:R3t_codesigning_key_cachet
subprocesstcheck_outputt
splitlinesRIRO(RRKtidentityRRtlinetfingerprinttcache((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR[hs	
cCsH|dk	st�|j||||�}|j||�}|||S(sSReturns a list of shell commands that should run before and after
    |postbuilds|.N(R:RORTRg(RRARRRKR]RLtpretpost((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytAddImplicitPostbuildsxsc	Cs|jd�r8dtjjtjj|��d}n4|jj|�}|rfd|jd�}n|}|j|�}|s�d}n|j	d|�}|j
d�r
tjj|�\}}|dkr
tjj|�r
|d	}tjj|�r
|}q
q
n|S(
Ns
.frameworks-framework is-liRs
$(SDKROOT)s.dylibs.tbd(RHR�R�tsplitextR�RBRRR�R�R�texists(	Rtlibrarytconfig_nametlR'R�R�textttbd_library((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_AdjustLibrary�s")	

cCs)g|D]}|j||�^q}|S(s�Transforms entries like 'Cocoa.framework' in libraries into entries like
    '-framework Cocoa', 'libcrypto.dylib' into '-lcrypto', etc.
    (R}(Rt	librariesRyRx((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytAdjustLibraries�s"cCstddg�S(Ntsw_verss
-buildVersion(t	GetStdout(R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_BuildMachineOSBuild�scCs?|j|jdd�}g|jd�D]}t|�^q)S(NtTARGETED_DEVICE_FAMILYt1t,(R5R>RIRc(RRAtfamilytx((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_XcodeIOSDeviceFamily�sc	Cs�|tjkr�i}|j�|d<t�\}}||d<||d<|j|jd�}|dk	rw||d<n|j|�}|s�|j�}n|j	|d�}||p�d|d<|d	kr�|j	|d
�|d<n'|dkr�||d<n|d|d<|j
r�|j|jd
�|d<||d<||d<|jd�rqdg|d<|d|d<q�dg|d<d|d<n|tj|<nttj|�}|j
r�|j
|�|d<n|S(s@Returns a dictionary with extra items to insert into Info.plist.tBuildMachineOSBuildtDTXcodetDTXcodeBuildtGCC_VERSIONt
DTCompilers--show-sdk-versionRt	DTSDKNamet0720s--show-sdk-build-versiont
DTSDKBuildt0430R6tMinimumOSVersiontDTPlatformNametDTPlatformVersionRtiPhoneOStCFBundleSupportedPlatformstDTPlatformBuildtiPhoneSimulatortUIDeviceFamilyN(R3t_plist_cacheR�R/R5R>R:R�t_DefaultSdkRootR�R9RHR=R�(	RRARrtxcodetxcode_buildtcompilerR�tsdk_versiontitems((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetExtraPlistItems�sF



	






	c
Cs�t�\}}|dkrdS|jd�}tjj|�}|rJ|Sytddg�}WndSXxn|j�D]`}|j�}t|�dkrx|ddkrx|d}|j|�}	|	|kr�|SqxqxWdS(	s�Returns the default SDKROOT to use.

    Prior to version 5.0.0, if SDKROOT was not explicitly set in the Xcode
    project, then the environment variable was empty. Starting with this
    version, Xcode uses the name of the newest SDK installed.
    R'Rt
xcodebuilds	-showsdksii����s-sdki����(	R/R�R3R�R>R�RnRIR�(
RR0R�tdefault_sdk_pathtdefault_sdk_roottall_sdksRpR�R�R�((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR��s&"
N(SR"R#R$R�R�R�R�RkRR?RPRSR:RWRXR]RaR`RdReRiRkRmRqR~R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRR
RRRRRR(R7R:RAR�RpRQRSR8RTRgR[RuR}RR�R�R�R�(((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR3�s�																			
							
				 			
	
						
			|		)				
				&	a			#		C			1tMacPrefixHeadercBsMeZdZd�Zd�Zdd�Zd�Zdd�Zdd�Z	RS(s�A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature.

  This feature consists of several pieces:
  * If GCC_PREFIX_HEADER is present, all compilations in that project get an
    additional |-include path_to_prefix_header| cflag.
  * If GCC_PRECOMPILE_PREFIX_HEADER is present too, then the prefix header is
    instead compiled, and all other compilations in the project get an
    additional |-include path_to_compiled_header| instead.
    + Compiled prefix headers have the extension gch. There is one gch file for
      every language used in the project (c, cc, m, mm), since gch files for
      different languages aren't compatible.
    + gch files themselves are built with the target's normal cflags, but they
      obviously don't get the |-include| flag. Instead, they need a -x flag that
      describes their language.
    + All o files in the target need to depend on the gch file, to make sure
      it's built before any o file is built.

  This class helps with some of these tasks, but it needs help from the build
  system for writing dependencies to the gch files, for writing build commands
  for the gch files, and for figuring out the location of the gch files.
  cCs�d	|_t|_|rK|jd�|_|jddd�dk|_ni|_|jr�|jr�x6ddddgD]}||j|�|j|<qyWn||j�|_nd	S(
sIf xcode_settings is None, all methods on this class are no-ops.

    Args:
        gyp_path_to_build_path: A function that takes a gyp-relative path,
            and returns a path relative to the build directory.
        gyp_path_to_build_output: A function that takes a gyp-relative path and
            a language code ('c', 'cc', 'm', or 'mm'), and that returns a path
            to where the output of precompiling that path for that language
            should be placed (without the trailing '.gch').
    tGCC_PREFIX_HEADERtGCC_PRECOMPILE_PREFIX_HEADERRR�tctccR'tmmN(R:theaderR8tcompile_headersRptcompiled_headers(RR5tgyp_path_to_build_pathtgyp_path_to_build_outputtlang((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyRs					cCs7|jst�|j|}|r3|d|7}n|S(NRv(R�ROR�(RR�Rth((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_CompiledHeader/s

cCsH|jr,||jkr,d|j||�S|jr@d|jSdSdS(sAGets the cflags to include the prefix header for language |lang|.s-include %sRN(R�R�R�R�(RR�R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt
GetInclude6s
	cCs#|jst�|j||�dS(sFReturns the actual file name of the prefix header for language |lang|.s.gch(R�ROR�(RR�R((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_Gch?sc	Cs�|js|jrgSg}x�t||�D]�\}}tjj|�d}idd6dd6dd6dd6dd	6d
d6j|d�}|r.|j|||j	||�f�q.q.W|S(
sGiven a list of source files and the corresponding object files, returns
    a list of (source, object, gch) tuples, where |gch| is the build-directory
    relative path to the gch file each object file depends on.  |compilable[i]|
    has to be the source file belonging to |objs[i]|.iR�s.cR�s.cpps.ccs.cxxR's.mR�s.mmN(
R�R�tzipR�R�RvR>R:RR�(	RtsourcestobjsRR?R^tobjR{R�((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetObjDependenciesDs
)cCs�|js|jrgS|jd|�dd|jf|jd|�dd|jf|jd|�dd|jf|jd|�dd|jfgS(	s�Returns [(path_to_gch, language_flag, language, header)].
    |path_to_gch| and |header| are relative to the build directory.
    R�s-x c-headerR�s
-x c++-headerR's-x objective-c-headerR�s-x objective-c++-header(R�R�R�(RR((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetPchBuildCommandsYsN(
R"R#R$RR�R:R�R�R�R�(((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR��s				cCstr
tSy=tddg�j�}t|�dkrFtd��nWnMt�}|r{tjd|�j�d}ntd��|dg}nX|d}|d	}|j	�d	j
d
d�}|ddt|�jd
�}|r|j	�d	}n||fatS(s@Returns a tuple of version and build version of installed Xcode.R�s-versionis&xcodebuild returned unexpected resultss(\d+\.\d+\.?\d*)is!No Xcode or CLT version detected!Ri����Rvt0ii(tXCODE_VERSION_CACHER�RnR�Rt
CLTVersionR%RtgroupsRIR�tzfill(tversion_listtversiontbuild((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR/gs(	

!cCsd}d}d}tjd�}xW|||gD]F}y3tdd|g�}tj||�j�dSWq1q1q1Xq1WdS(	s7Returns the version of command-line tools from pkgutil.s"com.apple.pkg.DeveloperToolsCLILeoscom.apple.pkg.DeveloperToolsCLIs!com.apple.pkg.CLTools_Executablessversion: (?P<version>.+)s/usr/sbin/pkgutils
--pkg-infoR�N(R%R&R�tsearcht	groupdict(tSTANDALONE_PKG_IDtFROM_XCODE_PKG_IDtMAVERICKS_PKG_IDR&RLRR((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR��s	cCsmtj|dtjdtj�}|j�d}|jdkr`td|j|df��n|jd�S(s�Returns the content of standard output returned by invoking |cmdlist|.
  Ignores the stderr.
  Raises |GypError| if the command return with a non-zero return code.tstdouttstderrisError %d running %ss
(RltPopentPIPEtcommunicatet
returncodeRtrstrip(tcmdlisttjobtout((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR��s cCsxtj|dtj�}|j�d}|jdkrktjj|d�td|j|df��n|j	d�S(s�Returns the content of standard output returned by invoking |cmdlist|.
  Raises |GypError| if the command return with a non-zero return code.R�is
sError %d running %s(
RlR�R�R�R�tsysR�twriteRR�(R�R�R�((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyR��s cCsg|jdi�}xN|dj�D]<}d|kr#|j�}|j|d�||d<q#q#WdS(s�Merges the global xcode_settings dictionary into each configuration of the
  target represented by spec. For keys that are both in the global and the local
  xcode_settings dict, the local key gets precendence.
  R5R4N(R>tvaluestcopytupdate(tglobal_dictR7tglobal_xcode_settingsRDtnew_settings((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytMergeGlobalXcodeSettingsToSpec�scCs�t|jdd��dkpct|jdd��dkpct|jdd��dkoc|dk}|r�|ddks�td|d	��n|S(
s�Returns if |spec| should be treated as a bundle.

  Bundles are directories with a certain subdirectory structure, instead of
  just a single file. Bundle rules do not produce a binary but also package
  resources into that directory.RfiRgRbRR^tnones6mac_bundle targets cannot have type none (target "%s")R{(RcR>RO(tflavorR7t
is_mac_bundle((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytIsMacBundle�s*ccs%tjj||j��}x|D]�}|}d|ksJtd|��tjj|�}tjj|d�}|djd�r�tjj||d�}ntjj||d�}|jd�r�tjj|�dd}n|jd�rtjj|�dd	}n||fVq"Wd
S(svYields (output, resource) pairs for every resource in |resources|.
  Only call this for mac bundle targets.

  Args:
      product_dir: Path to the directory containing the output bundle,
          relative to the build directory.
      xcode_settings: The XcodeSettings of the current target.
      resources: A list of bundle resources, relative to the build directory.
  RGs/Spaces in resource filenames not supported (%s)iis.lprojs.xibs.nibs.storyboards.storyboardcN(R�R�RJR�RORIRHRv(R2R5t	resourcestdesttresRRt	res_partstlproj_parts((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetMacBundleResources�s 


cCs�|jd�}|s%d
d
gifSd|ksAtd|��||�}|jddd�dkr�tj|jddd	��}ng}tjj||j��}|j	�}||||fS(s)Returns (info_plist, dest_plist, defines, extra_env), where:
  * |info_plist| is the source plist path, relative to the
    build directory,
  * |dest_plist| is the destination plist path, relative to the
    build directory,
  * |defines| is a list of preprocessor defines (empty if the plist
    shouldn't be preprocessed,
  * |extra_env| is a dict of env variables that should be exported when
    invoking |mac_tool copy-info-plist|.

  Only call this for mac bundle targets.

  Args:
      product_dir: Path to the directory containing the output bundle,
          relative to the build directory.
      xcode_settings: The XcodeSettings of the current target.
      gyp_to_build_path: A function that converts paths relative to the
          current gyp file to paths relative to the build direcotry.
  tINFOPLIST_FILERGs1Spaces in Info.plist filenames not supported (%s)tINFOPLIST_PREPROCESSRR�R�t"INFOPLIST_PREPROCESSOR_DEFINITIONSRN(
RpR:ROtshlexRIR�R�RJR�RA(R2R5R�t
info_plisttdefinest
dest_plistt	extra_env((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetMacInfoPlists
cCs1|s
iS|j}i	|d6|d6|d6|j�d6|d6dd6|d6d	d
6t�dd6}|jd
|�r�|j|�|d
<n
d|d
<|jr�|j|d<n|dd)kr"|j�|d<|j�|d<|j�|d<|j	�}|r||d<n|j
�|d<n|j�rtj
j|tj|j��|d<|j�|d<|j�|d<|j�|d<|j�|d<|j�|d<|j�|d<|j�|d <|j�|d!<|j�|d"<|j�|d#<|j�|d$<n|j�}|r'||d%<n|j�}	|	rF|	|d&<nt�d'kr�|jd
�r�|j|�}
|
s�|jd�}
n|
d*kr�d}
n|
|d
<n|s�i}n>x;|D]3}t!||t"�s�d(j||�||<q�q�W|j#|�x"|D]}t$||�||<qW|S(+s�Return the environment variables that Xcode would set. See
  http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW153
  for a full list.

  Args:
      xcode_settings: An XcodeSettings object. If this is None, this function
          returns an empty dict.
      built_products_dir: Absolute path to the built products dir.
      srcroot: Absolute path to the source root.
      configuration: The build configuration name.
      additional_settings: An optional dict with more values to add to the
          result.
  tBUILT_FRAMEWORKS_DIRtBUILT_PRODUCTS_DIRt
CONFIGURATIONtPRODUCT_NAMEtSRCROOTs
${SRCROOT}tSOURCE_ROOTtTARGET_BUILD_DIRs	${TMPDIR}tTEMP_DIRitXCODE_VERSION_ACTUALR�Rt
DEVELOPER_DIRR^RxR�R_RrtEXECUTABLE_NAMEtEXECUTABLE_PATHtFULL_PRODUCT_NAMER�R�tCONTENTS_FOLDER_PATHtEXECUTABLE_FOLDER_PATHt!UNLOCALIZED_RESOURCES_FOLDER_PATHtJAVA_FOLDER_PATHtFRAMEWORKS_FOLDER_PATHtSHARED_FRAMEWORKS_FOLDER_PATHtSHARED_SUPPORT_FOLDER_PATHtPLUGINS_FOLDER_PATHtXPCSERVICES_FOLDER_PATHtINFOPLIST_PATHtWRAPPER_NAMERRR'RG(RxR�R_RrN(%R7R�R/R�R�R;R�R�R�R�R�R`R�R�RJtsepR�R�R�R�R�R�R�R�R�R�R�RRR>R�R�R:t
isinstanceRTR�RJ(R5tbuilt_products_dirtsrcroott
configurationtadditional_settingsR7tenvtmach_o_typeRtinstall_name_baseR�tk((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_GetXcodeEnv6s~	

		
	

	
	


cCs~tjdd|�}tjd|�}xP|D]H}|\}}d|ks\td|��|j|d|d�}q.W|S(s�Takes a string containing variable references in the form ${FOO}, $(FOO),
  or $FOO, and returns a string with all variable references in the form ${FOO}.
  s\$([a-zA-Z_][a-zA-Z0-9_]*)s${\1}s(\$\(([a-zA-Z0-9\-_]+)\))s$(s#$($(FOO)) variables not supported: s${t}(R%tsubtfindallROR�(RTtmatchesRt
to_replaceR((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyRJ�s
cCskxdt|�D]V\}}|jd|d|�}|jd|d|�}|jd||�}q
W|S(sExpands ${VARIABLES}, $(VARIABLES), and $VARIABLES in string per the
  expansions list. If the variable expands to something that references
  another variable, this variable is expanded as well if it's in env --
  until no variables present in env are left.s${Rs$(t)R(treversedR�(tstringt
expansionsRtv((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt
ExpandEnvVars�s
cs�tjd����fd�}y-tjj�j�|�}|j�|SWn2tjjk
r�}tdt	|j
���nXdS(sTakes a dict |env| whose values are strings that can refer to other keys,
  for example env['foo'] = '$(bar) and $(baz)'. Returns a list L of all keys of
  env such that key2 is after key1 in L if env[key2] refers to env[key1].

  Throws an Exception in case of dependency cycles.
  s\$\{([a-zA-Z0-9\-_]+)\}csitg�j�|�D]}|�kr|^q�}x*|D]"}d|ks?td|��q?W|S(Ns${s Nested variables not supported: (R\RRO(tnodeRRtdependee(R
R&(s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetEdges�s8
 s6Xcode environment variables are cyclically dependent: N(R%R&tgyptcommontTopologicallySortedR<treverset
CycleErrorRRTtnodes(R
RtorderR((R
R&s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_TopologicallySortedEnvVarKeys�s

cCs?t|||||�}gt|�D]}|||f^q%S(N(RR'(R5R	R
RRR
RL((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetSortedXcodeEnv�s	cCslg}x_|jdg�D]K}|sG|jd|d|df�n|jtjj|d��qW|S(s_Returns the list of postbuilds explicitly defined on |spec|, in a form
  executable by a shell.R]secho POSTBUILD\(%s\) %sR{tpostbuild_nametaction(R>RR R!tEncodePOSIXShellList(R7RLR]t	postbuild((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pytGetSpecPostbuildCommands�s	!cCsUxN|j�D]@}x7|dj�D]%}|jdi�jd�r$tSq$Wq
WtS(sVReturns true if any target contains the iOS specific key
  IPHONEOS_DEPLOYMENT_TARGET.R4R5R6(R�R>R@R8(Rfttarget_dictRD((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt
_HasIOSTarget�s
cCs�x�|j�D]�}|d}|d}xvt|�j�D]b\}}tj|�}|||d<|||d<|dkr:d|dd<d	|dd<q:q:Wq
W|S(
s�Clone all targets and append -iphoneos to the name. Configure these targets
  to build for iOS devices and use correct architectures for those builds.ttoolsetR4s	-iphoneoss-iphonesimulatorR�R
R5R�R(t
itervaluesR=R=R�tdeepcopy(RfR.R0RCRytsimulator_config_dicttiphoneos_config_dict((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt_AddIOSDeviceConfigurations�s

cCst|�rt|�S|S(skIf |target_dicts| contains any iOS targets, automatically create -iphoneos
  targets for iOS device builds.(R/R5(ttarget_dicts((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt&CloneConfigurationForDeviceAndEmulator
s
('R$R�t
gyp.commonR R�tos.pathR%R�RlR�ttempfileRR:R�R.RtobjectRR2R3R�R/R�R�R�R�R�R�R�RRJRR'R(R8R-R/R5R7(((s7/usr/lib/python2.7/dist-packages/gyp/xcode_emulation.pyt<module>sL8	1����qj	*						(	0k			#