vblade: Upgrade to version 24

Switch to github for src_uri
Add a patch to fix build with -fno-common

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2020-08-12 08:53:51 -07:00
parent 108e6063c8
commit 7c50553449
2 changed files with 90 additions and 4 deletions
@@ -0,0 +1,85 @@
From af17efc862b9acfd63ce2ecb21f75ed890a93a5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20K=C3=B6lbl?= <koelblandreas@freenet.de>
Date: Thu, 9 Jul 2020 14:29:18 +0200
Subject: [PATCH] Fix linkage of global identifiers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Align the code to the standard and modern compilers.
Upstream-Status: Submitted [https://github.com/OpenAoE/vblade/pull/15]
Signed-off-by: Andreas Kölbl <koelblandreas@freenet.de>
---
dat.c | 12 ++++++++++++
dat.h | 19 ++++++++++---------
makefile | 7 +++++--
3 files changed, 27 insertions(+), 11 deletions(-)
create mode 100644 dat.c
--- /dev/null
+++ b/dat.c
@@ -0,0 +1,12 @@
+/* dat.c: Global memory for vblade AoE target */
+#include "dat.h"
+
+int shelf, slot;
+ulong aoetag;
+uchar mac[6];
+int bfd; // block file descriptor
+int sfd; // socket file descriptor
+vlong size; // size of vblade
+vlong offset;
+char *progname;
+char serial[Nserial+1];
--- a/dat.h
+++ b/dat.h
@@ -1,4 +1,5 @@
/* dat.h: include file for vblade AoE target */
+#include <sys/types.h>
#define nil ((void *)0)
/*
@@ -163,12 +164,12 @@ enum {
Nserial= 20,
};
-int shelf, slot;
-ulong aoetag;
-uchar mac[6];
-int bfd; // block file descriptor
-int sfd; // socket file descriptor
-vlong size; // size of vblade
-vlong offset;
-char *progname;
-char serial[Nserial+1];
+extern int shelf, slot;
+extern ulong aoetag;
+extern uchar mac[6];
+extern int bfd; // block file descriptor
+extern int sfd; // socket file descriptor
+extern vlong size; // size of vblade
+extern vlong offset;
+extern char *progname;
+extern char serial[Nserial+1];
--- a/makefile
+++ b/makefile
@@ -8,7 +8,7 @@ sbindir = ${prefix}/sbin
sharedir = ${prefix}/share
mandir = ${sharedir}/man
-O=aoe.o bpf.o ${PLATFORM}.o ata.o
+O=aoe.o bpf.o ${PLATFORM}.o ata.o dat.o
vblade: $O
${CC} ${LDFLAGS} -o vblade $O
@@ -25,6 +25,9 @@ ata.o : ata.c config.h dat.h fns.h makef
bpf.o : bpf.c
${CC} ${CFLAGS} -c $<
+dat.o : dat.c
+ ${CC} ${CFLAGS} -c $<
+
config.h : config/config.h.in makefile
@if ${CC} ${CFLAGS} config/u64.c > /dev/null 2>&1; then \
sh -xc "cp config/config.h.in config.h"; \
@@ -6,19 +6,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/aoetools/files/vblade/"
SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${BP}.tar.gz \
SRCREV = "a7f48bda5bf1646f6450601049bf4b74053adbb3"
SRC_URI = "git://github.com/OpenAoE/vblade \
file://cross.patch \
file://makefile-add-ldflags.patch \
file://gcc-10.patch \
file://${BPN}.conf \
file://${BPN}.init \
file://${BPN}.service \
file://volatiles.99_vblade \
"
SRC_URI[md5sum] = "510d98ba0f231284a5fbe2da11cb2d6e"
SRC_URI[sha256sum] = "a990378f273f10eb431e42954a871aed52714035bbab28c54cef600c458356bb"
S = "${WORKDIR}/git"
UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/aoetools/files/vblade/"
UPSTREAM_CHECK_URI = "https://github.com/OpenAoE/vblade/archive/"
inherit autotools-brokensep update-rc.d systemd