P.S. I don't use perl; you may want 5.12.1 so make your changes
     below accordingly.

Kerry Lynn wrote:
Start here:
https://forum.openwrt.org/viewtopic.php?id=15201

After you've built "trunk" and have read
"usage of the 'feeds' scripts", do this:
u...@ubuntu:~/src/OpenWRT/trunk$./scripts/feeds update packages
u...@ubuntu:~/src/OpenWRT/trunk$./scripts/feeds install -p packages perl

Now read this for background:
http://wiki.openwrt.org/doc/howto/creatingpackages

Assuming you want v5.13.2, apply these patches:
--- a/feeds/packages/lang/perl/Makefile
+++ b/feeds/packages/lang/perl/Makefile
@@ -8,17 +8,17 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=perl
-PKG_VERSION:=5.10.0
-PKG_RELEASE:=4
-PKG_MD5SUM:=d2c39b002ebfd2c3c5dba589365c5a71
+PKG_VERSION:=5.13
+PKG_RELEASE:=2
+PKG_MD5SUM:=0fb91f58810f0085e8a09311ec5bb1d4

 PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \
         ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \
         ftp://ftp.gmd.de/mirrors/CPAN/src/5.0 \
         ftp://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).$(PKG_RELEASE).tar.gz

-PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION).$(PKG_RELEASE)

 include $(INCLUDE_DIR)/package.mk

--- a/feeds/packages/lang/perl/perlmod.mk
+++ b/feeds/packages/lang/perl/perlmod.mk
@@ -3,10 +3,10 @@

 # Build environment
 PERL_CMD := $(STAGING_DIR)/usr/bin/perl
-PERL_LIB := $(STAGING_DIR)/usr/lib/perl5/5.10
+PERL_LIB := $(STAGING_DIR)/usr/lib/perl5/5.13

 # Module install prefix
-PERL_SITELIB := /usr/lib/perl5/5.10
+PERL_SITELIB := /usr/lib/perl5/5.13

 define perlmod/Configure
     (cd $(PKG_BUILD_DIR); \

(I figured out the above by browsing around www.cpan.org
 and ftp://ftp.cpan.org/pub/CPAN/src/5.0/)

Now run "make menuconfig" again, select Languages->Perl
and select any packages you need.  Exit out and save
your new OpenWRT config, then run "make V=99".

Encounter your first failure:

Applying ./patches/100-static_uudmap.patch using plaintext:
patching file generate_uudmap
patching file Makefile.micro
Hunk #1 succeeded at 170 with fuzz 2 (offset -3 lines).
patching file Makefile.SH
Hunk #1 FAILED at 478.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.SH.rej
Patch failed!  Please fix ./patches/100-static_uudmap.patch!

Apply this patch (note: patching a .patch file here):
--- a/feeds/packages/lang/perl/patches/100-static_uudmap.patch
+++ b/feeds/packages/lang/perl/patches/100-static_uudmap.patch
@@ -29,22 +29,23 @@
  # That's it, folks!
 --- a/Makefile.SH
 +++ b/Makefile.SH
-@@ -478,11 +478,13 @@ opmini\$(OBJ_EXT): opmini.c
+@@ -609,11 +609,13 @@

- globals\$(OBJ_EXT): uudmap.h
+ uudmap.h: bitcount.h

--uudmap.h: generate_uudmap\$(EXE_EXT)
--    \$(RUN) ./generate_uudmap\$(EXE_EXT) >uudmap.h
+-bitcount.h: generate_uudmap\$(HOST_EXE_EXT)
+-    \$(RUN) ./generate_uudmap\$(HOST_EXE_EXT) uudmap.h bitcount.h
 -
--generate_uudmap\$(EXE_EXT): generate_uudmap\$(OBJ_EXT)
-- \$(CC) -o generate_uudmap \$(LDFLAGS) generate_uudmap\$(OBJ_EXT) \$(libs)
-+uudmap.h: generate_uudmap
+-generate_uudmap\$(HOST_EXE_EXT): generate_uudmap\$(OBJ_EXT)
+- \$(CC) -o generate_uudmap\$(EXE_EXT) \$(LDFLAGS) generate_uudmap\$(OBJ_EXT) \$(libs)
++bitcount.h: generate_uudmap
 +    chmod a+x generate_uudmap
-+    \$(RUN) ./generate_uudmap >uudmap.h
++    \$(RUN) ./generate_uudmap uudmap.h bitcount.h
 +
 +generate_uudmap:
 +    cp ../generate_uudmap .
 +    touch generate_uudmap

  !GROK!THIS!
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
+

make V=99, hit your next error, fix it, iterate.

Install resulting image on your router.

Test it.

Write a HOWTO for the Wiki.

Good Luck, -K-


Bruce wrote:
Hmmn, okay. I downloaded the "image builder" following the directions here http://wiki.openwrt.org/doc/howto/imagebuilder

I have uncompressed the files and am able to build a image file.
But I don't understand how to use this to build the version of perl in the openwrt subversion that has the big/little endian patch.

Weedy wrote:
On Thu, Jul 1, 2010 at 2:05 PM, Bruce <br...@sqls.net> wrote:
Slight correction..

I downloaded from svn://svn.openwrt.org/openwrt/packages/lang/perl


Bruce wrote:

Don't build on the router. Build it on a PC with imagebuilder
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to