summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/attr/ea-acl.inc
blob: 8750c3bc646bcda207e5bae4f479a9c2e2fd43ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# this build system is mostly shared by attr and acl

SRC_URI += "file://relative-libdir.patch;striplevel=0 \
           "

inherit autotools-brokensep gettext

# the package comes with a custom config.h.in, it cannot be
# overwritten by autoheader
EXTRA_AUTORECONF += "--exclude=autoheader"
EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
EXTRA_OECONF_append_class-native = " --enable-gettext=no"

EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"

do_install () {
	oe_runmake install install-lib install-dev DIST_ROOT="${D}"
}

do_install_append_class-native () {
	if test "${libdir}" = "${base_libdir}" ; then
		return
	fi
	librelpath=${@os.path.relpath(d.getVar('libdir',True), d.getVar('base_libdir'))}
	baselibrelpath=${@os.path.relpath(d.getVar('base_libdir',True), d.getVar('libdir'))}

	# Remove bad symlinks & create the correct symlinks
	if test -L ${D}${libdir}/lib${BPN}.so ; then
		rm -rf ${D}${libdir}/lib${BPN}.so
		ln -sf $baselibrelpath/lib${BPN}.so ${D}${libdir}/lib${BPN}.so
	fi
	if test -L ${D}${base_libdir}/lib${BPN}.a ; then
		rm -rf ${D}${base_libdir}/lib${BPN}.a
		ln -sf $librelpath/lib${BPN}.a ${D}${base_libdir}/lib${BPN}.a
	fi
	if test -L  ${D}${base_libdir}/lib${BPN}.la ; then
		rm -rf ${D}${base_libdir}/lib${BPN}.la
		ln -sf $librelpath/lib${BPN}.la ${D}${base_libdir}/lib${BPN}.la
	fi
}

PACKAGES =+ "lib${BPN}"

FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"

BBCLASSEXTEND = "native"
# Only append ldflags for target recipe and if USE_NLS is enabled
LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS') == 'yes')]}"
EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS') == 'no')]}"