2011-06-02 22:15:26 +00:00
|
|
|
# Note: Due to the bitbake wrapper script, making changes to pseudo can be
|
|
|
|
# difficult. To work around the current version of the wrapper use:
|
|
|
|
# BBFETCH2=True PSEUDO_BUILD=1 ../bitbake/bin/bitbake pseudo-native [-c CMD]
|
|
|
|
|
2011-02-10 10:34:40 +00:00
|
|
|
DESCRIPTION = "Pseudo gives fake root capabilities to a normal user"
|
2012-07-27 21:54:48 +00:00
|
|
|
HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/pseudo"
|
2011-02-10 10:34:40 +00:00
|
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
|
|
|
|
SECTION = "base"
|
|
|
|
LICENSE = "LGPL2.1"
|
|
|
|
DEPENDS = "sqlite3"
|
|
|
|
|
2012-10-27 08:48:17 +00:00
|
|
|
SRC_URI_append_class-nativesdk = " file://symver.patch"
|
2012-04-22 14:46:17 +00:00
|
|
|
|
2012-10-27 08:48:17 +00:00
|
|
|
SRC_URI_append_class-native = " file://symver.patch"
|
2012-07-27 21:54:48 +00:00
|
|
|
|
2012-03-23 04:31:48 +00:00
|
|
|
FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
|
2011-09-26 20:12:25 +00:00
|
|
|
FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
|
2011-02-10 10:34:40 +00:00
|
|
|
PROVIDES += "virtual/fakeroot"
|
|
|
|
|
2011-09-26 20:12:25 +00:00
|
|
|
MAKEOPTS = ""
|
|
|
|
|
2011-02-10 10:34:40 +00:00
|
|
|
inherit siteinfo
|
|
|
|
|
|
|
|
do_configure () {
|
|
|
|
:
|
|
|
|
}
|
|
|
|
|
2012-04-13 12:35:16 +00:00
|
|
|
NO32LIBS ??= "1"
|
2011-02-10 10:34:40 +00:00
|
|
|
|
|
|
|
# Compile for the local machine arch...
|
|
|
|
do_compile () {
|
2012-04-19 22:01:09 +00:00
|
|
|
if [ "${SITEINFO_BITS}" = "64" ]; then
|
pseudo.inc: Fix sqlite libdir again, pseudo 1.4.3
This updates to pseudo 1.4.3. Changes:
1. A couple of minor tweaks to reduce difficulties using SDKs built
on slightly more recent machines on older machines; specifically,
avoiding getting @GLIBC_2.7 symbol references for sscanf(), fscanf(),
and open2().
2. Revision of the logic determining the library directory to use for
sqlite's library files.
The latter is a source of difficulty because it's come up a few times
that we may want pseudo to use lib64 for libpseudo.so, but bitbake's
usual setup would have libsqlite3.a in lib regardless of bit width.
Cleaned up previous design a bit by providing a distinct setting for
sqlite-lib, which defaults to the same library directory used for other
things. Adjusted build to use this new setting. (This ends up being
${baselib}; on targets, that might not be lib, but for native builds
it generally is, and for SDK builds it appears to do the right thing.)
Testing: Successful build of meta-toolchain for both 64-bit and 32-bit
SDKMACHINE, and builds with NO32LIBS = "0" also succeeded. Also builds
for multilib targets.
(From OE-Core rev: ae8811bb26fba2e71d7280f6d6c4f5cec6a2871b)
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-05 20:21:42 +00:00
|
|
|
${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
|
2011-06-02 22:15:26 +00:00
|
|
|
else
|
pseudo.inc: Fix sqlite libdir again, pseudo 1.4.3
This updates to pseudo 1.4.3. Changes:
1. A couple of minor tweaks to reduce difficulties using SDKs built
on slightly more recent machines on older machines; specifically,
avoiding getting @GLIBC_2.7 symbol references for sscanf(), fscanf(),
and open2().
2. Revision of the logic determining the library directory to use for
sqlite's library files.
The latter is a source of difficulty because it's come up a few times
that we may want pseudo to use lib64 for libpseudo.so, but bitbake's
usual setup would have libsqlite3.a in lib regardless of bit width.
Cleaned up previous design a bit by providing a distinct setting for
sqlite-lib, which defaults to the same library directory used for other
things. Adjusted build to use this new setting. (This ends up being
${baselib}; on targets, that might not be lib, but for native builds
it generally is, and for SDK builds it appears to do the right thing.)
Testing: Successful build of meta-toolchain for both 64-bit and 32-bit
SDKMACHINE, and builds with NO32LIBS = "0" also succeeded. Also builds
for multilib targets.
(From OE-Core rev: ae8811bb26fba2e71d7280f6d6c4f5cec6a2871b)
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-05 20:21:42 +00:00
|
|
|
${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
|
2011-06-02 22:15:26 +00:00
|
|
|
fi
|
2011-09-26 20:12:25 +00:00
|
|
|
oe_runmake ${MAKEOPTS}
|
2011-02-10 10:34:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Two below are the same
|
|
|
|
# If necessary compile for the alternative machine arch. This is only
|
|
|
|
# necessary in a native build.
|
2012-10-27 08:48:17 +00:00
|
|
|
do_compile_prepend_class-native () {
|
2012-04-19 22:01:09 +00:00
|
|
|
if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
|
2011-02-10 10:34:40 +00:00
|
|
|
# We need the 32-bit libpseudo on a 64-bit machine...
|
2012-07-27 21:54:48 +00:00
|
|
|
# ... and we really, really, hope that the native host is
|
|
|
|
# x86, or else --bits may not work.
|
2012-08-17 21:24:52 +00:00
|
|
|
|
|
|
|
# if we're being rebuilt due to a dependency change, we need to make sure
|
|
|
|
# everything is clean before we configure and build -- if we haven't previously
|
|
|
|
# built this will fail and be ignored.
|
|
|
|
make ${MAKEOPTS} distclean || :
|
|
|
|
|
pseudo.inc: Fix sqlite libdir again, pseudo 1.4.3
This updates to pseudo 1.4.3. Changes:
1. A couple of minor tweaks to reduce difficulties using SDKs built
on slightly more recent machines on older machines; specifically,
avoiding getting @GLIBC_2.7 symbol references for sscanf(), fscanf(),
and open2().
2. Revision of the logic determining the library directory to use for
sqlite's library files.
The latter is a source of difficulty because it's come up a few times
that we may want pseudo to use lib64 for libpseudo.so, but bitbake's
usual setup would have libsqlite3.a in lib regardless of bit width.
Cleaned up previous design a bit by providing a distinct setting for
sqlite-lib, which defaults to the same library directory used for other
things. Adjusted build to use this new setting. (This ends up being
${baselib}; on targets, that might not be lib, but for native builds
it generally is, and for SDK builds it appears to do the right thing.)
Testing: Successful build of meta-toolchain for both 64-bit and 32-bit
SDKMACHINE, and builds with NO32LIBS = "0" also succeeded. Also builds
for multilib targets.
(From OE-Core rev: ae8811bb26fba2e71d7280f6d6c4f5cec6a2871b)
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-05 20:21:42 +00:00
|
|
|
./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
|
2011-09-26 20:12:25 +00:00
|
|
|
oe_runmake ${MAKEOPTS} libpseudo
|
2011-02-10 10:34:40 +00:00
|
|
|
# prevent it from removing the lib, but remove everything else
|
2011-09-26 20:12:25 +00:00
|
|
|
make 'LIB=foo' ${MAKEOPTS} distclean
|
2011-02-10 10:34:40 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-10-27 08:48:17 +00:00
|
|
|
do_compile_prepend_class-nativesdk () {
|
2012-04-19 22:01:09 +00:00
|
|
|
if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
|
2011-02-10 10:34:40 +00:00
|
|
|
# We need the 32-bit libpseudo on a 64-bit machine...
|
2012-07-27 21:54:48 +00:00
|
|
|
# ... and we really, really, hope that the native host is
|
|
|
|
# x86, or else --bits may not work.
|
pseudo.inc: Fix sqlite libdir again, pseudo 1.4.3
This updates to pseudo 1.4.3. Changes:
1. A couple of minor tweaks to reduce difficulties using SDKs built
on slightly more recent machines on older machines; specifically,
avoiding getting @GLIBC_2.7 symbol references for sscanf(), fscanf(),
and open2().
2. Revision of the logic determining the library directory to use for
sqlite's library files.
The latter is a source of difficulty because it's come up a few times
that we may want pseudo to use lib64 for libpseudo.so, but bitbake's
usual setup would have libsqlite3.a in lib regardless of bit width.
Cleaned up previous design a bit by providing a distinct setting for
sqlite-lib, which defaults to the same library directory used for other
things. Adjusted build to use this new setting. (This ends up being
${baselib}; on targets, that might not be lib, but for native builds
it generally is, and for SDK builds it appears to do the right thing.)
Testing: Successful build of meta-toolchain for both 64-bit and 32-bit
SDKMACHINE, and builds with NO32LIBS = "0" also succeeded. Also builds
for multilib targets.
(From OE-Core rev: ae8811bb26fba2e71d7280f6d6c4f5cec6a2871b)
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-05 20:21:42 +00:00
|
|
|
./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
|
2011-09-26 20:12:25 +00:00
|
|
|
oe_runmake ${MAKEOPTS} libpseudo
|
2011-02-10 10:34:40 +00:00
|
|
|
# prevent it from removing the lib, but remove everything else
|
2011-09-26 20:12:25 +00:00
|
|
|
make 'LIB=foo' ${MAKEOPTS} distclean
|
2011-02-10 10:34:40 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install () {
|
2011-09-26 20:12:25 +00:00
|
|
|
oe_runmake 'DESTDIR=${D}' ${MAKEOPTS} 'LIB=lib/pseudo/lib$(MARK64)' install
|
2011-02-10 10:34:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Two below are the same
|
|
|
|
# If necessary install for the alternative machine arch. This is only
|
|
|
|
# necessary in a native build.
|
2012-10-27 08:48:17 +00:00
|
|
|
do_install_append_class-native () {
|
2012-04-19 22:01:09 +00:00
|
|
|
if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
|
2011-02-10 10:34:40 +00:00
|
|
|
mkdir -p ${D}${prefix}/lib/pseudo/lib
|
|
|
|
cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-10-27 08:48:17 +00:00
|
|
|
do_install_append_class-nativesdk () {
|
2012-04-19 22:01:09 +00:00
|
|
|
if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
|
2011-02-10 10:34:40 +00:00
|
|
|
mkdir -p ${D}${prefix}/lib/pseudo/lib
|
|
|
|
cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
BBCLASSEXTEND = "native nativesdk"
|