aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
blob: fe1ec0ff2f0565d42526476240550eee0efec4dd (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
50
51
52
53
54
55
56
57
58
59
Upstream-Status: Rejected

Add pkgconfig support to libksba.
This patch is rejected by upstream for the reason below:
They think pkgconfig adds no portability and maintaining them is not worthwhile.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>

Index: Makefile.am
===============================================================
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,6 +21,9 @@
 ACLOCAL_AMFLAGS = -I m4 -I gl/m4
 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
 
+pkgconfigdir = ${libdir}/pkgconfig
+pkgconfig_DATA = ksba.pc
+
 # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
 GITLOG_TO_CHANGELOG=gitlog-to-changelog
 
Index: configure.ac
===============================================================
--- a/configure.ac
+++ b/configure.ac
@@ -399,6 +399,7 @@ m4/Makefile
 gl/Makefile
 src/Makefile
 src/ksba-config
 src/versioninfo.rc
+ksba.pc
 tests/Makefile
 doc/Makefile

Index: src/ksba.pc.in
===============================================================
--- /dev/null
+++ b/ksba.pc.in
@@ -0,0 +1,16 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+# API info
+api_version=@KSBA_CONFIG_API_VERSION@
+
+Name: ksba
+Description: Libksba provides an easy API to create and parse X.509 and CMS related objects
+Requires:
+Version: @VERSION@
+Libs: -L${libdir} -lksba
+Libs.private: -L{libdir} -lgpg-error
+Cflags: -I${includedir}
+
-- 
1.7.5.4
+e mkdir -p ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives # update index package_update_index_deb #install packages export INSTALL_ROOTFS_DEB="${IMAGE_ROOTFS}" export INSTALL_BASEARCH_DEB="${DPKG_ARCH}" export INSTALL_ARCHS_DEB="${PACKAGE_ARCHS}" export INSTALL_PACKAGES_NORMAL_DEB="${PACKAGE_INSTALL}" export INSTALL_PACKAGES_ATTEMPTONLY_DEB="${PACKAGE_INSTALL_ATTEMPTONLY}" export INSTALL_PACKAGES_LINGUAS_DEB="${LINGUAS_INSTALL}" export INSTALL_TASK_DEB="rootfs" package_install_internal_deb ${DEB_POSTPROCESS_COMMANDS} rootfs_install_complementary export D=${IMAGE_ROOTFS} export OFFLINE_ROOT=${IMAGE_ROOTFS} export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} export OPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} export INTERCEPT_DIR=${WORKDIR}/intercept_scripts export NATIVE_ROOT=${STAGING_DIR_NATIVE} # Attempt to run preinsts # Mark packages with preinst failures as unpacked for i in ${IMAGE_ROOTFS}/var/lib/dpkg/info/*.preinst; do if [ -f $i ] && ! sh $i; then deb_package_setflag unpacked `basename $i .preinst` fi done # Attempt to run postinsts # Mark packages with postinst failures as unpacked for i in ${IMAGE_ROOTFS}/var/lib/dpkg/info/*.postinst; do if [ -f $i ] && ! sh $i configure; then deb_package_setflag unpacked `basename $i .postinst` fi done set -e if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then if grep Status:.install.ok.unpacked ${IMAGE_ROOTFS}/var/lib/dpkg/status; then bberror "Some packages could not be configured offline and rootfs is read-only." exit 1 fi fi install -d ${IMAGE_ROOTFS}/${sysconfdir} echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version # Hacks to allow opkg's update-alternatives and opkg to coexist for now mkdir -p ${IMAGE_ROOTFS}${opkglibdir} if [ -e ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives ]; then rmdir ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives fi ln -s ${opkglibdir}/alternatives ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives ln -s /var/lib/dpkg/info ${IMAGE_ROOTFS}${opkglibdir}/info ln -s /var/lib/dpkg/status ${IMAGE_ROOTFS}${opkglibdir}/status ${ROOTFS_POSTPROCESS_COMMAND} log_check rootfs } remove_packaging_data_files() { rm -rf ${IMAGE_ROOTFS}${opkglibdir} rm -rf ${IMAGE_ROOTFS}/usr/dpkg/ } # This will of course only work after rootfs_deb_do_rootfs has been called DPKG_QUERY_COMMAND = "${STAGING_BINDIR_NATIVE}/dpkg-query --admindir=$INSTALL_ROOTFS_DEB/var/lib/dpkg" list_installed_packages() { if [ "$1" = "arch" ] ; then # Here we want the PACKAGE_ARCH not the deb architecture ${DPKG_QUERY_COMMAND} -W -f='${Package} ${PackageArch}\n' elif [ "$1" = "file" ] ; then ${DPKG_QUERY_COMMAND} -W -f='${Package} ${Package}_${Version}_${Architecture}.deb\n' | while read pkg pkgfile do fullpath=`find ${DEPLOY_DIR_DEB} -name "$pkgfile" || true` if [ "$fullpath" = "" ] ; then echo "$pkg $pkgfile" else echo "$pkg $fullpath" fi done else ${DPKG_QUERY_COMMAND} -W -f='${Package}\n' fi } rootfs_list_installed_depends() { # Cheat here a little bit by using the opkg query helper util ${DPKG_QUERY_COMMAND} -W -f='Package: ${Package}\nDepends: ${Depends}\nRecommends: ${Recommends}\n\n' | opkg-query-helper.py } rootfs_install_packages() { ${STAGING_BINDIR_NATIVE}/apt-get install `cat $1` --force-yes --allow-unauthenticated # Mark all packages installed sed -i -e "s/Status: install ok unpacked/Status: install ok installed/;" $INSTALL_ROOTFS_DEB/var/lib/dpkg/status }