From 6f113dd7b3b4de918c4efb81d38a1ffe1d391b5b Mon Sep 17 00:00:00 2001 From: manuroe Date: Tue, 27 Sep 2016 11:57:29 +0200 Subject: OLMKit: Make the project build Make OLMKit CocoaPods expose the obj-c wrapper of libolm --- OLMKit.podspec | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 OLMKit.podspec (limited to 'OLMKit.podspec') diff --git a/OLMKit.podspec b/OLMKit.podspec new file mode 100644 index 0000000..a27d0f7 --- /dev/null +++ b/OLMKit.podspec @@ -0,0 +1,55 @@ +Pod::Spec.new do |s| + + # The libolm version + MAJOR = 1 + MINOR = 3 + PATCH = 0 + + s.name = "OLMKit" + s.version = "#{MAJOR}.#{MINOR}.#{PATCH}" + s.summary = "An Objective-C wrapper of olm (http://matrix.org/git/olm)" + + s.description = <<-DESC + olm is an implementation of the Double Ratchet cryptographic ratchet in C++ + DESC + + s.homepage = "http://matrix.org/git/olm" + + s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" } + + s.authors = { "Chris Ballinger" => "chrisballinger@gmail.com", + "matrix.org" => "support@matrix.org" } + + s.platform = :ios, "5.0" + + # Expose the Objective-C wrapper API of libolm + s.public_header_files = "xcode/OLMKit/*.h" + + s.source = { + :git => "https://matrix.org/git/olm.git", + :tag => s.version.to_s + } + + s.source_files = "xcode/OLMKit/*.{h,m}", "include/**/*.{h,hh}", "src/*.{c,cpp}", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.c", "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c" + + s.library = "c++" + + + # Use the same compiler options for C and C++ as olm/Makefile + + s.compiler_flags = "-g -O3 -DOLMLIB_VERSION_MAJOR=#{MAJOR} -DOLMLIB_VERSION_MINOR=#{MINOR} -DOLMLIB_VERSION_PATCH=#{PATCH}" + s.xcconfig = { + 'USER_HEADER_SEARCH_PATHS' =>"#{File.join(File.dirname(__FILE__), 'include')} #{File.join(File.dirname(__FILE__), 'lib')}" + } + + s.subspec 'olmc' do |olmc| + olmc.source_files = "src/*.{c}", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.c", "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c" + olmc.compiler_flags = ' -std=c99 -fPIC' + end + + s.subspec 'olmcpp' do |olmcpp| + olmcpp.source_files = "src/*.{cpp}" + olmcpp.compiler_flags = ' -std=c++11 -fPIC' + end + +end -- cgit v1.2.3 From 34998b52c79661d79efe3a12100fad9ce2d5fae6 Mon Sep 17 00:00:00 2001 From: manuroe Date: Thu, 3 Nov 2016 17:33:31 +0100 Subject: OLMKit: Attempt to make podspec work when the pod is downloaded from git --- OLMKit.podspec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OLMKit.podspec') diff --git a/OLMKit.podspec b/OLMKit.podspec index a27d0f7..c4ba16d 100644 --- a/OLMKit.podspec +++ b/OLMKit.podspec @@ -38,8 +38,11 @@ Pod::Spec.new do |s| # Use the same compiler options for C and C++ as olm/Makefile s.compiler_flags = "-g -O3 -DOLMLIB_VERSION_MAJOR=#{MAJOR} -DOLMLIB_VERSION_MINOR=#{MINOR} -DOLMLIB_VERSION_PATCH=#{PATCH}" + + # For headers search paths, manage first the normal installation. Then, use paths used + # when the pod is local s.xcconfig = { - 'USER_HEADER_SEARCH_PATHS' =>"#{File.join(File.dirname(__FILE__), 'include')} #{File.join(File.dirname(__FILE__), 'lib')}" + 'USER_HEADER_SEARCH_PATHS' =>"${PODS_ROOT}/OLMKit/include ${PODS_ROOT}/OLMKit/lib #{File.join(File.dirname(__FILE__), 'include')} #{File.join(File.dirname(__FILE__), 'lib')}" } s.subspec 'olmc' do |olmc| -- cgit v1.2.3 From 671218dc07da836faf22af09e6da81e5a100e75d Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 4 Nov 2016 09:53:55 +0100 Subject: OLMKit: podspec: Some files are missing --- OLMKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OLMKit.podspec') diff --git a/OLMKit.podspec b/OLMKit.podspec index c4ba16d..025e979 100644 --- a/OLMKit.podspec +++ b/OLMKit.podspec @@ -46,7 +46,7 @@ Pod::Spec.new do |s| } s.subspec 'olmc' do |olmc| - olmc.source_files = "src/*.{c}", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.c", "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c" + olmc.source_files = "src/*.{c}", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.{h,c}", "lib/crypto-algorithms/aes.{h,c}", "lib/curve25519-donna/curve25519-donna.c" olmc.compiler_flags = ' -std=c99 -fPIC' end -- cgit v1.2.3 From 09b14c2b3d809b9149100e39c5efd0cb3c0f281e Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 4 Nov 2016 10:10:56 +0100 Subject: OLMKit: podspec: Some files are missing --- OLMKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OLMKit.podspec') diff --git a/OLMKit.podspec b/OLMKit.podspec index 025e979..86bc611 100644 --- a/OLMKit.podspec +++ b/OLMKit.podspec @@ -46,7 +46,7 @@ Pod::Spec.new do |s| } s.subspec 'olmc' do |olmc| - olmc.source_files = "src/*.{c}", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.{h,c}", "lib/crypto-algorithms/aes.{h,c}", "lib/curve25519-donna/curve25519-donna.c" + olmc.source_files = "src/*.{c}", "lib/curve25519-donna.h", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.{h,c}", "lib/crypto-algorithms/aes.{h,c}", "lib/curve25519-donna/curve25519-donna.c" olmc.compiler_flags = ' -std=c99 -fPIC' end -- cgit v1.2.3 From 9ac937a200e22dc486ce80ed4df674a4d52bacd0 Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 4 Nov 2016 11:01:09 +0100 Subject: OLMKit: podspec: Attempt to fix duplicate symbols because ed25519.c includes .c files --- OLMKit.podspec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OLMKit.podspec') diff --git a/OLMKit.podspec b/OLMKit.podspec index 86bc611..a1cc74c 100644 --- a/OLMKit.podspec +++ b/OLMKit.podspec @@ -30,7 +30,10 @@ Pod::Spec.new do |s| :tag => s.version.to_s } - s.source_files = "xcode/OLMKit/*.{h,m}", "include/**/*.{h,hh}", "src/*.{c,cpp}", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.c", "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c" + s.source_files = "xcode/OLMKit/*.{h,m}", "include/**/*.{h,hh}", "src/*.{c,cpp}", "lib/crypto-algorithms/sha256.c", "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c" + + # Those files (including .c) are included by ed25519.c. We do not want to compile them twice + s.preserve_paths = "lib/ed25519/**/*.{h,c}" s.library = "c++" -- cgit v1.2.3 From 62f52806702b799b9e25e7cdf07be1c8a31325a2 Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 4 Nov 2016 11:07:36 +0100 Subject: OLMKit: podspec: Attempt to fix duplicate symbols because ed25519.c includes .c files --- OLMKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OLMKit.podspec') diff --git a/OLMKit.podspec b/OLMKit.podspec index a1cc74c..3c56773 100644 --- a/OLMKit.podspec +++ b/OLMKit.podspec @@ -49,7 +49,7 @@ Pod::Spec.new do |s| } s.subspec 'olmc' do |olmc| - olmc.source_files = "src/*.{c}", "lib/curve25519-donna.h", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.{h,c}", "lib/crypto-algorithms/aes.{h,c}", "lib/curve25519-donna/curve25519-donna.c" + olmc.source_files = "src/*.{c}", "lib/curve25519-donna.h", "lib/crypto-algorithms/sha256.{h,c}", "lib/crypto-algorithms/aes.{h,c}", "lib/curve25519-donna/curve25519-donna.c" olmc.compiler_flags = ' -std=c99 -fPIC' end -- cgit v1.2.3 From 27a8c28da4e5c62d8863ee3d30642109d713c4d6 Mon Sep 17 00:00:00 2001 From: manuroe Date: Mon, 7 Nov 2016 17:27:09 +0100 Subject: OLMKit: Update obj-c wrapper to 2.0.0 --- OLMKit.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OLMKit.podspec') diff --git a/OLMKit.podspec b/OLMKit.podspec index 3c56773..0877e3a 100644 --- a/OLMKit.podspec +++ b/OLMKit.podspec @@ -1,8 +1,8 @@ Pod::Spec.new do |s| # The libolm version - MAJOR = 1 - MINOR = 3 + MAJOR = 2 + MINOR = 0 PATCH = 0 s.name = "OLMKit" -- cgit v1.2.3 From 0b1ecbff2d31b94046834358b851c369ad36ee88 Mon Sep 17 00:00:00 2001 From: manuroe Date: Thu, 17 Nov 2016 14:03:15 +0100 Subject: OLMKit: Add it to olm from version 2.0.1 --- OLMKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OLMKit.podspec') diff --git a/OLMKit.podspec b/OLMKit.podspec index 0877e3a..6403fdc 100644 --- a/OLMKit.podspec +++ b/OLMKit.podspec @@ -3,7 +3,7 @@ Pod::Spec.new do |s| # The libolm version MAJOR = 2 MINOR = 0 - PATCH = 0 + PATCH = 1 s.name = "OLMKit" s.version = "#{MAJOR}.#{MINOR}.#{PATCH}" -- cgit v1.2.3