Patchwork [CONSOLIDATED,PULL,07/15] libacpi: Fix libdir for x32

login
register
mail settings
Submitter Saul Wold
Date Dec. 9, 2011, 6:23 p.m.
Message ID <76459ad144d812f2b9b7509fc0ce613b1adf71d5.1323454935.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/16581/
State New
Headers show

Comments

Saul Wold - Dec. 9, 2011, 6:23 p.m.
From: Nitin A Kamble <nitin.a.kamble@intel.com>

libacpi doesn't use base_libdir for install.  This patch adds
base_libdir support so that x32 libraries are installed properly.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
 .../libacpi/files/libacpi_fix_for_x32.patch        |   47 ++++++++++++++++++++
 meta/recipes-bsp/libacpi/libacpi_0.2.bb            |    5 +-
 2 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch

Patch

diff --git a/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch b/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
new file mode 100644
index 0000000..5f2d034
--- /dev/null
+++ b/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
@@ -0,0 +1,47 @@ 
+UpstreamStatus: Pending
+
+Fix libacpi for x32
+    
+    libacpi doesn't use base_libdir for install.  This patch adds
+    base_libdir support so that x32 libraries are installed properly.
+
+Patch Received from:  H.J. Lu <hjl.tools@gmail.com>
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
+
+Index: libacpi-0.2/Makefile
+===================================================================
+--- libacpi-0.2.orig/Makefile
++++ libacpi-0.2/Makefile
+@@ -8,6 +8,10 @@ SRC_test = test-libacpi.c libacpi.c list
+ OBJ = ${SRC:.c=.o}
+ OBJ_test = ${SRC_test:.c=.o}
+ 
++ifndef base_libdir
++base_libdir=/lib
++endif
++
+ all: options libacpi.a libacpi.so test-libacpi
+ 
+ options:
+@@ -42,13 +46,13 @@ install: all
+ 	@mkdir -p ${DESTDIR}${PREFIX}/include
+ 	@cp -f libacpi.h ${DESTDIR}${PREFIX}/include
+ 	@chmod 644 ${DESTDIR}${PREFIX}/include/libacpi.h
+-	@echo installing library to ${DESTDIR}${PREFIX}/lib
+-	@mkdir -p ${DESTDIR}${PREFIX}/lib
+-	@cp -f libacpi.a ${DESTDIR}${PREFIX}/lib
+-	@chmod 644 ${DESTDIR}${PREFIX}/lib/libacpi.a
+-	@cp -f ${SONAME} ${DESTDIR}${PREFIX}/lib/
+-	@chmod 644 ${DESTDIR}${PREFIX}/lib/${SONAME}
+-	@ln -s ${SONAME} ${DESTDIR}${PREFIX}/lib/libacpi.so
++	@echo installing library to ${DESTDIR}${PREFIX}${base_libdir}
++	@mkdir -p ${DESTDIR}${PREFIX}${base_libdir}
++	@cp -f libacpi.a ${DESTDIR}${PREFIX}${base_libdir}
++	@chmod 644 ${DESTDIR}${PREFIX}${base_libdir}/libacpi.a
++	@cp -f ${SONAME} ${DESTDIR}${PREFIX}${base_libdir}/
++	@chmod 644 ${DESTDIR}${PREFIX}${base_libdir}/${SONAME}
++	@ln -s ${SONAME} ${DESTDIR}${PREFIX}${base_libdir}/libacpi.so
+ 	@echo installing test-libacpi to ${DESTDIR}${PREFIX}/bin
+ 	@mkdir -p ${DESTDIR}${PREFIX}/bin
+ 	@cp -f test-libacpi ${DESTDIR}${PREFIX}/bin
diff --git a/meta/recipes-bsp/libacpi/libacpi_0.2.bb b/meta/recipes-bsp/libacpi/libacpi_0.2.bb
index 7c5095d..82fe8f8 100644
--- a/meta/recipes-bsp/libacpi/libacpi_0.2.bb
+++ b/meta/recipes-bsp/libacpi/libacpi_0.2.bb
@@ -5,10 +5,11 @@  SECTION = "base"
 HOMEPAGE = "http://www.ngolde.de/libacpi.html"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=fec17f82f16630adf2dfb7d2a46f21c5"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "http://www.ngolde.de/download/libacpi-${PV}.tar.gz \
-	   file://makefile-fix.patch "
+	   file://makefile-fix.patch \
+	   file://libacpi_fix_for_x32.patch "
 
 SRC_URI[md5sum] = "05b53dd7bead66dda35fec502b91066c"
 SRC_URI[sha256sum] = "13086e31d428b9c125954d48ac497b754bbbce2ef34ea29ecd903e82e25bad29"