Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb50027' into 'master'
Fix build for aarch64.

See merge request mer-core/ppp!5
  • Loading branch information
Matti Kosola committed Jun 5, 2020
2 parents 26fb154 + dc29751 commit 16e27b2
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 420 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "ppp"]
path = ppp
url = git://github.com/paulusmack/ppp.git
url = https://github.com/sailfishos-mirror/ppp.git
@@ -0,0 +1,121 @@
From 69711944745af0078da77e108d30f89fd7e06108 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Fri, 4 Apr 2014 12:01:33 +0200
Subject: [PATCH 05/27] build-sys: don't hardcode LIBDIR, but set it according
to the target platform

---
pppd/Makefile.linux | 3 ++-
pppd/pathnames.h | 2 +-
pppd/plugins/Makefile.linux | 2 +-
pppd/plugins/pppoatm/Makefile.linux | 2 +-
pppd/plugins/pppol2tp/Makefile.linux | 4 ++--
pppd/plugins/radius/Makefile.linux | 2 +-
pppd/plugins/rp-pppoe/Makefile.linux | 2 +-
7 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
index 63872eb..8ed56c1 100644
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -8,6 +8,7 @@ DESTDIR = $(INSTROOT)@DESTDIR@
BINDIR = $(DESTDIR)/sbin
MANDIR = $(DESTDIR)/share/man/man8
INCDIR = $(DESTDIR)/include
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)

TARGETS = pppd

@@ -32,7 +33,7 @@ endif

# CC = gcc
#
-COPTS = -O2 -pipe -Wall -g
+COPTS = -O2 -pipe -Wall -g -DLIBDIR=\""$(LIBDIR)"\"
LIBS = -lrt

# Uncomment the next line to include support for Microsoft's
# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
diff --git a/pppd/pathnames.h b/pppd/pathnames.h
index a33f046..a427cb8 100644
--- a/pppd/pathnames.h
+++ b/pppd/pathnames.h
@@ -57,7 +57,7 @@

#ifdef PLUGIN
#ifdef __STDC__
-#define _PATH_PLUGIN DESTDIR "/lib/pppd/" VERSION
+#define _PATH_PLUGIN LIBDIR "/pppd/" VERSION
#else /* __STDC__ */
#define _PATH_PLUGIN "/usr/lib/pppd"
#endif /* __STDC__ */
diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
index e09a369..b474a19 100644
--- a/pppd/plugins/Makefile.linux
+++ b/pppd/plugins/Makefile.linux
@@ -7,7 +7,7 @@ INSTALL = install
DESTDIR = $(INSTROOT)@DESTDIR@
BINDIR = $(DESTDIR)/sbin
MANDIR = $(DESTDIR)/share/man/man8
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+LIBDIR = $(DESTDIR)/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)

SUBDIRS := rp-pppoe pppoatm pppol2tp
# Uncomment the next line to include the radius authentication plugin
diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux
index 5a81447..769794b 100644
--- a/pppd/plugins/pppoatm/Makefile.linux
+++ b/pppd/plugins/pppoatm/Makefile.linux
@@ -7,7 +7,7 @@ INSTALL = install
#***********************************************************************

DESTDIR = $(INSTROOT)@DESTDIR@
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)

VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)

diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
index ea3538e..4339566 100644
--- a/pppd/plugins/pppol2tp/Makefile.linux
+++ b/pppd/plugins/pppol2tp/Makefile.linux
@@ -6,8 +6,8 @@ INSTALL = install

#***********************************************************************

-DESTDIR = @DESTDIR@
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+DESTDIR = $(INSTROOT)@DESTDIR@
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)

VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)

diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
index 45b3b8d..179d0b7 100644
--- a/pppd/plugins/radius/Makefile.linux
+++ b/pppd/plugins/radius/Makefile.linux
@@ -5,7 +5,7 @@

DESTDIR = $(INSTROOT)@DESTDIR@
MANDIR = $(DESTDIR)/share/man/man8
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)

VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)

diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
index 352991a..1305ed8 100644
--- a/pppd/plugins/rp-pppoe/Makefile.linux
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
@@ -16,7 +16,7 @@

DESTDIR = $(INSTROOT)@DESTDIR@
BINDIR = $(DESTDIR)/sbin
-LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(PPPDVERSION)

PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)

--
1.8.3.1

89 changes: 89 additions & 0 deletions rpm/ppp-build-sys-use-prefix-usr-instead-of-usr-local.patch
@@ -0,0 +1,89 @@
From 343728d5de6e44bd67923503e62eefaad50760a4 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Fri, 4 Apr 2014 18:47:01 +0200
Subject: [PATCH 08/27] build-sys: use prefix /usr instead of /usr/local

---
configure | 2 +-
pppd/Makefile.linux | 4 ++--
scripts/ppp-on-rsh | 2 +-
scripts/ppp-on-ssh | 4 ++--
scripts/secure-card | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index 6a55e0f..db54d77 100755
--- a/configure
+++ b/configure
@@ -2,7 +2,7 @@
# $Id: configure,v 1.38 2008/06/15 07:08:49 paulus Exp $

# Where to install stuff by default
-DESTDIR=/usr/local
+DESTDIR=/usr
SYSCONF=/etc

# if [ -d /NextApps ]; then
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
index 4f27100..95c2598 100644
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -99,8 +99,8 @@ endif

# EAP SRP-SHA1
ifdef USE_SRP
-CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
-LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
+CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/include/openssl
+LIBS += -lsrp -L/usr/lib -lcrypto
TARGETS += srp-entry
EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
MANPAGES += srp-entry.8
diff --git a/scripts/ppp-on-rsh b/scripts/ppp-on-rsh
index 30a50db..a80616a 100755
--- a/scripts/ppp-on-rsh
+++ b/scripts/ppp-on-rsh
@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost
# For this example, we assume that pppd on both local and remote
# machines reside in the same place, /usr/local/bin/pppd
#
-PPPD_LOC=/usr/local/bin/pppd
+PPPD_LOC=/usr/sbin/pppd

#
# The location of local options file (where rsh client is running).
diff --git a/scripts/ppp-on-ssh b/scripts/ppp-on-ssh
index 0e41aca..c27e80a 100755
--- a/scripts/ppp-on-ssh
+++ b/scripts/ppp-on-ssh
@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost
# For this example, we assume that pppd on both local and remote
# machines reside in the same place, /usr/local/bin/pppd
#
-PPPD_LOC=/usr/local/bin/pppd
+PPPD_LOC=/usr/sbin/pppd

#
# The location of local options file (where ssh client is running).
@@ -52,7 +52,7 @@ PPPD_REM_OPT=/etc/ppp/options-ssh-rem
#
# The location of ssh client on the local machine
#
-SSH_LOC=/usr/local/bin/ssh
+SSH_LOC=/usr/bin/ssh

export PPPD_LOC PPPD_LOC_OPT PPPD_REM_OPT PPPD_RHOST SSH_LOC

diff --git a/scripts/secure-card b/scripts/secure-card
index 0002365..ae3ae50 100755
--- a/scripts/secure-card
+++ b/scripts/secure-card
@@ -1,4 +1,4 @@
-#!/usr/local/bin/expect -f
+#!/usr/bin/expect -f
#
# This script was written by Jim Isaacson <jcisaac@crl.com>. It is
# designed to work as a script to use the SecureCARD(tm) device. This
--
1.8.3.1

0 comments on commit 16e27b2

Please sign in to comment.