Browse Source

Merge branch 'IOS-2882'

ENGINE-953
Andreas Buff 11 months ago
parent
commit
0c1fcc7611
19 changed files with 1170 additions and 15 deletions
  1. +376
    -8
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/project.pbxproj
  2. +2
    -2
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/CLEAN_ALL_macOS.xcscheme
  3. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/CLEAN_PEP_macOS.xcscheme
  4. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_gmp_iOS.xcscheme
  5. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_gmp_macOS.xcscheme
  6. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_libiconv_iOS.xcscheme
  7. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_nettle_iOS.xcscheme
  8. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_nettle_macOS.xcscheme
  9. +2
    -0
      CommonPEPDependencies/config.plist
  10. +6
    -4
      _config/pEp_versions.plist
  11. +103
    -0
      build-ios_dependency.template
  12. +31
    -0
      buildcode/gmp.code
  13. +0
    -1
      buildcode/iconv.code
  14. +30
    -0
      buildcode/nettle.code
  15. +52
    -0
      buildcode/sequoia.code
  16. +108
    -0
      buildcode/sequoia_resources/nettle-bindings.rs
  17. +0
    -0
      clean_pEp_macOS.sh
  18. +46
    -0
      generate_and_run_ios_dependency_build_script.sh
  19. +12
    -0
      get-config-ios-deployment-target.sh

+ 376
- 8
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/project.pbxproj View File

@ -18,6 +18,63 @@
name = CLEAN_ALL_iOS;
productName = "libetpan-dependencies_macOS";
};
152E498D26A9B252009BD3CE /* build_gmp_iOS */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 152E498F26A9B252009BD3CE /* Build configuration list for PBXAggregateTarget "build_gmp_iOS" */;
buildPhases = (
152E498E26A9B252009BD3CE /* Build */,
);
dependencies = (
);
name = build_gmp_iOS;
productName = "libetpan-dependencies_macOS";
};
152E499426A9B88E009BD3CE /* build_gmp_macOS */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 152E499626A9B88E009BD3CE /* Build configuration list for PBXAggregateTarget "build_gmp_macOS" */;
buildPhases = (
152E499526A9B88E009BD3CE /* Build */,
);
dependencies = (
);
name = build_gmp_macOS;
productName = "libetpan-dependencies_macOS";
};
152E499926A9BC94009BD3CE /* build_nettle_iOS */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 152E499B26A9BC94009BD3CE /* Build configuration list for PBXAggregateTarget "build_nettle_iOS" */;
buildPhases = (
152E499A26A9BC94009BD3CE /* Build */,
);
dependencies = (
152E499F26A9C62B009BD3CE /* PBXTargetDependency */,
);
name = build_nettle_iOS;
productName = "libetpan-dependencies_macOS";
};
152E49A226A9CEE0009BD3CE /* build_nettle_macOS */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 152E49A426A9CEE0009BD3CE /* Build configuration list for PBXAggregateTarget "build_nettle_macOS" */;
buildPhases = (
152E49A326A9CEE0009BD3CE /* Build */,
);
dependencies = (
152E49A826A9CF1E009BD3CE /* PBXTargetDependency */,
);
name = build_nettle_macOS;
productName = "libetpan-dependencies_macOS";
};
152E49AB26A9CFD4009BD3CE /* build_libiconv_iOS */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 152E49AD26A9CFD4009BD3CE /* Build configuration list for PBXAggregateTarget "build_libiconv_iOS" */;
buildPhases = (
152E49AC26A9CFD4009BD3CE /* Build */,
);
dependencies = (
);
name = build_libiconv_iOS;
productName = "libetpan-dependencies_macOS";
};
1585EE16269DCEA600B822E1 /* build-pEpMIME-dependencies_macOS */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 1585EE17269DCEA600B822E1 /* Build configuration list for PBXAggregateTarget "build-pEpMIME-dependencies_macOS" */;
@ -156,6 +213,8 @@
1585EECB269EF0F100B822E1 /* Build */,
);
dependencies = (
152E49B826AABB0F009BD3CE /* PBXTargetDependency */,
152E49AA26A9CF2D009BD3CE /* PBXTargetDependency */,
);
name = build_sequoia_macOS;
productName = "libetpan-dependencies_macOS";
@ -189,6 +248,8 @@
1585EF0626A0479800B822E1 /* Build */,
);
dependencies = (
152E49B626AABB05009BD3CE /* PBXTargetDependency */,
152E49A126A9CED3009BD3CE /* PBXTargetDependency */,
);
name = build_sequoia_iOS;
productName = "libetpan-dependencies_macOS";
@ -206,15 +267,15 @@
name = "build-downloadclient-dependencies_macOS";
productName = "build-pEpMIME-dependencies";
};
1585F04126A1C14C00B822E1 /* CLEAN_PEP */ = {
1585F04126A1C14C00B822E1 /* CLEAN_PEP_macOS */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 1585F04726A1C14C00B822E1 /* Build configuration list for PBXAggregateTarget "CLEAN_PEP" */;
buildConfigurationList = 1585F04726A1C14C00B822E1 /* Build configuration list for PBXAggregateTarget "CLEAN_PEP_macOS" */;
buildPhases = (
1585F04626A1C14C00B822E1 /* Build */,
);
dependencies = (
);
name = CLEAN_PEP;
name = CLEAN_PEP_macOS;
productName = "libetpan-dependencies_macOS";
};
1585F04A26A1D2BE00B822E1 /* build-pEp4ThunderbirdInstaller-dependencies_macOS */ = {
@ -232,6 +293,48 @@
/* End PBXAggregateTarget section */
/* Begin PBXContainerItemProxy section */
152E499E26A9C62B009BD3CE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1585EE0B269DC6DD00B822E1 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 152E498D26A9B252009BD3CE;
remoteInfo = build_gmp_iOS;
};
152E49A026A9CED3009BD3CE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1585EE0B269DC6DD00B822E1 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 152E499926A9BC94009BD3CE;
remoteInfo = build_nettle_iOS;
};
152E49A726A9CF1E009BD3CE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1585EE0B269DC6DD00B822E1 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 152E499426A9B88E009BD3CE;
remoteInfo = build_gmp_macOS;
};
152E49A926A9CF2D009BD3CE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1585EE0B269DC6DD00B822E1 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 152E49A226A9CEE0009BD3CE;
remoteInfo = build_nettle_macOS;
};
152E49B526AABB05009BD3CE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1585EE0B269DC6DD00B822E1 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 152E49AB26A9CFD4009BD3CE;
remoteInfo = build_libiconv_iOS;
};
152E49B726AABB0F009BD3CE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1585EE0B269DC6DD00B822E1 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 1585EE27269DD87700B822E1;
remoteInfo = build_libiconv_macOS;
};
1585EE35269EC8DD00B822E1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1585EE0B269DC6DD00B822E1 /* Project object */;
@ -390,6 +493,8 @@
1585EE3E269EC9BB00B822E1 /* build_openssl_macOS */,
1585EE48269ECB8700B822E1 /* build_cryptopp_macOS */,
1585EEA5269EDA1E00B822E1 /* build_asn1cexecutable */,
152E499426A9B88E009BD3CE /* build_gmp_macOS */,
152E49A226A9CEE0009BD3CE /* build_nettle_macOS */,
1585EECA269EF0F100B822E1 /* build_sequoia_macOS */,
1585EE43269ECB2500B822E1 /* build_pEpwebserver_macOS */,
1585EEAA269EDAE200B822E1 /* build_pEpengine_macOS */,
@ -401,7 +506,10 @@
1585EFAF26A178FE00B822E1 /* build-downloadclient-dependencies_macOS */,
1585F04A26A1D2BE00B822E1 /* build-pEp4ThunderbirdInstaller-dependencies_macOS */,
1585EEFC26A0432A00B822E1 /* CLEAN_ALL_macOS */,
1585F04126A1C14C00B822E1 /* CLEAN_PEP */,
1585F04126A1C14C00B822E1 /* CLEAN_PEP_macOS */,
152E498D26A9B252009BD3CE /* build_gmp_iOS */,
152E499926A9BC94009BD3CE /* build_nettle_iOS */,
152E49AB26A9CFD4009BD3CE /* build_libiconv_iOS */,
1585EF0526A0479800B822E1 /* build_sequoia_iOS */,
152E47C626A5B7C2009BD3CE /* CLEAN_ALL_iOS */,
);
@ -428,6 +536,101 @@
shellScript = "SCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/clean_all_iOS.sh\" \nsh \"${BUILD_SCRIPT}\" \"${PREFIX}\"\n";
showEnvVarsInLog = 0;
};
152E498E26A9B252009BD3CE /* Build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = Build;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh -l";
shellScript = "LIB_NAME=\"gmp\"\n\nSCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\n\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/generate_and_run_ios_dependency_build_script.sh\" \nsh \"${BUILD_SCRIPT}\" $LIB_NAME \"${PREFIX}\"\n";
showEnvVarsInLog = 0;
};
152E499526A9B88E009BD3CE /* Build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = Build;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh -l";
shellScript = "LIB_NAME=\"gmp\"\n\nSCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\n\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/generate_and_run_mac_dependency_build_script.sh\" \nsh \"${BUILD_SCRIPT}\" $LIB_NAME \"${PREFIX}\"\n";
showEnvVarsInLog = 0;
};
152E499A26A9BC94009BD3CE /* Build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = Build;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh -l";
shellScript = "LIB_NAME=\"nettle\"\n\nSCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\n\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/generate_and_run_ios_dependency_build_script.sh\" \nsh \"${BUILD_SCRIPT}\" $LIB_NAME \"${PREFIX}\"\n";
showEnvVarsInLog = 0;
};
152E49A326A9CEE0009BD3CE /* Build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = Build;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh -l";
shellScript = "LIB_NAME=\"nettle\"\n\nSCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\n\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/generate_and_run_mac_dependency_build_script.sh\" \nsh \"${BUILD_SCRIPT}\" $LIB_NAME \"${PREFIX}\"\n";
showEnvVarsInLog = 0;
};
152E49AC26A9CFD4009BD3CE /* Build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = Build;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "LIB_NAME=\"iconv\"\n\nSCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\n\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/generate_and_run_ios_dependency_build_script.sh\" \nsh \"${BUILD_SCRIPT}\" $LIB_NAME \"${PREFIX}\"\n";
showEnvVarsInLog = 0;
};
1585EE28269DD87700B822E1 /* Build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -615,7 +818,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh -l";
shellScript = "# Note: `-l`(login shell) needed to find `wget`\nSCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/build-sequoia-macOS.sh\" \nsh \"${BUILD_SCRIPT}\" \"${PREFIX}\"\n";
shellScript = "# Note: `-l`(login shell) needed to find `wget`\nLIB_NAME=\"sequoia\"\n\nSCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\n\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/generate_and_run_mac_dependency_build_script.sh\" \nsh \"${BUILD_SCRIPT}\" $LIB_NAME \"${PREFIX}\"\n";
showEnvVarsInLog = 0;
};
1585EED9269EF98B00B822E1 /* Build */ = {
@ -672,7 +875,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh -l";
shellScript = "# Note: `-l`(login shell) needed to find `wget`\nSCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/build-sequoia-iOS.sh\" \nsh \"${BUILD_SCRIPT}\" \"${PREFIX}\"\n";
shellScript = "LIB_NAME=\"sequoia\"\n\nSCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\n\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/generate_and_run_ios_dependency_build_script.sh\" \nsh \"${BUILD_SCRIPT}\" $LIB_NAME \"${PREFIX}\"\n";
showEnvVarsInLog = 0;
};
1585F04626A1C14C00B822E1 /* Build */ = {
@ -691,12 +894,42 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "SCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/clean_pEp.sh\" \nsh \"${BUILD_SCRIPT}\" \"${PREFIX}\"\n";
shellScript = "SCRIPTS_DIR=\"${PROJECT_DIR}/..\"\nPREFIX=\"${PROJECT_DIR}/$(${SCRIPTS_DIR}/get-config-prefix.sh)\"\nBUILD_SCRIPT=\"${SCRIPTS_DIR}/clean_pEp_macOS.sh\" \nsh \"${BUILD_SCRIPT}\" \"${PREFIX}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXTargetDependency section */
152E499F26A9C62B009BD3CE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 152E498D26A9B252009BD3CE /* build_gmp_iOS */;
targetProxy = 152E499E26A9C62B009BD3CE /* PBXContainerItemProxy */;
};
152E49A126A9CED3009BD3CE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 152E499926A9BC94009BD3CE /* build_nettle_iOS */;
targetProxy = 152E49A026A9CED3009BD3CE /* PBXContainerItemProxy */;
};
152E49A826A9CF1E009BD3CE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 152E499426A9B88E009BD3CE /* build_gmp_macOS */;
targetProxy = 152E49A726A9CF1E009BD3CE /* PBXContainerItemProxy */;
};
152E49AA26A9CF2D009BD3CE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 152E49A226A9CEE0009BD3CE /* build_nettle_macOS */;
targetProxy = 152E49A926A9CF2D009BD3CE /* PBXContainerItemProxy */;
};
152E49B626AABB05009BD3CE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 152E49AB26A9CFD4009BD3CE /* build_libiconv_iOS */;
targetProxy = 152E49B526AABB05009BD3CE /* PBXContainerItemProxy */;
};
152E49B826AABB0F009BD3CE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 1585EE27269DD87700B822E1 /* build_libiconv_macOS */;
targetProxy = 152E49B726AABB0F009BD3CE /* PBXContainerItemProxy */;
};
1585EE36269EC8DD00B822E1 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 1585EE27269DD87700B822E1 /* build_libiconv_macOS */;
@ -803,6 +1036,96 @@
};
name = Release;
};
152E499026A9B252009BD3CE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
152E499126A9B252009BD3CE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
152E499726A9B88E009BD3CE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
152E499826A9B88E009BD3CE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
152E499C26A9BC94009BD3CE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
152E499D26A9BC94009BD3CE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
152E49A526A9CEE0009BD3CE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
152E49A626A9CEE0009BD3CE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
152E49AE26A9CFD4009BD3CE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
152E49AF26A9CFD4009BD3CE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
1585EE0F269DC6DD00B822E1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -1151,6 +1474,51 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
152E498F26A9B252009BD3CE /* Build configuration list for PBXAggregateTarget "build_gmp_iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
152E499026A9B252009BD3CE /* Debug */,
152E499126A9B252009BD3CE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
152E499626A9B88E009BD3CE /* Build configuration list for PBXAggregateTarget "build_gmp_macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
152E499726A9B88E009BD3CE /* Debug */,
152E499826A9B88E009BD3CE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
152E499B26A9BC94009BD3CE /* Build configuration list for PBXAggregateTarget "build_nettle_iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
152E499C26A9BC94009BD3CE /* Debug */,
152E499D26A9BC94009BD3CE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
152E49A426A9CEE0009BD3CE /* Build configuration list for PBXAggregateTarget "build_nettle_macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
152E49A526A9CEE0009BD3CE /* Debug */,
152E49A626A9CEE0009BD3CE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
152E49AD26A9CFD4009BD3CE /* Build configuration list for PBXAggregateTarget "build_libiconv_iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
152E49AE26A9CFD4009BD3CE /* Debug */,
152E49AF26A9CFD4009BD3CE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1585EE0E269DC6DD00B822E1 /* Build configuration list for PBXProject "CommonPEPDependencies" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@ -1304,7 +1672,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1585F04726A1C14C00B822E1 /* Build configuration list for PBXAggregateTarget "CLEAN_PEP" */ = {
1585F04726A1C14C00B822E1 /* Build configuration list for PBXAggregateTarget "CLEAN_PEP_macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1585F04826A1C14C00B822E1 /* Debug */,


CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/CLEAN_ALL.xcscheme → CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/CLEAN_ALL_macOS.xcscheme View File


+ 67
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/CLEAN_PEP_macOS.xcscheme View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1585F04126A1C14C00B822E1"
BuildableName = "CLEAN_PEP_macOS"
BlueprintName = "CLEAN_PEP_macOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1585F04126A1C14C00B822E1"
BuildableName = "CLEAN_PEP_macOS"
BlueprintName = "CLEAN_PEP_macOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 67
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_gmp_iOS.xcscheme View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "152E498D26A9B252009BD3CE"
BuildableName = "build_gmp_iOS"
BlueprintName = "build_gmp_iOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "152E498D26A9B252009BD3CE"
BuildableName = "build_gmp_iOS"
BlueprintName = "build_gmp_iOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 67
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_gmp_macOS.xcscheme View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "152E499426A9B88E009BD3CE"
BuildableName = "build_gmp_macOS"
BlueprintName = "build_gmp_macOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "152E499426A9B88E009BD3CE"
BuildableName = "build_gmp_macOS"
BlueprintName = "build_gmp_macOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 67
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_libiconv_iOS.xcscheme View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "152E49AB26A9CFD4009BD3CE"
BuildableName = "build_libiconv_iOS"
BlueprintName = "build_libiconv_iOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "152E49AB26A9CFD4009BD3CE"
BuildableName = "build_libiconv_iOS"
BlueprintName = "build_libiconv_iOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 67
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_nettle_iOS.xcscheme View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "152E499926A9BC94009BD3CE"
BuildableName = "build_nettle_iOS"
BlueprintName = "build_nettle_iOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "152E499926A9BC94009BD3CE"
BuildableName = "build_nettle_iOS"
BlueprintName = "build_nettle_iOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 67
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_nettle_macOS.xcscheme View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "152E49A226A9CEE0009BD3CE"
BuildableName = "build_nettle_macOS"
BlueprintName = "build_nettle_macOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "152E49A226A9CEE0009BD3CE"
BuildableName = "build_nettle_macOS"
BlueprintName = "build_nettle_macOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 2
- 0
CommonPEPDependencies/config.plist View File

@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IOS_DEPLOYMENT</key>
<string>12.0</string>
<key>MACOSX_DEPLOYMENT_x86_64</key>
<string>10.10</string>
<key>MACOSX_DEPLOYMENT_M1</key>


+ 6
- 4
_config/pEp_versions.plist View File

@ -2,10 +2,12 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SEQUOIA_4_iOS_VERSION</key>
<string>v2.1.6</string>
<key>SEQUOIA_4_MAC_OS_VERSION</key>
<string>v2.1.6</string>
<key>NETTLE_VERSION</key>
<string>3.7.3</string>
<key>GMP_VERSION</key>
<string>6.2.1</string>
<key>SEQUOIA_VERSION</key>
<string>openpgp/v1.3.0</string>
<key>PEP_ENGINE_VERSION</key>
<string>Release_2.1.47</string>
<key>LIB_PEP_ADAPTER_VERSION</key>


+ 103
- 0
build-ios_dependency.template View File

@ -0,0 +1,103 @@
# Builds fat lib for iOS (ARM64 & x86_64).
# Pass PREFIX as argument. If not passed, "local/" is used as deafult.
# Exit on errors
set -e
SCRIPT_DIR=$(dirname "$0")
PREFIX=$1
# Get Absolute Paths & Setup
SCRIPT_DIR=$(dirname "$0")
pushd "${SCRIPT_DIR}"
SCRIPT_DIR=$(pwd)
popd
if [ "${PREFIX}" = "" ]; then
PREFIX="${SCRIPT_DIR}/local"
fi
mkdir -p "${PREFIX}"
pushd "${PREFIX}"
PREFIX=$(pwd)
popd
TMP_DIR="${SCRIPT_DIR}/tmp"
INCLUDE_DIR="${PREFIX}/include"
LIB_DIR="${PREFIX}/lib"
BIN_DIR="${PREFIX}/bin"
mkdir -p "${INCLUDE_DIR}"
mkdir -p "${LIB_DIR}"
mkdir -p "${TMP_DIR}"
IOS_DEPLOYMENT_TARGET=$(sh "${SCRIPT_DIR}"/get-config-ios-deployment-target.sh)
# Funcs
buildLib()
{
ARCH=$1
TARGET=$2
HOST=$3
SDK=$4
SDK_PATH=`xcrun -sdk ${SDK} --show-sdk-path`
CURRENT_LIB_DIR="${TMP_DIR}/${ARCH}"
mkdir -p "${CURRENT_LIB_DIR}/lib"
mkdir -p "${CURRENT_LIB_DIR}/include"
mkdir -p "${CURRENT_LIB_DIR}/bin"
# Set CFLAGS that fit most targets. Can be overrriden in .code file
if [[ $TARGET == *"ios"* ]]; then
export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c99 -miphoneos-version-min=${IOS_DEPLOYMENT_TARGET}"
else
if [[ $ARCH == "arm64" ]]; then
export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c99 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET_ARM}"
elif [[ $ARCH == "x86_64" ]]; then
export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c99 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET_INTEL}"
else
echo "Unhandled arch"
exit 1
fi
fi
# START: Lib Specific Code
BUILD_CODE
# END: Lib Specific Code
unset CFLAGS
unset LDFLAGS
unset CC
}
cleanup()
{
rm -rf "${TMP_DIR}/x86_64"
rm -rf "${TMP_DIR}/arm64"
}
# Setup
cleanup
mkdir -p "${TMP_DIR}"
mkdir -p "${PREFIX}"
# Build
pushd "${TMP_DIR}"
buildLib "arm64" "aarch64-apple-ios" "aarch64-apple-darwin" "iphoneos"
buildLib "x86_64" "x86_64-apple-ios" "x86_64-apple-darwin" "iphonesimulator"
popd
# Make Fat Lib
sh "${SCRIPT_DIR}/build-fat-libs.sh" "${TMP_DIR}/arm64/lib" "${TMP_DIR}/x86_64/lib" "${LIB_DIR}"
# Copy Headers If Currently Building Lib
ARM64_INCLUDE_DIR="${TMP_DIR}/arm64/include"
cp -r "${ARM64_INCLUDE_DIR}"/* "${INCLUDE_DIR}" 2>/dev/null || :
# Cleanup
cleanup

+ 31
- 0
buildcode/gmp.code View File

@ -0,0 +1,31 @@
GMP_VERSION=$(sh "${SCRIPT_DIR}"/get-pEp-version.sh "GMP_VERSION")
GMP_NAME="gmp-${GMP_VERSION}"
OUTPUT_DIR=${SCRIPT_DIR}/build
# Exit on errors
set -e
if [ -f "${LIB_DIR}/libgmp.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
GMP_DIR="${TMP_DIR}/${GMP_NAME}"
if [ ! -d "${GMP_DIR}" ]; then
# GMP snapshot must be used until released
wget -nc https://gmplib.org/download/gmp/$GMP_NAME.tar.bz2
tar xvf ${GMP_NAME}.tar.bz2
fi
export LDFLAGS="-arch ${ARCH}"
export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}"
pushd gmp-$GMP_VERSION
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=${CURRENT_LIB_DIR}/lib/pkgconfig ./configure --host=${HOST} --prefix=${CURRENT_LIB_DIR} --disable-assembly
make clean
make -j4
make install
popd
rm -rf *.bz2

+ 0
- 1
buildcode/iconv.code View File

@ -8,7 +8,6 @@ if [ ! -d "${ICONV_DIR}" ]; then
git clone -b "v1.16_without_lib_prefix_defines" https://gitea.pep.foundation/buff/libiconv.git
fi
pushd "${ICONV_DIR}"
export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c99"
export LDFLAGS="-arch ${ARCH}"
export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}"


+ 30
- 0
buildcode/nettle.code View File

@ -0,0 +1,30 @@
NETTLE_VERSION=$(sh "${SCRIPT_DIR}"/get-pEp-version.sh "NETTLE_VERSION")
NETTLE_NAME="nettle-${NETTLE_VERSION}"
OUTPUT_DIR=${SCRIPT_DIR}/build
# Exit on errors
set -e
if [ -f "${LIB_DIR}/libnettle.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
GMP_DIR="${TMP_DIR}/${NETTLE_NAME}"
if [ ! -d "${GMP_DIR}" ]; then
wget -nc https://ftp.gnu.org/gnu/nettle/${NETTLE_NAME}.tar.gz
tar xvf ${NETTLE_NAME}.tar.gz
fi
export LDFLAGS="-arch ${ARCH}"
export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}"
pushd ${NETTLE_NAME}
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig CC_FOR_BUILD="$(whereis gcc)" ./configure --host=${HOST} --prefix=${CURRENT_LIB_DIR} --with-lib-path=${PREFIX}/lib --with-include-path=${PREFIX}/include --disable-assembler --disable-arm-neon --disable-documentation --verbose
make clean
make -j4
make install
popd
rm -rf *.gz

+ 52
- 0
buildcode/sequoia.code View File

@ -0,0 +1,52 @@
if [ -f "${PREFIX}/lib/libsequoia_openpgp_ffi.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
VERSION=$(sh "${SCRIPT_DIR}/get-pEp-version.sh" "SEQUOIA_VERSION")
SEQUOIA_DIR="${TMP_DIR}/sequoia"
if [ ! -d "${SEQUOIA_DIR}" ]; then
git clone -b ${VERSION} --depth 1 https://gitlab.com/sequoia-pgp/sequoia.git
fi
NETTLE_BINDINGS="${SCRIPT_DIR}/buildcode/sequoia_resources/nettle-bindings.rs"
build_ios()
{
cargo update
rustup run nightly cargo update
NETTLE_PREGENERATED_BINDINGS="${NETTLE_BINDINGS}" PKG_CONFIG_ALLOW_CROSS=1 RUST_BACKTRACE=1 PKG_CONFIG_PATH=$OUTPUT_DIR/${ARCH}/lib/pkgconfig RUSTFLAGS="-L ${CURRENT_LIB_DIR}/lib" rustup run nightly cargo build --target ${TARGET} -p sequoia-openpgp-ffi --release -Z build-std=core,alloc,std
# copy artefacts
cp "${SEQUOIA_DIR}/target/${TARGET}/release"/*.a "${CURRENT_LIB_DIR}/lib"
}
build_macos()
{
if [ ${ARCH} == "arm64" ]; then
rustup run nightly cargo update
SDKROOT=$(xcrun -sdk ${SDK} --show-sdk-path) \
# JSONAdapter needlessly requires libsequoia_ffi.a
NETTLE_PREGENERATED_BINDINGS="${SCRIPT_DIR}/nettle-bindings.rs" PKG_CONFIG_ALLOW_CROSS=1 RUST_BACKTRACE=full PKG_CONFIG_PATH=${CURRENT_LIB_DIR}/lib/pkgconfig RUSTFLAGS="-L ${PREFIX}/lib" rustup run nightly cargo build --target ${HOST} --release -Z build-std=core,alloc,std
elif [ ${ARCH} == "x86_64" ]; then
cargo update
SDKROOT=$(xcrun -sdk ${SDK} --show-sdk-path) \
# JSONAdapter needlessly requires libsequoia_ffi.a
PKG_CONFIG_ALLOW_CROSS=1 RUST_BACKTRACE=full PKG_CONFIG_PATH=${CURRENT_LIB_DIR}/lib/pkgconfig RUSTFLAGS="-L ${PREFIX}/lib" cargo build --target ${HOST} --release
else
echo "Unhandled ARCH"
exit 1
fi
cp "${SEQUOIA_DIR}/target/${HOST}/release"/*.a "${CURRENT_LIB_DIR}/lib"
}
pushd ${SEQUOIA_DIR}
if [[ $TARGET == *"ios"* ]]; then
build_ios
else
build_macos
fi
popd
# copy headers
cp -R "${SEQUOIA_DIR}/openpgp-ffi/include"/* "${CURRENT_LIB_DIR}/include/"

+ 108
- 0
buildcode/sequoia_resources/nettle-bindings.rs
File diff suppressed because it is too large
View File


clean_pEp.sh → clean_pEp_macOS.sh View File


+ 46
- 0
generate_and_run_ios_dependency_build_script.sh View File

@ -0,0 +1,46 @@
# Builds fat lib for macOS (ARM64 & x86_64).
# Pass PREFIX as argument. If not passed, "local/" is used as deafult.
# Exit on errors
set -e
SCRIPT_DIR=$(dirname "$0")
LIB_NAME=$1
PREFIX=$2
# Get Absolute Paths
pushd "${SCRIPT_DIR}"
SCRIPT_DIR=$(pwd)
popd
mkdir -p "${PREFIX}"
pushd "${PREFIX}"
PREFIX=$(pwd)
popd
GENERATED_SCRIPT="${SCRIPT_DIR}/generated.sh"
exitAndPrintHelp()
{
echo "Must be called passing \`LIB_NAME`\` (mandatory). \`PREFIX\` can also be passed (optional).\nSample:\n\`generate_and_run_ios_dependency_build_script \$LIB_NAME\`\n`generate_and_run_ios_dependency_build_script \$LIB_NAME \$PREFIX\`"
exit 1
}
if [ "${LIB_NAME}" = "" ]; then
exitAndPrintHelp
fi
# Say Hello
echo "#####################################################"
echo "#Generating buildscript for ${LIB_NAME}"
echo "#####################################################"
# Generate Actual Script
BUILD_CODE_FILE="${SCRIPT_DIR}/buildcode/${LIB_NAME}.code"
BUILD_SCRIPT_TEMPLATE_FILE="${SCRIPT_DIR}/build-ios_dependency.template"
SEARCH_STRING="BUILD_CODE"
#Replaces ${SEARCH_STRING} in file ${BUILD_SCRIPT_TEMPLATE_FILE} with content of ${BUILD_CODE_FILE}
/opt/local/bin/gsed -e "/${SEARCH_STRING}/r ${BUILD_CODE_FILE}" -e "/${SEARCH_STRING}/d" ${BUILD_SCRIPT_TEMPLATE_FILE} > "${GENERATED_SCRIPT}"
sh ${GENERATED_SCRIPT} ${PREFIX}
# Cleanup
rm -rf "${TMP_DIR}"

+ 12
- 0
get-config-ios-deployment-target.sh View File

@ -0,0 +1,12 @@
# returns the default IOS_DEPLOYMENT TARGET
SCRIPT_DIR=$(dirname $0)
# Get Absolute Paths
pushd "${SCRIPT_DIR}" >/dev/null
SCRIPT_DIR=$(pwd)
popd >/dev/null
CONFIG_PLIST="${SCRIPT_DIR}/CommonPEPDependencies/config.plist"
RESULT=$(/usr/libexec/PlistBuddy -c "Print IOS_DEPLOYMENT" "${CONFIG_PLIST}")
echo ${RESULT}

Loading…
Cancel
Save