Permalink
Browse files

Add CocoaPods pod spec.

Signed-off-by: Zachary Waldowski <zwaldowski@gmail.com>
  • Loading branch information...
zwaldowski committed Feb 7, 2012
1 parent fcd0e39 commit ddf3985b07ead2e57f833646b56b589e55cf523e
Showing with 25 additions and 0 deletions.
  1. +25 −0 DTCoreText.podspec
View
@@ -0,0 +1,25 @@
+Pod::Spec.new do |spec|
+ spec.name = 'DTCoreText'
+ spec.license = 'BSD'
+ spec.source = { :git => 'https://github.com/Cocoanetics/DTCoreText.git', :commit => 'origin/master' }
+ spec.source_files = 'Core/Source/*.{h,m,c}'
+ spec.clean_paths = 'Core/Test/', 'Core/DTCoreText-Info.plist', 'Core/DTCoreText-Prefix.pch', 'DTCoreText.xcodeproj/', 'Demo/', '.gitignore'
+ spec.frameworks = 'MediaPlayer', 'QuartzCore', 'CoreText', 'CoreGraphics', 'ImageIO'
+ spec.requires_arc = true
+ spec.homepage = 'https://github.com/Cocoanetics/DTCoreText'
+ spec.summary = 'Methods to allow using HTML code with CoreText.'
+ spec.author = { 'Oliver Drobnik' => 'oliver@drobnik.com' }
+ spec.library = 'xml2'
+ spec.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(SDKROOT)/usr/include/libxml2"' }
+ def spec.post_install(target)
+ prefix_header = config.project_pods_root + target.prefix_header_filename
+ prefix_header.open('a') do |file|
+ file.puts(%{#ifdef __OBJC__\n#import <CoreText/CoreText.h>\n#endif\n#define ALLOW_IPHONE_SPECIAL_CASES 1})
+ end
+ Dir.chdir(config.project_pods_root + 'DTCoreText/Core/Source/') do
+ Dir.glob('*.css') do |css_file|
+ system '/usr/bin/xxd', '-i', css_file, css_file + '.c'
+ end
+ end
+ end
+end

2 comments on commit ddf3985

Collaborator

odrobnik replied Sep 10, 2012

@zwadowski Could you maybe help me creating a 1.0.2 podspec?

Collaborator

odrobnik replied Sep 10, 2012

@zwadowsi does this podspec properly copy the font overrides plist to the including project?

Please sign in to comment.