Permalink
Browse files

Make the ZBarSDK podspec work. Closes #10.

  • Loading branch information...
alloy committed Nov 19, 2011
1 parent 37f6c59 commit 9ebdeca380fbdbaff00f192df8f70347d67dfd19
Showing with 24 additions and 8 deletions.
  1. +24 −8 ZBarSDK/1.2.2/ZBarSDK.podspec
@@ -6,19 +6,35 @@ Pod::Spec.new do |s|
s.summary = 'QR and barcode scan library'
s.homepage = 'http://zbar.sourceforge.net/'
s.author = { 'Jeff Brown' => 'spadix@users.sourceforge.net' }
- s.source = { :hg => 'http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar', :revision => 'iPhoneSDK-1.2.2' }
+ 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.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.'
-The flexible, layered implementation facilitates bar code scanning and decoding for any application: use it stand-alone with the included GUI and command line programs, easily integrate a bar code scanning widget into your Qt, GTK+ or PyGTK GUI application, leverage one of the script or programming interfaces (Python, Perl, C++) ...all the way down to a streamlined C library suitable for embedded use.}
+ s.resources = 'iphone/res/{zbar-*.png,zbar-help.html}'
- s.source_files = 'include', 'iphone', 'iphone/include', 'iphone/include/ZBarSDK'
- s.resources = 'iphone/res'
+ 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|iphone|README|LICENSE)$/)
+ 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' }
+
+ # 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|

0 comments on commit 9ebdeca

Please sign in to comment.