Browse Source

Adds first sketch for capnproto build

master
Andreas Buff 2 weeks ago
parent
commit
0cade287bd
5 changed files with 160 additions and 108 deletions
  1. +58
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/project.pbxproj
  2. +67
    -0
      CommonPEPDependencies/CommonPEPDependencies.xcodeproj/xcshareddata/xcschemes/build_capnProto_macOS.xcscheme
  3. +2
    -0
      _config/pEp_versions.plist
  4. +33
    -0
      buildcode/capnp.code
  5. +0
    -108
      buildcode/sequoia_resources/nettle-bindings.rs

+ 58
- 0
CommonPEPDependencies/CommonPEPDependencies.xcodeproj/project.pbxproj View File

@ -301,6 +301,17 @@
name = "build-pEp4ThunderbirdInstaller-dependencies_macOS";
productName = "build-pEpMIME-dependencies";
};
15A75B6227469C4E006A33B8 /* build_capnProto_macOS */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 15A75B6627469C4E006A33B8 /* Build configuration list for PBXAggregateTarget "build_capnProto_macOS" */;
buildPhases = (
15A75B6527469C4E006A33B8 /* Build */,
);
dependencies = (
);
name = build_capnProto_macOS;
productName = "libetpan-dependencies_macOS";
};
/* End PBXAggregateTarget section */
/* Begin PBXContainerItemProxy section */
@ -531,6 +542,7 @@
1585EF0526A0479800B822E1 /* build_sequoia_iOS */,
153AFC9F26AAFF4000177147 /* build-libetpan-dependencies_iOS */,
152E47C626A5B7C2009BD3CE /* CLEAN_ALL_iOS */,
15A75B6227469C4E006A33B8 /* build_capnProto_macOS */,
);
};
/* End PBXProject section */
@ -916,6 +928,25 @@
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;
};
15A75B6527469C4E006A33B8 /* Build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = Build;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh -l";
shellScript = "LIB_NAME=\"capnp\"\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;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXTargetDependency section */
@ -1504,6 +1535,24 @@
};
name = Release;
};
15A75B6727469C4E006A33B8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
15A75B6827469C4E006A33B8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NQLYU6MGPN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -1741,6 +1790,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
15A75B6627469C4E006A33B8 /* Build configuration list for PBXAggregateTarget "build_capnProto_macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
15A75B6727469C4E006A33B8 /* Debug */,
15A75B6827469C4E006A33B8 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 1585EE0B269DC6DD00B822E1 /* Project object */;


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

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "15A75B6227469C4E006A33B8"
BuildableName = "build_capnProto_macOS"
BlueprintName = "build_capnProto_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 = "15A75B6227469C4E006A33B8"
BuildableName = "build_capnProto_macOS"
BlueprintName = "build_capnProto_macOS"
ReferencedContainer = "container:CommonPEPDependencies.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 2
- 0
_config/pEp_versions.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>CAP_N_PROTO_VERSION</key>
<string>v0.9.1</string>
<key>NETTLE_VERSION</key>
<string>3.7.3</string>
<key>GMP_VERSION</key>


+ 33
- 0
buildcode/capnp.code View File

@ -0,0 +1,33 @@
VERSION=$(sh "${SCRIPT_DIR}"/get-pEp-version.sh "CAP_N_PROTO_VERSION")
REPO_NAME="capnproto"
LIB_NAME="libcapnp.a"
OUTPUT_DIR=${SCRIPT_DIR}/build
# Exit on errors
set -e
if [ -f "${LIB_DIR}/${LIB_NAME}" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
# We must whipe the repo. It seems to hold capnp build dependencies used in build that have been build in previous runs of make (even we `make clean`), which causes "bad CPU type" building the 2nd time for arm64.
rm -rf "${TMP_DIR}/${REPO_NAME}"
REPO_SRC_DIR="${TMP_DIR}/${REPO_NAME}/c++"
#if [ ! -d "${REPO_SRC_DIR}" ]; then
git clone -b "${VERSION}" https://github.com/capnproto/capnproto.git
#fi
export LDFLAGS="-arch ${ARCH}"
export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}"
export CXX="$(xcrun --sdk ${SDK} -f clang++) -arch ${ARCH} -isysroot ${SDK_PATH}"
pushd ${REPO_SRC_DIR}
autoreconf -i
./configure --host=${HOST} --prefix=${CURRENT_LIB_DIR} --enable-static=yes --enable-shared=no
make clean
make -j6
make install
popd

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


Loading…
Cancel
Save