mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
rp-pppoe: add systemd support and fix error in the step of do_configure.
The error is as follows: error: unrecognized command line option '-V' conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory #include <ac_nonexistent.h>. Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
From a546942a784a177080d9722dda873bfd7416ad41 Mon Sep 17 00:00:00 2001
|
||||
From: Li xin <lixin.fnst@cn.fujitsu.com>
|
||||
Date: Fri, 10 Apr 2015 13:13:06 +0900
|
||||
Subject: [PATCH] configure.in: Error fix.
|
||||
|
||||
the error is: conftest.c:9:28: fatal error: ac_nonexistent.h:
|
||||
No such file or directory #include <ac_nonexistent.h>
|
||||
|
||||
Upstream-Status: pending
|
||||
|
||||
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
|
||||
---
|
||||
src/configure.in | 28 ----------------------------
|
||||
1 file changed, 28 deletions(-)
|
||||
|
||||
diff --git a/src/configure.in b/src/configure.in
|
||||
index c4f1a8c..74956cc 100644
|
||||
--- a/src/configure.in
|
||||
+++ b/src/configure.in
|
||||
@@ -183,34 +183,6 @@ if test "$GCC" = yes; then
|
||||
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -ansi"
|
||||
fi
|
||||
|
||||
-dnl Figure out packing order of structures
|
||||
-AC_CACHE_CHECK([packing order of bit fields],rpppoe_cv_pack_bitfields,[
|
||||
-AC_TRY_RUN([
|
||||
-union foo {
|
||||
- struct bar {
|
||||
- unsigned int ver:4;
|
||||
- unsigned int type:4;
|
||||
- } bb;
|
||||
- unsigned char baz;
|
||||
-};
|
||||
-
|
||||
-int
|
||||
-main(void)
|
||||
-{
|
||||
- union foo x;
|
||||
- x.bb.ver = 1;
|
||||
- x.bb.type = 2;
|
||||
- if (x.baz == 0x21) {
|
||||
- return 1;
|
||||
- } else if (x.baz == 0x12) {
|
||||
- return 0;
|
||||
- } else {
|
||||
- return 2;
|
||||
- }
|
||||
-}], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
|
||||
-$ECHO "no defaults for cross-compiling"; exit 1)
|
||||
-])
|
||||
-
|
||||
if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
|
||||
AC_MSG_RESULT(reversed)
|
||||
AC_DEFINE([PACK_BITFIELDS_REVERSED], [], [Reversed bitfields])
|
||||
--
|
||||
1.8.4.2
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=PPPOE Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
EnvironmentFile=-@SYSCONFDIR@/default/pppoe-server
|
||||
ExecStart=@SBINDIR@/pppoe-server
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -16,12 +16,21 @@ SRC_URI = "http://www.roaringpenguin.com/files/download/${BP}.tar.gz \
|
||||
file://use-ldflags.patch \
|
||||
file://configure.patch \
|
||||
file://pppoe-server.default \
|
||||
file://pppoe-server.init"
|
||||
file://pppoe-server.init \
|
||||
file://configure.in-Error-fix.patch \
|
||||
file://pppoe-server.service"
|
||||
|
||||
SRC_URI[md5sum] = "0e32760f498f9cde44081ee6aafc823b"
|
||||
SRC_URI[sha256sum] = "d916e9cfe1e62395f63a5361936fa855f6d0f0a37dc7227b394cdb725f553479"
|
||||
|
||||
inherit autotools-brokensep update-rc.d
|
||||
inherit autotools-brokensep update-rc.d systemd
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/pppoe-server.service ${D}${systemd_unitdir}/system
|
||||
sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service
|
||||
sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service
|
||||
}
|
||||
|
||||
do_install() {
|
||||
# Install init script and default settings
|
||||
@@ -33,6 +42,9 @@ do_install() {
|
||||
chmod 4755 ${D}${sbindir}/pppoe
|
||||
}
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}-server"
|
||||
SYSTEMD_SERVICE_${PN}-server = "pppoe-server.service"
|
||||
SYSTEMD_AUTO_ENABLE = "disable"
|
||||
# Insert server package before main package
|
||||
PACKAGES = "${PN}-dbg ${PN}-server ${PN}-relay ${PN}-sniff ${PN} ${PN}-doc"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user