Browse Source

Merge branch 'IOSAD-215'

IOSAD-218
Andreas Buff 3 months ago
parent
commit
370d35616c
4 changed files with 122 additions and 104 deletions
  1. +96
    -96
      README.md
  2. +2
    -2
      Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols.xcodeproj/project.pbxproj
  3. +10
    -6
      pEpObjCAdapter.xcodeproj/project.pbxproj
  4. +14
    -0
      pEpObjCAdapter.xcodeproj/xcshareddata/xcschemes/PEPObjCAdapter_iOS.xcscheme

+ 96
- 96
README.md View File

@ -57,106 +57,106 @@ mkdir src_pEpObjCAdapter_macOS
cd src_pEpObjCAdapter_macOS
mkdir local
export MACOSX_DEPLOYMENT_TARGET=10.10
git clone -b OpenSSL_1_1_1g https://github.com/openssl/openssl.git
pushd "openssl"
./Configure --prefix=$(pwd)/../local/ --openssldir=$(pwd)/../local/ssl darwin64-x86_64-cc
make
make install
popd
<<<<<<< HEAD
git clone https://github.com/fdik/libetpan
pushd libetpan
./autogen.sh --prefix=$(pwd)/../local/
make install
popd
=======
>>>>>>> 1.1.250
GMP_VERSION="6.1.2"
GMP_DIR="gmp-${GMP_VERSION}"
TARBALL="gmp-${GMP_VERSION}.tar.bz2"
wget -nc https://gmplib.org/download/gmp/"${TARBALL}"
tar xvf "${TARBALL}"
pushd ${GMP_DIR}
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$(pwd)/../local/lib/pkgconfig ./configure --host=${HOST} --prefix=$(pwd)/../local/
make -j4
make install
popd
rm -rf "${TARBALL}"
HOST="x86_64-apple-darwin10.0.0"
NETTLE_VERSION="3.4.1"
NETTLE_DIR="nettle-${NETTLE_VERSION}"
TARBALL=nettle-${NETTLE_VERSION}.tar.gz
wget -nc https://ftp.gnu.org/gnu/nettle/nettle-${NETTLE_VERSION}.tar.gz
tar xvf "${TARBALL}"
pushd ${NETTLE_DIR}
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$(pwd)/../local/lib/pkgconfig ./configure --host=${HOST} --prefix=$(pwd)/../local/ --with-lib-path=$(pwd)/../local/lib --with-include-path=$(pwd)/../local/include
make -j4
make install
popd
rm -rf "${TARBALL}"
git clone -b "pep-engine" --depth 1 https://gitlab.com/sequoia-pgp/sequoia.git
pushd sequoia
make build-release PYTHON=disable
make install PYTHON=disable PREFIX=$(pwd)/../local/
popd
git clone git://github.com/vlm/asn1c.git
pushd asn1c
git checkout tags/v0.9.28 -b pep-engine
autoreconf -iv
./configure --prefix=$(pwd)/../local/
make install
popd
ICONV_VERSION="1.16"
ICONV_DIR="libiconv-${ICONV_VERSION}"
TARBALL="libiconv-${ICONV_VERSION}.tar.gz"
wget -nc https://ftp.gnu.org/pub/gnu/libiconv/${TARBALL}
tar xvf "${TARBALL}"
pushd ${ICONV_DIR}
./configure --prefix=$(pwd)/../local/ --enable-static
make -j 4
make install
popd
<<<<<<< HEAD
# //BUFF: weget and build libz too and link it to libetpan. Rm linking dynamic lib in client afterwards.
git clone https://github.com/fdik/libetpan
pushd libetpan
# //BUFF: This is not working (afaics). libetpan is still using the systems dynamic iconv lib. I was unable yet to force libetpan to use libiconv.a
=======
#TODO: weget and build libz too and link it to libetpan. Rm linking dynamic lib in client afterwards.
git clone https://github.com/fdik/libetpan
pushd libetpan
#ToDo: This is not working (afaics). libetpan is still using the systems dynamic iconv lib. I was unable yet to force libetpan to use libiconv.a
>>>>>>> 1.1.250
unset CFLAGS
unset LDFLAGS
export LDFLAGS="-Wl/Users/buff/workspace/pEp/src_pEpObjCAdapter_macOS/local/libiconv.a"
./autogen.sh --prefix=$(pwd)/../local/ --enable-shared=no
make install
popd
#BAD, required due to ios libetpan sub project. RM after moving out of project or even better being able to build macOS libetpan with the Xcode project
rm -rf libetpan
git clone https://pep-security.lu/gitlab/misc/libetpan.git
git clone https://pep-security.lu/gitlab/misc/sqlite.git
git clone https://gitea.pep.foundation/pEp.foundation/pEpEngine
git clone https://gitea.pep.foundation/pep.foundation/pEpObjCAdapter.git
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!! IS COMPLETELY OUTDATED. DO NOT USE. WIP !!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
export MACOSX_DEPLOYMENT_TARGET=10.10
git clone -b OpenSSL_1_1_1g https://github.com/openssl/openssl.git
pushd "openssl"
./Configure --prefix=$(pwd)/../local/ --openssldir=$(pwd)/../local/ssl darwin64-x86_64-cc
make
make install
popd
git clone https://github.com/fdik/libetpan
pushd libetpan
./autogen.sh --prefix=$(pwd)/../local/
make install
popd
GMP_VERSION="6.1.2"
GMP_DIR="gmp-${GMP_VERSION}"
TARBALL="gmp-${GMP_VERSION}.tar.bz2"
wget -nc https://gmplib.org/download/gmp/"${TARBALL}"
tar xvf "${TARBALL}"
pushd ${GMP_DIR}
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$(pwd)/../local/lib/pkgconfig ./configure --host=${HOST} --prefix=$(pwd)/../local/
make -j4
make install
popd
rm -rf "${TARBALL}"
HOST="x86_64-apple-darwin10.0.0"
NETTLE_VERSION="3.4.1"
NETTLE_DIR="nettle-${NETTLE_VERSION}"
TARBALL=nettle-${NETTLE_VERSION}.tar.gz
wget -nc https://ftp.gnu.org/gnu/nettle/nettle-${NETTLE_VERSION}.tar.gz
tar xvf "${TARBALL}"
pushd ${NETTLE_DIR}
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$(pwd)/../local/lib/pkgconfig ./configure --host=${HOST} --prefix=$(pwd)/../local/ --with-lib-path=$(pwd)/../local/lib --with-include-path=$(pwd)/../local/include
make -j4
make install
popd
rm -rf "${TARBALL}"
git clone -b "pep-engine" --depth 1 https://gitlab.com/sequoia-pgp/sequoia.git
pushd sequoia
make build-release PYTHON=disable
make install PYTHON=disable PREFIX=$(pwd)/../local/
popd
git clone git://github.com/vlm/asn1c.git
pushd asn1c
git checkout tags/v0.9.28 -b pep-engine
autoreconf -iv
./configure --prefix=$(pwd)/../local/
make install
popd
ICONV_VERSION="1.16"
ICONV_DIR="libiconv-${ICONV_VERSION}"
TARBALL="libiconv-${ICONV_VERSION}.tar.gz"
wget -nc https://ftp.gnu.org/pub/gnu/libiconv/${TARBALL}
tar xvf "${TARBALL}"
pushd ${ICONV_DIR}
./configure --prefix=$(pwd)/../local/ --enable-static
make -j 4
make install
popd
# //BUFF: weget and build libz too and link it to libetpan. Rm linking dynamic lib in client afterwards. (SHOULD BE OBSOLETE)
git clone https://github.com/fdik/libetpan
pushd libetpan
# //BUFF: This is not working (afaics). libetpan is still using the systems dynamic iconv lib. I was unable yet to force libetpan to use libiconv.a MAKE XCODE PROJECT TAKE CARE. Add only clone libetpan here
git clone https://github.com/fdik/libetpan
pushd libetpan
#ToDo: This is not working (afaics). libetpan is still using the systems dynamic iconv lib. I was unable yet to force libetpan to use libiconv.a
unset CFLAGS
unset LDFLAGS
export LDFLAGS="-Wl/Users/buff/workspace/pEp/src_pEpObjCAdapter_macOS/local/libiconv.a"
./autogen.sh --prefix=$(pwd)/../local/ --enable-shared=no
make install
popd
#BAD, required due to ios libetpan sub project. RM after moving out of project or even better being able to build macOS libetpan with the Xcode project
rm -rf libetpan
git clone https://pep-security.lu/gitlab/misc/libetpan.git
git clone https://pep-security.lu/gitlab/misc/sqlite.git
git clone https://gitea.pep.foundation/pEp.foundation/pEpEngine
git clone https://gitea.pep.foundation/pep.foundation/pEpObjCAdapter.git
```
## Build
=======
### iOS Only: Copy System DB
The `system.db` from the pEpEngine repository must be copied in the bundle that uses the pEpObjCAdapter.a static lib. The ObjCAdapter copies it at runtime in the desired directory.


+ 2
- 2
Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols.xcodeproj/project.pbxproj View File

@ -220,7 +220,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "CUSTOM_BUILD_DIR=${PROJECT_DIR}/build\nLIB_STATIC_NAME=\"lib${PRODUCT_NAME}.a\"\nmkdir -p ${CUSTOM_BUILD_DIR}\necho \"{BUILD_DIR}: ${BUILD_DIR}\"\ncp -R \"${BUILD_DIR}/${CONFIGURATION}/usr/local/include\" ${CUSTOM_BUILD_DIR}\ncp \"${BUILD_DIR}/${CONFIGURATION}/${LIB_STATIC_NAME}\" ${CUSTOM_BUILD_DIR}\n";
shellScript = "CUSTOM_BUILD_DIR=${PROJECT_DIR}/build\nCUSTOM_INCLUDE_DIR=\"${CUSTOM_BUILD_DIR}/include/\"\nLIB_STATIC_NAME=\"lib${PRODUCT_NAME}.a\"\nmkdir -p ${CUSTOM_BUILD_DIR}\nmkdir -p ${CUSTOM_INCLUDE_DIR}\n\nPUBLIC_HEADERS_DIR=\"${PROJECT_DIR}/PEPObjCAdapterProtocols/PublicHeaders\"\n\ncp \"${PUBLIC_HEADERS_DIR}\"/*.h \"${CUSTOM_BUILD_DIR}/include/\"\ncp \"${BUILT_PRODUCTS_DIR}/${LIB_STATIC_NAME}\" ${CUSTOM_BUILD_DIR}\n";
};
4E23E71A26820DDB00B8F4C2 /* Copy artefacts to custom build dir */ = {
isa = PBXShellScriptBuildPhase;
@ -238,7 +238,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "CUSTOM_BUILD_DIR=${PROJECT_DIR}/build\nLIB_STATIC_NAME=\"lib${PRODUCT_NAME}.a\"\nmkdir -p ${CUSTOM_BUILD_DIR}\nREAL_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}\necho \"{REAL_BUILD_DIR}: ${REAL_BUILD_DIR}\"\ncp -R \"${REAL_BUILD_DIR}/usr/local/include\" ${CUSTOM_BUILD_DIR}\ncp \"${REAL_BUILD_DIR}/${LIB_STATIC_NAME}\" ${CUSTOM_BUILD_DIR}\n";
shellScript = "CUSTOM_BUILD_DIR=${PROJECT_DIR}/build\nCUSTOM_INCLUDE_DIR=\"${CUSTOM_BUILD_DIR}/include/\"\nLIB_STATIC_NAME=\"lib${PRODUCT_NAME}.a\"\nmkdir -p ${CUSTOM_BUILD_DIR}\nmkdir -p ${CUSTOM_INCLUDE_DIR}\n\nPUBLIC_HEADERS_DIR=\"${PROJECT_DIR}/PEPObjCAdapterProtocols/PublicHeaders\"\n\ncp \"${PUBLIC_HEADERS_DIR}\"/*.h \"${CUSTOM_BUILD_DIR}/include/\"\ncp \"${BUILT_PRODUCTS_DIR}/${LIB_STATIC_NAME}\" ${CUSTOM_BUILD_DIR}\n\n";
};
/* End PBXShellScriptBuildPhase section */


+ 10
- 6
pEpObjCAdapter.xcodeproj/project.pbxproj View File

@ -1229,7 +1229,7 @@
"$(PROJECT_DIR)/../pEpEngine/src",
"$(PROJECT_DIR)/Subprojects/PEPObjCAdapterTypes/build/include",
"$(PROJECT_DIR)/Subprojects/PEPObjCAdapterProtocols/build/include",
"$(PROJECT_DIR)/../PEPObjCTypeUtils/build/include",
"$(PROJECT_DIR)/Subprojects/PEPObjCTypeUtils/build/include",
);
IPHONEOS_DEPLOYMENT_TARGET = "${inherited}";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
@ -1258,7 +1258,7 @@
"$(PROJECT_DIR)/../pEpEngine/src",
"$(PROJECT_DIR)/Subprojects/PEPObjCAdapterTypes/build/include",
"$(PROJECT_DIR)/Subprojects/PEPObjCAdapterProtocols/build/include",
"$(PROJECT_DIR)/../PEPObjCTypeUtils/build/include",
"$(PROJECT_DIR)/Subprojects/PEPObjCTypeUtils/build/include",
);
IPHONEOS_DEPLOYMENT_TARGET = "${inherited}";
MTL_FAST_MATH = YES;
@ -1288,8 +1288,10 @@
HEADER_SEARCH_PATHS = (
"$(PROJECT_DIR)/../local/include",
"$(PROJECT_DIR)/../pep-toolbox/build/include",
"$(PROJECT_DIR)/../PEPObjCTypeUtils/build/include",
"$(PROJECT_DIR)/../pEpEngine/src",
"$(PROJECT_DIR)/Subprojects/PEPObjCAdapterTypes/build/include",
"$(PROJECT_DIR)/Subprojects/PEPObjCTypeUtils/build/include",
"$(PROJECT_DIR)/Subprojects/PEPObjCAdapterProtocols/build/include",
"$(PROJECT_DIR)/../pEpEngine/build-mac/build/include",
);
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@ -1327,8 +1329,10 @@
HEADER_SEARCH_PATHS = (
"$(PROJECT_DIR)/../local/include",
"$(PROJECT_DIR)/../pep-toolbox/build/include",
"$(PROJECT_DIR)/../PEPObjCTypeUtils/build/include",
"$(PROJECT_DIR)/../pEpEngine/src",
"$(PROJECT_DIR)/Subprojects/PEPObjCAdapterTypes/build/include",
"$(PROJECT_DIR)/Subprojects/PEPObjCTypeUtils/build/include",
"$(PROJECT_DIR)/Subprojects/PEPObjCAdapterProtocols/build/include",
"$(PROJECT_DIR)/../pEpEngine/build-mac/build/include",
);
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",


+ 14
- 0
pEpObjCAdapter.xcodeproj/xcshareddata/xcschemes/PEPObjCAdapter_iOS.xcscheme View File

@ -62,6 +62,20 @@
ReferencedContainer = "container:../pep-toolbox/pEpIOSToolbox.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43D3EF23260A0D7E00110971"
BuildableName = "pEpIOSToolboxForExtensions.framework"
BlueprintName = "pEpIOSToolboxForExtensions"
ReferencedContainer = "container:../pep-toolbox/pEpIOSToolbox.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"


Loading…
Cancel
Save