2 # We need gnugrep
(for -I
)
3 DEPENDS_append
+= " grep-native"
7 SRC_URI
+= "file://config.sh-armeb-linux \
8 file://config.sh-arm-linux \
9 file://config.sh-powerpc-linux \
10 file://config.sh-mipsel-linux \
11 file://config.sh-i386-linux \
12 file://config.sh-i486-linux \
13 file://config.sh-i586-linux \
14 file://config.sh-i686-linux \
15 file://config.sh-x86_64-linux \
16 file://config.sh-sh3-linux \
17 file://config.sh-sh4-linux"
19 # Use gcc
to link
and use PIC mode
for compiling shared libs
20 GCCLINK_SRC
= "file://override-generate-sh.patch;patch=1 \
21 file://makefile-usegcc-to-link.patch;patch=1"
23 SRC_URI_append_sh4
+= " ${GCCLINK_SRC}"
24 SRC_URI_append_sh3
+= " ${GCCLINK_SRC}"
25 SRC_URI_append_powerpc
+= " ${GCCLINK_SRC}"
32 ln
-sf $
{HOSTPERL
} $
{STAGING_BINDIR_NATIVE
}/hostperl
33 cp $
{HOSTPERL
} hostperl
35 rm
-f Makefile.SH.patch
36 cp $
{WORKDIR
}/Makefile.SH.patch .
37 cp $
{WORKDIR
}/config.sh
-mipsel
-linux .
38 cp $
{WORKDIR
}/config.sh
-i386
-linux .
39 cp $
{WORKDIR
}/config.sh
-i486
-linux .
40 cp $
{WORKDIR
}/config.sh
-i586
-linux .
41 cp $
{WORKDIR
}/config.sh
-i686
-linux .
42 cp $
{WORKDIR
}/config.sh
-x86_64
-linux .
43 cp $
{WORKDIR
}/config.sh
-armeb
-linux .
44 cp $
{WORKDIR
}/config.sh
-powerpc
-linux .
45 cp $
{WORKDIR
}/config.sh
-sh3
-linux .
46 cp $
{WORKDIR
}/config.sh
-sh4
-linux .
47 #perl insists on an extra config.sh
for arm EABI
48 cp config.sh
-arm
-linux config.sh
-arm
-linux
-gnueabi
49 cp config.sh
-armeb
-linux config.sh
-armeb
-linux
-gnueabi
50 # nslu2 LE uclibc builds do
not work with the
default config.sh
51 if test
"${MACHINE}" = nslu2
53 rm
-f .
/config.sh
-arm
-linux
54 cp $
{WORKDIR
}/config.sh
-arm
-linux .
56 for i in config.sh
-*-linux
; do
57 a
="`echo $i|sed -e 's,^config.sh-,,; s,-linux$,,'`"
58 newfile
="`echo $i|sed -e 's,-linux$,-linux-uclibc,g'`"
59 cat $i | sed
-e
"s,${a}-linux,${a}-linux-uclibc,g; \
60 s,d_sockatmark='define',d_sockatmark='undef',g;" > $newfile
62 sed
-i
-e 's
,.
/install_me_here
,$
{D
},g' config.sh
-$
{TARGET_ARCH
}-$
{TARGET_OS
}
63 sed
-i
-e
"s%/usr/include/%${STAGING_INCDIR}/%g" config.sh
-$
{TARGET_ARCH
}-$
{TARGET_OS
}
65 #These are strewn all over the source tree
66 for foo in `grep
-I
-m1 \
/usr\
/include\
/.
*\\.h $
{WORKDIR
}/* -r | cut
-f
1 -d
":"`
; do
68 sed
-e
"s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
71 echo
"ARCH = ${TARGET_ARCH}" > config
72 echo
"OS = ${TARGET_OS}" >> config
77 ln
-s libperl.so.$
{PV
} $
{D
}/$
{libdir
}/libperl.so
.5
78 sed
-i
-e
"s,${D},,g" $
{D
}/$
{libdir
}/perl5
/$
{PV
}/$
{TARGET_ARCH
}-$
{TARGET_OS
}/Config_heavy.pl
81 # Create a perl
-modules package recommending all the other perl
82 # packages
(actually the non modules packages
and not created too
)
83 ALLOW_EMPTY_perl
-modules
= "1"
84 PACKAGES_append
= " perl-modules"
85 RRECOMMENDS_perl
-modules
= "${PACKAGES}"
86 RPROVIDES_perl
-lib
= "perl-lib"
89 require perl
-rdepends_$
{PV
}.inc
91 #
To create
/update the perl
-rdepends_$
{PV
}.inc use this piece of ugly script
(modified
for your arch
/paths etc
):
92 # daka@DaKa2
:/home
/slug
/slugos
/tmp
/work
/perl
-5.8.7-r14
/install$ egrep
-r
"use|require" * | grep
";$" | egrep
".pm:use |.pm:require " | grep
-v v5.6
.0 | grep
-v
5.00 | grep
-v \$module | sed
-e
"s, \+, ,g" | cut
-f1
,2 -d
" " | sed
-e
"s,;, ,g" | sed
-e
"s,(), ,g" | sed
-e
"s,::,-,g" | sort | uniq | tr
[:upper:] [:lower:] | sed
-e
"s,/[^ ]\+ , += \"perl-module-,g" | sed
-e
"s, \?$, \",g" | sed
-e
"s,_,-,g" | sed
-e
"s,^,RDEPENDS_,g" | sed
-e
"s,armeb-linux,\$\{TARGET_ARCH\}-\$\{TARGET_OS\},g" | egrep
-v
"perl-module-5|perl-module-tk|perl-module-mac-internetconfig|perl-module-ndbm-file|perl-module-html-treebuilder|perl-module-lwp-simple|perl-module-vms-filespec|perl-module-fcgi|perl-module-vms-stdio|perl-module-mac-buildtools" > /home
/slug
/openembedded
/packages
/perl
/perl
-rdepends_5.8
.7.inc
94 # Some additional dependencies that the above doesn't manage
to figure out
95 DEPENDS_perl
-module
-math
-bigint
+= "perl-module-math-bigint-calc "
96 DEPENDS_perl
-module
-math
-bigint
-calc
+= "perl-module-integer "
98 require perl
-rprovides.inc