Skip to content

Instantly share code, notes, and snippets.

@dlo
Last active December 31, 2015 13:49
Show Gist options
  • Save dlo/7995850 to your computer and use it in GitHub Desktop.
Save dlo/7995850 to your computer and use it in GitHub Desktop.
PLCrashReporter Podspec for Cocoapods. Needs a little bit of tweaking--it's currently failing on a few semantic C++ issues.
Pod::Spec.new do |s|
s.name = 'CrashReporter'
s.version = '1.2-rc1'
s.source = { :http => 'https://www.plcrashreporter.org/static/downloads/plcrashreporter-1.2-rc1.tar.gz' }
s.requires_arc = true
s.libraries = 'stdc++'
s.source_files = "Source/*.{S,h,m,hpp,cpp}"
s.xcconfig = {
'ARCHS' => "$(PL_ARM_ARCHS)",
'EXPORTED_SYMBOLS_FILE' => "Resources/CrashReporter.exp",
'GCC_C_LANGUAGE_STANDARD' => "c99",
'GCC_ENABLE_CPP_EXCEPTIONS' => "NO",
'GCC_PREFIX_HEADER' => "$(SRCROOT)/Source/PLCrashNamespace.h",
'GCC_THUMB_SUPPORT' => "NO",
'PL_ARM_ARCHS' => "$(ARCHS_STANDARD_INCLUDING_64_BIT)",
'PL_MIN_MACOSX_SDK' => "1080",
'WARNING_CFLAGS' => "-Wall -Werror -Wno-shorten-64-to-32",
# Only include the following until
# https://github.com/CocoaPods/Core/pull/52 lands.
'PL_BUILD_CONFIG_FLAG' => "PLCF_RELEASE_BUILD",
'ZERO_LINK' => "NO",
}
s.prepare_command = <<-CMD
rm Source/*Tests.*
CMD
s.subspec "protobuf" do |sp|
sp.source_files = "Dependencies/protobuf-2.0.3/src/*.{h,c}"
end
s.subspec "GTM" do |sp|
sp.requires_arc = false
sp.source_files = [
"Tools/google-toolbox-for-mac-trunk-r582/UnitTesting/GTMSenTestCase.{h,m}",
"Tools/google-toolbox-for-mac-trunk-r582/UnitTesting/GTMUnitTestDevLog.{h,m}",
"Tools/google-toolbox-for-mac-trunk-r582/GTMDefines.h",
"Tools/google-toolbox-for-mac-trunk-r582/Foundation/GTMObjC2Runtime.{h,m}",
"Tools/google-toolbox-for-mac-trunk-r582/Foundation/GTMRegex.{h,m}"
]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment