diff --git a/.fmf/version b/.fmf/version
deleted file mode 100644
index d00491f..0000000
--- a/.fmf/version
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/.gitignore b/.gitignore
index 99a12dc..23a3bb0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,17 +1 @@
-/fribidi-0.19.7.tar.bz2
-/fribidi-1.0.1.tar.bz2
-/fribidi-1.0.2.tar.bz2
-/fribidi-1.0.3.tar.bz2
-/fribidi-1.0.4.tar.bz2
-/fribidi-1.0.5.tar.bz2
-/fribidi-1.0.6.tar.gz
-/fribidi-1.0.7.tar.bz2
-/fribidi-1.0.8.tar.bz2
-/fribidi-1.0.9.tar.xz
-/fribidi-1.0.10.tar.xz
-/fribidi-1.0.11.tar.xz
-/fribidi-1.0.12.tar.xz
-/fribidi-1.0.13.tar.xz
-/fribidi-1.0.14.tar.xz
-/fribidi-1.0.15.tar.xz
-/fribidi-1.0.16.tar.xz
+/fribidi-0.19.4.tar.bz2
diff --git a/fribidi-aarch64.patch b/fribidi-aarch64.patch
new file mode 100644
index 0000000..c91047e
--- /dev/null
+++ b/fribidi-aarch64.patch
@@ -0,0 +1,1348 @@
+diff -urN fribidi-0.19.4/config.guess fribidi-0.19.4-aarch64/config.guess
+--- fribidi-0.19.4/config.guess 2012-08-25 16:40:38.000000000 -0500
++++ fribidi-0.19.4-aarch64/config.guess 2013-03-03 04:48:11.611623841 -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-06-10'
++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 @@
+ # 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
+@@ -27,16 +25,16 @@
+ # the same distribution terms that you use for the rest of that program.
+
+
+-# Originally written by Per Bothner .
+-# Please send patches to . Submit a context
+-# diff and a properly formatted ChangeLog entry.
++# Originally written by Per Bothner. Please send patches (context
++# diff format) to and include a ChangeLog
++# entry.
+ #
+ # This script attempts to guess a canonical system name similar to
+ # config.sub. If it succeeds, it prints the system name on stdout, and
+ # exits with 0. Otherwise, it exits with 1.
+ #
+-# The plan is that this can be called by configure scripts if you
+-# don't specify an explicit build system type.
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+ me=`echo "$0" | sed -e 's,.*/,,'`
+
+@@ -56,8 +54,9 @@
+ 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 @@
+ 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 @@
+ fi
+ ;;
+ *)
+- os=netbsd
++ os=netbsd
+ ;;
+ esac
+ # The OS release
+@@ -201,6 +200,10 @@
+ # 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 @@
+ 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 @@
+ # 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 @@
+ 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:*:*)
+@@ -333,6 +339,9 @@
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
++ echo i386-pc-auroraux${UNAME_RELEASE}
++ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+@@ -391,23 +400,23 @@
+ # 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 ;;
+@@ -477,8 +486,8 @@
+ 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 ] || \
+@@ -491,7 +500,7 @@
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+- exit ;;
++ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+@@ -548,7 +557,7 @@
+ 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
+@@ -591,52 +600,52 @@
+ 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
++
++ int main ()
++ {
++ #if defined(_SC_KERNEL_BITS)
++ long bits = sysconf(_SC_KERNEL_BITS);
++ #endif
++ long cpu = sysconf (_SC_CPU_VERSION);
+
+- #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);
+-
+- 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
+@@ -727,22 +736,22 @@
+ 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 ;;
+@@ -766,14 +775,14 @@
+ 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}
+@@ -785,34 +794,39 @@
+ 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*:[3456]*)
+- case ${UNAME_MACHINE} in
++ *:Interix*:*)
++ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+- EM64T | authenticamd | genuineintel)
++ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+@@ -854,6 +868,27 @@
+ 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 ;;
++ EV56) UNAME_MACHINE=alphaev56 ;;
++ PCA56) UNAME_MACHINE=alphapca56 ;;
++ PCA57) UNAME_MACHINE=alphapca56 ;;
++ EV6) UNAME_MACHINE=alphaev6 ;;
++ EV67) UNAME_MACHINE=alphaev67 ;;
++ EV68*) UNAME_MACHINE=alphaev68 ;;
++ 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}
++ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+@@ -861,20 +896,40 @@
+ 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
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #ifdef __dietlibc__
++ LIBC=dietlibc
++ #endif
++EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+@@ -901,39 +956,18 @@
+ #endif
+ #endif
+ EOF
+- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+- /^CPU/{
+- s: ::g
+- p
+- }'`"
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+- echo or32-unknown-linux-gnu
+- exit ;;
+- ppc:Linux:*:*)
+- echo powerpc-unknown-linux-gnu
+- exit ;;
+- ppc64:Linux:*:*)
+- echo powerpc64-unknown-linux-gnu
+- exit ;;
+- alpha:Linux:*:*)
+- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+- EV5) UNAME_MACHINE=alphaev5 ;;
+- EV56) UNAME_MACHINE=alphaev56 ;;
+- PCA56) UNAME_MACHINE=alphapca56 ;;
+- PCA57) UNAME_MACHINE=alphapca56 ;;
+- EV6) UNAME_MACHINE=alphaev6 ;;
+- EV67) UNAME_MACHINE=alphaev67 ;;
+- EV68*) UNAME_MACHINE=alphaev68 ;;
+- 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}
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
++ parisc64:Linux:*:* | hppa64:Linux:*:*)
++ echo hppa64-unknown-linux-gnu
++ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+@@ -942,14 +976,17 @@
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+- parisc64:Linux:*:* | hppa64:Linux:*:*)
+- echo hppa64-unknown-linux-gnu
++ ppc64:Linux:*:*)
++ echo powerpc64-unknown-linux-gnu
++ exit ;;
++ ppc:Linux:*:*)
++ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ 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
+@@ -957,67 +994,18 @@
+ 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:Linux:*:*)
+- # The BFD linker knows what the default object file format is, so
+- # first see if it will tell us. cd to the root directory to prevent
+- # problems with other programs or directories called `ld' in the path.
+- # Set LC_ALL=C to ensure ld outputs messages in English.
+- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+- | sed -ne '/supported targets:/!d
+- s/[ ][ ]*/ /g
+- s/.*supported targets: *//
+- s/ .*//
+- p'`
+- case "$ld_supported_targets" in
+- elf32-i386)
+- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+- ;;
+- esac
+- # Determine whether the default compiler is a.out or elf
+- eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
+- #include
+- #ifdef __ELF__
+- # ifdef __GLIBC__
+- # if __GLIBC__ >= 2
+- LIBC=gnu
+- # else
+- LIBC=gnulibc1
+- # endif
+- # else
+- LIBC=gnulibc1
+- # endif
+- #else
+- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+- LIBC=gnu
+- #else
+- LIBC=gnuaout
+- #endif
+- #endif
+- #ifdef __dietlibc__
+- LIBC=dietlibc
+- #endif
+-EOF
+- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+- /^LIBC/{
+- s: ::g
+- p
+- }'`"
+- test x"${LIBC}" != x && {
+- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+- exit
+- }
+- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+- ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+@@ -1025,11 +1013,11 @@
+ 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:*:*)
+@@ -1061,7 +1049,7 @@
+ 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 ;;
+@@ -1089,13 +1077,13 @@
+ 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 ;;
+@@ -1130,8 +1118,8 @@
+ /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 \
+@@ -1174,10 +1162,10 @@
+ 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
+@@ -1203,11 +1191,11 @@
+ 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 ;;
+@@ -1220,6 +1208,9 @@
+ 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 ;;
+@@ -1247,6 +1238,16 @@
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
++ i386)
++ eval $set_cc_for_build
++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
++ then
++ UNAME_PROCESSOR="x86_64"
++ fi
++ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+@@ -1262,7 +1263,10 @@
+ *: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:*:*)
+@@ -1307,13 +1311,13 @@
+ 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 ;;
+@@ -1331,11 +1335,11 @@
+ 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
+
+diff -urN fribidi-0.19.4/config.sub fribidi-0.19.4-aarch64/config.sub
+--- fribidi-0.19.4/config.sub 2012-08-25 16:40:38.000000000 -0500
++++ fribidi-0.19.4-aarch64/config.sub 2013-03-03 04:48:11.659618287 -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-06-11'
++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 @@
+ # 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
+@@ -32,13 +30,16 @@
+
+
+ # Please send patches to . Submit a context
+-# diff and a properly formatted ChangeLog entry.
++# diff and a properly formatted GNU ChangeLog entry.
+ #
+ # Configuration subroutine to validate and canonicalize a configuration type.
+ # Supply the specified configuration type as an argument.
+ # If it is invalid, we print an error message on stderr and exit with code 1.
+ # Otherwise, we print the canonical config type on stdout and succeed.
+
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
++
+ # This file is supposed to be the same for all GNU packages
+ # and recognize all the CPU types, system types and aliases
+ # that are meaningful with *any* GNU software.
+@@ -72,8 +73,9 @@
+ version="\
+ GNU config.sub ($timestamp)
+
+-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."
+@@ -120,13 +122,18 @@
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
++ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
++ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
++ android-linux)
++ os=-linux-android
++ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
++ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+@@ -149,12 +156,12 @@
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+- -apple | -axis | -knuth | -cray)
++ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+- -bluegene*)
+- os=-cnk
++ -bluegene*)
++ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+@@ -170,10 +177,10 @@
+ os=-chorusos
+ basic_machine=$1
+ ;;
+- -chorusrdb)
+- os=-chorusrdb
++ -chorusrdb)
++ os=-chorusrdb
+ basic_machine=$1
+- ;;
++ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+@@ -218,6 +225,12 @@
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
++ -lynx*178)
++ os=-lynxos178
++ ;;
++ -lynx*5)
++ os=-lynxos5
++ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+@@ -242,20 +255,25 @@
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
++ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
++ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
++ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
++ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
++ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+- | maxq | mb | microblaze | mcore | mep | metag \
++ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+@@ -278,27 +296,39 @@
+ | moxie \
+ | mt \
+ | msp430 \
++ | nds32 | nds32le | nds32be \
+ | nios | nios2 \
+ | ns16k | ns32k \
++ | open8 \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
++ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
++ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+- | spu | strongarm \
+- | tahoe | thumb | tic4x | tic80 | tron \
+- | v850 | v850e \
++ | spu \
++ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
++ | ubicom32 \
++ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
++ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+- m6811 | m68hc11 | m6812 | m68hc12)
+- # Motorola 68HC11/12.
++ c54x)
++ basic_machine=tic54x-unknown
++ ;;
++ c55x)
++ basic_machine=tic55x-unknown
++ ;;
++ c6x)
++ basic_machine=tic6x-unknown
++ ;;
++ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+@@ -308,6 +338,21 @@
+ basic_machine=mt-unknown
+ ;;
+
++ strongarm | thumb | xscale)
++ basic_machine=arm-unknown
++ ;;
++ xgate)
++ basic_machine=$basic_machine-unknown
++ os=-none
++ ;;
++ xscaleeb)
++ basic_machine=armeb-unknown
++ ;;
++
++ xscaleel)
++ basic_machine=armel-unknown
++ ;;
++
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+@@ -322,25 +367,30 @@
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
++ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
++ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
++ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
++ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
++ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
++ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+@@ -362,24 +412,29 @@
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
++ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
++ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+- | romp-* | rs6000-* \
++ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+- | tahoe-* | thumb-* \
+- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
++ | tahoe-* \
++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++ | tile*-* \
+ | tron-* \
+- | v850-* | v850e-* | vax-* \
++ | ubicom32-* \
++ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
++ | vax-* \
+ | we32k-* \
+- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+@@ -404,7 +459,7 @@
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+- abacus)
++ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+@@ -474,11 +529,20 @@
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
++ c54x-*)
++ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ c55x-*)
++ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ c6x-*)
++ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+- cegcc)
++ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+@@ -510,7 +574,7 @@
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+- cr16)
++ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+@@ -668,7 +732,6 @@
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+@@ -726,6 +789,13 @@
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
++ microblaze*)
++ basic_machine=microblaze-xilinx
++ ;;
++ mingw64)
++ basic_machine=x86_64-pc
++ os=-mingw64
++ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+@@ -762,10 +832,18 @@
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
++ msys)
++ basic_machine=i386-pc
++ os=-msys
++ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
++ nacl)
++ basic_machine=le32-unknown
++ os=-nacl
++ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+@@ -830,6 +908,12 @@
+ np1)
+ basic_machine=np1-gould
+ ;;
++ neo-tandem)
++ basic_machine=neo-tandem
++ ;;
++ nse-tandem)
++ basic_machine=nse-tandem
++ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+@@ -912,9 +996,10 @@
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+- ppc) basic_machine=powerpc-unknown
++ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ppc-* | ppcbe-*)
++ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+@@ -1008,6 +1093,9 @@
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
++ strongarm-* | thumb-*)
++ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+@@ -1064,20 +1152,8 @@
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+- tic54x | c54x*)
+- basic_machine=tic54x-unknown
+- os=-coff
+- ;;
+- tic55x | c55x*)
+- basic_machine=tic55x-unknown
+- os=-coff
+- ;;
+- tic6x | c6x*)
+- basic_machine=tic6x-unknown
+- os=-coff
+- ;;
+ tile*)
+- basic_machine=tile-unknown
++ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+@@ -1147,6 +1223,9 @@
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
++ xscale-* | xscalee[bl]-*)
++ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
++ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+@@ -1244,9 +1323,12 @@
+ if [ x"$os" != x"" ]
+ then
+ case $os in
+- # First match some system type aliases
+- # that might get confused with valid system types.
++ # First match some system type aliases
++ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
++ -auroraux)
++ os=-auroraux
++ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+@@ -1268,21 +1350,22 @@
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+- | -kopensolaris* \
++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
++ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+- | -openbsd* | -solidbsd* \
++ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
++ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
++ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
++ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+@@ -1290,7 +1373,7 @@
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+@@ -1329,7 +1412,7 @@
+ -opened*)
+ os=-openedition
+ ;;
+- -os400*)
++ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+@@ -1378,7 +1461,7 @@
+ -sinix*)
+ os=-sysv4
+ ;;
+- -tpf*)
++ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+@@ -1423,6 +1506,8 @@
+ -dicos*)
+ os=-dicos
+ ;;
++ -nacl*)
++ ;;
+ -none)
+ ;;
+ *)
+@@ -1445,10 +1530,10 @@
+ # system, and we'll never get to this point.
+
+ case $basic_machine in
+- score-*)
++ score-*)
+ os=-elf
+ ;;
+- spu-*)
++ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+@@ -1460,8 +1545,20 @@
+ arm*-semi)
+ os=-aout
+ ;;
+- c4x-* | tic4x-*)
+- os=-coff
++ c4x-* | tic4x-*)
++ os=-coff
++ ;;
++ hexagon-*)
++ os=-elf
++ ;;
++ tic54x-*)
++ os=-coff
++ ;;
++ tic55x-*)
++ os=-coff
++ ;;
++ tic6x-*)
++ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+@@ -1481,14 +1578,11 @@
+ ;;
+ m68000-sun)
+ os=-sunos3
+- # This also exists in the configure program, but was not the
+- # default.
+- # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+- mep-*)
++ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+@@ -1515,7 +1609,7 @@
+ *-ibm)
+ os=-aix
+ ;;
+- *-knuth)
++ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
diff --git a/fribidi-drop-bundled-gnulib.patch b/fribidi-drop-bundled-gnulib.patch
deleted file mode 100644
index 1315922..0000000
--- a/fribidi-drop-bundled-gnulib.patch
+++ /dev/null
@@ -1,1873 +0,0 @@
-diff -pruN fribidi-1.0.14.orig/bin/Makefile.am fribidi-1.0.14/bin/Makefile.am
---- fribidi-1.0.14.orig/bin/Makefile.am 2020-07-06 04:17:23.000000000 +0900
-+++ fribidi-1.0.14/bin/Makefile.am 2024-05-07 21:40:04.500166714 +0900
-@@ -2,11 +2,9 @@ bin_PROGRAMS = fribidi
-
- noinst_PROGRAMS = fribidi-benchmark fribidi-bidi-types fribidi-caprtl2utf8
-
--getopt_SOURCES = getopt.c getopt1.c getopt_int.h getopt.h gettext.h
-+fribidi_SOURCES = fribidi-main.c
-
--fribidi_SOURCES = fribidi-main.c $(getopt_SOURCES)
--
--fribidi_benchmark_SOURCES = fribidi-benchmark.c $(getopt_SOURCES)
-+fribidi_benchmark_SOURCES = fribidi-benchmark.c
-
- AM_CPPFLAGS = \
- @FRIBIDI_CPPFLAGS@ \
-diff -pruN fribidi-1.0.14.orig/bin/getopt.c fribidi-1.0.14/bin/getopt.c
---- fribidi-1.0.14.orig/bin/getopt.c 2015-08-05 03:49:07.000000000 +0900
-+++ fribidi-1.0.14/bin/getopt.c 1970-01-01 09:00:00.000000000 +0900
-@@ -1,1268 +0,0 @@
--/* Getopt for GNU.
-- NOTE: getopt is now part of the C library, so if you don't know what
-- "Keep this file name-space clean" means, talk to drepper@gnu.org
-- before changing it!
-- Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004
-- Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- 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 2, 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, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA. */
--
--/* This tells Alpha OSF/1 not to define a getopt prototype in .
-- Ditto for AIX 3.2 and . */
--#ifndef _NO_PROTO
--# define _NO_PROTO
--#endif
--
--#ifdef HAVE_CONFIG_H
--# include
--#endif
--
--#include
--
--/* Comment out all this code if we are using the GNU C Library, and are not
-- actually compiling the library itself. This code is part of the GNU C
-- Library, but also included in many other GNU distributions. Compiling
-- and linking in this code is a waste when using the GNU C library
-- (especially if it is a shared library). Rather than having every GNU
-- program understand `configure --with-gnu-libc' and omit the object files,
-- it is simpler to just do this in the source for each such file. */
--
--#define GETOPT_INTERFACE_VERSION 2
--#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
--# include
--# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
--# define ELIDE_CODE
--# endif
--#endif
--
--#ifndef ELIDE_CODE
--
--
--/* This needs to come after some library #include
-- to get __GNU_LIBRARY__ defined. */
--#ifdef __GNU_LIBRARY__
--/* Don't include stdlib.h for non-GNU C libraries because some of them
-- contain conflicting prototypes for getopt. */
--# include
--# include
--#endif /* GNU C library. */
--
--#include
--
--#ifdef VMS
--# include
--#endif
--
--#ifdef _LIBC
--# include
--#else
--# include "gettext.h"
--# define _(msgid) gettext (msgid)
--#endif
--
--#if defined _LIBC && defined USE_IN_LIBIO
--# include
--#endif
--
--#ifndef attribute_hidden
--# define attribute_hidden
--#endif
--
--/* This version of `getopt' appears to the caller like standard Unix `getopt'
-- but it behaves differently for the user, since it allows the user
-- to intersperse the options with the other arguments.
--
-- As `getopt' works, it permutes the elements of ARGV so that,
-- when it is done, all the options precede everything else. Thus
-- all application programs are extended to handle flexible argument order.
--
-- Setting the environment variable POSIXLY_CORRECT disables permutation.
-- Then the behavior is completely standard.
--
-- GNU application programs can use a third alternative mode in which
-- they can distinguish the relative order of options and other arguments. */
--
--#include "getopt.h"
--#include "getopt_int.h"
--
--/* For communication from `getopt' to the caller.
-- When `getopt' finds an option that takes an argument,
-- the argument value is returned here.
-- Also, when `ordering' is RETURN_IN_ORDER,
-- each non-option ARGV-element is returned here. */
--
--char *optarg;
--
--/* Index in ARGV of the next element to be scanned.
-- This is used for communication to and from the caller
-- and for communication between successive calls to `getopt'.
--
-- On entry to `getopt', zero means this is the first call; initialize.
--
-- When `getopt' returns -1, this is the index of the first of the
-- non-option elements that the caller should itself scan.
--
-- Otherwise, `optind' communicates from one call to the next
-- how much of ARGV has been scanned so far. */
--
--/* 1003.2 says this must be 1 before any call. */
--int optind = 1;
--
--/* Callers store zero here to inhibit the error message
-- for unrecognized options. */
--
--int opterr = 1;
--
--/* Set to an option character which was unrecognized.
-- This must be initialized on some systems to avoid linking in the
-- system's own getopt implementation. */
--
--int optopt = '?';
--
--/* Keep a global copy of all internal members of getopt_data. */
--
--static struct _getopt_data getopt_data;
--
--
--#ifndef __GNU_LIBRARY__
--
--/* Avoid depending on library functions or files
-- whose names are inconsistent. */
--
--#ifndef getenv
--extern char *getenv (
--);
--#endif
--
--#endif /* not __GNU_LIBRARY__ */
--
--#ifdef _LIBC
--/* Stored original parameters.
-- XXX This is no good solution. We should rather copy the args so
-- that we can compare them later. But we must not use malloc(3). */
--extern int __libc_argc;
--extern char **__libc_argv;
--
--/* Bash 2.0 gives us an environment variable containing flags
-- indicating ARGV elements that should not be considered arguments. */
--
--# ifdef USE_NONOPTION_FLAGS
--/* Defined in getopt_init.c */
--extern char *__getopt_nonoption_flags;
--# endif
--
--# ifdef USE_NONOPTION_FLAGS
--# define SWAP_FLAGS(ch1, ch2) \
-- if (d->__nonoption_flags_len > 0) \
-- { \
-- char __tmp = __getopt_nonoption_flags[ch1]; \
-- __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
-- __getopt_nonoption_flags[ch2] = __tmp; \
-- }
--# else
--# define SWAP_FLAGS(ch1, ch2)
--# endif
--#else /* !_LIBC */
--# define SWAP_FLAGS(ch1, ch2)
--#endif /* _LIBC */
--
--/* Exchange two adjacent subsequences of ARGV.
-- One subsequence is elements [first_nonopt,last_nonopt)
-- which contains all the non-options that have been skipped so far.
-- The other is elements [last_nonopt,optind), which contains all
-- the options processed since those non-options were skipped.
--
-- `first_nonopt' and `last_nonopt' are relocated so that they describe
-- the new indices of the non-options in ARGV after they are moved. */
--
--static void
--exchange (
-- char **argv,
-- struct _getopt_data *d
--)
--{
-- int bottom = d->__first_nonopt;
-- int middle = d->__last_nonopt;
-- int top = d->optind;
-- char *tem;
--
-- /* Exchange the shorter segment with the far end of the longer segment.
-- That puts the shorter segment into the right place.
-- It leaves the longer segment in the right place overall,
-- but it consists of two parts that need to be swapped next. */
--
--#if defined _LIBC && defined USE_NONOPTION_FLAGS
-- /* First make sure the handling of the `__getopt_nonoption_flags'
-- string can work normally. Our top argument must be in the range
-- of the string. */
-- if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
-- {
-- /* We must extend the array. The user plays games with us and
-- presents new arguments. */
-- char *new_str = malloc (top + 1);
-- if (new_str == NULL)
-- d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
-- else
-- {
-- memset (__mempcpy (new_str, __getopt_nonoption_flags,
-- d->__nonoption_flags_max_len),
-- '\0', top + 1 - d->__nonoption_flags_max_len);
-- d->__nonoption_flags_max_len = top + 1;
-- __getopt_nonoption_flags = new_str;
-- }
-- }
--#endif
--
-- while (top > middle && middle > bottom)
-- {
-- if (top - middle > middle - bottom)
-- {
-- /* Bottom segment is the short one. */
-- int len = middle - bottom;
-- register int i;
--
-- /* Swap it with the top part of the top segment. */
-- for (i = 0; i < len; i++)
-- {
-- tem = argv[bottom + i];
-- argv[bottom + i] = argv[top - (middle - bottom) + i];
-- argv[top - (middle - bottom) + i] = tem;
-- SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
-- }
-- /* Exclude the moved bottom segment from further swapping. */
-- top -= len;
-- }
-- else
-- {
-- /* Top segment is the short one. */
-- int len = top - middle;
-- register int i;
--
-- /* Swap it with the bottom part of the bottom segment. */
-- for (i = 0; i < len; i++)
-- {
-- tem = argv[bottom + i];
-- argv[bottom + i] = argv[middle + i];
-- argv[middle + i] = tem;
-- SWAP_FLAGS (bottom + i, middle + i);
-- }
-- /* Exclude the moved top segment from further swapping. */
-- bottom += len;
-- }
-- }
--
-- /* Update records for the slots the non-options now occupy. */
--
-- d->__first_nonopt += (d->optind - d->__last_nonopt);
-- d->__last_nonopt = d->optind;
--}
--
--/* Initialize the internal data when the first call is made. */
--
--static const char *
--_getopt_initialize (
-- int argc,
-- char *const *argv,
-- const char *optstring,
-- struct _getopt_data *d
--)
--{
-- /* Start processing options with ARGV-element 1 (since ARGV-element 0
-- is the program name); the sequence of previously skipped
-- non-option ARGV-elements is empty. */
--
-- d->__first_nonopt = d->__last_nonopt = d->optind;
--
-- d->__nextchar = NULL;
--
-- d->__posixly_correct = !!getenv ("POSIXLY_CORRECT");
--
-- /* Determine how to handle the ordering of options and nonoptions. */
--
-- if (optstring[0] == '-')
-- {
-- d->__ordering = RETURN_IN_ORDER;
-- ++optstring;
-- }
-- else if (optstring[0] == '+')
-- {
-- d->__ordering = REQUIRE_ORDER;
-- ++optstring;
-- }
-- else if (d->__posixly_correct)
-- d->__ordering = REQUIRE_ORDER;
-- else
-- d->__ordering = PERMUTE;
--
--#if defined _LIBC && defined USE_NONOPTION_FLAGS
-- if (!d->__posixly_correct && argc == __libc_argc && argv == __libc_argv)
-- {
-- if (d->__nonoption_flags_max_len == 0)
-- {
-- if (__getopt_nonoption_flags == NULL
-- || __getopt_nonoption_flags[0] == '\0')
-- d->__nonoption_flags_max_len = -1;
-- else
-- {
-- const char *orig_str = __getopt_nonoption_flags;
-- int len = d->__nonoption_flags_max_len = strlen (orig_str);
-- if (d->__nonoption_flags_max_len < argc)
-- d->__nonoption_flags_max_len = argc;
-- __getopt_nonoption_flags =
-- (char *) malloc (d->__nonoption_flags_max_len);
-- if (__getopt_nonoption_flags == NULL)
-- d->__nonoption_flags_max_len = -1;
-- else
-- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
-- '\0', d->__nonoption_flags_max_len - len);
-- }
-- }
-- d->__nonoption_flags_len = d->__nonoption_flags_max_len;
-- }
-- else
-- d->__nonoption_flags_len = 0;
--#endif
--
-- return optstring;
--}
--
--/* Scan elements of ARGV (whose length is ARGC) for option characters
-- given in OPTSTRING.
--
-- If an element of ARGV starts with '-', and is not exactly "-" or "--",
-- then it is an option element. The characters of this element
-- (aside from the initial '-') are option characters. If `getopt'
-- is called repeatedly, it returns successively each of the option characters
-- from each of the option elements.
--
-- If `getopt' finds another option character, it returns that character,
-- updating `optind' and `nextchar' so that the next call to `getopt' can
-- resume the scan with the following option character or ARGV-element.
--
-- If there are no more option characters, `getopt' returns -1.
-- Then `optind' is the index in ARGV of the first ARGV-element
-- that is not an option. (The ARGV-elements have been permuted
-- so that those that are not options now come last.)
--
-- OPTSTRING is a string containing the legitimate option characters.
-- If an option character is seen that is not listed in OPTSTRING,
-- return '?' after printing an error message. If you set `opterr' to
-- zero, the error message is suppressed but we still return '?'.
--
-- If a char in OPTSTRING is followed by a colon, that means it wants an arg,
-- so the following text in the same ARGV-element, or the text of the following
-- ARGV-element, is returned in `optarg'. Two colons mean an option that
-- wants an optional arg; if there is text in the current ARGV-element,
-- it is returned in `optarg', otherwise `optarg' is set to zero.
--
-- If OPTSTRING starts with `-' or `+', it requests different methods of
-- handling the non-option ARGV-elements.
-- See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
--
-- Long-named options begin with `--' instead of `-'.
-- Their names may be abbreviated as long as the abbreviation is unique
-- or is an exact match for some defined option. If they have an
-- argument, it follows the option name in the same ARGV-element, separated
-- from the option name by a `=', or else the in next ARGV-element.
-- When `getopt' finds a long-named option, it returns 0 if that option's
-- `flag' field is nonzero, the value of the option's `val' field
-- if the `flag' field is zero.
--
-- The elements of ARGV aren't really const, because we permute them.
-- But we pretend they're const in the prototype to be compatible
-- with other systems.
--
-- LONGOPTS is a vector of `struct option' terminated by an
-- element containing a name which is zero.
--
-- LONGIND returns the index in LONGOPT of the long-named option found.
-- It is only valid when a long-named option has been found by the most
-- recent call.
--
-- If LONG_ONLY is nonzero, '-' as well as '--' can introduce
-- long-named options. */
--
--int
--_getopt_internal_r (
-- int argc,
-- char *const *argv,
-- const char *optstring,
-- const struct option *longopts,
-- int *longind,
-- int long_only,
-- struct _getopt_data *d
--)
--{
-- int print_errors = d->opterr;
-- if (optstring[0] == ':')
-- print_errors = 0;
--
-- if (argc < 1)
-- return -1;
--
-- d->optarg = NULL;
--
-- if (d->optind == 0 || !d->__initialized)
-- {
-- if (d->optind == 0)
-- d->optind = 1; /* Don't scan ARGV[0], the program name. */
-- optstring = _getopt_initialize (argc, argv, optstring, d);
-- d->__initialized = 1;
-- }
--
-- /* Test whether ARGV[optind] points to a non-option argument.
-- Either it does not have option syntax, or there is an environment flag
-- from the shell indicating it is not an option. The later information
-- is only used when the used in the GNU libc. */
--#if defined _LIBC && defined USE_NONOPTION_FLAGS
--# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
-- || (d->optind < d->__nonoption_flags_len \
-- && __getopt_nonoption_flags[d->optind] == '1'))
--#else
--# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
--#endif
--
-- if (d->__nextchar == NULL || *d->__nextchar == '\0')
-- {
-- /* Advance to the next ARGV-element. */
--
-- /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
-- moved back by the user (who may also have changed the arguments). */
-- if (d->__last_nonopt > d->optind)
-- d->__last_nonopt = d->optind;
-- if (d->__first_nonopt > d->optind)
-- d->__first_nonopt = d->optind;
--
-- if (d->__ordering == PERMUTE)
-- {
-- /* If we have just processed some options following some non-options,
-- exchange them so that the options come first. */
--
-- if (d->__first_nonopt != d->__last_nonopt
-- && d->__last_nonopt != d->optind)
-- exchange ((char **) argv, d);
-- else if (d->__last_nonopt != d->optind)
-- d->__first_nonopt = d->optind;
--
-- /* Skip any additional non-options
-- and extend the range of non-options previously skipped. */
--
-- while (d->optind < argc && NONOPTION_P)
-- d->optind++;
-- d->__last_nonopt = d->optind;
-- }
--
-- /* The special ARGV-element `--' means premature end of options.
-- Skip it like a null option,
-- then exchange with previous non-options as if it were an option,
-- then skip everything else like a non-option. */
--
-- if (d->optind != argc && !strcmp (argv[d->optind], "--"))
-- {
-- d->optind++;
--
-- if (d->__first_nonopt != d->__last_nonopt
-- && d->__last_nonopt != d->optind)
-- exchange ((char **) argv, d);
-- else if (d->__first_nonopt == d->__last_nonopt)
-- d->__first_nonopt = d->optind;
-- d->__last_nonopt = argc;
--
-- d->optind = argc;
-- }
--
-- /* If we have done all the ARGV-elements, stop the scan
-- and back over any non-options that we skipped and permuted. */
--
-- if (d->optind == argc)
-- {
-- /* Set the next-arg-index to point at the non-options
-- that we previously skipped, so the caller will digest them. */
-- if (d->__first_nonopt != d->__last_nonopt)
-- d->optind = d->__first_nonopt;
-- return -1;
-- }
--
-- /* If we have come to a non-option and did not permute it,
-- either stop the scan or describe it to the caller and pass it by. */
--
-- if (NONOPTION_P)
-- {
-- if (d->__ordering == REQUIRE_ORDER)
-- return -1;
-- d->optarg = argv[d->optind++];
-- return 1;
-- }
--
-- /* We have found another option-ARGV-element.
-- Skip the initial punctuation. */
--
-- d->__nextchar = (argv[d->optind] + 1
-- + (longopts != NULL && argv[d->optind][1] == '-'));
-- }
--
-- /* Decode the current option-ARGV-element. */
--
-- /* Check whether the ARGV-element is a long option.
--
-- If long_only and the ARGV-element has the form "-f", where f is
-- a valid short option, don't consider it an abbreviated form of
-- a long option that starts with f. Otherwise there would be no
-- way to give the -f short option.
--
-- On the other hand, if there's a long option "fubar" and
-- the ARGV-element is "-fu", do consider that an abbreviation of
-- the long option, just like "--fu", and not "-f" with arg "u".
--
-- This distinction seems to be the most useful approach. */
--
-- if (longopts != NULL
-- && (argv[d->optind][1] == '-'
-- || (long_only && (argv[d->optind][2]
-- || !strchr (optstring, argv[d->optind][1])))))
-- {
-- char *nameend;
-- const struct option *p;
-- const struct option *pfound = NULL;
-- int exact = 0;
-- int ambig = 0;
-- int indfound = -1;
-- int option_index;
--
-- for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
-- /* Do nothing. */ ;
--
-- /* Test all long options for either exact match
-- or abbreviated matches. */
-- for (p = longopts, option_index = 0; p->name; p++, option_index++)
-- if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
-- {
-- if ((unsigned int) (nameend - d->__nextchar)
-- == (unsigned int) strlen (p->name))
-- {
-- /* Exact match found. */
-- pfound = p;
-- indfound = option_index;
-- exact = 1;
-- break;
-- }
-- else if (pfound == NULL)
-- {
-- /* First nonexact match found. */
-- pfound = p;
-- indfound = option_index;
-- }
-- else if (long_only
-- || pfound->has_arg != p->has_arg
-- || pfound->flag != p->flag || pfound->val != p->val)
-- /* Second or later nonexact match found. */
-- ambig = 1;
-- }
--
-- if (ambig && !exact)
-- {
-- if (print_errors)
-- {
--#if defined _LIBC && defined USE_IN_LIBIO
-- char *buf;
--
-- if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
-- argv[0], argv[d->optind]) >= 0)
-- {
-- _IO_flockfile (stderr);
--
-- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
--
-- if (_IO_fwide (stderr, 0) > 0)
-- __fwprintf (stderr, L"%s", buf);
-- else
-- fputs (buf, stderr);
--
-- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-- _IO_funlockfile (stderr);
--
-- free (buf);
-- }
--#else
-- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
-- argv[0], argv[d->optind]);
--#endif
-- }
-- d->__nextchar += strlen (d->__nextchar);
-- d->optind++;
-- d->optopt = 0;
-- return '?';
-- }
--
-- if (pfound != NULL)
-- {
-- option_index = indfound;
-- d->optind++;
-- if (*nameend)
-- {
-- /* Don't test has_arg with >, because some C compilers don't
-- allow it to be used on enums. */
-- if (pfound->has_arg)
-- d->optarg = nameend + 1;
-- else
-- {
-- if (print_errors)
-- {
--#if defined _LIBC && defined USE_IN_LIBIO
-- char *buf;
-- int n;
--#endif
--
-- if (argv[d->optind - 1][1] == '-')
-- {
-- /* --option */
--#if defined _LIBC && defined USE_IN_LIBIO
-- n = __asprintf (&buf, _("\
--%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name);
--#else
-- fprintf (stderr, _("\
--%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name);
--#endif
-- }
-- else
-- {
-- /* +option or -option */
--#if defined _LIBC && defined USE_IN_LIBIO
-- n = __asprintf (&buf, _("\
--%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name);
--#else
-- fprintf (stderr, _("\
--%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name);
--#endif
-- }
--
--#if defined _LIBC && defined USE_IN_LIBIO
-- if (n >= 0)
-- {
-- _IO_flockfile (stderr);
--
-- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-- ((_IO_FILE *) stderr)->_flags2
-- |= _IO_FLAGS2_NOTCANCEL;
--
-- if (_IO_fwide (stderr, 0) > 0)
-- __fwprintf (stderr, L"%s", buf);
-- else
-- fputs (buf, stderr);
--
-- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-- _IO_funlockfile (stderr);
--
-- free (buf);
-- }
--#endif
-- }
--
-- d->__nextchar += strlen (d->__nextchar);
--
-- d->optopt = pfound->val;
-- return '?';
-- }
-- }
-- else if (pfound->has_arg == 1)
-- {
-- if (d->optind < argc)
-- d->optarg = argv[d->optind++];
-- else
-- {
-- if (print_errors)
-- {
--#if defined _LIBC && defined USE_IN_LIBIO
-- char *buf;
--
-- if (__asprintf (&buf, _("\
--%s: option `%s' requires an argument\n"), argv[0], argv[d->optind - 1]) >= 0)
-- {
-- _IO_flockfile (stderr);
--
-- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-- ((_IO_FILE *) stderr)->_flags2
-- |= _IO_FLAGS2_NOTCANCEL;
--
-- if (_IO_fwide (stderr, 0) > 0)
-- __fwprintf (stderr, L"%s", buf);
-- else
-- fputs (buf, stderr);
--
-- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-- _IO_funlockfile (stderr);
--
-- free (buf);
-- }
--#else
-- fprintf (stderr,
-- _("%s: option `%s' requires an argument\n"),
-- argv[0], argv[d->optind - 1]);
--#endif
-- }
-- d->__nextchar += strlen (d->__nextchar);
-- d->optopt = pfound->val;
-- return optstring[0] == ':' ? ':' : '?';
-- }
-- }
-- d->__nextchar += strlen (d->__nextchar);
-- if (longind != NULL)
-- *longind = option_index;
-- if (pfound->flag)
-- {
-- *(pfound->flag) = pfound->val;
-- return 0;
-- }
-- return pfound->val;
-- }
--
-- /* Can't find it as a long option. If this is not getopt_long_only,
-- or the option starts with '--' or is not a valid short
-- option, then it's an error.
-- Otherwise interpret it as a short option. */
-- if (!long_only || argv[d->optind][1] == '-'
-- || strchr (optstring, *d->__nextchar) == NULL)
-- {
-- if (print_errors)
-- {
--#if defined _LIBC && defined USE_IN_LIBIO
-- char *buf;
-- int n;
--#endif
--
-- if (argv[d->optind][1] == '-')
-- {
-- /* --option */
--#if defined _LIBC && defined USE_IN_LIBIO
-- n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
-- argv[0], d->__nextchar);
--#else
-- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
-- argv[0], d->__nextchar);
--#endif
-- }
-- else
-- {
-- /* +option or -option */
--#if defined _LIBC && defined USE_IN_LIBIO
-- n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
-- argv[0], argv[d->optind][0], d->__nextchar);
--#else
-- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
-- argv[0], argv[d->optind][0], d->__nextchar);
--#endif
-- }
--
--#if defined _LIBC && defined USE_IN_LIBIO
-- if (n >= 0)
-- {
-- _IO_flockfile (stderr);
--
-- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
--
-- if (_IO_fwide (stderr, 0) > 0)
-- __fwprintf (stderr, L"%s", buf);
-- else
-- fputs (buf, stderr);
--
-- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-- _IO_funlockfile (stderr);
--
-- free (buf);
-- }
--#endif
-- }
-- d->__nextchar = (char *) "";
-- d->optind++;
-- d->optopt = 0;
-- return '?';
-- }
-- }
--
-- /* Look at and handle the next short option-character. */
--
-- {
-- char c = *d->__nextchar++;
-- char *temp = strchr (optstring, c);
--
-- /* Increment `optind' when we start to process its last character. */
-- if (*d->__nextchar == '\0')
-- ++d->optind;
--
-- if (temp == NULL || c == ':')
-- {
-- if (print_errors)
-- {
--#if defined _LIBC && defined USE_IN_LIBIO
-- char *buf;
-- int n;
--#endif
--
-- if (d->__posixly_correct)
-- {
-- /* 1003.2 specifies the format of this message. */
--#if defined _LIBC && defined USE_IN_LIBIO
-- n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
-- argv[0], c);
--#else
-- fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
--#endif
-- }
-- else
-- {
--#if defined _LIBC && defined USE_IN_LIBIO
-- n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
-- argv[0], c);
--#else
-- fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
--#endif
-- }
--
--#if defined _LIBC && defined USE_IN_LIBIO
-- if (n >= 0)
-- {
-- _IO_flockfile (stderr);
--
-- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
--
-- if (_IO_fwide (stderr, 0) > 0)
-- __fwprintf (stderr, L"%s", buf);
-- else
-- fputs (buf, stderr);
--
-- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-- _IO_funlockfile (stderr);
--
-- free (buf);
-- }
--#endif
-- }
-- d->optopt = c;
-- return '?';
-- }
-- /* Convenience. Treat POSIX -W foo same as long option --foo */
-- if (temp[0] == 'W' && temp[1] == ';')
-- {
-- char *nameend;
-- const struct option *p;
-- const struct option *pfound = NULL;
-- int exact = 0;
-- int ambig = 0;
-- int indfound = 0;
-- int option_index;
--
-- /* This is an option that requires an argument. */
-- if (*d->__nextchar != '\0')
-- {
-- d->optarg = d->__nextchar;
-- /* If we end this ARGV-element by taking the rest as an arg,
-- we must advance to the next element now. */
-- d->optind++;
-- }
-- else if (d->optind == argc)
-- {
-- if (print_errors)
-- {
-- /* 1003.2 specifies the format of this message. */
--#if defined _LIBC && defined USE_IN_LIBIO
-- char *buf;
--
-- if (__asprintf (&buf,
-- _("%s: option requires an argument -- %c\n"),
-- argv[0], c) >= 0)
-- {
-- _IO_flockfile (stderr);
--
-- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
--
-- if (_IO_fwide (stderr, 0) > 0)
-- __fwprintf (stderr, L"%s", buf);
-- else
-- fputs (buf, stderr);
--
-- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-- _IO_funlockfile (stderr);
--
-- free (buf);
-- }
--#else
-- fprintf (stderr, _("%s: option requires an argument -- %c\n"),
-- argv[0], c);
--#endif
-- }
-- d->optopt = c;
-- if (optstring[0] == ':')
-- c = ':';
-- else
-- c = '?';
-- return c;
-- }
-- else
-- /* We already incremented `d->optind' once;
-- increment it again when taking next ARGV-elt as argument. */
-- d->optarg = argv[d->optind++];
--
-- /* optarg is now the argument, see if it's in the
-- table of longopts. */
--
-- for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
-- nameend++)
-- /* Do nothing. */ ;
--
-- /* Test all long options for either exact match
-- or abbreviated matches. */
-- for (p = longopts, option_index = 0; p->name; p++, option_index++)
-- if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
-- {
-- if ((unsigned int) (nameend - d->__nextchar) ==
-- strlen (p->name))
-- {
-- /* Exact match found. */
-- pfound = p;
-- indfound = option_index;
-- exact = 1;
-- break;
-- }
-- else if (pfound == NULL)
-- {
-- /* First nonexact match found. */
-- pfound = p;
-- indfound = option_index;
-- }
-- else
-- /* Second or later nonexact match found. */
-- ambig = 1;
-- }
-- if (ambig && !exact)
-- {
-- if (print_errors)
-- {
--#if defined _LIBC && defined USE_IN_LIBIO
-- char *buf;
--
-- if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
-- argv[0], argv[d->optind]) >= 0)
-- {
-- _IO_flockfile (stderr);
--
-- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
--
-- if (_IO_fwide (stderr, 0) > 0)
-- __fwprintf (stderr, L"%s", buf);
-- else
-- fputs (buf, stderr);
--
-- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-- _IO_funlockfile (stderr);
--
-- free (buf);
-- }
--#else
-- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
-- argv[0], argv[d->optind]);
--#endif
-- }
-- d->__nextchar += strlen (d->__nextchar);
-- d->optind++;
-- return '?';
-- }
-- if (pfound != NULL)
-- {
-- option_index = indfound;
-- if (*nameend)
-- {
-- /* Don't test has_arg with >, because some C compilers don't
-- allow it to be used on enums. */
-- if (pfound->has_arg)
-- d->optarg = nameend + 1;
-- else
-- {
-- if (print_errors)
-- {
--#if defined _LIBC && defined USE_IN_LIBIO
-- char *buf;
--
-- if (__asprintf (&buf, _("\
--%s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name) >= 0)
-- {
-- _IO_flockfile (stderr);
--
-- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-- ((_IO_FILE *) stderr)->_flags2
-- |= _IO_FLAGS2_NOTCANCEL;
--
-- if (_IO_fwide (stderr, 0) > 0)
-- __fwprintf (stderr, L"%s", buf);
-- else
-- fputs (buf, stderr);
--
-- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-- _IO_funlockfile (stderr);
--
-- free (buf);
-- }
--#else
-- fprintf (stderr, _("\
--%s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name);
--#endif
-- }
--
-- d->__nextchar += strlen (d->__nextchar);
-- return '?';
-- }
-- }
-- else if (pfound->has_arg == 1)
-- {
-- if (d->optind < argc)
-- d->optarg = argv[d->optind++];
-- else
-- {
-- if (print_errors)
-- {
--#if defined _LIBC && defined USE_IN_LIBIO
-- char *buf;
--
-- if (__asprintf (&buf, _("\
--%s: option `%s' requires an argument\n"), argv[0], argv[d->optind - 1]) >= 0)
-- {
-- _IO_flockfile (stderr);
--
-- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-- ((_IO_FILE *) stderr)->_flags2
-- |= _IO_FLAGS2_NOTCANCEL;
--
-- if (_IO_fwide (stderr, 0) > 0)
-- __fwprintf (stderr, L"%s", buf);
-- else
-- fputs (buf, stderr);
--
-- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-- _IO_funlockfile (stderr);
--
-- free (buf);
-- }
--#else
-- fprintf (stderr,
-- _("%s: option `%s' requires an argument\n"),
-- argv[0], argv[d->optind - 1]);
--#endif
-- }
-- d->__nextchar += strlen (d->__nextchar);
-- return optstring[0] == ':' ? ':' : '?';
-- }
-- }
-- d->__nextchar += strlen (d->__nextchar);
-- if (longind != NULL)
-- *longind = option_index;
-- if (pfound->flag)
-- {
-- *(pfound->flag) = pfound->val;
-- return 0;
-- }
-- return pfound->val;
-- }
-- d->__nextchar = NULL;
-- return 'W'; /* Let the application handle it. */
-- }
-- if (temp[1] == ':')
-- {
-- if (temp[2] == ':')
-- {
-- /* This is an option that accepts an argument optionally. */
-- if (*d->__nextchar != '\0')
-- {
-- d->optarg = d->__nextchar;
-- d->optind++;
-- }
-- else
-- d->optarg = NULL;
-- d->__nextchar = NULL;
-- }
-- else
-- {
-- /* This is an option that requires an argument. */
-- if (*d->__nextchar != '\0')
-- {
-- d->optarg = d->__nextchar;
-- /* If we end this ARGV-element by taking the rest as an arg,
-- we must advance to the next element now. */
-- d->optind++;
-- }
-- else if (d->optind == argc)
-- {
-- if (print_errors)
-- {
-- /* 1003.2 specifies the format of this message. */
--#if defined _LIBC && defined USE_IN_LIBIO
-- char *buf;
--
-- if (__asprintf (&buf, _("\
--%s: option requires an argument -- %c\n"), argv[0], c) >= 0)
-- {
-- _IO_flockfile (stderr);
--
-- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-- ((_IO_FILE *) stderr)->_flags2 |=
-- _IO_FLAGS2_NOTCANCEL;
--
-- if (_IO_fwide (stderr, 0) > 0)
-- __fwprintf (stderr, L"%s", buf);
-- else
-- fputs (buf, stderr);
--
-- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-- _IO_funlockfile (stderr);
--
-- free (buf);
-- }
--#else
-- fprintf (stderr,
-- _("%s: option requires an argument -- %c\n"),
-- argv[0], c);
--#endif
-- }
-- d->optopt = c;
-- if (optstring[0] == ':')
-- c = ':';
-- else
-- c = '?';
-- }
-- else
-- /* We already incremented `optind' once;
-- increment it again when taking next ARGV-elt as argument. */
-- d->optarg = argv[d->optind++];
-- d->__nextchar = NULL;
-- }
-- }
-- return c;
-- }
--}
--
--int
--_getopt_internal (
-- int argc,
-- char *const *argv,
-- const char *optstring,
-- const struct option *longopts,
-- int *longind,
-- int long_only
--)
--{
-- int result;
--
-- getopt_data.optind = optind;
-- getopt_data.opterr = opterr;
--
-- result = _getopt_internal_r (argc, argv, optstring, longopts,
-- longind, long_only, &getopt_data);
--
-- optind = getopt_data.optind;
-- optarg = getopt_data.optarg;
-- optopt = getopt_data.optopt;
--
-- return result;
--}
--
--int
--getopt (
-- int argc,
-- char *const *argv,
-- const char *optstring
--)
--{
-- return _getopt_internal (argc, argv, optstring,
-- (const struct option *) 0, (int *) 0, 0);
--}
--
--#endif /* Not ELIDE_CODE. */
--
--#ifdef TEST
--
--/* Compile with -DTEST to make an executable for use in testing
-- the above definition of `getopt'. */
--
--int
--main (
-- int argc,
-- char **argv
--)
--{
-- int c;
-- int digit_optind = 0;
--
-- while (1)
-- {
-- int this_option_optind = optind ? optind : 1;
--
-- c = getopt (argc, argv, "abc:d:0123456789");
-- if (c == -1)
-- break;
--
-- switch (c)
-- {
-- case '0':
-- case '1':
-- case '2':
-- case '3':
-- case '4':
-- case '5':
-- case '6':
-- case '7':
-- case '8':
-- case '9':
-- if (digit_optind != 0 && digit_optind != this_option_optind)
-- printf ("digits occur in two different argv-elements.\n");
-- digit_optind = this_option_optind;
-- printf ("option %c\n", c);
-- break;
--
-- case 'a':
-- printf ("option a\n");
-- break;
--
-- case 'b':
-- printf ("option b\n");
-- break;
--
-- case 'c':
-- printf ("option c with value `%s'\n", optarg);
-- break;
--
-- case '?':
-- break;
--
-- default:
-- printf ("?? getopt returned character code 0%o ??\n", c);
-- }
-- }
--
-- if (optind < argc)
-- {
-- printf ("non-option ARGV-elements: ");
-- while (optind < argc)
-- printf ("%s ", argv[optind++]);
-- printf ("\n");
-- }
--
-- exit (0);
--}
--
--#endif /* TEST */
-diff -pruN fribidi-1.0.14.orig/bin/getopt.h fribidi-1.0.14/bin/getopt.h
---- fribidi-1.0.14.orig/bin/getopt.h 2015-08-05 03:49:07.000000000 +0900
-+++ fribidi-1.0.14/bin/getopt.h 1970-01-01 09:00:00.000000000 +0900
-@@ -1,187 +0,0 @@
--/* Declarations for getopt.
-- Copyright (C) 1989-1994,1996-1999,2001,2003,2004
-- Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- 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 2, 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, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA. */
--
--#ifndef _GETOPT_H
--
--#ifndef __need_getopt
--# define _GETOPT_H 1
--#endif
--
--/* If __GNU_LIBRARY__ is not already defined, either we are being used
-- standalone, or this is the first header included in the source file.
-- If we are being used with glibc, we need to include , but
-- that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
-- not defined, include , which will pull in for us
-- if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
-- doesn't flood the namespace with stuff the way some other headers do.) */
--#if !defined __GNU_LIBRARY__
--# include
--#endif
--
--#ifndef __THROW
--# ifndef __GNUC_PREREQ
--# define __GNUC_PREREQ(maj, min) (0)
--# endif
--# if defined __cplusplus && __GNUC_PREREQ (2,8)
--# define __THROW throw ()
--# else
--# define __THROW
--# endif
--#endif
--
--#ifdef __cplusplus
--extern "C"
--{
--#endif
--
--/* For communication from `getopt' to the caller.
-- When `getopt' finds an option that takes an argument,
-- the argument value is returned here.
-- Also, when `ordering' is RETURN_IN_ORDER,
-- each non-option ARGV-element is returned here. */
--
-- extern char *optarg;
--
--/* Index in ARGV of the next element to be scanned.
-- This is used for communication to and from the caller
-- and for communication between successive calls to `getopt'.
--
-- On entry to `getopt', zero means this is the first call; initialize.
--
-- When `getopt' returns -1, this is the index of the first of the
-- non-option elements that the caller should itself scan.
--
-- Otherwise, `optind' communicates from one call to the next
-- how much of ARGV has been scanned so far. */
--
-- extern int optind;
--
--/* Callers store zero here to inhibit the error message `getopt' prints
-- for unrecognized options. */
--
-- extern int opterr;
--
--/* Set to an option character which was unrecognized. */
--
-- extern int optopt;
--
--#ifndef __need_getopt
--/* Describe the long-named options requested by the application.
-- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
-- of `struct option' terminated by an element containing a name which is
-- zero.
--
-- The field `has_arg' is:
-- no_argument (or 0) if the option does not take an argument,
-- required_argument (or 1) if the option requires an argument,
-- optional_argument (or 2) if the option takes an optional argument.
--
-- If the field `flag' is not NULL, it points to a variable that is set
-- to the value given in the field `val' when the option is found, but
-- left unchanged if the option is not found.
--
-- To have a long-named option do something other than set an `int' to
-- a compiled-in constant, such as set a value from `optarg', set the
-- option's `flag' field to zero and its `val' field to a nonzero
-- value (the equivalent single-letter option character, if there is
-- one). For long options that have a zero `flag' field, `getopt'
-- returns the contents of the `val' field. */
--
-- struct option
-- {
-- const char *name;
-- /* has_arg can't be an enum because some compilers complain about
-- type mismatches in all the code that assumes it is an int. */
-- int has_arg;
-- int *flag;
-- int val;
-- };
--
--/* Names for the values of the `has_arg' field of `struct option'. */
--
--# define no_argument 0
--# define required_argument 1
--# define optional_argument 2
--#endif /* need getopt */
--
--
--/* Get definitions and prototypes for functions to process the
-- arguments in ARGV (ARGC of them, minus the program name) for
-- options given in OPTS.
--
-- Return the option character from OPTS just read. Return -1 when
-- there are no more options. For unrecognized options, or options
-- missing arguments, `optopt' is set to the option letter, and '?' is
-- returned.
--
-- The OPTS string is a list of characters which are recognized option
-- letters, optionally followed by colons, specifying that that letter
-- takes an argument, to be placed in `optarg'.
--
-- If a letter in OPTS is followed by two colons, its argument is
-- optional. This behavior is specific to the GNU `getopt'.
--
-- The argument `--' causes premature termination of argument
-- scanning, explicitly telling `getopt' that there are no more
-- options.
--
-- If OPTS begins with `--', then non-option arguments are treated as
-- arguments to the option '\0'. This behavior is specific to the GNU
-- `getopt'. */
--
--#ifdef __GNU_LIBRARY__
--/* Many other libraries have conflicting prototypes for getopt, with
-- differences in the consts, in stdlib.h. To avoid compilation
-- errors, only prototype getopt for the GNU C library. */
-- extern int getopt (
-- int ___argc,
-- char *const *___argv,
-- const char *__shortopts
-- ) __THROW;
--#else /* not __GNU_LIBRARY__ */
-- extern int getopt (
-- );
--#endif /* __GNU_LIBRARY__ */
--
--#ifndef __need_getopt
-- extern int getopt_long (
-- int ___argc,
-- char *const *___argv,
-- const char *__shortopts,
-- const struct option *__longopts,
-- int *__longind
-- ) __THROW;
-- extern int getopt_long_only (
-- int ___argc,
-- char *const *___argv,
-- const char *__shortopts,
-- const struct option *__longopts,
-- int *__longind
-- ) __THROW;
--
--#endif
--
--#ifdef __cplusplus
--}
--#endif
--
--/* Make sure we later can get all the definitions and declarations. */
--#undef __need_getopt
--
--#endif /* getopt.h */
-diff -pruN fribidi-1.0.14.orig/bin/getopt1.c fribidi-1.0.14/bin/getopt1.c
---- fribidi-1.0.14.orig/bin/getopt1.c 2015-08-05 03:49:07.000000000 +0900
-+++ fribidi-1.0.14/bin/getopt1.c 1970-01-01 09:00:00.000000000 +0900
-@@ -1,213 +0,0 @@
--/* getopt_long and getopt_long_only entry points for GNU getopt.
-- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004
-- Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- 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 2, 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, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA. */
--
--#ifdef HAVE_CONFIG_H
--#include
--#endif
--
--#ifdef _LIBC
--# include
--#else
--# include "getopt.h"
--#endif
--#include "getopt_int.h"
--
--#include
--
--/* Comment out all this code if we are using the GNU C Library, and are not
-- actually compiling the library itself. This code is part of the GNU C
-- Library, but also included in many other GNU distributions. Compiling
-- and linking in this code is a waste when using the GNU C library
-- (especially if it is a shared library). Rather than having every GNU
-- program understand `configure --with-gnu-libc' and omit the object files,
-- it is simpler to just do this in the source for each such file. */
--
--#define GETOPT_INTERFACE_VERSION 2
--#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
--#include
--#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
--#define ELIDE_CODE
--#endif
--#endif
--
--#ifndef ELIDE_CODE
--
--
--/* This needs to come after some library #include
-- to get __GNU_LIBRARY__ defined. */
--#ifdef __GNU_LIBRARY__
--#include
--#endif
--
--#ifndef NULL
--#define NULL 0
--#endif
--
--int
--getopt_long (
-- int argc,
-- char *const *argv,
-- const char *options,
-- const struct option *long_options,
-- int *opt_index
--)
--{
-- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
--}
--
--int
--_getopt_long_r (
-- int argc,
-- char *const *argv,
-- const char *options,
-- const struct option *long_options,
-- int *opt_index,
-- struct _getopt_data *d
--)
--{
-- return _getopt_internal_r (argc, argv, options, long_options, opt_index,
-- 0, d);
--}
--
--/* Like getopt_long, but '-' as well as '--' can indicate a long option.
-- If an option that starts with '-' (not '--') doesn't match a long option,
-- but does match a short option, it is parsed as a short option
-- instead. */
--
--int
--getopt_long_only (
-- int argc,
-- char *const *argv,
-- const char *options,
-- const struct option *long_options,
-- int *opt_index
--)
--{
-- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
--}
--
--int
--_getopt_long_only_r (
-- int argc,
-- char *const *argv,
-- const char *options,
-- const struct option *long_options,
-- int *opt_index,
-- struct _getopt_data *d
--)
--{
-- return _getopt_internal_r (argc, argv, options, long_options, opt_index,
-- 1, d);
--}
--
--#endif /* Not ELIDE_CODE. */
--
--#ifdef TEST
--
--#include
--
--int
--main (
-- int argc,
-- char **argv
--)
--{
-- int c;
-- int digit_optind = 0;
--
-- while (1)
-- {
-- int this_option_optind = optind ? optind : 1;
-- int option_index = 0;
-- static struct option long_options[] = {
-- {"add", 1, 0, 0},
-- {"append", 0, 0, 0},
-- {"delete", 1, 0, 0},
-- {"verbose", 0, 0, 0},
-- {"create", 0, 0, 0},
-- {"file", 1, 0, 0},
-- {0, 0, 0, 0}
-- };
--
-- c = getopt_long (argc, argv, "abc:d:0123456789",
-- long_options, &option_index);
-- if (c == -1)
-- break;
--
-- switch (c)
-- {
-- case 0:
-- printf ("option %s", long_options[option_index].name);
-- if (optarg)
-- printf (" with arg %s", optarg);
-- printf ("\n");
-- break;
--
-- case '0':
-- case '1':
-- case '2':
-- case '3':
-- case '4':
-- case '5':
-- case '6':
-- case '7':
-- case '8':
-- case '9':
-- if (digit_optind != 0 && digit_optind != this_option_optind)
-- printf ("digits occur in two different argv-elements.\n");
-- digit_optind = this_option_optind;
-- printf ("option %c\n", c);
-- break;
--
-- case 'a':
-- printf ("option a\n");
-- break;
--
-- case 'b':
-- printf ("option b\n");
-- break;
--
-- case 'c':
-- printf ("option c with value `%s'\n", optarg);
-- break;
--
-- case 'd':
-- printf ("option d with value `%s'\n", optarg);
-- break;
--
-- case '?':
-- break;
--
-- default:
-- printf ("?? getopt returned character code 0%o ??\n", c);
-- }
-- }
--
-- if (optind < argc)
-- {
-- printf ("non-option ARGV-elements: ");
-- while (optind < argc)
-- printf ("%s ", argv[optind++]);
-- printf ("\n");
-- }
--
-- exit (0);
--}
--
--#endif /* TEST */
-diff -pruN fribidi-1.0.14.orig/bin/getopt_int.h fribidi-1.0.14/bin/getopt_int.h
---- fribidi-1.0.14.orig/bin/getopt_int.h 2015-08-05 03:49:07.000000000 +0900
-+++ fribidi-1.0.14/bin/getopt_int.h 1970-01-01 09:00:00.000000000 +0900
-@@ -1,145 +0,0 @@
--/* Internal declarations for getopt.
-- Copyright (C) 1989-1994,1996-1999,2001,2003,2004
-- Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- 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 2, 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, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA. */
--
--#ifndef _GETOPT_INT_H
--#define _GETOPT_INT_H 1
--
--extern int _getopt_internal (
-- int ___argc,
-- char *const *___argv,
-- const char *__shortopts,
-- const struct option *__longopts,
-- int *__longind,
-- int __long_only
--);
--
--
--/* Reentrant versions which can handle parsing multiple argument
-- vectors at the same time. */
--
--/* Data type for reentrant functions. */
--struct _getopt_data
--{
-- /* These have exactly the same meaning as the corresponding global
-- variables, except that they are used for the reentrant
-- versions of getopt. */
-- int optind;
-- int opterr;
-- int optopt;
-- char *optarg;
--
-- /* Internal members. */
--
-- /* True if the internal members have been initialized. */
-- int __initialized;
--
-- /* The next char to be scanned in the option-element
-- in which the last option character we returned was found.
-- This allows us to pick up the scan where we left off.
--
-- If this is zero, or a null string, it means resume the scan
-- by advancing to the next ARGV-element. */
-- char *__nextchar;
--
-- /* Describe how to deal with options that follow non-option ARGV-elements.
--
-- If the caller did not specify anything,
-- the default is REQUIRE_ORDER if the environment variable
-- POSIXLY_CORRECT is defined, PERMUTE otherwise.
--
-- REQUIRE_ORDER means don't recognize them as options;
-- stop option processing when the first non-option is seen.
-- This is what Unix does.
-- This mode of operation is selected by either setting the environment
-- variable POSIXLY_CORRECT, or using `+' as the first character
-- of the list of option characters.
--
-- PERMUTE is the default. We permute the contents of ARGV as we
-- scan, so that eventually all the non-options are at the end.
-- This allows options to be given in any order, even with programs
-- that were not written to expect this.
--
-- RETURN_IN_ORDER is an option available to programs that were
-- written to expect options and other ARGV-elements in any order
-- and that care about the ordering of the two. We describe each
-- non-option ARGV-element as if it were the argument of an option
-- with character code 1. Using `-' as the first character of the
-- list of option characters selects this mode of operation.
--
-- The special argument `--' forces an end of option-scanning regardless
-- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
-- `--' can cause `getopt' to return -1 with `optind' != ARGC. */
--
-- enum
-- {
-- REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-- } __ordering;
--
-- /* If the POSIXLY_CORRECT environment variable is set. */
-- int __posixly_correct;
--
--
-- /* Handle permutation of arguments. */
--
-- /* Describe the part of ARGV that contains non-options that have
-- been skipped. `first_nonopt' is the index in ARGV of the first
-- of them; `last_nonopt' is the index after the last of them. */
--
-- int __first_nonopt;
-- int __last_nonopt;
--
--#if defined _LIBC && defined USE_NONOPTION_FLAGS
-- int __nonoption_flags_max_len;
-- int __nonoption_flags_len;
--# endif
--};
--
--/* The initializer is necessary to set OPTIND and OPTERR to their
-- default values and to clear the initialization flag. */
--#define _GETOPT_DATA_INITIALIZER { 1, 1 }
--
--extern int _getopt_internal_r (
-- int ___argc,
-- char *const *___argv,
-- const char *__shortopts,
-- const struct option *__longopts,
-- int *__longind,
-- int __long_only,
-- struct _getopt_data *__data
--);
--
--extern int _getopt_long_r (
-- int ___argc,
-- char *const *___argv,
-- const char *__shortopts,
-- const struct option *__longopts,
-- int *__longind,
-- struct _getopt_data *__data
--);
--
--extern int _getopt_long_only_r (
-- int ___argc,
-- char *const *___argv,
-- const char *__shortopts,
-- const struct option *__longopts,
-- int *__longind,
-- struct _getopt_data *__data
--);
--
--#endif /* getopt_int.h */
-diff -pruN fribidi-1.0.14.orig/bin/gettext.h fribidi-1.0.14/bin/gettext.h
---- fribidi-1.0.14.orig/bin/gettext.h 2015-08-05 03:49:07.000000000 +0900
-+++ fribidi-1.0.14/bin/gettext.h 1970-01-01 09:00:00.000000000 +0900
-@@ -1,2 +0,0 @@
--#undef gettext
--#define gettext
-diff -pruN fribidi-1.0.14.orig/bin/meson.build fribidi-1.0.14/bin/meson.build
---- fribidi-1.0.14.orig/bin/meson.build 2024-03-18 03:10:09.000000000 +0900
-+++ fribidi-1.0.14/bin/meson.build 2024-05-07 21:40:55.573086578 +0900
-@@ -1,7 +1,7 @@
- # The fribidi binary is used by the test setup, so if bin=false we still
- # need to build it for internal usage, we just won't install it.
- fribidi = executable('fribidi',
-- 'fribidi-main.c', 'getopt.c', 'getopt1.c', fribidi_unicode_version_h,
-+ 'fribidi-main.c', fribidi_unicode_version_h,
- c_args: ['-DHAVE_CONFIG_H'] + fribidi_static_cargs,
- include_directories: incs,
- link_with: libfribidi,
-@@ -12,7 +12,7 @@ if not get_option('bin')
- endif
-
- executable('fribidi-benchmark',
-- 'fribidi-benchmark.c', 'getopt.c', 'getopt1.c', fribidi_unicode_version_h,
-+ 'fribidi-benchmark.c', fribidi_unicode_version_h,
- c_args: ['-DHAVE_CONFIG_H'] + fribidi_static_cargs,
- include_directories: incs,
- link_with: libfribidi,
diff --git a/fribidi.spec b/fribidi.spec
index 91570fa..92fe739 100644
--- a/fribidi.spec
+++ b/fribidi.spec
@@ -1,18 +1,13 @@
Summary: Library implementing the Unicode Bidirectional Algorithm
Name: fribidi
-Version: 1.0.16
-Release: 3%{?dist}
-URL: https://github.com/fribidi/fribidi/
-Source: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
-License: LGPL-2.1-or-later AND Unicode-DFS-2016
-BuildRequires: gcc
-%if 0%{?rhel} && 0%{?rhel} <= 8
-BuildRequires: automake autoconf libtool
-%else
-BuildRequires: meson
-%endif
-BuildRequires: make
-Patch0: fribidi-drop-bundled-gnulib.patch
+Version: 0.19.4
+Release: 4%{?dist}
+URL: http://fribidi.org
+Source: http://fribidi.org/download/%{name}-%{version}.tar.bz2
+License: LGPLv2+ and UCD
+Group: System Environment/Libraries
+Patch0: signedwarning.patch
+Patch1: fribidi-aarch64.patch
%description
A library to handle bidirectional scripts (for example Hebrew, Arabic),
@@ -21,6 +16,7 @@ is always written in logical order.
%package devel
Summary: Libraries and include files for FriBidi
+Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
@@ -28,17 +24,11 @@ Include files and libraries needed for developing applications which use
FriBidi.
%prep
-%autosetup -p1
-%if 0%{?rhel} && 0%{?rhel} <= 8
-autoreconf -i
-%endif
-# Clean up older file in archive
-(cd lib;
- rm arabic-shaping.tab.i bidi-type.tab.i brackets*.tab.i joining-type.tab.i mirroring.tab.i fribidi-unicode-version.h
-)
+%setup -q
+%patch0 -p1 -b .signedwarnings
+%patch1 -p1 -b .aarch64
%build
-%if 0%{?rhel} && 0%{?rhel} <= 8
%if 0%{?el5}
# FORTIFY_SOURCE=2 breaks EL-5 build
export CFLAGS=`echo $RPM_OPT_FLAGS | sed -e 's|FORTIFY_SOURCE=2|FORTIFY_SOURCE=1|'`
@@ -51,234 +41,35 @@ export CFLAGS="$CFLAGS -DPAGE_SIZE=4096"
export CFLAGS="$RPM_OPT_FLAGS -DPAGE_SIZE=4096"
%endif
%endif
-%configure --disable-static --disable-docs
-make %{?_smp_mflags} V=1
-%else
-%meson -Ddocs=false
-%meson_build
-%endif
-
-%check
-%if 0%{?rhel} && 0%{?rhel} <= 8
-make check
-%else
-%meson_test
-%endif
+%configure --disable-static
+make %{?_smp_mflags}
%install
-%if 0%{?rhel} && 0%{?rhel} <= 8
make DESTDIR=$RPM_BUILD_ROOT install INSTALL="install -p"
-%else
-%meson_install
-%endif
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+# remove empty (compressed) man pages
+find $RPM_BUILD_ROOT%{_mandir}/man3 -type f -empty -exec rm {} \;
-%ldconfig_scriptlets
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
%files
-%doc README AUTHORS ChangeLog THANKS NEWS TODO
-%license COPYING
+%doc README AUTHORS COPYING ChangeLog THANKS NEWS TODO
%{_bindir}/fribidi
-%{_libdir}/libfribidi.so.0*
+%{_libdir}/libfribidi.so.*
%files devel
%{_includedir}/fribidi
%{_libdir}/libfribidi.so
%{_libdir}/pkgconfig/*.pc
-#%%{_mandir}/man3/*.gz
+%{_mandir}/man3/%{name}_*.gz
%changelog
-* Wed Jul 23 2025 Fedora Release Engineering - 1.0.16-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
-
-* Thu Jan 16 2025 Fedora Release Engineering - 1.0.16-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
-
-* Fri Sep 27 2024 Akira TAGOH - 1.0.16-1
-- New upstream release.
- Resolves: rhbz#2314907
-
-* Wed Jul 17 2024 Fedora Release Engineering - 1.0.15-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
-
-* Mon Jun 10 2024 Akira TAGOH - 1.0.15-1
-- New upstream release.
- Resolves: rhbz#2291030
-
-* Wed Jun 5 2024 Akira TAGOH - 1.0.14-2
-- Fix broken data in fribidi.
- Resolves: rhbz#2279842
-
-* Tue May 7 2024 Akira TAGOH - 1.0.14-1
-- New upstream release.
- Resolves: rhbz#2277227
-
-* Wed Jan 24 2024 Fedora Release Engineering - 1.0.13-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Fri Jan 19 2024 Fedora Release Engineering - 1.0.13-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Wed Jul 19 2023 Fedora Release Engineering - 1.0.13-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
-
-* Wed May 17 2023 Akira TAGOH - 1.0.13-1
-- New upstream release.
- Resolves: rhbz#2207796
-
-* Fri Feb 24 2023 Caolán McNamara - 1.0.12-4
-- migrated to SPDX license
-
-* Thu Jan 19 2023 Fedora Release Engineering - 1.0.12-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
-
-* Thu Jul 21 2022 Fedora Release Engineering - 1.0.12-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
-
-* Thu Apr 21 2022 Akira TAGOH - 1.0.12-1
-- New upstream release.
- Resolves: rhbz#2077311
-
-* Fri Apr 1 2022 Akira TAGOH - 1.0.11-3
-- Fix security issues, CVE-2022-25308, CVE-2022-25309, CVE-2022-25310.
- Resolves: rhbz#2067039, rhbz#2067043, rhbz#2067045
-
-* Thu Jan 20 2022 Fedora Release Engineering - 1.0.11-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
-
-* Fri Sep 24 2021 Fedora Release Monitoring - 1.0.11-1
-- Update to 1.0.11 (#2007504)
-
-* Wed Jul 21 2021 Fedora Release Engineering - 1.0.10-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
-
-* Tue Jan 26 2021 Fedora Release Engineering - 1.0.10-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
-
-* Mon Jul 27 2020 Fedora Release Engineering - 1.0.10-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Tue Jul 7 2020 Akira TAGOH - 1.0.10-2
-- Update the patch to drop bundled gnulib.
-
-* Mon Jul 6 2020 Akira TAGOH - 1.0.10-1
-- New upstream release.
- Resolves: rhbz#1853939
-
-* Thu Mar 05 2020 Akira TAGOH - 1.0.9-1
-- New upstream release.
- Resolves: rhbz#1809478
-
-* Tue Jan 28 2020 Fedora Release Engineering - 1.0.8-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
-
-* Wed Jan 15 2020 Akira TAGOH - 1.0.8-2
-- Restore the deprecated API that was accidentally removed in the previous release.
- Resolves: rhbz#1787293
-
-* Fri Dec 13 2019 Akira TAGOH - 1.0.8-1
-- New upstream release.
- Resolves: rhbz#1783205
-
-* Wed Dec 11 2019 Akira TAGOH - 1.0.7-2
-- Fix CVE-2019-18397
- Resolves: rhbz#1781218
-
-* Mon Sep 30 2019 Akira TAGOH - 1.0.7-1
-- New upstream release.
- Resolves: rhbz#1756434
-
-* Fri Sep 27 2019 Akira TAGOH - 1.0.6-1
-- New upstream release.
- Resolves: rhbz#1756212
-- Use meson to build.
-
-* Thu Jul 25 2019 Fedora Release Engineering - 1.0.5-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
-
-* Tue Jul 23 2019 Akira TAGOH - 1.0.5-3
-- Backport upstream patch to remove HAVE_CONFIG_H from public API.
- Fixes rhbz#1730516
-
-* Thu Jan 31 2019 Fedora Release Engineering - 1.0.5-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
-
-* Mon Aug 06 2018 Akira TAGOH - 1.0.5-1
-- New upstream release. (#1609080)
-
-* Thu Jul 26 2018 Akira TAGOH - 1.0.4-6
-- Drop bundled gnulib code.
-
-* Tue Jul 17 2018 Akira TAGOH - 1.0.4-5
-- Add BR: gcc.
-
-* Fri Jul 13 2018 Fedora Release Engineering - 1.0.4-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
-
-* Thu Jul 12 2018 Akira TAGOH - 1.0.4-3
-- Modernize spec file.
-
-* Fri Jun 29 2018 Akira TAGOH - 1.0.4-2
-- Use ldconfig rpm macro.
-
-* Fri Jun 08 2018 Akira TAGOH - 1.0.4-1
-- New upstream release. (#1587985)
-
-* Thu May 31 2018 Akira TAGOH - 1.0.3-1
-- New upstream release. (#1584541)
-
-* Fri May 04 2018 Caolán McNamara - 1.0.2-1
-- Resolves: rhbz#1574858 latest version, --disable-docs because there's no c2man
-
-* Wed Feb 28 2018 Caolán McNamara - 1.0.1-1
-- Resolves: rhbz#1549934 latest version
-
-* Wed Feb 07 2018 Fedora Release Engineering - 0.19.7-7
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
-
-* Mon Oct 16 2017 Caolán McNamara - 0.19.7-6
-- Resolves: rhbz#1502675 enable make check
-
-* Wed Aug 02 2017 Fedora Release Engineering - 0.19.7-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
-
-* Wed Jul 26 2017 Fedora Release Engineering - 0.19.7-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
-
-* Fri Feb 10 2017 Fedora Release Engineering - 0.19.7-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
-
-* Wed Feb 03 2016 Fedora Release Engineering - 0.19.7-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
-
-* Tue Aug 11 2015 Caolán McNamara - 0.19.7-1
-- Resolves: rhbz#1250755 latest fribidi
-
-* Wed Jun 17 2015 Fedora Release Engineering - 0.19.6-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
-
-* Sat Feb 21 2015 Till Maas - 0.19.6-4
-- Rebuilt for Fedora 23 Change
- https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
-
-* Sat Aug 16 2014 Fedora Release Engineering - 0.19.6-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
-
-* Sat Jun 07 2014 Fedora Release Engineering - 0.19.6-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
-
-* Mon Jan 13 2014 Caolán McNamara - 0.19.6-1
-- Resolves: rhbz#1052148 latest fribidi
-- drop integrated signedwarning.patch
-- drop integrated fribidi-aarch64.patch
-
-* Sat Aug 03 2013 Fedora Release Engineering - 0.19.4-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
-
* Wed Apr 03 2013 Caolán McNamara - 0.19.4-4
- Resolves: rhbz#925368 support aarch64
-* Mon Feb 18 2013 Caolán McNamara - 0.19.4-3
+* Wed Feb 18 2013 Caolán McNamara - 0.19.4-3
- Resolves: rhbz#884000 remove empty man pages
* Mon Dec 10 2012 Caolán McNamara - 0.19.4-2
@@ -389,3 +180,4 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
* Fri May 16 2003 Jeremy Katz 0.10.4-2
- Initial build in Red Hat Linux
+
diff --git a/plans/basic.fmf b/plans/basic.fmf
deleted file mode 100644
index 4d7984e..0000000
--- a/plans/basic.fmf
+++ /dev/null
@@ -1,11 +0,0 @@
-summary: Basic smoke test
-discover:
- how: fmf
- dist-git-source: true
-prepare:
- name: tmt
- how: install
- package:
- - fribidi
-execute:
- how: tmt
diff --git a/signedwarning.patch b/signedwarning.patch
new file mode 100644
index 0000000..06ae0ef
--- /dev/null
+++ b/signedwarning.patch
@@ -0,0 +1,11 @@
+--- fribidi-0.19.4/bin/fribidi-main.c 2012-08-25 20:56:20.000000000 +0200
++++ fribidi-0.19.4/bin/fribidi-main.c 2012-12-06 16:10:38.936894816 +0100
+@@ -519,7 +519,7 @@
+ idx++;
+ }
+ #endif /* !FRIBIDI_MAIN_USE_ICONV_H */
+- if (wid < 0 && idx > st + 1)
++ if (wid < 0 && idx - st > 1)
+ idx--;
+ inlen = idx - st;
+
diff --git a/sources b/sources
index 173f0f4..0e272be 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (fribidi-1.0.16.tar.xz) = e3a56f36155f6813e3609473639fc533de742309f561c463012dc90b412a1ac7694b765d92669b2cbfaee973ca0e92fa5e926e68a1a078921f26ef17d82ab651
+0173f98ff929782d45819fc4a813c175 fribidi-0.19.4.tar.bz2
diff --git a/tests/basic/main.fmf b/tests/basic/main.fmf
deleted file mode 100644
index 4b2193c..0000000
--- a/tests/basic/main.fmf
+++ /dev/null
@@ -1,3 +0,0 @@
-summary: Basic test
-test: ./test.sh
-framework: beakerlib
diff --git a/tests/basic/test.sh b/tests/basic/test.sh
deleted file mode 100755
index 3156eac..0000000
--- a/tests/basic/test.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
-. /usr/share/beakerlib/beakerlib.sh || exit 1
-
-rlJournalStart
- rlPhaseStartSetup
- rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
- rlRun "pushd $tmp"
- rlRun "set -o pipefail"
- rlPhaseEnd
-
- rlPhaseStartTest
- rlRun "BUILD_PATH=$(rpm -q --qf '%{NAME}-%{VERSION}' fribidi)" 0 "Get the build path"
- if test -d $TMT_SOURCE_DIR/$BUILD_PATH; then
- for f in $TMT_SOURCE_DIR/$BUILD_PATH/test/*.input; do
- ref=${f/.input/.reference}
- cs=$(echo $f|cut -d_ -f2)
- name=$(basename $f)
- rlRun "fribidi -t -c $cs $f | tee output" 0 "Check $name for $cs"
- rlRun "diff -U 0 output $ref" 0 "Check diff for $name"
- done
- else
- rlDie "No build directory"
- fi
- rlPhaseEnd
-
- rlPhaseStartCleanup
- rlRun "popd"
- rlRun "rm -r $tmp" 0 "Remove tmp directory"
- rlPhaseEnd
-rlJournalEnd