Skip to content

Instantly share code, notes, and snippets.

@yas375
Created April 5, 2012 12:58
Show Gist options
  • Select an option

  • Save yas375/2310885 to your computer and use it in GitHub Desktop.

Select an option

Save yas375/2310885 to your computer and use it in GitHub Desktop.
Pod::Spec.new do |s|
s.name = 'ZBarSDK'
s.version = '1.2.2'
s.platform = :ios
s.license = 'GNU LGPL 2.1'
s.summary = 'QR and barcode scan library'
s.homepage = 'http://zbar.sourceforge.net/'
s.author = { 'Jeff Brown' => '[email protected]' }
s.source = { :hg => 'http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar', :revision => 'iPhoneSDK-1.2.2' }
s.description = 'ZBar is an open source software suite for reading bar codes from various sources, such as video streams, ' \
'image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including ' \
'EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code.'
s.resources = 'iphone/res/{zbar-*.png,zbar-help.html}'
s.source_files = 'include/**/*.h', 'zbar/**/*.h', 'iphone/include/**/*.h',
'zbar/{config,decoder,error,image,img_scanner,refcnt,scanner,symbol}.c',
'zbar/decoder/{code128,code39,ean,i25,qr_finder,databar,code93}.c',
'zbar/qrcode/{bch15_5,binarize,isaac,qrdec,qrdectxt,rs,util}.c',
'iphone/*.m'
s.frameworks = 'AVFoundation', 'CoreMedia', 'CoreVideo', 'QuartzCore'
s.library = 'iconv'
s.clean_paths = FileList['*'].exclude(/(include|zbar|iphone|README|LICENSE)$/)
s.xcconfig = { "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*][arch=*]" => 'ZBarReaderViewImpl_Simulator.m',
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*][arch=*]" => 'ZBarReaderViewImpl_Capture.m ZBarCaptureReader.m',
"GCC_PREPROCESSOR_DEFINITIONS" => '$(inherited) NDEBUG=1' }
# Maintain the dir structure for headers
def s.copy_header_mapping(from)
from
end
# Append the prefix header to the Pods prefix header
def s.post_install(target)
prefix_header = config.project_pods_root + target.prefix_header_filename
prefix_header.open('a') do |file|
file.puts((pod_destroot + 'iphone/include/prefix.pch').read)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment