From 67bfd5395d70b8c76f84cd37702a22338837e4c4 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mar 28 2013 17:13:57 +0000 Subject: Add -largefile patch to get large file support. Add -aarch64 patch (bz 926565). --- diff --git a/sphinxbase-aarch64.patch b/sphinxbase-aarch64.patch new file mode 100644 index 0000000..f1a7134 --- /dev/null +++ b/sphinxbase-aarch64.patch @@ -0,0 +1,1140 @@ +--- ./config.guess.orig 2012-12-05 07:08:07.000000000 -0700 ++++ ./config.guess 2013-03-27 17:01:32.016272168 -0600 +@@ -1,10 +1,10 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +-# Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, ++# 2011, 2012 Free Software Foundation, Inc. + +-timestamp='2009-11-20' ++timestamp='2012-09-25' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -17,9 +17,7 @@ timestamp='2009-11-20' + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +-# 02110-1301, USA. ++# along with this program; if not, see . + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a +@@ -56,8 +54,9 @@ version="\ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 ++Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -144,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` | + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or +- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward +@@ -180,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + fi + ;; + *) +- os=netbsd ++ os=netbsd + ;; + esac + # The OS release +@@ -201,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; ++ *:Bitrig:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} ++ exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} +@@ -223,7 +226,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) +- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on +@@ -269,7 +272,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit ;; ++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. ++ exitcode=$? ++ trap '' 0 ++ exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead +@@ -295,12 +301,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) +- echo powerpc-ibm-os400 ++ echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; +- arm:riscos:*:*|arm:RISCOS:*:*) ++ arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) +@@ -394,23 +400,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} ++ echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} ++ echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) +- echo m68k-milan-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-milan-mint${UNAME_RELEASE} ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) +- echo m68k-hades-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-hades-mint${UNAME_RELEASE} ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) +- echo m68k-unknown-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-unknown-mint${UNAME_RELEASE} ++ exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; +@@ -480,8 +486,8 @@ EOF + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) +- # DG/UX returns AViiON for all architectures +- UNAME_PROCESSOR=`/usr/bin/uname -p` ++ # DG/UX returns AViiON for all architectures ++ UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ +@@ -494,7 +500,7 @@ EOF + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; +@@ -551,7 +557,7 @@ EOF + echo rs6000-ibm-aix3.2 + fi + exit ;; +- *:AIX:*:[456]) ++ *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 +@@ -594,52 +600,52 @@ EOF + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` +- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` +- case "${sc_cpu_version}" in +- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 +- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 +- 532) # CPU_PA_RISC2_0 +- case "${sc_kernel_bits}" in +- 32) HP_ARCH="hppa2.0n" ;; +- 64) HP_ARCH="hppa2.0w" ;; ++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ++ case "${sc_cpu_version}" in ++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ++ 532) # CPU_PA_RISC2_0 ++ case "${sc_kernel_bits}" in ++ 32) HP_ARCH="hppa2.0n" ;; ++ 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 +- esac ;; +- esac ++ esac ;; ++ esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c ++ sed 's/^ //' << EOF >$dummy.c + +- #define _HPUX_SOURCE +- #include +- #include ++ #define _HPUX_SOURCE ++ #include ++ #include + +- int main () +- { +- #if defined(_SC_KERNEL_BITS) +- long bits = sysconf(_SC_KERNEL_BITS); +- #endif +- long cpu = sysconf (_SC_CPU_VERSION); ++ int main () ++ { ++ #if defined(_SC_KERNEL_BITS) ++ long bits = sysconf(_SC_KERNEL_BITS); ++ #endif ++ long cpu = sysconf (_SC_CPU_VERSION); + +- switch (cpu) +- { +- case CPU_PA_RISC1_0: puts ("hppa1.0"); break; +- case CPU_PA_RISC1_1: puts ("hppa1.1"); break; +- case CPU_PA_RISC2_0: +- #if defined(_SC_KERNEL_BITS) +- switch (bits) +- { +- case 64: puts ("hppa2.0w"); break; +- case 32: puts ("hppa2.0n"); break; +- default: puts ("hppa2.0"); break; +- } break; +- #else /* !defined(_SC_KERNEL_BITS) */ +- puts ("hppa2.0"); break; +- #endif +- default: puts ("hppa1.0"); break; +- } +- exit (0); +- } ++ switch (cpu) ++ { ++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; ++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; ++ case CPU_PA_RISC2_0: ++ #if defined(_SC_KERNEL_BITS) ++ switch (bits) ++ { ++ case 64: puts ("hppa2.0w"); break; ++ case 32: puts ("hppa2.0n"); break; ++ default: puts ("hppa2.0"); break; ++ } break; ++ #else /* !defined(_SC_KERNEL_BITS) */ ++ puts ("hppa2.0"); break; ++ #endif ++ default: puts ("hppa1.0"); break; ++ } ++ exit (0); ++ } + EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa +@@ -730,22 +736,22 @@ EOF + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd +- exit ;; ++ exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit ;; ++ exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd +- exit ;; ++ exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd +- exit ;; ++ exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd +- exit ;; ++ exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; +@@ -769,14 +775,14 @@ EOF + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` +- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit ;; ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; + 5000:UNIX_System_V:4.*:*) +- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` +- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} +@@ -788,30 +794,35 @@ EOF + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) +- case ${UNAME_MACHINE} in +- pc98) +- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ UNAME_PROCESSOR=`/usr/bin/uname -p` ++ case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) +- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; ++ *:MINGW64*:*) ++ echo ${UNAME_MACHINE}-pc-mingw64 ++ exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; ++ i*:MSYS*:*) ++ echo ${UNAME_MACHINE}-pc-msys ++ exit ;; + i*:windows32*:*) +- # uname -m includes "-pc" on this system. +- echo ${UNAME_MACHINE}-mingw32 ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) +- case ${UNAME_MACHINE} in ++ case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; +@@ -857,6 +868,13 @@ EOF + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; ++ aarch64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ aarch64_be:Linux:*:*) ++ UNAME_MACHINE=aarch64_be ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +@@ -866,7 +884,7 @@ EOF + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; +- esac ++ esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} +@@ -878,20 +896,29 @@ EOF + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else +- echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_PCS_VFP ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf ++ fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) +- echo cris-axis-linux-gnu ++ echo ${UNAME_MACHINE}-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) +- echo crisv32-axis-linux-gnu ++ echo ${UNAME_MACHINE}-axis-linux-gnu + exit ;; + frv:Linux:*:*) +- echo frv-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ hexagon:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu +@@ -933,7 +960,7 @@ EOF + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) +- echo or32-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu +@@ -959,7 +986,7 @@ EOF + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +@@ -967,14 +994,17 @@ EOF + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; ++ tile*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) +- echo x86_64-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. +@@ -983,11 +1013,11 @@ EOF + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) +- # Unixware is an offshoot of SVR4, but it has its own version +- # number series starting with 2... +- # I am not positive that other SVR4 systems won't match this, ++ # Unixware is an offshoot of SVR4, but it has its own version ++ # number series starting with 2... ++ # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. +- # Use sysv4.2uw... so that sysv4* matches it. ++ # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) +@@ -1019,7 +1049,7 @@ EOF + fi + exit ;; + i*86:*:5:[678]*) +- # UnixWare 7.x, OpenUNIX and OpenServer 6. ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; +@@ -1047,13 +1077,13 @@ EOF + exit ;; + pc:*:*:*) + # Left here for compatibility: +- # uname -m prints for DJGPP always 'pc', but it prints nothing about +- # the processor, so we play safe by assuming i586. ++ # uname -m prints for DJGPP always 'pc', but it prints nothing about ++ # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp +- exit ;; ++ exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; +@@ -1088,8 +1118,8 @@ EOF + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) +- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && { echo i486-ncr-sysv4; exit; } ;; ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ +@@ -1132,10 +1162,10 @@ EOF + echo ns32k-sni-sysv + fi + exit ;; +- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort +- # says +- echo i586-unisys-sysv4 +- exit ;; ++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ++ # says ++ echo i586-unisys-sysv4 ++ exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm +@@ -1161,11 +1191,11 @@ EOF + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then +- echo mips-nec-sysv${UNAME_RELEASE} ++ echo mips-nec-sysv${UNAME_RELEASE} + else +- echo mips-unknown-sysv${UNAME_RELEASE} ++ echo mips-unknown-sysv${UNAME_RELEASE} + fi +- exit ;; ++ exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; +@@ -1178,6 +1208,9 @@ EOF + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; ++ x86_64:Haiku:*:*) ++ echo x86_64-unknown-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; +@@ -1230,7 +1263,10 @@ EOF + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; +- NSE-?:NONSTOP_KERNEL:*:*) ++ NEO-?:NONSTOP_KERNEL:*:*) ++ echo neo-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) +@@ -1275,13 +1311,13 @@ EOF + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) +- echo mips-sei-seiux${UNAME_RELEASE} ++ echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) +- UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; +@@ -1299,11 +1335,11 @@ EOF + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; ++ x86_64:VMkernel:*:*) ++ echo ${UNAME_MACHINE}-unknown-esx ++ exit ;; + esac + +-#echo '(No uname command or uname output not recognized.)' 1>&2 +-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +- + eval $set_cc_for_build + cat >$dummy.c < + printf ("m68k-sony-newsos%s\n", + #ifdef NEWSOS4 +- "4" ++ "4" + #else +- "" ++ "" + #endif +- ); exit (0); ++ ); exit (0); + #endif + #endif + +--- ./config.sub.orig 2012-12-05 07:08:07.000000000 -0700 ++++ ./config.sub 2013-03-27 17:01:32.017272166 -0600 +@@ -1,10 +1,10 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +-# Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, ++# 2011, 2012 Free Software Foundation, Inc. + +-timestamp='2009-11-20' ++timestamp='2012-10-10' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -21,9 +21,7 @@ timestamp='2009-11-20' + # 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, write to the Free Software +-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +-# 02110-1301, USA. ++# along with this program; if not, see . + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a +@@ -75,8 +73,9 @@ Report bugs and patches to infile, "rb")) == NULL) { + E_ERROR_SYSTEM("Failed to open %s", wtf->infile); +@@ -294,8 +294,8 @@ detect_sphinx_mfc(sphinx_wave2feat_t *wt + fclose(fh); + return -1; + } +- fseek(fh, 0, SEEK_END); +- flen = ftell(fh); ++ fseeko(fh, 0, SEEK_END); ++ flen = ftello(fh); + + /* figure out whether to byteswap */ + flen = (flen / 4) - 1; +@@ -304,7 +304,7 @@ detect_sphinx_mfc(sphinx_wave2feat_t *wt + SWAP_INT32(&len); + if (flen != len) { + SWAP_INT32(&len); +- E_ERROR("Mismatch in header/file lengths: 0x%08x vs 0x%08x\n", ++ E_ERROR("Mismatch in header/file lengths: 0x%08x vs 0x%08zx\n", + len, flen); + return -1; + } +@@ -314,7 +314,7 @@ detect_sphinx_mfc(sphinx_wave2feat_t *wt + ? "little" : "big")); + } + +- fseek(fh, 4, SEEK_SET); ++ fseeko(fh, 4, SEEK_SET); + wtf->infh = fh; + if (cmd_ln_boolean_r(wtf->config, "-spec2cep")) { + wtf->in_veclen = cmd_ln_int32_r(wtf->config, "-nfilt"); +@@ -917,7 +917,7 @@ sphinx_wave2feat_convert_file(sphinx_wav + } + + if (wtf->ot->output_header) { +- if (fseek(wtf->outfh, 0, SEEK_SET) < 0) { ++ if (fseeko(wtf->outfh, 0, SEEK_SET) < 0) { + E_ERROR_SYSTEM("Failed to seek to beginning of %s\n", outfile); + goto error_out; + } +@@ -1027,7 +1027,7 @@ run_control_file(sphinx_wave2feat_t *wtf + part = cmd_ln_int32_r(wtf->config, "-part"); + for (li = lineiter_start(ctlfh); li; li = lineiter_next(li)) + ++nlines; +- fseek(ctlfh, 0, SEEK_SET); ++ fseeko(ctlfh, 0, SEEK_SET); + partlen = nlines / npart; + nskip = partlen * (part - 1); + if (part == npart) +--- ./src/sphinx_adtools/sphinx_pitch.c.orig 2012-12-05 07:06:09.000000000 -0700 ++++ ./src/sphinx_adtools/sphinx_pitch.c 2013-03-28 08:03:12.205319946 -0600 +@@ -176,7 +176,7 @@ guess_file_type(char const *file, FILE * + { + char header[4]; + +- fseek(infh, 0, SEEK_SET); ++ fseeko(infh, 0, SEEK_SET); + if (fread(header, 1, 4, infh) != 4) { + E_ERROR_SYSTEM("Failed to read 4 byte header"); + return -1; +@@ -199,7 +199,7 @@ guess_file_type(char const *file, FILE * + cmd_ln_set_boolean("-nist", FALSE); + cmd_ln_set_boolean("-raw", TRUE); + } +- fseek(infh, 0, SEEK_SET); ++ fseeko(infh, 0, SEEK_SET); + return 0; + } + +@@ -282,7 +282,7 @@ read_riff_header(FILE *infh) + + /* Any extra parameters. */ + if (header_len > 16) +- fseek(infh, header_len - 16, SEEK_CUR); ++ fseeko(infh, header_len - 16, SEEK_CUR); + + /* Now skip to the 'data' chunk. */ + while (1) { +@@ -297,7 +297,7 @@ read_riff_header(FILE *infh) + /* Number of bytes of ... whatever */ + TRY_FREAD(&intval, 4, 1, infh); + if (WORDS_BIGENDIAN) SWAP_INT32(&intval); +- fseek(infh, intval, SEEK_CUR); ++ fseeko(infh, intval, SEEK_CUR); + } + } + +--- ./src/sphinx_cepview/main_cepview.c.orig 2012-12-13 02:01:21.000000000 -0700 ++++ ./src/sphinx_cepview/main_cepview.c 2013-03-27 17:15:48.227654656 -0600 +@@ -219,14 +219,14 @@ read_cep(char const *file, float ***cep, + + /* Check if n_float matches file size */ + byterev = FALSE; +- if ((int) (n_float * sizeof(float) + 4) != statbuf.st_size) { ++ if ((off_t) (n_float * sizeof(float) + 4) != statbuf.st_size) { + n = n_float; + SWAP_INT32(&n); + +- if ((int) (n * sizeof(float) + 4) != statbuf.st_size) { +- E_ERROR("Header size field: %d(%08x); filesize: %d(%08x)\n", +- n_float, n_float, (int) statbuf.st_size, +- (int) statbuf.st_size); ++ if ((off_t) (n * sizeof(float) + 4) != statbuf.st_size) { ++ E_ERROR("Header size field: %d(%08x); filesize: %zd(%08zx)\n", ++ n_float, n_float, statbuf.st_size, ++ statbuf.st_size); + fclose(fp); + return IO_ERR; + } +--- ./src/libsphinxbase/util/bio.c.orig 2012-12-05 07:06:08.000000000 -0700 ++++ ./src/libsphinxbase/util/bio.c 2013-03-28 07:54:31.943518377 -0600 +@@ -513,8 +513,9 @@ bio_read_wavfile(char const *directory, + { + FILE *uttfp; + char *inputfile; +- int32 n, l; ++ int32 l; + int16 *data; ++ off_t n; + + n = strlen(extension); + l = strlen(filename); +@@ -530,11 +531,11 @@ bio_read_wavfile(char const *directory, + if ((uttfp = fopen(inputfile, "rb")) == NULL) { + E_FATAL_SYSTEM("Failed to open file '%s' for reading", inputfile); + } +- fseek(uttfp, 0, SEEK_END); +- n = ftell(uttfp); +- fseek(uttfp, 0, SEEK_SET); ++ fseeko(uttfp, 0, SEEK_END); ++ n = ftello(uttfp); ++ fseeko(uttfp, 0, SEEK_SET); + if (header > 0) { +- if (fseek(uttfp, header, SEEK_SET) < 0) { ++ if (fseeko(uttfp, header, SEEK_SET) < 0) { + E_ERROR_SYSTEM("Failed to move to an offset %d in a file '%s'", header, inputfile); + fclose(uttfp); + ckd_free(inputfile); +@@ -545,7 +546,7 @@ bio_read_wavfile(char const *directory, + n /= sizeof(int16); + data = ckd_calloc(n, sizeof(*data)); + if ((l = fread(data, sizeof(int16), n, uttfp)) < n) { +- E_ERROR_SYSTEM("Failed to read %d samples from %s: %d", n, inputfile, l); ++ E_ERROR_SYSTEM("Failed to read %zd samples from %s: %d", n, inputfile, l); + ckd_free(data); + ckd_free(inputfile); + fclose(uttfp); +@@ -553,7 +554,7 @@ bio_read_wavfile(char const *directory, + } + ckd_free(inputfile); + fclose(uttfp); +- if (nsamps) *nsamps = n; ++ if (nsamps) *nsamps = (int32)n; + + return data; + } +--- ./src/libsphinxbase/util/logmath.c.orig 2012-12-05 07:06:08.000000000 -0700 ++++ ./src/libsphinxbase/util/logmath.c 2013-03-28 07:59:05.125888554 -0600 +@@ -168,7 +168,7 @@ logmath_read(const char *file_name) + int32 byteswap, i; + int chksum_present, do_mmap; + uint32 chksum; +- long pos; ++ off_t pos; + FILE *fp; + + E_INFO("Reading log table file '%s'\n", file_name); +@@ -228,9 +228,9 @@ logmath_read(const char *file_name) + + /* Check alignment constraints for memory mapping */ + do_mmap = 1; +- pos = ftell(fp); ++ pos = ftello(fp); + if (pos & ((long)lmath->t.width - 1)) { +- E_WARN("%s: Data start %ld is not aligned on %d-byte boundary, will not memory map\n", ++ E_WARN("%s: Data start %zd is not aligned on %d-byte boundary, will not memory map\n", + file_name, pos, lmath->t.width); + do_mmap = 0; + } +@@ -272,7 +272,7 @@ int32 + logmath_write(logmath_t *lmath, const char *file_name) + { + FILE *fp; +- long pos; ++ off_t pos; + uint32 chksum; + + if (lmath->t.table == NULL) { +@@ -293,7 +293,7 @@ logmath_write(logmath_t *lmath, const ch + fprintf(fp, "shift %d\n", lmath->t.shift); + fprintf(fp, "logbase %f\n", lmath->base); + /* Pad it out to ensure alignment. */ +- pos = ftell(fp) + strlen("endhdr\n"); ++ pos = ftello(fp) + strlen("endhdr\n"); + if (pos & ((long)lmath->t.width - 1)) { + size_t align = lmath->t.width - (pos & ((long)lmath->t.width - 1)); + assert(lmath->t.width <= 8); +--- ./src/libsphinxbase/util/pio.c.orig 2012-12-05 07:06:08.000000000 -0700 ++++ ./src/libsphinxbase/util/pio.c 2013-03-28 07:56:11.374292764 -0600 +@@ -464,7 +464,7 @@ stat_retry(const char *file, struct stat + } + + +-int32 ++time_t + stat_mtime(const char *file) + { + struct stat statbuf; +@@ -472,7 +472,7 @@ stat_mtime(const char *file) + if (stat_retry(file, &statbuf) != 0) + return -1; + +- return ((int32) statbuf.st_mtime); ++ return statbuf.st_mtime; + } + #else + #define STAT_RETRY_COUNT 10 +@@ -490,8 +490,8 @@ stat_retry(const char *file, struct stat + + if ((fp=(FILE *)fopen(file, "r"))!= 0) + { +- fseek( fp, 0, SEEK_END); +- statbuf->st_size = ftell( fp ); ++ fseeko( fp, 0, SEEK_END); ++ statbuf->st_size = ftello( fp ); + fclose(fp); + return 0; + } +@@ -511,7 +511,7 @@ stat_retry(const char *file, struct stat + return -1; + } + +-int32 ++time_t + stat_mtime(const char *file) + { + struct stat statbuf; +@@ -524,7 +524,7 @@ stat_mtime(const char *file) + return -1; + #endif /* HAVE_SYS_STAT_H */ + +- return ((int32) statbuf.st_mtime); ++ return statbuf.st_mtime; + } + #endif /* !_WIN32_WCE */ + +--- ./src/libsphinxbase/lm/ngram_model_dmp.c.orig 2012-12-13 02:01:21.000000000 -0700 ++++ ./src/libsphinxbase/lm/ngram_model_dmp.c 2013-03-28 08:01:33.901539198 -0600 +@@ -95,7 +95,7 @@ ngram_model_dmp_read(cmd_ln_t *config, + trigram_t *tgptr; + char *tmp_word_str; + char *map_base = NULL; +- size_t offset = 0; ++ off_t offset = 0; + + base = NULL; + do_mmap = FALSE; +@@ -243,7 +243,7 @@ ngram_model_dmp_read(cmd_ln_t *config, + + /* Now mmap() the file and read in the rest of the (read-only) stuff. */ + if (do_mmap) { +- offset = ftell(fp); ++ offset = ftello(fp); + + /* Check for improper word alignment. */ + if (offset & 0x3) { +@@ -320,7 +320,7 @@ ngram_model_dmp_read(cmd_ln_t *config, + if (n_bigram > 0) { + /* read n_prob2 and prob2 array (in memory) */ + if (do_mmap) +- fseek(fp, offset, SEEK_SET); ++ fseeko(fp, offset, SEEK_SET); + if (fread(&k, sizeof(k), 1, fp) != 1) + goto error_out; + if (do_swap) SWAP_INT32(&k); +@@ -381,7 +381,7 @@ ngram_model_dmp_read(cmd_ln_t *config, + + /* read tseg_base size and tseg_base */ + if (do_mmap) +- offset = ftell(fp); ++ offset = ftello(fp); + if (n_trigram > 0) { + if (do_mmap) { + memcpy(&k, map_base + offset, sizeof(k)); +@@ -753,7 +753,7 @@ static void + ngram_model_dmp_write_fmtdesc(FILE * fh) + { + int32 i, k; +- long pos; ++ off_t pos; + + /* Write file format description into header */ + for (i = 0; fmtdesc[i] != NULL; i++) { +@@ -762,7 +762,7 @@ ngram_model_dmp_write_fmtdesc(FILE * fh) + fwrite(fmtdesc[i], 1, k, fh); + } + /* Pad it out in order to achieve 32-bit alignment */ +- pos = ftell(fh); ++ pos = ftello(fh); + k = pos & 3; + if (k) { + fwrite_int32(fh, 4-k); +--- ./src/libsphinxbase/feat/feat.c.orig 2012-12-05 07:06:05.000000000 -0700 ++++ ./src/libsphinxbase/feat/feat.c 2013-03-27 17:17:47.787440142 -0600 +@@ -1041,13 +1041,13 @@ feat_s2mfc_read_norm_pad(feat_t *fcb, ch + + /* Check if n_float32 matches file size */ + byterev = 0; +- if ((int32) (n_float32 * sizeof(float32) + 4) != (int32) statbuf.st_size) { /* RAH, typecast both sides to remove compile warning */ ++ if ((off_t) (n_float32 * sizeof(float32) + 4) != statbuf.st_size) { + n = n_float32; + SWAP_INT32(&n); + +- if ((int32) (n * sizeof(float32) + 4) != (int32) (statbuf.st_size)) { /* RAH, typecast both sides to remove compile warning */ ++ if ((off_t) (n * sizeof(float32) + 4) != statbuf.st_size) { + E_ERROR +- ("%s: Header size field: %d(%08x); filesize: %d(%08x)\n", ++ ("%s: Header size field: %d(%08x); filesize: %zd(%08zx)\n", + file, n_float32, n_float32, statbuf.st_size, + statbuf.st_size); + fclose(fp); diff --git a/sphinxbase-python-file.patch b/sphinxbase-python-file.patch deleted file mode 100644 index 1befdc7..0000000 --- a/sphinxbase-python-file.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- python/sphinxbase.pxd.orig 2011-04-14 10:22:03.000000000 -0600 -+++ python/sphinxbase.pxd 2011-04-19 13:31:08.623275618 -0600 -@@ -20,6 +20,9 @@ - void PyMem_Free(void *p) - object PyString_FromStringAndSize(char *v, Py_ssize_t len) - -+cdef extern from "fileobject.h": -+ ctypedef class __builtin__.file [object PyFileObject]: pass -+ - cdef extern from "sphinxbase/logmath.h": - ctypedef struct logmath_t - logmath_t *logmath_init(float64 base, int shift, int use_table) diff --git a/sphinxbase-python.patch b/sphinxbase-python.patch deleted file mode 100644 index 329cdeb..0000000 --- a/sphinxbase-python.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- python/Makefile.in.orig 2011-04-14 10:41:24.000000000 -0600 -+++ python/Makefile.in 2011-04-19 12:18:56.094100879 -0600 -@@ -482,7 +482,7 @@ - @BUILD_PYTHON_TRUE@all-local: pymod-build-stamp - - @BUILD_PYTHON_TRUE@install-exec-local: pymod-build-stamp --@BUILD_PYTHON_TRUE@ $(PYTHON) setup.py install --prefix $(DESTDIR)$(prefix) $(SETUPTOOLS_CRAP) -+@BUILD_PYTHON_TRUE@ $(PYTHON) setup.py install --skip-build --root $(DESTDIR) $(SETUPTOOLS_CRAP) - - @BUILD_PYTHON_TRUE@uninstall-local: - @BUILD_PYTHON_TRUE@ $(PYTHON) setup.py bogus_uninstall --prefix $(DESTDIR)$(prefix) diff --git a/sphinxbase.spec b/sphinxbase.spec index 7ed4e92..5a97705 100644 --- a/sphinxbase.spec +++ b/sphinxbase.spec @@ -1,12 +1,16 @@ Name: sphinxbase Version: 0.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Common library for CMU Sphinx voice recognition products Group: Development/Libraries License: BSD URL: http://cmusphinx.sourceforge.net/ Source0: http://downloads.sourceforge.net/cmusphinx/%{name}-%{version}.tar.gz +# Sent upstream 28 Mar 2013. Enable large file support. +Patch0: %{name}-largefile.patch +# Sent upstream 28 Mar 2013. Enable building on aarch64. +Patch1: %{name}-aarch64.patch BuildRequires: bison BuildRequires: Cython @@ -54,6 +58,8 @@ Python 2 interface to sphinxbase. %prep %setup -q +%patch0 +%patch1 # Fix encoding iconv -f ISO8859-1 -t UTF-8 -o AUTHORS.new AUTHORS @@ -135,6 +141,10 @@ chmod 0755 $RPM_BUILD_ROOT%{python2_sitearch}/%{name}.so %{python2_sitearch}/* %changelog +* Thu Mar 28 2013 Jerry James - 0.8-3 +- Add -largefile patch to get large file support +- Add -aarch64 patch (bz 926565) + * Mon Feb 18 2013 Jerry James - 0.8-2 - Add perl(Pod::Usage) BR