clases/cpan.bbclass,packages/perl: add EXTRA_CPANFLAGS, fix native
authorHolger Freyther <zecke@selfish.org>
Sun, 6 Aug 2006 19:37:22 +0000 (19:37 +0000)
committerHolger Freyther <zecke@selfish.org>
Sun, 6 Aug 2006 19:37:22 +0000 (19:37 +0000)
    Add EXTRA_CPANFLAGS to cpan.bbclass, similiar to EXTRA_OECONF
    and EXTRA_OEMAKE
    Use this in libxml-parser-perl-native to point to the expat
    include and libraries
    perl-native inherits native already. No need to use BUILD_CC,
    BUILD_FOO, BUILD_LDFLAGS but use LDFLAGS and CC directly. LDFLAGS
    has rpath already removed...

classes/cpan.bbclass
packages/perl/libxml-parser-perl-native_2.34.bb
packages/perl/perl-native_5.8.4.bb
packages/perl/perl-native_5.8.7.bb

index 853abfd..78b902f 100644 (file)
@@ -1,7 +1,8 @@
 FILES_${PN} += '${libdir}/perl5'
+EXTRA_CPANFLAGS = ""
 
 cpan_do_configure () {
-       perl Makefile.PL
+       perl Makefile.PL ${EXTRA_CPANFLAGS}
        if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
                . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh
                sed -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:; s:\(SITEARCHEXP = \).*:\1${sitearchexp}:; s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5:; s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" < Makefile > Makefile.new
index 12bb476..55bae66 100644 (file)
@@ -2,3 +2,4 @@ SECTION = "libs"
 require libxml-parser-perl_${PV}.bb
 inherit native
 DEPENDS = "perl-native expat-native"
+EXTRA_CPANFLAGS += " EXPATINCPATH='${STAGING_INCDIR}' EXPATLIBPATH='${STAGING_LIBDIR}'"
index a4065e9..4ec0c0f 100644 (file)
@@ -13,9 +13,9 @@ S = "${WORKDIR}/perl-${PV}"
 
 do_configure () {
     ./Configure                                        \
-    -Dcc="${BUILD_CC}"                         \
-    -Dcflags="${BUILD_CFLAGS}"                 \
-    -Dldflags="${BUILD_LDFLAGS} -Wl,-rpath,${STAGING_LIBDIR}"          \
+    -Dcc="${CC}"                               \
+    -Dcflags="${CFLAGS}"                       \
+    -Dldflags="${LDFLAGS}"             \
     -Dusethreads                               \
     -Duselargefiles                            \
     -Dprefix=${prefix}                         \
index 170a0eb..ebe6ac9 100644 (file)
@@ -18,9 +18,9 @@ PARALLEL_MAKE = ""
 
 do_configure () {
     ./Configure                                        \
-    -Dcc="${BUILD_CC}"                         \
-    -Dcflags="${BUILD_CFLAGS}"                 \
-    -Dldflags="${BUILD_LDFLAGS} -Wl,-rpath,${STAGING_LIBDIR}"          \
+    -Dcc="${CC}"                               \
+    -Dcflags="${CFLAGS}"                       \
+    -Dldflags="$LDFLAGS}"              \
     -Dusethreads                               \
     -Duselargefiles                            \
     -Dprefix=${prefix}                         \