diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-01-14 14:26:16 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-01-14 14:31:14 -0800 |
commit | 1ed152e32ec523c83bb05a4ae828c92fbb894acb (patch) | |
tree | 4266c8097489b082be47630e1148bb84dfc804b5 | |
parent | 6fc561ce106dfb00631043f274345443d124e6ae (diff) | |
download | meta-openembedded-1ed152e32ec523c83bb05a4ae828c92fbb894acb.tar.gz |
lockdev: Switch to use archive tarballs for SRC_URI
anonscm.debian.org has been replaced with https://salsa.debian.org
however, lockdev has been dropped from debian packages, so its not
maintained at salsa.debian.org, therefore resort to archives and add few
more fixes to get it building from archive.
bump PE since version still remains 1.0.3 but we drop +git${...} from PV
Signed-off-by: Khem Raj <raj.khem@gmail.com>
5 files changed, 82 insertions, 54 deletions
diff --git a/meta-oe/recipes-support/lockdev/lockdev/0001-include-sys-sysmacros.h-for-major-minor-definitions.patch b/meta-oe/recipes-support/lockdev/lockdev/0001-include-sys-sysmacros.h-for-major-minor-definitions.patch deleted file mode 100644 index 12f5be981..000000000 --- a/meta-oe/recipes-support/lockdev/lockdev/0001-include-sys-sysmacros.h-for-major-minor-definitions.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 2f39dc3d6f920c0826aa74367da1a0a7cc49b0fe Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 11 Aug 2018 15:18:04 -0700 | ||
4 | Subject: [PATCH] include sys/sysmacros.h for major/minor definitions | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | inclusion of <sys/sysmacros.h> by <sys/types.h> is deprecated. | ||
10 | This means that in a future release, the macros “major”, “minor”, and | ||
11 | “makedev” will only be available from <sys/sysmacros.h>. | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | src/lockdev.c | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/src/lockdev.c b/src/lockdev.c | ||
20 | index 9a0fca5..3581938 100644 | ||
21 | --- a/src/lockdev.c | ||
22 | +++ b/src/lockdev.c | ||
23 | @@ -117,6 +117,7 @@ | ||
24 | #include <sys/stat.h> | ||
25 | #include <sys/file.h> | ||
26 | #include <sys/types.h> | ||
27 | +#include <sys/sysmacros.h> | ||
28 | #include <sys/wait.h> | ||
29 | #include "lockdev.h" | ||
30 | #include "ttylock.h" | ||
diff --git a/meta-oe/recipes-support/lockdev/lockdev/build.patch b/meta-oe/recipes-support/lockdev/lockdev/build.patch new file mode 100644 index 000000000..6ec91d231 --- /dev/null +++ b/meta-oe/recipes-support/lockdev/lockdev/build.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | commit 0dd47123655c52d68185f06b9da8fb0e1b925400 | ||
2 | Author: Ludwig Nussel <ludwig.nussel@suse.de> | ||
3 | Date: Tue Feb 9 14:56:23 2010 +0100 | ||
4 | |||
5 | RedHat patch 2 | ||
6 | |||
7 | - change library file name | ||
8 | - install devel symlink | ||
9 | |||
10 | --- a/Makefile | ||
11 | +++ b/Makefile | ||
12 | @@ -11,7 +11,7 @@ VER = $(shell expr `pwd` : '.*-\([0-9.]* | ||
13 | MVER = ${shell expr `pwd` : '.*-\([0-9]*\).[0-9]*'} | ||
14 | |||
15 | static = ${libname}.a | ||
16 | -shared = ${libname}.${VER}.so | ||
17 | +shared = ${libname}.so.${VER} | ||
18 | soname = ${libname}.so.${MVER} | ||
19 | |||
20 | # overwritten by caller (e.g.: debian/rules) | ||
21 | @@ -72,6 +72,7 @@ install_doc: docs/lockdev.3 | ||
22 | install_run: ${shared} | ||
23 | install -m755 -d ${libdir} | ||
24 | install -m644 ${shared} ${libdir} | ||
25 | + ln -s ${shared} ${libdir}/liblockdev.so | ||
26 | |||
27 | .PHONY: clean distclean perl-clean mostyclean | ||
28 | perl-clean: clean | ||
diff --git a/meta-oe/recipes-support/lockdev/lockdev/cross_compile.patch b/meta-oe/recipes-support/lockdev/lockdev/cross_compile.patch new file mode 100644 index 000000000..aa8f6a4d8 --- /dev/null +++ b/meta-oe/recipes-support/lockdev/lockdev/cross_compile.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | --- a/Makefile | ||
2 | +++ b/Makefile | ||
3 | @@ -15,17 +15,17 @@ shared = ${libname}.${VER}.so | ||
4 | soname = ${libname}.so.${MVER} | ||
5 | |||
6 | # overwritten by caller (e.g.: debian/rules) | ||
7 | -basedir = /usr/local | ||
8 | +basedir ?= /usr/local | ||
9 | srcdir=. | ||
10 | |||
11 | libdir = ${basedir}/lib | ||
12 | incdir = ${basedir}/include | ||
13 | mandir = ${basedir}/share/man | ||
14 | |||
15 | -CC = gcc | ||
16 | -LCFLAGS = -g -O2 -fPIC -Wall -pipe -D_REENTRANT | ||
17 | -CFLAGS = -g | ||
18 | -LDLIBS = -llockdev | ||
19 | +CC ?= gcc | ||
20 | +LCFLAGS ?= -g -O2 -fPIC -Wall -pipe -D_REENTRANT | ||
21 | +CFLAGS ?= -g | ||
22 | +LDLIBS ?= -llockdev | ||
23 | |||
24 | .PHONY: shared static perl-lib | ||
25 | ALL: shared static perl-lib | ||
diff --git a/meta-oe/recipes-support/lockdev/lockdev_1.0.3.bb b/meta-oe/recipes-support/lockdev/lockdev_1.0.3.bb new file mode 100644 index 000000000..5b862bd1f --- /dev/null +++ b/meta-oe/recipes-support/lockdev/lockdev_1.0.3.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Locking devices library" | ||
2 | SECTION = "libs" | ||
3 | LICENSE = "LGPLv2.1" | ||
4 | LIC_FILES_CHKSUM="file://LICENSE;md5=d8045f3b8f929c1cb29a1e3fd737b499" | ||
5 | |||
6 | PE = "1" | ||
7 | SRC_URI = "http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/l/lockdev/lockdev_${PV}.orig.tar.gz \ | ||
8 | http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/l/lockdev/lockdev_${PV}-1.6.diff.gz;name=debianpatch \ | ||
9 | file://cross_compile.patch \ | ||
10 | file://build.patch \ | ||
11 | " | ||
12 | SRC_URI[md5sum] = "64b9c1b87b125fc348e892e24625524a" | ||
13 | SRC_URI[sha256sum] = "ccae635d7ac3fdd50897eceb250872b3d9a191d298f213e7f0c836910d869f82" | ||
14 | SRC_URI[debianpatch.md5sum] = "5ef6267c42fca9145e0af006ccb6aff7" | ||
15 | SRC_URI[debianpatch.sha256sum] = "a5405c6ee5e97e45eeb1c81330a7e9f444a58bda5e6771fa30007516c115007e" | ||
16 | |||
17 | inherit lib_package perlnative | ||
18 | export basedir="${D}${prefix}" | ||
19 | |||
20 | CFLAGS += " -D__GNU_LIBRARY__" | ||
21 | |||
22 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
23 | |||
24 | do_compile() { | ||
25 | oe_runmake basedir=${D}${prefix} LD="${CC}" LD="${CC}" shared static | ||
26 | } | ||
27 | do_install() { | ||
28 | oe_runmake DESTDIR=${D} basedir=${D}${prefix} install | ||
29 | } | ||
diff --git a/meta-oe/recipes-support/lockdev/lockdev_git.bb b/meta-oe/recipes-support/lockdev/lockdev_git.bb deleted file mode 100644 index 5ad7f0c50..000000000 --- a/meta-oe/recipes-support/lockdev/lockdev_git.bb +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | SUMMARY = "Locking devices library" | ||
2 | SECTION = "libs" | ||
3 | LICENSE = "LGPLv2.1" | ||
4 | LIC_FILES_CHKSUM="file://COPYING;md5=4fbd65380cdd255951079008b364516c" | ||
5 | |||
6 | PV = "1.0.3+git${SRCPV}" | ||
7 | |||
8 | SRCREV = "16b899645d32012cc94cc9232f64d4ddaaf0b795" | ||
9 | SRC_URI = "git://anonscm.debian.org/lockdev/lockdev.git \ | ||
10 | file://0001-include-sys-sysmacros.h-for-major-minor-definitions.patch \ | ||
11 | " | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | inherit lib_package autotools-brokensep | ||
16 | |||
17 | do_configure_prepend () { | ||
18 | ./scripts/git-version > VERSION | ||
19 | |||
20 | # Make automake happy | ||
21 | touch ChangeLog | ||
22 | } | ||
23 | |||
24 | CFLAGS_append_libc-musl = " -D__GNU_LIBRARY__" | ||