Commit a6963ee9 authored by Jan Čermák's avatar Jan Čermák

checkout missing dependencies from openwrt/packages master

parent a2798142
menu "Configuration"
depends on PACKAGE_perl
config PERL_THREADS
bool "Enable threading support"
default y if (mips || mipsel || i386 || i686 || x86_64 || armeb || arm)
default n
config PERL_TESTS
bool "Include perl tests"
default n
help
Include test suites for all perl packages.
This will increase the size of perl and related packages
considerably.
Test support is still in development. Some tests will fail,
others are just missing completely.
endmenu
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=perl
PKG_VERSION:=5.22.0
PKG_RELEASE:=3
PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \
http://www.cpan.org/src/5.0 \
ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \
http://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \
ftp://ftp.gmd.de/mirrors/CPAN/src/5.0 \
http://ftp5.gwdg.de/pub/languages/perl/CPAN/src/ \
ftp://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0 \
http://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=e32cb6a8dda0084f2a43dac76318d68d
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_LICENSE_FILES:=Copying Artistic README
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
# Build settings
PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=perl/host
PKG_BUILD_PARALLEL:=1
HOST_BUILD_PARALLEL:=1
# Variables used during configuration/build
HOST_PERL_PREFIX:=$(STAGING_DIR_HOST)/usr
# Filter -g3, it will break Compress-Raw-Zlib
TARGET_CFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CFLAGS))
TARGET_CPPFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CPPFLAGS))
# A list of disabled tests
# ExtUtils tests are disabled for now as we don't support building
# native extensions on the target machine at the moment
PERL_DISABLEDTESTS:=cpan/ExtUtils-Constant cpan/ExtUtils-MakeMaker
# We're on Linux, so don't even package them
PERL_DISABLEDTESTS+=cpan/Win32API-File cpan/Win32 ext/VMS-DCLsym ext/VMS-Filespec ext/VMS-Stdio ext/Win32CORE os2/
# NDBM and ODBM not supported
PERL_DISABLEDTESTS+=ext/NDBM_File ext/ODBM_File
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include perlmod.mk
define Package/perl
SUBMENU:=Perl
SECTION:=lang
CATEGORY:=Languages
TITLE:=The Perl intepreter
URL:=http://www.perl.com/
DEPENDS:=+USE_GLIBC:libbsd +PERL_THREADS:libpthread
endef
define Package/perl/description
Perl is a stable, cross platform programming language.
It is used for mission critical projects in the public and private sectors
and is widely used to program web applications of all needs.
endef
define Package/perl/config
source "$(SOURCE)/Config.in"
endef
# Static host perl
define Host/Configure
( cd $(HOST_BUILD_DIR); ./Configure -der -Uusedl -Duserelocatableinc -Dprefix=$(HOST_PERL_PREFIX) $(if $(CONFIG_PERL_THREADS),-Dusethreads,))
endef
define Host/Install
( cd $(HOST_BUILD_DIR); ./miniperl installperl )
$(INSTALL_DIR) $(HOST_PERL_PREFIX)/bin/
$(CP) $(HOST_BUILD_DIR)/generate_uudmap $(HOST_PERL_PREFIX)/bin/
# Link any possibly installed static extension in
$(MAKE) -C $(HOST_BUILD_DIR)/relink clean || true
( cd $(HOST_BUILD_DIR)/relink && $(HOST_PERL_PREFIX)/bin/perl Makefile.PL )
$(call perlmod/host/relink,$(HOST_BUILD_DIR)/relink)
endef
# Target perl
define Build/Configure
$(PERL_CMD) files/perlconfig.pl -Dowrt:target_cc='$(TARGET_CC)' \
-Dowrt:target_cross='$(TARGET_CROSS)' \
-Dowrt:cflags='$(TARGET_CFLAGS_PERL) $(TARGET_CPPFLAGS_PERL)' \
-Dowrt:ldflags='-rdynamic $(TARGET_LDFLAGS)' \
-Dowrt:libc=$(CONFIG_LIBC) \
-Dowrt:ipv6=$(if $($(CONFIG_IPV6)),define,undef) \
-Dowrt:threads=$(if $(CONFIG_PERL_THREADS),yes,no) \
-Dowrt:staging_dir='$(STAGING_DIR)' \
-Dowrt:host_perl_prefix='$(HOST_PERL_PREFIX)' \
files/version.config \
files/base.config \
files/$(patsubst i386,i486,$(ARCH)).config \
files/architecture.config \
files/signal.config \
files/threads.config \
files/libc.config \
files/misc.config \
> $(PKG_BUILD_DIR)/config.sh
(cd $(PKG_BUILD_DIR) && ./Configure -S)
install -m 0644 $(PKG_BUILD_DIR)/config.h $(PKG_BUILD_DIR)/xconfig.h
endef
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/perl5/$(PERL_VERSION) $(1)/usr/lib/perl5/
endef
define Package/perl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/perl$(PKG_VERSION) $(1)/usr/bin
ln -nsf perl$(PKG_VERSION) $(1)/usr/bin/perl
$(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/CORE
$(CP) $(PKG_INSTALL_DIR)/usr/lib/perl5/$(PERL_VERSION)/CORE/libperl.so $(1)/usr/lib/perl5/$(PERL_VERSION)/CORE/
endef
$(eval $(call RequireCommand,rsync, \
$(PKG_NAME) requires rsync installed on the host-system. \
))
$(eval $(call BuildPackage,perl))
$(eval $(call HostBuild))
-include perlbase.mk
# A helper package that includes all sort of supplementary files for tests
define Package/perl-tests-common
$(call Package/perlbase-template)
TITLE:=Common test support files
DEPENDS:=@PERL_TESTS
endef
define Package/perl-tests-common/install
$(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)
$(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/Porting
$(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/regen
$(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/lib
$(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/XS
$(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/auto/XS
$(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/unicore
$(CP) $(PKG_BUILD_DIR)/t $(1)/$(PERL_TESTSDIR)
$(CP) $(PKG_BUILD_DIR)/Porting $(1)/$(PERL_TESTSDIR)
$(CP) $(PKG_BUILD_DIR)/regen $(1)/$(PERL_TESTSDIR)
$(CP) $(PKG_BUILD_DIR)/MANIFEST $(1)/$(PERL_TESTSDIR)
$(CP) $(PKG_BUILD_DIR)/TestInit.pm $(1)/$(PERL_TESTSDIR)
$(CP) $(PKG_BUILD_DIR)/vutil.c $(1)/$(PERL_TESTSDIR)
$(CP) $(PKG_BUILD_DIR)/vxs.inc $(1)/$(PERL_TESTSDIR)
$(CP) $(PKG_BUILD_DIR)/lib/XS $(1)/usr/lib/perl5/$(PERL_VERSION)/
$(CP) $(PKG_BUILD_DIR)/lib/auto/XS $(1)/usr/lib/perl5/$(PERL_VERSION)/auto
$(CP) $(PKG_BUILD_DIR)/lib/vmsish.pm $(1)/usr/lib/perl5/$(PERL_VERSION)/
$(CP) $(PKG_BUILD_DIR)/lib/vmsish.t $(1)/$(PERL_TESTSDIR)/lib
$(CP) $(PKG_BUILD_DIR)/lib/Internals.t $(1)/$(PERL_TESTSDIR)/lib
$(CP) $(PKG_BUILD_DIR)/lib/unicore/TestProp.pl $(1)/usr/lib/perl5/$(PERL_VERSION)/unicore
$(CP) files/perl-run_tests.sh $(1)/$(PERL_TESTSDIR)/run_tests.sh
sed \
-e 's!%%PERL_DISABLEDTESTS%%!$(PERL_DISABLEDTESTS)!' \
-e 's!%%PERL_VERSION%%!$(PERL_VERSION)!' \
-i $(1)/$(PERL_TESTSDIR)/run_tests.sh
$(CP) $(PKG_BUILD_DIR)/config_h.SH $(1)/$(PERL_TESTSDIR)
$(CP) $(PKG_BUILD_DIR)/perl.h $(1)/$(PERL_TESTSDIR)
endef
$(eval $(call BuildPackage,perl-tests-common))
The patches in this package are loosely sorted into the following categories:
0xx - Bugfixes
1xx - Cross-compile fixes
3xx - Workarounds
7xx - Testsuite fixes
Feel free to add another one if your new patch doesn't seem to fit into an
existing category.
\ No newline at end of file
-- Perl configuration --
Perl uses a huge configuration file, normally generated via the Configure script
at build-time. This fails when cross-compiling though, so we need to supply our
own.
We're using perlconfig.pl to piece together the final configuration from a bunch
of configuration files(all ending in .config). Please refer to perlconfig.pl's
POD for information on usage and syntax.
Throughout the files, you will see a bunch of references to private symbols with
the prefix "owrt". These are used to control output in an effort to both
simplify writing configuration files, as well as to provide switchable options
to select the feature set of the resulting perl installation.
The following will be a summary/quick reference of all private symbols we're
currently using:
Passed via architecture configuration file(mipsel.config, i486.config, ...)
---------------------------------------------------------------------------
Symbol Values Description
owrt:bits 32/64 Target's native word length.
owrt:endian little/big Target's endianness.
owrt:arch mipsel, i486, ... Target's architecture name.
owrt:sig_count 64/128 Number of signals the target
provides(NSIG - 1).
owrt:sigs * Symbolic names of the first 32 signals
this architecture provides, in numeric
order. Seperated by whitespaces.
owrt:sig_name_extra * Symbolic names of any additional signals
this architecture provides after
owrt:sig_count. Seperated by
whitespaces.
owrt:sig_num_extra * Numeric values associated with the
signal names provided in
owrt:sig_name_extra. Seperated by
whitespaces.
Passed via command line
-----------------------
Symbol Values Description
owrt:libc glibc/uclibc/musl Which C library implementation is in
use.
owrt:threads yes/no Whether to enable threading support.
owrt:ipv6 define/undef Whether to enable IPv6 support.
owrt:target_cross * Target architecture's host triplet.
owrt:target_cc * C compiler to use.
owrt:cflags * Additional C compiler flags.
owrt:ldflags * Additional linker flags.
owrt:staging_dir * Same as OpenWRT buildroot's
$(STAGING_DIR).
owrt:host_perl_prefix * host-perl installation prefix.
Passed via version.config
-------------------------
Symbol Values Description
owrt:perllibpath * Path to perl library files, from the
target's point of view.
alignbytes='8'
($owrt:bits eq '32') {
($owrt:endian eq 'little') {
byteorder='1234'
}
($owrt:endian eq 'big') {
byteorder='4321'
}
# Types
ivsize='4'
uvsize='4'
longsize='4'
longdblsize='8'
ptrsize='4'
#quadkind='3'
#doublekind='3'
#longdblkind='0'
i8type='signed char'
i16type='signed short'
i32type='signed long'
i64type='signed long long'
u32type='unsigned long'
u64type='unsigned long long'
quadtype='long long'
uquadtype='unsigned long long'
sizesize='4'
use64bitall='undef'
use64bitint='undef'
uidformat='"lu"'
gidformat='"lu"'
selectminbits='32'
sGMTIME_max='2147483647'
sGMTIME_min='-2147483648'
sLOCALTIME_max='2147483647'
sLOCALTIME_min='-2147483648'
sPRIi64='"Li"'
sPRIo64='"Lo"'
sPRIu64='"Lu"'
sPRIx64='"Lx"'
sPRId64='"Ld"'
netdb_host_type='const void *'
nv_preserves_uv_bits='32'
d_nv_preserves_uv='define'
d_printf_format_null='define'
d_u32align='undef'
}
($owrt:bits eq '64') {
($owrt:endian eq 'little') {
byteorder='12345678'
}
($owrt:endian eq 'big') {
byteorder='87654321'
}
# Types
ivsize='8'
uvsize='8'
longsize='8'
longdblsize='16'
ptrsize='8'
quadtype='long'
i16type='signed short'
i32type='signed int'
i64type='signed long'
i8type='signed char'
u32type='unsigned int'
u64type='unsigned long'
uquadtype='unsigned long'
sizesize='8'
uidformat='"u"'
gidformat='"u"'
selectminbits='64'
sGMTIME_max='67768036191676799'
sGMTIME_min='-62167219200'
sLOCALTIME_max='67768036191673199'
sLOCALTIME_min='-62167222408'
sPRIi64='"li"'
sPRIo64='"lo"'
sPRIu64='"lu"'
sPRIx64='"lx"'
sPRId64='"ld"'
netdb_host_type='char *'
nv_preserves_uv_bits='53'
d_nv_preserves_uv='undef'
d_printf_format_null='undef'
d_u32align='define'
use64bitall='define'
use64bitint='define'
}
# Only defined by i486 and x86_64. Provide defaults for all others
(!defined($sPRIEUldbl)) {
sPRIEUldbl='"E"'
sPRIFUldbl='"F"'
sPRIGUldbl='"G"'
sPRIXU64='"LX"'
sPRIeldbl='"e"'
sPRIfldbl='"f"'
sPRIgldbl='"g"'
sSCNfldbl='"f"'
}
owrt:arch=arm
owrt:bits=32
owrt:endian=little
ccsymbols='__ARM_ARCH_3__=1'
cppccsymbols=''
cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1'
d_casti32='define'
d_modflproto='undef'
doublekind='3'
fpossize='20'
longdblkind='0'
need_va_copy='undef'
quadkind='3'
owrt:sig_count='64'
owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS'
owrt:sig_name_extra='IOT CLD POLL UNUSED'
owrt:sig_num_extra='6 17 29 31'
owrt:arch=armeb
owrt:bits=32
owrt:endian=big
ccsymbols='__ARM_ARCH_3__=1'
cppccsymbols=''
cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1'
d_casti32='define'
d_modflproto='undef'
doublekind='4'
fpossize='20'
longdblkind='0'
need_va_copy='undef'
quadkind='3'
owrt:sig_count='64'
owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS'
owrt:sig_name_extra='IOT CLD POLL UNUSED'
owrt:sig_num_extra='6 17 29 31'
This diff is collapsed.
owrt:arch=i486
owrt:bits=32
owrt:endian=little
ccsymbols=''
cppccsymbols=''
cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 i386=1 __i386=1 __i386__=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1'
d_casti32='undef'
d_modflproto='define'
doublekind='3'
fpossize='20'
longdblkind='3'
need_va_copy='undef'
quadkind='3'
sPRIEUldbl='"LE"'
sPRIFUldbl='"LF"'
sPRIGUldbl='"LG"'
sPRIXU64='"LX"'
sPRIeldbl='"Le"'
sPRIfldbl='"Lf"'
sPRIgldbl='"Lg"'
sSCNfldbl='"Lf"'
owrt:sig_count='64'
owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS'
owrt:sig_name_extra='IOT CLD POLL UNUSED'
owrt:sig_num_extra='6 17 29 31'
($owrt:libc eq 'glibc') {
perllibs="$perllibs -lbsd"
ldflags="$ldflags -L$owrt:staging_dir/lib"
}
# uclibc does not provide crypt_r(). Enable crypt() usage for glibc builds only
($owrt:libc ne 'glibc') {
crypt_r_proto='0'
i_crypt='undef'
d_crypt='undef'
d_crypt_r='undef'
}
($owrt:libc eq 'musl') {
# musl does not provide a working setlocale(). It accepts arbitrary locales
# and makes them act as if they were C.UTF-8.
d_setlocale='undef'
d_stdio_ptr_lval='undef'
d_stdio_ptr_lval_sets_cnt='undef'
d_stdiobase='undef'
d_stdstdio='undef'
d_getnetbyname_r='undef'
d_getprotobyname_r='undef'
d_getpwent_r='undef'
d_getservent_r='undef'
d_gethostent_r='undef'
d_getnetent_r='undef'
d_getnetbyaddr_r='undef'
d_getprotoent_r='undef'
d_getprotobynumber_r='undef'
d_getgrent_r='undef'
getprotobyname_r='undef'
getpwent_r='undef'
getservent_r='undef'
gethostent_r='undef'
getnetent_r='undef'
getnetbyaddr_r='undef'
getprotoent_r='undef'
getprotobynumber_r='undef'
getgrent_r='undef'
i_fcntl='define'
h_fcntl='true'
d_strerror_r='undef'
}
owrt:arch=mips
owrt:bits=32
owrt:endian=big
ccsymbols=''
cppccsymbols=''
cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 LANGUAGE_C=1 _LANGUAGE_C=1 __LANGUAGE_C=1 __LANGUAGE_C__=1 _LARGEFILE_SOURCE=1 MIPSEL=1 _MIPSEL=1 __MIPSEL=1 __MIPSEL__=1 _MIPS_FPSET=16 _MIPS_ISA=_MIPS_ISA_MIPS1 _MIPS_SIM=1 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 __PIC__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 R3000=1 _R3000=1 __R3000=1 __R3000__=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 mips=1 _mips=1 __mips=1 __mips__=1 __pic__=1 unix=1 __unix=1 __unix__=1'
d_casti32='define'
d_modflproto='undef'
doublekind='4'
fpossize='24'
longdblkind='0'
need_va_copy='undef'
quadkind='3'
owrt:sig_count=128
owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ'
owrt:sig_name_extra='IOT CLD POLL'
owrt:sig_num_extra='6 18 22'
owrt:arch=mips64
owrt:bits=64
owrt:endian=big
ccsymbols=''
cppccsymbols=''
cppsymbols=''
d_casti32='define'
d_modflproto='undef'
doublekind='4'
fpossize='24'
longdblkind='6'
need_va_copy='define'
quadkind='2'
owrt:sig_count=128
owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ'
owrt:sig_name_extra='IOT CLD POLL'
owrt:sig_num_extra='6 18 22'
owrt:arch=mipsel
owrt:bits=32
owrt:endian=little
ccsymbols=''
cppccsymbols=''
cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 LANGUAGE_C=1 _LANGUAGE_C=1 __LANGUAGE_C=1 __LANGUAGE_C__=1 _LARGEFILE_SOURCE=1 MIPSEL=1 _MIPSEL=1 __MIPSEL=1 __MIPSEL__=1 _MIPS_FPSET=16 _MIPS_ISA=_MIPS_ISA_MIPS1 _MIPS_SIM=1 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 __PIC__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 R3000=1 _R3000=1 __R3000=1 __R3000__=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 mips=1 _mips=1 __mips=1 __mips__=1 __pic__=1 unix=1 __unix=1 __unix__=1'
d_casti32='define'
d_modflproto='undef'
doublekind='3'
fpossize='24'
longdblkind='0'
need_va_copy='undef'
quadkind='3'
owrt:sig_count=128
owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ'
owrt:sig_name_extra='IOT CLD POLL'
owrt:sig_num_extra='6 18 22'
cf_email='naoir@gmx.net'
osvers='3.18.19'
gccversion='4.8.0'
myhostname='OpenWrt'
cf_time='Thu Jan 1 12:00:00 CEST 2015'
perladmin="$cf_email"
archname="$owrt:arch-linux-$owrt:libc"
targetarch="$archname"
myarchname="$archname"
myuname="Linux $myhostname $osvers #1 SMP $cf_time @{[$owrt:arch =~ s/(el|eb)$//r]} GNU/Linux"
#!/bin/sh
PERL_TESTSDIR="/usr/share/perl/perl-tests"
PERL_LIBDIR="/usr/lib/perl5/%%PERL_VERSION%%/"
PERL_DISABLEDTESTS="%%PERL_DISABLEDTESTS%%"
no_run=""
manual_run=""
manual_run_no_base=""
while [ ! -z "$1" ]; do
case $1 in
-n)
no_run="yes"
;;
-m)
manual_run="yes"
;;
-mb)
manual_run="yes"
manual_run_no_base="yes"
;;
--help)
echo "run_tests.sh [-n|-m|-mb|--help]"
echo ""
echo "Options:"
echo " -n Just prepare the environment. Don't actually run any tests"
echo " -m Run tests manually according to MANIFEST, instead of whatever t/TEST chooses"
echo " -mb Don't run base tests. Implies -m"
echo " --help Print this help ;)"
echo ""
exit 0
;;
*)
echo "Invalid argument: $1"
;;
esac
shift
done
if [ ! -f "$PERL_TESTSDIR/__prepared" ]; then
# Many tests insist on having PERL5LIB in $PERL_TESTSDIR/lib. However,
# that directory may also contain tests. Some of them(FindBin.t in particular)
# also demand being located in a directory ending with "lib". So we can't do symlink
# trickery here.
# Our solution is to just copy PERL5LIB over.
if [ -d "$PERL_TESTSDIR/lib" ]; then
cp -a "$PERL_LIBDIR/"* "$PERL_TESTSDIR/lib/"
else
ln -s "$PERL_LIBDIR" "$PERL_TESTSDIR/lib"
fi
ln -s /usr/bin/perl "$PERL_TESTSDIR/perl"
ln -s /usr/bin/perl "$PERL_TESTSDIR/t/perl"
touch "$PERL_TESTSDIR/__prepared"
for i in $PERL_DISABLEDTESTS; do
echo "Disabling $i tests"
sed 's!^'$i'.*$!!' -i $PERL_TESTSDIR/MANIFEST
done
cat $PERL_TESTSDIR/MANIFEST | grep -v '^$' > $PERL_TESTSDIR/MANIFEST_NEW
rm $PERL_TESTSDIR/MANIFEST
mv $PERL_TESTSDIR/MANIFEST_NEW $PERL_TESTSDIR/MANIFEST
fi
if [ -z "$no_run" ]; then
cd "$PERL_TESTSDIR/t"
if [ ! -z "$manual_run" ]; then
for i in $(cat ../MANIFEST | sed 's/\t.*$//g' | grep '\.t$'); do
if [ ! -z "$manual_run_no_base" ] && [ ! -z "$(echo $i | grep '^t/')" ]; then
continue;
fi
echo "Running $i"
./TEST ../$i
echo ""
done
else
./perl TEST
fi
fi
#!/usr/bin/perl
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.