diff options
-rw-r--r-- | meta-oe/recipes-extended/libpwquality/files/add-missing-python-include-dir-for-cross.patch | 48 | ||||
-rw-r--r-- | meta-oe/recipes-extended/libpwquality/libpwquality_1.4.0.bb | 45 |
2 files changed, 93 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/libpwquality/files/add-missing-python-include-dir-for-cross.patch b/meta-oe/recipes-extended/libpwquality/files/add-missing-python-include-dir-for-cross.patch new file mode 100644 index 0000000000..d12492f022 --- /dev/null +++ b/meta-oe/recipes-extended/libpwquality/files/add-missing-python-include-dir-for-cross.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 1ea09e09ab2387c326bb7170835361ece6e25477 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 3 Aug 2015 13:43:14 +0800 | ||
4 | Subject: [PATCH] setup.py.in: add missing python include dir for cross | ||
5 | compiling | ||
6 | |||
7 | Upstream-Status: inappropriate [oe-core specific] | ||
8 | |||
9 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
10 | --- | ||
11 | python/Makefile.am | 2 +- | ||
12 | python/setup.py.in | 3 ++- | ||
13 | 2 files changed, 3 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/python/Makefile.am b/python/Makefile.am | ||
16 | index abc5cd3..e35ba71 100644 | ||
17 | --- a/python/Makefile.am | ||
18 | +++ b/python/Makefile.am | ||
19 | @@ -14,4 +14,4 @@ all-local: | ||
20 | CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-lib=. | ||
21 | |||
22 | install-exec-local: | ||
23 | - CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py install --prefix=${DESTDIR}${prefix} | ||
24 | + CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py install --prefix=${DESTDIR}${prefix} --install-lib=${DESTDIR}/${PYTHONSITEDIR} | ||
25 | diff --git a/python/setup.py.in b/python/setup.py.in | ||
26 | index 6457595..d3db0e5 100755 | ||
27 | --- a/python/setup.py.in | ||
28 | +++ b/python/setup.py.in | ||
29 | @@ -6,6 +6,7 @@ | ||
30 | |||
31 | from distutils.core import setup, Extension | ||
32 | from distutils.command.build_ext import build_ext as _build_ext | ||
33 | +import os | ||
34 | |||
35 | class build_ext(_build_ext): | ||
36 | def genconstants(self, headerfile, outputfile): | ||
37 | @@ -23,7 +24,7 @@ class build_ext(_build_ext): | ||
38 | |||
39 | pwqmodule = Extension('pwquality', | ||
40 | sources = ['pwquality.c'], | ||
41 | - include_dirs = ['../src'], | ||
42 | + include_dirs = ['../src', os.path.join(os.environ['STAGING_INCDIR'], os.environ['PYTHON_DIR'])], | ||
43 | library_dirs = ['../src/.libs'], | ||
44 | libraries = ['pwquality']) | ||
45 | |||
46 | -- | ||
47 | 1.9.1 | ||
48 | |||
diff --git a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.0.bb b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.0.bb new file mode 100644 index 0000000000..4f5ec1438f --- /dev/null +++ b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.0.bb | |||
@@ -0,0 +1,45 @@ | |||
1 | DESCRIPTION = "Library for password quality checking and generating random passwords" | ||
2 | HOMEPAGE = "https://github.com/libpwquality/libpwquality" | ||
3 | SECTION = "devel/lib" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2" | ||
6 | |||
7 | SRCNAME = "libpwquality" | ||
8 | SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \ | ||
9 | file://add-missing-python-include-dir-for-cross.patch \ | ||
10 | " | ||
11 | |||
12 | SRC_URI[md5sum] = "b8defcc7280a90e9400d6689c93a279c" | ||
13 | SRC_URI[sha256sum] = "1de6ff046cf2172d265a2cb6f8da439d894f3e4e8157b056c515515232fade6b" | ||
14 | |||
15 | S = "${WORKDIR}/${SRCNAME}-${PV}" | ||
16 | |||
17 | DEPENDS = "cracklib virtual/gettext python3" | ||
18 | RDEPENDS_python3-${PN} = "${PN}" | ||
19 | |||
20 | inherit autotools python3native | ||
21 | |||
22 | B = "${S}" | ||
23 | |||
24 | export PYTHON_DIR | ||
25 | export BUILD_SYS | ||
26 | export HOST_SYS | ||
27 | export STAGING_LIBDIR | ||
28 | export STAGING_INCDIR | ||
29 | |||
30 | EXTRA_OECONF += "--with-python-rev=${PYTHON_BASEVERSION} \ | ||
31 | --with-python-binary=${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \ | ||
32 | --with-pythonsitedir=${PYTHON_SITEPACKAGES_DIR} \ | ||
33 | --libdir=${libdir} \ | ||
34 | " | ||
35 | |||
36 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
37 | PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" | ||
38 | |||
39 | PACKAGES += "python3-${PN} python3-${PN}-dbg" | ||
40 | FILES_${PN} += "${libdir}/security/pam_pwquality.so" | ||
41 | FILES_${PN}-dbg += "${libdir}/security/.debug" | ||
42 | FILES_${PN}-staticdev += "${libdir}/security/pam_pwquality.a" | ||
43 | FILES_${PN}-dev += "${libdir}/security/pam_pwquality.la" | ||
44 | FILES_python3-${PN} = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
45 | FILES_python3-${PN}-dbg = "${PYTHON_SITEPACKAGES_DIR}/.debug" | ||