Procházet zdrojové kódy

build on openSuse: use gcc-5 (beware: with system-symlinks!), pepjsonserver-issues

master
Arian Sanusi Arian Sanusi (p≡p Foundation) před 2 roky
rodič
revize
4198e24877
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 49B08FCFF6BC3B2
4 změnil soubory, kde provedl 43 přidání a 5 odebrání
  1. +4
    -2
      Makefile
  2. +24
    -3
      dependencies_opensuse_42.3.sh
  3. +4
    -0
      local.conf
  4. +11
    -0
      pep-json-server-adapter_cstring.patch

+ 4
- 2
Makefile Zobrazit soubor

@@ -10,8 +10,9 @@ ENIG_ID_WIN=windows-x86-$(shell date --rfc-3339=date)
all: build/bin/pep-json-server build/enigmail-$(ENIG_ID).xpi build/share/pEp/system.db
foreign: build/enigmail-$(ENIG_ID_DARWIN).xpi build/enigmail-$(ENIG_ID_WIN).xpi

build:
mkdir -p build
build build/lib:
mkdir -p build/lib
ln -sf lib build/lib64

.PHONY: clean distclean
clean:
@@ -63,6 +64,7 @@ build/bin/pep-json-server: engine-install
hg clone -r 302 https://cacert.pep.foundation/dev/repos/pEpJSONServerAdapter pepjsonserveradapter || ( cd pepjsonserveradapter ; hg revert --all ; hg pull ; hg update -r 302)
sed -i "s/\techo '/\techo -e '/" pepjsonserveradapter/server/Makefile
cd pepjsonserveradapter/server ; patch -N < ~/common/pepjsonserveradapter.Makefile.conf.patch || true
cd pepjsonserveradapter/server ; patch -N < ~/common/pep-json-server-adapter_cstring.patch
$(MAKE) -C pepjsonserveradapter/server prefix-config.cc
sed -i 's/^-e //g' pepjsonserveradapter/server/prefix-config.cc
make -C pepjsonserveradapter/server all


+ 24
- 3
dependencies_opensuse_42.3.sh Zobrazit soubor

@@ -1,14 +1,35 @@
#!/bin/sh
set -e

packages="git mercurial ca-certificates-cacert python-lxml sqlite3 patchelf zip gcc7 gcc7-c++"
packages="git mercurial ca-certificates-cacert python-lxml sqlite3 patchelf zip gcc5 gcc5-c++ gpg2"
devel_packages="sqlite3-devel libopenssl-devel libgpgme-devel boost-devel libevent-devel"

zypper install $packages $devel_packages
zypper addrepo -f https://download.opensuse.org/repositories/security:/privacy/openSUSE_Leap_42.3/ security_privacy || zypper_retval=$?
if [[ $zypper_retval -eq 4 ]] ; then
echo ... ignoring
else
exit $zypper_retval
fi
zypper install $packages $devel_packages


# install vanilla opensuse distribution. Idempotent - can be run "over"
# an existing installation. nice :)
cd `dirname $0`
zypper -R `pwd`/vanilla \
--plus-repo http://download.opensuse.org/distribution/leap/42.3/repo/oss/ \
install patterns-openSUSE-64bit patterns-openSUSE-base zypper
--plus-repo https://download.opensuse.org/repositories/security:/privacy/openSUSE_Leap_42.3/ \
install patterns-openSUSE-64bit patterns-openSUSE-base zypper gpg2
cd -

read -p "will now symlink gcc-5 and related to be your default compiler suite, ctrl-c to abort!" ignore

cd /usr/bin
ln -sf gcc-5 cc
ln -sf cpp-5 cpp
ln -sf g++-5 g++
ln -sf gcc-5 gcc
ln -sf gcc-ar-5 gcc-ar
ln -sf gcc-nm-5 gcc-nm
ln -sf gcc-ranlib-5 gcc-ranlib
cd -

+ 4
- 0
local.conf Zobrazit soubor

@@ -6,3 +6,7 @@ ETPAN_LIB=-L$(PREFIX)/lib
ETPAN_INC=-I$(PREFIX)/include
ASN1C=$(PREFIX)/bin/asn1c
ASN1C_INC=-I$(PREFIX)/share

CFLAGS=-fPIC -fstrict-aliasing
CXXFLAGS=-I../src -I../asn.1 -I$(ETPAN_INC)


+ 11
- 0
pep-json-server-adapter_cstring.patch Zobrazit soubor

@@ -0,0 +1,11 @@
--- a/server/pep-types.cc Wed Nov 01 13:56:00 2017 +0100
+++ b/server/pep-types.cc Fri Jan 12 13:38:42 2018 +0100
@@ -3,7 +3,7 @@
#include <iostream> // Just to print debug stuff to std::cerr
#include "base64.hh"
-
+#include <cstring>
namespace
{
// fetch a member from the given object, if set. (return a sensible NULL/default value if not)

Načítá se…
Zrušit
Uložit