Browse Source

initial commit

master
Andreas Buff 3 months ago
commit
2b1d68e9f8
37 changed files with 2889 additions and 0 deletions
  1. +78
    -0
      .gitignore
  2. +1128
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/project.pbxproj
  3. +7
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  4. +8
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  5. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/CLEAN_ALL.xcscheme
  6. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_asn1cexecutable.xcscheme
  7. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_boost_macOS.xcscheme
  8. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_cryptopp_macOS.xcscheme
  9. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_libiconv_macOS.xcscheme
  10. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_openssl_macOS.xcscheme
  11. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_pEpAdapter_macOS.xcscheme
  12. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_pEpengine_macOS.xcscheme
  13. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_pEpwebserver_macOS.xcscheme
  14. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_sequoia_iOS.xcscheme
  15. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_sequoia_macOS.xcscheme
  16. +12
    -0
      CommonPEPDependencies/config.plist
  17. +100
    -0
      README.md
  18. +28
    -0
      _config/pEp_versions.plist
  19. +46
    -0
      build-asn1executable.sh
  20. +54
    -0
      build-fat-libs.sh
  21. +61
    -0
      build-macOSAdapter.sh
  22. +92
    -0
      build-macos_dependency.template
  23. +78
    -0
      build-pEpEngine-macOS.sh
  24. +59
    -0
      build-sequoia-iOS.sh
  25. +61
    -0
      build-sequoia-macOS.sh
  26. +38
    -0
      buildcode/boost.code
  27. +36
    -0
      buildcode/cryptopp.code
  28. +23
    -0
      buildcode/iconv.code
  29. +24
    -0
      buildcode/openssl.code
  30. +31
    -0
      buildcode/pEpAdapter.code
  31. +42
    -0
      buildcode/pEpminijsonadapter.code
  32. +41
    -0
      buildcode/pEpwebserver.code
  33. +43
    -0
      generate_and_run_mac_dependency_build_script.sh
  34. +12
    -0
      get-config-macos-deployment-target-M1.sh
  35. +12
    -0
      get-config-macos-deployment-target-x86_64.sh
  36. +12
    -0
      get-config-prefix.sh
  37. +26
    -0
      get-pEp-version.sh

+ 78
- 0
.gitignore View File

@ -0,0 +1,78 @@
generated*
tmp
*build/*
### Objective-C ###
# Xcode
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
### Objective-C Patch ###
### OSX ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
.build/
### Xcode Patch ###
**/xcshareddata/WorkspaceSettings.xcsettings

+ 1128
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/project.pbxproj
File diff suppressed because it is too large
View File


+ 7
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/project.xcworkspace/contents.xcworkspacedata View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

+ 8
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

+ 67
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/CLEAN_ALL.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 = "1585EEFC26A0432A00B822E1"
BuildableName = "CLEAN_ALL"
BlueprintName = "CLEAN_ALL"
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 = "1585EEFC26A0432A00B822E1"
BuildableName = "CLEAN_ALL"
BlueprintName = "CLEAN_ALL"
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_asn1cexecutable.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 = "1585EEA5269EDA1E00B822E1"
BuildableName = "build_asn1cexecutable"
BlueprintName = "build_asn1cexecutable"
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 = "1585EEA5269EDA1E00B822E1"
BuildableName = "build_asn1cexecutable"
BlueprintName = "build_asn1cexecutable"
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_boost_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 = "1585EE39269EC90100B822E1"
BuildableName = "build_boost_macOS"
BlueprintName = "build_boost_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 = "1585EE39269EC90100B822E1"
BuildableName = "build_boost_macOS"
BlueprintName = "build_boost_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_cryptopp_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 = "1585EE48269ECB8700B822E1"
BuildableName = "build_cryptopp_macOS"
BlueprintName = "build_cryptopp_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 = "1585EE48269ECB8700B822E1"
BuildableName = "build_cryptopp_macOS"
BlueprintName = "build_cryptopp_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_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 = "1585EE27269DD87700B822E1"
BuildableName = "build_libiconv_macOS"
BlueprintName = "build_libiconv_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 = "1585EE27269DD87700B822E1"
BuildableName = "build_libiconv_macOS"
BlueprintName = "build_libiconv_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_openssl_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 = "1585EE3E269EC9BB00B822E1"
BuildableName = "build_openssl_macOS"
BlueprintName = "build_openssl_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 = "1585EE3E269EC9BB00B822E1"
BuildableName = "build_openssl_macOS"
BlueprintName = "build_openssl_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_pEpAdapter_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 = "1585EE4D269ECFA900B822E1"
BuildableName = "build_pEpAdapter_macOS"
BlueprintName = "build_pEpAdapter_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 = "1585EE4D269ECFA900B822E1"
BuildableName = "build_pEpAdapter_macOS"
BlueprintName = "build_pEpAdapter_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_pEpengine_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 = "1585EEAA269EDAE200B822E1"
BuildableName = "build_pEpengine_macOS"
BlueprintName = "build_pEpengine_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 = "1585EEAA269EDAE200B822E1"
BuildableName = "build_pEpengine_macOS"
BlueprintName = "build_pEpengine_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_pEpwebserver_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 = "1585EE43269ECB2500B822E1"
BuildableName = "build_pEpwebserver_macOS"
BlueprintName = "build_pEpwebserver_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 = "1585EE43269ECB2500B822E1"
BuildableName = "build_pEpwebserver_macOS"
BlueprintName = "build_pEpwebserver_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_sequoia_iOS.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 = "1585EF0526A0479800B822E1"
BuildableName = "build_sequoia_iOS"
BlueprintName = "build_sequoia_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 = "1585EF0526A0479800B822E1"
BuildableName = "build_sequoia_iOS"
BlueprintName = "build_sequoia_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_sequoia_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 = "1585EECA269EF0F100B822E1"
BuildableName = "build_sequoia_macOS"
BlueprintName = "build_sequoia_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 = "1585EECA269EF0F100B822E1"
BuildableName = "build_sequoia_macOS"
BlueprintName = "build_sequoia_macOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 12
- 0
CommonPEPDependencies/config.plist View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-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>MACOSX_DEPLOYMENT_x86_64</key>
<string>10.10</string>
<key>MACOSX_DEPLOYMENT_M1</key>
<string>11.0</string>
<key>CommonPEPDependencies_PREFIX</key>
<string>build</string>
</dict>
</plist>

+ 100
- 0
README.md View File

@ -0,0 +1,100 @@
Contains one macOS build script for each dependency and an Xcode project with convenience build aggragates (using the build scripts).
## Prerequisites
### Package managers
MacPorts for installing dependencies:
Install [MacPorts](https://www.macports.org/) for your
[version of OS X/macOS](https://www.macports.org/install.php).
### Dependencies of prerequisites
You need a working python3 environment and all dependencies:
```
sudo port install git
sudo port install asn1c
sudo port install python38
sudo port install py38-lxml
sudo port select --set python3 python38
sudo port install gmake
sudo port install autoconf
sudo port install libtool
sudo port install automake
sudo port install wget
sudo port install gsed
sudo port install capnproto
xcode-select --install
```
#### Install Rust
```
curl https://sh.rustup.rs -sSf | sh
```
add this to ~/.profile (create if it doesn't exist):
```
source $HOME/.cargo/env
export PATH="$HOME/.cargo/bin:$PATH"
```
Restart your Console!
```
sudo port install pkgconfig
rustup toolchain install nightly
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
rustup target add aarch64-apple-darwin --toolchain nightly
rustup update
```
## Dependencies
```
git clone https://gitea.pep.foundation/buff/mac-os-build-scripts-common-dependencies.git
```
## Build
We recomend to not use the shell scripts directly but to use Xcode (because its a working, tested onliner and using the scripts directly is undocumented and untested).
### Using Xcode UI
`open CommonPEPDependencies/CommonPEPDependencies.xcodeproj`.
Build the scheme fitting your needs (e.g. "build-pEpMIME-dependencies_macOS" if you need the dependencies for building pEpMIME).
### Using terminal
`xcodebuild -project "CommonPEPDependencies/CommonPEPDependencies.xcodeproj" -scheme "$NAME_OF_SCHEME_FITING_YOUR_NEEDS" -configuration [RELEASE|DEBUG]`
## Output Dir
You can configure the PREFIX to save build arttefacts and headers in CommonPEPDependencies/config.plist, setting the value for key "CommonPEPDependencies_PREFIX". It is relative to `CommonPEPDependencies/CommonPEPDependencies.xcodeproj`.
The default output dir is `CommonPEPDependencies/build`.
See: #Configs section for details re configuring it
## Configs
### config.plist
There is a `CommonPEPDependencies/config.plist` config file which you can configure the following in:
#### CommonPEPDependencies_PREFIX
Defines the PREFIX directory to save build arttefacts and headers in. It is relative to `CommonPEPDependencies/CommonPEPDependencies.xcodeproj`.
### pEp_versions.plist
There is a `/_config/pEp_versions.plist` where you can configure the version used for pEp dependencies.
For 3rd party dependencies, the version used is hardcoded in the corresponding .code file (e.g. `buildcode/iconv.code`) as it is assumed to use the same 3rd party lib version for all pEp projects (if that assumtion is wrong, please do not chagne the `.code`file but ping the maintainer to the version to `/_config/pEp_versions.plist` ).

+ 28
- 0
_config/pEp_versions.plist View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-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>SEQUOIA_4_iOS_VERSION</key>
<string>v2.1.6</string>
<key>SEQUOIA_4_MAC_OS_VERSION</key>
<string>v2.1.6</string>
<key>PEP4THUNDERBIRD_VERSION</key>
<string>1.1.111-build2</string>
<key>IMPORT_FROM_ENIGMAIL_VERSION</key>
<string>Release_2.1.18</string>
<key>PEP_ENGINE_VERSION</key>
<string>Release_2.1.45</string>
<key>LIB_PEP_ADAPTER_VERSION</key>
<string>Release_2.1.21</string>
<key>WEBSERVER_VERSION</key>
<string>Release_2.1.0-RC7</string>
<key>JSON_SERVER_ADAPTER_VERSION</key>
<string>Release_2.1.5</string>
<key>DOWNLOADCLIENT_VERSION</key>
<string>Release_2.1.2-RC2</string>
<key>MAC_OS_ADAPTER_VERSION</key>
<string>Release_2.1.6-RC2</string>
<key>PEP4THUNDERBIRD_PKG_MAKER_VERSION</key>
<string>Release_2.1.4-RC2</string>
</dict>
</plist>

+ 46
- 0
build-asn1executable.sh View File

@ -0,0 +1,46 @@
#!/bin/bash
# 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"
mkdir -p "${TMP_DIR}"
if [ -f "${PREFIX}/bin/asn1c" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
# ASN1c executable
ASN1_DIR="${TMP_DIR}/asn1c"
if [ ! -d "${ASN1_DIR}" ]; then
pushd "${TMP_DIR}"
git clone -b "v0.9.28" git://github.com/vlm/asn1c.git
popd
fi
pushd ${ASN1_DIR}
autoreconf -iv
./configure --prefix=${PREFIX}
make -j4 install
popd

+ 54
- 0
build-fat-libs.sh View File

@ -0,0 +1,54 @@
#!/bin/bash
# Creates fat libs of all .a files in `ARCH1_DIR` (1st param), combining .a with same name in `ARCH2_DIR` (2nd param), saving fat lib in `OUTPUT_DIR` (3rd param).
# Exit on errors
set -e
SCRIPT_DIR=$(dirname "$0")
ARCH1_DIR=$1
ARCH2_DIR=$2
OUTPUT_DIR=$3
# Get absolute paths
pushd "${SCRIPT_DIR}"
SCRIPT_DIR=$(pwd)
popd
pushd "${ARCH1_DIR}"
ARCH1_DIR=$(pwd)
popd
pushd "${ARCH2_DIR}"
ARCH2_DIR=$(pwd)
popd
pushd "${OUTPUT_DIR}"
OUTPUT_DIR=$(pwd)
popd
echo "BUFF: ARCH1_DIR: ${ARCH1_DIR}"
echo "BUFF: ARCH1_DIR: ${ARCH2_DIR}"
exitAndPrintHelp()
{
echo "Must be called with ARCH1_DIR ARCH2_DIR OUTPUT_DIR, all absolute paths."
exit 1
}
if [ "${ARCH1_DIR}" = "" ]; then
exitAndPrintHelp
elif [ "${ARCH2_DIR}" = "" ]; then
exitAndPrintHelp
elif [ "${OUTPUT_DIR}" = "" ]; then
exitAndPrintHelp
fi
pushd "${ARCH1_DIR}"
OBJECT_FILE_NAMES=$(ls *.a)
popd
for OBJECT_FILE_NAME in ${OBJECT_FILE_NAMES}; do
IN1="${ARCH1_DIR}/${OBJECT_FILE_NAME}"
IN2="${ARCH2_DIR}/${OBJECT_FILE_NAME}"
OUT="${OUTPUT_DIR}/${OBJECT_FILE_NAME}"
mkdir -p "${OUTPUT_DIR}"
lipo -create -output "${OUT}" "${IN1}" "${IN2}"
done

+ 61
- 0
build-macOSAdapter.sh View File

@ -0,0 +1,61 @@
#!/bin/bash
# Builds fat lib for macOS (ARM64 & x86_64).
# Pass PREFIX as argument. If not passed, "local/" is used as deafult. Config can also be passed.
# Sample:
# `sh build-pEpEngine-macOS.sh $MyPREFIX [RELEASE|DEBUG]
# Exit on errors
set -e
SCRIPT_DIR=$(dirname "$0")
PREFIX=$1
CONFIG=$2
if [ "${CONFIG}" = "" ]; then
CONFIG="RELEASE"
fi
MACOSADAPTER_VERSION=$(sh get-pEp-version.sh "MAC_OS_ADAPTER_VERSION")
DOWNLOADCLIENT_VERSION=$(sh get-pEp-version.sh "DOWNLOADCLIENT_VERSION")
# Get Absolute Paths & Setup
SCRIPT_DIR=$(sh "${SCRIPT_DIR}/helper/absolutepath.sh ${SCRIPT_DIR}"
if [ "${PREFIX}" = "" ]; then
PREFIX="${SCRIPT_DIR}/local"
fi
mkdir -p "${PREFIX}"
PREFIX=$(sh "${SCRIPT_DIR}/helper/absolutepath.sh ${PREFIX}"
TMP_DIR="${SCRIPT_DIR}/tmp"
mkdir -p "${TMP_DIR}"
if [ -f "${PREFIX}/bin/foundation.pEp.adapter.macOS" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
# libpEpEngine
pushd "${TMP_DIR}"
MAC_OS_ADAPTER_DIR="${TMP_DIR}/pEpMacOSAdapter"
if [ ! -d "${MAC_OS_ADAPTER_DIR}" ]; then
git clone -b "${MACOSADAPTER_VERSION}" https://gitea.pep.foundation/pEp.foundation/pEpMacOSAdapter/
fi
DOWNLOADCLIENT_DIR="${TMP_DIR}/downloadclient"
if [ ! -d "${DOWNLOADCLIENT_DIR}" ]; then
git clone -b "${DOWNLOADCLIENT_VERSION}" https://gitea.pep.foundation/pEp.foundation/downloadclient
# Is build with macOSAdapter Xcode project
fi
pushd ${MAC_OS_ADAPTER_DIR}
xcodebuild -workspace "pEpMacOSAdapter.xcworkspace" -scheme "All" -configuration ${CONFIG}
cp -r "build/foundation.pEp.adapter.macOS.xpc/Contents/MacOS/foundation.pEp.adapter.macOS" "${PREFIX}/bin/foundation.pEp.adapter.macOS"
mkdir -p "${PREFIX}/apps"
cp -r "Submodules/pEpNotifications/build/p≡p updates.app" "${PREFIX}/apps/p≡p updates.app"
popd
popd
# Cleanup
rm -rf "${TMP_DIR}/x86_64"
rm -rf "${TMP_DIR}/arm64"
export MACOSX_DEPLOYMENT_TARGET=10.10

+ 92
- 0
build-macos_dependency.template View File

@ -0,0 +1,92 @@
#!/bin/bash
# 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")
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"
mkdir -p "${INCLUDE_DIR}"
mkdir -p "${LIB_DIR}"
mkdir -p "${TMP_DIR}"
MACOSX_DEPLOYMENT_TARGET_INTEL=$("${SCRIPT_DIR}"/get-config-macos-deployment-target-x86_64.sh)
MACOSX_DEPLOYMENT_TARGET_ARM=$("${SCRIPT_DIR}"/get-config-macos-deployment-target-M1.sh)
# Funcs
buildLib()
{
ARCH=$1
TARGET=$2
HOST=$3
SDK=$4
SDK_PATH=`xcrun -sdk ${SDK} --show-sdk-path`
if [ "${ARCH}" == "x86_64" ]; then
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET_INTEL}
elif [ "${ARCH}" == "arm64" ]; then
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET_ARM}
else
echo "Error: Unhandled arch!"
exit 1
fi
CURRENT_LIB_DIR="${TMP_DIR}/${ARCH}"
mkdir -p "${CURRENT_LIB_DIR}/lib"
mkdir -p "${CURRENT_LIB_DIR}/include"
# START: Lib Specific Code
BUILD_CODE
# END: Lib Specific Code
}
# Cleanup
cleanup()
{
rm -rf "${TMP_DIR}/x86_64"
rm -rf "${TMP_DIR}/arm64"
export MACOSX_DEPLOYMENT_TARGET=10.10
}
cleanup
# Setup
mkdir -p "${TMP_DIR}"
mkdir -p "${PREFIX}"
# Build
pushd "${TMP_DIR}"
buildLib "x86_64" "x86_64-apple-macos10.10" "x86_64-apple-darwin" "macosx"
buildLib "arm64" "arm64-apple-macos11.1" "aarch64-apple-darwin" "macosx"
popd
# Make Fat Lib
sh "${SCRIPT_DIR}/build-fat-libs.sh" "${TMP_DIR}/arm64/lib" "${TMP_DIR}/x86_64/lib" "${LIB_DIR}"
# Copy Headers
ARM64_INCLUDE_DIR="${TMP_DIR}/arm64/include"
cp -r "${ARM64_INCLUDE_DIR}"/* "${INCLUDE_DIR}"
# Cleanup
cleanup

+ 78
- 0
build-pEpEngine-macOS.sh View File

@ -0,0 +1,78 @@
#!/bin/bash
# Builds fat lib for macOS (ARM64 & x86_64).
# Pass PREFIX as argument. If not passed, "local/" is used as deafult. Config can also be passed.
# Sample:
# `sh build-pEpEngine-macOS.sh $MyPREFIX [RELEASE|DEBUG]
# Exit on errors
set -e
SCRIPT_DIR=$(dirname "$0")
PREFIX=$1
CONFIG=$2
if [ "${CONFIG}" = "" ]; then
CONFIG="RELEASE"
fi
VERSION=$(sh "${SCRIPT_DIR}/get-pEp-version.sh" "PEP_ENGINE_VERSION")
# Get Absolute Paths & Setup
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"
mkdir -p "${TMP_DIR}"
if [ -f "${PREFIX}/lib/libpEpEngine.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
# libpEpEngine
pushd "${TMP_DIR}"
PEP_ENGINE_DIR="${TMP_DIR}/pEpEngine"
if [ ! -d "${PEP_ENGINE_DIR}" ]; then
git clone -b "${VERSION}" https://gitea.pep.foundation/buff/pEpEngine
fi
SQLITE3_DIR="${TMP_DIR}/sqlite"
if [ ! -d "${SQLITE3_DIR}" ]; then
git clone -b "master" https://pep-security.lu/gitlab/misc/sqlite.git
# build with Engine Xcode project
fi
LIBETPAN_DIR="${TMP_DIR}/libetpan"
if [ ! -d "${LIBETPAN_DIR}" ]; then
git clone -b "master" https://gitea.pep.foundation/buff/libetpan.git
# build with Engine Xcode project
fi
XCODE_PROJECT_DIR="${PEP_ENGINE_DIR}/build-mac"
pushd ${XCODE_PROJECT_DIR}
xcodebuild -project "pEpEngine.xcodeproj" -scheme "pEpEngine_macOS" -configuration ${CONFIG}
popd
# Copy Artefacts
cp "${XCODE_PROJECT_DIR}/build/libpEpEngine.a" "${PREFIX}/lib/libpEpEngine.a"
cp "${XCODE_PROJECT_DIR}/Subprojects/pEpASN1/build/libpEpASN1_macOS.a" "${LIB_DIR}/lib/libasn1.a"
cp "${XCODE_PROJECT_DIR}/Subprojects/PEPSQLITE3/build/libPEPSQLITE3_macOS.a" "${PREFIX}/lib/libsqlite3.a"
cp "${SCRIPT_DIR}/libetpan/build-mac/build/libetpan.a" "${PREFIX}/lib"
# Copy Headers
cp -r "${XCODE_PROJECT_DIR}/build/include"/* "${PREFIX}/include"
cp -r "${XCODE_PROJECT_DIR}/Subprojects/pEpASN1/build/include"/* "${PREFIX}/include"
cp -r ${XCODE_PROJECT_DIR}/Subprojects/PEPSQLITE3/build/include/* "${PREFIX}/include"
popd
# Cleanup
rm -rf "${TMP_DIR}/x86_64"
rm -rf "${TMP_DIR}/arm64"
export MACOSX_DEPLOYMENT_TARGET=10.10

+ 59
- 0
build-sequoia-iOS.sh View File

@ -0,0 +1,59 @@
#!/bin/bash
# Builds fat lib for macOS (ARM64 & x86_64).
# Pass PREFIX as argument. If not passed, "local/" is used as deafult.
set -e
SCRIPT_DIR=$(dirname "$0")
PREFIX=$1
VERSION=$(sh "${SCRIPT_DIR}/get-pEp-version.sh" "SEQUOIA_4_iOS_VERSION")
# Get Absolute Paths & Setup
# 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
# Go, Build
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
TMP_DIR="${SCRIPT_DIR}/tmp"
mkdir -p "${TMP_DIR}"
pushd "${TMP_DIR}"
SEQUOIA_4_IOS_DIR="${TMP_DIR}/sequoia4macos"
if [ ! -d "${SEQUOIA_4_IOS_DIR}" ]; then
git clone -b "${VERSION}" http://pep-security.lu/gitlab/iOS/sequoia4ios.git
fi
pushd ${SEQUOIA_4_IOS_DIR}
sh build.sh
popd
# Copy artefacts ...
cp "${SEQUOIA_4_IOS_DIR}/build/lib/libgmp.a" "${PREFIX}/lib/"
cp "${SEQUOIA_4_IOS_DIR}/build/lib/libhogweed.a" "${PREFIX}/lib/"
cp "${SEQUOIA_4_IOS_DIR}/build/lib/libnettle.a" "${PREFIX}/lib/"
cp "${SEQUOIA_4_IOS_DIR}/build/lib/libsequoia_openpgp_ffi.a" "${PREFIX}/lib/"
# ... and headers
cp -R "${SEQUOIA_4_IOS_DIR}/build/include/nettle" "${PREFIX}/include/"
cp -R "${SEQUOIA_4_IOS_DIR}/build/include/sequoia" "${PREFIX}/include/"
cp "${SEQUOIA_4_IOS_DIR}/build/include/gmp.h" "${PREFIX}/include/"
popd
# Cleanup
rm -rf "${TMP_DIR}/x86_64"
rm -rf "${TMP_DIR}/arm64"

+ 61
- 0
build-sequoia-macOS.sh View File

@ -0,0 +1,61 @@
#!/bin/bash
# Builds fat lib for macOS (ARM64 & x86_64).
# Pass PREFIX as argument. If not passed, "local/" is used as deafult.
set -e
SCRIPT_DIR=$(dirname "$0")
PREFIX=$1
VERSION=$(sh "${SCRIPT_DIR}/get-pEp-version.sh" "SEQUOIA_4_MAC_OS_VERSION")
# Get Absolute Paths & Setup
# 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
# Go, Build
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
TMP_DIR="${SCRIPT_DIR}/tmp"
mkdir -p "${TMP_DIR}"
pushd "${TMP_DIR}"
SEQUOIA_4_MACOS_DIR="${TMP_DIR}/sequoia4macos"
if [ ! -d "${SEQUOIA_4_MACOS_DIR}" ]; then
git clone -b "${VERSION}" http://pep-security.lu/gitlab/macos/sequoia4macos.git
fi
pushd ${SEQUOIA_4_MACOS_DIR}
sh build.sh
popd
# Copy artefacts ...
cp "${SEQUOIA_4_MACOS_DIR}/build/lib/libgmp.a" "${PREFIX}/lib/"
cp "${SEQUOIA_4_MACOS_DIR}/build/lib/libhogweed.a" "${PREFIX}/lib/"
cp "${SEQUOIA_4_MACOS_DIR}/build/lib/libnettle.a" "${PREFIX}/lib/"
cp "${SEQUOIA_4_MACOS_DIR}/build/lib/libsequoia_ffi.a" "${PREFIX}/lib/"
cp "${SEQUOIA_4_MACOS_DIR}/build/lib/libsequoia_openpgp_ffi.a" "${PREFIX}/lib/"
# ... and headers
cp -R "${SEQUOIA_4_MACOS_DIR}/build/include/nettle" "${PREFIX}/include/"
cp -R "${SEQUOIA_4_MACOS_DIR}/build/include/sequoia" "${PREFIX}/include/"
cp "${SEQUOIA_4_MACOS_DIR}/build/include/gmp.h" "${PREFIX}/include/"
popd
# Cleanup
rm -rf "${TMP_DIR}/x86_64"
rm -rf "${TMP_DIR}/arm64"
export MACOSX_DEPLOYMENT_TARGET=10.10

+ 38
- 0
buildcode/boost.code View File

@ -0,0 +1,38 @@
if [ -f "${LIB_DIR}/libboost_regex.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
BOOST_DIR="${TMP_DIR}/boost"
if [ ! -d "${BOOST_DIR}" ]; then
git clone -b boost-1.73.0 --recursive https://github.com/boostorg/boost.git
fi
pushd "${BOOST_DIR}"
rm -rf "stage"
./bootstrap.sh --with-toolset=clang-darwin macosx-version-min=${MACOSX_DEPLOYMENT_TARGET} cxxflags="-arch ${ARCH} -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" cflags="-arch ${ARCH} -isysroot ${SDK_PATH}" linkflags="-arch ${ARCH}"
BOOST_TOOLSET="toolset=clang-darwin"
BOOST_TARGET="target-os=darwin"
USED_BOOST_LIBS_ARGS="--with-regex --with-filesystem --with-program_options --with-thread --with-system"
if [ ${ARCH} = "x86_64" ]; then
./b2 clean
./b2 ${BOOST_TOOLSET} ${BOOST_TARGET} architecture=x86 -std=c++11 cxxflags="-arch ${ARCH} -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" cflags="-arch ${ARCH}" linkflags="-arch ${ARCH} " ${USED_BOOST_LIBS_ARGS} stage
./b2 install
elif [ ${ARCH} = "arm64" ]; then
./b2 clean
./b2 ${BOOST_TOOLSET} ${BOOST_TARGET} architecture=arm -std=c++11 abi=aapcs cxxflags="-arch ${ARCH} -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" cflags="-arch ${ARCH}" linkflags="-arch ${ARCH}" ${USED_BOOST_LIBS_ARGS} stage
./b2 install
else
echo "unhandled ARCH"
exit 1
fi
# Copy *.a files
TARGET_DIR="${CURRENT_LIB_DIR}/lib"
mkdir -p "${TARGET_DIR}"
cp stage/lib/*.a "${TARGET_DIR}"
# Copy Headers
TARGET_DIR="${CURRENT_LIB_DIR}/include/"
#cp -r boost "${TARGET_DIR}"
rsync -rL boost "${TARGET_DIR}"
popd

+ 36
- 0
buildcode/cryptopp.code View File

@ -0,0 +1,36 @@
if [ -f "${LIB_DIR}/libcryptopp.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
CRYPTOPP_DIR="${TMP_DIR}/cryptopp"
if [ ! -d "${CRYPTOPP_DIR}" ]; then
git clone -b CRYPTOPP_8_2_0 https://github.com/weidai11/cryptopp
fi
pushd ${CRYPTOPP_DIR}
export CXX="$(xcrun --sdk ${SDK} -f clang++) -arch ${ARCH} -isysroot ${SDK_PATH} -stdlib=libc++"
export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c14"
export LDFLAGS="-arch ${ARCH}"
export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}-target ${TARGET}"
export PREFIX=${CURRENT_LIB_DIR}
if [ "${ARCH}" == "x86_64" ]; then
export CXXFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -mmacosx-version-min=10.10"
make clean
make -j4
make install
elif [ "${ARCH}" == "arm64" ]; then
export CXXFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -mmacosx-version-min=11.0 -DDISABLE_NATIVE_ARCH=1 -DCRYPTOPP_ARM_CRC32_AVAILABLE=0"
make clean
make -j4
make install
else
echo "Error: Unhandled arch!"
exit 1
fi
popd
unset PREFIX
unset CXXFLAGS
unset CXX
unset CFLAGS
unset LDFLAGS
unset CC

+ 23
- 0
buildcode/iconv.code View File

@ -0,0 +1,23 @@
if [ -f "${LIB_DIR}/libiconv.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
ICONV_DIR="${TMP_DIR}/libiconv"
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}"
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH="${CURRENT_LIB_DIR}/lib/pkgconfig" ./configure --host=${HOST} --prefix=${CURRENT_LIB_DIR} --enable-static=yes --enable-shared=no
make clean
make -j4
make install
unset CFLAGS
unset LDFLAGS
unset CC
popd

+ 24
- 0
buildcode/openssl.code View File

@ -0,0 +1,24 @@
if [ -f "${LIB_DIR}/libcrypto.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
OpenSSL_DIR="${TMP_DIR}/openssl"
if [ ! -d "${OpenSSL_DIR}" ]; then
git clone -b OpenSSL_1_1_1i https://github.com/openssl/openssl.git
fi
pushd "${OpenSSL_DIR}"
OPEN_SSL_TARGET="Not set"
if [ ${ARCH} == "arm64" ]; then
OPEN_SSL_TARGET=darwin64-arm64-cc
elif [ ${ARCH} = "x86_64" ]; then
OPEN_SSL_TARGET=darwin64-x86_64-cc
else
echo "unhandled ARCH"
exit 1
fi
./Configure --prefix=${CURRENT_LIB_DIR} --openssldir=${CURRENT_LIB_DIR}/ssl ${OPEN_SSL_TARGET}
make clean
make
make install
popd

+ 31
- 0
buildcode/pEpAdapter.code View File

@ -0,0 +1,31 @@
if [ -f "${LIB_DIR}/libpEpAdapter.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
LIB_PEP_ADAPTER_DIR="${TMP_DIR}/libpEpAdapter"
if [ ! -d "${LIB_PEP_ADAPTER_DIR}" ]; then
git clone -b "${LIB_PEP_ADAPTER_VERSION}" https://gitea.pep.foundation/pEp.foundation/libpEpAdapter
fi
export CXXFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c++14 -fPIC"
export LDFLAGS="-arch ${ARCH}"
export CXX="$(xcrun --sdk ${SDK} -f clang++) -arch ${ARCH} -isysroot ${SDK_PATH}"
pushd ${LIB_PEP_ADAPTER_DIR}
LOCAL_CONF="\n
\n
DEBUG=0\n
\n
PREFIX=${CURRENT_LIB_DIR}\n
\n
ENGINE_LIB_PATH="${PREFIX}/lib"\n
\n
ENGINE_INC_PATH="${PREFIX}/include"\n
"
make clean
echo ${LOCAL_CONF} > local.conf
make all -j 4
make install
popd
unset CXXFLAGS
unset LDFLAGS
unset CXX

+ 42
- 0
buildcode/pEpminijsonadapter.code View File

@ -0,0 +1,42 @@
if [ -f "${PREFIX}/bin/pEp-mini-json-adapter" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
PEP_JSON_ADAPTER_DIR="${TMP_DIR}/pEpJSONServerAdapter"
if [ ! -d "${PEP_JSON_ADAPTER_DIR}" ]; then
git clone -b ${JSON_SERVER_ADAPTER_VERSION} https://gitea.pep.foundation/pEp.foundation/pEpJSONServerAdapter.git
fi
export CXXFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH}"
export CXX="$(xcrun --sdk ${SDK} -f clang++) -arch ${ARCH} -isysroot ${SDK_PATH} -stdlib=libc++"
export LDFLAGS="-arch ${ARCH}"
export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c14"
export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}"
pushd "${PEP_JSON_ADAPTER_DIR}/server"
LOCAL_CONF="\n
\n
NDEBUG=yes\n
\n
PREFIX=${CURRENT_LIB_DIR}\n
\n
PEP_INCLUDE=${PREFIX}/include\n
\n
PEP_LIB_PATH=${PREFIX}/lib\n
\n
LIBRARY_PATH=${PREFIX}/lib\n
\n
BOOST_MT=\n
"
echo ${LOCAL_CONF} > local.conf
make clean
make
popd
unset CXXFLAGS
unset CXX
unset LDFLAGS
unset CFLAGS
unset CC
# Copy Artefact
cp pEpJSONServerAdapter/server/pEp-mini-json-adapter "${CURRENT_LIB_DIR}/bin/"

+ 41
- 0
buildcode/pEpwebserver.code View File

@ -0,0 +1,41 @@
if [ -f "${LIB_DIR}/libpEpwebserver.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
PEP_WEB_SERVER_DIR="${TMP_DIR}/webserver"
if [ ! -d "${PEP_WEB_SERVER_DIR}" ]; then
git clone https://gitea.pep.foundation/pEp.foundation/webserver.git
fi
pushd ${PEP_WEB_SERVER_DIR}
git checkout ${WEBSERVER_VERSION}
export CXXFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c++14 -fPIC"
export LDFLAGS="-arch ${ARCH}"
export CXX="$(xcrun --sdk ${SDK} -f clang++) -arch ${ARCH} -isysroot ${SDK_PATH}"
LOCAL_CONF="\n
\n
NDEBUG=1\n
\n
PREFIX=${CURRENT_LIB_DIR}\n
\n
BOOST_INCLUDE=${PREFIX}/include\n
BOOST_LIB=${PREFIX}/lib\n
\n
"
echo ${LOCAL_CONF} > local.conf
make clean
make
make install
popd
unset CXXFLAGS
unset LDFLAGS
unset CXX
# Copy artefacts ...
cp "${PEP_WEB_SERVER_DIR}/libpEpwebserver.a" "${CURRENT_LIB_DIR}/lib/"
# ... and headers
PEP_HEADER_DIR="${CURRENT_LIB_DIR}/include/pEp"
mkdir -p "${PEP_HEADER_DIR}"
cp -R "${PEP_WEB_SERVER_DIR}/"*.hh "${PEP_HEADER_DIR}"

+ 43
- 0
generate_and_run_mac_dependency_build_script.sh View File

@ -0,0 +1,43 @@
#!/bin/bash
# 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_mac_dependency_build_script \$LIB_NAME\`\n`generate_and_run_mac_dependency_build_script \$LIB_NAME \$PREFIX\`"
exit 1
}
if [ "${LIB_NAME}" = "" ]; then
exitAndPrintHelp
fi
# Generate Actual Script
BUILD_CODE_FILE="${SCRIPT_DIR}/buildcode/${LIB_NAME}.code"
BUILD_SCRIPT_TEMPLATE_FILE="${SCRIPT_DIR}/build-macos_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-macos-deployment-target-M1.sh View File

@ -0,0 +1,12 @@
# returns the default MACOSX_DEPLOYMENT_M1
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 MACOSX_DEPLOYMENT_M1" "${CONFIG_PLIST}")
echo ${RESULT}

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

@ -0,0 +1,12 @@
# returns the default MACOSX_DEPLOYMENT_x86_64
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 MACOSX_DEPLOYMENT_x86_64" "${CONFIG_PLIST}")
echo ${RESULT}

+ 12
- 0
get-config-prefix.sh View File

@ -0,0 +1,12 @@
# returns thedefault PREFIX, relative to Xcode's `${PROJECT_DIR}`
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"
PREFIX=$(/usr/libexec/PlistBuddy -c "Print CommonPEPDependencies_PREFIX" "${CONFIG_PLIST}")
echo ${PREFIX}

+ 26
- 0
get-pEp-version.sh View File

@ -0,0 +1,26 @@
SCRIPT_DIR=$(dirname "$0")
PROJECT_TO_GET_VERSION_FOR=$1
# Get Absolute Paths
pushd "${SCRIPT_DIR}" >/dev/null
SCRIPT_DIR=$(pwd)
popd >/dev/null
# Sanity Check
exitAndPrintHelp()
{
echo "Must be called passing \`PROJECT_TO_GET_VERSION_FOR\` (mandatory).\
The value must be one of the keys in _config/pEp_versions.plist"
exit 1
}
if [ "${PROJECT_TO_GET_VERSION_FOR}" = "" ]; then
exitAndPrintHelp
fi
# Go
PEP_VERSIONS_PLIST="${SCRIPT_DIR}/_config/pEp_versions.plist"
VERSION=$(/usr/libexec/PlistBuddy -c "Print ${PROJECT_TO_GET_VERSION_FOR}" "${PEP_VERSIONS_PLIST}")
echo ${VERSION}

Loading…
Cancel
Save