diff options
author | Qing He <qing.he@intel.com> | 2010-07-29 18:34:42 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-06 18:28:26 +0100 |
commit | 680f8bf8ae8a850327d68fb24c7ee0c8631d2e45 (patch) | |
tree | 495c3a2cab566b04a4eadd53a4eb9f5af99afb64 /meta | |
parent | 28d52a2f7a2755dc12076d33eef9a917761979ef (diff) | |
download | poky-680f8bf8ae8a850327d68fb24c7ee0c8631d2e45.tar.gz |
attr: various improvements
changes:
- separate the build system to ea-acl.inc, it is also used by
upcoming acl (ea stands for extended attributes)
- the .so.* is moved to /lib, so it can be used by packages like
udev
- change absolute symbolic links to relative path, code inspired
by udev
- manual fix to .la
Signed-off-by: Qing He <qing.he@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/packages/attr/attr.inc | 43 | ||||
-rw-r--r-- | meta/packages/attr/attr_2.4.44.bb | 2 | ||||
-rw-r--r-- | meta/packages/attr/ea-acl.inc | 35 | ||||
-rw-r--r-- | meta/packages/attr/files/relative-libdir.patch | 23 |
4 files changed, 65 insertions, 38 deletions
diff --git a/meta/packages/attr/attr.inc b/meta/packages/attr/attr.inc index 69b7442f7e..da7924631e 100644 --- a/meta/packages/attr/attr.inc +++ b/meta/packages/attr/attr.inc | |||
@@ -9,43 +9,12 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \ | |||
9 | file://attr/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \ | 9 | file://attr/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \ |
10 | file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb" | 10 | file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb" |
11 | 11 | ||
12 | DEPENDS = "gettext" | 12 | SRC_URI = "http://nongnu.askapache.com/attr/${BP}.src.tar.gz" |
13 | 13 | ||
14 | SRC_URI = "http://nongnu.askapache.com/attr/${BPN}-${PV}.src.tar.gz" | 14 | require ea-acl.inc |
15 | 15 | ||
16 | inherit autotools | 16 | # libdir should point to .la |
17 | 17 | do_install_append() { | |
18 | # the package comes with a custom config.h.in, it cannot be | 18 | sed -i ${D}${libdir}/libattr.la -e \ |
19 | # overwritten by autoheader | 19 | s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\', |
20 | export AUTOHEADER = "true" | ||
21 | EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root" | ||
22 | |||
23 | # absolute path will be used in ln -s if PKG_LIB_DIR and | ||
24 | # PKG_DEVLIB_DIR are different | ||
25 | EXTRA_OEMAKE = "PKG_LIB_DIR=${libdir} PKG_DEVLIB_DIR=${libdir}" | ||
26 | |||
27 | do_install () { | ||
28 | oe_runmake install install-lib install-dev DIST_ROOT="${D}" | ||
29 | } | 20 | } |
30 | |||
31 | PACKAGES = "${PN} ${PN}-doc ${PN}-dbg ${PN}-locale lib${PN} lib${PN}-dev lib${PN}-doc" | ||
32 | |||
33 | FILES_${PN} = "${bindir}" | ||
34 | |||
35 | FILES_${PN}-dbg = "${bindir}/.debug" | ||
36 | |||
37 | FILES_${PN}-doc = "${docdir} \ | ||
38 | ${mandir}/man1 \ | ||
39 | ${mandir}/man5" | ||
40 | |||
41 | FILES_lib${PN} = "${libdir}/lib*.so.*" | ||
42 | |||
43 | FILES_lib${PN}-dev = "${includedir} \ | ||
44 | ${libdir}/lib*.so \ | ||
45 | ${libdir}/lib*.a \ | ||
46 | ${libdir}/lib*.la" | ||
47 | |||
48 | FILES_lib${PN}-doc = "${mandir}/man2 \ | ||
49 | ${mandir}/man3" | ||
50 | |||
51 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/packages/attr/attr_2.4.44.bb b/meta/packages/attr/attr_2.4.44.bb index f63d238350..0b21b33dcf 100644 --- a/meta/packages/attr/attr_2.4.44.bb +++ b/meta/packages/attr/attr_2.4.44.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | require attr.inc | 1 | require attr.inc |
2 | 2 | ||
3 | PR = "r0" | 3 | PR = "r1" |
4 | 4 | ||
5 | SRC_URI += "file://memory-leak-in-copy.patch \ | 5 | SRC_URI += "file://memory-leak-in-copy.patch \ |
6 | file://memory-leak2.patch \ | 6 | file://memory-leak2.patch \ |
diff --git a/meta/packages/attr/ea-acl.inc b/meta/packages/attr/ea-acl.inc new file mode 100644 index 0000000000..77fa2b4fd6 --- /dev/null +++ b/meta/packages/attr/ea-acl.inc | |||
@@ -0,0 +1,35 @@ | |||
1 | # this build system is mostly shared by attr and acl | ||
2 | |||
3 | DEPENDS =+ "gettext" | ||
4 | |||
5 | SRC_URI += "file://relative-libdir.patch;striplevel=0" | ||
6 | |||
7 | inherit autotools | ||
8 | |||
9 | # the package comes with a custom config.h.in, it cannot be | ||
10 | # overwritten by autoheader | ||
11 | export AUTOHEADER = "true" | ||
12 | EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root" | ||
13 | |||
14 | EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}" | ||
15 | |||
16 | do_install () { | ||
17 | oe_runmake install install-lib install-dev DIST_ROOT="${D}" | ||
18 | } | ||
19 | |||
20 | PACKAGES =+ "lib${PN} lib${PN}-dev lib${PN}-doc" | ||
21 | |||
22 | FILES_lib${PN} = "${base_libdir}/lib*.so.*" | ||
23 | |||
24 | FILES_lib${PN}-dev = "${includedir} \ | ||
25 | ${libdir}/lib*.so \ | ||
26 | ${libdir}/lib*.a \ | ||
27 | ${libdir}/lib*.la \ | ||
28 | ${base_libdir}/lib*.so \ | ||
29 | ${base_libdir}/lib*.a \ | ||
30 | ${base_libdir}/lib*.la" | ||
31 | |||
32 | FILES_lib${PN}-doc = "${mandir}/man2 \ | ||
33 | ${mandir}/man3" | ||
34 | |||
35 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/packages/attr/files/relative-libdir.patch b/meta/packages/attr/files/relative-libdir.patch new file mode 100644 index 0000000000..f989dd0ccc --- /dev/null +++ b/meta/packages/attr/files/relative-libdir.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | use relative path in symbolic links, or it fails in staging | ||
2 | sed expression from udev | ||
3 | |||
4 | 7/29/2010 - created by Qing He <qing.he@intel.com> | ||
5 | |||
6 | diff -u include.orig/buildmacros include/buildmacros | ||
7 | --- include.orig/buildmacros 2010-07-29 17:39:48.000000000 +0800 | ||
8 | +++ include/buildmacros 2010-07-29 18:20:34.000000000 +0800 | ||
9 | @@ -88,9 +88,11 @@ | ||
10 | ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ | ||
11 | ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \ | ||
12 | if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \ | ||
13 | - ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \ | ||
14 | - ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \ | ||
15 | - ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \ | ||
16 | + rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ | ||
17 | + ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \ | ||
18 | + ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \ | ||
19 | + rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ | ||
20 | + ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \ | ||
21 | fi | ||
22 | else | ||
23 | INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC) | ||