autotools.bbclass: enable installing .pc files on demand
authorMichael Lauer <mickey@vanille-media.de>
Sun, 23 Mar 2008 16:17:03 +0000 (16:17 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Sun, 23 Mar 2008 16:17:03 +0000 (16:17 +0000)
(see file for lenghty explanation)

classes/autotools.bbclass

index 1f03825..53480e5 100644 (file)
@@ -214,6 +214,18 @@ autotools_stage_all() {
                        echo "cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}"
                        cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}
                fi
+       
+       fi
+       # Ok, this is nasty. pkgconfig.bbclass is usually used to install .pc files,
+       # however some packages rely on the presence of .pc files to enable/disable
+       # their configurataions in which case we better should not install everything
+       # unconditionally, but rather depend on the actual results of make install.
+       # The good news though: a) there are not many packages doing this and
+       # b) packaged staging will fix that anyways. :M:
+       if [ "${AUTOTOOLS_STAGE_PKGCONFIG}" = "1" ]
+       then
+               echo "cp -f ${STAGE_TEMP}/${libdir}/pkgconfig/*.pc ${STAGING_LIBDIR}/pkgconfig/"
+               cp -f ${STAGE_TEMP}/${libdir}/pkgconfig/*.pc ${STAGING_LIBDIR}/pkgconfig/
        fi
        rm -rf ${STAGE_TEMP}/${mandir} || true
        rm -rf ${STAGE_TEMP}/${infodir} || true