Patchwork [2/5] acl: add patch to fix static installation

login
register
mail settings
Submitter Thomas Petazzoni
Date Aug. 20, 2013, 11:03 a.m.
Message ID <1376996584-4462-3-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/268485/
State Accepted
Headers show

Comments

Thomas Petazzoni - Aug. 20, 2013, 11:03 a.m.
Just like 'attr', 'acl' doesn't use automake to control the
build/installation of its components, and the static-only installation
process was not installing libacl.a. We add a patch that fixes this.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../acl/acl-01-support-static-installation.patch   | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/acl/acl-01-support-static-installation.patch
Gustavo Zacarias - Aug. 23, 2013, 1:28 p.m.
On 08/20/2013 08:03 AM, Thomas Petazzoni wrote:

> Just like 'attr', 'acl' doesn't use automake to control the
> build/installation of its components, and the static-only installation
> process was not installing libacl.a. We add a patch that fixes this.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Patch

diff --git a/package/acl/acl-01-support-static-installation.patch b/package/acl/acl-01-support-static-installation.patch
new file mode 100644
index 0000000..4cb473f
--- /dev/null
+++ b/package/acl/acl-01-support-static-installation.patch
@@ -0,0 +1,29 @@ 
+Support installation of .a file when doing static linking
+
+When doing static linking (i.e ENABLE_SHARED != yes), the acl build
+logic wasn't installing any library at all, not even the .a file which
+is needed for static linking. This patch fixes that.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/include/buildmacros
+===================================================================
+--- a/include/buildmacros
++++ b/include/buildmacros
+@@ -97,7 +97,15 @@
+ 
+ INSTALL_LTLIB_STATIC = \
+ 	cd $(TOPDIR)/$(LIBNAME)/.libs; \
+-	../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR);
++	../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \
++	../$(INSTALL) -m 644 -T old_lib $(LIBNAME).la $(PKG_DEVLIB_DIR); \
++	../$(INSTALL) -m 644 $(LIBNAME).la $(PKG_DEVLIB_DIR)/$(LIBNAME).la ; \
++	../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
++	../$(INSTALL) -T so_base $(LIBNAME).la $(PKG_LIB_DIR); \
++	if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
++	../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
++	../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
++	fi
+ 
+ INSTALL_MAN = \
+ 	@for d in $(MAN_PAGES); do \