Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Updated OpenSSL dependency and build scripts" #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions deps/relic/download_relic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FORMAT=tar.gz
LINK=https://github.com/relic-toolkit/relic
RELIC=${1:-relic-toolkit-${VERSION}}

# commit of as of 22/07/2022
# commit of as of 22/06/2022
# comment 'Update LABEL with recent changes'
COMMIT=40f24f017d461647ce6202c3ccaae3c22037369c

Expand All @@ -18,7 +18,12 @@ COMMIT=40f24f017d461647ce6202c3ccaae3c22037369c
echo "Clone github repo @ ${LINK}"
git clone ${LINK} ${RELIC}.git
cd ${RELIC}.git
git reset --hard ${COMMIT}
git checkout ${COMMIT}
git remote add tyler https://github.com/tylerliu/relic
git fetch tyler
git config user.email "[email protected]"
git config user.name "Your Name"
git cherry-pick 6c383a1e97971fb342dc406a1b5da82af3df8b40

if [[ ! -f ${RELIC}.${FORMAT} ]]; then
echo "Create archive of source (without git files)"
Expand Down
66 changes: 66 additions & 0 deletions deps/relic/run_install_clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash

ORACLE_RELEASE=/etc/oracle-release
SYSTEM_RELEASE=/etc/system-release
DEBIAN_VERSION=/etc/debian_version
SERVER_ONLY="no"

function console() {
echo "[+] $1"
}

function fail() {
echo "[!] $1"
exit 1
}

function platform() {
local __out=$1
if [[ -f "$LSB_RELEASE" ]] && grep -q 'DISTRIB_ID=Ubuntu' $LSB_RELEASE; then
FAMILY="debian"
eval $__out="ubuntu"
elif [[ -f "$DEBIAN_VERSION" ]]; then
FAMILY="debian"
eval $__out="debian"
else
eval $__out=`uname -s | tr '[:upper:]' '[:lower:]'`
fi
}

function distro() {
local __out=$2
if [[ $1 = "ubuntu" ]]; then
eval $__out=`awk -F= '/DISTRIB_CODENAME/ { print $2 }' $LSB_RELEASE`
elif [[ $1 = "darwin" ]]; then
eval $__out=`sw_vers -productVersion | awk -F '.' '{print $1 "." $2}'`
elif [[ $1 = "debian" ]]; then
eval $__out="`lsb_release -cs`"
else
eval $__out="unknown_version"
fi
}

DEPS_INSTALL_ROOT=$ZROOT/deps/root
RELIC_LIB=$DEPS_INSTALL_ZROOT/lib/librelic

function main() {
platform OS
distro $OS OS_VERSION

if [[ $1 = "get_platform" ]]; then
printf "OS:\t$OS\n"
printf "VER:\t$OS_VERSION\n"
return 0
fi

if [[ $OS = "darwin" ]]; then
console "Detected Mac OS X ($OS_VERSION)"
set -x
install_name_tool -id ${RELIC_LIB}.dylib ${RELIC_LIB}.dylib
install_name_tool -id ${RELIC_LIB}_ec.dylib ${RELIC_LIB}_ec.dylib
set +x
fi
}

main $1

3 changes: 1 addition & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ zml/zelement.o:

zparser.o: zparser.yy

bison -d -v zparser.yy
# $(BISON) -d -v zparser.yy
$(BISON) -d -v zparser.yy

cp *.hh $(OABE_INCLUDE_DIR)
$(CXX) $(CXXFLAGS) -c -o zparser.o zparser.tab.cc
Expand Down