]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rpm: fix error when 'lua' is enabled ChenQi/rpm-lua
authorChen Qi <Qi.Chen@windriver.com>
Mon, 21 Mar 2016 07:06:15 +0000 (15:06 +0800)
committerChen Qi <Qi.Chen@windriver.com>
Mon, 21 Mar 2016 07:14:54 +0000 (15:14 +0800)
Fix the following compilation error when 'lua' is enabled in PACKAGECONFIG.

  | gcc: error: lib21.c: No such file or directory
  | gcc: fatal error: no input files

The patch uses the latest codes of rpm5 repository.

Modify FILES for dev package to avoid installed-not-shipped error.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
meta/recipes-devtools/rpm/rpm/0001-fix-lua-test-build-failure.patch [new file with mode: 0644]
meta/recipes-devtools/rpm/rpm_5.4.16.bb

diff --git a/meta/recipes-devtools/rpm/rpm/0001-fix-lua-test-build-failure.patch b/meta/recipes-devtools/rpm/rpm/0001-fix-lua-test-build-failure.patch
new file mode 100644 (file)
index 0000000..e4677a7
--- /dev/null
@@ -0,0 +1,76 @@
+Upstream-Status: Backport
+
+Subject: fix lua test build failure
+
+Reference the latest rpm5 codes to fix errors like below.
+
+  gcc: error: lib21.c: No such file or directory
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ lua/tests/libs/Makefile.am | 35 ++++++++++++++++++++---------------
+ 1 file changed, 20 insertions(+), 15 deletions(-)
+
+diff --git a/lua/tests/libs/Makefile.am b/lua/tests/libs/Makefile.am
+index 19d1a0b..8a8f980 100644
+--- a/lua/tests/libs/Makefile.am
++++ b/lua/tests/libs/Makefile.am
+@@ -2,11 +2,11 @@
+ AUTOMAKE_OPTIONS = 1.4 foreign
+ EXTRA_DIST = \
+-      lib11.c \
+-      lib1.c \
+-      lib21.c \
+-      lib2.c \
+-      P1
++      $(srcdir)/lib11.c \
++      $(srcdir)/lib1.c \
++      $(srcdir)/lib21.c \
++      $(srcdir)/lib2.c \
++      $(srcdir)/P1
+ #
+ # change this variable to point to the directory with Lua headers
+@@ -21,23 +21,28 @@ CC = gcc
+ # compilation should generate Dynamic-Link Libraries
+ CFLAGS = -Wall -std=gnu99 -O2 $(AM_CPPFLAGS) -fpic -shared
++P1:
++      @-$(mkdir_p) $@
++
+ # libraries used by the tests
+-all: lib1.so lib11.so lib2.so lib21.so lib2-v2.so
++all: P1 lib1.so lib11.so lib2.so lib21.so lib2-v2.so
+ clean:
+-      rm -f lib1.so lib11.so lib2.so lib21.so lib2-v2.so
++      rm -f *.so
++
++distclean: clean
+-lib1.so: lib1.c
+-      $(CC) $(CFLAGS) -o lib1.so lib1.c
++lib1.so: $(srcdir)/lib1.c
++      $(CC) $(CFLAGS) -o lib1.so $<
+-lib11.so: lib11.c
+-      $(CC) $(CFLAGS) -o lib11.so lib11.c
++lib11.so: $(srcdir)/lib11.c
++      $(CC) $(CFLAGS) -o lib11.so $<
+-lib2.so: lib2.c
+-      $(CC) $(CFLAGS) -o lib2.so lib2.c
++lib2.so: $(srcdir)/lib2.c
++      $(CC) $(CFLAGS) -o lib2.so $<
+-lib21.so: lib21.c
+-      $(CC) $(CFLAGS) -o lib21.so lib21.c
++lib21.so: $(srcdir)/lib21.c
++      $(CC) $(CFLAGS) -o lib21.so $<
+ lib2-v2.so: lib2.so
+       mv lib2.so ./lib2-v2.so
+-- 
+1.9.1
+
index 5fea53f543ca89b3a6fc92af1650330e188ac1fc..f3a85877c0c80b5a7fad9db99534c10a91f198a3 100644 (file)
@@ -113,6 +113,7 @@ SRC_URI += " \
           file://rpm-python-tagname.patch \
           file://rpm-python-AddErase.patch \
           file://rpm-rpmpgp-popt.patch \
+          file://0001-fix-lua-test-build-failure.patch \
 "
 
 # OE specific changes
@@ -494,6 +495,7 @@ FILES_${PN}-dev = "${includedir}/rpm \
                ${libdir}/rpm/lib/liblua.la \
                ${libdir}/pkgconfig/rpm.pc \
                ${libdir}/rpm/rpmdb_loadcvt \
+               ${libdir}/rpm/include \
                "
 
 FILES_${PN}-staticdev = " \