diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-02-24 17:06:13 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-02-24 17:06:13 +0100 |
commit | 33880367ef3b053aaebf7b6eaadded70fdb35b08 (patch) | |
tree | f55af33c6a6da2e5317f7570888739e275057844 /package | |
parent | a5a7bb5206b84e3402a544f189d24f64e74e66ff (diff) |
fix perl cross-compile on Darwin
Diffstat (limited to 'package')
-rw-r--r-- | package/perl/Makefile | 18 | ||||
-rw-r--r-- | package/perl/patches/patch-Makefile_SH | 15 |
2 files changed, 25 insertions, 8 deletions
diff --git a/package/perl/Makefile b/package/perl/Makefile index d42e2d356..72b395e1e 100644 --- a/package/perl/Makefile +++ b/package/perl/Makefile @@ -12,6 +12,7 @@ PKG_SECTION:= lang PKG_BUILDDEP:= perl-host PKG_URL:= http://www.perl.org/ PKG_SITES:= http://www.cpan.org/src/ +PKG_NOPARALLEL:= 1 include ${TOPDIR}/mk/host.mk include ${TOPDIR}/mk/package.mk @@ -28,15 +29,21 @@ INSTALL_STYLE:= manual TARGET_CFLAGS:= $(subst g3,g,$(TARGET_CFLAGS)) host-configure: - (cd ${WRKBUILD}; ./Configure -der -Uusedl) + $(SED) "s#@@STAGING_HOST_DIR@@/perl-host#./perl#" ${WRKBUILD}/Makefile.SH + $(SED) "s#@@LIB@@#-Ilib#" ${WRKBUILD}/Makefile.SH + # darwin workaround + $(SED) "s#^usedl.*##" ${WRKBUILD}/hints/darwin.sh + (cd ${WRKBUILD}; ${BASH} ./Configure -des -Duseperlio -Uusedl -Uusethreads -Uuseshrplib -Dprefix=${STAGING_HOST_DIR}/usr) host-build: cd ${WRKBUILD} && env CC_FOR_BUILD="gcc" ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE) perl-hostinstall: - $(CP) ${WRKBUILD}/miniperl $(STAGING_HOST_DIR)/usr/bin - $(CP) ${WRKBUILD}/perl $(STAGING_HOST_DIR)/usr/bin/perl.host + cd ${WRKBUILD} && env CC_FOR_BUILD="gcc" ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ + ${HOST_MAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE) + mv ${STAGING_HOST_DIR}/usr/bin/perl ${STAGING_HOST_DIR}/usr/bin/perl-host + cp ${WRKBUILD}/miniperl ${STAGING_HOST_DIR}/usr/bin do-configure: sed \ @@ -50,6 +57,8 @@ do-configure: -e 's!%%LIBDIRS%%!$(STAGING_TARGET_DIR)/lib $(STAGING_TARGET_DIR)/usr/lib!g' \ -e 's!%%INCDIRS%%!$(STAGING_TARGET_DIR)/include $(STAGING_TARGET_DIR)/usr/include!g' \ ./files/config.sh.$(CPU_ARCH).$(ADK_TARGET_LIBC) > ${WRKBUILD}/config.sh + $(SED) "s#@@STAGING_HOST_DIR@@#${STAGING_HOST_DIR}/usr/bin#" ${WRKBUILD}/Makefile.SH + $(SED) "s#@@LIB@@##" ${WRKBUILD}/Makefile.SH (cd ${WRKBUILD}; ./Configure -S) do-build: @@ -60,8 +69,7 @@ do-build: (cd ${WRKBUILD}; $(MAKE)) do-install: - (cd ${WRKBUILD}; $(CP) miniperl.target miniperl) - (cd ${WRKBUILD}; $(STAGING_HOST_DIR)/usr/bin/perl.host installperl --destdir=${WRKINST}) + (cd ${WRKBUILD}; $(STAGING_HOST_DIR)/usr/bin/perl-host installperl --destdir=${WRKINST}) perl-install: ${INSTALL_DIR} ${IDIR_PERL}/usr/bin diff --git a/package/perl/patches/patch-Makefile_SH b/package/perl/patches/patch-Makefile_SH index cb947405f..9784baab2 100644 --- a/package/perl/patches/patch-Makefile_SH +++ b/package/perl/patches/patch-Makefile_SH @@ -1,5 +1,14 @@ --- perl-5.18.1.orig/Makefile.SH 2013-08-12 04:44:47.000000000 +0200 -+++ perl-5.18.1/Makefile.SH 2013-12-31 14:09:47.000000000 +0100 ++++ perl-5.18.1/Makefile.SH 2014-02-18 16:20:59.000000000 +0100 +@@ -319,7 +319,7 @@ MINIPERL = \$(LDLIBPTH) \$(RUN) ./minipe + + # Macros to invoke a copy of our fully operational perl during the build. + PERL_EXE = perl\$(EXE_EXT) +-RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) ++RUN_PERL = \$(LDLIBPTH) \$(RUN) @@STAGING_HOST_DIR@@/perl-host\$(EXE_EXT) + + # Macros to run our tests + RUN_TESTS = \$(LDLIBPTH) ./runtests @@ -665,9 +665,10 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX $(RUN) ./generate_uudmap$(HOST_EXE_EXT) $(generated_headers) @@ -8,7 +17,7 @@ generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT) - $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs) -+ $(CC_FOR_BUILD) -o generate_uudmap$(EXE_EXT) generate_uudmap$(OBJ_EXT) $(libs) ++ $(CC_FOR_BUILD) -o generate_uudmap$(EXE_EXT) generate_uudmap$(OBJ_EXT) miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h $(CCCMD) $(PLDLFLAGS) $*.c @@ -25,7 +34,7 @@ # them, which picks up Devel::PPPort's documentation. pod/perltoc.pod: $(perltoc_pod_prereqs) $(PERL_EXE) $(ext) pod/buildtoc - $(RUN_PERL) -f -Ilib pod/buildtoc -q -+ #$(RUN_PERL) -f -Ilib pod/buildtoc -q ++ $(RUN_PERL) -f @@LIB@@ pod/buildtoc -q pod/perlapi.pod: pod/perlintern.pod |