diff options
author | 2012-11-25 09:50:59 +0100 | |
---|---|---|
committer | 2012-11-25 09:50:59 +0100 | |
commit | a82c0719445aa769e5aea9e537371bc7e52387c3 (patch) | |
tree | f26aacf3090d6e5f4b98ecd025a2e5890596ac22 /eclass | |
parent | Merge pull request #26 from TheChymera/master (diff) | |
download | sci-a82c0719445aa769e5aea9e537371bc7e52387c3.tar.gz sci-a82c0719445aa769e5aea9e537371bc7e52387c3.tar.bz2 sci-a82c0719445aa769e5aea9e537371bc7e52387c3.zip |
First scratch of new pkgconfig.eclass
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/pkgconfig.eclass | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/eclass/pkgconfig.eclass b/eclass/pkgconfig.eclass new file mode 100644 index 000000000..0e6676386 --- /dev/null +++ b/eclass/pkgconfig.eclass @@ -0,0 +1,42 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# @ECLASS: pkgconfig.eclass +# @MAINTAINER: +# jlec@gentoo.org +# @BLURB: Simplify creation of pkg-config files +# @DESCRIPTION: +# Use this if you buildsystem doesn't create pkg-config files. + +inherit multilib + +# @ECLAS-VARIABLE: PC_NAME +# @DESCRIPTION: +# Name of pkg-config file, defaults to PN +: {PC_NAME:-${PN}} + +# @ECLAS-VARIABLE: PC_LIBDIR +# @DESCRIPTION: +# libdir to use, default to standard system libdir aka /usr/lib* +: {PC_LIBDIR:-""} + +# @ECLASS_FUNCTION: create_pkgconfig +# @DESCRIPTION: +create_pkgconfig() { +[[ -z ${PC_LIBDIR]] || PC_LIBDIR="${EPREFIX}/usr/$(get_libdir)" + +cat > ${T}/${pcname}.pc +prefix=${EPREFIX}/usr +libdir=\${prefix}/$(get_libdir) +includedir=\${prefix}/include +Name: ${pcname} +Description: ${PN} ${pcname} +Version: ${PV} +URL: ${HOMEPAGE} +Libs: -L\${libdir} -l${libname} $@ +Cflags: -I\${includedir}/${PN} +${PCREQ} +EOF + +}
\ No newline at end of file |