Skip to content

Commit

Permalink
correct spec for Ejecta
Browse files Browse the repository at this point in the history
- set ejecta.js as resources, not resource
  • Loading branch information
siuying committed Jan 23, 2013
1 parent 15a918b commit d6b2b45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Ejecta/1.2/Ejecta.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.platform = :ios

s.source_files = 'Classes/**/*.{h,m,mm}'
s.resource = 'ejecta.js'
s.resources = 'ejecta.js'

s.preferred_dependency = 'Library'
s.frameworks = 'SystemConfiguration', 'CoreText', 'QuartzCore', 'GameKit', 'CoreGraphics', 'OpenAL', 'AudioToolbox', 'OpenGLES', 'AVFoundation', 'iAd'
Expand Down

2 comments on commit d6b2b45

@SRandazzo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siuying thanks for this podspec!
I've been trying to get one up and running for the latest Ejecta master (which has a lot of directory changes) which seems like it works but then I get an error "#import <JavaScriptCore/JavaScriptCore.h> file not found"

I used yours as a base, any thoughts?

Pod::Spec.new do |s|
  s.name = 'Ejecta'
  s.version = '1.3'
  s.license = 'MIT'
  s.summary = 'A Fast, Open Source JavaScript, Canvas & Audio Implementation for iOS.'
  s.homepage = 'http://impactjs.com/ejecta'
  s.author = { 'Dominic Szablewski' => 'dominic.szablewski@gmail.com' }
  s.source = { :git => 'https://github.com/paperlesspost/Ejecta.git', :commit => '75dcc8c496860a3ccee343c6ddc5c4b9dac2c64f' }
  s.description = 'A Fast, Open Source JavaScript, Canvas & Audio Implementation for iOS.'
  s.platform = :ios

  s.source_files = 'Source/Ejecta/**/*.{h,m,mm}'
  s.resources    = 'ejecta.js'

  s.preferred_dependency = 'Library'
  s.frameworks = 'SystemConfiguration', 'CoreText', 'QuartzCore', 'GameKit', 'CoreGraphics', 'OpenAL', 'AudioToolbox', 'OpenGLES', 'AVFoundation', 'iAd'

  def s.copy_header_mapping(from)
    from.relative_path_from(Pathname.new('Source/Ejecta'))
  end

  s.subspec 'Library' do |os|
    os.source_files = 'Source/lib/JavaScriptCore/*.h', 'Source/lib/lodepng/*.{c,h}'
    os.preserve_paths = ['Source/lib/libJavaScriptCore.a']
    os.library = 'JavaScriptCore', 'stdc++', 'icucore'
    os.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/Ejecta/Source/lib"' }

    def os.copy_header_mapping(from)
      from.relative_path_from(Pathname.new(''))
    end
  end
end 

@siuying
Copy link
Contributor Author

@siuying siuying commented on d6b2b45 Feb 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It look like the library path is changed and pod cannot find the new header path. I've made some change and that worked, please see if it work for you:

Pod::Spec.new do |s|
  s.name = 'Ejecta'
  s.version = '1.3'
  s.license = 'MIT'
  s.summary = 'A Fast, Open Source JavaScript, Canvas & Audio Implementation for iOS.'
  s.homepage = 'http://impactjs.com/ejecta'
  s.author = { 'Dominic Szablewski' => 'dominic.szablewski@gmail.com' }
  s.source = { :git => 'https://github.com/paperlesspost/Ejecta.git', :commit => '75dcc8c496860a3ccee343c6ddc5c4b9dac2c64f' }
  s.description = 'A Fast, Open Source JavaScript, Canvas & Audio Implementation for iOS.'
  s.platform = :ios

  s.source_files = 'Source/Ejecta/**/*.{h,m,mm}'
  s.resources    = 'ejecta.js'

  s.preferred_dependency = 'Library'
  s.frameworks = 'SystemConfiguration', 'CoreText', 'QuartzCore', 'GameKit', 'CoreGraphics', 'OpenAL', 'AudioToolbox', 'OpenGLES', 'AVFoundation', 'iAd'

  def s.copy_header_mapping(from)
    from.relative_path_from(Pathname.new('Source/Ejecta'))
  end

  s.subspec 'Library' do |os|
    os.source_files = 'Source/lib/JavaScriptCore/*.h', 'Source/lib/lodepng/*.{c,h}'
    os.preserve_paths = ['Source/lib/libJavaScriptCore.a']
    os.library = 'JavaScriptCore', 'stdc++', 'icucore'
    os.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/Ejecta/Source/lib"', 
      'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Ejecta/Source/lib"' }

    def os.copy_header_mapping(from)
      from.relative_path_from(Pathname.new(''))
    end
  end
end 

Please sign in to comment.