summaryrefslogtreecommitdiffstats
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/packages
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/apmd/apmd-3.2.2-14/apmd_proxy91
-rw-r--r--meta/packages/apmd/apmd-3.2.2-14/apmd_proxy.conf16
-rw-r--r--meta/packages/apmd/apmd-3.2.2-14/default8
-rwxr-xr-xmeta/packages/apmd/apmd-3.2.2-14/init44
-rw-r--r--meta/packages/apmd/apmd-3.2.2-14/libtool.patch29
-rw-r--r--meta/packages/apmd/apmd-3.2.2-14/unlinux.patch21
-rw-r--r--meta/packages/apmd/apmd-3.2.2-14/workaround.patch59
-rw-r--r--meta/packages/apmd/apmd_3.2.2-14.bb63
-rw-r--r--meta/packages/apr/apr-util/configfix.patch49
-rw-r--r--meta/packages/apr/apr-util/configure_fixes.patch27
-rw-r--r--meta/packages/apr/apr-util/configure_fixes.patch.old25
-rw-r--r--meta/packages/apr/apr-util_1.3.4.bb27
-rw-r--r--meta/packages/apr/apr/cleanup.patch42
-rw-r--r--meta/packages/apr/apr/configfix.patch51
-rw-r--r--meta/packages/apr/apr/configure_fixes.patch66
-rw-r--r--meta/packages/apr/apr_1.3.3.bb34
-rw-r--r--meta/packages/aspell/aspell_0.60.6.bb15
-rw-r--r--meta/packages/atk/atk.inc14
-rw-r--r--meta/packages/atk/atk_1.30.0.bb10
-rw-r--r--meta/packages/attr/acl.inc26
-rw-r--r--meta/packages/attr/acl_2.2.49.bb3
-rw-r--r--meta/packages/attr/attr-2.4.44/double-free.patch18
-rw-r--r--meta/packages/attr/attr-2.4.44/memory-leak-in-copy.patch50
-rw-r--r--meta/packages/attr/attr-2.4.44/memory-leak2.patch18
-rw-r--r--meta/packages/attr/attr-2.4.44/pull-in-string.h.patch21
-rw-r--r--meta/packages/attr/attr-2.4.44/thinko-in-restore.patch19
-rw-r--r--meta/packages/attr/attr.inc20
-rw-r--r--meta/packages/attr/attr_2.4.44.bb9
-rw-r--r--meta/packages/attr/ea-acl.inc35
-rw-r--r--meta/packages/attr/files/relative-libdir.patch23
-rw-r--r--meta/packages/beecrypt/beecrypt/disable-icu-check.patch41
-rw-r--r--meta/packages/beecrypt/beecrypt/fix-security.patch43
-rw-r--r--meta/packages/beecrypt/beecrypt/x64fix.patch23
-rw-r--r--meta/packages/beecrypt/beecrypt_4.1.2.bb21
-rw-r--r--meta/packages/blktool/blktool_4-6.bb14
-rw-r--r--meta/packages/boost/boost-36.inc149
-rw-r--r--meta/packages/boost/boost-jam-native.inc31
-rw-r--r--meta/packages/boost/boost-jam-native_3.1.18.bb4
-rw-r--r--meta/packages/boost/boost_1.44.0.bb27
-rw-r--r--meta/packages/boost/files/1.34.1-gcc43.patch224
-rw-r--r--meta/packages/boost/files/arm-intrinsics.patch53
-rw-r--r--meta/packages/boost/files/atomic_count_gcc_atomicity.patch13
-rw-r--r--meta/packages/boost/files/gcc41.patch14
-rw-r--r--meta/packages/boost/files/gcc43.patch256
-rw-r--r--meta/packages/boost/files/linux-uclibc.patch10
-rw-r--r--meta/packages/boost/files/unit_test_log10f.patch20
-rw-r--r--meta/packages/bzip2/bzip2-1.0.5/Makefile.am41
-rw-r--r--meta/packages/bzip2/bzip2-1.0.5/configure.ac14
-rw-r--r--meta/packages/bzip2/bzip2_1.0.5.bb41
-rw-r--r--meta/packages/claws-mail/claws-mail.inc57
-rw-r--r--meta/packages/claws-mail/claws-mail_2.9.1.bb1
-rw-r--r--meta/packages/claws-mail/claws-plugin-gtkhtml2-viewer_0.15.bb14
-rw-r--r--meta/packages/claws-mail/claws-plugin-maildir_0.24.4.bb14
-rw-r--r--meta/packages/claws-mail/claws-plugin-mailmbox_1.13.bb14
-rw-r--r--meta/packages/claws-mail/claws-plugin-rssyl_0.13.bb14
-rw-r--r--meta/packages/claws-mail/files/desktop.patch19
-rw-r--r--meta/packages/claws-mail/files/fix-build.patch24
-rw-r--r--meta/packages/claws-mail/files/owl-window-menu.patch1009
-rw-r--r--meta/packages/claws-mail/files/streamline-ui.patch1008
-rw-r--r--meta/packages/coreutils/coreutils-6.9/futimens.patch61
-rw-r--r--meta/packages/coreutils/coreutils-6.9/gnulib_m4.patch19
-rw-r--r--meta/packages/coreutils/coreutils-6.9/man-touch.patch22
-rw-r--r--meta/packages/coreutils/coreutils_6.9.bb78
-rw-r--r--meta/packages/coreutils/coreutils_8.5.bb67
-rw-r--r--meta/packages/curl/curl/noldlibpath.patch74
-rw-r--r--meta/packages/curl/curl/pkgconfig_fix.patch35
-rw-r--r--meta/packages/curl/curl_7.21.0.bb54
-rw-r--r--meta/packages/db/db/arm-thumb-mutex.patch36
-rw-r--r--meta/packages/db/db/configure_fixes.patch18
-rw-r--r--meta/packages/db/db_4.2.52.bb97
-rw-r--r--meta/packages/db/db_4.3.29.bb89
-rw-r--r--meta/packages/devicekit/devicekit-power_014.bb21
-rw-r--r--meta/packages/devicekit/devicekit/volatile1
-rw-r--r--meta/packages/devicekit/devicekit_003.bb16
-rw-r--r--meta/packages/devicekit/devicekit_git.bb35
-rw-r--r--meta/packages/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch84
-rw-r--r--meta/packages/dhcp/dhcp-4.1.1-P1/fix-client-path.patch21
-rw-r--r--meta/packages/dhcp/dhcp-4.1.1-P1/fixincludes.patch10
-rw-r--r--meta/packages/dhcp/dhcp-4.1.1-P1/noattrmode.patch20
-rw-r--r--meta/packages/dhcp/dhcp-4.1.1-P1/site.h21
-rw-r--r--meta/packages/dhcp/dhcp3.inc53
-rw-r--r--meta/packages/dhcp/dhcp4.inc57
-rw-r--r--meta/packages/dhcp/dhcp_4.1.1-P1.bb7
-rw-r--r--meta/packages/dhcp/files/default-relay12
-rw-r--r--meta/packages/dhcp/files/default-server7
-rw-r--r--meta/packages/dhcp/files/dhclient.conf50
-rw-r--r--meta/packages/dhcp/files/dhcpd.conf108
-rw-r--r--meta/packages/dhcp/files/init-relay44
-rw-r--r--meta/packages/dhcp/files/init-server44
-rw-r--r--meta/packages/diffutils/diffutils_2.8.1.bb38
-rw-r--r--meta/packages/enchant/enchant_1.6.0.bb22
-rw-r--r--meta/packages/exmap-console/exmap-console.inc59
-rw-r--r--meta/packages/exmap-console/exmap-console_0.4.1.bb3
-rw-r--r--meta/packages/exmap-console/exmap-console_svn.bb8
-rw-r--r--meta/packages/farsight/farsight2_0.0.9.bb24
-rw-r--r--meta/packages/farsight/libnice_0.0.6.bb23
-rw-r--r--meta/packages/findutils/findutils-4.2.31/gnulib-extension.patch54
-rw-r--r--meta/packages/findutils/findutils-4.4.2/01-27017.patch779
-rw-r--r--meta/packages/findutils/findutils-4.4.2/02-28824.patch292
-rw-r--r--meta/packages/findutils/findutils-4.4.2/03-28872.patch56
-rw-r--r--meta/packages/findutils/findutils.inc19
-rw-r--r--meta/packages/findutils/findutils_4.2.31.bb37
-rw-r--r--meta/packages/findutils/findutils_4.4.2.bb27
-rw-r--r--meta/packages/fstests/fstests_svn.bb18
-rw-r--r--meta/packages/fuse/fuse-2.7.2/not-run-updaterc.d-on-host.patch15
-rw-r--r--meta/packages/fuse/fuse.inc13
-rw-r--r--meta/packages/fuse/fuse_2.7.2.bb22
-rw-r--r--meta/packages/gdbm/gdbm-1.8.3/libtool-mode.patch20
-rw-r--r--meta/packages/gdbm/gdbm-1.8.3/makefile.patch59
-rw-r--r--meta/packages/gdbm/gdbm_1.8.3.bb16
-rw-r--r--meta/packages/gnutls/gnutls-2.8.6/configure-fix.patch64
-rw-r--r--meta/packages/gnutls/gnutls-2.8.6/gnutls-openssl.patch124
-rw-r--r--meta/packages/gnutls/gnutls-2.8.6/gnutls-texinfo-euro.patch16
-rw-r--r--meta/packages/gnutls/gnutls.inc44
-rw-r--r--meta/packages/gnutls/gnutls_2.8.6.bb7
-rw-r--r--meta/packages/gnutls/libtasn1_2.7.bb21
-rw-r--r--meta/packages/gperf/gperf.inc22
-rw-r--r--meta/packages/gperf/gperf_3.0.3.bb7
-rw-r--r--meta/packages/gperf/gperf_3.0.4.bb3
-rw-r--r--meta/packages/gpgme/gpgme-1.3.0/disable_gpgconf_check.patch38
-rw-r--r--meta/packages/gpgme/gpgme_1.3.0.bb25
-rw-r--r--meta/packages/grep/grep-2.5.1a/uclibc-fix.patch53
-rw-r--r--meta/packages/grep/grep_2.5.1a.bb40
-rw-r--r--meta/packages/gsm/files/0001-Introduce-ports.patch710
-rw-r--r--meta/packages/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch74
-rw-r--r--meta/packages/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch77
-rw-r--r--meta/packages/gsm/files/0004-Handle-read-and-write-return-values.patch176
-rw-r--r--meta/packages/gsm/files/0005-Add-ask-ds-option-forSMS.patch130
-rw-r--r--meta/packages/gsm/files/024_sms-text-in-bracket.patch70
-rw-r--r--meta/packages/gsm/files/025_sms-status-report.patch133
-rw-r--r--meta/packages/gsm/files/027_phonebook-find-and-read-range-support.patch423
-rw-r--r--meta/packages/gsm/files/028_shell-phonebook-find-and-read-range-support.patch264
-rw-r--r--meta/packages/gsm/files/default59
-rw-r--r--meta/packages/gsm/files/fix_machine_init.patch23
-rw-r--r--meta/packages/gsm/files/gsmd47
-rw-r--r--meta/packages/gsm/files/install-ts-headers.patch11
-rw-r--r--meta/packages/gsm/files/lgsm_send_fix_return_value.patch11
-rw-r--r--meta/packages/gsm/gsmd.inc93
-rw-r--r--meta/packages/gsm/libgsmd_svn.bb5
-rw-r--r--meta/packages/gzip/gzip-1.3.12/dup-def-fix.patch45
-rw-r--r--meta/packages/gzip/gzip-1.3.12/m4-extensions-fix.patch53
-rw-r--r--meta/packages/gzip/gzip.inc38
-rw-r--r--meta/packages/gzip/gzip_1.3.12.bb39
-rw-r--r--meta/packages/gzip/gzip_1.4.bb5
-rwxr-xr-xmeta/packages/hal/files/20hal58
-rw-r--r--meta/packages/hal/files/autoconf.diff11
-rw-r--r--meta/packages/hal/files/hal-right-input-h.patch29
-rw-r--r--meta/packages/hal/files/sg-inhibit.patch24
-rw-r--r--meta/packages/hal/hal-info.inc22
-rw-r--r--meta/packages/hal/hal-info_20091130.bb1
-rw-r--r--meta/packages/hal/hal-info_git.bb9
-rw-r--r--meta/packages/hal/hal.inc85
-rw-r--r--meta/packages/hal/hal/configure_fix.patch60
-rw-r--r--meta/packages/hal/hal_0.5.14.bb14
-rw-r--r--meta/packages/hal/hal_git.bb12
-rw-r--r--meta/packages/hdparm/hdparm-6.3/bswap.patch36
-rw-r--r--meta/packages/hdparm/hdparm-6.3/uclibc.patch32
-rw-r--r--meta/packages/hdparm/hdparm_6.3.bb14
-rw-r--r--meta/packages/hostap/files/hostap-fw-load.patch20
-rw-r--r--meta/packages/hostap/files/hostap_cs.conf193
-rw-r--r--meta/packages/hostap/files/hostap_cs.conf-upstream191
-rw-r--r--meta/packages/hostap/files/hostap_cs.modalias28
-rw-r--r--meta/packages/hostap/hostap-conf_1.0.bb29
-rw-r--r--meta/packages/hostap/hostap-utils.inc25
-rw-r--r--meta/packages/hostap/hostap-utils_0.4.7.bb1
-rw-r--r--meta/packages/icu/files/gccfix.patch13
-rw-r--r--meta/packages/icu/files/noldlibpath.patch47
-rw-r--r--meta/packages/icu/files/use-g++-for-linking.patch67
-rw-r--r--meta/packages/icu/icu-3.6.inc55
-rw-r--r--meta/packages/icu/icu_3.6.bb3
-rw-r--r--meta/packages/insserv/files/40_segfault_virtprov.dpatch89
-rw-r--r--meta/packages/insserv/files/42_loopnochangemsg.dpatch20
-rw-r--r--meta/packages/insserv/files/crosscompile_fix.patch22
-rw-r--r--meta/packages/insserv/files/insserv.conf41
-rw-r--r--meta/packages/insserv/files/make.patch58
-rw-r--r--meta/packages/insserv/insserv_1.11.0.bb17
-rw-r--r--meta/packages/intltool/intltool-0.40.6/intltool-nowarn-0.40.0.patch50
-rw-r--r--meta/packages/intltool/intltool.inc17
-rw-r--r--meta/packages/intltool/intltool_0.40.6.bb5
-rw-r--r--meta/packages/iproute2/iproute2-2.6.34/configure-cross.patch61
-rw-r--r--meta/packages/iproute2/iproute2.inc27
-rw-r--r--meta/packages/iproute2/iproute2_2.6.34.bb6
-rw-r--r--meta/packages/iso-codes/iso-codes_3.3.bb14
-rw-r--r--meta/packages/js/files/buildcc.patch20
-rw-r--r--meta/packages/js/files/configure.ac28
-rw-r--r--meta/packages/js/files/jsautocfg.h74
-rw-r--r--meta/packages/js/files/link_with_gcc.patch13
-rw-r--r--meta/packages/js/files/usepic.patch24
-rw-r--r--meta/packages/js/js_1.7.0+1.8.0rc1.bb47
-rw-r--r--meta/packages/libassuan/libassuan_2.0.0.bb15
-rw-r--r--meta/packages/libcap/libcap.inc34
-rw-r--r--meta/packages/libcap/libcap_2.19.bb3
-rw-r--r--meta/packages/libcheck/libcheck_0.9.8.bb16
-rw-r--r--meta/packages/libcroco/files/croco.patch13
-rw-r--r--meta/packages/libcroco/libcroco_0.6.2.bb16
-rw-r--r--meta/packages/libdaemon/libdaemon_0.14.bb14
-rw-r--r--meta/packages/libetpan/files/cxx-is-here.patch18
-rw-r--r--meta/packages/libetpan/libetpan_0.54.bb19
-rw-r--r--meta/packages/libevent/libevent_1.4.14b.bb15
-rw-r--r--meta/packages/libffi/libffi_3.0.8.bb5
-rw-r--r--meta/packages/libfm/libfm_0.1.12.bb17
-rw-r--r--meta/packages/libfribidi/files/libtool-update.patch11
-rw-r--r--meta/packages/libfribidi/libfribidi_0.10.4.bb23
-rw-r--r--meta/packages/libgcrypt/files/add-pkgconfig-support.patch49
-rw-r--r--meta/packages/libgcrypt/libgcrypt.inc31
-rw-r--r--meta/packages/libgcrypt/libgcrypt_1.4.6.bb3
-rw-r--r--meta/packages/libgdbus/libgdbus_git.bb10
-rw-r--r--meta/packages/libgpg-error/libgpg-error-1.8/pkgconfig.patch53
-rw-r--r--meta/packages/libgpg-error/libgpg-error_1.8.bb24
-rw-r--r--meta/packages/libgsf/libgsf_1.14.5.bb20
-rw-r--r--meta/packages/libgtkstylus/files/gtkstylus.sh5
-rw-r--r--meta/packages/libgtkstylus/libgtkstylus_0.5.bb24
-rw-r--r--meta/packages/libical/libical_0.44.bb11
-rw-r--r--meta/packages/libiconv/libiconv_1.9.2.bb21
-rw-r--r--meta/packages/libidl/libidl_0.8.12.bb16
-rw-r--r--meta/packages/libidn/libidn_0.6.14.bb26
-rw-r--r--meta/packages/libidn/libidn_1.19.bb20
-rw-r--r--meta/packages/libmpc/libmpc.inc6
-rw-r--r--meta/packages/libmpc/libmpc_0.8.2.bb14
-rw-r--r--meta/packages/libnl/libnl/compilefix.patch12
-rw-r--r--meta/packages/libnl/libnl/local-includes.patch11
-rw-r--r--meta/packages/libnl/libnl_1.1.bb16
-rw-r--r--meta/packages/libnss-mdns/files/alignment-fix.patch11
-rw-r--r--meta/packages/libnss-mdns/libnss-mdns_0.10.bb36
-rw-r--r--meta/packages/liboil/liboil-0.3.17/no-tests.patch22
-rw-r--r--meta/packages/liboil/liboil_0.3.17.bb20
-rw-r--r--meta/packages/libomxil/libomxil_0.3.3.bb16
-rw-r--r--meta/packages/libpcap/libpcap-1.1.1/aclocal.patch165
-rw-r--r--meta/packages/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch22
-rw-r--r--meta/packages/libpcap/libpcap.inc24
-rw-r--r--meta/packages/libpcap/libpcap_1.1.1.bb17
-rw-r--r--meta/packages/libpcre/files/pcre-cross.patch25
-rw-r--r--meta/packages/libpcre/libpcre_8.10.bb53
-rw-r--r--meta/packages/libproxy/libproxy_0.4.3.bb26
-rw-r--r--meta/packages/librds/librds_0.0.1.bb11
-rw-r--r--meta/packages/librsvg/librsvg_2.18.2.bb31
-rw-r--r--meta/packages/librsvg/librsvg_2.22.3.bb31
-rw-r--r--meta/packages/librsvg/librsvg_2.26.3.bb41
-rw-r--r--meta/packages/libsdl/files/acinclude.m4189
-rw-r--r--meta/packages/libsdl/files/configure_tweak.patch1167
-rw-r--r--meta/packages/libsdl/files/directfb_obsolete_calls.patch33
-rw-r--r--meta/packages/libsdl/files/extra-keys.patch53
-rw-r--r--meta/packages/libsdl/files/kernel-asm-page.patch13
-rw-r--r--meta/packages/libsdl/libsdl-nativesdk_1.2.11.bb31
-rw-r--r--meta/packages/libsoup/libsoup-2.4_2.31.2.bb17
-rw-r--r--meta/packages/libsoup/libsoup-2.4_2.4.1.bb11
-rw-r--r--meta/packages/libsoup/libsoup_2.2.100.bb14
-rw-r--r--meta/packages/liburcu/liburcu_0.4.6.bb24
-rw-r--r--meta/packages/libusb/libusb-compat-0.1.3/0.1.0-beta1-gcc3.4-fix.patch13
-rw-r--r--meta/packages/libusb/libusb-compat_0.1.3.bb23
-rw-r--r--meta/packages/libusb/libusb1_1.0.8.bb14
-rw-r--r--meta/packages/libxslt/libxslt/pkgconfig_fix.patch22
-rw-r--r--meta/packages/libxslt/libxslt_1.1.26.bb26
-rw-r--r--meta/packages/lrzsz/lrzsz-0.12.20/autotools.patch37
-rw-r--r--meta/packages/lrzsz/lrzsz-0.12.20/gettext.patch21882
-rw-r--r--meta/packages/lrzsz/lrzsz-0.12.20/makefile.patch20
-rw-r--r--meta/packages/lrzsz/lrzsz_0.12.20.bb33
-rw-r--r--meta/packages/lsof/lsof_4.83.bb41
-rw-r--r--meta/packages/lzo/lzo-2.03/acinclude.m4358
-rw-r--r--meta/packages/lzo/lzo-2.03/autofoo.patch17
-rw-r--r--meta/packages/lzo/lzo_2.03.bb22
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless-services/confighack.patch13
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless-services_git.bb14
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/0001-Adds-initial-Gtk-clipboard-support-to-moz-headless.patch1478
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/autoconffix.patch66
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/buildfixhack.patch14
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/configurefix-1a622cb7c384.patch764
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/configurefix.patch774
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/i386/jsautocfg.h21
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/i486/jsautocfg.h21
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/i586/jsautocfg.h21
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/i686/jsautocfg.h21
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/mozconfig23
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/mozilla-jemalloc.patch24
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/removebadrpath-1a622cb7c384.patch26
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless/removebadrpath.patch44
-rw-r--r--meta/packages/mozilla-headless/mozilla-headless_hg.bb99
-rw-r--r--meta/packages/mozilla/files/eabi-fix.patch66
-rw-r--r--meta/packages/mozilla/files/eabi-fix2.patch56
-rw-r--r--meta/packages/mozilla/files/eabi-fix3.patch15
-rw-r--r--meta/packages/mozilla/files/minimo.desktop9
-rw-r--r--meta/packages/mozilla/files/minimo.pngbin4323 -> 0 bytes
-rw-r--r--meta/packages/mozilla/minimo/bug-322806.diff13
-rw-r--r--meta/packages/mozilla/minimo/minimo4
-rw-r--r--meta/packages/mozilla/minimo/minimo.patch356
-rw-r--r--meta/packages/mozilla/minimo/minimo.pngbin4323 -> 0 bytes
-rw-r--r--meta/packages/mozilla/minimo/mozconfig36
-rw-r--r--meta/packages/mozilla/minimo_cvs.bb153
-rw-r--r--meta/packages/nasm/nasm_2.07.bb24
-rw-r--r--meta/packages/ncurses/ncurses.inc99
-rw-r--r--meta/packages/ncurses/ncurses/makefile_tweak.patch89
-rw-r--r--meta/packages/ncurses/ncurses/visibility.patch4904
-rw-r--r--meta/packages/ncurses/ncurses_5.4.bb8
-rw-r--r--meta/packages/neon/neon-0.29.3/pkgconfig.patch16
-rw-r--r--meta/packages/neon/neon_0.29.3.bb16
-rw-r--r--meta/packages/network-suspend-scripts/network-suspend-scripts.bb22
-rw-r--r--meta/packages/network-suspend-scripts/network-suspend-scripts/ifupdown26
-rw-r--r--meta/packages/network-suspend-scripts/network-suspend-scripts/usbnet16
-rw-r--r--meta/packages/networkmanager/files/70NetworkManagerApplet.shbg4
-rw-r--r--meta/packages/networkmanager/files/99_networkmanager1
-rw-r--r--meta/packages/networkmanager/files/NetworkManager43
-rw-r--r--meta/packages/networkmanager/files/allow-disabling.patch45
-rw-r--r--meta/packages/networkmanager/files/applet-no-animation.patch234
-rw-r--r--meta/packages/networkmanager/files/applet-no-gnome.diff59
-rw-r--r--meta/packages/networkmanager/files/libnlfix.patch29
-rw-r--r--meta/packages/networkmanager/files/makefile-fix.patch17
-rw-r--r--meta/packages/networkmanager/files/nmutil-fix.patch12
-rw-r--r--meta/packages/networkmanager/files/no-restarts.diff21
-rw-r--r--meta/packages/networkmanager/files/no_vpn.patch13
-rw-r--r--meta/packages/networkmanager/networkmanager-applet_svn.bb33
-rw-r--r--meta/packages/networkmanager/networkmanager_svn.bb51
-rw-r--r--meta/packages/nfs-utils/libnfsidmap_0.23.bb13
-rw-r--r--meta/packages/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch18
-rw-r--r--meta/packages/nfs-utils/nfs-utils/nfsserver161
-rw-r--r--meta/packages/nfs-utils/nfs-utils_1.2.2.bb51
-rw-r--r--meta/packages/oh/qemu-config.bb36
-rw-r--r--meta/packages/oh/qemu-config/anjuta-remote-run7
-rw-r--r--meta/packages/oh/qemu-config/distcc.sh4
-rw-r--r--meta/packages/oh/qemu-config/exports1
-rwxr-xr-xmeta/packages/oh/qemu-config/qemu-autostart37
-rw-r--r--meta/packages/oh/qemu-config/qemuarm/shutdown.desktop10
-rw-r--r--meta/packages/oh/qemu-config/shutdown.desktop10
-rw-r--r--meta/packages/oh/usbinit.bb18
-rwxr-xr-xmeta/packages/oh/usbinit/usb-gether23
-rw-r--r--meta/packages/ohm/ohm/fix_configure.patch39
-rw-r--r--meta/packages/ohm/ohm_git.bb44
-rw-r--r--meta/packages/openobex/files/disable-cable-test.patch16
-rw-r--r--meta/packages/openobex/files/libusb_crosscompile_check.patch13
-rw-r--r--meta/packages/openobex/openobex_1.5.bb23
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/configure-targets.patch24
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/ca.patch20
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/config-hurd.patch15
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/debian-targets.patch54
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/engines-path.patch47
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch13
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/make-targets.patch13
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/man-dir.patch13
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/man-section.patch32
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/no-rpath.patch13
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/no-symbolic.patch13
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/perl-path.diff760
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/pic.patch301
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/pkg-config.patch34
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/rc4-amd64.patch14
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/rehash-crt.patch33
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/rehash_pod.patch60
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/series20
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch14
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/stddef.patch12
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/valgrind.patch15
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/version-script.patch33
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/shared-libs.patch48
-rw-r--r--meta/packages/openssl/openssl.inc100
-rw-r--r--meta/packages/openssl/openssl_0.9.8o.bb28
-rw-r--r--meta/packages/openswan/openswan-2.4.7/installflags.patch13
-rw-r--r--meta/packages/openswan/openswan-2.4.7/ld-library-path-breakage.patch26
-rw-r--r--meta/packages/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch377
-rw-r--r--meta/packages/openswan/openswan_2.4.7.bb36
-rw-r--r--meta/packages/opensync/libopensync-0.37/build-in-src.patch18
-rw-r--r--meta/packages/opensync/libopensync-0.37/cmake.patch17
-rw-r--r--meta/packages/opensync/libopensync-0.37/no-python-check.patch16
-rw-r--r--meta/packages/opensync/libopensync-plugin-evolution2/0.37-fixes.patch23
-rw-r--r--meta/packages/opensync/libopensync-plugin-evolution2_0.36.bb7
-rw-r--r--meta/packages/opensync/libopensync-plugin-file_0.37.bb1
-rw-r--r--meta/packages/opensync/libopensync-plugin-google-calendar_0.36.bb1
-rw-r--r--meta/packages/opensync/libopensync-plugin-irmc_0.36.bb3
-rw-r--r--meta/packages/opensync/libopensync-plugin-syncml/fixerror.patch13
-rw-r--r--meta/packages/opensync/libopensync-plugin-syncml_0.38.bb7
-rw-r--r--meta/packages/opensync/libopensync-plugin-vformat_0.37.bb3
-rw-r--r--meta/packages/opensync/libopensync-plugin_0.36.inc9
-rw-r--r--meta/packages/opensync/libopensync_0.37.bb25
-rw-r--r--meta/packages/opensync/libsyncml/build-in-src.patch19
-rw-r--r--meta/packages/opensync/libsyncml_0.5.4.bb17
-rw-r--r--meta/packages/opensync/msynctool_0.37.bb7
-rw-r--r--meta/packages/pam/libpam-1.1.1/99_pam1
-rw-r--r--meta/packages/pam/libpam-1.1.1/disable_crossbinary.patch34
-rw-r--r--meta/packages/pam/libpam-1.1.1/pam.d/common-account25
-rw-r--r--meta/packages/pam/libpam-1.1.1/pam.d/common-auth18
-rw-r--r--meta/packages/pam/libpam-1.1.1/pam.d/common-password26
-rw-r--r--meta/packages/pam/libpam-1.1.1/pam.d/common-session19
-rw-r--r--meta/packages/pam/libpam-1.1.1/pam.d/common-session-noninteractive19
-rw-r--r--meta/packages/pam/libpam-1.1.1/pam.d/other27
-rw-r--r--meta/packages/pam/libpam_1.1.1.bb73
-rw-r--r--meta/packages/parted/parted-1.9.0/no_check.patch18
-rw-r--r--meta/packages/parted/parted-1.9.0/syscalls.patch53
-rw-r--r--meta/packages/parted/parted_1.9.0.bb16
-rw-r--r--meta/packages/pm-utils/pm-utils_1.3.0.bb16
-rw-r--r--meta/packages/polkit/polkit-gnome_0.96.bb18
-rw-r--r--meta/packages/polkit/polkit_0.96.bb14
-rw-r--r--meta/packages/pong-clock/pong-clock/pong-clock-no-flicker.c410
-rw-r--r--meta/packages/pong-clock/pong-clock_1.0.bb16
-rw-r--r--meta/packages/poppler/poppler-data_0.1.bb16
-rw-r--r--meta/packages/poppler/poppler-fpu.inc6
-rw-r--r--meta/packages/poppler/poppler.inc18
-rw-r--r--meta/packages/poppler/poppler_0.9.2.bb2
-rw-r--r--meta/packages/popt/popt_1.16.bb14
-rw-r--r--meta/packages/portmap/portmap-6.0/destdir-no-strip.patch44
-rw-r--r--meta/packages/portmap/portmap-6.0/tcpd-config.patch28
-rw-r--r--meta/packages/portmap/portmap.inc31
-rwxr-xr-xmeta/packages/portmap/portmap/portmap.init59
-rw-r--r--meta/packages/portmap/portmap_6.0.bb20
-rw-r--r--meta/packages/ppp-dialin/files/host-peer11
-rw-r--r--meta/packages/ppp-dialin/files/ppp-dialin3
-rw-r--r--meta/packages/ppp-dialin/ppp-dialin_0.1.bb35
-rw-r--r--meta/packages/ppp/ppp-2.4.5/08setupdns12
-rw-r--r--meta/packages/ppp/ppp-2.4.5/92removedns5
-rw-r--r--meta/packages/ppp/ppp-2.4.5/cifdefroute.patch290
-rw-r--r--meta/packages/ppp/ppp-2.4.5/enable-ipv6.patch13
-rwxr-xr-xmeta/packages/ppp/ppp-2.4.5/init50
-rwxr-xr-xmeta/packages/ppp/ppp-2.4.5/ip-down43
-rwxr-xr-xmeta/packages/ppp/ppp-2.4.5/ip-up44
-rw-r--r--meta/packages/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch19
-rw-r--r--meta/packages/ppp/ppp-2.4.5/makefile.patch93
-rw-r--r--meta/packages/ppp/ppp-2.4.5/poff26
-rw-r--r--meta/packages/ppp/ppp-2.4.5/pon9
-rw-r--r--meta/packages/ppp/ppp-2.4.5/pppd-resolv-varrun.patch43
-rw-r--r--meta/packages/ppp/ppp_2.4.5.bb77
-rw-r--r--meta/packages/psmisc/files/libintl-link.patch29
-rw-r--r--meta/packages/psmisc/psmisc.inc55
-rw-r--r--meta/packages/psmisc/psmisc_22.2.bb2
-rw-r--r--meta/packages/pth/pth_2.0.7.bb21
-rw-r--r--meta/packages/readline/files/acinclude.m41815
-rw-r--r--meta/packages/readline/files/configure-fix.patch24
-rw-r--r--meta/packages/readline/readline.inc34
-rw-r--r--meta/packages/readline/readline_5.2.bb35
-rw-r--r--meta/packages/readline/readline_6.1.bb3
-rw-r--r--meta/packages/resolvconf/resolvconf_1.43.bb30
-rw-r--r--meta/packages/rsync/rsync-2.6.9/rsyncd.conf15
-rw-r--r--meta/packages/rxvt-unicode/files/makefile.patch20
-rw-r--r--meta/packages/rxvt-unicode/files/rxvt.desktop11
-rw-r--r--meta/packages/rxvt-unicode/files/rxvt.pngbin2847 -> 0 bytes
-rw-r--r--meta/packages/rxvt-unicode/files/signedchar.patch11
-rw-r--r--meta/packages/rxvt-unicode/files/xwc.patch28
-rw-r--r--meta/packages/rxvt-unicode/rxvt-unicode-5.6/xwc.patch24
-rw-r--r--meta/packages/rxvt-unicode/rxvt-unicode_5.6.bb72
-rw-r--r--meta/packages/sed/sed-4.1.2/fix_return_type.patch16
-rw-r--r--meta/packages/sed/sed_4.1.2.bb32
-rw-r--r--meta/packages/setserial/setserial_2.17.bb18
-rw-r--r--meta/packages/shared-mime-info/shared-mime-info.inc28
-rw-r--r--meta/packages/shared-mime-info/shared-mime-info_0.71.bb1
-rw-r--r--meta/packages/smart/smart_1.1.bb29
-rw-r--r--meta/packages/speex/speex_1.2rc1.bb24
-rw-r--r--meta/packages/sqlite/sqlite3.inc33
-rw-r--r--meta/packages/sqlite/sqlite3/libtool.patch25
-rw-r--r--meta/packages/sqlite/sqlite3_3.6.23.1.bb3
-rw-r--r--meta/packages/strace/strace_4.5.20.bb11
-rw-r--r--meta/packages/sudo/files/autofoo.patch143
-rw-r--r--meta/packages/sudo/files/noexec-link.patch17
-rw-r--r--meta/packages/sudo/files/nostrip.patch23
-rw-r--r--meta/packages/sudo/site/bit-322
-rw-r--r--meta/packages/sudo/site/bit-642
-rw-r--r--meta/packages/sudo/sudo.inc36
-rw-r--r--meta/packages/sudo/sudo_1.7.2p7.bb7
-rw-r--r--meta/packages/sync/libsync_svn.bb19
-rw-r--r--meta/packages/sysfsutils/sysfsutils_2.1.0.bb21
-rw-r--r--meta/packages/tar/tar-1.17/m4extensions.patch28
-rw-r--r--meta/packages/tar/tar.inc25
-rw-r--r--meta/packages/tar/tar_1.17.bb14
-rw-r--r--meta/packages/tar/tar_1.23.bb9
-rw-r--r--meta/packages/tcf-agent/tcf-agent/fix_tcf-agent.init.patch92
-rw-r--r--meta/packages/tcf-agent/tcf-agent/terminals_agent.patch1025
-rw-r--r--meta/packages/tcf-agent/tcf-agent_svn.bb36
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff75
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch248
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch103
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch30
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch1253
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch151
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch45
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch81
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch253
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch66
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch12
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch71
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch19
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch43
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch21
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch37
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff39
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/safe_finger.834
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch29
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch34
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch30
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/size_t.patch42
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch39
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers-7.6/try-from.828
-rw-r--r--meta/packages/tcp-wrappers/tcp-wrappers_7.6.bb117
-rw-r--r--meta/packages/tzcode/tzcode-native_2009r.bb17
-rw-r--r--meta/packages/tzdata/tzdata_2010j.bb160
-rw-r--r--meta/packages/uboot/files/fix-arm920t-eabi.patch22
-rw-r--r--meta/packages/uboot/u-boot-mkimage-native_1.3.2.bb23
-rw-r--r--meta/packages/uboot/u-boot-mkimage_2009.08.bb25
-rw-r--r--meta/packages/uboot/u-boot-omap3-git/beagleboard/name.patch14
-rw-r--r--meta/packages/uboot/u-boot-omap3_git.bb20
-rw-r--r--meta/packages/uboot/u-boot.inc38
-rw-r--r--meta/packages/ubootchart/files/sysvinit.patch12
-rw-r--r--meta/packages/ubootchart/files/ubootchart-stop3
-rw-r--r--meta/packages/ubootchart/files/ubootchart.desktop6
-rw-r--r--meta/packages/ubootchart/ubootchart_svn.bb37
-rw-r--r--meta/packages/unzip/unzip_6.0.bb25
-rw-r--r--meta/packages/usbutils/usbutils_0.86.bb24
-rw-r--r--meta/packages/util-linux/files/MCONFIG223
-rw-r--r--meta/packages/util-linux/files/debian-bug392236.patch203
-rw-r--r--meta/packages/util-linux/files/defines.h10
-rw-r--r--meta/packages/util-linux/files/fdiskbsdlabel_thumb.diff12
-rw-r--r--meta/packages/util-linux/files/fix-make-c.patch41
-rw-r--r--meta/packages/util-linux/files/gcc34.patch23
-rw-r--r--meta/packages/util-linux/files/glibc-fix.patch22
-rw-r--r--meta/packages/util-linux/files/make_include17
-rw-r--r--meta/packages/util-linux/files/optional-uuid.patch55
-rw-r--r--meta/packages/util-linux/files/swapargs.h3
-rw-r--r--meta/packages/util-linux/files/umount.diff19
-rw-r--r--meta/packages/util-linux/files/uuid.patch22
-rw-r--r--meta/packages/util-linux/util-linux-2.17.2/tls.patch70
-rw-r--r--meta/packages/util-linux/util-linux-2.17.2/uclibc-compile.patch13
-rw-r--r--meta/packages/util-linux/util-linux-2.17.2/util-linux-ng-replace-siginterrupt.patch23
-rw-r--r--meta/packages/util-linux/util-linux.inc237
-rw-r--r--meta/packages/util-linux/util-linux_2.17.2.bb11
-rw-r--r--meta/packages/vte/vte.inc14
-rw-r--r--meta/packages/vte/vte_0.24.3.bb5
-rw-r--r--meta/packages/watchdog/watchdog_5.9.bb16
-rw-r--r--meta/packages/wbxml/files/no-doc-install.patch15
-rw-r--r--meta/packages/wbxml/wbxml2_0.9.2.bb20
-rw-r--r--meta/packages/webkit/files/GNUmakefile.am856
-rw-r--r--meta/packages/webkit/files/Makefile17
-rw-r--r--meta/packages/webkit/files/Makefile.shared18
-rw-r--r--meta/packages/webkit/files/WebKit.pri107
-rw-r--r--meta/packages/webkit/files/WebKit.pro21
-rwxr-xr-xmeta/packages/webkit/files/autogen.sh63
-rw-r--r--meta/packages/webkit/files/configure.ac983
-rw-r--r--meta/packages/webkit/files/fix_im.patch0
-rw-r--r--meta/packages/webkit/files/gtk-doc.make173
-rw-r--r--meta/packages/webkit/webkit-gtk_svn.bb71
-rw-r--r--meta/packages/wv/wv-1.2.0/pkgconfig.patch13
-rw-r--r--meta/packages/wv/wv_1.2.0.bb14
-rw-r--r--meta/packages/x11vnc/x11vnc_0.9.3.bb11
-rw-r--r--meta/packages/xournal/files/ldflags.patch15
-rw-r--r--meta/packages/xournal/files/no-printing.diff178
-rw-r--r--meta/packages/xournal/xournal_0.2.bb12
-rw-r--r--meta/packages/xrestop/xrestop_0.4.bb16
-rw-r--r--meta/packages/xvideo-tests/xvideo-tests_svn.bb13
-rw-r--r--meta/packages/yaffs2/files/mkyaffs2image.patch345
-rw-r--r--meta/packages/yaffs2/files/yaffs2-unioob.patch216
-rw-r--r--meta/packages/yaffs2/yaffs2-utils.inc27
-rw-r--r--meta/packages/yaffs2/yaffs2-utils_cvs.bb3
-rw-r--r--meta/packages/zile/files/for_build.patch64
-rw-r--r--meta/packages/zile/zile_1.7+2.0beta6.bb19
-rw-r--r--meta/packages/zip/zip.inc24
-rw-r--r--meta/packages/zip/zip_3.0.bb6
549 files changed, 0 insertions, 63126 deletions
diff --git a/meta/packages/apmd/apmd-3.2.2-14/apmd_proxy b/meta/packages/apmd/apmd-3.2.2-14/apmd_proxy
deleted file mode 100644
index c48ee4e5d5..0000000000
--- a/meta/packages/apmd/apmd-3.2.2-14/apmd_proxy
+++ /dev/null
@@ -1,91 +0,0 @@
1#!/bin/sh
2#
3# apmd_proxy - program dispatcher for APM daemon
4#
5# Written by Craig Markwardt (craigm@lheamail.gsfc.nasa.gov) 21 May 1999
6# Modified for Debian by Avery Pennarun
7#
8# This shell script is called by the APM daemon (apmd) when a power
9# management event occurs. Its first and second arguments describe the
10# event. For example, apmd will call "apmd_proxy suspend system" just
11# before the system is suspended.
12#
13# Here are the possible arguments:
14#
15# start - APM daemon has started
16# stop - APM daemon is shutting down
17# suspend critical - APM system indicates critical suspend (++)
18# suspend system - APM system has requested suspend mode
19# suspend user - User has requested suspend mode
20# standby system - APM system has requested standby mode
21# standby user - User has requested standby mode
22# resume suspend - System has resumed from suspend mode
23# resume standby - System has resumed from standby mode
24# resume critical - System has resumed from critical suspend
25# change battery - APM system reported low battery
26# change power - APM system reported AC/battery change
27# change time - APM system reported time change (*)
28# change capability - APM system reported config. change (+)
29#
30# (*) - APM daemon may be configured to not call these sequences
31# (+) - Available if APM kernel supports it.
32# (++) - "suspend critical" is never passed to apmd from the kernel,
33# so we will never see it here. Scripts that process "resume
34# critical" events need to take this into account.
35#
36# It is the proxy script's responsibility to examine the APM status
37# (via /proc/apm) or other status and to take appropriate actions.
38# For example, the script might unmount network drives before the
39# machine is suspended.
40#
41# In Debian, the usual way of adding functionality to the proxy is to
42# add a script to /etc/apm/event.d. This script will be called by
43# apmd_proxy (via run-parts) with the same arguments.
44#
45# If it is important that a certain set of script be run in a certain
46# order on suspend and in a different order on resume, then put all
47# the scripts in /etc/apm/scripts.d instead of /etc/apm/event.d and
48# symlink to these from /etc/apm/suspend.d, /etc/apm/resume.d and
49# /etc/apm/other.d using names whose lexicographical order is the same
50# as the desired order of execution.
51#
52# If the kernel's APM driver supports it, apmd_proxy can return a non-zero
53# exit status on suspend and standby events, indicating that the suspend
54# or standby event should be rejected.
55#
56# *******************************************************************
57
58set -e
59
60# The following doesn't yet work, because current kernels (up to at least
61# 2.4.20) do not support rejection of APM events. Supporting this would
62# require substantial modifications to the APM driver. We will re-enable
63# this feature if the driver is ever modified. -- cph@debian.org
64#
65#SUSPEND_ON_AC=false
66#[ -r /etc/apm/apmd_proxy.conf ] && . /etc/apm/apmd_proxy.conf
67#
68#if [ "${SUSPEND_ON_AC}" = "false" -a "${2}" = "system" ] \
69# && on_ac_power >/dev/null; then
70# # Reject system suspends and standbys if we are on AC power
71# exit 1 # Reject (NOTE kernel support must be enabled)
72#fi
73
74if [ "${1}" = "suspend" -o "${1}" = "standby" ]; then
75 run-parts -a "${1}" -a "${2}" /etc/apm/event.d
76 if [ -d /etc/apm/suspend.d ]; then
77 run-parts -a "${1}" -a "${2}" /etc/apm/suspend.d
78 fi
79elif [ "${1}" = "resume" ]; then
80 if [ -d /etc/apm/resume.d ]; then
81 run-parts -a "${1}" -a "${2}" /etc/apm/resume.d
82 fi
83 run-parts -a "${1}" -a "${2}" /etc/apm/event.d
84else
85 run-parts -a "${1}" -a "${2}" /etc/apm/event.d
86 if [ -d /etc/apm/other.d ]; then
87 run-parts -a "${1}" -a "${2}" /etc/apm/other.d
88 fi
89fi
90
91exit 0
diff --git a/meta/packages/apmd/apmd-3.2.2-14/apmd_proxy.conf b/meta/packages/apmd/apmd-3.2.2-14/apmd_proxy.conf
deleted file mode 100644
index 751145c522..0000000000
--- a/meta/packages/apmd/apmd-3.2.2-14/apmd_proxy.conf
+++ /dev/null
@@ -1,16 +0,0 @@
1# /etc/apm/apmd_proxy.conf: configuration file for apmd.
2#
3# This file is managed by debconf when installing or reconfiguring the
4# package. It is generated by merging the answers gathered by debconf
5# into the template file "/usr/share/apmd/apmd_proxy.conf".
6
7# The following doesn't yet work, because current kernels (up to at least
8# 2.4.20) do not support rejection of APM events. Supporting this would
9# require substantial modifications to the APM driver. We will re-enable
10# this feature if the driver is ever modified. -- cph@debian.org
11#
12# Set the following to "false" if you want to reject system suspend or
13# system standby requests when the computer is running on AC power.
14# Otherwise set this to "true". Such requests are never rejected when
15# the computer is running on battery power.
16#SUSPEND_ON_AC=true
diff --git a/meta/packages/apmd/apmd-3.2.2-14/default b/meta/packages/apmd/apmd-3.2.2-14/default
deleted file mode 100644
index 4b7965abf8..0000000000
--- a/meta/packages/apmd/apmd-3.2.2-14/default
+++ /dev/null
@@ -1,8 +0,0 @@
1#
2# Default for /etc/init.d/apmd
3#
4
5# As apmd can be called with arguments, we use the following variable
6# to store them, e.g., APMD="-w 5 -p 2".
7# See the manual page apmd(8) for details.
8APMD="--proxy-timeout 30"
diff --git a/meta/packages/apmd/apmd-3.2.2-14/init b/meta/packages/apmd/apmd-3.2.2-14/init
deleted file mode 100755
index 268d4b26b7..0000000000
--- a/meta/packages/apmd/apmd-3.2.2-14/init
+++ /dev/null
@@ -1,44 +0,0 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: apmd
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Advanced Power Management daemon
9### END INIT INFO
10
11PATH=/bin:/usr/bin:/sbin:/usr/sbin
12
13[ -f /etc/default/rcS ] && . /etc/default/rcS
14[ -f /etc/default/apmd ] && . /etc/default/apmd
15
16case "$1" in
17 start)
18 echo -n "Starting advanced power management daemon: "
19 start-stop-daemon -S -x /usr/sbin/apmd -- \
20 -P /etc/apm/apmd_proxy $APMD
21 if [ $? = 0 ]; then
22 echo "apmd."
23 else
24 echo "(failed.)"
25 fi
26 ;;
27 stop)
28 echo -n "Stopping advanced power management daemon: "
29 start-stop-daemon -K \
30 -x /usr/sbin/apmd
31 echo "apmd."
32 ;;
33 restart|force-reload)
34 $0 stop
35 $0 start
36 exit
37 ;;
38 *)
39 echo "Usage: /etc/init.d/apmd {start|stop|restart|force-reload}"
40 exit 1
41 ;;
42esac
43
44exit 0
diff --git a/meta/packages/apmd/apmd-3.2.2-14/libtool.patch b/meta/packages/apmd/apmd-3.2.2-14/libtool.patch
deleted file mode 100644
index 711e777084..0000000000
--- a/meta/packages/apmd/apmd-3.2.2-14/libtool.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1# Add by RP to address "unable to infer tagged configuration" error:
2# commit 35de05e61b88c0808a5e885bb0efdf420555d5ad
3# Author: Richard Purdie <rpurdie@rpsys.net>
4# Date: Sun Jun 1 16:13:38 2008 +0000
5#
6# apmd: Use libtool --tag options to avoid problems with libtool 2.2.4 (from poky)
7#
8# However I didn't see same issue with current libtool-2.2.10. Also per my understanding,
9# the default tag, if not specified, falls back to CC. So disable it from patching, but
10# keep it here. If we encounter similar issue in the future, we could then push upstream
11#
12# Comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-16
13
14Index: apmd-3.2.2.orig/Makefile
15===================================================================
16--- apmd-3.2.2.orig.orig/Makefile 2004-01-04 08:13:18.000000000 +0000
17+++ apmd-3.2.2.orig/Makefile 2008-04-21 17:10:03.000000000 +0100
18@@ -58,9 +57,8 @@
19 #CFLAGS=-O3 -m486 -fomit-frame-pointer
20 #LDFLAGS=-s
21
22-LIBTOOL=libtool --quiet
23-LT_COMPILE = $(LIBTOOL) --mode=compile $(CC)
24-LT_LINK = $(LIBTOOL) --mode=link $(CC)
25+LT_COMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC)
26+LT_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC)
27 LT_INSTALL = $(LIBTOOL) --mode=install install
28 LT_CLEAN = $(LIBTOOL) --mode=clean rm
29
diff --git a/meta/packages/apmd/apmd-3.2.2-14/unlinux.patch b/meta/packages/apmd/apmd-3.2.2-14/unlinux.patch
deleted file mode 100644
index c64e7df524..0000000000
--- a/meta/packages/apmd/apmd-3.2.2-14/unlinux.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1# copy OE commit message here:
2# commit 9456cdc1cf43e3ba9e6d88c63560c1b6fdee4359
3# Author: Michael Krelin <hacker@klever.net>
4# Date: Tue May 29 12:27:45 2007 +0000
5#
6# apmd: prevent build from interferring with host kernel headers. Closes #1257
7#
8# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-13
9
10--- apmd-3.2.2.orig/Makefile
11+++ apmd-3.2.2/Makefile
12@@ -43,8 +43,7 @@
13
14 CC=gcc
15 CFLAGS=-O -g
16-XTRACFLAGS=-Wall -pipe -I. -I/usr/src/linux/include -I/usr/X11R6/include \
17- -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include \
18+XTRACFLAGS=-Wall -pipe -I. \
19 -DVERSION=\"$(VERSION)\" \
20 -DDEFAULT_PROXY_NAME=\"$(PROXY_DIR)/apmd_proxy\"
21 LDFLAGS=
diff --git a/meta/packages/apmd/apmd-3.2.2-14/workaround.patch b/meta/packages/apmd/apmd-3.2.2-14/workaround.patch
deleted file mode 100644
index d37380397c..0000000000
--- a/meta/packages/apmd/apmd-3.2.2-14/workaround.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1# this workaround is there in OE since 2003. It looks to provide a workaround
2# allowing others sending SIGUSR1 to cause an apm suspend event. Disable it for
3# now.
4#
5# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-13
6#
7# Patch managed by http://www.holgerschurig.de/patcher.html
8#
9
10--- apmd-3.2.2.orig/apmd.c~workaround.patch
11+++ apmd-3.2.2.orig/apmd.c
12@@ -158,6 +158,7 @@
13 static int quiet_bios_batlow; /* = 0 */
14 static int verbosity = DEFAULT_VERBOSITY;
15 static int warn_level = 10;
16+static int sleep_now = 0; /* ntp */
17
18 static uid_t apmd_uid = 0;
19 static int apmd_fd = -1;
20@@ -942,6 +943,12 @@
21 exit(0);
22 }
23
24+/* ntp */
25+static void sig_usr1(int sig)
26+{
27+ sleep_now = 1;
28+}
29+
30 int main(int argc, char **argv)
31 {
32 int c;
33@@ -1151,6 +1158,8 @@
34 openlog("apmd", (verbosity>=LOG_DEBUG)?LOG_PERROR:0 | LOG_PID | LOG_CONS, LOG_DAEMON);
35
36 /* Set up signal handler */
37+ if (signal(SIGUSR1, SIG_IGN) != SIG_IGN)
38+ signal(SIGUSR1, sig_usr1); /* ntp */
39 if (signal(SIGINT, SIG_IGN) != SIG_IGN)
40 signal(SIGINT, sig_handler);
41 if (signal(SIGQUIT, SIG_IGN) != SIG_IGN)
42@@ -1230,9 +1239,16 @@
43
44 for (;;)
45 {
46- int num_events = apm_get_events(apmd_fd, check_interval, events, MAX_EVENTS);
47+ int num_events;
48 int e, a;
49
50+ /* ntp */
51+ if (sleep_now) {
52+ sleep_now = 0;
53+ handle_event(APM_USER_SUSPEND, &apminfo);
54+ }
55+
56+ num_events = apm_get_events(apmd_fd, check_interval, events, MAX_EVENTS);
57 apm_read(&apminfo);
58
59 if (num_events == 0) {
diff --git a/meta/packages/apmd/apmd_3.2.2-14.bb b/meta/packages/apmd/apmd_3.2.2-14.bb
deleted file mode 100644
index 2778cc69e8..0000000000
--- a/meta/packages/apmd/apmd_3.2.2-14.bb
+++ /dev/null
@@ -1,63 +0,0 @@
1DESCRIPTION = "Set of tools for managing notebook power consumption."
2SECTION = "base"
3PRIORITY = "required"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
6 file://apm.h;firstline=6;endline=18;md5=c9a1f79036ab14aa157e15ed75ffd769"
7DEPENDS = "libtool-cross"
8PR = "r1"
9
10SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz \
11 ${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.diff.gz \
12 file://libtool.patch \
13 file://unlinux.patch \
14 file://init \
15 file://default \
16 file://apmd_proxy \
17 file://apmd_proxy.conf"
18
19S = "${WORKDIR}/apmd-3.2.2.orig"
20
21inherit update-rc.d
22
23INITSCRIPT_NAME = "apmd"
24INITSCRIPT_PARAMS = "defaults"
25
26do_compile() {
27 # apmd doesn't use whole autotools. Just libtool for installation
28 oe_runmake "LIBTOOL=${STAGING_BINDIR_CROSS}/${TARGET_PREFIX}libtool" apm apmd
29}
30
31do_install() {
32 install -d ${D}${sysconfdir}
33 install -d ${D}${sysconfdir}/apm
34 install -d ${D}${sysconfdir}/apm/event.d
35 install -d ${D}${sysconfdir}/apm/other.d
36 install -d ${D}${sysconfdir}/apm/suspend.d
37 install -d ${D}${sysconfdir}/apm/resume.d
38 install -d ${D}${sysconfdir}/apm/scripts.d
39 install -d ${D}${sysconfdir}/default
40 install -d ${D}${sysconfdir}/init.d
41 install -d ${D}${sbindir}
42 install -d ${D}${bindir}
43 install -d ${D}${libdir}
44 install -d ${D}${datadir}/apmd
45 install -d ${D}${includedir}
46
47 install -m 4755 ${S}/.libs/apm ${D}${bindir}/apm
48 install -m 0755 ${S}/.libs/apmd ${D}${sbindir}/apmd
49 install -m 0755 ${WORKDIR}/apmd_proxy ${D}${sysconfdir}/apm/
50 install -m 0644 ${WORKDIR}/apmd_proxy.conf ${D}${datadir}/apmd/
51 install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/apmd
52 oe_libinstall -so libapm ${D}${libdir}
53 install -m 0644 apm.h ${D}${includedir}
54
55 cat ${WORKDIR}/init | sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' > ${D}${sysconfdir}/init.d/apmd
56 chmod 755 ${D}${sysconfdir}/init.d/apmd
57}
58
59PACKAGES =+ "libapm libapm-dev apm"
60
61FILES_libapm = "${libdir}/libapm.so.*"
62FILES_libapm-dev = "${libdir}/libapm.* ${includedir}"
63FILES_apm = "${bindir}/apm*"
diff --git a/meta/packages/apr/apr-util/configfix.patch b/meta/packages/apr/apr-util/configfix.patch
deleted file mode 100644
index a8953e5244..0000000000
--- a/meta/packages/apr/apr-util/configfix.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1Index: apr-util-1.3.4/apu-config.in
2===================================================================
3--- apr-util-1.3.4.orig/apu-config.in 2009-01-12 17:08:06.000000000 +0000
4+++ apr-util-1.3.4/apu-config.in 2009-01-12 17:09:00.000000000 +0000
5@@ -134,14 +134,7 @@
6 exit 0
7 ;;
8 --includes)
9- if test "$location" = "installed"; then
10 flags="$flags -I$includedir $INCLUDES"
11- elif test "$location" = "source"; then
12- flags="$flags -I$APU_SOURCE_DIR/include $INCLUDES"
13- else
14- # this is for VPATH builds
15- flags="$flags -I$APU_BUILD_DIR/include -I$APU_SOURCE_DIR/include $INCLUDES"
16- fi
17 ;;
18 --ldflags)
19 flags="$flags $LDFLAGS"
20@@ -155,28 +148,10 @@
21 exit 0
22 ;;
23 --link-ld)
24- if test "$location" = "installed"; then
25- ### avoid using -L if libdir is a "standard" location like /usr/lib
26 flags="$flags -L$libdir -l$APRUTIL_LIBNAME"
27- else
28- flags="$flags -L$APU_BUILD_DIR -l$APRUTIL_LIBNAME"
29- fi
30 ;;
31 --link-libtool)
32- # If the LA_FILE exists where we think it should be, use it. If we're
33- # installed and the LA_FILE does not exist, assume to use -L/-l
34- # (the LA_FILE may not have been installed). If we're building ourselves,
35- # we'll assume that at some point the .la file be created.
36- if test -f "$LA_FILE"; then
37- flags="$flags $LA_FILE"
38- elif test "$location" = "installed"; then
39- ### avoid using -L if libdir is a "standard" location like /usr/lib
40- # Since the user is specifying they are linking with libtool, we
41- # *know* that -R will be recognized by libtool.
42- flags="$flags -L$libdir -R$libdir -l$APRUTIL_LIBNAME"
43- else
44- flags="$flags $LA_FILE"
45- fi
46+ flags="$flags -l$APRUTIL_LIBNAME"
47 ;;
48 --apu-la-file)
49 if test -f "$LA_FILE"; then
diff --git a/meta/packages/apr/apr-util/configure_fixes.patch b/meta/packages/apr/apr-util/configure_fixes.patch
deleted file mode 100644
index 0b2a0903e1..0000000000
--- a/meta/packages/apr/apr-util/configure_fixes.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1Index: apr-util-1.3.4/configure.in
2===================================================================
3--- apr-util-1.3.4.orig/configure.in
4+++ apr-util-1.3.4/configure.in
5@@ -8,14 +8,14 @@ AC_INIT(export_vars.sh.in)
6 AC_CONFIG_HEADER(include/private/apu_config.h)
7 AC_CONFIG_AUX_DIR(build)
8
9-sinclude(build/apu-conf.m4)
10-sinclude(build/apu-iconv.m4)
11-sinclude(build/apu-hints.m4)
12-sinclude(build/apr_common.m4)
13-sinclude(build/find_apr.m4)
14-sinclude(build/dbm.m4)
15-sinclude(build/dbd.m4)
16-sinclude(build/dso.m4)
17+#sinclude(build/apu-conf.m4)
18+#sinclude(build/apu-iconv.m4)
19+#sinclude(build/apu-hints.m4)
20+#sinclude(build/apr_common.m4)
21+#sinclude(build/find_apr.m4)
22+#sinclude(build/dbm.m4)
23+#sinclude(build/dbd.m4)
24+#sinclude(build/dso.m4)
25
26 dnl Generate ./config.nice for reproducing runs of configure
27 dnl
diff --git a/meta/packages/apr/apr-util/configure_fixes.patch.old b/meta/packages/apr/apr-util/configure_fixes.patch.old
deleted file mode 100644
index 16f88b3bba..0000000000
--- a/meta/packages/apr/apr-util/configure_fixes.patch.old
+++ /dev/null
@@ -1,25 +0,0 @@
1Index: apr-util-1.2.12/configure.in
2===================================================================
3--- apr-util-1.2.12.orig/configure.in 2008-03-08 19:15:00.000000000 +0000
4+++ apr-util-1.2.12/configure.in 2008-03-08 19:15:13.000000000 +0000
5@@ -8,13 +8,13 @@
6 AC_CONFIG_HEADER(include/private/apu_config.h)
7 AC_CONFIG_AUX_DIR(build)
8
9-sinclude(build/apu-conf.m4)
10-sinclude(build/apu-iconv.m4)
11-sinclude(build/apu-hints.m4)
12-sinclude(build/apr_common.m4)
13-sinclude(build/find_apr.m4)
14-sinclude(build/dbm.m4)
15-sinclude(build/dbd.m4)
16+#sinclude(build/apu-conf.m4)
17+#sinclude(build/apu-iconv.m4)
18+#sinclude(build/apu-hints.m4)
19+#sinclude(build/apr_common.m4)
20+#sinclude(build/find_apr.m4)
21+#sinclude(build/dbm.m4)
22+#sinclude(build/dbd.m4)
23
24 dnl Generate ./config.nice for reproducing runs of configure
25 dnl
diff --git a/meta/packages/apr/apr-util_1.3.4.bb b/meta/packages/apr/apr-util_1.3.4.bb
deleted file mode 100644
index 2e608e8a5c..0000000000
--- a/meta/packages/apr/apr-util_1.3.4.bb
+++ /dev/null
@@ -1,27 +0,0 @@
1DESCRIPTION = "Apache Portable Runtime (APR) companion library"
2SECTION = "libs"
3DEPENDS = "apr expat gdbm"
4LICENSE = "Apache License, Version 2.0"
5
6PR = "r5"
7
8SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.gz \
9 file://configfix.patch;patch=1 \
10 file://configure_fixes.patch;patch=1"
11
12EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
13 --with-dbm=gdbm \
14 --with-gdbm=${STAGING_DIR_HOST}${prefix} \
15 --without-sqlite2 \
16 --without-sqlite3 \
17 --with-expat=${STAGING_DIR_HOST}${prefix}"
18
19
20inherit autotools lib_package binconfig
21
22OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
23
24do_configure_prepend() {
25 cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
26}
27
diff --git a/meta/packages/apr/apr/cleanup.patch b/meta/packages/apr/apr/cleanup.patch
deleted file mode 100644
index fd74826480..0000000000
--- a/meta/packages/apr/apr/cleanup.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1Index: apr-1.3.3/build/buildcheck.sh
2===================================================================
3--- apr-1.3.3.orig/build/buildcheck.sh 2009-01-15 13:32:33.000000000 +0000
4+++ apr-1.3.3/build/buildcheck.sh 2009-01-15 13:33:06.000000000 +0000
5@@ -32,35 +32,4 @@
6 echo "buildconf: autoconf version $ac_version (ok)"
7 fi
8
9-# Sample libtool --version outputs:
10-# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
11-# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
12-# output is multiline from 1.5 onwards
13-
14-# Require libtool 1.4 or newer
15-libtool=`build/PrintPath glibtool libtool libtool15 libtool14`
16-lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
17-if test -z "$lt_pversion"; then
18-echo "buildconf: libtool not found."
19-echo " You need libtool version 1.4 or newer installed"
20-echo " to build APR from SVN."
21-exit 1
22-fi
23-lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
24-IFS=.; set $lt_version; IFS=' '
25-lt_status="good"
26-if test "$1" = "1"; then
27- if test "$2" -lt "4"; then
28- lt_status="bad"
29- fi
30-fi
31-if test $lt_status = "good"; then
32- echo "buildconf: libtool version $lt_pversion (ok)"
33- exit 0
34-fi
35-
36-echo "buildconf: libtool version $lt_pversion found."
37-echo " You need libtool version 1.4 or newer installed"
38-echo " to build APR from SVN."
39-
40-exit 1
41+exit 0
42\ No newline at end of file
diff --git a/meta/packages/apr/apr/configfix.patch b/meta/packages/apr/apr/configfix.patch
deleted file mode 100644
index 995555e8ba..0000000000
--- a/meta/packages/apr/apr/configfix.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1Index: apr-1.3.3/apr-config.in
2===================================================================
3--- apr-1.3.3.orig/apr-config.in 2009-01-12 15:16:31.000000000 +0000
4+++ apr-1.3.3/apr-config.in 2009-01-12 15:19:25.000000000 +0000
5@@ -152,14 +152,7 @@
6 flags="$flags $LDFLAGS"
7 ;;
8 --includes)
9- if test "$location" = "installed"; then
10 flags="$flags -I$includedir $EXTRA_INCLUDES"
11- elif test "$location" = "source"; then
12- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
13- else
14- # this is for VPATH builds
15- flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
16- fi
17 ;;
18 --srcdir)
19 echo $APR_SOURCE_DIR
20@@ -181,29 +167,14 @@
21 exit 0
22 ;;
23 --link-ld)
24- if test "$location" = "installed"; then
25- ### avoid using -L if libdir is a "standard" location like /usr/lib
26- flags="$flags -L$libdir -l${APR_LIBNAME}"
27- else
28- ### this surely can't work since the library is in .libs?
29- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
30- fi
31+ flags="$flags -l${APR_LIBNAME}"
32 ;;
33 --link-libtool)
34 # If the LA_FILE exists where we think it should be, use it. If we're
35 # installed and the LA_FILE does not exist, assume to use -L/-l
36 # (the LA_FILE may not have been installed). If we're building ourselves,
37 # we'll assume that at some point the .la file be created.
38- if test -f "$LA_FILE"; then
39- flags="$flags $LA_FILE"
40- elif test "$location" = "installed"; then
41- ### avoid using -L if libdir is a "standard" location like /usr/lib
42- # Since the user is specifying they are linking with libtool, we
43- # *know* that -R will be recognized by libtool.
44- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
45- else
46- flags="$flags $LA_FILE"
47- fi
48+ flags="$flags -l${APR_LIBNAME}"
49 ;;
50 --shlib-path-var)
51 echo "$SHLIBPATH_VAR"
diff --git a/meta/packages/apr/apr/configure_fixes.patch b/meta/packages/apr/apr/configure_fixes.patch
deleted file mode 100644
index 86ceb8cf08..0000000000
--- a/meta/packages/apr/apr/configure_fixes.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1Index: apr-1.3.3/configure.in
2===================================================================
3--- apr-1.3.3.orig/configure.in
4+++ apr-1.3.3/configure.in
5@@ -794,39 +794,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm
6 create_area])
7
8 APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
9-AC_CHECK_FILE(/dev/zero)
10-
11-# Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
12-if test "$ac_cv_func_mmap" = "yes" &&
13- test "$ac_cv_file__dev_zero" = "yes"; then
14- AC_MSG_CHECKING(for mmap that can map /dev/zero)
15- AC_TRY_RUN([
16-#include <sys/types.h>
17-#include <sys/stat.h>
18-#include <fcntl.h>
19-#ifdef HAVE_SYS_MMAN_H
20-#include <sys/mman.h>
21-#endif
22- int main()
23- {
24- int fd;
25- void *m;
26- fd = open("/dev/zero", O_RDWR);
27- if (fd < 0) {
28- return 1;
29- }
30- m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
31- if (m == (void *)-1) { /* aka MAP_FAILED */
32- return 2;
33- }
34- if (munmap(m, sizeof(void*)) < 0) {
35- return 3;
36- }
37- return 0;
38- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])
39-
40- AC_MSG_RESULT($ac_cv_file__dev_zero)
41-fi
42
43 # Now we determine which one is our anonymous shmem preference.
44 haveshmgetanon="0"
45@@ -1518,13 +1485,14 @@ else
46 bigendian=0
47 fi
48
49-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
50-#include <sys/uio.h>],struct iovec,0)
51-if test "$ac_cv_sizeof_struct_iovec" = "0"; then
52- have_iovec=0
53-else
54- have_iovec=1
55-fi
56+#APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
57+##include <sys/uio.h>],struct iovec,0)
58+#if test "$ac_cv_sizeof_struct_iovec" = "0"; then
59+# have_iovec=0
60+#else
61+# have_iovec=1
62+#fi
63+have_iovec=1
64
65 AC_SUBST(voidp_size)
66 AC_SUBST(short_value)
diff --git a/meta/packages/apr/apr_1.3.3.bb b/meta/packages/apr/apr_1.3.3.bb
deleted file mode 100644
index a193a18a2e..0000000000
--- a/meta/packages/apr/apr_1.3.3.bb
+++ /dev/null
@@ -1,34 +0,0 @@
1DESCRIPTION = "Apache Portable Runtime (APR) library"
2SECTION = "libs"
3LICENSE = "Apache License, Version 2.0"
4
5PR = "r5"
6
7SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.bz2 \
8 file://configure_fixes.patch;patch=1 \
9 file://cleanup.patch;patch=1 \
10 file://configfix.patch;patch=1"
11
12inherit autotools lib_package binconfig
13
14OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
15
16do_configure_prepend() {
17 cd ${S}
18 ./buildconf
19}
20
21SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
22
23apr_sysroot_preprocess () {
24 d=${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/apr
25 install -d $d/
26 cp ${S}/build/apr_rules.mk $d/
27 sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
28 sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
29 sed -i s,LIBTOOL=.*,LIBTOOL=\$\(SHELL\)\ ${TARGET_PREFIX}libtool,g $d/apr_rules.mk
30 sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
31 cp ${S}/build/mkdir.sh $d/
32 cp ${S}/build/make_exports.awk $d/
33 cp ${S}/build/make_var_export.awk $d/
34}
diff --git a/meta/packages/aspell/aspell_0.60.6.bb b/meta/packages/aspell/aspell_0.60.6.bb
deleted file mode 100644
index 8d43a707d2..0000000000
--- a/meta/packages/aspell/aspell_0.60.6.bb
+++ /dev/null
@@ -1,15 +0,0 @@
1SRC_URI = "ftp://ftp.gnu.org/gnu/aspell/aspell-${PV}.tar.gz"
2DESCRIPTION = "GNU Aspell spell-checker"
3SECTION = "console/utils"
4LICENSE="LGPL"
5
6PACKAGES += "libaspell libpspell libpspell-dev aspell-utils"
7
8FILES_${PN}-dbg += "${libdir}/aspell-0.60/.debu*"
9FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
10FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
11FILES_${PN} = "${bindir}/aspell"
12FILES_libpspell = "${libdir}/libpspell.so.*"
13FILES_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell"
14
15inherit autotools gettext
diff --git a/meta/packages/atk/atk.inc b/meta/packages/atk/atk.inc
deleted file mode 100644
index 899d360e1a..0000000000
--- a/meta/packages/atk/atk.inc
+++ /dev/null
@@ -1,14 +0,0 @@
1DESCRIPTION = "An accessibility toolkit for GNOME."
2HOMEPAGE = "http://live.gnome.org/GAP/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4
5LICENSE = "LGPLv2 & LGPLv2+"
6
7SECTION = "x11/libs"
8PRIORITY = "optional"
9
10DEPENDS = "glib-2.0 gtk-doc-native"
11
12inherit autotools pkgconfig
13
14EXTRA_OECONF = "--disable-glibtest"
diff --git a/meta/packages/atk/atk_1.30.0.bb b/meta/packages/atk/atk_1.30.0.bb
deleted file mode 100644
index e85ef9040c..0000000000
--- a/meta/packages/atk/atk_1.30.0.bb
+++ /dev/null
@@ -1,10 +0,0 @@
1require atk.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
4 file://atk/atkutil.c;endline=20;md5=db21b0bdbef9da4dc6eb122debc9f9bc \
5 file://atk/atk.h;endline=20;md5=c58238d688c24387376d6c69d06248a7"
6
7SRC_URI = "http://download.gnome.org/sources/atk/1.30/${PN}-${PV}.tar.bz2"
8
9
10
diff --git a/meta/packages/attr/acl.inc b/meta/packages/attr/acl.inc
deleted file mode 100644
index 68745dd728..0000000000
--- a/meta/packages/attr/acl.inc
+++ /dev/null
@@ -1,26 +0,0 @@
1DESCRIPTION = "utilities for access control list"
2HOMEPAGE = "http://savannah.nongnu.org/projects/acl/"
3SECTION = "libs"
4
5LICENSE = "LGPLv2.1+ & GPLv2+"
6LICENSE_${PN} = "GPLv2+"
7LICENSE_lib${PN} = "LGPLv2.1+"
8LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
9 file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
10
11DEPENDS = "attr"
12SRC_URI = "http://mirror.cinquix.com/pub/savannah/acl/${BP}.src.tar.gz"
13
14require ea-acl.inc
15
16# avoid RPATH hardcode to staging dir
17do_configure_append() {
18 sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
19 ${S}/config.status
20}
21
22# libdir should point to .la
23do_install_append() {
24 sed -i ${D}${libdir}/libacl.la -e \
25 s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
26}
diff --git a/meta/packages/attr/acl_2.2.49.bb b/meta/packages/attr/acl_2.2.49.bb
deleted file mode 100644
index e5d5509de1..0000000000
--- a/meta/packages/attr/acl_2.2.49.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require acl.inc
2
3PR = "r0"
diff --git a/meta/packages/attr/attr-2.4.44/double-free.patch b/meta/packages/attr/attr-2.4.44/double-free.patch
deleted file mode 100644
index 6fc684f6c2..0000000000
--- a/meta/packages/attr/attr-2.4.44/double-free.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1commit 5b28eb3b0e0430ce6af28edc9100ca23299d1218
2Author: Kamil Dudka <kdudka@redhat.com>
3Date: Thu Jun 3 15:29:54 2010 +0200
4
5 attr_parse_attr_conf: eliminate a double free
6
7diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
8index 030bbf5..2697328 100644
9--- a/libattr/attr_copy_action.c
10+++ b/libattr/attr_copy_action.c
11@@ -81,6 +81,7 @@ repeat:
12 fclose(file);
13 file = NULL;
14 free(text);
15+ text = NULL;
16 size_guess *= 2;
17 goto repeat;
18 }
diff --git a/meta/packages/attr/attr-2.4.44/memory-leak-in-copy.patch b/meta/packages/attr/attr-2.4.44/memory-leak-in-copy.patch
deleted file mode 100644
index 966632d87e..0000000000
--- a/meta/packages/attr/attr-2.4.44/memory-leak-in-copy.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1commit 972b42a67393f762936e74d3ce929914181f5f28
2Author: Brandon Philips <brandon@ifup.org>
3Date: Thu Dec 17 17:15:57 2009 -0800
4
5 libattr: fix memory leak in attr_copy_action()
6
7 stanse found that attr_copy_action returns before freeing the memory
8 allocated for text.
9
10 Move fopen() above the malloc so this is not a problem.
11
12 Fixes this bug:
13 https://bugzilla.novell.com/show_bug.cgi?id=564735
14
15 Signed-off-by: Brandon Philips <bphilips@suse.de>
16
17diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
18index 0d7aca5..dc94224 100644
19--- a/libattr/attr_copy_action.c
20+++ b/libattr/attr_copy_action.c
21@@ -53,7 +53,7 @@ free_attr_actions(void)
22 static int
23 attr_parse_attr_conf(struct error_context *ctx)
24 {
25- char *text, *t;
26+ char *text = NULL, *t;
27 size_t size_guess = 4096, len;
28 FILE *file;
29 char *pattern = NULL;
30@@ -64,15 +64,16 @@ attr_parse_attr_conf(struct error_context *ctx)
31 return 0;
32
33 repeat:
34- text = malloc(size_guess + 1);
35- if (!text)
36- goto fail;
37-
38 if ((file = fopen(ATTR_CONF, "r")) == NULL) {
39 if (errno == ENOENT)
40 return 0;
41 goto fail;
42 }
43+
44+ text = malloc(size_guess + 1);
45+ if (!text)
46+ goto fail;
47+
48 len = fread(text, 1, size_guess, file);
49 if (ferror(file))
50 goto fail;
diff --git a/meta/packages/attr/attr-2.4.44/memory-leak2.patch b/meta/packages/attr/attr-2.4.44/memory-leak2.patch
deleted file mode 100644
index 03395423da..0000000000
--- a/meta/packages/attr/attr-2.4.44/memory-leak2.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1commit 42f50a130d144ffbc01738f15da9d4f1b57505bd
2Author: Kamil Dudka <kdudka@redhat.com>
3Date: Thu Jun 3 15:23:04 2010 +0200
4
5 attr_parse_attr_conf: eliminate a memory leak
6
7diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
8index dc94224..030bbf5 100644
9--- a/libattr/attr_copy_action.c
10+++ b/libattr/attr_copy_action.c
11@@ -129,6 +129,7 @@ repeat:
12
13 t += strcspn(t, "\n");
14 }
15+ free(text);
16 return 0;
17
18 parse_error:
diff --git a/meta/packages/attr/attr-2.4.44/pull-in-string.h.patch b/meta/packages/attr/attr-2.4.44/pull-in-string.h.patch
deleted file mode 100644
index ccbc236284..0000000000
--- a/meta/packages/attr/attr-2.4.44/pull-in-string.h.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1commit 235cdd2af498d288f1af1142e7a23fbd16dff907
2Author: Mike Frysinger <vapier@gentoo.org>
3Date: Fri Jan 8 21:53:19 2010 -0500
4
5 quote: pull in string.h for strchr prototype
6
7 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
8 Signed-off-by: Brandon Philips <brandon@ifup.org>
9
10diff --git a/libmisc/quote.c b/libmisc/quote.c
11index f98c887..bf8f9eb 100644
12--- a/libmisc/quote.c
13+++ b/libmisc/quote.c
14@@ -20,6 +20,7 @@
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <ctype.h>
18+#include <string.h>
19 #include "misc.h"
20
21 const char *quote(const char *str, const char *quote_chars)
diff --git a/meta/packages/attr/attr-2.4.44/thinko-in-restore.patch b/meta/packages/attr/attr-2.4.44/thinko-in-restore.patch
deleted file mode 100644
index a84de94ed0..0000000000
--- a/meta/packages/attr/attr-2.4.44/thinko-in-restore.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1commit e8d568c696692eed5c92d5a35498e1c26e13d6b3
2Author: Kamil Dudka <kdudka@redhat.com>
3Date: Thu Jun 3 15:30:19 2010 +0200
4
5 setfattr.c: fix thinko in restore()
6
7diff --git a/setfattr/setfattr.c b/setfattr/setfattr.c
8index 491c25a..0a14cfa 100644
9--- a/setfattr/setfattr.c
10+++ b/setfattr/setfattr.c
11@@ -120,7 +120,7 @@ int restore(const char *filename)
12 break;
13 line++;
14 if (strncmp(l, "# file: ", 8) != 0) {
15- if (filename) {
16+ if (file != stdin) {
17 fprintf(stderr, _("%s: %s: No filename found "
18 "in line %d, aborting\n"),
19 progname, filename, backup_line);
diff --git a/meta/packages/attr/attr.inc b/meta/packages/attr/attr.inc
deleted file mode 100644
index da7924631e..0000000000
--- a/meta/packages/attr/attr.inc
+++ /dev/null
@@ -1,20 +0,0 @@
1DESCRIPTION = "utilities for manipulating filesystem extended attributes"
2HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
3SECTION = "libs"
4
5LICENSE = "LGPLv2.1+ & GPLv2+"
6LICENSE_${PN} = "GPLv2+"
7LICENSE_lib${PN} = "LGPLv2.1+"
8LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \
9 file://attr/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
10 file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb"
11
12SRC_URI = "http://nongnu.askapache.com/attr/${BP}.src.tar.gz"
13
14require ea-acl.inc
15
16# libdir should point to .la
17do_install_append() {
18 sed -i ${D}${libdir}/libattr.la -e \
19 s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
20}
diff --git a/meta/packages/attr/attr_2.4.44.bb b/meta/packages/attr/attr_2.4.44.bb
deleted file mode 100644
index 0b21b33dcf..0000000000
--- a/meta/packages/attr/attr_2.4.44.bb
+++ /dev/null
@@ -1,9 +0,0 @@
1require attr.inc
2
3PR = "r1"
4
5SRC_URI += "file://memory-leak-in-copy.patch \
6 file://memory-leak2.patch \
7 file://double-free.patch \
8 file://pull-in-string.h.patch \
9 file://thinko-in-restore.patch"
diff --git a/meta/packages/attr/ea-acl.inc b/meta/packages/attr/ea-acl.inc
deleted file mode 100644
index 77fa2b4fd6..0000000000
--- a/meta/packages/attr/ea-acl.inc
+++ /dev/null
@@ -1,35 +0,0 @@
1# this build system is mostly shared by attr and acl
2
3DEPENDS =+ "gettext"
4
5SRC_URI += "file://relative-libdir.patch;striplevel=0"
6
7inherit autotools
8
9# the package comes with a custom config.h.in, it cannot be
10# overwritten by autoheader
11export AUTOHEADER = "true"
12EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
13
14EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
15
16do_install () {
17 oe_runmake install install-lib install-dev DIST_ROOT="${D}"
18}
19
20PACKAGES =+ "lib${PN} lib${PN}-dev lib${PN}-doc"
21
22FILES_lib${PN} = "${base_libdir}/lib*.so.*"
23
24FILES_lib${PN}-dev = "${includedir} \
25 ${libdir}/lib*.so \
26 ${libdir}/lib*.a \
27 ${libdir}/lib*.la \
28 ${base_libdir}/lib*.so \
29 ${base_libdir}/lib*.a \
30 ${base_libdir}/lib*.la"
31
32FILES_lib${PN}-doc = "${mandir}/man2 \
33 ${mandir}/man3"
34
35BBCLASSEXTEND = "native"
diff --git a/meta/packages/attr/files/relative-libdir.patch b/meta/packages/attr/files/relative-libdir.patch
deleted file mode 100644
index f989dd0ccc..0000000000
--- a/meta/packages/attr/files/relative-libdir.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1use relative path in symbolic links, or it fails in staging
2sed expression from udev
3
47/29/2010 - created by Qing He <qing.he@intel.com>
5
6diff -u include.orig/buildmacros include/buildmacros
7--- include.orig/buildmacros 2010-07-29 17:39:48.000000000 +0800
8+++ include/buildmacros 2010-07-29 18:20:34.000000000 +0800
9@@ -88,9 +88,11 @@
10 ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
11 ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
12 if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
13- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
14- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
15- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
16+ rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
17+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
18+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
19+ rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
20+ ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
21 fi
22 else
23 INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
diff --git a/meta/packages/beecrypt/beecrypt/disable-icu-check.patch b/meta/packages/beecrypt/beecrypt/disable-icu-check.patch
deleted file mode 100644
index 3e18a87c3f..0000000000
--- a/meta/packages/beecrypt/beecrypt/disable-icu-check.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1We are unable to run code at configure time in a cross environemnt, but as we
2control the build we can be fairly certain this dependency is met.
3
4JL 05/07/10
5Index: beecrypt-4.1.2/configure.ac
6===================================================================
7--- beecrypt-4.1.2.orig/configure.ac 2004-12-21 11:37:56.000000000 +0000
8+++ beecrypt-4.1.2/configure.ac 2010-07-05 16:09:50.390083494 +0100
9@@ -243,32 +243,6 @@
10 # Predefines and checks for C++ API support
11 AH_TEMPLATE([CPPGLUE],[Define to 1 if you want to include the C++ code])
12
13-if test "$ac_with_cplusplus" = yes; then
14- AC_MSG_CHECKING([for IBM's ICU library version >= 2.8])
15- AC_LANG_PUSH(C)
16- AC_RUN_IFELSE([
17- AC_LANG_PROGRAM([[#include <unicode/uversion.h>]],[[
18- #if U_ICU_VERSION_MAJOR_NUM < 2
19- exit(1);
20- #elif U_ICU_VERSION_MAJOR_NUM == 2
21- # if U_ICU_VERSION_MINOR_NUM < 8
22- exit(1);
23- # else
24- exit(0);
25- # endif
26- #else
27- exit(0);
28- #endif
29- ]])],[
30- AC_MSG_RESULT([yes])
31- ],[
32- AC_MSG_RESULT([no])
33- AC_MSG_WARN([disabling cplusplus])
34- ac_with_cplusplus=no
35- ])
36- AC_LANG_POP(C)
37-fi
38-
39 if test "$ac_with_cplusplus" = yes ; then
40 AC_DEFINE([CPPGLUE],1)
41 fi
diff --git a/meta/packages/beecrypt/beecrypt/fix-security.patch b/meta/packages/beecrypt/beecrypt/fix-security.patch
deleted file mode 100644
index 6103562e0a..0000000000
--- a/meta/packages/beecrypt/beecrypt/fix-security.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1Fix visibility of various C++ functions, inspired by a similar patch in the Fink
2project:
3http://www.mail-archive.com/fink-commits@lists.sourceforge.net/msg75742.html
4
5JL 05/07/10
6Index: beecrypt-4.1.2/c++/security/Security.h
7===================================================================
8--- beecrypt-4.1.2.orig/c++/security/Security.h 2010-07-05 17:15:34.811273306 +0100
9+++ beecrypt-4.1.2/c++/security/Security.h 2010-07-05 17:15:38.696388531 +0100
10@@ -75,8 +75,6 @@
11 public:
12 typedef vector<const Provider*> provider_vector;
13 typedef provider_vector::iterator provider_vector_iterator;
14-
15- private:
16 struct spi
17 {
18 Object* cspi;
19@@ -91,6 +89,7 @@
20 static spi* getSpi(const String& algo, const String& type, const Provider&) throw (NoSuchAlgorithmException);
21 static spi* getFirstSpi(const String& type);
22
23+ private:
24 static const String& getKeyStoreDefault();
25
26 static bool _init;
27Index: beecrypt-4.1.2/c++/beeyond/BeeCertificate.h
28===================================================================
29--- beecrypt-4.1.2.orig/c++/beeyond/BeeCertificate.h 2004-11-03 09:37:27.000000000 +0000
30+++ beecrypt-4.1.2/c++/beeyond/BeeCertificate.h 2010-07-05 17:16:25.216332324 +0100
31@@ -150,11 +150,11 @@
32 mutable String* str;
33
34 BeeCertificate();
35- BeeCertificate(InputStream& in) throw (IOException);
36
37 bytearray* encodeTBS() const;
38
39 public:
40+ BeeCertificate(InputStream& in) throw (IOException);
41 BeeCertificate(const BeeCertificate&);
42 virtual ~BeeCertificate();
43
diff --git a/meta/packages/beecrypt/beecrypt/x64fix.patch b/meta/packages/beecrypt/beecrypt/x64fix.patch
deleted file mode 100644
index ac02425d51..0000000000
--- a/meta/packages/beecrypt/beecrypt/x64fix.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Don't have 64 appended to the libdir for 64bit platforms.
2
3JL 05/07/10
4Index: beecrypt-4.1.2/configure.ac
5===================================================================
6--- beecrypt-4.1.2.orig/configure.ac 2010-07-05 16:39:43.000000000 +0100
7+++ beecrypt-4.1.2/configure.ac 2010-07-05 16:40:27.521082866 +0100
8@@ -585,15 +585,6 @@
9
10 # Check where to install the libraries
11 bc_libalt=
12-case $target_os in
13-linux*)
14- case $bc_target_arch in
15- powerpc64 | s390x | x86_64)
16- bc_libalt="64"
17- ;;
18- esac
19- ;;
20-esac
21 AC_SUBST(LIBALT,$bc_libalt)
22
23 # Generate output files.
diff --git a/meta/packages/beecrypt/beecrypt_4.1.2.bb b/meta/packages/beecrypt/beecrypt_4.1.2.bb
deleted file mode 100644
index 6eb40e5d5d..0000000000
--- a/meta/packages/beecrypt/beecrypt_4.1.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1# Beecrypt OE build file
2# Copyright (C) 2004-2005, Advanced Micro Devices, Inc. All Rights Reserved
3# Released under the MIT license (see packages/COPYING)
4
5DESCRIPTION="Beecrypt is a general-purpose cryptography library."
6HOMEPAGE="http://sourceforge.net/projects/beecrypt"
7SRC_URI="${SOURCEFORGE_MIRROR}/beecrypt/beecrypt-${PV}.tar.gz \
8 file://x64fix.patch \
9 file://disable-icu-check.patch \
10 file://fix-security.patch"
11
12DEPENDS = "icu"
13
14PR = "r0"
15
16inherit autotools
17acpaths=""
18
19EXTRA_OECONF="--with-arch=${TARGET_ARCH} --without-python --enable-shared --enable-static"
20
21BBCLASSEXTEND = "native"
diff --git a/meta/packages/blktool/blktool_4-6.bb b/meta/packages/blktool/blktool_4-6.bb
deleted file mode 100644
index 3313b039ce..0000000000
--- a/meta/packages/blktool/blktool_4-6.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1DESCRIPTION = "blktool is used for querying and/or changing settings of a block device. It is like hdparm but a more general tool, as it works on SCSI, IDE and SATA devices"
2HOMEPAGE = "http://packages.debian.org/unstable/admin/blktool"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
5 file://blktool.c;beginline=7;endline=8;md5=a5e798ea98fd50972088968a15e5f373"
6DEPENDS = "glib-2.0"
7
8SRC_URI = "${DEBIAN_MIRROR}/main/b/blktool/blktool_4.orig.tar.gz \
9 ${DEBIAN_MIRROR}/main/b/blktool/blktool_4-6.diff.gz;apply=yes"
10
11PR = "r0"
12S = "${WORKDIR}/${PN}-4.orig"
13
14inherit autotools
diff --git a/meta/packages/boost/boost-36.inc b/meta/packages/boost/boost-36.inc
deleted file mode 100644
index 5d2d1280be..0000000000
--- a/meta/packages/boost/boost-36.inc
+++ /dev/null
@@ -1,149 +0,0 @@
1# The Boost web site provides free peer-reviewed portable
2# C++ source libraries. The emphasis is on libraries which
3# work well with the C++ Standard Library. The libraries are
4# intended to be widely useful, and are in regular use by
5# thousands of programmers across a broad spectrum of applications.
6DESCRIPTION = "Free peer-reviewed portable C++ source libraries"
7HOMEPAGE = "http://www.boost.org/"
8SECTION = "libs"
9DEPENDS = "boost-jam-native zlib"
10PRIORITY = "optional"
11LICENSE = "Boost Software License"
12PR = "r3"
13
14ARM_INSTRUCTION_SET = "arm"
15BOOST_VER = "${@"_".join(bb.data.getVar("PV",d,1).split("."))}"
16BOOST_MAJ = "${@"_".join(bb.data.getVar("PV",d,1).split(".")[0:2])}"
17BOOST_P = "boost_${BOOST_VER}"
18
19BOOST_LIBS = "\
20 date_time \
21 filesystem \
22 graph \
23 iostreams \
24 program_options \
25 regex \
26 signals \
27 system \
28 test \
29 thread \
30 "
31
32# FIXME: for some reason this fails on powerpc
33#BOOST_LIBS += "serialization"
34
35# To enable python, uncomment the following:
36#BOOST_LIBS += "python"
37#DEPENDS += "python"
38#PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
39#PYTHON_VERSION = "2.5"
40
41S = "${WORKDIR}/${BOOST_P}"
42
43# Make a package for each library, plus -dev
44PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}"
45python __anonymous () {
46 import bb
47
48 packages = []
49 extras = []
50 for lib in bb.data.getVar('BOOST_LIBS', d, 1).split( ):
51 pkg = "boost-%s" % lib.replace("_", "-")
52 extras.append("--with-%s" % lib)
53 packages.append(pkg)
54 if not bb.data.getVar("FILES_%s" % pkg, d, 1):
55 bb.data.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib, d)
56 bb.data.setVar("BOOST_PACKAGES", " ".join(packages), d)
57 bb.data.setVar("BJAM_EXTRA", " ".join(extras), d)
58}
59
60# Override the contents of specific packages
61FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \
62 ${libdir}/libboost_wserialization*.so.*"
63FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \
64 ${libdir}/libboost_unit_test_framework*.so.*"
65
66# -dev last to pick up the remaining stuff
67PACKAGES += "${PN}-dev"
68FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so ${libdir}/libboost_*.a"
69
70# "boost" is a metapackage which pulls in all boost librabries
71PACKAGES += "${PN}"
72RRECOMMENDS_${PN} += "${BOOST_PACKAGES}"
73ALLOW_EMPTY_${PN} = "1"
74
75# to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works
76TARGET_CC_ARCH += " ${LDFLAGS}"
77
78# Oh yippee, a new build system, it's sooo cooool I could eat my own
79# foot. inlining=on lets the compiler choose, I think. At least this
80# stuff is documented...
81# NOTE: if you leave <debug-symbols>on then in a debug build the build sys
82# objcopy will be invoked, and that won't work. Building debug apparently
83# requires hacking gcc-tools.jam
84#
85# Sometimes I wake up screaming. Famous figures are gathered in the nightmare,
86# Steve Bourne, Larry Wall, the whole of the ANSI C committee. They're just
87# standing there, waiting, but the truely terrifying thing is what they carry
88# in their hands. At first sight each seems to bear the same thing, but it is
89# not so for the forms in their grasp are ever so slightly different one from
90# the other. Each is twisted in some grotesque way from the other to make each
91# an unspeakable perversion impossible to perceive without the onset of madness.
92# True insanity awaits anyone who perceives all of these horrors together.
93#
94# Quotation marks, there might be an easier way to do this, but I can't find
95# it. The problem is that the user.hpp configuration file must receive a
96# pre-processor macro defined as the appropriate string - complete with "'s
97# around it. (<> is a possibility here but the danger to that is that the
98# failure case interprets the < and > as shell redirections, creating
99# random files in the source tree.)
100#
101#bjam: '-DBOOST_PLATFORM_CONFIG=\"config\"'
102#do_compile: '-sGCC=... '"'-DBOOST_PLATFORM_CONFIG=\"config\"'"
103SQD = '"'
104EQD = '\"'
105#boost.bb: "... '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..."
106BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}"
107
108# bzip2 and zip are disabled because... they're broken - the compilation simply
109# isn't working with bjam. I guess they will fix it, but who needs it? This
110# only affects the (new in 33) iostream library.
111BJAM_TOOLS = "-sTOOLS=gcc \
112 '-sGCC=${CC} '${BJAM_CONF} \
113 '-sGXX=${CXX} '${BJAM_CONF} \
114 '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
115 '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \
116 '-sNO_BZIP2=1' \
117 '-sNO_ZLIB=1' \
118 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
119 '-sPYTHON_VERSION=${PYTHON_VERSION}' \
120 '--layout=system' \
121 "
122
123BJAM_OPTS = '${BJAM_TOOLS} \
124 --builddir=${S}/${TARGET_SYS} \
125 --with-python-root=${PYTHON_ROOT} \
126 ${BJAM_EXTRA}'
127
128
129do_configure_prepend() {
130 cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
131
132 echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;' >> ${S}/tools/build/v2/user-config.jam
133}
134
135do_compile() {
136 set -ex
137 bjam ${BJAM_OPTS} --prefix=${prefix} \
138 --exec-prefix=${exec_prefix} \
139 --libdir=${libdir} \
140 --includedir=${includedir}
141}
142
143do_install() {
144 set -ex
145 bjam ${BJAM_OPTS} \
146 --libdir=${D}${libdir} \
147 --includedir=${D}${includedir} \
148 install
149}
diff --git a/meta/packages/boost/boost-jam-native.inc b/meta/packages/boost/boost-jam-native.inc
deleted file mode 100644
index fe181ad00f..0000000000
--- a/meta/packages/boost/boost-jam-native.inc
+++ /dev/null
@@ -1,31 +0,0 @@
1# The Boost web site provides free peer-reviewed portable
2# C++ source libraries. The emphasis is on libraries which
3# work well with the C++ Standard Library. The libraries are
4# intended to be widely useful, and are in regular use by
5# thousands of programmers across a broad spectrum of applications.
6DESCRIPTION = "Make system for boost (native)"
7HOMEPAGE = "http://www.boost.org/"
8SECTION = "devel"
9PRIORITY = "optional"
10LICENSE = "Boost Software License"
11PR = "r0"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/boost/boost-jam-${PV}.tgz"
14S = "${WORKDIR}/boost-jam-${PV}"
15
16inherit native
17
18do_compile() {
19 set -ex
20 rm -rf bin.*
21 ./build.sh gcc
22}
23
24# This is too terrible - the build script doesn't give any good
25# way I can see to find out where the binaries are placed, so
26# rely on only one bin.foo directory being created.
27do_install () {
28 set -ex
29 install -d ${D}${bindir}/
30 install -c -m 755 bin.*/bjam ${D}${bindir}/
31}
diff --git a/meta/packages/boost/boost-jam-native_3.1.18.bb b/meta/packages/boost/boost-jam-native_3.1.18.bb
deleted file mode 100644
index 2e92146a83..0000000000
--- a/meta/packages/boost/boost-jam-native_3.1.18.bb
+++ /dev/null
@@ -1,4 +0,0 @@
1include boost-jam-native.inc
2
3SRC_URI = "${SOURCEFORGE_MIRROR}/boost/boost-jam-${PV}.tgz"
4
diff --git a/meta/packages/boost/boost_1.44.0.bb b/meta/packages/boost/boost_1.44.0.bb
deleted file mode 100644
index 81a2e53ba3..0000000000
--- a/meta/packages/boost/boost_1.44.0.bb
+++ /dev/null
@@ -1,27 +0,0 @@
1include boost-36.inc
2
3LICENSE = "boost"
4LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
5
6PR = "r0"
7
8SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2 \
9 file://arm-intrinsics.patch \
10 "
11
12BJAM_OPTS = '${BJAM_TOOLS} \
13 --builddir=${S}/${TARGET_SYS} \
14 ${BJAM_EXTRA}'
15
16# build only mt libraries and install symlinks for compatibility
17BJAM_EXTRA += "threading=multi"
18do_install_append() {
19 for lib in ${BOOST_LIBS}; do
20 if [ -e ${D}${libdir}/libboost_${lib}.a ]; then
21 ln -s libboost_${lib}.a ${D}${libdir}/libboost_${lib}-mt.a
22 fi
23 if [ -e ${D}${libdir}/libboost_${lib}.so ]; then
24 ln -s libboost_${lib}.so ${D}${libdir}/libboost_${lib}-mt.so
25 fi
26 done
27}
diff --git a/meta/packages/boost/files/1.34.1-gcc43.patch b/meta/packages/boost/files/1.34.1-gcc43.patch
deleted file mode 100644
index 4670ac4295..0000000000
--- a/meta/packages/boost/files/1.34.1-gcc43.patch
+++ /dev/null
@@ -1,224 +0,0 @@
1Index: boost_1_34_1/boost/archive/polymorphic_iarchive.hpp
2===================================================================
3--- boost_1_34_1.orig/boost/archive/polymorphic_iarchive.hpp 2005-12-11 07:12:51.000000000 +0100
4+++ boost_1_34_1/boost/archive/polymorphic_iarchive.hpp 2008-09-20 20:55:21.000000000 +0200
5@@ -17,6 +17,7 @@
6 // See http://www.boost.org for updates, documentation, and revision history.
7
8 #include <cstddef> // std::size_t
9+#include <climits>
10 #include <boost/config.hpp>
11
12 #if defined(BOOST_NO_STDC_NAMESPACE)
13Index: boost_1_34_1/boost/archive/polymorphic_oarchive.hpp
14===================================================================
15--- boost_1_34_1.orig/boost/archive/polymorphic_oarchive.hpp 2006-02-12 06:43:06.000000000 +0100
16+++ boost_1_34_1/boost/archive/polymorphic_oarchive.hpp 2008-09-20 20:55:21.000000000 +0200
17@@ -17,6 +17,7 @@
18 // See http://www.boost.org for updates, documentation, and revision history.
19
20 #include <cstddef> // size_t
21+#include <climits>
22 #include <string>
23
24 #include <boost/config.hpp>
25Index: boost_1_34_1/boost/date_time/date_facet.hpp
26===================================================================
27--- boost_1_34_1.orig/boost/date_time/date_facet.hpp 2005-09-05 23:10:50.000000000 +0200
28+++ boost_1_34_1/boost/date_time/date_facet.hpp 2008-09-20 20:55:21.000000000 +0200
29@@ -429,7 +429,7 @@
30 typedef std::basic_string<CharT> string_type;
31 typedef CharT char_type;
32 typedef boost::date_time::period_parser<date_type, CharT> period_parser_type;
33- typedef special_values_parser<date_type,CharT> special_values_parser_type;
34+ typedef boost::date_time::special_values_parser<date_type,CharT> special_values_parser_type;
35 typedef std::vector<std::basic_string<CharT> > input_collection_type;
36 typedef format_date_parser<date_type, CharT> format_date_parser_type;
37 // date_generators stuff goes here
38Index: boost_1_34_1/boost/mpl/zip_view.hpp
39===================================================================
40--- boost_1_34_1.orig/boost/mpl/zip_view.hpp 2004-09-02 17:40:42.000000000 +0200
41+++ boost_1_34_1/boost/mpl/zip_view.hpp 2008-09-20 20:55:21.000000000 +0200
42@@ -37,7 +37,7 @@
43 typedef zip_iterator<
44 typename transform1<
45 IteratorSeq
46- , next<_1>
47+ , boost::mpl::next<_1>
48 >::type
49 > next;
50 };
51@@ -48,8 +48,8 @@
52 struct zip_view
53 {
54 private:
55- typedef typename transform1< Sequences, begin<_1> >::type first_ones_;
56- typedef typename transform1< Sequences, end<_1> >::type last_ones_;
57+ typedef typename transform1< Sequences, boost::mpl::begin<_1> >::type first_ones_;
58+ typedef typename transform1< Sequences, boost::mpl::end<_1> >::type last_ones_;
59
60 public:
61 typedef nested_begin_end_tag tag;
62Index: boost_1_34_1/boost/python/detail/def_helper.hpp
63===================================================================
64--- boost_1_34_1.orig/boost/python/detail/def_helper.hpp 2004-09-16 03:00:28.000000000 +0200
65+++ boost_1_34_1/boost/python/detail/def_helper.hpp 2008-09-20 20:55:21.000000000 +0200
66@@ -155,7 +155,7 @@
67 , T3 const&
68 , T4 const&
69 , default_call_policies
70- , keywords<0>
71+ , boost::python::detail::keywords<0>
72 , char const*
73 , void(not_specified::*)() // A function pointer type which is never an
74 // appropriate default implementation
75Index: boost_1_34_1/boost/regex/v4/basic_regex_creator.hpp
76===================================================================
77--- boost_1_34_1.orig/boost/regex/v4/basic_regex_creator.hpp 2006-07-16 18:06:38.000000000 +0200
78+++ boost_1_34_1/boost/regex/v4/basic_regex_creator.hpp 2008-09-20 20:55:21.000000000 +0200
79@@ -24,6 +24,8 @@
80 # include BOOST_ABI_PREFIX
81 #endif
82
83+#include <climits>
84+
85 namespace boost{
86
87 namespace re_detail{
88Index: boost_1_34_1/boost/regex/v4/basic_regex.hpp
89===================================================================
90--- boost_1_34_1.orig/boost/regex/v4/basic_regex.hpp 2007-06-05 19:28:18.000000000 +0200
91+++ boost_1_34_1/boost/regex/v4/basic_regex.hpp 2008-09-20 20:55:21.000000000 +0200
92@@ -23,6 +23,8 @@
93 # include BOOST_ABI_PREFIX
94 #endif
95
96+#include <climits>
97+
98 namespace boost{
99 #ifdef BOOST_MSVC
100 #pragma warning(push)
101Index: boost_1_34_1/boost/regex/v4/basic_regex_parser.hpp
102===================================================================
103--- boost_1_34_1.orig/boost/regex/v4/basic_regex_parser.hpp 2006-12-20 18:19:05.000000000 +0100
104+++ boost_1_34_1/boost/regex/v4/basic_regex_parser.hpp 2008-09-20 20:55:21.000000000 +0200
105@@ -23,6 +23,8 @@
106 # include BOOST_ABI_PREFIX
107 #endif
108
109+#include <climits>
110+
111 namespace boost{
112 namespace re_detail{
113
114Index: boost_1_34_1/boost/regex/v4/cpp_regex_traits.hpp
115===================================================================
116--- boost_1_34_1.orig/boost/regex/v4/cpp_regex_traits.hpp 2007-01-15 12:09:44.000000000 +0100
117+++ boost_1_34_1/boost/regex/v4/cpp_regex_traits.hpp 2008-09-20 20:55:21.000000000 +0200
118@@ -41,6 +41,7 @@
119
120 #include <istream>
121 #include <ios>
122+#include <climits>
123
124 #ifdef BOOST_HAS_ABI_HEADERS
125 # include BOOST_ABI_PREFIX
126Index: boost_1_34_1/boost/regex/v4/perl_matcher.hpp
127===================================================================
128--- boost_1_34_1.orig/boost/regex/v4/perl_matcher.hpp 2006-10-18 14:55:30.000000000 +0200
129+++ boost_1_34_1/boost/regex/v4/perl_matcher.hpp 2008-09-20 20:55:21.000000000 +0200
130@@ -18,6 +18,8 @@
131 # include BOOST_ABI_PREFIX
132 #endif
133
134+#include <climits>
135+
136 namespace boost{
137 namespace re_detail{
138
139Index: boost_1_34_1/boost/regex/v4/regex_split.hpp
140===================================================================
141--- boost_1_34_1.orig/boost/regex/v4/regex_split.hpp 2005-01-21 18:22:38.000000000 +0100
142+++ boost_1_34_1/boost/regex/v4/regex_split.hpp 2008-09-20 20:55:21.000000000 +0200
143@@ -21,6 +21,8 @@
144 #ifndef BOOST_REGEX_SPLIT_HPP
145 #define BOOST_REGEX_SPLIT_HPP
146
147+#include <climits>
148+
149 namespace boost{
150
151 #ifdef BOOST_HAS_ABI_HEADERS
152Index: boost_1_34_1/boost/regex/v4/states.hpp
153===================================================================
154--- boost_1_34_1.orig/boost/regex/v4/states.hpp 2005-09-20 14:01:25.000000000 +0200
155+++ boost_1_34_1/boost/regex/v4/states.hpp 2008-09-20 20:55:21.000000000 +0200
156@@ -23,6 +23,8 @@
157 # include BOOST_ABI_PREFIX
158 #endif
159
160+#include <climits>
161+
162 namespace boost{
163 namespace re_detail{
164
165Index: boost_1_34_1/boost/serialization/collection_traits.hpp
166===================================================================
167--- boost_1_34_1.orig/boost/serialization/collection_traits.hpp 2005-06-21 07:19:04.000000000 +0200
168+++ boost_1_34_1/boost/serialization/collection_traits.hpp 2008-09-20 20:55:21.000000000 +0200
169@@ -22,6 +22,7 @@
170 // compiles recognize the same set of primitive types, the possibility
171 // exists for archives to be non-portable if class information for primitive
172 // types is included. This is addressed by the following macros.
173+#include <climits>
174 #include <boost/config.hpp>
175 #include <boost/mpl/integral_c.hpp>
176 #include <boost/mpl/integral_c_tag.hpp>
177Index: boost_1_34_1/boost/spirit/phoenix/operators.hpp
178===================================================================
179--- boost_1_34_1.orig/boost/spirit/phoenix/operators.hpp 2006-08-25 18:27:30.000000000 +0200
180+++ boost_1_34_1/boost/spirit/phoenix/operators.hpp 2008-09-20 20:55:21.000000000 +0200
181@@ -24,6 +24,7 @@
182 #include <boost/spirit/phoenix/composite.hpp>
183 #include <boost/config.hpp>
184 #include <boost/mpl/if.hpp>
185+#include <climits>
186
187 ///////////////////////////////////////////////////////////////////////////////
188 namespace phoenix {
189Index: boost_1_34_1/boost/test/test_tools.hpp
190===================================================================
191--- boost_1_34_1.orig/boost/test/test_tools.hpp 2007-02-22 18:57:29.000000000 +0100
192+++ boost_1_34_1/boost/test/test_tools.hpp 2008-09-20 20:55:21.000000000 +0200
193@@ -42,6 +42,7 @@
194 #include <boost/mpl/or.hpp>
195
196 // STL
197+#include <climits>
198 #include <cstddef> // for std::size_t
199 #include <iosfwd>
200
201Index: boost_1_34_1/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp
202===================================================================
203--- boost_1_34_1.orig/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp 2006-12-20 17:38:24.000000000 +0100
204+++ boost_1_34_1/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp 2008-09-20 20:55:21.000000000 +0200
205@@ -16,6 +16,7 @@
206 #include <string>
207 #include <cstdio>
208 #include <cstdarg>
209+#include <cstring>
210 #if defined(BOOST_SPIRIT_DEBUG)
211 #include <iostream>
212 #endif // defined(BOOST_SPIRIT_DEBUG)
213Index: boost_1_34_1/boost/wave/util/flex_string.hpp
214===================================================================
215--- boost_1_34_1.orig/boost/wave/util/flex_string.hpp 2006-04-25 19:21:01.000000000 +0200
216+++ boost_1_34_1/boost/wave/util/flex_string.hpp 2008-09-20 20:55:21.000000000 +0200
217@@ -94,6 +94,7 @@
218 #include <limits>
219 #include <stdexcept>
220 #include <cstddef>
221+#include <cstring>
222
223 // this must occur after all of the includes and before any code appears
224 #ifdef BOOST_HAS_ABI_HEADERS
diff --git a/meta/packages/boost/files/arm-intrinsics.patch b/meta/packages/boost/files/arm-intrinsics.patch
deleted file mode 100644
index 3f9c620ebe..0000000000
--- a/meta/packages/boost/files/arm-intrinsics.patch
+++ /dev/null
@@ -1,53 +0,0 @@
18/17/2010 - rebased to 1.44 by Qing He <qing.he@intel.com>
2
3diff --git a/boost/smart_ptr/detail/atomic_count_sync.hpp b/boost/smart_ptr/detail/atomic_count_sync.hpp
4index b6359b5..78b1cc2 100644
5--- a/boost/smart_ptr/detail/atomic_count_sync.hpp
6+++ b/boost/smart_ptr/detail/atomic_count_sync.hpp
7@@ -33,17 +33,46 @@ public:
8
9 long operator++()
10 {
11+#ifdef __ARM_ARCH_7A__
12+ int v1, tmp;
13+ asm volatile ("1: \n\t"
14+ "ldrex %0, %1 \n\t"
15+ "add %0 ,%0, #1 \n\t"
16+ "strex %2, %0, %1 \n\t"
17+ "cmp %2, #0 \n\t"
18+ "bne 1b \n\t"
19+ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
20+ );
21+#else
22 return __sync_add_and_fetch( &value_, 1 );
23+#endif
24 }
25
26 long operator--()
27 {
28+#ifdef __ARM_ARCH_7A__
29+ int v1, tmp;
30+ asm volatile ("1: \n\t"
31+ "ldrex %0, %1 \n\t"
32+ "sub %0 ,%0, #1 \n\t"
33+ "strex %2, %0, %1 \n\t"
34+ "cmp %2, #0 \n\t"
35+ "bne 1b \n\t"
36+ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
37+ );
38+ return value_;
39+#else
40 return __sync_add_and_fetch( &value_, -1 );
41+#endif
42 }
43
44 operator long() const
45 {
46+#if __ARM_ARCH_7A__
47+ return value_;
48+#else
49 return __sync_fetch_and_add( &value_, 0 );
50+#endif
51 }
52
53 private:
diff --git a/meta/packages/boost/files/atomic_count_gcc_atomicity.patch b/meta/packages/boost/files/atomic_count_gcc_atomicity.patch
deleted file mode 100644
index 7d08e73550..0000000000
--- a/meta/packages/boost/files/atomic_count_gcc_atomicity.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: boost_1_33_1/boost/detail/atomic_count_gcc.hpp
2===================================================================
3--- boost_1_33_1.orig/boost/detail/atomic_count_gcc.hpp 2008-05-01 20:43:45.000000000 +0200
4+++ boost_1_33_1/boost/detail/atomic_count_gcc.hpp 2008-05-01 20:43:55.000000000 +0200
5@@ -17,7 +17,7 @@
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8
9-#include <bits/atomicity.h>
10+#include <ext/atomicity.h>
11
12 namespace boost
13 {
diff --git a/meta/packages/boost/files/gcc41.patch b/meta/packages/boost/files/gcc41.patch
deleted file mode 100644
index f91d1adf2b..0000000000
--- a/meta/packages/boost/files/gcc41.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1diff -ur boost_1_33_1.orig/boost/bind.hpp boost_1_33_1/boost/bind.hpp
2--- boost_1_33_1.orig/boost/bind.hpp 2008-10-11 10:30:03.000000000 +0200
3+++ boost_1_33_1/boost/bind.hpp 2008-10-11 10:41:25.000000000 +0200
4@@ -28,6 +28,10 @@
5 #include <boost/bind/arg.hpp>
6 #include <boost/detail/workaround.hpp>
7
8+#if __GNUC__ == 4 && __GNUC_MINOR__ == 1
9+# include <boost/visit_each.hpp>
10+#endif
11+
12 // Borland-specific bug, visit_each() silently fails to produce code
13
14 #if defined(__BORLANDC__)
diff --git a/meta/packages/boost/files/gcc43.patch b/meta/packages/boost/files/gcc43.patch
deleted file mode 100644
index aefe0800c3..0000000000
--- a/meta/packages/boost/files/gcc43.patch
+++ /dev/null
@@ -1,256 +0,0 @@
1diff -aNru boost_1_34_1-ORIGINAL/boost/archive/polymorphic_iarchive.hpp boost_1_34_1/boost/archive/polymorphic_iarchive.hpp
2--- boost_1_34_1-ORIGINAL/boost/archive/polymorphic_iarchive.hpp 2005-12-11 00:12:51.000000000 -0600
3+++ boost_1_34_1/boost/archive/polymorphic_iarchive.hpp 2008-03-03 03:08:59.000000000 -0600
4@@ -17,6 +17,7 @@
5 // See http://www.boost.org for updates, documentation, and revision history.
6
7 #include <cstddef> // std::size_t
8+#include <climits>
9 #include <boost/config.hpp>
10
11 #if defined(BOOST_NO_STDC_NAMESPACE)
12diff -aNru boost_1_34_1-ORIGINAL/boost/archive/polymorphic_oarchive.hpp boost_1_34_1/boost/archive/polymorphic_oarchive.hpp
13--- boost_1_34_1-ORIGINAL/boost/archive/polymorphic_oarchive.hpp 2006-02-11 23:43:06.000000000 -0600
14+++ boost_1_34_1/boost/archive/polymorphic_oarchive.hpp 2008-03-03 03:08:59.000000000 -0600
15@@ -17,6 +17,7 @@
16 // See http://www.boost.org for updates, documentation, and revision history.
17
18 #include <cstddef> // size_t
19+#include <climits>
20 #include <string>
21
22 #include <boost/config.hpp>
23diff -aNru boost_1_34_1-ORIGINAL/boost/date_time/date_facet.hpp boost_1_34_1/boost/date_time/date_facet.hpp
24--- boost_1_34_1-ORIGINAL/boost/date_time/date_facet.hpp 2005-09-05 16:10:50.000000000 -0500
25+++ boost_1_34_1/boost/date_time/date_facet.hpp 2008-03-03 03:08:59.000000000 -0600
26@@ -429,7 +429,7 @@
27 typedef std::basic_string<CharT> string_type;
28 typedef CharT char_type;
29 typedef boost::date_time::period_parser<date_type, CharT> period_parser_type;
30- typedef special_values_parser<date_type,CharT> special_values_parser_type;
31+ typedef boost::date_time::special_values_parser<date_type,CharT> special_values_parser_type;
32 typedef std::vector<std::basic_string<CharT> > input_collection_type;
33 typedef format_date_parser<date_type, CharT> format_date_parser_type;
34 // date_generators stuff goes here
35diff -aNru boost_1_34_1-ORIGINAL/boost/mpl/zip_view.hpp boost_1_34_1/boost/mpl/zip_view.hpp
36--- boost_1_34_1-ORIGINAL/boost/mpl/zip_view.hpp 2004-09-02 10:40:42.000000000 -0500
37+++ boost_1_34_1/boost/mpl/zip_view.hpp 2008-03-03 03:08:59.000000000 -0600
38@@ -37,7 +37,7 @@
39 typedef zip_iterator<
40 typename transform1<
41 IteratorSeq
42- , next<_1>
43+ , boost::mpl::next<_1>
44 >::type
45 > next;
46 };
47@@ -48,8 +48,8 @@
48 struct zip_view
49 {
50 private:
51- typedef typename transform1< Sequences, begin<_1> >::type first_ones_;
52- typedef typename transform1< Sequences, end<_1> >::type last_ones_;
53+ typedef typename transform1< Sequences, boost::mpl::begin<_1> >::type first_ones_;
54+ typedef typename transform1< Sequences, boost::mpl::end<_1> >::type last_ones_;
55
56 public:
57 typedef nested_begin_end_tag tag;
58diff -aNru boost_1_34_1-ORIGINAL/boost/python/detail/def_helper.hpp boost_1_34_1/boost/python/detail/def_helper.hpp
59--- boost_1_34_1-ORIGINAL/boost/python/detail/def_helper.hpp 2004-09-15 20:00:28.000000000 -0500
60+++ boost_1_34_1/boost/python/detail/def_helper.hpp 2008-03-03 03:08:59.000000000 -0600
61@@ -155,7 +155,7 @@
62 , T3 const&
63 , T4 const&
64 , default_call_policies
65- , keywords<0>
66+ , boost::python::detail::keywords<0>
67 , char const*
68 , void(not_specified::*)() // A function pointer type which is never an
69 // appropriate default implementation
70diff -aNru boost_1_34_1-ORIGINAL/boost/regex/v4/basic_regex_creator.hpp boost_1_34_1/boost/regex/v4/basic_regex_creator.hpp
71--- boost_1_34_1-ORIGINAL/boost/regex/v4/basic_regex_creator.hpp 2006-07-16 11:06:38.000000000 -0500
72+++ boost_1_34_1/boost/regex/v4/basic_regex_creator.hpp 2008-03-03 03:08:59.000000000 -0600
73@@ -24,6 +24,8 @@
74 # include BOOST_ABI_PREFIX
75 #endif
76
77+#include <climits>
78+
79 namespace boost{
80
81 namespace re_detail{
82diff -aNru boost_1_34_1-ORIGINAL/boost/regex/v4/basic_regex.hpp boost_1_34_1/boost/regex/v4/basic_regex.hpp
83--- boost_1_34_1-ORIGINAL/boost/regex/v4/basic_regex.hpp 2007-06-05 12:28:18.000000000 -0500
84+++ boost_1_34_1/boost/regex/v4/basic_regex.hpp 2008-03-03 03:08:59.000000000 -0600
85@@ -23,6 +23,8 @@
86 # include BOOST_ABI_PREFIX
87 #endif
88
89+#include <climits>
90+
91 namespace boost{
92 #ifdef BOOST_MSVC
93 #pragma warning(push)
94diff -aNru boost_1_34_1-ORIGINAL/boost/regex/v4/basic_regex_parser.hpp boost_1_34_1/boost/regex/v4/basic_regex_parser.hpp
95--- boost_1_34_1-ORIGINAL/boost/regex/v4/basic_regex_parser.hpp 2006-12-20 11:19:05.000000000 -0600
96+++ boost_1_34_1/boost/regex/v4/basic_regex_parser.hpp 2008-03-03 03:08:59.000000000 -0600
97@@ -23,6 +23,8 @@
98 # include BOOST_ABI_PREFIX
99 #endif
100
101+#include <climits>
102+
103 namespace boost{
104 namespace re_detail{
105
106diff -aNru boost_1_34_1-ORIGINAL/boost/regex/v4/cpp_regex_traits.hpp boost_1_34_1/boost/regex/v4/cpp_regex_traits.hpp
107--- boost_1_34_1-ORIGINAL/boost/regex/v4/cpp_regex_traits.hpp 2007-01-15 05:09:44.000000000 -0600
108+++ boost_1_34_1/boost/regex/v4/cpp_regex_traits.hpp 2008-03-03 03:08:59.000000000 -0600
109@@ -41,6 +41,7 @@
110
111 #include <istream>
112 #include <ios>
113+#include <climits>
114
115 #ifdef BOOST_HAS_ABI_HEADERS
116 # include BOOST_ABI_PREFIX
117diff -aNru boost_1_34_1-ORIGINAL/boost/regex/v4/perl_matcher.hpp boost_1_34_1/boost/regex/v4/perl_matcher.hpp
118--- boost_1_34_1-ORIGINAL/boost/regex/v4/perl_matcher.hpp 2006-10-18 07:55:30.000000000 -0500
119+++ boost_1_34_1/boost/regex/v4/perl_matcher.hpp 2008-03-03 03:08:59.000000000 -0600
120@@ -18,6 +18,8 @@
121 # include BOOST_ABI_PREFIX
122 #endif
123
124+#include <climits>
125+
126 namespace boost{
127 namespace re_detail{
128
129diff -aNru boost_1_34_1-ORIGINAL/boost/regex/v4/regex_split.hpp boost_1_34_1/boost/regex/v4/regex_split.hpp
130--- boost_1_34_1-ORIGINAL/boost/regex/v4/regex_split.hpp 2005-01-21 11:22:38.000000000 -0600
131+++ boost_1_34_1/boost/regex/v4/regex_split.hpp 2008-03-03 03:08:59.000000000 -0600
132@@ -21,6 +21,8 @@
133 #ifndef BOOST_REGEX_SPLIT_HPP
134 #define BOOST_REGEX_SPLIT_HPP
135
136+#include <climits>
137+
138 namespace boost{
139
140 #ifdef BOOST_HAS_ABI_HEADERS
141diff -aNru boost_1_34_1-ORIGINAL/boost/regex/v4/states.hpp boost_1_34_1/boost/regex/v4/states.hpp
142--- boost_1_34_1-ORIGINAL/boost/regex/v4/states.hpp 2005-09-20 07:01:25.000000000 -0500
143+++ boost_1_34_1/boost/regex/v4/states.hpp 2008-03-03 03:08:59.000000000 -0600
144@@ -23,6 +23,8 @@
145 # include BOOST_ABI_PREFIX
146 #endif
147
148+#include <climits>
149+
150 namespace boost{
151 namespace re_detail{
152
153diff -aNru boost_1_34_1-ORIGINAL/boost/serialization/collection_traits.hpp boost_1_34_1/boost/serialization/collection_traits.hpp
154--- boost_1_34_1-ORIGINAL/boost/serialization/collection_traits.hpp 2005-06-21 00:19:04.000000000 -0500
155+++ boost_1_34_1/boost/serialization/collection_traits.hpp 2008-03-03 03:09:49.000000000 -0600
156@@ -22,6 +22,7 @@
157 // compiles recognize the same set of primitive types, the possibility
158 // exists for archives to be non-portable if class information for primitive
159 // types is included. This is addressed by the following macros.
160+#include <climits>
161 #include <boost/config.hpp>
162 #include <boost/mpl/integral_c.hpp>
163 #include <boost/mpl/integral_c_tag.hpp>
164diff -aNru boost_1_34_1-ORIGINAL/boost/spirit/phoenix/operators.hpp boost_1_34_1/boost/spirit/phoenix/operators.hpp
165--- boost_1_34_1-ORIGINAL/boost/spirit/phoenix/operators.hpp 2006-08-25 11:27:30.000000000 -0500
166+++ boost_1_34_1/boost/spirit/phoenix/operators.hpp 2008-03-03 03:08:59.000000000 -0600
167@@ -24,6 +24,7 @@
168 #include <boost/spirit/phoenix/composite.hpp>
169 #include <boost/config.hpp>
170 #include <boost/mpl/if.hpp>
171+#include <climits>
172
173 ///////////////////////////////////////////////////////////////////////////////
174 namespace phoenix {
175diff -aNru boost_1_34_1-ORIGINAL/boost/test/test_tools.hpp boost_1_34_1/boost/test/test_tools.hpp
176--- boost_1_34_1-ORIGINAL/boost/test/test_tools.hpp 2007-02-22 11:57:29.000000000 -0600
177+++ boost_1_34_1/boost/test/test_tools.hpp 2008-03-03 03:08:59.000000000 -0600
178@@ -42,6 +42,7 @@
179 #include <boost/mpl/or.hpp>
180
181 // STL
182+#include <climits>
183 #include <cstddef> // for std::size_t
184 #include <iosfwd>
185
186diff -aNru boost_1_34_1-ORIGINAL/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp boost_1_34_1/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp
187--- boost_1_34_1-ORIGINAL/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp 2006-12-20 10:38:24.000000000 -0600
188+++ boost_1_34_1/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp 2008-03-03 03:08:59.000000000 -0600
189@@ -16,6 +16,7 @@
190 #include <string>
191 #include <cstdio>
192 #include <cstdarg>
193+#include <cstring>
194 #if defined(BOOST_SPIRIT_DEBUG)
195 #include <iostream>
196 #endif // defined(BOOST_SPIRIT_DEBUG)
197diff -aNru boost_1_34_1-ORIGINAL/boost/wave/util/flex_string.hpp boost_1_34_1/boost/wave/util/flex_string.hpp
198--- boost_1_34_1-ORIGINAL/boost/wave/util/flex_string.hpp 2006-04-25 12:21:01.000000000 -0500
199+++ boost_1_34_1/boost/wave/util/flex_string.hpp 2008-03-03 03:08:59.000000000 -0600
200@@ -94,6 +94,7 @@
201 #include <limits>
202 #include <stdexcept>
203 #include <cstddef>
204+#include <cstring>
205
206 // this must occur after all of the includes and before any code appears
207 #ifdef BOOST_HAS_ABI_HEADERS
208
209--- boost_1_33_1/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp 2008-07-05 01:50:04.000000000 +0200
210+++ boost_1_34_1/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp 2006-12-20 17:38:24.000000000 +0100
211@@ -295,17 +325,20 @@
212
213 lex_functor(IteratorT const &first, IteratorT const &last,
214 PositionT const &pos, boost::wave::language_support language)
215- : lexer(first, last, pos, language)
216+ : re2c_lexer(first, last, pos, language)
217 {}
218 virtual ~lex_functor() {}
219
220 // get the next token from the input stream
221- token_type get() { return lexer.get(); }
222- void set_position(PositionT const &pos)
223- { lexer.set_position(pos); }
224+ token_type get() { return re2c_lexer.get(); }
225+ void set_position(PositionT const &pos) { re2c_lexer.set_position(pos); }
226+#if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
227+ bool has_include_guards(std::string& guard_name) const
228+ { return re2c_lexer.has_include_guards(guard_name); }
229+#endif
230
231 private:
232- lexer<IteratorT, PositionT> lexer;
233+ lexer<IteratorT, PositionT> re2c_lexer;
234 };
235
236 ///////////////////////////////////////////////////////////////////////////////
237@@ -338,7 +371,7 @@
238 // It is coupled to the iterator type to allow to decouple the lexer/iterator
239 // configurations at compile time.
240 //
241-// This function is declared inside the cpp_slex_token.hpp file, which is
242+// This function is declared inside the cpp_lex_token.hpp file, which is
243 // referenced by the source file calling the lexer and the source file, which
244 // instantiates the lex_functor. But is is defined here, so it will be
245 // instantiated only while compiling the source file, which instantiates the
246@@ -356,8 +389,8 @@
247 IteratorT const &last, PositionT const &pos,
248 boost::wave::language_support language)
249 {
250- return new re2clex::lex_functor<IteratorT, PositionT>(first, last, pos,
251- language);
252+ using re2clex::lex_functor;
253+ return new lex_functor<IteratorT, PositionT>(first, last, pos, language);
254 }
255
256 #undef BOOST_WAVE_RE2C_NEW_LEXER_INLINE
diff --git a/meta/packages/boost/files/linux-uclibc.patch b/meta/packages/boost/files/linux-uclibc.patch
deleted file mode 100644
index 79f14dea88..0000000000
--- a/meta/packages/boost/files/linux-uclibc.patch
+++ /dev/null
@@ -1,10 +0,0 @@
1--- /dev/null 1969-12-31 16:00:00.000000000 -0800
2+++ boost_1_32_0/boost/config/platform/linux-uclibc.hpp 2005-07-05 14:51:56.237294460 -0700
3@@ -0,0 +1,7 @@
4+// Modifications required to support uClibC libc implementation.
5+// Default to Linux...
6+#include "linux.hpp"
7+
8+// Override anything uClibC doesn't support.
9+// At present (0.9.27) the nl_types.h header exists but is not implemented
10+#undef BOOST_HAS_NL_TYPES_H
diff --git a/meta/packages/boost/files/unit_test_log10f.patch b/meta/packages/boost/files/unit_test_log10f.patch
deleted file mode 100644
index b235e12446..0000000000
--- a/meta/packages/boost/files/unit_test_log10f.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1--- boost_1_32_0/libs/test/src/unit_test_result.cpp.orig 2005-07-05 11:00:53.887594850 -0700
2+++ boost_1_32_0/libs/test/src/unit_test_result.cpp 2005-07-05 11:01:20.683533034 -0700
3@@ -144,7 +144,7 @@
4 unit_test_counter num_passed, unit_test_counter num_failed )
5 {
6 unit_test_counter total_test_cases = num_passed + num_failed;
7- std::size_t width = static_cast<std::size_t>( std::log10( (float)(std::max)( num_passed, num_failed ) ) ) + 1;
8+ std::size_t width = static_cast<std::size_t>( std::log10( (double)(std::max)( num_passed, num_failed ) ) ) + 1;
9
10 where_to << std::setw( indent ) << "" << std::setw( width ) << num_passed
11 << " test " << ps_name( num_passed != 1, "case" ) << " out of " << total_test_cases << " passed\n"
12@@ -158,7 +158,7 @@
13 {
14 unit_test_counter total_assertions = num_passed + num_failed;
15 std::size_t width = total_assertions > 0
16- ? static_cast<std::size_t>( std::log10( (float)(std::max)( num_passed, num_failed ) ) ) + 1
17+ ? static_cast<std::size_t>( std::log10( (double)(std::max)( num_passed, num_failed ) ) ) + 1
18 : 1;
19
20 where_to << std::setw( indent ) << "" << std::setw( width ) << num_passed
diff --git a/meta/packages/bzip2/bzip2-1.0.5/Makefile.am b/meta/packages/bzip2/bzip2-1.0.5/Makefile.am
deleted file mode 100644
index 070d57b243..0000000000
--- a/meta/packages/bzip2/bzip2-1.0.5/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
1
2lib_LTLIBRARIES = libbz2.la
3
4libbz2_la_SOURCES = blocksort.c \
5 huffman.c \
6 crctable.c \
7 randtable.c \
8 compress.c \
9 decompress.c \
10 bzlib.c
11
12bin_PROGRAMS = bzip2 bzip2recover
13
14bzip2_SOURCES = bzip2.c
15bzip2_LDADD = libbz2.la
16bzip2_DEPENDENCIES = libbz2.la
17
18include_HEADERS = bzlib.h
19
20bzip2recover_SOURCES = bzip2recover.c
21bzip2recover_LDADD = libbz2.la
22bzip2recover_DEPENDENCIES = libbz2.la
23
24bin_SCRIPTS = bzgrep bzmore bzdiff
25
26man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
27EXTRA_DIST = $(man_MANS)
28
29install-exec-hook:
30 ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT)
31 ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT)
32 ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT)
33 ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT)
34 ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT)
35 ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT)
36
37install-data-hook:
38 echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1
39 echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1
40 echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1
41 echo ".so man1/bzdiff.1" > $(DESTDIR)$(mandir)/man1/bzcmp.1
diff --git a/meta/packages/bzip2/bzip2-1.0.5/configure.ac b/meta/packages/bzip2/bzip2-1.0.5/configure.ac
deleted file mode 100644
index 14b1d1809d..0000000000
--- a/meta/packages/bzip2/bzip2-1.0.5/configure.ac
+++ /dev/null
@@ -1,14 +0,0 @@
1AC_PREREQ([2.57])
2
3AC_INIT(bzip2, 2.0.5, , libXrender)
4AM_INIT_AUTOMAKE()
5AM_MAINTAINER_MODE
6
7#AM_CONFIG_HEADER(config.h)
8
9# Check for progs
10AC_PROG_CC
11AC_PROG_LIBTOOL
12
13AC_OUTPUT([Makefile])
14
diff --git a/meta/packages/bzip2/bzip2_1.0.5.bb b/meta/packages/bzip2/bzip2_1.0.5.bb
deleted file mode 100644
index c6339c0676..0000000000
--- a/meta/packages/bzip2/bzip2_1.0.5.bb
+++ /dev/null
@@ -1,41 +0,0 @@
1DESCRIPTION = "Very high-quality data compression program."
2HOMEPAGE = "http://www.bzip.org/"
3SECTION = "console/utils"
4LICENSE = "bzip2"
5LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2"
6PR = "r2"
7
8SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \
9 file://configure.ac \
10 file://Makefile.am"
11
12CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
13
14inherit autotools
15
16do_configure_prepend () {
17 cp ${WORKDIR}/configure.ac ${S}/
18 cp ${WORKDIR}/Makefile.am ${S}/
19 cp ${STAGING_DATADIR_NATIVE}/automake*/install-sh ${S}/
20}
21
22do_install_append () {
23 if [ "${BUILD_ARCH}" != "${HOST_ARCH}" ]; then
24 mv ${D}${bindir}/bunzip2 ${D}${bindir}/bunzip2.${PN}
25 mv ${D}${bindir}/bzcat ${D}${bindir}/bzcat.${PN}
26 fi
27}
28
29pkg_postinst_${PN} () {
30 update-alternatives --install ${bindir}/bunzip2 bunzip2 bunzip2.${PN} 100
31 update-alternatives --install ${bindir}/bzcat bzcat bzcat.${PN} 100
32}
33
34
35pkg_prerm_${PN} () {
36 update-alternatives --remove bunzip2 bunzip2.${PN}
37 update-alternatives --remove bzcat bzcat.${PN}
38}
39
40PROVIDES_append_virtclass-native = " bzip2-full-native"
41BBCLASSEXTEND = "native"
diff --git a/meta/packages/claws-mail/claws-mail.inc b/meta/packages/claws-mail/claws-mail.inc
deleted file mode 100644
index 04401df2f5..0000000000
--- a/meta/packages/claws-mail/claws-mail.inc
+++ /dev/null
@@ -1,57 +0,0 @@
1SECTION = "x11/network"
2DESCRIPTION = "Mail user agent"
3#DEPENDS = "gtk+ gpgme libetpan libgnomeprint aspell openssl"
4DEPENDS = "gtk+ libetpan openssl libowl"
5LICENSE = "GPL"
6PR = "r6"
7
8SRC_URI = "\
9 ${SOURCEFORGE_MIRROR}/sylpheed-claws/claws-mail-${PV}.tar.bz2 \
10 file://desktop.patch;patch=1 \
11 file://streamline-ui.patch;patch=1 \
12 file://owl-window-menu.patch;patch=1 \
13 file://fix-build.patch;patch=1 \
14 "
15
16FILES_${PN} = "${bindir} ${datadir}/pixmaps ${datadir}/applications"
17
18#EXTRA_OECONF = "--disable-aspell-test \
19# --disable-dillo-viewer-plugin --with-aspell-prefix=${STAGING_DIR_HOST}${prefix} \
20# --enable-aspell"
21
22EXTRA_OECONF = "--disable-aspell-test \
23 --disable-aspell \
24 --disable-manual \
25# --disable-openssl \
26 --disable-crash-dialog \
27 --disable-jpilot \
28 --disable-trayicon-plugin \
29 --disable-spamassassin-plugin \
30 --disable-bogofilter-plugin \
31 --disable-pgpcore-plugin \
32 --disable-pgpmime-plugin \
33 --disable-pgpinline-plugin \
34 --disable-dillo-viewer-plugin \
35 --disable-clamav-plugin \
36# --disable-libetpan \
37 --disable-gnomeprint \
38 --disable-valgrind \
39 --disable-static \
40 "
41
42CFLAGS += "-D_GNU_SOURCE"
43
44inherit autotools pkgconfig gettext
45
46do_install_append() {
47 install -d ${D}${datadir}/applications
48 install -m 0644 claws-mail.desktop ${D}${datadir}/applications/
49 install -d ${D}${datadir}/pixmaps
50 install -m 0644 claws-mail.png ${D}${datadir}/pixmaps/
51}
52
53#python populate_packages_prepend () {
54# abiword_libdir = bb.data.expand('${libdir}/claws-mail/plugins', d)
55#
56# do_split_packages(d, abiword_libdir, '^(.*)\.so$', 'claws-mail-plugin-%s', 'Claws plugin for %s', extra_depends='')
57#}
diff --git a/meta/packages/claws-mail/claws-mail_2.9.1.bb b/meta/packages/claws-mail/claws-mail_2.9.1.bb
deleted file mode 100644
index f8a8396b95..0000000000
--- a/meta/packages/claws-mail/claws-mail_2.9.1.bb
+++ /dev/null
@@ -1 +0,0 @@
1require claws-mail.inc
diff --git a/meta/packages/claws-mail/claws-plugin-gtkhtml2-viewer_0.15.bb b/meta/packages/claws-mail/claws-plugin-gtkhtml2-viewer_0.15.bb
deleted file mode 100644
index 82918173e4..0000000000
--- a/meta/packages/claws-mail/claws-plugin-gtkhtml2-viewer_0.15.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1SECTION = "x11/network"
2DESCRIPTION = "Mail user agent plugins"
3DEPENDS = "claws-mail gtkhtml2 curl"
4LICENSE = "GPL"
5PR = "r1"
6
7SRC_URI = "http://www.claws-mail.org/downloads/plugins/gtkhtml2_viewer-${PV}.tar.gz"
8
9inherit autotools pkgconfig gettext
10
11S = "${WORKDIR}/gtkhtml2_viewer-${PV}"
12
13FILES_${PN} = "${libdir}/claws-mail/plugins/*.so"
14
diff --git a/meta/packages/claws-mail/claws-plugin-maildir_0.24.4.bb b/meta/packages/claws-mail/claws-plugin-maildir_0.24.4.bb
deleted file mode 100644
index 4351d1e5de..0000000000
--- a/meta/packages/claws-mail/claws-plugin-maildir_0.24.4.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1SECTION = "x11/network"
2DESCRIPTION = "Mail user agent plugins"
3DEPENDS = "claws-mail db"
4LICENSE = "GPL"
5PR = "r1"
6
7SRC_URI = "http://www.claws-mail.org/downloads/plugins/maildir-${PV}.tar.gz"
8
9inherit autotools pkgconfig
10
11S = "${WORKDIR}/maildir-${PV}"
12
13FILES_${PN} = "${libdir}/claws-mail/plugins/*.so"
14
diff --git a/meta/packages/claws-mail/claws-plugin-mailmbox_1.13.bb b/meta/packages/claws-mail/claws-plugin-mailmbox_1.13.bb
deleted file mode 100644
index fe7041494f..0000000000
--- a/meta/packages/claws-mail/claws-plugin-mailmbox_1.13.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1SECTION = "x11/network"
2DESCRIPTION = "Mail user agent plugins"
3DEPENDS = "claws-mail"
4LICENSE = "GPL"
5PR = "r2"
6
7SRC_URI = "http://www.claws-mail.org/downloads/plugins/mailmbox-${PV}.tar.gz"
8
9inherit autotools pkgconfig
10
11S = "${WORKDIR}/mailmbox-${PV}"
12
13FILES_${PN} = "${libdir}/claws-mail/plugins/*.so"
14FILES_${PN}-dbg = "${libdir}/claws-mail/plugins/.debug"
diff --git a/meta/packages/claws-mail/claws-plugin-rssyl_0.13.bb b/meta/packages/claws-mail/claws-plugin-rssyl_0.13.bb
deleted file mode 100644
index de0705c7fd..0000000000
--- a/meta/packages/claws-mail/claws-plugin-rssyl_0.13.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1SECTION = "x11/network"
2DESCRIPTION = "Mail user agent plugins"
3DEPENDS = "claws-mail libxml2 curl glib-2.0 gtk+"
4LICENSE = "GPL"
5PR = "r1"
6
7SRC_URI = "http://www.claws-mail.org/downloads/plugins/rssyl-${PV}.tar.gz"
8
9inherit autotools pkgconfig gettext
10
11S = "${WORKDIR}/rssyl-${PV}"
12
13FILES_${PN} = "${libdir}/claws-mail/plugins/*.so"
14
diff --git a/meta/packages/claws-mail/files/desktop.patch b/meta/packages/claws-mail/files/desktop.patch
deleted file mode 100644
index c5ed7a9c7d..0000000000
--- a/meta/packages/claws-mail/files/desktop.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1Index: claws-mail-2.9.1/claws-mail.desktop
2===================================================================
3--- claws-mail-2.9.1.orig/claws-mail.desktop 2007-04-24 17:40:20.000000000 +0100
4+++ claws-mail-2.9.1/claws-mail.desktop 2007-04-25 07:08:36.000000000 +0100
5@@ -1,11 +1,11 @@
6 [Desktop Entry]
7 Encoding=UTF-8
8-Name=Claws Mail
9+Name=Mail
10 Exec=claws-mail
11 Icon=claws-mail
12-Info="Claws Mail"
13+Info=Email Application
14 Categories=GTK;Network;Email;
15-Comment="Gtk+ based Mail Client"
16+Comment=Email Application
17 Terminal=false
18 Type=Application
19 StartupNotify=true
diff --git a/meta/packages/claws-mail/files/fix-build.patch b/meta/packages/claws-mail/files/fix-build.patch
deleted file mode 100644
index 2f30899fe1..0000000000
--- a/meta/packages/claws-mail/files/fix-build.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1Remove duplicate file entries as this breaks install with new Automake
2
3JL 19/03/10
4
5Index: claws-mail-2.9.1/src/gtk/Makefile.am
6===================================================================
7--- claws-mail-2.9.1.orig/src/gtk/Makefile.am 2007-03-22 07:52:47.000000000 +0000
8+++ claws-mail-2.9.1/src/gtk/Makefile.am 2010-03-19 14:54:06.565828281 +0000
9@@ -44,7 +44,6 @@
10 filesel.h \
11 foldersort.h \
12 gtkaspell.h \
13- gtksctree.h \
14 gtkshruler.h \
15 gtksctree.h \
16 gtksourceprintjob.h \
17@@ -57,7 +56,6 @@
18 menu.h \
19 pluginwindow.h \
20 prefswindow.h \
21- gtkvscrollbutton.h \
22 progressdialog.h \
23 quicksearch.h \
24 sslcertwindow.h \
diff --git a/meta/packages/claws-mail/files/owl-window-menu.patch b/meta/packages/claws-mail/files/owl-window-menu.patch
deleted file mode 100644
index 54c61668a9..0000000000
--- a/meta/packages/claws-mail/files/owl-window-menu.patch
+++ /dev/null
@@ -1,1009 +0,0 @@
1Index: claws-mail-2.9.1/src/addressbook.c
2===================================================================
3--- claws-mail-2.9.1.orig/src/addressbook.c 2007-04-25 10:18:13.000000000 +0100
4+++ claws-mail-2.9.1/src/addressbook.c 2007-04-25 10:30:23.000000000 +0100
5@@ -941,7 +941,6 @@
6 sizeof(addressbook_entries[0]);
7 menubar = menubar_create(window, addressbook_entries, n_entries,
8 "<AddressBook>", NULL);
9- gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
10 menu_factory = gtk_item_factory_from_widget(menubar);
11
12 vbox2 = gtk_vbox_new(FALSE, BORDER_WIDTH);
13Index: claws-mail-2.9.1/src/gtk/menu.c
14===================================================================
15--- claws-mail-2.9.1.orig/src/gtk/menu.c 2007-04-25 10:18:13.000000000 +0100
16+++ claws-mail-2.9.1/src/gtk/menu.c 2007-04-25 10:30:23.000000000 +0100
17@@ -35,10 +35,7 @@
18 #include "menu.h"
19 #include "utils.h"
20
21-#ifdef MAEMO
22-#include <hildon-widgets/hildon-program.h>
23-#include <gtk/gtkmain.h>
24-#endif
25+#include <libowl/owlwindowmenu.h>
26
27 static void connect_accel_change_signals(GtkWidget* widget, GtkWidget *wid2) ;
28
29@@ -49,20 +46,14 @@
30 GtkItemFactory *factory;
31 GtkWidget *menubar;
32
33-#ifdef MAEMO
34 factory = gtk_item_factory_new(GTK_TYPE_MENU, path, NULL);
35-#else
36- factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, path, NULL);
37-#endif
38 gtk_item_factory_set_translate_func(factory, menu_translate,
39 NULL, NULL);
40 gtk_item_factory_create_items(factory, n_entries, entries, data);
41 gtk_window_add_accel_group (GTK_WINDOW (window), factory->accel_group);
42
43 menubar = gtk_item_factory_get_widget(factory, path);
44-#ifdef MAEMO
45- hildon_window_set_menu(HILDON_WINDOW(window), GTK_MENU(menubar));
46-#endif
47+ owl_set_window_menu(GTK_WINDOW(window), GTK_MENU(menubar));
48 return menubar;
49 }
50
51Index: claws-mail-2.9.1/src/mainwindow.c
52===================================================================
53--- claws-mail-2.9.1.orig/src/mainwindow.c 2007-04-25 10:26:40.000000000 +0100
54+++ claws-mail-2.9.1/src/mainwindow.c 2007-04-25 10:30:23.000000000 +0100
55@@ -1094,8 +1094,6 @@
56 n_menu_entries = sizeof(mainwin_entries) / sizeof(mainwin_entries[0]);
57 menubar = menubar_create(window, mainwin_entries,
58 n_menu_entries, "<Main>", mainwin);
59- gtk_widget_show(menubar);
60- gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
61 ifactory = gtk_item_factory_from_widget(menubar);
62
63 /* gtk_widget_show(gtk_item_factory_get_item(ifactory,"/Message/Mailing-List"));
64Index: claws-mail-2.9.1/src/messageview.c
65===================================================================
66--- claws-mail-2.9.1.orig/src/messageview.c 2007-04-25 10:18:13.000000000 +0100
67+++ claws-mail-2.9.1/src/messageview.c 2007-04-25 10:30:23.000000000 +0100
68@@ -414,8 +414,6 @@
69 n_menu_entries = sizeof(msgview_entries) / sizeof(msgview_entries[0]);
70 menubar = menubar_create(window, msgview_entries,
71 n_menu_entries, "<MessageView>", msgview);
72- gtk_widget_show(menubar);
73- gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
74
75 if (prefs_common.toolbar_detachable) {
76 handlebox = gtk_handle_box_new();
77@@ -478,6 +476,7 @@
78 g_signal_connect(G_OBJECT(window), "key_press_event",
79 G_CALLBACK(key_pressed), msgview);
80 #endif
81+ gtk_widget_realize(window);
82 messageview_add_toolbar(msgview, window);
83
84 if (show) {
85Index: claws-mail-2.9.1/configure.ac
86===================================================================
87--- claws-mail-2.9.1.orig/configure.ac 2007-04-25 10:18:13.000000000 +0100
88+++ claws-mail-2.9.1/configure.ac 2007-04-25 10:30:23.000000000 +0100
89@@ -406,6 +406,11 @@
90 AC_SUBST(GTK_CFLAGS)
91 AC_SUBST(GTK_LIBS)
92
93+OWL_CFLAGS=""
94+OWL_LIBS="-lowl"
95+AC_SUBST(OWL_CFLAGS)
96+AC_SUBST(OWL_LIBS)
97+
98 dnl GNU/Aspell is used for spell checking
99 AC_ARG_ENABLE(aspell,
100 [ --disable-aspell Disable GNU/aspell support [default=yes]],
101Index: claws-mail-2.9.1/src/Makefile.am
102===================================================================
103--- claws-mail-2.9.1.orig/src/Makefile.am 2007-04-25 10:18:13.000000000 +0100
104+++ claws-mail-2.9.1/src/Makefile.am 2007-04-25 10:30:23.000000000 +0100
105@@ -471,7 +471,8 @@
106 $(LIBICONV) \
107 $(STARTUP_NOTIFICATION_LIBS) \
108 $(LIBETPAN_LIBS) \
109- $(MAEMO_LIBS)
110+ $(MAEMO_LIBS) \
111+ $(OWL_LIBS)
112
113 AM_CPPFLAGS = \
114 -DG_LOG_DOMAIN=\"Claws-Mail\" \
115@@ -489,6 +490,7 @@
116 $(LIBETPAN_CPPFLAGS) \
117 $(STARTUP_NOTIFICATION_CFLAGS) \
118 $(MAEMO_CFLAGS) \
119+ $(OWL_CFLAGS) \
120 -Wno-unused-function
121
122 #no-unused-function is there because of bison stuff
123Index: claws-mail-2.9.1/configure
124===================================================================
125--- claws-mail-2.9.1.orig/configure 2007-04-25 10:18:13.000000000 +0100
126+++ claws-mail-2.9.1/configure 2007-04-25 10:30:23.000000000 +0100
127@@ -769,7 +769,6 @@
128 # include <unistd.h>
129 #endif"
130
131-gt_needs=
132 ac_subst_vars='SHELL
133 PATH_SEPARATOR
134 PACKAGE_NAME
135@@ -942,6 +941,8 @@
136 PASSCRYPT_KEY
137 GTK_CFLAGS
138 GTK_LIBS
139+OWL_LIBS
140+OWL_CFLAGS
141 ASPELL
142 ASPELL_CFLAGS
143 ASPELL_LIBS
144@@ -2063,7 +2064,6 @@
145 >$cache_file
146 fi
147
148-gt_needs="$gt_needs "
149 # Check that the precious variables saved in the cache have kept the same
150 # value.
151 ac_cache_corrupted=false
152@@ -3001,9 +3001,7 @@
153 # Put the nasty error message in config.log where it belongs
154 echo "$GNOME2_PKG_ERRORS" >&5
155
156- { echo "$as_me:$LINENO: result: no" >&5
157-echo "${ECHO_T}no" >&6; }
158- ac_enable_gnome2=no
159+ ac_enable_gnome2=no
160 elif test $pkg_failed = untried; then
161 ac_enable_gnome2=no
162 else
163@@ -4147,14 +4145,12 @@
164
165
166
167-
168- { echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
169-echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6; }
170-if test "${ac_cv_lib_cposix_strerror+set}" = set; then
171+{ echo "$as_me:$LINENO: checking for library containing strerror" >&5
172+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; }
173+if test "${ac_cv_search_strerror+set}" = set; then
174 echo $ECHO_N "(cached) $ECHO_C" >&6
175 else
176- ac_check_lib_save_LIBS=$LIBS
177-LIBS="-lcposix $LIBS"
178+ ac_func_search_save_LIBS=$LIBS
179 cat >conftest.$ac_ext <<_ACEOF
180 /* confdefs.h. */
181 _ACEOF
182@@ -4177,7 +4173,14 @@
183 return 0;
184 }
185 _ACEOF
186-rm -f conftest.$ac_objext conftest$ac_exeext
187+for ac_lib in '' cposix; do
188+ if test -z "$ac_lib"; then
189+ ac_res="none required"
190+ else
191+ ac_res=-l$ac_lib
192+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
193+ fi
194+ rm -f conftest.$ac_objext conftest$ac_exeext
195 if { (ac_try="$ac_link"
196 case "(($ac_try" in
197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
198@@ -4195,25 +4198,35 @@
199 test ! -s conftest.err
200 } && test -s conftest$ac_exeext &&
201 $as_test_x conftest$ac_exeext; then
202- ac_cv_lib_cposix_strerror=yes
203+ ac_cv_search_strerror=$ac_res
204 else
205 echo "$as_me: failed program was:" >&5
206 sed 's/^/| /' conftest.$ac_ext >&5
207
208- ac_cv_lib_cposix_strerror=no
209+
210 fi
211
212 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
213- conftest$ac_exeext conftest.$ac_ext
214-LIBS=$ac_check_lib_save_LIBS
215+ conftest$ac_exeext
216+ if test "${ac_cv_search_strerror+set}" = set; then
217+ break
218+fi
219+done
220+if test "${ac_cv_search_strerror+set}" = set; then
221+ :
222+else
223+ ac_cv_search_strerror=no
224 fi
225-{ echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
226-echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6; }
227-if test $ac_cv_lib_cposix_strerror = yes; then
228- LIBS="$LIBS -lcposix"
229+rm conftest.$ac_ext
230+LIBS=$ac_func_search_save_LIBS
231 fi
232+{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
233+echo "${ECHO_T}$ac_cv_search_strerror" >&6; }
234+ac_res=$ac_cv_search_strerror
235+if test "$ac_res" != no; then
236+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
237
238-
239+fi
240
241 # Find a good install program. We prefer a C program (faster),
242 # so one script is as good as another. But avoid the broken or
243@@ -5769,7 +5782,7 @@
244 ;;
245 *-*-irix6*)
246 # Find out which ABI we are using.
247- echo '#line 5772 "configure"' > conftest.$ac_ext
248+ echo '#line 5785 "configure"' > conftest.$ac_ext
249 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
250 (eval $ac_compile) 2>&5
251 ac_status=$?
252@@ -8555,11 +8568,11 @@
253 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
254 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
255 -e 's:$: $lt_compiler_flag:'`
256- (eval echo "\"\$as_me:8558: $lt_compile\"" >&5)
257+ (eval echo "\"\$as_me:8571: $lt_compile\"" >&5)
258 (eval "$lt_compile" 2>conftest.err)
259 ac_status=$?
260 cat conftest.err >&5
261- echo "$as_me:8562: \$? = $ac_status" >&5
262+ echo "$as_me:8575: \$? = $ac_status" >&5
263 if (exit $ac_status) && test -s "$ac_outfile"; then
264 # The compiler can only warn and ignore the option if not recognized
265 # So say no if there are warnings other than the usual output.
266@@ -8823,11 +8836,11 @@
267 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
268 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
269 -e 's:$: $lt_compiler_flag:'`
270- (eval echo "\"\$as_me:8826: $lt_compile\"" >&5)
271+ (eval echo "\"\$as_me:8839: $lt_compile\"" >&5)
272 (eval "$lt_compile" 2>conftest.err)
273 ac_status=$?
274 cat conftest.err >&5
275- echo "$as_me:8830: \$? = $ac_status" >&5
276+ echo "$as_me:8843: \$? = $ac_status" >&5
277 if (exit $ac_status) && test -s "$ac_outfile"; then
278 # The compiler can only warn and ignore the option if not recognized
279 # So say no if there are warnings other than the usual output.
280@@ -8927,11 +8940,11 @@
281 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
282 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
283 -e 's:$: $lt_compiler_flag:'`
284- (eval echo "\"\$as_me:8930: $lt_compile\"" >&5)
285+ (eval echo "\"\$as_me:8943: $lt_compile\"" >&5)
286 (eval "$lt_compile" 2>out/conftest.err)
287 ac_status=$?
288 cat out/conftest.err >&5
289- echo "$as_me:8934: \$? = $ac_status" >&5
290+ echo "$as_me:8947: \$? = $ac_status" >&5
291 if (exit $ac_status) && test -s out/conftest2.$ac_objext
292 then
293 # The compiler can only warn and ignore the option if not recognized
294@@ -11224,7 +11237,7 @@
295 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
296 lt_status=$lt_dlunknown
297 cat > conftest.$ac_ext <<EOF
298-#line 11227 "configure"
299+#line 11240 "configure"
300 #include "confdefs.h"
301
302 #if HAVE_DLFCN_H
303@@ -11324,7 +11337,7 @@
304 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
305 lt_status=$lt_dlunknown
306 cat > conftest.$ac_ext <<EOF
307-#line 11327 "configure"
308+#line 11340 "configure"
309 #include "confdefs.h"
310
311 #if HAVE_DLFCN_H
312@@ -13660,11 +13673,11 @@
313 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
314 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
315 -e 's:$: $lt_compiler_flag:'`
316- (eval echo "\"\$as_me:13663: $lt_compile\"" >&5)
317+ (eval echo "\"\$as_me:13676: $lt_compile\"" >&5)
318 (eval "$lt_compile" 2>conftest.err)
319 ac_status=$?
320 cat conftest.err >&5
321- echo "$as_me:13667: \$? = $ac_status" >&5
322+ echo "$as_me:13680: \$? = $ac_status" >&5
323 if (exit $ac_status) && test -s "$ac_outfile"; then
324 # The compiler can only warn and ignore the option if not recognized
325 # So say no if there are warnings other than the usual output.
326@@ -13764,11 +13777,11 @@
327 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
328 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
329 -e 's:$: $lt_compiler_flag:'`
330- (eval echo "\"\$as_me:13767: $lt_compile\"" >&5)
331+ (eval echo "\"\$as_me:13780: $lt_compile\"" >&5)
332 (eval "$lt_compile" 2>out/conftest.err)
333 ac_status=$?
334 cat out/conftest.err >&5
335- echo "$as_me:13771: \$? = $ac_status" >&5
336+ echo "$as_me:13784: \$? = $ac_status" >&5
337 if (exit $ac_status) && test -s out/conftest2.$ac_objext
338 then
339 # The compiler can only warn and ignore the option if not recognized
340@@ -15325,11 +15338,11 @@
341 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
342 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
343 -e 's:$: $lt_compiler_flag:'`
344- (eval echo "\"\$as_me:15328: $lt_compile\"" >&5)
345+ (eval echo "\"\$as_me:15341: $lt_compile\"" >&5)
346 (eval "$lt_compile" 2>conftest.err)
347 ac_status=$?
348 cat conftest.err >&5
349- echo "$as_me:15332: \$? = $ac_status" >&5
350+ echo "$as_me:15345: \$? = $ac_status" >&5
351 if (exit $ac_status) && test -s "$ac_outfile"; then
352 # The compiler can only warn and ignore the option if not recognized
353 # So say no if there are warnings other than the usual output.
354@@ -15429,11 +15442,11 @@
355 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
356 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
357 -e 's:$: $lt_compiler_flag:'`
358- (eval echo "\"\$as_me:15432: $lt_compile\"" >&5)
359+ (eval echo "\"\$as_me:15445: $lt_compile\"" >&5)
360 (eval "$lt_compile" 2>out/conftest.err)
361 ac_status=$?
362 cat out/conftest.err >&5
363- echo "$as_me:15436: \$? = $ac_status" >&5
364+ echo "$as_me:15449: \$? = $ac_status" >&5
365 if (exit $ac_status) && test -s out/conftest2.$ac_objext
366 then
367 # The compiler can only warn and ignore the option if not recognized
368@@ -17616,11 +17629,11 @@
369 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
370 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
371 -e 's:$: $lt_compiler_flag:'`
372- (eval echo "\"\$as_me:17619: $lt_compile\"" >&5)
373+ (eval echo "\"\$as_me:17632: $lt_compile\"" >&5)
374 (eval "$lt_compile" 2>conftest.err)
375 ac_status=$?
376 cat conftest.err >&5
377- echo "$as_me:17623: \$? = $ac_status" >&5
378+ echo "$as_me:17636: \$? = $ac_status" >&5
379 if (exit $ac_status) && test -s "$ac_outfile"; then
380 # The compiler can only warn and ignore the option if not recognized
381 # So say no if there are warnings other than the usual output.
382@@ -17884,11 +17897,11 @@
383 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
384 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
385 -e 's:$: $lt_compiler_flag:'`
386- (eval echo "\"\$as_me:17887: $lt_compile\"" >&5)
387+ (eval echo "\"\$as_me:17900: $lt_compile\"" >&5)
388 (eval "$lt_compile" 2>conftest.err)
389 ac_status=$?
390 cat conftest.err >&5
391- echo "$as_me:17891: \$? = $ac_status" >&5
392+ echo "$as_me:17904: \$? = $ac_status" >&5
393 if (exit $ac_status) && test -s "$ac_outfile"; then
394 # The compiler can only warn and ignore the option if not recognized
395 # So say no if there are warnings other than the usual output.
396@@ -17988,11 +18001,11 @@
397 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
398 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
399 -e 's:$: $lt_compiler_flag:'`
400- (eval echo "\"\$as_me:17991: $lt_compile\"" >&5)
401+ (eval echo "\"\$as_me:18004: $lt_compile\"" >&5)
402 (eval "$lt_compile" 2>out/conftest.err)
403 ac_status=$?
404 cat out/conftest.err >&5
405- echo "$as_me:17995: \$? = $ac_status" >&5
406+ echo "$as_me:18008: \$? = $ac_status" >&5
407 if (exit $ac_status) && test -s out/conftest2.$ac_objext
408 then
409 # The compiler can only warn and ignore the option if not recognized
410@@ -20960,16 +20973,9 @@
411 found_so=
412 found_a=
413 if test $use_additional = yes; then
414- if test -n "$shlibext" \
415- && { test -f "$additional_libdir/lib$name.$shlibext" \
416- || { test "$shlibext" = dll \
417- && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
418+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
419 found_dir="$additional_libdir"
420- if test -f "$additional_libdir/lib$name.$shlibext"; then
421- found_so="$additional_libdir/lib$name.$shlibext"
422- else
423- found_so="$additional_libdir/lib$name.dll.a"
424- fi
425+ found_so="$additional_libdir/lib$name.$shlibext"
426 if test -f "$additional_libdir/lib$name.la"; then
427 found_la="$additional_libdir/lib$name.la"
428 fi
429@@ -20997,16 +21003,9 @@
430 case "$x" in
431 -L*)
432 dir=`echo "X$x" | sed -e 's/^X-L//'`
433- if test -n "$shlibext" \
434- && { test -f "$dir/lib$name.$shlibext" \
435- || { test "$shlibext" = dll \
436- && test -f "$dir/lib$name.dll.a"; }; }; then
437+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
438 found_dir="$dir"
439- if test -f "$dir/lib$name.$shlibext"; then
440- found_so="$dir/lib$name.$shlibext"
441- else
442- found_so="$dir/lib$name.dll.a"
443- fi
444+ found_so="$dir/lib$name.$shlibext"
445 if test -f "$dir/lib$name.la"; then
446 found_la="$dir/lib$name.la"
447 fi
448@@ -21927,13 +21926,6 @@
449
450
451
452-
453-
454-
455-
456-
457-
458-
459 { echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
460 echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6; }
461 if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
462@@ -22070,37 +22062,17 @@
463 LTLIBINTL=
464 POSUB=
465
466- case " $gt_needs " in
467- *" need-formatstring-macros "*) gt_api_version=3 ;;
468- *" need-ngettext "*) gt_api_version=2 ;;
469- *) gt_api_version=1 ;;
470- esac
471- gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
472- gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
473-
474 if test "$USE_NLS" = "yes"; then
475 gt_use_preinstalled_gnugettext=no
476
477
478- if test $gt_api_version -ge 3; then
479- gt_revision_test_code='
480-#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
481-#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
482-#endif
483-typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
484-'
485- else
486- gt_revision_test_code=
487- fi
488- if test $gt_api_version -ge 2; then
489- gt_expression_test_code=' + * ngettext ("", "", 0)'
490- else
491- gt_expression_test_code=
492- fi
493+
494+
495+
496
497 { echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
498 echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6; }
499-if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then
500+if test "${gt_cv_func_gnugettext1_libc+set}" = set; then
501 echo $ECHO_N "(cached) $ECHO_C" >&6
502 else
503 cat >conftest.$ac_ext <<_ACEOF
504@@ -22110,14 +22082,13 @@
505 cat >>conftest.$ac_ext <<_ACEOF
506 /* end confdefs.h. */
507 #include <libintl.h>
508-$gt_revision_test_code
509 extern int _nl_msg_cat_cntr;
510 extern int *_nl_domain_bindings;
511 int
512 main ()
513 {
514 bindtextdomain ("", "");
515-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
516+return * gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings
517 ;
518 return 0;
519 }
520@@ -22140,22 +22111,21 @@
521 test ! -s conftest.err
522 } && test -s conftest$ac_exeext &&
523 $as_test_x conftest$ac_exeext; then
524- eval "$gt_func_gnugettext_libc=yes"
525+ gt_cv_func_gnugettext1_libc=yes
526 else
527 echo "$as_me: failed program was:" >&5
528 sed 's/^/| /' conftest.$ac_ext >&5
529
530- eval "$gt_func_gnugettext_libc=no"
531+ gt_cv_func_gnugettext1_libc=no
532 fi
533
534 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
535 conftest$ac_exeext conftest.$ac_ext
536 fi
537-ac_res=`eval echo '${'$gt_func_gnugettext_libc'}'`
538- { echo "$as_me:$LINENO: result: $ac_res" >&5
539-echo "${ECHO_T}$ac_res" >&6; }
540+{ echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5
541+echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6; }
542
543- if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
544+ if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
545
546
547
548@@ -22398,16 +22368,9 @@
549 found_so=
550 found_a=
551 if test $use_additional = yes; then
552- if test -n "$shlibext" \
553- && { test -f "$additional_libdir/lib$name.$shlibext" \
554- || { test "$shlibext" = dll \
555- && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
556+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
557 found_dir="$additional_libdir"
558- if test -f "$additional_libdir/lib$name.$shlibext"; then
559- found_so="$additional_libdir/lib$name.$shlibext"
560- else
561- found_so="$additional_libdir/lib$name.dll.a"
562- fi
563+ found_so="$additional_libdir/lib$name.$shlibext"
564 if test -f "$additional_libdir/lib$name.la"; then
565 found_la="$additional_libdir/lib$name.la"
566 fi
567@@ -22435,16 +22398,9 @@
568 case "$x" in
569 -L*)
570 dir=`echo "X$x" | sed -e 's/^X-L//'`
571- if test -n "$shlibext" \
572- && { test -f "$dir/lib$name.$shlibext" \
573- || { test "$shlibext" = dll \
574- && test -f "$dir/lib$name.dll.a"; }; }; then
575+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
576 found_dir="$dir"
577- if test -f "$dir/lib$name.$shlibext"; then
578- found_so="$dir/lib$name.$shlibext"
579- else
580- found_so="$dir/lib$name.dll.a"
581- fi
582+ found_so="$dir/lib$name.$shlibext"
583 if test -f "$dir/lib$name.la"; then
584 found_la="$dir/lib$name.la"
585 fi
586@@ -22712,7 +22668,7 @@
587
588 { echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
589 echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6; }
590-if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then
591+if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then
592 echo $ECHO_N "(cached) $ECHO_C" >&6
593 else
594 gt_save_CPPFLAGS="$CPPFLAGS"
595@@ -22726,7 +22682,6 @@
596 cat >>conftest.$ac_ext <<_ACEOF
597 /* end confdefs.h. */
598 #include <libintl.h>
599-$gt_revision_test_code
600 extern int _nl_msg_cat_cntr;
601 extern
602 #ifdef __cplusplus
603@@ -22737,7 +22692,7 @@
604 main ()
605 {
606 bindtextdomain ("", "");
607-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
608+return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
609 ;
610 return 0;
611 }
612@@ -22760,17 +22715,17 @@
613 test ! -s conftest.err
614 } && test -s conftest$ac_exeext &&
615 $as_test_x conftest$ac_exeext; then
616- eval "$gt_func_gnugettext_libintl=yes"
617+ gt_cv_func_gnugettext1_libintl=yes
618 else
619 echo "$as_me: failed program was:" >&5
620 sed 's/^/| /' conftest.$ac_ext >&5
621
622- eval "$gt_func_gnugettext_libintl=no"
623+ gt_cv_func_gnugettext1_libintl=no
624 fi
625
626 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
627 conftest$ac_exeext conftest.$ac_ext
628- if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
629+ if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then
630 LIBS="$LIBS $LIBICONV"
631 cat >conftest.$ac_ext <<_ACEOF
632 /* confdefs.h. */
633@@ -22779,7 +22734,6 @@
634 cat >>conftest.$ac_ext <<_ACEOF
635 /* end confdefs.h. */
636 #include <libintl.h>
637-$gt_revision_test_code
638 extern int _nl_msg_cat_cntr;
639 extern
640 #ifdef __cplusplus
641@@ -22790,7 +22744,7 @@
642 main ()
643 {
644 bindtextdomain ("", "");
645-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
646+return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
647 ;
648 return 0;
649 }
650@@ -22815,7 +22769,7 @@
651 $as_test_x conftest$ac_exeext; then
652 LIBINTL="$LIBINTL $LIBICONV"
653 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
654- eval "$gt_func_gnugettext_libintl=yes"
655+ gt_cv_func_gnugettext1_libintl=yes
656
657 else
658 echo "$as_me: failed program was:" >&5
659@@ -22830,13 +22784,12 @@
660 CPPFLAGS="$gt_save_CPPFLAGS"
661 LIBS="$gt_save_LIBS"
662 fi
663-ac_res=`eval echo '${'$gt_func_gnugettext_libintl'}'`
664- { echo "$as_me:$LINENO: result: $ac_res" >&5
665-echo "${ECHO_T}$ac_res" >&6; }
666+{ echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5
667+echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6; }
668 fi
669
670- if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
671- || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
672+ if test "$gt_cv_func_gnugettext1_libc" = "yes" \
673+ || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
674 && test "$PACKAGE" != gettext-runtime \
675 && test "$PACKAGE" != gettext-tools; }; then
676 gt_use_preinstalled_gnugettext=yes
677@@ -22876,7 +22829,7 @@
678 { echo "$as_me:$LINENO: checking where the gettext function comes from" >&5
679 echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6; }
680 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
681- if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
682+ if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
683 gt_source="external libintl"
684 else
685 gt_source="libc"
686@@ -22891,7 +22844,7 @@
687 if test "$USE_NLS" = "yes"; then
688
689 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
690- if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
691+ if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
692 { echo "$as_me:$LINENO: checking how to link with libintl" >&5
693 echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6; }
694 { echo "$as_me:$LINENO: result: $LIBINTL" >&5
695@@ -26592,12 +26545,8 @@
696 esac
697 done
698
699-
700-
701-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
702- if test -n "$ac_tool_prefix"; then
703- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
704-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
705+ # Extract the first word of "pkg-config", so it can be a program name with args.
706+set dummy pkg-config; ac_word=$2
707 { echo "$as_me:$LINENO: checking for $ac_word" >&5
708 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
709 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
710@@ -26623,6 +26572,7 @@
711 done
712 IFS=$as_save_IFS
713
714+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
715 ;;
716 esac
717 fi
718@@ -26636,88 +26586,19 @@
719 fi
720
721
722-fi
723-if test -z "$ac_cv_path_PKG_CONFIG"; then
724- ac_pt_PKG_CONFIG=$PKG_CONFIG
725- # Extract the first word of "pkg-config", so it can be a program name with args.
726-set dummy pkg-config; ac_word=$2
727-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
728-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
729-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
730- echo $ECHO_N "(cached) $ECHO_C" >&6
731-else
732- case $ac_pt_PKG_CONFIG in
733- [\\/]* | ?:[\\/]*)
734- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
735- ;;
736- *)
737- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
738-for as_dir in $PATH
739-do
740- IFS=$as_save_IFS
741- test -z "$as_dir" && as_dir=.
742- for ac_exec_ext in '' $ac_executable_extensions; do
743- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
744- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
745- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
746- break 2
747- fi
748-done
749-done
750-IFS=$as_save_IFS
751-
752- ;;
753-esac
754-fi
755-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
756-if test -n "$ac_pt_PKG_CONFIG"; then
757- { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
758-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
759-else
760- { echo "$as_me:$LINENO: result: no" >&5
761-echo "${ECHO_T}no" >&6; }
762-fi
763-
764- if test "x$ac_pt_PKG_CONFIG" = x; then
765- PKG_CONFIG=""
766- else
767- case $cross_compiling:$ac_tool_warned in
768-yes:)
769-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
770-whose name does not start with the host triplet. If you think this
771-configuration is useful to you, please write to autoconf@gnu.org." >&5
772-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
773-whose name does not start with the host triplet. If you think this
774-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
775-ac_tool_warned=yes ;;
776-esac
777- PKG_CONFIG=$ac_pt_PKG_CONFIG
778- fi
779-else
780- PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
781-fi
782-
783-fi
784-if test -n "$PKG_CONFIG"; then
785- _pkg_min_version=0.7
786- { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
787-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
788- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
789- { echo "$as_me:$LINENO: result: yes" >&5
790-echo "${ECHO_T}yes" >&6; }
791- else
792- { echo "$as_me:$LINENO: result: no" >&5
793-echo "${ECHO_T}no" >&6; }
794- PKG_CONFIG=""
795- fi
796-
797-fi
798
799 no_glib=""
800
801- if test "x$PKG_CONFIG" = x ; then
802+ if test x$PKG_CONFIG != xno ; then
803+ if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
804+ :
805+ else
806+ echo *** pkg-config too old; version 0.7 or better required.
807+ no_glib=yes
808+ PKG_CONFIG=no
809+ fi
810+ else
811 no_glib=yes
812- PKG_CONFIG=no
813 fi
814
815 min_glib_version=2.6.0
816@@ -27223,9 +27104,7 @@
817 # Put the nasty error message in config.log where it belongs
818 echo "$OPENSSL_PKG_ERRORS" >&5
819
820- { echo "$as_me:$LINENO: result: no" >&5
821-echo "${ECHO_T}no" >&6; }
822- ac_cv_enable_openssl=no
823+ ac_cv_enable_openssl=no
824 elif test $pkg_failed = untried; then
825 ac_cv_enable_openssl=no
826 else
827@@ -27793,6 +27672,11 @@
828
829
830
831+OWL_LIBS="-lowl"
832+OLS_CFLAGS=""
833+
834+
835+
836 # Check whether --enable-aspell was given.
837 if test "${enable_aspell+set}" = set; then
838 enableval=$enable_aspell; ac_cv_enable_aspell=$enableval
839@@ -28242,9 +28126,7 @@
840 # Put the nasty error message in config.log where it belongs
841 echo "$MAEMO_PKG_ERRORS" >&5
842
843- { echo "$as_me:$LINENO: result: no" >&5
844-echo "${ECHO_T}no" >&6; }
845- ac_cv_enable_maemo=no
846+ ac_cv_enable_maemo=no
847 elif test $pkg_failed = untried; then
848 ac_cv_enable_maemo=no
849 else
850@@ -29796,8 +29678,6 @@
851 # Put the nasty error message in config.log where it belongs
852 echo "$STARTUP_NOTIFICATION_PKG_ERRORS" >&5
853
854- { echo "$as_me:$LINENO: result: no" >&5
855-echo "${ECHO_T}no" >&6; }
856
857 echo "Building without libstartup-notification"
858 enable_startup_notification=no
859@@ -31300,9 +31180,7 @@
860 # Put the nasty error message in config.log where it belongs
861 echo "$CLAMAV_PKG_ERRORS" >&5
862
863- { echo "$as_me:$LINENO: result: no" >&5
864-echo "${ECHO_T}no" >&6; }
865- ac_cv_enable_clamav_plugin=no
866+ ac_cv_enable_clamav_plugin=no
867 elif test $pkg_failed = untried; then
868 ac_cv_enable_clamav_plugin=no
869 else
870@@ -31684,9 +31562,7 @@
871 # Put the nasty error message in config.log where it belongs
872 echo "$GNOMEPRINT_PKG_ERRORS" >&5
873
874- { echo "$as_me:$LINENO: result: no" >&5
875-echo "${ECHO_T}no" >&6; }
876- ac_cv_enable_gnomeprint=no
877+ ac_cv_enable_gnomeprint=no
878 elif test $pkg_failed = untried; then
879 ac_cv_enable_gnomeprint=no
880 else
881@@ -31794,9 +31670,7 @@
882 # Put the nasty error message in config.log where it belongs
883 echo "$VALGRIND_PKG_ERRORS" >&5
884
885- { echo "$as_me:$LINENO: result: no" >&5
886-echo "${ECHO_T}no" >&6; }
887- ac_cv_enable_valgrind=no
888+ ac_cv_enable_valgrind=no
889 elif test $pkg_failed = untried; then
890 ac_cv_enable_valgrind=no
891 else
892@@ -32884,6 +32758,8 @@
893 PASSCRYPT_KEY!$PASSCRYPT_KEY$ac_delim
894 GTK_CFLAGS!$GTK_CFLAGS$ac_delim
895 GTK_LIBS!$GTK_LIBS$ac_delim
896+OWL_LIBS!$OWL_LIBS$ac_delim
897+OWL_CFLAGS!$OWL_CFLAGS$ac_delim
898 ASPELL!$ASPELL$ac_delim
899 ASPELL_CFLAGS!$ASPELL_CFLAGS$ac_delim
900 ASPELL_LIBS!$ASPELL_LIBS$ac_delim
901@@ -32904,8 +32780,6 @@
902 BUILD_SPAMASSASSIN_PLUGIN_FALSE!$BUILD_SPAMASSASSIN_PLUGIN_FALSE$ac_delim
903 BUILD_BOGOFILTER_PLUGIN_TRUE!$BUILD_BOGOFILTER_PLUGIN_TRUE$ac_delim
904 BUILD_BOGOFILTER_PLUGIN_FALSE!$BUILD_BOGOFILTER_PLUGIN_FALSE$ac_delim
905-GPGME_CONFIG!$GPGME_CONFIG$ac_delim
906-GPGME_CFLAGS!$GPGME_CFLAGS$ac_delim
907 _ACEOF
908
909 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
910@@ -32947,6 +32821,8 @@
911 ac_delim='%!_!# '
912 for ac_last_try in false false false false false :; do
913 cat >conf$$subs.sed <<_ACEOF
914+GPGME_CONFIG!$GPGME_CONFIG$ac_delim
915+GPGME_CFLAGS!$GPGME_CFLAGS$ac_delim
916 GPGME_LIBS!$GPGME_LIBS$ac_delim
917 BUILD_PGPCORE_PLUGIN_TRUE!$BUILD_PGPCORE_PLUGIN_TRUE$ac_delim
918 BUILD_PGPCORE_PLUGIN_FALSE!$BUILD_PGPCORE_PLUGIN_FALSE$ac_delim
919@@ -32979,7 +32855,7 @@
920 LTLIBOBJS!$LTLIBOBJS$ac_delim
921 _ACEOF
922
923- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then
924+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 32; then
925 break
926 elif $ac_last_try; then
927 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
928Index: claws-mail-2.9.1/src/Makefile.in
929===================================================================
930--- claws-mail-2.9.1.orig/src/Makefile.in 2007-04-25 10:18:13.000000000 +0100
931+++ claws-mail-2.9.1/src/Makefile.in 2007-04-25 10:30:23.000000000 +0100
932@@ -45,8 +45,7 @@
933 $(top_srcdir)/m4/aspell.m4 $(top_srcdir)/m4/check-type.m4 \
934 $(top_srcdir)/m4/gnupg-check-typedef.m4 \
935 $(top_srcdir)/m4/gnupg.m4 $(top_srcdir)/m4/gpgme.m4 \
936- $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/spamassassin.m4 \
937- $(top_srcdir)/configure.ac
938+ $(top_srcdir)/m4/spamassassin.m4 $(top_srcdir)/configure.ac
939 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
940 $(ACLOCAL_M4)
941 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
942@@ -122,7 +121,7 @@
943 $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_2) \
944 $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_2) \
945 $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_2) \
946- $(am__DEPENDENCIES_2)
947+ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_2)
948 claws_mail_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
949 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
950 $(claws_mail_LDFLAGS) $(LDFLAGS) -o $@
951@@ -272,6 +271,8 @@
952 OBJEXT = @OBJEXT@
953 OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
954 OPENSSL_LIBS = @OPENSSL_LIBS@
955+OWL_CFLAGS = @OWL_CFLAGS@
956+OWL_LIBS = @OWL_LIBS@
957 PACKAGE = @PACKAGE@
958 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
959 PACKAGE_NAME = @PACKAGE_NAME@
960@@ -815,7 +816,8 @@
961 $(LIBICONV) \
962 $(STARTUP_NOTIFICATION_LIBS) \
963 $(LIBETPAN_LIBS) \
964- $(MAEMO_LIBS)
965+ $(MAEMO_LIBS) \
966+ $(OWL_LIBS)
967
968 AM_CPPFLAGS = \
969 -DG_LOG_DOMAIN=\"Claws-Mail\" \
970@@ -833,7 +835,7 @@
971 $(LIBETPAN_CPPFLAGS) \
972 $(STARTUP_NOTIFICATION_CFLAGS) \
973 $(MAEMO_CFLAGS) \
974- -Wno-unused-function
975+ $(OWL_CFLAGS)
976
977
978 #no-unused-function is there because of bison stuff
979@@ -1406,6 +1408,7 @@
980 install-exec-hook:
981 @rm -f $(DESTDIR)$(bindir)/sylpheed-claws
982 @ln -s claws-mail $(DESTDIR)$(bindir)/sylpheed-claws
983+ -Wno-unused-function
984
985 @CYGWIN_TRUE@claws-mail$(EXEEXT): $(claws_mail_OBJECTS) $(claws_mail_DEPENDENCIES)
986 @CYGWIN_TRUE@ @rm -f claws-mail$(EXEEXT)
987Index: claws-mail-2.9.1/autogen.sh
988===================================================================
989--- claws-mail-2.9.1.orig/autogen.sh 2007-04-25 10:18:13.000000000 +0100
990+++ claws-mail-2.9.1/autogen.sh 2007-04-25 10:30:23.000000000 +0100
991@@ -74,5 +74,4 @@
992 && libtoolize --force --copy \
993 && autoheader \
994 && automake --add-missing --foreign --copy \
995- && autoconf \
996- && ./configure --enable-maintainer-mode $@
997+ && autoconf
998Index: claws-mail-2.9.1/src/compose.c
999===================================================================
1000--- claws-mail-2.9.1.orig/src/compose.c 2007-04-25 10:18:13.000000000 +0100
1001+++ claws-mail-2.9.1/src/compose.c 2007-04-25 10:30:23.000000000 +0100
1002@@ -6192,7 +6192,6 @@
1003 n_menu_entries = sizeof(compose_entries) / sizeof(compose_entries[0]);
1004 menubar = menubar_create(window, compose_entries,
1005 n_menu_entries, "<Compose>", compose);
1006- gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
1007
1008 handlebox = gtk_hbox_new(FALSE, 0);
1009 gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
diff --git a/meta/packages/claws-mail/files/streamline-ui.patch b/meta/packages/claws-mail/files/streamline-ui.patch
deleted file mode 100644
index 29a52ff795..0000000000
--- a/meta/packages/claws-mail/files/streamline-ui.patch
+++ /dev/null
@@ -1,1008 +0,0 @@
1Index: claws-mail-2.9.1/src/mainwindow.c
2===================================================================
3--- claws-mail-2.9.1.orig/src/mainwindow.c 2007-04-25 07:40:10.000000000 +0100
4+++ claws-mail-2.9.1/src/mainwindow.c 2007-04-25 10:26:40.000000000 +0100
5@@ -189,9 +189,6 @@
6 static void toggle_statusbar_cb (MainWindow *mainwin,
7 guint action,
8 GtkWidget *widget);
9-static void set_layout_cb (MainWindow *mainwin,
10- guint action,
11- GtkWidget *widget);
12
13 static void addressbook_open_cb (MainWindow *mainwin,
14 guint action,
15@@ -538,94 +535,24 @@
16 {N_("/_Edit/_Search folder..."), "<shift><control>F", search_cb, 1, NULL},
17 {N_("/_Edit/_Quick search"), "slash", mainwindow_quicksearch, 0, NULL},
18 {N_("/_View"), NULL, NULL, 0, "<Branch>"},
19- {N_("/_View/Show or hi_de"), NULL, NULL, 0, "<Branch>"},
20- {N_("/_View/Show or hi_de/_Message view"),
21- "V", toggle_message_cb, 0, "<ToggleItem>"},
22- {N_("/_View/Show or hi_de/_Toolbar"),
23- NULL, NULL, 0, "<Branch>"},
24- {N_("/_View/Show or hi_de/_Toolbar/Text _below icons"),
25- NULL, toggle_toolbar_cb, TOOLBAR_BOTH, "<RadioItem>"},
26- {N_("/_View/Show or hi_de/_Toolbar/Text be_side icons"),
27- NULL, toggle_toolbar_cb, TOOLBAR_BOTH_HORIZ, "/View/Show or hide/Toolbar/Text below icons"},
28- {N_("/_View/Show or hi_de/_Toolbar/_Icons only"),
29- NULL, toggle_toolbar_cb, TOOLBAR_ICON, "/View/Show or hide/Toolbar/Text below icons"},
30- {N_("/_View/Show or hi_de/_Toolbar/_Text only"),
31- NULL, toggle_toolbar_cb, TOOLBAR_TEXT, "/View/Show or hide/Toolbar/Text below icons"},
32- {N_("/_View/Show or hi_de/_Toolbar/_Hide"),
33- NULL, toggle_toolbar_cb, TOOLBAR_NONE, "/View/Show or hide/Toolbar/Text below icons"},
34- {N_("/_View/Show or hi_de/Status _bar"),
35- NULL, toggle_statusbar_cb, 0, "<ToggleItem>"},
36 {N_("/_View/Set displayed _columns"), NULL, NULL, 0, "<Branch>"},
37 {N_("/_View/Set displayed _columns/in _Folder list..."), NULL, set_folder_display_item_cb, 0, NULL},
38 {N_("/_View/Set displayed _columns/in _Message list..."),NULL, set_summary_display_item_cb, 0, NULL},
39
40 {N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
41- {N_("/_View/La_yout"), NULL, NULL, 0, "<Branch>"},
42- {N_("/_View/Layout/_Standard"), NULL, set_layout_cb, NORMAL_LAYOUT, "<RadioItem>"},
43- {N_("/_View/Layout/_Three columns"), NULL, set_layout_cb, VERTICAL_LAYOUT, "/View/Layout/Standard"},
44- {N_("/_View/Layout/_Wide message"), NULL, set_layout_cb, WIDE_LAYOUT, "/View/Layout/Standard"},
45- {N_("/_View/Layout/W_ide message list"),NULL, set_layout_cb, WIDE_MSGLIST_LAYOUT, "/View/Layout/Standard"},
46- {N_("/_View/Layout/S_mall screen"), NULL, set_layout_cb, SMALL_LAYOUT, "/View/Layout/Standard"},
47- {N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
48 {N_("/_View/_Sort"), NULL, NULL, 0, "<Branch>"},
49- {N_("/_View/_Sort/by _number"), NULL, sort_summary_cb, SORT_BY_NUMBER, "<RadioItem>"},
50- {N_("/_View/_Sort/by S_ize"), NULL, sort_summary_cb, SORT_BY_SIZE, "/View/Sort/by number"},
51- {N_("/_View/_Sort/by _Date"), NULL, sort_summary_cb, SORT_BY_DATE, "/View/Sort/by number"},
52- {N_("/_View/_Sort/by _From"), NULL, sort_summary_cb, SORT_BY_FROM, "/View/Sort/by number"},
53- {N_("/_View/_Sort/by _To"), NULL, sort_summary_cb, SORT_BY_TO, "/View/Sort/by number"},
54- {N_("/_View/_Sort/by S_ubject"), NULL, sort_summary_cb, SORT_BY_SUBJECT, "/View/Sort/by number"},
55- {N_("/_View/_Sort/by _color label"),
56- NULL, sort_summary_cb, SORT_BY_LABEL, "/View/Sort/by number"},
57- {N_("/_View/_Sort/by _mark"), NULL, sort_summary_cb, SORT_BY_MARK, "/View/Sort/by number"},
58- {N_("/_View/_Sort/by _status"), NULL, sort_summary_cb, SORT_BY_STATUS, "/View/Sort/by number"},
59- {N_("/_View/_Sort/by a_ttachment"),
60- NULL, sort_summary_cb, SORT_BY_MIME, "/View/Sort/by number"},
61- {N_("/_View/_Sort/by score"), NULL, sort_summary_cb, SORT_BY_SCORE, "/View/Sort/by number"},
62- {N_("/_View/_Sort/by locked"), NULL, sort_summary_cb, SORT_BY_LOCKED, "/View/Sort/by number"},
63- {N_("/_View/_Sort/D_on't sort"), NULL, sort_summary_cb, SORT_BY_NONE, "/View/Sort/by number"},
64+ {N_("/_View/_Sort/by _Date"), NULL, sort_summary_cb, SORT_BY_DATE, "<RadioItem>"},
65+ {N_("/_View/_Sort/by _From"), NULL, sort_summary_cb, SORT_BY_FROM, "/View/Sort/by Date"},
66+ {N_("/_View/_Sort/by _To"), NULL, sort_summary_cb, SORT_BY_TO, "/View/Sort/by Date"},
67+ {N_("/_View/_Sort/by S_ubject"), NULL, sort_summary_cb, SORT_BY_SUBJECT, "/View/Sort/by Date"},
68 {N_("/_View/_Sort/---"), NULL, NULL, 0, "<Separator>"},
69 {N_("/_View/_Sort/Ascending"), NULL, sort_summary_type_cb, SORT_ASCENDING, "<RadioItem>"},
70 {N_("/_View/_Sort/Descending"), NULL, sort_summary_type_cb, SORT_DESCENDING, "/View/Sort/Ascending"},
71- {N_("/_View/_Sort/---"), NULL, NULL, 0, "<Separator>"},
72- {N_("/_View/_Sort/_Attract by subject"),
73- NULL, attract_by_subject_cb, 0, NULL},
74 {N_("/_View/Th_read view"), "<control>T", thread_cb, 0, "<ToggleItem>"},
75 {N_("/_View/E_xpand all threads"), NULL, expand_threads_cb, 0, NULL},
76 {N_("/_View/Co_llapse all threads"), NULL, collapse_threads_cb, 0, NULL},
77 {N_("/_View/_Hide read messages"), NULL, hide_read_messages, 0, "<ToggleItem>"},
78
79- {N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
80- {N_("/_View/_Go to"), NULL, NULL, 0, "<Branch>"},
81- {N_("/_View/_Go to/_Previous message"), "P", prev_cb, 0, NULL},
82- {N_("/_View/_Go to/_Next message"), "N", next_cb, 0, NULL},
83- {N_("/_View/_Go to/---"), NULL, NULL, 0, "<Separator>"},
84- {N_("/_View/_Go to/P_revious unread message"),
85- "<shift>P", prev_unread_cb, 0, NULL},
86- {N_("/_View/_Go to/N_ext unread message"),
87- "<shift>N", next_unread_cb, 0, NULL},
88- {N_("/_View/_Go to/---"), NULL, NULL, 0, "<Separator>"},
89- {N_("/_View/_Go to/Previous ne_w message"), NULL, prev_new_cb, 0, NULL},
90- {N_("/_View/_Go to/Ne_xt new message"), NULL, next_new_cb, 0, NULL},
91- {N_("/_View/_Go to/---"), NULL, NULL, 0, "<Separator>"},
92- {N_("/_View/_Go to/Previous _marked message"),
93- NULL, prev_marked_cb, 0, NULL},
94- {N_("/_View/_Go to/Next m_arked message"),
95- NULL, next_marked_cb, 0, NULL},
96- {N_("/_View/_Go to/---"), NULL, NULL, 0, "<Separator>"},
97- {N_("/_View/_Go to/Previous _labeled message"),
98- NULL, prev_labeled_cb, 0, NULL},
99- {N_("/_View/_Go to/Next la_beled message"),
100- NULL, next_labeled_cb, 0, NULL},
101- {N_("/_View/_Go to/---"), NULL, NULL, 0, "<Separator>"},
102- {N_("/_View/_Go to/Last read message"),
103- NULL, last_read_cb, 0, NULL},
104- {N_("/_View/_Go to/Parent message"),
105- "<control>Up", parent_cb, 0, NULL},
106- {N_("/_View/_Go to/---"), NULL, NULL, 0, "<Separator>"},
107- {N_("/_View/_Go to/Next unread _folder"), "<shift>G", goto_unread_folder_cb, 0, NULL},
108- {N_("/_View/_Go to/_Other folder..."), "G", goto_folder_cb, 0, NULL},
109- {N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
110-
111 #define ENC_SEPARATOR \
112 {N_("/_View/Character _encoding/---"), NULL, NULL, 0, "<Separator>"}
113 #define ENC_ACTION(action) \
114@@ -742,7 +669,6 @@
115 #undef DEC_ACTION
116
117 {N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
118- {N_("/_View/Open in new _window"), "<control><alt>N", open_msg_cb, 0, NULL},
119 {N_("/_View/Mess_age source"), "<control>U", view_source_cb, 0, NULL},
120 {N_("/_View/All headers"), "<control>H", show_all_header_cb, 0, "<ToggleItem>"},
121 {N_("/_View/Quotes"), NULL, NULL, 0, "<Branch>"},
122@@ -1137,23 +1063,14 @@
123 gint i;
124 guint n_menu_entries;
125
126- static GdkGeometry geometry;
127-
128 debug_print("Creating main window...\n");
129 mainwin = g_new0(MainWindow, 1);
130
131 /* main window */
132 window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "mainwindow");
133- gtk_window_set_title(GTK_WINDOW(window), PROG_VERSION);
134+ gtk_window_set_title(GTK_WINDOW(window), _("Mail"));
135 gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
136
137- if (!geometry.min_height) {
138- geometry.min_width = 320;
139- geometry.min_height = 200;
140- }
141- gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
142- GDK_HINT_MIN_SIZE);
143-
144 g_signal_connect(G_OBJECT(window), "delete_event",
145 G_CALLBACK(main_window_close_cb), mainwin);
146 MANAGE_WINDOW_SIGNALS_CONNECT(window);
147@@ -1184,21 +1101,9 @@
148 /* gtk_widget_show(gtk_item_factory_get_item(ifactory,"/Message/Mailing-List"));
149 main_create_mailing_list_menu (mainwin, NULL); */
150
151- menu_set_sensitive(ifactory, "/Help/Manual", manual_available(MANUAL_MANUAL_LOCAL));
152-
153- if (prefs_common.toolbar_detachable) {
154- handlebox = gtk_handle_box_new();
155- gtk_widget_show(handlebox);
156- gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
157- g_signal_connect(G_OBJECT(handlebox), "child_attached",
158- G_CALLBACK(toolbar_child_attached), mainwin);
159- g_signal_connect(G_OBJECT(handlebox), "child_detached",
160- G_CALLBACK(toolbar_child_detached), mainwin);
161- } else {
162- handlebox = gtk_hbox_new(FALSE, 0);
163- gtk_widget_show(handlebox);
164- gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
165- }
166+ handlebox = gtk_hbox_new(FALSE, 0);
167+ gtk_widget_show(handlebox);
168+ gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
169 /* link window to mainwin->window to avoid gdk warnings */
170 mainwin->window = window;
171
172@@ -1405,36 +1310,6 @@
173 (ifactory, "/View/Character encoding/Auto detect");
174 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE);
175
176- switch (prefs_common.toolbar_style) {
177- case TOOLBAR_NONE:
178- menuitem = gtk_item_factory_get_item
179- (ifactory, "/View/Show or hide/Toolbar/Hide");
180- break;
181- case TOOLBAR_ICON:
182- menuitem = gtk_item_factory_get_item
183- (ifactory, "/View/Show or hide/Toolbar/Icons only");
184- break;
185- case TOOLBAR_TEXT:
186- menuitem = gtk_item_factory_get_item
187- (ifactory, "/View/Show or hide/Toolbar/Text only");
188- break;
189- case TOOLBAR_BOTH:
190- menuitem = gtk_item_factory_get_item
191- (ifactory, "/View/Show or hide/Toolbar/Text below icons");
192- break;
193- case TOOLBAR_BOTH_HORIZ:
194- menuitem = gtk_item_factory_get_item
195- (ifactory,
196- "/View/Show or hide/Toolbar/Text beside icons");
197- }
198- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE);
199-
200- gtk_widget_hide(mainwin->hbox_stat);
201- menuitem = gtk_item_factory_get_item
202- (ifactory, "/View/Show or hide/Status bar");
203- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
204- prefs_common.show_statusbar);
205-
206 /* set account selection menu */
207 ac_menu = gtk_item_factory_get_widget
208 (ifactory, "/Configuration/Change current account");
209@@ -2284,16 +2159,6 @@
210 {"/View/Expand all threads" , M_MSG_EXIST},
211 {"/View/Collapse all threads" , M_MSG_EXIST},
212 {"/View/Hide read messages" , M_HIDE_READ_MSG},
213- {"/View/Go to/Previous message" , M_MSG_EXIST},
214- {"/View/Go to/Next message" , M_MSG_EXIST},
215- {"/View/Go to/Previous unread message" , M_MSG_EXIST},
216- {"/View/Go to/Previous new message" , M_MSG_EXIST},
217- {"/View/Go to/Previous marked message" , M_MSG_EXIST},
218- {"/View/Go to/Previous labeled message", M_MSG_EXIST},
219- {"/View/Go to/Next labeled message", M_MSG_EXIST},
220- {"/View/Go to/Last read message" , M_SINGLE_TARGET_EXIST},
221- {"/View/Go to/Parent message" , M_SINGLE_TARGET_EXIST},
222- {"/View/Open in new window" , M_SINGLE_TARGET_EXIST},
223 {"/View/Message source" , M_SINGLE_TARGET_EXIST},
224 {"/View/All headers" , M_SINGLE_TARGET_EXIST},
225 {"/View/Quotes" , M_SINGLE_TARGET_EXIST},
226@@ -2379,40 +2244,20 @@
227 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), active); \
228 }
229
230- SET_CHECK_MENU_ACTIVE("/View/Show or hide/Message view",
231- messageview_is_visible(mainwin->messageview));
232-
233 summaryview = mainwin->summaryview;
234- menu_path = "/View/Sort/Don't sort";
235+ menu_path = "/View/Sort/by Date";
236
237 switch (summaryview->sort_key) {
238- case SORT_BY_NUMBER:
239- menu_path = "/View/Sort/by number"; break;
240- case SORT_BY_SIZE:
241- menu_path = "/View/Sort/by Size"; break;
242- case SORT_BY_DATE:
243- menu_path = "/View/Sort/by Date"; break;
244 case SORT_BY_FROM:
245 menu_path = "/View/Sort/by From"; break;
246 case SORT_BY_TO:
247 menu_path = "/View/Sort/by To"; break;
248 case SORT_BY_SUBJECT:
249 menu_path = "/View/Sort/by Subject"; break;
250- case SORT_BY_LABEL:
251- menu_path = "/View/Sort/by color label"; break;
252- case SORT_BY_MARK:
253- menu_path = "/View/Sort/by mark"; break;
254- case SORT_BY_STATUS:
255- menu_path = "/View/Sort/by status"; break;
256- case SORT_BY_MIME:
257- menu_path = "/View/Sort/by attachment"; break;
258- case SORT_BY_SCORE:
259- menu_path = "/View/Sort/by score"; break;
260- case SORT_BY_LOCKED:
261- menu_path = "/View/Sort/by locked"; break;
262 case SORT_BY_NONE:
263+ case SORT_BY_DATE:
264 default:
265- menu_path = "/View/Sort/Don't sort"; break;
266+ menu_path = "/View/Sort/by Date"; break;
267 }
268 SET_CHECK_MENU_ACTIVE(menu_path, TRUE);
269
270@@ -2735,8 +2580,6 @@
271 gtk_widget_destroy(mainwin->hpaned);
272 }
273
274- menu_set_sensitive(ifactory, "/View/Show or hide/Message view",
275- (layout_mode != WIDE_MSGLIST_LAYOUT && layout_mode != SMALL_LAYOUT));
276 switch (layout_mode) {
277 case VERTICAL_LAYOUT:
278 case NORMAL_LAYOUT:
279@@ -2877,37 +2720,6 @@
280
281 prefs_common.layout_mode = layout_mode;
282
283- menuitem = gtk_item_factory_get_item
284- (ifactory, "/View/Show or hide/Message view");
285- gtk_check_menu_item_set_active
286- (GTK_CHECK_MENU_ITEM(menuitem),
287- messageview_is_visible(mainwin->messageview));
288-
289-#define SET_CHECK_MENU_ACTIVE(path, active) \
290-{ \
291- menuitem = gtk_item_factory_get_widget(ifactory, path); \
292- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), active); \
293-}
294-
295- switch (prefs_common.layout_mode) {
296- case NORMAL_LAYOUT:
297- SET_CHECK_MENU_ACTIVE("/View/Layout/Standard", TRUE);
298- break;
299- case VERTICAL_LAYOUT:
300- SET_CHECK_MENU_ACTIVE("/View/Layout/Three columns", TRUE);
301- break;
302- case WIDE_LAYOUT:
303- SET_CHECK_MENU_ACTIVE("/View/Layout/Wide message", TRUE);
304- break;
305- case WIDE_MSGLIST_LAYOUT:
306- SET_CHECK_MENU_ACTIVE("/View/Layout/Wide message list", TRUE);
307- break;
308- case SMALL_LAYOUT:
309- SET_CHECK_MENU_ACTIVE("/View/Layout/Small screen", TRUE);
310- break;
311- }
312-#undef SET_CHECK_MENU_ACTIVE
313-
314 if (folderwin) {
315 g_signal_connect
316 (G_OBJECT(folderwin), "size_allocate",
317@@ -3116,12 +2928,6 @@
318 summary_toggle_view(mainwin->summaryview);
319 }
320
321-static void toggle_toolbar_cb(MainWindow *mainwin, guint action,
322- GtkWidget *widget)
323-{
324- toolbar_toggle(action, mainwin);
325-}
326-
327 static void main_window_reply_cb(MainWindow *mainwin, guint action,
328 GtkWidget *widget)
329 {
330Index: claws-mail-2.9.1/src/prefs_common.c
331===================================================================
332--- claws-mail-2.9.1.orig/src/prefs_common.c 2007-04-25 07:40:10.000000000 +0100
333+++ claws-mail-2.9.1/src/prefs_common.c 2007-04-25 07:42:17.000000000 +0100
334@@ -262,7 +262,7 @@
335 {"default_reply_list", "TRUE", &prefs_common.default_reply_list, P_BOOL,
336 NULL, NULL, NULL},
337
338-#ifndef MAEMO
339+#if 0
340 {"show_ruler", "TRUE", &prefs_common.show_ruler, P_BOOL,
341 NULL, NULL, NULL},
342 #else
343@@ -300,7 +300,7 @@
344 &prefs_common.normalfont_gtk1, P_STRING, NULL, NULL, NULL},
345
346 /* new fonts */
347-#ifndef MAEMO
348+#if 0
349 {"widget_font_gtk2", NULL,
350 &SPECIFIC_PREFS.widgetfont, P_STRING, NULL, NULL, NULL},
351 {"message_font_gtk2", "Monospace 9",
352@@ -416,7 +416,7 @@
353
354 {"enable_thread", "TRUE", &prefs_common.enable_thread, P_BOOL,
355 NULL, NULL, NULL},
356-#ifndef MAEMO
357+#if 0
358 {"toolbar_style", "3", &prefs_common.toolbar_style, P_ENUM,
359 NULL, NULL, NULL},
360 #else
361@@ -544,7 +544,7 @@
362 {"folder_col_pos_total", "3",
363 &prefs_common.folder_col_pos[F_COL_TOTAL], P_INT, NULL, NULL, NULL},
364
365-#ifndef MAEMO
366+#if 0
367 {"folder_col_size_folder", "120",
368 &prefs_common.folder_col_size[F_COL_FOLDER], P_INT, NULL, NULL, NULL},
369 {"folder_col_size_new", "32",
370@@ -702,7 +702,7 @@
371 &SPECIFIC_PREFS.mime_open_cmd, P_STRING, NULL, NULL, NULL},
372
373 /* Interface */
374-#ifndef MAEMO
375+#if 0
376 {"layout_mode", "0", &prefs_common.layout_mode, P_INT,
377 NULL, NULL, NULL},
378 #else
379Index: claws-mail-2.9.1/src/toolbar.c
380===================================================================
381--- claws-mail-2.9.1.orig/src/toolbar.c 2007-04-25 07:40:10.000000000 +0100
382+++ claws-mail-2.9.1/src/toolbar.c 2007-04-25 07:42:17.000000000 +0100
383@@ -841,26 +841,17 @@
384 gtk_widget_hide(handlebox_wid);
385 break;
386 case TOOLBAR_ICON:
387- gtk_toolbar_set_style(GTK_TOOLBAR(toolbar_wid),
388- GTK_TOOLBAR_ICONS);
389- break;
390 case TOOLBAR_TEXT:
391- gtk_toolbar_set_style(GTK_TOOLBAR(toolbar_wid),
392- GTK_TOOLBAR_TEXT);
393- break;
394 case TOOLBAR_BOTH:
395- gtk_toolbar_set_style(GTK_TOOLBAR(toolbar_wid),
396- GTK_TOOLBAR_BOTH);
397- break;
398 case TOOLBAR_BOTH_HORIZ:
399 gtk_toolbar_set_style(GTK_TOOLBAR(toolbar_wid),
400- GTK_TOOLBAR_BOTH_HORIZ);
401+ GTK_TOOLBAR_ICONS);
402 break;
403 default:
404 return;
405 }
406
407- prefs_common.toolbar_style = (ToolbarStyle)action;
408+ prefs_common.toolbar_style = (ToolbarStyle)TOOLBAR_ICON;
409 gtk_widget_set_size_request(handlebox_wid, 1, -1);
410
411 if (prefs_common.toolbar_style != TOOLBAR_NONE) {
412@@ -1594,7 +1585,7 @@
413 gtk_container_add(GTK_CONTAINER(container), toolbar);
414 gtk_container_set_border_width(GTK_CONTAINER(container), 2);
415 gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL);
416- gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_BOTH);
417+ gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);
418
419 for (cur = toolbar_list; cur != NULL; cur = cur->next) {
420
421Index: claws-mail-2.9.1/src/gtk/prefswindow.c
422===================================================================
423--- claws-mail-2.9.1.orig/src/gtk/prefswindow.c 2007-04-25 07:40:10.000000000 +0100
424+++ claws-mail-2.9.1/src/gtk/prefswindow.c 2007-04-25 10:30:15.000000000 +0100
425@@ -343,6 +343,10 @@
426 gint x = gdk_screen_width();
427 gint y = gdk_screen_height();
428 static GdkGeometry geometry;
429+ gint col_count = g_slist_length (prefs_pages);
430+
431+ if (col_count > 1)
432+ col_count = 2;
433
434 prefswindow = g_new0(PrefsWindow, 1);
435
436@@ -360,39 +364,52 @@
437 gtk_window_set_resizable (GTK_WINDOW(prefswindow->window), TRUE);
438 gtk_container_set_border_width(GTK_CONTAINER(prefswindow->window), 4);
439
440- prefswindow->table1 = gtk_table_new(2, 2, FALSE);
441+ prefswindow->table1 = gtk_table_new(col_count, col_count, FALSE);
442 gtk_widget_show(prefswindow->table1);
443 gtk_container_add(GTK_CONTAINER(prefswindow->window), prefswindow->table1);
444
445- prefswindow->scrolledwindow1 = gtk_scrolled_window_new(NULL, NULL);
446- gtk_widget_show(prefswindow->scrolledwindow1);
447- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(prefswindow->scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
448- gtk_table_attach(GTK_TABLE(prefswindow->table1), prefswindow->scrolledwindow1, 0, 1, 0, 1, GTK_FILL, GTK_FILL | GTK_EXPAND, 2, 2);
449-
450- prefswindow->tree_view = prefswindow_tree_view_create(prefswindow);
451- gtk_widget_show(prefswindow->tree_view);
452- gtk_container_add(GTK_CONTAINER(prefswindow->scrolledwindow1),
453- prefswindow->tree_view);
454-
455- prefswindow->frame = gtk_frame_new(NULL);
456- gtk_widget_show(prefswindow->frame);
457- gtk_frame_set_shadow_type(GTK_FRAME(prefswindow->frame), GTK_SHADOW_IN);
458- gtk_table_attach(GTK_TABLE(prefswindow->table1), prefswindow->frame, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 2, 2);
459-
460- prefswindow->table2 = gtk_table_new(1, 2, FALSE);
461- gtk_widget_show(prefswindow->table2);
462- gtk_container_add(GTK_CONTAINER(prefswindow->frame), prefswindow->table2);
463-
464- prefswindow->labelframe = gtk_frame_new(NULL);
465- gtk_widget_show(prefswindow->labelframe);
466- gtk_frame_set_shadow_type(GTK_FRAME(prefswindow->labelframe), GTK_SHADOW_OUT);
467- gtk_table_attach(GTK_TABLE(prefswindow->table2), prefswindow->labelframe, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 1, 1);
468-
469- prefswindow->pagelabel = gtk_label_new("");
470- gtk_widget_show(prefswindow->pagelabel);
471- gtk_label_set_justify(GTK_LABEL(prefswindow->pagelabel), GTK_JUSTIFY_LEFT);
472- gtk_misc_set_alignment(GTK_MISC(prefswindow->pagelabel), 0, 0.0);
473- gtk_container_add(GTK_CONTAINER(prefswindow->labelframe), prefswindow->pagelabel);
474+ if (col_count > 1)
475+ {
476+ prefswindow->scrolledwindow1 = gtk_scrolled_window_new(NULL, NULL);
477+ gtk_widget_show(prefswindow->scrolledwindow1);
478+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(prefswindow->scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
479+ gtk_table_attach(GTK_TABLE(prefswindow->table1), prefswindow->scrolledwindow1, 0, 1, 0, 1, GTK_FILL, GTK_FILL | GTK_EXPAND, 2, 2);
480+
481+ prefswindow->tree_view = prefswindow_tree_view_create(prefswindow);
482+ gtk_widget_show(prefswindow->tree_view);
483+ gtk_container_add(GTK_CONTAINER(prefswindow->scrolledwindow1),
484+ prefswindow->tree_view);
485+
486+ prefswindow->frame = gtk_frame_new(NULL);
487+ gtk_widget_show(prefswindow->frame);
488+ gtk_frame_set_shadow_type(GTK_FRAME(prefswindow->frame), GTK_SHADOW_IN);
489+ gtk_table_attach(GTK_TABLE(prefswindow->table1), prefswindow->frame, col_count - 1, col_count, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 2, 2);
490+
491+ prefswindow->table2 = gtk_table_new(1, 2, FALSE);
492+ gtk_widget_show(prefswindow->table2);
493+ gtk_container_add(GTK_CONTAINER(prefswindow->frame), prefswindow->table2);
494+ }
495+ else
496+ {
497+ prefswindow->table2 = gtk_table_new(1, 2, FALSE);
498+ gtk_widget_show(prefswindow->table2);
499+ gtk_table_attach(GTK_TABLE(prefswindow->table1), prefswindow->table2, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 2, 2);
500+ }
501+
502+
503+ if (col_count > 1)
504+ {
505+ prefswindow->labelframe = gtk_frame_new(NULL);
506+ gtk_widget_show(prefswindow->labelframe);
507+ gtk_frame_set_shadow_type(GTK_FRAME(prefswindow->labelframe), GTK_SHADOW_OUT);
508+ gtk_table_attach(GTK_TABLE(prefswindow->table2), prefswindow->labelframe, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 1, 1);
509+
510+ prefswindow->pagelabel = gtk_label_new("");
511+ gtk_widget_show(prefswindow->pagelabel);
512+ gtk_label_set_justify(GTK_LABEL(prefswindow->pagelabel), GTK_JUSTIFY_LEFT);
513+ gtk_misc_set_alignment(GTK_MISC(prefswindow->pagelabel), 0, 0.0);
514+ gtk_container_add(GTK_CONTAINER(prefswindow->labelframe), prefswindow->pagelabel);
515+ }
516
517 prefswindow->scrolledwindow2 = gtk_scrolled_window_new(NULL, NULL);
518 gtk_widget_show(prefswindow->scrolledwindow2);
519@@ -411,9 +428,38 @@
520 gtk_widget_show(prefswindow->empty_page);
521 gtk_container_add(GTK_CONTAINER(prefswindow->notebook), prefswindow->empty_page);
522
523- prefswindow_build_tree(prefswindow->tree_view, prefs_pages);
524+ if (col_count > 1)
525+ {
526+ prefswindow_build_tree(prefswindow->tree_view, prefs_pages);
527+
528+ gtk_widget_grab_focus(prefswindow->tree_view);
529+ }
530+ else
531+ {
532+ PrefsPage * page = prefs_pages->data;
533+ gint pagenum;
534+ GtkAdjustment *adj;
535+
536+ if (!page->page_open)
537+ {
538+ page->create_widget(page,
539+ GTK_WINDOW(prefswindow->window),
540+ prefswindow->data);
541+ gtk_container_add(GTK_CONTAINER(prefswindow->notebook),
542+ page->widget);
543+ page->page_open = TRUE;
544+ }
545+
546+ pagenum = gtk_notebook_page_num(GTK_NOTEBOOK(prefswindow->notebook),
547+ page->widget);
548+ gtk_notebook_set_current_page(GTK_NOTEBOOK(prefswindow->notebook),
549+ pagenum);
550
551- gtk_widget_grab_focus(prefswindow->tree_view);
552+ adj = gtk_scrolled_window_get_vadjustment(
553+ GTK_SCROLLED_WINDOW(prefswindow->scrolledwindow2));
554+ gtk_adjustment_set_value(adj, 0);
555+
556+ }
557
558 gtkut_stock_button_set_create(&prefswindow->confirm_area,
559 &prefswindow->apply_btn, GTK_STOCK_APPLY,
560@@ -440,28 +486,6 @@
561 G_CALLBACK(prefswindow_key_pressed), &(prefswindow->window));
562 #endif
563
564- /* connect to callback only if we hhave non-NULL pointers to store size to */
565- if (prefswindow->save_width && prefswindow->save_height) {
566- g_signal_connect(G_OBJECT(prefswindow->window), "size_allocate",
567- G_CALLBACK(prefs_size_allocate_cb), prefswindow);
568- }
569-
570- if (!geometry.min_height) {
571-
572- if (x < 800 && y < 600) {
573- geometry.min_width = 600;
574- geometry.min_height = 440;
575- } else {
576- geometry.min_width = 700;
577- geometry.min_height = 550;
578- }
579- }
580- gtk_window_set_geometry_hints(GTK_WINDOW(prefswindow->window), NULL, &geometry,
581- GDK_HINT_MIN_SIZE);
582- if (prefswindow->save_width && prefswindow->save_height) {
583- gtk_widget_set_size_request(prefswindow->window, *(prefswindow->save_width),
584- *(prefswindow->save_height));
585- }
586
587 gtk_widget_show(prefswindow->window);
588 #ifdef MAEMO
589Index: claws-mail-2.9.1/src/compose.c
590===================================================================
591--- claws-mail-2.9.1.orig/src/compose.c 2007-04-25 07:40:10.000000000 +0100
592+++ claws-mail-2.9.1/src/compose.c 2007-04-25 10:18:13.000000000 +0100
593@@ -352,9 +352,6 @@
594
595 /* callback functions */
596
597-static gboolean compose_edit_size_alloc (GtkEditable *widget,
598- GtkAllocation *allocation,
599- GtkSHRuler *shruler);
600 static void account_activated (GtkComboBox *optmenu,
601 gpointer data);
602 static void attach_selected (GtkTreeView *tree_view,
603@@ -439,9 +436,6 @@
604 guint action,
605 GtkWidget *widget);
606
607-static void compose_toggle_ruler_cb (gpointer data,
608- guint action,
609- GtkWidget *widget);
610 static void compose_toggle_sign_cb (gpointer data,
611 guint action,
612 GtkWidget *widget);
613@@ -788,7 +782,6 @@
614 ENC_ACTION(C_WINDOWS_874)},
615
616 {N_("/_Tools"), NULL, NULL, 0, "<Branch>"},
617- {N_("/_Tools/Show _ruler"), NULL, compose_toggle_ruler_cb, 0, "<ToggleItem>"},
618 {N_("/_Tools/_Address book"), "<shift><control>A", compose_address_cb , 0, NULL},
619 {N_("/_Tools/_Template"), NULL, NULL, 0, "<Branch>"},
620 {N_("/_Tools/Actio_ns"), NULL, NULL, 0, "<Branch>"},
621@@ -2067,7 +2060,6 @@
622 menu_set_sensitive(ifactory, "/Message/Insert signature", FALSE);
623 menu_set_sensitive(ifactory, "/Edit", FALSE);
624 menu_set_sensitive(ifactory, "/Options", FALSE);
625- menu_set_sensitive(ifactory, "/Tools/Show ruler", FALSE);
626 menu_set_sensitive(ifactory, "/Tools/Actions", FALSE);
627
628 if (compose->toolbar->draft_btn)
629@@ -5684,7 +5676,7 @@
630 g_signal_connect(G_OBJECT(GTK_COMBO(combo)->entry), "grab_focus",
631 G_CALLBACK(compose_grab_focus_cb), compose);
632 gtk_widget_show(combo);
633- gtk_table_attach(GTK_TABLE(compose->header_table), combo, 0, 1, compose->header_nextrow, compose->header_nextrow+1, GTK_SHRINK, GTK_FILL, 0, 0);
634+ gtk_table_attach(GTK_TABLE(compose->header_table), combo, 0, 1, compose->header_nextrow, compose->header_nextrow+1, GTK_FILL, GTK_FILL, 0, 0);
635 if (compose->header_last) {
636 const gchar *last_header_entry = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(compose->header_last->combo)->entry));
637 string = headers;
638@@ -5778,7 +5770,7 @@
639
640 static GtkWidget *compose_create_header(Compose *compose)
641 {
642- GtkWidget *from_optmenu_hbox;
643+ GtkWidget *from_optmenu;
644 GtkWidget *header_scrolledwin;
645 GtkWidget *header_table;
646
647@@ -5788,18 +5780,20 @@
648 header_scrolledwin = gtk_scrolled_window_new(NULL, NULL);
649 gtk_widget_show(header_scrolledwin);
650 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(header_scrolledwin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
651-
652 header_table = gtk_table_new(2, 2, FALSE);
653+ gtk_table_set_col_spacings (GTK_TABLE (header_table), BORDER_WIDTH);
654 gtk_widget_show(header_table);
655 gtk_container_set_border_width(GTK_CONTAINER(header_table), BORDER_WIDTH);
656 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(header_scrolledwin), header_table);
657- gtk_viewport_set_shadow_type(GTK_VIEWPORT(GTK_BIN(header_scrolledwin)->child), GTK_SHADOW_ETCHED_IN);
658+ gtk_viewport_set_shadow_type(GTK_VIEWPORT(GTK_BIN(header_scrolledwin)->child), GTK_SHADOW_NONE);
659 count = 0;
660
661 /* option menu for selecting accounts */
662- from_optmenu_hbox = compose_account_option_menu_create(compose);
663- gtk_table_attach(GTK_TABLE(header_table), from_optmenu_hbox,
664- 0, 2, count, count + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
665+ from_optmenu = compose_account_option_menu_create(compose);
666+ gtk_table_attach(GTK_TABLE(header_table), from_optmenu,
667+ 0, 1, count, count + 1, GTK_FILL, GTK_FILL, 0, 0);
668+ gtk_table_attach(GTK_TABLE(header_table), compose->from_name,
669+ 1, 2, count, count + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
670 count++;
671
672 compose->header_table = header_table;
673@@ -6140,15 +6134,12 @@
674 GtkWidget *vbox2;
675
676 GtkWidget *label;
677- GtkWidget *subject_hbox;
678- GtkWidget *subject_frame;
679+ GtkWidget *edit_frame;
680 GtkWidget *subject_entry;
681 GtkWidget *subject;
682 GtkWidget *paned;
683
684 GtkWidget *edit_vbox;
685- GtkWidget *ruler_hbox;
686- GtkWidget *ruler;
687 GtkWidget *scrolledwin;
688 GtkWidget *text;
689 GtkTextBuffer *buffer;
690@@ -6169,8 +6160,6 @@
691 GtkAspell * gtkaspell = NULL;
692 #endif
693
694- static GdkGeometry geometry;
695-
696 g_return_val_if_fail(account != NULL, NULL);
697
698 debug_print("Creating compose window...\n");
699@@ -6190,28 +6179,6 @@
700
701 window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "compose");
702
703- gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
704- gtk_widget_set_size_request(window, -1, prefs_common.compose_height);
705-
706- if (!geometry.max_width) {
707- geometry.max_width = gdk_screen_width();
708- geometry.max_height = gdk_screen_height();
709- }
710-
711- gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL,
712- &geometry, GDK_HINT_MAX_SIZE);
713- if (!geometry.min_width) {
714- geometry.min_width = 600;
715- geometry.min_height = 480;
716- }
717- gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL,
718- &geometry, GDK_HINT_MIN_SIZE);
719-
720-#ifndef MAEMO
721- if (compose_force_window_origin)
722- gtk_widget_set_uposition(window, prefs_common.compose_x,
723- prefs_common.compose_y);
724-#endif
725 g_signal_connect(G_OBJECT(window), "delete_event",
726 G_CALLBACK(compose_delete_cb), compose);
727 MANAGE_WINDOW_SIGNALS_CONNECT(window);
728@@ -6227,11 +6194,7 @@
729 n_menu_entries, "<Compose>", compose);
730 gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
731
732- if (prefs_common.toolbar_detachable) {
733- handlebox = gtk_handle_box_new();
734- } else {
735- handlebox = gtk_hbox_new(FALSE, 0);
736- }
737+ handlebox = gtk_hbox_new(FALSE, 0);
738 gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
739
740 gtk_widget_realize(handlebox);
741@@ -6244,7 +6207,6 @@
742
743 /* Notebook */
744 notebook = gtk_notebook_new();
745- gtk_widget_set_size_request(notebook, -1, 130);
746 gtk_widget_show(notebook);
747
748 /* header labels and entries */
749@@ -6258,18 +6220,10 @@
750 /* Others Tab */
751 gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
752 compose_create_others(compose),
753- gtk_label_new_with_mnemonic(_("Othe_rs")));
754+ gtk_label_new_with_mnemonic(_("Othe_r")));
755
756 /* Subject */
757- subject_hbox = gtk_hbox_new(FALSE, 0);
758- gtk_widget_show(subject_hbox);
759-
760- subject_frame = gtk_frame_new(NULL);
761- gtk_frame_set_shadow_type(GTK_FRAME(subject_frame), GTK_SHADOW_NONE);
762- gtk_box_pack_start(GTK_BOX(subject_hbox), subject_frame, TRUE, TRUE, 0);
763- gtk_widget_show(subject_frame);
764-
765- subject = gtk_hbox_new(FALSE, HSPACING_NARROW);
766+ subject = gtk_hbox_new(FALSE, BORDER_WIDTH);
767 gtk_container_set_border_width(GTK_CONTAINER(subject), 0);
768 gtk_widget_show(subject);
769
770@@ -6283,20 +6237,16 @@
771 G_CALLBACK(compose_grab_focus_cb), compose);
772 gtk_widget_show(subject_entry);
773 compose->subject_entry = subject_entry;
774- gtk_container_add(GTK_CONTAINER(subject_frame), subject);
775
776- edit_vbox = gtk_vbox_new(FALSE, 0);
777+ edit_vbox = gtk_vbox_new(FALSE, BORDER_WIDTH);
778+ gtk_container_set_border_width(GTK_CONTAINER(edit_vbox), BORDER_WIDTH);
779
780- gtk_box_pack_start(GTK_BOX(edit_vbox), subject_hbox, FALSE, FALSE, 0);
781+ gtk_box_pack_start(GTK_BOX(edit_vbox), subject, FALSE, FALSE, 0);
782
783- /* ruler */
784- ruler_hbox = gtk_hbox_new(FALSE, 0);
785- gtk_box_pack_start(GTK_BOX(edit_vbox), ruler_hbox, FALSE, FALSE, 0);
786-
787- ruler = gtk_shruler_new();
788- gtk_ruler_set_range(GTK_RULER(ruler), 0.0, 100.0, 1.0, 100.0);
789- gtk_box_pack_start(GTK_BOX(ruler_hbox), ruler, TRUE, TRUE,
790- BORDER_WIDTH);
791+ edit_frame = gtk_frame_new(NULL);
792+ gtk_frame_set_shadow_type(GTK_FRAME(edit_frame), GTK_SHADOW_IN);
793+ gtk_widget_show(edit_frame);
794+ gtk_container_add(GTK_CONTAINER(edit_frame), edit_vbox);
795
796 /* text widget */
797 scrolledwin = gtk_scrolled_window_new(NULL, NULL);
798@@ -6317,9 +6267,6 @@
799
800 gtk_container_add(GTK_CONTAINER(scrolledwin), text);
801
802- g_signal_connect_after(G_OBJECT(text), "size_allocate",
803- G_CALLBACK(compose_edit_size_alloc),
804- ruler);
805 g_signal_connect(G_OBJECT(buffer), "changed",
806 G_CALLBACK(compose_changed_cb), compose);
807 g_signal_connect(G_OBJECT(text), "grab_focus",
808@@ -6363,7 +6310,7 @@
809 gtk_widget_set_size_request(edit_vbox, -1, mode == COMPOSE_NEW ? 250 : 230);
810 #endif
811 gtk_paned_add1(GTK_PANED(paned), notebook);
812- gtk_paned_add2(GTK_PANED(paned), edit_vbox);
813+ gtk_paned_add2(GTK_PANED(paned), edit_frame);
814 gtk_widget_show_all(paned);
815
816
817@@ -6408,8 +6355,6 @@
818
819 compose->notebook = notebook;
820 compose->edit_vbox = edit_vbox;
821- compose->ruler_hbox = ruler_hbox;
822- compose->ruler = ruler;
823 compose->scrolledwin = scrolledwin;
824 compose->text = text;
825
826@@ -6531,13 +6476,6 @@
827
828 compose_list = g_list_append(compose_list, compose);
829
830- if (!prefs_common.show_ruler)
831- gtk_widget_hide(ruler_hbox);
832-
833- menuitem = gtk_item_factory_get_item(ifactory, "/Tools/Show ruler");
834- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
835- prefs_common.show_ruler);
836-
837 /* Priority */
838 compose->priority = PRIORITY_NORMAL;
839 compose_update_priority_menu_item(compose);
840@@ -6568,7 +6506,6 @@
841 static GtkWidget *compose_account_option_menu_create(Compose *compose)
842 {
843 GList *accounts;
844- GtkWidget *hbox;
845 GtkWidget *optmenu;
846 GtkWidget *optmenubox;
847 GtkListStore *menu;
848@@ -6584,7 +6521,6 @@
849 optmenu = gtkut_sc_combobox_create(optmenubox, FALSE);
850 menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(optmenu)));
851
852- hbox = gtk_hbox_new(FALSE, 6);
853 from_name = gtk_entry_new();
854
855 g_signal_connect_after(G_OBJECT(from_name), "grab_focus",
856@@ -6623,9 +6559,6 @@
857 G_CALLBACK(account_activated),
858 compose);
859
860- gtk_box_pack_start(GTK_BOX(hbox), optmenubox, FALSE, FALSE, 0);
861- gtk_box_pack_start(GTK_BOX(hbox), from_name, TRUE, TRUE, 0);
862-
863 gtk_tooltips_set_tip(compose->tooltips, optmenubox,
864 _("Account to use for this email"), NULL);
865 gtk_tooltips_set_tip(compose->tooltips, from_name,
866@@ -6633,7 +6566,7 @@
867
868 compose->from_name = from_name;
869
870- return hbox;
871+ return optmenubox;
872 }
873
874 static void compose_set_priority_cb(gpointer data,
875@@ -7851,32 +7784,6 @@
876
877 /* callback functions */
878
879-/* compose_edit_size_alloc() - called when resized. don't know whether Gtk
880- * includes "non-client" (windows-izm) in calculation, so this calculation
881- * may not be accurate.
882- */
883-static gboolean compose_edit_size_alloc(GtkEditable *widget,
884- GtkAllocation *allocation,
885- GtkSHRuler *shruler)
886-{
887- if (prefs_common.show_ruler) {
888- gint char_width = 0, char_height = 0;
889- gint line_width_in_chars;
890-
891- gtkut_get_font_size(GTK_WIDGET(widget),
892- &char_width, &char_height);
893- line_width_in_chars =
894- (allocation->width - allocation->x) / char_width;
895-
896- /* got the maximum */
897- gtk_ruler_set_range(GTK_RULER(shruler),
898- 0.0, line_width_in_chars, 0,
899- /*line_width_in_chars*/ char_width);
900- }
901-
902- return TRUE;
903-}
904-
905 static void account_activated(GtkComboBox *optmenu, gpointer data)
906 {
907 Compose *compose = (Compose *)data;
908@@ -9040,21 +8947,6 @@
909 compose_update_privacy_system_menu_item(compose, warn);
910 }
911
912-static void compose_toggle_ruler_cb(gpointer data, guint action,
913- GtkWidget *widget)
914-{
915- Compose *compose = (Compose *)data;
916-
917- if (GTK_CHECK_MENU_ITEM(widget)->active) {
918- gtk_widget_show(compose->ruler_hbox);
919- prefs_common.show_ruler = TRUE;
920- } else {
921- gtk_widget_hide(compose->ruler_hbox);
922- gtk_widget_queue_resize(compose->edit_vbox);
923- prefs_common.show_ruler = FALSE;
924- }
925-}
926-
927 static void compose_attach_drag_received_cb (GtkWidget *widget,
928 GdkDragContext *context,
929 gint x,
930Index: claws-mail-2.9.1/src/folderview.c
931===================================================================
932--- claws-mail-2.9.1.orig/src/folderview.c 2007-04-03 19:10:25.000000000 +0100
933+++ claws-mail-2.9.1/src/folderview.c 2007-04-25 10:28:00.000000000 +0100
934@@ -73,6 +73,11 @@
935 #define COL_FOLDER_WIDTH 150
936 #define COL_NUM_WIDTH 32
937
938+/* added dummy column to stop the last column from
939+ * resizing insanely in small screen view
940+ */
941+#define _N_FOLDER_COLS (N_FOLDER_COLS + 1)
942+
943 static GList *folderview_list = NULL;
944
945 static GtkStyle *normal_style;
946@@ -448,7 +453,7 @@
947 gint *col_pos;
948 FolderColumnState *col_state;
949 FolderColumnType type;
950- gchar *titles[N_FOLDER_COLS];
951+ gchar *titles[_N_FOLDER_COLS];
952 gint i;
953 GtkWidget *scrolledwin = folderview->scrolledwin;
954
955@@ -471,8 +476,9 @@
956 titles[col_pos[F_COL_UNREAD]] = _("Unread");
957 /* TRANSLATORS: This in Number sign in American style */
958 titles[col_pos[F_COL_TOTAL]] = _("#");
959+ titles[F_COL_DUMMY] = "";
960
961- ctree = gtk_sctree_new_with_titles(N_FOLDER_COLS, col_pos[F_COL_FOLDER],
962+ ctree = gtk_sctree_new_with_titles(_N_FOLDER_COLS, col_pos[F_COL_FOLDER],
963 titles);
964
965 gtk_clist_set_selection_mode(GTK_CLIST(ctree), GTK_SELECTION_BROWSE);
966@@ -510,6 +516,9 @@
967 (GTK_CLIST(ctree), i, col_state[i].visible);
968 }
969
970+ GTK_WIDGET_UNSET_FLAGS(GTK_CLIST(ctree)->column[i].button,
971+ GTK_CAN_FOCUS);
972+
973 g_signal_connect(G_OBJECT(ctree), "key_press_event",
974 G_CALLBACK(folderview_key_pressed),
975 folderview);
976@@ -605,9 +614,6 @@
977 (GTK_SCROLLED_WINDOW(scrolledwin),
978 GTK_POLICY_AUTOMATIC,
979 prefs_common.folderview_vscrollbar_policy);
980- gtk_widget_set_size_request(scrolledwin,
981- prefs_common.folderview_width,
982- prefs_common.folderview_height);
983
984 folderview->scrolledwin = scrolledwin;
985 ctree = folderview_ctree_create(folderview);
986@@ -2268,7 +2274,7 @@
987 static void folderview_create_folder_node(FolderView *folderview, FolderItem *item)
988 {
989 GtkCTree *ctree = GTK_CTREE(folderview->ctree);
990- gchar *text[N_FOLDER_COLS] = {NULL, "0", "0", "0"};
991+ gchar *text[_N_FOLDER_COLS] = {NULL, "0", "0", "0", ""};
992 GtkCTreeNode *node, *parent_node;
993 gint *col_pos = folderview->col_pos;
994 FolderItemUpdateData hookdata;
995Index: claws-mail-2.9.1/src/folderview.h
996===================================================================
997--- claws-mail-2.9.1.orig/src/folderview.h 2007-03-22 17:22:52.000000000 +0000
998+++ claws-mail-2.9.1/src/folderview.h 2007-04-25 10:16:55.000000000 +0100
999@@ -37,7 +37,8 @@
1000 F_COL_FOLDER,
1001 F_COL_NEW,
1002 F_COL_UNREAD,
1003- F_COL_TOTAL
1004+ F_COL_TOTAL,
1005+ F_COL_DUMMY
1006 } FolderColumnType;
1007
1008 #define N_FOLDER_COLS 4
diff --git a/meta/packages/coreutils/coreutils-6.9/futimens.patch b/meta/packages/coreutils/coreutils-6.9/futimens.patch
deleted file mode 100644
index 953c2d17a9..0000000000
--- a/meta/packages/coreutils/coreutils-6.9/futimens.patch
+++ /dev/null
@@ -1,61 +0,0 @@
1# coreutils uses gnulib which conflicts with newer libc header on futimens
2# this patch simply renames coreutils futimes to avoid confliction
3#
4# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
5# (this patch is licensed under GPLv2)
6
7diff --git a/lib/utimens.c b/lib/utimens.c
8index 71bc510..ae870b8 100644
9--- a/lib/utimens.c
10+++ b/lib/utimens.c
11@@ -75,7 +75,7 @@ struct utimbuf
12 Return 0 on success, -1 (setting errno) on failure. */
13
14 int
15-futimens (int fd ATTRIBUTE_UNUSED,
16+futimens_coreutils (int fd ATTRIBUTE_UNUSED,
17 char const *file, struct timespec const timespec[2])
18 {
19 /* Some Linux-based NFS clients are buggy, and mishandle time stamps
20@@ -185,5 +185,5 @@ futimens (int fd ATTRIBUTE_UNUSED,
21 int
22 utimens (char const *file, struct timespec const timespec[2])
23 {
24- return futimens (-1, file, timespec);
25+ return futimens_coreutils (-1, file, timespec);
26 }
27diff --git a/lib/utimens.h b/lib/utimens.h
28index 0097aaa..13fc45a 100644
29--- a/lib/utimens.h
30+++ b/lib/utimens.h
31@@ -1,3 +1,3 @@
32 #include <time.h>
33-int futimens (int, char const *, struct timespec const [2]);
34+int futimens_coreutils (int, char const *, struct timespec const [2]);
35 int utimens (char const *, struct timespec const [2]);
36diff --git a/src/copy.c b/src/copy.c
37index 4bdb75c..04634f1 100644
38--- a/src/copy.c
39+++ b/src/copy.c
40@@ -518,7 +518,7 @@ copy_reg (char const *src_name, char const *dst_name,
41 timespec[0] = get_stat_atime (src_sb);
42 timespec[1] = get_stat_mtime (src_sb);
43
44- if (futimens (dest_desc, dst_name, timespec) != 0)
45+ if (futimens_coreutils (dest_desc, dst_name, timespec) != 0)
46 {
47 error (0, errno, _("preserving times for %s"), quote (dst_name));
48 if (x->require_preserve)
49diff --git a/src/touch.c b/src/touch.c
50index a79c26d..6ef317d 100644
51--- a/src/touch.c
52+++ b/src/touch.c
53@@ -182,7 +182,7 @@ touch (const char *file)
54 t = timespec;
55 }
56
57- ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
58+ ok = (futimens_coreutils (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
59
60 if (fd == STDIN_FILENO)
61 {
diff --git a/meta/packages/coreutils/coreutils-6.9/gnulib_m4.patch b/meta/packages/coreutils/coreutils-6.9/gnulib_m4.patch
deleted file mode 100644
index b42f5c9faa..0000000000
--- a/meta/packages/coreutils/coreutils-6.9/gnulib_m4.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1# remove the line to cause recursive inclusion error from autoreconf, sicne
2# newer autoconf has included this definition. Simply rename it here.
3#
4# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
5# (this patch is licensed under GPLv2)
6
7diff --git a/extensions.m4 b/extensions.m4
8index 143a9e5..f6558f1 100644
9--- a/m4/extensions.m4
10+++ b/m4/extensions.m4
11@@ -16,7 +16,7 @@
12 # ------------------------
13 # Enable extensions on systems that normally disable them,
14 # typically due to standards-conformance issues.
15-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
16+AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS_DUMMY],
17 [
18 AC_BEFORE([$0], [AC_COMPILE_IFELSE])
19 AC_BEFORE([$0], [AC_RUN_IFELSE])
diff --git a/meta/packages/coreutils/coreutils-6.9/man-touch.patch b/meta/packages/coreutils/coreutils-6.9/man-touch.patch
deleted file mode 100644
index 95a9638921..0000000000
--- a/meta/packages/coreutils/coreutils-6.9/man-touch.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1# man page for 'touch' is generated differently from others. All other utilities
2# are provided static man source files, while for 'touch' it requires help2man
3# to invoke "touch --help" and then convert the output into the manual. Since touch
4# is with target format which can't be invoked on build system, disable building
5# 'touch' man page here.
6#
7# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
8# (this patch is licensed under GPLv2)
9
10diff --git a/man/Makefile.am b/man/Makefile.am
11index 32df9d1..37b09e3 100644
12--- a/man/Makefile.am
13+++ b/man/Makefile.am
14@@ -27,7 +27,7 @@ dist_man_MANS = \
15 paste.1 pathchk.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
16 rm.1 rmdir.1 seq.1 sha1sum.1 sha224sum.1 sha256sum.1 sha384sum.1 sha512sum.1 \
17 shred.1 shuf.1 sleep.1 sort.1 split.1 stat.1 \
18- su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
19+ su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 tr.1 true.1 tsort.1 \
20 tty.1 unexpand.1 uniq.1 unlink.1 vdir.1 wc.1 \
21 whoami.1 yes.1 $(MAN)
22 optional_mans = \
diff --git a/meta/packages/coreutils/coreutils_6.9.bb b/meta/packages/coreutils/coreutils_6.9.bb
deleted file mode 100644
index 6a23f4f65f..0000000000
--- a/meta/packages/coreutils/coreutils_6.9.bb
+++ /dev/null
@@ -1,78 +0,0 @@
1DESCRIPTION = "The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system"
2HOMEPAGE = "http://www.gnu.org/software/coreutils/"
3BUGTRACKER = "http://debbugs.gnu.org/coreutils"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
6 file://src/ls.c;startline=4;endline=16;md5=482a96d4f25010a4e13f8743e0c3685e"
7PR = "r0"
8DEPENDS = "perl-native"
9
10inherit autotools gettext
11
12SRC_URI = "http://ftp.gnu.org/gnu/coreutils/${BP}.tar.bz2 \
13 file://gnulib_m4.patch \
14 file://futimens.patch \
15 file://man-touch.patch"
16
17# [ gets a special treatment and is not included in this
18bindir_progs = "base64 basename cksum comm csplit cut dir dircolors dirname du \
19 env expand expr factor fmt fold groups head hostid id install \
20 join link logname md5sum mkfifo nice nl nohup od paste pathchk \
21 pinky pr printenv printf ptx readlink seq sha1sum sha224sum sha256sum \
22 sha384sum sha512sum shred shuf sort split stat sum tac tail tee test \
23 tr tsort tty unexpand uniq unlink users vdir wc who whoami yes"
24
25# hostname gets a special treatment and is not included in this
26base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
27 mknod mv pwd rm rmdir sleep stty sync touch true uname"
28
29sbindir_progs= "chroot"
30
31do_install() {
32 autotools_do_install
33
34 for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
35
36 install -d ${D}${base_bindir}
37 for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
38
39 install -d ${D}${sbindir}
40 for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
41
42 # [ requires special handling because [.coreutils will cause the sed stuff
43 # in update-alternatives to fail, therefore use lbracket - the name used
44 # for the actual source file.
45 mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
46
47 # hostname and uptime separated. busybox's versions are preferred
48 mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN}
49 mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
50}
51
52pkg_postinst_${PN} () {
53 for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
54
55 for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
56
57 for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
58
59 # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately.
60 update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10
61 update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
62 update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
63}
64
65pkg_prerm_${PN} () {
66 for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
67
68 for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
69
70 for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
71
72 # The special cases
73 update-alternatives --remove hostname hostname.${PN}
74 update-alternatives --remove uptime uptime.${PN}
75 update-alternatives --remove '[' 'lbracket.${PN}'
76}
77
78BBCLASSEXTEND = "native"
diff --git a/meta/packages/coreutils/coreutils_8.5.bb b/meta/packages/coreutils/coreutils_8.5.bb
deleted file mode 100644
index 5213fa2937..0000000000
--- a/meta/packages/coreutils/coreutils_8.5.bb
+++ /dev/null
@@ -1,67 +0,0 @@
1DESCRIPTION = "The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system"
2HOMEPAGE = "http://www.gnu.org/software/coreutils/"
3BUGTRACKER = "http://debbugs.gnu.org/coreutils"
4LICENSE = "GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
6 file://src/ls.c;startline=5;endline=16;md5=bb14ed3c4cda583abc85401304b5cd4e"
7PR = "r0"
8DEPENDS = "perl-native"
9
10inherit autotools gettext
11
12SRC_URI = "http://ftp.gnu.org/gnu/coreutils/${BP}.tar.gz"
13
14# [ gets a special treatment and is not included in this
15bindir_progs = "base64 basename chcon cksum comm csplit cut dir dircolors dirname du \
16 env expand expr factor fmt fold groups head hostid id install \
17 join link logname md5sum mkfifo mktemp nice nl nohup nproc od paste pathchk \
18 pinky pr printenv printf ptx readlink runcon seq sha1sum sha224sum sha256sum \
19 sha384sum sha512sum shred shuf sort split stat stdbuf sum tac tail tee test timeout\
20 tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
21
22# hostname gets a special treatment and is not included in this
23base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
24 mknod mv pwd rm rmdir sleep stty sync touch true uname"
25
26sbindir_progs= "chroot"
27
28do_install_append() {
29 for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
30
31 install -d ${D}${base_bindir}
32 for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
33
34 install -d ${D}${sbindir}
35 for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
36
37 # [ requires special handling because [.coreutils will cause the sed stuff
38 # in update-alternatives to fail, therefore use lbracket - the name used
39 # for the actual source file.
40 mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
41}
42
43pkg_postinst_${PN} () {
44 for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
45
46 for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
47
48 for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
49
50 # Special cases. [ needs to be treated separately.
51 update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
52}
53
54pkg_prerm_${PN} () {
55 for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
56
57 for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
58
59 for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
60
61 # The special cases
62 update-alternatives --remove hostname hostname.${PN}
63 update-alternatives --remove uptime uptime.${PN}
64 update-alternatives --remove '[' 'lbracket.${PN}'
65}
66
67BBCLASSEXTEND = "native"
diff --git a/meta/packages/curl/curl/noldlibpath.patch b/meta/packages/curl/curl/noldlibpath.patch
deleted file mode 100644
index a3319a23e3..0000000000
--- a/meta/packages/curl/curl/noldlibpath.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1Manipulating LD_LIBRARY_PATH can totally break builds when cross compiling.
2Since we never run compiled binaries for the target, we should *never* need
3to change LD_LIBRARY_PATH.
4
5RP 9/6/2010
6
7Index: curl-7.20.0/configure.ac
8===================================================================
9--- curl-7.20.0.orig/configure.ac 2010-06-09 11:06:30.000000000 +0100
10+++ curl-7.20.0/configure.ac 2010-06-09 11:04:25.000000000 +0100
11@@ -1461,9 +1461,10 @@
12 dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
13 dnl to prevent further configure tests to fail due to this
14
15- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
16- export LD_LIBRARY_PATH
17- AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
18+ #LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
19+ #export LD_LIBRARY_PATH
20+ #AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
21+ :
22 fi
23 fi
24
25@@ -1684,9 +1686,10 @@
26 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
27 dnl due to this
28
29- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
30- export LD_LIBRARY_PATH
31- AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
32+ #LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
33+ #export LD_LIBRARY_PATH
34+ #AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
35+ :
36 fi
37 fi
38
39@@ -1696,6 +1699,8 @@
40
41 fi dnl OPENSSL != 1
42
43+AC_SUBST(GNUTLS_REQUIRED)
44+
45 dnl ----------------------------------------------------
46 dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
47 dnl ----------------------------------------------------
48@@ -1781,9 +1786,10 @@
49 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
50 dnl due to this
51
52- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
53- export LD_LIBRARY_PATH
54- AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
55+ #LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
56+ #export LD_LIBRARY_PATH
57+ #AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
58+ :
59 fi
60
61 fi
62@@ -1881,9 +1887,9 @@
63 dnl libssh2_version is a post 1.0 addition
64 AC_CHECK_FUNCS( libssh2_version )
65
66- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
67- export LD_LIBRARY_PATH
68- AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
69+ #LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
70+ #export LD_LIBRARY_PATH
71+ #AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
72 fi
73 else
74 dnl no libssh2, revert back to clean variables
diff --git a/meta/packages/curl/curl/pkgconfig_fix.patch b/meta/packages/curl/curl/pkgconfig_fix.patch
deleted file mode 100644
index a59d39b8b1..0000000000
--- a/meta/packages/curl/curl/pkgconfig_fix.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1Index: curl-7.20.0/libcurl.pc.in
2===================================================================
3--- curl-7.20.0.orig/libcurl.pc.in 2009-11-17 18:11:07.000000000 +0000
4+++ curl-7.20.0/libcurl.pc.in 2010-03-25 12:13:26.814051066 +0000
5@@ -35,6 +35,7 @@
6 URL: http://curl.haxx.se/
7 Description: Library to transfer files with ftp, http, etc.
8 Version: @VERSION@
9-Libs: -L${libdir} -lcurl @LIBS@
10-Libs.private: @LIBCURL_LIBS@ @LIBS@
11+Requires.private: @GNUTLS_REQUIRED@
12+Libs: -L${libdir} -lcurl
13+Libs.private: -ldl -lz
14 Cflags: -I${includedir}
15Index: curl-7.20.0/configure.ac
16===================================================================
17--- curl-7.20.0.orig/configure.ac 2010-02-04 21:41:46.000000000 +0000
18+++ curl-7.20.0/configure.ac 2010-03-25 12:12:18.673129001 +0000
19@@ -1668,6 +1668,7 @@
20 AC_SUBST(USE_GNUTLS, [1])
21 GNUTLS_ENABLED=1
22 USE_GNUTLS="yes"
23+ GNUTLS_REQUIRED="gnutls"
24 curl_ssl_msg="enabled (GnuTLS)"
25 ],
26 [
27@@ -1696,6 +1697,8 @@
28
29 fi dnl OPENSSL != 1
30
31+AC_SUBST(GNUTLS_REQUIRED)
32+
33 dnl ----------------------------------------------------
34 dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
35 dnl ----------------------------------------------------
diff --git a/meta/packages/curl/curl_7.21.0.bb b/meta/packages/curl/curl_7.21.0.bb
deleted file mode 100644
index 1e11222897..0000000000
--- a/meta/packages/curl/curl_7.21.0.bb
+++ /dev/null
@@ -1,54 +0,0 @@
1DESCRIPTION = "Command line tool and library for client-side URL transfers."
2HOMEPAGE = "http://curl.haxx.se/"
3BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
4SECTION = "console/network"
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://COPYING;beginline=7;md5=3a34942f4ae3fbf1a303160714e664ac"
7
8DEPENDS = "zlib gnutls"
9DEPENDS_virtclass-native = "zlib-native"
10DEPENDS_virtclass-nativesdk = "zlib-nativesdk"
11PR = "r0"
12
13SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
14 file://noldlibpath.patch \
15 file://pkgconfig_fix.patch"
16
17inherit autotools pkgconfig binconfig
18
19EXTRA_OECONF = "--with-zlib=${STAGING_LIBDIR}/../ \
20 --with-gnutls=${STAGING_BINDIR_CROSS}/ \
21 --without-ssl \
22 --without-libssh2 \
23 --with-random=/dev/urandom \
24 --without-libidn \
25 --enable-crypto-auth \
26 "
27
28do_configure_prepend() {
29 sed -i s:OPT_GNUTLS/bin:OPT_GNUTLS:g configure.ac
30}
31
32PACKAGES += "${PN}-certs libcurl libcurl-dev libcurl-doc"
33
34FILES_${PN} = "${bindir}/curl"
35
36FILES_${PN}-certs = "${datadir}/curl/curl-*"
37PACKAGE_ARCH_${PN}-certs = "all"
38
39FILES_${PN}-doc = "${mandir}/man1/curl.1"
40
41FILES_lib${PN} = "${libdir}/lib*.so.*"
42RRECOMMENDS_lib${PN} += "${PN}-certs"
43FILES_lib${PN}-dev = "${includedir} \
44 ${libdir}/lib*.so \
45 ${libdir}/lib*.a \
46 ${libdir}/lib*.la \
47 ${libdir}/pkgconfig \
48 ${datadir}/aclocal \
49 ${bindir}/*-config"
50
51FILES_lib${PN}-doc = "${mandir}/man3 \
52 ${mandir}/man1/curl-config.1"
53
54BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/packages/db/db/arm-thumb-mutex.patch b/meta/packages/db/db/arm-thumb-mutex.patch
deleted file mode 100644
index acd446fcd8..0000000000
--- a/meta/packages/db/db/arm-thumb-mutex.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1--- db-4.3.29-dist/../dbinc/mutex.h 2005-11-15 07:33:27.761042518 -0800
2+++ db-4.3.29-dist/../dbinc/mutex.h 2005-11-15 07:55:24.823920060 -0800
3@@ -470,6 +470,25 @@
4 #ifdef LOAD_ACTUAL_MUTEX_CODE
5 #define MUTEX_SET_TEST 1 /* gcc/arm: 0 is clear, 1 is set. */
6
7+#if defined __thumb__
8+#define MUTEX_SET(tsl) ({ \
9+ int __r, __p; \
10+ asm volatile( \
11+ ".align 2\n\t" \
12+ "bx pc\n\t" \
13+ "nop\n\t" \
14+ ".arm\n\t" \
15+ "swpb %0, %2, [%3]\n\t" \
16+ "eor %0, %0, #1\n\t" \
17+ "orr %1, pc, #1\n\t" \
18+ "bx %1\n\t" \
19+ ".force_thumb" \
20+ : "=&r" (__r), "=r" (__p) \
21+ : "r" (1), "r" (tsl) \
22+ ); \
23+ __r & 1; \
24+})
25+#else
26 #define MUTEX_SET(tsl) ({ \
27 int __r; \
28 asm volatile( \
29@@ -480,6 +499,7 @@
30 ); \
31 __r & 1; \
32 })
33+#endif
34
35 #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
36 #define MUTEX_INIT(tsl) MUTEX_UNSET(tsl)
diff --git a/meta/packages/db/db/configure_fixes.patch b/meta/packages/db/db/configure_fixes.patch
deleted file mode 100644
index 80aa0e7c1c..0000000000
--- a/meta/packages/db/db/configure_fixes.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1If LD is a binary name + parameters db will fail to work out its GNU ld
2and disable shared libraries. We don't want this.
3
4RP - 22/11/2007
5
6Index: dist/configure
7===================================================================
8--- dist.orig/configure 2007-11-23 00:47:27.000000000 +0000
9+++ dist/configure 2007-11-23 00:53:22.000000000 +0000
10@@ -5658,7 +5661,7 @@ if test "${lt_cv_prog_gnu_ld+set}" = set
11 echo $ECHO_N "(cached) $ECHO_C" >&6
12 else
13 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14-case `"$LD" -v 2>&1 </dev/null` in
15+case `$LD -v 2>&1 </dev/null` in
16 *GNU* | *'with BFD'*)
17 lt_cv_prog_gnu_ld=yes
18 ;;
diff --git a/meta/packages/db/db_4.2.52.bb b/meta/packages/db/db_4.2.52.bb
deleted file mode 100644
index b3ca493a01..0000000000
--- a/meta/packages/db/db_4.2.52.bb
+++ /dev/null
@@ -1,97 +0,0 @@
1# Version 4 of the Berkeley DB from Sleepycat
2#
3# At present this package only installs the DB code
4# itself (shared libraries, .a in the dev package),
5# documentation and headers.
6#
7# The headers have the same names as those as v3
8# of the DB, only one version can be used *for dev*
9# at once - DB3 and DB4 can both be installed on the
10# same system at the same time if really necessary.
11SECTION = "libs"
12DESCRIPTION = "Berkeley DB v4."
13HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
14LICENSE = "BSD Sleepycat"
15VIRTUAL_NAME = "virtual/db"
16VIRTUAL_NAME_virtclass-native = "virtual/db-native"
17
18CONFLICTS = "db3"
19CONFLICTS_virtclass-native = "db3-native"
20PR = "r8"
21
22SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz \
23 file://configure_fixes.patch;patch=1 "
24#SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5"
25#TODO SRC_URI += "file://arm-thumb-mutex.patch;patch=1"
26
27inherit autotools
28
29# Put virtual/db in any appropriate provider of a
30# relational database, use it as a dependency in
31# place of a specific db and use:
32#
33# PREFERRED_PROVIDER_virtual/db
34#
35# to select the correct db in the build (distro) .conf
36PROVIDES += "${VIRTUAL_NAME}"
37
38# bitbake isn't quite clever enough to deal with sleepycat,
39# the distribution sits in the expected directory, but all
40# the builds must occur from a sub-directory. The following
41# persuades bitbake to go to the right place
42S = "${WORKDIR}/db-${PV}/dist"
43B = "${WORKDIR}/db-${PV}/build_unix"
44
45# The executables go in a separate package - typically there
46# is no need to install these unless doing real database
47# management on the system.
48PACKAGES += " ${PN}-bin"
49
50# Package contents
51FILES_${PN} = "${libdir}/libdb-4*so*"
52FILES_${PN}-bin = "${bindir}/*"
53# The dev package has the .so link (as in db3) and the .a's -
54# it is therefore incompatible (cannot be installed at the
55# same time) as the db3 package
56FILES_${PN}-dev = "${includedir} ${libdir}/*"
57
58#configuration - set in local.conf to override
59DB4_CONFIG ?= " --disable-cryptography --disable-queue --disable-replication --disable-verify --enable-hash"
60EXTRA_OECONF = "${DB4_CONFIG}"
61
62# Override the MUTEX setting here, the POSIX library is
63# the default - "POSIX/pthreads/library".
64# Don't ignore the nice SWP instruction on the ARM:
65# These enable the ARM assembler mutex code, this won't
66# work with thumb compilation...
67ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
68MUTEX = ""
69MUTEX_arm = "${ARM_MUTEX}"
70MUTEX_armeb = "${ARM_MUTEX}"
71EXTRA_OECONF += "${MUTEX}"
72
73ARM_INSTRUCTION_SET = "arm"
74
75# Cancel the site stuff - it's set for db3 and destroys the
76# configure.
77CONFIG_SITE = ""
78do_configure() {
79 rm -f ${S}/config.sub
80 cp ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/config.sub
81 oe_runconf
82}
83
84do_install_append() {
85 # The docs end up in /usr/docs - not right.
86 if test -d "${D}/${prefix}/docs"
87 then
88 mkdir -p "${D}/${datadir}"
89 test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
90 mv "${D}/${prefix}/docs" "${D}/${docdir}"
91 fi
92}
93
94# The db package contains symlinks that trip up insane
95INSANE_SKIP_db = "1"
96
97BBCLASSEXTEND = "native"
diff --git a/meta/packages/db/db_4.3.29.bb b/meta/packages/db/db_4.3.29.bb
deleted file mode 100644
index 04a6680f07..0000000000
--- a/meta/packages/db/db_4.3.29.bb
+++ /dev/null
@@ -1,89 +0,0 @@
1# Has issues with eds
2DEFAULT_PREFERENCE = "-1"
3
4# Version 4 of the Berkeley DB from Sleepycat
5#
6# At present this package only installs the DB code
7# itself (shared libraries, .a in the dev package),
8# documentation and headers.
9#
10# The headers have the same names as those as v3
11# of the DB, only one version can be used *for dev*
12# at once - DB3 and DB4 can both be installed on the
13# same system at the same time if really necessary.
14SECTION = "libs"
15DESCRIPTION = "Berkeley DB v4."
16HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
17LICENSE = "BSD Sleepycat"
18VIRTUAL_NAME ?= "virtual/db"
19CONFLICTS = "db3"
20PR = "r8"
21
22SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
23#SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5"
24SRC_URI += "file://arm-thumb-mutex.patch;patch=1"
25
26inherit autotools
27
28# Put virtual/db in any appropriate provider of a
29# relational database, use it as a dependency in
30# place of a specific db and use:
31#
32# PREFERRED_PROVIDER_virtual/db
33#
34# to select the correct db in the build (distro) .conf
35PROVIDES += "${VIRTUAL_NAME}"
36
37# bitbake isn't quite clever enough to deal with sleepycat,
38# the distribution sits in the expected directory, but all
39# the builds must occur from a sub-directory. The following
40# persuades bitbake to go to the right place
41S = "${WORKDIR}/db-${PV}/dist"
42B = "${WORKDIR}/db-${PV}/build_unix"
43
44# The executables go in a separate package - typically there
45# is no need to install these unless doing real database
46# management on the system.
47PACKAGES += " ${PN}-bin"
48
49# Package contents
50FILES_${PN} = "${libdir}/libdb-4*so*"
51FILES_${PN}-bin = "${bindir}/*"
52# The dev package has the .so link (as in db3) and the .a's -
53# it is therefore incompatible (cannot be installed at the
54# same time) as the db3 package
55FILES_${PN}-dev = "${includedir} ${libdir}/*"
56
57#configuration - set in local.conf to override
58# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
59DB4_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-statistics --disable-verify --enable-compat185"
60
61EXTRA_OECONF = "${DB4_CONFIG}"
62
63# Override the MUTEX setting here, the POSIX library is
64# the default - "POSIX/pthreads/library".
65# Don't ignore the nice SWP instruction on the ARM:
66# These enable the ARM assembler mutex code, this won't
67# work with thumb compilation...
68ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
69MUTEX = ""
70MUTEX_arm = "${ARM_MUTEX}"
71MUTEX_armeb = "${ARM_MUTEX}"
72EXTRA_OECONF += "${MUTEX}"
73
74# Cancel the site stuff - it's set for db3 and destroys the
75# configure.
76CONFIG_SITE = ""
77do_configure() {
78 oe_runconf
79}
80
81do_install_append() {
82 # The docs end up in /usr/docs - not right.
83 if test -d "${D}/${prefix}/docs"
84 then
85 mkdir -p "${D}/${datadir}"
86 test ! -d "${D}/${docdir}" || rmdir "${D}/${docdir}"
87 mv "${D}/${prefix}/docs" "${D}/${docdir}"
88 fi
89}
diff --git a/meta/packages/devicekit/devicekit-power_014.bb b/meta/packages/devicekit/devicekit-power_014.bb
deleted file mode 100644
index f69a060ef2..0000000000
--- a/meta/packages/devicekit/devicekit-power_014.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1DESCRIPTION = "Devicekit power"
2LICENSE = "GPLv2"
3DEPENDS = "devicekit glib-2.0 dbus-glib polkit"
4
5SRC_URI = "http://hal.freedesktop.org/releases/DeviceKit-power-${PV}.tar.gz"
6S = "${WORKDIR}/DeviceKit-power-${PV}"
7
8inherit autotools pkgconfig
9
10do_configure_prepend() {
11 sed -i -e s:-nonet:\:g ${S}/doc/man/Makefile.am
12}
13
14EXTRA_OECONF = "--with-backend=linux"
15
16FILES_${PN} += "${datadir}/dbus-1/ \
17 ${datadir}/PolicyKit \
18 ${base_libdir}/udev/* \
19 "
20
21FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
diff --git a/meta/packages/devicekit/devicekit/volatile b/meta/packages/devicekit/devicekit/volatile
deleted file mode 100644
index 1e399642e0..0000000000
--- a/meta/packages/devicekit/devicekit/volatile
+++ /dev/null
@@ -1 +0,0 @@
1d root root 0700 /var/run/devkit none
diff --git a/meta/packages/devicekit/devicekit_003.bb b/meta/packages/devicekit/devicekit_003.bb
deleted file mode 100644
index af812935cd..0000000000
--- a/meta/packages/devicekit/devicekit_003.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "DeviceKit is a simple system service that a) can enumerate devices; b) emits signals when devices are added removed; c) provides a way to merge device information / quirks onto devices."
2LICENSE = "GPLv2"
3DEPENDS = "udev dbus-glib glib-2.0"
4
5PR = "r1"
6
7SRC_URI = "http://hal.freedesktop.org/releases/DeviceKit-${PV}.tar.gz"
8S = "${WORKDIR}/DeviceKit-${PV}"
9
10do_configure_prepend() {
11 sed -i -e s:-nonet:\:g ${S}/doc/man/Makefile.am
12}
13
14inherit autotools
15
16FILES_${PN} += "${datadir}/dbus-1/"
diff --git a/meta/packages/devicekit/devicekit_git.bb b/meta/packages/devicekit/devicekit_git.bb
deleted file mode 100644
index 74b639f6c1..0000000000
--- a/meta/packages/devicekit/devicekit_git.bb
+++ /dev/null
@@ -1,35 +0,0 @@
1LICENSE = "GPL"
2DEPENDS = "dbus-glib"
3
4SRC_URI = "git://anongit.freedesktop.org/DeviceKit/DeviceKit;protocol=git \
5 file://volatile"
6
7PV = "002+git${SRCREV}"
8PR = "r2"
9SRCREV = "014d168ba4bf40c9bae487bacff8bf2aa054b5f6"
10
11S = "${WORKDIR}/git"
12
13EXTRA_OECONF = "--disable-man-pages"
14
15inherit autotools pkgconfig
16
17do_install_append() {
18 install -d ${D}/etc/default/volatiles
19 install -m 0644 ${WORKDIR}/volatile ${D}/etc/default/volatiles/devicekit
20}
21
22pkg_postinst_devicekit () {
23 # can't do this offline
24 if [ "x$D" != "x" ]; then
25 exit 1
26 fi
27
28 DBUSPID=`pidof dbus-daemon`
29
30 if [ "x$DBUSPID" != "x" ]; then
31 /etc/init.d/dbus-1 reload
32 fi
33}
34
35FILES_${PN} += "${datadir}/dbus-1/"
diff --git a/meta/packages/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch b/meta/packages/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch
deleted file mode 100644
index 579d72f484..0000000000
--- a/meta/packages/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch
+++ /dev/null
@@ -1,84 +0,0 @@
1--- client/scripts/bsdos
2+++ client/scripts/bsdos
3@@ -47,6 +47,11 @@
4 . /etc/dhcp/dhclient-exit-hooks
5 fi
6 # probably should do something with exit status of the local script
7+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
8+ dbus-send --system --dest=com.redhat.dhcp \
9+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
10+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
11+ fi
12 exit $exit_status
13 }
14
15--- client/scripts/freebsd
16+++ client/scripts/freebsd
17@@ -57,6 +57,11 @@
18 . /etc/dhcp/dhclient-exit-hooks
19 fi
20 # probably should do something with exit status of the local script
21+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
22+ dbus-send --system --dest=com.redhat.dhcp \
23+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
24+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
25+ fi
26 exit $exit_status
27 }
28
29--- client/scripts/linux
30+++ client/scripts/linux
31@@ -69,6 +69,11 @@
32 . /etc/dhcp/dhclient-exit-hooks
33 fi
34 # probably should do something with exit status of the local script
35+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
36+ dbus-send --system --dest=com.redhat.dhcp \
37+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
38+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
39+ fi
40 exit $exit_status
41 }
42
43--- client/scripts/netbsd
44+++ client/scripts/netbsd
45@@ -47,6 +47,11 @@
46 . /etc/dhcp/dhclient-exit-hooks
47 fi
48 # probably should do something with exit status of the local script
49+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
50+ dbus-send --system --dest=com.redhat.dhcp \
51+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
52+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
53+ fi
54 exit $exit_status
55 }
56
57--- client/scripts/openbsd
58+++ client/scripts/openbsd
59@@ -47,6 +47,11 @@
60 . /etc/dhcp/dhclient-exit-hooks
61 fi
62 # probably should do something with exit status of the local script
63+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
64+ dbus-send --system --dest=com.redhat.dhcp \
65+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
66+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
67+ fi
68 exit $exit_status
69 }
70
71--- client/scripts/solaris
72+++ client/scripts/solaris
73@@ -47,6 +47,11 @@
74 . /etc/dhcp/dhclient-exit-hooks
75 fi
76 # probably should do something with exit status of the local script
77+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
78+ dbus-send --system --dest=com.redhat.dhcp \
79+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
80+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
81+ fi
82 exit $exit_status
83 }
84
diff --git a/meta/packages/dhcp/dhcp-4.1.1-P1/fix-client-path.patch b/meta/packages/dhcp/dhcp-4.1.1-P1/fix-client-path.patch
deleted file mode 100644
index f6a7be1d81..0000000000
--- a/meta/packages/dhcp/dhcp-4.1.1-P1/fix-client-path.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1CLIENT_PATH is the only environment when executing dhclient-script,
2without this patch, dhclient-script won't run properly because it
3invokes ifconfig and route
4
57/28/2010 - qhe
6
7diff -ru dhcp-4.1.1-P1.orig//client/Makefile.am dhcp-4.1.1-P1/client/Makefile.am
8--- dhcp-4.1.1-P1.orig//client/Makefile.am 2010-07-29 13:20:05.000000000 +0800
9+++ dhcp-4.1.1-P1/client/Makefile.am 2010-07-29 13:28:14.000000000 +0800
10@@ -10,9 +10,9 @@
11 EXTRA_DIST = $(man_MANS)
12
13 dhclient.o: dhclient.c
14- $(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
15+ $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):$(base_sbindir):$(bindir):$(base_bindir)"' \
16 -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
17
18 dhc6.o: dhc6.c
19- $(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
20+ $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):$(base_sbindir):$(bindir):$(base_bindir)"' \
21 -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
diff --git a/meta/packages/dhcp/dhcp-4.1.1-P1/fixincludes.patch b/meta/packages/dhcp/dhcp-4.1.1-P1/fixincludes.patch
deleted file mode 100644
index 91d99cce22..0000000000
--- a/meta/packages/dhcp/dhcp-4.1.1-P1/fixincludes.patch
+++ /dev/null
@@ -1,10 +0,0 @@
1--- dhcp-3.0.2/common/tr.c~compile 2005-10-13 14:23:37.000000000 +0200
2+++ dhcp-3.0.2/common/tr.c 2005-10-13 14:23:45.000000000 +0200
3@@ -39,6 +39,7 @@
4 #include "includes/netinet/udp.h"
5 #include "includes/netinet/if_ether.h"
6 #include "netinet/if_tr.h"
7+#include <asm/types.h>
8 #include <sys/time.h>
9
10 /*
diff --git a/meta/packages/dhcp/dhcp-4.1.1-P1/noattrmode.patch b/meta/packages/dhcp/dhcp-4.1.1-P1/noattrmode.patch
deleted file mode 100644
index 5c766d6c06..0000000000
--- a/meta/packages/dhcp/dhcp-4.1.1-P1/noattrmode.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- dhcp-3.0.1/includes/dhcpd.h~compile
7+++ dhcp-3.0.1/includes/dhcpd.h
8@@ -306,9 +306,9 @@
9 # define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
10 UNICAST_BROADCAST_HACK)
11
12- binding_state_t __attribute__ ((mode (__byte__))) binding_state;
13- binding_state_t __attribute__ ((mode (__byte__))) next_binding_state;
14- binding_state_t __attribute__ ((mode (__byte__))) desired_binding_state;
15+ binding_state_t binding_state;
16+ binding_state_t next_binding_state;
17+ binding_state_t desired_binding_state;
18
19 struct lease_state *state;
20
diff --git a/meta/packages/dhcp/dhcp-4.1.1-P1/site.h b/meta/packages/dhcp/dhcp-4.1.1-P1/site.h
deleted file mode 100644
index 2289554ef3..0000000000
--- a/meta/packages/dhcp/dhcp-4.1.1-P1/site.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * define config file location in ${S}/includes/site.h
3 * still need to take care of installation path (${sysconfdir}/dhcpd.conf)
4 *
5 * 7/22/2010 - qhe
6 */
7
8/* Define this if you want DNS update functionality to be available. */
9
10#define NSUPDATE
11
12/* Define this if you aren't debugging and you want to save memory
13 (potentially a _lot_ of memory) by allocating leases in chunks rather
14 than one at a time. */
15
16#define COMPACT_LEASES
17
18
19/* local */
20#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
21#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
diff --git a/meta/packages/dhcp/dhcp3.inc b/meta/packages/dhcp/dhcp3.inc
deleted file mode 100644
index 3f68f452d2..0000000000
--- a/meta/packages/dhcp/dhcp3.inc
+++ /dev/null
@@ -1,53 +0,0 @@
1SECTION = "console/network"
2DESCRIPTION = "Internet Software Consortium DHCP package"
3HOMEPAGE = "http://www.isc.org/"
4
5LICENSE = "ISC"
6LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=bb6fd41f5895b67088ebea61ad365e74"
7
8SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-${PV}.tar.gz \
9 file://init-relay file://default-relay \
10 file://init-server file://default-server \
11 file://dhclient.conf file://dhcpd.conf"
12
13inherit autotools
14
15TARGET_CFLAGS += "-D_GNU_SOURCE"
16
17do_compile() {
18 make RANLIB=${RANLIB} PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp/dhcpd.leases\" \
19 -D_PATH_DHCLIENT_DB=\"/var/lib/dhcp/dhclient.leases\" \
20 -D_PATH_DHCLIENT_SCRIPT=\"/sbin/dhclient-script\" \
21 -D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \
22 -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"'
23}
24
25do_install() {
26 make -e DESTDIR=${D} USRMANDIR=${mandir}/man1 ADMMANDIR=${mandir}/man8 FFMANDIR=${mandir}/man5 LIBMANDIR=${mandir}/man3 LIBDIR=${libdir} INCDIR=${includedir} install
27 install -d ${D}${sysconfdir}/init.d
28 install -d ${D}${sysconfdir}/default
29 install -d ${D}${sysconfdir}/dhcp
30 install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
31 install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
32 install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server
33 install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
34 install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
35 install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
36 install -d ${D}${base_sbindir}/
37 mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
38 install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
39}
40
41PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell"
42FILES_${PN} = ""
43FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
44FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
45
46FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
47RDEPENDS_dhcp-client = "bash"
48
49FILES_dhcp-omshell = "${bindir}/omshell"
50
51CONFFILES_dhcp-server_nylon = "/etc/dhcp/dhcpd.conf"
52CONFFILES_dhcp-relay_nylon = "/etc/default/dhcp-relay"
53CONFFILES_dhcp-client_nylon = "/etc/dhcp/dhclient.conf"
diff --git a/meta/packages/dhcp/dhcp4.inc b/meta/packages/dhcp/dhcp4.inc
deleted file mode 100644
index 7652b948f0..0000000000
--- a/meta/packages/dhcp/dhcp4.inc
+++ /dev/null
@@ -1,57 +0,0 @@
1SECTION = "console/network"
2DESCRIPTION = "Internet Software Consortium DHCP package"
3HOMEPAGE = "http://www.isc.org/"
4
5LICENSE = "ISC"
6LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=bb6fd41f5895b67088ebea61ad365e74"
7
8SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-${PV}.tar.gz \
9 file://site.h \
10 file://init-relay file://default-relay \
11 file://init-server file://default-server \
12 file://dhclient.conf file://dhcpd.conf"
13
14inherit autotools
15
16TARGET_CFLAGS += "-D_GNU_SOURCE"
17EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
18 --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \
19 --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
20 --with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases"
21
22do_compile_prepend () {
23 cp -f ${WORKDIR}/site.h ${S}/includes
24}
25
26do_install_append () {
27 install -d ${D}${sysconfdir}/init.d
28 install -d ${D}${sysconfdir}/default
29 install -d ${D}${sysconfdir}/dhcp
30 install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
31 install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
32 install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server
33 install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
34
35 rm -f ${D}${sysconfdir}/dhclient.conf
36 rm -f ${D}${sysconfdir}/dhcpd.conf
37 install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
38 install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
39
40 install -d ${D}${base_sbindir}/
41 mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
42 install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
43}
44
45PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell"
46FILES_${PN} = ""
47FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
48FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
49
50FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
51RDEPENDS_dhcp-client = "bash"
52
53FILES_dhcp-omshell = "${bindir}/omshell"
54
55CONFFILES_dhcp-server_nylon = "/etc/dhcp/dhcpd.conf"
56CONFFILES_dhcp-relay_nylon = "/etc/default/dhcp-relay"
57CONFFILES_dhcp-client_nylon = "/etc/dhcp/dhclient.conf"
diff --git a/meta/packages/dhcp/dhcp_4.1.1-P1.bb b/meta/packages/dhcp/dhcp_4.1.1-P1.bb
deleted file mode 100644
index e9759de56f..0000000000
--- a/meta/packages/dhcp/dhcp_4.1.1-P1.bb
+++ /dev/null
@@ -1,7 +0,0 @@
1require dhcp4.inc
2
3PR = "r1"
4
5SRC_URI += "file://fixincludes.patch \
6 file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
7 file://fix-client-path.patch"
diff --git a/meta/packages/dhcp/files/default-relay b/meta/packages/dhcp/files/default-relay
deleted file mode 100644
index 59249db283..0000000000
--- a/meta/packages/dhcp/files/default-relay
+++ /dev/null
@@ -1,12 +0,0 @@
1# Defaults for dhcp-relay initscript
2# sourced by /etc/init.d/dhcp-relay
3
4# What servers should the DHCP relay forward requests to?
5# e.g: SERVERS="192.168.0.1"
6SERVERS=""
7
8# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests?
9INTERFACES=""
10
11# Additional options that are passed to the DHCP relay daemon?
12OPTIONS="" \ No newline at end of file
diff --git a/meta/packages/dhcp/files/default-server b/meta/packages/dhcp/files/default-server
deleted file mode 100644
index 0385d16992..0000000000
--- a/meta/packages/dhcp/files/default-server
+++ /dev/null
@@ -1,7 +0,0 @@
1# Defaults for dhcp initscript
2# sourced by /etc/init.d/dhcp-server
3# installed at /etc/default/dhcp-server by the maintainer scripts
4
5# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
6# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
7INTERFACES=""
diff --git a/meta/packages/dhcp/files/dhclient.conf b/meta/packages/dhcp/files/dhclient.conf
deleted file mode 100644
index 0e6dcf96c2..0000000000
--- a/meta/packages/dhcp/files/dhclient.conf
+++ /dev/null
@@ -1,50 +0,0 @@
1# Configuration file for /sbin/dhclient, which is included in Debian's
2# dhcp3-client package.
3#
4# This is a sample configuration file for dhclient. See dhclient.conf's
5# man page for more information about the syntax of this file
6# and a more comprehensive list of the parameters understood by
7# dhclient.
8#
9# Normally, if the DHCP server provides reasonable information and does
10# not leave anything out (like the domain name, for example), then
11# few changes must be made to this file, if any.
12#
13
14#send host-name "andare.fugue.com";
15#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
16#send dhcp-lease-time 3600;
17#supersede domain-name "fugue.com home.vix.com";
18#prepend domain-name-servers 127.0.0.1;
19request subnet-mask, broadcast-address, time-offset, routers,
20 domain-name, domain-name-servers, host-name,
21 netbios-name-servers, netbios-scope;
22#require subnet-mask, domain-name-servers;
23#timeout 60;
24#retry 60;
25#reboot 10;
26#select-timeout 5;
27#initial-interval 2;
28#script "/etc/dhcp3/dhclient-script";
29#media "-link0 -link1 -link2", "link0 link1";
30#reject 192.33.137.209;
31
32#alias {
33# interface "eth0";
34# fixed-address 192.5.5.213;
35# option subnet-mask 255.255.255.255;
36#}
37
38#lease {
39# interface "eth0";
40# fixed-address 192.33.137.200;
41# medium "link0 link1";
42# option host-name "andare.swiftmedia.com";
43# option subnet-mask 255.255.255.0;
44# option broadcast-address 192.33.137.255;
45# option routers 192.33.137.250;
46# option domain-name-servers 127.0.0.1;
47# renew 2 2000/1/12 00:00:01;
48# rebind 2 2000/1/12 00:00:01;
49# expire 2 2000/1/12 00:00:01;
50#}
diff --git a/meta/packages/dhcp/files/dhcpd.conf b/meta/packages/dhcp/files/dhcpd.conf
deleted file mode 100644
index 0001c0f00e..0000000000
--- a/meta/packages/dhcp/files/dhcpd.conf
+++ /dev/null
@@ -1,108 +0,0 @@
1#
2# Sample configuration file for ISC dhcpd for Debian
3#
4# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
5#
6
7# The ddns-updates-style parameter controls whether or not the server will
8# attempt to do a DNS update when a lease is confirmed. We default to the
9# behavior of the version 2 packages ('none', since DHCP v2 didn't
10# have support for DDNS.)
11ddns-update-style none;
12
13# option definitions common to all supported networks...
14option domain-name "example.org";
15option domain-name-servers ns1.example.org, ns2.example.org;
16
17default-lease-time 600;
18max-lease-time 7200;
19
20# If this DHCP server is the official DHCP server for the local
21# network, the authoritative directive should be uncommented.
22#authoritative;
23
24# Use this to send dhcp log messages to a different log file (you also
25# have to hack syslog.conf to complete the redirection).
26log-facility local7;
27
28# No service will be given on this subnet, but declaring it helps the
29# DHCP server to understand the network topology.
30
31#subnet 10.152.187.0 netmask 255.255.255.0 {
32#}
33
34# This is a very basic subnet declaration.
35
36#subnet 10.254.239.0 netmask 255.255.255.224 {
37# range 10.254.239.10 10.254.239.20;
38# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
39#}
40
41# This declaration allows BOOTP clients to get dynamic addresses,
42# which we don't really recommend.
43
44#subnet 10.254.239.32 netmask 255.255.255.224 {
45# range dynamic-bootp 10.254.239.40 10.254.239.60;
46# option broadcast-address 10.254.239.31;
47# option routers rtr-239-32-1.example.org;
48#}
49
50# A slightly different configuration for an internal subnet.
51#subnet 10.5.5.0 netmask 255.255.255.224 {
52# range 10.5.5.26 10.5.5.30;
53# option domain-name-servers ns1.internal.example.org;
54# option domain-name "internal.example.org";
55# option routers 10.5.5.1;
56# option broadcast-address 10.5.5.31;
57# default-lease-time 600;
58# max-lease-time 7200;
59#}
60
61# Hosts which require special configuration options can be listed in
62# host statements. If no address is specified, the address will be
63# allocated dynamically (if possible), but the host-specific information
64# will still come from the host declaration.
65
66#host passacaglia {
67# hardware ethernet 0:0:c0:5d:bd:95;
68# filename "vmunix.passacaglia";
69# server-name "toccata.fugue.com";
70#}
71
72# Fixed IP addresses can also be specified for hosts. These addresses
73# should not also be listed as being available for dynamic assignment.
74# Hosts for which fixed IP addresses have been specified can boot using
75# BOOTP or DHCP. Hosts for which no fixed address is specified can only
76# be booted with DHCP, unless there is an address range on the subnet
77# to which a BOOTP client is connected which has the dynamic-bootp flag
78# set.
79#host fantasia {
80# hardware ethernet 08:00:07:26:c0:a5;
81# fixed-address fantasia.fugue.com;
82#}
83
84# You can declare a class of clients and then do address allocation
85# based on that. The example below shows a case where all clients
86# in a certain class get addresses on the 10.17.224/24 subnet, and all
87# other clients get addresses on the 10.0.29/24 subnet.
88
89#class "foo" {
90# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
91#}
92
93#shared-network 224-29 {
94# subnet 10.17.224.0 netmask 255.255.255.0 {
95# option routers rtr-224.example.org;
96# }
97# subnet 10.0.29.0 netmask 255.255.255.0 {
98# option routers rtr-29.example.org;
99# }
100# pool {
101# allow members of "foo";
102# range 10.17.224.10 10.17.224.250;
103# }
104# pool {
105# deny members of "foo";
106# range 10.0.29.10 10.0.29.230;
107# }
108#}
diff --git a/meta/packages/dhcp/files/init-relay b/meta/packages/dhcp/files/init-relay
deleted file mode 100644
index 019a7e84cf..0000000000
--- a/meta/packages/dhcp/files/init-relay
+++ /dev/null
@@ -1,44 +0,0 @@
1#!/bin/sh
2#
3# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $
4#
5
6# It is not safe to start if we don't have a default configuration...
7if [ ! -f /etc/default/dhcp-relay ]; then
8 echo "/etc/default/dhcp-relay does not exist! - Aborting..."
9 echo "create this file to fix the problem."
10 exit 1
11fi
12
13# Read init script configuration (interfaces the daemon should listen on
14# and the DHCP server we should forward requests to.)
15. /etc/default/dhcp-relay
16
17# Build command line for interfaces (will be passed to dhrelay below.)
18IFCMD=""
19if test "$INTERFACES" != ""; then
20 for I in $INTERFACES; do
21 IFCMD=${IFCMD}"-i "${I}" "
22 done
23fi
24
25DHCRELAYPID=/var/run/dhcrelay.pid
26
27case "$1" in
28 start)
29 start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
30 ;;
31 stop)
32 start-stop-daemon -K -x /usr/sbin/dhcrelay
33 ;;
34 restart | force-reload)
35 $0 stop
36 sleep 2
37 $0 start
38 ;;
39 *)
40 echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}"
41 exit 1
42esac
43
44exit 0
diff --git a/meta/packages/dhcp/files/init-server b/meta/packages/dhcp/files/init-server
deleted file mode 100644
index 34c20852b9..0000000000
--- a/meta/packages/dhcp/files/init-server
+++ /dev/null
@@ -1,44 +0,0 @@
1#!/bin/sh
2#
3# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
4#
5
6test -f /usr/sbin/dhcpd || exit 0
7
8# It is not safe to start if we don't have a default configuration...
9if [ ! -f /etc/default/dhcp-server ]; then
10 echo "/etc/default/dhcp-server does not exist! - Aborting..."
11 exit 0
12fi
13
14# Read init script configuration (so far only interfaces the daemon
15# should listen on.)
16. /etc/default/dhcp-server
17
18case "$1" in
19 start)
20 echo -n "Starting DHCP server: "
21 test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
22 test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases
23 start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
24 echo "."
25 ;;
26 stop)
27 echo -n "Stopping DHCP server: dhcpd3"
28 start-stop-daemon -K -x /usr/sbin/dhcpd
29 echo "."
30 ;;
31 restart | force-reload)
32 $0 stop
33 sleep 2
34 $0 start
35 if [ "$?" != "0" ]; then
36 exit 1
37 fi
38 ;;
39 *)
40 echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}"
41 exit 1
42esac
43
44exit 0
diff --git a/meta/packages/diffutils/diffutils_2.8.1.bb b/meta/packages/diffutils/diffutils_2.8.1.bb
deleted file mode 100644
index 86b46aafec..0000000000
--- a/meta/packages/diffutils/diffutils_2.8.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
1SECTION = "base"
2LICENSE = "GPL"
3DESCRIPTION = "Diffutils contains the GNU diff, diff3, \
4sdiff, and cmp utilities. These programs are usually \
5used for creating patch files."
6PR = "r3"
7
8SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz"
9
10inherit autotools update-alternatives gettext
11
12# diffutils assumes non-glibc compilation with uclibc and
13# this causes it to generate its own implementations of
14# standard functionality. regex.c actually breaks compilation
15# because it uses __mempcpy, there are other things (TBD:
16# see diffutils.mk in buildroot)
17EXTRA_OECONF_linux-uclibc = "--without-included-regex"
18
19do_install_append () {
20 mv ${D}${bindir}/diff ${D}${bindir}/diff.${PN}
21 mv ${D}${bindir}/cmp ${D}${bindir}/cmp.${PN}
22}
23
24ALTERNATIVE_NAME = "diff"
25ALTERNATIVE_PATH = "diff.${PN}"
26ALTERNATIVE_PRIORITY = "100"
27
28pkg_postinst_${PN} () {
29
30update-alternatives --install /usr/bin/cmp cmp cmp.diffutils 100
31
32}
33
34pkg_postrm_${PN} () {
35
36update-alternatives --remove cmp cmp.diffutils
37
38}
diff --git a/meta/packages/enchant/enchant_1.6.0.bb b/meta/packages/enchant/enchant_1.6.0.bb
deleted file mode 100644
index 92b4686545..0000000000
--- a/meta/packages/enchant/enchant_1.6.0.bb
+++ /dev/null
@@ -1,22 +0,0 @@
1DESCRIPTION = "Enchant Spell checker API Library"
2SECTION = "libs"
3HOMEPAGE = "http://www.abisource.com/projects/enchant/"
4BUGTRACKER = "http://bugzilla.abisource.com/enter_bug.cgi?product=Enchant"
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=dfcbabf9131dc9a95febef6753a2958b \
7 file://src/enchant.h;beginline=1;endline=29;md5=8d881caa1d37523567e1d8f726675a18"
8DEPENDS = "aspell glib-2.0"
9RDEPENDS = "aspell"
10
11inherit autotools pkgconfig
12
13PR = "r0"
14
15SRC_URI = "http://www.abisource.com/downloads/enchant/${PV}/enchant-${PV}.tar.gz"
16
17EXTRA_OECONF = "--with-aspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-aspell --disable-binreloc"
18
19FILES_${PN} = "${bindir} ${libdir}/*${SOLIBS} ${datadir}/${PN} ${libdir}/${PN}/*.so"
20FILES_${PN}-dev += "${libdir}/${PN}/*{SOLIBSDEV} ${libdir}/${PN}/*.la ${libdir}/${PN}/*.a"
21
22export CXXFLAGS += " -L${STAGING_LIBDIR} -lstdc++ "
diff --git a/meta/packages/exmap-console/exmap-console.inc b/meta/packages/exmap-console/exmap-console.inc
deleted file mode 100644
index efbd79fce1..0000000000
--- a/meta/packages/exmap-console/exmap-console.inc
+++ /dev/null
@@ -1,59 +0,0 @@
1DESCRIPTION = "Console based version of exmap, a memory usage analysis tool"
2HOMEPAGE = "http://projects.o-hand.com/exmap-console"
3SECTION = "devel"
4LICENSE = "GPL"
5DEPENDS = "virtual/kernel readline glib-2.0"
6
7SRC_URI = "http://projects.o-hand.com/sources/exmap-console/exmap-console-${PV}.tgz"
8
9TEMPPACKAGE_ARCH := "${PACKAGE_ARCH}"
10
11inherit module-base
12inherit autotools
13
14PACKAGE_ARCH = "${TEMPPACKAGE_ARCH}"
15
16PACKAGES =+ "exmap-server kernel-module-exmap"
17
18FILES_exmap-console = "${bindir}/exmap ${bindir}/exmapd"
19RDEPENDS_exmap-console += "kernel-module-exmap"
20
21FILES_exmap-server = "${bindir}/exmapserver"
22RDEPENDS_exmap-server += "kernel-module-exmap"
23
24FILES_kernel-module-exmap = "${base_libdir}"
25PACKAGE_ARCH_kernel-module-exmap = "${MACHINE_ARCH}"
26RDEPENDS_kernel-module-exmap += "update-modules kernel-image-${KERNEL_VERSION}"
27
28S = "${WORKDIR}/exmap-console-${PV}"
29
30export MODULE_PATH="${D}${base_libdir}/modules/${KERNEL_VERSION}"
31
32do_compile() {
33 cd ${S}/src
34 make
35
36 cd ${S}/kernel
37 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
38 oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
39 KERNEL_SRC=${STAGING_KERNEL_DIR} \
40 KERNEL_VERSION=${KERNEL_VERSION} \
41 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
42 ${MAKE_TARGETS}
43}
44
45do_install() {
46 oe_runmake 'DESTDIR=${D}' 'DEPMOD=/bin/true' install
47}
48
49pkg_postinst_append_kernel-module-exmap () {
50 if [ -n "$D" ]; then
51 exit 1
52 fi
53 depmod -a
54 update-modules || true
55}
56
57pkg_postrm_append_kernel-module-exmap () {
58 update-modules || true
59}
diff --git a/meta/packages/exmap-console/exmap-console_0.4.1.bb b/meta/packages/exmap-console/exmap-console_0.4.1.bb
deleted file mode 100644
index c76c5c3b4c..0000000000
--- a/meta/packages/exmap-console/exmap-console_0.4.1.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require exmap-console.inc
2
3PR = "r8"
diff --git a/meta/packages/exmap-console/exmap-console_svn.bb b/meta/packages/exmap-console/exmap-console_svn.bb
deleted file mode 100644
index ce222854e2..0000000000
--- a/meta/packages/exmap-console/exmap-console_svn.bb
+++ /dev/null
@@ -1,8 +0,0 @@
1require exmap-console.inc
2
3PV = "0.4+svnr${SRCREV}"
4PR = "r5"
5
6SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=exmap-console;proto=http"
7
8S = "${WORKDIR}/exmap-console"
diff --git a/meta/packages/farsight/farsight2_0.0.9.bb b/meta/packages/farsight/farsight2_0.0.9.bb
deleted file mode 100644
index 06c85f1cf0..0000000000
--- a/meta/packages/farsight/farsight2_0.0.9.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1DESCRIPTION = "FarSight is an audio/video conferencing framework specifically designed for Instant Messengers."
2HOMEPAGE = "http://farsight.sf.net"
3SRC_URI = "http://farsight.freedesktop.org/releases/farsight2/${P}.tar.gz"
4
5DEPENDS = "libnice glib-2.0 libxml2 zlib dbus gstreamer gst-plugins-base"
6
7inherit autotools
8AUTOTOOLS_STAGE_PKGCONFIG = "1"
9
10PR = "r1"
11
12EXTRA_OECONF = " \
13 --disable-debug \
14 --disable-gtk-doc \
15 --disable-python \
16"
17
18FILES_${PN} += "${libdir}/*/*.so"
19FILES_${PN}-dev += "${libdir}/f*/*a ${libdir}/g*/*a"
20FILES_${PN}-dbg += "${libdir}/*/.debug"
21
22
23
24
diff --git a/meta/packages/farsight/libnice_0.0.6.bb b/meta/packages/farsight/libnice_0.0.6.bb
deleted file mode 100644
index 809b691af7..0000000000
--- a/meta/packages/farsight/libnice_0.0.6.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1DESCRIPTION = "Libnice is an implementation of the IETF's draft Interactice Connectivity Establishment standard (ICE)."
2HOMEPAGE = "http://nice.freedesktop.org/wiki/"
3SRC_URI = "http://nice.freedesktop.org/releases/libnice-${PV}.tar.gz"
4
5LICENSE = "LGPL/MPL"
6DEPENDS = "glib-2.0 gstreamer"
7
8inherit autotools
9AUTOTOOLS_STAGE_PKGCONFIG = "1"
10
11FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
12FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*a"
13FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
14
15do_compile_append() {
16 for i in $(find ${S} -name "*.pc") ; do
17 sed -i -e s:${STAGING_DIR_TARGET}::g \
18 -e s:/${TARGET_SYS}::g \
19 $i
20 done
21}
22
23
diff --git a/meta/packages/findutils/findutils-4.2.31/gnulib-extension.patch b/meta/packages/findutils/findutils-4.2.31/gnulib-extension.patch
deleted file mode 100644
index 2bc54e9290..0000000000
--- a/meta/packages/findutils/findutils-4.2.31/gnulib-extension.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE
2
3against 4.2.31
407/08/2010 - qhe
5
6diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4
7index 143a9e5..0f27ceb 100644
8--- a/gnulib/m4/extensions.m4
9+++ b/gnulib/m4/extensions.m4
10@@ -12,44 +12,6 @@
11 # enough in this area it's likely we'll need to redefine
12 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
13
14-# AC_USE_SYSTEM_EXTENSIONS
15-# ------------------------
16-# Enable extensions on systems that normally disable them,
17-# typically due to standards-conformance issues.
18-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
19-[
20- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
21- AC_BEFORE([$0], [AC_RUN_IFELSE])
22-
23- AC_REQUIRE([AC_GNU_SOURCE])
24- AC_REQUIRE([AC_AIX])
25- AC_REQUIRE([AC_MINIX])
26-
27- AH_VERBATIM([__EXTENSIONS__],
28-[/* Enable extensions on Solaris. */
29-#ifndef __EXTENSIONS__
30-# undef __EXTENSIONS__
31-#endif
32-#ifndef _POSIX_PTHREAD_SEMANTICS
33-# undef _POSIX_PTHREAD_SEMANTICS
34-#endif
35-#ifndef _TANDEM_SOURCE
36-# undef _TANDEM_SOURCE
37-#endif])
38- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
39- [ac_cv_safe_to_define___extensions__],
40- [AC_COMPILE_IFELSE(
41- [AC_LANG_PROGRAM([
42-# define __EXTENSIONS__ 1
43- AC_INCLUDES_DEFAULT])],
44- [ac_cv_safe_to_define___extensions__=yes],
45- [ac_cv_safe_to_define___extensions__=no])])
46- test $ac_cv_safe_to_define___extensions__ = yes &&
47- AC_DEFINE([__EXTENSIONS__])
48- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
49- AC_DEFINE([_TANDEM_SOURCE])
50-])
51-
52 # gl_USE_SYSTEM_EXTENSIONS
53 # ------------------------
54 # Enable extensions on systems that normally disable them,
diff --git a/meta/packages/findutils/findutils-4.4.2/01-27017.patch b/meta/packages/findutils/findutils-4.4.2/01-27017.patch
deleted file mode 100644
index b61f67b12d..0000000000
--- a/meta/packages/findutils/findutils-4.4.2/01-27017.patch
+++ /dev/null
@@ -1,779 +0,0 @@
1commit af974034b68bf59337c7a384e488a518a77dfecd
2Author: James Youngman <jay@gnu.org>
3Date: Sat Jul 11 19:55:27 2009 +0100
4
5 Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit coredump.
6
7 Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
8 coredumps.
9 * find/tree.c (set_new_parent): Initialise struct
10 predicate->arg_text to NULL (instead of leaving it uninitialised).
11 (get_new_pred_noarg): Likewise.
12 (get_new_pred): Initialise predicate->arg_text to
13 "ThisShouldBeSetToSomethingElse" to make it easier to notice
14 bugs.
15 (get_new_pred_chk_op): Use get_new_pred_noarg.
16 (print_predicate): Use an if statement instead of
17 two ternary operators.
18 * find/util.c (insert_primary_withpred): Accept new argument, arg,
19 being the argument (if any) of this predicate. Pass it to
20 get_new_pred_chk_op.
21 (insert_primary): Likewise (pass arg to insert_primary_withpred).
22 (insert_primary_noarg): New function; calls insert_primary with
23 arg=NULL.
24 * find/parser.c (collect_arg_stat_info): Add an output parameter;
25 the filename from which we collected the stat information.
26 (parse_closeparen, parse_delete, parse_and, parse_or,
27 parse_comma): Use get_new_pred_noarg.
28 (parse_cnewer, parse_newer, parse_anewer): Use new
29 collect_arg_stat_info and insert_primary interface.
30 (parse_print, parse_prune, parse_nouser, parse_empty): Use
31 insert_primary_noarg.
32 (parse_accesscheck, parse_false): Use insert_primary_noarg.
33 (parse_used, parse_iname, parse_fprint, insert_fprint,
34 parse_fstype, parse_ilname): Use new collect_arg and
35 insert_primary interfaces.
36 (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
37 parse_perm, parse_size, parse_user, parse_time): Use new
38 collect_arg and insert_primary_withpred interface.
39 (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
40 (parse_newerXY, parse_nogroup): Use new insert_primary interface.
41 (insert_regex, parse_samefile): Use new insert_primary_withpred
42 interface.
43 (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
44 new insert_primary_withpred interface.
45 * find/defs.h (struct predicate.arg_text): make const.
46 Add declarations for new function get_new_pred_noarg and
47 insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
48 and insert_primary_withpred.
49
50diff --git a/ChangeLog b/ChangeLog
51index 6e346b8..e8ba0f8 100644
52--- a/ChangeLog
53+++ b/ChangeLog
54@@ -1,0 +1,45 @@
55+2009-07-11 James Youngman <jay@gnu.org>
56+
57+ Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
58+ coredumps.
59+ * find/tree.c (set_new_parent): Initialise struct
60+ predicate->arg_text to NULL (instead of leaving it uninitialised).
61+ (get_new_pred_noarg): Likewise.
62+ (get_new_pred): Initialise predicate->arg_text to
63+ "ThisShouldBeSetToSomethingElse" to make it easier to notice
64+ bugs.
65+ (get_new_pred_chk_op): Use get_new_pred_noarg.
66+ (print_predicate): Use an if statement instead of
67+ two ternary operators.
68+ * find/util.c (insert_primary_withpred): Accept new argument, arg,
69+ being the argument (if any) of this predicate. Pass it to
70+ get_new_pred_chk_op.
71+ (insert_primary): Likewise (pass arg to insert_primary_withpred).
72+ (insert_primary_noarg): New function; calls insert_primary with
73+ arg=NULL.
74+ * find/parser.c (collect_arg_stat_info): Add an output parameter;
75+ the filename from which we collected the stat information.
76+ (parse_closeparen, parse_delete, parse_and, parse_or,
77+ parse_comma): Use get_new_pred_noarg.
78+ (parse_cnewer, parse_newer, parse_anewer): Use new
79+ collect_arg_stat_info and insert_primary interface.
80+ (parse_print, parse_prune, parse_nouser, parse_empty): Use
81+ insert_primary_noarg.
82+ (parse_accesscheck, parse_false): Use insert_primary_noarg.
83+ (parse_used, parse_iname, parse_fprint, insert_fprint,
84+ parse_fstype, parse_ilname): Use new collect_arg and
85+ insert_primary interfaces.
86+ (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
87+ parse_perm, parse_size, parse_user, parse_time): Use new
88+ collect_arg and insert_primary_withpred interface.
89+ (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
90+ (parse_newerXY, parse_nogroup): Use new insert_primary interface.
91+ (insert_regex, parse_samefile): Use new insert_primary_withpred
92+ interface.
93+ (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
94+ new insert_primary_withpred interface.
95+ * find/defs.h (struct predicate.arg_text): make const.
96+ Add declarations for new function get_new_pred_noarg and
97+ insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
98+ and insert_primary_withpred.
99+
100diff --git a/find/defs.h b/find/defs.h
101index 1708d83..4539fd9 100644
102--- a/find/defs.h
103+++ b/find/defs.h
104@@ -297,7 +297,7 @@ struct predicate
105 boolean artificial;
106
107 /* The raw text of the argument of this predicate. */
108- char *arg_text;
109+ const char *arg_text;
110
111 /* Information needed by the predicate processor.
112 Next to each member are listed the predicates that use it. */
113@@ -480,13 +480,16 @@ void show_success_rates(const struct predicate *node);
114 /* tree.c */
115 struct predicate * build_expression_tree PARAMS((int argc, char *argv[], int end_of_leading_options));
116 struct predicate * get_eval_tree PARAMS((void));
117+struct predicate *get_new_pred_noarg (const struct parser_table *entry);
118 struct predicate *get_new_pred PARAMS((const struct parser_table *entry));
119-struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry));
120+struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry,
121+ const char *arg));
122 float calculate_derived_rates PARAMS((struct predicate *p));
123
124 /* util.c */
125-struct predicate *insert_primary PARAMS((const struct parser_table *entry));
126-struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr));
127+struct predicate *insert_primary PARAMS((const struct parser_table *entry, const char *arg));
128+struct predicate *insert_primary_noarg PARAMS((const struct parser_table *entry));
129+struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr, const char *arg));
130 void usage PARAMS((FILE *fp, int status, char *msg));
131 extern boolean check_nofollow(void);
132 void complete_pending_execs(struct predicate *p);
133diff --git a/find/parser.c b/find/parser.c
134index 534b670..2e6b989 100644
135--- a/find/parser.c
136+++ b/find/parser.c
137@@ -640,11 +640,13 @@ collect_arg(char **argv, int *arg_ptr, const char **collected_arg)
138 }
139
140 static boolean
141-collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
142+collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p,
143+ const char **argument)
144 {
145 const char *filename;
146 if (collect_arg(argv, arg_ptr, &filename))
147 {
148+ *argument = filename;
149 if (0 == (options.xstat)(filename, p))
150 {
151 return true;
152@@ -656,6 +658,7 @@ collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
153 }
154 else
155 {
156+ *argument = NULL;
157 return false;
158 }
159 }
160@@ -679,7 +682,7 @@ parse_and (const struct parser_table* entry, char **argv, int *arg_ptr)
161 (void) argv;
162 (void) arg_ptr;
163
164- our_pred = get_new_pred (entry);
165+ our_pred = get_new_pred_noarg (entry);
166 our_pred->pred_func = pred_and;
167 our_pred->p_type = BI_OP;
168 our_pred->p_prec = AND_PREC;
169@@ -691,11 +694,12 @@ static boolean
170 parse_anewer (const struct parser_table* entry, char **argv, int *arg_ptr)
171 {
172 struct stat stat_newer;
173+ const char *arg;
174
175 set_stat_placeholders(&stat_newer);
176- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
177+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
178 {
179- struct predicate *our_pred = insert_primary (entry);
180+ struct predicate *our_pred = insert_primary (entry, arg);
181 our_pred->args.reftime.xval = XVAL_ATIME;
182 our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
183 our_pred->args.reftime.kind = COMP_GT;
184@@ -713,7 +717,7 @@ parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr)
185 (void) argv;
186 (void) arg_ptr;
187
188- our_pred = get_new_pred (entry);
189+ our_pred = get_new_pred_noarg (entry);
190 our_pred->pred_func = pred_closeparen;
191 our_pred->p_type = CLOSE_PAREN;
192 our_pred->p_prec = NO_PREC;
193@@ -725,11 +729,12 @@ static boolean
194 parse_cnewer (const struct parser_table* entry, char **argv, int *arg_ptr)
195 {
196 struct stat stat_newer;
197+ const char *arg;
198
199 set_stat_placeholders(&stat_newer);
200- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
201+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
202 {
203- struct predicate *our_pred = insert_primary (entry);
204+ struct predicate *our_pred = insert_primary (entry, arg);
205 our_pred->args.reftime.xval = XVAL_CTIME; /* like -newercm */
206 our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
207 our_pred->args.reftime.kind = COMP_GT;
208@@ -747,7 +752,7 @@ parse_comma (const struct parser_table* entry, char **argv, int *arg_ptr)
209 (void) argv;
210 (void) arg_ptr;
211
212- our_pred = get_new_pred (entry);
213+ our_pred = get_new_pred_noarg (entry);
214 our_pred->pred_func = pred_comma;
215 our_pred->p_type = BI_OP;
216 our_pred->p_prec = COMMA_PREC;
217@@ -786,7 +791,7 @@ parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr)
218 (void) argv;
219 (void) arg_ptr;
220
221- our_pred = insert_primary (entry);
222+ our_pred = insert_primary_noarg (entry);
223 our_pred->side_effects = our_pred->no_default_print = true;
224 /* -delete implies -depth */
225 options.do_dir_first = false;
226@@ -831,7 +836,7 @@ parse_empty (const struct parser_table* entry, char **argv, int *arg_ptr)
227 (void) argv;
228 (void) arg_ptr;
229
230- our_pred = insert_primary (entry);
231+ our_pred = insert_primary_noarg (entry);
232 our_pred->est_success_rate = 0.01f; /* assume 1% of files are empty. */
233 return true;
234 }
235@@ -856,7 +861,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
236 (void) argv;
237 (void) arg_ptr;
238
239- our_pred = insert_primary (entry);
240+ our_pred = insert_primary_noarg (entry);
241 our_pred->need_stat = our_pred->need_type = false;
242 our_pred->side_effects = our_pred->no_default_print = false;
243 our_pred->est_success_rate = 0.0f;
244@@ -866,7 +871,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
245 static boolean
246 insert_fls (const struct parser_table* entry, const char *filename)
247 {
248- struct predicate *our_pred = insert_primary (entry);
249+ struct predicate *our_pred = insert_primary_noarg (entry);
250 if (filename)
251 open_output_file (filename, &our_pred->args.printf_vec);
252 else
253@@ -899,7 +904,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
254 const char *filename;
255 if (collect_arg(argv, arg_ptr, &filename))
256 {
257- our_pred = insert_primary (entry);
258+ our_pred = insert_primary (entry, filename);
259 open_output_file (filename, &our_pred->args.printf_vec);
260 our_pred->side_effects = our_pred->no_default_print = true;
261 our_pred->need_stat = our_pred->need_type = false;
262@@ -915,7 +920,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
263 static boolean
264 insert_fprint(const struct parser_table* entry, const char *filename)
265 {
266- struct predicate *our_pred = insert_primary (entry);
267+ struct predicate *our_pred = insert_primary (entry, filename);
268 if (filename)
269 open_output_file (filename, &our_pred->args.printf_vec);
270 else
271@@ -960,7 +965,7 @@ parse_fstype (const struct parser_table* entry, char **argv, int *arg_ptr)
272 const char *typename;
273 if (collect_arg(argv, arg_ptr, &typename))
274 {
275- struct predicate *our_pred = insert_primary (entry);
276+ struct predicate *our_pred = insert_primary (entry, typename);
277 our_pred->args.str = typename;
278
279 /* This is an expensive operation, so although there are
280@@ -1090,7 +1095,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
281 return false;
282 }
283 }
284- our_pred = insert_primary (entry);
285+ our_pred = insert_primary (entry, groupname);
286 our_pred->args.gid = gid;
287 our_pred->est_success_rate = (our_pred->args.numinfo.l_val < 100) ? 0.99 : 0.2;
288 return true;
289@@ -1160,7 +1165,7 @@ parse_ilname (const struct parser_table* entry, char **argv, int *arg_ptr)
290 const char *name;
291 if (collect_arg(argv, arg_ptr, &name))
292 {
293- struct predicate *our_pred = insert_primary (entry);
294+ struct predicate *our_pred = insert_primary (entry, name);
295 our_pred->args.str = name;
296 /* Use the generic glob pattern estimator to figure out how many
297 * links will match, but bear in mind that most files won't be links.
298@@ -1227,7 +1232,7 @@ parse_iname (const struct parser_table* entry, char **argv, int *arg_ptr)
299 {
300 if (check_name_arg("-iname", name))
301 {
302- struct predicate *our_pred = insert_primary (entry);
303+ struct predicate *our_pred = insert_primary (entry, name);
304 our_pred->need_stat = our_pred->need_type = false;
305 our_pred->args.str = name;
306 our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
307@@ -1268,7 +1273,7 @@ parse_ipath (const struct parser_table* entry, char **argv, int *arg_ptr)
308 fnmatch_sanitycheck ();
309 if (collect_arg (argv, arg_ptr, &name))
310 {
311- struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath);
312+ struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath, name);
313 our_pred->need_stat = our_pred->need_type = false;
314 our_pred->args.str = name;
315 our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
316@@ -1316,7 +1321,7 @@ parse_lname (const struct parser_table* entry, char **argv, int *arg_ptr)
317 fnmatch_sanitycheck();
318 if (collect_arg(argv, arg_ptr, &name))
319 {
320- struct predicate *our_pred = insert_primary (entry);
321+ struct predicate *our_pred = insert_primary (entry, name);
322 our_pred->args.str = name;
323 our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate(name, 0);
324 return true;
325@@ -1391,7 +1396,7 @@ do_parse_xmin (const struct parser_table* entry,
326 "arithmetic overflow while converting %s "
327 "minutes to a number of seconds"))
328 {
329- struct predicate *our_pred = insert_primary (entry);
330+ struct predicate *our_pred = insert_primary (entry, minutes);
331 our_pred->args.reftime = tval;
332 our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
333 return true;
334@@ -1427,7 +1432,7 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
335 fnmatch_sanitycheck();
336 if (check_name_arg("-name", name))
337 {
338- struct predicate *our_pred = insert_primary (entry);
339+ struct predicate *our_pred = insert_primary (entry, name);
340 our_pred->need_stat = our_pred->need_type = false;
341 our_pred->args.str = name;
342 our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
343@@ -1445,7 +1450,7 @@ parse_negate (const struct parser_table* entry, char **argv, int *arg_ptr)
344 (void) &argv;
345 (void) &arg_ptr;
346
347- our_pred = get_new_pred_chk_op (entry);
348+ our_pred = get_new_pred_chk_op (entry, NULL);
349 our_pred->pred_func = pred_negate;
350 our_pred->p_type = UNI_OP;
351 our_pred->p_prec = NEGATE_PREC;
352@@ -1458,11 +1463,12 @@ parse_newer (const struct parser_table* entry, char **argv, int *arg_ptr)
353 {
354 struct predicate *our_pred;
355 struct stat stat_newer;
356+ const char *arg;
357
358 set_stat_placeholders(&stat_newer);
359- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
360+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
361 {
362- our_pred = insert_primary (entry);
363+ our_pred = insert_primary (entry, arg);
364 our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
365 our_pred->args.reftime.xval = XVAL_MTIME;
366 our_pred->args.reftime.kind = COMP_GT;
367@@ -1530,7 +1536,7 @@ parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr)
368 (*arg_ptr)++;
369 }
370
371- our_pred = insert_primary (entry);
372+ our_pred = insert_primary (entry, argv[*arg_ptr]);
373
374
375 switch (x)
376@@ -1623,7 +1629,7 @@ parse_nogroup (const struct parser_table* entry, char **argv, int *arg_ptr)
377 (void) &argv;
378 (void) &arg_ptr;
379
380- our_pred = insert_primary (entry);
381+ our_pred = insert_primary (entry, NULL);
382 our_pred->est_success_rate = 1e-4;
383 #ifdef CACHE_IDS
384 if (gid_unused == NULL)
385@@ -1660,7 +1666,7 @@ parse_nouser (const struct parser_table* entry, char **argv, int *arg_ptr)
386 (void) arg_ptr;
387
388
389- our_pred = insert_primary (entry);
390+ our_pred = insert_primary_noarg (entry);
391 our_pred->est_success_rate = 1e-3;
392 #ifdef CACHE_IDS
393 if (uid_unused == NULL)
394@@ -1716,7 +1722,7 @@ parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr)
395 (void) argv;
396 (void) arg_ptr;
397
398- our_pred = get_new_pred_chk_op (entry);
399+ our_pred = get_new_pred_chk_op (entry, NULL);
400 our_pred->pred_func = pred_openparen;
401 our_pred->p_type = OPEN_PAREN;
402 our_pred->p_prec = NO_PREC;
403@@ -1732,7 +1738,7 @@ parse_or (const struct parser_table* entry, char **argv, int *arg_ptr)
404 (void) argv;
405 (void) arg_ptr;
406
407- our_pred = get_new_pred (entry);
408+ our_pred = get_new_pred_noarg (entry);
409 our_pred->pred_func = pred_or;
410 our_pred->p_type = BI_OP;
411 our_pred->p_prec = OR_PREC;
412@@ -1756,7 +1762,7 @@ parse_path (const struct parser_table* entry, char **argv, int *arg_ptr)
413 const char *name;
414 if (collect_arg(argv, arg_ptr, &name))
415 {
416- struct predicate *our_pred = insert_primary_withpred (entry, pred_path);
417+ struct predicate *our_pred = insert_primary_withpred (entry, pred_path, name);
418 our_pred->need_stat = our_pred->need_type = false;
419 our_pred->args.str = name;
420 our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
421@@ -1894,7 +1900,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
422 rate = 0.9986; /* probably matches anything but a broken symlink */
423 }
424
425- our_pred = insert_primary (entry);
426+ our_pred = insert_primary (entry, perm_expr);
427 our_pred->est_success_rate = rate;
428 if (havekind)
429 {
430@@ -1928,7 +1934,7 @@ parse_print (const struct parser_table* entry, char **argv, int *arg_ptr)
431 (void) argv;
432 (void) arg_ptr;
433
434- our_pred = insert_primary (entry);
435+ our_pred = insert_primary_noarg (entry);
436 /* -print has the side effect of printing. This prevents us
437 from doing undesired multiple printing when the user has
438 already specified -print. */
439@@ -1981,7 +1987,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
440 (void) argv;
441 (void) arg_ptr;
442
443- our_pred = insert_primary (entry);
444+ our_pred = insert_primary_noarg (entry);
445 if (options.do_dir_first == false)
446 our_pred->need_stat = our_pred->need_type = false;
447 /* -prune has a side effect that it does not descend into
448@@ -1994,7 +2000,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
449 static boolean
450 parse_quit (const struct parser_table* entry, char **argv, int *arg_ptr)
451 {
452- struct predicate *our_pred = insert_primary (entry);
453+ struct predicate *our_pred = insert_primary_noarg (entry);
454 (void) argv;
455 (void) arg_ptr;
456 our_pred->need_stat = our_pred->need_type = false;
457@@ -2036,7 +2042,7 @@ insert_regex (char **argv,
458 {
459 struct re_pattern_buffer *re;
460 const char *error_message;
461- struct predicate *our_pred = insert_primary_withpred (entry, pred_regex);
462+ struct predicate *our_pred = insert_primary_withpred (entry, pred_regex, rx);
463 our_pred->need_stat = our_pred->need_type = false;
464 re = xmalloc (sizeof (struct re_pattern_buffer));
465 our_pred->args.regex = re;
466@@ -2061,6 +2067,7 @@ static boolean
467 parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
468 {
469 struct predicate *our_pred;
470+ char *arg;
471 uintmax_t num;
472 char suffix;
473 enum comparison_type c_type;
474@@ -2073,42 +2080,43 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
475 */
476 if ((argv == NULL) || (argv[*arg_ptr] == NULL))
477 return false;
478+ arg = argv[*arg_ptr];
479
480- len = strlen (argv[*arg_ptr]);
481+ len = strlen (arg);
482 if (len == 0)
483 error (1, 0, _("invalid null argument to -size"));
484
485- suffix = argv[*arg_ptr][len - 1];
486+ suffix = arg[len - 1];
487 switch (suffix)
488 {
489 case 'b':
490 blksize = 512;
491- argv[*arg_ptr][len - 1] = '\0';
492+ arg[len - 1] = '\0';
493 break;
494
495 case 'c':
496 blksize = 1;
497- argv[*arg_ptr][len - 1] = '\0';
498+ arg[len - 1] = '\0';
499 break;
500
501 case 'k':
502 blksize = 1024;
503- argv[*arg_ptr][len - 1] = '\0';
504+ arg[len - 1] = '\0';
505 break;
506
507 case 'M': /* Megabytes */
508 blksize = 1024*1024;
509- argv[*arg_ptr][len - 1] = '\0';
510+ arg[len - 1] = '\0';
511 break;
512
513 case 'G': /* Gigabytes */
514 blksize = 1024*1024*1024;
515- argv[*arg_ptr][len - 1] = '\0';
516+ arg[len - 1] = '\0';
517 break;
518
519 case 'w':
520 blksize = 2;
521- argv[*arg_ptr][len - 1] = '\0';
522+ arg[len - 1] = '\0';
523 break;
524
525 case '0':
526@@ -2127,14 +2135,14 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
527 error (1, 0, _("invalid -size type `%c'"), argv[*arg_ptr][len - 1]);
528 }
529 /* TODO: accept fractional megabytes etc. ? */
530- if (!get_num (argv[*arg_ptr], &num, &c_type))
531+ if (!get_num (arg, &num, &c_type))
532 {
533 error(1, 0,
534 _("Invalid argument `%s%c' to -size"),
535- argv[*arg_ptr], (int)suffix);
536+ arg, (int)suffix);
537 return false;
538 }
539- our_pred = insert_primary (entry);
540+our_pred = insert_primary (entry, arg);
541 our_pred->args.size.kind = c_type;
542 our_pred->args.size.blocksize = blksize;
543 our_pred->args.size.size = num;
544@@ -2162,9 +2170,10 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
545 struct predicate *our_pred;
546 struct stat st, fst;
547 int fd, openflags;
548+ const char *filename;
549
550 set_stat_placeholders(&st);
551- if (!collect_arg_stat_info(argv, arg_ptr, &st))
552+ if (!collect_arg_stat_info(argv, arg_ptr, &st, &filename))
553 return false;
554
555 set_stat_placeholders(&fst);
556@@ -2289,7 +2298,7 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
557 }
558 }
559
560- our_pred = insert_primary (entry);
561+ our_pred = insert_primary (entry, filename);
562 our_pred->args.samefileid.ino = st.st_ino;
563 our_pred->args.samefileid.dev = st.st_dev;
564 our_pred->args.samefileid.fd = fd;
565@@ -2350,7 +2359,7 @@ parse_true (const struct parser_table* entry, char **argv, int *arg_ptr)
566 (void) argv;
567 (void) arg_ptr;
568
569- our_pred = insert_primary (entry);
570+ our_pred = insert_primary_noarg (entry);
571 our_pred->need_stat = our_pred->need_type = false;
572 our_pred->est_success_rate = 1.0f;
573 return true;
574@@ -2369,7 +2378,7 @@ parse_accesscheck (const struct parser_table* entry, char **argv, int *arg_ptr)
575 struct predicate *our_pred;
576 (void) argv;
577 (void) arg_ptr;
578- our_pred = insert_primary (entry);
579+ our_pred = insert_primary_noarg (entry);
580 our_pred->need_stat = our_pred->need_type = false;
581 our_pred->side_effects = our_pred->no_default_print = false;
582 if (pred_is(our_pred, pred_executable))
583@@ -2414,7 +2423,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
584 struct timespec zero = {0,0};
585 if (get_relative_timestamp(offset_str, &tval, zero, DAYSECS, errmsg))
586 {
587- our_pred = insert_primary (entry);
588+ our_pred = insert_primary (entry, offset_str);
589 our_pred->args.reftime = tval;
590 our_pred->est_success_rate = estimate_file_age_success_rate(tval.ts.tv_sec / DAYSECS);
591 return true;
592@@ -2472,7 +2481,7 @@ parse_user (const struct parser_table* entry, char **argv, int *arg_ptr)
593 return false;
594 }
595 }
596- our_pred = insert_primary (entry);
597+ our_pred = insert_primary (entry, username);
598 our_pred->args.uid = uid;
599 our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2;
600 return true;
601@@ -2650,7 +2659,7 @@ insert_type (char **argv, int *arg_ptr,
602 error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
603 return false;
604 }
605- our_pred = insert_primary_withpred (entry, which_pred);
606+ our_pred = insert_primary_withpred (entry, which_pred, typeletter);
607 our_pred->est_success_rate = rate;
608
609 /* Figure out if we will need to stat the file, because if we don't
610@@ -2706,7 +2715,7 @@ insert_fprintf (struct format_val *vec,
611 struct segment **segmentp; /* Address of current segment. */
612 struct predicate *our_pred;
613
614- our_pred = insert_primary_withpred (entry, func);
615+ our_pred = insert_primary_withpred (entry, func, format_const);
616 our_pred->side_effects = our_pred->no_default_print = true;
617 our_pred->args.printf_vec = *vec;
618 our_pred->need_type = false;
619@@ -3045,7 +3054,7 @@ new_insert_exec_ok (const char *action,
620 if ((argv == NULL) || (argv[*arg_ptr] == NULL))
621 return false;
622
623- our_pred = insert_primary_withpred (entry, func);
624+ our_pred = insert_primary_withpred (entry, func, "(some -exec* arguments)");
625 our_pred->side_effects = our_pred->no_default_print = true;
626 our_pred->need_type = our_pred->need_stat = false;
627
628@@ -3374,7 +3383,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
629 if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
630 return false;
631
632- our_pred = insert_primary (entry);
633+ our_pred = insert_primary (entry, orig_timearg);
634 our_pred->args.reftime = tval;
635 our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
636
637@@ -3487,7 +3496,7 @@ insert_num (char **argv, int *arg_ptr, const struct parser_table *entry)
638
639 if (get_num (numstr, &num, &c_type))
640 {
641- struct predicate *our_pred = insert_primary (entry);
642+ struct predicate *our_pred = insert_primary (entry, numstr);
643 our_pred->args.numinfo.kind = c_type;
644 our_pred->args.numinfo.l_val = num;
645
646diff --git a/find/tree.c b/find/tree.c
647index 7420c60..60a0601 100644
648--- a/find/tree.c
649+++ b/find/tree.c
650@@ -269,10 +269,14 @@ predicate_is_cost_free(const struct predicate *p)
651 /* Prints a predicate */
652 void print_predicate(FILE *fp, const struct predicate *p)
653 {
654- fprintf (fp, "%s%s%s",
655- p->p_name,
656- p->arg_text ? " " : "",
657- p->arg_text ? p->arg_text : "");
658+ if (p->arg_text)
659+ {
660+ fprintf (fp, "%s %s", p->p_name, p->arg_text);
661+ }
662+ else
663+ {
664+ fprintf (fp, "%s", p->p_name);
665+ }
666 }
667
668
669@@ -832,7 +836,8 @@ set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, str
670 new_parent->need_stat = false;
671 new_parent->need_type = false;
672 new_parent->p_cost = NeedsNothing;
673-
674+ new_parent->arg_text = NULL;
675+
676 switch (high_prec)
677 {
678 case COMMA_PREC:
679@@ -1393,6 +1398,18 @@ init_pred_perf(struct predicate *pred)
680 p->visits = p->successes = 0;
681 }
682
683+
684+struct predicate *
685+get_new_pred_noarg (const struct parser_table *entry)
686+{
687+ struct predicate *p = get_new_pred(entry);
688+ if (p)
689+ {
690+ p->arg_text = NULL;
691+ }
692+ return p;
693+}
694+
695
696 /* Return a pointer to a new predicate structure, which has been
697 linked in as the last one in the predicates list.
698@@ -1433,6 +1450,8 @@ get_new_pred (const struct parser_table *entry)
699 last_pred->no_default_print = false;
700 last_pred->need_stat = true;
701 last_pred->need_type = true;
702+ last_pred->p_cost = NeedsUnknown;
703+ last_pred->arg_text = "ThisShouldBeSetToSomethingElse";
704 last_pred->args.str = NULL;
705 last_pred->pred_next = NULL;
706 last_pred->pred_left = NULL;
707@@ -1449,7 +1468,8 @@ get_new_pred (const struct parser_table *entry)
708 predicate is an operator. If it isn't, the AND operator is inserted. */
709
710 struct predicate *
711-get_new_pred_chk_op (const struct parser_table *entry)
712+get_new_pred_chk_op (const struct parser_table *entry,
713+ const char *arg)
714 {
715 struct predicate *new_pred;
716 static const struct parser_table *entry_and = NULL;
717@@ -1471,13 +1491,14 @@ get_new_pred_chk_op (const struct parser_table *entry)
718 case PRIMARY_TYPE:
719 case CLOSE_PAREN:
720 /* We need to interpose the and operator. */
721- new_pred = get_new_pred (entry_and);
722+ new_pred = get_new_pred_noarg (entry_and);
723 new_pred->pred_func = pred_and;
724 new_pred->p_name = "-a";
725 new_pred->p_type = BI_OP;
726 new_pred->p_prec = AND_PREC;
727 new_pred->need_stat = false;
728 new_pred->need_type = false;
729+ new_pred->arg_text = NULL;
730 new_pred->args.str = NULL;
731 new_pred->side_effects = false;
732 new_pred->no_default_print = false;
733@@ -1488,6 +1509,7 @@ get_new_pred_chk_op (const struct parser_table *entry)
734 }
735
736 new_pred = get_new_pred (entry);
737+ new_pred->arg_text = arg;
738 new_pred->parser_entry = entry;
739 return new_pred;
740 }
741diff --git a/find/util.c b/find/util.c
742index a06eada..cc9a3eb 100644
743--- a/find/util.c
744+++ b/find/util.c
745@@ -89,11 +89,13 @@ static struct debug_option_assoc debugassoc[] =
746 operator. */
747
748 struct predicate *
749-insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
750+insert_primary_withpred (const struct parser_table *entry,
751+ PRED_FUNC pred_func,
752+ const char *arg)
753 {
754 struct predicate *new_pred;
755
756- new_pred = get_new_pred_chk_op (entry);
757+ new_pred = get_new_pred_chk_op (entry, arg);
758 new_pred->pred_func = pred_func;
759 new_pred->p_name = entry->parser_name;
760 new_pred->args.str = NULL;
761@@ -118,10 +120,16 @@ insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
762 either not there at all (we are the very first node) or is an
763 operator. */
764 struct predicate *
765-insert_primary (const struct parser_table *entry)
766+insert_primary (const struct parser_table *entry, const char *arg)
767 {
768 assert (entry->pred_func != NULL);
769- return insert_primary_withpred(entry, entry->pred_func);
770+ return insert_primary_withpred(entry, entry->pred_func, arg);
771+}
772+
773+struct predicate *
774+insert_primary_noarg (const struct parser_table *entry)
775+{
776+ return insert_primary(entry, NULL);
777 }
778
779
diff --git a/meta/packages/findutils/findutils-4.4.2/02-28824.patch b/meta/packages/findutils/findutils-4.4.2/02-28824.patch
deleted file mode 100644
index 3469712d90..0000000000
--- a/meta/packages/findutils/findutils-4.4.2/02-28824.patch
+++ /dev/null
@@ -1,292 +0,0 @@
1commit 76ed377d6d3e4a83a00cabd401f751b37ecd1e7b
2Author: James Youngman <jay@gnu.org>
3Date: Sat Feb 20 13:11:45 2010 +0000
4
5 Fix Savannah bug# 28824: "-ctime x" yields "missing argument to `-ctime'".
6
7 * find/parser.c (parse_fls): If the argument is invalid, reverse
8 the change that collect_arg() made to *arg_ptr (that is, don't
9 consume the argument).
10 (parse_fprint0): Likewise.
11 (parse_gid): Likewise.
12 (parse_group): Likewise.
13 (parse_inum): Likewise.
14 (parse_links): Likewise.
15 (do_parse_xmin): Likewise.
16 (parse_name): Likewise.
17 (parse_printf): Likewise.
18 (parse_uid): Likewise.
19 (parse_used): Likewise.
20 (parse_time): Likewise.
21
22 Signed-off-by: James Youngman <jay@gnu.org>
23
24diff --git a/ChangeLog b/ChangeLog
25index d0ce1fe..13539a4 100644
26--- a/ChangeLog
27+++ b/ChangeLog
28@@ -1,0 +1,19 @@
29+2010-02-20 James Youngman <jay@gnu.org>
30+
31+ Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
32+ `-ctime'".
33+ * find/parser.c (parse_fls): If the argument is invalid, reverse
34+ the change that collect_arg() made to *arg_ptr (that is, don't
35+ consume the argument).
36+ (parse_fprint0): Likewise.
37+ (parse_gid): Likewise.
38+ (parse_group): Likewise.
39+ (parse_inum): Likewise.
40+ (parse_links): Likewise.
41+ (do_parse_xmin): Likewise.
42+ (parse_name): Likewise.
43+ (parse_printf): Likewise.
44+ (parse_uid): Likewise.
45+ (parse_used): Likewise.
46+ (parse_time): Likewise.
47+
48diff --git a/NEWS b/NEWS
49index 5394311..4e910df 100644
50--- a/NEWS
51+++ b/NEWS
52@@ -4,5 +4,8 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
53
54 ** Bug Fixes
55
56+#28824: Corrected error message for "-ctime x".
57+ Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
58+ -uid, -used, -atime, -mtime, -ctime.
59 #26537: find -prune now makes sure it has valid stat() information.
60
61diff --git a/find/parser.c b/find/parser.c
62index 2e6b989..08758ee 100644
63--- a/find/parser.c
64+++ b/find/parser.c
65@@ -886,8 +886,14 @@ static boolean
66 parse_fls (const struct parser_table* entry, char **argv, int *arg_ptr)
67 {
68 const char *filename;
69- return collect_arg(argv, arg_ptr, &filename)
70- && insert_fls(entry, filename);
71+ if (collect_arg(argv, arg_ptr, &filename))
72+ {
73+ if (insert_fls(entry, filename))
74+ return true;
75+ else
76+ --*arg_ptr; /* don't consume the invalid arg. */
77+ }
78+ return false;
79 }
80
81 static boolean
82@@ -937,9 +943,13 @@ parse_fprint0 (const struct parser_table* entry, char **argv, int *arg_ptr)
83 {
84 const char *filename;
85 if (collect_arg(argv, arg_ptr, &filename))
86- return insert_fprint(entry, filename);
87- else
88- return false;
89+ {
90+ if (insert_fprint(entry, filename))
91+ return true;
92+ else
93+ --*arg_ptr; /* don't consume the bad arg. */
94+ }
95+ return false;
96 }
97
98 static float estimate_fstype_success_rate(const char *fsname)
99@@ -993,6 +1003,7 @@ parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr)
100 }
101 else
102 {
103+ --*arg_ptr; /* don't consume the invalid argument. */
104 return false;
105 }
106 }
107@@ -1049,6 +1060,7 @@ static boolean
108 parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
109 {
110 const char *groupname;
111+ const int saved_argc = *arg_ptr;
112
113 if (collect_arg(argv, arg_ptr, &groupname))
114 {
115@@ -1077,6 +1089,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
116 "because it has the unexpected suffix %s"),
117 quotearg_n_style(0, options.err_quoting_style, groupname),
118 quotearg_n_style(1, options.err_quoting_style, groupname+gid_len));
119+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
120 return false;
121 }
122 }
123@@ -1092,6 +1105,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
124 {
125 error(1, 0, _("argument to -group is empty, but should be a group name"));
126 }
127+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
128 return false;
129 }
130 }
131@@ -1256,6 +1270,7 @@ parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr)
132 }
133 else
134 {
135+ --*arg_ptr; /* don't consume the invalid argument. */
136 return false;
137 }
138 }
139@@ -1310,6 +1325,7 @@ parse_links (const struct parser_table* entry, char **argv, int *arg_ptr)
140 }
141 else
142 {
143+ --*arg_ptr; /* don't consume the invalid argument. */
144 return false;
145 }
146 }
147@@ -1358,6 +1374,7 @@ insert_depthspec(const struct parser_table* entry, char **argv, int *arg_ptr,
148 error(1, 0, _("Expected a positive decimal integer argument to %s, but got %s"),
149 predicate,
150 quotearg_n_style(0, options.err_quoting_style, depthstr));
151+ /* NOTREACHED */
152 return false;
153 }
154 /* missing argument */
155@@ -1385,6 +1402,7 @@ do_parse_xmin (const struct parser_table* entry,
156 enum xval xv)
157 {
158 const char *minutes;
159+ const int saved_argc = *arg_ptr;
160
161 if (collect_arg(argv, arg_ptr, &minutes))
162 {
163@@ -1401,6 +1419,11 @@ do_parse_xmin (const struct parser_table* entry,
164 our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
165 return true;
166 }
167+ else
168+ {
169+ /* Don't consume the invalid argument. */
170+ *arg_ptr = saved_argc;
171+ }
172 }
173 return false;
174 }
175@@ -1427,6 +1450,8 @@ static boolean
176 parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
177 {
178 const char *name;
179+ const int saved_argc = *arg_ptr;
180+
181 if (collect_arg(argv, arg_ptr, &name))
182 {
183 fnmatch_sanitycheck();
184@@ -1438,6 +1463,10 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
185 our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
186 return true;
187 }
188+ else
189+ {
190+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
191+ }
192 }
193 return false;
194 }
195@@ -1954,11 +1983,21 @@ static boolean
196 parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr)
197 {
198 const char *format;
199+ const int saved_argc = *arg_ptr;
200+
201 if (collect_arg(argv, arg_ptr, &format))
202 {
203 struct format_val fmt;
204 open_stdout(&fmt);
205- return insert_fprintf (&fmt, entry, pred_fprintf, format);
206+ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
207+ {
208+ return true;
209+ }
210+ else
211+ {
212+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
213+ return false;
214+ }
215 }
216 return false;
217 }
218@@ -1967,15 +2006,21 @@ static boolean
219 parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr)
220 {
221 const char *format, *filename;
222+ int saved_argc = *arg_ptr;
223+
224 if (collect_arg(argv, arg_ptr, &filename))
225 {
226 if (collect_arg(argv, arg_ptr, &format))
227 {
228 struct format_val fmt;
229 open_output_file (filename, &fmt);
230- return insert_fprintf (&fmt, entry, pred_fprintf, format);
231+ saved_argc = *arg_ptr;
232+
233+ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
234+ return true;
235 }
236 }
237+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
238 return false;
239 }
240
241@@ -2405,6 +2450,7 @@ parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr)
242 }
243 else
244 {
245+ --*arg_ptr; /* don't consume the invalid argument. */
246 return false;
247 }
248 }
249@@ -2431,6 +2477,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
250 else
251 {
252 error(1, 0, _("Invalid argument %s to -used"), offset_str);
253+ /*NOTREACHED*/
254 return false;
255 }
256 }
257@@ -2610,6 +2657,7 @@ insert_type (char **argv, int *arg_ptr,
258 if (strlen(typeletter) != 1u)
259 {
260 error(1, 0, _("Arguments to -type should contain only one letter"));
261+ /*NOTREACHED*/
262 return false;
263 }
264
265@@ -2657,6 +2705,7 @@ insert_type (char **argv, int *arg_ptr,
266 #endif
267 default: /* None of the above ... nuke 'em. */
268 error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
269+ /*NOTREACHED*/
270 return false;
271 }
272 our_pred = insert_primary_withpred (entry, which_pred, typeletter);
273@@ -3349,6 +3398,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
274 const char *errmsg = "arithmetic overflow while converting %s "
275 "days to a number of seconds";
276 struct timespec origin;
277+ const int saved_argc = *arg_ptr;
278
279 if (!collect_arg(argv, arg_ptr, &timearg))
280 return false;
281@@ -3381,7 +3431,10 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
282 timearg = orig_timearg;
283
284 if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
285- return false;
286+ {
287+ *arg_ptr = saved_argc; /* don't consume the invalid argument */
288+ return false;
289+ }
290
291 our_pred = insert_primary (entry, orig_timearg);
292 our_pred->args.reftime = tval;
diff --git a/meta/packages/findutils/findutils-4.4.2/03-28872.patch b/meta/packages/findutils/findutils-4.4.2/03-28872.patch
deleted file mode 100644
index 8bede38920..0000000000
--- a/meta/packages/findutils/findutils-4.4.2/03-28872.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1commit 5f5eb921765794e8fc58c4bdffa2daa2ae34800f
2Author: James Youngman <jay@gnu.org>
3Date: Sat Feb 20 19:53:13 2010 +0000
4
5 Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
6
7 * doc/find.texi (Problems with -exec and filenames): Add missing
8 $0 argument in example for sh -c 'something "$@" sh ...
9 * NEWS: Mention this change.
10
11 Signed-off-by: James Youngman <jay@gnu.org>
12
13diff --git a/ChangeLog b/ChangeLog
14index 13539a4..e94ba96 100644
15--- a/ChangeLog
16+++ b/ChangeLog
17@@ -1,5 +1,10 @@
18 2010-02-20 James Youngman <jay@gnu.org>
19
20+ Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
21+ * doc/find.texi (Problems with -exec and filenames): Add missing
22+ $0 argument in example for sh -c 'something "$@" sh ...
23+ * NEWS: Mention this change.
24+
25 Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
26 `-ctime'".
27 * find/parser.c (parse_fls): If the argument is invalid, reverse
28diff --git a/NEWS b/NEWS
29index 4e910df..4c97be9 100644
30--- a/NEWS
31+++ b/NEWS
32@@ -4,6 +4,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
33
34 ** Bug Fixes
35
36+#28872: Mistake in "#safer" example in "Problems with -exec and
37+ filenames" section of the Texinfo manual.
38+
39 #28824: Corrected error message for "-ctime x".
40 Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
41 -uid, -used, -atime, -mtime, -ctime.
42diff --git a/doc/find.texi b/doc/find.texi
43index 2e5958d..391ffa0 100644
44--- a/doc/find.texi
45+++ b/doc/find.texi
46@@ -4830,8 +4830,8 @@ problem:
47
48 @example
49 # safer
50-find -exec sh -c 'something "$@@"' @{@} \;
51-find -execdir sh -c 'something "$@@"' @{@}\;
52+find -exec sh -c 'something "$@@"' sh @{@} \;
53+find -execdir sh -c 'something "$@@"' sh @{@}\;
54 @end example
55
56 This approach is not guaranteed to avoid every problem, but it is much
diff --git a/meta/packages/findutils/findutils.inc b/meta/packages/findutils/findutils.inc
deleted file mode 100644
index 08ca2022ee..0000000000
--- a/meta/packages/findutils/findutils.inc
+++ /dev/null
@@ -1,19 +0,0 @@
1DESCRIPTION = "find, locate, and xargs binaries."
2HOMEPAGE = "http://www.gnu.org/software/findutils/"
3BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
4SECTION = "console/utils"
5
6# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
7LICENSE = "GPLv3+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
9
10SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz"
11
12inherit autotools gettext
13
14# diffutils assumes non-glibc compilation with uclibc and
15# this causes it to generate its own implementations of
16# standard functionality. regex.c actually breaks compilation
17# because it uses __mempcpy, there are other things (TBD:
18# see diffutils.mk in buildroot)
19EXTRA_OECONF_linux-uclibc = "--without-included-regex"
diff --git a/meta/packages/findutils/findutils_4.2.31.bb b/meta/packages/findutils/findutils_4.2.31.bb
deleted file mode 100644
index 2804a3ba3a..0000000000
--- a/meta/packages/findutils/findutils_4.2.31.bb
+++ /dev/null
@@ -1,37 +0,0 @@
1DESCRIPTION = "find, locate, and xargs binaries."
2HOMEPAGE = "http://www.gnu.org/software/findutils/"
3BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
4SECTION = "console/utils"
5
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
8PR = "r1"
9
10SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz \
11 file://gnulib-extension.patch"
12
13inherit autotools gettext
14
15# diffutils assumes non-glibc compilation with uclibc and
16# this causes it to generate its own implementations of
17# standard functionality. regex.c actually breaks compilation
18# because it uses __mempcpy, there are other things (TBD:
19# see diffutils.mk in buildroot)
20EXTRA_OECONF_linux-uclibc = "--without-included-regex"
21
22do_install_append () {
23 if [ -e ${D}${bindir}/find ]; then
24 mv ${D}${bindir}/find ${D}${bindir}/find.${PN}
25 mv ${D}${bindir}/xargs ${D}${bindir}/xargs.${PN}
26 fi
27}
28
29pkg_postinst_${PN} () {
30 for i in find xargs; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
31}
32
33pkg_prerm_${PN} () {
34 for i in find xargs; do update-alternatives --remove $i $i.${PN}; done
35}
36
37BBCLASSEXTEND = "native"
diff --git a/meta/packages/findutils/findutils_4.4.2.bb b/meta/packages/findutils/findutils_4.4.2.bb
deleted file mode 100644
index 18514f36ea..0000000000
--- a/meta/packages/findutils/findutils_4.4.2.bb
+++ /dev/null
@@ -1,27 +0,0 @@
1require findutils.inc
2
3PR = "r0"
4
5SRC_URI += "file://01-27017.patch \
6 file://02-28824.patch \
7 file://03-28872.patch"
8
9# http://savannah.gnu.org/bugs/?27299
10EXTRA_OECONF += "gl_cv_func_wcwidth_works=yes"
11
12do_install_append () {
13 if [ -e ${D}${bindir}/find ]; then
14 mv ${D}${bindir}/find ${D}${bindir}/find.${PN}
15 mv ${D}${bindir}/xargs ${D}${bindir}/xargs.${PN}
16 fi
17}
18
19pkg_postinst_${PN} () {
20 for i in find xargs; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
21}
22
23pkg_prerm_${PN} () {
24 for i in find xargs; do update-alternatives --remove $i $i.${PN}; done
25}
26
27BBCLASSEXTEND = "native"
diff --git a/meta/packages/fstests/fstests_svn.bb b/meta/packages/fstests/fstests_svn.bb
deleted file mode 100644
index b4075212ee..0000000000
--- a/meta/packages/fstests/fstests_svn.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1DESCRIPTION = "Various benchmarning tests for X"
2HOMEPAGE = "http://www.o-hand.com"
3SECTION = "devel"
4LICENSE = "GPL"
5DEPENDS = "pango libxext libxft virtual/libx11 gtk+"
6PV = "0.0+svnr${SRCREV}"
7PR = "r1"
8
9inherit autotools
10
11SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=fstests;proto=http"
12
13S = "${WORKDIR}/fstests/tests"
14
15do_install() {
16 install -d ${D}${bindir}
17 find . -name "test-*" -type f -perm -755 -exec install -m 0755 {} ${D}${bindir} \;
18}
diff --git a/meta/packages/fuse/fuse-2.7.2/not-run-updaterc.d-on-host.patch b/meta/packages/fuse/fuse-2.7.2/not-run-updaterc.d-on-host.patch
deleted file mode 100644
index 903a8baa9e..0000000000
--- a/meta/packages/fuse/fuse-2.7.2/not-run-updaterc.d-on-host.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1Index: fuse-2.7.2/util/Makefile.am
2===================================================================
3--- fuse-2.7.2.orig/util/Makefile.am 2007-04-26 01:36:47.000000000 +0930
4+++ fuse-2.7.2/util/Makefile.am 2008-02-10 16:43:19.000000000 +1030
5@@ -33,10 +33,6 @@
6 $(INSTALL_PROGRAM) $(srcdir)/mount.fuse $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse
7 $(mkdir_p) $(DESTDIR)$(INIT_D_PATH)
8 $(INSTALL_PROGRAM) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse
9- @if test -x /usr/sbin/update-rc.d; then \
10- echo "/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true"; \
11- /usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \
12- fi
13
14 install-data-local:
15 $(mkdir_p) $(DESTDIR)$(UDEV_RULES_PATH)
diff --git a/meta/packages/fuse/fuse.inc b/meta/packages/fuse/fuse.inc
deleted file mode 100644
index c6755ac7c7..0000000000
--- a/meta/packages/fuse/fuse.inc
+++ /dev/null
@@ -1,13 +0,0 @@
1DESCRIPTION = "With FUSE it is possible to implement a fully functional filesystem in a userspace program"
2HOMEPAGE = "http://fuse.sf.net"
3LICENSE = "GPL"
4DEPENDS = "virtual/fakeroot-native"
5RRECOMMENDS_fuse = "${@base_contains("MACHINE_FEATURES","kernel26","kernel-module-fuse","fuse-module",d)}"
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/fuse/fuse-${PV}.tar.gz"
8
9inherit autotools pkgconfig
10
11fakeroot do_install() {
12 oe_runmake install DESTDIR=${D}
13}
diff --git a/meta/packages/fuse/fuse_2.7.2.bb b/meta/packages/fuse/fuse_2.7.2.bb
deleted file mode 100644
index d284a25f5f..0000000000
--- a/meta/packages/fuse/fuse_2.7.2.bb
+++ /dev/null
@@ -1,22 +0,0 @@
1require fuse.inc
2
3PR = "r0"
4
5SRC_URI += "file://not-run-updaterc.d-on-host.patch;patch=1"
6
7EXTRA_OECONF = " --disable-kernel-module"
8
9#package utils in a sperate package and stop debian.bbclass renaming it to libfuse-utils, we want it to be fuse-utils
10PACKAGES =+ "fuse-utils-dbg fuse-utils libulockmgr libulockmgr-dev libulockmgr-dbg"
11FILES_${PN} += "${libdir}/libfuse.so.*"
12FILES_${PN}-dev += "${libdir}/libfuse*.la"
13
14FILES_libulockmgr = "${libdir}/libulockmgr.so.*"
15FILES_libulockmgr-dev += "${libdir}/libulock*.la"
16FILES_libulockmgr-dbg += "${libdir}/.debug/libulock*"
17
18FILES_fuse-utils = "${bindir} ${base_sbindir}"
19FILES_fuse-utils-dbg = "${bindir}/.debug ${base_sbindir}/.debug"
20DEBIAN_NOAUTONAME_fuse-utils = "1"
21DEBIAN_NOAUTONAME_fuse-utils-dbg = "1"
22
diff --git a/meta/packages/gdbm/gdbm-1.8.3/libtool-mode.patch b/meta/packages/gdbm/gdbm-1.8.3/libtool-mode.patch
deleted file mode 100644
index c56bac2ca9..0000000000
--- a/meta/packages/gdbm/gdbm-1.8.3/libtool-mode.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1--- gdbm-1.8.3/Makefile.in.orig 2006-02-16 15:17:25.000000000 +0000
2+++ gdbm-1.8.3/Makefile.in 2006-02-16 15:18:08.000000000 +0000
3@@ -131,7 +131,7 @@
4 $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
5 $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \
6 $(DESTDIR)$(infodir)
7- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
8+ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
9 $(INSTALL_DATA) gdbm.h \
10 $(DESTDIR)$(includedir)/gdbm.h
11 $(INSTALL_DATA) $(srcdir)/gdbm.3 \
12@@ -142,7 +142,7 @@
13 install-compat:
14 $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
15 $(DESTDIR)$(includedir)
16- $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
17+ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm_compat.la \
18 $(DESTDIR)$(libdir)/libgdbm_compat.la
19 $(INSTALL_DATA) $(srcdir)/dbm.h \
20 $(DESTDIR)$(includedir)/dbm.h
diff --git a/meta/packages/gdbm/gdbm-1.8.3/makefile.patch b/meta/packages/gdbm/gdbm-1.8.3/makefile.patch
deleted file mode 100644
index 5350c53729..0000000000
--- a/meta/packages/gdbm/gdbm-1.8.3/makefile.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6--- gdbm-1.8.3/Makefile.in~makefile
7+++ gdbm-1.8.3/Makefile.in
8@@ -22,6 +22,7 @@
9 TEXI2DVI = texi2dvi
10
11 DEFS =
12+DESTDIR =
13
14 # Where the system [n]dbm routines are...
15 LIBS = @LIBS@ -lc
16@@ -127,26 +128,26 @@
17 progs: $(PROGS)
18
19 install: libgdbm.la gdbm.h gdbm.info
20- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
21- $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \
22- $(INSTALL_ROOT)$(infodir)
23- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la
24- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \
25- $(INSTALL_ROOT)$(includedir)/gdbm.h
26- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \
27- $(INSTALL_ROOT)$(man3dir)/gdbm.3
28- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.info \
29- $(INSTALL_ROOT)$(infodir)/gdbm.info
30+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
31+ $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \
32+ $(DESTDIR)$(infodir)
33+ $(LIBTOOL) $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
34+ $(INSTALL_DATA) gdbm.h \
35+ $(DESTDIR)$(includedir)/gdbm.h
36+ $(INSTALL_DATA) $(srcdir)/gdbm.3 \
37+ $(DESTDIR)$(man3dir)/gdbm.3
38+ $(INSTALL_DATA) $(srcdir)/gdbm.info \
39+ $(DESTDIR)$(infodir)/gdbm.info
40
41 install-compat:
42- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
43- $(INSTALL_ROOT)$(includedir)
44+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
45+ $(DESTDIR)$(includedir)
46 $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
47- $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la
48- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \
49- $(INSTALL_ROOT)$(includedir)/dbm.h
50- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/ndbm.h \
51- $(INSTALL_ROOT)$(includedir)/ndbm.h
52+ $(DESTDIR)$(libdir)/libgdbm_compat.la
53+ $(INSTALL_DATA) $(srcdir)/dbm.h \
54+ $(DESTDIR)$(includedir)/dbm.h
55+ $(INSTALL_DATA) $(srcdir)/ndbm.h \
56+ $(DESTDIR)$(includedir)/ndbm.h
57
58 #libgdbm.a: $(OBJS) gdbm.h
59 # rm -f libgdbm.a
diff --git a/meta/packages/gdbm/gdbm_1.8.3.bb b/meta/packages/gdbm/gdbm_1.8.3.bb
deleted file mode 100644
index e8369fd725..0000000000
--- a/meta/packages/gdbm/gdbm_1.8.3.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "GNU dbm is a set of database routines that use extensible hashing."
2HOMEPAGE = "http://www.gnu.org/software/gdbm/"
3SECTION = "libs"
4PRIORITY = "optional"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d8e20eece214df8ef953ed5857862150"
7
8PR = "r4"
9
10SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
11 file://makefile.patch;patch=1 \
12 file://libtool-mode.patch;patch=1"
13
14inherit autotools
15
16BBCLASSEXTEND = "native"
diff --git a/meta/packages/gnutls/gnutls-2.8.6/configure-fix.patch b/meta/packages/gnutls/gnutls-2.8.6/configure-fix.patch
deleted file mode 100644
index 247e324564..0000000000
--- a/meta/packages/gnutls/gnutls-2.8.6/configure-fix.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1rebased from original configure_madness.patch
2
3libtasn1 provides an .pc file in upstream,
4and a libgcrypt.pc is added in libgcrypt recipe,
5so use Requires.private for these two.
6
7against 2.8.6
8
907/02/2010 - qhe
10
11---
12diff --git a/lib/configure.ac b/lib/configure.ac
13index 80d3375..1a486f7 100644
14--- a/lib/configure.ac
15+++ b/lib/configure.ac
16@@ -81,8 +81,8 @@ fi
17
18 lgl_INIT
19
20-LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBS"
21-LIBGNUTLS_CFLAGS="-I${includedir}"
22+LIBGNUTLS_LIBS="-lgnutls $LIBS"
23+LIBGNUTLS_CFLAGS=""
24 AC_SUBST(LIBGNUTLS_LIBS)
25 AC_SUBST(LIBGNUTLS_CFLAGS)
26
27diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in
28index 3b01c17..de31469 100644
29--- a/lib/gnutls.pc.in
30+++ b/lib/gnutls.pc.in
31@@ -20,6 +20,6 @@ Name: GnuTLS
32 Description: Transport Security Layer implementation for the GNU system
33 URL: http://www.gnu.org/software/gnutls/
34 Version: @VERSION@
35+Requires.private: libgcrypt, libtasn1
36 Libs: -L${libdir} -lgnutls
37-Libs.private: @LIBGNUTLS_LIBS@ @LTLIBTASN1@
38 Cflags: -I${includedir}
39diff --git a/libextra/configure.ac b/libextra/configure.ac
40index c08e73f..3313886 100644
41--- a/libextra/configure.ac
42+++ b/libextra/configure.ac
43@@ -40,8 +40,8 @@ LIBGNUTLS_EXTRA_HOOKS
44
45 xgl_INIT
46
47-LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LZO_LIBS $LIBGNUTLS_LIBS"
48-LIBGNUTLS_EXTRA_CFLAGS="-I${includedir}"
49+LIBGNUTLS_EXTRA_LIBS="-lgnutls-extra $LZO_LIBS $LIBGNUTLS_LIBS"
50+LIBGNUTLS_EXTRA_CFLAGS=""
51 AC_SUBST(LIBGNUTLS_EXTRA_LIBS)
52 AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
53
54diff --git a/libextra/gnutls-extra.pc.in b/libextra/gnutls-extra.pc.in
55index 9e7b8f6..e228ec9 100644
56--- a/libextra/gnutls-extra.pc.in
57+++ b/libextra/gnutls-extra.pc.in
58@@ -21,5 +21,5 @@ URL: http://www.gnu.org/software/gnutls/
59 Requires: gnutls
60 Version: @VERSION@
61 Libs: -L${libdir} -lgnutls-extra
62-Libs.private: @LIBGNUTLS_EXTRA_LIBS@
63+Libs.private: -llzo2
64 Cflags: -I${includedir}
diff --git a/meta/packages/gnutls/gnutls-2.8.6/gnutls-openssl.patch b/meta/packages/gnutls/gnutls-2.8.6/gnutls-openssl.patch
deleted file mode 100644
index 413de06472..0000000000
--- a/meta/packages/gnutls/gnutls-2.8.6/gnutls-openssl.patch
+++ /dev/null
@@ -1,124 +0,0 @@
1Index: gnutls-1.6.0/libextra/gnutls_openssl.c
2===================================================================
3--- gnutls-1.6.0.orig/libextra/gnutls_openssl.c 2006-08-13 22:34:09.000000000 +0200
4+++ gnutls-1.6.0/libextra/gnutls_openssl.c 2006-12-12 15:07:59.002227000 +0100
5@@ -256,12 +256,17 @@
6 ssl->rfd = (gnutls_transport_ptr_t) - 1;
7 ssl->wfd = (gnutls_transport_ptr_t) - 1;
8
9+ ssl->ssl_peek_buffer = NULL;
10+ ssl->ssl_peek_buffer_size = ssl->ssl_peek_avail = 0;
11+
12 return ssl;
13 }
14
15 void
16 SSL_free (SSL * ssl)
17 {
18+ if (ssl->ssl_peek_buffer)
19+ free(ssl->ssl_peek_buffer);
20 gnutls_certificate_free_credentials (ssl->gnutls_cred);
21 gnutls_deinit (ssl->gnutls_state);
22 free (ssl);
23@@ -285,6 +290,7 @@
24 SSL_set_fd (SSL * ssl, int fd)
25 {
26 gnutls_transport_set_ptr (ssl->gnutls_state, GNUTLS_INT_TO_POINTER (fd));
27+ ssl->rfd = ssl->wfd = fd;
28 return 1;
29 }
30
31@@ -310,6 +316,17 @@
32 return 1;
33 }
34
35+int SSL_get_rfd(SSL *ssl)
36+{
37+ return ssl->rfd;
38+}
39+
40+int SSL_get_wfd(SSL *ssl)
41+{
42+ return ssl->wfd;
43+}
44+
45+
46 void
47 SSL_set_bio (SSL * ssl, BIO * rbio, BIO * wbio)
48 {
49@@ -325,6 +342,8 @@
50 int
51 SSL_pending (SSL * ssl)
52 {
53+ if (ssl->ssl_peek_avail)
54+ return ssl->ssl_peek_avail;
55 return gnutls_record_check_pending (ssl->gnutls_state);
56 }
57
58@@ -480,11 +499,50 @@
59 return 1;
60 }
61
62+int SSL_peek(SSL *ssl, void *buf, int len)
63+{
64+ if (len > ssl->ssl_peek_buffer_size) {
65+ ssl->ssl_peek_buffer = realloc (ssl->ssl_peek_buffer, len);
66+ ssl->ssl_peek_buffer_size = len;
67+ }
68+
69+ if (ssl->ssl_peek_avail == 0) {
70+
71+ int ret;
72+
73+ ret = gnutls_record_recv(ssl->gnutls_state, ssl->ssl_peek_buffer, len);
74+ ssl->last_error = ret;
75+
76+ if (ret > 0)
77+ ssl->ssl_peek_avail += ret;
78+ }
79+
80+ if (len > ssl->ssl_peek_avail)
81+ len = ssl->ssl_peek_avail;
82+
83+ memcpy (buf, ssl->ssl_peek_buffer, len);
84+
85+ return len;
86+}
87+
88 int
89 SSL_read (SSL * ssl, void *buf, int len)
90 {
91 int ret;
92
93+ if (ssl->ssl_peek_avail) {
94+ int n = (ssl->ssl_peek_avail > len) ? len : ssl->ssl_peek_avail;
95+
96+ memcpy (buf, ssl->ssl_peek_buffer, n);
97+
98+ if (ssl->ssl_peek_avail > n)
99+ memmove (ssl->ssl_peek_buffer, ssl->ssl_peek_buffer + n, ssl->ssl_peek_avail - n);
100+
101+ ssl->ssl_peek_avail -= n;
102+
103+ return n;
104+ }
105+
106 ret = gnutls_record_recv (ssl->gnutls_state, buf, len);
107 ssl->last_error = ret;
108
109Index: gnutls-1.6.0/includes/gnutls/openssl.h
110===================================================================
111--- gnutls-1.6.0.orig/libextra/includes/gnutls/openssl.h 2006-03-08 11:44:58.000000000 +0100
112+++ gnutls-1.6.0/libextra/includes/gnutls/openssl.h 2006-12-12 15:07:26.032227000 +0100
113@@ -164,6 +164,11 @@
114
115 gnutls_transport_ptr_t rfd;
116 gnutls_transport_ptr_t wfd;
117+
118+ char *ssl_peek_buffer;
119+ size_t ssl_peek_buffer_size;
120+ size_t ssl_peek_avail;
121+
122 };
123
124 #define rbio gnutls_state
diff --git a/meta/packages/gnutls/gnutls-2.8.6/gnutls-texinfo-euro.patch b/meta/packages/gnutls/gnutls-2.8.6/gnutls-texinfo-euro.patch
deleted file mode 100644
index a2d2f03870..0000000000
--- a/meta/packages/gnutls/gnutls-2.8.6/gnutls-texinfo-euro.patch
+++ /dev/null
@@ -1,16 +0,0 @@
1The version of texinfo in Debian Sarge does not understand the @euro{} command.
2This patch replaces the @euro{} command with the word "euro".
3
4--- gnutls-1.3.5/doc/gnutls.texi.orig 2006-04-26 08:06:40.918268000 +0930
5+++ gnutls-1.3.5/doc/gnutls.texi 2006-04-26 08:06:52.446515440 +0930
6@@ -11,8 +11,8 @@
7 long as it is difficult enough to generate two different messages with
8 the same hash algorithm output. In that case the same signature could
9 be used as a proof for both messages. Nobody wants to sign an innocent
10-message of donating 1 @euro{} to Greenpeace and find out that he
11-donated 1.000.000 @euro{} to Bad Inc.
12+message of donating 1 euro to Greenpeace and find out that he
13+donated 1.000.000 euro to Bad Inc.
14
15 For a hash algorithm to be called cryptographic the following three
16 requirements must hold
diff --git a/meta/packages/gnutls/gnutls.inc b/meta/packages/gnutls/gnutls.inc
deleted file mode 100644
index 76f4ca63fd..0000000000
--- a/meta/packages/gnutls/gnutls.inc
+++ /dev/null
@@ -1,44 +0,0 @@
1DESCRIPTION = "GNU Transport Layer Security Library"
2HOMEPAGE = "http://www.gnu.org/software/gnutls/"
3BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
4DEPENDS = "zlib lzo gettext libtasn1 libgcrypt (>= 1.4.2)"
5
6LICENSE = "GPLv3+ & LGPLv2.1+"
7LICENSE_${PN} = "LGPLv2.1+"
8LICENSE_${PN}-xx = "GPLv2.1+"
9LICENSE_${PN}-bin = "GPLv3+"
10LICENSE_${PN}-extra = "GPLv3+"
11LICENSE_${PN}-openssl = "GPLv3+"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
13 file://lib/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
14 file://libextra/COPYING;md5=d32239bcb673463ab874e80d47fae504"
15
16SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/gnutls-${PV}.tar.bz2"
17
18inherit autotools binconfig pkgconfig
19
20EXTRA_OECONF="--with-included-opencdk --with-included-libcfg --disable-rpath \
21 --with-libtasn1-prefix=${STAGING_DIR_HOST}${prefix} \
22 --with-libgcrypt-prefix=${STAGING_DIR_HOST}${prefix} \
23 --with-libz-prefix=${STAGING_DIR_HOST}${prefix} --with-lzo --disable-guile"
24
25do_configure_prepend() {
26 for dir in . lib libextra; do
27 rm ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
28 done
29}
30
31PACKAGES =+ "${PN}-openssl ${PN}-extra ${PN}-bin ${PN}-xx"
32
33FILES_${PN} = "${libdir}/libgnutls.so.*"
34FILES_${PN}-bin = "${bindir}/gnutls-serv \
35 ${bindir}/gnutls-cli \
36 ${bindir}/srptool \
37 ${bindir}/psktool \
38 ${bindir}/certtool \
39 ${bindir}/gnutls-srpcrypt"
40
41FILES_${PN}-dev += "${bindir}/*-config ${bindir}/gnutls-cli-debug"
42FILES_${PN}-extra = "${libdir}/libgnutls-extra.so.*"
43FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
44FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
diff --git a/meta/packages/gnutls/gnutls_2.8.6.bb b/meta/packages/gnutls/gnutls_2.8.6.bb
deleted file mode 100644
index d8adc6ba17..0000000000
--- a/meta/packages/gnutls/gnutls_2.8.6.bb
+++ /dev/null
@@ -1,7 +0,0 @@
1require gnutls.inc
2
3PR = "r0"
4
5SRC_URI += "file://gnutls-openssl.patch \
6 file://gnutls-texinfo-euro.patch \
7 file://configure-fix.patch"
diff --git a/meta/packages/gnutls/libtasn1_2.7.bb b/meta/packages/gnutls/libtasn1_2.7.bb
deleted file mode 100644
index 11a7dc5055..0000000000
--- a/meta/packages/gnutls/libtasn1_2.7.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1DESCRIPTION = "Library for ASN.1 and DER manipulation"
2HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
3
4LICENSE = "GPLv3+ & LGPLv2.1+"
5LICENSE_${PN}-bin = "GPLv3+"
6LICENSE_${PN} = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
8 file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
9 file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
10
11RREPLACES_${PN}-bin = "libtasn1 (<< 2.7)"
12
13PR = "r0"
14
15SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/libtasn1/libtasn1-${PV}.tar.gz"
16
17inherit autotools binconfig lib_package
18
19AUTOTOOLS_STAGE_PKGCONFIG = "1"
20
21BBCLASSEXTEND = "native"
diff --git a/meta/packages/gperf/gperf.inc b/meta/packages/gperf/gperf.inc
deleted file mode 100644
index a521e0943b..0000000000
--- a/meta/packages/gperf/gperf.inc
+++ /dev/null
@@ -1,22 +0,0 @@
1DESCRIPTION = "GNU gperf is a perfect hash function generator"
2HOMEPAGE = "http://www.gnu.org/software/gperf"
3SUMMARY = "Generate a perfect hash function from a set of keywords"
4LICENSE = "GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
6 file://src/main.cc;firstline=8;endline=19;md5=24688d2dff69bcf5cbea4bc3e4174c5a"
7
8SRC_URI = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz"
9
10inherit autotools
11
12# autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of
13# duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal
14EXTRA_AUTORECONF += " -I ${S}"
15
16do_configure_prepend() {
17 if [ ! -e acinclude.m4 ]; then
18 cat aclocal.m4 > acinclude.m4
19 fi
20}
21
22BBCLASSEXTEND = "native"
diff --git a/meta/packages/gperf/gperf_3.0.3.bb b/meta/packages/gperf/gperf_3.0.3.bb
deleted file mode 100644
index 5cccdf1adb..0000000000
--- a/meta/packages/gperf/gperf_3.0.3.bb
+++ /dev/null
@@ -1,7 +0,0 @@
1require gperf.inc
2
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=a5f84abb0070adf8a0925d7d534b6e0a \
5 file://src/main.cc;firstline=8;endline=19;md5=3eab12ba436c4da725b19b131def6de9"
6
7PR = "r1"
diff --git a/meta/packages/gperf/gperf_3.0.4.bb b/meta/packages/gperf/gperf_3.0.4.bb
deleted file mode 100644
index ee532c98d8..0000000000
--- a/meta/packages/gperf/gperf_3.0.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require gperf.inc
2
3PR = "r0"
diff --git a/meta/packages/gpgme/gpgme-1.3.0/disable_gpgconf_check.patch b/meta/packages/gpgme/gpgme-1.3.0/disable_gpgconf_check.patch
deleted file mode 100644
index f56f35b9ed..0000000000
--- a/meta/packages/gpgme/gpgme-1.3.0/disable_gpgconf_check.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 1.2.0, gpgme will check if gpgconf & g13(from 1.3.0) exist, and cause
2configure failure if not founding them in cross-compile environment. We can
3add the gnupg-native to get them, but still have some issues:
4
51. need add new package: libksba, update libassuan(not in sato), and extend
6 native support in some other packages(libgcrypt, libgpg-error, pth...)
72. Even we have gnupg, the g13 only exist in development branch, so that we
8 still have the g13 check failure in configure.
9
10I have searched the compile log, and found gpgconf/g13 are not used. So use a
11simple method here, throw a warning mesg rather than an error here just like in
12non-cross-compile environment.
13
14Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
15
16
17Index: gpgme-1.3.0/configure.ac
18===================================================================
19--- gpgme-1.3.0.orig/configure.ac 2010-07-21 09:38:09.000000000 +0800
20+++ gpgme-1.3.0/configure.ac 2010-07-21 09:39:19.000000000 +0800
21@@ -574,7 +574,7 @@
22 *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it
23 ***])
24 else
25- AC_MSG_ERROR([
26+ AC_MSG_WARN([
27 ***
28 *** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH
29 ***])
30@@ -670,7 +670,7 @@
31 *** Could not find g13, install g13 or use --with-g13=PATH to enable it
32 ***])
33 else
34- AC_MSG_ERROR([
35+ AC_MSG_WARN([
36 ***
37 *** Can not determine path to g13 when cross-compiling, use --with-g13=PATH
38 ***])
diff --git a/meta/packages/gpgme/gpgme_1.3.0.bb b/meta/packages/gpgme/gpgme_1.3.0.bb
deleted file mode 100644
index 1c665b5ea4..0000000000
--- a/meta/packages/gpgme/gpgme_1.3.0.bb
+++ /dev/null
@@ -1,25 +0,0 @@
1DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
2HOMEPAGE = "http://www.gnupg.org/gpgme.html"
3BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
4
5LICENSE = "GPLv2+ & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
7 file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
8 file://src/gpgme.h;endline=23;md5=2775a99d3dd524c4f848ff1c59093038 \
9 file://src/engine.h;endline=22;md5=e96acfaab1cff82dd8fbefddd2f5c436"
10
11SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-${PV}.tar.bz2 \
12 file://disable_gpgconf_check.patch;patch=1;pnum=1"
13DEPENDS = "libgpg-error libassuan pth"
14PR = "r0"
15
16EXTRA_OECONF = "--with-pth=${STAGING_DIR_HOST} --without-pth-test \
17 --with-gpg=${bindir}/gpg --without-gpgsm"
18
19inherit autotools binconfig
20
21PACKAGES =+ "${PN}-pth ${PN}-pthread"
22FILES_${PN}-pth = "${libdir}/libgpgme-pth.so.*"
23FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*"
24FILES_${PN} = "${libdir}/libgpgme.so.*"
25FILES_${PN}-dev += "${bindir}/gpgme-config"
diff --git a/meta/packages/grep/grep-2.5.1a/uclibc-fix.patch b/meta/packages/grep/grep-2.5.1a/uclibc-fix.patch
deleted file mode 100644
index 8fc7c4852f..0000000000
--- a/meta/packages/grep/grep-2.5.1a/uclibc-fix.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1# Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
2# doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have
3# mempcpy, we'll just use that instead.
4# Patch source: OpenEmbedded
5
6Index: grep-2.5.1/intl/localealias.c
7===================================================================
8--- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100
9+++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000
10@@ -65,7 +65,7 @@
11 # define strcasecmp __strcasecmp
12
13 # ifndef mempcpy
14-# define mempcpy __mempcpy
15+# error "mempcpy not detected"
16 # endif
17 # define HAVE_MEMPCPY 1
18 # define HAVE___FSETLOCKING 1
19Index: grep-2.5.1/lib/getopt.c
20===================================================================
21--- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100
22+++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000
23@@ -326,7 +326,7 @@
24 nonoption_flags_len = nonoption_flags_max_len = 0;
25 else
26 {
27- memset (__mempcpy (new_str, __getopt_nonoption_flags,
28+ memset (mempcpy (new_str, __getopt_nonoption_flags,
29 nonoption_flags_max_len),
30 '\0', top + 1 - nonoption_flags_max_len);
31 nonoption_flags_max_len = top + 1;
32@@ -437,7 +437,7 @@
33 if (__getopt_nonoption_flags == NULL)
34 nonoption_flags_max_len = -1;
35 else
36- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
37+ memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
38 '\0', nonoption_flags_max_len - len);
39 }
40 }
41Index: grep-2.5.1/lib/regex.c
42===================================================================
43--- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000
44+++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000
45@@ -7842,7 +7842,7 @@
46 if (msg_size > errbuf_size)
47 {
48 #if defined HAVE_MEMPCPY || defined _LIBC
49- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
50+ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
51 #else
52 memcpy (errbuf, msg, errbuf_size - 1);
53 errbuf[errbuf_size - 1] = 0;
diff --git a/meta/packages/grep/grep_2.5.1a.bb b/meta/packages/grep/grep_2.5.1a.bb
deleted file mode 100644
index d50d5a374e..0000000000
--- a/meta/packages/grep/grep_2.5.1a.bb
+++ /dev/null
@@ -1,40 +0,0 @@
1DESCRIPTION = "grep GNU utility"
2SECTION = "console/utils"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
5
6PR = "r1"
7
8SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
9 file://uclibc-fix.patch"
10
11SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c"
12SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132"
13
14inherit autotools gettext
15
16EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
17
18do_configure_prepend () {
19 rm -f ${S}/m4/init.m4
20}
21
22do_install () {
23 autotools_do_install
24 install -d ${D}${base_bindir}
25 mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
26 mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
27 mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
28}
29
30pkg_postinst_${PN} () {
31 update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
32 update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
33 update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
34}
35
36pkg_prerm_${PN} () {
37 update-alternatives --remove grep grep.${PN}
38 update-alternatives --remove egrep egrep.${PN}
39 update-alternatives --remove fgrep fgrep.${PN}
40}
diff --git a/meta/packages/gsm/files/0001-Introduce-ports.patch b/meta/packages/gsm/files/0001-Introduce-ports.patch
deleted file mode 100644
index b3ba3cb957..0000000000
--- a/meta/packages/gsm/files/0001-Introduce-ports.patch
+++ /dev/null
@@ -1,710 +0,0 @@
1From 516d67c679101d1503dbd4c0613bcd6ff1b604e4 Mon Sep 17 00:00:00 2001
2From: Andrzej Zaborowski <balrog@zabor.org>
3Date: Wed, 19 Sep 2007 14:03:28 +0200
4Subject: [PATCH] Introduce ports.
5
6---
7 include/gsmd/atcmd.h | 2 +-
8 include/gsmd/gsmd.h | 7 +-
9 include/gsmd/uart.h | 28 ++++++
10 include/gsmd/vendorplugin.h | 4 +-
11 src/gsmd/Makefile.am | 2 +-
12 src/gsmd/atcmd.c | 177 +++++++++++++++++---------------------
13 src/gsmd/gsmd.c | 64 ++------------
14 src/gsmd/uart.c | 202 +++++++++++++++++++++++++++++++++++++++++++
15 8 files changed, 328 insertions(+), 158 deletions(-)
16 create mode 100644 include/gsmd/uart.h
17 create mode 100644 src/gsmd/uart.c
18
19diff --git a/include/gsmd/atcmd.h b/include/gsmd/atcmd.h
20index 0d6c62a..a1af6a0 100644
21--- a/include/gsmd/atcmd.h
22+++ b/include/gsmd/atcmd.h
23@@ -9,7 +9,7 @@ typedef int atcmd_cb_t(struct gsmd_atcmd *cmd, void *ctx, char *resp);
24
25 extern struct gsmd_atcmd *atcmd_fill(const char *cmd, int rlen, atcmd_cb_t *cb, void *ctx, u_int16_t id);
26 extern int atcmd_submit(struct gsmd *g, struct gsmd_atcmd *cmd);
27-extern int atcmd_init(struct gsmd *g, int sockfd);
28+extern int atcmd_init(struct gsmd *g, struct gsmd_port *port);
29 extern void atcmd_drain(int fd);
30
31 #endif /* __GSMD__ */
32diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
33index ed334f1..4afdf66 100644
34--- a/include/gsmd/gsmd.h
35+++ b/include/gsmd/gsmd.h
36@@ -10,6 +10,7 @@
37 #include <gsmd/machineplugin.h>
38 #include <gsmd/vendorplugin.h>
39 #include <gsmd/select.h>
40+#include <gsmd/uart.h>
41 #include <gsmd/state.h>
42
43 void *gsmd_tallocs;
44@@ -52,6 +53,7 @@ enum llparse_state {
45 #define MLPARSE_BUF_SIZE 65535
46
47 struct llparser {
48+ struct gsmd_port *port;
49 enum llparse_state state;
50 unsigned int len;
51 unsigned int flags;
52@@ -70,7 +72,7 @@ struct gsmd;
53 struct gsmd {
54 unsigned int flags;
55 int interpreter_ready;
56- struct gsmd_fd gfd_uart;
57+ struct gsmd_uart uart;
58 struct gsmd_fd gfd_sock;
59 struct llparser llp;
60 struct llist_head users;
61@@ -81,9 +83,10 @@ struct gsmd {
62 struct gsmd_device_state dev_state;
63
64 struct llist_head operators; /* cached list of operator names */
65- unsigned char *mlbuf; /* ml_parse buffer */
66+ char *mlbuf; /* ml_parse buffer */
67 unsigned int mlbuf_len;
68 int mlunsolicited;
69+ int clear_to_send;
70 };
71
72 struct gsmd_user {
73diff --git a/include/gsmd/uart.h b/include/gsmd/uart.h
74new file mode 100644
75index 0000000..a006fa7
76--- /dev/null
77+++ b/include/gsmd/uart.h
78@@ -0,0 +1,28 @@
79+#ifndef __GSMD_UART_H
80+#define __GSMD_UART_H
81+
82+#ifdef __GSMD__
83+
84+struct gsmd_port {
85+ int (*write)(struct gsmd_port *port, const char data[], int len);
86+ int (*set_break)(struct gsmd_port *port, int state);
87+ /* more parameters here */
88+ int (*newdata_cb)(void *opaque, const char data[], int len);
89+ void *newdata_opaque;
90+};
91+
92+struct gsmd_uart {
93+ struct gsmd_port port;
94+ struct gsmd_fd gfd;
95+ char txfifo[2048];
96+ int tx_start;
97+ int tx_len;
98+};
99+
100+extern int set_baudrate(int fd, int baudrate, int hwflow);
101+extern void uart_drain(int fd);
102+extern int uart_init(struct gsmd_uart *uart, int sockfd);
103+
104+#endif /* __GSMD__ */
105+
106+#endif
107diff --git a/include/gsmd/vendorplugin.h b/include/gsmd/vendorplugin.h
108index 1911fef..1c82790 100644
109--- a/include/gsmd/vendorplugin.h
110+++ b/include/gsmd/vendorplugin.h
111@@ -11,8 +11,8 @@ struct gsmd_unsolicit;
112
113 struct gsmd_vendor_plugin {
114 struct llist_head list;
115- unsigned char *name;
116- unsigned char *ext_chars;
117+ char *name;
118+ char *ext_chars;
119 unsigned int num_unsolicit;
120 const struct gsmd_unsolicit *unsolicit;
121 int (*detect)(struct gsmd *g);
122diff --git a/src/gsmd/Makefile.am b/src/gsmd/Makefile.am
123index 9ac45ee..110b757 100644
124--- a/src/gsmd/Makefile.am
125+++ b/src/gsmd/Makefile.am
126@@ -13,7 +13,7 @@ sbin_PROGRAMS = gsmd
127 gsmd_CFLAGS = -D PLUGINDIR=\"$(plugindir)\"
128 gsmd_SOURCES = gsmd.c atcmd.c select.c machine.c vendor.c unsolicited.c log.c \
129 usock.c talloc.c timer.c operator_cache.c ext_response.c \
130- sms_cb.c sms_pdu.c
131+ sms_cb.c sms_pdu.c uart.c
132 gsmd_LDADD = -ldl
133 gsmd_LDFLAGS = -Wl,--export-dynamic
134
135diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c
136index 2ef6a10..27dfa41 100644
137--- a/src/gsmd/atcmd.c
138+++ b/src/gsmd/atcmd.c
139@@ -159,7 +159,8 @@ static int llparse_byte(struct llparser *llp, char byte)
140 return ret;
141 }
142
143-static int llparse_string(struct llparser *llp, char *buf, unsigned int len)
144+static int llparse_string(struct llparser *llp, const char *buf,
145+ unsigned int len)
146 {
147 while (len--) {
148 int rc = llparse_byte(llp, *(buf++));
149@@ -187,6 +188,55 @@ static int llparse_init(struct llparser *llp)
150 return 0;
151 }
152
153+/* See if we can now send more commands to the port */
154+static void atcmd_wake_queue(struct gsmd *g)
155+{
156+ int len, rc;
157+ char *cr;
158+
159+ /* write pending commands to UART */
160+ while (g->interpreter_ready && g->clear_to_send) {
161+ struct gsmd_atcmd *pos, *pos2;
162+ llist_for_each_entry_safe(pos, pos2, &g->pending_atcmds, list) {
163+ cr = strchr(pos->cur, '\n');
164+ if (cr)
165+ len = cr - pos->cur;
166+ else
167+ len = pos->buflen;
168+ rc = g->llp.port->write(g->llp.port, pos->cur, len);
169+ if (rc == 0) {
170+ gsmd_log(GSMD_ERROR,
171+ "write returns 0, aborting\n");
172+ break;
173+ }
174+ if (cr && rc == len)
175+ rc ++; /* Skip the \n */
176+ pos->buflen -= rc;
177+ pos->cur += rc;
178+ g->llp.port->write(g->llp.port, "\r", 1);
179+
180+ if (!pos->buflen) {
181+ /* success: remove from global list of
182+ * to-be-sent atcmds */
183+ llist_del(&pos->list);
184+ /* append to global list of executing atcmds */
185+ llist_add_tail(&pos->list, &g->busy_atcmds);
186+
187+ /* we only send one cmd at the moment */
188+ g->clear_to_send = 0;
189+ break;
190+ } else {
191+ /* The write was short or the atcmd has more
192+ * lines to send after a "> ". */
193+ if (rc < len)
194+ break;
195+ g->clear_to_send = 0;
196+ break;
197+ }
198+ }
199+ }
200+}
201+
202 /* mid-level parser */
203
204 static int parse_final_result(const char *res)
205@@ -216,6 +266,7 @@ static int ml_parse(const char *buf, int len, void *ctx)
206 g->interpreter_ready = 1;
207 gsmd_initsettings(g);
208 gmsd_alive_start(g);
209+ atcmd_wake_queue(g);
210 return 0;
211 }
212
213@@ -316,6 +367,7 @@ static int ml_parse(const char *buf, int len, void *ctx)
214 } else {
215 DEBUGP("Calling cmd->cb()\n");
216 cmd->resp = g->mlbuf;
217+ g->mlbuf[g->mlbuf_len] = 0;
218 rc = cmd->cb(cmd, cmd->ctx, cmd->resp);
219 DEBUGP("Clearing mlbuf\n");
220 }
221@@ -370,12 +422,15 @@ static int ml_parse(const char *buf, int len, void *ctx)
222 if (g->mlbuf_len)
223 g->mlbuf[g->mlbuf_len ++] = '\n';
224 DEBUGP("Appending buf to mlbuf\n");
225- if (len > MLPARSE_BUF_SIZE - g->mlbuf_len)
226+ if (len > MLPARSE_BUF_SIZE - g->mlbuf_len) {
227 len = MLPARSE_BUF_SIZE - g->mlbuf_len;
228+ gsmd_log(GSMD_NOTICE, "g->mlbuf overrun\n");
229+ }
230 memcpy(g->mlbuf + g->mlbuf_len, buf, len);
231 g->mlbuf_len += len;
232
233 if (g->mlunsolicited) {
234+ g->mlbuf[g->mlbuf_len] = 0;
235 rc = unsolicited_parse(g, g->mlbuf, g->mlbuf_len,
236 strchr(g->mlbuf, ':') + 1);
237 if (rc == -EAGAIN) {
238@@ -422,8 +477,11 @@ final_cb:
239
240 /* if we're finished with current commands, but still have pending
241 * commands: we want to WRITE again */
242- if (llist_empty(&g->busy_atcmds) && !llist_empty(&g->pending_atcmds))
243- g->gfd_uart.when |= GSMD_FD_WRITE;
244+ if (llist_empty(&g->busy_atcmds)) {
245+ g->clear_to_send = 1;
246+ if (!llist_empty(&g->pending_atcmds))
247+ atcmd_wake_queue(g);
248+ }
249
250 return rc;
251 }
252@@ -433,85 +491,23 @@ static int atcmd_prompt(void *data)
253 {
254 struct gsmd *g = data;
255
256- g->gfd_uart.when |= GSMD_FD_WRITE;
257+ g->clear_to_send = 1;
258+ atcmd_wake_queue(g);
259 }
260
261 /* callback to be called if [virtual] UART has some data for us */
262-static int atcmd_select_cb(int fd, unsigned int what, void *data)
263+static int atcmd_newdata_cb(void *opaque, const char data[], int len)
264 {
265- int len, rc;
266- static char rxbuf[1024];
267- struct gsmd *g = data;
268- char *cr;
269-
270- if (what & GSMD_FD_READ) {
271- memset(rxbuf, 0, sizeof(rxbuf));
272- while ((len = read(fd, rxbuf, sizeof(rxbuf)))) {
273- if (len < 0) {
274- if (errno == EAGAIN)
275- return 0;
276- gsmd_log(GSMD_NOTICE, "ERROR reading from fd %u: %d (%s)\n", fd, len,
277- strerror(errno));
278- return len;
279- }
280- rc = llparse_string(&g->llp, rxbuf, len);
281- if (rc < 0) {
282- gsmd_log(GSMD_ERROR, "ERROR during llparse_string: %d\n", rc);
283- return rc;
284- }
285- }
286- }
287-
288- /* write pending commands to UART */
289- if ((what & GSMD_FD_WRITE) && g->interpreter_ready) {
290- struct gsmd_atcmd *pos, *pos2;
291- llist_for_each_entry_safe(pos, pos2, &g->pending_atcmds, list) {
292- cr = strchr(pos->cur, '\n');
293- if (cr)
294- len = cr - pos->cur;
295- else
296- len = pos->buflen - 1; /* assuming zero-terminated strings */
297- rc = write(fd, pos->cur, len);
298- if (rc == 0) {
299- gsmd_log(GSMD_ERROR, "write returns 0, aborting\n");
300- break;
301- } else if (rc < 0) {
302- gsmd_log(GSMD_ERROR, "error during write to fd %d: %d\n",
303- fd, rc);
304- return rc;
305- }
306- if (!cr || rc == len)
307- rc ++; /* Skip the \n or \0 */
308- pos->buflen -= rc;
309- pos->cur += rc;
310- write(fd, "\r", 1);
311-
312- if (!pos->buflen) {
313- /* success: remove from global list of
314- * to-be-sent atcmds */
315- llist_del(&pos->list);
316- /* append to global list of executing atcmds */
317- llist_add_tail(&pos->list, &g->busy_atcmds);
318-
319- /* we only send one cmd at the moment */
320- break;
321- } else {
322- /* The write was short or the atcmd has more
323- * lines to send after a "> ". */
324- if (rc < len)
325- return 0;
326- break;
327- }
328- }
329+ struct gsmd *g = opaque;
330+ int rc;
331
332- /* Either pending_atcmds is empty or a command has to wait */
333- g->gfd_uart.when &= ~GSMD_FD_WRITE;
334- }
335+ rc = llparse_string(&g->llp, data, len);
336+ if (rc < 0)
337+ gsmd_log(GSMD_ERROR, "ERROR during llparse_string: %d\n", rc);
338
339- return 0;
340+ return rc;
341 }
342
343-
344 struct gsmd_atcmd *atcmd_fill(const char *cmd, int rlen,
345 atcmd_cb_t cb, void *ctx, u_int16_t id)
346 {
347@@ -544,36 +540,18 @@ int atcmd_submit(struct gsmd *g, struct gsmd_atcmd *cmd)
348 {
349 DEBUGP("submitting command `%s'\n", cmd->buf);
350
351- if (llist_empty(&g->pending_atcmds))
352- g->gfd_uart.when |= GSMD_FD_WRITE;
353+ llist_empty(&g->pending_atcmds);
354 llist_add_tail(&cmd->list, &g->pending_atcmds);
355+ atcmd_wake_queue(g);
356
357 return 0;
358 }
359
360-void atcmd_drain(int fd)
361-{
362- int rc;
363- struct termios t;
364- rc = tcflush(fd, TCIOFLUSH);
365- rc = tcgetattr(fd, &t);
366- DEBUGP("c_iflag = 0x%08x, c_oflag = 0x%08x, c_cflag = 0x%08x, c_lflag = 0x%08x\n",
367- t.c_iflag, t.c_oflag, t.c_cflag, t.c_lflag);
368- t.c_iflag = t.c_oflag = 0;
369- cfmakeraw(&t);
370- rc = tcsetattr(fd, TCSANOW, &t);
371-}
372-
373 /* init atcmd parser */
374-int atcmd_init(struct gsmd *g, int sockfd)
375+int atcmd_init(struct gsmd *g, struct gsmd_port *port)
376 {
377 __atcmd_ctx = talloc_named_const(gsmd_tallocs, 1, "atcmds");
378
379- g->gfd_uart.fd = sockfd;
380- g->gfd_uart.when = GSMD_FD_READ;
381- g->gfd_uart.data = g;
382- g->gfd_uart.cb = &atcmd_select_cb;
383-
384 INIT_LLIST_HEAD(&g->pending_atcmds);
385 INIT_LLIST_HEAD(&g->busy_atcmds);
386
387@@ -581,7 +559,9 @@ int atcmd_init(struct gsmd *g, int sockfd)
388
389 g->mlbuf_len = 0;
390 g->mlunsolicited = 0;
391+ g->clear_to_send = 1;
392
393+ g->llp.port = port;
394 g->llp.cur = g->llp.buf;
395 g->llp.len = sizeof(g->llp.buf);
396 g->llp.cb = &ml_parse;
397@@ -589,5 +569,8 @@ int atcmd_init(struct gsmd *g, int sockfd)
398 g->llp.ctx = g;
399 g->llp.flags = LGSM_ATCMD_F_EXTENDED;
400
401- return gsmd_register_fd(&g->gfd_uart);
402+ port->newdata_opaque = g;
403+ port->newdata_cb = atcmd_newdata_cb;
404+
405+ return 0;
406 }
407diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c
408index 51b4f2c..846bd17 100644
409--- a/src/gsmd/gsmd.c
410+++ b/src/gsmd/gsmd.c
411@@ -26,7 +26,6 @@
412 #include <string.h>
413 #include <errno.h>
414 #include <fcntl.h>
415-#include <termios.h>
416 #include <signal.h>
417
418 #define _GNU_SOURCE
419@@ -247,56 +246,6 @@ int gsmd_initsettings(struct gsmd *gsmd)
420 return atcmd_submit(gsmd, cmd);
421 }
422
423-struct bdrt {
424- int bps;
425- u_int32_t b;
426-};
427-
428-static struct bdrt bdrts[] = {
429- { 0, B0 },
430- { 9600, B9600 },
431- { 19200, B19200 },
432- { 38400, B38400 },
433- { 57600, B57600 },
434- { 115200, B115200 },
435- { 230400, B230400 },
436- { 460800, B460800 },
437- { 921600, B921600 },
438-};
439-
440-static int set_baudrate(int fd, int baudrate, int hwflow)
441-{
442- int i;
443- u_int32_t bd = 0;
444- struct termios ti;
445-
446- for (i = 0; i < ARRAY_SIZE(bdrts); i++) {
447- if (bdrts[i].bps == baudrate)
448- bd = bdrts[i].b;
449- }
450- if (bd == 0)
451- return -EINVAL;
452-
453- i = tcgetattr(fd, &ti);
454- if (i < 0)
455- return i;
456-
457- i = cfsetispeed(&ti, B0);
458- if (i < 0)
459- return i;
460-
461- i = cfsetospeed(&ti, bd);
462- if (i < 0)
463- return i;
464-
465- if (hwflow)
466- ti.c_cflag |= CRTSCTS;
467- else
468- ti.c_cflag &= ~CRTSCTS;
469-
470- return tcsetattr(fd, 0, &ti);
471-}
472-
473 static int gsmd_initialize(struct gsmd *g)
474 {
475 INIT_LLIST_HEAD(&g->users);
476@@ -478,14 +427,19 @@ int main(int argc, char **argv)
477 if (wait >= 0)
478 g.interpreter_ready = !wait;
479
480- if (atcmd_init(&g, fd) < 0) {
481+ if (uart_init(&g.uart, fd) < 0) {
482 fprintf(stderr, "can't initialize UART device\n");
483 exit(1);
484 }
485
486- write(fd, "\r", 1);
487- sleep(1);
488- atcmd_drain(fd);
489+ if (atcmd_init(&g, &g.uart.port) < 0) {
490+ fprintf(stderr, "can't initialize AT parser\n");
491+ exit(1);
492+ }
493+ write(fd, "\r", 1);
494+ sleep(1);
495+
496+ uart_drain(fd);
497
498 if (usock_init(&g) < 0) {
499 fprintf(stderr, "can't open unix socket\n");
500diff --git a/src/gsmd/uart.c b/src/gsmd/uart.c
501new file mode 100644
502index 0000000..22a4a5c
503--- /dev/null
504+++ b/src/gsmd/uart.c
505@@ -0,0 +1,202 @@
506+/* Wrapper for the physical UART in a struct gsmd_port abstraction.
507+ *
508+ * Copyright (C) 2007 OpenMoko, Inc.
509+ * Written by Andrzej Zaborowski <andrew@openedhand.com>
510+ *
511+ * This program is free software; you can redistribute it and/or
512+ * modify it under the terms of the GNU General Public License as
513+ * published by the Free Software Foundation; either version 2 of
514+ * the License, or (at your option) any later version.
515+ *
516+ * This program is distributed in the hope that it will be useful,
517+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
518+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
519+ * GNU General Public License for more details.
520+ *
521+ * You should have received a copy of the GNU General Public License
522+ * along with this program; if not, write to the Free Software
523+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
524+ * MA 02111-1307 USA
525+ */
526+
527+#include <string.h>
528+#include <fcntl.h>
529+#include <termios.h>
530+#include <unistd.h>
531+#include <errno.h>
532+
533+#include "gsmd.h"
534+
535+#include <gsmd/gsmd.h>
536+
537+void uart_drain(int fd)
538+{
539+ int rc;
540+ struct termios t;
541+ rc = tcflush(fd, TCIOFLUSH);
542+ rc = tcgetattr(fd, &t);
543+ DEBUGP(
544+ "c_iflag = 0x%08x, c_oflag = 0x%08x, "
545+ "c_cflag = 0x%08x, c_lflag = 0x%08x\n",
546+ t.c_iflag, t.c_oflag, t.c_cflag, t.c_lflag);
547+ t.c_iflag = t.c_oflag = 0;
548+ cfmakeraw(&t);
549+ rc = tcsetattr(fd, TCSANOW, &t);
550+}
551+
552+struct bdrt {
553+ int bps;
554+ u_int32_t b;
555+};
556+
557+static struct bdrt bdrts[] = {
558+ { 0, B0 },
559+ { 9600, B9600 },
560+ { 19200, B19200 },
561+ { 38400, B38400 },
562+ { 57600, B57600 },
563+ { 115200, B115200 },
564+ { 230400, B230400 },
565+ { 460800, B460800 },
566+ { 921600, B921600 },
567+};
568+
569+int set_baudrate(int fd, int baudrate, int hwflow)
570+{
571+ int i;
572+ u_int32_t bd = 0;
573+ struct termios ti;
574+
575+ for (i = 0; i < ARRAY_SIZE(bdrts); i++) {
576+ if (bdrts[i].bps == baudrate)
577+ bd = bdrts[i].b;
578+ }
579+ if (bd == 0)
580+ return -EINVAL;
581+
582+ i = tcgetattr(fd, &ti);
583+ if (i < 0)
584+ return i;
585+
586+ i = cfsetispeed(&ti, B0);
587+ if (i < 0)
588+ return i;
589+
590+ i = cfsetospeed(&ti, bd);
591+ if (i < 0)
592+ return i;
593+
594+ if (hwflow)
595+ ti.c_cflag |= CRTSCTS;
596+ else
597+ ti.c_cflag &= ~CRTSCTS;
598+
599+ return tcsetattr(fd, 0, &ti);
600+}
601+
602+static int uart_select_cb(int fd, unsigned int what, void *data)
603+{
604+ struct gsmd_uart *uart = (struct gsmd_uart *) data;
605+ static char rxbuf[2048];
606+ int rc, len;
607+
608+ if ((what & GSMD_FD_READ) && uart->port.newdata_cb) {
609+ while ((len = read(fd, rxbuf, sizeof(rxbuf)))) {
610+ if (len < 0) {
611+ if (errno == EAGAIN || errno == EINTR)
612+ return 0;
613+ gsmd_log(GSMD_NOTICE, "ERROR reading from "
614+ "fd %u: %d (%s)\n", fd, errno,
615+ strerror(errno));
616+ return -errno;
617+ }
618+
619+ rc = uart->port.newdata_cb(
620+ uart->port.newdata_opaque,
621+ rxbuf,
622+ len);
623+ if (rc < 0)
624+ return rc;
625+ }
626+ }
627+
628+ /* Write pending data to UART. */
629+ if ((what & GSMD_FD_WRITE) && uart->tx_len) {
630+ while (uart->tx_start + uart->tx_len >= sizeof(uart->txfifo)) {
631+ len = sizeof(uart->txfifo) - uart->tx_start;
632+ rc = write(fd, &uart->txfifo[uart->tx_start], len);
633+ if (rc < 0 && errno != EINTR) {
634+ if (errno == EAGAIN)
635+ return 0;
636+ gsmd_log(GSMD_NOTICE, "ERROR writing "
637+ "fd %u: %d (%s)\n", fd, errno,
638+ strerror(errno));
639+ return -errno;
640+ }
641+
642+ if (rc > 0) {
643+ uart->tx_start += rc;
644+ uart->tx_len -= rc;
645+ }
646+ }
647+ uart->tx_start &= sizeof(uart->txfifo) - 1;
648+
649+ while (uart->tx_len) {
650+ rc = write(fd, &uart->txfifo[uart->tx_start],
651+ uart->tx_len);
652+ if (rc < 0 && errno != EINTR) {
653+ if (errno == EAGAIN)
654+ return 0;
655+ gsmd_log(GSMD_NOTICE, "ERROR writing "
656+ "fd %u: %d (%s)\n", fd, errno,
657+ strerror(errno));
658+ return -errno;
659+ }
660+
661+ if (rc > 0) {
662+ uart->tx_start += rc;
663+ uart->tx_len -= rc;
664+ }
665+ }
666+
667+ /* If we reached here, there's no more data for the moment. */
668+ uart->gfd.when &= ~GSMD_FD_WRITE;
669+ }
670+
671+ return 0;
672+}
673+
674+static int uart_write(struct gsmd_port *port, const char data[], int len)
675+{
676+ struct gsmd_uart *uart = (struct gsmd_uart *) port;
677+ int start = (uart->tx_start + uart->tx_len) &
678+ (sizeof(uart->txfifo) - 1);
679+ int space = sizeof(uart->txfifo) - start;
680+
681+ if (uart->tx_len + len > sizeof(uart->txfifo))
682+ len = sizeof(uart->txfifo) - uart->tx_len;
683+
684+ if (len)
685+ uart->gfd.when |= GSMD_FD_WRITE;
686+
687+ if (len > space) {
688+ memcpy(uart->txfifo + start, data, space);
689+ memcpy(uart->txfifo, data + space, len - space);
690+ } else
691+ memcpy(uart->txfifo + start, data, len);
692+
693+ uart->tx_len += len;
694+ return len;
695+}
696+
697+int uart_init(struct gsmd_uart *uart, int sockfd)
698+{
699+ uart->gfd.fd = sockfd;
700+ uart->gfd.when = GSMD_FD_READ;
701+ uart->gfd.data = uart;
702+ uart->gfd.cb = &uart_select_cb;
703+
704+ uart->port.write = uart_write;
705+
706+ return gsmd_register_fd(&uart->gfd);
707+}
708--
7091.5.2.1
710
diff --git a/meta/packages/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch b/meta/packages/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch
deleted file mode 100644
index 3683596389..0000000000
--- a/meta/packages/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 1078f7aced63c6216bffe649930b97c9ccf9a16e Mon Sep 17 00:00:00 2001
2From: Andrzej Zaborowski <balrog@zabor.org>
3Date: Wed, 19 Sep 2007 14:04:50 +0200
4Subject: [PATCH] Flush all pending commands before restarting the modem initialisation.
5
6---
7 include/gsmd/gsmd.h | 1 +
8 src/gsmd/atcmd.c | 21 +++++++++++++++++++++
9 src/gsmd/timer.c | 8 ++++++++
10 3 files changed, 30 insertions(+), 0 deletions(-)
11
12diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
13index 4afdf66..6ac9d8e 100644
14--- a/include/gsmd/gsmd.h
15+++ b/include/gsmd/gsmd.h
16@@ -131,6 +131,7 @@ struct gsmd_timer {
17
18 int gsmd_timer_init(void);
19 void gmsd_timer_check_n_run(void);
20+void gsmd_timer_reset(void);
21
22 struct gsmd_timer *gsmd_timer_alloc(void);
23 int gsmd_timer_register(struct gsmd_timer *timer);
24diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c
25index 27dfa41..2f6cee2 100644
26--- a/src/gsmd/atcmd.c
27+++ b/src/gsmd/atcmd.c
28@@ -264,6 +264,27 @@ static int ml_parse(const char *buf, int len, void *ctx)
29 if (strlen(buf) == 0 ||
30 !strcmp(buf, "AT-Command Interpreter ready")) {
31 g->interpreter_ready = 1;
32+ g->clear_to_send = 1;
33+
34+ /* Flush current queue and reinitialise */
35+ while (!llist_empty(&g->busy_atcmds)) {
36+ cmd = llist_entry(g->busy_atcmds.next,
37+ struct gsmd_atcmd, list);
38+ gsmd_log(GSMD_NOTICE, "discarding busy cmd %s\n",
39+ cmd->buf);
40+ llist_del(&cmd->list);
41+ talloc_free(cmd);
42+ }
43+ while (!llist_empty(&g->pending_atcmds)) {
44+ cmd = llist_entry(g->pending_atcmds.next,
45+ struct gsmd_atcmd, list);
46+ gsmd_log(GSMD_NOTICE, "discarding pending cmd %s\n",
47+ cmd->buf);
48+ llist_del(&cmd->list);
49+ talloc_free(cmd);
50+ }
51+
52+ gsmd_timer_reset();
53 gsmd_initsettings(g);
54 gmsd_alive_start(g);
55 atcmd_wake_queue(g);
56diff --git a/src/gsmd/timer.c b/src/gsmd/timer.c
57index 5200690..8877275 100644
58--- a/src/gsmd/timer.c
59+++ b/src/gsmd/timer.c
60@@ -215,3 +215,11 @@ void gsmd_timer_unregister(struct gsmd_timer *timer)
61 /* re-calculate next expiration */
62 calc_next_expiration();
63 }
64+
65+void gsmd_timer_reset(void)
66+{
67+ while (!llist_empty(&gsmd_timers))
68+ /* TODO: free associated resources (e.g timer->cancel_cb()) */
69+ llist_del(&llist_entry(gsmd_timers.next,
70+ struct gsmd_timer, list)->list);
71+}
72--
731.5.2.1
74
diff --git a/meta/packages/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch b/meta/packages/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch
deleted file mode 100644
index 984acc9369..0000000000
--- a/meta/packages/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch
+++ /dev/null
@@ -1,77 +0,0 @@
1From 8af1bb4a0d0df9baa80859c5f7f56cbd7634aded Mon Sep 17 00:00:00 2001
2From: Andrzej Zaborowski <balrog@zabor.org>
3Date: Wed, 19 Sep 2007 14:06:19 +0200
4Subject: [PATCH] Correctly segment incoming usock data into packets, handler short reads.
5
6---
7 include/gsmd/gsmd.h | 2 ++
8 src/gsmd/usock.c | 20 ++++++++++++++++----
9 2 files changed, 18 insertions(+), 4 deletions(-)
10
11diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
12index 6ac9d8e..acec02a 100644
13--- a/include/gsmd/gsmd.h
14+++ b/include/gsmd/gsmd.h
15@@ -95,6 +95,8 @@ struct gsmd_user {
16 struct gsmd *gsmd;
17 struct gsmd_fd gfd; /* the socket */
18 u_int32_t subscriptions; /* bitmaks of subscribed event groups */
19+ char usock_fifo[1024];
20+ int usock_len;
21
22 struct llist_head pb_readrg_list; /* our READRG phonebook list */
23 struct llist_head pb_find_list; /* our FIND phonebook list */
24diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c
25index 32e98d0..bac5f0c 100644
26--- a/src/gsmd/usock.c
27+++ b/src/gsmd/usock.c
28@@ -1529,14 +1529,15 @@ static int usock_rcv_pcmd(struct gsmd_user *gu, char *buf, int len)
29 static int gsmd_usock_user_cb(int fd, unsigned int what, void *data)
30 {
31 struct gsmd_user *gu = data;
32+ struct gsmd_msg_hdr *gph;
33
34 /* FIXME: check some kind of backlog and limit it */
35
36 if (what & GSMD_FD_READ) {
37- char buf[1024];
38 int rcvlen;
39 /* read data from socket, determine what he wants */
40- rcvlen = read(fd, buf, sizeof(buf));
41+ rcvlen = read(fd, gu->usock_fifo + gu->usock_len,
42+ sizeof(gu->usock_fifo) - gu->usock_len);
43 if (rcvlen == 0) {
44 DEBUGP("EOF, this client has just vanished\n");
45 /* EOF, this client has just vanished */
46@@ -1549,8 +1550,18 @@ static int gsmd_usock_user_cb(int fd, unsigned int what, void *data)
47 return 0;
48 } else if (rcvlen < 0)
49 return rcvlen;
50- else
51- return usock_rcv_pcmd(gu, buf, rcvlen);
52+
53+ gu->usock_len += rcvlen;
54+ gph = (struct gsmd_msg_hdr *) gu->usock_fifo;
55+ while (gu->usock_len >= sizeof(*gph) &&
56+ gu->usock_len >= sizeof(*gph) + gph->len) {
57+ usock_rcv_pcmd(gu, gu->usock_fifo, gu->usock_len);
58+ gu->usock_len -= sizeof(*gph) + gph->len;
59+ memmove(gu->usock_fifo,
60+ gu->usock_fifo + sizeof(*gph) +
61+ gph->len,
62+ gu->usock_len);
63+ }
64 }
65
66 if (what & GSMD_FD_WRITE) {
67@@ -1609,6 +1620,7 @@ static int gsmd_usock_cb(int fd, unsigned int what, void *data)
68 newuser->gfd.cb = &gsmd_usock_user_cb;
69 newuser->gsmd = g;
70 newuser->subscriptions = 0xffffffff;
71+ newuser->usock_len = 0;
72 INIT_LLIST_HEAD(&newuser->finished_ucmds);
73 INIT_LLIST_HEAD(&newuser->pb_readrg_list);
74 INIT_LLIST_HEAD(&newuser->pb_find_list);
75--
761.5.2.1
77
diff --git a/meta/packages/gsm/files/0004-Handle-read-and-write-return-values.patch b/meta/packages/gsm/files/0004-Handle-read-and-write-return-values.patch
deleted file mode 100644
index f5e7a7902d..0000000000
--- a/meta/packages/gsm/files/0004-Handle-read-and-write-return-values.patch
+++ /dev/null
@@ -1,176 +0,0 @@
1From 421b0fa14fefbd13a455c20380fecddda616b41a Mon Sep 17 00:00:00 2001
2From: Andrzej Zaborowski <balrog@zabor.org>
3Date: Wed, 19 Sep 2007 18:30:36 +0200
4Subject: [PATCH] Handle read() and write() return values.
5
6---
7 include/libgsmd/libgsmd.h | 3 +-
8 src/gsmd/usock.c | 38 ++++++++++++++++-----------
9 src/libgsmd/lgsm_internals.h | 2 +
10 src/libgsmd/libgsmd.c | 58 ++++++++++++++++++++++++++---------------
11 4 files changed, 63 insertions(+), 38 deletions(-)
12
13diff --git a/include/libgsmd/libgsmd.h b/include/libgsmd/libgsmd.h
14index fc56890..db15aa9 100644
15--- a/include/libgsmd/libgsmd.h
16+++ b/include/libgsmd/libgsmd.h
17@@ -65,6 +65,7 @@ extern int lgsm_subscriptions(struct lgsm_handle *lh, u_int32_t subscriptions);
18
19 extern struct gsmd_msg_hdr *lgsm_gmh_fill(int type, int subtype, int payload_len);
20 extern int lgsm_send(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh);
21-extern int lgsm_handle_packet(struct lgsm_handle *lh, char *buf, int len);
22+extern int lgsm_handle_packet(struct lgsm_handle *lh,
23+ const char *buf, int len);
24
25 #endif
26diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c
27index bac5f0c..2283600 100644
28--- a/src/gsmd/usock.c
29+++ b/src/gsmd/usock.c
30@@ -1569,23 +1569,29 @@ static int gsmd_usock_user_cb(int fd, unsigned int what, void *data)
31 struct gsmd_ucmd *ucmd, *uctmp;
32 llist_for_each_entry_safe(ucmd, uctmp, &gu->finished_ucmds,
33 list) {
34- int rc;
35-
36- rc = write(fd, &ucmd->hdr, sizeof(ucmd->hdr) + ucmd->hdr.len);
37- if (rc < 0) {
38- DEBUGP("write return %d\n", rc);
39- return rc;
40- }
41- if (rc == 0) {
42- DEBUGP("write returns zero!!\n");
43- break;
44+ const void *pos = &ucmd->hdr;
45+ size_t len = sizeof(ucmd->hdr) + ucmd->hdr.len;
46+
47+ while (len) {
48+ ssize_t rc;
49+
50+ rc = write(fd, pos, len);
51+ if (rc < 0 && errno != EINTR) {
52+ DEBUGP("write returned %s\n",
53+ strerror(errno));
54+ return rc;
55+ }
56+ if (rc == 0 && pos == &ucmd->hdr) {
57+ DEBUGP("write returns zero!!\n");
58+ return 0;
59+ }
60+ if (rc > 0) {
61+ len -= rc;
62+ pos += rc;
63+ }
64 }
65- if (rc != sizeof(ucmd->hdr) + ucmd->hdr.len) {
66- DEBUGP("short write\n");
67- break;
68- }
69-
70- DEBUGP("successfully sent cmd %p to user %p, freeing\n", ucmd, gu);
71+ DEBUGP("successfully sent cmd %p to user %p, "
72+ "freeing\n", ucmd, gu);
73 llist_del(&ucmd->list);
74 talloc_free(ucmd);
75 }
76diff --git a/src/libgsmd/lgsm_internals.h b/src/libgsmd/lgsm_internals.h
77index c826723..f1b1a23 100644
78--- a/src/libgsmd/lgsm_internals.h
79+++ b/src/libgsmd/lgsm_internals.h
80@@ -8,6 +8,8 @@ struct lgsm_handle {
81 int fd;
82 lgsm_msg_handler *handler[__NUM_GSMD_MSGS];
83 enum lgsm_netreg_state netreg_state;
84+ char usock_fifo[1024];
85+ int usock_len;
86 };
87
88 int lgsm_send(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh);
89diff --git a/src/libgsmd/libgsmd.c b/src/libgsmd/libgsmd.c
90index 9906ea8..cc804ed 100644
91--- a/src/libgsmd/libgsmd.c
92+++ b/src/libgsmd/libgsmd.c
93@@ -86,34 +86,37 @@ static int lgsm_open_backend(struct lgsm_handle *lh, const char *device)
94 }
95
96 /* handle a packet that was received on the gsmd socket */
97-int lgsm_handle_packet(struct lgsm_handle *lh, char *buf, int len)
98+int lgsm_handle_packet(struct lgsm_handle *lh, const char *buf, int len)
99 {
100 struct gsmd_msg_hdr *gmh;
101 lgsm_msg_handler *handler;
102 int rc = 0;
103
104- while (len) {
105- if (len < sizeof(*gmh))
106- return -EINVAL;
107- gmh = (struct gsmd_msg_hdr *) buf;
108-
109- if (len - sizeof(*gmh) < gmh->len)
110- return -EINVAL;
111- len -= sizeof(*gmh) + gmh->len;
112- buf += sizeof(*gmh) + gmh->len;
113-
114- if (gmh->msg_type >= __NUM_GSMD_MSGS)
115- return -EINVAL;
116-
117- handler = lh->handler[gmh->msg_type];
118+ if (lh->usock_len + len > sizeof(lh->usock_fifo))
119+ return -ENOMEM;
120
121- if (handler)
122+ memcpy(lh->usock_fifo + lh->usock_len, buf, len);
123+ lh->usock_len += len;
124+ gmh = (struct gsmd_msg_hdr *) lh->usock_fifo;
125+ while (lh->usock_len >= sizeof(*gmh) &&
126+ lh->usock_len >= sizeof(*gmh) + gmh->len) {
127+ if (gmh->msg_type < __NUM_GSMD_MSGS &&
128+ (handler = lh->handler[gmh->msg_type]))
129 rc |= handler(lh, gmh);
130- else
131- fprintf(stderr, "unable to handle packet type=%u\n",
132- gmh->msg_type);
133+ else {
134+ fprintf(stderr, "unable to handle packet "
135+ "type=%u id=%u\n",
136+ gmh->msg_type, gmh->id);
137+ rc |= EINVAL;
138+ }
139+
140+ lh->usock_len -= gmh->len + sizeof(*gmh);
141+ memmove(lh->usock_fifo,
142+ lh->usock_fifo + gmh->len + sizeof(*gmh),
143+ lh->usock_len);
144 }
145- return rc;
146+
147+ return -rc;
148 }
149
150 int lgsm_register_handler(struct lgsm_handle *lh, int type, lgsm_msg_handler *handler)
151@@ -193,8 +196,21 @@ static u_int16_t next_msg_id;
152
153 int lgsm_send(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh)
154 {
155+ ssize_t rc;
156+ size_t len = sizeof(*gmh) + gmh->len;
157+ const void *pos = gmh;
158+
159 gmh->id = next_msg_id++;
160- return send(lh->fd, (char *) gmh, sizeof(*gmh) + gmh->len, 0);
161+ while (len) {
162+ rc = send(lh->fd, pos, len, 0);
163+ if (rc < 0 && errno != EINTR)
164+ return -errno;
165+ if (rc > 0) {
166+ len -= rc;
167+ pos += rc;
168+ }
169+ }
170+ return 0;
171 }
172
173 struct gsmd_msg_hdr *lgsm_gmh_fill(int type, int subtype, int payload_len)
174--
1751.5.2.1
176
diff --git a/meta/packages/gsm/files/0005-Add-ask-ds-option-forSMS.patch b/meta/packages/gsm/files/0005-Add-ask-ds-option-forSMS.patch
deleted file mode 100644
index e9f49bd7d2..0000000000
--- a/meta/packages/gsm/files/0005-Add-ask-ds-option-forSMS.patch
+++ /dev/null
@@ -1,130 +0,0 @@
1diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h
2index 236ad78..66cdf48 100644
3--- a/include/gsmd/usock.h
4+++ b/include/gsmd/usock.h
5@@ -332,6 +332,7 @@ struct gsmd_sms {
6 struct gsmd_sms_submit {
7 struct gsmd_addr addr;
8 struct gsmd_sms payload;
9+ int ask_ds;
10 };
11
12 /* Refer to GSM 07.05 subclause 4.4 */
13diff --git a/include/libgsmd/sms.h b/include/libgsmd/sms.h
14index 3ada62d..9808442 100644
15--- a/include/libgsmd/sms.h
16+++ b/include/libgsmd/sms.h
17@@ -46,6 +46,7 @@ struct lgsm_sms {
18 enum gsmd_sms_alphabet alpha;
19 u_int8_t data[LGSM_SMS_DATA_MAXLEN+1];
20 int length;
21+ int ask_ds;
22 };
23
24 /* GSM 03.40 subclause 9.2.2.2 and GSM 07.05 subclause 4.4 and subclause 3.1 */
25diff --git a/src/gsmd/sms_pdu.c b/src/gsmd/sms_pdu.c
26index d1235dd..d461999 100644
27--- a/src/gsmd/sms_pdu.c
28+++ b/src/gsmd/sms_pdu.c
29@@ -247,7 +247,8 @@ int sms_pdu_make_smssubmit(char *dest, const struct gsmd_sms_submit *src)
30 GSMD_SMS_TP_MTI_SUBMIT |
31 (0 << 2) | /* Reject Duplicates: 0 */
32 GSMD_SMS_TP_VPF_NOT_PRESENT |
33- GSMD_SMS_TP_SRR_STATUS_REQUEST |
34+ (src->ask_ds ? GSMD_SMS_TP_SRR_STATUS_REQUEST :
35+ GSMD_SMS_TP_SRR_NOT_REQUEST) |
36 (src->payload.has_header ? GSMD_SMS_TP_UDHI_WITH_HEADER :
37 GSMD_SMS_TP_UDHI_NO_HEADER) |
38 GSMD_SMS_TP_RP_NOT_SET;
39diff --git a/src/libgsmd/libgsmd_sms.c b/src/libgsmd/libgsmd_sms.c
40index 22d7dbf..bbc8689 100644
41--- a/src/libgsmd/libgsmd_sms.c
42+++ b/src/libgsmd/libgsmd_sms.c
43@@ -126,6 +126,7 @@ int lgsm_sms_send(struct lgsm_handle *lh,
44 if (lgsm_number2addr(&gss->addr, sms->addr, 1))
45 return -EINVAL;
46
47+ gss->ask_ds = sms->ask_ds;
48 gss->payload.has_header = 0;
49 gss->payload.length = sms->length;
50 gss->payload.coding_scheme = sms->alpha;
51@@ -161,6 +162,7 @@ int lgsm_sms_write(struct lgsm_handle *lh,
52 if (lgsm_number2addr(&gsw->sms.addr, sms_write->sms.addr, 1))
53 return -EINVAL;
54
55+ gsw->sms.ask_ds = sms_write->sms.ask_ds;
56 gsw->sms.payload.has_header = 0;
57 gsw->sms.payload.length = sms_write->sms.length;
58 gsw->sms.payload.coding_scheme = sms_write->sms.alpha;
59diff --git a/src/util/shell.c b/src/util/shell.c
60index f902126..f26e17e 100644
61--- a/src/util/shell.c
62+++ b/src/util/shell.c
63@@ -355,7 +355,7 @@ static int shell_help(void)
64 "\tsd\tSMS Delete (sd=index,delflg)\n"
65 "\tsl\tSMS List (sl=stat)\n"
66 "\tsr\tSMS Read (sr=index)\n"
67- "\tss\tSMS Send (ss=number,text|[\"text\"])\n"
68+ "\tss\tSMS Send (ss=ask_ds,number,text|[\"text\"])\n"
69 "\tsw\tSMS Write (sw=stat,number,text)\n"
70 "\tsm\tSMS Storage stats\n"
71 "\tsM\tSMS Set preferred storage (sM=mem1,mem2,mem3)\n"
72@@ -563,33 +563,29 @@ int shell_main(struct lgsm_handle *lgsmh)
73 struct lgsm_sms sms;
74
75 ptr = strchr(buf, '=');
76+ sms.ask_ds = atoi(ptr+1);
77 fcomma = strchr(buf, ',');
78- if (!ptr || !fcomma) {
79- printf("Wrong command format\n");
80- } else {
81- strncpy(sms.addr, ptr+1, fcomma-ptr-1);
82- sms.addr[fcomma-ptr-1] = '\0';
83-
84- /* todo define \" to allow " in text */
85- if (fcomma[1] == '"' &&
86- !strchr(fcomma+2, '"')) {
87+ lcomma = strchr(fcomma+1, ',');
88+ strncpy(sms.addr, fcomma+1, lcomma-fcomma-1);
89+ sms.addr[lcomma-fcomma-1] = '\0';
90+ /* todo define \" to allow " in text */
91+ if (lcomma[1]=='"' &&
92+ !strchr(lcomma+2, '"')) {
93 /* read until closing '"' */
94 rc = fscanf(stdin, "%[^\"]\"",
95- fcomma+strlen(fcomma));
96+ lcomma+strlen(lcomma));
97 if (rc == EOF) {
98 printf("EOF\n");
99 return -1;
100 }
101 /* remove brackets */
102- fcomma++;
103- fcomma[strlen(fcomma)] = '\0';
104- }
105-
106- printf("Send SMS\n");
107- packing_7bit_character(fcomma+1, &sms);
108+ lcomma++;
109+ lcomma[strlen(lcomma)] = '\0';
110+ }
111+ printf("Send SMS\n");
112+ packing_7bit_character(lcomma+1, &sms);
113
114- lgsm_sms_send(lgsmh, &sms);
115- }
116+ lgsm_sms_send(lgsmh, &sms);
117 } else if ( !strncmp(buf, "sw", 2)) {
118 printf("Write SMS\n");
119 struct lgsm_sms_write sms_write;
120@@ -603,6 +599,7 @@ int shell_main(struct lgsm_handle *lgsmh)
121 sms_write.sms.addr[lcomma-fcomma-1] = '\0';
122 packing_7bit_character(
123 lcomma+1, &sms_write.sms);
124+ sms_write.sms.ask_ds = 0;
125
126 lgsm_sms_write(lgsmh, &sms_write);
127 } else if (!strncmp(buf, "sm", 2)) {
128--
1291.5.2.1
130
diff --git a/meta/packages/gsm/files/024_sms-text-in-bracket.patch b/meta/packages/gsm/files/024_sms-text-in-bracket.patch
deleted file mode 100644
index 32a1ca33ff..0000000000
--- a/meta/packages/gsm/files/024_sms-text-in-bracket.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=834
2
3From: Kristian Mueller <kristian@mput.de>
4Subject: [PATCH] libgsmd-tool does not allow sms with more than one word
5
6libgsmd-tool only allows for command strings without spaces.
7SMS messages with more than one word will be parsed as multible commands.
8The patch introduces SMS message text in bracket and fixes a NULL pointer
9reference on mailformed "ss" commands.
10
11Signed-off-by: Jim Huang <jserv@openmoko.org>
12---
13 src/util/shell.c | 32 ++++++++++++++++++++++++++------
14 1 file changed, 26 insertions(+), 6 deletions(-)
15
16Index: gsm/src/util/shell.c
17===================================================================
18--- gsm.orig/src/util/shell.c 2007-08-31 16:15:30.000000000 +0800
19+++ gsm/src/util/shell.c 2007-09-17 23:35:31.000000000 +0800
20@@ -389,7 +389,7 @@
21 "\tsd\tSMS Delete (sd=index,delflg)\n"
22 "\tsl\tSMS List (sl=stat)\n"
23 "\tsr\tSMS Read (sr=index)\n"
24- "\tss\tSMS Send (ss=number,text)\n"
25+ "\tss\tSMS Send (ss=number,text|[\"text\"])\n"
26 "\tsw\tSMS Write (sw=stat,number,text)\n"
27 "\tsm\tSMS Storage stats\n"
28 "\tsM\tSMS Set preferred storage (sM=mem1,mem2,mem3)\n"
29@@ -612,16 +612,36 @@
30
31 lgsm_sms_read(lgsmh, atoi(ptr+1));
32 } else if ( !strncmp(buf, "ss", 2)) {
33- printf("Send SMS\n");
34 struct lgsm_sms sms;
35
36 ptr = strchr(buf, '=');
37 fcomma = strchr(buf, ',');
38- strncpy(sms.addr, ptr+1, fcomma-ptr-1);
39- sms.addr[fcomma-ptr-1] = '\0';
40- packing_7bit_character(fcomma+1, &sms);
41+ if (!ptr || !fcomma) {
42+ printf("Wrong command format\n");
43+ } else {
44+ strncpy(sms.addr, ptr+1, fcomma-ptr-1);
45+ sms.addr[fcomma-ptr-1] = '\0';
46+
47+ /* todo define \" to allow " in text */
48+ if (fcomma[1] == '"' &&
49+ !strchr(fcomma+2, '"')) {
50+ /* read until closing '"' */
51+ rc = fscanf(stdin, "%[^\"]\"",
52+ fcomma+strlen(fcomma));
53+ if (rc == EOF) {
54+ printf("EOF\n");
55+ return -1;
56+ }
57+ /* remove brackets */
58+ fcomma++;
59+ fcomma[strlen(fcomma)] = '\0';
60+ }
61+
62+ printf("Send SMS\n");
63+ packing_7bit_character(fcomma+1, &sms);
64
65- lgsm_sms_send(lgsmh, &sms);
66+ lgsm_sms_send(lgsmh, &sms);
67+ }
68 } else if ( !strncmp(buf, "sw", 2)) {
69 printf("Write SMS\n");
70 struct lgsm_sms_write sms_write;
diff --git a/meta/packages/gsm/files/025_sms-status-report.patch b/meta/packages/gsm/files/025_sms-status-report.patch
deleted file mode 100644
index 560e72e380..0000000000
--- a/meta/packages/gsm/files/025_sms-status-report.patch
+++ /dev/null
@@ -1,133 +0,0 @@
1From: Erin Yueh <erin_yueh@openmoko.com>
2Subject: [PATCH] SMS status report
3
4I made a patch for SMS status report. It can change SMS-Submit messages
5and ask for a status report. When the destination address receives our
6message, the service center will send a SMS-STATUS-REPORT to us. We can
7tell what messages we sent by TP-MR (message reference number) value and
8can know the sending result by TP-ST (Status) value from status report
9messages.
10
11PS. if you don't want to ask a status report, you can change this value
12back. Replace "GSMD_SMS_TP_SRR_STATUS_REQUEST" with
13"GSMD_SMS_TP_SRR_NOT_REQUEST".
14header[pos ++] =
15 GSMD_SMS_TP_MTI_SUBMIT |
16 (0 << 2) | /* Reject Duplicates: 0 */
17 GSMD_SMS_TP_VPF_NOT_PRESENT |
18- GSMD_SMS_TP_SRR_NOT_REQUEST |
19+ GSMD_SMS_TP_SRR_STATUS_REQUEST |
20 (src->payload.has_header ? GSMD_SMS_TP_UDHI_WITH_HEADER :
21 GSMD_SMS_TP_UDHI_NO_HEADER) |
22 GSMD_SMS_TP_RP_NOT_SET;
23
24Signed-off-by: Jim Huang <jserv@openmoko.org>
25---
26 src/gsmd/sms_pdu.c | 54 +++++++++++++++++++++++++++++++++++++++++++-----------
27 src/util/event.c | 6 +++++-
28 2 files changed, 48 insertions(+), 12 deletions(-)
29
30Index: gsm/src/gsmd/sms_pdu.c
31===================================================================
32--- gsm.orig/src/gsmd/sms_pdu.c 2007-09-06 11:14:34.000000000 +0800
33+++ gsm/src/gsmd/sms_pdu.c 2007-09-17 23:39:20.000000000 +0800
34@@ -139,6 +139,17 @@
35 /* Skip TP-PID */
36 len -= 9;
37 src += 9;
38+
39+ /* TP-UDL */
40+ dst->payload.length = src[0];
41+ i = sms_data_bytelen(dst->payload.coding_scheme, src[0]);
42+
43+ /* TP-UD */
44+ if (len < 1 + i || i > GSMD_SMS_DATA_MAXLEN)
45+ return 1;
46+ memcpy(dst->payload.data, src + 1, i);
47+ dst->payload.data[i] = 0;
48+
49 break;
50 case GSMD_SMS_TP_MTI_SUBMIT:
51 if (len < 4)
52@@ -179,23 +190,44 @@
53 src += vpf ? 3 : 2;
54
55 memset(dst->time_stamp, 0, 7);
56+
57+ /* TP-UDL */
58+ dst->payload.length = src[0];
59+ i = sms_data_bytelen(dst->payload.coding_scheme, src[0]);
60+
61+ /* TP-UD */
62+ if (len < 1 + i || i > GSMD_SMS_DATA_MAXLEN)
63+ return 1;
64+ memcpy(dst->payload.data, src + 1, i);
65+ dst->payload.data[i] = 0;
66 break;
67 case GSMD_SMS_TP_MTI_STATUS_REPORT:
68- /* TODO */
69+ if (len < 3)
70+ return 1;
71+
72+ /* TP-MR set it gsmd_sms_list.index*/
73+ dst->index = (int) src[1];
74+ /* TP-STATUS set it to coding_scheme */
75+ dst->payload.coding_scheme = (int) src[len-1];
76+ /* TP-RA */
77+ i = sms_number_bytelen(src[3], src[2]);
78+ if (len < 13 + i)
79+ return 1;
80+ if (sms_address2ascii(&dst->addr, src + 2))
81+ return 1;
82+ len -= 4 + i;
83+ src += 4 + i;
84+ /* TP-SCTS */
85+ memcpy(dst->time_stamp, src, 7);
86+ /* TP-UD */
87+ dst->payload.length = 0;
88+ dst->payload.data[0] = 0;
89+ break;
90 default:
91 /* Unknown PDU type */
92 return 1;
93 }
94
95- /* TP-UDL */
96- dst->payload.length = src[0];
97- i = sms_data_bytelen(dst->payload.coding_scheme, src[0]);
98-
99- /* TP-UD */
100- if (len < 1 + i || i > GSMD_SMS_DATA_MAXLEN)
101- return 1;
102- memcpy(dst->payload.data, src + 1, i);
103- dst->payload.data[i] = 0;
104
105 return 0;
106 }
107@@ -215,7 +247,7 @@
108 GSMD_SMS_TP_MTI_SUBMIT |
109 (0 << 2) | /* Reject Duplicates: 0 */
110 GSMD_SMS_TP_VPF_NOT_PRESENT |
111- GSMD_SMS_TP_SRR_NOT_REQUEST |
112+ GSMD_SMS_TP_SRR_STATUS_REQUEST |
113 (src->payload.has_header ? GSMD_SMS_TP_UDHI_WITH_HEADER :
114 GSMD_SMS_TP_UDHI_NO_HEADER) |
115 GSMD_SMS_TP_RP_NOT_SET;
116Index: gsm/src/util/event.c
117===================================================================
118--- gsm.orig/src/util/event.c 2007-09-06 11:14:34.000000000 +0800
119+++ gsm/src/util/event.c 2007-09-17 23:39:47.000000000 +0800
120@@ -128,8 +128,12 @@
121 static int inds_handler(struct lgsm_handle *lh, int evt,
122 struct gsmd_evt_auxdata *aux)
123 {
124- if (aux->u.ds.inlined)
125+ if (aux->u.ds.inlined) {
126+ struct gsmd_sms_list *sms;
127+ sms = (struct gsmd_sms_list *) aux->data;
128 printf("EVENT: Incoming Status Report\n");
129+ printf("message ref = %d, status = %d\n", sms->index,sms->payload.coding_scheme);
130+ }
131 else
132 printf("EVENT: Incoming Status Report stored at location %i\n",
133 aux->u.ds.index);
diff --git a/meta/packages/gsm/files/027_phonebook-find-and-read-range-support.patch b/meta/packages/gsm/files/027_phonebook-find-and-read-range-support.patch
deleted file mode 100644
index ea0f12daac..0000000000
--- a/meta/packages/gsm/files/027_phonebook-find-and-read-range-support.patch
+++ /dev/null
@@ -1,423 +0,0 @@
1From: Sean Chiang <sean_chiang@openmoko.com>
2Subject: [PATCH] Improvement for find and read phonebooks in gsmd
3
4This patch is an improvement for find and read phonebooks.
5After clients make a request to find / read phonebooks, then clients
6should make a request to retrieve all the records.
7
8Signed-off-by: Jim Huang <jserv@openmoko.org>
9---
10 include/gsmd/gsmd.h | 3
11 include/gsmd/usock.h | 20 +++-
12 include/libgsmd/phonebook.h | 6 +
13 src/gsmd/usock.c | 184 +++++++++++++++++++++++++++++++++++-----
14 src/libgsmd/libgsmd_phonebook.c | 48 ++++++++++
15 5 files changed, 238 insertions(+), 23 deletions(-)
16
17Index: gsm/include/libgsmd/phonebook.h
18===================================================================
19--- gsm.orig/include/libgsmd/phonebook.h 2007-08-31 16:15:29.000000000 +0800
20+++ gsm/include/libgsmd/phonebook.h 2007-09-17 23:48:41.000000000 +0800
21@@ -106,4 +106,10 @@
22 /* Get the location range/nlength/tlength supported */
23 extern int lgsm_pb_get_support(struct lgsm_handle *lh);
24
25+/* Retrieve the records of READRG request */
26+extern int lgsm_pb_retrieve_readrg(struct lgsm_handle *lh, int num);
27+
28+/* Retrieve the records of FIND request */
29+extern int lgsm_pb_retrieve_find(struct lgsm_handle *lh, int num);
30+
31 #endif
32Index: gsm/include/gsmd/gsmd.h
33===================================================================
34--- gsm.orig/include/gsmd/gsmd.h 2007-08-31 16:15:29.000000000 +0800
35+++ gsm/include/gsmd/gsmd.h 2007-09-17 23:48:41.000000000 +0800
36@@ -92,6 +92,9 @@
37 struct gsmd *gsmd;
38 struct gsmd_fd gfd; /* the socket */
39 u_int32_t subscriptions; /* bitmaks of subscribed event groups */
40+
41+ struct llist_head pb_readrg_list; /* our READRG phonebook list */
42+ struct llist_head pb_find_list; /* our FIND phonebook list */
43 };
44
45 #define GSMD_DEBUG 1 /* debugging information */
46Index: gsm/include/gsmd/usock.h
47===================================================================
48--- gsm.orig/include/gsmd/usock.h 2007-08-31 16:15:29.000000000 +0800
49+++ gsm/include/gsmd/usock.h 2007-09-17 23:48:56.000000000 +0800
50@@ -194,6 +194,8 @@
51 GSMD_PHONEBOOK_GET_SUPPORT = 6,
52 GSMD_PHONEBOOK_LIST_STORAGE = 7,
53 GSMD_PHONEBOOK_SET_STORAGE = 8,
54+ GSMD_PHONEBOOK_RETRIEVE_READRG = 9,
55+ GSMD_PHONEBOOK_RETRIEVE_FIND = 10,
56 };
57
58 /* Type-of-Address, Numbering-Plan-Identification field, GSM 03.40, 9.1.2.5 */
59@@ -431,7 +433,6 @@
60 char text[GSMD_PB_TEXT_MAXLEN+1];
61 } __attribute__ ((packed));
62
63-
64 /* Refer to GSM 07.07 subclause 8.13 */
65 /* FIXME: the tlength depends on SIM, use +CPBR=? to get */
66 struct gsmd_phonebook_find {
67@@ -471,8 +472,18 @@
68 char opname_longalpha[16];
69 };
70
71+/* Refer to GSM 07.07 subclause 8.11 */
72+struct gsmd_phonebook_mem {
73+ u_int8_t type[3];
74+ u_int8_t pad;
75+ u_int16_t used;
76+ u_int16_t total;
77+} __attribute__ ((packed));
78+
79 struct gsmd_phonebook_storage {
80- char storage[3];
81+ /* FIXME the amount of phonebook storage should be dynamic */
82+ u_int8_t num;
83+ struct gsmd_phonebook_mem mem[20];
84 } __attribute__ ((packed));
85
86 /* Subscriber number information from 3GPP TS 07.07, Clause 7.1 */
87@@ -517,6 +528,11 @@
88 char buf[];
89 } __attribute__ ((packed));
90
91+struct gsmd_phonebooks {
92+ struct llist_head list;
93+ struct gsmd_phonebook pb;
94+} __attribute__ ((packed));
95+
96 extern struct gsmd_ucmd *ucmd_alloc(int extra_size);
97 extern int usock_init(struct gsmd *g);
98 extern void usock_cmd_enqueue(struct gsmd_ucmd *ucmd, struct gsmd_user *gu);
99Index: gsm/src/libgsmd/libgsmd_phonebook.c
100===================================================================
101--- gsm.orig/src/libgsmd/libgsmd_phonebook.c 2007-08-31 16:15:29.000000000 +0800
102+++ gsm/src/libgsmd/libgsmd_phonebook.c 2007-09-17 23:48:41.000000000 +0800
103@@ -33,7 +33,7 @@
104 gmh->data[2] = '\0';
105
106 rc = lgsm_send(lh, gmh);
107- if (rc < gmh->len + 3) {
108+ if (rc < gmh->len + sizeof(*gmh)) {
109 lgsm_gmh_free(gmh);
110 return -EIO;
111 }
112@@ -177,3 +177,49 @@
113 {
114 return lgsm_send_simple(lh, GSMD_MSG_PHONEBOOK, GSMD_PHONEBOOK_GET_SUPPORT);
115 }
116+
117+int lgsm_pb_retrieve_readrg(struct lgsm_handle *lh, int num)
118+{
119+ struct gsmd_msg_hdr *gmh;
120+ int rc;
121+
122+ gmh = lgsm_gmh_fill(GSMD_MSG_PHONEBOOK,
123+ GSMD_PHONEBOOK_RETRIEVE_READRG, sizeof(int));
124+ if (!gmh)
125+ return -ENOMEM;
126+
127+ *(int *)(gmh->data) = num;
128+
129+ rc = lgsm_send(lh, gmh);
130+ if (rc < gmh->len + sizeof(*gmh)) {
131+ lgsm_gmh_free(gmh);
132+ return -EIO;
133+ }
134+
135+ lgsm_gmh_free(gmh);
136+
137+ return 0;
138+}
139+
140+int lgsm_pb_retrieve_find(struct lgsm_handle *lh, int num)
141+{
142+ struct gsmd_msg_hdr *gmh;
143+ int rc;
144+
145+ gmh = lgsm_gmh_fill(GSMD_MSG_PHONEBOOK,
146+ GSMD_PHONEBOOK_RETRIEVE_FIND, sizeof(int));
147+ if (!gmh)
148+ return -ENOMEM;
149+
150+ *(int *)(gmh->data) = num;
151+
152+ rc = lgsm_send(lh, gmh);
153+ if (rc < gmh->len + sizeof(*gmh)) {
154+ lgsm_gmh_free(gmh);
155+ return -EIO;
156+ }
157+
158+ lgsm_gmh_free(gmh);
159+
160+ return 0;
161+}
162Index: gsm/src/gsmd/usock.c
163===================================================================
164--- gsm.orig/src/gsmd/usock.c 2007-08-31 16:15:30.000000000 +0800
165+++ gsm/src/gsmd/usock.c 2007-09-17 23:53:34.000000000 +0800
166@@ -1035,21 +1035,56 @@
167
168 static int phonebook_find_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp)
169 {
170- struct gsmd_user *gu = ctx;
171- struct gsmd_ucmd *ucmd;
172-
173+ struct gsmd_user *gu = ctx;
174+ struct gsmd_ucmd *ucmd;
175+ struct gsmd_phonebooks *gps;
176+ char *fcomma, *lcomma, *ptr1, *ptr2 = NULL;
177+ int *num;
178+
179 DEBUGP("resp: %s\n", resp);
180
181- /* FIXME: using link list, also we need to handle the case of
182- * no query result */
183- ucmd = gsmd_ucmd_fill(strlen(resp) + 1, GSMD_MSG_PHONEBOOK,
184+ /*
185+ * [+CPBF: <index1>,<number>,<type>,<text>[[...]
186+ * <CR><LF>+CPBF: <index2>,<unmber>,<type>,<text>]]
187+ */
188+ ucmd = gsmd_ucmd_fill(sizeof(int), GSMD_MSG_PHONEBOOK,
189 GSMD_PHONEBOOK_FIND, 0);
190 if (!ucmd)
191 return -ENOMEM;
192
193- strcpy(ucmd->buf, resp);
194+ num = (int*) ucmd->buf;
195+
196+ *num = 0;
197+
198+ ptr1 = strtok(resp, "\n");
199+
200+ while (ptr1) {
201+ gps = (struct gsmd_phonebooks *) malloc(sizeof(struct gsmd_phonebooks));
202+ ptr2 = strchr(ptr1, ' ');
203+ gps->pb.index = atoi(ptr2+1);
204+
205+ fcomma = strchr(ptr1, '"');
206+ lcomma = strchr(fcomma+1, '"');
207+ strncpy(gps->pb.numb, fcomma + 1, (lcomma-fcomma-1));
208+ gps->pb.numb[(lcomma - fcomma) - 1] = '\0';
209+
210+ gps->pb.type = atoi(lcomma + 2);
211+
212+ ptr2 = strrchr(ptr1, ',');
213+ fcomma = ptr2 + 1;
214+ lcomma = strchr(fcomma + 1, '"');
215+ strncpy(gps->pb.text, fcomma + 1, (lcomma - fcomma - 1));
216+ gps->pb.text[(lcomma - fcomma) - 1] = '\0';
217+
218+ llist_add_tail(&gps->list, &gu->pb_find_list);
219+
220+ (*num)++;
221+
222+ ptr1 = strtok(NULL, "\n");
223+ }
224
225 usock_cmd_enqueue(ucmd, gu);
226+
227 return 0;
228 }
229
230@@ -1102,22 +1137,51 @@
231 {
232 struct gsmd_user *gu = ctx;
233 struct gsmd_ucmd *ucmd;
234+ struct gsmd_phonebooks *gps;
235+ char *fcomma, *lcomma, *ptr1, *ptr2 = NULL;
236+ int *num;
237
238 DEBUGP("resp: %s\n", resp);
239
240 /*
241- * +CPBR: 4,"1234",129,"6C5F745E7965"
242- * +CPBR: 5,"5678",129,"800062115BB6"
243- * +CPBR: 6,"7890",129,"810280AA591A"
244- * +CPBR: 8,"36874",129,"005300650061006E"
245- *
246+ * [+CPBR: <index1>,<number>,<type>,<text>[[...]
247+ * <CR><LF>+CPBR: <index2>,<unmber>,<type>,<text>]]
248 */
249- ucmd = gsmd_ucmd_fill(strlen(resp)+1, GSMD_MSG_PHONEBOOK,
250+ ucmd = gsmd_ucmd_fill(sizeof(int), GSMD_MSG_PHONEBOOK,
251 GSMD_PHONEBOOK_READRG, 0);
252 if (!ucmd)
253 return -ENOMEM;
254
255- strcpy(ucmd->buf, resp);
256+ num = (int*) ucmd->buf;
257+
258+ *num = 0;
259+
260+ ptr1 = strtok(resp, "\n");
261+
262+ while(ptr1) {
263+ gps = (struct gsmd_phonebooks *) malloc(sizeof(struct gsmd_phonebooks));
264+ ptr2 = strchr(ptr1, ' ');
265+ gps->pb.index = atoi(ptr2+1);
266+
267+ fcomma = strchr(ptr1, '"');
268+ lcomma = strchr(fcomma+1, '"');
269+ strncpy(gps->pb.numb, fcomma + 1, (lcomma-fcomma-1));
270+ gps->pb.numb[(lcomma - fcomma) - 1] = '\0';
271+
272+ gps->pb.type = atoi(lcomma + 2);
273+
274+ ptr2 = strrchr(ptr1, ',');
275+ fcomma = ptr2 + 1;
276+ lcomma = strchr(fcomma + 1, '"');
277+ strncpy(gps->pb.text, fcomma + 1, (lcomma - fcomma - 1));
278+ gps->pb.text[(lcomma - fcomma) - 1] = '\0';
279+
280+ llist_add_tail(&gps->list, &gu->pb_readrg_list);
281+
282+ (*num)++;
283+
284+ ptr1 = strtok(NULL, "\n");
285+ }
286
287 usock_cmd_enqueue(ucmd, gu);
288
289@@ -1209,22 +1273,38 @@
290 static int phonebook_list_storage_cb(struct gsmd_atcmd *cmd,
291 void *ctx, char *resp)
292 {
293- /* +CPBS: ("EN","BD","FD","DC","LD","RC","LR","MT","AD",
294- * "SM","SD","MC","LM","AF","ON","UD") */
295 /* TODO; using link list ; need to handle command error */
296 struct gsmd_user *gu = ctx;
297 struct gsmd_ucmd *ucmd;
298+ struct gsmd_phonebook_storage *gps;
299+ char *ptr;
300
301 DEBUGP("resp: %s\n", resp);
302
303- ucmd = gsmd_ucmd_fill(strlen(resp) + 1,
304+ /*
305+ * +CPBS: (<storage>s)
306+ */
307+
308+ ucmd = gsmd_ucmd_fill(sizeof(*gps),
309 GSMD_MSG_PHONEBOOK,
310 GSMD_PHONEBOOK_LIST_STORAGE, 0);
311
312 if (!ucmd)
313 return -ENOMEM;
314
315- strcpy(ucmd->buf, resp);
316+ gps = (struct gsmd_phonebook_storage *) ucmd->buf;
317+ gps->num = 0;
318+
319+ if (!strncmp(resp, "+CPBS", 5)) {
320+ char* delim = "(,";
321+ ptr = strpbrk(resp, delim);
322+ while ( ptr ) {
323+ strncpy(gps->mem[gps->num].type, ptr+2, 2);
324+ gps->mem[gps->num].type[2] = '\0';
325+ ptr = strpbrk(ptr+2, delim);
326+ gps->num++;
327+ }
328+ }
329
330 usock_cmd_enqueue(ucmd, gu);
331
332@@ -1235,11 +1315,13 @@
333 struct gsmd_msg_hdr *gph,int len)
334 {
335 struct gsmd_atcmd *cmd = NULL;
336+ struct gsmd_ucmd *ucmd = NULL;
337 struct gsmd_phonebook_readrg *gpr;
338 struct gsmd_phonebook *gp;
339 struct gsmd_phonebook_find *gpf;
340- int *index;
341- int atcmd_len;
342+ struct gsmd_phonebooks *cur, *cur2;
343+ int *index, *num;
344+ int atcmd_len, i;
345 char *storage;
346 char buf[1024];
347
348@@ -1343,6 +1425,66 @@
349 cmd = atcmd_fill("AT+CPBR=?", 9+1,
350 &phonebook_get_support_cb, gu, gph->id);
351 break;
352+ case GSMD_PHONEBOOK_RETRIEVE_READRG:
353+ if (len < sizeof(*gph) + sizeof(int))
354+ return -EINVAL;
355+
356+ num = (int *) ((void *)gph + sizeof(*gph));
357+
358+ ucmd = gsmd_ucmd_fill(sizeof(struct gsmd_phonebook)*(*num),
359+ GSMD_MSG_PHONEBOOK,
360+ GSMD_PHONEBOOK_RETRIEVE_READRG, 0);
361+ if (!ucmd)
362+ return -ENOMEM;
363+
364+ gp = (struct gsmd_phonebook*) ucmd->buf;
365+
366+ if (!llist_empty(&gu->pb_readrg_list)) {
367+
368+ llist_for_each_entry_safe(cur, cur2,
369+ &gu->pb_readrg_list, list) {
370+ gp->index = cur->pb.index;
371+ strcpy(gp->numb, cur->pb.numb);
372+ gp->type = cur->pb.type;
373+ strcpy(gp->text, cur->pb.text);
374+ gp++;
375+
376+ llist_del(&cur->list);
377+ free(cur);
378+ }
379+ }
380+
381+ usock_cmd_enqueue(ucmd, gu);
382+
383+ break;
384+ case GSMD_PHONEBOOK_RETRIEVE_FIND:
385+ if (len < sizeof(*gph) + sizeof(int))
386+ return -EINVAL;
387+
388+ num = (int *) ((void *)gph + sizeof(*gph));
389+
390+ ucmd = gsmd_ucmd_fill(sizeof(struct gsmd_phonebook)*(*num), GSMD_MSG_PHONEBOOK,
391+ GSMD_PHONEBOOK_RETRIEVE_FIND, 0);
392+ if (!ucmd)
393+ return -ENOMEM;
394+
395+ gp = (struct gsmd_phonebook*) ucmd->buf;
396+
397+ if (!llist_empty(&gu->pb_find_list)) {
398+ llist_for_each_entry_safe(cur, cur2, &gu->pb_find_list, list) {
399+ gp->index = cur->pb.index;
400+ strcpy(gp->numb, cur->pb.numb);
401+ gp->type = cur->pb.type;
402+ strcpy(gp->text, cur->pb.text);
403+ gp++;
404+
405+ llist_del(&cur->list);
406+ free(cur);
407+ }
408+ }
409+
410+ usock_cmd_enqueue(ucmd, gu);
411+ break;
412 default:
413 return -EINVAL;
414 }
415@@ -1468,6 +1610,8 @@
416 newuser->gsmd = g;
417 newuser->subscriptions = 0xffffffff;
418 INIT_LLIST_HEAD(&newuser->finished_ucmds);
419+ INIT_LLIST_HEAD(&newuser->pb_readrg_list);
420+ INIT_LLIST_HEAD(&newuser->pb_find_list);
421
422 llist_add(&newuser->list, &g->users);
423 gsmd_register_fd(&newuser->gfd);
diff --git a/meta/packages/gsm/files/028_shell-phonebook-find-and-read-range-support.patch b/meta/packages/gsm/files/028_shell-phonebook-find-and-read-range-support.patch
deleted file mode 100644
index db07a5df35..0000000000
--- a/meta/packages/gsm/files/028_shell-phonebook-find-and-read-range-support.patch
+++ /dev/null
@@ -1,264 +0,0 @@
1From: Sean Chiang <sean_chiang@openmoko.com>
2Subject: [PATCH] improvement for find and read phonebooks in shell
3
4This patch improves the functions to find and read phonebooks in shell.
5
6Besides prr and pf, I add two new commands pRr and pRf to retrieve the
7phonebook.
8
9Signed-off-by: Jim Huang <jserv@openmoko.org>
10
11Index: gsm/src/util/shell.c
12===================================================================
13--- gsm.orig/src/util/shell.c 2007-09-17 23:57:51.000000000 +0800
14+++ gsm/src/util/shell.c 2007-09-17 23:59:04.000000000 +0800
15@@ -34,8 +34,6 @@
16 #include <gsmd/usock.h>
17 #include <gsmd/ts0705.h>
18
19-#include <common/linux_list.h>
20-
21 #ifndef __GSMD__
22 #define __GSMD__
23 #include <gsmd/talloc.h>
24@@ -43,9 +41,8 @@
25 #endif
26
27 #define STDIN_BUF_SIZE 1024
28-
29-static LLIST_HEAD(storage_list);
30-static LLIST_HEAD(phonebook_list);
31+static int nFIND = 0;
32+static int nREADRG = 0;
33
34 /* this is the handler for receiving passthrough responses */
35 static int pt_msghandler(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh)
36@@ -62,46 +59,23 @@
37 struct gsmd_phonebook_storage *gpst;
38 char *payload;
39 char *fcomma, *lcomma, *ptr = NULL;
40+ int *num;
41 char buf[128];
42+ int i;
43
44 switch (gmh->msg_subtype) {
45-#if 0
46 case GSMD_PHONEBOOK_FIND:
47+ num = (int *) ((char *)gmh + sizeof(*gmh));
48+ printf("Records:%d\n", *num);
49+
50+ nFIND = *num;
51+ break;
52 case GSMD_PHONEBOOK_READRG:
53- payload = (char *)gmh + sizeof(*gmh);
54+ num = (int *) ((char *)gmh + sizeof(*gmh));
55+ printf("Records:%d\n", *num);
56
57- if (!strncmp(payload, "+CPBR", 5) ||
58- !strncmp(payload, "+CPBF", 5)) {
59- gp = (struct gsmd_phonebook *) malloc(sizeof(struct gsmd_phonebook));
60- ptr = strchr(payload, ' ');
61- gp->index = atoi(ptr+1);
62-
63- fcomma = strchr(payload, '"');
64- lcomma = strchr(fcomma+1, '"');
65- strncpy(gp->numb, fcomma + 1, (lcomma-fcomma-1));
66- gp->numb[(lcomma - fcomma) - 1] = '\0';
67-
68- gp->type = atoi(lcomma + 2);
69-
70- ptr = strrchr(payload, ',');
71- fcomma = ptr + 1;
72- lcomma = strchr(fcomma + 1, '"');
73- strncpy(gp->text, fcomma + 1, (lcomma - fcomma - 1));
74- gp->text[(lcomma - fcomma) - 1] = '\0';
75-
76- llist_add_tail(&gp->list, &phonebook_list);
77-
78-#if 0
79- llist_for_each_entry(gp, &phonebook_list, list) {
80- printf("%d, %s, %d, %s\n", gp->index, gp->numb, gp->type, gp->text);
81- }
82-#endif
83- printf("%d, %s, %d, %s\n", gp->index, gp->numb, gp->type, gp->text);
84- }
85- else
86- printf("%s\n", payload);
87+ nREADRG = *num;
88 break;
89-#endif
90 case GSMD_PHONEBOOK_READ:
91 gp = (struct gsmd_phonebook *) ((char *)gmh + sizeof(*gmh));
92 if (gp->index)
93@@ -115,48 +89,18 @@
94 gps = (struct gsmd_phonebook_support *) ((char *)gmh + sizeof(*gmh));
95 printf("(1-%d), %d, %d\n", gps->index, gps->nlength, gps->tlength);
96 break;
97-#if 0
98- case GSMD_PHONEBOOK_LIST_STORAGE:
99- payload = (char *)gmh + sizeof(*gmh);
100
101- if (!strncmp(payload, "+CPBS", 5)) {
102- char* delim = "(,";
103- struct gsmd_phonebook_storage *cur, *cur2;
104-
105- /* Remove previous record */
106- if (!llist_empty(&storage_list)) {
107- llist_for_each_entry_safe(cur, cur2,
108- &storage_list, list) {
109- llist_del(&cur->list);
110- talloc_free(cur);
111- }
112- }
113-
114- ptr = strpbrk(payload, delim);
115-
116- while ( ptr ) {
117- gpst = (struct gsmd_phonebook_storage *) malloc(sizeof(struct gsmd_phonebook_storage));
118- strncpy(gpst->storage, ptr+2, 2);
119- gpst->storage[2] = '\0';
120-
121- ptr = strpbrk(ptr+2, delim);
122-
123- llist_add_tail(&gpst->list, &storage_list);
124- }
125+ case GSMD_PHONEBOOK_LIST_STORAGE:
126+ gpst = (struct gsmd_phonebook_storage *)((char *)gmh + sizeof(*gmh));
127
128- if (llist_empty(&storage_list))
129- return 0;
130+ for (i = 0; i < gpst->num; i++) {
131+ printf("%s, ", gpst->mem[i].type);
132+ }
133
134- llist_for_each_entry(cur, &storage_list, list) {
135- printf("\n%s",cur->storage);
136- }
137+ printf("\n");
138
139- printf("\n");
140- }
141- else
142- printf("%s\n", payload);
143 break;
144-#endif
145+
146 case GSMD_PHONEBOOK_WRITE:
147 case GSMD_PHONEBOOK_DELETE:
148 case GSMD_PHONEBOOK_SET_STORAGE:
149@@ -164,6 +108,26 @@
150 payload = (char *)gmh + sizeof(*gmh);
151 printf("%s\n", payload);
152 break;
153+ case GSMD_PHONEBOOK_RETRIEVE_READRG:
154+ gp = (struct gsmd_phonebook *) ((char *)gmh + sizeof(*gmh));
155+
156+ for (i=0; i<nREADRG; i++) {
157+ printf("%d,%s,%d,%s\n", gp->index, gp->numb, gp->type, gp->text);
158+ gp++;
159+ }
160+
161+ nREADRG = 0;
162+ break;
163+ case GSMD_PHONEBOOK_RETRIEVE_FIND:
164+ gp = (struct gsmd_phonebook *) ((char *)gmh + sizeof(*gmh));
165+
166+ for (i = 0; i < nFIND; i++) {
167+ printf("%d,%s,%d,%s\n", gp->index, gp->numb, gp->type, gp->text);
168+ gp++;
169+ }
170+
171+ nFIND = 0;
172+ break;
173 default:
174 return -EINVAL;
175 }
176@@ -381,11 +345,13 @@
177 "\tpd\tPB Delete (pb=index)\n"
178 "\tpr\tPB Read (pr=index)\n"
179 "\tprr\tPB Read Range (prr=index1,index2)\n"
180- "\tpf\tPB Find (pff=indtext)\n"
181+ "\tpf\tPB Find (pf=indtext)\n"
182 "\tpw\tPB Write (pw=index,number,text)\n"
183 "\tps\tPB Support\n"
184 "\tpm\tPB Memory\n"
185 "\tpp\tPB Set Memory (pp=storage)\n"
186+ "\tpRr\tRetrieve Readrg Records\n"
187+ "\tpRf\tRetrieve Find Records\n"
188 "\tsd\tSMS Delete (sd=index,delflg)\n"
189 "\tsl\tSMS List (sl=stat)\n"
190 "\tsr\tSMS Read (sr=index)\n"
191@@ -509,48 +475,21 @@
192 printf("Delete Phonebook Entry\n");
193 ptr = strchr(buf, '=');
194 lgsm_pb_del_entry(lgsmh, atoi(ptr+1));
195-#if 0
196 } else if ( !strncmp(buf, "prr", 3)) {
197 printf("Read Phonebook Entries\n");
198 struct lgsm_phonebook_readrg pb_readrg;
199- struct gsmd_phonebook *gp_cur, *gp_cur2;
200-
201- /* Remove records */
202- if (!llist_empty(&phonebook_list)) {
203- llist_for_each_entry_safe(gp_cur,
204- gp_cur2,
205- &phonebook_list,
206- list) {
207- llist_del(&gp_cur->list);
208- talloc_free(gp_cur);
209- }
210- }
211
212 ptr = strchr(buf, '=');
213 pb_readrg.index1 = atoi(ptr+1);
214 ptr = strchr(buf, ',');
215 pb_readrg.index2 = atoi(ptr+1);
216 lgsm_pb_read_entries(lgsmh, &pb_readrg);
217-#endif
218 } else if ( !strncmp(buf, "pr", 2)) {
219 ptr = strchr(buf, '=');
220 lgsm_pb_read_entry(lgsmh, atoi(ptr+1));
221-#if 0
222 } else if ( !strncmp(buf, "pf", 2)) {
223 printf("Find Phonebook Entry\n");
224 struct lgsm_phonebook_find pb_find;
225- struct gsmd_phonebook *gp_cur, *gp_cur2;
226-
227- /* Remove records */
228- if (!llist_empty(&phonebook_list)) {
229- llist_for_each_entry_safe(gp_cur,
230- gp_cur2,
231- &phonebook_list,
232- list) {
233- llist_del(&gp_cur->list);
234- talloc_free(gp_cur);
235- }
236- }
237
238 ptr = strchr(buf, '=');
239 strncpy(pb_find.findtext,
240@@ -559,7 +498,6 @@
241 pb_find.findtext[strlen(ptr+1)] = '\0';
242
243 lgsm_pb_find_entry(lgsmh, &pb_find);
244-#endif
245 } else if ( !strncmp(buf, "pw", 2)) {
246 printf("Write Phonebook Entry\n");
247 struct lgsm_phonebook pb;
248@@ -591,6 +529,16 @@
249 } else if ( !strncmp(buf, "ps", 2)) {
250 printf("Get Phonebook Support\n");
251 lgsm_pb_get_support(lgsmh);
252+ } else if( !strncmp(buf, "pRr", 3) ) {
253+ printf("Retrieve Readrg Records\n");
254+
255+ if ( nREADRG )
256+ lgsm_pb_retrieve_readrg(lgsmh, nREADRG);
257+ } else if( !strncmp(buf, "pRf", 3) ) {
258+ printf("Retrieve Find Records\n");
259+
260+ if ( nFIND )
261+ lgsm_pb_retrieve_find(lgsmh, nFIND);
262 } else if ( !strncmp(buf, "sd", 2)) {
263 printf("Delete SMS\n");
264 struct lgsm_sms_delete sms_del;
diff --git a/meta/packages/gsm/files/default b/meta/packages/gsm/files/default
deleted file mode 100644
index 6ef4f6db57..0000000000
--- a/meta/packages/gsm/files/default
+++ /dev/null
@@ -1,59 +0,0 @@
1# gsmd This shell script configures for the gsmd init script.
2
3. /etc/init.d/functions
4
5case `machine_id` in
6 "gta01"|"gta02")
7 GSMD_OPTS="-s 115200 -F"
8 if [ -d '/sys/bus/platform/devices/gta01-pm-gsm.0' ] ; then
9 GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
10 GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
11 else
12 GSM_POW="/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on"
13 GSM_RES="/sys/bus/platform/devices/neo1973-pm-gsm.0/reset"
14 fi
15 GSM_DEV="/dev/ttySAC0"
16 GSM_DL="/sys/devices/platform/neo1973-pm-gsm.0/download"
17 ;;
18 "htc_apache"|"htc_blueangel"|"htc_universal")
19 GSMD_OPTS="-s 115200 -F"
20 GSM_DEV="/dev/ttyS0"
21 ;;
22 "htc_himalaya")
23 GSMD_OPTS="-s 115200 -F"
24 GSM_DEV="/dev/ttyS2"
25 ;;
26 "htc_magician")
27 GSMD_OPTS="-s 115200 -F"
28 GSM_DEV="/dev/ttyS1"
29 ;;
30 "palm_treo_650")
31 GSMD_OPTS="-s 460800 -F -w 1"
32 GSM_DEV="/dev/ttyS0"
33 ;;
34 "motorola_ezx_platform")
35 GSMD_OPTS="-s 115200 -F -v ti"
36 GSM_DEV="/dev/mux0"
37 ;;
38 "omap3430_ldp_board")
39 # Need a machine for the Zoom modem, but this will do
40 GSMD_OPTS="-s 460800 -F -v ti -m gta01"
41 GSM_DEV="/dev/ttyS0"
42 ;;
43 *)
44 # Unknown board
45
46 # If you must specify special options, uncomment and modify the next line
47 #GSMD_OPTS="-s 115200 -F"
48
49 # If your GSM device needs to be powered up, uncomment and modify the next line
50 #GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
51
52 # If your GSM device then needs to be reset, uncomment and modify the next line
53 #GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
54
55 # This should be in a common /etc/default/serial, together with
56 # BT_DEV and IR_DEV for devices that have those on a serial port
57 #GSM_DEV="/dev/ttyS1"
58 ;;
59esac
diff --git a/meta/packages/gsm/files/fix_machine_init.patch b/meta/packages/gsm/files/fix_machine_init.patch
deleted file mode 100644
index 808bb17b42..0000000000
--- a/meta/packages/gsm/files/fix_machine_init.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Index: src/gsmd/gsmd.c
2===================================================================
3--- a/src/gsmd/gsmd.c (revision 4304)
4+++ b/src/gsmd/gsmd.c (working copy)
5@@ -196,13 +196,13 @@
6
7 sms_cb_init(gsmd);
8
9- if (gsmd->vendorpl && gsmd->vendorpl->initsettings){
10+ if (gsmd->vendorpl && gsmd->vendorpl->initsettings)
11 rc |= gsmd->vendorpl->initsettings(gsmd);
12+
13+ if (gsmd->machinepl && gsmd->machinepl->initsettings)
14 rc |= gsmd->machinepl->initsettings(gsmd);
15- return rc;
16- }
17- else
18- return rc;
19+
20+ return rc;
21 }
22
23 static int firstcmd_response = 0;
diff --git a/meta/packages/gsm/files/gsmd b/meta/packages/gsm/files/gsmd
deleted file mode 100644
index dc10e63098..0000000000
--- a/meta/packages/gsm/files/gsmd
+++ /dev/null
@@ -1,47 +0,0 @@
1#! /bin/sh
2#
3# gsmd This shell script starts and stops gsmd.
4#
5# chkconfig: 345 90 40
6# description: Gsmd manages access to a serial- or USB-connected GSM
7# processname: gsmd
8
9PATH=/bin:/usr/bin:/sbin:/usr/sbin
10
11[ -f /etc/default/rcS ] && . /etc/default/rcS
12[ -f /etc/default/gsmd ] && . /etc/default/gsmd
13
14case "$1" in
15 start)
16 [ -n "$GSM_POW" ] && ( echo "0" >$GSM_POW; sleep 1 )
17 [ -n "$GSM_POW" ] && ( echo "1" >$GSM_POW; sleep 1 )
18 [ -n "$GSM_RES" ] && ( echo "1" >$GSM_RES; sleep 1 )
19 [ -n "$GSM_RES" ] && ( echo "0" >$GSM_RES; sleep 2 )
20
21 echo -n "Starting GSM daemon: "
22 start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS -d -l syslog
23
24 if [ $? = 0 ]; then
25 echo "gsmd."
26 else
27 echo "(failed.)"
28 fi
29 ;;
30 stop)
31 [ -n "$GSM_POW" ] && echo "0" >$GSM_POW
32
33 echo -n "Stopping GSM daemon: "
34 start-stop-daemon -K -x /usr/sbin/gsmd
35 echo "gsmd."
36 ;;
37 restart|force-reload)
38 $0 stop
39 $0 start
40 ;;
41 *)
42 echo "Usage: /etc/init.d/gsmd {start|stop|restart|force-reload}"
43 exit 1
44 ;;
45esac
46
47exit 0
diff --git a/meta/packages/gsm/files/install-ts-headers.patch b/meta/packages/gsm/files/install-ts-headers.patch
deleted file mode 100644
index 88e3b6dd1f..0000000000
--- a/meta/packages/gsm/files/install-ts-headers.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1Index: gsm/include/gsmd/Makefile.am
2===================================================================
3--- gsm.orig/include/gsmd/Makefile.am 2007-10-29 21:05:57.000000000 +0100
4+++ gsm/include/gsmd/Makefile.am 2007-10-29 21:06:03.000000000 +0100
5@@ -1,4 +1,4 @@
6
7-pkginclude_HEADERS = event.h usock.h
8+pkginclude_HEADERS = event.h ts0705.h ts0707.h usock.h
9
10-noinst_HEADERS = atcmd.h gsmd.h select.h ts0705.h ts0707.h unsolicited.h usock.h vendorplugin.h
11+noinst_HEADERS = atcmd.h gsmd.h select.h unsolicited.h usock.h vendorplugin.h
diff --git a/meta/packages/gsm/files/lgsm_send_fix_return_value.patch b/meta/packages/gsm/files/lgsm_send_fix_return_value.patch
deleted file mode 100644
index 00ba3a4549..0000000000
--- a/meta/packages/gsm/files/lgsm_send_fix_return_value.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- gsm/src/libgsmd/libgsmd.c.orig 2007-09-25 00:41:56.000000000 -0500
2+++ gsm/src/libgsmd/libgsmd.c 2007-09-25 00:43:44.000000000 -0500
3@@ -210,7 +210,7 @@
4 pos += rc;
5 }
6 }
7- return 0;
8+ return (sizeof(*gmh) + gmh->len);
9 }
10
11 struct gsmd_msg_hdr *lgsm_gmh_fill(int type, int subtype, int payload_len)
diff --git a/meta/packages/gsm/gsmd.inc b/meta/packages/gsm/gsmd.inc
deleted file mode 100644
index a69fdd90f1..0000000000
--- a/meta/packages/gsm/gsmd.inc
+++ /dev/null
@@ -1,93 +0,0 @@
1DESCRIPTION = "GSM libraries and daemons implementing the 07.10 specification"
2HOMEPAGE = "http://www.openmoko.org"
3LICENSE = "GPL LGPL"
4SECTION = "libs/gsm"
5PROVIDES += "gsmd"
6RPROVIDES_${PN} = "libgsmd0 libgsmd gsmd gsmd-devel"
7PV = "0.1+svnr${SRCREV}"
8PR = "r47"
9
10SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \
11 file://fix_machine_init.patch;patch=1 \
12 file://gsmd \
13 file://default"
14S = "${WORKDIR}/gsm"
15
16inherit autotools pkgconfig update-rc.d
17# handle update-rc.d RDEPENDS manually, we don't need it on
18# anything but gsmd
19RDEPENDS_append = ""
20
21INITSCRIPT_NAME = "gsmd"
22INITSCRIPT_PARAMS = "defaults 35"
23
24do_install_append() {
25 install -d ${D}/${sysconfdir}/init.d
26 install -m 0755 ${WORKDIR}/gsmd ${D}/${sysconfdir}/init.d/
27 install -d ${D}/${sysconfdir}/default
28 install ${WORKDIR}/default ${D}/${sysconfdir}/default/gsmd
29}
30
31PACKAGES =+ "\
32 ${PN}-tools \
33 ${BASEPN}-plugins \
34 ${BASEPN}-plugin-machine-generic \
35 ${BASEPN}-plugin-machine-tihtc \
36 ${BASEPN}-plugin-machine-gta01 \
37 ${BASEPN}-plugin-vendor-bcm \
38 ${BASEPN}-plugin-vendor-qc \
39 ${BASEPN}-plugin-vendor-ti \
40 ${BASEPN}-plugin-vendor-tihtc \
41"
42
43ALLOW_EMPTY_${BASEPN}-plugin-machine-gta01 = "1"
44
45RDEPENDS_${BASEPN}-plugins = "\
46 ${BASEPN}-plugin-machine-generic \
47 ${BASEPN}-plugin-machine-tihtc \
48 ${BASEPN}-plugin-machine-gta01 \
49 ${BASEPN}-plugin-vendor-bcm \
50 ${BASEPN}-plugin-vendor-qc \
51 ${BASEPN}-plugin-vendor-ti \
52 ${BASEPN}-plugin-vendor-tihtc \
53"
54
55RDEPENDS_${PN} += "update-rc.d initscripts"
56RRECOMMENDS_${PN} += "${BASEPN}-plugins"
57
58FILES_${PN}-dbg += "${libdir}/gsmd/.debug/*"
59FILES_${PN}-tools = "${bindir}/*"
60FILES_${BASEPN}-plugins = ""
61FILES_${BASEPN}-plugin-machine-generic = "${libdir}/gsmd/libgsmd-machine_generic.so*"
62FILES_${BASEPN}-plugin-machine-tihtc = "${libdir}/gsmd/libgsmd-machine_tihtc.so*"
63FILES_${BASEPN}-plugin-machine-gta01 = "${libdir}/gsmd/libgsmd-machine_gta01.so*"
64FILES_${BASEPN}-plugin-vendor-qc = "${libdir}/gsmd/libgsmd-vendor_qc.so*"
65FILES_${BASEPN}-plugin-vendor-bcm = "${libdir}/gsmd/libgsmd-vendor_bcm.so*"
66FILES_${BASEPN}-plugin-vendor-ti = "${libdir}/gsmd/libgsmd-vendor_ti.so*"
67FILES_${BASEPN}-plugin-vendor-tihtc = "${libdir}/gsmd/libgsmd-vendor_tihtc.so*"
68
69PACKAGES_DYNAMIC = "lib${BASEPN}* ${BASEPN}"
70
71ALLOW_EMPTY_${BASEPN}-plugins = "1"
72
73RCONFLICTS_lib${BASEPN} = "lib${CONFLICTNAME}"
74RCONFLICTS_${BASEPN} = "${CONFLICTNAME}"
75RCONFLICTS_${BASEPN}-plugins = "${CONFLICTNAME}-plugins"
76RCONFLICTS_${BASEPN}-plugin-machine-generic = "${CONFLICTNAME}-plugin-machine-generic"
77RCONFLICTS_${BASEPN}-plugin-machine-tihtc = "${CONFLICTNAME}-plugin-machine-tihtc"
78RCONFLICTS_${BASEPN}-plugin-machine-gta01 = "${CONFLICTNAME}-plugin-machine-gta01"
79RCONFLICTS_${BASEPN}-plugin-vendor-qc = "${CONFLICTNAME}-plugin-vendor-qc"
80RCONFLICTS_${BASEPN}-plugin-vendor-bcm = "${CONFLICTNAME}-plugin-vendor-bcm"
81RCONFLICTS_${BASEPN}-plugin-vendor-ti = "${CONFLICTNAME}-plugin-vendor-ti"
82RCONFLICTS_${BASEPN}-plugin-vendor-tihtc = "${CONFLICTNAME}-plugin-vendor-tihtc"
83
84RPROVIDES_lib${BASEPN} += "lib${CONFLICTNAME}"
85RPROVIDES_${BASEPN} = "${CONFLICTNAME}"
86RPROVIDES_${BASEPN}-plugins = "${CONFLICTNAME}-plugins"
87RPROVIDES_${BASEPN}-plugin-machine-generic = "${CONFLICTNAME}-plugin-machine-generic"
88RPROVIDES_${BASEPN}-plugin-machine-tihtc = "${CONFLICTNAME}-plugin-machine-tihtc"
89RPROVIDES_${BASEPN}-plugin-machine-gta01 = "${CONFLICTNAME}-plugin-machine-gta01"
90RPROVIDES_${BASEPN}-plugin-vendor-qc = "${CONFLICTNAME}-plugin-vendor-qc"
91RPROVIDES_${BASEPN}-plugin-vendor-bcm = "${CONFLICTNAME}-plugin-vendor-bcm"
92RPROVIDES_${BASEPN}-plugin-vendor-ti = "${CONFLICTNAME}-plugin-vendor-ti"
93RPROVIDES_${BASEPN}-plugin-vendor-tihtc = "${CONFLICTNAME}-plugin-vendor-tihtc"
diff --git a/meta/packages/gsm/libgsmd_svn.bb b/meta/packages/gsm/libgsmd_svn.bb
deleted file mode 100644
index 9d3ca19c04..0000000000
--- a/meta/packages/gsm/libgsmd_svn.bb
+++ /dev/null
@@ -1,5 +0,0 @@
1BASEPN = "gsmd"
2CONFLICTNAME = "gsmd-devel"
3
4require gsmd.inc
5
diff --git a/meta/packages/gzip/gzip-1.3.12/dup-def-fix.patch b/meta/packages/gzip/gzip-1.3.12/dup-def-fix.patch
deleted file mode 100644
index 8308865a25..0000000000
--- a/meta/packages/gzip/gzip-1.3.12/dup-def-fix.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1gzip uses gnulib, whose header conflict with glibc. This patch rename some function to avoid conflict.
2
3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
4Index: gzip-1.3.12/gzip.c
5===================================================================
6--- gzip-1.3.12.orig/gzip.c 2010-08-13 10:29:38.000000000 +0800
7+++ gzip-1.3.12/gzip.c 2010-08-13 10:29:44.000000000 +0800
8@@ -1637,7 +1637,7 @@
9 }
10 }
11
12- if (futimens (ofd, ofname, timespec) != 0)
13+ if (futimens_gnulib (ofd, ofname, timespec) != 0)
14 {
15 int e = errno;
16 WARN ((stderr, "%s: ", program_name));
17Index: gzip-1.3.12/lib/utimens.c
18===================================================================
19--- gzip-1.3.12.orig/lib/utimens.c 2010-08-13 10:33:47.000000000 +0800
20+++ gzip-1.3.12/lib/utimens.c 2010-08-13 10:34:02.000000000 +0800
21@@ -75,7 +75,7 @@
22 Return 0 on success, -1 (setting errno) on failure. */
23
24 int
25-futimens (int fd ATTRIBUTE_UNUSED,
26+futimens_gnulib (int fd ATTRIBUTE_UNUSED,
27 char const *file, struct timespec const timespec[2])
28 {
29 /* Some Linux-based NFS clients are buggy, and mishandle time stamps
30@@ -185,5 +185,5 @@
31 int
32 utimens (char const *file, struct timespec const timespec[2])
33 {
34- return futimens (-1, file, timespec);
35+ return futimens_gnulib (-1, file, timespec);
36 }
37Index: gzip-1.3.12/lib/utimens.h
38===================================================================
39--- gzip-1.3.12.orig/lib/utimens.h 2010-08-13 10:14:57.000000000 +0800
40+++ gzip-1.3.12/lib/utimens.h 2010-08-13 10:21:45.000000000 +0800
41@@ -1,3 +1,3 @@
42 #include <time.h>
43-int futimens (int, char const *, struct timespec const [2]);
44+int futimens_gnulib (int, char const *, struct timespec const [2]);
45 int utimens (char const *, struct timespec const [2]);
diff --git a/meta/packages/gzip/gzip-1.3.12/m4-extensions-fix.patch b/meta/packages/gzip/gzip-1.3.12/m4-extensions-fix.patch
deleted file mode 100644
index 927377286f..0000000000
--- a/meta/packages/gzip/gzip-1.3.12/m4-extensions-fix.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1remove AC_USE_SYSTEM_EXTENSIONS to fix the autoconf error "AC_REQUIRE: circular
2dependency of AC_GNU_SOURCE"
3
4Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
5Index: gzip-1.3.12/m4/extensions.m4
6===================================================================
7--- gzip-1.3.12.orig/m4/extensions.m4 2010-08-16 14:18:16.000000000 +0800
8+++ gzip-1.3.12/m4/extensions.m4 2010-08-16 14:21:54.000000000 +0800
9@@ -12,44 +12,6 @@
10 # enough in this area it's likely we'll need to redefine
11 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
12
13-# AC_USE_SYSTEM_EXTENSIONS
14-# ------------------------
15-# Enable extensions on systems that normally disable them,
16-# typically due to standards-conformance issues.
17-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
18-[
19- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
20- AC_BEFORE([$0], [AC_RUN_IFELSE])
21-
22- AC_REQUIRE([AC_GNU_SOURCE])
23- AC_REQUIRE([AC_AIX])
24- AC_REQUIRE([AC_MINIX])
25-
26- AH_VERBATIM([__EXTENSIONS__],
27-[/* Enable extensions on Solaris. */
28-#ifndef __EXTENSIONS__
29-# undef __EXTENSIONS__
30-#endif
31-#ifndef _POSIX_PTHREAD_SEMANTICS
32-# undef _POSIX_PTHREAD_SEMANTICS
33-#endif
34-#ifndef _TANDEM_SOURCE
35-# undef _TANDEM_SOURCE
36-#endif])
37- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
38- [ac_cv_safe_to_define___extensions__],
39- [AC_COMPILE_IFELSE(
40- [AC_LANG_PROGRAM([
41-# define __EXTENSIONS__ 1
42- AC_INCLUDES_DEFAULT])],
43- [ac_cv_safe_to_define___extensions__=yes],
44- [ac_cv_safe_to_define___extensions__=no])])
45- test $ac_cv_safe_to_define___extensions__ = yes &&
46- AC_DEFINE([__EXTENSIONS__])
47- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
48- AC_DEFINE([_TANDEM_SOURCE])
49-])
50-
51 # gl_USE_SYSTEM_EXTENSIONS
52 # ------------------------
53 # Enable extensions on systems that normally disable them,
diff --git a/meta/packages/gzip/gzip.inc b/meta/packages/gzip/gzip.inc
deleted file mode 100644
index 28df4d4a5d..0000000000
--- a/meta/packages/gzip/gzip.inc
+++ /dev/null
@@ -1,38 +0,0 @@
1DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU project. Mark Adler wrote the decompression part"
2HOMEPAGE = "http://www.gnu.org/software/gzip/"
3SECTION = "console/utils"
4# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12
5LICENSE = "GPLv3+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
7 file://gzip.h;firstline=8;endline=20;md5=e2ec6b91fbe43a18f6081f3bbae46a01"
8
9SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
10
11inherit autotools
12
13do_install () {
14 autotools_do_install
15 if [ "${PN}" = "${BPN}" ] ; then
16 # Rename and move files into /bin (FHS), which is typical place for gzip
17 install -d ${D}${base_bindir}
18 mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip.${PN}
19 mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip.${PN}
20 mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat.${PN}
21 fi
22}
23
24pkg_postinst_${PN} () {
25 if [ "${PN}" = "${BPN}" ] ; then
26 update-alternatives --install ${base_bindir}/gunzip gunzip gunzip.${PN} 100
27 update-alternatives --install ${base_bindir}/gzip gzip gzip.${PN} 100
28 update-alternatives --install ${base_bindir}/zcat zcat zcat.${PN} 100
29 fi
30}
31
32pkg_prerm_${PN} () {
33 if [ "${PN}" = "${BPN}" ] ; then
34 update-alternatives --remove gunzip gunzip.${PN}
35 update-alternatives --remove gzip gzip.${PN}
36 update-alternatives --remove zcat zcat.${PN}
37 fi
38}
diff --git a/meta/packages/gzip/gzip_1.3.12.bb b/meta/packages/gzip/gzip_1.3.12.bb
deleted file mode 100644
index c111e2e24d..0000000000
--- a/meta/packages/gzip/gzip_1.3.12.bb
+++ /dev/null
@@ -1,39 +0,0 @@
1DESCRIPTION = "Standard GNU compressor"
2HOMEPAGE = "http://www.gnu.org/software/gzip"
3SECTION = "base"
4
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
7 file://gzip.h;endline=22;md5=c0934ad1900d927f86556153d4c76d23 \
8 file://lzw.h;endline=19;md5=c273e09a02edd9801cc74d39683049e9 "
9
10SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz \
11 file://m4-extensions-fix.patch;patch=1 \
12 file://dup-def-fix.patch;patch=1"
13
14PR = "r0"
15
16inherit autotools
17
18do_install () {
19 autotools_do_install
20 # move files into /bin (FHS)
21 install -d ${D}${base_bindir}
22 mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip.${PN}
23 mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip.${PN}
24 mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat.${PN}
25}
26
27pkg_postinst_${PN} () {
28 update-alternatives --install ${base_bindir}/gunzip gunzip gunzip.${PN} 100
29 update-alternatives --install ${base_bindir}/gzip gzip gzip.${PN} 100
30 update-alternatives --install ${base_bindir}/zcat zcat zcat.${PN} 100
31}
32
33pkg_prerm_${PN} () {
34 update-alternatives --remove gunzip gunzip.${PN}
35 update-alternatives --remove gzip gzip.${PN}
36 update-alternatives --remove zcat zcat.${PN}
37}
38
39BBCLASSEXTEND = "native"
diff --git a/meta/packages/gzip/gzip_1.4.bb b/meta/packages/gzip/gzip_1.4.bb
deleted file mode 100644
index 93020ba50b..0000000000
--- a/meta/packages/gzip/gzip_1.4.bb
+++ /dev/null
@@ -1,5 +0,0 @@
1require gzip.inc
2
3PR = "r0"
4
5BBCLASSEXTEND = "native"
diff --git a/meta/packages/hal/files/20hal b/meta/packages/hal/files/20hal
deleted file mode 100755
index 5b97c4f9e6..0000000000
--- a/meta/packages/hal/files/20hal
+++ /dev/null
@@ -1,58 +0,0 @@
1#! /bin/sh
2#
3# hal Start the Daemon that stores device informations
4# for the Hardware abstraction layer
5#
6# Written by Martin Waitz based on skeleton code
7# written by Miquel van Smoorenburg <miquels@cistron.nl>.
8# Modified for Debian
9# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
10#
11
12PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
13DAEMON=/usr/sbin/hald
14PIDDIR=/var/run/hald
15PIDFILE=$PIDDIR/hald.pid
16NAME=hald
17DAEMONUSER=haldaemon
18DESC="Hardware abstraction layer"
19
20test -x $DAEMON || exit 0
21
22set -e
23
24do_start() {
25 if [ ! -d $PIDDIR ]; then
26 mkdir -p $PIDDIR
27 chown $DAEMONUSER:$DAEMONUSER $PIDDIR
28 fi
29 echo "Starting $DESC" "$NAME"
30 start-stop-daemon --start --pidfile $PIDFILE \
31 --exec $DAEMON -- $DAEMON_OPTS
32}
33
34do_stop() {
35 echo "Stopping $DESC" "$NAME"
36 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
37 --exec $DAEMON
38}
39
40case "$1" in
41 start)
42 do_start
43 ;;
44 stop)
45 do_stop
46 ;;
47 restart|force-reload)
48 do_stop
49 sleep 5
50 do_start
51 ;;
52 *)
53 echo "Usage: $0 {start|stop|restart|force-reload}" >&2
54 exit 1
55 ;;
56esac
57
58exit 0
diff --git a/meta/packages/hal/files/autoconf.diff b/meta/packages/hal/files/autoconf.diff
deleted file mode 100644
index eb30cccdbe..0000000000
--- a/meta/packages/hal/files/autoconf.diff
+++ /dev/null
@@ -1,11 +0,0 @@
1--- hal-0.5.9/configure.in~ 2007-04-03 05:36:44.000000000 +0100
2+++ hal-0.5.9/configure.in 2007-04-03 10:29:39.000000000 +0100
3@@ -6,7 +6,7 @@
4 # Patches for that is welcome.
5 #
6
7-AC_PREREQ(2.59c)
8+AC_PREREQ(2.59)
9 AC_INIT(hal, 0.5.9, david@fubar.dk)
10 AM_INIT_AUTOMAKE(hal, 0.5.9)
11 AM_CONFIG_HEADER(config.h)
diff --git a/meta/packages/hal/files/hal-right-input-h.patch b/meta/packages/hal/files/hal-right-input-h.patch
deleted file mode 100644
index f820b7790a..0000000000
--- a/meta/packages/hal/files/hal-right-input-h.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1diff --git a/configure.in b/configure.in
2index e76ff51..5e8cc21 100644
3--- a/configure.in
4+++ b/configure.in
5@@ -983,6 +983,11 @@ AC_ARG_WITH([linux-input-header],
6 [Use an given Linux input.h rather than that installed on the system (<linux/input.h>)]))
7 if test "x$with_linux_input_header" != "x"; then
8 AC_DEFINE_UNQUOTED(HAL_LINUX_INPUT_HEADER_H, "$with_linux_input_header", [If set, the header to use instead of <linux/input.h>])
9+ LINUX_INPUT_H=$with_linux_input_header
10+ AC_SUBST(LINUX_INPUT_H)
11+else
12+ LINUX_INPUT_H=/usr/include/linux/input.h
13+ AC_SUBST(LINUX_INPUT_H)
14 fi
15
16 dnl
17diff --git a/tools/Makefile.am b/tools/Makefile.am
18index ae03edd..7d1cbab 100644
19--- a/tools/Makefile.am
20+++ b/tools/Makefile.am
21@@ -79,7 +79,7 @@ endif
22 if BUILD_KEYMAPS
23
24 if HAVE_GPERF
25-hal-setup-keymap-keys.txt: /usr/include/linux/input.h
26+hal-setup-keymap-keys.txt: @LINUX_INPUT_H@
27 awk '/^#define.*KEY_/ { if ($$2 != "KEY_MAX") { print substr($$2, 5) } }' < $< > $@
28
29 hal-setup-keymap-hash-name.gperf: hal-setup-keymap-keys.txt
diff --git a/meta/packages/hal/files/sg-inhibit.patch b/meta/packages/hal/files/sg-inhibit.patch
deleted file mode 100644
index f0cc41448a..0000000000
--- a/meta/packages/hal/files/sg-inhibit.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1--- hal-0.5.9.1/hald/linux/probing/linux_dvd_rw_utils.c.old 2007-08-03 17:24:12.000000000 +0100
2+++ hal-0.5.9.1/hald/linux/probing/linux_dvd_rw_utils.c 2007-08-03 17:25:06.000000000 +0100
3@@ -58,6 +58,10 @@
4
5 #include "linux_dvd_rw_utils.h"
6
7+#if defined(SG_FLAG_UNUSED_LUN_INHIBIT)
8+# define SG_FLAG_LUN_INHIBIT SG_FLAG_UNUSED_LUN_INHIBIT
9+#endif
10+
11 typedef enum {
12 NONE = CGC_DATA_NONE, // 3
13 READ = CGC_DATA_READ, // 2
14@@ -153,8 +153,8 @@
15 errno = EIO;
16 ret = -1;
17 if (cmd->sg_io.masked_status & CHECK_CONDITION) {
18- CREAM_ON_ERRNO (cmd->sg_io.sbp);
19- ret = ERRCODE (cmd->sg_io.sbp);
20+ CREAM_ON_ERRNO ((char*)cmd->sg_io.sbp);
21+ ret = ERRCODE ((char*)cmd->sg_io.sbp);
22 if (ret == 0)
23 ret = -1;
24 }
diff --git a/meta/packages/hal/hal-info.inc b/meta/packages/hal/hal-info.inc
deleted file mode 100644
index adba83fb28..0000000000
--- a/meta/packages/hal/hal-info.inc
+++ /dev/null
@@ -1,22 +0,0 @@
1DESCRIPTION = "Hardware Abstraction Layer device information"
2HOMEPAGE = "http://hal.freedesktop.org/"
3BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=hal"
4SECTION = "unknown"
5
6LICENSE = "GPLv2 | AFL"
7LIC_FILES_CHKSUM = "file://COPYING;md5=ae484909bad0cf11c8e2071cee6bd4dc"
8
9SRC_URI = "http://hal.freedesktop.org/releases/${PN}-${PV}.tar.gz"
10
11inherit autotools pkgconfig
12
13EXTRA_OECONF = "--disable-recall --disable-video"
14
15do_configure() {
16 gnu-configize
17 libtoolize --force
18 oe_runconf
19}
20
21PACKAGE_ARCH = "all"
22FILES_${PN} += "${datadir}/hal/"
diff --git a/meta/packages/hal/hal-info_20091130.bb b/meta/packages/hal/hal-info_20091130.bb
deleted file mode 100644
index e6d50e3981..0000000000
--- a/meta/packages/hal/hal-info_20091130.bb
+++ /dev/null
@@ -1 +0,0 @@
1require hal-info.inc
diff --git a/meta/packages/hal/hal-info_git.bb b/meta/packages/hal/hal-info_git.bb
deleted file mode 100644
index 3fff5e0a7d..0000000000
--- a/meta/packages/hal/hal-info_git.bb
+++ /dev/null
@@ -1,9 +0,0 @@
1require hal-info.inc
2
3PV = "${SRCDATE}+git"
4PR = "r0"
5
6SRC_URI = "git://anongit.freedesktop.org/hal-info/;protocol=git;rev=HAL_INFO_20091130"
7S = "${WORKDIR}/git"
8
9DEFAULT_PREFERENCE = "-1"
diff --git a/meta/packages/hal/hal.inc b/meta/packages/hal/hal.inc
deleted file mode 100644
index 839dfd0652..0000000000
--- a/meta/packages/hal/hal.inc
+++ /dev/null
@@ -1,85 +0,0 @@
1DESCRIPTION = "Hardware Abstraction Layer"
2HOMEPAGE = "http://freedesktop.org/Software/hal"
3BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=hal"
4SECTION = "unknown"
5
6LICENSE = "GPLv2+ | AFL"
7LIC_FILES_CHKSUM = "file://COPYING;md5=5b5ffd59fbb7c2fff6de76c94177af31"
8
9DEPENDS = "virtual/kernel dbus-glib udev util-linux intltool intltool-native expat libusb gperf-native"
10RDEPENDS += "udev hal-info"
11
12SRC_URI = "http://hal.freedesktop.org/releases/hal-${PV}.tar.gz \
13 file://20hal"
14
15inherit autotools pkgconfig
16
17
18LEAD_SONAME = "libhal.so"
19
20# machines with pci and acpi get a machine dependant hal
21EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
22 --with-expat=${STAGING_LIBDIR}/.. \
23 --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
24 --with-hotplug=${sysconfdir}/hotplug.d \
25 --disable-docbook-docs \
26 --disable-policy-kit \
27 --disable-pmu \
28 --disable-pnp-ids \
29 ${@base_contains('COMBINED_FEATURES', 'pci', '--enable-pci --enable-pci-ids', '--disable-pci --disable-pci-ids',d)} \
30 ${@base_contains('MACHINE_FEATURES', 'acpi', '--enable-acpi', '--disable-acpi',d)} \
31 "
32
33MY_ARCH := "${PACKAGE_ARCH}"
34PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'acpi', '${MACHINE_ARCH}', '${MY_ARCH}',d)}"
35PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'pci', '${MACHINE_ARCH}', '${MY_ARCH}',d)}"
36PACKAGE_ARCH_emenlow := "${PACKAGE_ARCH}"
37
38do_install_append() {
39 install -d ${D}/etc/dbus-1/event.d
40 install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d
41}
42
43# At the time the postinst runs, dbus might not be setup so only restart if running
44pkg_postinst_hal () {
45 # can't do this offline
46 if [ "x$D" != "x" ]; then
47 exit 1
48 fi
49
50 grep haldaemon /etc/group || addgroup haldaemon
51 grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
52
53 # add volatile after new user/grp are created
54 echo "d root root 0700 /var/run/hald none" > /etc/default/volatiles/99_hal
55 echo "d haldaemon haldaemon 0755 /var/cache/hald none" >> /etc/default/volatiles/99_hal
56 /etc/init.d/populate-volatile.sh update
57
58 DBUSPID=`pidof dbus-daemon`
59
60 if [ "x$DBUSPID" != "x" ]; then
61 /etc/init.d/dbus-1 force-reload
62 fi
63}
64
65pkg_postrm_hal () {
66 deluser haldaemon || true
67 delgroup haldaemon || true
68}
69
70FILES_${PN} = "${sysconfdir} \
71 ${bindir}/lshal \
72 ${bindir}/hal-find-by-capability \
73 ${bindir}/hal-find-by-property \
74 ${bindir}/hal-device \
75 ${bindir}/hal-get-property \
76 ${bindir}/hal-set-property \
77 ${bindir}/hal-lock \
78 ${bindir}/hal-is-caller-locked-out \
79 ${sbindir} \
80 ${libdir}/libhal.so.* \
81 ${libdir}/libhal-storage.so.* \
82 ${libdir}/hal \
83 ${libexecdir} \
84 ${datadir}/hal/fdi \
85 ${datadir}/hal/scripts"
diff --git a/meta/packages/hal/hal/configure_fix.patch b/meta/packages/hal/hal/configure_fix.patch
deleted file mode 100644
index e8417040de..0000000000
--- a/meta/packages/hal/hal/configure_fix.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1The AC_LANG sections upset libtool 2.2.2, as do .cpp files without a call
2to AC_PROG_CXX. Easiest solution is to patch this out for now.
3
4RP - 14/4/08
5
6Index: hal-0.5.9.1/configure.in
7===================================================================
8--- hal-0.5.9.1.orig/configure.in 2008-04-14 22:41:49.000000000 +0100
9+++ hal-0.5.9.1/configure.in 2008-04-14 22:43:13.000000000 +0100
10@@ -345,32 +345,8 @@
11 fi
12
13 dnl Check for libsmbios
14-AC_LANG_PUSH([C++])
15-AC_CHECK_LIB(smbios, SMBIOSFreeMemory, LIB_SMBIOS=yes , LIB_SMBIOS=no )
16-AC_LANG_POP([C++])
17-if test "$LIB_SMBIOS" = "yes" ; then
18- AC_MSG_CHECKING([for libsmbios >= 0.13.4])
19- AC_TRY_RUN(
20- #include <smbios/version.h>
21- int main ()
22- {
23- int major ;
24- int minor ;
25- int micro ;
26-
27- if ( sscanf( LIBSMBIOS_RELEASE_VERSION , "%d.%d.%d", &major, &minor, &micro ) == 3 ) {
28- if ((major == 0 && minor == 13 && micro >= 4) ||
29- (major >= 0 && minor > 13)) {
30- return 0;
31- }
32- }
33- return 1;
34- } , [USE_SMBIOS=yes; AC_MSG_RESULT(yes); AM_CONDITIONAL(HAVE_SMBIOS,true)],
35- [USE_SMBIOS=no; AC_MSG_RESULT(failed); AM_CONDITIONAL(HAVE_SMBIOS,false)])
36-else
37- USE_SMBIOS=no
38- AM_CONDITIONAL(HAVE_SMBIOS,false)
39-fi
40+USE_SMBIOS=no
41+AM_CONDITIONAL(HAVE_SMBIOS,false)
42
43 AC_ARG_WITH([libpci],
44 [AS_HELP_STRING([--without-libpci],
45Index: hal-0.5.9.1/hald/linux/addons/Makefile.am
46===================================================================
47--- hal-0.5.9.1.orig/hald/linux/addons/Makefile.am 2008-04-14 22:45:18.000000000 +0100
48+++ hal-0.5.9.1/hald/linux/addons/Makefile.am 2008-04-14 22:46:05.000000000 +0100
49@@ -60,11 +60,6 @@
50 hald_addon_usb_csr_LDADD = $(top_builddir)/libhal/libhal.la -lusb @GLIB_LIBS@
51 endif
52
53-if BUILD_DELL
54-libexec_PROGRAMS += hald-addon-dell-backlight
55-hald_addon_dell_backlight_SOURCES = addon-dell-backlight.cpp ../../logger.c
56-hald_addon_dell_backlight_LDADD = $(top_builddir)/libhal/libhal.la -lsmbios @GLIB_LIBS@
57-endif
58 endif
59
60 hald_addon_acpi_SOURCES = addon-acpi.c ../../logger.c ../../util_helper.c
diff --git a/meta/packages/hal/hal_0.5.14.bb b/meta/packages/hal/hal_0.5.14.bb
deleted file mode 100644
index a12be729cb..0000000000
--- a/meta/packages/hal/hal_0.5.14.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1require hal.inc
2
3PR = "r2"
4
5EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h"
6EXTRA_OEMAKE += "-e 'udevrulesdir=$(sysconfdir)/udev/rules.d'"
7
8PACKAGES =+ "libhal libhal-storage"
9
10FILES_libhal = "${libdir}/libhal.so.*"
11FILES_libhal-storage = "${libdir}/libhal-storage.so.*"
12
13FILES_${PN} =+ "${bindir}/hal-disable-polling \
14 ${bindir}/hal-setup-keymap"
diff --git a/meta/packages/hal/hal_git.bb b/meta/packages/hal/hal_git.bb
deleted file mode 100644
index baed472375..0000000000
--- a/meta/packages/hal/hal_git.bb
+++ /dev/null
@@ -1,12 +0,0 @@
1require hal.inc
2
3PV = "0.5.9.1+git${SRCDATE}"
4PR = "r7"
5
6SRC_URI = "git://anongit.freedesktop.org/hal/;protocol=git \
7 file://20hal \
8 file://99_hal"
9
10S = "${WORKDIR}/git"
11
12DEFAULT_PREFERENCE = "-1"
diff --git a/meta/packages/hdparm/hdparm-6.3/bswap.patch b/meta/packages/hdparm/hdparm-6.3/bswap.patch
deleted file mode 100644
index 37fbcb7b38..0000000000
--- a/meta/packages/hdparm/hdparm-6.3/bswap.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- hdparm-5.8/hdparm.c~bswap
7+++ hdparm-5.8/hdparm.c
8@@ -20,7 +20,9 @@
9 #include <linux/types.h>
10 #include <linux/hdreg.h>
11 #include <linux/major.h>
12-#include <asm/byteorder.h>
13+#include <byteswap.h>
14+
15+#define le16_to_cpus(x) bswap_16(htons(x))
16
17 #include "hdparm.h"
18
19@@ -1160,7 +1162,7 @@
20 }
21 } else {
22 for(i = 0; i < 0x100; ++i) {
23- __le16_to_cpus(&id[i]);
24+ le16_to_cpus(&id[i]);
25 }
26 identify((void *)id, NULL);
27 }
28@@ -1380,7 +1382,7 @@
29 }
30 for (i = 0; count >= 4; ++i) {
31 sbuf[i] = (fromhex(b[0]) << 12) | (fromhex(b[1]) << 8) | (fromhex(b[2]) << 4) | fromhex(b[3]);
32- __le16_to_cpus((__u16 *)(&sbuf[i]));
33+ le16_to_cpus((__u16 *)(&sbuf[i]));
34 b += 5;
35 count -= 5;
36 }
diff --git a/meta/packages/hdparm/hdparm-6.3/uclibc.patch b/meta/packages/hdparm/hdparm-6.3/uclibc.patch
deleted file mode 100644
index 495d7491bb..0000000000
--- a/meta/packages/hdparm/hdparm-6.3/uclibc.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1--- hdparm-5.8/hdparm.c.ark 2005-05-22 19:48:34.000000000 +0000
2+++ hdparm-5.8/hdparm.c 2005-05-22 19:52:18.000000000 +0000
3@@ -17,7 +17,9 @@
4 #include <sys/times.h>
5 #include <sys/types.h>
6 #include <sys/mount.h>
7+#ifndef __UCLIBC__
8 #include <linux/types.h>
9+#endif
10 #include <linux/hdreg.h>
11 #include <linux/major.h>
12 #include <byteswap.h>
13--- hdparm-5.8/hdparm.h.ark 2005-05-22 19:51:49.000000000 +0000
14+++ hdparm-5.8/hdparm.h 2005-05-22 19:54:54.000000000 +0000
15@@ -1,6 +1,6 @@
16 /* Some prototypes for extern functions. */
17
18-#include <linux/types.h> /* for __u16 */
19+#include <stdint.h>
20
21 #if !defined(__GNUC__) && !defined(__attribute__)
22 #define __attribute__(x) /* if not using GCC, turn off the __attribute__
23@@ -11,7 +11,7 @@
24 others, though, were declared in hdparm.c with global scope; since other
25 functions in that file have static (file) scope, I assume the difference is
26 intentional. */
27-extern void identify (__u16 *id_supplied, const char *devname);
28+extern void identify (uint16_t *id_supplied, const char *devname);
29
30 extern void usage_error(int out) __attribute__((noreturn));
31 extern int main(int argc, char **argv) __attribute__((noreturn));
32
diff --git a/meta/packages/hdparm/hdparm_6.3.bb b/meta/packages/hdparm/hdparm_6.3.bb
deleted file mode 100644
index 94d1e6e9bf..0000000000
--- a/meta/packages/hdparm/hdparm_6.3.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1DESCRIPTION = "hdparm is a Linux shell utility for viewing \
2and manipulating various IDE drive and driver parameters."
3SECTION = "console/utils"
4PRIORITY = "optional"
5LICENSE = "BSD"
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz \
8 file://bswap.patch;patch=1 \
9 file://uclibc.patch;patch=1"
10
11do_install () {
12 install -d ${D}/${sbindir} ${D}/${mandir}/man8
13 oe_runmake 'DESTDIR=${D}' install
14}
diff --git a/meta/packages/hostap/files/hostap-fw-load.patch b/meta/packages/hostap/files/hostap-fw-load.patch
deleted file mode 100644
index 88adee2bc9..0000000000
--- a/meta/packages/hostap/files/hostap-fw-load.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- hostap-utils-0.2.4/hostap_fw_load~hostap-fw-load
7+++ hostap-utils-0.2.4/hostap_fw_load
8@@ -6,9 +6,9 @@
9 # Firmware images for the card
10 # TODO: could try to select correct firmware type automatically
11
12-PRI=/etc/pcmcia/PM010102.HEX
13-STA=/etc/pcmcia/RF010802.HEX
14-PRISM2_SREC=/usr/local/bin/prism2_srec
15+PRI=/etc/pcmcia/pm010102.hex
16+STA=/etc/pcmcia/rf010804.hex
17+PRISM2_SREC=/usr/sbin/prism2_srec
18
19 set -e
20
diff --git a/meta/packages/hostap/files/hostap_cs.conf b/meta/packages/hostap/files/hostap_cs.conf
deleted file mode 100644
index 8dda82aad3..0000000000
--- a/meta/packages/hostap/files/hostap_cs.conf
+++ /dev/null
@@ -1,193 +0,0 @@
1module "hostap_cs" opts "channel=3 iw_mode=2 essid=any ignore_cis_vcc=1"
2
3card "Actiontec 802CI2"
4 manfid 0x1668, 0x0101
5 bind "hostap_cs"
6
7card "AirWay 802.11 Adapter (PCMCIA)"
8 #version "AirWay", "802.11 Adapter (PCMCIA)"
9 manfid 0x0261, 0x0002
10 bind "hostap_cs"
11
12card "Asus SpaceLink WL110"
13 manfid 0x02aa,0x0002
14 bind "hostap_cs"
15
16## handhelds.org bug 964
17card "Belkin F5D6060 Ethernet"
18 #version "PCMCIA", "11M WLAN Card v2.5", "ISL37300P", "RevA"
19 manfid 0x0274, 0x1612
20 bind "hostap_cs"
21
22card "Compaq 11Mbps Wireless PC Card"
23 manfid 0x028a, 0x0002
24 bind "hostap_cs"
25
26card "Compaq WL100 11 Mbps Wireless Adapter"
27 manfid 0x0138, 0x0002
28 bind "hostap_cs"
29
30card "Compaq HNW-100 11 Mbps Wireless Adapter"
31 manfid 0x028a, 0x0002
32 bind "hostap_cs"
33
34card "D-Link DWL-650"
35 version "D", "Link DWL-650 11Mbps WLAN Card"
36 bind "hostap_cs"
37
38card "D-Link DRC-650"
39 version "D", "Link DRC-650 11Mbps WLAN Card"
40 bind "hostap_cs"
41
42card "D-Link DCF660"
43 manfid 0xd601, 0x0005
44 bind "hostap_cs"
45
46card "Farallon SkyLINE"
47 version "INTERSIL", "HFA384x/IEEE"
48 bind "hostap_cs"
49
50card "HyperLink Wireless PC Card 11Mbps"
51 version "HyperLink", "Wireless PC Card 11Mbps"
52 bind "hostap_cs"
53
54# card "Intersil PRISM2 11 Mbps Wireless Adapter"
55# manfid 0x0156, 0x0002
56# bind "hostap_cs"
57
58card "LA4111 Spectrum24 Wireless LAN PC Card"
59 version "Symbol Technologies"
60 bind "hostap_cs"
61
62card "Linksys WPC11 11Mbps 802.11b WLAN Card"
63 version "Instant Wireless ", " Network PC CARD", "Version 01.02"
64 bind "hostap_cs"
65
66card "Linksys WCF11 11Mbps 802.11b WLAN Card"
67 manfid 0x0274, 0x3301
68 bind "hostap_cs"
69
70## handhelds.org bug #790
71card "Linksys Wireless CompactFlash Card WCF12"
72 manfid 0x028a, 0x0673
73 bind "hostap_cs"
74
75card "Linksys WLAN CF Card"
76 manfid 0x0274, 0x3301
77 bind "hostap_cs"
78
79card "NETGEAR MA701 Wireless CF Card"
80 manfid 0xd601, 0x0002
81 bind "hostap_cs"
82
83card "Nortel Networks eMobility 802.11 Wireless Adapter"
84 manfid 0x01eb, 0x080a
85 bind "hostap_cs"
86
87card "PLANEX GeoWave GW-CF110"
88 version "PLANEX", "GeoWave/GW-CF110"
89 bind "hostap_cs"
90
91card "PROXIM LAN PC CARD HARMONY 80211B"
92 version "PROXIM", "LAN PC CARD HARMONY 80211B"
93 bind "hostap_cs"
94
95card "Proxim RangeLAN/DS"
96 version "PROXIM","RangeLAN-DS/LAN PC CARD"
97 manfid 0x0126, 0x8000
98 bind "hostap_cs"
99
100card "Safeway 802.11b Wireless Adapter"
101 manfid 0xd601, 0x0002
102 bind "hostap_cs"
103
104card "SAMSUNG 11Mbps WLAN Card"
105 version "SAMSUNG", "11Mbps WLAN Card"
106 bind "hostap_cs"
107
108# needs firmware upload via hostap_fw_load
109card "SanDisk ConnectPlus OEM (0MB)"
110 manfid 0xd601, 0x0010
111 bind "hostap_cs"
112
113# needs special activation (>=hostap 0.3.2 only) plus firmware upload
114card "SanDisk ConnectPlus w/ Memory"
115 version "SanDisk", "ConnectPlus"
116 manfid 0xd601, 0x0101
117 bind "hostap_cs" to 0
118# bind "ide-cs" to 1
119
120card "Senao/Origo 80211b WLAN Card"
121 manfid 0x000b,0x7100
122 bind "hostap_cs"
123
124card "Sitecom WL-007 WLAN CF Card"
125 manfid 0xd601, 0x0004
126 bind "hostap_cs"
127
128card "SMC2632 802.11 (prism2) Card"
129 version "SMC", "SMC2632W", "Version 01.02", ""
130 bind "hostap_cs"
131
132card "SpeedStream SS1021 Wireless Adapter"
133 #version "Siemens", "SpeedStream Wireless PCMCIA"
134 manfid 0x02ac, 0x0002
135 bind "hostap_cs"
136
137card "ZCOMAX AirRunner/XI-300"
138 #version "ZCOMAX", "AirRunner/XI-300"
139 manfid 0xd601, 0x0002
140 bind "hostap_cs"
141
142card "Zonet ZCF1100"
143 manfid 0x000b, 0x7100
144 bind "hostap_cs"
145
146card "Wireless LAN Adapter Version 01.02"
147 version "Wireless", "LAN Adapter", "Version 01.02"
148# manfid 0x0156, 0x0002
149 bind "hostap_cs"
150
151card "Ambicom WL1100C 11Mbs Card 802.11b"
152 version "AmbiCom", "WL1100C 802.11b CF-Card", "2.2"
153 manfid 0xd601,0x0002
154 bind "hostap_cs"
155
156card "Ambicom WL1100C 11Mbs Card 802.11b"
157 manfid 0xd601,0x0002
158 bind "hostap_cs"
159
160card "Sandisk Connect SDWCFB-000"
161 manfid 0xd601,0x0005
162 bind "hostap_cs"
163
164# Cards with Intersil firmware (Prism chipset)
165
166card "Linksys WPC11 11Mbps 802.11b WLAN Card"
167 version "The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", "RevA"
168 bind "hostap_cs"
169
170card "Linksys CompactFlash Wireless Card"
171 version "Linksys", "Wireless CompactFlash Card"
172 bind "hostap_cs"
173
174card "ACTIONTEC PRISM Wireless LAN PC Card"
175 version "ACTIONTEC", "PRISM Wireless LAN PC Card"
176 bind "hostap_cs"
177
178card "Linksys WPC11 Version 3"
179 manfid 0x0274,0x1613
180 bind "hostap_cs"
181
182card "BENQ AWL100"
183 version "BENQ", "AWL100 PCMCIA ADAPTER"
184 bind "hostap_cs"
185
186card "Pretec WLAN"
187 version "Pretec", "CompactWLAN Card 802.11b", "2.5"
188 manfid 0x0156, 0x0002
189 bind "hostap_cs"
190
191card "TrendNet TEW PC16"
192 manfid 0x0274, 0x1601
193 bind "hostap_cs"
diff --git a/meta/packages/hostap/files/hostap_cs.conf-upstream b/meta/packages/hostap/files/hostap_cs.conf-upstream
deleted file mode 100644
index 5b7385a7cb..0000000000
--- a/meta/packages/hostap/files/hostap_cs.conf-upstream
+++ /dev/null
@@ -1,191 +0,0 @@
1device "hostap_cs"
2 class "network" module "hostap", "hostap_cs"
3
4card "Intersil PRISM2 Reference Design 11Mb/s WLAN Card"
5 version "INTERSIL", "HFA384x/IEEE"
6 bind "hostap_cs"
7
8card "Compaq WL100 11Mb/s WLAN Card"
9 manfid 0x0138, 0x0002
10 bind "hostap_cs"
11
12card "Compaq WL200"
13 version "Compaq", "WL200_11Mbps_Wireless_PCI_Card"
14 bind "hostap_cs"
15
16card "EMTAC A2424i 11Mbps WLAN Card"
17 manfid 0xc250, 0x0002
18# cis "cis/Emtac.dat"
19 bind "hostap_cs"
20
21card "Linksys WPC11 11Mbps WLAN Card"
22 version "Instant Wireless ", " Network PC CARD", "Version 01.02"
23 bind "hostap_cs"
24
25card "Linksys WPC11 Ver 2.5 11Mbps WLAN Card"
26 manfid 0x0274, 0x1612
27 bind "hostap_cs"
28
29card "Linksys WPC11 Ver 3 11Mbps WLAN Card"
30 manfid 0x0274, 0x1613
31 bind "hostap_cs"
32
33card "Linksys WCF12 Wireless CompactFlash Card"
34 version "Linksys", "Wireless CompactFlash Card"
35 bind "hostap_cs"
36
37card "D-Link DWL-650 11Mbps WLAN Card"
38 version "D", "Link DWL-650 11Mbps WLAN Card", "Version 01.02"
39 bind "hostap_cs"
40
41card "D-Link DRC-650 11Mbps WLAN Card"
42# version "D", "Link DRC-650 11Mbps WLAN Card", "Version 01.02"
43 manfid 0x028a, 0x0002
44 bind "hostap_cs"
45
46card "ZoomAir 4100 11Mb/s WLAN Card"
47 version "ZoomAir 11Mbps High", "Rate wireless Networking"
48 bind "hostap_cs"
49
50card "Addtron AWP-100 11Mbps WLAN Card"
51 version "Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02"
52 bind "hostap_cs"
53
54card "Samsung SWL2000-N 11Mb/s WLAN Card"
55 manfid 0x0250, 0x0002
56 bind "hostap_cs"
57
58card "SMC 2632W 11Mbps WLAN Card"
59 version "SMC", "SMC2632W", "Version 01.02"
60 bind "hostap_cs"
61
62card "BroMax Freeport 11Mbps WLAN Card"
63 version "Intersil", "PRISM 2_5 PCMCIA ADAPTER", "ISL37300P", "Eval-RevA"
64 bind "hostap_cs"
65
66card "Z-Com XI300 11Mb/s WLAN Card"
67 manfid 0xd601, 0x0002
68 bind "hostap_cs"
69
70card "Zcomax XI-325H 200mW"
71# version " ", "IEEE 802.11 Wireless LAN/PC Card"
72 manfid 0xd601, 0x0005
73 bind "hostap_cs"
74
75card "3Com AirConnect PCI 777A"
76 manfid 0x0101, 0x0777
77 bind "hostap_cs"
78
79card "U.S. Robotics IEEE 802.11b PC-CARD"
80 version "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02"
81# manfid 0x0156, 0x0002
82 bind "hostap_cs"
83
84card "Longshine LCR-8531 11Mbps WLAN PCMCIA CARD"
85 version "OEM", "PRISM2 IEEE 802.11 PC-Card", "Version 01.02"
86# manfid 0x0156, 0x0002
87 bind "hostap_cs"
88
89card "Philips 802.11b WLAN PCMCIA"
90 manfid 0x000b, 0x7300
91 bind "hostap_cs"
92
93card "Proxim RangeLAN"
94# version "PROXIM", "RangeLAN-DS/LAN PC CARD"
95 manfid 0x0126, 0x8000
96 bind "hostap_cs"
97
98card "Buffalo WLI-CF-S11G"
99 version "BUFFALO", "WLI-CF-S11G"
100# manfid 0x026f, 0x030b
101 bind "hostap_cs"
102
103card "Level-One WPC-0100"
104 version "Digital Data Communications", "WPC-0100", "Version 00.00"
105 manfid 0x0156, 0x0002
106 bind "hostap_cs"
107
108card "Belkin 802.11b WLAN PCMCIA"
109 version "Belkin", "11Mbps Wireless Notebook Network Adapter", "Version 01.02"
110 manfid 0x0156, 0x0002
111 bind "hostap_cs"
112
113card "Senao SL-2011CD/SL-2011CDPLUS"
114 version "INTERSIL", "HFA384x/IEEE", "Version 01.02"
115 manfid 0x0156, 0x0002
116 bind "hostap_cs"
117
118card "Fulbond Airbond XI-300B"
119 version " ", "IEEE 802.11 Wireless LAN/PC Card"
120 manfid 0xd601, 0x0002
121 bind "hostap_cs"
122
123card "Netgear MA401"
124 version "NETGEAR MA401 Wireless PC", "Card", "Version 01.00"
125# manfid 0x0156, 0x0002
126 bind "hostap_cs"
127
128card "D-Link DWL-650 Rev. P1"
129 version "D-Link", "DWL-650 Wireless PC Card RevP", "ISL37101P-10", "A3"
130# manfid 0x000b, 0x7110
131 bind "hostap_cs"
132
133card "SonicWALL Long Range Wireless Card"
134 version "SonicWALL", "Long Range Wireless Card", "ISL37100P", "1.0"
135 manfid 0x000b, 0x7100
136 bind "hostap_cs"
137
138card "Senao NL-2011CD PLUS Ext2 Mercury"
139 version "WLAN", "11Mbps_PC-Card_3.0", "ISL37100P", "Eval-RevA"
140 manfid 0x000b, 0x7100
141 bind "hostap_cs"
142
143card "Airvast WL100"
144 version "AIRVAST", "IEEE 802.11b Wireless PCMCIA Card", "HFA3863"
145 manfid 0x50c2, 0x0001
146 bind "hostap_cs"
147
148card "Microsoft Wireless Notebook Adapter MN-520 1.0.3"
149 version "Microsoft", "Wireless Notebook Adapter MN-520", "", "1.0.3"
150 manfid 0x02d2, 0x0001
151 bind "hostap_cs"
152
153card "NETGEAR MA401RA"
154 version "NETGEAR MA401RA Wireless PC", "Card", "ISL37300P", "Eval-RevA"
155 manfid 0x000b, 0x7300
156 bind "hostap_cs"
157
158card "Allied Telesyn AT-WCL452"
159 version "Allied Telesyn", "AT-WCL452 Wireless PCMCIA Radio", "Ver. 1.00"
160 manfid 0xc00f, 0x0000
161 bind "hostap_cs"
162
163card "corega WL PCCL-11"
164 version "corega", "WL PCCL-11", "ISL37300P", "RevA"
165 manfid 0xc00f, 0x0000
166 bind "hostap_cs"
167
168card "SanDisk ConnectPlus"
169 version "SanDisk", "ConnectPlus"
170 manfid 0xd601, 0x0101
171 bind "hostap_cs" to 0
172 bind "ide-cs" to 1
173
174card "ASUS WL-100 8011b WLAN PC Card"
175 version "ASUS", "802_11b_PC_CARD_25", "Version 01.00"
176 manfid 0x02aa, 0x0002
177 bind "hostap_cs"
178
179card "ZyXel Zyair B-101 802.11b WLAN card"
180 version " ", "IEEE 802.11 Wireless LAN/PC Card"
181 manfid 0xd601, 0x0010
182 bind "hostap_cs"
183
184card "WLAN PRISM PCMCIA CARD 37300P RevB6"
185 version "WLAN", "PRISM PCMCIA CARD", "37300P", "Revision B6"
186 manfid 0x50c2, 0x7300
187 bind "hostap_cs"
188
189
190# Optional configuration parameters for hostap_cs.o
191# module "hostap_cs" opts "channel=3 iw_mode=3 essid=test ignore_cis_vcc=0"
diff --git a/meta/packages/hostap/files/hostap_cs.modalias b/meta/packages/hostap/files/hostap_cs.modalias
deleted file mode 100644
index cb9efab271..0000000000
--- a/meta/packages/hostap/files/hostap_cs.modalias
+++ /dev/null
@@ -1,28 +0,0 @@
1# product info: "Pretec", "CompactWLAN Card 802.11b", "2.5"
2pcmcia:m0156c0002f06fn00pfn00pa1CADD3E5pbE697636Cpc7A5BFCF1pd00000000 hostap_cs
3
4# manufacturer ID which exist in orinoco_cs AND in hostap_cs
5pcmcia:m000Bc7100f06fn00pfn00pa*pb*pc*pd* hostap_cs
6pcmcia:m000Bc7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
7pcmcia:m0126c8000f06fn00pfn00pa*pb*pc*pd* hostap_cs
8pcmcia:m0138c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
9pcmcia:m0250c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
10pcmcia:m0274c1612f06fn00pfn00pa*pb*pc*pd* hostap_cs
11pcmcia:m0274c1613f06fn00pfn00pa*pb*pc*pd* hostap_cs
12pcmcia:m028Ac0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
13pcmcia:m02AAc0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
14pcmcia:m50C2c7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
15pcmcia:mD601c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
16pcmcia:mD601c0005f06fn00pfn00pa*pb*pc*pd* hostap_cs
17
18# product info: "Linksys", "Wireless CompactFlash Card", "", ""
19pcmcia:m028Ac0673f06fn00pfn00pa0733CC81pb0C52F395pc00000000pd00000000 hostap_cs
20
21# product info:"PLANEX COMMUNICATION INC","PLANEX GW-CF11X Wireless CF Card", "", ""
22pcmcia:mD601c0010f06fn00pfn00pa4703CF68pbFAD7318Dpc00000000pd00000000 hostap_cs
23
24# 0x0156, 0x0002 and "Version 01.02" only appear for Prism based cards.
25pcmcia:m0156c0002f06fn00pfn00pa*pb*pc4B74BAA0pd00000000 hostap_cs
26
27# "BUFFALO", "WLI-CF-S11G", "", ""
28pcmcia:m026Fc030Bf06fn00pfn00pa2DECECE3pb82067C18pc00000000pd00000000 hostap_cs
diff --git a/meta/packages/hostap/hostap-conf_1.0.bb b/meta/packages/hostap/hostap-conf_1.0.bb
deleted file mode 100644
index ce069662c7..0000000000
--- a/meta/packages/hostap/hostap-conf_1.0.bb
+++ /dev/null
@@ -1,29 +0,0 @@
1DESCRIPTION = "PCMCIA-cs configuration files for wireless LAN cards based on Intersil's Prism2/2.5/3 chipset"
2SECTION = "kernel/modules"
3PRIORITY = "optional"
4LICENSE = "GPL"
5RDEPENDS = "update-modules"
6PACKAGE_ARCH = "all"
7PR = "r10"
8
9SRC_URI = "file://hostap_cs.modalias"
10
11do_compile() {
12}
13
14do_install() {
15 install -d ${D}${sysconfdir}/modutils
16
17 install -m 0644 ${WORKDIR}/hostap_cs.modalias ${D}${sysconfdir}/modutils/hostap_cs.conf
18}
19
20pkg_postinst () {
21 if [ -n "$D" ]; then
22 exit 1
23 fi
24 update-modules || true
25}
26
27pkg_postrm () {
28 update-modules || true
29}
diff --git a/meta/packages/hostap/hostap-utils.inc b/meta/packages/hostap/hostap-utils.inc
deleted file mode 100644
index 16880f1196..0000000000
--- a/meta/packages/hostap/hostap-utils.inc
+++ /dev/null
@@ -1,25 +0,0 @@
1DESCRIPTION = "User mode helpers for the hostap driver"
2HOMEPAGE = "http://hostap.epitest.fi"
3BUGTRACKER = "http://hostap.epitest.fi/bugz/"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
6 file://util.c;beginline=1;endline=9;md5=d3b9280851302e5ba34e5fb717489b6d"
7SECTION = "kernel/userland"
8PRIORITY = "optional"
9PR = "r4"
10
11SRC_URI = "http://hostap.epitest.fi/releases/hostap-utils-${PV}.tar.gz \
12 file://hostap-fw-load.patch;patch=1"
13S = "${WORKDIR}/hostap-utils-${PV}"
14
15BINARIES = "hostap_crypt_conf hostap_diag hostap_fw_load hostap_io_debug \
16 hostap_rid prism2_param prism2_srec split_combined_hex"
17
18do_install() {
19 install -d ${D}${sbindir}/
20 for f in ${BINARIES}
21 do
22 install -m 0755 $f ${D}${sbindir}/
23 done
24}
25
diff --git a/meta/packages/hostap/hostap-utils_0.4.7.bb b/meta/packages/hostap/hostap-utils_0.4.7.bb
deleted file mode 100644
index 9fe362b19f..0000000000
--- a/meta/packages/hostap/hostap-utils_0.4.7.bb
+++ /dev/null
@@ -1 +0,0 @@
1require hostap-utils.inc
diff --git a/meta/packages/icu/files/gccfix.patch b/meta/packages/icu/files/gccfix.patch
deleted file mode 100644
index 9291e921d3..0000000000
--- a/meta/packages/icu/files/gccfix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: source/layoutex/ParagraphLayout.cpp
2===================================================================
3--- source.orig/layoutex/ParagraphLayout.cpp 2009-06-30 11:48:47.000000000 +0100
4+++ source/layoutex/ParagraphLayout.cpp 2009-06-30 11:49:06.000000000 +0100
5@@ -798,7 +798,7 @@
6
7 return nullLanguageCode;
8 }
9-#elif
10+#else
11
12 // TODO - dummy implementation for right now...
13 le_int32 ParagraphLayout::getLanguageCode(const Locale *locale)
diff --git a/meta/packages/icu/files/noldlibpath.patch b/meta/packages/icu/files/noldlibpath.patch
deleted file mode 100644
index eba3d805d4..0000000000
--- a/meta/packages/icu/files/noldlibpath.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1Setting LD_LIBRARY_PATH is a really bad idea when cross compiling. Simplest way
2to disable this is to rename the variable as per the patch below, then its
3harmless. This is a hack.
4
5RP 10/6/2010
6
7Index: source/config/Makefile.inc.in
8===================================================================
9--- source.orig/config/Makefile.inc.in 2010-06-10 21:49:19.000000000 +0100
10+++ source/config/Makefile.inc.in 2010-06-10 21:49:46.000000000 +0100
11@@ -126,7 +126,7 @@
12 ##################################################################
13 # Environment variable to set a runtime search path
14 # (Overridden when necessary in -mh files)
15-LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
16+LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH2
17
18 # Versioned target for a shared library
19 FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
20Index: source/icudefs.mk.in
21===================================================================
22--- source.orig/icudefs.mk.in 2010-06-10 21:51:03.000000000 +0100
23+++ source/icudefs.mk.in 2010-06-10 21:51:09.000000000 +0100
24@@ -150,7 +150,7 @@
25 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared
26
27 # Environment variable to set a runtime search path
28-LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
29+LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH2
30
31 # Versioned target for a shared library.
32 FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
33Index: source/tools/genrb/gendtjar.pl
34===================================================================
35--- source.orig/tools/genrb/gendtjar.pl 2010-06-10 21:51:36.000000000 +0100
36+++ source/tools/genrb/gendtjar.pl 2010-06-10 21:52:03.000000000 +0100
37@@ -68,8 +68,8 @@
38 $icuLibDir = abs_path($icuBinDir."/../lib");
39 $path .=":$icuBinDir:$icuLibDir";
40
41- $libpath = $ENV{'LD_LIBRARY_PATH'}.":$icuLibDir";
42- $ENV{'LD_LIBRARY_PATH'} = $libpath;
43+ $libpath = $ENV{'LD_LIBRARY_PATH2'}.":$icuLibDir";
44+ $ENV{'LD_LIBRARY_PATH2'} = $libpath;
45
46 #print ("##### LD_LIBRARY_PATH = $ENV{'LD_LIBRARY_PATH'}\n");
47
diff --git a/meta/packages/icu/files/use-g++-for-linking.patch b/meta/packages/icu/files/use-g++-for-linking.patch
deleted file mode 100644
index 4702abc065..0000000000
--- a/meta/packages/icu/files/use-g++-for-linking.patch
+++ /dev/null
@@ -1,67 +0,0 @@
1---
2 tools/genccode/Makefile.in | 2 +-
3 tools/gencmn/Makefile.in | 2 +-
4 tools/genrb/Makefile.in | 2 +-
5 tools/pkgdata/Makefile.in | 2 +-
6 4 files changed, 4 insertions(+), 4 deletions(-)
7
8--- source.orig/tools/genccode/Makefile.in
9+++ source/tools/genccode/Makefile.in
10@@ -76,11 +76,11 @@ check-local: all-local
11 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
12 cd $(top_builddir) \
13 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
14
15 $(TARGET) : $(OBJECTS)
16- $(LINK.c) $(OUTOPT)$@ $^ $(LIBS)
17+ $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
18
19
20 %.$(SECTION): $(srcdir)/%.$(SECTION).in
21 cd $(top_builddir) \
22 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
23--- source.orig/tools/gencmn/Makefile.in
24+++ source/tools/gencmn/Makefile.in
25@@ -76,11 +76,11 @@ check-local: all-local
26 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
27 cd $(top_builddir) \
28 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
29
30 $(TARGET) : $(OBJECTS)
31- $(LINK.c) $(OUTOPT)$@ $^ $(LIBS)
32+ $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
33
34 %.$(SECTION): $(srcdir)/%.$(SECTION).in
35 cd $(top_builddir) \
36 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
37
38--- source.orig/tools/genrb/Makefile.in
39+++ source/tools/genrb/Makefile.in
40@@ -84,11 +84,11 @@ Makefile: $(srcdir)/Makefile.in $(top_b
41
42 $(TARGET) : $(OBJECTS)
43 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
44
45 $(DERB) : $(DERB_OBJ)
46- $(LINK.c) $(OUTOPT)$@ $^ $(LIBS)
47+ $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
48
49
50 # This line is needed to serialize builds when the gmake -j option is used.
51 $(TARGET_STUB_NAME).$(SECTION): $(DERB_STUB_NAME).$(SECTION)
52
53--- source.orig/tools/pkgdata/Makefile.in
54+++ source/tools/pkgdata/Makefile.in
55@@ -81,11 +81,11 @@ check-local: all-local
56 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
57 cd $(top_builddir) \
58 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
59
60 $(TARGET) : $(OBJECTS)
61- $(LINK.c) $(OUTOPT)$@ $^ $(LIBS)
62+ $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
63
64
65 %.$(SECTION): $(srcdir)/%.$(SECTION).in
66 cd $(top_builddir) \
67 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
diff --git a/meta/packages/icu/icu-3.6.inc b/meta/packages/icu/icu-3.6.inc
deleted file mode 100644
index 1c611bdf36..0000000000
--- a/meta/packages/icu/icu-3.6.inc
+++ /dev/null
@@ -1,55 +0,0 @@
1DESCRIPTION = "The International Component for Unicode (ICU) is a mature, portable set of C/C++ and Java libraries for Unicode support, software internationalization (I18N) and globalization (G11N), giving applications the same results on all platforms."
2HOMEPAGE = "http://www-01.ibm.com/software/globalization/icu/index.jsp"
3
4BASE_SRC_URI = "ftp://ftp.software.ibm.com/software/globalization/icu/3.6/icu4c-3_6-src.tgz \
5 file://gccfix.patch;apply=yes \
6 file://use-g++-for-linking.patch;apply=yes"
7SRC_URI = "${BASE_SRC_URI} \
8 file://noldlibpath.patch;apply=yes"
9SRC_URI_virtclass-native = "${BASE_SRC_URI}"
10
11LICENSE = "ICU"
12LIC_FILES_CHKSUM = "file://../license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
13DEPENDS = "icu-native"
14DEPENDS_virtclass-native = ""
15
16S = "${WORKDIR}/icu/source"
17
18PARALLEL_MAKE = ""
19FULL_OPTIMIZATION_arm = "-Os"
20
21inherit autotools pkgconfig binconfig
22
23do_configure() {
24 libtoolize --force
25 gnu-configize --force
26 oe_runconf
27 if [ "${PN}" != "icu-native" ]; then
28 # In the non-native case we need to make substitutions to use
29 # the native versions of the tools
30 for i in */Makefile* */*.inc */*/Makefile* */*/*.inc */*/*.inc.in ; do
31 sed -i -e 's:$(INVOKE) $(BINDIR)/:$(INVOKE) :g' $i
32 sed -i -e 's:$(BINDIR)/::g' $i
33 done
34 fi
35}
36
37do_compile() {
38 oe_runmake 'CXX=${CXX}'
39}
40
41do_install_append() {
42 chmod +x ${D}${libdir}/lib*
43}
44
45PACKAGES =+ "libicudata libicuuc libicui18n libicule libiculx libicutu libicuio"
46
47FILES_libicudata = "${libdir}/libicudata.so.*"
48FILES_libicuuc = "${libdir}/libicuuc.so.*"
49FILES_libicui18n = "${libdir}/libicui18n.so.*"
50FILES_libicule = "${libdir}/libicule.so.*"
51FILES_libiculx = "${libdir}/libiculx.so.*"
52FILES_libicutu = "${libdir}/libicutu.so.*"
53FILES_libicuio = "${libdir}/libicuio.so.*"
54
55BBCLASSEXTEND = "native"
diff --git a/meta/packages/icu/icu_3.6.bb b/meta/packages/icu/icu_3.6.bb
deleted file mode 100644
index 5042116009..0000000000
--- a/meta/packages/icu/icu_3.6.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require icu-3.6.inc
2
3PR = "r6"
diff --git a/meta/packages/insserv/files/40_segfault_virtprov.dpatch b/meta/packages/insserv/files/40_segfault_virtprov.dpatch
deleted file mode 100644
index 9b0081307a..0000000000
--- a/meta/packages/insserv/files/40_segfault_virtprov.dpatch
+++ /dev/null
@@ -1,89 +0,0 @@
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## 40_segfault_virtprov.dpatch by Petter Reinholdtsen
3
4Avoid segfault when an enabled service provide a virtual system
5facility.
6
7@DPATCH@
8--- insserv/insserv.c
9+++ insserv/insserv.c 2008-02-01 11:43:45.634618329 +0100
10@@ -166,7 +166,7 @@ typedef struct pwd_struct {
11
12 static list_t pwd = { &(pwd), &(pwd) }, * topd = &(pwd);
13
14-static void pushd(const char *const __restrict path);
15+static void pushd(const char *const __restrict path) __attribute__((nonnull(1)));
16 static void pushd(const char *const path)
17 {
18 pwd_t * dir;
19@@ -305,13 +305,13 @@ out:
20 return getserv(ptr);
21 }
22
23-static serv_t * findserv(const char *const __restrict serv) __attribute__((nonnull(1)));
24+static serv_t * findserv(const char *const __restrict serv);
25 static serv_t * findserv(const char *const serv)
26 {
27 list_t * ptr;
28 serv_t * ret = (serv_t*)0;
29
30- if (!serv)
31+ if (serv == (const char*)0)
32 goto out;
33
34 list_for_each(ptr, serv_start) {
35@@ -334,6 +334,9 @@ static void rememberreq(serv_t *serv, ui
36 list_t * ptr;
37 uint old = bit;
38
39+ if (!tmp)
40+ error("%s", strerror(errno));
41+
42 while ((token = strsep(&tmp, delimeter))) {
43 boolean found = false;
44 req_t * this;
45@@ -399,6 +402,9 @@ static void reversereq(const serv_t * se
46 char * rev = strdupa(list);
47 uint old = bit;
48
49+ if (!rev)
50+ error("%s", strerror(errno));
51+
52 while ((dep = strsep(&rev, delimeter)) && *dep) {
53 serv_t * tmp;
54 list_t * ptr;
55@@ -437,7 +443,7 @@ static void reversereq(const serv_t * se
56 /*
57 * Check required services for name
58 */
59-static boolean chkrequired(const char *const __restrict name) __attribute__((nonnull(1)));
60+static boolean chkrequired(const char *const __restrict name);
61 static boolean chkrequired(const char *const name)
62 {
63 serv_t * serv = findserv(name);
64--- insserv/listing.h
65+++ insserv/listing.h 2008-02-01 11:40:45.347748072 +0100
66@@ -97,11 +97,11 @@ extern int makeprov(const char *__restri
67 extern void setorder(const char *__restrict script, const int order, boolean recursive) __attribute__((nonnull(1)));
68 extern int getorder(const char *__restrict script) __attribute__((nonnull(1)));
69 extern boolean notincluded(const char *__restrict script, const int runlevel) __attribute__((nonnull(1)));
70-extern boolean foreach(const char **__restrict script, int *__restrict order, const int runlevel) __attribute__((nonnull(1,2)));
71-extern void virtprov(const char *__restrict virt, const char *__restrict real) __attribute__((nonnull(1,2)));
72+extern boolean foreach(const char **__restrict script, int *__restrict order, const int runlevel) __attribute__((nonnull(2)));
73+extern void virtprov(const char *__restrict virt, const char *__restrict real) __attribute__((nonnull(1)));
74 extern const char * getscript(const char *__restrict prov) __attribute__((nonnull(1)));
75 extern const char * getprovides(const char *__restrict script) __attribute__((nonnull(1)));
76-extern boolean listscripts(const char **__restrict script, const int lvl) __attribute__((nonnull(1)));
77+extern boolean listscripts(const char **__restrict script, const int lvl);
78 extern int maxorder;
79 extern boolean is_loop_detected(void);
80
81@@ -116,7 +116,7 @@ extern int map_has_runlevels(void);
82 extern int map_runlevel_to_lvl (const int runlevel);
83 extern int map_key_to_lvl(const char key);
84
85-static inline char * xstrdup(const char *__restrict s) __attribute__((always_inline,nonnull(1)));
86+static inline char * xstrdup(const char *__restrict s) __attribute__((always_inline));
87 static inline char * xstrdup(const char * s)
88 {
89 char * r;
diff --git a/meta/packages/insserv/files/42_loopnochangemsg.dpatch b/meta/packages/insserv/files/42_loopnochangemsg.dpatch
deleted file mode 100644
index 4a15f58312..0000000000
--- a/meta/packages/insserv/files/42_loopnochangemsg.dpatch
+++ /dev/null
@@ -1,20 +0,0 @@
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## 40_loopnochangemsg.dpatch by Petter Reinholdtsen
3
4Make it more obvious that introducing a loop will not change the
5existing boot sequence. Thanks to Frans Pop for the rationale for
6this change.
7
8@DPATCH@
9
10--- insserv-1.11.0.orig/insserv.c
11+++ insserv-1.11.0/insserv.c
12@@ -2647,7 +2647,7 @@
13 follow_all();
14
15 if (is_loop_detected() && !ignore)
16- error("exiting now!\n");
17+ error("exiting without changing boot order!\n");
18
19 /*
20 * Re-order some well known scripts to get
diff --git a/meta/packages/insserv/files/crosscompile_fix.patch b/meta/packages/insserv/files/crosscompile_fix.patch
deleted file mode 100644
index 14d8db468f..0000000000
--- a/meta/packages/insserv/files/crosscompile_fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1Index: insserv-1.11.0/Makefile
2===================================================================
3--- insserv-1.11.0.orig/Makefile 2008-08-25 16:00:00.000000000 +0100
4+++ insserv-1.11.0/Makefile 2008-08-25 16:00:25.000000000 +0100
5@@ -18,16 +18,7 @@
6 #
7 # Architecture
8 #
9-ifdef RPM_OPT_FLAGS
10- COPTS = -g $(RPM_OPT_FLAGS)
11-else
12- ARCH = $(shell uname -i)
13-ifeq ($(ARCH),i386)
14- COPTS = -O2 -mcpu=i586 -mtune=i686
15-else
16- COPTS = -O2
17-endif
18-endif
19+COPTS = -O2
20 COPTS += -g
21
22 MY_CFLAGS = $(CFLAGS) -Wall $(COPTS) $(DEBUG) $(LOOPS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
diff --git a/meta/packages/insserv/files/insserv.conf b/meta/packages/insserv/files/insserv.conf
deleted file mode 100644
index 4858f85b69..0000000000
--- a/meta/packages/insserv/files/insserv.conf
+++ /dev/null
@@ -1,41 +0,0 @@
1#
2# All local filesystems are mounted (done during boot phase)
3#
4$local_fs mountall
5
6#
7# Low level networking (ethernet card)
8#
9$network networking +pcmcia +hotplug
10
11#
12# Named is operational
13#
14$named +named +dnsmasq +lwresd $network
15
16#
17# All remote filesystems are mounted (note in some cases /usr may
18# be remote. Most applications that care will probably require
19# both $local_fs and $remote_fs)
20#
21$remote_fs $local_fs +mountnfs
22
23#
24# System logger is operational
25#
26$syslog sysklogd
27
28#
29# SunRPC portmapper available
30#
31$portmap portmap
32
33#
34# The system time has been set correctly
35#
36$time hwclock
37
38#
39# Services which need to be interactive
40#
41<interactive> hostname udev
diff --git a/meta/packages/insserv/files/make.patch b/meta/packages/insserv/files/make.patch
deleted file mode 100644
index bb3b51a8ca..0000000000
--- a/meta/packages/insserv/files/make.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1=== modified file 'Makefile'
2--- old/Makefile 2008-06-24 14:49:47 +0000
3+++ new/Makefile 2008-06-24 15:56:15 +0000
4@@ -7,10 +7,10 @@
5 INITDIR = /etc/init.d
6 INSCONF = /etc/insserv.conf
7 #DESTDIR = /tmp/root
8-#DEBUG = -DDEBUG=1 -Wpacked
9+DEBUG = -DDEBUG=1 -Wpacked
10 #LOOPS = -DIGNORE_LOOPS=1
11 DEBUG =
12-ISSUSE = -DSUSE
13+#ISSUSE = -DSUSE
14 DESTDIR =
15 VERSION = 1.11.0
16 DATE = $(shell date +'%d%b%y' | tr '[:lower:]' '[:upper:]')
17@@ -28,7 +28,9 @@
18 COPTS = -O2
19 endif
20 endif
21- CFLAGS = -Wall $(COPTS) $(DEBUG) $(LOOPS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
22+COPTS += -g
23+
24+ MY_CFLAGS = $(CFLAGS) -Wall $(COPTS) $(DEBUG) $(LOOPS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
25 $(ISSUSE) -DINITDIR=\"$(INITDIR)\" -DINSCONF=\"$(INSCONF)\" -pipe
26 CLOOP = -falign-loops=0
27 CC = gcc
28@@ -58,13 +60,13 @@
29 all: $(TODO)
30
31 listing.o: listing.c listing.h .system
32- $(CC) $(CFLAGS) $(CLOOP) -c $<
33+ $(CC) $(MY_CFLAGS) $(CLOOP) -c $<
34
35 insserv.o: insserv.c listing.h .system
36- $(CC) $(CFLAGS) $(CLOOP) -c $<
37+ $(CC) $(MY_CFLAGS) $(CLOOP) -c $<
38
39 insserv: insserv.o listing.o
40- $(CC) $(CFLAGS) -Wl,-O,3,--relax -o $@ $^
41+ $(CC) $(MY_CFLAGS) -Wl,-O,3,--relax -o $@ $^
42
43 ifeq ($(ISSUSE),-DSUSE)
44 insserv.8: insserv.8.in .system
45@@ -86,10 +88,10 @@
46 -include .depend.listing .depend.insserv
47
48 .depend.listing:
49- @$(CC) $(CFLAGS) -M listing.c >$@ 2>/dev/null
50+ @$(CC) $(MY_CFLAGS) -M listing.c >$@ 2>/dev/null
51
52 .depend.insserv:
53- @$(CC) $(CFLAGS) -M insserv.c >$@ 2>/dev/null
54+ @$(CC) $(MY_CFLAGS) -M insserv.c >$@ 2>/dev/null
55
56 install: $(TODO)
57 $(MKDIR) $(SBINDIR)
58
diff --git a/meta/packages/insserv/insserv_1.11.0.bb b/meta/packages/insserv/insserv_1.11.0.bb
deleted file mode 100644
index a45ccda48f..0000000000
--- a/meta/packages/insserv/insserv_1.11.0.bb
+++ /dev/null
@@ -1,17 +0,0 @@
1LICENSE = "GPL"
2SECTION = "base"
3PR = "r1"
4
5SRC_URI = "ftp://ftp.suse.com/pub/projects/init/${BPN}-${PV}.tar.gz \
6 file://40_segfault_virtprov.dpatch;patch=1 \
7 file://42_loopnochangemsg.dpatch;patch=1 \
8 file://make.patch;patch=1 \
9 file://crosscompile_fix.patch;patch=1 \
10 file://insserv.conf"
11
12do_install () {
13 oe_runmake 'DESTDIR=${D}' install
14 install -m0644 ${WORKDIR}/insserv.conf ${D}${sysconfdir}/insserv.conf
15}
16
17BBCLASSEXTEND = "native"
diff --git a/meta/packages/intltool/intltool-0.40.6/intltool-nowarn-0.40.0.patch b/meta/packages/intltool/intltool-0.40.6/intltool-nowarn-0.40.0.patch
deleted file mode 100644
index 61ecba266e..0000000000
--- a/meta/packages/intltool/intltool-0.40.6/intltool-nowarn-0.40.0.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1Index: intltool-0.40.0/intltool-extract.in
2===================================================================
3--- intltool-0.40.0.orig/intltool-extract.in 2008-12-17 11:50:19.000000000 +0000
4+++ intltool-0.40.0/intltool-extract.in 2008-12-17 11:50:31.000000000 +0000
5@@ -1,4 +1,4 @@
6-#!@INTLTOOL_PERL@ -w
7+#!@INTLTOOL_PERL@
8 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
9
10 #
11Index: intltool-0.40.0/intltool-merge.in
12===================================================================
13--- intltool-0.40.0.orig/intltool-merge.in 2008-12-17 11:50:19.000000000 +0000
14+++ intltool-0.40.0/intltool-merge.in 2008-12-17 11:50:38.000000000 +0000
15@@ -1,4 +1,4 @@
16-#!@INTLTOOL_PERL@ -w
17+#!@INTLTOOL_PERL@
18 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
19
20 #
21Index: intltool-0.40.0/intltool-prepare.in
22===================================================================
23--- intltool-0.40.0.orig/intltool-prepare.in 2008-12-17 11:50:19.000000000 +0000
24+++ intltool-0.40.0/intltool-prepare.in 2008-12-17 11:50:42.000000000 +0000
25@@ -1,4 +1,4 @@
26-#!@INTLTOOL_PERL@ -w
27+#!@INTLTOOL_PERL@
28 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
29
30 # Intltool .desktop, .directory Prepare Tool
31Index: intltool-0.40.0/intltool-unicodify.in
32===================================================================
33--- intltool-0.40.0.orig/intltool-unicodify.in 2008-12-17 11:50:19.000000000 +0000
34+++ intltool-0.40.0/intltool-unicodify.in 2008-12-17 11:50:46.000000000 +0000
35@@ -1,4 +1,4 @@
36-#!@INTLTOOL_PERL@ -w
37+#!@INTLTOOL_PERL@
38
39 #
40 # The i18n Unicode Encoding Utility
41Index: intltool-0.40.0/intltool-update.in
42===================================================================
43--- intltool-0.40.0.orig/intltool-update.in 2008-12-17 11:50:19.000000000 +0000
44+++ intltool-0.40.0/intltool-update.in 2008-12-17 11:50:49.000000000 +0000
45@@ -1,4 +1,4 @@
46-#!@INTLTOOL_PERL@ -w
47+#!@INTLTOOL_PERL@
48 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
49
50 #
diff --git a/meta/packages/intltool/intltool.inc b/meta/packages/intltool/intltool.inc
deleted file mode 100644
index f9bdf93b7b..0000000000
--- a/meta/packages/intltool/intltool.inc
+++ /dev/null
@@ -1,17 +0,0 @@
1DESCRIPTION = "Utility scripts for internationalizing XML"
2PRIORITY = "optional"
3SECTION = "devel"
4LICENSE = "GPL"
5
6URLV="${@'.'.join(bb.data.getVar('PV',d,1).split('.')[0:2])}"
7SRC_URI = "${GNOME_MIRROR}/intltool/${URLV}/intltool-${PV}.tar.bz2"
8S = "${WORKDIR}/intltool-${PV}"
9
10DEPENDS = "libxml-parser-perl-native"
11#RDEPENDS = "libxml-parser-perl"
12RRECOMMENDS = "perl-modules"
13
14inherit autotools pkgconfig
15
16export PERL_virtclass-native = "/usr/bin/env perl"
17BBCLASSEXTEND = "native"
diff --git a/meta/packages/intltool/intltool_0.40.6.bb b/meta/packages/intltool/intltool_0.40.6.bb
deleted file mode 100644
index 1f23a41f89..0000000000
--- a/meta/packages/intltool/intltool_0.40.6.bb
+++ /dev/null
@@ -1,5 +0,0 @@
1require intltool.inc
2
3PR = "r0"
4
5SRC_URI_append = " file://intltool-nowarn-0.40.0.patch"
diff --git a/meta/packages/iproute2/iproute2-2.6.34/configure-cross.patch b/meta/packages/iproute2/iproute2-2.6.34/configure-cross.patch
deleted file mode 100644
index 67dc6f5a30..0000000000
--- a/meta/packages/iproute2/iproute2-2.6.34/configure-cross.patch
+++ /dev/null
@@ -1,61 +0,0 @@
1# borrow from OE, to handle cross compile mess
2#
3# ktian1, 06/28/2010
4Index: iproute2-2.6.34/configure
5===================================================================
6--- iproute2-2.6.34.orig/configure
7+++ iproute2-2.6.34/configure
8@@ -4,7 +4,7 @@
9 INCLUDE=${1:-"$PWD/include"}
10
11 TABLES=
12-
13+SYSROOT=$1
14 check_atm()
15 {
16 cat >/tmp/atmtest.c <<EOF
17@@ -15,7 +15,7 @@ int main(int argc, char **argv) {
18 return 0;
19 }
20 EOF
21-gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
22+$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
23 if [ $? -eq 0 ]
24 then
25 echo "TC_CONFIG_ATM:=y" >>Config
26@@ -49,7 +49,7 @@ int main(int argc, char **argv)
27
28 EOF
29
30-if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
31+if $CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
32 then
33 echo "TC_CONFIG_XT:=y" >>Config
34 echo "using xtables"
35@@ -86,7 +86,7 @@ int main(int argc, char **argv) {
36 }
37
38 EOF
39-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
40+$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
41
42 if [ $? -eq 0 ]
43 then
44@@ -126,7 +126,7 @@ int main(int argc, char **argv) {
45 }
46
47 EOF
48-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
49+$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
50
51 if [ $? -eq 0 ]
52 then
53@@ -150,7 +150,7 @@ check_ipt()
54 check_ipt_lib_dir()
55 {
56 IPT_LIB_DIR=""
57- for dir in /lib /usr/lib /usr/local/lib
58+ for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib
59 do
60 for file in $dir/$TABLES/lib*t_*so ; do
61 if [ -f $file ]; then
diff --git a/meta/packages/iproute2/iproute2.inc b/meta/packages/iproute2/iproute2.inc
deleted file mode 100644
index 7246b87e9b..0000000000
--- a/meta/packages/iproute2/iproute2.inc
+++ /dev/null
@@ -1,27 +0,0 @@
1DESCRIPTION = "kernel routing and traffic control utilities"
2HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
3SECTION = "base"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
6 file://ip/ip.c;md5=186731afa4b42e30b9b37efa4ec90b93"
7DEPENDS = "flex-native bison-native"
8
9inherit update-alternatives
10
11EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_KERNEL_DIR}/include DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR=/sbin"
12
13do_install () {
14 oe_runmake DESTDIR=${D} install
15 mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
16 install -d ${D}${datadir}
17 mv ${D}/share/* ${D}${datadir}/ || true
18 rm ${D}/share -rf || true
19}
20
21FILES_${PN} += "/usr/lib/tc/*"
22FILES_${PN}-dbg += "/usr/lib/tc/.debug"
23
24ALTERNATIVE_NAME = "ip"
25ALTERNATIVE_PATH = "${base_sbindir}/ip.iproute2"
26ALTERNATIVE_LINK = "${base_bindir}/ip"
27ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/packages/iproute2/iproute2_2.6.34.bb b/meta/packages/iproute2/iproute2_2.6.34.bb
deleted file mode 100644
index c5e0ef6e56..0000000000
--- a/meta/packages/iproute2/iproute2_2.6.34.bb
+++ /dev/null
@@ -1,6 +0,0 @@
1require iproute2.inc
2
3PR = "r0"
4
5SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}.tar.bz2 \
6 file://configure-cross.patch"
diff --git a/meta/packages/iso-codes/iso-codes_3.3.bb b/meta/packages/iso-codes/iso-codes_3.3.bb
deleted file mode 100644
index 23d025f4d2..0000000000
--- a/meta/packages/iso-codes/iso-codes_3.3.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1SECTION = "libs"
2DESCRIPTION = "ISO language, territory, currency, script codes and their translations"
3PRIORITY = "optional"
4LICENSE = "LGPL"
5SECTION = "libs"
6PACKAGE_ARCH = "all"
7
8SRC_URI = "ftp://pkg-isocodes.alioth.debian.org/pub/pkg-isocodes/iso-codes-${PV}.tar.gz"
9
10inherit autotools
11
12FILES_${PN}-dev="${datadir}/pkgconfig/iso-codes.pc"
13FILES_${PN}="${datadir}/xml/iso-codes/ \
14 ${datadir}/iso-codes/"
diff --git a/meta/packages/js/files/buildcc.patch b/meta/packages/js/files/buildcc.patch
deleted file mode 100644
index 26eef218d6..0000000000
--- a/meta/packages/js/files/buildcc.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1jskwgen should be built by BUILD_CC in cross environment
2
37/23/2010 - created by Qing He <qing.he@intel.com>
4
5diff -uNr js.orig//src/Makefile.ref js/src/Makefile.ref
6--- js.orig//src/Makefile.ref 2009-02-25 21:24:29.000000000 +0800
7+++ js/src/Makefile.ref 2010-07-23 13:26:51.000000000 +0800
8@@ -303,10 +303,10 @@
9
10 $(OBJDIR)/jskwgen.o: jskwgen.c jskeyword.tbl
11 @$(MAKE_OBJDIR)
12- $(CC) -o $@ -c $(CFLAGS) $<
13+ $(BUILD_CC) -o $@ -c $(BUILD_CFLAGS) $<
14
15 $(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX): $(OBJDIR)/jskwgen.$(OBJ_SUFFIX)
16- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^
17+ $(BUILD_CC) -o $@ $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $^
18
19 endif
20
diff --git a/meta/packages/js/files/configure.ac b/meta/packages/js/files/configure.ac
deleted file mode 100644
index 41af298455..0000000000
--- a/meta/packages/js/files/configure.ac
+++ /dev/null
@@ -1,28 +0,0 @@
1AC_INIT
2
3AC_CHECK_SIZEOF([char])
4AC_CHECK_SIZEOF([short])
5AC_CHECK_SIZEOF([int])
6AC_CHECK_SIZEOF([int64_t])
7AC_CHECK_SIZEOF([long])
8AC_CHECK_SIZEOF([long long])
9AC_CHECK_SIZEOF([int *])
10AC_CHECK_SIZEOF([float])
11AC_CHECK_SIZEOF([double])
12
13AC_CHECK_ALIGNOF([char])
14AC_CHECK_ALIGNOF([short])
15AC_CHECK_ALIGNOF([int])
16AC_CHECK_ALIGNOF([int64_t])
17AC_CHECK_ALIGNOF([long])
18AC_CHECK_ALIGNOF([long long])
19AC_CHECK_ALIGNOF([int *])
20AC_CHECK_ALIGNOF([float])
21AC_CHECK_ALIGNOF([double])
22
23AC_C_BIGENDIAN
24
25AC_TYPE_LONG_LONG_INT
26
27AC_CONFIG_HEADER([conf.h])
28AC_OUTPUT
diff --git a/meta/packages/js/files/jsautocfg.h b/meta/packages/js/files/jsautocfg.h
deleted file mode 100644
index 16e38bf8d6..0000000000
--- a/meta/packages/js/files/jsautocfg.h
+++ /dev/null
@@ -1,74 +0,0 @@
1#ifndef js_cpucfg___
2#define js_cpucfg___
3
4/* AUTOMATICALLY GENERATED - DO NOT EDIT */
5
6#include "../conf.h"
7
8#ifdef WORDS_BIGENDIAN
9# undef IS_LITTLE_ENDIAN
10# define IS_BIG_ENDIAN 1
11#else
12# define IS_LITTLE_ENDIAN 1
13# undef IS_BIG_ENDIAN
14#endif
15
16#define __I_LOG2(n) ( \
17 ((n) == 1)? 0: \
18 ((n) == 2)? 1: \
19 ((n) == 4)? 2: \
20 ((n) == 8)? 3: \
21 ((n) == 16)? 4: \
22 ((n) == 32)? 5: \
23 ((n) == 64)? 6: \
24 ((n) == 128)? 7: \
25 -1)
26
27#define JS_BYTES_PER_BYTE SIZEOF_CHAR
28#define JS_BYTES_PER_SHORT SIZEOF_SHORT
29#define JS_BYTES_PER_INT SIZEOF_INT
30#define JS_BYTES_PER_INT64 SIZEOF_INT64_T
31#define JS_BYTES_PER_LONG SIZEOF_LONG
32#define JS_BYTES_PER_FLOAT SIZEOF_FLOAT
33#define JS_BYTES_PER_DOUBLE SIZEOF_DOUBLE
34#define JS_BYTES_PER_WORD SIZEOF_LONG
35#define JS_BYTES_PER_DWORD SIZEOF_LONG_LONG
36
37#define JS_BITS_PER_BYTE 8L
38#define JS_BITS_PER_SHORT (JS_BITS_PER_BYTE * JS_BYTES_PER_SHORT)
39#define JS_BITS_PER_INT (JS_BITS_PER_BYTE * JS_BYTES_PER_INT)
40#define JS_BITS_PER_INT64 (JS_BITS_PER_BYTE * JS_BYTES_PER_INT64)
41#define JS_BITS_PER_LONG (JS_BITS_PER_BYTE * JS_BYTES_PER_LONG)
42#define JS_BITS_PER_FLOAT (JS_BITS_PER_BYTE * JS_BYTES_PER_GLOAT)
43#define JS_BITS_PER_DOUBLE (JS_BITS_PER_BYTE * JS_BYTES_PER_DOUBLE)
44#define JS_BITS_PER_WORD (JS_BITS_PER_BYTE * JS_BYTES_PER_WORD)
45
46#define JS_BITS_PER_BYTE_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
47#define JS_BITS_PER_SHORT_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
48#define JS_BITS_PER_INT_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
49#define JS_BITS_PER_INT64_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
50#define JS_BITS_PER_LONG_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
51#define JS_BITS_PER_FLOAT_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
52#define JS_BITS_PER_DOUBLE_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
53#define JS_BITS_PER_WORD_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
54
55#define JS_ALIGN_OF_SHORT ALIGNOF_SHORT
56#define JS_ALIGN_OF_INT ALIGNOF_INT
57#define JS_ALIGN_OF_LONG ALIGNOF_LONG
58#define JS_ALIGN_OF_INT64 ALIGNOF_INT64_T
59#define JS_ALIGN_OF_FLOAT ALIGNOF_FLOAT
60#define JS_ALIGN_OF_DOUBLE ALIGNOF_DOUBLE
61#define JS_ALIGN_OF_POINTER ALIGNOF_INT_P
62#define JS_ALIGN_OF_WORD ALIGNOF_LONG
63
64#define JS_BYTES_PER_WORD_LOG2 __I_LOG2(JS_BYTES_PER_WORD)
65#define JS_BYTES_PER_DWORD_LOG2 __I_LOG2(JS_BYTES_PER_DWORDS)
66#define JS_WORDS_PER_DWORD_LOG2 __I_LOG2(JS_BYTES_PER_DWORDS / JS_BYTES_PER_WORD)
67
68#define JS_STACK_GROWTH_DIRECTION (-1)
69
70#ifdef HAVE_LONG_LONG_INT
71# define JS_HAVE_LONG_LONG
72#endif
73
74#endif /* js_cpucfg___ */
diff --git a/meta/packages/js/files/link_with_gcc.patch b/meta/packages/js/files/link_with_gcc.patch
deleted file mode 100644
index d74b94f378..0000000000
--- a/meta/packages/js/files/link_with_gcc.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: src/config/Linux_All.mk
2===================================================================
3--- src.orig/config/Linux_All.mk 2005-05-10 19:53:44.000000000 +0000
4+++ src/config/Linux_All.mk 2007-06-18 17:20:05.000000000 +0000
5@@ -47,7 +47,7 @@
6 OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R
7
8 RANLIB = echo
9-MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS)
10+MKSHLIB = $(CC) -shared $(XMKSHLIBOPTS)
11
12 #.c.o:
13 # $(CC) -c -MD $*.d $(CFLAGS) $<
diff --git a/meta/packages/js/files/usepic.patch b/meta/packages/js/files/usepic.patch
deleted file mode 100644
index ddd31be9cb..0000000000
--- a/meta/packages/js/files/usepic.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1Mips needs -fPIC to compile properly. These tests are broken anyway as they test
2the build system architecture, not the target. This is a hack.
3
4RP 10/6/2010
5
6Index: src/config/Linux_All.mk
7===================================================================
8--- src.orig/config/Linux_All.mk 2010-06-10 22:09:43.000000000 +0100
9+++ src/config/Linux_All.mk 2010-06-10 22:09:55.000000000 +0100
10@@ -90,14 +90,10 @@
11 # Use the editline library to provide line-editing support.
12 JS_EDITLINE = 1
13
14-ifeq ($(CPU_ARCH),x86_64)
15 # Use VA_COPY() standard macro on x86-64
16 # FIXME: better use it everywhere
17 OS_CFLAGS += -DHAVE_VA_COPY -DVA_COPY=va_copy
18-endif
19
20-ifeq ($(CPU_ARCH),x86_64)
21 # We need PIC code for shared libraries
22 # FIXME: better patch rules.mk & fdlibm/Makefile*
23 OS_CFLAGS += -DPIC -fPIC
24-endif
diff --git a/meta/packages/js/js_1.7.0+1.8.0rc1.bb b/meta/packages/js/js_1.7.0+1.8.0rc1.bb
deleted file mode 100644
index 97cba90d03..0000000000
--- a/meta/packages/js/js_1.7.0+1.8.0rc1.bb
+++ /dev/null
@@ -1,47 +0,0 @@
1DESCRIPTION = "Spidermonkey: a javascript engine written in C"
2HOMEPAGE = "http://www.mozilla.org/js/spidermonkey/"
3SECTION = "libs"
4
5# the package is licensed under either of the following
6LICENSE = "MPL1.1 | GPLv2+ | LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://jsapi.c;beginline=4;endline=39;md5=347c6bbf4fb4547de1fa5ad830030063"
8PR = "r1"
9
10SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/js/js-1.8.0-rc1.tar.gz \
11 file://link_with_gcc.patch \
12 file://usepic.patch \
13 file://buildcc.patch;striplevel=2 \
14 file://jsautocfg.h \
15 file://configure.ac"
16
17S = "${WORKDIR}/js/src"
18
19# use local autoconf script to generate a usable jsautocfg.h
20# don't bother with automake
21inherit autotools
22
23do_configure_prepend() {
24 cp -f ${WORKDIR}/configure.ac ${S}
25 cp -f ${WORKDIR}/jsautocfg.h ${S}
26}
27
28EXTRA_OEMAKE = "'CC=${CC}' 'LD=${LD}' 'XCFLAGS=${CFLAGS}' 'XLDFLAGS=${LDFLAGS} -Wl,-soname=libjs' \
29 'BUILD_CC=${BUILD_CC}' 'BUILD_CFLAGS=${BUILD_CFLAGS}' 'BUILD_LDFLAGS=${BUILD_LDFLAGS}'"
30
31PARALLEL_MAKE = ""
32
33do_compile() {
34 oe_runmake -f Makefile.ref JS_EDITLINE=1 PREBUILT_CPUCFG=1 BUILD_OPT=1
35}
36
37do_install() {
38 install -d ${D}${libdir}
39 install -d ${D}${includedir}
40 install -d ${D}${includedir}/js
41 oe_libinstall -so -C Linux_All_OPT.OBJ libjs ${D}${libdir}
42 install -m 0644 ${S}/*.h ${D}${includedir}/js
43}
44
45FILES_${PN} = "${libdir}/lib*.so"
46FILES_${PN}-dev = "${includedir} ${libdir}/lib*.a"
47
diff --git a/meta/packages/libassuan/libassuan_2.0.0.bb b/meta/packages/libassuan/libassuan_2.0.0.bb
deleted file mode 100644
index 11934013ce..0000000000
--- a/meta/packages/libassuan/libassuan_2.0.0.bb
+++ /dev/null
@@ -1,15 +0,0 @@
1DESCRIPTION = "IPC library used by GnuPG and GPGME"
2HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
3BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
4
5LICENSE = "GPLv3 & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
7 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
8 file://src/assuan.h;endline=20;md5=8a6f091b9d114f0e06aa91cb3460154c \
9 file://src/assuan-defs.h;endline=20;md5=c51ca5e56b000d79d500eee7cd8dc2e5"
10
11DEPENDS = "libgpg-error"
12
13SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-${PV}.tar.bz2"
14
15inherit autotools binconfig
diff --git a/meta/packages/libcap/libcap.inc b/meta/packages/libcap/libcap.inc
deleted file mode 100644
index 16eaae690c..0000000000
--- a/meta/packages/libcap/libcap.inc
+++ /dev/null
@@ -1,34 +0,0 @@
1DESCRIPTION = "support for getting/setting POSIX.1e capabilities"
2HOMEPAGE = "http://sites.google.com/site/fullycapable/"
3
4# no specific GPL version required
5LICENSE = "BSD | GPL"
6LIC_FILES_CHKSUM = "file://License;md5=731de803c1ccbcb05a9b3523279c8d7f"
7
8DEPENDS = "libpam attr perl-native"
9
10SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/security/linux-privs/libcap2/${BPN}-${PV}.tar.bz2"
11
12inherit lib_package
13
14do_configure() {
15 # libcap uses := for compilers, fortunately, it gives us a hint
16 # on what should be replaced with ?=
17 sed -e 's,:=,?=,g' -i Make.Rules
18 sed -e 's,BUILD_CFLAGS ?=,BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules
19}
20
21EXTRA_OEMAKE = "LIBATTR=yes PAM_CAP=yes INDENT= lib=lib"
22EXTRA_OEMAKE_virtclass-native = "LIBATTR=no PAM_CAP=no INDENT= lib=lib"
23
24do_compile() {
25 oe_runmake
26}
27
28do_install() {
29 oe_runmake install DESTDIR="${D}"
30}
31
32# pam files
33FILES_${PN} += "${libdir}/security/*.so"
34FILES_${PN}-dbg += "${libdir}/security/.debug/*.so"
diff --git a/meta/packages/libcap/libcap_2.19.bb b/meta/packages/libcap/libcap_2.19.bb
deleted file mode 100644
index eb861535e9..0000000000
--- a/meta/packages/libcap/libcap_2.19.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require libcap.inc
2
3PR = "r1"
diff --git a/meta/packages/libcheck/libcheck_0.9.8.bb b/meta/packages/libcheck/libcheck_0.9.8.bb
deleted file mode 100644
index 048b8ce622..0000000000
--- a/meta/packages/libcheck/libcheck_0.9.8.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "Check Test Framework"
2HOMEPAGE = "http://gitorious.org/opensuse/zypper"
3PRIORITY = "optional"
4SECTION = "devel"
5
6LICENSE = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
8
9PR = "r0"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/check/check-${PV}.tar.gz"
12S = "${WORKDIR}/check-${PV}"
13
14inherit autotools pkgconfig
15
16RREPLACES_${PN} = "check (<= 0.9.5)"
diff --git a/meta/packages/libcroco/files/croco.patch b/meta/packages/libcroco/files/croco.patch
deleted file mode 100644
index 572f9de59f..0000000000
--- a/meta/packages/libcroco/files/croco.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1--- opie/configure.in.old 2006-05-19 20:57:30.000000000 +0100
2+++ opie/configure.in 2006-05-19 20:57:56.000000000 +0100
3@@ -131,8 +131,8 @@
4 dnl Define the CROCO_LIBS and CROCO_CFLAGS variables. These will be used
5 dnl by client application to know where to find croco include files and libs.
6 dnl
7-CROCO_LIBS="-L${libdir} -lcroco-$LIBCROCO_MAJOR_VERSION.$LIBCROCO_MINOR_VERSION"
8-CROCO_CFLAGS="-I${includedir}/libcroco-$LIBCROCO_MAJOR_VERSION.$LIBCROCO_MINOR_VERSION"
9+CROCO_LIBS='-L${libdir}'" -lcroco-$LIBCROCO_MAJOR_VERSION.$LIBCROCO_MINOR_VERSION"
10+CROCO_CFLAGS='-I${includedir}'"/libcroco-$LIBCROCO_MAJOR_VERSION.$LIBCROCO_MINOR_VERSION"
11
12 AC_SUBST(LIBXML2_LIBS)
13 AC_SUBST(LIBXML2_CFLAGS)
diff --git a/meta/packages/libcroco/libcroco_0.6.2.bb b/meta/packages/libcroco/libcroco_0.6.2.bb
deleted file mode 100644
index 2ea33b155b..0000000000
--- a/meta/packages/libcroco/libcroco_0.6.2.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "The Libcroco project is an effort to build a generic Cascading Style Sheet (CSS) parsing and manipulation toolkit"
2HOMEPAGE = "http://www.gnome.org/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4
5LICENSE = "LGPLv2 & LGPLv2.1"
6LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605 \
7 file://src/cr-rgb.c;endline=25;md5=1df8189094ba7bbed953225785032826 \
8 file://tests/cr-test-utils.c;endline=21;md5=2382c27934cae1d3792fcb17a6142c4e"
9
10SECTION = "x11/utils"
11DEPENDS = "glib-2.0 libxml2 zlib"
12PR = "r0"
13
14inherit autotools pkgconfig gnome
15
16SRC_URI_append = " file://croco.patch;apply=yes "
diff --git a/meta/packages/libdaemon/libdaemon_0.14.bb b/meta/packages/libdaemon/libdaemon_0.14.bb
deleted file mode 100644
index b4092fdbb9..0000000000
--- a/meta/packages/libdaemon/libdaemon_0.14.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1DESCRIPTION = "libdaemon is a lightweight C library which eases the writing of UNIX daemons."
2SECTION = "libs"
3AUTHOR = "Lennart Poettering <lennart@poettering.net>"
4HOMEPAGE = "http://0pointer.de/lennart/projects/libdaemon/"
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
7 file://libdaemon/daemon.h;startline=9;endline=21;md5=94c709a83d8251377c322322176d4ffe"
8PR = "r0"
9
10SRC_URI = "http://0pointer.de/lennart/projects/libdaemon/libdaemon-${PV}.tar.gz"
11
12inherit autotools pkgconfig
13
14EXTRA_OECONF = "--disable-lynx"
diff --git a/meta/packages/libetpan/files/cxx-is-here.patch b/meta/packages/libetpan/files/cxx-is-here.patch
deleted file mode 100644
index d910daab17..0000000000
--- a/meta/packages/libetpan/files/cxx-is-here.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1---
2 configure.ac | 1 +
3 1 file changed, 1 insertion(+)
4
5--- libetpan-0.54.orig/configure.ac
6+++ libetpan-0.54/configure.ac
7@@ -104,10 +104,11 @@ if test "$have_w32_system" = yes; then
8 fi
9 AM_CONDITIONAL(HAVE_MINGW32_SYSTEM, test "$have_w32_system" = yes)
10
11 # Check the C compiler.
12 AC_PROG_CC
13+AC_PROG_CXX
14
15 # Compiler flags.
16 AC_ARG_ENABLE(debug, [ --enable-debug setup flags (gcc) for debugging (default=no)],
17 if test "x$GCC" = xyes; then
18 CFLAGS="$CFLAGS -O2 -g"
diff --git a/meta/packages/libetpan/libetpan_0.54.bb b/meta/packages/libetpan/libetpan_0.54.bb
deleted file mode 100644
index 5666ea0ded..0000000000
--- a/meta/packages/libetpan/libetpan_0.54.bb
+++ /dev/null
@@ -1,19 +0,0 @@
1DESCRIPTION = "libetpan is a library for communicating with mail and news servers. \
2It supports the protocols SMTP, POP3, IMAP and NNTP."
3HOMEPAGE = "http://www.etpan.org"
4SECTION = "libs"
5DEPENDS = "curl expat gnutls"
6LICENSE = "BSD"
7PR = "r1"
8
9SRC_URI = "${SOURCEFORGE_MIRROR}/libetpan/libetpan-${PV}.tar.gz \
10 file://cxx-is-here.patch;patch=1"
11
12inherit autotools pkgconfig gettext binconfig
13
14EXTRA_OECONF = "--without-openssl --with-gnutls --disable-db"
15
16PARALLEL_MAKE = ""
17
18FILES_${PN} = "${libdir}/lib*.so.*"
19FILES_${PN}-dev = "${bindir} ${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libdir}/pkgconfig"
diff --git a/meta/packages/libevent/libevent_1.4.14b.bb b/meta/packages/libevent/libevent_1.4.14b.bb
deleted file mode 100644
index 4209305512..0000000000
--- a/meta/packages/libevent/libevent_1.4.14b.bb
+++ /dev/null
@@ -1,15 +0,0 @@
1DESCRIPTION = "an asynchronous event notification library"
2HOMEPAGE = "http://www.monkey.org/~provos/libevent/"
3SECTION = "libs"
4
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://event.c;endline=26;md5=bc20aa63bf60c36c2d8edb77746f6b7c"
7
8PR = "r0"
9
10SRC_URI = "http://www.monkey.org/~provos/${BPN}-${PV}-stable.tar.gz"
11S = "${WORKDIR}/${BPN}-${PV}-stable"
12
13inherit autotools
14
15LEAD_SONAME = "libevent-1.4.so"
diff --git a/meta/packages/libffi/libffi_3.0.8.bb b/meta/packages/libffi/libffi_3.0.8.bb
deleted file mode 100644
index 06106279b0..0000000000
--- a/meta/packages/libffi/libffi_3.0.8.bb
+++ /dev/null
@@ -1,5 +0,0 @@
1SRC_URI = "ftp://sourceware.org/pub/libffi/libffi-3.0.8.tar.gz"
2
3inherit autotools
4
5BBCLASSEXTEND = "native" \ No newline at end of file
diff --git a/meta/packages/libfm/libfm_0.1.12.bb b/meta/packages/libfm/libfm_0.1.12.bb
deleted file mode 100644
index 83e6af8523..0000000000
--- a/meta/packages/libfm/libfm_0.1.12.bb
+++ /dev/null
@@ -1,17 +0,0 @@
1DESCRIPTION = "Library for file management"
2HOMEPAGE = "http://pcmanfm.sourceforge.net/"
3BUGTRACKER = ""
4
5LICENSE = "GPLv2 & GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
7 file://src/fm.h;endline=22;md5=e64555171770a551e3b51cc06fc62f1a \
8 file://src/base/fm-config.h;endline=23;md5=ad0fc418c3cf041eea35ddb3daf37f17"
9
10SECTION = "x11/libs"
11DEPENDS = "gtk+ menu-cache intltool"
12
13PR = "r0"
14
15SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.gz"
16
17inherit autotools pkgconfig
diff --git a/meta/packages/libfribidi/files/libtool-update.patch b/meta/packages/libfribidi/files/libtool-update.patch
deleted file mode 100644
index c7031008fd..0000000000
--- a/meta/packages/libfribidi/files/libtool-update.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- fribidi-0.10.4/configure.in~ 2002-05-19 11:06:48.000000000 +0100
2+++ fribidi-0.10.4/configure.in 2004-08-03 17:42:28.000000000 +0100
3@@ -50,7 +50,7 @@
4 AC_PROG_INSTALL
5 AC_PROG_LN_S
6 AC_PROG_MAKE_SET
7-AC_PROG_RANLIB
8+#AC_PROG_RANLIB
9 AC_PATH_PROG(SED, sed, $PATH)
10
11
diff --git a/meta/packages/libfribidi/libfribidi_0.10.4.bb b/meta/packages/libfribidi/libfribidi_0.10.4.bb
deleted file mode 100644
index a9850fe52d..0000000000
--- a/meta/packages/libfribidi/libfribidi_0.10.4.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1DESCRIPTION = "Fribidi library for bidirectional text"
2SECTION = "libs"
3PRIORITY = "optional"
4
5inherit autotools pkgconfig
6
7PR = "r0"
8
9S = "${WORKDIR}/fribidi-${PV}"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/fribidi/fribidi-${PV}.tar.bz2 \
12 file://libtool-update.patch;patch=1"
13
14#PACKAGES += " ${PN}-bin"
15FILES_${PN} = "${libdir}/lib*.so.*"
16#FILES_${PN}-bin = "${libdir}/uu*"
17
18do_configure_prepend () {
19# this version of libtool is old - we have to nobble this file to get it to litoolize
20 rm ltconfig
21 rm aclocal.m4
22 rm acinclude.m4
23}
diff --git a/meta/packages/libgcrypt/files/add-pkgconfig-support.patch b/meta/packages/libgcrypt/files/add-pkgconfig-support.patch
deleted file mode 100644
index 24a59787a2..0000000000
--- a/meta/packages/libgcrypt/files/add-pkgconfig-support.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1Index: libgcrypt-1.2.4/configure.ac
2===================================================================
3--- libgcrypt-1.2.4.orig/configure.ac 2008-03-19 22:14:50.000000000 +0000
4+++ libgcrypt-1.2.4/configure.ac 2008-03-19 22:14:58.000000000 +0000
5@@ -807,6 +807,7 @@
6 doc/Makefile
7 src/Makefile
8 src/gcrypt.h
9+src/libgcrypt.pc
10 src/libgcrypt-config
11 tests/Makefile
12 w32-dll/Makefile
13Index: libgcrypt-1.2.4/src/libgcrypt.pc.in
14===================================================================
15--- /dev/null 1970-01-01 00:00:00.000000000 +0000
16+++ libgcrypt-1.2.4/src/libgcrypt.pc.in 2008-03-19 22:14:58.000000000 +0000
17@@ -0,0 +1,32 @@
18+# Process this file with autoconf to produce a pkg-config metadata file.
19+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
20+# Author: Simon Josefsson
21+#
22+# This file is free software; as a special exception the author gives
23+# unlimited permission to copy and/or distribute it, with or without
24+# modifications, as long as this notice is preserved.
25+#
26+# This file is distributed in the hope that it will be useful, but
27+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
28+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29+
30+prefix=@prefix@
31+exec_prefix=@exec_prefix@
32+libdir=@libdir@
33+includedir=@includedir@
34+
35+# API info
36+api_version=@LIBGCRYPT_CONFIG_API_VERSION@
37+
38+# Misc information.
39+symmetric_ciphers=@LIBGCRYPT_CIPHERS@
40+asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
41+digests=@LIBGCRYPT_DIGESTS@
42+
43+Name: libgcrypt
44+Description: GNU crypto library
45+URL: http://www.gnupg.org
46+Version: @VERSION@
47+Libs: -L${libdir} -lgcrypt
48+Libs.private: -L${libdir} -lgpg-error
49+Cflags: -I${includedir}
diff --git a/meta/packages/libgcrypt/libgcrypt.inc b/meta/packages/libgcrypt/libgcrypt.inc
deleted file mode 100644
index 08fe7992fa..0000000000
--- a/meta/packages/libgcrypt/libgcrypt.inc
+++ /dev/null
@@ -1,31 +0,0 @@
1DESCRIPTION = "A general purpose cryptographic library based on the code from GnuPG"
2HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
3BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
4SECTION = "libs"
5PRIORITY = "optional"
6
7# helper program gcryptrnd and getrandom are under GPL, rest LGPL
8LICENSE = "GPLv2+ & LGPLv2.1+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
10 file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
11
12DEPENDS = "libgpg-error"
13
14SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \
15 file://add-pkgconfig-support.patch"
16
17inherit autotools binconfig pkgconfig
18
19EXTRA_OECONF = "--without-pth --disable-asm --with-capabilities"
20
21# libgcrypt.pc is added locally and thus installed here
22do_install_append() {
23 install -d ${D}/${libdir}/pkgconfig
24 install -m 0644 ${S}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
25}
26
27ARM_INSTRUCTION_SET = "arm"
28
29# move libgcrypt-config into -dev package
30FILES_${PN} = "${libdir}/lib*.so.*"
31FILES_${PN}-dev += "${bindir} ${libdir}/pkgconfig/*.pc"
diff --git a/meta/packages/libgcrypt/libgcrypt_1.4.6.bb b/meta/packages/libgcrypt/libgcrypt_1.4.6.bb
deleted file mode 100644
index a592437913..0000000000
--- a/meta/packages/libgcrypt/libgcrypt_1.4.6.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require libgcrypt.inc
2
3PR = "r0"
diff --git a/meta/packages/libgdbus/libgdbus_git.bb b/meta/packages/libgdbus/libgdbus_git.bb
deleted file mode 100644
index f0101f9925..0000000000
--- a/meta/packages/libgdbus/libgdbus_git.bb
+++ /dev/null
@@ -1,10 +0,0 @@
1HOMEPAGE = "http://www.moblin.org/projects/projects_connman.php"
2SUMMARY = "Moblin Glib D-Bus integration"
3LICENSE = "GPL LGPL"
4DEPENDS = "glib-2.0 dbus"
5PV = "0.0+git${SRCREV}"
6S = "${WORKDIR}/git"
7
8SRC_URI = "git://git.kernel.org/pub/scm/bluetooth/libgdbus.git;protocol=git"
9
10inherit autotools pkgconfig
diff --git a/meta/packages/libgpg-error/libgpg-error-1.8/pkgconfig.patch b/meta/packages/libgpg-error/libgpg-error-1.8/pkgconfig.patch
deleted file mode 100644
index 49e47d874e..0000000000
--- a/meta/packages/libgpg-error/libgpg-error-1.8/pkgconfig.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6Index: libgpg-error-1.8/configure.ac
7===================================================================
8--- libgpg-error-1.8.orig/configure.ac 2010-05-06 06:01:08.000000000 -0700
9+++ libgpg-error-1.8/configure.ac 2010-07-21 02:20:20.923261305 -0700
10@@ -140,6 +140,7 @@
11 AC_SUBST(GPG_ERROR_CONFIG_CFLAGS)
12 AC_SUBST(GPG_ERROR_CONFIG_ISUBDIRAFTER)
13 AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config])
14+AC_CONFIG_FILES([src/gpg-error.pc])
15
16
17 # Special defines for certain platforms
18Index: libgpg-error-1.8/src/Makefile.am
19===================================================================
20--- libgpg-error-1.8.orig/src/Makefile.am 2010-04-14 02:16:44.000000000 -0700
21+++ libgpg-error-1.8/src/Makefile.am 2010-07-21 02:22:36.655012496 -0700
22@@ -37,13 +37,15 @@
23 bin_SCRIPTS = gpg-error-config
24 m4datadir = $(datadir)/aclocal
25 m4data_DATA = gpg-error.m4
26+pkgconfigdir = $(libdir)/pkgconfig
27+pkgconfig_DATA = gpg-error.pc
28
29 EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
30 mkerrnos.awk errnos.in README \
31 mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \
32 mkheader.awk gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
33 err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \
34- gpg-error.def.in versioninfo.rc.in
35+ gpg-error.def.in versioninfo.rc.in gpg-error.pc.in
36
37 BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
38 err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \
39Index: libgpg-error-1.8/src/gpg-error.pc.in
40===================================================================
41--- /dev/null 1970-01-01 00:00:00.000000000 +0000
42+++ libgpg-error-1.8/src/gpg-error.pc.in 2010-07-21 02:20:20.923261305 -0700
43@@ -0,0 +1,10 @@
44+prefix=@prefix@
45+exec_prefix=@exec_prefix@
46+libdir=@libdir@
47+includedir=@includedir@
48+
49+Name: gpg-error
50+Description: a library that defines common error values for all GnuPG components
51+Version: @VERSION@
52+Libs: -L{libdir} -lgpg-error
53+Cflags: -I${includedir}
diff --git a/meta/packages/libgpg-error/libgpg-error_1.8.bb b/meta/packages/libgpg-error/libgpg-error_1.8.bb
deleted file mode 100644
index 120feecafa..0000000000
--- a/meta/packages/libgpg-error/libgpg-error_1.8.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1DESCRIPTION = "a small library that defines common error values for all GnuPG components"
2HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
3BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
4
5LICENSE = "GPLv2+ & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
7 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
8 file://src/gpg-error.h;endline=23;md5=83c16c8f5cea85affa1ff270a6f4fcff \
9 file://src/init.c;endline=20;md5=b69742f2a8827d494c6f6a4b1768416c"
10
11
12SECTION = "libs"
13LICENSE = "GPLv2+ & LGPLv2.1+"
14DEPENDS = "gettext"
15PR = "r0"
16
17SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
18 file://pkgconfig.patch;"
19
20# move libgpg-error-config into -dev package
21FILES_${PN} = "${libdir}/lib*.so.*"
22FILES_${PN}-dev += "${bindir}/*"
23
24inherit autotools binconfig pkgconfig
diff --git a/meta/packages/libgsf/libgsf_1.14.5.bb b/meta/packages/libgsf/libgsf_1.14.5.bb
deleted file mode 100644
index 10b6390722..0000000000
--- a/meta/packages/libgsf/libgsf_1.14.5.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1LICENSE = "GPL"
2SECTION = "libs"
3PR = "r0"
4
5DEPENDS= "libxml2 bzip2 glib-2.0 zlib"
6RDEPENDS = "gconf gnome-vfs"
7
8
9PACKAGES =+ "${PN}-gnome ${PN}-gnome-dev "
10
11FILES_${PN}-gnome = "${libdir}/libgsf-gnome-1.so.*"
12FILES_${PN}-gnome-dev = "${libdir}/libgsf-gnome-1.* ${includedir}/libgsf-1/gsf-gnome"
13
14inherit autotools pkgconfig gnome gconf
15
16EXTRA_OECONF = "\
17 --without-python \
18 --without-gnome \
19 --disable-gtk-doc \
20 --with-bz2"
diff --git a/meta/packages/libgtkstylus/files/gtkstylus.sh b/meta/packages/libgtkstylus/files/gtkstylus.sh
deleted file mode 100644
index b1302ede0e..0000000000
--- a/meta/packages/libgtkstylus/files/gtkstylus.sh
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2
3GTK_MODULES=libgtkstylus.so
4
5export GTK_MODULES
diff --git a/meta/packages/libgtkstylus/libgtkstylus_0.5.bb b/meta/packages/libgtkstylus/libgtkstylus_0.5.bb
deleted file mode 100644
index f614048a16..0000000000
--- a/meta/packages/libgtkstylus/libgtkstylus_0.5.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1DESCRIPTION = "GTK plugin for stylus based systems"
2SECTION = "libs"
3DEPENDS = "gtk+"
4LICENSE = "LGPL"
5PR = "r2"
6
7inherit autotools
8
9SRC_URI = "http://burtonini.com/temp/${PN}-${PV}.tar.gz \
10 file://gtkstylus.sh"
11
12do_install_append() {
13 install -d ${D}/${sysconfdir}/X11/Xsession.d
14 install -m 755 ${WORKDIR}/gtkstylus.sh ${D}/${sysconfdir}/X11/Xsession.d/45gtkstylus
15}
16
17# Horrible but rpm falls over if you use '*'
18GTKVER = "2.10.0"
19
20FILES_${PN} = "${sysconfdir} \
21 ${libdir}/gtk-2.0/${GTKVER}/modules/libgtkstylus.so.*"
22FILES_${PN}-dbg += "${libdir}/gtk-2.0/${GTKVER}/modules/.debug"
23FILES_${PN}-dev += "${libdir}/gtk-2.0/${GTKVER}/modules/libgtkstylus.so \
24 ${libdir}/gtk-2.0/${GTKVER}/modules/libgtkstylus.*a"
diff --git a/meta/packages/libical/libical_0.44.bb b/meta/packages/libical/libical_0.44.bb
deleted file mode 100644
index 0b016a0b8f..0000000000
--- a/meta/packages/libical/libical_0.44.bb
+++ /dev/null
@@ -1,11 +0,0 @@
1DESCRIPTION = "iCal and scheduling (RFC 2445, 2446, 2447) library"
2HOMEPAGE = "http://sourceforge.net/projects/freeassociation/"
3BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16077&atid=116077"
4LICENSE = "LGPLv2.1 | MPLv1.1"
5LIC_FILES_CHKSUM = "file://COPYING;md5=35da21efce2b9f0ca07524c9f844e6ed \
6 file://LICENSE;md5=35da21efce2b9f0ca07524c9f844e6ed"
7SECTION = "libs"
8
9SRC_URI = "${SOURCEFORGE_MIRROR}/freeassociation/${P}.tar.gz"
10
11inherit autotools
diff --git a/meta/packages/libiconv/libiconv_1.9.2.bb b/meta/packages/libiconv/libiconv_1.9.2.bb
deleted file mode 100644
index d427dcef83..0000000000
--- a/meta/packages/libiconv/libiconv_1.9.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1DESCRIPTION = "GNU libiconv - libiconv is for you if your application needs to support \
2multiple character encodings, but that support lacks from your system."
3HOMEPAGE = "http://www.gnu.org/software/libiconv"
4SECTION = "libs"
5PRIORITY = "optional"
6NOTES = "Needs to be stripped down to: ascii iso8859-1 eucjp iso-2022jp gb utf8"
7PROVIDES = "virtual/libiconv"
8PR = "r4"
9LICENSE = "LGPL"
10SRC_URI = "ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-${PV}.tar.gz"
11
12S = "${WORKDIR}/libiconv-${PV}"
13
14inherit autotools pkgconfig
15
16EXTRA_OECONF += "--enable-shared --enable-static"
17
18do_configure () {
19 rm -f m4/libtool.m4 libcharset/m4/libtool.m4
20 autotools_do_configure
21}
diff --git a/meta/packages/libidl/libidl_0.8.12.bb b/meta/packages/libidl/libidl_0.8.12.bb
deleted file mode 100644
index 9cc9ea2ed8..0000000000
--- a/meta/packages/libidl/libidl_0.8.12.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1LICENSE = "LGPL"
2DESCRIPTION = "Library for parsing CORBA IDL files"
3SECTION = "gnome/libs"
4DEPENDS = "glib-2.0 flex"
5PR = "r4"
6
7SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/libIDL/0.8/libIDL-${PV}.tar.bz2"
8S = "${WORKDIR}/libIDL-${PV}"
9
10BINCONFIG_GLOB = "*-config-2"
11inherit autotools pkgconfig binconfig
12
13FILES_${PN} = "${libdir}/*.so.*"
14FILES_${PN}-dev += " ${bindir}"
15
16BBCLASSEXTEND = "native"
diff --git a/meta/packages/libidn/libidn_0.6.14.bb b/meta/packages/libidn/libidn_0.6.14.bb
deleted file mode 100644
index 17bb103d9e..0000000000
--- a/meta/packages/libidn/libidn_0.6.14.bb
+++ /dev/null
@@ -1,26 +0,0 @@
1DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
2HOMEPAGE = "http://www.gnu.org/software/libidn/"
3SECTION = "libs"
4LICENSE = "LGPLv2.1+ & GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
6 file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
7 file://lib/idna.h;firstline=6;endline=18;md5=6d9d5532eb28b99e860262281c540d02 \
8 file://src/idn.c;firstline=6;endline=18;md5=41b6aec531cc6a9d54a6c4deee251bf5"
9PR = "r0"
10
11inherit pkgconfig autotools gettext
12
13SRC_URI = "http://alpha.gnu.org/gnu/libidn/${P}.tar.gz"
14
15EXTRA_OECONF = " --disable-tld"
16
17do_configure_prepend() {
18 # this version of libidn copies AC_USE_SYSTEM_EXTENSIONS from
19 # autoconf CVS because atm the autoconf it uses is a bit old
20 # now with cross autotool, that macro is already there and this
21 # local definition causes circular dependency. Actually AC_GNU_SOURCE
22 # is identical to AC_USE_SYSTEM_EXTENSIONS. So remove all local
23 # references to the latter here.
24 sed -i -e "/AC_REQUIRE(\[gl_USE_SYSTEM_EXTENSIONS/d" ${S}/lib/gl/m4/gnulib-comp.m4
25 rm -f ${S}/lib/gl/m4/extensions.m4
26}
diff --git a/meta/packages/libidn/libidn_1.19.bb b/meta/packages/libidn/libidn_1.19.bb
deleted file mode 100644
index 2e29ade14c..0000000000
--- a/meta/packages/libidn/libidn_1.19.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
2HOMEPAGE = "http://www.gnu.org/software/libidn/"
3SECTION = "libs"
4LICENSE = "LGPLv2.1+ & GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
6 file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
7 file://lib/idna.h;firstline=6;endline=18;md5=643beb30bf98d8c4aed59a51b86fe9ea \
8 file://src/idn.c;firstline=6;endline=18;md5=07a57d46977b38a2557aac446dda35dd"
9PR = "r0"
10
11inherit pkgconfig autotools gettext
12
13SRC_URI = "http://ftp.gnu.org/gnu/libidn/${P}.tar.gz"
14
15# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+
16# so package command into a separate package
17PACKAGES =+ "idn"
18FILES_idn = "${bindir}/*"
19
20EXTRA_OECONF = " --disable-tld"
diff --git a/meta/packages/libmpc/libmpc.inc b/meta/packages/libmpc/libmpc.inc
deleted file mode 100644
index 6e18e588be..0000000000
--- a/meta/packages/libmpc/libmpc.inc
+++ /dev/null
@@ -1,6 +0,0 @@
1DESCRIPTION = "Mpc is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. It is built upon and follows the same principles as Mpfr"
2HOMEPAGE = "http://www.multiprecision.org/"
3LICENSE = "LGPLv2"
4SECTION = "libs"
5
6inherit autotools
diff --git a/meta/packages/libmpc/libmpc_0.8.2.bb b/meta/packages/libmpc/libmpc_0.8.2.bb
deleted file mode 100644
index 1792066e77..0000000000
--- a/meta/packages/libmpc/libmpc_0.8.2.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1require libmpc.inc
2
3DEPENDS = "gmp mpfr"
4
5PR = "r0"
6
7SRC_URI = "http://www.multiprecision.org/mpc/download/mpc-${PV}.tar.gz"
8S = "${WORKDIR}/mpc-${PV}"
9
10SRC_URI[md5sum] = "5b34aa804d514cc295414a963aedb6bf"
11SRC_URI[sha256sum] = "e664603757251fd8a352848276497a4c79b7f8b21fd8aedd5cc0598a38fee3e4"
12
13BBCLASSEXTEND = "native nativesdk"
14
diff --git a/meta/packages/libnl/libnl/compilefix.patch b/meta/packages/libnl/libnl/compilefix.patch
deleted file mode 100644
index f75ff282af..0000000000
--- a/meta/packages/libnl/libnl/compilefix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: libnl-1.1/include/netlink-local.h
2===================================================================
3--- libnl-1.1.orig/include/netlink-local.h 2009-09-04 10:10:09.000000000 +0100
4+++ libnl-1.1/include/netlink-local.h 2009-09-04 10:10:15.000000000 +0100
5@@ -26,6 +26,7 @@
6 #include <sys/socket.h>
7 #include <inttypes.h>
8 #include <assert.h>
9+#include <limits.h>
10
11 #include <arpa/inet.h>
12 #include <netdb.h>
diff --git a/meta/packages/libnl/libnl/local-includes.patch b/meta/packages/libnl/libnl/local-includes.patch
deleted file mode 100644
index 5af463004b..0000000000
--- a/meta/packages/libnl/libnl/local-includes.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- libnl-1.0-pre6/Makefile.opts.in.orig 2006-08-24 14:57:42.000000000 +0200
2+++ libnl-1.0-pre6/Makefile.opts.in 2006-08-24 14:58:20.000000000 +0200
3@@ -10,7 +10,7 @@
4 #
5
6 CC := @CC@
7-CFLAGS := @CFLAGS@
8+CFLAGS := -I./include -I. -I../include @CFLAGS@
9 LDFLAGS := @LDFLAGS@
10 CPPFLAGS := @CPPFLAGS@
11 PACKAGE_NAME := @PACKAGE_NAME@
diff --git a/meta/packages/libnl/libnl_1.1.bb b/meta/packages/libnl/libnl_1.1.bb
deleted file mode 100644
index 683df9159f..0000000000
--- a/meta/packages/libnl/libnl_1.1.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "libnl is a library for applications dealing with netlink sockets."
2HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
3SECTION = "libs/network"
4PRIORITY = "optional"
5
6LICENSE = "LGPLv2.1"
7LIC_FILES_CHKSUM = "file://COPYING;md5=2b41e13261a330ee784153ecbb6a82bc \
8 file://src/utils.c;beginline=4;endline=9;md5=6e99dfba5cfd64e92b4eb2c7b31e5e4e"
9
10PR = "r1"
11
12SRC_URI= "http://www.infradead.org/~tgr/libnl/files/${PN}-${PV}.tar.gz \
13 file://local-includes.patch;apply=yes \
14 file://compilefix.patch;apply=yes"
15
16inherit autotools pkgconfig
diff --git a/meta/packages/libnss-mdns/files/alignment-fix.patch b/meta/packages/libnss-mdns/files/alignment-fix.patch
deleted file mode 100644
index 11d4655e1f..0000000000
--- a/meta/packages/libnss-mdns/files/alignment-fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- nss-mdns-0.6/src/nss.c.orig 2005-09-25 17:27:51 +0200
2+++ nss-mdns-0.6/src/nss.c 2005-09-25 17:28:55 +0200
3@@ -456,6 +456,8 @@
4 result->h_addrtype = af;
5 result->h_length = address_length;
6
7+ idx+=(sizeof(char*)-idx%sizeof(char*)); /* Align on 32 bit boundary */
8+
9 /* Check if there's enough space for the addresses */
10 if (buflen < idx+u.data_len+sizeof(char*)*(u.count+1)) {
11 *errnop = ERANGE;
diff --git a/meta/packages/libnss-mdns/libnss-mdns_0.10.bb b/meta/packages/libnss-mdns/libnss-mdns_0.10.bb
deleted file mode 100644
index 69eaa33d60..0000000000
--- a/meta/packages/libnss-mdns/libnss-mdns_0.10.bb
+++ /dev/null
@@ -1,36 +0,0 @@
1DESCRIPTION = "NSS module for Multicast DNS name resolution"
2HOMEPAGE = "http://0pointer.de/lennart/projects/nss-mdns/"
3SECTION = "libs"
4PRIORITY = "optional"
5
6LICENSE = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
8
9DEPENDS = "avahi"
10RDEPENDS = "avahi-daemon"
11PR = "r0"
12
13SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
14S = "${WORKDIR}/nss-mdns-${PV}"
15
16inherit autotools
17
18# suppress warning, but don't bother with autonamer
19LEAD_SONAME = "libnss_mdns.so"
20DEBIANNAME_${PN} = "libnss-mdns"
21
22EXTRA_OECONF = "--libdir=/lib --disable-lynx --enable-avahi"
23
24pkg_postinst () {
25 cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
26 cat /etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
27 mv /tmp/nsswitch.conf /etc/nsswitch.conf
28 }
29}
30
31pkg_prerm () {
32 cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns$" > /dev/null && {
33 cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files dns\) mdns4*/\1/' > /tmp/nsswitch.conf
34 mv /tmp/nsswitch.conf /etc/nsswitch.conf
35 }
36}
diff --git a/meta/packages/liboil/liboil-0.3.17/no-tests.patch b/meta/packages/liboil/liboil-0.3.17/no-tests.patch
deleted file mode 100644
index 00cf5d7431..0000000000
--- a/meta/packages/liboil/liboil-0.3.17/no-tests.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1--- liboil-0.3.9/liboil/liboilfunction.c.old 2006-09-18 13:03:20.000000000 +0100
2+++ liboil-0.3.9/liboil/liboilfunction.c 2006-09-18 13:04:10.000000000 +0100
3@@ -345,7 +345,9 @@
4 return;
5 }
6
7- test = oil_test_new (klass);
8+ klass->chosen_impl = klass->reference_impl;
9+ klass->func = klass->reference_impl->func;
10+/* test = oil_test_new (klass);
11 if (test == NULL) {
12 OIL_ERROR ("failed to test function class %s", klass->name);
13 return;
14@@ -385,7 +387,7 @@
15 klass->chosen_impl = min_impl;
16 klass->func = min_impl->func;
17
18- oil_test_free (test);
19+ oil_test_free (test);*/
20 }
21
22 static void
diff --git a/meta/packages/liboil/liboil_0.3.17.bb b/meta/packages/liboil/liboil_0.3.17.bb
deleted file mode 100644
index 8ba303069d..0000000000
--- a/meta/packages/liboil/liboil_0.3.17.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1DESCRIPTION = "Liboil is a library of simple functions that are optimized for various CPUs."
2HOMEPAGE = "http://liboil.freedesktop.org/"
3BUGTRACKER = "https://bugs.freedesktop.org/"
4
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://COPYING;md5=ad80780d9c5205d63481a0184e199a15 \
7 file://liboil/liboil.h;endline=28;md5=95c794a66b88800d949fed17e437d9fb \
8 file://liboil/liboilcpu.c;endline=28;md5=89da69a61d88eedcba066f42353fb75a \
9 file://examples/example1.c;endline=29;md5=9d4dad9fcbbdf0441ee063f8af5170c9 \
10 file://testsuite/trans.c;endline=29;md5=380ecd43121fe3dcc0d8d7e5984f283d"
11
12DEPENDS = "glib-2.0"
13PR = "r2"
14
15SRC_URI = "http://liboil.freedesktop.org/download/${P}.tar.gz \
16 file://no-tests.patch;patch=1"
17
18inherit autotools pkgconfig
19
20ARM_INSTRUCTION_SET = "arm"
diff --git a/meta/packages/libomxil/libomxil_0.3.3.bb b/meta/packages/libomxil/libomxil_0.3.3.bb
deleted file mode 100644
index 016aed5149..0000000000
--- a/meta/packages/libomxil/libomxil_0.3.3.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "Bellagio OpenMAX Integration Layer"
2HOMEPAGE = "http://omxil.sourceforge.net/"
3LICENSE = "LGPL"
4DEPENDS = "libvorbis libogg alsa-lib libmad"
5
6SRC_URI = "${SOURCEFORGE_MIRROR}/omxil/libomxil-B-${PV}.tar.gz"
7
8S = "${WORKDIR}/${PN}-B-${PV}"
9
10inherit autotools
11
12EXTRA_OECONF += "--disable-ffmpegcomponents"
13
14FILES_${PN} += "${libdir}/omxilcomponents/*.so*"
15FILES_${PN}-dev += "${libdir}/omxilcomponents/*.*a"
16FILES_${PN}-dbg += "${libdir}/omxilcomponents/.debug/"
diff --git a/meta/packages/libpcap/libpcap-1.1.1/aclocal.patch b/meta/packages/libpcap/libpcap-1.1.1/aclocal.patch
deleted file mode 100644
index 71fd8b989b..0000000000
--- a/meta/packages/libpcap/libpcap-1.1.1/aclocal.patch
+++ /dev/null
@@ -1,165 +0,0 @@
1diff -ruN libpcap-1.1.1-orig/aclocal.m4 libpcap-1.1.1/aclocal.m4
2--- libpcap-1.1.1-orig/aclocal.m4 2010-06-29 10:46:32.815117569 +0800
3+++ libpcap-1.1.1/aclocal.m4 2010-06-29 10:49:17.150149949 +0800
4@@ -37,7 +37,7 @@
5 dnl AC_LBL_C_INIT. Now, we run AC_LBL_C_INIT_BEFORE_CC, AC_PROG_CC,
6 dnl and AC_LBL_C_INIT at the top level.
7 dnl
8-AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
9+AC_DEFUN([AC_LBL_C_INIT_BEFORE_CC],
10 [AC_PREREQ(2.50)
11 AC_BEFORE([$0], [AC_LBL_C_INIT])
12 AC_BEFORE([$0], [AC_PROG_CC])
13@@ -90,7 +90,7 @@
14 dnl ac_cv_lbl_gcc_vers
15 dnl LBL_CFLAGS
16 dnl
17-AC_DEFUN(AC_LBL_C_INIT,
18+AC_DEFUN([AC_LBL_C_INIT],
19 [AC_PREREQ(2.50)
20 AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
21 AC_BEFORE([$0], [AC_LBL_DEVEL])
22@@ -217,7 +217,7 @@
23 dnl V_SONAME_OPT
24 dnl V_RPATH_OPT
25 dnl
26-AC_DEFUN(AC_LBL_SHLIBS_INIT,
27+AC_DEFUN([AC_LBL_SHLIBS_INIT],
28 [AC_PREREQ(2.50)
29 if test "$GCC" = yes ; then
30 #
31@@ -361,7 +361,7 @@
32 # Make sure we use the V_CCOPT flags, because some of those might
33 # disable inlining.
34 #
35-AC_DEFUN(AC_LBL_C_INLINE,
36+AC_DEFUN([AC_LBL_C_INLINE],
37 [AC_MSG_CHECKING(for inline)
38 save_CFLAGS="$CFLAGS"
39 CFLAGS="$V_CCOPT"
40@@ -407,7 +407,7 @@
41 dnl
42 dnl AC_LBL_FIXINCLUDES
43 dnl
44-AC_DEFUN(AC_LBL_FIXINCLUDES,
45+AC_DEFUN([AC_LBL_FIXINCLUDES],
46 [if test "$GCC" = yes ; then
47 AC_MSG_CHECKING(for ANSI ioctl definitions)
48 AC_CACHE_VAL(ac_cv_lbl_gcc_fixincludes,
49@@ -453,7 +453,7 @@
50 dnl $2 (yacc appended)
51 dnl $3 (optional flex and bison -P prefix)
52 dnl
53-AC_DEFUN(AC_LBL_LEX_AND_YACC,
54+AC_DEFUN([AC_LBL_LEX_AND_YACC],
55 [AC_ARG_WITH(flex, [ --without-flex don't use flex])
56 AC_ARG_WITH(bison, [ --without-bison don't use bison])
57 if test "$with_flex" = no ; then
58@@ -506,7 +506,7 @@
59 dnl
60 dnl DECLWAITSTATUS (defined)
61 dnl
62-AC_DEFUN(AC_LBL_UNION_WAIT,
63+AC_DEFUN([AC_LBL_UNION_WAIT],
64 [AC_MSG_CHECKING(if union wait is used)
65 AC_CACHE_VAL(ac_cv_lbl_union_wait,
66 AC_TRY_COMPILE([
67@@ -535,7 +535,7 @@
68 dnl
69 dnl HAVE_SOCKADDR_SA_LEN (defined)
70 dnl
71-AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN,
72+AC_DEFUN([AC_LBL_SOCKADDR_SA_LEN],
73 [AC_MSG_CHECKING(if sockaddr struct has the sa_len member)
74 AC_CACHE_VAL(ac_cv_lbl_sockaddr_has_sa_len,
75 AC_TRY_COMPILE([
76@@ -560,7 +560,7 @@
77 dnl
78 dnl HAVE_SOCKADDR_STORAGE (defined)
79 dnl
80-AC_DEFUN(AC_LBL_SOCKADDR_STORAGE,
81+AC_DEFUN([AC_LBL_SOCKADDR_STORAGE],
82 [AC_MSG_CHECKING(if sockaddr_storage struct exists)
83 AC_CACHE_VAL(ac_cv_lbl_has_sockaddr_storage,
84 AC_TRY_COMPILE([
85@@ -593,7 +593,7 @@
86 dnl won't be using code that would use that member, or we wouldn't
87 dnl compile in any case).
88 dnl
89-AC_DEFUN(AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1,
90+AC_DEFUN([AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1],
91 [AC_MSG_CHECKING(if dl_hp_ppa_info_t struct has dl_module_id_1 member)
92 AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
93 AC_TRY_COMPILE([
94@@ -619,7 +619,7 @@
95 dnl
96 dnl ac_cv_lbl_have_run_path (yes or no)
97 dnl
98-AC_DEFUN(AC_LBL_HAVE_RUN_PATH,
99+AC_DEFUN([AC_LBL_HAVE_RUN_PATH],
100 [AC_MSG_CHECKING(for ${CC-cc} -R)
101 AC_CACHE_VAL(ac_cv_lbl_have_run_path,
102 [echo 'main(){}' > conftest.c
103@@ -644,7 +644,7 @@
104 dnl
105 dnl LBL_ALIGN (DEFINED)
106 dnl
107-AC_DEFUN(AC_LBL_UNALIGNED_ACCESS,
108+AC_DEFUN([AC_LBL_UNALIGNED_ACCESS],
109 [AC_MSG_CHECKING(if unaligned accesses fail)
110 AC_CACHE_VAL(ac_cv_lbl_unaligned_fail,
111 [case "$host_cpu" in
112@@ -749,7 +749,7 @@
113 dnl HAVE_OS_PROTO_H (defined)
114 dnl os-proto.h (symlinked)
115 dnl
116-AC_DEFUN(AC_LBL_DEVEL,
117+AC_DEFUN([AC_LBL_DEVEL],
118 [rm -f os-proto.h
119 if test "${LBL_CFLAGS+set}" = set; then
120 $1="$$1 ${LBL_CFLAGS}"
121@@ -886,7 +886,7 @@
122 dnl statically and happen to have a libresolv.a lying around (and no
123 dnl libnsl.a).
124 dnl
125-AC_DEFUN(AC_LBL_LIBRARY_NET, [
126+AC_DEFUN([AC_LBL_LIBRARY_NET], [
127 # Most operating systems have gethostbyname() in the default searched
128 # libraries (i.e. libc):
129 # Some OSes (eg. Solaris) place it in libnsl
130@@ -909,7 +909,7 @@
131 dnl Test for __attribute__
132 dnl
133
134-AC_DEFUN(AC_C___ATTRIBUTE__, [
135+AC_DEFUN([AC_C___ATTRIBUTE__], [
136 AC_MSG_CHECKING(for __attribute__)
137 AC_CACHE_VAL(ac_cv___attribute__, [
138 AC_COMPILE_IFELSE(
139@@ -947,7 +947,7 @@
140 dnl
141 dnl -Scott Barron
142 dnl
143-AC_DEFUN(AC_LBL_TPACKET_STATS,
144+AC_DEFUN([AC_LBL_TPACKET_STATS],
145 [AC_MSG_CHECKING(if if_packet.h has tpacket_stats defined)
146 AC_CACHE_VAL(ac_cv_lbl_tpacket_stats,
147 AC_TRY_COMPILE([
148@@ -976,7 +976,7 @@
149 dnl doesn't have that member (which is OK, as either we won't be using
150 dnl code that would use that member, or we wouldn't compile in any case).
151 dnl
152-AC_DEFUN(AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI,
153+AC_DEFUN([AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI],
154 [AC_MSG_CHECKING(if tpacket_auxdata struct has tp_vlan_tci member)
155 AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
156 AC_TRY_COMPILE([
157@@ -1003,7 +1003,7 @@
158 dnl
159 dnl HAVE_DLPI_PASSIVE (defined)
160 dnl
161-AC_DEFUN(AC_LBL_DL_PASSIVE_REQ_T,
162+AC_DEFUN([AC_LBL_DL_PASSIVE_REQ_T],
163 [AC_MSG_CHECKING(if dl_passive_req_t struct exists)
164 AC_CACHE_VAL(ac_cv_lbl_has_dl_passive_req_t,
165 AC_TRY_COMPILE([
diff --git a/meta/packages/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch b/meta/packages/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch
deleted file mode 100644
index f29c7cb54c..0000000000
--- a/meta/packages/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1Index: libpcap-1.0.0/pcap-linux.c
2===================================================================
3--- libpcap-1.0.0.orig/pcap-linux.c 2009-01-28 11:58:54.000000000 +0300
4+++ libpcap-1.0.0/pcap-linux.c 2009-01-28 11:59:04.000000000 +0300
5@@ -1616,6 +1616,17 @@
6 * so let's use "Linux-cooked" mode. Jean II */
7 //handle->md.cooked = 1;
8 break;
9+#ifndef ARPHRD_IEEE80215
10+#define ARPHRD_IEEE80215 804
11+#endif
12+#ifndef ARPHRD_IEEE80215_PHY
13+#define ARPHRD_IEEE80215_PHY 805
14+#endif
15+
16+ case ARPHRD_IEEE80215:
17+ case ARPHRD_IEEE80215_PHY:
18+ handle->linktype = DLT_IEEE802_15_4;
19+ break;
20
21 /* ARPHRD_LAPD is unofficial and randomly allocated, if reallocation
22 * is needed, please report it to <daniele@orlandi.com> */
diff --git a/meta/packages/libpcap/libpcap.inc b/meta/packages/libpcap/libpcap.inc
deleted file mode 100644
index 2025d84c0d..0000000000
--- a/meta/packages/libpcap/libpcap.inc
+++ /dev/null
@@ -1,24 +0,0 @@
1DESCRIPTION = "Libpcap is a tool to capture network packages on Unix/Linux platform"
2HOMEPAGE = "http://www.tcpdump.org/"
3BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577"
4SECTION = "libs/network"
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \
7 file://pcap.h;beginline=1;endline=34;md5=8d6cf7e17d5745010d633e30bc529ea9"
8DEPENDS = "flex-native bison-native"
9
10SRC_URI = "http://www.tcpdump.org/release/libpcap-${PV}.tar.gz"
11
12inherit autotools
13
14EXTRA_OECONF = "--with-pcap=linux"
15
16CPPFLAGS_prepend = "-I${S} "
17CFLAGS_prepend = "-I${S} "
18CXXFLAGS_prepend = "-I${S} "
19
20do_configure_prepend () {
21 if [ ! -e acinclude.m4 ]; then
22 cat aclocal.m4 > acinclude.m4
23 fi
24}
diff --git a/meta/packages/libpcap/libpcap_1.1.1.bb b/meta/packages/libpcap/libpcap_1.1.1.bb
deleted file mode 100644
index 58ab5e6c95..0000000000
--- a/meta/packages/libpcap/libpcap_1.1.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
1require libpcap.inc
2
3PR = "r0"
4
5SRC_URI += "file://aclocal.patch \
6 file://ieee80215-arphrd.patch"
7
8#
9# make install doesn't cover the shared lib
10# make install-shared is just broken (no symlinks)
11#
12do_install_prepend () {
13 install -d ${D}${libdir}
14 install -d ${D}${bindir}
15 oe_runmake install-shared DESTDIR=${D}
16 oe_libinstall -a -so libpcap ${D}${libdir}
17}
diff --git a/meta/packages/libpcre/files/pcre-cross.patch b/meta/packages/libpcre/files/pcre-cross.patch
deleted file mode 100644
index 0626fb347a..0000000000
--- a/meta/packages/libpcre/files/pcre-cross.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1To be upstreamable, this patch requires check for *_FOR_BUILD, otherwise
2it needs to pass special variables.
3
4It would be nice to implement per-target compiler specification to
5automake, as it is done for linker.
6
7Even better it would be nice to implement native build time targets in
8automake.
9
10Index: pcre-7.6/Makefile.am
11===================================================================
12--- pcre-7.6.orig/Makefile.am 2008-01-23 17:58:28.000000000 +0000
13+++ pcre-7.6/Makefile.am 2008-04-03 22:32:00.000000000 +0000
14@@ -147,6 +147,11 @@
15
16 noinst_PROGRAMS += dftables
17 dftables_SOURCES = dftables.c
18+dftables_LINK = $(LINK_FOR_BUILD) -o $@
19+dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD)
20+
21+dftables.o: $(srcdir)/dftables.c
22+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/dftables.c
23
24 pcre_chartables.c: dftables$(EXEEXT)
25 ./dftables$(EXEEXT) $@
diff --git a/meta/packages/libpcre/libpcre_8.10.bb b/meta/packages/libpcre/libpcre_8.10.bb
deleted file mode 100644
index 840d74a658..0000000000
--- a/meta/packages/libpcre/libpcre_8.10.bb
+++ /dev/null
@@ -1,53 +0,0 @@
1DESCRIPTION = "Perl-compatible regular expression library. PCRE has its own native \
2API, but a set of 'wrapper' functions that are based on the POSIX API \
3are also supplied in the library libpcreposix. Note that this just \
4provides a POSIX calling interface to PCRE; the regular expressions \
5themselves still follow Perl syntax and semantics. The header file for \
6the POSIX-style functions is called pcreposix.h."
7SECTION = "devel"
8PR = "r4"
9LICENSE = "BSD"
10SRC_URI = "${SOURCEFORGE_MIRROR}/pcre/pcre-${PV}.tar.bz2 \
11 file://pcre-cross.patch;patch=1"
12S = "${WORKDIR}/pcre-${PV}"
13
14PROVIDES = "pcre"
15
16inherit autotools binconfig
17
18PARALLEL_MAKE = ""
19
20CFLAGS_append = " -D_REENTRANT"
21CXXFLAGS_powerpc += "-lstdc++"
22EXTRA_OECONF = " --with-link-size=2 --enable-newline-is-lf --with-match-limit=10000000 --enable-rebuild-chartables --enable-utf8"
23
24do_compile () {
25 # stop libtool from trying to link with host libraries - fix from #33
26 # this resolve build problem on amd64 - #1015
27 if [ -e ${S}/${TARGET_SYS}-libtool ] ; then
28 sed -i 's:-L\$:-L${STAGING_LIBDIR} -L\$:' ${S}/${TARGET_SYS}-libtool
29 else
30 ln -sf ${S}/libtool ${S}/${TARGET_SYS}-libtool
31 sed -i 's:-L\$:-L${STAGING_LIBDIR} -L\$:' ${S}/${TARGET_SYS}-libtool
32 fi
33
34 # The generation of dftables can lead to timestamp problems with ccache
35 # because the generated config.h seems newer. It is sufficient to ensure that the
36 # attempt to build dftables inside make will actually work (foo_FOR_BUILD is
37 # only used for this).
38 oe_runmake CC_FOR_BUILD="${BUILD_CC}" CFLAGS_FOR_BUILD="-DLINK_SIZE=2 -I${S}/include" LINK_FOR_BUILD="${BUILD_CC} -L${S}/lib"
39}
40
41python populate_packages_prepend () {
42 pcre_libdir = bb.data.expand('${libdir}', d)
43 pcre_libdir_dbg = bb.data.expand('${libdir}/.debug', d)
44 do_split_packages(d, pcre_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'libpcre %s development package', extra_depends='${PN}-dev', allow_links=True)
45 do_split_packages(d, pcre_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'libpcre %s development package', extra_depends='${PN}-dev')
46 do_split_packages(d, pcre_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'libpcre %s development package', extra_depends='${PN}-dev')
47 do_split_packages(d, pcre_libdir, '^lib(.*)\.so\.*', 'lib%s', 'libpcre %s library', extra_depends='', allow_links=True)
48}
49
50FILES_${PN} = "${libdir}/libpcre.so.*"
51FILES_${PN}-dev += "${bindir}/*"
52
53BBCLASSEXTEND = "native"
diff --git a/meta/packages/libproxy/libproxy_0.4.3.bb b/meta/packages/libproxy/libproxy_0.4.3.bb
deleted file mode 100644
index 6c0b7a50c6..0000000000
--- a/meta/packages/libproxy/libproxy_0.4.3.bb
+++ /dev/null
@@ -1,26 +0,0 @@
1DESCRIPTION = "A library that provides automatic proxy configuration management"
2HOMEPAGE = "http://code.google.com/p/libproxy/"
3BUGTRACKER = "http://code.google.com/p/libproxy/issues/list"
4SECTION = "libs"
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=7d7044444a7b1b116e8783edcdb44ff4 \
7 file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
8
9
10DEPENDS = "virtual/libx11 xmu gconf-dbus"
11
12SRC_URI = "http://libproxy.googlecode.com/files/libproxy-${PV}.tar.gz"
13
14PR = "r1"
15
16inherit cmake pkgconfig
17
18EXTRA_OECMAKE = "-DWITH_WEBKIT=no -DWITH_GNOME=yes -DWITH_KDE4=no \
19 -DWITH_PYTHON=no -DWITH_PERL=no -DWITH_MOZJS=no -DWITH_NM=no"
20
21FILES_${PN}-dbg += "${libdir}/libproxy/0.4.2/plugins/"
22
23do_configure_prepend() {
24 export HOST_SYS=${HOST_SYS}
25 export BUILD_SYS=${BUILD_SYS}
26}
diff --git a/meta/packages/librds/librds_0.0.1.bb b/meta/packages/librds/librds_0.0.1.bb
deleted file mode 100644
index 3c99ec1ba0..0000000000
--- a/meta/packages/librds/librds_0.0.1.bb
+++ /dev/null
@@ -1,11 +0,0 @@
1DESCRIPTION = "A software library for accessing RDS data"
2HOMEPAGE = "http://rdsd.berlios.de/"
3SECTION = "libs"
4PROVIDES = "librds"
5LICENSE = "GPLv2"
6
7PR = "r1"
8
9SRC_URI = "http://download.berlios.de/rdsd/librds-${PV}.tar.gz"
10
11inherit autotools pkgconfig
diff --git a/meta/packages/librsvg/librsvg_2.18.2.bb b/meta/packages/librsvg/librsvg_2.18.2.bb
deleted file mode 100644
index fb68c8ba70..0000000000
--- a/meta/packages/librsvg/librsvg_2.18.2.bb
+++ /dev/null
@@ -1,31 +0,0 @@
1DESCRIPTION = "Library for rendering SVG files"
2SECTION = "x11/utils"
3DEPENDS = "gtk+ libcroco cairo libxml2 popt"
4LICENSE = "LGPL"
5PR = "r3"
6
7EXTRA_OECONF = "--disable-mozilla-plugin --without-svgz --without-croco --disable-gnome-vfs"
8
9inherit autotools pkgconfig gnome
10
11PACKAGES =+ "librsvg-gtk librsvg-gtk-dbg librsvg-gtk-dev rsvg"
12FILES_${PN} = "${libdir}/*.so.*"
13FILES_rsvg = "${bindir}/rsvg \
14 ${bindir}/rsvg-view \
15 ${bindir}/rsvg-convert \
16 ${datadir}/pixmaps/svg-viewer.svg"
17FILES_librsvg-gtk = "${libdir}/gtk-2.0/*/*/*.so"
18FILES_librsvg-gtk-dev += "${libdir}/gtk-2.0/*.*a \
19 ${libdir}/gtk-2.0/*/loaders/*.*a \
20 ${libdir}/gtk-2.0/*/engines/*.*a"
21FILES_librsvg-gtk-dbg += "${libdir}/gtk-2.0/.debug \
22 ${libdir}/gtk-2.0/*/*/.debug"
23
24pkg_postinst_librsvg-gtk() {
25if [ "x$D" != "x" ]; then
26 exit 1
27fi
28
29test -x ${bindir}/gdk-pixbuf-query-loaders && { gdk-pixbuf-query-loaders > ${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders ; }
30test -x ${bindir}/gtk-update-icon-cache && gtk-update-icon-cache -q ${datadir}/icons/hicolor
31}
diff --git a/meta/packages/librsvg/librsvg_2.22.3.bb b/meta/packages/librsvg/librsvg_2.22.3.bb
deleted file mode 100644
index fb68c8ba70..0000000000
--- a/meta/packages/librsvg/librsvg_2.22.3.bb
+++ /dev/null
@@ -1,31 +0,0 @@
1DESCRIPTION = "Library for rendering SVG files"
2SECTION = "x11/utils"
3DEPENDS = "gtk+ libcroco cairo libxml2 popt"
4LICENSE = "LGPL"
5PR = "r3"
6
7EXTRA_OECONF = "--disable-mozilla-plugin --without-svgz --without-croco --disable-gnome-vfs"
8
9inherit autotools pkgconfig gnome
10
11PACKAGES =+ "librsvg-gtk librsvg-gtk-dbg librsvg-gtk-dev rsvg"
12FILES_${PN} = "${libdir}/*.so.*"
13FILES_rsvg = "${bindir}/rsvg \
14 ${bindir}/rsvg-view \
15 ${bindir}/rsvg-convert \
16 ${datadir}/pixmaps/svg-viewer.svg"
17FILES_librsvg-gtk = "${libdir}/gtk-2.0/*/*/*.so"
18FILES_librsvg-gtk-dev += "${libdir}/gtk-2.0/*.*a \
19 ${libdir}/gtk-2.0/*/loaders/*.*a \
20 ${libdir}/gtk-2.0/*/engines/*.*a"
21FILES_librsvg-gtk-dbg += "${libdir}/gtk-2.0/.debug \
22 ${libdir}/gtk-2.0/*/*/.debug"
23
24pkg_postinst_librsvg-gtk() {
25if [ "x$D" != "x" ]; then
26 exit 1
27fi
28
29test -x ${bindir}/gdk-pixbuf-query-loaders && { gdk-pixbuf-query-loaders > ${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders ; }
30test -x ${bindir}/gtk-update-icon-cache && gtk-update-icon-cache -q ${datadir}/icons/hicolor
31}
diff --git a/meta/packages/librsvg/librsvg_2.26.3.bb b/meta/packages/librsvg/librsvg_2.26.3.bb
deleted file mode 100644
index 41e23b1d7d..0000000000
--- a/meta/packages/librsvg/librsvg_2.26.3.bb
+++ /dev/null
@@ -1,41 +0,0 @@
1DESCRIPTION = "Library for rendering SVG files"
2HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4
5LICENSE = "LGPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
7 file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
8
9SECTION = "x11/utils"
10DEPENDS = "gtk+ libcroco cairo libxml2 popt"
11PR = "r0"
12
13EXTRA_OECONF = "--disable-mozilla-plugin --without-svgz --without-croco --disable-gnome-vfs"
14
15inherit autotools pkgconfig gnome
16
17do_configure_prepend () {
18 echo "CLEANFILES=" > gtk-doc.make
19}
20
21PACKAGES =+ "librsvg-gtk librsvg-gtk-dbg librsvg-gtk-dev rsvg"
22FILES_${PN} = "${libdir}/*.so.*"
23FILES_rsvg = "${bindir}/rsvg \
24 ${bindir}/rsvg-view \
25 ${bindir}/rsvg-convert \
26 ${datadir}/pixmaps/svg-viewer.svg"
27FILES_librsvg-gtk = "${libdir}/gtk-2.0/*/*/*.so"
28FILES_librsvg-gtk-dev += "${libdir}/gtk-2.0/*.*a \
29 ${libdir}/gtk-2.0/*/loaders/*.*a \
30 ${libdir}/gtk-2.0/*/engines/*.*a"
31FILES_librsvg-gtk-dbg += "${libdir}/gtk-2.0/.debug \
32 ${libdir}/gtk-2.0/*/*/.debug"
33
34pkg_postinst_librsvg-gtk() {
35if [ "x$D" != "x" ]; then
36 exit 1
37fi
38
39test -x ${bindir}/gdk-pixbuf-query-loaders && { gdk-pixbuf-query-loaders > ${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders ; }
40test -x ${bindir}/gtk-update-icon-cache && gtk-update-icon-cache -q ${datadir}/icons/hicolor
41}
diff --git a/meta/packages/libsdl/files/acinclude.m4 b/meta/packages/libsdl/files/acinclude.m4
deleted file mode 100644
index ca2df9d5e5..0000000000
--- a/meta/packages/libsdl/files/acinclude.m4
+++ /dev/null
@@ -1,189 +0,0 @@
1# Local macros for the SDL configure.in script
2
3dnl Function to link an architecture specific file
4dnl LINK_ARCH_SRC(source_dir, arch, source_file)
5AC_DEFUN([COPY_ARCH_SRC],
6[
7 old="$srcdir/$1/$2/$3"
8 new="$1/$3"
9 if test ! -d $1; then
10 echo "Creating directory $1"
11 mkdir -p $1
12 fi
13 echo "Copying $old -> $new"
14 cat >$new <<__EOF__
15/* WARNING: This file was automatically generated!
16 * Original: $old
17 */
18__EOF__
19 cat >>$new <$old
20])
21
22#
23# --- esd.m4 ---
24#
25# Configure paths for ESD
26# Manish Singh 98-9-30
27# stolen back from Frank Belew
28# stolen from Manish Singh
29# Shamelessly stolen from Owen Taylor
30
31dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
32dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
33dnl
34AC_DEFUN([AM_PATH_ESD],
35[dnl
36dnl Get the cflags and libraries from the esd-config script
37dnl
38AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
39 esd_prefix="$withval", esd_prefix="")
40AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
41 esd_exec_prefix="$withval", esd_exec_prefix="")
42AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
43 , enable_esdtest=yes)
44
45 if test x$esd_exec_prefix != x ; then
46 esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
47 if test x${ESD_CONFIG+set} != xset ; then
48 ESD_CONFIG=$esd_exec_prefix/bin/esd-config
49 fi
50 fi
51 if test x$esd_prefix != x ; then
52 esd_args="$esd_args --prefix=$esd_prefix"
53 if test x${ESD_CONFIG+set} != xset ; then
54 ESD_CONFIG=$esd_prefix/bin/esd-config
55 fi
56 fi
57
58 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
59 min_esd_version=ifelse([$1], ,0.2.7,$1)
60 AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
61 no_esd=""
62 if test "$ESD_CONFIG" = "no" ; then
63 no_esd=yes
64 else
65 ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
66 ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
67
68 esd_major_version=`$ESD_CONFIG $esd_args --version | \
69 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
70 esd_minor_version=`$ESD_CONFIG $esd_args --version | \
71 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
72 esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
73 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
74 if test "x$enable_esdtest" = "xyes" ; then
75 ac_save_CFLAGS="$CFLAGS"
76 ac_save_LIBS="$LIBS"
77 CFLAGS="$CFLAGS $ESD_CFLAGS"
78 LIBS="$LIBS $ESD_LIBS"
79dnl
80dnl Now check if the installed ESD is sufficiently new. (Also sanity
81dnl checks the results of esd-config to some extent
82dnl
83 rm -f conf.esdtest
84 AC_TRY_RUN([
85#include <stdio.h>
86#include <stdlib.h>
87#include <string.h>
88#include <esd.h>
89
90char*
91my_strdup (char *str)
92{
93 char *new_str;
94
95 if (str)
96 {
97 new_str = malloc ((strlen (str) + 1) * sizeof(char));
98 strcpy (new_str, str);
99 }
100 else
101 new_str = NULL;
102
103 return new_str;
104}
105
106int main ()
107{
108 int major, minor, micro;
109 char *tmp_version;
110
111 system ("touch conf.esdtest");
112
113 /* HP/UX 9 (%@#!) writes to sscanf strings */
114 tmp_version = my_strdup("$min_esd_version");
115 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
116 printf("%s, bad version string\n", "$min_esd_version");
117 exit(1);
118 }
119
120 if (($esd_major_version > major) ||
121 (($esd_major_version == major) && ($esd_minor_version > minor)) ||
122 (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
123 {
124 return 0;
125 }
126 else
127 {
128 printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
129 printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
130 printf("*** best to upgrade to the required version.\n");
131 printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
132 printf("*** to point to the correct copy of esd-config, and remove the file\n");
133 printf("*** config.cache before re-running configure\n");
134 return 1;
135 }
136}
137
138],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
139 CFLAGS="$ac_save_CFLAGS"
140 LIBS="$ac_save_LIBS"
141 fi
142 fi
143 if test "x$no_esd" = x ; then
144 AC_MSG_RESULT(yes)
145 ifelse([$2], , :, [$2])
146 else
147 AC_MSG_RESULT(no)
148 if test "$ESD_CONFIG" = "no" ; then
149 echo "*** The esd-config script installed by ESD could not be found"
150 echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
151 echo "*** your path, or set the ESD_CONFIG environment variable to the"
152 echo "*** full path to esd-config."
153 else
154 if test -f conf.esdtest ; then
155 :
156 else
157 echo "*** Could not run ESD test program, checking why..."
158 CFLAGS="$CFLAGS $ESD_CFLAGS"
159 LIBS="$LIBS $ESD_LIBS"
160 AC_TRY_LINK([
161#include <stdio.h>
162#include <esd.h>
163], [ return 0; ],
164 [ echo "*** The test program compiled, but did not run. This usually means"
165 echo "*** that the run-time linker is not finding ESD or finding the wrong"
166 echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
167 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
168 echo "*** to the installed location Also, make sure you have run ldconfig if that"
169 echo "*** is required on your system"
170 echo "***"
171 echo "*** If you have an old version installed, it is best to remove it, although"
172 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
173 [ echo "*** The test program failed to compile or link. See the file config.log for the"
174 echo "*** exact error that occured. This usually means ESD was incorrectly installed"
175 echo "*** or that you have moved ESD since it was installed. In the latter case, you"
176 echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
177 CFLAGS="$ac_save_CFLAGS"
178 LIBS="$ac_save_LIBS"
179 fi
180 fi
181 ESD_CFLAGS=""
182 ESD_LIBS=""
183 ifelse([$3], , :, [$3])
184 fi
185 AC_SUBST(ESD_CFLAGS)
186 AC_SUBST(ESD_LIBS)
187 rm -f conf.esdtest
188])
189
diff --git a/meta/packages/libsdl/files/configure_tweak.patch b/meta/packages/libsdl/files/configure_tweak.patch
deleted file mode 100644
index 90a2888e57..0000000000
--- a/meta/packages/libsdl/files/configure_tweak.patch
+++ /dev/null
@@ -1,1167 +0,0 @@
1Index: SDL-1.2.11/configure.in
2===================================================================
3--- SDL-1.2.11.orig/configure.in 2006-06-27 05:48:33.000000000 +0100
4+++ SDL-1.2.11/configure.in 2008-02-21 19:48:47.000000000 +0000
5@@ -40,13 +40,13 @@
6 AC_SUBST(LT_AGE)
7
8 dnl Detect the canonical build and host environments
9-AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
10+AC_CONFIG_AUX_DIR(./build-scripts)
11 AC_CANONICAL_HOST
12 AC_C_BIGENDIAN
13 if test x$ac_cv_c_bigendian = xyes; then
14- AC_DEFINE(SDL_BYTEORDER, 4321)
15+ AC_DEFINE(SDL_BYTEORDER, 4321, "Byte Order")
16 else
17- AC_DEFINE(SDL_BYTEORDER, 1234)
18+ AC_DEFINE(SDL_BYTEORDER, 1234, "Byte Order")
19 fi
20
21 dnl Set up the compiler and linker flags
22@@ -107,7 +107,7 @@
23 AC_HELP_STRING([--enable-libc], [Use the system C library [[default=yes]]]),
24 , enable_libc=yes)
25 if test x$enable_libc = xyes; then
26- AC_DEFINE(HAVE_LIBC)
27+ AC_DEFINE(HAVE_LIBC,1,"")
28
29 dnl Check for C library headers
30 AC_HEADER_STDC
31@@ -118,7 +118,7 @@
32 if test x$ac_cv_header_inttypes_h = xyes -o x$ac_cv_header_stdint_h = xyes; then
33 AC_CHECK_TYPE(int64_t)
34 if test x$ac_cv_type_int64_t = xyes; then
35- AC_DEFINE(SDL_HAS_64BIT_TYPE)
36+ AC_DEFINE(SDL_HAS_64BIT_TYPE,1,"")
37 fi
38 have_inttypes=yes
39 fi
40@@ -127,11 +127,11 @@
41 AC_FUNC_ALLOCA
42 AC_FUNC_MEMCMP
43 if test x$ac_cv_func_memcmp_working = xyes; then
44- AC_DEFINE(HAVE_MEMCMP)
45+ AC_DEFINE(HAVE_MEMCMP,1,"")
46 fi
47 AC_FUNC_STRTOD
48 if test x$ac_cv_func_strtod = xyes; then
49- AC_DEFINE(HAVE_STRTOD)
50+ AC_DEFINE(HAVE_STRTOD,1,"")
51 fi
52 AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf iconv sigaction setjmp nanosleep)
53
54@@ -146,40 +146,40 @@
55 AC_CHECK_SIZEOF(long, 4)
56 AC_CHECK_SIZEOF(long long, 8)
57 if test x$ac_cv_sizeof_char = x1; then
58- AC_DEFINE(int8_t, signed char)
59- AC_DEFINE(uint8_t, unsigned char)
60+ AC_DEFINE(int8_t, signed char,"")
61+ AC_DEFINE(uint8_t, unsigned char,"")
62 fi
63 if test x$ac_cv_sizeof_short = x2; then
64- AC_DEFINE(int16_t, signed short)
65- AC_DEFINE(uint16_t, unsigned short)
66+ AC_DEFINE(int16_t, signed short,"")
67+ AC_DEFINE(uint16_t, unsigned short,"")
68 else
69 if test x$ac_cv_sizeof_int = x2; then
70- AC_DEFINE(int16_t, signed int)
71- AC_DEFINE(uint16_t, unsigned int)
72+ AC_DEFINE(int16_t, signed int,"")
73+ AC_DEFINE(uint16_t, unsigned int,"")
74 fi
75 fi
76 if test x$ac_cv_sizeof_int = x4; then
77- AC_DEFINE(int32_t, signed int)
78- AC_DEFINE(uint32_t, unsigned int)
79+ AC_DEFINE(int32_t, signed int,"")
80+ AC_DEFINE(uint32_t, unsigned int,"")
81 else
82 if test x$ac_cv_sizeof_long = x4; then
83- AC_DEFINE(int32_t, signed long)
84- AC_DEFINE(uint32_t, unsigned long)
85+ AC_DEFINE(int32_t, signed long,"")
86+ AC_DEFINE(uint32_t, unsigned long,"")
87 fi
88 fi
89 if test x$ac_cv_sizeof_long = x8; then
90- AC_DEFINE(int64_t, signed long)
91- AC_DEFINE(uint64_t, unsigned long)
92- AC_DEFINE(SDL_HAS_64BIT_TYPE)
93+ AC_DEFINE(int64_t, signed long,"")
94+ AC_DEFINE(uint64_t, unsigned long,"")
95+ AC_DEFINE(SDL_HAS_64BIT_TYPE,"")
96 else
97 if test x$ac_cv_sizeof_long_long = x8; then
98- AC_DEFINE(int64_t, signed long long)
99- AC_DEFINE(uint64_t, unsigned long long)
100- AC_DEFINE(SDL_HAS_64BIT_TYPE)
101+ AC_DEFINE(int64_t, signed long long,"")
102+ AC_DEFINE(uint64_t, unsigned long long,"")
103+ AC_DEFINE(SDL_HAS_64BIT_TYPE,"")
104 fi
105 fi
106- AC_DEFINE(size_t, unsigned int)
107- AC_DEFINE(uintptr_t, unsigned long)
108+ AC_DEFINE(size_t, unsigned int,"")
109+ AC_DEFINE(uintptr_t, unsigned long,"")
110 fi
111
112 # Standard C sources
113@@ -201,67 +201,67 @@
114 AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
115 , enable_audio=yes)
116 if test x$enable_audio != xyes; then
117- AC_DEFINE(SDL_AUDIO_DISABLED)
118+ AC_DEFINE(SDL_AUDIO_DISABLED,1,"")
119 fi
120 AC_ARG_ENABLE(video,
121 AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
122 , enable_video=yes)
123 if test x$enable_video != xyes; then
124- AC_DEFINE(SDL_VIDEO_DISABLED)
125+ AC_DEFINE(SDL_VIDEO_DISABLED,1,"")
126 fi
127 AC_ARG_ENABLE(events,
128 AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
129 , enable_events=yes)
130 if test x$enable_events != xyes; then
131- AC_DEFINE(SDL_EVENTS_DISABLED)
132+ AC_DEFINE(SDL_EVENTS_DISABLED,1,"")
133 fi
134 AC_ARG_ENABLE(joystick,
135 AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
136 , enable_joystick=yes)
137 if test x$enable_joystick != xyes; then
138- AC_DEFINE(SDL_JOYSTICK_DISABLED)
139+ AC_DEFINE(SDL_JOYSTICK_DISABLED,1,"")
140 fi
141 AC_ARG_ENABLE(cdrom,
142 AC_HELP_STRING([--enable-cdrom], [Enable the cdrom subsystem [[default=yes]]]),
143 , enable_cdrom=yes)
144 if test x$enable_cdrom != xyes; then
145- AC_DEFINE(SDL_CDROM_DISABLED)
146+ AC_DEFINE(SDL_CDROM_DISABLED,1,"")
147 fi
148 AC_ARG_ENABLE(threads,
149 AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
150 , enable_threads=yes)
151 if test x$enable_threads != xyes; then
152- AC_DEFINE(SDL_THREADS_DISABLED)
153+ AC_DEFINE(SDL_THREADS_DISABLED,1,"")
154 fi
155 AC_ARG_ENABLE(timers,
156 AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
157 , enable_timers=yes)
158 if test x$enable_timers != xyes; then
159- AC_DEFINE(SDL_TIMERS_DISABLED)
160+ AC_DEFINE(SDL_TIMERS_DISABLED,1,"")
161 fi
162 AC_ARG_ENABLE(file,
163 AC_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
164 , enable_file=yes)
165 if test x$enable_file != xyes; then
166- AC_DEFINE(SDL_FILE_DISABLED)
167+ AC_DEFINE(SDL_FILE_DISABLED,1,"")
168 fi
169 AC_ARG_ENABLE(loadso,
170 AC_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [[default=yes]]]),
171 , enable_loadso=yes)
172 if test x$enable_loadso != xyes; then
173- AC_DEFINE(SDL_LOADSO_DISABLED)
174+ AC_DEFINE(SDL_LOADSO_DISABLED,1,"")
175 fi
176 AC_ARG_ENABLE(cpuinfo,
177 AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
178 , enable_cpuinfo=yes)
179 if test x$enable_cpuinfo != xyes; then
180- AC_DEFINE(SDL_CPUINFO_DISABLED)
181+ AC_DEFINE(SDL_CPUINFO_DISABLED,1,"")
182 fi
183 AC_ARG_ENABLE(assembly,
184 AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
185 , enable_assembly=yes)
186 if test x$enable_assembly = xyes; then
187- AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
188+ AC_DEFINE(SDL_ASSEMBLY_ROUTINES,1,"")
189 fi
190
191 dnl See if the OSS audio interface is supported
192@@ -289,12 +289,12 @@
193 int arg = SNDCTL_DSP_SETFRAGMENT;
194 ],[
195 have_oss=yes
196- AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H)
197+ AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H,1,"")
198 ])
199 fi
200 AC_MSG_RESULT($have_oss)
201 if test x$have_oss = xyes; then
202- AC_DEFINE(SDL_AUDIO_DRIVER_OSS)
203+ AC_DEFINE(SDL_AUDIO_DRIVER_OSS,1,"")
204 SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
205 SOURCES="$SOURCES $srcdir/src/audio/dma/*.c"
206 have_audio=yes
207@@ -314,45 +314,7 @@
208 AC_ARG_ENABLE(alsa,
209 AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
210 , enable_alsa=yes)
211- if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
212- AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
213- # Restore all flags from before the ALSA detection runs
214- CFLAGS="$alsa_save_CFLAGS"
215- LDFLAGS="$alsa_save_LDFLAGS"
216- LIBS="$alsa_save_LIBS"
217- if test x$have_alsa = xyes; then
218- AC_ARG_ENABLE(alsa-shared,
219-AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
220- , enable_alsa_shared=yes)
221- if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
222- if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
223- ALSA_LIBS="-L/lib $ALSA_LIBS"
224- elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
225- ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
226- elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then
227- ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS"
228- fi
229- fi
230- alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'`
231- alsa_lib=`ls -- $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
232- echo "-- $alsa_lib_spec -> $alsa_lib"
233-
234- AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
235- SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
236- EXTRA_CFLAGS="$EXTRA_CFLAGS $ALSA_CFLAGS"
237- if test x$have_loadso != xyes && \
238- test x$enable_alsa_shared = xyes; then
239- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading])
240- fi
241- if test x$have_loadso = xyes && \
242- test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
243- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib")
244- else
245- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ALSA_LIBS"
246- fi
247- have_audio=yes
248- fi
249- fi
250+ enable_alsa=no
251 }
252
253 dnl Check whether we want to use IRIX 6.5+ native audio or not
254@@ -371,7 +333,7 @@
255 AC_MSG_RESULT($have_dmedia)
256 # Set up files for the audio library
257 if test x$have_dmedia = xyes; then
258- AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
259+ AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA,1,"")
260 SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
261 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laudio"
262 have_audio=yes
263@@ -408,7 +370,7 @@
264 AC_MSG_RESULT($have_mme)
265 # Set up files for the audio library
266 if test x$have_mme = xyes; then
267- AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
268+ AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO,1,"")
269 SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
270 EXTRA_CFLAGS="$EXTRA_CFLAGS $MME_CFLAGS"
271 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MME_LIBS"
272@@ -433,7 +395,7 @@
273 esd_lib=`ls -- $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
274 echo "-- $esd_lib_spec -> $esd_lib"
275
276- AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
277+ AC_DEFINE(SDL_AUDIO_DRIVER_ESD,1,"")
278 SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
279 EXTRA_CFLAGS="$EXTRA_CFLAGS $ESD_CFLAGS"
280 if test x$have_loadso != xyes && \
281@@ -442,7 +404,7 @@
282 fi
283 if test x$have_loadso = xyes && \
284 test x$enable_esd_shared = xyes && test x$esd_lib != x; then
285- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
286+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib", "")
287 else
288 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ESD_LIBS"
289 fi
290@@ -485,7 +447,7 @@
291 arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
292 echo "-- $arts_lib_spec -> $arts_lib"
293
294- AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
295+ AC_DEFINE(SDL_AUDIO_DRIVER_ARTS,, "")
296 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
297 EXTRA_CFLAGS="$EXTRA_CFLAGS $ARTS_CFLAGS"
298 if test x$have_loadso != xyes && \
299@@ -494,7 +456,7 @@
300 fi
301 if test x$have_loadso = xyes && \
302 test x$enable_arts_shared = xyes && test x$arts_lib != x; then
303- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
304+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib",1,"")
305 else
306 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARTS_LIBS"
307 fi
308@@ -527,7 +489,7 @@
309 fi
310 AC_MSG_RESULT($have_nas)
311 if test x$have_nas = xyes; then
312- AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
313+ AC_DEFINE(SDL_AUDIO_DRIVER_NAS,1,"")
314 SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
315 EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
316 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"
317@@ -543,7 +505,7 @@
318 AC_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
319 , enable_diskaudio=yes)
320 if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
321- AC_DEFINE(SDL_AUDIO_DRIVER_DISK)
322+ AC_DEFINE(SDL_AUDIO_DRIVER_DISK,1,"")
323 SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
324 fi
325 }
326@@ -555,7 +517,7 @@
327 AC_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
328 , enable_dummyaudio=yes)
329 if test x$enable_audio = xyes -a x$enable_dummyaudio = xyes; then
330- AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY)
331+ AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY,1,"")
332 SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
333 fi
334 }
335@@ -571,7 +533,7 @@
336 AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
337 if test x$have_mint_falcon_hdr = xyes; then
338 mintaudio=yes
339- AC_DEFINE(SDL_AUDIO_DRIVER_MINT)
340+ AC_DEFINE(SDL_AUDIO_DRIVER_MINT,1,"")
341 SOURCES="$SOURCES $srcdir/src/audio/mint/*.c"
342 SOURCES="$SOURCES $srcdir/src/audio/mint/*.S"
343 have_audio=yes
344@@ -602,7 +564,7 @@
345 AC_PATH_PROG(NASM, nasm)
346 fi
347 if test "x$NASM" != x -a "x$NASM" != x'"$NASM"'; then
348- AC_DEFINE(SDL_HERMES_BLITTERS)
349+ AC_DEFINE(SDL_HERMES_BLITTERS,1,"")
350 SOURCES="$SOURCES $srcdir/src/hermes/*.asm"
351 if test x"$NASMFLAGS" = x; then
352 case $ARCH in
353@@ -713,9 +675,9 @@
354 CFLAGS="$save_CFLAGS"
355
356 if test x$have_gcc_altivec = xyes; then
357- AC_DEFINE(SDL_ALTIVEC_BLITTERS)
358+ AC_DEFINE(SDL_ALTIVEC_BLITTERS,1,"")
359 if test x$have_altivec_h_hdr = xyes; then
360- AC_DEFINE(HAVE_ALTIVEC_H)
361+ AC_DEFINE(HAVE_ALTIVEC_H,1,"")
362 fi
363 EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
364 fi
365@@ -758,7 +720,7 @@
366
367 if test x$enable_ipod = xyes; then
368 EXTRA_CFLAGS="$EXTRA_CFLAGS -DIPOD"
369- AC_DEFINE(SDL_VIDEO_DRIVER_IPOD)
370+ AC_DEFINE(SDL_VIDEO_DRIVER_IPOD,1,"")
371 SOURCES="$SOURCES $srcdir/src/video/ipod/*.c"
372 fi
373 }
374@@ -792,7 +754,7 @@
375 EXTRA_CFLAGS="$EXTRA_CFLAGS -DENABLE_NANOX_DIRECT_FB"
376 fi
377
378- AC_DEFINE(SDL_VIDEO_DRIVER_NANOX)
379+ AC_DEFINE(SDL_VIDEO_DRIVER_NANOX,1,"")
380 SOURCES="$SOURCES $srcdir/src/video/nanox/*.c"
381 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lnano-X"
382 have_video=yes
383@@ -881,7 +843,7 @@
384 CFLAGS="$CFLAGS $X_CFLAGS"
385 LDFLAGS="$LDFLAGS $X_LIBS"
386
387- AC_DEFINE(SDL_VIDEO_DRIVER_X11)
388+ AC_DEFINE(SDL_VIDEO_DRIVER_X11,1,"")
389 SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
390 EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
391
392@@ -903,8 +865,8 @@
393 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
394 echo "-- dynamic libX11 -> $x11_lib"
395 echo "-- dynamic libX11ext -> $x11ext_lib"
396- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
397- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
398+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib","")
399+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib","")
400 else
401 enable_x11_shared=no
402 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $X_LIBS -lX11 -lXext"
403@@ -921,20 +883,20 @@
404 AC_HELP_STRING([--enable-video-dga], [use DGA 2.0 video driver [[default=yes]]]),
405 , enable_video_dga=yes)
406 if test x$enable_dga = xyes -a x$enable_video_dga = xyes; then
407- AC_DEFINE(SDL_VIDEO_DRIVER_DGA)
408+ AC_DEFINE(SDL_VIDEO_DRIVER_DGA,1,"")
409 SOURCES="$SOURCES $srcdir/src/video/dga/*.c"
410 fi
411 AC_ARG_ENABLE(video-x11-dgamouse,
412 AC_HELP_STRING([--enable-video-x11-dgamouse], [use X11 DGA for mouse events [[default=yes]]]),
413 , enable_video_x11_dgamouse=yes)
414 if test x$enable_dga = xyes -a x$enable_video_x11_dgamouse = xyes; then
415- AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE)
416+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE,1,"")
417 fi
418 AC_ARG_ENABLE(video-x11-vm,
419 AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
420 , enable_video_x11_vm=yes)
421 if test x$enable_video_x11_vm = xyes; then
422- AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
423+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE,1,"")
424 SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
425 fi
426 AC_ARG_ENABLE(video-x11-xv,
427@@ -948,14 +910,14 @@
428 AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
429 , enable_video_x11_xinerama=yes)
430 if test x$enable_video_x11_xinerama = xyes; then
431- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
432+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA,1,"")
433 SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
434 fi
435 AC_ARG_ENABLE(video-x11-xme,
436 AC_HELP_STRING([--enable-video-x11-xme], [enable Xi Graphics XME for fullscreen [[default=yes]]]),
437 , enable_video_x11_xme=yes)
438 if test x$enable_video_x11_xme = xyes; then
439- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME)
440+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME,1,"")
441 SOURCES="$SOURCES $srcdir/src/video/Xext/XME/*.c"
442 fi
443 AC_ARG_ENABLE(video-x11-xrandr,
444@@ -972,8 +934,8 @@
445 if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
446 echo "-- dynamic libXrender -> $xrender_lib"
447 echo "-- dynamic libXrandr -> $xrandr_lib"
448- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib")
449- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
450+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib","")
451+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib","")
452 definitely_enable_video_x11_xrandr=yes
453 else
454 AC_CHECK_LIB(Xrender, XRenderQueryExtension, have_xrender_lib=yes)
455@@ -986,7 +948,7 @@
456 fi
457 fi
458 if test x$definitely_enable_video_x11_xrandr = xyes; then
459- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
460+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR,1,"")
461 fi
462 AC_ARG_ENABLE(video-x11-dpms,
463 AC_HELP_STRING([--enable-video-x11-dpms], [enable X11 DPMS extension [[default=yes]]]),
464@@ -998,7 +960,7 @@
465 [#include <X11/Xlib.h>
466 ])
467 if test x$have_dpms_h_hdr = xyes; then
468- AC_DEFINE(SDL_VIDEO_DRIVER_X11_DPMS)
469+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_DPMS,1,"")
470 fi
471 fi
472 fi
473@@ -1026,7 +988,7 @@
474 ])
475 AC_MSG_RESULT($video_photon)
476 if test x$video_photon = xyes; then
477- AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON)
478+ AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON,1,"")
479 SOURCES="$SOURCES $srcdir/src/video/photon/*.c"
480 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lph"
481 have_video=yes
482@@ -1040,7 +1002,7 @@
483 CheckBWINDOW()
484 {
485 if test x$enable_video = xyes; then
486- AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW)
487+ AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW,1,"")
488 SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc"
489 have_video=yes
490 fi
491@@ -1063,7 +1025,7 @@
492 ])
493 AC_MSG_RESULT($have_carbon)
494 if test x$have_carbon = xyes; then
495- AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX)
496+ AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX,1,"")
497 SOURCES="$SOURCES $srcdir/src/video/maccommon/*.c"
498 SOURCES="$SOURCES $srcdir/src/video/macrom/*.c"
499 have_video=yes
500@@ -1092,7 +1054,7 @@
501 AC_MSG_RESULT($have_cocoa)
502 CFLAGS="$save_CFLAGS"
503 if test x$have_cocoa = xyes; then
504- AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ)
505+ AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ,1,"")
506 SOURCES="$SOURCES $srcdir/src/video/quartz/*.m"
507 have_video=yes
508 fi
509@@ -1118,7 +1080,7 @@
510 ])
511 AC_MSG_RESULT($video_fbcon)
512 if test x$video_fbcon = xyes; then
513- AC_DEFINE(SDL_VIDEO_DRIVER_FBCON)
514+ AC_DEFINE(SDL_VIDEO_DRIVER_FBCON,1,"")
515 SOURCES="$SOURCES $srcdir/src/video/fbcon/*.c"
516 have_video=yes
517 fi
518@@ -1163,7 +1125,7 @@
519 fi
520
521 if test x$video_directfb = xyes; then
522- AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB)
523+ AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB,1,"")
524 SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
525 EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
526 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS"
527@@ -1190,7 +1152,7 @@
528 ])
529 AC_MSG_RESULT($video_ps2gs)
530 if test x$video_ps2gs = xyes; then
531- AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS)
532+ AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS,1,"")
533 SOURCES="$SOURCES $srcdir/src/video/ps2gs/*.c"
534 have_video=yes
535 fi
536@@ -1215,7 +1177,7 @@
537 ])
538 AC_MSG_RESULT($video_ggi)
539 if test x$video_ggi = xyes; then
540- AC_DEFINE(SDL_VIDEO_DRIVER_GGI)
541+ AC_DEFINE(SDL_VIDEO_DRIVER_GGI,1,"")
542 SOURCES="$SOURCES $srcdir/src/video/ggi/*.c"
543 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lggi -lgii -lgg"
544 have_video=yes
545@@ -1245,7 +1207,7 @@
546 ])
547 AC_MSG_RESULT($video_svga)
548 if test x$video_svga = xyes; then
549- AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB)
550+ AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB,1,"")
551 SOURCES="$SOURCES $srcdir/src/video/svga/*.c"
552 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvga"
553 have_video=yes
554@@ -1277,7 +1239,7 @@
555 ])
556 AC_MSG_RESULT($video_vgl)
557 if test x$video_vgl = xyes; then
558- AC_DEFINE(SDL_VIDEO_DRIVER_VGL)
559+ AC_DEFINE(SDL_VIDEO_DRIVER_VGL,1,"")
560 SOURCES="$SOURCES $srcdir/src/video/vgl/*.c"
561 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvgl"
562 have_video=yes
563@@ -1305,7 +1267,7 @@
564 ])
565 AC_MSG_RESULT($video_wscons)
566 if test x$video_wscons = xyes; then
567- AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS)
568+ AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS,1,"")
569 SOURCES="$SOURCES $srcdir/src/video/wscons/*.c"
570 have_video=yes
571 fi
572@@ -1330,7 +1292,7 @@
573 ])
574 AC_MSG_RESULT($video_aalib)
575 if test x$video_aalib = xyes; then
576- AC_DEFINE(SDL_VIDEO_DRIVER_AALIB)
577+ AC_DEFINE(SDL_VIDEO_DRIVER_AALIB,1,"")
578 SOURCES="$SOURCES $srcdir/src/video/aalib/*.c"
579 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laa"
580 have_video=yes
581@@ -1360,7 +1322,7 @@
582 CXXFLAGS="$OLD_CXX"
583 AC_MSG_RESULT($video_qtopia)
584 if test x$video_qtopia = xyes; then
585- AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA)
586+ AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA,1,"")
587 SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc"
588 SDLMAIN_SOURCES="$srcdir/src/main/qtopia/*.cc"
589 EXTRA_CFLAGS="$EXTRA_CFLAGS $QTOPIA_FLAGS"
590@@ -1389,7 +1351,7 @@
591 ])
592 AC_MSG_RESULT($video_picogui)
593 if test x$video_picogui = xyes; then
594- AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI)
595+ AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI,1,"")
596 SOURCES="$SOURCES $srcdir/src/video/picogui/*.c"
597 SDL_LIBS="$SDL_LIBS -lpgui"
598 have_video=yes
599@@ -1413,7 +1375,7 @@
600 video_xbios=no
601 if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
602 video_xbios=yes
603- AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS)
604+ AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS,1,"")
605 SOURCES="$SOURCES $srcdir/src/video/xbios/*.c"
606 have_video=yes
607 fi
608@@ -1431,7 +1393,7 @@
609 AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
610 if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
611 video_gem=yes
612- AC_DEFINE(SDL_VIDEO_DRIVER_GEM)
613+ AC_DEFINE(SDL_VIDEO_DRIVER_GEM,1,"")
614 SOURCES="$SOURCES $srcdir/src/video/gem/*.c"
615 SDL_LIBS="$SDL_LIBS -lgem"
616 have_video=yes
617@@ -1446,7 +1408,7 @@
618 AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
619 , enable_video_dummy=yes)
620 if test x$enable_video_dummy = xyes; then
621- AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY)
622+ AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY,1,"")
623 SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
624 have_video=yes
625 fi
626@@ -1472,8 +1434,8 @@
627 ])
628 AC_MSG_RESULT($video_opengl)
629 if test x$video_opengl = xyes; then
630- AC_DEFINE(SDL_VIDEO_OPENGL)
631- AC_DEFINE(SDL_VIDEO_OPENGL_GLX)
632+ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
633+ AC_DEFINE(SDL_VIDEO_OPENGL_GLX,1,"")
634 fi
635 fi
636 }
637@@ -1492,7 +1454,7 @@
638 ])
639 AC_MSG_RESULT($video_opengl)
640 if test x$video_opengl = xyes; then
641- AC_DEFINE(SDL_VIDEO_OPENGL)
642+ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
643 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
644 fi
645 fi
646@@ -1502,8 +1464,8 @@
647 CheckWIN32GL()
648 {
649 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
650- AC_DEFINE(SDL_VIDEO_OPENGL)
651- AC_DEFINE(SDL_VIDEO_OPENGL_WGL)
652+ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
653+ AC_DEFINE(SDL_VIDEO_OPENGL_WGL,1,"")
654 fi
655 }
656
657@@ -1511,7 +1473,7 @@
658 CheckBeGL()
659 {
660 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
661- AC_DEFINE(SDL_VIDEO_OPENGL)
662+ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
663 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
664 fi
665 }
666@@ -1520,7 +1482,7 @@
667 CheckMacGL()
668 {
669 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
670- AC_DEFINE(SDL_VIDEO_OPENGL)
671+ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
672 case "$host" in
673 *-*-darwin*)
674 if test x$enable_video_cocoa = xyes; then
675@@ -1552,8 +1514,8 @@
676 OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
677 OSMESA_LIBS=`$OSMESA_CONFIG --libs`
678 fi
679- AC_DEFINE(SDL_VIDEO_OPENGL)
680- AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA)
681+ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
682+ AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA,1,"")
683 SDL_CFLAGS="$SDL_CFLAGS $OSMESA_CFLAGS"
684 SDL_LIBS="$SDL_LIBS $OSMESA_LIBS"
685
686@@ -1563,7 +1525,7 @@
687 if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
688 # Dynamic linking
689 if test "x$have_osmesa_hdr" = "xyes"; then
690- AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC)
691+ AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC,1,"")
692 fi
693 fi
694 fi
695@@ -1590,7 +1552,7 @@
696 ])
697 AC_MSG_RESULT($use_input_events)
698 if test x$use_input_events = xyes; then
699- AC_DEFINE(SDL_INPUT_LINUXEV)
700+ AC_DEFINE(SDL_INPUT_LINUXEV,1,"")
701 fi
702 fi
703 }
704@@ -1612,7 +1574,7 @@
705 ])
706 AC_MSG_RESULT($enable_input_tslib)
707 if test x$enable_input_tslib = xyes; then
708- AC_DEFINE(SDL_INPUT_TSLIB)
709+ AC_DEFINE(SDL_INPUT_TSLIB,1,"")
710 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
711 fi
712 fi
713@@ -1635,7 +1597,7 @@
714 AC_MSG_CHECKING(pth)
715 AC_MSG_RESULT($use_pth)
716 if test "x$use_pth" = xyes; then
717- AC_DEFINE(SDL_THREAD_PTH)
718+ AC_DEFINE(SDL_THREAD_PTH,1,"")
719 SOURCES="$SOURCES $srcdir/src/thread/pth/*.c"
720 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
721 SDL_CFLAGS="$SDL_CFLAGS `$PTH_CONFIG --cflags`"
722@@ -1741,7 +1703,7 @@
723
724 # Do futher testing if we have pthread support...
725 if test x$use_pthreads = xyes; then
726- AC_DEFINE(SDL_THREAD_PTHREAD)
727+ AC_DEFINE(SDL_THREAD_PTHREAD,1,"")
728 EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
729 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
730 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
731@@ -1763,7 +1725,7 @@
732 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
733 ],[
734 has_recursive_mutexes=yes
735- AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX)
736+ AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX,1,"")
737 ])
738 fi
739 if test x$has_recursive_mutexes = xno; then
740@@ -1774,7 +1736,7 @@
741 pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
742 ],[
743 has_recursive_mutexes=yes
744- AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP)
745+ AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP,1,"")
746 ])
747 fi
748 AC_MSG_RESULT($has_recursive_mutexes)
749@@ -1849,7 +1811,7 @@
750 fi
751
752 if test x$enable_video = xyes; then
753- AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
754+ AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB,1,"")
755 SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
756 SOURCES="$SOURCES $srcdir/src/video/windib/*.c"
757 have_video=yes
758@@ -1871,7 +1833,7 @@
759 have_directx=yes
760 fi
761 if test x$enable_video = xyes -a x$have_directx = xyes; then
762- AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW)
763+ AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW,1,"")
764 SOURCES="$SOURCES $srcdir/src/video/windx5/*.c"
765 have_video=yes
766 fi
767@@ -1904,9 +1866,9 @@
768 AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
769 AC_CHECK_LIB(dl, dlvsym, have_dlvsym=yes)
770 if test x$have_dlvsym = xyes; then
771- AC_DEFINE(HAVE_DLVSYM)
772+ AC_DEFINE(HAVE_DLVSYM,1,"")
773 fi
774- AC_DEFINE(SDL_LOADSO_DLOPEN)
775+ AC_DEFINE(SDL_LOADSO_DLOPEN,1,"")
776 SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
777 have_loadso=yes
778 fi
779@@ -1923,7 +1885,7 @@
780 AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
781 AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
782 if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
783- AC_DEFINE(SDL_LOADSO_LDG)
784+ AC_DEFINE(SDL_LOADSO_LDG,1,"")
785 SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c"
786 SDL_LIBS="$SDL_LIBS -lldg -lgem"
787 have_loadso=yes
788@@ -2049,11 +2011,11 @@
789 have_machine_joystick=yes
790 ])
791 if test x$have_machine_joystick = xyes; then
792- AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H)
793+ AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H,1,"")
794 fi
795 AC_MSG_RESULT($have_machine_joystick)
796
797- AC_DEFINE(SDL_JOYSTICK_USBHID)
798+ AC_DEFINE(SDL_JOYSTICK_USBHID,1,"")
799 SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
800 EXTRA_CFLAGS="$EXTRA_CFLAGS $USB_CFLAGS"
801 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
802@@ -2072,7 +2034,7 @@
803 if test x$enable_clock_gettime = xyes; then
804 AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
805 if test x$have_clock_gettime = xyes; then
806- AC_DEFINE(HAVE_CLOCK_GETTIME)
807+ AC_DEFINE(HAVE_CLOCK_GETTIME,1,"")
808 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
809 fi
810 fi
811@@ -2103,7 +2065,7 @@
812 CheckIPod
813 # Set up files for the timer library
814 if test x$enable_timers = xyes; then
815- AC_DEFINE(SDL_TIMER_UNIX)
816+ AC_DEFINE(SDL_TIMER_UNIX,1,"")
817 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
818 have_timers=yes
819 fi
820@@ -2166,17 +2128,17 @@
821 if test x$enable_audio = xyes; then
822 case $ARCH in
823 sysv5|solaris|hpux)
824- AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
825+ AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO,1,"")
826 SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
827 have_audio=yes
828 ;;
829 netbsd|openbsd)
830- AC_DEFINE(SDL_AUDIO_DRIVER_BSD)
831+ AC_DEFINE(SDL_AUDIO_DRIVER_BSD,1,"")
832 SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
833 have_audio=yes
834 ;;
835 aix)
836- AC_DEFINE(SDL_AUDIO_DRIVER_PAUD)
837+ AC_DEFINE(SDL_AUDIO_DRIVER_PAUD,1,"")
838 SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
839 have_audio=yes
840 ;;
841@@ -2186,7 +2148,7 @@
842 if test x$enable_joystick = xyes; then
843 case $ARCH in
844 linux)
845- AC_DEFINE(SDL_JOYSTICK_LINUX)
846+ AC_DEFINE(SDL_JOYSTICK_LINUX,1,"")
847 SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
848 have_joystick=yes
849 ;;
850@@ -2196,32 +2158,32 @@
851 if test x$enable_cdrom = xyes; then
852 case $ARCH in
853 linux|solaris)
854- AC_DEFINE(SDL_CDROM_LINUX)
855+ AC_DEFINE(SDL_CDROM_LINUX,1,"")
856 SOURCES="$SOURCES $srcdir/src/cdrom/linux/*.c"
857 have_cdrom=yes
858 ;;
859 *freebsd*)
860- AC_DEFINE(SDL_CDROM_FREEBSD)
861+ AC_DEFINE(SDL_CDROM_FREEBSD,1,"")
862 SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c"
863 have_cdrom=yes
864 ;;
865 *openbsd*|*netbsd*)
866- AC_DEFINE(SDL_CDROM_OPENBSD)
867+ AC_DEFINE(SDL_CDROM_OPENBSD,1,"")
868 SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c"
869 have_cdrom=yes
870 ;;
871 bsdi)
872- AC_DEFINE(SDL_CDROM_BSDI)
873+ AC_DEFINE(SDL_CDROM_BSDI,1,"")
874 SOURCES="$SOURCES $srcdir/src/cdrom/bsdi/*.c"
875 have_cdrom=yes
876 ;;
877 aix)
878- AC_DEFINE(SDL_CDROM_AIX)
879+ AC_DEFINE(SDL_CDROM_AIX,1,"")
880 SOURCES="$SOURCES $srcdir/src/cdrom/aix/*.c"
881 have_cdrom=yes
882 ;;
883 osf)
884- AC_DEFINE(SDL_CDROM_OSF)
885+ AC_DEFINE(SDL_CDROM_OSF,1,"")
886 SOURCES="$SOURCES $srcdir/src/cdrom/osf/*.c"
887 have_cdrom=yes
888 ;;
889@@ -2229,7 +2191,7 @@
890 fi
891 # Set up files for the thread library
892 if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
893- AC_DEFINE(SDL_THREAD_SPROC)
894+ AC_DEFINE(SDL_THREAD_SPROC,1,"")
895 SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
896 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
897 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
898@@ -2237,7 +2199,7 @@
899 fi
900 # Set up files for the timer library
901 if test x$enable_timers = xyes; then
902- AC_DEFINE(SDL_TIMER_UNIX)
903+ AC_DEFINE(SDL_TIMER_UNIX,1,"")
904 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
905 have_timers=yes
906 fi
907@@ -2256,20 +2218,20 @@
908 CheckPTHREAD
909 # Set up files for the audio library
910 if test x$enable_audio = xyes; then
911- AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO)
912+ AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO,1,"")
913 SOURCES="$SOURCES $srcdir/src/audio/nto/*.c"
914 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lasound"
915 have_audio=yes
916 fi
917 # Set up files for the cdrom library
918 if test x$enable_cdrom = xyes; then
919- AC_DEFINE(SDL_CDROM_QNX)
920+ AC_DEFINE(SDL_CDROM_QNX,1,"")
921 SOURCES="$SOURCES $srcdir/src/cdrom/qnx/*.c"
922 have_cdrom=yes
923 fi
924 # Set up files for the timer library
925 if test x$enable_timers = xyes; then
926- AC_DEFINE(SDL_TIMER_UNIX)
927+ AC_DEFINE(SDL_TIMER_UNIX,1,"")
928 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
929 have_timers=yes
930 fi
931@@ -2294,29 +2256,29 @@
932 CheckNASM
933 # Set up files for the audio library
934 if test x$enable_audio = xyes; then
935- AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
936+ AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT,1,"")
937 SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
938 if test x$have_directx = xyes; then
939- AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
940+ AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND,1,"")
941 SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
942 fi
943 have_audio=yes
944 fi
945 # Set up files for the joystick library
946 if test x$enable_joystick = xyes; then
947- AC_DEFINE(SDL_JOYSTICK_WINMM)
948+ AC_DEFINE(SDL_JOYSTICK_WINMM,1,"")
949 SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
950 have_joystick=yes
951 fi
952 # Set up files for the cdrom library
953 if test x$enable_cdrom = xyes; then
954- AC_DEFINE(SDL_CDROM_WIN32)
955+ AC_DEFINE(SDL_CDROM_WIN32,1,"")
956 SOURCES="$SOURCES $srcdir/src/cdrom/win32/*.c"
957 have_cdrom=yes
958 fi
959 # Set up files for the thread library
960 if test x$enable_threads = xyes; then
961- AC_DEFINE(SDL_THREAD_WIN32)
962+ AC_DEFINE(SDL_THREAD_WIN32,1,"")
963 SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_sysmutex.c"
964 SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_syssem.c"
965 SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_systhread.c"
966@@ -2325,13 +2287,13 @@
967 fi
968 # Set up files for the timer library
969 if test x$enable_timers = xyes; then
970- AC_DEFINE(SDL_TIMER_WIN32)
971+ AC_DEFINE(SDL_TIMER_WIN32,1,"")
972 SOURCES="$SOURCES $srcdir/src/timer/win32/*.c"
973 have_timers=yes
974 fi
975 # Set up files for the shared object loading library
976 if test x$enable_loadso = xyes; then
977- AC_DEFINE(SDL_LOADSO_WIN32)
978+ AC_DEFINE(SDL_LOADSO_WIN32,1,"")
979 SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c"
980 have_loadso=yes
981 fi
982@@ -2356,25 +2318,25 @@
983 CheckBeGL
984 # Set up files for the audio library
985 if test x$enable_audio = xyes; then
986- AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO)
987+ AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO,1,"")
988 SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
989 have_audio=yes
990 fi
991 # Set up files for the joystick library
992 if test x$enable_joystick = xyes; then
993- AC_DEFINE(SDL_JOYSTICK_BEOS)
994+ AC_DEFINE(SDL_JOYSTICK_BEOS,1,"")
995 SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
996 have_joystick=yes
997 fi
998 # Set up files for the cdrom library
999 if test x$enable_cdrom = xyes; then
1000- AC_DEFINE(SDL_CDROM_BEOS)
1001+ AC_DEFINE(SDL_CDROM_BEOS,1,"")
1002 SOURCES="$SOURCES $srcdir/src/cdrom/beos/*.cc"
1003 have_cdrom=yes
1004 fi
1005 # Set up files for the thread library
1006 if test x$enable_threads = xyes; then
1007- AC_DEFINE(SDL_THREAD_BEOS)
1008+ AC_DEFINE(SDL_THREAD_BEOS,1,"")
1009 SOURCES="$SOURCES $srcdir/src/thread/beos/*.c"
1010 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
1011 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
1012@@ -2382,13 +2344,13 @@
1013 fi
1014 # Set up files for the timer library
1015 if test x$enable_timers = xyes; then
1016- AC_DEFINE(SDL_TIMER_BEOS)
1017+ AC_DEFINE(SDL_TIMER_BEOS,1,"")
1018 SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
1019 have_timers=yes
1020 fi
1021 # Set up files for the shared object loading library
1022 if test x$enable_loadso = xyes; then
1023- AC_DEFINE(SDL_LOADSO_BEOS)
1024+ AC_DEFINE(SDL_LOADSO_BEOS,1,"")
1025 SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
1026 have_loadso=yes
1027 fi
1028@@ -2425,7 +2387,7 @@
1029 # Set up files for the shared object loading library
1030 # (this needs to be done before the dynamic X11 check)
1031 if test x$enable_loadso = xyes -a x$have_dlopen != xyes; then
1032- AC_DEFINE(SDL_LOADSO_DLCOMPAT)
1033+ AC_DEFINE(SDL_LOADSO_DLCOMPAT,1,"")
1034 SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c"
1035 have_loadso=yes
1036 fi
1037@@ -2443,28 +2405,28 @@
1038
1039 # Set up files for the audio library
1040 if test x$enable_audio = xyes; then
1041- AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO)
1042+ AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO,1,"")
1043 SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
1044- AC_DEFINE(SDL_AUDIO_DRIVER_SNDMGR)
1045+ AC_DEFINE(SDL_AUDIO_DRIVER_SNDMGR,1,"")
1046 SOURCES="$SOURCES $srcdir/src/audio/macrom/*.c"
1047 have_audio=yes
1048 fi
1049 # Set up files for the joystick library
1050 if test x$enable_joystick = xyes; then
1051- AC_DEFINE(SDL_JOYSTICK_IOKIT)
1052+ AC_DEFINE(SDL_JOYSTICK_IOKIT,1,"")
1053 SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
1054 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
1055 have_joystick=yes
1056 fi
1057 # Set up files for the cdrom library
1058 if test x$enable_cdrom = xyes; then
1059- AC_DEFINE(SDL_CDROM_MACOSX)
1060+ AC_DEFINE(SDL_CDROM_MACOSX,1,"")
1061 SOURCES="$SOURCES $srcdir/src/cdrom/macosx/*.c"
1062 have_cdrom=yes
1063 fi
1064 # Set up files for the timer library
1065 if test x$enable_timers = xyes; then
1066- AC_DEFINE(SDL_TIMER_UNIX)
1067+ AC_DEFINE(SDL_TIMER_UNIX,1,"")
1068 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
1069 have_timers=yes
1070 fi
1071@@ -2500,30 +2462,30 @@
1072 # Set up files for the audio library
1073 if test x$enable_threads = xyes -a x$enable_pth = xyes; then
1074 if test x$enable_audio = xyes; then
1075- AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
1076+ AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO,1,"")
1077 SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
1078 have_audio=yes
1079 fi
1080 fi
1081 # Set up files for the joystick library
1082 if test x$enable_joystick = xyes; then
1083- AC_DEFINE(SDL_JOYSTICK_MINT)
1084+ AC_DEFINE(SDL_JOYSTICK_MINT,1,"")
1085 SOURCES="$SOURCES $srcdir/src/joystick/mint/*.c"
1086 have_joystick=yes
1087 fi
1088 # Set up files for the cdrom library
1089 if test x$enable_cdrom = xyes; then
1090- AC_DEFINE(SDL_CDROM_MINT)
1091+ AC_DEFINE(SDL_CDROM_MINT,1,"")
1092 SOURCES="$SOURCES $srcdir/src/cdrom/mint/*.c"
1093 have_cdrom=yes
1094 fi
1095 # Set up files for the timer library
1096 if test x$enable_timers = xyes; then
1097 if test x$enable_threads = xyes -a x$enable_pth = xyes; then
1098- AC_DEFINE(SDL_TIMER_UNIX)
1099+ AC_DEFINE(SDL_TIMER_UNIX,1,"")
1100 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
1101 else
1102- AC_DEFINE(SDL_TIMER_MINT)
1103+ AC_DEFINE(SDL_TIMER_MIN,1,""T)
1104 SOURCES="$SOURCES $srcdir/src/timer/mint/*.c"
1105 SOURCES="$SOURCES $srcdir/src/timer/mint/*.S"
1106 fi
1107@@ -2536,20 +2498,20 @@
1108 CheckPTHREAD
1109 # Set up files for the video library
1110 if test x$enable_video = xyes; then
1111- AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS)
1112+ AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS,1,"")
1113 SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
1114 SOURCES="$SOURCES $srcdir/src/video/riscos/*.S"
1115 have_video=yes
1116 fi
1117 # Set up files for the joystick library
1118 if test x$enable_joystick = xyes; then
1119- AC_DEFINE(SDL_JOYSTICK_RISCOS)
1120+ AC_DEFINE(SDL_JOYSTICK_RISCOS,1,"")
1121 SOURCES="$SOURCES $srcdir/src/joystick/riscos/*.c"
1122 have_joystick=yes
1123 fi
1124 # Set up files for the timer library
1125 if test x$enable_timers = xyes; then
1126- AC_DEFINE(SDL_TIMER_RISCOS)
1127+ AC_DEFINE(SDL_TIMER_RISCOS,1,"")
1128 SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c"
1129 have_timers=yes
1130 fi
1131@@ -2566,31 +2528,31 @@
1132 # Verify that we have all the platform specific files we need
1133 if test x$have_joystick != xyes; then
1134 if test x$enable_joystick = xyes; then
1135- AC_DEFINE(SDL_JOYSTICK_DISABLED)
1136+ AC_DEFINE(SDL_JOYSTICK_DISABLED,1,"")
1137 fi
1138 SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
1139 fi
1140 if test x$have_cdrom != xyes; then
1141 if test x$enable_cdrom = xyes; then
1142- AC_DEFINE(SDL_CDROM_DISABLED)
1143+ AC_DEFINE(SDL_CDROM_DISABLED,1,"")
1144 fi
1145 SOURCES="$SOURCES $srcdir/src/cdrom/dummy/*.c"
1146 fi
1147 if test x$have_threads != xyes; then
1148 if test x$enable_threads = xyes; then
1149- AC_DEFINE(SDL_THREADS_DISABLED)
1150+ AC_DEFINE(SDL_THREADS_DISABLED,1,"")
1151 fi
1152 SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
1153 fi
1154 if test x$have_timers != xyes; then
1155 if test x$enable_timers = xyes; then
1156- AC_DEFINE(SDL_TIMERS_DISABLED)
1157+ AC_DEFINE(SDL_TIMERS_DISABLED,1,"")
1158 fi
1159 SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
1160 fi
1161 if test x$have_loadso != xyes; then
1162 if test x$enable_loadso = xyes; then
1163- AC_DEFINE(SDL_LOADSO_DISABLED)
1164+ AC_DEFINE(SDL_LOADSO_DISABLED,1,"")
1165 fi
1166 SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
1167 fi
diff --git a/meta/packages/libsdl/files/directfb_obsolete_calls.patch b/meta/packages/libsdl/files/directfb_obsolete_calls.patch
deleted file mode 100644
index f3f422cde3..0000000000
--- a/meta/packages/libsdl/files/directfb_obsolete_calls.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1--- tmp/work/armv5te-angstrom-linux-gnueabi/libsdl-directfb-1.2.9-r1/SDL-1.2.9/src/video/directfb/SDL_DirectFB_video.c 2007-02-18 11:40:38.000000000 -0500
2+++ SDL/src/video/directfb/SDL_DirectFB_video.c 2007-02-18 11:00:07.000000000 -0500
3@@ -376,7 +376,7 @@
4 {
5 int i;
6 DFBResult ret;
7- DFBCardCapabilities caps;
8+ DFBGraphicsDeviceDescription caps;
9 DFBDisplayLayerConfig dlc;
10 struct DirectFBEnumRect *rect;
11 IDirectFB *dfb = NULL;
12@@ -448,7 +448,7 @@
13
14
15 /* Query card capabilities to get the video memory size */
16- dfb->GetCardCapabilities (dfb, &caps);
17+ dfb->GetDeviceDescription (dfb, &caps);
18
19 this->info.wm_available = 1;
20 this->info.hw_available = 1;
21diff -u'rNF^function' tmp/work/armv5te-angstrom-linux-gnueabi/libsdl-directfb-1.2.9-r1/SDL-1.2.9/src/video/directfb/SDL_Direct
22/SDL_DirectFB_events.c
23--- tmp/work/armv5te-angstrom-linux-gnueabi/libsdl-directfb-1.2.9-r1/SDL-1.2.9/src/video/directfb/SDL_DirectFB_events.c 2004-0
24+++ SDL/src/video/directfb/SDL_DirectFB_events.c 2007-02-18 11:00:07.000000000 -0500
25@@ -161,7 +161,7 @@
26 keymap[DIKI_SHIFT_L - DIKI_UNKNOWN] = SDLK_LSHIFT;
27 keymap[DIKI_SHIFT_R - DIKI_UNKNOWN] = SDLK_RSHIFT;
28 keymap[DIKI_ALT_L - DIKI_UNKNOWN] = SDLK_LALT;
29- keymap[DIKI_ALTGR - DIKI_UNKNOWN] = SDLK_RALT;
30+ keymap[DIKI_ALT_R - DIKI_UNKNOWN] = SDLK_RALT;
31 keymap[DIKI_TAB - DIKI_UNKNOWN] = SDLK_TAB;
32 keymap[DIKI_ENTER - DIKI_UNKNOWN] = SDLK_RETURN;
33 keymap[DIKI_SPACE - DIKI_UNKNOWN] = SDLK_SPACE;
diff --git a/meta/packages/libsdl/files/extra-keys.patch b/meta/packages/libsdl/files/extra-keys.patch
deleted file mode 100644
index f12f0c7efb..0000000000
--- a/meta/packages/libsdl/files/extra-keys.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1diff -upr --exclude=configure --exclude=Makefile --exclude=Makefile.in libsdl1.2-1.2.4/include/SDL_keysym.h libsdl1.2-1.2.4-arm/include/SDL_keysym.h
2--- libsdl1.2-1.2.4/include/SDL_keysym.h 2002-03-06 11:23:01.000000000 +0000
3+++ libsdl1.2-1.2.4-arm/include/SDL_keysym.h 2002-11-08 20:43:09.000000000 +0000
4@@ -286,6 +286,12 @@ typedef enum {
5 SDLK_EURO = 321, /* Some european keyboards */
6 SDLK_UNDO = 322, /* Atari keyboard has Undo */
7
8+ SDLK_RECORD = 322,
9+ SDLK_CALENDAR = 323,
10+ SDLK_TELEPHONE = 324,
11+ SDLK_MAIL = 325,
12+ SDLK_START = 326,
13+
14 /* Add any other keys here */
15
16 SDLK_LAST
17diff -upr --exclude=configure --exclude=Makefile --exclude=Makefile.in libsdl1.2-1.2.4/src/video/x11/SDL_x11events.c libsdl1.2-1.2.4-arm/src/video/x11/SDL_x11events.c
18--- libsdl1.2-1.2.4/src/video/x11/SDL_x11events.c 2002-03-06 11:23:08.000000000 +0000
19+++ libsdl1.2-1.2.4-arm/src/video/x11/SDL_x11events.c 2002-11-08 21:01:41.000000000 +0000
20@@ -34,6 +34,7 @@ static char rcsid =
21 #include <X11/Xlib.h>
22 #include <X11/Xutil.h>
23 #include <X11/keysym.h>
24+#include <X11/XF86keysym.h>
25 #ifdef __SVR4
26 #include <X11/Sunkeysym.h>
27 #endif
28@@ -655,6 +656,25 @@ SDL_keysym *X11_TranslateKey(Display *di
29 case 0xFF:
30 keysym->sym = MISC_keymap[xsym&0xFF];
31 break;
32+ case 0x1008ff:
33+ switch (xsym) {
34+ case XF86XK_AudioRecord:
35+ keysym->sym = SDLK_RECORD;
36+ break;
37+ case XF86XK_PowerDown:
38+ keysym->sym = SDLK_POWER;
39+ break;
40+ case XF86XK_Calendar:
41+ keysym->sym = SDLK_CALENDAR;
42+ break;
43+ case XF86XK_Mail:
44+ keysym->sym = SDLK_MAIL;
45+ break;
46+ case XF86XK_Start:
47+ keysym->sym = SDLK_START;
48+ break;
49+ }
50+ break;
51 default:
52 fprintf(stderr,
53 "X11: Unknown xsym, sym = 0x%04x\n",
diff --git a/meta/packages/libsdl/files/kernel-asm-page.patch b/meta/packages/libsdl/files/kernel-asm-page.patch
deleted file mode 100644
index 42bceadfdc..0000000000
--- a/meta/packages/libsdl/files/kernel-asm-page.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1diff --git a/src/video/Xext/Xxf86dga/XF86DGA.c b/src/video/Xext/Xxf86dga/XF86DGA.c
2index 4e3d662..de38a3c 100644
3--- a/src/video/Xext/Xxf86dga/XF86DGA.c
4+++ b/src/video/Xext/Xxf86dga/XF86DGA.c
5@@ -18,7 +18,7 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc
6 #define HAS_MMAP_ANON
7 #include <sys/types.h>
8 #include <sys/mman.h>
9-#include <asm/page.h> /* PAGE_SIZE */
10+#include <unistd.h>
11 #define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */
12 #define HAS_GETPAGESIZE
13 #endif /* linux */
diff --git a/meta/packages/libsdl/libsdl-nativesdk_1.2.11.bb b/meta/packages/libsdl/libsdl-nativesdk_1.2.11.bb
deleted file mode 100644
index 633a4c284b..0000000000
--- a/meta/packages/libsdl/libsdl-nativesdk_1.2.11.bb
+++ /dev/null
@@ -1,31 +0,0 @@
1DESCRIPTION = "Simple DirectMedia Layer - native Edition"
2HOMEPAGE = "http://www.libsdl.org"
3SECTION = "libs"
4LICENSE = "LGPL"
5DEPENDS = "libx11-nativesdk libxext-nativesdk libxrandr-nativesdk libxrender-nativesdk"
6RDEPENDS = "libx11-nativesdk libxrandr-nativesdk libxrender-nativesdk libxext-nativesdk"
7PR = "r4"
8
9SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
10 file://acinclude.m4 \
11 file://configure_tweak.patch;patch=1 \
12 file://kernel-asm-page.patch;patch=1 "
13S = "${WORKDIR}/SDL-${PV}"
14
15inherit autotools binconfig pkgconfig nativesdk
16
17EXTRA_OECONF = "--disable-static --disable-debug --disable-cdrom --enable-threads --enable-timers --enable-endian \
18 --enable-file --disable-oss --disable-alsa --disable-esd --disable-arts \
19 --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
20 --disable-mintaudio --disable-nasm --enable-video-x11 --disable-video-dga \
21 --disable-video-fbcon --disable-video-directfb --disable-video-ps2gs \
22 --disable-video-xbios --disable-video-gem --disable-video-dummy \
23 --disable-video-opengl --enable-input-events --enable-pthreads \
24 --disable-video-svga \
25 --disable-video-picogui --disable-video-qtopia --enable-dlopen"
26
27PARALLEL_MAKE = ""
28
29do_configure_prepend() {
30 cp ${WORKDIR}/acinclude.m4 ${S}/acinclude.m4
31}
diff --git a/meta/packages/libsoup/libsoup-2.4_2.31.2.bb b/meta/packages/libsoup/libsoup-2.4_2.31.2.bb
deleted file mode 100644
index 9a00e07da0..0000000000
--- a/meta/packages/libsoup/libsoup-2.4_2.31.2.bb
+++ /dev/null
@@ -1,17 +0,0 @@
1DESCRIPTION = "An HTTP library implementation in C"
2HOMEPAGE = "http://www.gnome.org/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4
5LICENSE = "LGPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
7
8SECTION = "x11/gnome/libs"
9PR = "r0"
10
11DEPENDS = "glib-2.0 gnutls libxml2 libproxy sqlite3 libgnome-keyring"
12
13SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/libsoup/2.31/libsoup-${PV}.tar.bz2"
14S = "${WORKDIR}/libsoup-${PV}"
15
16inherit autotools pkgconfig
17
diff --git a/meta/packages/libsoup/libsoup-2.4_2.4.1.bb b/meta/packages/libsoup/libsoup-2.4_2.4.1.bb
deleted file mode 100644
index f48ac3d6c9..0000000000
--- a/meta/packages/libsoup/libsoup-2.4_2.4.1.bb
+++ /dev/null
@@ -1,11 +0,0 @@
1DESCRIPTION = "An HTTP library implementation in C"
2LICENSE = "GPL"
3SECTION = "x11/gnome/libs"
4
5DEPENDS = "glib-2.0 gnutls libxml2"
6
7SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/libsoup/2.4/libsoup-${PV}.tar.bz2"
8S = "${WORKDIR}/libsoup-${PV}"
9
10inherit autotools pkgconfig
11
diff --git a/meta/packages/libsoup/libsoup_2.2.100.bb b/meta/packages/libsoup/libsoup_2.2.100.bb
deleted file mode 100644
index 94efb7f676..0000000000
--- a/meta/packages/libsoup/libsoup_2.2.100.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1DESCRIPTION = "An HTTP library implementation in C"
2LICENSE = "GPL"
3SECTION = "x11/gnome/libs"
4PR = "r1"
5
6DEPENDS = "glib-2.0 gnutls libxml2"
7
8SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${PN}/2.2/${PN}-${PV}.tar.bz2"
9
10inherit autotools pkgconfig
11
12FILES_${PN} = "${libdir}/lib*.so.*"
13FILES_${PN}-dev = "${includedir}/ ${libdir}/"
14FILES_${PN}-doc = "${datadir}/"
diff --git a/meta/packages/liburcu/liburcu_0.4.6.bb b/meta/packages/liburcu/liburcu_0.4.6.bb
deleted file mode 100644
index 503b561d37..0000000000
--- a/meta/packages/liburcu/liburcu_0.4.6.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1DESCRIPTION = "The userspace read-copy update library by Mathieu Desnoyers"
2HOMEPAGE = "http://lttng.org/urcu"
3BUGTRACKER = "n/a"
4
5LICENSE = "LGPLv2.1+ & MIT-style"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=b472dc110d38774921e1d5ccb0065fff \
7 file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
8 file://urcu/uatomic_arch_x86.h;beginline=4;endline=21;md5=220552f72c55b102f2ee35929734ef42"
9
10PR = "r0"
11
12SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2"
13
14S = "${WORKDIR}/userspace-rcu-${PV}"
15
16inherit autotools
17
18# liburcu, which is only used by lttng-ust, may not build on other
19# platforms, e.g., on ARM, liburcu is only supported on ARMv7l while poky
20# only supports armv4/armv4t/armv5te. 1 more example: liburcu doesn't support
21# MIPS now.
22# So here let us first suppport x86/powerpc platforms now.
23COMPATIBLE_HOST = '(x86_64.*|i.86.*|powerpc.*)-linux'
24
diff --git a/meta/packages/libusb/libusb-compat-0.1.3/0.1.0-beta1-gcc3.4-fix.patch b/meta/packages/libusb/libusb-compat-0.1.3/0.1.0-beta1-gcc3.4-fix.patch
deleted file mode 100644
index 501ba3fb29..0000000000
--- a/meta/packages/libusb/libusb-compat-0.1.3/0.1.0-beta1-gcc3.4-fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: libusb-compat-0.1.0-beta1/configure.ac
2===================================================================
3--- libusb-compat-0.1.0-beta1.orig/configure.ac 2008-07-21 13:14:42.000000000 +0200
4+++ libusb-compat-0.1.0-beta1/configure.ac 2008-07-21 13:15:03.000000000 +0200
5@@ -55,7 +55,7 @@
6 CFLAGS="$saved_cflags"
7
8 AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
9-AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
10+AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wshadow"
11 AC_SUBST(AM_CFLAGS)
12
13 AC_CONFIG_FILES([libusb.pc] [libusb-config] [Makefile] [libusb/Makefile] [examples/Makefile])
diff --git a/meta/packages/libusb/libusb-compat_0.1.3.bb b/meta/packages/libusb/libusb-compat_0.1.3.bb
deleted file mode 100644
index e8d6338e57..0000000000
--- a/meta/packages/libusb/libusb-compat_0.1.3.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1DESCRIPTION = "libusb-0.1 compatible layer for libusb1, a drop-in replacement \
2that aims to look, feel and behave exactly like libusb-0.1"
3HOMEPAGE = "http://www.libusb.org/"
4BUGTRACKER = "http://www.libusb.org/report"
5SECTION = "libs"
6
7LICENSE = "LGPLv2.1+"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=f2ac5f3ac4835e8f91324a26a590a423"
9DEPENDS = "libusb1"
10
11# Few packages are known not to work with libusb-compat (e.g. libmtp-1.0.0),
12# so here libusb-0.1 is removed completely instead of adding virtual/libusb0.
13# Besides, libusb-0.1 uses a per 1ms polling that hurts a lot to power
14# consumption.
15PROVIDES = "libusb"
16
17PE = "1"
18PR = "r0"
19
20SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-compat-${PV}.tar.bz2 \
21 file://0.1.0-beta1-gcc3.4-fix.patch"
22
23inherit autotools pkgconfig binconfig
diff --git a/meta/packages/libusb/libusb1_1.0.8.bb b/meta/packages/libusb/libusb1_1.0.8.bb
deleted file mode 100644
index 26a535ab4e..0000000000
--- a/meta/packages/libusb/libusb1_1.0.8.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1DESCRIPTION = "userspace library to access USB (version 1.0)"
2HOMEPAGE = "http://libusb.sf.net"
3BUGTRACKER = "http://www.libusb.org/report"
4SECTION = "libs"
5
6LICENSE = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
8
9PR = "r0"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2"
12S = "${WORKDIR}/libusb-${PV}"
13
14inherit autotools pkgconfig
diff --git a/meta/packages/libxslt/libxslt/pkgconfig_fix.patch b/meta/packages/libxslt/libxslt/pkgconfig_fix.patch
deleted file mode 100644
index d21663896f..0000000000
--- a/meta/packages/libxslt/libxslt/pkgconfig_fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1Index: libxslt-1.1.22/libexslt.pc.in
2===================================================================
3--- libxslt-1.1.22.orig/libexslt.pc.in 2008-03-19 16:52:20.000000000 +0000
4+++ libxslt-1.1.22/libexslt.pc.in 2008-03-19 16:55:49.000000000 +0000
5@@ -8,5 +8,5 @@
6 Version: @LIBEXSLT_VERSION@
7 Description: EXSLT Extension library
8 Requires: libxml-2.0
9-Libs: @EXSLT_LIBDIR@ @EXSLT_LIBS@
10+Libs: -lexslt @EXSLT_LIBDIR@ @M_LIBS@
11 Cflags: @EXSLT_INCLUDEDIR@
12Index: libxslt-1.1.22/libxslt.pc.in
13===================================================================
14--- libxslt-1.1.22.orig/libxslt.pc.in 2008-03-19 16:52:20.000000000 +0000
15+++ libxslt-1.1.22/libxslt.pc.in 2008-03-19 16:55:38.000000000 +0000
16@@ -8,5 +8,5 @@
17 Version: @VERSION@
18 Description: XSLT library version 2.
19 Requires: libxml-2.0
20-Libs: @XSLT_LIBDIR@ @XSLT_LIBS@
21+Libs: -lxslt @XSLT_LIBDIR@ @M_LIBS@
22 Cflags: @XSLT_INCLUDEDIR@
diff --git a/meta/packages/libxslt/libxslt_1.1.26.bb b/meta/packages/libxslt/libxslt_1.1.26.bb
deleted file mode 100644
index b5726974f1..0000000000
--- a/meta/packages/libxslt/libxslt_1.1.26.bb
+++ /dev/null
@@ -1,26 +0,0 @@
1DESCRIPTION = "GNOME XSLT library"
2HOMEPAGE = "http://xmlsoft.org/XSLT/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://COPYING;md5=0cd9a07afbeb24026c9b03aecfeba458"
7
8SECTION = "libs"
9PRIORITY = "optional"
10DEPENDS = "libxml2 (>=2.6.27)"
11PR = "r0"
12
13SRC_URI = "ftp://xmlsoft.org/libxslt//libxslt-${PV}.tar.gz \
14 file://pkgconfig_fix.patch;patch=1"
15S = "${WORKDIR}/libxslt-${PV}"
16
17inherit autotools pkgconfig
18
19EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
20
21PACKAGES = "${PN}-dbg ${PN}-dev ${PN}-utils ${PN} ${PN}-doc ${PN}-locale"
22
23FILES_${PN}-dev += "${bindir}/xslt-config"
24FILES_${PN}-utils += "${bindir}"
25
26BBCLASSEXTEND = "native"
diff --git a/meta/packages/lrzsz/lrzsz-0.12.20/autotools.patch b/meta/packages/lrzsz/lrzsz-0.12.20/autotools.patch
deleted file mode 100644
index 73f5a062ef..0000000000
--- a/meta/packages/lrzsz/lrzsz-0.12.20/autotools.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1--- lrzsz-0.12.20/acinclude.m4~autotools 1998-12-27 17:08:59.000000000 -0500
2+++ lrzsz-0.12.20/acinclude.m4 2004-05-09 22:26:19.000000000 -0400
3@@ -1,12 +1,11 @@
4 dnl AC_REPLACE_GNU_GETOPT
5-AC_DEFUN(AC_REPLACE_GNU_GETOPT,
6-[AC_CHECK_FUNC(getopt_long, , [LIBOBJS="$LIBOBJS getopt1.o getopt.o"])
7-AC_SUBST(LIBOBJS)dnl
8-])
9+AC_DEFUN([AC_REPLACE_GNU_GETOPT],
10+[AC_CHECK_FUNC(getopt_long, , [AC_LIBOBJ([getopt1])
11+AC_LIBOBJ([getopt])dnl])])
12
13 dnl
14 dnl taken from taylor uucp
15-AC_DEFUN(LRZSZ_ERRNO_DECL,[
16+AC_DEFUN([LRZSZ_ERRNO_DECL],[
17 AC_MSG_CHECKING(for errno declaration)
18 AC_CACHE_VAL(lrzsz_cv_decl_errno,
19 [AC_TRY_COMPILE([#include <errno.h>], [int i = errno; errno = 1;],
20@@ -23,7 +21,7 @@
21 ])
22
23 dnl LRZSZ_TYPE_SPEED_T
24-AC_DEFUN(LRZSZ_TYPE_SPEED_T,[
25+AC_DEFUN([LRZSZ_TYPE_SPEED_T],[
26 AC_REQUIRE([AC_HEADER_STDC])dnl
27 AC_REQUIRE([LRZSZ_HEADERS_TERM_IO])dnl
28 AC_MSG_CHECKING(for speed_t)
29@@ -61,7 +59,7 @@
30 fi
31 ])
32
33-AC_DEFUN(lrzsz_HEADER_SYS_SELECT,
34+AC_DEFUN([lrzsz_HEADER_SYS_SELECT],
35 [AC_CACHE_CHECK([whether sys/time.h and sys/select.h may both be included],
36 lrzsz_cv_header_sys_select,
37 [AC_TRY_COMPILE([#include <sys/types.h>
diff --git a/meta/packages/lrzsz/lrzsz-0.12.20/gettext.patch b/meta/packages/lrzsz/lrzsz-0.12.20/gettext.patch
deleted file mode 100644
index 241ffd90ba..0000000000
--- a/meta/packages/lrzsz/lrzsz-0.12.20/gettext.patch
+++ /dev/null
@@ -1,21882 +0,0 @@
1--- lrzsz-0.12.20.safe/ABOUT-NLS 1998-04-26 09:22:30.000000000 -0400
2+++ lrzsz-0.12.20/ABOUT-NLS 2004-09-12 14:40:34.323752952 -0400
3@@ -1,14 +1,14 @@
4 Notes on the Free Translation Project
5 *************************************
6
7- Free software is going international! The Free Translation Project
8-is a way to get maintainers of free software, translators, and users all
9+Free software is going international! The Free Translation Project is
10+a way to get maintainers of free software, translators, and users all
11 together, so that will gradually become able to speak many languages.
12 A few packages already provide translations for their messages.
13
14 If you found this `ABOUT-NLS' file inside a distribution, you may
15 assume that the distributed package does use GNU `gettext' internally,
16-itself available at your nearest GNU archive site. But you do *not*
17+itself available at your nearest GNU archive site. But you do _not_
18 need to install GNU `gettext' prior to configuring, installing or using
19 this package with messages translated.
20
21@@ -22,10 +22,10 @@
22 `gettext' which is used. The information can be found in the
23 `intl/VERSION' file, in internationalized packages.
24
25-One advise in advance
26-=====================
27+Quick configuration advice
28+==========================
29
30- If you want to exploit the full power of internationalization, you
31+If you want to exploit the full power of internationalization, you
32 should configure it using
33
34 ./configure --with-included-gettext
35@@ -34,42 +34,40 @@
36 package, despite the existence of internationalizing capabilities in the
37 operating system where this package is being installed. So far, only
38 the `gettext' implementation in the GNU C library version 2 provides as
39-many features (such as locale alias or message inheritance) as the
40-implementation here. It is also not possible to offer this additional
41-functionality on top of a `catgets' implementation. Future versions of
42-GNU `gettext' will very likely convey even more functionality. So it
43-might be a good idea to change to GNU `gettext' as soon as possible.
44+many features (such as locale alias, message inheritance, automatic
45+charset conversion or plural form handling) as the implementation here.
46+It is also not possible to offer this additional functionality on top
47+of a `catgets' implementation. Future versions of GNU `gettext' will
48+very likely convey even more functionality. So it might be a good idea
49+to change to GNU `gettext' as soon as possible.
50
51- So you need not provide this option if you are using GNU libc 2 or
52+ So you need _not_ provide this option if you are using GNU libc 2 or
53 you have installed a recent copy of the GNU gettext package with the
54 included `libintl'.
55
56 INSTALL Matters
57 ===============
58
59- Some packages are "localizable" when properly installed; the
60-programs they contain can be made to speak your own native language.
61-Most such packages use GNU `gettext'. Other packages have their own
62-ways to internationalization, predating GNU `gettext'.
63+Some packages are "localizable" when properly installed; the programs
64+they contain can be made to speak your own native language. Most such
65+packages use GNU `gettext'. Other packages have their own ways to
66+internationalization, predating GNU `gettext'.
67
68 By default, this package will be installed to allow translation of
69-messages. It will automatically detect whether the system provides
70-usable `catgets' (if using this is selected by the installer) or
71-`gettext' functions. If neither is available, the GNU `gettext' own
72+messages. It will automatically detect whether the system already
73+provides the GNU `gettext' functions. If not, the GNU `gettext' own
74 library will be used. This library is wholly contained within this
75 package, usually in the `intl/' subdirectory, so prior installation of
76-the GNU `gettext' package is *not* required. Installers may use
77+the GNU `gettext' package is _not_ required. Installers may use
78 special options at configuration time for changing the default
79 behaviour. The commands:
80
81 ./configure --with-included-gettext
82- ./configure --with-catgets
83 ./configure --disable-nls
84
85-will respectively bypass any pre-existing `catgets' or `gettext' to use
86-the internationalizing routines provided within this package, enable
87-the use of the `catgets' functions (if found on the locale system), or
88-else, *totally* disable translation of messages.
89+will respectively bypass any pre-existing `gettext' to use the
90+internationalizing routines provided within this package, or else,
91+_totally_ disable translation of messages.
92
93 When you already have GNU `gettext' installed on your system and run
94 configure without an option for your new package, `configure' will
95@@ -83,18 +81,10 @@
96
97 to prevent auto-detection.
98
99- By default the configuration process will not test for the `catgets'
100-function and therefore they will not be used. The reasons are already
101-given above: the emulation on top of `catgets' cannot provide all the
102-extensions provided by the GNU `gettext' library. If you nevertheless
103-want to use the `catgets' functions use
104-
105- ./configure --with-catgets
106-
107-to enable the test for `catgets' (this causes no harm if `catgets' is
108-not available on your system). If you really select this option we
109-would like to hear about the reasons because we cannot think of any
110-good one ourself.
111+ The configuration process will not test for the `catgets' function
112+and therefore it will not be used. The reason is that even an
113+emulation of `gettext' on top of `catgets' could not provide all the
114+extensions of the GNU `gettext' library.
115
116 Internationalized packages have usually many `po/LL.po' files, where
117 LL gives an ISO 639 two-letter code identifying the language. Unless
118@@ -108,57 +98,73 @@
119 Using This Package
120 ==================
121
122- As a user, if your language has been installed for this package, you
123+As a user, if your language has been installed for this package, you
124 only have to set the `LANG' environment variable to the appropriate
125-ISO 639 `LL' two-letter code prior to using the programs in the
126-package. For example, let's suppose that you speak German. At the
127-shell prompt, merely execute `setenv LANG de' (in `csh'),
128-`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
129-can be done from your `.login' or `.profile' file, once and for all.
130+`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
131+and `CC' is an ISO 3166 two-letter country code. For example, let's
132+suppose that you speak German and live in Germany. At the shell
133+prompt, merely execute `setenv LANG de_DE' (in `csh'),
134+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
135+This can be done from your `.login' or `.profile' file, once and for
136+all.
137
138- An operating system might already offer message localization for
139-many of its programs, while other programs have been installed locally
140-with the full capabilities of GNU `gettext'. Just using `gettext'
141-extended syntax for `LANG' would break proper localization of already
142-available operating system programs. In this case, users should set
143-both `LANGUAGE' and `LANG' variables in their environment, as programs
144-using GNU `gettext' give preference to `LANGUAGE'. For example, some
145-Swedish users would rather read translations in German than English for
146-when Swedish is not available. This is easily accomplished by setting
147-`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
148+ You might think that the country code specification is redundant.
149+But in fact, some languages have dialects in different countries. For
150+example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
151+country code serves to distinguish the dialects.
152+
153+ The locale naming convention of `LL_CC', with `LL' denoting the
154+language and `CC' denoting the country, is the one use on systems based
155+on GNU libc. On other systems, some variations of this scheme are
156+used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
157+locales supported by your system for your country by running the command
158+`locale -a | grep '^LL''.
159+
160+ Not all programs have translations for all languages. By default, an
161+English message is shown in place of a nonexistent translation. If you
162+understand other languages, you can set up a priority list of languages.
163+This is done through a different environment variable, called
164+`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
165+for the purpose of message handling, but you still need to have `LANG'
166+set to the primary language; this is required by other parts of the
167+system libraries. For example, some Swedish users who would rather
168+read translations in German than English for when Swedish is not
169+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
170+
171+ Special advice for Norwegian users: The language code for Norwegian
172+bokma*l changed from `no' to `nb' recently (in 2003). During the
173+transition period, while some message catalogs for this language are
174+installed under `nb' and some older ones under `no', it's recommended
175+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
176+older translations are used.
177+
178+ In the `LANGUAGE' environment variable, but not in the `LANG'
179+environment variable, `LL_CC' combinations can be abbreviated as `LL'
180+to denote the language's main dialect. For example, `de' is equivalent
181+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
182+(Portuguese as spoken in Portugal) in this context.
183
184 Translating Teams
185 =================
186
187- For the Free Translation Project to be a success, we need interested
188+For the Free Translation Project to be a success, we need interested
189 people who like their own language and write it well, and who are also
190 able to synergize with other translators speaking the same language.
191-Each translation team has its own mailing list, courtesy of Linux
192-International. You may reach your translation team at the address
193-`LL@li.org', replacing LL by the two-letter ISO 639 code for your
194-language. Language codes are *not* the same as the country codes given
195-in ISO 3166. The following translation teams exist, as of August 1997:
196-
197- Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
198- Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
199- `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
200- Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
201- `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
202- Swedish `sv', and Turkish `tr'.
203-
204-For example, you may reach the Chinese translation team by writing to
205-`zh@li.org'.
206+Each translation team has its own mailing list. The up-to-date list of
207+teams can be found at the Free Translation Project's homepage,
208+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
209+area.
210
211- If you'd like to volunteer to *work* at translating messages, you
212+ If you'd like to volunteer to _work_ at translating messages, you
213 should become a member of the translating team for your own language.
214-The subscribing address is *not* the same as the list itself, it has
215+The subscribing address is _not_ the same as the list itself, it has
216 `-request' appended. For example, speakers of Swedish can send a
217 message to `sv-request@li.org', having this message body:
218
219 subscribe
220
221 Keep in mind that team members are expected to participate
222-*actively* in translations, or at solving translational difficulties,
223+_actively_ in translations, or at solving translational difficulties,
224 rather than merely lurking around. If your team does not exist yet and
225 you want to start one, or if you are unsure about what to do or how to
226 get started, please write to `translation@iro.umontreal.ca' to reach the
227@@ -171,43 +177,559 @@
228 Available Packages
229 ==================
230
231- Languages are not equally supported in all packages. The following
232-matrix shows the current state of internationalization, as of August
233-1997. The matrix shows, in regard of each package, for which languages
234-PO files have been submitted to translation coordination.
235+Languages are not equally supported in all packages. The following
236+matrix shows the current state of internationalization, as of January
237+2004. The matrix shows, in regard of each package, for which languages
238+PO files have been submitted to translation coordination, with a
239+translation percentage of at least 50%.
240
241- Ready PO files cs da de en es fi fr it ja ko nl no pl pt sl sv
242- .-------------------------------------------------.
243- bash | [] [] [] | 3
244- bison | [] [] [] | 3
245- clisp | [] [] [] [] | 4
246- cpio | [] [] [] [] [] | 5
247- diffutils | [] [] [] [] [] | 5
248- enscript | [] [] [] [] [] [] | 6
249- fileutils | [] [] [] [] [] [] [] [] [] [] | 10
250- findutils | [] [] [] [] [] [] [] [] | 8
251- flex | [] [] [] [] | 4
252- gcal | [] [] [] [] [] | 5
253- gettext | [] [] [] [] [] [] [] [] [] [] | 11
254- grep | [] [] [] [] [] [] [] [] [] | 9
255- hello | [] [] [] [] [] [] [] [] [] [] | 10
256- id-utils | [] [] [] | 3
257- indent | [] [] [] [] | 4
258- libc | [] [] [] [] [] [] [] | 7
259- m4 | [] [] [] [] [] | 5
260- make | [] [] [] [] [] [] | 6
261- music | [] [] | 2
262- ptx | [] [] [] [] [] [] [] [] | 8
263- recode | [] [] [] [] [] [] [] [] [] | 9
264- sh-utils | [] [] [] [] [] [] [] | 7
265- sharutils | [] [] [] [] [] | 5
266- tar | [] [] [] [] [] [] [] [] [] [] | 10
267- texinfo | [] | 1
268- textutils | [] [] [] [] [] [] [] [] [] | 9
269- wdiff | [] [] [] [] [] [] [] [] | 8
270- `-------------------------------------------------'
271- 16 languages cs da de en es fi fr it ja ko nl no pl pt sl sv
272- 27 packages 3 2 24 1 17 1 26 2 1 11 20 9 19 7 7 17 167
273+ Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es
274+ +----------------------------------------------------+
275+ a2ps | [] [] [] [] |
276+ aegis | () |
277+ ant-phone | () |
278+ anubis | |
279+ ap-utils | |
280+ aspell | [] |
281+ bash | [] [] [] [] |
282+ batchelor | |
283+ bfd | [] [] |
284+ binutils | [] [] |
285+ bison | [] [] [] |
286+ bluez-pin | [] [] [] |
287+ clisp | |
288+ clisp | [] [] [] |
289+ console-tools | [] [] |
290+ coreutils | [] [] [] [] |
291+ cpio | [] [] [] |
292+ darkstat | [] () [] |
293+ diffutils | [] [] [] [] [] [] [] |
294+ e2fsprogs | [] [] [] |
295+ enscript | [] [] [] [] |
296+ error | [] [] [] [] [] |
297+ fetchmail | [] () [] [] [] [] |
298+ fileutils | [] [] [] |
299+ findutils | [] [] [] [] [] [] [] |
300+ flex | [] [] [] [] |
301+ fslint | |
302+ gas | [] |
303+ gawk | [] [] [] [] |
304+ gbiff | [] |
305+ gcal | [] |
306+ gcc | [] [] |
307+ gettext | [] [] [] [] [] |
308+ gettext-examples | [] [] [] [] |
309+ gettext-runtime | [] [] [] [] [] |
310+ gettext-tools | [] [] [] |
311+ gimp-print | [] [] [] [] [] |
312+ gliv | |
313+ glunarclock | [] [] |
314+ gnubiff | [] |
315+ gnucash | [] () [] [] |
316+ gnucash-glossary | [] () [] |
317+ gnupg | [] () [] [] [] [] |
318+ gpe-aerial | [] |
319+ gpe-beam | [] [] |
320+ gpe-calendar | [] [] |
321+ gpe-clock | [] [] |
322+ gpe-conf | [] [] |
323+ gpe-contacts | [] [] |
324+ gpe-edit | [] |
325+ gpe-go | [] |
326+ gpe-login | [] [] |
327+ gpe-ownerinfo | [] [] |
328+ gpe-sketchbook | [] [] |
329+ gpe-su | [] [] |
330+ gpe-taskmanager | [] [] |
331+ gpe-timesheet | [] |
332+ gpe-today | [] [] |
333+ gpe-todo | [] [] |
334+ gphoto2 | [] [] [] [] |
335+ gprof | [] [] [] |
336+ gpsdrive | () () () |
337+ gramadoir | [] |
338+ grep | [] [] [] [] [] [] |
339+ gretl | [] |
340+ gtick | [] () |
341+ hello | [] [] [] [] [] [] |
342+ id-utils | [] [] |
343+ indent | [] [] [] [] |
344+ iso_3166 | [] [] [] [] [] [] [] [] [] [] |
345+ iso_3166_1 | [] [] [] [] [] [] |
346+ iso_3166_2 | |
347+ iso_3166_3 | [] |
348+ iso_4217 | [] [] [] [] |
349+ iso_639 | |
350+ jpilot | [] [] [] |
351+ jtag | |
352+ jwhois | [] |
353+ kbd | [] [] [] [] [] |
354+ latrine | () |
355+ ld | [] [] |
356+ libc | [] [] [] [] [] [] |
357+ libgpewidget | [] [] |
358+ libiconv | [] [] [] [] [] |
359+ lifelines | [] () |
360+ lilypond | [] |
361+ lingoteach | |
362+ lingoteach_lessons | () () |
363+ lynx | [] [] [] [] |
364+ m4 | [] [] [] [] |
365+ mailutils | [] [] |
366+ make | [] [] [] |
367+ man-db | [] () [] [] () |
368+ minicom | [] [] [] |
369+ mysecretdiary | [] [] [] |
370+ nano | [] () [] [] [] |
371+ nano_1_0 | [] () [] [] [] |
372+ opcodes | [] |
373+ parted | [] [] [] [] [] |
374+ ptx | [] [] [] [] [] |
375+ python | |
376+ radius | [] |
377+ recode | [] [] [] [] [] [] [] |
378+ rpm | [] [] |
379+ screem | |
380+ scrollkeeper | [] [] [] [] [] [] |
381+ sed | [] [] [] [] [] [] |
382+ sh-utils | [] [] [] |
383+ shared-mime-info | |
384+ sharutils | [] [] [] [] [] [] |
385+ silky | () |
386+ skencil | [] () [] |
387+ sketch | [] () [] |
388+ soundtracker | [] [] [] |
389+ sp | [] |
390+ tar | [] [] [] [] |
391+ texinfo | [] [] [] |
392+ textutils | [] [] [] [] |
393+ tin | () () |
394+ tp-robot | |
395+ tuxpaint | [] [] [] [] [] [] [] |
396+ unicode-han-tra... | |
397+ unicode-transla... | |
398+ util-linux | [] [] [] [] [] |
399+ vorbis-tools | [] [] [] [] |
400+ wastesedge | () |
401+ wdiff | [] [] [] [] |
402+ wget | [] [] [] [] [] [] |
403+ xchat | [] [] [] [] |
404+ xfree86_xkb_xml | [] [] |
405+ xpad | [] |
406+ +----------------------------------------------------+
407+ af am ar az be bg bs ca cs da de el en en_GB eo es
408+ 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68
409+
410+ et eu fa fi fr ga gl he hr hu id is it ja ko lg
411+ +-------------------------------------------------+
412+ a2ps | [] [] [] () () |
413+ aegis | |
414+ ant-phone | [] |
415+ anubis | [] |
416+ ap-utils | [] |
417+ aspell | [] [] |
418+ bash | [] [] |
419+ batchelor | [] [] |
420+ bfd | [] |
421+ binutils | [] [] |
422+ bison | [] [] [] [] |
423+ bluez-pin | [] [] [] [] [] |
424+ clisp | |
425+ clisp | [] |
426+ console-tools | |
427+ coreutils | [] [] [] [] [] [] |
428+ cpio | [] [] [] [] |
429+ darkstat | () [] [] [] |
430+ diffutils | [] [] [] [] [] [] [] |
431+ e2fsprogs | |
432+ enscript | [] [] |
433+ error | [] [] [] [] |
434+ fetchmail | [] |
435+ fileutils | [] [] [] [] [] [] |
436+ findutils | [] [] [] [] [] [] [] [] [] [] [] |
437+ flex | [] [] [] |
438+ fslint | [] |
439+ gas | [] |
440+ gawk | [] [] [] |
441+ gbiff | [] |
442+ gcal | [] |
443+ gcc | [] |
444+ gettext | [] [] [] |
445+ gettext-examples | [] [] |
446+ gettext-runtime | [] [] [] [] [] |
447+ gettext-tools | [] [] [] |
448+ gimp-print | [] [] |
449+ gliv | () |
450+ glunarclock | [] [] [] [] |
451+ gnubiff | [] |
452+ gnucash | () [] |
453+ gnucash-glossary | [] |
454+ gnupg | [] [] [] [] [] [] [] |
455+ gpe-aerial | [] |
456+ gpe-beam | [] |
457+ gpe-calendar | [] [] [] |
458+ gpe-clock | [] |
459+ gpe-conf | [] |
460+ gpe-contacts | [] [] |
461+ gpe-edit | [] [] |
462+ gpe-go | [] |
463+ gpe-login | [] [] |
464+ gpe-ownerinfo | [] [] [] |
465+ gpe-sketchbook | [] |
466+ gpe-su | [] |
467+ gpe-taskmanager | [] |
468+ gpe-timesheet | [] [] [] |
469+ gpe-today | [] [] |
470+ gpe-todo | [] [] |
471+ gphoto2 | [] [] [] |
472+ gprof | [] [] |
473+ gpsdrive | () () () |
474+ gramadoir | [] [] |
475+ grep | [] [] [] [] [] [] [] [] [] [] [] |
476+ gretl | [] [] |
477+ gtick | [] [] [] |
478+ hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
479+ id-utils | [] [] [] [] |
480+ indent | [] [] [] [] [] [] [] [] [] |
481+ iso_3166 | [] [] [] [] [] [] [] |
482+ iso_3166_1 | [] [] [] [] [] |
483+ iso_3166_2 | |
484+ iso_3166_3 | |
485+ iso_4217 | [] [] [] [] [] [] |
486+ iso_639 | |
487+ jpilot | [] () |
488+ jtag | [] |
489+ jwhois | [] [] [] [] |
490+ kbd | [] |
491+ latrine | [] |
492+ ld | [] |
493+ libc | [] [] [] [] [] [] |
494+ libgpewidget | [] [] [] [] |
495+ libiconv | [] [] [] [] [] [] [] [] [] |
496+ lifelines | () |
497+ lilypond | [] |
498+ lingoteach | [] [] |
499+ lingoteach_lessons | |
500+ lynx | [] [] [] [] |
501+ m4 | [] [] [] [] |
502+ mailutils | |
503+ make | [] [] [] [] [] [] |
504+ man-db | () () |
505+ minicom | [] [] [] [] |
506+ mysecretdiary | [] [] |
507+ nano | [] [] [] [] |
508+ nano_1_0 | [] [] [] [] |
509+ opcodes | [] |
510+ parted | [] [] [] |
511+ ptx | [] [] [] [] [] [] [] |
512+ python | |
513+ radius | [] |
514+ recode | [] [] [] [] [] [] |
515+ rpm | [] [] |
516+ screem | |
517+ scrollkeeper | [] |
518+ sed | [] [] [] [] [] [] [] [] [] |
519+ sh-utils | [] [] [] [] [] [] [] |
520+ shared-mime-info | [] [] [] |
521+ sharutils | [] [] [] [] [] |
522+ silky | () [] () () |
523+ skencil | [] |
524+ sketch | [] |
525+ soundtracker | [] [] |
526+ sp | [] () |
527+ tar | [] [] [] [] [] [] [] [] [] |
528+ texinfo | [] [] [] [] |
529+ textutils | [] [] [] [] [] [] |
530+ tin | [] () |
531+ tp-robot | [] |
532+ tuxpaint | [] [] [] [] [] [] [] [] [] |
533+ unicode-han-tra... | |
534+ unicode-transla... | [] [] |
535+ util-linux | [] [] [] [] () [] |
536+ vorbis-tools | [] |
537+ wastesedge | () |
538+ wdiff | [] [] [] [] [] [] |
539+ wget | [] [] [] [] [] [] [] |
540+ xchat | [] [] [] |
541+ xfree86_xkb_xml | [] [] |
542+ xpad | [] [] |
543+ +-------------------------------------------------+
544+ et eu fa fi fr ga gl he hr hu id is it ja ko lg
545+ 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0
546+
547+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
548+ +-----------------------------------------------------+
549+ a2ps | [] [] () () [] [] [] |
550+ aegis | () () () |
551+ ant-phone | [] [] |
552+ anubis | [] [] [] [] [] [] |
553+ ap-utils | [] () [] |
554+ aspell | [] |
555+ bash | [] [] [] |
556+ batchelor | [] |
557+ bfd | [] |
558+ binutils | [] |
559+ bison | [] [] [] [] [] |
560+ bluez-pin | [] [] [] |
561+ clisp | |
562+ clisp | [] |
563+ console-tools | [] |
564+ coreutils | [] [] |
565+ cpio | [] [] [] [] [] |
566+ darkstat | [] [] [] [] |
567+ diffutils | [] [] [] [] [] [] |
568+ e2fsprogs | [] |
569+ enscript | [] [] [] [] |
570+ error | [] [] [] |
571+ fetchmail | [] [] () [] |
572+ fileutils | [] [] [] |
573+ findutils | [] [] [] [] [] |
574+ flex | [] [] [] [] |
575+ fslint | [] [] |
576+ gas | |
577+ gawk | [] [] [] |
578+ gbiff | [] [] |
579+ gcal | |
580+ gcc | |
581+ gettext | [] [] [] |
582+ gettext-examples | [] [] [] |
583+ gettext-runtime | [] [] [] [] |
584+ gettext-tools | [] [] |
585+ gimp-print | [] |
586+ gliv | [] [] [] |
587+ glunarclock | [] [] [] [] |
588+ gnubiff | [] |
589+ gnucash | [] [] () [] |
590+ gnucash-glossary | [] [] |
591+ gnupg | [] |
592+ gpe-aerial | [] [] [] [] |
593+ gpe-beam | [] [] [] [] |
594+ gpe-calendar | [] [] [] [] |
595+ gpe-clock | [] [] [] [] |
596+ gpe-conf | [] [] [] [] |
597+ gpe-contacts | [] [] [] [] |
598+ gpe-edit | [] [] [] [] |
599+ gpe-go | [] [] [] |
600+ gpe-login | [] [] [] [] |
601+ gpe-ownerinfo | [] [] [] [] |
602+ gpe-sketchbook | [] [] [] [] |
603+ gpe-su | [] [] [] [] |
604+ gpe-taskmanager | [] [] [] [] |
605+ gpe-timesheet | [] [] [] [] |
606+ gpe-today | [] [] [] [] |
607+ gpe-todo | [] [] [] [] |
608+ gphoto2 | [] |
609+ gprof | [] [] |
610+ gpsdrive | () () [] |
611+ gramadoir | () [] |
612+ grep | [] [] [] [] [] |
613+ gretl | |
614+ gtick | [] [] [] |
615+ hello | [] [] [] [] [] [] [] [] [] [] |
616+ id-utils | [] [] [] [] |
617+ indent | [] [] [] [] |
618+ iso_3166 | [] [] [] |
619+ iso_3166_1 | [] [] |
620+ iso_3166_2 | |
621+ iso_3166_3 | [] |
622+ iso_4217 | [] [] [] [] [] [] [] [] |
623+ iso_639 | [] |
624+ jpilot | () () |
625+ jtag | |
626+ jwhois | [] [] [] [] () |
627+ kbd | [] [] [] |
628+ latrine | [] |
629+ ld | |
630+ libc | [] [] [] [] |
631+ libgpewidget | [] [] [] |
632+ libiconv | [] [] [] [] [] |
633+ lifelines | |
634+ lilypond | |
635+ lingoteach | |
636+ lingoteach_lessons | |
637+ lynx | [] [] [] |
638+ m4 | [] [] [] [] [] |
639+ mailutils | [] [] [] |
640+ make | [] [] [] [] |
641+ man-db | [] |
642+ minicom | [] [] [] [] |
643+ mysecretdiary | [] [] [] |
644+ nano | [] [] [] [] [] |
645+ nano_1_0 | [] [] [] [] [] [] |
646+ opcodes | [] [] |
647+ parted | [] [] [] [] |
648+ ptx | [] [] [] [] [] [] [] [] |
649+ python | |
650+ radius | [] [] |
651+ recode | [] [] [] [] |
652+ rpm | [] [] [] |
653+ screem | |
654+ scrollkeeper | [] [] [] [] [] |
655+ sed | [] [] [] |
656+ sh-utils | [] [] |
657+ shared-mime-info | [] [] |
658+ sharutils | [] [] |
659+ silky | () |
660+ skencil | [] [] |
661+ sketch | [] [] |
662+ soundtracker | |
663+ sp | |
664+ tar | [] [] [] [] [] [] |
665+ texinfo | [] [] [] [] |
666+ textutils | [] [] |
667+ tin | |
668+ tp-robot | [] |
669+ tuxpaint | [] [] [] [] [] [] [] [] |
670+ unicode-han-tra... | |
671+ unicode-transla... | |
672+ util-linux | [] [] [] |
673+ vorbis-tools | [] [] [] |
674+ wastesedge | |
675+ wdiff | [] [] [] [] [] |
676+ wget | [] [] [] |
677+ xchat | [] [] [] |
678+ xfree86_xkb_xml | [] [] |
679+ xpad | [] [] |
680+ +-----------------------------------------------------+
681+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
682+ 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63
683+
684+ sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
685+ +-----------------------------------------------------+
686+ a2ps | [] [] [] [] | 16
687+ aegis | | 0
688+ ant-phone | | 3
689+ anubis | [] [] | 9
690+ ap-utils | () | 3
691+ aspell | | 4
692+ bash | | 9
693+ batchelor | | 3
694+ bfd | [] [] | 6
695+ binutils | [] [] [] | 8
696+ bison | [] [] | 14
697+ bluez-pin | [] [] [] | 14
698+ clisp | | 0
699+ clisp | | 5
700+ console-tools | | 3
701+ coreutils | [] [] [] [] | 16
702+ cpio | [] [] | 14
703+ darkstat | [] [] [] () () | 12
704+ diffutils | [] [] [] | 23
705+ e2fsprogs | [] [] | 6
706+ enscript | [] [] | 12
707+ error | [] [] [] | 15
708+ fetchmail | [] [] | 11
709+ fileutils | [] [] [] [] [] | 17
710+ findutils | [] [] [] [] [] [] | 29
711+ flex | [] [] | 13
712+ fslint | | 3
713+ gas | [] | 3
714+ gawk | [] [] | 12
715+ gbiff | | 4
716+ gcal | [] [] | 4
717+ gcc | [] | 4
718+ gettext | [] [] [] [] [] | 16
719+ gettext-examples | [] [] [] [] [] | 14
720+ gettext-runtime | [] [] [] [] [] [] [] [] | 22
721+ gettext-tools | [] [] [] [] [] [] | 14
722+ gimp-print | [] [] | 10
723+ gliv | | 3
724+ glunarclock | [] [] [] | 13
725+ gnubiff | | 3
726+ gnucash | [] [] | 9
727+ gnucash-glossary | [] [] [] | 8
728+ gnupg | [] [] [] [] | 17
729+ gpe-aerial | [] | 7
730+ gpe-beam | [] | 8
731+ gpe-calendar | [] [] [] [] | 13
732+ gpe-clock | [] [] [] | 10
733+ gpe-conf | [] [] | 9
734+ gpe-contacts | [] [] [] | 11
735+ gpe-edit | [] [] [] [] [] | 12
736+ gpe-go | | 5
737+ gpe-login | [] [] [] [] [] | 13
738+ gpe-ownerinfo | [] [] [] [] | 13
739+ gpe-sketchbook | [] [] | 9
740+ gpe-su | [] [] [] | 10
741+ gpe-taskmanager | [] [] [] | 10
742+ gpe-timesheet | [] [] [] [] | 12
743+ gpe-today | [] [] [] [] [] | 13
744+ gpe-todo | [] [] [] [] | 12
745+ gphoto2 | [] [] [] | 11
746+ gprof | [] [] | 9
747+ gpsdrive | [] [] | 3
748+ gramadoir | [] | 5
749+ grep | [] [] [] [] | 26
750+ gretl | | 3
751+ gtick | | 7
752+ hello | [] [] [] [] [] | 34
753+ id-utils | [] [] | 12
754+ indent | [] [] [] [] | 21
755+ iso_3166 | [] [] [] [] [] [] [] | 27
756+ iso_3166_1 | [] [] [] | 16
757+ iso_3166_2 | | 0
758+ iso_3166_3 | | 2
759+ iso_4217 | [] [] [] [] [] [] | 24
760+ iso_639 | | 1
761+ jpilot | [] [] [] [] [] | 9
762+ jtag | [] | 2
763+ jwhois | () [] [] | 11
764+ kbd | [] [] | 11
765+ latrine | | 2
766+ ld | [] [] | 5
767+ libc | [] [] [] [] | 20
768+ libgpewidget | [] [] [] [] | 13
769+ libiconv | [] [] [] [] [] [] [] [] | 27
770+ lifelines | [] | 2
771+ lilypond | [] | 3
772+ lingoteach | | 2
773+ lingoteach_lessons | () | 0
774+ lynx | [] [] [] | 14
775+ m4 | [] [] | 15
776+ mailutils | | 5
777+ make | [] [] [] | 16
778+ man-db | [] | 5
779+ minicom | | 11
780+ mysecretdiary | [] [] | 10
781+ nano | [] [] [] [] | 17
782+ nano_1_0 | [] [] [] | 17
783+ opcodes | [] [] | 6
784+ parted | [] [] [] | 15
785+ ptx | [] [] | 22
786+ python | | 0
787+ radius | | 4
788+ recode | [] [] [] | 20
789+ rpm | [] [] | 9
790+ screem | [] [] | 2
791+ scrollkeeper | [] [] [] | 15
792+ sed | [] [] [] [] [] [] | 24
793+ sh-utils | [] [] | 14
794+ shared-mime-info | [] [] | 7
795+ sharutils | [] [] [] [] | 17
796+ silky | () | 3
797+ skencil | [] | 6
798+ sketch | [] | 6
799+ soundtracker | [] [] | 7
800+ sp | [] | 3
801+ tar | [] [] [] [] [] | 24
802+ texinfo | [] [] [] | 14
803+ textutils | [] [] [] [] | 16
804+ tin | | 1
805+ tp-robot | | 2
806+ tuxpaint | [] [] [] [] [] | 29
807+ unicode-han-tra... | | 0
808+ unicode-transla... | | 2
809+ util-linux | [] [] | 15
810+ vorbis-tools | | 8
811+ wastesedge | | 0
812+ wdiff | [] [] [] | 18
813+ wget | [] [] [] [] [] [] [] [] | 24
814+ xchat | [] [] [] [] [] | 15
815+ xfree86_xkb_xml | [] [] [] [] [] | 11
816+ xpad | | 5
817+ +-----------------------------------------------------+
818+ 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
819+ 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373
820
821 Some counters in the preceding matrix are higher than the number of
822 visible blocks let us expect. This is because a few extra PO files are
823@@ -220,6 +742,27 @@
824 lag between the mere existence a PO file and its wide availability in a
825 distribution.
826
827- If August 1997 seems to be old, you may fetch a more recent copy of
828-this `ABOUT-NLS' file on most GNU archive sites.
829+ If January 2004 seems to be old, you may fetch a more recent copy of
830+this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
831+matrix with full percentage details can be found at
832+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
833+
834+Using `gettext' in new packages
835+===============================
836+
837+If you are writing a freely available program and want to
838+internationalize it you are welcome to use GNU `gettext' in your
839+package. Of course you have to respect the GNU Library General Public
840+License which covers the use of the GNU `gettext' library. This means
841+in particular that even non-free programs can use `libintl' as a shared
842+library, whereas only free software can use `libintl' as a static
843+library or use modified versions of `libintl'.
844+
845+ Once the sources are changed appropriately and the setup can handle
846+the use of `gettext' the only thing missing are the translations. The
847+Free Translation Project is also available for packages which are not
848+developed inside the GNU project. Therefore the information given above
849+applies also for every other Free Software Project. Contact
850+`translation@iro.umontreal.ca' to make the `.pot' files available to
851+the translation teams.
852
853--- lrzsz-0.12.20.safe/ChangeLog 1998-12-29 17:49:56.000000000 -0500
854+++ lrzsz-0.12.20/ChangeLog 2004-09-12 14:40:35.846521456 -0400
855@@ -1,3 +1,11 @@
856+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
857+
858+ * Makefile.am (ACLOCAL_AMFLAGS): New variable.
859+ (EXTRA_DIST): Add config.rpath.
860+ * configure.in (AC_OUTPUT): Add m4/Makefile.
861+ (AC_OUTPUT): Remove command that created po/Makefile.
862+ (AC_LINK_FILES): Remove invocation.
863+
864 1998-12-29 Uwe Ohse <uwe@ohse.de>
865
866 * src/lrz.c: removed stpcpy call.
867--- lrzsz-0.12.20.safe/config.rpath 1969-12-31 19:00:00.000000000 -0500
868+++ lrzsz-0.12.20/config.rpath 2004-09-12 14:40:34.329752040 -0400
869@@ -0,0 +1,548 @@
870+#! /bin/sh
871+# Output a system dependent set of variables, describing how to set the
872+# run time search path of shared libraries in an executable.
873+#
874+# Copyright 1996-2003 Free Software Foundation, Inc.
875+# Taken from GNU libtool, 2001
876+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
877+#
878+# This program is free software; you can redistribute it and/or modify
879+# it under the terms of the GNU General Public License as published by
880+# the Free Software Foundation; either version 2 of the License, or
881+# (at your option) any later version.
882+#
883+# This program is distributed in the hope that it will be useful, but
884+# WITHOUT ANY WARRANTY; without even the implied warranty of
885+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
886+# General Public License for more details.
887+#
888+# You should have received a copy of the GNU General Public License
889+# along with this program; if not, write to the Free Software
890+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
891+#
892+# As a special exception to the GNU General Public License, if you
893+# distribute this file as part of a program that contains a
894+# configuration script generated by Autoconf, you may include it under
895+# the same distribution terms that you use for the rest of that program.
896+#
897+# The first argument passed to this file is the canonical host specification,
898+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
899+# or
900+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
901+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
902+# should be set by the caller.
903+#
904+# The set of defined variables is at the end of this script.
905+
906+# Known limitations:
907+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
908+# than 256 bytes, otherwise the compiler driver will dump core. The only
909+# known workaround is to choose shorter directory names for the build
910+# directory and/or the installation directory.
911+
912+# All known linkers require a `.a' archive for static linking (except M$VC,
913+# which needs '.lib').
914+libext=a
915+shrext=.so
916+
917+host="$1"
918+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
919+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
920+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
921+
922+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
923+
924+wl=
925+if test "$GCC" = yes; then
926+ wl='-Wl,'
927+else
928+ case "$host_os" in
929+ aix*)
930+ wl='-Wl,'
931+ ;;
932+ mingw* | pw32* | os2*)
933+ ;;
934+ hpux9* | hpux10* | hpux11*)
935+ wl='-Wl,'
936+ ;;
937+ irix5* | irix6* | nonstopux*)
938+ wl='-Wl,'
939+ ;;
940+ newsos6)
941+ ;;
942+ linux*)
943+ case $CC in
944+ icc|ecc)
945+ wl='-Wl,'
946+ ;;
947+ ccc)
948+ wl='-Wl,'
949+ ;;
950+ esac
951+ ;;
952+ osf3* | osf4* | osf5*)
953+ wl='-Wl,'
954+ ;;
955+ sco3.2v5*)
956+ ;;
957+ solaris*)
958+ wl='-Wl,'
959+ ;;
960+ sunos4*)
961+ wl='-Qoption ld '
962+ ;;
963+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
964+ wl='-Wl,'
965+ ;;
966+ sysv4*MP*)
967+ ;;
968+ uts4*)
969+ ;;
970+ esac
971+fi
972+
973+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
974+
975+hardcode_libdir_flag_spec=
976+hardcode_libdir_separator=
977+hardcode_direct=no
978+hardcode_minus_L=no
979+
980+case "$host_os" in
981+ cygwin* | mingw* | pw32*)
982+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
983+ # When not using gcc, we currently assume that we are using
984+ # Microsoft Visual C++.
985+ if test "$GCC" != yes; then
986+ with_gnu_ld=no
987+ fi
988+ ;;
989+ openbsd*)
990+ with_gnu_ld=no
991+ ;;
992+esac
993+
994+ld_shlibs=yes
995+if test "$with_gnu_ld" = yes; then
996+ case "$host_os" in
997+ aix3* | aix4* | aix5*)
998+ # On AIX/PPC, the GNU linker is very broken
999+ if test "$host_cpu" != ia64; then
1000+ ld_shlibs=no
1001+ fi
1002+ ;;
1003+ amigaos*)
1004+ hardcode_libdir_flag_spec='-L$libdir'
1005+ hardcode_minus_L=yes
1006+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1007+ # that the semantics of dynamic libraries on AmigaOS, at least up
1008+ # to version 4, is to share data among multiple programs linked
1009+ # with the same dynamic library. Since this doesn't match the
1010+ # behavior of shared libraries on other platforms, we can use
1011+ # them.
1012+ ld_shlibs=no
1013+ ;;
1014+ beos*)
1015+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
1016+ :
1017+ else
1018+ ld_shlibs=no
1019+ fi
1020+ ;;
1021+ cygwin* | mingw* | pw32*)
1022+ # hardcode_libdir_flag_spec is actually meaningless, as there is
1023+ # no search path for DLLs.
1024+ hardcode_libdir_flag_spec='-L$libdir'
1025+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
1026+ :
1027+ else
1028+ ld_shlibs=no
1029+ fi
1030+ ;;
1031+ netbsd*)
1032+ ;;
1033+ solaris* | sysv5*)
1034+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
1035+ ld_shlibs=no
1036+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
1037+ :
1038+ else
1039+ ld_shlibs=no
1040+ fi
1041+ ;;
1042+ sunos4*)
1043+ hardcode_direct=yes
1044+ ;;
1045+ *)
1046+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
1047+ :
1048+ else
1049+ ld_shlibs=no
1050+ fi
1051+ ;;
1052+ esac
1053+ if test "$ld_shlibs" = yes; then
1054+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
1055+ # option of GNU ld is called -rpath, not --rpath.
1056+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1057+ fi
1058+else
1059+ case "$host_os" in
1060+ aix3*)
1061+ # Note: this linker hardcodes the directories in LIBPATH if there
1062+ # are no directories specified by -L.
1063+ hardcode_minus_L=yes
1064+ if test "$GCC" = yes; then
1065+ # Neither direct hardcoding nor static linking is supported with a
1066+ # broken collect2.
1067+ hardcode_direct=unsupported
1068+ fi
1069+ ;;
1070+ aix4* | aix5*)
1071+ if test "$host_cpu" = ia64; then
1072+ # On IA64, the linker does run time linking by default, so we don't
1073+ # have to do anything special.
1074+ aix_use_runtimelinking=no
1075+ else
1076+ aix_use_runtimelinking=no
1077+ # Test if we are trying to use run time linking or normal
1078+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1079+ # need to do runtime linking.
1080+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
1081+ for ld_flag in $LDFLAGS; do
1082+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
1083+ aix_use_runtimelinking=yes
1084+ break
1085+ fi
1086+ done
1087+ esac
1088+ fi
1089+ hardcode_direct=yes
1090+ hardcode_libdir_separator=':'
1091+ if test "$GCC" = yes; then
1092+ case $host_os in aix4.[012]|aix4.[012].*)
1093+ collect2name=`${CC} -print-prog-name=collect2`
1094+ if test -f "$collect2name" && \
1095+ strings "$collect2name" | grep resolve_lib_name >/dev/null
1096+ then
1097+ # We have reworked collect2
1098+ hardcode_direct=yes
1099+ else
1100+ # We have old collect2
1101+ hardcode_direct=unsupported
1102+ hardcode_minus_L=yes
1103+ hardcode_libdir_flag_spec='-L$libdir'
1104+ hardcode_libdir_separator=
1105+ fi
1106+ esac
1107+ fi
1108+ # Begin _LT_AC_SYS_LIBPATH_AIX.
1109+ echo 'int main () { return 0; }' > conftest.c
1110+ ${CC} ${LDFLAGS} conftest.c -o conftest
1111+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1112+}'`
1113+ if test -z "$aix_libpath"; then
1114+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1115+}'`
1116+ fi
1117+ if test -z "$aix_libpath"; then
1118+ aix_libpath="/usr/lib:/lib"
1119+ fi
1120+ rm -f conftest.c conftest
1121+ # End _LT_AC_SYS_LIBPATH_AIX.
1122+ if test "$aix_use_runtimelinking" = yes; then
1123+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
1124+ else
1125+ if test "$host_cpu" = ia64; then
1126+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1127+ else
1128+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
1129+ fi
1130+ fi
1131+ ;;
1132+ amigaos*)
1133+ hardcode_libdir_flag_spec='-L$libdir'
1134+ hardcode_minus_L=yes
1135+ # see comment about different semantics on the GNU ld section
1136+ ld_shlibs=no
1137+ ;;
1138+ bsdi4*)
1139+ ;;
1140+ cygwin* | mingw* | pw32*)
1141+ # When not using gcc, we currently assume that we are using
1142+ # Microsoft Visual C++.
1143+ # hardcode_libdir_flag_spec is actually meaningless, as there is
1144+ # no search path for DLLs.
1145+ hardcode_libdir_flag_spec=' '
1146+ libext=lib
1147+ ;;
1148+ darwin* | rhapsody*)
1149+ if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
1150+ hardcode_direct=no
1151+ fi
1152+ ;;
1153+ dgux*)
1154+ hardcode_libdir_flag_spec='-L$libdir'
1155+ ;;
1156+ freebsd1*)
1157+ ld_shlibs=no
1158+ ;;
1159+ freebsd2.2*)
1160+ hardcode_libdir_flag_spec='-R$libdir'
1161+ hardcode_direct=yes
1162+ ;;
1163+ freebsd2*)
1164+ hardcode_direct=yes
1165+ hardcode_minus_L=yes
1166+ ;;
1167+ freebsd*)
1168+ hardcode_libdir_flag_spec='-R$libdir'
1169+ hardcode_direct=yes
1170+ ;;
1171+ hpux9*)
1172+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1173+ hardcode_libdir_separator=:
1174+ hardcode_direct=yes
1175+ # hardcode_minus_L: Not really in the search PATH,
1176+ # but as the default location of the library.
1177+ hardcode_minus_L=yes
1178+ ;;
1179+ hpux10* | hpux11*)
1180+ if test "$with_gnu_ld" = no; then
1181+ case "$host_cpu" in
1182+ hppa*64*)
1183+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1184+ hardcode_libdir_separator=:
1185+ hardcode_direct=no
1186+ ;;
1187+ ia64*)
1188+ hardcode_libdir_flag_spec='-L$libdir'
1189+ hardcode_direct=no
1190+ # hardcode_minus_L: Not really in the search PATH,
1191+ # but as the default location of the library.
1192+ hardcode_minus_L=yes
1193+ ;;
1194+ *)
1195+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1196+ hardcode_libdir_separator=:
1197+ hardcode_direct=yes
1198+ # hardcode_minus_L: Not really in the search PATH,
1199+ # but as the default location of the library.
1200+ hardcode_minus_L=yes
1201+ ;;
1202+ esac
1203+ fi
1204+ ;;
1205+ irix5* | irix6* | nonstopux*)
1206+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1207+ hardcode_libdir_separator=:
1208+ ;;
1209+ netbsd*)
1210+ hardcode_libdir_flag_spec='-R$libdir'
1211+ hardcode_direct=yes
1212+ ;;
1213+ newsos6)
1214+ hardcode_direct=yes
1215+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1216+ hardcode_libdir_separator=:
1217+ ;;
1218+ openbsd*)
1219+ hardcode_direct=yes
1220+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1221+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1222+ else
1223+ case "$host_os" in
1224+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
1225+ hardcode_libdir_flag_spec='-R$libdir'
1226+ ;;
1227+ *)
1228+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1229+ ;;
1230+ esac
1231+ fi
1232+ ;;
1233+ os2*)
1234+ hardcode_libdir_flag_spec='-L$libdir'
1235+ hardcode_minus_L=yes
1236+ ;;
1237+ osf3*)
1238+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1239+ hardcode_libdir_separator=:
1240+ ;;
1241+ osf4* | osf5*)
1242+ if test "$GCC" = yes; then
1243+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1244+ else
1245+ # Both cc and cxx compiler support -rpath directly
1246+ hardcode_libdir_flag_spec='-rpath $libdir'
1247+ fi
1248+ hardcode_libdir_separator=:
1249+ ;;
1250+ sco3.2v5*)
1251+ ;;
1252+ solaris*)
1253+ hardcode_libdir_flag_spec='-R$libdir'
1254+ ;;
1255+ sunos4*)
1256+ hardcode_libdir_flag_spec='-L$libdir'
1257+ hardcode_direct=yes
1258+ hardcode_minus_L=yes
1259+ ;;
1260+ sysv4)
1261+ case $host_vendor in
1262+ sni)
1263+ hardcode_direct=yes # is this really true???
1264+ ;;
1265+ siemens)
1266+ hardcode_direct=no
1267+ ;;
1268+ motorola)
1269+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1270+ ;;
1271+ esac
1272+ ;;
1273+ sysv4.3*)
1274+ ;;
1275+ sysv4*MP*)
1276+ if test -d /usr/nec; then
1277+ ld_shlibs=yes
1278+ fi
1279+ ;;
1280+ sysv4.2uw2*)
1281+ hardcode_direct=yes
1282+ hardcode_minus_L=no
1283+ ;;
1284+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
1285+ ;;
1286+ sysv5*)
1287+ hardcode_libdir_flag_spec=
1288+ ;;
1289+ uts4*)
1290+ hardcode_libdir_flag_spec='-L$libdir'
1291+ ;;
1292+ *)
1293+ ld_shlibs=no
1294+ ;;
1295+ esac
1296+fi
1297+
1298+# Check dynamic linker characteristics
1299+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
1300+libname_spec='lib$name'
1301+case "$host_os" in
1302+ aix3*)
1303+ ;;
1304+ aix4* | aix5*)
1305+ ;;
1306+ amigaos*)
1307+ ;;
1308+ beos*)
1309+ ;;
1310+ bsdi4*)
1311+ ;;
1312+ cygwin* | mingw* | pw32*)
1313+ shrext=.dll
1314+ ;;
1315+ darwin* | rhapsody*)
1316+ shrext=.dylib
1317+ ;;
1318+ dgux*)
1319+ ;;
1320+ freebsd1*)
1321+ ;;
1322+ freebsd*)
1323+ ;;
1324+ gnu*)
1325+ ;;
1326+ hpux9* | hpux10* | hpux11*)
1327+ case "$host_cpu" in
1328+ ia64*)
1329+ shrext=.so
1330+ ;;
1331+ hppa*64*)
1332+ shrext=.sl
1333+ ;;
1334+ *)
1335+ shrext=.sl
1336+ ;;
1337+ esac
1338+ ;;
1339+ irix5* | irix6* | nonstopux*)
1340+ case "$host_os" in
1341+ irix5* | nonstopux*)
1342+ libsuff= shlibsuff=
1343+ ;;
1344+ *)
1345+ case $LD in
1346+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
1347+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
1348+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
1349+ *) libsuff= shlibsuff= ;;
1350+ esac
1351+ ;;
1352+ esac
1353+ ;;
1354+ linux*oldld* | linux*aout* | linux*coff*)
1355+ ;;
1356+ linux*)
1357+ ;;
1358+ netbsd*)
1359+ ;;
1360+ newsos6)
1361+ ;;
1362+ nto-qnx)
1363+ ;;
1364+ openbsd*)
1365+ ;;
1366+ os2*)
1367+ libname_spec='$name'
1368+ shrext=.dll
1369+ ;;
1370+ osf3* | osf4* | osf5*)
1371+ ;;
1372+ sco3.2v5*)
1373+ ;;
1374+ solaris*)
1375+ ;;
1376+ sunos4*)
1377+ ;;
1378+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1379+ ;;
1380+ sysv4*MP*)
1381+ ;;
1382+ uts4*)
1383+ ;;
1384+esac
1385+
1386+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
1387+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
1388+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
1389+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
1390+
1391+sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
1392+
1393+# How to pass a linker flag through the compiler.
1394+wl="$escaped_wl"
1395+
1396+# Static library suffix (normally "a").
1397+libext="$libext"
1398+
1399+# Shared library suffix (normally "so").
1400+shlibext="$shlibext"
1401+
1402+# Flag to hardcode \$libdir into a binary during linking.
1403+# This must work even if \$libdir does not exist.
1404+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
1405+
1406+# Whether we need a single -rpath flag with a separated argument.
1407+hardcode_libdir_separator="$hardcode_libdir_separator"
1408+
1409+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
1410+# resulting binary.
1411+hardcode_direct="$hardcode_direct"
1412+
1413+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
1414+# resulting binary.
1415+hardcode_minus_L="$hardcode_minus_L"
1416+
1417+EOF
1418--- lrzsz-0.12.20.safe/configure.in 2004-09-12 14:39:55.161706488 -0400
1419+++ lrzsz-0.12.20/configure.in 2004-09-12 14:40:35.816526016 -0400
1420@@ -260,11 +260,10 @@
1421 AM_GNU_GETTEXT
1422
1423 AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME")
1424-AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
1425
1426-AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile \
1427+AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile m4/Makefile \
1428 man/Makefile po/Makefile.in src/Makefile debian/rules Specfile systype \
1429 src/lrzszbug],
1430-[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile;
1431+[
1432 chmod +x debian/rules;
1433 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
1434--- lrzsz-0.12.20.safe/intl/bindtextdom.c 1998-04-26 09:22:36.000000000 -0400
1435+++ lrzsz-0.12.20/intl/bindtextdom.c 2004-09-12 14:40:34.343749912 -0400
1436@@ -1,59 +1,75 @@
1437 /* Implementation of the bindtextdomain(3) function
1438- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
1439+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
1440
1441- This program is free software; you can redistribute it and/or modify
1442- it under the terms of the GNU General Public License as published by
1443- the Free Software Foundation; either version 2, or (at your option)
1444+ This program is free software; you can redistribute it and/or modify it
1445+ under the terms of the GNU Library General Public License as published
1446+ by the Free Software Foundation; either version 2, or (at your option)
1447 any later version.
1448
1449 This program is distributed in the hope that it will be useful,
1450 but WITHOUT ANY WARRANTY; without even the implied warranty of
1451- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1452- GNU General Public License for more details.
1453+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1454+ Library General Public License for more details.
1455
1456- You should have received a copy of the GNU General Public License
1457- along with this program; if not, write to the Free Software Foundation,
1458- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1459+ You should have received a copy of the GNU Library General Public
1460+ License along with this program; if not, write to the Free Software
1461+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1462+ USA. */
1463
1464 #ifdef HAVE_CONFIG_H
1465 # include <config.h>
1466 #endif
1467
1468-#if defined STDC_HEADERS || defined _LIBC
1469-# include <stdlib.h>
1470-#else
1471-# ifdef HAVE_MALLOC_H
1472-# include <malloc.h>
1473-# else
1474-void free ();
1475-# endif
1476-#endif
1477+#include <stddef.h>
1478+#include <stdlib.h>
1479+#include <string.h>
1480
1481-#if defined HAVE_STRING_H || defined _LIBC
1482-# include <string.h>
1483+#ifdef _LIBC
1484+# include <libintl.h>
1485 #else
1486-# include <strings.h>
1487-# ifndef memcpy
1488-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
1489-# endif
1490+# include "libgnuintl.h"
1491 #endif
1492+#include "gettextP.h"
1493
1494 #ifdef _LIBC
1495-# include <libintl.h>
1496+/* We have to handle multi-threaded applications. */
1497+# include <bits/libc-lock.h>
1498 #else
1499-# include "libgettext.h"
1500+/* Provide dummy implementation if this is outside glibc. */
1501+# define __libc_rwlock_define(CLASS, NAME)
1502+# define __libc_rwlock_wrlock(NAME)
1503+# define __libc_rwlock_unlock(NAME)
1504+#endif
1505+
1506+/* The internal variables in the standalone libintl.a must have different
1507+ names than the internal variables in GNU libc, otherwise programs
1508+ using libintl.a cannot be linked statically. */
1509+#if !defined _LIBC
1510+# define _nl_default_dirname libintl_nl_default_dirname
1511+# define _nl_domain_bindings libintl_nl_domain_bindings
1512+#endif
1513+
1514+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
1515+#ifndef offsetof
1516+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
1517 #endif
1518-#include "gettext.h"
1519-#include "gettextP.h"
1520
1521 /* @@ end of prolog @@ */
1522
1523 /* Contains the default location of the message catalogs. */
1524 extern const char _nl_default_dirname[];
1525+#ifdef _LIBC
1526+extern const char _nl_default_dirname_internal[] attribute_hidden;
1527+#else
1528+# define INTUSE(name) name
1529+#endif
1530
1531 /* List with bindings of specific domains. */
1532 extern struct binding *_nl_domain_bindings;
1533
1534+/* Lock variable to protect the global data in the gettext implementation. */
1535+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
1536+
1537
1538 /* Names for the libintl functions are a problem. They must not clash
1539 with existing names and they should follow ANSI C. But this source
1540@@ -61,23 +77,41 @@
1541 prefix. So we have to make a difference here. */
1542 #ifdef _LIBC
1543 # define BINDTEXTDOMAIN __bindtextdomain
1544-# define strdup(str) __strdup (str)
1545+# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
1546+# ifndef strdup
1547+# define strdup(str) __strdup (str)
1548+# endif
1549 #else
1550-# define BINDTEXTDOMAIN bindtextdomain__
1551+# define BINDTEXTDOMAIN libintl_bindtextdomain
1552+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
1553 #endif
1554
1555-/* Specify that the DOMAINNAME message catalog will be found
1556- in DIRNAME rather than in the system locale data base. */
1557-char *
1558-BINDTEXTDOMAIN (domainname, dirname)
1559- const char *domainname;
1560- const char *dirname;
1561+/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
1562+ to be used for the DOMAINNAME message catalog.
1563+ If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
1564+ modified, only the current value is returned.
1565+ If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
1566+ modified nor returned. */
1567+static void
1568+set_binding_values (const char *domainname,
1569+ const char **dirnamep, const char **codesetp)
1570 {
1571 struct binding *binding;
1572+ int modified;
1573
1574 /* Some sanity checks. */
1575 if (domainname == NULL || domainname[0] == '\0')
1576- return NULL;
1577+ {
1578+ if (dirnamep)
1579+ *dirnamep = NULL;
1580+ if (codesetp)
1581+ *codesetp = NULL;
1582+ return;
1583+ }
1584+
1585+ __libc_rwlock_wrlock (_nl_state_lock);
1586+
1587+ modified = 0;
1588
1589 for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
1590 {
1591@@ -93,81 +127,173 @@
1592 }
1593 }
1594
1595- if (dirname == NULL)
1596- /* The current binding has be to returned. */
1597- return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
1598-
1599 if (binding != NULL)
1600 {
1601- /* The domain is already bound. If the new value and the old
1602- one are equal we simply do nothing. Otherwise replace the
1603- old binding. */
1604- if (strcmp (dirname, binding->dirname) != 0)
1605+ if (dirnamep)
1606 {
1607- char *new_dirname;
1608+ const char *dirname = *dirnamep;
1609
1610- if (strcmp (dirname, _nl_default_dirname) == 0)
1611- new_dirname = (char *) _nl_default_dirname;
1612+ if (dirname == NULL)
1613+ /* The current binding has be to returned. */
1614+ *dirnamep = binding->dirname;
1615 else
1616 {
1617+ /* The domain is already bound. If the new value and the old
1618+ one are equal we simply do nothing. Otherwise replace the
1619+ old binding. */
1620+ char *result = binding->dirname;
1621+ if (strcmp (dirname, result) != 0)
1622+ {
1623+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
1624+ result = (char *) INTUSE(_nl_default_dirname);
1625+ else
1626+ {
1627 #if defined _LIBC || defined HAVE_STRDUP
1628- new_dirname = strdup (dirname);
1629- if (new_dirname == NULL)
1630- return NULL;
1631+ result = strdup (dirname);
1632 #else
1633- size_t len = strlen (dirname) + 1;
1634- new_dirname = (char *) malloc (len);
1635- if (new_dirname == NULL)
1636- return NULL;
1637-
1638- memcpy (new_dirname, dirname, len);
1639+ size_t len = strlen (dirname) + 1;
1640+ result = (char *) malloc (len);
1641+ if (__builtin_expect (result != NULL, 1))
1642+ memcpy (result, dirname, len);
1643 #endif
1644+ }
1645+
1646+ if (__builtin_expect (result != NULL, 1))
1647+ {
1648+ if (binding->dirname != INTUSE(_nl_default_dirname))
1649+ free (binding->dirname);
1650+
1651+ binding->dirname = result;
1652+ modified = 1;
1653+ }
1654+ }
1655+ *dirnamep = result;
1656 }
1657+ }
1658
1659- if (binding->dirname != _nl_default_dirname)
1660- free (binding->dirname);
1661+ if (codesetp)
1662+ {
1663+ const char *codeset = *codesetp;
1664
1665- binding->dirname = new_dirname;
1666+ if (codeset == NULL)
1667+ /* The current binding has be to returned. */
1668+ *codesetp = binding->codeset;
1669+ else
1670+ {
1671+ /* The domain is already bound. If the new value and the old
1672+ one are equal we simply do nothing. Otherwise replace the
1673+ old binding. */
1674+ char *result = binding->codeset;
1675+ if (result == NULL || strcmp (codeset, result) != 0)
1676+ {
1677+#if defined _LIBC || defined HAVE_STRDUP
1678+ result = strdup (codeset);
1679+#else
1680+ size_t len = strlen (codeset) + 1;
1681+ result = (char *) malloc (len);
1682+ if (__builtin_expect (result != NULL, 1))
1683+ memcpy (result, codeset, len);
1684+#endif
1685+
1686+ if (__builtin_expect (result != NULL, 1))
1687+ {
1688+ if (binding->codeset != NULL)
1689+ free (binding->codeset);
1690+
1691+ binding->codeset = result;
1692+ binding->codeset_cntr++;
1693+ modified = 1;
1694+ }
1695+ }
1696+ *codesetp = result;
1697+ }
1698 }
1699 }
1700+ else if ((dirnamep == NULL || *dirnamep == NULL)
1701+ && (codesetp == NULL || *codesetp == NULL))
1702+ {
1703+ /* Simply return the default values. */
1704+ if (dirnamep)
1705+ *dirnamep = INTUSE(_nl_default_dirname);
1706+ if (codesetp)
1707+ *codesetp = NULL;
1708+ }
1709 else
1710 {
1711 /* We have to create a new binding. */
1712- size_t len;
1713+ size_t len = strlen (domainname) + 1;
1714 struct binding *new_binding =
1715- (struct binding *) malloc (sizeof (*new_binding));
1716+ (struct binding *) malloc (offsetof (struct binding, domainname) + len);
1717
1718- if (new_binding == NULL)
1719- return NULL;
1720+ if (__builtin_expect (new_binding == NULL, 0))
1721+ goto failed;
1722
1723+ memcpy (new_binding->domainname, domainname, len);
1724+
1725+ if (dirnamep)
1726+ {
1727+ const char *dirname = *dirnamep;
1728+
1729+ if (dirname == NULL)
1730+ /* The default value. */
1731+ dirname = INTUSE(_nl_default_dirname);
1732+ else
1733+ {
1734+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
1735+ dirname = INTUSE(_nl_default_dirname);
1736+ else
1737+ {
1738+ char *result;
1739 #if defined _LIBC || defined HAVE_STRDUP
1740- new_binding->domainname = strdup (domainname);
1741- if (new_binding->domainname == NULL)
1742- return NULL;
1743+ result = strdup (dirname);
1744+ if (__builtin_expect (result == NULL, 0))
1745+ goto failed_dirname;
1746 #else
1747- len = strlen (domainname) + 1;
1748- new_binding->domainname = (char *) malloc (len);
1749- if (new_binding->domainname == NULL)
1750- return NULL;
1751- memcpy (new_binding->domainname, domainname, len);
1752+ size_t len = strlen (dirname) + 1;
1753+ result = (char *) malloc (len);
1754+ if (__builtin_expect (result == NULL, 0))
1755+ goto failed_dirname;
1756+ memcpy (result, dirname, len);
1757 #endif
1758-
1759- if (strcmp (dirname, _nl_default_dirname) == 0)
1760- new_binding->dirname = (char *) _nl_default_dirname;
1761+ dirname = result;
1762+ }
1763+ }
1764+ *dirnamep = dirname;
1765+ new_binding->dirname = (char *) dirname;
1766+ }
1767 else
1768+ /* The default value. */
1769+ new_binding->dirname = (char *) INTUSE(_nl_default_dirname);
1770+
1771+ new_binding->codeset_cntr = 0;
1772+
1773+ if (codesetp)
1774 {
1775+ const char *codeset = *codesetp;
1776+
1777+ if (codeset != NULL)
1778+ {
1779+ char *result;
1780+
1781 #if defined _LIBC || defined HAVE_STRDUP
1782- new_binding->dirname = strdup (dirname);
1783- if (new_binding->dirname == NULL)
1784- return NULL;
1785+ result = strdup (codeset);
1786+ if (__builtin_expect (result == NULL, 0))
1787+ goto failed_codeset;
1788 #else
1789- len = strlen (dirname) + 1;
1790- new_binding->dirname = (char *) malloc (len);
1791- if (new_binding->dirname == NULL)
1792- return NULL;
1793- memcpy (new_binding->dirname, dirname, len);
1794+ size_t len = strlen (codeset) + 1;
1795+ result = (char *) malloc (len);
1796+ if (__builtin_expect (result == NULL, 0))
1797+ goto failed_codeset;
1798+ memcpy (result, codeset, len);
1799 #endif
1800+ codeset = result;
1801+ new_binding->codeset_cntr++;
1802+ }
1803+ *codesetp = codeset;
1804+ new_binding->codeset = (char *) codeset;
1805 }
1806+ else
1807+ new_binding->codeset = NULL;
1808
1809 /* Now enqueue it. */
1810 if (_nl_domain_bindings == NULL
1811@@ -187,13 +313,51 @@
1812 binding->next = new_binding;
1813 }
1814
1815- binding = new_binding;
1816+ modified = 1;
1817+
1818+ /* Here we deal with memory allocation failures. */
1819+ if (0)
1820+ {
1821+ failed_codeset:
1822+ if (new_binding->dirname != INTUSE(_nl_default_dirname))
1823+ free (new_binding->dirname);
1824+ failed_dirname:
1825+ free (new_binding);
1826+ failed:
1827+ if (dirnamep)
1828+ *dirnamep = NULL;
1829+ if (codesetp)
1830+ *codesetp = NULL;
1831+ }
1832 }
1833
1834- return binding->dirname;
1835+ /* If we modified any binding, we flush the caches. */
1836+ if (modified)
1837+ ++_nl_msg_cat_cntr;
1838+
1839+ __libc_rwlock_unlock (_nl_state_lock);
1840+}
1841+
1842+/* Specify that the DOMAINNAME message catalog will be found
1843+ in DIRNAME rather than in the system locale data base. */
1844+char *
1845+BINDTEXTDOMAIN (const char *domainname, const char *dirname)
1846+{
1847+ set_binding_values (domainname, &dirname, NULL);
1848+ return (char *) dirname;
1849+}
1850+
1851+/* Specify the character encoding in which the messages from the
1852+ DOMAINNAME message catalog will be returned. */
1853+char *
1854+BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset)
1855+{
1856+ set_binding_values (domainname, NULL, &codeset);
1857+ return (char *) codeset;
1858 }
1859
1860 #ifdef _LIBC
1861-/* Alias for function name in GNU C Library. */
1862+/* Aliases for function names in GNU C Library. */
1863 weak_alias (__bindtextdomain, bindtextdomain);
1864+weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
1865 #endif
1866--- lrzsz-0.12.20.safe/intl/cat-compat.c 1998-04-26 09:22:37.000000000 -0400
1867+++ lrzsz-0.12.20/intl/cat-compat.c 1969-12-31 19:00:00.000000000 -0500
1868@@ -1,262 +0,0 @@
1869-/* Compatibility code for gettext-using-catgets interface.
1870- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
1871-
1872- This program is free software; you can redistribute it and/or modify
1873- it under the terms of the GNU General Public License as published by
1874- the Free Software Foundation; either version 2, or (at your option)
1875- any later version.
1876-
1877- This program is distributed in the hope that it will be useful,
1878- but WITHOUT ANY WARRANTY; without even the implied warranty of
1879- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1880- GNU General Public License for more details.
1881-
1882- You should have received a copy of the GNU General Public License
1883- along with this program; if not, write to the Free Software Foundation,
1884- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1885-
1886-#ifdef HAVE_CONFIG_H
1887-# include <config.h>
1888-#endif
1889-
1890-#include <stdio.h>
1891-
1892-#ifdef STDC_HEADERS
1893-# include <stdlib.h>
1894-# include <string.h>
1895-#else
1896-char *getenv ();
1897-# ifdef HAVE_MALLOC_H
1898-# include <malloc.h>
1899-# endif
1900-#endif
1901-
1902-#ifdef HAVE_NL_TYPES_H
1903-# include <nl_types.h>
1904-#endif
1905-
1906-#include "libgettext.h"
1907-
1908-/* @@ end of prolog @@ */
1909-
1910-/* XPG3 defines the result of `setlocale (category, NULL)' as:
1911- ``Directs `setlocale()' to query `category' and return the current
1912- setting of `local'.''
1913- However it does not specify the exact format. And even worse: POSIX
1914- defines this not at all. So we can use this feature only on selected
1915- system (e.g. those using GNU C Library). */
1916-#ifdef _LIBC
1917-# define HAVE_LOCALE_NULL
1918-#endif
1919-
1920-/* The catalog descriptor. */
1921-static nl_catd catalog = (nl_catd) -1;
1922-
1923-/* Name of the default catalog. */
1924-static const char default_catalog_name[] = "messages";
1925-
1926-/* Name of currently used catalog. */
1927-static const char *catalog_name = default_catalog_name;
1928-
1929-/* Get ID for given string. If not found return -1. */
1930-static int msg_to_cat_id PARAMS ((const char *msg));
1931-
1932-/* Substitution for systems lacking this function in their C library. */
1933-#if !_LIBC && !HAVE_STPCPY
1934-static char *stpcpy PARAMS ((char *dest, const char *src));
1935-#endif
1936-
1937-
1938-/* Set currently used domain/catalog. */
1939-char *
1940-textdomain (domainname)
1941- const char *domainname;
1942-{
1943- nl_catd new_catalog;
1944- char *new_name;
1945- size_t new_name_len;
1946- char *lang;
1947-
1948-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
1949- && defined HAVE_LOCALE_NULL
1950- lang = setlocale (LC_MESSAGES, NULL);
1951-#else
1952- lang = getenv ("LC_ALL");
1953- if (lang == NULL || lang[0] == '\0')
1954- {
1955- lang = getenv ("LC_MESSAGES");
1956- if (lang == NULL || lang[0] == '\0')
1957- lang = getenv ("LANG");
1958- }
1959-#endif
1960- if (lang == NULL || lang[0] == '\0')
1961- lang = "C";
1962-
1963- /* See whether name of currently used domain is asked. */
1964- if (domainname == NULL)
1965- return (char *) catalog_name;
1966-
1967- if (domainname[0] == '\0')
1968- domainname = default_catalog_name;
1969-
1970- /* Compute length of added path element. */
1971- new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
1972- + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
1973- + sizeof (".cat");
1974-
1975- new_name = (char *) malloc (new_name_len);
1976- if (new_name == NULL)
1977- return NULL;
1978-
1979- strcpy (new_name, PACKAGE);
1980- new_catalog = catopen (new_name, 0);
1981-
1982- if (new_catalog == (nl_catd) -1)
1983- {
1984- /* NLSPATH search didn't work, try absolute path */
1985- sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
1986- PACKAGE);
1987- new_catalog = catopen (new_name, 0);
1988-
1989- if (new_catalog == (nl_catd) -1)
1990- {
1991- free (new_name);
1992- return (char *) catalog_name;
1993- }
1994- }
1995-
1996- /* Close old catalog. */
1997- if (catalog != (nl_catd) -1)
1998- catclose (catalog);
1999- if (catalog_name != default_catalog_name)
2000- free ((char *) catalog_name);
2001-
2002- catalog = new_catalog;
2003- catalog_name = new_name;
2004-
2005- return (char *) catalog_name;
2006-}
2007-
2008-char *
2009-bindtextdomain (domainname, dirname)
2010- const char *domainname;
2011- const char *dirname;
2012-{
2013-#if HAVE_SETENV || HAVE_PUTENV
2014- char *old_val, *new_val, *cp;
2015- size_t new_val_len;
2016-
2017- /* This does not make much sense here but to be compatible do it. */
2018- if (domainname == NULL)
2019- return NULL;
2020-
2021- /* Compute length of added path element. If we use setenv we don't need
2022- the first byts for NLSPATH=, but why complicate the code for this
2023- peanuts. */
2024- new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
2025- + sizeof ("/%L/LC_MESSAGES/%N.cat");
2026-
2027- old_val = getenv ("NLSPATH");
2028- if (old_val == NULL || old_val[0] == '\0')
2029- {
2030- old_val = NULL;
2031- new_val_len += 1 + sizeof (LOCALEDIR) - 1
2032- + sizeof ("/%L/LC_MESSAGES/%N.cat");
2033- }
2034- else
2035- new_val_len += strlen (old_val);
2036-
2037- new_val = (char *) malloc (new_val_len);
2038- if (new_val == NULL)
2039- return NULL;
2040-
2041-# if HAVE_SETENV
2042- cp = new_val;
2043-# else
2044- cp = stpcpy (new_val, "NLSPATH=");
2045-# endif
2046-
2047- cp = stpcpy (cp, dirname);
2048- cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
2049-
2050- if (old_val == NULL)
2051- {
2052-# if __STDC__
2053- stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
2054-# else
2055-
2056- cp = stpcpy (cp, LOCALEDIR);
2057- stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
2058-# endif
2059- }
2060- else
2061- stpcpy (cp, old_val);
2062-
2063-# if HAVE_SETENV
2064- setenv ("NLSPATH", new_val, 1);
2065- free (new_val);
2066-# else
2067- putenv (new_val);
2068- /* Do *not* free the environment entry we just entered. It is used
2069- from now on. */
2070-# endif
2071-
2072-#endif
2073-
2074- return (char *) domainname;
2075-}
2076-
2077-#undef gettext
2078-char *
2079-gettext (msg)
2080- const char *msg;
2081-{
2082- int msgid;
2083-
2084- if (msg == NULL || catalog == (nl_catd) -1)
2085- return (char *) msg;
2086-
2087- /* Get the message from the catalog. We always use set number 1.
2088- The message ID is computed by the function `msg_to_cat_id'
2089- which works on the table generated by `po-to-tbl'. */
2090- msgid = msg_to_cat_id (msg);
2091- if (msgid == -1)
2092- return (char *) msg;
2093-
2094- return catgets (catalog, 1, msgid, (char *) msg);
2095-}
2096-
2097-/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
2098- for the one equal to msg. If it is found return the ID. In case when
2099- the string is not found return -1. */
2100-static int
2101-msg_to_cat_id (msg)
2102- const char *msg;
2103-{
2104- int cnt;
2105-
2106- for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
2107- if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
2108- return _msg_tbl[cnt]._msg_number;
2109-
2110- return -1;
2111-}
2112-
2113-
2114-/* @@ begin of epilog @@ */
2115-
2116-/* We don't want libintl.a to depend on any other library. So we
2117- avoid the non-standard function stpcpy. In GNU C Library this
2118- function is available, though. Also allow the symbol HAVE_STPCPY
2119- to be defined. */
2120-#if !_LIBC && !HAVE_STPCPY
2121-static char *
2122-stpcpy (dest, src)
2123- char *dest;
2124- const char *src;
2125-{
2126- while ((*dest++ = *src++) != '\0')
2127- /* Do nothing. */ ;
2128- return dest - 1;
2129-}
2130-#endif
2131--- lrzsz-0.12.20.safe/intl/ChangeLog 1998-04-26 09:22:35.000000000 -0400
2132+++ lrzsz-0.12.20/intl/ChangeLog 2004-09-12 14:40:34.349749000 -0400
2133@@ -1,1022 +1,4 @@
2134-1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com>
2135-
2136- * intlh.inst.in: Reformat copyright.
2137-
2138-1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com>
2139-
2140- * dcgettext.c (DCGETTEXT): Remove wrong comment.
2141-
2142-1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com>
2143-
2144- * Makefile.in (install-data): Don't change directory to install.
2145-
2146-1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com>
2147-
2148- * cat-compat.c: Fix copyright.
2149-
2150- * localealias.c: Don't define strchr unless !HAVE_STRCHR.
2151-
2152- * loadmsgcat.c: Update copyright. Fix typos.
2153-
2154- * l10nflist.c: Don't define strchr unless !HAVE_STRCHR.
2155- (_nl_make_l10nflist): Handle sponsor and revision correctly.
2156-
2157- * gettext.c: Update copyright.
2158- * gettext.h: Likewise.
2159- * hash-string.h: Likewise.
2160-
2161- * finddomain.c: Remoave dead code. Define strchr only if
2162- !HAVE_STRCHR.
2163-
2164- * explodename.c: Include <sys/types.h>.
2165-
2166- * explodename.c: Reformat copyright text.
2167- (_nl_explode_name): Fix typo.
2168-
2169- * dcgettext.c: Define and use __set_errno.
2170- (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is
2171- not defined.
2172-
2173- * bindtextdom.c: Pretty printing.
2174-
2175-1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com>
2176-
2177- * dcgettext.c (guess_category_value): Don't depend on
2178- HAVE_LC_MESSAGES. We don't need the macro here.
2179- Patch by Bruno Haible <haible@ilog.fr>.
2180-
2181- * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL
2182- macro. Instead use HAVE_LOCALE_NULL and define it when using
2183- glibc, as in dcgettext.c.
2184- Patch by Bruno Haible <haible@ilog.fr>.
2185-
2186- * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois
2187- Pinard.
2188-
2189-Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com>
2190-
2191- * Makefile.in: Implement handling of libtool.
2192-
2193- * gettextP.h: Change data structures for use of generic lowlevel
2194- i18n file handling.
2195-
2196-Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com>
2197-
2198- * textdomain.c: Put parentheses around arguments of memcpy macro
2199- definition.
2200- * localealias.c: Likewise.
2201- * l10nflist.c: Likewise.
2202- * finddomain.c: Likewise.
2203- * bindtextdom.c: Likewise.
2204- Reported by Thomas Esken.
2205-
2206-Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com>
2207-
2208- * textdomain.c: Move definition of `memcpy` macro to right
2209- position.
2210-
2211-Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com>
2212-
2213- * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using
2214- bcopy if not already defined. Reported by Thomas Esken.
2215- * bindtextdom.c: Likewise.
2216- * l10nflist.c: Likewise.
2217- * localealias.c: Likewise.
2218- * textdomain.c: Likewise.
2219-
2220-Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com>
2221-
2222- * Makefile.in (libdir): Change to use exec_prefix instead of
2223- prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>.
2224-
2225-Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com>
2226-
2227- * l10nflist.c (_nl_normalize_codeset): We convert to lower case,
2228- so don't prepend uppercase `ISO' for only numeric arg.
2229-
2230-Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com>
2231-
2232- * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after
2233- definition of _GNU_SOURCE. Patch by Roland McGrath.
2234-
2235- * Makefile.in (uninstall): Fix another bug with `for' loop and
2236- empty arguments. Patch by Jim Meyering. Correct name os
2237- uninstalled files: no intl- prefix anymore.
2238-
2239- * Makefile.in (install-data): Again work around shells which
2240- cannot handle mpty for list. Reported by Jim Meyering.
2241-
2242-Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com>
2243-
2244- * Makefile.in (install): Split goal. Now depend on install-exec
2245- and install-data.
2246- (install-exec, install-data): New goals. Created from former
2247- install goal.
2248- Reported by Karl Berry.
2249-
2250-Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com>
2251-
2252- * Makefile.in (MKINSTALLDIRS): New variable. Path to
2253- mkinstalldirs script.
2254- (install): use MKINSTALLDIRS variable or if the script is not present
2255- try to find it in the $top_scrdir).
2256-
2257-Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com>
2258-
2259- * l10nflist.c: Linux libc *partly* includes the argz_* functions.
2260- Grr. Work around by renaming the static version and use macros
2261- for renaming.
2262-
2263-Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com>
2264-
2265- * l10nflist.c: Correct presence test macros of __argz_* functions.
2266-
2267- * l10nflist.c: Include <argz.h> based on test of it instead when
2268- __argz_* functions are available.
2269- Reported by Andreas Schwab.
2270-
2271-Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com>
2272-
2273- * explodename.c, l10nflist.c: Define NULL for dumb systems.
2274-
2275-Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com>
2276-
2277- * intlh.inst.in, libgettext.h (dcgettext): Rename local variable
2278- result to __result to prevent name clash.
2279-
2280- * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to
2281- get prototype for stpcpy and strcasecmp.
2282-
2283- * intlh.inst.in, libgettext.h: Move declaration of
2284- `_nl_msg_cat_cntr' outside __extension__ block to prevent warning
2285- from gcc's -Wnested-extern option.
2286-
2287-Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com>
2288-
2289- * Makefile.in (install): Remove comment.
2290-
2291-Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com>
2292-
2293- * Makefile.in (install): Work around for another Buglix stupidity.
2294- Always use an `else' close for `if's. Reported by Nelson Beebe.
2295-
2296- * Makefile.in (intlh.inst): Correct typo in phony rule.
2297- Reported by Nelson Beebe.
2298-
2299-Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com>
2300-
2301- * dcgettext.c (read_alias_file): Rename variable alloca_list to
2302- block_list as the macro calls assume.
2303- Patch by Eric Backus.
2304-
2305- * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using
2306- malloc.
2307- (read_alias_file): Rename varriabe alloca_list to block_list as the
2308- macro calls assume.
2309- Patch by Eric Backus.
2310-
2311- * l10nflist.c: Correct conditional for <argz.h> inclusion.
2312- Reported by Roland McGrath.
2313-
2314- * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not
2315- all-@USE_NLS@.
2316-
2317- * Makefile.in (install): intlh.inst comes from local dir, not
2318- $(srcdir).
2319-
2320- * Makefile.in (intlh.inst): Special handling of this goal. If
2321- used in gettext, this is really a rul to construct this file. If
2322- used in any other package it is defined as a .PHONY rule with
2323- empty body.
2324-
2325- * finddomain.c: Extract locale file information handling into
2326- l10nfile.c. Rename local stpcpy__ function to stpcpy.
2327-
2328- * dcgettext.c (stpcpy): Add local definition.
2329-
2330- * l10nflist.c: Solve some portability problems. Patches partly by
2331- Thomas Esken. Add local definition of stpcpy.
2332-
2333-Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com>
2334-
2335- * intlh.inst.in: Don't depend including <locale.h> on
2336- HAVE_LOCALE_H. Instead configure must rewrite this fiile
2337- depending on the result of the configure run.
2338-
2339- * Makefile.in (install): libintl.inst is now called intlh.inst.
2340- Add rules for updating intlh.inst from intlh.inst.in.
2341-
2342- * libintl.inst: Renamed to intlh.inst.in.
2343-
2344- * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1
2345- because gcc has __buitlin_alloca.
2346- Reported by Roland McGrath.
2347-
2348-Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com>
2349-
2350- * Makefile.in (installcheck): New goal to fulfill needs of
2351- automake's distcheck.
2352-
2353- * Makefile.in (install): Reorder commands so that VERSION is
2354- found.
2355-
2356- * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in
2357- @datadir@/gettext.
2358- (COMSRCS): Add l10nfile.c.
2359- (OBJECTS): Add l10nfile.o.
2360- (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common).
2361- (DISTFILE.gettext): Remove $(DISTFILES.common).
2362- (all-gettext): Remove goal.
2363- (install): If $(PACKAGE) = gettext install, otherwose do nothing. No
2364- package but gettext itself should install libintl.h + headers.
2365- (dist): Extend goal to work for gettext, too.
2366- (dist-gettext): Remove goal.
2367-
2368- * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc.
2369-
2370-Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com>
2371-
2372- * loadmsgcat.c (_nl_load_domain): Parameter is now comes from
2373- find_l10nfile.
2374-
2375-Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com>
2376-
2377- * l10nflist.c (__argz_next): Add definition.
2378-
2379- * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca
2380- code. Use new l10nfile handling.
2381-
2382- * localealias.c [!HAVE_ALLOCA]: Add code for handling missing
2383- alloca code.
2384-
2385- * l10nflist.c: Initial revision.
2386-
2387-Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware>
2388-
2389- * Makefile.in (all-gettext): New goal. Same as all-yes.
2390-
2391-Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de>
2392-
2393- * Makefile.in (gettextsrcdir): Define using @datadir@.
2394-
2395-Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware>
2396-
2397- * finddomain.c: Include <ctype.h>. Reported by Roland McGrath.
2398-
2399-Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware>
2400-
2401- * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing
2402- with external declaration.
2403-
2404-Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware>
2405-
2406- * Makefile.in (all-no): Rename from all_no.
2407-
2408-Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware>
2409-
2410- * gettextP.h [loaded_domain]: Array `successor' must now contain up
2411- to 63 elements (because of codeset name normalization).
2412-
2413- * finddomain.c: Implement codeset name normalization.
2414-
2415-Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware>
2416-
2417- * Makefile.in (all): Define to `all-@USE_NLS@'.
2418- (all-yes, all_no): New goals. `all-no' is noop, `all-yes'
2419- is former all.
2420-
2421-Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com>
2422-
2423- * localealias.c (alias_compare): Increment string pointers in loop
2424- of strcasecmp replacement.
2425-
2426-Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware>
2427-
2428- * Makefile.in (install-src): Who commented this goal out ? :-)
2429-
2430-Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware>
2431-
2432- * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls
2433- should not effect it because a missing catalog is no error.
2434- Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>.
2435-
2436-Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware>
2437-
2438- * Makefile.in (Makefile): Explicitly use $(SHELL) for running
2439- shell scripts.
2440-
2441-Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2442-
2443- * Makefile.in (install-src): Only install library and header when
2444- we use the own implementation. Don't do it when using the
2445- system's gettext or catgets functions.
2446-
2447- * dcgettext.c (find_msg): Must not swap domain->hash_size here.
2448-
2449-Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware>
2450-
2451- * localealias.c, libintl.inst, libgettext.h, hash-string.h,
2452- gettextP.h, finddomain.c, dcgettext.c, cat-compat.c:
2453- Use PARAMS instead of __P. Suggested by Roland McGrath.
2454-
2455-Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu>
2456-
2457- * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if
2458- !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty.
2459-
2460-Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware>
2461-
2462- * Makefile.in (install-src):
2463- Install libintl.inst instead of libintl.h.install.
2464-
2465-Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu>
2466-
2467- * cat-compat.c (textdomain):
2468- Reverse order in which files are tried you load. First
2469- try local file, when this failed absolute path.
2470-
2471-Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
2472-
2473- * cat-compat.c (bindtextdomain): Add missing { }.
2474-
2475-Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware>
2476-
2477- * libintl.inst: Add missing __P definition. Reported by Nelson Beebe.
2478-
2479- * Makefile.in:
2480- Add dummy `all' and `dvi' goals. Reported by Tom Tromey.
2481-
2482-Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca>
2483-
2484- * hash-string.h: Capitalize arguments of macros.
2485-
2486-Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware>
2487-
2488- * Makefile.in (DISTFILES): Prevent files names longer than 13
2489- characters. libintl.h.glibc->libintl.glibc,
2490- libintl.h.install->libintl.inst. Reported by Joshua R. Poulson.
2491-
2492-Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com>
2493-
2494- * dcgettext.c: Fix bug in preprocessor conditionals.
2495-
2496-Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
2497-
2498- * libgettext.h: Solaris cc does not understand
2499- #if !SYMBOL1 && !SYMBOL2. Sad but true.
2500-
2501-Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware>
2502-
2503- * hash-string.h (hash_string):
2504- Fix for machine with >32 bit `unsigned long's.
2505-
2506- * dcgettext.c (DCGETTEXT):
2507- Fix horrible bug in loop for alternative translation.
2508-
2509-Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware>
2510-
2511- * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
2512- Some further simplifications in message number generation.
2513-
2514-Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware>
2515-
2516- * libintl.h.glibc: Use __const instead of const in prototypes.
2517-
2518- * Makefile.in (install-src):
2519- Install libintl.h.install instead of libintl.h. This
2520- is a stripped-down version. Suggested by Peter Miller.
2521-
2522- * libintl.h.install, libintl.h.glibc: Initial revision.
2523-
2524- * localealias.c (_nl_expand_alias, read_alias_file):
2525- Protect prototypes in type casts by __P.
2526-
2527-Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware>
2528-
2529- * hash-string.h: Correct prototype for hash_string.
2530-
2531-Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware>
2532-
2533- * hash-string.h (hash_string): Add prototype.
2534-
2535- * gettextP.h: Fix copyright.
2536- (SWAP): Add prototype.
2537-
2538-Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware>
2539-
2540- * localealias.c (read_alias_file): Forgot sizeof.
2541- Avoid calling *printf function. This introduces a big overhead.
2542- Patch by Roland McGrath.
2543-
2544-Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware>
2545-
2546- * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
2547-
2548- * finddomain.c (stpcpy):
2549- Define substitution function local. The macro was to flaky.
2550-
2551- * cat-compat.c: Fix typo.
2552-
2553- * xopen-msg.sed, linux-msg.sed:
2554- While bringing message number to right place only accept digits.
2555-
2556- * linux-msg.sed, xopen-msg.sed: Now that the counter does not have
2557- leading 0s we don't need to remove them. Reported by Marcus
2558- Daniels.
2559-
2560- * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
2561- dependency. Reported by Marcus Daniels.
2562-
2563- * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
2564- Generally cleanup using #if instead of #ifndef.
2565-
2566- * Makefile.in: Correct typos in comment. By Franc,ois Pinard.
2567-
2568-Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware>
2569-
2570- * Makefile.in (install-src): Don't install libintl.h and libintl.a
2571- if we use an available gettext implementation.
2572-
2573-Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware>
2574-
2575- * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported
2576- by Franc,ois Pinard.
2577-
2578- * libgettext.h: Use #if instead of #ifdef/#ifndef.
2579-
2580- * finddomain.c:
2581- Comments describing what has to be done should start with FIXME.
2582-
2583-Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware>
2584-
2585- * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning.
2586- DISTFILES.common names the files common to both dist goals.
2587- DISTFILES.gettext are the files only distributed in GNU gettext.
2588-
2589-Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware>
2590-
2591- * dcgettext.c (DCGETTEXT): Correct searching in derived locales.
2592- This was necessary since a change in _nl_find_msg several weeks
2593- ago. I really don't know this is still not fixed.
2594-
2595-Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware>
2596-
2597- * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This
2598- might mark a special condition.
2599-
2600- * finddomain.c (make_entry_rec): Don't make illegal entry as decided.
2601-
2602- * Makefile.in (dist): Suppress error message when ln failed.
2603- Get files from $(srcdir) explicitly.
2604-
2605- * libgettext.h (gettext_const): Rename to gettext_noop.
2606-
2607-Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware>
2608-
2609- * finddomain.c (make_entry_rec):
2610- Protect against wrong locale names by testing mask.
2611-
2612- * libgettext.h (gettext_const): Add macro definition.
2613- Capitalize macro arguments.
2614-
2615-Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware>
2616-
2617- * finddomain.c (_nl_find_domain):
2618- Test for pointer != NULL before accessing value.
2619- Reported by Tom Tromey.
2620-
2621- * gettext.c (NULL):
2622- Define as (void*)0 instad of 0. Reported by Franc,ois Pinard.
2623-
2624-Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware>
2625-
2626- * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
2627-
2628-Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware>
2629-
2630- * libgettext.h: Disable dcgettext optimization for Solaris 2.3.
2631-
2632- * localealias.c (alias_compare):
2633- Peter Miller reported that tolower in some systems is
2634- even dumber than I thought. Protect call by `isupper'.
2635-
2636-Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware>
2637-
2638- * Makefile.in (libdir, includedir): New variables.
2639- (install-src): Install libintl.a and libintl.h in correct dirs.
2640-
2641-Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware>
2642-
2643- * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
2644-
2645- * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
2646-
2647- * localealias.c:
2648- Fix typo and superflous test. Reported by Christian von Roques.
2649-
2650-Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware>
2651-
2652- * finddomain.c (_nl_find_domain):
2653- Correct some remainder from the pre-CEN syntax. Now
2654- we don't have a constant number of successors anymore.
2655-
2656-Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware>
2657-
2658- * Makefile.in (DISTFILES): Add libintl.h.glibc.
2659-
2660- * Makefile.in (dist-libc): Add goal for packing sources for glibc.
2661- (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
2662-
2663- * loadmsgcat.c: Forget to continue #if line.
2664-
2665- * localealias.c:
2666- [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
2667- space clean.
2668-
2669- * dcgettext.c, finddomain.c: Better comment to last change.
2670-
2671- * loadmsgcat.c:
2672- [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
2673- __fstat, __open, __close, __read, __mmap, and __munmap resp
2674- to keep ANSI C name space clean.
2675-
2676- * finddomain.c:
2677- [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
2678-
2679- * dcgettext.c:
2680- [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
2681- keep ANSI C name space clean.
2682-
2683- * libgettext.h:
2684- Include sys/types.h for those old SysV systems out there.
2685- Reported by Francesco Potorti`.
2686-
2687- * loadmsgcat.c (use_mmap): Define if compiled for glibc.
2688-
2689- * bindtextdom.c: Include all those standard headers
2690- unconditionally if _LIBC is defined.
2691-
2692- * finddomain.c: Fix 2 times defiend -> defined.
2693-
2694- * textdomain.c: Include libintl.h instead of libgettext.h when
2695- compiling for glibc. Include all those standard headers
2696- unconditionally if _LIBC is defined.
2697-
2698- * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
2699-
2700- * gettext.c:
2701- Include libintl.h instead of libgettext.h when compiling for glibc.
2702- Get NULL from stddef.h if we compile for glibc.
2703-
2704- * finddomain.c: Include libintl.h instead of libgettext.h when
2705- compiling for glibc. Include all those standard headers
2706- unconditionally if _LIBC is defined.
2707-
2708- * dcgettext.c: Include all those standard headers unconditionally
2709- if _LIBC is defined.
2710-
2711- * dgettext.c: If compiled in glibc include libintl.h instead of
2712- libgettext.h.
2713- (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
2714-
2715- * dcgettext.c: If compiled in glibc include libintl.h instead of
2716- libgettext.h.
2717- (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
2718-
2719- * bindtextdom.c:
2720- If compiled in glibc include libintl.h instead of libgettext.h.
2721-
2722-Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware>
2723-
2724- * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
2725- Reported by Marcus Daniels.
2726-
2727- * cat-compat.c (bindtextdomain):
2728- String used in putenv must not be recycled.
2729- Reported by Marcus Daniels.
2730-
2731- * libgettext.h (__USE_GNU_GETTEXT):
2732- Additional symbol to signal that we use GNU gettext
2733- library.
2734-
2735- * cat-compat.c (bindtextdomain):
2736- Fix bug with the strange stpcpy replacement.
2737- Reported by Nelson Beebe.
2738-
2739-Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware>
2740-
2741- * cat-compat.c: Include <string.h> for stpcpy prototype.
2742-
2743- * localealias.c (read_alias_file):
2744- While expand strdup code temporary variable `cp' hided
2745- higher level variable with same name. Rename to `tp'.
2746-
2747- * textdomain.c (textdomain):
2748- Avoid warning by using temporary variable in strdup code.
2749-
2750- * finddomain.c (_nl_find_domain): Remove unused variable `application'.
2751-
2752-Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware>
2753-
2754- * localealias.c (alias_compare):
2755- Use strcasecmp() only if available. Else use
2756- implementation in place.
2757-
2758- * intl-compat.c:
2759- Wrapper functions now call *__ functions instead of __*.
2760-
2761- * libgettext.h: Declare prototypes for *__ functions instead for __*.
2762-
2763- * cat-compat.c, loadmsgcat.c:
2764- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2765- of the standard libc and so prevent libintl.a from being used
2766- standalone.
2767-
2768- * bindtextdom.c:
2769- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2770- of the standard libc and so prevent libintl.a from being used
2771- standalone.
2772- Rename to bindtextdomain__ if not used in GNU C Library.
2773-
2774- * dgettext.c:
2775- Rename function to dgettext__ if not used in GNU C Library.
2776-
2777- * gettext.c:
2778- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2779- of the standard libc and so prevent libintl.a from being used
2780- standalone.
2781- Functions now called gettext__ if not used in GNU C Library.
2782-
2783- * dcgettext.c, localealias.c, textdomain.c, finddomain.c:
2784- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2785- of the standard libc and so prevent libintl.a from being used
2786- standalone.
2787-
2788-Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware>
2789-
2790- * finddomain.c: Correct some bugs in handling of CEN standard
2791- locale definitions.
2792-
2793-Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware>
2794-
2795- * finddomain.c: Implement CEN syntax.
2796-
2797- * gettextP.h (loaded_domain): Extend number of successors to 31.
2798-
2799-Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware>
2800-
2801- * Makefile.in (aliaspath): Remove path to X11 locale dir.
2802-
2803- * Makefile.in: Make install-src depend on install. This helps
2804- gettext to install the sources and other packages can use the
2805- install goal.
2806-
2807-Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware>
2808-
2809- * Makefile.in (uninstall): Remove stuff installed by install-src.
2810-
2811-Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware>
2812-
2813- * VERSION.in: Initial revision.
2814-
2815- * Makefile.in (DISTFILES):
2816- Add VERSION file. This is not necessary for gettext, but
2817- for other packages using this library.
2818-
2819-Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware>
2820-
2821- * gettextP.h (_nl_find_domain):
2822- New prototype after changing search strategy.
2823-
2824- * finddomain.c (_nl_find_domain):
2825- We now try only to find a specified catalog. Fall back to other
2826- catalogs listed in the locale list is now done in __dcgettext.
2827-
2828- * dcgettext.c (__dcgettext):
2829- Now we provide message fall back even to different languages.
2830- I.e. if a message is not available in one language all the other
2831- in the locale list a tried. Formerly fall back was only possible
2832- within one language. Implemented by moving one loop from
2833- _nl_find_domain to here.
2834-
2835-Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware>
2836-
2837- * Makefile.in (gettextsrcdir):
2838- Directory where source of GNU gettext library are made
2839- available.
2840- (INSTALL, INSTALL_DATA): Programs used for installing sources.
2841- (gettext-src): New. Rule to install GNU gettext sources for use in
2842- gettextize shell script.
2843-
2844-Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware>
2845-
2846- * loadmsgcat.c (_nl_load_domain):
2847- Use mmap for loading only when munmap function is
2848- also available.
2849-
2850- * Makefile.in (install): Depend on `all' goal.
2851-
2852-Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware>
2853-
2854- * localealias.c (read_alias_file):
2855- Do not overwrite '\n' when terminating alias value string.
2856-
2857- * localealias.c (read_alias_file):
2858- Handle long lines. Ignore the rest not fitting in
2859- the buffer after the initial `fgets' call.
2860-
2861-Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware>
2862-
2863- * gettextP.h (_nl_load_domain):
2864- Add prototype, replacing prototype for _nl_load_msg_cat.
2865-
2866- * finddomain.c (_nl_find_domain):
2867- Remove unneeded variable filename and filename_len.
2868- (expand_alias): Remove prototype because functions does not
2869- exist anymore.
2870-
2871- * localealias.c (read_alias_file):
2872- Change type of fname_len parameter to int.
2873- (xmalloc): Add prototype.
2874-
2875- * loadmsgcat.c: Better prototypes for xmalloc.
2876-
2877-Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware>
2878-
2879- * finddomain.c (_nl_find_domain):
2880- Allow alias name to be constructed from the four components.
2881-
2882- * Makefile.in (aliaspath): New variable. Set to preliminary value.
2883- (SOURCES): Add localealias.c.
2884- (OBJECTS): Add localealias.o.
2885-
2886- * gettextP.h: Add prototype for _nl_expand_alias.
2887-
2888- * finddomain.c: Aliasing handled in intl/localealias.c.
2889-
2890- * localealias.c: Aliasing for locale names.
2891-
2892- * bindtextdom.c: Better prototypes for xmalloc and xstrdup.
2893-
2894-Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware>
2895-
2896- * Makefile.in (DISTFILES): gettext.perl is now found in misc/.
2897-
2898- * cat-compat.c (bindtextdomain):
2899- Correct implementation. dirname parameter was not used.
2900- Reported by Marcus Daniels.
2901-
2902- * gettextP.h (loaded_domain):
2903- New fields `successor' and `decided' for oo, lazy
2904- message handling implementation.
2905-
2906- * dcgettext.c:
2907- Adopt for oo, lazy message handliing.
2908- Now we can inherit translations from less specific locales.
2909- (find_msg): New function.
2910-
2911- * loadmsgcat.c, finddomain.c:
2912- Complete rewrite. Implement oo, lazy message handling :-).
2913- We now have an additional environment variable `LANGUAGE' with
2914- a higher priority than LC_ALL for the LC_MESSAGE locale.
2915- Here we can set a colon separated list of specifications each
2916- of the form `language[_territory[.codeset]][@modifier]'.
2917-
2918-Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware>
2919-
2920- * finddomain.c (unistd.h):
2921- Include to get _PC_PATH_MAX defined on system having it.
2922-
2923-Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware>
2924-
2925- * finddomain.c (stpcpy): Include prototype.
2926-
2927- * Makefile.in (dist): Remove `copying instead' message.
2928-
2929-Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware>
2930-
2931- * Makefile.in (ID, TAGS): Do not use $^.
2932-
2933-Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware>
2934-
2935- * Makefile.in (TAGS, ID): Use $^ as command argument.
2936- (TAGS): Give etags -o option t write to current directory,
2937- not $(srcdir).
2938- (ID): Use $(srcdir) instead os $(top_srcdir)/src.
2939- (distclean): Remove ID.
2940-
2941-Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware>
2942-
2943- * Makefile.in (gnulocaledir):
2944- New variable, always using share/ for data directory.
2945- (DEFS): Add GNULOCALEDIR, used in finddomain.c.
2946-
2947- * finddomain.c (_nl_default_dirname):
2948- Set to GNULOCALEDIR, because it always has to point
2949- to the directory where GNU gettext Library writes it to.
2950-
2951- * intl-compat.c (textdomain, bindtextdomain):
2952- Undefine macros before function definition.
2953-
2954-Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware>
2955-
2956- * libgettext.h (_LIBINTL_H):
2957- Protect definition in case where this file is included as
2958- libgettext.h on Solaris machines. Add comment about this.
2959-
2960-Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware>
2961-
2962- * intl-compat.c (textdomain): Correct typo.
2963-
2964-Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware>
2965-
2966- * dcgettext.c (dcgettext): Function now called __dcgettext.
2967-
2968- * dgettext.c (dgettext): Now called __dgettext and calls
2969- __dcgettext.
2970-
2971- * gettext.c (gettext):
2972- Function now called __gettext and calls __dgettext.
2973-
2974- * textdomain.c (textdomain): Function now called __textdomain.
2975-
2976- * bindtextdom.c (bindtextdomain): Function now called
2977- __bindtextdomain.
2978-
2979- * intl-compat.c: Initial revision.
2980-
2981- * Makefile.in (SOURCES): Add intl-compat.c.
2982- (OBJECTS): We always compile the GNU gettext library functions.
2983- OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
2984- and intl-compat.o.
2985- (GETTOBJS): Contains now only intl-compat.o.
2986-
2987- * libgettext.h:
2988- Re-include protection matches dualistic character of libgettext.h.
2989- For all functions in GNU gettext library define __ counter part.
2990-
2991- * finddomain.c (strchr): Define as index if not found in C library.
2992- (_nl_find_domain): For relative paths paste / in between.
2993-
2994-Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware>
2995-
2996- * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
2997-
2998- * xopen-msg.sed: Fix bug with `msgstr ""' lines.
2999- A little bit better comments.
3000-
3001-Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware>
3002-
3003- * Makefile.in:
3004- po-mode.el, makelinks, combine-sh are now found in ../misc.
3005-
3006- * po-mode.el, makelinks, combine-sh, elisp-comp:
3007- Moved to ../misc/.
3008-
3009- * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
3010-
3011-Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware>
3012-
3013- * Makefile.in (INSTALL, INSTALL_DATA): New variables.
3014- (install-data, uninstall): Install/uninstall .elc file.
3015-
3016- * po-mode.el (Installation comment):
3017- Add .pox as possible extension of .po files.
3018-
3019-Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware>
3020-
3021- * elisp-comp: Complete new version by Franc,ois: This does not
3022- fail when not compiling in the source directory.
3023-
3024-Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware>
3025-
3026- * Makefile.in (../po/cat-id-tbl.o):
3027- Use $(MAKE) instead of make for recursive make.
3028-
3029- * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
3030- (install-exec): Add missing dummy goal.
3031- (install-data, uninstall): @ in multi-line shell command at
3032- beginning, not in front of echo. Reported by Eric Backus.
3033-
3034-Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware>
3035-
3036- * Makefile.in (DISTFILES):
3037- Rename libgettext.perl to gettext.perl to fit in 14 chars
3038- file systems.
3039-
3040- * gettext.perl:
3041- Rename to gettext.perl to fit in 14 chars file systems.
3042-
3043-Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware>
3044-
3045- * cat-compat.c: If !STDC_HEADERS try to include malloc.h.
3046-
3047-Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware>
3048-
3049- * po2tbl.sed.in: Pretty printing.
3050-
3051- * linux-msg.sed, xopen-msg.sed:
3052- Correct bugs with handling substitute flags in branches.
3053-
3054- * hash-string.h (hash_string):
3055- Old K&R compilers don't under stand `unsigned char'.
3056-
3057- * gettext.h (nls_uint32):
3058- Some old K&R compilers (eg HP) don't understand `unsigned int'.
3059-
3060- * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
3061-
3062-Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware>
3063-
3064- * Makefile.in (ELCFILES): New variable.
3065- (DISTFILES): Add elisp-comp.
3066- Add implicit rule for .el -> .elc compilation.
3067- (install-data): install $ELCFILES
3068- (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
3069-
3070- * elisp-comp: Initial revision
3071-
3072-Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware>
3073-
3074- * Makefile.in:
3075- cat-id-tbl.c is now found in po/. This enables us to use an identical
3076- intl/ directory in all packages.
3077-
3078- * dcgettext.c (dcgettext): hashing does not work for table size <= 2.
3079-
3080- * textdomain.c: fix typo (#if def -> #if defined)
3081-
3082-Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware>
3083-
3084- * Makefile.in (stamp-cat-id): use top_srcdir to address source files
3085- (DISTFILES,distclean): move tupdate.perl to src/
3086-
3087- * po-to-tbl.sed.in:
3088- add additional jump to clear change flag to recognize multiline strings
3089-
3090-Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware>
3091-
3092- * textdomain.c: Protect inclusion of stdlib.h and string.h.
3093-
3094- * loadmsgcat.c: Protect inclusion of stdlib.h.
3095-
3096- * libgettext.h: Protect inclusion of locale.h.
3097- Allow use in C++ programs.
3098- Define NULL is not happened already.
3099-
3100- * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
3101- po-to-tbl.sed.
3102- (distclean): remove po-to-tbl.sed and tupdate.perl.
3103-
3104- * tupdate.perl.in: Substitute Perl path even in exec line.
3105- Don't include entries without translation from old .po file.
3106-
3107-Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware>
3108-
3109- * tupdate.perl.in: use "Updated: " in msgid "".
3110-
3111- * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
3112- Define getenv if !__STDC__.
3113-
3114- * bindtextdom.c: Protect stdlib.h and string.h inclusion.
3115- Define free if !__STDC__.
3116-
3117- * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
3118- Define free if !__STDC__.
3119-
3120- * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
3121-
3122-Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware>
3123-
3124- * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
3125- Remove unneeded $(srcdir) from Makefile.in dependency.
3126-
3127- * makelinks: Add copyright and short description.
3128-
3129- * po-mode.el: Last version for 0.7.
3130-
3131- * tupdate.perl.in: Fix die message.
3132-
3133- * dcgettext.c: Protect include of string.h.
3134-
3135- * gettext.c: Protect include of stdlib.h and further tries to get NULL.
3136-
3137- * finddomain.c: Some corrections in includes.
3138-
3139- * Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
3140-
3141- * po-to-tbl.sed: Adopt for new .po file format.
3142-
3143- * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
3144-
3145-Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware>
3146-
3147- * tupdate.perl.in: Complete rewrite for new .po file format.
3148+2004-01-29 GNU <bug-gnu-gettext@gnu.org>
3149
3150-Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware>
3151+ * Version 0.14.1 released.
3152
3153- * First official release. This directory contains all the code
3154- needed to internationalize own packages. It provides functions
3155- which allow to use the X/Open catgets function with an interface
3156- like the Uniforum gettext function. For system which does not
3157- have neither of those a complete implementation is provided.
3158--- lrzsz-0.12.20.safe/intl/config.charset 1969-12-31 19:00:00.000000000 -0500
3159+++ lrzsz-0.12.20/intl/config.charset 2004-09-12 14:40:34.354748240 -0400
3160@@ -0,0 +1,608 @@
3161+#! /bin/sh
3162+# Output a system dependent table of character encoding aliases.
3163+#
3164+# Copyright (C) 2000-2004 Free Software Foundation, Inc.
3165+#
3166+# This program is free software; you can redistribute it and/or modify it
3167+# under the terms of the GNU Library General Public License as published
3168+# by the Free Software Foundation; either version 2, or (at your option)
3169+# any later version.
3170+#
3171+# This program is distributed in the hope that it will be useful,
3172+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3173+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3174+# Library General Public License for more details.
3175+#
3176+# You should have received a copy of the GNU Library General Public
3177+# License along with this program; if not, write to the Free Software
3178+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3179+# USA.
3180+#
3181+# The table consists of lines of the form
3182+# ALIAS CANONICAL
3183+#
3184+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
3185+# ALIAS is compared in a case sensitive way.
3186+#
3187+# CANONICAL is the GNU canonical name for this character encoding.
3188+# It must be an encoding supported by libiconv. Support by GNU libc is
3189+# also desirable. CANONICAL is case insensitive. Usually an upper case
3190+# MIME charset name is preferred.
3191+# The current list of GNU canonical charset names is as follows.
3192+#
3193+# name MIME? used by which systems
3194+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin
3195+# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin
3196+# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin
3197+# ISO-8859-3 Y glibc solaris
3198+# ISO-8859-4 Y osf solaris freebsd darwin
3199+# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin
3200+# ISO-8859-6 Y glibc aix hpux solaris
3201+# ISO-8859-7 Y glibc aix hpux irix osf solaris
3202+# ISO-8859-8 Y glibc aix hpux osf solaris
3203+# ISO-8859-9 Y glibc aix hpux irix osf solaris
3204+# ISO-8859-13 glibc
3205+# ISO-8859-14 glibc
3206+# ISO-8859-15 glibc aix osf solaris freebsd
3207+# KOI8-R Y glibc solaris freebsd darwin
3208+# KOI8-U Y glibc freebsd darwin
3209+# KOI8-T glibc
3210+# CP437 dos
3211+# CP775 dos
3212+# CP850 aix osf dos
3213+# CP852 dos
3214+# CP855 dos
3215+# CP856 aix
3216+# CP857 dos
3217+# CP861 dos
3218+# CP862 dos
3219+# CP864 dos
3220+# CP865 dos
3221+# CP866 freebsd darwin dos
3222+# CP869 dos
3223+# CP874 woe32 dos
3224+# CP922 aix
3225+# CP932 aix woe32 dos
3226+# CP943 aix
3227+# CP949 osf woe32 dos
3228+# CP950 woe32 dos
3229+# CP1046 aix
3230+# CP1124 aix
3231+# CP1125 dos
3232+# CP1129 aix
3233+# CP1250 woe32
3234+# CP1251 glibc solaris darwin woe32
3235+# CP1252 aix woe32
3236+# CP1253 woe32
3237+# CP1254 woe32
3238+# CP1255 glibc woe32
3239+# CP1256 woe32
3240+# CP1257 woe32
3241+# GB2312 Y glibc aix hpux irix solaris freebsd darwin
3242+# EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin
3243+# EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin
3244+# EUC-TW glibc aix hpux irix osf solaris
3245+# BIG5 Y glibc aix hpux osf solaris freebsd darwin
3246+# BIG5-HKSCS glibc solaris
3247+# GBK glibc aix osf solaris woe32 dos
3248+# GB18030 glibc solaris
3249+# SHIFT_JIS Y hpux osf solaris freebsd darwin
3250+# JOHAB glibc solaris woe32
3251+# TIS-620 glibc aix hpux osf solaris
3252+# VISCII Y glibc
3253+# TCVN5712-1 glibc
3254+# GEORGIAN-PS glibc
3255+# HP-ROMAN8 hpux
3256+# HP-ARABIC8 hpux
3257+# HP-GREEK8 hpux
3258+# HP-HEBREW8 hpux
3259+# HP-TURKISH8 hpux
3260+# HP-KANA8 hpux
3261+# DEC-KANJI osf
3262+# DEC-HANYU osf
3263+# UTF-8 Y glibc aix hpux osf solaris
3264+#
3265+# Note: Names which are not marked as being a MIME name should not be used in
3266+# Internet protocols for information interchange (mail, news, etc.).
3267+#
3268+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
3269+# must understand both names and treat them as equivalent.
3270+#
3271+# The first argument passed to this file is the canonical host specification,
3272+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
3273+# or
3274+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
3275+
3276+host="$1"
3277+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
3278+echo "# This file contains a table of character encoding aliases,"
3279+echo "# suitable for operating system '${os}'."
3280+echo "# It was automatically generated from config.charset."
3281+# List of references, updated during installation:
3282+echo "# Packages using this file: "
3283+case "$os" in
3284+ linux-gnulibc1*)
3285+ # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
3286+ # localcharset.c falls back to using the full locale name
3287+ # from the environment variables.
3288+ echo "C ASCII"
3289+ echo "POSIX ASCII"
3290+ for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
3291+ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
3292+ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
3293+ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
3294+ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
3295+ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
3296+ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
3297+ sv_FI sv_SE; do
3298+ echo "$l ISO-8859-1"
3299+ echo "$l.iso-8859-1 ISO-8859-1"
3300+ echo "$l.iso-8859-15 ISO-8859-15"
3301+ echo "$l.iso-8859-15@euro ISO-8859-15"
3302+ echo "$l@euro ISO-8859-15"
3303+ echo "$l.cp-437 CP437"
3304+ echo "$l.cp-850 CP850"
3305+ echo "$l.cp-1252 CP1252"
3306+ echo "$l.cp-1252@euro CP1252"
3307+ #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
3308+ echo "$l.utf-8 UTF-8"
3309+ echo "$l.utf-8@euro UTF-8"
3310+ done
3311+ for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
3312+ sl_SI sr sr_CS sr_YU; do
3313+ echo "$l ISO-8859-2"
3314+ echo "$l.iso-8859-2 ISO-8859-2"
3315+ echo "$l.cp-852 CP852"
3316+ echo "$l.cp-1250 CP1250"
3317+ echo "$l.utf-8 UTF-8"
3318+ done
3319+ for l in mk mk_MK ru ru_RU; do
3320+ echo "$l ISO-8859-5"
3321+ echo "$l.iso-8859-5 ISO-8859-5"
3322+ echo "$l.koi8-r KOI8-R"
3323+ echo "$l.cp-866 CP866"
3324+ echo "$l.cp-1251 CP1251"
3325+ echo "$l.utf-8 UTF-8"
3326+ done
3327+ for l in ar ar_SA; do
3328+ echo "$l ISO-8859-6"
3329+ echo "$l.iso-8859-6 ISO-8859-6"
3330+ echo "$l.cp-864 CP864"
3331+ #echo "$l.cp-868 CP868" # not a commonly used encoding
3332+ echo "$l.cp-1256 CP1256"
3333+ echo "$l.utf-8 UTF-8"
3334+ done
3335+ for l in el el_GR gr gr_GR; do
3336+ echo "$l ISO-8859-7"
3337+ echo "$l.iso-8859-7 ISO-8859-7"
3338+ echo "$l.cp-869 CP869"
3339+ echo "$l.cp-1253 CP1253"
3340+ echo "$l.cp-1253@euro CP1253"
3341+ echo "$l.utf-8 UTF-8"
3342+ echo "$l.utf-8@euro UTF-8"
3343+ done
3344+ for l in he he_IL iw iw_IL; do
3345+ echo "$l ISO-8859-8"
3346+ echo "$l.iso-8859-8 ISO-8859-8"
3347+ echo "$l.cp-862 CP862"
3348+ echo "$l.cp-1255 CP1255"
3349+ echo "$l.utf-8 UTF-8"
3350+ done
3351+ for l in tr tr_TR; do
3352+ echo "$l ISO-8859-9"
3353+ echo "$l.iso-8859-9 ISO-8859-9"
3354+ echo "$l.cp-857 CP857"
3355+ echo "$l.cp-1254 CP1254"
3356+ echo "$l.utf-8 UTF-8"
3357+ done
3358+ for l in lt lt_LT lv lv_LV; do
3359+ #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
3360+ echo "$l ISO-8859-13"
3361+ done
3362+ for l in ru_UA uk uk_UA; do
3363+ echo "$l KOI8-U"
3364+ done
3365+ for l in zh zh_CN; do
3366+ #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
3367+ echo "$l GB2312"
3368+ done
3369+ for l in ja ja_JP ja_JP.EUC; do
3370+ echo "$l EUC-JP"
3371+ done
3372+ for l in ko ko_KR; do
3373+ echo "$l EUC-KR"
3374+ done
3375+ for l in th th_TH; do
3376+ echo "$l TIS-620"
3377+ done
3378+ for l in fa fa_IR; do
3379+ #echo "$l ISIRI-3342" # a broken encoding
3380+ echo "$l.utf-8 UTF-8"
3381+ done
3382+ ;;
3383+ linux* | *-gnu*)
3384+ # With glibc-2.1 or newer, we don't need any canonicalization,
3385+ # because glibc has iconv and both glibc and libiconv support all
3386+ # GNU canonical names directly. Therefore, the Makefile does not
3387+ # need to install the alias file at all.
3388+ # The following applies only to glibc-2.0.x and older libcs.
3389+ echo "ISO_646.IRV:1983 ASCII"
3390+ ;;
3391+ aix*)
3392+ echo "ISO8859-1 ISO-8859-1"
3393+ echo "ISO8859-2 ISO-8859-2"
3394+ echo "ISO8859-5 ISO-8859-5"
3395+ echo "ISO8859-6 ISO-8859-6"
3396+ echo "ISO8859-7 ISO-8859-7"
3397+ echo "ISO8859-8 ISO-8859-8"
3398+ echo "ISO8859-9 ISO-8859-9"
3399+ echo "ISO8859-15 ISO-8859-15"
3400+ echo "IBM-850 CP850"
3401+ echo "IBM-856 CP856"
3402+ echo "IBM-921 ISO-8859-13"
3403+ echo "IBM-922 CP922"
3404+ echo "IBM-932 CP932"
3405+ echo "IBM-943 CP943"
3406+ echo "IBM-1046 CP1046"
3407+ echo "IBM-1124 CP1124"
3408+ echo "IBM-1129 CP1129"
3409+ echo "IBM-1252 CP1252"
3410+ echo "IBM-eucCN GB2312"
3411+ echo "IBM-eucJP EUC-JP"
3412+ echo "IBM-eucKR EUC-KR"
3413+ echo "IBM-eucTW EUC-TW"
3414+ echo "big5 BIG5"
3415+ echo "GBK GBK"
3416+ echo "TIS-620 TIS-620"
3417+ echo "UTF-8 UTF-8"
3418+ ;;
3419+ hpux*)
3420+ echo "iso88591 ISO-8859-1"
3421+ echo "iso88592 ISO-8859-2"
3422+ echo "iso88595 ISO-8859-5"
3423+ echo "iso88596 ISO-8859-6"
3424+ echo "iso88597 ISO-8859-7"
3425+ echo "iso88598 ISO-8859-8"
3426+ echo "iso88599 ISO-8859-9"
3427+ echo "iso885915 ISO-8859-15"
3428+ echo "roman8 HP-ROMAN8"
3429+ echo "arabic8 HP-ARABIC8"
3430+ echo "greek8 HP-GREEK8"
3431+ echo "hebrew8 HP-HEBREW8"
3432+ echo "turkish8 HP-TURKISH8"
3433+ echo "kana8 HP-KANA8"
3434+ echo "tis620 TIS-620"
3435+ echo "big5 BIG5"
3436+ echo "eucJP EUC-JP"
3437+ echo "eucKR EUC-KR"
3438+ echo "eucTW EUC-TW"
3439+ echo "hp15CN GB2312"
3440+ #echo "ccdc ?" # what is this?
3441+ echo "SJIS SHIFT_JIS"
3442+ echo "utf8 UTF-8"
3443+ ;;
3444+ irix*)
3445+ echo "ISO8859-1 ISO-8859-1"
3446+ echo "ISO8859-2 ISO-8859-2"
3447+ echo "ISO8859-5 ISO-8859-5"
3448+ echo "ISO8859-7 ISO-8859-7"
3449+ echo "ISO8859-9 ISO-8859-9"
3450+ echo "eucCN GB2312"
3451+ echo "eucJP EUC-JP"
3452+ echo "eucKR EUC-KR"
3453+ echo "eucTW EUC-TW"
3454+ ;;
3455+ osf*)
3456+ echo "ISO8859-1 ISO-8859-1"
3457+ echo "ISO8859-2 ISO-8859-2"
3458+ echo "ISO8859-4 ISO-8859-4"
3459+ echo "ISO8859-5 ISO-8859-5"
3460+ echo "ISO8859-7 ISO-8859-7"
3461+ echo "ISO8859-8 ISO-8859-8"
3462+ echo "ISO8859-9 ISO-8859-9"
3463+ echo "ISO8859-15 ISO-8859-15"
3464+ echo "cp850 CP850"
3465+ echo "big5 BIG5"
3466+ echo "dechanyu DEC-HANYU"
3467+ echo "dechanzi GB2312"
3468+ echo "deckanji DEC-KANJI"
3469+ echo "deckorean EUC-KR"
3470+ echo "eucJP EUC-JP"
3471+ echo "eucKR EUC-KR"
3472+ echo "eucTW EUC-TW"
3473+ echo "GBK GBK"
3474+ echo "KSC5601 CP949"
3475+ echo "sdeckanji EUC-JP"
3476+ echo "SJIS SHIFT_JIS"
3477+ echo "TACTIS TIS-620"
3478+ echo "UTF-8 UTF-8"
3479+ ;;
3480+ solaris*)
3481+ echo "646 ASCII"
3482+ echo "ISO8859-1 ISO-8859-1"
3483+ echo "ISO8859-2 ISO-8859-2"
3484+ echo "ISO8859-3 ISO-8859-3"
3485+ echo "ISO8859-4 ISO-8859-4"
3486+ echo "ISO8859-5 ISO-8859-5"
3487+ echo "ISO8859-6 ISO-8859-6"
3488+ echo "ISO8859-7 ISO-8859-7"
3489+ echo "ISO8859-8 ISO-8859-8"
3490+ echo "ISO8859-9 ISO-8859-9"
3491+ echo "ISO8859-15 ISO-8859-15"
3492+ echo "koi8-r KOI8-R"
3493+ echo "ansi-1251 CP1251"
3494+ echo "BIG5 BIG5"
3495+ echo "Big5-HKSCS BIG5-HKSCS"
3496+ echo "gb2312 GB2312"
3497+ echo "GBK GBK"
3498+ echo "GB18030 GB18030"
3499+ echo "cns11643 EUC-TW"
3500+ echo "5601 EUC-KR"
3501+ echo "ko_KR.johap92 JOHAB"
3502+ echo "eucJP EUC-JP"
3503+ echo "PCK SHIFT_JIS"
3504+ echo "TIS620.2533 TIS-620"
3505+ #echo "sun_eu_greek ?" # what is this?
3506+ echo "UTF-8 UTF-8"
3507+ ;;
3508+ freebsd* | os2*)
3509+ # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
3510+ # localcharset.c falls back to using the full locale name
3511+ # from the environment variables.
3512+ # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
3513+ # reuse FreeBSD's locale data for OS/2.
3514+ echo "C ASCII"
3515+ echo "US-ASCII ASCII"
3516+ for l in la_LN lt_LN; do
3517+ echo "$l.ASCII ASCII"
3518+ done
3519+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
3520+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
3521+ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
3522+ echo "$l.ISO_8859-1 ISO-8859-1"
3523+ echo "$l.DIS_8859-15 ISO-8859-15"
3524+ done
3525+ for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
3526+ echo "$l.ISO_8859-2 ISO-8859-2"
3527+ done
3528+ for l in la_LN lt_LT; do
3529+ echo "$l.ISO_8859-4 ISO-8859-4"
3530+ done
3531+ for l in ru_RU ru_SU; do
3532+ echo "$l.KOI8-R KOI8-R"
3533+ echo "$l.ISO_8859-5 ISO-8859-5"
3534+ echo "$l.CP866 CP866"
3535+ done
3536+ echo "uk_UA.KOI8-U KOI8-U"
3537+ echo "zh_TW.BIG5 BIG5"
3538+ echo "zh_TW.Big5 BIG5"
3539+ echo "zh_CN.EUC GB2312"
3540+ echo "ja_JP.EUC EUC-JP"
3541+ echo "ja_JP.SJIS SHIFT_JIS"
3542+ echo "ja_JP.Shift_JIS SHIFT_JIS"
3543+ echo "ko_KR.EUC EUC-KR"
3544+ ;;
3545+ netbsd*)
3546+ echo "646 ASCII"
3547+ echo "ISO8859-1 ISO-8859-1"
3548+ echo "ISO8859-2 ISO-8859-2"
3549+ echo "ISO8859-4 ISO-8859-4"
3550+ echo "ISO8859-5 ISO-8859-5"
3551+ echo "ISO8859-15 ISO-8859-15"
3552+ echo "eucCN GB2312"
3553+ echo "eucJP EUC-JP"
3554+ echo "eucKR EUC-KR"
3555+ echo "eucTW EUC-TW"
3556+ echo "BIG5 BIG5"
3557+ echo "SJIS SHIFT_JIS"
3558+ ;;
3559+ darwin*)
3560+ # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
3561+ # localcharset.c falls back to using the full locale name
3562+ # from the environment variables.
3563+ echo "C ASCII"
3564+ for l in en_AU en_CA en_GB en_US la_LN; do
3565+ echo "$l.US-ASCII ASCII"
3566+ done
3567+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
3568+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
3569+ nl_NL no_NO pt_PT sv_SE; do
3570+ echo "$l ISO-8859-1"
3571+ echo "$l.ISO8859-1 ISO-8859-1"
3572+ echo "$l.ISO8859-15 ISO-8859-15"
3573+ done
3574+ for l in la_LN; do
3575+ echo "$l.ISO8859-1 ISO-8859-1"
3576+ echo "$l.ISO8859-15 ISO-8859-15"
3577+ done
3578+ for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
3579+ echo "$l.ISO8859-2 ISO-8859-2"
3580+ done
3581+ for l in la_LN lt_LT; do
3582+ echo "$l.ISO8859-4 ISO-8859-4"
3583+ done
3584+ for l in ru_RU; do
3585+ echo "$l.KOI8-R KOI8-R"
3586+ echo "$l.ISO8859-5 ISO-8859-5"
3587+ echo "$l.CP866 CP866"
3588+ done
3589+ for l in bg_BG; do
3590+ echo "$l.CP1251 CP1251"
3591+ done
3592+ echo "uk_UA.KOI8-U KOI8-U"
3593+ echo "zh_TW.BIG5 BIG5"
3594+ echo "zh_TW.Big5 BIG5"
3595+ echo "zh_CN.EUC GB2312"
3596+ echo "ja_JP.EUC EUC-JP"
3597+ echo "ja_JP.SJIS SHIFT_JIS"
3598+ echo "ko_KR.EUC EUC-KR"
3599+ ;;
3600+ beos*)
3601+ # BeOS has a single locale, and it has UTF-8 encoding.
3602+ echo "* UTF-8"
3603+ ;;
3604+ msdosdjgpp*)
3605+ # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
3606+ # localcharset.c falls back to using the full locale name
3607+ # from the environment variables.
3608+ echo "#"
3609+ echo "# The encodings given here may not all be correct."
3610+ echo "# If you find that the encoding given for your language and"
3611+ echo "# country is not the one your DOS machine actually uses, just"
3612+ echo "# correct it in this file, and send a mail to"
3613+ echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
3614+ echo "# and Bruno Haible <bruno@clisp.org>."
3615+ echo "#"
3616+ echo "C ASCII"
3617+ # ISO-8859-1 languages
3618+ echo "ca CP850"
3619+ echo "ca_ES CP850"
3620+ echo "da CP865" # not CP850 ??
3621+ echo "da_DK CP865" # not CP850 ??
3622+ echo "de CP850"
3623+ echo "de_AT CP850"
3624+ echo "de_CH CP850"
3625+ echo "de_DE CP850"
3626+ echo "en CP850"
3627+ echo "en_AU CP850" # not CP437 ??
3628+ echo "en_CA CP850"
3629+ echo "en_GB CP850"
3630+ echo "en_NZ CP437"
3631+ echo "en_US CP437"
3632+ echo "en_ZA CP850" # not CP437 ??
3633+ echo "es CP850"
3634+ echo "es_AR CP850"
3635+ echo "es_BO CP850"
3636+ echo "es_CL CP850"
3637+ echo "es_CO CP850"
3638+ echo "es_CR CP850"
3639+ echo "es_CU CP850"
3640+ echo "es_DO CP850"
3641+ echo "es_EC CP850"
3642+ echo "es_ES CP850"
3643+ echo "es_GT CP850"
3644+ echo "es_HN CP850"
3645+ echo "es_MX CP850"
3646+ echo "es_NI CP850"
3647+ echo "es_PA CP850"
3648+ echo "es_PY CP850"
3649+ echo "es_PE CP850"
3650+ echo "es_SV CP850"
3651+ echo "es_UY CP850"
3652+ echo "es_VE CP850"
3653+ echo "et CP850"
3654+ echo "et_EE CP850"
3655+ echo "eu CP850"
3656+ echo "eu_ES CP850"
3657+ echo "fi CP850"
3658+ echo "fi_FI CP850"
3659+ echo "fr CP850"
3660+ echo "fr_BE CP850"
3661+ echo "fr_CA CP850"
3662+ echo "fr_CH CP850"
3663+ echo "fr_FR CP850"
3664+ echo "ga CP850"
3665+ echo "ga_IE CP850"
3666+ echo "gd CP850"
3667+ echo "gd_GB CP850"
3668+ echo "gl CP850"
3669+ echo "gl_ES CP850"
3670+ echo "id CP850" # not CP437 ??
3671+ echo "id_ID CP850" # not CP437 ??
3672+ echo "is CP861" # not CP850 ??
3673+ echo "is_IS CP861" # not CP850 ??
3674+ echo "it CP850"
3675+ echo "it_CH CP850"
3676+ echo "it_IT CP850"
3677+ echo "lt CP775"
3678+ echo "lt_LT CP775"
3679+ echo "lv CP775"
3680+ echo "lv_LV CP775"
3681+ echo "nb CP865" # not CP850 ??
3682+ echo "nb_NO CP865" # not CP850 ??
3683+ echo "nl CP850"
3684+ echo "nl_BE CP850"
3685+ echo "nl_NL CP850"
3686+ echo "nn CP865" # not CP850 ??
3687+ echo "nn_NO CP865" # not CP850 ??
3688+ echo "no CP865" # not CP850 ??
3689+ echo "no_NO CP865" # not CP850 ??
3690+ echo "pt CP850"
3691+ echo "pt_BR CP850"
3692+ echo "pt_PT CP850"
3693+ echo "sv CP850"
3694+ echo "sv_SE CP850"
3695+ # ISO-8859-2 languages
3696+ echo "cs CP852"
3697+ echo "cs_CZ CP852"
3698+ echo "hr CP852"
3699+ echo "hr_HR CP852"
3700+ echo "hu CP852"
3701+ echo "hu_HU CP852"
3702+ echo "pl CP852"
3703+ echo "pl_PL CP852"
3704+ echo "ro CP852"
3705+ echo "ro_RO CP852"
3706+ echo "sk CP852"
3707+ echo "sk_SK CP852"
3708+ echo "sl CP852"
3709+ echo "sl_SI CP852"
3710+ echo "sq CP852"
3711+ echo "sq_AL CP852"
3712+ echo "sr CP852" # CP852 or CP866 or CP855 ??
3713+ echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
3714+ echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
3715+ # ISO-8859-3 languages
3716+ echo "mt CP850"
3717+ echo "mt_MT CP850"
3718+ # ISO-8859-5 languages
3719+ echo "be CP866"
3720+ echo "be_BE CP866"
3721+ echo "bg CP866" # not CP855 ??
3722+ echo "bg_BG CP866" # not CP855 ??
3723+ echo "mk CP866" # not CP855 ??
3724+ echo "mk_MK CP866" # not CP855 ??
3725+ echo "ru CP866"
3726+ echo "ru_RU CP866"
3727+ echo "uk CP1125"
3728+ echo "uk_UA CP1125"
3729+ # ISO-8859-6 languages
3730+ echo "ar CP864"
3731+ echo "ar_AE CP864"
3732+ echo "ar_DZ CP864"
3733+ echo "ar_EG CP864"
3734+ echo "ar_IQ CP864"
3735+ echo "ar_IR CP864"
3736+ echo "ar_JO CP864"
3737+ echo "ar_KW CP864"
3738+ echo "ar_MA CP864"
3739+ echo "ar_OM CP864"
3740+ echo "ar_QA CP864"
3741+ echo "ar_SA CP864"
3742+ echo "ar_SY CP864"
3743+ # ISO-8859-7 languages
3744+ echo "el CP869"
3745+ echo "el_GR CP869"
3746+ # ISO-8859-8 languages
3747+ echo "he CP862"
3748+ echo "he_IL CP862"
3749+ # ISO-8859-9 languages
3750+ echo "tr CP857"
3751+ echo "tr_TR CP857"
3752+ # Japanese
3753+ echo "ja CP932"
3754+ echo "ja_JP CP932"
3755+ # Chinese
3756+ echo "zh_CN GBK"
3757+ echo "zh_TW CP950" # not CP938 ??
3758+ # Korean
3759+ echo "kr CP949" # not CP934 ??
3760+ echo "kr_KR CP949" # not CP934 ??
3761+ # Thai
3762+ echo "th CP874"
3763+ echo "th_TH CP874"
3764+ # Other
3765+ echo "eo CP850"
3766+ echo "eo_EO CP850"
3767+ ;;
3768+esac
3769--- lrzsz-0.12.20.safe/intl/dcgettext.c 1998-04-26 09:22:36.000000000 -0400
3770+++ lrzsz-0.12.20/intl/dcgettext.c 2004-09-12 14:40:34.359747480 -0400
3771@@ -1,593 +1,56 @@
3772-/* Implementation of the dcgettext(3) function
3773- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3774+/* Implementation of the dcgettext(3) function.
3775+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
3776
3777- This program is free software; you can redistribute it and/or modify
3778- it under the terms of the GNU General Public License as published by
3779- the Free Software Foundation; either version 2, or (at your option)
3780+ This program is free software; you can redistribute it and/or modify it
3781+ under the terms of the GNU Library General Public License as published
3782+ by the Free Software Foundation; either version 2, or (at your option)
3783 any later version.
3784
3785 This program is distributed in the hope that it will be useful,
3786 but WITHOUT ANY WARRANTY; without even the implied warranty of
3787- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3788- GNU General Public License for more details.
3789+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3790+ Library General Public License for more details.
3791
3792- You should have received a copy of the GNU General Public License
3793- along with this program; if not, write to the Free Software Foundation,
3794- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3795+ You should have received a copy of the GNU Library General Public
3796+ License along with this program; if not, write to the Free Software
3797+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3798+ USA. */
3799
3800 #ifdef HAVE_CONFIG_H
3801 # include <config.h>
3802 #endif
3803
3804-#include <sys/types.h>
3805-
3806-#ifdef __GNUC__
3807-# define alloca __builtin_alloca
3808-# define HAVE_ALLOCA 1
3809-#else
3810-# if defined HAVE_ALLOCA_H || defined _LIBC
3811-# include <alloca.h>
3812-# else
3813-# ifdef _AIX
3814- #pragma alloca
3815-# else
3816-# ifndef alloca
3817-char *alloca ();
3818-# endif
3819-# endif
3820-# endif
3821-#endif
3822-
3823-#include <errno.h>
3824-#ifndef errno
3825-extern int errno;
3826-#endif
3827-#ifndef __set_errno
3828-# define __set_errno(val) errno = (val)
3829-#endif
3830-
3831-#if defined STDC_HEADERS || defined _LIBC
3832-# include <stdlib.h>
3833-#else
3834-char *getenv ();
3835-# ifdef HAVE_MALLOC_H
3836-# include <malloc.h>
3837-# else
3838-void free ();
3839-# endif
3840-#endif
3841-
3842-#if defined HAVE_STRING_H || defined _LIBC
3843-# ifndef _GNU_SOURCE
3844-# define _GNU_SOURCE 1
3845-# endif
3846-# include <string.h>
3847-#else
3848-# include <strings.h>
3849-#endif
3850-#if !HAVE_STRCHR && !defined _LIBC
3851-# ifndef strchr
3852-# define strchr index
3853-# endif
3854-#endif
3855-
3856-#if defined HAVE_UNISTD_H || defined _LIBC
3857-# include <unistd.h>
3858-#endif
3859-
3860-#include "gettext.h"
3861 #include "gettextP.h"
3862 #ifdef _LIBC
3863 # include <libintl.h>
3864 #else
3865-# include "libgettext.h"
3866+# include "libgnuintl.h"
3867 #endif
3868-#include "hash-string.h"
3869
3870 /* @@ end of prolog @@ */
3871
3872-#ifdef _LIBC
3873-/* Rename the non ANSI C functions. This is required by the standard
3874- because some ANSI C functions will require linking with this object
3875- file and the name space must not be polluted. */
3876-# define getcwd __getcwd
3877-# define stpcpy __stpcpy
3878-#else
3879-# if !defined HAVE_GETCWD
3880-char *getwd ();
3881-# define getcwd(buf, max) getwd (buf)
3882-# else
3883-char *getcwd ();
3884-# endif
3885-# ifndef HAVE_STPCPY
3886-static char *stpcpy PARAMS ((char *dest, const char *src));
3887-# endif
3888-#endif
3889-
3890-/* Amount to increase buffer size by in each try. */
3891-#define PATH_INCR 32
3892-
3893-/* The following is from pathmax.h. */
3894-/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
3895- PATH_MAX but might cause redefinition warnings when sys/param.h is
3896- later included (as on MORE/BSD 4.3). */
3897-#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
3898-# include <limits.h>
3899-#endif
3900-
3901-#ifndef _POSIX_PATH_MAX
3902-# define _POSIX_PATH_MAX 255
3903-#endif
3904-
3905-#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
3906-# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
3907-#endif
3908-
3909-/* Don't include sys/param.h if it already has been. */
3910-#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
3911-# include <sys/param.h>
3912-#endif
3913-
3914-#if !defined(PATH_MAX) && defined(MAXPATHLEN)
3915-# define PATH_MAX MAXPATHLEN
3916-#endif
3917-
3918-#ifndef PATH_MAX
3919-# define PATH_MAX _POSIX_PATH_MAX
3920-#endif
3921-
3922-/* XPG3 defines the result of `setlocale (category, NULL)' as:
3923- ``Directs `setlocale()' to query `category' and return the current
3924- setting of `local'.''
3925- However it does not specify the exact format. And even worse: POSIX
3926- defines this not at all. So we can use this feature only on selected
3927- system (e.g. those using GNU C Library). */
3928-#ifdef _LIBC
3929-# define HAVE_LOCALE_NULL
3930-#endif
3931-
3932-/* Name of the default domain used for gettext(3) prior any call to
3933- textdomain(3). The default value for this is "messages". */
3934-const char _nl_default_default_domain[] = "messages";
3935-
3936-/* Value used as the default domain for gettext(3). */
3937-const char *_nl_current_default_domain = _nl_default_default_domain;
3938-
3939-/* Contains the default location of the message catalogs. */
3940-const char _nl_default_dirname[] = GNULOCALEDIR;
3941-
3942-/* List with bindings of specific domains created by bindtextdomain()
3943- calls. */
3944-struct binding *_nl_domain_bindings;
3945-
3946-/* Prototypes for local functions. */
3947-static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
3948- const char *msgid));
3949-static const char *category_to_name PARAMS ((int category));
3950-static const char *guess_category_value PARAMS ((int category,
3951- const char *categoryname));
3952-
3953-
3954-/* For those loosing systems which don't have `alloca' we have to add
3955- some additional code emulating it. */
3956-#ifdef HAVE_ALLOCA
3957-/* Nothing has to be done. */
3958-# define ADD_BLOCK(list, address) /* nothing */
3959-# define FREE_BLOCKS(list) /* nothing */
3960-#else
3961-struct block_list
3962-{
3963- void *address;
3964- struct block_list *next;
3965-};
3966-# define ADD_BLOCK(list, addr) \
3967- do { \
3968- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
3969- /* If we cannot get a free block we cannot add the new element to \
3970- the list. */ \
3971- if (newp != NULL) { \
3972- newp->address = (addr); \
3973- newp->next = (list); \
3974- (list) = newp; \
3975- } \
3976- } while (0)
3977-# define FREE_BLOCKS(list) \
3978- do { \
3979- while (list != NULL) { \
3980- struct block_list *old = list; \
3981- list = list->next; \
3982- free (old); \
3983- } \
3984- } while (0)
3985-# undef alloca
3986-# define alloca(size) (malloc (size))
3987-#endif /* have alloca */
3988-
3989-
3990 /* Names for the libintl functions are a problem. They must not clash
3991 with existing names and they should follow ANSI C. But this source
3992 code is also used in GNU C Library where the names have a __
3993 prefix. So we have to make a difference here. */
3994 #ifdef _LIBC
3995 # define DCGETTEXT __dcgettext
3996+# define DCIGETTEXT __dcigettext
3997 #else
3998-# define DCGETTEXT dcgettext__
3999+# define DCGETTEXT libintl_dcgettext
4000+# define DCIGETTEXT libintl_dcigettext
4001 #endif
4002
4003 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
4004 locale. */
4005 char *
4006-DCGETTEXT (domainname, msgid, category)
4007- const char *domainname;
4008- const char *msgid;
4009- int category;
4010+DCGETTEXT (const char *domainname, const char *msgid, int category)
4011 {
4012-#ifndef HAVE_ALLOCA
4013- struct block_list *block_list = NULL;
4014-#endif
4015- struct loaded_l10nfile *domain;
4016- struct binding *binding;
4017- const char *categoryname;
4018- const char *categoryvalue;
4019- char *dirname, *xdomainname;
4020- char *single_locale;
4021- char *retval;
4022- int saved_errno = errno;
4023-
4024- /* If no real MSGID is given return NULL. */
4025- if (msgid == NULL)
4026- return NULL;
4027-
4028- /* If DOMAINNAME is NULL, we are interested in the default domain. If
4029- CATEGORY is not LC_MESSAGES this might not make much sense but the
4030- defintion left this undefined. */
4031- if (domainname == NULL)
4032- domainname = _nl_current_default_domain;
4033-
4034- /* First find matching binding. */
4035- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
4036- {
4037- int compare = strcmp (domainname, binding->domainname);
4038- if (compare == 0)
4039- /* We found it! */
4040- break;
4041- if (compare < 0)
4042- {
4043- /* It is not in the list. */
4044- binding = NULL;
4045- break;
4046- }
4047- }
4048-
4049- if (binding == NULL)
4050- dirname = (char *) _nl_default_dirname;
4051- else if (binding->dirname[0] == '/')
4052- dirname = binding->dirname;
4053- else
4054- {
4055- /* We have a relative path. Make it absolute now. */
4056- size_t dirname_len = strlen (binding->dirname) + 1;
4057- size_t path_max;
4058- char *ret;
4059-
4060- path_max = (unsigned) PATH_MAX;
4061- path_max += 2; /* The getcwd docs say to do this. */
4062-
4063- dirname = (char *) alloca (path_max + dirname_len);
4064- ADD_BLOCK (block_list, dirname);
4065-
4066- __set_errno (0);
4067- while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
4068- {
4069- path_max += PATH_INCR;
4070- dirname = (char *) alloca (path_max + dirname_len);
4071- ADD_BLOCK (block_list, dirname);
4072- __set_errno (0);
4073- }
4074-
4075- if (ret == NULL)
4076- {
4077- /* We cannot get the current working directory. Don't signal an
4078- error but simply return the default string. */
4079- FREE_BLOCKS (block_list);
4080- __set_errno (saved_errno);
4081- return (char *) msgid;
4082- }
4083-
4084- stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
4085- }
4086-
4087- /* Now determine the symbolic name of CATEGORY and its value. */
4088- categoryname = category_to_name (category);
4089- categoryvalue = guess_category_value (category, categoryname);
4090-
4091- xdomainname = (char *) alloca (strlen (categoryname)
4092- + strlen (domainname) + 5);
4093- ADD_BLOCK (block_list, xdomainname);
4094-
4095- stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
4096- domainname),
4097- ".mo");
4098-
4099- /* Creating working area. */
4100- single_locale = (char *) alloca (strlen (categoryvalue) + 1);
4101- ADD_BLOCK (block_list, single_locale);
4102-
4103-
4104- /* Search for the given string. This is a loop because we perhaps
4105- got an ordered list of languages to consider for th translation. */
4106- while (1)
4107- {
4108- /* Make CATEGORYVALUE point to the next element of the list. */
4109- while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
4110- ++categoryvalue;
4111- if (categoryvalue[0] == '\0')
4112- {
4113- /* The whole contents of CATEGORYVALUE has been searched but
4114- no valid entry has been found. We solve this situation
4115- by implicitly appending a "C" entry, i.e. no translation
4116- will take place. */
4117- single_locale[0] = 'C';
4118- single_locale[1] = '\0';
4119- }
4120- else
4121- {
4122- char *cp = single_locale;
4123- while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
4124- *cp++ = *categoryvalue++;
4125- *cp = '\0';
4126- }
4127-
4128- /* If the current locale value is C (or POSIX) we don't load a
4129- domain. Return the MSGID. */
4130- if (strcmp (single_locale, "C") == 0
4131- || strcmp (single_locale, "POSIX") == 0)
4132- {
4133- FREE_BLOCKS (block_list);
4134- __set_errno (saved_errno);
4135- return (char *) msgid;
4136- }
4137-
4138-
4139- /* Find structure describing the message catalog matching the
4140- DOMAINNAME and CATEGORY. */
4141- domain = _nl_find_domain (dirname, single_locale, xdomainname);
4142-
4143- if (domain != NULL)
4144- {
4145- retval = find_msg (domain, msgid);
4146-
4147- if (retval == NULL)
4148- {
4149- int cnt;
4150-
4151- for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
4152- {
4153- retval = find_msg (domain->successor[cnt], msgid);
4154-
4155- if (retval != NULL)
4156- break;
4157- }
4158- }
4159-
4160- if (retval != NULL)
4161- {
4162- FREE_BLOCKS (block_list);
4163- __set_errno (saved_errno);
4164- return retval;
4165- }
4166- }
4167- }
4168- /* NOTREACHED */
4169+ return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
4170 }
4171
4172 #ifdef _LIBC
4173 /* Alias for function name in GNU C Library. */
4174+INTDEF(__dcgettext)
4175 weak_alias (__dcgettext, dcgettext);
4176 #endif
4177-
4178-
4179-static char *
4180-find_msg (domain_file, msgid)
4181- struct loaded_l10nfile *domain_file;
4182- const char *msgid;
4183-{
4184- size_t top, act, bottom;
4185- struct loaded_domain *domain;
4186-
4187- if (domain_file->decided == 0)
4188- _nl_load_domain (domain_file);
4189-
4190- if (domain_file->data == NULL)
4191- return NULL;
4192-
4193- domain = (struct loaded_domain *) domain_file->data;
4194-
4195- /* Locate the MSGID and its translation. */
4196- if (domain->hash_size > 2 && domain->hash_tab != NULL)
4197- {
4198- /* Use the hashing table. */
4199- nls_uint32 len = strlen (msgid);
4200- nls_uint32 hash_val = hash_string (msgid);
4201- nls_uint32 idx = hash_val % domain->hash_size;
4202- nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
4203- nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
4204-
4205- if (nstr == 0)
4206- /* Hash table entry is empty. */
4207- return NULL;
4208-
4209- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
4210- && strcmp (msgid,
4211- domain->data + W (domain->must_swap,
4212- domain->orig_tab[nstr - 1].offset)) == 0)
4213- return (char *) domain->data + W (domain->must_swap,
4214- domain->trans_tab[nstr - 1].offset);
4215-
4216- while (1)
4217- {
4218- if (idx >= domain->hash_size - incr)
4219- idx -= domain->hash_size - incr;
4220- else
4221- idx += incr;
4222-
4223- nstr = W (domain->must_swap, domain->hash_tab[idx]);
4224- if (nstr == 0)
4225- /* Hash table entry is empty. */
4226- return NULL;
4227-
4228- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
4229- && strcmp (msgid,
4230- domain->data + W (domain->must_swap,
4231- domain->orig_tab[nstr - 1].offset))
4232- == 0)
4233- return (char *) domain->data
4234- + W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
4235- }
4236- /* NOTREACHED */
4237- }
4238-
4239- /* Now we try the default method: binary search in the sorted
4240- array of messages. */
4241- bottom = 0;
4242- top = domain->nstrings;
4243- while (bottom < top)
4244- {
4245- int cmp_val;
4246-
4247- act = (bottom + top) / 2;
4248- cmp_val = strcmp (msgid, domain->data
4249- + W (domain->must_swap,
4250- domain->orig_tab[act].offset));
4251- if (cmp_val < 0)
4252- top = act;
4253- else if (cmp_val > 0)
4254- bottom = act + 1;
4255- else
4256- break;
4257- }
4258-
4259- /* If an translation is found return this. */
4260- return bottom >= top ? NULL : (char *) domain->data
4261- + W (domain->must_swap,
4262- domain->trans_tab[act].offset);
4263-}
4264-
4265-
4266-/* Return string representation of locale CATEGORY. */
4267-static const char *
4268-category_to_name (category)
4269- int category;
4270-{
4271- const char *retval;
4272-
4273- switch (category)
4274- {
4275-#ifdef LC_COLLATE
4276- case LC_COLLATE:
4277- retval = "LC_COLLATE";
4278- break;
4279-#endif
4280-#ifdef LC_CTYPE
4281- case LC_CTYPE:
4282- retval = "LC_CTYPE";
4283- break;
4284-#endif
4285-#ifdef LC_MONETARY
4286- case LC_MONETARY:
4287- retval = "LC_MONETARY";
4288- break;
4289-#endif
4290-#ifdef LC_NUMERIC
4291- case LC_NUMERIC:
4292- retval = "LC_NUMERIC";
4293- break;
4294-#endif
4295-#ifdef LC_TIME
4296- case LC_TIME:
4297- retval = "LC_TIME";
4298- break;
4299-#endif
4300-#ifdef LC_MESSAGES
4301- case LC_MESSAGES:
4302- retval = "LC_MESSAGES";
4303- break;
4304-#endif
4305-#ifdef LC_RESPONSE
4306- case LC_RESPONSE:
4307- retval = "LC_RESPONSE";
4308- break;
4309-#endif
4310-#ifdef LC_ALL
4311- case LC_ALL:
4312- /* This might not make sense but is perhaps better than any other
4313- value. */
4314- retval = "LC_ALL";
4315- break;
4316-#endif
4317- default:
4318- /* If you have a better idea for a default value let me know. */
4319- retval = "LC_XXX";
4320- }
4321-
4322- return retval;
4323-}
4324-
4325-/* Guess value of current locale from value of the environment variables. */
4326-static const char *
4327-guess_category_value (category, categoryname)
4328- int category;
4329- const char *categoryname;
4330-{
4331- const char *retval;
4332-
4333- /* The highest priority value is the `LANGUAGE' environment
4334- variable. This is a GNU extension. */
4335- retval = getenv ("LANGUAGE");
4336- if (retval != NULL && retval[0] != '\0')
4337- return retval;
4338-
4339- /* `LANGUAGE' is not set. So we have to proceed with the POSIX
4340- methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
4341- systems this can be done by the `setlocale' function itself. */
4342-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
4343- return setlocale (category, NULL);
4344-#else
4345- /* Setting of LC_ALL overwrites all other. */
4346- retval = getenv ("LC_ALL");
4347- if (retval != NULL && retval[0] != '\0')
4348- return retval;
4349-
4350- /* Next comes the name of the desired category. */
4351- retval = getenv (categoryname);
4352- if (retval != NULL && retval[0] != '\0')
4353- return retval;
4354-
4355- /* Last possibility is the LANG environment variable. */
4356- retval = getenv ("LANG");
4357- if (retval != NULL && retval[0] != '\0')
4358- return retval;
4359-
4360- /* We use C as the default domain. POSIX says this is implementation
4361- defined. */
4362- return "C";
4363-#endif
4364-}
4365-
4366-/* @@ begin of epilog @@ */
4367-
4368-/* We don't want libintl.a to depend on any other library. So we
4369- avoid the non-standard function stpcpy. In GNU C Library this
4370- function is available, though. Also allow the symbol HAVE_STPCPY
4371- to be defined. */
4372-#if !_LIBC && !HAVE_STPCPY
4373-static char *
4374-stpcpy (dest, src)
4375- char *dest;
4376- const char *src;
4377-{
4378- while ((*dest++ = *src++) != '\0')
4379- /* Do nothing. */ ;
4380- return dest - 1;
4381-}
4382-#endif
4383--- lrzsz-0.12.20.safe/intl/dcigettext.c 1969-12-31 19:00:00.000000000 -0500
4384+++ lrzsz-0.12.20/intl/dcigettext.c 2004-09-12 14:40:34.369745960 -0400
4385@@ -0,0 +1,1219 @@
4386+/* Implementation of the internal dcigettext function.
4387+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
4388+
4389+ This program is free software; you can redistribute it and/or modify it
4390+ under the terms of the GNU Library General Public License as published
4391+ by the Free Software Foundation; either version 2, or (at your option)
4392+ any later version.
4393+
4394+ This program is distributed in the hope that it will be useful,
4395+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4396+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4397+ Library General Public License for more details.
4398+
4399+ You should have received a copy of the GNU Library General Public
4400+ License along with this program; if not, write to the Free Software
4401+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
4402+ USA. */
4403+
4404+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
4405+ This must come before <config.h> because <config.h> may include
4406+ <features.h>, and once <features.h> has been included, it's too late. */
4407+#ifndef _GNU_SOURCE
4408+# define _GNU_SOURCE 1
4409+#endif
4410+
4411+#ifdef HAVE_CONFIG_H
4412+# include <config.h>
4413+#endif
4414+
4415+#include <sys/types.h>
4416+
4417+#ifdef __GNUC__
4418+# define alloca __builtin_alloca
4419+# define HAVE_ALLOCA 1
4420+#else
4421+# ifdef _MSC_VER
4422+# include <malloc.h>
4423+# define alloca _alloca
4424+# else
4425+# if defined HAVE_ALLOCA_H || defined _LIBC
4426+# include <alloca.h>
4427+# else
4428+# ifdef _AIX
4429+ #pragma alloca
4430+# else
4431+# ifndef alloca
4432+char *alloca ();
4433+# endif
4434+# endif
4435+# endif
4436+# endif
4437+#endif
4438+
4439+#include <errno.h>
4440+#ifndef errno
4441+extern int errno;
4442+#endif
4443+#ifndef __set_errno
4444+# define __set_errno(val) errno = (val)
4445+#endif
4446+
4447+#include <stddef.h>
4448+#include <stdlib.h>
4449+#include <string.h>
4450+
4451+#if defined HAVE_UNISTD_H || defined _LIBC
4452+# include <unistd.h>
4453+#endif
4454+
4455+#include <locale.h>
4456+
4457+#ifdef _LIBC
4458+ /* Guess whether integer division by zero raises signal SIGFPE.
4459+ Set to 1 only if you know for sure. In case of doubt, set to 0. */
4460+# if defined __alpha__ || defined __arm__ || defined __i386__ \
4461+ || defined __m68k__ || defined __s390__
4462+# define INTDIV0_RAISES_SIGFPE 1
4463+# else
4464+# define INTDIV0_RAISES_SIGFPE 0
4465+# endif
4466+#endif
4467+#if !INTDIV0_RAISES_SIGFPE
4468+# include <signal.h>
4469+#endif
4470+
4471+#if defined HAVE_SYS_PARAM_H || defined _LIBC
4472+# include <sys/param.h>
4473+#endif
4474+
4475+#include "gettextP.h"
4476+#include "plural-exp.h"
4477+#ifdef _LIBC
4478+# include <libintl.h>
4479+#else
4480+# include "libgnuintl.h"
4481+#endif
4482+#include "hash-string.h"
4483+
4484+/* Thread safetyness. */
4485+#ifdef _LIBC
4486+# include <bits/libc-lock.h>
4487+#else
4488+/* Provide dummy implementation if this is outside glibc. */
4489+# define __libc_lock_define_initialized(CLASS, NAME)
4490+# define __libc_lock_lock(NAME)
4491+# define __libc_lock_unlock(NAME)
4492+# define __libc_rwlock_define_initialized(CLASS, NAME)
4493+# define __libc_rwlock_rdlock(NAME)
4494+# define __libc_rwlock_unlock(NAME)
4495+#endif
4496+
4497+/* Alignment of types. */
4498+#if defined __GNUC__ && __GNUC__ >= 2
4499+# define alignof(TYPE) __alignof__ (TYPE)
4500+#else
4501+# define alignof(TYPE) \
4502+ ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
4503+#endif
4504+
4505+/* The internal variables in the standalone libintl.a must have different
4506+ names than the internal variables in GNU libc, otherwise programs
4507+ using libintl.a cannot be linked statically. */
4508+#if !defined _LIBC
4509+# define _nl_default_default_domain libintl_nl_default_default_domain
4510+# define _nl_current_default_domain libintl_nl_current_default_domain
4511+# define _nl_default_dirname libintl_nl_default_dirname
4512+# define _nl_domain_bindings libintl_nl_domain_bindings
4513+#endif
4514+
4515+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
4516+#ifndef offsetof
4517+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
4518+#endif
4519+
4520+/* @@ end of prolog @@ */
4521+
4522+#ifdef _LIBC
4523+/* Rename the non ANSI C functions. This is required by the standard
4524+ because some ANSI C functions will require linking with this object
4525+ file and the name space must not be polluted. */
4526+# define getcwd __getcwd
4527+# ifndef stpcpy
4528+# define stpcpy __stpcpy
4529+# endif
4530+# define tfind __tfind
4531+#else
4532+# if !defined HAVE_GETCWD
4533+char *getwd ();
4534+# define getcwd(buf, max) getwd (buf)
4535+# else
4536+# if VMS
4537+# define getcwd(buf, max) (getcwd) (buf, max, 0)
4538+# else
4539+char *getcwd ();
4540+# endif
4541+# endif
4542+# ifndef HAVE_STPCPY
4543+static char *stpcpy (char *dest, const char *src);
4544+# endif
4545+# ifndef HAVE_MEMPCPY
4546+static void *mempcpy (void *dest, const void *src, size_t n);
4547+# endif
4548+#endif
4549+
4550+/* Amount to increase buffer size by in each try. */
4551+#define PATH_INCR 32
4552+
4553+/* The following is from pathmax.h. */
4554+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
4555+ PATH_MAX but might cause redefinition warnings when sys/param.h is
4556+ later included (as on MORE/BSD 4.3). */
4557+#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
4558+# include <limits.h>
4559+#endif
4560+
4561+#ifndef _POSIX_PATH_MAX
4562+# define _POSIX_PATH_MAX 255
4563+#endif
4564+
4565+#if !defined PATH_MAX && defined _PC_PATH_MAX
4566+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
4567+#endif
4568+
4569+/* Don't include sys/param.h if it already has been. */
4570+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
4571+# include <sys/param.h>
4572+#endif
4573+
4574+#if !defined PATH_MAX && defined MAXPATHLEN
4575+# define PATH_MAX MAXPATHLEN
4576+#endif
4577+
4578+#ifndef PATH_MAX
4579+# define PATH_MAX _POSIX_PATH_MAX
4580+#endif
4581+
4582+/* Pathname support.
4583+ ISSLASH(C) tests whether C is a directory separator character.
4584+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
4585+ it may be concatenated to a directory pathname.
4586+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
4587+ */
4588+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
4589+ /* Win32, OS/2, DOS */
4590+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
4591+# define HAS_DEVICE(P) \
4592+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
4593+ && (P)[1] == ':')
4594+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
4595+# define IS_PATH_WITH_DIR(P) \
4596+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
4597+#else
4598+ /* Unix */
4599+# define ISSLASH(C) ((C) == '/')
4600+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
4601+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
4602+#endif
4603+
4604+/* This is the type used for the search tree where known translations
4605+ are stored. */
4606+struct known_translation_t
4607+{
4608+ /* Domain in which to search. */
4609+ char *domainname;
4610+
4611+ /* The category. */
4612+ int category;
4613+
4614+ /* State of the catalog counter at the point the string was found. */
4615+ int counter;
4616+
4617+ /* Catalog where the string was found. */
4618+ struct loaded_l10nfile *domain;
4619+
4620+ /* And finally the translation. */
4621+ const char *translation;
4622+ size_t translation_length;
4623+
4624+ /* Pointer to the string in question. */
4625+ char msgid[ZERO];
4626+};
4627+
4628+/* Root of the search tree with known translations. We can use this
4629+ only if the system provides the `tsearch' function family. */
4630+#if defined HAVE_TSEARCH || defined _LIBC
4631+# include <search.h>
4632+
4633+static void *root;
4634+
4635+# ifdef _LIBC
4636+# define tsearch __tsearch
4637+# endif
4638+
4639+/* Function to compare two entries in the table of known translations. */
4640+static int
4641+transcmp (const void *p1, const void *p2)
4642+{
4643+ const struct known_translation_t *s1;
4644+ const struct known_translation_t *s2;
4645+ int result;
4646+
4647+ s1 = (const struct known_translation_t *) p1;
4648+ s2 = (const struct known_translation_t *) p2;
4649+
4650+ result = strcmp (s1->msgid, s2->msgid);
4651+ if (result == 0)
4652+ {
4653+ result = strcmp (s1->domainname, s2->domainname);
4654+ if (result == 0)
4655+ /* We compare the category last (though this is the cheapest
4656+ operation) since it is hopefully always the same (namely
4657+ LC_MESSAGES). */
4658+ result = s1->category - s2->category;
4659+ }
4660+
4661+ return result;
4662+}
4663+#endif
4664+
4665+#ifndef INTVARDEF
4666+# define INTVARDEF(name)
4667+#endif
4668+#ifndef INTUSE
4669+# define INTUSE(name) name
4670+#endif
4671+
4672+/* Name of the default domain used for gettext(3) prior any call to
4673+ textdomain(3). The default value for this is "messages". */
4674+const char _nl_default_default_domain[] attribute_hidden = "messages";
4675+
4676+/* Value used as the default domain for gettext(3). */
4677+const char *_nl_current_default_domain attribute_hidden
4678+ = _nl_default_default_domain;
4679+
4680+/* Contains the default location of the message catalogs. */
4681+#if defined __EMX__
4682+extern const char _nl_default_dirname[];
4683+#else
4684+const char _nl_default_dirname[] = LOCALEDIR;
4685+INTVARDEF (_nl_default_dirname)
4686+#endif
4687+
4688+/* List with bindings of specific domains created by bindtextdomain()
4689+ calls. */
4690+struct binding *_nl_domain_bindings;
4691+
4692+/* Prototypes for local functions. */
4693+static char *plural_lookup (struct loaded_l10nfile *domain,
4694+ unsigned long int n,
4695+ const char *translation, size_t translation_len)
4696+ internal_function;
4697+static const char *guess_category_value (int category,
4698+ const char *categoryname)
4699+ internal_function;
4700+#ifdef _LIBC
4701+# include "../locale/localeinfo.h"
4702+# define category_to_name(category) _nl_category_names[category]
4703+#else
4704+static const char *category_to_name (int category) internal_function;
4705+#endif
4706+
4707+
4708+/* For those loosing systems which don't have `alloca' we have to add
4709+ some additional code emulating it. */
4710+#ifdef HAVE_ALLOCA
4711+/* Nothing has to be done. */
4712+# define freea(p) /* nothing */
4713+# define ADD_BLOCK(list, address) /* nothing */
4714+# define FREE_BLOCKS(list) /* nothing */
4715+#else
4716+struct block_list
4717+{
4718+ void *address;
4719+ struct block_list *next;
4720+};
4721+# define ADD_BLOCK(list, addr) \
4722+ do { \
4723+ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
4724+ /* If we cannot get a free block we cannot add the new element to \
4725+ the list. */ \
4726+ if (newp != NULL) { \
4727+ newp->address = (addr); \
4728+ newp->next = (list); \
4729+ (list) = newp; \
4730+ } \
4731+ } while (0)
4732+# define FREE_BLOCKS(list) \
4733+ do { \
4734+ while (list != NULL) { \
4735+ struct block_list *old = list; \
4736+ list = list->next; \
4737+ free (old->address); \
4738+ free (old); \
4739+ } \
4740+ } while (0)
4741+# undef alloca
4742+# define alloca(size) (malloc (size))
4743+# define freea(p) free (p)
4744+#endif /* have alloca */
4745+
4746+
4747+#ifdef _LIBC
4748+/* List of blocks allocated for translations. */
4749+typedef struct transmem_list
4750+{
4751+ struct transmem_list *next;
4752+ char data[ZERO];
4753+} transmem_block_t;
4754+static struct transmem_list *transmem_list;
4755+#else
4756+typedef unsigned char transmem_block_t;
4757+#endif
4758+
4759+
4760+/* Names for the libintl functions are a problem. They must not clash
4761+ with existing names and they should follow ANSI C. But this source
4762+ code is also used in GNU C Library where the names have a __
4763+ prefix. So we have to make a difference here. */
4764+#ifdef _LIBC
4765+# define DCIGETTEXT __dcigettext
4766+#else
4767+# define DCIGETTEXT libintl_dcigettext
4768+#endif
4769+
4770+/* Lock variable to protect the global data in the gettext implementation. */
4771+#ifdef _LIBC
4772+__libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
4773+#endif
4774+
4775+/* Checking whether the binaries runs SUID must be done and glibc provides
4776+ easier methods therefore we make a difference here. */
4777+#ifdef _LIBC
4778+# define ENABLE_SECURE __libc_enable_secure
4779+# define DETERMINE_SECURE
4780+#else
4781+# ifndef HAVE_GETUID
4782+# define getuid() 0
4783+# endif
4784+# ifndef HAVE_GETGID
4785+# define getgid() 0
4786+# endif
4787+# ifndef HAVE_GETEUID
4788+# define geteuid() getuid()
4789+# endif
4790+# ifndef HAVE_GETEGID
4791+# define getegid() getgid()
4792+# endif
4793+static int enable_secure;
4794+# define ENABLE_SECURE (enable_secure == 1)
4795+# define DETERMINE_SECURE \
4796+ if (enable_secure == 0) \
4797+ { \
4798+ if (getuid () != geteuid () || getgid () != getegid ()) \
4799+ enable_secure = 1; \
4800+ else \
4801+ enable_secure = -1; \
4802+ }
4803+#endif
4804+
4805+/* Get the function to evaluate the plural expression. */
4806+#include "eval-plural.h"
4807+
4808+/* Look up MSGID in the DOMAINNAME message catalog for the current
4809+ CATEGORY locale and, if PLURAL is nonzero, search over string
4810+ depending on the plural form determined by N. */
4811+char *
4812+DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
4813+ int plural, unsigned long int n, int category)
4814+{
4815+#ifndef HAVE_ALLOCA
4816+ struct block_list *block_list = NULL;
4817+#endif
4818+ struct loaded_l10nfile *domain;
4819+ struct binding *binding;
4820+ const char *categoryname;
4821+ const char *categoryvalue;
4822+ char *dirname, *xdomainname;
4823+ char *single_locale;
4824+ char *retval;
4825+ size_t retlen;
4826+ int saved_errno;
4827+#if defined HAVE_TSEARCH || defined _LIBC
4828+ struct known_translation_t *search;
4829+ struct known_translation_t **foundp = NULL;
4830+ size_t msgid_len;
4831+#endif
4832+ size_t domainname_len;
4833+
4834+ /* If no real MSGID is given return NULL. */
4835+ if (msgid1 == NULL)
4836+ return NULL;
4837+
4838+#ifdef _LIBC
4839+ if (category < 0 || category >= __LC_LAST || category == LC_ALL)
4840+ /* Bogus. */
4841+ return (plural == 0
4842+ ? (char *) msgid1
4843+ /* Use the Germanic plural rule. */
4844+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
4845+#endif
4846+
4847+ __libc_rwlock_rdlock (_nl_state_lock);
4848+
4849+ /* If DOMAINNAME is NULL, we are interested in the default domain. If
4850+ CATEGORY is not LC_MESSAGES this might not make much sense but the
4851+ definition left this undefined. */
4852+ if (domainname == NULL)
4853+ domainname = _nl_current_default_domain;
4854+
4855+ /* OS/2 specific: backward compatibility with older libintl versions */
4856+#ifdef LC_MESSAGES_COMPAT
4857+ if (category == LC_MESSAGES_COMPAT)
4858+ category = LC_MESSAGES;
4859+#endif
4860+
4861+#if defined HAVE_TSEARCH || defined _LIBC
4862+ msgid_len = strlen (msgid1) + 1;
4863+
4864+ /* Try to find the translation among those which we found at
4865+ some time. */
4866+ search = (struct known_translation_t *)
4867+ alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
4868+ memcpy (search->msgid, msgid1, msgid_len);
4869+ search->domainname = (char *) domainname;
4870+ search->category = category;
4871+
4872+ foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
4873+ freea (search);
4874+ if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
4875+ {
4876+ /* Now deal with plural. */
4877+ if (plural)
4878+ retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
4879+ (*foundp)->translation_length);
4880+ else
4881+ retval = (char *) (*foundp)->translation;
4882+
4883+ __libc_rwlock_unlock (_nl_state_lock);
4884+ return retval;
4885+ }
4886+#endif
4887+
4888+ /* Preserve the `errno' value. */
4889+ saved_errno = errno;
4890+
4891+ /* See whether this is a SUID binary or not. */
4892+ DETERMINE_SECURE;
4893+
4894+ /* First find matching binding. */
4895+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
4896+ {
4897+ int compare = strcmp (domainname, binding->domainname);
4898+ if (compare == 0)
4899+ /* We found it! */
4900+ break;
4901+ if (compare < 0)
4902+ {
4903+ /* It is not in the list. */
4904+ binding = NULL;
4905+ break;
4906+ }
4907+ }
4908+
4909+ if (binding == NULL)
4910+ dirname = (char *) INTUSE(_nl_default_dirname);
4911+ else if (IS_ABSOLUTE_PATH (binding->dirname))
4912+ dirname = binding->dirname;
4913+ else
4914+ {
4915+ /* We have a relative path. Make it absolute now. */
4916+ size_t dirname_len = strlen (binding->dirname) + 1;
4917+ size_t path_max;
4918+ char *ret;
4919+
4920+ path_max = (unsigned int) PATH_MAX;
4921+ path_max += 2; /* The getcwd docs say to do this. */
4922+
4923+ for (;;)
4924+ {
4925+ dirname = (char *) alloca (path_max + dirname_len);
4926+ ADD_BLOCK (block_list, dirname);
4927+
4928+ __set_errno (0);
4929+ ret = getcwd (dirname, path_max);
4930+ if (ret != NULL || errno != ERANGE)
4931+ break;
4932+
4933+ path_max += path_max / 2;
4934+ path_max += PATH_INCR;
4935+ }
4936+
4937+ if (ret == NULL)
4938+ /* We cannot get the current working directory. Don't signal an
4939+ error but simply return the default string. */
4940+ goto return_untranslated;
4941+
4942+ stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
4943+ }
4944+
4945+ /* Now determine the symbolic name of CATEGORY and its value. */
4946+ categoryname = category_to_name (category);
4947+ categoryvalue = guess_category_value (category, categoryname);
4948+
4949+ domainname_len = strlen (domainname);
4950+ xdomainname = (char *) alloca (strlen (categoryname)
4951+ + domainname_len + 5);
4952+ ADD_BLOCK (block_list, xdomainname);
4953+
4954+ stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
4955+ domainname, domainname_len),
4956+ ".mo");
4957+
4958+ /* Creating working area. */
4959+ single_locale = (char *) alloca (strlen (categoryvalue) + 1);
4960+ ADD_BLOCK (block_list, single_locale);
4961+
4962+
4963+ /* Search for the given string. This is a loop because we perhaps
4964+ got an ordered list of languages to consider for the translation. */
4965+ while (1)
4966+ {
4967+ /* Make CATEGORYVALUE point to the next element of the list. */
4968+ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
4969+ ++categoryvalue;
4970+ if (categoryvalue[0] == '\0')
4971+ {
4972+ /* The whole contents of CATEGORYVALUE has been searched but
4973+ no valid entry has been found. We solve this situation
4974+ by implicitly appending a "C" entry, i.e. no translation
4975+ will take place. */
4976+ single_locale[0] = 'C';
4977+ single_locale[1] = '\0';
4978+ }
4979+ else
4980+ {
4981+ char *cp = single_locale;
4982+ while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
4983+ *cp++ = *categoryvalue++;
4984+ *cp = '\0';
4985+
4986+ /* When this is a SUID binary we must not allow accessing files
4987+ outside the dedicated directories. */
4988+ if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
4989+ /* Ingore this entry. */
4990+ continue;
4991+ }
4992+
4993+ /* If the current locale value is C (or POSIX) we don't load a
4994+ domain. Return the MSGID. */
4995+ if (strcmp (single_locale, "C") == 0
4996+ || strcmp (single_locale, "POSIX") == 0)
4997+ break;
4998+
4999+ /* Find structure describing the message catalog matching the
5000+ DOMAINNAME and CATEGORY. */
5001+ domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
5002+
5003+ if (domain != NULL)
5004+ {
5005+ retval = _nl_find_msg (domain, binding, msgid1, &retlen);
5006+
5007+ if (retval == NULL)
5008+ {
5009+ int cnt;
5010+
5011+ for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
5012+ {
5013+ retval = _nl_find_msg (domain->successor[cnt], binding,
5014+ msgid1, &retlen);
5015+
5016+ if (retval != NULL)
5017+ {
5018+ domain = domain->successor[cnt];
5019+ break;
5020+ }
5021+ }
5022+ }
5023+
5024+ if (retval != NULL)
5025+ {
5026+ /* Found the translation of MSGID1 in domain DOMAIN:
5027+ starting at RETVAL, RETLEN bytes. */
5028+ FREE_BLOCKS (block_list);
5029+#if defined HAVE_TSEARCH || defined _LIBC
5030+ if (foundp == NULL)
5031+ {
5032+ /* Create a new entry and add it to the search tree. */
5033+ struct known_translation_t *newp;
5034+
5035+ newp = (struct known_translation_t *)
5036+ malloc (offsetof (struct known_translation_t, msgid)
5037+ + msgid_len + domainname_len + 1);
5038+ if (newp != NULL)
5039+ {
5040+ newp->domainname =
5041+ mempcpy (newp->msgid, msgid1, msgid_len);
5042+ memcpy (newp->domainname, domainname, domainname_len + 1);
5043+ newp->category = category;
5044+ newp->counter = _nl_msg_cat_cntr;
5045+ newp->domain = domain;
5046+ newp->translation = retval;
5047+ newp->translation_length = retlen;
5048+
5049+ /* Insert the entry in the search tree. */
5050+ foundp = (struct known_translation_t **)
5051+ tsearch (newp, &root, transcmp);
5052+ if (foundp == NULL
5053+ || __builtin_expect (*foundp != newp, 0))
5054+ /* The insert failed. */
5055+ free (newp);
5056+ }
5057+ }
5058+ else
5059+ {
5060+ /* We can update the existing entry. */
5061+ (*foundp)->counter = _nl_msg_cat_cntr;
5062+ (*foundp)->domain = domain;
5063+ (*foundp)->translation = retval;
5064+ (*foundp)->translation_length = retlen;
5065+ }
5066+#endif
5067+ __set_errno (saved_errno);
5068+
5069+ /* Now deal with plural. */
5070+ if (plural)
5071+ retval = plural_lookup (domain, n, retval, retlen);
5072+
5073+ __libc_rwlock_unlock (_nl_state_lock);
5074+ return retval;
5075+ }
5076+ }
5077+ }
5078+
5079+ return_untranslated:
5080+ /* Return the untranslated MSGID. */
5081+ FREE_BLOCKS (block_list);
5082+ __libc_rwlock_unlock (_nl_state_lock);
5083+#ifndef _LIBC
5084+ if (!ENABLE_SECURE)
5085+ {
5086+ extern void _nl_log_untranslated (const char *logfilename,
5087+ const char *domainname,
5088+ const char *msgid1, const char *msgid2,
5089+ int plural);
5090+ const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED");
5091+
5092+ if (logfilename != NULL && logfilename[0] != '\0')
5093+ _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural);
5094+ }
5095+#endif
5096+ __set_errno (saved_errno);
5097+ return (plural == 0
5098+ ? (char *) msgid1
5099+ /* Use the Germanic plural rule. */
5100+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
5101+}
5102+
5103+
5104+char *
5105+internal_function
5106+_nl_find_msg (struct loaded_l10nfile *domain_file,
5107+ struct binding *domainbinding, const char *msgid,
5108+ size_t *lengthp)
5109+{
5110+ struct loaded_domain *domain;
5111+ nls_uint32 nstrings;
5112+ size_t act;
5113+ char *result;
5114+ size_t resultlen;
5115+
5116+ if (domain_file->decided == 0)
5117+ _nl_load_domain (domain_file, domainbinding);
5118+
5119+ if (domain_file->data == NULL)
5120+ return NULL;
5121+
5122+ domain = (struct loaded_domain *) domain_file->data;
5123+
5124+ nstrings = domain->nstrings;
5125+
5126+ /* Locate the MSGID and its translation. */
5127+ if (domain->hash_tab != NULL)
5128+ {
5129+ /* Use the hashing table. */
5130+ nls_uint32 len = strlen (msgid);
5131+ nls_uint32 hash_val = hash_string (msgid);
5132+ nls_uint32 idx = hash_val % domain->hash_size;
5133+ nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
5134+
5135+ while (1)
5136+ {
5137+ nls_uint32 nstr =
5138+ W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
5139+
5140+ if (nstr == 0)
5141+ /* Hash table entry is empty. */
5142+ return NULL;
5143+
5144+ nstr--;
5145+
5146+ /* Compare msgid with the original string at index nstr.
5147+ We compare the lengths with >=, not ==, because plural entries
5148+ are represented by strings with an embedded NUL. */
5149+ if (nstr < nstrings
5150+ ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
5151+ && (strcmp (msgid,
5152+ domain->data + W (domain->must_swap,
5153+ domain->orig_tab[nstr].offset))
5154+ == 0)
5155+ : domain->orig_sysdep_tab[nstr - nstrings].length > len
5156+ && (strcmp (msgid,
5157+ domain->orig_sysdep_tab[nstr - nstrings].pointer)
5158+ == 0))
5159+ {
5160+ act = nstr;
5161+ goto found;
5162+ }
5163+
5164+ if (idx >= domain->hash_size - incr)
5165+ idx -= domain->hash_size - incr;
5166+ else
5167+ idx += incr;
5168+ }
5169+ /* NOTREACHED */
5170+ }
5171+ else
5172+ {
5173+ /* Try the default method: binary search in the sorted array of
5174+ messages. */
5175+ size_t top, bottom;
5176+
5177+ bottom = 0;
5178+ top = nstrings;
5179+ while (bottom < top)
5180+ {
5181+ int cmp_val;
5182+
5183+ act = (bottom + top) / 2;
5184+ cmp_val = strcmp (msgid, (domain->data
5185+ + W (domain->must_swap,
5186+ domain->orig_tab[act].offset)));
5187+ if (cmp_val < 0)
5188+ top = act;
5189+ else if (cmp_val > 0)
5190+ bottom = act + 1;
5191+ else
5192+ goto found;
5193+ }
5194+ /* No translation was found. */
5195+ return NULL;
5196+ }
5197+
5198+ found:
5199+ /* The translation was found at index ACT. If we have to convert the
5200+ string to use a different character set, this is the time. */
5201+ if (act < nstrings)
5202+ {
5203+ result = (char *)
5204+ (domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
5205+ resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
5206+ }
5207+ else
5208+ {
5209+ result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
5210+ resultlen = domain->trans_sysdep_tab[act - nstrings].length;
5211+ }
5212+
5213+#if defined _LIBC || HAVE_ICONV
5214+ if (domain->codeset_cntr
5215+ != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
5216+ {
5217+ /* The domain's codeset has changed through bind_textdomain_codeset()
5218+ since the message catalog was initialized or last accessed. We
5219+ have to reinitialize the converter. */
5220+ _nl_free_domain_conv (domain);
5221+ _nl_init_domain_conv (domain_file, domain, domainbinding);
5222+ }
5223+
5224+ if (
5225+# ifdef _LIBC
5226+ domain->conv != (__gconv_t) -1
5227+# else
5228+# if HAVE_ICONV
5229+ domain->conv != (iconv_t) -1
5230+# endif
5231+# endif
5232+ )
5233+ {
5234+ /* We are supposed to do a conversion. First allocate an
5235+ appropriate table with the same structure as the table
5236+ of translations in the file, where we can put the pointers
5237+ to the converted strings in.
5238+ There is a slight complication with plural entries. They
5239+ are represented by consecutive NUL terminated strings. We
5240+ handle this case by converting RESULTLEN bytes, including
5241+ NULs. */
5242+
5243+ if (domain->conv_tab == NULL
5244+ && ((domain->conv_tab =
5245+ (char **) calloc (nstrings + domain->n_sysdep_strings,
5246+ sizeof (char *)))
5247+ == NULL))
5248+ /* Mark that we didn't succeed allocating a table. */
5249+ domain->conv_tab = (char **) -1;
5250+
5251+ if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
5252+ /* Nothing we can do, no more memory. */
5253+ goto converted;
5254+
5255+ if (domain->conv_tab[act] == NULL)
5256+ {
5257+ /* We haven't used this string so far, so it is not
5258+ translated yet. Do this now. */
5259+ /* We use a bit more efficient memory handling.
5260+ We allocate always larger blocks which get used over
5261+ time. This is faster than many small allocations. */
5262+ __libc_lock_define_initialized (static, lock)
5263+# define INITIAL_BLOCK_SIZE 4080
5264+ static unsigned char *freemem;
5265+ static size_t freemem_size;
5266+
5267+ const unsigned char *inbuf;
5268+ unsigned char *outbuf;
5269+ int malloc_count;
5270+# ifndef _LIBC
5271+ transmem_block_t *transmem_list = NULL;
5272+# endif
5273+
5274+ __libc_lock_lock (lock);
5275+
5276+ inbuf = (const unsigned char *) result;
5277+ outbuf = freemem + sizeof (size_t);
5278+
5279+ malloc_count = 0;
5280+ while (1)
5281+ {
5282+ transmem_block_t *newmem;
5283+# ifdef _LIBC
5284+ size_t non_reversible;
5285+ int res;
5286+
5287+ if (freemem_size < sizeof (size_t))
5288+ goto resize_freemem;
5289+
5290+ res = __gconv (domain->conv,
5291+ &inbuf, inbuf + resultlen,
5292+ &outbuf,
5293+ outbuf + freemem_size - sizeof (size_t),
5294+ &non_reversible);
5295+
5296+ if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
5297+ break;
5298+
5299+ if (res != __GCONV_FULL_OUTPUT)
5300+ {
5301+ __libc_lock_unlock (lock);
5302+ goto converted;
5303+ }
5304+
5305+ inbuf = result;
5306+# else
5307+# if HAVE_ICONV
5308+ const char *inptr = (const char *) inbuf;
5309+ size_t inleft = resultlen;
5310+ char *outptr = (char *) outbuf;
5311+ size_t outleft;
5312+
5313+ if (freemem_size < sizeof (size_t))
5314+ goto resize_freemem;
5315+
5316+ outleft = freemem_size - sizeof (size_t);
5317+ if (iconv (domain->conv,
5318+ (ICONV_CONST char **) &inptr, &inleft,
5319+ &outptr, &outleft)
5320+ != (size_t) (-1))
5321+ {
5322+ outbuf = (unsigned char *) outptr;
5323+ break;
5324+ }
5325+ if (errno != E2BIG)
5326+ {
5327+ __libc_lock_unlock (lock);
5328+ goto converted;
5329+ }
5330+# endif
5331+# endif
5332+
5333+ resize_freemem:
5334+ /* We must allocate a new buffer or resize the old one. */
5335+ if (malloc_count > 0)
5336+ {
5337+ ++malloc_count;
5338+ freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
5339+ newmem = (transmem_block_t *) realloc (transmem_list,
5340+ freemem_size);
5341+# ifdef _LIBC
5342+ if (newmem != NULL)
5343+ transmem_list = transmem_list->next;
5344+ else
5345+ {
5346+ struct transmem_list *old = transmem_list;
5347+
5348+ transmem_list = transmem_list->next;
5349+ free (old);
5350+ }
5351+# endif
5352+ }
5353+ else
5354+ {
5355+ malloc_count = 1;
5356+ freemem_size = INITIAL_BLOCK_SIZE;
5357+ newmem = (transmem_block_t *) malloc (freemem_size);
5358+ }
5359+ if (__builtin_expect (newmem == NULL, 0))
5360+ {
5361+ freemem = NULL;
5362+ freemem_size = 0;
5363+ __libc_lock_unlock (lock);
5364+ goto converted;
5365+ }
5366+
5367+# ifdef _LIBC
5368+ /* Add the block to the list of blocks we have to free
5369+ at some point. */
5370+ newmem->next = transmem_list;
5371+ transmem_list = newmem;
5372+
5373+ freemem = newmem->data;
5374+ freemem_size -= offsetof (struct transmem_list, data);
5375+# else
5376+ transmem_list = newmem;
5377+ freemem = newmem;
5378+# endif
5379+
5380+ outbuf = freemem + sizeof (size_t);
5381+ }
5382+
5383+ /* We have now in our buffer a converted string. Put this
5384+ into the table of conversions. */
5385+ *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
5386+ domain->conv_tab[act] = (char *) freemem;
5387+ /* Shrink freemem, but keep it aligned. */
5388+ freemem_size -= outbuf - freemem;
5389+ freemem = outbuf;
5390+ freemem += freemem_size & (alignof (size_t) - 1);
5391+ freemem_size = freemem_size & ~ (alignof (size_t) - 1);
5392+
5393+ __libc_lock_unlock (lock);
5394+ }
5395+
5396+ /* Now domain->conv_tab[act] contains the translation of all
5397+ the plural variants. */
5398+ result = domain->conv_tab[act] + sizeof (size_t);
5399+ resultlen = *(size_t *) domain->conv_tab[act];
5400+ }
5401+
5402+ converted:
5403+ /* The result string is converted. */
5404+
5405+#endif /* _LIBC || HAVE_ICONV */
5406+
5407+ *lengthp = resultlen;
5408+ return result;
5409+}
5410+
5411+
5412+/* Look up a plural variant. */
5413+static char *
5414+internal_function
5415+plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
5416+ const char *translation, size_t translation_len)
5417+{
5418+ struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
5419+ unsigned long int index;
5420+ const char *p;
5421+
5422+ index = plural_eval (domaindata->plural, n);
5423+ if (index >= domaindata->nplurals)
5424+ /* This should never happen. It means the plural expression and the
5425+ given maximum value do not match. */
5426+ index = 0;
5427+
5428+ /* Skip INDEX strings at TRANSLATION. */
5429+ p = translation;
5430+ while (index-- > 0)
5431+ {
5432+#ifdef _LIBC
5433+ p = __rawmemchr (p, '\0');
5434+#else
5435+ p = strchr (p, '\0');
5436+#endif
5437+ /* And skip over the NUL byte. */
5438+ p++;
5439+
5440+ if (p >= translation + translation_len)
5441+ /* This should never happen. It means the plural expression
5442+ evaluated to a value larger than the number of variants
5443+ available for MSGID1. */
5444+ return (char *) translation;
5445+ }
5446+ return (char *) p;
5447+}
5448+
5449+#ifndef _LIBC
5450+/* Return string representation of locale CATEGORY. */
5451+static const char *
5452+internal_function
5453+category_to_name (int category)
5454+{
5455+ const char *retval;
5456+
5457+ switch (category)
5458+ {
5459+#ifdef LC_COLLATE
5460+ case LC_COLLATE:
5461+ retval = "LC_COLLATE";
5462+ break;
5463+#endif
5464+#ifdef LC_CTYPE
5465+ case LC_CTYPE:
5466+ retval = "LC_CTYPE";
5467+ break;
5468+#endif
5469+#ifdef LC_MONETARY
5470+ case LC_MONETARY:
5471+ retval = "LC_MONETARY";
5472+ break;
5473+#endif
5474+#ifdef LC_NUMERIC
5475+ case LC_NUMERIC:
5476+ retval = "LC_NUMERIC";
5477+ break;
5478+#endif
5479+#ifdef LC_TIME
5480+ case LC_TIME:
5481+ retval = "LC_TIME";
5482+ break;
5483+#endif
5484+#ifdef LC_MESSAGES
5485+ case LC_MESSAGES:
5486+ retval = "LC_MESSAGES";
5487+ break;
5488+#endif
5489+#ifdef LC_RESPONSE
5490+ case LC_RESPONSE:
5491+ retval = "LC_RESPONSE";
5492+ break;
5493+#endif
5494+#ifdef LC_ALL
5495+ case LC_ALL:
5496+ /* This might not make sense but is perhaps better than any other
5497+ value. */
5498+ retval = "LC_ALL";
5499+ break;
5500+#endif
5501+ default:
5502+ /* If you have a better idea for a default value let me know. */
5503+ retval = "LC_XXX";
5504+ }
5505+
5506+ return retval;
5507+}
5508+#endif
5509+
5510+/* Guess value of current locale from value of the environment variables. */
5511+static const char *
5512+internal_function
5513+guess_category_value (int category, const char *categoryname)
5514+{
5515+ const char *language;
5516+ const char *retval;
5517+
5518+ /* The highest priority value is the `LANGUAGE' environment
5519+ variable. But we don't use the value if the currently selected
5520+ locale is the C locale. This is a GNU extension. */
5521+ language = getenv ("LANGUAGE");
5522+ if (language != NULL && language[0] == '\0')
5523+ language = NULL;
5524+
5525+ /* We have to proceed with the POSIX methods of looking to `LC_ALL',
5526+ `LC_xxx', and `LANG'. On some systems this can be done by the
5527+ `setlocale' function itself. */
5528+#ifdef _LIBC
5529+ retval = __current_locale_name (category);
5530+#else
5531+ retval = _nl_locale_name (category, categoryname);
5532+#endif
5533+
5534+ /* Ignore LANGUAGE if the locale is set to "C" because
5535+ 1. "C" locale usually uses the ASCII encoding, and most international
5536+ messages use non-ASCII characters. These characters get displayed
5537+ as question marks (if using glibc's iconv()) or as invalid 8-bit
5538+ characters (because other iconv()s refuse to convert most non-ASCII
5539+ characters to ASCII). In any case, the output is ugly.
5540+ 2. The precise output of some programs in the "C" locale is specified
5541+ by POSIX and should not depend on environment variables like
5542+ "LANGUAGE". We allow such programs to use gettext(). */
5543+ return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
5544+}
5545+
5546+/* @@ begin of epilog @@ */
5547+
5548+/* We don't want libintl.a to depend on any other library. So we
5549+ avoid the non-standard function stpcpy. In GNU C Library this
5550+ function is available, though. Also allow the symbol HAVE_STPCPY
5551+ to be defined. */
5552+#if !_LIBC && !HAVE_STPCPY
5553+static char *
5554+stpcpy (char *dest, const char *src)
5555+{
5556+ while ((*dest++ = *src++) != '\0')
5557+ /* Do nothing. */ ;
5558+ return dest - 1;
5559+}
5560+#endif
5561+
5562+#if !_LIBC && !HAVE_MEMPCPY
5563+static void *
5564+mempcpy (void *dest, const void *src, size_t n)
5565+{
5566+ return (void *) ((char *) memcpy (dest, src, n) + n);
5567+}
5568+#endif
5569+
5570+
5571+#ifdef _LIBC
5572+/* If we want to free all resources we have to do some work at
5573+ program's end. */
5574+libc_freeres_fn (free_mem)
5575+{
5576+ void *old;
5577+
5578+ while (_nl_domain_bindings != NULL)
5579+ {
5580+ struct binding *oldp = _nl_domain_bindings;
5581+ _nl_domain_bindings = _nl_domain_bindings->next;
5582+ if (oldp->dirname != INTUSE(_nl_default_dirname))
5583+ /* Yes, this is a pointer comparison. */
5584+ free (oldp->dirname);
5585+ free (oldp->codeset);
5586+ free (oldp);
5587+ }
5588+
5589+ if (_nl_current_default_domain != _nl_default_default_domain)
5590+ /* Yes, again a pointer comparison. */
5591+ free ((char *) _nl_current_default_domain);
5592+
5593+ /* Remove the search tree with the known translations. */
5594+ __tdestroy (root, free);
5595+ root = NULL;
5596+
5597+ while (transmem_list != NULL)
5598+ {
5599+ old = transmem_list;
5600+ transmem_list = transmem_list->next;
5601+ free (old);
5602+ }
5603+}
5604+#endif
5605--- lrzsz-0.12.20.safe/intl/dcngettext.c 1969-12-31 19:00:00.000000000 -0500
5606+++ lrzsz-0.12.20/intl/dcngettext.c 2004-09-12 14:40:34.375745048 -0400
5607@@ -0,0 +1,57 @@
5608+/* Implementation of the dcngettext(3) function.
5609+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
5610+
5611+ This program is free software; you can redistribute it and/or modify it
5612+ under the terms of the GNU Library General Public License as published
5613+ by the Free Software Foundation; either version 2, or (at your option)
5614+ any later version.
5615+
5616+ This program is distributed in the hope that it will be useful,
5617+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5618+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5619+ Library General Public License for more details.
5620+
5621+ You should have received a copy of the GNU Library General Public
5622+ License along with this program; if not, write to the Free Software
5623+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5624+ USA. */
5625+
5626+#ifdef HAVE_CONFIG_H
5627+# include <config.h>
5628+#endif
5629+
5630+#include "gettextP.h"
5631+#ifdef _LIBC
5632+# include <libintl.h>
5633+#else
5634+# include "libgnuintl.h"
5635+#endif
5636+
5637+/* @@ end of prolog @@ */
5638+
5639+/* Names for the libintl functions are a problem. They must not clash
5640+ with existing names and they should follow ANSI C. But this source
5641+ code is also used in GNU C Library where the names have a __
5642+ prefix. So we have to make a difference here. */
5643+#ifdef _LIBC
5644+# define DCNGETTEXT __dcngettext
5645+# define DCIGETTEXT __dcigettext
5646+#else
5647+# define DCNGETTEXT libintl_dcngettext
5648+# define DCIGETTEXT libintl_dcigettext
5649+#endif
5650+
5651+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
5652+ locale. */
5653+char *
5654+DCNGETTEXT (const char *domainname,
5655+ const char *msgid1, const char *msgid2, unsigned long int n,
5656+ int category)
5657+{
5658+ return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
5659+}
5660+
5661+#ifdef _LIBC
5662+/* Alias for function name in GNU C Library. */
5663+weak_alias (__dcngettext, dcngettext);
5664+#endif
5665--- lrzsz-0.12.20.safe/intl/dgettext.c 1998-04-26 09:20:52.000000000 -0400
5666+++ lrzsz-0.12.20/intl/dgettext.c 2004-09-12 14:40:34.380744288 -0400
5667@@ -1,32 +1,33 @@
5668-/* dgettext.c -- implementation of the dgettext(3) function
5669- Copyright (C) 1995 Software Foundation, Inc.
5670+/* Implementation of the dgettext(3) function.
5671+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
5672
5673-This program is free software; you can redistribute it and/or modify
5674-it under the terms of the GNU General Public License as published by
5675-the Free Software Foundation; either version 2, or (at your option)
5676-any later version.
5677+ This program is free software; you can redistribute it and/or modify it
5678+ under the terms of the GNU Library General Public License as published
5679+ by the Free Software Foundation; either version 2, or (at your option)
5680+ any later version.
5681
5682-This program is distributed in the hope that it will be useful,
5683-but WITHOUT ANY WARRANTY; without even the implied warranty of
5684-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5685-GNU General Public License for more details.
5686+ This program is distributed in the hope that it will be useful,
5687+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5688+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5689+ Library General Public License for more details.
5690
5691-You should have received a copy of the GNU General Public License
5692-along with this program; if not, write to the Free Software
5693-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
5694+ You should have received a copy of the GNU Library General Public
5695+ License along with this program; if not, write to the Free Software
5696+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5697+ USA. */
5698
5699 #ifdef HAVE_CONFIG_H
5700 # include <config.h>
5701 #endif
5702
5703-#if defined HAVE_LOCALE_H || defined _LIBC
5704-# include <locale.h>
5705-#endif
5706+#include "gettextP.h"
5707+
5708+#include <locale.h>
5709
5710 #ifdef _LIBC
5711 # include <libintl.h>
5712 #else
5713-# include "libgettext.h"
5714+# include "libgnuintl.h"
5715 #endif
5716
5717 /* @@ end of prolog @@ */
5718@@ -37,18 +38,16 @@
5719 prefix. So we have to make a difference here. */
5720 #ifdef _LIBC
5721 # define DGETTEXT __dgettext
5722-# define DCGETTEXT __dcgettext
5723+# define DCGETTEXT INTUSE(__dcgettext)
5724 #else
5725-# define DGETTEXT dgettext__
5726-# define DCGETTEXT dcgettext__
5727+# define DGETTEXT libintl_dgettext
5728+# define DCGETTEXT libintl_dcgettext
5729 #endif
5730
5731 /* Look up MSGID in the DOMAINNAME message catalog of the current
5732 LC_MESSAGES locale. */
5733 char *
5734-DGETTEXT (domainname, msgid)
5735- const char *domainname;
5736- const char *msgid;
5737+DGETTEXT (const char *domainname, const char *msgid)
5738 {
5739 return DCGETTEXT (domainname, msgid, LC_MESSAGES);
5740 }
5741--- lrzsz-0.12.20.safe/intl/dngettext.c 1969-12-31 19:00:00.000000000 -0500
5742+++ lrzsz-0.12.20/intl/dngettext.c 2004-09-12 14:40:34.385743528 -0400
5743@@ -0,0 +1,59 @@
5744+/* Implementation of the dngettext(3) function.
5745+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
5746+
5747+ This program is free software; you can redistribute it and/or modify it
5748+ under the terms of the GNU Library General Public License as published
5749+ by the Free Software Foundation; either version 2, or (at your option)
5750+ any later version.
5751+
5752+ This program is distributed in the hope that it will be useful,
5753+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5754+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5755+ Library General Public License for more details.
5756+
5757+ You should have received a copy of the GNU Library General Public
5758+ License along with this program; if not, write to the Free Software
5759+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5760+ USA. */
5761+
5762+#ifdef HAVE_CONFIG_H
5763+# include <config.h>
5764+#endif
5765+
5766+#include "gettextP.h"
5767+
5768+#include <locale.h>
5769+
5770+#ifdef _LIBC
5771+# include <libintl.h>
5772+#else
5773+# include "libgnuintl.h"
5774+#endif
5775+
5776+/* @@ end of prolog @@ */
5777+
5778+/* Names for the libintl functions are a problem. They must not clash
5779+ with existing names and they should follow ANSI C. But this source
5780+ code is also used in GNU C Library where the names have a __
5781+ prefix. So we have to make a difference here. */
5782+#ifdef _LIBC
5783+# define DNGETTEXT __dngettext
5784+# define DCNGETTEXT __dcngettext
5785+#else
5786+# define DNGETTEXT libintl_dngettext
5787+# define DCNGETTEXT libintl_dcngettext
5788+#endif
5789+
5790+/* Look up MSGID in the DOMAINNAME message catalog of the current
5791+ LC_MESSAGES locale and skip message according to the plural form. */
5792+char *
5793+DNGETTEXT (const char *domainname,
5794+ const char *msgid1, const char *msgid2, unsigned long int n)
5795+{
5796+ return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
5797+}
5798+
5799+#ifdef _LIBC
5800+/* Alias for function name in GNU C Library. */
5801+weak_alias (__dngettext, dngettext);
5802+#endif
5803--- lrzsz-0.12.20.safe/intl/eval-plural.h 1969-12-31 19:00:00.000000000 -0500
5804+++ lrzsz-0.12.20/intl/eval-plural.h 2004-09-12 14:40:34.390742768 -0400
5805@@ -0,0 +1,108 @@
5806+/* Plural expression evaluation.
5807+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
5808+
5809+ This program is free software; you can redistribute it and/or modify it
5810+ under the terms of the GNU Library General Public License as published
5811+ by the Free Software Foundation; either version 2, or (at your option)
5812+ any later version.
5813+
5814+ This program is distributed in the hope that it will be useful,
5815+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5816+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5817+ Library General Public License for more details.
5818+
5819+ You should have received a copy of the GNU Library General Public
5820+ License along with this program; if not, write to the Free Software
5821+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5822+ USA. */
5823+
5824+#ifndef STATIC
5825+#define STATIC static
5826+#endif
5827+
5828+/* Evaluate the plural expression and return an index value. */
5829+STATIC
5830+unsigned long int
5831+internal_function
5832+plural_eval (struct expression *pexp, unsigned long int n)
5833+{
5834+ switch (pexp->nargs)
5835+ {
5836+ case 0:
5837+ switch (pexp->operation)
5838+ {
5839+ case var:
5840+ return n;
5841+ case num:
5842+ return pexp->val.num;
5843+ default:
5844+ break;
5845+ }
5846+ /* NOTREACHED */
5847+ break;
5848+ case 1:
5849+ {
5850+ /* pexp->operation must be lnot. */
5851+ unsigned long int arg = plural_eval (pexp->val.args[0], n);
5852+ return ! arg;
5853+ }
5854+ case 2:
5855+ {
5856+ unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
5857+ if (pexp->operation == lor)
5858+ return leftarg || plural_eval (pexp->val.args[1], n);
5859+ else if (pexp->operation == land)
5860+ return leftarg && plural_eval (pexp->val.args[1], n);
5861+ else
5862+ {
5863+ unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
5864+
5865+ switch (pexp->operation)
5866+ {
5867+ case mult:
5868+ return leftarg * rightarg;
5869+ case divide:
5870+#if !INTDIV0_RAISES_SIGFPE
5871+ if (rightarg == 0)
5872+ raise (SIGFPE);
5873+#endif
5874+ return leftarg / rightarg;
5875+ case module:
5876+#if !INTDIV0_RAISES_SIGFPE
5877+ if (rightarg == 0)
5878+ raise (SIGFPE);
5879+#endif
5880+ return leftarg % rightarg;
5881+ case plus:
5882+ return leftarg + rightarg;
5883+ case minus:
5884+ return leftarg - rightarg;
5885+ case less_than:
5886+ return leftarg < rightarg;
5887+ case greater_than:
5888+ return leftarg > rightarg;
5889+ case less_or_equal:
5890+ return leftarg <= rightarg;
5891+ case greater_or_equal:
5892+ return leftarg >= rightarg;
5893+ case equal:
5894+ return leftarg == rightarg;
5895+ case not_equal:
5896+ return leftarg != rightarg;
5897+ default:
5898+ break;
5899+ }
5900+ }
5901+ /* NOTREACHED */
5902+ break;
5903+ }
5904+ case 3:
5905+ {
5906+ /* pexp->operation must be qmop. */
5907+ unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
5908+ return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
5909+ }
5910+ }
5911+ /* NOTREACHED */
5912+ return 0;
5913+}
5914--- lrzsz-0.12.20.safe/intl/explodename.c 1998-04-26 09:22:37.000000000 -0400
5915+++ lrzsz-0.12.20/intl/explodename.c 2004-09-12 14:40:34.395742008 -0400
5916@@ -1,19 +1,20 @@
5917-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
5918+/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc.
5919 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
5920
5921- This program is free software; you can redistribute it and/or modify
5922- it under the terms of the GNU General Public License as published by
5923- the Free Software Foundation; either version 2, or (at your option)
5924+ This program is free software; you can redistribute it and/or modify it
5925+ under the terms of the GNU Library General Public License as published
5926+ by the Free Software Foundation; either version 2, or (at your option)
5927 any later version.
5928
5929 This program is distributed in the hope that it will be useful,
5930 but WITHOUT ANY WARRANTY; without even the implied warranty of
5931- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5932- GNU General Public License for more details.
5933+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5934+ Library General Public License for more details.
5935
5936- You should have received a copy of the GNU General Public License
5937- along with this program; if not, write to the Free Software Foundation,
5938- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
5939+ You should have received a copy of the GNU Library General Public
5940+ License along with this program; if not, write to the Free Software
5941+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5942+ USA. */
5943
5944 #ifdef HAVE_CONFIG_H
5945 # include <config.h>
5946@@ -36,18 +37,23 @@
5947
5948 /* @@ end of prolog @@ */
5949
5950+char *
5951+_nl_find_language (const char *name)
5952+{
5953+ while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
5954+ && name[0] != '+' && name[0] != ',')
5955+ ++name;
5956+
5957+ return (char *) name;
5958+}
5959+
5960+
5961 int
5962-_nl_explode_name (name, language, modifier, territory, codeset,
5963- normalized_codeset, special, sponsor, revision)
5964- char *name;
5965- const char **language;
5966- const char **modifier;
5967- const char **territory;
5968- const char **codeset;
5969- const char **normalized_codeset;
5970- const char **special;
5971- const char **sponsor;
5972- const char **revision;
5973+_nl_explode_name (char *name,
5974+ const char **language, const char **modifier,
5975+ const char **territory, const char **codeset,
5976+ const char **normalized_codeset, const char **special,
5977+ const char **sponsor, const char **revision)
5978 {
5979 enum { undecided, xpg, cen } syntax;
5980 char *cp;
5981@@ -67,9 +73,7 @@
5982 mask = 0;
5983 syntax = undecided;
5984 *language = cp = name;
5985- while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
5986- && cp[0] != '+' && cp[0] != ',')
5987- ++cp;
5988+ cp = _nl_find_language (*language);
5989
5990 if (*language == cp)
5991 /* This does not make sense: language has to be specified. Use
5992--- lrzsz-0.12.20.safe/intl/finddomain.c 1998-04-26 09:22:36.000000000 -0400
5993+++ lrzsz-0.12.20/intl/finddomain.c 2004-09-12 14:40:34.415738968 -0400
5994@@ -1,64 +1,40 @@
5995 /* Handle list of needed message catalogs
5996- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
5997- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
5998+ Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
5999+ Written by Ulrich Drepper <drepper@gnu.org>, 1995.
6000
6001- This program is free software; you can redistribute it and/or modify
6002- it under the terms of the GNU General Public License as published by
6003- the Free Software Foundation; either version 2, or (at your option)
6004+ This program is free software; you can redistribute it and/or modify it
6005+ under the terms of the GNU Library General Public License as published
6006+ by the Free Software Foundation; either version 2, or (at your option)
6007 any later version.
6008
6009 This program is distributed in the hope that it will be useful,
6010 but WITHOUT ANY WARRANTY; without even the implied warranty of
6011- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6012- GNU General Public License for more details.
6013+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6014+ Library General Public License for more details.
6015
6016- You should have received a copy of the GNU General Public License
6017- along with this program; if not, write to the Free Software Foundation,
6018- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6019+ You should have received a copy of the GNU Library General Public
6020+ License along with this program; if not, write to the Free Software
6021+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6022+ USA. */
6023
6024 #ifdef HAVE_CONFIG_H
6025 # include <config.h>
6026 #endif
6027
6028-#include <ctype.h>
6029-#include <errno.h>
6030 #include <stdio.h>
6031 #include <sys/types.h>
6032-
6033-#if defined STDC_HEADERS || defined _LIBC
6034-# include <stdlib.h>
6035-#else
6036-# ifdef HAVE_MALLOC_H
6037-# include <malloc.h>
6038-# else
6039-void free ();
6040-# endif
6041-#endif
6042-
6043-#if defined HAVE_STRING_H || defined _LIBC
6044-# include <string.h>
6045-#else
6046-# include <strings.h>
6047-# ifndef memcpy
6048-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
6049-# endif
6050-#endif
6051-#if !HAVE_STRCHR && !defined _LIBC
6052-# ifndef strchr
6053-# define strchr index
6054-# endif
6055-#endif
6056+#include <stdlib.h>
6057+#include <string.h>
6058
6059 #if defined HAVE_UNISTD_H || defined _LIBC
6060 # include <unistd.h>
6061 #endif
6062
6063-#include "gettext.h"
6064 #include "gettextP.h"
6065 #ifdef _LIBC
6066 # include <libintl.h>
6067 #else
6068-# include "libgettext.h"
6069+# include "libgnuintl.h"
6070 #endif
6071
6072 /* @@ end of prolog @@ */
6073@@ -70,10 +46,9 @@
6074 the DOMAINNAME and CATEGORY parameters with respect to the currently
6075 established bindings. */
6076 struct loaded_l10nfile *
6077-_nl_find_domain (dirname, locale, domainname)
6078- const char *dirname;
6079- char *locale;
6080- const char *domainname;
6081+internal_function
6082+_nl_find_domain (const char *dirname, char *locale,
6083+ const char *domainname, struct binding *domainbinding)
6084 {
6085 struct loaded_l10nfile *retval;
6086 const char *language;
6087@@ -95,9 +70,9 @@
6088
6089 language[_territory][+audience][+special][,[sponsor][_revision]]
6090
6091- Beside the first all of them are allowed to be missing. If the
6092- full specified locale is not found, the less specific one are
6093- looked for. The various part will be stripped of according to
6094+ Beside the first part all of them are allowed to be missing. If
6095+ the full specified locale is not found, the less specific one are
6096+ looked for. The various parts will be stripped off according to
6097 the following order:
6098 (1) revision
6099 (2) sponsor
6100@@ -119,7 +94,7 @@
6101 int cnt;
6102
6103 if (retval->decided == 0)
6104- _nl_load_domain (retval);
6105+ _nl_load_domain (retval, domainbinding);
6106
6107 if (retval->data != NULL)
6108 return retval;
6109@@ -127,7 +102,7 @@
6110 for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
6111 {
6112 if (retval->successor[cnt]->decided == 0)
6113- _nl_load_domain (retval->successor[cnt]);
6114+ _nl_load_domain (retval->successor[cnt], domainbinding);
6115
6116 if (retval->successor[cnt]->data != NULL)
6117 break;
6118@@ -142,12 +117,18 @@
6119 alias_value = _nl_expand_alias (locale);
6120 if (alias_value != NULL)
6121 {
6122+#if defined _LIBC || defined HAVE_STRDUP
6123+ locale = strdup (alias_value);
6124+ if (locale == NULL)
6125+ return NULL;
6126+#else
6127 size_t len = strlen (alias_value) + 1;
6128 locale = (char *) malloc (len);
6129 if (locale == NULL)
6130 return NULL;
6131
6132 memcpy (locale, alias_value, len);
6133+#endif
6134 }
6135
6136 /* Now we determine the single parts of the locale name. First
6137@@ -168,14 +149,14 @@
6138 return NULL;
6139
6140 if (retval->decided == 0)
6141- _nl_load_domain (retval);
6142+ _nl_load_domain (retval, domainbinding);
6143 if (retval->data == NULL)
6144 {
6145 int cnt;
6146 for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
6147 {
6148 if (retval->successor[cnt]->decided == 0)
6149- _nl_load_domain (retval->successor[cnt]);
6150+ _nl_load_domain (retval->successor[cnt], domainbinding);
6151 if (retval->successor[cnt]->data != NULL)
6152 break;
6153 }
6154@@ -185,5 +166,27 @@
6155 if (alias_value != NULL)
6156 free (locale);
6157
6158+ /* The space for normalized_codeset is dynamically allocated. Free it. */
6159+ if (mask & XPG_NORM_CODESET)
6160+ free ((void *) normalized_codeset);
6161+
6162 return retval;
6163 }
6164+
6165+
6166+#ifdef _LIBC
6167+libc_freeres_fn (free_mem)
6168+{
6169+ struct loaded_l10nfile *runp = _nl_loaded_domains;
6170+
6171+ while (runp != NULL)
6172+ {
6173+ struct loaded_l10nfile *here = runp;
6174+ if (runp->data != NULL)
6175+ _nl_unload_domain ((struct loaded_domain *) runp->data);
6176+ runp = runp->next;
6177+ free ((char *) here->filename);
6178+ free (here);
6179+ }
6180+}
6181+#endif
6182--- lrzsz-0.12.20.safe/intl/gettext.c 1998-04-26 09:22:36.000000000 -0400
6183+++ lrzsz-0.12.20/intl/gettext.c 2004-09-12 14:40:34.420738208 -0400
6184@@ -1,19 +1,20 @@
6185-/* Implementation of gettext(3) function
6186- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
6187+/* Implementation of gettext(3) function.
6188+ Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
6189
6190- This program is free software; you can redistribute it and/or modify
6191- it under the terms of the GNU General Public License as published by
6192- the Free Software Foundation; either version 2, or (at your option)
6193+ This program is free software; you can redistribute it and/or modify it
6194+ under the terms of the GNU Library General Public License as published
6195+ by the Free Software Foundation; either version 2, or (at your option)
6196 any later version.
6197
6198 This program is distributed in the hope that it will be useful,
6199 but WITHOUT ANY WARRANTY; without even the implied warranty of
6200- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6201- GNU General Public License for more details.
6202+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6203+ Library General Public License for more details.
6204
6205- You should have received a copy of the GNU General Public License
6206- along with this program; if not, write to the Free Software Foundation,
6207- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6208+ You should have received a copy of the GNU Library General Public
6209+ License along with this program; if not, write to the Free Software
6210+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6211+ USA. */
6212
6213 #ifdef HAVE_CONFIG_H
6214 # include <config.h>
6215@@ -23,21 +24,14 @@
6216 # define __need_NULL
6217 # include <stddef.h>
6218 #else
6219-# ifdef STDC_HEADERS
6220-# include <stdlib.h> /* Just for NULL. */
6221-# else
6222-# ifdef HAVE_STRING_H
6223-# include <string.h>
6224-# else
6225-# define NULL ((void *) 0)
6226-# endif
6227-# endif
6228+# include <stdlib.h> /* Just for NULL. */
6229 #endif
6230
6231+#include "gettextP.h"
6232 #ifdef _LIBC
6233 # include <libintl.h>
6234 #else
6235-# include "libgettext.h"
6236+# include "libgnuintl.h"
6237 #endif
6238
6239 /* @@ end of prolog @@ */
6240@@ -48,20 +42,19 @@
6241 prefix. So we have to make a difference here. */
6242 #ifdef _LIBC
6243 # define GETTEXT __gettext
6244-# define DGETTEXT __dgettext
6245+# define DCGETTEXT INTUSE(__dcgettext)
6246 #else
6247-# define GETTEXT gettext__
6248-# define DGETTEXT dgettext__
6249+# define GETTEXT libintl_gettext
6250+# define DCGETTEXT libintl_dcgettext
6251 #endif
6252
6253 /* Look up MSGID in the current default message catalog for the current
6254 LC_MESSAGES locale. If not found, returns MSGID itself (the default
6255 text). */
6256 char *
6257-GETTEXT (msgid)
6258- const char *msgid;
6259+GETTEXT (const char *msgid)
6260 {
6261- return DGETTEXT (NULL, msgid);
6262+ return DCGETTEXT (NULL, msgid, LC_MESSAGES);
6263 }
6264
6265 #ifdef _LIBC
6266--- lrzsz-0.12.20.safe/intl/gettext.h 1998-04-26 09:22:35.000000000 -0400
6267+++ lrzsz-0.12.20/intl/gettext.h 1969-12-31 19:00:00.000000000 -0500
6268@@ -1,105 +0,0 @@
6269-/* Internal header for GNU gettext internationalization functions
6270- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
6271-
6272- This program is free software; you can redistribute it and/or modify
6273- it under the terms of the GNU General Public License as published by
6274- the Free Software Foundation; either version 2, or (at your option)
6275- any later version.
6276-
6277- This program is distributed in the hope that it will be useful,
6278- but WITHOUT ANY WARRANTY; without even the implied warranty of
6279- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6280- GNU General Public License for more details.
6281-
6282- You should have received a copy of the GNU Library General Public
6283- License along with the GNU C Library; see the file COPYING.LIB. If not,
6284- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6285- Boston, MA 02111-1307, USA. */
6286-
6287-#ifndef _GETTEXT_H
6288-#define _GETTEXT_H 1
6289-
6290-#include <stdio.h>
6291-
6292-#if HAVE_LIMITS_H || _LIBC
6293-# include <limits.h>
6294-#endif
6295-
6296-/* @@ end of prolog @@ */
6297-
6298-/* The magic number of the GNU message catalog format. */
6299-#define _MAGIC 0x950412de
6300-#define _MAGIC_SWAPPED 0xde120495
6301-
6302-/* Revision number of the currently used .mo (binary) file format. */
6303-#define MO_REVISION_NUMBER 0
6304-
6305-/* The following contortions are an attempt to use the C preprocessor
6306- to determine an unsigned integral type that is 32 bits wide. An
6307- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
6308- doing that would require that the configure script compile and *run*
6309- the resulting executable. Locally running cross-compiled executables
6310- is usually not possible. */
6311-
6312-#if __STDC__
6313-# define UINT_MAX_32_BITS 4294967295U
6314-#else
6315-# define UINT_MAX_32_BITS 0xFFFFFFFF
6316-#endif
6317-
6318-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
6319- This should be valid for all systems GNU cares about because
6320- that doesn't include 16-bit systems, and only modern systems
6321- (that certainly have <limits.h>) have 64+-bit integral types. */
6322-
6323-#ifndef UINT_MAX
6324-# define UINT_MAX UINT_MAX_32_BITS
6325-#endif
6326-
6327-#if UINT_MAX == UINT_MAX_32_BITS
6328-typedef unsigned nls_uint32;
6329-#else
6330-# if USHRT_MAX == UINT_MAX_32_BITS
6331-typedef unsigned short nls_uint32;
6332-# else
6333-# if ULONG_MAX == UINT_MAX_32_BITS
6334-typedef unsigned long nls_uint32;
6335-# else
6336- /* The following line is intended to throw an error. Using #error is
6337- not portable enough. */
6338- "Cannot determine unsigned 32-bit data type."
6339-# endif
6340-# endif
6341-#endif
6342-
6343-
6344-/* Header for binary .mo file format. */
6345-struct mo_file_header
6346-{
6347- /* The magic number. */
6348- nls_uint32 magic;
6349- /* The revision number of the file format. */
6350- nls_uint32 revision;
6351- /* The number of strings pairs. */
6352- nls_uint32 nstrings;
6353- /* Offset of table with start offsets of original strings. */
6354- nls_uint32 orig_tab_offset;
6355- /* Offset of table with start offsets of translation strings. */
6356- nls_uint32 trans_tab_offset;
6357- /* Size of hashing table. */
6358- nls_uint32 hash_tab_size;
6359- /* Offset of first hashing entry. */
6360- nls_uint32 hash_tab_offset;
6361-};
6362-
6363-struct string_desc
6364-{
6365- /* Length of addressed string. */
6366- nls_uint32 length;
6367- /* Offset of string in file. */
6368- nls_uint32 offset;
6369-};
6370-
6371-/* @@ begin of epilog @@ */
6372-
6373-#endif /* gettext.h */
6374--- lrzsz-0.12.20.safe/intl/gettextP.h 1998-04-26 09:22:35.000000000 -0400
6375+++ lrzsz-0.12.20/intl/gettextP.h 2004-09-12 14:40:34.426737296 -0400
6376@@ -1,33 +1,53 @@
6377-/* Header describing internals of gettext library
6378- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
6379+/* Header describing internals of libintl library.
6380+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
6381+ Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
6382
6383- This program is free software; you can redistribute it and/or modify
6384- it under the terms of the GNU General Public License as published by
6385- the Free Software Foundation; either version 2, or (at your option)
6386+ This program is free software; you can redistribute it and/or modify it
6387+ under the terms of the GNU Library General Public License as published
6388+ by the Free Software Foundation; either version 2, or (at your option)
6389 any later version.
6390
6391 This program is distributed in the hope that it will be useful,
6392 but WITHOUT ANY WARRANTY; without even the implied warranty of
6393- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6394- GNU General Public License for more details.
6395+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6396+ Library General Public License for more details.
6397
6398- You should have received a copy of the GNU General Public License
6399- along with this program; if not, write to the Free Software Foundation,
6400- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6401+ You should have received a copy of the GNU Library General Public
6402+ License along with this program; if not, write to the Free Software
6403+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6404+ USA. */
6405
6406 #ifndef _GETTEXTP_H
6407 #define _GETTEXTP_H
6408
6409+#include <stddef.h> /* Get size_t. */
6410+
6411+#ifdef _LIBC
6412+# include "../iconv/gconv_int.h"
6413+#else
6414+# if HAVE_ICONV
6415+# include <iconv.h>
6416+# endif
6417+#endif
6418+
6419 #include "loadinfo.h"
6420
6421+#include "gmo.h" /* Get nls_uint32. */
6422+
6423 /* @@ end of prolog @@ */
6424
6425-#ifndef PARAMS
6426-# if __STDC__
6427-# define PARAMS(args) args
6428-# else
6429-# define PARAMS(args) ()
6430-# endif
6431+#ifndef internal_function
6432+# define internal_function
6433+#endif
6434+
6435+#ifndef attribute_hidden
6436+# define attribute_hidden
6437+#endif
6438+
6439+/* Tell the compiler when a conditional or integer expression is
6440+ almost always true or almost always false. */
6441+#ifndef HAVE_BUILTIN_EXPECT
6442+# define __builtin_expect(expr, val) (expr)
6443 #endif
6444
6445 #ifndef W
6446@@ -35,38 +55,160 @@
6447 #endif
6448
6449
6450-static nls_uint32 SWAP PARAMS ((nls_uint32 i));
6451-
6452+#ifdef _LIBC
6453+# include <byteswap.h>
6454+# define SWAP(i) bswap_32 (i)
6455+#else
6456 static inline nls_uint32
6457 SWAP (i)
6458 nls_uint32 i;
6459 {
6460 return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
6461 }
6462+#endif
6463+
6464
6465+/* In-memory representation of system dependent string. */
6466+struct sysdep_string_desc
6467+{
6468+ /* Length of addressed string, including the trailing NUL. */
6469+ size_t length;
6470+ /* Pointer to addressed string. */
6471+ const char *pointer;
6472+};
6473
6474+/* The representation of an opened message catalog. */
6475 struct loaded_domain
6476 {
6477+ /* Pointer to memory containing the .mo file. */
6478 const char *data;
6479+ /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */
6480+ int use_mmap;
6481+ /* Size of mmap()ed memory. */
6482+ size_t mmap_size;
6483+ /* 1 if the .mo file uses a different endianness than this machine. */
6484 int must_swap;
6485+ /* Pointer to additional malloc()ed memory. */
6486+ void *malloced;
6487+
6488+ /* Number of static strings pairs. */
6489 nls_uint32 nstrings;
6490- struct string_desc *orig_tab;
6491- struct string_desc *trans_tab;
6492+ /* Pointer to descriptors of original strings in the file. */
6493+ const struct string_desc *orig_tab;
6494+ /* Pointer to descriptors of translated strings in the file. */
6495+ const struct string_desc *trans_tab;
6496+
6497+ /* Number of system dependent strings pairs. */
6498+ nls_uint32 n_sysdep_strings;
6499+ /* Pointer to descriptors of original sysdep strings. */
6500+ const struct sysdep_string_desc *orig_sysdep_tab;
6501+ /* Pointer to descriptors of translated sysdep strings. */
6502+ const struct sysdep_string_desc *trans_sysdep_tab;
6503+
6504+ /* Size of hash table. */
6505 nls_uint32 hash_size;
6506- nls_uint32 *hash_tab;
6507+ /* Pointer to hash table. */
6508+ const nls_uint32 *hash_tab;
6509+ /* 1 if the hash table uses a different endianness than this machine. */
6510+ int must_swap_hash_tab;
6511+
6512+ int codeset_cntr;
6513+#ifdef _LIBC
6514+ __gconv_t conv;
6515+#else
6516+# if HAVE_ICONV
6517+ iconv_t conv;
6518+# endif
6519+#endif
6520+ char **conv_tab;
6521+
6522+ struct expression *plural;
6523+ unsigned long int nplurals;
6524 };
6525
6526+/* We want to allocate a string at the end of the struct. But ISO C
6527+ doesn't allow zero sized arrays. */
6528+#ifdef __GNUC__
6529+# define ZERO 0
6530+#else
6531+# define ZERO 1
6532+#endif
6533+
6534+/* A set of settings bound to a message domain. Used to store settings
6535+ from bindtextdomain() and bind_textdomain_codeset(). */
6536 struct binding
6537 {
6538 struct binding *next;
6539- char *domainname;
6540 char *dirname;
6541+ int codeset_cntr; /* Incremented each time codeset changes. */
6542+ char *codeset;
6543+ char domainname[ZERO];
6544 };
6545
6546-struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
6547- char *__locale,
6548- const char *__domainname));
6549-void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain));
6550+/* A counter which is incremented each time some previous translations
6551+ become invalid.
6552+ This variable is part of the external ABI of the GNU libintl. */
6553+extern int _nl_msg_cat_cntr;
6554+
6555+#ifndef _LIBC
6556+const char *_nl_locale_name (int category, const char *categoryname);
6557+#endif
6558+
6559+struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale,
6560+ const char *__domainname,
6561+ struct binding *__domainbinding)
6562+ internal_function;
6563+void _nl_load_domain (struct loaded_l10nfile *__domain,
6564+ struct binding *__domainbinding)
6565+ internal_function;
6566+void _nl_unload_domain (struct loaded_domain *__domain)
6567+ internal_function;
6568+const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file,
6569+ struct loaded_domain *__domain,
6570+ struct binding *__domainbinding)
6571+ internal_function;
6572+void _nl_free_domain_conv (struct loaded_domain *__domain)
6573+ internal_function;
6574+
6575+char *_nl_find_msg (struct loaded_l10nfile *domain_file,
6576+ struct binding *domainbinding, const char *msgid,
6577+ size_t *lengthp)
6578+ internal_function;
6579+
6580+#ifdef _LIBC
6581+extern char *__gettext (const char *__msgid);
6582+extern char *__dgettext (const char *__domainname, const char *__msgid);
6583+extern char *__dcgettext (const char *__domainname, const char *__msgid,
6584+ int __category);
6585+extern char *__ngettext (const char *__msgid1, const char *__msgid2,
6586+ unsigned long int __n);
6587+extern char *__dngettext (const char *__domainname,
6588+ const char *__msgid1, const char *__msgid2,
6589+ unsigned long int n);
6590+extern char *__dcngettext (const char *__domainname,
6591+ const char *__msgid1, const char *__msgid2,
6592+ unsigned long int __n, int __category);
6593+extern char *__dcigettext (const char *__domainname,
6594+ const char *__msgid1, const char *__msgid2,
6595+ int __plural, unsigned long int __n,
6596+ int __category);
6597+extern char *__textdomain (const char *__domainname);
6598+extern char *__bindtextdomain (const char *__domainname,
6599+ const char *__dirname);
6600+extern char *__bind_textdomain_codeset (const char *__domainname,
6601+ const char *__codeset);
6602+#else
6603+/* Declare the exported libintl_* functions, in a way that allows us to
6604+ call them under their real name. */
6605+# undef _INTL_REDIRECT_INLINE
6606+# undef _INTL_REDIRECT_MACROS
6607+# define _INTL_REDIRECT_MACROS
6608+# include "libgnuintl.h"
6609+extern char *libintl_dcigettext (const char *__domainname,
6610+ const char *__msgid1, const char *__msgid2,
6611+ int __plural, unsigned long int __n,
6612+ int __category);
6613+#endif
6614
6615 /* @@ begin of epilog @@ */
6616
6617--- lrzsz-0.12.20.safe/intl/gmo.h 1969-12-31 19:00:00.000000000 -0500
6618+++ lrzsz-0.12.20/intl/gmo.h 2004-09-12 14:40:34.431736536 -0400
6619@@ -0,0 +1,149 @@
6620+/* Description of GNU message catalog format: general file layout.
6621+ Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc.
6622+
6623+ This program is free software; you can redistribute it and/or modify it
6624+ under the terms of the GNU Library General Public License as published
6625+ by the Free Software Foundation; either version 2, or (at your option)
6626+ any later version.
6627+
6628+ This program is distributed in the hope that it will be useful,
6629+ but WITHOUT ANY WARRANTY; without even the implied warranty of
6630+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6631+ Library General Public License for more details.
6632+
6633+ You should have received a copy of the GNU Library General Public
6634+ License along with this program; if not, write to the Free Software
6635+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6636+ USA. */
6637+
6638+#ifndef _GETTEXT_H
6639+#define _GETTEXT_H 1
6640+
6641+#include <limits.h>
6642+
6643+/* @@ end of prolog @@ */
6644+
6645+/* The magic number of the GNU message catalog format. */
6646+#define _MAGIC 0x950412de
6647+#define _MAGIC_SWAPPED 0xde120495
6648+
6649+/* Revision number of the currently used .mo (binary) file format. */
6650+#define MO_REVISION_NUMBER 0
6651+#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1
6652+
6653+/* The following contortions are an attempt to use the C preprocessor
6654+ to determine an unsigned integral type that is 32 bits wide. An
6655+ alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
6656+ as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
6657+ when cross-compiling. */
6658+
6659+#if __STDC__
6660+# define UINT_MAX_32_BITS 4294967295U
6661+#else
6662+# define UINT_MAX_32_BITS 0xFFFFFFFF
6663+#endif
6664+
6665+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
6666+ This should be valid for all systems GNU cares about because
6667+ that doesn't include 16-bit systems, and only modern systems
6668+ (that certainly have <limits.h>) have 64+-bit integral types. */
6669+
6670+#ifndef UINT_MAX
6671+# define UINT_MAX UINT_MAX_32_BITS
6672+#endif
6673+
6674+#if UINT_MAX == UINT_MAX_32_BITS
6675+typedef unsigned nls_uint32;
6676+#else
6677+# if USHRT_MAX == UINT_MAX_32_BITS
6678+typedef unsigned short nls_uint32;
6679+# else
6680+# if ULONG_MAX == UINT_MAX_32_BITS
6681+typedef unsigned long nls_uint32;
6682+# else
6683+ /* The following line is intended to throw an error. Using #error is
6684+ not portable enough. */
6685+ "Cannot determine unsigned 32-bit data type."
6686+# endif
6687+# endif
6688+#endif
6689+
6690+
6691+/* Header for binary .mo file format. */
6692+struct mo_file_header
6693+{
6694+ /* The magic number. */
6695+ nls_uint32 magic;
6696+ /* The revision number of the file format. */
6697+ nls_uint32 revision;
6698+
6699+ /* The following are only used in .mo files with major revision 0 or 1. */
6700+
6701+ /* The number of strings pairs. */
6702+ nls_uint32 nstrings;
6703+ /* Offset of table with start offsets of original strings. */
6704+ nls_uint32 orig_tab_offset;
6705+ /* Offset of table with start offsets of translated strings. */
6706+ nls_uint32 trans_tab_offset;
6707+ /* Size of hash table. */
6708+ nls_uint32 hash_tab_size;
6709+ /* Offset of first hash table entry. */
6710+ nls_uint32 hash_tab_offset;
6711+
6712+ /* The following are only used in .mo files with minor revision >= 1. */
6713+
6714+ /* The number of system dependent segments. */
6715+ nls_uint32 n_sysdep_segments;
6716+ /* Offset of table describing system dependent segments. */
6717+ nls_uint32 sysdep_segments_offset;
6718+ /* The number of system dependent strings pairs. */
6719+ nls_uint32 n_sysdep_strings;
6720+ /* Offset of table with start offsets of original sysdep strings. */
6721+ nls_uint32 orig_sysdep_tab_offset;
6722+ /* Offset of table with start offsets of translated sysdep strings. */
6723+ nls_uint32 trans_sysdep_tab_offset;
6724+};
6725+
6726+/* Descriptor for static string contained in the binary .mo file. */
6727+struct string_desc
6728+{
6729+ /* Length of addressed string, not including the trailing NUL. */
6730+ nls_uint32 length;
6731+ /* Offset of string in file. */
6732+ nls_uint32 offset;
6733+};
6734+
6735+/* The following are only used in .mo files with minor revision >= 1. */
6736+
6737+/* Descriptor for system dependent string segment. */
6738+struct sysdep_segment
6739+{
6740+ /* Length of addressed string, including the trailing NUL. */
6741+ nls_uint32 length;
6742+ /* Offset of string in file. */
6743+ nls_uint32 offset;
6744+};
6745+
6746+/* Descriptor for system dependent string. */
6747+struct sysdep_string
6748+{
6749+ /* Offset of static string segments in file. */
6750+ nls_uint32 offset;
6751+ /* Alternating sequence of static and system dependent segments.
6752+ The last segment is a static segment, including the trailing NUL. */
6753+ struct segment_pair
6754+ {
6755+ /* Size of static segment. */
6756+ nls_uint32 segsize;
6757+ /* Reference to system dependent string segment, or ~0 at the end. */
6758+ nls_uint32 sysdepref;
6759+ } segments[1];
6760+};
6761+
6762+/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF,
6763+ regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */
6764+#define SEGMENTS_END ((nls_uint32) ~0)
6765+
6766+/* @@ begin of epilog @@ */
6767+
6768+#endif /* gettext.h */
6769--- lrzsz-0.12.20.safe/intl/hash-string.h 1998-04-26 09:22:36.000000000 -0400
6770+++ lrzsz-0.12.20/intl/hash-string.h 2004-09-12 14:40:34.436735776 -0400
6771@@ -1,35 +1,23 @@
6772-/* Implements a string hashing function.
6773- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
6774+/* Description of GNU message catalog format: string hashing function.
6775+ Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc.
6776
6777- This program is free software; you can redistribute it and/or modify
6778- it under the terms of the GNU General Public License as published by
6779- the Free Software Foundation; either version 2, or (at your option)
6780+ This program is free software; you can redistribute it and/or modify it
6781+ under the terms of the GNU Library General Public License as published
6782+ by the Free Software Foundation; either version 2, or (at your option)
6783 any later version.
6784
6785 This program is distributed in the hope that it will be useful,
6786 but WITHOUT ANY WARRANTY; without even the implied warranty of
6787- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6788- GNU General Public License for more details.
6789+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6790+ Library General Public License for more details.
6791
6792 You should have received a copy of the GNU Library General Public
6793- License along with the GNU C Library; see the file COPYING.LIB. If not,
6794- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6795- Boston, MA 02111-1307, USA. */
6796-
6797-#ifdef HAVE_VALUES_H
6798-# include <values.h>
6799-#endif
6800+ License along with this program; if not, write to the Free Software
6801+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6802+ USA. */
6803
6804 /* @@ end of prolog @@ */
6805
6806-#ifndef PARAMS
6807-# if __STDC__
6808-# define PARAMS(Args) Args
6809-# else
6810-# define PARAMS(Args) ()
6811-# endif
6812-#endif
6813-
6814 /* We assume to have `unsigned long int' value with at least 32 bits. */
6815 #define HASHWORDBITS 32
6816
6817@@ -37,11 +25,8 @@
6818 /* Defines the so called `hashpjw' function by P.J. Weinberger
6819 [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
6820 1986, 1987 Bell Telephone Laboratories, Inc.] */
6821-static unsigned long hash_string PARAMS ((const char *__str_param));
6822-
6823-static inline unsigned long
6824-hash_string (str_param)
6825- const char *str_param;
6826+static inline unsigned long int
6827+hash_string (const char *str_param)
6828 {
6829 unsigned long int hval, g;
6830 const char *str = str_param;
6831@@ -51,8 +36,8 @@
6832 while (*str != '\0')
6833 {
6834 hval <<= 4;
6835- hval += (unsigned long) *str++;
6836- g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
6837+ hval += (unsigned char) *str++;
6838+ g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
6839 if (g != 0)
6840 {
6841 hval ^= g >> (HASHWORDBITS - 8);
6842--- lrzsz-0.12.20.safe/intl/intl-compat.c 1998-04-26 09:20:52.000000000 -0400
6843+++ lrzsz-0.12.20/intl/intl-compat.c 2004-09-12 14:40:34.441735016 -0400
6844@@ -1,76 +1,131 @@
6845 /* intl-compat.c - Stub functions to call gettext functions from GNU gettext
6846 Library.
6847- Copyright (C) 1995 Software Foundation, Inc.
6848+ Copyright (C) 1995, 2000-2003 Software Foundation, Inc.
6849
6850-This program is free software; you can redistribute it and/or modify
6851-it under the terms of the GNU General Public License as published by
6852-the Free Software Foundation; either version 2, or (at your option)
6853-any later version.
6854+ This program is free software; you can redistribute it and/or modify it
6855+ under the terms of the GNU Library General Public License as published
6856+ by the Free Software Foundation; either version 2, or (at your option)
6857+ any later version.
6858
6859-This program is distributed in the hope that it will be useful,
6860-but WITHOUT ANY WARRANTY; without even the implied warranty of
6861-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6862-GNU General Public License for more details.
6863+ This program is distributed in the hope that it will be useful,
6864+ but WITHOUT ANY WARRANTY; without even the implied warranty of
6865+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6866+ Library General Public License for more details.
6867
6868-You should have received a copy of the GNU General Public License
6869-along with this program; if not, write to the Free Software
6870-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6871+ You should have received a copy of the GNU Library General Public
6872+ License along with this program; if not, write to the Free Software
6873+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6874+ USA. */
6875
6876 #ifdef HAVE_CONFIG_H
6877 # include <config.h>
6878 #endif
6879
6880-#include "libgettext.h"
6881+#include "gettextP.h"
6882
6883 /* @@ end of prolog @@ */
6884
6885+/* This file redirects the gettext functions (without prefix) to those
6886+ defined in the included GNU libintl library (with "libintl_" prefix).
6887+ It is compiled into libintl in order to make the AM_GNU_GETTEXT test
6888+ of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
6889+ has the redirections primarily in the <libintl.h> include file.
6890+ It is also compiled into libgnuintl so that libgnuintl.so can be used
6891+ as LD_PRELOADable library on glibc systems, to provide the extra
6892+ features that the functions in the libc don't have (namely, logging). */
6893+
6894
6895 #undef gettext
6896 #undef dgettext
6897 #undef dcgettext
6898+#undef ngettext
6899+#undef dngettext
6900+#undef dcngettext
6901 #undef textdomain
6902 #undef bindtextdomain
6903+#undef bind_textdomain_codeset
6904+
6905+
6906+/* When building a DLL, we must export some functions. Note that because
6907+ the functions are only defined for binary backward compatibility, we
6908+ don't need to use __declspec(dllimport) in any case. */
6909+#if defined _MSC_VER && BUILDING_DLL
6910+# define DLL_EXPORTED __declspec(dllexport)
6911+#else
6912+# define DLL_EXPORTED
6913+#endif
6914
6915
6916+DLL_EXPORTED
6917 char *
6918-bindtextdomain (domainname, dirname)
6919- const char *domainname;
6920- const char *dirname;
6921+gettext (const char *msgid)
6922 {
6923- return bindtextdomain__ (domainname, dirname);
6924+ return libintl_gettext (msgid);
6925 }
6926
6927
6928+DLL_EXPORTED
6929 char *
6930-dcgettext (domainname, msgid, category)
6931- const char *domainname;
6932- const char *msgid;
6933- int category;
6934+dgettext (const char *domainname, const char *msgid)
6935 {
6936- return dcgettext__ (domainname, msgid, category);
6937+ return libintl_dgettext (domainname, msgid);
6938 }
6939
6940
6941+DLL_EXPORTED
6942 char *
6943-dgettext (domainname, msgid)
6944- const char *domainname;
6945- const char *msgid;
6946+dcgettext (const char *domainname, const char *msgid, int category)
6947 {
6948- return dgettext__ (domainname, msgid);
6949+ return libintl_dcgettext (domainname, msgid, category);
6950 }
6951
6952
6953+DLL_EXPORTED
6954 char *
6955-gettext (msgid)
6956- const char *msgid;
6957+ngettext (const char *msgid1, const char *msgid2, unsigned long int n)
6958 {
6959- return gettext__ (msgid);
6960+ return libintl_ngettext (msgid1, msgid2, n);
6961 }
6962
6963
6964+DLL_EXPORTED
6965 char *
6966-textdomain (domainname)
6967- const char *domainname;
6968+dngettext (const char *domainname,
6969+ const char *msgid1, const char *msgid2, unsigned long int n)
6970 {
6971- return textdomain__ (domainname);
6972+ return libintl_dngettext (domainname, msgid1, msgid2, n);
6973+}
6974+
6975+
6976+DLL_EXPORTED
6977+char *
6978+dcngettext (const char *domainname,
6979+ const char *msgid1, const char *msgid2, unsigned long int n,
6980+ int category)
6981+{
6982+ return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
6983+}
6984+
6985+
6986+DLL_EXPORTED
6987+char *
6988+textdomain (const char *domainname)
6989+{
6990+ return libintl_textdomain (domainname);
6991+}
6992+
6993+
6994+DLL_EXPORTED
6995+char *
6996+bindtextdomain (const char *domainname, const char *dirname)
6997+{
6998+ return libintl_bindtextdomain (domainname, dirname);
6999+}
7000+
7001+
7002+DLL_EXPORTED
7003+char *
7004+bind_textdomain_codeset (const char *domainname, const char *codeset)
7005+{
7006+ return libintl_bind_textdomain_codeset (domainname, codeset);
7007 }
7008--- lrzsz-0.12.20.safe/intl/l10nflist.c 1998-04-26 09:22:37.000000000 -0400
7009+++ lrzsz-0.12.20/intl/l10nflist.c 2004-09-12 14:40:34.457732584 -0400
7010@@ -1,52 +1,40 @@
7011-/* Handle list of needed message catalogs
7012- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
7013- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
7014+/* Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
7015+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
7016
7017- This program is free software; you can redistribute it and/or modify
7018- it under the terms of the GNU General Public License as published by
7019- the Free Software Foundation; either version 2, or (at your option)
7020+ This program is free software; you can redistribute it and/or modify it
7021+ under the terms of the GNU Library General Public License as published
7022+ by the Free Software Foundation; either version 2, or (at your option)
7023 any later version.
7024
7025 This program is distributed in the hope that it will be useful,
7026 but WITHOUT ANY WARRANTY; without even the implied warranty of
7027- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7028- GNU General Public License for more details.
7029+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7030+ Library General Public License for more details.
7031
7032- You should have received a copy of the GNU General Public License
7033- along with this program; if not, write to the Free Software Foundation,
7034- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
7035+ You should have received a copy of the GNU Library General Public
7036+ License along with this program; if not, write to the Free Software
7037+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7038+ USA. */
7039+
7040+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
7041+ This must come before <config.h> because <config.h> may include
7042+ <features.h>, and once <features.h> has been included, it's too late. */
7043+#ifndef _GNU_SOURCE
7044+# define _GNU_SOURCE 1
7045+#endif
7046
7047 #ifdef HAVE_CONFIG_H
7048 # include <config.h>
7049 #endif
7050
7051-
7052-#if defined HAVE_STRING_H || defined _LIBC
7053-# ifndef _GNU_SOURCE
7054-# define _GNU_SOURCE 1
7055-# endif
7056-# include <string.h>
7057-#else
7058-# include <strings.h>
7059-# ifndef memcpy
7060-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
7061-# endif
7062-#endif
7063-#if !HAVE_STRCHR && !defined _LIBC
7064-# ifndef strchr
7065-# define strchr index
7066-# endif
7067-#endif
7068+#include <string.h>
7069
7070 #if defined _LIBC || defined HAVE_ARGZ_H
7071 # include <argz.h>
7072 #endif
7073 #include <ctype.h>
7074 #include <sys/types.h>
7075-
7076-#if defined STDC_HEADERS || defined _LIBC
7077-# include <stdlib.h>
7078-#endif
7079+#include <stdlib.h>
7080
7081 #include "loadinfo.h"
7082
7083@@ -65,23 +53,39 @@
7084 /* Rename the non ANSI C functions. This is required by the standard
7085 because some ANSI C functions will require linking with this object
7086 file and the name space must not be polluted. */
7087-# define stpcpy(dest, src) __stpcpy(dest, src)
7088+# ifndef stpcpy
7089+# define stpcpy(dest, src) __stpcpy(dest, src)
7090+# endif
7091 #else
7092 # ifndef HAVE_STPCPY
7093-static char *stpcpy PARAMS ((char *dest, const char *src));
7094+static char *stpcpy (char *dest, const char *src);
7095 # endif
7096 #endif
7097
7098+/* Pathname support.
7099+ ISSLASH(C) tests whether C is a directory separator character.
7100+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
7101+ it may be concatenated to a directory pathname.
7102+ */
7103+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
7104+ /* Win32, OS/2, DOS */
7105+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
7106+# define HAS_DEVICE(P) \
7107+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
7108+ && (P)[1] == ':')
7109+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
7110+#else
7111+ /* Unix */
7112+# define ISSLASH(C) ((C) == '/')
7113+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
7114+#endif
7115+
7116 /* Define function which are usually not available. */
7117
7118 #if !defined _LIBC && !defined HAVE___ARGZ_COUNT
7119 /* Returns the number of strings in ARGZ. */
7120-static size_t argz_count__ PARAMS ((const char *argz, size_t len));
7121-
7122 static size_t
7123-argz_count__ (argz, len)
7124- const char *argz;
7125- size_t len;
7126+argz_count__ (const char *argz, size_t len)
7127 {
7128 size_t count = 0;
7129 while (len > 0)
7130@@ -95,18 +99,17 @@
7131 }
7132 # undef __argz_count
7133 # define __argz_count(argz, len) argz_count__ (argz, len)
7134+#else
7135+# ifdef _LIBC
7136+# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
7137+# endif
7138 #endif /* !_LIBC && !HAVE___ARGZ_COUNT */
7139
7140 #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
7141 /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
7142 except the last into the character SEP. */
7143-static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
7144-
7145 static void
7146-argz_stringify__ (argz, len, sep)
7147- char *argz;
7148- size_t len;
7149- int sep;
7150+argz_stringify__ (char *argz, size_t len, int sep)
7151 {
7152 while (len > 0)
7153 {
7154@@ -119,17 +122,16 @@
7155 }
7156 # undef __argz_stringify
7157 # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
7158+#else
7159+# ifdef _LIBC
7160+# define __argz_stringify(argz, len, sep) \
7161+ INTUSE(__argz_stringify) (argz, len, sep)
7162+# endif
7163 #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
7164
7165 #if !defined _LIBC && !defined HAVE___ARGZ_NEXT
7166-static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
7167- const char *entry));
7168-
7169 static char *
7170-argz_next__ (argz, argz_len, entry)
7171- char *argz;
7172- size_t argz_len;
7173- const char *entry;
7174+argz_next__ (char *argz, size_t argz_len, const char *entry)
7175 {
7176 if (entry)
7177 {
7178@@ -150,11 +152,8 @@
7179
7180
7181 /* Return number of bits set in X. */
7182-static int pop PARAMS ((int x));
7183-
7184 static inline int
7185-pop (x)
7186- int x;
7187+pop (int x)
7188 {
7189 /* We assume that no more than 16 bits are used. */
7190 x = ((x & ~0x5555) >> 1) + (x & 0x5555);
7191@@ -167,31 +166,27 @@
7192
7193
7194 struct loaded_l10nfile *
7195-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
7196- territory, codeset, normalized_codeset, modifier, special,
7197- sponsor, revision, filename, do_allocate)
7198- struct loaded_l10nfile **l10nfile_list;
7199- const char *dirlist;
7200- size_t dirlist_len;
7201- int mask;
7202- const char *language;
7203- const char *territory;
7204- const char *codeset;
7205- const char *normalized_codeset;
7206- const char *modifier;
7207- const char *special;
7208- const char *sponsor;
7209- const char *revision;
7210- const char *filename;
7211- int do_allocate;
7212+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
7213+ const char *dirlist, size_t dirlist_len,
7214+ int mask, const char *language, const char *territory,
7215+ const char *codeset, const char *normalized_codeset,
7216+ const char *modifier, const char *special,
7217+ const char *sponsor, const char *revision,
7218+ const char *filename, int do_allocate)
7219 {
7220 char *abs_filename;
7221- struct loaded_l10nfile *last = NULL;
7222+ struct loaded_l10nfile **lastp;
7223 struct loaded_l10nfile *retval;
7224 char *cp;
7225+ size_t dirlist_count;
7226 size_t entries;
7227 int cnt;
7228
7229+ /* If LANGUAGE contains an absolute directory specification, we ignore
7230+ DIRLIST. */
7231+ if (IS_ABSOLUTE_PATH (language))
7232+ dirlist_len = 0;
7233+
7234 /* Allocate room for the full file name. */
7235 abs_filename = (char *) malloc (dirlist_len
7236 + strlen (language)
7237@@ -209,7 +204,7 @@
7238 + (((mask & CEN_SPONSOR) != 0
7239 || (mask & CEN_REVISION) != 0)
7240 ? (1 + ((mask & CEN_SPONSOR) != 0
7241- ? strlen (sponsor) + 1 : 0)
7242+ ? strlen (sponsor) : 0)
7243 + ((mask & CEN_REVISION) != 0
7244 ? strlen (revision) + 1 : 0)) : 0)
7245 + 1 + strlen (filename) + 1);
7246@@ -217,14 +212,16 @@
7247 if (abs_filename == NULL)
7248 return NULL;
7249
7250- retval = NULL;
7251- last = NULL;
7252-
7253 /* Construct file name. */
7254- memcpy (abs_filename, dirlist, dirlist_len);
7255- __argz_stringify (abs_filename, dirlist_len, ':');
7256- cp = abs_filename + (dirlist_len - 1);
7257- *cp++ = '/';
7258+ cp = abs_filename;
7259+ if (dirlist_len > 0)
7260+ {
7261+ memcpy (cp, dirlist, dirlist_len);
7262+ __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
7263+ cp += dirlist_len;
7264+ cp[-1] = '/';
7265+ }
7266+
7267 cp = stpcpy (cp, language);
7268
7269 if ((mask & TERRITORY) != 0)
7270@@ -271,7 +268,7 @@
7271
7272 /* Look in list of already loaded domains whether it is already
7273 available. */
7274- last = NULL;
7275+ lastp = l10nfile_list;
7276 for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
7277 if (retval->filename != NULL)
7278 {
7279@@ -286,7 +283,7 @@
7280 break;
7281 }
7282
7283- last = retval;
7284+ lastp = &retval->next;
7285 }
7286
7287 if (retval != NULL || do_allocate == 0)
7288@@ -295,48 +292,66 @@
7289 return retval;
7290 }
7291
7292- retval = (struct loaded_l10nfile *)
7293- malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
7294- * (1 << pop (mask))
7295- * sizeof (struct loaded_l10nfile *)));
7296+ dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
7297+
7298+ /* Allocate a new loaded_l10nfile. */
7299+ retval =
7300+ (struct loaded_l10nfile *)
7301+ malloc (sizeof (*retval)
7302+ + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
7303+ * sizeof (struct loaded_l10nfile *)));
7304 if (retval == NULL)
7305 return NULL;
7306
7307 retval->filename = abs_filename;
7308- retval->decided = (__argz_count (dirlist, dirlist_len) != 1
7309+
7310+ /* We set retval->data to NULL here; it is filled in later.
7311+ Setting retval->decided to 1 here means that retval does not
7312+ correspond to a real file (dirlist_count > 1) or is not worth
7313+ looking up (if an unnormalized codeset was specified). */
7314+ retval->decided = (dirlist_count > 1
7315 || ((mask & XPG_CODESET) != 0
7316 && (mask & XPG_NORM_CODESET) != 0));
7317 retval->data = NULL;
7318
7319- if (last == NULL)
7320- {
7321- retval->next = *l10nfile_list;
7322- *l10nfile_list = retval;
7323- }
7324- else
7325- {
7326- retval->next = last->next;
7327- last->next = retval;
7328- }
7329+ retval->next = *lastp;
7330+ *lastp = retval;
7331
7332 entries = 0;
7333- /* If the DIRLIST is a real list the RETVAL entry corresponds not to
7334- a real file. So we have to use the DIRLIST separation mechanism
7335- of the inner loop. */
7336- cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
7337- for (; cnt >= 0; --cnt)
7338+ /* Recurse to fill the inheritance list of RETVAL.
7339+ If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
7340+ entry does not correspond to a real file; retval->filename contains
7341+ colons. In this case we loop across all elements of DIRLIST and
7342+ across all bit patterns dominated by MASK.
7343+ If the DIRLIST is a single directory or entirely redundant (i.e.
7344+ DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
7345+ MASK, excluding MASK itself.
7346+ In either case, we loop down from MASK to 0. This has the effect
7347+ that the extra bits in the locale name are dropped in this order:
7348+ first the modifier, then the territory, then the codeset, then the
7349+ normalized_codeset. */
7350+ for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
7351 if ((cnt & ~mask) == 0
7352 && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
7353 && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
7354 {
7355- /* Iterate over all elements of the DIRLIST. */
7356- char *dir = NULL;
7357+ if (dirlist_count > 1)
7358+ {
7359+ /* Iterate over all elements of the DIRLIST. */
7360+ char *dir = NULL;
7361
7362- while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
7363- != NULL)
7364+ while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
7365+ != NULL)
7366+ retval->successor[entries++]
7367+ = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
7368+ cnt, language, territory, codeset,
7369+ normalized_codeset, modifier, special,
7370+ sponsor, revision, filename, 1);
7371+ }
7372+ else
7373 retval->successor[entries++]
7374- = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
7375- language, territory, codeset,
7376+ = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
7377+ cnt, language, territory, codeset,
7378 normalized_codeset, modifier, special,
7379 sponsor, revision, filename, 1);
7380 }
7381@@ -347,11 +362,10 @@
7382
7383 /* Normalize codeset name. There is no standard for the codeset
7384 names. Normalization allows the user to use any of the common
7385- names. */
7386+ names. The return value is dynamically allocated and has to be
7387+ freed by the caller. */
7388 const char *
7389-_nl_normalize_codeset (codeset, name_len)
7390- const char *codeset;
7391- size_t name_len;
7392+_nl_normalize_codeset (const char *codeset, size_t name_len)
7393 {
7394 int len = 0;
7395 int only_digit = 1;
7396@@ -360,11 +374,11 @@
7397 size_t cnt;
7398
7399 for (cnt = 0; cnt < name_len; ++cnt)
7400- if (isalnum (codeset[cnt]))
7401+ if (isalnum ((unsigned char) codeset[cnt]))
7402 {
7403 ++len;
7404
7405- if (isalpha (codeset[cnt]))
7406+ if (isalpha ((unsigned char) codeset[cnt]))
7407 only_digit = 0;
7408 }
7409
7410@@ -378,9 +392,9 @@
7411 wp = retval;
7412
7413 for (cnt = 0; cnt < name_len; ++cnt)
7414- if (isalpha (codeset[cnt]))
7415- *wp++ = tolower (codeset[cnt]);
7416- else if (isdigit (codeset[cnt]))
7417+ if (isalpha ((unsigned char) codeset[cnt]))
7418+ *wp++ = tolower ((unsigned char) codeset[cnt]);
7419+ else if (isdigit ((unsigned char) codeset[cnt]))
7420 *wp++ = codeset[cnt];
7421
7422 *wp = '\0';
7423@@ -398,9 +412,7 @@
7424 to be defined. */
7425 #if !_LIBC && !HAVE_STPCPY
7426 static char *
7427-stpcpy (dest, src)
7428- char *dest;
7429- const char *src;
7430+stpcpy (char *dest, const char *src)
7431 {
7432 while ((*dest++ = *src++) != '\0')
7433 /* Do nothing. */ ;
7434--- lrzsz-0.12.20.safe/intl/libgettext.h 1998-04-26 09:22:36.000000000 -0400
7435+++ lrzsz-0.12.20/intl/libgettext.h 1969-12-31 19:00:00.000000000 -0500
7436@@ -1,182 +0,0 @@
7437-/* Message catalogs for internationalization.
7438- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
7439-
7440- This program is free software; you can redistribute it and/or modify
7441- it under the terms of the GNU General Public License as published by
7442- the Free Software Foundation; either version 2, or (at your option)
7443- any later version.
7444-
7445- This program is distributed in the hope that it will be useful,
7446- but WITHOUT ANY WARRANTY; without even the implied warranty of
7447- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7448- GNU General Public License for more details.
7449-
7450- You should have received a copy of the GNU General Public License
7451- along with this program; if not, write to the Free Software Foundation,
7452- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
7453-
7454-/* Because on some systems (e.g. Solaris) we sometimes have to include
7455- the systems libintl.h as well as this file we have more complex
7456- include protection above. But the systems header might perhaps also
7457- define _LIBINTL_H and therefore we have to protect the definition here. */
7458-
7459-#if !defined (_LIBINTL_H) || !defined (_LIBGETTEXT_H)
7460-#if !defined (_LIBINTL_H)
7461-# define _LIBINTL_H 1
7462-#endif
7463-#define _LIBGETTEXT_H 1
7464-
7465-/* We define an additional symbol to signal that we use the GNU
7466- implementation of gettext. */
7467-#define __USE_GNU_GETTEXT 1
7468-
7469-#include <sys/types.h>
7470-
7471-#if HAVE_LOCALE_H
7472-# include <locale.h>
7473-#endif
7474-
7475-
7476-#ifdef __cplusplus
7477-extern "C" {
7478-#endif
7479-
7480-/* @@ end of prolog @@ */
7481-
7482-#ifndef PARAMS
7483-# if __STDC__
7484-# define PARAMS(args) args
7485-# else
7486-# define PARAMS(args) ()
7487-# endif
7488-#endif
7489-
7490-#ifndef NULL
7491-# if !defined __cplusplus || defined __GNUC__
7492-# define NULL ((void *) 0)
7493-# else
7494-# define NULL (0)
7495-# endif
7496-#endif
7497-
7498-#if !HAVE_LC_MESSAGES
7499-/* This value determines the behaviour of the gettext() and dgettext()
7500- function. But some system does not have this defined. Define it
7501- to a default value. */
7502-# define LC_MESSAGES (-1)
7503-#endif
7504-
7505-
7506-/* Declarations for gettext-using-catgets interface. Derived from
7507- Jim Meyering's libintl.h. */
7508-struct _msg_ent
7509-{
7510- const char *_msg;
7511- int _msg_number;
7512-};
7513-
7514-
7515-#if HAVE_CATGETS
7516-/* These two variables are defined in the automatically by po-to-tbl.sed
7517- generated file `cat-id-tbl.c'. */
7518-extern const struct _msg_ent _msg_tbl[];
7519-extern int _msg_tbl_length;
7520-#endif
7521-
7522-
7523-/* For automatical extraction of messages sometimes no real
7524- translation is needed. Instead the string itself is the result. */
7525-#define gettext_noop(Str) (Str)
7526-
7527-/* Look up MSGID in the current default message catalog for the current
7528- LC_MESSAGES locale. If not found, returns MSGID itself (the default
7529- text). */
7530-extern char *gettext PARAMS ((const char *__msgid));
7531-extern char *gettext__ PARAMS ((const char *__msgid));
7532-
7533-/* Look up MSGID in the DOMAINNAME message catalog for the current
7534- LC_MESSAGES locale. */
7535-extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
7536-extern char *dgettext__ PARAMS ((const char *__domainname,
7537- const char *__msgid));
7538-
7539-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
7540- locale. */
7541-extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
7542- int __category));
7543-extern char *dcgettext__ PARAMS ((const char *__domainname,
7544- const char *__msgid, int __category));
7545-
7546-
7547-/* Set the current default message catalog to DOMAINNAME.
7548- If DOMAINNAME is null, return the current default.
7549- If DOMAINNAME is "", reset to the default of "messages". */
7550-extern char *textdomain PARAMS ((const char *__domainname));
7551-extern char *textdomain__ PARAMS ((const char *__domainname));
7552-
7553-/* Specify that the DOMAINNAME message catalog will be found
7554- in DIRNAME rather than in the system locale data base. */
7555-extern char *bindtextdomain PARAMS ((const char *__domainname,
7556- const char *__dirname));
7557-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
7558- const char *__dirname));
7559-
7560-#if ENABLE_NLS
7561-
7562-/* Solaris 2.3 has the gettext function but dcgettext is missing.
7563- So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
7564- has dcgettext. */
7565-# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
7566-
7567-# define gettext(Msgid) \
7568- dgettext (NULL, Msgid)
7569-
7570-# define dgettext(Domainname, Msgid) \
7571- dcgettext (Domainname, Msgid, LC_MESSAGES)
7572-
7573-# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
7574-/* This global variable is defined in loadmsgcat.c. We need a sign,
7575- whether a new catalog was loaded, which can be associated with all
7576- translations. */
7577-extern int _nl_msg_cat_cntr;
7578-
7579-# define dcgettext(Domainname, Msgid, Category) \
7580- (__extension__ \
7581- ({ \
7582- char *__result; \
7583- if (__builtin_constant_p (Msgid)) \
7584- { \
7585- static char *__translation__; \
7586- static int __catalog_counter__; \
7587- if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
7588- { \
7589- __translation__ = \
7590- dcgettext__ (Domainname, Msgid, Category); \
7591- __catalog_counter__ = _nl_msg_cat_cntr; \
7592- } \
7593- __result = __translation__; \
7594- } \
7595- else \
7596- __result = dcgettext__ (Domainname, Msgid, Category); \
7597- __result; \
7598- }))
7599-# endif
7600-# endif
7601-
7602-#else
7603-
7604-# define gettext(Msgid) (Msgid)
7605-# define dgettext(Domainname, Msgid) (Msgid)
7606-# define dcgettext(Domainname, Msgid, Category) (Msgid)
7607-# define textdomain(Domainname) while (0) /* nothing */
7608-# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
7609-
7610-#endif
7611-
7612-/* @@ begin of epilog @@ */
7613-
7614-#ifdef __cplusplus
7615-}
7616-#endif
7617-
7618-#endif
7619--- lrzsz-0.12.20.safe/intl/libgnuintl.h.in 1969-12-31 19:00:00.000000000 -0500
7620+++ lrzsz-0.12.20/intl/libgnuintl.h.in 2004-09-12 14:40:34.462731824 -0400
7621@@ -0,0 +1,383 @@
7622+/* Message catalogs for internationalization.
7623+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
7624+
7625+ This program is free software; you can redistribute it and/or modify it
7626+ under the terms of the GNU Library General Public License as published
7627+ by the Free Software Foundation; either version 2, or (at your option)
7628+ any later version.
7629+
7630+ This program is distributed in the hope that it will be useful,
7631+ but WITHOUT ANY WARRANTY; without even the implied warranty of
7632+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7633+ Library General Public License for more details.
7634+
7635+ You should have received a copy of the GNU Library General Public
7636+ License along with this program; if not, write to the Free Software
7637+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7638+ USA. */
7639+
7640+#ifndef _LIBINTL_H
7641+#define _LIBINTL_H 1
7642+
7643+#include <locale.h>
7644+
7645+/* The LC_MESSAGES locale category is the category used by the functions
7646+ gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
7647+ On systems that don't define it, use an arbitrary value instead.
7648+ On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
7649+ then includes <libintl.h> (i.e. this file!) and then only defines
7650+ LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
7651+ in this case. */
7652+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
7653+# define LC_MESSAGES 1729
7654+#endif
7655+
7656+/* We define an additional symbol to signal that we use the GNU
7657+ implementation of gettext. */
7658+#define __USE_GNU_GETTEXT 1
7659+
7660+/* Provide information about the supported file formats. Returns the
7661+ maximum minor revision number supported for a given major revision. */
7662+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
7663+ ((major) == 0 ? 1 : -1)
7664+
7665+/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
7666+ precedence over _conio_gettext. */
7667+#ifdef __DJGPP__
7668+# undef gettext
7669+#endif
7670+
7671+#ifdef __cplusplus
7672+extern "C" {
7673+#endif
7674+
7675+
7676+/* We redirect the functions to those prefixed with "libintl_". This is
7677+ necessary, because some systems define gettext/textdomain/... in the C
7678+ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
7679+ If we used the unprefixed names, there would be cases where the
7680+ definition in the C library would override the one in the libintl.so
7681+ shared library. Recall that on ELF systems, the symbols are looked
7682+ up in the following order:
7683+ 1. in the executable,
7684+ 2. in the shared libraries specified on the link command line, in order,
7685+ 3. in the dependencies of the shared libraries specified on the link
7686+ command line,
7687+ 4. in the dlopen()ed shared libraries, in the order in which they were
7688+ dlopen()ed.
7689+ The definition in the C library would override the one in libintl.so if
7690+ either
7691+ * -lc is given on the link command line and -lintl isn't, or
7692+ * -lc is given on the link command line before -lintl, or
7693+ * libintl.so is a dependency of a dlopen()ed shared library but not
7694+ linked to the executable at link time.
7695+ Since Solaris gettext() behaves differently than GNU gettext(), this
7696+ would be unacceptable.
7697+
7698+ The redirection happens by default through macros in C, so that &gettext
7699+ is independent of the compilation unit, but through inline functions in
7700+ C++, in order not to interfere with the name mangling of class fields or
7701+ class methods called 'gettext'. */
7702+
7703+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
7704+ If he doesn't, we choose the method. A third possible method is
7705+ _INTL_REDIRECT_ASM, supported only by GCC. */
7706+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
7707+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
7708+# define _INTL_REDIRECT_ASM
7709+# else
7710+# ifdef __cplusplus
7711+# define _INTL_REDIRECT_INLINE
7712+# else
7713+# define _INTL_REDIRECT_MACROS
7714+# endif
7715+# endif
7716+#endif
7717+/* Auxiliary macros. */
7718+#ifdef _INTL_REDIRECT_ASM
7719+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
7720+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
7721+# define _INTL_STRINGIFY(prefix) #prefix
7722+#else
7723+# define _INTL_ASM(cname)
7724+#endif
7725+
7726+/* Look up MSGID in the current default message catalog for the current
7727+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
7728+ text). */
7729+#ifdef _INTL_REDIRECT_INLINE
7730+extern char *libintl_gettext (const char *__msgid);
7731+static inline char *gettext (const char *__msgid)
7732+{
7733+ return libintl_gettext (__msgid);
7734+}
7735+#else
7736+#ifdef _INTL_REDIRECT_MACROS
7737+# define gettext libintl_gettext
7738+#endif
7739+extern char *gettext (const char *__msgid)
7740+ _INTL_ASM (libintl_gettext);
7741+#endif
7742+
7743+/* Look up MSGID in the DOMAINNAME message catalog for the current
7744+ LC_MESSAGES locale. */
7745+#ifdef _INTL_REDIRECT_INLINE
7746+extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
7747+static inline char *dgettext (const char *__domainname, const char *__msgid)
7748+{
7749+ return libintl_dgettext (__domainname, __msgid);
7750+}
7751+#else
7752+#ifdef _INTL_REDIRECT_MACROS
7753+# define dgettext libintl_dgettext
7754+#endif
7755+extern char *dgettext (const char *__domainname, const char *__msgid)
7756+ _INTL_ASM (libintl_dgettext);
7757+#endif
7758+
7759+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
7760+ locale. */
7761+#ifdef _INTL_REDIRECT_INLINE
7762+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
7763+ int __category);
7764+static inline char *dcgettext (const char *__domainname, const char *__msgid,
7765+ int __category)
7766+{
7767+ return libintl_dcgettext (__domainname, __msgid, __category);
7768+}
7769+#else
7770+#ifdef _INTL_REDIRECT_MACROS
7771+# define dcgettext libintl_dcgettext
7772+#endif
7773+extern char *dcgettext (const char *__domainname, const char *__msgid,
7774+ int __category)
7775+ _INTL_ASM (libintl_dcgettext);
7776+#endif
7777+
7778+
7779+/* Similar to `gettext' but select the plural form corresponding to the
7780+ number N. */
7781+#ifdef _INTL_REDIRECT_INLINE
7782+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
7783+ unsigned long int __n);
7784+static inline char *ngettext (const char *__msgid1, const char *__msgid2,
7785+ unsigned long int __n)
7786+{
7787+ return libintl_ngettext (__msgid1, __msgid2, __n);
7788+}
7789+#else
7790+#ifdef _INTL_REDIRECT_MACROS
7791+# define ngettext libintl_ngettext
7792+#endif
7793+extern char *ngettext (const char *__msgid1, const char *__msgid2,
7794+ unsigned long int __n)
7795+ _INTL_ASM (libintl_ngettext);
7796+#endif
7797+
7798+/* Similar to `dgettext' but select the plural form corresponding to the
7799+ number N. */
7800+#ifdef _INTL_REDIRECT_INLINE
7801+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
7802+ const char *__msgid2, unsigned long int __n);
7803+static inline char *dngettext (const char *__domainname, const char *__msgid1,
7804+ const char *__msgid2, unsigned long int __n)
7805+{
7806+ return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
7807+}
7808+#else
7809+#ifdef _INTL_REDIRECT_MACROS
7810+# define dngettext libintl_dngettext
7811+#endif
7812+extern char *dngettext (const char *__domainname,
7813+ const char *__msgid1, const char *__msgid2,
7814+ unsigned long int __n)
7815+ _INTL_ASM (libintl_dngettext);
7816+#endif
7817+
7818+/* Similar to `dcgettext' but select the plural form corresponding to the
7819+ number N. */
7820+#ifdef _INTL_REDIRECT_INLINE
7821+extern char *libintl_dcngettext (const char *__domainname,
7822+ const char *__msgid1, const char *__msgid2,
7823+ unsigned long int __n, int __category);
7824+static inline char *dcngettext (const char *__domainname,
7825+ const char *__msgid1, const char *__msgid2,
7826+ unsigned long int __n, int __category)
7827+{
7828+ return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
7829+}
7830+#else
7831+#ifdef _INTL_REDIRECT_MACROS
7832+# define dcngettext libintl_dcngettext
7833+#endif
7834+extern char *dcngettext (const char *__domainname,
7835+ const char *__msgid1, const char *__msgid2,
7836+ unsigned long int __n, int __category)
7837+ _INTL_ASM (libintl_dcngettext);
7838+#endif
7839+
7840+
7841+/* Set the current default message catalog to DOMAINNAME.
7842+ If DOMAINNAME is null, return the current default.
7843+ If DOMAINNAME is "", reset to the default of "messages". */
7844+#ifdef _INTL_REDIRECT_INLINE
7845+extern char *libintl_textdomain (const char *__domainname);
7846+static inline char *textdomain (const char *__domainname)
7847+{
7848+ return libintl_textdomain (__domainname);
7849+}
7850+#else
7851+#ifdef _INTL_REDIRECT_MACROS
7852+# define textdomain libintl_textdomain
7853+#endif
7854+extern char *textdomain (const char *__domainname)
7855+ _INTL_ASM (libintl_textdomain);
7856+#endif
7857+
7858+/* Specify that the DOMAINNAME message catalog will be found
7859+ in DIRNAME rather than in the system locale data base. */
7860+#ifdef _INTL_REDIRECT_INLINE
7861+extern char *libintl_bindtextdomain (const char *__domainname,
7862+ const char *__dirname);
7863+static inline char *bindtextdomain (const char *__domainname,
7864+ const char *__dirname)
7865+{
7866+ return libintl_bindtextdomain (__domainname, __dirname);
7867+}
7868+#else
7869+#ifdef _INTL_REDIRECT_MACROS
7870+# define bindtextdomain libintl_bindtextdomain
7871+#endif
7872+extern char *bindtextdomain (const char *__domainname, const char *__dirname)
7873+ _INTL_ASM (libintl_bindtextdomain);
7874+#endif
7875+
7876+/* Specify the character encoding in which the messages from the
7877+ DOMAINNAME message catalog will be returned. */
7878+#ifdef _INTL_REDIRECT_INLINE
7879+extern char *libintl_bind_textdomain_codeset (const char *__domainname,
7880+ const char *__codeset);
7881+static inline char *bind_textdomain_codeset (const char *__domainname,
7882+ const char *__codeset)
7883+{
7884+ return libintl_bind_textdomain_codeset (__domainname, __codeset);
7885+}
7886+#else
7887+#ifdef _INTL_REDIRECT_MACROS
7888+# define bind_textdomain_codeset libintl_bind_textdomain_codeset
7889+#endif
7890+extern char *bind_textdomain_codeset (const char *__domainname,
7891+ const char *__codeset)
7892+ _INTL_ASM (libintl_bind_textdomain_codeset);
7893+#endif
7894+
7895+
7896+/* Support for format strings with positions in *printf(), following the
7897+ POSIX/XSI specification.
7898+ Note: These replacements for the *printf() functions are visible only
7899+ in source files that #include <libintl.h> or #include "gettext.h".
7900+ Packages that use *printf() in source files that don't refer to _()
7901+ or gettext() but for which the format string could be the return value
7902+ of _() or gettext() need to add this #include. Oh well. */
7903+
7904+#if !@HAVE_POSIX_PRINTF@
7905+
7906+#include <stdio.h>
7907+#include <stddef.h>
7908+
7909+/* Get va_list. */
7910+#if __STDC__ || defined __cplusplus || defined _MSC_VER
7911+# include <stdarg.h>
7912+#else
7913+# include <varargs.h>
7914+#endif
7915+
7916+#undef fprintf
7917+#define fprintf libintl_fprintf
7918+extern int fprintf (FILE *, const char *, ...);
7919+#undef vfprintf
7920+#define vfprintf libintl_vfprintf
7921+extern int vfprintf (FILE *, const char *, va_list);
7922+
7923+#undef printf
7924+#define printf libintl_printf
7925+extern int printf (const char *, ...);
7926+#undef vprintf
7927+#define vprintf libintl_vprintf
7928+extern int vprintf (const char *, va_list);
7929+
7930+#undef sprintf
7931+#define sprintf libintl_sprintf
7932+extern int sprintf (char *, const char *, ...);
7933+#undef vsprintf
7934+#define vsprintf libintl_vsprintf
7935+extern int vsprintf (char *, const char *, va_list);
7936+
7937+#if @HAVE_SNPRINTF@
7938+
7939+#undef snprintf
7940+#define snprintf libintl_snprintf
7941+extern int snprintf (char *, size_t, const char *, ...);
7942+#undef vsnprintf
7943+#define vsnprintf libintl_vsnprintf
7944+extern int vsnprintf (char *, size_t, const char *, va_list);
7945+
7946+#endif
7947+
7948+#if @HAVE_ASPRINTF@
7949+
7950+#undef asprintf
7951+#define asprintf libintl_asprintf
7952+extern int asprintf (char **, const char *, ...);
7953+#undef vasprintf
7954+#define vasprintf libintl_vasprintf
7955+extern int vasprintf (char **, const char *, va_list);
7956+
7957+#endif
7958+
7959+#if @HAVE_WPRINTF@
7960+
7961+#undef fwprintf
7962+#define fwprintf libintl_fwprintf
7963+extern int fwprintf (FILE *, const wchar_t *, ...);
7964+#undef vfwprintf
7965+#define vfwprintf libintl_vfwprintf
7966+extern int vfwprintf (FILE *, const wchar_t *, va_list);
7967+
7968+#undef wprintf
7969+#define wprintf libintl_wprintf
7970+extern int wprintf (const wchar_t *, ...);
7971+#undef vwprintf
7972+#define vwprintf libintl_vwprintf
7973+extern int vwprintf (const wchar_t *, va_list);
7974+
7975+#undef swprintf
7976+#define swprintf libintl_swprintf
7977+extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
7978+#undef vswprintf
7979+#define vswprintf libintl_vswprintf
7980+extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
7981+
7982+#endif
7983+
7984+#endif
7985+
7986+
7987+/* Support for relocatable packages. */
7988+
7989+/* Sets the original and the current installation prefix of the package.
7990+ Relocation simply replaces a pathname starting with the original prefix
7991+ by the corresponding pathname with the current prefix instead. Both
7992+ prefixes should be directory names without trailing slash (i.e. use ""
7993+ instead of "/"). */
7994+#define libintl_set_relocation_prefix libintl_set_relocation_prefix
7995+extern void
7996+ libintl_set_relocation_prefix (const char *orig_prefix,
7997+ const char *curr_prefix);
7998+
7999+
8000+#ifdef __cplusplus
8001+}
8002+#endif
8003+
8004+#endif /* libintl.h */
8005--- lrzsz-0.12.20.safe/intl/linux-msg.sed 1998-04-26 09:20:52.000000000 -0400
8006+++ lrzsz-0.12.20/intl/linux-msg.sed 1969-12-31 19:00:00.000000000 -0500
8007@@ -1,100 +0,0 @@
8008-# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
8009-# Copyright (C) 1995 Free Software Foundation, Inc.
8010-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
8011-#
8012-# This program is free software; you can redistribute it and/or modify
8013-# it under the terms of the GNU General Public License as published by
8014-# the Free Software Foundation; either version 2, or (at your option)
8015-# any later version.
8016-#
8017-# This program is distributed in the hope that it will be useful,
8018-# but WITHOUT ANY WARRANTY; without even the implied warranty of
8019-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8020-# GNU General Public License for more details.
8021-#
8022-# You should have received a copy of the GNU General Public License
8023-# along with this program; if not, write to the Free Software
8024-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8025-#
8026-#
8027-# The first directive in the .msg should be the definition of the
8028-# message set number. We use always set number 1.
8029-#
8030-1 {
8031- i\
8032-$set 1 # Automatically created by po2msg.sed
8033- h
8034- s/.*/0/
8035- x
8036-}
8037-#
8038-# Mitch's old catalog format does not allow comments.
8039-#
8040-# We copy the original message as a comment into the .msg file.
8041-#
8042-/^msgid/ {
8043- s/msgid[ ]*"//
8044-#
8045-# This does not work now with the new format.
8046-# /"$/! {
8047-# s/\\$//
8048-# s/$/ ... (more lines following)"/
8049-# }
8050- x
8051-# The following nice solution is by
8052-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
8053- td
8054-# Increment a decimal number in pattern space.
8055-# First hide trailing `9' digits.
8056- :d
8057- s/9\(_*\)$/_\1/
8058- td
8059-# Assure at least one digit is available.
8060- s/^\(_*\)$/0\1/
8061-# Increment the last digit.
8062- s/8\(_*\)$/9\1/
8063- s/7\(_*\)$/8\1/
8064- s/6\(_*\)$/7\1/
8065- s/5\(_*\)$/6\1/
8066- s/4\(_*\)$/5\1/
8067- s/3\(_*\)$/4\1/
8068- s/2\(_*\)$/3\1/
8069- s/1\(_*\)$/2\1/
8070- s/0\(_*\)$/1\1/
8071-# Convert the hidden `9' digits to `0's.
8072- s/_/0/g
8073- x
8074- G
8075- s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
8076-}
8077-#
8078-# The .msg file contains, other then the .po file, only the translations
8079-# but each given a unique ID. Starting from 1 and incrementing by 1 for
8080-# each message we assign them to the messages.
8081-# It is important that the .po file used to generate the cat-id-tbl.c file
8082-# (with po-to-tbl) is the same as the one used here. (At least the order
8083-# of declarations must not be changed.)
8084-#
8085-/^msgstr/ {
8086- s/msgstr[ ]*"\(.*\)"/# \1/
8087-# Clear substitution flag.
8088- tb
8089-# Append the next line.
8090- :b
8091- N
8092-# Look whether second part is continuation line.
8093- s/\(.*\n\)"\(.*\)"/\1\2/
8094-# Yes, then branch.
8095- ta
8096- P
8097- D
8098-# Note that D includes a jump to the start!!
8099-# We found a continuation line. But before printing insert '\'.
8100- :a
8101- s/\(.*\)\(\n.*\)/\1\\\2/
8102- P
8103-# We cannot use D here.
8104- s/.*\n\(.*\)/\1/
8105- tb
8106-}
8107-d
8108--- lrzsz-0.12.20.safe/intl/loadinfo.h 1998-04-26 09:20:52.000000000 -0400
8109+++ lrzsz-0.12.20/intl/loadinfo.h 2004-09-12 14:40:34.468730912 -0400
8110@@ -1,9 +1,54 @@
8111-#ifndef PARAMS
8112-# if __STDC__
8113-# define PARAMS(args) args
8114-# else
8115-# define PARAMS(args) ()
8116-# endif
8117+/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc.
8118+ This file is part of the GNU C Library.
8119+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
8120+
8121+ This program is free software; you can redistribute it and/or modify it
8122+ under the terms of the GNU Library General Public License as published
8123+ by the Free Software Foundation; either version 2, or (at your option)
8124+ any later version.
8125+
8126+ This program is distributed in the hope that it will be useful,
8127+ but WITHOUT ANY WARRANTY; without even the implied warranty of
8128+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8129+ Library General Public License for more details.
8130+
8131+ You should have received a copy of the GNU Library General Public
8132+ License along with this program; if not, write to the Free Software
8133+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
8134+ USA. */
8135+
8136+#ifndef _LOADINFO_H
8137+#define _LOADINFO_H 1
8138+
8139+/* Declarations of locale dependent catalog lookup functions.
8140+ Implemented in
8141+
8142+ localealias.c Possibly replace a locale name by another.
8143+ explodename.c Split a locale name into its various fields.
8144+ l10nflist.c Generate a list of filenames of possible message catalogs.
8145+ finddomain.c Find and open the relevant message catalogs.
8146+
8147+ The main function _nl_find_domain() in finddomain.c is declared
8148+ in gettextP.h.
8149+ */
8150+
8151+#ifndef internal_function
8152+# define internal_function
8153+#endif
8154+
8155+/* Tell the compiler when a conditional or integer expression is
8156+ almost always true or almost always false. */
8157+#ifndef HAVE_BUILTIN_EXPECT
8158+# define __builtin_expect(expr, val) (expr)
8159+#endif
8160+
8161+/* Separator in PATH like lists of pathnames. */
8162+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
8163+ /* Win32, OS/2, DOS */
8164+# define PATH_SEPARATOR ';'
8165+#else
8166+ /* Unix */
8167+# define PATH_SEPARATOR ':'
8168 #endif
8169
8170 /* Encoding of locale name parts. */
8171@@ -32,27 +77,69 @@
8172 };
8173
8174
8175-extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
8176- size_t name_len));
8177+/* Normalize codeset name. There is no standard for the codeset
8178+ names. Normalization allows the user to use any of the common
8179+ names. The return value is dynamically allocated and has to be
8180+ freed by the caller. */
8181+extern const char *_nl_normalize_codeset (const char *codeset,
8182+ size_t name_len);
8183
8184+/* Lookup a locale dependent file.
8185+ *L10NFILE_LIST denotes a pool of lookup results of locale dependent
8186+ files of the same kind, sorted in decreasing order of ->filename.
8187+ DIRLIST and DIRLIST_LEN are an argz list of directories in which to
8188+ look, containing at least one directory (i.e. DIRLIST_LEN > 0).
8189+ MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
8190+ SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
8191+ produced by _nl_explode_name(). FILENAME is the filename suffix.
8192+ The return value is the lookup result, either found in *L10NFILE_LIST,
8193+ or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
8194+ If the return value is non-NULL, it is added to *L10NFILE_LIST, and
8195+ its ->next field denotes the chaining inside *L10NFILE_LIST, and
8196+ furthermore its ->successor[] field contains a list of other lookup
8197+ results from which this lookup result inherits. */
8198 extern struct loaded_l10nfile *
8199-_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
8200- const char *dirlist, size_t dirlist_len, int mask,
8201- const char *language, const char *territory,
8202- const char *codeset,
8203- const char *normalized_codeset,
8204- const char *modifier, const char *special,
8205- const char *sponsor, const char *revision,
8206- const char *filename, int do_allocate));
8207+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
8208+ const char *dirlist, size_t dirlist_len, int mask,
8209+ const char *language, const char *territory,
8210+ const char *codeset, const char *normalized_codeset,
8211+ const char *modifier, const char *special,
8212+ const char *sponsor, const char *revision,
8213+ const char *filename, int do_allocate);
8214
8215+/* Lookup the real locale name for a locale alias NAME, or NULL if
8216+ NAME is not a locale alias (but possibly a real locale name).
8217+ The return value is statically allocated and must not be freed. */
8218+extern const char *_nl_expand_alias (const char *name);
8219
8220-extern const char *_nl_expand_alias PARAMS ((const char *name));
8221+/* Split a locale name NAME into its pieces: language, modifier,
8222+ territory, codeset, special, sponsor, revision.
8223+ NAME gets destructively modified: NUL bytes are inserted here and
8224+ there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
8225+ *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
8226+ pointer into the old NAME string, or NULL. *NORMALIZED_CODESET
8227+ gets assigned the expanded *CODESET, if it is different from *CODESET;
8228+ this one is dynamically allocated and has to be freed by the caller.
8229+ The return value is a bitmask, where each bit corresponds to one
8230+ filled-in value:
8231+ XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER,
8232+ TERRITORY for *TERRITORY,
8233+ XPG_CODESET for *CODESET,
8234+ XPG_NORM_CODESET for *NORMALIZED_CODESET,
8235+ CEN_SPECIAL for *SPECIAL,
8236+ CEN_SPONSOR for *SPONSOR,
8237+ CEN_REVISION for *REVISION.
8238+ */
8239+extern int _nl_explode_name (char *name, const char **language,
8240+ const char **modifier, const char **territory,
8241+ const char **codeset,
8242+ const char **normalized_codeset,
8243+ const char **special, const char **sponsor,
8244+ const char **revision);
8245
8246-extern int _nl_explode_name PARAMS ((char *name, const char **language,
8247- const char **modifier,
8248- const char **territory,
8249- const char **codeset,
8250- const char **normalized_codeset,
8251- const char **special,
8252- const char **sponsor,
8253- const char **revision));
8254+/* Split a locale name NAME into a leading language part and all the
8255+ rest. Return a pointer to the first character after the language,
8256+ i.e. to the first byte of the rest. */
8257+extern char *_nl_find_language (const char *name);
8258+
8259+#endif /* loadinfo.h */
8260--- lrzsz-0.12.20.safe/intl/loadmsgcat.c 1998-04-26 09:22:37.000000000 -0400
8261+++ lrzsz-0.12.20/intl/loadmsgcat.c 2004-09-12 14:40:34.473730152 -0400
8262@@ -1,42 +1,455 @@
8263-/* Load needed message catalogs
8264- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
8265+/* Load needed message catalogs.
8266+ Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
8267
8268- This program is free software; you can redistribute it and/or modify
8269- it under the terms of the GNU General Public License as published by
8270- the Free Software Foundation; either version 2, or (at your option)
8271+ This program is free software; you can redistribute it and/or modify it
8272+ under the terms of the GNU Library General Public License as published
8273+ by the Free Software Foundation; either version 2, or (at your option)
8274 any later version.
8275
8276 This program is distributed in the hope that it will be useful,
8277 but WITHOUT ANY WARRANTY; without even the implied warranty of
8278- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8279- GNU General Public License for more details.
8280+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8281+ Library General Public License for more details.
8282
8283- You should have received a copy of the GNU General Public License
8284- along with this program; if not, write to the Free Software Foundation,
8285- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
8286+ You should have received a copy of the GNU Library General Public
8287+ License along with this program; if not, write to the Free Software
8288+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
8289+ USA. */
8290+
8291+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
8292+ This must come before <config.h> because <config.h> may include
8293+ <features.h>, and once <features.h> has been included, it's too late. */
8294+#ifndef _GNU_SOURCE
8295+# define _GNU_SOURCE 1
8296+#endif
8297
8298 #ifdef HAVE_CONFIG_H
8299 # include <config.h>
8300 #endif
8301
8302+#include <ctype.h>
8303+#include <errno.h>
8304 #include <fcntl.h>
8305 #include <sys/types.h>
8306 #include <sys/stat.h>
8307
8308-#if defined STDC_HEADERS || defined _LIBC
8309-# include <stdlib.h>
8310+#ifdef __GNUC__
8311+# undef alloca
8312+# define alloca __builtin_alloca
8313+# define HAVE_ALLOCA 1
8314+#else
8315+# ifdef _MSC_VER
8316+# include <malloc.h>
8317+# define alloca _alloca
8318+# else
8319+# if defined HAVE_ALLOCA_H || defined _LIBC
8320+# include <alloca.h>
8321+# else
8322+# ifdef _AIX
8323+ #pragma alloca
8324+# else
8325+# ifndef alloca
8326+char *alloca ();
8327+# endif
8328+# endif
8329+# endif
8330+# endif
8331 #endif
8332
8333+#include <stdlib.h>
8334+#include <string.h>
8335+
8336 #if defined HAVE_UNISTD_H || defined _LIBC
8337 # include <unistd.h>
8338 #endif
8339
8340-#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
8341+#ifdef _LIBC
8342+# include <langinfo.h>
8343+# include <locale.h>
8344+#endif
8345+
8346+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
8347+ || (defined _LIBC && defined _POSIX_MAPPED_FILES)
8348 # include <sys/mman.h>
8349+# undef HAVE_MMAP
8350+# define HAVE_MMAP 1
8351+#else
8352+# undef HAVE_MMAP
8353 #endif
8354
8355-#include "gettext.h"
8356+#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
8357+# include <stdint.h>
8358+#endif
8359+#if defined HAVE_INTTYPES_H || defined _LIBC
8360+# include <inttypes.h>
8361+#endif
8362+
8363+#include "gmo.h"
8364 #include "gettextP.h"
8365+#include "hash-string.h"
8366+#include "plural-exp.h"
8367+
8368+#ifdef _LIBC
8369+# include "../locale/localeinfo.h"
8370+#endif
8371+
8372+/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
8373+ Note that our fallback values need not be literal strings, because we don't
8374+ use them with preprocessor string concatenation. */
8375+#if !defined PRId8 || PRI_MACROS_BROKEN
8376+# undef PRId8
8377+# define PRId8 "d"
8378+#endif
8379+#if !defined PRIi8 || PRI_MACROS_BROKEN
8380+# undef PRIi8
8381+# define PRIi8 "i"
8382+#endif
8383+#if !defined PRIo8 || PRI_MACROS_BROKEN
8384+# undef PRIo8
8385+# define PRIo8 "o"
8386+#endif
8387+#if !defined PRIu8 || PRI_MACROS_BROKEN
8388+# undef PRIu8
8389+# define PRIu8 "u"
8390+#endif
8391+#if !defined PRIx8 || PRI_MACROS_BROKEN
8392+# undef PRIx8
8393+# define PRIx8 "x"
8394+#endif
8395+#if !defined PRIX8 || PRI_MACROS_BROKEN
8396+# undef PRIX8
8397+# define PRIX8 "X"
8398+#endif
8399+#if !defined PRId16 || PRI_MACROS_BROKEN
8400+# undef PRId16
8401+# define PRId16 "d"
8402+#endif
8403+#if !defined PRIi16 || PRI_MACROS_BROKEN
8404+# undef PRIi16
8405+# define PRIi16 "i"
8406+#endif
8407+#if !defined PRIo16 || PRI_MACROS_BROKEN
8408+# undef PRIo16
8409+# define PRIo16 "o"
8410+#endif
8411+#if !defined PRIu16 || PRI_MACROS_BROKEN
8412+# undef PRIu16
8413+# define PRIu16 "u"
8414+#endif
8415+#if !defined PRIx16 || PRI_MACROS_BROKEN
8416+# undef PRIx16
8417+# define PRIx16 "x"
8418+#endif
8419+#if !defined PRIX16 || PRI_MACROS_BROKEN
8420+# undef PRIX16
8421+# define PRIX16 "X"
8422+#endif
8423+#if !defined PRId32 || PRI_MACROS_BROKEN
8424+# undef PRId32
8425+# define PRId32 "d"
8426+#endif
8427+#if !defined PRIi32 || PRI_MACROS_BROKEN
8428+# undef PRIi32
8429+# define PRIi32 "i"
8430+#endif
8431+#if !defined PRIo32 || PRI_MACROS_BROKEN
8432+# undef PRIo32
8433+# define PRIo32 "o"
8434+#endif
8435+#if !defined PRIu32 || PRI_MACROS_BROKEN
8436+# undef PRIu32
8437+# define PRIu32 "u"
8438+#endif
8439+#if !defined PRIx32 || PRI_MACROS_BROKEN
8440+# undef PRIx32
8441+# define PRIx32 "x"
8442+#endif
8443+#if !defined PRIX32 || PRI_MACROS_BROKEN
8444+# undef PRIX32
8445+# define PRIX32 "X"
8446+#endif
8447+#if !defined PRId64 || PRI_MACROS_BROKEN
8448+# undef PRId64
8449+# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
8450+#endif
8451+#if !defined PRIi64 || PRI_MACROS_BROKEN
8452+# undef PRIi64
8453+# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
8454+#endif
8455+#if !defined PRIo64 || PRI_MACROS_BROKEN
8456+# undef PRIo64
8457+# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
8458+#endif
8459+#if !defined PRIu64 || PRI_MACROS_BROKEN
8460+# undef PRIu64
8461+# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
8462+#endif
8463+#if !defined PRIx64 || PRI_MACROS_BROKEN
8464+# undef PRIx64
8465+# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
8466+#endif
8467+#if !defined PRIX64 || PRI_MACROS_BROKEN
8468+# undef PRIX64
8469+# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
8470+#endif
8471+#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
8472+# undef PRIdLEAST8
8473+# define PRIdLEAST8 "d"
8474+#endif
8475+#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
8476+# undef PRIiLEAST8
8477+# define PRIiLEAST8 "i"
8478+#endif
8479+#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
8480+# undef PRIoLEAST8
8481+# define PRIoLEAST8 "o"
8482+#endif
8483+#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
8484+# undef PRIuLEAST8
8485+# define PRIuLEAST8 "u"
8486+#endif
8487+#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
8488+# undef PRIxLEAST8
8489+# define PRIxLEAST8 "x"
8490+#endif
8491+#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
8492+# undef PRIXLEAST8
8493+# define PRIXLEAST8 "X"
8494+#endif
8495+#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
8496+# undef PRIdLEAST16
8497+# define PRIdLEAST16 "d"
8498+#endif
8499+#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
8500+# undef PRIiLEAST16
8501+# define PRIiLEAST16 "i"
8502+#endif
8503+#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
8504+# undef PRIoLEAST16
8505+# define PRIoLEAST16 "o"
8506+#endif
8507+#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
8508+# undef PRIuLEAST16
8509+# define PRIuLEAST16 "u"
8510+#endif
8511+#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
8512+# undef PRIxLEAST16
8513+# define PRIxLEAST16 "x"
8514+#endif
8515+#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
8516+# undef PRIXLEAST16
8517+# define PRIXLEAST16 "X"
8518+#endif
8519+#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
8520+# undef PRIdLEAST32
8521+# define PRIdLEAST32 "d"
8522+#endif
8523+#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
8524+# undef PRIiLEAST32
8525+# define PRIiLEAST32 "i"
8526+#endif
8527+#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
8528+# undef PRIoLEAST32
8529+# define PRIoLEAST32 "o"
8530+#endif
8531+#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
8532+# undef PRIuLEAST32
8533+# define PRIuLEAST32 "u"
8534+#endif
8535+#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
8536+# undef PRIxLEAST32
8537+# define PRIxLEAST32 "x"
8538+#endif
8539+#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
8540+# undef PRIXLEAST32
8541+# define PRIXLEAST32 "X"
8542+#endif
8543+#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
8544+# undef PRIdLEAST64
8545+# define PRIdLEAST64 PRId64
8546+#endif
8547+#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
8548+# undef PRIiLEAST64
8549+# define PRIiLEAST64 PRIi64
8550+#endif
8551+#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
8552+# undef PRIoLEAST64
8553+# define PRIoLEAST64 PRIo64
8554+#endif
8555+#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
8556+# undef PRIuLEAST64
8557+# define PRIuLEAST64 PRIu64
8558+#endif
8559+#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
8560+# undef PRIxLEAST64
8561+# define PRIxLEAST64 PRIx64
8562+#endif
8563+#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
8564+# undef PRIXLEAST64
8565+# define PRIXLEAST64 PRIX64
8566+#endif
8567+#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
8568+# undef PRIdFAST8
8569+# define PRIdFAST8 "d"
8570+#endif
8571+#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
8572+# undef PRIiFAST8
8573+# define PRIiFAST8 "i"
8574+#endif
8575+#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
8576+# undef PRIoFAST8
8577+# define PRIoFAST8 "o"
8578+#endif
8579+#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
8580+# undef PRIuFAST8
8581+# define PRIuFAST8 "u"
8582+#endif
8583+#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
8584+# undef PRIxFAST8
8585+# define PRIxFAST8 "x"
8586+#endif
8587+#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
8588+# undef PRIXFAST8
8589+# define PRIXFAST8 "X"
8590+#endif
8591+#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
8592+# undef PRIdFAST16
8593+# define PRIdFAST16 "d"
8594+#endif
8595+#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
8596+# undef PRIiFAST16
8597+# define PRIiFAST16 "i"
8598+#endif
8599+#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
8600+# undef PRIoFAST16
8601+# define PRIoFAST16 "o"
8602+#endif
8603+#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
8604+# undef PRIuFAST16
8605+# define PRIuFAST16 "u"
8606+#endif
8607+#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
8608+# undef PRIxFAST16
8609+# define PRIxFAST16 "x"
8610+#endif
8611+#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
8612+# undef PRIXFAST16
8613+# define PRIXFAST16 "X"
8614+#endif
8615+#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
8616+# undef PRIdFAST32
8617+# define PRIdFAST32 "d"
8618+#endif
8619+#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
8620+# undef PRIiFAST32
8621+# define PRIiFAST32 "i"
8622+#endif
8623+#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
8624+# undef PRIoFAST32
8625+# define PRIoFAST32 "o"
8626+#endif
8627+#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
8628+# undef PRIuFAST32
8629+# define PRIuFAST32 "u"
8630+#endif
8631+#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
8632+# undef PRIxFAST32
8633+# define PRIxFAST32 "x"
8634+#endif
8635+#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
8636+# undef PRIXFAST32
8637+# define PRIXFAST32 "X"
8638+#endif
8639+#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
8640+# undef PRIdFAST64
8641+# define PRIdFAST64 PRId64
8642+#endif
8643+#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
8644+# undef PRIiFAST64
8645+# define PRIiFAST64 PRIi64
8646+#endif
8647+#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
8648+# undef PRIoFAST64
8649+# define PRIoFAST64 PRIo64
8650+#endif
8651+#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
8652+# undef PRIuFAST64
8653+# define PRIuFAST64 PRIu64
8654+#endif
8655+#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
8656+# undef PRIxFAST64
8657+# define PRIxFAST64 PRIx64
8658+#endif
8659+#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
8660+# undef PRIXFAST64
8661+# define PRIXFAST64 PRIX64
8662+#endif
8663+#if !defined PRIdMAX || PRI_MACROS_BROKEN
8664+# undef PRIdMAX
8665+# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
8666+#endif
8667+#if !defined PRIiMAX || PRI_MACROS_BROKEN
8668+# undef PRIiMAX
8669+# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
8670+#endif
8671+#if !defined PRIoMAX || PRI_MACROS_BROKEN
8672+# undef PRIoMAX
8673+# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
8674+#endif
8675+#if !defined PRIuMAX || PRI_MACROS_BROKEN
8676+# undef PRIuMAX
8677+# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
8678+#endif
8679+#if !defined PRIxMAX || PRI_MACROS_BROKEN
8680+# undef PRIxMAX
8681+# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
8682+#endif
8683+#if !defined PRIXMAX || PRI_MACROS_BROKEN
8684+# undef PRIXMAX
8685+# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
8686+#endif
8687+#if !defined PRIdPTR || PRI_MACROS_BROKEN
8688+# undef PRIdPTR
8689+# define PRIdPTR \
8690+ (sizeof (void *) == sizeof (long) ? "ld" : \
8691+ sizeof (void *) == sizeof (int) ? "d" : \
8692+ "lld")
8693+#endif
8694+#if !defined PRIiPTR || PRI_MACROS_BROKEN
8695+# undef PRIiPTR
8696+# define PRIiPTR \
8697+ (sizeof (void *) == sizeof (long) ? "li" : \
8698+ sizeof (void *) == sizeof (int) ? "i" : \
8699+ "lli")
8700+#endif
8701+#if !defined PRIoPTR || PRI_MACROS_BROKEN
8702+# undef PRIoPTR
8703+# define PRIoPTR \
8704+ (sizeof (void *) == sizeof (long) ? "lo" : \
8705+ sizeof (void *) == sizeof (int) ? "o" : \
8706+ "llo")
8707+#endif
8708+#if !defined PRIuPTR || PRI_MACROS_BROKEN
8709+# undef PRIuPTR
8710+# define PRIuPTR \
8711+ (sizeof (void *) == sizeof (long) ? "lu" : \
8712+ sizeof (void *) == sizeof (int) ? "u" : \
8713+ "llu")
8714+#endif
8715+#if !defined PRIxPTR || PRI_MACROS_BROKEN
8716+# undef PRIxPTR
8717+# define PRIxPTR \
8718+ (sizeof (void *) == sizeof (long) ? "lx" : \
8719+ sizeof (void *) == sizeof (int) ? "x" : \
8720+ "llx")
8721+#endif
8722+#if !defined PRIXPTR || PRI_MACROS_BROKEN
8723+# undef PRIXPTR
8724+# define PRIXPTR \
8725+ (sizeof (void *) == sizeof (long) ? "lX" : \
8726+ sizeof (void *) == sizeof (int) ? "X" : \
8727+ "llX")
8728+#endif
8729
8730 /* @@ end of prolog @@ */
8731
8732@@ -44,7 +457,6 @@
8733 /* Rename the non ISO C functions. This is required by the standard
8734 because some ISO C functions will require linking with this object
8735 file and the name space must not be polluted. */
8736-# define fstat __fstat
8737 # define open __open
8738 # define close __close
8739 # define read __read
8740@@ -52,30 +464,471 @@
8741 # define munmap __munmap
8742 #endif
8743
8744+/* For those losing systems which don't have `alloca' we have to add
8745+ some additional code emulating it. */
8746+#ifdef HAVE_ALLOCA
8747+# define freea(p) /* nothing */
8748+#else
8749+# define alloca(n) malloc (n)
8750+# define freea(p) free (p)
8751+#endif
8752+
8753+/* For systems that distinguish between text and binary I/O.
8754+ O_BINARY is usually declared in <fcntl.h>. */
8755+#if !defined O_BINARY && defined _O_BINARY
8756+ /* For MSC-compatible compilers. */
8757+# define O_BINARY _O_BINARY
8758+# define O_TEXT _O_TEXT
8759+#endif
8760+#ifdef __BEOS__
8761+ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
8762+# undef O_BINARY
8763+# undef O_TEXT
8764+#endif
8765+/* On reasonable systems, binary I/O is the default. */
8766+#ifndef O_BINARY
8767+# define O_BINARY 0
8768+#endif
8769+
8770+
8771 /* We need a sign, whether a new catalog was loaded, which can be associated
8772 with all translations. This is important if the translations are
8773 cached by one of GCC's features. */
8774-int _nl_msg_cat_cntr = 0;
8775+int _nl_msg_cat_cntr;
8776
8777
8778+/* Expand a system dependent string segment. Return NULL if unsupported. */
8779+static const char *
8780+get_sysdep_segment_value (const char *name)
8781+{
8782+ /* Test for an ISO C 99 section 7.8.1 format string directive.
8783+ Syntax:
8784+ P R I { d | i | o | u | x | X }
8785+ { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */
8786+ /* We don't use a table of 14 times 6 'const char *' strings here, because
8787+ data relocations cost startup time. */
8788+ if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
8789+ {
8790+ if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
8791+ || name[3] == 'x' || name[3] == 'X')
8792+ {
8793+ if (name[4] == '8' && name[5] == '\0')
8794+ {
8795+ if (name[3] == 'd')
8796+ return PRId8;
8797+ if (name[3] == 'i')
8798+ return PRIi8;
8799+ if (name[3] == 'o')
8800+ return PRIo8;
8801+ if (name[3] == 'u')
8802+ return PRIu8;
8803+ if (name[3] == 'x')
8804+ return PRIx8;
8805+ if (name[3] == 'X')
8806+ return PRIX8;
8807+ abort ();
8808+ }
8809+ if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
8810+ {
8811+ if (name[3] == 'd')
8812+ return PRId16;
8813+ if (name[3] == 'i')
8814+ return PRIi16;
8815+ if (name[3] == 'o')
8816+ return PRIo16;
8817+ if (name[3] == 'u')
8818+ return PRIu16;
8819+ if (name[3] == 'x')
8820+ return PRIx16;
8821+ if (name[3] == 'X')
8822+ return PRIX16;
8823+ abort ();
8824+ }
8825+ if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
8826+ {
8827+ if (name[3] == 'd')
8828+ return PRId32;
8829+ if (name[3] == 'i')
8830+ return PRIi32;
8831+ if (name[3] == 'o')
8832+ return PRIo32;
8833+ if (name[3] == 'u')
8834+ return PRIu32;
8835+ if (name[3] == 'x')
8836+ return PRIx32;
8837+ if (name[3] == 'X')
8838+ return PRIX32;
8839+ abort ();
8840+ }
8841+ if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
8842+ {
8843+ if (name[3] == 'd')
8844+ return PRId64;
8845+ if (name[3] == 'i')
8846+ return PRIi64;
8847+ if (name[3] == 'o')
8848+ return PRIo64;
8849+ if (name[3] == 'u')
8850+ return PRIu64;
8851+ if (name[3] == 'x')
8852+ return PRIx64;
8853+ if (name[3] == 'X')
8854+ return PRIX64;
8855+ abort ();
8856+ }
8857+ if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
8858+ && name[7] == 'S' && name[8] == 'T')
8859+ {
8860+ if (name[9] == '8' && name[10] == '\0')
8861+ {
8862+ if (name[3] == 'd')
8863+ return PRIdLEAST8;
8864+ if (name[3] == 'i')
8865+ return PRIiLEAST8;
8866+ if (name[3] == 'o')
8867+ return PRIoLEAST8;
8868+ if (name[3] == 'u')
8869+ return PRIuLEAST8;
8870+ if (name[3] == 'x')
8871+ return PRIxLEAST8;
8872+ if (name[3] == 'X')
8873+ return PRIXLEAST8;
8874+ abort ();
8875+ }
8876+ if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
8877+ {
8878+ if (name[3] == 'd')
8879+ return PRIdLEAST16;
8880+ if (name[3] == 'i')
8881+ return PRIiLEAST16;
8882+ if (name[3] == 'o')
8883+ return PRIoLEAST16;
8884+ if (name[3] == 'u')
8885+ return PRIuLEAST16;
8886+ if (name[3] == 'x')
8887+ return PRIxLEAST16;
8888+ if (name[3] == 'X')
8889+ return PRIXLEAST16;
8890+ abort ();
8891+ }
8892+ if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
8893+ {
8894+ if (name[3] == 'd')
8895+ return PRIdLEAST32;
8896+ if (name[3] == 'i')
8897+ return PRIiLEAST32;
8898+ if (name[3] == 'o')
8899+ return PRIoLEAST32;
8900+ if (name[3] == 'u')
8901+ return PRIuLEAST32;
8902+ if (name[3] == 'x')
8903+ return PRIxLEAST32;
8904+ if (name[3] == 'X')
8905+ return PRIXLEAST32;
8906+ abort ();
8907+ }
8908+ if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
8909+ {
8910+ if (name[3] == 'd')
8911+ return PRIdLEAST64;
8912+ if (name[3] == 'i')
8913+ return PRIiLEAST64;
8914+ if (name[3] == 'o')
8915+ return PRIoLEAST64;
8916+ if (name[3] == 'u')
8917+ return PRIuLEAST64;
8918+ if (name[3] == 'x')
8919+ return PRIxLEAST64;
8920+ if (name[3] == 'X')
8921+ return PRIXLEAST64;
8922+ abort ();
8923+ }
8924+ }
8925+ if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
8926+ && name[7] == 'T')
8927+ {
8928+ if (name[8] == '8' && name[9] == '\0')
8929+ {
8930+ if (name[3] == 'd')
8931+ return PRIdFAST8;
8932+ if (name[3] == 'i')
8933+ return PRIiFAST8;
8934+ if (name[3] == 'o')
8935+ return PRIoFAST8;
8936+ if (name[3] == 'u')
8937+ return PRIuFAST8;
8938+ if (name[3] == 'x')
8939+ return PRIxFAST8;
8940+ if (name[3] == 'X')
8941+ return PRIXFAST8;
8942+ abort ();
8943+ }
8944+ if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
8945+ {
8946+ if (name[3] == 'd')
8947+ return PRIdFAST16;
8948+ if (name[3] == 'i')
8949+ return PRIiFAST16;
8950+ if (name[3] == 'o')
8951+ return PRIoFAST16;
8952+ if (name[3] == 'u')
8953+ return PRIuFAST16;
8954+ if (name[3] == 'x')
8955+ return PRIxFAST16;
8956+ if (name[3] == 'X')
8957+ return PRIXFAST16;
8958+ abort ();
8959+ }
8960+ if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
8961+ {
8962+ if (name[3] == 'd')
8963+ return PRIdFAST32;
8964+ if (name[3] == 'i')
8965+ return PRIiFAST32;
8966+ if (name[3] == 'o')
8967+ return PRIoFAST32;
8968+ if (name[3] == 'u')
8969+ return PRIuFAST32;
8970+ if (name[3] == 'x')
8971+ return PRIxFAST32;
8972+ if (name[3] == 'X')
8973+ return PRIXFAST32;
8974+ abort ();
8975+ }
8976+ if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
8977+ {
8978+ if (name[3] == 'd')
8979+ return PRIdFAST64;
8980+ if (name[3] == 'i')
8981+ return PRIiFAST64;
8982+ if (name[3] == 'o')
8983+ return PRIoFAST64;
8984+ if (name[3] == 'u')
8985+ return PRIuFAST64;
8986+ if (name[3] == 'x')
8987+ return PRIxFAST64;
8988+ if (name[3] == 'X')
8989+ return PRIXFAST64;
8990+ abort ();
8991+ }
8992+ }
8993+ if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
8994+ && name[7] == '\0')
8995+ {
8996+ if (name[3] == 'd')
8997+ return PRIdMAX;
8998+ if (name[3] == 'i')
8999+ return PRIiMAX;
9000+ if (name[3] == 'o')
9001+ return PRIoMAX;
9002+ if (name[3] == 'u')
9003+ return PRIuMAX;
9004+ if (name[3] == 'x')
9005+ return PRIxMAX;
9006+ if (name[3] == 'X')
9007+ return PRIXMAX;
9008+ abort ();
9009+ }
9010+ if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
9011+ && name[7] == '\0')
9012+ {
9013+ if (name[3] == 'd')
9014+ return PRIdPTR;
9015+ if (name[3] == 'i')
9016+ return PRIiPTR;
9017+ if (name[3] == 'o')
9018+ return PRIoPTR;
9019+ if (name[3] == 'u')
9020+ return PRIuPTR;
9021+ if (name[3] == 'x')
9022+ return PRIxPTR;
9023+ if (name[3] == 'X')
9024+ return PRIXPTR;
9025+ abort ();
9026+ }
9027+ }
9028+ }
9029+ /* Test for a glibc specific printf() format directive flag. */
9030+ if (name[0] == 'I' && name[1] == '\0')
9031+ {
9032+#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
9033+ /* The 'I' flag, in numeric format directives, replaces ASCII digits
9034+ with the 'outdigits' defined in the LC_CTYPE locale facet. This is
9035+ used for Farsi (Persian) and maybe Arabic. */
9036+ return "I";
9037+#else
9038+ return "";
9039+#endif
9040+ }
9041+ /* Other system dependent strings are not valid. */
9042+ return NULL;
9043+}
9044+
9045+/* Initialize the codeset dependent parts of an opened message catalog.
9046+ Return the header entry. */
9047+const char *
9048+internal_function
9049+_nl_init_domain_conv (struct loaded_l10nfile *domain_file,
9050+ struct loaded_domain *domain,
9051+ struct binding *domainbinding)
9052+{
9053+ /* Find out about the character set the file is encoded with.
9054+ This can be found (in textual form) in the entry "". If this
9055+ entry does not exist or if this does not contain the `charset='
9056+ information, we will assume the charset matches the one the
9057+ current locale and we don't have to perform any conversion. */
9058+ char *nullentry;
9059+ size_t nullentrylen;
9060+
9061+ /* Preinitialize fields, to avoid recursion during _nl_find_msg. */
9062+ domain->codeset_cntr =
9063+ (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
9064+#ifdef _LIBC
9065+ domain->conv = (__gconv_t) -1;
9066+#else
9067+# if HAVE_ICONV
9068+ domain->conv = (iconv_t) -1;
9069+# endif
9070+#endif
9071+ domain->conv_tab = NULL;
9072+
9073+ /* Get the header entry. */
9074+ nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
9075+
9076+ if (nullentry != NULL)
9077+ {
9078+#if defined _LIBC || HAVE_ICONV
9079+ const char *charsetstr;
9080+
9081+ charsetstr = strstr (nullentry, "charset=");
9082+ if (charsetstr != NULL)
9083+ {
9084+ size_t len;
9085+ char *charset;
9086+ const char *outcharset;
9087+
9088+ charsetstr += strlen ("charset=");
9089+ len = strcspn (charsetstr, " \t\n");
9090+
9091+ charset = (char *) alloca (len + 1);
9092+# if defined _LIBC || HAVE_MEMPCPY
9093+ *((char *) mempcpy (charset, charsetstr, len)) = '\0';
9094+# else
9095+ memcpy (charset, charsetstr, len);
9096+ charset[len] = '\0';
9097+# endif
9098+
9099+ /* The output charset should normally be determined by the
9100+ locale. But sometimes the locale is not used or not correctly
9101+ set up, so we provide a possibility for the user to override
9102+ this. Moreover, the value specified through
9103+ bind_textdomain_codeset overrides both. */
9104+ if (domainbinding != NULL && domainbinding->codeset != NULL)
9105+ outcharset = domainbinding->codeset;
9106+ else
9107+ {
9108+ outcharset = getenv ("OUTPUT_CHARSET");
9109+ if (outcharset == NULL || outcharset[0] == '\0')
9110+ {
9111+# ifdef _LIBC
9112+ outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
9113+# else
9114+# if HAVE_ICONV
9115+ extern const char *locale_charset (void);
9116+ outcharset = locale_charset ();
9117+# endif
9118+# endif
9119+ }
9120+ }
9121+
9122+# ifdef _LIBC
9123+ /* We always want to use transliteration. */
9124+ outcharset = norm_add_slashes (outcharset, "TRANSLIT");
9125+ charset = norm_add_slashes (charset, NULL);
9126+ if (__gconv_open (outcharset, charset, &domain->conv,
9127+ GCONV_AVOID_NOCONV)
9128+ != __GCONV_OK)
9129+ domain->conv = (__gconv_t) -1;
9130+# else
9131+# if HAVE_ICONV
9132+ /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
9133+ we want to use transliteration. */
9134+# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
9135+ || _LIBICONV_VERSION >= 0x0105
9136+ if (strchr (outcharset, '/') == NULL)
9137+ {
9138+ char *tmp;
9139+
9140+ len = strlen (outcharset);
9141+ tmp = (char *) alloca (len + 10 + 1);
9142+ memcpy (tmp, outcharset, len);
9143+ memcpy (tmp + len, "//TRANSLIT", 10 + 1);
9144+ outcharset = tmp;
9145+
9146+ domain->conv = iconv_open (outcharset, charset);
9147+
9148+ freea (outcharset);
9149+ }
9150+ else
9151+# endif
9152+ domain->conv = iconv_open (outcharset, charset);
9153+# endif
9154+# endif
9155+
9156+ freea (charset);
9157+ }
9158+#endif /* _LIBC || HAVE_ICONV */
9159+ }
9160+
9161+ return nullentry;
9162+}
9163+
9164+/* Frees the codeset dependent parts of an opened message catalog. */
9165+void
9166+internal_function
9167+_nl_free_domain_conv (struct loaded_domain *domain)
9168+{
9169+ if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
9170+ free (domain->conv_tab);
9171+
9172+#ifdef _LIBC
9173+ if (domain->conv != (__gconv_t) -1)
9174+ __gconv_close (domain->conv);
9175+#else
9176+# if HAVE_ICONV
9177+ if (domain->conv != (iconv_t) -1)
9178+ iconv_close (domain->conv);
9179+# endif
9180+#endif
9181+}
9182+
9183 /* Load the message catalogs specified by FILENAME. If it is no valid
9184 message catalog do nothing. */
9185 void
9186-_nl_load_domain (domain_file)
9187- struct loaded_l10nfile *domain_file;
9188+internal_function
9189+_nl_load_domain (struct loaded_l10nfile *domain_file,
9190+ struct binding *domainbinding)
9191 {
9192 int fd;
9193+ size_t size;
9194+#ifdef _LIBC
9195+ struct stat64 st;
9196+#else
9197 struct stat st;
9198+#endif
9199 struct mo_file_header *data = (struct mo_file_header *) -1;
9200-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9201- || defined _LIBC
9202 int use_mmap = 0;
9203-#endif
9204 struct loaded_domain *domain;
9205+ int revision;
9206+ const char *nullentry;
9207
9208 domain_file->decided = 1;
9209 domain_file->data = NULL;
9210
9211+ /* Note that it would be useless to store domainbinding in domain_file
9212+ because domainbinding might be == NULL now but != NULL later (after
9213+ a call to bind_textdomain_codeset). */
9214+
9215 /* If the record does not represent a valid locale the FILENAME
9216 might be NULL. This can happen when according to the given
9217 specification the locale file name is different for XPG and CEN
9218@@ -84,27 +937,32 @@
9219 return;
9220
9221 /* Try to open the addressed file. */
9222- fd = open (domain_file->filename, O_RDONLY);
9223+ fd = open (domain_file->filename, O_RDONLY | O_BINARY);
9224 if (fd == -1)
9225 return;
9226
9227 /* We must know about the size of the file. */
9228- if (fstat (fd, &st) != 0
9229- && st.st_size < (off_t) sizeof (struct mo_file_header))
9230+ if (
9231+#ifdef _LIBC
9232+ __builtin_expect (fstat64 (fd, &st) != 0, 0)
9233+#else
9234+ __builtin_expect (fstat (fd, &st) != 0, 0)
9235+#endif
9236+ || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
9237+ || __builtin_expect (size < sizeof (struct mo_file_header), 0))
9238 {
9239 /* Something went wrong. */
9240 close (fd);
9241 return;
9242 }
9243
9244-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9245- || defined _LIBC
9246+#ifdef HAVE_MMAP
9247 /* Now we are ready to load the file. If mmap() is available we try
9248 this first. If not available or it failed we try to load it. */
9249- data = (struct mo_file_header *) mmap (NULL, st.st_size, PROT_READ,
9250+ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
9251 MAP_PRIVATE, fd, 0);
9252
9253- if (data != (struct mo_file_header *) -1)
9254+ if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
9255 {
9256 /* mmap() call was successful. */
9257 close (fd);
9258@@ -116,24 +974,27 @@
9259 it manually. */
9260 if (data == (struct mo_file_header *) -1)
9261 {
9262- off_t to_read;
9263+ size_t to_read;
9264 char *read_ptr;
9265
9266- data = (struct mo_file_header *) malloc (st.st_size);
9267+ data = (struct mo_file_header *) malloc (size);
9268 if (data == NULL)
9269 return;
9270
9271- to_read = st.st_size;
9272+ to_read = size;
9273 read_ptr = (char *) data;
9274 do
9275 {
9276 long int nb = (long int) read (fd, read_ptr, to_read);
9277- if (nb == -1)
9278+ if (nb <= 0)
9279 {
9280+#ifdef EINTR
9281+ if (nb == -1 && errno == EINTR)
9282+ continue;
9283+#endif
9284 close (fd);
9285 return;
9286 }
9287-
9288 read_ptr += nb;
9289 to_read -= nb;
9290 }
9291@@ -144,47 +1005,378 @@
9292
9293 /* Using the magic number we can test whether it really is a message
9294 catalog file. */
9295- if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
9296+ if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
9297+ 0))
9298 {
9299 /* The magic number is wrong: not a message catalog file. */
9300-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9301- || defined _LIBC
9302+#ifdef HAVE_MMAP
9303 if (use_mmap)
9304- munmap ((caddr_t) data, st.st_size);
9305+ munmap ((caddr_t) data, size);
9306 else
9307 #endif
9308 free (data);
9309 return;
9310 }
9311
9312- domain_file->data
9313- = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
9314- if (domain_file->data == NULL)
9315+ domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
9316+ if (domain == NULL)
9317 return;
9318+ domain_file->data = domain;
9319
9320- domain = (struct loaded_domain *) domain_file->data;
9321 domain->data = (char *) data;
9322+ domain->use_mmap = use_mmap;
9323+ domain->mmap_size = size;
9324 domain->must_swap = data->magic != _MAGIC;
9325+ domain->malloced = NULL;
9326
9327 /* Fill in the information about the available tables. */
9328- switch (W (domain->must_swap, data->revision))
9329+ revision = W (domain->must_swap, data->revision);
9330+ /* We support only the major revisions 0 and 1. */
9331+ switch (revision >> 16)
9332 {
9333 case 0:
9334+ case 1:
9335 domain->nstrings = W (domain->must_swap, data->nstrings);
9336- domain->orig_tab = (struct string_desc *)
9337+ domain->orig_tab = (const struct string_desc *)
9338 ((char *) data + W (domain->must_swap, data->orig_tab_offset));
9339- domain->trans_tab = (struct string_desc *)
9340+ domain->trans_tab = (const struct string_desc *)
9341 ((char *) data + W (domain->must_swap, data->trans_tab_offset));
9342 domain->hash_size = W (domain->must_swap, data->hash_tab_size);
9343- domain->hash_tab = (nls_uint32 *)
9344- ((char *) data + W (domain->must_swap, data->hash_tab_offset));
9345+ domain->hash_tab =
9346+ (domain->hash_size > 2
9347+ ? (const nls_uint32 *)
9348+ ((char *) data + W (domain->must_swap, data->hash_tab_offset))
9349+ : NULL);
9350+ domain->must_swap_hash_tab = domain->must_swap;
9351+
9352+ /* Now dispatch on the minor revision. */
9353+ switch (revision & 0xffff)
9354+ {
9355+ case 0:
9356+ domain->n_sysdep_strings = 0;
9357+ domain->orig_sysdep_tab = NULL;
9358+ domain->trans_sysdep_tab = NULL;
9359+ break;
9360+ case 1:
9361+ default:
9362+ {
9363+ nls_uint32 n_sysdep_strings;
9364+
9365+ if (domain->hash_tab == NULL)
9366+ /* This is invalid. These minor revisions need a hash table. */
9367+ goto invalid;
9368+
9369+ n_sysdep_strings =
9370+ W (domain->must_swap, data->n_sysdep_strings);
9371+ if (n_sysdep_strings > 0)
9372+ {
9373+ nls_uint32 n_sysdep_segments;
9374+ const struct sysdep_segment *sysdep_segments;
9375+ const char **sysdep_segment_values;
9376+ const nls_uint32 *orig_sysdep_tab;
9377+ const nls_uint32 *trans_sysdep_tab;
9378+ nls_uint32 n_inmem_sysdep_strings;
9379+ size_t memneed;
9380+ char *mem;
9381+ struct sysdep_string_desc *inmem_orig_sysdep_tab;
9382+ struct sysdep_string_desc *inmem_trans_sysdep_tab;
9383+ nls_uint32 *inmem_hash_tab;
9384+ unsigned int i, j;
9385+
9386+ /* Get the values of the system dependent segments. */
9387+ n_sysdep_segments =
9388+ W (domain->must_swap, data->n_sysdep_segments);
9389+ sysdep_segments = (const struct sysdep_segment *)
9390+ ((char *) data
9391+ + W (domain->must_swap, data->sysdep_segments_offset));
9392+ sysdep_segment_values =
9393+ alloca (n_sysdep_segments * sizeof (const char *));
9394+ for (i = 0; i < n_sysdep_segments; i++)
9395+ {
9396+ const char *name =
9397+ (char *) data
9398+ + W (domain->must_swap, sysdep_segments[i].offset);
9399+ nls_uint32 namelen =
9400+ W (domain->must_swap, sysdep_segments[i].length);
9401+
9402+ if (!(namelen > 0 && name[namelen - 1] == '\0'))
9403+ {
9404+ freea (sysdep_segment_values);
9405+ goto invalid;
9406+ }
9407+
9408+ sysdep_segment_values[i] = get_sysdep_segment_value (name);
9409+ }
9410+
9411+ orig_sysdep_tab = (const nls_uint32 *)
9412+ ((char *) data
9413+ + W (domain->must_swap, data->orig_sysdep_tab_offset));
9414+ trans_sysdep_tab = (const nls_uint32 *)
9415+ ((char *) data
9416+ + W (domain->must_swap, data->trans_sysdep_tab_offset));
9417+
9418+ /* Compute the amount of additional memory needed for the
9419+ system dependent strings and the augmented hash table.
9420+ At the same time, also drop string pairs which refer to
9421+ an undefined system dependent segment. */
9422+ n_inmem_sysdep_strings = 0;
9423+ memneed = domain->hash_size * sizeof (nls_uint32);
9424+ for (i = 0; i < n_sysdep_strings; i++)
9425+ {
9426+ int valid = 1;
9427+ size_t needs[2];
9428+
9429+ for (j = 0; j < 2; j++)
9430+ {
9431+ const struct sysdep_string *sysdep_string =
9432+ (const struct sysdep_string *)
9433+ ((char *) data
9434+ + W (domain->must_swap,
9435+ j == 0
9436+ ? orig_sysdep_tab[i]
9437+ : trans_sysdep_tab[i]));
9438+ size_t need = 0;
9439+ const struct segment_pair *p = sysdep_string->segments;
9440+
9441+ if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
9442+ for (p = sysdep_string->segments;; p++)
9443+ {
9444+ nls_uint32 sysdepref;
9445+
9446+ need += W (domain->must_swap, p->segsize);
9447+
9448+ sysdepref = W (domain->must_swap, p->sysdepref);
9449+ if (sysdepref == SEGMENTS_END)
9450+ break;
9451+
9452+ if (sysdepref >= n_sysdep_segments)
9453+ {
9454+ /* Invalid. */
9455+ freea (sysdep_segment_values);
9456+ goto invalid;
9457+ }
9458+
9459+ if (sysdep_segment_values[sysdepref] == NULL)
9460+ {
9461+ /* This particular string pair is invalid. */
9462+ valid = 0;
9463+ break;
9464+ }
9465+
9466+ need += strlen (sysdep_segment_values[sysdepref]);
9467+ }
9468+
9469+ needs[j] = need;
9470+ if (!valid)
9471+ break;
9472+ }
9473+
9474+ if (valid)
9475+ {
9476+ n_inmem_sysdep_strings++;
9477+ memneed += needs[0] + needs[1];
9478+ }
9479+ }
9480+ memneed += 2 * n_inmem_sysdep_strings
9481+ * sizeof (struct sysdep_string_desc);
9482+
9483+ if (n_inmem_sysdep_strings > 0)
9484+ {
9485+ unsigned int k;
9486+
9487+ /* Allocate additional memory. */
9488+ mem = (char *) malloc (memneed);
9489+ if (mem == NULL)
9490+ goto invalid;
9491+
9492+ domain->malloced = mem;
9493+ inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
9494+ mem += n_inmem_sysdep_strings
9495+ * sizeof (struct sysdep_string_desc);
9496+ inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
9497+ mem += n_inmem_sysdep_strings
9498+ * sizeof (struct sysdep_string_desc);
9499+ inmem_hash_tab = (nls_uint32 *) mem;
9500+ mem += domain->hash_size * sizeof (nls_uint32);
9501+
9502+ /* Compute the system dependent strings. */
9503+ k = 0;
9504+ for (i = 0; i < n_sysdep_strings; i++)
9505+ {
9506+ int valid = 1;
9507+
9508+ for (j = 0; j < 2; j++)
9509+ {
9510+ const struct sysdep_string *sysdep_string =
9511+ (const struct sysdep_string *)
9512+ ((char *) data
9513+ + W (domain->must_swap,
9514+ j == 0
9515+ ? orig_sysdep_tab[i]
9516+ : trans_sysdep_tab[i]));
9517+ const struct segment_pair *p =
9518+ sysdep_string->segments;
9519+
9520+ if (W (domain->must_swap, p->sysdepref)
9521+ != SEGMENTS_END)
9522+ for (p = sysdep_string->segments;; p++)
9523+ {
9524+ nls_uint32 sysdepref;
9525+
9526+ sysdepref =
9527+ W (domain->must_swap, p->sysdepref);
9528+ if (sysdepref == SEGMENTS_END)
9529+ break;
9530+
9531+ if (sysdep_segment_values[sysdepref] == NULL)
9532+ {
9533+ /* This particular string pair is
9534+ invalid. */
9535+ valid = 0;
9536+ break;
9537+ }
9538+ }
9539+
9540+ if (!valid)
9541+ break;
9542+ }
9543+
9544+ if (valid)
9545+ {
9546+ for (j = 0; j < 2; j++)
9547+ {
9548+ const struct sysdep_string *sysdep_string =
9549+ (const struct sysdep_string *)
9550+ ((char *) data
9551+ + W (domain->must_swap,
9552+ j == 0
9553+ ? orig_sysdep_tab[i]
9554+ : trans_sysdep_tab[i]));
9555+ const char *static_segments =
9556+ (char *) data
9557+ + W (domain->must_swap, sysdep_string->offset);
9558+ const struct segment_pair *p =
9559+ sysdep_string->segments;
9560+
9561+ /* Concatenate the segments, and fill
9562+ inmem_orig_sysdep_tab[k] (for j == 0) and
9563+ inmem_trans_sysdep_tab[k] (for j == 1). */
9564+
9565+ struct sysdep_string_desc *inmem_tab_entry =
9566+ (j == 0
9567+ ? inmem_orig_sysdep_tab
9568+ : inmem_trans_sysdep_tab)
9569+ + k;
9570+
9571+ if (W (domain->must_swap, p->sysdepref)
9572+ == SEGMENTS_END)
9573+ {
9574+ /* Only one static segment. */
9575+ inmem_tab_entry->length =
9576+ W (domain->must_swap, p->segsize);
9577+ inmem_tab_entry->pointer = static_segments;
9578+ }
9579+ else
9580+ {
9581+ inmem_tab_entry->pointer = mem;
9582+
9583+ for (p = sysdep_string->segments;; p++)
9584+ {
9585+ nls_uint32 segsize =
9586+ W (domain->must_swap, p->segsize);
9587+ nls_uint32 sysdepref =
9588+ W (domain->must_swap, p->sysdepref);
9589+ size_t n;
9590+
9591+ if (segsize > 0)
9592+ {
9593+ memcpy (mem, static_segments, segsize);
9594+ mem += segsize;
9595+ static_segments += segsize;
9596+ }
9597+
9598+ if (sysdepref == SEGMENTS_END)
9599+ break;
9600+
9601+ n = strlen (sysdep_segment_values[sysdepref]);
9602+ memcpy (mem, sysdep_segment_values[sysdepref], n);
9603+ mem += n;
9604+ }
9605+
9606+ inmem_tab_entry->length =
9607+ mem - inmem_tab_entry->pointer;
9608+ }
9609+ }
9610+
9611+ k++;
9612+ }
9613+ }
9614+ if (k != n_inmem_sysdep_strings)
9615+ abort ();
9616+
9617+ /* Compute the augmented hash table. */
9618+ for (i = 0; i < domain->hash_size; i++)
9619+ inmem_hash_tab[i] =
9620+ W (domain->must_swap_hash_tab, domain->hash_tab[i]);
9621+ for (i = 0; i < n_inmem_sysdep_strings; i++)
9622+ {
9623+ const char *msgid = inmem_orig_sysdep_tab[i].pointer;
9624+ nls_uint32 hash_val = hash_string (msgid);
9625+ nls_uint32 idx = hash_val % domain->hash_size;
9626+ nls_uint32 incr =
9627+ 1 + (hash_val % (domain->hash_size - 2));
9628+
9629+ for (;;)
9630+ {
9631+ if (inmem_hash_tab[idx] == 0)
9632+ {
9633+ /* Hash table entry is empty. Use it. */
9634+ inmem_hash_tab[idx] = 1 + domain->nstrings + i;
9635+ break;
9636+ }
9637+
9638+ if (idx >= domain->hash_size - incr)
9639+ idx -= domain->hash_size - incr;
9640+ else
9641+ idx += incr;
9642+ }
9643+ }
9644+
9645+ domain->n_sysdep_strings = n_inmem_sysdep_strings;
9646+ domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
9647+ domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
9648+
9649+ domain->hash_tab = inmem_hash_tab;
9650+ domain->must_swap_hash_tab = 0;
9651+ }
9652+ else
9653+ {
9654+ domain->n_sysdep_strings = 0;
9655+ domain->orig_sysdep_tab = NULL;
9656+ domain->trans_sysdep_tab = NULL;
9657+ }
9658+
9659+ freea (sysdep_segment_values);
9660+ }
9661+ else
9662+ {
9663+ domain->n_sysdep_strings = 0;
9664+ domain->orig_sysdep_tab = NULL;
9665+ domain->trans_sysdep_tab = NULL;
9666+ }
9667+ }
9668+ break;
9669+ }
9670 break;
9671 default:
9672- /* This is an illegal revision. */
9673-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9674- || defined _LIBC
9675+ /* This is an invalid revision. */
9676+ invalid:
9677+ /* This is an invalid .mo file. */
9678+ if (domain->malloced)
9679+ free (domain->malloced);
9680+#ifdef HAVE_MMAP
9681 if (use_mmap)
9682- munmap ((caddr_t) data, st.st_size);
9683+ munmap ((caddr_t) data, size);
9684 else
9685 #endif
9686 free (data);
9687@@ -193,7 +1385,36 @@
9688 return;
9689 }
9690
9691- /* Show that one domain is changed. This might make some cached
9692- translations invalid. */
9693- ++_nl_msg_cat_cntr;
9694+ /* Now initialize the character set converter from the character set
9695+ the file is encoded with (found in the header entry) to the domain's
9696+ specified character set or the locale's character set. */
9697+ nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
9698+
9699+ /* Also look for a plural specification. */
9700+ EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
9701 }
9702+
9703+
9704+#ifdef _LIBC
9705+void
9706+internal_function
9707+_nl_unload_domain (struct loaded_domain *domain)
9708+{
9709+ if (domain->plural != &__gettext_germanic_plural)
9710+ __gettext_free_exp (domain->plural);
9711+
9712+ _nl_free_domain_conv (domain);
9713+
9714+ if (domain->malloced)
9715+ free (domain->malloced);
9716+
9717+# ifdef _POSIX_MAPPED_FILES
9718+ if (domain->use_mmap)
9719+ munmap ((caddr_t) domain->data, domain->mmap_size);
9720+ else
9721+# endif /* _POSIX_MAPPED_FILES */
9722+ free ((void *) domain->data);
9723+
9724+ free (domain);
9725+}
9726+#endif
9727--- lrzsz-0.12.20.safe/intl/localcharset.c 1969-12-31 19:00:00.000000000 -0500
9728+++ lrzsz-0.12.20/intl/localcharset.c 2004-09-12 14:40:34.478729392 -0400
9729@@ -0,0 +1,398 @@
9730+/* Determine a canonical name for the current locale's character encoding.
9731+
9732+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
9733+
9734+ This program is free software; you can redistribute it and/or modify it
9735+ under the terms of the GNU Library General Public License as published
9736+ by the Free Software Foundation; either version 2, or (at your option)
9737+ any later version.
9738+
9739+ This program is distributed in the hope that it will be useful,
9740+ but WITHOUT ANY WARRANTY; without even the implied warranty of
9741+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9742+ Library General Public License for more details.
9743+
9744+ You should have received a copy of the GNU Library General Public
9745+ License along with this program; if not, write to the Free Software
9746+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
9747+ USA. */
9748+
9749+/* Written by Bruno Haible <bruno@clisp.org>. */
9750+
9751+#ifdef HAVE_CONFIG_H
9752+# include <config.h>
9753+#endif
9754+
9755+/* Specification. */
9756+#include "localcharset.h"
9757+
9758+#if HAVE_STDDEF_H
9759+# include <stddef.h>
9760+#endif
9761+
9762+#include <stdio.h>
9763+#if HAVE_STRING_H
9764+# include <string.h>
9765+#else
9766+# include <strings.h>
9767+#endif
9768+#if HAVE_STDLIB_H
9769+# include <stdlib.h>
9770+#endif
9771+
9772+#if defined _WIN32 || defined __WIN32__
9773+# undef WIN32 /* avoid warning on mingw32 */
9774+# define WIN32
9775+#endif
9776+
9777+#if defined __EMX__
9778+/* Assume EMX program runs on OS/2, even if compiled under DOS. */
9779+# define OS2
9780+#endif
9781+
9782+#if !defined WIN32
9783+# if HAVE_LANGINFO_CODESET
9784+# include <langinfo.h>
9785+# else
9786+# if HAVE_SETLOCALE
9787+# include <locale.h>
9788+# endif
9789+# endif
9790+#elif defined WIN32
9791+# define WIN32_LEAN_AND_MEAN
9792+# include <windows.h>
9793+#endif
9794+#if defined OS2
9795+# define INCL_DOS
9796+# include <os2.h>
9797+#endif
9798+
9799+#if ENABLE_RELOCATABLE
9800+# include "relocatable.h"
9801+#else
9802+# define relocate(pathname) (pathname)
9803+#endif
9804+
9805+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
9806+ /* Win32, OS/2, DOS */
9807+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
9808+#endif
9809+
9810+#ifndef DIRECTORY_SEPARATOR
9811+# define DIRECTORY_SEPARATOR '/'
9812+#endif
9813+
9814+#ifndef ISSLASH
9815+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
9816+#endif
9817+
9818+#if HAVE_DECL_GETC_UNLOCKED
9819+# undef getc
9820+# define getc getc_unlocked
9821+#endif
9822+
9823+/* The following static variable is declared 'volatile' to avoid a
9824+ possible multithread problem in the function get_charset_aliases. If we
9825+ are running in a threaded environment, and if two threads initialize
9826+ 'charset_aliases' simultaneously, both will produce the same value,
9827+ and everything will be ok if the two assignments to 'charset_aliases'
9828+ are atomic. But I don't know what will happen if the two assignments mix. */
9829+#if __STDC__ != 1
9830+# define volatile /* empty */
9831+#endif
9832+/* Pointer to the contents of the charset.alias file, if it has already been
9833+ read, else NULL. Its format is:
9834+ ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
9835+static const char * volatile charset_aliases;
9836+
9837+/* Return a pointer to the contents of the charset.alias file. */
9838+static const char *
9839+get_charset_aliases ()
9840+{
9841+ const char *cp;
9842+
9843+ cp = charset_aliases;
9844+ if (cp == NULL)
9845+ {
9846+#if !(defined VMS || defined WIN32)
9847+ FILE *fp;
9848+ const char *dir = relocate (LIBDIR);
9849+ const char *base = "charset.alias";
9850+ char *file_name;
9851+
9852+ /* Concatenate dir and base into freshly allocated file_name. */
9853+ {
9854+ size_t dir_len = strlen (dir);
9855+ size_t base_len = strlen (base);
9856+ int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
9857+ file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
9858+ if (file_name != NULL)
9859+ {
9860+ memcpy (file_name, dir, dir_len);
9861+ if (add_slash)
9862+ file_name[dir_len] = DIRECTORY_SEPARATOR;
9863+ memcpy (file_name + dir_len + add_slash, base, base_len + 1);
9864+ }
9865+ }
9866+
9867+ if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
9868+ /* Out of memory or file not found, treat it as empty. */
9869+ cp = "";
9870+ else
9871+ {
9872+ /* Parse the file's contents. */
9873+ int c;
9874+ char buf1[50+1];
9875+ char buf2[50+1];
9876+ char *res_ptr = NULL;
9877+ size_t res_size = 0;
9878+ size_t l1, l2;
9879+
9880+ for (;;)
9881+ {
9882+ c = getc (fp);
9883+ if (c == EOF)
9884+ break;
9885+ if (c == '\n' || c == ' ' || c == '\t')
9886+ continue;
9887+ if (c == '#')
9888+ {
9889+ /* Skip comment, to end of line. */
9890+ do
9891+ c = getc (fp);
9892+ while (!(c == EOF || c == '\n'));
9893+ if (c == EOF)
9894+ break;
9895+ continue;
9896+ }
9897+ ungetc (c, fp);
9898+ if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
9899+ break;
9900+ l1 = strlen (buf1);
9901+ l2 = strlen (buf2);
9902+ if (res_size == 0)
9903+ {
9904+ res_size = l1 + 1 + l2 + 1;
9905+ res_ptr = (char *) malloc (res_size + 1);
9906+ }
9907+ else
9908+ {
9909+ res_size += l1 + 1 + l2 + 1;
9910+ res_ptr = (char *) realloc (res_ptr, res_size + 1);
9911+ }
9912+ if (res_ptr == NULL)
9913+ {
9914+ /* Out of memory. */
9915+ res_size = 0;
9916+ break;
9917+ }
9918+ strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
9919+ strcpy (res_ptr + res_size - (l2 + 1), buf2);
9920+ }
9921+ fclose (fp);
9922+ if (res_size == 0)
9923+ cp = "";
9924+ else
9925+ {
9926+ *(res_ptr + res_size) = '\0';
9927+ cp = res_ptr;
9928+ }
9929+ }
9930+
9931+ if (file_name != NULL)
9932+ free (file_name);
9933+
9934+#else
9935+
9936+# if defined VMS
9937+ /* To avoid the troubles of an extra file charset.alias_vms in the
9938+ sources of many GNU packages, simply inline the aliases here. */
9939+ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
9940+ "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
9941+ section 10.7 "Handling Different Character Sets". */
9942+ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
9943+ "ISO8859-2" "\0" "ISO-8859-2" "\0"
9944+ "ISO8859-5" "\0" "ISO-8859-5" "\0"
9945+ "ISO8859-7" "\0" "ISO-8859-7" "\0"
9946+ "ISO8859-8" "\0" "ISO-8859-8" "\0"
9947+ "ISO8859-9" "\0" "ISO-8859-9" "\0"
9948+ /* Japanese */
9949+ "eucJP" "\0" "EUC-JP" "\0"
9950+ "SJIS" "\0" "SHIFT_JIS" "\0"
9951+ "DECKANJI" "\0" "DEC-KANJI" "\0"
9952+ "SDECKANJI" "\0" "EUC-JP" "\0"
9953+ /* Chinese */
9954+ "eucTW" "\0" "EUC-TW" "\0"
9955+ "DECHANYU" "\0" "DEC-HANYU" "\0"
9956+ "DECHANZI" "\0" "GB2312" "\0"
9957+ /* Korean */
9958+ "DECKOREAN" "\0" "EUC-KR" "\0";
9959+# endif
9960+
9961+# if defined WIN32
9962+ /* To avoid the troubles of installing a separate file in the same
9963+ directory as the DLL and of retrieving the DLL's directory at
9964+ runtime, simply inline the aliases here. */
9965+
9966+ cp = "CP936" "\0" "GBK" "\0"
9967+ "CP1361" "\0" "JOHAB" "\0"
9968+ "CP20127" "\0" "ASCII" "\0"
9969+ "CP20866" "\0" "KOI8-R" "\0"
9970+ "CP21866" "\0" "KOI8-RU" "\0"
9971+ "CP28591" "\0" "ISO-8859-1" "\0"
9972+ "CP28592" "\0" "ISO-8859-2" "\0"
9973+ "CP28593" "\0" "ISO-8859-3" "\0"
9974+ "CP28594" "\0" "ISO-8859-4" "\0"
9975+ "CP28595" "\0" "ISO-8859-5" "\0"
9976+ "CP28596" "\0" "ISO-8859-6" "\0"
9977+ "CP28597" "\0" "ISO-8859-7" "\0"
9978+ "CP28598" "\0" "ISO-8859-8" "\0"
9979+ "CP28599" "\0" "ISO-8859-9" "\0"
9980+ "CP28605" "\0" "ISO-8859-15" "\0";
9981+# endif
9982+#endif
9983+
9984+ charset_aliases = cp;
9985+ }
9986+
9987+ return cp;
9988+}
9989+
9990+/* Determine the current locale's character encoding, and canonicalize it
9991+ into one of the canonical names listed in config.charset.
9992+ The result must not be freed; it is statically allocated.
9993+ If the canonical name cannot be determined, the result is a non-canonical
9994+ name. */
9995+
9996+#ifdef STATIC
9997+STATIC
9998+#endif
9999+const char *
10000+locale_charset ()
10001+{
10002+ const char *codeset;
10003+ const char *aliases;
10004+
10005+#if !(defined WIN32 || defined OS2)
10006+
10007+# if HAVE_LANGINFO_CODESET
10008+
10009+ /* Most systems support nl_langinfo (CODESET) nowadays. */
10010+ codeset = nl_langinfo (CODESET);
10011+
10012+# else
10013+
10014+ /* On old systems which lack it, use setlocale or getenv. */
10015+ const char *locale = NULL;
10016+
10017+ /* But most old systems don't have a complete set of locales. Some
10018+ (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
10019+ use setlocale here; it would return "C" when it doesn't support the
10020+ locale name the user has set. */
10021+# if HAVE_SETLOCALE && 0
10022+ locale = setlocale (LC_CTYPE, NULL);
10023+# endif
10024+ if (locale == NULL || locale[0] == '\0')
10025+ {
10026+ locale = getenv ("LC_ALL");
10027+ if (locale == NULL || locale[0] == '\0')
10028+ {
10029+ locale = getenv ("LC_CTYPE");
10030+ if (locale == NULL || locale[0] == '\0')
10031+ locale = getenv ("LANG");
10032+ }
10033+ }
10034+
10035+ /* On some old systems, one used to set locale = "iso8859_1". On others,
10036+ you set it to "language_COUNTRY.charset". In any case, we resolve it
10037+ through the charset.alias file. */
10038+ codeset = locale;
10039+
10040+# endif
10041+
10042+#elif defined WIN32
10043+
10044+ static char buf[2 + 10 + 1];
10045+
10046+ /* Woe32 has a function returning the locale's codepage as a number. */
10047+ sprintf (buf, "CP%u", GetACP ());
10048+ codeset = buf;
10049+
10050+#elif defined OS2
10051+
10052+ const char *locale;
10053+ static char buf[2 + 10 + 1];
10054+ ULONG cp[3];
10055+ ULONG cplen;
10056+
10057+ /* Allow user to override the codeset, as set in the operating system,
10058+ with standard language environment variables. */
10059+ locale = getenv ("LC_ALL");
10060+ if (locale == NULL || locale[0] == '\0')
10061+ {
10062+ locale = getenv ("LC_CTYPE");
10063+ if (locale == NULL || locale[0] == '\0')
10064+ locale = getenv ("LANG");
10065+ }
10066+ if (locale != NULL && locale[0] != '\0')
10067+ {
10068+ /* If the locale name contains an encoding after the dot, return it. */
10069+ const char *dot = strchr (locale, '.');
10070+
10071+ if (dot != NULL)
10072+ {
10073+ const char *modifier;
10074+
10075+ dot++;
10076+ /* Look for the possible @... trailer and remove it, if any. */
10077+ modifier = strchr (dot, '@');
10078+ if (modifier == NULL)
10079+ return dot;
10080+ if (modifier - dot < sizeof (buf))
10081+ {
10082+ memcpy (buf, dot, modifier - dot);
10083+ buf [modifier - dot] = '\0';
10084+ return buf;
10085+ }
10086+ }
10087+
10088+ /* Resolve through the charset.alias file. */
10089+ codeset = locale;
10090+ }
10091+ else
10092+ {
10093+ /* OS/2 has a function returning the locale's codepage as a number. */
10094+ if (DosQueryCp (sizeof (cp), cp, &cplen))
10095+ codeset = "";
10096+ else
10097+ {
10098+ sprintf (buf, "CP%u", cp[0]);
10099+ codeset = buf;
10100+ }
10101+ }
10102+
10103+#endif
10104+
10105+ if (codeset == NULL)
10106+ /* The canonical name cannot be determined. */
10107+ codeset = "";
10108+
10109+ /* Resolve alias. */
10110+ for (aliases = get_charset_aliases ();
10111+ *aliases != '\0';
10112+ aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
10113+ if (strcmp (codeset, aliases) == 0
10114+ || (aliases[0] == '*' && aliases[1] == '\0'))
10115+ {
10116+ codeset = aliases + strlen (aliases) + 1;
10117+ break;
10118+ }
10119+
10120+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
10121+ the empty string as denoting "the locale's character encoding",
10122+ thus GNU libiconv would call this function a second time. */
10123+ if (codeset[0] == '\0')
10124+ codeset = "ASCII";
10125+
10126+ return codeset;
10127+}
10128--- lrzsz-0.12.20.safe/intl/localcharset.h 1969-12-31 19:00:00.000000000 -0500
10129+++ lrzsz-0.12.20/intl/localcharset.h 2004-09-12 14:40:34.483728632 -0400
10130@@ -0,0 +1,42 @@
10131+/* Determine a canonical name for the current locale's character encoding.
10132+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
10133+ This file is part of the GNU CHARSET Library.
10134+
10135+ This program is free software; you can redistribute it and/or modify it
10136+ under the terms of the GNU Library General Public License as published
10137+ by the Free Software Foundation; either version 2, or (at your option)
10138+ any later version.
10139+
10140+ This program is distributed in the hope that it will be useful,
10141+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10142+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10143+ Library General Public License for more details.
10144+
10145+ You should have received a copy of the GNU Library General Public
10146+ License along with this program; if not, write to the Free Software
10147+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10148+ USA. */
10149+
10150+#ifndef _LOCALCHARSET_H
10151+#define _LOCALCHARSET_H
10152+
10153+
10154+#ifdef __cplusplus
10155+extern "C" {
10156+#endif
10157+
10158+
10159+/* Determine the current locale's character encoding, and canonicalize it
10160+ into one of the canonical names listed in config.charset.
10161+ The result must not be freed; it is statically allocated.
10162+ If the canonical name cannot be determined, the result is a non-canonical
10163+ name. */
10164+extern const char * locale_charset (void);
10165+
10166+
10167+#ifdef __cplusplus
10168+}
10169+#endif
10170+
10171+
10172+#endif /* _LOCALCHARSET_H */
10173--- lrzsz-0.12.20.safe/intl/locale.alias 1969-12-31 19:00:00.000000000 -0500
10174+++ lrzsz-0.12.20/intl/locale.alias 2004-09-12 14:40:34.499726200 -0400
10175@@ -0,0 +1,78 @@
10176+# Locale name alias data base.
10177+# Copyright (C) 1996-2001,2003 Free Software Foundation, Inc.
10178+#
10179+# This program is free software; you can redistribute it and/or modify it
10180+# under the terms of the GNU Library General Public License as published
10181+# by the Free Software Foundation; either version 2, or (at your option)
10182+# any later version.
10183+#
10184+# This program is distributed in the hope that it will be useful,
10185+# but WITHOUT ANY WARRANTY; without even the implied warranty of
10186+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10187+# Library General Public License for more details.
10188+#
10189+# You should have received a copy of the GNU Library General Public
10190+# License along with this program; if not, write to the Free Software
10191+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10192+# USA.
10193+
10194+# The format of this file is the same as for the corresponding file of
10195+# the X Window System, which normally can be found in
10196+# /usr/lib/X11/locale/locale.alias
10197+# A single line contains two fields: an alias and a substitution value.
10198+# All entries are case independent.
10199+
10200+# Note: This file is far from being complete. If you have a value for
10201+# your own site which you think might be useful for others too, share
10202+# it with the rest of us. Send it using the `glibcbug' script to
10203+# bugs@gnu.org.
10204+
10205+# Packages using this file:
10206+
10207+bokmal nb_NO.ISO-8859-1
10208+bokmål nb_NO.ISO-8859-1
10209+catalan ca_ES.ISO-8859-1
10210+croatian hr_HR.ISO-8859-2
10211+czech cs_CZ.ISO-8859-2
10212+danish da_DK.ISO-8859-1
10213+dansk da_DK.ISO-8859-1
10214+deutsch de_DE.ISO-8859-1
10215+dutch nl_NL.ISO-8859-1
10216+eesti et_EE.ISO-8859-1
10217+estonian et_EE.ISO-8859-1
10218+finnish fi_FI.ISO-8859-1
10219+français fr_FR.ISO-8859-1
10220+french fr_FR.ISO-8859-1
10221+galego gl_ES.ISO-8859-1
10222+galician gl_ES.ISO-8859-1
10223+german de_DE.ISO-8859-1
10224+greek el_GR.ISO-8859-7
10225+hebrew he_IL.ISO-8859-8
10226+hrvatski hr_HR.ISO-8859-2
10227+hungarian hu_HU.ISO-8859-2
10228+icelandic is_IS.ISO-8859-1
10229+italian it_IT.ISO-8859-1
10230+japanese ja_JP.eucJP
10231+japanese.euc ja_JP.eucJP
10232+ja_JP ja_JP.eucJP
10233+ja_JP.ujis ja_JP.eucJP
10234+japanese.sjis ja_JP.SJIS
10235+korean ko_KR.eucKR
10236+korean.euc ko_KR.eucKR
10237+ko_KR ko_KR.eucKR
10238+lithuanian lt_LT.ISO-8859-13
10239+no_NO nb_NO.ISO-8859-1
10240+no_NO.ISO-8859-1 nb_NO.ISO-8859-1
10241+norwegian nb_NO.ISO-8859-1
10242+nynorsk nn_NO.ISO-8859-1
10243+polish pl_PL.ISO-8859-2
10244+portuguese pt_PT.ISO-8859-1
10245+romanian ro_RO.ISO-8859-2
10246+russian ru_RU.ISO-8859-5
10247+slovak sk_SK.ISO-8859-2
10248+slovene sl_SI.ISO-8859-2
10249+slovenian sl_SI.ISO-8859-2
10250+spanish es_ES.ISO-8859-1
10251+swedish sv_SE.ISO-8859-1
10252+thai th_TH.TIS-620
10253+turkish tr_TR.ISO-8859-9
10254--- lrzsz-0.12.20.safe/intl/localealias.c 1998-04-26 09:22:37.000000000 -0400
10255+++ lrzsz-0.12.20/intl/localealias.c 2004-09-12 14:40:34.505725288 -0400
10256@@ -1,20 +1,27 @@
10257-/* Handle aliases for locale names
10258- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
10259- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
10260+/* Handle aliases for locale names.
10261+ Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
10262
10263- This program is free software; you can redistribute it and/or modify
10264- it under the terms of the GNU General Public License as published by
10265- the Free Software Foundation; either version 2, or (at your option)
10266+ This program is free software; you can redistribute it and/or modify it
10267+ under the terms of the GNU Library General Public License as published
10268+ by the Free Software Foundation; either version 2, or (at your option)
10269 any later version.
10270
10271 This program is distributed in the hope that it will be useful,
10272 but WITHOUT ANY WARRANTY; without even the implied warranty of
10273- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10274- GNU General Public License for more details.
10275+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10276+ Library General Public License for more details.
10277
10278- You should have received a copy of the GNU General Public License
10279- along with this program; if not, write to the Free Software Foundation,
10280- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
10281+ You should have received a copy of the GNU Library General Public
10282+ License along with this program; if not, write to the Free Software
10283+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10284+ USA. */
10285+
10286+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
10287+ This must come before <config.h> because <config.h> may include
10288+ <features.h>, and once <features.h> has been included, it's too late. */
10289+#ifndef _GNU_SOURCE
10290+# define _GNU_SOURCE 1
10291+#endif
10292
10293 #ifdef HAVE_CONFIG_H
10294 # include <config.h>
10295@@ -22,56 +29,45 @@
10296
10297 #include <ctype.h>
10298 #include <stdio.h>
10299+#if defined _LIBC || defined HAVE___FSETLOCKING
10300+# include <stdio_ext.h>
10301+#endif
10302 #include <sys/types.h>
10303
10304 #ifdef __GNUC__
10305+# undef alloca
10306 # define alloca __builtin_alloca
10307 # define HAVE_ALLOCA 1
10308 #else
10309-# if defined HAVE_ALLOCA_H || defined _LIBC
10310-# include <alloca.h>
10311+# ifdef _MSC_VER
10312+# include <malloc.h>
10313+# define alloca _alloca
10314 # else
10315-# ifdef _AIX
10316- #pragma alloca
10317+# if defined HAVE_ALLOCA_H || defined _LIBC
10318+# include <alloca.h>
10319 # else
10320-# ifndef alloca
10321+# ifdef _AIX
10322+ #pragma alloca
10323+# else
10324+# ifndef alloca
10325 char *alloca ();
10326+# endif
10327 # endif
10328 # endif
10329 # endif
10330 #endif
10331
10332-#if defined STDC_HEADERS || defined _LIBC
10333-# include <stdlib.h>
10334-#else
10335-char *getenv ();
10336-# ifdef HAVE_MALLOC_H
10337-# include <malloc.h>
10338-# else
10339-void free ();
10340-# endif
10341-#endif
10342+#include <stdlib.h>
10343+#include <string.h>
10344
10345-#if defined HAVE_STRING_H || defined _LIBC
10346-# ifndef _GNU_SOURCE
10347-# define _GNU_SOURCE 1
10348-# endif
10349-# include <string.h>
10350+#include "gettextP.h"
10351+
10352+#if ENABLE_RELOCATABLE
10353+# include "relocatable.h"
10354 #else
10355-# include <strings.h>
10356-# ifndef memcpy
10357-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
10358-# endif
10359-#endif
10360-#if !HAVE_STRCHR && !defined _LIBC
10361-# ifndef strchr
10362-# define strchr index
10363-# endif
10364+# define relocate(pathname) (pathname)
10365 #endif
10366
10367-#include "gettext.h"
10368-#include "gettextP.h"
10369-
10370 /* @@ end of prolog @@ */
10371
10372 #ifdef _LIBC
10373@@ -79,43 +75,49 @@
10374 because some ANSI C functions will require linking with this object
10375 file and the name space must not be polluted. */
10376 # define strcasecmp __strcasecmp
10377+
10378+# ifndef mempcpy
10379+# define mempcpy __mempcpy
10380+# endif
10381+# define HAVE_MEMPCPY 1
10382+# define HAVE___FSETLOCKING 1
10383+
10384+/* We need locking here since we can be called from different places. */
10385+# include <bits/libc-lock.h>
10386+
10387+__libc_lock_define_initialized (static, lock);
10388+#endif
10389+
10390+#ifndef internal_function
10391+# define internal_function
10392 #endif
10393
10394+/* Some optimizations for glibc. */
10395+#ifdef _LIBC
10396+# define FEOF(fp) feof_unlocked (fp)
10397+# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
10398+#else
10399+# define FEOF(fp) feof (fp)
10400+# define FGETS(buf, n, fp) fgets (buf, n, fp)
10401+#endif
10402
10403-/* For those loosing systems which don't have `alloca' we have to add
10404+/* For those losing systems which don't have `alloca' we have to add
10405 some additional code emulating it. */
10406 #ifdef HAVE_ALLOCA
10407-/* Nothing has to be done. */
10408-# define ADD_BLOCK(list, address) /* nothing */
10409-# define FREE_BLOCKS(list) /* nothing */
10410+# define freea(p) /* nothing */
10411 #else
10412-struct block_list
10413-{
10414- void *address;
10415- struct block_list *next;
10416-};
10417-# define ADD_BLOCK(list, addr) \
10418- do { \
10419- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
10420- /* If we cannot get a free block we cannot add the new element to \
10421- the list. */ \
10422- if (newp != NULL) { \
10423- newp->address = (addr); \
10424- newp->next = (list); \
10425- (list) = newp; \
10426- } \
10427- } while (0)
10428-# define FREE_BLOCKS(list) \
10429- do { \
10430- while (list != NULL) { \
10431- struct block_list *old = list; \
10432- list = list->next; \
10433- free (old); \
10434- } \
10435- } while (0)
10436-# undef alloca
10437-# define alloca(size) (malloc (size))
10438-#endif /* have alloca */
10439+# define alloca(n) malloc (n)
10440+# define freea(p) free (p)
10441+#endif
10442+
10443+#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED
10444+# undef fgets
10445+# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
10446+#endif
10447+#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED
10448+# undef feof
10449+# define feof(s) feof_unlocked (s)
10450+#endif
10451
10452
10453 struct alias_map
10454@@ -125,26 +127,41 @@
10455 };
10456
10457
10458-static struct alias_map *map;
10459-static size_t nmap = 0;
10460-static size_t maxmap = 0;
10461+#ifndef _LIBC
10462+# define libc_freeres_ptr(decl) decl
10463+#endif
10464+
10465+libc_freeres_ptr (static char *string_space);
10466+static size_t string_space_act;
10467+static size_t string_space_max;
10468+libc_freeres_ptr (static struct alias_map *map);
10469+static size_t nmap;
10470+static size_t maxmap;
10471
10472
10473 /* Prototypes for local functions. */
10474-static size_t read_alias_file PARAMS ((const char *fname, int fname_len));
10475-static void extend_alias_table PARAMS ((void));
10476-static int alias_compare PARAMS ((const struct alias_map *map1,
10477- const struct alias_map *map2));
10478+static size_t read_alias_file (const char *fname, int fname_len)
10479+ internal_function;
10480+static int extend_alias_table (void);
10481+static int alias_compare (const struct alias_map *map1,
10482+ const struct alias_map *map2);
10483
10484
10485 const char *
10486-_nl_expand_alias (name)
10487- const char *name;
10488+_nl_expand_alias (const char *name)
10489 {
10490- static const char *locale_alias_path = LOCALE_ALIAS_PATH;
10491+ static const char *locale_alias_path;
10492 struct alias_map *retval;
10493+ const char *result = NULL;
10494 size_t added;
10495
10496+#ifdef _LIBC
10497+ __libc_lock_lock (lock);
10498+#endif
10499+
10500+ if (locale_alias_path == NULL)
10501+ locale_alias_path = LOCALE_ALIAS_PATH;
10502+
10503 do
10504 {
10505 struct alias_map item;
10506@@ -154,15 +171,18 @@
10507 if (nmap > 0)
10508 retval = (struct alias_map *) bsearch (&item, map, nmap,
10509 sizeof (struct alias_map),
10510- (int (*) PARAMS ((const void *,
10511- const void *))
10512+ (int (*) (const void *,
10513+ const void *)
10514 ) alias_compare);
10515 else
10516 retval = NULL;
10517
10518 /* We really found an alias. Return the value. */
10519 if (retval != NULL)
10520- return retval->value;
10521+ {
10522+ result = retval->value;
10523+ break;
10524+ }
10525
10526 /* Perhaps we can find another alias file. */
10527 added = 0;
10528@@ -170,11 +190,12 @@
10529 {
10530 const char *start;
10531
10532- while (locale_alias_path[0] == ':')
10533+ while (locale_alias_path[0] == PATH_SEPARATOR)
10534 ++locale_alias_path;
10535 start = locale_alias_path;
10536
10537- while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
10538+ while (locale_alias_path[0] != '\0'
10539+ && locale_alias_path[0] != PATH_SEPARATOR)
10540 ++locale_alias_path;
10541
10542 if (start < locale_alias_path)
10543@@ -183,78 +204,87 @@
10544 }
10545 while (added != 0);
10546
10547- return NULL;
10548+#ifdef _LIBC
10549+ __libc_lock_unlock (lock);
10550+#endif
10551+
10552+ return result;
10553 }
10554
10555
10556 static size_t
10557-read_alias_file (fname, fname_len)
10558- const char *fname;
10559- int fname_len;
10560+internal_function
10561+read_alias_file (const char *fname, int fname_len)
10562 {
10563-#ifndef HAVE_ALLOCA
10564- struct block_list *block_list = NULL;
10565-#endif
10566 FILE *fp;
10567 char *full_fname;
10568 size_t added;
10569 static const char aliasfile[] = "/locale.alias";
10570
10571 full_fname = (char *) alloca (fname_len + sizeof aliasfile);
10572- ADD_BLOCK (block_list, full_fname);
10573+#ifdef HAVE_MEMPCPY
10574+ mempcpy (mempcpy (full_fname, fname, fname_len),
10575+ aliasfile, sizeof aliasfile);
10576+#else
10577 memcpy (full_fname, fname, fname_len);
10578 memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
10579+#endif
10580
10581- fp = fopen (full_fname, "r");
10582+ fp = fopen (relocate (full_fname), "r");
10583+ freea (full_fname);
10584 if (fp == NULL)
10585- {
10586- FREE_BLOCKS (block_list);
10587- return 0;
10588- }
10589+ return 0;
10590+
10591+#ifdef HAVE___FSETLOCKING
10592+ /* No threads present. */
10593+ __fsetlocking (fp, FSETLOCKING_BYCALLER);
10594+#endif
10595
10596 added = 0;
10597- while (!feof (fp))
10598+ while (!FEOF (fp))
10599 {
10600 /* It is a reasonable approach to use a fix buffer here because
10601 a) we are only interested in the first two fields
10602 b) these fields must be usable as file names and so must not
10603 be that long
10604- */
10605- char buf[BUFSIZ];
10606+ We avoid a multi-kilobyte buffer here since this would use up
10607+ stack space which we might not have if the program ran out of
10608+ memory. */
10609+ char buf[400];
10610 char *alias;
10611 char *value;
10612 char *cp;
10613
10614- if (fgets (buf, BUFSIZ, fp) == NULL)
10615+ if (FGETS (buf, sizeof buf, fp) == NULL)
10616 /* EOF reached. */
10617 break;
10618
10619 cp = buf;
10620 /* Ignore leading white space. */
10621- while (isspace (cp[0]))
10622+ while (isspace ((unsigned char) cp[0]))
10623 ++cp;
10624
10625 /* A leading '#' signals a comment line. */
10626 if (cp[0] != '\0' && cp[0] != '#')
10627 {
10628 alias = cp++;
10629- while (cp[0] != '\0' && !isspace (cp[0]))
10630+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
10631 ++cp;
10632 /* Terminate alias name. */
10633 if (cp[0] != '\0')
10634 *cp++ = '\0';
10635
10636 /* Now look for the beginning of the value. */
10637- while (isspace (cp[0]))
10638+ while (isspace ((unsigned char) cp[0]))
10639 ++cp;
10640
10641 if (cp[0] != '\0')
10642 {
10643- char *tp;
10644- size_t len;
10645+ size_t alias_len;
10646+ size_t value_len;
10647
10648 value = cp++;
10649- while (cp[0] != '\0' && !isspace (cp[0]))
10650+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
10651 ++cp;
10652 /* Terminate value. */
10653 if (cp[0] == '\n')
10654@@ -269,28 +299,44 @@
10655 *cp++ = '\0';
10656
10657 if (nmap >= maxmap)
10658- extend_alias_table ();
10659-
10660- /* We cannot depend on strdup available in the libc. Sigh! */
10661- len = strlen (alias) + 1;
10662- tp = (char *) malloc (len);
10663- if (tp == NULL)
10664- {
10665- FREE_BLOCKS (block_list);
10666+ if (__builtin_expect (extend_alias_table (), 0))
10667 return added;
10668- }
10669- memcpy (tp, alias, len);
10670- map[nmap].alias = tp;
10671
10672- len = strlen (value) + 1;
10673- tp = (char *) malloc (len);
10674- if (tp == NULL)
10675+ alias_len = strlen (alias) + 1;
10676+ value_len = strlen (value) + 1;
10677+
10678+ if (string_space_act + alias_len + value_len > string_space_max)
10679 {
10680- FREE_BLOCKS (block_list);
10681- return added;
10682+ /* Increase size of memory pool. */
10683+ size_t new_size = (string_space_max
10684+ + (alias_len + value_len > 1024
10685+ ? alias_len + value_len : 1024));
10686+ char *new_pool = (char *) realloc (string_space, new_size);
10687+ if (new_pool == NULL)
10688+ return added;
10689+
10690+ if (__builtin_expect (string_space != new_pool, 0))
10691+ {
10692+ size_t i;
10693+
10694+ for (i = 0; i < nmap; i++)
10695+ {
10696+ map[i].alias += new_pool - string_space;
10697+ map[i].value += new_pool - string_space;
10698+ }
10699+ }
10700+
10701+ string_space = new_pool;
10702+ string_space_max = new_size;
10703 }
10704- memcpy (tp, value, len);
10705- map[nmap].value = tp;
10706+
10707+ map[nmap].alias = memcpy (&string_space[string_space_act],
10708+ alias, alias_len);
10709+ string_space_act += alias_len;
10710+
10711+ map[nmap].value = memcpy (&string_space[string_space_act],
10712+ value, value_len);
10713+ string_space_act += value_len;
10714
10715 ++nmap;
10716 ++added;
10717@@ -299,14 +345,11 @@
10718
10719 /* Possibly not the whole line fits into the buffer. Ignore
10720 the rest of the line. */
10721- while (strchr (cp, '\n') == NULL)
10722- {
10723- cp = buf;
10724- if (fgets (buf, BUFSIZ, fp) == NULL)
10725- /* Make sure the inner loop will be left. The outer loop
10726- will exit at the `feof' test. */
10727- *cp = '\n';
10728- }
10729+ while (strchr (buf, '\n') == NULL)
10730+ if (FGETS (buf, sizeof buf, fp) == NULL)
10731+ /* Make sure the inner loop will be left. The outer loop
10732+ will exit at the `feof' test. */
10733+ break;
10734 }
10735
10736 /* Should we test for ferror()? I think we have to silently ignore
10737@@ -315,40 +358,33 @@
10738
10739 if (added > 0)
10740 qsort (map, nmap, sizeof (struct alias_map),
10741- (int (*) PARAMS ((const void *, const void *))) alias_compare);
10742+ (int (*) (const void *, const void *)) alias_compare);
10743
10744- FREE_BLOCKS (block_list);
10745 return added;
10746 }
10747
10748
10749-static void
10750+static int
10751 extend_alias_table ()
10752 {
10753 size_t new_size;
10754 struct alias_map *new_map;
10755
10756 new_size = maxmap == 0 ? 100 : 2 * maxmap;
10757- new_map = (struct alias_map *) malloc (new_size
10758- * sizeof (struct alias_map));
10759+ new_map = (struct alias_map *) realloc (map, (new_size
10760+ * sizeof (struct alias_map)));
10761 if (new_map == NULL)
10762 /* Simply don't extend: we don't have any more core. */
10763- return;
10764-
10765- memcpy (new_map, map, nmap * sizeof (struct alias_map));
10766-
10767- if (maxmap != 0)
10768- free (map);
10769+ return -1;
10770
10771 map = new_map;
10772 maxmap = new_size;
10773+ return 0;
10774 }
10775
10776
10777 static int
10778-alias_compare (map1, map2)
10779- const struct alias_map *map1;
10780- const struct alias_map *map2;
10781+alias_compare (const struct alias_map *map1, const struct alias_map *map2)
10782 {
10783 #if defined _LIBC || defined HAVE_STRCASECMP
10784 return strcasecmp (map1->alias, map2->alias);
10785--- lrzsz-0.12.20.safe/intl/localename.c 1969-12-31 19:00:00.000000000 -0500
10786+++ lrzsz-0.12.20/intl/localename.c 2004-09-12 14:40:34.510724528 -0400
10787@@ -0,0 +1,1142 @@
10788+/* Determine the current selected locale.
10789+ Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
10790+
10791+ This program is free software; you can redistribute it and/or modify it
10792+ under the terms of the GNU Library General Public License as published
10793+ by the Free Software Foundation; either version 2, or (at your option)
10794+ any later version.
10795+
10796+ This program is distributed in the hope that it will be useful,
10797+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10798+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10799+ Library General Public License for more details.
10800+
10801+ You should have received a copy of the GNU Library General Public
10802+ License along with this program; if not, write to the Free Software
10803+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10804+ USA. */
10805+
10806+/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
10807+/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
10808+
10809+#ifdef HAVE_CONFIG_H
10810+# include <config.h>
10811+#endif
10812+
10813+#include <stdlib.h>
10814+#include <locale.h>
10815+
10816+#if defined _WIN32 || defined __WIN32__
10817+# undef WIN32 /* avoid warning on mingw32 */
10818+# define WIN32
10819+#endif
10820+
10821+#ifdef WIN32
10822+# define WIN32_LEAN_AND_MEAN
10823+# include <windows.h>
10824+/* List of language codes, sorted by value:
10825+ 0x01 LANG_ARABIC
10826+ 0x02 LANG_BULGARIAN
10827+ 0x03 LANG_CATALAN
10828+ 0x04 LANG_CHINESE
10829+ 0x05 LANG_CZECH
10830+ 0x06 LANG_DANISH
10831+ 0x07 LANG_GERMAN
10832+ 0x08 LANG_GREEK
10833+ 0x09 LANG_ENGLISH
10834+ 0x0a LANG_SPANISH
10835+ 0x0b LANG_FINNISH
10836+ 0x0c LANG_FRENCH
10837+ 0x0d LANG_HEBREW
10838+ 0x0e LANG_HUNGARIAN
10839+ 0x0f LANG_ICELANDIC
10840+ 0x10 LANG_ITALIAN
10841+ 0x11 LANG_JAPANESE
10842+ 0x12 LANG_KOREAN
10843+ 0x13 LANG_DUTCH
10844+ 0x14 LANG_NORWEGIAN
10845+ 0x15 LANG_POLISH
10846+ 0x16 LANG_PORTUGUESE
10847+ 0x17 LANG_RHAETO_ROMANCE
10848+ 0x18 LANG_ROMANIAN
10849+ 0x19 LANG_RUSSIAN
10850+ 0x1a LANG_CROATIAN == LANG_SERBIAN
10851+ 0x1b LANG_SLOVAK
10852+ 0x1c LANG_ALBANIAN
10853+ 0x1d LANG_SWEDISH
10854+ 0x1e LANG_THAI
10855+ 0x1f LANG_TURKISH
10856+ 0x20 LANG_URDU
10857+ 0x21 LANG_INDONESIAN
10858+ 0x22 LANG_UKRAINIAN
10859+ 0x23 LANG_BELARUSIAN
10860+ 0x24 LANG_SLOVENIAN
10861+ 0x25 LANG_ESTONIAN
10862+ 0x26 LANG_LATVIAN
10863+ 0x27 LANG_LITHUANIAN
10864+ 0x28 LANG_TAJIK
10865+ 0x29 LANG_FARSI
10866+ 0x2a LANG_VIETNAMESE
10867+ 0x2b LANG_ARMENIAN
10868+ 0x2c LANG_AZERI
10869+ 0x2d LANG_BASQUE
10870+ 0x2e LANG_SORBIAN
10871+ 0x2f LANG_MACEDONIAN
10872+ 0x30 LANG_SUTU
10873+ 0x31 LANG_TSONGA
10874+ 0x32 LANG_TSWANA
10875+ 0x33 LANG_VENDA
10876+ 0x34 LANG_XHOSA
10877+ 0x35 LANG_ZULU
10878+ 0x36 LANG_AFRIKAANS
10879+ 0x37 LANG_GEORGIAN
10880+ 0x38 LANG_FAEROESE
10881+ 0x39 LANG_HINDI
10882+ 0x3a LANG_MALTESE
10883+ 0x3b LANG_SAAMI
10884+ 0x3c LANG_GAELIC
10885+ 0x3d LANG_YIDDISH
10886+ 0x3e LANG_MALAY
10887+ 0x3f LANG_KAZAK
10888+ 0x40 LANG_KYRGYZ
10889+ 0x41 LANG_SWAHILI
10890+ 0x42 LANG_TURKMEN
10891+ 0x43 LANG_UZBEK
10892+ 0x44 LANG_TATAR
10893+ 0x45 LANG_BENGALI
10894+ 0x46 LANG_PUNJABI
10895+ 0x47 LANG_GUJARATI
10896+ 0x48 LANG_ORIYA
10897+ 0x49 LANG_TAMIL
10898+ 0x4a LANG_TELUGU
10899+ 0x4b LANG_KANNADA
10900+ 0x4c LANG_MALAYALAM
10901+ 0x4d LANG_ASSAMESE
10902+ 0x4e LANG_MARATHI
10903+ 0x4f LANG_SANSKRIT
10904+ 0x50 LANG_MONGOLIAN
10905+ 0x51 LANG_TIBETAN
10906+ 0x52 LANG_WELSH
10907+ 0x53 LANG_CAMBODIAN
10908+ 0x54 LANG_LAO
10909+ 0x55 LANG_BURMESE
10910+ 0x56 LANG_GALICIAN
10911+ 0x57 LANG_KONKANI
10912+ 0x58 LANG_MANIPURI
10913+ 0x59 LANG_SINDHI
10914+ 0x5a LANG_SYRIAC
10915+ 0x5b LANG_SINHALESE
10916+ 0x5c LANG_CHEROKEE
10917+ 0x5d LANG_INUKTITUT
10918+ 0x5e LANG_AMHARIC
10919+ 0x5f LANG_TAMAZIGHT
10920+ 0x60 LANG_KASHMIRI
10921+ 0x61 LANG_NEPALI
10922+ 0x62 LANG_FRISIAN
10923+ 0x63 LANG_PASHTO
10924+ 0x64 LANG_TAGALOG
10925+ 0x65 LANG_DIVEHI
10926+ 0x66 LANG_EDO
10927+ 0x67 LANG_FULFULDE
10928+ 0x68 LANG_HAUSA
10929+ 0x69 LANG_IBIBIO
10930+ 0x6a LANG_YORUBA
10931+ 0x70 LANG_IGBO
10932+ 0x71 LANG_KANURI
10933+ 0x72 LANG_OROMO
10934+ 0x73 LANG_TIGRINYA
10935+ 0x74 LANG_GUARANI
10936+ 0x75 LANG_HAWAIIAN
10937+ 0x76 LANG_LATIN
10938+ 0x77 LANG_SOMALI
10939+ 0x78 LANG_YI
10940+ 0x79 LANG_PAPIAMENTU
10941+*/
10942+/* Mingw headers don't have latest language and sublanguage codes. */
10943+# ifndef LANG_AFRIKAANS
10944+# define LANG_AFRIKAANS 0x36
10945+# endif
10946+# ifndef LANG_ALBANIAN
10947+# define LANG_ALBANIAN 0x1c
10948+# endif
10949+# ifndef LANG_AMHARIC
10950+# define LANG_AMHARIC 0x5e
10951+# endif
10952+# ifndef LANG_ARABIC
10953+# define LANG_ARABIC 0x01
10954+# endif
10955+# ifndef LANG_ARMENIAN
10956+# define LANG_ARMENIAN 0x2b
10957+# endif
10958+# ifndef LANG_ASSAMESE
10959+# define LANG_ASSAMESE 0x4d
10960+# endif
10961+# ifndef LANG_AZERI
10962+# define LANG_AZERI 0x2c
10963+# endif
10964+# ifndef LANG_BASQUE
10965+# define LANG_BASQUE 0x2d
10966+# endif
10967+# ifndef LANG_BELARUSIAN
10968+# define LANG_BELARUSIAN 0x23
10969+# endif
10970+# ifndef LANG_BENGALI
10971+# define LANG_BENGALI 0x45
10972+# endif
10973+# ifndef LANG_BURMESE
10974+# define LANG_BURMESE 0x55
10975+# endif
10976+# ifndef LANG_CAMBODIAN
10977+# define LANG_CAMBODIAN 0x53
10978+# endif
10979+# ifndef LANG_CATALAN
10980+# define LANG_CATALAN 0x03
10981+# endif
10982+# ifndef LANG_CHEROKEE
10983+# define LANG_CHEROKEE 0x5c
10984+# endif
10985+# ifndef LANG_DIVEHI
10986+# define LANG_DIVEHI 0x65
10987+# endif
10988+# ifndef LANG_EDO
10989+# define LANG_EDO 0x66
10990+# endif
10991+# ifndef LANG_ESTONIAN
10992+# define LANG_ESTONIAN 0x25
10993+# endif
10994+# ifndef LANG_FAEROESE
10995+# define LANG_FAEROESE 0x38
10996+# endif
10997+# ifndef LANG_FARSI
10998+# define LANG_FARSI 0x29
10999+# endif
11000+# ifndef LANG_FRISIAN
11001+# define LANG_FRISIAN 0x62
11002+# endif
11003+# ifndef LANG_FULFULDE
11004+# define LANG_FULFULDE 0x67
11005+# endif
11006+# ifndef LANG_GAELIC
11007+# define LANG_GAELIC 0x3c
11008+# endif
11009+# ifndef LANG_GALICIAN
11010+# define LANG_GALICIAN 0x56
11011+# endif
11012+# ifndef LANG_GEORGIAN
11013+# define LANG_GEORGIAN 0x37
11014+# endif
11015+# ifndef LANG_GUARANI
11016+# define LANG_GUARANI 0x74
11017+# endif
11018+# ifndef LANG_GUJARATI
11019+# define LANG_GUJARATI 0x47
11020+# endif
11021+# ifndef LANG_HAUSA
11022+# define LANG_HAUSA 0x68
11023+# endif
11024+# ifndef LANG_HAWAIIAN
11025+# define LANG_HAWAIIAN 0x75
11026+# endif
11027+# ifndef LANG_HEBREW
11028+# define LANG_HEBREW 0x0d
11029+# endif
11030+# ifndef LANG_HINDI
11031+# define LANG_HINDI 0x39
11032+# endif
11033+# ifndef LANG_IBIBIO
11034+# define LANG_IBIBIO 0x69
11035+# endif
11036+# ifndef LANG_IGBO
11037+# define LANG_IGBO 0x70
11038+# endif
11039+# ifndef LANG_INDONESIAN
11040+# define LANG_INDONESIAN 0x21
11041+# endif
11042+# ifndef LANG_INUKTITUT
11043+# define LANG_INUKTITUT 0x5d
11044+# endif
11045+# ifndef LANG_KANNADA
11046+# define LANG_KANNADA 0x4b
11047+# endif
11048+# ifndef LANG_KANURI
11049+# define LANG_KANURI 0x71
11050+# endif
11051+# ifndef LANG_KASHMIRI
11052+# define LANG_KASHMIRI 0x60
11053+# endif
11054+# ifndef LANG_KAZAK
11055+# define LANG_KAZAK 0x3f
11056+# endif
11057+# ifndef LANG_KONKANI
11058+# define LANG_KONKANI 0x57
11059+# endif
11060+# ifndef LANG_KYRGYZ
11061+# define LANG_KYRGYZ 0x40
11062+# endif
11063+# ifndef LANG_LAO
11064+# define LANG_LAO 0x54
11065+# endif
11066+# ifndef LANG_LATIN
11067+# define LANG_LATIN 0x76
11068+# endif
11069+# ifndef LANG_LATVIAN
11070+# define LANG_LATVIAN 0x26
11071+# endif
11072+# ifndef LANG_LITHUANIAN
11073+# define LANG_LITHUANIAN 0x27
11074+# endif
11075+# ifndef LANG_MACEDONIAN
11076+# define LANG_MACEDONIAN 0x2f
11077+# endif
11078+# ifndef LANG_MALAY
11079+# define LANG_MALAY 0x3e
11080+# endif
11081+# ifndef LANG_MALAYALAM
11082+# define LANG_MALAYALAM 0x4c
11083+# endif
11084+# ifndef LANG_MALTESE
11085+# define LANG_MALTESE 0x3a
11086+# endif
11087+# ifndef LANG_MANIPURI
11088+# define LANG_MANIPURI 0x58
11089+# endif
11090+# ifndef LANG_MARATHI
11091+# define LANG_MARATHI 0x4e
11092+# endif
11093+# ifndef LANG_MONGOLIAN
11094+# define LANG_MONGOLIAN 0x50
11095+# endif
11096+# ifndef LANG_NEPALI
11097+# define LANG_NEPALI 0x61
11098+# endif
11099+# ifndef LANG_ORIYA
11100+# define LANG_ORIYA 0x48
11101+# endif
11102+# ifndef LANG_OROMO
11103+# define LANG_OROMO 0x72
11104+# endif
11105+# ifndef LANG_PAPIAMENTU
11106+# define LANG_PAPIAMENTU 0x79
11107+# endif
11108+# ifndef LANG_PASHTO
11109+# define LANG_PASHTO 0x63
11110+# endif
11111+# ifndef LANG_PUNJABI
11112+# define LANG_PUNJABI 0x46
11113+# endif
11114+# ifndef LANG_RHAETO_ROMANCE
11115+# define LANG_RHAETO_ROMANCE 0x17
11116+# endif
11117+# ifndef LANG_SAAMI
11118+# define LANG_SAAMI 0x3b
11119+# endif
11120+# ifndef LANG_SANSKRIT
11121+# define LANG_SANSKRIT 0x4f
11122+# endif
11123+# ifndef LANG_SERBIAN
11124+# define LANG_SERBIAN 0x1a
11125+# endif
11126+# ifndef LANG_SINDHI
11127+# define LANG_SINDHI 0x59
11128+# endif
11129+# ifndef LANG_SINHALESE
11130+# define LANG_SINHALESE 0x5b
11131+# endif
11132+# ifndef LANG_SLOVAK
11133+# define LANG_SLOVAK 0x1b
11134+# endif
11135+# ifndef LANG_SOMALI
11136+# define LANG_SOMALI 0x77
11137+# endif
11138+# ifndef LANG_SORBIAN
11139+# define LANG_SORBIAN 0x2e
11140+# endif
11141+# ifndef LANG_SUTU
11142+# define LANG_SUTU 0x30
11143+# endif
11144+# ifndef LANG_SWAHILI
11145+# define LANG_SWAHILI 0x41
11146+# endif
11147+# ifndef LANG_SYRIAC
11148+# define LANG_SYRIAC 0x5a
11149+# endif
11150+# ifndef LANG_TAGALOG
11151+# define LANG_TAGALOG 0x64
11152+# endif
11153+# ifndef LANG_TAJIK
11154+# define LANG_TAJIK 0x28
11155+# endif
11156+# ifndef LANG_TAMAZIGHT
11157+# define LANG_TAMAZIGHT 0x5f
11158+# endif
11159+# ifndef LANG_TAMIL
11160+# define LANG_TAMIL 0x49
11161+# endif
11162+# ifndef LANG_TATAR
11163+# define LANG_TATAR 0x44
11164+# endif
11165+# ifndef LANG_TELUGU
11166+# define LANG_TELUGU 0x4a
11167+# endif
11168+# ifndef LANG_THAI
11169+# define LANG_THAI 0x1e
11170+# endif
11171+# ifndef LANG_TIBETAN
11172+# define LANG_TIBETAN 0x51
11173+# endif
11174+# ifndef LANG_TIGRINYA
11175+# define LANG_TIGRINYA 0x73
11176+# endif
11177+# ifndef LANG_TSONGA
11178+# define LANG_TSONGA 0x31
11179+# endif
11180+# ifndef LANG_TSWANA
11181+# define LANG_TSWANA 0x32
11182+# endif
11183+# ifndef LANG_TURKMEN
11184+# define LANG_TURKMEN 0x42
11185+# endif
11186+# ifndef LANG_UKRAINIAN
11187+# define LANG_UKRAINIAN 0x22
11188+# endif
11189+# ifndef LANG_URDU
11190+# define LANG_URDU 0x20
11191+# endif
11192+# ifndef LANG_UZBEK
11193+# define LANG_UZBEK 0x43
11194+# endif
11195+# ifndef LANG_VENDA
11196+# define LANG_VENDA 0x33
11197+# endif
11198+# ifndef LANG_VIETNAMESE
11199+# define LANG_VIETNAMESE 0x2a
11200+# endif
11201+# ifndef LANG_WELSH
11202+# define LANG_WELSH 0x52
11203+# endif
11204+# ifndef LANG_XHOSA
11205+# define LANG_XHOSA 0x34
11206+# endif
11207+# ifndef LANG_YI
11208+# define LANG_YI 0x78
11209+# endif
11210+# ifndef LANG_YIDDISH
11211+# define LANG_YIDDISH 0x3d
11212+# endif
11213+# ifndef LANG_YORUBA
11214+# define LANG_YORUBA 0x6a
11215+# endif
11216+# ifndef LANG_ZULU
11217+# define LANG_ZULU 0x35
11218+# endif
11219+# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
11220+# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
11221+# endif
11222+# ifndef SUBLANG_ARABIC_IRAQ
11223+# define SUBLANG_ARABIC_IRAQ 0x02
11224+# endif
11225+# ifndef SUBLANG_ARABIC_EGYPT
11226+# define SUBLANG_ARABIC_EGYPT 0x03
11227+# endif
11228+# ifndef SUBLANG_ARABIC_LIBYA
11229+# define SUBLANG_ARABIC_LIBYA 0x04
11230+# endif
11231+# ifndef SUBLANG_ARABIC_ALGERIA
11232+# define SUBLANG_ARABIC_ALGERIA 0x05
11233+# endif
11234+# ifndef SUBLANG_ARABIC_MOROCCO
11235+# define SUBLANG_ARABIC_MOROCCO 0x06
11236+# endif
11237+# ifndef SUBLANG_ARABIC_TUNISIA
11238+# define SUBLANG_ARABIC_TUNISIA 0x07
11239+# endif
11240+# ifndef SUBLANG_ARABIC_OMAN
11241+# define SUBLANG_ARABIC_OMAN 0x08
11242+# endif
11243+# ifndef SUBLANG_ARABIC_YEMEN
11244+# define SUBLANG_ARABIC_YEMEN 0x09
11245+# endif
11246+# ifndef SUBLANG_ARABIC_SYRIA
11247+# define SUBLANG_ARABIC_SYRIA 0x0a
11248+# endif
11249+# ifndef SUBLANG_ARABIC_JORDAN
11250+# define SUBLANG_ARABIC_JORDAN 0x0b
11251+# endif
11252+# ifndef SUBLANG_ARABIC_LEBANON
11253+# define SUBLANG_ARABIC_LEBANON 0x0c
11254+# endif
11255+# ifndef SUBLANG_ARABIC_KUWAIT
11256+# define SUBLANG_ARABIC_KUWAIT 0x0d
11257+# endif
11258+# ifndef SUBLANG_ARABIC_UAE
11259+# define SUBLANG_ARABIC_UAE 0x0e
11260+# endif
11261+# ifndef SUBLANG_ARABIC_BAHRAIN
11262+# define SUBLANG_ARABIC_BAHRAIN 0x0f
11263+# endif
11264+# ifndef SUBLANG_ARABIC_QATAR
11265+# define SUBLANG_ARABIC_QATAR 0x10
11266+# endif
11267+# ifndef SUBLANG_AZERI_LATIN
11268+# define SUBLANG_AZERI_LATIN 0x01
11269+# endif
11270+# ifndef SUBLANG_AZERI_CYRILLIC
11271+# define SUBLANG_AZERI_CYRILLIC 0x02
11272+# endif
11273+# ifndef SUBLANG_BENGALI_INDIA
11274+# define SUBLANG_BENGALI_INDIA 0x00
11275+# endif
11276+# ifndef SUBLANG_BENGALI_BANGLADESH
11277+# define SUBLANG_BENGALI_BANGLADESH 0x01
11278+# endif
11279+# ifndef SUBLANG_CHINESE_MACAU
11280+# define SUBLANG_CHINESE_MACAU 0x05
11281+# endif
11282+# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
11283+# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
11284+# endif
11285+# ifndef SUBLANG_ENGLISH_JAMAICA
11286+# define SUBLANG_ENGLISH_JAMAICA 0x08
11287+# endif
11288+# ifndef SUBLANG_ENGLISH_CARIBBEAN
11289+# define SUBLANG_ENGLISH_CARIBBEAN 0x09
11290+# endif
11291+# ifndef SUBLANG_ENGLISH_BELIZE
11292+# define SUBLANG_ENGLISH_BELIZE 0x0a
11293+# endif
11294+# ifndef SUBLANG_ENGLISH_TRINIDAD
11295+# define SUBLANG_ENGLISH_TRINIDAD 0x0b
11296+# endif
11297+# ifndef SUBLANG_ENGLISH_ZIMBABWE
11298+# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
11299+# endif
11300+# ifndef SUBLANG_ENGLISH_PHILIPPINES
11301+# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
11302+# endif
11303+# ifndef SUBLANG_ENGLISH_INDONESIA
11304+# define SUBLANG_ENGLISH_INDONESIA 0x0e
11305+# endif
11306+# ifndef SUBLANG_ENGLISH_HONGKONG
11307+# define SUBLANG_ENGLISH_HONGKONG 0x0f
11308+# endif
11309+# ifndef SUBLANG_ENGLISH_INDIA
11310+# define SUBLANG_ENGLISH_INDIA 0x10
11311+# endif
11312+# ifndef SUBLANG_ENGLISH_MALAYSIA
11313+# define SUBLANG_ENGLISH_MALAYSIA 0x11
11314+# endif
11315+# ifndef SUBLANG_ENGLISH_SINGAPORE
11316+# define SUBLANG_ENGLISH_SINGAPORE 0x12
11317+# endif
11318+# ifndef SUBLANG_FRENCH_LUXEMBOURG
11319+# define SUBLANG_FRENCH_LUXEMBOURG 0x05
11320+# endif
11321+# ifndef SUBLANG_FRENCH_MONACO
11322+# define SUBLANG_FRENCH_MONACO 0x06
11323+# endif
11324+# ifndef SUBLANG_FRENCH_WESTINDIES
11325+# define SUBLANG_FRENCH_WESTINDIES 0x07
11326+# endif
11327+# ifndef SUBLANG_FRENCH_REUNION
11328+# define SUBLANG_FRENCH_REUNION 0x08
11329+# endif
11330+# ifndef SUBLANG_FRENCH_CONGO
11331+# define SUBLANG_FRENCH_CONGO 0x09
11332+# endif
11333+# ifndef SUBLANG_FRENCH_SENEGAL
11334+# define SUBLANG_FRENCH_SENEGAL 0x0a
11335+# endif
11336+# ifndef SUBLANG_FRENCH_CAMEROON
11337+# define SUBLANG_FRENCH_CAMEROON 0x0b
11338+# endif
11339+# ifndef SUBLANG_FRENCH_COTEDIVOIRE
11340+# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
11341+# endif
11342+# ifndef SUBLANG_FRENCH_MALI
11343+# define SUBLANG_FRENCH_MALI 0x0d
11344+# endif
11345+# ifndef SUBLANG_FRENCH_MOROCCO
11346+# define SUBLANG_FRENCH_MOROCCO 0x0e
11347+# endif
11348+# ifndef SUBLANG_FRENCH_HAITI
11349+# define SUBLANG_FRENCH_HAITI 0x0f
11350+# endif
11351+# ifndef SUBLANG_GERMAN_LUXEMBOURG
11352+# define SUBLANG_GERMAN_LUXEMBOURG 0x04
11353+# endif
11354+# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
11355+# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
11356+# endif
11357+# ifndef SUBLANG_KASHMIRI_INDIA
11358+# define SUBLANG_KASHMIRI_INDIA 0x02
11359+# endif
11360+# ifndef SUBLANG_MALAY_MALAYSIA
11361+# define SUBLANG_MALAY_MALAYSIA 0x01
11362+# endif
11363+# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
11364+# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
11365+# endif
11366+# ifndef SUBLANG_NEPALI_INDIA
11367+# define SUBLANG_NEPALI_INDIA 0x02
11368+# endif
11369+# ifndef SUBLANG_PUNJABI_INDIA
11370+# define SUBLANG_PUNJABI_INDIA 0x00
11371+# endif
11372+# ifndef SUBLANG_PUNJABI_PAKISTAN
11373+# define SUBLANG_PUNJABI_PAKISTAN 0x01
11374+# endif
11375+# ifndef SUBLANG_ROMANIAN_ROMANIA
11376+# define SUBLANG_ROMANIAN_ROMANIA 0x00
11377+# endif
11378+# ifndef SUBLANG_ROMANIAN_MOLDOVA
11379+# define SUBLANG_ROMANIAN_MOLDOVA 0x01
11380+# endif
11381+# ifndef SUBLANG_SERBIAN_LATIN
11382+# define SUBLANG_SERBIAN_LATIN 0x02
11383+# endif
11384+# ifndef SUBLANG_SERBIAN_CYRILLIC
11385+# define SUBLANG_SERBIAN_CYRILLIC 0x03
11386+# endif
11387+# ifndef SUBLANG_SINDHI_INDIA
11388+# define SUBLANG_SINDHI_INDIA 0x00
11389+# endif
11390+# ifndef SUBLANG_SINDHI_PAKISTAN
11391+# define SUBLANG_SINDHI_PAKISTAN 0x01
11392+# endif
11393+# ifndef SUBLANG_SPANISH_GUATEMALA
11394+# define SUBLANG_SPANISH_GUATEMALA 0x04
11395+# endif
11396+# ifndef SUBLANG_SPANISH_COSTA_RICA
11397+# define SUBLANG_SPANISH_COSTA_RICA 0x05
11398+# endif
11399+# ifndef SUBLANG_SPANISH_PANAMA
11400+# define SUBLANG_SPANISH_PANAMA 0x06
11401+# endif
11402+# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
11403+# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
11404+# endif
11405+# ifndef SUBLANG_SPANISH_VENEZUELA
11406+# define SUBLANG_SPANISH_VENEZUELA 0x08
11407+# endif
11408+# ifndef SUBLANG_SPANISH_COLOMBIA
11409+# define SUBLANG_SPANISH_COLOMBIA 0x09
11410+# endif
11411+# ifndef SUBLANG_SPANISH_PERU
11412+# define SUBLANG_SPANISH_PERU 0x0a
11413+# endif
11414+# ifndef SUBLANG_SPANISH_ARGENTINA
11415+# define SUBLANG_SPANISH_ARGENTINA 0x0b
11416+# endif
11417+# ifndef SUBLANG_SPANISH_ECUADOR
11418+# define SUBLANG_SPANISH_ECUADOR 0x0c
11419+# endif
11420+# ifndef SUBLANG_SPANISH_CHILE
11421+# define SUBLANG_SPANISH_CHILE 0x0d
11422+# endif
11423+# ifndef SUBLANG_SPANISH_URUGUAY
11424+# define SUBLANG_SPANISH_URUGUAY 0x0e
11425+# endif
11426+# ifndef SUBLANG_SPANISH_PARAGUAY
11427+# define SUBLANG_SPANISH_PARAGUAY 0x0f
11428+# endif
11429+# ifndef SUBLANG_SPANISH_BOLIVIA
11430+# define SUBLANG_SPANISH_BOLIVIA 0x10
11431+# endif
11432+# ifndef SUBLANG_SPANISH_EL_SALVADOR
11433+# define SUBLANG_SPANISH_EL_SALVADOR 0x11
11434+# endif
11435+# ifndef SUBLANG_SPANISH_HONDURAS
11436+# define SUBLANG_SPANISH_HONDURAS 0x12
11437+# endif
11438+# ifndef SUBLANG_SPANISH_NICARAGUA
11439+# define SUBLANG_SPANISH_NICARAGUA 0x13
11440+# endif
11441+# ifndef SUBLANG_SPANISH_PUERTO_RICO
11442+# define SUBLANG_SPANISH_PUERTO_RICO 0x14
11443+# endif
11444+# ifndef SUBLANG_SWEDISH_FINLAND
11445+# define SUBLANG_SWEDISH_FINLAND 0x02
11446+# endif
11447+# ifndef SUBLANG_TAMAZIGHT_ARABIC
11448+# define SUBLANG_TAMAZIGHT_ARABIC 0x01
11449+# endif
11450+# ifndef SUBLANG_TAMAZIGHT_LATIN
11451+# define SUBLANG_TAMAZIGHT_LATIN 0x02
11452+# endif
11453+# ifndef SUBLANG_TIGRINYA_ETHIOPIA
11454+# define SUBLANG_TIGRINYA_ETHIOPIA 0x00
11455+# endif
11456+# ifndef SUBLANG_TIGRINYA_ERITREA
11457+# define SUBLANG_TIGRINYA_ERITREA 0x01
11458+# endif
11459+# ifndef SUBLANG_URDU_PAKISTAN
11460+# define SUBLANG_URDU_PAKISTAN 0x01
11461+# endif
11462+# ifndef SUBLANG_URDU_INDIA
11463+# define SUBLANG_URDU_INDIA 0x02
11464+# endif
11465+# ifndef SUBLANG_UZBEK_LATIN
11466+# define SUBLANG_UZBEK_LATIN 0x01
11467+# endif
11468+# ifndef SUBLANG_UZBEK_CYRILLIC
11469+# define SUBLANG_UZBEK_CYRILLIC 0x02
11470+# endif
11471+#endif
11472+
11473+/* XPG3 defines the result of 'setlocale (category, NULL)' as:
11474+ "Directs 'setlocale()' to query 'category' and return the current
11475+ setting of 'local'."
11476+ However it does not specify the exact format. Neither do SUSV2 and
11477+ ISO C 99. So we can use this feature only on selected systems (e.g.
11478+ those using GNU C Library). */
11479+#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
11480+# define HAVE_LOCALE_NULL
11481+#endif
11482+
11483+/* Determine the current locale's name, and canonicalize it into XPG syntax
11484+ language[_territory[.codeset]][@modifier]
11485+ The codeset part in the result is not reliable; the locale_charset()
11486+ should be used for codeset information instead.
11487+ The result must not be freed; it is statically allocated. */
11488+
11489+const char *
11490+_nl_locale_name (int category, const char *categoryname)
11491+{
11492+ const char *retval;
11493+
11494+#ifndef WIN32
11495+
11496+ /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
11497+ On some systems this can be done by the 'setlocale' function itself. */
11498+# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
11499+ retval = setlocale (category, NULL);
11500+# else
11501+ /* Setting of LC_ALL overwrites all other. */
11502+ retval = getenv ("LC_ALL");
11503+ if (retval == NULL || retval[0] == '\0')
11504+ {
11505+ /* Next comes the name of the desired category. */
11506+ retval = getenv (categoryname);
11507+ if (retval == NULL || retval[0] == '\0')
11508+ {
11509+ /* Last possibility is the LANG environment variable. */
11510+ retval = getenv ("LANG");
11511+ if (retval == NULL || retval[0] == '\0')
11512+ /* We use C as the default domain. POSIX says this is
11513+ implementation defined. */
11514+ retval = "C";
11515+ }
11516+ }
11517+# endif
11518+
11519+ return retval;
11520+
11521+#else /* WIN32 */
11522+
11523+ /* Return an XPG style locale name language[_territory][@modifier].
11524+ Don't even bother determining the codeset; it's not useful in this
11525+ context, because message catalogs are not specific to a single
11526+ codeset. */
11527+
11528+ LCID lcid;
11529+ LANGID langid;
11530+ int primary, sub;
11531+
11532+ /* Let the user override the system settings through environment
11533+ variables, as on POSIX systems. */
11534+ retval = getenv ("LC_ALL");
11535+ if (retval != NULL && retval[0] != '\0')
11536+ return retval;
11537+ retval = getenv (categoryname);
11538+ if (retval != NULL && retval[0] != '\0')
11539+ return retval;
11540+ retval = getenv ("LANG");
11541+ if (retval != NULL && retval[0] != '\0')
11542+ return retval;
11543+
11544+ /* Use native Win32 API locale ID. */
11545+ lcid = GetThreadLocale ();
11546+
11547+ /* Strip off the sorting rules, keep only the language part. */
11548+ langid = LANGIDFROMLCID (lcid);
11549+
11550+ /* Split into language and territory part. */
11551+ primary = PRIMARYLANGID (langid);
11552+ sub = SUBLANGID (langid);
11553+
11554+ /* Dispatch on language.
11555+ See also http://www.unicode.org/unicode/onlinedat/languages.html .
11556+ For details about languages, see http://www.ethnologue.com/ . */
11557+ switch (primary)
11558+ {
11559+ case LANG_AFRIKAANS: return "af_ZA";
11560+ case LANG_ALBANIAN: return "sq_AL";
11561+ case LANG_AMHARIC: return "am_ET";
11562+ case LANG_ARABIC:
11563+ switch (sub)
11564+ {
11565+ case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
11566+ case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
11567+ case SUBLANG_ARABIC_EGYPT: return "ar_EG";
11568+ case SUBLANG_ARABIC_LIBYA: return "ar_LY";
11569+ case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
11570+ case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
11571+ case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
11572+ case SUBLANG_ARABIC_OMAN: return "ar_OM";
11573+ case SUBLANG_ARABIC_YEMEN: return "ar_YE";
11574+ case SUBLANG_ARABIC_SYRIA: return "ar_SY";
11575+ case SUBLANG_ARABIC_JORDAN: return "ar_JO";
11576+ case SUBLANG_ARABIC_LEBANON: return "ar_LB";
11577+ case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
11578+ case SUBLANG_ARABIC_UAE: return "ar_AE";
11579+ case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
11580+ case SUBLANG_ARABIC_QATAR: return "ar_QA";
11581+ }
11582+ return "ar";
11583+ case LANG_ARMENIAN: return "hy_AM";
11584+ case LANG_ASSAMESE: return "as_IN";
11585+ case LANG_AZERI:
11586+ switch (sub)
11587+ {
11588+ /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
11589+ case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
11590+ case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
11591+ }
11592+ return "az";
11593+ case LANG_BASQUE:
11594+ return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
11595+ case LANG_BELARUSIAN: return "be_BY";
11596+ case LANG_BENGALI:
11597+ switch (sub)
11598+ {
11599+ case SUBLANG_BENGALI_INDIA: return "bn_IN";
11600+ case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
11601+ }
11602+ return "bn";
11603+ case LANG_BULGARIAN: return "bg_BG";
11604+ case LANG_BURMESE: return "my_MM";
11605+ case LANG_CAMBODIAN: return "km_KH";
11606+ case LANG_CATALAN: return "ca_ES";
11607+ case LANG_CHEROKEE: return "chr_US";
11608+ case LANG_CHINESE:
11609+ switch (sub)
11610+ {
11611+ case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
11612+ case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
11613+ case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
11614+ case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
11615+ case SUBLANG_CHINESE_MACAU: return "zh_MO";
11616+ }
11617+ return "zh";
11618+ case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN
11619+ * What used to be called Serbo-Croatian
11620+ * should really now be two separate
11621+ * languages because of political reasons.
11622+ * (Says tml, who knows nothing about Serbian
11623+ * or Croatian.)
11624+ * (I can feel those flames coming already.)
11625+ */
11626+ switch (sub)
11627+ {
11628+ case SUBLANG_DEFAULT: return "hr_HR";
11629+ case SUBLANG_SERBIAN_LATIN: return "sr_CS";
11630+ case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
11631+ }
11632+ return "hr";
11633+ case LANG_CZECH: return "cs_CZ";
11634+ case LANG_DANISH: return "da_DK";
11635+ case LANG_DIVEHI: return "dv_MV";
11636+ case LANG_DUTCH:
11637+ switch (sub)
11638+ {
11639+ case SUBLANG_DUTCH: return "nl_NL";
11640+ case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
11641+ }
11642+ return "nl";
11643+ case LANG_EDO: return "bin_NG";
11644+ case LANG_ENGLISH:
11645+ switch (sub)
11646+ {
11647+ /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
11648+ * English was the language spoken in England.
11649+ * Oh well.
11650+ */
11651+ case SUBLANG_ENGLISH_US: return "en_US";
11652+ case SUBLANG_ENGLISH_UK: return "en_GB";
11653+ case SUBLANG_ENGLISH_AUS: return "en_AU";
11654+ case SUBLANG_ENGLISH_CAN: return "en_CA";
11655+ case SUBLANG_ENGLISH_NZ: return "en_NZ";
11656+ case SUBLANG_ENGLISH_EIRE: return "en_IE";
11657+ case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
11658+ case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
11659+ case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
11660+ case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
11661+ case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
11662+ case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
11663+ case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
11664+ case SUBLANG_ENGLISH_INDONESIA: return "en_ID";
11665+ case SUBLANG_ENGLISH_HONGKONG: return "en_HK";
11666+ case SUBLANG_ENGLISH_INDIA: return "en_IN";
11667+ case SUBLANG_ENGLISH_MALAYSIA: return "en_MY";
11668+ case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
11669+ }
11670+ return "en";
11671+ case LANG_ESTONIAN: return "et_EE";
11672+ case LANG_FAEROESE: return "fo_FO";
11673+ case LANG_FARSI: return "fa_IR";
11674+ case LANG_FINNISH: return "fi_FI";
11675+ case LANG_FRENCH:
11676+ switch (sub)
11677+ {
11678+ case SUBLANG_FRENCH: return "fr_FR";
11679+ case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
11680+ case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
11681+ case SUBLANG_FRENCH_SWISS: return "fr_CH";
11682+ case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
11683+ case SUBLANG_FRENCH_MONACO: return "fr_MC";
11684+ case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */
11685+ case SUBLANG_FRENCH_REUNION: return "fr_RE";
11686+ case SUBLANG_FRENCH_CONGO: return "fr_CG";
11687+ case SUBLANG_FRENCH_SENEGAL: return "fr_SN";
11688+ case SUBLANG_FRENCH_CAMEROON: return "fr_CM";
11689+ case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI";
11690+ case SUBLANG_FRENCH_MALI: return "fr_ML";
11691+ case SUBLANG_FRENCH_MOROCCO: return "fr_MA";
11692+ case SUBLANG_FRENCH_HAITI: return "fr_HT";
11693+ }
11694+ return "fr";
11695+ case LANG_FRISIAN: return "fy_NL";
11696+ case LANG_FULFULDE:
11697+ /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */
11698+ return "ff_NG";
11699+ case LANG_GAELIC:
11700+ switch (sub)
11701+ {
11702+ case 0x01: /* SCOTTISH */ return "gd_GB";
11703+ case 0x02: /* IRISH */ return "ga_IE";
11704+ }
11705+ return "C";
11706+ case LANG_GALICIAN: return "gl_ES";
11707+ case LANG_GEORGIAN: return "ka_GE";
11708+ case LANG_GERMAN:
11709+ switch (sub)
11710+ {
11711+ case SUBLANG_GERMAN: return "de_DE";
11712+ case SUBLANG_GERMAN_SWISS: return "de_CH";
11713+ case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
11714+ case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
11715+ case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
11716+ }
11717+ return "de";
11718+ case LANG_GREEK: return "el_GR";
11719+ case LANG_GUARANI: return "gn_PY";
11720+ case LANG_GUJARATI: return "gu_IN";
11721+ case LANG_HAUSA: return "ha_NG";
11722+ case LANG_HAWAIIAN:
11723+ /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
11724+ or Hawaii Creole English ("cpe_US", 600000 speakers)? */
11725+ return "cpe_US";
11726+ case LANG_HEBREW: return "he_IL";
11727+ case LANG_HINDI: return "hi_IN";
11728+ case LANG_HUNGARIAN: return "hu_HU";
11729+ case LANG_IBIBIO: return "nic_NG";
11730+ case LANG_ICELANDIC: return "is_IS";
11731+ case LANG_IGBO: return "ig_NG";
11732+ case LANG_INDONESIAN: return "id_ID";
11733+ case LANG_INUKTITUT: return "iu_CA";
11734+ case LANG_ITALIAN:
11735+ switch (sub)
11736+ {
11737+ case SUBLANG_ITALIAN: return "it_IT";
11738+ case SUBLANG_ITALIAN_SWISS: return "it_CH";
11739+ }
11740+ return "it";
11741+ case LANG_JAPANESE: return "ja_JP";
11742+ case LANG_KANNADA: return "kn_IN";
11743+ case LANG_KANURI: return "kr_NG";
11744+ case LANG_KASHMIRI:
11745+ switch (sub)
11746+ {
11747+ case SUBLANG_DEFAULT: return "ks_PK";
11748+ case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
11749+ }
11750+ return "ks";
11751+ case LANG_KAZAK: return "kk_KZ";
11752+ case LANG_KONKANI:
11753+ /* FIXME: Adjust this when such locales appear on Unix. */
11754+ return "kok_IN";
11755+ case LANG_KOREAN: return "ko_KR";
11756+ case LANG_KYRGYZ: return "ky_KG";
11757+ case LANG_LAO: return "lo_LA";
11758+ case LANG_LATIN: return "la_VA";
11759+ case LANG_LATVIAN: return "lv_LV";
11760+ case LANG_LITHUANIAN: return "lt_LT";
11761+ case LANG_MACEDONIAN: return "mk_MK";
11762+ case LANG_MALAY:
11763+ switch (sub)
11764+ {
11765+ case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
11766+ case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
11767+ }
11768+ return "ms";
11769+ case LANG_MALAYALAM: return "ml_IN";
11770+ case LANG_MALTESE: return "mt_MT";
11771+ case LANG_MANIPURI:
11772+ /* FIXME: Adjust this when such locales appear on Unix. */
11773+ return "mni_IN";
11774+ case LANG_MARATHI: return "mr_IN";
11775+ case LANG_MONGOLIAN:
11776+ return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
11777+ case LANG_NEPALI:
11778+ switch (sub)
11779+ {
11780+ case SUBLANG_DEFAULT: return "ne_NP";
11781+ case SUBLANG_NEPALI_INDIA: return "ne_IN";
11782+ }
11783+ return "ne";
11784+ case LANG_NORWEGIAN:
11785+ switch (sub)
11786+ {
11787+ case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
11788+ case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
11789+ }
11790+ return "no";
11791+ case LANG_ORIYA: return "or_IN";
11792+ case LANG_OROMO: return "om_ET";
11793+ case LANG_PAPIAMENTU: return "pap_AN";
11794+ case LANG_PASHTO:
11795+ return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
11796+ case LANG_POLISH: return "pl_PL";
11797+ case LANG_PORTUGUESE:
11798+ switch (sub)
11799+ {
11800+ case SUBLANG_PORTUGUESE: return "pt_PT";
11801+ /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
11802+ Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
11803+ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
11804+ }
11805+ return "pt";
11806+ case LANG_PUNJABI:
11807+ switch (sub)
11808+ {
11809+ case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
11810+ case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
11811+ }
11812+ return "pa";
11813+ case LANG_RHAETO_ROMANCE: return "rm_CH";
11814+ case LANG_ROMANIAN:
11815+ switch (sub)
11816+ {
11817+ case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
11818+ case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
11819+ }
11820+ return "ro";
11821+ case LANG_RUSSIAN:
11822+ return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */
11823+ case LANG_SAAMI: /* actually Northern Sami */ return "se_NO";
11824+ case LANG_SANSKRIT: return "sa_IN";
11825+ case LANG_SINDHI:
11826+ switch (sub)
11827+ {
11828+ case SUBLANG_SINDHI_INDIA: return "sd_IN";
11829+ case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
11830+ }
11831+ return "sd";
11832+ case LANG_SINHALESE: return "si_LK";
11833+ case LANG_SLOVAK: return "sk_SK";
11834+ case LANG_SLOVENIAN: return "sl_SI";
11835+ case LANG_SOMALI: return "so_SO";
11836+ case LANG_SORBIAN:
11837+ /* FIXME: Adjust this when such locales appear on Unix. */
11838+ return "wen_DE";
11839+ case LANG_SPANISH:
11840+ switch (sub)
11841+ {
11842+ case SUBLANG_SPANISH: return "es_ES";
11843+ case SUBLANG_SPANISH_MEXICAN: return "es_MX";
11844+ case SUBLANG_SPANISH_MODERN:
11845+ return "es_ES@modern"; /* not seen on Unix */
11846+ case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
11847+ case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
11848+ case SUBLANG_SPANISH_PANAMA: return "es_PA";
11849+ case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
11850+ case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
11851+ case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
11852+ case SUBLANG_SPANISH_PERU: return "es_PE";
11853+ case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
11854+ case SUBLANG_SPANISH_ECUADOR: return "es_EC";
11855+ case SUBLANG_SPANISH_CHILE: return "es_CL";
11856+ case SUBLANG_SPANISH_URUGUAY: return "es_UY";
11857+ case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
11858+ case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
11859+ case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
11860+ case SUBLANG_SPANISH_HONDURAS: return "es_HN";
11861+ case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
11862+ case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
11863+ }
11864+ return "es";
11865+ case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
11866+ case LANG_SWAHILI: return "sw_KE";
11867+ case LANG_SWEDISH:
11868+ switch (sub)
11869+ {
11870+ case SUBLANG_DEFAULT: return "sv_SE";
11871+ case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
11872+ }
11873+ return "sv";
11874+ case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */
11875+ case LANG_TAGALOG: return "tl_PH";
11876+ case LANG_TAJIK: return "tg_TJ";
11877+ case LANG_TAMAZIGHT:
11878+ switch (sub)
11879+ {
11880+ /* FIXME: Adjust this when Tamazight locales appear on Unix. */
11881+ case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
11882+ case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin";
11883+ }
11884+ return "ber_MA";
11885+ case LANG_TAMIL:
11886+ return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
11887+ case LANG_TATAR: return "tt_RU";
11888+ case LANG_TELUGU: return "te_IN";
11889+ case LANG_THAI: return "th_TH";
11890+ case LANG_TIBETAN: return "bo_CN";
11891+ case LANG_TIGRINYA:
11892+ switch (sub)
11893+ {
11894+ case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET";
11895+ case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
11896+ }
11897+ return "ti";
11898+ case LANG_TSONGA: return "ts_ZA";
11899+ case LANG_TSWANA: return "tn_BW";
11900+ case LANG_TURKISH: return "tr_TR";
11901+ case LANG_TURKMEN: return "tk_TM";
11902+ case LANG_UKRAINIAN: return "uk_UA";
11903+ case LANG_URDU:
11904+ switch (sub)
11905+ {
11906+ case SUBLANG_URDU_PAKISTAN: return "ur_PK";
11907+ case SUBLANG_URDU_INDIA: return "ur_IN";
11908+ }
11909+ return "ur";
11910+ case LANG_UZBEK:
11911+ switch (sub)
11912+ {
11913+ case SUBLANG_UZBEK_LATIN: return "uz_UZ";
11914+ case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
11915+ }
11916+ return "uz";
11917+ case LANG_VENDA: return "ve_ZA";
11918+ case LANG_VIETNAMESE: return "vi_VN";
11919+ case LANG_WELSH: return "cy_GB";
11920+ case LANG_XHOSA: return "xh_ZA";
11921+ case LANG_YI: return "sit_CN";
11922+ case LANG_YIDDISH: return "yi_IL";
11923+ case LANG_YORUBA: return "yo_NG";
11924+ case LANG_ZULU: return "zu_ZA";
11925+ default: return "C";
11926+ }
11927+
11928+#endif
11929+}
11930--- lrzsz-0.12.20.safe/intl/log.c 1969-12-31 19:00:00.000000000 -0500
11931+++ lrzsz-0.12.20/intl/log.c 2004-09-12 14:40:34.515723768 -0400
11932@@ -0,0 +1,98 @@
11933+/* Log file output.
11934+ Copyright (C) 2003 Free Software Foundation, Inc.
11935+
11936+ This program is free software; you can redistribute it and/or modify it
11937+ under the terms of the GNU Library General Public License as published
11938+ by the Free Software Foundation; either version 2, or (at your option)
11939+ any later version.
11940+
11941+ This program is distributed in the hope that it will be useful,
11942+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11943+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11944+ Library General Public License for more details.
11945+
11946+ You should have received a copy of the GNU Library General Public
11947+ License along with this program; if not, write to the Free Software
11948+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
11949+ USA. */
11950+
11951+/* Written by Bruno Haible <bruno@clisp.org>. */
11952+
11953+#ifdef HAVE_CONFIG_H
11954+# include <config.h>
11955+#endif
11956+
11957+#include <stdio.h>
11958+#include <stdlib.h>
11959+#include <string.h>
11960+
11961+/* Print an ASCII string with quotes and escape sequences where needed. */
11962+static void
11963+print_escaped (FILE *stream, const char *str)
11964+{
11965+ putc ('"', stream);
11966+ for (; *str != '\0'; str++)
11967+ if (*str == '\n')
11968+ {
11969+ fputs ("\\n\"", stream);
11970+ if (str[1] == '\0')
11971+ return;
11972+ fputs ("\n\"", stream);
11973+ }
11974+ else
11975+ {
11976+ if (*str == '"' || *str == '\\')
11977+ putc ('\\', stream);
11978+ putc (*str, stream);
11979+ }
11980+ putc ('"', stream);
11981+}
11982+
11983+/* Add to the log file an entry denoting a failed translation. */
11984+void
11985+_nl_log_untranslated (const char *logfilename, const char *domainname,
11986+ const char *msgid1, const char *msgid2, int plural)
11987+{
11988+ static char *last_logfilename = NULL;
11989+ static FILE *last_logfile = NULL;
11990+ FILE *logfile;
11991+
11992+ /* Can we reuse the last opened logfile? */
11993+ if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
11994+ {
11995+ /* Close the last used logfile. */
11996+ if (last_logfilename != NULL)
11997+ {
11998+ if (last_logfile != NULL)
11999+ {
12000+ fclose (last_logfile);
12001+ last_logfile = NULL;
12002+ }
12003+ free (last_logfilename);
12004+ last_logfilename = NULL;
12005+ }
12006+ /* Open the logfile. */
12007+ last_logfilename = (char *) malloc (strlen (logfilename) + 1);
12008+ if (last_logfilename == NULL)
12009+ return;
12010+ strcpy (last_logfilename, logfilename);
12011+ last_logfile = fopen (logfilename, "a");
12012+ if (last_logfile == NULL)
12013+ return;
12014+ }
12015+ logfile = last_logfile;
12016+
12017+ fprintf (logfile, "domain ");
12018+ print_escaped (logfile, domainname);
12019+ fprintf (logfile, "\nmsgid ");
12020+ print_escaped (logfile, msgid1);
12021+ if (plural)
12022+ {
12023+ fprintf (logfile, "\nmsgid_plural ");
12024+ print_escaped (logfile, msgid2);
12025+ fprintf (logfile, "\nmsgstr[0] \"\"\n");
12026+ }
12027+ else
12028+ fprintf (logfile, "\nmsgstr \"\"\n");
12029+ putc ('\n', logfile);
12030+}
12031--- lrzsz-0.12.20.safe/intl/Makefile.in 1998-04-26 09:22:35.000000000 -0400
12032+++ lrzsz-0.12.20/intl/Makefile.in 2004-09-12 14:40:34.521722856 -0400
12033@@ -1,19 +1,20 @@
12034-# Makefile for directory with message catalog handling in GNU NLS Utilities.
12035-# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
12036+# Makefile for directory with message catalog handling library of GNU gettext
12037+# Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
12038 #
12039-# This program is free software; you can redistribute it and/or modify
12040-# it under the terms of the GNU General Public License as published by
12041-# the Free Software Foundation; either version 2, or (at your option)
12042+# This program is free software; you can redistribute it and/or modify it
12043+# under the terms of the GNU Library General Public License as published
12044+# by the Free Software Foundation; either version 2, or (at your option)
12045 # any later version.
12046 #
12047 # This program is distributed in the hope that it will be useful,
12048 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12049-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12050-# GNU General Public License for more details.
12051+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12052+# Library General Public License for more details.
12053 #
12054-# You should have received a copy of the GNU General Public License
12055-# along with this program; if not, write to the Free Software
12056-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
12057+# You should have received a copy of the GNU Library General Public
12058+# License along with this program; if not, write to the Free Software
12059+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12060+# USA.
12061
12062 PACKAGE = @PACKAGE@
12063 VERSION = @VERSION@
12064@@ -23,118 +24,341 @@
12065 srcdir = @srcdir@
12066 top_srcdir = @top_srcdir@
12067 top_builddir = ..
12068-VPATH = @srcdir@
12069+#VPATH = $(srcdir)
12070
12071 prefix = @prefix@
12072 exec_prefix = @exec_prefix@
12073 transform = @program_transform_name@
12074-libdir = $(exec_prefix)/lib
12075-includedir = $(prefix)/include
12076-datadir = $(prefix)/@DATADIRNAME@
12077+libdir = @libdir@
12078+includedir = @includedir@
12079+datadir = @datadir@
12080 localedir = $(datadir)/locale
12081-gnulocaledir = $(prefix)/share/locale
12082-gettextsrcdir = @datadir@/gettext/intl
12083-aliaspath = $(localedir):.
12084+gettextsrcdir = $(datadir)/gettext/intl
12085+aliaspath = $(localedir)
12086 subdir = intl
12087
12088 INSTALL = @INSTALL@
12089 INSTALL_DATA = @INSTALL_DATA@
12090 MKINSTALLDIRS = @MKINSTALLDIRS@
12091+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
12092
12093-l = @l@
12094+l = @INTL_LIBTOOL_SUFFIX_PREFIX@
12095
12096 AR = ar
12097 CC = @CC@
12098 LIBTOOL = @LIBTOOL@
12099 RANLIB = @RANLIB@
12100+YACC = @INTLBISON@ -y -d
12101+YFLAGS = --name-prefix=__gettext
12102
12103-DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
12104--DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
12105+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
12106+-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \
12107+-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
12108+-Dset_relocation_prefix=libintl_set_relocation_prefix \
12109+-Drelocate=libintl_relocate \
12110+-DDEPENDS_ON_LIBICONV=1 @DEFS@
12111 CPPFLAGS = @CPPFLAGS@
12112 CFLAGS = @CFLAGS@
12113 LDFLAGS = @LDFLAGS@
12114+LIBS = @LIBS@
12115
12116 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
12117
12118-HEADERS = $(COMHDRS) libgettext.h loadinfo.h
12119-COMHDRS = gettext.h gettextP.h hash-string.h
12120-SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
12121-COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
12122-finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
12123-explodename.c
12124-OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
12125-finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
12126-explodename.$lo
12127-CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
12128-GETTOBJS = intl-compat.$lo
12129-DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
12130-xopen-msg.sed $(HEADERS) $(SOURCES)
12131+HEADERS = \
12132+ gmo.h \
12133+ gettextP.h \
12134+ hash-string.h \
12135+ loadinfo.h \
12136+ plural-exp.h \
12137+ eval-plural.h \
12138+ localcharset.h \
12139+ relocatable.h \
12140+ xsize.h \
12141+ printf-args.h printf-args.c \
12142+ printf-parse.h wprintf-parse.h printf-parse.c \
12143+ vasnprintf.h vasnwprintf.h vasnprintf.c \
12144+ os2compat.h \
12145+ libgnuintl.h.in
12146+SOURCES = \
12147+ bindtextdom.c \
12148+ dcgettext.c \
12149+ dgettext.c \
12150+ gettext.c \
12151+ finddomain.c \
12152+ loadmsgcat.c \
12153+ localealias.c \
12154+ textdomain.c \
12155+ l10nflist.c \
12156+ explodename.c \
12157+ dcigettext.c \
12158+ dcngettext.c \
12159+ dngettext.c \
12160+ ngettext.c \
12161+ plural.y \
12162+ plural-exp.c \
12163+ localcharset.c \
12164+ relocatable.c \
12165+ localename.c \
12166+ log.c \
12167+ printf.c \
12168+ osdep.c \
12169+ os2compat.c \
12170+ intl-compat.c
12171+OBJECTS = \
12172+ bindtextdom.$lo \
12173+ dcgettext.$lo \
12174+ dgettext.$lo \
12175+ gettext.$lo \
12176+ finddomain.$lo \
12177+ loadmsgcat.$lo \
12178+ localealias.$lo \
12179+ textdomain.$lo \
12180+ l10nflist.$lo \
12181+ explodename.$lo \
12182+ dcigettext.$lo \
12183+ dcngettext.$lo \
12184+ dngettext.$lo \
12185+ ngettext.$lo \
12186+ plural.$lo \
12187+ plural-exp.$lo \
12188+ localcharset.$lo \
12189+ relocatable.$lo \
12190+ localename.$lo \
12191+ log.$lo \
12192+ printf.$lo \
12193+ osdep.$lo \
12194+ intl-compat.$lo
12195+DISTFILES.common = Makefile.in \
12196+config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
12197+DISTFILES.generated = plural.c
12198 DISTFILES.normal = VERSION
12199-DISTFILES.gettext = libintl.glibc intlh.inst.in
12200+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
12201+libgnuintl.h_vms Makefile.vms \
12202+libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
12203+DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
12204+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
12205+
12206+all: all-@USE_INCLUDED_LIBINTL@
12207+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
12208+all-no: all-no-@BUILD_INCLUDED_LIBINTL@
12209+all-no-yes: libgnuintl.$la
12210+all-no-no:
12211+
12212+libintl.a libgnuintl.a: $(OBJECTS)
12213+ rm -f $@
12214+ $(AR) cru $@ $(OBJECTS)
12215+ $(RANLIB) $@
12216+
12217+libintl.la libgnuintl.la: $(OBJECTS)
12218+ $(LIBTOOL) --mode=link \
12219+ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
12220+ $(OBJECTS) @LTLIBICONV@ $(LIBS) -lc \
12221+ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
12222+ -rpath $(libdir) \
12223+ -no-undefined
12224+
12225+# Libtool's library version information for libintl.
12226+# Before making a gettext release, the gettext maintainer must change this
12227+# according to the libtool documentation, section "Library interface versions".
12228+# Maintainers of other packages that include the intl directory must *not*
12229+# change these values.
12230+LTV_CURRENT=7
12231+LTV_REVISION=0
12232+LTV_AGE=4
12233
12234 .SUFFIXES:
12235-.SUFFIXES: .c .o .lo
12236+.SUFFIXES: .c .y .o .lo .sin .sed
12237+
12238 .c.o:
12239 $(COMPILE) $<
12240-.c.lo:
12241- $(LIBTOOL) --mode=compile $(COMPILE) $<
12242
12243-INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
12244+.y.c:
12245+ $(YACC) $(YFLAGS) --output $@ $<
12246+ rm -f $*.h
12247
12248-all: all-@USE_INCLUDED_LIBINTL@
12249+bindtextdom.lo: $(srcdir)/bindtextdom.c
12250+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
12251+dcgettext.lo: $(srcdir)/dcgettext.c
12252+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
12253+dgettext.lo: $(srcdir)/dgettext.c
12254+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
12255+gettext.lo: $(srcdir)/gettext.c
12256+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
12257+finddomain.lo: $(srcdir)/finddomain.c
12258+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
12259+loadmsgcat.lo: $(srcdir)/loadmsgcat.c
12260+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
12261+localealias.lo: $(srcdir)/localealias.c
12262+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
12263+textdomain.lo: $(srcdir)/textdomain.c
12264+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
12265+l10nflist.lo: $(srcdir)/l10nflist.c
12266+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
12267+explodename.lo: $(srcdir)/explodename.c
12268+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
12269+dcigettext.lo: $(srcdir)/dcigettext.c
12270+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
12271+dcngettext.lo: $(srcdir)/dcngettext.c
12272+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
12273+dngettext.lo: $(srcdir)/dngettext.c
12274+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
12275+ngettext.lo: $(srcdir)/ngettext.c
12276+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
12277+plural.lo: $(srcdir)/plural.c
12278+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
12279+plural-exp.lo: $(srcdir)/plural-exp.c
12280+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
12281+localcharset.lo: $(srcdir)/localcharset.c
12282+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
12283+relocatable.lo: $(srcdir)/relocatable.c
12284+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
12285+localename.lo: $(srcdir)/localename.c
12286+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
12287+log.lo: $(srcdir)/log.c
12288+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
12289+printf.lo: $(srcdir)/printf.c
12290+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c
12291+osdep.lo: $(srcdir)/osdep.c
12292+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
12293+intl-compat.lo: $(srcdir)/intl-compat.c
12294+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
12295
12296-all-yes: libintl.$la intlh.inst
12297-all-no:
12298+ref-add.sed: $(srcdir)/ref-add.sin
12299+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
12300+ mv t-ref-add.sed ref-add.sed
12301+ref-del.sed: $(srcdir)/ref-del.sin
12302+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
12303+ mv t-ref-del.sed ref-del.sed
12304
12305-libintl.a: $(OBJECTS)
12306- rm -f $@
12307- $(AR) cru $@ $(OBJECTS)
12308- $(RANLIB) $@
12309+INCLUDES = -I. -I$(srcdir) -I..
12310
12311-libintl.la: $(OBJECTS)
12312- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
12313- -version-info 1:0 -rpath $(libdir)
12314+libgnuintl.h: $(srcdir)/libgnuintl.h.in
12315+ sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
12316+ -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
12317+ -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
12318+ -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
12319+ < $(srcdir)/libgnuintl.h.in > libgnuintl.h
12320
12321-../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
12322- cd ../po && $(MAKE) cat-id-tbl.$lo
12323+libintl.h: libgnuintl.h
12324+ cp libgnuintl.h libintl.h
12325
12326-check: all
12327+charset.alias: $(srcdir)/config.charset
12328+ $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
12329+ mv t-$@ $@
12330
12331-# This installation goal is only used in GNU gettext. Packages which
12332-# only use the library should use install instead.
12333+check: all
12334
12335 # We must not install the libintl.h/libintl.a files if we are on a
12336-# system which has the gettext() function in its C library or in a
12337-# separate library or use the catgets interface. A special case is
12338-# where configure found a previously installed GNU gettext library.
12339+# system which has the GNU gettext() function in its C library or in a
12340+# separate library.
12341 # If you want to use the one which comes with this version of the
12342 # package, you have to use `configure --with-included-gettext'.
12343 install: install-exec install-data
12344 install-exec: all
12345- if test "$(PACKAGE)" = "gettext" \
12346- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
12347- if test -r $(MKINSTALLDIRS); then \
12348- $(MKINSTALLDIRS) $(libdir) $(includedir); \
12349- else \
12350- $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
12351+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
12352+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
12353+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
12354+ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
12355+ $(LIBTOOL) --mode=install \
12356+ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
12357+ if test "@RELOCATABLE@" = yes; then \
12358+ dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
12359+ if test -n "$$dependencies"; then \
12360+ rm -f $(DESTDIR)$(libdir)/libintl.la; \
12361+ fi; \
12362 fi; \
12363- $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
12364- $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
12365 else \
12366 : ; \
12367 fi
12368-install-data: all
12369- if test "$(PACKAGE)" = "gettext"; then \
12370- if test -r $(MKINSTALLDIRS); then \
12371- $(MKINSTALLDIRS) $(gettextsrcdir); \
12372+ if test "$(PACKAGE)" = "gettext-tools" \
12373+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
12374+ $(mkinstalldirs) $(DESTDIR)$(libdir); \
12375+ $(LIBTOOL) --mode=install \
12376+ $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
12377+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
12378+ $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
12379+ $(LIBTOOL) --mode=uninstall \
12380+ rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
12381+ else \
12382+ : ; \
12383+ fi
12384+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
12385+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
12386+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
12387+ dest=$(DESTDIR)$(libdir)/charset.alias; \
12388+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
12389+ orig=$(DESTDIR)$(libdir)/charset.alias; \
12390+ sed -f ref-add.sed $$orig > $$temp; \
12391+ $(INSTALL_DATA) $$temp $$dest; \
12392+ rm -f $$temp; \
12393 else \
12394- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
12395+ if test @GLIBC21@ = no; then \
12396+ orig=charset.alias; \
12397+ sed -f ref-add.sed $$orig > $$temp; \
12398+ $(INSTALL_DATA) $$temp $$dest; \
12399+ rm -f $$temp; \
12400+ fi; \
12401 fi; \
12402- $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
12403- dists="$(DISTFILES.common)"; \
12404+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
12405+ test -f $(DESTDIR)$(localedir)/locale.alias \
12406+ && orig=$(DESTDIR)$(localedir)/locale.alias \
12407+ || orig=$(srcdir)/locale.alias; \
12408+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
12409+ dest=$(DESTDIR)$(localedir)/locale.alias; \
12410+ sed -f ref-add.sed $$orig > $$temp; \
12411+ $(INSTALL_DATA) $$temp $$dest; \
12412+ rm -f $$temp; \
12413+ else \
12414+ : ; \
12415+ fi
12416+install-data: all
12417+ if test "$(PACKAGE)" = "gettext-tools"; then \
12418+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
12419+ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
12420+ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
12421+ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
12422 for file in $$dists; do \
12423- $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
12424+ $(INSTALL_DATA) $(srcdir)/$$file \
12425+ $(DESTDIR)$(gettextsrcdir)/$$file; \
12426 done; \
12427+ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
12428+ dists="$(DISTFILES.generated)"; \
12429+ for file in $$dists; do \
12430+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
12431+ $(INSTALL_DATA) $$dir/$$file \
12432+ $(DESTDIR)$(gettextsrcdir)/$$file; \
12433+ done; \
12434+ dists="$(DISTFILES.obsolete)"; \
12435+ for file in $$dists; do \
12436+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
12437+ done; \
12438+ else \
12439+ : ; \
12440+ fi
12441+
12442+install-strip: install
12443+
12444+installdirs:
12445+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
12446+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
12447+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
12448+ else \
12449+ : ; \
12450+ fi
12451+ if test "$(PACKAGE)" = "gettext-tools" \
12452+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
12453+ $(mkinstalldirs) $(DESTDIR)$(libdir); \
12454+ else \
12455+ : ; \
12456+ fi
12457+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
12458+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
12459+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
12460+ else \
12461+ : ; \
12462+ fi
12463+ if test "$(PACKAGE)" = "gettext-tools"; then \
12464+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
12465 else \
12466 : ; \
12467 fi
12468@@ -143,22 +367,76 @@
12469 installcheck:
12470
12471 uninstall:
12472- dists="$(DISTFILES.common)"; \
12473- for file in $$dists; do \
12474- rm -f $(gettextsrcdir)/$$file; \
12475- done
12476+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
12477+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
12478+ rm -f $(DESTDIR)$(includedir)/libintl.h; \
12479+ $(LIBTOOL) --mode=uninstall \
12480+ rm -f $(DESTDIR)$(libdir)/libintl.$la; \
12481+ else \
12482+ : ; \
12483+ fi
12484+ if test "$(PACKAGE)" = "gettext-tools" \
12485+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
12486+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
12487+ else \
12488+ : ; \
12489+ fi
12490+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
12491+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
12492+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
12493+ dest=$(DESTDIR)$(libdir)/charset.alias; \
12494+ sed -f ref-del.sed $$dest > $$temp; \
12495+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
12496+ rm -f $$dest; \
12497+ else \
12498+ $(INSTALL_DATA) $$temp $$dest; \
12499+ fi; \
12500+ rm -f $$temp; \
12501+ fi; \
12502+ if test -f $(DESTDIR)$(localedir)/locale.alias; then \
12503+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
12504+ dest=$(DESTDIR)$(localedir)/locale.alias; \
12505+ sed -f ref-del.sed $$dest > $$temp; \
12506+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
12507+ rm -f $$dest; \
12508+ else \
12509+ $(INSTALL_DATA) $$temp $$dest; \
12510+ fi; \
12511+ rm -f $$temp; \
12512+ fi; \
12513+ else \
12514+ : ; \
12515+ fi
12516+ if test "$(PACKAGE)" = "gettext-tools"; then \
12517+ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
12518+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
12519+ done; \
12520+ else \
12521+ : ; \
12522+ fi
12523
12524-info dvi:
12525+info dvi ps pdf html:
12526
12527-$(OBJECTS): ../config.h libgettext.h
12528-bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
12529-dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
12530+$(OBJECTS): ../config.h libgnuintl.h
12531+bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
12532+dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
12533+explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
12534+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
12535+dcigettext.$lo: $(srcdir)/eval-plural.h
12536+localcharset.$lo: $(srcdir)/localcharset.h
12537+localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
12538+printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c
12539
12540 tags: TAGS
12541
12542 TAGS: $(HEADERS) $(SOURCES)
12543 here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
12544
12545+ctags: CTAGS
12546+
12547+CTAGS: $(HEADERS) $(SOURCES)
12548+ here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
12549+
12550 id: ID
12551
12552 ID: $(HEADERS) $(SOURCES)
12553@@ -166,12 +444,19 @@
12554
12555
12556 mostlyclean:
12557- rm -f *.a *.o *.lo core core.*
12558+ rm -f *.a *.la *.o *.obj *.lo core core.*
12559+ rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
12560+ rm -f -r .libs _libs
12561
12562 clean: mostlyclean
12563
12564 distclean: clean
12565- rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h
12566+ rm -f Makefile ID TAGS
12567+ if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
12568+ rm -f ChangeLog.inst $(DISTFILES.normal); \
12569+ else \
12570+ : ; \
12571+ fi
12572
12573 maintainer-clean: distclean
12574 @echo "This command is intended for maintainers to use;"
12575@@ -181,33 +466,27 @@
12576 # GNU gettext needs not contain the file `VERSION' but contains some
12577 # other files which should not be distributed in other packages.
12578 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
12579-dist distdir: Makefile $(DISTFILES)
12580- if test "$(PACKAGE)" = gettext; then \
12581- additional="$(DISTFILES.gettext)"; \
12582+dist distdir: Makefile
12583+ if test "$(PACKAGE)" = "gettext-tools"; then \
12584+ : ; \
12585 else \
12586- additional="$(DISTFILES.normal)"; \
12587- fi; \
12588- for file in $(DISTFILES.common) $$additional; do \
12589- ln $(srcdir)/$$file $(distdir) 2> /dev/null \
12590- || cp -p $(srcdir)/$$file $(distdir); \
12591- done
12592-
12593-dist-libc:
12594- tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
12595-
12596-Makefile: Makefile.in ../config.status
12597- cd .. \
12598- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
12599+ if test "$(PACKAGE)" = "gettext-runtime"; then \
12600+ additional="$(DISTFILES.gettext)"; \
12601+ else \
12602+ additional="$(DISTFILES.normal)"; \
12603+ fi; \
12604+ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
12605+ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
12606+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
12607+ cp -p $$dir/$$file $(distdir); \
12608+ done; \
12609+ fi
12610
12611-# The dependency for intlh.inst is different in gettext and all other
12612-# packages. Because we cannot you GNU make features we have to solve
12613-# the problem while rewriting Makefile.in.
12614-@GT_YES@intlh.inst: intlh.inst.in ../config.status
12615-@GT_YES@ cd .. \
12616-@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
12617-@GT_YES@ $(SHELL) ./config.status
12618-@GT_NO@.PHONY: intlh.inst
12619-@GT_NO@intlh.inst:
12620+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
12621+ cd $(top_builddir) && $(SHELL) ./config.status
12622+# This would be more efficient, but doesn't work any more with autoconf-2.57,
12623+# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
12624+# cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
12625
12626 # Tell versions [3.59,3.63) of GNU make not to export all variables.
12627 # Otherwise a system limit (for SysV at least) may be exceeded.
12628--- lrzsz-0.12.20.safe/intl/ngettext.c 1969-12-31 19:00:00.000000000 -0500
12629+++ lrzsz-0.12.20/intl/ngettext.c 2004-09-12 14:40:34.533721032 -0400
12630@@ -0,0 +1,65 @@
12631+/* Implementation of ngettext(3) function.
12632+ Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
12633+
12634+ This program is free software; you can redistribute it and/or modify it
12635+ under the terms of the GNU Library General Public License as published
12636+ by the Free Software Foundation; either version 2, or (at your option)
12637+ any later version.
12638+
12639+ This program is distributed in the hope that it will be useful,
12640+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12641+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12642+ Library General Public License for more details.
12643+
12644+ You should have received a copy of the GNU Library General Public
12645+ License along with this program; if not, write to the Free Software
12646+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12647+ USA. */
12648+
12649+#ifdef HAVE_CONFIG_H
12650+# include <config.h>
12651+#endif
12652+
12653+#ifdef _LIBC
12654+# define __need_NULL
12655+# include <stddef.h>
12656+#else
12657+# include <stdlib.h> /* Just for NULL. */
12658+#endif
12659+
12660+#include "gettextP.h"
12661+#ifdef _LIBC
12662+# include <libintl.h>
12663+#else
12664+# include "libgnuintl.h"
12665+#endif
12666+
12667+#include <locale.h>
12668+
12669+/* @@ end of prolog @@ */
12670+
12671+/* Names for the libintl functions are a problem. They must not clash
12672+ with existing names and they should follow ANSI C. But this source
12673+ code is also used in GNU C Library where the names have a __
12674+ prefix. So we have to make a difference here. */
12675+#ifdef _LIBC
12676+# define NGETTEXT __ngettext
12677+# define DCNGETTEXT __dcngettext
12678+#else
12679+# define NGETTEXT libintl_ngettext
12680+# define DCNGETTEXT libintl_dcngettext
12681+#endif
12682+
12683+/* Look up MSGID in the current default message catalog for the current
12684+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
12685+ text). */
12686+char *
12687+NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n)
12688+{
12689+ return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
12690+}
12691+
12692+#ifdef _LIBC
12693+/* Alias for function name in GNU C Library. */
12694+weak_alias (__ngettext, ngettext);
12695+#endif
12696--- lrzsz-0.12.20.safe/intl/os2compat.c 1969-12-31 19:00:00.000000000 -0500
12697+++ lrzsz-0.12.20/intl/os2compat.c 2004-09-12 14:40:34.539720120 -0400
12698@@ -0,0 +1,98 @@
12699+/* OS/2 compatibility functions.
12700+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
12701+
12702+ This program is free software; you can redistribute it and/or modify it
12703+ under the terms of the GNU Library General Public License as published
12704+ by the Free Software Foundation; either version 2, or (at your option)
12705+ any later version.
12706+
12707+ This program is distributed in the hope that it will be useful,
12708+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12709+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12710+ Library General Public License for more details.
12711+
12712+ You should have received a copy of the GNU Library General Public
12713+ License along with this program; if not, write to the Free Software
12714+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12715+ USA. */
12716+
12717+#define OS2_AWARE
12718+#ifdef HAVE_CONFIG_H
12719+#include <config.h>
12720+#endif
12721+
12722+#include <stdlib.h>
12723+#include <string.h>
12724+#include <sys/param.h>
12725+
12726+/* A version of getenv() that works from DLLs */
12727+extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
12728+
12729+char *
12730+_nl_getenv (const char *name)
12731+{
12732+ unsigned char *value;
12733+ if (DosScanEnv (name, &value))
12734+ return NULL;
12735+ else
12736+ return value;
12737+}
12738+
12739+/* A fixed size buffer. */
12740+char libintl_nl_default_dirname[MAXPATHLEN+1];
12741+
12742+char *_nlos2_libdir = NULL;
12743+char *_nlos2_localealiaspath = NULL;
12744+char *_nlos2_localedir = NULL;
12745+
12746+static __attribute__((constructor)) void
12747+nlos2_initialize ()
12748+{
12749+ char *root = getenv ("UNIXROOT");
12750+ char *gnulocaledir = getenv ("GNULOCALEDIR");
12751+
12752+ _nlos2_libdir = gnulocaledir;
12753+ if (!_nlos2_libdir)
12754+ {
12755+ if (root)
12756+ {
12757+ size_t sl = strlen (root);
12758+ _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
12759+ memcpy (_nlos2_libdir, root, sl);
12760+ memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
12761+ }
12762+ else
12763+ _nlos2_libdir = LIBDIR;
12764+ }
12765+
12766+ _nlos2_localealiaspath = gnulocaledir;
12767+ if (!_nlos2_localealiaspath)
12768+ {
12769+ if (root)
12770+ {
12771+ size_t sl = strlen (root);
12772+ _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
12773+ memcpy (_nlos2_localealiaspath, root, sl);
12774+ memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
12775+ }
12776+ else
12777+ _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
12778+ }
12779+
12780+ _nlos2_localedir = gnulocaledir;
12781+ if (!_nlos2_localedir)
12782+ {
12783+ if (root)
12784+ {
12785+ size_t sl = strlen (root);
12786+ _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
12787+ memcpy (_nlos2_localedir, root, sl);
12788+ memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
12789+ }
12790+ else
12791+ _nlos2_localedir = LOCALEDIR;
12792+ }
12793+
12794+ if (strlen (_nlos2_localedir) <= MAXPATHLEN)
12795+ strcpy (libintl_nl_default_dirname, _nlos2_localedir);
12796+}
12797--- lrzsz-0.12.20.safe/intl/os2compat.h 1969-12-31 19:00:00.000000000 -0500
12798+++ lrzsz-0.12.20/intl/os2compat.h 2004-09-12 14:40:34.544719360 -0400
12799@@ -0,0 +1,46 @@
12800+/* OS/2 compatibility defines.
12801+ This file is intended to be included from config.h
12802+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
12803+
12804+ This program is free software; you can redistribute it and/or modify it
12805+ under the terms of the GNU Library General Public License as published
12806+ by the Free Software Foundation; either version 2, or (at your option)
12807+ any later version.
12808+
12809+ This program is distributed in the hope that it will be useful,
12810+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12811+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12812+ Library General Public License for more details.
12813+
12814+ You should have received a copy of the GNU Library General Public
12815+ License along with this program; if not, write to the Free Software
12816+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12817+ USA. */
12818+
12819+/* When included from os2compat.h we need all the original definitions */
12820+#ifndef OS2_AWARE
12821+
12822+#undef LIBDIR
12823+#define LIBDIR _nlos2_libdir
12824+extern char *_nlos2_libdir;
12825+
12826+#undef LOCALEDIR
12827+#define LOCALEDIR _nlos2_localedir
12828+extern char *_nlos2_localedir;
12829+
12830+#undef LOCALE_ALIAS_PATH
12831+#define LOCALE_ALIAS_PATH _nlos2_localealiaspath
12832+extern char *_nlos2_localealiaspath;
12833+
12834+#endif
12835+
12836+#undef HAVE_STRCASECMP
12837+#define HAVE_STRCASECMP 1
12838+#define strcasecmp stricmp
12839+#define strncasecmp strnicmp
12840+
12841+/* We have our own getenv() which works even if library is compiled as DLL */
12842+#define getenv _nl_getenv
12843+
12844+/* Older versions of gettext used -1 as the value of LC_MESSAGES */
12845+#define LC_MESSAGES_COMPAT (-1)
12846--- lrzsz-0.12.20.safe/intl/osdep.c 1969-12-31 19:00:00.000000000 -0500
12847+++ lrzsz-0.12.20/intl/osdep.c 2004-09-12 14:40:34.550718448 -0400
12848@@ -0,0 +1,24 @@
12849+/* OS dependent parts of libintl.
12850+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
12851+
12852+ This program is free software; you can redistribute it and/or modify it
12853+ under the terms of the GNU Library General Public License as published
12854+ by the Free Software Foundation; either version 2, or (at your option)
12855+ any later version.
12856+
12857+ This program is distributed in the hope that it will be useful,
12858+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12859+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12860+ Library General Public License for more details.
12861+
12862+ You should have received a copy of the GNU Library General Public
12863+ License along with this program; if not, write to the Free Software
12864+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12865+ USA. */
12866+
12867+#if defined __EMX__
12868+# include "os2compat.c"
12869+#else
12870+/* Avoid AIX compiler warning. */
12871+typedef int dummy;
12872+#endif
12873--- lrzsz-0.12.20.safe/intl/plural.c 1969-12-31 19:00:00.000000000 -0500
12874+++ lrzsz-0.12.20/intl/plural.c 2004-09-12 14:40:36.571411256 -0400
12875@@ -0,0 +1,1490 @@
12876+/* A Bison parser, made from plural.y
12877+ by GNU bison 1.35. */
12878+
12879+#define YYBISON 1 /* Identify Bison output. */
12880+
12881+#define yyparse __gettextparse
12882+#define yylex __gettextlex
12883+#define yyerror __gettexterror
12884+#define yylval __gettextlval
12885+#define yychar __gettextchar
12886+#define yydebug __gettextdebug
12887+#define yynerrs __gettextnerrs
12888+# define EQUOP2 257
12889+# define CMPOP2 258
12890+# define ADDOP2 259
12891+# define MULOP2 260
12892+# define NUMBER 261
12893+
12894+#line 1 "plural.y"
12895+
12896+/* Expression parsing for plural form selection.
12897+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
12898+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
12899+
12900+ This program is free software; you can redistribute it and/or modify it
12901+ under the terms of the GNU Library General Public License as published
12902+ by the Free Software Foundation; either version 2, or (at your option)
12903+ any later version.
12904+
12905+ This program is distributed in the hope that it will be useful,
12906+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12907+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12908+ Library General Public License for more details.
12909+
12910+ You should have received a copy of the GNU Library General Public
12911+ License along with this program; if not, write to the Free Software
12912+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12913+ USA. */
12914+
12915+/* The bison generated parser uses alloca. AIX 3 forces us to put this
12916+ declaration at the beginning of the file. The declaration in bison's
12917+ skeleton file comes too late. This must come before <config.h>
12918+ because <config.h> may include arbitrary system headers. */
12919+#if defined _AIX && !defined __GNUC__
12920+ #pragma alloca
12921+#endif
12922+
12923+#ifdef HAVE_CONFIG_H
12924+# include <config.h>
12925+#endif
12926+
12927+#include <stddef.h>
12928+#include <stdlib.h>
12929+#include "plural-exp.h"
12930+
12931+/* The main function generated by the parser is called __gettextparse,
12932+ but we want it to be called PLURAL_PARSE. */
12933+#ifndef _LIBC
12934+# define __gettextparse PLURAL_PARSE
12935+#endif
12936+
12937+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
12938+#define YYPARSE_PARAM arg
12939+
12940+#line 49 "plural.y"
12941+#ifndef YYSTYPE
12942+typedef union {
12943+ unsigned long int num;
12944+ enum operator op;
12945+ struct expression *exp;
12946+} yystype;
12947+# define YYSTYPE yystype
12948+# define YYSTYPE_IS_TRIVIAL 1
12949+#endif
12950+#line 55 "plural.y"
12951+
12952+/* Prototypes for local functions. */
12953+static int yylex (YYSTYPE *lval, const char **pexp);
12954+static void yyerror (const char *str);
12955+
12956+/* Allocation of expressions. */
12957+
12958+static struct expression *
12959+new_exp (int nargs, enum operator op, struct expression * const *args)
12960+{
12961+ int i;
12962+ struct expression *newp;
12963+
12964+ /* If any of the argument could not be malloc'ed, just return NULL. */
12965+ for (i = nargs - 1; i >= 0; i--)
12966+ if (args[i] == NULL)
12967+ goto fail;
12968+
12969+ /* Allocate a new expression. */
12970+ newp = (struct expression *) malloc (sizeof (*newp));
12971+ if (newp != NULL)
12972+ {
12973+ newp->nargs = nargs;
12974+ newp->operation = op;
12975+ for (i = nargs - 1; i >= 0; i--)
12976+ newp->val.args[i] = args[i];
12977+ return newp;
12978+ }
12979+
12980+ fail:
12981+ for (i = nargs - 1; i >= 0; i--)
12982+ FREE_EXPRESSION (args[i]);
12983+
12984+ return NULL;
12985+}
12986+
12987+static inline struct expression *
12988+new_exp_0 (enum operator op)
12989+{
12990+ return new_exp (0, op, NULL);
12991+}
12992+
12993+static inline struct expression *
12994+new_exp_1 (enum operator op, struct expression *right)
12995+{
12996+ struct expression *args[1];
12997+
12998+ args[0] = right;
12999+ return new_exp (1, op, args);
13000+}
13001+
13002+static struct expression *
13003+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
13004+{
13005+ struct expression *args[2];
13006+
13007+ args[0] = left;
13008+ args[1] = right;
13009+ return new_exp (2, op, args);
13010+}
13011+
13012+static inline struct expression *
13013+new_exp_3 (enum operator op, struct expression *bexp,
13014+ struct expression *tbranch, struct expression *fbranch)
13015+{
13016+ struct expression *args[3];
13017+
13018+ args[0] = bexp;
13019+ args[1] = tbranch;
13020+ args[2] = fbranch;
13021+ return new_exp (3, op, args);
13022+}
13023+
13024+#ifndef YYDEBUG
13025+# define YYDEBUG 0
13026+#endif
13027+
13028+
13029+
13030+#define YYFINAL 27
13031+#define YYFLAG -32768
13032+#define YYNTBASE 16
13033+
13034+/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
13035+#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
13036+
13037+/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
13038+static const char yytranslate[] =
13039+{
13040+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13041+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13042+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13043+ 2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
13044+ 14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
13045+ 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
13046+ 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
13047+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13048+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13049+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13050+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13051+ 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13052+ 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
13053+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13054+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13055+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13056+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13057+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13058+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13059+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13060+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13061+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13062+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13063+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13064+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13065+ 2, 2, 2, 2, 2, 2, 1, 6, 7, 8,
13066+ 9, 11
13067+};
13068+
13069+#if YYDEBUG
13070+static const short yyprhs[] =
13071+{
13072+ 0, 0, 2, 8, 12, 16, 20, 24, 28, 32,
13073+ 35, 37, 39
13074+};
13075+static const short yyrhs[] =
13076+{
13077+ 17, 0, 17, 3, 17, 12, 17, 0, 17, 4,
13078+ 17, 0, 17, 5, 17, 0, 17, 6, 17, 0,
13079+ 17, 7, 17, 0, 17, 8, 17, 0, 17, 9,
13080+ 17, 0, 10, 17, 0, 13, 0, 11, 0, 14,
13081+ 17, 15, 0
13082+};
13083+
13084+#endif
13085+
13086+#if YYDEBUG
13087+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
13088+static const short yyrline[] =
13089+{
13090+ 0, 150, 158, 162, 166, 170, 174, 178, 182, 186,
13091+ 190, 194, 199
13092+};
13093+#endif
13094+
13095+
13096+#if (YYDEBUG) || defined YYERROR_VERBOSE
13097+
13098+/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
13099+static const char *const yytname[] =
13100+{
13101+ "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
13102+ "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
13103+ "start", "exp", 0
13104+};
13105+#endif
13106+
13107+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
13108+static const short yyr1[] =
13109+{
13110+ 0, 16, 17, 17, 17, 17, 17, 17, 17, 17,
13111+ 17, 17, 17
13112+};
13113+
13114+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
13115+static const short yyr2[] =
13116+{
13117+ 0, 1, 5, 3, 3, 3, 3, 3, 3, 2,
13118+ 1, 1, 3
13119+};
13120+
13121+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
13122+ doesn't specify something else to do. Zero means the default is an
13123+ error. */
13124+static const short yydefact[] =
13125+{
13126+ 0, 0, 11, 10, 0, 1, 9, 0, 0, 0,
13127+ 0, 0, 0, 0, 0, 12, 0, 3, 4, 5,
13128+ 6, 7, 8, 0, 2, 0, 0, 0
13129+};
13130+
13131+static const short yydefgoto[] =
13132+{
13133+ 25, 5
13134+};
13135+
13136+static const short yypact[] =
13137+{
13138+ -9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9,
13139+ -9, -9, -9, -9, -9,-32768, 24, 39, 43, 16,
13140+ 26, -3,-32768, -9, 34, 21, 53,-32768
13141+};
13142+
13143+static const short yypgoto[] =
13144+{
13145+ -32768, -1
13146+};
13147+
13148+
13149+#define YYLAST 53
13150+
13151+
13152+static const short yytable[] =
13153+{
13154+ 6, 1, 2, 7, 3, 4, 14, 16, 17, 18,
13155+ 19, 20, 21, 22, 8, 9, 10, 11, 12, 13,
13156+ 14, 26, 24, 12, 13, 14, 15, 8, 9, 10,
13157+ 11, 12, 13, 14, 13, 14, 23, 8, 9, 10,
13158+ 11, 12, 13, 14, 10, 11, 12, 13, 14, 11,
13159+ 12, 13, 14, 27
13160+};
13161+
13162+static const short yycheck[] =
13163+{
13164+ 1, 10, 11, 4, 13, 14, 9, 8, 9, 10,
13165+ 11, 12, 13, 14, 3, 4, 5, 6, 7, 8,
13166+ 9, 0, 23, 7, 8, 9, 15, 3, 4, 5,
13167+ 6, 7, 8, 9, 8, 9, 12, 3, 4, 5,
13168+ 6, 7, 8, 9, 5, 6, 7, 8, 9, 6,
13169+ 7, 8, 9, 0
13170+};
13171+#define YYPURE 1
13172+
13173+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
13174+#line 3 "/usr/local/share/bison/bison.simple"
13175+
13176+/* Skeleton output parser for bison,
13177+
13178+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
13179+ Foundation, Inc.
13180+
13181+ This program is free software; you can redistribute it and/or modify
13182+ it under the terms of the GNU General Public License as published by
13183+ the Free Software Foundation; either version 2, or (at your option)
13184+ any later version.
13185+
13186+ This program is distributed in the hope that it will be useful,
13187+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13188+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13189+ GNU General Public License for more details.
13190+
13191+ You should have received a copy of the GNU General Public License
13192+ along with this program; if not, write to the Free Software
13193+ Foundation, Inc., 59 Temple Place - Suite 330,
13194+ Boston, MA 02111-1307, USA. */
13195+
13196+/* As a special exception, when this file is copied by Bison into a
13197+ Bison output file, you may use that output file without restriction.
13198+ This special exception was added by the Free Software Foundation
13199+ in version 1.24 of Bison. */
13200+
13201+/* This is the parser code that is written into each bison parser when
13202+ the %semantic_parser declaration is not specified in the grammar.
13203+ It was written by Richard Stallman by simplifying the hairy parser
13204+ used when %semantic_parser is specified. */
13205+
13206+/* All symbols defined below should begin with yy or YY, to avoid
13207+ infringing on user name space. This should be done even for local
13208+ variables, as they might otherwise be expanded by user macros.
13209+ There are some unavoidable exceptions within include files to
13210+ define necessary library symbols; they are noted "INFRINGES ON
13211+ USER NAME SPACE" below. */
13212+
13213+#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
13214+
13215+/* The parser invokes alloca or malloc; define the necessary symbols. */
13216+
13217+# if YYSTACK_USE_ALLOCA
13218+# define YYSTACK_ALLOC alloca
13219+# else
13220+# ifndef YYSTACK_USE_ALLOCA
13221+# if defined (alloca) || defined (_ALLOCA_H)
13222+# define YYSTACK_ALLOC alloca
13223+# else
13224+# ifdef __GNUC__
13225+# define YYSTACK_ALLOC __builtin_alloca
13226+# endif
13227+# endif
13228+# endif
13229+# endif
13230+
13231+# ifdef YYSTACK_ALLOC
13232+ /* Pacify GCC's `empty if-body' warning. */
13233+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
13234+# else
13235+# if defined (__STDC__) || defined (__cplusplus)
13236+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
13237+# define YYSIZE_T size_t
13238+# endif
13239+# define YYSTACK_ALLOC malloc
13240+# define YYSTACK_FREE free
13241+# endif
13242+#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
13243+
13244+
13245+#if (! defined (yyoverflow) \
13246+ && (! defined (__cplusplus) \
13247+ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
13248+
13249+/* A type that is properly aligned for any stack member. */
13250+union yyalloc
13251+{
13252+ short yyss;
13253+ YYSTYPE yyvs;
13254+# if YYLSP_NEEDED
13255+ YYLTYPE yyls;
13256+# endif
13257+};
13258+
13259+/* The size of the maximum gap between one aligned stack and the next. */
13260+# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
13261+
13262+/* The size of an array large to enough to hold all stacks, each with
13263+ N elements. */
13264+# if YYLSP_NEEDED
13265+# define YYSTACK_BYTES(N) \
13266+ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
13267+ + 2 * YYSTACK_GAP_MAX)
13268+# else
13269+# define YYSTACK_BYTES(N) \
13270+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
13271+ + YYSTACK_GAP_MAX)
13272+# endif
13273+
13274+/* Copy COUNT objects from FROM to TO. The source and destination do
13275+ not overlap. */
13276+# ifndef YYCOPY
13277+# if 1 < __GNUC__
13278+# define YYCOPY(To, From, Count) \
13279+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
13280+# else
13281+# define YYCOPY(To, From, Count) \
13282+ do \
13283+ { \
13284+ register YYSIZE_T yyi; \
13285+ for (yyi = 0; yyi < (Count); yyi++) \
13286+ (To)[yyi] = (From)[yyi]; \
13287+ } \
13288+ while (0)
13289+# endif
13290+# endif
13291+
13292+/* Relocate STACK from its old location to the new one. The
13293+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
13294+ elements in the stack, and YYPTR gives the new location of the
13295+ stack. Advance YYPTR to a properly aligned location for the next
13296+ stack. */
13297+# define YYSTACK_RELOCATE(Stack) \
13298+ do \
13299+ { \
13300+ YYSIZE_T yynewbytes; \
13301+ YYCOPY (&yyptr->Stack, Stack, yysize); \
13302+ Stack = &yyptr->Stack; \
13303+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
13304+ yyptr += yynewbytes / sizeof (*yyptr); \
13305+ } \
13306+ while (0)
13307+
13308+#endif
13309+
13310+
13311+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
13312+# define YYSIZE_T __SIZE_TYPE__
13313+#endif
13314+#if ! defined (YYSIZE_T) && defined (size_t)
13315+# define YYSIZE_T size_t
13316+#endif
13317+#if ! defined (YYSIZE_T)
13318+# if defined (__STDC__) || defined (__cplusplus)
13319+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
13320+# define YYSIZE_T size_t
13321+# endif
13322+#endif
13323+#if ! defined (YYSIZE_T)
13324+# define YYSIZE_T unsigned int
13325+#endif
13326+
13327+#define yyerrok (yyerrstatus = 0)
13328+#define yyclearin (yychar = YYEMPTY)
13329+#define YYEMPTY -2
13330+#define YYEOF 0
13331+#define YYACCEPT goto yyacceptlab
13332+#define YYABORT goto yyabortlab
13333+#define YYERROR goto yyerrlab1
13334+/* Like YYERROR except do call yyerror. This remains here temporarily
13335+ to ease the transition to the new meaning of YYERROR, for GCC.
13336+ Once GCC version 2 has supplanted version 1, this can go. */
13337+#define YYFAIL goto yyerrlab
13338+#define YYRECOVERING() (!!yyerrstatus)
13339+#define YYBACKUP(Token, Value) \
13340+do \
13341+ if (yychar == YYEMPTY && yylen == 1) \
13342+ { \
13343+ yychar = (Token); \
13344+ yylval = (Value); \
13345+ yychar1 = YYTRANSLATE (yychar); \
13346+ YYPOPSTACK; \
13347+ goto yybackup; \
13348+ } \
13349+ else \
13350+ { \
13351+ yyerror ("syntax error: cannot back up"); \
13352+ YYERROR; \
13353+ } \
13354+while (0)
13355+
13356+#define YYTERROR 1
13357+#define YYERRCODE 256
13358+
13359+
13360+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
13361+ are run).
13362+
13363+ When YYLLOC_DEFAULT is run, CURRENT is set the location of the
13364+ first token. By default, to implement support for ranges, extend
13365+ its range to the last symbol. */
13366+
13367+#ifndef YYLLOC_DEFAULT
13368+# define YYLLOC_DEFAULT(Current, Rhs, N) \
13369+ Current.last_line = Rhs[N].last_line; \
13370+ Current.last_column = Rhs[N].last_column;
13371+#endif
13372+
13373+
13374+/* YYLEX -- calling `yylex' with the right arguments. */
13375+
13376+#if YYPURE
13377+# if YYLSP_NEEDED
13378+# ifdef YYLEX_PARAM
13379+# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
13380+# else
13381+# define YYLEX yylex (&yylval, &yylloc)
13382+# endif
13383+# else /* !YYLSP_NEEDED */
13384+# ifdef YYLEX_PARAM
13385+# define YYLEX yylex (&yylval, YYLEX_PARAM)
13386+# else
13387+# define YYLEX yylex (&yylval)
13388+# endif
13389+# endif /* !YYLSP_NEEDED */
13390+#else /* !YYPURE */
13391+# define YYLEX yylex ()
13392+#endif /* !YYPURE */
13393+
13394+
13395+/* Enable debugging if requested. */
13396+#if YYDEBUG
13397+
13398+# ifndef YYFPRINTF
13399+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
13400+# define YYFPRINTF fprintf
13401+# endif
13402+
13403+# define YYDPRINTF(Args) \
13404+do { \
13405+ if (yydebug) \
13406+ YYFPRINTF Args; \
13407+} while (0)
13408+/* Nonzero means print parse trace. It is left uninitialized so that
13409+ multiple parsers can coexist. */
13410+int yydebug;
13411+#else /* !YYDEBUG */
13412+# define YYDPRINTF(Args)
13413+#endif /* !YYDEBUG */
13414+
13415+/* YYINITDEPTH -- initial size of the parser's stacks. */
13416+#ifndef YYINITDEPTH
13417+# define YYINITDEPTH 200
13418+#endif
13419+
13420+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
13421+ if the built-in stack extension method is used).
13422+
13423+ Do not make this value too large; the results are undefined if
13424+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
13425+ evaluated with infinite-precision integer arithmetic. */
13426+
13427+#if YYMAXDEPTH == 0
13428+# undef YYMAXDEPTH
13429+#endif
13430+
13431+#ifndef YYMAXDEPTH
13432+# define YYMAXDEPTH 10000
13433+#endif
13434+
13435+#ifdef YYERROR_VERBOSE
13436+
13437+# ifndef yystrlen
13438+# if defined (__GLIBC__) && defined (_STRING_H)
13439+# define yystrlen strlen
13440+# else
13441+/* Return the length of YYSTR. */
13442+static YYSIZE_T
13443+# if defined (__STDC__) || defined (__cplusplus)
13444+yystrlen (const char *yystr)
13445+# else
13446+yystrlen (yystr)
13447+ const char *yystr;
13448+# endif
13449+{
13450+ register const char *yys = yystr;
13451+
13452+ while (*yys++ != '\0')
13453+ continue;
13454+
13455+ return yys - yystr - 1;
13456+}
13457+# endif
13458+# endif
13459+
13460+# ifndef yystpcpy
13461+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
13462+# define yystpcpy stpcpy
13463+# else
13464+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
13465+ YYDEST. */
13466+static char *
13467+# if defined (__STDC__) || defined (__cplusplus)
13468+yystpcpy (char *yydest, const char *yysrc)
13469+# else
13470+yystpcpy (yydest, yysrc)
13471+ char *yydest;
13472+ const char *yysrc;
13473+# endif
13474+{
13475+ register char *yyd = yydest;
13476+ register const char *yys = yysrc;
13477+
13478+ while ((*yyd++ = *yys++) != '\0')
13479+ continue;
13480+
13481+ return yyd - 1;
13482+}
13483+# endif
13484+# endif
13485+#endif
13486+
13487+#line 315 "/usr/local/share/bison/bison.simple"
13488+
13489+
13490+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
13491+ into yyparse. The argument should have type void *.
13492+ It should actually point to an object.
13493+ Grammar actions can access the variable by casting it
13494+ to the proper pointer type. */
13495+
13496+#ifdef YYPARSE_PARAM
13497+# if defined (__STDC__) || defined (__cplusplus)
13498+# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
13499+# define YYPARSE_PARAM_DECL
13500+# else
13501+# define YYPARSE_PARAM_ARG YYPARSE_PARAM
13502+# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
13503+# endif
13504+#else /* !YYPARSE_PARAM */
13505+# define YYPARSE_PARAM_ARG
13506+# define YYPARSE_PARAM_DECL
13507+#endif /* !YYPARSE_PARAM */
13508+
13509+/* Prevent warning if -Wstrict-prototypes. */
13510+#ifdef __GNUC__
13511+# ifdef YYPARSE_PARAM
13512+int yyparse (void *);
13513+# else
13514+int yyparse (void);
13515+# endif
13516+#endif
13517+
13518+/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
13519+ variables are global, or local to YYPARSE. */
13520+
13521+#define YY_DECL_NON_LSP_VARIABLES \
13522+/* The lookahead symbol. */ \
13523+int yychar; \
13524+ \
13525+/* The semantic value of the lookahead symbol. */ \
13526+YYSTYPE yylval; \
13527+ \
13528+/* Number of parse errors so far. */ \
13529+int yynerrs;
13530+
13531+#if YYLSP_NEEDED
13532+# define YY_DECL_VARIABLES \
13533+YY_DECL_NON_LSP_VARIABLES \
13534+ \
13535+/* Location data for the lookahead symbol. */ \
13536+YYLTYPE yylloc;
13537+#else
13538+# define YY_DECL_VARIABLES \
13539+YY_DECL_NON_LSP_VARIABLES
13540+#endif
13541+
13542+
13543+/* If nonreentrant, generate the variables here. */
13544+
13545+#if !YYPURE
13546+YY_DECL_VARIABLES
13547+#endif /* !YYPURE */
13548+
13549+int
13550+yyparse (YYPARSE_PARAM_ARG)
13551+ YYPARSE_PARAM_DECL
13552+{
13553+ /* If reentrant, generate the variables here. */
13554+#if YYPURE
13555+ YY_DECL_VARIABLES
13556+#endif /* !YYPURE */
13557+
13558+ register int yystate;
13559+ register int yyn;
13560+ int yyresult;
13561+ /* Number of tokens to shift before error messages enabled. */
13562+ int yyerrstatus;
13563+ /* Lookahead token as an internal (translated) token number. */
13564+ int yychar1 = 0;
13565+
13566+ /* Three stacks and their tools:
13567+ `yyss': related to states,
13568+ `yyvs': related to semantic values,
13569+ `yyls': related to locations.
13570+
13571+ Refer to the stacks thru separate pointers, to allow yyoverflow
13572+ to reallocate them elsewhere. */
13573+
13574+ /* The state stack. */
13575+ short yyssa[YYINITDEPTH];
13576+ short *yyss = yyssa;
13577+ register short *yyssp;
13578+
13579+ /* The semantic value stack. */
13580+ YYSTYPE yyvsa[YYINITDEPTH];
13581+ YYSTYPE *yyvs = yyvsa;
13582+ register YYSTYPE *yyvsp;
13583+
13584+#if YYLSP_NEEDED
13585+ /* The location stack. */
13586+ YYLTYPE yylsa[YYINITDEPTH];
13587+ YYLTYPE *yyls = yylsa;
13588+ YYLTYPE *yylsp;
13589+#endif
13590+
13591+#if YYLSP_NEEDED
13592+# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
13593+#else
13594+# define YYPOPSTACK (yyvsp--, yyssp--)
13595+#endif
13596+
13597+ YYSIZE_T yystacksize = YYINITDEPTH;
13598+
13599+
13600+ /* The variables used to return semantic value and location from the
13601+ action routines. */
13602+ YYSTYPE yyval;
13603+#if YYLSP_NEEDED
13604+ YYLTYPE yyloc;
13605+#endif
13606+
13607+ /* When reducing, the number of symbols on the RHS of the reduced
13608+ rule. */
13609+ int yylen;
13610+
13611+ YYDPRINTF ((stderr, "Starting parse\n"));
13612+
13613+ yystate = 0;
13614+ yyerrstatus = 0;
13615+ yynerrs = 0;
13616+ yychar = YYEMPTY; /* Cause a token to be read. */
13617+
13618+ /* Initialize stack pointers.
13619+ Waste one element of value and location stack
13620+ so that they stay on the same level as the state stack.
13621+ The wasted elements are never initialized. */
13622+
13623+ yyssp = yyss;
13624+ yyvsp = yyvs;
13625+#if YYLSP_NEEDED
13626+ yylsp = yyls;
13627+#endif
13628+ goto yysetstate;
13629+
13630+/*------------------------------------------------------------.
13631+| yynewstate -- Push a new state, which is found in yystate. |
13632+`------------------------------------------------------------*/
13633+ yynewstate:
13634+ /* In all cases, when you get here, the value and location stacks
13635+ have just been pushed. so pushing a state here evens the stacks.
13636+ */
13637+ yyssp++;
13638+
13639+ yysetstate:
13640+ *yyssp = yystate;
13641+
13642+ if (yyssp >= yyss + yystacksize - 1)
13643+ {
13644+ /* Get the current used size of the three stacks, in elements. */
13645+ YYSIZE_T yysize = yyssp - yyss + 1;
13646+
13647+#ifdef yyoverflow
13648+ {
13649+ /* Give user a chance to reallocate the stack. Use copies of
13650+ these so that the &'s don't force the real ones into
13651+ memory. */
13652+ YYSTYPE *yyvs1 = yyvs;
13653+ short *yyss1 = yyss;
13654+
13655+ /* Each stack pointer address is followed by the size of the
13656+ data in use in that stack, in bytes. */
13657+# if YYLSP_NEEDED
13658+ YYLTYPE *yyls1 = yyls;
13659+ /* This used to be a conditional around just the two extra args,
13660+ but that might be undefined if yyoverflow is a macro. */
13661+ yyoverflow ("parser stack overflow",
13662+ &yyss1, yysize * sizeof (*yyssp),
13663+ &yyvs1, yysize * sizeof (*yyvsp),
13664+ &yyls1, yysize * sizeof (*yylsp),
13665+ &yystacksize);
13666+ yyls = yyls1;
13667+# else
13668+ yyoverflow ("parser stack overflow",
13669+ &yyss1, yysize * sizeof (*yyssp),
13670+ &yyvs1, yysize * sizeof (*yyvsp),
13671+ &yystacksize);
13672+# endif
13673+ yyss = yyss1;
13674+ yyvs = yyvs1;
13675+ }
13676+#else /* no yyoverflow */
13677+# ifndef YYSTACK_RELOCATE
13678+ goto yyoverflowlab;
13679+# else
13680+ /* Extend the stack our own way. */
13681+ if (yystacksize >= YYMAXDEPTH)
13682+ goto yyoverflowlab;
13683+ yystacksize *= 2;
13684+ if (yystacksize > YYMAXDEPTH)
13685+ yystacksize = YYMAXDEPTH;
13686+
13687+ {
13688+ short *yyss1 = yyss;
13689+ union yyalloc *yyptr =
13690+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
13691+ if (! yyptr)
13692+ goto yyoverflowlab;
13693+ YYSTACK_RELOCATE (yyss);
13694+ YYSTACK_RELOCATE (yyvs);
13695+# if YYLSP_NEEDED
13696+ YYSTACK_RELOCATE (yyls);
13697+# endif
13698+# undef YYSTACK_RELOCATE
13699+ if (yyss1 != yyssa)
13700+ YYSTACK_FREE (yyss1);
13701+ }
13702+# endif
13703+#endif /* no yyoverflow */
13704+
13705+ yyssp = yyss + yysize - 1;
13706+ yyvsp = yyvs + yysize - 1;
13707+#if YYLSP_NEEDED
13708+ yylsp = yyls + yysize - 1;
13709+#endif
13710+
13711+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
13712+ (unsigned long int) yystacksize));
13713+
13714+ if (yyssp >= yyss + yystacksize - 1)
13715+ YYABORT;
13716+ }
13717+
13718+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
13719+
13720+ goto yybackup;
13721+
13722+
13723+/*-----------.
13724+| yybackup. |
13725+`-----------*/
13726+yybackup:
13727+
13728+/* Do appropriate processing given the current state. */
13729+/* Read a lookahead token if we need one and don't already have one. */
13730+/* yyresume: */
13731+
13732+ /* First try to decide what to do without reference to lookahead token. */
13733+
13734+ yyn = yypact[yystate];
13735+ if (yyn == YYFLAG)
13736+ goto yydefault;
13737+
13738+ /* Not known => get a lookahead token if don't already have one. */
13739+
13740+ /* yychar is either YYEMPTY or YYEOF
13741+ or a valid token in external form. */
13742+
13743+ if (yychar == YYEMPTY)
13744+ {
13745+ YYDPRINTF ((stderr, "Reading a token: "));
13746+ yychar = YYLEX;
13747+ }
13748+
13749+ /* Convert token to internal form (in yychar1) for indexing tables with */
13750+
13751+ if (yychar <= 0) /* This means end of input. */
13752+ {
13753+ yychar1 = 0;
13754+ yychar = YYEOF; /* Don't call YYLEX any more */
13755+
13756+ YYDPRINTF ((stderr, "Now at end of input.\n"));
13757+ }
13758+ else
13759+ {
13760+ yychar1 = YYTRANSLATE (yychar);
13761+
13762+#if YYDEBUG
13763+ /* We have to keep this `#if YYDEBUG', since we use variables
13764+ which are defined only if `YYDEBUG' is set. */
13765+ if (yydebug)
13766+ {
13767+ YYFPRINTF (stderr, "Next token is %d (%s",
13768+ yychar, yytname[yychar1]);
13769+ /* Give the individual parser a way to print the precise
13770+ meaning of a token, for further debugging info. */
13771+# ifdef YYPRINT
13772+ YYPRINT (stderr, yychar, yylval);
13773+# endif
13774+ YYFPRINTF (stderr, ")\n");
13775+ }
13776+#endif
13777+ }
13778+
13779+ yyn += yychar1;
13780+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
13781+ goto yydefault;
13782+
13783+ yyn = yytable[yyn];
13784+
13785+ /* yyn is what to do for this token type in this state.
13786+ Negative => reduce, -yyn is rule number.
13787+ Positive => shift, yyn is new state.
13788+ New state is final state => don't bother to shift,
13789+ just return success.
13790+ 0, or most negative number => error. */
13791+
13792+ if (yyn < 0)
13793+ {
13794+ if (yyn == YYFLAG)
13795+ goto yyerrlab;
13796+ yyn = -yyn;
13797+ goto yyreduce;
13798+ }
13799+ else if (yyn == 0)
13800+ goto yyerrlab;
13801+
13802+ if (yyn == YYFINAL)
13803+ YYACCEPT;
13804+
13805+ /* Shift the lookahead token. */
13806+ YYDPRINTF ((stderr, "Shifting token %d (%s), ",
13807+ yychar, yytname[yychar1]));
13808+
13809+ /* Discard the token being shifted unless it is eof. */
13810+ if (yychar != YYEOF)
13811+ yychar = YYEMPTY;
13812+
13813+ *++yyvsp = yylval;
13814+#if YYLSP_NEEDED
13815+ *++yylsp = yylloc;
13816+#endif
13817+
13818+ /* Count tokens shifted since error; after three, turn off error
13819+ status. */
13820+ if (yyerrstatus)
13821+ yyerrstatus--;
13822+
13823+ yystate = yyn;
13824+ goto yynewstate;
13825+
13826+
13827+/*-----------------------------------------------------------.
13828+| yydefault -- do the default action for the current state. |
13829+`-----------------------------------------------------------*/
13830+yydefault:
13831+ yyn = yydefact[yystate];
13832+ if (yyn == 0)
13833+ goto yyerrlab;
13834+ goto yyreduce;
13835+
13836+
13837+/*-----------------------------.
13838+| yyreduce -- Do a reduction. |
13839+`-----------------------------*/
13840+yyreduce:
13841+ /* yyn is the number of a rule to reduce with. */
13842+ yylen = yyr2[yyn];
13843+
13844+ /* If YYLEN is nonzero, implement the default value of the action:
13845+ `$$ = $1'.
13846+
13847+ Otherwise, the following line sets YYVAL to the semantic value of
13848+ the lookahead token. This behavior is undocumented and Bison
13849+ users should not rely upon it. Assigning to YYVAL
13850+ unconditionally makes the parser a bit smaller, and it avoids a
13851+ GCC warning that YYVAL may be used uninitialized. */
13852+ yyval = yyvsp[1-yylen];
13853+
13854+#if YYLSP_NEEDED
13855+ /* Similarly for the default location. Let the user run additional
13856+ commands if for instance locations are ranges. */
13857+ yyloc = yylsp[1-yylen];
13858+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
13859+#endif
13860+
13861+#if YYDEBUG
13862+ /* We have to keep this `#if YYDEBUG', since we use variables which
13863+ are defined only if `YYDEBUG' is set. */
13864+ if (yydebug)
13865+ {
13866+ int yyi;
13867+
13868+ YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
13869+ yyn, yyrline[yyn]);
13870+
13871+ /* Print the symbols being reduced, and their result. */
13872+ for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
13873+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
13874+ YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
13875+ }
13876+#endif
13877+
13878+ switch (yyn) {
13879+
13880+case 1:
13881+#line 151 "plural.y"
13882+{
13883+ if (yyvsp[0].exp == NULL)
13884+ YYABORT;
13885+ ((struct parse_args *) arg)->res = yyvsp[0].exp;
13886+ }
13887+ break;
13888+case 2:
13889+#line 159 "plural.y"
13890+{
13891+ yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
13892+ }
13893+ break;
13894+case 3:
13895+#line 163 "plural.y"
13896+{
13897+ yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
13898+ }
13899+ break;
13900+case 4:
13901+#line 167 "plural.y"
13902+{
13903+ yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
13904+ }
13905+ break;
13906+case 5:
13907+#line 171 "plural.y"
13908+{
13909+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13910+ }
13911+ break;
13912+case 6:
13913+#line 175 "plural.y"
13914+{
13915+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13916+ }
13917+ break;
13918+case 7:
13919+#line 179 "plural.y"
13920+{
13921+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13922+ }
13923+ break;
13924+case 8:
13925+#line 183 "plural.y"
13926+{
13927+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13928+ }
13929+ break;
13930+case 9:
13931+#line 187 "plural.y"
13932+{
13933+ yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
13934+ }
13935+ break;
13936+case 10:
13937+#line 191 "plural.y"
13938+{
13939+ yyval.exp = new_exp_0 (var);
13940+ }
13941+ break;
13942+case 11:
13943+#line 195 "plural.y"
13944+{
13945+ if ((yyval.exp = new_exp_0 (num)) != NULL)
13946+ yyval.exp->val.num = yyvsp[0].num;
13947+ }
13948+ break;
13949+case 12:
13950+#line 200 "plural.y"
13951+{
13952+ yyval.exp = yyvsp[-1].exp;
13953+ }
13954+ break;
13955+}
13956+
13957+#line 705 "/usr/local/share/bison/bison.simple"
13958+
13959+
13960+ yyvsp -= yylen;
13961+ yyssp -= yylen;
13962+#if YYLSP_NEEDED
13963+ yylsp -= yylen;
13964+#endif
13965+
13966+#if YYDEBUG
13967+ if (yydebug)
13968+ {
13969+ short *yyssp1 = yyss - 1;
13970+ YYFPRINTF (stderr, "state stack now");
13971+ while (yyssp1 != yyssp)
13972+ YYFPRINTF (stderr, " %d", *++yyssp1);
13973+ YYFPRINTF (stderr, "\n");
13974+ }
13975+#endif
13976+
13977+ *++yyvsp = yyval;
13978+#if YYLSP_NEEDED
13979+ *++yylsp = yyloc;
13980+#endif
13981+
13982+ /* Now `shift' the result of the reduction. Determine what state
13983+ that goes to, based on the state we popped back to and the rule
13984+ number reduced by. */
13985+
13986+ yyn = yyr1[yyn];
13987+
13988+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
13989+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
13990+ yystate = yytable[yystate];
13991+ else
13992+ yystate = yydefgoto[yyn - YYNTBASE];
13993+
13994+ goto yynewstate;
13995+
13996+
13997+/*------------------------------------.
13998+| yyerrlab -- here on detecting error |
13999+`------------------------------------*/
14000+yyerrlab:
14001+ /* If not already recovering from an error, report this error. */
14002+ if (!yyerrstatus)
14003+ {
14004+ ++yynerrs;
14005+
14006+#ifdef YYERROR_VERBOSE
14007+ yyn = yypact[yystate];
14008+
14009+ if (yyn > YYFLAG && yyn < YYLAST)
14010+ {
14011+ YYSIZE_T yysize = 0;
14012+ char *yymsg;
14013+ int yyx, yycount;
14014+
14015+ yycount = 0;
14016+ /* Start YYX at -YYN if negative to avoid negative indexes in
14017+ YYCHECK. */
14018+ for (yyx = yyn < 0 ? -yyn : 0;
14019+ yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
14020+ if (yycheck[yyx + yyn] == yyx)
14021+ yysize += yystrlen (yytname[yyx]) + 15, yycount++;
14022+ yysize += yystrlen ("parse error, unexpected ") + 1;
14023+ yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
14024+ yymsg = (char *) YYSTACK_ALLOC (yysize);
14025+ if (yymsg != 0)
14026+ {
14027+ char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
14028+ yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
14029+
14030+ if (yycount < 5)
14031+ {
14032+ yycount = 0;
14033+ for (yyx = yyn < 0 ? -yyn : 0;
14034+ yyx < (int) (sizeof (yytname) / sizeof (char *));
14035+ yyx++)
14036+ if (yycheck[yyx + yyn] == yyx)
14037+ {
14038+ const char *yyq = ! yycount ? ", expecting " : " or ";
14039+ yyp = yystpcpy (yyp, yyq);
14040+ yyp = yystpcpy (yyp, yytname[yyx]);
14041+ yycount++;
14042+ }
14043+ }
14044+ yyerror (yymsg);
14045+ YYSTACK_FREE (yymsg);
14046+ }
14047+ else
14048+ yyerror ("parse error; also virtual memory exhausted");
14049+ }
14050+ else
14051+#endif /* defined (YYERROR_VERBOSE) */
14052+ yyerror ("parse error");
14053+ }
14054+ goto yyerrlab1;
14055+
14056+
14057+/*--------------------------------------------------.
14058+| yyerrlab1 -- error raised explicitly by an action |
14059+`--------------------------------------------------*/
14060+yyerrlab1:
14061+ if (yyerrstatus == 3)
14062+ {
14063+ /* If just tried and failed to reuse lookahead token after an
14064+ error, discard it. */
14065+
14066+ /* return failure if at end of input */
14067+ if (yychar == YYEOF)
14068+ YYABORT;
14069+ YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
14070+ yychar, yytname[yychar1]));
14071+ yychar = YYEMPTY;
14072+ }
14073+
14074+ /* Else will try to reuse lookahead token after shifting the error
14075+ token. */
14076+
14077+ yyerrstatus = 3; /* Each real token shifted decrements this */
14078+
14079+ goto yyerrhandle;
14080+
14081+
14082+/*-------------------------------------------------------------------.
14083+| yyerrdefault -- current state does not do anything special for the |
14084+| error token. |
14085+`-------------------------------------------------------------------*/
14086+yyerrdefault:
14087+#if 0
14088+ /* This is wrong; only states that explicitly want error tokens
14089+ should shift them. */
14090+
14091+ /* If its default is to accept any token, ok. Otherwise pop it. */
14092+ yyn = yydefact[yystate];
14093+ if (yyn)
14094+ goto yydefault;
14095+#endif
14096+
14097+
14098+/*---------------------------------------------------------------.
14099+| yyerrpop -- pop the current state because it cannot handle the |
14100+| error token |
14101+`---------------------------------------------------------------*/
14102+yyerrpop:
14103+ if (yyssp == yyss)
14104+ YYABORT;
14105+ yyvsp--;
14106+ yystate = *--yyssp;
14107+#if YYLSP_NEEDED
14108+ yylsp--;
14109+#endif
14110+
14111+#if YYDEBUG
14112+ if (yydebug)
14113+ {
14114+ short *yyssp1 = yyss - 1;
14115+ YYFPRINTF (stderr, "Error: state stack now");
14116+ while (yyssp1 != yyssp)
14117+ YYFPRINTF (stderr, " %d", *++yyssp1);
14118+ YYFPRINTF (stderr, "\n");
14119+ }
14120+#endif
14121+
14122+/*--------------.
14123+| yyerrhandle. |
14124+`--------------*/
14125+yyerrhandle:
14126+ yyn = yypact[yystate];
14127+ if (yyn == YYFLAG)
14128+ goto yyerrdefault;
14129+
14130+ yyn += YYTERROR;
14131+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
14132+ goto yyerrdefault;
14133+
14134+ yyn = yytable[yyn];
14135+ if (yyn < 0)
14136+ {
14137+ if (yyn == YYFLAG)
14138+ goto yyerrpop;
14139+ yyn = -yyn;
14140+ goto yyreduce;
14141+ }
14142+ else if (yyn == 0)
14143+ goto yyerrpop;
14144+
14145+ if (yyn == YYFINAL)
14146+ YYACCEPT;
14147+
14148+ YYDPRINTF ((stderr, "Shifting error token, "));
14149+
14150+ *++yyvsp = yylval;
14151+#if YYLSP_NEEDED
14152+ *++yylsp = yylloc;
14153+#endif
14154+
14155+ yystate = yyn;
14156+ goto yynewstate;
14157+
14158+
14159+/*-------------------------------------.
14160+| yyacceptlab -- YYACCEPT comes here. |
14161+`-------------------------------------*/
14162+yyacceptlab:
14163+ yyresult = 0;
14164+ goto yyreturn;
14165+
14166+/*-----------------------------------.
14167+| yyabortlab -- YYABORT comes here. |
14168+`-----------------------------------*/
14169+yyabortlab:
14170+ yyresult = 1;
14171+ goto yyreturn;
14172+
14173+/*---------------------------------------------.
14174+| yyoverflowab -- parser overflow comes here. |
14175+`---------------------------------------------*/
14176+yyoverflowlab:
14177+ yyerror ("parser stack overflow");
14178+ yyresult = 2;
14179+ /* Fall through. */
14180+
14181+yyreturn:
14182+#ifndef yyoverflow
14183+ if (yyss != yyssa)
14184+ YYSTACK_FREE (yyss);
14185+#endif
14186+ return yyresult;
14187+}
14188+#line 205 "plural.y"
14189+
14190+
14191+void
14192+internal_function
14193+FREE_EXPRESSION (struct expression *exp)
14194+{
14195+ if (exp == NULL)
14196+ return;
14197+
14198+ /* Handle the recursive case. */
14199+ switch (exp->nargs)
14200+ {
14201+ case 3:
14202+ FREE_EXPRESSION (exp->val.args[2]);
14203+ /* FALLTHROUGH */
14204+ case 2:
14205+ FREE_EXPRESSION (exp->val.args[1]);
14206+ /* FALLTHROUGH */
14207+ case 1:
14208+ FREE_EXPRESSION (exp->val.args[0]);
14209+ /* FALLTHROUGH */
14210+ default:
14211+ break;
14212+ }
14213+
14214+ free (exp);
14215+}
14216+
14217+
14218+static int
14219+yylex (YYSTYPE *lval, const char **pexp)
14220+{
14221+ const char *exp = *pexp;
14222+ int result;
14223+
14224+ while (1)
14225+ {
14226+ if (exp[0] == '\0')
14227+ {
14228+ *pexp = exp;
14229+ return YYEOF;
14230+ }
14231+
14232+ if (exp[0] != ' ' && exp[0] != '\t')
14233+ break;
14234+
14235+ ++exp;
14236+ }
14237+
14238+ result = *exp++;
14239+ switch (result)
14240+ {
14241+ case '0': case '1': case '2': case '3': case '4':
14242+ case '5': case '6': case '7': case '8': case '9':
14243+ {
14244+ unsigned long int n = result - '0';
14245+ while (exp[0] >= '0' && exp[0] <= '9')
14246+ {
14247+ n *= 10;
14248+ n += exp[0] - '0';
14249+ ++exp;
14250+ }
14251+ lval->num = n;
14252+ result = NUMBER;
14253+ }
14254+ break;
14255+
14256+ case '=':
14257+ if (exp[0] == '=')
14258+ {
14259+ ++exp;
14260+ lval->op = equal;
14261+ result = EQUOP2;
14262+ }
14263+ else
14264+ result = YYERRCODE;
14265+ break;
14266+
14267+ case '!':
14268+ if (exp[0] == '=')
14269+ {
14270+ ++exp;
14271+ lval->op = not_equal;
14272+ result = EQUOP2;
14273+ }
14274+ break;
14275+
14276+ case '&':
14277+ case '|':
14278+ if (exp[0] == result)
14279+ ++exp;
14280+ else
14281+ result = YYERRCODE;
14282+ break;
14283+
14284+ case '<':
14285+ if (exp[0] == '=')
14286+ {
14287+ ++exp;
14288+ lval->op = less_or_equal;
14289+ }
14290+ else
14291+ lval->op = less_than;
14292+ result = CMPOP2;
14293+ break;
14294+
14295+ case '>':
14296+ if (exp[0] == '=')
14297+ {
14298+ ++exp;
14299+ lval->op = greater_or_equal;
14300+ }
14301+ else
14302+ lval->op = greater_than;
14303+ result = CMPOP2;
14304+ break;
14305+
14306+ case '*':
14307+ lval->op = mult;
14308+ result = MULOP2;
14309+ break;
14310+
14311+ case '/':
14312+ lval->op = divide;
14313+ result = MULOP2;
14314+ break;
14315+
14316+ case '%':
14317+ lval->op = module;
14318+ result = MULOP2;
14319+ break;
14320+
14321+ case '+':
14322+ lval->op = plus;
14323+ result = ADDOP2;
14324+ break;
14325+
14326+ case '-':
14327+ lval->op = minus;
14328+ result = ADDOP2;
14329+ break;
14330+
14331+ case 'n':
14332+ case '?':
14333+ case ':':
14334+ case '(':
14335+ case ')':
14336+ /* Nothing, just return the character. */
14337+ break;
14338+
14339+ case ';':
14340+ case '\n':
14341+ case '\0':
14342+ /* Be safe and let the user call this function again. */
14343+ --exp;
14344+ result = YYEOF;
14345+ break;
14346+
14347+ default:
14348+ result = YYERRCODE;
14349+#if YYDEBUG != 0
14350+ --exp;
14351+#endif
14352+ break;
14353+ }
14354+
14355+ *pexp = exp;
14356+
14357+ return result;
14358+}
14359+
14360+
14361+static void
14362+yyerror (const char *str)
14363+{
14364+ /* Do nothing. We don't print error messages here. */
14365+}
14366--- lrzsz-0.12.20.safe/intl/plural-exp.c 1969-12-31 19:00:00.000000000 -0500
14367+++ lrzsz-0.12.20/intl/plural-exp.c 2004-09-12 14:40:34.578714192 -0400
14368@@ -0,0 +1,154 @@
14369+/* Expression parsing for plural form selection.
14370+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
14371+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
14372+
14373+ This program is free software; you can redistribute it and/or modify it
14374+ under the terms of the GNU Library General Public License as published
14375+ by the Free Software Foundation; either version 2, or (at your option)
14376+ any later version.
14377+
14378+ This program is distributed in the hope that it will be useful,
14379+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14380+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14381+ Library General Public License for more details.
14382+
14383+ You should have received a copy of the GNU Library General Public
14384+ License along with this program; if not, write to the Free Software
14385+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14386+ USA. */
14387+
14388+#ifdef HAVE_CONFIG_H
14389+# include <config.h>
14390+#endif
14391+
14392+#include <ctype.h>
14393+#include <stdlib.h>
14394+#include <string.h>
14395+
14396+#include "plural-exp.h"
14397+
14398+#if (defined __GNUC__ && !defined __APPLE_CC__) \
14399+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
14400+
14401+/* These structs are the constant expression for the germanic plural
14402+ form determination. It represents the expression "n != 1". */
14403+static const struct expression plvar =
14404+{
14405+ .nargs = 0,
14406+ .operation = var,
14407+};
14408+static const struct expression plone =
14409+{
14410+ .nargs = 0,
14411+ .operation = num,
14412+ .val =
14413+ {
14414+ .num = 1
14415+ }
14416+};
14417+struct expression GERMANIC_PLURAL =
14418+{
14419+ .nargs = 2,
14420+ .operation = not_equal,
14421+ .val =
14422+ {
14423+ .args =
14424+ {
14425+ [0] = (struct expression *) &plvar,
14426+ [1] = (struct expression *) &plone
14427+ }
14428+ }
14429+};
14430+
14431+# define INIT_GERMANIC_PLURAL()
14432+
14433+#else
14434+
14435+/* For compilers without support for ISO C 99 struct/union initializers:
14436+ Initialization at run-time. */
14437+
14438+static struct expression plvar;
14439+static struct expression plone;
14440+struct expression GERMANIC_PLURAL;
14441+
14442+static void
14443+init_germanic_plural ()
14444+{
14445+ if (plone.val.num == 0)
14446+ {
14447+ plvar.nargs = 0;
14448+ plvar.operation = var;
14449+
14450+ plone.nargs = 0;
14451+ plone.operation = num;
14452+ plone.val.num = 1;
14453+
14454+ GERMANIC_PLURAL.nargs = 2;
14455+ GERMANIC_PLURAL.operation = not_equal;
14456+ GERMANIC_PLURAL.val.args[0] = &plvar;
14457+ GERMANIC_PLURAL.val.args[1] = &plone;
14458+ }
14459+}
14460+
14461+# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
14462+
14463+#endif
14464+
14465+void
14466+internal_function
14467+EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp,
14468+ unsigned long int *npluralsp)
14469+{
14470+ if (nullentry != NULL)
14471+ {
14472+ const char *plural;
14473+ const char *nplurals;
14474+
14475+ plural = strstr (nullentry, "plural=");
14476+ nplurals = strstr (nullentry, "nplurals=");
14477+ if (plural == NULL || nplurals == NULL)
14478+ goto no_plural;
14479+ else
14480+ {
14481+ char *endp;
14482+ unsigned long int n;
14483+ struct parse_args args;
14484+
14485+ /* First get the number. */
14486+ nplurals += 9;
14487+ while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
14488+ ++nplurals;
14489+ if (!(*nplurals >= '0' && *nplurals <= '9'))
14490+ goto no_plural;
14491+#if defined HAVE_STRTOUL || defined _LIBC
14492+ n = strtoul (nplurals, &endp, 10);
14493+#else
14494+ for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
14495+ n = n * 10 + (*endp - '0');
14496+#endif
14497+ if (nplurals == endp)
14498+ goto no_plural;
14499+ *npluralsp = n;
14500+
14501+ /* Due to the restrictions bison imposes onto the interface of the
14502+ scanner function we have to put the input string and the result
14503+ passed up from the parser into the same structure which address
14504+ is passed down to the parser. */
14505+ plural += 7;
14506+ args.cp = plural;
14507+ if (PLURAL_PARSE (&args) != 0)
14508+ goto no_plural;
14509+ *pluralp = args.res;
14510+ }
14511+ }
14512+ else
14513+ {
14514+ /* By default we are using the Germanic form: singular form only
14515+ for `one', the plural form otherwise. Yes, this is also what
14516+ English is using since English is a Germanic language. */
14517+ no_plural:
14518+ INIT_GERMANIC_PLURAL ();
14519+ *pluralp = &GERMANIC_PLURAL;
14520+ *npluralsp = 2;
14521+ }
14522+}
14523--- lrzsz-0.12.20.safe/intl/plural-exp.h 1969-12-31 19:00:00.000000000 -0500
14524+++ lrzsz-0.12.20/intl/plural-exp.h 2004-09-12 14:40:34.584713280 -0400
14525@@ -0,0 +1,118 @@
14526+/* Expression parsing and evaluation for plural form selection.
14527+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
14528+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
14529+
14530+ This program is free software; you can redistribute it and/or modify it
14531+ under the terms of the GNU Library General Public License as published
14532+ by the Free Software Foundation; either version 2, or (at your option)
14533+ any later version.
14534+
14535+ This program is distributed in the hope that it will be useful,
14536+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14537+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14538+ Library General Public License for more details.
14539+
14540+ You should have received a copy of the GNU Library General Public
14541+ License along with this program; if not, write to the Free Software
14542+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14543+ USA. */
14544+
14545+#ifndef _PLURAL_EXP_H
14546+#define _PLURAL_EXP_H
14547+
14548+#ifndef internal_function
14549+# define internal_function
14550+#endif
14551+
14552+#ifndef attribute_hidden
14553+# define attribute_hidden
14554+#endif
14555+
14556+
14557+/* This is the representation of the expressions to determine the
14558+ plural form. */
14559+struct expression
14560+{
14561+ int nargs; /* Number of arguments. */
14562+ enum operator
14563+ {
14564+ /* Without arguments: */
14565+ var, /* The variable "n". */
14566+ num, /* Decimal number. */
14567+ /* Unary operators: */
14568+ lnot, /* Logical NOT. */
14569+ /* Binary operators: */
14570+ mult, /* Multiplication. */
14571+ divide, /* Division. */
14572+ module, /* Modulo operation. */
14573+ plus, /* Addition. */
14574+ minus, /* Subtraction. */
14575+ less_than, /* Comparison. */
14576+ greater_than, /* Comparison. */
14577+ less_or_equal, /* Comparison. */
14578+ greater_or_equal, /* Comparison. */
14579+ equal, /* Comparison for equality. */
14580+ not_equal, /* Comparison for inequality. */
14581+ land, /* Logical AND. */
14582+ lor, /* Logical OR. */
14583+ /* Ternary operators: */
14584+ qmop /* Question mark operator. */
14585+ } operation;
14586+ union
14587+ {
14588+ unsigned long int num; /* Number value for `num'. */
14589+ struct expression *args[3]; /* Up to three arguments. */
14590+ } val;
14591+};
14592+
14593+/* This is the data structure to pass information to the parser and get
14594+ the result in a thread-safe way. */
14595+struct parse_args
14596+{
14597+ const char *cp;
14598+ struct expression *res;
14599+};
14600+
14601+
14602+/* Names for the libintl functions are a problem. This source code is used
14603+ 1. in the GNU C Library library,
14604+ 2. in the GNU libintl library,
14605+ 3. in the GNU gettext tools.
14606+ The function names in each situation must be different, to allow for
14607+ binary incompatible changes in 'struct expression'. Furthermore,
14608+ 1. in the GNU C Library library, the names have a __ prefix,
14609+ 2.+3. in the GNU libintl library and in the GNU gettext tools, the names
14610+ must follow ANSI C and not start with __.
14611+ So we have to distinguish the three cases. */
14612+#ifdef _LIBC
14613+# define FREE_EXPRESSION __gettext_free_exp
14614+# define PLURAL_PARSE __gettextparse
14615+# define GERMANIC_PLURAL __gettext_germanic_plural
14616+# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
14617+#elif defined (IN_LIBINTL)
14618+# define FREE_EXPRESSION libintl_gettext_free_exp
14619+# define PLURAL_PARSE libintl_gettextparse
14620+# define GERMANIC_PLURAL libintl_gettext_germanic_plural
14621+# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
14622+#else
14623+# define FREE_EXPRESSION free_plural_expression
14624+# define PLURAL_PARSE parse_plural_expression
14625+# define GERMANIC_PLURAL germanic_plural
14626+# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
14627+#endif
14628+
14629+extern void FREE_EXPRESSION (struct expression *exp)
14630+ internal_function;
14631+extern int PLURAL_PARSE (void *arg);
14632+extern struct expression GERMANIC_PLURAL attribute_hidden;
14633+extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
14634+ struct expression **pluralp,
14635+ unsigned long int *npluralsp)
14636+ internal_function;
14637+
14638+#if !defined (_LIBC) && !defined (IN_LIBINTL)
14639+extern unsigned long int plural_eval (struct expression *pexp,
14640+ unsigned long int n);
14641+#endif
14642+
14643+#endif /* _PLURAL_EXP_H */
14644--- lrzsz-0.12.20.safe/intl/plural.y 1969-12-31 19:00:00.000000000 -0500
14645+++ lrzsz-0.12.20/intl/plural.y 2004-09-12 14:40:34.589712520 -0400
14646@@ -0,0 +1,381 @@
14647+%{
14648+/* Expression parsing for plural form selection.
14649+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
14650+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
14651+
14652+ This program is free software; you can redistribute it and/or modify it
14653+ under the terms of the GNU Library General Public License as published
14654+ by the Free Software Foundation; either version 2, or (at your option)
14655+ any later version.
14656+
14657+ This program is distributed in the hope that it will be useful,
14658+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14659+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14660+ Library General Public License for more details.
14661+
14662+ You should have received a copy of the GNU Library General Public
14663+ License along with this program; if not, write to the Free Software
14664+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14665+ USA. */
14666+
14667+/* The bison generated parser uses alloca. AIX 3 forces us to put this
14668+ declaration at the beginning of the file. The declaration in bison's
14669+ skeleton file comes too late. This must come before <config.h>
14670+ because <config.h> may include arbitrary system headers. */
14671+#if defined _AIX && !defined __GNUC__
14672+ #pragma alloca
14673+#endif
14674+
14675+#ifdef HAVE_CONFIG_H
14676+# include <config.h>
14677+#endif
14678+
14679+#include <stddef.h>
14680+#include <stdlib.h>
14681+#include "plural-exp.h"
14682+
14683+/* The main function generated by the parser is called __gettextparse,
14684+ but we want it to be called PLURAL_PARSE. */
14685+#ifndef _LIBC
14686+# define __gettextparse PLURAL_PARSE
14687+#endif
14688+
14689+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
14690+#define YYPARSE_PARAM arg
14691+%}
14692+%pure_parser
14693+%expect 7
14694+
14695+%union {
14696+ unsigned long int num;
14697+ enum operator op;
14698+ struct expression *exp;
14699+}
14700+
14701+%{
14702+/* Prototypes for local functions. */
14703+static int yylex (YYSTYPE *lval, const char **pexp);
14704+static void yyerror (const char *str);
14705+
14706+/* Allocation of expressions. */
14707+
14708+static struct expression *
14709+new_exp (int nargs, enum operator op, struct expression * const *args)
14710+{
14711+ int i;
14712+ struct expression *newp;
14713+
14714+ /* If any of the argument could not be malloc'ed, just return NULL. */
14715+ for (i = nargs - 1; i >= 0; i--)
14716+ if (args[i] == NULL)
14717+ goto fail;
14718+
14719+ /* Allocate a new expression. */
14720+ newp = (struct expression *) malloc (sizeof (*newp));
14721+ if (newp != NULL)
14722+ {
14723+ newp->nargs = nargs;
14724+ newp->operation = op;
14725+ for (i = nargs - 1; i >= 0; i--)
14726+ newp->val.args[i] = args[i];
14727+ return newp;
14728+ }
14729+
14730+ fail:
14731+ for (i = nargs - 1; i >= 0; i--)
14732+ FREE_EXPRESSION (args[i]);
14733+
14734+ return NULL;
14735+}
14736+
14737+static inline struct expression *
14738+new_exp_0 (enum operator op)
14739+{
14740+ return new_exp (0, op, NULL);
14741+}
14742+
14743+static inline struct expression *
14744+new_exp_1 (enum operator op, struct expression *right)
14745+{
14746+ struct expression *args[1];
14747+
14748+ args[0] = right;
14749+ return new_exp (1, op, args);
14750+}
14751+
14752+static struct expression *
14753+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
14754+{
14755+ struct expression *args[2];
14756+
14757+ args[0] = left;
14758+ args[1] = right;
14759+ return new_exp (2, op, args);
14760+}
14761+
14762+static inline struct expression *
14763+new_exp_3 (enum operator op, struct expression *bexp,
14764+ struct expression *tbranch, struct expression *fbranch)
14765+{
14766+ struct expression *args[3];
14767+
14768+ args[0] = bexp;
14769+ args[1] = tbranch;
14770+ args[2] = fbranch;
14771+ return new_exp (3, op, args);
14772+}
14773+
14774+%}
14775+
14776+/* This declares that all operators have the same associativity and the
14777+ precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
14778+ There is no unary minus and no bitwise operators.
14779+ Operators with the same syntactic behaviour have been merged into a single
14780+ token, to save space in the array generated by bison. */
14781+%right '?' /* ? */
14782+%left '|' /* || */
14783+%left '&' /* && */
14784+%left EQUOP2 /* == != */
14785+%left CMPOP2 /* < > <= >= */
14786+%left ADDOP2 /* + - */
14787+%left MULOP2 /* * / % */
14788+%right '!' /* ! */
14789+
14790+%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
14791+%token <num> NUMBER
14792+%type <exp> exp
14793+
14794+%%
14795+
14796+start: exp
14797+ {
14798+ if ($1 == NULL)
14799+ YYABORT;
14800+ ((struct parse_args *) arg)->res = $1;
14801+ }
14802+ ;
14803+
14804+exp: exp '?' exp ':' exp
14805+ {
14806+ $$ = new_exp_3 (qmop, $1, $3, $5);
14807+ }
14808+ | exp '|' exp
14809+ {
14810+ $$ = new_exp_2 (lor, $1, $3);
14811+ }
14812+ | exp '&' exp
14813+ {
14814+ $$ = new_exp_2 (land, $1, $3);
14815+ }
14816+ | exp EQUOP2 exp
14817+ {
14818+ $$ = new_exp_2 ($2, $1, $3);
14819+ }
14820+ | exp CMPOP2 exp
14821+ {
14822+ $$ = new_exp_2 ($2, $1, $3);
14823+ }
14824+ | exp ADDOP2 exp
14825+ {
14826+ $$ = new_exp_2 ($2, $1, $3);
14827+ }
14828+ | exp MULOP2 exp
14829+ {
14830+ $$ = new_exp_2 ($2, $1, $3);
14831+ }
14832+ | '!' exp
14833+ {
14834+ $$ = new_exp_1 (lnot, $2);
14835+ }
14836+ | 'n'
14837+ {
14838+ $$ = new_exp_0 (var);
14839+ }
14840+ | NUMBER
14841+ {
14842+ if (($$ = new_exp_0 (num)) != NULL)
14843+ $$->val.num = $1;
14844+ }
14845+ | '(' exp ')'
14846+ {
14847+ $$ = $2;
14848+ }
14849+ ;
14850+
14851+%%
14852+
14853+void
14854+internal_function
14855+FREE_EXPRESSION (struct expression *exp)
14856+{
14857+ if (exp == NULL)
14858+ return;
14859+
14860+ /* Handle the recursive case. */
14861+ switch (exp->nargs)
14862+ {
14863+ case 3:
14864+ FREE_EXPRESSION (exp->val.args[2]);
14865+ /* FALLTHROUGH */
14866+ case 2:
14867+ FREE_EXPRESSION (exp->val.args[1]);
14868+ /* FALLTHROUGH */
14869+ case 1:
14870+ FREE_EXPRESSION (exp->val.args[0]);
14871+ /* FALLTHROUGH */
14872+ default:
14873+ break;
14874+ }
14875+
14876+ free (exp);
14877+}
14878+
14879+
14880+static int
14881+yylex (YYSTYPE *lval, const char **pexp)
14882+{
14883+ const char *exp = *pexp;
14884+ int result;
14885+
14886+ while (1)
14887+ {
14888+ if (exp[0] == '\0')
14889+ {
14890+ *pexp = exp;
14891+ return YYEOF;
14892+ }
14893+
14894+ if (exp[0] != ' ' && exp[0] != '\t')
14895+ break;
14896+
14897+ ++exp;
14898+ }
14899+
14900+ result = *exp++;
14901+ switch (result)
14902+ {
14903+ case '0': case '1': case '2': case '3': case '4':
14904+ case '5': case '6': case '7': case '8': case '9':
14905+ {
14906+ unsigned long int n = result - '0';
14907+ while (exp[0] >= '0' && exp[0] <= '9')
14908+ {
14909+ n *= 10;
14910+ n += exp[0] - '0';
14911+ ++exp;
14912+ }
14913+ lval->num = n;
14914+ result = NUMBER;
14915+ }
14916+ break;
14917+
14918+ case '=':
14919+ if (exp[0] == '=')
14920+ {
14921+ ++exp;
14922+ lval->op = equal;
14923+ result = EQUOP2;
14924+ }
14925+ else
14926+ result = YYERRCODE;
14927+ break;
14928+
14929+ case '!':
14930+ if (exp[0] == '=')
14931+ {
14932+ ++exp;
14933+ lval->op = not_equal;
14934+ result = EQUOP2;
14935+ }
14936+ break;
14937+
14938+ case '&':
14939+ case '|':
14940+ if (exp[0] == result)
14941+ ++exp;
14942+ else
14943+ result = YYERRCODE;
14944+ break;
14945+
14946+ case '<':
14947+ if (exp[0] == '=')
14948+ {
14949+ ++exp;
14950+ lval->op = less_or_equal;
14951+ }
14952+ else
14953+ lval->op = less_than;
14954+ result = CMPOP2;
14955+ break;
14956+
14957+ case '>':
14958+ if (exp[0] == '=')
14959+ {
14960+ ++exp;
14961+ lval->op = greater_or_equal;
14962+ }
14963+ else
14964+ lval->op = greater_than;
14965+ result = CMPOP2;
14966+ break;
14967+
14968+ case '*':
14969+ lval->op = mult;
14970+ result = MULOP2;
14971+ break;
14972+
14973+ case '/':
14974+ lval->op = divide;
14975+ result = MULOP2;
14976+ break;
14977+
14978+ case '%':
14979+ lval->op = module;
14980+ result = MULOP2;
14981+ break;
14982+
14983+ case '+':
14984+ lval->op = plus;
14985+ result = ADDOP2;
14986+ break;
14987+
14988+ case '-':
14989+ lval->op = minus;
14990+ result = ADDOP2;
14991+ break;
14992+
14993+ case 'n':
14994+ case '?':
14995+ case ':':
14996+ case '(':
14997+ case ')':
14998+ /* Nothing, just return the character. */
14999+ break;
15000+
15001+ case ';':
15002+ case '\n':
15003+ case '\0':
15004+ /* Be safe and let the user call this function again. */
15005+ --exp;
15006+ result = YYEOF;
15007+ break;
15008+
15009+ default:
15010+ result = YYERRCODE;
15011+#if YYDEBUG != 0
15012+ --exp;
15013+#endif
15014+ break;
15015+ }
15016+
15017+ *pexp = exp;
15018+
15019+ return result;
15020+}
15021+
15022+
15023+static void
15024+yyerror (const char *str)
15025+{
15026+ /* Do nothing. We don't print error messages here. */
15027+}
15028--- lrzsz-0.12.20.safe/intl/po2tbl.sed.in 1998-04-26 09:20:52.000000000 -0400
15029+++ lrzsz-0.12.20/intl/po2tbl.sed.in 1969-12-31 19:00:00.000000000 -0500
15030@@ -1,102 +0,0 @@
15031-# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
15032-# Copyright (C) 1995 Free Software Foundation, Inc.
15033-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
15034-#
15035-# This program is free software; you can redistribute it and/or modify
15036-# it under the terms of the GNU General Public License as published by
15037-# the Free Software Foundation; either version 2, or (at your option)
15038-# any later version.
15039-#
15040-# This program is distributed in the hope that it will be useful,
15041-# but WITHOUT ANY WARRANTY; without even the implied warranty of
15042-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15043-# GNU General Public License for more details.
15044-#
15045-# You should have received a copy of the GNU General Public License
15046-# along with this program; if not, write to the Free Software
15047-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15048-#
15049-1 {
15050- i\
15051-/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\
15052-\
15053-#if HAVE_CONFIG_H\
15054-# include <config.h>\
15055-#endif\
15056-\
15057-#include "libgettext.h"\
15058-\
15059-const struct _msg_ent _msg_tbl[] = {
15060- h
15061- s/.*/0/
15062- x
15063-}
15064-#
15065-# Write msgid entries in C array form.
15066-#
15067-/^msgid/ {
15068- s/msgid[ ]*\(".*"\)/ {\1/
15069- tb
15070-# Append the next line
15071- :b
15072- N
15073-# Look whether second part is continuation line.
15074- s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
15075-# Yes, then branch.
15076- ta
15077-# Because we assume that the input file correctly formed the line
15078-# just read cannot be again be a msgid line. So it's safe to ignore
15079-# it.
15080- s/\(.*\)\n.*/\1/
15081- bc
15082-# We found a continuation line. But before printing insert '\'.
15083- :a
15084- s/\(.*\)\(\n.*\)/\1\\\2/
15085- P
15086-# We cannot use D here.
15087- s/.*\n\(.*\)/\1/
15088-# Some buggy seds do not clear the `successful substitution since last ``t'''
15089-# flag on `N', so we do a `t' here to clear it.
15090- tb
15091-# Not reached
15092- :c
15093- x
15094-# The following nice solution is by
15095-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
15096- td
15097-# Increment a decimal number in pattern space.
15098-# First hide trailing `9' digits.
15099- :d
15100- s/9\(_*\)$/_\1/
15101- td
15102-# Assure at least one digit is available.
15103- s/^\(_*\)$/0\1/
15104-# Increment the last digit.
15105- s/8\(_*\)$/9\1/
15106- s/7\(_*\)$/8\1/
15107- s/6\(_*\)$/7\1/
15108- s/5\(_*\)$/6\1/
15109- s/4\(_*\)$/5\1/
15110- s/3\(_*\)$/4\1/
15111- s/2\(_*\)$/3\1/
15112- s/1\(_*\)$/2\1/
15113- s/0\(_*\)$/1\1/
15114-# Convert the hidden `9' digits to `0's.
15115- s/_/0/g
15116- x
15117- G
15118- s/\(.*\)\n\([0-9]*\)/\1, \2},/
15119- s/\(.*\)"$/\1/
15120- p
15121-}
15122-#
15123-# Last line.
15124-#
15125-$ {
15126- i\
15127-};\
15128-
15129- g
15130- s/0*\(.*\)/int _msg_tbl_length = \1;/p
15131-}
15132-d
15133--- lrzsz-0.12.20.safe/intl/printf-args.c 1969-12-31 19:00:00.000000000 -0500
15134+++ lrzsz-0.12.20/intl/printf-args.c 2004-09-12 14:40:34.595711608 -0400
15135@@ -0,0 +1,119 @@
15136+/* Decomposed printf argument list.
15137+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
15138+
15139+ This program is free software; you can redistribute it and/or modify it
15140+ under the terms of the GNU Library General Public License as published
15141+ by the Free Software Foundation; either version 2, or (at your option)
15142+ any later version.
15143+
15144+ This program is distributed in the hope that it will be useful,
15145+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15146+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15147+ Library General Public License for more details.
15148+
15149+ You should have received a copy of the GNU Library General Public
15150+ License along with this program; if not, write to the Free Software
15151+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15152+ USA. */
15153+
15154+#ifdef HAVE_CONFIG_H
15155+# include <config.h>
15156+#endif
15157+
15158+/* Specification. */
15159+#include "printf-args.h"
15160+
15161+#ifdef STATIC
15162+STATIC
15163+#endif
15164+int
15165+printf_fetchargs (va_list args, arguments *a)
15166+{
15167+ size_t i;
15168+ argument *ap;
15169+
15170+ for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
15171+ switch (ap->type)
15172+ {
15173+ case TYPE_SCHAR:
15174+ ap->a.a_schar = va_arg (args, /*signed char*/ int);
15175+ break;
15176+ case TYPE_UCHAR:
15177+ ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
15178+ break;
15179+ case TYPE_SHORT:
15180+ ap->a.a_short = va_arg (args, /*short*/ int);
15181+ break;
15182+ case TYPE_USHORT:
15183+ ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
15184+ break;
15185+ case TYPE_INT:
15186+ ap->a.a_int = va_arg (args, int);
15187+ break;
15188+ case TYPE_UINT:
15189+ ap->a.a_uint = va_arg (args, unsigned int);
15190+ break;
15191+ case TYPE_LONGINT:
15192+ ap->a.a_longint = va_arg (args, long int);
15193+ break;
15194+ case TYPE_ULONGINT:
15195+ ap->a.a_ulongint = va_arg (args, unsigned long int);
15196+ break;
15197+#ifdef HAVE_LONG_LONG
15198+ case TYPE_LONGLONGINT:
15199+ ap->a.a_longlongint = va_arg (args, long long int);
15200+ break;
15201+ case TYPE_ULONGLONGINT:
15202+ ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
15203+ break;
15204+#endif
15205+ case TYPE_DOUBLE:
15206+ ap->a.a_double = va_arg (args, double);
15207+ break;
15208+#ifdef HAVE_LONG_DOUBLE
15209+ case TYPE_LONGDOUBLE:
15210+ ap->a.a_longdouble = va_arg (args, long double);
15211+ break;
15212+#endif
15213+ case TYPE_CHAR:
15214+ ap->a.a_char = va_arg (args, int);
15215+ break;
15216+#ifdef HAVE_WINT_T
15217+ case TYPE_WIDE_CHAR:
15218+ ap->a.a_wide_char = va_arg (args, wint_t);
15219+ break;
15220+#endif
15221+ case TYPE_STRING:
15222+ ap->a.a_string = va_arg (args, const char *);
15223+ break;
15224+#ifdef HAVE_WCHAR_T
15225+ case TYPE_WIDE_STRING:
15226+ ap->a.a_wide_string = va_arg (args, const wchar_t *);
15227+ break;
15228+#endif
15229+ case TYPE_POINTER:
15230+ ap->a.a_pointer = va_arg (args, void *);
15231+ break;
15232+ case TYPE_COUNT_SCHAR_POINTER:
15233+ ap->a.a_count_schar_pointer = va_arg (args, signed char *);
15234+ break;
15235+ case TYPE_COUNT_SHORT_POINTER:
15236+ ap->a.a_count_short_pointer = va_arg (args, short *);
15237+ break;
15238+ case TYPE_COUNT_INT_POINTER:
15239+ ap->a.a_count_int_pointer = va_arg (args, int *);
15240+ break;
15241+ case TYPE_COUNT_LONGINT_POINTER:
15242+ ap->a.a_count_longint_pointer = va_arg (args, long int *);
15243+ break;
15244+#ifdef HAVE_LONG_LONG
15245+ case TYPE_COUNT_LONGLONGINT_POINTER:
15246+ ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
15247+ break;
15248+#endif
15249+ default:
15250+ /* Unknown type. */
15251+ return -1;
15252+ }
15253+ return 0;
15254+}
15255--- lrzsz-0.12.20.safe/intl/printf-args.h 1969-12-31 19:00:00.000000000 -0500
15256+++ lrzsz-0.12.20/intl/printf-args.h 2004-09-12 14:40:34.601710696 -0400
15257@@ -0,0 +1,137 @@
15258+/* Decomposed printf argument list.
15259+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
15260+
15261+ This program is free software; you can redistribute it and/or modify it
15262+ under the terms of the GNU Library General Public License as published
15263+ by the Free Software Foundation; either version 2, or (at your option)
15264+ any later version.
15265+
15266+ This program is distributed in the hope that it will be useful,
15267+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15268+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15269+ Library General Public License for more details.
15270+
15271+ You should have received a copy of the GNU Library General Public
15272+ License along with this program; if not, write to the Free Software
15273+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15274+ USA. */
15275+
15276+#ifndef _PRINTF_ARGS_H
15277+#define _PRINTF_ARGS_H
15278+
15279+/* Get size_t. */
15280+#include <stddef.h>
15281+
15282+/* Get wchar_t. */
15283+#ifdef HAVE_WCHAR_T
15284+# include <stddef.h>
15285+#endif
15286+
15287+/* Get wint_t. */
15288+#ifdef HAVE_WINT_T
15289+# include <wchar.h>
15290+#endif
15291+
15292+/* Get va_list. */
15293+#include <stdarg.h>
15294+
15295+
15296+/* Argument types */
15297+typedef enum
15298+{
15299+ TYPE_NONE,
15300+ TYPE_SCHAR,
15301+ TYPE_UCHAR,
15302+ TYPE_SHORT,
15303+ TYPE_USHORT,
15304+ TYPE_INT,
15305+ TYPE_UINT,
15306+ TYPE_LONGINT,
15307+ TYPE_ULONGINT,
15308+#ifdef HAVE_LONG_LONG
15309+ TYPE_LONGLONGINT,
15310+ TYPE_ULONGLONGINT,
15311+#endif
15312+ TYPE_DOUBLE,
15313+#ifdef HAVE_LONG_DOUBLE
15314+ TYPE_LONGDOUBLE,
15315+#endif
15316+ TYPE_CHAR,
15317+#ifdef HAVE_WINT_T
15318+ TYPE_WIDE_CHAR,
15319+#endif
15320+ TYPE_STRING,
15321+#ifdef HAVE_WCHAR_T
15322+ TYPE_WIDE_STRING,
15323+#endif
15324+ TYPE_POINTER,
15325+ TYPE_COUNT_SCHAR_POINTER,
15326+ TYPE_COUNT_SHORT_POINTER,
15327+ TYPE_COUNT_INT_POINTER,
15328+ TYPE_COUNT_LONGINT_POINTER
15329+#ifdef HAVE_LONG_LONG
15330+, TYPE_COUNT_LONGLONGINT_POINTER
15331+#endif
15332+} arg_type;
15333+
15334+/* Polymorphic argument */
15335+typedef struct
15336+{
15337+ arg_type type;
15338+ union
15339+ {
15340+ signed char a_schar;
15341+ unsigned char a_uchar;
15342+ short a_short;
15343+ unsigned short a_ushort;
15344+ int a_int;
15345+ unsigned int a_uint;
15346+ long int a_longint;
15347+ unsigned long int a_ulongint;
15348+#ifdef HAVE_LONG_LONG
15349+ long long int a_longlongint;
15350+ unsigned long long int a_ulonglongint;
15351+#endif
15352+ float a_float;
15353+ double a_double;
15354+#ifdef HAVE_LONG_DOUBLE
15355+ long double a_longdouble;
15356+#endif
15357+ int a_char;
15358+#ifdef HAVE_WINT_T
15359+ wint_t a_wide_char;
15360+#endif
15361+ const char* a_string;
15362+#ifdef HAVE_WCHAR_T
15363+ const wchar_t* a_wide_string;
15364+#endif
15365+ void* a_pointer;
15366+ signed char * a_count_schar_pointer;
15367+ short * a_count_short_pointer;
15368+ int * a_count_int_pointer;
15369+ long int * a_count_longint_pointer;
15370+#ifdef HAVE_LONG_LONG
15371+ long long int * a_count_longlongint_pointer;
15372+#endif
15373+ }
15374+ a;
15375+}
15376+argument;
15377+
15378+typedef struct
15379+{
15380+ size_t count;
15381+ argument *arg;
15382+}
15383+arguments;
15384+
15385+
15386+/* Fetch the arguments, putting them into a. */
15387+#ifdef STATIC
15388+STATIC
15389+#else
15390+extern
15391+#endif
15392+int printf_fetchargs (va_list args, arguments *a);
15393+
15394+#endif /* _PRINTF_ARGS_H */
15395--- lrzsz-0.12.20.safe/intl/printf.c 1969-12-31 19:00:00.000000000 -0500
15396+++ lrzsz-0.12.20/intl/printf.c 2004-09-12 14:40:34.607709784 -0400
15397@@ -0,0 +1,371 @@
15398+/* Formatted output to strings, using POSIX/XSI format strings with positions.
15399+ Copyright (C) 2003 Free Software Foundation, Inc.
15400+ Written by Bruno Haible <bruno@clisp.org>, 2003.
15401+
15402+ This program is free software; you can redistribute it and/or modify it
15403+ under the terms of the GNU Library General Public License as published
15404+ by the Free Software Foundation; either version 2, or (at your option)
15405+ any later version.
15406+
15407+ This program is distributed in the hope that it will be useful,
15408+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15409+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15410+ Library General Public License for more details.
15411+
15412+ You should have received a copy of the GNU Library General Public
15413+ License along with this program; if not, write to the Free Software
15414+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15415+ USA. */
15416+
15417+#ifdef HAVE_CONFIG_H
15418+# include <config.h>
15419+#endif
15420+
15421+#ifdef __GNUC__
15422+# define alloca __builtin_alloca
15423+# define HAVE_ALLOCA 1
15424+#else
15425+# ifdef _MSC_VER
15426+# include <malloc.h>
15427+# define alloca _alloca
15428+# else
15429+# if defined HAVE_ALLOCA_H || defined _LIBC
15430+# include <alloca.h>
15431+# else
15432+# ifdef _AIX
15433+ #pragma alloca
15434+# else
15435+# ifndef alloca
15436+char *alloca ();
15437+# endif
15438+# endif
15439+# endif
15440+# endif
15441+#endif
15442+
15443+#include <stdio.h>
15444+
15445+#if !HAVE_POSIX_PRINTF
15446+
15447+#include <stdlib.h>
15448+#include <string.h>
15449+
15450+/* When building a DLL, we must export some functions. Note that because
15451+ the functions are only defined for binary backward compatibility, we
15452+ don't need to use __declspec(dllimport) in any case. */
15453+#if defined _MSC_VER && BUILDING_DLL
15454+# define DLL_EXPORTED __declspec(dllexport)
15455+#else
15456+# define DLL_EXPORTED
15457+#endif
15458+
15459+#define STATIC static
15460+
15461+/* Define auxiliary functions declared in "printf-args.h". */
15462+#include "printf-args.c"
15463+
15464+/* Define auxiliary functions declared in "printf-parse.h". */
15465+#include "printf-parse.c"
15466+
15467+/* Define functions declared in "vasnprintf.h". */
15468+#define vasnprintf libintl_vasnprintf
15469+#include "vasnprintf.c"
15470+#if 0 /* not needed */
15471+#define asnprintf libintl_asnprintf
15472+#include "asnprintf.c"
15473+#endif
15474+
15475+DLL_EXPORTED
15476+int
15477+libintl_vfprintf (FILE *stream, const char *format, va_list args)
15478+{
15479+ if (strchr (format, '$') == NULL)
15480+ return vfprintf (stream, format, args);
15481+ else
15482+ {
15483+ size_t length;
15484+ char *result = libintl_vasnprintf (NULL, &length, format, args);
15485+ int retval = -1;
15486+ if (result != NULL)
15487+ {
15488+ if (fwrite (result, 1, length, stream) == length)
15489+ retval = length;
15490+ free (result);
15491+ }
15492+ return retval;
15493+ }
15494+}
15495+
15496+DLL_EXPORTED
15497+int
15498+libintl_fprintf (FILE *stream, const char *format, ...)
15499+{
15500+ va_list args;
15501+ int retval;
15502+
15503+ va_start (args, format);
15504+ retval = libintl_vfprintf (stream, format, args);
15505+ va_end (args);
15506+ return retval;
15507+}
15508+
15509+DLL_EXPORTED
15510+int
15511+libintl_vprintf (const char *format, va_list args)
15512+{
15513+ return libintl_vfprintf (stdout, format, args);
15514+}
15515+
15516+DLL_EXPORTED
15517+int
15518+libintl_printf (const char *format, ...)
15519+{
15520+ va_list args;
15521+ int retval;
15522+
15523+ va_start (args, format);
15524+ retval = libintl_vprintf (format, args);
15525+ va_end (args);
15526+ return retval;
15527+}
15528+
15529+DLL_EXPORTED
15530+int
15531+libintl_vsprintf (char *resultbuf, const char *format, va_list args)
15532+{
15533+ if (strchr (format, '$') == NULL)
15534+ return vsprintf (resultbuf, format, args);
15535+ else
15536+ {
15537+ size_t length = (size_t) ~0 / (4 * sizeof (char));
15538+ char *result = libintl_vasnprintf (resultbuf, &length, format, args);
15539+ if (result != resultbuf)
15540+ {
15541+ free (result);
15542+ return -1;
15543+ }
15544+ else
15545+ return length;
15546+ }
15547+}
15548+
15549+DLL_EXPORTED
15550+int
15551+libintl_sprintf (char *resultbuf, const char *format, ...)
15552+{
15553+ va_list args;
15554+ int retval;
15555+
15556+ va_start (args, format);
15557+ retval = libintl_vsprintf (resultbuf, format, args);
15558+ va_end (args);
15559+ return retval;
15560+}
15561+
15562+#if HAVE_SNPRINTF
15563+
15564+# if HAVE_DECL__SNPRINTF
15565+ /* Windows. */
15566+# define system_vsnprintf _vsnprintf
15567+# else
15568+ /* Unix. */
15569+# define system_vsnprintf vsnprintf
15570+# endif
15571+
15572+DLL_EXPORTED
15573+int
15574+libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args)
15575+{
15576+ if (strchr (format, '$') == NULL)
15577+ return system_vsnprintf (resultbuf, length, format, args);
15578+ else
15579+ {
15580+ size_t maxlength = length;
15581+ char *result = libintl_vasnprintf (resultbuf, &length, format, args);
15582+ if (result != resultbuf)
15583+ {
15584+ if (maxlength > 0)
15585+ {
15586+ if (length < maxlength)
15587+ abort ();
15588+ memcpy (resultbuf, result, maxlength - 1);
15589+ resultbuf[maxlength - 1] = '\0';
15590+ }
15591+ free (result);
15592+ return -1;
15593+ }
15594+ else
15595+ return length;
15596+ }
15597+}
15598+
15599+DLL_EXPORTED
15600+int
15601+libintl_snprintf (char *resultbuf, size_t length, const char *format, ...)
15602+{
15603+ va_list args;
15604+ int retval;
15605+
15606+ va_start (args, format);
15607+ retval = libintl_vsnprintf (resultbuf, length, format, args);
15608+ va_end (args);
15609+ return retval;
15610+}
15611+
15612+#endif
15613+
15614+#if HAVE_ASPRINTF
15615+
15616+DLL_EXPORTED
15617+int
15618+libintl_vasprintf (char **resultp, const char *format, va_list args)
15619+{
15620+ size_t length;
15621+ char *result = libintl_vasnprintf (NULL, &length, format, args);
15622+ if (result == NULL)
15623+ return -1;
15624+ *resultp = result;
15625+ return length;
15626+}
15627+
15628+DLL_EXPORTED
15629+int
15630+libintl_asprintf (char **resultp, const char *format, ...)
15631+{
15632+ va_list args;
15633+ int retval;
15634+
15635+ va_start (args, format);
15636+ retval = libintl_vasprintf (resultp, format, args);
15637+ va_end (args);
15638+ return retval;
15639+}
15640+
15641+#endif
15642+
15643+#if HAVE_FWPRINTF
15644+
15645+#include <wchar.h>
15646+
15647+#define WIDE_CHAR_VERSION 1
15648+
15649+/* Define auxiliary functions declared in "wprintf-parse.h". */
15650+#include "printf-parse.c"
15651+
15652+/* Define functions declared in "vasnprintf.h". */
15653+#define vasnwprintf libintl_vasnwprintf
15654+#include "vasnprintf.c"
15655+#if 0 /* not needed */
15656+#define asnwprintf libintl_asnwprintf
15657+#include "asnprintf.c"
15658+#endif
15659+
15660+# if HAVE_DECL__SNWPRINTF
15661+ /* Windows. */
15662+# define system_vswprintf _vsnwprintf
15663+# else
15664+ /* Unix. */
15665+# define system_vswprintf vswprintf
15666+# endif
15667+
15668+DLL_EXPORTED
15669+int
15670+libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args)
15671+{
15672+ if (wcschr (format, '$') == NULL)
15673+ return vfwprintf (stream, format, args);
15674+ else
15675+ {
15676+ size_t length;
15677+ wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args);
15678+ int retval = -1;
15679+ if (result != NULL)
15680+ {
15681+ size_t i;
15682+ for (i = 0; i < length; i++)
15683+ if (fputwc (result[i], stream) == WEOF)
15684+ break;
15685+ if (i == length)
15686+ retval = length;
15687+ free (result);
15688+ }
15689+ return retval;
15690+ }
15691+}
15692+
15693+DLL_EXPORTED
15694+int
15695+libintl_fwprintf (FILE *stream, const wchar_t *format, ...)
15696+{
15697+ va_list args;
15698+ int retval;
15699+
15700+ va_start (args, format);
15701+ retval = libintl_vfwprintf (stream, format, args);
15702+ va_end (args);
15703+ return retval;
15704+}
15705+
15706+DLL_EXPORTED
15707+int
15708+libintl_vwprintf (const wchar_t *format, va_list args)
15709+{
15710+ return libintl_vfwprintf (stdout, format, args);
15711+}
15712+
15713+DLL_EXPORTED
15714+int
15715+libintl_wprintf (const wchar_t *format, ...)
15716+{
15717+ va_list args;
15718+ int retval;
15719+
15720+ va_start (args, format);
15721+ retval = libintl_vwprintf (format, args);
15722+ va_end (args);
15723+ return retval;
15724+}
15725+
15726+DLL_EXPORTED
15727+int
15728+libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args)
15729+{
15730+ if (wcschr (format, '$') == NULL)
15731+ return system_vswprintf (resultbuf, length, format, args);
15732+ else
15733+ {
15734+ size_t maxlength = length;
15735+ wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args);
15736+ if (result != resultbuf)
15737+ {
15738+ if (maxlength > 0)
15739+ {
15740+ if (length < maxlength)
15741+ abort ();
15742+ memcpy (resultbuf, result, (maxlength - 1) * sizeof (wchar_t));
15743+ resultbuf[maxlength - 1] = 0;
15744+ }
15745+ free (result);
15746+ return -1;
15747+ }
15748+ else
15749+ return length;
15750+ }
15751+}
15752+
15753+DLL_EXPORTED
15754+int
15755+libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...)
15756+{
15757+ va_list args;
15758+ int retval;
15759+
15760+ va_start (args, format);
15761+ retval = libintl_vswprintf (resultbuf, length, format, args);
15762+ va_end (args);
15763+ return retval;
15764+}
15765+
15766+#endif
15767+
15768+#endif
15769--- lrzsz-0.12.20.safe/intl/printf-parse.c 1969-12-31 19:00:00.000000000 -0500
15770+++ lrzsz-0.12.20/intl/printf-parse.c 2004-09-12 14:40:34.622707504 -0400
15771@@ -0,0 +1,537 @@
15772+/* Formatted output to strings.
15773+ Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc.
15774+
15775+ This program is free software; you can redistribute it and/or modify it
15776+ under the terms of the GNU Library General Public License as published
15777+ by the Free Software Foundation; either version 2, or (at your option)
15778+ any later version.
15779+
15780+ This program is distributed in the hope that it will be useful,
15781+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15782+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15783+ Library General Public License for more details.
15784+
15785+ You should have received a copy of the GNU Library General Public
15786+ License along with this program; if not, write to the Free Software
15787+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15788+ USA. */
15789+
15790+#ifdef HAVE_CONFIG_H
15791+# include <config.h>
15792+#endif
15793+
15794+/* Specification. */
15795+#if WIDE_CHAR_VERSION
15796+# include "wprintf-parse.h"
15797+#else
15798+# include "printf-parse.h"
15799+#endif
15800+
15801+/* Get size_t, NULL. */
15802+#include <stddef.h>
15803+
15804+/* Get intmax_t. */
15805+#if HAVE_STDINT_H_WITH_UINTMAX
15806+# include <stdint.h>
15807+#endif
15808+#if HAVE_INTTYPES_H_WITH_UINTMAX
15809+# include <inttypes.h>
15810+#endif
15811+
15812+/* malloc(), realloc(), free(). */
15813+#include <stdlib.h>
15814+
15815+/* Checked size_t computations. */
15816+#include "xsize.h"
15817+
15818+#if WIDE_CHAR_VERSION
15819+# define PRINTF_PARSE wprintf_parse
15820+# define CHAR_T wchar_t
15821+# define DIRECTIVE wchar_t_directive
15822+# define DIRECTIVES wchar_t_directives
15823+#else
15824+# define PRINTF_PARSE printf_parse
15825+# define CHAR_T char
15826+# define DIRECTIVE char_directive
15827+# define DIRECTIVES char_directives
15828+#endif
15829+
15830+#ifdef STATIC
15831+STATIC
15832+#endif
15833+int
15834+PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
15835+{
15836+ const CHAR_T *cp = format; /* pointer into format */
15837+ size_t arg_posn = 0; /* number of regular arguments consumed */
15838+ size_t d_allocated; /* allocated elements of d->dir */
15839+ size_t a_allocated; /* allocated elements of a->arg */
15840+ size_t max_width_length = 0;
15841+ size_t max_precision_length = 0;
15842+
15843+ d->count = 0;
15844+ d_allocated = 1;
15845+ d->dir = malloc (d_allocated * sizeof (DIRECTIVE));
15846+ if (d->dir == NULL)
15847+ /* Out of memory. */
15848+ return -1;
15849+
15850+ a->count = 0;
15851+ a_allocated = 0;
15852+ a->arg = NULL;
15853+
15854+#define REGISTER_ARG(_index_,_type_) \
15855+ { \
15856+ size_t n = (_index_); \
15857+ if (n >= a_allocated) \
15858+ { \
15859+ size_t memory_size; \
15860+ argument *memory; \
15861+ \
15862+ a_allocated = xtimes (a_allocated, 2); \
15863+ if (a_allocated <= n) \
15864+ a_allocated = xsum (n, 1); \
15865+ memory_size = xtimes (a_allocated, sizeof (argument)); \
15866+ if (size_overflow_p (memory_size)) \
15867+ /* Overflow, would lead to out of memory. */ \
15868+ goto error; \
15869+ memory = (a->arg \
15870+ ? realloc (a->arg, memory_size) \
15871+ : malloc (memory_size)); \
15872+ if (memory == NULL) \
15873+ /* Out of memory. */ \
15874+ goto error; \
15875+ a->arg = memory; \
15876+ } \
15877+ while (a->count <= n) \
15878+ a->arg[a->count++].type = TYPE_NONE; \
15879+ if (a->arg[n].type == TYPE_NONE) \
15880+ a->arg[n].type = (_type_); \
15881+ else if (a->arg[n].type != (_type_)) \
15882+ /* Ambiguous type for positional argument. */ \
15883+ goto error; \
15884+ }
15885+
15886+ while (*cp != '\0')
15887+ {
15888+ CHAR_T c = *cp++;
15889+ if (c == '%')
15890+ {
15891+ size_t arg_index = ARG_NONE;
15892+ DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */
15893+
15894+ /* Initialize the next directive. */
15895+ dp->dir_start = cp - 1;
15896+ dp->flags = 0;
15897+ dp->width_start = NULL;
15898+ dp->width_end = NULL;
15899+ dp->width_arg_index = ARG_NONE;
15900+ dp->precision_start = NULL;
15901+ dp->precision_end = NULL;
15902+ dp->precision_arg_index = ARG_NONE;
15903+ dp->arg_index = ARG_NONE;
15904+
15905+ /* Test for positional argument. */
15906+ if (*cp >= '0' && *cp <= '9')
15907+ {
15908+ const CHAR_T *np;
15909+
15910+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15911+ ;
15912+ if (*np == '$')
15913+ {
15914+ size_t n = 0;
15915+
15916+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15917+ n = xsum (xtimes (n, 10), *np - '0');
15918+ if (n == 0)
15919+ /* Positional argument 0. */
15920+ goto error;
15921+ if (size_overflow_p (n))
15922+ /* n too large, would lead to out of memory later. */
15923+ goto error;
15924+ arg_index = n - 1;
15925+ cp = np + 1;
15926+ }
15927+ }
15928+
15929+ /* Read the flags. */
15930+ for (;;)
15931+ {
15932+ if (*cp == '\'')
15933+ {
15934+ dp->flags |= FLAG_GROUP;
15935+ cp++;
15936+ }
15937+ else if (*cp == '-')
15938+ {
15939+ dp->flags |= FLAG_LEFT;
15940+ cp++;
15941+ }
15942+ else if (*cp == '+')
15943+ {
15944+ dp->flags |= FLAG_SHOWSIGN;
15945+ cp++;
15946+ }
15947+ else if (*cp == ' ')
15948+ {
15949+ dp->flags |= FLAG_SPACE;
15950+ cp++;
15951+ }
15952+ else if (*cp == '#')
15953+ {
15954+ dp->flags |= FLAG_ALT;
15955+ cp++;
15956+ }
15957+ else if (*cp == '0')
15958+ {
15959+ dp->flags |= FLAG_ZERO;
15960+ cp++;
15961+ }
15962+ else
15963+ break;
15964+ }
15965+
15966+ /* Parse the field width. */
15967+ if (*cp == '*')
15968+ {
15969+ dp->width_start = cp;
15970+ cp++;
15971+ dp->width_end = cp;
15972+ if (max_width_length < 1)
15973+ max_width_length = 1;
15974+
15975+ /* Test for positional argument. */
15976+ if (*cp >= '0' && *cp <= '9')
15977+ {
15978+ const CHAR_T *np;
15979+
15980+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15981+ ;
15982+ if (*np == '$')
15983+ {
15984+ size_t n = 0;
15985+
15986+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15987+ n = xsum (xtimes (n, 10), *np - '0');
15988+ if (n == 0)
15989+ /* Positional argument 0. */
15990+ goto error;
15991+ if (size_overflow_p (n))
15992+ /* n too large, would lead to out of memory later. */
15993+ goto error;
15994+ dp->width_arg_index = n - 1;
15995+ cp = np + 1;
15996+ }
15997+ }
15998+ if (dp->width_arg_index == ARG_NONE)
15999+ {
16000+ dp->width_arg_index = arg_posn++;
16001+ if (dp->width_arg_index == ARG_NONE)
16002+ /* arg_posn wrapped around. */
16003+ goto error;
16004+ }
16005+ REGISTER_ARG (dp->width_arg_index, TYPE_INT);
16006+ }
16007+ else if (*cp >= '0' && *cp <= '9')
16008+ {
16009+ size_t width_length;
16010+
16011+ dp->width_start = cp;
16012+ for (; *cp >= '0' && *cp <= '9'; cp++)
16013+ ;
16014+ dp->width_end = cp;
16015+ width_length = dp->width_end - dp->width_start;
16016+ if (max_width_length < width_length)
16017+ max_width_length = width_length;
16018+ }
16019+
16020+ /* Parse the precision. */
16021+ if (*cp == '.')
16022+ {
16023+ cp++;
16024+ if (*cp == '*')
16025+ {
16026+ dp->precision_start = cp - 1;
16027+ cp++;
16028+ dp->precision_end = cp;
16029+ if (max_precision_length < 2)
16030+ max_precision_length = 2;
16031+
16032+ /* Test for positional argument. */
16033+ if (*cp >= '0' && *cp <= '9')
16034+ {
16035+ const CHAR_T *np;
16036+
16037+ for (np = cp; *np >= '0' && *np <= '9'; np++)
16038+ ;
16039+ if (*np == '$')
16040+ {
16041+ size_t n = 0;
16042+
16043+ for (np = cp; *np >= '0' && *np <= '9'; np++)
16044+ n = xsum (xtimes (n, 10), *np - '0');
16045+ if (n == 0)
16046+ /* Positional argument 0. */
16047+ goto error;
16048+ if (size_overflow_p (n))
16049+ /* n too large, would lead to out of memory
16050+ later. */
16051+ goto error;
16052+ dp->precision_arg_index = n - 1;
16053+ cp = np + 1;
16054+ }
16055+ }
16056+ if (dp->precision_arg_index == ARG_NONE)
16057+ {
16058+ dp->precision_arg_index = arg_posn++;
16059+ if (dp->precision_arg_index == ARG_NONE)
16060+ /* arg_posn wrapped around. */
16061+ goto error;
16062+ }
16063+ REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
16064+ }
16065+ else
16066+ {
16067+ size_t precision_length;
16068+
16069+ dp->precision_start = cp - 1;
16070+ for (; *cp >= '0' && *cp <= '9'; cp++)
16071+ ;
16072+ dp->precision_end = cp;
16073+ precision_length = dp->precision_end - dp->precision_start;
16074+ if (max_precision_length < precision_length)
16075+ max_precision_length = precision_length;
16076+ }
16077+ }
16078+
16079+ {
16080+ arg_type type;
16081+
16082+ /* Parse argument type/size specifiers. */
16083+ {
16084+ int flags = 0;
16085+
16086+ for (;;)
16087+ {
16088+ if (*cp == 'h')
16089+ {
16090+ flags |= (1 << (flags & 1));
16091+ cp++;
16092+ }
16093+ else if (*cp == 'L')
16094+ {
16095+ flags |= 4;
16096+ cp++;
16097+ }
16098+ else if (*cp == 'l')
16099+ {
16100+ flags += 8;
16101+ cp++;
16102+ }
16103+#ifdef HAVE_INTMAX_T
16104+ else if (*cp == 'j')
16105+ {
16106+ if (sizeof (intmax_t) > sizeof (long))
16107+ {
16108+ /* intmax_t = long long */
16109+ flags += 16;
16110+ }
16111+ else if (sizeof (intmax_t) > sizeof (int))
16112+ {
16113+ /* intmax_t = long */
16114+ flags += 8;
16115+ }
16116+ cp++;
16117+ }
16118+#endif
16119+ else if (*cp == 'z' || *cp == 'Z')
16120+ {
16121+ /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
16122+ because the warning facility in gcc-2.95.2 understands
16123+ only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
16124+ if (sizeof (size_t) > sizeof (long))
16125+ {
16126+ /* size_t = long long */
16127+ flags += 16;
16128+ }
16129+ else if (sizeof (size_t) > sizeof (int))
16130+ {
16131+ /* size_t = long */
16132+ flags += 8;
16133+ }
16134+ cp++;
16135+ }
16136+ else if (*cp == 't')
16137+ {
16138+ if (sizeof (ptrdiff_t) > sizeof (long))
16139+ {
16140+ /* ptrdiff_t = long long */
16141+ flags += 16;
16142+ }
16143+ else if (sizeof (ptrdiff_t) > sizeof (int))
16144+ {
16145+ /* ptrdiff_t = long */
16146+ flags += 8;
16147+ }
16148+ cp++;
16149+ }
16150+ else
16151+ break;
16152+ }
16153+
16154+ /* Read the conversion character. */
16155+ c = *cp++;
16156+ switch (c)
16157+ {
16158+ case 'd': case 'i':
16159+#ifdef HAVE_LONG_LONG
16160+ if (flags >= 16 || (flags & 4))
16161+ type = TYPE_LONGLONGINT;
16162+ else
16163+#endif
16164+ if (flags >= 8)
16165+ type = TYPE_LONGINT;
16166+ else if (flags & 2)
16167+ type = TYPE_SCHAR;
16168+ else if (flags & 1)
16169+ type = TYPE_SHORT;
16170+ else
16171+ type = TYPE_INT;
16172+ break;
16173+ case 'o': case 'u': case 'x': case 'X':
16174+#ifdef HAVE_LONG_LONG
16175+ if (flags >= 16 || (flags & 4))
16176+ type = TYPE_ULONGLONGINT;
16177+ else
16178+#endif
16179+ if (flags >= 8)
16180+ type = TYPE_ULONGINT;
16181+ else if (flags & 2)
16182+ type = TYPE_UCHAR;
16183+ else if (flags & 1)
16184+ type = TYPE_USHORT;
16185+ else
16186+ type = TYPE_UINT;
16187+ break;
16188+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
16189+ case 'a': case 'A':
16190+#ifdef HAVE_LONG_DOUBLE
16191+ if (flags >= 16 || (flags & 4))
16192+ type = TYPE_LONGDOUBLE;
16193+ else
16194+#endif
16195+ type = TYPE_DOUBLE;
16196+ break;
16197+ case 'c':
16198+ if (flags >= 8)
16199+#ifdef HAVE_WINT_T
16200+ type = TYPE_WIDE_CHAR;
16201+#else
16202+ goto error;
16203+#endif
16204+ else
16205+ type = TYPE_CHAR;
16206+ break;
16207+#ifdef HAVE_WINT_T
16208+ case 'C':
16209+ type = TYPE_WIDE_CHAR;
16210+ c = 'c';
16211+ break;
16212+#endif
16213+ case 's':
16214+ if (flags >= 8)
16215+#ifdef HAVE_WCHAR_T
16216+ type = TYPE_WIDE_STRING;
16217+#else
16218+ goto error;
16219+#endif
16220+ else
16221+ type = TYPE_STRING;
16222+ break;
16223+#ifdef HAVE_WCHAR_T
16224+ case 'S':
16225+ type = TYPE_WIDE_STRING;
16226+ c = 's';
16227+ break;
16228+#endif
16229+ case 'p':
16230+ type = TYPE_POINTER;
16231+ break;
16232+ case 'n':
16233+#ifdef HAVE_LONG_LONG
16234+ if (flags >= 16 || (flags & 4))
16235+ type = TYPE_COUNT_LONGLONGINT_POINTER;
16236+ else
16237+#endif
16238+ if (flags >= 8)
16239+ type = TYPE_COUNT_LONGINT_POINTER;
16240+ else if (flags & 2)
16241+ type = TYPE_COUNT_SCHAR_POINTER;
16242+ else if (flags & 1)
16243+ type = TYPE_COUNT_SHORT_POINTER;
16244+ else
16245+ type = TYPE_COUNT_INT_POINTER;
16246+ break;
16247+ case '%':
16248+ type = TYPE_NONE;
16249+ break;
16250+ default:
16251+ /* Unknown conversion character. */
16252+ goto error;
16253+ }
16254+ }
16255+
16256+ if (type != TYPE_NONE)
16257+ {
16258+ dp->arg_index = arg_index;
16259+ if (dp->arg_index == ARG_NONE)
16260+ {
16261+ dp->arg_index = arg_posn++;
16262+ if (dp->arg_index == ARG_NONE)
16263+ /* arg_posn wrapped around. */
16264+ goto error;
16265+ }
16266+ REGISTER_ARG (dp->arg_index, type);
16267+ }
16268+ dp->conversion = c;
16269+ dp->dir_end = cp;
16270+ }
16271+
16272+ d->count++;
16273+ if (d->count >= d_allocated)
16274+ {
16275+ size_t memory_size;
16276+ DIRECTIVE *memory;
16277+
16278+ d_allocated = xtimes (d_allocated, 2);
16279+ memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
16280+ if (size_overflow_p (memory_size))
16281+ /* Overflow, would lead to out of memory. */
16282+ goto error;
16283+ memory = realloc (d->dir, memory_size);
16284+ if (memory == NULL)
16285+ /* Out of memory. */
16286+ goto error;
16287+ d->dir = memory;
16288+ }
16289+ }
16290+ }
16291+ d->dir[d->count].dir_start = cp;
16292+
16293+ d->max_width_length = max_width_length;
16294+ d->max_precision_length = max_precision_length;
16295+ return 0;
16296+
16297+error:
16298+ if (a->arg)
16299+ free (a->arg);
16300+ if (d->dir)
16301+ free (d->dir);
16302+ return -1;
16303+}
16304+
16305+#undef DIRECTIVES
16306+#undef DIRECTIVE
16307+#undef CHAR_T
16308+#undef PRINTF_PARSE
16309--- lrzsz-0.12.20.safe/intl/printf-parse.h 1969-12-31 19:00:00.000000000 -0500
16310+++ lrzsz-0.12.20/intl/printf-parse.h 2004-09-12 14:40:34.628706592 -0400
16311@@ -0,0 +1,75 @@
16312+/* Parse printf format string.
16313+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
16314+
16315+ This program is free software; you can redistribute it and/or modify it
16316+ under the terms of the GNU Library General Public License as published
16317+ by the Free Software Foundation; either version 2, or (at your option)
16318+ any later version.
16319+
16320+ This program is distributed in the hope that it will be useful,
16321+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16322+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16323+ Library General Public License for more details.
16324+
16325+ You should have received a copy of the GNU Library General Public
16326+ License along with this program; if not, write to the Free Software
16327+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16328+ USA. */
16329+
16330+#ifndef _PRINTF_PARSE_H
16331+#define _PRINTF_PARSE_H
16332+
16333+#include "printf-args.h"
16334+
16335+
16336+/* Flags */
16337+#define FLAG_GROUP 1 /* ' flag */
16338+#define FLAG_LEFT 2 /* - flag */
16339+#define FLAG_SHOWSIGN 4 /* + flag */
16340+#define FLAG_SPACE 8 /* space flag */
16341+#define FLAG_ALT 16 /* # flag */
16342+#define FLAG_ZERO 32
16343+
16344+/* arg_index value indicating that no argument is consumed. */
16345+#define ARG_NONE (~(size_t)0)
16346+
16347+/* A parsed directive. */
16348+typedef struct
16349+{
16350+ const char* dir_start;
16351+ const char* dir_end;
16352+ int flags;
16353+ const char* width_start;
16354+ const char* width_end;
16355+ size_t width_arg_index;
16356+ const char* precision_start;
16357+ const char* precision_end;
16358+ size_t precision_arg_index;
16359+ char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
16360+ size_t arg_index;
16361+}
16362+char_directive;
16363+
16364+/* A parsed format string. */
16365+typedef struct
16366+{
16367+ size_t count;
16368+ char_directive *dir;
16369+ size_t max_width_length;
16370+ size_t max_precision_length;
16371+}
16372+char_directives;
16373+
16374+
16375+/* Parses the format string. Fills in the number N of directives, and fills
16376+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start
16377+ to the end of the format string. Also fills in the arg_type fields of the
16378+ arguments and the needed count of arguments. */
16379+#ifdef STATIC
16380+STATIC
16381+#else
16382+extern
16383+#endif
16384+int printf_parse (const char *format, char_directives *d, arguments *a);
16385+
16386+#endif /* _PRINTF_PARSE_H */
16387--- lrzsz-0.12.20.safe/intl/ref-add.sin 1969-12-31 19:00:00.000000000 -0500
16388+++ lrzsz-0.12.20/intl/ref-add.sin 2004-09-12 14:40:34.633705832 -0400
16389@@ -0,0 +1,31 @@
16390+# Add this package to a list of references stored in a text file.
16391+#
16392+# Copyright (C) 2000 Free Software Foundation, Inc.
16393+#
16394+# This program is free software; you can redistribute it and/or modify it
16395+# under the terms of the GNU Library General Public License as published
16396+# by the Free Software Foundation; either version 2, or (at your option)
16397+# any later version.
16398+#
16399+# This program is distributed in the hope that it will be useful,
16400+# but WITHOUT ANY WARRANTY; without even the implied warranty of
16401+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16402+# Library General Public License for more details.
16403+#
16404+# You should have received a copy of the GNU Library General Public
16405+# License along with this program; if not, write to the Free Software
16406+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16407+# USA.
16408+#
16409+# Written by Bruno Haible <haible@clisp.cons.org>.
16410+#
16411+/^# Packages using this file: / {
16412+ s/# Packages using this file://
16413+ ta
16414+ :a
16415+ s/ @PACKAGE@ / @PACKAGE@ /
16416+ tb
16417+ s/ $/ @PACKAGE@ /
16418+ :b
16419+ s/^/# Packages using this file:/
16420+}
16421--- lrzsz-0.12.20.safe/intl/ref-del.sin 1969-12-31 19:00:00.000000000 -0500
16422+++ lrzsz-0.12.20/intl/ref-del.sin 2004-09-12 14:40:34.638705072 -0400
16423@@ -0,0 +1,26 @@
16424+# Remove this package from a list of references stored in a text file.
16425+#
16426+# Copyright (C) 2000 Free Software Foundation, Inc.
16427+#
16428+# This program is free software; you can redistribute it and/or modify it
16429+# under the terms of the GNU Library General Public License as published
16430+# by the Free Software Foundation; either version 2, or (at your option)
16431+# any later version.
16432+#
16433+# This program is distributed in the hope that it will be useful,
16434+# but WITHOUT ANY WARRANTY; without even the implied warranty of
16435+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16436+# Library General Public License for more details.
16437+#
16438+# You should have received a copy of the GNU Library General Public
16439+# License along with this program; if not, write to the Free Software
16440+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16441+# USA.
16442+#
16443+# Written by Bruno Haible <haible@clisp.cons.org>.
16444+#
16445+/^# Packages using this file: / {
16446+ s/# Packages using this file://
16447+ s/ @PACKAGE@ / /
16448+ s/^/# Packages using this file:/
16449+}
16450--- lrzsz-0.12.20.safe/intl/relocatable.c 1969-12-31 19:00:00.000000000 -0500
16451+++ lrzsz-0.12.20/intl/relocatable.c 2004-09-12 14:40:34.644704160 -0400
16452@@ -0,0 +1,449 @@
16453+/* Provide relocatable packages.
16454+ Copyright (C) 2003 Free Software Foundation, Inc.
16455+ Written by Bruno Haible <bruno@clisp.org>, 2003.
16456+
16457+ This program is free software; you can redistribute it and/or modify it
16458+ under the terms of the GNU Library General Public License as published
16459+ by the Free Software Foundation; either version 2, or (at your option)
16460+ any later version.
16461+
16462+ This program is distributed in the hope that it will be useful,
16463+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16464+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16465+ Library General Public License for more details.
16466+
16467+ You should have received a copy of the GNU Library General Public
16468+ License along with this program; if not, write to the Free Software
16469+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16470+ USA. */
16471+
16472+
16473+/* Tell glibc's <stdio.h> to provide a prototype for getline().
16474+ This must come before <config.h> because <config.h> may include
16475+ <features.h>, and once <features.h> has been included, it's too late. */
16476+#ifndef _GNU_SOURCE
16477+# define _GNU_SOURCE 1
16478+#endif
16479+
16480+#ifdef HAVE_CONFIG_H
16481+# include "config.h"
16482+#endif
16483+
16484+/* Specification. */
16485+#include "relocatable.h"
16486+
16487+#if ENABLE_RELOCATABLE
16488+
16489+#include <stddef.h>
16490+#include <stdio.h>
16491+#include <stdlib.h>
16492+#include <string.h>
16493+
16494+#ifdef NO_XMALLOC
16495+# define xmalloc malloc
16496+#else
16497+# include "xalloc.h"
16498+#endif
16499+
16500+#if defined _WIN32 || defined __WIN32__
16501+# define WIN32_LEAN_AND_MEAN
16502+# include <windows.h>
16503+#endif
16504+
16505+#if DEPENDS_ON_LIBCHARSET
16506+# include <libcharset.h>
16507+#endif
16508+#if DEPENDS_ON_LIBICONV && HAVE_ICONV
16509+# include <iconv.h>
16510+#endif
16511+#if DEPENDS_ON_LIBINTL && ENABLE_NLS
16512+# include <libintl.h>
16513+#endif
16514+
16515+/* Faked cheap 'bool'. */
16516+#undef bool
16517+#undef false
16518+#undef true
16519+#define bool int
16520+#define false 0
16521+#define true 1
16522+
16523+/* Pathname support.
16524+ ISSLASH(C) tests whether C is a directory separator character.
16525+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
16526+ */
16527+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
16528+ /* Win32, OS/2, DOS */
16529+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
16530+# define HAS_DEVICE(P) \
16531+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
16532+ && (P)[1] == ':')
16533+# define IS_PATH_WITH_DIR(P) \
16534+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
16535+# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
16536+#else
16537+ /* Unix */
16538+# define ISSLASH(C) ((C) == '/')
16539+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
16540+# define FILESYSTEM_PREFIX_LEN(P) 0
16541+#endif
16542+
16543+/* Original installation prefix. */
16544+static char *orig_prefix;
16545+static size_t orig_prefix_len;
16546+/* Current installation prefix. */
16547+static char *curr_prefix;
16548+static size_t curr_prefix_len;
16549+/* These prefixes do not end in a slash. Anything that will be concatenated
16550+ to them must start with a slash. */
16551+
16552+/* Sets the original and the current installation prefix of this module.
16553+ Relocation simply replaces a pathname starting with the original prefix
16554+ by the corresponding pathname with the current prefix instead. Both
16555+ prefixes should be directory names without trailing slash (i.e. use ""
16556+ instead of "/"). */
16557+static void
16558+set_this_relocation_prefix (const char *orig_prefix_arg,
16559+ const char *curr_prefix_arg)
16560+{
16561+ if (orig_prefix_arg != NULL && curr_prefix_arg != NULL
16562+ /* Optimization: if orig_prefix and curr_prefix are equal, the
16563+ relocation is a nop. */
16564+ && strcmp (orig_prefix_arg, curr_prefix_arg) != 0)
16565+ {
16566+ /* Duplicate the argument strings. */
16567+ char *memory;
16568+
16569+ orig_prefix_len = strlen (orig_prefix_arg);
16570+ curr_prefix_len = strlen (curr_prefix_arg);
16571+ memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1);
16572+#ifdef NO_XMALLOC
16573+ if (memory != NULL)
16574+#endif
16575+ {
16576+ memcpy (memory, orig_prefix_arg, orig_prefix_len + 1);
16577+ orig_prefix = memory;
16578+ memory += orig_prefix_len + 1;
16579+ memcpy (memory, curr_prefix_arg, curr_prefix_len + 1);
16580+ curr_prefix = memory;
16581+ return;
16582+ }
16583+ }
16584+ orig_prefix = NULL;
16585+ curr_prefix = NULL;
16586+ /* Don't worry about wasted memory here - this function is usually only
16587+ called once. */
16588+}
16589+
16590+/* Sets the original and the current installation prefix of the package.
16591+ Relocation simply replaces a pathname starting with the original prefix
16592+ by the corresponding pathname with the current prefix instead. Both
16593+ prefixes should be directory names without trailing slash (i.e. use ""
16594+ instead of "/"). */
16595+void
16596+set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
16597+{
16598+ set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16599+
16600+ /* Now notify all dependent libraries. */
16601+#if DEPENDS_ON_LIBCHARSET
16602+ libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16603+#endif
16604+#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
16605+ libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16606+#endif
16607+#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
16608+ libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16609+#endif
16610+}
16611+
16612+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
16613+
16614+/* Convenience function:
16615+ Computes the current installation prefix, based on the original
16616+ installation prefix, the original installation directory of a particular
16617+ file, and the current pathname of this file. Returns NULL upon failure. */
16618+#ifdef IN_LIBRARY
16619+#define compute_curr_prefix local_compute_curr_prefix
16620+static
16621+#endif
16622+const char *
16623+compute_curr_prefix (const char *orig_installprefix,
16624+ const char *orig_installdir,
16625+ const char *curr_pathname)
16626+{
16627+ const char *curr_installdir;
16628+ const char *rel_installdir;
16629+
16630+ if (curr_pathname == NULL)
16631+ return NULL;
16632+
16633+ /* Determine the relative installation directory, relative to the prefix.
16634+ This is simply the difference between orig_installprefix and
16635+ orig_installdir. */
16636+ if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix))
16637+ != 0)
16638+ /* Shouldn't happen - nothing should be installed outside $(prefix). */
16639+ return NULL;
16640+ rel_installdir = orig_installdir + strlen (orig_installprefix);
16641+
16642+ /* Determine the current installation directory. */
16643+ {
16644+ const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname);
16645+ const char *p = curr_pathname + strlen (curr_pathname);
16646+ char *q;
16647+
16648+ while (p > p_base)
16649+ {
16650+ p--;
16651+ if (ISSLASH (*p))
16652+ break;
16653+ }
16654+
16655+ q = (char *) xmalloc (p - curr_pathname + 1);
16656+#ifdef NO_XMALLOC
16657+ if (q == NULL)
16658+ return NULL;
16659+#endif
16660+ memcpy (q, curr_pathname, p - curr_pathname);
16661+ q[p - curr_pathname] = '\0';
16662+ curr_installdir = q;
16663+ }
16664+
16665+ /* Compute the current installation prefix by removing the trailing
16666+ rel_installdir from it. */
16667+ {
16668+ const char *rp = rel_installdir + strlen (rel_installdir);
16669+ const char *cp = curr_installdir + strlen (curr_installdir);
16670+ const char *cp_base =
16671+ curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir);
16672+
16673+ while (rp > rel_installdir && cp > cp_base)
16674+ {
16675+ bool same = false;
16676+ const char *rpi = rp;
16677+ const char *cpi = cp;
16678+
16679+ while (rpi > rel_installdir && cpi > cp_base)
16680+ {
16681+ rpi--;
16682+ cpi--;
16683+ if (ISSLASH (*rpi) || ISSLASH (*cpi))
16684+ {
16685+ if (ISSLASH (*rpi) && ISSLASH (*cpi))
16686+ same = true;
16687+ break;
16688+ }
16689+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
16690+ /* Win32, OS/2, DOS - case insignificant filesystem */
16691+ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
16692+ != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
16693+ break;
16694+#else
16695+ if (*rpi != *cpi)
16696+ break;
16697+#endif
16698+ }
16699+ if (!same)
16700+ break;
16701+ /* The last pathname component was the same. opi and cpi now point
16702+ to the slash before it. */
16703+ rp = rpi;
16704+ cp = cpi;
16705+ }
16706+
16707+ if (rp > rel_installdir)
16708+ /* Unexpected: The curr_installdir does not end with rel_installdir. */
16709+ return NULL;
16710+
16711+ {
16712+ size_t curr_prefix_len = cp - curr_installdir;
16713+ char *curr_prefix;
16714+
16715+ curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
16716+#ifdef NO_XMALLOC
16717+ if (curr_prefix == NULL)
16718+ return NULL;
16719+#endif
16720+ memcpy (curr_prefix, curr_installdir, curr_prefix_len);
16721+ curr_prefix[curr_prefix_len] = '\0';
16722+
16723+ return curr_prefix;
16724+ }
16725+ }
16726+}
16727+
16728+#endif /* !IN_LIBRARY || PIC */
16729+
16730+#if defined PIC && defined INSTALLDIR
16731+
16732+/* Full pathname of shared library, or NULL. */
16733+static char *shared_library_fullname;
16734+
16735+#if defined _WIN32 || defined __WIN32__
16736+
16737+/* Determine the full pathname of the shared library when it is loaded. */
16738+
16739+BOOL WINAPI
16740+DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
16741+{
16742+ (void) reserved;
16743+
16744+ if (event == DLL_PROCESS_ATTACH)
16745+ {
16746+ /* The DLL is being loaded into an application's address range. */
16747+ static char location[MAX_PATH];
16748+
16749+ if (!GetModuleFileName (module_handle, location, sizeof (location)))
16750+ /* Shouldn't happen. */
16751+ return FALSE;
16752+
16753+ if (!IS_PATH_WITH_DIR (location))
16754+ /* Shouldn't happen. */
16755+ return FALSE;
16756+
16757+ shared_library_fullname = strdup (location);
16758+ }
16759+
16760+ return TRUE;
16761+}
16762+
16763+#else /* Unix */
16764+
16765+static void
16766+find_shared_library_fullname ()
16767+{
16768+#if defined __linux__ && __GLIBC__ >= 2
16769+ /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
16770+ FILE *fp;
16771+
16772+ /* Open the current process' maps file. It describes one VMA per line. */
16773+ fp = fopen ("/proc/self/maps", "r");
16774+ if (fp)
16775+ {
16776+ unsigned long address = (unsigned long) &find_shared_library_fullname;
16777+ for (;;)
16778+ {
16779+ unsigned long start, end;
16780+ int c;
16781+
16782+ if (fscanf (fp, "%lx-%lx", &start, &end) != 2)
16783+ break;
16784+ if (address >= start && address <= end - 1)
16785+ {
16786+ /* Found it. Now see if this line contains a filename. */
16787+ while (c = getc (fp), c != EOF && c != '\n' && c != '/')
16788+ continue;
16789+ if (c == '/')
16790+ {
16791+ size_t size;
16792+ int len;
16793+
16794+ ungetc (c, fp);
16795+ shared_library_fullname = NULL; size = 0;
16796+ len = getline (&shared_library_fullname, &size, fp);
16797+ if (len >= 0)
16798+ {
16799+ /* Success: filled shared_library_fullname. */
16800+ if (len > 0 && shared_library_fullname[len - 1] == '\n')
16801+ shared_library_fullname[len - 1] = '\0';
16802+ }
16803+ }
16804+ break;
16805+ }
16806+ while (c = getc (fp), c != EOF && c != '\n')
16807+ continue;
16808+ }
16809+ fclose (fp);
16810+ }
16811+#endif
16812+}
16813+
16814+#endif /* WIN32 / Unix */
16815+
16816+/* Return the full pathname of the current shared library.
16817+ Return NULL if unknown.
16818+ Guaranteed to work only on Linux and Woe32. */
16819+static char *
16820+get_shared_library_fullname ()
16821+{
16822+#if !(defined _WIN32 || defined __WIN32__)
16823+ static bool tried_find_shared_library_fullname;
16824+ if (!tried_find_shared_library_fullname)
16825+ {
16826+ find_shared_library_fullname ();
16827+ tried_find_shared_library_fullname = true;
16828+ }
16829+#endif
16830+ return shared_library_fullname;
16831+}
16832+
16833+#endif /* PIC */
16834+
16835+/* Returns the pathname, relocated according to the current installation
16836+ directory. */
16837+const char *
16838+relocate (const char *pathname)
16839+{
16840+#if defined PIC && defined INSTALLDIR
16841+ static int initialized;
16842+
16843+ /* Initialization code for a shared library. */
16844+ if (!initialized)
16845+ {
16846+ /* At this point, orig_prefix and curr_prefix likely have already been
16847+ set through the main program's set_program_name_and_installdir
16848+ function. This is sufficient in the case that the library has
16849+ initially been installed in the same orig_prefix. But we can do
16850+ better, to also cover the cases that 1. it has been installed
16851+ in a different prefix before being moved to orig_prefix and (later)
16852+ to curr_prefix, 2. unlike the program, it has not moved away from
16853+ orig_prefix. */
16854+ const char *orig_installprefix = INSTALLPREFIX;
16855+ const char *orig_installdir = INSTALLDIR;
16856+ const char *curr_prefix_better;
16857+
16858+ curr_prefix_better =
16859+ compute_curr_prefix (orig_installprefix, orig_installdir,
16860+ get_shared_library_fullname ());
16861+ if (curr_prefix_better == NULL)
16862+ curr_prefix_better = curr_prefix;
16863+
16864+ set_relocation_prefix (orig_installprefix, curr_prefix_better);
16865+
16866+ initialized = 1;
16867+ }
16868+#endif
16869+
16870+ /* Note: It is not necessary to perform case insensitive comparison here,
16871+ even for DOS-like filesystems, because the pathname argument was
16872+ typically created from the same Makefile variable as orig_prefix came
16873+ from. */
16874+ if (orig_prefix != NULL && curr_prefix != NULL
16875+ && strncmp (pathname, orig_prefix, orig_prefix_len) == 0)
16876+ {
16877+ if (pathname[orig_prefix_len] == '\0')
16878+ /* pathname equals orig_prefix. */
16879+ return curr_prefix;
16880+ if (ISSLASH (pathname[orig_prefix_len]))
16881+ {
16882+ /* pathname starts with orig_prefix. */
16883+ const char *pathname_tail = &pathname[orig_prefix_len];
16884+ char *result =
16885+ (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1);
16886+
16887+#ifdef NO_XMALLOC
16888+ if (result != NULL)
16889+#endif
16890+ {
16891+ memcpy (result, curr_prefix, curr_prefix_len);
16892+ strcpy (result + curr_prefix_len, pathname_tail);
16893+ return result;
16894+ }
16895+ }
16896+ }
16897+ /* Nothing to relocate. */
16898+ return pathname;
16899+}
16900+
16901+#endif
16902--- lrzsz-0.12.20.safe/intl/relocatable.h 1969-12-31 19:00:00.000000000 -0500
16903+++ lrzsz-0.12.20/intl/relocatable.h 2004-09-12 14:40:34.651703096 -0400
16904@@ -0,0 +1,77 @@
16905+/* Provide relocatable packages.
16906+ Copyright (C) 2003 Free Software Foundation, Inc.
16907+ Written by Bruno Haible <bruno@clisp.org>, 2003.
16908+
16909+ This program is free software; you can redistribute it and/or modify it
16910+ under the terms of the GNU Library General Public License as published
16911+ by the Free Software Foundation; either version 2, or (at your option)
16912+ any later version.
16913+
16914+ This program is distributed in the hope that it will be useful,
16915+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16916+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16917+ Library General Public License for more details.
16918+
16919+ You should have received a copy of the GNU Library General Public
16920+ License along with this program; if not, write to the Free Software
16921+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16922+ USA. */
16923+
16924+#ifndef _RELOCATABLE_H
16925+#define _RELOCATABLE_H
16926+
16927+#ifdef __cplusplus
16928+extern "C" {
16929+#endif
16930+
16931+
16932+/* This can be enabled through the configure --enable-relocatable option. */
16933+#if ENABLE_RELOCATABLE
16934+
16935+/* When building a DLL, we must export some functions. Note that because
16936+ this is a private .h file, we don't need to use __declspec(dllimport)
16937+ in any case. */
16938+#if defined _MSC_VER && BUILDING_DLL
16939+# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
16940+#else
16941+# define RELOCATABLE_DLL_EXPORTED
16942+#endif
16943+
16944+/* Sets the original and the current installation prefix of the package.
16945+ Relocation simply replaces a pathname starting with the original prefix
16946+ by the corresponding pathname with the current prefix instead. Both
16947+ prefixes should be directory names without trailing slash (i.e. use ""
16948+ instead of "/"). */
16949+extern RELOCATABLE_DLL_EXPORTED void
16950+ set_relocation_prefix (const char *orig_prefix,
16951+ const char *curr_prefix);
16952+
16953+/* Returns the pathname, relocated according to the current installation
16954+ directory. */
16955+extern const char * relocate (const char *pathname);
16956+
16957+/* Memory management: relocate() leaks memory, because it has to construct
16958+ a fresh pathname. If this is a problem because your program calls
16959+ relocate() frequently, think about caching the result. */
16960+
16961+/* Convenience function:
16962+ Computes the current installation prefix, based on the original
16963+ installation prefix, the original installation directory of a particular
16964+ file, and the current pathname of this file. Returns NULL upon failure. */
16965+extern const char * compute_curr_prefix (const char *orig_installprefix,
16966+ const char *orig_installdir,
16967+ const char *curr_pathname);
16968+
16969+#else
16970+
16971+/* By default, we use the hardwired pathnames. */
16972+#define relocate(pathname) (pathname)
16973+
16974+#endif
16975+
16976+
16977+#ifdef __cplusplus
16978+}
16979+#endif
16980+
16981+#endif /* _RELOCATABLE_H */
16982--- lrzsz-0.12.20.safe/intl/textdomain.c 1998-04-26 09:22:37.000000000 -0400
16983+++ lrzsz-0.12.20/intl/textdomain.c 2004-09-12 14:40:34.656702336 -0400
16984@@ -1,51 +1,60 @@
16985-/* Implementation of the textdomain(3) function
16986- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
16987- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
16988+/* Implementation of the textdomain(3) function.
16989+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
16990
16991- This program is free software; you can redistribute it and/or modify
16992- it under the terms of the GNU General Public License as published by
16993- the Free Software Foundation; either version 2, or (at your option)
16994+ This program is free software; you can redistribute it and/or modify it
16995+ under the terms of the GNU Library General Public License as published
16996+ by the Free Software Foundation; either version 2, or (at your option)
16997 any later version.
16998
16999 This program is distributed in the hope that it will be useful,
17000 but WITHOUT ANY WARRANTY; without even the implied warranty of
17001- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17002- GNU General Public License for more details.
17003+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17004+ Library General Public License for more details.
17005
17006- You should have received a copy of the GNU General Public License
17007- along with this program; if not, write to the Free Software Foundation,
17008- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17009+ You should have received a copy of the GNU Library General Public
17010+ License along with this program; if not, write to the Free Software
17011+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17012+ USA. */
17013
17014 #ifdef HAVE_CONFIG_H
17015 # include <config.h>
17016 #endif
17017
17018-#if defined STDC_HEADERS || defined _LIBC
17019-# include <stdlib.h>
17020-#endif
17021+#include <stdlib.h>
17022+#include <string.h>
17023
17024-#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
17025-# include <string.h>
17026+#ifdef _LIBC
17027+# include <libintl.h>
17028 #else
17029-# include <strings.h>
17030-# ifndef memcpy
17031-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
17032-# endif
17033+# include "libgnuintl.h"
17034 #endif
17035+#include "gettextP.h"
17036
17037 #ifdef _LIBC
17038-# include <libintl.h>
17039+/* We have to handle multi-threaded applications. */
17040+# include <bits/libc-lock.h>
17041 #else
17042-# include "libgettext.h"
17043+/* Provide dummy implementation if this is outside glibc. */
17044+# define __libc_rwlock_define(CLASS, NAME)
17045+# define __libc_rwlock_wrlock(NAME)
17046+# define __libc_rwlock_unlock(NAME)
17047+#endif
17048+
17049+/* The internal variables in the standalone libintl.a must have different
17050+ names than the internal variables in GNU libc, otherwise programs
17051+ using libintl.a cannot be linked statically. */
17052+#if !defined _LIBC
17053+# define _nl_default_default_domain libintl_nl_default_default_domain
17054+# define _nl_current_default_domain libintl_nl_current_default_domain
17055 #endif
17056
17057 /* @@ end of prolog @@ */
17058
17059 /* Name of the default text domain. */
17060-extern const char _nl_default_default_domain[];
17061+extern const char _nl_default_default_domain[] attribute_hidden;
17062
17063 /* Default text domain in which entries for gettext(3) are to be found. */
17064-extern const char *_nl_current_default_domain;
17065+extern const char *_nl_current_default_domain attribute_hidden;
17066
17067
17068 /* Names for the libintl functions are a problem. They must not clash
17069@@ -54,50 +63,76 @@
17070 prefix. So we have to make a difference here. */
17071 #ifdef _LIBC
17072 # define TEXTDOMAIN __textdomain
17073-# define strdup(str) __strdup (str)
17074+# ifndef strdup
17075+# define strdup(str) __strdup (str)
17076+# endif
17077 #else
17078-# define TEXTDOMAIN textdomain__
17079+# define TEXTDOMAIN libintl_textdomain
17080 #endif
17081
17082+/* Lock variable to protect the global data in the gettext implementation. */
17083+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
17084+
17085 /* Set the current default message catalog to DOMAINNAME.
17086 If DOMAINNAME is null, return the current default.
17087 If DOMAINNAME is "", reset to the default of "messages". */
17088 char *
17089-TEXTDOMAIN (domainname)
17090- const char *domainname;
17091+TEXTDOMAIN (const char *domainname)
17092 {
17093- char *old;
17094+ char *new_domain;
17095+ char *old_domain;
17096
17097 /* A NULL pointer requests the current setting. */
17098 if (domainname == NULL)
17099 return (char *) _nl_current_default_domain;
17100
17101- old = (char *) _nl_current_default_domain;
17102+ __libc_rwlock_wrlock (_nl_state_lock);
17103+
17104+ old_domain = (char *) _nl_current_default_domain;
17105
17106 /* If domain name is the null string set to default domain "messages". */
17107 if (domainname[0] == '\0'
17108 || strcmp (domainname, _nl_default_default_domain) == 0)
17109- _nl_current_default_domain = _nl_default_default_domain;
17110+ {
17111+ _nl_current_default_domain = _nl_default_default_domain;
17112+ new_domain = (char *) _nl_current_default_domain;
17113+ }
17114+ else if (strcmp (domainname, old_domain) == 0)
17115+ /* This can happen and people will use it to signal that some
17116+ environment variable changed. */
17117+ new_domain = old_domain;
17118 else
17119 {
17120 /* If the following malloc fails `_nl_current_default_domain'
17121 will be NULL. This value will be returned and so signals we
17122 are out of core. */
17123 #if defined _LIBC || defined HAVE_STRDUP
17124- _nl_current_default_domain = strdup (domainname);
17125+ new_domain = strdup (domainname);
17126 #else
17127 size_t len = strlen (domainname) + 1;
17128- char *cp = (char *) malloc (len);
17129- if (cp != NULL)
17130- memcpy (cp, domainname, len);
17131- _nl_current_default_domain = cp;
17132+ new_domain = (char *) malloc (len);
17133+ if (new_domain != NULL)
17134+ memcpy (new_domain, domainname, len);
17135 #endif
17136+
17137+ if (new_domain != NULL)
17138+ _nl_current_default_domain = new_domain;
17139 }
17140
17141- if (old != _nl_default_default_domain)
17142- free (old);
17143+ /* We use this possibility to signal a change of the loaded catalogs
17144+ since this is most likely the case and there is no other easy we
17145+ to do it. Do it only when the call was successful. */
17146+ if (new_domain != NULL)
17147+ {
17148+ ++_nl_msg_cat_cntr;
17149
17150- return (char *) _nl_current_default_domain;
17151+ if (old_domain != new_domain && old_domain != _nl_default_default_domain)
17152+ free (old_domain);
17153+ }
17154+
17155+ __libc_rwlock_unlock (_nl_state_lock);
17156+
17157+ return new_domain;
17158 }
17159
17160 #ifdef _LIBC
17161--- lrzsz-0.12.20.safe/intl/vasnprintf.c 1969-12-31 19:00:00.000000000 -0500
17162+++ lrzsz-0.12.20/intl/vasnprintf.c 2004-09-12 14:40:34.662701424 -0400
17163@@ -0,0 +1,887 @@
17164+/* vsprintf with automatic memory allocation.
17165+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
17166+
17167+ This program is free software; you can redistribute it and/or modify it
17168+ under the terms of the GNU Library General Public License as published
17169+ by the Free Software Foundation; either version 2, or (at your option)
17170+ any later version.
17171+
17172+ This program is distributed in the hope that it will be useful,
17173+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17174+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17175+ Library General Public License for more details.
17176+
17177+ You should have received a copy of the GNU Library General Public
17178+ License along with this program; if not, write to the Free Software
17179+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17180+ USA. */
17181+
17182+/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
17183+ This must come before <config.h> because <config.h> may include
17184+ <features.h>, and once <features.h> has been included, it's too late. */
17185+#ifndef _GNU_SOURCE
17186+# define _GNU_SOURCE 1
17187+#endif
17188+
17189+#ifdef HAVE_CONFIG_H
17190+# include <config.h>
17191+#endif
17192+#ifndef IN_LIBINTL
17193+# include <alloca.h>
17194+#endif
17195+
17196+/* Specification. */
17197+#if WIDE_CHAR_VERSION
17198+# include "vasnwprintf.h"
17199+#else
17200+# include "vasnprintf.h"
17201+#endif
17202+
17203+#include <stdio.h> /* snprintf(), sprintf() */
17204+#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
17205+#include <string.h> /* memcpy(), strlen() */
17206+#include <errno.h> /* errno */
17207+#include <limits.h> /* CHAR_BIT */
17208+#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
17209+#if WIDE_CHAR_VERSION
17210+# include "wprintf-parse.h"
17211+#else
17212+# include "printf-parse.h"
17213+#endif
17214+
17215+/* Checked size_t computations. */
17216+#include "xsize.h"
17217+
17218+#ifdef HAVE_WCHAR_T
17219+# ifdef HAVE_WCSLEN
17220+# define local_wcslen wcslen
17221+# else
17222+ /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
17223+ a dependency towards this library, here is a local substitute.
17224+ Define this substitute only once, even if this file is included
17225+ twice in the same compilation unit. */
17226+# ifndef local_wcslen_defined
17227+# define local_wcslen_defined 1
17228+static size_t
17229+local_wcslen (const wchar_t *s)
17230+{
17231+ const wchar_t *ptr;
17232+
17233+ for (ptr = s; *ptr != (wchar_t) 0; ptr++)
17234+ ;
17235+ return ptr - s;
17236+}
17237+# endif
17238+# endif
17239+#endif
17240+
17241+#if WIDE_CHAR_VERSION
17242+# define VASNPRINTF vasnwprintf
17243+# define CHAR_T wchar_t
17244+# define DIRECTIVE wchar_t_directive
17245+# define DIRECTIVES wchar_t_directives
17246+# define PRINTF_PARSE wprintf_parse
17247+# define USE_SNPRINTF 1
17248+# if HAVE_DECL__SNWPRINTF
17249+ /* On Windows, the function swprintf() has a different signature than
17250+ on Unix; we use the _snwprintf() function instead. */
17251+# define SNPRINTF _snwprintf
17252+# else
17253+ /* Unix. */
17254+# define SNPRINTF swprintf
17255+# endif
17256+#else
17257+# define VASNPRINTF vasnprintf
17258+# define CHAR_T char
17259+# define DIRECTIVE char_directive
17260+# define DIRECTIVES char_directives
17261+# define PRINTF_PARSE printf_parse
17262+# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF)
17263+# if HAVE_DECL__SNPRINTF
17264+ /* Windows. */
17265+# define SNPRINTF _snprintf
17266+# else
17267+ /* Unix. */
17268+# define SNPRINTF snprintf
17269+# endif
17270+#endif
17271+
17272+CHAR_T *
17273+VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args)
17274+{
17275+ DIRECTIVES d;
17276+ arguments a;
17277+
17278+ if (PRINTF_PARSE (format, &d, &a) < 0)
17279+ {
17280+ errno = EINVAL;
17281+ return NULL;
17282+ }
17283+
17284+#define CLEANUP() \
17285+ free (d.dir); \
17286+ if (a.arg) \
17287+ free (a.arg);
17288+
17289+ if (printf_fetchargs (args, &a) < 0)
17290+ {
17291+ CLEANUP ();
17292+ errno = EINVAL;
17293+ return NULL;
17294+ }
17295+
17296+ {
17297+ size_t buf_neededlength;
17298+ CHAR_T *buf;
17299+ CHAR_T *buf_malloced;
17300+ const CHAR_T *cp;
17301+ size_t i;
17302+ DIRECTIVE *dp;
17303+ /* Output string accumulator. */
17304+ CHAR_T *result;
17305+ size_t allocated;
17306+ size_t length;
17307+
17308+ /* Allocate a small buffer that will hold a directive passed to
17309+ sprintf or snprintf. */
17310+ buf_neededlength =
17311+ xsum4 (7, d.max_width_length, d.max_precision_length, 6);
17312+#if HAVE_ALLOCA
17313+ if (buf_neededlength < 4000 / sizeof (CHAR_T))
17314+ {
17315+ buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T));
17316+ buf_malloced = NULL;
17317+ }
17318+ else
17319+#endif
17320+ {
17321+ size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T));
17322+ if (size_overflow_p (buf_memsize))
17323+ goto out_of_memory_1;
17324+ buf = (CHAR_T *) malloc (buf_memsize);
17325+ if (buf == NULL)
17326+ goto out_of_memory_1;
17327+ buf_malloced = buf;
17328+ }
17329+
17330+ if (resultbuf != NULL)
17331+ {
17332+ result = resultbuf;
17333+ allocated = *lengthp;
17334+ }
17335+ else
17336+ {
17337+ result = NULL;
17338+ allocated = 0;
17339+ }
17340+ length = 0;
17341+ /* Invariants:
17342+ result is either == resultbuf or == NULL or malloc-allocated.
17343+ If length > 0, then result != NULL. */
17344+
17345+ /* Ensures that allocated >= needed. Aborts through a jump to
17346+ out_of_memory if needed is SIZE_MAX or otherwise too big. */
17347+#define ENSURE_ALLOCATION(needed) \
17348+ if ((needed) > allocated) \
17349+ { \
17350+ size_t memory_size; \
17351+ CHAR_T *memory; \
17352+ \
17353+ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \
17354+ if ((needed) > allocated) \
17355+ allocated = (needed); \
17356+ memory_size = xtimes (allocated, sizeof (CHAR_T)); \
17357+ if (size_overflow_p (memory_size)) \
17358+ goto out_of_memory; \
17359+ if (result == resultbuf || result == NULL) \
17360+ memory = (CHAR_T *) malloc (memory_size); \
17361+ else \
17362+ memory = (CHAR_T *) realloc (result, memory_size); \
17363+ if (memory == NULL) \
17364+ goto out_of_memory; \
17365+ if (result == resultbuf && length > 0) \
17366+ memcpy (memory, result, length * sizeof (CHAR_T)); \
17367+ result = memory; \
17368+ }
17369+
17370+ for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
17371+ {
17372+ if (cp != dp->dir_start)
17373+ {
17374+ size_t n = dp->dir_start - cp;
17375+ size_t augmented_length = xsum (length, n);
17376+
17377+ ENSURE_ALLOCATION (augmented_length);
17378+ memcpy (result + length, cp, n * sizeof (CHAR_T));
17379+ length = augmented_length;
17380+ }
17381+ if (i == d.count)
17382+ break;
17383+
17384+ /* Execute a single directive. */
17385+ if (dp->conversion == '%')
17386+ {
17387+ size_t augmented_length;
17388+
17389+ if (!(dp->arg_index == ARG_NONE))
17390+ abort ();
17391+ augmented_length = xsum (length, 1);
17392+ ENSURE_ALLOCATION (augmented_length);
17393+ result[length] = '%';
17394+ length = augmented_length;
17395+ }
17396+ else
17397+ {
17398+ if (!(dp->arg_index != ARG_NONE))
17399+ abort ();
17400+
17401+ if (dp->conversion == 'n')
17402+ {
17403+ switch (a.arg[dp->arg_index].type)
17404+ {
17405+ case TYPE_COUNT_SCHAR_POINTER:
17406+ *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
17407+ break;
17408+ case TYPE_COUNT_SHORT_POINTER:
17409+ *a.arg[dp->arg_index].a.a_count_short_pointer = length;
17410+ break;
17411+ case TYPE_COUNT_INT_POINTER:
17412+ *a.arg[dp->arg_index].a.a_count_int_pointer = length;
17413+ break;
17414+ case TYPE_COUNT_LONGINT_POINTER:
17415+ *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
17416+ break;
17417+#ifdef HAVE_LONG_LONG
17418+ case TYPE_COUNT_LONGLONGINT_POINTER:
17419+ *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
17420+ break;
17421+#endif
17422+ default:
17423+ abort ();
17424+ }
17425+ }
17426+ else
17427+ {
17428+ arg_type type = a.arg[dp->arg_index].type;
17429+ CHAR_T *p;
17430+ unsigned int prefix_count;
17431+ int prefixes[2];
17432+#if !USE_SNPRINTF
17433+ size_t tmp_length;
17434+ CHAR_T tmpbuf[700];
17435+ CHAR_T *tmp;
17436+
17437+ /* Allocate a temporary buffer of sufficient size for calling
17438+ sprintf. */
17439+ {
17440+ size_t width;
17441+ size_t precision;
17442+
17443+ width = 0;
17444+ if (dp->width_start != dp->width_end)
17445+ {
17446+ if (dp->width_arg_index != ARG_NONE)
17447+ {
17448+ int arg;
17449+
17450+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
17451+ abort ();
17452+ arg = a.arg[dp->width_arg_index].a.a_int;
17453+ width = (arg < 0 ? (unsigned int) (-arg) : arg);
17454+ }
17455+ else
17456+ {
17457+ const CHAR_T *digitp = dp->width_start;
17458+
17459+ do
17460+ width = xsum (xtimes (width, 10), *digitp++ - '0');
17461+ while (digitp != dp->width_end);
17462+ }
17463+ }
17464+
17465+ precision = 6;
17466+ if (dp->precision_start != dp->precision_end)
17467+ {
17468+ if (dp->precision_arg_index != ARG_NONE)
17469+ {
17470+ int arg;
17471+
17472+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
17473+ abort ();
17474+ arg = a.arg[dp->precision_arg_index].a.a_int;
17475+ precision = (arg < 0 ? 0 : arg);
17476+ }
17477+ else
17478+ {
17479+ const CHAR_T *digitp = dp->precision_start + 1;
17480+
17481+ precision = 0;
17482+ do
17483+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
17484+ while (digitp != dp->precision_end);
17485+ }
17486+ }
17487+
17488+ switch (dp->conversion)
17489+ {
17490+
17491+ case 'd': case 'i': case 'u':
17492+# ifdef HAVE_LONG_LONG
17493+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
17494+ tmp_length =
17495+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
17496+ * 0.30103 /* binary -> decimal */
17497+ * 2 /* estimate for FLAG_GROUP */
17498+ )
17499+ + 1 /* turn floor into ceil */
17500+ + 1; /* account for leading sign */
17501+ else
17502+# endif
17503+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
17504+ tmp_length =
17505+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
17506+ * 0.30103 /* binary -> decimal */
17507+ * 2 /* estimate for FLAG_GROUP */
17508+ )
17509+ + 1 /* turn floor into ceil */
17510+ + 1; /* account for leading sign */
17511+ else
17512+ tmp_length =
17513+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
17514+ * 0.30103 /* binary -> decimal */
17515+ * 2 /* estimate for FLAG_GROUP */
17516+ )
17517+ + 1 /* turn floor into ceil */
17518+ + 1; /* account for leading sign */
17519+ break;
17520+
17521+ case 'o':
17522+# ifdef HAVE_LONG_LONG
17523+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
17524+ tmp_length =
17525+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
17526+ * 0.333334 /* binary -> octal */
17527+ )
17528+ + 1 /* turn floor into ceil */
17529+ + 1; /* account for leading sign */
17530+ else
17531+# endif
17532+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
17533+ tmp_length =
17534+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
17535+ * 0.333334 /* binary -> octal */
17536+ )
17537+ + 1 /* turn floor into ceil */
17538+ + 1; /* account for leading sign */
17539+ else
17540+ tmp_length =
17541+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
17542+ * 0.333334 /* binary -> octal */
17543+ )
17544+ + 1 /* turn floor into ceil */
17545+ + 1; /* account for leading sign */
17546+ break;
17547+
17548+ case 'x': case 'X':
17549+# ifdef HAVE_LONG_LONG
17550+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
17551+ tmp_length =
17552+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
17553+ * 0.25 /* binary -> hexadecimal */
17554+ )
17555+ + 1 /* turn floor into ceil */
17556+ + 2; /* account for leading sign or alternate form */
17557+ else
17558+# endif
17559+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
17560+ tmp_length =
17561+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
17562+ * 0.25 /* binary -> hexadecimal */
17563+ )
17564+ + 1 /* turn floor into ceil */
17565+ + 2; /* account for leading sign or alternate form */
17566+ else
17567+ tmp_length =
17568+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
17569+ * 0.25 /* binary -> hexadecimal */
17570+ )
17571+ + 1 /* turn floor into ceil */
17572+ + 2; /* account for leading sign or alternate form */
17573+ break;
17574+
17575+ case 'f': case 'F':
17576+# ifdef HAVE_LONG_DOUBLE
17577+ if (type == TYPE_LONGDOUBLE)
17578+ tmp_length =
17579+ (unsigned int) (LDBL_MAX_EXP
17580+ * 0.30103 /* binary -> decimal */
17581+ * 2 /* estimate for FLAG_GROUP */
17582+ )
17583+ + 1 /* turn floor into ceil */
17584+ + 10; /* sign, decimal point etc. */
17585+ else
17586+# endif
17587+ tmp_length =
17588+ (unsigned int) (DBL_MAX_EXP
17589+ * 0.30103 /* binary -> decimal */
17590+ * 2 /* estimate for FLAG_GROUP */
17591+ )
17592+ + 1 /* turn floor into ceil */
17593+ + 10; /* sign, decimal point etc. */
17594+ tmp_length = xsum (tmp_length, precision);
17595+ break;
17596+
17597+ case 'e': case 'E': case 'g': case 'G':
17598+ case 'a': case 'A':
17599+ tmp_length =
17600+ 12; /* sign, decimal point, exponent etc. */
17601+ tmp_length = xsum (tmp_length, precision);
17602+ break;
17603+
17604+ case 'c':
17605+# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION
17606+ if (type == TYPE_WIDE_CHAR)
17607+ tmp_length = MB_CUR_MAX;
17608+ else
17609+# endif
17610+ tmp_length = 1;
17611+ break;
17612+
17613+ case 's':
17614+# ifdef HAVE_WCHAR_T
17615+ if (type == TYPE_WIDE_STRING)
17616+ {
17617+ tmp_length =
17618+ local_wcslen (a.arg[dp->arg_index].a.a_wide_string);
17619+
17620+# if !WIDE_CHAR_VERSION
17621+ tmp_length = xtimes (tmp_length, MB_CUR_MAX);
17622+# endif
17623+ }
17624+ else
17625+# endif
17626+ tmp_length = strlen (a.arg[dp->arg_index].a.a_string);
17627+ break;
17628+
17629+ case 'p':
17630+ tmp_length =
17631+ (unsigned int) (sizeof (void *) * CHAR_BIT
17632+ * 0.25 /* binary -> hexadecimal */
17633+ )
17634+ + 1 /* turn floor into ceil */
17635+ + 2; /* account for leading 0x */
17636+ break;
17637+
17638+ default:
17639+ abort ();
17640+ }
17641+
17642+ if (tmp_length < width)
17643+ tmp_length = width;
17644+
17645+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
17646+ }
17647+
17648+ if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T))
17649+ tmp = tmpbuf;
17650+ else
17651+ {
17652+ size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T));
17653+
17654+ if (size_overflow_p (tmp_memsize))
17655+ /* Overflow, would lead to out of memory. */
17656+ goto out_of_memory;
17657+ tmp = (CHAR_T *) malloc (tmp_memsize);
17658+ if (tmp == NULL)
17659+ /* Out of memory. */
17660+ goto out_of_memory;
17661+ }
17662+#endif
17663+
17664+ /* Construct the format string for calling snprintf or
17665+ sprintf. */
17666+ p = buf;
17667+ *p++ = '%';
17668+ if (dp->flags & FLAG_GROUP)
17669+ *p++ = '\'';
17670+ if (dp->flags & FLAG_LEFT)
17671+ *p++ = '-';
17672+ if (dp->flags & FLAG_SHOWSIGN)
17673+ *p++ = '+';
17674+ if (dp->flags & FLAG_SPACE)
17675+ *p++ = ' ';
17676+ if (dp->flags & FLAG_ALT)
17677+ *p++ = '#';
17678+ if (dp->flags & FLAG_ZERO)
17679+ *p++ = '0';
17680+ if (dp->width_start != dp->width_end)
17681+ {
17682+ size_t n = dp->width_end - dp->width_start;
17683+ memcpy (p, dp->width_start, n * sizeof (CHAR_T));
17684+ p += n;
17685+ }
17686+ if (dp->precision_start != dp->precision_end)
17687+ {
17688+ size_t n = dp->precision_end - dp->precision_start;
17689+ memcpy (p, dp->precision_start, n * sizeof (CHAR_T));
17690+ p += n;
17691+ }
17692+
17693+ switch (type)
17694+ {
17695+#ifdef HAVE_LONG_LONG
17696+ case TYPE_LONGLONGINT:
17697+ case TYPE_ULONGLONGINT:
17698+ *p++ = 'l';
17699+ /*FALLTHROUGH*/
17700+#endif
17701+ case TYPE_LONGINT:
17702+ case TYPE_ULONGINT:
17703+#ifdef HAVE_WINT_T
17704+ case TYPE_WIDE_CHAR:
17705+#endif
17706+#ifdef HAVE_WCHAR_T
17707+ case TYPE_WIDE_STRING:
17708+#endif
17709+ *p++ = 'l';
17710+ break;
17711+#ifdef HAVE_LONG_DOUBLE
17712+ case TYPE_LONGDOUBLE:
17713+ *p++ = 'L';
17714+ break;
17715+#endif
17716+ default:
17717+ break;
17718+ }
17719+ *p = dp->conversion;
17720+#if USE_SNPRINTF
17721+ p[1] = '%';
17722+ p[2] = 'n';
17723+ p[3] = '\0';
17724+#else
17725+ p[1] = '\0';
17726+#endif
17727+
17728+ /* Construct the arguments for calling snprintf or sprintf. */
17729+ prefix_count = 0;
17730+ if (dp->width_arg_index != ARG_NONE)
17731+ {
17732+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
17733+ abort ();
17734+ prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
17735+ }
17736+ if (dp->precision_arg_index != ARG_NONE)
17737+ {
17738+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
17739+ abort ();
17740+ prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
17741+ }
17742+
17743+#if USE_SNPRINTF
17744+ /* Prepare checking whether snprintf returns the count
17745+ via %n. */
17746+ ENSURE_ALLOCATION (xsum (length, 1));
17747+ result[length] = '\0';
17748+#endif
17749+
17750+ for (;;)
17751+ {
17752+ size_t maxlen;
17753+ int count;
17754+ int retcount;
17755+
17756+ maxlen = allocated - length;
17757+ count = -1;
17758+ retcount = 0;
17759+
17760+#if USE_SNPRINTF
17761+# define SNPRINTF_BUF(arg) \
17762+ switch (prefix_count) \
17763+ { \
17764+ case 0: \
17765+ retcount = SNPRINTF (result + length, maxlen, buf, \
17766+ arg, &count); \
17767+ break; \
17768+ case 1: \
17769+ retcount = SNPRINTF (result + length, maxlen, buf, \
17770+ prefixes[0], arg, &count); \
17771+ break; \
17772+ case 2: \
17773+ retcount = SNPRINTF (result + length, maxlen, buf, \
17774+ prefixes[0], prefixes[1], arg, \
17775+ &count); \
17776+ break; \
17777+ default: \
17778+ abort (); \
17779+ }
17780+#else
17781+# define SNPRINTF_BUF(arg) \
17782+ switch (prefix_count) \
17783+ { \
17784+ case 0: \
17785+ count = sprintf (tmp, buf, arg); \
17786+ break; \
17787+ case 1: \
17788+ count = sprintf (tmp, buf, prefixes[0], arg); \
17789+ break; \
17790+ case 2: \
17791+ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
17792+ arg); \
17793+ break; \
17794+ default: \
17795+ abort (); \
17796+ }
17797+#endif
17798+
17799+ switch (type)
17800+ {
17801+ case TYPE_SCHAR:
17802+ {
17803+ int arg = a.arg[dp->arg_index].a.a_schar;
17804+ SNPRINTF_BUF (arg);
17805+ }
17806+ break;
17807+ case TYPE_UCHAR:
17808+ {
17809+ unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
17810+ SNPRINTF_BUF (arg);
17811+ }
17812+ break;
17813+ case TYPE_SHORT:
17814+ {
17815+ int arg = a.arg[dp->arg_index].a.a_short;
17816+ SNPRINTF_BUF (arg);
17817+ }
17818+ break;
17819+ case TYPE_USHORT:
17820+ {
17821+ unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
17822+ SNPRINTF_BUF (arg);
17823+ }
17824+ break;
17825+ case TYPE_INT:
17826+ {
17827+ int arg = a.arg[dp->arg_index].a.a_int;
17828+ SNPRINTF_BUF (arg);
17829+ }
17830+ break;
17831+ case TYPE_UINT:
17832+ {
17833+ unsigned int arg = a.arg[dp->arg_index].a.a_uint;
17834+ SNPRINTF_BUF (arg);
17835+ }
17836+ break;
17837+ case TYPE_LONGINT:
17838+ {
17839+ long int arg = a.arg[dp->arg_index].a.a_longint;
17840+ SNPRINTF_BUF (arg);
17841+ }
17842+ break;
17843+ case TYPE_ULONGINT:
17844+ {
17845+ unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
17846+ SNPRINTF_BUF (arg);
17847+ }
17848+ break;
17849+#ifdef HAVE_LONG_LONG
17850+ case TYPE_LONGLONGINT:
17851+ {
17852+ long long int arg = a.arg[dp->arg_index].a.a_longlongint;
17853+ SNPRINTF_BUF (arg);
17854+ }
17855+ break;
17856+ case TYPE_ULONGLONGINT:
17857+ {
17858+ unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
17859+ SNPRINTF_BUF (arg);
17860+ }
17861+ break;
17862+#endif
17863+ case TYPE_DOUBLE:
17864+ {
17865+ double arg = a.arg[dp->arg_index].a.a_double;
17866+ SNPRINTF_BUF (arg);
17867+ }
17868+ break;
17869+#ifdef HAVE_LONG_DOUBLE
17870+ case TYPE_LONGDOUBLE:
17871+ {
17872+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
17873+ SNPRINTF_BUF (arg);
17874+ }
17875+ break;
17876+#endif
17877+ case TYPE_CHAR:
17878+ {
17879+ int arg = a.arg[dp->arg_index].a.a_char;
17880+ SNPRINTF_BUF (arg);
17881+ }
17882+ break;
17883+#ifdef HAVE_WINT_T
17884+ case TYPE_WIDE_CHAR:
17885+ {
17886+ wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
17887+ SNPRINTF_BUF (arg);
17888+ }
17889+ break;
17890+#endif
17891+ case TYPE_STRING:
17892+ {
17893+ const char *arg = a.arg[dp->arg_index].a.a_string;
17894+ SNPRINTF_BUF (arg);
17895+ }
17896+ break;
17897+#ifdef HAVE_WCHAR_T
17898+ case TYPE_WIDE_STRING:
17899+ {
17900+ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
17901+ SNPRINTF_BUF (arg);
17902+ }
17903+ break;
17904+#endif
17905+ case TYPE_POINTER:
17906+ {
17907+ void *arg = a.arg[dp->arg_index].a.a_pointer;
17908+ SNPRINTF_BUF (arg);
17909+ }
17910+ break;
17911+ default:
17912+ abort ();
17913+ }
17914+
17915+#if USE_SNPRINTF
17916+ /* Portability: Not all implementations of snprintf()
17917+ are ISO C 99 compliant. Determine the number of
17918+ bytes that snprintf() has produced or would have
17919+ produced. */
17920+ if (count >= 0)
17921+ {
17922+ /* Verify that snprintf() has NUL-terminated its
17923+ result. */
17924+ if (count < maxlen && result[length + count] != '\0')
17925+ abort ();
17926+ /* Portability hack. */
17927+ if (retcount > count)
17928+ count = retcount;
17929+ }
17930+ else
17931+ {
17932+ /* snprintf() doesn't understand the '%n'
17933+ directive. */
17934+ if (p[1] != '\0')
17935+ {
17936+ /* Don't use the '%n' directive; instead, look
17937+ at the snprintf() return value. */
17938+ p[1] = '\0';
17939+ continue;
17940+ }
17941+ else
17942+ {
17943+ /* Look at the snprintf() return value. */
17944+ if (retcount < 0)
17945+ {
17946+ /* HP-UX 10.20 snprintf() is doubly deficient:
17947+ It doesn't understand the '%n' directive,
17948+ *and* it returns -1 (rather than the length
17949+ that would have been required) when the
17950+ buffer is too small. */
17951+ size_t bigger_need =
17952+ xsum (xtimes (allocated, 2), 12);
17953+ ENSURE_ALLOCATION (bigger_need);
17954+ continue;
17955+ }
17956+ else
17957+ count = retcount;
17958+ }
17959+ }
17960+#endif
17961+
17962+ /* Attempt to handle failure. */
17963+ if (count < 0)
17964+ {
17965+ if (!(result == resultbuf || result == NULL))
17966+ free (result);
17967+ if (buf_malloced != NULL)
17968+ free (buf_malloced);
17969+ CLEANUP ();
17970+ errno = EINVAL;
17971+ return NULL;
17972+ }
17973+
17974+#if !USE_SNPRINTF
17975+ if (count >= tmp_length)
17976+ /* tmp_length was incorrectly calculated - fix the
17977+ code above! */
17978+ abort ();
17979+#endif
17980+
17981+ /* Make room for the result. */
17982+ if (count >= maxlen)
17983+ {
17984+ /* Need at least count bytes. But allocate
17985+ proportionally, to avoid looping eternally if
17986+ snprintf() reports a too small count. */
17987+ size_t n =
17988+ xmax (xsum (length, count), xtimes (allocated, 2));
17989+
17990+ ENSURE_ALLOCATION (n);
17991+#if USE_SNPRINTF
17992+ continue;
17993+#endif
17994+ }
17995+
17996+#if USE_SNPRINTF
17997+ /* The snprintf() result did fit. */
17998+#else
17999+ /* Append the sprintf() result. */
18000+ memcpy (result + length, tmp, count * sizeof (CHAR_T));
18001+ if (tmp != tmpbuf)
18002+ free (tmp);
18003+#endif
18004+
18005+ length += count;
18006+ break;
18007+ }
18008+ }
18009+ }
18010+ }
18011+
18012+ /* Add the final NUL. */
18013+ ENSURE_ALLOCATION (xsum (length, 1));
18014+ result[length] = '\0';
18015+
18016+ if (result != resultbuf && length + 1 < allocated)
18017+ {
18018+ /* Shrink the allocated memory if possible. */
18019+ CHAR_T *memory;
18020+
18021+ memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T));
18022+ if (memory != NULL)
18023+ result = memory;
18024+ }
18025+
18026+ if (buf_malloced != NULL)
18027+ free (buf_malloced);
18028+ CLEANUP ();
18029+ *lengthp = length;
18030+ return result;
18031+
18032+ out_of_memory:
18033+ if (!(result == resultbuf || result == NULL))
18034+ free (result);
18035+ if (buf_malloced != NULL)
18036+ free (buf_malloced);
18037+ out_of_memory_1:
18038+ CLEANUP ();
18039+ errno = ENOMEM;
18040+ return NULL;
18041+ }
18042+}
18043+
18044+#undef SNPRINTF
18045+#undef USE_SNPRINTF
18046+#undef PRINTF_PARSE
18047+#undef DIRECTIVES
18048+#undef DIRECTIVE
18049+#undef CHAR_T
18050+#undef VASNPRINTF
18051--- lrzsz-0.12.20.safe/intl/vasnprintf.h 1969-12-31 19:00:00.000000000 -0500
18052+++ lrzsz-0.12.20/intl/vasnprintf.h 2004-09-12 14:40:34.667700664 -0400
18053@@ -0,0 +1,61 @@
18054+/* vsprintf with automatic memory allocation.
18055+ Copyright (C) 2002-2003 Free Software Foundation, Inc.
18056+
18057+ This program is free software; you can redistribute it and/or modify it
18058+ under the terms of the GNU Library General Public License as published
18059+ by the Free Software Foundation; either version 2, or (at your option)
18060+ any later version.
18061+
18062+ This program is distributed in the hope that it will be useful,
18063+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18064+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18065+ Library General Public License for more details.
18066+
18067+ You should have received a copy of the GNU Library General Public
18068+ License along with this program; if not, write to the Free Software
18069+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18070+ USA. */
18071+
18072+#ifndef _VASNPRINTF_H
18073+#define _VASNPRINTF_H
18074+
18075+/* Get va_list. */
18076+#include <stdarg.h>
18077+
18078+/* Get size_t. */
18079+#include <stddef.h>
18080+
18081+#ifndef __attribute__
18082+/* This feature is available in gcc versions 2.5 and later. */
18083+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
18084+# define __attribute__(Spec) /* empty */
18085+# endif
18086+/* The __-protected variants of `format' and `printf' attributes
18087+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
18088+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
18089+# define __format__ format
18090+# define __printf__ printf
18091+# endif
18092+#endif
18093+
18094+#ifdef __cplusplus
18095+extern "C" {
18096+#endif
18097+
18098+/* Write formatted output to a string dynamically allocated with malloc().
18099+ You can pass a preallocated buffer for the result in RESULTBUF and its
18100+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
18101+ If successful, return the address of the string (this may be = RESULTBUF
18102+ if no dynamic memory allocation was necessary) and set *LENGTHP to the
18103+ number of resulting bytes, excluding the trailing NUL. Upon error, set
18104+ errno and return NULL. */
18105+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
18106+ __attribute__ ((__format__ (__printf__, 3, 4)));
18107+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
18108+ __attribute__ ((__format__ (__printf__, 3, 0)));
18109+
18110+#ifdef __cplusplus
18111+}
18112+#endif
18113+
18114+#endif /* _VASNPRINTF_H */
18115--- lrzsz-0.12.20.safe/intl/vasnwprintf.h 1969-12-31 19:00:00.000000000 -0500
18116+++ lrzsz-0.12.20/intl/vasnwprintf.h 2004-09-12 14:40:34.673699752 -0400
18117@@ -0,0 +1,46 @@
18118+/* vswprintf with automatic memory allocation.
18119+ Copyright (C) 2002-2003 Free Software Foundation, Inc.
18120+
18121+ This program is free software; you can redistribute it and/or modify it
18122+ under the terms of the GNU Library General Public License as published
18123+ by the Free Software Foundation; either version 2, or (at your option)
18124+ any later version.
18125+
18126+ This program is distributed in the hope that it will be useful,
18127+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18128+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18129+ Library General Public License for more details.
18130+
18131+ You should have received a copy of the GNU Library General Public
18132+ License along with this program; if not, write to the Free Software
18133+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18134+ USA. */
18135+
18136+#ifndef _VASNWPRINTF_H
18137+#define _VASNWPRINTF_H
18138+
18139+/* Get va_list. */
18140+#include <stdarg.h>
18141+
18142+/* Get wchar_t, size_t. */
18143+#include <stddef.h>
18144+
18145+#ifdef __cplusplus
18146+extern "C" {
18147+#endif
18148+
18149+/* Write formatted output to a string dynamically allocated with malloc().
18150+ You can pass a preallocated buffer for the result in RESULTBUF and its
18151+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
18152+ If successful, return the address of the string (this may be = RESULTBUF
18153+ if no dynamic memory allocation was necessary) and set *LENGTHP to the
18154+ number of resulting bytes, excluding the trailing NUL. Upon error, set
18155+ errno and return NULL. */
18156+extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...);
18157+extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args);
18158+
18159+#ifdef __cplusplus
18160+}
18161+#endif
18162+
18163+#endif /* _VASNWPRINTF_H */
18164--- lrzsz-0.12.20.safe/intl/VERSION 1998-04-26 09:22:37.000000000 -0400
18165+++ lrzsz-0.12.20/intl/VERSION 2004-09-12 14:40:34.679698840 -0400
18166@@ -1 +1 @@
18167-GNU gettext library from gettext-0.10.32
18168+GNU gettext library from gettext-0.14.1
18169--- lrzsz-0.12.20.safe/intl/wprintf-parse.h 1969-12-31 19:00:00.000000000 -0500
18170+++ lrzsz-0.12.20/intl/wprintf-parse.h 2004-09-12 14:40:34.695696408 -0400
18171@@ -0,0 +1,75 @@
18172+/* Parse printf format string.
18173+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
18174+
18175+ This program is free software; you can redistribute it and/or modify it
18176+ under the terms of the GNU Library General Public License as published
18177+ by the Free Software Foundation; either version 2, or (at your option)
18178+ any later version.
18179+
18180+ This program is distributed in the hope that it will be useful,
18181+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18182+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18183+ Library General Public License for more details.
18184+
18185+ You should have received a copy of the GNU Library General Public
18186+ License along with this program; if not, write to the Free Software
18187+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18188+ USA. */
18189+
18190+#ifndef _WPRINTF_PARSE_H
18191+#define _WPRINTF_PARSE_H
18192+
18193+#include "printf-args.h"
18194+
18195+
18196+/* Flags */
18197+#define FLAG_GROUP 1 /* ' flag */
18198+#define FLAG_LEFT 2 /* - flag */
18199+#define FLAG_SHOWSIGN 4 /* + flag */
18200+#define FLAG_SPACE 8 /* space flag */
18201+#define FLAG_ALT 16 /* # flag */
18202+#define FLAG_ZERO 32
18203+
18204+/* arg_index value indicating that no argument is consumed. */
18205+#define ARG_NONE (~(size_t)0)
18206+
18207+/* A parsed directive. */
18208+typedef struct
18209+{
18210+ const wchar_t* dir_start;
18211+ const wchar_t* dir_end;
18212+ int flags;
18213+ const wchar_t* width_start;
18214+ const wchar_t* width_end;
18215+ size_t width_arg_index;
18216+ const wchar_t* precision_start;
18217+ const wchar_t* precision_end;
18218+ size_t precision_arg_index;
18219+ wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
18220+ size_t arg_index;
18221+}
18222+wchar_t_directive;
18223+
18224+/* A parsed format string. */
18225+typedef struct
18226+{
18227+ size_t count;
18228+ wchar_t_directive *dir;
18229+ size_t max_width_length;
18230+ size_t max_precision_length;
18231+}
18232+wchar_t_directives;
18233+
18234+
18235+/* Parses the format string. Fills in the number N of directives, and fills
18236+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start
18237+ to the end of the format string. Also fills in the arg_type fields of the
18238+ arguments and the needed count of arguments. */
18239+#ifdef STATIC
18240+STATIC
18241+#else
18242+extern
18243+#endif
18244+int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a);
18245+
18246+#endif /* _WPRINTF_PARSE_H */
18247--- lrzsz-0.12.20.safe/intl/xopen-msg.sed 1998-04-26 09:20:52.000000000 -0400
18248+++ lrzsz-0.12.20/intl/xopen-msg.sed 1969-12-31 19:00:00.000000000 -0500
18249@@ -1,104 +0,0 @@
18250-# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
18251-# Copyright (C) 1995 Free Software Foundation, Inc.
18252-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
18253-#
18254-# This program is free software; you can redistribute it and/or modify
18255-# it under the terms of the GNU General Public License as published by
18256-# the Free Software Foundation; either version 2, or (at your option)
18257-# any later version.
18258-#
18259-# This program is distributed in the hope that it will be useful,
18260-# but WITHOUT ANY WARRANTY; without even the implied warranty of
18261-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18262-# GNU General Public License for more details.
18263-#
18264-# You should have received a copy of the GNU General Public License
18265-# along with this program; if not, write to the Free Software
18266-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18267-#
18268-#
18269-# The first directive in the .msg should be the definition of the
18270-# message set number. We use always set number 1.
18271-#
18272-1 {
18273- i\
18274-$set 1 # Automatically created by po2msg.sed
18275- h
18276- s/.*/0/
18277- x
18278-}
18279-#
18280-# We copy all comments into the .msg file. Perhaps they can help.
18281-#
18282-/^#/ s/^#[ ]*/$ /p
18283-#
18284-# We copy the original message as a comment into the .msg file.
18285-#
18286-/^msgid/ {
18287-# Does not work now
18288-# /"$/! {
18289-# s/\\$//
18290-# s/$/ ... (more lines following)"/
18291-# }
18292- s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/
18293- p
18294-}
18295-#
18296-# The .msg file contains, other then the .po file, only the translations
18297-# but each given a unique ID. Starting from 1 and incrementing by 1 for
18298-# each message we assign them to the messages.
18299-# It is important that the .po file used to generate the cat-id-tbl.c file
18300-# (with po-to-tbl) is the same as the one used here. (At least the order
18301-# of declarations must not be changed.)
18302-#
18303-/^msgstr/ {
18304- s/msgstr[ ]*"\(.*\)"/\1/
18305- x
18306-# The following nice solution is by
18307-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
18308- td
18309-# Increment a decimal number in pattern space.
18310-# First hide trailing `9' digits.
18311- :d
18312- s/9\(_*\)$/_\1/
18313- td
18314-# Assure at least one digit is available.
18315- s/^\(_*\)$/0\1/
18316-# Increment the last digit.
18317- s/8\(_*\)$/9\1/
18318- s/7\(_*\)$/8\1/
18319- s/6\(_*\)$/7\1/
18320- s/5\(_*\)$/6\1/
18321- s/4\(_*\)$/5\1/
18322- s/3\(_*\)$/4\1/
18323- s/2\(_*\)$/3\1/
18324- s/1\(_*\)$/2\1/
18325- s/0\(_*\)$/1\1/
18326-# Convert the hidden `9' digits to `0's.
18327- s/_/0/g
18328- x
18329-# Bring the line in the format `<number> <message>'
18330- G
18331- s/^[^\n]*$/& /
18332- s/\(.*\)\n\([0-9]*\)/\2 \1/
18333-# Clear flag from last substitution.
18334- tb
18335-# Append the next line.
18336- :b
18337- N
18338-# Look whether second part is a continuation line.
18339- s/\(.*\n\)"\(.*\)"/\1\2/
18340-# Yes, then branch.
18341- ta
18342- P
18343- D
18344-# Note that `D' includes a jump to the start!!
18345-# We found a continuation line. But before printing insert '\'.
18346- :a
18347- s/\(.*\)\(\n.*\)/\1\\\2/
18348- P
18349-# We cannot use the sed command `D' here
18350- s/.*\n\(.*\)/\1/
18351- tb
18352-}
18353-d
18354--- lrzsz-0.12.20.safe/intl/xsize.h 1969-12-31 19:00:00.000000000 -0500
18355+++ lrzsz-0.12.20/intl/xsize.h 2004-09-12 14:40:34.700695648 -0400
18356@@ -0,0 +1,109 @@
18357+/* xsize.h -- Checked size_t computations.
18358+
18359+ Copyright (C) 2003 Free Software Foundation, Inc.
18360+
18361+ This program is free software; you can redistribute it and/or modify it
18362+ under the terms of the GNU Library General Public License as published
18363+ by the Free Software Foundation; either version 2, or (at your option)
18364+ any later version.
18365+
18366+ This program is distributed in the hope that it will be useful,
18367+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18368+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18369+ Library General Public License for more details.
18370+
18371+ You should have received a copy of the GNU Library General Public
18372+ License along with this program; if not, write to the Free Software
18373+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18374+ USA. */
18375+
18376+#ifndef _XSIZE_H
18377+#define _XSIZE_H
18378+
18379+/* Get size_t. */
18380+#include <stddef.h>
18381+
18382+/* Get SIZE_MAX. */
18383+#include <limits.h>
18384+#if HAVE_STDINT_H
18385+# include <stdint.h>
18386+#endif
18387+
18388+/* The size of memory objects is often computed through expressions of
18389+ type size_t. Example:
18390+ void* p = malloc (header_size + n * element_size).
18391+ These computations can lead to overflow. When this happens, malloc()
18392+ returns a piece of memory that is way too small, and the program then
18393+ crashes while attempting to fill the memory.
18394+ To avoid this, the functions and macros in this file check for overflow.
18395+ The convention is that SIZE_MAX represents overflow.
18396+ malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
18397+ implementation that uses mmap --, it's recommended to use size_overflow_p()
18398+ or size_in_bounds_p() before invoking malloc().
18399+ The example thus becomes:
18400+ size_t size = xsum (header_size, xtimes (n, element_size));
18401+ void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
18402+*/
18403+
18404+/* Convert an arbitrary value >= 0 to type size_t. */
18405+#define xcast_size_t(N) \
18406+ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
18407+
18408+/* Sum of two sizes, with overflow check. */
18409+static inline size_t
18410+#if __GNUC__ >= 3
18411+__attribute__ ((__pure__))
18412+#endif
18413+xsum (size_t size1, size_t size2)
18414+{
18415+ size_t sum = size1 + size2;
18416+ return (sum >= size1 ? sum : SIZE_MAX);
18417+}
18418+
18419+/* Sum of three sizes, with overflow check. */
18420+static inline size_t
18421+#if __GNUC__ >= 3
18422+__attribute__ ((__pure__))
18423+#endif
18424+xsum3 (size_t size1, size_t size2, size_t size3)
18425+{
18426+ return xsum (xsum (size1, size2), size3);
18427+}
18428+
18429+/* Sum of four sizes, with overflow check. */
18430+static inline size_t
18431+#if __GNUC__ >= 3
18432+__attribute__ ((__pure__))
18433+#endif
18434+xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
18435+{
18436+ return xsum (xsum (xsum (size1, size2), size3), size4);
18437+}
18438+
18439+/* Maximum of two sizes, with overflow check. */
18440+static inline size_t
18441+#if __GNUC__ >= 3
18442+__attribute__ ((__pure__))
18443+#endif
18444+xmax (size_t size1, size_t size2)
18445+{
18446+ /* No explicit check is needed here, because for any n:
18447+ max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */
18448+ return (size1 >= size2 ? size1 : size2);
18449+}
18450+
18451+/* Multiplication of a count with an element size, with overflow check.
18452+ The count must be >= 0 and the element size must be > 0.
18453+ This is a macro, not an inline function, so that it works correctly even
18454+ when N is of a wider tupe and N > SIZE_MAX. */
18455+#define xtimes(N, ELSIZE) \
18456+ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
18457+
18458+/* Check for overflow. */
18459+#define size_overflow_p(SIZE) \
18460+ ((SIZE) == SIZE_MAX)
18461+/* Check against overflow. */
18462+#define size_in_bounds_p(SIZE) \
18463+ ((SIZE) != SIZE_MAX)
18464+
18465+#endif /* _XSIZE_H */
18466--- lrzsz-0.12.20.safe/m4/ChangeLog 1969-12-31 19:00:00.000000000 -0500
18467+++ lrzsz-0.12.20/m4/ChangeLog 2004-09-12 14:40:35.054641840 -0400
18468@@ -0,0 +1,32 @@
18469+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
18470+
18471+ * codeset.m4: New file, from gettext-0.14.1.
18472+ * gettext.m4: New file, from gettext-0.14.1.
18473+ * glibc21.m4: New file, from gettext-0.14.1.
18474+ * iconv.m4: New file, from gettext-0.14.1.
18475+ * intdiv0.m4: New file, from gettext-0.14.1.
18476+ * intmax.m4: New file, from gettext-0.14.1.
18477+ * inttypes.m4: New file, from gettext-0.14.1.
18478+ * inttypes_h.m4: New file, from gettext-0.14.1.
18479+ * inttypes-pri.m4: New file, from gettext-0.14.1.
18480+ * isc-posix.m4: New file, from gettext-0.14.1.
18481+ * lcmessage.m4: New file, from gettext-0.14.1.
18482+ * lib-ld.m4: New file, from gettext-0.14.1.
18483+ * lib-link.m4: New file, from gettext-0.14.1.
18484+ * lib-prefix.m4: New file, from gettext-0.14.1.
18485+ * longdouble.m4: New file, from gettext-0.14.1.
18486+ * longlong.m4: New file, from gettext-0.14.1.
18487+ * nls.m4: New file, from gettext-0.14.1.
18488+ * po.m4: New file, from gettext-0.14.1.
18489+ * printf-posix.m4: New file, from gettext-0.14.1.
18490+ * progtest.m4: New file, from gettext-0.14.1.
18491+ * signed.m4: New file, from gettext-0.14.1.
18492+ * size_max.m4: New file, from gettext-0.14.1.
18493+ * stdint_h.m4: New file, from gettext-0.14.1.
18494+ * uintmax_t.m4: New file, from gettext-0.14.1.
18495+ * ulonglong.m4: New file, from gettext-0.14.1.
18496+ * wchar_t.m4: New file, from gettext-0.14.1.
18497+ * wint_t.m4: New file, from gettext-0.14.1.
18498+ * xsize.m4: New file, from gettext-0.14.1.
18499+ * Makefile.am: New file.
18500+
18501--- lrzsz-0.12.20.safe/m4/codeset.m4 1969-12-31 19:00:00.000000000 -0500
18502+++ lrzsz-0.12.20/m4/codeset.m4 2004-09-12 14:40:34.820677408 -0400
18503@@ -0,0 +1,23 @@
18504+# codeset.m4 serial AM1 (gettext-0.10.40)
18505+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
18506+dnl This file is free software, distributed under the terms of the GNU
18507+dnl General Public License. As a special exception to the GNU General
18508+dnl Public License, this file may be distributed as part of a program
18509+dnl that contains a configuration script generated by Autoconf, under
18510+dnl the same distribution terms as the rest of that program.
18511+
18512+dnl From Bruno Haible.
18513+
18514+AC_DEFUN([AM_LANGINFO_CODESET],
18515+[
18516+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
18517+ [AC_TRY_LINK([#include <langinfo.h>],
18518+ [char* cs = nl_langinfo(CODESET);],
18519+ am_cv_langinfo_codeset=yes,
18520+ am_cv_langinfo_codeset=no)
18521+ ])
18522+ if test $am_cv_langinfo_codeset = yes; then
18523+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
18524+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
18525+ fi
18526+])
18527--- lrzsz-0.12.20.safe/m4/gettext.m4 1969-12-31 19:00:00.000000000 -0500
18528+++ lrzsz-0.12.20/m4/gettext.m4 2004-09-12 14:40:34.826676496 -0400
18529@@ -0,0 +1,487 @@
18530+# gettext.m4 serial 28 (gettext-0.13)
18531+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
18532+dnl This file is free software, distributed under the terms of the GNU
18533+dnl General Public License. As a special exception to the GNU General
18534+dnl Public License, this file may be distributed as part of a program
18535+dnl that contains a configuration script generated by Autoconf, under
18536+dnl the same distribution terms as the rest of that program.
18537+dnl
18538+dnl This file can can be used in projects which are not available under
18539+dnl the GNU General Public License or the GNU Library General Public
18540+dnl License but which still want to provide support for the GNU gettext
18541+dnl functionality.
18542+dnl Please note that the actual code of the GNU gettext library is covered
18543+dnl by the GNU Library General Public License, and the rest of the GNU
18544+dnl gettext package package is covered by the GNU General Public License.
18545+dnl They are *not* in the public domain.
18546+
18547+dnl Authors:
18548+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18549+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
18550+
18551+dnl Macro to add for using GNU gettext.
18552+
18553+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
18554+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
18555+dnl default (if it is not specified or empty) is 'no-libtool'.
18556+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
18557+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
18558+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
18559+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
18560+dnl depending on --{enable,disable}-{shared,static} and on the presence of
18561+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
18562+dnl $(top_builddir)/intl/libintl.a will be created.
18563+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
18564+dnl implementations (in libc or libintl) without the ngettext() function
18565+dnl will be ignored. If NEEDSYMBOL is specified and is
18566+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
18567+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
18568+dnl INTLDIR is used to find the intl libraries. If empty,
18569+dnl the value `$(top_builddir)/intl/' is used.
18570+dnl
18571+dnl The result of the configuration is one of three cases:
18572+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
18573+dnl and used.
18574+dnl Catalog format: GNU --> install in $(datadir)
18575+dnl Catalog extension: .mo after installation, .gmo in source tree
18576+dnl 2) GNU gettext has been found in the system's C library.
18577+dnl Catalog format: GNU --> install in $(datadir)
18578+dnl Catalog extension: .mo after installation, .gmo in source tree
18579+dnl 3) No internationalization, always use English msgid.
18580+dnl Catalog format: none
18581+dnl Catalog extension: none
18582+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
18583+dnl The use of .gmo is historical (it was needed to avoid overwriting the
18584+dnl GNU format catalogs when building on a platform with an X/Open gettext),
18585+dnl but we keep it in order not to force irrelevant filename changes on the
18586+dnl maintainers.
18587+dnl
18588+AC_DEFUN([AM_GNU_GETTEXT],
18589+[
18590+ dnl Argument checking.
18591+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
18592+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
18593+])])])])])
18594+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
18595+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
18596+])])])])
18597+ define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
18598+ define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
18599+
18600+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
18601+ ifelse(gt_included_intl, yes, [
18602+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
18603+ ])
18604+
18605+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
18606+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
18607+ AC_REQUIRE([AC_LIB_RPATH])
18608+
18609+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
18610+ dnl Ideally we would do this search only after the
18611+ dnl if test "$USE_NLS" = "yes"; then
18612+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
18613+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
18614+ dnl the configure script would need to contain the same shell code
18615+ dnl again, outside any 'if'. There are two solutions:
18616+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
18617+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
18618+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
18619+ dnl documented, we avoid it.
18620+ ifelse(gt_included_intl, yes, , [
18621+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
18622+ ])
18623+
18624+ dnl Set USE_NLS.
18625+ AM_NLS
18626+
18627+ ifelse(gt_included_intl, yes, [
18628+ BUILD_INCLUDED_LIBINTL=no
18629+ USE_INCLUDED_LIBINTL=no
18630+ ])
18631+ LIBINTL=
18632+ LTLIBINTL=
18633+ POSUB=
18634+
18635+ dnl If we use NLS figure out what method
18636+ if test "$USE_NLS" = "yes"; then
18637+ gt_use_preinstalled_gnugettext=no
18638+ ifelse(gt_included_intl, yes, [
18639+ AC_MSG_CHECKING([whether included gettext is requested])
18640+ AC_ARG_WITH(included-gettext,
18641+ [ --with-included-gettext use the GNU gettext library included here],
18642+ nls_cv_force_use_gnu_gettext=$withval,
18643+ nls_cv_force_use_gnu_gettext=no)
18644+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
18645+
18646+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
18647+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
18648+ ])
18649+ dnl User does not insist on using GNU NLS library. Figure out what
18650+ dnl to use. If GNU gettext is available we use this. Else we have
18651+ dnl to fall back to GNU NLS library.
18652+
18653+ dnl Add a version number to the cache macros.
18654+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
18655+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
18656+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
18657+
18658+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
18659+ [AC_TRY_LINK([#include <libintl.h>
18660+]ifelse([$2], [need-formatstring-macros],
18661+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18662+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
18663+#endif
18664+changequote(,)dnl
18665+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
18666+changequote([,])dnl
18667+], [])[extern int _nl_msg_cat_cntr;
18668+extern int *_nl_domain_bindings;],
18669+ [bindtextdomain ("", "");
18670+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
18671+ gt_cv_func_gnugettext_libc=yes,
18672+ gt_cv_func_gnugettext_libc=no)])
18673+
18674+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then
18675+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
18676+ ifelse(gt_included_intl, yes, , [
18677+ AM_ICONV_LINK
18678+ ])
18679+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
18680+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
18681+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
18682+ dnl even if libiconv doesn't exist.
18683+ AC_LIB_LINKFLAGS_BODY([intl])
18684+ AC_CACHE_CHECK([for GNU gettext in libintl],
18685+ gt_cv_func_gnugettext_libintl,
18686+ [gt_save_CPPFLAGS="$CPPFLAGS"
18687+ CPPFLAGS="$CPPFLAGS $INCINTL"
18688+ gt_save_LIBS="$LIBS"
18689+ LIBS="$LIBS $LIBINTL"
18690+ dnl Now see whether libintl exists and does not depend on libiconv.
18691+ AC_TRY_LINK([#include <libintl.h>
18692+]ifelse([$2], [need-formatstring-macros],
18693+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18694+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
18695+#endif
18696+changequote(,)dnl
18697+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
18698+changequote([,])dnl
18699+], [])[extern int _nl_msg_cat_cntr;
18700+extern
18701+#ifdef __cplusplus
18702+"C"
18703+#endif
18704+const char *_nl_expand_alias ();],
18705+ [bindtextdomain ("", "");
18706+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
18707+ gt_cv_func_gnugettext_libintl=yes,
18708+ gt_cv_func_gnugettext_libintl=no)
18709+ dnl Now see whether libintl exists and depends on libiconv.
18710+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
18711+ LIBS="$LIBS $LIBICONV"
18712+ AC_TRY_LINK([#include <libintl.h>
18713+]ifelse([$2], [need-formatstring-macros],
18714+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18715+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
18716+#endif
18717+changequote(,)dnl
18718+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
18719+changequote([,])dnl
18720+], [])[extern int _nl_msg_cat_cntr;
18721+extern
18722+#ifdef __cplusplus
18723+"C"
18724+#endif
18725+const char *_nl_expand_alias ();],
18726+ [bindtextdomain ("", "");
18727+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
18728+ [LIBINTL="$LIBINTL $LIBICONV"
18729+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
18730+ gt_cv_func_gnugettext_libintl=yes
18731+ ])
18732+ fi
18733+ CPPFLAGS="$gt_save_CPPFLAGS"
18734+ LIBS="$gt_save_LIBS"])
18735+ fi
18736+
18737+ dnl If an already present or preinstalled GNU gettext() is found,
18738+ dnl use it. But if this macro is used in GNU gettext, and GNU
18739+ dnl gettext is already preinstalled in libintl, we update this
18740+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
18741+ if test "$gt_cv_func_gnugettext_libc" = "yes" \
18742+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
18743+ && test "$PACKAGE" != gettext-runtime \
18744+ && test "$PACKAGE" != gettext-tools; }; then
18745+ gt_use_preinstalled_gnugettext=yes
18746+ else
18747+ dnl Reset the values set by searching for libintl.
18748+ LIBINTL=
18749+ LTLIBINTL=
18750+ INCINTL=
18751+ fi
18752+
18753+ ifelse(gt_included_intl, yes, [
18754+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
18755+ dnl GNU gettext is not found in the C library.
18756+ dnl Fall back on included GNU gettext library.
18757+ nls_cv_use_gnu_gettext=yes
18758+ fi
18759+ fi
18760+
18761+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
18762+ dnl Mark actions used to generate GNU NLS library.
18763+ BUILD_INCLUDED_LIBINTL=yes
18764+ USE_INCLUDED_LIBINTL=yes
18765+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
18766+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
18767+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
18768+ fi
18769+
18770+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
18771+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
18772+ dnl Mark actions to use GNU gettext tools.
18773+ CATOBJEXT=.gmo
18774+ fi
18775+ ])
18776+
18777+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
18778+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
18779+ AC_DEFINE(ENABLE_NLS, 1,
18780+ [Define to 1 if translation of program messages to the user's native language
18781+ is requested.])
18782+ else
18783+ USE_NLS=no
18784+ fi
18785+ fi
18786+
18787+ AC_MSG_CHECKING([whether to use NLS])
18788+ AC_MSG_RESULT([$USE_NLS])
18789+ if test "$USE_NLS" = "yes"; then
18790+ AC_MSG_CHECKING([where the gettext function comes from])
18791+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
18792+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
18793+ gt_source="external libintl"
18794+ else
18795+ gt_source="libc"
18796+ fi
18797+ else
18798+ gt_source="included intl directory"
18799+ fi
18800+ AC_MSG_RESULT([$gt_source])
18801+ fi
18802+
18803+ if test "$USE_NLS" = "yes"; then
18804+
18805+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
18806+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
18807+ AC_MSG_CHECKING([how to link with libintl])
18808+ AC_MSG_RESULT([$LIBINTL])
18809+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
18810+ fi
18811+
18812+ dnl For backward compatibility. Some packages may be using this.
18813+ AC_DEFINE(HAVE_GETTEXT, 1,
18814+ [Define if the GNU gettext() function is already present or preinstalled.])
18815+ AC_DEFINE(HAVE_DCGETTEXT, 1,
18816+ [Define if the GNU dcgettext() function is already present or preinstalled.])
18817+ fi
18818+
18819+ dnl We need to process the po/ directory.
18820+ POSUB=po
18821+ fi
18822+
18823+ ifelse(gt_included_intl, yes, [
18824+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
18825+ dnl to 'yes' because some of the testsuite requires it.
18826+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
18827+ BUILD_INCLUDED_LIBINTL=yes
18828+ fi
18829+
18830+ dnl Make all variables we use known to autoconf.
18831+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
18832+ AC_SUBST(USE_INCLUDED_LIBINTL)
18833+ AC_SUBST(CATOBJEXT)
18834+
18835+ dnl For backward compatibility. Some configure.ins may be using this.
18836+ nls_cv_header_intl=
18837+ nls_cv_header_libgt=
18838+
18839+ dnl For backward compatibility. Some Makefiles may be using this.
18840+ DATADIRNAME=share
18841+ AC_SUBST(DATADIRNAME)
18842+
18843+ dnl For backward compatibility. Some Makefiles may be using this.
18844+ INSTOBJEXT=.mo
18845+ AC_SUBST(INSTOBJEXT)
18846+
18847+ dnl For backward compatibility. Some Makefiles may be using this.
18848+ GENCAT=gencat
18849+ AC_SUBST(GENCAT)
18850+
18851+ dnl For backward compatibility. Some Makefiles may be using this.
18852+ if test "$USE_INCLUDED_LIBINTL" = yes; then
18853+ INTLOBJS="\$(GETTOBJS)"
18854+ fi
18855+ AC_SUBST(INTLOBJS)
18856+
18857+ dnl Enable libtool support if the surrounding package wishes it.
18858+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
18859+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
18860+ ])
18861+
18862+ dnl For backward compatibility. Some Makefiles may be using this.
18863+ INTLLIBS="$LIBINTL"
18864+ AC_SUBST(INTLLIBS)
18865+
18866+ dnl Make all documented variables known to autoconf.
18867+ AC_SUBST(LIBINTL)
18868+ AC_SUBST(LTLIBINTL)
18869+ AC_SUBST(POSUB)
18870+])
18871+
18872+
18873+dnl Checks for all prerequisites of the intl subdirectory,
18874+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
18875+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
18876+AC_DEFUN([AM_INTL_SUBDIR],
18877+[
18878+ AC_REQUIRE([AC_PROG_INSTALL])dnl
18879+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
18880+ AC_REQUIRE([AC_PROG_CC])dnl
18881+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
18882+ AC_REQUIRE([AC_PROG_RANLIB])dnl
18883+ AC_REQUIRE([AC_ISC_POSIX])dnl
18884+ AC_REQUIRE([AC_HEADER_STDC])dnl
18885+ AC_REQUIRE([AC_C_CONST])dnl
18886+ AC_REQUIRE([bh_C_SIGNED])dnl
18887+ AC_REQUIRE([AC_C_INLINE])dnl
18888+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
18889+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
18890+ AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
18891+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
18892+ AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
18893+ AC_REQUIRE([gt_TYPE_WINT_T])dnl
18894+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
18895+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
18896+ AC_REQUIRE([gt_TYPE_INTMAX_T])
18897+ AC_REQUIRE([gt_PRINTF_POSIX])
18898+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
18899+ AC_REQUIRE([AC_FUNC_MMAP])dnl
18900+ AC_REQUIRE([jm_GLIBC21])dnl
18901+ AC_REQUIRE([gt_INTDIV0])dnl
18902+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
18903+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
18904+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
18905+ AC_REQUIRE([gl_XSIZE])dnl
18906+
18907+ AC_CHECK_TYPE([ptrdiff_t], ,
18908+ [AC_DEFINE([ptrdiff_t], [long],
18909+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
18910+ ])
18911+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
18912+stdlib.h string.h unistd.h sys/param.h])
18913+ AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
18914+mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
18915+strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
18916+__fsetlocking])
18917+
18918+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
18919+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
18920+ gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
18921+ gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
18922+
18923+ dnl Use the *_unlocked functions only if they are declared.
18924+ dnl (because some of them were defined without being declared in Solaris
18925+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
18926+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
18927+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
18928+ gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
18929+ gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
18930+ gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
18931+
18932+ case $gt_cv_func_printf_posix in
18933+ *yes) HAVE_POSIX_PRINTF=1 ;;
18934+ *) HAVE_POSIX_PRINTF=0 ;;
18935+ esac
18936+ AC_SUBST([HAVE_POSIX_PRINTF])
18937+ if test "$ac_cv_func_asprintf" = yes; then
18938+ HAVE_ASPRINTF=1
18939+ else
18940+ HAVE_ASPRINTF=0
18941+ fi
18942+ AC_SUBST([HAVE_ASPRINTF])
18943+ if test "$ac_cv_func_snprintf" = yes; then
18944+ HAVE_SNPRINTF=1
18945+ else
18946+ HAVE_SNPRINTF=0
18947+ fi
18948+ AC_SUBST([HAVE_SNPRINTF])
18949+ if test "$ac_cv_func_wprintf" = yes; then
18950+ HAVE_WPRINTF=1
18951+ else
18952+ HAVE_WPRINTF=0
18953+ fi
18954+ AC_SUBST([HAVE_WPRINTF])
18955+
18956+ AM_ICONV
18957+ AM_LANGINFO_CODESET
18958+ if test $ac_cv_header_locale_h = yes; then
18959+ AM_LC_MESSAGES
18960+ fi
18961+
18962+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
18963+ dnl because plural.y uses bison specific features. It requires at least
18964+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
18965+ dnl compile.
18966+ dnl bison is only needed for the maintainer (who touches plural.y). But in
18967+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
18968+ dnl the rule in general Makefile. Now, some people carelessly touch the
18969+ dnl files or have a broken "make" program, hence the plural.c rule will
18970+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
18971+ dnl present or too old.
18972+ AC_CHECK_PROGS([INTLBISON], [bison])
18973+ if test -z "$INTLBISON"; then
18974+ ac_verc_fail=yes
18975+ else
18976+ dnl Found it, now check the version.
18977+ AC_MSG_CHECKING([version of bison])
18978+changequote(<<,>>)dnl
18979+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
18980+ case $ac_prog_version in
18981+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
18982+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
18983+changequote([,])dnl
18984+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
18985+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
18986+ esac
18987+ AC_MSG_RESULT([$ac_prog_version])
18988+ fi
18989+ if test $ac_verc_fail = yes; then
18990+ INTLBISON=:
18991+ fi
18992+])
18993+
18994+
18995+dnl gt_CHECK_DECL(FUNC, INCLUDES)
18996+dnl Check whether a function is declared.
18997+AC_DEFUN([gt_CHECK_DECL],
18998+[
18999+ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
19000+ [AC_TRY_COMPILE([$2], [
19001+#ifndef $1
19002+ char *p = (char *) $1;
19003+#endif
19004+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
19005+ if test $ac_cv_have_decl_$1 = yes; then
19006+ gt_value=1
19007+ else
19008+ gt_value=0
19009+ fi
19010+ AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
19011+ [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
19012+])
19013+
19014+
19015+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
19016+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
19017--- lrzsz-0.12.20.safe/m4/glibc21.m4 1969-12-31 19:00:00.000000000 -0500
19018+++ lrzsz-0.12.20/m4/glibc21.m4 2004-09-12 14:40:34.833675432 -0400
19019@@ -0,0 +1,32 @@
19020+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
19021+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
19022+dnl This file is free software, distributed under the terms of the GNU
19023+dnl General Public License. As a special exception to the GNU General
19024+dnl Public License, this file may be distributed as part of a program
19025+dnl that contains a configuration script generated by Autoconf, under
19026+dnl the same distribution terms as the rest of that program.
19027+
19028+# Test for the GNU C Library, version 2.1 or newer.
19029+# From Bruno Haible.
19030+
19031+AC_DEFUN([jm_GLIBC21],
19032+ [
19033+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
19034+ ac_cv_gnu_library_2_1,
19035+ [AC_EGREP_CPP([Lucky GNU user],
19036+ [
19037+#include <features.h>
19038+#ifdef __GNU_LIBRARY__
19039+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
19040+ Lucky GNU user
19041+ #endif
19042+#endif
19043+ ],
19044+ ac_cv_gnu_library_2_1=yes,
19045+ ac_cv_gnu_library_2_1=no)
19046+ ]
19047+ )
19048+ AC_SUBST(GLIBC21)
19049+ GLIBC21="$ac_cv_gnu_library_2_1"
19050+ ]
19051+)
19052--- lrzsz-0.12.20.safe/m4/iconv.m4 1969-12-31 19:00:00.000000000 -0500
19053+++ lrzsz-0.12.20/m4/iconv.m4 2004-09-12 14:40:34.839674520 -0400
19054@@ -0,0 +1,103 @@
19055+# iconv.m4 serial AM4 (gettext-0.11.3)
19056+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
19057+dnl This file is free software, distributed under the terms of the GNU
19058+dnl General Public License. As a special exception to the GNU General
19059+dnl Public License, this file may be distributed as part of a program
19060+dnl that contains a configuration script generated by Autoconf, under
19061+dnl the same distribution terms as the rest of that program.
19062+
19063+dnl From Bruno Haible.
19064+
19065+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
19066+[
19067+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
19068+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19069+ AC_REQUIRE([AC_LIB_RPATH])
19070+
19071+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
19072+ dnl accordingly.
19073+ AC_LIB_LINKFLAGS_BODY([iconv])
19074+])
19075+
19076+AC_DEFUN([AM_ICONV_LINK],
19077+[
19078+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
19079+ dnl those with the standalone portable GNU libiconv installed).
19080+
19081+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
19082+ dnl accordingly.
19083+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
19084+
19085+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
19086+ dnl because if the user has installed libiconv and not disabled its use
19087+ dnl via --without-libiconv-prefix, he wants to use it. The first
19088+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
19089+ am_save_CPPFLAGS="$CPPFLAGS"
19090+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
19091+
19092+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
19093+ am_cv_func_iconv="no, consider installing GNU libiconv"
19094+ am_cv_lib_iconv=no
19095+ AC_TRY_LINK([#include <stdlib.h>
19096+#include <iconv.h>],
19097+ [iconv_t cd = iconv_open("","");
19098+ iconv(cd,NULL,NULL,NULL,NULL);
19099+ iconv_close(cd);],
19100+ am_cv_func_iconv=yes)
19101+ if test "$am_cv_func_iconv" != yes; then
19102+ am_save_LIBS="$LIBS"
19103+ LIBS="$LIBS $LIBICONV"
19104+ AC_TRY_LINK([#include <stdlib.h>
19105+#include <iconv.h>],
19106+ [iconv_t cd = iconv_open("","");
19107+ iconv(cd,NULL,NULL,NULL,NULL);
19108+ iconv_close(cd);],
19109+ am_cv_lib_iconv=yes
19110+ am_cv_func_iconv=yes)
19111+ LIBS="$am_save_LIBS"
19112+ fi
19113+ ])
19114+ if test "$am_cv_func_iconv" = yes; then
19115+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
19116+ fi
19117+ if test "$am_cv_lib_iconv" = yes; then
19118+ AC_MSG_CHECKING([how to link with libiconv])
19119+ AC_MSG_RESULT([$LIBICONV])
19120+ else
19121+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
19122+ dnl either.
19123+ CPPFLAGS="$am_save_CPPFLAGS"
19124+ LIBICONV=
19125+ LTLIBICONV=
19126+ fi
19127+ AC_SUBST(LIBICONV)
19128+ AC_SUBST(LTLIBICONV)
19129+])
19130+
19131+AC_DEFUN([AM_ICONV],
19132+[
19133+ AM_ICONV_LINK
19134+ if test "$am_cv_func_iconv" = yes; then
19135+ AC_MSG_CHECKING([for iconv declaration])
19136+ AC_CACHE_VAL(am_cv_proto_iconv, [
19137+ AC_TRY_COMPILE([
19138+#include <stdlib.h>
19139+#include <iconv.h>
19140+extern
19141+#ifdef __cplusplus
19142+"C"
19143+#endif
19144+#if defined(__STDC__) || defined(__cplusplus)
19145+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
19146+#else
19147+size_t iconv();
19148+#endif
19149+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
19150+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
19151+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
19152+ AC_MSG_RESULT([$]{ac_t:-
19153+ }[$]am_cv_proto_iconv)
19154+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
19155+ [Define as const if the declaration of iconv() needs const.])
19156+ fi
19157+])
19158--- lrzsz-0.12.20.safe/m4/intdiv0.m4 1969-12-31 19:00:00.000000000 -0500
19159+++ lrzsz-0.12.20/m4/intdiv0.m4 2004-09-12 14:40:34.845673608 -0400
19160@@ -0,0 +1,72 @@
19161+# intdiv0.m4 serial 1 (gettext-0.11.3)
19162+dnl Copyright (C) 2002 Free Software Foundation, Inc.
19163+dnl This file is free software, distributed under the terms of the GNU
19164+dnl General Public License. As a special exception to the GNU General
19165+dnl Public License, this file may be distributed as part of a program
19166+dnl that contains a configuration script generated by Autoconf, under
19167+dnl the same distribution terms as the rest of that program.
19168+
19169+dnl From Bruno Haible.
19170+
19171+AC_DEFUN([gt_INTDIV0],
19172+[
19173+ AC_REQUIRE([AC_PROG_CC])dnl
19174+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
19175+
19176+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
19177+ gt_cv_int_divbyzero_sigfpe,
19178+ [
19179+ AC_TRY_RUN([
19180+#include <stdlib.h>
19181+#include <signal.h>
19182+
19183+static void
19184+#ifdef __cplusplus
19185+sigfpe_handler (int sig)
19186+#else
19187+sigfpe_handler (sig) int sig;
19188+#endif
19189+{
19190+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
19191+ exit (sig != SIGFPE);
19192+}
19193+
19194+int x = 1;
19195+int y = 0;
19196+int z;
19197+int nan;
19198+
19199+int main ()
19200+{
19201+ signal (SIGFPE, sigfpe_handler);
19202+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
19203+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
19204+ signal (SIGTRAP, sigfpe_handler);
19205+#endif
19206+/* Linux/SPARC yields signal SIGILL. */
19207+#if defined (__sparc__) && defined (__linux__)
19208+ signal (SIGILL, sigfpe_handler);
19209+#endif
19210+
19211+ z = x / y;
19212+ nan = y / y;
19213+ exit (1);
19214+}
19215+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
19216+ [
19217+ # Guess based on the CPU.
19218+ case "$host_cpu" in
19219+ alpha* | i[34567]86 | m68k | s390*)
19220+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
19221+ *)
19222+ gt_cv_int_divbyzero_sigfpe="guessing no";;
19223+ esac
19224+ ])
19225+ ])
19226+ case "$gt_cv_int_divbyzero_sigfpe" in
19227+ *yes) value=1;;
19228+ *) value=0;;
19229+ esac
19230+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
19231+ [Define if integer division by zero raises signal SIGFPE.])
19232+])
19233--- lrzsz-0.12.20.safe/m4/intmax.m4 1969-12-31 19:00:00.000000000 -0500
19234+++ lrzsz-0.12.20/m4/intmax.m4 2004-09-12 14:40:34.855672088 -0400
19235@@ -0,0 +1,32 @@
19236+# intmax.m4 serial 1 (gettext-0.12)
19237+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
19238+dnl This file is free software, distributed under the terms of the GNU
19239+dnl General Public License. As a special exception to the GNU General
19240+dnl Public License, this file may be distributed as part of a program
19241+dnl that contains a configuration script generated by Autoconf, under
19242+dnl the same distribution terms as the rest of that program.
19243+
19244+dnl From Bruno Haible.
19245+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
19246+dnl find a replacement if it is lacking.
19247+
19248+AC_DEFUN([gt_TYPE_INTMAX_T],
19249+[
19250+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
19251+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
19252+ AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
19253+ [AC_TRY_COMPILE([
19254+#include <stddef.h>
19255+#include <stdlib.h>
19256+#if HAVE_STDINT_H_WITH_UINTMAX
19257+#include <stdint.h>
19258+#endif
19259+#if HAVE_INTTYPES_H_WITH_UINTMAX
19260+#include <inttypes.h>
19261+#endif
19262+], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
19263+ if test $gt_cv_c_intmax_t = yes; then
19264+ AC_DEFINE(HAVE_INTMAX_T, 1,
19265+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
19266+ fi
19267+])
19268--- lrzsz-0.12.20.safe/m4/inttypes_h.m4 1969-12-31 19:00:00.000000000 -0500
19269+++ lrzsz-0.12.20/m4/inttypes_h.m4 2004-09-12 14:40:34.868670112 -0400
19270@@ -0,0 +1,28 @@
19271+# inttypes_h.m4 serial 5 (gettext-0.12)
19272+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
19273+dnl This file is free software, distributed under the terms of the GNU
19274+dnl General Public License. As a special exception to the GNU General
19275+dnl Public License, this file may be distributed as part of a program
19276+dnl that contains a configuration script generated by Autoconf, under
19277+dnl the same distribution terms as the rest of that program.
19278+
19279+dnl From Paul Eggert.
19280+
19281+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
19282+# doesn't clash with <sys/types.h>, and declares uintmax_t.
19283+
19284+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
19285+[
19286+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
19287+ [AC_TRY_COMPILE(
19288+ [#include <sys/types.h>
19289+#include <inttypes.h>],
19290+ [uintmax_t i = (uintmax_t) -1;],
19291+ jm_ac_cv_header_inttypes_h=yes,
19292+ jm_ac_cv_header_inttypes_h=no)])
19293+ if test $jm_ac_cv_header_inttypes_h = yes; then
19294+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
19295+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
19296+ and declares uintmax_t. ])
19297+ fi
19298+])
19299--- lrzsz-0.12.20.safe/m4/inttypes.m4 1969-12-31 19:00:00.000000000 -0500
19300+++ lrzsz-0.12.20/m4/inttypes.m4 2004-09-12 14:40:34.861671176 -0400
19301@@ -0,0 +1,27 @@
19302+# inttypes.m4 serial 1 (gettext-0.11.4)
19303+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
19304+dnl This file is free software, distributed under the terms of the GNU
19305+dnl General Public License. As a special exception to the GNU General
19306+dnl Public License, this file may be distributed as part of a program
19307+dnl that contains a configuration script generated by Autoconf, under
19308+dnl the same distribution terms as the rest of that program.
19309+
19310+dnl From Paul Eggert.
19311+
19312+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
19313+# <sys/types.h>.
19314+
19315+AC_DEFUN([gt_HEADER_INTTYPES_H],
19316+[
19317+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
19318+ [
19319+ AC_TRY_COMPILE(
19320+ [#include <sys/types.h>
19321+#include <inttypes.h>],
19322+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
19323+ ])
19324+ if test $gt_cv_header_inttypes_h = yes; then
19325+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
19326+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
19327+ fi
19328+])
19329--- lrzsz-0.12.20.safe/m4/inttypes-pri.m4 1969-12-31 19:00:00.000000000 -0500
19330+++ lrzsz-0.12.20/m4/inttypes-pri.m4 2004-09-12 14:40:34.874669200 -0400
19331@@ -0,0 +1,32 @@
19332+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
19333+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
19334+dnl This file is free software, distributed under the terms of the GNU
19335+dnl General Public License. As a special exception to the GNU General
19336+dnl Public License, this file may be distributed as part of a program
19337+dnl that contains a configuration script generated by Autoconf, under
19338+dnl the same distribution terms as the rest of that program.
19339+
19340+dnl From Bruno Haible.
19341+
19342+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
19343+# macros to non-string values. This is the case on AIX 4.3.3.
19344+
19345+AC_DEFUN([gt_INTTYPES_PRI],
19346+[
19347+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
19348+ if test $gt_cv_header_inttypes_h = yes; then
19349+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
19350+ gt_cv_inttypes_pri_broken,
19351+ [
19352+ AC_TRY_COMPILE([#include <inttypes.h>
19353+#ifdef PRId32
19354+char *p = PRId32;
19355+#endif
19356+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
19357+ ])
19358+ fi
19359+ if test "$gt_cv_inttypes_pri_broken" = yes; then
19360+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
19361+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
19362+ fi
19363+])
19364--- lrzsz-0.12.20.safe/m4/isc-posix.m4 1969-12-31 19:00:00.000000000 -0500
19365+++ lrzsz-0.12.20/m4/isc-posix.m4 2004-09-12 14:40:34.885667528 -0400
19366@@ -0,0 +1,26 @@
19367+# isc-posix.m4 serial 2 (gettext-0.11.2)
19368+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
19369+dnl This file is free software, distributed under the terms of the GNU
19370+dnl General Public License. As a special exception to the GNU General
19371+dnl Public License, this file may be distributed as part of a program
19372+dnl that contains a configuration script generated by Autoconf, under
19373+dnl the same distribution terms as the rest of that program.
19374+
19375+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
19376+
19377+# This test replaces the one in autoconf.
19378+# Currently this macro should have the same name as the autoconf macro
19379+# because gettext's gettext.m4 (distributed in the automake package)
19380+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
19381+# give these diagnostics:
19382+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
19383+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
19384+
19385+undefine([AC_ISC_POSIX])
19386+
19387+AC_DEFUN([AC_ISC_POSIX],
19388+ [
19389+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
19390+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
19391+ ]
19392+)
19393--- lrzsz-0.12.20.safe/m4/lcmessage.m4 1969-12-31 19:00:00.000000000 -0500
19394+++ lrzsz-0.12.20/m4/lcmessage.m4 2004-09-12 14:40:34.902664944 -0400
19395@@ -0,0 +1,32 @@
19396+# lcmessage.m4 serial 3 (gettext-0.11.3)
19397+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
19398+dnl This file is free software, distributed under the terms of the GNU
19399+dnl General Public License. As a special exception to the GNU General
19400+dnl Public License, this file may be distributed as part of a program
19401+dnl that contains a configuration script generated by Autoconf, under
19402+dnl the same distribution terms as the rest of that program.
19403+dnl
19404+dnl This file can can be used in projects which are not available under
19405+dnl the GNU General Public License or the GNU Library General Public
19406+dnl License but which still want to provide support for the GNU gettext
19407+dnl functionality.
19408+dnl Please note that the actual code of the GNU gettext library is covered
19409+dnl by the GNU Library General Public License, and the rest of the GNU
19410+dnl gettext package package is covered by the GNU General Public License.
19411+dnl They are *not* in the public domain.
19412+
19413+dnl Authors:
19414+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
19415+
19416+# Check whether LC_MESSAGES is available in <locale.h>.
19417+
19418+AC_DEFUN([AM_LC_MESSAGES],
19419+[
19420+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
19421+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
19422+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
19423+ if test $am_cv_val_LC_MESSAGES = yes; then
19424+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
19425+ [Define if your <locale.h> file defines LC_MESSAGES.])
19426+ fi
19427+])
19428--- lrzsz-0.12.20.safe/m4/lib-ld.m4 1969-12-31 19:00:00.000000000 -0500
19429+++ lrzsz-0.12.20/m4/lib-ld.m4 2004-09-12 14:40:34.908664032 -0400
19430@@ -0,0 +1,112 @@
19431+# lib-ld.m4 serial 3 (gettext-0.13)
19432+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
19433+dnl This file is free software, distributed under the terms of the GNU
19434+dnl General Public License. As a special exception to the GNU General
19435+dnl Public License, this file may be distributed as part of a program
19436+dnl that contains a configuration script generated by Autoconf, under
19437+dnl the same distribution terms as the rest of that program.
19438+
19439+dnl Subroutines of libtool.m4,
19440+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
19441+dnl with libtool.m4.
19442+
19443+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
19444+AC_DEFUN([AC_LIB_PROG_LD_GNU],
19445+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
19446+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
19447+case `$LD -v 2>&1 </dev/null` in
19448+*GNU* | *'with BFD'*)
19449+ acl_cv_prog_gnu_ld=yes ;;
19450+*)
19451+ acl_cv_prog_gnu_ld=no ;;
19452+esac])
19453+with_gnu_ld=$acl_cv_prog_gnu_ld
19454+])
19455+
19456+dnl From libtool-1.4. Sets the variable LD.
19457+AC_DEFUN([AC_LIB_PROG_LD],
19458+[AC_ARG_WITH(gnu-ld,
19459+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
19460+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
19461+AC_REQUIRE([AC_PROG_CC])dnl
19462+AC_REQUIRE([AC_CANONICAL_HOST])dnl
19463+# Prepare PATH_SEPARATOR.
19464+# The user is always right.
19465+if test "${PATH_SEPARATOR+set}" != set; then
19466+ echo "#! /bin/sh" >conf$$.sh
19467+ echo "exit 0" >>conf$$.sh
19468+ chmod +x conf$$.sh
19469+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19470+ PATH_SEPARATOR=';'
19471+ else
19472+ PATH_SEPARATOR=:
19473+ fi
19474+ rm -f conf$$.sh
19475+fi
19476+ac_prog=ld
19477+if test "$GCC" = yes; then
19478+ # Check if gcc -print-prog-name=ld gives a path.
19479+ AC_MSG_CHECKING([for ld used by GCC])
19480+ case $host in
19481+ *-*-mingw*)
19482+ # gcc leaves a trailing carriage return which upsets mingw
19483+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
19484+ *)
19485+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
19486+ esac
19487+ case $ac_prog in
19488+ # Accept absolute paths.
19489+ [[\\/]* | [A-Za-z]:[\\/]*)]
19490+ [re_direlt='/[^/][^/]*/\.\./']
19491+ # Canonicalize the path of ld
19492+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
19493+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
19494+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
19495+ done
19496+ test -z "$LD" && LD="$ac_prog"
19497+ ;;
19498+ "")
19499+ # If it fails, then pretend we aren't using GCC.
19500+ ac_prog=ld
19501+ ;;
19502+ *)
19503+ # If it is relative, then search for the first ld in PATH.
19504+ with_gnu_ld=unknown
19505+ ;;
19506+ esac
19507+elif test "$with_gnu_ld" = yes; then
19508+ AC_MSG_CHECKING([for GNU ld])
19509+else
19510+ AC_MSG_CHECKING([for non-GNU ld])
19511+fi
19512+AC_CACHE_VAL(acl_cv_path_LD,
19513+[if test -z "$LD"; then
19514+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
19515+ for ac_dir in $PATH; do
19516+ test -z "$ac_dir" && ac_dir=.
19517+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
19518+ acl_cv_path_LD="$ac_dir/$ac_prog"
19519+ # Check to see if the program is GNU ld. I'd rather use --version,
19520+ # but apparently some GNU ld's only accept -v.
19521+ # Break only if it was the GNU/non-GNU ld that we prefer.
19522+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
19523+ *GNU* | *'with BFD'*)
19524+ test "$with_gnu_ld" != no && break ;;
19525+ *)
19526+ test "$with_gnu_ld" != yes && break ;;
19527+ esac
19528+ fi
19529+ done
19530+ IFS="$ac_save_ifs"
19531+else
19532+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
19533+fi])
19534+LD="$acl_cv_path_LD"
19535+if test -n "$LD"; then
19536+ AC_MSG_RESULT($LD)
19537+else
19538+ AC_MSG_RESULT(no)
19539+fi
19540+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
19541+AC_LIB_PROG_LD_GNU
19542+])
19543--- lrzsz-0.12.20.safe/m4/lib-link.m4 1969-12-31 19:00:00.000000000 -0500
19544+++ lrzsz-0.12.20/m4/lib-link.m4 2004-09-12 14:40:34.914663120 -0400
19545@@ -0,0 +1,551 @@
19546+# lib-link.m4 serial 4 (gettext-0.12)
19547+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
19548+dnl This file is free software, distributed under the terms of the GNU
19549+dnl General Public License. As a special exception to the GNU General
19550+dnl Public License, this file may be distributed as part of a program
19551+dnl that contains a configuration script generated by Autoconf, under
19552+dnl the same distribution terms as the rest of that program.
19553+
19554+dnl From Bruno Haible.
19555+
19556+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
19557+dnl the libraries corresponding to explicit and implicit dependencies.
19558+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
19559+dnl augments the CPPFLAGS variable.
19560+AC_DEFUN([AC_LIB_LINKFLAGS],
19561+[
19562+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19563+ AC_REQUIRE([AC_LIB_RPATH])
19564+ define([Name],[translit([$1],[./-], [___])])
19565+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
19566+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
19567+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
19568+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
19569+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
19570+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
19571+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
19572+ ])
19573+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
19574+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
19575+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
19576+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
19577+ AC_SUBST([LIB]NAME)
19578+ AC_SUBST([LTLIB]NAME)
19579+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
19580+ dnl results of this search when this library appears as a dependency.
19581+ HAVE_LIB[]NAME=yes
19582+ undefine([Name])
19583+ undefine([NAME])
19584+])
19585+
19586+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
19587+dnl searches for libname and the libraries corresponding to explicit and
19588+dnl implicit dependencies, together with the specified include files and
19589+dnl the ability to compile and link the specified testcode. If found, it
19590+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
19591+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
19592+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
19593+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
19594+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
19595+[
19596+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19597+ AC_REQUIRE([AC_LIB_RPATH])
19598+ define([Name],[translit([$1],[./-], [___])])
19599+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
19600+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
19601+
19602+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
19603+ dnl accordingly.
19604+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
19605+
19606+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
19607+ dnl because if the user has installed lib[]Name and not disabled its use
19608+ dnl via --without-lib[]Name-prefix, he wants to use it.
19609+ ac_save_CPPFLAGS="$CPPFLAGS"
19610+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
19611+
19612+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
19613+ ac_save_LIBS="$LIBS"
19614+ LIBS="$LIBS $LIB[]NAME"
19615+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
19616+ LIBS="$ac_save_LIBS"
19617+ ])
19618+ if test "$ac_cv_lib[]Name" = yes; then
19619+ HAVE_LIB[]NAME=yes
19620+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
19621+ AC_MSG_CHECKING([how to link with lib[]$1])
19622+ AC_MSG_RESULT([$LIB[]NAME])
19623+ else
19624+ HAVE_LIB[]NAME=no
19625+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
19626+ dnl $INC[]NAME either.
19627+ CPPFLAGS="$ac_save_CPPFLAGS"
19628+ LIB[]NAME=
19629+ LTLIB[]NAME=
19630+ fi
19631+ AC_SUBST([HAVE_LIB]NAME)
19632+ AC_SUBST([LIB]NAME)
19633+ AC_SUBST([LTLIB]NAME)
19634+ undefine([Name])
19635+ undefine([NAME])
19636+])
19637+
19638+dnl Determine the platform dependent parameters needed to use rpath:
19639+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
19640+dnl hardcode_direct, hardcode_minus_L.
19641+AC_DEFUN([AC_LIB_RPATH],
19642+[
19643+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
19644+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
19645+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
19646+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
19647+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
19648+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
19649+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
19650+ . ./conftest.sh
19651+ rm -f ./conftest.sh
19652+ acl_cv_rpath=done
19653+ ])
19654+ wl="$acl_cv_wl"
19655+ libext="$acl_cv_libext"
19656+ shlibext="$acl_cv_shlibext"
19657+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
19658+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
19659+ hardcode_direct="$acl_cv_hardcode_direct"
19660+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
19661+ dnl Determine whether the user wants rpath handling at all.
19662+ AC_ARG_ENABLE(rpath,
19663+ [ --disable-rpath do not hardcode runtime library paths],
19664+ :, enable_rpath=yes)
19665+])
19666+
19667+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
19668+dnl the libraries corresponding to explicit and implicit dependencies.
19669+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
19670+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
19671+[
19672+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
19673+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
19674+ dnl By default, look in $includedir and $libdir.
19675+ use_additional=yes
19676+ AC_LIB_WITH_FINAL_PREFIX([
19677+ eval additional_includedir=\"$includedir\"
19678+ eval additional_libdir=\"$libdir\"
19679+ ])
19680+ AC_LIB_ARG_WITH([lib$1-prefix],
19681+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
19682+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
19683+[
19684+ if test "X$withval" = "Xno"; then
19685+ use_additional=no
19686+ else
19687+ if test "X$withval" = "X"; then
19688+ AC_LIB_WITH_FINAL_PREFIX([
19689+ eval additional_includedir=\"$includedir\"
19690+ eval additional_libdir=\"$libdir\"
19691+ ])
19692+ else
19693+ additional_includedir="$withval/include"
19694+ additional_libdir="$withval/lib"
19695+ fi
19696+ fi
19697+])
19698+ dnl Search the library and its dependencies in $additional_libdir and
19699+ dnl $LDFLAGS. Using breadth-first-seach.
19700+ LIB[]NAME=
19701+ LTLIB[]NAME=
19702+ INC[]NAME=
19703+ rpathdirs=
19704+ ltrpathdirs=
19705+ names_already_handled=
19706+ names_next_round='$1 $2'
19707+ while test -n "$names_next_round"; do
19708+ names_this_round="$names_next_round"
19709+ names_next_round=
19710+ for name in $names_this_round; do
19711+ already_handled=
19712+ for n in $names_already_handled; do
19713+ if test "$n" = "$name"; then
19714+ already_handled=yes
19715+ break
19716+ fi
19717+ done
19718+ if test -z "$already_handled"; then
19719+ names_already_handled="$names_already_handled $name"
19720+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
19721+ dnl or AC_LIB_HAVE_LINKFLAGS call.
19722+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19723+ eval value=\"\$HAVE_LIB$uppername\"
19724+ if test -n "$value"; then
19725+ if test "$value" = yes; then
19726+ eval value=\"\$LIB$uppername\"
19727+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
19728+ eval value=\"\$LTLIB$uppername\"
19729+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
19730+ else
19731+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
19732+ dnl that this library doesn't exist. So just drop it.
19733+ :
19734+ fi
19735+ else
19736+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
19737+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
19738+ found_dir=
19739+ found_la=
19740+ found_so=
19741+ found_a=
19742+ if test $use_additional = yes; then
19743+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
19744+ found_dir="$additional_libdir"
19745+ found_so="$additional_libdir/lib$name.$shlibext"
19746+ if test -f "$additional_libdir/lib$name.la"; then
19747+ found_la="$additional_libdir/lib$name.la"
19748+ fi
19749+ else
19750+ if test -f "$additional_libdir/lib$name.$libext"; then
19751+ found_dir="$additional_libdir"
19752+ found_a="$additional_libdir/lib$name.$libext"
19753+ if test -f "$additional_libdir/lib$name.la"; then
19754+ found_la="$additional_libdir/lib$name.la"
19755+ fi
19756+ fi
19757+ fi
19758+ fi
19759+ if test "X$found_dir" = "X"; then
19760+ for x in $LDFLAGS $LTLIB[]NAME; do
19761+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19762+ case "$x" in
19763+ -L*)
19764+ dir=`echo "X$x" | sed -e 's/^X-L//'`
19765+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
19766+ found_dir="$dir"
19767+ found_so="$dir/lib$name.$shlibext"
19768+ if test -f "$dir/lib$name.la"; then
19769+ found_la="$dir/lib$name.la"
19770+ fi
19771+ else
19772+ if test -f "$dir/lib$name.$libext"; then
19773+ found_dir="$dir"
19774+ found_a="$dir/lib$name.$libext"
19775+ if test -f "$dir/lib$name.la"; then
19776+ found_la="$dir/lib$name.la"
19777+ fi
19778+ fi
19779+ fi
19780+ ;;
19781+ esac
19782+ if test "X$found_dir" != "X"; then
19783+ break
19784+ fi
19785+ done
19786+ fi
19787+ if test "X$found_dir" != "X"; then
19788+ dnl Found the library.
19789+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
19790+ if test "X$found_so" != "X"; then
19791+ dnl Linking with a shared library. We attempt to hardcode its
19792+ dnl directory into the executable's runpath, unless it's the
19793+ dnl standard /usr/lib.
19794+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19795+ dnl No hardcoding is needed.
19796+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19797+ else
19798+ dnl Use an explicit option to hardcode DIR into the resulting
19799+ dnl binary.
19800+ dnl Potentially add DIR to ltrpathdirs.
19801+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
19802+ haveit=
19803+ for x in $ltrpathdirs; do
19804+ if test "X$x" = "X$found_dir"; then
19805+ haveit=yes
19806+ break
19807+ fi
19808+ done
19809+ if test -z "$haveit"; then
19810+ ltrpathdirs="$ltrpathdirs $found_dir"
19811+ fi
19812+ dnl The hardcoding into $LIBNAME is system dependent.
19813+ if test "$hardcode_direct" = yes; then
19814+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
19815+ dnl resulting binary.
19816+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19817+ else
19818+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19819+ dnl Use an explicit option to hardcode DIR into the resulting
19820+ dnl binary.
19821+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19822+ dnl Potentially add DIR to rpathdirs.
19823+ dnl The rpathdirs will be appended to $LIBNAME at the end.
19824+ haveit=
19825+ for x in $rpathdirs; do
19826+ if test "X$x" = "X$found_dir"; then
19827+ haveit=yes
19828+ break
19829+ fi
19830+ done
19831+ if test -z "$haveit"; then
19832+ rpathdirs="$rpathdirs $found_dir"
19833+ fi
19834+ else
19835+ dnl Rely on "-L$found_dir".
19836+ dnl But don't add it if it's already contained in the LDFLAGS
19837+ dnl or the already constructed $LIBNAME
19838+ haveit=
19839+ for x in $LDFLAGS $LIB[]NAME; do
19840+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19841+ if test "X$x" = "X-L$found_dir"; then
19842+ haveit=yes
19843+ break
19844+ fi
19845+ done
19846+ if test -z "$haveit"; then
19847+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
19848+ fi
19849+ if test "$hardcode_minus_L" != no; then
19850+ dnl FIXME: Not sure whether we should use
19851+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
19852+ dnl here.
19853+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19854+ else
19855+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
19856+ dnl here, because this doesn't fit in flags passed to the
19857+ dnl compiler. So give up. No hardcoding. This affects only
19858+ dnl very old systems.
19859+ dnl FIXME: Not sure whether we should use
19860+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
19861+ dnl here.
19862+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
19863+ fi
19864+ fi
19865+ fi
19866+ fi
19867+ else
19868+ if test "X$found_a" != "X"; then
19869+ dnl Linking with a static library.
19870+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
19871+ else
19872+ dnl We shouldn't come here, but anyway it's good to have a
19873+ dnl fallback.
19874+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
19875+ fi
19876+ fi
19877+ dnl Assume the include files are nearby.
19878+ additional_includedir=
19879+ case "$found_dir" in
19880+ */lib | */lib/)
19881+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19882+ additional_includedir="$basedir/include"
19883+ ;;
19884+ esac
19885+ if test "X$additional_includedir" != "X"; then
19886+ dnl Potentially add $additional_includedir to $INCNAME.
19887+ dnl But don't add it
19888+ dnl 1. if it's the standard /usr/include,
19889+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
19890+ dnl 3. if it's already present in $CPPFLAGS or the already
19891+ dnl constructed $INCNAME,
19892+ dnl 4. if it doesn't exist as a directory.
19893+ if test "X$additional_includedir" != "X/usr/include"; then
19894+ haveit=
19895+ if test "X$additional_includedir" = "X/usr/local/include"; then
19896+ if test -n "$GCC"; then
19897+ case $host_os in
19898+ linux*) haveit=yes;;
19899+ esac
19900+ fi
19901+ fi
19902+ if test -z "$haveit"; then
19903+ for x in $CPPFLAGS $INC[]NAME; do
19904+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19905+ if test "X$x" = "X-I$additional_includedir"; then
19906+ haveit=yes
19907+ break
19908+ fi
19909+ done
19910+ if test -z "$haveit"; then
19911+ if test -d "$additional_includedir"; then
19912+ dnl Really add $additional_includedir to $INCNAME.
19913+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
19914+ fi
19915+ fi
19916+ fi
19917+ fi
19918+ fi
19919+ dnl Look for dependencies.
19920+ if test -n "$found_la"; then
19921+ dnl Read the .la file. It defines the variables
19922+ dnl dlname, library_names, old_library, dependency_libs, current,
19923+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
19924+ save_libdir="$libdir"
19925+ case "$found_la" in
19926+ */* | *\\*) . "$found_la" ;;
19927+ *) . "./$found_la" ;;
19928+ esac
19929+ libdir="$save_libdir"
19930+ dnl We use only dependency_libs.
19931+ for dep in $dependency_libs; do
19932+ case "$dep" in
19933+ -L*)
19934+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19935+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
19936+ dnl But don't add it
19937+ dnl 1. if it's the standard /usr/lib,
19938+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
19939+ dnl 3. if it's already present in $LDFLAGS or the already
19940+ dnl constructed $LIBNAME,
19941+ dnl 4. if it doesn't exist as a directory.
19942+ if test "X$additional_libdir" != "X/usr/lib"; then
19943+ haveit=
19944+ if test "X$additional_libdir" = "X/usr/local/lib"; then
19945+ if test -n "$GCC"; then
19946+ case $host_os in
19947+ linux*) haveit=yes;;
19948+ esac
19949+ fi
19950+ fi
19951+ if test -z "$haveit"; then
19952+ haveit=
19953+ for x in $LDFLAGS $LIB[]NAME; do
19954+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19955+ if test "X$x" = "X-L$additional_libdir"; then
19956+ haveit=yes
19957+ break
19958+ fi
19959+ done
19960+ if test -z "$haveit"; then
19961+ if test -d "$additional_libdir"; then
19962+ dnl Really add $additional_libdir to $LIBNAME.
19963+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
19964+ fi
19965+ fi
19966+ haveit=
19967+ for x in $LDFLAGS $LTLIB[]NAME; do
19968+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19969+ if test "X$x" = "X-L$additional_libdir"; then
19970+ haveit=yes
19971+ break
19972+ fi
19973+ done
19974+ if test -z "$haveit"; then
19975+ if test -d "$additional_libdir"; then
19976+ dnl Really add $additional_libdir to $LTLIBNAME.
19977+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
19978+ fi
19979+ fi
19980+ fi
19981+ fi
19982+ ;;
19983+ -R*)
19984+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
19985+ if test "$enable_rpath" != no; then
19986+ dnl Potentially add DIR to rpathdirs.
19987+ dnl The rpathdirs will be appended to $LIBNAME at the end.
19988+ haveit=
19989+ for x in $rpathdirs; do
19990+ if test "X$x" = "X$dir"; then
19991+ haveit=yes
19992+ break
19993+ fi
19994+ done
19995+ if test -z "$haveit"; then
19996+ rpathdirs="$rpathdirs $dir"
19997+ fi
19998+ dnl Potentially add DIR to ltrpathdirs.
19999+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
20000+ haveit=
20001+ for x in $ltrpathdirs; do
20002+ if test "X$x" = "X$dir"; then
20003+ haveit=yes
20004+ break
20005+ fi
20006+ done
20007+ if test -z "$haveit"; then
20008+ ltrpathdirs="$ltrpathdirs $dir"
20009+ fi
20010+ fi
20011+ ;;
20012+ -l*)
20013+ dnl Handle this in the next round.
20014+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
20015+ ;;
20016+ *.la)
20017+ dnl Handle this in the next round. Throw away the .la's
20018+ dnl directory; it is already contained in a preceding -L
20019+ dnl option.
20020+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
20021+ ;;
20022+ *)
20023+ dnl Most likely an immediate library name.
20024+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
20025+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
20026+ ;;
20027+ esac
20028+ done
20029+ fi
20030+ else
20031+ dnl Didn't find the library; assume it is in the system directories
20032+ dnl known to the linker and runtime loader. (All the system
20033+ dnl directories known to the linker should also be known to the
20034+ dnl runtime loader, otherwise the system is severely misconfigured.)
20035+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
20036+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
20037+ fi
20038+ fi
20039+ fi
20040+ done
20041+ done
20042+ if test "X$rpathdirs" != "X"; then
20043+ if test -n "$hardcode_libdir_separator"; then
20044+ dnl Weird platform: only the last -rpath option counts, the user must
20045+ dnl pass all path elements in one option. We can arrange that for a
20046+ dnl single library, but not when more than one $LIBNAMEs are used.
20047+ alldirs=
20048+ for found_dir in $rpathdirs; do
20049+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
20050+ done
20051+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
20052+ acl_save_libdir="$libdir"
20053+ libdir="$alldirs"
20054+ eval flag=\"$hardcode_libdir_flag_spec\"
20055+ libdir="$acl_save_libdir"
20056+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
20057+ else
20058+ dnl The -rpath options are cumulative.
20059+ for found_dir in $rpathdirs; do
20060+ acl_save_libdir="$libdir"
20061+ libdir="$found_dir"
20062+ eval flag=\"$hardcode_libdir_flag_spec\"
20063+ libdir="$acl_save_libdir"
20064+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
20065+ done
20066+ fi
20067+ fi
20068+ if test "X$ltrpathdirs" != "X"; then
20069+ dnl When using libtool, the option that works for both libraries and
20070+ dnl executables is -R. The -R options are cumulative.
20071+ for found_dir in $ltrpathdirs; do
20072+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
20073+ done
20074+ fi
20075+])
20076+
20077+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
20078+dnl unless already present in VAR.
20079+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
20080+dnl contains two or three consecutive elements that belong together.
20081+AC_DEFUN([AC_LIB_APPENDTOVAR],
20082+[
20083+ for element in [$2]; do
20084+ haveit=
20085+ for x in $[$1]; do
20086+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
20087+ if test "X$x" = "X$element"; then
20088+ haveit=yes
20089+ break
20090+ fi
20091+ done
20092+ if test -z "$haveit"; then
20093+ [$1]="${[$1]}${[$1]:+ }$element"
20094+ fi
20095+ done
20096+])
20097--- lrzsz-0.12.20.safe/m4/lib-prefix.m4 1969-12-31 19:00:00.000000000 -0500
20098+++ lrzsz-0.12.20/m4/lib-prefix.m4 2004-09-12 14:40:34.921662056 -0400
20099@@ -0,0 +1,155 @@
20100+# lib-prefix.m4 serial 3 (gettext-0.13)
20101+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
20102+dnl This file is free software, distributed under the terms of the GNU
20103+dnl General Public License. As a special exception to the GNU General
20104+dnl Public License, this file may be distributed as part of a program
20105+dnl that contains a configuration script generated by Autoconf, under
20106+dnl the same distribution terms as the rest of that program.
20107+
20108+dnl From Bruno Haible.
20109+
20110+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
20111+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
20112+dnl require excessive bracketing.
20113+ifdef([AC_HELP_STRING],
20114+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
20115+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
20116+
20117+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
20118+dnl to access previously installed libraries. The basic assumption is that
20119+dnl a user will want packages to use other packages he previously installed
20120+dnl with the same --prefix option.
20121+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
20122+dnl libraries, but is otherwise very convenient.
20123+AC_DEFUN([AC_LIB_PREFIX],
20124+[
20125+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
20126+ AC_REQUIRE([AC_PROG_CC])
20127+ AC_REQUIRE([AC_CANONICAL_HOST])
20128+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
20129+ dnl By default, look in $includedir and $libdir.
20130+ use_additional=yes
20131+ AC_LIB_WITH_FINAL_PREFIX([
20132+ eval additional_includedir=\"$includedir\"
20133+ eval additional_libdir=\"$libdir\"
20134+ ])
20135+ AC_LIB_ARG_WITH([lib-prefix],
20136+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
20137+ --without-lib-prefix don't search for libraries in includedir and libdir],
20138+[
20139+ if test "X$withval" = "Xno"; then
20140+ use_additional=no
20141+ else
20142+ if test "X$withval" = "X"; then
20143+ AC_LIB_WITH_FINAL_PREFIX([
20144+ eval additional_includedir=\"$includedir\"
20145+ eval additional_libdir=\"$libdir\"
20146+ ])
20147+ else
20148+ additional_includedir="$withval/include"
20149+ additional_libdir="$withval/lib"
20150+ fi
20151+ fi
20152+])
20153+ if test $use_additional = yes; then
20154+ dnl Potentially add $additional_includedir to $CPPFLAGS.
20155+ dnl But don't add it
20156+ dnl 1. if it's the standard /usr/include,
20157+ dnl 2. if it's already present in $CPPFLAGS,
20158+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
20159+ dnl 4. if it doesn't exist as a directory.
20160+ if test "X$additional_includedir" != "X/usr/include"; then
20161+ haveit=
20162+ for x in $CPPFLAGS; do
20163+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
20164+ if test "X$x" = "X-I$additional_includedir"; then
20165+ haveit=yes
20166+ break
20167+ fi
20168+ done
20169+ if test -z "$haveit"; then
20170+ if test "X$additional_includedir" = "X/usr/local/include"; then
20171+ if test -n "$GCC"; then
20172+ case $host_os in
20173+ linux*) haveit=yes;;
20174+ esac
20175+ fi
20176+ fi
20177+ if test -z "$haveit"; then
20178+ if test -d "$additional_includedir"; then
20179+ dnl Really add $additional_includedir to $CPPFLAGS.
20180+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
20181+ fi
20182+ fi
20183+ fi
20184+ fi
20185+ dnl Potentially add $additional_libdir to $LDFLAGS.
20186+ dnl But don't add it
20187+ dnl 1. if it's the standard /usr/lib,
20188+ dnl 2. if it's already present in $LDFLAGS,
20189+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
20190+ dnl 4. if it doesn't exist as a directory.
20191+ if test "X$additional_libdir" != "X/usr/lib"; then
20192+ haveit=
20193+ for x in $LDFLAGS; do
20194+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
20195+ if test "X$x" = "X-L$additional_libdir"; then
20196+ haveit=yes
20197+ break
20198+ fi
20199+ done
20200+ if test -z "$haveit"; then
20201+ if test "X$additional_libdir" = "X/usr/local/lib"; then
20202+ if test -n "$GCC"; then
20203+ case $host_os in
20204+ linux*) haveit=yes;;
20205+ esac
20206+ fi
20207+ fi
20208+ if test -z "$haveit"; then
20209+ if test -d "$additional_libdir"; then
20210+ dnl Really add $additional_libdir to $LDFLAGS.
20211+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
20212+ fi
20213+ fi
20214+ fi
20215+ fi
20216+ fi
20217+])
20218+
20219+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
20220+dnl acl_final_exec_prefix, containing the values to which $prefix and
20221+dnl $exec_prefix will expand at the end of the configure script.
20222+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
20223+[
20224+ dnl Unfortunately, prefix and exec_prefix get only finally determined
20225+ dnl at the end of configure.
20226+ if test "X$prefix" = "XNONE"; then
20227+ acl_final_prefix="$ac_default_prefix"
20228+ else
20229+ acl_final_prefix="$prefix"
20230+ fi
20231+ if test "X$exec_prefix" = "XNONE"; then
20232+ acl_final_exec_prefix='${prefix}'
20233+ else
20234+ acl_final_exec_prefix="$exec_prefix"
20235+ fi
20236+ acl_save_prefix="$prefix"
20237+ prefix="$acl_final_prefix"
20238+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
20239+ prefix="$acl_save_prefix"
20240+])
20241+
20242+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
20243+dnl variables prefix and exec_prefix bound to the values they will have
20244+dnl at the end of the configure script.
20245+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
20246+[
20247+ acl_save_prefix="$prefix"
20248+ prefix="$acl_final_prefix"
20249+ acl_save_exec_prefix="$exec_prefix"
20250+ exec_prefix="$acl_final_exec_prefix"
20251+ $1
20252+ exec_prefix="$acl_save_exec_prefix"
20253+ prefix="$acl_save_prefix"
20254+])
20255--- lrzsz-0.12.20.safe/m4/longdouble.m4 1969-12-31 19:00:00.000000000 -0500
20256+++ lrzsz-0.12.20/m4/longdouble.m4 2004-09-12 14:40:34.942658864 -0400
20257@@ -0,0 +1,30 @@
20258+# longdouble.m4 serial 1 (gettext-0.12)
20259+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
20260+dnl This file is free software, distributed under the terms of the GNU
20261+dnl General Public License. As a special exception to the GNU General
20262+dnl Public License, this file may be distributed as part of a program
20263+dnl that contains a configuration script generated by Autoconf, under
20264+dnl the same distribution terms as the rest of that program.
20265+
20266+dnl From Bruno Haible.
20267+dnl Test whether the compiler supports the 'long double' type.
20268+dnl Prerequisite: AC_PROG_CC
20269+
20270+AC_DEFUN([gt_TYPE_LONGDOUBLE],
20271+[
20272+ AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
20273+ [if test "$GCC" = yes; then
20274+ gt_cv_c_long_double=yes
20275+ else
20276+ AC_TRY_COMPILE([
20277+ /* The Stardent Vistra knows sizeof(long double), but does not support it. */
20278+ long double foo = 0.0;
20279+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
20280+ int array [2*(sizeof(long double) >= sizeof(double)) - 1];
20281+ ], ,
20282+ gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
20283+ fi])
20284+ if test $gt_cv_c_long_double = yes; then
20285+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
20286+ fi
20287+])
20288--- lrzsz-0.12.20.safe/m4/longlong.m4 1969-12-31 19:00:00.000000000 -0500
20289+++ lrzsz-0.12.20/m4/longlong.m4 2004-09-12 14:40:34.949657800 -0400
20290@@ -0,0 +1,25 @@
20291+# longlong.m4 serial 4
20292+dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
20293+dnl This file is free software, distributed under the terms of the GNU
20294+dnl General Public License. As a special exception to the GNU General
20295+dnl Public License, this file may be distributed as part of a program
20296+dnl that contains a configuration script generated by Autoconf, under
20297+dnl the same distribution terms as the rest of that program.
20298+
20299+dnl From Paul Eggert.
20300+
20301+# Define HAVE_LONG_LONG if 'long long' works.
20302+
20303+AC_DEFUN([jm_AC_TYPE_LONG_LONG],
20304+[
20305+ AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
20306+ [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
20307+ [long long llmax = (long long) -1;
20308+ return ll << i | ll >> i | llmax / ll | llmax % ll;],
20309+ ac_cv_type_long_long=yes,
20310+ ac_cv_type_long_long=no)])
20311+ if test $ac_cv_type_long_long = yes; then
20312+ AC_DEFINE(HAVE_LONG_LONG, 1,
20313+ [Define if you have the 'long long' type.])
20314+ fi
20315+])
20316--- lrzsz-0.12.20.safe/m4/Makefile.am 1969-12-31 19:00:00.000000000 -0500
20317+++ lrzsz-0.12.20/m4/Makefile.am 2004-09-12 14:40:35.048642752 -0400
20318@@ -0,0 +1 @@
20319+EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4
20320--- lrzsz-0.12.20.safe/m4/nls.m4 1969-12-31 19:00:00.000000000 -0500
20321+++ lrzsz-0.12.20/m4/nls.m4 2004-09-12 14:40:34.955656888 -0400
20322@@ -0,0 +1,49 @@
20323+# nls.m4 serial 1 (gettext-0.12)
20324+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
20325+dnl This file is free software, distributed under the terms of the GNU
20326+dnl General Public License. As a special exception to the GNU General
20327+dnl Public License, this file may be distributed as part of a program
20328+dnl that contains a configuration script generated by Autoconf, under
20329+dnl the same distribution terms as the rest of that program.
20330+dnl
20331+dnl This file can can be used in projects which are not available under
20332+dnl the GNU General Public License or the GNU Library General Public
20333+dnl License but which still want to provide support for the GNU gettext
20334+dnl functionality.
20335+dnl Please note that the actual code of the GNU gettext library is covered
20336+dnl by the GNU Library General Public License, and the rest of the GNU
20337+dnl gettext package package is covered by the GNU General Public License.
20338+dnl They are *not* in the public domain.
20339+
20340+dnl Authors:
20341+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
20342+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
20343+
20344+AC_DEFUN([AM_NLS],
20345+[
20346+ AC_MSG_CHECKING([whether NLS is requested])
20347+ dnl Default is enabled NLS
20348+ AC_ARG_ENABLE(nls,
20349+ [ --disable-nls do not use Native Language Support],
20350+ USE_NLS=$enableval, USE_NLS=yes)
20351+ AC_MSG_RESULT($USE_NLS)
20352+ AC_SUBST(USE_NLS)
20353+])
20354+
20355+AC_DEFUN([AM_MKINSTALLDIRS],
20356+[
20357+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
20358+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
20359+ dnl Try to locate it.
20360+ MKINSTALLDIRS=
20361+ if test -n "$ac_aux_dir"; then
20362+ case "$ac_aux_dir" in
20363+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
20364+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
20365+ esac
20366+ fi
20367+ if test -z "$MKINSTALLDIRS"; then
20368+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
20369+ fi
20370+ AC_SUBST(MKINSTALLDIRS)
20371+])
20372--- lrzsz-0.12.20.safe/m4/po.m4 1969-12-31 19:00:00.000000000 -0500
20373+++ lrzsz-0.12.20/m4/po.m4 2004-09-12 14:40:34.961655976 -0400
20374@@ -0,0 +1,426 @@
20375+# po.m4 serial 3 (gettext-0.14)
20376+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
20377+dnl This file is free software, distributed under the terms of the GNU
20378+dnl General Public License. As a special exception to the GNU General
20379+dnl Public License, this file may be distributed as part of a program
20380+dnl that contains a configuration script generated by Autoconf, under
20381+dnl the same distribution terms as the rest of that program.
20382+dnl
20383+dnl This file can can be used in projects which are not available under
20384+dnl the GNU General Public License or the GNU Library General Public
20385+dnl License but which still want to provide support for the GNU gettext
20386+dnl functionality.
20387+dnl Please note that the actual code of the GNU gettext library is covered
20388+dnl by the GNU Library General Public License, and the rest of the GNU
20389+dnl gettext package package is covered by the GNU General Public License.
20390+dnl They are *not* in the public domain.
20391+
20392+dnl Authors:
20393+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
20394+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
20395+
20396+dnl Checks for all prerequisites of the po subdirectory.
20397+AC_DEFUN([AM_PO_SUBDIRS],
20398+[
20399+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
20400+ AC_REQUIRE([AC_PROG_INSTALL])dnl
20401+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
20402+ AC_REQUIRE([AM_NLS])dnl
20403+
20404+ dnl Perform the following tests also if --disable-nls has been given,
20405+ dnl because they are needed for "make dist" to work.
20406+
20407+ dnl Search for GNU msgfmt in the PATH.
20408+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
20409+ dnl The second test excludes FreeBSD msgfmt.
20410+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
20411+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
20412+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
20413+ :)
20414+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
20415+
20416+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
20417+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
20418+ dnl The second test excludes FreeBSD xgettext.
20419+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
20420+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
20421+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
20422+ :)
20423+ dnl Remove leftover from FreeBSD xgettext call.
20424+ rm -f messages.po
20425+
20426+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
20427+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
20428+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
20429+
20430+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
20431+ dnl Test whether we really found GNU msgfmt.
20432+ if test "$GMSGFMT" != ":"; then
20433+ dnl If it is no GNU msgfmt we define it as : so that the
20434+ dnl Makefiles still can work.
20435+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
20436+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
20437+ : ;
20438+ else
20439+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
20440+ AC_MSG_RESULT(
20441+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
20442+ GMSGFMT=":"
20443+ fi
20444+ fi
20445+
20446+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
20447+ dnl Test whether we really found GNU xgettext.
20448+ if test "$XGETTEXT" != ":"; then
20449+ dnl If it is no GNU xgettext we define it as : so that the
20450+ dnl Makefiles still can work.
20451+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
20452+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
20453+ : ;
20454+ else
20455+ AC_MSG_RESULT(
20456+ [found xgettext program is not GNU xgettext; ignore it])
20457+ XGETTEXT=":"
20458+ fi
20459+ dnl Remove leftover from FreeBSD xgettext call.
20460+ rm -f messages.po
20461+ fi
20462+
20463+ AC_OUTPUT_COMMANDS([
20464+ for ac_file in $CONFIG_FILES; do
20465+ # Support "outfile[:infile[:infile...]]"
20466+ case "$ac_file" in
20467+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
20468+ esac
20469+ # PO directories have a Makefile.in generated from Makefile.in.in.
20470+ case "$ac_file" in */Makefile.in)
20471+ # Adjust a relative srcdir.
20472+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
20473+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
20474+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
20475+ # In autoconf-2.13 it is called $ac_given_srcdir.
20476+ # In autoconf-2.50 it is called $srcdir.
20477+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
20478+ case "$ac_given_srcdir" in
20479+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
20480+ /*) top_srcdir="$ac_given_srcdir" ;;
20481+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
20482+ esac
20483+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
20484+ rm -f "$ac_dir/POTFILES"
20485+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
20486+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
20487+ POMAKEFILEDEPS="POTFILES.in"
20488+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
20489+ # on $ac_dir but don't depend on user-specified configuration
20490+ # parameters.
20491+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
20492+ # The LINGUAS file contains the set of available languages.
20493+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
20494+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
20495+ fi
20496+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
20497+ # Hide the ALL_LINGUAS assigment from automake.
20498+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
20499+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
20500+ else
20501+ # The set of available languages was given in configure.in.
20502+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
20503+ fi
20504+ # Compute POFILES
20505+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
20506+ # Compute UPDATEPOFILES
20507+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
20508+ # Compute DUMMYPOFILES
20509+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
20510+ # Compute GMOFILES
20511+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
20512+ case "$ac_given_srcdir" in
20513+ .) srcdirpre= ;;
20514+ *) srcdirpre='$(srcdir)/' ;;
20515+ esac
20516+ POFILES=
20517+ UPDATEPOFILES=
20518+ DUMMYPOFILES=
20519+ GMOFILES=
20520+ for lang in $ALL_LINGUAS; do
20521+ POFILES="$POFILES $srcdirpre$lang.po"
20522+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
20523+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
20524+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
20525+ done
20526+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
20527+ # environment variable.
20528+ INST_LINGUAS=
20529+ if test -n "$ALL_LINGUAS"; then
20530+ for presentlang in $ALL_LINGUAS; do
20531+ useit=no
20532+ if test "%UNSET%" != "$LINGUAS"; then
20533+ desiredlanguages="$LINGUAS"
20534+ else
20535+ desiredlanguages="$ALL_LINGUAS"
20536+ fi
20537+ for desiredlang in $desiredlanguages; do
20538+ # Use the presentlang catalog if desiredlang is
20539+ # a. equal to presentlang, or
20540+ # b. a variant of presentlang (because in this case,
20541+ # presentlang can be used as a fallback for messages
20542+ # which are not translated in the desiredlang catalog).
20543+ case "$desiredlang" in
20544+ "$presentlang"*) useit=yes;;
20545+ esac
20546+ done
20547+ if test $useit = yes; then
20548+ INST_LINGUAS="$INST_LINGUAS $presentlang"
20549+ fi
20550+ done
20551+ fi
20552+ CATALOGS=
20553+ if test -n "$INST_LINGUAS"; then
20554+ for lang in $INST_LINGUAS; do
20555+ CATALOGS="$CATALOGS $lang.gmo"
20556+ done
20557+ fi
20558+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
20559+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
20560+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
20561+ if test -f "$f"; then
20562+ case "$f" in
20563+ *.orig | *.bak | *~) ;;
20564+ *) cat "$f" >> "$ac_dir/Makefile" ;;
20565+ esac
20566+ fi
20567+ done
20568+ fi
20569+ ;;
20570+ esac
20571+ done],
20572+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
20573+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
20574+ # from automake.
20575+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
20576+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
20577+ LINGUAS="${LINGUAS-%UNSET%}"
20578+ ])
20579+])
20580+
20581+dnl Postprocesses a Makefile in a directory containing PO files.
20582+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
20583+[
20584+ # When this code is run, in config.status, two variables have already been
20585+ # set:
20586+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
20587+ # - LINGUAS is the value of the environment variable LINGUAS at configure
20588+ # time.
20589+
20590+changequote(,)dnl
20591+ # Adjust a relative srcdir.
20592+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
20593+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
20594+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
20595+ # In autoconf-2.13 it is called $ac_given_srcdir.
20596+ # In autoconf-2.50 it is called $srcdir.
20597+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
20598+ case "$ac_given_srcdir" in
20599+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
20600+ /*) top_srcdir="$ac_given_srcdir" ;;
20601+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
20602+ esac
20603+
20604+ # Find a way to echo strings without interpreting backslash.
20605+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
20606+ gt_echo='echo'
20607+ else
20608+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
20609+ gt_echo='printf %s\n'
20610+ else
20611+ echo_func () {
20612+ cat <<EOT
20613+$*
20614+EOT
20615+ }
20616+ gt_echo='echo_func'
20617+ fi
20618+ fi
20619+
20620+ # A sed script that extracts the value of VARIABLE from a Makefile.
20621+ sed_x_variable='
20622+# Test if the hold space is empty.
20623+x
20624+s/P/P/
20625+x
20626+ta
20627+# Yes it was empty. Look if we have the expected variable definition.
20628+/^[ ]*VARIABLE[ ]*=/{
20629+ # Seen the first line of the variable definition.
20630+ s/^[ ]*VARIABLE[ ]*=//
20631+ ba
20632+}
20633+bd
20634+:a
20635+# Here we are processing a line from the variable definition.
20636+# Remove comment, more precisely replace it with a space.
20637+s/#.*$/ /
20638+# See if the line ends in a backslash.
20639+tb
20640+:b
20641+s/\\$//
20642+# Print the line, without the trailing backslash.
20643+p
20644+tc
20645+# There was no trailing backslash. The end of the variable definition is
20646+# reached. Clear the hold space.
20647+s/^.*$//
20648+x
20649+bd
20650+:c
20651+# A trailing backslash means that the variable definition continues in the
20652+# next line. Put a nonempty string into the hold space to indicate this.
20653+s/^.*$/P/
20654+x
20655+:d
20656+'
20657+changequote([,])dnl
20658+
20659+ # Set POTFILES to the value of the Makefile variable POTFILES.
20660+ sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
20661+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
20662+ # Compute POTFILES_DEPS as
20663+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
20664+ POTFILES_DEPS=
20665+ for file in $POTFILES; do
20666+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
20667+ done
20668+ POMAKEFILEDEPS=""
20669+
20670+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
20671+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
20672+ fi
20673+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
20674+ # The LINGUAS file contains the set of available languages.
20675+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
20676+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
20677+ else
20678+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
20679+ sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
20680+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
20681+ fi
20682+ # Hide the ALL_LINGUAS assigment from automake.
20683+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
20684+ # Compute POFILES
20685+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
20686+ # Compute UPDATEPOFILES
20687+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
20688+ # Compute DUMMYPOFILES
20689+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
20690+ # Compute GMOFILES
20691+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
20692+ # Compute PROPERTIESFILES
20693+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
20694+ # Compute CLASSFILES
20695+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
20696+ # Compute QMFILES
20697+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
20698+ # Compute MSGFILES
20699+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
20700+ # Compute RESOURCESDLLFILES
20701+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
20702+ case "$ac_given_srcdir" in
20703+ .) srcdirpre= ;;
20704+ *) srcdirpre='$(srcdir)/' ;;
20705+ esac
20706+ POFILES=
20707+ UPDATEPOFILES=
20708+ DUMMYPOFILES=
20709+ GMOFILES=
20710+ PROPERTIESFILES=
20711+ CLASSFILES=
20712+ QMFILES=
20713+ MSGFILES=
20714+ RESOURCESDLLFILES=
20715+ for lang in $ALL_LINGUAS; do
20716+ POFILES="$POFILES $srcdirpre$lang.po"
20717+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
20718+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
20719+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
20720+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
20721+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
20722+ QMFILES="$QMFILES $srcdirpre$lang.qm"
20723+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
20724+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
20725+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
20726+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
20727+ done
20728+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
20729+ # environment variable.
20730+ INST_LINGUAS=
20731+ if test -n "$ALL_LINGUAS"; then
20732+ for presentlang in $ALL_LINGUAS; do
20733+ useit=no
20734+ if test "%UNSET%" != "$LINGUAS"; then
20735+ desiredlanguages="$LINGUAS"
20736+ else
20737+ desiredlanguages="$ALL_LINGUAS"
20738+ fi
20739+ for desiredlang in $desiredlanguages; do
20740+ # Use the presentlang catalog if desiredlang is
20741+ # a. equal to presentlang, or
20742+ # b. a variant of presentlang (because in this case,
20743+ # presentlang can be used as a fallback for messages
20744+ # which are not translated in the desiredlang catalog).
20745+ case "$desiredlang" in
20746+ "$presentlang"*) useit=yes;;
20747+ esac
20748+ done
20749+ if test $useit = yes; then
20750+ INST_LINGUAS="$INST_LINGUAS $presentlang"
20751+ fi
20752+ done
20753+ fi
20754+ CATALOGS=
20755+ JAVACATALOGS=
20756+ QTCATALOGS=
20757+ TCLCATALOGS=
20758+ CSHARPCATALOGS=
20759+ if test -n "$INST_LINGUAS"; then
20760+ for lang in $INST_LINGUAS; do
20761+ CATALOGS="$CATALOGS $lang.gmo"
20762+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
20763+ QTCATALOGS="$QTCATALOGS $lang.qm"
20764+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
20765+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
20766+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
20767+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
20768+ done
20769+ fi
20770+
20771+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
20772+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
20773+ # Add dependencies that cannot be formulated as a simple suffix rule.
20774+ for lang in $ALL_LINGUAS; do
20775+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
20776+ cat >> "$ac_file.tmp" <<EOF
20777+$frobbedlang.msg: $lang.po
20778+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
20779+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
20780+EOF
20781+ done
20782+ fi
20783+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
20784+ # Add dependencies that cannot be formulated as a simple suffix rule.
20785+ for lang in $ALL_LINGUAS; do
20786+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
20787+ cat >> "$ac_file.tmp" <<EOF
20788+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
20789+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
20790+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
20791+EOF
20792+ done
20793+ fi
20794+ if test -n "$POMAKEFILEDEPS"; then
20795+ cat >> "$ac_file.tmp" <<EOF
20796+Makefile: $POMAKEFILEDEPS
20797+EOF
20798+ fi
20799+ mv "$ac_file.tmp" "$ac_file"
20800+])
20801--- lrzsz-0.12.20.safe/m4/printf-posix.m4 1969-12-31 19:00:00.000000000 -0500
20802+++ lrzsz-0.12.20/m4/printf-posix.m4 2004-09-12 14:40:34.974654000 -0400
20803@@ -0,0 +1,46 @@
20804+# printf-posix.m4 serial 2 (gettext-0.13.1)
20805+dnl Copyright (C) 2003 Free Software Foundation, Inc.
20806+dnl This file is free software, distributed under the terms of the GNU
20807+dnl General Public License. As a special exception to the GNU General
20808+dnl Public License, this file may be distributed as part of a program
20809+dnl that contains a configuration script generated by Autoconf, under
20810+dnl the same distribution terms as the rest of that program.
20811+
20812+dnl From Bruno Haible.
20813+dnl Test whether the printf() function supports POSIX/XSI format strings with
20814+dnl positions.
20815+
20816+AC_DEFUN([gt_PRINTF_POSIX],
20817+[
20818+ AC_REQUIRE([AC_PROG_CC])
20819+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
20820+ gt_cv_func_printf_posix,
20821+ [
20822+ AC_TRY_RUN([
20823+#include <stdio.h>
20824+#include <string.h>
20825+/* The string "%2$d %1$d", with dollar characters protected from the shell's
20826+ dollar expansion (possibly an autoconf bug). */
20827+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
20828+static char buf[100];
20829+int main ()
20830+{
20831+ sprintf (buf, format, 33, 55);
20832+ return (strcmp (buf, "55 33") != 0);
20833+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
20834+ [
20835+ AC_EGREP_CPP(notposix, [
20836+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
20837+ notposix
20838+#endif
20839+ ], gt_cv_func_printf_posix="guessing no",
20840+ gt_cv_func_printf_posix="guessing yes")
20841+ ])
20842+ ])
20843+ case $gt_cv_func_printf_posix in
20844+ *yes)
20845+ AC_DEFINE(HAVE_POSIX_PRINTF, 1,
20846+ [Define if your printf() function supports format strings with positions.])
20847+ ;;
20848+ esac
20849+])
20850--- lrzsz-0.12.20.safe/m4/progtest.m4 1969-12-31 19:00:00.000000000 -0500
20851+++ lrzsz-0.12.20/m4/progtest.m4 2004-09-12 14:40:34.990651568 -0400
20852@@ -0,0 +1,91 @@
20853+# progtest.m4 serial 3 (gettext-0.12)
20854+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
20855+dnl This file is free software, distributed under the terms of the GNU
20856+dnl General Public License. As a special exception to the GNU General
20857+dnl Public License, this file may be distributed as part of a program
20858+dnl that contains a configuration script generated by Autoconf, under
20859+dnl the same distribution terms as the rest of that program.
20860+dnl
20861+dnl This file can can be used in projects which are not available under
20862+dnl the GNU General Public License or the GNU Library General Public
20863+dnl License but which still want to provide support for the GNU gettext
20864+dnl functionality.
20865+dnl Please note that the actual code of the GNU gettext library is covered
20866+dnl by the GNU Library General Public License, and the rest of the GNU
20867+dnl gettext package package is covered by the GNU General Public License.
20868+dnl They are *not* in the public domain.
20869+
20870+dnl Authors:
20871+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
20872+
20873+# Search path for a program which passes the given test.
20874+
20875+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
20876+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
20877+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
20878+[
20879+# Prepare PATH_SEPARATOR.
20880+# The user is always right.
20881+if test "${PATH_SEPARATOR+set}" != set; then
20882+ echo "#! /bin/sh" >conf$$.sh
20883+ echo "exit 0" >>conf$$.sh
20884+ chmod +x conf$$.sh
20885+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20886+ PATH_SEPARATOR=';'
20887+ else
20888+ PATH_SEPARATOR=:
20889+ fi
20890+ rm -f conf$$.sh
20891+fi
20892+
20893+# Find out how to test for executable files. Don't use a zero-byte file,
20894+# as systems may use methods other than mode bits to determine executability.
20895+cat >conf$$.file <<_ASEOF
20896+#! /bin/sh
20897+exit 0
20898+_ASEOF
20899+chmod +x conf$$.file
20900+if test -x conf$$.file >/dev/null 2>&1; then
20901+ ac_executable_p="test -x"
20902+else
20903+ ac_executable_p="test -f"
20904+fi
20905+rm -f conf$$.file
20906+
20907+# Extract the first word of "$2", so it can be a program name with args.
20908+set dummy $2; ac_word=[$]2
20909+AC_MSG_CHECKING([for $ac_word])
20910+AC_CACHE_VAL(ac_cv_path_$1,
20911+[case "[$]$1" in
20912+ [[\\/]]* | ?:[[\\/]]*)
20913+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
20914+ ;;
20915+ *)
20916+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
20917+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
20918+ IFS="$ac_save_IFS"
20919+ test -z "$ac_dir" && ac_dir=.
20920+ for ac_exec_ext in '' $ac_executable_extensions; do
20921+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
20922+ if [$3]; then
20923+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
20924+ break 2
20925+ fi
20926+ fi
20927+ done
20928+ done
20929+ IFS="$ac_save_IFS"
20930+dnl If no 4th arg is given, leave the cache variable unset,
20931+dnl so AC_PATH_PROGS will keep looking.
20932+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
20933+])dnl
20934+ ;;
20935+esac])dnl
20936+$1="$ac_cv_path_$1"
20937+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
20938+ AC_MSG_RESULT([$]$1)
20939+else
20940+ AC_MSG_RESULT(no)
20941+fi
20942+AC_SUBST($1)dnl
20943+])
20944--- lrzsz-0.12.20.safe/m4/signed.m4 1969-12-31 19:00:00.000000000 -0500
20945+++ lrzsz-0.12.20/m4/signed.m4 2004-09-12 14:40:34.996650656 -0400
20946@@ -0,0 +1,19 @@
20947+# signed.m4 serial 1 (gettext-0.10.40)
20948+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
20949+dnl This file is free software, distributed under the terms of the GNU
20950+dnl General Public License. As a special exception to the GNU General
20951+dnl Public License, this file may be distributed as part of a program
20952+dnl that contains a configuration script generated by Autoconf, under
20953+dnl the same distribution terms as the rest of that program.
20954+
20955+dnl From Bruno Haible.
20956+
20957+AC_DEFUN([bh_C_SIGNED],
20958+[
20959+ AC_CACHE_CHECK([for signed], bh_cv_c_signed,
20960+ [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
20961+ if test $bh_cv_c_signed = no; then
20962+ AC_DEFINE(signed, ,
20963+ [Define to empty if the C compiler doesn't support this keyword.])
20964+ fi
20965+])
20966--- lrzsz-0.12.20.safe/m4/size_max.m4 1969-12-31 19:00:00.000000000 -0500
20967+++ lrzsz-0.12.20/m4/size_max.m4 2004-09-12 14:40:35.003649592 -0400
20968@@ -0,0 +1,61 @@
20969+# size_max.m4 serial 2
20970+dnl Copyright (C) 2003 Free Software Foundation, Inc.
20971+dnl This file is free software, distributed under the terms of the GNU
20972+dnl General Public License. As a special exception to the GNU General
20973+dnl Public License, this file may be distributed as part of a program
20974+dnl that contains a configuration script generated by Autoconf, under
20975+dnl the same distribution terms as the rest of that program.
20976+
20977+dnl From Bruno Haible.
20978+
20979+AC_DEFUN([gl_SIZE_MAX],
20980+[
20981+ AC_CHECK_HEADERS(stdint.h)
20982+ dnl First test whether the system already has SIZE_MAX.
20983+ AC_MSG_CHECKING([for SIZE_MAX])
20984+ result=
20985+ AC_EGREP_CPP([Found it], [
20986+#include <limits.h>
20987+#if HAVE_STDINT_H
20988+#include <stdint.h>
20989+#endif
20990+#ifdef SIZE_MAX
20991+Found it
20992+#endif
20993+], result=yes)
20994+ if test -z "$result"; then
20995+ dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
20996+ dnl than the type 'unsigned long'.
20997+ dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
20998+ dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
20999+ _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
21000+ [#include <stddef.h>], result=?)
21001+ _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
21002+ [#include <stddef.h>], result=?)
21003+ _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
21004+ [#include <stddef.h>], result=?)
21005+ if test "$fits_in_uint" = 1; then
21006+ dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
21007+ dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
21008+ AC_TRY_COMPILE([#include <stddef.h>
21009+ extern size_t foo;
21010+ extern unsigned long foo;
21011+ ], [], fits_in_uint=0)
21012+ fi
21013+ if test -z "$result"; then
21014+ if test "$fits_in_uint" = 1; then
21015+ result="$res_hi$res_lo"U
21016+ else
21017+ result="$res_hi$res_lo"UL
21018+ fi
21019+ else
21020+ dnl Shouldn't happen, but who knows...
21021+ result='~(size_t)0'
21022+ fi
21023+ fi
21024+ AC_MSG_RESULT([$result])
21025+ if test "$result" != yes; then
21026+ AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
21027+ [Define as the maximum value of type 'size_t', if the system doesn't define it.])
21028+ fi
21029+])
21030--- lrzsz-0.12.20.safe/m4/stdint_h.m4 1969-12-31 19:00:00.000000000 -0500
21031+++ lrzsz-0.12.20/m4/stdint_h.m4 2004-09-12 14:40:35.009648680 -0400
21032@@ -0,0 +1,28 @@
21033+# stdint_h.m4 serial 3 (gettext-0.12)
21034+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
21035+dnl This file is free software, distributed under the terms of the GNU
21036+dnl General Public License. As a special exception to the GNU General
21037+dnl Public License, this file may be distributed as part of a program
21038+dnl that contains a configuration script generated by Autoconf, under
21039+dnl the same distribution terms as the rest of that program.
21040+
21041+dnl From Paul Eggert.
21042+
21043+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
21044+# doesn't clash with <sys/types.h>, and declares uintmax_t.
21045+
21046+AC_DEFUN([jm_AC_HEADER_STDINT_H],
21047+[
21048+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
21049+ [AC_TRY_COMPILE(
21050+ [#include <sys/types.h>
21051+#include <stdint.h>],
21052+ [uintmax_t i = (uintmax_t) -1;],
21053+ jm_ac_cv_header_stdint_h=yes,
21054+ jm_ac_cv_header_stdint_h=no)])
21055+ if test $jm_ac_cv_header_stdint_h = yes; then
21056+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
21057+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
21058+ and declares uintmax_t. ])
21059+ fi
21060+])
21061--- lrzsz-0.12.20.safe/m4/uintmax_t.m4 1969-12-31 19:00:00.000000000 -0500
21062+++ lrzsz-0.12.20/m4/uintmax_t.m4 2004-09-12 14:40:35.021646856 -0400
21063@@ -0,0 +1,32 @@
21064+# uintmax_t.m4 serial 7 (gettext-0.12)
21065+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
21066+dnl This file is free software, distributed under the terms of the GNU
21067+dnl General Public License. As a special exception to the GNU General
21068+dnl Public License, this file may be distributed as part of a program
21069+dnl that contains a configuration script generated by Autoconf, under
21070+dnl the same distribution terms as the rest of that program.
21071+
21072+dnl From Paul Eggert.
21073+
21074+AC_PREREQ(2.13)
21075+
21076+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
21077+# if it is not already defined in <stdint.h> or <inttypes.h>.
21078+
21079+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
21080+[
21081+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
21082+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
21083+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
21084+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
21085+ test $ac_cv_type_unsigned_long_long = yes \
21086+ && ac_type='unsigned long long' \
21087+ || ac_type='unsigned long'
21088+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
21089+ [Define to unsigned long or unsigned long long
21090+ if <stdint.h> and <inttypes.h> don't define.])
21091+ else
21092+ AC_DEFINE(HAVE_UINTMAX_T, 1,
21093+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
21094+ fi
21095+])
21096--- lrzsz-0.12.20.safe/m4/ulonglong.m4 1969-12-31 19:00:00.000000000 -0500
21097+++ lrzsz-0.12.20/m4/ulonglong.m4 2004-09-12 14:40:35.028645792 -0400
21098@@ -0,0 +1,25 @@
21099+# ulonglong.m4 serial 3
21100+dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
21101+dnl This file is free software, distributed under the terms of the GNU
21102+dnl General Public License. As a special exception to the GNU General
21103+dnl Public License, this file may be distributed as part of a program
21104+dnl that contains a configuration script generated by Autoconf, under
21105+dnl the same distribution terms as the rest of that program.
21106+
21107+dnl From Paul Eggert.
21108+
21109+# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
21110+
21111+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
21112+[
21113+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
21114+ [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
21115+ [unsigned long long ullmax = (unsigned long long) -1;
21116+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
21117+ ac_cv_type_unsigned_long_long=yes,
21118+ ac_cv_type_unsigned_long_long=no)])
21119+ if test $ac_cv_type_unsigned_long_long = yes; then
21120+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
21121+ [Define if you have the 'unsigned long long' type.])
21122+ fi
21123+])
21124--- lrzsz-0.12.20.safe/m4/wchar_t.m4 1969-12-31 19:00:00.000000000 -0500
21125+++ lrzsz-0.12.20/m4/wchar_t.m4 2004-09-12 14:40:35.034644880 -0400
21126@@ -0,0 +1,22 @@
21127+# wchar_t.m4 serial 1 (gettext-0.12)
21128+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
21129+dnl This file is free software, distributed under the terms of the GNU
21130+dnl General Public License. As a special exception to the GNU General
21131+dnl Public License, this file may be distributed as part of a program
21132+dnl that contains a configuration script generated by Autoconf, under
21133+dnl the same distribution terms as the rest of that program.
21134+
21135+dnl From Bruno Haible.
21136+dnl Test whether <stddef.h> has the 'wchar_t' type.
21137+dnl Prerequisite: AC_PROG_CC
21138+
21139+AC_DEFUN([gt_TYPE_WCHAR_T],
21140+[
21141+ AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
21142+ [AC_TRY_COMPILE([#include <stddef.h>
21143+ wchar_t foo = (wchar_t)'\0';], ,
21144+ gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
21145+ if test $gt_cv_c_wchar_t = yes; then
21146+ AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
21147+ fi
21148+])
21149--- lrzsz-0.12.20.safe/m4/wint_t.m4 1969-12-31 19:00:00.000000000 -0500
21150+++ lrzsz-0.12.20/m4/wint_t.m4 2004-09-12 14:40:35.040643968 -0400
21151@@ -0,0 +1,22 @@
21152+# wint_t.m4 serial 1 (gettext-0.12)
21153+dnl Copyright (C) 2003 Free Software Foundation, Inc.
21154+dnl This file is free software, distributed under the terms of the GNU
21155+dnl General Public License. As a special exception to the GNU General
21156+dnl Public License, this file may be distributed as part of a program
21157+dnl that contains a configuration script generated by Autoconf, under
21158+dnl the same distribution terms as the rest of that program.
21159+
21160+dnl From Bruno Haible.
21161+dnl Test whether <wchar.h> has the 'wint_t' type.
21162+dnl Prerequisite: AC_PROG_CC
21163+
21164+AC_DEFUN([gt_TYPE_WINT_T],
21165+[
21166+ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
21167+ [AC_TRY_COMPILE([#include <wchar.h>
21168+ wint_t foo = (wchar_t)'\0';], ,
21169+ gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
21170+ if test $gt_cv_c_wint_t = yes; then
21171+ AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
21172+ fi
21173+])
21174--- lrzsz-0.12.20.safe/m4/xsize.m4 1969-12-31 19:00:00.000000000 -0500
21175+++ lrzsz-0.12.20/m4/xsize.m4 2004-09-12 14:40:35.047642904 -0400
21176@@ -0,0 +1,14 @@
21177+# xsize.m4 serial 2
21178+dnl Copyright (C) 2003 Free Software Foundation, Inc.
21179+dnl This file is free software, distributed under the terms of the GNU
21180+dnl General Public License. As a special exception to the GNU General
21181+dnl Public License, this file may be distributed as part of a program
21182+dnl that contains a configuration script generated by Autoconf, under
21183+dnl the same distribution terms as the rest of that program.
21184+
21185+AC_DEFUN([gl_XSIZE],
21186+[
21187+ dnl Prerequisites of lib/xsize.h.
21188+ AC_REQUIRE([gl_SIZE_MAX])
21189+ AC_CHECK_HEADERS(stdint.h)
21190+])
21191--- lrzsz-0.12.20.safe/Makefile.am 1998-12-30 06:19:40.000000000 -0500
21192+++ lrzsz-0.12.20/Makefile.am 2004-09-12 14:40:35.121631656 -0400
21193@@ -1,5 +1,5 @@
21194 SUBDIRS = lib intl src po man testsuite
21195-EXTRA_DIST = check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
21196+EXTRA_DIST = config.rpath check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
21197 README.gettext rpmrc buildrpm systype.in fastcheck.sh README.tests \
21198 beos-runpiped.c fastcheck.beos
21199 noinst_SCRIPTS=systype
21200@@ -83,3 +83,5 @@
21201 rpm: $(PR).tar.gz Specfile
21202 $(srcdir)/buildrpm $(srcdir)
21203
21204+
21205+ACLOCAL_AMFLAGS = -I m4
21206--- lrzsz-0.12.20.safe/Makefile.in 1998-12-30 11:31:40.000000000 -0500
21207+++ lrzsz-0.12.20/Makefile.in 2004-09-12 14:40:35.109633480 -0400
21208@@ -125,7 +125,7 @@
21209 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
21210
21211 $(ACLOCAL_M4): configure.in acinclude.m4
21212- cd $(srcdir) && $(ACLOCAL)
21213+ cd $(srcdir) && $(ACLOCAL) -I m4
21214
21215 config.status: $(srcdir)/configure
21216 $(SHELL) ./config.status --recheck
21217--- lrzsz-0.12.20.safe/mkinstalldirs 1998-04-26 09:20:52.000000000 -0400
21218+++ lrzsz-0.12.20/mkinstalldirs 2004-09-12 14:40:34.337750824 -0400
21219@@ -1,34 +1,150 @@
21220 #! /bin/sh
21221 # mkinstalldirs --- make directory hierarchy
21222-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
21223+
21224+scriptversion=2004-02-15.20
21225+
21226+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
21227 # Created: 1993-05-16
21228-# Last modified: 1995-03-05
21229-# Public domain
21230+# Public domain.
21231+#
21232+# This file is maintained in Automake, please report
21233+# bugs to <bug-automake@gnu.org> or send patches to
21234+# <automake-patches@gnu.org>.
21235
21236 errstatus=0
21237+dirmode=""
21238
21239-for file in ${1+"$@"} ; do
21240- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
21241- shift
21242+usage="\
21243+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
21244
21245- pathcomp=
21246- for d in ${1+"$@"} ; do
21247- pathcomp="$pathcomp$d"
21248- case "$pathcomp" in
21249- -* ) pathcomp=./$pathcomp ;;
21250- esac
21251+Create each directory DIR (with mode MODE, if specified), including all
21252+leading file name components.
21253
21254- if test ! -d "$pathcomp"; then
21255- echo "mkdir $pathcomp" 1>&2
21256- mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
21257- fi
21258+Report bugs to <bug-automake@gnu.org>."
21259
21260- if test ! -d "$pathcomp"; then
21261+# process command line arguments
21262+while test $# -gt 0 ; do
21263+ case $1 in
21264+ -h | --help | --h*) # -h for help
21265+ echo "$usage"
21266+ exit 0
21267+ ;;
21268+ -m) # -m PERM arg
21269+ shift
21270+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
21271+ dirmode=$1
21272+ shift
21273+ ;;
21274+ --version)
21275+ echo "$0 $scriptversion"
21276+ exit 0
21277+ ;;
21278+ --) # stop option processing
21279+ shift
21280+ break
21281+ ;;
21282+ -*) # unknown option
21283+ echo "$usage" 1>&2
21284+ exit 1
21285+ ;;
21286+ *) # first non-opt arg
21287+ break
21288+ ;;
21289+ esac
21290+done
21291+
21292+for file
21293+do
21294+ if test -d "$file"; then
21295+ shift
21296+ else
21297+ break
21298+ fi
21299+done
21300+
21301+case $# in
21302+ 0) exit 0 ;;
21303+esac
21304+
21305+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
21306+# mkdir -p a/c at the same time, both will detect that a is missing,
21307+# one will create a, then the other will try to create a and die with
21308+# a "File exists" error. This is a problem when calling mkinstalldirs
21309+# from a parallel make. We use --version in the probe to restrict
21310+# ourselves to GNU mkdir, which is thread-safe.
21311+case $dirmode in
21312+ '')
21313+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
21314+ echo "mkdir -p -- $*"
21315+ exec mkdir -p -- "$@"
21316+ else
21317+ # On NextStep and OpenStep, the `mkdir' command does not
21318+ # recognize any option. It will interpret all options as
21319+ # directories to create, and then abort because `.' already
21320+ # exists.
21321+ test -d ./-p && rmdir ./-p
21322+ test -d ./--version && rmdir ./--version
21323+ fi
21324+ ;;
21325+ *)
21326+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
21327+ test ! -d ./--version; then
21328+ echo "mkdir -m $dirmode -p -- $*"
21329+ exec mkdir -m "$dirmode" -p -- "$@"
21330+ else
21331+ # Clean up after NextStep and OpenStep mkdir.
21332+ for d in ./-m ./-p ./--version "./$dirmode";
21333+ do
21334+ test -d $d && rmdir $d
21335+ done
21336+ fi
21337+ ;;
21338+esac
21339+
21340+for file
21341+do
21342+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
21343+ shift
21344+
21345+ pathcomp=
21346+ for d
21347+ do
21348+ pathcomp="$pathcomp$d"
21349+ case $pathcomp in
21350+ -*) pathcomp=./$pathcomp ;;
21351+ esac
21352+
21353+ if test ! -d "$pathcomp"; then
21354+ echo "mkdir $pathcomp"
21355+
21356+ mkdir "$pathcomp" || lasterr=$?
21357+
21358+ if test ! -d "$pathcomp"; then
21359 errstatus=$lasterr
21360- fi
21361+ else
21362+ if test ! -z "$dirmode"; then
21363+ echo "chmod $dirmode $pathcomp"
21364+ lasterr=""
21365+ chmod "$dirmode" "$pathcomp" || lasterr=$?
21366
21367- pathcomp="$pathcomp/"
21368- done
21369+ if test ! -z "$lasterr"; then
21370+ errstatus=$lasterr
21371+ fi
21372+ fi
21373+ fi
21374+ fi
21375+
21376+ pathcomp="$pathcomp/"
21377+ done
21378 done
21379
21380 exit $errstatus
21381+
21382+# Local Variables:
21383+# mode: shell-script
21384+# sh-indentation: 2
21385+# eval: (add-hook 'write-file-hooks 'time-stamp)
21386+# time-stamp-start: "scriptversion="
21387+# time-stamp-format: "%:y-%02m-%02d.%02H"
21388+# time-stamp-end: "$"
21389+# End:
21390--- lrzsz-0.12.20.safe/po/boldquot.sed 1969-12-31 19:00:00.000000000 -0500
21391+++ lrzsz-0.12.20/po/boldquot.sed 2004-09-12 14:40:34.723692152 -0400
21392@@ -0,0 +1,10 @@
21393+s/"\([^"]*\)"/“\1â€/g
21394+s/`\([^`']*\)'/‘\1’/g
21395+s/ '\([^`']*\)' / ‘\1’ /g
21396+s/ '\([^`']*\)'$/ ‘\1’/g
21397+s/^'\([^`']*\)' /‘\1’ /g
21398+s/“â€/""/g
21399+s/“/“/g
21400+s/â€/â€/g
21401+s/‘/‘/g
21402+s/’/’/g
21403--- lrzsz-0.12.20.safe/po/cat-id-tbl.c 1998-12-29 04:24:24.000000000 -0500
21404+++ lrzsz-0.12.20/po/cat-id-tbl.c 1969-12-31 19:00:00.000000000 -0500
21405@@ -1,234 +0,0 @@
21406-/* Automatically generated by po2tbl.sed from lrzsz.pot. */
21407-
21408-#if HAVE_CONFIG_H
21409-# include <config.h>
21410-#endif
21411-
21412-#include "libgettext.h"
21413-
21414-const struct _msg_ent _msg_tbl[] = {
21415- {"", 1},
21416- {"io_mode(,2) in rbsb.c not implemented\n", 2},
21417- {"caught signal %d; exiting", 3},
21418- {"command tries", 4},
21419- {"packetlength", 5},
21420- {"packetlength out of range 24..%ld", 6},
21421- {"framelength", 7},
21422- {"framelength out of range 32..%ld", 8},
21423- {"min_bps", 9},
21424- {"min_bps must be >= 0", 10},
21425- {"min_bps_time", 11},
21426- {"min_bps_time must be > 1", 12},
21427- {"hour to large (0..23)", 13},
21428- {"unparsable stop time\n", 14},
21429- {"minute to large (0..59)", 15},
21430- {"stop time to small", 16},
21431- {"stop-at", 17},
21432- {"timeout", 18},
21433- {"timeout out of range 10..1000", 19},
21434- {"security violation: can't do that under restricted shell\n", 20},
21435- {"window size", 21},
21436- {"cannot turnoff syslog", 22},
21437- {"startup delay", 23},
21438- {"out of memory", 24},
21439- {"this program was never intended to be used setuid\n", 25},
21440- {"need at least one file to send", 26},
21441- {"Can't send command in restricted mode\n", 27},
21442- {"hostname too long\n", 28},
21443- {"illegal server address\n", 29},
21444- {"can read only one file from stdin", 30},
21445- {"Transfer incomplete\n", 31},
21446- {"Transfer complete\n", 32},
21447- {"send_pseudo %s: cannot open tmpfile %s: %s", 33},
21448- {"send_pseudo %s: cannot lstat tmpfile %s: %s", 34},
21449- {"send_pseudo %s: avoiding symlink trap", 35},
21450- {"send_pseudo %s: cannot write to tmpfile %s: %s", 36},
21451- {"send_pseudo %s: failed", 37},
21452- {"send_pseudo %s: ok", 38},
21453- {"tcp protocol init failed\n", 39},
21454- {"Answering TIMESYNC at %s", 40},
21455- {"timezone", 41},
21456- {"timezone unknown", 42},
21457- {"Can't open any requested files.", 43},
21458- {"security violation: not allowed to upload from %s", 44},
21459- {"cannot open %s", 45},
21460- {"is not a file: %s", 46},
21461- {"%s/%s: error occured", 47},
21462- {"skipped: %s", 48},
21463- {"%s/%s: skipped", 49},
21464- {"Bytes Sent:%7ld BPS:%-8ld \n", 50},
21465- {"Sending %s, %ld blocks: ", 51},
21466- {"Give your local XMODEM receive command now.", 52},
21467- {"Sending: %s\n", 53},
21468- {"Timeout on pathname", 54},
21469- {"Receiver Cancelled", 55},
21470- {"No ACK on EOT", 56},
21471- {"Xmodem sectors/kbytes sent: %3d/%2dk", 57},
21472- {"Ymodem sectors/kbytes sent: %3d/%2dk", 58},
21473- {"Cancelled", 59},
21474- {"Timeout on sector ACK", 60},
21475- {"NAK on sector", 61},
21476- {"Got burst for sector ACK", 62},
21477- {"Got %02x for sector ACK", 63},
21478- {"Retry Count Exceeded", 64},
21479- {"Try `%s --help' for more information.\n", 65},
21480- {"%s version %s\n", 66},
21481- {"Usage: %s [options] file ...\n", 67},
21482- {" or: %s [options] -{c|i} COMMAND\n", 68},
21483- {"Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n", 69},
21484- {"\
21485- (X) = option applies to XMODEM only\n\
21486- (Y) = option applies to YMODEM only\n\
21487- (Z) = option applies to ZMODEM only\n", 70},
21488- {"\
21489- -+, --append append to existing destination file (Z)\n\
21490- -2, --twostop use 2 stop bits\n\
21491- -4, --try-4k go up to 4K blocksize\n\
21492- --start-4k start with 4K blocksize (doesn't try 8)\n\
21493- -8, --try-8k go up to 8K blocksize\n\
21494- --start-8k start with 8K blocksize\n\
21495- -a, --ascii ASCII transfer (change CR/LF to LF)\n\
21496- -b, --binary binary transfer\n\
21497- -B, --bufsize N buffer N bytes (N==auto: buffer whole file)\n\
21498- -c, --command COMMAND execute remote command COMMAND (Z)\n\
21499- -C, --command-tries N try N times to execute a command (Z)\n\
21500- -d, --dot-to-slash change '.' to '/' in pathnames (Y/Z)\n\
21501- --delay-startup N sleep N seconds before doing anything\n\
21502- -e, --escape escape all control characters (Z)\n\
21503- -E, --rename force receiver to rename files it already has\n\
21504- -f, --full-path send full pathname (Y/Z)\n\
21505- -i, --immediate-command CMD send remote CMD, return immediately (Z)\n\
21506- -h, --help print this usage message\n\
21507- -k, --1k send 1024 byte packets (X)\n\
21508- -L, --packetlen N limit subpacket length to N bytes (Z)\n\
21509- -l, --framelen N limit frame length to N bytes (l>=L) (Z)\n\
21510- -m, --min-bps N stop transmission if BPS below N\n\
21511- -M, --min-bps-time N for at least N seconds (default: 120)\n", 71},
21512- {"\
21513- -n, --newer send file if source newer (Z)\n\
21514- -N, --newer-or-longer send file if source newer or longer (Z)\n\
21515- -o, --16-bit-crc use 16 bit CRC instead of 32 bit CRC (Z)\n\
21516- -O, --disable-timeouts disable timeout code, wait forever\n\
21517- -p, --protect protect existing destination file (Z)\n\
21518- -r, --resume resume interrupted file transfer (Z)\n\
21519- -R, --restricted restricted, more secure mode\n\
21520- -q, --quiet quiet (no progress reports)\n\
21521- -s, --stop-at {HH:MM|+N} stop transmission at HH:MM or in N seconds\n\
21522- --tcp build a TCP connection to transmit files\n\
21523- --tcp-server open socket, wait for connection\n\
21524- -u, --unlink unlink file after transmission\n\
21525- -U, --unrestrict turn off restricted mode (if allowed to)\n\
21526- -v, --verbose be verbose, provide debugging information\n\
21527- -w, --windowsize N Window is N bytes (Z)\n\
21528- -X, --xmodem use XMODEM protocol\n\
21529- -y, --overwrite overwrite existing files\n\
21530- -Y, --overwrite-or-skip overwrite existing files, else skip\n\
21531- --ymodem use YMODEM protocol\n\
21532- -Z, --zmodem use ZMODEM protocol\n\
21533-\n\
21534-short options use the same arguments as the long ones\n", 72},
21535- {"got ZRQINIT", 73},
21536- {"got ZCAN", 74},
21537- {"blklen now %d\n", 75},
21538- {"zsendfdata: bps rate %ld below min %ld", 76},
21539- {"zsendfdata: reached stop time", 77},
21540- {"Bytes Sent:%7ld/%7ld BPS:%-8ld ETA %02d:%02d ", 78},
21541- {"calc_blklen: reduced to %d due to error\n", 79},
21542- {"calc_blklen: returned old value %d due to low bpe diff\n", 80},
21543- {"calc_blklen: old %ld, new %ld, d %ld\n", 81},
21544- {"calc_blklen: calc total_bytes=%ld, bpe=%ld, ec=%ld\n", 82},
21545- {"calc_blklen: blklen %d, ok %ld, failed %ld -> %lu\n", 83},
21546- {"calc_blklen: returned %d as best\n", 84},
21547- {"\
21548-\n\
21549-countem: Total %d %ld\n", 85},
21550- {"Bad escape sequence %x", 86},
21551- {"Sender Canceled", 87},
21552- {"TIMEOUT", 88},
21553- {"Bad data subpacket", 89},
21554- {"Data subpacket too long", 90},
21555- {"Garbage count exceeded", 91},
21556- {"Got %s", 92},
21557- {"Retry %d: ", 93},
21558- {"don't have settimeofday, will not set time\n", 94},
21559- {"not running as root (this is good!), can not set time\n", 95},
21560- {"bytes_per_error", 96},
21561- {"bytes-per-error should be >100", 97},
21562- {"O_SYNC not supported by the kernel", 98},
21563- {"garbage on commandline", 99},
21564- {"Usage: %s [options] [filename.if.xmodem]\n", 100},
21565- {"Receive files with ZMODEM/YMODEM/XMODEM protocol\n", 101},
21566- {"\
21567- -+, --append append to existing files\n\
21568- -a, --ascii ASCII transfer (change CR/LF to LF)\n\
21569- -b, --binary binary transfer\n\
21570- -B, --bufsize N buffer N bytes (N==auto: buffer whole file)\n\
21571- -c, --with-crc Use 16 bit CRC (X)\n\
21572- -C, --allow-remote-commands allow execution of remote commands (Z)\n\
21573- -D, --null write all received data to /dev/null\n\
21574- --delay-startup N sleep N seconds before doing anything\n\
21575- -e, --escape Escape control characters (Z)\n\
21576- -E, --rename rename any files already existing\n\
21577- --errors N generate CRC error every N bytes (debugging)\n\
21578- -h, --help Help, print this usage message\n\
21579- -m, --min-bps N stop transmission if BPS below N\n\
21580- -M, --min-bps-time N for at least N seconds (default: 120)\n\
21581- -O, --disable-timeouts disable timeout code, wait forever for data\n\
21582- --o-sync open output file(s) in synchronous write mode\n\
21583- -p, --protect protect existing files\n\
21584- -q, --quiet quiet, no progress reports\n\
21585- -r, --resume try to resume interrupted file transfer (Z)\n\
21586- -R, --restricted restricted, more secure mode\n\
21587- -s, --stop-at {HH:MM|+N} stop transmission at HH:MM or in N seconds\n\
21588- -S, --timesync request remote time (twice: set local time)\n\
21589- --syslog[=off] turn syslog on or off, if possible\n\
21590- -t, --timeout N set timeout to N tenths of a second\n\
21591- -u, --keep-uppercase keep upper case filenames\n\
21592- -U, --unrestrict disable restricted mode (if allowed to)\n\
21593- -v, --verbose be verbose, provide debugging information\n\
21594- -w, --windowsize N Window is N bytes (Z)\n\
21595- -X --xmodem use XMODEM protocol\n\
21596- -y, --overwrite Yes, clobber existing file if any\n\
21597- --ymodem use YMODEM protocol\n\
21598- -Z, --zmodem use ZMODEM protocol\n\
21599-\n\
21600-short options use the same arguments as the long ones\n", 102},
21601- {"%s waiting to receive.", 103},
21602- {"\rBytes received: %7ld/%7ld BPS:%-6ld \r\n", 104},
21603- {"%s: ready to receive %s", 105},
21604- {"\rBytes received: %7ld BPS:%-6ld \r\n", 106},
21605- {"\
21606-\r\n\
21607-%s: %s removed.\r\n", 107},
21608- {"Pathname fetch returned EOT", 108},
21609- {"Received dup Sector", 109},
21610- {"Sync Error", 110},
21611- {"CRC", 111},
21612- {"Checksum", 112},
21613- {"Sector number garbled", 113},
21614- {"Sender Cancelled", 114},
21615- {"Got 0%o sector header", 115},
21616- {"file name ends with a /, skipped: %s\n", 116},
21617- {"zmanag=%d, Lzmanag=%d\n", 117},
21618- {"zconv=%d\n", 118},
21619- {"file exists, skipped: %s\n", 119},
21620- {"TIMESYNC: here %ld, remote %ld, diff %ld seconds\n", 120},
21621- {"TIMESYNC: cannot set time: %s\n", 121},
21622- {"cannot tmpfile() for tcp protocol synchronization", 122},
21623- {"Topipe", 123},
21624- {"Receiving: %s\n", 124},
21625- {"Blocks received: %d", 125},
21626- {"%s: %s exists\n", 126},
21627- {"%s:\tSecurity Violation", 127},
21628- {"remote command execution requested", 128},
21629- {"not executed", 129},
21630- {"got ZRINIT", 130},
21631- {"Skipped", 131},
21632- {"rzfile: bps rate %ld below min %ld", 132},
21633- {"rzfile: reached stop time", 133},
21634- {"\rBytes received: %7ld/%7ld BPS:%-6ld ETA %02d:%02d ", 134},
21635- {"fgets for tcp protocol synchronization failed: ", 135},
21636- {"file close error", 136},
21637-};
21638-
21639-int _msg_tbl_length = 136;
21640--- lrzsz-0.12.20.safe/po/ChangeLog 1998-04-26 09:20:52.000000000 -0400
21641+++ lrzsz-0.12.20/po/ChangeLog 2004-09-12 14:40:34.793681512 -0400
21642@@ -1,3 +1,15 @@
21643+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
21644+
21645+ * boldquot.sed: New file, from gettext-0.14.1.
21646+ * en@boldquot.header: New file, from gettext-0.14.1.
21647+ * en@quot.header: New file, from gettext-0.14.1.
21648+ * insert-header.sin: New file, from gettext-0.14.1.
21649+ * quot.sed: New file, from gettext-0.14.1.
21650+ * remove-potcdate.sin: New file, from gettext-0.14.1.
21651+ * Rules-quot: New file, from gettext-0.14.1.
21652+ * cat-id-tbl.c: Remove file.
21653+ * stamp-cat-id: Remove file.
21654+
21655 /* Automatically generated by po2tbl.sed from lrzsz.pot. */
21656
21657 #if HAVE_CONFIG_H
21658--- lrzsz-0.12.20.safe/po/en@boldquot.header 1969-12-31 19:00:00.000000000 -0500
21659+++ lrzsz-0.12.20/po/en@boldquot.header 2004-09-12 14:40:34.731690936 -0400
21660@@ -0,0 +1,25 @@
21661+# All this catalog "translates" are quotation characters.
21662+# The msgids must be ASCII and therefore cannot contain real quotation
21663+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
21664+# and double quote (0x22). These substitutes look strange; see
21665+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
21666+#
21667+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
21668+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
21669+# It also translates pairs of apostrophe (0x27) to
21670+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
21671+# and pairs of quotation mark (0x22) to
21672+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
21673+#
21674+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
21675+# When output to an ISO-8859-1 terminal, the single quotation marks are
21676+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
21677+# grave/acute accent (by libiconv), and the double quotation marks are
21678+# transliterated to 0x22.
21679+# When output to an ASCII terminal, the single quotation marks are
21680+# transliterated to apostrophes, and the double quotation marks are
21681+# transliterated to 0x22.
21682+#
21683+# This catalog furthermore displays the text between the quotation marks in
21684+# bold face, assuming the VT100/XTerm escape sequences.
21685+#
21686--- lrzsz-0.12.20.safe/po/en@quot.header 1969-12-31 19:00:00.000000000 -0500
21687+++ lrzsz-0.12.20/po/en@quot.header 2004-09-12 14:40:34.737690024 -0400
21688@@ -0,0 +1,22 @@
21689+# All this catalog "translates" are quotation characters.
21690+# The msgids must be ASCII and therefore cannot contain real quotation
21691+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
21692+# and double quote (0x22). These substitutes look strange; see
21693+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
21694+#
21695+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
21696+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
21697+# It also translates pairs of apostrophe (0x27) to
21698+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
21699+# and pairs of quotation mark (0x22) to
21700+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
21701+#
21702+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
21703+# When output to an ISO-8859-1 terminal, the single quotation marks are
21704+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
21705+# grave/acute accent (by libiconv), and the double quotation marks are
21706+# transliterated to 0x22.
21707+# When output to an ASCII terminal, the single quotation marks are
21708+# transliterated to apostrophes, and the double quotation marks are
21709+# transliterated to 0x22.
21710+#
21711--- lrzsz-0.12.20.safe/po/insert-header.sin 1969-12-31 19:00:00.000000000 -0500
21712+++ lrzsz-0.12.20/po/insert-header.sin 2004-09-12 14:40:34.743689112 -0400
21713@@ -0,0 +1,23 @@
21714+# Sed script that inserts the file called HEADER before the header entry.
21715+#
21716+# At each occurrence of a line starting with "msgid ", we execute the following
21717+# commands. At the first occurrence, insert the file. At the following
21718+# occurrences, do nothing. The distinction between the first and the following
21719+# occurrences is achieved by looking at the hold space.
21720+/^msgid /{
21721+x
21722+# Test if the hold space is empty.
21723+s/m/m/
21724+ta
21725+# Yes it was empty. First occurrence. Read the file.
21726+r HEADER
21727+# Output the file's contents by reading the next line. But don't lose the
21728+# current line while doing this.
21729+g
21730+N
21731+bb
21732+:a
21733+# The hold space was nonempty. Following occurrences. Do nothing.
21734+x
21735+:b
21736+}
21737--- lrzsz-0.12.20.safe/po/Makevars 1969-12-31 19:00:00.000000000 -0500
21738+++ lrzsz-0.12.20/po/Makevars 2004-09-12 14:40:34.748688352 -0400
21739@@ -0,0 +1,41 @@
21740+# Makefile variables for PO directory in any package using GNU gettext.
21741+
21742+# Usually the message domain is the same as the package name.
21743+DOMAIN = $(PACKAGE)
21744+
21745+# These two variables depend on the location of this directory.
21746+subdir = po
21747+top_builddir = ..
21748+
21749+# These options get passed to xgettext.
21750+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
21751+
21752+# This is the copyright holder that gets inserted into the header of the
21753+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
21754+# package. (Note that the msgstr strings, extracted from the package's
21755+# sources, belong to the copyright holder of the package.) Translators are
21756+# expected to transfer the copyright for their translations to this person
21757+# or entity, or to disclaim their copyright. The empty string stands for
21758+# the public domain; in this case the translators are expected to disclaim
21759+# their copyright.
21760+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
21761+
21762+# This is the email address or URL to which the translators shall report
21763+# bugs in the untranslated strings:
21764+# - Strings which are not entire sentences, see the maintainer guidelines
21765+# in the GNU gettext documentation, section 'Preparing Strings'.
21766+# - Strings which use unclear terms or require additional context to be
21767+# understood.
21768+# - Strings which make invalid assumptions about notation of date, time or
21769+# money.
21770+# - Pluralisation problems.
21771+# - Incorrect English spelling.
21772+# - Incorrect formatting.
21773+# It can be your email address, or a mailing list address where translators
21774+# can write to without being subscribed, or the URL of a web page through
21775+# which the translators can contact you.
21776+MSGID_BUGS_ADDRESS =
21777+
21778+# This is the list of locale categories, beyond LC_MESSAGES, for which the
21779+# message catalogs shall be used. It is usually empty.
21780+EXTRA_LOCALE_CATEGORIES =
21781--- lrzsz-0.12.20.safe/po/quot.sed 1969-12-31 19:00:00.000000000 -0500
21782+++ lrzsz-0.12.20/po/quot.sed 2004-09-12 14:40:34.754687440 -0400
21783@@ -0,0 +1,6 @@
21784+s/"\([^"]*\)"/“\1â€/g
21785+s/`\([^`']*\)'/‘\1’/g
21786+s/ '\([^`']*\)' / ‘\1’ /g
21787+s/ '\([^`']*\)'$/ ‘\1’/g
21788+s/^'\([^`']*\)' /‘\1’ /g
21789+s/“â€/""/g
21790--- lrzsz-0.12.20.safe/po/remove-potcdate.sin 1969-12-31 19:00:00.000000000 -0500
21791+++ lrzsz-0.12.20/po/remove-potcdate.sin 2004-09-12 14:40:34.762686224 -0400
21792@@ -0,0 +1,19 @@
21793+# Sed script that remove the POT-Creation-Date line in the header entry
21794+# from a POT file.
21795+#
21796+# The distinction between the first and the following occurrences of the
21797+# pattern is achieved by looking at the hold space.
21798+/^"POT-Creation-Date: .*"$/{
21799+x
21800+# Test if the hold space is empty.
21801+s/P/P/
21802+ta
21803+# Yes it was empty. First occurrence. Remove the line.
21804+g
21805+d
21806+bb
21807+:a
21808+# The hold space was nonempty. Following occurrences. Do nothing.
21809+x
21810+:b
21811+}
21812--- lrzsz-0.12.20.safe/po/Rules-quot 1969-12-31 19:00:00.000000000 -0500
21813+++ lrzsz-0.12.20/po/Rules-quot 2004-09-12 14:40:34.778683792 -0400
21814@@ -0,0 +1,47 @@
21815+# Special Makefile rules for English message catalogs with quotation marks.
21816+
21817+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
21818+
21819+.SUFFIXES: .insert-header .po-update-en
21820+
21821+en@quot.po-create:
21822+ $(MAKE) en@quot.po-update
21823+en@boldquot.po-create:
21824+ $(MAKE) en@boldquot.po-update
21825+
21826+en@quot.po-update: en@quot.po-update-en
21827+en@boldquot.po-update: en@boldquot.po-update-en
21828+
21829+.insert-header.po-update-en:
21830+ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
21831+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
21832+ tmpdir=`pwd`; \
21833+ echo "$$lang:"; \
21834+ ll=`echo $$lang | sed -e 's/@.*//'`; \
21835+ LC_ALL=C; export LC_ALL; \
21836+ cd $(srcdir); \
21837+ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
21838+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
21839+ rm -f $$tmpdir/$$lang.new.po; \
21840+ else \
21841+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
21842+ :; \
21843+ else \
21844+ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
21845+ exit 1; \
21846+ fi; \
21847+ fi; \
21848+ else \
21849+ echo "creation of $$lang.po failed!" 1>&2; \
21850+ rm -f $$tmpdir/$$lang.new.po; \
21851+ fi
21852+
21853+en@quot.insert-header: insert-header.sin
21854+ sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
21855+
21856+en@boldquot.insert-header: insert-header.sin
21857+ sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
21858+
21859+mostlyclean: mostlyclean-quot
21860+mostlyclean-quot:
21861+ rm -f *.insert-header
21862--- lrzsz-0.12.20.safe/po/stamp-cat-id 1998-12-30 02:50:01.000000000 -0500
21863+++ lrzsz-0.12.20/po/stamp-cat-id 1969-12-31 19:00:00.000000000 -0500
21864@@ -1 +0,0 @@
21865-timestamp
21866--- lrzsz-0.12.20.safe/src/Makefile.am 1998-12-28 03:38:47.000000000 -0500
21867+++ lrzsz-0.12.20/src/Makefile.am 2004-09-12 14:40:53.665812512 -0400
21868@@ -2,12 +2,12 @@
21869 lrz_SOURCES=lrz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
21870 lsz_SOURCES=lsz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
21871 noinst_HEADERS = timing.h zglobal.h zmodem.h
21872-datadir = $(prefix)/@DATADIRNAME@
21873+datadir = $(prefix)/share
21874 localedir = $(datadir)/locale
21875 CFLAGS=@CFLAGS@
21876 DISTCLEAN_FILES=lrzszbug
21877
21878-LDADD = ../lib/libzmodem.a @INTLLIBS@
21879+LDADD = ../lib/libzmodem.a @LIBINTL@
21880 AUTOMAKE_OPTIONS=ansi2knr
21881 EXTRA_DIST = ansi2knr.1 ansi2knr.c lrzszbug.in
21882 INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl -I$(top_srcdir)/lib
diff --git a/meta/packages/lrzsz/lrzsz-0.12.20/makefile.patch b/meta/packages/lrzsz/lrzsz-0.12.20/makefile.patch
deleted file mode 100644
index c553c8bf34..0000000000
--- a/meta/packages/lrzsz/lrzsz-0.12.20/makefile.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1diff -ruN lrzsz-0.12.20_org/src/Makefile.in lrzsz-0.12.20_patch/src/Makefile.in
2--- lrzsz-0.12.20_org/src/Makefile.in 1998-12-30 17:31:46.000000000 +0100
3+++ lrzsz-0.12.20_patch/src/Makefile.in 2004-04-29 13:57:33.434909656 +0200
4@@ -372,13 +372,13 @@
5 rm -f $(DESTDIR)/$(bindir)/`echo lsb | sed -e '$(transform)'`
6 ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
7 $(DESTDIR)/$(bindir)/`echo lsb |sed -e '$(transform)'`
8- rm -f $(bindir)/`echo lsx | sed -e '$(transform)'`
9+ rm -f $(DESTDIR)/$(bindir)/`echo lsx | sed -e '$(transform)'`
10 ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
11 $(DESTDIR)/$(bindir)/`echo lsx |sed -e '$(transform)'`
12- rm -f $(bindir)/`echo lrb | sed -e '$(transform)'`
13+ rm -f $(DESTDIR)/$(bindir)/`echo lrb | sed -e '$(transform)'`
14 ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
15 $(DESTDIR)/$(bindir)/`echo lrb |sed -e '$(transform)'`
16- rm -f $(bindir)/`echo lrx | sed -e '$(transform)'`
17+ rm -f $(DESTDIR)/$(bindir)/`echo lrx | sed -e '$(transform)'`
18 ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
19 $(DESTDIR)/$(bindir)/`echo lrx |sed -e '$(transform)'`
20 # rm -f $(bindir)/`echo lrzszbug | sed -e '$(transform)'`
diff --git a/meta/packages/lrzsz/lrzsz_0.12.20.bb b/meta/packages/lrzsz/lrzsz_0.12.20.bb
deleted file mode 100644
index af2db23102..0000000000
--- a/meta/packages/lrzsz/lrzsz_0.12.20.bb
+++ /dev/null
@@ -1,33 +0,0 @@
1DESCRIPTION = "Tools for zmodem/xmodem/ymodem file transfer"
2HOMEPAGE = "http://www.ohse.de/uwe/software/lrzsz.html"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
5 file://src/lrz.c;beginline=1;endline=10;md5=5276956373ff7d8758837f6399a1045f"
6SECTION = "console/network"
7PRIORITY = "standard"
8DEPENDS = ""
9PR = "r3"
10
11SRC_URI = "http://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \
12 file://autotools.patch;patch=1 \
13 file://makefile.patch;patch=1 \
14 file://gettext.patch;patch=1"
15
16inherit autotools gettext
17
18do_install() {
19 install -d ${D}${bindir}/
20 install -m 0755 src/lrz src/lsz ${D}${bindir}/
21}
22
23pkg_postinst() {
24 for util in rz rx rb sz sx sb; do
25 update-alternatives --install ${bindir}/$util $util lrz 100
26 done
27}
28
29pkg_postrm() {
30 for util in rz rx rb sz sx sb; do
31 update-alternatives --remove $util ${bindir}/lrz
32 done
33} \ No newline at end of file
diff --git a/meta/packages/lsof/lsof_4.83.bb b/meta/packages/lsof/lsof_4.83.bb
deleted file mode 100644
index 078da64305..0000000000
--- a/meta/packages/lsof/lsof_4.83.bb
+++ /dev/null
@@ -1,41 +0,0 @@
1DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \
2Its name stands for LiSt Open Files, and it does just that."
3SECTION = "devel"
4LICENSE = "BSD"
5
6PR = "r0"
7
8SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
9LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
10S = "${WORKDIR}/lsof_${PV}_src"
11
12python do_unpack () {
13 bb.build.exec_func('base_do_unpack', d)
14 src_uri = bb.data.getVar('SRC_URI', d)
15 bb.data.setVar('SRC_URI', '${LOCALSRC}', d)
16 bb.build.exec_func('base_do_unpack', d)
17 bb.data.setVar('SRC_URI', src_uri, d)
18}
19
20export LSOF_OS = "${TARGET_OS}"
21LSOF_OS_linux-uclibc = "linux"
22LSOF_OS_linux-gnueabi = "linux"
23export LSOF_INCLUDE = "${STAGING_INCDIR}"
24
25do_configure () {
26 yes | ./Configure ${LSOF_OS}
27}
28
29export I = "${STAGING_INCDIR}"
30export L = "${STAGING_INCDIR}"
31export EXTRA_OEMAKE = ""
32
33do_compile () {
34 oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
35}
36
37do_install () {
38 install -d ${D}${sbindir} ${D}${mandir}/man8
39 install -m 4755 lsof ${D}${sbindir}/lsof
40 install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8
41}
diff --git a/meta/packages/lzo/lzo-2.03/acinclude.m4 b/meta/packages/lzo/lzo-2.03/acinclude.m4
deleted file mode 100644
index c4d2ccd5b5..0000000000
--- a/meta/packages/lzo/lzo-2.03/acinclude.m4
+++ /dev/null
@@ -1,358 +0,0 @@
1
2AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
3AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
4])#
5
6AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
7AC_HEADER_TIME
8AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h sys/wait.h])
9])#
10
11AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
12AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
13])#
14
15
16AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
17AC_CHECK_SIZEOF(short)
18AC_CHECK_SIZEOF(int)
19AC_CHECK_SIZEOF(long)
20
21AC_CHECK_SIZEOF(long long)
22AC_CHECK_SIZEOF(__int16)
23AC_CHECK_SIZEOF(__int32)
24AC_CHECK_SIZEOF(__int64)
25
26AC_CHECK_SIZEOF(void *)
27AC_CHECK_SIZEOF(size_t)
28AC_CHECK_SIZEOF(ptrdiff_t)
29])#
30
31
32# /***********************************************************************
33# // Check for ACC_conformance
34# ************************************************************************/
35
36AC_DEFUN([mfx_ACC_ACCCHK], [
37mfx_tmp=$1
38mfx_save_CPPFLAGS=$CPPFLAGS
39dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
40test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
41
42AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
43
44AC_LANG_CONFTEST([AC_LANG_PROGRAM(
45[[#define ACC_CONFIG_NO_HEADER 1
46#include "acc/acc.h"
47#include "acc/acc_incd.h"
48#undef ACCCHK_ASSERT
49#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
50#include "acc/acc_chk.ch"
51#undef ACCCHK_ASSERT
52static void test_acc_compile_time_assert(void) {
53#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
54#include "acc/acc_chk.ch"
55#undef ACCCHK_ASSERT
56}
57#undef NDEBUG
58#include <assert.h>
59static int test_acc_run_time_assert(int r) {
60#define ACCCHK_ASSERT(expr) assert(expr);
61#include "acc/acc_chk.ch"
62#undef ACCCHK_ASSERT
63return r;
64}
65]], [[
66test_acc_compile_time_assert();
67if (test_acc_run_time_assert(1) != 1) return 1;
68]]
69)])
70
71mfx_tmp=FAILED
72_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
73rm -f conftest.$ac_ext conftest.$ac_objext
74
75CPPFLAGS=$mfx_save_CPPFLAGS
76
77AC_MSG_RESULT([$mfx_tmp])
78case x$mfx_tmp in
79 xpassed | xyes) ;;
80 *)
81 AC_MSG_NOTICE([])
82 AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
83 AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
84 AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
85 AC_MSG_NOTICE([Thanks for your support.])
86 AC_MSG_NOTICE([])
87 AC_MSG_ERROR([ACC conformance test failed. Stop.])
88dnl AS_EXIT
89 ;;
90esac
91])# mfx_ACC_ACCCHK
92
93
94# /***********************************************************************
95# // Check for ACC_conformance
96# ************************************************************************/
97
98AC_DEFUN([mfx_MINIACC_ACCCHK], [
99mfx_tmp=$1
100mfx_save_CPPFLAGS=$CPPFLAGS
101dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
102test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
103
104AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
105
106AC_LANG_CONFTEST([AC_LANG_PROGRAM(
107[[#define ACC_CONFIG_NO_HEADER 1
108#define ACC_WANT_ACC_INCD_H 1
109#include $2
110
111#define ACC_WANT_ACC_CHK_CH 1
112#undef ACCCHK_ASSERT
113#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
114#include $2
115
116#define ACC_WANT_ACC_CHK_CH 1
117#undef ACCCHK_ASSERT
118#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
119static void test_acc_compile_time_assert(void) {
120#include $2
121}
122
123#undef NDEBUG
124#include <assert.h>
125#define ACC_WANT_ACC_CHK_CH 1
126#undef ACCCHK_ASSERT
127#define ACCCHK_ASSERT(expr) assert(expr);
128static int test_acc_run_time_assert(int r) {
129#include $2
130return r;
131}
132]], [[
133test_acc_compile_time_assert();
134if (test_acc_run_time_assert(1) != 1) return 1;
135]]
136)])
137
138mfx_tmp=FAILED
139_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
140rm -f conftest.$ac_ext conftest.$ac_objext
141
142CPPFLAGS=$mfx_save_CPPFLAGS
143
144AC_MSG_RESULT([$mfx_tmp])
145case x$mfx_tmp in
146 xpassed | xyes) ;;
147 *)
148 AC_MSG_NOTICE([])
149 AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
150 AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
151 AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
152 AC_MSG_NOTICE([Thanks for your support.])
153 AC_MSG_NOTICE([])
154 AC_MSG_ERROR([ACC conformance test failed. Stop.])
155dnl AS_EXIT
156 ;;
157esac
158])# mfx_MINIACC_ACCCHK
159
160
161
162# serial 1
163
164AC_DEFUN([mfx_PROG_CPPFLAGS], [
165AC_MSG_CHECKING([whether the C preprocessor needs special flags])
166
167AC_LANG_CONFTEST([AC_LANG_PROGRAM(
168[[#include <limits.h>
169#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
170# include "your C preprocessor is broken 1"
171#elif (0xffffu == 0xfffffffful)
172# include "your C preprocessor is broken 2"
173#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
174# include "your C preprocessor is broken 3"
175#endif
176]], [[ ]]
177)])
178
179mfx_save_CPPFLAGS=$CPPFLAGS
180mfx_tmp=ERROR
181for mfx_arg in "" -no-cpp-precomp
182do
183 CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
184 _AC_COMPILE_IFELSE([],
185[mfx_tmp=$mfx_arg
186break])
187done
188CPPFLAGS=$mfx_save_CPPFLAGS
189rm -f conftest.$ac_ext conftest.$ac_objext
190case x$mfx_tmp in
191 x)
192 AC_MSG_RESULT([none needed]) ;;
193 xERROR)
194 AC_MSG_RESULT([ERROR])
195 AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
196 ;;
197 *)
198 AC_MSG_RESULT([$mfx_tmp])
199 CPPFLAGS="$mfx_tmp $CPPFLAGS"
200 ;;
201esac
202])# mfx_PROG_CPPFLAGS
203
204
205
206# serial 3
207
208AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
209AC_CACHE_CHECK([whether limits.h is sane],
210mfx_cv_header_sane_limits_h,
211[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
212#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
213# if defined(__APPLE__) && defined(__GNUC__)
214# error "your preprocessor is broken - use compiler option -no-cpp-precomp"
215# else
216# include "your preprocessor is broken"
217# endif
218#endif
219#define MFX_0xffff 0xffff
220#define MFX_0xffffffffL 4294967295ul
221#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
222# include "error CHAR_BIT"
223#endif
224#if !defined(UCHAR_MAX)
225# include "error UCHAR_MAX 1"
226#endif
227#if !defined(USHRT_MAX)
228# include "error USHRT_MAX 1"
229#endif
230#if !defined(UINT_MAX)
231# include "error UINT_MAX 1"
232#endif
233#if !defined(ULONG_MAX)
234# include "error ULONG_MAX 1"
235#endif
236#if !defined(SHRT_MAX)
237# include "error SHRT_MAX 1"
238#endif
239#if !defined(INT_MAX)
240# include "error INT_MAX 1"
241#endif
242#if !defined(LONG_MAX)
243# include "error LONG_MAX 1"
244#endif
245#if (UCHAR_MAX < 1)
246# include "error UCHAR_MAX 2"
247#endif
248#if (USHRT_MAX < 1)
249# include "error USHRT_MAX 2"
250#endif
251#if (UINT_MAX < 1)
252# include "error UINT_MAX 2"
253#endif
254#if (ULONG_MAX < 1)
255# include "error ULONG_MAX 2"
256#endif
257#if (UCHAR_MAX < 0xff)
258# include "error UCHAR_MAX 3"
259#endif
260#if (USHRT_MAX < MFX_0xffff)
261# include "error USHRT_MAX 3"
262#endif
263#if (UINT_MAX < MFX_0xffff)
264# include "error UINT_MAX 3"
265#endif
266#if (ULONG_MAX < MFX_0xffffffffL)
267# include "error ULONG_MAX 3"
268#endif
269#if (USHRT_MAX > UINT_MAX)
270# include "error USHRT_MAX vs UINT_MAX"
271#endif
272#if (UINT_MAX > ULONG_MAX)
273# include "error UINT_MAX vs ULONG_MAX"
274#endif
275]], [[
276#if (USHRT_MAX == MFX_0xffff)
277{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
278#elif (USHRT_MAX >= MFX_0xffff)
279{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
280#endif
281#if (UINT_MAX == MFX_0xffff)
282{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
283#elif (UINT_MAX >= MFX_0xffff)
284{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
285#endif
286#if (ULONG_MAX == MFX_0xffff)
287{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
288#elif (ULONG_MAX >= MFX_0xffff)
289{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
290#endif
291#if (USHRT_MAX == MFX_0xffffffffL)
292{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
293#elif (USHRT_MAX >= MFX_0xffffffffL)
294{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
295#endif
296#if (UINT_MAX == MFX_0xffffffffL)
297{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
298#elif (UINT_MAX >= MFX_0xffffffffL)
299{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
300#endif
301#if (ULONG_MAX == MFX_0xffffffffL)
302{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
303#elif (ULONG_MAX >= MFX_0xffffffffL)
304{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
305#endif
306]])],
307[mfx_cv_header_sane_limits_h=yes],
308[mfx_cv_header_sane_limits_h=no])])
309])
310
311# /***********************************************************************
312# // standard
313# ************************************************************************/
314
315AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
316AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
317])#
318
319
320# /***********************************************************************
321# //
322# ************************************************************************/
323
324dnl more types which are not yet covered by ACC
325
326AC_DEFUN([mfx_CHECK_SIZEOF], [
327AC_CHECK_SIZEOF(__int32)
328AC_CHECK_SIZEOF(intmax_t)
329AC_CHECK_SIZEOF(uintmax_t)
330AC_CHECK_SIZEOF(intptr_t)
331AC_CHECK_SIZEOF(uintptr_t)
332
333AC_CHECK_SIZEOF(float)
334AC_CHECK_SIZEOF(double)
335AC_CHECK_SIZEOF(long double)
336
337AC_CHECK_SIZEOF(dev_t)
338AC_CHECK_SIZEOF(fpos_t)
339AC_CHECK_SIZEOF(mode_t)
340AC_CHECK_SIZEOF(off_t)
341AC_CHECK_SIZEOF(ssize_t)
342AC_CHECK_SIZEOF(time_t)
343])#
344
345
346
347AC_DEFUN([mfx_CHECK_LIB_WINMM], [
348if test "X$GCC" = Xyes; then
349case $host_os in
350cygwin* | mingw* | pw32*)
351 test "X$LIBS" != "X" && LIBS="$LIBS "
352 LIBS="${LIBS}-lwinmm" ;;
353*)
354 ;;
355esac
356fi
357])#
358
diff --git a/meta/packages/lzo/lzo-2.03/autofoo.patch b/meta/packages/lzo/lzo-2.03/autofoo.patch
deleted file mode 100644
index 5762f4c6e2..0000000000
--- a/meta/packages/lzo/lzo-2.03/autofoo.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1---
2 configure.ac | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5Index: lzo-2.02/configure.ac
6===================================================================
7--- lzo-2.02.orig/configure.ac 2007-08-08 15:28:14.000000000 +0100
8+++ lzo-2.02/configure.ac 2007-08-08 15:28:21.000000000 +0100
9@@ -47,7 +47,7 @@ AC_CANONICAL_TARGET
10 AM_MAINTAINER_MODE
11
12 if test -z "$ac_abs_top_srcdir"; then
13- _AC_SRCPATHS(.)
14+ _AC_SRCDIRS(.)
15 fi
16 if test -r .Conf.settings1; then
17 . ./.Conf.settings1
diff --git a/meta/packages/lzo/lzo_2.03.bb b/meta/packages/lzo/lzo_2.03.bb
deleted file mode 100644
index 9657d97e59..0000000000
--- a/meta/packages/lzo/lzo_2.03.bb
+++ /dev/null
@@ -1,22 +0,0 @@
1DESCRIPTION = "Lossless data compression library"
2HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
3SECTION = "libs"
4PRIORITY = "optional"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=8cad52263e636e25377bc18420118101 \
7 file://src/lzo_init.c;beginline=5;endline=33;md5=094776237523b2e93124cf09b9c76aef"
8PR = "r0"
9
10SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
11 file://autofoo.patch \
12 file://acinclude.m4"
13
14inherit autotools
15
16EXTRA_OECONF = "--enable-shared"
17
18do_configure_prepend () {
19 cp ${WORKDIR}/acinclude.m4 ${S}/
20}
21
22BBCLASSEXTEND = "native"
diff --git a/meta/packages/mozilla-headless/mozilla-headless-services/confighack.patch b/meta/packages/mozilla-headless/mozilla-headless-services/confighack.patch
deleted file mode 100644
index dcfe11e0ff..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless-services/confighack.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: places-glib/configure.ac
2===================================================================
3--- places-glib.orig/configure.ac 2009-04-17 10:29:15.000000000 +0100
4+++ places-glib/configure.ac 2009-04-17 10:29:44.000000000 +0100
5@@ -99,6 +99,8 @@
6 PKG_CHECK_MODULES(GLIB, [glib-2.0])
7 PKG_CHECK_MODULES(DBUS, [dbus-glib-1])
8
9+XUL_LIBS="$XUL_LIBS -lmozjs"
10+
11 MOZHOME=`${PKG_CONFIG} --variable=prefix mozilla-headless`"/lib/xulrunner-"`${PKG_CONFIG} --modversion mozilla-headless`
12 AC_SUBST([MOZHOME])
13
diff --git a/meta/packages/mozilla-headless/mozilla-headless-services_git.bb b/meta/packages/mozilla-headless/mozilla-headless-services_git.bb
deleted file mode 100644
index 14d64fa8c3..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless-services_git.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1SRC_URI = "git://git.moblin.org/mozilla-headless-services.git;protocol=git \
2 file://confighack.patch;patch=1"
3PV = "0.1+git${SRCPV}"
4PR = "r1"
5
6DEPENDS = "glib-2.0 dbus mozilla-headless json-glib"
7
8EXTRA_OECONF = "--enable-gnome-proxy"
9
10S = "${WORKDIR}/git"
11
12FILES_${PN} += "${datadir}/dbus-1/services"
13
14inherit autotools
diff --git a/meta/packages/mozilla-headless/mozilla-headless/0001-Adds-initial-Gtk-clipboard-support-to-moz-headless.patch b/meta/packages/mozilla-headless/mozilla-headless/0001-Adds-initial-Gtk-clipboard-support-to-moz-headless.patch
deleted file mode 100644
index db9e147990..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/0001-Adds-initial-Gtk-clipboard-support-to-moz-headless.patch
+++ /dev/null
@@ -1,1478 +0,0 @@
1From fb41f028badb4dfddfc47fb2a1a68c1aa90dcef5 Mon Sep 17 00:00:00 2001
2From: Robert Bragg <robert@linux.intel.com>
3Date: Fri, 8 May 2009 13:57:22 +0100
4Subject: [PATCH] Adds initial Gtk clipboard support to moz-headless
5
6If build with MOZ_X11 enabled then this now builds the clipboard code taken
7from the gtk2 backend. This doesn't provide any embedding API yet to expose
8the clipboard.
9---
10 widget/src/headless/Makefile.in | 6 +
11 widget/src/headless/nsClipboard.cpp | 948 +++++++++++++++++++++++++++++++
12 widget/src/headless/nsClipboard.h | 93 +++
13 widget/src/headless/nsIImageToPixbuf.h | 62 ++
14 widget/src/headless/nsImageToPixbuf.cpp | 196 +++++++
15 widget/src/headless/nsImageToPixbuf.h | 71 +++
16 widget/src/headless/nsWidgetFactory.cpp | 18 +
17 7 files changed, 1394 insertions(+), 0 deletions(-)
18 create mode 100644 widget/src/headless/nsClipboard.cpp
19 create mode 100644 widget/src/headless/nsClipboard.h
20 create mode 100644 widget/src/headless/nsIImageToPixbuf.h
21 create mode 100644 widget/src/headless/nsImageToPixbuf.cpp
22 create mode 100644 widget/src/headless/nsImageToPixbuf.h
23
24Index: offscreen/widget/src/headless/Makefile.in
25===================================================================
26--- offscreen.orig/widget/src/headless/Makefile.in 2009-05-16 18:23:25.000000000 +0100
27+++ offscreen/widget/src/headless/Makefile.in 2009-06-12 14:14:05.000000000 +0100
28@@ -95,6 +95,12 @@
29 nsScreenManagerHeadless.cpp \
30 $(NULL)
31
32+ifdef MOZ_X11
33+CPPSRCS += nsClipboard.cpp \
34+ nsImageToPixbuf.cpp \
35+ $(NULL)
36+endif
37+
38 # build our subdirs, too
39 SHARED_LIBRARY_LIBS = ../xpwidgets/libxpwidgets_s.a
40
41Index: offscreen/widget/src/headless/nsClipboard.cpp
42===================================================================
43--- /dev/null 1970-01-01 00:00:00.000000000 +0000
44+++ offscreen/widget/src/headless/nsClipboard.cpp 2009-06-12 14:14:05.000000000 +0100
45@@ -0,0 +1,948 @@
46+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
47+/* vim:expandtab:shiftwidth=4:tabstop=4:
48+ */
49+/* ***** BEGIN LICENSE BLOCK *****
50+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
51+ *
52+ * The contents of this file are subject to the Mozilla Public License Version
53+ * 1.1 (the "License"); you may not use this file except in compliance with
54+ * the License. You may obtain a copy of the License at
55+ * http://www.mozilla.org/MPL/
56+ *
57+ * Software distributed under the License is distributed on an "AS IS" basis,
58+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
59+ * for the specific language governing rights and limitations under the
60+ * License.
61+ *
62+ * The Original Code is mozilla.org code.
63+ *
64+ * The Initial Developer of the Original Code is Christopher Blizzard
65+ * <blizzard@mozilla.org>. Portions created by the Initial Developer
66+ * are Copyright (C) 2001 the Initial Developer. All Rights Reserved.
67+ *
68+ * Contributor(s):
69+ *
70+ * Alternatively, the contents of this file may be used under the terms of
71+ * either the GNU General Public License Version 2 or later (the "GPL"), or
72+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
73+ * in which case the provisions of the GPL or the LGPL are applicable instead
74+ * of those above. If you wish to allow use of your version of this file only
75+ * under the terms of either the GPL or the LGPL, and not to allow others to
76+ * use your version of this file under the terms of the MPL, indicate your
77+ * decision by deleting the provisions above and replace them with the notice
78+ * and other provisions required by the GPL or the LGPL. If you do not delete
79+ * the provisions above, a recipient may use your version of this file under
80+ * the terms of any one of the MPL, the GPL or the LGPL.
81+ *
82+ * ***** END LICENSE BLOCK ***** */
83+
84+#include "nsClipboard.h"
85+#include "nsSupportsPrimitives.h"
86+#include "nsString.h"
87+#include "nsReadableUtils.h"
88+#include "nsXPIDLString.h"
89+#include "nsPrimitiveHelpers.h"
90+#include "nsICharsetConverterManager.h"
91+#include "nsIServiceManager.h"
92+#include "nsIImage.h"
93+#include "nsImageToPixbuf.h"
94+#include "nsStringStream.h"
95+
96+#include <gtk/gtk.h>
97+
98+// For manipulation of the X event queue
99+#include <X11/Xlib.h>
100+#include <gdk/gdkx.h>
101+#include <sys/time.h>
102+#include <sys/types.h>
103+#include <unistd.h>
104+
105+#ifdef POLL_WITH_XCONNECTIONNUMBER
106+#include <poll.h>
107+#endif
108+
109+// Callback when someone asks us for the selection
110+void
111+invisible_selection_get_cb (GtkWidget *aWidget,
112+ GtkSelectionData *aSelectionData,
113+ guint aTime,
114+ guint aInfo,
115+ nsClipboard *aClipboard);
116+
117+gboolean
118+selection_clear_event_cb (GtkWidget *aWidget,
119+ GdkEventSelection *aEvent,
120+ nsClipboard *aClipboard);
121+
122+static void
123+ConvertHTMLtoUCS2 (guchar *data,
124+ PRInt32 dataLength,
125+ PRUnichar **unicodeData,
126+ PRInt32 &outUnicodeLen);
127+
128+static void
129+GetHTMLCharset (guchar * data, PRInt32 dataLength, nsCString& str);
130+
131+
132+// Our own versions of gtk_clipboard_wait_for_contents and
133+// gtk_clipboard_wait_for_text, which don't run the event loop while
134+// waiting for the data. This prevents a lot of problems related to
135+// dispatching events at unexpected times.
136+
137+static GtkSelectionData *
138+wait_for_contents (GtkClipboard *clipboard, GdkAtom target);
139+
140+static gchar *
141+wait_for_text (GtkClipboard *clipboard);
142+
143+static Bool
144+checkEventProc(Display *display, XEvent *event, XPointer arg);
145+
146+struct retrieval_context
147+{
148+ PRBool completed;
149+ void *data;
150+
151+ retrieval_context() : completed(PR_FALSE), data(nsnull) { }
152+};
153+
154+static void
155+wait_for_retrieval(GtkClipboard *clipboard, retrieval_context *transferData);
156+
157+static void
158+clipboard_contents_received(GtkClipboard *clipboard,
159+ GtkSelectionData *selection_data,
160+ gpointer data);
161+
162+static void
163+clipboard_text_received(GtkClipboard *clipboard,
164+ const gchar *text,
165+ gpointer data);
166+
167+nsClipboard::nsClipboard()
168+{
169+ mWidget = nsnull;
170+}
171+
172+nsClipboard::~nsClipboard()
173+{
174+ if (mWidget)
175+ gtk_widget_destroy(mWidget);
176+}
177+
178+NS_IMPL_ISUPPORTS1(nsClipboard, nsIClipboard)
179+
180+nsresult
181+nsClipboard::Init(void)
182+{
183+ mWidget = gtk_invisible_new();
184+ if (!mWidget)
185+ return NS_ERROR_FAILURE;
186+
187+ g_signal_connect(G_OBJECT(mWidget), "selection_get",
188+ G_CALLBACK(invisible_selection_get_cb), this);
189+
190+ g_signal_connect(G_OBJECT(mWidget), "selection_clear_event",
191+ G_CALLBACK(selection_clear_event_cb), this);
192+
193+ // XXX make sure to set up the selection_clear event
194+
195+ return NS_OK;
196+}
197+
198+NS_IMETHODIMP
199+nsClipboard::SetData(nsITransferable *aTransferable,
200+ nsIClipboardOwner *aOwner, PRInt32 aWhichClipboard)
201+{
202+ // See if we can short cut
203+ if ((aWhichClipboard == kGlobalClipboard &&
204+ aTransferable == mGlobalTransferable.get() &&
205+ aOwner == mGlobalOwner.get()) ||
206+ (aWhichClipboard == kSelectionClipboard &&
207+ aTransferable == mSelectionTransferable.get() &&
208+ aOwner == mSelectionOwner.get())) {
209+ return NS_OK;
210+ }
211+
212+ nsresult rv;
213+ if (!mPrivacyHandler) {
214+ rv = NS_NewClipboardPrivacyHandler(getter_AddRefs(mPrivacyHandler));
215+ NS_ENSURE_SUCCESS(rv, rv);
216+ }
217+ rv = mPrivacyHandler->PrepareDataForClipboard(aTransferable);
218+ NS_ENSURE_SUCCESS(rv, rv);
219+
220+ // Clear out the clipboard in order to set the new data
221+ EmptyClipboard(aWhichClipboard);
222+
223+ if (aWhichClipboard == kSelectionClipboard) {
224+ mSelectionOwner = aOwner;
225+ mSelectionTransferable = aTransferable;
226+ }
227+ else {
228+ mGlobalOwner = aOwner;
229+ mGlobalTransferable = aTransferable;
230+ }
231+
232+ // Which selection are we about to claim, CLIPBOARD or PRIMARY?
233+ GdkAtom selectionAtom = GetSelectionAtom(aWhichClipboard);
234+
235+ // Make ourselves the owner. If we fail to, return.
236+ if (!gtk_selection_owner_set(mWidget, selectionAtom, GDK_CURRENT_TIME))
237+ return NS_ERROR_FAILURE;
238+
239+ // Clear the old selection target list.
240+ gtk_selection_clear_targets(mWidget, selectionAtom);
241+
242+ // Get the types of supported flavors
243+ nsCOMPtr<nsISupportsArray> flavors;
244+
245+ rv = aTransferable->FlavorsTransferableCanExport(getter_AddRefs(flavors));
246+ if (!flavors || NS_FAILED(rv))
247+ return NS_ERROR_FAILURE;
248+
249+ // Add all the flavors to this widget's supported type.
250+ PRUint32 count;
251+ flavors->Count(&count);
252+ for (PRUint32 i=0; i < count; i++) {
253+ nsCOMPtr<nsISupports> tastesLike;
254+ flavors->GetElementAt(i, getter_AddRefs(tastesLike));
255+ nsCOMPtr<nsISupportsCString> flavor = do_QueryInterface(tastesLike);
256+
257+ if (flavor) {
258+ nsXPIDLCString flavorStr;
259+ flavor->ToString(getter_Copies(flavorStr));
260+
261+ // special case text/unicode since we can handle all of
262+ // the string types
263+ if (!strcmp(flavorStr, kUnicodeMime)) {
264+ AddTarget(gdk_atom_intern("UTF8_STRING", FALSE),
265+ selectionAtom);
266+ AddTarget(gdk_atom_intern("COMPOUND_TEXT", FALSE),
267+ selectionAtom);
268+ AddTarget(gdk_atom_intern("TEXT", FALSE), selectionAtom);
269+ AddTarget(GDK_SELECTION_TYPE_STRING, selectionAtom);
270+ // next loop iteration
271+ continue;
272+ }
273+
274+ // very special case for this one. since our selection mechanism doesn't work for images,
275+ // we must use GTK's clipboard utility functions
276+ if (!strcmp(flavorStr, kNativeImageMime) || !strcmp(flavorStr, kPNGImageMime) ||
277+ !strcmp(flavorStr, kJPEGImageMime) || !strcmp(flavorStr, kGIFImageMime)) {
278+ nsCOMPtr<nsISupports> item;
279+ PRUint32 len;
280+ rv = aTransferable->GetTransferData(flavorStr, getter_AddRefs(item), &len);
281+ nsCOMPtr<nsISupportsInterfacePointer> ptrPrimitive(do_QueryInterface(item));
282+ if (!ptrPrimitive)
283+ continue;
284+
285+ nsCOMPtr<nsISupports> primitiveData;
286+ ptrPrimitive->GetData(getter_AddRefs(primitiveData));
287+ nsCOMPtr<nsIImage> image(do_QueryInterface(primitiveData));
288+ if (!image) // Not getting an image for an image mime type!?
289+ continue;
290+
291+ if (NS_FAILED(image->LockImagePixels(PR_FALSE)))
292+ continue;
293+ GdkPixbuf* pixbuf = nsImageToPixbuf::ImageToPixbuf(image);
294+ if (!pixbuf) {
295+ image->UnlockImagePixels(PR_FALSE);
296+ continue;
297+ }
298+
299+ GtkClipboard *aClipboard = gtk_clipboard_get(GetSelectionAtom(aWhichClipboard));
300+ gtk_clipboard_set_image(aClipboard, pixbuf);
301+ g_object_unref(pixbuf);
302+ image->UnlockImagePixels(PR_FALSE);
303+ continue;
304+ }
305+
306+ // Add this to our list of valid targets
307+ GdkAtom atom = gdk_atom_intern(flavorStr, FALSE);
308+ AddTarget(atom, selectionAtom);
309+ }
310+ }
311+
312+ return NS_OK;
313+}
314+
315+NS_IMETHODIMP
316+nsClipboard::GetData(nsITransferable *aTransferable, PRInt32 aWhichClipboard)
317+{
318+ if (!aTransferable)
319+ return NS_ERROR_FAILURE;
320+
321+ GtkClipboard *clipboard;
322+ clipboard = gtk_clipboard_get(GetSelectionAtom(aWhichClipboard));
323+
324+ guchar *data = NULL;
325+ gint length = 0;
326+ PRBool foundData = PR_FALSE;
327+ nsCAutoString foundFlavor;
328+
329+ // Get a list of flavors this transferable can import
330+ nsCOMPtr<nsISupportsArray> flavors;
331+ nsresult rv;
332+ rv = aTransferable->FlavorsTransferableCanImport(getter_AddRefs(flavors));
333+ if (!flavors || NS_FAILED(rv))
334+ return NS_ERROR_FAILURE;
335+
336+ PRUint32 count;
337+ flavors->Count(&count);
338+ for (PRUint32 i=0; i < count; i++) {
339+ nsCOMPtr<nsISupports> genericFlavor;
340+ flavors->GetElementAt(i, getter_AddRefs(genericFlavor));
341+
342+ nsCOMPtr<nsISupportsCString> currentFlavor;
343+ currentFlavor = do_QueryInterface(genericFlavor);
344+
345+ if (currentFlavor) {
346+ nsXPIDLCString flavorStr;
347+ currentFlavor->ToString(getter_Copies(flavorStr));
348+
349+ // Special case text/unicode since we can convert any
350+ // string into text/unicode
351+ if (!strcmp(flavorStr, kUnicodeMime)) {
352+ gchar* new_text = wait_for_text(clipboard);
353+ if (new_text) {
354+ // Convert utf-8 into our unicode format.
355+ NS_ConvertUTF8toUTF16 ucs2string(new_text);
356+ data = (guchar *)ToNewUnicode(ucs2string);
357+ length = ucs2string.Length() * 2;
358+ g_free(new_text);
359+ foundData = PR_TRUE;
360+ foundFlavor = kUnicodeMime;
361+ break;
362+ }
363+ // If the type was text/unicode and we couldn't get
364+ // text off the clipboard, run the next loop
365+ // iteration.
366+ continue;
367+ }
368+
369+ // For images, we must wrap the data in an nsIInputStream then return instead of break,
370+ // because that code below won't help us.
371+ if (!strcmp(flavorStr, kJPEGImageMime) || !strcmp(flavorStr, kPNGImageMime) || !strcmp(flavorStr, kGIFImageMime)) {
372+ GdkAtom atom;
373+ if (!strcmp(flavorStr, kJPEGImageMime)) // This is image/jpg, but X only understands image/jpeg
374+ atom = gdk_atom_intern("image/jpeg", FALSE);
375+ else
376+ atom = gdk_atom_intern(flavorStr, FALSE);
377+
378+ GtkSelectionData *selectionData = wait_for_contents(clipboard, atom);
379+ if (!selectionData)
380+ continue;
381+
382+ nsCOMPtr<nsIInputStream> byteStream;
383+ NS_NewByteInputStream(getter_AddRefs(byteStream), (const char*)selectionData->data,
384+ selectionData->length, NS_ASSIGNMENT_COPY);
385+ aTransferable->SetTransferData(flavorStr, byteStream, sizeof(nsIInputStream*));
386+ gtk_selection_data_free(selectionData);
387+ return NS_OK;
388+ }
389+
390+ // Get the atom for this type and try to request it off
391+ // the clipboard.
392+ GdkAtom atom = gdk_atom_intern(flavorStr, FALSE);
393+ GtkSelectionData *selectionData;
394+ selectionData = wait_for_contents(clipboard, atom);
395+ if (selectionData) {
396+ length = selectionData->length;
397+ // Special case text/html since we can convert into UCS2
398+ if (!strcmp(flavorStr, kHTMLMime)) {
399+ PRUnichar* htmlBody= nsnull;
400+ PRInt32 htmlBodyLen = 0;
401+ // Convert text/html into our unicode format
402+ ConvertHTMLtoUCS2((guchar *)selectionData->data, length,
403+ &htmlBody, htmlBodyLen);
404+ if (!htmlBodyLen)
405+ break;
406+ data = (guchar *)htmlBody;
407+ length = htmlBodyLen * 2;
408+ } else {
409+ data = (guchar *)nsMemory::Alloc(length);
410+ if (!data)
411+ break;
412+ memcpy(data, selectionData->data, length);
413+ }
414+ foundData = PR_TRUE;
415+ foundFlavor = flavorStr;
416+ break;
417+ }
418+ }
419+ }
420+
421+ if (foundData) {
422+ nsCOMPtr<nsISupports> wrapper;
423+ nsPrimitiveHelpers::CreatePrimitiveForData(foundFlavor.get(),
424+ data, length,
425+ getter_AddRefs(wrapper));
426+ aTransferable->SetTransferData(foundFlavor.get(),
427+ wrapper, length);
428+ }
429+
430+ if (data)
431+ nsMemory::Free(data);
432+
433+ return NS_OK;
434+}
435+
436+NS_IMETHODIMP
437+nsClipboard::EmptyClipboard(PRInt32 aWhichClipboard)
438+{
439+ if (aWhichClipboard == kSelectionClipboard) {
440+ if (mSelectionOwner) {
441+ mSelectionOwner->LosingOwnership(mSelectionTransferable);
442+ mSelectionOwner = nsnull;
443+ }
444+ mSelectionTransferable = nsnull;
445+ }
446+ else {
447+ if (mGlobalOwner) {
448+ mGlobalOwner->LosingOwnership(mGlobalTransferable);
449+ mGlobalOwner = nsnull;
450+ }
451+ mGlobalTransferable = nsnull;
452+ }
453+
454+ return NS_OK;
455+}
456+
457+NS_IMETHODIMP
458+nsClipboard::HasDataMatchingFlavors(const char** aFlavorList, PRUint32 aLength,
459+ PRInt32 aWhichClipboard, PRBool *_retval)
460+{
461+ if (!aFlavorList || !_retval)
462+ return NS_ERROR_NULL_POINTER;
463+
464+ *_retval = PR_FALSE;
465+
466+ GtkSelectionData *selection_data =
467+ GetTargets(GetSelectionAtom(aWhichClipboard));
468+ if (!selection_data)
469+ return NS_OK;
470+
471+ gint n_targets = 0;
472+ GdkAtom *targets = NULL;
473+
474+ if (!gtk_selection_data_get_targets(selection_data,
475+ &targets, &n_targets) ||
476+ !n_targets)
477+ return NS_OK;
478+
479+ // Walk through the provided types and try to match it to a
480+ // provided type.
481+ for (PRUint32 i = 0; i < aLength && !*_retval; i++) {
482+ // We special case text/unicode here.
483+ if (!strcmp(aFlavorList[i], kUnicodeMime) &&
484+ gtk_selection_data_targets_include_text(selection_data)) {
485+ *_retval = PR_TRUE;
486+ break;
487+ }
488+
489+ for (PRInt32 j = 0; j < n_targets; j++) {
490+ gchar *atom_name = gdk_atom_name(targets[j]);
491+ if (!strcmp(atom_name, aFlavorList[i]))
492+ *_retval = PR_TRUE;
493+
494+ // X clipboard wants image/jpeg, not image/jpg
495+ if (!strcmp(aFlavorList[i], kJPEGImageMime) && !strcmp(atom_name, "image/jpeg"))
496+ *_retval = PR_TRUE;
497+
498+ g_free(atom_name);
499+
500+ if (*_retval)
501+ break;
502+ }
503+ }
504+ gtk_selection_data_free(selection_data);
505+ g_free(targets);
506+
507+ return NS_OK;
508+}
509+
510+NS_IMETHODIMP
511+nsClipboard::SupportsSelectionClipboard(PRBool *_retval)
512+{
513+ *_retval = PR_TRUE; // yeah, unix supports the selection clipboard
514+ return NS_OK;
515+}
516+
517+/* static */
518+GdkAtom
519+nsClipboard::GetSelectionAtom(PRInt32 aWhichClipboard)
520+{
521+ if (aWhichClipboard == kGlobalClipboard)
522+ return GDK_SELECTION_CLIPBOARD;
523+
524+ return GDK_SELECTION_PRIMARY;
525+}
526+
527+/* static */
528+GtkSelectionData *
529+nsClipboard::GetTargets(GdkAtom aWhichClipboard)
530+{
531+ GtkClipboard *clipboard = gtk_clipboard_get(aWhichClipboard);
532+ return wait_for_contents(clipboard, gdk_atom_intern("TARGETS", FALSE));
533+}
534+
535+nsITransferable *
536+nsClipboard::GetTransferable(PRInt32 aWhichClipboard)
537+{
538+ nsITransferable *retval;
539+
540+ if (aWhichClipboard == kSelectionClipboard)
541+ retval = mSelectionTransferable.get();
542+ else
543+ retval = mGlobalTransferable.get();
544+
545+ return retval;
546+}
547+
548+void
549+nsClipboard::AddTarget(GdkAtom aName, GdkAtom aClipboard)
550+{
551+ gtk_selection_add_target(mWidget, aClipboard, aName, 0);
552+}
553+
554+void
555+nsClipboard::SelectionGetEvent (GtkWidget *aWidget,
556+ GtkSelectionData *aSelectionData,
557+ guint aTime)
558+{
559+ // Someone has asked us to hand them something. The first thing
560+ // that we want to do is see if that something includes text. If
561+ // it does, try to give it text/unicode after converting it to
562+ // utf-8.
563+
564+ PRInt32 whichClipboard;
565+
566+ // which clipboard?
567+ if (aSelectionData->selection == GDK_SELECTION_PRIMARY)
568+ whichClipboard = kSelectionClipboard;
569+ else if (aSelectionData->selection == GDK_SELECTION_CLIPBOARD)
570+ whichClipboard = kGlobalClipboard;
571+ else
572+ return; // THAT AIN'T NO CLIPBOARD I EVER HEARD OF
573+
574+ nsCOMPtr<nsITransferable> trans = GetTransferable(whichClipboard);
575+
576+ nsresult rv;
577+ nsCOMPtr<nsISupports> item;
578+ PRUint32 len;
579+
580+ // Check to see if the selection data includes any of the string
581+ // types that we support.
582+ if (aSelectionData->target == gdk_atom_intern ("STRING", FALSE) ||
583+ aSelectionData->target == gdk_atom_intern ("TEXT", FALSE) ||
584+ aSelectionData->target == gdk_atom_intern ("COMPOUND_TEXT", FALSE) ||
585+ aSelectionData->target == gdk_atom_intern ("UTF8_STRING", FALSE)) {
586+ // Try to convert our internal type into a text string. Get
587+ // the transferable for this clipboard and try to get the
588+ // text/unicode type for it.
589+ rv = trans->GetTransferData("text/unicode", getter_AddRefs(item),
590+ &len);
591+ if (!item || NS_FAILED(rv))
592+ return;
593+
594+ nsCOMPtr<nsISupportsString> wideString;
595+ wideString = do_QueryInterface(item);
596+ if (!wideString)
597+ return;
598+
599+ nsAutoString ucs2string;
600+ wideString->GetData(ucs2string);
601+ char *utf8string = ToNewUTF8String(ucs2string);
602+ if (!utf8string)
603+ return;
604+
605+ gtk_selection_data_set_text (aSelectionData, utf8string,
606+ strlen(utf8string));
607+
608+ nsMemory::Free(utf8string);
609+ return;
610+ }
611+
612+ // Try to match up the selection data target to something our
613+ // transferable provides.
614+ gchar *target_name = gdk_atom_name(aSelectionData->target);
615+ if (!target_name)
616+ return;
617+
618+ rv = trans->GetTransferData(target_name, getter_AddRefs(item), &len);
619+ // nothing found?
620+ if (!item || NS_FAILED(rv)) {
621+ g_free(target_name);
622+ return;
623+ }
624+
625+ void *primitive_data = nsnull;
626+ nsPrimitiveHelpers::CreateDataFromPrimitive(target_name, item,
627+ &primitive_data, len);
628+
629+ if (primitive_data) {
630+ // Check to see if the selection data is text/html
631+ if (aSelectionData->target == gdk_atom_intern (kHTMLMime, FALSE)) {
632+ /*
633+ * "text/html" can be encoded UCS2. It is recommended that
634+ * documents transmitted as UCS2 always begin with a ZERO-WIDTH
635+ * NON-BREAKING SPACE character (hexadecimal FEFF, also called
636+ * Byte Order Mark (BOM)). Adding BOM can help other app to
637+ * detect mozilla use UCS2 encoding when copy-paste.
638+ */
639+ guchar *buffer = (guchar *)
640+ nsMemory::Alloc((len * sizeof(guchar)) + sizeof(PRUnichar));
641+ if (!buffer)
642+ return;
643+ PRUnichar prefix = 0xFEFF;
644+ memcpy(buffer, &prefix, sizeof(prefix));
645+ memcpy(buffer + sizeof(prefix), primitive_data, len);
646+ nsMemory::Free((guchar *)primitive_data);
647+ primitive_data = (guchar *)buffer;
648+ len += sizeof(prefix);
649+ }
650+
651+ gtk_selection_data_set(aSelectionData, aSelectionData->target,
652+ 8, /* 8 bits in a unit */
653+ (const guchar *)primitive_data, len);
654+ nsMemory::Free(primitive_data);
655+ }
656+
657+ g_free(target_name);
658+
659+}
660+
661+void
662+nsClipboard::SelectionClearEvent (GtkWidget *aWidget,
663+ GdkEventSelection *aEvent)
664+{
665+ PRInt32 whichClipboard;
666+
667+ // which clipboard?
668+ if (aEvent->selection == GDK_SELECTION_PRIMARY)
669+ whichClipboard = kSelectionClipboard;
670+ else if (aEvent->selection == GDK_SELECTION_CLIPBOARD)
671+ whichClipboard = kGlobalClipboard;
672+ else
673+ return; // THAT AIN'T NO CLIPBOARD I EVER HEARD OF
674+
675+ EmptyClipboard(whichClipboard);
676+}
677+
678+void
679+invisible_selection_get_cb (GtkWidget *aWidget,
680+ GtkSelectionData *aSelectionData,
681+ guint aTime,
682+ guint aInfo,
683+ nsClipboard *aClipboard)
684+{
685+ aClipboard->SelectionGetEvent(aWidget, aSelectionData, aTime);
686+}
687+
688+gboolean
689+selection_clear_event_cb (GtkWidget *aWidget,
690+ GdkEventSelection *aEvent,
691+ nsClipboard *aClipboard)
692+{
693+ aClipboard->SelectionClearEvent(aWidget, aEvent);
694+ return TRUE;
695+}
696+
697+/*
698+ * when copy-paste, mozilla wants data encoded using UCS2,
699+ * other app such as StarOffice use "text/html"(RFC2854).
700+ * This function convert data(got from GTK clipboard)
701+ * to data mozilla wanted.
702+ *
703+ * data from GTK clipboard can be 3 forms:
704+ * 1. From current mozilla
705+ * "text/html", charset = utf-16
706+ * 2. From old version mozilla or mozilla-based app
707+ * content("body" only), charset = utf-16
708+ * 3. From other app who use "text/html" when copy-paste
709+ * "text/html", has "charset" info
710+ *
711+ * data : got from GTK clipboard
712+ * dataLength: got from GTK clipboard
713+ * body : pass to Mozilla
714+ * bodyLength: pass to Mozilla
715+ */
716+void ConvertHTMLtoUCS2(guchar * data, PRInt32 dataLength,
717+ PRUnichar** unicodeData, PRInt32& outUnicodeLen)
718+{
719+ nsCAutoString charset;
720+ GetHTMLCharset(data, dataLength, charset);// get charset of HTML
721+ if (charset.EqualsLiteral("UTF-16")) {//current mozilla
722+ outUnicodeLen = (dataLength / 2) - 1;
723+ *unicodeData = reinterpret_cast<PRUnichar*>
724+ (nsMemory::Alloc((outUnicodeLen + sizeof('\0')) *
725+ sizeof(PRUnichar)));
726+ if (*unicodeData) {
727+ memcpy(*unicodeData, data + sizeof(PRUnichar),
728+ outUnicodeLen * sizeof(PRUnichar));
729+ (*unicodeData)[outUnicodeLen] = '\0';
730+ }
731+ } else if (charset.EqualsLiteral("UNKNOWN")) {
732+ outUnicodeLen = 0;
733+ return;
734+ } else {
735+ // app which use "text/html" to copy&paste
736+ nsCOMPtr<nsIUnicodeDecoder> decoder;
737+ nsresult rv;
738+ // get the decoder
739+ nsCOMPtr<nsICharsetConverterManager> ccm =
740+ do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
741+ if (NS_FAILED(rv)) {
742+#ifdef DEBUG_CLIPBOARD
743+ g_print(" can't get CHARSET CONVERTER MANAGER service\n");
744+#endif
745+ outUnicodeLen = 0;
746+ return;
747+ }
748+ rv = ccm->GetUnicodeDecoder(charset.get(), getter_AddRefs(decoder));
749+ if (NS_FAILED(rv)) {
750+#ifdef DEBUG_CLIPBOARD
751+ g_print(" get unicode decoder error\n");
752+#endif
753+ outUnicodeLen = 0;
754+ return;
755+ }
756+ // converting
757+ decoder->GetMaxLength((const char *)data, dataLength, &outUnicodeLen);
758+ // |outUnicodeLen| is number of chars
759+ if (outUnicodeLen) {
760+ *unicodeData = reinterpret_cast<PRUnichar*>
761+ (nsMemory::Alloc((outUnicodeLen + sizeof('\0')) *
762+ sizeof(PRUnichar)));
763+ if (*unicodeData) {
764+ PRInt32 numberTmp = dataLength;
765+ decoder->Convert((const char *)data, &numberTmp,
766+ *unicodeData, &outUnicodeLen);
767+#ifdef DEBUG_CLIPBOARD
768+ if (numberTmp != dataLength)
769+ printf("didn't consume all the bytes\n");
770+#endif
771+ // null terminate. Convert() doesn't do it for us
772+ (*unicodeData)[outUnicodeLen] = '\0';
773+ }
774+ } // if valid length
775+ }
776+}
777+
778+/*
779+ * get "charset" information from clipboard data
780+ * return value can be:
781+ * 1. "UTF-16": mozilla or "text/html" with "charset=utf-16"
782+ * 2. "UNKNOWN": mozilla can't detect what encode it use
783+ * 3. other: "text/html" with other charset than utf-16
784+ */
785+void GetHTMLCharset(guchar * data, PRInt32 dataLength, nsCString& str)
786+{
787+ // if detect "FFFE" or "FEFF", assume UTF-16
788+ PRUnichar* beginChar = (PRUnichar*)data;
789+ if ((beginChar[0] == 0xFFFE) || (beginChar[0] == 0xFEFF)) {
790+ str.AssignLiteral("UTF-16");
791+ return;
792+ }
793+ // no "FFFE" and "FEFF", assume ASCII first to find "charset" info
794+ const nsDependentCString htmlStr((const char *)data, dataLength);
795+ nsACString::const_iterator start, end;
796+ htmlStr.BeginReading(start);
797+ htmlStr.EndReading(end);
798+ nsACString::const_iterator valueStart(start), valueEnd(start);
799+
800+ if (CaseInsensitiveFindInReadable(
801+ NS_LITERAL_CSTRING("CONTENT=\"text/html;"),
802+ start, end)) {
803+ start = end;
804+ htmlStr.EndReading(end);
805+
806+ if (CaseInsensitiveFindInReadable(
807+ NS_LITERAL_CSTRING("charset="),
808+ start, end)) {
809+ valueStart = end;
810+ start = end;
811+ htmlStr.EndReading(end);
812+
813+ if (FindCharInReadable('"', start, end))
814+ valueEnd = start;
815+ }
816+ }
817+ // find "charset" in HTML
818+ if (valueStart != valueEnd) {
819+ str = Substring(valueStart, valueEnd);
820+ ToUpperCase(str);
821+#ifdef DEBUG_CLIPBOARD
822+ printf("Charset of HTML = %s\n", charsetUpperStr.get());
823+#endif
824+ return;
825+ }
826+ str.AssignLiteral("UNKNOWN");
827+}
828+
829+static void
830+DispatchSelectionNotifyEvent(GtkWidget *widget, XEvent *xevent)
831+{
832+ GdkEvent event;
833+ event.selection.type = GDK_SELECTION_NOTIFY;
834+ event.selection.window = widget->window;
835+ event.selection.selection = gdk_x11_xatom_to_atom(xevent->xselection.selection);
836+ event.selection.target = gdk_x11_xatom_to_atom(xevent->xselection.target);
837+ event.selection.property = gdk_x11_xatom_to_atom(xevent->xselection.property);
838+ event.selection.time = xevent->xselection.time;
839+
840+ gtk_widget_event(widget, &event);
841+}
842+
843+static void
844+DispatchPropertyNotifyEvent(GtkWidget *widget, XEvent *xevent)
845+{
846+ if (((GdkWindowObject *) widget->window)->event_mask & GDK_PROPERTY_CHANGE_MASK) {
847+ GdkEvent event;
848+ event.property.type = GDK_PROPERTY_NOTIFY;
849+ event.property.window = widget->window;
850+ event.property.atom = gdk_x11_xatom_to_atom(xevent->xproperty.atom);
851+ event.property.time = xevent->xproperty.time;
852+ event.property.state = xevent->xproperty.state;
853+
854+ gtk_widget_event(widget, &event);
855+ }
856+}
857+
858+struct checkEventContext
859+{
860+ GtkWidget *cbWidget;
861+ Atom selAtom;
862+};
863+
864+static Bool
865+checkEventProc(Display *display, XEvent *event, XPointer arg)
866+{
867+ checkEventContext *context = (checkEventContext *) arg;
868+
869+ if (event->xany.type == SelectionNotify ||
870+ (event->xany.type == PropertyNotify &&
871+ event->xproperty.atom == context->selAtom)) {
872+
873+ GdkWindow *cbWindow = gdk_window_lookup(event->xany.window);
874+ if (cbWindow) {
875+ GtkWidget *cbWidget = NULL;
876+ gdk_window_get_user_data(cbWindow, (gpointer *)&cbWidget);
877+ if (cbWidget && GTK_IS_WIDGET(cbWidget)) {
878+ context->cbWidget = cbWidget;
879+ return True;
880+ }
881+ }
882+ }
883+
884+ return False;
885+}
886+
887+// Idle timeout for receiving selection and property notify events (microsec)
888+static const int kClipboardTimeout = 500000;
889+
890+static void
891+wait_for_retrieval(GtkClipboard *clipboard, retrieval_context *r_context)
892+{
893+ if (r_context->completed) // the request completed synchronously
894+ return;
895+
896+ Display *xDisplay = GDK_DISPLAY();
897+ checkEventContext context;
898+ context.cbWidget = NULL;
899+ context.selAtom = gdk_x11_atom_to_xatom(gdk_atom_intern("GDK_SELECTION",
900+ FALSE));
901+
902+ // Send X events which are relevant to the ongoing selection retrieval
903+ // to the clipboard widget. Wait until either the operation completes, or
904+ // we hit our timeout. All other X events remain queued.
905+
906+ int select_result;
907+
908+#ifdef POLL_WITH_XCONNECTIONNUMBER
909+ struct pollfd fds[1];
910+ fds[0].fd = XConnectionNumber(xDisplay);
911+ fds[0].events = POLLIN;
912+#else
913+ int cnumber = ConnectionNumber(xDisplay);
914+ fd_set select_set;
915+ FD_ZERO(&select_set);
916+ FD_SET(cnumber, &select_set);
917+ ++cnumber;
918+ struct timeval tv;
919+#endif
920+
921+ do {
922+ XEvent xevent;
923+
924+ while (XCheckIfEvent(xDisplay, &xevent, checkEventProc,
925+ (XPointer) &context)) {
926+
927+ if (xevent.xany.type == SelectionNotify)
928+ DispatchSelectionNotifyEvent(context.cbWidget, &xevent);
929+ else
930+ DispatchPropertyNotifyEvent(context.cbWidget, &xevent);
931+
932+ if (r_context->completed)
933+ return;
934+ }
935+
936+#ifdef POLL_WITH_XCONNECTIONNUMBER
937+ select_result = poll(fds, 1, kClipboardTimeout / 1000);
938+#else
939+ tv.tv_sec = 0;
940+ tv.tv_usec = kClipboardTimeout;
941+ select_result = select(cnumber, &select_set, NULL, NULL, &tv);
942+#endif
943+ } while (select_result == 1);
944+
945+#ifdef DEBUG_CLIPBOARD
946+ printf("exceeded clipboard timeout\n");
947+#endif
948+}
949+
950+static void
951+clipboard_contents_received(GtkClipboard *clipboard,
952+ GtkSelectionData *selection_data,
953+ gpointer data)
954+{
955+ retrieval_context *context = static_cast<retrieval_context *>(data);
956+ context->completed = PR_TRUE;
957+
958+ if (selection_data->length >= 0)
959+ context->data = gtk_selection_data_copy(selection_data);
960+}
961+
962+
963+static GtkSelectionData *
964+wait_for_contents(GtkClipboard *clipboard, GdkAtom target)
965+{
966+ retrieval_context context;
967+ gtk_clipboard_request_contents(clipboard, target,
968+ clipboard_contents_received,
969+ &context);
970+
971+ wait_for_retrieval(clipboard, &context);
972+ return static_cast<GtkSelectionData *>(context.data);
973+}
974+
975+static void
976+clipboard_text_received(GtkClipboard *clipboard,
977+ const gchar *text,
978+ gpointer data)
979+{
980+ retrieval_context *context = static_cast<retrieval_context *>(data);
981+ context->completed = PR_TRUE;
982+ context->data = g_strdup(text);
983+}
984+
985+static gchar *
986+wait_for_text(GtkClipboard *clipboard)
987+{
988+ retrieval_context context;
989+ gtk_clipboard_request_text(clipboard, clipboard_text_received, &context);
990+
991+ wait_for_retrieval(clipboard, &context);
992+ return static_cast<gchar *>(context.data);
993+}
994Index: offscreen/widget/src/headless/nsClipboard.h
995===================================================================
996--- /dev/null 1970-01-01 00:00:00.000000000 +0000
997+++ offscreen/widget/src/headless/nsClipboard.h 2009-06-12 14:14:05.000000000 +0100
998@@ -0,0 +1,93 @@
999+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
1000+/* vim:expandtab:shiftwidth=4:tabstop=4:
1001+ */
1002+/* ***** BEGIN LICENSE BLOCK *****
1003+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1004+ *
1005+ * The contents of this file are subject to the Mozilla Public License Version
1006+ * 1.1 (the "License"); you may not use this file except in compliance with
1007+ * the License. You may obtain a copy of the License at
1008+ * http://www.mozilla.org/MPL/
1009+ *
1010+ * Software distributed under the License is distributed on an "AS IS" basis,
1011+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1012+ * for the specific language governing rights and limitations under the
1013+ * License.
1014+ *
1015+ * The Original Code is mozilla.org code.
1016+ *
1017+ * The Initial Developer of the Original Code is Christopher Blizzard
1018+ * <blizzard@mozilla.org>. Portions created by the Initial Developer
1019+ * are Copyright (C) 2001 the Initial Developer. All Rights Reserved.
1020+ *
1021+ * Contributor(s):
1022+ *
1023+ * Alternatively, the contents of this file may be used under the terms of
1024+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1025+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1026+ * in which case the provisions of the GPL or the LGPL are applicable instead
1027+ * of those above. If you wish to allow use of your version of this file only
1028+ * under the terms of either the GPL or the LGPL, and not to allow others to
1029+ * use your version of this file under the terms of the MPL, indicate your
1030+ * decision by deleting the provisions above and replace them with the notice
1031+ * and other provisions required by the GPL or the LGPL. If you do not delete
1032+ * the provisions above, a recipient may use your version of this file under
1033+ * the terms of any one of the MPL, the GPL or the LGPL.
1034+ *
1035+ * ***** END LICENSE BLOCK ***** */
1036+
1037+#ifndef __nsClipboard_h_
1038+#define __nsClipboard_h_
1039+
1040+#include "nsIClipboard.h"
1041+#include "nsClipboardPrivacyHandler.h"
1042+#include "nsAutoPtr.h"
1043+#include <gtk/gtk.h>
1044+
1045+class nsClipboard : public nsIClipboard
1046+{
1047+public:
1048+ nsClipboard();
1049+ virtual ~nsClipboard();
1050+
1051+ NS_DECL_ISUPPORTS
1052+
1053+ NS_DECL_NSICLIPBOARD
1054+
1055+ // Make sure we are initialized, called from the factory
1056+ // constructor
1057+ nsresult Init (void);
1058+ // Someone requested the selection from the hidden widget
1059+ void SelectionGetEvent (GtkWidget *aWidget,
1060+ GtkSelectionData *aSelectionData,
1061+ guint aTime);
1062+ void SelectionClearEvent (GtkWidget *aWidget,
1063+ GdkEventSelection *aEvent);
1064+
1065+
1066+private:
1067+ // Utility methods
1068+ static GdkAtom GetSelectionAtom (PRInt32 aWhichClipboard);
1069+ static GtkSelectionData *GetTargets (GdkAtom aWhichClipboard);
1070+
1071+ // Get our hands on the correct transferable, given a specific
1072+ // clipboard
1073+ nsITransferable *GetTransferable (PRInt32 aWhichClipboard);
1074+
1075+ // Add a target type to the hidden widget
1076+ void AddTarget (GdkAtom aName,
1077+ GdkAtom aClipboard);
1078+
1079+ // The hidden widget where we do all of our operations
1080+ GtkWidget *mWidget;
1081+ // Hang on to our owners and transferables so we can transfer data
1082+ // when asked.
1083+ nsCOMPtr<nsIClipboardOwner> mSelectionOwner;
1084+ nsCOMPtr<nsIClipboardOwner> mGlobalOwner;
1085+ nsCOMPtr<nsITransferable> mSelectionTransferable;
1086+ nsCOMPtr<nsITransferable> mGlobalTransferable;
1087+ nsRefPtr<nsClipboardPrivacyHandler> mPrivacyHandler;
1088+
1089+};
1090+
1091+#endif /* __nsClipboard_h_ */
1092Index: offscreen/widget/src/headless/nsIImageToPixbuf.h
1093===================================================================
1094--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1095+++ offscreen/widget/src/headless/nsIImageToPixbuf.h 2009-06-12 14:14:05.000000000 +0100
1096@@ -0,0 +1,62 @@
1097+/* ***** BEGIN LICENSE BLOCK *****
1098+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1099+ *
1100+ * The contents of this file are subject to the Mozilla Public License Version
1101+ * 1.1 (the "License"); you may not use this file except in compliance with
1102+ * the License. You may obtain a copy of the License at
1103+ * http://www.mozilla.org/MPL/
1104+ *
1105+ * Software distributed under the License is distributed on an "AS IS" basis,
1106+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1107+ * for the specific language governing rights and limitations under the
1108+ * License.
1109+ *
1110+ * The Original Code is mozilla.org widget code.
1111+ *
1112+ * The Initial Developer of the Original Code is
1113+ * Christian Biesinger <cbiesinger@web.de>.
1114+ * Portions created by the Initial Developer are Copyright (C) 2006
1115+ * the Initial Developer. All Rights Reserved.
1116+ *
1117+ * Contributor(s):
1118+ *
1119+ * Alternatively, the contents of this file may be used under the terms of
1120+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1121+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1122+ * in which case the provisions of the GPL or the LGPL are applicable instead
1123+ * of those above. If you wish to allow use of your version of this file only
1124+ * under the terms of either the GPL or the LGPL, and not to allow others to
1125+ * use your version of this file under the terms of the MPL, indicate your
1126+ * decision by deleting the provisions above and replace them with the notice
1127+ * and other provisions required by the GPL or the LGPL. If you do not delete
1128+ * the provisions above, a recipient may use your version of this file under
1129+ * the terms of any one of the MPL, the GPL or the LGPL.
1130+ *
1131+ * ***** END LICENSE BLOCK ***** */
1132+
1133+#ifndef NSIIMAGETOPIXBUF_H_
1134+#define NSIIMAGETOPIXBUF_H_
1135+
1136+#include "nsISupports.h"
1137+
1138+// dfa4ac93-83f2-4ab8-9b2a-0ff7022aebe2
1139+#define NSIIMAGETOPIXBUF_IID \
1140+{ 0xdfa4ac93, 0x83f2, 0x4ab8, \
1141+ { 0x9b, 0x2a, 0x0f, 0xf7, 0x02, 0x2a, 0xeb, 0xe2 } }
1142+
1143+class nsIImage;
1144+typedef struct _GdkPixbuf GdkPixbuf;
1145+
1146+/**
1147+ * An interface that allows converting an nsIImage to a GdkPixbuf*.
1148+ */
1149+class nsIImageToPixbuf : public nsISupports {
1150+ public:
1151+ NS_DECLARE_STATIC_IID_ACCESSOR(NSIIMAGETOPIXBUF_IID)
1152+
1153+ NS_IMETHOD_(GdkPixbuf*) ConvertImageToPixbuf(nsIImage* aImage) = 0;
1154+};
1155+
1156+NS_DEFINE_STATIC_IID_ACCESSOR(nsIImageToPixbuf, NSIIMAGETOPIXBUF_IID)
1157+
1158+#endif
1159Index: offscreen/widget/src/headless/nsImageToPixbuf.cpp
1160===================================================================
1161--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1162+++ offscreen/widget/src/headless/nsImageToPixbuf.cpp 2009-06-12 14:14:05.000000000 +0100
1163@@ -0,0 +1,196 @@
1164+/* vim:set sw=4 sts=4 et cin: */
1165+/* ***** BEGIN LICENSE BLOCK *****
1166+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1167+ *
1168+ * The contents of this file are subject to the Mozilla Public License Version
1169+ * 1.1 (the "License"); you may not use this file except in compliance with
1170+ * the License. You may obtain a copy of the License at
1171+ * http://www.mozilla.org/MPL/
1172+ *
1173+ * Software distributed under the License is distributed on an "AS IS" basis,
1174+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1175+ * for the specific language governing rights and limitations under the
1176+ * License.
1177+ *
1178+ * The Original Code is mozilla.org widget code.
1179+ *
1180+ * The Initial Developer of the Original Code is
1181+ * Christian Biesinger <cbiesinger@web.de>.
1182+ * Portions created by the Initial Developer are Copyright (C) 2006
1183+ * the Initial Developer. All Rights Reserved.
1184+ *
1185+ * Contributor(s):
1186+ *
1187+ * Alternatively, the contents of this file may be used under the terms of
1188+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1189+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1190+ * in which case the provisions of the GPL or the LGPL are applicable instead
1191+ * of those above. If you wish to allow use of your version of this file only
1192+ * under the terms of either the GPL or the LGPL, and not to allow others to
1193+ * use your version of this file under the terms of the MPL, indicate your
1194+ * decision by deleting the provisions above and replace them with the notice
1195+ * and other provisions required by the GPL or the LGPL. If you do not delete
1196+ * the provisions above, a recipient may use your version of this file under
1197+ * the terms of any one of the MPL, the GPL or the LGPL.
1198+ *
1199+ * ***** END LICENSE BLOCK ***** */
1200+
1201+#include <gdk-pixbuf/gdk-pixbuf.h>
1202+
1203+#include "gfxASurface.h"
1204+#include "gfxImageSurface.h"
1205+#include "gfxContext.h"
1206+
1207+#include "nsIImage.h"
1208+
1209+#include "nsAutoPtr.h"
1210+
1211+#include "nsImageToPixbuf.h"
1212+
1213+NS_IMPL_ISUPPORTS1(nsImageToPixbuf, nsIImageToPixbuf)
1214+
1215+inline unsigned char
1216+unpremultiply (unsigned char color,
1217+ unsigned char alpha)
1218+{
1219+ if (alpha == 0)
1220+ return 0;
1221+ // plus alpha/2 to round instead of truncate
1222+ return (color * 255 + alpha / 2) / alpha;
1223+}
1224+
1225+NS_IMETHODIMP_(GdkPixbuf*)
1226+nsImageToPixbuf::ConvertImageToPixbuf(nsIImage* aImage)
1227+{
1228+ return ImageToPixbuf(aImage);
1229+}
1230+
1231+GdkPixbuf*
1232+nsImageToPixbuf::ImageToPixbuf(nsIImage* aImage)
1233+{
1234+ PRInt32 width = aImage->GetWidth(),
1235+ height = aImage->GetHeight();
1236+
1237+ nsRefPtr<gfxPattern> pattern;
1238+ aImage->GetPattern(getter_AddRefs(pattern));
1239+
1240+ return PatternToPixbuf(pattern, width, height);
1241+}
1242+
1243+GdkPixbuf*
1244+nsImageToPixbuf::ImgSurfaceToPixbuf(gfxImageSurface* aImgSurface, PRInt32 aWidth, PRInt32 aHeight)
1245+{
1246+ GdkPixbuf* pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, PR_TRUE, 8,
1247+ aWidth, aHeight);
1248+ if (!pixbuf)
1249+ return nsnull;
1250+
1251+ PRUint32 rowstride = gdk_pixbuf_get_rowstride (pixbuf);
1252+ guchar* pixels = gdk_pixbuf_get_pixels (pixbuf);
1253+
1254+ long cairoStride = aImgSurface->Stride();
1255+ unsigned char* cairoData = aImgSurface->Data();
1256+
1257+ gfxASurface::gfxImageFormat format = aImgSurface->Format();
1258+
1259+ for (PRInt32 row = 0; row < aHeight; ++row) {
1260+ for (PRInt32 col = 0; col < aWidth; ++col) {
1261+ guchar* pixel = pixels + row * rowstride + 4 * col;
1262+
1263+ PRUint32* cairoPixel = reinterpret_cast<PRUint32*>
1264+ ((cairoData + row * cairoStride + 4 * col));
1265+
1266+ if (format == gfxASurface::ImageFormatARGB32) {
1267+ const PRUint8 a = (*cairoPixel >> 24) & 0xFF;
1268+ const PRUint8 r = unpremultiply((*cairoPixel >> 16) & 0xFF, a);
1269+ const PRUint8 g = unpremultiply((*cairoPixel >> 8) & 0xFF, a);
1270+ const PRUint8 b = unpremultiply((*cairoPixel >> 0) & 0xFF, a);
1271+
1272+ *pixel++ = r;
1273+ *pixel++ = g;
1274+ *pixel++ = b;
1275+ *pixel++ = a;
1276+ } else {
1277+ NS_ASSERTION(format == gfxASurface::ImageFormatRGB24,
1278+ "unexpected format");
1279+ const PRUint8 r = (*cairoPixel >> 16) & 0xFF;
1280+ const PRUint8 g = (*cairoPixel >> 8) & 0xFF;
1281+ const PRUint8 b = (*cairoPixel >> 0) & 0xFF;
1282+
1283+ *pixel++ = r;
1284+ *pixel++ = g;
1285+ *pixel++ = b;
1286+ *pixel++ = 0xFF; // A
1287+ }
1288+ }
1289+ }
1290+
1291+ return pixbuf;
1292+}
1293+
1294+GdkPixbuf*
1295+nsImageToPixbuf::SurfaceToPixbuf(gfxASurface* aSurface, PRInt32 aWidth, PRInt32 aHeight)
1296+{
1297+ if (aSurface->CairoStatus()) {
1298+ NS_ERROR("invalid surface");
1299+ return nsnull;
1300+ }
1301+
1302+ nsRefPtr<gfxImageSurface> imgSurface;
1303+ if (aSurface->GetType() == gfxASurface::SurfaceTypeImage) {
1304+ imgSurface = static_cast<gfxImageSurface*>
1305+ (static_cast<gfxASurface*>(aSurface));
1306+ } else {
1307+ imgSurface = new gfxImageSurface(gfxIntSize(aWidth, aHeight),
1308+ gfxImageSurface::ImageFormatARGB32);
1309+
1310+ if (!imgSurface)
1311+ return nsnull;
1312+
1313+ nsRefPtr<gfxContext> context = new gfxContext(imgSurface);
1314+ if (!context)
1315+ return nsnull;
1316+
1317+ context->SetOperator(gfxContext::OPERATOR_SOURCE);
1318+ context->SetSource(aSurface);
1319+ context->Paint();
1320+ }
1321+
1322+ return ImgSurfaceToPixbuf(imgSurface, aWidth, aHeight);
1323+}
1324+
1325+GdkPixbuf*
1326+nsImageToPixbuf::PatternToPixbuf(gfxPattern* aPattern, PRInt32 aWidth, PRInt32 aHeight)
1327+{
1328+ if (aPattern->CairoStatus()) {
1329+ NS_ERROR("invalid pattern");
1330+ return nsnull;
1331+ }
1332+
1333+ nsRefPtr<gfxImageSurface> imgSurface;
1334+ if (aPattern->GetType() == gfxPattern::PATTERN_SURFACE) {
1335+ nsRefPtr<gfxASurface> surface = aPattern->GetSurface();
1336+ if (surface->GetType() == gfxASurface::SurfaceTypeImage) {
1337+ imgSurface = static_cast<gfxImageSurface*>
1338+ (static_cast<gfxASurface*>(surface.get()));
1339+ }
1340+ }
1341+
1342+ if (!imgSurface) {
1343+ imgSurface = new gfxImageSurface(gfxIntSize(aWidth, aHeight),
1344+ gfxImageSurface::ImageFormatARGB32);
1345+
1346+ if (!imgSurface)
1347+ return nsnull;
1348+
1349+ nsRefPtr<gfxContext> context = new gfxContext(imgSurface);
1350+ if (!context)
1351+ return nsnull;
1352+
1353+ context->SetOperator(gfxContext::OPERATOR_SOURCE);
1354+ context->SetPattern(aPattern);
1355+ context->Paint();
1356+ }
1357+
1358+ return ImgSurfaceToPixbuf(imgSurface, aWidth, aHeight);
1359+}
1360Index: offscreen/widget/src/headless/nsImageToPixbuf.h
1361===================================================================
1362--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1363+++ offscreen/widget/src/headless/nsImageToPixbuf.h 2009-06-12 14:14:05.000000000 +0100
1364@@ -0,0 +1,71 @@
1365+/* vim:set sw=4 sts=4 et cin: */
1366+/* ***** BEGIN LICENSE BLOCK *****
1367+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1368+ *
1369+ * The contents of this file are subject to the Mozilla Public License Version
1370+ * 1.1 (the "License"); you may not use this file except in compliance with
1371+ * the License. You may obtain a copy of the License at
1372+ * http://www.mozilla.org/MPL/
1373+ *
1374+ * Software distributed under the License is distributed on an "AS IS" basis,
1375+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1376+ * for the specific language governing rights and limitations under the
1377+ * License.
1378+ *
1379+ * The Original Code is mozilla.org widget code.
1380+ *
1381+ * The Initial Developer of the Original Code is
1382+ * Christian Biesinger <cbiesinger@web.de>.
1383+ * Portions created by the Initial Developer are Copyright (C) 2006
1384+ * the Initial Developer. All Rights Reserved.
1385+ *
1386+ * Contributor(s):
1387+ *
1388+ * Alternatively, the contents of this file may be used under the terms of
1389+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1390+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1391+ * in which case the provisions of the GPL or the LGPL are applicable instead
1392+ * of those above. If you wish to allow use of your version of this file only
1393+ * under the terms of either the GPL or the LGPL, and not to allow others to
1394+ * use your version of this file under the terms of the MPL, indicate your
1395+ * decision by deleting the provisions above and replace them with the notice
1396+ * and other provisions required by the GPL or the LGPL. If you do not delete
1397+ * the provisions above, a recipient may use your version of this file under
1398+ * the terms of any one of the MPL, the GPL or the LGPL.
1399+ *
1400+ * ***** END LICENSE BLOCK ***** */
1401+
1402+#ifndef NSIMAGETOPIXBUF_H_
1403+#define NSIMAGETOPIXBUF_H_
1404+
1405+#include "nsIImageToPixbuf.h"
1406+
1407+class gfxASurface;
1408+class gfxPattern;
1409+class gfxImageSurface;
1410+
1411+class nsImageToPixbuf : public nsIImageToPixbuf {
1412+ public:
1413+ NS_DECL_ISUPPORTS
1414+ NS_IMETHOD_(GdkPixbuf*) ConvertImageToPixbuf(nsIImage* aImage);
1415+
1416+ // Friendlier version of ConvertImageToPixbuf for callers inside of
1417+ // widget
1418+ static GdkPixbuf* ImageToPixbuf(nsIImage* aImage);
1419+ static GdkPixbuf* SurfaceToPixbuf(gfxASurface* aSurface,
1420+ PRInt32 aWidth, PRInt32 aHeight);
1421+ static GdkPixbuf* PatternToPixbuf(gfxPattern* aPattern,
1422+ PRInt32 aWidth, PRInt32 aHeight);
1423+ private:
1424+ static GdkPixbuf* ImgSurfaceToPixbuf(gfxImageSurface* aImgSurface,
1425+ PRInt32 aWidth, PRInt32 aHeight);
1426+ ~nsImageToPixbuf() {}
1427+};
1428+
1429+
1430+// fc2389b8-c650-4093-9e42-b05e5f0685b7
1431+#define NS_IMAGE_TO_PIXBUF_CID \
1432+{ 0xfc2389b8, 0xc650, 0x4093, \
1433+ { 0x9e, 0x42, 0xb0, 0x5e, 0x5f, 0x06, 0x85, 0xb7 } }
1434+
1435+#endif
1436Index: offscreen/widget/src/headless/nsWidgetFactory.cpp
1437===================================================================
1438--- offscreen.orig/widget/src/headless/nsWidgetFactory.cpp 2009-06-12 14:08:56.000000000 +0100
1439+++ offscreen/widget/src/headless/nsWidgetFactory.cpp 2009-06-12 14:15:24.000000000 +0100
1440@@ -46,6 +46,10 @@
1441 #include "nsWindow.h"
1442 #include "nsTransferable.h"
1443 #include "nsHTMLFormatConverter.h"
1444+#ifdef MOZ_X11
1445+#include "nsClipboardHelper.h"
1446+#include "nsClipboard.h"
1447+#endif
1448 #include "nsSound.h"
1449 #include "nsBidiKeyboard.h"
1450 #include "nsScreenManagerHeadless.h"
1451@@ -66,6 +70,10 @@
1452 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
1453 NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
1454 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
1455+#ifdef MOZ_X11
1456+NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
1457+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsClipboard, Init)
1458+#endif
1459 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
1460 NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerHeadless)
1461 //NS_GENERIC_FACTORY_CONSTRUCTOR(nsImageToPixbuf)
1462@@ -142,6 +150,16 @@
1463 NS_TRANSFERABLE_CID,
1464 "@mozilla.org/widget/transferable;1",
1465 nsTransferableConstructor },
1466+#ifdef MOZ_X11
1467+ { "Gtk Clipboard",
1468+ NS_CLIPBOARD_CID,
1469+ "@mozilla.org/widget/clipboard;1",
1470+ nsClipboardConstructor },
1471+ { "Clipboard Helper",
1472+ NS_CLIPBOARDHELPER_CID,
1473+ "@mozilla.org/widget/clipboardhelper;1",
1474+ nsClipboardHelperConstructor },
1475+#endif
1476 { "HTML Format Converter",
1477 NS_HTMLFORMATCONVERTER_CID,
1478 "@mozilla.org/widget/htmlformatconverter;1",
diff --git a/meta/packages/mozilla-headless/mozilla-headless/autoconffix.patch b/meta/packages/mozilla-headless/mozilla-headless/autoconffix.patch
deleted file mode 100644
index 2874b0d832..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/autoconffix.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1Fixes to enable building with latest autoconf and automake
2
3RP 2/2/10
4
5Index: offscreen/js/ctypes/libffi/configure.ac
6===================================================================
7--- offscreen.orig/js/ctypes/libffi/configure.ac 2010-02-02 19:53:16.753906134 +0000
8+++ offscreen/js/ctypes/libffi/configure.ac 2010-02-02 19:53:21.895155509 +0000
9@@ -17,10 +17,10 @@
10 # the wrong, non-multilib-adjusted value will be used in multilibs.
11 # As a side effect, we have to subst CFLAGS ourselves.
12
13-m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
14+m4_rename_force([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
15 m4_define([_AC_ARG_VAR_PRECIOUS],[])
16 AC_PROG_CC
17-m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
18+m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
19
20 AC_SUBST(CFLAGS)
21
22Index: offscreen/modules/libpr0n/build/Makefile.in
23===================================================================
24--- offscreen.orig/modules/libpr0n/build/Makefile.in 2010-02-02 19:53:16.783906873 +0000
25+++ offscreen/modules/libpr0n/build/Makefile.in 2010-02-02 19:53:21.895155509 +0000
26@@ -92,6 +92,7 @@
27
28 export::
29 @{ \
30+ \
31 $(foreach d,$(filter-out icon,$(MOZ_IMG_DECODERS)), \
32 echo "#define IMG_BUILD_DECODER_${d}";) \
33 $(foreach d,$(MOZ_IMG_ENCODERS), \
34Index: offscreen/configure.in
35===================================================================
36--- offscreen.orig/configure.in 2010-02-02 19:53:28.493904163 +0000
37+++ offscreen/configure.in 2010-02-02 16:33:09.000000000 +0000
38@@ -3250,11 +3250,7 @@
39 dnl ========================================================
40 AC_CHECK_LIB(Xext, XShmCreateImage, _HAVE_XSHM_XEXT=1,,
41 $XLIBS $XEXT_LIBS)
42- AC_CHECK_HEADER(X11/extensions/XShm.h)
43- if test "$ac_cv_header_X11_extensions_XShm_h" = "yes" &&
44- test -n "$_HAVE_XSHM_XEXT"; then
45- AC_DEFINE(HAVE_XSHM)
46- fi
47+ AC_DEFINE(HAVE_XSHM)
48
49 dnl ========================================================
50 dnl = Check for XIE
51@@ -8120,15 +8116,7 @@
52 fi # COMPILE_ENVIRONMENT
53
54 if test "$USE_FC_FREETYPE"; then
55- if test "$COMPILE_ENVIRONMENT"; then
56- _SAVE_CPPFLAGS="$CPPFLAGS"
57- CPPFLAGS="$CPPFLAGS $FT2_CFLAGS"
58- AC_CHECK_HEADERS(fontconfig/fcfreetype.h, ,
59- [AC_MSG_ERROR(Can't find header fontconfig/fcfreetype.h.)])
60- CPPFLAGS="$_SAVE_CPPFLAGS"
61- else
62 AC_DEFINE(HAVE_FONTCONFIG_FCFREETYPE_H)
63- fi
64 fi
65
66 dnl Set various defines and substitutions
diff --git a/meta/packages/mozilla-headless/mozilla-headless/buildfixhack.patch b/meta/packages/mozilla-headless/mozilla-headless/buildfixhack.patch
deleted file mode 100644
index 31fc40f28b..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/buildfixhack.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1diff -r ad8be5166ccd layout/generic/nsFrame.h
2--- a/layout/generic/nsFrame.h Tue Nov 17 19:24:56 2009 +0000
3+++ b/layout/generic/nsFrame.h Thu Nov 19 12:33:38 2009 +0000
4@@ -151,7 +151,7 @@
5 // Left undefined; nsFrame objects are never allocated from the heap.
6 void* operator new(size_t sz) CPP_THROW_NEW;
7
8-protected:
9+public:
10 // Overridden to prevent the global delete from being called, since
11 // the memory came out of an arena instead of the heap.
12 //
13
14
diff --git a/meta/packages/mozilla-headless/mozilla-headless/configurefix-1a622cb7c384.patch b/meta/packages/mozilla-headless/mozilla-headless/configurefix-1a622cb7c384.patch
deleted file mode 100644
index d31f91a42d..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/configurefix-1a622cb7c384.patch
+++ /dev/null
@@ -1,764 +0,0 @@
1Index: offscreen/configure.in
2===================================================================
3--- offscreen.orig/configure.in 2009-06-12 14:15:55.000000000 +0100
4+++ offscreen/configure.in 2009-06-12 14:15:55.000000000 +0100
5@@ -62,7 +62,6 @@
6
7 AC_PREREQ(2.13)
8 AC_INIT(config/config.mk)
9-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
10 AC_CANONICAL_SYSTEM
11 TARGET_CPU="${target_cpu}"
12 TARGET_VENDOR="${target_vendor}"
13@@ -103,7 +102,6 @@
14 _SUBDIR_HOST_CFLAGS="$HOST_CFLAGS"
15 _SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS"
16 _SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS"
17-_SUBDIR_CONFIG_ARGS="$ac_configure_args"
18
19 dnl Set the version number of the libs included with mozilla
20 dnl ========================================================
21@@ -135,6 +133,9 @@
22
23 MSMANIFEST_TOOL=
24
25+ac_cv_have_usable_wchar_v2=no
26+ac_cv_have_usable_wchar_option_v2=no
27+
28 dnl Set various checks
29 dnl ========================================================
30 MISSING_X=
31@@ -285,7 +286,7 @@
32 ;;
33 esac
34
35-if test -n "$CROSS_COMPILE" && test "$target" != "$host"; then
36+
37 echo "cross compiling from $host to $target"
38 cross_compiling=yes
39
40@@ -323,7 +324,7 @@
41
42 AC_MSG_CHECKING([whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
43 AC_TRY_COMPILE([], [return(0);],
44- [ac_cv_prog_hostcc_works=1 AC_MSG_RESULT([yes])],
45+ [ac_cv_prog_hostcc_works=1; AC_MSG_RESULT([yes])],
46 AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CC cannot create executables.]) )
47
48 CC="$HOST_CXX"
49@@ -331,7 +332,7 @@
50
51 AC_MSG_CHECKING([whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works])
52 AC_TRY_COMPILE([], [return(0);],
53- [ac_cv_prog_hostcxx_works=1 AC_MSG_RESULT([yes])],
54+ [ac_cv_prog_hostcxx_works=1; AC_MSG_RESULT([yes])],
55 AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CXX cannot create executables.]) )
56
57 CC=$_SAVE_CC
58@@ -352,7 +353,7 @@
59 ;;
60 esac
61
62- AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :)
63+ CC="${target_alias}-gcc"
64 unset ac_cv_prog_CC
65 AC_PROG_CC
66 AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", :)
67@@ -376,37 +377,6 @@
68 AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", :)
69 AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", :)
70 AC_DEFINE(CROSS_COMPILE)
71-else
72- AC_PROG_CC
73- AC_PROG_CXX
74- AC_PROG_RANLIB
75- MOZ_PATH_PROGS(AS, $AS as, $CC)
76- AC_CHECK_PROGS(AR, ar, :)
77- AC_CHECK_PROGS(LD, ld, :)
78- AC_CHECK_PROGS(STRIP, strip, :)
79- AC_CHECK_PROGS(WINDRES, windres, :)
80- if test -z "$HOST_CC"; then
81- HOST_CC="$CC"
82- fi
83- if test -z "$HOST_CFLAGS"; then
84- HOST_CFLAGS="$CFLAGS"
85- fi
86- if test -z "$HOST_CXX"; then
87- HOST_CXX="$CXX"
88- fi
89- if test -z "$HOST_CXXFLAGS"; then
90- HOST_CXXFLAGS="$CXXFLAGS"
91- fi
92- if test -z "$HOST_LDFLAGS"; then
93- HOST_LDFLAGS="$LDFLAGS"
94- fi
95- if test -z "$HOST_RANLIB"; then
96- HOST_RANLIB="$RANLIB"
97- fi
98- if test -z "$HOST_AR"; then
99- HOST_AR="$AR"
100- fi
101-fi
102
103 GNU_AS=
104 GNU_LD=
105@@ -1606,6 +1576,7 @@
106 '
107
108 dnl test that the macros actually work:
109+ac_cv_static_assertion_macros_work="yes"
110 AC_MSG_CHECKING(that static assertion macros used in autoconf tests work)
111 AC_CACHE_VAL(ac_cv_static_assertion_macros_work,
112 [AC_LANG_SAVE
113@@ -2767,9 +2738,13 @@
114 AC_LANG_C
115 AC_HEADER_STDC
116 AC_C_CONST
117+ac_cv_type_mode_t=yes
118 AC_TYPE_MODE_T
119+ac_cv_type_off_t=yes
120 AC_TYPE_OFF_T
121+ac_cv_type_pid_t=yes
122 AC_TYPE_PID_T
123+ac_cv_type_size_t=yes
124 AC_TYPE_SIZE_T
125 AC_STRUCT_ST_BLKSIZE
126 AC_MSG_CHECKING(for siginfo_t)
127@@ -3152,19 +3127,9 @@
128 dnl We don't want to link against libm or libpthread on Darwin since
129 dnl they both are just symlinks to libSystem and explicitly linking
130 dnl against libSystem causes issues when debugging (see bug 299601).
131-case $target in
132-*-darwin*)
133- ;;
134-*-beos*)
135- ;;
136-*)
137 AC_CHECK_LIB(m, atan)
138 AC_CHECK_LIB(dl, dlopen,
139- AC_CHECK_HEADER(dlfcn.h,
140- LIBS="-ldl $LIBS"
141- AC_DEFINE(HAVE_LIBDL)))
142- ;;
143-esac
144+ AC_DEFINE(HAVE_LIBDL))
145
146 _SAVE_CFLAGS="$CFLAGS"
147 CFLAGS="$CFLAGS -D_GNU_SOURCE"
148@@ -7007,18 +6972,13 @@
149
150 # Demangle only for debug or trace-malloc builds
151 MOZ_DEMANGLE_SYMBOLS=
152-if test "$HAVE_DEMANGLE" -a "$HAVE_GCC3_ABI" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
153- MOZ_DEMANGLE_SYMBOLS=1
154- AC_DEFINE(MOZ_DEMANGLE_SYMBOLS)
155-fi
156+
157 AC_SUBST(MOZ_DEMANGLE_SYMBOLS)
158
159 dnl ========================================================
160 dnl = Support for gcc stack unwinding (from gcc 3.3)
161 dnl ========================================================
162-if test "$HAVE_GCC3_ABI" && test -z "$SKIP_LIBRARY_CHECKS"; then
163- AC_CHECK_HEADER(unwind.h, AC_CHECK_FUNCS(_Unwind_Backtrace))
164-fi
165+
166
167 dnl ========================================================
168 dnl =
169@@ -7530,10 +7490,7 @@
170 dnl if no gtk/libIDL1 or gtk2/libIDL2 combination was found, fall back
171 dnl to either libIDL1 or libIDL2.
172 if test -z "$_LIBIDL_FOUND"; then
173- AM_PATH_LIBIDL($LIBIDL_VERSION,_LIBIDL_FOUND=1)
174- if test -z "$_LIBIDL_FOUND"; then
175 PKG_CHECK_MODULES(LIBIDL, libIDL-2.0 >= 0.8.0,_LIBIDL_FOUND=1)
176- fi
177 fi
178 dnl
179 dnl If we don't have a libIDL config program & not cross-compiling,
180@@ -7605,13 +7562,7 @@
181 fi
182
183 if test -z "$SKIP_PATH_CHECKS"; then
184-if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then
185- if test "$MOZ_ENABLE_GTK2" || test "$USE_ELF_DYNSTR_GC" || test "$MOZ_ENABLE_HEADLESS"; then
186 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 1.3.7 gobject-2.0)
187- else
188- AM_PATH_GLIB(${GLIB_VERSION})
189- fi
190-fi
191 fi
192
193 if test -z "${GLIB_GMODULE_LIBS}" -a -n "${GLIB_CONFIG}"; then
194@@ -8457,10 +8408,7 @@
195 HAVE_WCRTOMB
196 "
197
198-AC_CONFIG_HEADER(
199-netwerk/necko-config.h
200-xpcom/xpcom-config.h
201-xpcom/xpcom-private.h
202+AC_CONFIG_HEADER(netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h
203 )
204
205 # Save the defines header file before autoconf removes it.
206@@ -8519,31 +8467,11 @@
207 dnl To add new Makefiles, edit allmakefiles.sh.
208 dnl allmakefiles.sh sets the variable, MAKEFILES.
209 . ${srcdir}/allmakefiles.sh
210-dnl
211-dnl Run a perl script to quickly create the makefiles.
212-dnl If it succeeds, it outputs a shell command to set CONFIG_FILES
213-dnl for the files it cannot handle correctly. This way, config.status
214-dnl will handle these files.
215-dnl If it fails, nothing is set and config.status will run as usual.
216-dnl
217-dnl This does not change the $MAKEFILES variable.
218-dnl
219-dnl OpenVMS gets a line overflow on the long eval command, so use a temp file.
220-dnl
221-if test -z "${AS_PERL}"; then
222-echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh
223-else
224-echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl -nowrap --cygwin-srcdir=$srcdir > conftest.sh
225-fi
226-. ./conftest.sh
227-rm conftest.sh
228
229 echo $MAKEFILES > unallmakefiles
230
231 mv -f config/autoconf.mk config/autoconf.mk.orig 2> /dev/null
232
233-AC_OUTPUT($MAKEFILES)
234-
235 dnl Prevent the regeneration of cairo-features.h forcing rebuilds of gfx stuff
236 if test "$CAIRO_FEATURES_H"; then
237 if cmp -s $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig; then
238@@ -8569,14 +8497,14 @@
239 HOST_LDFLAGS="$_SUBDIR_HOST_LDFLAGS"
240 RC=
241
242-unset MAKEFILES
243-unset CONFIG_FILES
244+#unset MAKEFILES
245+#unset CONFIG_FILES
246
247 # No need to run subconfigures when building with LIBXUL_SDK_DIR
248 if test "$COMPILE_ENVIRONMENT" -a -z "$LIBXUL_SDK_DIR"; then
249
250 if test -z "$MOZ_NATIVE_NSPR"; then
251- ac_configure_args="$_SUBDIR_CONFIG_ARGS --with-dist-prefix=$MOZ_BUILD_ROOT/dist --with-mozilla"
252+ ac_configure_args="$ac_configure_args --with-dist-prefix=$MOZ_BUILD_ROOT/dist --with-mozilla"
253 if test -z "$MOZ_DEBUG"; then
254 ac_configure_args="$ac_configure_args --disable-debug"
255 fi
256@@ -8592,8 +8520,7 @@
257 if test -n "$USE_ARM_KUSER"; then
258 ac_configure_args="$ac_configure_args --with-arm-kuser"
259 fi
260- AC_OUTPUT_SUBDIRS(nsprpub)
261- ac_configure_args="$_SUBDIR_CONFIG_ARGS"
262+ AC_CONFIG_SUBDIRS(nsprpub)
263 fi
264
265 if test -z "$MOZ_NATIVE_NSPR"; then
266@@ -8610,7 +8537,6 @@
267
268 # Run the SpiderMonkey 'configure' script.
269 dist=$MOZ_BUILD_ROOT/dist
270-ac_configure_args="$_SUBDIR_CONFIG_ARGS"
271 ac_configure_args="$ac_configure_args --enable-threadsafe"
272 if test -z "$MOZ_NATIVE_NSPR"; then
273 ac_configure_args="$ac_configure_args --with-nspr-cflags='$NSPR_CFLAGS'"
274@@ -8627,11 +8553,14 @@
275 export MOZ_MEMORY_LDFLAGS
276 fi
277 fi
278-AC_OUTPUT_SUBDIRS(js/src)
279-ac_configure_args="$_SUBDIR_CONFIG_ARGS"
280+AC_CONFIG_SUBDIRS(js/src)
281
282 fi # COMPILE_ENVIRONMENT && !LIBXUL_SDK_DIR
283
284+m4_pattern_allow(AS_BIN)
285+
286+AC_OUTPUT($MAKEFILES)
287+
288 dnl Prevent the regeneration of autoconf.mk forcing rebuilds of the world
289 dnl Needs to be at the end to respect possible changes from NSPR configure
290 if cmp -s config/autoconf.mk config/autoconf.mk.orig; then
291Index: offscreen/js/src/configure.in
292===================================================================
293--- offscreen.orig/js/src/configure.in 2009-06-12 14:15:55.000000000 +0100
294+++ offscreen/js/src/configure.in 2009-06-12 14:15:55.000000000 +0100
295@@ -62,7 +62,6 @@
296
297 AC_PREREQ(2.13)
298 AC_INIT(jsapi.h)
299-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
300 AC_CONFIG_HEADER(js-config.h)
301 AC_CANONICAL_SYSTEM
302 TARGET_CPU="${target_cpu}"
303@@ -101,6 +100,9 @@
304 _SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS"
305 _SUBDIR_CONFIG_ARGS="$ac_configure_args"
306
307+ac_cv_have_usable_wchar_v2=no
308+ac_cv_have_usable_wchar_option_v2=no
309+
310 dnl Set the version number of the libs included with mozilla
311 dnl ========================================================
312 NSPR_VERSION=4
313@@ -113,6 +115,8 @@
314
315 MSMANIFEST_TOOL=
316
317+m4_pattern_allow(AS_BIN)
318+
319 dnl Set various checks
320 dnl ========================================================
321 MISSING_X=
322@@ -198,7 +202,7 @@
323
324 if test "$COMPILE_ENVIRONMENT"; then
325
326-if test "$target" != "$host"; then
327+
328 echo "cross compiling from $host to $target"
329
330 _SAVE_CC="$CC"
331@@ -235,7 +239,7 @@
332
333 AC_MSG_CHECKING([whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
334 AC_TRY_COMPILE([], [return(0);],
335- [ac_cv_prog_hostcc_works=1 AC_MSG_RESULT([yes])],
336+ [ac_cv_prog_hostcc_works=1; AC_MSG_RESULT([yes])],
337 AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CC cannot create executables.]) )
338
339 CC="$HOST_CXX"
340@@ -243,7 +247,7 @@
341
342 AC_MSG_CHECKING([whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works])
343 AC_TRY_COMPILE([], [return(0);],
344- [ac_cv_prog_hostcxx_works=1 AC_MSG_RESULT([yes])],
345+ [ac_cv_prog_hostcxx_works=1; AC_MSG_RESULT([yes])],
346 AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CXX cannot create executables.]) )
347
348 CC=$_SAVE_CC
349@@ -298,7 +302,7 @@
350 ;;
351 esac
352
353- AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :)
354+ CC="${target_alias}-gcc"
355 unset ac_cv_prog_CC
356 AC_PROG_CC
357 AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", :)
358@@ -328,37 +332,6 @@
359 dnl able to run ppc code in a translated environment, making a cross
360 dnl compiler appear native. So we override that here.
361 cross_compiling=yes
362-else
363- AC_PROG_CC
364- AC_PROG_CXX
365- AC_PROG_RANLIB
366- MOZ_PATH_PROGS(AS, $AS as, $CC)
367- AC_CHECK_PROGS(AR, ar, :)
368- AC_CHECK_PROGS(LD, ld, :)
369- AC_CHECK_PROGS(STRIP, strip, :)
370- AC_CHECK_PROGS(WINDRES, windres, :)
371- if test -z "$HOST_CC"; then
372- HOST_CC="$CC"
373- fi
374- if test -z "$HOST_CFLAGS"; then
375- HOST_CFLAGS="$CFLAGS"
376- fi
377- if test -z "$HOST_CXX"; then
378- HOST_CXX="$CXX"
379- fi
380- if test -z "$HOST_CXXFLAGS"; then
381- HOST_CXXFLAGS="$CXXFLAGS"
382- fi
383- if test -z "$HOST_LDFLAGS"; then
384- HOST_LDFLAGS="$LDFLAGS"
385- fi
386- if test -z "$HOST_RANLIB"; then
387- HOST_RANLIB="$RANLIB"
388- fi
389- if test -z "$HOST_AR"; then
390- HOST_AR="$AR"
391- fi
392-fi
393
394 GNU_AS=
395 GNU_LD=
396@@ -1424,6 +1397,8 @@
397 fi # GNU_CC
398 fi # COMPILE_ENVIRONMENT
399
400+ac_cv_static_assertion_macros_work=yes
401+
402 dnl =================================================================
403 dnl Set up and test static assertion macros used to avoid AC_TRY_RUN,
404 dnl which is bad when cross compiling.
405@@ -2579,9 +2554,13 @@
406 AC_LANG_C
407 AC_HEADER_STDC
408 AC_C_CONST
409+ac_cv_type_mode_t=yes
410 AC_TYPE_MODE_T
411+ac_cv_type_off_t=yes
412 AC_TYPE_OFF_T
413+ac_cv_type_pid_t=yes
414 AC_TYPE_PID_T
415+ac_cv_type_size_t=yes
416 AC_TYPE_SIZE_T
417 AC_STRUCT_ST_BLKSIZE
418 AC_MSG_CHECKING(for siginfo_t)
419@@ -2606,7 +2585,8 @@
420
421 AC_CHECK_HEADER(stdint.h)
422 if test "$ac_cv_header_stdint_h" = yes; then
423- AC_DEFINE(JS_HAVE_STDINT_H)
424+ AC_DEFINE(JS_HAVE_STDINT_H, 1, [have stdint.h])
425+ AC_DEFINE(HAVE_STDINT_H)
426 else
427 dnl We'll figure them out for ourselves. List more likely types
428 dnl earlier. If we ever really encounter a size for which none of
429@@ -3004,10 +2984,7 @@
430 ;;
431 *)
432 AC_CHECK_LIB(m, atan)
433- AC_CHECK_LIB(dl, dlopen,
434- AC_CHECK_HEADER(dlfcn.h,
435- LIBS="-ldl $LIBS"
436- AC_DEFINE(HAVE_LIBDL)))
437+ AC_CHECK_LIB(dl, dlopen, AC_DEFINE(HAVE_LIBDL))
438 ;;
439 esac
440
441@@ -3903,6 +3880,7 @@
442 [ --with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR.
443 See --with-nspr-cflags for more details.],
444 NSPR_LIBS=$withval)
445+$NSPR_LIBS="$NSPR_LIBS -L$(LIBXUL_DIST)/sdk/lib"
446 AC_SUBST(NSPR_CFLAGS)
447 AC_SUBST(NSPR_LIBS)
448
449@@ -4512,18 +4490,11 @@
450
451 # Demangle only for debug or trace-malloc builds
452 MOZ_DEMANGLE_SYMBOLS=
453-if test "$HAVE_DEMANGLE" -a "$HAVE_GCC3_ABI" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
454- MOZ_DEMANGLE_SYMBOLS=1
455- AC_DEFINE(MOZ_DEMANGLE_SYMBOLS)
456-fi
457 AC_SUBST(MOZ_DEMANGLE_SYMBOLS)
458
459 dnl ========================================================
460 dnl = Support for gcc stack unwinding (from gcc 3.3)
461 dnl ========================================================
462-if test "$HAVE_GCC3_ABI" && test -z "$SKIP_LIBRARY_CHECKS"; then
463- AC_CHECK_HEADER(unwind.h, AC_CHECK_FUNCS(_Unwind_Backtrace))
464-fi
465
466 dnl ========================================================
467 dnl =
468@@ -5231,6 +5202,8 @@
469 done
470 AC_SUBST(LIBS_PATH)
471
472+
473+
474 dnl ========================================================
475 dnl JavaScript shell
476 dnl ========================================================
477@@ -5371,3 +5344,4 @@
478 # 'js-config' in Makefile.in.
479 AC_MSG_RESULT(invoking make to create js-config script)
480 $MAKE js-config
481+
482Index: offscreen/nsprpub/configure.in
483===================================================================
484--- offscreen.orig/nsprpub/configure.in 2009-06-12 14:15:55.000000000 +0100
485+++ offscreen/nsprpub/configure.in 2009-06-12 14:15:55.000000000 +0100
486@@ -42,7 +42,6 @@
487 AC_PREREQ(2.12)
488 AC_INIT(config/libc_r.h)
489
490-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
491 AC_CANONICAL_SYSTEM
492
493 dnl ========================================================
494@@ -396,7 +395,7 @@
495 dnl ========================================================
496 dnl Checks for compilers.
497 dnl ========================================================
498-if test "$target" != "$host"; then
499+
500 echo "cross compiling from $host to $target"
501 cross_compiling=yes
502
503@@ -423,7 +422,7 @@
504
505 AC_MSG_CHECKING([whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
506 AC_TRY_COMPILE([], [return(0);],
507- [ac_cv_prog_host_cc_works=1 AC_MSG_RESULT([yes])],
508+ [ac_cv_prog_host_cc_works=1; AC_MSG_RESULT([yes])],
509 AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.]) )
510
511 CC=$_SAVE_CC
512@@ -444,7 +443,7 @@
513 ;;
514 esac
515
516- AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", echo)
517+ CC="${target_alias}-gcc"
518 unset ac_cv_prog_CC
519 AC_PROG_CC
520 if test -n "$USE_CPLUS"; then
521@@ -470,30 +469,6 @@
522 AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", echo)
523 AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", echo)
524
525-else
526- AC_PROG_CC
527- if test -n "$USE_CPLUS"; then
528- if test "$CC" = "cl" -a -z "$CXX"; then
529- CXX=$CC
530- else
531- AC_PROG_CXX
532- fi
533- fi
534- AC_PROG_CPP
535- AC_PROG_RANLIB
536- AC_PATH_PROGS(AS, as, $CC)
537- AC_PATH_PROGS(AR, ar, echo not_ar)
538- AC_PATH_PROGS(LD, ld link, echo not_ld)
539- AC_PATH_PROGS(STRIP, strip, echo not_strip)
540- AC_PATH_PROGS(WINDRES, windres, echo not_windres)
541- if test -z "$HOST_CC"; then
542- HOST_CC="$CC"
543- fi
544- if test -z "$HOST_CFLAGS"; then
545- HOST_CFLAGS="$CFLAGS"
546- fi
547-fi
548-
549 if test "$GCC" = "yes"; then
550 GNU_CC=1
551 fi
552@@ -514,11 +489,8 @@
553 ;;
554 esac
555
556-if test "$cross_compiling" = "yes"; then
557+
558 CROSS_COMPILE=1
559-else
560- CROSS_COMPILE=
561-fi
562
563 dnl ========================================================
564 dnl Check for gcc -pipe support
565@@ -2283,10 +2255,7 @@
566 *-darwin*|*-beos*)
567 ;;
568 *)
569- AC_CHECK_LIB(dl, dlopen,
570- AC_CHECK_HEADER(dlfcn.h,
571- OS_LIBS="-ldl $OS_LIBS"))
572- ;;
573+ AC_CHECK_LIB(dl, dlopen)
574 esac
575
576
577@@ -2904,6 +2873,8 @@
578 dnl pr/tests/w16gui/Makefile
579 dnl tools/Makefile
580
581+m4_pattern_allow(AS_BIN)
582+
583 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
584 MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
585 elif test -n "$USE_PTHREADS"; then
586@@ -2919,3 +2890,5 @@
587 echo $MAKEFILES > unallmakefiles
588
589 AC_OUTPUT([$MAKEFILES], [chmod +x config/nspr-config])
590+
591+
592Index: offscreen/js/src/Makefile.in
593===================================================================
594--- offscreen.orig/js/src/Makefile.in 2009-06-12 14:15:55.000000000 +0100
595+++ offscreen/js/src/Makefile.in 2009-06-12 14:15:55.000000000 +0100
596@@ -514,20 +514,8 @@
597
598 export:: jsautocfg.h
599
600-ifeq (,$(CROSS_COMPILE)$(GNU_CC)$(filter-out WINNT,$(OS_ARCH)))
601 jsautocfg.h:
602 touch $@
603-else
604-ifeq ($(OS_ARCH),WINCE)
605-jsautocfg.h:
606- touch $@
607-else
608-jsautocfg.h: jscpucfg$(HOST_BIN_SUFFIX)
609- @rm -f $@ jsautocfg.tmp
610- ./jscpucfg > jsautocfg.tmp
611- mv jsautocfg.tmp $@
612-endif
613-endif
614
615 # jscpucfg is a strange target
616 # Needs to be built with the host compiler but needs to include
617@@ -557,7 +545,7 @@
618 echo no need to build jscpucfg $<
619 else
620 jscpucfg$(HOST_BIN_SUFFIX): jscpucfg.cpp Makefile.in
621- $(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) $(HOST_OUTOPTION)$@ $<
622+ $(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) -I$(DIST)/sdk/include $(NSPR_CFLAGS) $(HOST_OUTOPTION)$@ $<
623 endif
624 endif
625
626Index: offscreen/js/src/xpconnect/loader/mozJSComponentLoader.cpp
627===================================================================
628--- offscreen.orig/js/src/xpconnect/loader/mozJSComponentLoader.cpp 2009-06-12 14:15:55.000000000 +0100
629+++ offscreen/js/src/xpconnect/loader/mozJSComponentLoader.cpp 2009-06-12 14:15:55.000000000 +0100
630@@ -47,6 +47,8 @@
631
632 #include <stdarg.h>
633
634+#include "mozilla-config.h"
635+
636 #include "prlog.h"
637
638 #include "nsCOMPtr.h"
639Index: offscreen/js/src/xpconnect/loader/mozJSSubScriptLoader.cpp
640===================================================================
641--- offscreen.orig/js/src/xpconnect/loader/mozJSSubScriptLoader.cpp 2009-06-12 14:15:55.000000000 +0100
642+++ offscreen/js/src/xpconnect/loader/mozJSSubScriptLoader.cpp 2009-06-12 14:15:55.000000000 +0100
643@@ -39,6 +39,8 @@
644 *
645 * ***** END LICENSE BLOCK ***** */
646
647+#include "mozilla-config.h"
648+
649 #if !defined(XPCONNECT_STANDALONE) && !defined(NO_SUBSCRIPT_LOADER)
650
651 #include "mozJSSubScriptLoader.h"
652Index: offscreen/modules/lcms/include/icc34.h
653===================================================================
654--- offscreen.orig/modules/lcms/include/icc34.h 2009-06-12 14:15:55.000000000 +0100
655+++ offscreen/modules/lcms/include/icc34.h 2009-06-12 14:15:55.000000000 +0100
656@@ -144,7 +144,7 @@
657 */
658
659
660-#ifdef PACKAGE_NAME
661+#if 0
662 /*
663 June 9, 2003, Adapted for use with configure by Bob Friesenhahn
664 Added the stupid check for autoconf by Marti Maria.
665Index: offscreen/toolkit/mozapps/update/src/updater/Makefile.in
666===================================================================
667--- offscreen.orig/toolkit/mozapps/update/src/updater/Makefile.in 2009-06-12 14:15:55.000000000 +0100
668+++ offscreen/toolkit/mozapps/update/src/updater/Makefile.in 2009-06-12 14:15:55.000000000 +0100
669@@ -60,7 +60,7 @@
670
671 LIBS += \
672 $(DEPTH)/modules/libmar/src/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \
673- $(BZ2_LIBS) \
674+ $(BZ2_LIBS) -lpthread \
675 $(NULL)
676
677 ifeq ($(OS_ARCH),WINNT)
678Index: offscreen/xpcom/sample/program/Makefile.in
679===================================================================
680--- offscreen.orig/xpcom/sample/program/Makefile.in 2009-06-12 14:15:55.000000000 +0100
681+++ offscreen/xpcom/sample/program/Makefile.in 2009-06-12 14:15:55.000000000 +0100
682@@ -57,7 +57,7 @@
683 # that the application be linked against the XPCOM dynamic library or the NSPR
684 # dynamic libraries.
685 LIBS = \
686- $(XPCOM_STANDALONE_GLUE_LDOPTS) \
687+ $(XPCOM_STANDALONE_GLUE_LDOPTS) -ldl \
688 $(NULL)
689
690 # Need to link with CoreFoundation on Mac
691Index: offscreen/xpcom/tools/registry/Makefile.in
692===================================================================
693--- offscreen.orig/xpcom/tools/registry/Makefile.in 2009-06-12 14:15:55.000000000 +0100
694+++ offscreen/xpcom/tools/registry/Makefile.in 2009-06-12 14:15:55.000000000 +0100
695@@ -54,7 +54,7 @@
696 SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=$(BIN_SUFFIX))
697
698 LIBS = \
699- $(XPCOM_STANDALONE_GLUE_LDOPTS) \
700+ $(XPCOM_STANDALONE_GLUE_LDOPTS) -ldl \
701 $(NULL)
702
703 # Need to link with CoreFoundation on Mac
704Index: offscreen/xulrunner/app/Makefile.in
705===================================================================
706--- offscreen.orig/xulrunner/app/Makefile.in 2009-06-12 14:15:55.000000000 +0100
707+++ offscreen/xulrunner/app/Makefile.in 2009-06-12 14:15:55.000000000 +0100
708@@ -184,7 +184,7 @@
709 RCFLAGS += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
710 endif
711
712-LIBS += $(JEMALLOC_LIBS)
713+LIBS += $(JEMALLOC_LIBS) -lpthread -ldl
714
715 include $(topsrcdir)/config/rules.mk
716
717Index: offscreen/xulrunner/stub/Makefile.in
718===================================================================
719--- offscreen.orig/xulrunner/stub/Makefile.in 2009-06-12 14:15:55.000000000 +0100
720+++ offscreen/xulrunner/stub/Makefile.in 2009-06-12 14:15:55.000000000 +0100
721@@ -101,7 +101,7 @@
722 endif
723 endif
724
725-LIBS += $(JEMALLOC_LIBS)
726+LIBS += $(JEMALLOC_LIBS) -lpthread -ldl
727
728 include $(topsrcdir)/config/rules.mk
729
730Index: offscreen/modules/plugin/test/testplugin/Makefile.in
731===================================================================
732--- offscreen.orig/modules/plugin/test/testplugin/Makefile.in 2009-06-12 14:15:55.000000000 +0100
733+++ offscreen/modules/plugin/test/testplugin/Makefile.in 2009-06-12 14:15:55.000000000 +0100
734@@ -63,9 +63,7 @@
735 CMMSRCS = nptest_macosx.mm
736 endif
737
738-ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
739 CPPSRCS += nptest_gtk2.cpp
740-endif
741
742 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
743 CPPSRCS += nptest_os2.cpp
744Index: offscreen/js/src/aclocal.m4
745===================================================================
746--- offscreen.orig/js/src/aclocal.m4 2009-06-12 14:15:55.000000000 +0100
747+++ offscreen/js/src/aclocal.m4 2009-06-12 14:15:55.000000000 +0100
748@@ -9,4 +9,3 @@
749 builtin(include, build/autoconf/moznbytetype.m4)dnl
750 builtin(include, build/autoconf/mozprog.m4)dnl
751
752-MOZ_PROG_CHECKMSYS()
753Index: offscreen/toolkit/toolkit-makefiles.sh
754===================================================================
755--- offscreen.orig/toolkit/toolkit-makefiles.sh 2009-06-12 14:19:59.000000000 +0100
756+++ offscreen/toolkit/toolkit-makefiles.sh 2009-06-12 14:20:09.000000000 +0100
757@@ -342,7 +342,6 @@
758 modules/plugin/sdk/samples/Makefile
759 modules/plugin/sdk/samples/common/Makefile
760 modules/plugin/sdk/samples/basic/windows/Makefile
761- modules/plugin/sdk/samples/basic/unix/Makefile
762 modules/plugin/sdk/samples/winless/windows/Makefile
763 "
764
diff --git a/meta/packages/mozilla-headless/mozilla-headless/configurefix.patch b/meta/packages/mozilla-headless/mozilla-headless/configurefix.patch
deleted file mode 100644
index 7ee1211f1a..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/configurefix.patch
+++ /dev/null
@@ -1,774 +0,0 @@
1Index: offscreen/configure.in
2===================================================================
3--- offscreen.orig/configure.in 2009-12-09 13:10:12.000000000 +0000
4+++ offscreen/configure.in 2009-12-09 13:38:51.000000000 +0000
5@@ -64,7 +64,6 @@
6
7 AC_PREREQ(2.13)
8 AC_INIT(config/config.mk)
9-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
10 AC_CANONICAL_SYSTEM
11 TARGET_CPU="${target_cpu}"
12 TARGET_VENDOR="${target_vendor}"
13@@ -106,7 +105,6 @@
14 _SUBDIR_HOST_CFLAGS="$HOST_CFLAGS"
15 _SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS"
16 _SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS"
17-_SUBDIR_CONFIG_ARGS="$ac_configure_args"
18
19 dnl Set the version number of the libs included with mozilla
20 dnl ========================================================
21@@ -139,6 +137,9 @@
22
23 MSMANIFEST_TOOL=
24
25+ac_cv_have_usable_wchar_v2=no
26+ac_cv_have_usable_wchar_option_v2=no
27+
28 dnl Set various checks
29 dnl ========================================================
30 MISSING_X=
31@@ -308,7 +309,7 @@
32 ;;
33 esac
34
35-if test -n "$CROSS_COMPILE" && test "$target" != "$host"; then
36+
37 echo "cross compiling from $host to $target"
38 cross_compiling=yes
39
40@@ -346,7 +347,7 @@
41
42 AC_MSG_CHECKING([whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
43 AC_TRY_COMPILE([], [return(0);],
44- [ac_cv_prog_hostcc_works=1 AC_MSG_RESULT([yes])],
45+ [ac_cv_prog_hostcc_works=1; AC_MSG_RESULT([yes])],
46 AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CC cannot create executables.]) )
47
48 CC="$HOST_CXX"
49@@ -354,7 +355,7 @@
50
51 AC_MSG_CHECKING([whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works])
52 AC_TRY_COMPILE([], [return(0);],
53- [ac_cv_prog_hostcxx_works=1 AC_MSG_RESULT([yes])],
54+ [ac_cv_prog_hostcxx_works=1; AC_MSG_RESULT([yes])],
55 AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CXX cannot create executables.]) )
56
57 CC=$_SAVE_CC
58@@ -375,7 +376,7 @@
59 ;;
60 esac
61
62- AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :)
63+ CC="${target_alias}-gcc"
64 unset ac_cv_prog_CC
65 AC_PROG_CC
66 AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", :)
67@@ -399,37 +400,6 @@
68 AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", :)
69 AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", :)
70 AC_DEFINE(CROSS_COMPILE)
71-else
72- AC_PROG_CC
73- AC_PROG_CXX
74- AC_PROG_RANLIB
75- MOZ_PATH_PROGS(AS, $AS as, $CC)
76- AC_CHECK_PROGS(AR, ar, :)
77- AC_CHECK_PROGS(LD, ld, :)
78- AC_CHECK_PROGS(STRIP, strip, :)
79- AC_CHECK_PROGS(WINDRES, windres, :)
80- if test -z "$HOST_CC"; then
81- HOST_CC="$CC"
82- fi
83- if test -z "$HOST_CFLAGS"; then
84- HOST_CFLAGS="$CFLAGS"
85- fi
86- if test -z "$HOST_CXX"; then
87- HOST_CXX="$CXX"
88- fi
89- if test -z "$HOST_CXXFLAGS"; then
90- HOST_CXXFLAGS="$CXXFLAGS"
91- fi
92- if test -z "$HOST_LDFLAGS"; then
93- HOST_LDFLAGS="$LDFLAGS"
94- fi
95- if test -z "$HOST_RANLIB"; then
96- HOST_RANLIB="$RANLIB"
97- fi
98- if test -z "$HOST_AR"; then
99- HOST_AR="$AR"
100- fi
101-fi
102
103 GNU_AS=
104 GNU_LD=
105@@ -1586,6 +1556,7 @@
106 '
107
108 dnl test that the macros actually work:
109+ac_cv_static_assertion_macros_work="yes"
110 AC_MSG_CHECKING(that static assertion macros used in autoconf tests work)
111 AC_CACHE_VAL(ac_cv_static_assertion_macros_work,
112 [AC_LANG_SAVE
113@@ -2770,9 +2741,13 @@
114 AC_LANG_C
115 AC_HEADER_STDC
116 AC_C_CONST
117+ac_cv_type_mode_t=yes
118 AC_TYPE_MODE_T
119+ac_cv_type_off_t=yes
120 AC_TYPE_OFF_T
121+ac_cv_type_pid_t=yes
122 AC_TYPE_PID_T
123+ac_cv_type_size_t=yes
124 AC_TYPE_SIZE_T
125 AC_STRUCT_ST_BLKSIZE
126 AC_MSG_CHECKING(for siginfo_t)
127@@ -3174,21 +3149,9 @@
128 dnl We don't want to link against libm or libpthread on Darwin since
129 dnl they both are just symlinks to libSystem and explicitly linking
130 dnl against libSystem causes issues when debugging (see bug 299601).
131-case $target in
132-*-darwin*)
133- ;;
134-*-beos*)
135- ;;
136-*-os2*)
137- ;;
138-*)
139 AC_CHECK_LIB(m, atan)
140 AC_CHECK_LIB(dl, dlopen,
141- AC_CHECK_HEADER(dlfcn.h,
142- LIBS="-ldl $LIBS"
143- AC_DEFINE(HAVE_LIBDL)))
144- ;;
145-esac
146+ AC_DEFINE(HAVE_LIBDL))
147
148 _SAVE_CFLAGS="$CFLAGS"
149 CFLAGS="$CFLAGS -D_GNU_SOURCE"
150@@ -6889,18 +6852,13 @@
151
152 # Demangle only for debug or trace-malloc builds
153 MOZ_DEMANGLE_SYMBOLS=
154-if test "$HAVE_DEMANGLE" -a "$HAVE_GCC3_ABI" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
155- MOZ_DEMANGLE_SYMBOLS=1
156- AC_DEFINE(MOZ_DEMANGLE_SYMBOLS)
157-fi
158+
159 AC_SUBST(MOZ_DEMANGLE_SYMBOLS)
160
161 dnl ========================================================
162 dnl = Support for gcc stack unwinding (from gcc 3.3)
163 dnl ========================================================
164-if test "$HAVE_GCC3_ABI" && test -z "$SKIP_LIBRARY_CHECKS"; then
165- AC_CHECK_HEADER(unwind.h, AC_CHECK_FUNCS(_Unwind_Backtrace))
166-fi
167+
168
169 dnl ========================================================
170 dnl =
171@@ -7420,10 +7378,7 @@
172 dnl if no gtk/libIDL1 or gtk2/libIDL2 combination was found, fall back
173 dnl to either libIDL1 or libIDL2.
174 if test -z "$_LIBIDL_FOUND"; then
175- AM_PATH_LIBIDL($LIBIDL_VERSION,_LIBIDL_FOUND=1)
176- if test -z "$_LIBIDL_FOUND"; then
177 PKG_CHECK_MODULES(LIBIDL, libIDL-2.0 >= 0.8.0,_LIBIDL_FOUND=1)
178- fi
179 fi
180 dnl
181 dnl If we don't have a libIDL config program & not cross-compiling,
182@@ -7495,13 +7450,7 @@
183 fi
184
185 if test -z "$SKIP_PATH_CHECKS"; then
186-if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then
187- if test "$MOZ_ENABLE_GTK2" || test "$USE_ELF_DYNSTR_GC" || test "$MOZ_ENABLE_HEADLESS"; then
188 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 1.3.7 gobject-2.0)
189- else
190- AM_PATH_GLIB(${GLIB_VERSION})
191- fi
192-fi
193 fi
194
195 if test -z "${GLIB_GMODULE_LIBS}" -a -n "${GLIB_CONFIG}"; then
196@@ -8278,10 +8227,7 @@
197 HAVE_WCRTOMB
198 "
199
200-AC_CONFIG_HEADER(
201-netwerk/necko-config.h
202-xpcom/xpcom-config.h
203-xpcom/xpcom-private.h
204+AC_CONFIG_HEADER(netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h
205 )
206
207 # Save the defines header file before autoconf removes it.
208@@ -8340,31 +8286,11 @@
209 dnl To add new Makefiles, edit allmakefiles.sh.
210 dnl allmakefiles.sh sets the variable, MAKEFILES.
211 . ${srcdir}/allmakefiles.sh
212-dnl
213-dnl Run a perl script to quickly create the makefiles.
214-dnl If it succeeds, it outputs a shell command to set CONFIG_FILES
215-dnl for the files it cannot handle correctly. This way, config.status
216-dnl will handle these files.
217-dnl If it fails, nothing is set and config.status will run as usual.
218-dnl
219-dnl This does not change the $MAKEFILES variable.
220-dnl
221-dnl OpenVMS gets a line overflow on the long eval command, so use a temp file.
222-dnl
223-if test -z "${AS_PERL}"; then
224-echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh
225-else
226-echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl -nowrap --cygwin-srcdir=$srcdir > conftest.sh
227-fi
228-. ./conftest.sh
229-rm conftest.sh
230
231 echo $MAKEFILES > unallmakefiles
232
233 mv -f config/autoconf.mk config/autoconf.mk.orig 2> /dev/null
234
235-AC_OUTPUT($MAKEFILES)
236-
237 dnl Prevent the regeneration of cairo-features.h forcing rebuilds of gfx stuff
238 if test "$CAIRO_FEATURES_H"; then
239 if cmp -s $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig; then
240@@ -8390,14 +8316,14 @@
241 HOST_LDFLAGS="$_SUBDIR_HOST_LDFLAGS"
242 RC=
243
244-unset MAKEFILES
245-unset CONFIG_FILES
246+#unset MAKEFILES
247+#unset CONFIG_FILES
248
249 # No need to run subconfigures when building with LIBXUL_SDK_DIR
250 if test "$COMPILE_ENVIRONMENT" -a -z "$LIBXUL_SDK_DIR"; then
251
252 if test -z "$MOZ_NATIVE_NSPR"; then
253- ac_configure_args="$_SUBDIR_CONFIG_ARGS --with-dist-prefix=$MOZ_BUILD_ROOT/dist --with-mozilla"
254+ ac_configure_args="$ac_configure_args --with-dist-prefix=$MOZ_BUILD_ROOT/dist --with-mozilla"
255 if test -z "$MOZ_DEBUG"; then
256 ac_configure_args="$ac_configure_args --disable-debug"
257 fi
258@@ -8413,8 +8339,7 @@
259 if test -n "$USE_ARM_KUSER"; then
260 ac_configure_args="$ac_configure_args --with-arm-kuser"
261 fi
262- AC_OUTPUT_SUBDIRS(nsprpub)
263- ac_configure_args="$_SUBDIR_CONFIG_ARGS"
264+ AC_CONFIG_SUBDIRS(nsprpub)
265 fi
266
267 if test -z "$MOZ_NATIVE_NSPR"; then
268@@ -8431,7 +8356,6 @@
269
270 # Run the SpiderMonkey 'configure' script.
271 dist=$MOZ_BUILD_ROOT/dist
272-ac_configure_args="$_SUBDIR_CONFIG_ARGS"
273 ac_configure_args="$ac_configure_args --enable-threadsafe"
274 if test -z "$MOZ_NATIVE_NSPR"; then
275 ac_configure_args="$ac_configure_args --with-nspr-cflags='$NSPR_CFLAGS'"
276@@ -8448,8 +8372,7 @@
277 export MOZ_MEMORY_LDFLAGS
278 fi
279 fi
280-AC_OUTPUT_SUBDIRS(js/src)
281-ac_configure_args="$_SUBDIR_CONFIG_ARGS"
282+AC_CONFIG_SUBDIRS(js/src)
283
284 # Build jsctypes on the platforms we can.
285 if test "$BUILD_CTYPES"; then
286@@ -8465,20 +8388,14 @@
287 if test -n "$CROSS_COMPILE"; then
288 ac_configure_args="$ac_configure_args --build=$build --host=$target"
289 fi
290- if test "$SOLARIS_SUNPRO_CC"; then
291- # Always use gcc for libffi on Solaris
292- old_cache_file=$cache_file
293- cache_file=js/ctypes/libffi/config.cache
294- ac_configure_args="$ac_configure_args CC=gcc"
295- AC_OUTPUT_SUBDIRS(js/ctypes/libffi)
296- cache_file=$old_cache_file
297- else
298- AC_OUTPUT_SUBDIRS(js/ctypes/libffi)
299- fi
300- ac_configure_args="$_SUBDIR_CONFIG_ARGS"
301+ AC_CONFIG_SUBDIRS(js/ctypes/libffi)
302 fi
303 fi
304
305+m4_pattern_allow(AS_BIN)
306+
307+AC_OUTPUT($MAKEFILES)
308+
309 fi # COMPILE_ENVIRONMENT && !LIBXUL_SDK_DIR
310
311 dnl Prevent the regeneration of autoconf.mk forcing rebuilds of the world
312Index: offscreen/js/src/configure.in
313===================================================================
314--- offscreen.orig/js/src/configure.in 2009-12-09 13:10:12.000000000 +0000
315+++ offscreen/js/src/configure.in 2009-12-09 13:38:51.000000000 +0000
316@@ -62,7 +62,6 @@
317
318 AC_PREREQ(2.13)
319 AC_INIT(jsapi.h)
320-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
321 AC_CONFIG_HEADER(js-config.h)
322 AC_CANONICAL_SYSTEM
323 TARGET_CPU="${target_cpu}"
324@@ -101,6 +100,9 @@
325 _SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS"
326 _SUBDIR_CONFIG_ARGS="$ac_configure_args"
327
328+ac_cv_have_usable_wchar_v2=no
329+ac_cv_have_usable_wchar_option_v2=no
330+
331 dnl Set the version number of the libs included with mozilla
332 dnl ========================================================
333 NSPR_VERSION=4
334@@ -113,6 +115,8 @@
335
336 MSMANIFEST_TOOL=
337
338+m4_pattern_allow(AS_BIN)
339+
340 dnl Set various checks
341 dnl ========================================================
342 MISSING_X=
343@@ -212,7 +216,7 @@
344
345 if test "$COMPILE_ENVIRONMENT"; then
346
347-if test "$target" != "$host"; then
348+
349 echo "cross compiling from $host to $target"
350
351 _SAVE_CC="$CC"
352@@ -249,7 +253,7 @@
353
354 AC_MSG_CHECKING([whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
355 AC_TRY_COMPILE([], [return(0);],
356- [ac_cv_prog_hostcc_works=1 AC_MSG_RESULT([yes])],
357+ [ac_cv_prog_hostcc_works=1; AC_MSG_RESULT([yes])],
358 AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CC cannot create executables.]) )
359
360 CC="$HOST_CXX"
361@@ -257,7 +261,7 @@
362
363 AC_MSG_CHECKING([whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works])
364 AC_TRY_COMPILE([], [return(0);],
365- [ac_cv_prog_hostcxx_works=1 AC_MSG_RESULT([yes])],
366+ [ac_cv_prog_hostcxx_works=1; AC_MSG_RESULT([yes])],
367 AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CXX cannot create executables.]) )
368
369 CC=$_SAVE_CC
370@@ -312,7 +316,7 @@
371 ;;
372 esac
373
374- AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :)
375+ CC="${target_alias}-gcc"
376 unset ac_cv_prog_CC
377 AC_PROG_CC
378 AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", :)
379@@ -342,37 +346,6 @@
380 dnl able to run ppc code in a translated environment, making a cross
381 dnl compiler appear native. So we override that here.
382 cross_compiling=yes
383-else
384- AC_PROG_CC
385- AC_PROG_CXX
386- AC_PROG_RANLIB
387- MOZ_PATH_PROGS(AS, $AS as, $CC)
388- AC_CHECK_PROGS(AR, ar, :)
389- AC_CHECK_PROGS(LD, ld, :)
390- AC_CHECK_PROGS(STRIP, strip, :)
391- AC_CHECK_PROGS(WINDRES, windres, :)
392- if test -z "$HOST_CC"; then
393- HOST_CC="$CC"
394- fi
395- if test -z "$HOST_CFLAGS"; then
396- HOST_CFLAGS="$CFLAGS"
397- fi
398- if test -z "$HOST_CXX"; then
399- HOST_CXX="$CXX"
400- fi
401- if test -z "$HOST_CXXFLAGS"; then
402- HOST_CXXFLAGS="$CXXFLAGS"
403- fi
404- if test -z "$HOST_LDFLAGS"; then
405- HOST_LDFLAGS="$LDFLAGS"
406- fi
407- if test -z "$HOST_RANLIB"; then
408- HOST_RANLIB="$RANLIB"
409- fi
410- if test -z "$HOST_AR"; then
411- HOST_AR="$AR"
412- fi
413-fi
414
415 GNU_AS=
416 GNU_LD=
417@@ -1370,6 +1343,8 @@
418 fi # GNU_CC
419 fi # COMPILE_ENVIRONMENT
420
421+ac_cv_static_assertion_macros_work=yes
422+
423 dnl =================================================================
424 dnl Set up and test static assertion macros used to avoid AC_TRY_RUN,
425 dnl which is bad when cross compiling.
426@@ -2557,9 +2532,13 @@
427 AC_LANG_C
428 AC_HEADER_STDC
429 AC_C_CONST
430+ac_cv_type_mode_t=yes
431 AC_TYPE_MODE_T
432+ac_cv_type_off_t=yes
433 AC_TYPE_OFF_T
434+ac_cv_type_pid_t=yes
435 AC_TYPE_PID_T
436+ac_cv_type_size_t=yes
437 AC_TYPE_SIZE_T
438 AC_STRUCT_ST_BLKSIZE
439 AC_MSG_CHECKING(for siginfo_t)
440@@ -2584,7 +2563,8 @@
441
442 AC_CHECK_HEADER(stdint.h)
443 if test "$ac_cv_header_stdint_h" = yes; then
444- AC_DEFINE(JS_HAVE_STDINT_H)
445+ AC_DEFINE(JS_HAVE_STDINT_H, 1, [have stdint.h])
446+ AC_DEFINE(HAVE_STDINT_H)
447 else
448 dnl We'll figure them out for ourselves. List more likely types
449 dnl earlier. If we ever really encounter a size for which none of
450@@ -2938,10 +2918,7 @@
451 ;;
452 *)
453 AC_CHECK_LIB(m, atan)
454- AC_CHECK_LIB(dl, dlopen,
455- AC_CHECK_HEADER(dlfcn.h,
456- LIBS="-ldl $LIBS"
457- AC_DEFINE(HAVE_LIBDL)))
458+ AC_CHECK_LIB(dl, dlopen, AC_DEFINE(HAVE_LIBDL))
459 ;;
460 esac
461
462@@ -3847,6 +3824,7 @@
463 [ --with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR.
464 See --with-nspr-cflags for more details.],
465 NSPR_LIBS=$withval)
466+$NSPR_LIBS="$NSPR_LIBS -L$(LIBXUL_DIST)/sdk/lib"
467 AC_SUBST(NSPR_CFLAGS)
468 AC_SUBST(NSPR_LIBS)
469
470@@ -4386,18 +4364,11 @@
471
472 # Demangle only for debug or trace-malloc builds
473 MOZ_DEMANGLE_SYMBOLS=
474-if test "$HAVE_DEMANGLE" -a "$HAVE_GCC3_ABI" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
475- MOZ_DEMANGLE_SYMBOLS=1
476- AC_DEFINE(MOZ_DEMANGLE_SYMBOLS)
477-fi
478 AC_SUBST(MOZ_DEMANGLE_SYMBOLS)
479
480 dnl ========================================================
481 dnl = Support for gcc stack unwinding (from gcc 3.3)
482 dnl ========================================================
483-if test "$HAVE_GCC3_ABI" && test -z "$SKIP_LIBRARY_CHECKS"; then
484- AC_CHECK_HEADER(unwind.h, AC_CHECK_FUNCS(_Unwind_Backtrace))
485-fi
486
487 dnl ========================================================
488 dnl =
489@@ -5097,6 +5068,8 @@
490
491 AC_HAVE_FUNCS(setlocale)
492
493+
494+
495 dnl ========================================================
496 dnl Use cygwin wrapper for win32 builds, except MSYS/MinGW
497 dnl ========================================================
498@@ -5234,3 +5207,4 @@
499 # 'js-config' in Makefile.in.
500 AC_MSG_RESULT(invoking make to create js-config script)
501 $MAKE js-config
502+
503Index: offscreen/nsprpub/configure.in
504===================================================================
505--- offscreen.orig/nsprpub/configure.in 2009-12-09 13:10:12.000000000 +0000
506+++ offscreen/nsprpub/configure.in 2009-12-09 13:10:12.000000000 +0000
507@@ -42,7 +42,6 @@
508 AC_PREREQ(2.12)
509 AC_INIT(config/libc_r.h)
510
511-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
512 AC_CANONICAL_SYSTEM
513
514 dnl ========================================================
515@@ -396,7 +395,7 @@
516 dnl ========================================================
517 dnl Checks for compilers.
518 dnl ========================================================
519-if test "$target" != "$host"; then
520+
521 echo "cross compiling from $host to $target"
522 cross_compiling=yes
523
524@@ -423,7 +422,7 @@
525
526 AC_MSG_CHECKING([whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
527 AC_TRY_COMPILE([], [return(0);],
528- [ac_cv_prog_host_cc_works=1 AC_MSG_RESULT([yes])],
529+ [ac_cv_prog_host_cc_works=1; AC_MSG_RESULT([yes])],
530 AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.]) )
531
532 CC=$_SAVE_CC
533@@ -444,7 +443,7 @@
534 ;;
535 esac
536
537- AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", echo)
538+ CC="${target_alias}-gcc"
539 unset ac_cv_prog_CC
540 AC_PROG_CC
541 if test -n "$USE_CPLUS"; then
542@@ -470,30 +469,6 @@
543 AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", echo)
544 AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", echo)
545
546-else
547- AC_PROG_CC
548- if test -n "$USE_CPLUS"; then
549- if test "$CC" = "cl" -a -z "$CXX"; then
550- CXX=$CC
551- else
552- AC_PROG_CXX
553- fi
554- fi
555- AC_PROG_CPP
556- AC_PROG_RANLIB
557- AC_PATH_PROGS(AS, as, $CC)
558- AC_PATH_PROGS(AR, ar, echo not_ar)
559- AC_PATH_PROGS(LD, ld link, echo not_ld)
560- AC_PATH_PROGS(STRIP, strip, echo not_strip)
561- AC_PATH_PROGS(WINDRES, windres, echo not_windres)
562- if test -z "$HOST_CC"; then
563- HOST_CC="$CC"
564- fi
565- if test -z "$HOST_CFLAGS"; then
566- HOST_CFLAGS="$CFLAGS"
567- fi
568-fi
569-
570 if test "$GCC" = "yes"; then
571 GNU_CC=1
572 fi
573@@ -514,11 +489,8 @@
574 ;;
575 esac
576
577-if test "$cross_compiling" = "yes"; then
578+
579 CROSS_COMPILE=1
580-else
581- CROSS_COMPILE=
582-fi
583
584 dnl ========================================================
585 dnl Check for gcc -pipe support
586@@ -2286,10 +2258,7 @@
587 *-darwin*|*-beos*|*-os2*)
588 ;;
589 *)
590- AC_CHECK_LIB(dl, dlopen,
591- AC_CHECK_HEADER(dlfcn.h,
592- OS_LIBS="-ldl $OS_LIBS"))
593- ;;
594+ AC_CHECK_LIB(dl, dlopen)
595 esac
596
597
598@@ -2907,6 +2876,8 @@
599 dnl pr/tests/w16gui/Makefile
600 dnl tools/Makefile
601
602+m4_pattern_allow(AS_BIN)
603+
604 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
605 MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
606 elif test -n "$USE_PTHREADS"; then
607@@ -2922,3 +2893,5 @@
608 echo $MAKEFILES > unallmakefiles
609
610 AC_OUTPUT([$MAKEFILES], [chmod +x config/nspr-config])
611+
612+
613Index: offscreen/js/src/Makefile.in
614===================================================================
615--- offscreen.orig/js/src/Makefile.in 2009-12-09 13:10:12.000000000 +0000
616+++ offscreen/js/src/Makefile.in 2009-12-09 13:10:12.000000000 +0000
617@@ -513,20 +513,8 @@
618
619 export:: jsautocfg.h
620
621-ifeq (,$(CROSS_COMPILE)$(GNU_CC)$(filter-out WINNT,$(OS_ARCH)))
622 jsautocfg.h:
623 touch $@
624-else
625-ifeq ($(OS_ARCH),WINCE)
626-jsautocfg.h:
627- touch $@
628-else
629-jsautocfg.h: jscpucfg$(HOST_BIN_SUFFIX)
630- @rm -f $@ jsautocfg.tmp
631- ./jscpucfg > jsautocfg.tmp
632- mv jsautocfg.tmp $@
633-endif
634-endif
635
636 # jscpucfg is a strange target
637 # Needs to be built with the host compiler but needs to include
638@@ -556,7 +544,7 @@
639 echo no need to build jscpucfg $<
640 else
641 jscpucfg$(HOST_BIN_SUFFIX): jscpucfg.cpp Makefile.in
642- $(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) $(HOST_OUTOPTION)$@ $<
643+ $(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) -I$(DIST)/sdk/include $(NSPR_CFLAGS) $(HOST_OUTOPTION)$@ $<
644 endif
645 endif
646
647Index: offscreen/js/src/xpconnect/loader/mozJSComponentLoader.cpp
648===================================================================
649--- offscreen.orig/js/src/xpconnect/loader/mozJSComponentLoader.cpp 2009-12-09 13:10:12.000000000 +0000
650+++ offscreen/js/src/xpconnect/loader/mozJSComponentLoader.cpp 2009-12-09 13:10:12.000000000 +0000
651@@ -47,6 +47,8 @@
652
653 #include <stdarg.h>
654
655+#include "mozilla-config.h"
656+
657 #include "prlog.h"
658
659 #include "nsCOMPtr.h"
660Index: offscreen/js/src/xpconnect/loader/mozJSSubScriptLoader.cpp
661===================================================================
662--- offscreen.orig/js/src/xpconnect/loader/mozJSSubScriptLoader.cpp 2009-12-09 13:10:12.000000000 +0000
663+++ offscreen/js/src/xpconnect/loader/mozJSSubScriptLoader.cpp 2009-12-09 13:10:12.000000000 +0000
664@@ -39,6 +39,8 @@
665 *
666 * ***** END LICENSE BLOCK ***** */
667
668+#include "mozilla-config.h"
669+
670 #if !defined(XPCONNECT_STANDALONE) && !defined(NO_SUBSCRIPT_LOADER)
671
672 #include "mozJSSubScriptLoader.h"
673Index: offscreen/toolkit/mozapps/update/src/updater/Makefile.in
674===================================================================
675--- offscreen.orig/toolkit/mozapps/update/src/updater/Makefile.in 2009-12-09 13:10:12.000000000 +0000
676+++ offscreen/toolkit/mozapps/update/src/updater/Makefile.in 2009-12-09 13:10:12.000000000 +0000
677@@ -56,7 +56,7 @@
678
679 LIBS += \
680 $(DEPTH)/modules/libmar/src/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \
681- $(BZ2_LIBS) \
682+ $(BZ2_LIBS) -lpthread \
683 $(NULL)
684
685 ifeq ($(OS_ARCH),WINNT)
686Index: offscreen/xpcom/sample/program/Makefile.in
687===================================================================
688--- offscreen.orig/xpcom/sample/program/Makefile.in 2009-12-09 13:10:12.000000000 +0000
689+++ offscreen/xpcom/sample/program/Makefile.in 2009-12-09 13:10:12.000000000 +0000
690@@ -57,7 +57,7 @@
691 # that the application be linked against the XPCOM dynamic library or the NSPR
692 # dynamic libraries.
693 LIBS = \
694- $(XPCOM_STANDALONE_GLUE_LDOPTS) \
695+ $(XPCOM_STANDALONE_GLUE_LDOPTS) -ldl \
696 $(NULL)
697
698 # Need to link with CoreFoundation on Mac
699Index: offscreen/xpcom/tools/registry/Makefile.in
700===================================================================
701--- offscreen.orig/xpcom/tools/registry/Makefile.in 2009-12-09 13:10:12.000000000 +0000
702+++ offscreen/xpcom/tools/registry/Makefile.in 2009-12-09 13:10:12.000000000 +0000
703@@ -54,7 +54,7 @@
704 SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=$(BIN_SUFFIX))
705
706 LIBS = \
707- $(XPCOM_STANDALONE_GLUE_LDOPTS) \
708+ $(XPCOM_STANDALONE_GLUE_LDOPTS) -ldl \
709 $(NULL)
710
711 # Need to link with CoreFoundation on Mac
712Index: offscreen/xulrunner/app/Makefile.in
713===================================================================
714--- offscreen.orig/xulrunner/app/Makefile.in 2009-12-09 13:10:12.000000000 +0000
715+++ offscreen/xulrunner/app/Makefile.in 2009-12-09 13:10:12.000000000 +0000
716@@ -173,7 +173,7 @@
717 RCFLAGS += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
718 endif
719
720-LIBS += $(JEMALLOC_LIBS)
721+LIBS += $(JEMALLOC_LIBS) -lpthread -ldl
722
723 include $(topsrcdir)/config/rules.mk
724
725Index: offscreen/xulrunner/stub/Makefile.in
726===================================================================
727--- offscreen.orig/xulrunner/stub/Makefile.in 2009-12-09 13:10:12.000000000 +0000
728+++ offscreen/xulrunner/stub/Makefile.in 2009-12-09 13:10:12.000000000 +0000
729@@ -100,7 +100,7 @@
730 endif
731 endif
732
733-LIBS += $(JEMALLOC_LIBS)
734+LIBS += $(JEMALLOC_LIBS) -lpthread -ldl
735
736 include $(topsrcdir)/config/rules.mk
737
738Index: offscreen/modules/plugin/test/testplugin/Makefile.in
739===================================================================
740--- offscreen.orig/modules/plugin/test/testplugin/Makefile.in 2009-12-09 13:10:12.000000000 +0000
741+++ offscreen/modules/plugin/test/testplugin/Makefile.in 2009-12-09 13:10:12.000000000 +0000
742@@ -60,9 +60,7 @@
743 CMMSRCS = nptest_macosx.mm
744 endif
745
746-ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
747 CPPSRCS += nptest_gtk2.cpp
748-endif
749
750 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
751 CPPSRCS += nptest_os2.cpp
752Index: offscreen/js/src/aclocal.m4
753===================================================================
754--- offscreen.orig/js/src/aclocal.m4 2009-12-09 13:10:12.000000000 +0000
755+++ offscreen/js/src/aclocal.m4 2009-12-09 13:39:01.000000000 +0000
756@@ -8,6 +8,4 @@
757 builtin(include, build/autoconf/altoptions.m4)dnl
758 builtin(include, build/autoconf/moznbytetype.m4)dnl
759 builtin(include, build/autoconf/mozprog.m4)dnl
760-builtin(include, build/autoconf/acwinpaths.m4)dnl
761
762-MOZ_PROG_CHECKMSYS()
763Index: offscreen/toolkit/toolkit-makefiles.sh
764===================================================================
765--- offscreen.orig/toolkit/toolkit-makefiles.sh 2009-12-09 13:10:12.000000000 +0000
766+++ offscreen/toolkit/toolkit-makefiles.sh 2009-12-09 13:10:12.000000000 +0000
767@@ -369,7 +369,6 @@
768 modules/plugin/sdk/samples/Makefile
769 modules/plugin/sdk/samples/common/Makefile
770 modules/plugin/sdk/samples/basic/windows/Makefile
771- modules/plugin/sdk/samples/basic/unix/Makefile
772 modules/plugin/sdk/samples/winless/windows/Makefile
773 "
774
diff --git a/meta/packages/mozilla-headless/mozilla-headless/i386/jsautocfg.h b/meta/packages/mozilla-headless/mozilla-headless/i386/jsautocfg.h
deleted file mode 100644
index 94b44f8e14..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/i386/jsautocfg.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef js_cpucfg___
2#define js_cpucfg___
3
4/* AUTOMATICALLY GENERATED - DO NOT EDIT */
5
6#define IS_LITTLE_ENDIAN 1
7#undef IS_BIG_ENDIAN
8
9
10#define JS_BYTES_PER_WORD 4L
11#define JS_BYTES_PER_DOUBLE 8L
12#define JS_BITS_PER_WORD_LOG2 5L
13#define JS_ALIGN_OF_POINTER 4L
14
15#define JS_THREADSAFE 1
16
17#define JS_STACK_GROWTH_DIRECTION (-1)
18
19#define JS_HAVE_LONG_LONG
20
21#endif /* js_cpucfg___ */
diff --git a/meta/packages/mozilla-headless/mozilla-headless/i486/jsautocfg.h b/meta/packages/mozilla-headless/mozilla-headless/i486/jsautocfg.h
deleted file mode 100644
index 94b44f8e14..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/i486/jsautocfg.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef js_cpucfg___
2#define js_cpucfg___
3
4/* AUTOMATICALLY GENERATED - DO NOT EDIT */
5
6#define IS_LITTLE_ENDIAN 1
7#undef IS_BIG_ENDIAN
8
9
10#define JS_BYTES_PER_WORD 4L
11#define JS_BYTES_PER_DOUBLE 8L
12#define JS_BITS_PER_WORD_LOG2 5L
13#define JS_ALIGN_OF_POINTER 4L
14
15#define JS_THREADSAFE 1
16
17#define JS_STACK_GROWTH_DIRECTION (-1)
18
19#define JS_HAVE_LONG_LONG
20
21#endif /* js_cpucfg___ */
diff --git a/meta/packages/mozilla-headless/mozilla-headless/i586/jsautocfg.h b/meta/packages/mozilla-headless/mozilla-headless/i586/jsautocfg.h
deleted file mode 100644
index 94b44f8e14..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/i586/jsautocfg.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef js_cpucfg___
2#define js_cpucfg___
3
4/* AUTOMATICALLY GENERATED - DO NOT EDIT */
5
6#define IS_LITTLE_ENDIAN 1
7#undef IS_BIG_ENDIAN
8
9
10#define JS_BYTES_PER_WORD 4L
11#define JS_BYTES_PER_DOUBLE 8L
12#define JS_BITS_PER_WORD_LOG2 5L
13#define JS_ALIGN_OF_POINTER 4L
14
15#define JS_THREADSAFE 1
16
17#define JS_STACK_GROWTH_DIRECTION (-1)
18
19#define JS_HAVE_LONG_LONG
20
21#endif /* js_cpucfg___ */
diff --git a/meta/packages/mozilla-headless/mozilla-headless/i686/jsautocfg.h b/meta/packages/mozilla-headless/mozilla-headless/i686/jsautocfg.h
deleted file mode 100644
index 94b44f8e14..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/i686/jsautocfg.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef js_cpucfg___
2#define js_cpucfg___
3
4/* AUTOMATICALLY GENERATED - DO NOT EDIT */
5
6#define IS_LITTLE_ENDIAN 1
7#undef IS_BIG_ENDIAN
8
9
10#define JS_BYTES_PER_WORD 4L
11#define JS_BYTES_PER_DOUBLE 8L
12#define JS_BITS_PER_WORD_LOG2 5L
13#define JS_ALIGN_OF_POINTER 4L
14
15#define JS_THREADSAFE 1
16
17#define JS_STACK_GROWTH_DIRECTION (-1)
18
19#define JS_HAVE_LONG_LONG
20
21#endif /* js_cpucfg___ */
diff --git a/meta/packages/mozilla-headless/mozilla-headless/mozconfig b/meta/packages/mozilla-headless/mozilla-headless/mozconfig
deleted file mode 100644
index 6123d11d27..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/mozconfig
+++ /dev/null
@@ -1,23 +0,0 @@
1# this line sets the directory for all build output
2mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-headless-release
3
4# comment out the previous line and uncomment these two for a debug build
5#mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-headless-debug
6#ac_add_options --disable-optimize --enable-debug
7
8# this is the line that enables the headless implementation
9ac_add_options --enable-default-toolkit=cairo-headless
10
11# comment out the previous line and uncomment these two for a GTK build
12#ac_add_options --enable-system-cairo
13#ac_add_options --enable-default-toolkit=cairo-gtk2
14
15ac_add_options --disable-tests
16ac_add_options --disable-javaxpcom
17ac_add_options --enable-application=xulrunner
18ac_add_options --enable-pango
19ac_add_options --disable-printing
20ac_add_options --disable-crashreporter
21ac_add_options --enable-plugins
22ac_add_options --disable-accessibility
23mk_add_options MOZ_CO_PROJECT=xulrunner
diff --git a/meta/packages/mozilla-headless/mozilla-headless/mozilla-jemalloc.patch b/meta/packages/mozilla-headless/mozilla-headless/mozilla-jemalloc.patch
deleted file mode 100644
index aabd6906e8..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/mozilla-jemalloc.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1diff -r f1af606531f5 memory/jemalloc/jemalloc.h
2--- a/memory/jemalloc/jemalloc.h Sat Nov 22 20:22:22 2008 +0100
3+++ b/memory/jemalloc/jemalloc.h Mon Dec 01 16:53:06 2008 -0500
4@@ -45,14 +45,14 @@
5 } jemalloc_stats_t;
6
7 #ifndef MOZ_MEMORY_DARWIN
8-void *malloc(size_t size);
9-void *valloc(size_t size);
10-void *calloc(size_t num, size_t size);
11-void *realloc(void *ptr, size_t size);
12-void free(void *ptr);
13+void *malloc(size_t size) __THROW __attribute_malloc__ __wur;
14+void *valloc(size_t size) __THROW __attribute_malloc__ __wur;
15+void *calloc(size_t num, size_t size) __THROW __attribute_malloc__ __wur;
16+void *realloc(void *ptr, size_t size) __THROW __attribute_malloc__ __wur;
17+void free(void *ptr) __THROW __attribute_malloc__ __wur;
18 #endif
19
20-int posix_memalign(void **memptr, size_t alignment, size_t size);
21+int posix_memalign(void **memptr, size_t alignment, size_t size) __THROW __attribute_malloc__ __wur;
22 void *memalign(size_t alignment, size_t size);
23 size_t malloc_usable_size(const void *ptr);
24 void jemalloc_stats(jemalloc_stats_t *stats);
diff --git a/meta/packages/mozilla-headless/mozilla-headless/removebadrpath-1a622cb7c384.patch b/meta/packages/mozilla-headless/mozilla-headless/removebadrpath-1a622cb7c384.patch
deleted file mode 100644
index 9409105780..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/removebadrpath-1a622cb7c384.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1Index: offscreen/js/src/configure.in
2===================================================================
3--- offscreen.orig/js/src/configure.in 2009-06-17 14:31:40.000000000 +0100
4+++ offscreen/js/src/configure.in 2009-06-17 14:31:40.000000000 +0100
5@@ -880,7 +880,7 @@
6 HOST_AR_FLAGS='$(AR_FLAGS)'
7
8 MOZ_JS_LIBS='-L$(libdir) -lmozjs'
9-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(PREFIX)/lib'
10+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
11
12 MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
13 MOZ_XPCOM_OBSOLETE_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom_compat'
14Index: offscreen/configure.in
15===================================================================
16--- offscreen.orig/configure.in 2009-06-17 15:09:44.000000000 +0100
17+++ offscreen/configure.in 2009-06-17 15:10:00.000000000 +0100
18@@ -1060,7 +1060,7 @@
19
20 MOZ_JS_LIBS='-L$(LIBXUL_DIST)/bin -lmozjs'
21 DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxpcom -lxpcom_core'
22-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
23+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
24 XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/bin -lxpcom'
25 LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) -lxul'
26 XPCOM_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) $(XPCOM_FROZEN_LDOPTS)'
diff --git a/meta/packages/mozilla-headless/mozilla-headless/removebadrpath.patch b/meta/packages/mozilla-headless/mozilla-headless/removebadrpath.patch
deleted file mode 100644
index 53ae6d3251..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless/removebadrpath.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1Index: offscreen/js/src/configure.in
2===================================================================
3--- offscreen.orig/js/src/configure.in 2009-12-09 13:38:51.000000000 +0000
4+++ offscreen/js/src/configure.in 2009-12-09 14:14:08.000000000 +0000
5@@ -858,7 +858,7 @@
6 HOST_AR_FLAGS='$(AR_FLAGS)'
7
8 MOZ_JS_LIBS='-L$(libdir) -lmozjs'
9-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(PREFIX)/lib'
10+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
11
12 MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
13
14@@ -3824,7 +3824,7 @@
15 [ --with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR.
16 See --with-nspr-cflags for more details.],
17 NSPR_LIBS=$withval)
18-$NSPR_LIBS="$NSPR_LIBS -L$(LIBXUL_DIST)/sdk/lib"
19+NSPR_LIBS="$NSPR_LIBS -L$(LIBXUL_DIST)/sdk/lib"
20 AC_SUBST(NSPR_CFLAGS)
21 AC_SUBST(NSPR_LIBS)
22
23Index: offscreen/configure.in
24===================================================================
25--- offscreen.orig/configure.in 2009-12-09 13:38:51.000000000 +0000
26+++ offscreen/configure.in 2009-12-09 14:31:33.000000000 +0000
27@@ -1041,7 +1041,7 @@
28
29 MOZ_JS_LIBS='-L$(LIBXUL_DIST)/bin -lmozjs'
30 DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxpcom -lxpcom_core'
31-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
32+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
33 XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/bin -lxpcom'
34 LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) -lxul'
35 XPCOM_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) $(XPCOM_FROZEN_LDOPTS)'
36@@ -8378,7 +8378,7 @@
37 if test "$BUILD_CTYPES"; then
38 # Run the libffi 'configure' script on platforms that it supports.
39 if test -z "$_MSC_VER"; then
40- ac_configure_args="--disable-shared --enable-static --disable-raw-api"
41+ ac_configure_args="$ac_configure_args --disable-shared --enable-static --disable-raw-api"
42 if test "$MOZ_DEBUG"; then
43 ac_configure_args="$ac_configure_args --enable-debug"
44 fi
diff --git a/meta/packages/mozilla-headless/mozilla-headless_hg.bb b/meta/packages/mozilla-headless/mozilla-headless_hg.bb
deleted file mode 100644
index 669c526163..0000000000
--- a/meta/packages/mozilla-headless/mozilla-headless_hg.bb
+++ /dev/null
@@ -1,99 +0,0 @@
1
2#file://0001-Adds-initial-Gtk-clipboard-support-to-moz-headless.patch;patch=1 \
3SRC_URI = "hg://hg.mozilla.org/incubator;protocol=http;module=offscreen \
4 file://configurefix-1a622cb7c384.patch;patch=1;rev=1a622cb7c384 \
5 file://configurefix.patch;patch=1;notrev=1a622cb7c384 \
6 file://mozilla-jemalloc.patch;patch=1 \
7 file://removebadrpath-1a622cb7c384.patch;patch=1;rev=1a622cb7c384 \
8 file://removebadrpath.patch;patch=1;notrev=1a622cb7c384 \
9 file://buildfixhack.patch;patch=1;notrev=1a622cb7c384 \
10 file://autoconffix.patch;patch=1 \
11 file://jsautocfg.h \
12 file://mozconfig"
13PV = "0.2+hg-1.0+${SRCPV}"
14PR = "r10"
15
16S = "${WORKDIR}/offscreen"
17
18DEPENDS = "gconf gnome-vfs pango dbus-glib alsa-lib libidl-native sqlite3 libidl"
19
20FILES_${PN} += "${libdir}/xulrunner-${XULVERSION} ${libdir}/xulrunner-devel-${XULVERSION}/sdk/lib/*.so"
21FILES_${PN}-dev += "${libdir}/xulrunner-devel-${XULVERSION}"
22FILES_${PN}-dbg += "${libdir}/xulrunner-devel-${XULVERSION}/sdk/lib/.debug"
23
24# Mozilla's build rules search for -L paths to find libraries. Its
25# not clever enough to know where the sysroot is and hence finds host
26# object files which is bad. We therefore tell pkg-config not to hide
27# paths. See config/rules.mk and the LIBS_DEPS and _LIBDIRS variables.
28export PKG_CONFIG_ALLOW_SYSTEM_LIBS = "1"
29
30TARGET_CC_ARCH = ""
31
32CFLAGS = "${TARGET_CFLAGS}"
33TARGET_CFLAGS = "-Os -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse -fasynchronous-unwind-tables"
34
35LDFLAGS = "${TARGET_LDFLAGS}"
36TARGET_LDFLAGS = "-Wl,-rpath,${libdir}/xulrunner-${XULVERSION}"
37
38export target_alias=${TARGET_PREFIX}
39
40inherit autotools mozilla
41
42acpaths = "-I ${S}/build/autoconf "
43
44export topsrcdir = "${S}"
45
46do_configure () {
47 if [ "${SRCREV}" != "1a622cb7c384" ]; then
48 rm -rf ${S}/build/autoconf/acwinpaths.m4
49 rm -rf ${S}/js/src/build/autoconf/acwinpaths.m4
50 rm -rf ${S}/nsprpub/build/autoconf/acwinpaths.m4
51 mkdir -p ${S}/js/src/dist/include
52 ln -fs ../../../../nsprpub/dist/include/nspr ${S}/js/src/dist/include/nsprpub
53 fi
54 cp ${S}/build/autoconf/install-sh ${S}
55 autotools_do_configure
56 # Yes, we run this twice. The first pass sets up npsrpub-config which then
57 # sets the values correctly on the second try. Ick.
58 autotools_do_configure
59}
60
61do_compile () {
62 cp ${WORKDIR}/jsautocfg.h ${S}/js/src/
63 #oe_runmake -f client.mk build_all
64 base_do_compile
65}
66
67XULVERSION = "1.9.3a1pre"
68
69do_install_append () {
70 install -d ${D}${sysconfdir}/ld.so.conf.d/
71 echo ${libdir}/xulrunner-${XULVERSION}/ > ${D}${sysconfdir}/ld.so.conf.d/mozilla-headless
72}
73
74EXTRA_OECONF =+ "--enable-application=xulrunner --enable-default-toolkit=cairo-headless --with-pthreads \
75 --enable-pango --enable-optimize --disable-debug --disable-tests \
76 --disable-printing --disable-crashreporter --disable-accessibility \
77 --disable-javaxpcom --enable-plugins --enable-system-sqlite --disable-necko-wifi"
78
79export LIBXUL_DIST="${S}/dist"
80
81SYSROOT_PREPROCESS_FUNCS += "mozilla_sysroot_preprocess"
82
83mozilla_sysroot_preprocess () {
84 autotools_stage_dir ${D}/${libdir}/xulrunner-${XULVERSION} ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-${XULVERSION}/
85 autotools_stage_dir ${D}/${libdir}/xulrunner-devel-${XULVERSION} ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/
86
87 ln -fs ${STAGING_DIR_HOST}${libdir}/xulrunner-${XULVERSION}/ ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/bin
88 ln -fs ${STAGING_DIR_HOST}${datadir}/xulrunner-${XULVERSION}/unstable/ ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/idl
89 ln -fs ${STAGING_DIR_HOST}${includedir}/xulrunner-${XULVERSION}/unstable/ ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/include
90 ln -fs ${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/sdk/lib/ ${SYSROOT_DESTDIR}${STAGING_DIR_HOST}${libdir}/xulrunner-devel-${XULVERSION}/lib
91
92 install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
93 install -m 755 ${S}/dist/host/bin/host_xpidl ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/xpidl
94}
95
96__anonymous () {
97 if bb.data.getVar("SRCREV", d, True) == "1a622cb7c384":
98 bb.data.setVar("XULVERSION", "1.9.2a1pre", d)
99}
diff --git a/meta/packages/mozilla/files/eabi-fix.patch b/meta/packages/mozilla/files/eabi-fix.patch
deleted file mode 100644
index fd3bb88683..0000000000
--- a/meta/packages/mozilla/files/eabi-fix.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1http://lists.debian.org/debian-arm/2007/05/msg00039.html
2
3From: Lennert Buytenhek <buytenh@wantstofly.org>
4
5Hi,
6
7The reason that building nss (i.e., firefox) would segfault on ARM EABI
8systems is an assumption about the layout of the jmp_buf structure in
9the nspr library (which nss depends on) that does hold on old-ABI but
10no longer holds on EABI. The attached patch fixes this assumption,
11and fixes the shlibsign segfault during the building of nss (it also
12fixes a floating point byte order assumption.)
13
14Looks sane?
15
16It's of course a stupid idea to depend on a particular layout of the
17jmp_buf structure in application programs, but oh well. People write
18ugly buggy code, film at 11.
19
20
21--- mozilla/nsprpub/pr/src/misc/prdtoa.c.orig 2007-05-06 02:39:00.000000000 +0200
22+++ mozilla/nsprpub/pr/src/misc/prdtoa.c 2007-05-06 02:39:22.000000000 +0200
23@@ -59,8 +59,8 @@
24 /* FIXME: deal with freelist and p5s. */
25 }
26
27-#if defined(__arm) || defined(__arm__) || defined(__arm26__) \
28- || defined(__arm32__)
29+#if (defined(__arm) || defined(__arm__) || defined(__arm26__) \
30+ || defined(__arm32__)) && !defined(__ARM_EABI__) && !defined(__ARMEB__)
31 #define IEEE_ARM
32 #elif defined(IS_LITTLE_ENDIAN)
33 #define IEEE_8087
34--- mozilla/nsprpub/pr/include/md/_linux.h.orig 2007-05-06 02:39:45.000000000 +0200
35+++ mozilla/nsprpub/pr/include/md/_linux.h 2007-05-06 02:40:57.000000000 +0200
36@@ -346,7 +346,7 @@
37 #error "Linux/MIPS pre-glibc2 not supported yet"
38 #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
39
40-#elif defined(__arm__)
41+#elif defined(__arm__) && !defined(__ARM_EABI__)
42 /* ARM/Linux */
43 #if defined(__GLIBC__) && __GLIBC__ >= 2
44 #define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[20]
45@@ -358,6 +358,18 @@
46 #error "ARM/Linux pre-glibc2 not supported yet"
47 #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
48
49+#elif defined(__arm__) && defined(__ARM_EABI__)
50+/* ARM/Linux */
51+#if defined(__GLIBC__) && __GLIBC__ >= 2
52+#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[8]
53+#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[7] = (val))
54+#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t))
55+#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[7])
56+#define _MD_SP_TYPE __ptr_t
57+#else
58+#error "ARM/Linux pre-glibc2 not supported yet"
59+#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
60+
61 #else
62
63 #error "Unknown CPU architecture"
64
65
66
diff --git a/meta/packages/mozilla/files/eabi-fix2.patch b/meta/packages/mozilla/files/eabi-fix2.patch
deleted file mode 100644
index 5f64e7f796..0000000000
--- a/meta/packages/mozilla/files/eabi-fix2.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1https://bugzilla.mozilla.org/show_bug.cgi?id=369722
2
3Index: js/src/jsnum.h
4===================================================================
5RCS file: /cvsroot/mozilla/js/src/jsnum.h,v
6retrieving revision 3.27
7diff -p -u -8 -r3.27 jsnum.h
8--- mozilla/js/src/jsnum.h 21 Dec 2006 01:00:32 -0000 3.27
9+++ mozilla/js/src/jsnum.h 8 Feb 2007 12:13:01 -0000
10@@ -52,23 +52,24 @@ JS_BEGIN_EXTERN_C
11
12 /*
13 * Stefan Hanske <sh990154@mail.uni-greifswald.de> reports:
14 * ARM is a little endian architecture but 64 bit double words are stored
15 * differently: the 32 bit words are in little endian byte order, the two words
16 * are stored in big endian`s way.
17 */
18
19-#if defined(__arm) || defined(__arm32__) || defined(__arm26__) || defined(__arm__)
20-#define CPU_IS_ARM
21+#if !defined(__ARM_EABI__) && \
22+ (defined(__arm) || defined(__arm32__) || defined(__arm26__) || defined(__arm__))
23+#define IEEE_ARM
24 #endif
25
26 typedef union jsdpun {
27 struct {
28-#if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
29+#if defined(IS_LITTLE_ENDIAN) && !defined(IEEE_ARM)
30 uint32 lo, hi;
31 #else
32 uint32 hi, lo;
33 #endif
34 } s;
35 jsdouble d;
36 } jsdpun;
37
38@@ -87,17 +88,17 @@ typedef union jsdpun {
39
40 #else /* not or old GNUC */
41
42 /*
43 * We don't know of any non-gcc compilers that perform alias optimization,
44 * so this code should work.
45 */
46
47-#if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
48+#if defined(IS_LITTLE_ENDIAN) && !defined(IEEE_ARM)
49 #define JSDOUBLE_HI32(x) (((uint32 *)&(x))[1])
50 #define JSDOUBLE_LO32(x) (((uint32 *)&(x))[0])
51 #else
52 #define JSDOUBLE_HI32(x) (((uint32 *)&(x))[0])
53 #define JSDOUBLE_LO32(x) (((uint32 *)&(x))[1])
54 #endif
55
56 #define JSDOUBLE_SET_HI32(x, y) (JSDOUBLE_HI32(x)=(y))
diff --git a/meta/packages/mozilla/files/eabi-fix3.patch b/meta/packages/mozilla/files/eabi-fix3.patch
deleted file mode 100644
index 8bf8c2f4da..0000000000
--- a/meta/packages/mozilla/files/eabi-fix3.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1From: Marcin Juszkiewicz <openembedded@hrw.one.pl>
2
3Index: mozilla/extensions/transformiix/source/base/Double.cpp
4===================================================================
5--- mozilla.orig/extensions/transformiix/source/base/Double.cpp 2007-05-09 11:21:34.000000000 +0200
6+++ mozilla/extensions/transformiix/source/base/Double.cpp 2007-05-09 11:23:59.000000000 +0200
7@@ -71,7 +71,7 @@
8 * are stored in big endian`s way.
9 */
10
11-#if defined(__arm) || defined(__arm32__) || defined(_arm26__) || defined(__arm__)
12+#if !defined(__ARM_EABI__) && defined(__arm) || defined(__arm32__) || defined(_arm26__) || defined(__arm__)
13 #define CPU_IS_ARM
14 #endif
15
diff --git a/meta/packages/mozilla/files/minimo.desktop b/meta/packages/mozilla/files/minimo.desktop
deleted file mode 100644
index 5ef0f2075a..0000000000
--- a/meta/packages/mozilla/files/minimo.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
1[Desktop Entry]
2Name=Minimo
3Comment=Minimo web browser
4Exec=minimo http://www.mozilla.org/projects/minimo/home.html
5Terminal=0
6Type=Application
7Icon=minimo.png
8Categories=Application;Network;
9StartupNotify=True
diff --git a/meta/packages/mozilla/files/minimo.png b/meta/packages/mozilla/files/minimo.png
deleted file mode 100644
index f8b2e2192b..0000000000
--- a/meta/packages/mozilla/files/minimo.png
+++ /dev/null
Binary files differ
diff --git a/meta/packages/mozilla/minimo/bug-322806.diff b/meta/packages/mozilla/minimo/bug-322806.diff
deleted file mode 100644
index e001e3fc67..0000000000
--- a/meta/packages/mozilla/minimo/bug-322806.diff
+++ /dev/null
@@ -1,13 +0,0 @@
1See https://bugzilla.mozilla.org/show_bug.cgi?id=322806 and http://bugs.openembedded.org/show_bug.cgi?id=1600
2
3--- /tmp/xptcinvoke_arm.cpp 2006-12-10 20:02:57.000000000 +0100
4+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp 2006-12-10 20:03:54.592227000 +0100
5@@ -212,7 +212,7 @@
6 "add sp, sp, r4 \n\t" /* restore stack pointer */
7 "mov %0, r0 \n\t" /* the result... */
8 : "=r" (result)
9- : "r" (&my_params)
10+ : "r" (&my_params), "m" (my_params)
11 : "r0", "r1", "r2", "r3", "r4", "ip", "lr", "sp"
12 );
13
diff --git a/meta/packages/mozilla/minimo/minimo b/meta/packages/mozilla/minimo/minimo
deleted file mode 100644
index d130173adf..0000000000
--- a/meta/packages/mozilla/minimo/minimo
+++ /dev/null
@@ -1,4 +0,0 @@
1#!/bin/sh
2export MOZILLA_FIVE_HOME=/usr/lib/mozilla-minimo
3export LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME}
4exec ${MOZILLA_FIVE_HOME}/minimo "$@"
diff --git a/meta/packages/mozilla/minimo/minimo.patch b/meta/packages/mozilla/minimo/minimo.patch
deleted file mode 100644
index 8894ee7f45..0000000000
--- a/meta/packages/mozilla/minimo/minimo.patch
+++ /dev/null
@@ -1,356 +0,0 @@
1Index: mozilla/content/html/content/src/nsFormSubmission.cpp
2===================================================================
3--- mozilla.orig/content/html/content/src/nsFormSubmission.cpp 2005-07-13 18:55:59.000000000 +0200
4+++ mozilla/content/html/content/src/nsFormSubmission.cpp 2007-05-10 12:11:20.000000000 +0200
5@@ -1315,11 +1315,6 @@
6 nsresult rv = NS_OK;
7
8 nsCAutoString charset(aCharset);
9- // canonical name is passed so that we just have to check against
10- // *our* canonical names listed in charsetaliases.properties
11- if (charset.EqualsLiteral("ISO-8859-1")) {
12- charset.AssignLiteral("windows-1252");
13- }
14
15 // use UTF-8 for UTF-16* and UTF-32* (per WHATWG and existing practice of
16 // MS IE/Opera).
17Index: mozilla/embedding/base/Makefile.in
18===================================================================
19--- mozilla.orig/embedding/base/Makefile.in 2006-02-14 06:28:31.000000000 +0100
20+++ mozilla/embedding/base/Makefile.in 2007-05-10 12:11:20.000000000 +0200
21@@ -43,6 +43,7 @@
22
23 MODULE = embed_base
24 LIBRARY_NAME = embed_base_s
25+EXPORT_LIBRARY = 1
26 XPIDL_MODULE = embed_base
27
28 include $(DEPTH)/config/autoconf.mk
29Index: mozilla/js/src/Makefile.in
30===================================================================
31--- mozilla.orig/js/src/Makefile.in 2006-07-28 00:56:20.000000000 +0200
32+++ mozilla/js/src/Makefile.in 2007-05-10 12:11:21.000000000 +0200
33@@ -46,6 +46,7 @@
34
35 MODULE = js
36 LIBRARY_NAME = mozjs
37+EXPORT_LIBRARY = 1
38 LIB_IS_C_ONLY = 1
39 GRE_MODULE = 1
40
41Index: mozilla/minimo/Makefile.in
42===================================================================
43--- mozilla.orig/minimo/Makefile.in 2006-07-24 21:40:53.000000000 +0200
44+++ mozilla/minimo/Makefile.in 2007-05-10 12:13:46.000000000 +0200
45@@ -41,6 +41,6 @@
46
47 include $(DEPTH)/config/autoconf.mk
48
49-DIRS = config components chrome locales customization base extensions
50+DIRS = config chrome locales customization base extensions
51
52 include $(topsrcdir)/config/rules.mk
53Index: mozilla/minimo/base/Makefile.in
54===================================================================
55--- mozilla.orig/minimo/base/Makefile.in 2006-08-09 17:42:26.000000000 +0200
56+++ mozilla/minimo/base/Makefile.in 2007-05-10 12:11:21.000000000 +0200
57@@ -96,7 +96,6 @@
58
59 # this should move into the toolkit!
60 LOCAL_INCLUDES = -I$(srcdir) -I$(topsrcdir)/xpfe/browser/src/
61-CPPSRCS += nsBrowserStatusFilter.cpp nsBrowserInstance.cpp
62
63 ifdef WINCE
64 RCINCLUDE = wince/SplashScreen.rc
65@@ -143,10 +142,6 @@
66 endif
67
68
69-FINAL_LINK_COMPS=$(topsrcdir)/minimo/base/$(FINAL_PLATFORM)/minimo-link-comps
70-FINAL_LINK_COMP_NAMES=$(topsrcdir)/minimo/base/$(FINAL_PLATFORM)/minimo-link-names
71-FINAL_LINK_LIBS=$(topsrcdir)/minimo/base/$(FINAL_PLATFORM)/minimo-link-libs
72-
73 include $(topsrcdir)/config/static-config.mk
74
75 EXTRA_DEPS += $(STATIC_EXTRA_DEPS)
76@@ -180,14 +175,11 @@
77 # (same as in mozilla/js/src/Makefile.in)
78 ifdef WINCE
79 LDFLAGS += -OPT:NOICF
80+else
81+# Hack to work around libxpcom_core.a / libunicharutil_s.a link order problem.
82+LDFLAGS += -u NS_StringGetData_P -u NS_StringGetMutableData_P
83 endif
84
85-export::
86- $(NSINSTALL) $(topsrcdir)/xpfe/browser/src/nsBrowserStatusFilter.cpp .
87- $(NSINSTALL) $(topsrcdir)/xpfe/browser/src/nsBrowserInstance.cpp .
88-
89-
90-GARBAGE += nsBrowserStatusFilter.cpp nsBrowserInstance.cpp
91
92 ifdef WINCE
93 package::
94Index: mozilla/minimo/base/Minimo.cpp
95===================================================================
96--- mozilla.orig/minimo/base/Minimo.cpp 2006-10-27 22:30:36.000000000 +0200
97+++ mozilla/minimo/base/Minimo.cpp 2007-05-10 12:13:21.000000000 +0200
98@@ -813,6 +813,8 @@
99 #ifdef MOZ_WIDGET_GTK2
100 gtk_set_locale();
101 gtk_init(&argc, &argv);
102+ gtk_widget_set_default_visual(gdk_rgb_get_visual());
103+ gtk_widget_set_default_colormap(gdk_rgb_get_cmap());
104 #endif
105
106 #ifdef HACKY_PRE_LOAD_LIBRARY
107Index: mozilla/minimo/base/SplashScreen.cpp
108===================================================================
109--- mozilla.orig/minimo/base/SplashScreen.cpp 2006-08-21 21:00:24.000000000 +0200
110+++ mozilla/minimo/base/SplashScreen.cpp 2007-05-10 12:11:22.000000000 +0200
111@@ -202,9 +202,24 @@
112 void KillSplashScreen() {}
113 void GetScreenSize(unsigned long* x, unsigned long* y)
114 {
115+#ifdef MOZ_WIDGET_GTK2
116+ GdkDisplay* display = gdk_display_get_default();
117+ if (display != NULL)
118+ {
119+ GdkScreen *screen;
120+ screen = gdk_display_get_default_screen(display);
121+ *x = gdk_screen_get_width(screen);
122+ *y = gdk_screen_get_height(screen);
123+ }
124+ else
125+ {
126+#endif
127 // we need to figure this out.
128 *x = 240;
129 *y = 320;
130+#ifdef MOZ_WIDGET_GTK2
131+ }
132+#endif
133 }
134
135
136Index: mozilla/minimo/config/linux_package.sh
137===================================================================
138--- mozilla.orig/minimo/config/linux_package.sh 2006-06-30 18:35:19.000000000 +0200
139+++ mozilla/minimo/config/linux_package.sh 2007-05-10 12:11:22.000000000 +0200
140@@ -29,9 +29,7 @@
141 cp -pRL bin/libnssckbi.so minimo
142 cp -pRL bin/libsmime3.so minimo
143 cp -pRL bin/libsoftokn3.so minimo
144-cp -pRL bin/libsoftokn3.chk minimo
145 cp -pRL bin/libfreebl3.so minimo
146-cp -pRL bin/libfreebl3.chk minimo
147 cp -pRL bin/libssl3.so minimo
148
149 mkdir -p minimo/chrome
150@@ -62,8 +60,6 @@
151 cp -pRL bin/components/nsHelperAppDlg.js minimo/components
152 cp -pRL bin/components/nsProgressDialog.js minimo/components
153
154-cp -pRL bin/extensions/spatial-navigation@extensions.mozilla.org/components/* minimo/components
155-
156 mkdir -p minimo/greprefs
157 cp -pRL bin/greprefs/* minimo/greprefs
158
159@@ -80,7 +76,7 @@
160
161 echo Linking XPT files.
162
163-bin/xpt_link minimo/components/all.xpt bin/components/*.xpt
164+host/bin/host_xpt_link minimo/components/all.xpt bin/components/*.xpt
165
166 echo Chewing on chrome
167
168Index: mozilla/profile/dirserviceprovider/src/Makefile.in
169===================================================================
170--- mozilla.orig/profile/dirserviceprovider/src/Makefile.in 2005-04-06 05:35:21.000000000 +0200
171+++ mozilla/profile/dirserviceprovider/src/Makefile.in 2007-05-10 12:11:23.000000000 +0200
172@@ -44,6 +44,7 @@
173
174 MODULE = profdirserviceprovider
175 LIBRARY_NAME = profdirserviceprovider_s
176+EXPORT_LIBRARY = 1
177 MOZILLA_INTERNAL_API = 1
178
179 REQUIRES = xpcom \
180Index: mozilla/security/coreconf/Linux.mk
181===================================================================
182--- mozilla.orig/security/coreconf/Linux.mk 2006-02-03 23:26:36.000000000 +0100
183+++ mozilla/security/coreconf/Linux.mk 2007-05-10 12:11:23.000000000 +0200
184@@ -117,6 +117,10 @@
185 OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
186 CPU_ARCH = mips
187 else
188+ifeq ($(OS_TEST),arm)
189+ OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
190+ CPU_ARCH = arm
191+else
192 OS_REL_CFLAGS = -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
193 CPU_ARCH = x86
194 endif
195@@ -133,6 +137,7 @@
196 endif
197 endif
198 endif
199+endif
200
201
202 LIBC_TAG = _glibc
203Index: mozilla/security/coreconf/arch.mk
204===================================================================
205--- mozilla.orig/security/coreconf/arch.mk 2006-02-03 23:26:36.000000000 +0100
206+++ mozilla/security/coreconf/arch.mk 2007-05-10 12:11:24.000000000 +0200
207@@ -60,18 +60,14 @@
208 64BIT_TAG=
209 endif
210
211-OS_ARCH := $(subst /,_,$(shell uname -s))
212+OS_ARCH := Linux
213
214 #
215 # Attempt to differentiate between sparc and x86 Solaris
216 #
217
218-OS_TEST := $(shell uname -m)
219-ifeq ($(OS_TEST),i86pc)
220- OS_RELEASE := $(shell uname -r)_$(OS_TEST)
221-else
222- OS_RELEASE := $(shell uname -r)
223-endif
224+OS_TEST := arm
225+OS_RELEASE := 2.6
226
227 #
228 # Force the IRIX64 machines to use IRIX.
229Index: mozilla/toolkit/components/build/Makefile.in
230===================================================================
231--- mozilla.orig/toolkit/components/build/Makefile.in 2006-07-13 22:08:29.000000000 +0200
232+++ mozilla/toolkit/components/build/Makefile.in 2007-05-10 12:11:27.000000000 +0200
233@@ -112,7 +112,6 @@
234 $(NULL)
235
236 SHARED_LIBRARY_LIBS = \
237- ../startup/src/$(LIB_PREFIX)appstartup_s.$(LIB_SUFFIX) \
238 $(NULL)
239
240 ifdef MOZ_XPINSTALL
241Index: mozilla/toolkit/components/startup/src/Makefile.in
242===================================================================
243--- mozilla.orig/toolkit/components/startup/src/Makefile.in 2005-07-27 22:42:44.000000000 +0200
244+++ mozilla/toolkit/components/startup/src/Makefile.in 2007-05-10 12:11:27.000000000 +0200
245@@ -43,6 +43,7 @@
246
247 MODULE = toolkitcomps
248 LIBRARY_NAME = appstartup_s
249+EXPORT_LIBRARY = 1
250 FORCE_STATIC_LIB = 1
251 LIBXUL_LIBRARY = 1
252
253Index: mozilla/toolkit/xre/Makefile.in
254===================================================================
255--- mozilla.orig/toolkit/xre/Makefile.in 2007-02-06 08:13:20.000000000 +0100
256+++ mozilla/toolkit/xre/Makefile.in 2007-05-10 12:11:27.000000000 +0200
257@@ -45,7 +45,6 @@
258
259 MODULE = xulapp
260 LIBRARY_NAME = xulapp_s
261-EXPORT_LIBRARY = 1
262 LIBXUL_LIBRARY = 1
263
264 REQUIRES = \
265@@ -180,14 +179,6 @@
266
267 include $(topsrcdir)/config/rules.mk
268
269-ifdef BUILD_STATIC_LIBS
270-export::
271- @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMP_NAMES) Apprunner
272-# embedding/browser/gtk/src/Makefile.in sucks! we need to add an empty line to
273-# FINAL_LINK_COMPS to keep the two lists in sync :-(
274- @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMPS) ""
275-endif
276-
277 LOCAL_INCLUDES += \
278 -I$(srcdir) \
279 -I$(topsrcdir)/xpfe/bootstrap \
280Index: mozilla/xpcom/build/Makefile.in
281===================================================================
282--- mozilla.orig/xpcom/build/Makefile.in 2006-01-29 17:51:02.000000000 +0100
283+++ mozilla/xpcom/build/Makefile.in 2007-05-10 12:11:27.000000000 +0200
284@@ -61,7 +61,7 @@
285 endif
286
287 # Do not set EXPORT_LIBRARY as we do not want xpcom in the static libs list
288-#EXPORT_LIBRARY = 1
289+EXPORT_LIBRARY = 1
290 GRE_MODULE = 1
291 MOZILLA_INTERNAL_API = 1
292
293Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp
294===================================================================
295--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2004-04-18 16:18:18.000000000 +0200
296+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2007-05-10 12:11:27.000000000 +0200
297@@ -45,9 +45,9 @@
298 #endif
299
300 /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */
301-static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch");
302+nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch");
303
304-static nsresult
305+nsresult
306 PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
307 {
308 #define PARAM_BUFFER_COUNT 16
309Index: mozilla/xpfe/browser/src/Makefile.in
310===================================================================
311--- mozilla.orig/xpfe/browser/src/Makefile.in 2005-03-18 22:23:45.000000000 +0100
312+++ mozilla/xpfe/browser/src/Makefile.in 2007-05-10 12:11:27.000000000 +0200
313@@ -44,6 +44,7 @@
314
315 MODULE = browser
316 LIBRARY_NAME = mozbrwsr_s
317+EXPORT_LIBRARY = 1
318 FORCE_STATIC_LIB = 1
319 LIBXUL_LIBRARY = 1
320 MODULE_NAME = nsBrowserModule
321Index: mozilla/xpfe/components/build/Makefile.in
322===================================================================
323--- mozilla.orig/xpfe/components/build/Makefile.in 2005-09-27 02:15:25.000000000 +0200
324+++ mozilla/xpfe/components/build/Makefile.in 2007-05-10 12:11:27.000000000 +0200
325@@ -44,7 +44,6 @@
326
327 MODULE = appcomps
328 LIBRARY_NAME = appcomps
329-EXPORT_LIBRARY = 1
330 IS_COMPONENT = 1
331 MODULE_NAME = application
332 LIBXUL_LIBRARY = 1
333Index: mozilla/xpfe/components/filepicker/src/Makefile.in
334===================================================================
335--- mozilla.orig/xpfe/components/filepicker/src/Makefile.in 2006-05-22 18:29:32.000000000 +0200
336+++ mozilla/xpfe/components/filepicker/src/Makefile.in 2007-05-10 12:11:27.000000000 +0200
337@@ -47,7 +47,6 @@
338 MODULE = filepicker
339 LIBRARY_NAME = fileview
340 SHORT_LIBNAME = fileview
341-EXPORT_LIBRARY = 1
342 IS_COMPONENT = 1
343 MODULE_NAME = nsFileViewModule
344 MOZILLA_INTERNAL_API = 1
345Index: mozilla/xpfe/components/find/src/Makefile.in
346===================================================================
347--- mozilla.orig/xpfe/components/find/src/Makefile.in 2005-03-18 22:23:46.000000000 +0100
348+++ mozilla/xpfe/components/find/src/Makefile.in 2007-05-10 12:11:27.000000000 +0200
349@@ -45,7 +45,6 @@
350 MODULE = appcomps
351 XPIDL_MODULE = mozfind
352 LIBRARY_NAME = mozfind
353-EXPORT_LIBRARY = 1
354 IS_COMPONENT = 1
355 MODULE_NAME = nsFindComponent
356 LIBXUL_LIBRARY = 1
diff --git a/meta/packages/mozilla/minimo/minimo.png b/meta/packages/mozilla/minimo/minimo.png
deleted file mode 100644
index f8b2e2192b..0000000000
--- a/meta/packages/mozilla/minimo/minimo.png
+++ /dev/null
Binary files differ
diff --git a/meta/packages/mozilla/minimo/mozconfig b/meta/packages/mozilla/minimo/mozconfig
deleted file mode 100644
index 393981e9fa..0000000000
--- a/meta/packages/mozilla/minimo/mozconfig
+++ /dev/null
@@ -1,36 +0,0 @@
1# mozilla/configure: Features and packages:
2
3ac_add_options --enable-application=minimo
4ac_add_options --enable-default-toolkit=gtk2
5ac_add_options --disable-freetype2
6ac_add_options --enable-xft
7ac_add_options --disable-postscript
8ac_add_options --disable-xprint
9ac_add_options --disable-gnomevfs
10ac_add_options --disable-gnomeui
11ac_add_options --disable-jsd
12ac_add_options --disable-plugins
13ac_add_options --disable-view-source
14ac_add_options --disable-accessibility
15ac_add_options --disable-xpinstall
16ac_add_options --enable-single-profile
17ac_add_options --disable-jsloader
18ac_add_options --disable-printing
19ac_add_options --enable-native-uconv
20ac_add_options --enable-plaintext-editor-only
21ac_add_options --disable-xpcom-obsolete
22ac_add_options --disable-pref-extensions
23ac_add_options --disable-extensions
24ac_add_options --enable-image-decoders=png,gif,jpeg
25ac_add_options --disable-mathml
26ac_add_options --disable-installer
27ac_add_options --disable-updater
28ac_add_options --disable-tests
29ac_add_options --enable-optimize=-Os
30ac_add_options --disable-logging
31ac_add_options --enable-strip
32ac_add_options --enable-elf-dynstr-gc
33ac_add_options --disable-shared
34ac_add_options --enable-static
35ac_add_options --disable-profilesharing
36ac_add_options --disable-profilelocking
diff --git a/meta/packages/mozilla/minimo_cvs.bb b/meta/packages/mozilla/minimo_cvs.bb
deleted file mode 100644
index 5eec96d143..0000000000
--- a/meta/packages/mozilla/minimo_cvs.bb
+++ /dev/null
@@ -1,153 +0,0 @@
1DESCRIPTION = "A minimal version of the Mozilla web browser for mobile devices"
2SECTION = "x11/network"
3LICENSE = "MPL/GPL/LGPL"
4HOMEPAGE = "http://www.mozilla.org/projects/minimo/"
5PRIORITY = "optional"
6
7DEPENDS = "libxrender xt xft fontconfig freetype libidl dbus-glib pango atk gtk+ libidl-native"
8
9CVSSVR = "cvs-mirror.mozilla.org"
10BRTAG = "MOZILLA_1_8_BRANCH"
11MOZDATE = "20070510"
12
13PV = "0.02+cvs${MOZDATE}"
14PR = "r3"
15
16SRC_URI = "cvs://anonymous@${CVSSVR}/cvsroot;module=mozilla;tag=${BRTAG};date=${MOZDATE} \
17 file://minimo.patch;patch=1 \
18 file://bug-322806.diff;patch=1 \
19 file://mozconfig \
20 file://minimo \
21 file://eabi-fix.patch;patch=1 \
22 file://eabi-fix2.patch;patch=1 \
23 file://eabi-fix3.patch;patch=1 \
24 file://minimo.desktop \
25 file://minimo.png"
26
27inherit autotools
28
29S = "${WORKDIR}/mozilla"
30
31export MOZCONFIG = "${WORKDIR}/mozconfig"
32
33export CROSS_COMPILE="1"
34export ac_cv_prog_HOST_CC="${BUILD_CC}"
35export ac_cv_prog_HOST_CFLAGS="${BUILD_CFLAGS}"
36export ac_cv_prog_HOST_CXX="${BUILD_CXX}"
37export ac_cv_prog_HOST_CXXFLAGS="${BUILD_CXXFLAGS}"
38export HOST_LIBIDL_CONFIG = "${STAGING_BINDIR_NATIVE}/libIDL-config-2"
39
40mozdir="${libdir}/mozilla-minimo"
41
42EXTRA_OECONF += "--build=${BUILD_SYS} --host=${BUILD_SYS} --target=${TARGET_SYS} "
43
44do_configure() {
45 cd ${S}
46 oe_runmake -f client.mk CONFIGURE_ARGS="${EXTRA_OECONF}" configure
47 sed -i s:${TARGET_PREFIX}strip:echo:g config/autoconf.mk
48}
49
50do_compile() {
51 cd ${S}
52 oe_runmake -f client.mk build
53}
54
55do_install() {
56 cd ${WORKDIR}
57
58 install -d ${D}${bindir}
59 install -m 0755 minimo ${D}${bindir}
60
61 install -d ${D}${datadir}/applications
62 install -m 0644 minimo.desktop ${D}${datadir}/applications
63
64 install -d ${D}/${datadir}/pixmaps
65 install -m 0644 minimo.png ${D}${datadir}/pixmaps
66
67 cd ${S}
68
69 ./minimo/config/linux_package.sh ${S} ${S}/minimo/config
70
71 cd dist/minimo
72
73 install -d ${D}${mozdir}
74 install -m 0755 minimo ${D}${mozdir}
75 install -m 0755 libfreebl3.so ${D}${mozdir}
76 install -m 0755 libnspr4.so ${D}${mozdir}
77 install -m 0755 libnss3.so ${D}${mozdir}
78 install -m 0755 libnssckbi.so ${D}${mozdir}
79 install -m 0755 libplc4.so ${D}${mozdir}
80 install -m 0755 libplds4.so ${D}${mozdir}
81 install -m 0755 libsmime3.so ${D}${mozdir}
82 install -m 0755 libsoftokn3.so ${D}${mozdir}
83 install -m 0755 libssl3.so ${D}${mozdir}
84
85 install -d ${D}${mozdir}/chrome
86 install -m 0644 chrome/classic.jar ${D}${mozdir}/chrome
87 install -m 0644 chrome/classic.manifest ${D}${mozdir}/chrome
88 install -m 0644 chrome/en-US.jar ${D}${mozdir}/chrome
89 install -m 0644 chrome/en-US.manifest ${D}${mozdir}/chrome
90 install -m 0644 chrome/minimo-skin-vga.jar ${D}${mozdir}/chrome
91 install -m 0644 chrome/minimo-skin-vga.manifest ${D}${mozdir}/chrome
92 install -m 0644 chrome/minimo-skin.jar ${D}${mozdir}/chrome
93 install -m 0644 chrome/minimo-skin.manifest ${D}${mozdir}/chrome
94 install -m 0644 chrome/minimo.jar ${D}${mozdir}/chrome
95 install -m 0644 chrome/minimo.manifest ${D}${mozdir}/chrome
96 install -m 0644 chrome/pippki.jar ${D}${mozdir}/chrome
97 install -m 0644 chrome/pippki.manifest ${D}${mozdir}/chrome
98 install -m 0644 chrome/toolkit.jar ${D}${mozdir}/chrome
99 install -m 0644 chrome/toolkit.manifest ${D}${mozdir}/chrome
100
101 install -d ${D}${mozdir}/components
102 install -m 0644 components/all.xpt ${D}${mozdir}/components
103 install -m 0644 components/nsHelperAppDlg.js ${D}${mozdir}/components
104 install -m 0644 components/nsProgressDialog.js ${D}${mozdir}/components
105
106 install -d ${D}${mozdir}/greprefs
107 install -m 0644 greprefs/all.js ${D}${mozdir}/greprefs
108 install -m 0644 greprefs/security-prefs.js ${D}${mozdir}/greprefs
109
110 install -d ${D}${mozdir}/res
111 install -m 0644 res/forms.css ${D}${mozdir}/res
112 install -m 0644 res/html.css ${D}${mozdir}/res
113 install -m 0644 res/quirk.css ${D}${mozdir}/res
114 install -m 0644 res/ua.css ${D}${mozdir}/res
115 install -m 0644 res/arrow.gif ${D}${mozdir}/res
116 install -m 0644 res/arrowd.gif ${D}${mozdir}/res
117 install -m 0644 res/broken-image.gif ${D}${mozdir}/res
118 install -m 0644 res/loading-image.gif ${D}${mozdir}/res
119 install -m 0644 res/charsetData.properties ${D}${mozdir}/res
120 install -m 0644 res/charsetalias.properties ${D}${mozdir}/res
121 install -m 0644 res/langGroups.properties ${D}${mozdir}/res
122 install -m 0644 res/language.properties ${D}${mozdir}/res
123 install -m 0644 res/unixcharset.properties ${D}${mozdir}/res
124
125 install -d ${D}${mozdir}/res/dtd
126 install -m 0644 res/dtd/xhtml11.dtd ${D}${mozdir}/res/dtd
127
128 install -d ${D}${mozdir}/res/entityTables
129 install -m 0644 res/entityTables/html40Latin1.properties ${D}${mozdir}/res/entityTables
130 install -m 0644 res/entityTables/html40Special.properties ${D}${mozdir}/res/entityTables
131 install -m 0644 res/entityTables/html40Symbols.properties ${D}${mozdir}/res/entityTables
132 install -m 0644 res/entityTables/htmlEntityVersions.properties ${D}${mozdir}/res/entityTables
133 install -m 0644 res/entityTables/transliterate.properties ${D}${mozdir}/res/entityTables
134
135 install -d ${D}${mozdir}/res/fonts
136 install -m 0644 res/fonts/fontEncoding.properties ${D}${mozdir}/res/fonts
137 install -m 0644 res/fonts/pangoFontEncoding.properties ${D}${mozdir}/res/fonts
138
139 install -d ${D}${mozdir}/res/html
140 install -m 0644 res/html/gopher-audio.gif ${D}${mozdir}/res/html
141 install -m 0644 res/html/gopher-binary.gif ${D}${mozdir}/res/html
142 install -m 0644 res/html/gopher-find.gif ${D}${mozdir}/res/html
143 install -m 0644 res/html/gopher-image.gif ${D}${mozdir}/res/html
144 install -m 0644 res/html/gopher-menu.gif ${D}${mozdir}/res/html
145 install -m 0644 res/html/gopher-movie.gif ${D}${mozdir}/res/html
146 install -m 0644 res/html/gopher-sound.gif ${D}${mozdir}/res/html
147 install -m 0644 res/html/gopher-telnet.gif ${D}${mozdir}/res/html
148 install -m 0644 res/html/gopher-text.gif ${D}${mozdir}/res/html
149 install -m 0644 res/html/gopher-unknown.gif ${D}${mozdir}/res/html
150}
151
152FILES_${PN}-dbg += "${libdir}/mozilla-minimo/.debug*"
153FILES_${PN} += "${mozdir}"
diff --git a/meta/packages/nasm/nasm_2.07.bb b/meta/packages/nasm/nasm_2.07.bb
deleted file mode 100644
index 4e482a04d6..0000000000
--- a/meta/packages/nasm/nasm_2.07.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1DESCRIPTION = "General-purpose x86 assembler"
2SECTION = "devel"
3LICENSE = "simplifiedBSD"
4LIC_CHKSUM_FILES = "file://LICENSE;md5=d89d124974e487e5d64da6f1cd8acfbb"
5COMPATIBLE_HOST = '(x86_64|i.86.*)-(linux|freebsd.*)'
6
7PR = "r0"
8
9SRC_URI = "${SOURCEFORGE_MIRROR}/nasm/nasm-${PV}.tar.bz2 "
10
11inherit autotools
12
13do_configure_prepend () {
14 mv aclocal.m4 acinclude.m4
15}
16
17do_install() {
18 install -d ${D}${bindir}
19 install -d ${D}${mandir}/man1
20
21 oe_runmake 'INSTALLROOT=${D}' install
22}
23
24BBCLASSEXTEND = "native"
diff --git a/meta/packages/ncurses/ncurses.inc b/meta/packages/ncurses/ncurses.inc
deleted file mode 100644
index 259750cb46..0000000000
--- a/meta/packages/ncurses/ncurses.inc
+++ /dev/null
@@ -1,99 +0,0 @@
1DESCRIPTION = "Ncurses library"
2HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html"
3LICENSE = "MIT"
4SECTION = "libs"
5DEPENDS = "ncurses-native"
6DEPENDS_virtclass-native = ""
7PACKAGES_prepend = "ncurses-tools "
8PACKAGES_append = " ncurses-terminfo"
9FILES_ncurses_append = " ${datadir}/tabset"
10RSUGGESTS_${PN} = "ncurses-terminfo"
11RPROVIDES = "libncurses5"
12
13inherit autotools
14
15# This keeps only tput/tset in ncurses
16# clear/reset are in already busybox
17FILES_ncurses-tools = "${bindir}/tic ${bindir}/toe ${bindir}/infotocap ${bindir}/captoinfo ${bindir}/infocmp ${bindir}/clear.${PN} ${bindir}/reset.${PN} ${bindir}/tack "
18FILES_ncurses-terminfo = "${datadir}/terminfo"
19FILES_${PN} = "${bindir}/tput ${bindir}/tset ${libdir}/lib*.so.* /usr/share/tabset /etc/terminfo"
20
21PARALLEL_MAKE=""
22
23FILESPATH = "${FILE_DIRNAME}/local:${FILE_DIRNAME}/ncurses-${PV}-${PR}:${FILE_DIRNAME}/ncurses-${PV}:${FILE_DIRNAME}/ncurses:${FILE_DIRNAME}"
24
25EXTRA_OECONF = "--with-shared \
26 --with-libtool \
27 --without-profile \
28 --without-debug \
29 --disable-rpath \
30 --enable-echo \
31 --enable-const \
32 --without-ada \
33 --enable-termcap \
34 --without-cxx-binding \
35 --with-terminfo-dirs=${sysconfdir}/terminfo:${datadir}/terminfo \
36 --enable-overwrite \
37 --with-build-ldflags='' \
38 --with-build-ccflags='' "
39export BUILD_CCFLAGS = "-I${S}/ncurses -I${S}/include ${BUILD_CFLAGS}"
40export BUILD_LDFLAGS = ""
41export EXTRA_OEMAKE = '"BUILD_LDFLAGS=" "BUILD_CCFLAGS=${BUILD_CCFLAGS}"'
42
43# This is necessary so that the "tic" command executed during the install can
44# link with the correct libary in staging.
45export LD_LIBRARY_PATH = "${STAGING_LIBDIR_NATIVE}"
46
47do_install() {
48 autotools_do_install
49
50 ln -sf curses.h ${D}${includedir}/ncurses.h
51
52 # our ncurses has termcap support
53 ln -sf libncurses.so ${D}${libdir}/libtermcap.so
54 ln -sf libncurses.a ${D}${libdir}/libtermcap.a
55
56 # include some basic terminfo files
57 # stolen ;) from gentoo and modified a bit
58 for x in ansi console dumb linux rxvt screen sun vt{52,100,102,200,220} xterm-color xterm-xfree86
59 do
60 local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)"
61 local basedir="$(basename $(dirname "${termfile}"))"
62
63 if [ -n "${termfile}" ]
64 then
65 install -d ${D}${sysconfdir}/terminfo/${basedir}
66 mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/
67 ln -s /etc/terminfo/${basedir}/${x} \
68 ${D}${datadir}/terminfo/${basedir}/${x}
69 fi
70 done
71 # i think we can use xterm-color as default xterm
72 if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ]
73 then
74 ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
75 fi
76
77 if [ "${PN}" = "ncurses" ]; then
78 mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN}
79 mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN}
80 fi
81}
82
83
84pkg_postinst_ncurses-tools () {
85 if [ "${PN}" = "ncurses" ]; then
86 update-alternatives --install ${bindir}/clear clear clear.${PN} 100
87 update-alternatives --install ${bindir}/reset reset reset.${PN} 100
88 fi
89}
90
91
92pkg_prerm_ncurses-tools () {
93 if [ "${PN}" = "ncurses" ]; then
94 update-alternatives --remove clear clear.${PN}
95 update-alternatives --remove reset reset.${PN}
96 fi
97}
98
99BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/packages/ncurses/ncurses/makefile_tweak.patch b/meta/packages/ncurses/ncurses/makefile_tweak.patch
deleted file mode 100644
index 480855bcc6..0000000000
--- a/meta/packages/ncurses/ncurses/makefile_tweak.patch
+++ /dev/null
@@ -1,89 +0,0 @@
1Libtool 2.2.2 needs to be able to use top_builddir. Automake usually exports
2this but ncurses doesn't use automake.
3
4RP 14/4/08
5
6Index: ncurses-5.4/ncurses/Makefile.in
7===================================================================
8--- ncurses-5.4.orig/ncurses/Makefile.in 2008-04-14 12:22:34.000000000 +0100
9+++ ncurses-5.4/ncurses/Makefile.in 2008-04-14 12:22:53.000000000 +0100
10@@ -57,6 +57,7 @@
11 MODEL = @DFT_LWR_MODEL@
12 DESTDIR = @DESTDIR@
13 top_srcdir = @top_srcdir@
14+top_builddir = @top_srcdir@
15 srcdir = @srcdir@
16 prefix = @prefix@
17 exec_prefix = @exec_prefix@
18Index: ncurses-5.4/form/Makefile.in
19===================================================================
20--- ncurses-5.4.orig/form/Makefile.in 2008-04-14 12:30:35.000000000 +0100
21+++ ncurses-5.4/form/Makefile.in 2008-04-14 12:30:59.000000000 +0100
22@@ -51,6 +51,7 @@
23 MODEL = @DFT_LWR_MODEL@
24 DESTDIR = @DESTDIR@
25 srcdir = @srcdir@
26+top_builddir = @top_srcdir@
27 prefix = @prefix@
28 exec_prefix = @exec_prefix@
29 bindir = @bindir@
30Index: ncurses-5.4/menu/Makefile.in
31===================================================================
32--- ncurses-5.4.orig/menu/Makefile.in 2008-04-14 12:29:00.000000000 +0100
33+++ ncurses-5.4/menu/Makefile.in 2008-04-14 12:29:13.000000000 +0100
34@@ -51,6 +51,7 @@
35 MODEL = @DFT_LWR_MODEL@
36 DESTDIR = @DESTDIR@
37 srcdir = @srcdir@
38+top_builddir = @top_srcdir@
39 prefix = @prefix@
40 exec_prefix = @exec_prefix@
41 bindir = @bindir@
42Index: ncurses-5.4/panel/Makefile.in
43===================================================================
44--- ncurses-5.4.orig/panel/Makefile.in 2008-04-14 12:27:40.000000000 +0100
45+++ ncurses-5.4/panel/Makefile.in 2008-04-14 12:27:59.000000000 +0100
46@@ -51,6 +51,7 @@
47 MODEL = @DFT_LWR_MODEL@
48 DESTDIR = @DESTDIR@
49 srcdir = @srcdir@
50+top_builddir = @top_srcdir@
51 prefix = @prefix@
52 exec_prefix = @exec_prefix@
53 bindir = @bindir@
54Index: ncurses-5.4/progs/Makefile.in
55===================================================================
56--- ncurses-5.4.orig/progs/Makefile.in 2008-04-14 12:24:37.000000000 +0100
57+++ ncurses-5.4/progs/Makefile.in 2008-04-14 12:25:06.000000000 +0100
58@@ -54,6 +54,7 @@
59 MODEL = ../@DFT_OBJ_SUBDIR@
60 DESTDIR = @DESTDIR@
61 srcdir = @srcdir@
62+top_builddir = @top_srcdir@
63 prefix = @prefix@
64 exec_prefix = @exec_prefix@
65 bindir = @bindir@
66Index: ncurses-5.4/tack/Makefile.in
67===================================================================
68--- ncurses-5.4.orig/tack/Makefile.in 2008-04-14 12:26:05.000000000 +0100
69+++ ncurses-5.4/tack/Makefile.in 2008-04-14 12:26:26.000000000 +0100
70@@ -22,6 +22,7 @@
71 MODEL = ../@DFT_OBJ_SUBDIR@
72 DESTDIR = @DESTDIR@
73 srcdir = @srcdir@
74+top_builddir = @top_srcdir@
75 prefix = @prefix@
76 exec_prefix = @exec_prefix@
77 bindir = @bindir@
78Index: ncurses-5.4/test/Makefile.in
79===================================================================
80--- ncurses-5.4.orig/test/Makefile.in 2008-04-14 12:32:37.000000000 +0100
81+++ ncurses-5.4/test/Makefile.in 2008-04-14 12:32:56.000000000 +0100
82@@ -43,6 +43,7 @@
83
84 MODEL = ../@DFT_OBJ_SUBDIR@
85 srcdir = @srcdir@
86+top_builddir = @top_srcdir@
87 prefix = @prefix@
88 exec_prefix = @exec_prefix@
89 libdir = @libdir@
diff --git a/meta/packages/ncurses/ncurses/visibility.patch b/meta/packages/ncurses/ncurses/visibility.patch
deleted file mode 100644
index 29cac5f1b8..0000000000
--- a/meta/packages/ncurses/ncurses/visibility.patch
+++ /dev/null
@@ -1,4904 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- ncurses-5.4/ncurses/Makefile.in~visibility.patch
7+++ ncurses-5.4/ncurses/Makefile.in
8@@ -107,7 +107,7 @@
9 CFLAGS_NORMAL = $(CCFLAGS)
10 CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
11 CFLAGS_PROFILE = $(CCFLAGS) -pg
12-CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
13+CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ @LIBOPTS@
14
15 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
16
17--- ncurses-5.4/panel/Makefile.in~visibility.patch
18+++ ncurses-5.4/panel/Makefile.in
19@@ -88,7 +88,7 @@
20 CFLAGS_NORMAL = $(CCFLAGS)
21 CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
22 CFLAGS_PROFILE = $(CCFLAGS) -pg
23-CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
24+CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ @LIBOPTS@
25
26 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
27
28--- ncurses-5.4/menu/Makefile.in~visibility.patch
29+++ ncurses-5.4/menu/Makefile.in
30@@ -87,7 +87,7 @@
31 CFLAGS_NORMAL = $(CCFLAGS)
32 CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
33 CFLAGS_PROFILE = $(CCFLAGS) -pg
34-CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
35+CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ @LIBOPTS@
36
37 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
38
39--- ncurses-5.4/c++/Makefile.in~visibility.patch
40+++ ncurses-5.4/c++/Makefile.in
41@@ -80,7 +80,7 @@
42 CFLAGS_NORMAL = $(CCFLAGS)
43 CFLAGS_DEBUG = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
44 CFLAGS_PROFILE = $(CCFLAGS) -pg
45-CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
46+CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ @LIBOPTS@
47
48 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
49
50--- ncurses-5.4/form/Makefile.in~visibility.patch
51+++ ncurses-5.4/form/Makefile.in
52@@ -88,7 +88,7 @@
53 CFLAGS_NORMAL = $(CCFLAGS)
54 CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
55 CFLAGS_PROFILE = $(CCFLAGS) -pg
56-CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
57+CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ @LIBOPTS@
58
59 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
60
61--- ncurses-5.4/configure.in~visibility.patch
62+++ ncurses-5.4/configure.in
63@@ -34,17 +34,20 @@
64 dnl See http://invisible-island.net/autoconf/ for additional information.
65 dnl
66 dnl ---------------------------------------------------------------------------
67-AC_PREREQ(2.13.20020210)
68+AC_PREREQ(2.59)
69 AC_REVISION($Revision: 1.312 $)
70-AC_INIT(ncurses/base/lib_initscr.c)
71+AC_INIT
72+AC_CONFIG_SRCDIR([ncurses/base/lib_initscr.c])
73 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
74
75+m4_include([m4/templates.m4])
76+
77 CF_SUBST_NCURSES_VERSION
78
79 CF_WITH_REL_VERSION(NCURSES)
80 CF_WITH_ABI_VERSION
81
82-CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
83+CF_CHECK_CACHE([AC_CANONICAL_TARGET([])])
84 AC_ARG_WITH(system-type,
85 [ --with-system-type=XXX test: override derived host system-type],
86 [AC_MSG_WARN(overriding system type to $withval)
87@@ -100,7 +103,7 @@
88 CF_GXX_VERSION
89 case $GXX_VERSION in
90 1*|2.[[0-6]]*)
91- GXX=""; CXX=""; ac_cv_prog_gxx=no
92+ GXX=""; CXX=""; ac_cv_cxx_compiler_gnu=no
93 cf_cxx_library=no
94 AC_MSG_WARN(templates do not work)
95 ;;
96@@ -176,7 +179,6 @@
97 AC_SUBST(DESTDIR)
98
99 ###############################################################################
100-CF_HELP_MESSAGE(Build-Tools Needed to Compile Temporary Applications for Cross-compiling:)
101 # If we're cross-compiling, allow the user to override the tools and their
102 # options. The configure script is oriented toward identifying the host
103 # compiler, etc., but we need a build compiler to generate parts of the source.
104@@ -213,7 +215,6 @@
105 AC_SUBST(BUILD_EXEEXT)
106
107 ###############################################################################
108-CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
109
110 ### Options to allow the user to specify the set of libraries which are used.
111 ### Use "--without-normal --with-shared" to allow the default model to be
112@@ -343,11 +344,11 @@
113
114 AC_MSG_CHECKING(for default loader flags)
115 case $DFT_LWR_MODEL in
116-libtool) LD_MODEL='' ;;
117+libtool) LD_MODEL=''; LIBOPTS="-DNCURSES_DLL" ;;
118 normal) LD_MODEL='' ;;
119 debug) LD_MODEL=$CC_G_OPT ;;
120 profile) LD_MODEL='-pg';;
121-shared) LD_MODEL='' ;;
122+shared) LD_MODEL=''; LIBOPTS="-DNCURSES_DLL" ;;
123 esac
124 AC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg)
125 AC_MSG_RESULT($LD_MODEL)
126@@ -363,14 +364,14 @@
127 if test "$CC_SHARED_OPTS" = "unknown"; then
128 for model in $cf_list_models; do
129 if test "$model" = "shared"; then
130- AC_ERROR(Shared libraries are not supported in this version)
131+ AC_MSG_ERROR([Shared libraries are not supported in this version])
132 fi
133 done
134 fi
135
136-###############################################################################
137-CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
138+AC_SUBST(LIBOPTS)
139
140+###############################################################################
141 ### use option --disable-overwrite to leave out the link to -lcurses
142 AC_MSG_CHECKING(if you wish to install ncurses overwriting curses)
143 AC_ARG_ENABLE(overwrite,
144@@ -450,7 +451,7 @@
145 AC_ARG_ENABLE(big-core,
146 [ --disable-big-core assume machine has little memory],
147 [with_big_core=$enableval],
148- [AC_TRY_RUN([
149+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
150 #include <stdlib.h>
151 #include <string.h>
152 int main() {
153@@ -459,10 +460,7 @@
154 if (s != 0)
155 s[0] = s[n-1] = 0;
156 exit(s == 0);
157-}],
158- [with_big_core=yes],
159- [with_big_core=no],
160- [with_big_core=no])])
161+}]])],[with_big_core=yes],[with_big_core=no],[with_big_core=no])])
162 AC_MSG_RESULT($with_big_core)
163 test "$with_big_core" = "yes" && AC_DEFINE(HAVE_BIG_CORE)
164
165@@ -477,7 +475,7 @@
166 if test "$with_termcap" != "yes" ; then
167 if test "$use_database" = no ; then
168 if test -z "$with_fallback" ; then
169- AC_ERROR(You have disabled the database w/o specifying fallbacks)
170+ AC_MSG_ERROR([You have disabled the database w/o specifying fallbacks])
171 fi
172 fi
173 AC_DEFINE(PURE_TERMINFO)
174@@ -614,10 +612,10 @@
175 test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
176
177 ###############################################################################
178+
179 CF_MAN_PAGES([ captoinfo clear infocmp infotocap tic toe tput ])
180
181 ###############################################################################
182-CF_HELP_MESSAGE(Extensions:)
183
184 ### Note that some functions (such as const) are normally disabled anyway.
185 AC_MSG_CHECKING(if you want to build with function extensions)
186@@ -683,7 +681,6 @@
187
188 ###############################################################################
189 # These options are relatively safe to experiment with.
190-CF_HELP_MESSAGE(Development Code:)
191 AC_MSG_CHECKING(if you want all development code)
192 AC_ARG_WITH(develop,
193 [ --with-develop enable all development options],
194@@ -719,7 +716,6 @@
195
196 ###############################################################################
197 # These are just experimental, probably should not be in a package:
198-CF_HELP_MESSAGE(Experimental Code:)
199
200 AC_MSG_CHECKING(if you do not want to assume colors are white-on-black)
201 AC_ARG_ENABLE(assumed-color,
202@@ -828,7 +824,6 @@
203 AC_SUBST(TERMINFO_CAPS)
204
205 ###############################################################################
206-CF_HELP_MESSAGE(Testing/development Options:)
207
208 ### use option --disable-echo to suppress full display compiling commands
209 AC_MSG_CHECKING(if you want to display full commands during build)
210@@ -931,7 +926,7 @@
211 AC_SUBST(MATH_LIB)
212
213 ### Checks for header files.
214-AC_STDC_HEADERS
215+AC_HEADER_STDC([])
216 AC_HEADER_DIRENT
217 AC_HEADER_TIME
218 CF_REGEX
219@@ -965,7 +960,7 @@
220 CF_SYS_TIME_SELECT
221
222 ### checks for compiler characteristics
223-AC_LANG_C
224+AC_LANG([C])
225 AC_C_CONST
226 AC_C_INLINE
227 test "$ac_cv_c_inline" != no && AC_DEFINE(CC_HAS_INLINE_FUNCS)
228@@ -1040,7 +1035,7 @@
229
230 # Check for C++ compiler characteristics (and ensure that it's there!)
231 if test -n "$CXX" ; then
232- AC_LANG_CPLUSPLUS
233+ AC_LANG([C++])
234 CF_STDCPP_LIBRARY
235
236 case $GXX_VERSION in
237@@ -1135,7 +1130,6 @@
238 fi
239 AC_SUBST(USE_CXX_BOOL)
240
241-CF_HELP_MESSAGE(Ada95 Binding Options:)
242
243 dnl Check for availability of GNU Ada Translator (GNAT).
244 dnl At the moment we support no other Ada95 compiler.
245@@ -1309,15 +1303,16 @@
246
247 ################################################################################
248 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
249-AC_OUTPUT( \
250+AC_CONFIG_FILES([\
251 include/MKterm.h.awk \
252 include/curses.head:include/curses.h.in \
253 include/termcap.h \
254 include/unctrl.h \
255 $SUB_MAKEFILES \
256- Makefile,[
257+ Makefile])
258+AC_CONFIG_COMMANDS([default],[
259 CF_LIB_RULES
260-],[
261+],[[
262 ### Special initialization commands, used to pass information from the
263 ### configuration-run into config.status
264
265@@ -1348,5 +1343,6 @@
266 host="$host"
267 target="$target"
268
269-],cat)dnl
270+]])
271+AC_OUTPUT
272 ${MAKE-make} preinstall
273--- ncurses-5.4/include/ncurses_dll.h~visibility.patch
274+++ ncurses-5.4/include/ncurses_dll.h
275@@ -7,8 +7,8 @@
276 /* but this structure may be useful at some point for an MSVC build */
277 /* so, for now unconditionally define the important flags */
278 /* "the right way" for proper static and dll+auto-import behavior */
279-#undef NCURSES_DLL
280-#define NCURSES_STATIC
281+//#undef NCURSES_DLL
282+//#define NCURSES_STATIC
283
284 #if defined(__CYGWIN__)
285 # if defined(NCURSES_DLL)
286@@ -32,12 +32,20 @@
287 # endif
288 # define NCURSES_API __cdecl
289 # define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
290-# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
291+# define NCURSES_EXPORT_VAR(var) var NCURSES_IMPEXP
292 #endif
293
294 /* Take care of non-cygwin platforms */
295 #if !defined(NCURSES_IMPEXP)
296-# define NCURSES_IMPEXP /* nothing */
297+# if defined(GCC_HASCLASSVISIBILITY)
298+# if defined(NCURSES_DLL)
299+# define NCURSES_IMPEXP __attribute__ ((visibility("default")))
300+# else
301+# define NCURSES_IMPEXP /* nothing */
302+# endif
303+# else
304+# define NCURSES_IMPEXP /* nothing */
305+# endif
306 #endif
307 #if !defined(NCURSES_API)
308 # define NCURSES_API /* nothing */
309@@ -46,7 +54,7 @@
310 # define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
311 #endif
312 #if !defined(NCURSES_EXPORT_VAR)
313-# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
314+# define NCURSES_EXPORT_VAR(var) var NCURSES_IMPEXP
315 #endif
316
317 #endif /* NCURSES_DLL_H_incl */
318--- ncurses-5.4/form/fty_alnum.c~visibility.patch
319+++ ncurses-5.4/form/fty_alnum.c
320@@ -132,6 +132,6 @@
321 NULL
322 };
323
324-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeALNUM;
325+FIELDTYPE* NCURSES_EXPORT_VAR(TYPE_ALNUM) = &typeALNUM;
326
327 /* fty_alnum.c ends here */
328--- ncurses-5.4/form/fty_alpha.c~visibility.patch
329+++ ncurses-5.4/form/fty_alpha.c
330@@ -133,6 +133,6 @@
331 NULL
332 };
333
334-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeALPHA;
335+FIELDTYPE* NCURSES_EXPORT_VAR(TYPE_ALPHA) = &typeALPHA;
336
337 /* fty_alpha.c ends here */
338--- ncurses-5.4/form/fld_newftyp.c~visibility.patch
339+++ ncurses-5.4/form/fld_newftyp.c
340@@ -48,7 +48,7 @@
341 NULL /* enumerate previous function */
342 };
343
344-NCURSES_EXPORT_VAR(const FIELDTYPE*) _nc_Default_FieldType = &default_fieldtype;
345+const FIELDTYPE* NCURSES_EXPORT_VAR(_nc_Default_FieldType) = &default_fieldtype;
346
347 /*---------------------------------------------------------------------------
348 | Facility : libnform
349--- ncurses-5.4/form/form.h~visibility.patch
350+++ ncurses-5.4/form/form.h
351@@ -248,24 +248,24 @@
352 /*************************
353 * standard field types *
354 *************************/
355-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA;
356-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM;
357-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM;
358-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER;
359-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC;
360-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP;
361+extern FIELDTYPE * NCURSES_EXPORT_VAR(TYPE_ALPHA);
362+extern FIELDTYPE * NCURSES_EXPORT_VAR(TYPE_ALNUM);
363+extern FIELDTYPE * NCURSES_EXPORT_VAR(TYPE_ENUM);
364+extern FIELDTYPE * NCURSES_EXPORT_VAR(TYPE_INTEGER);
365+extern FIELDTYPE * NCURSES_EXPORT_VAR(TYPE_NUMERIC);
366+extern FIELDTYPE * NCURSES_EXPORT_VAR(TYPE_REGEXP);
367
368 /************************************
369 * built-in additional field types *
370 * They are not defined in SVr4 *
371 ************************************/
372-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */
373+extern FIELDTYPE * NCURSES_EXPORT_VAR(TYPE_IPV4); /* Internet IP Version 4 address */
374
375 /***********************
376 * Default objects *
377 ***********************/
378-extern NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form;
379-extern NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field;
380+extern FORM * NCURSES_EXPORT_VAR(_nc_Default_Form);
381+extern FIELD * NCURSES_EXPORT_VAR(_nc_Default_Field);
382
383
384 /***********************
385--- ncurses-5.4/form/fty_int.c~visibility.patch
386+++ ncurses-5.4/form/fty_int.c
387@@ -155,6 +155,6 @@
388 NULL
389 };
390
391-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeINTEGER;
392+FIELDTYPE* NCURSES_EXPORT_VAR(TYPE_INTEGER) = &typeINTEGER;
393
394 /* fty_int.c ends here */
395--- ncurses-5.4/form/fty_num.c~visibility.patch
396+++ ncurses-5.4/form/fty_num.c
397@@ -190,6 +190,6 @@
398 NULL
399 };
400
401-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeNUMERIC;
402+FIELDTYPE* NCURSES_EXPORT_VAR(TYPE_NUMERIC) = &typeNUMERIC;
403
404 /* fty_num.c ends here */
405--- ncurses-5.4/form/fty_regex.c~visibility.patch
406+++ ncurses-5.4/form/fty_regex.c
407@@ -252,6 +252,6 @@
408 NULL
409 };
410
411-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP;
412+FIELDTYPE* NCURSES_EXPORT_VAR(TYPE_REGEXP) = &typeREGEXP;
413
414 /* fty_regex.c ends here */
415--- ncurses-5.4/form/frm_def.c~visibility.patch
416+++ ncurses-5.4/form/frm_def.c
417@@ -60,7 +60,7 @@
418 NULL /* fieldterm */
419 };
420
421-NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form = &default_form;
422+FORM * NCURSES_EXPORT_VAR(_nc_Default_Form) = &default_form;
423
424 /*---------------------------------------------------------------------------
425 | Facility : libnform
426--- ncurses-5.4/form/fld_def.c~visibility.patch
427+++ ncurses-5.4/form/fld_def.c
428@@ -63,7 +63,7 @@
429 (char *)0 /* usrptr */
430 };
431
432-NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
433+FIELD * NCURSES_EXPORT_VAR(_nc_Default_Field) = &default_field;
434
435 /*---------------------------------------------------------------------------
436 | Facility : libnform
437--- ncurses-5.4/form/fty_enum.c~visibility.patch
438+++ ncurses-5.4/form/fty_enum.c
439@@ -290,6 +290,6 @@
440 Previous_Enum
441 };
442
443-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ENUM = &typeENUM;
444+FIELDTYPE* NCURSES_EXPORT_VAR(TYPE_ENUM) = &typeENUM;
445
446 /* fty_enum.c ends here */
447--- ncurses-5.4/form/fty_ipv4.c~visibility.patch
448+++ ncurses-5.4/form/fty_ipv4.c
449@@ -76,6 +76,6 @@
450 NULL
451 };
452
453-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4;
454+FIELDTYPE* NCURSES_EXPORT_VAR(TYPE_IPV4) = &typeIPV4;
455
456 /* fty_ipv4.c ends here */
457--- ncurses-5.4/form/form.priv.h~visibility.patch
458+++ ncurses-5.4/form/form.priv.h
459@@ -112,7 +112,7 @@
460 #define C_BLANK ' '
461 #define is_blank(c) ((c)==C_BLANK)
462
463-extern NCURSES_EXPORT_VAR(const FIELDTYPE *) _nc_Default_FieldType;
464+extern const FIELDTYPE * NCURSES_EXPORT_VAR(_nc_Default_FieldType);
465
466 extern NCURSES_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*,va_list*,int*);
467 extern NCURSES_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*,const TypeArgument*, int*);
468--- ncurses-5.4/include/tic.h~visibility.patch
469+++ ncurses-5.4/include/tic.h
470@@ -117,7 +117,7 @@
471 #define DEBUG(n, a) /*nothing*/
472 #endif
473
474-extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
475+extern unsigned NCURSES_EXPORT_VAR(_nc_tracing);
476 extern NCURSES_EXPORT(void) _nc_tracef (char *, ...) GCC_PRINTFLIKE(1,2);
477 extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
478 extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
479@@ -151,7 +151,7 @@
480 char *tk_valstring; /* value of capability (if a string) */
481 };
482
483-extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token;
484+extern struct token NCURSES_EXPORT_VAR(_nc_curr_token);
485
486 /*
487 * List of keynames with their corresponding code.
488@@ -161,7 +161,7 @@
489 int code;
490 };
491
492-extern NCURSES_EXPORT_VAR(const struct kn) _nc_key_names[];
493+extern const struct kn NCURSES_EXPORT_VAR(_nc_key_names[]);
494
495 /*
496 * Offsets to string capabilities, with the corresponding functionkey
497@@ -179,7 +179,7 @@
498
499 #else
500
501-extern NCURSES_EXPORT_VAR(struct tinfo_fkeys) _nc_tinfo_fkeys[];
502+extern struct tinfo_fkeys NCURSES_EXPORT_VAR(_nc_tinfo_fkeys[]);
503
504 #endif
505
506@@ -204,11 +204,11 @@
507 const char *source;
508 };
509
510-extern NCURSES_EXPORT_VAR(const struct name_table_entry * const) _nc_info_hash_table[];
511-extern NCURSES_EXPORT_VAR(const struct name_table_entry * const) _nc_cap_hash_table[];
512+extern const struct name_table_entry * const NCURSES_EXPORT_VAR(_nc_info_hash_table[]);
513+extern const struct name_table_entry * const NCURSES_EXPORT_VAR(_nc_cap_hash_table[]);
514
515-extern NCURSES_EXPORT_VAR(const struct alias) _nc_capalias_table[];
516-extern NCURSES_EXPORT_VAR(const struct alias) _nc_infoalias_table[];
517+extern const struct alias NCURSES_EXPORT_VAR(_nc_capalias_table[]);
518+extern const struct alias NCURSES_EXPORT_VAR(_nc_infoalias_table[]);
519
520 extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool);
521 extern NCURSES_EXPORT(const struct name_table_entry * const *) _nc_get_hash_table (bool);
522@@ -255,13 +255,13 @@
523 extern NCURSES_EXPORT(void) _nc_panic_mode (char);
524 extern NCURSES_EXPORT(void) _nc_push_token (int);
525 extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *);
526-extern NCURSES_EXPORT_VAR(int) _nc_curr_col;
527-extern NCURSES_EXPORT_VAR(int) _nc_curr_line;
528-extern NCURSES_EXPORT_VAR(int) _nc_syntax;
529-extern NCURSES_EXPORT_VAR(long) _nc_comment_end;
530-extern NCURSES_EXPORT_VAR(long) _nc_comment_start;
531-extern NCURSES_EXPORT_VAR(long) _nc_curr_file_pos;
532-extern NCURSES_EXPORT_VAR(long) _nc_start_line;
533+extern int NCURSES_EXPORT_VAR(_nc_curr_col);
534+extern int NCURSES_EXPORT_VAR(_nc_curr_line);
535+extern int NCURSES_EXPORT_VAR(_nc_syntax);
536+extern long NCURSES_EXPORT_VAR(_nc_comment_end);
537+extern long NCURSES_EXPORT_VAR(_nc_comment_start);
538+extern long NCURSES_EXPORT_VAR(_nc_curr_file_pos);
539+extern long NCURSES_EXPORT_VAR(_nc_start_line);
540 #define SYN_TERMINFO 0
541 #define SYN_TERMCAP 1
542
543@@ -272,7 +272,7 @@
544 extern NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
545 extern NCURSES_EXPORT(void) _nc_err_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
546 extern NCURSES_EXPORT(void) _nc_warning (const char *const,...) GCC_PRINTFLIKE(1,2);
547-extern NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings;
548+extern bool NCURSES_EXPORT_VAR(_nc_suppress_warnings);
549
550 /* comp_expand.c: expand string into readable form */
551 extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int);
552@@ -287,12 +287,12 @@
553 /* lib_tparm.c */
554 #define NUM_PARM 9
555
556-extern NCURSES_EXPORT_VAR(int) _nc_tparm_err;
557+extern int NCURSES_EXPORT_VAR(_nc_tparm_err);
558
559 extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount);
560
561 /* lib_tputs.c */
562-extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */
563+extern int NCURSES_EXPORT_VAR(_nc_nulls_sent); /* Add one for every null sent */
564
565 /* comp_main.c: compiler main */
566 extern const char * _nc_progname;
567--- ncurses-5.4/include/MKterm.h.awk.in~visibility.patch
568+++ ncurses-5.4/include/MKterm.h.awk.in
569@@ -228,9 +228,9 @@
570 print " char * _termname; /* used for termname() */"
571 print "} TERMINAL;"
572 print ""
573- print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
574+ print "extern TERMINAL * NCURSES_EXPORT_VAR(cur_term);"
575 print ""
576- print "#if BROKEN_LINKER"
577+ print "#if defined(BROKEN_LINKER)"
578 print "#define boolnames _nc_boolnames()"
579 print "#define boolcodes _nc_boolcodes()"
580 print "#define boolfnames _nc_boolfnames()"
581@@ -253,15 +253,15 @@
582 print ""
583 print "#else"
584 print ""
585- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];"
586- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];"
587- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];"
588- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];"
589- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];"
590- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];"
591- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];"
592- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];"
593- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];"
594+ print "extern NCURSES_CONST char * const NCURSES_EXPORT_VAR(boolnames[]);"
595+ print "extern NCURSES_CONST char * const NCURSES_EXPORT_VAR(boolcodes[]);"
596+ print "extern NCURSES_CONST char * const NCURSES_EXPORT_VAR(boolfnames[]);"
597+ print "extern NCURSES_CONST char * const NCURSES_EXPORT_VAR(numnames[]);"
598+ print "extern NCURSES_CONST char * const NCURSES_EXPORT_VAR(numcodes[]);"
599+ print "extern NCURSES_CONST char * const NCURSES_EXPORT_VAR(numfnames[]);"
600+ print "extern NCURSES_CONST char * const NCURSES_EXPORT_VAR(strnames[]);"
601+ print "extern NCURSES_CONST char * const NCURSES_EXPORT_VAR(strcodes[]);"
602+ print "extern NCURSES_CONST char * const NCURSES_EXPORT_VAR(strfnames[]);"
603 print ""
604 print "#endif"
605 print ""
606@@ -287,7 +287,7 @@
607 print "#if !defined(__NCURSES_H)"
608 print "extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);"
609 print "extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...);"
610- print "extern NCURSES_EXPORT_VAR(char) ttytype[];"
611+ print "extern char NCURSES_EXPORT_VAR(ttytype[]);"
612 print "extern NCURSES_EXPORT(int) putp (const char *);"
613 print "extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);"
614 print "extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *);"
615--- ncurses-5.4/include/termcap.h.in~visibility.patch
616+++ ncurses-5.4/include/termcap.h.in
617@@ -54,10 +54,10 @@
618 #undef NCURSES_OSPEED
619 #define NCURSES_OSPEED @NCURSES_OSPEED@
620
621-extern NCURSES_EXPORT_VAR(char) PC;
622-extern NCURSES_EXPORT_VAR(char *) UP;
623-extern NCURSES_EXPORT_VAR(char *) BC;
624-extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
625+extern char NCURSES_EXPORT_VAR(PC);
626+extern char * NCURSES_EXPORT_VAR(UP);
627+extern char * NCURSES_EXPORT_VAR(BC);
628+extern NCURSES_OSPEED NCURSES_EXPORT_VAR(ospeed);
629
630 #if !defined(NCURSES_TERM_H_incl)
631 extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **);
632--- ncurses-5.4/include/term_entry.h~visibility.patch
633+++ ncurses-5.4/include/term_entry.h
634@@ -90,8 +90,8 @@
635 #define ExtNumname(tp,i,names) EXT_NAMES(tp, i, NUMCOUNT, (i - (tp->num_Numbers - tp->ext_Numbers)) + tp->ext_Booleans, names)
636 #define ExtStrname(tp,i,names) EXT_NAMES(tp, i, STRCOUNT, (i - (tp->num_Strings - tp->ext_Strings)) + (tp->ext_Numbers + tp->ext_Booleans), names)
637
638-extern NCURSES_EXPORT_VAR(ENTRY *) _nc_head;
639-extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
640+extern ENTRY * NCURSES_EXPORT_VAR(_nc_head);
641+extern ENTRY * NCURSES_EXPORT_VAR(_nc_tail);
642 #define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next)
643
644 #define MAX_LINE 132
645@@ -135,8 +135,8 @@
646
647 /* parse_entry.c: entry-parsing code */
648 #if NCURSES_XNAMES
649-extern NCURSES_EXPORT_VAR(bool) _nc_user_definable;
650-extern NCURSES_EXPORT_VAR(bool) _nc_disable_period;
651+extern bool NCURSES_EXPORT_VAR(_nc_user_definable);
652+extern bool NCURSES_EXPORT_VAR(_nc_disable_period);
653 #endif
654 extern NCURSES_EXPORT(int) _nc_parse_entry (ENTRY *, int, bool);
655 extern NCURSES_EXPORT(int) _nc_capcmp (const char *, const char *);
656--- ncurses-5.4/include/curses.h.in~visibility.patch
657+++ ncurses-5.4/include/curses.h.in
658@@ -171,8 +171,8 @@
659 #define WA_VERTICAL A_VERTICAL
660
661 /* colors */
662-extern NCURSES_EXPORT_VAR(int) COLORS;
663-extern NCURSES_EXPORT_VAR(int) COLOR_PAIRS;
664+extern int NCURSES_EXPORT_VAR(COLORS);
665+extern int NCURSES_EXPORT_VAR(COLOR_PAIRS);
666
667 #define COLOR_BLACK 0
668 #define COLOR_RED 1
669@@ -186,10 +186,10 @@
670 /* line graphics */
671
672 #if @BROKEN_LINKER@
673-extern NCURSES_EXPORT_VAR(chtype*) _nc_acs_map(void);
674+extern chtype* NCURSES_EXPORT_VAR(_nc_acs_map)(void);
675 #define acs_map (_nc_acs_map())
676 #else
677-extern NCURSES_EXPORT_VAR(chtype) acs_map[];
678+extern chtype NCURSES_EXPORT_VAR(acs_map[]);
679 #endif
680
681 #define NCURSES_ACS(c) (acs_map[(unsigned char)c])
682@@ -369,20 +369,20 @@
683 #endif
684 };
685
686-extern NCURSES_EXPORT_VAR(WINDOW *) stdscr;
687-extern NCURSES_EXPORT_VAR(WINDOW *) curscr;
688-extern NCURSES_EXPORT_VAR(WINDOW *) newscr;
689+extern WINDOW * NCURSES_EXPORT_VAR(stdscr);
690+extern WINDOW * NCURSES_EXPORT_VAR(curscr);
691+extern WINDOW * NCURSES_EXPORT_VAR(newscr);
692
693-extern NCURSES_EXPORT_VAR(int) LINES;
694-extern NCURSES_EXPORT_VAR(int) COLS;
695-extern NCURSES_EXPORT_VAR(int) TABSIZE;
696+extern int NCURSES_EXPORT_VAR(LINES);
697+extern int NCURSES_EXPORT_VAR(COLS);
698+extern int NCURSES_EXPORT_VAR(TABSIZE);
699
700 /*
701 * This global was an undocumented feature under AIX curses.
702 */
703-extern NCURSES_EXPORT_VAR(int) ESCDELAY; /* ESC expire time in milliseconds */
704+extern int NCURSES_EXPORT_VAR(ESCDELAY); /* ESC expire time in milliseconds */
705
706-extern NCURSES_EXPORT_VAR(char) ttytype[]; /* needed for backward compatibility */
707+extern char NCURSES_EXPORT_VAR(ttytype[]); /* needed for backward compatibility */
708
709 /*
710 * These functions are extensions - not in XSI Curses.
711--- ncurses-5.4/include/curses.tail~visibility.patch
712+++ ncurses-5.4/include/curses.tail
713@@ -110,7 +110,7 @@
714 #define TRACE_MAXIMUM ((1 << TRACE_SHIFT) - 1) /* maximum trace level */
715
716 #if defined(TRACE) || defined(NCURSES_TEST)
717-extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable; /* enable optimizations */
718+extern int NCURSES_EXPORT_VAR(_nc_optimize_enable); /* enable optimizations */
719 #ifdef _XOPEN_SOURCE_EXTENDED
720 extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *);
721 #endif
722--- ncurses-5.4/include/curses.wide~visibility.patch
723+++ ncurses-5.4/include/curses.wide
724@@ -3,7 +3,7 @@
725
726 /* $Id: curses.wide,v 1.28 2004/01/03 20:35:14 tom Exp $ */
727
728-extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
729+extern cchar_t * NCURSES_EXPORT_VAR(_nc_wacs);
730
731 #define NCURSES_WACS(c) (&_nc_wacs[(unsigned char)c])
732
733--- ncurses-5.4/menu/menu.priv.h~visibility.patch
734+++ ncurses-5.4/menu/menu.priv.h
735@@ -49,8 +49,8 @@
736 /* Backspace code */
737 #define BS (8)
738
739-extern NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item;
740-extern NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu;
741+extern ITEM NCURSES_EXPORT_VAR(_nc_Default_Item);
742+extern MENU NCURSES_EXPORT_VAR(_nc_Default_Menu);
743
744 /* Normalize item to default if none was given */
745 #define Normalize_Item( item ) ((item)=(item)?(item):&_nc_Default_Item)
746--- ncurses-5.4/menu/m_global.c~visibility.patch
747+++ ncurses-5.4/menu/m_global.c
748@@ -41,7 +41,7 @@
749
750 static char mark[] = "-";
751
752-NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = {
753+MENU NCURSES_EXPORT_VAR(_nc_Default_Menu) = {
754 16, /* Nr. of chars high */
755 1, /* Nr. of chars wide */
756 16, /* Nr. of items high */
757@@ -80,7 +80,7 @@
758 0 /* status */
759 };
760
761-NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item = {
762+ITEM NCURSES_EXPORT_VAR(_nc_Default_Item) = {
763 { (char *)0, 0 }, /* name */
764 { (char *)0, 0 }, /* description */
765 (MENU *)0, /* Pointer to parent menu */
766--- ncurses-5.4/ncurses/tty/lib_mvcur.c~visibility.patch
767+++ ncurses-5.4/ncurses/tty/lib_mvcur.c
768@@ -937,7 +937,7 @@
769 }
770
771 #if defined(TRACE) || defined(NCURSES_TEST)
772-NCURSES_EXPORT_VAR(int) _nc_optimize_enable = OPTIMIZE_ALL;
773+int NCURSES_EXPORT_VAR(_nc_optimize_enable) = OPTIMIZE_ALL;
774 #endif
775
776 #if defined(MAIN) || defined(NCURSES_TEST)
777@@ -950,7 +950,7 @@
778 #include <tic.h>
779 #include <dump_entry.h>
780
781-NCURSES_EXPORT_VAR(const char *) _nc_progname = "mvcur";
782+const char * NCURSES_EXPORT_VAR(_nc_progname) = "mvcur";
783
784 static unsigned long xmits;
785
786--- ncurses-5.4/ncurses/tty/hardscroll.c~visibility.patch
787+++ ncurses-5.4/ncurses/tty/hardscroll.c
788@@ -151,8 +151,7 @@
789
790 # undef screen_lines
791 # define screen_lines MAXLINES
792-NCURSES_EXPORT_VAR(int)
793-oldnums[MAXLINES];
794+int NCURSES_EXPORT_VAR(oldnums[MAXLINES]);
795 # define OLDNUM(n) oldnums[n]
796 # define _tracef printf
797 # undef TR
798@@ -163,8 +162,7 @@
799 /* OLDNUM(n) indicates which line will be shifted to the position n.
800 if OLDNUM(n) == _NEWINDEX, then the line n in new, not shifted from
801 somewhere. */
802-NCURSES_EXPORT_VAR(int *)
803-_nc_oldnums = 0;
804+int * NCURSES_EXPORT_VAR(_nc_oldnums) = 0;
805
806 # if USE_HASHMAP
807 static int oldnums_allocated = 0;
808--- ncurses-5.4/ncurses/base/lib_getch.c~visibility.patch
809+++ ncurses-5.4/ncurses/base/lib_getch.c
810@@ -44,8 +44,7 @@
811
812 #include <fifo_defs.h>
813
814-NCURSES_EXPORT_VAR(int)
815-ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */
816+int NCURSES_EXPORT_VAR(ESCDELAY) = 1000; /* max interval betw. chars in funkeys, in millisecs */
817
818 #ifdef NCURSES_WGETCH_EVENTS
819 #define TWAIT_MASK 7
820--- ncurses-5.4/ncurses/base/lib_slk.c~visibility.patch
821+++ ncurses-5.4/ncurses/base/lib_slk.c
822@@ -47,8 +47,7 @@
823 * We'd like to move these into the screen context structure, but cannot,
824 * because slk_init() is called before initscr()/newterm().
825 */
826-NCURSES_EXPORT_VAR(int)
827-_nc_slk_format = 0; /* one more than format specified in slk_init() */
828+int NCURSES_EXPORT_VAR(_nc_slk_format) = 0; /* one more than format specified in slk_init() */
829
830 /*
831 * Paint the info line for the PC style SLK emulation.
832--- ncurses-5.4/ncurses/base/lib_color.c~visibility.patch
833+++ ncurses-5.4/ncurses/base/lib_color.c
834@@ -48,8 +48,8 @@
835 * historical reasons. So we assign them in start_color() and also in
836 * set_term()'s screen-switching logic.
837 */
838-NCURSES_EXPORT_VAR(int) COLOR_PAIRS = 0;
839-NCURSES_EXPORT_VAR(int) COLORS = 0;
840+int NCURSES_EXPORT_VAR(COLOR_PAIRS) = 0;
841+int NCURSES_EXPORT_VAR(COLORS) = 0;
842
843 #define DATA(r,g,b) {r,g,b, 0,0,0, 0}
844
845--- ncurses-5.4/ncurses/tinfo/lib_termcap.c~visibility.patch
846+++ ncurses-5.4/ncurses/tinfo/lib_termcap.c
847@@ -50,8 +50,8 @@
848 #define L_BRACK '['
849 #define SHIFT_OUT 017 /* ^N */
850
851-NCURSES_EXPORT_VAR(char *) UP = 0;
852-NCURSES_EXPORT_VAR(char *) BC = 0;
853+char * NCURSES_EXPORT_VAR(UP) = 0;
854+char * NCURSES_EXPORT_VAR(BC) = 0;
855
856 static char *fix_me = 0;
857
858--- ncurses-5.4/ncurses/tinfo/lib_cur_term.c~visibility.patch
859+++ ncurses-5.4/ncurses/tinfo/lib_cur_term.c
860@@ -42,7 +42,7 @@
861
862 MODULE_ID("$Id: lib_cur_term.c,v 1.13 2003/12/27 18:21:30 tom Exp $")
863
864-NCURSES_EXPORT_VAR(TERMINAL *) cur_term = 0;
865+TERMINAL * NCURSES_EXPORT_VAR(cur_term) = 0;
866
867 NCURSES_EXPORT(TERMINAL *)
868 set_curterm(TERMINAL * termp)
869--- ncurses-5.4/ncurses/tinfo/lib_setup.c~visibility.patch
870+++ ncurses-5.4/ncurses/tinfo/lib_setup.c
871@@ -91,10 +91,10 @@
872 # endif
873 #endif
874
875-NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = "";
876-NCURSES_EXPORT_VAR(int) LINES = 0;
877-NCURSES_EXPORT_VAR(int) COLS = 0;
878-NCURSES_EXPORT_VAR(int) TABSIZE = 0;
879+char NCURSES_EXPORT_VAR(ttytype[NAMESIZE]) = "";
880+int NCURSES_EXPORT_VAR(LINES) = 0;
881+int NCURSES_EXPORT_VAR(COLS) = 0;
882+int NCURSES_EXPORT_VAR(TABSIZE) = 0;
883
884 static int _use_env = TRUE;
885
886--- ncurses-5.4/ncurses/tinfo/MKnames.awk~visibility.patch
887+++ ncurses-5.4/ncurses/tinfo/MKnames.awk
888@@ -10,7 +10,7 @@
889 print "#include <term.h>" > "namehdr"
890 print "#define DCL(it) static IT data##it[]" > "namehdr"
891 print "#else" > "namehdr"
892- print "#define DCL(it) NCURSES_EXPORT_VAR(IT) it[]" > "namehdr"
893+ print "#define DCL(it) IT NCURSES_EXPORT_VAR(it[])" > "namehdr"
894 print "#endif" > "namehdr"
895 print "" > "namehdr"
896 print "/*" > "boolnames"
897--- ncurses-5.4/ncurses/tinfo/lib_tparm.c~visibility.patch
898+++ ncurses-5.4/ncurses/tinfo/lib_tparm.c
899@@ -115,7 +115,7 @@
900 bool num_type;
901 } stack_frame;
902
903-NCURSES_EXPORT_VAR(int) _nc_tparm_err = 0;
904+int NCURSES_EXPORT_VAR(_nc_tparm_err) = 0;
905
906 static stack_frame stack[STACKSIZE];
907 static int stack_ptr;
908--- ncurses-5.4/ncurses/tinfo/lib_tputs.c~visibility.patch
909+++ ncurses-5.4/ncurses/tinfo/lib_tputs.c
910@@ -47,10 +47,10 @@
911
912 MODULE_ID("$Id: lib_tputs.c,v 1.62 2003/08/23 21:39:20 tom Exp $")
913
914-NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */
915-NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */
916+char NCURSES_EXPORT_VAR(PC) = 0; /* used by termcap library */
917+NCURSES_OSPEED NCURSES_EXPORT_VAR(ospeed) = 0; /* used by termcap library */
918
919-NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0; /* used by 'tack' program */
920+int NCURSES_EXPORT_VAR(_nc_nulls_sent) = 0; /* used by 'tack' program */
921
922 static int (*my_outch) (int c) = _nc_outch;
923
924--- ncurses-5.4/ncurses/tinfo/comp_error.c~visibility.patch
925+++ ncurses-5.4/ncurses/tinfo/comp_error.c
926@@ -42,9 +42,9 @@
927
928 MODULE_ID("$Id: comp_error.c,v 1.25 2002/09/07 20:05:07 tom Exp $")
929
930-NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings = FALSE;
931-NCURSES_EXPORT_VAR(int) _nc_curr_line = 0; /* current line # in input */
932-NCURSES_EXPORT_VAR(int) _nc_curr_col = 0; /* current column # in input */
933+bool NCURSES_EXPORT_VAR(_nc_suppress_warnings) = FALSE;
934+int NCURSES_EXPORT_VAR(_nc_curr_line) = 0; /* current line # in input */
935+int NCURSES_EXPORT_VAR(_nc_curr_col) = 0; /* current column # in input */
936
937 static const char *sourcename;
938 static char *termtype;
939--- ncurses-5.4/ncurses/tinfo/free_ttype.c~visibility.patch
940+++ ncurses-5.4/ncurses/tinfo/free_ttype.c
941@@ -92,7 +92,7 @@
942 }
943
944 #if NCURSES_XNAMES
945-NCURSES_EXPORT_VAR(bool) _nc_user_definable = TRUE;
946+bool NCURSES_EXPORT_VAR(_nc_user_definable) = TRUE;
947
948 NCURSES_EXPORT(int)
949 use_extended_names(bool flag)
950--- ncurses-5.4/ncurses/tinfo/comp_parse.c~visibility.patch
951+++ ncurses-5.4/ncurses/tinfo/comp_parse.c
952@@ -78,8 +78,8 @@
953 * _nc_head _nc_tail
954 */
955
956-NCURSES_EXPORT_VAR(ENTRY *) _nc_head = 0;
957-NCURSES_EXPORT_VAR(ENTRY *) _nc_tail = 0;
958+ENTRY * NCURSES_EXPORT_VAR(_nc_head) = 0;
959+ENTRY * NCURSES_EXPORT_VAR(_nc_tail) = 0;
960
961 static void
962 enqueue(ENTRY * ep)
963--- ncurses-5.4/ncurses/tinfo/comp_scan.c~visibility.patch
964+++ ncurses-5.4/ncurses/tinfo/comp_scan.c
965@@ -60,19 +60,13 @@
966
967 #define iswhite(ch) (ch == ' ' || ch == '\t')
968
969-NCURSES_EXPORT_VAR(int)
970-_nc_syntax = 0; /* termcap or terminfo? */
971-NCURSES_EXPORT_VAR(long)
972-_nc_curr_file_pos = 0; /* file offset of current line */
973-NCURSES_EXPORT_VAR(long)
974-_nc_comment_start = 0; /* start of comment range before name */
975-NCURSES_EXPORT_VAR(long)
976-_nc_comment_end = 0; /* end of comment range before name */
977-NCURSES_EXPORT_VAR(long)
978-_nc_start_line = 0; /* start line of current entry */
979+int NCURSES_EXPORT_VAR(_nc_syntax) = 0; /* termcap or terminfo? */
980+long NCURSES_EXPORT_VAR(_nc_curr_file_pos) = 0; /* file offset of current line */
981+long NCURSES_EXPORT_VAR(_nc_comment_start) = 0; /* start of comment range before name */
982+long NCURSES_EXPORT_VAR(_nc_comment_end) = 0; /* end of comment range before name */
983+long NCURSES_EXPORT_VAR(_nc_start_line) = 0; /* start line of current entry */
984
985-NCURSES_EXPORT_VAR(struct token)
986-_nc_curr_token =
987+struct token NCURSES_EXPORT_VAR(_nc_curr_token) =
988 {
989 0, 0, 0
990 };
991@@ -90,8 +84,7 @@
992 static char *pushname;
993
994 #if NCURSES_EXT_FUNCS
995-NCURSES_EXPORT_VAR(bool)
996-_nc_disable_period = FALSE; /* used by tic -a option */
997+bool NCURSES_EXPORT_VAR(_nc_disable_period) = FALSE; /* used by tic -a option */
998 #endif
999
1000 static bool end_of_stream(void);
1001--- ncurses-5.4/ncurses/tinfo/lib_acs.c~visibility.patch
1002+++ ncurses-5.4/ncurses/tinfo/lib_acs.c
1003@@ -37,8 +37,7 @@
1004 MODULE_ID("$Id: lib_acs.c,v 1.25 2002/12/28 16:26:46 tom Exp $")
1005
1006 #if BROKEN_LINKER
1007-NCURSES_EXPORT_VAR(chtype *)
1008-_nc_acs_map(void)
1009+chtype * NCURSES_EXPORT_VAR(_nc_acs_map)(void)
1010 {
1011 static chtype *the_map = 0;
1012 if (the_map == 0)
1013@@ -46,7 +45,7 @@
1014 return the_map;
1015 }
1016 #else
1017-NCURSES_EXPORT_VAR(chtype) acs_map[ACS_LEN] =
1018+chtype NCURSES_EXPORT_VAR(acs_map[ACS_LEN]) =
1019 {
1020 0
1021 };
1022--- ncurses-5.4/ncurses/tinfo/lib_data.c~visibility.patch
1023+++ ncurses-5.4/ncurses/tinfo/lib_data.c
1024@@ -46,14 +46,11 @@
1025 * OS/2's native linker complains if we don't initialize public data when
1026 * constructing a dll (reported by J.J.G.Ripoll).
1027 */
1028-NCURSES_EXPORT_VAR(WINDOW *)
1029-stdscr = 0;
1030-NCURSES_EXPORT_VAR(WINDOW *)
1031-curscr = 0;
1032-NCURSES_EXPORT_VAR(WINDOW *)
1033-newscr = 0;
1034+WINDOW * NCURSES_EXPORT_VAR(stdscr) = 0;
1035+WINDOW * NCURSES_EXPORT_VAR(curscr) = 0;
1036+WINDOW * NCURSES_EXPORT_VAR(newscr) = 0;
1037
1038-NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain = 0;
1039+SCREEN * NCURSES_EXPORT_VAR(_nc_screen_chain) = 0;
1040
1041 /*
1042 * The variable 'SP' will be defined as a function on systems that cannot link
1043@@ -87,5 +84,5 @@
1044 }
1045
1046 #else
1047-NCURSES_EXPORT_VAR(SCREEN *) SP = NULL; /* Some linkers require initialized data... */
1048+SCREEN * NCURSES_EXPORT_VAR(SP) = NULL; /* Some linkers require initialized data... */
1049 #endif
1050--- ncurses-5.4/ncurses/trace/lib_trace.c~visibility.patch
1051+++ ncurses-5.4/ncurses/trace/lib_trace.c
1052@@ -42,11 +42,11 @@
1053
1054 MODULE_ID("$Id: lib_trace.c,v 1.53 2003/11/23 00:39:30 tom Exp $")
1055
1056-NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
1057+unsigned NCURSES_EXPORT_VAR(_nc_tracing) = 0; /* always define this */
1058
1059 #ifdef TRACE
1060-NCURSES_EXPORT_VAR(const char *) _nc_tputs_trace = "";
1061-NCURSES_EXPORT_VAR(long) _nc_outchars = 0;
1062+const char * NCURSES_EXPORT_VAR(_nc_tputs_trace) = "";
1063+long NCURSES_EXPORT_VAR(_nc_outchars) = 0;
1064
1065 static FILE *tracefp = 0; /* default to writing to stderr */
1066
1067--- ncurses-5.4/ncurses/curses.priv.h~visibility.patch
1068+++ ncurses-5.4/ncurses/curses.priv.h
1069@@ -498,7 +498,7 @@
1070 #endif
1071 };
1072
1073-extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain;
1074+extern SCREEN * NCURSES_EXPORT_VAR(_nc_screen_chain);
1075
1076 #if NCURSES_NOMACROS
1077 #include <nomacros.h>
1078@@ -752,9 +752,9 @@
1079 extern NCURSES_EXPORT(int) _nc_retrace_int (int);
1080 extern NCURSES_EXPORT(unsigned) _nc_retrace_unsigned (unsigned);
1081 extern NCURSES_EXPORT(void) _nc_fifo_dump (void);
1082-extern NCURSES_EXPORT_VAR(const char *) _nc_tputs_trace;
1083-extern NCURSES_EXPORT_VAR(long) _nc_outchars;
1084-extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
1085+extern const char * NCURSES_EXPORT_VAR(_nc_tputs_trace);
1086+extern long NCURSES_EXPORT_VAR(_nc_outchars);
1087+extern unsigned NCURSES_EXPORT_VAR(_nc_tracing);
1088
1089 #if USE_WIDEC_SUPPORT
1090 extern NCURSES_EXPORT(const char *) _nc_viswbuf2 (int, const wchar_t *);
1091@@ -1055,7 +1055,7 @@
1092 #endif
1093
1094 /* scroll indices */
1095-extern NCURSES_EXPORT_VAR(int *) _nc_oldnums;
1096+extern int * NCURSES_EXPORT_VAR(_nc_oldnums);
1097
1098 #define USE_SETBUF_0 0
1099
1100@@ -1074,7 +1074,7 @@
1101 extern NCURSES_EXPORT(void) _nc_set_screen (SCREEN *);
1102 #else
1103 /* current screen is private data; avoid possible linking conflicts too */
1104-extern NCURSES_EXPORT_VAR(SCREEN *) SP;
1105+extern SCREEN * NCURSES_EXPORT_VAR(SP);
1106 #define _nc_alloc_screen() ((SP = typeCalloc(SCREEN, 1)) != 0)
1107 #define _nc_set_screen(sp) SP = sp
1108 #endif
1109@@ -1087,7 +1087,7 @@
1110 #define screen_lines SP->_lines
1111 #define screen_columns SP->_columns
1112
1113-extern NCURSES_EXPORT_VAR(int) _nc_slk_format; /* != 0 if slk_init() called */
1114+extern int NCURSES_EXPORT_VAR(_nc_slk_format); /* != 0 if slk_init() called */
1115 extern NCURSES_EXPORT(int) _nc_slk_initialize (WINDOW *, int);
1116
1117 /*
1118--- /dev/null
1119+++ ncurses-5.4/m4/cf.m4
1120@@ -0,0 +1,3703 @@
1121+dnl***************************************************************************
1122+dnl Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
1123+dnl *
1124+dnl Permission is hereby granted, free of charge, to any person obtaining a *
1125+dnl copy of this software and associated documentation files (the *
1126+dnl "Software"), to deal in the Software without restriction, including *
1127+dnl without limitation the rights to use, copy, modify, merge, publish, *
1128+dnl distribute, distribute with modifications, sublicense, and/or sell *
1129+dnl copies of the Software, and to permit persons to whom the Software is *
1130+dnl furnished to do so, subject to the following conditions: *
1131+dnl *
1132+dnl The above copyright notice and this permission notice shall be included *
1133+dnl in all copies or substantial portions of the Software. *
1134+dnl *
1135+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
1136+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
1137+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
1138+dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
1139+dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
1140+dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
1141+dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
1142+dnl *
1143+dnl Except as contained in this notice, the name(s) of the above copyright *
1144+dnl holders shall not be used in advertising or otherwise to promote the *
1145+dnl sale, use or other dealings in this Software without prior written *
1146+dnl authorization. *
1147+dnl***************************************************************************
1148+dnl
1149+dnl Author: Thomas E. Dickey 1995-2003
1150+dnl
1151+dnl $Id: aclocal.m4,v 1.333 2004/01/30 20:59:56 tom Exp $
1152+dnl Macros used in NCURSES auto-configuration script.
1153+dnl
1154+dnl See http://invisible-island.net/autoconf/ for additional information.
1155+dnl
1156+dnl ---------------------------------------------------------------------------
1157+dnl ---------------------------------------------------------------------------
1158+dnl CF_ADA_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15
1159+dnl -------------------
1160+dnl Construct the list of include-options for the C programs in the Ada95
1161+dnl binding.
1162+AC_DEFUN([CF_ADA_INCLUDE_DIRS],
1163+[
1164+ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
1165+if test "$srcdir" != "."; then
1166+ ACPPFLAGS="-I\$(srcdir)/../../include $ACPPFLAGS"
1167+fi
1168+if test "$GCC" != yes; then
1169+ ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
1170+elif test "$includedir" != "/usr/include"; then
1171+ if test "$includedir" = '${prefix}/include' ; then
1172+ if test $prefix != /usr ; then
1173+ ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
1174+ fi
1175+ else
1176+ ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
1177+ fi
1178+fi
1179+AC_SUBST(ACPPFLAGS)
1180+])dnl
1181+dnl ---------------------------------------------------------------------------
1182+dnl CF_ADD_CFLAGS version: 5 updated: 2002/12/01 00:12:15
1183+dnl -------------
1184+dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
1185+dnl The second parameter if given makes this macro verbose.
1186+AC_DEFUN([CF_ADD_CFLAGS],
1187+[
1188+cf_new_cflags=
1189+cf_new_cppflags=
1190+for cf_add_cflags in $1
1191+do
1192+ case $cf_add_cflags in #(vi
1193+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1194+ case "$CPPFLAGS" in
1195+ *$cf_add_cflags) #(vi
1196+ ;;
1197+ *) #(vi
1198+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1199+ ;;
1200+ esac
1201+ ;;
1202+ *)
1203+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1204+ ;;
1205+ esac
1206+done
1207+
1208+if test -n "$cf_new_cflags" ; then
1209+ ifelse($2,,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)])
1210+ CFLAGS="$CFLAGS $cf_new_cflags"
1211+fi
1212+
1213+if test -n "$cf_new_cppflags" ; then
1214+ ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
1215+ CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1216+fi
1217+
1218+])dnl
1219+dnl ---------------------------------------------------------------------------
1220+dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34
1221+dnl ----------------
1222+dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
1223+dnl in the sharutils 4.2 distribution.
1224+AC_DEFUN([CF_ANSI_CC_CHECK],
1225+[
1226+AC_CACHE_CHECK(for ${CC-cc} option to accept ANSI C, cf_cv_ansi_cc,[
1227+cf_cv_ansi_cc=no
1228+cf_save_CFLAGS="$CFLAGS"
1229+cf_save_CPPFLAGS="$CPPFLAGS"
1230+# Don't try gcc -ansi; that turns off useful extensions and
1231+# breaks some systems' header files.
1232+# AIX -qlanglvl=ansi
1233+# Ultrix and OSF/1 -std1
1234+# HP-UX -Aa -D_HPUX_SOURCE
1235+# SVR4 -Xc
1236+# UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1237+for cf_arg in "-DCC_HAS_PROTOS" \
1238+ "" \
1239+ -qlanglvl=ansi \
1240+ -std1 \
1241+ -Ae \
1242+ "-Aa -D_HPUX_SOURCE" \
1243+ -Xc
1244+do
1245+ CF_ADD_CFLAGS($cf_arg)
1246+ AC_TRY_COMPILE(
1247+[
1248+#ifndef CC_HAS_PROTOS
1249+#if !defined(__STDC__) || (__STDC__ != 1)
1250+choke me
1251+#endif
1252+#endif
1253+],[
1254+ int test (int i, double x);
1255+ struct s1 {int (*f) (int a);};
1256+ struct s2 {int (*f) (double a);};],
1257+ [cf_cv_ansi_cc="$cf_arg"; break])
1258+done
1259+CFLAGS="$cf_save_CFLAGS"
1260+CPPFLAGS="$cf_save_CPPFLAGS"
1261+])
1262+
1263+if test "$cf_cv_ansi_cc" != "no"; then
1264+if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1265+ CF_ADD_CFLAGS($cf_cv_ansi_cc)
1266+else
1267+ AC_DEFINE(CC_HAS_PROTOS)
1268+fi
1269+fi
1270+])dnl
1271+dnl ---------------------------------------------------------------------------
1272+dnl CF_ANSI_CC_REQD version: 3 updated: 1997/09/06 13:40:44
1273+dnl ---------------
1274+dnl For programs that must use an ANSI compiler, obtain compiler options that
1275+dnl will make it recognize prototypes. We'll do preprocessor checks in other
1276+dnl macros, since tools such as unproto can fake prototypes, but only part of
1277+dnl the preprocessor.
1278+AC_DEFUN([CF_ANSI_CC_REQD],
1279+[AC_REQUIRE([CF_ANSI_CC_CHECK])
1280+if test "$cf_cv_ansi_cc" = "no"; then
1281+ AC_ERROR(
1282+[Your compiler does not appear to recognize prototypes.
1283+You have the following choices:
1284+ a. adjust your compiler options
1285+ b. get an up-to-date compiler
1286+ c. use a wrapper such as unproto])
1287+fi
1288+])dnl
1289+dnl ---------------------------------------------------------------------------
1290+dnl CF_BOOL_DECL version: 8 updated: 2004/01/30 15:51:18
1291+dnl ------------
1292+dnl Test if 'bool' is a builtin type in the configured C++ compiler. Some
1293+dnl older compilers (e.g., gcc 2.5.8) don't support 'bool' directly; gcc
1294+dnl 2.6.3 does, in anticipation of the ANSI C++ standard.
1295+dnl
1296+dnl Treat the configuration-variable specially here, since we're directly
1297+dnl substituting its value (i.e., 1/0).
1298+dnl
1299+dnl $1 is the shell variable to store the result in, if not $cv_cv_builtin_bool
1300+AC_DEFUN([CF_BOOL_DECL],
1301+[
1302+AC_MSG_CHECKING(if we should include stdbool.h)
1303+
1304+AC_CACHE_VAL(cf_cv_header_stdbool_h,[
1305+ AC_TRY_COMPILE([],[bool foo = false],
1306+ [cf_cv_header_stdbool_h=0],
1307+ [AC_TRY_COMPILE([
1308+#ifndef __BEOS__
1309+#include <stdbool.h>
1310+#endif
1311+],[bool foo = false],
1312+ [cf_cv_header_stdbool_h=1],
1313+ [cf_cv_header_stdbool_h=0])])])
1314+
1315+if test "$cf_cv_header_stdbool_h" = 1
1316+then AC_MSG_RESULT(yes)
1317+else AC_MSG_RESULT(no)
1318+fi
1319+
1320+AC_MSG_CHECKING([for builtin bool type])
1321+
1322+AC_CACHE_VAL(ifelse($1,,cf_cv_builtin_bool,[$1]),[
1323+ AC_TRY_COMPILE([
1324+#include <stdio.h>
1325+#include <sys/types.h>
1326+],[bool x = false],
1327+ [ifelse($1,,cf_cv_builtin_bool,[$1])=1],
1328+ [ifelse($1,,cf_cv_builtin_bool,[$1])=0])
1329+ ])
1330+
1331+if test "$ifelse($1,,cf_cv_builtin_bool,[$1])" = 1
1332+then AC_MSG_RESULT(yes)
1333+else AC_MSG_RESULT(no)
1334+fi
1335+])dnl
1336+dnl ---------------------------------------------------------------------------
1337+dnl CF_BOOL_SIZE version: 10 updated: 2002/02/23 20:38:31
1338+dnl ------------
1339+dnl Test for the size of 'bool' in the configured C++ compiler (e.g., a type).
1340+dnl Don't bother looking for bool.h, since it's been deprecated.
1341+dnl
1342+dnl If the current compiler is C rather than C++, we get the bool definition
1343+dnl from <stdbool.h>.
1344+AC_DEFUN([CF_BOOL_SIZE],
1345+[
1346+AC_MSG_CHECKING([for size of bool])
1347+AC_CACHE_VAL(cf_cv_type_of_bool,[
1348+ rm -f cf_test.out
1349+ AC_TRY_RUN([
1350+#include <stdlib.h>
1351+#include <stdio.h>
1352+
1353+#if defined(__cplusplus)
1354+
1355+#ifdef HAVE_GXX_BUILTIN_H
1356+#include <g++/builtin.h>
1357+#elif HAVE_GPP_BUILTIN_H
1358+#include <gpp/builtin.h>
1359+#elif HAVE_BUILTIN_H
1360+#include <builtin.h>
1361+#endif
1362+
1363+#else
1364+
1365+#if $cf_cv_header_stdbool_h
1366+#include <stdbool.h>
1367+#endif
1368+
1369+#endif
1370+
1371+main()
1372+{
1373+ FILE *fp = fopen("cf_test.out", "w");
1374+ if (fp != 0) {
1375+ bool x = true;
1376+ if ((bool)(-x) >= 0)
1377+ fputs("unsigned ", fp);
1378+ if (sizeof(x) == sizeof(int)) fputs("int", fp);
1379+ else if (sizeof(x) == sizeof(char)) fputs("char", fp);
1380+ else if (sizeof(x) == sizeof(short))fputs("short",fp);
1381+ else if (sizeof(x) == sizeof(long)) fputs("long", fp);
1382+ fclose(fp);
1383+ }
1384+ exit(0);
1385+}
1386+ ],
1387+ [cf_cv_type_of_bool=`cat cf_test.out`
1388+ if test -z "$cf_cv_type_of_bool"; then
1389+ cf_cv_type_of_bool=unknown
1390+ fi],
1391+ [cf_cv_type_of_bool=unknown],
1392+ [cf_cv_type_of_bool=unknown])
1393+ ])
1394+ rm -f cf_test.out
1395+AC_MSG_RESULT($cf_cv_type_of_bool)
1396+if test "$cf_cv_type_of_bool" = unknown ; then
1397+ case .$NCURSES_BOOL in #(vi
1398+ .auto|.) NCURSES_BOOL=unsigned;;
1399+ esac
1400+ AC_MSG_WARN(Assuming $NCURSES_BOOL for type of bool)
1401+ cf_cv_type_of_bool=$NCURSES_BOOL
1402+fi
1403+])dnl
1404+dnl ---------------------------------------------------------------------------
1405+dnl CF_CFG_DEFAULTS version: 6 updated: 2003/07/12 15:15:19
1406+dnl ---------------
1407+dnl Determine the default configuration into which we'll install ncurses. This
1408+dnl can be overridden by the user's command-line options. There's two items to
1409+dnl look for:
1410+dnl 1. the prefix (e.g., /usr)
1411+dnl 2. the header files (e.g., /usr/include/ncurses)
1412+dnl We'll look for a previous installation of ncurses and use the same defaults.
1413+dnl
1414+dnl We don't use AC_PREFIX_DEFAULT, because it gets evaluated too soon, and
1415+dnl we don't use AC_PREFIX_PROGRAM, because we cannot distinguish ncurses's
1416+dnl programs from a vendor's.
1417+AC_DEFUN([CF_CFG_DEFAULTS],
1418+[
1419+AC_MSG_CHECKING(for prefix)
1420+if test "x$prefix" = "xNONE" ; then
1421+ case "$cf_cv_system_name" in
1422+ # non-vendor systems don't have a conflict
1423+ openbsd*|netbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1424+ prefix=/usr
1425+ ;;
1426+ *) prefix=$ac_default_prefix
1427+ ;;
1428+ esac
1429+fi
1430+AC_MSG_RESULT($prefix)
1431+
1432+if test "x$prefix" = "xNONE" ; then
1433+AC_MSG_CHECKING(for default include-directory)
1434+test -n "$verbose" && echo 1>&AC_FD_MSG
1435+for cf_symbol in \
1436+ $includedir \
1437+ $includedir/ncurses \
1438+ $prefix/include \
1439+ $prefix/include/ncurses \
1440+ /usr/local/include \
1441+ /usr/local/include/ncurses \
1442+ /usr/include \
1443+ /usr/include/ncurses
1444+do
1445+ cf_dir=`eval echo $cf_symbol`
1446+ if test -f $cf_dir/curses.h ; then
1447+ if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1448+ includedir="$cf_symbol"
1449+ test -n "$verbose" && echo $ac_n " found " 1>&AC_FD_MSG
1450+ break
1451+ fi
1452+ fi
1453+ test -n "$verbose" && echo " tested $cf_dir" 1>&AC_FD_MSG
1454+done
1455+AC_MSG_RESULT($includedir)
1456+fi
1457+])dnl
1458+dnl ---------------------------------------------------------------------------
1459+dnl CF_CGETENT version: 3 updated: 2000/08/12 23:18:52
1460+dnl ----------
1461+dnl Check if the terminal-capability database functions are available. If not,
1462+dnl ncurses has a much-reduced version.
1463+AC_DEFUN([CF_CGETENT],[
1464+AC_MSG_CHECKING(for terminal-capability database functions)
1465+AC_CACHE_VAL(cf_cv_cgetent,[
1466+AC_TRY_LINK([
1467+#include <stdlib.h>],[
1468+ char temp[128];
1469+ char *buf = temp;
1470+ char *db_array = temp;
1471+ cgetent(&buf, /* int *, */ &db_array, "vt100");
1472+ cgetcap(buf, "tc", '=');
1473+ cgetmatch(buf, "tc");
1474+ ],
1475+ [cf_cv_cgetent=yes],
1476+ [cf_cv_cgetent=no])
1477+])
1478+AC_MSG_RESULT($cf_cv_cgetent)
1479+test "$cf_cv_cgetent" = yes && AC_DEFINE(HAVE_BSD_CGETENT)
1480+])dnl
1481+dnl ---------------------------------------------------------------------------
1482+dnl CF_CHECK_CACHE version: 9 updated: 2004/01/30 15:59:13
1483+dnl --------------
1484+dnl Check if we're accidentally using a cache from a different machine.
1485+dnl Derive the system name, as a check for reusing the autoconf cache.
1486+dnl
1487+dnl If we've packaged config.guess and config.sub, run that (since it does a
1488+dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow
1489+dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM
1490+dnl which is useful in cross-compiles.
1491+dnl
1492+dnl Note: we would use $ac_config_sub, but that is one of the places where
1493+dnl autoconf 2.5x broke compatibility with autoconf 2.13
1494+AC_DEFUN([CF_CHECK_CACHE],
1495+[
1496+if test -f $srcdir/config.guess ; then
1497+ ifelse([$1],,[AC_CANONICAL_HOST],[$1])
1498+ system_name="$host_os"
1499+else
1500+ system_name="`(uname -s -r) 2>/dev/null`"
1501+ if test -z "$system_name" ; then
1502+ system_name="`(hostname) 2>/dev/null`"
1503+ fi
1504+fi
1505+test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
1506+AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
1507+
1508+test -z "$system_name" && system_name="$cf_cv_system_name"
1509+test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)
1510+
1511+if test ".$system_name" != ".$cf_cv_system_name" ; then
1512+ AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))
1513+ AC_ERROR("Please remove config.cache and try again.")
1514+fi
1515+])dnl
1516+dnl ---------------------------------------------------------------------------
1517+dnl CF_CHECK_ERRNO version: 9 updated: 2001/12/30 18:03:23
1518+dnl --------------
1519+dnl Check for data that is usually declared in <stdio.h> or <errno.h>, e.g.,
1520+dnl the 'errno' variable. Define a DECL_xxx symbol if we must declare it
1521+dnl ourselves.
1522+dnl
1523+dnl $1 = the name to check
1524+AC_DEFUN([CF_CHECK_ERRNO],
1525+[
1526+AC_CACHE_CHECK(if external $1 is declared, cf_cv_dcl_$1,[
1527+ AC_TRY_COMPILE([
1528+#ifdef HAVE_STDLIB_H
1529+#include <stdlib.h>
1530+#endif
1531+#include <stdio.h>
1532+#include <sys/types.h>
1533+#include <errno.h> ],
1534+ [long x = (long) $1],
1535+ [cf_cv_dcl_$1=yes],
1536+ [cf_cv_dcl_$1=no])
1537+])
1538+
1539+if test "$cf_cv_dcl_$1" = no ; then
1540+ CF_UPPER(cf_result,decl_$1)
1541+ AC_DEFINE_UNQUOTED($cf_result)
1542+fi
1543+
1544+# It's possible (for near-UNIX clones) that the data doesn't exist
1545+CF_CHECK_EXTERN_DATA($1,int)
1546+])dnl
1547+dnl ---------------------------------------------------------------------------
1548+dnl CF_CHECK_EXTERN_DATA version: 3 updated: 2001/12/30 18:03:23
1549+dnl --------------------
1550+dnl Check for existence of external data in the current set of libraries. If
1551+dnl we can modify it, it's real enough.
1552+dnl $1 = the name to check
1553+dnl $2 = its type
1554+AC_DEFUN([CF_CHECK_EXTERN_DATA],
1555+[
1556+AC_CACHE_CHECK(if external $1 exists, cf_cv_have_$1,[
1557+ AC_TRY_LINK([
1558+#undef $1
1559+extern $2 $1;
1560+],
1561+ [$1 = 2],
1562+ [cf_cv_have_$1=yes],
1563+ [cf_cv_have_$1=no])
1564+])
1565+
1566+if test "$cf_cv_have_$1" = yes ; then
1567+ CF_UPPER(cf_result,have_$1)
1568+ AC_DEFINE_UNQUOTED($cf_result)
1569+fi
1570+
1571+])dnl
1572+dnl ---------------------------------------------------------------------------
1573+dnl CF_CPP_PARAM_INIT version: 4 updated: 2001/04/07 22:31:18
1574+dnl -----------------
1575+dnl Check if the C++ compiler accepts duplicate parameter initialization. This
1576+dnl is a late feature for the standard and is not in some recent compilers
1577+dnl (1999/9/11).
1578+AC_DEFUN([CF_CPP_PARAM_INIT],
1579+[
1580+if test -n "$CXX"; then
1581+AC_CACHE_CHECK(if $CXX accepts parameter initialization,cf_cv_cpp_param_init,[
1582+ AC_LANG_SAVE
1583+ AC_LANG_CPLUSPLUS
1584+ AC_TRY_RUN([
1585+class TEST {
1586+private:
1587+ int value;
1588+public:
1589+ TEST(int x = 1);
1590+ ~TEST();
1591+};
1592+
1593+TEST::TEST(int x = 1) // some compilers do not like second initializer
1594+{
1595+ value = x;
1596+}
1597+void main() { }
1598+],
1599+ [cf_cv_cpp_param_init=yes],
1600+ [cf_cv_cpp_param_init=no],
1601+ [cf_cv_cpp_param_init=unknown])
1602+ AC_LANG_RESTORE
1603+])
1604+fi
1605+test "$cf_cv_cpp_param_init" = yes && AC_DEFINE(CPP_HAS_PARAM_INIT)
1606+])dnl
1607+dnl ---------------------------------------------------------------------------
1608+dnl CF_CPP_VSCAN_FUNC version: 5 updated: 2001/12/02 01:39:28
1609+dnl -----------------
1610+dnl Check if the g++ compiler supports vscan function (not a standard feature).
1611+AC_DEFUN([CF_CPP_VSCAN_FUNC],
1612+[
1613+if test -n "$CXX"; then
1614+
1615+AC_LANG_SAVE
1616+AC_LANG_CPLUSPLUS
1617+AC_CHECK_HEADERS(strstream.h)
1618+
1619+AC_CACHE_CHECK(if $CXX supports vscan function,cf_cv_cpp_vscan_func,[
1620+ for cf_vscan_func in strstream strstream_cast stdio
1621+ do
1622+ case $cf_vscan_func in #(vi
1623+ stdio) cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
1624+ strstream) cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
1625+ strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
1626+ esac
1627+ AC_TRY_LINK([
1628+#include <stdio.h>
1629+#include <stdarg.h>
1630+#define $cf_vscan_defs 1
1631+#if defined(USE_STDIO_VSCAN)
1632+#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
1633+#include <strstream.h>
1634+#endif
1635+
1636+int scanw(const char* fmt, ...)
1637+{
1638+ int result = -1;
1639+ char buf[BUFSIZ];
1640+
1641+ va_list args;
1642+ va_start(args, fmt);
1643+#if defined(USE_STDIO_VSCAN)
1644+ if (::vsscanf(buf, fmt, args) != -1)
1645+ result = 0;
1646+#elif defined(USE_STRSTREAM_VSCAN)
1647+ strstreambuf ss(buf, sizeof(buf));
1648+ if (ss.vscan(fmt, args) != -1)
1649+ result = 0;
1650+#elif defined(USE_STRSTREAM_VSCAN_CAST)
1651+ strstreambuf ss(buf, sizeof(buf));
1652+ if (ss.vscan(fmt, (_IO_va_list)args) != -1)
1653+ result = 0;
1654+#else
1655+#error case $cf_vscan_func failed
1656+#endif
1657+ va_end(args);
1658+ return result;
1659+}
1660+],[int tmp, foo = scanw("%d", &tmp)],
1661+ [cf_cv_cpp_vscan_func=$cf_vscan_func; break],
1662+ [cf_cv_cpp_vscan_func=no])
1663+ test "$cf_cv_cpp_vscan_func" != no && break
1664+ done
1665+])
1666+
1667+AC_LANG_RESTORE
1668+fi
1669+
1670+case $cf_cv_cpp_vscan_func in #(vi
1671+stdio) #(vi
1672+ AC_DEFINE(CPP_HAS_VSCAN_FUNC)
1673+ AC_DEFINE(USE_STDIO_VSCAN)
1674+ ;;
1675+strstream)
1676+ AC_DEFINE(CPP_HAS_VSCAN_FUNC)
1677+ AC_DEFINE(USE_STRSTREAM_VSCAN)
1678+ ;;
1679+strstream_cast)
1680+ AC_DEFINE(CPP_HAS_VSCAN_FUNC)
1681+ AC_DEFINE(USE_STRSTREAM_VSCAN_CAST)
1682+ ;;
1683+esac
1684+])dnl
1685+dnl ---------------------------------------------------------------------------
1686+dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52
1687+dnl ----------
1688+dnl "dirname" is not portable, so we fake it with a shell script.
1689+AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl
1690+dnl ---------------------------------------------------------------------------
1691+dnl CF_DIRS_TO_MAKE version: 3 updated: 2002/02/23 20:38:31
1692+dnl ---------------
1693+AC_DEFUN([CF_DIRS_TO_MAKE],
1694+[
1695+DIRS_TO_MAKE="lib"
1696+for cf_item in $cf_list_models
1697+do
1698+ CF_OBJ_SUBDIR($cf_item,cf_subdir)
1699+ for cf_item2 in $DIRS_TO_MAKE
1700+ do
1701+ test $cf_item2 = $cf_subdir && break
1702+ done
1703+ test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
1704+done
1705+for cf_dir in $DIRS_TO_MAKE
1706+do
1707+ test ! -d $cf_dir && mkdir $cf_dir
1708+done
1709+AC_SUBST(DIRS_TO_MAKE)
1710+])dnl
1711+dnl ---------------------------------------------------------------------------
1712+dnl CF_ERRNO version: 5 updated: 1997/11/30 12:44:39
1713+dnl --------
1714+dnl Check if 'errno' is declared in <errno.h>
1715+AC_DEFUN([CF_ERRNO],
1716+[
1717+CF_CHECK_ERRNO(errno)
1718+])dnl
1719+dnl ---------------------------------------------------------------------------
1720+dnl CF_ETIP_DEFINES version: 3 updated: 2003/03/22 19:13:43
1721+dnl ---------------
1722+dnl Test for conflicting definitions of exception in gcc 2.8.0, etc., between
1723+dnl math.h and builtin.h, only for ncurses
1724+AC_DEFUN([CF_ETIP_DEFINES],
1725+[
1726+AC_MSG_CHECKING(for special defines needed for etip.h)
1727+cf_save_CXXFLAGS="$CXXFLAGS"
1728+cf_result="none"
1729+for cf_math in "" MATH_H
1730+do
1731+for cf_excp in "" MATH_EXCEPTION
1732+do
1733+ CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
1734+ test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
1735+ test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
1736+AC_TRY_COMPILE([
1737+#include <etip.h.in>
1738+],[],[
1739+ test -n "$cf_math" && AC_DEFINE_UNQUOTED(ETIP_NEEDS_${cf_math})
1740+ test -n "$cf_excp" && AC_DEFINE_UNQUOTED(ETIP_NEEDS_${cf_excp})
1741+ cf_result="$cf_math $cf_excp"
1742+ break
1743+],[])
1744+done
1745+done
1746+AC_MSG_RESULT($cf_result)
1747+CXXFLAGS="$cf_save_CXXFLAGS"
1748+])
1749+dnl ---------------------------------------------------------------------------
1750+dnl CF_FUNC_MEMMOVE version: 5 updated: 2000/08/12 23:18:52
1751+dnl ---------------
1752+dnl Check for memmove, or a bcopy that can handle overlapping copy. If neither
1753+dnl is found, add our own version of memmove to the list of objects.
1754+AC_DEFUN([CF_FUNC_MEMMOVE],
1755+[
1756+AC_CHECK_FUNC(memmove,,[
1757+AC_CHECK_FUNC(bcopy,[
1758+ AC_CACHE_CHECK(if bcopy does overlapping moves,cf_cv_good_bcopy,[
1759+ AC_TRY_RUN([
1760+int main() {
1761+ static char data[] = "abcdefghijklmnopqrstuwwxyz";
1762+ char temp[40];
1763+ bcopy(data, temp, sizeof(data));
1764+ bcopy(temp+10, temp, 15);
1765+ bcopy(temp+5, temp+15, 10);
1766+ exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
1767+}
1768+ ],
1769+ [cf_cv_good_bcopy=yes],
1770+ [cf_cv_good_bcopy=no],
1771+ [cf_cv_good_bcopy=unknown])
1772+ ])
1773+ ],[cf_cv_good_bcopy=no])
1774+ if test "$cf_cv_good_bcopy" = yes ; then
1775+ AC_DEFINE(USE_OK_BCOPY)
1776+ else
1777+ AC_DEFINE(USE_MY_MEMMOVE)
1778+ fi
1779+])])dnl
1780+dnl ---------------------------------------------------------------------------
1781+dnl CF_FUNC_POLL version: 2 updated: 2000/02/06 01:38:04
1782+dnl ------------
1783+dnl See if the poll function really works. Some platforms have poll(), but
1784+dnl it does not work for terminals or files.
1785+AC_DEFUN([CF_FUNC_POLL],[
1786+AC_CACHE_CHECK(if poll really works,cf_cv_working_poll,[
1787+AC_TRY_RUN([
1788+#include <stdio.h>
1789+#ifdef HAVE_POLL_H
1790+#include <poll.h>
1791+#else
1792+#include <sys/poll.h>
1793+#endif
1794+int main() {
1795+ struct pollfd myfds;
1796+ int ret;
1797+
1798+ myfds.fd = 0;
1799+ myfds.events = POLLIN;
1800+
1801+ ret = poll(&myfds, 1, 100);
1802+ exit(ret != 0);
1803+}],
1804+ [cf_cv_working_poll=yes],
1805+ [cf_cv_working_poll=no],
1806+ [cf_cv_working_poll=unknown])])
1807+test "$cf_cv_working_poll" = "yes" && AC_DEFINE(HAVE_WORKING_POLL)
1808+])dnl
1809+dnl ---------------------------------------------------------------------------
1810+dnl CF_FUNC_TERMIOS version: 2 updated: 2000/07/22 23:37:24
1811+dnl ---------------
1812+dnl Some old/broken variations define tcgetattr() only as a macro in
1813+dnl termio(s).h
1814+AC_DEFUN([CF_FUNC_TERMIOS],[
1815+AC_REQUIRE([CF_STRUCT_TERMIOS])
1816+AC_CACHE_CHECK(for tcgetattr, cf_cv_have_tcgetattr,[
1817+AC_TRY_LINK([
1818+#include <sys/types.h>
1819+#ifdef HAVE_UNISTD_H
1820+#include <unistd.h>
1821+#endif
1822+#ifdef HAVE_TERMIOS_H
1823+#include <termios.h>
1824+#define TTY struct termios
1825+#else
1826+#ifdef HAVE_TERMIO_H
1827+#include <termio.h>
1828+#define TTY struct termio
1829+#endif
1830+#endif
1831+],[
1832+TTY foo;
1833+tcgetattr(1, &foo);],
1834+[cf_cv_have_tcgetattr=yes],
1835+[cf_cv_have_tcgetattr=no])])
1836+test "$cf_cv_have_tcgetattr" = yes && AC_DEFINE(HAVE_TCGETATTR)
1837+])dnl
1838+dnl ---------------------------------------------------------------------------
1839+dnl CF_FUNC_VSSCANF version: 3 updated: 2001/12/19 00:50:10
1840+dnl ---------------
1841+dnl Check for vsscanf() function, which is in c9x but generally not in earlier
1842+dnl versions of C. It is in the GNU C library, and can often be simulated by
1843+dnl other functions.
1844+AC_DEFUN([CF_FUNC_VSSCANF],
1845+[
1846+AC_CACHE_CHECK(for vsscanf function or workaround,cf_cv_func_vsscanf,[
1847+AC_TRY_LINK([
1848+#include <stdarg.h>
1849+#include <stdio.h>],[
1850+ va_list ap;
1851+ vsscanf("from", "%d", ap)],[cf_cv_func_vsscanf=vsscanf],[
1852+AC_TRY_LINK([
1853+#include <stdarg.h>
1854+#include <stdio.h>],[
1855+ FILE strbuf;
1856+ char *str = "from";
1857+
1858+ strbuf._flag = _IOREAD;
1859+ strbuf._ptr = strbuf._base = (unsigned char *) str;
1860+ strbuf._cnt = strlen(str);
1861+ strbuf._file = _NFILE;
1862+ return (vfscanf(&strbuf, "%d", ap))],[cf_cv_func_vsscanf=vfscanf],[
1863+AC_TRY_LINK([
1864+#include <stdarg.h>
1865+#include <stdio.h>],[
1866+ FILE strbuf;
1867+ char *str = "from";
1868+
1869+ strbuf._flag = _IOREAD;
1870+ strbuf._ptr = strbuf._base = (unsigned char *) str;
1871+ strbuf._cnt = strlen(str);
1872+ strbuf._file = _NFILE;
1873+ return (_doscan(&strbuf, "%d", ap))],[cf_cv_func_vsscanf=_doscan],[
1874+cf_cv_func_vsscanf=no])])])])
1875+
1876+case $cf_cv_func_vsscanf in #(vi
1877+vsscanf) AC_DEFINE(HAVE_VSSCANF);; #(vi
1878+vfscanf) AC_DEFINE(HAVE_VFSCANF);; #(vi
1879+_doscan) AC_DEFINE(HAVE__DOSCAN);;
1880+esac
1881+
1882+])dnl
1883+dnl ---------------------------------------------------------------------------
1884+dnl CF_GCC_ATTRIBUTES version: 9 updated: 2002/12/21 19:25:52
1885+dnl -----------------
1886+dnl Test for availability of useful gcc __attribute__ directives to quiet
1887+dnl compiler warnings. Though useful, not all are supported -- and contrary
1888+dnl to documentation, unrecognized directives cause older compilers to barf.
1889+AC_DEFUN([CF_GCC_ATTRIBUTES],
1890+[
1891+if test "$GCC" = yes
1892+then
1893+cat > conftest.i <<EOF
1894+#ifndef GCC_PRINTF
1895+#define GCC_PRINTF 0
1896+#endif
1897+#ifndef GCC_SCANF
1898+#define GCC_SCANF 0
1899+#endif
1900+#ifndef GCC_NORETURN
1901+#define GCC_NORETURN /* nothing */
1902+#endif
1903+#ifndef GCC_UNUSED
1904+#define GCC_UNUSED /* nothing */
1905+#endif
1906+EOF
1907+if test "$GCC" = yes
1908+then
1909+ AC_CHECKING([for $CC __attribute__ directives])
1910+cat > conftest.$ac_ext <<EOF
1911+#line __oline__ "configure"
1912+#include "confdefs.h"
1913+#include "conftest.h"
1914+#include "conftest.i"
1915+#if GCC_PRINTF
1916+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1917+#else
1918+#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1919+#endif
1920+#if GCC_SCANF
1921+#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1922+#else
1923+#define GCC_SCANFLIKE(fmt,var) /*nothing*/
1924+#endif
1925+extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1926+extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1927+extern void foo(void) GCC_NORETURN;
1928+int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
1929+EOF
1930+ for cf_attribute in scanf printf unused noreturn
1931+ do
1932+ CF_UPPER(CF_ATTRIBUTE,$cf_attribute)
1933+ cf_directive="__attribute__(($cf_attribute))"
1934+ echo "checking for $CC $cf_directive" 1>&AC_FD_CC
1935+ case $cf_attribute in
1936+ scanf|printf)
1937+ cat >conftest.h <<EOF
1938+#define GCC_$CF_ATTRIBUTE 1
1939+EOF
1940+ ;;
1941+ *)
1942+ cat >conftest.h <<EOF
1943+#define GCC_$CF_ATTRIBUTE $cf_directive
1944+EOF
1945+ ;;
1946+ esac
1947+ if AC_TRY_EVAL(ac_compile); then
1948+ test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
1949+ cat conftest.h >>confdefs.h
1950+ fi
1951+ done
1952+else
1953+ fgrep define conftest.i >>confdefs.h
1954+fi
1955+rm -rf conftest*
1956+fi
1957+])dnl
1958+dnl ---------------------------------------------------------------------------
1959+dnl CF_GCC_VERSION version: 3 updated: 2003/09/06 19:16:57
1960+dnl --------------
1961+dnl Find version of gcc
1962+AC_DEFUN([CF_GCC_VERSION],[
1963+AC_REQUIRE([AC_PROG_CC])
1964+GCC_VERSION=none
1965+if test "$GCC" = yes ; then
1966+ AC_MSG_CHECKING(version of $CC)
1967+ GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
1968+ test -z "$GCC_VERSION" && GCC_VERSION=unknown
1969+ AC_MSG_RESULT($GCC_VERSION)
1970+fi
1971+])dnl
1972+dnl ---------------------------------------------------------------------------
1973+dnl CF_GCC_WARNINGS version: 15 updated: 2003/07/05 18:42:30
1974+dnl ---------------
1975+dnl Check if the compiler supports useful warning options. There's a few that
1976+dnl we don't use, simply because they're too noisy:
1977+dnl
1978+dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)
1979+dnl -Wredundant-decls (system headers make this too noisy)
1980+dnl -Wtraditional (combines too many unrelated messages, only a few useful)
1981+dnl -Wwrite-strings (too noisy, but should review occasionally). This
1982+dnl is enabled for ncurses using "--enable-const".
1983+dnl -pedantic
1984+dnl
1985+AC_DEFUN([CF_GCC_WARNINGS],
1986+[
1987+AC_REQUIRE([CF_GCC_VERSION])
1988+if test "$GCC" = yes
1989+then
1990+ cat > conftest.$ac_ext <<EOF
1991+#line __oline__ "configure"
1992+int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
1993+EOF
1994+ AC_CHECKING([for $CC warning options])
1995+ cf_save_CFLAGS="$CFLAGS"
1996+ EXTRA_CFLAGS="-W -Wall"
1997+ cf_warn_CONST=""
1998+ test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
1999+ for cf_opt in \
2000+ Wbad-function-cast \
2001+ Wcast-align \
2002+ Wcast-qual \
2003+ Winline \
2004+ Wmissing-declarations \
2005+ Wmissing-prototypes \
2006+ Wnested-externs \
2007+ Wpointer-arith \
2008+ Wshadow \
2009+ Wstrict-prototypes \
2010+ Wundef $cf_warn_CONST
2011+ do
2012+ CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2013+ if AC_TRY_EVAL(ac_compile); then
2014+ test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
2015+ case $cf_opt in #(vi
2016+ Wcast-qual) #(vi
2017+ CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2018+ ;;
2019+ Winline) #(vi
2020+ case $GCC_VERSION in
2021+ 3.3*)
2022+ CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
2023+ continue;;
2024+ esac
2025+ ;;
2026+ esac
2027+ EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2028+ fi
2029+ done
2030+ rm -f conftest*
2031+ CFLAGS="$cf_save_CFLAGS"
2032+fi
2033+AC_SUBST(EXTRA_CFLAGS)
2034+])dnl
2035+dnl ---------------------------------------------------------------------------
2036+dnl CF_GNAT_TRY_RUN version: 2 updated: 1998/07/19 00:25:18
2037+dnl ---------------
2038+dnl Verify that a test program compiles and runs with GNAT
2039+dnl $cf_ada_make is set to the program that compiles/links
2040+AC_DEFUN([CF_GNAT_TRY_RUN],
2041+[
2042+rm -f conftest*
2043+cat >>conftest.ads <<CF_EOF
2044+$1
2045+CF_EOF
2046+cat >>conftest.adb <<CF_EOF
2047+$2
2048+CF_EOF
2049+if ( $cf_ada_make conftest 1>&AC_FD_CC 2>&1 ) ; then
2050+ if ( ./conftest 1>&AC_FD_CC 2>&1 ) ; then
2051+ifelse($3,, :,[ $3])
2052+ifelse($4,,,[ else
2053+ $4])
2054+ fi
2055+ifelse($4,,,[else
2056+ $4])
2057+fi
2058+rm -f conftest*
2059+])dnl
2060+dnl ---------------------------------------------------------------------------
2061+dnl CF_GNAT_VERSION version: 11 updated: 2003/09/06 19:42:09
2062+dnl ---------------
2063+dnl Verify version of GNAT.
2064+AC_DEFUN([CF_GNAT_VERSION],
2065+[
2066+AC_MSG_CHECKING(for gnat version)
2067+cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[[0-9]].[[0-9]][[0-9]]*' |\
2068+ sed -e '2,$d' -e 's/[[^0-9 \.]]//g' -e 's/^[[ ]]*//' -e 's/ .*//'`
2069+AC_MSG_RESULT($cf_gnat_version)
2070+
2071+case $cf_gnat_version in
2072+ 3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*)
2073+ cf_cv_prog_gnat_correct=yes
2074+ ;;
2075+ *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
2076+ cf_cv_prog_gnat_correct=no
2077+ ;;
2078+esac
2079+case $cf_gnat_version in
2080+ 3.[[1-9]]*|[[4-9]].*)
2081+ cf_compile_generics=generics
2082+ cf_generic_objects="\$(GENOBJS)"
2083+ ;;
2084+ *) cf_compile_generics=
2085+ cf_generic_objects=
2086+ ;;
2087+esac
2088+])
2089+dnl ---------------------------------------------------------------------------
2090+dnl CF_GNU_SOURCE version: 3 updated: 2000/10/29 23:30:53
2091+dnl -------------
2092+dnl Check if we must define _GNU_SOURCE to get a reasonable value for
2093+dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect
2094+dnl (or misfeature) of glibc2, which breaks portability of many applications,
2095+dnl since it is interwoven with GNU extensions.
2096+dnl
2097+dnl Well, yes we could work around it...
2098+AC_DEFUN([CF_GNU_SOURCE],
2099+[
2100+AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
2101+AC_TRY_COMPILE([#include <sys/types.h>],[
2102+#ifndef _XOPEN_SOURCE
2103+make an error
2104+#endif],
2105+ [cf_cv_gnu_source=no],
2106+ [cf_save="$CPPFLAGS"
2107+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2108+ AC_TRY_COMPILE([#include <sys/types.h>],[
2109+#ifdef _XOPEN_SOURCE
2110+make an error
2111+#endif],
2112+ [cf_cv_gnu_source=no],
2113+ [cf_cv_gnu_source=yes])
2114+ CPPFLAGS="$cf_save"
2115+ ])
2116+])
2117+test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2118+])dnl
2119+dnl ---------------------------------------------------------------------------
2120+dnl CF_GPP_LIBRARY version: 8 updated: 2003/02/02 01:41:46
2121+dnl --------------
2122+dnl If we're trying to use g++, test if libg++ is installed (a rather common
2123+dnl problem :-). If we have the compiler but no library, we'll be able to
2124+dnl configure, but won't be able to build the c++ demo program.
2125+AC_DEFUN([CF_GPP_LIBRARY],
2126+[
2127+cf_cxx_library=unknown
2128+case $cf_cv_system_name in #(vi
2129+os2*) #(vi
2130+ cf_gpp_libname=gpp
2131+ ;;
2132+*)
2133+ cf_gpp_libname=g++
2134+ ;;
2135+esac
2136+if test "$GXX" = yes; then
2137+ AC_MSG_CHECKING([for lib$cf_gpp_libname])
2138+ cf_save="$LIBS"
2139+ LIBS="$LIBS -l$cf_gpp_libname"
2140+ AC_TRY_LINK([
2141+#include <$cf_gpp_libname/builtin.h>
2142+ ],
2143+ [two_arg_error_handler_t foo2 = lib_error_handler],
2144+ [cf_cxx_library=yes
2145+ CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
2146+ if test "$cf_gpp_libname" = cpp ; then
2147+ AC_DEFINE(HAVE_GPP_BUILTIN_H)
2148+ else
2149+ AC_DEFINE(HAVE_GXX_BUILTIN_H)
2150+ fi],
2151+ [AC_TRY_LINK([
2152+#include <builtin.h>
2153+ ],
2154+ [two_arg_error_handler_t foo2 = lib_error_handler],
2155+ [cf_cxx_library=yes
2156+ CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
2157+ AC_DEFINE(HAVE_BUILTIN_H)],
2158+ [cf_cxx_library=no])])
2159+ LIBS="$cf_save"
2160+ AC_MSG_RESULT($cf_cxx_library)
2161+fi
2162+])dnl
2163+dnl ---------------------------------------------------------------------------
2164+dnl CF_GXX_VERSION version: 3 updated: 2003/09/06 19:16:21
2165+dnl --------------
2166+dnl Check for version of g++
2167+AC_DEFUN([CF_GXX_VERSION],[
2168+AC_REQUIRE([AC_PROG_CPP])
2169+GXX_VERSION=none
2170+if test "$GXX" = yes; then
2171+ AC_MSG_CHECKING(version of g++)
2172+ GXX_VERSION="`${CXX-g++} --version|sed -e '2,$d'`"
2173+ AC_MSG_RESULT($GXX_VERSION)
2174+fi
2175+])dnl
2176+dnl ---------------------------------------------------------------------------
2177+dnl CF_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15
2178+dnl ---------------
2179+dnl Construct the list of include-options according to whether we're building
2180+dnl in the source directory or using '--srcdir=DIR' option. If we're building
2181+dnl with gcc, don't append the includedir if it happens to be /usr/include,
2182+dnl since that usually breaks gcc's shadow-includes.
2183+AC_DEFUN([CF_INCLUDE_DIRS],
2184+[
2185+CPPFLAGS="-I. -I../include $CPPFLAGS"
2186+if test "$srcdir" != "."; then
2187+ CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS"
2188+fi
2189+if test "$GCC" != yes; then
2190+ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
2191+elif test "$includedir" != "/usr/include"; then
2192+ if test "$includedir" = '${prefix}/include' ; then
2193+ if test $prefix != /usr ; then
2194+ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
2195+ fi
2196+ else
2197+ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
2198+ fi
2199+fi
2200+AC_SUBST(CPPFLAGS)
2201+])dnl
2202+dnl ---------------------------------------------------------------------------
2203+dnl CF_ISASCII version: 3 updated: 2000/08/12 23:18:52
2204+dnl ----------
2205+dnl Check if we have either a function or macro for 'isascii()'.
2206+AC_DEFUN([CF_ISASCII],
2207+[
2208+AC_MSG_CHECKING(for isascii)
2209+AC_CACHE_VAL(cf_cv_have_isascii,[
2210+ AC_TRY_LINK([#include <ctype.h>],[int x = isascii(' ')],
2211+ [cf_cv_have_isascii=yes],
2212+ [cf_cv_have_isascii=no])
2213+])dnl
2214+AC_MSG_RESULT($cf_cv_have_isascii)
2215+test "$cf_cv_have_isascii" = yes && AC_DEFINE(HAVE_ISASCII)
2216+])dnl
2217+dnl ---------------------------------------------------------------------------
2218+dnl CF_LIBUTF8 version: 2 updated: 2002/01/19 22:51:32
2219+dnl ----------
2220+dnl Check for libutf8
2221+AC_DEFUN([CF_LIBUTF8],
2222+[
2223+AC_CACHE_CHECK(for putwc in libutf8,cf_cv_libutf8,[
2224+ cf_save_LIBS="$LIBS"
2225+ LIBS="-lutf8 $LIBS"
2226+AC_TRY_LINK([
2227+#include <libutf8.h>],[putwc(0,0);],
2228+ [cf_cv_libutf8=yes],
2229+ [cf_cv_libutf8=no])
2230+ LIBS="$cf_save_LIBS"
2231+])
2232+
2233+if test "$cf_cv_libutf8" = yes ; then
2234+ AC_DEFINE(HAVE_LIBUTF8_H)
2235+ LIBS="-lutf8 $LIBS"
2236+fi
2237+])dnl
2238+dnl ---------------------------------------------------------------------------
2239+dnl CF_LIB_PREFIX version: 7 updated: 2001/01/12 01:23:48
2240+dnl -------------
2241+dnl Compute the library-prefix for the given host system
2242+dnl $1 = variable to set
2243+AC_DEFUN([CF_LIB_PREFIX],
2244+[
2245+ case $cf_cv_system_name in
2246+ OS/2*) LIB_PREFIX='' ;;
2247+ os2*) LIB_PREFIX='' ;;
2248+ *) LIB_PREFIX='lib' ;;
2249+ esac
2250+ifelse($1,,,[$1=$LIB_PREFIX])
2251+ AC_SUBST(LIB_PREFIX)
2252+])dnl
2253+dnl ---------------------------------------------------------------------------
2254+dnl CF_LIB_RULES version: 30 updated: 2004/01/10 15:50:50
2255+dnl ------------
2256+dnl Append definitions and rules for the given models to the subdirectory
2257+dnl Makefiles, and the recursion rule for the top-level Makefile. If the
2258+dnl subdirectory is a library-source directory, modify the LIBRARIES list in
2259+dnl the corresponding makefile to list the models that we'll generate.
2260+dnl
2261+dnl For shared libraries, make a list of symbolic links to construct when
2262+dnl generating each library. The convention used for Linux is the simplest
2263+dnl one:
2264+dnl lib<name>.so ->
2265+dnl lib<name>.so.<major> ->
2266+dnl lib<name>.so.<maj>.<minor>
2267+AC_DEFUN([CF_LIB_RULES],
2268+[
2269+CF_LIB_PREFIX(cf_prefix)
2270+AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
2271+for cf_dir in $SRC_SUBDIRS
2272+do
2273+ if test -f $srcdir/$cf_dir/modules; then
2274+
2275+ IMPORT_LIB=
2276+ SHARED_LIB=
2277+ LIBS_TO_MAKE=
2278+ for cf_item in $CF_LIST_MODELS
2279+ do
2280+ CF_LIB_SUFFIX($cf_item,cf_suffix)
2281+ if test $cf_item = shared ; then
2282+ if test "$cf_cv_do_symlinks" = yes ; then
2283+ case "$cf_cv_shlib_version" in #(vi
2284+ rel) #(vi
2285+ case "$cf_cv_system_name" in #(vi
2286+ darwin*) cf_suffix='.$(REL_VERSION)'"$cf_suffix" ;; #(vi
2287+ *) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
2288+ esac
2289+ ;;
2290+ abi)
2291+ case "$cf_cv_system_name" in #(vi
2292+ darwin*) cf_suffix='.$(ABI_VERSION)'"$cf_suffix" ;; #(vi
2293+ *) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
2294+ esac
2295+ ;;
2296+ esac
2297+ fi
2298+ # cygwin needs import library, and has unique naming convention
2299+ # use autodetected ${cf_prefix} for import lib and static lib, but
2300+ # use 'cyg' prefix for shared lib.
2301+ if test $cf_cv_shlib_version = cygdll ; then
2302+ SHARED_LIB="../lib/cyg${cf_dir}\$(ABI_VERSION).dll"
2303+ IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a"
2304+ LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)"
2305+ continue
2306+ fi
2307+ fi
2308+ LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
2309+ done
2310+
2311+ if test $cf_dir = ncurses ; then
2312+ cf_subsets="$LIB_SUBSETS"
2313+ cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
2314+ if test "$cf_termlib" != "$cf_subsets" ; then
2315+ cf_item=`echo $LIBS_TO_MAKE |sed -e s%$LIB_NAME%$TINFO_NAME%g`
2316+ LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
2317+ fi
2318+ else
2319+ cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
2320+ fi
2321+
2322+ sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
2323+ -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
2324+ -e "s%@SHARED_LIB@%$SHARED_LIB%" \
2325+ $cf_dir/Makefile >$cf_dir/Makefile.out
2326+ mv $cf_dir/Makefile.out $cf_dir/Makefile
2327+
2328+ $AWK -f $srcdir/mk-0th.awk \
2329+ libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
2330+ $srcdir/$cf_dir/modules >>$cf_dir/Makefile
2331+
2332+ for cf_subset in $cf_subsets
2333+ do
2334+ cf_subdirs=
2335+ for cf_item in $CF_LIST_MODELS
2336+ do
2337+ echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
2338+ CF_UPPER(CF_ITEM,$cf_item)
2339+ CF_LIB_SUFFIX($cf_item,cf_suffix)
2340+ CF_OBJ_SUBDIR($cf_item,cf_subdir)
2341+
2342+ # These dependencies really are for development, not
2343+ # builds, but they are useful in porting, too.
2344+ cf_depend="../include/ncurses_cfg.h"
2345+ if test "$srcdir" = "."; then
2346+ cf_reldir="."
2347+ else
2348+ cf_reldir="\$(srcdir)"
2349+ fi
2350+
2351+ if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
2352+ cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
2353+ elif test -f $srcdir/$cf_dir/curses.priv.h; then
2354+ cf_depend="$cf_depend $cf_reldir/curses.priv.h"
2355+ fi
2356+
2357+ $AWK -f $srcdir/mk-1st.awk \
2358+ name=$cf_dir \
2359+ traces=$LIB_TRACING \
2360+ MODEL=$CF_ITEM \
2361+ model=$cf_subdir \
2362+ prefix=$cf_prefix \
2363+ suffix=$cf_suffix \
2364+ subset=$cf_subset \
2365+ ShlibVer=$cf_cv_shlib_version \
2366+ ShlibVerInfix=$cf_cv_shlib_version_infix \
2367+ DoLinks=$cf_cv_do_symlinks \
2368+ rmSoLocs=$cf_cv_rm_so_locs \
2369+ ldconfig="$LDCONFIG" \
2370+ overwrite=$WITH_OVERWRITE \
2371+ depend="$cf_depend" \
2372+ host="$host" \
2373+ $srcdir/$cf_dir/modules >>$cf_dir/Makefile
2374+ for cf_subdir2 in $cf_subdirs lib
2375+ do
2376+ test $cf_subdir = $cf_subdir2 && break
2377+ done
2378+ test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
2379+ $AWK -f $srcdir/mk-2nd.awk \
2380+ name=$cf_dir \
2381+ traces=$LIB_TRACING \
2382+ MODEL=$CF_ITEM \
2383+ model=$cf_subdir \
2384+ subset=$cf_subset \
2385+ srcdir=$srcdir \
2386+ echo=$WITH_ECHO \
2387+ $srcdir/$cf_dir/modules >>$cf_dir/Makefile
2388+ cf_subdirs="$cf_subdirs $cf_subdir"
2389+ done
2390+ done
2391+ fi
2392+
2393+ echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) [$]@' >>Makefile
2394+done
2395+
2396+for cf_dir in $SRC_SUBDIRS
2397+do
2398+ if test -f $cf_dir/Makefile ; then
2399+ case "$cf_dir" in
2400+ Ada95) #(vi
2401+ echo 'libs \' >> Makefile
2402+ echo 'install.libs \' >> Makefile
2403+ echo 'uninstall.libs ::' >> Makefile
2404+ echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) [$]@' >> Makefile
2405+ ;;
2406+ esac
2407+ fi
2408+
2409+ if test -f $srcdir/$cf_dir/modules; then
2410+ echo >> Makefile
2411+ if test -f $srcdir/$cf_dir/headers; then
2412+cat >> Makefile <<CF_EOF
2413+install.includes \\
2414+uninstall.includes \\
2415+CF_EOF
2416+ fi
2417+if test "$cf_dir" != "c++" ; then
2418+echo 'lint \' >> Makefile
2419+fi
2420+cat >> Makefile <<CF_EOF
2421+libs \\
2422+lintlib \\
2423+install.libs \\
2424+uninstall.libs \\
2425+install.$cf_dir \\
2426+uninstall.$cf_dir ::
2427+ cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \[$]@
2428+CF_EOF
2429+ elif test -f $srcdir/$cf_dir/headers; then
2430+cat >> Makefile <<CF_EOF
2431+
2432+libs \\
2433+install.libs \\
2434+uninstall.libs \\
2435+install.includes \\
2436+uninstall.includes ::
2437+ cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \[$]@
2438+CF_EOF
2439+fi
2440+done
2441+
2442+cat >> Makefile <<CF_EOF
2443+
2444+install.data \\
2445+uninstall.data ::
2446+$MAKE_TERMINFO cd misc && \$(MAKE) \$(CF_MFLAGS) \[$]@
2447+
2448+install.man \\
2449+uninstall.man ::
2450+ cd man && \$(MAKE) \$(CF_MFLAGS) \[$]@
2451+
2452+distclean ::
2453+ rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
2454+ rm -f headers.sh headers.sed
2455+ rm -rf \$(DIRS_TO_MAKE)
2456+CF_EOF
2457+
2458+# Special case: tack's manpage lives in its own directory.
2459+if test -d tack ; then
2460+if test -f $srcdir/$tack.h; then
2461+cat >> Makefile <<CF_EOF
2462+
2463+install.man \\
2464+uninstall.man ::
2465+ cd tack && \$(MAKE) \$(CF_MFLAGS) \[$]@
2466+CF_EOF
2467+fi
2468+fi
2469+
2470+dnl If we're installing into a subdirectory of /usr/include, etc., we should
2471+dnl prepend the subdirectory's name to the "#include" paths. It won't hurt
2472+dnl anything, and will make it more standardized. It's awkward to decide this
2473+dnl at configuration because of quoting, so we'll simply make all headers
2474+dnl installed via a script that can do the right thing.
2475+
2476+rm -f headers.sed headers.sh
2477+
2478+dnl ( generating this script makes the makefiles a little tidier :-)
2479+echo creating headers.sh
2480+cat >headers.sh <<CF_EOF
2481+#! /bin/sh
2482+# This shell script is generated by the 'configure' script. It is invoked in a
2483+# subdirectory of the build tree. It generates a sed-script in the parent
2484+# directory that is used to adjust includes for header files that reside in a
2485+# subdirectory of /usr/include, etc.
2486+PRG=""
2487+while test \[$]# != 3
2488+do
2489+PRG="\$PRG \[$]1"; shift
2490+done
2491+DST=\[$]1
2492+REF=\[$]2
2493+SRC=\[$]3
2494+TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
2495+TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
2496+echo installing \$SRC in \$DST
2497+CF_EOF
2498+if test $WITH_CURSES_H = yes; then
2499+ cat >>headers.sh <<CF_EOF
2500+case \$DST in
2501+/*/include/*)
2502+ END=\`basename \$DST\`
2503+ for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
2504+ do
2505+ NAME=\`basename \$i\`
2506+ echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
2507+ done
2508+ ;;
2509+*)
2510+ echo "" >> \$TMPSED
2511+ ;;
2512+esac
2513+CF_EOF
2514+else
2515+ cat >>headers.sh <<CF_EOF
2516+case \$DST in
2517+/*/include/*)
2518+ END=\`basename \$DST\`
2519+ for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
2520+ do
2521+ NAME=\`basename \$i\`
2522+ if test "\$NAME" = "curses.h"
2523+ then
2524+ echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
2525+ NAME=ncurses.h
2526+ fi
2527+ echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
2528+ done
2529+ ;;
2530+*)
2531+ echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
2532+ ;;
2533+esac
2534+CF_EOF
2535+fi
2536+cat >>headers.sh <<CF_EOF
2537+rm -f \$TMPSRC
2538+sed -f \$TMPSED \$SRC > \$TMPSRC
2539+NAME=\`basename \$SRC\`
2540+CF_EOF
2541+if test $WITH_CURSES_H != yes; then
2542+ cat >>headers.sh <<CF_EOF
2543+test "\$NAME" = "curses.h" && NAME=ncurses.h
2544+CF_EOF
2545+fi
2546+cat >>headers.sh <<CF_EOF
2547+# Just in case someone gzip'd manpages, remove the conflicting copy.
2548+test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
2549+
2550+eval \$PRG \$TMPSRC \$DST/\$NAME
2551+rm -f \$TMPSRC \$TMPSED
2552+CF_EOF
2553+
2554+chmod 0755 headers.sh
2555+
2556+for cf_dir in $SRC_SUBDIRS
2557+do
2558+ if test -f $srcdir/$cf_dir/headers; then
2559+ cat >>$cf_dir/Makefile <<CF_EOF
2560+\$(DESTDIR)\$(includedir) :
2561+ sh \$(srcdir)/../mkinstalldirs \[$]@
2562+
2563+install \\
2564+install.libs \\
2565+install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
2566+CF_EOF
2567+ j=""
2568+ for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
2569+ do
2570+ test -n "$j" && echo " $j \\" >>$cf_dir/Makefile
2571+ j=$i
2572+ done
2573+ echo " $j" >>$cf_dir/Makefile
2574+ for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
2575+ do
2576+ echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
2577+ test $i = curses.h && test $WITH_CURSES_H = yes && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
2578+ done
2579+
2580+ cat >>$cf_dir/Makefile <<CF_EOF
2581+
2582+uninstall \\
2583+uninstall.libs \\
2584+uninstall.includes ::
2585+CF_EOF
2586+ for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
2587+ do
2588+ i=`basename $i`
2589+ echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
2590+ test $i = curses.h && echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
2591+ done
2592+ fi
2593+
2594+ if test -f $srcdir/$cf_dir/modules; then
2595+ if test "$cf_dir" != "c++" ; then
2596+ cat >>$cf_dir/Makefile <<"CF_EOF"
2597+depend : $(AUTO_SRC)
2598+ makedepend -- $(CPPFLAGS) -- $(C_SRC)
2599+
2600+# DO NOT DELETE THIS LINE -- make depend depends on it.
2601+CF_EOF
2602+ fi
2603+ fi
2604+done
2605+
2606+])dnl
2607+dnl ---------------------------------------------------------------------------
2608+dnl CF_LIB_SUFFIX version: 13 updated: 2003/11/01 16:09:07
2609+dnl -------------
2610+dnl Compute the library file-suffix from the given model name
2611+dnl $1 = model name
2612+dnl $2 = variable to set
2613+dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
2614+AC_DEFUN([CF_LIB_SUFFIX],
2615+[
2616+ AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
2617+ case $1 in
2618+ libtool) $2='.la' ;;
2619+ normal) $2='.a' ;;
2620+ debug) $2='_g.a' ;;
2621+ profile) $2='_p.a' ;;
2622+ shared)
2623+ case $cf_cv_system_name in
2624+ cygwin*) $2='.dll' ;;
2625+ darwin*) $2='.dylib' ;;
2626+ hpux*)
2627+ case $target in
2628+ ia64*) $2='.so' ;;
2629+ *) $2='.sl' ;;
2630+ esac
2631+ ;;
2632+ *) $2='.so' ;;
2633+ esac
2634+ esac
2635+ test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
2636+])dnl
2637+dnl ---------------------------------------------------------------------------
2638+dnl CF_LIB_TYPE version: 4 updated: 2000/10/20 22:57:49
2639+dnl -----------
2640+dnl Compute the string to append to -library from the given model name
2641+dnl $1 = model name
2642+dnl $2 = variable to set
2643+dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
2644+AC_DEFUN([CF_LIB_TYPE],
2645+[
2646+ case $1 in
2647+ libtool) $2='' ;;
2648+ normal) $2='' ;;
2649+ debug) $2='_g' ;;
2650+ profile) $2='_p' ;;
2651+ shared) $2='' ;;
2652+ esac
2653+ test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
2654+])dnl
2655+dnl ---------------------------------------------------------------------------
2656+dnl CF_LINK_DATAONLY version: 6 updated: 2003/02/02 01:41:46
2657+dnl ----------------
2658+dnl Some systems have a non-ANSI linker that doesn't pull in modules that have
2659+dnl only data (i.e., no functions), for example NeXT. On those systems we'll
2660+dnl have to provide wrappers for global tables to ensure they're linked
2661+dnl properly.
2662+AC_DEFUN([CF_LINK_DATAONLY],
2663+[
2664+AC_MSG_CHECKING([if data-only library module links])
2665+AC_CACHE_VAL(cf_cv_link_dataonly,[
2666+ rm -f conftest.a
2667+ cat >conftest.$ac_ext <<EOF
2668+#line __oline__ "configure"
2669+int testdata[[3]] = { 123, 456, 789 };
2670+EOF
2671+ if AC_TRY_EVAL(ac_compile) ; then
2672+ mv conftest.o data.o && \
2673+ ( $AR $AR_OPTS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null
2674+ fi
2675+ rm -f conftest.$ac_ext data.o
2676+ cat >conftest.$ac_ext <<EOF
2677+#line __oline__ "configure"
2678+int testfunc()
2679+{
2680+#if defined(NeXT)
2681+ exit(1); /* I'm told this linker is broken */
2682+#else
2683+ extern int testdata[[3]];
2684+ return testdata[[0]] == 123
2685+ && testdata[[1]] == 456
2686+ && testdata[[2]] == 789;
2687+#endif
2688+}
2689+EOF
2690+ if AC_TRY_EVAL(ac_compile); then
2691+ mv conftest.o func.o && \
2692+ ( $AR $AR_OPTS conftest.a func.o ) 2>&AC_FD_CC 1>/dev/null
2693+ fi
2694+ rm -f conftest.$ac_ext func.o
2695+ ( eval $RANLIB conftest.a ) 2>&AC_FD_CC >/dev/null
2696+ cf_saveLIBS="$LIBS"
2697+ LIBS="conftest.a $LIBS"
2698+ AC_TRY_RUN([
2699+ int main()
2700+ {
2701+ extern int testfunc();
2702+ exit (!testfunc());
2703+ }
2704+ ],
2705+ [cf_cv_link_dataonly=yes],
2706+ [cf_cv_link_dataonly=no],
2707+ [cf_cv_link_dataonly=unknown])
2708+ LIBS="$cf_saveLIBS"
2709+ ])
2710+AC_MSG_RESULT($cf_cv_link_dataonly)
2711+
2712+if test "$cf_cv_link_dataonly" = no ; then
2713+ AC_DEFINE(BROKEN_LINKER)
2714+ BROKEN_LINKER=1
2715+fi
2716+
2717+])dnl
2718+dnl ---------------------------------------------------------------------------
2719+dnl CF_LINK_FUNCS version: 5 updated: 2003/02/02 01:41:46
2720+dnl -------------
2721+dnl Most Unix systems have both link and symlink, a few don't have symlink.
2722+dnl A few non-Unix systems implement symlink, but not link.
2723+dnl A few non-systems implement neither (or have nonfunctional versions).
2724+AC_DEFUN([CF_LINK_FUNCS],
2725+[
2726+AC_CHECK_FUNCS( \
2727+ remove \
2728+ unlink )
2729+
2730+if test "$cross_compiling" = yes ; then
2731+ AC_CHECK_FUNCS( \
2732+ link \
2733+ symlink )
2734+else
2735+ AC_CACHE_CHECK(if link/symlink functions work,cf_cv_link_funcs,[
2736+ cf_cv_link_funcs=
2737+ for cf_func in link symlink ; do
2738+ AC_TRY_RUN([
2739+#include <sys/types.h>
2740+#include <sys/stat.h>
2741+#ifdef HAVE_UNISTD_H
2742+#include <unistd.h>
2743+#endif
2744+int main()
2745+{
2746+ int fail = 0;
2747+ char *src = "config.log";
2748+ char *dst = "conftest.chk";
2749+ struct stat src_sb;
2750+ struct stat dst_sb;
2751+
2752+ stat(src, &src_sb);
2753+ fail = ($cf_func("config.log", "conftest.chk") < 0)
2754+ || (stat(dst, &dst_sb) < 0)
2755+ || (dst_sb.st_mtime != src_sb.st_mtime);
2756+#ifdef HAVE_UNLINK
2757+ unlink(dst);
2758+#else
2759+ remove(dst);
2760+#endif
2761+ exit (fail);
2762+}
2763+ ],[
2764+ cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
2765+ eval 'ac_cv_func_'$cf_func'=yes'],[
2766+ eval 'ac_cv_func_'$cf_func'=no'],[
2767+ eval 'ac_cv_func_'$cf_func'=error'])
2768+ done
2769+ test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
2770+ ])
2771+ test "$ac_cv_func_link" = yes && AC_DEFINE(HAVE_LINK)
2772+ test "$ac_cv_func_symlink" = yes && AC_DEFINE(HAVE_SYMLINK)
2773+fi
2774+])dnl
2775+dnl ---------------------------------------------------------------------------
2776+dnl CF_MAKEFLAGS version: 9 updated: 2001/12/30 18:17:27
2777+dnl ------------
2778+dnl Some 'make' programs support $(MAKEFLAGS), some $(MFLAGS), to pass 'make'
2779+dnl options to lower-levels. It's very useful for "make -n" -- if we have it.
2780+dnl (GNU 'make' does both, something POSIX 'make', which happens to make the
2781+dnl $(MAKEFLAGS) variable incompatible because it adds the assignments :-)
2782+AC_DEFUN([CF_MAKEFLAGS],
2783+[
2784+AC_CACHE_CHECK(for makeflags variable, cf_cv_makeflags,[
2785+ cf_cv_makeflags=''
2786+ for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
2787+ do
2788+ cat >cf_makeflags.tmp <<CF_EOF
2789+SHELL = /bin/sh
2790+all :
2791+ @ echo '.$cf_option'
2792+CF_EOF
2793+ cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
2794+ case "$cf_result" in
2795+ .*k)
2796+ cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2797+ case "$cf_result" in
2798+ .*CC=*) cf_cv_makeflags=
2799+ ;;
2800+ *) cf_cv_makeflags=$cf_option
2801+ ;;
2802+ esac
2803+ break
2804+ ;;
2805+ *) echo no match "$cf_result"
2806+ ;;
2807+ esac
2808+ done
2809+ rm -f cf_makeflags.tmp
2810+])
2811+
2812+AC_SUBST(cf_cv_makeflags)
2813+])dnl
2814+dnl ---------------------------------------------------------------------------
2815+dnl CF_MAKE_TAGS version: 2 updated: 2000/10/04 09:18:40
2816+dnl ------------
2817+dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have
2818+dnl a monocase filesystem.
2819+AC_DEFUN([CF_MAKE_TAGS],[
2820+AC_REQUIRE([CF_MIXEDCASE_FILENAMES])
2821+AC_CHECK_PROG(MAKE_LOWER_TAGS, ctags, yes, no)
2822+
2823+if test "$cf_cv_mixedcase" = yes ; then
2824+ AC_CHECK_PROG(MAKE_UPPER_TAGS, etags, yes, no)
2825+else
2826+ MAKE_UPPER_TAGS=no
2827+fi
2828+
2829+if test "$MAKE_UPPER_TAGS" = yes ; then
2830+ MAKE_UPPER_TAGS=
2831+else
2832+ MAKE_UPPER_TAGS="#"
2833+fi
2834+AC_SUBST(MAKE_UPPER_TAGS)
2835+
2836+if test "$MAKE_LOWER_TAGS" = yes ; then
2837+ MAKE_LOWER_TAGS=
2838+else
2839+ MAKE_LOWER_TAGS="#"
2840+fi
2841+AC_SUBST(MAKE_LOWER_TAGS)
2842+])dnl
2843+dnl ---------------------------------------------------------------------------
2844+dnl CF_MANPAGE_FORMAT version: 7 updated: 2003/12/20 19:30:34
2845+dnl -----------------
2846+dnl Option to allow user to override automatic configuration of manpage format.
2847+dnl There are several special cases:
2848+dnl
2849+dnl gzip - man checks for, can display gzip'd files
2850+dnl compress - man checks for, can display compressed files
2851+dnl BSDI - files in the cat-directories are suffixed ".0"
2852+dnl formatted - installer should format (put files in cat-directory)
2853+dnl catonly - installer should only format, e.g., for a turnkey system.
2854+dnl
2855+dnl There are other configurations which this macro does not test, e.g., HPUX's
2856+dnl compressed manpages (but uncompressed manpages are fine, and HPUX's naming
2857+dnl convention would not match our use).
2858+AC_DEFUN([CF_MANPAGE_FORMAT],
2859+[
2860+AC_REQUIRE([CF_PATHSEP])
2861+AC_MSG_CHECKING(format of man-pages)
2862+
2863+AC_ARG_WITH(manpage-format,
2864+ [ --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and
2865+ optionally formatted/catonly, e.g., gzip,formatted],
2866+ [MANPAGE_FORMAT=$withval],
2867+ [MANPAGE_FORMAT=unknown])
2868+
2869+test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
2870+MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
2871+
2872+cf_unknown=
2873+
2874+case $MANPAGE_FORMAT in
2875+unknown)
2876+ if test -z "$MANPATH" ; then
2877+ MANPATH="/usr/man:/usr/share/man"
2878+ fi
2879+
2880+ # look for the 'date' man-page (it's most likely to be installed!)
2881+ MANPAGE_FORMAT=
2882+ cf_preform=no
2883+ cf_catonly=yes
2884+ cf_example=date
2885+
2886+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
2887+ for cf_dir in $MANPATH; do
2888+ test -z "$cf_dir" && cf_dir=/usr/man
2889+ for cf_name in $cf_dir/man*/$cf_example.[[01]]* $cf_dir/cat*/$cf_example.[[01]]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
2890+ do
2891+ cf_test=`echo $cf_name | sed -e 's/*//'`
2892+ if test "x$cf_test" = "x$cf_name" ; then
2893+
2894+ case "$cf_name" in
2895+ *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
2896+ *.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
2897+ *.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
2898+ *) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
2899+ esac
2900+
2901+ case "$cf_name" in
2902+ $cf_dir/man*)
2903+ cf_catonly=no
2904+ ;;
2905+ $cf_dir/cat*)
2906+ cf_preform=yes
2907+ ;;
2908+ esac
2909+ break
2910+ fi
2911+
2912+ # if we found a match in either man* or cat*, stop looking
2913+ if test -n "$MANPAGE_FORMAT" ; then
2914+ cf_found=no
2915+ test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
2916+ test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
2917+ case "$cf_name" in
2918+ $cf_dir/cat*)
2919+ cf_found=yes
2920+ ;;
2921+ esac
2922+ test $cf_found=yes && break
2923+ fi
2924+ done
2925+ # only check the first directory in $MANPATH where we find manpages
2926+ if test -n "$MANPAGE_FORMAT" ; then
2927+ break
2928+ fi
2929+ done
2930+ # if we did not find the example, just assume it is normal
2931+ test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
2932+ IFS="$ac_save_ifs"
2933+ ;;
2934+*)
2935+ for cf_option in $MANPAGE_FORMAT; do
2936+ case $cf_option in #(vi
2937+ gzip|compress|BSDI|normal|formatted|catonly)
2938+ ;;
2939+ *)
2940+ cf_unknown="$cf_unknown $cf_option"
2941+ ;;
2942+ esac
2943+ done
2944+ ;;
2945+esac
2946+
2947+AC_MSG_RESULT($MANPAGE_FORMAT)
2948+if test -n "$cf_unknown" ; then
2949+ AC_MSG_WARN(Unexpected manpage-format $cf_unknown)
2950+fi
2951+])dnl
2952+dnl ---------------------------------------------------------------------------
2953+dnl CF_MANPAGE_RENAMES version: 6 updated: 2002/01/19 22:51:32
2954+dnl ------------------
2955+dnl The Debian people have their own naming convention for manpages. This
2956+dnl option lets us override the name of the file containing renaming, or
2957+dnl disable it altogether.
2958+AC_DEFUN([CF_MANPAGE_RENAMES],
2959+[
2960+AC_MSG_CHECKING(for manpage renaming)
2961+
2962+AC_ARG_WITH(manpage-renames,
2963+ [ --with-manpage-renames specify manpage-renaming],
2964+ [MANPAGE_RENAMES=$withval],
2965+ [MANPAGE_RENAMES=yes])
2966+
2967+case ".$MANPAGE_RENAMES" in #(vi
2968+.no) #(vi
2969+ ;;
2970+.|.yes)
2971+ # Debian 'man' program?
2972+ if test -f /etc/debian_version ; then
2973+ MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
2974+ else
2975+ MANPAGE_RENAMES=no
2976+ fi
2977+ ;;
2978+esac
2979+
2980+if test "$MANPAGE_RENAMES" != no ; then
2981+ if test -f $srcdir/man/$MANPAGE_RENAMES ; then
2982+ MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
2983+ elif test ! -f $MANPAGE_RENAMES ; then
2984+ AC_MSG_ERROR(not a filename: $MANPAGE_RENAMES)
2985+ fi
2986+
2987+ test ! -d man && mkdir man
2988+
2989+ # Construct a sed-script to perform renaming within man-pages
2990+ if test -n "$MANPAGE_RENAMES" ; then
2991+ test ! -d man && mkdir man
2992+ sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >man/edit_man.sed
2993+ fi
2994+fi
2995+
2996+AC_MSG_RESULT($MANPAGE_RENAMES)
2997+AC_SUBST(MANPAGE_RENAMES)
2998+])dnl
2999+dnl ---------------------------------------------------------------------------
3000+dnl CF_MANPAGE_SYMLINKS version: 4 updated: 2003/12/13 18:01:58
3001+dnl -------------------
3002+dnl Some people expect each tool to make all aliases for manpages in the
3003+dnl man-directory. This accommodates the older, less-capable implementations
3004+dnl of 'man', and is optional.
3005+AC_DEFUN([CF_MANPAGE_SYMLINKS],
3006+[
3007+AC_MSG_CHECKING(if manpage aliases will be installed)
3008+
3009+AC_ARG_WITH(manpage-aliases,
3010+ [ --with-manpage-aliases specify manpage-aliases using .so],
3011+ [MANPAGE_ALIASES=$withval],
3012+ [MANPAGE_ALIASES=yes])
3013+
3014+AC_MSG_RESULT($MANPAGE_ALIASES)
3015+
3016+if test "$LN_S" = "ln -s"; then
3017+ cf_use_symlinks=yes
3018+else
3019+ cf_use_symlinks=no
3020+fi
3021+
3022+MANPAGE_SYMLINKS=no
3023+if test "$MANPAGE_ALIASES" = yes ; then
3024+AC_MSG_CHECKING(if manpage symlinks should be used)
3025+
3026+AC_ARG_WITH(manpage-symlinks,
3027+ [ --with-manpage-symlinks specify manpage-aliases using symlinks],
3028+ [MANPAGE_SYMLINKS=$withval],
3029+ [MANPAGE_SYMLINKS=$cf_use_symlinks])
3030+
3031+if test "$$cf_use_symlinks" = no; then
3032+if test "$MANPAGE_SYMLINKS" = yes ; then
3033+ AC_MSG_WARN(cannot make symlinks, will use .so files)
3034+ MANPAGE_SYMLINKS=no
3035+fi
3036+fi
3037+
3038+AC_MSG_RESULT($MANPAGE_SYMLINKS)
3039+fi
3040+
3041+])dnl
3042+dnl ---------------------------------------------------------------------------
3043+dnl CF_MANPAGE_TBL version: 3 updated: 2002/01/19 22:51:32
3044+dnl --------------
3045+dnl This option causes manpages to be run through tbl(1) to generate tables
3046+dnl correctly.
3047+AC_DEFUN([CF_MANPAGE_TBL],
3048+[
3049+AC_MSG_CHECKING(for manpage tbl)
3050+
3051+AC_ARG_WITH(manpage-tbl,
3052+ [ --with-manpage-tbl specify manpage processing with tbl],
3053+ [MANPAGE_TBL=$withval],
3054+ [MANPAGE_TBL=no])
3055+
3056+AC_MSG_RESULT($MANPAGE_TBL)
3057+])dnl
3058+dnl ---------------------------------------------------------------------------
3059+dnl CF_MAN_PAGES version: 27 updated: 2003/12/20 20:39:45
3060+dnl ------------
3061+dnl Try to determine if the man-pages on the system are compressed, and if
3062+dnl so, what format is used. Use this information to construct a script that
3063+dnl will install man-pages.
3064+AC_DEFUN([CF_MAN_PAGES],
3065+[
3066+CF_MANPAGE_FORMAT
3067+CF_MANPAGE_RENAMES
3068+CF_MANPAGE_SYMLINKS
3069+CF_MANPAGE_TBL
3070+
3071+ if test "$prefix" = "NONE" ; then
3072+ cf_prefix="$ac_default_prefix"
3073+ else
3074+ cf_prefix="$prefix"
3075+ fi
3076+
3077+ case "$MANPAGE_FORMAT" in # (vi
3078+ *catonly*) # (vi
3079+ cf_format=yes
3080+ cf_inboth=no
3081+ ;;
3082+ *formatted*) # (vi
3083+ cf_format=yes
3084+ cf_inboth=yes
3085+ ;;
3086+ *)
3087+ cf_format=no
3088+ cf_inboth=no
3089+ ;;
3090+ esac
3091+
3092+test ! -d man && mkdir man
3093+
3094+cf_so_strip=
3095+cf_compress=
3096+case "$MANPAGE_FORMAT" in #(vi
3097+*compress*) #(vi
3098+ cf_so_strip="Z"
3099+ cf_compress=compress
3100+ ;;
3101+*gzip*) #(vi
3102+ cf_so_strip="gz"
3103+ cf_compress=gzip
3104+ ;;
3105+esac
3106+
3107+cf_edit_man=man/edit_man.sh
3108+
3109+cat >$cf_edit_man <<CF_EOF
3110+#! /bin/sh
3111+# this script is generated by the configure-script CF_MAN_PAGES macro.
3112+prefix="$cf_prefix"
3113+datadir="$datadir"
3114+NCURSES_OSPEED="$NCURSES_OSPEED"
3115+TERMINFO="$TERMINFO"
3116+MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
3117+INSTALL="$INSTALL"
3118+INSTALL_DATA="$INSTALL_DATA"
3119+transform="$program_transform_name"
3120+
3121+TMP=\${TMPDIR-/tmp}/man\$\$
3122+trap "rm -f \$TMP" 0 1 2 5 15
3123+
3124+form=\[$]1
3125+shift || exit 1
3126+
3127+verb=\[$]1
3128+shift || exit 1
3129+
3130+mandir=\[$]1
3131+shift || exit 1
3132+
3133+srcdir=\[$]1
3134+shift || exit 1
3135+
3136+if test "\$form" = normal ; then
3137+ if test "$cf_format" = yes ; then
3138+ if test "$cf_inboth" = no ; then
3139+ sh \[$]0 format \$verb \$mandir \$srcdir \[$]*
3140+ exit $?
3141+ fi
3142+ fi
3143+ cf_subdir=\$mandir/man
3144+ cf_tables=$MANPAGE_TBL
3145+else
3146+ cf_subdir=\$mandir/cat
3147+ cf_tables=yes
3148+fi
3149+
3150+# process the list of source-files
3151+for i in \[$]* ; do
3152+case \$i in #(vi
3153+*.orig|*.rej) ;; #(vi
3154+*.[[0-9]]*)
3155+ section=\`expr "\$i" : '.*\\.\\([[0-9]]\\)[[xm]]*'\`;
3156+ if test \$verb = installing ; then
3157+ if test ! -d \$cf_subdir\${section} ; then
3158+ \$MKDIRS \$cf_subdir\$section
3159+ fi
3160+ fi
3161+ aliases=
3162+ source=\`basename \$i\`
3163+ inalias=\$source
3164+ test ! -f \$inalias && inalias="\$srcdir/\$inalias"
3165+ if test ! -f \$inalias ; then
3166+ echo .. skipped \$source
3167+ continue
3168+ fi
3169+CF_EOF
3170+
3171+if test "$MANPAGE_ALIASES" != no ; then
3172+cat >>$cf_edit_man <<CF_EOF
3173+ aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
3174+CF_EOF
3175+fi
3176+
3177+if test "$MANPAGE_RENAMES" = no ; then
3178+cat >>$cf_edit_man <<CF_EOF
3179+ # perform program transformations for section 1 man pages
3180+ if test \$section = 1 ; then
3181+ target=\$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
3182+ else
3183+ target=\$cf_subdir\${section}/\$source
3184+ fi
3185+CF_EOF
3186+else
3187+cat >>$cf_edit_man <<CF_EOF
3188+ target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \[$]2}'\`
3189+ if test -z "\$target" ; then
3190+ echo '? missing rename for '\$source
3191+ target="\$source"
3192+ fi
3193+ target="\$cf_subdir\${section}/\${target}"
3194+CF_EOF
3195+fi
3196+
3197+ # replace variables in man page
3198+ ifelse($1,,,[
3199+ for cf_name in $1
3200+ do
3201+cat >>$cf_edit_man <<CF_EOF
3202+ prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
3203+CF_EOF
3204+ done
3205+ ])
3206+cat >>$cf_edit_man <<CF_EOF
3207+ sed -e "s,@DATADIR@,\$datadir," \\
3208+ -e "s,@TERMINFO@,\$TERMINFO," \\
3209+ -e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
3210+CF_EOF
3211+
3212+ ifelse($1,,,[
3213+ for cf_name in $1
3214+ do
3215+ cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3216+cat >>$cf_edit_man <<CF_EOF
3217+ -e "s,@$cf_NAME@,\$prog_$cf_name," \\
3218+CF_EOF
3219+ done
3220+ ])
3221+
3222+if test -f $MANPAGE_RENAMES ; then
3223+cat >>$cf_edit_man <<CF_EOF
3224+ < \$i | sed -f $srcdir/edit_man.sed >\$TMP
3225+CF_EOF
3226+else
3227+cat >>$cf_edit_man <<CF_EOF
3228+ < \$i >\$TMP
3229+CF_EOF
3230+fi
3231+
3232+cat >>$cf_edit_man <<CF_EOF
3233+if test \$cf_tables = yes ; then
3234+ tbl \$TMP >\$TMP.out
3235+ mv \$TMP.out \$TMP
3236+fi
3237+CF_EOF
3238+
3239+if test $with_curses_h != yes ; then
3240+cat >>$cf_edit_man <<CF_EOF
3241+ sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
3242+ mv \$TMP.out \$TMP
3243+CF_EOF
3244+fi
3245+
3246+cat >>$cf_edit_man <<CF_EOF
3247+ if test \$form = format ; then
3248+ nroff -man \$TMP >\$TMP.out
3249+ mv \$TMP.out \$TMP
3250+ fi
3251+CF_EOF
3252+
3253+if test -n "$cf_compress" ; then
3254+cat >>$cf_edit_man <<CF_EOF
3255+ if test \$verb = installing ; then
3256+ if ( $cf_compress -f \$TMP )
3257+ then
3258+ mv \$TMP.$cf_so_strip \$TMP
3259+ fi
3260+ fi
3261+ target="\$target.$cf_so_strip"
3262+CF_EOF
3263+fi
3264+
3265+case "$MANPAGE_FORMAT" in #(vi
3266+*BSDI*)
3267+cat >>$cf_edit_man <<CF_EOF
3268+ if test \$form = format ; then
3269+ # BSDI installs only .0 suffixes in the cat directories
3270+ target="\`echo \$target|sed -e 's/\.[[1-9]]\+[[a-z]]*/.0/'\`"
3271+ fi
3272+CF_EOF
3273+ ;;
3274+esac
3275+
3276+cat >>$cf_edit_man <<CF_EOF
3277+ suffix=\`basename \$target | sed -e 's%^[[^.]]*%%'\`
3278+ if test \$verb = installing ; then
3279+ echo \$verb \$target
3280+ \$INSTALL_DATA \$TMP \$target
3281+ test -n "\$aliases" && (
3282+ cd \$cf_subdir\${section} && (
3283+ source=\`echo \$target |sed -e 's%^.*/\([[^/]][[^/]]*/[[^/]][[^/]]*$\)%\1%'\`
3284+ test -n "$cf_so_strip" && source=\`echo \$source |sed -e 's%\.$cf_so_strip\$%%'\`
3285+ target=\`basename \$target\`
3286+ for cf_alias in \$aliases
3287+ do
3288+ if test \$section = 1 ; then
3289+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
3290+ fi
3291+
3292+ if test "$MANPAGE_SYMLINKS" = yes ; then
3293+ if test -f \$cf_alias\${suffix} ; then
3294+ if ( cmp -s \$target \$cf_alias\${suffix} )
3295+ then
3296+ continue
3297+ fi
3298+ fi
3299+ echo .. \$verb alias \$cf_alias\${suffix}
3300+ rm -f \$cf_alias\${suffix}
3301+ $LN_S \$target \$cf_alias\${suffix}
3302+ elif test "\$target" != "\$cf_alias\${suffix}" ; then
3303+ echo ".so \$source" >\$TMP
3304+CF_EOF
3305+if test -n "$cf_compress" ; then
3306+cat >>$cf_edit_man <<CF_EOF
3307+ if test -n "$cf_so_strip" ; then
3308+ $cf_compress -f \$TMP
3309+ mv \$TMP.$cf_so_strip \$TMP
3310+ fi
3311+CF_EOF
3312+fi
3313+cat >>$cf_edit_man <<CF_EOF
3314+ echo .. \$verb alias \$cf_alias\${suffix}
3315+ rm -f \$cf_alias\${suffix}
3316+ \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
3317+ fi
3318+ done
3319+ )
3320+ )
3321+ elif test \$verb = removing ; then
3322+ echo \$verb \$target
3323+ rm -f \$target
3324+ test -n "\$aliases" && (
3325+ cd \$cf_subdir\${section} && (
3326+ for cf_alias in \$aliases
3327+ do
3328+ if test \$section = 1 ; then
3329+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
3330+ fi
3331+
3332+ echo .. \$verb alias \$cf_alias\${suffix}
3333+ rm -f \$cf_alias\${suffix}
3334+ done
3335+ )
3336+ )
3337+ else
3338+# echo ".hy 0"
3339+ cat \$TMP
3340+ fi
3341+ ;;
3342+esac
3343+done
3344+
3345+if test $cf_inboth = yes ; then
3346+if test \$form != format ; then
3347+ sh \[$]0 format \$verb \$mandir \$srcdir \[$]*
3348+fi
3349+fi
3350+
3351+exit 0
3352+CF_EOF
3353+chmod 755 $cf_edit_man
3354+
3355+])dnl
3356+dnl ---------------------------------------------------------------------------
3357+dnl CF_MATH_LIB version: 5 updated: 2000/05/28 01:39:10
3358+dnl -----------
3359+dnl Checks for libraries. At least one UNIX system, Apple Macintosh
3360+dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler
3361+dnl AC_CHECK_LIB(m,sin), because that fails for C++.
3362+AC_DEFUN([CF_MATH_LIB],
3363+[
3364+AC_CACHE_CHECK(if -lm needed for math functions,
3365+ cf_cv_need_libm,[
3366+ AC_TRY_LINK([
3367+ #include <stdio.h>
3368+ #include <math.h>
3369+ ],
3370+ [double x = rand(); printf("result = %g\n", ]ifelse($2,,sin(x),$2)[)],
3371+ [cf_cv_need_libm=no],
3372+ [cf_cv_need_libm=yes])])
3373+if test "$cf_cv_need_libm" = yes
3374+then
3375+ifelse($1,,[
3376+ LIBS="$LIBS -lm"
3377+],[$1=-lm])
3378+fi
3379+])
3380+dnl ---------------------------------------------------------------------------
3381+dnl CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55
3382+dnl ----------------------
3383+dnl Check if the file-system supports mixed-case filenames. If we're able to
3384+dnl create a lowercase name and see it as uppercase, it doesn't support that.
3385+AC_DEFUN([CF_MIXEDCASE_FILENAMES],
3386+[
3387+AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
3388+if test "$cross_compiling" = yes ; then
3389+ case $target_alias in #(vi
3390+ *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3391+ cf_cv_mixedcase=no
3392+ ;;
3393+ *)
3394+ cf_cv_mixedcase=yes
3395+ ;;
3396+ esac
3397+else
3398+ rm -f conftest CONFTEST
3399+ echo test >conftest
3400+ if test -f CONFTEST ; then
3401+ cf_cv_mixedcase=no
3402+ else
3403+ cf_cv_mixedcase=yes
3404+ fi
3405+ rm -f conftest CONFTEST
3406+fi
3407+])
3408+test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
3409+])dnl
3410+dnl ---------------------------------------------------------------------------
3411+dnl CF_MKSTEMP version: 3 updated: 2001/11/08 20:59:59
3412+dnl ----------
3413+dnl Check for a working mkstemp. This creates two files, checks that they are
3414+dnl successfully created and distinct (AmigaOS apparently fails on the last).
3415+AC_DEFUN([CF_MKSTEMP],[
3416+AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[
3417+rm -f conftest*
3418+AC_TRY_RUN([
3419+#include <sys/types.h>
3420+#include <stdlib.h>
3421+#include <stdio.h>
3422+#include <string.h>
3423+#include <sys/stat.h>
3424+int main()
3425+{
3426+ char *tmpl = "conftestXXXXXX";
3427+ char name[2][80];
3428+ int n;
3429+ int result = 0;
3430+ int fd;
3431+ struct stat sb;
3432+
3433+ umask(077);
3434+ for (n = 0; n < 2; ++n) {
3435+ strcpy(name[n], tmpl);
3436+ if ((fd = mkstemp(name[n])) >= 0) {
3437+ if (!strcmp(name[n], tmpl)
3438+ || stat(name[n], &sb) != 0
3439+ || (sb.st_mode & S_IFMT) != S_IFREG
3440+ || (sb.st_mode & 077) != 0) {
3441+ result = 1;
3442+ }
3443+ close(fd);
3444+ }
3445+ }
3446+ if (result == 0
3447+ && !strcmp(name[0], name[1]))
3448+ result = 1;
3449+ exit(result);
3450+}
3451+],[cf_cv_func_mkstemp=yes
3452+],[cf_cv_func_mkstemp=no
3453+],[AC_CHECK_FUNC(mkstemp)
3454+])
3455+])
3456+if test "$cf_cv_func_mkstemp" = yes ; then
3457+ AC_DEFINE(HAVE_MKSTEMP)
3458+fi
3459+])dnl
3460+dnl ---------------------------------------------------------------------------
3461+dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49
3462+dnl ----------------
3463+dnl Check if the given variable is a number. If not, report an error.
3464+dnl $1 is the variable
3465+dnl $2 is the message
3466+AC_DEFUN([CF_NUMBER_SYNTAX],[
3467+if test -n "$1" ; then
3468+ case $1 in #(vi
3469+ [[0-9]]*) #(vi
3470+ ;;
3471+ *)
3472+ AC_MSG_ERROR($2 is not a number: $1)
3473+ ;;
3474+ esac
3475+else
3476+ AC_MSG_ERROR($2 value is empty)
3477+fi
3478+])dnl
3479+dnl ---------------------------------------------------------------------------
3480+dnl CF_OBJ_SUBDIR version: 4 updated: 2002/02/23 20:38:31
3481+dnl -------------
3482+dnl Compute the object-directory name from the given model name
3483+AC_DEFUN([CF_OBJ_SUBDIR],
3484+[
3485+ case $1 in
3486+ libtool) $2='obj_lo' ;;
3487+ normal) $2='objects' ;;
3488+ debug) $2='obj_g' ;;
3489+ profile) $2='obj_p' ;;
3490+ shared)
3491+ case $cf_cv_system_name in #(vi
3492+ cygwin) #(vi
3493+ $2='objects' ;;
3494+ *)
3495+ $2='obj_s' ;;
3496+ esac
3497+ esac
3498+])dnl
3499+dnl ---------------------------------------------------------------------------
3500+dnl CF_PATHSEP version: 3 updated: 2001/01/12 01:23:53
3501+dnl ----------
3502+dnl Provide a value for the $PATH and similar separator
3503+AC_DEFUN([CF_PATHSEP],
3504+[
3505+ case $cf_cv_system_name in
3506+ os2*) PATHSEP=';' ;;
3507+ *) PATHSEP=':' ;;
3508+ esac
3509+ifelse($1,,,[$1=$PATHSEP])
3510+ AC_SUBST(PATHSEP)
3511+])dnl
3512+dnl ---------------------------------------------------------------------------
3513+dnl CF_PATH_SYNTAX version: 9 updated: 2002/09/17 23:03:38
3514+dnl --------------
3515+dnl Check the argument to see that it looks like a pathname. Rewrite it if it
3516+dnl begins with one of the prefix/exec_prefix variables, and then again if the
3517+dnl result begins with 'NONE'. This is necessary to work around autoconf's
3518+dnl delayed evaluation of those symbols.
3519+AC_DEFUN([CF_PATH_SYNTAX],[
3520+case ".[$]$1" in #(vi
3521+.\[$]\(*\)*|.\'*\'*) #(vi
3522+ ;;
3523+..|./*|.\\*) #(vi
3524+ ;;
3525+.[[a-zA-Z]]:[[\\/]]*) #(vi OS/2 EMX
3526+ ;;
3527+.\[$]{*prefix}*) #(vi
3528+ eval $1="[$]$1"
3529+ case ".[$]$1" in #(vi
3530+ .NONE/*)
3531+ $1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%`
3532+ ;;
3533+ esac
3534+ ;; #(vi
3535+.NONE/*)
3536+ $1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%`
3537+ ;;
3538+*)
3539+ ifelse($2,,[AC_ERROR([expected a pathname, not \"[$]$1\"])],$2)
3540+ ;;
3541+esac
3542+])dnl
3543+dnl ---------------------------------------------------------------------------
3544+dnl CF_PREDEFINE version: 1 updated: 2003/07/26 17:53:56
3545+dnl ------------
3546+dnl Add definitions to CPPFLAGS to ensure they're predefined for all compiles.
3547+dnl
3548+dnl $1 = symbol to test
3549+dnl $2 = value (if any) to use for a predefinition
3550+AC_DEFUN([CF_PREDEFINE],
3551+[
3552+AC_MSG_CHECKING(if we must define $1)
3553+AC_TRY_COMPILE([#include <sys/types.h>
3554+],[
3555+#ifndef $1
3556+make an error
3557+#endif],[cf_result=no],[cf_result=yes])
3558+AC_MSG_RESULT($cf_result)
3559+
3560+if test "$cf_result" = yes ; then
3561+ CPPFLAGS="$CPPFLAGS ifelse($2,,-D$1,[-D$1=$2])"
3562+elif test "x$2" != "x" ; then
3563+ AC_MSG_CHECKING(checking for compatible value versus $2)
3564+ AC_TRY_COMPILE([#include <sys/types.h>
3565+],[
3566+#if $1-$2 < 0
3567+make an error
3568+#endif],[cf_result=yes],[cf_result=no])
3569+ AC_MSG_RESULT($cf_result)
3570+ if test "$cf_result" = no ; then
3571+ # perhaps we can override it - try...
3572+ CPPFLAGS="$CPPFLAGS -D$1=$2"
3573+ fi
3574+fi
3575+])dnl
3576+dnl ---------------------------------------------------------------------------
3577+dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18
3578+dnl -----------
3579+dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
3580+AC_DEFUN([CF_PROG_EXT],
3581+[
3582+AC_REQUIRE([CF_CHECK_CACHE])
3583+case $cf_cv_system_name in
3584+os2*)
3585+ CFLAGS="$CFLAGS -Zmt"
3586+ CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
3587+ CXXFLAGS="$CXXFLAGS -Zmt"
3588+ # autoconf's macro sets -Zexe and suffix both, which conflict:w
3589+ LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
3590+ ac_cv_exeext=.exe
3591+ ;;
3592+esac
3593+
3594+AC_EXEEXT
3595+AC_OBJEXT
3596+
3597+PROG_EXT="$EXEEXT"
3598+AC_SUBST(PROG_EXT)
3599+test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
3600+])dnl
3601+dnl ---------------------------------------------------------------------------
3602+dnl CF_PROG_INSTALL version: 5 updated: 2002/12/21 22:46:07
3603+dnl ---------------
3604+dnl Force $INSTALL to be an absolute-path. Otherwise, edit_man.sh and the
3605+dnl misc/tabset install won't work properly. Usually this happens only when
3606+dnl using the fallback mkinstalldirs script
3607+AC_DEFUN([CF_PROG_INSTALL],
3608+[AC_PROG_INSTALL
3609+case $INSTALL in
3610+/*)
3611+ ;;
3612+*)
3613+ CF_DIRNAME(cf_dir,$INSTALL)
3614+ test -z "$cf_dir" && cf_dir=.
3615+ INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3616+ ;;
3617+esac
3618+])dnl
3619+dnl ---------------------------------------------------------------------------
3620+dnl CF_PROG_LDCONFIG version: 1 updated: 2003/09/20 17:07:55
3621+dnl ----------------
3622+dnl Check for ldconfig, needed to fixup shared libraries that would be built
3623+dnl and then used in the install.
3624+AC_DEFUN([CF_PROG_LDCONFIG],[
3625+if test "$cross_compiling" = yes ; then
3626+ LDCONFIG=:
3627+else
3628+case "$cf_cv_system_name" in #(vi
3629+freebsd*) #(vi
3630+ test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3631+ ;;
3632+*) LDPATH=$PATH:/sbin:/usr/sbin
3633+ AC_PATH_PROG(LDCONFIG,ldconfig,,$LDPATH)
3634+ ;;
3635+esac
3636+fi
3637+AC_SUBST(LDCONFIG)
3638+])dnl
3639+dnl ---------------------------------------------------------------------------
3640+dnl CF_REGEX version: 3 updated: 1997/11/01 14:26:01
3641+dnl --------
3642+dnl Attempt to determine if we've got one of the flavors of regular-expression
3643+dnl code that we can support.
3644+AC_DEFUN([CF_REGEX],
3645+[
3646+AC_MSG_CHECKING([for regular-expression headers])
3647+AC_CACHE_VAL(cf_cv_regex,[
3648+AC_TRY_LINK([#include <sys/types.h>
3649+#include <regex.h>],[
3650+ regex_t *p;
3651+ int x = regcomp(p, "", 0);
3652+ int y = regexec(p, "", 0, 0, 0);
3653+ regfree(p);
3654+ ],[cf_cv_regex="regex.h"],[
3655+ AC_TRY_LINK([#include <regexp.h>],[
3656+ char *p = compile("", "", "", 0);
3657+ int x = step("", "");
3658+ ],[cf_cv_regex="regexp.h"],[
3659+ cf_save_LIBS="$LIBS"
3660+ LIBS="-lgen $LIBS"
3661+ AC_TRY_LINK([#include <regexpr.h>],[
3662+ char *p = compile("", "", "");
3663+ int x = step("", "");
3664+ ],[cf_cv_regex="regexpr.h"],[LIBS="$cf_save_LIBS"])])])
3665+])
3666+AC_MSG_RESULT($cf_cv_regex)
3667+case $cf_cv_regex in
3668+ regex.h) AC_DEFINE(HAVE_REGEX_H_FUNCS) ;;
3669+ regexp.h) AC_DEFINE(HAVE_REGEXP_H_FUNCS) ;;
3670+ regexpr.h) AC_DEFINE(HAVE_REGEXPR_H_FUNCS) ;;
3671+esac
3672+])dnl
3673+dnl ---------------------------------------------------------------------------
3674+dnl CF_SHARED_OPTS version: 30 updated: 2003/12/27 20:48:07
3675+dnl --------------
3676+dnl Attempt to determine the appropriate CC/LD options for creating a shared
3677+dnl library.
3678+dnl
3679+dnl Note: $(LOCAL_LDFLAGS) is used to link executables that will run within the
3680+dnl build-tree, i.e., by making use of the libraries that are compiled in ../lib
3681+dnl We avoid compiling-in a ../lib path for the shared library since that can
3682+dnl lead to unexpected results at runtime.
3683+dnl $(LOCAL_LDFLAGS2) has the same intention but assumes that the shared libraries
3684+dnl are compiled in ../../lib
3685+dnl
3686+dnl The variable 'cf_cv_do_symlinks' is used to control whether we configure
3687+dnl to install symbolic links to the rel/abi versions of shared libraries.
3688+dnl
3689+dnl The variable 'cf_cv_shlib_version' controls whether we use the rel or abi
3690+dnl version when making symbolic links.
3691+dnl
3692+dnl The variable 'cf_cv_shlib_version_infix' controls whether shared library
3693+dnl version numbers are infix (ex: libncurses.<ver>.dylib) or postfix
3694+dnl (ex: libncurses.so.<ver>).
3695+dnl
3696+dnl Some loaders leave 'so_locations' lying around. It's nice to clean up.
3697+AC_DEFUN([CF_SHARED_OPTS],
3698+[
3699+ AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
3700+ LOCAL_LDFLAGS=
3701+ LOCAL_LDFLAGS2=
3702+ LD_SHARED_OPTS=
3703+ INSTALL_LIB="-m 644"
3704+
3705+ cf_cv_do_symlinks=no
3706+
3707+ AC_MSG_CHECKING(if release/abi version should be used for shared libs)
3708+ AC_ARG_WITH(shlib-version,
3709+ [ --with-shlib-version=X Specify rel or abi version for shared libs],
3710+ [test -z "$withval" && withval=auto
3711+ case $withval in #(vi
3712+ yes) #(vi
3713+ cf_cv_shlib_version=auto
3714+ ;;
3715+ rel|abi|auto|no) #(vi
3716+ cf_cv_shlib_version=$withval
3717+ ;;
3718+ *)
3719+ AC_ERROR([option value must be one of: rel, abi, auto or no])
3720+ ;;
3721+ esac
3722+ ],[cf_cv_shlib_version=auto])
3723+ AC_MSG_RESULT($cf_cv_shlib_version)
3724+
3725+ cf_cv_rm_so_locs=no
3726+
3727+ # Some less-capable ports of gcc support only -fpic
3728+ CC_SHARED_OPTS=
3729+ if test "$GCC" = yes
3730+ then
3731+ AC_MSG_CHECKING(which $CC option to use)
3732+ cf_save_CFLAGS="$CFLAGS"
3733+ for CC_SHARED_OPTS in -fPIC -fpic ''
3734+ do
3735+ CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
3736+ AC_TRY_COMPILE([#include <stdio.h>],[int x = 1],[break],[])
3737+ done
3738+ AC_MSG_RESULT($CC_SHARED_OPTS)
3739+ CFLAGS="$cf_save_CFLAGS"
3740+ fi
3741+
3742+ cf_cv_shlib_version_infix=no
3743+
3744+ case $cf_cv_system_name in
3745+ beos*)
3746+ MK_SHARED_LIB='$(CC) -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
3747+ ;;
3748+ cygwin*)
3749+ CC_SHARED_OPTS=
3750+ MK_SHARED_LIB='$(CC) -shared -Wl,--out-implib=$(IMPORT_LIB) -Wl,--export-all-symbols -o $(SHARED_LIB)'
3751+ cf_cv_shlib_version=cygdll
3752+ cf_cv_shlib_version_infix=cygdll
3753+ ;;
3754+ darwin*)
3755+ EXTRA_CFLAGS="-no-cpp-precomp"
3756+ CC_SHARED_OPTS="-dynamic"
3757+ MK_SHARED_LIB='$(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $[@]` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $[@]'
3758+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
3759+ cf_cv_shlib_version_infix=yes
3760+ ;;
3761+ hpux*)
3762+ # (tested with gcc 2.7.2 -- I don't have c89)
3763+ if test "$GCC" = yes; then
3764+ LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
3765+ else
3766+ CC_SHARED_OPTS='+Z'
3767+ LD_SHARED_OPTS='-Wl,+b,$(libdir)'
3768+ fi
3769+ MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $[@]'
3770+ # HP-UX shared libraries must be executable, and should be
3771+ # readonly to exploit a quirk in the memory manager.
3772+ INSTALL_LIB="-m 555"
3773+ ;;
3774+ irix*)
3775+ if test "$cf_cv_ld_rpath" = yes ; then
3776+ cf_ld_rpath_opt="-Wl,-rpath,"
3777+ EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
3778+ fi
3779+ # tested with IRIX 5.2 and 'cc'.
3780+ if test "$GCC" != yes; then
3781+ CC_SHARED_OPTS='-KPIC'
3782+ fi
3783+ MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $[@]` -o $[@]'
3784+ cf_cv_rm_so_locs=yes
3785+ ;;
3786+ linux*|gnu*|k*bsd*-gnu)
3787+ if test "$DFT_LWR_MODEL" = "shared" ; then
3788+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
3789+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
3790+ fi
3791+ if test "$cf_cv_ld_rpath" = yes ; then
3792+ cf_ld_rpath_opt="-Wl,-rpath,"
3793+ EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
3794+ fi
3795+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
3796+ MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $[@]'
3797+ ;;
3798+ openbsd2*)
3799+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
3800+ MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $[@].$(ABI_VERSION)` -o $[@]'
3801+ ;;
3802+ freebsd[[45]]*)
3803+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
3804+ MK_SHARED_LIB='$(LD) -Bshareable -soname=`basename $[@]` -o $[@]'
3805+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
3806+
3807+# This doesn't work - I keep getting spurious references to needing
3808+# libncurses.so.5.3 when ldd says it's resolved. LOCAL_LDFLAGS2 seems to be
3809+# no longer used anyway. And the rpath logic isn't relative - so I have to
3810+# add the local and install lib-directories:
3811+#
3812+# if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
3813+# LOCAL_LDFLAGS="-rpath `pwd`/lib"
3814+# LOCAL_LDFLAGS2="-rpath \$(libdir) $LOCAL_LDFLAGS"
3815+# cf_ld_rpath_opt="-rpath "
3816+# EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
3817+# fi
3818+ ;;
3819+ openbsd*|freebsd*)
3820+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
3821+ MK_SHARED_LIB='$(LD) -Bshareable -o $[@]'
3822+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
3823+ ;;
3824+ netbsd*)
3825+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
3826+ test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
3827+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
3828+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
3829+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
3830+ EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
3831+ MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o $[@]'
3832+ if test "$cf_cv_shlib_version" = auto; then
3833+ if test ! -f /usr/libexec/ld.elf_so; then
3834+ cf_cv_shlib_version=rel
3835+ fi
3836+ fi
3837+ else
3838+ MK_SHARED_LIB='$(LD) -Bshareable -o $[@]'
3839+ fi
3840+ ;;
3841+ osf*|mls+*)
3842+ # tested with OSF/1 V3.2 and 'cc'
3843+ # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
3844+ # link with shared libs).
3845+ MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $[@]`'
3846+ case $host_os in
3847+ osf4*)
3848+ MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
3849+ ;;
3850+ esac
3851+ MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]'
3852+ if test "$DFT_LWR_MODEL" = "shared" ; then
3853+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
3854+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
3855+ fi
3856+ if test "$cf_cv_ld_rpath" = yes ; then
3857+ cf_ld_rpath_opt="-rpath"
3858+ # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
3859+ fi
3860+ cf_cv_rm_so_locs=yes
3861+ ;;
3862+ sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98
3863+ # tested with osr5.0.5
3864+ if test "$GCC" != yes; then
3865+ CC_SHARED_OPTS='-belf -KPIC'
3866+ fi
3867+ MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o [$]@'
3868+ if test "$cf_cv_ld_rpath" = yes ; then
3869+ # only way is to set LD_RUN_PATH but no switch for it
3870+ RUN_PATH=$libdir
3871+ fi
3872+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
3873+ LINK_PROGS='LD_RUN_PATH=$(libdir)'
3874+ LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
3875+ ;;
3876+ sunos4*)
3877+ # tested with SunOS 4.1.1 and gcc 2.7.0
3878+ if test "$GCC" != yes; then
3879+ CC_SHARED_OPTS='-KPIC'
3880+ fi
3881+ MK_SHARED_LIB='$(LD) -assert pure-text -o $[@]'
3882+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
3883+ ;;
3884+ solaris2*)
3885+ # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
3886+ if test "$GCC" != yes; then
3887+ CC_SHARED_OPTS='-KPIC'
3888+ fi
3889+ MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o $[@]'
3890+ if test "$DFT_LWR_MODEL" = "shared" ; then
3891+ LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
3892+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
3893+ fi
3894+ if test "$cf_cv_ld_rpath" = yes ; then
3895+ cf_ld_rpath_opt="-R"
3896+ EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
3897+ fi
3898+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
3899+ ;;
3900+ sysv5uw7*|unix_sv*)
3901+ # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
3902+ if test "$GCC" != yes; then
3903+ CC_SHARED_OPTS='-KPIC'
3904+ fi
3905+ MK_SHARED_LIB='$(LD) -d y -G -o [$]@'
3906+ ;;
3907+ *)
3908+ CC_SHARED_OPTS='unknown'
3909+ MK_SHARED_LIB='echo unknown'
3910+ ;;
3911+ esac
3912+
3913+ # This works if the last tokens in $MK_SHARED_LIB are the -o target.
3914+ case "$cf_cv_shlib_version" in #(vi
3915+ rel|abi)
3916+ case "$MK_SHARED_LIB" in #(vi
3917+ *'-o $[@]')
3918+ test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
3919+ ;;
3920+ *)
3921+ AC_MSG_WARN(ignored --with-shlib-version)
3922+ ;;
3923+ esac
3924+ ;;
3925+ esac
3926+
3927+ if test -n "$cf_ld_rpath_opt" ; then
3928+ AC_MSG_CHECKING(if we need a space after rpath option)
3929+ cf_save_LIBS="$LIBS"
3930+ LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
3931+ AC_TRY_LINK(, , cf_rpath_space=no, cf_rpath_space=yes)
3932+ LIBS="$cf_save_LIBS"
3933+ AC_MSG_RESULT($cf_rpath_space)
3934+ test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
3935+ MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
3936+ fi
3937+
3938+ AC_SUBST(CC_SHARED_OPTS)
3939+ AC_SUBST(LD_SHARED_OPTS)
3940+ AC_SUBST(MK_SHARED_LIB)
3941+ AC_SUBST(LINK_PROGS)
3942+ AC_SUBST(LINK_TESTS)
3943+ AC_SUBST(EXTRA_LDFLAGS)
3944+ AC_SUBST(LOCAL_LDFLAGS)
3945+ AC_SUBST(LOCAL_LDFLAGS2)
3946+ AC_SUBST(INSTALL_LIB)
3947+])dnl
3948+dnl ---------------------------------------------------------------------------
3949+dnl CF_SIZECHANGE version: 8 updated: 2000/11/04 12:22:16
3950+dnl -------------
3951+dnl Check for definitions & structures needed for window size-changing
3952+dnl FIXME: check that this works with "snake" (HP-UX 10.x)
3953+AC_DEFUN([CF_SIZECHANGE],
3954+[
3955+AC_REQUIRE([CF_STRUCT_TERMIOS])
3956+AC_CACHE_CHECK(declaration of size-change, cf_cv_sizechange,[
3957+ cf_cv_sizechange=unknown
3958+ cf_save_CPPFLAGS="$CPPFLAGS"
3959+
3960+for cf_opts in "" "NEED_PTEM_H"
3961+do
3962+
3963+ CPPFLAGS="$cf_save_CPPFLAGS"
3964+ test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
3965+ AC_TRY_COMPILE([#include <sys/types.h>
3966+#ifdef HAVE_TERMIOS_H
3967+#include <termios.h>
3968+#else
3969+#ifdef HAVE_TERMIO_H
3970+#include <termio.h>
3971+#endif
3972+#endif
3973+#ifdef NEED_PTEM_H
3974+/* This is a workaround for SCO: they neglected to define struct winsize in
3975+ * termios.h -- it's only in termio.h and ptem.h
3976+ */
3977+#include <sys/stream.h>
3978+#include <sys/ptem.h>
3979+#endif
3980+#if !defined(sun) || !defined(HAVE_TERMIOS_H)
3981+#include <sys/ioctl.h>
3982+#endif
3983+],[
3984+#ifdef TIOCGSIZE
3985+ struct ttysize win; /* FIXME: what system is this? */
3986+ int y = win.ts_lines;
3987+ int x = win.ts_cols;
3988+#else
3989+#ifdef TIOCGWINSZ
3990+ struct winsize win;
3991+ int y = win.ws_row;
3992+ int x = win.ws_col;
3993+#else
3994+ no TIOCGSIZE or TIOCGWINSZ
3995+#endif /* TIOCGWINSZ */
3996+#endif /* TIOCGSIZE */
3997+ ],
3998+ [cf_cv_sizechange=yes],
3999+ [cf_cv_sizechange=no])
4000+
4001+ CPPFLAGS="$cf_save_CPPFLAGS"
4002+ if test "$cf_cv_sizechange" = yes ; then
4003+ echo "size-change succeeded ($cf_opts)" >&AC_FD_CC
4004+ test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
4005+ break
4006+ fi
4007+done
4008+])
4009+if test "$cf_cv_sizechange" != no ; then
4010+ AC_DEFINE(HAVE_SIZECHANGE)
4011+ case $cf_cv_sizechange in #(vi
4012+ NEED*)
4013+ AC_DEFINE_UNQUOTED($cf_cv_sizechange )
4014+ ;;
4015+ esac
4016+fi
4017+])dnl
4018+dnl ---------------------------------------------------------------------------
4019+dnl CF_SRC_MODULES version: 15 updated: 2004/01/10 16:05:16
4020+dnl --------------
4021+dnl For each parameter, test if the source-directory exists, and if it contains
4022+dnl a 'modules' file. If so, add to the list $cf_cv_src_modules which we'll
4023+dnl use in CF_LIB_RULES.
4024+dnl
4025+dnl This uses the configured value to make the lists SRC_SUBDIRS and
4026+dnl SUB_MAKEFILES which are used in the makefile-generation scheme.
4027+AC_DEFUN([CF_SRC_MODULES],
4028+[
4029+AC_MSG_CHECKING(for src modules)
4030+
4031+# dependencies and linker-arguments for test-programs
4032+TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
4033+if test "$DFT_LWR_MODEL" = "libtool"; then
4034+ TEST_ARGS="${TEST_DEPS}"
4035+else
4036+ TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
4037+fi
4038+
4039+# dependencies and linker-arguments for utility-programs
4040+test "$with_termlib" != yes && PROG_ARGS="$TEST_ARGS"
4041+
4042+cf_cv_src_modules=
4043+for cf_dir in $1
4044+do
4045+ if test -f $srcdir/$cf_dir/modules; then
4046+
4047+ # We may/may not have tack in the distribution, though the
4048+ # makefile is.
4049+ if test $cf_dir = tack ; then
4050+ if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
4051+ continue
4052+ fi
4053+ fi
4054+
4055+ if test -z "$cf_cv_src_modules"; then
4056+ cf_cv_src_modules=$cf_dir
4057+ else
4058+ cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
4059+ fi
4060+
4061+ # Make the ncurses_cfg.h file record the library interface files as
4062+ # well. These are header files that are the same name as their
4063+ # directory. Ncurses is the only library that does not follow
4064+ # that pattern.
4065+ if test $cf_dir = tack ; then
4066+ continue
4067+ elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
4068+ CF_UPPER(cf_have_include,$cf_dir)
4069+ AC_DEFINE_UNQUOTED(HAVE_${cf_have_include}_H)
4070+ AC_DEFINE_UNQUOTED(HAVE_LIB${cf_have_include})
4071+ TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
4072+ if test "$DFT_LWR_MODEL" = "libtool"; then
4073+ TEST_ARGS="${TEST_DEPS}"
4074+ else
4075+ TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
4076+ fi
4077+ fi
4078+ fi
4079+done
4080+AC_MSG_RESULT($cf_cv_src_modules)
4081+TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
4082+AC_SUBST(TEST_DEPS)
4083+AC_SUBST(TEST_ARGS)
4084+
4085+PROG_ARGS="-L${LIB_DIR} $PROG_ARGS"
4086+AC_SUBST(PROG_ARGS)
4087+
4088+SRC_SUBDIRS="man include"
4089+for cf_dir in $cf_cv_src_modules
4090+do
4091+ SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
4092+done
4093+SRC_SUBDIRS="$SRC_SUBDIRS test"
4094+test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
4095+test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
4096+
4097+ADA_SUBDIRS=
4098+if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
4099+ SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
4100+ ADA_SUBDIRS="gen src samples"
4101+fi
4102+
4103+SUB_MAKEFILES=
4104+for cf_dir in $SRC_SUBDIRS
4105+do
4106+ SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
4107+done
4108+
4109+if test -n "$ADA_SUBDIRS"; then
4110+ for cf_dir in $ADA_SUBDIRS
4111+ do
4112+ SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
4113+ done
4114+ AC_SUBST(ADA_SUBDIRS)
4115+fi
4116+])dnl
4117+dnl ---------------------------------------------------------------------------
4118+dnl CF_STDCPP_LIBRARY version: 5 updated: 2000/08/12 23:18:52
4119+dnl -----------------
4120+dnl Check for -lstdc++, which is GNU's standard C++ library.
4121+AC_DEFUN([CF_STDCPP_LIBRARY],
4122+[
4123+if test -n "$GXX" ; then
4124+case $cf_cv_system_name in #(vi
4125+os2*) #(vi
4126+ cf_stdcpp_libname=stdcpp
4127+ ;;
4128+*)
4129+ cf_stdcpp_libname=stdc++
4130+ ;;
4131+esac
4132+AC_CACHE_CHECK(for library $cf_stdcpp_libname,cf_cv_libstdcpp,[
4133+ cf_save="$LIBS"
4134+ LIBS="$LIBS -l$cf_stdcpp_libname"
4135+AC_TRY_LINK([
4136+#include <strstream.h>],[
4137+char buf[80];
4138+strstreambuf foo(buf, sizeof(buf))
4139+],
4140+ [cf_cv_libstdcpp=yes],
4141+ [cf_cv_libstdcpp=no])
4142+ LIBS="$cf_save"
4143+])
4144+test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
4145+fi
4146+])dnl
4147+dnl ---------------------------------------------------------------------------
4148+dnl CF_STRIP_G_OPT version: 3 updated: 2002/12/21 19:25:52
4149+dnl --------------
4150+dnl Remove "-g" option from the compiler options
4151+AC_DEFUN([CF_STRIP_G_OPT],
4152+[$1=`echo ${$1} | sed -e 's%-g %%' -e 's%-g$%%'`])dnl
4153+dnl ---------------------------------------------------------------------------
4154+dnl CF_STRUCT_SIGACTION version: 3 updated: 2000/08/12 23:18:52
4155+dnl -------------------
4156+dnl Check if we need _POSIX_SOURCE defined to use struct sigaction. We'll only
4157+dnl do this if we've found the sigaction function.
4158+dnl
4159+dnl If needed, define SVR4_ACTION.
4160+AC_DEFUN([CF_STRUCT_SIGACTION],[
4161+if test "$ac_cv_func_sigaction" = yes; then
4162+AC_MSG_CHECKING(whether sigaction needs _POSIX_SOURCE)
4163+AC_TRY_COMPILE([
4164+#include <sys/types.h>
4165+#include <signal.h>],
4166+ [struct sigaction act],
4167+ [sigact_bad=no],
4168+ [
4169+AC_TRY_COMPILE([
4170+#define _POSIX_SOURCE
4171+#include <sys/types.h>
4172+#include <signal.h>],
4173+ [struct sigaction act],
4174+ [sigact_bad=yes
4175+ AC_DEFINE(SVR4_ACTION)],
4176+ [sigact_bad=unknown])])
4177+AC_MSG_RESULT($sigact_bad)
4178+fi
4179+])dnl
4180+dnl ---------------------------------------------------------------------------
4181+dnl CF_STRUCT_TERMIOS version: 5 updated: 2000/11/04 12:22:46
4182+dnl -----------------
4183+dnl Some machines require _POSIX_SOURCE to completely define struct termios.
4184+dnl If so, define SVR4_TERMIO
4185+AC_DEFUN([CF_STRUCT_TERMIOS],[
4186+AC_CHECK_HEADERS( \
4187+termio.h \
4188+termios.h \
4189+unistd.h \
4190+)
4191+if test "$ISC" = yes ; then
4192+ AC_CHECK_HEADERS( sys/termio.h )
4193+fi
4194+if test "$ac_cv_header_termios_h" = yes ; then
4195+ case "$CFLAGS $CPPFLAGS" in
4196+ *-D_POSIX_SOURCE*)
4197+ termios_bad=dunno ;;
4198+ *) termios_bad=maybe ;;
4199+ esac
4200+ if test "$termios_bad" = maybe ; then
4201+ AC_MSG_CHECKING(whether termios.h needs _POSIX_SOURCE)
4202+ AC_TRY_COMPILE([#include <termios.h>],
4203+ [struct termios foo; int x = foo.c_iflag],
4204+ termios_bad=no, [
4205+ AC_TRY_COMPILE([
4206+#define _POSIX_SOURCE
4207+#include <termios.h>],
4208+ [struct termios foo; int x = foo.c_iflag],
4209+ termios_bad=unknown,
4210+ termios_bad=yes AC_DEFINE(SVR4_TERMIO))
4211+ ])
4212+ AC_MSG_RESULT($termios_bad)
4213+ fi
4214+fi
4215+])dnl
4216+dnl ---------------------------------------------------------------------------
4217+dnl CF_SUBST version: 2 updated: 1997/09/06 23:41:28
4218+dnl --------
4219+dnl Shorthand macro for substituting things that the user may override
4220+dnl with an environment variable.
4221+dnl
4222+dnl $1 = long/descriptive name
4223+dnl $2 = environment variable
4224+dnl $3 = default value
4225+AC_DEFUN([CF_SUBST],
4226+[AC_CACHE_VAL(cf_cv_subst_$2,[
4227+AC_MSG_CHECKING(for $1 (symbol $2))
4228+test -z "[$]$2" && $2=$3
4229+AC_MSG_RESULT([$]$2)
4230+AC_SUBST($2)
4231+cf_cv_subst_$2=[$]$2])
4232+$2=${cf_cv_subst_$2}
4233+])dnl
4234+dnl ---------------------------------------------------------------------------
4235+dnl CF_SUBST_NCURSES_VERSION version: 7 updated: 2003/06/07 16:22:51
4236+dnl ------------------------
4237+dnl Get the version-number for use in shared-library naming, etc.
4238+AC_DEFUN([CF_SUBST_NCURSES_VERSION],
4239+[
4240+NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[[ ]]*=' $srcdir/dist.mk | sed -e 's/^[[^0-9]]*//'`"
4241+NCURSES_MINOR="`egrep '^NCURSES_MINOR[[ ]]*=' $srcdir/dist.mk | sed -e 's/^[[^0-9]]*//'`"
4242+NCURSES_PATCH="`egrep '^NCURSES_PATCH[[ ]]*=' $srcdir/dist.mk | sed -e 's/^[[^0-9]]*//'`"
4243+cf_cv_abi_version=${NCURSES_MAJOR}
4244+cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
4245+dnl Show the computed version, for logging
4246+cf_cv_timestamp=`date`
4247+AC_MSG_RESULT(Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp))
4248+dnl We need these values in the generated headers
4249+AC_SUBST(NCURSES_MAJOR)
4250+AC_SUBST(NCURSES_MINOR)
4251+AC_SUBST(NCURSES_PATCH)
4252+dnl We need these values in the generated makefiles
4253+AC_SUBST(cf_cv_rel_version)
4254+AC_SUBST(cf_cv_abi_version)
4255+AC_SUBST(cf_cv_builtin_bool)
4256+AC_SUBST(cf_cv_header_stdbool_h)
4257+AC_SUBST(cf_cv_type_of_bool)dnl
4258+])dnl
4259+dnl ---------------------------------------------------------------------------
4260+dnl CF_SYS_TIME_SELECT version: 4 updated: 2000/10/04 09:18:40
4261+dnl ------------------
4262+dnl Check if we can include <sys/time.h> with <sys/select.h>; this breaks on
4263+dnl older SCO configurations.
4264+AC_DEFUN([CF_SYS_TIME_SELECT],
4265+[
4266+AC_MSG_CHECKING(if sys/time.h works with sys/select.h)
4267+AC_CACHE_VAL(cf_cv_sys_time_select,[
4268+AC_TRY_COMPILE([
4269+#include <sys/types.h>
4270+#ifdef HAVE_SYS_TIME_H
4271+#include <sys/time.h>
4272+#endif
4273+#ifdef HAVE_SYS_SELECT_H
4274+#include <sys/select.h>
4275+#endif
4276+],[],[cf_cv_sys_time_select=yes],
4277+ [cf_cv_sys_time_select=no])
4278+ ])
4279+AC_MSG_RESULT($cf_cv_sys_time_select)
4280+test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT)
4281+])dnl
4282+dnl ---------------------------------------------------------------------------
4283+dnl CF_TYPEOF_CHTYPE version: 4 updated: 2000/10/04 09:18:40
4284+dnl ----------------
4285+dnl Determine the type we should use for chtype (and attr_t, which is treated
4286+dnl as the same thing). We want around 32 bits, so on most machines want a
4287+dnl long, but on newer 64-bit machines, probably want an int. If we're using
4288+dnl wide characters, we have to have a type compatible with that, as well.
4289+AC_DEFUN([CF_TYPEOF_CHTYPE],
4290+[
4291+AC_REQUIRE([CF_UNSIGNED_LITERALS])
4292+AC_MSG_CHECKING([for type of chtype])
4293+AC_CACHE_VAL(cf_cv_typeof_chtype,[
4294+ AC_TRY_RUN([
4295+#ifdef USE_WIDEC_SUPPORT
4296+#include <stddef.h> /* we want wchar_t */
4297+#define WANT_BITS 39
4298+#else
4299+#define WANT_BITS 31
4300+#endif
4301+#include <stdio.h>
4302+int main()
4303+{
4304+ FILE *fp = fopen("cf_test.out", "w");
4305+ if (fp != 0) {
4306+ char *result = "long";
4307+#ifdef USE_WIDEC_SUPPORT
4308+ /*
4309+ * If wchar_t is smaller than a long, it must be an int or a
4310+ * short. We prefer not to use a short anyway.
4311+ */
4312+ if (sizeof(unsigned long) > sizeof(wchar_t))
4313+ result = "int";
4314+#endif
4315+ if (sizeof(unsigned long) > sizeof(unsigned int)) {
4316+ int n;
4317+ unsigned int x;
4318+ for (n = 0; n < WANT_BITS; n++) {
4319+ unsigned int y = (x >> n);
4320+ if (y != 1 || x == 0) {
4321+ x = 0;
4322+ break;
4323+ }
4324+ }
4325+ /*
4326+ * If x is nonzero, an int is big enough for the bits
4327+ * that we want.
4328+ */
4329+ result = (x != 0) ? "int" : "long";
4330+ }
4331+ fputs(result, fp);
4332+ fclose(fp);
4333+ }
4334+ exit(0);
4335+}
4336+ ],
4337+ [cf_cv_typeof_chtype=`cat cf_test.out`],
4338+ [cf_cv_typeof_chtype=long],
4339+ [cf_cv_typeof_chtype=long])
4340+ rm -f cf_test.out
4341+ ])
4342+AC_MSG_RESULT($cf_cv_typeof_chtype)
4343+
4344+AC_SUBST(cf_cv_typeof_chtype)
4345+AC_DEFINE_UNQUOTED(TYPEOF_CHTYPE,$cf_cv_typeof_chtype)
4346+
4347+cf_cv_1UL="1"
4348+test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
4349+test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L"
4350+AC_SUBST(cf_cv_1UL)
4351+
4352+])dnl
4353+dnl ---------------------------------------------------------------------------
4354+dnl CF_TYPE_SIGACTION version: 3 updated: 2000/08/12 23:18:52
4355+dnl -----------------
4356+dnl
4357+AC_DEFUN([CF_TYPE_SIGACTION],
4358+[
4359+AC_MSG_CHECKING([for type sigaction_t])
4360+AC_CACHE_VAL(cf_cv_type_sigaction,[
4361+ AC_TRY_COMPILE([
4362+#include <signal.h>],
4363+ [sigaction_t x],
4364+ [cf_cv_type_sigaction=yes],
4365+ [cf_cv_type_sigaction=no])])
4366+AC_MSG_RESULT($cf_cv_type_sigaction)
4367+test "$cf_cv_type_sigaction" = yes && AC_DEFINE(HAVE_TYPE_SIGACTION)
4368+])dnl
4369+dnl ---------------------------------------------------------------------------
4370+dnl CF_UNSIGNED_LITERALS version: 2 updated: 1998/02/07 22:10:16
4371+dnl --------------------
4372+dnl Test if the compiler supports 'U' and 'L' suffixes. Only old compilers
4373+dnl won't, but they're still there.
4374+AC_DEFUN([CF_UNSIGNED_LITERALS],
4375+[
4376+AC_MSG_CHECKING([if unsigned literals are legal])
4377+AC_CACHE_VAL(cf_cv_unsigned_literals,[
4378+ AC_TRY_COMPILE([],[long x = 1L + 1UL + 1U + 1],
4379+ [cf_cv_unsigned_literals=yes],
4380+ [cf_cv_unsigned_literals=no])
4381+ ])
4382+AC_MSG_RESULT($cf_cv_unsigned_literals)
4383+])dnl
4384+dnl ---------------------------------------------------------------------------
4385+dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59
4386+dnl --------
4387+dnl Make an uppercase version of a variable
4388+dnl $1=uppercase($2)
4389+AC_DEFUN([CF_UPPER],
4390+[
4391+$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4392+])dnl
4393+dnl ---------------------------------------------------------------------------
4394+dnl CF_VERBOSE version: 2 updated: 1997/09/05 10:45:14
4395+dnl ----------
4396+dnl Use AC_VERBOSE w/o the warnings
4397+AC_DEFUN([CF_VERBOSE],
4398+[test -n "$verbose" && echo " $1" 1>&AC_FD_MSG
4399+])dnl
4400+dnl ---------------------------------------------------------------------------
4401+dnl CF_WCHAR_TYPE version: 2 updated: 2004/01/17 19:18:20
4402+dnl -------------
4403+dnl Check if type wide-character type $1 is declared, and if so, which header
4404+dnl file is needed. The second parameter is used to set a shell variable when
4405+dnl the type is not found. The first parameter sets a shell variable for the
4406+dnl opposite sense.
4407+AC_DEFUN([CF_WCHAR_TYPE],
4408+[
4409+# This is needed on Tru64 5.0 to declare $1
4410+AC_CACHE_CHECK(if we must include wchar.h to declare $1,cf_cv_$1,[
4411+AC_TRY_COMPILE([
4412+#include <stdlib.h>
4413+#include <stdarg.h>
4414+#include <stdio.h>
4415+#ifdef HAVE_LIBUTF8_H
4416+#include <libutf8.h>
4417+#endif],
4418+ [$1 state],
4419+ [cf_cv_$1=no],
4420+ [AC_TRY_COMPILE([
4421+#include <stdlib.h>
4422+#include <stdarg.h>
4423+#include <stdio.h>
4424+#include <wchar.h>
4425+#ifdef HAVE_LIBUTF8_H
4426+#include <libutf8.h>
4427+#endif],
4428+ [$1 value],
4429+ [cf_cv_$1=yes],
4430+ [cf_cv_$1=unknown])])])
4431+
4432+if test "$cf_cv_$1" = yes ; then
4433+ AC_DEFINE(NEED_WCHAR_H)
4434+ NEED_WCHAR_H=1
4435+fi
4436+
4437+ifelse($2,,,[
4438+# if we do not find $1 in either place, use substitution to provide a fallback.
4439+if test "$cf_cv_$1" = unknown ; then
4440+ $2=1
4441+fi
4442+])
4443+ifelse($3,,,[
4444+# if we find $1 in either place, use substitution to provide a fallback.
4445+if test "$cf_cv_$1" != unknown ; then
4446+ $3=1
4447+fi
4448+])
4449+])dnl
4450+dnl ---------------------------------------------------------------------------
4451+dnl CF_WITH_ABI_VERSION version: 1 updated: 2003/09/20 18:12:49
4452+dnl -------------------
4453+dnl Allow library's ABI to be overridden. Generally this happens when a
4454+dnl packager has incremented the ABI past that used in the original package,
4455+dnl and wishes to keep doing this.
4456+dnl
4457+dnl $1 is the package name, if any, to derive a corresponding {package}_ABI
4458+dnl symbol.
4459+AC_DEFUN([CF_WITH_ABI_VERSION],[
4460+test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
4461+AC_ARG_WITH(abi-version,
4462+[ --with-abi-version=XXX override derived ABI version],
4463+[AC_MSG_WARN(overriding ABI version $cf_cv_abi_version to $withval)
4464+ cf_cv_abi_version=$withval])
4465+ CF_NUMBER_SYNTAX($cf_cv_abi_version,ABI version)
4466+ifelse($1,,,[
4467+$1_ABI=$cf_cv_abi_version
4468+])
4469+])dnl
4470+dnl ---------------------------------------------------------------------------
4471+dnl CF_WITH_DBMALLOC version: 2 updated: 2002/12/29 21:11:45
4472+dnl ----------------
4473+dnl Configure-option for dbmalloc
4474+AC_DEFUN([CF_WITH_DBMALLOC],[
4475+AC_MSG_CHECKING(if you want to link with dbmalloc for testing)
4476+AC_ARG_WITH(dbmalloc,
4477+ [ --with-dbmalloc test: use Conor Cahill's dbmalloc library],
4478+ [with_dbmalloc=$withval],
4479+ [with_dbmalloc=no])
4480+AC_MSG_RESULT($with_dbmalloc)
4481+if test $with_dbmalloc = yes ; then
4482+ AC_CHECK_LIB(dbmalloc,debug_malloc)
4483+fi
4484+])dnl
4485+dnl ---------------------------------------------------------------------------
4486+dnl CF_WITH_DMALLOC version: 2 updated: 2002/12/29 21:11:45
4487+dnl ---------------
4488+dnl Configure-option for dmalloc
4489+AC_DEFUN([CF_WITH_DMALLOC],[
4490+AC_MSG_CHECKING(if you want to link with dmalloc for testing)
4491+AC_ARG_WITH(dmalloc,
4492+ [ --with-dmalloc test: use Gray Watson's dmalloc library],
4493+ [with_dmalloc=$withval],
4494+ [with_dmalloc=no])
4495+AC_MSG_RESULT($with_dmalloc)
4496+if test $with_dmalloc = yes ; then
4497+ AC_CHECK_LIB(dmalloc,dmalloc_debug)
4498+fi
4499+])dnl
4500+dnl ---------------------------------------------------------------------------
4501+dnl CF_WITH_LIBTOOL version: 9 updated: 2004/01/16 14:55:37
4502+dnl ---------------
4503+dnl Provide a configure option to incorporate libtool. Define several useful
4504+dnl symbols for the makefile rules.
4505+dnl
4506+dnl The reference to AC_PROG_LIBTOOL does not normally work, since it uses
4507+dnl macros from libtool.m4 which is in the aclocal directory of automake.
4508+dnl Following is a simple script which turns on the AC_PROG_LIBTOOL macro.
4509+dnl But that still does not work properly since the macro is expanded outside
4510+dnl the CF_WITH_LIBTOOL macro:
4511+dnl
4512+dnl #!/bin/sh
4513+dnl ACLOCAL=`aclocal --print-ac-dir`
4514+dnl if test -z "$ACLOCAL" ; then
4515+dnl echo cannot find aclocal directory
4516+dnl exit 1
4517+dnl elif test ! -f $ACLOCAL/libtool.m4 ; then
4518+dnl echo cannot find libtool.m4 file
4519+dnl exit 1
4520+dnl fi
4521+dnl
4522+dnl LOCAL=aclocal.m4
4523+dnl ORIG=aclocal.m4.orig
4524+dnl
4525+dnl trap "mv $ORIG $LOCAL" 0 1 2 5 15
4526+dnl rm -f $ORIG
4527+dnl mv $LOCAL $ORIG
4528+dnl
4529+dnl # sed the LIBTOOL= assignment to omit the current directory?
4530+dnl sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL
4531+dnl cat $ORIG >>$LOCAL
4532+dnl
4533+dnl autoconf-257 $*
4534+dnl
4535+AC_DEFUN([CF_WITH_LIBTOOL],
4536+[
4537+ifdef([AC_PROG_LIBTOOL],,[
4538+LIBTOOL=
4539+])
4540+# common library maintenance symbols that are convenient for libtool scripts:
4541+LIB_CREATE='$(AR) -cr'
4542+LIB_OBJECT='$(OBJECTS)'
4543+LIB_SUFFIX=.a
4544+LIB_PREP="$RANLIB"
4545+
4546+# symbols used to prop libtool up to enable it to determine what it should be
4547+# doing:
4548+LIB_CLEAN=
4549+LIB_COMPILE=
4550+LIB_LINK=
4551+LIB_INSTALL=
4552+LIB_UNINSTALL=
4553+
4554+AC_MSG_CHECKING(if you want to build libraries with libtool)
4555+AC_ARG_WITH(libtool,
4556+ [ --with-libtool generate libraries with libtool],
4557+ [with_libtool=$withval],
4558+ [with_libtool=no])
4559+AC_MSG_RESULT($with_libtool)
4560+if test "$with_libtool" != "no"; then
4561+ifdef([AC_PROG_LIBTOOL],[
4562+ # missing_content_AC_PROG_LIBTOOL{{
4563+ AC_PROG_LIBTOOL
4564+ # missing_content_AC_PROG_LIBTOOL}}
4565+],[
4566+ if test "$with_libtool" != "yes" ; then
4567+ CF_PATH_SYNTAX(with_libtool)
4568+ LIBTOOL=$with_libtool
4569+ else
4570+ AC_PATH_PROG(LIBTOOL,libtool)
4571+ fi
4572+ if test -z "$LIBTOOL" ; then
4573+ AC_MSG_ERROR(Cannot find libtool)
4574+ fi
4575+])dnl
4576+ LIB_CREATE='$(LIBTOOL) --mode=link $(CC) -rpath $(DESTDIR)$(libdir) -version-info `cut -f1 $(srcdir)/VERSION` -o'
4577+ LIB_OBJECT='$(OBJECTS:.o=.lo)'
4578+ LIB_SUFFIX=.la
4579+ LIB_CLEAN='$(LIBTOOL) --mode=clean'
4580+ LIB_COMPILE='$(LIBTOOL) --mode=compile'
4581+ LIB_LINK='$(LIBTOOL) --mode=link'
4582+ LIB_INSTALL='$(LIBTOOL) --mode=install'
4583+ LIB_UNINSTALL='$(LIBTOOL) --mode=uninstall'
4584+ LIB_PREP=:
4585+
4586+ # Show the version of libtool
4587+ AC_MSG_CHECKING(version of libtool)
4588+
4589+ # Save the version in a cache variable - this is not entirely a good
4590+ # thing, but the version string from libtool is very ugly, and for
4591+ # bug reports it might be useful to have the original string.
4592+ cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
4593+ AC_MSG_RESULT($cf_cv_libtool_version)
4594+ if test -z "$cf_cv_libtool_version" ; then
4595+ AC_MSG_ERROR(This is not libtool)
4596+ fi
4597+
4598+ # special hack to add --tag option for C++ compiler
4599+ case $cf_cv_libtool_version in
4600+ 1.[[5-9]]*|[[2-9]]*)
4601+ LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4602+ ;;
4603+ *)
4604+ LIBTOOL_CXX="$LIBTOOL"
4605+ ;;
4606+ esac
4607+else
4608+ LIBTOOL=""
4609+ LIBTOOL_CXX=""
4610+fi
4611+
4612+test -z "$LIBTOOL" && ECHO_LT=
4613+
4614+AC_SUBST(LIBTOOL)
4615+AC_SUBST(LIBTOOL_CXX)
4616+
4617+AC_SUBST(LIB_CREATE)
4618+AC_SUBST(LIB_OBJECT)
4619+AC_SUBST(LIB_SUFFIX)
4620+AC_SUBST(LIB_PREP)
4621+
4622+AC_SUBST(LIB_CLEAN)
4623+AC_SUBST(LIB_COMPILE)
4624+AC_SUBST(LIB_LINK)
4625+AC_SUBST(LIB_INSTALL)
4626+AC_SUBST(LIB_UNINSTALL)
4627+
4628+])dnl
4629+dnl ---------------------------------------------------------------------------
4630+dnl CF_WITH_PATH version: 6 updated: 1998/10/11 00:40:17
4631+dnl ------------
4632+dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just
4633+dnl defaulting to yes/no.
4634+dnl
4635+dnl $1 = option name
4636+dnl $2 = help-text
4637+dnl $3 = environment variable to set
4638+dnl $4 = default value, shown in the help-message, must be a constant
4639+dnl $5 = default value, if it's an expression & cannot be in the help-message
4640+dnl
4641+AC_DEFUN([CF_WITH_PATH],
4642+[AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),,
4643+ifelse($4,,[withval="${$3}"],[withval="${$3-ifelse($5,,$4,$5)}"]))dnl
4644+CF_PATH_SYNTAX(withval)
4645+eval $3="$withval"
4646+AC_SUBST($3)dnl
4647+])dnl
4648+dnl ---------------------------------------------------------------------------
4649+dnl CF_WITH_PATHLIST version: 5 updated: 2001/12/10 01:28:30
4650+dnl ----------------
4651+dnl Process an option specifying a list of colon-separated paths.
4652+dnl
4653+dnl $1 = option name
4654+dnl $2 = help-text
4655+dnl $3 = environment variable to set
4656+dnl $4 = default value, shown in the help-message, must be a constant
4657+dnl $5 = default value, if it's an expression & cannot be in the help-message
4658+dnl $6 = flag to tell if we want to define or substitute
4659+dnl
4660+AC_DEFUN([CF_WITH_PATHLIST],[
4661+AC_REQUIRE([CF_PATHSEP])
4662+AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),,
4663+ifelse($4,,[withval=${$3}],[withval=${$3-ifelse($5,,$4,$5)}]))dnl
4664+
4665+IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
4666+cf_dst_path=
4667+for cf_src_path in $withval
4668+do
4669+ CF_PATH_SYNTAX(cf_src_path)
4670+ test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
4671+ cf_dst_path="${cf_dst_path}${cf_src_path}"
4672+done
4673+IFS="$ac_save_ifs"
4674+
4675+ifelse($6,define,[
4676+# Strip single quotes from the value, e.g., when it was supplied as a literal
4677+# for $4 or $5.
4678+case $cf_dst_path in #(vi
4679+\'*)
4680+ cf_dst_path=`echo $cf_dst_path |sed -e s/\'// -e s/\'\$//`
4681+ ;;
4682+esac
4683+cf_dst_path=`echo "$cf_dst_path" | sed -e 's/\\\\/\\\\\\\\/g'`
4684+])
4685+
4686+eval '$3="$cf_dst_path"'
4687+AC_SUBST($3)dnl
4688+
4689+])dnl
4690+dnl ---------------------------------------------------------------------------
4691+dnl CF_WITH_REL_VERSION version: 1 updated: 2003/09/20 18:12:49
4692+dnl -------------------
4693+dnl Allow library's release-version to be overridden. Generally this happens when a
4694+dnl packager has incremented the release-version past that used in the original package,
4695+dnl and wishes to keep doing this.
4696+dnl
4697+dnl $1 is the package name, if any, to derive corresponding {package}_MAJOR
4698+dnl and {package}_MINOR symbols
4699+dnl symbol.
4700+AC_DEFUN([CF_WITH_REL_VERSION],[
4701+test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
4702+AC_ARG_WITH(rel-version,
4703+[ --with-rel-version=XXX override derived release version],
4704+[AC_MSG_WARN(overriding release version $cf_cv_rel_version to $withval)
4705+ cf_cv_rel_version=$withval])
4706+ifelse($1,,[
4707+ CF_NUMBER_SYNTAX($cf_cv_rel_version,Release version)
4708+],[
4709+ $1_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
4710+ $1_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[[^.]]*//' -e 's/^\.//' -e 's/\..*//'`
4711+ CF_NUMBER_SYNTAX([$]$1_MAJOR,Release major-version)
4712+ CF_NUMBER_SYNTAX([$]$1_MINOR,Release minor-version)
4713+])
4714+])dnl
4715+dnl ---------------------------------------------------------------------------
4716+dnl CF_WITH_SYSMOUSE version: 2 updated: 2003/03/22 19:13:43
4717+dnl ----------------
4718+dnl If we can compile with sysmouse, make it available unless it is not wanted.
4719+AC_DEFUN([CF_WITH_SYSMOUSE],[
4720+# not everyone has "test -c"
4721+if test -c /dev/sysmouse 2>/dev/null ; then
4722+AC_MSG_CHECKING(if you want to use sysmouse)
4723+AC_ARG_WITH(sysmouse,
4724+ [ --with-sysmouse use sysmouse (FreeBSD console)],
4725+ [cf_with_sysmouse=$withval],
4726+ [cf_with_sysmouse=maybe])
4727+ if test "$cf_with_sysmouse" != no ; then
4728+ AC_TRY_COMPILE([
4729+#include <osreldate.h>
4730+#if (__FreeBSD_version >= 400017)
4731+#include <sys/consio.h>
4732+#include <sys/fbio.h>
4733+#else
4734+#include <machine/console.h>
4735+#endif
4736+],[
4737+ struct mouse_info the_mouse;
4738+ ioctl(0, CONS_MOUSECTL, &the_mouse);
4739+],[cf_with_sysmouse=yes],[cf_with_sysmouse=no])
4740+ fi
4741+AC_MSG_RESULT($cf_with_sysmouse)
4742+test "$cf_with_sysmouse" = yes && AC_DEFINE(USE_SYSMOUSE)
4743+fi
4744+])dnl
4745+dnl ---------------------------------------------------------------------------
4746+dnl CF_XOPEN_SOURCE version: 11 updated: 2004/01/26 20:58:41
4747+dnl ---------------
4748+dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
4749+dnl or adapt to the vendor's definitions to get equivalent functionality.
4750+AC_DEFUN([CF_XOPEN_SOURCE],[
4751+case $host_os in #(vi
4752+freebsd*) #(vi
4753+ CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600"
4754+ ;;
4755+hpux*) #(vi
4756+ CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
4757+ ;;
4758+irix6.*) #(vi
4759+ CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
4760+ ;;
4761+linux*) #(vi
4762+ CF_GNU_SOURCE
4763+ ;;
4764+mirbsd*) #(vi
4765+ # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
4766+ ;;
4767+netbsd*) #(vi
4768+ # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4769+ ;;
4770+openbsd*) #(vi
4771+ # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4772+ ;;
4773+osf[[45]]*) #(vi
4774+ CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
4775+ ;;
4776+sco*) #(vi
4777+ # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4778+ ;;
4779+solaris*) #(vi
4780+ CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
4781+ ;;
4782+*)
4783+ AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
4784+ AC_TRY_COMPILE([#include <sys/types.h>],[
4785+#ifndef _XOPEN_SOURCE
4786+make an error
4787+#endif],
4788+ [cf_cv_xopen_source=no],
4789+ [cf_save="$CPPFLAGS"
4790+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
4791+ AC_TRY_COMPILE([#include <sys/types.h>],[
4792+#ifdef _XOPEN_SOURCE
4793+make an error
4794+#endif],
4795+ [cf_cv_xopen_source=no],
4796+ [cf_cv_xopen_source=yes])
4797+ CPPFLAGS="$cf_save"
4798+ ])
4799+])
4800+test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
4801+
4802+ # FreeBSD 5.x headers demand this...
4803+ AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_xopen_source,[
4804+ AC_TRY_COMPILE([#include <sys/types.h>],[
4805+#ifndef _POSIX_C_SOURCE
4806+make an error
4807+#endif],
4808+ [cf_cv_xopen_source=no],
4809+ [cf_save="$CPPFLAGS"
4810+ CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
4811+ AC_TRY_COMPILE([#include <sys/types.h>],[
4812+#ifdef _POSIX_C_SOURCE
4813+make an error
4814+#endif],
4815+ [cf_cv_xopen_source=no],
4816+ [cf_cv_xopen_source=yes])
4817+ CPPFLAGS="$cf_save"
4818+ ])
4819+])
4820+test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
4821+ ;;
4822+esac
4823+])
4824--- /dev/null
4825+++ ncurses-5.4/m4/templates.m4
4826@@ -0,0 +1,78 @@
4827+AH_TEMPLATE([BROKEN_LINKER], [too lazy to enter descriptions])
4828+AH_TEMPLATE([BSD_TPUTS], [too lazy to enter descriptions])
4829+AH_TEMPLATE([CC_HAS_INLINE_FUNCS], [too lazy to enter descriptions])
4830+AH_TEMPLATE([CC_HAS_PROTOS], [too lazy to enter descriptions])
4831+AH_TEMPLATE([CPP_HAS_PARAM_INIT], [too lazy to enter descriptions])
4832+AH_TEMPLATE([CPP_HAS_VSCAN_FUNC], [too lazy to enter descriptions])
4833+AH_TEMPLATE([HAVE_BIG_CORE], [too lazy to enter descriptions])
4834+AH_TEMPLATE([HAVE_BSD_CGETENT], [too lazy to enter descriptions])
4835+AH_TEMPLATE([HAVE_BUILTIN_H], [too lazy to enter descriptions])
4836+AH_TEMPLATE([HAVE_CURSES_VERSION], [too lazy to enter descriptions])
4837+AH_TEMPLATE([HAVE_GETTIMEOFDAY], [too lazy to enter descriptions])
4838+AH_TEMPLATE([HAVE_GPP_BUILTIN_H], [too lazy to enter descriptions])
4839+AH_TEMPLATE([HAVE_GXX_BUILTIN_H], [too lazy to enter descriptions])
4840+AH_TEMPLATE([HAVE_HAS_KEY], [too lazy to enter descriptions])
4841+AH_TEMPLATE([HAVE_ISASCII], [too lazy to enter descriptions])
4842+AH_TEMPLATE([HAVE_LIBGPM], [too lazy to enter descriptions])
4843+AH_TEMPLATE([HAVE_LIBUTF8_H], [too lazy to enter descriptions])
4844+AH_TEMPLATE([HAVE_MKSTEMP], [too lazy to enter descriptions])
4845+AH_TEMPLATE([HAVE_NC_ALLOC_H], [too lazy to enter descriptions])
4846+AH_TEMPLATE([HAVE_REGEXPR_H_FUNCS], [too lazy to enter descriptions])
4847+AH_TEMPLATE([HAVE_REGEXP_H_FUNCS], [too lazy to enter descriptions])
4848+AH_TEMPLATE([HAVE_REGEX_H_FUNCS], [too lazy to enter descriptions])
4849+AH_TEMPLATE([HAVE_RESIZETERM], [too lazy to enter descriptions])
4850+AH_TEMPLATE([HAVE_RESIZE_TERM], [too lazy to enter descriptions])
4851+AH_TEMPLATE([HAVE_SIZECHANGE], [too lazy to enter descriptions])
4852+AH_TEMPLATE([HAVE_SLK_COLOR], [too lazy to enter descriptions])
4853+AH_TEMPLATE([HAVE_SYS_TIME_SELECT], [too lazy to enter descriptions])
4854+AH_TEMPLATE([HAVE_TCGETATTR], [too lazy to enter descriptions])
4855+AH_TEMPLATE([HAVE_TYPE_SIGACTION], [too lazy to enter descriptions])
4856+AH_TEMPLATE([HAVE_USE_DEFAULT_COLORS], [too lazy to enter descriptions])
4857+AH_TEMPLATE([HAVE_VFSCANF], [too lazy to enter descriptions])
4858+AH_TEMPLATE([HAVE_VSSCANF], [too lazy to enter descriptions])
4859+AH_TEMPLATE([HAVE_WORKING_POLL], [too lazy to enter descriptions])
4860+AH_TEMPLATE([HAVE_WRESIZE], [too lazy to enter descriptions])
4861+AH_TEMPLATE([HAVE__DOSCAN], [too lazy to enter descriptions])
4862+AH_TEMPLATE([MIXEDCASE_FILENAMES], [too lazy to enter descriptions])
4863+AH_TEMPLATE([NCURSES_EXPANDED], [too lazy to enter descriptions])
4864+AH_TEMPLATE([NCURSES_EXT_FUNCS], [too lazy to enter descriptions])
4865+AH_TEMPLATE([NCURSES_NOMACROS], [too lazy to enter descriptions])
4866+AH_TEMPLATE([NCURSES_NO_PADDING], [too lazy to enter descriptions])
4867+AH_TEMPLATE([NCURSES_PATHSEP], [too lazy to enter descriptions])
4868+AH_TEMPLATE([NCURSES_VERSION_STRING], [too lazy to enter descriptions])
4869+AH_TEMPLATE([NDEBUG], [too lazy to enter descriptions])
4870+AH_TEMPLATE([NEED_WCHAR_H], [too lazy to enter descriptions])
4871+AH_TEMPLATE([NO_LEAKS], [too lazy to enter descriptions])
4872+AH_TEMPLATE([PROG_EXT], [too lazy to enter descriptions])
4873+AH_TEMPLATE([PURE_TERMINFO], [too lazy to enter descriptions])
4874+AH_TEMPLATE([SVR4_ACTION], [too lazy to enter descriptions])
4875+AH_TEMPLATE([SVR4_TERMIO], [too lazy to enter descriptions])
4876+AH_TEMPLATE([SYSTEM_NAME], [too lazy to enter descriptions])
4877+AH_TEMPLATE([TERMINFO], [too lazy to enter descriptions])
4878+AH_TEMPLATE([TERMINFO_DIRS], [too lazy to enter descriptions])
4879+AH_TEMPLATE([TERMPATH], [too lazy to enter descriptions])
4880+AH_TEMPLATE([TYPEOF_CHTYPE], [too lazy to enter descriptions])
4881+AH_TEMPLATE([USE_ASSUMED_COLOR], [too lazy to enter descriptions])
4882+AH_TEMPLATE([USE_COLORFGBG], [too lazy to enter descriptions])
4883+AH_TEMPLATE([USE_DATABASE], [too lazy to enter descriptions])
4884+AH_TEMPLATE([USE_GETCAP], [too lazy to enter descriptions])
4885+AH_TEMPLATE([USE_GETCAP_CACHE], [too lazy to enter descriptions])
4886+AH_TEMPLATE([USE_HARD_TABS], [too lazy to enter descriptions])
4887+AH_TEMPLATE([USE_HASHMAP], [too lazy to enter descriptions])
4888+AH_TEMPLATE([USE_HOME_TERMINFO], [too lazy to enter descriptions])
4889+AH_TEMPLATE([USE_LINKS], [too lazy to enter descriptions])
4890+AH_TEMPLATE([USE_MY_MEMMOVE], [too lazy to enter descriptions])
4891+AH_TEMPLATE([USE_OK_BCOPY], [too lazy to enter descriptions])
4892+AH_TEMPLATE([USE_RCS_IDS], [too lazy to enter descriptions])
4893+AH_TEMPLATE([USE_ROOT_ENVIRON], [too lazy to enter descriptions])
4894+AH_TEMPLATE([USE_SAFE_SPRINTF], [too lazy to enter descriptions])
4895+AH_TEMPLATE([USE_SCROLL_HINTS], [too lazy to enter descriptions])
4896+AH_TEMPLATE([USE_SIGWINCH], [too lazy to enter descriptions])
4897+AH_TEMPLATE([USE_STDIO_VSCAN], [too lazy to enter descriptions])
4898+AH_TEMPLATE([USE_STRSTREAM_VSCAN], [too lazy to enter descriptions])
4899+AH_TEMPLATE([USE_STRSTREAM_VSCAN_CAST], [too lazy to enter descriptions])
4900+AH_TEMPLATE([USE_SYMLINKS], [too lazy to enter descriptions])
4901+AH_TEMPLATE([USE_SYSMOUSE], [too lazy to enter descriptions])
4902+AH_TEMPLATE([USE_TERMCAP], [too lazy to enter descriptions])
4903+AH_TEMPLATE([USE_WIDEC_SUPPORT], [too lazy to enter descriptions])
4904+AH_TEMPLATE([USE_XMC_SUPPORT], [too lazy to enter descriptions])
diff --git a/meta/packages/ncurses/ncurses_5.4.bb b/meta/packages/ncurses/ncurses_5.4.bb
deleted file mode 100644
index e69c1c0673..0000000000
--- a/meta/packages/ncurses/ncurses_5.4.bb
+++ /dev/null
@@ -1,8 +0,0 @@
1PR = "r14"
2
3SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz \
4 file://makefile_tweak.patch;patch=1 \
5 file://visibility.patch;patch=1"
6S = "${WORKDIR}/ncurses-${PV}"
7
8require ncurses.inc
diff --git a/meta/packages/neon/neon-0.29.3/pkgconfig.patch b/meta/packages/neon/neon-0.29.3/pkgconfig.patch
deleted file mode 100644
index 6256d9ab2b..0000000000
--- a/meta/packages/neon/neon-0.29.3/pkgconfig.patch
+++ /dev/null
@@ -1,16 +0,0 @@
1---
2 neon.pc.in | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5--- neon-0.28.1.orig/neon.pc.in
6+++ neon-0.28.1/neon.pc.in
7@@ -4,8 +4,8 @@ libdir=@libdir@
8 includedir=@includedir@
9
10 Name: neon
11 Description: HTTP/WebDAV client library
12 Version: @NEON_VERSION@
13-Libs.private: @NEON_LIBS@
14+Libs.private: -L${libdir} -lz -lgcrypt -lgpg-error -lexpat -lgnutls
15 Libs: -L${libdir} -lneon @NEON_PC_LIBS@
16 Cflags: -I${includedir}/neon @NEON_CFLAGS@
diff --git a/meta/packages/neon/neon_0.29.3.bb b/meta/packages/neon/neon_0.29.3.bb
deleted file mode 100644
index bb18893f9e..0000000000
--- a/meta/packages/neon/neon_0.29.3.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "neon is an HTTP and WebDAV client library, with a C interface."
2HOMEPAGE = "http://www.webdav.org/neon/"
3SECTION = "libs"
4LICENSE = "LGPLv2+"
5LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
6 file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
7DEPENDS = "zlib libxml2 expat time gnutls"
8
9PR = "r0"
10
11SRC_URI = "http://www.webdav.org/${PN}/${P}.tar.gz \
12 file://pkgconfig.patch;patch=1"
13
14inherit autotools binconfig lib_package pkgconfig
15
16EXTRA_OECONF = "--with-ssl=gnutls --with-libxml2 --with-expat --enable-shared"
diff --git a/meta/packages/network-suspend-scripts/network-suspend-scripts.bb b/meta/packages/network-suspend-scripts/network-suspend-scripts.bb
deleted file mode 100644
index dc22ed85f6..0000000000
--- a/meta/packages/network-suspend-scripts/network-suspend-scripts.bb
+++ /dev/null
@@ -1,22 +0,0 @@
1DESCRIPTION = "Network suspend/resume scripts"
2SECTION = "base"
3LICENSE = "GPLv2"
4PV = "1.1"
5PR = "r2"
6
7SRC_URI = "file://ifupdown \
8 file://usbnet"
9
10do_install() {
11 install -d ${D}${sysconfdir}/apm/scripts.d
12 install -m 0755 ${WORKDIR}/ifupdown ${D}${sysconfdir}/apm/scripts.d
13 install -m 0755 ${WORKDIR}/usbnet ${D}${sysconfdir}/apm/scripts.d
14 install -d ${D}${sysconfdir}/apm/suspend.d
15 ln -s ../scripts.d/ifupdown ${D}${sysconfdir}/apm/suspend.d/05ifupdown
16 ln -s ../scripts.d/usbnet ${D}${sysconfdir}/apm/suspend.d/10usbnet
17 install -d ${D}${sysconfdir}/apm/resume.d
18 ln -sf ../scripts.d/ifupdown ${D}${sysconfdir}/apm/resume.d/30ifupdown
19 ln -sf ../scripts.d/usbnet ${D}${sysconfdir}/apm/resume.d/20usbnet
20}
21
22FILES = "${sysconfdir}/apm"
diff --git a/meta/packages/network-suspend-scripts/network-suspend-scripts/ifupdown b/meta/packages/network-suspend-scripts/network-suspend-scripts/ifupdown
deleted file mode 100644
index d458da6866..0000000000
--- a/meta/packages/network-suspend-scripts/network-suspend-scripts/ifupdown
+++ /dev/null
@@ -1,26 +0,0 @@
1#!/bin/sh
2# Unloads/loads all interface that are up at time of suspend
3
4if [ "$1" = suspend ]; then
5 rm -f /var/run/ifstate-suspend
6 rm -f /var/run/ifstate-old
7 cp /var/run/ifstate /var/run/ifstate-old
8 cat /var/run/ifstate-old | (
9 IFS="="
10 while read IFACE LOGICAL; do
11 ifdown $IFACE
12 echo "$IFACE=$LOGICAL" >>/var/run/ifstate-suspend
13 done
14 rm -f /var/run/ifstate-old
15 )
16elif [ "$1" = resume ] && [ "$2" != standby ] && [ -f /var/run/ifstate-suspend ]; then
17 cat /var/run/ifstate-suspend | (
18 while read LINE; do
19 ifup $LINE
20 done
21 )
22 rm -f /var/run/ifstate-suspend
23fi
24
25: exit 0
26
diff --git a/meta/packages/network-suspend-scripts/network-suspend-scripts/usbnet b/meta/packages/network-suspend-scripts/network-suspend-scripts/usbnet
deleted file mode 100644
index 3731f6339f..0000000000
--- a/meta/packages/network-suspend-scripts/network-suspend-scripts/usbnet
+++ /dev/null
@@ -1,16 +0,0 @@
1#!/bin/sh
2# Unloads/loads usb-eth so it always works
3
4. /etc/default/usbd
5
6if [ "$1" = suspend ]; then
7 rmmod usb-eth
8 rmmod sa1100usb_core
9elif [ "$1" = resume ] && [ "$2" != standby ]; then
10 modprobe usb-eth
11 modprobe -r $usbdmodule
12 modprobe $usbdmodule
13fi
14
15: exit 0
16
diff --git a/meta/packages/networkmanager/files/70NetworkManagerApplet.shbg b/meta/packages/networkmanager/files/70NetworkManagerApplet.shbg
deleted file mode 100644
index 8858b3e7c2..0000000000
--- a/meta/packages/networkmanager/files/70NetworkManagerApplet.shbg
+++ /dev/null
@@ -1,4 +0,0 @@
1#!/bin/sh
2# Wait for the desktop to say its finished loading
3dbus-wait org.matchbox_project.desktop Loaded
4exec /usr/bin/nm-applet
diff --git a/meta/packages/networkmanager/files/99_networkmanager b/meta/packages/networkmanager/files/99_networkmanager
deleted file mode 100644
index 20cbcc1bca..0000000000
--- a/meta/packages/networkmanager/files/99_networkmanager
+++ /dev/null
@@ -1 +0,0 @@
1d root root 0700 /var/run/NetworkManager none
diff --git a/meta/packages/networkmanager/files/NetworkManager b/meta/packages/networkmanager/files/NetworkManager
deleted file mode 100644
index 4522e0107b..0000000000
--- a/meta/packages/networkmanager/files/NetworkManager
+++ /dev/null
@@ -1,43 +0,0 @@
1#!/bin/sh
2#
3### BEGIN INIT INFO
4# Provides: NetworkManager
5# Required-Start: $remote_fs dbus hal
6# Required-Stop: $remote_fs dbus hal
7# Should-Start: $syslog
8# Should-Stop: $syslog
9# Default-Start: 2 3 4 5
10# Default-Stop: 0 1 6
11# Short-Description: network connection manager
12# Description: Daemon for automatically switching network
13# connections to the best available connection.
14### END INIT INFO
15
16. /etc/profile
17
18case $1 in
19 'start')
20 echo -n "Starting NetworkManager daemon: NetworkManager"
21 /usr/sbin/NetworkManager
22 /usr/sbin/NetworkManagerDispatcher
23 /usr/sbin/wpa_supplicant -u &
24 echo "."
25 ;;
26
27 'stop')
28 echo -n "Stopping NetworkManager daemon: NetworkManager"
29 kill `ps |grep /usr/sbin/NetworkManagerDispatcher | grep -v grep | cut "-d " -f2`
30 kill `ps |grep /usr/sbin/NetworkManager | grep -v grep | cut "-d " -f2`
31 kill `ps |grep /usr/sbin/wpa_supplicant | grep -v grep | cut "-d " -f2`
32 echo "."
33 ;;
34
35 'restart')
36 $0 stop
37 $0 start
38 ;;
39
40 *)
41 echo "Usage: $0 { start | stop | restart }"
42 ;;
43esac
diff --git a/meta/packages/networkmanager/files/allow-disabling.patch b/meta/packages/networkmanager/files/allow-disabling.patch
deleted file mode 100644
index 10730e9fe5..0000000000
--- a/meta/packages/networkmanager/files/allow-disabling.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1Allow interfaces to be ignored by networkmanager by creation of a
2/etc/network/nm-disabled-INTERFACENAME file.
3
4RP - 16/7/2008
5
6Index: trunk/src/backends/NetworkManagerDebian.c
7===================================================================
8--- trunk.orig/src/backends/NetworkManagerDebian.c 2008-07-15 19:23:11.000000000 +0100
9+++ trunk/src/backends/NetworkManagerDebian.c 2008-07-15 19:37:05.000000000 +0100
10@@ -29,6 +29,7 @@
11
12 #include <stdio.h>
13 #include <sys/types.h>
14+#include <sys/stat.h>
15 #include <signal.h>
16 #include <arpa/inet.h>
17 #include "NetworkManagerGeneric.h"
18@@ -374,12 +375,25 @@
19 /*
20 * nm_system_device_get_disabled
21 *
22- * Return whether the distro-specific system config tells us to use
23- * dhcp for this device.
24+ * Return whether the distro-specific system config tells us to interact
25+ * with this device.
26 *
27 */
28 gboolean nm_system_device_get_disabled (NMDevice *dev)
29 {
30+ struct stat statbuf;
31+ gchar *filepath;
32+
33+ g_return_val_if_fail (dev != NULL, FALSE);
34+
35+ filepath = g_strdup_printf (SYSCONFDIR"/network/nm-disabled-%s", nm_device_get_iface (dev));
36+
37+ if (stat(filepath, &statbuf) == 0) {
38+ g_free(filepath);
39+ return TRUE;
40+ }
41+
42+ g_free(filepath);
43 return FALSE;
44 }
45
diff --git a/meta/packages/networkmanager/files/applet-no-animation.patch b/meta/packages/networkmanager/files/applet-no-animation.patch
deleted file mode 100644
index d437fd0fc9..0000000000
--- a/meta/packages/networkmanager/files/applet-no-animation.patch
+++ /dev/null
@@ -1,234 +0,0 @@
1Index: trunk/src/applet.c
2===================================================================
3--- trunk.orig/src/applet.c 2008-02-06 20:30:04.000000000 +0000
4+++ trunk/src/applet.c 2008-02-06 20:46:59.000000000 +0000
5@@ -111,8 +111,6 @@
6
7 static void nma_init (NMApplet *applet)
8 {
9- applet->animation_id = 0;
10- applet->animation_step = 0;
11 applet->passphrase_dialog = NULL;
12 applet->icon_theme = NULL;
13 #ifdef ENABLE_NOTIFY
14@@ -1006,20 +1004,6 @@
15 }
16 }
17
18-static gboolean
19-vpn_animation_timeout (gpointer data)
20-{
21- NMApplet *applet = NM_APPLET (data);
22-
23- foo_set_icon (applet, applet->vpn_connecting_icons[applet->animation_step], ICON_LAYER_VPN);
24-
25- applet->animation_step++;
26- if (applet->animation_step >= NUM_VPN_CONNECTING_FRAMES)
27- applet->animation_step = 0;
28-
29- return TRUE;
30-}
31-
32 static void
33 vpn_connection_state_changed (NMVPNConnection *connection,
34 NMVPNConnectionState state,
35@@ -1030,10 +1014,6 @@
36
37 switch (state) {
38 case NM_VPN_CONNECTION_STATE_ACTIVATED:
39- if (applet->animation_id) {
40- g_source_remove (applet->animation_id);
41- applet->animation_id = 0;
42- }
43 foo_set_icon (applet, applet->vpn_lock_icon, ICON_LAYER_VPN);
44 // vpn_connection_info_set_last_attempt_success (info, TRUE);
45 break;
46@@ -1041,10 +1021,7 @@
47 case NM_VPN_CONNECTION_STATE_NEED_AUTH:
48 case NM_VPN_CONNECTION_STATE_CONNECT:
49 case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET:
50- if (applet->animation_id == 0) {
51- applet->animation_step = 0;
52- applet->animation_id = g_timeout_add (100, vpn_animation_timeout, applet);
53- }
54+ foo_set_icon (applet, applet->network_connecting_icon, ICON_LAYER_VPN);
55 break;
56 case NM_VPN_CONNECTION_STATE_FAILED:
57 // vpn_connection_info_set_last_attempt_success (info, FALSE);
58@@ -1053,10 +1030,6 @@
59 g_hash_table_remove (applet->vpn_connections, nm_vpn_connection_get_name (connection));
60 /* Fall through */
61 default:
62- if (applet->animation_id) {
63- g_source_remove (applet->animation_id);
64- applet->animation_id = 0;
65- }
66 foo_set_icon (applet, NULL, ICON_LAYER_VPN);
67 break;
68 }
69@@ -2295,45 +2268,6 @@
70 } FooAnimationTimeoutInfo;
71
72 static void
73-foo_animation_timeout_info_destroy (gpointer data)
74-{
75- g_slice_free (FooAnimationTimeoutInfo, data);
76-}
77-
78-static gboolean
79-foo_animation_timeout (gpointer data)
80-{
81- FooAnimationTimeoutInfo *info = (FooAnimationTimeoutInfo *) data;
82- NMApplet *applet = info->applet;
83- int stage = -1;
84-
85- switch (info->state) {
86- case NM_DEVICE_STATE_PREPARE:
87- stage = 0;
88- break;
89- case NM_DEVICE_STATE_CONFIG:
90- stage = 1;
91- break;
92- case NM_DEVICE_STATE_IP_CONFIG:
93- stage = 2;
94- break;
95- default:
96- break;
97- }
98-
99- if (stage >= 0)
100- foo_set_icon (applet,
101- applet->network_connecting_icons[stage][applet->animation_step],
102- ICON_LAYER_LINK);
103-
104- applet->animation_step++;
105- if (applet->animation_step >= NUM_CONNECTING_FRAMES)
106- applet->animation_step = 0;
107-
108- return TRUE;
109-}
110-
111-static void
112 foo_common_state_change (NMDevice *device, NMDeviceState state, NMApplet *applet)
113 {
114 FooAnimationTimeoutInfo *info;
115@@ -2345,11 +2279,7 @@
116 info = g_slice_new (FooAnimationTimeoutInfo);
117 info->applet = applet;
118 info->state = state;
119- applet->animation_step = 0;
120- applet->animation_id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
121- 100, foo_animation_timeout,
122- info,
123- foo_animation_timeout_info_destroy);
124+ foo_set_icon (applet, applet->network_connecting_icon, ICON_LAYER_LINK);
125 break;
126 case NM_DEVICE_STATE_ACTIVATED:
127 break;
128@@ -2602,12 +2532,6 @@
129 NMApplet *applet = NM_APPLET (user_data);
130 gboolean handled = FALSE;
131
132- applet->animation_step = 0;
133- if (applet->animation_id) {
134- g_source_remove (applet->animation_id);
135- applet->animation_id = 0;
136- }
137-
138 clear_active_connections (applet);
139 applet->active_connections = nm_client_get_active_connections (applet->nm_client);
140
141@@ -3166,17 +3090,8 @@
142 if (applet->wireless_100_icon)
143 g_object_unref (applet->wireless_100_icon);
144
145- for (i = 0; i < NUM_CONNECTING_STAGES; i++) {
146- int j;
147-
148- for (j = 0; j < NUM_CONNECTING_FRAMES; j++)
149- if (applet->network_connecting_icons[i][j])
150- g_object_unref (applet->network_connecting_icons[i][j]);
151- }
152-
153- for (i = 0; i < NUM_VPN_CONNECTING_FRAMES; i++)
154- if (applet->vpn_connecting_icons[i])
155- g_object_unref (applet->vpn_connecting_icons[i]);
156+ if (applet->network_connecting_icon)
157+ g_object_unref (applet->network_connecting_icon);
158
159 nma_icons_zero (applet);
160 }
161@@ -3196,16 +3111,7 @@
162 applet->wireless_75_icon = NULL;
163 applet->wireless_100_icon = NULL;
164
165- for (i = 0; i < NUM_CONNECTING_STAGES; i++)
166- {
167- int j;
168-
169- for (j = 0; j < NUM_CONNECTING_FRAMES; j++)
170- applet->network_connecting_icons[i][j] = NULL;
171- }
172-
173- for (i = 0; i < NUM_VPN_CONNECTING_FRAMES; i++)
174- applet->vpn_connecting_icons[i] = NULL;
175+ applet->network_connecting_icon = NULL;
176
177 applet->icons_loaded = FALSE;
178 }
179@@ -3257,28 +3163,7 @@
180 ICON_LOAD(applet->wireless_75_icon, "nm-signal-75");
181 ICON_LOAD(applet->wireless_100_icon, "nm-signal-100");
182
183- for (i = 0; i < NUM_CONNECTING_STAGES; i++)
184- {
185- int j;
186-
187- for (j = 0; j < NUM_CONNECTING_FRAMES; j++)
188- {
189- char *name;
190-
191- name = g_strdup_printf ("nm-stage%02d-connecting%02d", i+1, j+1);
192- ICON_LOAD(applet->network_connecting_icons[i][j], name);
193- g_free (name);
194- }
195- }
196-
197- for (i = 0; i < NUM_VPN_CONNECTING_FRAMES; i++)
198- {
199- char *name;
200-
201- name = g_strdup_printf ("nm-vpn-connecting%02d", i+1);
202- ICON_LOAD(applet->vpn_connecting_icons[i], name);
203- g_free (name);
204- }
205+ ICON_LOAD(applet->network_connecting_icon, "nm-connecting");
206
207 success = TRUE;
208
209Index: trunk/src/applet.h
210===================================================================
211--- trunk.orig/src/applet.h 2008-02-06 20:30:06.000000000 +0000
212+++ trunk/src/applet.h 2008-02-06 20:46:05.000000000 +0000
213@@ -111,20 +111,12 @@
214 GdkPixbuf * wireless_50_icon;
215 GdkPixbuf * wireless_75_icon;
216 GdkPixbuf * wireless_100_icon;
217-#define NUM_CONNECTING_STAGES 3
218-#define NUM_CONNECTING_FRAMES 11
219- GdkPixbuf * network_connecting_icons[NUM_CONNECTING_STAGES][NUM_CONNECTING_FRAMES];
220-#define NUM_VPN_CONNECTING_FRAMES 14
221- GdkPixbuf * vpn_connecting_icons[NUM_VPN_CONNECTING_FRAMES];
222+ GdkPixbuf * network_connecting_icon;
223 GdkPixbuf * vpn_lock_icon;
224
225 /* Active status icon pixbufs */
226 GdkPixbuf * icon_layers[ICON_LAYER_MAX + 1];
227
228- /* Animation stuff */
229- int animation_step;
230- guint animation_id;
231-
232 /* Direct UI elements */
233 #ifdef HAVE_STATUS_ICON
234 GtkStatusIcon * status_icon;
diff --git a/meta/packages/networkmanager/files/applet-no-gnome.diff b/meta/packages/networkmanager/files/applet-no-gnome.diff
deleted file mode 100644
index e098e8c9ed..0000000000
--- a/meta/packages/networkmanager/files/applet-no-gnome.diff
+++ /dev/null
@@ -1,59 +0,0 @@
1---
2 configure.ac | 3 +--
3 src/main.c | 8 ++++++++
4 2 files changed, 9 insertions(+), 2 deletions(-)
5
6Index: src/main.c
7===================================================================
8--- src/main.c.orig 2007-09-26 10:39:16.000000000 +0100
9+++ src/main.c 2007-09-26 10:39:37.000000000 +0100
10@@ -27,7 +27,9 @@
11
12 #include <string.h>
13 #include <gtk/gtk.h>
14+#if 0
15 #include <libgnomeui/libgnomeui.h>
16+#endif
17 #include <glib/gi18n-lib.h>
18
19 #include "applet.h"
20@@ -36,11 +38,15 @@
21 int main (int argc, char *argv[])
22 {
23 NMApplet * applet;
24+#if 0
25 GnomeProgram * program;
26
27 program = gnome_program_init ("nm-applet", VERSION, LIBGNOMEUI_MODULE,
28 argc, argv,
29 GNOME_PARAM_NONE, GNOME_PARAM_NONE);
30+#else
31+ gtk_init (&argc, &argv);
32+#endif
33
34 bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
35 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
36@@ -53,7 +59,9 @@ int main (int argc, char *argv[])
37 gtk_main ();
38
39 g_object_unref (applet);
40+#if 0
41 g_object_unref (program);
42+#endif
43
44 exit (0);
45 }
46Index: configure.ac
47===================================================================
48--- configure.ac.orig 2007-09-26 10:39:30.000000000 +0100
49+++ configure.ac 2007-09-26 10:39:37.000000000 +0100
50@@ -65,8 +65,7 @@ PKG_CHECK_MODULES(NMA,
51 gtk+-2.0 >= 2.6
52 libglade-2.0
53 gconf-2.0
54- gnome-keyring-1
55- libgnomeui-2.0])
56+ gnome-keyring-1])
57
58 ##### Find out the version of DBUS we're using
59 dbus_version=`pkg-config --modversion dbus-1`
diff --git a/meta/packages/networkmanager/files/libnlfix.patch b/meta/packages/networkmanager/files/libnlfix.patch
deleted file mode 100644
index 69f4922ea0..0000000000
--- a/meta/packages/networkmanager/files/libnlfix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1Index: trunk/src/nm-netlink.c
2===================================================================
3--- trunk.orig/src/nm-netlink.c 2007-09-25 22:37:50.000000000 +0100
4+++ trunk/src/nm-netlink.c 2009-05-16 12:44:26.000000000 +0100
5@@ -52,16 +52,20 @@
6 struct nl_handle *
7 nm_netlink_get_default_handle (void)
8 {
9+ struct nl_cb *cb;
10+
11 if (def_nl_handle)
12 return def_nl_handle;
13
14- def_nl_handle = nl_handle_alloc_nondefault (NL_CB_VERBOSE);
15- g_assert (def_nl_handle);
16+ cb = nl_cb_alloc(NL_CB_VERBOSE);
17+ def_nl_handle = nl_handle_alloc_cb (cb);
18+ if (!def_nl_handle) {
19+ nm_warning ("couldn't allocate netlink handle.");
20+ return NULL;
21+ }
22
23- nl_handle_set_pid (def_nl_handle, (pthread_self () << 16 | getpid ()));
24 if (nl_connect (def_nl_handle, NETLINK_ROUTE) < 0) {
25 nm_error ("couldn't connect to netlink: %s", nl_geterror ());
26- nl_handle_destroy (def_nl_handle);
27 return NULL;
28 }
29
diff --git a/meta/packages/networkmanager/files/makefile-fix.patch b/meta/packages/networkmanager/files/makefile-fix.patch
deleted file mode 100644
index 5fbbf3a74a..0000000000
--- a/meta/packages/networkmanager/files/makefile-fix.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1This line causes libtool to try and create a program which fails since there is no
2main(). This is hidden with libtool 1.5.10 but appears with 2.2.2.
3
4RP - 14/4/08
5
6Index: trunk/src/ppp-manager/Makefile.am
7===================================================================
8--- trunk.orig/src/ppp-manager/Makefile.am 2008-04-14 23:00:54.000000000 +0100
9+++ trunk/src/ppp-manager/Makefile.am 2008-04-14 23:01:24.000000000 +0100
10@@ -25,7 +25,6 @@
11 $(top_builddir)/src/marshallers/libmarshallers.la
12
13 nm_pppd_plugindir = $(libdir)
14-nm_pppd_plugin_PROGRAMS = nm-pppd-plugin.so
15
16 nm_pppd_plugin_so_SOURCES = \
17 nm-pppd-plugin.c \
diff --git a/meta/packages/networkmanager/files/nmutil-fix.patch b/meta/packages/networkmanager/files/nmutil-fix.patch
deleted file mode 100644
index d8495bac40..0000000000
--- a/meta/packages/networkmanager/files/nmutil-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: trunk/configure.ac
2===================================================================
3--- trunk.orig/configure.ac 2009-01-08 10:49:26.000000000 -0600
4+++ trunk/configure.ac 2009-01-08 12:00:34.000000000 -0600
5@@ -62,6 +62,7 @@
6 glib-2.0 >= 2.10
7 NetworkManager >= 0.7.0
8 libnm_glib
9+ libnm-util
10 gtk+-2.0 >= 2.6
11 libglade-2.0
12 gconf-2.0
diff --git a/meta/packages/networkmanager/files/no-restarts.diff b/meta/packages/networkmanager/files/no-restarts.diff
deleted file mode 100644
index 20bdf82aab..0000000000
--- a/meta/packages/networkmanager/files/no-restarts.diff
+++ /dev/null
@@ -1,21 +0,0 @@
1Index: src/backends/NetworkManagerDebian.c
2===================================================================
3--- src/backends/NetworkManagerDebian.c (revision 2881)
4+++ src/backends/NetworkManagerDebian.c (working copy)
5@@ -204,8 +204,6 @@
6 */
7 void nm_system_update_dns (void)
8 {
9- nm_spawn_process ("/usr/sbin/invoke-rc.d nscd restart");
10-
11 }
12
13
14@@ -218,7 +216,6 @@
15 */
16 void nm_system_restart_mdns_responder (void)
17 {
18- nm_spawn_process ("/usr/bin/killall -q -USR1 mDNSResponder");
19 }
20
21
diff --git a/meta/packages/networkmanager/files/no_vpn.patch b/meta/packages/networkmanager/files/no_vpn.patch
deleted file mode 100644
index 49423e879f..0000000000
--- a/meta/packages/networkmanager/files/no_vpn.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: trunk/src/applet.c
2===================================================================
3--- trunk.orig/src/applet.c 2008-02-29 17:47:39.000000000 +0000
4+++ trunk/src/applet.c 2008-02-29 17:48:38.000000000 +0000
5@@ -1783,7 +1783,7 @@
6 }
7
8 nma_menu_add_devices (menu, applet);
9- nma_menu_add_vpn_submenu (menu, applet);
10+ //nma_menu_add_vpn_submenu (menu, applet);
11
12 gtk_widget_show_all (applet->menu);
13
diff --git a/meta/packages/networkmanager/networkmanager-applet_svn.bb b/meta/packages/networkmanager/networkmanager-applet_svn.bb
deleted file mode 100644
index 1f0987011f..0000000000
--- a/meta/packages/networkmanager/networkmanager-applet_svn.bb
+++ /dev/null
@@ -1,33 +0,0 @@
1DESCRIPTION = "GTK+ applet for NetworkManager"
2HOMEPAGE = "http://projects.gnome.org/NetworkManager/"
3BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=NetworkManager&content="
4LICENSE = "GPLv2+ & LGPLv2.1+"
5DEPENDS = "networkmanager dbus-glib libglade gconf gnome-keyring"
6#TODO DEPENDS libnotify
7RDEPENDS = "networkmanager dbus-wait"
8PR = "r7"
9
10inherit gnome gtk-icon-cache
11
12SRC_URI = "svn://svn.gnome.org/svn/network-manager-applet/;module=trunk;proto=http \
13 file://applet-no-gnome.diff;patch=1;pnum=0 \
14 file://applet-no-animation.patch;patch=1 \
15 file://no_vpn.patch;patch=1 \
16 file://nmutil-fix.patch;patch=1 \
17 file://70NetworkManagerApplet.shbg"
18
19PV = "0.0+svnr${SRCREV}"
20
21S = "${WORKDIR}/trunk"
22
23FILES_${PN} += "${datadir}/nm-applet/ \
24 ${datadir}/gnome-vpn-properties/ \
25 ${datadir}/gnome/autostart/"
26
27do_install_append () {
28 install -d ${D}${sysconfdir}/X11/Xsession.d/
29 install -m 755 ${WORKDIR}/70NetworkManagerApplet.shbg ${D}${sysconfdir}/X11/Xsession.d/
30}
31
32#TODO: remove if libnotify in DEPENDS
33EXTRA_OECONF += "--without-libnotify"
diff --git a/meta/packages/networkmanager/networkmanager_svn.bb b/meta/packages/networkmanager/networkmanager_svn.bb
deleted file mode 100644
index 40f04e497c..0000000000
--- a/meta/packages/networkmanager/networkmanager_svn.bb
+++ /dev/null
@@ -1,51 +0,0 @@
1DESCRIPTION = "NetworkManager"
2HOMEPAGE = "http://projects.gnome.org/NetworkManager/"
3BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=NetworkManager&content="
4SECTION = "net/misc"
5LICENSE = "GPLv2+ & LGPLv2+"
6PRIORITY = "optional"
7DEPENDS = "libnl dbus dbus-glib hal gconf-dbus wireless-tools ppp gnome-common polkit"
8RDEPENDS = "hal wpa-supplicant iproute2 dhcp-client"
9
10PV = "0.7+svnr${SRCREV}"
11PR = "r10"
12
13SRC_URI="svn://svn.gnome.org/svn/NetworkManager/;module=trunk;proto=http \
14 file://no-restarts.diff;patch=1;pnum=0 \
15 file://libnlfix.patch;patch=1 \
16 file://makefile-fix.patch;patch=1 \
17 file://allow-disabling.patch;patch=1 \
18 file://NetworkManager \
19 file://99_networkmanager"
20
21EXTRA_OECONF = "--with-distro=debian \
22 --with-ip=/sbin/ip"
23# TODO: will /bin/ip from busybox do?
24
25S = "${WORKDIR}/trunk"
26
27inherit autotools pkgconfig update-rc.d
28
29INITSCRIPT_NAME = "NetworkManager"
30INITSCRIPT_PARAMS = "defaults 22"
31
32do_install_append () {
33 install -d ${D}/etc/default/volatiles
34 install -m 0644 ${WORKDIR}/99_networkmanager ${D}/etc/default/volatiles
35 # This overwrites the provided init script
36 install -m 0755 ${WORKDIR}/NetworkManager ${D}/etc/init.d/
37 rmdir ${D}/var/run/NetworkManager
38 rmdir ${D}/var/run
39}
40
41PACKAGES =+ "libnmutil libnmglib"
42
43FILES_libnmutil += "${libdir}/libnm-util.so.*"
44
45FILES_libnmglib += "${libdir}/libnm_glib.so.*"
46
47FILES_${PN}-dev = "${includedir}/* \
48 ${libdir}/*.so \
49 ${libdir}/*.a \
50 ${libdir}/pkgconfig/*.pc \
51 ${datadir}/NetworkManager/gdb-cmd"
diff --git a/meta/packages/nfs-utils/libnfsidmap_0.23.bb b/meta/packages/nfs-utils/libnfsidmap_0.23.bb
deleted file mode 100644
index c6b02fe19a..0000000000
--- a/meta/packages/nfs-utils/libnfsidmap_0.23.bb
+++ /dev/null
@@ -1,13 +0,0 @@
1DESCRIPTION = "nfs idmapping library"
2HOMEPAGE = "http://www.citi.umich.edu/projects/nfsv4/linux/"
3SECTION = "libs"
4
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d9c6a2a0ca6017fda7cd905ed2739b37"
7PR = "r0"
8
9SRC_URI = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/${BPN}-${PV}.tar.gz"
10
11inherit autotools
12
13EXTRA_OECONF = "--disable-ldap"
diff --git a/meta/packages/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch b/meta/packages/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
deleted file mode 100644
index 336dc0e267..0000000000
--- a/meta/packages/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1--- ./support/nfs/svc_socket.c.orig 2004-12-12 06:43:52.000000000 +0000
2+++ ./support/nfs/svc_socket.c 2004-12-12 06:50:04.000000000 +0000
3@@ -66,6 +66,7 @@
4 memset ((char *) &addr, sizeof (addr));
5 addr.sin_family = AF_INET;
6
7+#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
8 ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
9 &rpcp);
10 if (ret == 0 && rpcp != NULL)
11@@ -99,6 +100,7 @@
12 }
13 }
14 else
15+#endif
16 {
17 if (bindresvport (sock, &addr))
18 {
diff --git a/meta/packages/nfs-utils/nfs-utils/nfsserver b/meta/packages/nfs-utils/nfs-utils/nfsserver
deleted file mode 100644
index 9d02e85848..0000000000
--- a/meta/packages/nfs-utils/nfs-utils/nfsserver
+++ /dev/null
@@ -1,161 +0,0 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: nfs-kernel-server
4# Required-Start: $remote_fs $portmap hwclock
5# Required-Stop: $remote_fs $portmap hwclock
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Kernel NFS server support
9# Description: NFS is a popular protocol for file sharing across
10# TCP/IP networks. This service provides NFS server
11# functionality, which is configured via the
12# /etc/exports file.
13### END INIT INFO
14#
15# Startup script for nfs-utils
16#
17#
18# The environment variable NFS_SERVERS may be set in /etc/default/nfsd
19# Other control variables may be overridden here too
20test -r /etc/default/nfsd && . /etc/default/nfsd
21#
22# Location of executables:
23test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/mountd
24test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/nfsd
25test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/statd
26#
27# The user mode program must also exist (it just starts the kernel
28# threads using the kernel module code).
29test -x "$NFS_MOUNTD" || exit 0
30test -x "$NFS_NFSD" || exit 0
31#
32# Default is 8 threads, value is settable between 1 and the truely
33# ridiculous 99
34test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -lt 100 || NFS_SERVERS=8
35#
36# The default state directory is /var/lib/nfs
37test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs
38#
39#----------------------------------------------------------------------
40# Startup and shutdown functions.
41# Actual startup/shutdown is at the end of this file.
42#directories
43create_directories(){
44 echo -n 'creating NFS state directory: '
45 mkdir -p "$NFS_STATEDIR"
46 ( cd "$NFS_STATEDIR"
47 umask 077
48 mkdir -p sm sm.bak
49 test -w sm/state || {
50 rm -f sm/state
51 :>sm/state
52 }
53 umask 022
54 for file in xtab etab smtab rmtab
55 do
56 test -w "$file" || {
57 rm -f "$file"
58 :>"$file"
59 }
60 done
61 )
62 echo done
63}
64#mountd
65start_mountd(){
66 echo -n 'starting mountd: '
67 start-stop-daemon --start --exec "$NFS_MOUNTD" -- "-f /etc/exports $@"
68 echo done
69}
70stop_mountd(){
71 echo -n 'stopping mountd: '
72 start-stop-daemon --stop --quiet --exec "$NFS_MOUNTD"
73 echo done
74}
75#
76#nfsd
77start_nfsd(){
78 echo -n "starting $1 nfsd kernel threads: "
79 start-stop-daemon --start --exec "$NFS_NFSD" -- "$@"
80 echo done
81}
82delay_nfsd(){
83 for delay in 0 1 2 3 4 5 6 7 8 9
84 do
85 if pidof nfsd >/dev/null
86 then
87 echo -n .
88 sleep 1
89 else
90 return 0
91 fi
92 done
93 return 1
94}
95stop_nfsd(){
96 # WARNING: this kills any process with the executable
97 # name 'nfsd'.
98 echo -n 'stopping nfsd: '
99 start-stop-daemon --stop --quiet --signal 1 --name nfsd
100 if delay_nfsd || {
101 echo failed
102 echo ' using signal 9: '
103 start-stop-daemon --stop --quiet --signal 9 --name nfsd
104 delay_nfsd
105 }
106 then
107 echo done
108 # This will remove, recursively, dependencies
109 echo -n 'removing nfsd kernel module: '
110 if modprobe -r nfsd
111 then
112 echo done
113 else
114 echo failed
115 fi
116 else
117 echo failed
118 fi
119}
120
121#statd
122start_statd(){
123 echo -n "starting statd: "
124 start-stop-daemon --start --exec "$NFS_STATD"
125 echo done
126}
127stop_statd(){
128 # WARNING: this kills any process with the executable
129 # name 'statd'.
130 echo -n 'stopping statd: '
131 start-stop-daemon --stop --quiet --signal 1 --name statd
132 echo done
133}
134#----------------------------------------------------------------------
135#
136# supported options:
137# start
138# stop
139# reload: reloads the exports file
140# restart: stops and starts mountd
141#FIXME: need to create the /var/lib/nfs/... directories
142case "$1" in
143start) create_directories
144 start_nfsd "$NFS_SERVERS"
145 start_mountd
146 start_statd
147 test -r /etc/exports && exportfs -a;;
148stop) exportfs -ua
149 stop_statd
150 stop_mountd
151 stop_nfsd;;
152reload) test -r /etc/exports && exportfs -r;;
153restart)exportfs -ua
154 stop_mountd
155 stop_statd
156 # restart does not restart the kernel threads,
157 # only the user mode processes
158 start_mountd
159 start_statd
160 test -r /etc/exports && exportfs -a;;
161esac
diff --git a/meta/packages/nfs-utils/nfs-utils_1.2.2.bb b/meta/packages/nfs-utils/nfs-utils_1.2.2.bb
deleted file mode 100644
index fafedd17b5..0000000000
--- a/meta/packages/nfs-utils/nfs-utils_1.2.2.bb
+++ /dev/null
@@ -1,51 +0,0 @@
1DESCRIPTION = "userspace utilities for kernel nfs"
2HOMEPAGE = "http://nfs.sourceforge.net/"
3SECTION = "console/network"
4PRIORITY = "optional"
5
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
8
9# util-linux for libblkid
10DEPENDS = "libcap libnfsidmap libevent util-linux tcp-wrappers"
11RDEPENDS = "portmap"
12RRECOMMENDS = "kernel-module-nfsd"
13
14PR = "r1"
15
16SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.bz2 \
17 file://nfs-utils-1.0.6-uclibc.patch \
18 file://nfsserver"
19
20PARALLEL_MAKE = ""
21
22# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will
23# pull in the remainder of the dependencies.
24
25INITSCRIPT_NAME = "nfsserver"
26# The server has no dependencies at the user run levels, so just put
27# it in at the default levels. It must be terminated before the network
28# in the shutdown levels, but that works fine.
29INITSCRIPT_PARAMS = "defaults"
30
31inherit autotools update-rc.d
32
33# --enable-uuid is need for cross-compiling
34EXTRA_OECONF = "--with-statduser=nobody \
35 --enable-nfsv41 \
36 --enable-uuid \
37 --disable-gss \
38 --disable-tirpc \
39 --with-statedir=/var/lib/nfs"
40
41INHIBIT_AUTO_STAGE = "1"
42
43do_install_append () {
44 install -d ${D}${sysconfdir}/init.d
45 install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
46
47 # the following are built by CC_FOR_BUILD
48 rm -f ${D}${sbindir}/rpcdebug
49 rm -f ${D}${sbindir}/rpcgen
50 rm -f ${D}${sbindir}/locktest
51}
diff --git a/meta/packages/oh/qemu-config.bb b/meta/packages/oh/qemu-config.bb
deleted file mode 100644
index fc59320282..0000000000
--- a/meta/packages/oh/qemu-config.bb
+++ /dev/null
@@ -1,36 +0,0 @@
1DESCRIPTION = "Adds scripts to use distcc on the host system under qemu"
2LICENSE = "GPL"
3RDEPENDS = "distcc task-poky-nfs-server oprofileui-server rsync bash"
4PR = "r17"
5
6SRC_URI = "file://distcc.sh \
7 file://anjuta-remote-run \
8 file://exports \
9 file://shutdown.desktop \
10 file://qemu-autostart"
11
12S = "${WORKDIR}"
13
14COMPATIBLE_MACHINE = "(qemuarm|qemux86)"
15PACKAGE_ARCH = "all"
16
17do_install() {
18 install -d ${D}${sysconfdir}/profile.d
19
20 install -m 0755 distcc.sh ${D}${sysconfdir}/profile.d/
21 install -m 0644 exports ${D}${sysconfdir}/
22
23 install -d ${D}${bindir}
24 install -m 0755 anjuta-remote-run ${D}${bindir}/
25
26 install -d ${D}${datadir}/applications
27 install -m 0644 shutdown.desktop ${D}${datadir}/applications/
28
29 install -d ${D}/etc/init.d
30 install qemu-autostart ${D}/etc/init.d/
31}
32
33inherit update-rc.d
34
35INITSCRIPT_NAME = "qemu-autostart"
36INITSCRIPT_PARAMS = "start 999 5 2 . stop 20 0 1 6 ."
diff --git a/meta/packages/oh/qemu-config/anjuta-remote-run b/meta/packages/oh/qemu-config/anjuta-remote-run
deleted file mode 100644
index 620e3a705b..0000000000
--- a/meta/packages/oh/qemu-config/anjuta-remote-run
+++ /dev/null
@@ -1,7 +0,0 @@
1#!/bin/sh
2
3. /etc/profile
4export DISPLAY=:0
5dbus-launch $@
6
7
diff --git a/meta/packages/oh/qemu-config/distcc.sh b/meta/packages/oh/qemu-config/distcc.sh
deleted file mode 100644
index a2b543d6b8..0000000000
--- a/meta/packages/oh/qemu-config/distcc.sh
+++ /dev/null
@@ -1,4 +0,0 @@
1DISTCC_HOSTS="192.168.7.1"
2#DISTCC_VERBOSE="1"
3
4export DISTCC_HOSTS
diff --git a/meta/packages/oh/qemu-config/exports b/meta/packages/oh/qemu-config/exports
deleted file mode 100644
index b7257aa008..0000000000
--- a/meta/packages/oh/qemu-config/exports
+++ /dev/null
@@ -1 +0,0 @@
1/ *(rw,no_root_squash,async)
diff --git a/meta/packages/oh/qemu-config/qemu-autostart b/meta/packages/oh/qemu-config/qemu-autostart
deleted file mode 100755
index db2668eb4e..0000000000
--- a/meta/packages/oh/qemu-config/qemu-autostart
+++ /dev/null
@@ -1,37 +0,0 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: hddtemp
4# Required-Start: $network
5# Required-Stop: $network
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: OProfile server
9# Description:
10### END INIT INFO
11
12. /etc/init.d/functions
13
14case "$1" in
15 start)
16 echo "Starting automatic qemu services"
17 . /etc/profile
18 /usr/bin/oprofile-server &
19 ;;
20
21 stop)
22 echo "Stopping qemu services"
23 killproc oprofile-server
24 ;;
25
26 restart)
27 $0 stop
28 sleep 1
29 $0 start
30 ;;
31
32 *)
33 echo "usage: $0 { start | stop | restart }"
34 ;;
35esac
36
37exit 0
diff --git a/meta/packages/oh/qemu-config/qemuarm/shutdown.desktop b/meta/packages/oh/qemu-config/qemuarm/shutdown.desktop
deleted file mode 100644
index b973d4318e..0000000000
--- a/meta/packages/oh/qemu-config/qemuarm/shutdown.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
1[Desktop Entry]
2Encoding=UTF-8
3Type=Application
4Name=Shutdown
5Comment=Close down the machine safely
6Exec=reboot
7Icon=system-shutdown
8Terminal=false
9Categories=Utility;
10StartupNotify=true \ No newline at end of file
diff --git a/meta/packages/oh/qemu-config/shutdown.desktop b/meta/packages/oh/qemu-config/shutdown.desktop
deleted file mode 100644
index 272688922c..0000000000
--- a/meta/packages/oh/qemu-config/shutdown.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
1[Desktop Entry]
2Encoding=UTF-8
3Type=Application
4Name=Shutdown
5Comment=Close down the machine safely
6Exec=halt
7Icon=system-shutdown
8Terminal=false
9Categories=Utility;
10StartupNotify=true \ No newline at end of file
diff --git a/meta/packages/oh/usbinit.bb b/meta/packages/oh/usbinit.bb
deleted file mode 100644
index 1d4575bddb..0000000000
--- a/meta/packages/oh/usbinit.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1DESCRIPTION = "Initscript to manage gadget Ethernet"
2LICENSE = "GPL"
3PRIORITY = "optional"
4PR = "r1"
5
6SRC_URI = "file://usb-gether"
7S = "${WORKDIR}"
8
9do_install() {
10 install -d ${D}/etc
11 install -d ${D}/etc/init.d
12 install usb-gether ${D}/etc/init.d
13}
14
15inherit update-rc.d
16
17INITSCRIPT_NAME = "usb-gether"
18INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
diff --git a/meta/packages/oh/usbinit/usb-gether b/meta/packages/oh/usbinit/usb-gether
deleted file mode 100755
index e80a0bb30e..0000000000
--- a/meta/packages/oh/usbinit/usb-gether
+++ /dev/null
@@ -1,23 +0,0 @@
1#! /bin/sh
2#
3# usb-ether Start up the gadget usb ethernet interface.
4#
5
6case "$1" in
7 start|"")
8 test "$VERBOSE" != no && echo "Initializing g_ether gadget..."
9 modprobe g_ether
10 ifup usb0
11 ;;
12 stop)
13 test "$VERBOSE" != no && echo "Disabling g_ether..."
14 ifdown usb0
15 rmmod g_ether
16 ;;
17 *)
18 echo "Usage: usb-ether {start|stop}" >&2
19 exit 1
20 ;;
21esac
22
23exit 0
diff --git a/meta/packages/ohm/ohm/fix_configure.patch b/meta/packages/ohm/ohm/fix_configure.patch
deleted file mode 100644
index e4b774e785..0000000000
--- a/meta/packages/ohm/ohm/fix_configure.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1Index: git/configure.in
2===================================================================
3--- git.orig/configure.in 2007-12-19 13:43:52.000000000 +0000
4+++ git/configure.in 2008-03-06 23:59:57.000000000 +0000
5@@ -201,9 +201,6 @@
6 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
7 AC_DEFUN(AC_CHECK_X_HEADER, [
8 ac_save_CPPFLAGS="$CPPFLAGS"
9- if test \! -z "$includedir" ; then
10- CPPFLAGS="$CPPFLAGS -I$includedir"
11- fi
12 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13 AC_CHECK_HEADER([$1],[$2],[$3],[$4])
14 CPPFLAGS="$ac_save_CPPFLAGS"])
15@@ -211,9 +208,6 @@
16 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
17 AC_DEFUN(AC_TRY_X_COMPILE, [
18 ac_save_CPPFLAGS="$CPPFLAGS"
19- if test \! -z "$includedir" ; then
20- CPPFLAGS="$CPPFLAGS -I$includedir"
21- fi
22 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
23 AC_TRY_COMPILE([$1], [$2], [$3], [$4])
24 CPPFLAGS="$ac_save_CPPFLAGS"])
25@@ -224,14 +218,8 @@
26 ac_save_CPPFLAGS="$CPPFLAGS"
27 ac_save_LDFLAGS="$LDFLAGS"
28 # ac_save_LIBS="$LIBS"
29- if test \! -z "$includedir" ; then
30- CPPFLAGS="$CPPFLAGS -I$includedir"
31- fi
32 # note: $X_CFLAGS includes $x_includes
33 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
34- if test \! -z "$libdir" ; then
35- LDFLAGS="$LDFLAGS -L$libdir"
36- fi
37 # note: $X_LIBS includes $x_libraries
38 LDFLAGS="$LDFLAGS $ALL_X_LIBS"
39 AC_CHECK_LIB([$1], [$2], [$3], [$4], [$5])
diff --git a/meta/packages/ohm/ohm_git.bb b/meta/packages/ohm/ohm_git.bb
deleted file mode 100644
index 2ba78b35ab..0000000000
--- a/meta/packages/ohm/ohm_git.bb
+++ /dev/null
@@ -1,44 +0,0 @@
1DESCRIPTION = "Open Hardware Manager"
2HOMEPAGE = "http://freedesktop.org/Software/ohm"
3LICENSE = "LGPL"
4
5DEPENDS = "gtk+ dbus-glib intltool-native hal"
6RDEPENDS_${PN} += "udev hal-info"
7SRC_URI = "git://anongit.freedesktop.org/git/ohm/;protocol=git \
8 file://fix_configure.patch;patch=1"
9
10PV = "0.1.2+git-locrev${SRCREV}"
11PR = "r1"
12
13S = "${WORKDIR}/git"
14
15inherit autotools pkgconfig
16
17EXTRA_OECONF = "--with-distro=debian \
18 --without-xauth \
19 --disable-gtk-doc \
20 --disable-docbook-docs"
21
22do_configure_prepend() {
23 touch gtk-doc.make
24}
25
26OE_LT_RPATH_ALLOW=":${libdir}/libohm:"
27OE_LT_RPATH_ALLOW[export]="1"
28
29PACKAGES =+ "libohm ohm-plugin-x11"
30
31FILES_${PN}-dev += "${libdir}/ohm/*.a"
32
33FILES_${PN} = "${sysconfdir} \
34 ${bindir}/* \
35 ${sbindir}/* \
36 ${libdir}/ohm/*.so \
37 "
38
39FILES_libohm = "${libdir}/libohm.so.*"
40FILES_ohm-plugin-x11 = "${libdir}/ohm/libohm_x*.so \
41 ${libdir}/ohm/libohm_idle.so \
42 ${sysconfdir}/ohm/plugins.d/x* \
43 ${sysconfdir}/ohm/plugins.d/idle* \
44 "
diff --git a/meta/packages/openobex/files/disable-cable-test.patch b/meta/packages/openobex/files/disable-cable-test.patch
deleted file mode 100644
index 95b636dd8f..0000000000
--- a/meta/packages/openobex/files/disable-cable-test.patch
+++ /dev/null
@@ -1,16 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- openobex-1.2/apps/Makefile.am~disable-cable-test
7+++ openobex-1.2/apps/Makefile.am
8@@ -6,7 +6,7 @@
9 obex_io.c obex_io.h \
10 obex_put_common.c obex_put_common.h
11
12-bin_PROGRAMS = irxfer obex_tcp irobex_palm3 obex_test
13+bin_PROGRAMS = irxfer obex_tcp irobex_palm3
14
15 obex_test_SOURCES = \
16 obex_test.c obex_test.h \
diff --git a/meta/packages/openobex/files/libusb_crosscompile_check.patch b/meta/packages/openobex/files/libusb_crosscompile_check.patch
deleted file mode 100644
index 20ac70bd1e..0000000000
--- a/meta/packages/openobex/files/libusb_crosscompile_check.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: openobex-1.5/acinclude.m4
2===================================================================
3--- openobex-1.5.orig/acinclude.m4 2009-02-08 18:30:22.000000000 +0000
4+++ openobex-1.5/acinclude.m4 2009-07-31 09:55:46.000000000 +0100
5@@ -158,7 +158,7 @@
6 ;;
7 *)
8 PKG_CHECK_MODULES(USB, libusb, usb_lib_found=yes, AC_MSG_RESULT(no))
9- AC_CHECK_FILE(${prefix}/lib/pkgconfig/libusb.pc, REQUIRES="libusb")
10+ REQUIRES="libusb"
11 ;;
12 esac
13 AC_SUBST(USB_CFLAGS)
diff --git a/meta/packages/openobex/openobex_1.5.bb b/meta/packages/openobex/openobex_1.5.bb
deleted file mode 100644
index dc07ae1353..0000000000
--- a/meta/packages/openobex/openobex_1.5.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1DESCRIPTION = "The Openobex project is an open source implementation of the \
2Object Exchange (OBEX) protocol."
3HOMEPAGE = "http://openobex.triq.net"
4SECTION = "libs"
5PROVIDES = "openobex-apps"
6DEPENDS = "libusb bluez4"
7LICENSE = "GPL"
8PR = "r4"
9
10SRC_URI = "${KERNELORG_MIRROR}/pub/linux/bluetooth/openobex-${PV}.tar.gz \
11 file://disable-cable-test.patch;patch=1 \
12 file://libusb_crosscompile_check.patch;patch=1"
13
14inherit autotools binconfig pkgconfig
15
16EXTRA_OECONF = "--enable-apps --enable-syslog --enable-dump \
17 --with-usb=${STAGING_LIBDIR}/.. --with-bluez=${STAGING_LIBDIR}/.."
18
19# how to stop shlibrename from renaming -apps?
20PACKAGES += "openobex-apps"
21FILES_${PN} = "${libdir}/lib*.so.*"
22FILES_${PN}-dev += "${bindir}/openobex-config"
23FILES_${PN}-apps = "${bindir}/*"
diff --git a/meta/packages/openssl/openssl-0.9.8o/configure-targets.patch b/meta/packages/openssl/openssl-0.9.8o/configure-targets.patch
deleted file mode 100644
index b68123a233..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/configure-targets.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1
2The number of colons are important :)
3
4Index: openssl-0.9.8g/Configure
5===================================================================
6--- openssl-0.9.8g.orig/Configure 2008-04-12 04:27:22.000000000 +0200
7+++ openssl-0.9.8g/Configure 2008-04-12 04:38:56.000000000 +0200
8@@ -395,6 +395,16 @@
9 "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
10 "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
11
12+ # Linux on ARM
13+"linux-elf-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
14+"linux-elf-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
15+"linux-gnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
16+"linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
17+"linux-uclibcgnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
18+"linux-uclibcgnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
19+
20+"linux-avr32","$ENV{'CC'}:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).",
21+
22 #### *BSD [do see comment about ${BSDthreads} above!]
23 "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
24 "BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/ca.patch b/meta/packages/openssl/openssl-0.9.8o/debian/ca.patch
deleted file mode 100644
index 761eebe510..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/ca.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1Index: openssl-0.9.8m/apps/CA.pl.in
2===================================================================
3--- openssl-0.9.8m.orig/apps/CA.pl.in 2006-04-28 00:28:51.000000000 +0000
4+++ openssl-0.9.8m/apps/CA.pl.in 2010-02-27 00:36:51.000000000 +0000
5@@ -65,6 +65,7 @@
6 foreach (@ARGV) {
7 if ( /^(-\?|-h|-help)$/ ) {
8 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
9+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
10 exit 0;
11 } elsif (/^-newcert$/) {
12 # create a certificate
13@@ -165,6 +166,7 @@
14 } else {
15 print STDERR "Unknown arg $_\n";
16 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
17+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
18 exit 1;
19 }
20 }
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/config-hurd.patch b/meta/packages/openssl/openssl-0.9.8o/debian/config-hurd.patch
deleted file mode 100644
index 21b7935dde..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/config-hurd.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1Index: openssl-0.9.8k/config
2===================================================================
3--- openssl-0.9.8k.orig/config 2009-02-16 09:43:41.000000000 +0100
4+++ openssl-0.9.8k/config 2009-07-19 11:32:41.000000000 +0200
5@@ -162,8 +162,8 @@
6 echo "${MACHINE}-whatever-linux1"; exit 0
7 ;;
8
9- GNU*)
10- echo "hurd-x86"; exit 0;
11+ GNU:*|GNU/*:*)
12+ echo "${MACHINE}-gnuish"; exit 0;
13 ;;
14
15 LynxOS:*)
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/debian-targets.patch b/meta/packages/openssl/openssl-0.9.8o/debian/debian-targets.patch
deleted file mode 100644
index fed47341ea..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/debian-targets.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1Index: openssl-0.9.8k/Configure
2===================================================================
3--- openssl-0.9.8k.orig/Configure 2009-12-09 16:09:41.000000000 +0000
4+++ openssl-0.9.8k/Configure 2009-12-09 16:09:55.000000000 +0000
5@@ -320,6 +320,49 @@
6 "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
7 "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
8
9+# Debian GNU/* (various architectures)
10+"debian-alpha","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
11+"debian-alpha-ev4","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev4 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
12+"debian-alpha-ev5","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev5 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
13+"debian-arm","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
14+"debian-armeb","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
15+"debian-armel","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
16+#"debian-amd64","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
17+"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm_linux}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
18+"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
19+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
20+#"debian-freebsd-alpha","gcc:-DTERMIOS -O -Wa,--noexecstack -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
21+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
22+"debian-hppa","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
23+"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
24+"debian-ia64","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
25+#"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC",
26+"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
27+"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i486 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
28+"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
29+"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i686 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
30+"debian-m68k","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
31+"debian-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
32+"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
33+"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
34+"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
35+"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mv8 -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
36+"debian-openbsd-alpha","gcc:-DTERMIOS -O3 -Wa,--noexecstack -g::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
37+"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
38+"debian-openbsd-mips","gcc:-O2 -Wa,--noexecstack -g -DL_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
39+"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_UNROLL DES_RISC2 DES_PTR MD2_CHAR RC4_INDEX::linux_ppc32.o::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
40+"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
41+"debian-s390","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
42+"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
43+"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
44+"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
45+"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
46+"debian-m32r","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
47+"debian-sparc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
48+"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -mcpu=v8 -g -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
49+"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO -O3 -mcpu=v9 -Wa,--noexecstack -Wa,-Av8plus -g -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
50+"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
51+
52 ####
53 #### Variety of LINUX:-)
54 ####
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/engines-path.patch b/meta/packages/openssl/openssl-0.9.8o/debian/engines-path.patch
deleted file mode 100644
index 49400ff6e1..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/engines-path.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1Index: openssl-0.9.8m/Makefile.org
2===================================================================
3--- openssl-0.9.8m.orig/Makefile.org 2010-01-27 16:06:36.000000000 +0000
4+++ openssl-0.9.8m/Makefile.org 2010-02-27 00:43:04.000000000 +0000
5@@ -620,7 +620,7 @@
6 install_sw:
7 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
8 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
9- $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
10+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines \
11 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
12 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
13 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
14Index: openssl-0.9.8m/engines/Makefile
15===================================================================
16--- openssl-0.9.8m.orig/engines/Makefile 2009-11-10 01:53:02.000000000 +0000
17+++ openssl-0.9.8m/engines/Makefile 2010-02-27 00:45:03.000000000 +0000
18@@ -101,13 +101,13 @@
19 *DSO_DL*) sfx="sl";; \
20 *) sfx="bad";; \
21 esac; \
22- cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
23+ cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new; \
24 else \
25 sfx="so"; \
26 cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
27 fi; \
28- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
29- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx ); \
30+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new; \
31+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx ); \
32 done; \
33 fi
34
35Index: openssl-0.9.8m/Configure
36===================================================================
37--- openssl-0.9.8m.orig/Configure 2010-02-27 00:40:42.000000000 +0000
38+++ openssl-0.9.8m/Configure 2010-02-27 00:46:47.000000000 +0000
39@@ -1738,7 +1738,7 @@
40 # $foo is to become "$prefix/lib$multilib/engines";
41 # as Makefile.org and engines/Makefile are adapted for
42 # $multilib suffix.
43- my $foo = "$prefix/lib/engines";
44+ my $foo = "$prefix/lib/ssl/engines";
45 $foo =~ s/\\/\\\\/g;
46 print OUT "#define ENGINESDIR \"$foo\"\n";
47 }
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch b/meta/packages/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch
deleted file mode 100644
index da97186886..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: openssl-0.9.8k/crypto/perlasm/x86_64-xlate.pl
2===================================================================
3--- openssl-0.9.8k.orig/crypto/perlasm/x86_64-xlate.pl 2008-02-13 21:01:48.000000000 +0100
4+++ openssl-0.9.8k/crypto/perlasm/x86_64-xlate.pl 2009-07-19 11:37:23.000000000 +0200
5@@ -62,7 +62,7 @@
6 my ($outdev,$outino,@junk)=stat($output);
7
8 open STDOUT,">$output" || die "can't open $output: $!"
9- if ($stddev!=$outdev || $stdino!=$outino);
10+# if ($stddev!=$outdev || $stdino!=$outino);
11 }
12
13 my $masmref=8 + 50727*2**-32; # 8.00.50727 shipped with VS2005
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/make-targets.patch b/meta/packages/openssl/openssl-0.9.8o/debian/make-targets.patch
deleted file mode 100644
index b1239728e7..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/make-targets.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:32:41.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:31.000000000 +0200
5@@ -131,7 +131,7 @@
6
7 BASEADDR=
8
9-DIRS= crypto fips ssl engines apps test tools
10+DIRS= crypto fips ssl engines apps tools
11 SHLIBDIRS= crypto ssl fips
12
13 # dirs in crypto to build
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/man-dir.patch b/meta/packages/openssl/openssl-0.9.8o/debian/man-dir.patch
deleted file mode 100644
index 29563ecf59..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/man-dir.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:32:41.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:29.000000000 +0200
5@@ -152,7 +152,7 @@
6
7 MAKEFILE= Makefile
8
9-MANDIR=$(OPENSSLDIR)/man
10+MANDIR=/usr/share/man
11 MAN1=1
12 MAN3=3
13 MANSUFFIX=
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/man-section.patch b/meta/packages/openssl/openssl-0.9.8o/debian/man-section.patch
deleted file mode 100644
index fe20ab0444..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/man-section.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:34:06.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:21.000000000 +0200
5@@ -155,7 +155,8 @@
6 MANDIR=/usr/share/man
7 MAN1=1
8 MAN3=3
9-MANSUFFIX=
10+MANSUFFIX=ssl
11+MANSECTION=SSL
12 SHELL=/bin/sh
13
14 TOP= .
15@@ -694,7 +695,7 @@
16 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
17 (cd `$(PERL) util/dirname.pl $$i`; \
18 sh -c "$$pod2man \
19- --section=$$sec --center=OpenSSL \
20+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
21 --release=$(VERSION) `basename $$i`") \
22 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
23 $(PERL) util/extract-names.pl < $$i | \
24@@ -711,7 +712,7 @@
25 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
26 (cd `$(PERL) util/dirname.pl $$i`; \
27 sh -c "$$pod2man \
28- --section=$$sec --center=OpenSSL \
29+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
30 --release=$(VERSION) `basename $$i`") \
31 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
32 $(PERL) util/extract-names.pl < $$i | \
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/no-rpath.patch b/meta/packages/openssl/openssl-0.9.8o/debian/no-rpath.patch
deleted file mode 100644
index 3ebc9accca..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/no-rpath.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: openssl-0.9.8k/Makefile.shared
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.shared 2008-09-17 17:56:40.000000000 +0200
4+++ openssl-0.9.8k/Makefile.shared 2009-07-19 11:37:25.000000000 +0200
5@@ -151,7 +151,7 @@
6 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
7 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
8
9-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
10+DO_GNU_APP=LDFLAGS="$(CFLAGS)"
11
12 #This is rather special. It's a special target with which one can link
13 #applications without bothering with any features that have anything to
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/no-symbolic.patch b/meta/packages/openssl/openssl-0.9.8o/debian/no-symbolic.patch
deleted file mode 100644
index 2504fa791e..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/no-symbolic.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: openssl-0.9.8k/Makefile.shared
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.shared 2009-07-19 11:35:02.000000000 +0200
4+++ openssl-0.9.8k/Makefile.shared 2009-07-19 11:35:48.000000000 +0200
5@@ -149,7 +149,7 @@
6 SHLIB_SUFFIX=; \
7 ALLSYMSFLAGS='-Wl,--whole-archive'; \
8 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
9- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
10+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
11
12 DO_GNU_APP=LDFLAGS="$(CFLAGS)"
13
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/perl-path.diff b/meta/packages/openssl/openssl-0.9.8o/debian/perl-path.diff
deleted file mode 100644
index a72f938d82..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/perl-path.diff
+++ /dev/null
@@ -1,760 +0,0 @@
1From: Kurt Roeckx <kurt@roeckx.be>
2Subject: Change the perl path's to /usr/bin/perl
3
4This is the result of running:
5perl util/perlpath.pl /usr/bin
6
7The upstream sources have this set to various different paths.
8
9--- openssl-0.9.8m.orig/Configure
10+++ openssl-0.9.8m/Configure
11@@ -1,4 +1,4 @@
12-:
13+#!/usr/bin/perl
14 eval 'exec perl -S $0 ${1+"$@"}'
15 if $running_under_some_shell;
16 ##
17--- openssl-0.9.8m.orig/VMS/VMSify-conf.pl
18+++ openssl-0.9.8m/VMS/VMSify-conf.pl
19@@ -1,4 +1,4 @@
20-#! /usr/bin/perl
21+#!/usr/bin/perl
22
23 use strict;
24 use warnings;
25--- openssl-0.9.8m.orig/Netware/do_tests.pl
26+++ openssl-0.9.8m/Netware/do_tests.pl
27@@ -1,4 +1,4 @@
28-# perl script to run OpenSSL tests
29+#!/usr/bin/perl
30
31
32 my $base_path = "\\openssl";
33--- openssl-0.9.8m.orig/apps/progs.pl
34+++ openssl-0.9.8m/apps/progs.pl
35@@ -1,4 +1,4 @@
36-#!/usr/local/bin/perl
37+#!/usr/bin/perl
38
39 print "/* apps/progs.h */\n";
40 print "/* automatically generated by progs.pl for openssl.c */\n\n";
41--- openssl-0.9.8m.orig/os2/backwardify.pl
42+++ openssl-0.9.8m/os2/backwardify.pl
43@@ -1,4 +1,4 @@
44-#!/usr/bin/perl -w
45+#!/usr/bin/perl
46 use strict;
47
48 # Use as $0
49--- openssl-0.9.8m.orig/times/091/mips-rel.pl
50+++ openssl-0.9.8m/times/091/mips-rel.pl
51@@ -1,4 +1,4 @@
52-#!/usr/local/bin/perl
53+#!/usr/bin/perl
54
55 &doit(100,"Pentium 100 32",0.0195,0.1000,0.6406,4.6100); # pentium-100
56 &doit(200,"PPro 200 32",0.0070,0.0340,0.2087,1.4700); # pentium-100
57--- openssl-0.9.8m.orig/fips/mkfipsscr.pl
58+++ openssl-0.9.8m/fips/mkfipsscr.pl
59@@ -1,4 +1,4 @@
60-#!/usr/local/bin/perl -w
61+#!/usr/bin/perl
62 # Quick & dirty utility to generate a script for executing the
63 # FIPS 140-2 CMVP algorithm tests based on the pathnames of
64 # input algorithm test files actually present (the unqualified
65--- openssl-0.9.8m.orig/fips/fipsalgtest.pl
66+++ openssl-0.9.8m/fips/fipsalgtest.pl
67@@ -1,4 +1,4 @@
68-#!/usr/bin/perl -w
69+#!/usr/bin/perl
70 # Perl utility to run or verify FIPS 140-2 CMVP algorithm tests based on the
71 # pathnames of input algorithm test files actually present (the unqualified
72 # file names are consistent but the pathnames are not).
73--- openssl-0.9.8m.orig/ms/uplink.pl
74+++ openssl-0.9.8m/ms/uplink.pl
75@@ -1,4 +1,4 @@
76-#!/usr/bin/env perl
77+#!/usr/bin/perl
78 #
79 # For Microsoft CL this is implemented as inline assembler. So that
80 # even though this script can generate even Win32 code, we'll be
81--- openssl-0.9.8m.orig/ms/segrenam.pl
82+++ openssl-0.9.8m/ms/segrenam.pl
83@@ -1,4 +1,4 @@
84-#!/usr/bin/env perl
85+#!/usr/bin/perl
86
87 my $quiet = 1;
88
89--- openssl-0.9.8m.orig/ms/cmp.pl
90+++ openssl-0.9.8m/ms/cmp.pl
91@@ -1,4 +1,4 @@
92-#!/usr/local/bin/perl
93+#!/usr/bin/perl
94
95 ($#ARGV == 1) || die "usage: cmp.pl <file1> <file2>\n";
96
97--- openssl-0.9.8m.orig/test/cms-test.pl
98+++ openssl-0.9.8m/test/cms-test.pl
99@@ -1,4 +1,4 @@
100-# test/cms-test.pl
101+#!/usr/bin/perl
102 # Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
103 # project.
104 #
105--- openssl-0.9.8m.orig/test/cms-examples.pl
106+++ openssl-0.9.8m/test/cms-examples.pl
107@@ -1,4 +1,4 @@
108-# test/cms-examples.pl
109+#!/usr/bin/perl
110 # Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
111 # project.
112 #
113--- openssl-0.9.8m.orig/demos/b64.pl
114+++ openssl-0.9.8m/demos/b64.pl
115@@ -1,4 +1,4 @@
116-#!/usr/local/bin/perl
117+#!/usr/bin/perl
118
119 #
120 # Make PEM encoded data have lines of 64 bytes of data
121--- openssl-0.9.8m.orig/demos/tunala/configure.in
122+++ openssl-0.9.8m/demos/tunala/configure.in
123@@ -1,4 +1,4 @@
124-dnl Process this file with autoconf to produce a configure script.
125+#!/usr/bin/perl
126 AC_INIT(tunala.c)
127 AM_CONFIG_HEADER(config.h)
128 AM_INIT_AUTOMAKE(tunala, 0.0.1-dev)
129--- openssl-0.9.8m.orig/crypto/x86cpuid.pl
130+++ openssl-0.9.8m/crypto/x86cpuid.pl
131@@ -1,4 +1,4 @@
132-#!/usr/bin/env perl
133+#!/usr/bin/perl
134
135 push(@INC,"perlasm");
136 require "x86asm.pl";
137--- openssl-0.9.8m.orig/crypto/x86_64cpuid.pl
138+++ openssl-0.9.8m/crypto/x86_64cpuid.pl
139@@ -1,4 +1,4 @@
140-#!/usr/bin/env perl
141+#!/usr/bin/perl
142
143 $output=shift;
144 $masm=1 if ($output =~ /\.asm/);
145--- openssl-0.9.8m.orig/crypto/md5/asm/md5-586.pl
146+++ openssl-0.9.8m/crypto/md5/asm/md5-586.pl
147@@ -1,4 +1,4 @@
148-#!/usr/local/bin/perl
149+#!/usr/bin/perl
150
151 # Normal is the
152 # md5_block_x86(MD5_CTX *c, ULONG *X);
153--- openssl-0.9.8m.orig/crypto/md5/asm/md5-x86_64.pl
154+++ openssl-0.9.8m/crypto/md5/asm/md5-x86_64.pl
155@@ -1,4 +1,4 @@
156-#!/usr/bin/perl -w
157+#!/usr/bin/perl
158 #
159 # MD5 optimized for AMD64.
160 #
161--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-ia64.pl
162+++ openssl-0.9.8m/crypto/sha/asm/sha1-ia64.pl
163@@ -1,4 +1,4 @@
164-#!/usr/bin/env perl
165+#!/usr/bin/perl
166 #
167 # ====================================================================
168 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
169--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-x86_64.pl
170+++ openssl-0.9.8m/crypto/sha/asm/sha1-x86_64.pl
171@@ -1,4 +1,4 @@
172-#!/usr/bin/env perl
173+#!/usr/bin/perl
174 #
175 # ====================================================================
176 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
177--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-sse2.pl
178+++ openssl-0.9.8m/crypto/sha/asm/sha512-sse2.pl
179@@ -1,4 +1,4 @@
180-#!/usr/bin/env perl
181+#!/usr/bin/perl
182 #
183 # ====================================================================
184 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
185--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-ia64.pl
186+++ openssl-0.9.8m/crypto/sha/asm/sha512-ia64.pl
187@@ -1,4 +1,4 @@
188-#!/usr/bin/env perl
189+#!/usr/bin/perl
190 #
191 # ====================================================================
192 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
193--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-x86_64.pl
194+++ openssl-0.9.8m/crypto/sha/asm/sha512-x86_64.pl
195@@ -1,4 +1,4 @@
196-#!/usr/bin/env perl
197+#!/usr/bin/perl
198 #
199 # ====================================================================
200 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
201--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-586.pl
202+++ openssl-0.9.8m/crypto/sha/asm/sha1-586.pl
203@@ -1,4 +1,4 @@
204-#!/usr/bin/env perl
205+#!/usr/bin/perl
206
207 # ====================================================================
208 # [Re]written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
209--- openssl-0.9.8m.orig/crypto/des/asm/des-586.pl
210+++ openssl-0.9.8m/crypto/des/asm/des-586.pl
211@@ -1,4 +1,4 @@
212-#!/usr/local/bin/perl
213+#!/usr/bin/perl
214 #
215 # The inner loop instruction sequence and the IP/FP modifications are from
216 # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
217--- openssl-0.9.8m.orig/crypto/des/asm/desboth.pl
218+++ openssl-0.9.8m/crypto/des/asm/desboth.pl
219@@ -1,4 +1,4 @@
220-#!/usr/local/bin/perl
221+#!/usr/bin/perl
222
223 $L="edi";
224 $R="esi";
225--- openssl-0.9.8m.orig/crypto/des/asm/des686.pl
226+++ openssl-0.9.8m/crypto/des/asm/des686.pl
227@@ -1,4 +1,4 @@
228-#!/usr/local/bin/perl
229+#!/usr/bin/perl
230
231 $prog="des686.pl";
232
233--- openssl-0.9.8m.orig/crypto/des/asm/crypt586.pl
234+++ openssl-0.9.8m/crypto/des/asm/crypt586.pl
235@@ -1,4 +1,4 @@
236-#!/usr/local/bin/perl
237+#!/usr/bin/perl
238 #
239 # The inner loop instruction sequence and the IP/FP modifications are from
240 # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
241--- openssl-0.9.8m.orig/crypto/lhash/num.pl
242+++ openssl-0.9.8m/crypto/lhash/num.pl
243@@ -1,4 +1,4 @@
244-#!/usr/local/bin/perl
245+#!/usr/bin/perl
246
247 #node 10 -> 4
248
249--- openssl-0.9.8m.orig/crypto/ripemd/asm/rmd-586.pl
250+++ openssl-0.9.8m/crypto/ripemd/asm/rmd-586.pl
251@@ -1,4 +1,4 @@
252-#!/usr/local/bin/perl
253+#!/usr/bin/perl
254
255 # Normal is the
256 # ripemd160_block_asm_data_order(RIPEMD160_CTX *c, ULONG *X,int blocks);
257--- openssl-0.9.8m.orig/crypto/rc4/asm/rc4-586.pl
258+++ openssl-0.9.8m/crypto/rc4/asm/rc4-586.pl
259@@ -1,4 +1,4 @@
260-#!/usr/local/bin/perl
261+#!/usr/bin/perl
262
263 # At some point it became apparent that the original SSLeay RC4
264 # assembler implementation performs suboptimaly on latest IA-32
265--- openssl-0.9.8m.orig/crypto/rc4/asm/rc4-x86_64.pl
266+++ openssl-0.9.8m/crypto/rc4/asm/rc4-x86_64.pl
267@@ -1,4 +1,4 @@
268-#!/usr/bin/env perl
269+#!/usr/bin/perl
270 #
271 # ====================================================================
272 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
273--- openssl-0.9.8m.orig/crypto/cast/asm/cast-586.pl
274+++ openssl-0.9.8m/crypto/cast/asm/cast-586.pl
275@@ -1,4 +1,4 @@
276-#!/usr/local/bin/perl
277+#!/usr/bin/perl
278
279 # define for pentium pro friendly version
280 $ppro=1;
281--- openssl-0.9.8m.orig/crypto/rc5/asm/rc5-586.pl
282+++ openssl-0.9.8m/crypto/rc5/asm/rc5-586.pl
283@@ -1,4 +1,4 @@
284-#!/usr/local/bin/perl
285+#!/usr/bin/perl
286
287 push(@INC,"perlasm","../../perlasm");
288 require "x86asm.pl";
289--- openssl-0.9.8m.orig/crypto/perlasm/x86ms.pl
290+++ openssl-0.9.8m/crypto/perlasm/x86ms.pl
291@@ -1,4 +1,4 @@
292-#!/usr/local/bin/perl
293+#!/usr/bin/perl
294
295 package x86ms;
296
297--- openssl-0.9.8m.orig/crypto/perlasm/x86asm.pl
298+++ openssl-0.9.8m/crypto/perlasm/x86asm.pl
299@@ -1,4 +1,4 @@
300-#!/usr/local/bin/perl
301+#!/usr/bin/perl
302
303 # require 'x86asm.pl';
304 # &asm_init("cpp","des-586.pl");
305--- openssl-0.9.8m.orig/crypto/perlasm/x86nasm.pl
306+++ openssl-0.9.8m/crypto/perlasm/x86nasm.pl
307@@ -1,4 +1,4 @@
308-#!/usr/local/bin/perl
309+#!/usr/bin/perl
310
311 package x86nasm;
312
313--- openssl-0.9.8m.orig/crypto/perlasm/x86unix.pl
314+++ openssl-0.9.8m/crypto/perlasm/x86unix.pl
315@@ -1,4 +1,4 @@
316-#!/usr/local/bin/perl
317+#!/usr/bin/perl
318
319 package x86unix; # GAS actually...
320
321--- openssl-0.9.8m.orig/crypto/perlasm/cbc.pl
322+++ openssl-0.9.8m/crypto/perlasm/cbc.pl
323@@ -1,4 +1,4 @@
324-#!/usr/local/bin/perl
325+#!/usr/bin/perl
326
327 # void des_ncbc_encrypt(input, output, length, schedule, ivec, enc)
328 # des_cblock (*input);
329--- openssl-0.9.8m.orig/crypto/perlasm/x86_64-xlate.pl
330+++ openssl-0.9.8m/crypto/perlasm/x86_64-xlate.pl
331@@ -1,4 +1,4 @@
332-#!/usr/bin/env perl
333+#!/usr/bin/perl
334
335 # Ascetic x86_64 AT&T to MASM assembler translator by <appro>.
336 #
337--- openssl-0.9.8m.orig/crypto/bf/asm/bf-686.pl
338+++ openssl-0.9.8m/crypto/bf/asm/bf-686.pl
339@@ -1,4 +1,4 @@
340-#!/usr/local/bin/perl
341+#!/usr/bin/perl
342
343 push(@INC,"perlasm","../../perlasm");
344 require "x86asm.pl";
345--- openssl-0.9.8m.orig/crypto/bf/asm/bf-586.pl
346+++ openssl-0.9.8m/crypto/bf/asm/bf-586.pl
347@@ -1,4 +1,4 @@
348-#!/usr/local/bin/perl
349+#!/usr/bin/perl
350
351 push(@INC,"perlasm","../../perlasm");
352 require "x86asm.pl";
353--- openssl-0.9.8m.orig/crypto/objects/objects.pl
354+++ openssl-0.9.8m/crypto/objects/objects.pl
355@@ -1,4 +1,4 @@
356-#!/usr/local/bin/perl
357+#!/usr/bin/perl
358
359 open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]";
360 $max_nid=0;
361--- openssl-0.9.8m.orig/crypto/objects/obj_dat.pl
362+++ openssl-0.9.8m/crypto/objects/obj_dat.pl
363@@ -1,4 +1,4 @@
364-#!/usr/local/bin/perl
365+#!/usr/bin/perl
366
367 # fixes bug in floating point emulation on sparc64 when
368 # this script produces off-by-one output on sparc64
369--- openssl-0.9.8m.orig/crypto/conf/keysets.pl
370+++ openssl-0.9.8m/crypto/conf/keysets.pl
371@@ -1,4 +1,4 @@
372-#!/usr/local/bin/perl
373+#!/usr/bin/perl
374
375 $NUMBER=0x01;
376 $UPPER=0x02;
377--- openssl-0.9.8m.orig/crypto/bn/bn_prime.pl
378+++ openssl-0.9.8m/crypto/bn/bn_prime.pl
379@@ -1,4 +1,4 @@
380-#!/usr/local/bin/perl
381+#!/usr/bin/perl
382 # bn_prime.pl
383
384 $num=2048;
385--- openssl-0.9.8m.orig/crypto/bn/asm/x86.pl
386+++ openssl-0.9.8m/crypto/bn/asm/x86.pl
387@@ -1,4 +1,4 @@
388-#!/usr/local/bin/perl
389+#!/usr/bin/perl
390
391 push(@INC,"perlasm","../../perlasm");
392 require "x86asm.pl";
393--- openssl-0.9.8m.orig/crypto/bn/asm/ppc.pl
394+++ openssl-0.9.8m/crypto/bn/asm/ppc.pl
395@@ -1,4 +1,4 @@
396-#!/usr/bin/env perl
397+#!/usr/bin/perl
398 #
399 # Implemented as a Perl wrapper as we want to support several different
400 # architectures with single file. We pick up the target based on the
401--- openssl-0.9.8m.orig/crypto/bn/asm/co-586.pl
402+++ openssl-0.9.8m/crypto/bn/asm/co-586.pl
403@@ -1,4 +1,4 @@
404-#!/usr/local/bin/perl
405+#!/usr/bin/perl
406
407 push(@INC,"perlasm","../../perlasm");
408 require "x86asm.pl";
409--- openssl-0.9.8m.orig/crypto/bn/asm/bn-586.pl
410+++ openssl-0.9.8m/crypto/bn/asm/bn-586.pl
411@@ -1,4 +1,4 @@
412-#!/usr/local/bin/perl
413+#!/usr/bin/perl
414
415 push(@INC,"perlasm","../../perlasm");
416 require "x86asm.pl";
417--- openssl-0.9.8m.orig/crypto/bn/asm/mo-586.pl
418+++ openssl-0.9.8m/crypto/bn/asm/mo-586.pl
419@@ -1,4 +1,4 @@
420-#!/usr/bin/env perl
421+#!/usr/bin/perl
422
423 # This is crypto/bn/asm/x86-mont.pl (with asciz from crypto/perlasm/x86asm.pl)
424 # from OpenSSL 0.9.9-dev
425--- openssl-0.9.8m.orig/crypto/bn/asm/x86_64-mont.pl
426+++ openssl-0.9.8m/crypto/bn/asm/x86_64-mont.pl
427@@ -1,4 +1,4 @@
428-#!/usr/bin/env perl
429+#!/usr/bin/perl
430
431 # ====================================================================
432 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
433--- openssl-0.9.8m.orig/crypto/bn/asm/x86/comba.pl
434+++ openssl-0.9.8m/crypto/bn/asm/x86/comba.pl
435@@ -1,4 +1,4 @@
436-#!/usr/local/bin/perl
437+#!/usr/bin/perl
438 # x86 assember
439
440 sub mul_add_c
441--- openssl-0.9.8m.orig/crypto/bn/asm/x86/add.pl
442+++ openssl-0.9.8m/crypto/bn/asm/x86/add.pl
443@@ -1,4 +1,4 @@
444-#!/usr/local/bin/perl
445+#!/usr/bin/perl
446 # x86 assember
447
448 sub bn_add_words
449--- openssl-0.9.8m.orig/crypto/bn/asm/x86/mul.pl
450+++ openssl-0.9.8m/crypto/bn/asm/x86/mul.pl
451@@ -1,4 +1,4 @@
452-#!/usr/local/bin/perl
453+#!/usr/bin/perl
454 # x86 assember
455
456 sub bn_mul_words
457--- openssl-0.9.8m.orig/crypto/bn/asm/x86/mul_add.pl
458+++ openssl-0.9.8m/crypto/bn/asm/x86/mul_add.pl
459@@ -1,4 +1,4 @@
460-#!/usr/local/bin/perl
461+#!/usr/bin/perl
462 # x86 assember
463
464 sub bn_mul_add_words
465--- openssl-0.9.8m.orig/crypto/bn/asm/x86/sqr.pl
466+++ openssl-0.9.8m/crypto/bn/asm/x86/sqr.pl
467@@ -1,4 +1,4 @@
468-#!/usr/local/bin/perl
469+#!/usr/bin/perl
470 # x86 assember
471
472 sub bn_sqr_words
473--- openssl-0.9.8m.orig/crypto/bn/asm/x86/sub.pl
474+++ openssl-0.9.8m/crypto/bn/asm/x86/sub.pl
475@@ -1,4 +1,4 @@
476-#!/usr/local/bin/perl
477+#!/usr/bin/perl
478 # x86 assember
479
480 sub bn_sub_words
481--- openssl-0.9.8m.orig/crypto/bn/asm/x86/div.pl
482+++ openssl-0.9.8m/crypto/bn/asm/x86/div.pl
483@@ -1,4 +1,4 @@
484-#!/usr/local/bin/perl
485+#!/usr/bin/perl
486 # x86 assember
487
488 sub bn_div_words
489--- openssl-0.9.8m.orig/crypto/aes/asm/aes-586.pl
490+++ openssl-0.9.8m/crypto/aes/asm/aes-586.pl
491@@ -1,4 +1,4 @@
492-#!/usr/bin/env perl
493+#!/usr/bin/perl
494 #
495 # ====================================================================
496 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
497--- openssl-0.9.8m.orig/crypto/aes/asm/aes-x86_64.pl
498+++ openssl-0.9.8m/crypto/aes/asm/aes-x86_64.pl
499@@ -1,4 +1,4 @@
500-#!/usr/bin/env perl
501+#!/usr/bin/perl
502 #
503 # ====================================================================
504 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
505--- openssl-0.9.8m.orig/crypto/asn1/charmap.pl
506+++ openssl-0.9.8m/crypto/asn1/charmap.pl
507@@ -1,4 +1,4 @@
508-#!/usr/local/bin/perl -w
509+#!/usr/bin/perl
510
511 use strict;
512
513--- openssl-0.9.8m.orig/util/mksdef.pl
514+++ openssl-0.9.8m/util/mksdef.pl
515@@ -1,4 +1,4 @@
516-
517+#!/usr/bin/perl
518 # Perl script to split libeay32.def into two distinct DEF files for use in
519 # fipdso mode. It works out symbols in each case by running "link" command and
520 # parsing the output to find the list of missing symbols then splitting
521--- openssl-0.9.8m.orig/util/dirname.pl
522+++ openssl-0.9.8m/util/dirname.pl
523@@ -1,4 +1,4 @@
524-#!/usr/local/bin/perl
525+#!/usr/bin/perl
526
527 if ($#ARGV < 0) {
528 die "dirname.pl: too few arguments\n";
529--- openssl-0.9.8m.orig/util/tab_num.pl
530+++ openssl-0.9.8m/util/tab_num.pl
531@@ -1,4 +1,4 @@
532-#!/usr/local/bin/perl
533+#!/usr/bin/perl
534
535 $num=1;
536 $width=40;
537--- openssl-0.9.8m.orig/util/sp-diff.pl
538+++ openssl-0.9.8m/util/sp-diff.pl
539@@ -1,4 +1,4 @@
540-#!/usr/local/bin/perl
541+#!/usr/bin/perl
542 #
543 # This file takes as input, the files that have been output from
544 # ssleay speed.
545--- openssl-0.9.8m.orig/util/mkerr.pl
546+++ openssl-0.9.8m/util/mkerr.pl
547@@ -1,4 +1,4 @@
548-#!/usr/local/bin/perl -w
549+#!/usr/bin/perl
550
551 my $config = "crypto/err/openssl.ec";
552 my $debug = 0;
553--- openssl-0.9.8m.orig/util/clean-depend.pl
554+++ openssl-0.9.8m/util/clean-depend.pl
555@@ -1,4 +1,4 @@
556-#!/usr/local/bin/perl -w
557+#!/usr/bin/perl
558 # Clean the dependency list in a makefile of standard includes...
559 # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
560
561--- openssl-0.9.8m.orig/util/add_cr.pl
562+++ openssl-0.9.8m/util/add_cr.pl
563@@ -1,4 +1,4 @@
564-#!/usr/local/bin/perl
565+#!/usr/bin/perl
566 #
567 # This adds a copyright message to a souce code file.
568 # It also gets the file name correct.
569--- openssl-0.9.8m.orig/util/pod2man.pl
570+++ openssl-0.9.8m/util/pod2man.pl
571@@ -1,4 +1,4 @@
572-: #!/usr/bin/perl-5.005
573+#!/usr/bin/perl
574 eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
575 if $running_under_some_shell;
576
577--- openssl-0.9.8m.orig/util/mkstack.pl
578+++ openssl-0.9.8m/util/mkstack.pl
579@@ -1,4 +1,4 @@
580-#!/usr/local/bin/perl -w
581+#!/usr/bin/perl
582
583 # This is a utility that searches out "DECLARE_STACK_OF()"
584 # declarations in .h and .c files, and updates/creates/replaces
585--- openssl-0.9.8m.orig/util/selftest.pl
586+++ openssl-0.9.8m/util/selftest.pl
587@@ -1,4 +1,4 @@
588-#!/usr/local/bin/perl -w
589+#!/usr/bin/perl
590 #
591 # Run the test suite and generate a report
592 #
593--- openssl-0.9.8m.orig/util/ck_errf.pl
594+++ openssl-0.9.8m/util/ck_errf.pl
595@@ -1,4 +1,4 @@
596-#!/usr/local/bin/perl
597+#!/usr/bin/perl
598 #
599 # This is just a quick script to scan for cases where the 'error'
600 # function name in a XXXerr() macro is wrong.
601--- openssl-0.9.8m.orig/util/mklink.pl
602+++ openssl-0.9.8m/util/mklink.pl
603@@ -1,4 +1,4 @@
604-#!/usr/local/bin/perl
605+#!/usr/bin/perl
606
607 # mklink.pl
608
609--- openssl-0.9.8m.orig/util/src-dep.pl
610+++ openssl-0.9.8m/util/src-dep.pl
611@@ -1,4 +1,4 @@
612-#!/usr/local/bin/perl
613+#!/usr/bin/perl
614
615 # we make up an array of
616 # $file{function_name}=filename;
617--- openssl-0.9.8m.orig/util/deleof.pl
618+++ openssl-0.9.8m/util/deleof.pl
619@@ -1,4 +1,4 @@
620-#!/usr/local/bin/perl
621+#!/usr/bin/perl
622
623 while (<>)
624 {
625--- openssl-0.9.8m.orig/util/arx.pl
626+++ openssl-0.9.8m/util/arx.pl
627@@ -1,4 +1,4 @@
628-#!/bin/perl
629+#!/usr/bin/perl
630
631 # Simple perl script to wrap round "ar" program and exclude any
632 # object files in the environment variable EXCL_OBJ
633--- openssl-0.9.8m.orig/util/copy.pl
634+++ openssl-0.9.8m/util/copy.pl
635@@ -1,4 +1,4 @@
636-#!/usr/local/bin/perl
637+#!/usr/bin/perl
638
639 use Fcntl;
640
641--- openssl-0.9.8m.orig/util/mkdir-p.pl
642+++ openssl-0.9.8m/util/mkdir-p.pl
643@@ -1,4 +1,4 @@
644-#!/usr/local/bin/perl
645+#!/usr/bin/perl
646
647 # mkdir-p.pl
648
649--- openssl-0.9.8m.orig/util/mkdef.pl
650+++ openssl-0.9.8m/util/mkdef.pl
651@@ -1,4 +1,4 @@
652-#!/usr/local/bin/perl -w
653+#!/usr/bin/perl
654 #
655 # generate a .def file
656 #
657--- openssl-0.9.8m.orig/util/files.pl
658+++ openssl-0.9.8m/util/files.pl
659@@ -1,4 +1,4 @@
660-#!/usr/local/bin/perl
661+#!/usr/bin/perl
662 #
663 # used to generate the file MINFO for use by util/mk1mf.pl
664 # It is basically a list of all variables from the passed makefile
665--- openssl-0.9.8m.orig/util/mkfiles.pl
666+++ openssl-0.9.8m/util/mkfiles.pl
667@@ -1,4 +1,4 @@
668-#!/usr/local/bin/perl
669+#!/usr/bin/perl
670 #
671 # This is a hacked version of files.pl for systems that can't do a 'make files'.
672 # Do a perl util/mkminfo.pl >MINFO to build MINFO
673--- openssl-0.9.8m.orig/util/perlpath.pl
674+++ openssl-0.9.8m/util/perlpath.pl
675@@ -1,4 +1,4 @@
676-#!/usr/local/bin/perl
677+#!/usr/bin/perl
678 #
679 # modify the '#!/usr/local/bin/perl'
680 # line in all scripts that rely on perl.
681--- openssl-0.9.8m.orig/util/mk1mf.pl
682+++ openssl-0.9.8m/util/mk1mf.pl
683@@ -1,4 +1,4 @@
684-#!/usr/local/bin/perl
685+#!/usr/bin/perl
686 # A bit of an evil hack but it post processes the file ../MINFO which
687 # is generated by `make files` in the top directory.
688 # This script outputs one mega makefile that has no shell stuff or any
689--- openssl-0.9.8m.orig/util/err-ins.pl
690+++ openssl-0.9.8m/util/err-ins.pl
691@@ -1,4 +1,4 @@
692-#!/usr/local/bin/perl
693+#!/usr/bin/perl
694 #
695 # tack error codes onto the end of a file
696 #
697--- openssl-0.9.8m.orig/util/pl/Mingw32.pl
698+++ openssl-0.9.8m/util/pl/Mingw32.pl
699@@ -1,4 +1,4 @@
700-#!/usr/local/bin/perl
701+#!/usr/bin/perl
702 #
703 # Mingw32.pl -- Mingw
704 #
705--- openssl-0.9.8m.orig/util/pl/unix.pl
706+++ openssl-0.9.8m/util/pl/unix.pl
707@@ -1,4 +1,4 @@
708-#!/usr/local/bin/perl
709+#!/usr/bin/perl
710 #
711 # unix.pl - the standard unix makefile stuff.
712 #
713--- openssl-0.9.8m.orig/util/pl/netware.pl
714+++ openssl-0.9.8m/util/pl/netware.pl
715@@ -1,4 +1,4 @@
716-# Metrowerks Codewarrior or gcc / nlmconv for NetWare
717+#!/usr/bin/perl
718 #
719
720 $version_header = "crypto/opensslv.h";
721--- openssl-0.9.8m.orig/util/pl/VC-32.pl
722+++ openssl-0.9.8m/util/pl/VC-32.pl
723@@ -1,4 +1,4 @@
724-#!/usr/local/bin/perl
725+#!/usr/bin/perl
726 # VC-32.pl - unified script for Microsoft Visual C++, covering Win32,
727 # Win64 and WinCE [follow $FLAVOR variable to trace the differences].
728 #
729--- openssl-0.9.8m.orig/util/pl/OS2-EMX.pl
730+++ openssl-0.9.8m/util/pl/OS2-EMX.pl
731@@ -1,4 +1,4 @@
732-#!/usr/local/bin/perl
733+#!/usr/bin/perl
734 #
735 # OS2-EMX.pl - for EMX GCC on OS/2
736 #
737--- openssl-0.9.8m.orig/util/pl/ultrix.pl
738+++ openssl-0.9.8m/util/pl/ultrix.pl
739@@ -1,4 +1,4 @@
740-#!/usr/local/bin/perl
741+#!/usr/bin/perl
742 #
743 # linux.pl - the standard unix makefile stuff.
744 #
745--- openssl-0.9.8m.orig/util/pl/linux.pl
746+++ openssl-0.9.8m/util/pl/linux.pl
747@@ -1,4 +1,4 @@
748-#!/usr/local/bin/perl
749+#!/usr/bin/perl
750 #
751 # linux.pl - the standard unix makefile stuff.
752 #
753--- openssl-0.9.8m.orig/util/pl/BC-32.pl
754+++ openssl-0.9.8m/util/pl/BC-32.pl
755@@ -1,4 +1,4 @@
756-#!/usr/local/bin/perl
757+#!/usr/bin/perl
758 # Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si>
759 #
760
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/pic.patch b/meta/packages/openssl/openssl-0.9.8o/debian/pic.patch
deleted file mode 100644
index b534afa66c..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/pic.patch
+++ /dev/null
@@ -1,301 +0,0 @@
1Index: openssl-0.9.8o/crypto/Makefile
2===================================================================
3--- openssl-0.9.8o.orig/crypto/Makefile 2008-09-17 17:10:55.000000000 +0000
4+++ openssl-0.9.8o/crypto/Makefile 2010-06-06 13:09:28.000000000 +0000
5@@ -57,7 +57,7 @@
6 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
7 echo '#endif' ) >buildinf.h
8
9-x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
10+x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl
11 $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
12 x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
13 $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
14@@ -70,7 +70,7 @@
15 uplink-cof.s: ../ms/uplink.pl
16 $(PERL) ../ms/uplink.pl coff > $@
17
18-x86_64cpuid.s: x86_64cpuid.pl
19+x86_64cpuid.S: x86_64cpuid.pl
20 $(PERL) x86_64cpuid.pl $@
21 ia64cpuid.s: ia64cpuid.S
22 $(CC) $(CFLAGS) -E ia64cpuid.S > $@
23Index: openssl-0.9.8o/crypto/x86_64cpuid.pl
24===================================================================
25--- openssl-0.9.8o.orig/crypto/x86_64cpuid.pl 2007-11-11 16:25:00.000000000 +0000
26+++ openssl-0.9.8o/crypto/x86_64cpuid.pl 2010-06-06 13:09:28.000000000 +0000
27@@ -95,7 +95,11 @@
28 .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
29
30 .section .init
31+#ifdef OPENSSL_PIC
32+ call OPENSSL_cpuid_setup\@PLT
33+#else
34 call OPENSSL_cpuid_setup
35+#endif
36
37 ___
38
39Index: openssl-0.9.8o/crypto/md5/Makefile
40===================================================================
41--- openssl-0.9.8o.orig/crypto/md5/Makefile 2008-09-17 17:11:02.000000000 +0000
42+++ openssl-0.9.8o/crypto/md5/Makefile 2010-06-06 13:09:28.000000000 +0000
43@@ -52,7 +52,8 @@
44 mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
45 (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
46
47-md5-x86_64.s: asm/md5-x86_64.pl; $(PERL) asm/md5-x86_64.pl $@
48+md5-x86_64.s: asm/md5-x86_64.pl
49+ $(PERL) asm/md5-x86_64.pl $@
50
51 files:
52 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
53Index: openssl-0.9.8o/crypto/des/asm/desboth.pl
54===================================================================
55--- openssl-0.9.8o.orig/crypto/des/asm/desboth.pl 2001-10-24 21:20:56.000000000 +0000
56+++ openssl-0.9.8o/crypto/des/asm/desboth.pl 2010-06-06 13:09:28.000000000 +0000
57@@ -16,6 +16,11 @@
58
59 &push("edi");
60
61+ &call (&label("pic_point0"));
62+ &set_label("pic_point0");
63+ &blindpop("ebp");
64+ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
65+
66 &comment("");
67 &comment("Load the data words");
68 &mov($L,&DWP(0,"ebx","",0));
69@@ -47,15 +52,21 @@
70 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
71 &mov(&swtmp(1), "eax");
72 &mov(&swtmp(0), "ebx");
73- &call("DES_encrypt2");
74+ &exch("ebx", "ebp");
75+ &call("DES_encrypt2\@PLT");
76+ &exch("ebx", "ebp");
77 &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
78 &mov(&swtmp(1), "edi");
79 &mov(&swtmp(0), "ebx");
80- &call("DES_encrypt2");
81+ &exch("ebx", "ebp");
82+ &call("DES_encrypt2\@PLT");
83+ &exch("ebx", "ebp");
84 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
85 &mov(&swtmp(1), "esi");
86 &mov(&swtmp(0), "ebx");
87- &call("DES_encrypt2");
88+ &exch("ebx", "ebp");
89+ &call("DES_encrypt2\@PLT");
90+ &exch("ebx", "ebp");
91
92 &stack_pop(3);
93 &mov($L,&DWP(0,"ebx","",0));
94Index: openssl-0.9.8o/crypto/rc4/Makefile
95===================================================================
96--- openssl-0.9.8o.orig/crypto/rc4/Makefile 2008-11-19 16:03:50.000000000 +0000
97+++ openssl-0.9.8o/crypto/rc4/Makefile 2010-06-06 13:09:28.000000000 +0000
98@@ -51,7 +51,7 @@
99 rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
100 (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
101
102-rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
103+rc4-x86_64.S: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
104
105 rc4-ia64.s: asm/rc4-ia64.S
106 @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
107Index: openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl
108===================================================================
109--- openssl-0.9.8o.orig/crypto/rc4/asm/rc4-x86_64.pl 2008-09-16 10:47:27.000000000 +0000
110+++ openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl 2010-06-06 13:09:28.000000000 +0000
111@@ -270,7 +270,11 @@
112 xor %r10,%r10
113 xor %r11,%r11
114
115+#ifdef OPENSSL_PIC
116+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx#d
117+#else
118 mov OPENSSL_ia32cap_P(%rip),$idx#d
119+#endif
120 bt \$20,$idx#d
121 jnc .Lw1stloop
122 bt \$30,$idx#d
123@@ -338,7 +342,11 @@
124 RC4_options:
125 .picmeup %rax
126 lea .Lopts-.(%rax),%rax
127+#ifdef OPENSSL_PIC
128+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%edx
129+#else
130 mov OPENSSL_ia32cap_P(%rip),%edx
131+#endif
132 bt \$20,%edx
133 jnc .Ldone
134 add \$12,%rax
135Index: openssl-0.9.8o/crypto/perlasm/x86unix.pl
136===================================================================
137--- openssl-0.9.8o.orig/crypto/perlasm/x86unix.pl 2008-05-01 23:11:32.000000000 +0000
138+++ openssl-0.9.8o/crypto/perlasm/x86unix.pl 2010-06-06 13:09:28.000000000 +0000
139@@ -400,6 +400,29 @@
140 $stack=4;
141 }
142
143+sub main'function_begin_B_static
144+ {
145+ local($func,$extra)=@_;
146+
147+ &main'external_label($func);
148+ $func=$under.$func;
149+
150+ local($tmp)=<<"EOF";
151+.text
152+EOF
153+ push(@out,$tmp);
154+ if ($main'cpp)
155+ { push(@out,"TYPE($func,\@function)\n"); }
156+ elsif ($main'coff)
157+ { $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
158+ elsif ($main'aout and !$main'pic)
159+ { }
160+ else { push(@out,".type $func,\@function\n"); }
161+ push(@out,".align\t$align\n");
162+ push(@out,"$func:\n");
163+ $stack=4;
164+ }
165+
166 sub main'function_end
167 {
168 local($func)=@_;
169@@ -694,7 +717,17 @@
170 {
171 $tmp=<<___;
172 .section .init
173+#ifdef OPENSSL_PIC
174+ pushl %ebx
175+ call .pic_point0
176+.pic_point0:
177+ popl %ebx
178+ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
179+ call $under$f\@PLT
180+ popl %ebx
181+#else
182 call $under$f
183+#endif
184 jmp .Linitalign
185 .align $align
186 .Linitalign:
187Index: openssl-0.9.8o/crypto/perlasm/cbc.pl
188===================================================================
189--- openssl-0.9.8o.orig/crypto/perlasm/cbc.pl 2005-05-09 21:48:00.000000000 +0000
190+++ openssl-0.9.8o/crypto/perlasm/cbc.pl 2010-06-06 13:09:28.000000000 +0000
191@@ -122,7 +122,11 @@
192 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
193 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
194
195- &call($enc_func);
196+ &call (&label("pic_point0"));
197+ &set_label("pic_point0");
198+ &blindpop("ebx");
199+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
200+ &call("$enc_func\@PLT");
201
202 &mov("eax", &DWP($data_off,"esp","",0));
203 &mov("ebx", &DWP($data_off+4,"esp","",0));
204@@ -187,7 +191,11 @@
205 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
206 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
207
208- &call($enc_func);
209+ &call (&label("pic_point1"));
210+ &set_label("pic_point1");
211+ &blindpop("ebx");
212+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
213+ &call("$enc_func\@PLT");
214
215 &mov("eax", &DWP($data_off,"esp","",0));
216 &mov("ebx", &DWP($data_off+4,"esp","",0));
217@@ -220,7 +228,11 @@
218 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
219 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
220
221- &call($dec_func);
222+ &call (&label("pic_point2"));
223+ &set_label("pic_point2");
224+ &blindpop("ebx");
225+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
226+ &call("$dec_func\@PLT");
227
228 &mov("eax", &DWP($data_off,"esp","",0)); # get return
229 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
230@@ -263,7 +275,11 @@
231 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
232 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
233
234- &call($dec_func);
235+ &call (&label("pic_point3"));
236+ &set_label("pic_point3");
237+ &blindpop("ebx");
238+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
239+ &call("$dec_func\@PLT");
240
241 &mov("eax", &DWP($data_off,"esp","",0)); # get return
242 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
243Index: openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl
244===================================================================
245--- openssl-0.9.8o.orig/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:00.000000000 +0000
246+++ openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:28.000000000 +0000
247@@ -435,7 +435,7 @@
248
249 chomp($line);
250
251- $line =~ s|[#!].*$||; # get rid of asm-style comments...
252+# $line =~ s|[#!].*$||; # get rid of asm-style comments...
253 $line =~ s|/\*.*\*/||; # ... and C-style comments...
254 $line =~ s|^\s+||; # ... and skip white spaces in beginning
255
256Index: openssl-0.9.8o/crypto/aes/asm/aes-586.pl
257===================================================================
258--- openssl-0.9.8o.orig/crypto/aes/asm/aes-586.pl 2008-12-17 14:14:51.000000000 +0000
259+++ openssl-0.9.8o/crypto/aes/asm/aes-586.pl 2010-06-06 13:09:28.000000000 +0000
260@@ -250,7 +250,7 @@
261 sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } }
262
263 &public_label("AES_Te");
264-&function_begin_B("_x86_AES_encrypt");
265+&function_begin_B_static("_x86_AES_encrypt");
266 if ($vertical_spin) {
267 # I need high parts of volatile registers to be accessible...
268 &exch ($s1="edi",$key="ebx");
269@@ -539,7 +539,7 @@
270 }
271
272 &public_label("AES_Td");
273-&function_begin_B("_x86_AES_decrypt");
274+&function_begin_B_static("_x86_AES_decrypt");
275 # note that caller is expected to allocate stack frame for me!
276 &mov (&DWP(12,"esp"),$key); # save key
277
278@@ -1461,15 +1461,22 @@
279 &public_label("AES_Td");
280 &public_label("AES_Te");
281 &function_begin_B("AES_set_decrypt_key");
282+ &push ("ebx");
283 &mov ("eax",&wparam(0));
284 &mov ("ecx",&wparam(1));
285 &mov ("edx",&wparam(2));
286 &sub ("esp",12);
287+
288+ &call (&label("pic_point0"));
289+ &set_label("pic_point0");
290+ &blindpop("ebx");
291+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
292 &mov (&DWP(0,"esp"),"eax");
293 &mov (&DWP(4,"esp"),"ecx");
294 &mov (&DWP(8,"esp"),"edx");
295- &call ("AES_set_encrypt_key");
296+ &call ("AES_set_encrypt_key\@PLT");
297 &add ("esp",12);
298+ &pop ("ebx");
299 &cmp ("eax",0);
300 &je (&label("proceed"));
301 &ret ();
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/pkg-config.patch b/meta/packages/openssl/openssl-0.9.8o/debian/pkg-config.patch
deleted file mode 100644
index 38923b08bf..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/pkg-config.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:34:56.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:36:02.000000000 +0200
5@@ -444,7 +444,8 @@
6 echo 'Description: OpenSSL cryptography library'; \
7 echo 'Version: '$(VERSION); \
8 echo 'Requires: '; \
9- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
10+ echo 'Libs: -L$${libdir} -lcrypto'; \
11+ echo 'Libs.private: $(EX_LIBS)'; \
12 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
13
14 libssl.pc: Makefile
15@@ -457,7 +458,8 @@
16 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
17 echo 'Version: '$(VERSION); \
18 echo 'Requires: '; \
19- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
20+ echo 'Libs: -L$${libdir} -lssl'; \
21+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
22 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
23
24 openssl.pc: Makefile
25@@ -470,7 +472,8 @@
26 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
27 echo 'Version: '$(VERSION); \
28 echo 'Requires: '; \
29- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
30+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
31+ echo 'Libs.private: $(EX_LIBS)'; \
32 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
33
34 Makefile: Makefile.org Configure config
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/rc4-amd64.patch b/meta/packages/openssl/openssl-0.9.8o/debian/rc4-amd64.patch
deleted file mode 100644
index 6f0421a014..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/rc4-amd64.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1Index: openssl-0.9.8k/Configure
2===================================================================
3--- openssl-0.9.8k.orig/Configure 2009-07-19 11:32:41.000000000 +0200
4+++ openssl-0.9.8k/Configure 2009-07-19 11:37:10.000000000 +0200
5@@ -128,6 +128,9 @@
6 my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o MAYBE-MO86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o rc4_skey.o:rm86-out.o:r586-out.o";
7
8 my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o::";
9+# rc4 asm is disabled on amd64 because we configured it with RC4_CHAR while
10+# the assembler only works with int
11+my $x86_64_asm_linux="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::::";
12 my $ia64_asm=":bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o::";
13
14 my $no_asm="::::::::::";
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/rehash-crt.patch b/meta/packages/openssl/openssl-0.9.8o/debian/rehash-crt.patch
deleted file mode 100644
index a8ff28c6f3..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/rehash-crt.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1Index: openssl-0.9.8k/tools/c_rehash.in
2===================================================================
3--- openssl-0.9.8k.orig/tools/c_rehash.in 2002-10-11 22:31:27.000000000 +0200
4+++ openssl-0.9.8k/tools/c_rehash.in 2009-07-19 11:36:26.000000000 +0200
5@@ -59,12 +59,15 @@
6 }
7 }
8 closedir DIR;
9- FILE: foreach $fname (grep {/\.pem$/} @flist) {
10+ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
11 # Check to see if certificates and/or CRLs present.
12 my ($cert, $crl) = check_file($fname);
13 if(!$cert && !$crl) {
14- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
15- next;
16+ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
17+ if(!$cert && !$crl) {
18+ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
19+ next;
20+ }
21 }
22 link_hash_cert($fname) if($cert);
23 link_hash_crl($fname) if($crl);
24@@ -102,6 +105,9 @@
25 my $fname = $_[0];
26 $fname =~ s/'/'\\''/g;
27 my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
28+ if(!$hash || !fprint) {
29+ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
30+ }
31 chomp $hash;
32 chomp $fprint;
33 $fprint =~ s/^.*=//;
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/rehash_pod.patch b/meta/packages/openssl/openssl-0.9.8o/debian/rehash_pod.patch
deleted file mode 100644
index 94792c48e5..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/rehash_pod.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1Index: openssl-0.9.8k/doc/apps/c_rehash.pod
2===================================================================
3--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4+++ openssl-0.9.8k/doc/apps/c_rehash.pod 2009-07-19 11:36:27.000000000 +0200
5@@ -0,0 +1,55 @@
6+
7+=pod
8+
9+=head1 NAME
10+
11+c_rehash - Create symbolic links to files named by the hash values
12+
13+=head1 SYNOPSIS
14+
15+B<c_rehash>
16+[directory] ...
17+
18+=head1 DESCRIPTION
19+
20+c_rehash scans directories and takes a hash value of each .pem and .crt file in the directory. It then creates symbolic links for each of the files named by the hash value. This is useful as many programs require directories to be set up like this in order to find the certificates they require.
21+
22+If any directories are named on the command line then these directories are processed in turn. If not then and the environment variable SSL_CERT_DIR is defined then that is consulted. This variable should be a colon (:) separated list of directories, all of which will be processed. If neither of these conditions are true then /usr/lib/ssl/certs is processed.
23+
24+For each directory that is to be processed he user must have write permissions on the directory, if they do not then nothing will be printed for that directory.
25+
26+Note that this program deletes all the symbolic links that look like ones that it creates before processing a directory. Beware that if you run the program on a directory that contains symbolic links for other purposes that are named in the same format as those created by this program they will be lost.
27+
28+The hashes for certificate files are of the form <hash>.<n> where n is an integer. If the hash value already exists then n will be incremented, unless the file is a duplicate. Duplicates are detected using the fingerprint of the certificate. A warning will be printed if a duplicate is detected. The hashes for CRL files are of the form <hash>.r<n> and have the same behavior.
29+
30+The program will also warn if there are files with extension .pem which are not certificate or CRL files.
31+
32+The program uses the openssl program to compute the hashes and fingerprints. It expects the executable to be named openssl and be on the PATH, or in the /usr/lib/ssl/bin directory. If the OPENSSL environment variable is defined then this is used instead as the executable that provides the hashes and fingerprints. When called as $OPENSSL x509 -hash -fingerprint -noout -in $file it must output the hash of $file on the first line followed by the fingerprint on the second line, optionally prefixed with some text and an equals sign (=).
33+
34+=head1 OPTIONS
35+
36+None
37+
38+=head1 ENVIRONMENT
39+
40+=over 4
41+
42+=item B<OPENSSL>
43+
44+The name (and path) of an executable to use to generate hashes and fingerprints (see above).
45+
46+=item B<SSL_CERT_DIR>
47+
48+Colon separated list of directories to operate on. Ignored if directories are listed on the command line.
49+
50+=head1 SEE ALSO
51+
52+L<openssl(1)|openssl(1)>, L<x509(1)|x509(1)>
53+
54+=back
55+
56+=head1 BUGS
57+
58+No known bugs
59+
60+=cut
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/series b/meta/packages/openssl/openssl-0.9.8o/debian/series
deleted file mode 100644
index b764c0414d..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/series
+++ /dev/null
@@ -1,20 +0,0 @@
1ca.patch
2config-hurd.patch
3debian-targets.patch
4engines-path.patch
5kfreebsd-pipe.patch
6make-targets.patch
7man-dir.patch
8man-section.patch
9no-rpath.patch
10no-symbolic.patch
11pic.patch
12pkg-config.patch
13valgrind.patch
14rc4-amd64.patch
15rehash-crt.patch
16rehash_pod.patch
17shared-lib-ext.patch
18stddef.patch
19version-script.patch
20perl-path.diff
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch b/meta/packages/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch
deleted file mode 100644
index d27e9b2398..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1Index: openssl-0.9.8k/Configure
2===================================================================
3--- openssl-0.9.8k.orig/Configure 2009-07-19 11:36:24.000000000 +0200
4+++ openssl-0.9.8k/Configure 2009-07-19 11:37:03.000000000 +0200
5@@ -1568,7 +1568,8 @@
6 elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
7 {
8 my $sotmp = $1;
9- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
10+# s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
11+ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
12 }
13 elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
14 {
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/stddef.patch b/meta/packages/openssl/openssl-0.9.8o/debian/stddef.patch
deleted file mode 100644
index bb65b23319..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/stddef.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: openssl-0.9.8k/crypto/sha/sha.h
2===================================================================
3--- openssl-0.9.8k.orig/crypto/sha/sha.h 2008-09-16 12:47:28.000000000 +0200
4+++ openssl-0.9.8k/crypto/sha/sha.h 2009-07-19 11:36:28.000000000 +0200
5@@ -59,6 +59,7 @@
6 #ifndef HEADER_SHA_H
7 #define HEADER_SHA_H
8
9+#include <stddef.h>
10 #include <openssl/e_os2.h>
11 #include <stddef.h>
12
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/valgrind.patch b/meta/packages/openssl/openssl-0.9.8o/debian/valgrind.patch
deleted file mode 100644
index e9f86eabbf..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/valgrind.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1Index: openssl-0.9.8k/crypto/rand/md_rand.c
2===================================================================
3--- openssl-0.9.8k.orig/crypto/rand/md_rand.c 2008-09-16 13:50:05.000000000 +0200
4+++ openssl-0.9.8k/crypto/rand/md_rand.c 2009-07-19 11:36:05.000000000 +0200
5@@ -477,8 +477,10 @@
6 MD_Update(&m,local_md,MD_DIGEST_LENGTH);
7 MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
8 #ifndef PURIFY
9+#if 0 /* Don't add uninitialised data. */
10 MD_Update(&m,buf,j); /* purify complains */
11 #endif
12+#endif
13 k=(st_idx+MD_DIGEST_LENGTH/2)-st_num;
14 if (k > 0)
15 {
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/version-script.patch b/meta/packages/openssl/openssl-0.9.8o/debian/version-script.patch
deleted file mode 100644
index 64d8fc7fa2..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/debian/version-script.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1Index: openssl-0.9.8m/Configure
2===================================================================
3--- openssl-0.9.8m.orig/Configure 2010-02-27 12:28:32.000000000 +0100
4+++ openssl-0.9.8m/Configure 2010-02-27 12:28:35.000000000 +0100
5@@ -1512,6 +1512,8 @@
6 }
7 }
8
9+$shared_ldflag .= " -Wl,--version-script=openssl.ld";
10+
11 open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
12 unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
13 open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
14Index: openssl-0.9.8m/openssl.ld
15===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ openssl-0.9.8m/openssl.ld 2010-02-27 12:28:35.000000000 +0100
18@@ -0,0 +1,5 @@
19+OPENSSL_0.9.8 {
20+ global:
21+ *;
22+};
23+
24Index: openssl-0.9.8m/engines/openssl.ld
25===================================================================
26--- /dev/null 1970-01-01 00:00:00.000000000 +0000
27+++ openssl-0.9.8m/engines/openssl.ld 2010-02-27 12:28:35.000000000 +0100
28@@ -0,0 +1,5 @@
29+OPENSSL_0.9.8 {
30+ global:
31+ *;
32+};
33+
diff --git a/meta/packages/openssl/openssl-0.9.8o/shared-libs.patch b/meta/packages/openssl/openssl-0.9.8o/shared-libs.patch
deleted file mode 100644
index 10d9146dc9..0000000000
--- a/meta/packages/openssl/openssl-0.9.8o/shared-libs.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1diff --git a/Makefile.org b/Makefile.org
2index e87d623..25ff367 100644
3--- a/Makefile.org
4+++ b/Makefile.org
5@@ -355,7 +355,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
6 @if [ "$(SHLIB_TARGET)" != "" ]; then \
7 if [ "$(FIPSCANLIB)" = "libfips" ]; then \
8 $(ARD) libcrypto.a fipscanister.o ; \
9- $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
10+ $(MAKE) -e SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
11 $(AR) libcrypto.a fips/fipscanister.o ; \
12 else \
13 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
14@@ -373,7 +373,7 @@ libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
15 @if [ "$(SHLIB_TARGET)" != "" ]; then \
16 shlibdeps=-lcrypto; \
17 [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
18- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
19+ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
20 else \
21 echo "There's no support for shared libraries on this platform" >&2 ; \
22 exit 1; \
23diff --git a/crypto/Makefile b/crypto/Makefile
24index 6557f2b..a69bf7c 100644
25--- a/crypto/Makefile
26+++ b/crypto/Makefile
27@@ -103,7 +103,7 @@ $(LIB): $(LIBOBJ)
28
29 shared: buildinf.h lib subdirs
30 if [ -n "$(SHARED_LIBS)" ]; then \
31- (cd ..; $(MAKE) $(SHARED_LIB)); \
32+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
33 fi
34
35 libs:
36diff --git a/ssl/Makefile b/ssl/Makefile
37index 5ac3507..77ea2bd 100644
38--- a/ssl/Makefile
39+++ b/ssl/Makefile
40@@ -62,7 +62,7 @@ lib: $(LIBOBJ)
41
42 shared: lib
43 if [ -n "$(SHARED_LIBS)" ]; then \
44- (cd ..; $(MAKE) $(SHARED_LIB)); \
45+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
46 fi
47
48 files:
diff --git a/meta/packages/openssl/openssl.inc b/meta/packages/openssl/openssl.inc
deleted file mode 100644
index 2482585c64..0000000000
--- a/meta/packages/openssl/openssl.inc
+++ /dev/null
@@ -1,100 +0,0 @@
1DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
2HOMEPAGE = "http://www.openssl.org/"
3BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
4SECTION = "libs/network"
5
6# "openssl | SSLeay" dual license
7LICENSE = "openssl"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=83d26c69f6f0172ee7f795790424b453"
9
10DEPENDS = "perl-native"
11
12SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz"
13S = "${WORKDIR}/openssl-${PV}"
14
15AR_append = " r"
16CFLAG = "${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
17 -DTERMIO ${FULL_OPTIMIZATION} -Wall"
18
19# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
20CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
21CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}"
22
23export DIRS = "crypto ssl apps"
24export EX_LIBS = "-lgcc -ldl"
25export AS = "${CC} -c"
26
27PARALLEL_MAKE = ""
28
29inherit pkgconfig siteinfo
30
31PACKAGES =+ "libcrypto libssl"
32FILES_libcrypto = "${libdir}/libcrypto.so.*"
33FILES_libssl = "${libdir}/libssl.so.*"
34FILES_${PN} =+ " ${libdir}/ssl/*"
35
36do_configure () {
37 cd util
38 perl perlpath.pl ${bindir}
39 cd ..
40 ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
41
42 os=${HOST_OS}
43 if [ "x$os" = "xlinux-uclibc" ]; then
44 os=linux
45 fi
46 target="$os-${HOST_ARCH}"
47 case $target in
48 linux-arm)
49 target=linux-elf-arm
50 ;;
51 linux-armeb)
52 target=linux-elf-armeb
53 ;;
54 linux-sh3)
55 target=debian-sh3
56 ;;
57 linux-sh4)
58 target=debian-sh4
59 ;;
60 linux-i486)
61 target=debian-i386-i486
62 ;;
63 linux-i586)
64 target=debian-i386-i586
65 ;;
66 linux-i686)
67 target=debian-i386-i686/cmov
68 ;;
69 linux-mips)
70 target=debian-mips
71 ;;
72 linux-mipsel)
73 target=debian-mipsel
74 ;;
75 linux-powerpc)
76 target=linux-ppc
77 ;;
78 linux-supersparc)
79 target=linux-sparcv8
80 ;;
81 linux-sparc)
82 target=linux-sparcv8
83 ;;
84 esac
85 # inject machine-specific flags
86 sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure
87 perl ./Configure shared --prefix=${prefix} --openssldir=${libdir}/ssl $target
88}
89
90do_compile () {
91 oe_runmake
92}
93
94do_install () {
95 install -m 0755 -d ${D}${libdir}/pkgconfig
96 oe_runmake INSTALL_PREFIX="${D}" install
97 chmod 644 ${D}${libdir}/pkgconfig/openssl.pc
98 oe_libinstall -so libcrypto ${D}${libdir}
99 oe_libinstall -so libssl ${D}${libdir}
100}
diff --git a/meta/packages/openssl/openssl_0.9.8o.bb b/meta/packages/openssl/openssl_0.9.8o.bb
deleted file mode 100644
index 31c5568ba1..0000000000
--- a/meta/packages/openssl/openssl_0.9.8o.bb
+++ /dev/null
@@ -1,28 +0,0 @@
1require openssl.inc
2
3PR = "r0"
4SRC_URI += "file://debian/ca.patch \
5 file://debian/config-hurd.patch;apply=no \
6 file://debian/debian-targets.patch \
7 file://debian/engines-path.patch \
8 file://debian/kfreebsd-pipe.patch;apply=no \
9 file://debian/make-targets.patch \
10 file://debian/man-dir.patch \
11 file://debian/man-section.patch \
12 file://debian/no-rpath.patch \
13 file://debian/no-symbolic.patch \
14 file://debian/pic.patch \
15 file://debian/pkg-config.patch \
16 file://debian/valgrind.patch \
17 file://debian/rc4-amd64.patch \
18 file://debian/rehash-crt.patch \
19 file://debian/rehash_pod.patch \
20 file://debian/shared-lib-ext.patch \
21 file://debian/stddef.patch \
22 file://debian/version-script.patch \
23 file://debian/perl-path.diff"
24
25SRC_URI += "file://configure-targets.patch \
26 file://shared-libs.patch"
27
28BBCLASSEXTEND = "native"
diff --git a/meta/packages/openswan/openswan-2.4.7/installflags.patch b/meta/packages/openswan/openswan-2.4.7/installflags.patch
deleted file mode 100644
index e6da2eaa5f..0000000000
--- a/meta/packages/openswan/openswan-2.4.7/installflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: openswan-2.4.7/Makefile.inc
2===================================================================
3--- openswan-2.4.7.orig/Makefile.inc 2006-12-25 18:05:40.608503250 +0100
4+++ openswan-2.4.7/Makefile.inc 2006-12-25 18:06:39.028154250 +0100
5@@ -158,7 +158,7 @@
6 # how backup names are composed.
7 # Note that the install procedures will never overwrite an existing config
8 # file, which is why -b is not specified for them.
9-INSTBINFLAGS=-b --suffix=.old
10+INSTBINFLAGS=
11 INSTSUIDFLAGS=--mode=u+rxs,g+rx,o+rx --group=root -b --suffix=.old
12 INSTMANFLAGS=
13 INSTCONFFLAGS=
diff --git a/meta/packages/openswan/openswan-2.4.7/ld-library-path-breakage.patch b/meta/packages/openswan/openswan-2.4.7/ld-library-path-breakage.patch
deleted file mode 100644
index e3cc8762cc..0000000000
--- a/meta/packages/openswan/openswan-2.4.7/ld-library-path-breakage.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1--- openswan-2.2.0.orig/programs/Makefile.program 2004-06-03 03:06:27.000000000 +0200
2+++ openswan-2.2.0/programs/Makefile.program 2005-03-05 13:50:19.000000000 +0100
3@@ -30,10 +30,6 @@
4
5 CFLAGS+= ${WERROR}
6
7-ifneq ($(LD_LIBRARY_PATH),)
8-LDFLAGS=-L$(LD_LIBRARY_PATH)
9-endif
10-
11 MANDIR8=$(MANTREE)/man8
12 MANDIR5=$(MANTREE)/man5
13
14--- openswan-2.2.0.orig/programs/pluto/Makefile 2005-01-03 20:40:45.000000000 +0100
15+++ openswan-2.2.0/programs/pluto/Makefile 2005-03-05 13:51:21.000000000 +0100
16@@ -234,10 +234,6 @@
17 LIBSPLUTO+=${CURL_LIBS}
18 LIBSPLUTO+= -lgmp -lresolv # -lefence
19
20-ifneq ($(LD_LIBRARY_PATH),)
21-LDFLAGS=-L$(LD_LIBRARY_PATH)
22-endif
23-
24 LIBSADNS = $(OPENSWANLIB)
25 LIBSADNS += -lresolv # -lefence
26
diff --git a/meta/packages/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch b/meta/packages/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch
deleted file mode 100644
index b3863a584b..0000000000
--- a/meta/packages/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch
+++ /dev/null
@@ -1,377 +0,0 @@
1diff -Nru openswan-2.4.7.orig/doc/Makefile openswan-2.4.7/doc/Makefile
2--- openswan-2.4.7.orig/doc/Makefile 2005-11-08 23:32:45.000000000 +0200
3+++ openswan-2.4.7/doc/Makefile 2006-12-06 22:46:54.732830840 +0200
4@@ -1,6 +1,6 @@
5 # Makefile to generate various formats from HTML source
6 #
7-# Assumes the htmldoc utility is available.
8+# No longer cares if the htmldoc utility is available.
9 # This can be downloaded from www.easysw.com
10 #
11 # Also needs lynx(1) for HTML-to-text conversion
12diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/crypt586.pl openswan-2.4.7/lib/libcrypto/libdes/asm/crypt586.pl
13--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/crypt586.pl 2004-07-16 03:24:45.000000000 +0300
14+++ openswan-2.4.7/lib/libcrypto/libdes/asm/crypt586.pl 2006-12-06 22:46:54.732830840 +0200
15@@ -1,4 +1,4 @@
16-#!/usr/local/bin/perl
17+#!/usr/bin/perl
18 #
19 # The inner loop instruction sequence and the IP/FP modifications are from
20 # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
21diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/cbc.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/cbc.pl
22--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/cbc.pl 2004-07-10 11:07:06.000000000 +0300
23+++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/cbc.pl 2006-12-06 22:46:54.736831090 +0200
24@@ -1,4 +1,4 @@
25-#!/usr/local/bin/perl
26+#!/usr/bin/perl
27
28 # void des_ncbc_encrypt(input, output, length, schedule, ivec, enc)
29 # des_cblock (*input);
30diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86asm.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86asm.pl
31--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86asm.pl 2004-07-10 11:07:06.000000000 +0300
32+++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86asm.pl 2006-12-06 22:46:54.736831090 +0200
33@@ -1,4 +1,4 @@
34-#!/usr/local/bin/perl
35+#!/usr/bin/perl
36
37 # require 'x86asm.pl';
38 # &asm_init("cpp","des-586.pl");
39diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86ms.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86ms.pl
40--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86ms.pl 2004-07-10 11:07:07.000000000 +0300
41+++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86ms.pl 2006-12-06 22:46:54.736831090 +0200
42@@ -1,4 +1,4 @@
43-#!/usr/local/bin/perl
44+#!/usr/bin/perl
45
46 package x86ms;
47
48diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86unix.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86unix.pl
49--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86unix.pl 2004-07-10 11:07:07.000000000 +0300
50+++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86unix.pl 2006-12-06 22:46:54.736831090 +0200
51@@ -1,4 +1,4 @@
52-#!/usr/local/bin/perl
53+#!/usr/bin/perl
54
55 package x86unix;
56
57diff -Nru openswan-2.4.7.orig/lib/liblwres/Makefile openswan-2.4.7/lib/liblwres/Makefile
58--- openswan-2.4.7.orig/lib/liblwres/Makefile 2004-12-18 20:13:34.000000000 +0200
59+++ openswan-2.4.7/lib/liblwres/Makefile 2006-12-06 22:46:54.736831090 +0200
60@@ -20,7 +20,7 @@
61 CDEFINES = -g
62 CWARNINGS = -Werror
63
64-CFLAGS=${CINCLUDES} ${CDEFINES} ${CWARNINGS}
65+CFLAGS=${CINCLUDES} ${CDEFINES} ${CWARNINGS} $(USERCOMPILE)
66
67 VERSION="@(\#) openswan-hacking-9.3-for-osw2"
68 LIBINTERFACE=2
69diff -Nru openswan-2.4.7.orig/linux/net/ipsec/des/asm/des-586.pl openswan-2.4.7/linux/net/ipsec/des/asm/des-586.pl
70--- openswan-2.4.7.orig/linux/net/ipsec/des/asm/des-586.pl 2004-07-10 11:06:50.000000000 +0300
71+++ openswan-2.4.7/linux/net/ipsec/des/asm/des-586.pl 2006-12-06 22:46:54.736831090 +0200
72@@ -1,4 +1,4 @@
73-#!/usr/local/bin/perl
74+#!/usr/bin/perl
75 #
76 # The inner loop instruction sequence and the IP/FP modifications are from
77 # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
78diff -Nru openswan-2.4.7.orig/linux/net/ipsec/des/asm/des686.pl openswan-2.4.7/linux/net/ipsec/des/asm/des686.pl
79--- openswan-2.4.7.orig/linux/net/ipsec/des/asm/des686.pl 2004-07-10 11:06:50.000000000 +0300
80+++ openswan-2.4.7/linux/net/ipsec/des/asm/des686.pl 2006-12-06 22:46:54.740831340 +0200
81@@ -1,4 +1,4 @@
82-#!/usr/local/bin/perl
83+#!/usr/bin/perl
84
85 $prog="des686.pl";
86
87diff -Nru openswan-2.4.7.orig/linux/net/ipsec/des/asm/desboth.pl openswan-2.4.7/linux/net/ipsec/des/asm/desboth.pl
88--- openswan-2.4.7.orig/linux/net/ipsec/des/asm/desboth.pl 2004-07-10 11:06:50.000000000 +0300
89+++ openswan-2.4.7/linux/net/ipsec/des/asm/desboth.pl 2006-12-06 22:46:54.740831340 +0200
90@@ -1,4 +1,4 @@
91-#!/usr/local/bin/perl
92+#!/usr/bin/perl
93
94 $L="edi";
95 $R="esi";
96diff -Nru openswan-2.4.7.orig/Makefile.inc openswan-2.4.7/Makefile.inc
97--- openswan-2.4.7.orig/Makefile.inc 2006-11-14 19:56:09.000000000 +0200
98+++ openswan-2.4.7/Makefile.inc 2006-12-06 22:48:32.534943089 +0200
99@@ -46,7 +46,7 @@
100 DESTDIR?=
101
102 # "local" part of tree, used in building other pathnames
103-INC_USRLOCAL=/usr/local
104+INC_USRLOCAL?=/usr
105
106 # PUBDIR is where the "ipsec" command goes; beware, many things define PATH
107 # settings which are assumed to include it (or at least, to include *some*
108@@ -80,7 +80,7 @@
109 MANPLACES=man3 man5 man8
110
111 # where configuration files go
112-FINALCONFFILE?=/etc/ipsec.conf
113+FINALCONFFILE?=/etc/ipsec/ipsec.conf
114 CONFFILE=$(DESTDIR)$(FINALCONFFILE)
115
116 FINALCONFDIR?=/etc
117@@ -91,7 +91,7 @@
118
119 # sample configuration files go into
120 INC_DOCDIR?=share/doc
121-FINALEXAMPLECONFDIR=${INC_USRLOCAL}/${INC_DOCDIR}/openswan
122+FINALEXAMPLECONFDIR?=${INC_USRLOCAL}/${INC_DOCDIR}/openswan
123 EXAMPLECONFDIR=${DESTDIR}${FINALEXAMPLECONFDIR}
124
125 FINALDOCDIR?=${INC_USRLOCAL}/${INC_DOCDIR}/openswan
126@@ -239,7 +239,7 @@
127 # installed one in RH 7.2, won't work - you wind up depending upon
128 # openssl.
129
130-BIND9STATICLIBDIR?=/usr/local/lib
131+BIND9STATICLIBDIR?=/usr/lib
132
133 # if you install elsewere, you may need to point the include files to it.
134 #BIND9STATICLIBDIR?=/sandel/lib
135diff -Nru openswan-2.4.7.orig/programs/barf/barf.in openswan-2.4.7/programs/barf/barf.in
136--- openswan-2.4.7.orig/programs/barf/barf.in 2006-11-07 05:49:18.000000000 +0200
137+++ openswan-2.4.7/programs/barf/barf.in 2006-12-06 22:46:54.740831340 +0200
138@@ -16,7 +16,7 @@
139
140 LOGS=${LOGS-/var/log}
141 CONFS=${IPSEC_CONFS-/etc}
142-CONFDDIR=${IPSEC_CONFDDIR-/etc/ipsec.d}
143+CONFDDIR=${IPSEC_CONFDDIR-/etc/ipsec/ipsec.d}
144 me="ipsec barf"
145 # Max lines to use for things like 'route -n'
146 maxlines=100
147@@ -238,13 +238,13 @@
148 done
149 fi
150 _________________________ ipsec/ls-libdir
151-ls -l ${IPSEC_LIBDIR-/usr/local/lib/ipsec}
152+ls -l ${IPSEC_LIBDIR-/usr/lib/ipsec}
153 _________________________ ipsec/ls-execdir
154-ls -l ${IPSEC_EXECDIR-/usr/local/libexec/ipsec}
155+ls -l ${IPSEC_EXECDIR-/usr/libexec/ipsec}
156 _________________________ ipsec/updowns
157-for f in `ls ${IPSEC_EXECDIR-/usr/local/libexec/ipsec} | egrep updown`
158+for f in `ls ${IPSEC_EXECDIR-/usr/libexec/ipsec} | egrep updown`
159 do
160- cat ${IPSEC_EXECDIR-/usr/local/libexec/ipsec}/$f
161+ cat ${IPSEC_EXECDIR-/usr/libexec/ipsec}/$f
162 done
163 _________________________ /proc/net/dev
164 cat /proc/net/dev
165diff -Nru openswan-2.4.7.orig/programs/eroute/eroute.5 openswan-2.4.7/programs/eroute/eroute.5
166--- openswan-2.4.7.orig/programs/eroute/eroute.5 2006-10-26 23:40:43.000000000 +0300
167+++ openswan-2.4.7/programs/eroute/eroute.5 2006-12-06 22:57:19.307864340 +0200
168@@ -168,7 +168,7 @@
169 .SH "FILES"
170
171 .PP
172-/proc/net/ipsec_eroute, /usr/local/bin/ipsec
173+/proc/net/ipsec_eroute, /usr/bin/ipsec
174
175 .SH "SEE ALSO"
176
177diff -Nru openswan-2.4.7.orig/programs/eroute/eroute.8 openswan-2.4.7/programs/eroute/eroute.8
178--- openswan-2.4.7.orig/programs/eroute/eroute.8 2003-10-31 04:32:27.000000000 +0200
179+++ openswan-2.4.7/programs/eroute/eroute.8 2006-12-06 22:46:54.740831340 +0200
180@@ -308,7 +308,7 @@
181 .br
182 .LP
183 .SH FILES
184-/proc/net/ipsec_eroute, /usr/local/bin/ipsec
185+/proc/net/ipsec_eroute, /usr/bin/ipsec
186 .SH "SEE ALSO"
187 ipsec(8), ipsec_manual(8), ipsec_tncfg(8), ipsec_spi(8),
188 ipsec_spigrp(8), ipsec_klipsdebug(8), ipsec_eroute(5)
189diff -Nru openswan-2.4.7.orig/programs/_include/_include.in openswan-2.4.7/programs/_include/_include.in
190--- openswan-2.4.7.orig/programs/_include/_include.in 2003-01-06 23:44:04.000000000 +0200
191+++ openswan-2.4.7/programs/_include/_include.in 2006-12-06 22:46:54.740831340 +0200
192@@ -47,10 +47,10 @@
193 do
194 if test ! -r "$f"
195 then
196- if test ! "$f" = "/etc/ipsec.conf"
197+ if test ! "$f" = "/etc/ipsec/ipsec.conf"
198 then
199 echo "#:cannot open configuration file \'$f\'"
200- if test "$f" = "/etc/ipsec.secrets"
201+ if test "$f" = "/etc/ipsec/ipsec.secrets"
202 then
203 echo "#:Your secrets file will be created when you start FreeS/WAN for the first time."
204 fi
205diff -Nru openswan-2.4.7.orig/programs/ipsec/ipsec.8 openswan-2.4.7/programs/ipsec/ipsec.8
206--- openswan-2.4.7.orig/programs/ipsec/ipsec.8 2003-02-27 18:51:54.000000000 +0200
207+++ openswan-2.4.7/programs/ipsec/ipsec.8 2006-12-06 22:46:54.744831590 +0200
208@@ -81,7 +81,7 @@
209 .I ipsec
210 thinks the IPsec configuration files are stored.
211 .SH FILES
212-/usr/local/lib/ipsec usual utilities directory
213+/usr/lib/ipsec usual utilities directory
214 .SH ENVIRONMENT
215 .PP
216 The following environment variables control where FreeS/WAN finds its
217diff -Nru openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.5 openswan-2.4.7/programs/klipsdebug/klipsdebug.5
218--- openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.5 2006-10-27 01:21:25.000000000 +0300
219+++ openswan-2.4.7/programs/klipsdebug/klipsdebug.5 2006-12-06 22:58:04.150666840 +0200
220@@ -114,7 +114,7 @@
221 .SH "FILES"
222
223 .PP
224-/proc/net/ipsec_klipsdebug, /usr/local/bin/ipsec
225+/proc/net/ipsec_klipsdebug, /usr/bin/ipsec
226
227 .SH "SEE ALSO"
228
229diff -Nru openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.8 openswan-2.4.7/programs/klipsdebug/klipsdebug.8
230--- openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.8 2006-10-27 01:21:25.000000000 +0300
231+++ openswan-2.4.7/programs/klipsdebug/klipsdebug.8 2006-12-06 22:58:22.295800840 +0200
232@@ -111,7 +111,7 @@
233 .SH "FILES"
234
235 .PP
236-/proc/net/ipsec_klipsdebug, /usr/local/bin/ipsec
237+/proc/net/ipsec_klipsdebug, /usr/bin/ipsec
238
239 .SH "SEE ALSO"
240
241diff -Nru openswan-2.4.7.orig/programs/mailkey/mailkey.in openswan-2.4.7/programs/mailkey/mailkey.in
242--- openswan-2.4.7.orig/programs/mailkey/mailkey.in 2006-10-29 02:49:23.000000000 +0300
243+++ openswan-2.4.7/programs/mailkey/mailkey.in 2006-12-06 22:46:54.828836839 +0200
244@@ -60,7 +60,7 @@
245
246 "$test1st"
247
248-Common concerns: This account must be able to read /etc/ipsec.secrets.
249+Common concerns: This account must be able to read /etc/ipsec/ipsec.secrets.
250 If you haven't generated your key yet, please run 'ipsec newhostkey'."
251 exit 0
252 }
253diff -Nru openswan-2.4.7.orig/programs/pluto/Makefile openswan-2.4.7/programs/pluto/Makefile
254--- openswan-2.4.7.orig/programs/pluto/Makefile 2006-11-07 17:55:52.000000000 +0200
255+++ openswan-2.4.7/programs/pluto/Makefile 2006-12-06 22:46:54.832837088 +0200
256@@ -256,7 +256,7 @@
257 -DPOLICYGROUPSDIR=\"${FINALCONFDDIR}/policies\" \
258 -DPERPEERLOGDIR=\"${FINALLOGDIR}/pluto/peer\"
259
260-ALLFLAGS = $(CPPFLAGS) $(CFLAGS)
261+ALLFLAGS = $(CPPFLAGS) $(CFLAGS) $(USERCOMPILE)
262
263 # libefence is a free memory allocation debugger
264 # Solaris 2 needs -lsocket -lnsl
265diff -Nru openswan-2.4.7.orig/programs/setup/Makefile openswan-2.4.7/programs/setup/Makefile
266--- openswan-2.4.7.orig/programs/setup/Makefile 2004-12-18 20:13:43.000000000 +0200
267+++ openswan-2.4.7/programs/setup/Makefile 2006-12-06 22:46:54.832837088 +0200
268@@ -33,25 +33,10 @@
269 @rm -f $(BINDIR)/setup
270 @$(INSTALL) $(INSTBINFLAGS) setup $(RCDIR)/ipsec
271 @ln -s $(FINALRCDIR)/ipsec $(BINDIR)/setup
272- -@for i in 0 1 2 3 4 5 6; do mkdir -p $(RCDIR)/../rc$$i.d; done
273- -@cd $(RCDIR)/../rc0.d && ln -f -s ../init.d/ipsec K76ipsec
274- -@cd $(RCDIR)/../rc1.d && ln -f -s ../init.d/ipsec K76ipsec
275- -@cd $(RCDIR)/../rc2.d && ln -f -s ../init.d/ipsec S47ipsec
276- -@cd $(RCDIR)/../rc3.d && ln -f -s ../init.d/ipsec S47ipsec
277- -@cd $(RCDIR)/../rc4.d && ln -f -s ../init.d/ipsec S47ipsec
278- -@cd $(RCDIR)/../rc5.d && ln -f -s ../init.d/ipsec S47ipsec
279- -@cd $(RCDIR)/../rc6.d && ln -f -s ../init.d/ipsec K76ipsec
280
281 install_file_list::
282 @echo $(RCDIR)/ipsec
283 @echo $(BINDIR)/setup
284- @echo $(RCDIR)/../rc0.d/K76ipsec
285- @echo $(RCDIR)/../rc1.d/K76ipsec
286- @echo $(RCDIR)/../rc2.d/S47ipsec
287- @echo $(RCDIR)/../rc3.d/S47ipsec
288- @echo $(RCDIR)/../rc4.d/S47ipsec
289- @echo $(RCDIR)/../rc5.d/S47ipsec
290- @echo $(RCDIR)/../rc6.d/K76ipsec
291
292 clean::
293 @rm -f setup
294diff -Nru openswan-2.4.7.orig/programs/showhostkey/showhostkey.in openswan-2.4.7/programs/showhostkey/showhostkey.in
295--- openswan-2.4.7.orig/programs/showhostkey/showhostkey.in 2004-11-14 15:40:41.000000000 +0200
296+++ openswan-2.4.7/programs/showhostkey/showhostkey.in 2006-12-06 22:46:54.844837840 +0200
297@@ -18,7 +18,7 @@
298 usage="Usage: $me [--file secrets] [--left] [--right] [--txt gateway] [--id id]
299 [--dhclient] [--ipseckey]"
300
301-file=/etc/ipsec.secrets
302+file=/etc/ipsec/ipsec.secrets
303 fmt=""
304 gw=
305 id=
306diff -Nru openswan-2.4.7.orig/programs/spi/spi.5 openswan-2.4.7/programs/spi/spi.5
307--- openswan-2.4.7.orig/programs/spi/spi.5 2006-10-26 23:53:59.000000000 +0300
308+++ openswan-2.4.7/programs/spi/spi.5 2006-12-06 23:00:11.910340779 +0200
309@@ -157,7 +157,7 @@
310 .SH "FILES"
311
312 .PP
313-/proc/net/ipsec_spi, /usr/local/bin/ipsec
314+/proc/net/ipsec_spi, /usr/bin/ipsec
315
316 .SH "SEE ALSO"
317
318diff -Nru openswan-2.4.7.orig/programs/spi/spi.8 openswan-2.4.7/programs/spi/spi.8
319--- openswan-2.4.7.orig/programs/spi/spi.8 2006-10-30 22:00:04.000000000 +0200
320+++ openswan-2.4.7/programs/spi/spi.8 2006-12-06 23:00:27.043286530 +0200
321@@ -215,7 +215,7 @@
322 .SH "FILES"
323
324 .PP
325-/proc/net/ipsec_spi, /usr/local/bin/ipsec
326+/proc/net/ipsec_spi, /usr/bin/ipsec
327
328 .SH "SEE ALSO"
329
330diff -Nru openswan-2.4.7.orig/programs/spigrp/spigrp.5 openswan-2.4.7/programs/spigrp/spigrp.5
331--- openswan-2.4.7.orig/programs/spigrp/spigrp.5 2006-10-26 23:50:29.000000000 +0300
332+++ openswan-2.4.7/programs/spigrp/spigrp.5 2006-12-06 23:01:25.650949280 +0200
333@@ -67,7 +67,7 @@
334 .SH "FILES"
335
336 .PP
337-/proc/net/ipsec_spigrp, /usr/local/bin/ipsec
338+/proc/net/ipsec_spigrp, /usr/bin/ipsec
339
340 .SH "SEE ALSO"
341
342diff -Nru openswan-2.4.7.orig/programs/spigrp/spigrp.8 openswan-2.4.7/programs/spigrp/spigrp.8
343--- openswan-2.4.7.orig/programs/spigrp/spigrp.8 2006-10-26 23:50:29.000000000 +0300
344+++ openswan-2.4.7/programs/spigrp/spigrp.8 2006-12-06 23:01:39.079788532 +0200
345@@ -87,7 +87,7 @@
346 .SH "FILES"
347
348 .PP
349-/proc/net/ipsec_spigrp, /usr/local/bin/ipsec
350+/proc/net/ipsec_spigrp, /usr/bin/ipsec
351
352 .SH "SEE ALSO"
353
354diff -Nru openswan-2.4.7.orig/programs/tncfg/tncfg.5 openswan-2.4.7/programs/tncfg/tncfg.5
355--- openswan-2.4.7.orig/programs/tncfg/tncfg.5 2006-10-26 23:58:11.000000000 +0300
356+++ openswan-2.4.7/programs/tncfg/tncfg.5 2006-12-06 23:01:59.385057530 +0200
357@@ -101,7 +101,7 @@
358 .SH "FILES"
359
360 .PP
361-/proc/net/ipsec_tncfg, /usr/local/bin/ipsec
362+/proc/net/ipsec_tncfg, /usr/bin/ipsec
363
364 .SH "SEE ALSO"
365
366diff -Nru openswan-2.4.7.orig/programs/tncfg/tncfg.8 openswan-2.4.7/programs/tncfg/tncfg.8
367--- openswan-2.4.7.orig/programs/tncfg/tncfg.8 2006-10-26 23:58:11.000000000 +0300
368+++ openswan-2.4.7/programs/tncfg/tncfg.8 2006-12-06 23:02:09.245673780 +0200
369@@ -63,7 +63,7 @@
370 .SH "FILES"
371
372 .PP
373-/proc/net/ipsec_tncfg, /usr/local/bin/ipsec
374+/proc/net/ipsec_tncfg, /usr/bin/ipsec
375
376 .SH "SEE ALSO"
377
diff --git a/meta/packages/openswan/openswan_2.4.7.bb b/meta/packages/openswan/openswan_2.4.7.bb
deleted file mode 100644
index 4ebb9c7a45..0000000000
--- a/meta/packages/openswan/openswan_2.4.7.bb
+++ /dev/null
@@ -1,36 +0,0 @@
1SECTION = "console/network"
2DESCRIPTION = "Openswan is an Open Source implementation of IPsec for the \
3Linux operating system."
4HOMEPAGE = "http://www.openswan.org"
5LICENSE = "GPLv2"
6DEPENDS = "gmp flex-native"
7RRECOMMENDS = "kernel-module-ipsec"
8RDEPENDS_nylon = "perl"
9PR = "r0"
10
11SRC_URI = "http://www.openswan.org/download/old/openswan-${PV}.tar.gz \
12 file://openswan-2.4.7-gentoo.patch;patch=1 \
13 file://installflags.patch;patch=1 \
14 file://ld-library-path-breakage.patch;patch=1"
15S = "${WORKDIR}/openswan-${PV}"
16
17PARALLEL_MAKE = ""
18EXTRA_OEMAKE = "DESTDIR=${D} \
19 USERCOMPILE="${CFLAGS}" \
20 FINALCONFDIR=${sysconfdir}/ipsec \
21 INC_RCDEFAULT=${sysconfdir}/init.d \
22 INC_USRLOCAL=${prefix} \
23 INC_MANDIR=share/man WERROR=''"
24
25do_compile () {
26 oe_runmake programs
27}
28
29do_install () {
30 oe_runmake install
31}
32
33FILES_${PN} = "${sysconfdir} ${libdir}/ipsec/* ${sbindir}/* ${libexecdir}/ipsec/*"
34FILES_${PN}-dbg += "${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
35
36CONFFILES_${PN} = "${sysconfdir}/ipsec/ipsec.conf"
diff --git a/meta/packages/opensync/libopensync-0.37/build-in-src.patch b/meta/packages/opensync/libopensync-0.37/build-in-src.patch
deleted file mode 100644
index 1810b339a6..0000000000
--- a/meta/packages/opensync/libopensync-0.37/build-in-src.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1---
2 cmake/OpenSyncInternal.cmake.in | 1 -
3 1 file changed, 1 deletion(-)
4
5--- libopensync-0.36.orig/cmake/OpenSyncInternal.cmake.in
6+++ libopensync-0.36/cmake/OpenSyncInternal.cmake.in
7@@ -5,11 +5,10 @@ INCLUDE( OpenSyncTesting )
8 INCLUDE( OpenSyncPackaging )
9 INCLUDE( OpenSyncPlugin )
10 INCLUDE( OpenSyncPlatforms )
11 INCLUDE( MacroEnsureOutOfSourceBuild )
12
13-MACRO_ENSURE_OUT_OF_SOURCE_BUILD("${CMAKE_PROJECT_NAME} doesn't allow to build within the source directory. Please, create a seperate build directory and run 'cmake ${PROJECT_SOURCE_DIR} [options]'!")
14
15
16 SET( OPENSYNC_PLUGINDIR "@OPENSYNC_PLUGINDIR@" )
17 SET( OPENSYNC_FORMATSDIR "@OPENSYNC_FORMATSDIR@" )
18 SET( OPENSYNC_PYTHON_PLUGINDIR "@OPENSYNC_PYTHON_PLUGINDIR@" )
diff --git a/meta/packages/opensync/libopensync-0.37/cmake.patch b/meta/packages/opensync/libopensync-0.37/cmake.patch
deleted file mode 100644
index 7ea4613548..0000000000
--- a/meta/packages/opensync/libopensync-0.37/cmake.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1---
2 opensync/CMakeLists.txt | 1 -
3 1 file changed, 1 deletion(-)
4
5Index: libopensync-0.37/opensync/CMakeLists.txt
6===================================================================
7--- libopensync-0.37.orig/opensync/CMakeLists.txt 2008-10-15 13:56:45.000000000 +0100
8+++ libopensync-0.37/opensync/CMakeLists.txt 2008-10-15 13:59:03.000000000 +0100
9@@ -67,8 +67,6 @@
10 SET_TARGET_PROPERTIES( opensync PROPERTIES VERSION ${OPENSYNC_LIBVERSION_VERSION} )
11 SET_TARGET_PROPERTIES( opensync PROPERTIES SOVERSION ${OPENSYNC_LIBVERSION_SOVERSION} )
12
13-SET_TARGET_PROPERTIES( opensync PROPERTIES COMPILE_FLAGS ${SYMBOLS_VISIBILITY} )
14-
15 IF ( OPENSYNC_UNITTESTS )
16 ADD_LIBRARY( opensync-testing SHARED ${libopensync_LIB_SRCS} )
17 TARGET_LINK_LIBRARIES( opensync-testing ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${GMODULE2_LIBRARIES} ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${LIBEXSLT_LIBRARIES} ${SQLITE3_LIBRARIES} )
diff --git a/meta/packages/opensync/libopensync-0.37/no-python-check.patch b/meta/packages/opensync/libopensync-0.37/no-python-check.patch
deleted file mode 100644
index 04257bc623..0000000000
--- a/meta/packages/opensync/libopensync-0.37/no-python-check.patch
+++ /dev/null
@@ -1,16 +0,0 @@
1---
2 CMakeLists.txt | 1 -
3 1 file changed, 1 deletion(-)
4
5Index: libopensync-0.37/CMakeLists.txt
6===================================================================
7--- libopensync-0.37.orig/CMakeLists.txt 2008-08-18 16:14:24.000000000 +0100
8+++ libopensync-0.37/CMakeLists.txt 2008-10-15 14:00:12.000000000 +0100
9@@ -65,7 +65,6 @@
10 FIND_PACKAGE( LibXslt REQUIRED )
11 FIND_PACKAGE( LibExslt REQUIRED )
12 FIND_PACKAGE( SWIG )
13-FIND_PACKAGE( PythonLibs )
14 FIND_PACKAGE( Check )
15
16 ADD_SUBDIRECTORY( opensync )
diff --git a/meta/packages/opensync/libopensync-plugin-evolution2/0.37-fixes.patch b/meta/packages/opensync/libopensync-plugin-evolution2/0.37-fixes.patch
deleted file mode 100644
index 4a1802ce17..0000000000
--- a/meta/packages/opensync/libopensync-plugin-evolution2/0.37-fixes.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Index: libopensync-plugin-evolution2-0.36/cmake/modules/FindOpenSync.cmake
2===================================================================
3--- libopensync-plugin-evolution2-0.36.orig/cmake/modules/FindOpenSync.cmake 2008-10-20 13:07:14.000000000 +0100
4+++ libopensync-plugin-evolution2-0.36/cmake/modules/FindOpenSync.cmake 2008-10-20 13:08:09.000000000 +0100
5@@ -23,15 +23,15 @@
6 ENDIF ( OpenSync_FIND_REQUIRED )
7
8 IF ( OPENSYNC_MIN_VERSION )
9- PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} opensync-1.0>=${OPENSYNC_MIN_VERSION} )
10+ PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} libopensync>=${OPENSYNC_MIN_VERSION} )
11 ELSE ( OPENSYNC_MIN_VERSION )
12- PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} opensync-1.0 )
13+ PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} libopensync )
14 ENDIF ( OPENSYNC_MIN_VERSION )
15
16 FIND_PROGRAM( PKGCONFIG_EXECUTABLE NAMES pkg-config )
17
18 IF ( PKGCONFIG_EXECUTABLE )
19- EXEC_PROGRAM( ${PKGCONFIG_EXECUTABLE} ARGS opensync-1.0 --variable=datadir OUTPUT_VARIABLE _opensync_data_DIR )
20+ EXEC_PROGRAM( ${PKGCONFIG_EXECUTABLE} ARGS libopensync --variable=datadir OUTPUT_VARIABLE _opensync_data_DIR )
21 STRING( REGEX REPLACE "[\r\n]" " " _opensync_data_DIR "${_opensync_data_DIR}" )
22 ENDIF ( PKGCONFIG_EXECUTABLE )
23
diff --git a/meta/packages/opensync/libopensync-plugin-evolution2_0.36.bb b/meta/packages/opensync/libopensync-plugin-evolution2_0.36.bb
deleted file mode 100644
index a1c4cb1887..0000000000
--- a/meta/packages/opensync/libopensync-plugin-evolution2_0.36.bb
+++ /dev/null
@@ -1,7 +0,0 @@
1require libopensync-plugin_0.36.inc
2
3DEPENDS += " eds-dbus"
4
5SRC_URI += "file://0.37-fixes.patch;patch=1"
6
7PR = "r1"
diff --git a/meta/packages/opensync/libopensync-plugin-file_0.37.bb b/meta/packages/opensync/libopensync-plugin-file_0.37.bb
deleted file mode 100644
index 33a049b7d6..0000000000
--- a/meta/packages/opensync/libopensync-plugin-file_0.37.bb
+++ /dev/null
@@ -1 +0,0 @@
1require libopensync-plugin_0.36.inc
diff --git a/meta/packages/opensync/libopensync-plugin-google-calendar_0.36.bb b/meta/packages/opensync/libopensync-plugin-google-calendar_0.36.bb
deleted file mode 100644
index 33a049b7d6..0000000000
--- a/meta/packages/opensync/libopensync-plugin-google-calendar_0.36.bb
+++ /dev/null
@@ -1 +0,0 @@
1require libopensync-plugin_0.36.inc
diff --git a/meta/packages/opensync/libopensync-plugin-irmc_0.36.bb b/meta/packages/opensync/libopensync-plugin-irmc_0.36.bb
deleted file mode 100644
index c06de2fde8..0000000000
--- a/meta/packages/opensync/libopensync-plugin-irmc_0.36.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require libopensync-plugin_0.36.inc
2
3DEPENDS += "openobex bluez4"
diff --git a/meta/packages/opensync/libopensync-plugin-syncml/fixerror.patch b/meta/packages/opensync/libopensync-plugin-syncml/fixerror.patch
deleted file mode 100644
index 7dad889422..0000000000
--- a/meta/packages/opensync/libopensync-plugin-syncml/fixerror.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: libopensync-plugin-syncml-0.38/src/syncml_callbacks.c
2===================================================================
3--- libopensync-plugin-syncml-0.38.orig/src/syncml_callbacks.c 2009-07-31 10:30:33.000000000 +0100
4+++ libopensync-plugin-syncml-0.38/src/syncml_callbacks.c 2009-07-31 10:30:39.000000000 +0100
5@@ -405,7 +405,7 @@
6 } else {
7 /* This problem should be fixed with the next SLOW-SYNC. */
8 osync_trace(TRACE_EXIT_ERROR, "%s - unexpected Add or Replace command", __func__);
9- smlErrorSet(error, SML_ERROR_TEMPORARY, "Unwanted Add or Replace command on second OMA DS session.");
10+ smlErrorSet(error, SML_ERROR_GENERIC, "Unwanted Add or Replace command on second OMA DS session.");
11 return FALSE;
12 }
13 }
diff --git a/meta/packages/opensync/libopensync-plugin-syncml_0.38.bb b/meta/packages/opensync/libopensync-plugin-syncml_0.38.bb
deleted file mode 100644
index d32d62de47..0000000000
--- a/meta/packages/opensync/libopensync-plugin-syncml_0.38.bb
+++ /dev/null
@@ -1,7 +0,0 @@
1require libopensync-plugin_0.36.inc
2
3DEPENDS += " libsyncml (>= 0.4.7)"
4
5SRC_URI += "file://fixerror.patch;patch=1"
6
7PR = "r1" \ No newline at end of file
diff --git a/meta/packages/opensync/libopensync-plugin-vformat_0.37.bb b/meta/packages/opensync/libopensync-plugin-vformat_0.37.bb
deleted file mode 100644
index 84a48f21fe..0000000000
--- a/meta/packages/opensync/libopensync-plugin-vformat_0.37.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require libopensync-plugin_0.36.inc
2
3DEPENDS += " check"
diff --git a/meta/packages/opensync/libopensync-plugin_0.36.inc b/meta/packages/opensync/libopensync-plugin_0.36.inc
deleted file mode 100644
index db6b1fa73a..0000000000
--- a/meta/packages/opensync/libopensync-plugin_0.36.inc
+++ /dev/null
@@ -1,9 +0,0 @@
1DEPENDS = "libopensync (>= 0.36)"
2
3SRC_URI = "http://opensync.org/download/releases/${PV}/${P}.tar.bz2"
4
5inherit cmake
6
7FILES_${PN} += "${libdir}/opensync*/plugins/*.so \
8 ${libdir}/opensync*/formats/*.so \
9 ${datadir}/opensync*/defaults/"
diff --git a/meta/packages/opensync/libopensync_0.37.bb b/meta/packages/opensync/libopensync_0.37.bb
deleted file mode 100644
index e9b8ce202e..0000000000
--- a/meta/packages/opensync/libopensync_0.37.bb
+++ /dev/null
@@ -1,25 +0,0 @@
1LICENSE = "LGPL"
2HOMEPAGE = "http://www.opensync.org/"
3
4DEPENDS = "sqlite3 libxml2 glib-2.0 check zlib libxslt"
5
6PR = "r1"
7
8SRC_URI = "http://opensync.org/download/releases/${PV}/libopensync-${PV}.tar.bz2\
9 file://cmake.patch;patch=1 \
10 file://build-in-src.patch;patch=1 \
11 file://no-python-check.patch;patch=1"
12
13inherit cmake pkgconfig
14
15LEAD_SONAME = "libopensync.so"
16
17FILES_${PN} += " ${libdir}/opensync*/formats/*.so \
18 ${libdir}/opensync*/osplugin \
19 ${datadir}/opensync*/schemas \
20 ${datadir}/opensync*/capabilities \
21 ${datadir}/opensync*/descriptions \
22 "
23FILES_${PN}-dbg += " ${libdir}/opensync*/formats/.debug/*.so \
24 ${libdir}/opensync*/.debug/osplugin "
25
diff --git a/meta/packages/opensync/libsyncml/build-in-src.patch b/meta/packages/opensync/libsyncml/build-in-src.patch
deleted file mode 100644
index d8106bdfc7..0000000000
--- a/meta/packages/opensync/libsyncml/build-in-src.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1---
2 CMakeLists.txt | 4 ----
3 1 file changed, 4 deletions(-)
4
5Index: libsyncml-0.5.4/CMakeLists.txt
6===================================================================
7--- libsyncml-0.5.4.orig/CMakeLists.txt 2009-07-31 09:56:16.000000000 +0100
8+++ libsyncml-0.5.4/CMakeLists.txt 2009-07-31 09:57:33.000000000 +0100
9@@ -72,10 +72,6 @@
10 CHECK_TYPE_SIZE( uint32_t UINT32_T )
11 CHECK_TYPE_SIZE( uint8_t UINT8_T )
12
13-# ensure out od source build
14-INCLUDE( MacroEnsureOutOfSourceBuild )
15-MACRO_ENSURE_OUT_OF_SOURCE_BUILD("${CMAKE_PROJECT_NAME} doesn't allow to build within the source directory. Please, create a seperate build directory and run 'cmake ${PROJECT_SOURCE_DIR} [options]'!")
16-
17 # find requirements
18 SET ( GLIB2_MIN_VERSION "2.12" )
19 SET ( OPENOBEX_MIN_VERSION "1.1" )
diff --git a/meta/packages/opensync/libsyncml_0.5.4.bb b/meta/packages/opensync/libsyncml_0.5.4.bb
deleted file mode 100644
index 7feb5e0f18..0000000000
--- a/meta/packages/opensync/libsyncml_0.5.4.bb
+++ /dev/null
@@ -1,17 +0,0 @@
1DESCRIPTION = "Libsyncml is a implementation of the SyncML protocol."
2HOMEPAGE = "http://libsyncml.opensync.org/"
3LICENSE = "LGPL"
4DEPENDS = "sed-native wbxml2 libsoup libxml2 bluez4 openobex check"
5PR = "r1"
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/libsyncml/0.5.4/libsyncml-0.5.4.tar.bz2 \
8 file://build-in-src.patch;patch=1"
9
10inherit cmake pkgconfig
11
12PACKAGES += "${PN}-tools"
13
14FILES_${PN}-tools = "${bindir}"
15FILES_${PN} = "${libdir}/*.so.*"
16
17export VERBOSE=1 \ No newline at end of file
diff --git a/meta/packages/opensync/msynctool_0.37.bb b/meta/packages/opensync/msynctool_0.37.bb
deleted file mode 100644
index 773166b3be..0000000000
--- a/meta/packages/opensync/msynctool_0.37.bb
+++ /dev/null
@@ -1,7 +0,0 @@
1SRC_URI = "http://www.opensync.org/download/releases/${PV}/msynctool-${PV}.tar.bz2"
2
3LICENSE = "GPL"
4DEPENDS = "libopensync glib-2.0"
5HOMEPAGE = "http://www.opensync.org/"
6
7inherit cmake pkgconfig
diff --git a/meta/packages/pam/libpam-1.1.1/99_pam b/meta/packages/pam/libpam-1.1.1/99_pam
deleted file mode 100644
index 97e990d10b..0000000000
--- a/meta/packages/pam/libpam-1.1.1/99_pam
+++ /dev/null
@@ -1 +0,0 @@
1d root root 0755 /var/run/sepermit none
diff --git a/meta/packages/pam/libpam-1.1.1/disable_crossbinary.patch b/meta/packages/pam/libpam-1.1.1/disable_crossbinary.patch
deleted file mode 100644
index 43359b08fe..0000000000
--- a/meta/packages/pam/libpam-1.1.1/disable_crossbinary.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1padout should be compiled using the native compiler but isn't.
2Disable this piece of documentation for now.
3
4RP
5
6Index: Linux-PAM-1.0.2/doc/specs/Makefile.am
7===================================================================
8--- Linux-PAM-1.0.2.orig/doc/specs/Makefile.am 2008-11-04 21:06:23.000000000 +0000
9+++ Linux-PAM-1.0.2/doc/specs/Makefile.am 2008-11-04 21:07:06.000000000 +0000
10@@ -2,21 +2,8 @@
11 # Copyright (c) 2005, 2006 Thorsten Kukuk <kukuk@suse.de>
12 #
13
14-CLEANFILES = draft-morgan-pam-current.txt *~
15+CLEANFILES = *~
16
17-EXTRA_DIST = draft-morgan-pam.raw std-agent-id.raw rfc86.0.txt
18+EXTRA_DIST = std-agent-id.raw rfc86.0.txt
19
20-draft-morgan-pam-current.txt: padout draft-morgan-pam.raw
21- ./padout < $(srcdir)/draft-morgan-pam.raw > draft-morgan-pam-current.txt
22-
23-AM_YFLAGS = -d
24-
25-BUILT_SOURCES = parse_y.h
26-
27-noinst_PROGRAMS = padout
28-
29-padout_SOURCES = parse_l.l parse_y.y
30-
31-padout_LDADD = @LEXLIB@
32-
33-doc_DATA = draft-morgan-pam-current.txt rfc86.0.txt
34+doc_DATA = rfc86.0.txt
diff --git a/meta/packages/pam/libpam-1.1.1/pam.d/common-account b/meta/packages/pam/libpam-1.1.1/pam.d/common-account
deleted file mode 100644
index 316b17337b..0000000000
--- a/meta/packages/pam/libpam-1.1.1/pam.d/common-account
+++ /dev/null
@@ -1,25 +0,0 @@
1#
2# /etc/pam.d/common-account - authorization settings common to all services
3#
4# This file is included from other service-specific PAM config files,
5# and should contain a list of the authorization modules that define
6# the central access policy for use on the system. The default is to
7# only deny service to users whose accounts are expired in /etc/shadow.
8#
9# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
10# To take advantage of this, it is recommended that you configure any
11# local modules either before or after the default block, and use
12# pam-auth-update to manage selection of other modules. See
13# pam-auth-update(8) for details.
14#
15
16# here are the per-package modules (the "Primary" block)
17account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so
18# here's the fallback if no module succeeds
19account requisite pam_deny.so
20# prime the stack with a positive return value if there isn't one already;
21# this avoids us returning an error just because nothing sets a success code
22# since the modules above will each just jump around
23account required pam_permit.so
24# and here are more per-package modules (the "Additional" block)
25# end of pam-auth-update config
diff --git a/meta/packages/pam/libpam-1.1.1/pam.d/common-auth b/meta/packages/pam/libpam-1.1.1/pam.d/common-auth
deleted file mode 100644
index 460b69f198..0000000000
--- a/meta/packages/pam/libpam-1.1.1/pam.d/common-auth
+++ /dev/null
@@ -1,18 +0,0 @@
1#
2# /etc/pam.d/common-auth - authentication settings common to all services
3#
4# This file is included from other service-specific PAM config files,
5# and should contain a list of the authentication modules that define
6# the central authentication scheme for use on the system
7# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
8# traditional Unix authentication mechanisms.
9
10# here are the per-package modules (the "Primary" block)
11auth [success=1 default=ignore] pam_unix.so nullok_secure
12# here's the fallback if no module succeeds
13auth requisite pam_deny.so
14# prime the stack with a positive return value if there isn't one already;
15# this avoids us returning an error just because nothing sets a success code
16# since the modules above will each just jump around
17auth required pam_permit.so
18# and here are more per-package modules (the "Additional" block)
diff --git a/meta/packages/pam/libpam-1.1.1/pam.d/common-password b/meta/packages/pam/libpam-1.1.1/pam.d/common-password
deleted file mode 100644
index 3896057328..0000000000
--- a/meta/packages/pam/libpam-1.1.1/pam.d/common-password
+++ /dev/null
@@ -1,26 +0,0 @@
1#
2# /etc/pam.d/common-password - password-related modules common to all services
3#
4# This file is included from other service-specific PAM config files,
5# and should contain a list of modules that define the services to be
6# used to change user passwords. The default is pam_unix.
7
8# Explanation of pam_unix options:
9#
10# The "sha512" option enables salted SHA512 passwords. Without this option,
11# the default is Unix crypt. Prior releases used the option "md5".
12#
13# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
14# login.defs.
15#
16# See the pam_unix manpage for other options.
17
18# here are the per-package modules (the "Primary" block)
19password [success=1 default=ignore] pam_unix.so obscure sha512
20# here's the fallback if no module succeeds
21password requisite pam_deny.so
22# prime the stack with a positive return value if there isn't one already;
23# this avoids us returning an error just because nothing sets a success code
24# since the modules above will each just jump around
25password required pam_permit.so
26# and here are more per-package modules (the "Additional" block)
diff --git a/meta/packages/pam/libpam-1.1.1/pam.d/common-session b/meta/packages/pam/libpam-1.1.1/pam.d/common-session
deleted file mode 100644
index a594dd9d90..0000000000
--- a/meta/packages/pam/libpam-1.1.1/pam.d/common-session
+++ /dev/null
@@ -1,19 +0,0 @@
1#
2# /etc/pam.d/common-session - session-related modules common to all services
3#
4# This file is included from other service-specific PAM config files,
5# and should contain a list of modules that define tasks to be performed
6# at the start and end of sessions of *any* kind (both interactive and
7# non-interactive).
8#
9
10# here are the per-package modules (the "Primary" block)
11session [default=1] pam_permit.so
12# here's the fallback if no module succeeds
13session requisite pam_deny.so
14# prime the stack with a positive return value if there isn't one already;
15# this avoids us returning an error just because nothing sets a success code
16# since the modules above will each just jump around
17session required pam_permit.so
18# and here are more per-package modules (the "Additional" block)
19session required pam_unix.so
diff --git a/meta/packages/pam/libpam-1.1.1/pam.d/common-session-noninteractive b/meta/packages/pam/libpam-1.1.1/pam.d/common-session-noninteractive
deleted file mode 100644
index b110bb2b49..0000000000
--- a/meta/packages/pam/libpam-1.1.1/pam.d/common-session-noninteractive
+++ /dev/null
@@ -1,19 +0,0 @@
1#
2# /etc/pam.d/common-session-noninteractive - session-related modules
3# common to all non-interactive services
4#
5# This file is included from other service-specific PAM config files,
6# and should contain a list of modules that define tasks to be performed
7# at the start and end of all non-interactive sessions.
8#
9
10# here are the per-package modules (the "Primary" block)
11session [default=1] pam_permit.so
12# here's the fallback if no module succeeds
13session requisite pam_deny.so
14# prime the stack with a positive return value if there isn't one already;
15# this avoids us returning an error just because nothing sets a success code
16# since the modules above will each just jump around
17session required pam_permit.so
18# and here are more per-package modules (the "Additional" block)
19session required pam_unix.so
diff --git a/meta/packages/pam/libpam-1.1.1/pam.d/other b/meta/packages/pam/libpam-1.1.1/pam.d/other
deleted file mode 100644
index 6e40cd0c02..0000000000
--- a/meta/packages/pam/libpam-1.1.1/pam.d/other
+++ /dev/null
@@ -1,27 +0,0 @@
1#
2# /etc/pam.d/other - specify the PAM fallback behaviour
3#
4# Note that this file is used for any unspecified service; for example
5#if /etc/pam.d/cron specifies no session modules but cron calls
6#pam_open_session, the session module out of /etc/pam.d/other is
7#used.
8
9#If you really want nothing to happen then use pam_permit.so or
10#pam_deny.so as appropriate.
11
12# We use pam_warn.so to generate syslog notes that the 'other'
13#fallback rules are being used (as a hint to suggest you should setup
14#specific PAM rules for the service and aid to debugging). We then
15#fall back to the system default in /etc/pam.d/common-*
16
17auth required pam_warn.so
18auth include common-auth
19
20account required pam_warn.so
21account include common-account
22
23password required pam_warn.so
24password include common-password
25
26session required pam_warn.so
27session include common-session
diff --git a/meta/packages/pam/libpam_1.1.1.bb b/meta/packages/pam/libpam_1.1.1.bb
deleted file mode 100644
index 536a0f5ce9..0000000000
--- a/meta/packages/pam/libpam_1.1.1.bb
+++ /dev/null
@@ -1,73 +0,0 @@
1DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), Basically, it is a flexible mechanism for authenticating users"
2HOMEPAGE = "http://www.kernel.org/pub/linux/libs/pam/"
3BUGTRACKER = "http://sourceforge.net/projects/pam/support"
4# PAM allows dual licensed under GPL and BSD.
5# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
6# libpam-runtime-1.0.1 is GPLv2+), by openembedded
7LICENSE = "GPLv2+ | BSD"
8PR = "r1"
9
10DEPENDS = "bison flex"
11RDEPENDS_${PN}-runtime = "libpam pam-plugin-deny pam-plugin-permit pam-plugin-warn pam-plugin-unix"
12RRECOMMENDS_${PN} = "libpam-runtime"
13
14SRC_URI = "http://www.kernel.org/pub/linux/libs/pam/library/Linux-PAM-${PV}.tar.bz2 \
15 file://disable_crossbinary.patch \
16 file://99_pam \
17 file://pam.d/*"
18
19EXTRA_OECONF = "--with-db-uniquename=_pam \
20 --includedir=${includedir}/security \
21 --libdir=${base_libdir} \
22 --disable-regenerate-docu"
23CFLAGS_append = " -fPIC "
24
25S = "${WORKDIR}/Linux-PAM-${PV}"
26
27inherit autotools gettext
28
29PACKAGES += "${PN}-runtime"
30FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
31FILES_${PN}-dbg += "${base_libdir}/security/.debug \
32 ${base_libdir}/security/pam_filter/.debug"
33FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
34FILES_${PN}-runtime = "${sysconfdir}"
35
36PACKAGES_DYNAMIC += " pam-plugin-*"
37
38python populate_packages_prepend () {
39 import os.path
40
41 def pam_plugin_append_file(pn, dir, file):
42 nf = os.path.join(dir, file)
43 of = bb.data.getVar('FILES_' + pn, d, True)
44 if of:
45 nf = of + " " + nf
46 bb.data.setVar('FILES_' + pn, nf, d)
47
48 dvar = bb.data.expand('${WORKDIR}/package', d, True)
49 pam_libdir = bb.data.expand('${base_libdir}/security', d)
50 pam_sbindir = bb.data.expand('${sbindir}', d)
51 pam_filterdir = bb.data.expand('${base_libdir}/security/pam_filter', d)
52
53 do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', extra_depends='')
54 pam_plugin_append_file('pam-plugin-unix', pam_sbindir, 'unix_chkpwd')
55 pam_plugin_append_file('pam-plugin-unix', pam_sbindir, 'unix_update')
56 pam_plugin_append_file('pam-plugin-tally', pam_sbindir, 'pam_tally')
57 pam_plugin_append_file('pam-plugin-tally2', pam_sbindir, 'pam_tally2')
58 pam_plugin_append_file('pam-plugin-timestamp', pam_sbindir, 'pam_timestamp_check')
59 pam_plugin_append_file('pam-plugin-mkhomedir', pam_sbindir, 'mkhomedir_helper')
60 do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
61}
62
63do_install() {
64 autotools_do_install
65
66 # don't install /var/run when populating rootfs. Do it through volatile
67 rm -rf ${D}/var
68 install -d ${D}${sysconfdir}/default/volatiles
69 install -m 0644 ${WORKDIR}/99_pam ${D}/etc/default/volatiles
70
71 install -d ${D}${sysconfdir}/pam.d/
72 install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
73}
diff --git a/meta/packages/parted/parted-1.9.0/no_check.patch b/meta/packages/parted/parted-1.9.0/no_check.patch
deleted file mode 100644
index 24a328ceea..0000000000
--- a/meta/packages/parted/parted-1.9.0/no_check.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1If check is detected, it makes the builds non-determinstic so just force
2it to be disabled.
3
4RP - 4/11/08
5
6Index: parted-1.9.0/configure.ac
7===================================================================
8--- parted-1.9.0.orig/configure.ac 2009-07-23 18:52:08.000000000 +0100
9+++ parted-1.9.0/configure.ac 2010-02-02 14:13:56.013905093 +0000
10@@ -477,7 +477,7 @@
11 AM_CONDITIONAL([BUILD_LINUX], [test "$OS" = linux])
12
13 dnl check for "check", unit testing library/header
14-PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no)
15+have_check=no
16 if test "$have_check" != "yes"; then
17 AC_MSG_RESULT([Unable to locate check version 0.9.3 or higher: not building])
18 fi
diff --git a/meta/packages/parted/parted-1.9.0/syscalls.patch b/meta/packages/parted/parted-1.9.0/syscalls.patch
deleted file mode 100644
index 6be49968f3..0000000000
--- a/meta/packages/parted/parted-1.9.0/syscalls.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1---
2 libparted/arch/linux.c | 13 +++++++++++++
3 1 file changed, 13 insertions(+)
4
5Index: parted-1.9.0/libparted/arch/linux.c
6===================================================================
7--- parted-1.9.0.orig/libparted/arch/linux.c 2009-07-23 18:52:08.000000000 +0100
8+++ parted-1.9.0/libparted/arch/linux.c 2010-02-02 14:14:16.523904768 +0000
9@@ -17,6 +17,8 @@
10
11 #define PROC_DEVICES_BUFSIZ 16384
12
13+#include <linux/version.h>
14+
15 #include <config.h>
16 #include <arch/linux.h>
17
18@@ -1477,12 +1479,14 @@
19
20 #if SIZEOF_OFF_T < 8
21
22+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
23 static _syscall5(int,_llseek,
24 unsigned int, fd,
25 unsigned long, offset_high,
26 unsigned long, offset_low,
27 loff_t*, result,
28 unsigned int, origin)
29+#endif
30
31 loff_t
32 llseek (unsigned int fd, loff_t offset, unsigned int whence)
33@@ -1490,11 +1494,20 @@
34 loff_t result;
35 int retval;
36
37+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
38 retval = _llseek(fd,
39 ((unsigned long long)offset) >> 32,
40 ((unsigned long long)offset) & 0xffffffff,
41 &result,
42 whence);
43+#else
44+ retval = syscall(__NR__llseek, fd,
45+ ((unsigned long long)offset) >> 32,
46+ ((unsigned long long)offset) & 0xffffffff,
47+ &result,
48+ whence);
49+#endif
50+
51 return (retval==-1 ? (loff_t) retval : result);
52 }
53
diff --git a/meta/packages/parted/parted_1.9.0.bb b/meta/packages/parted/parted_1.9.0.bb
deleted file mode 100644
index f2a265187f..0000000000
--- a/meta/packages/parted/parted_1.9.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "parted, the GNU partition resizing program"
2HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
3LICENSE = "GPLv2"
4SECTION = "console/tools"
5DEPENDS = "readline e2fsprogs"
6PR = "r3"
7
8SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.gz \
9 file://no_check.patch;patch=1 \
10 file://syscalls.patch;patch=1 "
11
12EXTRA_OECONF = "--disable-Werror --disable-device-mapper"
13
14inherit autotools pkgconfig gettext
15
16BBCLASSEXTEND = "native"
diff --git a/meta/packages/pm-utils/pm-utils_1.3.0.bb b/meta/packages/pm-utils/pm-utils_1.3.0.bb
deleted file mode 100644
index cb90f87acc..0000000000
--- a/meta/packages/pm-utils/pm-utils_1.3.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1SECTION = "base"
2DESCRIPTION = "PM hooks"
3LICENSE="GPL"
4
5PR = "r0"
6
7SRC_URI = "http://pm-utils.freedesktop.org/releases/pm-utils-${PV}.tar.gz"
8
9inherit pkgconfig autotools
10
11FILES_${PN}-dbg += "${libdir}/pm-utils/bin/.debug \
12 ${datadir}/doc/pm-utils/README.debugging"
13
14do_configure_prepend () {
15 autoreconf -f -i -s
16}
diff --git a/meta/packages/polkit/polkit-gnome_0.96.bb b/meta/packages/polkit/polkit-gnome_0.96.bb
deleted file mode 100644
index e103e631c8..0000000000
--- a/meta/packages/polkit/polkit-gnome_0.96.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1HOMEPAGE = "http://www.packagekit.org/"
2DEPENDS = "polkit dbus-glib gconf gtk+"
3
4SRC_URI = "http://hal.freedesktop.org/releases/polkit-gnome-${PV}.tar.bz2 \
5 "
6
7EXTRA_OECONF = " --disable-scrollkeeper \
8 --disable-man-pages \
9 --disable-examples \
10 --disable-gtk-doc \
11 --disable-introspection "
12
13inherit autotools pkgconfig
14
15FILES_${PN} += " ${datadir}/dbus-1 \
16 ${datadir}/PolicyKit \
17 "
18
diff --git a/meta/packages/polkit/polkit_0.96.bb b/meta/packages/polkit/polkit_0.96.bb
deleted file mode 100644
index e6e030b19a..0000000000
--- a/meta/packages/polkit/polkit_0.96.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes."
2HOMEPAGE = "http://code.google.com/p/polkit/"
3LICENSE = "LGPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
5 file://src/polkit/polkit.h;md5=8aa8924570fc5570d20e4a4ad5d2db51 \
6 file://docs/polkit/html/license.html;md5=4c17ef1587e0f096c82157160d4e340e"
7
8SRC_URI = "http://hal.freedesktop.org/releases/polkit-${PV}.tar.gz"
9PR = "r2"
10DEPENDS = "libpam expat dbus-glib eggdbus intltool"
11RDEPENDS = "libpam"
12EXTRA_OECONF = "--with-authfw=pam --with-os-type=moblin --disable-man-pages --disable-gtk-doc --disable-introspection"
13
14inherit autotools pkgconfig
diff --git a/meta/packages/pong-clock/pong-clock/pong-clock-no-flicker.c b/meta/packages/pong-clock/pong-clock/pong-clock-no-flicker.c
deleted file mode 100644
index 41cebc58a7..0000000000
--- a/meta/packages/pong-clock/pong-clock/pong-clock-no-flicker.c
+++ /dev/null
@@ -1,410 +0,0 @@
1/*
2 * Pong Clock - A clock that plays pong.
3 * See http://mocoloco.com/archives/001766.php for the inspiration.
4 *
5 * Copyright (C) 2005 Matthew Allum
6 *
7 * Author: Matthew Allum mallum@openedhand.com
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 *
23 */
24
25#include <stdlib.h>
26#include <time.h>
27#include <sys/time.h>
28#include <sys/types.h>
29#include <string.h>
30#include <stdio.h>
31#include <unistd.h>
32#include <signal.h>
33
34#include <X11/Xlib.h>
35#include <X11/Xutil.h>
36#include <X11/Xatom.h>
37
38/* Tweak values for different hw setups */
39
40#define FPS 50
41#define RESX 40
42#define RESY 40
43#define TO_MISS_SECS 55
44#define BALLDX 16
45#define BALLDY 4
46
47
48typedef struct PongClock
49{
50 Display *xdpy;
51 int xscreen;
52 Window xwin, xwin_root;
53 Pixmap backbuffer;
54 GC xgc;
55 int xwin_width, xwin_height;
56 int pixelw, pixelh;
57
58 int ball_x, ball_y, ball_dx, ball_dy;
59 int bata_y, batb_y;
60 Bool bata_to_miss, batb_to_miss;
61
62}
63PongClock;
64
65void
66get_time(int *hour, int *min, int *sec)
67{
68 struct timeval tv;
69 struct tm *localTime = NULL;
70 time_t actualTime;
71
72 gettimeofday(&tv, 0);
73 actualTime = tv.tv_sec;
74 localTime = localtime(&actualTime);
75
76 if (hour)
77 *hour = localTime->tm_hour;
78
79 if (min)
80 *min = localTime->tm_min;
81
82 if (sec)
83 *sec = localTime->tm_sec;
84}
85
86void
87draw_rect (PongClock *pong_clock,
88 int x,
89 int y,
90 int width,
91 int height)
92{
93 XFillRectangle (pong_clock->xdpy,
94 pong_clock->backbuffer,
95 pong_clock->xgc,
96 x * pong_clock->pixelw,
97 y * pong_clock->pixelh,
98 width * pong_clock->pixelw,
99 height * pong_clock->pixelh);
100}
101
102void
103draw_field (PongClock *pong_clock)
104{
105 int i;
106
107 draw_rect (pong_clock, 0, 0, RESX+1, 1);
108 draw_rect (pong_clock, 0, RESY-1, RESX+1, 1);
109
110 for (i=0; i < RESY/2; i++)
111 draw_rect (pong_clock, (RESX/2)-1, i*2, 2, 1);
112}
113
114void
115draw_digit (PongClock *pong_clock,
116 int x,
117 int y,
118 int digit)
119{
120 int digits[] = { 0x1f8c63f, 0x1f21086, 0x1f0fe1f, 0x1f87e1f, 0x1087e31,
121 0x1f87c3f, 0x1f8fc3f, 0x84421f, 0x1f8fe3f, 0x1087e3f };
122
123 XRectangle rects[5*5];
124 int i,j,k;
125
126 i = 0;
127
128 for (k=0; k<5; k++)
129 for (j=0; j<5; j++)
130 if (digits[digit] & (1 << ((k*5)+j)))
131 {
132 rects[i].x = (x + j) * pong_clock->pixelw;
133 rects[i].y = (y + k) * pong_clock->pixelh;
134 rects[i].width = pong_clock->pixelw;
135 rects[i].height = pong_clock->pixelh;
136 i++;
137 }
138
139 XFillRectangles (pong_clock->xdpy,
140 pong_clock->backbuffer,
141 pong_clock->xgc,
142 rects, i);
143}
144
145void
146draw_time (PongClock *pong_clock)
147{
148 int hour, min;
149
150 get_time(&hour, &min, NULL);
151
152 draw_digit (pong_clock,
153 (RESX/2) - 14,
154 5,
155 hour / 10 );
156
157 draw_digit (pong_clock,
158 (RESX/2) - 8,
159 5,
160 hour % 10 );
161
162 draw_digit (pong_clock,
163 (RESX/2) + 3,
164 5,
165 min / 10 );
166
167 draw_digit (pong_clock,
168 (RESX/2) + 9,
169 5,
170 min % 10 );
171}
172
173void
174draw_bat_and_ball (PongClock *pong_clock)
175{
176 /* ball */
177
178 XFillRectangle (pong_clock->xdpy,
179 pong_clock->backbuffer,
180 pong_clock->xgc,
181 pong_clock->ball_x,
182 pong_clock->ball_y,
183 pong_clock->pixelw,
184 pong_clock->pixelh);
185
186 /* bat a */
187
188 XFillRectangle (pong_clock->xdpy,
189 pong_clock->backbuffer,
190 pong_clock->xgc,
191 0,
192 pong_clock->bata_y - (2 * pong_clock->pixelh),
193 pong_clock->pixelw,
194 pong_clock->pixelh * 5);
195
196 /* bat b */
197
198 XFillRectangle (pong_clock->xdpy,
199 pong_clock->backbuffer,
200 pong_clock->xgc,
201 (pong_clock->xwin_width - pong_clock->pixelw),
202 pong_clock->batb_y - (2 * pong_clock->pixelh),
203 pong_clock->pixelw,
204 pong_clock->pixelh * 5);
205
206}
207
208void
209update_state (PongClock *pong_clock)
210{
211 int sec, min, hour;
212
213 get_time(&hour, &min, &sec);
214
215 /* Check ball is on field and no ones dues to miss a shot.
216 */
217 if ( (pong_clock->ball_x < 0 && !pong_clock->bata_to_miss)
218 || (pong_clock->ball_x > (pong_clock->xwin_width - pong_clock->pixelw)
219 && !pong_clock->batb_to_miss) )
220 pong_clock->ball_dx *= -1;
221
222 if ((pong_clock->ball_y < pong_clock->pixelh)
223 || pong_clock->ball_y > (pong_clock->xwin_height - (2*pong_clock->pixelh)))
224 pong_clock->ball_dy *= -1;
225
226 pong_clock->ball_x += pong_clock->ball_dx;
227 pong_clock->ball_y += pong_clock->ball_dy;
228
229 /* Set up someone to miss if we getting close to an hour or min.
230 */
231 if (sec > TO_MISS_SECS)
232 {
233 if (min == 59)
234 pong_clock->batb_to_miss = True;
235 else
236 pong_clock->bata_to_miss = True;
237 }
238 else
239 {
240 /* Reset the game */
241 if (pong_clock->bata_to_miss)
242 {
243 pong_clock->bata_to_miss = False;
244 pong_clock->ball_y = pong_clock->bata_y;
245 pong_clock->ball_x = pong_clock->pixelw;
246 pong_clock->ball_dx *= -1;
247 }
248
249 if (pong_clock->batb_to_miss)
250 {
251 pong_clock->batb_to_miss = False;
252 pong_clock->ball_y = pong_clock->batb_y;
253 pong_clock->ball_x = pong_clock->xwin_width - pong_clock->pixelw;
254 pong_clock->ball_dx *= -1;
255 }
256 }
257
258 /* Keep bats on field and only move in not setup to miss */
259 if (pong_clock->ball_y >= (3*pong_clock->pixelh)
260 && pong_clock->ball_y <= (pong_clock->xwin_height - (5*pong_clock->pixelh)))
261 {
262 if (!pong_clock->batb_to_miss)
263 pong_clock->batb_y = pong_clock->ball_y;
264
265 if (!pong_clock->bata_to_miss)
266 pong_clock->bata_y = pong_clock->ball_y;
267 }
268}
269
270void
271draw_frame (PongClock *pong_clock)
272{
273 update_state (pong_clock);
274
275 /* Clear playfield */
276 XSetForeground (pong_clock->xdpy,
277 pong_clock->xgc,
278 BlackPixel(pong_clock->xdpy,
279 pong_clock->xscreen));
280
281 XFillRectangle (pong_clock->xdpy,
282 pong_clock->backbuffer,
283 pong_clock->xgc,
284 0, 0,
285 pong_clock->xwin_width,
286 pong_clock->xwin_height);
287
288 XSetForeground (pong_clock->xdpy,
289 pong_clock->xgc,
290 WhitePixel(pong_clock->xdpy,
291 pong_clock->xscreen));
292
293 draw_field (pong_clock);
294
295 draw_time (pong_clock);
296
297 draw_bat_and_ball (pong_clock);
298
299 /* flip 'backbuffer' */
300 XSetWindowBackgroundPixmap (pong_clock->xdpy,
301 pong_clock->xwin,
302 pong_clock->backbuffer);
303 XClearWindow(pong_clock->xdpy, pong_clock->xwin);
304
305 XSync(pong_clock->xdpy, False);
306}
307
308int
309main (int argc, char **argv)
310{
311 XGCValues gcv;
312 Atom atoms_WINDOW_STATE, atoms_WINDOW_STATE_FULLSCREEN;
313 PongClock *pong_clock;
314
315 pong_clock = malloc(sizeof(PongClock));
316 memset(pong_clock, 0, sizeof(PongClock));
317
318 if ((pong_clock->xdpy = XOpenDisplay(getenv("DISPLAY"))) == NULL) {
319 fprintf(stderr, "Cannot connect to X server on display %s.",
320 getenv("DISPLAY"));
321 exit(-1);
322 }
323
324 pong_clock->xscreen = DefaultScreen(pong_clock->xdpy);
325 pong_clock->xwin_root = DefaultRootWindow(pong_clock->xdpy);
326 pong_clock->xwin_width = DisplayWidth(pong_clock->xdpy,
327 pong_clock->xscreen);
328 pong_clock->xwin_height = DisplayHeight(pong_clock->xdpy,
329 pong_clock->xscreen);
330
331 pong_clock->pixelw = pong_clock->xwin_width / RESX;
332 pong_clock->pixelh = pong_clock->xwin_height / RESY;
333
334 pong_clock->ball_x = 0;
335 pong_clock->ball_y = pong_clock->xwin_height / 2;
336
337 pong_clock->ball_dx = BALLDX;
338 pong_clock->ball_dy = BALLDY;
339
340 pong_clock->batb_y = pong_clock->bata_y = pong_clock->ball_y;
341
342 gcv.background = BlackPixel(pong_clock->xdpy,
343 pong_clock->xscreen);
344 gcv.foreground = WhitePixel(pong_clock->xdpy,
345 pong_clock->xscreen);
346 gcv.graphics_exposures = False;
347
348 pong_clock->xgc = XCreateGC (pong_clock->xdpy, pong_clock->xwin_root,
349 GCForeground|GCBackground|GCGraphicsExposures,
350 &gcv);
351
352 atoms_WINDOW_STATE
353 = XInternAtom(pong_clock->xdpy, "_NET_WM_STATE",False);
354 atoms_WINDOW_STATE_FULLSCREEN
355 = XInternAtom(pong_clock->xdpy, "_NET_WM_STATE_FULLSCREEN",False);
356
357 pong_clock->xwin = XCreateSimpleWindow(pong_clock->xdpy,
358 pong_clock->xwin_root,
359 0, 0,
360 pong_clock->xwin_width,
361 pong_clock->xwin_height,
362 0,
363 WhitePixel(pong_clock->xdpy,
364 pong_clock->xscreen),
365 BlackPixel(pong_clock->xdpy,
366 pong_clock->xscreen));
367
368 pong_clock->backbuffer = XCreatePixmap(pong_clock->xdpy,
369 pong_clock->xwin_root,
370 pong_clock->xwin_width,
371 pong_clock->xwin_height,
372 DefaultDepth(pong_clock->xdpy,
373 pong_clock->xscreen));
374
375 XSelectInput(pong_clock->xdpy, pong_clock->xwin, KeyPressMask);
376
377
378 /* Set the hints for fullscreen */
379 XChangeProperty(pong_clock->xdpy,
380 pong_clock->xwin,
381 atoms_WINDOW_STATE,
382 XA_ATOM,
383 32,
384 PropModeReplace,
385 (unsigned char *) &atoms_WINDOW_STATE_FULLSCREEN, 1);
386
387 XMapWindow(pong_clock->xdpy, pong_clock->xwin);
388
389 while (True)
390 {
391 struct timeval timeout;
392 XEvent xev;
393
394 timeout.tv_sec = 0;
395 timeout.tv_usec = 1000000 / FPS;
396 select (0, NULL, NULL, NULL, &timeout);
397
398 draw_frame (pong_clock);
399
400 XFlush(pong_clock->xdpy);
401
402 if (XPending(pong_clock->xdpy))
403 {
404 if (XCheckMaskEvent(pong_clock->xdpy,
405 KeyPressMask,
406 &xev))
407 exit(-1);
408 }
409 }
410}
diff --git a/meta/packages/pong-clock/pong-clock_1.0.bb b/meta/packages/pong-clock/pong-clock_1.0.bb
deleted file mode 100644
index 571a90dbd3..0000000000
--- a/meta/packages/pong-clock/pong-clock_1.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "A clock combined with a game of pong"
2LICENCE = "GPLv2"
3DEPENDS = "virtual/libx11 xdmcp xau"
4
5SRC_URI = "file://pong-clock-no-flicker.c"
6
7S = "${WORKDIR}"
8
9do_compile () {
10 ${CC} -o pong-clock pong-clock-no-flicker.c `pkg-config --cflags --libs x11 xau xdmcp`
11}
12
13do_install () {
14 install -d ${D}${bindir}
15 install -m 0755 pong-clock ${D}${bindir}
16} \ No newline at end of file
diff --git a/meta/packages/poppler/poppler-data_0.1.bb b/meta/packages/poppler/poppler-data_0.1.bb
deleted file mode 100644
index ca22e4dba0..0000000000
--- a/meta/packages/poppler/poppler-data_0.1.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "Poppler is a PDF rendering library based on the xpdf-3.0 code base."
2LICENSE = "Adobe"
3PR = "r0"
4
5SRC_URI = "http://poppler.freedesktop.org/${PN}-${PV}.tar.gz"
6
7do_compile() {
8}
9
10do_install() {
11 oe_runmake install DESTDIR=${D}
12}
13
14FILES_${PN} += "${datadir}"
15PACKAGE_ARCH = "all"
16
diff --git a/meta/packages/poppler/poppler-fpu.inc b/meta/packages/poppler/poppler-fpu.inc
deleted file mode 100644
index a26273020a..0000000000
--- a/meta/packages/poppler/poppler-fpu.inc
+++ /dev/null
@@ -1,6 +0,0 @@
1
2def get_poppler_fpu_setting(bb, d):
3 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
4 return "--enable-fixedpoint"
5 return ""
6
diff --git a/meta/packages/poppler/poppler.inc b/meta/packages/poppler/poppler.inc
deleted file mode 100644
index 645e734e8b..0000000000
--- a/meta/packages/poppler/poppler.inc
+++ /dev/null
@@ -1,18 +0,0 @@
1DESCRIPTION = "Poppler is a PDF rendering library based on the xpdf-3.0 code base."
2DEPENDS = "fontconfig jpeg zlib gtk+ cairo"
3LICENSE = "GPL"
4PR = "r1"
5
6SRC_URI = "http://poppler.freedesktop.org/${PN}-${PV}.tar.gz"
7
8inherit autotools pkgconfig
9
10EXTRA_OECONF = " --enable-xpdf-headers \
11 --disable-gtk-test \
12 --disable-poppler-qt --disable-poppler-qt4 \
13 --enable-zlib \
14 "
15
16#check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points
17require poppler-fpu.inc
18EXTRA_OECONF += "${@get_poppler_fpu_setting(bb, d)}"
diff --git a/meta/packages/poppler/poppler_0.9.2.bb b/meta/packages/poppler/poppler_0.9.2.bb
deleted file mode 100644
index 92c25bc0ac..0000000000
--- a/meta/packages/poppler/poppler_0.9.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
1require poppler.inc
2PR = "r2"
diff --git a/meta/packages/popt/popt_1.16.bb b/meta/packages/popt/popt_1.16.bb
deleted file mode 100644
index 347c0fc4a4..0000000000
--- a/meta/packages/popt/popt_1.16.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1DESCRIPTION = "The popt library for parsing command line options."
2HOMEPAGE = "http://rpm5.org/"
3SECTION = "libs"
4DEPENDS = "gettext"
5
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d"
8PR = "r0"
9
10SRC_URI = "http://rpm5.org/files/popt/popt-${PV}.tar.gz"
11
12inherit autotools
13
14BBCLASSEXTEND = "native"
diff --git a/meta/packages/portmap/portmap-6.0/destdir-no-strip.patch b/meta/packages/portmap/portmap-6.0/destdir-no-strip.patch
deleted file mode 100644
index a1563c7141..0000000000
--- a/meta/packages/portmap/portmap-6.0/destdir-no-strip.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From: Mike Frysinger <vapier@gentoo.org>
2Date: Sun, 13 May 2007 21:15:12 +0000 (-0400)
3Subject: respect DESTDIR and dont use -s with install
4X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=603c59b978c04df2354f68d4a2dc676a758ff46d
5
6respect DESTDIR and dont use -s with install
7
8$(DESTDIR) is the standard for installing into other trees, not $(BASEDIR) ...
9so I've converted the Makefile to use that. I've also left in $(BASEDIR) as a
10default to support old installs; not sure if you'd just cut it.
11
12Stripping should be left to the person to handle, not automatically done by
13the install step. Also, `install -s` always calls `strip` which is
14wrong/undesired in cross-compiling scenarios.
15
16Signed-off-by: Mike Frysinger <vapier@gentoo.org>
17Signed-off-by: Neil Brown <neilb@suse.de>
18---
19
20diff --git a/Makefile b/Makefile
21index 9e9a4b4..5343428 100644
22--- a/Makefile
23+++ b/Makefile
24@@ -135,13 +135,14 @@ from_local: CPPFLAGS += -DTEST
25 portmap.man : portmap.8
26 sed $(MAN_SED) < portmap.8 > portmap.man
27
28+DESTDIR = $(BASEDIR)
29 install: all
30- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
31- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
32- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
33- install -o root -g root -m 0644 portmap.man ${BASEDIR}/usr/share/man/man8/portmap.8
34- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
35- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
36+ install -o root -g root -m 0755 portmap $(DESTDIR)/sbin
37+ install -o root -g root -m 0755 pmap_dump $(DESTDIR)/sbin
38+ install -o root -g root -m 0755 pmap_set $(DESTDIR)/sbin
39+ install -o root -g root -m 0644 portmap.man $(DESTDIR)/usr/share/man/man8/portmap.8
40+ install -o root -g root -m 0644 pmap_dump.8 $(DESTDIR)/usr/share/man/man8
41+ install -o root -g root -m 0644 pmap_set.8 $(DESTDIR)/usr/share/man/man8
42
43 clean:
44 rm -f *.o portmap pmap_dump pmap_set from_local \
diff --git a/meta/packages/portmap/portmap-6.0/tcpd-config.patch b/meta/packages/portmap/portmap-6.0/tcpd-config.patch
deleted file mode 100644
index da55f3799d..0000000000
--- a/meta/packages/portmap/portmap-6.0/tcpd-config.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From: Mike Frysinger <vapier@gentoo.org>
2Date: Sun, 13 May 2007 21:17:32 +0000 (-0400)
3Subject: fix building with tcpd support disabled
4X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=7847207aed1b44faf077eed14a9ac9c68244eba5
5
6fix building with tcpd support disabled
7
8Make sure pmap_check.c only includes tcpd.h when HOSTS_ACCESS is defined.
9
10Signed-off-by: Timothy Redaelli <drizzt@gentoo.org>
11Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12Signed-off-by: Neil Brown <neilb@suse.de>
13---
14
15diff --git a/pmap_check.c b/pmap_check.c
16index 84f2c12..443a822 100644
17--- a/pmap_check.c
18+++ b/pmap_check.c
19@@ -44,7 +44,9 @@
20 #include <netinet/in.h>
21 #include <rpc/rpcent.h>
22 #endif
23+#ifdef HOSTS_ACCESS
24 #include <tcpd.h>
25+#endif
26 #include <arpa/inet.h>
27 #include <grp.h>
28
diff --git a/meta/packages/portmap/portmap.inc b/meta/packages/portmap/portmap.inc
deleted file mode 100644
index d563ad5b5a..0000000000
--- a/meta/packages/portmap/portmap.inc
+++ /dev/null
@@ -1,31 +0,0 @@
1DESCRIPTION = "RPC program number mapper."
2HOMEPAGE = "http://neil.brown.name/portmap/"
3SECTION = "console/network"
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://portmap.c;beginline=2;endline=31;md5=51ff67e66ec84b2009b017b1f94afbf4 \
6 file://from_local.c;beginline=9;endline=35;md5=1bec938a2268b8b423c58801ace3adc1"
7DEPENDS = "virtual/fakeroot-native"
8
9SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
10 ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz;patch=1 \
11 file://portmap.init \
12 file://make.patch;apply=yes"
13S = "${WORKDIR}/portmap_5beta"
14
15INITSCRIPT_NAME = "portmap"
16INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
17
18inherit update-rc.d
19
20sbindir = "/sbin"
21
22fakeroot do_install() {
23 install -d ${D}${sysconfdir}/init.d
24 install -d ${D}${base_sbindir}
25 install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
26 oe_runmake 'docdir=${docdir}/portmap' 'DESTDIR=${D}' install
27}
28
29PACKAGES =+ "portmap-utils"
30FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump"
31FILES_${PN}-doc += "${docdir}"
diff --git a/meta/packages/portmap/portmap/portmap.init b/meta/packages/portmap/portmap/portmap.init
deleted file mode 100755
index e46513e115..0000000000
--- a/meta/packages/portmap/portmap/portmap.init
+++ /dev/null
@@ -1,59 +0,0 @@
1#!/bin/sh
2#
3### BEGIN INIT INFO
4# Provides: portmap
5# Required-Start: $network
6# Required-Stop: $network
7# Default-Start: S 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: The RPC portmapper
10# Description: Portmap is a server that converts RPC (Remote
11# Procedure Call) program numbers into DARPA
12# protocol port numbers. It must be running in
13# order to make RPC calls. Services that use
14# RPC include NFS and NIS.
15### END INIT INFO
16
17test -f /sbin/portmap || exit 0
18
19case "$1" in
20 start)
21 echo "Starting portmap daemon..."
22 start-stop-daemon --start --quiet --exec /sbin/portmap
23
24 if [ -f /var/run/portmap.upgrade-state ]; then
25 echo "Restoring old RPC service information..."
26 sleep 1 # needs a short pause or pmap_set won't work. :(
27 pmap_set </var/run/portmap.upgrade-state
28 rm -f /var/run/portmap.upgrade-state
29 echo "done."
30 fi
31
32 ;;
33 stop)
34 echo "Stopping portmap daemon..."
35 start-stop-daemon --stop --quiet --exec /sbin/portmap
36 ;;
37 reload)
38 ;;
39 force-reload)
40 $0 restart
41 ;;
42 restart)
43 pmap_dump >/var/run/portmap.state
44 $0 stop
45 $0 start
46 if [ ! -f /var/run/portmap.upgrade-state ]; then
47 sleep 1
48 pmap_set </var/run/portmap.state
49 fi
50 rm -f /var/run/portmap.state
51 ;;
52 *)
53 echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}"
54 exit 1
55 ;;
56esac
57
58exit 0
59
diff --git a/meta/packages/portmap/portmap_6.0.bb b/meta/packages/portmap/portmap_6.0.bb
deleted file mode 100644
index 49ac1d8332..0000000000
--- a/meta/packages/portmap/portmap_6.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1require portmap.inc
2
3DEPENDS += "tcp-wrappers"
4PR = "r7"
5
6SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
7 file://destdir-no-strip.patch \
8 file://tcpd-config.patch \
9 file://portmap.init"
10
11S = "${WORKDIR}/${BPN}_${PV}/"
12
13CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS"
14CFLAGS += "-Wall -Wstrict-prototypes -fPIC"
15
16fakeroot do_install() {
17 install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
18 install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
19 oe_runmake install DESTDIR=${D}
20}
diff --git a/meta/packages/ppp-dialin/files/host-peer b/meta/packages/ppp-dialin/files/host-peer
deleted file mode 100644
index e7e2e11d49..0000000000
--- a/meta/packages/ppp-dialin/files/host-peer
+++ /dev/null
@@ -1,11 +0,0 @@
1-detach
2defaultroute
3nocrtscts
4lock
5noauth
6lcp-echo-interval 5
7lcp-echo-failure 3
8usepeerdns
9115200
10local
11asyncmap 0
diff --git a/meta/packages/ppp-dialin/files/ppp-dialin b/meta/packages/ppp-dialin/files/ppp-dialin
deleted file mode 100644
index ea2771311a..0000000000
--- a/meta/packages/ppp-dialin/files/ppp-dialin
+++ /dev/null
@@ -1,3 +0,0 @@
1#!/bin/sh
2
3/usr/sbin/pppd call host
diff --git a/meta/packages/ppp-dialin/ppp-dialin_0.1.bb b/meta/packages/ppp-dialin/ppp-dialin_0.1.bb
deleted file mode 100644
index 6861d8ad44..0000000000
--- a/meta/packages/ppp-dialin/ppp-dialin_0.1.bb
+++ /dev/null
@@ -1,35 +0,0 @@
1SECTION = "console/network"
2DESCRIPTION = "Enables PPP dial-in through a serial connection"
3DEPENDS = "ppp"
4RDEPENDS = "ppp"
5PR = "r5"
6LICENSE = "MIT"
7
8SRC_URI = "file://host-peer \
9 file://ppp-dialin"
10
11do_install() {
12 install -d ${D}${sysconfdir}/ppp/peers
13 install -m 0644 ${WORKDIR}/host-peer ${D}${sysconfdir}/ppp/peers/host
14
15 install -d ${D}${sbindir}
16 install -m 0755 ${WORKDIR}/ppp-dialin ${D}${sbindir}
17}
18
19PACKAGE_ARCH = "all"
20
21pkg_postinst() {
22if test "x$D" != "x"; then
23 exit 1
24else
25 adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup -s ${sbindir}/ppp-dialin ppp
26fi
27}
28
29pkg_postrm() {
30if test "x$D" != "x"; then
31 exit 1
32else
33 deluser ppp
34fi
35}
diff --git a/meta/packages/ppp/ppp-2.4.5/08setupdns b/meta/packages/ppp/ppp-2.4.5/08setupdns
deleted file mode 100644
index 998219de97..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/08setupdns
+++ /dev/null
@@ -1,12 +0,0 @@
1#!/bin/sh
2ACTUALCONF=/var/run/resolv.conf
3PPPCONF=/var/run/ppp/resolv.conf
4if [ -f $PPPCONF ] ; then
5 if [ -f $ACTUALCONF ] ; then
6 if [ ! -h $ACTUALCONF -o ! "`readlink $ACTUALCONF 2>&1`" = "$PPPCONF" ] ; then
7 mv $ACTUALCONF $ACTUALCONF.ppporig
8 fi
9 fi
10
11 ln -sf $PPPCONF $ACTUALCONF
12fi
diff --git a/meta/packages/ppp/ppp-2.4.5/92removedns b/meta/packages/ppp/ppp-2.4.5/92removedns
deleted file mode 100644
index 2eadec6899..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/92removedns
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2ACTUALCONF=/var/run/resolv.conf
3if [ -f $ACTUALCONF.ppporig ] ; then
4 mv $ACTUALCONF.ppporig $ACTUALCONF
5fi
diff --git a/meta/packages/ppp/ppp-2.4.5/cifdefroute.patch b/meta/packages/ppp/ppp-2.4.5/cifdefroute.patch
deleted file mode 100644
index 6473a08bc7..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/cifdefroute.patch
+++ /dev/null
@@ -1,290 +0,0 @@
1This patch comes from OpenEmbedded.
2The original patch is from Debian / SuSE to implement replacedefaultroute
3Rebased it to fit ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
4
5diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
6--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
7+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 16:40:00.478716855 +0800
8@@ -198,6 +198,16 @@
9 "disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
10 &ipcp_wantoptions[0].default_route },
11
12+#ifdef __linux__
13+ { "replacedefaultroute", o_bool,
14+ &ipcp_wantoptions[0].replace_default_route,
15+ "Replace default route", 1
16+ },
17+ { "noreplacedefaultroute", o_bool,
18+ &ipcp_allowoptions[0].replace_default_route,
19+ "Never replace default route", OPT_A2COPY,
20+ &ipcp_wantoptions[0].replace_default_route },
21+#endif
22 { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
23 "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
24 { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
25@@ -271,7 +281,7 @@
26 ip_active_pkt
27 };
28
29-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
30+static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool));
31 static void ipcp_script __P((char *, int)); /* Run an up/down script */
32 static void ipcp_script_done __P((void *));
33
34@@ -1742,7 +1752,12 @@
35 if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
36 return 0;
37 if (wo->default_route)
38+#ifndef __linux__
39 if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr))
40+#else
41+ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr,
42+ wo->replace_default_route))
43+#endif
44 default_route_set[u] = 1;
45 if (wo->proxy_arp)
46 if (sifproxyarp(u, wo->hisaddr))
47@@ -1830,7 +1845,8 @@
48 */
49 if (demand) {
50 if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
51- ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr);
52+ ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr,
53+ wo->replace_default_route);
54 if (go->ouraddr != wo->ouraddr) {
55 warn("Local IP address changed to %I", go->ouraddr);
56 script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
57@@ -1855,7 +1871,12 @@
58
59 /* assign a default route through the interface if required */
60 if (ipcp_wantoptions[f->unit].default_route)
61+#ifndef __linux__
62 if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
63+#else
64+ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr,
65+ wo->replace_default_route))
66+#endif
67 default_route_set[f->unit] = 1;
68
69 /* Make a proxy ARP entry if requested. */
70@@ -1905,7 +1926,12 @@
71
72 /* assign a default route through the interface if required */
73 if (ipcp_wantoptions[f->unit].default_route)
74+#ifndef __linux__
75 if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
76+#else
77+ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr,
78+ wo->replace_default_route))
79+#endif
80 default_route_set[f->unit] = 1;
81
82 /* Make a proxy ARP entry if requested. */
83@@ -1983,7 +2009,7 @@
84 sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
85 sifdown(f->unit);
86 ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
87- ipcp_hisoptions[f->unit].hisaddr);
88+ ipcp_hisoptions[f->unit].hisaddr, 0);
89 }
90
91 /* Execute the ip-down script */
92@@ -1999,12 +2025,21 @@
93 * proxy arp entries, etc.
94 */
95 static void
96-ipcp_clear_addrs(unit, ouraddr, hisaddr)
97+ipcp_clear_addrs(unit, ouraddr, hisaddr, replacedefaultroute)
98 int unit;
99 u_int32_t ouraddr; /* local address */
100 u_int32_t hisaddr; /* remote address */
101+ bool replacedefaultroute;
102 {
103- if (proxy_arp_set[unit]) {
104+ /* If replacedefaultroute, sifdefaultroute will be called soon
105+ * with replacedefaultroute set and that will overwrite the current
106+ * default route. This is the case only when doing demand, otherwise
107+ * during demand, this cifdefaultroute would restore the old default
108+ * route which is not what we want in this case. In the non-demand
109+ * case, we'll delete the default route and restore the old if there
110+ * is one saved by an sifdefaultroute with replacedefaultroute.
111+ */
112+ if (!replacedefaultroute && default_route_set[unit]) {
113 cifproxyarp(unit, hisaddr);
114 proxy_arp_set[unit] = 0;
115 }
116diff -urN ppp-2.4.5-orig/pppd/ipcp.h ppp-2.4.5/pppd/ipcp.h
117--- ppp-2.4.5-orig/pppd/ipcp.h 2010-06-30 15:51:12.043682063 +0800
118+++ ppp-2.4.5/pppd/ipcp.h 2010-06-30 16:40:49.586203129 +0800
119@@ -70,6 +70,7 @@
120 bool old_addrs; /* Use old (IP-Addresses) option? */
121 bool req_addr; /* Ask peer to send IP address? */
122 bool default_route; /* Assign default route through interface? */
123+ bool replace_default_route; /* Replace default route through interface? */
124 bool proxy_arp; /* Make proxy ARP entry for peer? */
125 bool neg_vj; /* Van Jacobson Compression? */
126 bool old_vj; /* use old (short) form of VJ option? */
127diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8
128--- ppp-2.4.5-orig/pppd/pppd.8 2010-06-30 15:51:12.043682063 +0800
129+++ ppp-2.4.5/pppd/pppd.8 2010-06-30 16:42:47.102413859 +0800
130@@ -121,6 +121,13 @@
131 This entry is removed when the PPP connection is broken. This option
132 is privileged if the \fInodefaultroute\fR option has been specified.
133 .TP
134+.B replacedefaultroute
135+This option is a flag to the defaultroute option. If defaultroute is
136+set and this flag is also set, pppd replaces an existing default route
137+with the new default route.
138+
139+
140+.TP
141 .B disconnect \fIscript
142 Execute the command specified by \fIscript\fR, by passing it to a
143 shell, after
144@@ -717,7 +724,12 @@
145 .TP
146 .B nodefaultroute
147 Disable the \fIdefaultroute\fR option. The system administrator who
148-wishes to prevent users from creating default routes with pppd
149+wishes to prevent users from adding a default route with pppd
150+can do so by placing this option in the /etc/ppp/options file.
151+.TP
152+.B noreplacedefaultroute
153+Disable the \fIreplacedefaultroute\fR option. The system administrator who
154+wishes to prevent users from replacing a default route with pppd
155 can do so by placing this option in the /etc/ppp/options file.
156 .TP
157 .B nodeflate
158diff -urN ppp-2.4.5-orig/pppd/pppd.h ppp-2.4.5/pppd/pppd.h
159--- ppp-2.4.5-orig/pppd/pppd.h 2010-06-30 15:51:12.050166398 +0800
160+++ ppp-2.4.5/pppd/pppd.h 2010-06-30 16:43:36.514148327 +0800
161@@ -643,7 +643,11 @@
162 int cif6addr __P((int, eui64_t, eui64_t));
163 /* Remove an IPv6 address from i/f */
164 #endif
165+#ifndef __linux__
166 int sifdefaultroute __P((int, u_int32_t, u_int32_t));
167+#else
168+int sifdefaultroute __P((int, u_int32_t, u_int32_t, bool replace_default_rt));
169+#endif
170 /* Create default route through i/f */
171 int cifdefaultroute __P((int, u_int32_t, u_int32_t));
172 /* Delete default route through i/f */
173diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
174--- ppp-2.4.5-orig/pppd/sys-linux.c 2010-06-30 15:51:12.050166398 +0800
175+++ ppp-2.4.5/pppd/sys-linux.c 2010-06-30 16:54:00.362716231 +0800
176@@ -206,6 +206,8 @@
177
178 static int if_is_up; /* Interface has been marked up */
179 static int have_default_route; /* Gateway for default route added */
180+static struct rtentry old_def_rt; /* Old default route */
181+static int default_rt_repl_rest; /* replace and restore old default rt */
182 static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
183 static char proxy_arp_dev[16]; /* Device for proxy arp entry */
184 static u_int32_t our_old_addr; /* for detecting address changes */
185@@ -1537,6 +1539,9 @@
186 p = NULL;
187 }
188
189+ SET_SA_FAMILY (rt->rt_dst, AF_INET);
190+ SET_SA_FAMILY (rt->rt_gateway, AF_INET);
191+
192 SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
193 SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
194 SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
195@@ -1606,20 +1611,51 @@
196 /********************************************************************
197 *
198 * sifdefaultroute - assign a default route through the address given.
199- */
200-
201-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
202-{
203- struct rtentry rt;
204-
205- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
206- if (rt.rt_flags & RTF_GATEWAY)
207- error("not replacing existing default route via %I",
208- SIN_ADDR(rt.rt_gateway));
209- else
210- error("not replacing existing default route through %s",
211- rt.rt_dev);
212- return 0;
213+ *
214+ * If the global default_rt_repl_rest flag is set, then this function
215+ * already replaced the original system defaultroute with some other
216+ * route and it should just replace the current defaultroute with
217+ * another one, without saving the current route. Use: demand mode,
218+ * when pppd sets first a defaultroute it it's temporary ppp0 addresses
219+ * and then changes the temporary addresses to the addresses for the real
220+ * ppp connection when it has come up.
221+ */
222+
223+int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace)
224+{
225+ struct rtentry rt, tmp_rt;
226+ struct rtentry *del_rt = NULL;
227+
228+ if (default_rt_repl_rest) {
229+ /* We have already reclaced the original defaultroute, if we
230+ * are called again, we will delete the current default route
231+ * and set the new default route in this function.
232+ * - this is normally only the case the doing demand: */
233+ if (defaultroute_exists( &tmp_rt ))
234+ del_rt = &tmp_rt;
235+ } else if ( defaultroute_exists( &old_def_rt ) &&
236+ strcmp( old_def_rt.rt_dev, ifname ) != 0) {
237+ /* We did not yet replace an existing default route, let's
238+ * check if we should save and replace a default route:
239+ */
240+ u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway);
241+ if (old_gateway != gateway) {
242+ if (!replace) {
243+ error("not replacing default route to %s [%I]",
244+ old_def_rt.rt_dev, old_gateway);
245+ return 0;
246+ } else {
247+ // we need to copy rt_dev because we need it permanent too:
248+ char * tmp_dev = malloc(strlen(old_def_rt.rt_dev)+1);
249+ strcpy(tmp_dev, old_def_rt.rt_dev);
250+ old_def_rt.rt_dev = tmp_dev;
251+
252+ notice("replacing old default route to %s [%I]",
253+ old_def_rt.rt_dev, old_gateway);
254+ default_rt_repl_rest = 1;
255+ del_rt = &old_def_rt;
256+ }
257+ }
258 }
259
260 memset (&rt, 0, sizeof (rt));
261@@ -1638,6 +1674,12 @@
262 error("default route ioctl(SIOCADDRT): %m");
263 return 0;
264 }
265+ if (default_rt_repl_rest && del_rt)
266+ if (ioctl(sock_fd, SIOCDELRT, del_rt) < 0) {
267+ if ( ! ok_error ( errno ))
268+ error("del old default route ioctl(SIOCDELRT): %m(%d)", errno);
269+ return 0;
270+ }
271
272 have_default_route = 1;
273 return 1;
274@@ -1673,6 +1715,16 @@
275 return 0;
276 }
277 }
278+ if (default_rt_repl_rest) {
279+ notice("restoring old default route to %s [%I]",
280+ old_def_rt.rt_dev, SIN_ADDR(old_def_rt.rt_gateway));
281+ if (ioctl(sock_fd, SIOCADDRT, &old_def_rt) < 0) {
282+ if ( ! ok_error ( errno ))
283+ error("restore default route ioctl(SIOCADDRT): %m(%d)", errno);
284+ return 0;
285+ }
286+ default_rt_repl_rest = 0;
287+ }
288
289 return 1;
290 }
diff --git a/meta/packages/ppp/ppp-2.4.5/enable-ipv6.patch b/meta/packages/ppp/ppp-2.4.5/enable-ipv6.patch
deleted file mode 100644
index daa7f2ecc6..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/enable-ipv6.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1The patch comes from OpenEmbedded
2
3--- ppp-2.4.3/pppd/Makefile.linux.orig 2005-10-28 21:07:40.396359250 +0100
4+++ ppp-2.4.3/pppd/Makefile.linux 2005-10-28 21:07:54.217223000 +0100
5@@ -62,7 +62,7 @@
6
7 HAS_SHADOW=y
8 #USE_PAM=y
9-#HAVE_INET6=y
10+HAVE_INET6=y
11
12 # Enable plugins
13 PLUGIN=y
diff --git a/meta/packages/ppp/ppp-2.4.5/init b/meta/packages/ppp/ppp-2.4.5/init
deleted file mode 100755
index 5b3b7abe2f..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/init
+++ /dev/null
@@ -1,50 +0,0 @@
1#!/bin/sh
2#
3# /etc/init.d/ppp: start or stop PPP link.
4#
5# If you want PPP started on boot time (most dialup systems won't need it)
6# rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and
7# follow the instructions in the comments in that file.
8
9test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0
10if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi
11
12case "$1" in
13 start)
14 echo -n "Starting up PPP link: pppd"
15 if [ "$RUNFILE" = "1" ]; then
16 /etc/ppp/ppp_on_boot
17 else
18 pppd call provider
19 fi
20 echo "."
21 ;;
22 stop)
23 echo -n "Shutting down PPP link: pppd"
24 if [ "$RUNFILE" = "1" ]; then
25 poff
26 else
27 poff provider
28 fi
29 echo "."
30 ;;
31 restart|force-reload)
32 echo -n "Restarting PPP link: pppd"
33 if [ "$RUNFILE" = "1" ]; then
34 poff
35 sleep 5
36 /etc/ppp/ppp_on_boot
37 else
38 poff provider
39 sleep 5
40 pppd call provider
41 fi
42 echo "."
43 ;;
44 *)
45 echo "Usage: /etc/init.d/ppp {start|stop|restart|force-reload}"
46 exit 1
47 ;;
48esac
49
50exit 0
diff --git a/meta/packages/ppp/ppp-2.4.5/ip-down b/meta/packages/ppp/ppp-2.4.5/ip-down
deleted file mode 100755
index 06d35487a5..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/ip-down
+++ /dev/null
@@ -1,43 +0,0 @@
1#!/bin/sh
2#
3# $Id: ip-down,v 1.2 1998/02/10 21:21:55 phil Exp $
4#
5# This script is run by the pppd _after_ the link is brought down.
6# It uses run-parts to run scripts in /etc/ppp/ip-down.d, so to delete
7# routes, unset IP addresses etc. you should create script(s) there.
8#
9# Be aware that other packages may include /etc/ppp/ip-down.d scripts (named
10# after that package), so choose local script names with that in mind.
11#
12# This script is called with the following arguments:
13# Arg Name Example
14# $1 Interface name ppp0
15# $2 The tty ttyS1
16# $3 The link speed 38400
17# $4 Local IP number 12.34.56.78
18# $5 Peer IP number 12.34.56.99
19# $6 Optional ``ipparam'' value foo
20
21# The environment is cleared before executing this script
22# so the path must be reset
23PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
24export PATH
25# These variables are for the use of the scripts run by run-parts
26PPP_IFACE="$1"
27PPP_TTY="$2"
28PPP_SPEED="$3"
29PPP_LOCAL="$4"
30PPP_REMOTE="$5"
31PPP_IPPARAM="$6"
32export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
33
34# as an additional convenience, $PPP_TTYNAME is set to the tty name,
35# stripped of /dev/ (if present) for easier matching.
36PPP_TTYNAME=`/usr/bin/basename "$2"`
37export PPP_TTYNAME
38
39# Main Script starts here
40
41run-parts /etc/ppp/ip-down.d
42
43# last line
diff --git a/meta/packages/ppp/ppp-2.4.5/ip-up b/meta/packages/ppp/ppp-2.4.5/ip-up
deleted file mode 100755
index fc2fae9fe0..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/ip-up
+++ /dev/null
@@ -1,44 +0,0 @@
1#!/bin/sh
2#
3# $Id: ip-up,v 1.2 1998/02/10 21:25:34 phil Exp $
4#
5# This script is run by the pppd after the link is established.
6# It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes,
7# set IP address, run the mailq etc. you should create script(s) there.
8#
9# Be aware that other packages may include /etc/ppp/ip-up.d scripts (named
10# after that package), so choose local script names with that in mind.
11#
12# This script is called with the following arguments:
13# Arg Name Example
14# $1 Interface name ppp0
15# $2 The tty ttyS1
16# $3 The link speed 38400
17# $4 Local IP number 12.34.56.78
18# $5 Peer IP number 12.34.56.99
19# $6 Optional ``ipparam'' value foo
20
21# The environment is cleared before executing this script
22# so the path must be reset
23PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
24export PATH
25# These variables are for the use of the scripts run by run-parts
26PPP_IFACE="$1"
27PPP_TTY="$2"
28PPP_SPEED="$3"
29PPP_LOCAL="$4"
30PPP_REMOTE="$5"
31PPP_IPPARAM="$6"
32export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
33
34
35# as an additional convenience, $PPP_TTYNAME is set to the tty name,
36# stripped of /dev/ (if present) for easier matching.
37PPP_TTYNAME=`/usr/bin/basename "$2"`
38export PPP_TTYNAME
39
40# Main Script starts here
41
42run-parts /etc/ppp/ip-up.d
43
44# last line
diff --git a/meta/packages/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch b/meta/packages/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
deleted file mode 100644
index 9ba868839e..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1The patch comes from OpenEmbedded.
2Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
3
4diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
5--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
6+++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 17:08:21.806363042 +0800
7@@ -117,10 +117,10 @@
8 #LIBS += -lshadow $(LIBS)
9 endif
10
11-ifneq ($(wildcard /usr/include/crypt.h),)
12+#ifneq ($(wildcard /usr/include/crypt.h),)
13 CFLAGS += -DHAVE_CRYPT_H=1
14 LIBS += -lcrypt
15-endif
16+#endif
17
18 ifdef NEEDDES
19 ifndef USE_CRYPT
diff --git a/meta/packages/ppp/ppp-2.4.5/makefile.patch b/meta/packages/ppp/ppp-2.4.5/makefile.patch
deleted file mode 100644
index 94af5af6de..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/makefile.patch
+++ /dev/null
@@ -1,93 +0,0 @@
1The patch comes from OpenEmbedded
2Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
3
4diff -ruN ppp-2.4.5-orig/chat/Makefile.linux ppp-2.4.5/chat/Makefile.linux
5--- ppp-2.4.5-orig/chat/Makefile.linux 2010-06-30 15:51:12.050166398 +0800
6+++ ppp-2.4.5/chat/Makefile.linux 2010-06-30 15:51:30.450118446 +0800
7@@ -25,7 +25,7 @@
8
9 install: chat
10 mkdir -p $(BINDIR) $(MANDIR)
11- $(INSTALL) -s -c chat $(BINDIR)
12+ $(INSTALL) -c chat $(BINDIR)
13 $(INSTALL) -c -m 644 chat.8 $(MANDIR)
14
15 clean:
16diff -ruN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
17--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
18+++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 15:52:11.214170607 +0800
19@@ -99,7 +99,7 @@
20 CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
21 LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
22 TARGETS += srp-entry
23-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
24+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
25 MANPAGES += srp-entry.8
26 EXTRACLEAN += srp-entry.o
27 NEEDDES=y
28@@ -200,7 +200,7 @@
29 install: pppd
30 mkdir -p $(BINDIR) $(MANDIR)
31 $(EXTRAINSTALL)
32- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
33+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
34 if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
35 chmod o-rx,u+s $(BINDIR)/pppd; fi
36 $(INSTALL) -c -m 444 pppd.8 $(MANDIR)
37diff -ruN ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux ppp-2.4.5/pppd/plugins/radius/Makefile.linux
38--- ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux 2010-06-30 15:51:12.047676187 +0800
39+++ ppp-2.4.5/pppd/plugins/radius/Makefile.linux 2010-06-30 15:53:47.750182267 +0800
40@@ -36,11 +36,11 @@
41
42 install: all
43 $(INSTALL) -d -m 755 $(LIBDIR)
44- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
45- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
46- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
47- $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
48- $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
49+ $(INSTALL) -c -m 755 radius.so $(LIBDIR)
50+ $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
51+ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
52+ $(INSTALL) -m 444 pppd-radius.8 $(MANDIR)
53+ $(INSTALL) -m 444 pppd-radattr.8 $(MANDIR)
54
55 radius.so: radius.o libradiusclient.a
56 $(CC) -o radius.so -shared radius.o libradiusclient.a
57diff -ruN ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux
58--- ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:51:12.047676187 +0800
59+++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:53:15.454486877 +0800
60@@ -43,9 +43,9 @@
61
62 install: all
63 $(INSTALL) -d -m 755 $(LIBDIR)
64- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
65+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
66 $(INSTALL) -d -m 755 $(BINDIR)
67- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
68+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
69
70 clean:
71 rm -f *.o *.so pppoe-discovery
72diff -ruN ppp-2.4.5-orig/pppdump/Makefile.linux ppp-2.4.5/pppdump/Makefile.linux
73--- ppp-2.4.5-orig/pppdump/Makefile.linux 2010-06-30 15:51:12.058183383 +0800
74+++ ppp-2.4.5/pppdump/Makefile.linux 2010-06-30 15:52:25.762183537 +0800
75@@ -17,5 +17,5 @@
76
77 install:
78 mkdir -p $(BINDIR) $(MANDIR)
79- $(INSTALL) -s -c pppdump $(BINDIR)
80+ $(INSTALL) -c pppdump $(BINDIR)
81 $(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
82diff -ruN ppp-2.4.5-orig/pppstats/Makefile.linux ppp-2.4.5/pppstats/Makefile.linux
83--- ppp-2.4.5-orig/pppstats/Makefile.linux 2010-06-30 15:51:12.058183383 +0800
84+++ ppp-2.4.5/pppstats/Makefile.linux 2010-06-30 15:52:42.486341081 +0800
85@@ -22,7 +22,7 @@
86
87 install: pppstats
88 -mkdir -p $(MANDIR)
89- $(INSTALL) -s -c pppstats $(BINDIR)
90+ $(INSTALL) -c pppstats $(BINDIR)
91 $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
92
93 pppstats: $(PPPSTATSRCS)
diff --git a/meta/packages/ppp/ppp-2.4.5/poff b/meta/packages/ppp/ppp-2.4.5/poff
deleted file mode 100644
index 0521a9406a..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/poff
+++ /dev/null
@@ -1,26 +0,0 @@
1#!/bin/sh
2
3# Lets see how many pppds are running....
4set -- `cat /var/run/ppp*.pid 2>/dev/null`
5
6case $# in
7 0) # pppd only creates a pid file once ppp is up, so let's try killing pppd
8 # on the assumption that we've not got that far yet.
9 killall pppd
10 ;;
11 1) # If only one was running then it can be killed (apparently killall
12 # caused problems for some, so lets try killing the pid from the file)
13 kill $1
14 ;;
15 *) # More than one! Aieehh.. Dont know which one to kill.
16 echo "More than one pppd running. None stopped"
17 exit 1
18 ;;
19esac
20
21if [ -r /var/run/ppp-quick ]
22then
23 rm -f /var/run/ppp-quick
24fi
25
26exit 0
diff --git a/meta/packages/ppp/ppp-2.4.5/pon b/meta/packages/ppp/ppp-2.4.5/pon
deleted file mode 100644
index 91c059501a..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/pon
+++ /dev/null
@@ -1,9 +0,0 @@
1#!/bin/sh
2
3if [ "$1" = "quick" ]
4then
5 touch /var/run/ppp-quick
6 shift
7fi
8
9/usr/sbin/pppd call ${1:-provider}
diff --git a/meta/packages/ppp/ppp-2.4.5/pppd-resolv-varrun.patch b/meta/packages/ppp/ppp-2.4.5/pppd-resolv-varrun.patch
deleted file mode 100644
index c4e61fdd28..0000000000
--- a/meta/packages/ppp/ppp-2.4.5/pppd-resolv-varrun.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1The patch comes from OpenEmbedded
2Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
3
4diff -ruN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
5--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
6+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 17:02:33.930393283 +0800
7@@ -55,6 +55,8 @@
8 #include <sys/socket.h>
9 #include <netinet/in.h>
10 #include <arpa/inet.h>
11+#include <sys/stat.h>
12+#include <unistd.h>
13
14 #include "pppd.h"
15 #include "fsm.h"
16@@ -2095,6 +2097,14 @@
17 u_int32_t peerdns1, peerdns2;
18 {
19 FILE *f;
20+ struct stat dirinfo;
21+
22+ if(stat(_PATH_OUTDIR, &dirinfo)) {
23+ if(mkdir(_PATH_OUTDIR, 0775)) {
24+ error("Failed to create directory %s: %m", _PATH_OUTDIR);
25+ return;
26+ }
27+ }
28
29 f = fopen(_PATH_RESOLV, "w");
30 if (f == NULL) {
31diff -ruN ppp-2.4.5-orig/pppd/pathnames.h ppp-2.4.5/pppd/pathnames.h
32--- ppp-2.4.5-orig/pppd/pathnames.h 2010-06-30 15:51:12.043682063 +0800
33+++ ppp-2.4.5/pppd/pathnames.h 2010-06-30 17:03:20.594371055 +0800
34@@ -30,7 +30,8 @@
35 #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
36 #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
37 #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
38-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf"
39+#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp"
40+#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf"
41
42 #define _PATH_USEROPT ".ppprc"
43 #define _PATH_PSEUDONYM ".ppp_pseudonym"
diff --git a/meta/packages/ppp/ppp_2.4.5.bb b/meta/packages/ppp/ppp_2.4.5.bb
deleted file mode 100644
index e9caf3d13e..0000000000
--- a/meta/packages/ppp/ppp_2.4.5.bb
+++ /dev/null
@@ -1,77 +0,0 @@
1DESCRIPTION = "ppp (Paul's PPP Package) is an open source package which implements \
2the Point-to-Point Protocol (PPP) on Linux and Solaris systems."
3SECTION = "console/network"
4HOMEPAGE = "http://samba.org/ppp/"
5BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs"
6DEPENDS = "libpcap"
7LICENSE = "BSD & GPLv2+ & LGPLv2+ & public domain"
8LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
9 file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
10 file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
11 file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
12PR = "r0"
13
14SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
15 file://makefile.patch \
16 file://cifdefroute.patch \
17 file://pppd-resolv-varrun.patch \
18 file://enable-ipv6.patch \
19 file://makefile-remove-hard-usr-reference.patch \
20 file://pon \
21 file://poff \
22 file://init \
23 file://ip-up \
24 file://ip-down \
25 file://08setupdns \
26 file://92removedns"
27
28SRC_URI_append_nylon = " file://ppp-tdbread.patch;patch=1"
29
30inherit autotools
31
32EXTRA_OEMAKE = "STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}/usr/include LIBDIR=${D}/usr/lib/pppd/${PV} BINDIR=${D}/usr/sbin"
33EXTRA_OECONF = "--disable-strip"
34
35do_install_append () {
36 make install-etcppp ETCDIR=${D}/${sysconfdir}/ppp
37 mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
38 mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
39 mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
40 install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
41 install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
42 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
43 install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/
44 install -m 0755 ${WORKDIR}/ip-down ${D}${sysconfdir}/ppp/
45 install -m 0755 ${WORKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/
46 install -m 0755 ${WORKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/
47 rm -rf ${D}/${mandir}/man8/man8
48}
49
50CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
51PACKAGES += "ppp-oa ppp-oe ppp-radius ppp-winbind ppp-minconn ppp-password ppp-tools"
52FILES_${PN} = "/etc /usr/bin /usr/sbin/chat /usr/sbin/pppd"
53FILES_${PN}_nylon = "/etc /usr/bin /usr/sbin/chat /usr/sbin/pppd /usr/sbin/tdbread"
54FILES_${PN}-dbg += "${libdir}/pppd/2.4.3/.debug"
55FILES_ppp-oa = "/usr/lib/pppd/2.4.3/pppoatm.so"
56FILES_ppp-oe = "/usr/sbin/pppoe-discovery /usr/lib/pppd/2.4.3/rp-pppoe.so"
57FILES_ppp-radius = "/usr/lib/pppd/2.4.3/radius.so /usr/lib/pppd/2.4.3/radattr.so /usr/lib/pppd/2.4.3/radrealms.so"
58FILES_ppp-winbind = "/usr/lib/pppd/2.4.3/winbind.so"
59FILES_ppp-minconn = "/usr/lib/pppd/2.4.3/minconn.so"
60FILES_ppp-password = "/usr/lib/pppd/2.4.3/pass*.so"
61FILES_ppp-tools = "/usr/sbin/pppstats /usr/sbin/pppdump"
62DESCRIPTION_ppp-oa = "Plugin for PPP needed for PPP-over-ATM"
63DESCRIPTION_ppp-oe = "Plugin for PPP needed for PPP-over-Ethernet"
64DESCRIPTION_ppp-radius = "Plugin for PPP that are related to RADIUS"
65DESCRIPTION_ppp-winbind = "Plugin for PPP to authenticate against Samba or Windows"
66DESCRIPTION_ppp-minconn = "Plugin for PPP to specify a minimum connect time before the idle timeout applies"
67DESCRIPTION_ppp-password = "Plugin for PPP to get passwords via a pipe"
68DESCRIPTION_ppp-tools = "The pppdump and pppstats utitilities"
69RDEPENDS_ppp_minconn += "libpcap0.8"
70
71pkg_postinst_${PN}() {
72if test "x$D" != "x"; then
73 exit 1
74else
75 chmod u+s ${sbindir}/pppd
76fi
77}
diff --git a/meta/packages/psmisc/files/libintl-link.patch b/meta/packages/psmisc/files/libintl-link.patch
deleted file mode 100644
index d9cdd90d71..0000000000
--- a/meta/packages/psmisc/files/libintl-link.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1uClibc needs to link against an external libintl but it doesn't do this by
2default. The configure script correctly figures out if this is needed, but
3doesn't actually link to the libraries it decides on. This makes it link to
4them if they are needed:
5
6--- psmisc-22.2/src/Makefile.am 2006/06/28 00:14:07 1.1
7+++ psmisc-22.2/src/Makefile.am 2006/06/28 00:14:24
8@@ -5,15 +5,19 @@
9
10 oldfuser_SOURCES = oldfuser.c comm.h signals.c signals.h loop.h i18n.h
11
12+oldfuser_LDADD = @INTLLIBS@
13+
14 fuser_SOURCES = fuser.c comm.h signals.c signals.h i18n.h fuser.h
15
16+fuser_LDADD = @INTLLIBS@
17+
18 killall_SOURCES = killall.c comm.h signals.c signals.h i18n.h
19
20-killall_LDADD = @SELINUX_LIB@
21+killall_LDADD = @SELINUX_LIB@ @INTLLIBS@
22
23 pstree_SOURCES = pstree.c comm.h i18n.h
24
25-pstree_LDADD = @TERMCAP_LIB@ @SELINUX_LIB@
26+pstree_LDADD = @TERMCAP_LIB@ @SELINUX_LIB@ @INTLLIBS@
27
28 BUILT_SOURCES = signames.h
29
diff --git a/meta/packages/psmisc/psmisc.inc b/meta/packages/psmisc/psmisc.inc
deleted file mode 100644
index d489891d64..0000000000
--- a/meta/packages/psmisc/psmisc.inc
+++ /dev/null
@@ -1,55 +0,0 @@
1LICENSE = "GPL"
2DESCRIPTION = "procfs tools"
3SECTION = "base"
4PRIORITY = "required"
5DEPENDS = "ncurses virtual/libintl"
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz \
8 file://libintl-link.patch;patch=1"
9S = "${WORKDIR}/psmisc-${PV}"
10
11inherit autotools gettext
12
13ALLOW_EMPTY = "1"
14
15PACKAGES = "${PN} \
16 fuser-dbg fuser fuser-doc \
17 killall-dbg killall killall-doc \
18 pstree-dbg pstree pstree-doc"
19
20FILES_${PN} = ""
21RDEPENDS_${PN} = "fuser killall pstree"
22
23FILES_fuser = "${bindir}/fuser.${PN}"
24FILES_fuser-doc = "${mandir}/man1/fuser*"
25FILES_fuser-dbg = "${bindir}/.debug/fuser"
26
27FILES_killall = "${bindir}/killall.${PN}"
28FILES_killall-doc = "${mandir}/man1/killall*"
29FILES_killall-dbg = "${bindir}/.debug/killall*"
30
31FILES_pstree = "${bindir}/pstree"
32FILES_pstree-doc = "${mandir}/man1/pstree*"
33FILES_pstree-dbg = "${bindir}/.debug/pstree"
34
35do_install_append() {
36 mv ${D}${bindir}/killall ${D}${bindir}/killall.${PN}
37 mv ${D}${bindir}/fuser ${D}${bindir}/fuser.${PN}
38}
39
40pkg_postinst_killall() {
41 update-alternatives --install ${bindir}/killall killall killall.${PN} 90
42}
43
44pkg_postrm_killall() {
45 update-alternatives --remove ${bindir}/killall killall.${PN}
46}
47
48pkg_postinst_fuser() {
49 update-alternatives --install ${bindir}/fuser fuser fuser.${PN} 90
50}
51
52pkg_postrm_fuser() {
53 update-alternatives --remove ${bindir}/fuser fuser.${PN}
54}
55
diff --git a/meta/packages/psmisc/psmisc_22.2.bb b/meta/packages/psmisc/psmisc_22.2.bb
deleted file mode 100644
index 62327fa4d6..0000000000
--- a/meta/packages/psmisc/psmisc_22.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
1require psmisc.inc
2PR = "r1"
diff --git a/meta/packages/pth/pth_2.0.7.bb b/meta/packages/pth/pth_2.0.7.bb
deleted file mode 100644
index 8ee3cd4cd1..0000000000
--- a/meta/packages/pth/pth_2.0.7.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1DESCRIPTION = "GNU Portable Threads"
2HOMEPAGE = "http://www.gnu.org/software/pth/"
3SECTION = "libs"
4PRIORITY = "optional"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;beginline=12;endline=15;md5=a48af114a80c222cafd37f24370a77b1"
7PR = "r1"
8
9SRC_URI = "${GNU_MIRROR}/pth/pth-${PV}.tar.gz"
10
11PARALLEL_MAKE=""
12
13inherit autotools binconfig
14
15do_configure() {
16 gnu-configize
17 oe_runconf
18}
19
20FILES_${PN} = "${libdir}/libpth.so.*"
21FILES_${PN}-dev += "${bindir}/pth-config"
diff --git a/meta/packages/readline/files/acinclude.m4 b/meta/packages/readline/files/acinclude.m4
deleted file mode 100644
index 8a45f99084..0000000000
--- a/meta/packages/readline/files/acinclude.m4
+++ /dev/null
@@ -1,1815 +0,0 @@
1dnl
2dnl Bash specific tests
3dnl
4dnl Some derived from PDKSH 5.1.3 autoconf tests
5dnl
6
7AC_DEFUN([BASH_C_LONG_LONG],
8[AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
9[if test "$GCC" = yes; then
10 ac_cv_c_long_long=yes
11else
12AC_TRY_RUN([
13int
14main()
15{
16long long foo = 0;
17exit(sizeof(long long) < sizeof(long));
18}
19], ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
20fi])
21if test $ac_cv_c_long_long = yes; then
22 AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the `long long' type works.])
23fi
24])
25
26dnl
27dnl This is very similar to AC_C_LONG_DOUBLE, with the fix for IRIX
28dnl (< changed to <=) added.
29dnl
30AC_DEFUN([BASH_C_LONG_DOUBLE],
31[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
32[if test "$GCC" = yes; then
33 ac_cv_c_long_double=yes
34else
35AC_TRY_RUN([
36int
37main()
38{
39 /* The Stardent Vistra knows sizeof(long double), but does not
40 support it. */
41 long double foo = 0.0;
42 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
43 /* On IRIX 5.3, the compiler converts long double to double with a warning,
44 but compiles this successfully. */
45 exit(sizeof(long double) <= sizeof(double));
46}
47], ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
48fi])
49if test $ac_cv_c_long_double = yes; then
50 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if the `long double' type works.])
51fi
52])
53
54dnl
55dnl Check for <inttypes.h>. This is separated out so that it can be
56dnl AC_REQUIREd.
57dnl
58dnl BASH_HEADER_INTTYPES
59AC_DEFUN([BASH_HEADER_INTTYPES],
60[
61 AC_CHECK_HEADERS(inttypes.h)
62])
63
64dnl
65dnl check for typedef'd symbols in header files, but allow the caller to
66dnl specify the include files to be checked in addition to the default
67dnl
68dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND])
69AC_DEFUN([BASH_CHECK_TYPE],
70[
71AC_REQUIRE([AC_HEADER_STDC])dnl
72AC_REQUIRE([BASH_HEADER_INTTYPES])
73AC_MSG_CHECKING(for $1)
74AC_CACHE_VAL(bash_cv_type_$1,
75[AC_EGREP_CPP($1, [#include <sys/types.h>
76#if STDC_HEADERS
77#include <stdlib.h>
78#include <stddef.h>
79#endif
80#if HAVE_INTTYPES_H
81#include <inttypes.h>
82#endif
83$2
84], bash_cv_type_$1=yes, bash_cv_type_$1=no)])
85AC_MSG_RESULT($bash_cv_type_$1)
86ifelse($#, 4, [if test $bash_cv_type_$1 = yes; then
87 AC_DEFINE($4)
88 fi])
89if test $bash_cv_type_$1 = no; then
90 AC_DEFINE_UNQUOTED($1, $3)
91fi
92])
93
94dnl
95dnl BASH_CHECK_DECL(FUNC)
96dnl
97dnl Check for a declaration of FUNC in stdlib.h and inttypes.h like
98dnl AC_CHECK_DECL
99dnl
100AC_DEFUN([BASH_CHECK_DECL],
101[
102AC_REQUIRE([AC_HEADER_STDC])
103AC_REQUIRE([BASH_HEADER_INTTYPES])
104AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1,
105[AC_TRY_LINK(
106[
107#if STDC_HEADERS
108# include <stdlib.h>
109#endif
110#if HAVE_INTTYPES_H
111# include <inttypes.h>
112#endif
113],
114[return !$1;],
115bash_cv_decl_$1=yes, bash_cv_decl_$1=no)])
116bash_tr_func=HAVE_DECL_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
117if test $bash_cv_decl_$1 = yes; then
118 AC_DEFINE_UNQUOTED($bash_tr_func, 1)
119else
120 AC_DEFINE_UNQUOTED($bash_tr_func, 0)
121fi
122])
123
124AC_DEFUN([BASH_DECL_PRINTF],
125[AC_MSG_CHECKING(for declaration of printf in <stdio.h>)
126AC_CACHE_VAL(bash_cv_printf_declared,
127[AC_TRY_RUN([
128#include <stdio.h>
129#ifdef __STDC__
130typedef int (*_bashfunc)(const char *, ...);
131#else
132typedef int (*_bashfunc)();
133#endif
134main()
135{
136_bashfunc pf;
137pf = (_bashfunc) printf;
138exit(pf == 0);
139}
140], bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
141 [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes)
142 bash_cv_printf_declared=yes]
143)])
144AC_MSG_RESULT($bash_cv_printf_declared)
145if test $bash_cv_printf_declared = yes; then
146AC_DEFINE(PRINTF_DECLARED)
147fi
148])
149
150AC_DEFUN([BASH_DECL_SBRK],
151[AC_MSG_CHECKING(for declaration of sbrk in <unistd.h>)
152AC_CACHE_VAL(bash_cv_sbrk_declared,
153[AC_EGREP_HEADER(sbrk, unistd.h,
154 bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)])
155AC_MSG_RESULT($bash_cv_sbrk_declared)
156if test $bash_cv_sbrk_declared = yes; then
157AC_DEFINE(SBRK_DECLARED)
158fi
159])
160
161dnl
162dnl Check for sys_siglist[] or _sys_siglist[]
163dnl
164AC_DEFUN([BASH_DECL_UNDER_SYS_SIGLIST],
165[AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h])
166AC_CACHE_VAL(bash_cv_decl_under_sys_siglist,
167[AC_TRY_COMPILE([
168#include <sys/types.h>
169#include <signal.h>
170#ifdef HAVE_UNISTD_H
171#include <unistd.h>
172#endif], [ char *msg = _sys_siglist[2]; ],
173 bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no,
174 [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
175AC_MSG_RESULT($bash_cv_decl_under_sys_siglist)
176if test $bash_cv_decl_under_sys_siglist = yes; then
177AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED)
178fi
179])
180
181AC_DEFUN([BASH_UNDER_SYS_SIGLIST],
182[AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
183AC_MSG_CHECKING([for _sys_siglist in system C library])
184AC_CACHE_VAL(bash_cv_under_sys_siglist,
185[AC_TRY_RUN([
186#include <sys/types.h>
187#include <signal.h>
188#ifdef HAVE_UNISTD_H
189#include <unistd.h>
190#endif
191#ifndef UNDER_SYS_SIGLIST_DECLARED
192extern char *_sys_siglist[];
193#endif
194main()
195{
196char *msg = (char *)_sys_siglist[2];
197exit(msg == 0);
198}],
199 bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
200 [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
201 bash_cv_under_sys_siglist=no])])
202AC_MSG_RESULT($bash_cv_under_sys_siglist)
203if test $bash_cv_under_sys_siglist = yes; then
204AC_DEFINE(HAVE_UNDER_SYS_SIGLIST)
205fi
206])
207
208AC_DEFUN([BASH_SYS_SIGLIST],
209[
210AC_CHECK_DECLS([sys_siglist])
211AC_MSG_CHECKING([for sys_siglist in system C library])
212AC_CACHE_VAL(bash_cv_sys_siglist,
213[AC_TRY_RUN([
214#include <sys/types.h>
215#include <signal.h>
216#ifdef HAVE_UNISTD_H
217#include <unistd.h>
218#endif
219#ifndef HAVE_DECL_SYS_SIGLIST
220extern char *sys_siglist[];
221#endif
222main()
223{
224char *msg = sys_siglist[2];
225exit(msg == 0);
226}],
227 bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
228 [AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no)
229 bash_cv_sys_siglist=no])])
230AC_MSG_RESULT($bash_cv_sys_siglist)
231if test $bash_cv_sys_siglist = yes; then
232AC_DEFINE(HAVE_SYS_SIGLIST)
233fi
234])
235
236dnl Check for the various permutations of sys_siglist and make sure we
237dnl compile in siglist.o if they're not defined
238AC_DEFUN([BASH_CHECK_SYS_SIGLIST], [
239AC_REQUIRE([BASH_SYS_SIGLIST])
240AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
241AC_REQUIRE([BASH_FUNC_STRSIGNAL])
242if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
243 SIGLIST_O=siglist.o
244else
245 SIGLIST_O=
246fi
247AC_SUBST([SIGLIST_O])
248])
249
250dnl Check for sys_errlist[] and sys_nerr, check for declaration
251AC_DEFUN([BASH_SYS_ERRLIST],
252[AC_MSG_CHECKING([for sys_errlist and sys_nerr])
253AC_CACHE_VAL(bash_cv_sys_errlist,
254[AC_TRY_LINK([#include <errno.h>],
255[extern char *sys_errlist[];
256 extern int sys_nerr;
257 char *msg = sys_errlist[sys_nerr - 1];],
258 bash_cv_sys_errlist=yes, bash_cv_sys_errlist=no)])dnl
259AC_MSG_RESULT($bash_cv_sys_errlist)
260if test $bash_cv_sys_errlist = yes; then
261AC_DEFINE(HAVE_SYS_ERRLIST)
262fi
263])
264
265dnl
266dnl Check if dup2() does not clear the close on exec flag
267dnl
268AC_DEFUN([BASH_FUNC_DUP2_CLOEXEC_CHECK],
269[AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag)
270AC_CACHE_VAL(bash_cv_dup2_broken,
271[AC_TRY_RUN([
272#include <sys/types.h>
273#include <fcntl.h>
274main()
275{
276 int fd1, fd2, fl;
277 fd1 = open("/dev/null", 2);
278 if (fcntl(fd1, 2, 1) < 0)
279 exit(1);
280 fd2 = dup2(fd1, 1);
281 if (fd2 < 0)
282 exit(2);
283 fl = fcntl(fd2, 1, 0);
284 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
285 exit(fl != 1);
286}
287], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no,
288 [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no)
289 bash_cv_dup2_broken=no])
290])
291AC_MSG_RESULT($bash_cv_dup2_broken)
292if test $bash_cv_dup2_broken = yes; then
293AC_DEFINE(DUP2_BROKEN)
294fi
295])
296
297AC_DEFUN([BASH_FUNC_STRSIGNAL],
298[AC_MSG_CHECKING([for the existence of strsignal])
299AC_CACHE_VAL(bash_cv_have_strsignal,
300[AC_TRY_LINK([#include <sys/types.h>
301#include <signal.h>],
302[char *s = (char *)strsignal(2);],
303 bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)])
304AC_MSG_RESULT($bash_cv_have_strsignal)
305if test $bash_cv_have_strsignal = yes; then
306AC_DEFINE(HAVE_STRSIGNAL)
307fi
308])
309
310dnl Check to see if opendir will open non-directories (not a nice thing)
311AC_DEFUN([BASH_FUNC_OPENDIR_CHECK],
312[AC_REQUIRE([AC_HEADER_DIRENT])dnl
313AC_MSG_CHECKING(if opendir() opens non-directories)
314AC_CACHE_VAL(bash_cv_opendir_not_robust,
315[AC_TRY_RUN([
316#include <stdio.h>
317#include <sys/types.h>
318#include <fcntl.h>
319#ifdef HAVE_UNISTD_H
320# include <unistd.h>
321#endif /* HAVE_UNISTD_H */
322#if defined(HAVE_DIRENT_H)
323# include <dirent.h>
324#else
325# define dirent direct
326# ifdef HAVE_SYS_NDIR_H
327# include <sys/ndir.h>
328# endif /* SYSNDIR */
329# ifdef HAVE_SYS_DIR_H
330# include <sys/dir.h>
331# endif /* SYSDIR */
332# ifdef HAVE_NDIR_H
333# include <ndir.h>
334# endif
335#endif /* HAVE_DIRENT_H */
336main()
337{
338DIR *dir;
339int fd, err;
340err = mkdir("/tmp/bash-aclocal", 0700);
341if (err < 0) {
342 perror("mkdir");
343 exit(1);
344}
345unlink("/tmp/bash-aclocal/not_a_directory");
346fd = open("/tmp/bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
347write(fd, "\n", 1);
348close(fd);
349dir = opendir("/tmp/bash-aclocal/not_a_directory");
350unlink("/tmp/bash-aclocal/not_a_directory");
351rmdir("/tmp/bash-aclocal");
352exit (dir == 0);
353}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no,
354 [AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no)
355 bash_cv_opendir_not_robust=no]
356)])
357AC_MSG_RESULT($bash_cv_opendir_not_robust)
358if test $bash_cv_opendir_not_robust = yes; then
359AC_DEFINE(OPENDIR_NOT_ROBUST)
360fi
361])
362
363dnl
364AH_TEMPLATE([VOID_SIGHANDLER], [Define if signal handlers return type void])
365AC_DEFUN([BASH_TYPE_SIGHANDLER],
366[AC_MSG_CHECKING([whether signal handlers are of type void])
367AC_CACHE_VAL(bash_cv_void_sighandler,
368[AC_TRY_COMPILE([#include <sys/types.h>
369#include <signal.h>
370#ifdef signal
371#undef signal
372#endif
373#ifdef __cplusplus
374extern "C"
375#endif
376void (*signal ()) ();],
377[int i;], bash_cv_void_sighandler=yes, bash_cv_void_sighandler=no)])dnl
378AC_MSG_RESULT($bash_cv_void_sighandler)
379if test $bash_cv_void_sighandler = yes; then
380AC_DEFINE(VOID_SIGHANDLER)
381fi
382])
383
384dnl
385dnl A signed 16-bit integer quantity
386dnl
387AC_DEFUN([BASH_TYPE_BITS16_T],
388[
389if test "$ac_cv_sizeof_short" = 2; then
390 AC_CHECK_TYPE(bits16_t, short)
391elif test "$ac_cv_sizeof_char" = 2; then
392 AC_CHECK_TYPE(bits16_t, char)
393else
394 AC_CHECK_TYPE(bits16_t, short)
395fi
396])
397
398dnl
399dnl An unsigned 16-bit integer quantity
400dnl
401AC_DEFUN([BASH_TYPE_U_BITS16_T],
402[
403if test "$ac_cv_sizeof_short" = 2; then
404 AC_CHECK_TYPE(u_bits16_t, unsigned short)
405elif test "$ac_cv_sizeof_char" = 2; then
406 AC_CHECK_TYPE(u_bits16_t, unsigned char)
407else
408 AC_CHECK_TYPE(u_bits16_t, unsigned short)
409fi
410])
411
412dnl
413dnl A signed 32-bit integer quantity
414dnl
415AC_DEFUN([BASH_TYPE_BITS32_T],
416[
417if test "$ac_cv_sizeof_int" = 4; then
418 AC_CHECK_TYPE(bits32_t, int)
419elif test "$ac_cv_sizeof_long" = 4; then
420 AC_CHECK_TYPE(bits32_t, long)
421else
422 AC_CHECK_TYPE(bits32_t, int)
423fi
424])
425
426dnl
427dnl An unsigned 32-bit integer quantity
428dnl
429AC_DEFUN([BASH_TYPE_U_BITS32_T],
430[
431if test "$ac_cv_sizeof_int" = 4; then
432 AC_CHECK_TYPE(u_bits32_t, unsigned int)
433elif test "$ac_cv_sizeof_long" = 4; then
434 AC_CHECK_TYPE(u_bits32_t, unsigned long)
435else
436 AC_CHECK_TYPE(u_bits32_t, unsigned int)
437fi
438])
439
440AC_DEFUN([BASH_TYPE_PTRDIFF_T],
441[
442if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
443 AC_CHECK_TYPE(ptrdiff_t, int)
444elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
445 AC_CHECK_TYPE(ptrdiff_t, long)
446elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
447 AC_CHECK_TYPE(ptrdiff_t, [long long])
448else
449 AC_CHECK_TYPE(ptrdiff_t, int)
450fi
451])
452
453dnl
454dnl A signed 64-bit quantity
455dnl
456AC_DEFUN([BASH_TYPE_BITS64_T],
457[
458if test "$ac_cv_sizeof_char_p" = 8; then
459 AC_CHECK_TYPE(bits64_t, char *)
460elif test "$ac_cv_sizeof_double" = 8; then
461 AC_CHECK_TYPE(bits64_t, double)
462elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
463 AC_CHECK_TYPE(bits64_t, [long long])
464elif test "$ac_cv_sizeof_long" = 8; then
465 AC_CHECK_TYPE(bits64_t, long)
466else
467 AC_CHECK_TYPE(bits64_t, double)
468fi
469])
470
471AC_DEFUN([BASH_TYPE_LONG_LONG],
472[
473AC_CACHE_CHECK([for long long], bash_cv_type_long_long,
474[AC_TRY_LINK([
475long long ll = 1; int i = 63;],
476[
477long long llm = (long long) -1;
478return ll << i | ll >> i | llm / ll | llm % ll;
479], bash_cv_type_long_long='long long', bash_cv_type_long_long='long')])
480if test "$bash_cv_type_long_long" = 'long long'; then
481 AC_DEFINE(HAVE_LONG_LONG, 1)
482fi
483])
484
485AC_DEFUN([BASH_TYPE_UNSIGNED_LONG_LONG],
486[
487AC_CACHE_CHECK([for unsigned long long], bash_cv_type_unsigned_long_long,
488[AC_TRY_LINK([
489unsigned long long ull = 1; int i = 63;],
490[
491unsigned long long ullmax = (unsigned long long) -1;
492return ull << i | ull >> i | ullmax / ull | ullmax % ull;
493], bash_cv_type_unsigned_long_long='unsigned long long',
494 bash_cv_type_unsigned_long_long='unsigned long')])
495if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
496 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1)
497fi
498])
499
500dnl
501dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0)
502dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use
503dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3). To simplify
504dnl matters, this just checks for rlim_t, quad_t, or long.
505dnl
506AC_DEFUN([BASH_TYPE_RLIMIT],
507[AC_MSG_CHECKING(for size and type of struct rlimit fields)
508AC_CACHE_VAL(bash_cv_type_rlimit,
509[AC_TRY_COMPILE([#include <sys/types.h>
510#include <sys/resource.h>],
511[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[
512AC_TRY_RUN([
513#include <sys/types.h>
514#include <sys/time.h>
515#include <sys/resource.h>
516main()
517{
518#ifdef HAVE_QUAD_T
519 struct rlimit rl;
520 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
521 exit(0);
522#endif
523 exit(1);
524}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long,
525 [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long)
526 bash_cv_type_rlimit=long])])
527])
528AC_MSG_RESULT($bash_cv_type_rlimit)
529if test $bash_cv_type_rlimit = quad_t; then
530AC_DEFINE(RLIMTYPE, quad_t)
531elif test $bash_cv_type_rlimit = rlim_t; then
532AC_DEFINE(RLIMTYPE, rlim_t)
533fi
534])
535
536AC_DEFUN([BASH_FUNC_LSTAT],
537[dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an
538dnl inline function in <sys/stat.h>.
539AC_CACHE_CHECK([for lstat], bash_cv_func_lstat,
540[AC_TRY_LINK([
541#include <sys/types.h>
542#include <sys/stat.h>
543],[ lstat(".",(struct stat *)0); ],
544bash_cv_func_lstat=yes, bash_cv_func_lstat=no)])
545if test $bash_cv_func_lstat = yes; then
546 AC_DEFINE(HAVE_LSTAT)
547fi
548])
549
550AC_DEFUN([BASH_FUNC_INET_ATON],
551[
552AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton,
553[AC_TRY_LINK([
554#include <sys/types.h>
555#include <netinet/in.h>
556#include <arpa/inet.h>
557struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ],
558bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)])
559if test $bash_cv_func_inet_aton = yes; then
560 AC_DEFINE(HAVE_INET_ATON)
561else
562 AC_LIBOBJ(inet_aton)
563fi
564])
565
566AC_DEFUN([BASH_FUNC_GETENV],
567[AC_MSG_CHECKING(to see if getenv can be redefined)
568AC_CACHE_VAL(bash_cv_getenv_redef,
569[AC_TRY_RUN([
570#ifdef HAVE_UNISTD_H
571# include <unistd.h>
572#endif
573#ifndef __STDC__
574# ifndef const
575# define const
576# endif
577#endif
578char *
579getenv (name)
580#if defined (__linux__) || defined (__bsdi__) || defined (convex)
581 const char *name;
582#else
583 char const *name;
584#endif /* !__linux__ && !__bsdi__ && !convex */
585{
586return "42";
587}
588main()
589{
590char *s;
591/* The next allows this program to run, but does not allow bash to link
592 when it redefines getenv. I'm not really interested in figuring out
593 why not. */
594#if defined (NeXT)
595exit(1);
596#endif
597s = getenv("ABCDE");
598exit(s == 0); /* force optimizer to leave getenv in */
599}
600], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no,
601 [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes)
602 bash_cv_getenv_redef=yes]
603)])
604AC_MSG_RESULT($bash_cv_getenv_redef)
605if test $bash_cv_getenv_redef = yes; then
606AC_DEFINE(CAN_REDEFINE_GETENV)
607fi
608])
609
610# We should check for putenv before calling this
611AC_DEFUN([BASH_FUNC_STD_PUTENV],
612[
613AC_REQUIRE([AC_HEADER_STDC])
614AC_REQUIRE([AC_C_PROTOTYPES])
615AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv,
616[AC_TRY_LINK([
617#if STDC_HEADERS
618#include <stdlib.h>
619#include <stddef.h>
620#endif
621#ifndef __STDC__
622# ifndef const
623# define const
624# endif
625#endif
626#ifdef PROTOTYPES
627extern int putenv (char *);
628#else
629extern int putenv ();
630#endif
631],
632[return (putenv == 0);],
633bash_cv_std_putenv=yes, bash_cv_std_putenv=no
634)])
635if test $bash_cv_std_putenv = yes; then
636AC_DEFINE(HAVE_STD_PUTENV)
637fi
638])
639
640# We should check for unsetenv before calling this
641AC_DEFUN([BASH_FUNC_STD_UNSETENV],
642[
643AC_REQUIRE([AC_HEADER_STDC])
644AC_REQUIRE([AC_C_PROTOTYPES])
645AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv,
646[AC_TRY_LINK([
647#if STDC_HEADERS
648#include <stdlib.h>
649#include <stddef.h>
650#endif
651#ifndef __STDC__
652# ifndef const
653# define const
654# endif
655#endif
656#ifdef PROTOTYPES
657extern int unsetenv (const char *);
658#else
659extern int unsetenv ();
660#endif
661],
662[return (unsetenv == 0);],
663bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no
664)])
665if test $bash_cv_std_unsetenv = yes; then
666AC_DEFINE(HAVE_STD_UNSETENV)
667fi
668])
669
670AC_DEFUN([BASH_FUNC_ULIMIT_MAXFDS],
671[AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize)
672AC_CACHE_VAL(bash_cv_ulimit_maxfds,
673[AC_TRY_RUN([
674main()
675{
676long maxfds = ulimit(4, 0L);
677exit (maxfds == -1L);
678}
679], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
680 [AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no)
681 bash_cv_ulimit_maxfds=no]
682)])
683AC_MSG_RESULT($bash_cv_ulimit_maxfds)
684if test $bash_cv_ulimit_maxfds = yes; then
685AC_DEFINE(ULIMIT_MAXFDS)
686fi
687])
688
689AC_DEFUN([BASH_FUNC_GETCWD],
690[AC_MSG_CHECKING([if getcwd() calls popen()])
691AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
692[AC_TRY_RUN([
693#include <stdio.h>
694#ifdef HAVE_UNISTD_H
695#include <unistd.h>
696#endif
697
698#ifndef __STDC__
699#ifndef const
700#define const
701#endif
702#endif
703
704int popen_called;
705
706FILE *
707popen(command, type)
708 const char *command;
709 const char *type;
710{
711 popen_called = 1;
712 return (FILE *)NULL;
713}
714
715FILE *_popen(command, type)
716 const char *command;
717 const char *type;
718{
719 return (popen (command, type));
720}
721
722int
723pclose(stream)
724FILE *stream;
725{
726 return 0;
727}
728
729int
730_pclose(stream)
731FILE *stream;
732{
733 return 0;
734}
735
736main()
737{
738 char lbuf[32];
739 popen_called = 0;
740 getcwd(lbuf, 32);
741 exit (popen_called);
742}
743], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
744 [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
745 bash_cv_getcwd_calls_popen=no]
746)])
747AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
748if test $bash_cv_getcwd_calls_popen = yes; then
749AC_DEFINE(GETCWD_BROKEN)
750AC_LIBOBJ(getcwd)
751fi
752])
753
754dnl
755dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every
756dnl system, we can't use AC_PREREQ
757dnl
758AC_DEFUN([BASH_FUNC_GETHOSTBYNAME],
759[if test "X$bash_cv_have_gethostbyname" = "X"; then
760_bash_needmsg=yes
761else
762AC_MSG_CHECKING(for gethostbyname in socket library)
763_bash_needmsg=
764fi
765AC_CACHE_VAL(bash_cv_have_gethostbyname,
766[AC_TRY_LINK([#include <netdb.h>],
767[ struct hostent *hp;
768 hp = gethostbyname("localhost");
769], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)]
770)
771if test "X$_bash_needmsg" = Xyes; then
772 AC_MSG_CHECKING(for gethostbyname in socket library)
773fi
774AC_MSG_RESULT($bash_cv_have_gethostbyname)
775if test "$bash_cv_have_gethostbyname" = yes; then
776AC_DEFINE(HAVE_GETHOSTBYNAME)
777fi
778])
779
780AC_DEFUN([BASH_FUNC_FNMATCH_EXTMATCH],
781[AC_MSG_CHECKING(if fnmatch does extended pattern matching with FNM_EXTMATCH)
782AC_CACHE_VAL(bash_cv_fnm_extmatch,
783[AC_TRY_RUN([
784#include <fnmatch.h>
785
786main()
787{
788#ifdef FNM_EXTMATCH
789 exit (0);
790#else
791 exit (1);
792#endif
793}
794], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no,
795 [AC_MSG_WARN(cannot check FNM_EXTMATCH if cross compiling -- defaulting to no)
796 bash_cv_fnm_extmatch=no])
797])
798AC_MSG_RESULT($bash_cv_fnm_extmatch)
799if test $bash_cv_fnm_extmatch = yes; then
800AC_DEFINE(HAVE_LIBC_FNM_EXTMATCH)
801fi
802])
803
804AH_TEMPLATE([HAVE_POSIX_SIGSETJMP], [Define if we POSIX-style sigsetjmp/siglongjmp are available])
805AC_DEFUN([BASH_FUNC_POSIX_SETJMP],
806[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
807AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp)
808AC_CACHE_VAL(bash_cv_func_sigsetjmp,
809[AC_TRY_RUN([
810#ifdef HAVE_UNISTD_H
811#include <unistd.h>
812#endif
813#include <sys/types.h>
814#include <signal.h>
815#include <setjmp.h>
816
817main()
818{
819#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
820exit (1);
821#else
822
823int code;
824sigset_t set, oset;
825sigjmp_buf xx;
826
827/* get the mask */
828sigemptyset(&set);
829sigemptyset(&oset);
830sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
831sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
832
833/* save it */
834code = sigsetjmp(xx, 1);
835if (code)
836 exit(0); /* could get sigmask and compare to oset here. */
837
838/* change it */
839sigaddset(&set, SIGINT);
840sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
841
842/* and siglongjmp */
843siglongjmp(xx, 10);
844exit(1);
845#endif
846}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
847 [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
848 bash_cv_func_sigsetjmp=missing]
849)])
850AC_MSG_RESULT($bash_cv_func_sigsetjmp)
851if test $bash_cv_func_sigsetjmp = present; then
852AC_DEFINE(HAVE_POSIX_SIGSETJMP)
853fi
854])
855
856AH_TEMPLATE([STRCOLL_BROKEN], [Define if strcoll is broken with respect to strcmp in the default locale.])
857AC_DEFUN([BASH_FUNC_STRCOLL],
858[
859AC_MSG_CHECKING(whether or not strcoll and strcmp differ)
860AC_CACHE_VAL(bash_cv_func_strcoll_broken,
861[AC_TRY_RUN([
862#include <stdio.h>
863#if defined (HAVE_LOCALE_H)
864#include <locale.h>
865#endif
866
867main(c, v)
868int c;
869char *v[];
870{
871 int r1, r2;
872 char *deflocale, *defcoll;
873
874#ifdef HAVE_SETLOCALE
875 deflocale = setlocale(LC_ALL, "");
876 defcoll = setlocale(LC_COLLATE, "");
877#endif
878
879#ifdef HAVE_STRCOLL
880 /* These two values are taken from tests/glob-test. */
881 r1 = strcoll("abd", "aXd");
882#else
883 r1 = 0;
884#endif
885 r2 = strcmp("abd", "aXd");
886
887 /* These two should both be greater than 0. It is permissible for
888 a system to return different values, as long as the sign is the
889 same. */
890
891 /* Exit with 1 (failure) if these two values are both > 0, since
892 this tests whether strcoll(3) is broken with respect to strcmp(3)
893 in the default locale. */
894 exit (r1 > 0 && r2 > 0);
895}
896], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no,
897 [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no)
898 bash_cv_func_strcoll_broken=no]
899)])
900AC_MSG_RESULT($bash_cv_func_strcoll_broken)
901if test $bash_cv_func_strcoll_broken = yes; then
902AC_DEFINE(STRCOLL_BROKEN)
903fi
904])
905
906AC_DEFUN([BASH_FUNC_PRINTF_A_FORMAT],
907[AC_MSG_CHECKING([for printf floating point output in hex notation])
908AC_CACHE_VAL(bash_cv_printf_a_format,
909[AC_TRY_RUN([
910#include <stdio.h>
911#include <string.h>
912
913int
914main()
915{
916 double y = 0.0;
917 char abuf[1024];
918
919 sprintf(abuf, "%A", y);
920 exit(strchr(abuf, 'P') == (char *)0);
921}
922], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no,
923 [AC_MSG_WARN(cannot check printf if cross compiling -- defaulting to no)
924 bash_cv_printf_a_format=no]
925)])
926AC_MSG_RESULT($bash_cv_printf_a_format)
927if test $bash_cv_printf_a_format = yes; then
928AC_DEFINE(HAVE_PRINTF_A_FORMAT)
929fi
930])
931
932AC_DEFUN([BASH_STRUCT_TERMIOS_LDISC],
933[
934AC_CHECK_MEMBER(struct termios.c_line, AC_DEFINE(TERMIOS_LDISC), ,[
935#include <sys/types.h>
936#include <termios.h>
937])
938])
939
940AC_DEFUN([BASH_STRUCT_TERMIO_LDISC],
941[
942AC_CHECK_MEMBER(struct termio.c_line, AC_DEFINE(TERMIO_LDISC), ,[
943#include <sys/types.h>
944#include <termio.h>
945])
946])
947
948dnl
949dnl Like AC_STRUCT_ST_BLOCKS, but doesn't muck with LIBOBJS
950dnl
951dnl sets bash_cv_struct_stat_st_blocks
952dnl
953dnl unused for now; we'll see how AC_CHECK_MEMBERS works
954dnl
955AC_DEFUN([BASH_STRUCT_ST_BLOCKS],
956[
957AC_MSG_CHECKING([for struct stat.st_blocks])
958AC_CACHE_VAL(bash_cv_struct_stat_st_blocks,
959[AC_TRY_COMPILE(
960[
961#include <sys/types.h>
962#include <sys/stat.h>
963],
964[
965main()
966{
967static struct stat a;
968if (a.st_blocks) return 0;
969return 0;
970}
971], bash_cv_struct_stat_st_blocks=yes, bash_cv_struct_stat_st_blocks=no)
972])
973AC_MSG_RESULT($bash_cv_struct_stat_st_blocks)
974if test "$bash_cv_struct_stat_st_blocks" = "yes"; then
975AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS)
976fi
977])
978
979AC_DEFUN([BASH_CHECK_LIB_TERMCAP],
980[
981if test "X$bash_cv_termcap_lib" = "X"; then
982_bash_needmsg=yes
983else
984AC_MSG_CHECKING(which library has the termcap functions)
985_bash_needmsg=
986fi
987AC_CACHE_VAL(bash_cv_termcap_lib,
988[AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
989 [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
990 [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
991 [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
992 bash_cv_termcap_lib=gnutermcap)])])])])
993if test "X$_bash_needmsg" = "Xyes"; then
994AC_MSG_CHECKING(which library has the termcap functions)
995fi
996AC_MSG_RESULT(using $bash_cv_termcap_lib)
997if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
998LDFLAGS="$LDFLAGS -L./lib/termcap"
999TERMCAP_LIB="./lib/termcap/libtermcap.a"
1000TERMCAP_DEP="./lib/termcap/libtermcap.a"
1001elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
1002TERMCAP_LIB=-ltermcap
1003TERMCAP_DEP=
1004elif test $bash_cv_termcap_lib = libtinfo; then
1005TERMCAP_LIB=-ltinfo
1006TERMCAP_DEP=
1007elif test $bash_cv_termcap_lib = libncurses; then
1008TERMCAP_LIB=-lncurses
1009TERMCAP_DEP=
1010else
1011TERMCAP_LIB=-lcurses
1012TERMCAP_DEP=
1013fi
1014])
1015
1016dnl
1017dnl Check for the presence of getpeername in libsocket.
1018dnl If libsocket is present, check for libnsl and add it to LIBS if
1019dnl it's there, since most systems with libsocket require linking
1020dnl with libnsl as well. This should only be called if getpeername
1021dnl was not found in libc.
1022dnl
1023dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT
1024dnl AS WELL
1025dnl
1026AC_DEFUN([BASH_CHECK_LIB_SOCKET],
1027[
1028if test "X$bash_cv_have_socklib" = "X"; then
1029_bash_needmsg=
1030else
1031AC_MSG_CHECKING(for socket library)
1032_bash_needmsg=yes
1033fi
1034AC_CACHE_VAL(bash_cv_have_socklib,
1035[AC_CHECK_LIB(socket, getpeername,
1036 bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)])
1037if test "X$_bash_needmsg" = Xyes; then
1038 AC_MSG_RESULT($bash_cv_have_socklib)
1039 _bash_needmsg=
1040fi
1041if test $bash_cv_have_socklib = yes; then
1042 # check for libnsl, add it to LIBS if present
1043 if test "X$bash_cv_have_libnsl" = "X"; then
1044 _bash_needmsg=
1045 else
1046 AC_MSG_CHECKING(for libnsl)
1047 _bash_needmsg=yes
1048 fi
1049 AC_CACHE_VAL(bash_cv_have_libnsl,
1050 [AC_CHECK_LIB(nsl, t_open,
1051 bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)])
1052 if test "X$_bash_needmsg" = Xyes; then
1053 AC_MSG_RESULT($bash_cv_have_libnsl)
1054 _bash_needmsg=
1055 fi
1056 if test $bash_cv_have_libnsl = yes; then
1057 LIBS="-lsocket -lnsl $LIBS"
1058 else
1059 LIBS="-lsocket $LIBS"
1060 fi
1061 AC_DEFINE(HAVE_LIBSOCKET)
1062 AC_DEFINE(HAVE_GETPEERNAME)
1063fi
1064])
1065
1066AH_TEMPLATE([STRUCT_DIRENT_HAS_D_INO], [Define if struct dirent has a d_ino member])
1067AC_DEFUN([BASH_STRUCT_DIRENT_D_INO],
1068[AC_REQUIRE([AC_HEADER_DIRENT])
1069AC_MSG_CHECKING(if struct dirent has a d_ino member)
1070AC_CACHE_VAL(bash_cv_dirent_has_dino,
1071[AC_TRY_COMPILE([
1072#include <stdio.h>
1073#include <sys/types.h>
1074#ifdef HAVE_UNISTD_H
1075# include <unistd.h>
1076#endif /* HAVE_UNISTD_H */
1077#if defined(HAVE_DIRENT_H)
1078# include <dirent.h>
1079#else
1080# define dirent direct
1081# ifdef HAVE_SYS_NDIR_H
1082# include <sys/ndir.h>
1083# endif /* SYSNDIR */
1084# ifdef HAVE_SYS_DIR_H
1085# include <sys/dir.h>
1086# endif /* SYSDIR */
1087# ifdef HAVE_NDIR_H
1088# include <ndir.h>
1089# endif
1090#endif /* HAVE_DIRENT_H */
1091],[
1092struct dirent d; int z; z = d.d_ino;
1093], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)])
1094AC_MSG_RESULT($bash_cv_dirent_has_dino)
1095if test $bash_cv_dirent_has_dino = yes; then
1096AC_DEFINE(STRUCT_DIRENT_HAS_D_INO)
1097fi
1098])
1099
1100AH_TEMPLATE([STRUCT_DIRENT_HAS_D_FILENO], [Define if struct dirent has a d_fileno member])
1101AC_DEFUN([BASH_STRUCT_DIRENT_D_FILENO],
1102[AC_REQUIRE([AC_HEADER_DIRENT])
1103AC_MSG_CHECKING(if struct dirent has a d_fileno member)
1104AC_CACHE_VAL(bash_cv_dirent_has_d_fileno,
1105[AC_TRY_COMPILE([
1106#include <stdio.h>
1107#include <sys/types.h>
1108#ifdef HAVE_UNISTD_H
1109# include <unistd.h>
1110#endif /* HAVE_UNISTD_H */
1111#if defined(HAVE_DIRENT_H)
1112# include <dirent.h>
1113#else
1114# define dirent direct
1115# ifdef HAVE_SYS_NDIR_H
1116# include <sys/ndir.h>
1117# endif /* SYSNDIR */
1118# ifdef HAVE_SYS_DIR_H
1119# include <sys/dir.h>
1120# endif /* SYSDIR */
1121# ifdef HAVE_NDIR_H
1122# include <ndir.h>
1123# endif
1124#endif /* HAVE_DIRENT_H */
1125],[
1126struct dirent d; int z; z = d.d_fileno;
1127], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)])
1128AC_MSG_RESULT($bash_cv_dirent_has_d_fileno)
1129if test $bash_cv_dirent_has_d_fileno = yes; then
1130AC_DEFINE(STRUCT_DIRENT_HAS_D_FILENO)
1131fi
1132])
1133
1134AC_DEFUN([BASH_STRUCT_TIMEVAL],
1135[AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h)
1136AC_CACHE_VAL(bash_cv_struct_timeval,
1137[
1138AC_EGREP_HEADER(struct timeval, sys/time.h,
1139 bash_cv_struct_timeval=yes,
1140 AC_EGREP_HEADER(struct timeval, time.h,
1141 bash_cv_struct_timeval=yes,
1142 bash_cv_struct_timeval=no))
1143])
1144AC_MSG_RESULT($bash_cv_struct_timeval)
1145if test $bash_cv_struct_timeval = yes; then
1146 AC_DEFINE(HAVE_TIMEVAL)
1147fi
1148])
1149
1150AH_TEMPLATE([STRUCT_WINSIZE_IN_SYS_IOCTL], [Define if struct winsize is in sys/ioctl.h])
1151AH_TEMPLATE([STRUCT_WINSIZE_IN_TERMIOS], [Define if struct winsize is in termios.h])
1152AC_DEFUN([BASH_STRUCT_WINSIZE],
1153[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h)
1154AC_CACHE_VAL(bash_cv_struct_winsize_header,
1155[AC_TRY_COMPILE([#include <sys/types.h>
1156#include <sys/ioctl.h>], [struct winsize x;],
1157 bash_cv_struct_winsize_header=ioctl_h,
1158 [AC_TRY_COMPILE([#include <sys/types.h>
1159#include <termios.h>], [struct winsize x;],
1160 bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other)
1161])])
1162if test $bash_cv_struct_winsize_header = ioctl_h; then
1163 AC_MSG_RESULT(sys/ioctl.h)
1164 AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL)
1165elif test $bash_cv_struct_winsize_header = termios_h; then
1166 AC_MSG_RESULT(termios.h)
1167 AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS)
1168else
1169 AC_MSG_RESULT(not found)
1170fi
1171])
1172
1173dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
1174AH_TEMPLATE([HAVE_POSIX_SIGNALS], [Define if we have the POSIX signal routines])
1175AH_TEMPLATE([HAVE_BSD_SIGNALS], [Define if we have the BSD signal routines])
1176AH_TEMPLATE([HAVE_USG_SIGHOLD], [Define if we have the USG signal routines])
1177AC_DEFUN([BASH_SYS_SIGNAL_VINTAGE],
1178[AC_REQUIRE([AC_TYPE_SIGNAL])
1179AC_MSG_CHECKING(for type of signal functions)
1180AC_CACHE_VAL(bash_cv_signal_vintage,
1181[
1182 AC_MSG_WARN([checking for posix...])
1183 AC_TRY_LINK([#include <signal.h>],[
1184 sigset_t ss;
1185 struct sigaction sa;
1186 sigemptyset(&ss); sigsuspend(&ss);
1187 sigaction(SIGINT, &sa, (struct sigaction *) 0);
1188 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
1189 ], bash_cv_signal_vintage="posix",
1190 [
1191 AC_MSG_WARN([checking for 4.2bsd...])
1192 AC_TRY_LINK([#include <signal.h>], [
1193 int mask = sigmask(SIGINT);
1194 sigsetmask(mask); sigblock(mask); sigpause(mask);
1195 ], bash_cv_signal_vintage="4.2bsd",
1196 [
1197 AC_MSG_WARN([checking for svr3...])
1198 AC_TRY_LINK([
1199 #include <signal.h>
1200 RETSIGTYPE foo() { }], [
1201 int mask = sigmask(SIGINT);
1202 sigset(SIGINT, foo); sigrelse(SIGINT);
1203 sighold(SIGINT); sigpause(SIGINT);
1204 ], bash_cv_signal_vintage="svr3", bash_cv_signal_vintage="v7"
1205 )]
1206 )]
1207)
1208])
1209AC_MSG_RESULT($bash_cv_signal_vintage)
1210if test "$bash_cv_signal_vintage" = "posix"; then
1211AC_DEFINE(HAVE_POSIX_SIGNALS)
1212elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
1213AC_DEFINE(HAVE_BSD_SIGNALS)
1214elif test "$bash_cv_signal_vintage" = "svr3"; then
1215AC_DEFINE(HAVE_USG_SIGHOLD)
1216fi
1217])
1218
1219dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process.
1220AC_DEFUN([BASH_SYS_PGRP_SYNC],
1221[AC_REQUIRE([AC_FUNC_GETPGRP])
1222AC_MSG_CHECKING(whether pgrps need synchronization)
1223AC_CACHE_VAL(bash_cv_pgrp_pipe,
1224[AC_TRY_RUN([
1225#ifdef HAVE_UNISTD_H
1226# include <unistd.h>
1227#endif
1228main()
1229{
1230# ifdef GETPGRP_VOID
1231# define getpgID() getpgrp()
1232# else
1233# define getpgID() getpgrp(0)
1234# define setpgid(x,y) setpgrp(x,y)
1235# endif
1236 int pid1, pid2, fds[2];
1237 int status;
1238 char ok;
1239
1240 switch (pid1 = fork()) {
1241 case -1:
1242 exit(1);
1243 case 0:
1244 setpgid(0, getpid());
1245 exit(0);
1246 }
1247 setpgid(pid1, pid1);
1248
1249 sleep(2); /* let first child die */
1250
1251 if (pipe(fds) < 0)
1252 exit(2);
1253
1254 switch (pid2 = fork()) {
1255 case -1:
1256 exit(3);
1257 case 0:
1258 setpgid(0, pid1);
1259 ok = getpgID() == pid1;
1260 write(fds[1], &ok, 1);
1261 exit(0);
1262 }
1263 setpgid(pid2, pid1);
1264
1265 close(fds[1]);
1266 if (read(fds[0], &ok, 1) != 1)
1267 exit(4);
1268 wait(&status);
1269 wait(&status);
1270 exit(ok ? 0 : 5);
1271}
1272], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes,
1273 [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no)
1274 bash_cv_pgrp_pipe=no])
1275])
1276AC_MSG_RESULT($bash_cv_pgrp_pipe)
1277if test $bash_cv_pgrp_pipe = yes; then
1278AC_DEFINE(PGRP_PIPE)
1279fi
1280])
1281
1282AH_TEMPLATE([MUST_REINSTALL_SIGHANDLERS], [Define if signal handlers must be reinstalled when invoked.])
1283AC_DEFUN([BASH_SYS_REINSTALL_SIGHANDLERS],
1284[AC_REQUIRE([AC_TYPE_SIGNAL])
1285AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
1286AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked])
1287AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
1288[AC_TRY_RUN([
1289#include <signal.h>
1290#ifdef HAVE_UNISTD_H
1291#include <unistd.h>
1292#endif
1293
1294typedef RETSIGTYPE sigfunc();
1295
1296int nsigint;
1297
1298#ifdef HAVE_POSIX_SIGNALS
1299sigfunc *
1300set_signal_handler(sig, handler)
1301 int sig;
1302 sigfunc *handler;
1303{
1304 struct sigaction act, oact;
1305 act.sa_handler = handler;
1306 act.sa_flags = 0;
1307 sigemptyset (&act.sa_mask);
1308 sigemptyset (&oact.sa_mask);
1309 sigaction (sig, &act, &oact);
1310 return (oact.sa_handler);
1311}
1312#else
1313#define set_signal_handler(s, h) signal(s, h)
1314#endif
1315
1316RETSIGTYPE
1317sigint(s)
1318int s;
1319{
1320 nsigint++;
1321}
1322
1323main()
1324{
1325 nsigint = 0;
1326 set_signal_handler(SIGINT, sigint);
1327 kill((int)getpid(), SIGINT);
1328 kill((int)getpid(), SIGINT);
1329 exit(nsigint != 2);
1330}
1331], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes,
1332 [AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no)
1333 bash_cv_must_reinstall_sighandlers=no]
1334)])
1335AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers)
1336if test $bash_cv_must_reinstall_sighandlers = yes; then
1337AC_DEFINE(MUST_REINSTALL_SIGHANDLERS)
1338fi
1339])
1340
1341dnl check that some necessary job control definitions are present
1342AC_DEFUN([BASH_SYS_JOB_CONTROL_MISSING],
1343[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
1344AC_MSG_CHECKING(for presence of necessary job control definitions)
1345AC_CACHE_VAL(bash_cv_job_control_missing,
1346[AC_TRY_RUN([
1347#include <sys/types.h>
1348#ifdef HAVE_SYS_WAIT_H
1349#include <sys/wait.h>
1350#endif
1351#ifdef HAVE_UNISTD_H
1352#include <unistd.h>
1353#endif
1354#include <signal.h>
1355
1356/* Add more tests in here as appropriate. */
1357main()
1358{
1359/* signal type */
1360#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
1361exit(1);
1362#endif
1363
1364/* signals and tty control. */
1365#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
1366exit (1);
1367#endif
1368
1369/* process control */
1370#if !defined (WNOHANG) || !defined (WUNTRACED)
1371exit(1);
1372#endif
1373
1374/* Posix systems have tcgetpgrp and waitpid. */
1375#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
1376exit(1);
1377#endif
1378
1379#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
1380exit(1);
1381#endif
1382
1383/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
1384#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
1385exit(1);
1386#endif
1387
1388exit(0);
1389}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
1390 [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing)
1391 bash_cv_job_control_missing=missing]
1392)])
1393AC_MSG_RESULT($bash_cv_job_control_missing)
1394if test $bash_cv_job_control_missing = missing; then
1395AC_DEFINE(JOB_CONTROL_MISSING)
1396fi
1397])
1398
1399dnl check whether named pipes are present
1400dnl this requires a previous check for mkfifo, but that is awkward to specify
1401AC_DEFUN([BASH_SYS_NAMED_PIPES],
1402[AC_MSG_CHECKING(for presence of named pipes)
1403AC_CACHE_VAL(bash_cv_sys_named_pipes,
1404[AC_TRY_RUN([
1405#include <sys/types.h>
1406#include <sys/stat.h>
1407#ifdef HAVE_UNISTD_H
1408#include <unistd.h>
1409#endif
1410
1411/* Add more tests in here as appropriate. */
1412main()
1413{
1414int fd, err;
1415
1416#if defined (HAVE_MKFIFO)
1417exit (0);
1418#endif
1419
1420#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
1421exit (1);
1422#endif
1423
1424#if defined (NeXT)
1425exit (1);
1426#endif
1427err = mkdir("/tmp/bash-aclocal", 0700);
1428if (err < 0) {
1429 perror ("mkdir");
1430 exit(1);
1431}
1432fd = mknod ("/tmp/bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
1433if (fd == -1) {
1434 rmdir ("/tmp/bash-aclocal");
1435 exit (1);
1436}
1437close(fd);
1438unlink ("/tmp/bash-aclocal/sh-np-autoconf");
1439rmdir ("/tmp/bash-aclocal");
1440exit(0);
1441}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
1442 [AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing)
1443 bash_cv_sys_named_pipes=missing]
1444)])
1445AC_MSG_RESULT($bash_cv_sys_named_pipes)
1446if test $bash_cv_sys_named_pipes = missing; then
1447AC_DEFINE(NAMED_PIPES_MISSING)
1448fi
1449])
1450
1451AC_DEFUN([BASH_SYS_DEFAULT_MAIL_DIR],
1452[AC_MSG_CHECKING(for default mail directory)
1453AC_CACHE_VAL(bash_cv_mail_dir,
1454[if test -d /var/mail; then
1455 bash_cv_mail_dir=/var/mail
1456 elif test -d /var/spool/mail; then
1457 bash_cv_mail_dir=/var/spool/mail
1458 elif test -d /usr/mail; then
1459 bash_cv_mail_dir=/usr/mail
1460 elif test -d /usr/spool/mail; then
1461 bash_cv_mail_dir=/usr/spool/mail
1462 else
1463 bash_cv_mail_dir=unknown
1464 fi
1465])
1466AC_MSG_RESULT($bash_cv_mail_dir)
1467AC_DEFINE_UNQUOTED(DEFAULT_MAIL_DIRECTORY, "$bash_cv_mail_dir")
1468])
1469
1470AC_DEFUN([BASH_HAVE_TIOCGWINSZ],
1471[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
1472AC_CACHE_VAL(bash_cv_tiocgwinsz_in_ioctl,
1473[AC_TRY_COMPILE([#include <sys/types.h>
1474#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
1475 bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)])
1476AC_MSG_RESULT($bash_cv_tiocgwinsz_in_ioctl)
1477if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
1478AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
1479fi
1480])
1481
1482AH_TEMPLATE([TIOCSTAT_IN_SYS_IOCTL], [Define if TIOCSTAT is in sys/ioctl.h])
1483AC_DEFUN([BASH_HAVE_TIOCSTAT],
1484[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
1485AC_CACHE_VAL(bash_cv_tiocstat_in_ioctl,
1486[AC_TRY_COMPILE([#include <sys/types.h>
1487#include <sys/ioctl.h>], [int x = TIOCSTAT;],
1488 bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)])
1489AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl)
1490if test $bash_cv_tiocstat_in_ioctl = yes; then
1491AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL)
1492fi
1493])
1494
1495AH_TEMPLATE([FIONREAD_IN_SYS_IOCTL], [Define if FIONREAD is in sys/ioctl.h])
1496AC_DEFUN([BASH_HAVE_FIONREAD],
1497[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
1498AC_CACHE_VAL(bash_cv_fionread_in_ioctl,
1499[AC_TRY_COMPILE([#include <sys/types.h>
1500#include <sys/ioctl.h>], [int x = FIONREAD;],
1501 bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)])
1502AC_MSG_RESULT($bash_cv_fionread_in_ioctl)
1503if test $bash_cv_fionread_in_ioctl = yes; then
1504AC_DEFINE(FIONREAD_IN_SYS_IOCTL)
1505fi
1506])
1507
1508dnl
1509dnl See if speed_t is declared in <sys/types.h>. Some versions of linux
1510dnl require a definition of speed_t each time <termcap.h> is included,
1511dnl but you can only get speed_t if you include <termios.h> (on some
1512dnl versions) or <sys/types.h> (on others).
1513dnl
1514AH_TEMPLATE([SPEED_T_IN_SYS_TYPES], [Define if speed_t is in sys/types.h])
1515AC_DEFUN([BASH_CHECK_SPEED_T],
1516[AC_MSG_CHECKING(for speed_t in sys/types.h)
1517AC_CACHE_VAL(bash_cv_speed_t_in_sys_types,
1518[AC_TRY_COMPILE([#include <sys/types.h>], [speed_t x;],
1519 bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)])
1520AC_MSG_RESULT($bash_cv_speed_t_in_sys_types)
1521if test $bash_cv_speed_t_in_sys_types = yes; then
1522AC_DEFINE(SPEED_T_IN_SYS_TYPES)
1523fi
1524])
1525
1526AH_TEMPLATE([HAVE_GETPW_DECLS], [Define if getpw functions are declared in pwd.h])
1527AC_DEFUN([BASH_CHECK_GETPW_FUNCS],
1528[AC_MSG_CHECKING(whether getpw functions are declared in pwd.h)
1529AC_CACHE_VAL(bash_cv_getpw_declared,
1530[AC_EGREP_CPP(getpwuid,
1531[
1532#include <sys/types.h>
1533#ifdef HAVE_UNISTD_H
1534# include <unistd.h>
1535#endif
1536#include <pwd.h>
1537],
1538bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)])
1539AC_MSG_RESULT($bash_cv_getpw_declared)
1540if test $bash_cv_getpw_declared = yes; then
1541AC_DEFINE(HAVE_GETPW_DECLS)
1542fi
1543])
1544
1545AC_DEFUN([BASH_CHECK_DEV_FD],
1546[AC_MSG_CHECKING(whether /dev/fd is available)
1547AC_CACHE_VAL(bash_cv_dev_fd,
1548[if test -d /dev/fd && test -r /dev/fd/0; then
1549 bash_cv_dev_fd=standard
1550 elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
1551 bash_cv_dev_fd=whacky
1552 else
1553 bash_cv_dev_fd=absent
1554 fi
1555])
1556AC_MSG_RESULT($bash_cv_dev_fd)
1557if test $bash_cv_dev_fd = "standard"; then
1558 AC_DEFINE(HAVE_DEV_FD)
1559 AC_DEFINE(DEV_FD_PREFIX, "/dev/fd/")
1560elif test $bash_cv_dev_fd = "whacky"; then
1561 AC_DEFINE(HAVE_DEV_FD)
1562 AC_DEFINE(DEV_FD_PREFIX, "/proc/self/fd/")
1563fi
1564])
1565
1566AC_DEFUN([BASH_CHECK_DEV_STDIN],
1567[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
1568AC_CACHE_VAL(bash_cv_dev_stdin,
1569[if test -d /dev/fd && test -r /dev/stdin; then
1570 bash_cv_dev_stdin=present
1571 elif test -d /proc/self/fd && test -r /dev/stdin; then
1572 bash_cv_dev_stdin=present
1573 else
1574 bash_cv_dev_stdin=absent
1575 fi
1576])
1577AC_MSG_RESULT($bash_cv_dev_stdin)
1578if test $bash_cv_dev_stdin = "present"; then
1579 AC_DEFINE(HAVE_DEV_STDIN)
1580fi
1581])
1582
1583dnl
1584dnl Check if HPUX needs _KERNEL defined for RLIMIT_* definitions
1585dnl
1586AC_DEFUN([BASH_CHECK_KERNEL_RLIMIT],
1587[AC_MSG_CHECKING([whether $host_os needs _KERNEL for RLIMIT defines])
1588AC_CACHE_VAL(bash_cv_kernel_rlimit,
1589[AC_TRY_COMPILE([
1590#include <sys/types.h>
1591#include <sys/resource.h>
1592],
1593[
1594 int f;
1595 f = RLIMIT_DATA;
1596], bash_cv_kernel_rlimit=no,
1597[AC_TRY_COMPILE([
1598#include <sys/types.h>
1599#define _KERNEL
1600#include <sys/resource.h>
1601#undef _KERNEL
1602],
1603[
1604 int f;
1605 f = RLIMIT_DATA;
1606], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)]
1607)])
1608AC_MSG_RESULT($bash_cv_kernel_rlimit)
1609if test $bash_cv_kernel_rlimit = yes; then
1610AC_DEFINE(RLIMIT_NEEDS_KERNEL)
1611fi
1612])
1613
1614dnl
1615dnl Check for 64-bit off_t -- used for malloc alignment
1616dnl
1617dnl C does not allow duplicate case labels, so the compile will fail if
1618dnl sizeof(off_t) is > 4.
1619dnl
1620AC_DEFUN([BASH_CHECK_OFF_T_64],
1621[AC_CACHE_CHECK(for 64-bit off_t, bash_cv_off_t_64,
1622AC_TRY_COMPILE([
1623#ifdef HAVE_UNISTD_H
1624#include <unistd.h>
1625#endif
1626#include <sys/types.h>
1627],[
1628switch (0) case 0: case (sizeof (off_t) <= 4):;
1629], bash_cv_off_t_64=no, bash_cv_off_t_64=yes))
1630if test $bash_cv_off_t_64 = yes; then
1631 AC_DEFINE(HAVE_OFF_T_64)
1632fi])
1633
1634AC_DEFUN([BASH_CHECK_RTSIGS],
1635[AC_MSG_CHECKING(for unusable real-time signals due to large values)
1636AC_CACHE_VAL(bash_cv_unusable_rtsigs,
1637[AC_TRY_RUN([
1638#include <sys/types.h>
1639#include <signal.h>
1640
1641#ifndef NSIG
1642# define NSIG 64
1643#endif
1644
1645main ()
1646{
1647 int n_sigs = 2 * NSIG;
1648#ifdef SIGRTMIN
1649 int rtmin = SIGRTMIN;
1650#else
1651 int rtmin = 0;
1652#endif
1653
1654 exit(rtmin < n_sigs);
1655}], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no,
1656 [AC_MSG_WARN(cannot check real-time signals if cross compiling -- defaulting to yes)
1657 bash_cv_unusable_rtsigs=yes]
1658)])
1659AC_MSG_RESULT($bash_cv_unusable_rtsigs)
1660if test $bash_cv_unusable_rtsigs = yes; then
1661AC_DEFINE(UNUSABLE_RT_SIGNALS)
1662fi
1663])
1664
1665dnl
1666dnl check for availability of multibyte characters and functions
1667dnl
1668AH_TEMPLATE([HAVE_MBSRTOWCS], [Define if we have the mbsrtowcs function])
1669AH_TEMPLATE([HAVE_WCWIDTH], [Define if we have the wcwidth function])
1670AH_TEMPLATE([HAVE_MBSTATE_T], [Define if we have mbstate_t])
1671AH_TEMPLATE([HAVE_LANGINFO_CODESET], [Define if we have nl_langinfo and CODESET])
1672AC_DEFUN([BASH_CHECK_MULTIBYTE],
1673[
1674AC_CHECK_HEADERS(wctype.h)
1675AC_CHECK_HEADERS(wchar.h)
1676AC_CHECK_HEADERS(langinfo.h)
1677
1678AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
1679AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
1680
1681AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
1682[AC_TRY_RUN([
1683#include <wchar.h>
1684int
1685main ()
1686{
1687 mbstate_t ps;
1688 return 0;
1689}], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)])
1690if test $bash_cv_have_mbstate_t = yes; then
1691 AC_DEFINE(HAVE_MBSTATE_T)
1692fi
1693
1694AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset,
1695[AC_TRY_LINK(
1696[#include <langinfo.h>],
1697[char* cs = nl_langinfo(CODESET);],
1698bash_cv_langinfo_codeset=yes, bash_cv_langinfo_codeset=no)])
1699if test $bash_cv_langinfo_codeset = yes; then
1700 AC_DEFINE(HAVE_LANGINFO_CODESET)
1701fi
1702
1703])
1704
1705dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
1706dnl require:
1707dnl AC_PROG_CC
1708dnl BASH_CHECK_LIB_TERMCAP
1709
1710AC_DEFUN([RL_LIB_READLINE_VERSION],
1711[
1712AC_REQUIRE([BASH_CHECK_LIB_TERMCAP])
1713
1714AC_MSG_CHECKING([version of installed readline library])
1715
1716# What a pain in the ass this is.
1717
1718# save cpp and ld options
1719_save_CFLAGS="$CFLAGS"
1720_save_LDFLAGS="$LDFLAGS"
1721_save_LIBS="$LIBS"
1722
1723# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
1724# allows the caller to do something like $_rl_prefix=$withval if the user
1725# specifies --with-installed-readline=PREFIX as an argument to configure
1726
1727if test -z "$ac_cv_rl_prefix"; then
1728test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
1729fi
1730
1731eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
1732eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
1733
1734LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
1735CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
1736LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
1737
1738AC_TRY_RUN([
1739#include <stdio.h>
1740#include <readline/readline.h>
1741
1742main()
1743{
1744 FILE *fp;
1745 fp = fopen("conftest.rlv", "w");
1746 if (fp == 0) exit(1);
1747 fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
1748 fclose(fp);
1749 exit(0);
1750}
1751],
1752ac_cv_rl_version=`cat conftest.rlv`,
1753ac_cv_rl_version='0.0',
1754ac_cv_rl_version='4.2')
1755
1756CFLAGS="$_save_CFLAGS"
1757LDFLAGS="$_save_LDFLAGS"
1758LIBS="$_save_LIBS"
1759
1760RL_MAJOR=0
1761RL_MINOR=0
1762
1763# (
1764case "$ac_cv_rl_version" in
17652*|3*|4*|5*|6*|7*|8*|9*)
1766 RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
1767 RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[[a-zA-Z]]*$::'`
1768 ;;
1769esac
1770
1771# (((
1772case $RL_MAJOR in
1773[[0-9][0-9]]) _RL_MAJOR=$RL_MAJOR ;;
1774[[0-9]]) _RL_MAJOR=0$RL_MAJOR ;;
1775*) _RL_MAJOR=00 ;;
1776esac
1777
1778# (((
1779case $RL_MINOR in
1780[[0-9][0-9]]) _RL_MINOR=$RL_MINOR ;;
1781[[0-9]]) _RL_MINOR=0$RL_MINOR ;;
1782*) _RL_MINOR=00 ;;
1783esac
1784
1785RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
1786
1787# Readline versions greater than 4.2 have these defines in readline.h
1788
1789if test $ac_cv_rl_version = '0.0' ; then
1790 AC_MSG_WARN([Could not test version of installed readline library.])
1791elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
1792 # set these for use by the caller
1793 RL_PREFIX=$ac_cv_rl_prefix
1794 RL_LIBDIR=$ac_cv_rl_libdir
1795 RL_INCLUDEDIR=$ac_cv_rl_includedir
1796 AC_MSG_RESULT($ac_cv_rl_version)
1797else
1798
1799AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library])
1800AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library])
1801AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library])
1802
1803AC_SUBST(RL_VERSION)
1804AC_SUBST(RL_MAJOR)
1805AC_SUBST(RL_MINOR)
1806
1807# set these for use by the caller
1808RL_PREFIX=$ac_cv_rl_prefix
1809RL_LIBDIR=$ac_cv_rl_libdir
1810RL_INCLUDEDIR=$ac_cv_rl_includedir
1811
1812AC_MSG_RESULT($ac_cv_rl_version)
1813
1814fi
1815])
diff --git a/meta/packages/readline/files/configure-fix.patch b/meta/packages/readline/files/configure-fix.patch
deleted file mode 100644
index 4100fe42a7..0000000000
--- a/meta/packages/readline/files/configure-fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1Without this it fails to link against libtermcap causing various missing symbols
2issues.
3
4RP - 8/10/08
5
6Index: readline-5.2/configure.in
7===================================================================
8--- readline-5.2.orig/configure.in 2008-10-08 09:58:52.000000000 +0100
9+++ readline-5.2/configure.in 2008-10-08 09:59:03.000000000 +0100
10@@ -211,10 +211,10 @@
11 AC_MSG_CHECKING(configuration for building shared libraries)
12 eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
13
14-# case "$SHLIB_LIBS" in
15-# *curses*|*termcap*|*termlib*) ;;
16-# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
17-# esac
18+ case "$SHLIB_LIBS" in
19+ *curses*|*termcap*|*termlib*) ;;
20+ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
21+ esac
22
23 AC_SUBST(SHOBJ_CC)
24 AC_SUBST(SHOBJ_CFLAGS)
diff --git a/meta/packages/readline/readline.inc b/meta/packages/readline/readline.inc
deleted file mode 100644
index 35bc7ed946..0000000000
--- a/meta/packages/readline/readline.inc
+++ /dev/null
@@ -1,34 +0,0 @@
1DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \
2command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \
3additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \
4lines, and perform csh-like history expansion on previous commands."
5SECTION = "libs"
6PRIORITY = "optional"
7
8# GPLv2+ (< 6.0), GPLv3+ (>= 6.0)
9LICENSE = "GPLv3+"
10LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
11
12DEPENDS += "ncurses"
13
14SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz \
15 file://configure-fix.patch \
16 file://acinclude.m4"
17
18S = "${WORKDIR}/${BPN}-${PV}"
19
20inherit autotools
21
22LEAD_SONAME = "libreadline.so"
23
24do_configure_prepend () {
25 install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
26}
27
28do_install_append () {
29 # Make install doesn't properly install these
30 oe_libinstall -so -C shlib libhistory ${D}${libdir}
31 oe_libinstall -so -C shlib libreadline ${D}${libdir}
32}
33
34BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/packages/readline/readline_5.2.bb b/meta/packages/readline/readline_5.2.bb
deleted file mode 100644
index a62345c45e..0000000000
--- a/meta/packages/readline/readline_5.2.bb
+++ /dev/null
@@ -1,35 +0,0 @@
1DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \
2command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \
3additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \
4lines, and perform csh-like history expansion on previous commands."
5SECTION = "libs"
6
7LICENSE = "GPLv2+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=03b36fdd84f74b8d8189a202b980b67f"
9
10DEPENDS += "ncurses"
11PRIORITY = "optional"
12
13PR = "r6"
14
15SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz \
16 file://configure-fix.patch \
17 file://acinclude.m4"
18
19S = "${WORKDIR}/${BPN}-${PV}"
20
21inherit autotools
22
23LEAD_SONAME = "libreadline.so"
24
25do_configure_prepend () {
26 install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
27}
28
29do_install_append () {
30 # Make install doesn't properly install these
31 oe_libinstall -so -C shlib libhistory ${D}${libdir}
32 oe_libinstall -so -C shlib libreadline ${D}${libdir}
33}
34
35BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/packages/readline/readline_6.1.bb b/meta/packages/readline/readline_6.1.bb
deleted file mode 100644
index c32755669c..0000000000
--- a/meta/packages/readline/readline_6.1.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require readline.inc
2
3PR = "r0"
diff --git a/meta/packages/resolvconf/resolvconf_1.43.bb b/meta/packages/resolvconf/resolvconf_1.43.bb
deleted file mode 100644
index f751f17e0e..0000000000
--- a/meta/packages/resolvconf/resolvconf_1.43.bb
+++ /dev/null
@@ -1,30 +0,0 @@
1DESCRIPTION = "Resolvconf is a framework for keeping track of the system's \
2information about currently available nameservers. It sets \
3itself up as the intermediary between programs that supply \
4nameserver information and programs that need nameserver \
5information."
6SECTION = "console/network"
7LICENSE = "GPL"
8AUTHOR = "Thomas Hood"
9HOMEPAGE = "http://packages.debian.org/resolvconf"
10DEPENDS = "bash"
11RDEPENDS = "bash"
12PR = "r1"
13
14SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.gz"
15
16do_compile () {
17 :
18}
19
20do_install () {
21 install -d ${D}${sysconfdir} ${D}${sbindir} ${D}${base_sbindir} ${D}${localstatedir}/volatile/run/resolvconf/interface
22 install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
23 cp -pPR etc/* ${D}${sysconfdir}/
24 install -m 0755 bin/resolvconf ${D}${base_sbindir}/
25 install -m 0644 README ${D}${docdir}/${P}/
26 install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
27}
28
29PACKAGE_ARCH = "all"
30
diff --git a/meta/packages/rsync/rsync-2.6.9/rsyncd.conf b/meta/packages/rsync/rsync-2.6.9/rsyncd.conf
deleted file mode 100644
index 845f5b33f5..0000000000
--- a/meta/packages/rsync/rsync-2.6.9/rsyncd.conf
+++ /dev/null
@@ -1,15 +0,0 @@
1# /etc/rsyncd.conf
2
3# Minimal configuration file for rsync daemon
4# See rsync(1) and rsyncd.conf(5) man pages for help
5
6# This file is required by rsync --daemon
7pid file = /var/run/rsyncd.pid
8use chroot = yes
9read only = yes
10
11# Simple example for enabling your own local rsync server
12#[everything]
13# path = /
14# comment = Everything except /etc exposed
15# exclude = /etc
diff --git a/meta/packages/rxvt-unicode/files/makefile.patch b/meta/packages/rxvt-unicode/files/makefile.patch
deleted file mode 100644
index 86f82eeb4c..0000000000
--- a/meta/packages/rxvt-unicode/files/makefile.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1--- ../rxvt-unicode-cvs-r0/rxvt-unicode/Makefile.in 2004-08-12 22:32:40 +01:00
2+++ rxvt-unicode/Makefile.in 2004-12-24 03:09:00 +00:00
3@@ -9,7 +9,7 @@
4 first_rule: all
5 dummy:
6
7-subdirs = src doc src/test
8+subdirs = src src/test
9 allsubdirs = W11 $(subdirs)
10
11 DIST = INSTALL README.configure configure Makefile Makefile.in ChangeLog
12@@ -24,7 +24,7 @@
13
14 #-------------------------------------------------------------------------
15
16-all allbin alldoc tags:
17+all allbin tags:
18 @if test x@host_os@ = xcygwin; then (cd W11; ${MAKE} $@) || exit 1; fi
19 @for I in ${subdirs}; do (cd $$I; ${MAKE} $@) || exit 1; done
20
diff --git a/meta/packages/rxvt-unicode/files/rxvt.desktop b/meta/packages/rxvt-unicode/files/rxvt.desktop
deleted file mode 100644
index a419c98a13..0000000000
--- a/meta/packages/rxvt-unicode/files/rxvt.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
1[Desktop Entry]
2Encoding=UTF-8
3Name=Terminal
4Comment=When all else fails.
5Exec=/usr/bin/rxvt
6Icon=utilities-terminal.png
7Terminal=false
8Type=Application
9Categories=Utility
10StartupNotify=false
11
diff --git a/meta/packages/rxvt-unicode/files/rxvt.png b/meta/packages/rxvt-unicode/files/rxvt.png
deleted file mode 100644
index e56fa2e9cd..0000000000
--- a/meta/packages/rxvt-unicode/files/rxvt.png
+++ /dev/null
Binary files differ
diff --git a/meta/packages/rxvt-unicode/files/signedchar.patch b/meta/packages/rxvt-unicode/files/signedchar.patch
deleted file mode 100644
index 6faa175143..0000000000
--- a/meta/packages/rxvt-unicode/files/signedchar.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- ../rxvt-unicode-cvs-r0/rxvt-unicode/src/command.C 2004-12-21 06:43:00 +00:00
2+++ rxvt-unicode/src/command.C 2004-12-24 02:31:36 +00:00
3@@ -1862,7 +1862,7 @@
4 #endif /* NO_SCROLLBAR_REPORT */
5
6 {
7- char upordown = 0;
8+ signed char upordown = 0;
9
10 if (scrollBar.style == R_SB_NEXT)
11 {
diff --git a/meta/packages/rxvt-unicode/files/xwc.patch b/meta/packages/rxvt-unicode/files/xwc.patch
deleted file mode 100644
index 7cf59656ce..0000000000
--- a/meta/packages/rxvt-unicode/files/xwc.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- rxvt-unicode-4.8/src/screen.C~xwc.c
7+++ rxvt-unicode-4.8/src/screen.C
8@@ -3058,7 +3058,7 @@
9 else
10 rxvt_warn ("can't get primary selection, ignoring.\n");
11
12-#if 0
13+#ifdef HAVE_XWC
14 XTextProperty ct;
15
16 if (XwcTextListToTextProperty (display->display, &selection.text, 1, XStringStyle, &ct) >= 0)
17@@ -3632,9 +3632,11 @@
18 }
19 else
20 #endif
21+#ifdef HAVE_XWC
22 if (XwcTextListToTextProperty (display->display, &cl, 1, (XICCEncodingStyle) style, &ct) >= 0)
23 freect = 1;
24 else
25+#endif
26 {
27 /* if we failed to convert then send it raw */
28 ct.value = (unsigned char *)cl;
diff --git a/meta/packages/rxvt-unicode/rxvt-unicode-5.6/xwc.patch b/meta/packages/rxvt-unicode/rxvt-unicode-5.6/xwc.patch
deleted file mode 100644
index eb87b84b25..0000000000
--- a/meta/packages/rxvt-unicode/rxvt-unicode-5.6/xwc.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1diff -urNd ../rxvt-unicode-5.3-r2/rxvt-unicode-5.3/src/screen.C rxvt-unicode-5.3/src/screen.C
2--- ../rxvt-unicode-5.3-r2/rxvt-unicode-5.3/src/screen.C 2005-02-22 21:39:10 +00:00
3+++ rxvt-unicode-5.3/src/screen.C 2005-04-05 22:12:45 +01:00
4@@ -3064,7 +3064,7 @@
5 else
6 rxvt_warn ("can't get primary selection, ignoring.\n");
7
8-#if 0
9+#ifdef HAVE_XWC
10 XTextProperty ct;
11
12 if (XwcTextListToTextProperty (display->display, &selection.text, 1, XStringStyle, &ct) >= 0)
13@@ -3648,9 +3648,11 @@
14 }
15 else
16 #endif
17+#ifdef HAVE_XWC
18 if (XwcTextListToTextProperty (disp, &cl, 1, (XICCEncodingStyle) style, &ct) >= 0)
19 freect = 1;
20 else
21+#endif
22 {
23 /* if we failed to convert then send it raw */
24 ct.value = (unsigned char *)cl;
diff --git a/meta/packages/rxvt-unicode/rxvt-unicode_5.6.bb b/meta/packages/rxvt-unicode/rxvt-unicode_5.6.bb
deleted file mode 100644
index d13089501f..0000000000
--- a/meta/packages/rxvt-unicode/rxvt-unicode_5.6.bb
+++ /dev/null
@@ -1,72 +0,0 @@
1SECTION = "x11/utils"
2DEPENDS = "virtual/libx11 libxt libxft"
3DESCRIPTION = "rxvt-unicode is a clone of the well known \
4terminal emulator rxvt, modified to store text in Unicode \
5(either UCS-2 or UCS-4) and to use locale-correct input and \
6output. It also supports mixing multiple fonts at the \
7same time, including Xft fonts."
8LICENSE = "GPL"
9SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \
10 file://xwc.patch;patch=1 \
11 file://signedchar.patch;patch=1 \
12 file://rxvt.desktop \
13 file://rxvt.png"
14PR = "r5"
15
16inherit autotools update-alternatives
17
18PROVIDES = "virtual/x-terminal-emulator"
19ALTERNATIVE_NAME = "x-terminal-emulator"
20ALTERNATIVE_PATH = "${bindir}/rxvt"
21
22CFLAGS_append = " -fpermissive"
23
24# This is necessary so that the "tic" command executed during the install can
25# link with the correct libary in staging.
26export LD_LIBRARY_PATH = "${STAGING_LIBDIR_NATIVE}"
27
28EXTRA_OECONF = "--enable-menubar --enable-xim \
29 --enable-utmp --enable-wtmp --enable-lastlog \
30 --disable-strings --with-term=rxvt --enable-keepscrolling \
31 --enable-xft --with-name=rxvt --enable-frills \
32 --enable-swapscreen --enable-transparency \
33 --with-codesets=eu \
34 --enable-cursor-blink --enable-pointer-blank \
35 --enable-text-blink --enable-rxvt-scroll \
36 --enable-combining --enable-shared \
37 --enable-xgetdefault \
38 --with-x=${STAGING_DIR_HOST}${prefix}"
39EXTRA_OEMAKE = "'XINC=-I${STAGING_INCDIR}' \
40 'XLIB=-L${STAGING_LIBDIR} -lX11'"
41
42do_configure () {
43 mv autoconf/configure.in . || true
44 rm autoconf/libtool.m4
45 libtoolize --force
46 autotools_do_configure
47 echo '#define RXVT_UTMP_FILE "${localstatedir}/run/utmp"' >> config.h
48 echo '#define RXVT_WTMP_FILE "${localstatedir}/log/wtmp"' >> config.h
49 echo '#define RXVT_LASTLOG_FILE "${localstatedir}/log/lastlog"' >> config.h
50 echo '#define HAVE_XLOCALE 1' >> config.h
51}
52
53do_compile () {
54 if test -e ${S}/${HOST_SYS}-libtool; then
55 LIBTOOL=${S}/${HOST_SYS}-libtool
56 else
57 LIBTOOL=${S}/libtool
58 fi
59 # docs need "yodl" and I have no idea what that is
60 oe_runmake -C src "LIBTOOL=$LIBTOOL"
61}
62
63do_install_append () {
64 install -d ${D}/${datadir}
65 install -d ${D}/${datadir}/applications
66 install -d ${D}/${datadir}/pixmaps/
67
68 install -m 0644 ${WORKDIR}/rxvt.png ${D}/${datadir}/pixmaps
69 install -m 0644 ${WORKDIR}/rxvt.desktop ${D}/${datadir}/applications
70}
71
72FILES_${PN} += "${datadir}/applications/rxvt.desktop ${datadir}/pixmaps/rxvt.png"
diff --git a/meta/packages/sed/sed-4.1.2/fix_return_type.patch b/meta/packages/sed/sed-4.1.2/fix_return_type.patch
deleted file mode 100644
index d91960b3ee..0000000000
--- a/meta/packages/sed/sed-4.1.2/fix_return_type.patch
+++ /dev/null
@@ -1,16 +0,0 @@
1Change the getline return type to match its declaration.
2
3Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
4
5diff -urN sed-4.1.2-orig/lib/getline.c sed-4.1.2/lib/getline.c
6--- sed-4.1.2-orig/lib/getline.c 2010-08-31 08:47:50.070094024 +0800
7+++ sed-4.1.2/lib/getline.c 2010-08-31 08:48:50.982178172 +0800
8@@ -30,7 +30,7 @@
9 necessary. Returns the number of characters read (not including the
10 null terminator), or -1 on error or EOF. */
11
12-size_t
13+ssize_t
14 getline (lineptr, n, stream)
15 char **lineptr;
16 size_t *n;
diff --git a/meta/packages/sed/sed_4.1.2.bb b/meta/packages/sed/sed_4.1.2.bb
deleted file mode 100644
index 09bd3e18cc..0000000000
--- a/meta/packages/sed/sed_4.1.2.bb
+++ /dev/null
@@ -1,32 +0,0 @@
1DESCRIPTION = "sed is a Stream EDitor."
2HOMEPAGE = "http://www.gnu.org/software/sed/"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
5 file://sed/sed.h;beginline=1;endline=17;md5=e00ffd1837f298439a214fd197f6a407"
6SECTION = "console/utils"
7PR = "r3"
8
9DEPENDS = "gettext"
10
11SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
12 file://fix_return_type.patch"
13
14inherit autotools
15
16do_install () {
17 autotools_do_install
18 install -d ${D}${base_bindir}
19 mv ${D}${bindir}/sed ${D}${base_bindir}/sed.${PN}
20}
21
22
23pkg_postinst_${PN} () {
24 update-alternatives --install ${base_bindir}/sed sed sed.${PN} 100
25}
26
27
28pkg_prerm_${PN} () {
29 update-alternatives --remove sed sed.${PN}
30}
31
32BBCLASSEXTEND = "native"
diff --git a/meta/packages/setserial/setserial_2.17.bb b/meta/packages/setserial/setserial_2.17.bb
deleted file mode 100644
index 4e0d1b66e4..0000000000
--- a/meta/packages/setserial/setserial_2.17.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1DESCRIPTION = "setserial is a program designed to set and/or report the configuration information associated with a serial port"
2HOMEPAGE = "http://setserial.sourceforge.net"
3AUTHOR = "Theodore Ts'o <tytso@mit.edu>"
4SECTION = "console/utils"
5LICENSE = "GPL"
6PR = "r2"
7
8inherit autotools
9
10SRC_URI = "${SOURCEFORGE_MIRROR}/setserial/${PN}-${PV}.tar.gz"
11
12do_install() {
13 install -d ${D}${bindir}
14 install -d ${D}${mandir}/man8
15
16 install -m 0755 ${S}/setserial ${D}${bindir}
17 install -m 0644 ${S}/setserial.8 ${D}${mandir}/man8
18}
diff --git a/meta/packages/shared-mime-info/shared-mime-info.inc b/meta/packages/shared-mime-info/shared-mime-info.inc
deleted file mode 100644
index c2e5487019..0000000000
--- a/meta/packages/shared-mime-info/shared-mime-info.inc
+++ /dev/null
@@ -1,28 +0,0 @@
1DESCRIPTION = "shared MIME database and spec"
2HOMEPAGE = "http://freedesktop.org/wiki/Software/shared-mime-info"
3SECTION = "base"
4
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
7
8DEPENDS = "libxml2 intltool-native glib-2.0 shared-mime-info-native"
9DEPENDS_virtclass-native = "libxml2-native intltool-native glib-2.0-native"
10PR = "r0"
11
12SRC_URI = "http://freedesktop.org/~hadess/shared-mime-info-${PV}.tar.bz2"
13
14inherit autotools pkgconfig gettext
15
16EXTRA_OECONF = "--disable-update-mimedb"
17
18FILES_${PN} += "${datadir}/mime"
19FILES_${PN}-dev += "${datadir}/pkgconfig/shared-mime-info.pc"
20
21do_install_append() {
22 update-mime-database ${D}${datadir}/mime
23
24 # we do not need it on device and it is huge
25 rm ${D}${datadir}/mime/packages/freedesktop.org.xml
26}
27
28BBCLASSEXTEND = "native"
diff --git a/meta/packages/shared-mime-info/shared-mime-info_0.71.bb b/meta/packages/shared-mime-info/shared-mime-info_0.71.bb
deleted file mode 100644
index fc64c2b0e0..0000000000
--- a/meta/packages/shared-mime-info/shared-mime-info_0.71.bb
+++ /dev/null
@@ -1 +0,0 @@
1require shared-mime-info.inc
diff --git a/meta/packages/smart/smart_1.1.bb b/meta/packages/smart/smart_1.1.bb
deleted file mode 100644
index 8f89eb3e00..0000000000
--- a/meta/packages/smart/smart_1.1.bb
+++ /dev/null
@@ -1,29 +0,0 @@
1DESCRIPTION = "Next generation package handling tool."
2HOMEPAGE = "http://labix.org/smart/"
3LICENSE = "GPL v2+"
4DEPENDS = "zlib python desktop-file-utils-native python-pygtk rpm"
5
6SRC_URI = "http://labix.org/download/smart/smart-1.1.tar.bz2"
7
8S = "${WORKDIR}/smart-${PV}"
9
10inherit distutils
11
12FILES_${PN} += "/usr/share/lib/${PYTHON_DIR}/site-packages/smart/interfaces/images/*.png \
13 /usr/share/lib/${PYTHON_DIR/site-packages/smart/backends/"
14
15FILES_${PN}-doc += "/usr/share/share/man/man8/smart.8"
16
17FILES_${PN}-locale += "/usr/share/share/locale/es_ES/LC_MESSAGES/smart.mo \
18 /usr/share/share/locale/it/LC_MESSAGES/smart.mo \
19 /usr/share/share/locale/de/LC_MESSAGES/smart.mo \
20 /usr/share/share/locale/ru/LC_MESSAGES/smart.mo \
21 /usr/share/share/locale/sv/LC_MESSAGES/smart.mo \
22 /usr/share/share/locale/fr/LC_MESSAGES/smart.mo \
23 /usr/share/share/locale/hu/LC_MESSAGES/smart.mo \
24 /usr/share/share/locale/zh_TW/LC_MESSAGES/smart.mo \
25 /usr/share/share/locale/pt_BR/LC_MESSAGES/smart.mo \
26 /usr/share/share/locale/zh_CN/LC_MESSAGES/smart.mo"
27
28FILES_${PN}-dbg += "/usr/lib/${PYTHON_DIR}/site-packages/smart/backends/rpm/.debug \
29 /usr/lib/${PYTHON_DIR}/site-packages/smart/backends/deb/.debug \" \ No newline at end of file
diff --git a/meta/packages/speex/speex_1.2rc1.bb b/meta/packages/speex/speex_1.2rc1.bb
deleted file mode 100644
index 6f1b133f24..0000000000
--- a/meta/packages/speex/speex_1.2rc1.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compression format designed for speech."
2HOMEPAGE = "http://www.speex.org"
3SECTION = "libs"
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8 \
6 file://include/speex/speex.h;beginline=1;endline=34;md5=a68129f78d7fe66e07163f73aba143b3"
7DEPENDS = "libogg"
8
9PR = "r0"
10
11SRC_URI = "http://downloads.us.xiph.org/releases/speex/speex-1.2rc1.tar.gz"
12
13PARALLEL_MAKE = ""
14
15inherit autotools pkgconfig
16
17EXTRA_OECONF = " --enable-fixed-point --with-ogg-libraries=${STAGING_LIBDIR} \
18 --disable-float-api --disable-vbr \
19 --with-ogg-includes=${STAGING_INCDIR} --disable-oggtest"
20
21PACKAGES += "${PN}-bin"
22FILES_${PN} = "${libdir}/lib*.so.*"
23FILES_${PN}-dev += "${libdir}/lib*.so.*"
24FILES_${PN}-bin = "${bindir}"
diff --git a/meta/packages/sqlite/sqlite3.inc b/meta/packages/sqlite/sqlite3.inc
deleted file mode 100644
index 709e3016b8..0000000000
--- a/meta/packages/sqlite/sqlite3.inc
+++ /dev/null
@@ -1,33 +0,0 @@
1DESCRIPTION = "An Embeddable SQL Database Engine"
2HOMEPAGE = "http://www.sqlite.org"
3SECTION = "libs"
4PRIORITY = "optional"
5DEPENDS = "readline ncurses tcl-native"
6LICENSE = "PD"
7
8SRC_URI = "http://www.sqlite.org/sqlite-${PV}.tar.gz \
9 file://libtool.patch"
10
11S = "${WORKDIR}/sqlite-${PV}"
12
13inherit autotools pkgconfig
14
15EXTRA_OECONF = "--disable-tcl --enable-shared \
16 --enable-threadsafe"
17export config_BUILD_CC = "${BUILD_CC}"
18export config_BUILD_CFLAGS = "${BUILD_CFLAGS}"
19export config_BUILD_LIBS = "${BUILD_LDFLAGS}"
20export config_TARGET_CC = "${CC}"
21export config_TARGET_LINK = "${CCLD}"
22export config_TARGET_CFLAGS = "${CFLAGS}"
23export config_TARGET_LFLAGS = "${LDFLAGS}"
24
25PACKAGES = "lib${PN} lib${PN}-dev lib${PN}-doc ${PN} ${PN}-dbg"
26FILES_${PN} = "${bindir}/*"
27FILES_lib${PN} = "${libdir}/*.so.*"
28FILES_lib${PN}-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so \
29 ${libdir}/pkgconfig ${includedir}"
30FILES_lib${PN}-doc = "${docdir} ${mandir} ${infodir}"
31AUTO_LIBNAME_PKGS = "lib${PN}"
32
33BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/packages/sqlite/sqlite3/libtool.patch b/meta/packages/sqlite/sqlite3/libtool.patch
deleted file mode 100644
index ccf9993ed2..0000000000
--- a/meta/packages/sqlite/sqlite3/libtool.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1Index: sqlite-3.2.1/Makefile.in
2===================================================================
3--- sqlite-3.2.1.orig/Makefile.in 2005-03-23 17:09:39.000000000 +0100
4+++ sqlite-3.2.1/Makefile.in 2005-04-25 23:11:20.000000000 +0200
5@@ -15,7 +15,10 @@
6 # The toplevel directory of the source tree. This is the directory
7 # that contains this "Makefile.in" and the "configure.in" script.
8 #
9-TOP = @srcdir@
10+TOP = $(srcdir)
11+srcdir = @srcdir@
12+top_srcdir = @top_srcdir@
13+top_builddir = .
14
15 # C Compiler and options for use in building executables that
16 # will run on the platform that is doing the build.
17@@ -96,7 +99,7 @@
18 exec_prefix = @exec_prefix@
19 libdir = @libdir@
20 INSTALL = @INSTALL@
21-LIBTOOL = ./libtool
22+LIBTOOL = @LIBTOOL@
23 ALLOWRELEASE = @ALLOWRELEASE@
24
25 # libtool compile/link/install
diff --git a/meta/packages/sqlite/sqlite3_3.6.23.1.bb b/meta/packages/sqlite/sqlite3_3.6.23.1.bb
deleted file mode 100644
index 5075dd35b7..0000000000
--- a/meta/packages/sqlite/sqlite3_3.6.23.1.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require sqlite3.inc
2
3PR = "r1"
diff --git a/meta/packages/strace/strace_4.5.20.bb b/meta/packages/strace/strace_4.5.20.bb
deleted file mode 100644
index cc2ae1a964..0000000000
--- a/meta/packages/strace/strace_4.5.20.bb
+++ /dev/null
@@ -1,11 +0,0 @@
1DESCRIPTION = "strace is a system call tracing tool."
2HOMEPAGE = "http://sourceforge.net/projects/strace/"
3SECTION = "console/utils"
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=4535377ede62550fdeaf39f595fd550a"
6PR = "r0"
7
8SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2"
9inherit autotools
10
11export INCLUDES = "-I. -I./linux"
diff --git a/meta/packages/sudo/files/autofoo.patch b/meta/packages/sudo/files/autofoo.patch
deleted file mode 100644
index 4f24737610..0000000000
--- a/meta/packages/sudo/files/autofoo.patch
+++ /dev/null
@@ -1,143 +0,0 @@
1# fix underquotes, rebased to 1.7.2p7
2#
3# by Kevin Tian <kevin.tian@intel.com>, 06/23/2010
4Index: sudo-1.7.2p7/aclocal.m4
5===================================================================
6--- sudo-1.7.2p7.orig/aclocal.m4 2010-06-23 13:33:57.000000000 +0800
7+++ sudo-1.7.2p7/aclocal.m4 2010-06-23 13:36:41.000000000 +0800
8@@ -10,7 +10,7 @@
9 dnl
10 dnl check for sendmail
11 dnl
12-AC_DEFUN(SUDO_PROG_SENDMAIL, [AC_MSG_CHECKING(for sendmail)
13+AC_DEFUN([SUDO_PROG_SENDMAIL], [AC_MSG_CHECKING(for sendmail)
14 if test -f "/usr/sbin/sendmail"; then
15 AC_MSG_RESULT(/usr/sbin/sendmail)
16 SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/sbin/sendmail")
17@@ -37,7 +37,7 @@
18 dnl
19 dnl check for vi
20 dnl
21-AC_DEFUN(SUDO_PROG_VI, [AC_MSG_CHECKING(for vi)
22+AC_DEFUN([SUDO_PROG_VI], [AC_MSG_CHECKING(for vi)
23 if test -f "/usr/bin/vi"; then
24 AC_MSG_RESULT(/usr/bin/vi)
25 SUDO_DEFINE(_PATH_VI, "/usr/bin/vi")
26@@ -61,7 +61,7 @@
27 dnl
28 dnl check for mv
29 dnl
30-AC_DEFUN(SUDO_PROG_MV, [AC_MSG_CHECKING(for mv)
31+AC_DEFUN([SUDO_PROG_MV], [AC_MSG_CHECKING(for mv)
32 if test -f "/usr/bin/mv"; then
33 AC_MSG_RESULT(/usr/bin/mv)
34 SUDO_DEFINE(_PATH_MV, "/usr/bin/mv")
35@@ -82,7 +82,7 @@
36 dnl
37 dnl check for bourne shell
38 dnl
39-AC_DEFUN(SUDO_PROG_BSHELL, [AC_MSG_CHECKING(for bourne shell)
40+AC_DEFUN([SUDO_PROG_BSHELL], [AC_MSG_CHECKING(for bourne shell)
41 if test -f "/bin/sh"; then
42 AC_MSG_RESULT(/bin/sh)
43 SUDO_DEFINE(_PATH_BSHELL, "/bin/sh")
44@@ -115,7 +115,7 @@
45 dnl
46 dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
47 dnl
48-AC_DEFUN(SUDO_LOGFILE, [AC_MSG_CHECKING(for log file location)
49+AC_DEFUN([SUDO_LOGFILE], [AC_MSG_CHECKING(for log file location)
50 if test -n "$with_logpath"; then
51 AC_MSG_RESULT($with_logpath)
52 SUDO_DEFINE_UNQUOTED(_PATH_SUDO_LOGFILE, "$with_logpath")
53@@ -136,7 +136,7 @@
54 dnl
55 dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
56 dnl
57-AC_DEFUN(SUDO_TIMEDIR, [AC_MSG_CHECKING(for timestamp file location)
58+AC_DEFUN([SUDO_TIMEDIR], [AC_MSG_CHECKING(for timestamp file location)
59 if test -n "$with_timedir"; then
60 AC_MSG_RESULT($with_timedir)
61 SUDO_DEFINE_UNQUOTED(_PATH_SUDO_TIMEDIR, "$with_timedir")
62@@ -160,7 +160,7 @@
63 dnl SUDO_CHECK_TYPE(TYPE, DEFAULT)
64 dnl XXX - should require the check for unistd.h...
65 dnl
66-AC_DEFUN(SUDO_CHECK_TYPE,
67+AC_DEFUN([SUDO_CHECK_TYPE],
68 [AC_REQUIRE([AC_HEADER_STDC])dnl
69 AC_MSG_CHECKING(for $1)
70 AC_CACHE_VAL(sudo_cv_type_$1,
71@@ -181,31 +181,31 @@
72 dnl
73 dnl Check for size_t declation
74 dnl
75-AC_DEFUN(SUDO_TYPE_SIZE_T,
76+AC_DEFUN([SUDO_TYPE_SIZE_T],
77 [SUDO_CHECK_TYPE(size_t, int)])
78
79 dnl
80 dnl Check for ssize_t declation
81 dnl
82-AC_DEFUN(SUDO_TYPE_SSIZE_T,
83+AC_DEFUN([SUDO_TYPE_SSIZE_T],
84 [SUDO_CHECK_TYPE(ssize_t, int)])
85
86 dnl
87 dnl Check for dev_t declation
88 dnl
89-AC_DEFUN(SUDO_TYPE_DEV_T,
90+AC_DEFUN([SUDO_TYPE_DEV_T],
91 [SUDO_CHECK_TYPE(dev_t, int)])
92
93 dnl
94 dnl Check for ino_t declation
95 dnl
96-AC_DEFUN(SUDO_TYPE_INO_T,
97+AC_DEFUN([SUDO_TYPE_INO_T],
98 [SUDO_CHECK_TYPE(ino_t, unsigned int)])
99
100 dnl
101 dnl check for working fnmatch(3)
102 dnl
103-AC_DEFUN(SUDO_FUNC_FNMATCH,
104+AC_DEFUN([SUDO_FUNC_FNMATCH],
105 [AC_MSG_CHECKING([for working fnmatch with FNM_CASEFOLD])
106 AC_CACHE_VAL(sudo_cv_func_fnmatch,
107 [rm -f conftestdata; > conftestdata
108@@ -271,7 +271,7 @@
109 dnl
110 dnl check for sa_len field in struct sockaddr
111 dnl
112-AC_DEFUN(SUDO_SOCK_SA_LEN,
113+AC_DEFUN([SUDO_SOCK_SA_LEN],
114 [AC_MSG_CHECKING(for sa_len field in struct sockaddr)
115 AC_CACHE_VAL(sudo_cv_sock_sa_len,
116 [AC_TRY_RUN([#include <sys/types.h>
117@@ -294,7 +294,7 @@
118 dnl we can't really trust UID_MAX or MAXUID since they may exist
119 dnl only for backwards compatibility.
120 dnl
121-AC_DEFUN(SUDO_UID_T_LEN,
122+AC_DEFUN([SUDO_UID_T_LEN],
123 [AC_REQUIRE([AC_TYPE_UID_T])
124 AC_MSG_CHECKING(max length of uid_t)
125 AC_CACHE_VAL(sudo_cv_uid_t_len,
126@@ -327,7 +327,7 @@
127 dnl
128 dnl Check for presence of long long and for sizeof(long long) == sizeof(long)
129 dnl
130-AC_DEFUN(SUDO_TYPE_LONG_LONG,
131+AC_DEFUN([SUDO_TYPE_LONG_LONG],
132 [AC_CHECK_TYPES(long long, [AC_DEFINE(HAVE_LONG_LONG, 1, [Define if your compiler supports the "long long" type.])]
133 [AC_MSG_CHECKING(for long and long long equivalence)
134 AC_CACHE_VAL(sudo_cv_type_long_is_quad,
135@@ -347,7 +347,7 @@
136 dnl
137 dnl append a libpath to an LDFLAGS style variable
138 dnl
139-AC_DEFUN(SUDO_APPEND_LIBPATH, [
140+AC_DEFUN([SUDO_APPEND_LIBPATH], [
141 if test X"$with_rpath" = X"yes"; then
142 case "$host" in
143 *-*-hpux*) $1="${$1} -L$2 -Wl,+b,$2"
diff --git a/meta/packages/sudo/files/noexec-link.patch b/meta/packages/sudo/files/noexec-link.patch
deleted file mode 100644
index e0d35d0e25..0000000000
--- a/meta/packages/sudo/files/noexec-link.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1# libtool requires library's name to start with 'lib', or else error is reported. with "-module" option
2# that check is skipped
3#
4# comments added by Kevin Tian <kevin.tian@intel.com>, 06/23/2010
5Index: sudo-1.6.8p6/Makefile.in
6===================================================================
7--- sudo-1.6.8p6.orig/Makefile.in 2005-01-21 19:09:26.963276656 -0500
8+++ sudo-1.6.8p6/Makefile.in 2005-01-21 19:16:11.918714072 -0500
9@@ -187,7 +187,7 @@
10 $(CC) -o $@ $(TESTOBJS) $(LIBOBJS) $(LDFLAGS) $(LIBS) $(NET_LIBS)
11
12 sudo_noexec.la: sudo_noexec.lo
13- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ sudo_noexec.lo -avoid-version -rpath $(noexecdir)
14+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ sudo_noexec.lo -avoid-version -module -rpath $(noexecdir)
15
16 # Uncomment the following if you want "make distclean" to clean the parser
17 @DEV@PARSESRCS = sudo.tab.h sudo.tab.c lex.yy.c def_data.c def_data.h
diff --git a/meta/packages/sudo/files/nostrip.patch b/meta/packages/sudo/files/nostrip.patch
deleted file mode 100644
index 3c71b4fd86..0000000000
--- a/meta/packages/sudo/files/nostrip.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1# this could be pushed upstream to allowing conditional strip. Now it's not applied.
2# we use sed in recipe for same purpose. Keep here as reminder for upstream
3#
4# comment added by Kevin Tian <kevin.tian@intel.com>, 07/01/2010
5#
6# Patch managed by http://www.holgerschurig.de/patcher.html
7#
8
9Index: sudo-1.6.8p5/Makefile.in
10===================================================================
11--- sudo-1.6.8p5.orig/Makefile.in 2005-01-21 18:19:05.762568976 -0500
12+++ sudo-1.6.8p5/Makefile.in 2005-01-21 18:19:34.701169640 -0500
13@@ -307,8 +307,8 @@
14 $(DESTDIR)$(noexecdir)
15
16 install-binaries: $(PROGS)
17- $(INSTALL) $(install_owncmd) -m 4555 -s sudo $(DESTDIR)$(sudodir)/sudo
18- $(INSTALL) $(install_owncmd) -m 0555 -s visudo $(DESTDIR)$(visudodir)/visudo
19+ $(INSTALL) $(install_owncmd) -m 4555 sudo $(DESTDIR)$(sudodir)/sudo
20+ $(INSTALL) $(install_owncmd) -m 0555 visudo $(DESTDIR)$(visudodir)/visudo
21 rm -f $(DESTDIR)$(sudodir)/sudoedit
22 ln $(DESTDIR)$(sudodir)/sudo $(DESTDIR)$(sudodir)/sudoedit
23
diff --git a/meta/packages/sudo/site/bit-32 b/meta/packages/sudo/site/bit-32
deleted file mode 100644
index 9b7ca5c81b..0000000000
--- a/meta/packages/sudo/site/bit-32
+++ /dev/null
@@ -1,2 +0,0 @@
1# is sizeof(long long) == sizeof(long)
2sudo_cv_type_long_is_quad=${sudo_cv_type_long_is_quad=no}
diff --git a/meta/packages/sudo/site/bit-64 b/meta/packages/sudo/site/bit-64
deleted file mode 100644
index 05846ff0aa..0000000000
--- a/meta/packages/sudo/site/bit-64
+++ /dev/null
@@ -1,2 +0,0 @@
1# is sizeof(long long) == sizeof(long)
2sudo_cv_type_long_is_quad=${sudo_cv_type_long_is_quad=yes}
diff --git a/meta/packages/sudo/sudo.inc b/meta/packages/sudo/sudo.inc
deleted file mode 100644
index 2add94bef4..0000000000
--- a/meta/packages/sudo/sudo.inc
+++ /dev/null
@@ -1,36 +0,0 @@
1DESCRIPTION = "Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments."
2HOMEPAGE = "http://www.courtesan.com/sudo/"
3BUGTRACKER = "http://www.sudo.ws/bugs/"
4PRIORITY = "optional"
5SECTION = "admin"
6LICENSE = "ISC & UCB & MIT"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=a7dfe8895011d65d0c2e24aaf5ad0843 \
8 file://nonunix.h;startline=4;endline=28;md5=1e70feedac93a3fd7f5254e3fec52677 \
9 file://vasgroups.c;startline=4;endline=28;md5=1e70feedac93a3fd7f5254e3fec52677 \
10 file://fnmatch.c;startline=6;endline=31;md5=0779058eafd6e23b966585b45bfa54f3 \
11 file://getcwd.c;startline=5;endline=27;md5=08d82914995224a0ca42116d7ca2a218 \
12 file://glob.c;startline=6;endline=31;md5=299cb38ec8d56e89118ce57fb83b4f78 \
13 file://snprintf.c;startline=6;endline=31;md5=dabd56a89a7a773850dc06ee4f1ecde2"
14
15inherit autotools
16
17EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor"
18
19do_configure_prepend () {
20 # Prevent binaries from being stripped on the host
21 sed -i 's/\($(INSTALL).*\) -s \(.*[(sudo|visudo)]\)/\1 \2/g' Makefile.in
22
23 rm -f acsite.m4
24 if [ ! -e acinclude.m4 ]; then
25 cat aclocal.m4 > acinclude.m4
26 fi
27}
28
29pkg_postinst() {
30 if [ "x$D" != "x" ]; then
31 exit 1
32 fi
33
34 chmod 4111 /usr/bin/sudo
35 chmod 0440 /etc/sudoers
36}
diff --git a/meta/packages/sudo/sudo_1.7.2p7.bb b/meta/packages/sudo/sudo_1.7.2p7.bb
deleted file mode 100644
index 3dd6cdf059..0000000000
--- a/meta/packages/sudo/sudo_1.7.2p7.bb
+++ /dev/null
@@ -1,7 +0,0 @@
1PR = "r0"
2
3SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-1.7.2p7.tar.gz \
4 file://noexec-link.patch"
5
6require sudo.inc
7EXTRA_OECONF += " --with-pam=no"
diff --git a/meta/packages/sync/libsync_svn.bb b/meta/packages/sync/libsync_svn.bb
deleted file mode 100644
index 660b39aa42..0000000000
--- a/meta/packages/sync/libsync_svn.bb
+++ /dev/null
@@ -1,19 +0,0 @@
1DESCRIPTION = "LibSync is a GObject-based framework for more convenient use of \
2OpenSync in GLib applications."
3LICENSE = "LGPL"
4SECTION = "x11"
5DEPENDS = "glib-2.0 gtk+ libglade libopensync avahi"
6RRECOMMENDS = "\
7 libopensync-plugin-file \
8 "
9PV = "0.0+svnr${SRCREV}"
10
11SRC_URI = "svn://svn.o-hand.com/repos/sync/trunk;module=sync;proto=http"
12
13inherit autotools pkgconfig
14
15S = "${WORKDIR}/sync"
16
17PACKAGES += "synctool"
18FILES_${PN} = "${libdir}/lib*.so.*"
19FILES_synctool = "${bindir} ${datadir}"
diff --git a/meta/packages/sysfsutils/sysfsutils_2.1.0.bb b/meta/packages/sysfsutils/sysfsutils_2.1.0.bb
deleted file mode 100644
index 5b513211dc..0000000000
--- a/meta/packages/sysfsutils/sysfsutils_2.1.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1DESCRIPTION = "system utilities based on sysfs."
2HOMEPAGE = "http://linux-diag.sourceforge.net/Sysfsutils.html"
3
4LICENSE = "GPLv2 & LGPLv2.1"
5LICENSE_${PN} = "GPLv2"
6LICENSE_libsysfs = "LGPLv2.1"
7LIC_FILES_CHKSUM = "file://COPYING;md5=3d06403ea54c7574a9e581c6478cc393 \
8 file://cmd/GPL;md5=d41d4e2e1e108554e0388ea4aecd8d27 \
9 file://lib/LGPL;md5=b75d069791103ffe1c0d6435deeff72e"
10PR = "r0"
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/linux-diag/sysfsutils-${PV}.tar.gz"
13S = "${WORKDIR}/sysfsutils-${PV}"
14
15inherit autotools
16
17PACKAGES_prepend = "libsysfs libsysfs-dbg libsysfs-dev "
18FILES_libsysfs = "${libdir}/*.so.*"
19FILES_libsysfs-dev = "${libdir}/* ${includedir}"
20FILES_libsysfs-dbg = "${libdir}/.debug"
21FILES_${PN}-dbg = "${bindir}/.debug"
diff --git a/meta/packages/tar/tar-1.17/m4extensions.patch b/meta/packages/tar/tar-1.17/m4extensions.patch
deleted file mode 100644
index 11b981aa92..0000000000
--- a/meta/packages/tar/tar-1.17/m4extensions.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
2# This is needed to configure correctly with newer versions of autoconf.
3
4--- tar-1.17/m4/extensions.m4.orig 2010-07-22 22:21:35.000000000 -0700
5+++ tar-1.17/m4/extensions.m4 2010-07-22 22:23:41.000000000 -0700
6@@ -1,4 +1,4 @@
7-# serial 4 -*- Autoconf -*-
8+# serial 5 -*- Autoconf -*-
9 # Enable extensions on systems that normally disable them.
10
11 # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
12@@ -16,6 +16,7 @@
13 # ------------------------
14 # Enable extensions on systems that normally disable them,
15 # typically due to standards-conformance issues.
16+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
17 AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
18 [
19 AC_BEFORE([$0], [AC_COMPILE_IFELSE])
20@@ -48,7 +49,7 @@
21 AC_DEFINE([__EXTENSIONS__])
22 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
23 AC_DEFINE([_TANDEM_SOURCE])
24-])
25+])])
26
27 # gl_USE_SYSTEM_EXTENSIONS
28 # ------------------------
diff --git a/meta/packages/tar/tar.inc b/meta/packages/tar/tar.inc
deleted file mode 100644
index cf72d4893b..0000000000
--- a/meta/packages/tar/tar.inc
+++ /dev/null
@@ -1,25 +0,0 @@
1DESCRIPTION = "GNU tar saves many files together into a single tape \
2or disk archive, and can restore individual files from the archive."
3HOMEPAGE = "http://www.gnu.org/software/tar/"
4SECTION = "base"
5
6SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2"
7
8inherit autotools gettext
9
10do_install () {
11 autotools_do_install
12 install -d ${D}${base_bindir}
13 mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN}
14 mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN}
15}
16
17pkg_postinst_${PN} () {
18 update-alternatives --install ${base_bindir}/tar tar tar.${PN} 100
19 update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 100
20}
21
22pkg_prerm_${PN} () {
23 update-alternatives --remove tar tar.${PN}
24 update-alternatives --remove rmt rmt.${PN}
25}
diff --git a/meta/packages/tar/tar_1.17.bb b/meta/packages/tar/tar_1.17.bb
deleted file mode 100644
index 729aecc984..0000000000
--- a/meta/packages/tar/tar_1.17.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1require tar.inc
2
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
5
6PR = "r0"
7
8SRC_URI += "file://m4extensions.patch"
9
10SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290"
11SRC_URI[sha256sum] = "19f9021dda51a16295e4706e80870e71f87107675e51c176a491eba0fc4ca492"
12
13# Required to build with gcc 4.3 and later:
14CFLAGS += "-fgnu89-inline"
diff --git a/meta/packages/tar/tar_1.23.bb b/meta/packages/tar/tar_1.23.bb
deleted file mode 100644
index 093c0b43ce..0000000000
--- a/meta/packages/tar/tar_1.23.bb
+++ /dev/null
@@ -1,9 +0,0 @@
1require tar.inc
2
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
5
6PR = "r0"
7
8SRC_URI[md5sum] = "41e2ca4b924ec7860e51b43ad06cdb7e"
9SRC_URI[sha256sum] = "c9328372db62fbb1d94c9e4e3cefc961111af46de47085b635359c00a0eebe36"
diff --git a/meta/packages/tcf-agent/tcf-agent/fix_tcf-agent.init.patch b/meta/packages/tcf-agent/tcf-agent/fix_tcf-agent.init.patch
deleted file mode 100644
index fa9e458714..0000000000
--- a/meta/packages/tcf-agent/tcf-agent/fix_tcf-agent.init.patch
+++ /dev/null
@@ -1,92 +0,0 @@
1--- a/Makefile
2+++ b/Makefile
3@@ -32,7 +32,7 @@
4 install -d -m 755 $(INSTALLROOT)$(SBIN)
5 install -d -m 755 $(INSTALLROOT)$(INIT)
6 install -c $(BINDIR)/agent -m 755 $(INSTALLROOT)$(SBIN)/tcf-agent
7- install -c $(TCF_AGENT_DIR)/main/tcf-agent.init -m 755 $(INSTALLROOT)$(INIT)/tcf-agent
8+ install -c tcf-agent.init -m 755 $(INSTALLROOT)$(INIT)/tcf-agent
9
10 clean:
11 rm -rf $(BINDIR)
12--- /dev/null
13+++ b/tcf-agent.init
14@@ -0,0 +1,78 @@
15+#!/bin/sh
16+### BEGIN INIT INFO
17+# Provides: tcf-agent
18+# Default-Start: 3 5
19+# Default-Stop: 0 1 2 6
20+# Short-Description: Target Communication Framework agent
21+### END INIT INFO
22+
23+DAEMON_PATH=/usr/sbin/tcf-agent
24+DAEMON_NAME=`basename $DAEMON_PATH`
25+
26+. /etc/init.d/functions
27+
28+test -x $DAEMON_PATH || exit 0
29+
30+PATH=/sbin:/usr/sbin:/bin:/usr/bin
31+export PATH
32+
33+RETVAL=0
34+
35+case "$1" in
36+ start)
37+ echo -n "Starting $DAEMON_NAME: "
38+ $DAEMON_PATH -d -L- -l0
39+ RETVAL=$?
40+ if [ $RETVAL -eq 0 ] ; then
41+ echo "OK"
42+ touch /var/lock/subsys/$DAEMON_NAME
43+ else
44+ echo "FAIL"
45+ fi
46+ ;;
47+
48+ stop)
49+ echo -n "Stopping $DAEMON_NAME: "
50+ count=0
51+ while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do
52+ killproc $DAEMON_PATH >& /dev/null
53+ sleep 1
54+ RETVAL=$?
55+ if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then
56+ sleep 3
57+ fi
58+ count=`expr $count + 1`
59+ done
60+ rm -f /var/lock/subsys/$DAEMON_NAME
61+ if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then
62+ echo "FAIL"
63+ else
64+ echo "OK"
65+ fi
66+ ;;
67+
68+ restart)
69+ $0 stop
70+ sleep 1
71+ $0 start
72+ ;;
73+
74+ status)
75+ if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then
76+ echo "$DAEMON_NAME is running"
77+ else
78+ echo "$DAEMON_NAME is not running"
79+ fi
80+ ;;
81+
82+ condrestart)
83+ [ -f /var/lock/subsys/$DAEMON_NAME ] && $0 restart
84+ ;;
85+
86+ *)
87+ echo "usage: $0 { start | stop | restart | condrestart | status }"
88+ ;;
89+esac
90+
91+exit $RETVAL
92+
diff --git a/meta/packages/tcf-agent/tcf-agent/terminals_agent.patch b/meta/packages/tcf-agent/tcf-agent/terminals_agent.patch
deleted file mode 100644
index b88b5e70cd..0000000000
--- a/meta/packages/tcf-agent/tcf-agent/terminals_agent.patch
+++ /dev/null
@@ -1,1025 +0,0 @@
1Index: org.eclipse.tm.tcf.terminals.agent/terminals.c
2===================================================================
3--- org.eclipse.tm.tcf.terminals.agent/terminals.c (revision 0)
4+++ org.eclipse.tm.tcf.terminals.agent/terminals.c (revision 0)
5@@ -0,0 +1,846 @@
6+/*******************************************************************************
7+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
8+ * All rights reserved. This program and the accompanying materials
9+ * are made available under the terms of the Eclipse Public License v1.0
10+ * and Eclipse Distribution License v1.0 which accompany this distribution.
11+ * The Eclipse Public License is available at
12+ * http://www.eclipse.org/legal/epl-v10.html
13+ * and the Eclipse Distribution License is available at
14+ * http://www.eclipse.org/org/documents/edl-v10.php.
15+ *
16+ * Contributors:
17+ * Wind River Systems - initial API and implementation
18+ *******************************************************************************/
19+
20+/*
21+ * Sample TCF service implementation.
22+ */
23+
24+#include <config.h>
25+#include <stdlib.h>
26+#include <stdio.h>
27+#include <string.h>
28+#include <errno.h>
29+#include <fcntl.h>
30+#include <signal.h>
31+#include <assert.h>
32+#include <termios.h>
33+#ifndef TIOCGWINSZ
34+#include <sys/ioctl.h>
35+#endif
36+#include <framework/myalloc.h>
37+#include <framework/protocol.h>
38+#include <framework/trace.h>
39+#include <framework/context.h>
40+#include <framework/json.h>
41+#include <framework/asyncreq.h>
42+#include <framework/exceptions.h>
43+#include <framework/waitpid.h>
44+#include <framework/signames.h>
45+#include <services/streamsservice.h>
46+#include <terminals.h>
47+
48+#define TERMINALS_DEBUG 1
49+
50+#define TERMINALS_NO_LOGIN 0
51+
52+static const char * TERMINALS = "Terminals";
53+
54+#if defined(WIN32)
55+# include <tlhelp32.h>
56+# ifdef _MSC_VER
57+# pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union (in winternl.h) */
58+# include <winternl.h>
59+# else
60+# include <ntdef.h>
61+# endif
62+# ifndef STATUS_INFO_LENGTH_MISMATCH
63+# define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L)
64+# endif
65+# ifndef SystemHandleInformation
66+# define SystemHandleInformation 16
67+# endif
68+# error("unsupported WIN32!")
69+#elif defined(_WRS_KERNEL)
70+# include <symLib.h>
71+# include <sysSymTbl.h>
72+# include <ioLib.h>
73+# include <ptyDrv.h>
74+# include <taskHookLib.h>
75+# error("unsupported WRS!")
76+#else
77+# include <sys/stat.h>
78+# include <unistd.h>
79+# include <dirent.h>
80+# if TERMINALS_NO_LOGIN
81+# define TERM_LAUNCH_EXEC "/bin/bash"
82+# define TERM_LAUNCH_ARGS {TERM_LAUNCH_EXEC, NULL}
83+# else
84+# define TERM_LAUNCH_EXEC "/bin/login"
85+# define TERM_LAUNCH_ARGS {TERM_LAUNCH_EXEC, "-p", NULL}
86+# endif
87+#endif
88+
89+#define PIPE_SIZE 0x1000
90+#define TERM_PROP_DEF_SIZE 256
91+
92+typedef struct Terminal
93+{
94+ LINK link;
95+ int pid; /*pid of the login process of the terminal*/
96+ TCFBroadcastGroup * bcg;
97+ int inp;
98+ int out;
99+ int err;
100+ struct TerminalInput * inp_struct;
101+ struct TerminalOutput * out_struct;
102+ struct TerminalOutput * err_struct;
103+ char inp_id[256];
104+ char out_id[256];
105+ char err_id[256];
106+
107+ char pty_type[TERM_PROP_DEF_SIZE];
108+ char encoding[TERM_PROP_DEF_SIZE];
109+ unsigned long width;
110+ unsigned long height;
111+ long exit_code;
112+
113+ Channel *channel;
114+} Terminal;
115+
116+typedef struct TerminalOutput
117+{
118+ Terminal * prs;
119+ AsyncReqInfo req;
120+ int req_posted;
121+ char buf[PIPE_SIZE];
122+ size_t buf_pos;
123+ int eos;
124+ VirtualStream * vstream;
125+} TerminalOutput;
126+
127+typedef struct TerminalInput
128+{
129+ Terminal * prs;
130+ AsyncReqInfo req;
131+ int req_posted;
132+ char buf[PIPE_SIZE];
133+ size_t buf_pos;
134+ size_t buf_len;
135+ int eos;
136+ VirtualStream * vstream;
137+} TerminalInput;
138+
139+#define link2term(A) ((Terminal *)((char *)(A) - offsetof(Terminal, link)))
140+
141+static LINK terms_list;
142+#if defined(_WRS_KERNEL)
143+static SEM_ID prs_list_lock = NULL;
144+#endif
145+
146+static Terminal * find_terminal(int pid)
147+{
148+ LINK * qhp = &terms_list;
149+ LINK * qp = qhp->next;
150+
151+ while (qp != qhp) {
152+ Terminal * prs = link2term(qp);
153+ if (prs->pid == pid)
154+ return prs;
155+ qp = qp->next;
156+ }
157+ return NULL;
158+}
159+
160+static char * tid2id(int tid)
161+{
162+ static char s[64];
163+ char * p = s + sizeof(s);
164+ unsigned long n = (long) tid;
165+ *(--p) = 0;
166+ do {
167+ *(--p) = (char) (n % 10 + '0');
168+ n = n / 10;
169+ } while (n != 0);
170+
171+ *(--p) = 'T';
172+ return p;
173+}
174+
175+static int id2tid(const char * id)
176+{
177+ int tid = 0;
178+ if (id == NULL)
179+ return 0;
180+ if (id[0] != 'T')
181+ return 0;
182+ if (id[1] == 0)
183+ return 0;
184+ tid = (unsigned) strtol(id + 1, (char **) &id, 10);
185+ if (id[0] != 0)
186+ return 0;
187+ return tid;
188+}
189+
190+static void write_context(OutputStream * out, int tid)
191+{
192+ Terminal * prs = find_terminal(tid);
193+
194+ write_stream(out, '{');
195+
196+ if (prs != NULL) {
197+ if (*prs->pty_type) {
198+ json_write_string(out, "PtyType");
199+ write_stream(out, ':');
200+ json_write_string(out, prs->pty_type);
201+ write_stream(out, ',');
202+ }
203+
204+ if (*prs->encoding) {
205+ json_write_string(out, "Encoding");
206+ write_stream(out, ':');
207+ json_write_string(out, prs->encoding);
208+ write_stream(out, ',');
209+ }
210+
211+ json_write_string(out, "Width");
212+ write_stream(out, ':');
213+ json_write_ulong(out, prs->width);
214+ write_stream(out, ',');
215+
216+ json_write_string(out, "Height");
217+ write_stream(out, ':');
218+ json_write_ulong(out, prs->height);
219+ write_stream(out, ',');
220+
221+ if (*prs->inp_id) {
222+ json_write_string(out, "StdInID");
223+ write_stream(out, ':');
224+ json_write_string(out, prs->inp_id);
225+ write_stream(out, ',');
226+ }
227+ if (*prs->out_id) {
228+ json_write_string(out, "StdOutID");
229+ write_stream(out, ':');
230+ json_write_string(out, prs->out_id);
231+ write_stream(out, ',');
232+ }
233+ if (*prs->err_id) {
234+ json_write_string(out, "StdErrID");
235+ write_stream(out, ':');
236+ json_write_string(out, prs->err_id);
237+ write_stream(out, ',');
238+ }
239+ }
240+
241+ json_write_string(out, "ID");
242+ write_stream(out, ':');
243+ json_write_string(out, tid2id(tid));
244+
245+ write_stream(out, '}');
246+}
247+
248+static void send_event_terminal_exited(OutputStream * out, Terminal * prs)
249+{
250+ write_stringz(out, "E");
251+ write_stringz(out, TERMINALS);
252+ write_stringz(out, "exited");
253+
254+ json_write_string(out, tid2id(prs->pid));
255+ write_stream(out, 0);
256+
257+ json_write_ulong(out, prs->exit_code);
258+ write_stream(out, 0);
259+
260+ write_stream(out, MARKER_EOM);
261+}
262+
263+static void send_event_terminal_win_size_changed(OutputStream * out,
264+ Terminal * prs)
265+{
266+ write_stringz(out, "E");
267+ write_stringz(out, TERMINALS);
268+ write_stringz(out, "winSizeChanged");
269+
270+ json_write_string(out, tid2id(prs->pid));
271+ write_stream(out, 0);
272+
273+ json_write_long(out, prs->width);
274+ write_stream(out, 0);
275+
276+ json_write_long(out, prs->height);
277+ write_stream(out, 0);
278+
279+ write_stream(out, MARKER_EOM);
280+}
281+
282+static int kill_term(Terminal *term)
283+{
284+ int err = 0;
285+
286+#if defined(WIN32)
287+ HANDLE h = OpenProcess(PROCESS_TERMINATE, FALSE, term->pid);
288+ if (h == NULL)
289+ {
290+ err = set_win32_errno(GetLastError());
291+ }
292+ else
293+ {
294+ if (!TerminateProcess(h, 1)) err = set_win32_errno(GetLastError());
295+ if (!CloseHandle(h) && !err) err = set_win32_errno(GetLastError());
296+ }
297+#else
298+ if (kill(term->pid, SIGTERM) < 0)
299+ err = errno;
300+#endif
301+ return err;
302+}
303+
304+static void command_exit(char * token, Channel * c)
305+{
306+ int err = 0;
307+ char id[256];
308+ unsigned tid;
309+ Terminal *term = NULL;
310+
311+ json_read_string(&c->inp, id, sizeof(id));
312+ if (read_stream(&c->inp) != 0)
313+ exception(ERR_JSON_SYNTAX);
314+ if (read_stream(&c->inp) != MARKER_EOM)
315+ exception(ERR_JSON_SYNTAX);
316+
317+ tid = id2tid(id);
318+ write_stringz(&c->out, "R");
319+ write_stringz(&c->out, token);
320+
321+ if (tid == 0) {
322+ err = ERR_INV_CONTEXT;
323+ } else {
324+ term = find_terminal(tid);
325+ if (term == NULL) {
326+ err = ERR_INV_CONTEXT;
327+ } else {
328+ err = kill_term(term);
329+ }
330+ }
331+
332+ write_errno(&c->out, err);
333+ write_stream(&c->out, MARKER_EOM);
334+}
335+
336+static void terminal_exited(Terminal * prs)
337+{
338+ Trap trap;
339+
340+ if (set_trap(&trap)) {
341+ send_event_terminal_exited(&prs->bcg->out, prs);
342+ clear_trap(&trap);
343+ } else {
344+ trace(LOG_ALWAYS, "Exception sending terminal exited event: %d %s",
345+ trap.error, errno_to_str(trap.error));
346+ }
347+
348+#if defined(_WRS_KERNEL)
349+ semTake(prs_list_lock, WAIT_FOREVER);
350+#endif
351+ list_remove(&prs->link);
352+ close(prs->inp);
353+ close(prs->out);
354+ if (prs->out != prs->err)
355+ close(prs->err);
356+ if (prs->inp_struct) {
357+ TerminalInput * inp = prs->inp_struct;
358+ if (!inp->req_posted) {
359+ virtual_stream_delete(inp->vstream);
360+ loc_free(inp);
361+ } else {
362+ inp->prs = NULL;
363+ }
364+ }
365+ if (prs->out_struct)
366+ prs->out_struct->prs = NULL;
367+ if (prs->err_struct)
368+ prs->err_struct->prs = NULL;
369+ loc_free(prs);
370+#if defined(_WRS_KERNEL)
371+ semGive(prs_list_lock);
372+#endif
373+}
374+
375+static void terminal_input_streams_callback(VirtualStream * stream,
376+ int event_code, void * args)
377+{
378+ TerminalInput * inp = (TerminalInput *) args;
379+
380+ assert(inp->vstream == stream);
381+ if (!inp->req_posted) {
382+ if (inp->buf_pos >= inp->buf_len && !inp->eos) {
383+ inp->buf_pos = inp->buf_len = 0;
384+ virtual_stream_get_data(stream, inp->buf, sizeof(inp->buf),
385+ &inp->buf_len, &inp->eos);
386+ }
387+ if (inp->buf_pos < inp->buf_len) {
388+ inp->req.u.fio.bufp = inp->buf + inp->buf_pos;
389+ inp->req.u.fio.bufsz = inp->buf_len - inp->buf_pos;
390+ inp->req_posted = 1;
391+ async_req_post(&inp->req);
392+ }
393+ }
394+}
395+
396+static void write_terminal_input_done(void * x)
397+{
398+ AsyncReqInfo * req = (AsyncReqInfo *) x;
399+ TerminalInput * inp = (TerminalInput *) req->client_data;
400+
401+ inp->req_posted = 0;
402+ if (inp->prs == NULL) {
403+ /* Process has exited */
404+ virtual_stream_delete(inp->vstream);
405+ loc_free(inp);
406+ } else {
407+ int wr = inp->req.u.fio.rval;
408+
409+ if (wr < 0) {
410+ int err = inp->req.error;
411+ trace(LOG_ALWAYS, "Can't write terminal input stream: %d %s", err,
412+ errno_to_str(err));
413+ inp->buf_pos = inp->buf_len = 0;
414+ } else {
415+ inp->buf_pos += wr;
416+ }
417+
418+ terminal_input_streams_callback(inp->vstream, 0, inp);
419+ }
420+}
421+
422+static void write_terminal_input(Terminal * prs)
423+{
424+ TerminalInput * inp = prs->inp_struct = (TerminalInput *) loc_alloc_zero(
425+ sizeof(TerminalInput));
426+ inp->prs = prs;
427+ inp->req.client_data = inp;
428+ inp->req.done = write_terminal_input_done;
429+ inp->req.type = AsyncReqWrite;
430+ inp->req.u.fio.fd = prs->inp;
431+ virtual_stream_create(TERMINALS, tid2id(prs->pid), PIPE_SIZE,
432+ VS_ENABLE_REMOTE_WRITE, terminal_input_streams_callback, inp,
433+ &inp->vstream);
434+ virtual_stream_get_id(inp->vstream, prs->inp_id, sizeof(prs->inp_id));
435+}
436+
437+static void terminal_output_streams_callback(VirtualStream * stream,
438+ int event_code, void * args)
439+{
440+ TerminalOutput * out = (TerminalOutput *) args;
441+
442+ assert(out->vstream == stream);
443+ if (!out->req_posted) {
444+ int buf_len = out->req.u.fio.rval;
445+ int err = 0;
446+ int eos = 0;
447+
448+ if (buf_len < 0) {
449+ buf_len = 0;
450+ err = out->req.error;
451+ }
452+ if (buf_len == 0)
453+ eos = 1;
454+ if (out->prs == NULL) {
455+ eos = 1;
456+ err = 0;
457+ }
458+
459+ assert(buf_len <= (int)sizeof(out->buf));
460+ assert(out->buf_pos <= (size_t)buf_len);
461+ assert(out->req.u.fio.bufp == out->buf);
462+#ifdef __linux__
463+ if (err == EIO)
464+ err = 0;
465+#endif
466+ if (err)
467+ trace(LOG_ALWAYS, "Can't read terminal output stream: %d %s", err,
468+ errno_to_str(err));
469+
470+ if (out->buf_pos < (size_t) buf_len || out->eos != eos) {
471+ size_t done = 0;
472+ virtual_stream_add_data(stream, out->buf + out->buf_pos, buf_len
473+ - out->buf_pos, &done, eos);
474+ out->buf_pos += done;
475+ if (eos)
476+ out->eos = 1;
477+ }
478+
479+ if (out->buf_pos >= (size_t) buf_len) {
480+ if (!eos) {
481+ out->req_posted = 1;
482+ async_req_post(&out->req);
483+ } else if (virtual_stream_is_empty(stream)) {
484+ if (out->prs != NULL) {
485+ if (out == out->prs->out_struct)
486+ out->prs->out_struct = NULL;
487+ if (out == out->prs->err_struct)
488+ out->prs->err_struct = NULL;
489+ }
490+ virtual_stream_delete(stream);
491+ loc_free(out);
492+ }
493+ }
494+ } // end if(!out->req_posted)
495+}
496+
497+static void read_terminal_output_done(void * x)
498+{
499+ AsyncReqInfo * req = (AsyncReqInfo *) x;
500+ TerminalOutput * out = (TerminalOutput *) req->client_data;
501+
502+ out->buf_pos = 0;
503+ out->req_posted = 0;
504+ terminal_output_streams_callback(out->vstream, 0, out);
505+}
506+
507+static TerminalOutput * read_terminal_output(Terminal * prs, int fd, char * id,
508+ size_t id_size)
509+{
510+ TerminalOutput * out = (TerminalOutput *) loc_alloc_zero(
511+ sizeof(TerminalOutput));
512+ out->prs = prs;
513+ out->req.client_data = out;
514+ out->req.done = read_terminal_output_done;
515+ out->req.type = AsyncReqRead;
516+ out->req.u.fio.bufp = out->buf;
517+ out->req.u.fio.bufsz = sizeof(out->buf);
518+ out->req.u.fio.fd = fd;
519+ virtual_stream_create(TERMINALS, tid2id(prs->pid), PIPE_SIZE,
520+ VS_ENABLE_REMOTE_READ, terminal_output_streams_callback, out,
521+ &out->vstream);
522+ virtual_stream_get_id(out->vstream, id, id_size);
523+ out->req_posted = 1;
524+ async_req_post(&out->req);
525+ return out;
526+}
527+
528+static char **envp_add(char **old_envp, int old_envp_len, char *env)
529+{
530+ char **new_envp = NULL;
531+ int i;
532+ int env_size;
533+ int old_envp_size;
534+
535+ assert(old_envp || (old_envp==NULL && old_envp_len==0));
536+ assert(env);
537+ assert(*env);
538+
539+ for (i = 0, old_envp_size = 0; i < old_envp_len; i++) {
540+ old_envp_size += sizeof(char *); //size of env pointer
541+ old_envp_size += strlen(old_envp[i]) + 1; //size of env string, including trailing '\0'
542+ }
543+ assert((old_envp && old_envp[i]==NULL) || (old_envp==NULL));
544+ old_envp_size += sizeof(char *);//last null pointer
545+
546+ env_size = strlen(env); //new env string size
547+
548+ new_envp = loc_alloc(old_envp_size + sizeof(char *) + env_size + 1);
549+ if (new_envp != NULL) {
550+ new_envp[0] = (char *) new_envp + old_envp_size + sizeof(char *); //setting new env ptr
551+ strcpy(new_envp[0], env); //copy new env string
552+ if (old_envp) {
553+ memcpy(&new_envp[1], old_envp, old_envp_size); //copy old envp
554+ } else {
555+ new_envp[1] = NULL;
556+ }
557+ }
558+ return new_envp;
559+}
560+
561+static int start_terminal(Channel * c, char *pty_type, char *encoding,
562+ char ** envp, int envp_len, char * exe, char ** args, int *pid,
563+ Terminal ** prs)
564+{
565+ int err = 0;
566+ int fd_tty_master = -1;
567+ char * tty_slave_name = NULL;
568+ struct winsize size;
569+ char **newenvp = envp;
570+
571+ memset(&size, 0, sizeof(struct winsize));
572+ fd_tty_master = posix_openpt(O_RDWR | O_NOCTTY);
573+ if (fd_tty_master < 0 || grantpt(fd_tty_master) < 0 || unlockpt(
574+ fd_tty_master) < 0)
575+ err = errno;
576+ if (!err) {
577+ tty_slave_name = ptsname(fd_tty_master);
578+ if (tty_slave_name == NULL)
579+ err = EINVAL;
580+ }
581+
582+ if (ioctl(fd_tty_master, TIOCGWINSZ, (char *) &size) < 0)
583+ err = errno;
584+
585+ if (!err && fd_tty_master < 3) {
586+ int fd0 = fd_tty_master;
587+ if ((fd_tty_master = dup(fd_tty_master)) < 0 || close(fd0))
588+ err = errno;
589+ }
590+
591+ if (!err) {
592+ *pid = fork();
593+ if (*pid < 0)
594+ err = errno;
595+ if (*pid == 0) {
596+ int fd = -1;
597+ int fd_tty_slave = -1;
598+
599+ if (*pty_type) {
600+ char env_term[TERM_PROP_DEF_SIZE];
601+ snprintf(env_term, sizeof(env_term), "TERM=%s", pty_type);
602+ newenvp = envp_add(envp, envp_len, env_term);
603+ if (newenvp == NULL) {
604+ err = ENOMEM;
605+ } else if (envp) {
606+ loc_free(envp);
607+ envp = NULL;
608+ }
609+ }
610+
611+ setsid();
612+
613+ if (!err && (fd = sysconf(_SC_OPEN_MAX)) < 0)
614+ err = errno;
615+ if (!err && (fd_tty_slave = open(tty_slave_name, O_RDWR)) < 0)
616+ err = errno;
617+#if defined(TIOCSCTTY)
618+ if (!err && (ioctl(fd_tty_slave, TIOCSCTTY, (char *) 0)) < 0)
619+ err = errno;
620+#endif
621+ if (!err && dup2(fd_tty_slave, 0) < 0)
622+ err = errno;
623+ if (!err && dup2(fd_tty_slave, 1) < 0)
624+ err = errno;
625+ if (!err && dup2(fd_tty_slave, 2) < 0)
626+ err = errno;
627+ while (!err && fd > 3)
628+ close(--fd);
629+ if (!err) {
630+ execve(exe, args, newenvp);
631+ err = errno;
632+ }
633+ if (newenvp)
634+ loc_free(newenvp);
635+ err = 1;
636+ if (err < 1)
637+ err = EINVAL;
638+ else if (err > 0xff)
639+ err = EINVAL;
640+ exit(err);
641+ }
642+ }
643+
644+ if (!err) {
645+ *prs = (Terminal *) loc_alloc_zero(sizeof(Terminal));
646+ (*prs)->inp = fd_tty_master;
647+ (*prs)->out = fd_tty_master;
648+ (*prs)->err = fd_tty_master;
649+ (*prs)->pid = *pid;
650+ (*prs)->bcg = c->bcg;
651+ (*prs)->channel = c;
652+ if (*pty_type)
653+ snprintf((*prs)->pty_type, sizeof((*prs)->pty_type), "%s", pty_type);
654+ if (*encoding)
655+ snprintf((*prs)->encoding, sizeof((*prs)->encoding), "%s", encoding);
656+ (*prs)->width = size.ws_row;
657+ (*prs)->height = size.ws_col;
658+ list_add_first(&(*prs)->link, &terms_list);
659+ }
660+
661+ if (!err)
662+ return 0;
663+ errno = err;
664+ return -1;
665+}
666+
667+static void command_get_context(char * token, Channel * c)
668+{
669+ int err = 0;
670+ char id[256];
671+ int tid;
672+ Terminal *term;
673+
674+ json_read_string(&c->inp, id, sizeof(id));
675+ if (read_stream(&c->inp) != 0)
676+ exception(ERR_JSON_SYNTAX);
677+ if (read_stream(&c->inp) != MARKER_EOM)
678+ exception(ERR_JSON_SYNTAX);
679+
680+ tid = id2tid(id);
681+ write_stringz(&c->out, "R");
682+ write_stringz(&c->out, token);
683+
684+ if (tid == 0) {
685+ err = ERR_INV_CONTEXT;
686+ } else {
687+ term = find_terminal(tid);
688+ if (term == NULL) {
689+ err = ERR_INV_CONTEXT;
690+ } else {
691+ write_context(&c->out, tid);
692+ write_stream(&c->out, 0);
693+ }
694+ }
695+
696+ write_errno(&c->out, err);
697+ write_stream(&c->out, MARKER_EOM);
698+}
699+
700+static void command_launch(char * token, Channel * c)
701+{
702+ int pid = 0;
703+ int err = 0;
704+ char encoding[TERM_PROP_DEF_SIZE];
705+ char pty_type[TERM_PROP_DEF_SIZE];
706+ char *args[] = TERM_LAUNCH_ARGS;
707+
708+ char ** envp = NULL;
709+ int envp_len = 0;
710+
711+ Terminal * prs = NULL;
712+ Trap trap;
713+
714+ if (set_trap(&trap)) {
715+ json_read_string(&c->inp, pty_type, sizeof(pty_type));
716+ if (read_stream(&c->inp) != 0)
717+ exception(ERR_JSON_SYNTAX);
718+ json_read_string(&c->inp, encoding, sizeof(encoding));
719+ if (read_stream(&c->inp) != 0)
720+ exception(ERR_JSON_SYNTAX);
721+ envp = json_read_alloc_string_array(&c->inp, &envp_len);
722+ if (read_stream(&c->inp) != 0)
723+ exception(ERR_JSON_SYNTAX);
724+ if (read_stream(&c->inp) != MARKER_EOM)
725+ exception(ERR_JSON_SYNTAX);
726+
727+ if (err == 0 && start_terminal(c, pty_type, encoding, envp, envp_len,
728+ TERM_LAUNCH_EXEC, args, &pid, &prs) < 0)
729+ err = errno;
730+ if (prs != NULL) {
731+ write_terminal_input(prs);
732+ prs->out_struct = read_terminal_output(prs, prs->out, prs->out_id,
733+ sizeof(prs->out_id));
734+ if (prs->out != prs->err)
735+ prs->err_struct = read_terminal_output(prs, prs->err,
736+ prs->err_id, sizeof(prs->err_id));
737+ }
738+ if (!err) {
739+ add_waitpid_process(pid);
740+ }
741+ //write result back
742+ {
743+ write_stringz(&c->out, "R");
744+ write_stringz(&c->out, token);
745+ write_errno(&c->out, err);
746+ if (err || pid == 0) {
747+ write_stringz(&c->out, "null");
748+ } else {
749+ write_context(&c->out, pid);
750+ write_stream(&c->out, 0);
751+ }
752+ write_stream(&c->out, MARKER_EOM);
753+ }
754+ clear_trap(&trap);
755+ }
756+
757+ loc_free(envp);
758+
759+ if (trap.error)
760+ exception(trap.error);
761+}
762+
763+static void command_set_win_size(char * token, Channel * c)
764+{
765+ int err = 0;
766+ struct winsize size;
767+ char id[256];
768+ unsigned tid;
769+ Terminal *term = NULL;
770+
771+ json_read_string(&c->inp, id, sizeof(id));
772+ if (read_stream(&c->inp) != 0)
773+ exception(ERR_JSON_SYNTAX);
774+ size.ws_col=json_read_ulong(&c->inp);
775+ if (read_stream(&c->inp) != 0)
776+ exception(ERR_JSON_SYNTAX);
777+ size.ws_row=json_read_ulong(&c->inp);
778+ if (read_stream(&c->inp) != 0)
779+ exception(ERR_JSON_SYNTAX);
780+ if (read_stream(&c->inp) != MARKER_EOM)
781+ exception(ERR_JSON_SYNTAX);
782+
783+ tid = id2tid(id);
784+
785+ if(tid==0 || (term=find_terminal(tid))==NULL) {
786+ err=ERR_INV_CONTEXT;
787+ }else if (term->width != size.ws_col || term->height != size.ws_row) {
788+ if(ioctl(term->inp,TIOCSWINSZ,&size)<0) {
789+ err=errno;
790+ }
791+ if(!err) {
792+ term->width=size.ws_col;
793+ term->height=size.ws_row;
794+ send_event_terminal_win_size_changed(&term->channel->out,term);
795+ }
796+ }
797+
798+ write_stringz(&c->out, "R");
799+ write_stringz(&c->out, token);
800+ write_errno(&c->out, err);
801+ write_stream(&c->out, MARKER_EOM);
802+
803+}
804+
805+static void waitpid_listener(int pid, int exited, int exit_code, int signal,
806+ int event_code, int syscall, void * args)
807+{
808+ if (exited) {
809+ Terminal * prs = find_terminal(pid);
810+ if (prs) {
811+ if (signal != 0)
812+ prs->exit_code = -signal;
813+ else
814+ prs->exit_code = exit_code;
815+ terminal_exited(prs);
816+ }
817+ }
818+}
819+
820+static void channel_close_listener(Channel * c)
821+{
822+ LINK * l = NULL;
823+
824+ for (l = terms_list.next; l != &terms_list;) {
825+ Terminal * term = link2term(l);
826+ l = l->next;
827+ if (term->channel == c) {
828+ trace(LOG_ALWAYS, "Terminal is left launched: T%d", term->pid);
829+ kill_term(term);
830+ }
831+ }
832+}
833+
834+void ini_terminals_service(Protocol * proto)
835+{
836+#if defined(_WRS_KERNEL)
837+ prs_list_lock = semMCreate(SEM_Q_PRIORITY);
838+ if (prs_list_lock == NULL) check_error(errno);
839+ if (taskCreateHookAdd((FUNCPTR)task_create_hook) != OK) check_error(errno);
840+ if (taskDeleteHookAdd((FUNCPTR)task_delete_hook) != OK) check_error(errno);
841+#endif
842+ list_init(&terms_list);
843+
844+ add_waitpid_listener(waitpid_listener, NULL);
845+ add_channel_close_listener(channel_close_listener);
846+
847+ add_command_handler(proto, TERMINALS, "getContext", command_get_context);
848+ add_command_handler(proto, TERMINALS, "launch", command_launch);
849+ add_command_handler(proto, TERMINALS, "exit", command_exit);
850+ add_command_handler(proto, TERMINALS, "setWinSize", command_set_win_size);
851+}
852Index: org.eclipse.tm.tcf.terminals.agent/main/services-ext.h
853===================================================================
854--- org.eclipse.tm.tcf.terminals.agent/main/services-ext.h (revision 0)
855+++ org.eclipse.tm.tcf.terminals.agent/main/services-ext.h (revision 0)
856@@ -0,0 +1,25 @@
857+/*******************************************************************************
858+ * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
859+ * All rights reserved. This program and the accompanying materials
860+ * are made available under the terms of the Eclipse Public License v1.0
861+ * and Eclipse Distribution License v1.0 which accompany this distribution.
862+ * The Eclipse Public License is available at
863+ * http://www.eclipse.org/legal/epl-v10.html
864+ * and the Eclipse Distribution License is available at
865+ * http://www.eclipse.org/org/documents/edl-v10.php.
866+ *
867+ * Contributors:
868+ * Wind River Systems - initial API and implementation
869+ *******************************************************************************/
870+
871+/*
872+ * Services initialization code extension point.
873+ * If the agent is built with additional user-defined services,
874+ * a customized version of services-ext.h file can be added to compiler headers search paths.
875+ */
876+
877+#include "terminals.h"
878+
879+static void ini_ext_services(Protocol * proto, TCFBroadcastGroup * bcg) {
880+ ini_terminals_service(proto);
881+}
882Index: org.eclipse.tm.tcf.terminals.agent/terminals.h
883===================================================================
884--- org.eclipse.tm.tcf.terminals.agent/terminals.h (revision 0)
885+++ org.eclipse.tm.tcf.terminals.agent/terminals.h (revision 0)
886@@ -0,0 +1,27 @@
887+/*******************************************************************************
888+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
889+ * All rights reserved. This program and the accompanying materials
890+ * are made available under the terms of the Eclipse Public License v1.0
891+ * and Eclipse Distribution License v1.0 which accompany this distribution.
892+ * The Eclipse Public License is available at
893+ * http://www.eclipse.org/legal/epl-v10.html
894+ * and the Eclipse Distribution License is available at
895+ * http://www.eclipse.org/org/documents/edl-v10.php.
896+ *
897+ * Contributors:
898+ * Wind River Systems - initial API and implementation
899+ *******************************************************************************/
900+
901+/*
902+ * Sample TCF service header file.
903+ */
904+
905+#ifndef TERMINALS_H_
906+#define TERMINALS_H_
907+
908+#include <config.h>
909+#include <framework/protocol.h>
910+
911+extern void ini_terminals_service(Protocol * proto);
912+
913+#endif /*TERMINALS_H_*/
914Index: org.eclipse.tm.tcf.terminals.agent/config.h
915===================================================================
916--- org.eclipse.tm.tcf.terminals.agent/config.h (revision 0)
917+++ org.eclipse.tm.tcf.terminals.agent/config.h (revision 0)
918@@ -0,0 +1,63 @@
919+/*******************************************************************************
920+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
921+ * All rights reserved. This program and the accompanying materials
922+ * are made available under the terms of the Eclipse Public License v1.0
923+ * and Eclipse Distribution License v1.0 which accompany this distribution.
924+ * The Eclipse Public License is available at
925+ * http://www.eclipse.org/legal/epl-v10.html
926+ * and the Eclipse Distribution License is available at
927+ * http://www.eclipse.org/org/documents/edl-v10.php.
928+ *
929+ * Contributors:
930+ * Wind River Systems - initial API and implementation
931+ *******************************************************************************/
932+
933+/*
934+ * This file contains "define" statements that control agent configuration.
935+ * SERVICE_* definitions control which service implementations are included into the agent.
936+ *
937+ * This is example agent configuration. It includes only few standard services,
938+ * and one example service: Day Time.
939+ */
940+
941+#ifndef D_config
942+#define D_config
943+
944+#include <framework/mdep.h>
945+
946+#if defined(WIN32) || defined(__CYGWIN__)
947+# define TARGET_UNIX 0
948+#elif defined(_WRS_KERNEL)
949+# define TARGET_UNIX 0
950+#else
951+# define TARGET_UNIX 1
952+#endif
953+
954+#define SERVICE_Locator 1
955+#define SERVICE_Processes 1
956+#define SERVICE_Streams 1
957+#define SERVICE_FileSystem 1
958+#define SERVICE_SysMonitor TARGET_UNIX
959+
960+#define ENABLE_ZeroCopy 1
961+
962+#if !defined(ENABLE_Splice)
963+# if ENABLE_ZeroCopy
964+# include <fcntl.h>
965+# if defined(SPLICE_F_MOVE)
966+# define ENABLE_Splice 1
967+# else
968+# define ENABLE_Splice 0
969+# endif
970+# else
971+# define ENABLE_Splice 0
972+# endif
973+#endif
974+
975+#define ENABLE_SSL 0
976+
977+#define ENABLE_Trace 1
978+#define ENABLE_Discovery 1
979+
980+
981+#endif /* D_config */
982Index: org.eclipse.tm.tcf.terminals.agent/Makefile
983===================================================================
984--- org.eclipse.tm.tcf.terminals.agent/Makefile (revision 0)
985+++ org.eclipse.tm.tcf.terminals.agent/Makefile (revision 0)
986@@ -0,0 +1,39 @@
987+TCF_AGENT_DIR=../agent
988+
989+include $(TCF_AGENT_DIR)/Makefile.inc
990+
991+override CFLAGS += $(foreach dir,$(INCDIRS),-I$(dir)) $(OPTS)
992+
993+HFILES := $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.h)) $(HFILES)
994+CFILES := $(sort $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.c)) $(CFILES))
995+
996+#no using SSL
997+LIBS = -lpthread -lrt
998+
999+EXECS = $(BINDIR)/agent$(EXTEXE)
1000+
1001+all: $(EXECS)
1002+
1003+$(BINDIR)/libtcf$(EXTLIB) : $(OFILES)
1004+ $(AR) rcs $@ $^
1005+
1006+$(BINDIR)/agent$(EXTEXE): $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB)
1007+ $(CC) $(CFLAGS) -o $@ $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB) $(LIBS)
1008+
1009+$(BINDIR)/%$(EXTOBJ): %.c $(HFILES) Makefile
1010+ @mkdir -p $(dir $@)
1011+ $(CC) $(CFLAGS) -c -o $@ $<
1012+
1013+$(BINDIR)/%$(EXTOBJ): $(TCF_AGENT_DIR)/%.c $(HFILES) Makefile
1014+ @mkdir -p $(dir $@)
1015+ $(CC) $(CFLAGS) -c -o $@ $<
1016+
1017+install: all
1018+ install -d -m 755 $(INSTALLROOT)$(SBIN)
1019+ install -d -m 755 $(INSTALLROOT)$(INIT)
1020+ install -c $(BINDIR)/agent -m 755 $(INSTALLROOT)$(SBIN)/tcf-agent
1021+ install -c $(TCF_AGENT_DIR)/main/tcf-agent.init -m 755 $(INSTALLROOT)$(INIT)/tcf-agent
1022+
1023+clean:
1024+ rm -rf $(BINDIR)
1025+
diff --git a/meta/packages/tcf-agent/tcf-agent_svn.bb b/meta/packages/tcf-agent/tcf-agent_svn.bb
deleted file mode 100644
index b4c70ec8b8..0000000000
--- a/meta/packages/tcf-agent/tcf-agent_svn.bb
+++ /dev/null
@@ -1,36 +0,0 @@
1DESCRIPTION = "Target Communication Framework"
2HOMEPAGE = "http://dsdp.eclipse.org/dsdp/tm/"
3BUGTRACKER = "https://bugs.eclipse.org/bugs/"
4
5LICENSE = "EPLv1.0 | EDLv1.0"
6LIC_FILES_CHKSUM = "file://../epl-v10.html;md5=7aa4215a330a0a4f6a1cbf8da1a0879f \
7 file://../agent/edl-v10.html;md5=522a390a83dc186513f0500543ad3679"
8
9PV = "0.3.0+svnr${SRCREV}"
10PR = "r0"
11
12SRC_URI = "svn://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/;module=tags/0.3.0/;proto=http \
13 file://terminals_agent.patch \
14 file://fix_tcf-agent.init.patch"
15
16S = "${WORKDIR}/tags/0.3.0/tcf-agent"
17
18inherit update-rc.d
19
20INITSCRIPT_NAME = "tcf-agent"
21INITSCRIPT_PARAMS = "start 999 3 5 . stop 20 0 1 2 6 ."
22
23# mangling needed for make
24MAKE_ARCH = `echo ${TARGET_ARCH} | sed s,i.86,i686,`
25MAKE_OS = `echo ${TARGET_OS} | sed s,linux,GNU/Linux,`
26
27EXTRA_OEMAKE = "MACHINE=${MAKE_ARCH} OPSYS=${MAKE_OS} 'CC=${CC}' 'AR=${AR}'"
28
29do_compile() {
30 oe_runmake
31}
32
33do_install() {
34 oe_runmake install INSTALLROOT=${D}
35}
36
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff
deleted file mode 100644
index ff60a843e4..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff
+++ /dev/null
@@ -1,75 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
2--- tcp_wrappers_7.6.orig/hosts_access.5 1995-01-30 19:51:47.000000000 +0100
3+++ tcp_wrappers_7.6/hosts_access.5 2004-04-09 16:59:45.000000000 +0200
4@@ -173,7 +173,7 @@
5 Patterns like these can be used when the machine has different internet
6 addresses with different internet hostnames. Service providers can use
7 this facility to offer FTP, GOPHER or WWW archives with internet names
8-that may even belong to different organizations. See also the `twist'
9+that may even belong to different organizations. See also the `twist\'
10 option in the hosts_options(5) document. Some systems (Solaris,
11 FreeBSD) can have more than one internet address on one physical
12 interface; with other systems you may have to resort to SLIP or PPP
13@@ -236,10 +236,10 @@
14 Before accepting a client request, the wrappers can use the IDENT
15 service to find out that the client did not send the request at all.
16 When the client host provides IDENT service, a negative IDENT lookup
17-result (the client matches `UNKNOWN@host') is strong evidence of a host
18+result (the client matches `UNKNOWN@host\') is strong evidence of a host
19 spoofing attack.
20 .PP
21-A positive IDENT lookup result (the client matches `KNOWN@host') is
22+A positive IDENT lookup result (the client matches `KNOWN@host\') is
23 less trustworthy. It is possible for an intruder to spoof both the
24 client connection and the IDENT lookup, although doing so is much
25 harder than spoofing just a client connection. It may also be that
26diff -ruN tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5
27--- tcp_wrappers_7.6.orig/hosts_options.5 1994-12-28 17:42:29.000000000 +0100
28+++ tcp_wrappers_7.6/hosts_options.5 2004-04-09 16:59:49.000000000 +0200
29@@ -124,7 +124,7 @@
30 value is taken.
31 .SH MISCELLANEOUS
32 .IP "banners /some/directory"
33-Look for a file in `/some/directory' with the same name as the daemon
34+Look for a file in `/some/directory\' with the same name as the daemon
35 process (for example in.telnetd for the telnet service), and copy its
36 contents to the client. Newline characters are replaced by
37 carriage-return newline, and %<letter> sequences are expanded (see
38diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8
39--- tcp_wrappers_7.6.orig/tcpdmatch.8 1996-02-11 17:01:36.000000000 +0100
40+++ tcp_wrappers_7.6/tcpdmatch.8 2004-04-09 17:00:49.000000000 +0200
41@@ -26,7 +26,7 @@
42 A daemon process name. Typically, the last component of a daemon
43 executable pathname.
44 .IP client
45-A host name or network address, or one of the `unknown' or `paranoid'
46+A host name or network address, or one of the `unknown\' or `paranoid\'
47 wildcard patterns.
48 .sp
49 When a client host name is specified, \fItcpdmatch\fR gives a
50@@ -37,13 +37,13 @@
51 .PP
52 Optional information specified with the \fIdaemon@server\fR form:
53 .IP server
54-A host name or network address, or one of the `unknown' or `paranoid'
55-wildcard patterns. The default server name is `unknown'.
56+A host name or network address, or one of the `unknown\' or `paranoid\'
57+wildcard patterns. The default server name is `unknown\'.
58 .PP
59 Optional information specified with the \fIuser@client\fR form:
60 .IP user
61 A client user identifier. Typically, a login name or a numeric userid.
62-The default user name is `unknown'.
63+The default user name is `unknown\'.
64 .SH OPTIONS
65 .IP -d
66 Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current
67@@ -70,7 +70,7 @@
68 .ti +5
69 tcpdmatch in.telnetd paranoid
70 .PP
71-On some systems, daemon names have no `in.' prefix, or \fItcpdmatch\fR
72+On some systems, daemon names have no `in.\' prefix, or \fItcpdmatch\fR
73 may need some help to locate the inetd configuration file.
74 .SH FILES
75 .PP
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch
deleted file mode 100644
index 4963f82eb8..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch
+++ /dev/null
@@ -1,248 +0,0 @@
1diff -ruNp tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3
2--- tcp_wrappers_7.6.orig/hosts_access.3 2005-03-09 18:30:25.000000000 +0100
3+++ tcp_wrappers_7.6/hosts_access.3 2005-03-09 18:27:03.000000000 +0100
4@@ -3,7 +3,7 @@
5 hosts_access, hosts_ctl, request_init, request_set \- access control library
6 .SH SYNOPSIS
7 .nf
8-#include "tcpd.h"
9+#include <tcpd.h>
10
11 extern int allow_severity;
12 extern int deny_severity;
13diff -ruNp tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
14--- tcp_wrappers_7.6.orig/hosts_access.5 2005-03-09 18:30:25.000000000 +0100
15+++ tcp_wrappers_7.6/hosts_access.5 2005-03-09 18:30:18.000000000 +0100
16@@ -8,9 +8,9 @@ name, host name/address) patterns. Exam
17 impatient reader is encouraged to skip to the EXAMPLES section for a
18 quick introduction.
19 .PP
20-An extended version of the access control language is described in the
21-\fIhosts_options\fR(5) document. The extensions are turned on at
22-program build time by building with -DPROCESS_OPTIONS.
23+The extended version of the access control language is described in the
24+\fIhosts_options\fR(5) document. \fBNote that this language supersedes
25+the meaning of \fIshell_command\fB as documented below.\fR
26 .PP
27 In the following text, \fIdaemon\fR is the the process name of a
28 network daemon process, and \fIclient\fR is the name and/or address of
29@@ -346,8 +346,8 @@ in.tftpd: LOCAL, .my.domain
30 /etc/hosts.deny:
31 .in +3
32 .nf
33-in.tftpd: ALL: (/some/where/safe_finger -l @%h | \\
34- /usr/ucb/mail -s %d-%h root) &
35+in.tftpd: ALL: (/usr/sbin/safe_finger -l @%h | \\
36+ /usr/bin/mail -s %d-%h root) &
37 .fi
38 .PP
39 The safe_finger command comes with the tcpd wrapper and should be
40@@ -383,6 +383,7 @@ that shouldn\'t. All problems are repor
41 .fi
42 .SH SEE ALSO
43 .nf
44+hosts_options(5) extended syntax.
45 tcpd(8) tcp/ip daemon wrapper program.
46 tcpdchk(8), tcpdmatch(8), test programs.
47 .SH BUGS
48diff -ruNp tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5
49--- tcp_wrappers_7.6.orig/hosts_options.5 2005-03-09 18:30:24.000000000 +0100
50+++ tcp_wrappers_7.6/hosts_options.5 2005-03-09 18:27:03.000000000 +0100
51@@ -2,10 +2,8 @@
52 .SH NAME
53 hosts_options \- host access control language extensions
54 .SH DESCRIPTION
55-This document describes optional extensions to the language described
56-in the hosts_access(5) document. The extensions are enabled at program
57-build time. For example, by editing the Makefile and turning on the
58-PROCESS_OPTIONS compile-time option.
59+This document describes extensions to the language described
60+in the hosts_access(5) document.
61 .PP
62 The extensible language uses the following format:
63 .sp
64@@ -58,12 +56,12 @@ Notice the leading dot on the domain nam
65 Execute, in a child process, the specified shell command, after
66 performing the %<letter> expansions described in the hosts_access(5)
67 manual page. The command is executed with stdin, stdout and stderr
68-connected to the null device, so that it won\'t mess up the
69+connected to the null device, so that it won't mess up the
70 conversation with the client host. Example:
71 .sp
72 .nf
73 .ti +3
74-spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) &
75+spawn (/usr/sbin/safe_finger -l @%h | /usr/bin/mail root) &
76 .fi
77 .sp
78 executes, in a background child process, the shell command "safe_finger
79diff -ruNp tcp_wrappers_7.6.orig/inetcf.c tcp_wrappers_7.6/inetcf.c
80--- tcp_wrappers_7.6.orig/inetcf.c 1997-02-12 02:13:24.000000000 +0100
81+++ tcp_wrappers_7.6/inetcf.c 2005-03-09 18:27:03.000000000 +0100
82@@ -26,13 +26,17 @@ extern void exit();
83 * guesses. Shorter names follow longer ones.
84 */
85 char *inet_files[] = {
86+#if 0
87 "/private/etc/inetd.conf", /* NEXT */
88 "/etc/inet/inetd.conf", /* SYSV4 */
89 "/usr/etc/inetd.conf", /* IRIX?? */
90+#endif
91 "/etc/inetd.conf", /* BSD */
92+#if 0
93 "/etc/net/tlid.conf", /* SYSV4?? */
94 "/etc/saf/tlid.conf", /* SYSV4?? */
95 "/etc/tlid.conf", /* SYSV4?? */
96+#endif
97 0,
98 };
99
100diff -ruNp tcp_wrappers_7.6.orig/tcpd.8 tcp_wrappers_7.6/tcpd.8
101--- tcp_wrappers_7.6.orig/tcpd.8 1996-02-21 16:39:16.000000000 +0100
102+++ tcp_wrappers_7.6/tcpd.8 2005-03-09 18:27:03.000000000 +0100
103@@ -12,7 +12,11 @@ The program supports both 4.3BSD-style s
104 TLI. Functionality may be limited when the protocol underneath TLI is
105 not an internet protocol.
106 .PP
107-Operation is as follows: whenever a request for service arrives, the
108+There are two possible modes of operation: execution of \fItcpd\fP
109+before a service started by \fIinetd\fP, or linking a daemon with
110+the \fIlibwrap\fP shared library as documented in the \fIhosts_access\fR(3)
111+manual page. Operation when started by \fIinetd\fP
112+is as follows: whenever a request for service arrives, the
113 \fIinetd\fP daemon is tricked into running the \fItcpd\fP program
114 instead of the desired server. \fItcpd\fP logs the request and does
115 some additional checks. When all is well, \fItcpd\fP runs the
116@@ -88,11 +92,11 @@ configuration files.
117 .sp
118 .in +5
119 # mkdir /other/place
120-# mv /usr/etc/in.fingerd /other/place
121-# cp tcpd /usr/etc/in.fingerd
122+# mv /usr/sbin/in.fingerd /other/place
123+# cp tcpd /usr/sbin/in.fingerd
124 .fi
125 .PP
126-The example assumes that the network daemons live in /usr/etc. On some
127+The example assumes that the network daemons live in /usr/sbin. On some
128 systems, network daemons live in /usr/sbin or in /usr/libexec, or have
129 no `in.\' prefix to their name.
130 .SH EXAMPLE 2
131@@ -101,35 +105,34 @@ are left in their original place.
132 .PP
133 In order to monitor access to the \fIfinger\fR service, perform the
134 following edits on the \fIinetd\fR configuration file (usually
135-\fI/etc/inetd.conf\fR or \fI/etc/inet/inetd.conf\fR):
136+\fI/etc/inetd.conf\fR):
137 .nf
138 .sp
139 .ti +5
140-finger stream tcp nowait nobody /usr/etc/in.fingerd in.fingerd
141+finger stream tcp nowait nobody /usr/sbin/in.fingerd in.fingerd
142 .sp
143 becomes:
144 .sp
145 .ti +5
146-finger stream tcp nowait nobody /some/where/tcpd in.fingerd
147+finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd
148 .sp
149 .fi
150 .PP
151-The example assumes that the network daemons live in /usr/etc. On some
152+The example assumes that the network daemons live in /usr/sbin. On some
153 systems, network daemons live in /usr/sbin or in /usr/libexec, the
154 daemons have no `in.\' prefix to their name, or there is no userid
155 field in the inetd configuration file.
156 .PP
157 Similar changes will be needed for the other services that are to be
158 covered by \fItcpd\fR. Send a `kill -HUP\' to the \fIinetd\fR(8)
159-process to make the changes effective. AIX users may also have to
160-execute the `inetimp\' command.
161+process to make the changes effective.
162 .SH EXAMPLE 3
163 In the case of daemons that do not live in a common directory ("secret"
164 or otherwise), edit the \fIinetd\fR configuration file so that it
165 specifies an absolute path name for the process name field. For example:
166 .nf
167 .sp
168- ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd
169+ ntalk dgram udp wait root /usr/sbin/tcpd /usr/local/lib/ntalkd
170 .sp
171 .fi
172 .PP
173@@ -164,6 +167,7 @@ The default locations of the host access
174 .SH SEE ALSO
175 .na
176 .nf
177+hosts_access(3), functions provided by the libwrap library.
178 hosts_access(5), format of the tcpd access control tables.
179 syslog.conf(5), format of the syslogd control file.
180 inetd.conf(5), format of the inetd control file.
181diff -ruNp tcp_wrappers_7.6.orig/tcpdchk.8 tcp_wrappers_7.6/tcpdchk.8
182--- tcp_wrappers_7.6.orig/tcpdchk.8 1995-01-08 17:00:31.000000000 +0100
183+++ tcp_wrappers_7.6/tcpdchk.8 2005-03-09 18:27:03.000000000 +0100
184@@ -9,8 +9,8 @@ tcpdchk [-a] [-d] [-i inet_conf] [-v]
185 potential and real problems it can find. The program examines the
186 \fItcpd\fR access control files (by default, these are
187 \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR), and compares the
188-entries in these files against entries in the \fIinetd\fR or \fItlid\fR
189-network configuration files.
190+entries in these files against entries in the \fIinetd\fR
191+network configuration file.
192 .PP
193 \fItcpdchk\fR reports problems such as non-existent pathnames; services
194 that appear in \fItcpd\fR access control rules, but are not controlled
195@@ -26,14 +26,13 @@ problem.
196 .SH OPTIONS
197 .IP -a
198 Report access control rules that permit access without an explicit
199-ALLOW keyword. This applies only when the extended access control
200-language is enabled (build with -DPROCESS_OPTIONS).
201+ALLOW keyword.
202 .IP -d
203 Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current
204 directory instead of the default ones.
205 .IP "-i inet_conf"
206 Specify this option when \fItcpdchk\fR is unable to find your
207-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when
208+\fIinetd.conf\fR network configuration file, or when
209 you suspect that the program uses the wrong one.
210 .IP -v
211 Display the contents of each access control rule. Daemon lists, client
212@@ -54,7 +53,6 @@ tcpdmatch(8), explain what tcpd would do
213 hosts_access(5), format of the tcpd access control tables.
214 hosts_options(5), format of the language extensions.
215 inetd.conf(5), format of the inetd control file.
216-tlid.conf(5), format of the tlid control file.
217 .SH AUTHORS
218 .na
219 .nf
220diff -ruNp tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8
221--- tcp_wrappers_7.6.orig/tcpdmatch.8 2005-03-09 18:30:24.000000000 +0100
222+++ tcp_wrappers_7.6/tcpdmatch.8 2005-03-09 18:27:03.000000000 +0100
223@@ -13,7 +13,7 @@ request for service. Examples are given
224 The program examines the \fItcpd\fR access control tables (default
225 \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR) and prints its
226 conclusion. For maximal accuracy, it extracts additional information
227-from your \fIinetd\fR or \fItlid\fR network configuration file.
228+from your \fIinetd\fR network configuration file.
229 .PP
230 When \fItcpdmatch\fR finds a match in the access control tables, it
231 identifies the matched rule. In addition, it displays the optional
232@@ -50,7 +50,7 @@ Examine \fIhosts.allow\fR and \fIhosts.d
233 directory instead of the default ones.
234 .IP "-i inet_conf"
235 Specify this option when \fItcpdmatch\fR is unable to find your
236-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when
237+\fIinetd.conf\fR network configuration file, or when
238 you suspect that the program uses the wrong one.
239 .SH EXAMPLES
240 To predict how \fItcpd\fR would handle a telnet request from the local
241@@ -86,7 +86,6 @@ tcpdchk(8), tcpd configuration checker
242 hosts_access(5), format of the tcpd access control tables.
243 hosts_options(5), format of the language extensions.
244 inetd.conf(5), format of the inetd control file.
245-tlid.conf(5), format of the tlid control file.
246 .SH AUTHORS
247 .na
248 .nf
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch
deleted file mode 100644
index a168f6d5a5..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch
+++ /dev/null
@@ -1,103 +0,0 @@
1See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=17847
2
3diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
4--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 18:54:33.000000000 +0200
5+++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 18:54:27.000000000 +0200
6@@ -89,6 +89,10 @@
7 bitwise AND of the address and the `mask\'. For example, the net/mask
8 pattern `131.155.72.0/255.255.254.0\' matches every address in the
9 range `131.155.72.0\' through `131.155.73.255\'.
10+.IP \(bu
11+Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This
12+method of matching cannot be used in conjunction with `net/mask\' matching,
13+hostname matching beginning with `.\' or IP address matching ending with `.\'.
14 .SH WILDCARDS
15 The access control language supports explicit wildcards:
16 .IP ALL
17diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
18--- tcp_wrappers_7.6.orig/hosts_access.c 1997-02-12 02:13:23.000000000 +0100
19+++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 18:52:21.000000000 +0200
20@@ -289,6 +289,11 @@
21 {
22 int n;
23
24+#ifndef DISABLE_WILDCARD_MATCHING
25+ if (strchr(tok, '*') || strchr(tok,'?')) { /* contains '*' or '?' */
26+ return (match_pattern_ylo(string,tok));
27+ } else
28+#endif
29 if (tok[0] == '.') { /* suffix */
30 n = strlen(string) - strlen(tok);
31 return (n > 0 && STR_EQ(tok, string + n));
32@@ -329,3 +334,71 @@
33 }
34 return ((addr & mask) == net);
35 }
36+
37+#ifndef DISABLE_WILDCARD_MATCHING
38+/* Note: this feature has been adapted in a pretty straightforward way
39+ from Tatu Ylonen's last SSH version under free license by
40+ Pekka Savola <pekkas@netcore.fi>.
41+
42+ Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
43+*/
44+
45+/* Returns true if the given string matches the pattern (which may contain
46+ ? and * as wildcards), and zero if it does not match. */
47+
48+int match_pattern_ylo(const char *s, const char *pattern)
49+{
50+ while (1)
51+ {
52+ /* If at end of pattern, accept if also at end of string. */
53+ if (!*pattern)
54+ return !*s;
55+
56+ /* Process '*'. */
57+ if (*pattern == '*')
58+ {
59+ /* Skip the asterisk. */
60+ pattern++;
61+
62+ /* If at end of pattern, accept immediately. */
63+ if (!*pattern)
64+ return 1;
65+
66+ /* If next character in pattern is known, optimize. */
67+ if (*pattern != '?' && *pattern != '*')
68+ {
69+ /* Look instances of the next character in pattern, and try
70+ to match starting from those. */
71+ for (; *s; s++)
72+ if (*s == *pattern &&
73+ match_pattern_ylo(s + 1, pattern + 1))
74+ return 1;
75+ /* Failed. */
76+ return 0;
77+ }
78+
79+ /* Move ahead one character at a time and try to match at each
80+ position. */
81+ for (; *s; s++)
82+ if (match_pattern_ylo(s, pattern))
83+ return 1;
84+ /* Failed. */
85+ return 0;
86+ }
87+
88+ /* There must be at least one more character in the string. If we are
89+ at the end, fail. */
90+ if (!*s)
91+ return 0;
92+
93+ /* Check if the next character of the string is acceptable. */
94+ if (*pattern != '?' && *pattern != *s)
95+ return 0;
96+
97+ /* Move to the next character, both in string and in pattern. */
98+ s++;
99+ pattern++;
100+ }
101+ /*NOTREACHED*/
102+}
103+#endif /* DISABLE_WILDCARD_MATCHING */
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch
deleted file mode 100644
index d06aaef13b..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1* Mon Feb 5 2001 Preston Brown <pbrown@redhat.com>
2- fix gethostbyname to work better with dot "." notation (#16949)
3
4--- tcp_wrappers_7.6/socket.c.fixgethostbyname Fri Mar 21 13:27:25 1997
5+++ tcp_wrappers_7.6/socket.c Mon Feb 5 14:09:40 2001
6@@ -52,7 +52,8 @@
7 char *name;
8 {
9 char dot_name[MAXHOSTNAMELEN + 1];
10-
11+ struct hostent *hp;
12+
13 /*
14 * Don't append dots to unqualified names. Such names are likely to come
15 * from local hosts files or from NIS.
16@@ -61,8 +62,12 @@
17 if (strchr(name, '.') == 0 || strlen(name) >= MAXHOSTNAMELEN - 1) {
18 return (gethostbyname(name));
19 } else {
20- sprintf(dot_name, "%s.", name);
21- return (gethostbyname(dot_name));
22+ sprintf(dot_name, "%s.", name);
23+ hp = gethostbyname(dot_name);
24+ if (hp)
25+ return hp;
26+ else
27+ return (gethostbyname(name));
28 }
29 }
30
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch
deleted file mode 100644
index 5c8be5c27c..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch
+++ /dev/null
@@ -1,1253 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c
2--- tcp_wrappers_7.6.orig/fix_options.c 1997-04-08 02:29:19.000000000 +0200
3+++ tcp_wrappers_7.6/fix_options.c 2004-04-10 19:07:43.000000000 +0200
4@@ -11,6 +11,9 @@
5
6 #include <sys/types.h>
7 #include <sys/param.h>
8+#ifdef INET6
9+#include <sys/socket.h>
10+#endif
11 #include <netinet/in.h>
12 #include <netinet/in_systm.h>
13 #include <netinet/ip.h>
14@@ -41,6 +44,22 @@
15 unsigned int opt;
16 int optlen;
17 struct in_addr dummy;
18+#ifdef INET6
19+ struct sockaddr_storage ss;
20+ int sslen;
21+
22+ /*
23+ * check if this is AF_INET socket
24+ * XXX IPv6 support?
25+ */
26+ sslen = sizeof(ss);
27+ if (getsockname(fd, (struct sockaddr *)&ss, &sslen) < 0) {
28+ syslog(LOG_ERR, "getpeername: %m");
29+ clean_exit(request);
30+ }
31+ if (ss.ss_family != AF_INET)
32+ return;
33+#endif
34
35 if ((ip = getprotobyname("ip")) != 0)
36 ipproto = ip->p_proto;
37diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
38--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 19:22:58.000000000 +0200
39+++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 19:07:43.000000000 +0200
40@@ -85,11 +85,18 @@
41 for daemon process names or for client user names.
42 .IP \(bu
43 An expression of the form `n.n.n.n/m.m.m.m\' is interpreted as a
44-`net/mask\' pair. A host address is matched if `net\' is equal to the
45+`net/mask\' pair. An IPv4 host address is matched if `net\' is equal to the
46 bitwise AND of the address and the `mask\'. For example, the net/mask
47 pattern `131.155.72.0/255.255.254.0\' matches every address in the
48 range `131.155.72.0\' through `131.155.73.255\'.
49 .IP \(bu
50+An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a
51+`[net]/prefixlen\' pair. An IPv6 host address is matched if
52+`prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the
53+address. For example, the [net]/prefixlen pattern
54+`[3ffe:505:2:1::]/64\' matches every address in the range
55+`3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'.
56+.IP \(bu
57 Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This
58 method of matching cannot be used in conjunction with `net/mask\' matching,
59 hostname matching beginning with `.\' or IP address matching ending with `.\'.
60diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
61--- tcp_wrappers_7.6.orig/hosts_access.c 2004-04-10 19:22:58.000000000 +0200
62+++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 19:07:43.000000000 +0200
63@@ -24,7 +24,13 @@
64 /* System libraries. */
65
66 #include <sys/types.h>
67+#ifdef INT32_T
68+ typedef uint32_t u_int32_t;
69+#endif
70 #include <sys/param.h>
71+#ifdef INET6
72+#include <sys/socket.h>
73+#endif
74 #include <netinet/in.h>
75 #include <arpa/inet.h>
76 #include <stdio.h>
77@@ -33,6 +39,9 @@
78 #include <errno.h>
79 #include <setjmp.h>
80 #include <string.h>
81+#ifdef INET6
82+#include <netdb.h>
83+#endif
84
85 extern char *fgets();
86 extern int errno;
87@@ -82,6 +91,10 @@
88 static int host_match();
89 static int string_match();
90 static int masked_match();
91+#ifdef INET6
92+static int masked_match4();
93+static int masked_match6();
94+#endif
95
96 /* Size of logical line buffer. */
97
98@@ -289,6 +302,13 @@
99 {
100 int n;
101
102+#ifdef INET6
103+ /* convert IPv4 mapped IPv6 address to IPv4 address */
104+ if (STRN_EQ(string, "::ffff:", 7)
105+ && dot_quad_addr(string + 7) != INADDR_NONE) {
106+ string += 7;
107+ }
108+#endif
109 #ifndef DISABLE_WILDCARD_MATCHING
110 if (strchr(tok, '*') || strchr(tok,'?')) { /* contains '*' or '?' */
111 return (match_pattern_ylo(string,tok));
112@@ -304,20 +324,72 @@
113 } else if (tok[(n = strlen(tok)) - 1] == '.') { /* prefix */
114 return (STRN_EQ(tok, string, n));
115 } else { /* exact match */
116+#ifdef INET6
117+ struct addrinfo hints, *res;
118+ struct sockaddr_in6 pat, addr;
119+ int len, ret;
120+ char ch;
121+
122+ len = strlen(tok);
123+ if (*tok == '[' && tok[len - 1] == ']') {
124+ ch = tok[len - 1];
125+ tok[len - 1] = '\0';
126+ memset(&hints, 0, sizeof(hints));
127+ hints.ai_family = AF_INET6;
128+ hints.ai_socktype = SOCK_STREAM;
129+ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
130+ if ((ret = getaddrinfo(tok + 1, NULL, &hints, &res)) == 0) {
131+ memcpy(&pat, res->ai_addr, sizeof(pat));
132+ freeaddrinfo(res);
133+ }
134+ tok[len - 1] = ch;
135+ if (ret != 0 || getaddrinfo(string, NULL, &hints, &res) != 0)
136+ return NO;
137+ memcpy(&addr, res->ai_addr, sizeof(addr));
138+ freeaddrinfo(res);
139+#ifdef NI_WITHSCOPEID
140+ if (pat.sin6_scope_id != 0 &&
141+ addr.sin6_scope_id != pat.sin6_scope_id)
142+ return NO;
143+#endif
144+ return (!memcmp(&pat.sin6_addr, &addr.sin6_addr,
145+ sizeof(struct in6_addr)));
146+ return (ret);
147+ }
148+#endif
149 return (STR_EQ(tok, string));
150 }
151 }
152
153 /* masked_match - match address against netnumber/netmask */
154
155+#ifdef INET6
156 static int masked_match(net_tok, mask_tok, string)
157 char *net_tok;
158 char *mask_tok;
159 char *string;
160 {
161+ return (masked_match4(net_tok, mask_tok, string) ||
162+ masked_match6(net_tok, mask_tok, string));
163+}
164+
165+static int masked_match4(net_tok, mask_tok, string)
166+#else
167+static int masked_match(net_tok, mask_tok, string)
168+#endif
169+char *net_tok;
170+char *mask_tok;
171+char *string;
172+{
173+#ifdef INET6
174+ u_int32_t net;
175+ u_int32_t mask;
176+ u_int32_t addr;
177+#else
178 unsigned long net;
179 unsigned long mask;
180 unsigned long addr;
181+#endif
182
183 /*
184 * Disallow forms other than dotted quad: the treatment that inet_addr()
185@@ -329,12 +401,78 @@
186 return (NO);
187 if ((net = dot_quad_addr(net_tok)) == INADDR_NONE
188 || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) {
189+#ifndef INET6
190 tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok);
191+#endif
192 return (NO); /* not tcpd_jump() */
193 }
194 return ((addr & mask) == net);
195 }
196
197+#ifdef INET6
198+static int masked_match6(net_tok, mask_tok, string)
199+char *net_tok;
200+char *mask_tok;
201+char *string;
202+{
203+ struct addrinfo hints, *res;
204+ struct sockaddr_in6 net, addr;
205+ u_int32_t mask;
206+ int len, mask_len, i = 0;
207+ char ch;
208+
209+ memset(&hints, 0, sizeof(hints));
210+ hints.ai_family = AF_INET6;
211+ hints.ai_socktype = SOCK_STREAM;
212+ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
213+ if (getaddrinfo(string, NULL, &hints, &res) != 0)
214+ return NO;
215+ memcpy(&addr, res->ai_addr, sizeof(addr));
216+ freeaddrinfo(res);
217+
218+ if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) {
219+ if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE
220+ || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE)
221+ return (NO);
222+ return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]);
223+ }
224+
225+ /* match IPv6 address against netnumber/prefixlen */
226+ len = strlen(net_tok);
227+ if (*net_tok != '[' || net_tok[len - 1] != ']')
228+ return NO;
229+ ch = net_tok[len - 1];
230+ net_tok[len - 1] = '\0';
231+ if (getaddrinfo(net_tok + 1, NULL, &hints, &res) != 0) {
232+ net_tok[len - 1] = ch;
233+ return NO;
234+ }
235+ memcpy(&net, res->ai_addr, sizeof(net));
236+ freeaddrinfo(res);
237+ net_tok[len - 1] = ch;
238+ if ((mask_len = atoi(mask_tok)) < 0 || mask_len > 128)
239+ return NO;
240+
241+#ifdef NI_WITHSCOPEID
242+ if (net.sin6_scope_id != 0 && addr.sin6_scope_id != net.sin6_scope_id)
243+ return NO;
244+#endif
245+ while (mask_len > 0) {
246+ if (mask_len < 32) {
247+ mask = htonl(~(0xffffffff >> mask_len));
248+ if ((*(u_int32_t *)&addr.sin6_addr.s6_addr[i] & mask) != (*(u_int32_t *)&net.sin6_addr.s6_addr[i] & mask))
249+ return NO;
250+ break;
251+ }
252+ if (*(u_int32_t *)&addr.sin6_addr.s6_addr[i] != *(u_int32_t *)&net.sin6_addr.s6_addr[i])
253+ return NO;
254+ i += 4;
255+ mask_len -= 32;
256+ }
257+ return YES;
258+}
259+#endif /* INET6 */
260+
261 #ifndef DISABLE_WILDCARD_MATCHING
262 /* Note: this feature has been adapted in a pretty straightforward way
263 from Tatu Ylonen's last SSH version under free license by
264diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
265--- tcp_wrappers_7.6.orig/Makefile 1997-03-21 19:27:21.000000000 +0100
266+++ tcp_wrappers_7.6/Makefile 2004-04-10 19:22:44.000000000 +0200
267@@ -21,7 +21,7 @@
268 @echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix"
269 @echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211"
270 @echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4"
271- @echo " sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
272+ @echo " sunos40 sunos5 solaris8 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
273 @echo " uts215 uxp"
274 @echo
275 @echo "If none of these match your environment, edit the system"
276@@ -131,20 +131,34 @@
277 NETGROUP=-DNETGROUP TLI= SYSTYPE="-systype bsd43" all
278
279 # Freebsd and linux by default have no NIS.
280-386bsd netbsd bsdos:
281+386bsd bsdos:
282 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
283 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
284 EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
285
286 freebsd:
287 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
288+ LIBS="-L/usr/local/v6/lib -linet6" \
289 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
290- EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
291+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" \
292+ VSYSLOG= all
293+
294+netbsd:
295+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
296+ LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
297+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" VSYSLOG= all
298
299 linux:
300 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
301- LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
302- NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
303+ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
304+ NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \
305+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
306+
307+gnu:
308+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
309+ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
310+ NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \
311+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all
312
313 # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
314 hpux hpux8 hpux9 hpux10:
315@@ -196,6 +210,13 @@
316 NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
317 BUGS="$(BUGS) -DSOLARIS_24_GETHOSTBYNAME_BUG" all
318
319+# SunOS 5.8 is another SYSV4 variant, but has IPv6 support
320+solaris8:
321+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
322+ LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \
323+ NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
324+ EXTRA_CFLAGS="-DINET6 -DNO_CLONE_DEVICE -DINT32_T" all
325+
326 # Generic SYSV40
327 esix sysv4:
328 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
329diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
330--- tcp_wrappers_7.6.orig/misc.c 1996-02-11 17:01:30.000000000 +0100
331+++ tcp_wrappers_7.6/misc.c 2004-04-10 19:07:43.000000000 +0200
332@@ -58,9 +58,31 @@
333 {
334 char *cp;
335
336+#ifdef INET6
337+ int bracket = 0;
338+
339+ for (cp = string; cp && *cp; cp++) {
340+ switch (*cp) {
341+ case '[':
342+ bracket++;
343+ break;
344+ case ']':
345+ bracket--;
346+ break;
347+ default:
348+ if (bracket == 0 && *cp == delimiter) {
349+ *cp++ = 0;
350+ return cp;
351+ }
352+ break;
353+ }
354+ }
355+ return (NULL);
356+#else
357 if ((cp = strchr(string, delimiter)) != 0)
358 *cp++ = 0;
359 return (cp);
360+#endif
361 }
362
363 /* dot_quad_addr - convert dotted quad to internal form */
364diff -ruN tcp_wrappers_7.6.orig/refuse.c tcp_wrappers_7.6/refuse.c
365--- tcp_wrappers_7.6.orig/refuse.c 1994-12-28 17:42:40.000000000 +0100
366+++ tcp_wrappers_7.6/refuse.c 2004-04-10 19:07:43.000000000 +0200
367@@ -25,7 +25,12 @@
368 void refuse(request)
369 struct request_info *request;
370 {
371+#ifdef INET6
372+ syslog(deny_severity, "refused connect from %s (%s)",
373+ eval_client(request), eval_hostaddr(request->client));
374+#else
375 syslog(deny_severity, "refused connect from %s", eval_client(request));
376+#endif
377 clean_exit(request);
378 /* NOTREACHED */
379 }
380diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
381--- tcp_wrappers_7.6.orig/rfc931.c 1995-01-02 16:11:34.000000000 +0100
382+++ tcp_wrappers_7.6/rfc931.c 2004-04-10 19:07:43.000000000 +0200
383@@ -68,20 +68,50 @@
384 /* rfc931 - return remote user name, given socket structures */
385
386 void rfc931(rmt_sin, our_sin, dest)
387+#ifdef INET6
388+struct sockaddr *rmt_sin;
389+struct sockaddr *our_sin;
390+#else
391 struct sockaddr_in *rmt_sin;
392 struct sockaddr_in *our_sin;
393+#endif
394 char *dest;
395 {
396 unsigned rmt_port;
397 unsigned our_port;
398+#ifdef INET6
399+ struct sockaddr_storage rmt_query_sin;
400+ struct sockaddr_storage our_query_sin;
401+ int alen;
402+#else
403 struct sockaddr_in rmt_query_sin;
404 struct sockaddr_in our_query_sin;
405+#endif
406 char user[256]; /* XXX */
407 char buffer[512]; /* XXX */
408 char *cp;
409 char *result = unknown;
410 FILE *fp;
411
412+#ifdef INET6
413+ /* address family must be the same */
414+ if (rmt_sin->sa_family != our_sin->sa_family) {
415+ STRN_CPY(dest, result, STRING_LENGTH);
416+ return;
417+ }
418+ switch (our_sin->sa_family) {
419+ case AF_INET:
420+ alen = sizeof(struct sockaddr_in);
421+ break;
422+ case AF_INET6:
423+ alen = sizeof(struct sockaddr_in6);
424+ break;
425+ default:
426+ STRN_CPY(dest, result, STRING_LENGTH);
427+ return;
428+ }
429+#endif
430+
431 /*
432 * Use one unbuffered stdio stream for writing to and for reading from
433 * the RFC931 etc. server. This is done because of a bug in the SunOS
434@@ -92,7 +122,11 @@
435 * sockets.
436 */
437
438+#ifdef INET6
439+ if ((fp = fsocket(our_sin->sa_family, SOCK_STREAM, 0)) != 0) {
440+#else
441 if ((fp = fsocket(AF_INET, SOCK_STREAM, 0)) != 0) {
442+#endif
443 setbuf(fp, (char *) 0);
444
445 /*
446@@ -112,6 +146,25 @@
447 * addresses from the query socket.
448 */
449
450+#ifdef INET6
451+ memcpy(&our_query_sin, our_sin, alen);
452+ memcpy(&rmt_query_sin, rmt_sin, alen);
453+ switch (our_sin->sa_family) {
454+ case AF_INET:
455+ ((struct sockaddr_in *)&our_query_sin)->sin_port = htons(ANY_PORT);
456+ ((struct sockaddr_in *)&rmt_query_sin)->sin_port = htons(RFC931_PORT);
457+ break;
458+ case AF_INET6:
459+ ((struct sockaddr_in6 *)&our_query_sin)->sin6_port = htons(ANY_PORT);
460+ ((struct sockaddr_in6 *)&rmt_query_sin)->sin6_port = htons(RFC931_PORT);
461+ break;
462+ }
463+
464+ if (bind(fileno(fp), (struct sockaddr *) & our_query_sin,
465+ alen) >= 0 &&
466+ connect(fileno(fp), (struct sockaddr *) & rmt_query_sin,
467+ alen) >= 0) {
468+#else
469 our_query_sin = *our_sin;
470 our_query_sin.sin_port = htons(ANY_PORT);
471 rmt_query_sin = *rmt_sin;
472@@ -121,6 +174,7 @@
473 sizeof(our_query_sin)) >= 0 &&
474 connect(fileno(fp), (struct sockaddr *) & rmt_query_sin,
475 sizeof(rmt_query_sin)) >= 0) {
476+#endif
477
478 /*
479 * Send query to server. Neglect the risk that a 13-byte
480@@ -129,8 +183,13 @@
481 */
482
483 fprintf(fp, "%u,%u\r\n",
484+#ifdef INET6
485+ ntohs(((struct sockaddr_in *)rmt_sin)->sin_port),
486+ ntohs(((struct sockaddr_in *)our_sin)->sin_port));
487+#else
488 ntohs(rmt_sin->sin_port),
489 ntohs(our_sin->sin_port));
490+#endif
491 fflush(fp);
492
493 /*
494@@ -144,8 +203,13 @@
495 && ferror(fp) == 0 && feof(fp) == 0
496 && sscanf(buffer, "%u , %u : USERID :%*[^:]:%255s",
497 &rmt_port, &our_port, user) == 3
498+#ifdef INET6
499+ && ntohs(((struct sockaddr_in *)rmt_sin)->sin_port) == rmt_port
500+ && ntohs(((struct sockaddr_in *)our_sin)->sin_port) == our_port) {
501+#else
502 && ntohs(rmt_sin->sin_port) == rmt_port
503 && ntohs(our_sin->sin_port) == our_port) {
504+#endif
505
506 /*
507 * Strip trailing carriage return. It is part of the
508diff -ruN tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
509--- tcp_wrappers_7.6.orig/scaffold.c 1997-03-21 19:27:24.000000000 +0100
510+++ tcp_wrappers_7.6/scaffold.c 2004-04-10 19:07:43.000000000 +0200
511@@ -25,7 +25,9 @@
512 #define INADDR_NONE (-1) /* XXX should be 0xffffffff */
513 #endif
514
515+#ifndef INET6
516 extern char *malloc();
517+#endif
518
519 /* Application-specific. */
520
521@@ -39,6 +41,7 @@
522 int deny_severity = LOG_WARNING;
523 int rfc931_timeout = RFC931_TIMEOUT;
524
525+#ifndef INET6
526 /* dup_hostent - create hostent in one memory block */
527
528 static struct hostent *dup_hostent(hp)
529@@ -73,9 +76,46 @@
530 }
531 return (&hb->host);
532 }
533+#endif
534
535 /* find_inet_addr - find all addresses for this host, result to free() */
536
537+#ifdef INET6
538+struct addrinfo *find_inet_addr(host)
539+char *host;
540+{
541+ struct addrinfo hints, *res;
542+
543+ memset(&hints, 0, sizeof(hints));
544+ hints.ai_family = PF_UNSPEC;
545+ hints.ai_socktype = SOCK_STREAM;
546+ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
547+ if (getaddrinfo(host, NULL, &hints, &res) == 0)
548+ return (res);
549+
550+ memset(&hints, 0, sizeof(hints));
551+ hints.ai_family = PF_UNSPEC;
552+ hints.ai_socktype = SOCK_STREAM;
553+ hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
554+ if (getaddrinfo(host, NULL, &hints, &res) != 0) {
555+ tcpd_warn("%s: host not found", host);
556+ return (0);
557+ }
558+ if (res->ai_family != AF_INET6 && res->ai_family != AF_INET) {
559+ tcpd_warn("%d: not an internet host", res->ai_family);
560+ freeaddrinfo(res);
561+ return (0);
562+ }
563+ if (!res->ai_canonname) {
564+ tcpd_warn("%s: hostname alias", host);
565+ tcpd_warn("(cannot obtain official name)", res->ai_canonname);
566+ } else if (STR_NE(host, res->ai_canonname)) {
567+ tcpd_warn("%s: hostname alias", host);
568+ tcpd_warn("(official name: %.*s)", STRING_LENGTH, res->ai_canonname);
569+ }
570+ return (res);
571+}
572+#else
573 struct hostent *find_inet_addr(host)
574 char *host;
575 {
576@@ -118,6 +158,7 @@
577 }
578 return (dup_hostent(hp));
579 }
580+#endif
581
582 /* check_dns - give each address thorough workout, return address count */
583
584@@ -125,8 +166,13 @@
585 char *host;
586 {
587 struct request_info request;
588+#ifdef INET6
589+ struct sockaddr_storage sin;
590+ struct addrinfo *hp, *res;
591+#else
592 struct sockaddr_in sin;
593 struct hostent *hp;
594+#endif
595 int count;
596 char *addr;
597
598@@ -134,11 +180,18 @@
599 return (0);
600 request_init(&request, RQ_CLIENT_SIN, &sin, 0);
601 sock_methods(&request);
602+#ifndef INET6
603 memset((char *) &sin, 0, sizeof(sin));
604 sin.sin_family = AF_INET;
605+#endif
606
607+#ifdef INET6
608+ for (res = hp, count = 0; res; res = res->ai_next, count++) {
609+ memcpy(&sin, res->ai_addr, res->ai_addrlen);
610+#else
611 for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
612 memcpy((char *) &sin.sin_addr, addr, sizeof(sin.sin_addr));
613+#endif
614
615 /*
616 * Force host name and address conversions. Use the request structure
617@@ -151,7 +204,11 @@
618 tcpd_warn("host address %s->name lookup failed",
619 eval_hostaddr(request.client));
620 }
621+#ifdef INET6
622+ freeaddrinfo(hp);
623+#else
624 free((char *) hp);
625+#endif
626 return (count);
627 }
628
629diff -ruN tcp_wrappers_7.6.orig/scaffold.h tcp_wrappers_7.6/scaffold.h
630--- tcp_wrappers_7.6.orig/scaffold.h 1994-12-31 18:19:20.000000000 +0100
631+++ tcp_wrappers_7.6/scaffold.h 2004-04-10 19:07:43.000000000 +0200
632@@ -4,6 +4,10 @@
633 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
634 */
635
636+#ifdef INET6
637+extern struct addrinfo *find_inet_addr();
638+#else
639 extern struct hostent *find_inet_addr();
640+#endif
641 extern int check_dns();
642 extern int check_path();
643diff -ruN tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
644--- tcp_wrappers_7.6.orig/socket.c 2004-04-10 19:22:58.000000000 +0200
645+++ tcp_wrappers_7.6/socket.c 2004-04-10 19:07:43.000000000 +0200
646@@ -24,13 +24,22 @@
647 #include <sys/types.h>
648 #include <sys/param.h>
649 #include <sys/socket.h>
650+#ifdef INT32_T
651+typedef uint32_t u_int32_t;
652+#endif
653 #include <netinet/in.h>
654 #include <netdb.h>
655 #include <stdio.h>
656 #include <syslog.h>
657 #include <string.h>
658
659+#ifdef INET6
660+#ifndef NI_WITHSCOPEID
661+#define NI_WITHSCOPEID 0
662+#endif
663+#else
664 extern char *inet_ntoa();
665+#endif
666
667 /* Local stuff. */
668
669@@ -79,8 +88,13 @@
670 void sock_host(request)
671 struct request_info *request;
672 {
673+#ifdef INET6
674+ static struct sockaddr_storage client;
675+ static struct sockaddr_storage server;
676+#else
677 static struct sockaddr_in client;
678 static struct sockaddr_in server;
679+#endif
680 int len;
681 char buf[BUFSIZ];
682 int fd = request->fd;
683@@ -109,7 +123,11 @@
684 memset(buf, 0 sizeof(buf));
685 #endif
686 }
687+#ifdef INET6
688+ request->client->sin = (struct sockaddr *)&client;
689+#else
690 request->client->sin = &client;
691+#endif
692
693 /*
694 * Determine the server binding. This is used for client username
695@@ -122,7 +140,11 @@
696 tcpd_warn("getsockname: %m");
697 return;
698 }
699+#ifdef INET6
700+ request->server->sin = (struct sockaddr *)&server;
701+#else
702 request->server->sin = &server;
703+#endif
704 }
705
706 /* sock_hostaddr - map endpoint address to printable form */
707@@ -130,10 +152,26 @@
708 void sock_hostaddr(host)
709 struct host_info *host;
710 {
711+#ifdef INET6
712+ struct sockaddr *sin = host->sin;
713+ int salen;
714+
715+ if (!sin)
716+ return;
717+#ifdef SIN6_LEN
718+ salen = sin->sa_len;
719+#else
720+ salen = (sin->sa_family == AF_INET) ? sizeof(struct sockaddr_in)
721+ : sizeof(struct sockaddr_in6);
722+#endif
723+ getnameinfo(sin, salen, host->addr, sizeof(host->addr),
724+ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
725+#else
726 struct sockaddr_in *sin = host->sin;
727
728 if (sin != 0)
729 STRN_CPY(host->addr, inet_ntoa(sin->sin_addr), sizeof(host->addr));
730+#endif
731 }
732
733 /* sock_hostname - map endpoint address to host name */
734@@ -141,6 +179,160 @@
735 void sock_hostname(host)
736 struct host_info *host;
737 {
738+#ifdef INET6
739+ struct sockaddr *sin = host->sin;
740+ struct sockaddr_in sin4;
741+ struct addrinfo hints, *res, *res0 = NULL;
742+ int salen, alen, err = 1;
743+ char *ap = NULL, *rap, hname[NI_MAXHOST];
744+
745+ if (sin != NULL) {
746+ if (sin->sa_family == AF_INET6) {
747+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sin;
748+
749+ if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
750+ memset(&sin4, 0, sizeof(sin4));
751+#ifdef SIN6_LEN
752+ sin4.sin_len = sizeof(sin4);
753+#endif
754+ sin4.sin_family = AF_INET;
755+ sin4.sin_port = sin6->sin6_port;
756+ sin4.sin_addr.s_addr = *(u_int32_t *)&sin6->sin6_addr.s6_addr[12];
757+ sin = (struct sockaddr *)&sin4;
758+ }
759+ }
760+ switch (sin->sa_family) {
761+ case AF_INET:
762+ ap = (char *)&((struct sockaddr_in *)sin)->sin_addr;
763+ alen = sizeof(struct in_addr);
764+ salen = sizeof(struct sockaddr_in);
765+ break;
766+ case AF_INET6:
767+ ap = (char *)&((struct sockaddr_in6 *)sin)->sin6_addr;
768+ alen = sizeof(struct in6_addr);
769+ salen = sizeof(struct sockaddr_in6);
770+ break;
771+ default:
772+ break;
773+ }
774+ if (ap)
775+ err = getnameinfo(sin, salen, hname, sizeof(hname),
776+ NULL, 0, NI_WITHSCOPEID | NI_NAMEREQD);
777+ }
778+ if (!err) {
779+
780+ STRN_CPY(host->name, hname, sizeof(host->name));
781+
782+ /* reject numeric addresses */
783+ memset(&hints, 0, sizeof(hints));
784+ hints.ai_family = sin->sa_family;
785+ hints.ai_socktype = SOCK_STREAM;
786+ hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST;
787+ if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) {
788+ freeaddrinfo(res0);
789+ res0 = NULL;
790+ tcpd_warn("host name/name mismatch: "
791+ "reverse lookup results in non-FQDN %s",
792+ host->name);
793+ strcpy(host->name, paranoid); /* name is bad, clobber it */
794+ }
795+ err = !err;
796+ }
797+ if (!err) {
798+ /* we are now sure that this is non-numeric */
799+
800+ /*
801+ * Verify that the address is a member of the address list returned
802+ * by gethostbyname(hostname).
803+ *
804+ * Verify also that gethostbyaddr() and gethostbyname() return the same
805+ * hostname, or rshd and rlogind may still end up being spoofed.
806+ *
807+ * On some sites, gethostbyname("localhost") returns "localhost.domain".
808+ * This is a DNS artefact. We treat it as a special case. When we
809+ * can't believe the address list from gethostbyname("localhost")
810+ * we're in big trouble anyway.
811+ */
812+
813+ memset(&hints, 0, sizeof(hints));
814+ hints.ai_family = sin->sa_family;
815+ hints.ai_socktype = SOCK_STREAM;
816+ hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
817+ if (getaddrinfo(host->name, NULL, &hints, &res0) != 0) {
818+
819+ /*
820+ * Unable to verify that the host name matches the address. This
821+ * may be a transient problem or a botched name server setup.
822+ */
823+
824+ tcpd_warn("can't verify hostname: getaddrinfo(%s, %s) failed",
825+ host->name,
826+ (sin->sa_family == AF_INET) ? "AF_INET" : "AF_INET6");
827+
828+ } else if ((res0->ai_canonname == NULL
829+ || STR_NE(host->name, res0->ai_canonname))
830+ && STR_NE(host->name, "localhost")) {
831+
832+ /*
833+ * The gethostbyaddr() and gethostbyname() calls did not return
834+ * the same hostname. This could be a nameserver configuration
835+ * problem. It could also be that someone is trying to spoof us.
836+ */
837+
838+ tcpd_warn("host name/name mismatch: %s != %.*s",
839+ host->name, STRING_LENGTH,
840+ (res0->ai_canonname == NULL) ? "" : res0->ai_canonname);
841+
842+ } else {
843+
844+ /*
845+ * The address should be a member of the address list returned by
846+ * gethostbyname(). We should first verify that the h_addrtype
847+ * field is AF_INET, but this program has already caused too much
848+ * grief on systems with broken library code.
849+ */
850+
851+ for (res = res0; res; res = res->ai_next) {
852+ if (res->ai_family != sin->sa_family)
853+ continue;
854+ switch (res->ai_family) {
855+ case AF_INET:
856+ rap = (char *)&((struct sockaddr_in *)res->ai_addr)->sin_addr;
857+ break;
858+ case AF_INET6:
859+ /* need to check scope_id */
860+ if (((struct sockaddr_in6 *)sin)->sin6_scope_id !=
861+ ((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id) {
862+ continue;
863+ }
864+ rap = (char *)&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr;
865+ break;
866+ default:
867+ continue;
868+ }
869+ if (memcmp(rap, ap, alen) == 0) {
870+ freeaddrinfo(res0);
871+ return; /* name is good, keep it */
872+ }
873+ }
874+
875+ /*
876+ * The host name does not map to the initial address. Perhaps
877+ * someone has messed up. Perhaps someone compromised a name
878+ * server.
879+ */
880+
881+ getnameinfo(sin, salen, hname, sizeof(hname),
882+ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
883+ tcpd_warn("host name/address mismatch: %s != %.*s",
884+ hname, STRING_LENGTH,
885+ (res0->ai_canonname == NULL) ? "" : res0->ai_canonname);
886+ }
887+ strcpy(host->name, paranoid); /* name is bad, clobber it */
888+ if (res0)
889+ freeaddrinfo(res0);
890+ }
891+#else /* INET6 */
892 struct sockaddr_in *sin = host->sin;
893 struct hostent *hp;
894 int i;
895@@ -220,6 +412,7 @@
896 }
897 strcpy(host->name, paranoid); /* name is bad, clobber it */
898 }
899+#endif /* INET6 */
900 }
901
902 /* sock_sink - absorb unreceived IP datagram */
903@@ -228,7 +421,11 @@
904 int fd;
905 {
906 char buf[BUFSIZ];
907+#ifdef INET6
908+ struct sockaddr_storage sin;
909+#else
910 struct sockaddr_in sin;
911+#endif
912 int size = sizeof(sin);
913
914 /*
915diff -ruN tcp_wrappers_7.6.orig/tcpd.c tcp_wrappers_7.6/tcpd.c
916--- tcp_wrappers_7.6.orig/tcpd.c 1996-02-11 17:01:33.000000000 +0100
917+++ tcp_wrappers_7.6/tcpd.c 2004-04-10 19:07:43.000000000 +0200
918@@ -120,7 +120,12 @@
919
920 /* Report request and invoke the real daemon program. */
921
922+#ifdef INET6
923+ syslog(allow_severity, "connect from %s (%s)",
924+ eval_client(&request), eval_hostaddr(request.client));
925+#else
926 syslog(allow_severity, "connect from %s", eval_client(&request));
927+#endif
928 closelog();
929 (void) execv(path, argv);
930 syslog(LOG_ERR, "error: cannot execute %s: %m", path);
931diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
932--- tcp_wrappers_7.6.orig/tcpdchk.c 1997-02-12 02:13:25.000000000 +0100
933+++ tcp_wrappers_7.6/tcpdchk.c 2004-04-10 19:07:43.000000000 +0200
934@@ -22,6 +22,9 @@
935
936 #include <sys/types.h>
937 #include <sys/stat.h>
938+#ifdef INET6
939+#include <sys/socket.h>
940+#endif
941 #include <netinet/in.h>
942 #include <arpa/inet.h>
943 #include <stdio.h>
944@@ -397,6 +400,31 @@
945 }
946 }
947
948+#ifdef INET6
949+static int is_inet6_addr(pat)
950+ char *pat;
951+{
952+ struct addrinfo hints, *res;
953+ int len, ret;
954+ char ch;
955+
956+ if (*pat != '[')
957+ return (0);
958+ len = strlen(pat);
959+ if ((ch = pat[len - 1]) != ']')
960+ return (0);
961+ pat[len - 1] = '\0';
962+ memset(&hints, 0, sizeof(hints));
963+ hints.ai_family = AF_INET6;
964+ hints.ai_socktype = SOCK_STREAM;
965+ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
966+ if ((ret = getaddrinfo(pat + 1, NULL, &hints, &res)) == 0)
967+ freeaddrinfo(res);
968+ pat[len - 1] = ch;
969+ return (ret == 0);
970+}
971+#endif
972+
973 /* check_host - criticize host pattern */
974
975 static int check_host(pat)
976@@ -423,14 +451,27 @@
977 #endif
978 #endif
979 } else if (mask = split_at(pat, '/')) { /* network/netmask */
980+#ifdef INET6
981+ int mask_len;
982+
983+ if ((dot_quad_addr(pat) == INADDR_NONE
984+ || dot_quad_addr(mask) == INADDR_NONE)
985+ && (!is_inet6_addr(pat)
986+ || ((mask_len = atoi(mask)) < 0 || mask_len > 128)))
987+#else
988 if (dot_quad_addr(pat) == INADDR_NONE
989 || dot_quad_addr(mask) == INADDR_NONE)
990+#endif
991 tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
992 } else if (STR_EQ(pat, "FAIL")) { /* obsolete */
993 tcpd_warn("FAIL is no longer recognized");
994 tcpd_warn("(use EXCEPT or DENY instead)");
995 } else if (reserved_name(pat)) { /* other reserved */
996 /* void */ ;
997+#ifdef INET6
998+ } else if (is_inet6_addr(pat)) { /* IPv6 address */
999+ addr_count = 1;
1000+#endif
1001 } else if (NOT_INADDR(pat)) { /* internet name */
1002 if (pat[strlen(pat) - 1] == '.') {
1003 tcpd_warn("%s: domain or host name ends in dot", pat);
1004diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
1005--- tcp_wrappers_7.6.orig/tcpd.h 1996-03-19 16:22:25.000000000 +0100
1006+++ tcp_wrappers_7.6/tcpd.h 2004-04-10 19:07:43.000000000 +0200
1007@@ -11,7 +11,11 @@
1008 struct host_info {
1009 char name[STRING_LENGTH]; /* access via eval_hostname(host) */
1010 char addr[STRING_LENGTH]; /* access via eval_hostaddr(host) */
1011+#ifdef INET6
1012+ struct sockaddr *sin; /* socket address or 0 */
1013+#else
1014 struct sockaddr_in *sin; /* socket address or 0 */
1015+#endif
1016 struct t_unitdata *unit; /* TLI transport address or 0 */
1017 struct request_info *request; /* for shared information */
1018 };
1019diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.c tcp_wrappers_7.6/tcpdmatch.c
1020--- tcp_wrappers_7.6.orig/tcpdmatch.c 1996-02-11 17:01:36.000000000 +0100
1021+++ tcp_wrappers_7.6/tcpdmatch.c 2004-04-10 19:07:43.000000000 +0200
1022@@ -57,7 +57,11 @@
1023 int argc;
1024 char **argv;
1025 {
1026+#ifdef INET6
1027+ struct addrinfo hints, *hp, *res;
1028+#else
1029 struct hostent *hp;
1030+#endif
1031 char *myname = argv[0];
1032 char *client;
1033 char *server;
1034@@ -68,8 +72,13 @@
1035 int ch;
1036 char *inetcf = 0;
1037 int count;
1038+#ifdef INET6
1039+ struct sockaddr_storage server_sin;
1040+ struct sockaddr_storage client_sin;
1041+#else
1042 struct sockaddr_in server_sin;
1043 struct sockaddr_in client_sin;
1044+#endif
1045 struct stat st;
1046
1047 /*
1048@@ -172,13 +181,20 @@
1049 if (NOT_INADDR(server) == 0 || HOSTNAME_KNOWN(server)) {
1050 if ((hp = find_inet_addr(server)) == 0)
1051 exit(1);
1052+#ifndef INET6
1053 memset((char *) &server_sin, 0, sizeof(server_sin));
1054 server_sin.sin_family = AF_INET;
1055+#endif
1056 request_set(&request, RQ_SERVER_SIN, &server_sin, 0);
1057
1058+#ifdef INET6
1059+ for (res = hp, count = 0; res; res = res->ai_next, count++) {
1060+ memcpy(&server_sin, res->ai_addr, res->ai_addrlen);
1061+#else
1062 for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
1063 memcpy((char *) &server_sin.sin_addr, addr,
1064 sizeof(server_sin.sin_addr));
1065+#endif
1066
1067 /*
1068 * Force evaluation of server host name and address. Host name
1069@@ -194,7 +210,11 @@
1070 fprintf(stderr, "Please specify an address instead\n");
1071 exit(1);
1072 }
1073+#ifdef INET6
1074+ freeaddrinfo(hp);
1075+#else
1076 free((char *) hp);
1077+#endif
1078 } else {
1079 request_set(&request, RQ_SERVER_NAME, server, 0);
1080 }
1081@@ -208,6 +228,18 @@
1082 tcpdmatch(&request);
1083 exit(0);
1084 }
1085+#ifdef INET6
1086+ memset(&hints, 0, sizeof(hints));
1087+ hints.ai_family = AF_INET6;
1088+ hints.ai_socktype = SOCK_STREAM;
1089+ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
1090+ if (getaddrinfo(client, NULL, &hints, &res) == 0) {
1091+ freeaddrinfo(res);
1092+ request_set(&request, RQ_CLIENT_ADDR, client, 0);
1093+ tcpdmatch(&request);
1094+ exit(0);
1095+ }
1096+#endif
1097
1098 /*
1099 * Perhaps they are testing special client hostname patterns that aren't
1100@@ -229,6 +261,34 @@
1101 */
1102 if ((hp = find_inet_addr(client)) == 0)
1103 exit(1);
1104+#ifdef INET6
1105+ request_set(&request, RQ_CLIENT_SIN, &client_sin, 0);
1106+
1107+ for (res = hp, count = 0; res; res = res->ai_next, count++) {
1108+ memcpy(&client_sin, res->ai_addr, res->ai_addrlen);
1109+
1110+ /*
1111+ * getnameinfo() doesn't do reverse lookup against link-local
1112+ * address. So, we pass through host name evaluation against
1113+ * such addresses.
1114+ */
1115+ if (res->ai_family != AF_INET6 ||
1116+ !IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr)) {
1117+ /*
1118+ * Force evaluation of client host name and address. Host name
1119+ * conflicts will be reported while eval_hostname() does its job.
1120+ */
1121+ request_set(&request, RQ_CLIENT_NAME, "", RQ_CLIENT_ADDR, "", 0);
1122+ if (STR_EQ(eval_hostname(request.client), unknown))
1123+ tcpd_warn("host address %s->name lookup failed",
1124+ eval_hostaddr(request.client));
1125+ }
1126+ tcpdmatch(&request);
1127+ if (res->ai_next)
1128+ printf("\n");
1129+ }
1130+ freeaddrinfo(hp);
1131+#else
1132 memset((char *) &client_sin, 0, sizeof(client_sin));
1133 client_sin.sin_family = AF_INET;
1134 request_set(&request, RQ_CLIENT_SIN, &client_sin, 0);
1135@@ -250,6 +310,7 @@
1136 printf("\n");
1137 }
1138 free((char *) hp);
1139+#endif
1140 exit(0);
1141 }
1142
1143diff -ruN tcp_wrappers_7.6.orig/tli.c tcp_wrappers_7.6/tli.c
1144--- tcp_wrappers_7.6.orig/tli.c 1997-03-21 19:27:26.000000000 +0100
1145+++ tcp_wrappers_7.6/tli.c 2004-04-10 19:07:43.000000000 +0200
1146@@ -65,8 +65,13 @@
1147 void tli_host(request)
1148 struct request_info *request;
1149 {
1150+#ifdef INET6
1151+ static struct sockaddr_storage client;
1152+ static struct sockaddr_storage server;
1153+#else
1154 static struct sockaddr_in client;
1155 static struct sockaddr_in server;
1156+#endif
1157
1158 /*
1159 * If we discover that we are using an IP transport, pretend we never
1160@@ -76,14 +81,29 @@
1161
1162 tli_endpoints(request);
1163 if ((request->config = tli_transport(request->fd)) != 0
1164+#ifdef INET6
1165+ && (STR_EQ(request->config->nc_protofmly, "inet") ||
1166+ STR_EQ(request->config->nc_protofmly, "inet6"))) {
1167+#else
1168 && STR_EQ(request->config->nc_protofmly, "inet")) {
1169+#endif
1170 if (request->client->unit != 0) {
1171+#ifdef INET6
1172+ client = *(struct sockaddr_storage *) request->client->unit->addr.buf;
1173+ request->client->sin = (struct sockaddr *) &client;
1174+#else
1175 client = *(struct sockaddr_in *) request->client->unit->addr.buf;
1176 request->client->sin = &client;
1177+#endif
1178 }
1179 if (request->server->unit != 0) {
1180+#ifdef INET6
1181+ server = *(struct sockaddr_storage *) request->server->unit->addr.buf;
1182+ request->server->sin = (struct sockaddr *) &server;
1183+#else
1184 server = *(struct sockaddr_in *) request->server->unit->addr.buf;
1185 request->server->sin = &server;
1186+#endif
1187 }
1188 tli_cleanup(request);
1189 sock_methods(request);
1190@@ -187,7 +207,15 @@
1191 }
1192 while (config = getnetconfig(handlep)) {
1193 if (stat(config->nc_device, &from_config) == 0) {
1194+#ifdef NO_CLONE_DEVICE
1195+ /*
1196+ * If the network devices are not cloned (as is the case for
1197+ * Solaris 8 Beta), we must compare the major device numbers.
1198+ */
1199+ if (major(from_config.st_rdev) == major(from_client.st_rdev))
1200+#else
1201 if (minor(from_config.st_rdev) == major(from_client.st_rdev))
1202+#endif
1203 break;
1204 }
1205 }
1206diff -ruN tcp_wrappers_7.6.orig/update.c tcp_wrappers_7.6/update.c
1207--- tcp_wrappers_7.6.orig/update.c 1994-12-28 17:42:56.000000000 +0100
1208+++ tcp_wrappers_7.6/update.c 2004-04-10 19:07:43.000000000 +0200
1209@@ -46,10 +46,18 @@
1210 request->fd = va_arg(ap, int);
1211 continue;
1212 case RQ_CLIENT_SIN:
1213+#ifdef INET6
1214+ request->client->sin = va_arg(ap, struct sockaddr *);
1215+#else
1216 request->client->sin = va_arg(ap, struct sockaddr_in *);
1217+#endif
1218 continue;
1219 case RQ_SERVER_SIN:
1220+#ifdef INET6
1221+ request->server->sin = va_arg(ap, struct sockaddr *);
1222+#else
1223 request->server->sin = va_arg(ap, struct sockaddr_in *);
1224+#endif
1225 continue;
1226
1227 /*
1228diff -ruN tcp_wrappers_7.6.orig/workarounds.c tcp_wrappers_7.6/workarounds.c
1229--- tcp_wrappers_7.6.orig/workarounds.c 1996-03-19 16:22:26.000000000 +0100
1230+++ tcp_wrappers_7.6/workarounds.c 2004-04-10 19:07:43.000000000 +0200
1231@@ -166,11 +166,22 @@
1232 int *len;
1233 {
1234 int ret;
1235+#ifdef INET6
1236+ struct sockaddr *sin = sa;
1237+#else
1238 struct sockaddr_in *sin = (struct sockaddr_in *) sa;
1239+#endif
1240
1241 if ((ret = getpeername(sock, sa, len)) >= 0
1242+#ifdef INET6
1243+ && ((sin->su_si.si_family == AF_INET6
1244+ && IN6_IS_ADDR_UNSPECIFIED(&sin->su_sin6.sin6_addr))
1245+ || (sin->su_si.si_family == AF_INET
1246+ && sin->su_sin.sin_addr.s_addr == 0))) {
1247+#else
1248 && sa->sa_family == AF_INET
1249 && sin->sin_addr.s_addr == 0) {
1250+#endif
1251 errno = ENOTCONN;
1252 return (-1);
1253 } else {
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch
deleted file mode 100644
index 0238e35208..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch
+++ /dev/null
@@ -1,151 +0,0 @@
1Path: news.porcupine.org!news.porcupine.org!not-for-mail
2From: Wietse Venema <wietse@((no)(spam)(please))wzv.win.tue.nl>
3Newsgroups: comp.mail.sendmail,comp.security.unix
4Subject: TCP Wrapper Blacklist Extension
5Followup-To: poster
6Date: 8 Sep 1997 18:53:13 -0400
7Organization: Wietse's hangout while on sabattical in the USA
8Lines: 147
9Sender: wietse@spike.porcupine.org
10Message-ID: <5v1vkp$h4f$1@spike.porcupine.org>
11NNTP-Posting-Host: spike.porcupine.org
12Xref: news.porcupine.org comp.mail.sendmail:3541 comp.security.unix:7158
13
14The patch below adds a new host pattern to the TCP Wrapper access
15control language. Instead of a host name or address pattern, you
16can specify an external /file/name with host name or address
17patterns. The feature can be used recursively.
18
19The /file/name extension makes it easy to blacklist bad sites, for
20example, to block unwanted electronic mail when libwrap is linked
21into sendmail. Adding hosts to a simple text file is much easier
22than having to edit a more complex hosts.allow/deny file.
23
24I developed this a year or so ago as a substitute for NIS netgroups.
25At that time, I did not consider it of sufficient interest for
26inclusion in the TCP Wrapper distribution. How times have changed.
27
28The patch is relative to TCP Wrappers version 7.6. The main archive
29site is ftp://ftp.win.tue.nl/pub/security/tcp_wrappers_7.6.tar.gz
30
31Thanks to the Debian LINUX folks for expressing their interest in
32this patch.
33
34 Wietse
35
36
37[diff updated by Md]
38
39diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
40--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 19:28:09.000000000 +0200
41+++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 19:28:01.000000000 +0200
42@@ -97,6 +97,13 @@
43 `[3ffe:505:2:1::]/64\' matches every address in the range
44 `3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'.
45 .IP \(bu
46+A string that begins with a `/\' character is treated as a file
47+name. A host name or address is matched if it matches any host name
48+or address pattern listed in the named file. The file format is
49+zero or more lines with zero or more host name or address patterns
50+separated by whitespace. A file name pattern can be used anywhere
51+a host name or address pattern can be used.
52+.IP \(bu
53 Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This
54 method of matching cannot be used in conjunction with `net/mask\' matching,
55 hostname matching beginning with `.\' or IP address matching ending with `.\'.
56diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
57--- tcp_wrappers_7.6.orig/hosts_access.c 2004-04-10 19:28:09.000000000 +0200
58+++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 19:27:05.000000000 +0200
59@@ -253,6 +253,26 @@
60 }
61 }
62
63+/* hostfile_match - look up host patterns from file */
64+
65+static int hostfile_match(path, host)
66+char *path;
67+struct hosts_info *host;
68+{
69+ char tok[BUFSIZ];
70+ int match = NO;
71+ FILE *fp;
72+
73+ if ((fp = fopen(path, "r")) != 0) {
74+ while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host)))
75+ /* void */ ;
76+ fclose(fp);
77+ } else if (errno != ENOENT) {
78+ tcpd_warn("open %s: %m", path);
79+ }
80+ return (match);
81+}
82+
83 /* host_match - match host name and/or address against pattern */
84
85 static int host_match(tok, host)
86@@ -280,6 +300,8 @@
87 tcpd_warn("netgroup support is disabled"); /* not tcpd_jump() */
88 return (NO);
89 #endif
90+ } else if (tok[0] == '/') { /* /file hack */
91+ return (hostfile_match(tok, host));
92 } else if (STR_EQ(tok, "KNOWN")) { /* check address and name */
93 char *name = eval_hostname(host);
94 return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name));
95diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
96--- tcp_wrappers_7.6.orig/tcpdchk.c 2004-04-10 19:28:09.000000000 +0200
97+++ tcp_wrappers_7.6/tcpdchk.c 2004-04-10 19:27:05.000000000 +0200
98@@ -353,6 +353,8 @@
99 {
100 if (pat[0] == '@') {
101 tcpd_warn("%s: daemon name begins with \"@\"", pat);
102+ } else if (pat[0] == '/') {
103+ tcpd_warn("%s: daemon name begins with \"/\"", pat);
104 } else if (pat[0] == '.') {
105 tcpd_warn("%s: daemon name begins with dot", pat);
106 } else if (pat[strlen(pat) - 1] == '.') {
107@@ -385,6 +387,8 @@
108 {
109 if (pat[0] == '@') { /* @netgroup */
110 tcpd_warn("%s: user name begins with \"@\"", pat);
111+ } else if (pat[0] == '/') {
112+ tcpd_warn("%s: user name begins with \"/\"", pat);
113 } else if (pat[0] == '.') {
114 tcpd_warn("%s: user name begins with dot", pat);
115 } else if (pat[strlen(pat) - 1] == '.') {
116@@ -430,8 +434,13 @@
117 static int check_host(pat)
118 char *pat;
119 {
120+ char buf[BUFSIZ];
121 char *mask;
122 int addr_count = 1;
123+ FILE *fp;
124+ struct tcpd_context saved_context;
125+ char *cp;
126+ char *wsp = " \t\r\n";
127
128 if (pat[0] == '@') { /* @netgroup */
129 #ifdef NO_NETGRENT
130@@ -450,6 +459,21 @@
131 tcpd_warn("netgroup support disabled");
132 #endif
133 #endif
134+ } else if (pat[0] == '/') { /* /path/name */
135+ if ((fp = fopen(pat, "r")) != 0) {
136+ saved_context = tcpd_context;
137+ tcpd_context.file = pat;
138+ tcpd_context.line = 0;
139+ while (fgets(buf, sizeof(buf), fp)) {
140+ tcpd_context.line++;
141+ for (cp = strtok(buf, wsp); cp; cp = strtok((char *) 0, wsp))
142+ check_host(cp);
143+ }
144+ tcpd_context = saved_context;
145+ fclose(fp);
146+ } else if (errno != ENOENT) {
147+ tcpd_warn("open %s: %m", pat);
148+ }
149 } else if (mask = split_at(pat, '/')) { /* network/netmask */
150 #ifdef INET6
151 int mask_len;
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch
deleted file mode 100644
index 88a2b5e43b..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1diff -uN tcp_wrappers_7.6/hosts_access.c tcp_wrappers_7.6.new/hosts_access.c
2--- tcp_wrappers_7.6/hosts_access.c Mon May 20 14:00:56 2002
3+++ tcp_wrappers_7.6.new/hosts_access.c Mon May 20 14:25:05 2002
4@@ -448,6 +448,15 @@
5 int len, mask_len, i = 0;
6 char ch;
7
8+ /*
9+ * Behavior of getaddrinfo() against IPv4-mapped IPv6 address is
10+ * different between KAME and Solaris8. While KAME returns
11+ * AF_INET6, Solaris8 returns AF_INET. So, we avoid this here.
12+ */
13+ if (STRN_EQ(string, "::ffff:", 7)
14+ && dot_quad_addr(string + 7) != INADDR_NONE)
15+ return (masked_match4(net_tok, mask_tok, string + 7));
16+
17 memset(&hints, 0, sizeof(hints));
18 hints.ai_family = AF_INET6;
19 hints.ai_socktype = SOCK_STREAM;
20@@ -457,13 +466,6 @@
21 memcpy(&addr, res->ai_addr, sizeof(addr));
22 freeaddrinfo(res);
23
24- if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) {
25- if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE
26- || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE)
27- return (NO);
28- return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]);
29- }
30-
31 /* match IPv6 address against netnumber/prefixlen */
32 len = strlen(net_tok);
33 if (*net_tok != '[' || net_tok[len - 1] != ']')
34diff -uN tcp_wrappers_7.6/socket.c tcp_wrappers_7.6.new/socket.c
35--- tcp_wrappers_7.6/socket.c Mon May 20 13:48:35 2002
36+++ tcp_wrappers_7.6.new/socket.c Mon May 20 14:22:27 2002
37@@ -228,7 +228,7 @@
38 hints.ai_family = sin->sa_family;
39 hints.ai_socktype = SOCK_STREAM;
40 hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST;
41- if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) {
42+ if ((err = getaddrinfo(host->name, NULL, &hints, &res0)) == 0) {
43 freeaddrinfo(res0);
44 res0 = NULL;
45 tcpd_warn("host name/name mismatch: "
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
deleted file mode 100644
index 60ca594bee..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
+++ /dev/null
@@ -1,81 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
2--- tcp_wrappers_7.6.orig/Makefile 2003-08-21 01:43:39.000000000 +0200
3+++ tcp_wrappers_7.6/Makefile 2003-08-21 01:43:35.000000000 +0200
4@@ -45,7 +45,7 @@
5 #
6 # SysV.4 Solaris 2.x OSF AIX
7 #REAL_DAEMON_DIR=/usr/sbin
8-#
9+REAL_DAEMON_DIR=/usr/sbin
10 # BSD 4.4
11 #REAL_DAEMON_DIR=/usr/libexec
12 #
13@@ -512,6 +519,7 @@
14 # (examples: allow, deny, banners, twist and spawn).
15 #
16 #STYLE = -DPROCESS_OPTIONS # Enable language extensions.
17+STYLE = -DPROCESS_OPTIONS
18
19 ################################################################
20 # Optional: Changing the default disposition of logfile records
21@@ -535,6 +543,7 @@
22 # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
23
24 FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use
25+FACILITY= LOG_DAEMON
26
27 # The syslog priority at which successful connections are logged.
28
29@@ -631,6 +640,7 @@
30 # lookups altogether, see the next section.
31
32 PARANOID= -DPARANOID
33+PARANOID=
34
35 ########################################
36 # Optional: turning off hostname lookups
37@@ -644,6 +654,7 @@
38 # mode (see previous section) and comment out the following definition.
39
40 HOSTNAME= -DALWAYS_HOSTNAME
41+HOSTNAME=
42
43 #############################################
44 # Optional: Turning on host ADDRESS checking
45@@ -670,6 +681,7 @@
46 # Solaris 2.x, and Linux. See your system documentation for details.
47 #
48 # KILL_OPT= -DKILL_IP_OPTIONS
49+KILL_OPT= -DKILL_IP_OPTIONS
50
51 ## End configuration options
52 ############################
53@@ -677,9 +689,10 @@
54 # Protection against weird shells or weird make programs.
55
56 SHELL = /bin/sh
57-.c.o:; $(CC) $(CFLAGS) -c $*.c
58+.c.o:; $(CC) $(CFLAGS) -o $*.o -c $*.c
59
60-CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
61+COPTS = -O2 -g
62+CFLAGS = $(COPTS) -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
63 $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
64 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
65 -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
66@@ -712,10 +725,11 @@
67
68 config-check:
69 @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
70- @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \
71- if cmp cflags /tmp/cflags.$$$$ ; \
72- then rm /tmp/cflags.$$$$ ; \
73- else mv /tmp/cflags.$$$$ cflags ; \
74+ @set +e; echo $(CFLAGS) >cflags.new ; \
75+ if cmp cflags cflags.new ; \
76+ then rm cflags.new ; \
77+ else mv cflags.new cflags ; \
78 fi >/dev/null 2>/dev/null
79+ @if [ ! -d shared ]; then mkdir shared; fi
80
81 $(LIB): $(LIB_OBJ)
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch
deleted file mode 100644
index c089b33257..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch
+++ /dev/null
@@ -1,253 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
2--- tcp_wrappers_7.6.orig/Makefile 2004-05-02 15:37:59.000000000 +0200
3+++ tcp_wrappers_7.6/Makefile 2004-05-02 15:31:09.000000000 +0200
4@@ -150,15 +150,15 @@
5
6 linux:
7 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
8- LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
9+ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
10 NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \
11- EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
12+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
13
14 gnu:
15 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
16- LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
17+ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
18 NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \
19- EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all
20+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT" all
21
22 # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
23 hpux hpux8 hpux9 hpux10:
24@@ -713,7 +713,22 @@
25
26 LIB = libwrap.a
27
28-all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk
29+shared/%.o: %.c
30+ $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
31+
32+SOMAJOR = 0
33+SOMINOR = 7.6
34+
35+SHLIB = shared/libwrap.so.$(SOMAJOR).$(SOMINOR)
36+SHLIBSOMAJ = shared/libwrap.so.$(SOMAJOR)
37+SHLIBSO = shared/libwrap.so
38+SHLIBFLAGS = -Lshared -lwrap
39+
40+SHLINKFLAGS = -shared -Xlinker -soname -Xlinker libwrap.so.$(SOMAJOR) -lc $(LIBS)
41+SHCFLAGS = -fPIC -shared -D_REENTRANT
42+SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ));
43+
44+all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB)
45
46 # Invalidate all object files when the compiler options (CFLAGS) have changed.
47
48@@ -731,27 +746,33 @@
49 $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ)
50 -$(RANLIB) $(LIB)
51
52-tcpd: tcpd.o $(LIB)
53- $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS)
54+$(SHLIB): $(SHLIB_OBJ)
55+ rm -f $(SHLIB)
56+ $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
57+ ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ)
58+ ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
59+
60+tcpd: tcpd.o $(SHLIB)
61+ $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
62
63 miscd: miscd.o $(LIB)
64 $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
65
66-safe_finger: safe_finger.o $(LIB)
67- $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS)
68+safe_finger: safe_finger.o $(SHLIB)
69+ $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
70
71 TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
72
73-tcpdmatch: $(TCPDMATCH_OBJ) $(LIB)
74- $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS)
75+tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB)
76+ $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
77
78-try-from: try-from.o fakelog.o $(LIB)
79- $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS)
80+try-from: try-from.o fakelog.o $(SHLIB)
81+ $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
82
83 TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
84
85-tcpdchk: $(TCPDCHK_OBJ) $(LIB)
86- $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS)
87+tcpdchk: $(TCPDCHK_OBJ) $(SHLIB)
88+ $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
89
90 shar: $(KIT)
91 @shar $(KIT)
92@@ -767,7 +788,9 @@
93
94 clean:
95 rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \
96+ libwrap*.so* \
97 cflags
98+ rm -rf shared/
99
100 tidy: clean
101 chmod -R a+r .
102@@ -913,5 +936,6 @@
103 update.o: mystdarg.h
104 update.o: tcpd.h
105 vfprintf.o: cflags
106+weak_symbols.o: tcpd.h
107 workarounds.o: cflags
108 workarounds.o: tcpd.h
109diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
110--- tcp_wrappers_7.6.orig/tcpd.h 2004-05-02 15:37:59.000000000 +0200
111+++ tcp_wrappers_7.6/tcpd.h 2004-05-02 15:37:49.000000000 +0200
112@@ -4,6 +4,15 @@
113 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
114 */
115
116+#ifndef _TCPWRAPPERS_TCPD_H
117+#define _TCPWRAPPERS_TCPD_H
118+
119+/* Need definitions of struct sockaddr_in and FILE. */
120+#include <netinet/in.h>
121+#include <stdio.h>
122+
123+__BEGIN_DECLS
124+
125 /* Structure to describe one communications endpoint. */
126
127 #define STRING_LENGTH 128 /* hosts, users, processes */
128@@ -29,10 +38,10 @@
129 char pid[10]; /* access via eval_pid(request) */
130 struct host_info client[1]; /* client endpoint info */
131 struct host_info server[1]; /* server endpoint info */
132- void (*sink) (); /* datagram sink function or 0 */
133- void (*hostname) (); /* address to printable hostname */
134- void (*hostaddr) (); /* address to printable address */
135- void (*cleanup) (); /* cleanup function or 0 */
136+ void (*sink) (int); /* datagram sink function or 0 */
137+ void (*hostname) (struct host_info *); /* address to printable hostname */
138+ void (*hostaddr) (struct host_info *); /* address to printable address */
139+ void (*cleanup) (struct request_info *); /* cleanup function or 0 */
140 struct netconfig *config; /* netdir handle */
141 };
142
143@@ -70,20 +79,27 @@
144 #define fromhost sock_host /* no TLI support needed */
145 #endif
146
147-extern int hosts_access(); /* access control */
148-extern void shell_cmd(); /* execute shell command */
149-extern char *percent_x(); /* do %<char> expansion */
150-extern void rfc931(); /* client name from RFC 931 daemon */
151-extern void clean_exit(); /* clean up and exit */
152-extern void refuse(); /* clean up and exit */
153-extern char *xgets(); /* fgets() on steroids */
154-extern char *split_at(); /* strchr() and split */
155-extern unsigned long dot_quad_addr(); /* restricted inet_addr() */
156+extern int hosts_access(struct request_info *request); /* access control */
157+extern void shell_cmd(char *); /* execute shell command */
158+extern char *percent_x(char *, int, char *, struct request_info *);
159+ /* do %<char> expansion */
160+extern void rfc931(struct sockaddr *, struct sockaddr *, char *);
161+ /* client name from RFC 931 daemon */
162+extern void clean_exit(struct request_info *); /* clean up and exit */
163+extern void refuse(struct request_info *); /* clean up and exit */
164+extern char *xgets(char *, int, FILE *); /* fgets() on steroids */
165+extern char *split_at(char *, int); /* strchr() and split */
166+extern unsigned long dot_quad_addr(char *); /* restricted inet_addr() */
167
168 /* Global variables. */
169
170+#ifdef HAVE_WEAKSYMS
171+extern int allow_severity __attribute__ ((weak)); /* for connection logging */
172+extern int deny_severity __attribute__ ((weak)); /* for connection logging */
173+#else
174 extern int allow_severity; /* for connection logging */
175 extern int deny_severity; /* for connection logging */
176+#endif
177 extern char *hosts_allow_table; /* for verification mode redirection */
178 extern char *hosts_deny_table; /* for verification mode redirection */
179 extern int hosts_access_verbose; /* for verbose matching mode */
180@@ -98,6 +114,8 @@
181 #ifdef __STDC__
182 extern struct request_info *request_init(struct request_info *,...);
183 extern struct request_info *request_set(struct request_info *,...);
184+extern int hosts_ctl(char *daemon, char *client_name, char *client_addr,
185+ char *client_user);
186 #else
187 extern struct request_info *request_init(); /* initialize request */
188 extern struct request_info *request_set(); /* update request structure */
189@@ -121,20 +139,23 @@
190 * host_info structures serve as caches for the lookup results.
191 */
192
193-extern char *eval_user(); /* client user */
194-extern char *eval_hostname(); /* printable hostname */
195-extern char *eval_hostaddr(); /* printable host address */
196-extern char *eval_hostinfo(); /* host name or address */
197-extern char *eval_client(); /* whatever is available */
198-extern char *eval_server(); /* whatever is available */
199+extern char *eval_user(struct request_info *); /* client user */
200+extern char *eval_hostname(struct host_info *); /* printable hostname */
201+extern char *eval_hostaddr(struct host_info *); /* printable host address */
202+extern char *eval_hostinfo(struct host_info *); /* host name or address */
203+extern char *eval_client(struct request_info *);/* whatever is available */
204+extern char *eval_server(struct request_info *);/* whatever is available */
205 #define eval_daemon(r) ((r)->daemon) /* daemon process name */
206 #define eval_pid(r) ((r)->pid) /* process id */
207
208 /* Socket-specific methods, including DNS hostname lookups. */
209
210-extern void sock_host(); /* look up endpoint addresses */
211-extern void sock_hostname(); /* translate address to hostname */
212-extern void sock_hostaddr(); /* address to printable address */
213+/* look up endpoint addresses */
214+extern void sock_host(struct request_info *);
215+/* translate address to hostname */
216+extern void sock_hostname(struct host_info *);
217+/* address to printable address */
218+extern void sock_hostaddr(struct host_info *);
219 #define sock_methods(r) \
220 { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }
221
222@@ -182,7 +203,7 @@
223 * behavior.
224 */
225
226-extern void process_options(); /* execute options */
227+extern void process_options(char *, struct request_info *);/* execute options */
228 extern int dry_run; /* verification flag */
229
230 /* Bug workarounds. */
231@@ -221,3 +242,7 @@
232 #define strtok my_strtok
233 extern char *my_strtok();
234 #endif
235+
236+__END_DECLS
237+
238+#endif
239diff -ruN tcp_wrappers_7.6.orig/weak_symbols.c tcp_wrappers_7.6/weak_symbols.c
240--- tcp_wrappers_7.6.orig/weak_symbols.c 1970-01-01 01:00:00.000000000 +0100
241+++ tcp_wrappers_7.6/weak_symbols.c 2004-05-02 15:31:09.000000000 +0200
242@@ -0,0 +1,11 @@
243+ /*
244+ * @(#) weak_symbols.h 1.5 99/12/29 23:50
245+ *
246+ * Author: Anthony Towns <ajt@debian.org>
247+ */
248+
249+#ifdef HAVE_WEAKSYMS
250+#include <syslog.h>
251+int deny_severity = LOG_WARNING;
252+int allow_severity = SEVERITY;
253+#endif
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch
deleted file mode 100644
index 0e1ecf5b4a..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
2--- tcp_wrappers_7.6.orig/hosts_access.5 2003-08-21 03:15:36.000000000 +0200
3+++ tcp_wrappers_7.6/hosts_access.5 2003-08-21 03:15:31.000000000 +0200
4@@ -90,6 +90,10 @@
5 pattern `131.155.72.0/255.255.254.0\' matches every address in the
6 range `131.155.72.0\' through `131.155.73.255\'.
7 .IP \(bu
8+An expression of the form `n.n.n.n/mm' is interpreted as a
9+`net/masklength' pair, where `mm' is the number of consecutive `1'
10+bits in the netmask applied to the `n.n.n.n' address.
11+.IP \(bu
12 An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a
13 `[net]/prefixlen\' pair. An IPv6 host address is matched if
14 `prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the
15diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
16--- tcp_wrappers_7.6.orig/hosts_access.c 2003-08-21 03:15:36.000000000 +0200
17+++ tcp_wrappers_7.6/hosts_access.c 2003-08-21 03:09:30.000000000 +0200
18@@ -417,7 +417,8 @@
19 if ((addr = dot_quad_addr(string)) == INADDR_NONE)
20 return (NO);
21 if ((net = dot_quad_addr(net_tok)) == INADDR_NONE
22- || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) {
23+ || ((mask = dot_quad_addr(mask_tok)) == INADDR_NONE
24+ && (mask = cidr_mask_addr(mask_tok)) == 0)) {
25 #ifndef INET6
26 tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok);
27 #endif
28diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
29--- tcp_wrappers_7.6.orig/misc.c 2003-08-21 03:15:36.000000000 +0200
30+++ tcp_wrappers_7.6/misc.c 2003-08-21 03:09:30.000000000 +0200
31@@ -107,3 +107,17 @@
32 }
33 return (runs == 4 ? inet_addr(str) : INADDR_NONE);
34 }
35+
36+/* cidr_mask_addr - convert cidr netmask length to internal form */
37+
38+unsigned long cidr_mask_addr(str)
39+char *str;
40+{
41+ int maskbits;
42+
43+ maskbits = atoi(str);
44+ if (maskbits < 1 || maskbits > 32)
45+ return (0);
46+ return htonl(0xFFFFFFFF << (32 - maskbits));
47+}
48+
49diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
50--- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 03:15:36.000000000 +0200
51+++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 03:09:30.000000000 +0200
52@@ -497,12 +497,12 @@
53 int mask_len;
54
55 if ((dot_quad_addr(pat) == INADDR_NONE
56- || dot_quad_addr(mask) == INADDR_NONE)
57+ || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0)
58 && (!is_inet6_addr(pat)
59 || ((mask_len = atoi(mask)) < 0 || mask_len > 128)))
60 #else
61 if (dot_quad_addr(pat) == INADDR_NONE
62- || dot_quad_addr(mask) == INADDR_NONE)
63+ || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0)
64 #endif
65 tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
66 } else if (STR_EQ(pat, "FAIL")) { /* obsolete */
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch
deleted file mode 100644
index 913ed987d6..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
2--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-25 12:17:59.000000000 +0200
3+++ tcp_wrappers_7.6/hosts_access.5 2004-04-25 12:17:53.000000000 +0200
4@@ -89,6 +89,8 @@
5 bitwise AND of the address and the `mask\'. For example, the net/mask
6 pattern `131.155.72.0/255.255.254.0\' matches every address in the
7 range `131.155.72.0\' through `131.155.73.255\'.
8+`255.255.255.255\' is not a valid mask value, so a single host can be
9+matched just by its IP.
10 .IP \(bu
11 An expression of the form `n.n.n.n/mm' is interpreted as a
12 `net/masklength' pair, where `mm' is the number of consecutive `1'
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch
deleted file mode 100644
index e35fc7ecd9..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/eval.c tcp_wrappers_7.6/eval.c
2--- tcp_wrappers_7.6.orig/eval.c 1995-01-30 19:51:46.000000000 +0100
3+++ tcp_wrappers_7.6/eval.c 2004-11-04 13:59:01.000000000 +0100
4@@ -98,6 +98,28 @@
5 }
6 }
7
8+/* eval_port - return string with the port */
9+char *eval_port(saddr)
10+#ifdef INET6
11+struct sockaddr *saddr;
12+#else
13+struct sockaddr_in *saddr;
14+#endif
15+{
16+ static char port[16];
17+ if (saddr != 0) {
18+ sprintf(port, "%u",
19+#ifdef INET6
20+ ntohs(((struct sockaddr_in *)saddr)->sin_port));
21+#else
22+ ntohs(saddr->sin_port));
23+#endif
24+ } else {
25+ strcpy(port, "0");
26+ }
27+ return (port);
28+}
29+
30 /* eval_client - return string with as much about the client as we know */
31
32 char *eval_client(request)
33diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
34--- tcp_wrappers_7.6.orig/hosts_access.5 2004-11-04 13:17:45.000000000 +0100
35+++ tcp_wrappers_7.6/hosts_access.5 2004-11-04 13:55:32.000000000 +0100
36@@ -175,6 +175,8 @@
37 unavailable.
38 .IP "%n (%N)"
39 The client (server) host name (or "unknown" or "paranoid").
40+.IP "%r (%R)"
41+The clients (servers) port number (or "0").
42 .IP %p
43 The daemon process id.
44 .IP %s
45diff -ruN tcp_wrappers_7.6.orig/percent_x.c tcp_wrappers_7.6/percent_x.c
46--- tcp_wrappers_7.6.orig/percent_x.c 1994-12-28 17:42:38.000000000 +0100
47+++ tcp_wrappers_7.6/percent_x.c 2004-11-04 13:19:29.000000000 +0100
48@@ -63,6 +63,8 @@
49 ch == 'n' ? eval_hostname(request->client) :
50 ch == 'N' ? eval_hostname(request->server) :
51 ch == 'p' ? eval_pid(request) :
52+ ch == 'r' ? eval_port(request->client->sin) :
53+ ch == 'R' ? eval_port(request->server->sin) :
54 ch == 's' ? eval_server(request) :
55 ch == 'u' ? eval_user(request) :
56 ch == '%' ? "%" : (tcpd_warn("unrecognized %%%c", ch), "");
57diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
58--- tcp_wrappers_7.6.orig/tcpd.h 2004-11-04 13:17:45.000000000 +0100
59+++ tcp_wrappers_7.6/tcpd.h 2004-11-04 13:19:13.000000000 +0100
60@@ -145,6 +145,11 @@
61 extern char *eval_hostinfo(struct host_info *); /* host name or address */
62 extern char *eval_client(struct request_info *);/* whatever is available */
63 extern char *eval_server(struct request_info *);/* whatever is available */
64+#ifdef INET6
65+extern char *eval_port(struct sockaddr *);
66+#else
67+extern char *eval_port(struct sockaddr_in *);
68+#endif
69 #define eval_daemon(r) ((r)->daemon) /* daemon process name */
70 #define eval_pid(r) ((r)->pid) /* process id */
71
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
deleted file mode 100644
index 31c2b92278..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
2--- tcp_wrappers_7.6.orig/percent_m.c 1994-12-28 17:42:37.000000000 +0100
3+++ tcp_wrappers_7.6/percent_m.c 2003-08-21 02:45:31.000000000 +0200
4@@ -29,11 +29,15 @@
5
6 while (*bp = *cp)
7 if (*cp == '%' && cp[1] == 'm') {
8+#ifdef HAVE_STRERROR
9+ strcpy(bp, strerror(errno));
10+#else
11 if (errno < sys_nerr && errno > 0) {
12 strcpy(bp, sys_errlist[errno]);
13 } else {
14 sprintf(bp, "Unknown error %d", errno);
15 }
16+#endif
17 bp += strlen(bp);
18 cp += 2;
19 } else {
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch
deleted file mode 100644
index 2e897650e0..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1Index: tcp_wrappers_7.6.orig/Makefile
2===================================================================
3--- tcp_wrappers_7.6.orig.orig/Makefile 2009-04-06 10:55:47.000000000 +0000
4+++ tcp_wrappers_7.6.orig/Makefile 2009-04-06 10:57:04.000000000 +0000
5@@ -748,31 +748,31 @@
6
7 $(SHLIB): $(SHLIB_OBJ)
8 rm -f $(SHLIB)
9- $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
10+ $(CC) $(LDFLAGS) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
11 ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ)
12 ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
13
14 tcpd: tcpd.o $(SHLIB)
15- $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
16+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
17
18 miscd: miscd.o $(LIB)
19- $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
20+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
21
22 safe_finger: safe_finger.o $(SHLIB)
23- $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
24+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
25
26 TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
27
28 tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB)
29- $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
30+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
31
32 try-from: try-from.o fakelog.o $(SHLIB)
33- $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
34+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
35
36 TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
37
38 tcpdchk: $(TCPDCHK_OBJ) $(SHLIB)
39- $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
40+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
41
42 shar: $(KIT)
43 @shar $(KIT)
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch
deleted file mode 100644
index afaa9c8ac3..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3
2--- tcp_wrappers_7.6.orig/hosts_access.3 2004-04-25 00:10:48.000000000 +0200
3+++ tcp_wrappers_7.6/hosts_access.3 2004-04-25 00:09:36.000000000 +0200
4@@ -14,6 +14,9 @@
5 struct request_info *request_set(request, key, value, ..., 0)
6 struct request_info *request;
7
8+void fromhost(request)
9+struct request_info *request;
10+
11 int hosts_access(request)
12 struct request_info *request;
13
14@@ -60,6 +63,7 @@
15 is available, host names and client user names are looked up on demand,
16 using the request structure as a cache. hosts_access() returns zero if
17 access should be denied.
18+fromhost() must be called before hosts_access().
19 .PP
20 hosts_ctl() is a wrapper around the request_init() and hosts_access()
21 routines with a perhaps more convenient interface (though it does not
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch
deleted file mode 100644
index ece7da35fe..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
2--- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:40:08.000000000 +0200
3+++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:40:02.000000000 +0200
4@@ -92,6 +92,8 @@
5 char *cp;
6 char *result = unknown;
7 FILE *fp;
8+ unsigned saved_timeout;
9+ struct sigaction nact, oact;
10
11 #ifdef INET6
12 /* address family must be the same */
13@@ -134,7 +136,12 @@
14 */
15
16 if (setjmp(timebuf) == 0) {
17- signal(SIGALRM, timeout);
18+ /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
19+ saved_timeout = alarm(0);
20+ nact.sa_handler = timeout;
21+ nact.sa_flags = 0;
22+ (void) sigemptyset(&nact.sa_mask);
23+ (void) sigaction(SIGALRM, &nact, &oact);
24 alarm(rfc931_timeout);
25
26 /*
27@@ -223,6 +230,10 @@
28 }
29 alarm(0);
30 }
31+ /* Restore SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
32+ (void) sigaction(SIGALRM, &oact, NULL);
33+ if (saved_timeout > 0)
34+ alarm(saved_timeout);
35 fclose(fp);
36 }
37 STRN_CPY(dest, result, STRING_LENGTH);
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff
deleted file mode 100644
index a926d0edfd..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff
+++ /dev/null
@@ -1,39 +0,0 @@
1diff -ruNp tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
2--- tcp_wrappers_7.6.orig/scaffold.c 2005-03-09 18:22:04.000000000 +0100
3+++ tcp_wrappers_7.6/scaffold.c 2005-03-09 18:20:47.000000000 +0100
4@@ -237,10 +237,17 @@ struct request_info *request;
5
6 /* ARGSUSED */
7
8-void rfc931(request)
9-struct request_info *request;
10+void rfc931(rmt_sin, our_sin, dest)
11+#ifdef INET6
12+struct sockaddr *rmt_sin;
13+struct sockaddr *our_sin;
14+#else
15+struct sockaddr_in *rmt_sin;
16+struct sockaddr_in *our_sin;
17+#endif
18+char *dest;
19 {
20- strcpy(request->user, unknown);
21+ strcpy(dest, unknown);
22 }
23
24 /* check_path - examine accessibility */
25diff -ruNp tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
26--- tcp_wrappers_7.6.orig/tcpd.h 2005-03-09 18:22:04.000000000 +0100
27+++ tcp_wrappers_7.6/tcpd.h 2005-03-09 18:21:23.000000000 +0100
28@@ -83,7 +83,11 @@ extern int hosts_access(struct request_i
29 extern void shell_cmd(char *); /* execute shell command */
30 extern char *percent_x(char *, int, char *, struct request_info *);
31 /* do %<char> expansion */
32+#ifdef INET6
33 extern void rfc931(struct sockaddr *, struct sockaddr *, char *);
34+#else
35+extern void rfc931(struct sockaddr_in *, struct sockaddr_in *, char *);
36+#endif
37 /* client name from RFC 931 daemon */
38 extern void clean_exit(struct request_info *); /* clean up and exit */
39 extern void refuse(struct request_info *); /* clean up and exit */
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8
deleted file mode 100644
index 875616b9ea..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8
+++ /dev/null
@@ -1,34 +0,0 @@
1.TH SAFE_FINGER 8 "21th June 1997" Linux "Linux Programmer's Manual"
2.SH NAME
3safe_finger \- finger client wrapper that protects against nasty stuff
4from finger servers
5.SH SYNOPSIS
6.B safe_finger [finger_options]
7.SH DESCRIPTION
8The
9.B safe_finger
10command protects against nasty stuff from finger servers. Use this
11program for automatic reverse finger probes from the
12.B tcp_wrapper
13.B (tcpd)
14, not the raw finger command. The
15.B safe_finger
16command makes sure that the finger client is not run with root
17privileges. It also runs the finger client with a defined PATH
18environment.
19.B safe_finger
20will also protect you from problems caused by the output of some
21finger servers. The problem: some programs may react to stuff in
22the first column. Other programs may get upset by thrash anywhere
23on a line. File systems may fill up as the finger server keeps
24sending data. Text editors may bomb out on extremely long lines.
25The finger server may take forever because it is somehow wedged.
26.B safe_finger
27takes care of all this badness.
28.SH SEE ALSO
29.BR hosts_access (5),
30.BR hosts_options (5),
31.BR tcpd (8)
32.SH AUTHOR
33Wietse Venema, Eindhoven University of Technology, The Netherlands.
34
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch
deleted file mode 100644
index 5c8c9a1548..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1--- tcp-wrappers-7.6-ipv6.1.orig/safe_finger.c
2+++ tcp-wrappers-7.6-ipv6.1/safe_finger.c
3@@ -26,21 +26,24 @@
4 #include <stdio.h>
5 #include <ctype.h>
6 #include <pwd.h>
7+#include <syslog.h>
8
9 extern void exit();
10
11 /* Local stuff */
12
13-char path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin";
14+char path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin";
15
16 #define TIME_LIMIT 60 /* Do not keep listinging forever */
17 #define INPUT_LENGTH 100000 /* Do not keep listinging forever */
18 #define LINE_LENGTH 128 /* Editors can choke on long lines */
19 #define FINGER_PROGRAM "finger" /* Most, if not all, UNIX systems */
20 #define UNPRIV_NAME "nobody" /* Preferred privilege level */
21-#define UNPRIV_UGID 32767 /* Default uid and gid */
22+#define UNPRIV_UGID 65534 /* Default uid and gid */
23
24 int finger_pid;
25+int allow_severity = SEVERITY;
26+int deny_severity = LOG_WARNING;
27
28 void cleanup(sig)
29 int sig;
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch
deleted file mode 100644
index f286605bfd..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1* Mon Feb 10 2003 Harald Hoyer <harald@redhat.de> 7.6-29
2- added security patch tcp_wrappers-7.6-sig.patch
3
4--- tcp_wrappers_7.6/hosts_access.c.sig 2003-02-10 16:18:31.000000000 +0100
5+++ tcp_wrappers_7.6/hosts_access.c 2003-02-10 16:50:38.000000000 +0100
6@@ -66,6 +66,7 @@
7
8 #define YES 1
9 #define NO 0
10+#define ERR -1
11
12 /*
13 * These variables are globally visible so that they can be redirected in
14@@ -129,9 +129,9 @@
15 return (verdict == AC_PERMIT);
16 if (table_match(hosts_allow_table, request))
17 return (YES);
18- if (table_match(hosts_deny_table, request))
19- return (NO);
20- return (YES);
21+ if (table_match(hosts_deny_table, request) == NO)
22+ return (YES);
23+ return (NO);
24 }
25
26 /* table_match - match table entries with (daemon, client) pair */
27@@ -175,6 +175,7 @@
28 (void) fclose(fp);
29 } else if (errno != ENOENT) {
30 tcpd_warn("cannot open %s: %m", table);
31+ match = ERR;
32 }
33 if (match) {
34 if (hosts_access_verbose > 1)
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch
deleted file mode 100644
index 71be340a07..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1diff -ruNp tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
2--- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:42:25.000000000 +0200
3+++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:41:04.000000000 +0200
4@@ -33,7 +33,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
5
6 int rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */
7
8-static jmp_buf timebuf;
9+static sigjmp_buf timebuf;
10
11 /* fsocket - open stdio stream on top of socket */
12
13@@ -62,7 +62,7 @@ int protocol;
14 static void timeout(sig)
15 int sig;
16 {
17- longjmp(timebuf, sig);
18+ siglongjmp(timebuf, sig);
19 }
20
21 /* rfc931 - return remote user name, given socket structures */
22@@ -135,7 +135,7 @@ char *dest;
23 * Set up a timer so we won't get stuck while waiting for the server.
24 */
25
26- if (setjmp(timebuf) == 0) {
27+ if (sigsetjmp(timebuf, 0) == 0) {
28 /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
29 saved_timeout = alarm(0);
30 nact.sa_handler = timeout;
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/size_t.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
deleted file mode 100644
index 4db40f4c7b..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c
2--- tcp_wrappers_7.6.orig/fix_options.c 2003-08-21 03:41:33.000000000 +0200
3+++ tcp_wrappers_7.6/fix_options.c 2003-08-21 03:41:27.000000000 +0200
4@@ -38,7 +38,11 @@
5 #ifdef IP_OPTIONS
6 unsigned char optbuf[BUFFER_SIZE / 3], *cp;
7 char lbuf[BUFFER_SIZE], *lp;
8+#ifdef __GLIBC__
9+ size_t optsize = sizeof(optbuf), ipproto;
10+#else
11 int optsize = sizeof(optbuf), ipproto;
12+#endif
13 struct protoent *ip;
14 int fd = request->fd;
15 unsigned int opt;
16diff -ruN tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
17--- tcp_wrappers_7.6.orig/socket.c 2003-08-21 03:41:33.000000000 +0200
18+++ tcp_wrappers_7.6/socket.c 2003-08-21 03:40:51.000000000 +0200
19@@ -90,7 +90,11 @@
20 static struct sockaddr_in client;
21 static struct sockaddr_in server;
22 #endif
23+#ifdef __GLIBC__
24+ size_t len;
25+#else
26 int len;
27+#endif
28 char buf[BUFSIZ];
29 int fd = request->fd;
30
31@@ -421,7 +425,11 @@
32 #else
33 struct sockaddr_in sin;
34 #endif
35+#ifdef __GLIBC__
36+ size_t size = sizeof(sin);
37+#else
38 int size = sizeof(sin);
39+#endif
40
41 /*
42 * Eat up the not-yet received datagram. Some systems insist on a
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch
deleted file mode 100644
index 3beae39306..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
2--- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 02:50:37.000000000 +0200
3+++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 02:50:33.000000000 +0200
4@@ -53,6 +53,24 @@
5 #include "inetcf.h"
6 #include "scaffold.h"
7
8+/* list of programs which are known to be linked with libwrap in debian */
9+static const char *const libwrap_programs[] = {
10+ "portmap", "mountd", "statd", "ugidd",
11+ "redir", "rlinetd",
12+ "sshd",
13+ "atftpd",
14+ "diald",
15+ "esound",
16+ "gdm", "gnome-session",
17+ "icecast", "icecast_admin", "icecast_client", "icecast_source",
18+ "mysqld",
19+ "ntop",
20+ "pptpd",
21+ "rquotad",
22+ "sendmail", "smail",
23+ NULL
24+};
25+
26 /*
27 * Stolen from hosts_access.c...
28 */
29@@ -147,8 +165,8 @@
30 /*
31 * These are not run from inetd but may have built-in access control.
32 */
33- inet_set("portmap", WR_NOT);
34- inet_set("rpcbind", WR_NOT);
35+ for (c = 0; libwrap_programs[c]; c++)
36+ inet_set(libwrap_programs[c], WR_YES);
37
38 /*
39 * Check accessibility of access control files.
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/try-from.8 b/meta/packages/tcp-wrappers/tcp-wrappers-7.6/try-from.8
deleted file mode 100644
index 9c8f30543e..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers-7.6/try-from.8
+++ /dev/null
@@ -1,28 +0,0 @@
1.TH TRY-FROM 8 "21th June 1997" Linux "Linux Programmer's Manual"
2.SH NAME
3try-from \- test program for the tcp_wrapper
4.SH SYNOPSIS
5.B try-from
6.SH DESCRIPTION
7The
8.B try-from
9command can be called via a remote shell command to find out
10if the hostname and address are properly recognized
11by the
12.B tcp_wrapper
13library, if username lookup works, and (SysV only) if the TLI
14on top of IP heuristics work. Diagnostics are reported through
15.BR syslog (3)
16and redirected to stderr.
17
18Example:
19
20rsh host /some/where/try-from
21
22.SH SEE ALSO
23.BR hosts_access (5),
24.BR hosts_options (5),
25.BR tcpd (8)
26.SH AUTHOR
27Wietse Venema, Eindhoven University of Technology, The Netherlands.
28
diff --git a/meta/packages/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/packages/tcp-wrappers/tcp-wrappers_7.6.bb
deleted file mode 100644
index 308a8b63b4..0000000000
--- a/meta/packages/tcp-wrappers/tcp-wrappers_7.6.bb
+++ /dev/null
@@ -1,117 +0,0 @@
1DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \
2 services."
3PRIORITY = "optional"
4SECTION = "console/network"
5
6LICENSE = "tcp-wrappers"
7LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
8PR ="r0"
9
10
11PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev tcp-wrappers tcp-wrappers-doc"
12FILES_libwrap = "${base_libdir}/lib*.so.*"
13FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5"
14FILES_libwrap-dev = "${libdir}/lib*.so ${libdir}/lib*.a ${includedir}"
15FILES_tcp-wrappers = "${bindir}"
16FILES_tcp-wrappers-doc = "${mandir}/man8"
17
18SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
19 file://00_man_quoting.diff \
20 file://01_man_portability.patch \
21 file://05_wildcard_matching.patch \
22 file://06_fix_gethostbyname.patch \
23 file://10_usagi-ipv6.patch \
24 file://11_tcpd_blacklist.patch \
25 file://11_usagi_fix.patch \
26 file://12_makefile_config.patch \
27 file://13_shlib_weaksym.patch \
28 file://14_cidr_support.patch \
29 file://15_match_clarify.patch \
30 file://expand_remote_port.patch \
31 file://have_strerror.patch \
32 file://man_fromhost.patch \
33 file://restore_sigalarm.patch \
34 file://rfc931.diff \
35 file://safe_finger.patch \
36 file://sig_fix.patch \
37 file://siglongjmp.patch \
38 file://size_t.patch \
39 file://tcpdchk_libwrapped.patch \
40 file://ldflags.patch \
41 \
42 file://try-from.8 \
43 file://safe_finger.8"
44
45S = "${WORKDIR}/tcp_wrappers_${PV}"
46
47PARALLEL_MAKE = ""
48EXTRA_OEMAKE = "'CC=${CC}' \
49 'AR=${AR}' \
50 'RANLIB=${RANLIB}' \
51 'REAL_DAEMON_DIR=${sbindir}' \
52 'STYLE=-DPROCESS_OPTIONS' \
53 'FACILITY=LOG_DAEMON' \
54 'SEVERITY=LOG_INFO' \
55 'BUGS=' \
56 'VSYSLOG=' \
57 'RFC931_TIMEOUT=10' \
58 'ACCESS=-DHOSTS_ACCESS' \
59 'KILL_OPT=-DKILL_IP_OPTIONS' \
60 'UMASK=-DDAEMON_UMASK=022' \
61 'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \
62 'LIBS=-lnsl' \
63 'ARFLAGS=rv' \
64 'AUX_OBJ=weak_symbols.o' \
65 'TLI=' \
66 'COPTS=' \
67 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'"
68
69EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN"
70EXTRA_OEMAKE_NETGROUP_linux-uclibc = "-DUSE_GETDOMAIN"
71EXTRA_OEMAKE_NETGROUP_linux-uclibceabi = "-DUSE_GETDOMAIN"
72
73do_compile () {
74 oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \
75 all
76}
77
78BINS = "safe_finger tcpd tcpdchk try-from tcpdmatch"
79MANS3 = "hosts_access"
80MANS5 = "hosts_options"
81MANS8 = "tcpd tcpdchk tcpdmatch"
82do_install () {
83 oe_libinstall -a libwrap ${D}${libdir}
84 oe_libinstall -C shared -so libwrap ${D}${base_libdir}
85
86 rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
87 libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
88 ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
89 rm -f ${D}${base_libdir}/libwrap.so
90
91 install -d ${D}${sbindir}
92 for b in ${BINS}; do
93 install -m 0755 $b ${D}${sbindir}/ || exit 1
94 done
95
96 install -d ${D}${mandir}/man3
97 for m in ${MANS3}; do
98 install -m 0644 $m.3 ${D}${mandir}/man3/ || exit 1
99 done
100
101 install -d ${D}${mandir}/man5
102 for m in ${MANS5}; do
103 install -m 0644 $m.5 ${D}${mandir}/man5/ || exit 1
104 done
105
106 install -d ${D}${mandir}/man8
107 for m in ${MANS8}; do
108 install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1
109 done
110
111 install -m 0644 ${WORKDIR}/try-from.8 ${D}${mandir}/man8/
112 install -m 0644 ${WORKDIR}/safe_finger.8 ${D}${mandir}/man8/
113
114 install -d ${D}${includedir}
115 install -m 0644 tcpd.h ${D}${includedir}/
116}
117
diff --git a/meta/packages/tzcode/tzcode-native_2009r.bb b/meta/packages/tzcode/tzcode-native_2009r.bb
deleted file mode 100644
index c9a213b4f8..0000000000
--- a/meta/packages/tzcode/tzcode-native_2009r.bb
+++ /dev/null
@@ -1,17 +0,0 @@
1DESCRIPTION = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
2
3PR = "r0"
4
5SRC_URI = "ftp://elsie.nci.nih.gov/pub/tzcode${PV}.tar.gz \
6 ftp://elsie.nci.nih.gov/pub/tzdata2009s.tar.gz"
7
8S = "${WORKDIR}"
9
10inherit native
11
12do_install () {
13 install -d ${D}${bindir}/
14 install -m 755 zic ${D}${bindir}/
15 install -m 755 zdump ${D}${bindir}/
16 install -m 755 tzselect ${D}${bindir}/
17}
diff --git a/meta/packages/tzdata/tzdata_2010j.bb b/meta/packages/tzdata/tzdata_2010j.bb
deleted file mode 100644
index 97eb1173c1..0000000000
--- a/meta/packages/tzdata/tzdata_2010j.bb
+++ /dev/null
@@ -1,160 +0,0 @@
1DESCRIPTION = "Timezone data"
2HOMEPAGE = "ftp://elsie.nci.nih.gov/pub/"
3SECTION = "base"
4PRIORITY = "optional"
5LICENSE = "PD"
6LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=06468c0e84ef4d4c97045a4a29b08234"
7DEPENDS = "tzcode-native"
8
9PR = "r0"
10
11RCONFLICTS= "timezones timezone-africa timezone-america timezone-antarctica \
12 timezone-arctic timezone-asia timezone-atlantic \
13 timezone-australia timezone-europe timezone-indian \
14 timezone-iso3166.tab timezone-pacific timezone-zone.tab"
15
16SRC_URI = "ftp://elsie.nci.nih.gov/pub/tzdata${PV}.tar.gz"
17
18S = "${WORKDIR}"
19
20TZONES= "africa antarctica asia australasia europe northamerica southamerica \
21 factory solar87 solar88 solar89 etcetera backward systemv \
22# pacificnew \
23 "
24
25do_compile () {
26 for zone in ${TZONES}; do \
27 ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
28 -y ${S}/yearistype.sh ${S}/${zone} ; \
29 ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
30 -y ${S}/yearistype.sh ${S}/${zone} ; \
31 ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
32 -y ${S}/yearistype.sh ${S}/${zone} ; \
33 done
34}
35
36do_install () {
37 install -d ${D}/usr ${D}${datadir}/zoneinfo
38 cp -pPR ${S}/usr ${D}/
39}
40
41# Packages primarily organized by directory with a major city
42# in most time zones in the base package
43
44PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
45 tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
46 tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
47
48FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
49RPROVIDES_tzdata-africa = "tzdata-africa"
50
51FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
52 ${datadir}/zoneinfo/US/* \
53 ${datadir}/zoneinfo/Brazil/* \
54 ${datadir}/zoneinfo/Canada/* \
55 ${datadir}/zoneinfo/Mexico/* \
56 ${datadir}/zoneinfo/Chile/*"
57RPROVIDES_tzdata-americas = "tzdata-americas"
58
59FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
60RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
61
62FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
63RPROVIDES_tzdata-arctic = "tzdata-arctic"
64
65FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
66 ${datadir}/zoneinfo/Indian/* \
67 ${datadir}/zoneinfo/Mideast/*"
68RPROVIDES_tzdata-asia = "tzdata-asia"
69
70FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
71RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
72
73FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
74RPROVIDES_tzdata-australia = "tzdata-australia"
75
76FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
77RPROVIDES_tzdata-europe = "tzdata-europe"
78
79FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
80RPROVIDES_tzdata-pacific = "tzdata-pacific"
81
82FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
83RPROVIDES_tzdata-posix = "tzdata-posix"
84
85FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
86RPROVIDES_tzdata-right = "tzdata-right"
87
88
89FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
90 ${datadir}/zoneinfo/Egypt \
91 ${datadir}/zoneinfo/Eire \
92 ${datadir}/zoneinfo/Factory \
93 ${datadir}/zoneinfo/GB-Eire \
94 ${datadir}/zoneinfo/Hongkong \
95 ${datadir}/zoneinfo/Iceland \
96 ${datadir}/zoneinfo/Iran \
97 ${datadir}/zoneinfo/Israel \
98 ${datadir}/zoneinfo/Jamaica \
99 ${datadir}/zoneinfo/Japan \
100 ${datadir}/zoneinfo/Kwajalein \
101 ${datadir}/zoneinfo/Libya \
102 ${datadir}/zoneinfo/Navajo \
103 ${datadir}/zoneinfo/Poland \
104 ${datadir}/zoneinfo/Portugal \
105 ${datadir}/zoneinfo/Singapore \
106 ${datadir}/zoneinfo/Turkey"
107RPROVIDES_tzdata-misc = "tzdata-misc"
108
109
110FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
111 ${datadir}/zoneinfo/America/Anchorage \
112 ${datadir}/zoneinfo/America/Los_Angeles \
113 ${datadir}/zoneinfo/America/Denver \
114 ${datadir}/zoneinfo/America/Chicago \
115 ${datadir}/zoneinfo/America/New_York \
116 ${datadir}/zoneinfo/America/Caracas \
117 ${datadir}/zoneinfo/America/Sao_Paulo \
118 ${datadir}/zoneinfo/Europe/London \
119 ${datadir}/zoneinfo/Europe/Paris \
120 ${datadir}/zoneinfo/Africa/Cairo \
121 ${datadir}/zoneinfo/Europe/Moscow \
122 ${datadir}/zoneinfo/Asia/Dubai \
123 ${datadir}/zoneinfo/Asia/Karachi \
124 ${datadir}/zoneinfo/Asia/Dhaka \
125 ${datadir}/zoneinfo/Asia/Bankok \
126 ${datadir}/zoneinfo/Asia/Hong_Kong \
127 ${datadir}/zoneinfo/Asia/Tokyo \
128 ${datadir}/zoneinfo/Australia/Darwin \
129 ${datadir}/zoneinfo/Australia/Adelaide \
130 ${datadir}/zoneinfo/Australia/Brisbane \
131 ${datadir}/zoneinfo/Australia/Sydney \
132 ${datadir}/zoneinfo/Pacific/Noumea \
133 ${datadir}/zoneinfo/CET \
134 ${datadir}/zoneinfo/CST6CDT \
135 ${datadir}/zoneinfo/EET \
136 ${datadir}/zoneinfo/EST \
137 ${datadir}/zoneinfo/EST5EDT \
138 ${datadir}/zoneinfo/GB \
139 ${datadir}/zoneinfo/GMT \
140 ${datadir}/zoneinfo/GMT+0 \
141 ${datadir}/zoneinfo/GMT-0 \
142 ${datadir}/zoneinfo/GMT0 \
143 ${datadir}/zoneinfo/Greenwich \
144 ${datadir}/zoneinfo/HST \
145 ${datadir}/zoneinfo/MET \
146 ${datadir}/zoneinfo/MST \
147 ${datadir}/zoneinfo/MST7MDT \
148 ${datadir}/zoneinfo/NZ \
149 ${datadir}/zoneinfo/NZ-CHAT \
150 ${datadir}/zoneinfo/PRC \
151 ${datadir}/zoneinfo/PST8PDT \
152 ${datadir}/zoneinfo/ROC \
153 ${datadir}/zoneinfo/ROK \
154 ${datadir}/zoneinfo/UCT \
155 ${datadir}/zoneinfo/UTC \
156 ${datadir}/zoneinfo/Universal \
157 ${datadir}/zoneinfo/W-SU \
158 ${datadir}/zoneinfo/WET \
159 ${datadir}/zoneinfo/Zulu \
160 ${datadir}/zoneinfo/Etc/*"
diff --git a/meta/packages/uboot/files/fix-arm920t-eabi.patch b/meta/packages/uboot/files/fix-arm920t-eabi.patch
deleted file mode 100644
index 69cb75891d..0000000000
--- a/meta/packages/uboot/files/fix-arm920t-eabi.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1---
2 cpu/arm920t/config.mk | 4 ++--
3 1 file changed, 2 insertions(+), 2 deletions(-)
4
5--- u-boot-1.3.2.orig/cpu/arm920t/config.mk
6+++ u-boot-1.3.2/cpu/arm920t/config.mk
7@@ -22,13 +22,13 @@
8 #
9
10 PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
11 -msoft-float
12
13-PLATFORM_CPPFLAGS += -march=armv4
14+#PLATFORM_CPPFLAGS += -march=armv4
15 # =========================================================================
16 #
17 # Supply options according to compiler version
18 #
19 # =========================================================================
20-PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
21+PLATFORM_CPPFLAGS +=$(call cc-option)
22 PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
diff --git a/meta/packages/uboot/u-boot-mkimage-native_1.3.2.bb b/meta/packages/uboot/u-boot-mkimage-native_1.3.2.bb
deleted file mode 100644
index fcba0d5662..0000000000
--- a/meta/packages/uboot/u-boot-mkimage-native_1.3.2.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1DESCRIPTION = "U-boot bootloader mkimage tool"
2LICENSE = "GPL"
3SECTION = "bootloader"
4
5SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
6 file://fix-arm920t-eabi.patch;patch=1"
7
8S = "${WORKDIR}/u-boot-${PV}"
9
10inherit native
11
12EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
13
14do_compile () {
15 oe_runmake smdk2410_config
16 oe_runmake tools
17}
18
19do_install () {
20 install -d ${D}${bindir}/
21 install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
22 ln -sf uboot-mkimage ${D}${bindir}/mkimage
23}
diff --git a/meta/packages/uboot/u-boot-mkimage_2009.08.bb b/meta/packages/uboot/u-boot-mkimage_2009.08.bb
deleted file mode 100644
index bf07198beb..0000000000
--- a/meta/packages/uboot/u-boot-mkimage_2009.08.bb
+++ /dev/null
@@ -1,25 +0,0 @@
1DESCRIPTION = "U-boot bootloader mkimage tool"
2LICENSE = "GPL"
3SECTION = "bootloader"
4
5PR = "r1"
6
7SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2"
8
9S = "${WORKDIR}/u-boot-${PV}"
10
11EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
12
13BBCLASSEXTEND = "native nativesdk"
14
15do_compile () {
16 oe_runmake smdk2410_config
17 oe_runmake tools
18}
19
20do_install () {
21 install -d ${D}${bindir}
22 install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
23 ln -sf uboot-mkimage ${D}${bindir}/mkimage
24}
25
diff --git a/meta/packages/uboot/u-boot-omap3-git/beagleboard/name.patch b/meta/packages/uboot/u-boot-omap3-git/beagleboard/name.patch
deleted file mode 100644
index ac03e47774..0000000000
--- a/meta/packages/uboot/u-boot-omap3-git/beagleboard/name.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1--- git/Makefile.orig 2008-07-25 16:21:22.000000000 -0700
2+++ git/Makefile 2008-07-27 06:49:08.000000000 -0700
3@@ -2582,8 +2582,8 @@ SMN42_config : unconfig
4 #########################################################################
5 ## ARM CORTEX Systems
6 #########################################################################
7-omap3530beagle_config : unconfig
8- @$(MKCONFIG) $(@:_config=) arm omap3 omap3530beagle
9+beagleboard_config : unconfig
10+ @$(MKCONFIG) omap3530beagle arm omap3 omap3530beagle
11
12 overo_config : unconfig
13 @$(MKCONFIG) $(@:_config=) arm omap3 overo
14
diff --git a/meta/packages/uboot/u-boot-omap3_git.bb b/meta/packages/uboot/u-boot-omap3_git.bb
deleted file mode 100644
index 480780ebfc..0000000000
--- a/meta/packages/uboot/u-boot-omap3_git.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1require u-boot.inc
2
3FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/u-boot-omap3-git/${MACHINE}"
4
5SRCREV = "f40f6db278f602b55820693634a7256b0b4e4b80"
6
7PV = "2008.10-rc2+${PR}+git${SRCREV}"
8PR="r2"
9
10SRC_URI = "git://gitorious.org/u-boot-omap3/mainline.git;branch=master;protocol=git"
11
12UBOOT_MACHINE_beagleboard = "omap3_beagle_config"
13UBOOT_MACHINE_omap3evm = "omap3_evm_config"
14UBOOT_MACHINE_overo = "omap3_overo_config"
15
16S = "${WORKDIR}/git"
17
18PACKAGE_ARCH = "${MACHINE_ARCH}"
19
20COMPATIBLE_MACHINE = "(beagleboard|omap3evm|overo)"
diff --git a/meta/packages/uboot/u-boot.inc b/meta/packages/uboot/u-boot.inc
deleted file mode 100644
index 889f6215ed..0000000000
--- a/meta/packages/uboot/u-boot.inc
+++ /dev/null
@@ -1,38 +0,0 @@
1DESCRIPTION = "U-boot bootloader"
2HOMEPAGE = "http://u-boot.sf.net"
3SECTION = "bootloaders"
4PRIORITY = "optional"
5LICENSE = "GPL"
6PROVIDES = "virtual/bootloader"
7
8inherit deploy
9
10PARALLEL_MAKE=""
11
12EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
13
14UBOOT_MACHINE ?= "${MACHINE}_config"
15UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
16UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
17
18do_compile () {
19 unset LDFLAGS
20 unset CFLAGS
21 unset CPPFLAGS
22 oe_runmake ${UBOOT_MACHINE}
23 oe_runmake all
24}
25
26do_deploy () {
27 install ${S}/u-boot.bin ${DEPLOYDIR}/${UBOOT_IMAGE}
28
29 cd ${DEPLOYDIR}
30 rm -f ${UBOOT_SYMLINK}
31 ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
32}
33addtask deploy before do_build after do_compile
34
35do_install() {
36 install -d ${D}${bindir}
37 install -m 755 tools/mkimage ${D}${bindir}/
38}
diff --git a/meta/packages/ubootchart/files/sysvinit.patch b/meta/packages/ubootchart/files/sysvinit.patch
deleted file mode 100644
index de9fb0b17d..0000000000
--- a/meta/packages/ubootchart/files/sysvinit.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: ubootchart.conf
2===================================================================
3--- ubootchart.conf (revision 9)
4+++ ubootchart.conf (working copy)
5@@ -1,6 +1,6 @@
6
7 # If you want to chain on and run somthing other than /sbin/init...
8-export init_prog=/sbin/init
9+export init_prog=/sbin/init.sysvinit
10
11 # On startup ubootchart will mount a tmpfs filesystem at this
12 # location and chdir here. This is only used for the logging of
diff --git a/meta/packages/ubootchart/files/ubootchart-stop b/meta/packages/ubootchart/files/ubootchart-stop
deleted file mode 100644
index 3444069c9a..0000000000
--- a/meta/packages/ubootchart/files/ubootchart-stop
+++ /dev/null
@@ -1,3 +0,0 @@
1#! /bin/sh
2
3kill -USR1 $(pidof ubootchartd_bin)
diff --git a/meta/packages/ubootchart/files/ubootchart.desktop b/meta/packages/ubootchart/files/ubootchart.desktop
deleted file mode 100644
index 5552b3bc6f..0000000000
--- a/meta/packages/ubootchart/files/ubootchart.desktop
+++ /dev/null
@@ -1,6 +0,0 @@
1[Desktop Entry]
2Encoding=UTF-8
3Exec=/sbin/ubootchart-stop
4Name=Stop Bootchart
5Type=Application
6Categories=Programming;
diff --git a/meta/packages/ubootchart/ubootchart_svn.bb b/meta/packages/ubootchart/ubootchart_svn.bb
deleted file mode 100644
index cd292b6943..0000000000
--- a/meta/packages/ubootchart/ubootchart_svn.bb
+++ /dev/null
@@ -1,37 +0,0 @@
1DESCRIPTION = "A boot profiling tool"
2HOMEPAGE = "http://code.google.com/p/ubootchart/"
3LICENSE = "GPLv3"
4PV = "0.0+r${SRCREV}"
5PR = "r4"
6
7#RRECOMMENDS = "acct"
8
9SRC_URI = "svn://ubootchart.googlecode.com/svn/;proto=http;module=trunk \
10 file://sysvinit.patch;patch=1;pnum=0 \
11 file://ubootchart-stop \
12 file://ubootchart.desktop"
13
14S = "${WORKDIR}/trunk"
15
16inherit update-alternatives
17
18ALTERNATIVE_NAME = "init"
19ALTERNATIVE_LINK = "${base_sbindir}/init"
20ALTERNATIVE_PATH = "${base_sbindir}/ubootchartd"
21ALTERNATIVE_PRIORITY = "70"
22
23do_compile() {
24 ${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} ${INCLUDES} ${S}/ubootchartd_bin.c -o ubootchartd_bin
25}
26
27do_install() {
28 install -m 0755 -d ${D}/sbin ${D}/etc/ubootchart ${D}/usr/share/applications
29 install -m 0755 ${S}/ubootchartd_bin ${D}/sbin
30 install -m 0755 ${S}/ubootchartd ${D}/sbin
31 install -m 0644 ${S}/ubootchart.conf ${D}/etc/ubootchart
32 install -m 0755 ${S}/start.sh ${D}/etc/ubootchart
33 install -m 0755 ${S}/finish.sh ${D}/etc/ubootchart
34
35 install -m 0755 ${WORKDIR}/ubootchart-stop ${D}/sbin
36 install -m 0644 ${WORKDIR}/ubootchart.desktop ${D}/usr/share/applications
37}
diff --git a/meta/packages/unzip/unzip_6.0.bb b/meta/packages/unzip/unzip_6.0.bb
deleted file mode 100644
index 069dfb8781..0000000000
--- a/meta/packages/unzip/unzip_6.0.bb
+++ /dev/null
@@ -1,25 +0,0 @@
1DESCRIPTION = "A (de)compression library for the ZIP format"
2HOMEPAGE = "http://www.info-zip.org"
3SECTION = "console/utils"
4LICENSE = "Info-ZIP"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29"
6PE = "1"
7PR = "r0"
8
9SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz"
10S = "${WORKDIR}/unzip60"
11
12export LD = "${CC}"
13LD_virtclass-native = "${CC}"
14
15do_compile() {
16 oe_runmake -f unix/Makefile generic
17}
18
19do_install() {
20 oe_runmake -f unix/Makefile install prefix=${D}${prefix}
21 install -d ${D}${mandir}
22 mv ${D}${prefix}/man/* ${D}${mandir}
23}
24
25BBCLASSEXTEND = "native"
diff --git a/meta/packages/usbutils/usbutils_0.86.bb b/meta/packages/usbutils/usbutils_0.86.bb
deleted file mode 100644
index 8e4a3da453..0000000000
--- a/meta/packages/usbutils/usbutils_0.86.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1DESCRIPTION = "Host side USB console utilities."
2HOMEPAGE = "http://www.linux-usb.org"
3SECTION = "base"
4PRIORITY = "optional"
5
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
8
9DEPENDS = "libusb zlib"
10RDEPENDS_${PN} = "${PN}-ids"
11PR = "r0"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/linux-usb/usbutils-${PV}.tar.gz"
14
15inherit autotools
16
17do_install_append() {
18 ln -s ../sbin/lsusb ${D}${bindir}/lsusb
19}
20
21PACKAGES += "${PN}-ids"
22
23FILES_${PN} += "${datadir}/pkgconfig"
24FILES_${PN}-ids = "${datadir}/usb*"
diff --git a/meta/packages/util-linux/files/MCONFIG b/meta/packages/util-linux/files/MCONFIG
deleted file mode 100644
index 3fea2c02d7..0000000000
--- a/meta/packages/util-linux/files/MCONFIG
+++ /dev/null
@@ -1,223 +0,0 @@
1# MCONFIG -- Configuration stuff for util-linux
2# Created: Sat Feb 4 15:50:30 1995
3# Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
4
5# For a user-mode install, make (at least) three changes:
6# - remove the `-o root' part in INSTALLSUID
7# - set USE_TTY_GROUP=no
8# - define DESTDIR
9
10# Select for ARCH one of intel, alpha, sparc, arm, m68k, mips
11# Select for CPU i386 if the binaries must be able to run on an intel 386
12# (by default i486 code is generated, see below)
13CPU=$(shell uname -m)
14ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/')
15
16# If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp
17# will use PAM for authentication. Additionally, passwd will not be
18# installed as it is not PAM aware.
19HAVE_PAM=no
20
21# If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd,
22# and vipw will not be built or installed from the login-utils
23# subdirectory.
24HAVE_SHADOW=yes
25
26# If HAVE_PASSWD is set to "yes", then passwd will not be built or
27# installed from the login-utils subdirectory (but login, chfn, chsh,
28# newgrp, and vipw *will* be installed).
29HAVE_PASSWD=no
30
31# If you use chfn and chsh from this package, REQUIRE_PASSWORD will require
32# non-root users to enter the account password before updating /etc/passwd.
33REQUIRE_PASSWORD=yes
34#REQUIRE_PASSWORD=no
35
36# If you use chsh from this package, ONLY_LISTED_SHELLS will require that
37# the selected shell be listed in /etc/shells -- otherwise only a warning is
38# printed. This prevents someone from setting their shell to /bin/false.
39ONLY_LISTED_SHELLS=yes
40#ONLY_LISTED_SHELLS=no
41
42
43# If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not
44# be built or installed from the login-utils subdirectory. (The shutdown
45# and halt that come with the SysVinit package should be used with the init
46# found in that package.)
47HAVE_SYSVINIT=no
48
49# If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will
50# not be built or installed from the login-utils subdirectory. (The
51# shutdown and init from the SysVinit package do not depend on the last,
52# mesg, and wall from that package.)
53HAVE_SYSVINIT_UTILS=no
54
55# If HAVE_WRITE is set to "yes", then write will not be built or
56# installed from the misc-utils subdirectory.
57# (There is a network aware write in netwrite from NetKit 0.16 or later.)
58HAVE_WRITE=no
59
60# If HAVE_GETTY is set to "yes", then agetty will not be built or
61# installed from the login-utils subdirectory. Note that agetty can
62# co-exist with other gettys, so this option should never be used.
63HAVE_GETTY=no
64
65# If USE_TTY_GROUP is set to "yes", then wall and write will be installed
66# setgid to the "tty" group, and mesg will only set the group write bit.
67# Note that this is only useful if login/xterm/etc. change the group of the
68# user's tty to "tty" [The login in util-linux does this correctly, and
69# xterm will do it correctly if X is compiled with USE_TTY_GROUP set
70# properly.]
71USE_TTY_GROUP=no
72
73# If HAVE_KILL is set to "yes", then kill will not be built or
74# installed from the misc-utils subdirectory.
75# (There is also a kill in the procps package.)
76HAVE_KILL=no
77
78# If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN
79# to the current user, allowing her to make a screendump and do other
80# nifty things on the console, but also allowing him to keep an open
81# file descriptor after logging out to trick the next user.
82ALLOW_VCS_USE=yes
83
84# If HAVE_RESET is set to "yes", then reset won't be installed. The version
85# of reset that comes with the ncurses package is less aggressive.
86HAVE_RESET=yes
87
88# If HAVE_SLN is set to "yes", then sln won't be installed
89# (but the man page sln.8 will be installed anyway).
90# sln also comes with libc and glibc.
91HAVE_SLN=no
92
93# If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
94HAVE_FDUTILS=no
95
96# If SILENT_PG is set to "yes", then pg will not ring the bell
97# when an invalid key is pressed
98SILENT_PG=no
99
100# If configure decides that Native Language Support (NLS) is available,
101# it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set
102# DISABLE_NLS to "yes".
103DISABLE_NLS=no
104
105# Different optimizations for different cpus.
106# gcc 3.0 likes options -mcpu=i486 instead of -m486
107ifeq "$(ARCH)" "intel"
108 ifeq "$(HAVE_OLD_GCC)" "yes"
109 CPUHEAD=-m
110 else
111 CPUHEAD=-mcpu=i
112 endif
113 ifeq "$(CPU)" "i386"
114 CPUTAIL=386
115 else
116 CPUTAIL=486
117 endif
118 CPUOPT= $(CPUHEAD)$(CPUTAIL)
119 OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer
120else
121 ifeq "$(ARCH)" "arm"
122 OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
123 else
124 OPT= -O2 -fomit-frame-pointer
125 endif
126endif
127
128WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
129
130LIB=../lib
131
132ERR_O=$(LIB)/err.o
133
134# Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk)
135# (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.)
136# HAVE_SLANG=yes
137# There is a subdirectory /usr/include/slang containing slcurses.h
138# SLANGFLAGS=-I/usr/include/slang
139# No such subdirectory - slcurses.h lives in /usr/include
140# (no extra definition required).
141LIBSLANG=-lslang
142
143#
144# Paths used for compilation (not all are actually used, see CFLAGS below)
145#
146DEV_DIR= /dev
147ETC_DIR= /etc
148SBIN_DIR= /sbin
149USRSBIN_DIR= /usr/sbin
150USRLIB_DIR= /usr/lib
151USRBIN_DIR= /usr/bin
152USRGAMES_DIR= /usr/games
153USRSHAREMISC_DIR=/usr/share/misc
154LOCALE_DIR= /usr/share/locale
155BIN_DIR= /bin
156VAR_PATH= /var
157LOG_DIR= /var/log
158MAN_DIR= /usr/share/man
159INFO_DIR= /usr/share/info
160
161#
162# Paths used for install
163#
164DEVDIR= $(DESTDIR)$(DEV_DIR)
165ETCDIR= $(DESTDIR)$(ETC_DIR)
166SBINDIR= $(DESTDIR)$(SBIN_DIR)
167USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR)
168USRLIBDIR= $(DESTDIR)$(USRLIB_DIR)
169USRBINDIR= $(DESTDIR)$(USRBIN_DIR)
170USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR)
171USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR)
172LOCALEDIR= $(DESTDIR)$(LOCALE_DIR)
173BINDIR= $(DESTDIR)$(BIN_DIR)
174VARPATH= $(DESTDIR)$(VAR_PATH)
175LOGDIR= $(DESTDIR)$(LOG_DIR)
176MANDIR= $(DESTDIR)$(MAN_DIR)
177MAN1DIR= $(MANDIR)/man1
178MAN3DIR= $(MANDIR)/man3
179MAN5DIR= $(MANDIR)/man5
180MAN6DIR= $(MANDIR)/man6
181MAN8DIR= $(MANDIR)/man8
182INFODIR= $(DESTDIR)$(INFO_DIR)
183
184# Directory for shutdown, halt, reboot, etc.
185SHUTDOWNDIR= $(SBINDIR)
186
187# Modes
188DIRMODE= 755
189BINMODE= 755
190MANMODE= 644
191DATMODE= 644
192INFOMODE= 644
193SUIDMODE= 4755
194
195CHMOD= chmod
196INSTALL= install
197INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
198INSTALLBIN= $(INSTALL) -m $(BINMODE)
199INSTALLMAN= $(INSTALL) -m $(MANMODE)
200INSTALLDAT= $(INSTALL) -m $(DATMODE)
201INSTALLSUID= $(INSTALL) -m $(SUIDMODE)
202
203ifeq "$(DISABLE_NLS)" "yes"
204NLSFLAGS = -DDISABLE_NLS
205endif
206
207CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \
208 $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \
209 -D_FILE_OFFSET_BITS=64 \
210 -DSBINDIR=\"$(SBIN_DIR)\" \
211 -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \
212 -DLOGDIR=\"$(LOG_DIR)\" \
213 -DVARPATH=\"$(VAR_PATH)\" \
214 -DLOCALEDIR=\"$(LOCALE_DIR)\" \
215 $(CFLAGS)
216
217
218%.o: %.c
219 $(CC) -c $(CFLAGS) $< -o $@
220
221%: %.cc
222 $(CXX) $(CFLAGS) $< -o $@
223
diff --git a/meta/packages/util-linux/files/debian-bug392236.patch b/meta/packages/util-linux/files/debian-bug392236.patch
deleted file mode 100644
index fcd2046e34..0000000000
--- a/meta/packages/util-linux/files/debian-bug392236.patch
+++ /dev/null
@@ -1,203 +0,0 @@
1Index: util-linux-2.12r/fdisk/llseek.c
2===================================================================
3--- util-linux-2.12r.orig/fdisk/llseek.c 2003-07-13 23:13:33.000000000 +0200
4+++ util-linux-2.12r/fdisk/llseek.c 2007-04-04 19:01:14.000000000 +0200
5@@ -14,30 +14,23 @@
6
7 #ifdef __linux__
8
9-#ifdef HAVE_LLSEEK
10-#include <syscall.h>
11-
12-#else /* HAVE_LLSEEK */
13+#include <sys/syscall.h>
14+#ifndef HAVE_LLSEEK
15
16 #if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
17
18 #define my_llseek lseek
19
20 #else
21-#include <linux/unistd.h> /* for __NR__llseek */
22-
23-static int _llseek (unsigned int, unsigned long,
24- unsigned long, long long *, unsigned int);
25
26-#ifdef __NR__llseek
27+#ifdef SYS__llseek
28
29-static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
30- unsigned long, offset_low,long long *,result,
31- unsigned int, origin)
32+#define _llseek(fd, offset_high, offset_low, result, origin) \
33+ syscall(SYS__llseek, fd, offset_high, offset_low, result, origin)
34
35 #else
36
37-/* no __NR__llseek on compilation machine - might give it explicitly */
38+/* no SYS__llseek on compilation machine - might give it explicitly */
39 static int _llseek (unsigned int fd, unsigned long oh,
40 unsigned long ol, long long *result,
41 unsigned int origin) {
42Index: util-linux-2.12r/fdisk/sfdisk.c
43===================================================================
44--- util-linux-2.12r.orig/fdisk/sfdisk.c 2005-01-04 23:31:57.000000000 +0100
45+++ util-linux-2.12r/fdisk/sfdisk.c 2007-04-04 19:01:14.000000000 +0200
46@@ -48,7 +48,7 @@
47 #include <sys/ioctl.h>
48 #include <sys/stat.h>
49 #include <sys/utsname.h>
50-#include <linux/unistd.h> /* _syscall */
51+#include <sys/syscall.h>
52 #include "nls.h"
53 #include "common.h"
54
55@@ -177,9 +177,8 @@
56 #endif
57
58 #ifndef use_lseek
59-static __attribute__used
60-_syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo,
61- loff_t *, res, unsigned int, wh);
62+#define _llseek(fd, hi, lo, res, wh) \
63+ syscall(SYS__llseek, fd, hi, lo, res, wh)
64 #endif
65
66 static int
67Index: util-linux-2.12r/lib/my_reboot.c
68===================================================================
69--- util-linux-2.12r.orig/lib/my_reboot.c 1999-07-09 04:56:36.000000000 +0200
70+++ util-linux-2.12r/lib/my_reboot.c 2007-04-04 19:01:14.000000000 +0200
71@@ -23,10 +23,11 @@
72 #else /* no USE_LIBC */
73
74 /* direct syscall version */
75-#include <linux/unistd.h>
76+#include <sys/syscall.h>
77
78-#ifdef _syscall3
79-_syscall3(int, reboot, int, magic, int, magic_too, int, cmd);
80+#ifdef SYS_reboot
81+#define reboot(magic, magic2, cmd) \
82+ syscall(SYS_reboot, magic, magic2, cmd)
83 #else
84 /* Let us hope we have a 3-argument reboot here */
85 extern int reboot(int, int, int);
86Index: util-linux-2.12r/misc-utils/setterm.c
87===================================================================
88--- util-linux-2.12r.orig/misc-utils/setterm.c 2003-10-17 18:17:51.000000000 +0200
89+++ util-linux-2.12r/misc-utils/setterm.c 2007-04-04 19:01:14.000000000 +0200
90@@ -119,14 +119,13 @@
91
92 #if __GNU_LIBRARY__ < 5
93 #ifndef __alpha__
94-# include <linux/unistd.h>
95-#define __NR_klogctl __NR_syslog
96-_syscall3(int, klogctl, int, type, char*, buf, int, len);
97+# include <sys/syscall.h>
98+#define klogctl(type, buf, len) \
99+ syscall(SYS_syslog, type, buf, len)
100 #else /* __alpha__ */
101 #define klogctl syslog
102 #endif
103 #endif
104-extern int klogctl(int type, char *buf, int len);
105
106 /* Constants. */
107
108Index: util-linux-2.12r/mount/swapon.c
109===================================================================
110--- util-linux-2.12r.orig/mount/swapon.c 2004-12-22 10:50:19.000000000 +0100
111+++ util-linux-2.12r/mount/swapon.c 2007-04-04 19:01:14.000000000 +0200
112@@ -82,11 +82,11 @@
113 #else
114 /* We want a swapon with two args, but have an old libc.
115 Build the kernel call by hand. */
116-#include <linux/unistd.h>
117-static
118-_syscall2(int, swapon, const char *, path, int, flags);
119-static
120-_syscall1(int, swapoff, const char *, path);
121+#include <sys/syscall.h>
122+#define swapon(path, flags) \
123+ syscall(SYS_swapon, path, flags)
124+#define swapoff(path) \
125+ syscall(SYS_swapoff, path)
126 #endif
127 #else
128 /* just do as libc says */
129Index: util-linux-2.12r/mount/umount.c
130===================================================================
131--- util-linux-2.12r.orig/mount/umount.c 2007-04-04 19:01:14.000000000 +0200
132+++ util-linux-2.12r/mount/umount.c 2007-04-04 19:02:22.000000000 +0200
133@@ -37,14 +37,13 @@
134 #else /* MNT_FORCE */
135
136 /* Does the present kernel source know about umount2? */
137-#include <linux/unistd.h>
138-#ifdef __NR_umount2
139+#include <sys/syscall.h>
140+#ifdef SYS_umount2
141
142-int umount2(const char *path, int flags);
143+#define umount2(path, flags) \
144+ syscall(SYS_umount2, path, flags)
145
146-_syscall2(int, umount2, const char *, path, int, flags);
147-
148-#else /* __NR_umount2 */
149+#else /* SYS_umount2 */
150
151 static int
152 umount2(const char *path, int flags) {
153@@ -52,7 +51,7 @@
154 errno = ENOSYS;
155 return -1;
156 }
157-#endif /* __NR_umount2 */
158+#endif /* SYS_umount2 */
159
160 #if !defined(MNT_FORCE)
161 /* dare not try to include <linux/mount.h> -- lots of errors */
162Index: util-linux-2.12r/partx/partx.c
163===================================================================
164--- util-linux-2.12r.orig/partx/partx.c 2004-08-23 22:13:27.000000000 +0200
165+++ util-linux-2.12r/partx/partx.c 2007-04-04 19:01:14.000000000 +0200
166@@ -338,10 +338,9 @@
167 #endif
168
169 #ifdef NEED__llseek
170-#include <linux/unistd.h> /* _syscall */
171-static
172-_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
173- long long *, res, uint, wh);
174+#include <sys/syscall.h>
175+#define _llseek(fd, hi, lo, res, wh) \
176+ syscall(SYS__llseek, fd, hi, lo, res, wh)
177 #endif
178
179 static int
180Index: util-linux-2.12r/sys-utils/dmesg.c
181===================================================================
182--- util-linux-2.12r.orig/sys-utils/dmesg.c 2004-05-04 18:38:12.000000000 +0200
183+++ util-linux-2.12r/sys-utils/dmesg.c 2007-04-04 19:01:14.000000000 +0200
184@@ -29,7 +29,7 @@
185 * Only function 3 is allowed to non-root processes.
186 */
187
188-#include <linux/unistd.h>
189+#include <sys/syscall.h>
190 #include <stdio.h>
191 #include <getopt.h>
192 #include <stdlib.h>
193@@ -38,8 +38,8 @@
194 #if __GNU_LIBRARY__ < 5
195
196 #ifndef __alpha__
197-# define __NR_klogctl __NR_syslog
198- static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
199+# define klogctl(type, b, len) \
200+ syscall(SYS_syslog, type, b, len)
201 #else /* __alpha__ */
202 #define klogctl syslog
203 #endif
diff --git a/meta/packages/util-linux/files/defines.h b/meta/packages/util-linux/files/defines.h
deleted file mode 100644
index 6ce6b86df5..0000000000
--- a/meta/packages/util-linux/files/defines.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#define UTIL_LINUX_VERSION "2.12"
2#define util_linux_version "util-linux-2.12"
3
4#define HAVE_blkpg_h
5#define HAVE_kd_h
6#define HAVE_locale_h
7#define HAVE_langinfo_h
8#define HAVE_sys_user_h
9#define HAVE_asm_types_h
10//#define NEED_tqueue_h
diff --git a/meta/packages/util-linux/files/fdiskbsdlabel_thumb.diff b/meta/packages/util-linux/files/fdiskbsdlabel_thumb.diff
deleted file mode 100644
index e6f82b5b46..0000000000
--- a/meta/packages/util-linux/files/fdiskbsdlabel_thumb.diff
+++ /dev/null
@@ -1,12 +0,0 @@
1--- util-linux-2.12r/fdisk/fdiskbsdlabel.h.orig 2006-01-21 23:53:51.000000000 +0100
2+++ util-linux-2.12r/fdisk/fdiskbsdlabel.h 2006-01-21 23:54:35.000000000 +0100
3@@ -52,6 +52,9 @@
4 #elif defined (__s390__) || defined (__s390x__)
5 #define BSD_LABELSECTOR 1
6 #define BSD_LABELOFFSET 0
7+#elif defined (__thumb__)
8+#define BSD_LABELSECTOR 1
9+#define BSD_LABELOFFSET 0
10 #else
11 #error unknown architecture
12 #endif
diff --git a/meta/packages/util-linux/files/fix-make-c.patch b/meta/packages/util-linux/files/fix-make-c.patch
deleted file mode 100644
index bf1082e85c..0000000000
--- a/meta/packages/util-linux/files/fix-make-c.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From: Karel Zak <kzak@redhat.com>
2Date: Mon, 11 May 2009 09:49:00 +0000 (+0200)
3Subject: build-sys: fix "make -C" bug
4X-Git-Url: http://git.kernel.org/?p=utils%2Futil-linux-ng%2Futil-linux-ng.git;a=commitdiff_plain;h=2ef7d41e6bbb7c842c06e911ffc562335a467b5d
5
6build-sys: fix "make -C" bug
7
8Running:
9
10./configure --with-fsprobe=builtin
11make -C mount mount
12
13causes the following error:
14
15gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -include ../config.h
16-I../include -DLOCALEDIR=\"/home/matthew/util-linux-ng/share/locale\"
17-fsigned-char -I../libs/blkid/src -g -O2 -MT mount-setproctitle.o
18-MD -MP -MF .deps/mount-setproctitle.Tpo -c -o mount-setproctitle.o
19`test -f '../lib/setproctitle.c' || echo './'`../lib/setproctitle.c mv
20-f .deps/mount-setproctitle.Tpo .deps/mount-setproctitle.Po
21make -C
22make: option requires an argument -- 'C'
23Usage: make [options] [target] ...
24...
25
26Reported-by: Matthew Burgess <matthew@linuxfromscratch.org>
27Signed-off-by: Karel Zak <kzak@redhat.com>
28---
29
30diff --git a/config/include-Makefile.am b/config/include-Makefile.am
31index b42a0c3..d5da619 100644
32--- a/config/include-Makefile.am
33+++ b/config/include-Makefile.am
34@@ -17,6 +17,7 @@ dist_noinst_DATA = $(dist_man_MANS)
35 # Paths to in-tree libraries (use ul_ prefix to avoid possible collisions)
36 #
37 ul_libblkid_srcdir = $(top_srcdir)/libs/blkid/src
38+ul_libblkid_builddir = $(top_builddir)/libs/blkid/src
39 ul_libblkid_la = $(top_builddir)/libs/blkid/src/libblkid.la
40
41 $(ul_libblkid_la):
diff --git a/meta/packages/util-linux/files/gcc34.patch b/meta/packages/util-linux/files/gcc34.patch
deleted file mode 100644
index 8c4a20cdca..0000000000
--- a/meta/packages/util-linux/files/gcc34.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- util-linux-2.12o/disk-utils/fsck.cramfs.c~gcc34
7+++ util-linux-2.12o/disk-utils/fsck.cramfs.c
8@@ -77,15 +77,7 @@
9 #define PAD_SIZE 512
10
11 #include <asm/page.h>
12-#ifdef PAGE_SIZE
13-#define PAGE_CACHE_SIZE ((int) PAGE_SIZE)
14-#elif defined __ia64__
15-#define PAGE_CACHE_SIZE (16384)
16-#elif defined __alpha__
17-#define PAGE_CACHE_SIZE (8192)
18-#else
19 #define PAGE_CACHE_SIZE (4096)
20-#endif
21
22 /* Guarantee access to at least 8kB at a time */
23 #define ROMBUFFER_BITS 13
diff --git a/meta/packages/util-linux/files/glibc-fix.patch b/meta/packages/util-linux/files/glibc-fix.patch
deleted file mode 100644
index 6d0c2fcefa..0000000000
--- a/meta/packages/util-linux/files/glibc-fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1--- /tmp/cmos.c 2006-11-21 11:38:55.000000000 +0100
2+++ util-linux-2.12r/hwclock/cmos.c 2006-11-21 11:41:45.458554000 +0100
3@@ -46,15 +46,16 @@
4
5 #include <unistd.h> /* for geteuid() */
6 #include <fcntl.h> /* for O_RDWR */
7+#include <linux/version.h>
8 #include <errno.h>
9 #include "../defines.h" /* for HAVE_sys_io_h */
10 #include "nls.h"
11
12 #if defined(__i386__)
13-#ifdef HAVE_sys_io_h
14-#include <sys/io.h>
15+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
16+#include <asm/io.h>
17 #else
18-#include <asm/io.h> /* for inb, outb */
19+#include <sys/io.h> /* for inb, outb */
20 #endif
21 #elif defined(__alpha__)
22 /* <asm/io.h> fails to compile, probably because of u8 etc */
diff --git a/meta/packages/util-linux/files/make_include b/meta/packages/util-linux/files/make_include
deleted file mode 100644
index e6abcd91f7..0000000000
--- a/meta/packages/util-linux/files/make_include
+++ /dev/null
@@ -1,17 +0,0 @@
1VERSION=2.12
2CC=gcc
3CFLAGS=
4LDFLAGS=
5HAVE_OLD_GCC=yes
6HAVE_RAW_H=yes
7HAVE_NCURSES=yes
8CURSESFLAGS=-DNCH=1
9LIBCURSES=-lncurses
10HAVE_TERMCAP=no
11NEED_LIBCRYPT=yes
12FOREIGN = --foreign-user
13HAVE_XGETTEXT=yes
14HAVE_OPENPTY=yes
15HAVE_PIVOT_ROOT=yes
16HAVE_GOOD_RPC=yes
17HAVE_ZLIB=yes
diff --git a/meta/packages/util-linux/files/optional-uuid.patch b/meta/packages/util-linux/files/optional-uuid.patch
deleted file mode 100644
index 2d0ea43cd2..0000000000
--- a/meta/packages/util-linux/files/optional-uuid.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From: Karel Zak <kzak@redhat.com>
2Date: Tue, 12 May 2009 19:22:19 +0000 (+0200)
3Subject: blkid: make libuuid optional
4X-Git-Url: http://git.kernel.org/?p=utils%2Futil-linux-ng%2Futil-linux-ng.git;a=commitdiff_plain;h=cdd17c7a73cab10a34bf80616225b8215ac4e2ed
5
6blkid: make libuuid optional
7
8read.c:28:23: error: uuid/uuid.h: No such file or directory
9make[3]: *** [read.lo] Error 1
10make[3]: *** Waiting for unfinished jobs....
11
12Reported-by: Olaf <mailinglists@ban-solms.de>
13Signed-off-by: Karel Zak <kzak@redhat.com>
14---
15
16diff --git a/libs/blkid/src/config.c b/libs/blkid/src/config.c
17index 2e59218..9091736 100644
18--- a/libs/blkid/src/config.c
19+++ b/libs/blkid/src/config.c
20@@ -24,9 +24,6 @@
21 #include <errno.h>
22 #endif
23 #include <stdint.h>
24-#ifdef HAVE_LIBUUID
25-#include <uuid/uuid.h>
26-#endif
27 #include <stdarg.h>
28
29 #include "blkdev.h"
30diff --git a/libs/blkid/src/evaluate.c b/libs/blkid/src/evaluate.c
31index a9c9fba..f0ae126 100644
32--- a/libs/blkid/src/evaluate.c
33+++ b/libs/blkid/src/evaluate.c
34@@ -27,9 +27,6 @@
35 #include <errno.h>
36 #endif
37 #include <stdint.h>
38-#ifdef HAVE_LIBUUID
39-#include <uuid/uuid.h>
40-#endif
41 #include <stdarg.h>
42
43 #include "pathnames.h"
44diff --git a/libs/blkid/src/read.c b/libs/blkid/src/read.c
45index 4163874..b5e9cd0 100644
46--- a/libs/blkid/src/read.c
47+++ b/libs/blkid/src/read.c
48@@ -25,7 +25,6 @@
49 #endif
50
51 #include "blkidP.h"
52-#include "uuid/uuid.h"
53
54 #ifdef HAVE_STRTOULL
55 #define STRTOULL strtoull /* defined in stdlib.h if you try hard enough */
diff --git a/meta/packages/util-linux/files/swapargs.h b/meta/packages/util-linux/files/swapargs.h
deleted file mode 100644
index e960eef05f..0000000000
--- a/meta/packages/util-linux/files/swapargs.h
+++ /dev/null
@@ -1,3 +0,0 @@
1#define SWAPON_HAS_TWO_ARGS
2#include <asm/page.h>
3#include <sys/swap.h>
diff --git a/meta/packages/util-linux/files/umount.diff b/meta/packages/util-linux/files/umount.diff
deleted file mode 100644
index 78330789ef..0000000000
--- a/meta/packages/util-linux/files/umount.diff
+++ /dev/null
@@ -1,19 +0,0 @@
1*** util-linux-2.12r/mount/umount.c.orig 2005-09-10 20:07:38.000000000 +0200
2--- util-linux-2.12r/mount/umount.c 2006-06-07 21:14:04.000000000 +0200
3***************
4*** 40,46 ****
5 #include <linux/unistd.h>
6 #ifdef __NR_umount2
7
8! static int umount2(const char *path, int flags);
9
10 _syscall2(int, umount2, const char *, path, int, flags);
11
12--- 40,46 ----
13 #include <linux/unistd.h>
14 #ifdef __NR_umount2
15
16! int umount2(const char *path, int flags);
17
18 _syscall2(int, umount2, const char *, path, int, flags);
19
diff --git a/meta/packages/util-linux/files/uuid.patch b/meta/packages/util-linux/files/uuid.patch
deleted file mode 100644
index 3208e0a865..0000000000
--- a/meta/packages/util-linux/files/uuid.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1Index: util-linux-ng-2.15/libs/blkid/src/Makefile.am
2===================================================================
3--- util-linux-ng-2.15.orig/libs/blkid/src/Makefile.am 2009-05-19 17:01:15.000000000 +0100
4+++ util-linux-ng-2.15/libs/blkid/src/Makefile.am 2009-05-19 17:08:11.000000000 +0100
5@@ -7,7 +7,7 @@
6 common_ldadd =
7
8 if HAVE_UUID
9-common_ldadd += -luuid #TODO $(UUID_LIBS)
10+common_ldadd += -luuid
11 endif
12
13 # includes
14@@ -26,7 +26,7 @@
15 $(top_srcdir)/lib/md5.c
16
17 libblkid_la_LIBADD = probers/libblkid_probers.la $(common_ldadd)
18-libblkid_la_DEPENDENCIES = $(libblkid_la_LIBADD) blkid.sym
19+libblkid_la_DEPENDENCIES = probers/libblkid_probers.la blkid.sym
20
21 # TODO: for unknown reason "make distcheck" requires
22 # full path to the version script
diff --git a/meta/packages/util-linux/util-linux-2.17.2/tls.patch b/meta/packages/util-linux/util-linux-2.17.2/tls.patch
deleted file mode 100644
index bdb29cae1f..0000000000
--- a/meta/packages/util-linux/util-linux-2.17.2/tls.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1Index: util-linux-ng-2.16/m4/tls.m4
2===================================================================
3--- util-linux-ng-2.16.orig/m4/tls.m4 2009-07-04 01:20:03.000000000 +0200
4+++ util-linux-ng-2.16/m4/tls.m4 2009-07-30 01:57:30.151697033 +0200
5@@ -18,31 +18,26 @@
6 # version as well.
7 #
8 AC_DEFUN([AX_TLS], [
9- AC_MSG_CHECKING(for thread local storage (TLS) class)
10- AC_CACHE_VAL(ac_cv_tls, [
11- ax_tls_keywords="__thread __declspec(thread) none"
12- for ax_tls_keyword in $ax_tls_keywords; do
13- case $ax_tls_keyword in
14- none) ac_cv_tls=none ; break ;;
15- *)
16- AC_TRY_COMPILE(
17- [#include <stdlib.h>
18- static void
19- foo(void) {
20- static ] $ax_tls_keyword [ int bar;
21- exit(1);
22- }],
23- [],
24- [ac_cv_tls=$ax_tls_keyword ; break],
25- ac_cv_tls=none
26- )
27- esac
28- done
29-])
30+ AC_CACHE_CHECK([for thread local storage (TLS) class],
31+ ac_cv_tls,
32+ [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
33+ [chktls_save_LDFLAGS="$LDFLAGS"
34+ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
35+ chktls_save_CFLAGS="$CFLAGS"
36+ CFLAGS="-fPIC $CFLAGS"
37+ dnl If -shared works, test if TLS works in a shared library.
38+ AC_LINK_IFELSE([int f() { return 0; }],
39+ AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }],
40+ [ac_cv_tls=yes],
41+ [ac_cv_tls=no]),
42+ [ac_cv_tls=yes])
43+ CFLAGS="$chktls_save_CFLAGS"
44+ LDFLAGS="$chktls_save_LDFLAGS"], [ac_cv_tls=no])
45+ ])
46
47- if test "$ac_cv_tls" != "none"; then
48- dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
49- AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
50- fi
51- AC_MSG_RESULT($ac_cv_tls)
52+ AS_IF([test "x$ac_cv_tls" = "xyes"],
53+ [AC_DEFINE([TLS], 1,
54+ [Define this if the compiler supports __thread for Thread-Local Storage])
55+ $1],
56+ [$2])
57 ])
58Index: util-linux-ng-2.16/shlibs/uuid/src/gen_uuid.c
59===================================================================
60--- util-linux-ng-2.16.orig/shlibs/uuid/src/gen_uuid.c 2009-07-30 02:31:48.518159459 +0200
61+++ util-linux-ng-2.16/shlibs/uuid/src/gen_uuid.c 2009-07-30 02:32:04.867871183 +0200
62@@ -99,7 +99,7 @@
63 #endif
64
65 #ifdef TLS
66-#define THREAD_LOCAL static TLS
67+#define THREAD_LOCAL static __thread
68 #else
69 #define THREAD_LOCAL static
70 #endif
diff --git a/meta/packages/util-linux/util-linux-2.17.2/uclibc-compile.patch b/meta/packages/util-linux/util-linux-2.17.2/uclibc-compile.patch
deleted file mode 100644
index b2e8a8b95a..0000000000
--- a/meta/packages/util-linux/util-linux-2.17.2/uclibc-compile.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: util-linux-ng-2.16/misc-utils/cal.c
2===================================================================
3--- util-linux-ng-2.16.orig/misc-utils/cal.c 2009-07-03 16:20:01.000000000 -0700
4+++ util-linux-ng-2.16/misc-utils/cal.c 2009-07-18 23:21:37.000000000 -0700
5@@ -407,7 +407,7 @@
6 strcpy(day_headings,"");
7 strcpy(j_day_headings,"");
8
9-#ifdef HAVE_LANGINFO_H
10+#ifdef HAVE_LANGINFO_H && !defined(__UCLIBC__)
11 # define weekday(wd) nl_langinfo(ABDAY_1+wd)
12 #else
13 # define weekday(wd) _time_info->abbrev_wkday[wd]
diff --git a/meta/packages/util-linux/util-linux-2.17.2/util-linux-ng-replace-siginterrupt.patch b/meta/packages/util-linux/util-linux-2.17.2/util-linux-ng-replace-siginterrupt.patch
deleted file mode 100644
index 4b5eb73760..0000000000
--- a/meta/packages/util-linux/util-linux-2.17.2/util-linux-ng-replace-siginterrupt.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Index: util-linux-ng-2.14/login-utils/login.c
2===================================================================
3--- util-linux-ng-2.14.orig/login-utils/login.c 2008-05-28 16:01:02.000000000 -0700
4+++ util-linux-ng-2.14/login-utils/login.c 2009-03-04 18:31:42.000000000 -0800
5@@ -358,6 +358,7 @@
6 char *childArgv[10];
7 char *buff;
8 int childArgc = 0;
9+ struct sigaction act;
10 #ifdef HAVE_SECURITY_PAM_MISC_H
11 int retcode;
12 pam_handle_t *pamh = NULL;
13@@ -373,7 +374,9 @@
14 pid = getpid();
15
16 signal(SIGALRM, timedout);
17- siginterrupt(SIGALRM,1); /* we have to interrupt syscalls like ioclt() */
18+ (void) sigaction(SIGALRM, NULL, &act);
19+ act.sa_flags &= ~SA_RESTART;
20+ sigaction(SIGALRM, &act, NULL);
21 alarm((unsigned int)timeout);
22 signal(SIGQUIT, SIG_IGN);
23 signal(SIGINT, SIG_IGN);
diff --git a/meta/packages/util-linux/util-linux.inc b/meta/packages/util-linux/util-linux.inc
deleted file mode 100644
index 571b53c99c..0000000000
--- a/meta/packages/util-linux/util-linux.inc
+++ /dev/null
@@ -1,237 +0,0 @@
1DESCRIPTION = "Util-linux is a suite of essential utilities for any Linux system."
2SECTION = "base"
3
4# note that `lscpu' is under GPLv3+
5LICENSE = "GPLv2+ & LGPLv2.1+ & BSD"
6LICENSE_util-linux-lscpu = "GPLv3+"
7
8LIC_FILES_CHKSUM = "file://README.licensing;md5=1530e36fe1304d4535513de90a290df9 \
9 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
10 file://licenses/COPYING.GPL;md5=8ca43cbc842c2336e835926c2166c28b \
11 file://licenses/COPYING.UCB;md5=263860f8968d8bafa5392cab74285262 \
12 file://getopt/COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
13
14DEPENDS = "udev zlib ncurses virtual/libintl gettext"
15DEPENDS_virtclass-native = "zlib-native ncurses-native lzo-native gettext-native"
16
17inherit autotools
18
19SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v${MAJOR_VERSION}/util-linux-ng-${PV}.tar.bz2 \
20 file://MCONFIG \
21 file://swapargs.h \
22 file://defines.h \
23 file://make_include \
24 "
25
26PACKAGES_prepend = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-swaponoff util-linux-losetup util-linux-umount util-linux-mount util-linux-readprofile "
27
28PACKAGES_virtclass-native = ""
29
30S = "${WORKDIR}/util-linux-ng-${PV}"
31
32EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last \
33 --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset \
34 --disable-login-utils --enable-write --enable-arch --enable-mount --with-fsprobe=builtin --enable-libuuid --enable-libblkid --enable-fsck"
35
36FILES_${PN}-doc += "/usr/share/getopt/getopt-*.*"
37
38FILES_util-linux-fdisk = "/sbin/fdisk.${PN}"
39FILES_util-linux-cfdisk = "/sbin/cfdisk"
40FILES_util-linux-sfdisk = "/sbin/sfdisk"
41FILES_util-linux-swaponoff = "/sbin/swapon.${PN} /sbin/swapoff.${PN}"
42FILES_util-linux-losetup = "/sbin/losetup.${PN}"
43FILES_util-linux-mount = "/bin/mount.${PN}"
44FILES_util-linux-umount = "/bin/umount.${PN}"
45FILES_util-linux-readprofile = "/usr/sbin/readprofile"
46
47RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile "
48RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup"
49
50RRECOMMENDS_${PN}_virtclass-native = ""
51RDEPENDS_${PN}_virtclass-native = ""
52
53do_compile () {
54 set -e
55 install ${WORKDIR}/MCONFIG ${S}/MCONFIG
56 install ${WORKDIR}/make_include ${S}/make_include
57 install ${WORKDIR}/swapargs.h ${S}/mount/swapargs.h
58 install ${WORKDIR}/defines.h ${S}/defines.h
59 oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \
60 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \
61 'LDFLAGS=${LDFLAGS}'
62}
63
64checklink() {
65 local targ link value
66 targ="$1"
67 link="$2"
68 ext="$3"
69 if test -h "$link"
70 then
71 value="$(readlink "$link")"
72 if test "$value" = "$targ"
73 then
74 rm "$link"
75 ln -s "$targ"."${PN}" "$link$ext"
76 return 0
77 else
78 echo "$link: '$value' found '$targ' expected" >&2
79 return 1
80 fi
81 else
82 echo "$link: not a symbolic link" >&2
83 return 1
84 fi
85}
86
87do_install () {
88 # with ccache the timestamps on compiled files may
89 # end up earlier than on their inputs, this allows
90 # for the resultant compilation in the install step.
91 oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \
92 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \
93 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install
94
95 mkdir -p ${D}${base_bindir}
96
97 sbinprogs="agetty blockdev ctrlaltdel cfdisk vipw vigr"
98 sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk readprofile fsck blkid sln"
99 usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall setsid chrt"
100 binprogs_a="dmesg kill more umount mount login reset"
101
102 if [ "${base_sbindir}" != "${sbindir}" ]; then
103 mkdir -p ${D}${base_sbindir}
104 for p in $sbinprogs $sbinprogs_a; do
105 if [ -f "${D}${sbindir}/$p" ]; then
106 mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p"
107 fi
108 done
109 fi
110
111 if [ "${base_bindir}" != "${bindir}" ]; then
112 mkdir -p ${D}${base_bindir}
113 for p in $binprogs_a; do
114 if [ -f "${D}${bindir}/$p" ]; then
115 mv "${D}${bindir}/$p" "${D}${base_bindir}/$p"
116 fi
117 done
118 fi
119
120 for p in $usrbinprogs_a; do
121 if [ -f "${D}${bindir}/$p" ]; then
122 mv "${D}${bindir}/$p" "${D}${bindir}/$p.${PN}"
123 fi
124 done
125
126 for p in $binprogs_a; do
127 if [ -f "${D}${base_bindir}/$p" ]; then
128 mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}"
129 fi
130 done
131
132 for p in $sbinprogs_a; do
133 if [ -f "${D}${base_sbindir}/$p" ]; then
134 mv "${D}${base_sbindir}/$p" "${D}${base_sbindir}/$p.${PN}"
135 fi
136 done
137
138 install -d ${D}${sysconfdir}/default/
139 echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
140
141 ln -sf ${sbindir}/swapon ${D}${sbindir}/swapoff.${PN}
142 ln -sf ${sbindir}/shutdown ${D}${sbindir}/reboot.${PN}
143 ln -sf ${sbindir}/shutdown ${D}${sbindir}/halt.${PN}
144 ln -sf ${sbindir}/shutdown ${D}${sbindir}/fastboot
145 ln -sf ${sbindir}/shutdown ${D}${sbindir}/fasthalt
146}
147
148pkg_postinst_${PN} () {
149 update-alternatives --install ${base_bindir}/dmesg dmesg dmesg.${PN} 100
150 update-alternatives --install ${base_bindir}/kill kill kill.${PN} 100
151 update-alternatives --install ${base_bindir}/more more more.${PN} 100
152 update-alternatives --install ${base_sbindir}/mkswap mkswap mkswap.${PN} 100
153 test -x ${base_sbindir}/pivot_root.${PN} && \
154 update-alternatives --install ${base_sbindir}/pivot_root pivot_root pivot_root.${PN} 100
155# update-alternatives --install ${base_sbindir}/sln sln sln.${PN} 100
156 update-alternatives --install ${base_sbindir}/mkfs.minix mkfs.minix mkfs.minix.${PN} 100
157 update-alternatives --install ${base_sbindir}/fsck.minix fsck.minix fsck.minix.${PN} 100
158 update-alternatives --install ${bindir}/hexdump hexdump hexdump.${PN} 100
159 update-alternatives --install ${bindir}/last last last.${PN} 100
160 update-alternatives --install ${bindir}/logger logger logger.${PN} 100
161 update-alternatives --install ${bindir}/mesg mesg mesg.${PN} 100
162 update-alternatives --install ${bindir}/renice renice renice.${PN} 100
163 update-alternatives --install ${bindir}/wall wall wall.${PN} 100
164
165 # There seems to be problem, atleast on nslu2, with these, untill they are
166 # fixed the busybox ones have higher priority
167 update-alternatives --install ${base_sbindir}/hwclock hwclock hwclock.${PN} 10
168 update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${PN} 10
169 update-alternatives --install ${base_sbindir}/reboot reboot reboot.${PN} 10
170 update-alternatives --install ${base_sbindir}/halt halt halt.${PN} 10
171}
172
173pkg_prerm_${PN} () {
174 test -x ${base_sbindir}/pivot_root.${PN} && \
175 update-alternatives --remove pivot_root pivot_root.${PN}
176 update-alternatives --remove dmesg dmesg.${PN}
177 update-alternatives --remove kill kill.${PN}
178 update-alternatives --remove more more.${PN}
179 update-alternatives --remove halt halt.${PN}
180 update-alternatives --remove hwclock hwclock.${PN}
181 update-alternatives --remove mkswap mkswap.${PN}
182 update-alternatives --remove reboot reboot.${PN}
183 update-alternatives --remove shutdown shutdown.${PN}
184# update-alternatives --remove sln sln.${PN}
185 update-alternatives --remove mkfs.minix mkfs.minix.${PN}
186 update-alternatives --remove fsck.minix fsck.minix.${PN}
187 update-alternatives --remove hexdump hexdump.${PN}
188 update-alternatives --remove last last.${PN}
189 update-alternatives --remove logger logger.${PN}
190 update-alternatives --remove mesg mesg.${PN}
191 update-alternatives --remove renice renice.${PN}
192 update-alternatives --remove wall wall.${PN}
193}
194
195pkg_postinst_util-linux-fdisk () {
196 update-alternatives --install ${base_sbindir}/fdisk fdisk fdisk.${PN} 100
197}
198
199pkg_prerm_util-linux-fdisk () {
200 update-alternatives --remove fdisk fdisk.${PN}
201}
202
203pkg_postinst_util-linux-mount () {
204 update-alternatives --install ${base_bindir}/mount mount mount.${PN} 100
205}
206
207pkg_prerm_util-linux-mount () {
208 update-alternatives --remove mount mount.${PN}
209}
210
211pkg_postinst_util-linux-umount () {
212 update-alternatives --install ${base_bindir}/umount umount umount.${PN} 100
213}
214
215pkg_prerm_util-linux-umount () {
216 update-alternatives --remove umount umount.${PN}
217}
218
219pkg_postinst_util-linux-losetup () {
220 update-alternatives --install ${base_sbindir}/losetup losetup losetup.${PN} 100
221}
222
223pkg_prerm_util-linux-losetup () {
224 update-alternatives --remove losetup losetup.${PN}
225}
226
227pkg_postinst_util-linux-swaponoff () {
228 update-alternatives --install ${base_sbindir}/swapoff swapoff swapoff.${PN} 100
229 update-alternatives --install ${base_sbindir}/swapon swapon swapon.${PN} 100
230}
231
232pkg_prerm_util-linux-swaponoff () {
233 update-alternatives --remove swapoff swapoff.${PN}
234 update-alternatives --remove swapon swapon.${PN}
235}
236
237BBCLASSEXTEND = "native"
diff --git a/meta/packages/util-linux/util-linux_2.17.2.bb b/meta/packages/util-linux/util-linux_2.17.2.bb
deleted file mode 100644
index 9efe64a6c6..0000000000
--- a/meta/packages/util-linux/util-linux_2.17.2.bb
+++ /dev/null
@@ -1,11 +0,0 @@
1MAJOR_VERSION = "2.17"
2require util-linux.inc
3PR="r0"
4
5SRC_URI += "file://uclibc-compile.patch \
6 file://util-linux-ng-replace-siginterrupt.patch"
7
8# fallocate is glibc 2.10, fallocate64 is glibc 2.11
9# we need to disable it for older versions
10EXTRA_OECONF += "ac_cv_func_fallocate=no"
11EXTRA_OECONF_virtclass-native += "--disable-fallocate --disable-use-tty-group"
diff --git a/meta/packages/vte/vte.inc b/meta/packages/vte/vte.inc
deleted file mode 100644
index 6138f8ca01..0000000000
--- a/meta/packages/vte/vte.inc
+++ /dev/null
@@ -1,14 +0,0 @@
1DESCRIPTION = "vte is a virtual terminal emulator"
2BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
3LICENSE = "LGPLv2.1+"
4DEPENDS = " glib-2.0 gtk+ intltool-native ncurses"
5RDEPENDS_libvte = "vte-termcap"
6
7inherit gnome
8
9EXTRA_OECONF = "--disable-gtk-doc --disable-python"
10
11PACKAGES =+ "libvte vte-termcap"
12FILES_libvte = "${libdir}/*.so.* ${libexecdir}/gnome-pty-helper"
13FILES_vte-dbg =+ ${libexecdir}/.debug"
14FILES_vte-termcap = "${datadir}/vte/termcap"
diff --git a/meta/packages/vte/vte_0.24.3.bb b/meta/packages/vte/vte_0.24.3.bb
deleted file mode 100644
index 1953101f82..0000000000
--- a/meta/packages/vte/vte_0.24.3.bb
+++ /dev/null
@@ -1,5 +0,0 @@
1require vte.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
4
5PR = "r0"
diff --git a/meta/packages/watchdog/watchdog_5.9.bb b/meta/packages/watchdog/watchdog_5.9.bb
deleted file mode 100644
index c768077f1d..0000000000
--- a/meta/packages/watchdog/watchdog_5.9.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
2working. If programs in user space are not longer executed \
3it will reboot the system."
4HOMEPAGE = "http://watchdog.sourceforge.net/"
5BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"
6
7LICENSE = "GPLv1+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=8a7258c60a71a2f04b67fb01f495889c"
9
10PR = "r0"
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz"
13
14inherit autotools
15
16RRECOMMENDS_${PN} = "kernel-module-softdog"
diff --git a/meta/packages/wbxml/files/no-doc-install.patch b/meta/packages/wbxml/files/no-doc-install.patch
deleted file mode 100644
index 16084e60e6..0000000000
--- a/meta/packages/wbxml/files/no-doc-install.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1--- wbxml2-0.9.2/Makefile.am.old 2007-01-03 19:50:24.000000000 +0000
2+++ wbxml2-0.9.2/Makefile.am 2007-01-03 19:50:39.000000000 +0000
3@@ -24,9 +24,9 @@
4 TODO\
5 doxygen.h
6
7-install-data-local:
8- $(mkinstalldirs) $(DESTDIR)$(wbxmldocdir)/manual
9- cp -Rp doc/* $(DESTDIR)$(wbxmldocdir)/manual
10+#install-data-local:
11+# $(mkinstalldirs) $(DESTDIR)$(wbxmldocdir)/manual
12+# cp -Rp doc/* $(DESTDIR)$(wbxmldocdir)/manual
13
14 dist-bz2: distdir
15 sed -e "s/tar.gz/tar.bz2/g" $(distdir)/wbxml2.spec > $(distdir)/wbxml2.spec.aux
diff --git a/meta/packages/wbxml/wbxml2_0.9.2.bb b/meta/packages/wbxml/wbxml2_0.9.2.bb
deleted file mode 100644
index b8ba8c747f..0000000000
--- a/meta/packages/wbxml/wbxml2_0.9.2.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1DESCRIPTION = "parser for wbxml"
2LICENSE = "GPLv2"
3
4DEPENDS = "libxml2 sed-native expat"
5
6SRC_URI = "${SOURCEFORGE_MIRROR}/wbxmllib/${P}.tar.gz \
7 file://no-doc-install.patch;patch=1"
8
9inherit autotools pkgconfig
10
11do_configure_append() {
12 sed -i s:-I/usr/include::g Makefile
13 sed -i s:-I/usr/include::g */Makefile
14}
15
16PACKAGES += "${PN}-tools"
17
18FILES_${PN}-tools = "${bindir}"
19FILES_${PN} = "${libdir}/*.so.*"
20
diff --git a/meta/packages/webkit/files/GNUmakefile.am b/meta/packages/webkit/files/GNUmakefile.am
deleted file mode 100644
index 39817f1dd5..0000000000
--- a/meta/packages/webkit/files/GNUmakefile.am
+++ /dev/null
@@ -1,856 +0,0 @@
1# Top-level Makefile rule for automake
2#
3# Variable conventions:
4#
5# _h_api = API headers that will be installed and included in the distribution
6# _cppflags = flags that will be passed to the C/CXX Preprocessor
7# _sources = sources that will be compiled and included in the distribution
8# _built_sources = files that will be autogenerated by the build system and
9# will be part of the _SOURCES primary
10# _built_nosources = files that are autogenerated but are not part of the
11# _SOURCES primary
12# _cleanfiles = files that will be removed by the clean target
13#
14# Sources, headers, flags, etc... should be added to the respective variables
15# with the above suffix, e.g, webcore-specific sources should go to
16# webcore_sources, gtk port API and WebCoreSupport parts to webkitgtk_sources,
17# etc... The only exceptions are the global variables. See Global Variables
18# below.
19#
20# Global Variables
21#
22# global_cppflags = CPPFLAGS that apply to JSC, WebCore, and to any
23# specific port
24# global_cflags = CFLAGS that apply to JSC, WebCore, and to
25# any specific port
26# global_cxxflags = CXXFLAGS that apply to JSC, WebCore, and to any
27# specific port
28
29srcdir = @srcdir@
30VPATH = @srcdir@
31
32DISTCHECK_CONFIGURE_FLAGS = \
33 --enable-introspection \
34 --enable-gtk-doc
35
36# Directory for autogenerated sources
37GENSOURCES := $(top_builddir)/DerivedSources
38GENSOURCESWEBKITDOM := $(top_builddir)/DerivedSources/webkit
39GENPROGRAMS := $(top_builddir)/Programs
40
41# Script for creating hash tables
42CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/create_hash_table
43
44# Script for creating regexp tables
45CREATE_REGEXP_TABLES = $(srcdir)/JavaScriptCore/create_regex_tables
46
47# Programs to run the WebKitGtk unit tests
48GTESTER = gtester
49GTESTER_REPORT = gtester-report
50
51# Libraries and support components
52bin_PROGRAMS :=
53noinst_PROGRAMS :=
54noinst_HEADERS :=
55noinst_LTLIBRARIES :=
56lib_LTLIBRARIES :=
57IDL_BINDINGS :=
58TEST_PROGS :=
59POFILES :=
60MOFILES :=
61javascriptcore_h_api :=
62javascriptcore_cppflags:=
63javascriptcore_sources :=
64javascriptcore_built_sources :=
65javascriptcore_built_nosources :=
66javascriptcore_dist :=
67webcore_cppflags :=
68webcore_sources :=
69webcore_libadd :=
70webcore_built_sources :=
71webcore_built_nosources :=
72webcore_dist :=
73webcoregtk_cppflags :=
74webcoregtk_sources :=
75IDL_BINDINGS_GDOM :=
76GDOM_AUTO_CLASSES :=
77GDOM_FIXED_CLASSES :=
78GDOM_CLASSES :=
79GDOM_HEADERS_BUILT :=
80GDOM_HEADERS_FIXED :=
81libgdom_h_api :=
82libgdom_cleanfiles :=
83webkitgtk_h_api :=
84webkitgtk_sources :=
85webkitgtk_cppflags :=
86webkitgtk_built_sources :=
87webkitgtk_built_nosources :=
88webkitgtk_cleanfiles :=
89global_cppflags :=
90global_cflags :=
91global_cxxflags :=
92corekit_cflags :=
93corekit_cppflags :=
94JSCORE_GIRSOURCES :=
95WEBKIT_GIRSOURCES :=
96typelibsdir :=
97typelibs_DATA :=
98EXTRA_DIST :=
99BUILT_SOURCES :=
100CLEANFILES :=
101DISTCLEANFILES :=
102MAINTAINERCLEANFILES :=
103
104webcoregtk_cppflags += \
105 -I$(top_builddir)/DerivedSources/webkit \
106 -I$(srcdir)/WebCore/bindings \
107 -I$(srcdir)/WebCore/bindings/gobject
108
109# CFLAGS/CXXFLAGS used by WebCore and WebKit
110#
111# gtk+.pc already include glib, cairo, freetype and pango CFLAGS
112# Don't include them for now to reduce the noise when compiling
113# $(GLIB_CFLAGS) $(CAIRO_CFLAGS) $(PANGO_CFLAGS) $(FREETYPE_CFLAGS)
114corekit_cflags += \
115 -fno-strict-aliasing \
116 $(COVERAGE_CFLAGS) \
117 $(ENCHANT_CFLAGS) \
118 $(GAIL_CFLAGS) \
119 $(GEOCLUE_CFLAGS) \
120 $(GLIB_CFLAGS) \
121 $(GSTREAMER_CFLAGS) \
122 $(GTK_CFLAGS) \
123 $(HILDON_CFLAGS) \
124 $(LIBSOUP_CFLAGS) \
125 $(LIBXML_CFLAGS) \
126 $(LIBXSLT_CFLAGS) \
127 $(SQLITE3_CFLAGS) \
128 $(UNICODE_CFLAGS) \
129 $(XT_CFLAGS)
130
131# When building webcore/webkit, we want WebCore/config.h and NOT
132# JavaScriptCore/config.h, hence, it's important that WebCore/ should come first
133# before JavaScriptCore in the include path.
134corekit_cppflags += \
135 $(global_cppflags) \
136 $(webcore_cppflags) \
137 $(webcoregtk_cppflags) \
138 $(javascriptcore_cppflags)
139
140# For the Gtk port we want to use XP_UNIX both in X11 and Mac
141if !TARGET_WIN32
142corekit_cppflags += -DXP_UNIX
143endif
144
145# Default compiler flags
146global_cflags += \
147 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
148 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
149 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
150 -Wno-unused-parameter -Wno-parentheses \
151 -fno-exceptions
152
153global_cxxflags += \
154 $(global_cflags) \
155 $(SYMBOL_VISIBILITY_INLINES) \
156 -fno-rtti
157
158# -no-undefined required for building DLLs on Windows
159# It breaks the build on other platforms, so we use it conditionally
160if OS_WIN32
161no_undefined = -no-undefined
162version_script = -export-symbols-regex "^(webkit_|JS).*"
163endif
164
165if OS_GNU
166version_script = -Wl,--version-script,$(srcdir)/autotools/symbols.filter
167endif
168
169# Shared libraries
170lib_LTLIBRARIES += \
171 libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
172
173# Convenience libraries
174noinst_LTLIBRARIES += \
175 libJavaScriptCore.la
176
177# JavaScriptCore
178javascriptcore_cppflags += \
179 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
180 -I$(srcdir)/JavaScriptCore/parser \
181 -I$(srcdir)/JavaScriptCore/wtf \
182 -I$(srcdir)/JavaScriptCore/wtf/gtk \
183 -I$(srcdir)/JavaScriptCore/wtf/gobject \
184 -I$(top_builddir)/DerivedSources
185
186nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
187 $(javascriptcore_built_nosources)
188
189nodist_libJavaScriptCore_la_SOURCES = \
190 $(javascriptcore_built_sources)
191
192libJavaScriptCore_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/JavaScriptCore
193libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
194
195libJavaScriptCore_la_SOURCES = \
196 $(javascriptcore_sources)
197
198libJavaScriptCore_la_LIBADD = \
199 $(UNICODE_LIBS) \
200 $(GLIB_LIBS) \
201 -lpthread
202
203libJavaScriptCore_la_CXXFLAGS = \
204 $(global_cxxflags) \
205 $(libJavaScriptCore_la_CFLAGS)
206
207libJavaScriptCore_la_CFLAGS = \
208 -fstrict-aliasing \
209 -O3 \
210 $(global_cflags) \
211 $(GLIB_CFLAGS) \
212 $(UNICODE_CFLAGS)
213
214libJavaScriptCore_la_CPPFLAGS = \
215 $(global_cppflags) \
216 $(javascriptcore_cppflags)
217
218# WebKit
219nodist_EXTRA_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
220 $(webcore_built_nosources)
221
222nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
223 $(webcore_built_sources) \
224 $(webkitgtk_built_sources)
225
226libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/webkit
227libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
228 $(webkitgtk_h_api) \
229 WebKit/gtk/webkit/webkitenumtypes.h
230
231libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
232 $(webcore_sources) \
233 $(webcoregtk_sources) \
234 $(webkitgtk_sources)
235
236libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
237 $(global_cxxflags) \
238 $(corekit_cflags)
239
240libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
241 $(global_cflags) \
242 $(corekit_cflags)
243
244libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
245 $(corekit_cppflags) \
246 $(webkitgtk_cppflags) \
247 $(HILDON_CPPFLAGS)
248
249libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
250 -version-info @LIBWEBKITGTK_VERSION@ \
251 $(version_script) \
252 $(no_undefined)
253
254libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD = \
255 -lpthread \
256 libJavaScriptCore.la \
257 libWebCoreJS.la \
258 libgdom.la \
259 $(webcore_ldflags) \
260 $(CAIRO_LIBS) \
261 $(COVERAGE_LDFLAGS) \
262 $(ENCHANT_LIBS) \
263 $(FREETYPE_LIBS) \
264 $(GAIL_LIBS) \
265 $(GEOCLUE_LIBS) \
266 $(GLIB_LIBS) \
267 $(GSTREAMER_LIBS) \
268 $(GTK_LIBS) \
269 $(HILDON_LIBS) \
270 $(JPEG_LIBS) \
271 $(LIBSOUP_LIBS) \
272 $(LIBXML_LIBS) \
273 $(LIBXSLT_LIBS) \
274 $(PANGO_LIBS) \
275 $(PNG_LIBS) \
276 $(SQLITE3_LIBS) \
277 $(UNICODE_LIBS) \
278 $(XT_LIBS)
279
280libgdom_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/webkit
281nodist_libgdom_la_HEADERS = \
282 $(libgdom_h_api)
283
284libgdom_cleanfiles += \
285 $(top_builddir)/WebKit/gtk/webkit/webkitdomenumtypes.h \
286 $(top_builddir)/libgdom.la \
287 $(top_builddir)/stamp-webkitdomenumtypes.h
288
289#
290# Extra checks and flags
291global_cppflags += \
292 -DBUILDING_CAIRO__=1 \
293 -DBUILDING_GTK__=1 \
294 -DWTF_CHANGES
295
296if USE_ICU_UNICODE
297global_cppflags += \
298 -DWTF_USE_ICU_UNICODE=1
299endif
300
301if USE_GLIB_UNICODE
302global_cppflags += \
303 -DWTF_USE_GLIB_UNICODE=1
304endif
305
306if !ENABLE_FAST_MALLOC
307global_cppflags += \
308 -DUSE_SYSTEM_MALLOC
309endif
310
311if !ENABLE_DEBUG
312global_cppflags += -DNDEBUG
313global_cflags += $(SYMBOL_VISIBILITY)
314else
315webcoregtk_cppflags += \
316 -DG_DISABLE_DEPRECATED \
317 -DGDK_PIXBUF_DISABLE_DEPRECATED \
318 -DGDK_DISABLE_DEPRECATED \
319 -DGTK_DISABLE_DEPRECATED \
320 -DPANGO_DISABLE_DEPRECATED
321
322# Might be useful in the future
323# -DGDK_MULTIHEAD_SAFE \
324# -DGTK_MULTIHEAD_SAFE
325endif
326
327if ENABLE_COVERAGE
328global_cppflags += \
329 -DGCC_GENERATE_TEST_COVERAGE_FILES \
330 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
331endif
332
333webkitgtk_h_api += \
334 $(srcdir)/WebKit/gtk/webkit/webkit.h \
335 $(srcdir)/WebKit/gtk/webkit/webkitdefines.h \
336 $(srcdir)/WebKit/gtk/webkit/webkitdownload.h \
337 $(srcdir)/WebKit/gtk/webkit/webkiterror.h \
338 $(srcdir)/WebKit/gtk/webkit/webkithittestresult.h \
339 $(srcdir)/WebKit/gtk/webkit/webkitnetworkrequest.h \
340 $(srcdir)/WebKit/gtk/webkit/webkitnetworkresponse.h \
341 $(srcdir)/WebKit/gtk/webkit/webkitsoupauthdialog.h \
342 $(srcdir)/WebKit/gtk/webkit/webkitwebbackforwardlist.h \
343 $(srcdir)/WebKit/gtk/webkit/webkitwebdatasource.h \
344 $(srcdir)/WebKit/gtk/webkit/webkitwebframe.h \
345 $(srcdir)/WebKit/gtk/webkit/webkitwebhistoryitem.h \
346 $(srcdir)/WebKit/gtk/webkit/webkitwebinspector.h \
347 $(srcdir)/WebKit/gtk/webkit/webkitwebnavigationaction.h \
348 $(srcdir)/WebKit/gtk/webkit/webkitwebpolicydecision.h \
349 $(srcdir)/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
350 $(srcdir)/WebKit/gtk/webkit/webkitwebresource.h \
351 $(srcdir)/WebKit/gtk/webkit/webkitwebsettings.h \
352 $(srcdir)/WebKit/gtk/webkit/webkitwebwindowfeatures.h \
353 $(srcdir)/WebKit/gtk/webkit/webkitwebview.h \
354 $(srcdir)/WebKit/gtk/webkit/webkitwebdatabase.h \
355 $(srcdir)/WebKit/gtk/webkit/webkitsecurityorigin.h \
356 $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
357
358webkitgtk_built_sources += \
359 DerivedSources/webkitenumtypes.cpp \
360 DerivedSources/webkitdomenumtypes.cpp \
361 DerivedSources/webkitmarshal.cpp \
362 DerivedSources/webkitmarshal.h \
363 WebKit/gtk/webkit/webkitenumtypes.h
364
365webkitgtk_sources += \
366 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
367 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
368 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
369 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
370 WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp \
371 WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
372 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
373 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
374 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
375 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
376 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
377 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
378 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
379 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
380 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
381 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
382 WebKit/gtk/webkit/webkitapplicationcache.cpp \
383 WebKit/gtk/webkit/webkitdownload.cpp \
384 WebKit/gtk/webkit/webkiterror.cpp \
385 WebKit/gtk/webkit/webkithittestresult.cpp \
386 WebKit/gtk/webkit/webkitnetworkrequest.cpp \
387 WebKit/gtk/webkit/webkitnetworkresponse.cpp \
388 WebKit/gtk/webkit/webkitprivate.cpp \
389 WebKit/gtk/webkit/webkitprivate.h \
390 WebKit/gtk/webkit/webkitsoupauthdialog.c \
391 WebKit/gtk/webkit/webkitversion.cpp \
392 WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
393 WebKit/gtk/webkit/webkitwebdatasource.cpp \
394 WebKit/gtk/webkit/webkitwebframe.cpp \
395 WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
396 WebKit/gtk/webkit/webkitwebinspector.cpp \
397 WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
398 WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
399 WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
400 WebKit/gtk/webkit/webkitwebresource.cpp \
401 WebKit/gtk/webkit/webkitwebdatabase.cpp \
402 WebKit/gtk/webkit/webkitsecurityorigin.cpp \
403 WebKit/gtk/webkit/webkitwebsettings.cpp \
404 WebKit/gtk/webkit/webkitwebview.cpp \
405 WebKit/gtk/webkit/webkitwebwindowfeatures.cpp \
406 WebKit/gtk/webkit/webkitworkers.cpp
407
408webkitgtk_cppflags += \
409 -DBUILDING_WEBKIT \
410 -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
411 -DDATA_DIR=\"${datadir}\" \
412 -I$(srcdir)/WebKit/gtk \
413 -I$(srcdir)/WebKit/gtk/WebCoreSupport \
414 -I$(srcdir)/WebKit/gtk/webkit \
415 -I$(top_builddir)/WebKit/gtk \
416 -I$(top_builddir)/WebKit/gtk/webkit \
417 -I$(GENSOURCESWEBKITDOM)
418
419webkitgtk_cleanfiles += \
420 $(top_builddir)/stamp-webkitmarshal.cpp \
421 $(top_builddir)/stamp-webkitmarshal.h \
422 $(top_builddir)/stamp-webkitenumtypes.cpp \
423 $(top_builddir)/stamp-webkitenumtypes.h \
424 $(top_builddir)/Programs/GtkLauncher \
425 $(top_builddir)/WebKit/gtk/docs/version.xml \
426 $(top_builddir)/WebKit/gtk/docs/GNUmakefile \
427 $(top_builddir)/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc \
428 $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h \
429 $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
430
431pkgconfigdir = $(libdir)/pkgconfig
432pkgconfig_DATA = WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc
433
434if ENABLE_INTROSPECTION
435
436JSCore-@WEBKITGTK_API_VERSION@.gir: $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
437 cp $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir $(builddir)/
438
439JSCORE_GIRSOURCES += JSCore-@WEBKITGTK_API_VERSION@.gir
440WEBKIT_GIRSOURCES += WebKit-@WEBKITGTK_API_VERSION@.gir
441
442$(WEBKIT_GIRSOURCES): $(G_IR_SCANNER) $(JSCORE_GIRSOURCES) libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
443 $(AM_V_GEN)$(G_IR_SCANNER) -v --namespace WebKit --nsversion=@WEBKITGTK_API_VERSION@ \
444 --include=GObject-2.0 \
445 --include=Gtk-@GTK_API_VERSION@ \
446 --include=JSCore-@WEBKITGTK_API_VERSION@ \
447 --include=Soup-2.4 \
448 --library=webkitgtk-@WEBKITGTK_API_VERSION@ \
449 --libtool="$(LIBTOOL)" \
450 --pkg gobject-2.0 \
451 --pkg gtk+-@GTK_API_VERSION@ \
452 --pkg libsoup-2.4 \
453 --output $@ \
454 --add-include-path $(top_srcdir)/WebKit/gtk \
455 --add-include-path $(builddir) \
456 -I$(top_srcdir)/WebKit/gtk \
457 -I$(top_builddir)/WebKit/gtk \
458 -I$(top_builddir)/DerivedSources \
459 -I$(top_srcdir)/JavaScriptCore/ForwardingHeaders \
460 -I$(top_srcdir) \
461 $(webkitgtk_h_api) \
462 $(libgdom_h_api)
463
464girdir = $(datadir)/gir-1.0
465gir_DATA = $(WEBKIT_GIRSOURCES) $(JSCORE_GIRSOURCES)
466
467typelibsdir += $(libdir)/girepository-1.0
468typelibs_DATA += $(JSCORE_GIRSOURCES:.gir=.typelib) $(WEBKIT_GIRSOURCES:.gir=.typelib)
469
470%.typelib: %.gir $(G_IR_COMPILER)
471 $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(top_srcdir)/WebKit/gtk --includedir $(builddir) $< -o $@
472
473CLEANFILES += $(JSCORE_GIRSOURCES) $(WEBKIT_GIRSOURCES) $(typelibs_DATA)
474
475endif
476
477EXTRA_DIST += $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
478
479WEBKIT_MARSHAL = $(GENSOURCES)/webkitmarshal
480WEBKIT_MARSHAL_LIST = $(top_srcdir)/WebKit/gtk/webkitmarshal.list
481
482$(WEBKIT_MARSHAL).cpp: stamp-webkitmarshal.cpp
483 @true
484
485$(WEBKIT_MARSHAL).h: stamp-webkitmarshal.h
486 @true
487
488stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
489 $(AM_V_GEN) echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
490 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
491 echo timestamp > $(@F)
492
493stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
494 $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
495 echo timestamp > $(@F)
496
497WebKit/gtk/webkit/webkitenumtypes.h: stamp-webkitenumtypes.h
498 @true
499stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
500 $(AM_V_GEN)glib-mkenums \
501 --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
502 --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
503 --fhead "#include <glib-object.h>\n\n" \
504 --fhead "#include <webkit/webkitdefines.h>\n\n" \
505 --fhead "G_BEGIN_DECLS\n\n" \
506 --ftail "G_END_DECLS\n\n" \
507 --ftail "#endif\n" \
508 --fprod "#include <webkit/@basename@>\n\n" \
509 --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
510 --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
511 $(webkitgtk_h_api) | \
512 sed 's,web_kit,webkit,' | \
513 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
514 > xgen-gth \
515 && (cmp -s xgen-gth WebKit/gtk/webkit/webkitenumtypes.h || cp xgen-gth WebKit/gtk/webkit/webkitenumtypes.h) \
516 && rm -f xgen-gth \
517 && echo timestamp > $(@F)
518
519DerivedSources/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
520 $(AM_V_GEN)glib-mkenums \
521 --fhead "#include <config.h>\n" \
522 --fhead "#include <glib-object.h>\n" \
523 --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h\"\n\n" \
524 --fhead "extern \"C\" {\n\n" \
525 --fprod "\n/* enumerations from \"@filename@\" */" \
526 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
527 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
528 --vtail " { 0, NULL, NULL }\n};\n\n" \
529 --vtail "GType @enum_name@_get_type(void)\n{\n" \
530 --vtail " static GType type = 0;\n\n" \
531 --vtail " if (!type)\n" \
532 --vtail " type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
533 --vtail " return type;\n}\n\n" \
534 --ftail "}\n" \
535 $(webkitgtk_h_api) | \
536 sed 's,web_kit,webkit,' \
537 > xgen-gtc \
538 && cp xgen-gtc $@ \
539 && rm -f xgen-gtc
540
541WebKit/gtk/webkit/webkitdomenumtypes.h: stamp-webkitdomenumtypes.h
542 @true
543stamp-webkitdomenumtypes.h: $(libgdom_h_api) GNUmakefile
544 $(AM_V_GEN)glib-mkenums \
545 --fhead "#ifndef WEBKIT_DOM_ENUM_TYPES_H\n" \
546 --fhead "#define WEBKIT_DOM_ENUM_TYPES_H\n\n" \
547 --fhead "#include <glib-object.h>\n\n" \
548 --fhead "G_BEGIN_DECLS\n\n" \
549 --ftail "G_END_DECLS\n\n" \
550 --ftail "#endif\n" \
551 --fprod "#include <webkit/@basename@>\n\n" \
552 --eprod "#define WEBKIT_DOM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
553 --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);n\n" \
554 $(libgdom_h_api) | \
555 sed 's,web_kit,webkit_dom,' | \
556 sed 's,WEBKIT_DOM_TYPE_KIT,WEBKIT_DOM_TYPE,' \
557 > xgen-cgth \
558 && (cmp -s xgen-cgth WebKit/gtk/webkit/webkitdomenumtypes.h || cp xgen-cgth WebKit/gtk/webkit/webkitdomenumtypes.h) \
559 && rm -f xgen-cgth \
560 && echo timestamp > $(@F)
561
562DerivedSources/webkitdomenumtypes.cpp: $(top_builddir)/WebKit/gtk/webkit/webkitdomenumtypes.h $(libgdom_h_api) GNUmakefile
563 $(AM_V_GEN)glib-mkenums \
564 --fhead "#include <config.h>\n" \
565 --fhead "#include <glib-object.h>\n" \
566 --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitdomenumtypes.h\"\n\n" \
567 --fhead "extern \"C\" {\n\n" \
568 --fprod "\n/* enumerations from \"@filename@\" */" \
569 --vhead "static const G@Type@Value _@enum_name@_values] = {" \
570 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
571 --vtail " { 0, NULL, NULL }\n};\n\n" \
572 --vtail "GType @enum_name@_get_type(void)\n{\n" \
573 --vtail " static GType type = 0;\n\n" \
574 --vtail " if (!type)\n" \
575 --vtail " type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
576 --vtail " return type;\n}\n\n" \
577 --ftail "}\n" \
578 $(libgdom_h_api) | \
579 sed 's,web_kit,webkitdom,' \
580 > xgen-cgtc \
581 && cp xgen-cgtc $@ \
582 && rm -f xgen-cgtc
583
584# Files that will be distributed
585EXTRA_DIST += \
586 $(srcdir)/gtk-doc.make \
587 WebKit/LICENSE \
588 $(javascriptcore_dist) \
589 $(webcore_dist) \
590 $(srcdir)/autotools/symbols.filter \
591 $(srcdir)/WebKit/gtk/ChangeLog \
592 $(srcdir)/WebKit/gtk/NEWS \
593 $(srcdir)/WebKit/gtk/webkitmarshal.list \
594 $(srcdir)/WebKit/gtk/docs/GNUmakefile.* \
595 $(srcdir)/WebKit/gtk/docs/webkitenvironment.xml \
596 $(srcdir)/WebKit/gtk/docs/webkitgtk-docs.sgml \
597 $(srcdir)/WebKit/gtk/docs/webkitgtk-sections.txt \
598 $(srcdir)/WebKit/gtk/docs/version.xml.in \
599 $(srcdir)/WebKit/gtk/po/* \
600 $(srcdir)/WebKit/gtk/resources/* \
601 $(srcdir)/WebKit/gtk/tests/resources/* \
602 $(srcdir)/WebKit/gtk/tests/test_utils.h
603
604# extra resource files
605resourcesdir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/resources
606dist_resources_DATA = \
607 $(shell ls $(srcdir)/WebKit/gtk/resources/*.html)
608
609# END WEBKIT GTK+
610
611# Include module makefiles
612include JavaScriptCore/GNUmakefile.am
613include WebCore/GNUmakefile.am
614include WebKitTools/GNUmakefile.am
615include WebKit/gtk/po/GNUmakefile.am
616
617# Build unit tests
618noinst_PROGRAMS += $(TEST_PROGS)
619
620webkit_tests_cflags = \
621 -fno-strict-aliasing \
622 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
623 -I$(srcdir)/WebKit/gtk \
624 -I$(top_builddir)/WebKit/gtk \
625 -I$(top_builddir)/DerivedSources \
626 -I$(top_srcdir)/WebCore/bindings \
627 -I$(top_srcdir)/WebCore/bindings/gobject \
628 $(global_cflags) \
629 $(GLIB_CFLAGS) \
630 $(GTK_CFLAGS) \
631 $(LIBSOUP_CFLAGS)
632
633webkit_tests_ldadd = \
634 libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
635 $(GTK_LIBS) \
636 $(GLIB_LIBS) \
637 $(LIBSOUP_LIBS)
638
639webkit_tests_ldflags = \
640 -no-install \
641 -no-fast-install
642
643TEST_PROGS += \
644 Programs/unittests/testdomdocument \
645 Programs/unittests/testdomdomwindow \
646 Programs/unittests/testdomnode \
647 Programs/unittests/testhttpbackend \
648 Programs/unittests/testloading \
649 Programs/unittests/testglobals \
650 Programs/unittests/testmimehandling \
651 Programs/unittests/testnetworkrequest \
652 Programs/unittests/testnetworkresponse \
653 Programs/unittests/testwebframe \
654 Programs/unittests/testwebbackforwardlist \
655 Programs/unittests/testwebhistoryitem \
656 Programs/unittests/testwindow \
657 Programs/unittests/testdownload \
658 Programs/unittests/testatk \
659 Programs/unittests/testatkroles \
660 Programs/unittests/testhittestresult \
661 Programs/unittests/testwebsettings \
662 Programs/unittests/testwebresource \
663 Programs/unittests/testwebdatasource \
664 Programs/unittests/testwebview \
665 Programs/unittests/testkeyevents \
666 Programs/unittests/testcopyandpaste
667
668# Add additional tests here
669Programs_unittests_testdomdocument_SOURCES = WebKit/gtk/tests/testdomdocument.c
670Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
671Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
672Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
673
674Programs_unittests_testdomdomwindow_SOURCES = WebKit/gtk/tests/testdomdomwindow.c
675Programs_unittests_testdomdomwindow_CFLAGS = $(webkit_tests_cflags)
676Programs_unittests_testdomdomwindow_LDADD = $(webkit_tests_ldadd)
677Programs_unittests_testdomdomwindow_LDFLAGS = $(webkit_tests_ldflags)
678
679Programs_unittests_testdomnode_SOURCES = WebKit/gtk/tests/testdomnode.c
680Programs_unittests_testdomnode_CFLAGS = $(webkit_tests_cflags)
681Programs_unittests_testdomnode_LDADD = $(webkit_tests_ldadd)
682Programs_unittests_testdomnode_LDFLAGS = $(webkit_tests_ldflags)
683
684Programs_unittests_testhttpbackend_SOURCES = WebKit/gtk/tests/testhttpbackend.c
685Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
686Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
687Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
688
689Programs_unittests_testglobals_SOURCES = WebKit/gtk/tests/testglobals.c
690Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
691Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
692Programs_unittests_testglobals_LDFLAGS = $(webkit_tests_ldflags)
693
694Programs_unittests_testloading_SOURCES = WebKit/gtk/tests/testloading.c
695Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
696Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
697Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
698
699Programs_unittests_testmimehandling_SOURCES = WebKit/gtk/tests/testmimehandling.c WebKit/gtk/tests/test_utils.c
700Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
701Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
702Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
703
704Programs_unittests_testnetworkrequest_SOURCES = WebKit/gtk/tests/testnetworkrequest.c
705Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
706Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
707Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
708
709Programs_unittests_testnetworkresponse_SOURCES = WebKit/gtk/tests/testnetworkresponse.c
710Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
711Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
712Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
713
714Programs_unittests_testwebframe_SOURCES = WebKit/gtk/tests/testwebframe.c
715Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
716Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
717Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
718
719Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
720Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
721Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
722Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
723
724Programs_unittests_testwebhistoryitem_SOURCES = WebKit/gtk/tests/testwebhistoryitem.c
725Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
726Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
727Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
728
729Programs_unittests_testwindow_SOURCES = WebKit/gtk/tests/testwindow.c
730Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
731Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
732Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
733
734Programs_unittests_testdownload_SOURCES = WebKit/gtk/tests/testdownload.c
735Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
736Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
737Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
738
739Programs_unittests_testatk_SOURCES = WebKit/gtk/tests/testatk.c
740Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
741Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
742Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
743
744Programs_unittests_testatkroles_SOURCES = WebKit/gtk/tests/testatkroles.c
745Programs_unittests_testatkroles_CFLAGS = $(webkit_tests_cflags)
746Programs_unittests_testatkroles_LDADD = $(webkit_tests_ldadd)
747Programs_unittests_testatkroles_LDFLAGS = $(webkit_tests_ldflags)
748
749Programs_unittests_testwebsettings_SOURCES = WebKit/gtk/tests/testwebsettings.c
750Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
751Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
752Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
753
754Programs_unittests_testwebresource_SOURCES = WebKit/gtk/tests/testwebresource.c
755Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
756Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
757
758Programs_unittests_testwebdatasource_SOURCES = WebKit/gtk/tests/testwebdatasource.c
759Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
760Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
761
762Programs_unittests_testwebview_SOURCES = WebKit/gtk/tests/testwebview.c WebKit/gtk/tests/test_utils.c
763Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
764Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
765Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
766
767Programs_unittests_testhittestresult_SOURCES = WebKit/gtk/tests/testhittestresult.c
768Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
769Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
770
771Programs_unittests_testkeyevents_SOURCES = WebKit/gtk/tests/testkeyevents.c
772Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
773Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
774Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
775
776Programs_unittests_testcopyandpaste_SOURCES = WebKit/gtk/tests/testcopyandpaste.c
777Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags)
778Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
779Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
780
781# Autogenerated sources
782BUILT_SOURCES += \
783 $(javascriptcore_built_sources) \
784 $(javascriptcore_built_nosources) \
785 $(webcore_built_sources) \
786 $(webcore_built_nosources) \
787 $(webkitgtk_built_sources) \
788 $(webkitgtk_built_nosources) \
789 $(gdom_built_nosources)
790
791# Project-wide clean rules
792# Files that will be cleaned
793CLEANFILES += \
794 $(BUILT_SOURCES) \
795 $(webkitgtk_cleanfiles) \
796 $(libgdom_cleanfiles)
797
798DISTCLEANFILES += \
799 $(CLEANFILES)
800
801MAINTAINERCLEANFILES += \
802 $(CLEANFILES) \
803 $(srcdir)/aconfig.h.in \
804 $(srcdir)/autotools/config.* \
805 $(srcdir)/autotools/compile \
806 $(srcdir)/autotools/depcomp \
807 $(srcdir)/autotools/install-sh \
808 $(srcdir)/autotools/missing \
809 $(srcdir)/configure \
810 $(srcdir)/GNUmakefile.in \
811 $(srcdir)/INSTALL \
812 $(srcdir)/README \
813 $(top_builddir)/config.*
814
815# Older automake versions (1.7) place Plo files in a different place so we need
816# to create the output directory manually.
817all-local: stamp-po
818 $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
819
820# remove built sources and program directories
821clean-local:
822 -rm -rf $(GENPROGRAMS)
823
824maintainer-clean-local: distclean-local
825
826distclean-local:
827 -rm -rf $(GENSOURCES) $(GENPROGRAMS)
828
829dist-hook:
830 cp $(srcdir)/WebKit/gtk/NEWS $(distdir)/
831
832install-data-local: po-install-data-local
833
834installdirs-data-local: po-installdirs-data-local
835
836uninstall-local: po-uninstall-local
837
838# Run all tests in cwd
839# FIXME: we should run this under xvfb
840test: $(TEST_PROGS)
841 $(GTESTER) --verbose $(TEST_PROGS);
842
843# test-report: run tests in cwd and generate report
844# full-report: run tests in cwd with -m perf and -m slow and generate report
845# perf-report: run tests in cwd with -m perf and generate report
846test-report full-report perf-report: $(TEST_PROGS)
847 @ case $@ in \
848 test-report) test_options="-k";; \
849 full-report) test_options="-k -m=perf";; \
850 perf-report) test_options="-k -m=perf -m=slow";; \
851 esac ; \
852 $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
853 $(GTESTER_REPORT) test-report.xml > test-report.html ;
854
855.PHONY: test test-report perf-report full-report
856check-local: test
diff --git a/meta/packages/webkit/files/Makefile b/meta/packages/webkit/files/Makefile
deleted file mode 100644
index 1e50d1d358..0000000000
--- a/meta/packages/webkit/files/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
1MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKit2 WebKitTools
2
3all:
4 @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
5 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
6
7debug d development dev develop:
8 @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
9 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
10
11release r deployment dep deploy:
12 @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
13 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
14
15clean:
16 @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
17 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
diff --git a/meta/packages/webkit/files/Makefile.shared b/meta/packages/webkit/files/Makefile.shared
deleted file mode 100644
index aa9fa728d6..0000000000
--- a/meta/packages/webkit/files/Makefile.shared
+++ /dev/null
@@ -1,18 +0,0 @@
1SCRIPTS_PATH ?= ../WebKitTools/Scripts
2XCODE_OPTIONS = `perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print XcodeOptionString()'` $(ARGS)
3
4all:
5 ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | grep -v setenv && exit $${PIPESTATUS[0]} )
6
7debug d development dev develop: force
8 $(SCRIPTS_PATH)/set-webkit-configuration --debug
9 ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | grep -v setenv && exit $${PIPESTATUS[0]} )
10
11release r deployment dep deploy: force
12 $(SCRIPTS_PATH)/set-webkit-configuration --release
13 ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | grep -v setenv && exit $${PIPESTATUS[0]} )
14
15clean:
16 ( xcodebuild $(OTHER_OPTIONS) -alltargets clean $(XCODE_OPTIONS) | grep -v setenv && exit $${PIPESTATUS[0]} )
17
18force: ;
diff --git a/meta/packages/webkit/files/WebKit.pri b/meta/packages/webkit/files/WebKit.pri
deleted file mode 100644
index d12423beb2..0000000000
--- a/meta/packages/webkit/files/WebKit.pri
+++ /dev/null
@@ -1,107 +0,0 @@
1# Include file to make it easy to include WebKit into Qt projects
2
3
4isEmpty(OUTPUT_DIR) {
5 CONFIG(release):OUTPUT_DIR=$$PWD/WebKitBuild/Release
6 CONFIG(debug):OUTPUT_DIR=$$PWD/WebKitBuild/Debug
7}
8
9!gtk-port:CONFIG += qt-port
10qt-port:DEFINES += BUILDING_QT__=1
11qt-port:!building-libs {
12 QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
13 LIBS += -lQtWebKit
14 DEPENDPATH += $$PWD/WebKit/qt/Api
15}
16
17gtk-port:!building-libs {
18 QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
19 LIBS += -lWebKitGtk
20 DEPENDPATH += $$PWD/WebKit/gtk $$PWD/WebKit/gtk/WebCoreSupport $$PWD/WebKit/gtk/webkit
21}
22
23gtk-port {
24 CONFIG += link_pkgconfig
25
26 DEFINES += BUILDING_CAIRO__=1 BUILDING_GTK__=1
27
28 # We use FreeType directly with Cairo
29 PKGCONFIG += cairo-ft
30
31 directfb: PKGCONFIG += cairo-directfb gtk+-directfb-2.0
32 else: PKGCONFIG += cairo gtk+-2.0
33
34 # Set a CONFIG flag for the GTK+ target (x11, quartz, win32, directfb)
35 CONFIG += $$system(pkg-config --variable=target $$PKGCONFIG)
36
37 # We use the curl http backend on all platforms
38 PKGCONFIG += libcurl
39 DEFINES += WTF_USE_CURL=1
40
41 LIBS += -lWebKitGtk -ljpeg -lpng
42
43 QMAKE_CXXFLAGS += $$system(icu-config --cppflags)
44 QMAKE_LIBS += $$system(icu-config --ldflags)
45
46 # This set of warnings is borrowed from the Mac build
47 QMAKE_CXXFLAGS += -Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter -Wundef
48
49 # These flags are based on optimization experience from the Mac port:
50 # Helps code size significantly and speed a little
51 QMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
52
53 DEPENDPATH += $$PWD/JavaScriptCore/API
54 INCLUDEPATH += $$PWD
55}
56
57DEFINES += USE_SYSTEM_MALLOC
58CONFIG(release) {
59 DEFINES += NDEBUG
60}
61
62gtk-port:CONFIG(debug) {
63 DEFINES += G_DISABLE_DEPRECATED GDK_PIXBUF_DISABLE_DEPRECATED GDK_DISABLE_DEPRECATED GTK_DISABLE_DEPRECATED PANGO_DISABLE_DEPRECATED
64# maybe useful for debugging DEFINES += GDK_MULTIHEAD_SAFE GTK_MULTIHEAD_SAFE
65}
66
67BASE_DIR = $$PWD
68qt-port:INCLUDEPATH += \
69 $$PWD/WebKit/qt/Api
70gtk-port:INCLUDEPATH += \
71 $$BASE_DIR/WebCore/platform/gtk \
72 $$BASE_DIR/WebCore/platform/network/curl \
73 $$BASE_DIR/WebCore/platform/graphics/cairo \
74 $$BASE_DIR/WebCore/loader/gtk \
75 $$BASE_DIR/WebCore/page/gtk \
76 $$BASE_DIR/WebKit/gtk \
77 $$BASE_DIR/WebKit/gtk/WebCoreSupport \
78 $$BASE_DIR/WebKit/gtk/webkit
79INCLUDEPATH += \
80 $$BASE_DIR/JavaScriptCore/ \
81 $$BASE_DIR/JavaScriptCore/kjs \
82 $$BASE_DIR/JavaScriptCore/bindings \
83 $$BASE_DIR/JavaScriptCore/bindings/c \
84 $$BASE_DIR/JavaScriptCore/wtf \
85 $$BASE_DIR/JavaScriptCore/ForwardingHeaders \
86 $$BASE_DIR/WebCore \
87 $$BASE_DIR/WebCore/ForwardingHeaders \
88 $$BASE_DIR/WebCore/platform \
89 $$BASE_DIR/WebCore/platform/network \
90 $$BASE_DIR/WebCore/platform/graphics \
91 $$BASE_DIR/WebCore/loader \
92 $$BASE_DIR/WebCore/page \
93 $$BASE_DIR/WebCore/css \
94 $$BASE_DIR/WebCore/dom \
95 $$BASE_DIR/WebCore/bridge \
96 $$BASE_DIR/WebCore/editing \
97 $$BASE_DIR/WebCore/rendering \
98 $$BASE_DIR/WebCore/history \
99 $$BASE_DIR/WebCore/xml \
100 $$BASE_DIR/WebCore/html \
101 $$BASE_DIR/WebCore/plugins
102
103
104macx {
105 INCLUDEPATH += /usr/include/libxml2
106 LIBS += -lxml2 -lxslt
107}
diff --git a/meta/packages/webkit/files/WebKit.pro b/meta/packages/webkit/files/WebKit.pro
deleted file mode 100644
index bc14feb5f6..0000000000
--- a/meta/packages/webkit/files/WebKit.pro
+++ /dev/null
@@ -1,21 +0,0 @@
1TEMPLATE = subdirs
2CONFIG += ordered
3!gtk-port:CONFIG += qt-port
4qt-port {
5 lessThan(QT_MINOR_VERSION, 4) {
6 !win32-*:SUBDIRS += WebKit/qt/Plugins
7 }
8}
9SUBDIRS += \
10 WebCore \
11 JavaScriptCore/kjs/testkjs.pro
12
13qt-port {
14 SUBDIRS += WebKit/qt/QtLauncher
15
16 !win32-*: SUBDIRS += WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
17}
18
19gtk-port:SUBDIRS += \
20 WebKitTools/GtkLauncher \
21 WebKitTools/DumpRenderTree/gtk/DumpRenderTree.pro
diff --git a/meta/packages/webkit/files/autogen.sh b/meta/packages/webkit/files/autogen.sh
deleted file mode 100755
index 97beb209d2..0000000000
--- a/meta/packages/webkit/files/autogen.sh
+++ /dev/null
@@ -1,63 +0,0 @@
1#! /bin/sh
2
3# Allow invocation from a separate build directory; in that case, we change
4# to the source directory to run the auto*, then change back before running configure
5srcdir=`dirname $0`
6test -z "$srcdir" && srcdir=.
7
8ORIGDIR=`pwd`
9cd $srcdir
10
11GTKDOCIZE_FLAGS="--copy"
12LIBTOOLIZE_FLAGS="--force --automake"
13ACLOCAL_FLAGS="-I autotools"
14AUTOMAKE_FLAGS="--foreign --add-missing"
15
16DIE=0
17
18(autoconf --version) < /dev/null > /dev/null 2>&1 || {
19 echo
20 echo "You must have autoconf installed to compile $PROJECT."
21 echo "Install the appropriate package for your distribution,"
22 echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
23 DIE=1
24}
25
26(automake --version) < /dev/null > /dev/null 2>&1 || {
27 echo
28 echo "You must have automake installed to compile $PROJECT."
29 echo "Install the appropriate package for your distribution,"
30 echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
31 DIE=1
32}
33
34LIBTOOLIZE=libtoolize
35($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
36 LIBTOOLIZE=glibtoolize
37 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
38 echo
39 echo "You must have libtool installed to compile $PROJECT."
40 echo "Install the appropriate package for your distribution,"
41 echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
42 DIE=1
43 }
44}
45
46if test "$DIE" -eq 1; then
47 exit 1
48fi
49
50rm -rf $top_srcdir/autom4te.cache
51
52touch README INSTALL
53
54gtkdocize $GTKDOCIZE_FLAGS > /dev/null 2>&1 || echo "Warning: not running gtk-docize."
55aclocal $ACLOCAL_FLAGS || exit $?
56$LIBTOOLIZE $LIBTOOLIZE_FLAGS || exit $?
57autoheader || exit $?
58automake $AUTOMAKE_FLAGS || exit $?
59autoconf || exit $?
60
61cd $ORIGDIR || exit 1
62
63$srcdir/configure $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
diff --git a/meta/packages/webkit/files/configure.ac b/meta/packages/webkit/files/configure.ac
deleted file mode 100644
index d4f3e749fc..0000000000
--- a/meta/packages/webkit/files/configure.ac
+++ /dev/null
@@ -1,983 +0,0 @@
1AC_PREREQ(2.59)
2
3m4_define([webkit_major_version], [1])
4m4_define([webkit_minor_version], [3])
5m4_define([webkit_micro_version], [2])
6
7# This is the version we'll be using as part of our User-Agent string
8# e.g., AppleWebKit/$(webkit_user_agent_version) ...
9#
10# Sourced from WebCore/Configurations/Version.xcconfig
11m4_define([webkit_user_agent_major_version], [531])
12m4_define([webkit_user_agent_minor_version], [2])
13
14AC_INIT([WebKit],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/])
15
16AC_CONFIG_MACRO_DIR([autotools])
17AC_CONFIG_AUX_DIR([autotools])
18AC_SUBST(ACLOCAL_AMFLAGS, "-I autotools")
19
20AC_CONFIG_HEADERS([autotoolsconfig.h])
21AC_CANONICAL_HOST
22
23WEBKIT_MAJOR_VERSION=webkit_major_version
24WEBKIT_MINOR_VERSION=webkit_minor_version
25WEBKIT_MICRO_VERSION=webkit_micro_version
26WEBKIT_USER_AGENT_MAJOR_VERSION=webkit_user_agent_major_version
27WEBKIT_USER_AGENT_MINOR_VERSION=webkit_user_agent_minor_version
28AC_SUBST(WEBKIT_MAJOR_VERSION)
29AC_SUBST(WEBKIT_MINOR_VERSION)
30AC_SUBST(WEBKIT_MICRO_VERSION)
31AC_SUBST(WEBKIT_USER_AGENT_MAJOR_VERSION)
32AC_SUBST(WEBKIT_USER_AGENT_MINOR_VERSION)
33
34AC_CONFIG_SRCDIR([WebCore/config.h])
35
36dnl # Libtool library version, not to confuse with API version
37dnl # see http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html#Libtool-versioning
38LIBWEBKITGTK_VERSION=0:0:0
39AC_SUBST([LIBWEBKITGTK_VERSION])
40
41AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar])
42
43# Use AM_SILENT_RULES if present
44m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
45
46# host checking - inspired by the GTK+ configure.in
47# TODO: move these to webkit.m4?
48AC_MSG_CHECKING([for native Win32])
49case "$host" in
50 *-*-mingw*)
51 os_win32=yes
52 ;;
53 *)
54 os_win32=no
55 ;;
56esac
57AC_MSG_RESULT([$os_win32])
58
59case "$host" in
60 *-*-linux*)
61 os_linux=yes
62 ;;
63 *-*-freebsd*)
64 os_freebsd=yes
65 ;;
66 *-*-darwin*)
67 os_darwin=yes
68 ;;
69esac
70
71case "$host_os" in
72 gnu* | linux* | k*bsd*-gnu)
73 os_gnu=yes
74 ;;
75 *)
76 os_gnu=no
77 ;;
78esac
79
80# initialize webkit options
81WEBKIT_INIT
82AC_DISABLE_STATIC
83AC_LIBTOOL_WIN32_DLL
84AC_PROG_LIBTOOL
85
86AC_PATH_PROG(FLEX, flex)
87if test -z "$FLEX"; then
88 AC_MSG_ERROR([You need the 'flex' lexer generator to compile WebKit])
89else
90 FLEX_VERSION=`$FLEX --version | sed 's,.*\ \([0-9]*\.[0-9]*\.[0-9]*\)$,\1,'`
91 AX_COMPARE_VERSION([2.5.33],[gt],[$FLEX_VERSION],
92 AC_MSG_WARN([You need at least version 2.5.33 of the 'flex' lexer generator to compile WebKit correctly]))
93fi
94
95AC_PATH_PROG(GPERF, gperf)
96if test -z "$GPERF"; then
97 AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
98fi
99
100# pthread (not needed on Windows)
101if test "$os_win32" = "no"; then
102AC_CHECK_HEADERS([pthread.h],
103 AC_DEFINE([HAVE_PTHREAD_H],[1],[Define if pthread exists]),
104 AC_MSG_ERROR([pthread support is required to build WebKit]))
105fi
106
107# check for libjpeg the way Gtk does it.
108AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
109 jpeg_ok=yes, jpeg_ok=no
110 AC_MSG_ERROR([JPEG library (libjpeg) not found]))
111if test "$jpeg_ok" = yes; then
112 AC_MSG_CHECKING([for jpeglib])
113 AC_TRY_CPP(
114[#include <stdio.h>
115#undef PACKAGE
116#undef VERSION
117#undef HAVE_STDLIB_H
118#include <jpeglib.h>],
119 jpeg_ok=yes,
120 jpeg_ok=no)
121 AC_MSG_RESULT($jpeg_ok)
122 if test "$jpeg_ok" = yes; then
123 JPEG_LIBS="-ljpeg"
124 # should we check for progressive JPEG like GTK+ as well?
125 else
126 AC_MSG_ERROR([JPEG library (libjpeg) not found])
127 fi
128fi
129AC_SUBST([JPEG_LIBS])
130
131# Check for libpng the way Gtk+ does it
132for l in libpng libpng14 libpng12; do
133 AC_MSG_CHECKING(for $l)
134 if $PKG_CONFIG --exists $l ; then
135 AC_MSG_RESULT(yes)
136 PNG_LIBS=`$PKG_CONFIG --libs $l`
137 png_ok=yes
138 break
139 else
140 AC_MSG_RESULT(no)
141 png_ok=no
142 fi
143done
144if test "$png_ok" != yes; then
145 AC_CHECK_LIB(png, png_read_info,
146 [AC_CHECK_HEADER(png.h,
147 png_ok=yes,
148 png_ok=no)],
149 AC_MSG_ERROR([PNG library (libpng) not found]), -lz -lm)
150 if test "$png_ok" = yes; then
151 AC_MSG_CHECKING([for png_structp in png.h])
152 AC_TRY_COMPILE([#include <png.h>],
153 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
154 png_ok=yes,
155 png_ok=no)
156 AC_MSG_RESULT($png_ok)
157 if test "$png_ok" = yes; then
158 PNG_LIBS='-lpng -lz'
159 else
160 AC_MSG_ERROR([PNG library (libpng) not found])
161 fi
162 else
163 AC_MSG_ERROR([PNG library (libpng) not found])
164 fi
165fi
166AC_SUBST([PNG_LIBS])
167
168# determine the GTK+ version to use
169AC_MSG_CHECKING([the GTK+ version to use])
170AC_ARG_WITH([gtk],
171 [AS_HELP_STRING([--with-gtk=2.0|3.0], [the GTK+ version to use (default: 2.0)])],
172 [case "$with_gtk" in
173 2.0|3.0) ;;
174 *) AC_MSG_ERROR([invalid GTK+ version specified]) ;;
175 esac],
176 [with_gtk=2.0])
177AC_MSG_RESULT([$with_gtk])
178
179case "$with_gtk" in
180 2.0) GTK_REQUIRED_VERSION=2.10
181 GTK_API_VERSION=2.0
182 WEBKITGTK_API_MAJOR_VERSION=1
183 WEBKITGTK_API_MINOR_VERSION=0
184 WEBKITGTK_API_VERSION=1.0
185 WEBKITGTK_PC_NAME=webkit
186 GAIL_PC_NAME=gail
187 GAIL_REQUIRED_VERSION=1.8
188 ;;
189 3.0) GTK_REQUIRED_VERSION=2.90
190 GTK_API_VERSION=3.0
191 WEBKITGTK_API_MAJOR_VERSION=3
192 WEBKITGTK_API_MINOR_VERSION=0
193 WEBKITGTK_API_VERSION=3.0
194 WEBKITGTK_PC_NAME=webkitgtk
195 GAIL_PC_NAME=gail-3.0
196 GAIL_REQUIRED_VERSION=2.90.4
197 ;;
198esac
199
200AC_SUBST([WEBKITGTK_API_MAJOR_VERSION])
201AC_SUBST([WEBKITGTK_API_MINOR_VERSION])
202AC_SUBST([WEBKITGTK_API_VERSION])
203AC_SUBST([WEBKITGTK_PC_NAME])
204AC_SUBST([GTK_API_VERSION])
205AM_CONDITIONAL([GTK_API_VERSION_2],[test "$GTK_API_VERSION" = "2.0"])
206
207# determine the GDK/GTK+ target
208AC_MSG_CHECKING([the target windowing system])
209AC_ARG_WITH(target,
210 AC_HELP_STRING([--with-target=@<:@x11/win32/quartz/directfb@:>@],
211 [Select webkit target [default=x11]]),
212 [],[with_target="x11"])
213
214case "$with_target" in
215 x11|win32|quartz|directfb) ;;
216 *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;;
217esac
218
219AC_MSG_RESULT([$with_target])
220
221AC_MSG_CHECKING([for Hildon UI extensions])
222AC_ARG_WITH(hildon,
223 AC_HELP_STRING([--with-hildon],
224 [Use Hildon UI extensions [default=no]]),
225 [],[with_hildon="no"])
226AC_MSG_RESULT([$with_hildon])
227
228if test "$with_hildon" = "yes"; then
229 HILDON_CPPFLAGS="-DMAEMO_CHANGES"
230 PKG_CHECK_MODULES([HILDON], [hildon-1])
231 AC_SUBST([HILDON_CPPFLAGS])
232 AC_SUBST([HILDON_CFLAGS])
233 AC_SUBST([HILDON_LIBS])
234fi
235
236# minimum base dependencies
237LIBSOUP_REQUIRED_VERSION=2.28.2
238CAIRO_REQUIRED_VERSION=1.6
239FONTCONFIG_REQUIRED_VERSION=2.4
240FREETYPE2_REQUIRED_VERSION=9.0
241LIBXML_REQUIRED_VERSION=2.6
242
243# minimum GTK+ base dependencies
244PANGO_REQUIRED_VERSION=1.12
245
246# optional modules
247LIBXSLT_REQUIRED_VERSION=1.1.7
248SQLITE_REQUIRED_VERSION=3.0
249GSTREAMER_REQUIRED_VERSION=0.10
250GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=0.10.25
251ENCHANT_REQUIRED_VERSION=0.22
252
253# Available modules
254#
255# glib - glib and includes gthread
256# unicode - check and identify which unicode backend to use
257#
258# todo: webcore gtk
259WEBKIT_CHECK_DEPENDENCIES([glib unicode])
260
261GETTEXT_PACKAGE=$PACKAGE
262AC_SUBST(GETTEXT_PACKAGE)
263AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
264 [The gettext catalog name])
265
266PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
267AC_SUBST(LIBXML_CFLAGS)
268AC_SUBST(LIBXML_LIBS)
269
270PKG_CHECK_MODULES(PANGO,
271 [pango >= $PANGO_REQUIRED_VERSION
272 pangoft2])
273AC_SUBST(PANGO_CFLAGS)
274AC_SUBST(PANGO_LIBS)
275
276PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED_VERSION)
277AC_SUBST(ENCHANT_CFLAGS)
278AC_SUBST(ENCHANT_LIBS)
279
280PKG_CHECK_MODULES(GAIL, $GAIL_PC_NAME >= $GAIL_REQUIRED_VERSION)
281AC_SUBST(GAIL_CFLAGS)
282AC_SUBST(GAIL_LIBS)
283
284# check for target-specific dependencies
285if test "$with_target" = "directfb"; then
286 PKG_CHECK_MODULES(CAIRO, cairo-directfb >= $CAIRO_REQUIRED_VERSION)
287 PKG_CHECK_MODULES(GTK, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION)
288 AC_DEFINE([WTF_PLATFORM_DIRECTFB],[1],[Define if target is DirectFB])
289else
290 PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
291 PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION)
292
293 if test "$with_target" = "x11" && test "$os_win32" = "no"; then
294 # check for XT
295 PKG_CHECK_MODULES([XT],
296 [xt],
297 [xt_has_pkg_config=yes],
298 [xt_has_pkg_config=no])
299 # some old versions of Xt do not provide xt.pc, so try to link against Xt
300 # and if it's installed fall back to just adding -lXt
301 if test "$xt_has_pkg_config" = "no"; then
302 # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as
303 # we don't care about the XtOpenDisplay symbol but only about the
304 # existence of libXt
305 AC_CHECK_LIB([Xt], [XtOpenDisplay],
306 [XT_CFLAGS=""; XT_LIBS="-lXt"],
307 [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])])
308 fi
309 AC_SUBST([XT_CFLAGS])
310 AC_SUBST([XT_LIBS])
311 AC_DEFINE([WTF_PLATFORM_X11],[1],[Define if target is X11])
312 fi
313fi
314AC_SUBST(GTK_CFLAGS)
315AC_SUBST(GTK_LIBS)
316AC_SUBST(CAIRO_CFLAGS)
317AC_SUBST(CAIRO_LIBS)
318
319# check whether to build with debugging enabled
320AC_MSG_CHECKING([whether to do a debug build])
321AC_ARG_ENABLE(debug,
322 AC_HELP_STRING([--enable-debug],
323 [turn on debugging [default=no]]),
324 [],[enable_debug="no"])
325AC_MSG_RESULT([$enable_debug])
326
327# check whether to enable optimized builds
328AC_MSG_CHECKING([whether to enable optimized builds])
329AC_ARG_ENABLE(optimizations,
330 AC_HELP_STRING([--enable-optimizations],
331 [turn on optimize builds (GCC only)
332 [default=yes]]),
333 [enable_optimizations=$enableval],
334 [if test "$enable_debug" = "yes"; then enable_optimizations="no"; else enable_optimizations="yes"; fi])
335AC_MSG_RESULT([$enable_optimizations])
336
337# check whether to enable 3D transforms support
338AC_MSG_CHECKING([whether to enable support for 3D Transforms])
339AC_ARG_ENABLE(3D_transforms,
340 AC_HELP_STRING([--enable-3D-transforms],
341 [enable support for 3D transforms [default=no]]),
342 [],[enable_3D_transforms="no"])
343AC_MSG_RESULT([$enable_3D_transforms])
344
345# check whether to enable channel messaging support
346AC_MSG_CHECKING([whether to enable HTML5 Channel Messaging support])
347AC_ARG_ENABLE(channel_messaging,
348 AC_HELP_STRING([--enable-channel-messaging],
349 [enable HTML5 channel messaging support [default=yes]]),
350 [],[enable_channel_messaging="yes"])
351AC_MSG_RESULT([$enable_channel_messaging])
352
353# check whether to enable JavaScript debugger/profiler support
354AC_MSG_CHECKING([whether to enable JavaScript debugger/profiler support])
355AC_ARG_ENABLE(javascript_debugger,
356 AC_HELP_STRING([--enable-javascript-debugger],
357 [enable JavaScript debugger/profiler support [default=yes]]),
358 [],[enable_javascript_debugger="yes"])
359AC_MSG_RESULT([$enable_javascript_debugger])
360
361# check whether to enable HTML5 Offline Web Applications support
362AC_MSG_CHECKING([whether to enable HTML5 offline web applications support])
363AC_ARG_ENABLE(offline_web_applications,
364 AC_HELP_STRING([--enable-offline-web-applications],
365 [enable HTML5 offline web applications support [default=yes]]),
366 [],[enable_offline_web_applications="yes"])
367AC_MSG_RESULT([$enable_offline_web_applications])
368
369# check whether to enable HTML5 client-side session and persitent storage support
370AC_MSG_CHECKING([whether to enable HTML5 client-side session and persistent storage support])
371AC_ARG_ENABLE(dom_storage,
372 AC_HELP_STRING([--enable-dom-storage],
373 [enable HTML5 client-side session and persistent storage support [default=yes]]),
374 [],[enable_dom_storage="yes"])
375AC_MSG_RESULT([$enable_dom_storage])
376
377# check whether to enable the indexed database API
378AC_MSG_CHECKING([whether to enable the indexed database API])
379AC_ARG_ENABLE(indexed_database,
380 AC_HELP_STRING([--enable-indexeddb],
381 [enable the indexed database API [default=no]]),
382 [],[enable_indexed_database="no"])
383AC_MSG_RESULT([$enable_indexed_database])
384
385# check whether to enable the speech input API
386AC_MSG_CHECKING([whether to enable the speech input API])
387AC_ARG_ENABLE(input_speech,
388 AC_HELP_STRING([--enable-input-speech],
389 [enable the speech input API [default=no]]),
390 [],[enable_input_speech="no"])
391AC_MSG_RESULT([$enable_input_speech])
392
393# check whether to build with database support
394AC_MSG_CHECKING([whether to enable HTML5 client-side database storage support])
395AC_ARG_ENABLE(database,
396 AC_HELP_STRING([--enable-database],
397 [enable HTML5 client-side database storage support [default=yes]]),
398 [],[enable_database="yes"])
399AC_MSG_RESULT([$enable_database])
400
401# check whether to build with server-sent events support
402AC_MSG_CHECKING([whether to enable HTML5 server-sent events support])
403AC_ARG_ENABLE(eventsource,
404 AC_HELP_STRING([--enable-eventsource],
405 [enable HTML5 server-sent events support [default=yes]]),
406 [],[enable_eventsource="yes"])
407AC_MSG_RESULT([$enable_eventsource])
408
409# check whether to build with icon database support
410AC_MSG_CHECKING([whether to enable icon database support])
411AC_ARG_ENABLE(icon_database,
412 AC_HELP_STRING([--enable-icon-database],
413 [enable icon database [default=yes]]),
414 [],[enable_icon_database="yes"])
415AC_MSG_RESULT([$enable_icon_database])
416
417# check whether to build with image resizer API support
418AC_MSG_CHECKING([whether to enable image resizer API support])
419AC_ARG_ENABLE(image_resizer,
420 AC_HELP_STRING([--enable-image-resizer],
421 [enable image resizer [default=no]]),
422 [],[enable_image_resizer="no"])
423AC_MSG_RESULT([$enable_image_resizer])
424
425# check whether to enable HTML5 datalist support
426AC_MSG_CHECKING([whether to enable HTML5 datalist support])
427AC_ARG_ENABLE(datalist,
428 AC_HELP_STRING([--enable-datalist],
429 [enable HTML5 datalist support [default=yes]]),
430 [],[enable_datalist="yes"])
431AC_MSG_RESULT([$enable_datalist])
432
433# check whether to enable HTML5 ruby support
434AC_MSG_CHECKING([whether to enable HTML5 ruby support])
435AC_ARG_ENABLE(ruby,
436 AC_HELP_STRING([--enable-ruby],
437 [enable HTML5 ruby support [default=yes]]),
438 [],[enable_ruby="yes"])
439AC_MSG_RESULT([$enable_ruby])
440
441# check whether to enable HTML5 sandbox iframe support
442AC_MSG_CHECKING([whether to enable HTML5 sandboxed iframe support])
443AC_ARG_ENABLE(sandbox,
444 AC_HELP_STRING([--enable-sandbox],
445 [enable HTML5 sandboxed iframe support [default=yes]]),
446 [],[enable_sandbox="yes"])
447AC_MSG_RESULT([$enable_sandbox])
448
449# check whether to enable HTML5 audio/video support
450AC_MSG_CHECKING([whether to enable HTML5 video support])
451AC_ARG_ENABLE(video,
452 AC_HELP_STRING([--enable-video],
453 [enable HTML5 video support [default=yes]]),
454 [],[enable_video="yes"])
455AC_MSG_RESULT([$enable_video])
456
457# check whether to enable XHTML-MP support
458AC_MSG_CHECKING([whether to enable XHTML-MP support])
459AC_ARG_ENABLE(xhtmlmp,
460 AC_HELP_STRING([--enable-xhtmlmp],
461 [enable support for XHTML-MP [default=no]]),
462 [],[enable_xhtmlmp="no"])
463AC_MSG_RESULT([$enable_xhtmlmp])
464
465# check whether to enable XPath support
466AC_MSG_CHECKING([whether to enable XPath support])
467AC_ARG_ENABLE(xpath,
468 AC_HELP_STRING([--enable-xpath],
469 [enable support for XPath [default=yes]]),
470 [],[enable_xpath="yes"])
471AC_MSG_RESULT([$enable_xpath])
472
473# check whether to enable XSLT support
474AC_MSG_CHECKING([whether to enable XSLT support])
475AC_ARG_ENABLE(xslt,
476 AC_HELP_STRING([--enable-xslt],
477 [enable support for XSLT [default=yes]]),
478 [],[enable_xslt="yes"])
479AC_MSG_RESULT([$enable_xslt])
480
481# check whether to enable geolocation support
482AC_MSG_CHECKING([whether to enable geolocation support])
483AC_ARG_ENABLE(geolocation,
484 AC_HELP_STRING([--enable-geolocation],
485 [enable support for geolocation [default=no]]),
486 [],[enable_geolocation="no"])
487AC_MSG_RESULT([$enable_geolocation])
488
489# check whether to enable MathML support
490AC_MSG_CHECKING([whether to enable MathML support])
491AC_ARG_ENABLE(mathml,
492 AC_HELP_STRING([--enable-mathml],
493 [enable support for MathML [default=no]]),
494 [],[enable_mathml="no"])
495AC_MSG_RESULT([$enable_mathml])
496
497# check whether to enable SVG support
498AC_MSG_CHECKING([whether to enable SVG support])
499AC_ARG_ENABLE(svg,
500 AC_HELP_STRING([--enable-svg],
501 [enable support for SVG [default=yes]]),
502 [],[enable_svg="yes"])
503AC_MSG_RESULT([$enable_svg])
504
505# check whether to enable WML support
506AC_MSG_CHECKING([whether to enable WML support])
507AC_ARG_ENABLE(wml,
508 AC_HELP_STRING([--enable-wml],
509 [enable support for WML [default=no]]),
510 [],[enable_wml="no"])
511AC_MSG_RESULT([$enable_wml])
512
513# check whether to enable SharedWorkers support
514AC_MSG_CHECKING([whether to enable SharedWorkers support])
515AC_ARG_ENABLE(shared_workers,
516 AC_HELP_STRING([--enable-shared-workers],
517 [enable support for SharedWorkers [default=yes]]),
518 [],[enable_shared_workers="yes"])
519AC_MSG_RESULT([$enable_shared_workers])
520
521# check whether to enable Web Workers support
522AC_MSG_CHECKING([whether to enable Web Workers support])
523AC_ARG_ENABLE(workers,
524 AC_HELP_STRING([--enable-workers],
525 [enable support for Web Workers [default=yes]]),
526 [],[enable_workers="yes"])
527AC_MSG_RESULT([$enable_workers])
528
529# turn off svg features if --disable-svg is requested
530if test "$enable_svg" = "no"; then
531 enable_svg_animation=no
532 enable_svg_fonts=no
533 enable_svg_foreign_object=no
534 enable_svg_as_image=no
535 enable_svg_use=no
536fi
537
538# check whether to enable support for SVG animation
539AC_MSG_CHECKING([whether to enable support for SVG animation])
540AC_ARG_ENABLE(svg_animation,
541 AC_HELP_STRING([--enable-svg-animation],
542 [enable support for SVG animation (experimental) [default=yes]]),
543 [],[enable_svg_animation="yes"])
544AC_MSG_RESULT([$enable_svg_animation])
545
546# check whether to enable support for filters
547AC_MSG_CHECKING([whether to enable support for filters])
548AC_ARG_ENABLE(filters,
549 AC_HELP_STRING([--enable-filters],
550 [enable support for filters (experimental) [default=yes]]),
551 [],[enable_filters="yes"])
552AC_MSG_RESULT([$enable_filters])
553
554# check whether to enable support for SVG fonts
555AC_MSG_CHECKING([whether to enable support for SVG fonts])
556AC_ARG_ENABLE(svg_fonts,
557 AC_HELP_STRING([--enable-svg-fonts],
558 [enable support for SVG fonts (experimental) [default=yes]]),
559 [],[enable_svg_fonts="yes"])
560AC_MSG_RESULT([$enable_svg_fonts])
561
562# check whether to enable foreign objects support for SVG
563AC_MSG_CHECKING([whether to enable support for SVG foreign objects])
564AC_ARG_ENABLE(svg_foreign_object,
565 AC_HELP_STRING([--enable-svg-foreign-object],
566 [enable support for SVG foreign objects (experimental) [default=yes]]),
567 [],[enable_svg_foreign_object="yes"])
568AC_MSG_RESULT([$enable_svg_foreign_object])
569
570# check whether to enable SVG As Image support
571AC_MSG_CHECKING([whether to enable SVG as Image support])
572AC_ARG_ENABLE(svg_as_image,
573 AC_HELP_STRING([--enable-svg-as-image],
574 [enable SVG as Image support (experimental) [default=yes]]),
575 [],[enable_svg_as_image="yes"])
576AC_MSG_RESULT([$enable_svg_as_image])
577
578# check whether to enable SVG USE element support
579AC_MSG_CHECKING([whether to enable support for SVG use element])
580AC_ARG_ENABLE(svg_use,
581 AC_HELP_STRING([--enable-svg-use],
582 [enable SVG use element support (experimental) [default=yes]]),
583 [],[enable_svg_use="yes"])
584AC_MSG_RESULT([$enable_svg_use])
585
586# check for SVG features, enabling SVG if necessary
587if test "$enable_svg_animation" = "yes" || \
588 test "$enable_svg_fonts" = "yes" || \
589 test "$enable_svg_foreign_object" = "yes" || \
590 test "$enable_svg_as_image" = "yes" || \
591 test "$enable_svg_use" = "yes"; then
592 svg_flags=yes
593 if test "$enable_svg" = "no"; then
594 AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
595 enable_svg=yes
596 fi
597fi
598
599# check whether to enable Web Socket support
600AC_MSG_CHECKING([whether to enable Web Sockets support])
601AC_ARG_ENABLE(web_sockets,
602 AC_HELP_STRING([--enable-web-sockets],
603 [enable support for Web Sockets [default=no]]),
604 [],[enable_web_sockets="no"])
605AC_MSG_RESULT([$enable_web_sockets])
606
607# check whether to enable Web Timing support
608AC_MSG_CHECKING([whether to enable Web Timing support])
609AC_ARG_ENABLE(web_timing,
610 AC_HELP_STRING([--enable-web-timing],
611 [enable support for Web Timing [default=no]]),
612 [],[enable_web_timing="no"])
613AC_MSG_RESULT([$enable_web_timing])
614
615# check whether to enable Blob.slice support
616AC_MSG_CHECKING([whether to enable Blob.slice support])
617AC_ARG_ENABLE(blob_slice,
618 AC_HELP_STRING([--enable-blob-slice],
619 [enable support for Blob.slice [default=no]]),
620 [],[enable_blob_slice="no"])
621AC_MSG_RESULT([$enable_blob_slice])
622
623# check whether to enable Fast Mobile Scrolling support
624AC_MSG_CHECKING([whether to enable Fast Mobile Scrolling])
625AC_ARG_ENABLE(fast_mobile_scrolling,
626 AC_HELP_STRING([--enable-fast-mobile-scrolling],
627 [enable support for Fast Mobile Scrolling [default=no]]),
628 [],[enable_fast_mobile_scrolling="no"])
629AC_MSG_RESULT([$enable_fast_mobile_scrolling])
630
631# check whether to enable FileReader support
632AC_MSG_CHECKING([whether to enable FileReader support])
633AC_ARG_ENABLE(file_reader,
634 AC_HELP_STRING([--enable-file-reader],
635 [enable support for FileReader [default=no]]),
636 [],[enable_file_reader="no"])
637AC_MSG_RESULT([$enable_file_reader])
638
639# check whether to enable FileWriter support
640AC_MSG_CHECKING([whether to enable FileWriter support])
641AC_ARG_ENABLE(file_writer,
642 AC_HELP_STRING([--enable-file-writer],
643 [enable support for FileWriter [default=no]]),
644 [],[enable_file_writer="no"])
645AC_MSG_RESULT([$enable_file_writer])
646
647# check whether to enable code coverage
648AC_MSG_CHECKING([whether to enable code coverage support])
649AC_ARG_ENABLE(coverage,
650 AC_HELP_STRING([--enable-coverage],
651 [enable code coverage support [default=no]]),
652 [],[enable_coverage="no"])
653AC_MSG_RESULT([$enable_coverage])
654
655# check whether to enable FastMalloc
656AC_MSG_CHECKING([whether to enable optimized memory allocator])
657AC_ARG_ENABLE(fast_malloc,
658 AC_HELP_STRING([--enable-fast-malloc],
659 [enable optimized memory allocator default=yes, default=no for debug builds]),
660 [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
661AC_MSG_RESULT([$enable_fast_malloc])
662
663AC_MSG_CHECKING([whether to enable JIT compilation])
664AC_ARG_ENABLE([jit],
665 AC_HELP_STRING([--enable-jit],
666 [Enable JIT compilation default=yes]),
667 [],[enable_jit="yes"])
668if test "$enable_jit" = "yes"; then
669 case "$host_cpu" in
670 i*86|x86_64)
671 AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
672 AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
673 AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
674 AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
675 AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
676 AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
677 case "$host_cpu" in
678 i*86)
679 AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
680 ;;
681 x86_64)
682 AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
683 AC_DEFINE([WTF_USE_ALTERNATE_JSIMMEDIATE], [1], [Use alternate JSImmediate])
684 ;;
685 esac
686 ;;
687 *)
688 enable_jit="no (CPU '$host_cpu' not supported)"
689 ;;
690 esac
691fi
692AC_MSG_RESULT([$enable_jit])
693
694# GObject Introspection
695AC_MSG_CHECKING([whether to enable GObject introspection support])
696AC_ARG_ENABLE([introspection],
697 [AS_HELP_STRING([--enable-introspection],[Enable GObject introspection (default: disabled)])],
698 [],[enable_introspection=no])
699AC_MSG_RESULT([$enable_introspection])
700
701G_IR_SCANNER=
702G_IR_COMPILER=
703G_IR_GENERATE=
704GIRDIR=
705GIRTYPELIBDIR=
706
707if test "$enable_introspection" = "yes"; then
708 GOBJECT_INTROSPECTION_REQUIRED=0.6.15
709 PKG_CHECK_MODULES([INTROSPECTION],[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED])
710
711 G_IR_SCANNER="$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)"
712 G_IR_COMPILER="$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)"
713 G_IR_GENERATE="$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)"
714 AC_DEFINE([ENABLE_INTROSPECTION],[1],[Define to enable GObject introspection support])
715fi
716
717AC_SUBST([G_IR_SCANNER])
718AC_SUBST([G_IR_COMPILER])
719AC_SUBST([G_IR_GENERATE])
720
721# determine the font backend
722AC_MSG_CHECKING([the font backend to use])
723AC_ARG_WITH(font_backend,
724 AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
725 [Select font backend [default=freetype]]),
726 [],[with_font_backend="freetype"])
727
728case "$with_font_backend" in
729 freetype|pango) ;;
730 *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
731esac
732AC_MSG_RESULT([$with_font_backend])
733
734# Add '-g' flag to gcc if it's debug build
735if test "$enable_debug" = "yes"; then
736 CXXFLAGS="$CXXFLAGS -g"
737 CFLAGS="$CFLAGS -g"
738else
739 AC_DEFINE([NDEBUG], [1], [Define to disable debugging features])
740fi
741
742# Add the appropriate 'O' level for optimized builds
743if test "$enable_optimizations" = "yes"; then
744 CXXFLAGS="$CXXFLAGS -O2"
745 CFLAGS="$CFLAGS -O2"
746else
747 CXXFLAGS="$CXXFLAGS -O0"
748 CFLAGS="$CFLAGS -O0"
749fi
750
751PKG_CHECK_MODULES([LIBSOUP],
752 [libsoup-2.4 >= $LIBSOUP_REQUIRED_VERSION])
753AC_SUBST([LIBSOUP_CFLAGS])
754AC_SUBST([LIBSOUP_LIBS])
755
756# check if we can use libSoup 2.29.90 features
757PKG_CHECK_MODULES([LIBSOUP_2_29_90],
758 [libsoup-2.4 >= 2.29.90],
759 [have_libsoup_2_29_90=yes],
760 [have_libsoup_2_29_90=no])
761if test "$have_libsoup_2_29_90" = "yes"; then
762 AC_DEFINE([HAVE_LIBSOUP_2_29_90], 1, [Whether libSoup 2.29.90 features are available])
763fi
764
765# check if FreeType/FontConfig are available
766if test "$with_font_backend" = "freetype"; then
767 if test "$with_target" = "directfb"; then
768 PKG_CHECK_MODULES([FREETYPE],
769 [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
770 freetype2 >= $FREETYPE2_REQUIRED_VERSION])
771 else
772 PKG_CHECK_MODULES([FREETYPE],
773 [cairo-ft
774 fontconfig >= $FONTCONFIG_REQUIRED_VERSION
775 freetype2 >= $FREETYPE2_REQUIRED_VERSION])
776 fi
777 AC_SUBST([FREETYPE_CFLAGS])
778 AC_SUBST([FREETYPE_LIBS])
779fi
780
781# check if sqlite 3 is available
782if test "$enable_icon_database" = "yes" || \
783 test "$enable_database" = "yes" || \
784 test "$enable_offline_web_applications" = "yes" || \
785 test "$enable_dom_storage" = "yes"; then
786 PKG_CHECK_MODULES([SQLITE3],
787 [sqlite3 >= $SQLITE_REQUIRED_VERSION],
788 [sqlite3_has_pkg_config=yes],
789 [sqlite3_has_pkg_config=no])
790 if test "$sqlite3_has_pkg_config" = "no"; then
791 AC_SEARCH_LIBS([sqlite3_open16], [sqlite3],
792 [SQLITE3_LIBS="$LIBS";SQLITE3_CFLAGS="-I $srcdir/WebKitLibraries/WebCoreSQLite3"],
793 [AC_MSG_ERROR([SQLite3 is required to enable Database support])])
794 fi
795 AC_SUBST([SQLITE3_CFLAGS])
796 AC_SUBST([SQLITE3_LIBS])
797fi
798
799# check if libxslt is available
800if test "$enable_xslt" = "yes"; then
801 PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
802 AC_SUBST([LIBXSLT_CFLAGS])
803 AC_SUBST([LIBXSLT_LIBS])
804fi
805
806# check if geoclue is available
807if test "$enable_geolocation" = "yes"; then
808 PKG_CHECK_MODULES([GEOCLUE], [geoclue])
809 AC_SUBST([GEOCLUE_CFLAGS])
810 AC_SUBST([GEOCLUE_LIBS])
811fi
812
813# check if gstreamer is available
814if test "$enable_video" = "yes"; then
815 PKG_CHECK_MODULES([GSTREAMER],
816 [gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION
817 gstreamer-app-0.10
818 gstreamer-base-0.10
819 gstreamer-pbutils-0.10
820 gstreamer-plugins-base-0.10 >= $GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION
821 gstreamer-video-0.10])
822 AC_SUBST([GSTREAMER_CFLAGS])
823 AC_SUBST([GSTREAMER_LIBS])
824fi
825
826# check for code coverage support
827if test "$enable_coverage" = "yes"; then
828 COVERAGE_CFLAGS="-MD"
829 COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
830 AC_SUBST([COVERAGE_CFLAGS])
831 AC_SUBST([COVERAGE_LDFLAGS])
832fi
833
834# check for HTML features
835if test "$enable_video" = "yes"; then
836 html_flags=yes
837fi
838
839GTK_DOC_CHECK([1.10])
840
841# OS conditionals
842AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
843AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
844AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
845AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"])
846AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
847
848# target conditionals
849AM_CONDITIONAL([TARGET_X11], [test "$with_target" = "x11"])
850AM_CONDITIONAL([TARGET_WIN32], [test "$with_target" = "win32"])
851AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
852AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
853
854# Unicode backend conditionals
855AM_CONDITIONAL([USE_ICU_UNICODE], [test "$with_unicode_backend" = "icu"])
856AM_CONDITIONAL([USE_GLIB_UNICODE], [test "$with_unicode_backend" = "glib"])
857
858# Font backend conditionals
859AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
860AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
861
862# WebKit feature conditionals
863AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
864AM_CONDITIONAL([ENABLE_3D_TRANSFORMS],[test "$enable_3D_transforms" = "yes"])
865AM_CONDITIONAL([ENABLE_BLOB_SLICE],[test "$enable_blob_slice" = "yes"])
866AM_CONDITIONAL([ENABLE_CHANNEL_MESSAGING],[test "$enable_channel_messaging" = "yes"])
867AM_CONDITIONAL([ENABLE_JAVASCRIPT_DEBUGGER],[test "$enable_javascript_debugger" = "yes"])
868AM_CONDITIONAL([ENABLE_OFFLINE_WEB_APPLICATIONS],[test "$enable_offline_web_applications" = "yes"])
869AM_CONDITIONAL([ENABLE_DOM_STORAGE],[test "$enable_dom_storage" = "yes"])
870AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
871AM_CONDITIONAL([ENABLE_DATALIST],[test "$enable_datalist" = "yes"])
872AM_CONDITIONAL([ENABLE_EVENTSOURCE],[test "$enable_eventsource" = "yes"])
873AM_CONDITIONAL([ENABLE_FAST_MOBILE_SCROLLING],[test "$enable_fast_mobile_scrolling" = "yes"])
874AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
875AM_CONDITIONAL([ENABLE_IMAGE_RESIZER],[test "$enable_image_resizer" = "yes"])
876AM_CONDITIONAL([ENABLE_INDEXED_DATABASE],[test "$enable_indexed_database" = "yes"])
877AM_CONDITIONAL([ENABLE_INPUT_SPEECH],[test "$enable_input_speech" = "yes"])
878AM_CONDITIONAL([ENABLE_XHTMLMP],[test "$enable_xhtmlmp" = "yes"])
879AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
880AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
881AM_CONDITIONAL([ENABLE_FILTERS],[test "$enable_filters" = "yes"])
882AM_CONDITIONAL([ENABLE_FILE_READER],[test "$enable_file_reader" = "yes"])
883AM_CONDITIONAL([ENABLE_FILE_WRITER],[test "$enable_file_writer" = "yes"])
884AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
885AM_CONDITIONAL([ENABLE_MATHML], [test "$enable_mathml" = "yes"])
886AM_CONDITIONAL([ENABLE_RUBY],[test "$enable_ruby" = "yes"])
887AM_CONDITIONAL([ENABLE_SANDBOX],[test "$enable_sandbox" = "yes"])
888AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
889AM_CONDITIONAL([ENABLE_NOTIFICATIONS],[test "$enable_notifications" = "yes"])
890AM_CONDITIONAL([ENABLE_ORIENTATION_EVENTS],[test "$enable_orientation_events" = "yes"])
891AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
892AM_CONDITIONAL([ENABLE_SVG_ANIMATION],[test "$enable_svg_animation" = "yes"])
893AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
894AM_CONDITIONAL([ENABLE_SVG_FOREIGN_OBJECT],[test "$enable_svg_foreign_object" = "yes"])
895AM_CONDITIONAL([ENABLE_SVG_AS_IMAGE],[test "$enable_svg_as_image" = "yes"])
896AM_CONDITIONAL([ENABLE_SVG_USE],[test "$enable_svg_use" = "yes"])
897AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
898AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
899AM_CONDITIONAL([ENABLE_WML],[test "$enable_wml" = "yes"])
900AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_workers" = "yes"])
901AM_CONDITIONAL([ENABLE_SHARED_WORKERS],[test "$enable_shared_workers" = "yes"])
902AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
903AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"])
904AM_CONDITIONAL([ENABLE_WEB_SOCKETS],[test "$enable_web_sockets" = "yes"])
905AM_CONDITIONAL([ENABLE_WEB_TIMING],[test "$enable_web_timing" = "yes"])
906
907# Gtk conditionals
908AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
909
910
911AC_CONFIG_FILES([
912GNUmakefile
913WebKit/gtk/webkit/webkitversion.h
914WebKit/gtk/docs/GNUmakefile
915WebKit/gtk/docs/version.xml
916]
917)
918
919AC_CONFIG_FILES([
920WebKit/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:WebKit/gtk/webkit.pc.in
921WebKit/gtk/JSCore-${WEBKITGTK_API_VERSION}.gir:WebKit/gtk/JSCore.gir.in]
922,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
923)
924
925AC_OUTPUT
926
927echo "
928WebKit was configured with the following options:
929
930Build configuration:
931 Enable debugging (slow) : $enable_debug
932 Enable GCC build optimization : $enable_optimizations
933 Code coverage support : $enable_coverage
934 Unicode backend : $with_unicode_backend
935 Font backend : $with_font_backend
936 Optimized memory allocator : $enable_fast_malloc
937Features:
938 3D Transforms : $enable_3D_transforms
939 Blob.slice support : $enable_blob_slice
940 Fast Mobile Scrolling : $enable_fast_mobile_scrolling
941 JIT compilation : $enable_jit
942 Filters support : $enable_filters
943 FileReader support : $enable_file_reader
944 FileWriter support : $enable_file_writer
945 Geolocation support : $enable_geolocation
946 JavaScript debugger/profiler support : $enable_javascript_debugger
947 MathML support : $enable_mathml
948 HTML5 offline web applications support : $enable_offline_web_applications
949 HTML5 channel messaging support : $enable_channel_messaging
950 HTML5 client-side session and persistent storage support : $enable_dom_storage
951 HTML5 client-side database storage support : $enable_database
952 HTML5 ruby support : $enable_ruby
953 HTML5 sandboxed iframe support : $enable_sandbox
954 HTML5 server-sent events support : $enable_eventsource
955 HTML5 video element support : $enable_video
956 Icon database support : $enable_icon_database
957 Image resizer support : $enable_image_resizer
958 SharedWorkers support : $enable_shared_workers
959 Speech input support : $enable_input_speech
960 SVG support : $enable_svg
961 SVG animation support : $enable_svg_animation
962 SVG fonts support : $enable_svg_fonts
963 SVG foreign object support : $enable_svg_foreign_object
964 SVG as image support : $enable_svg_as_image
965 SVG use element support : $enable_svg_use
966 WML support : $enable_wml
967 Web Sockets support : $enable_web_sockets
968 Web Timing support : $enable_web_timing
969 Web Workers support : $enable_workers
970 XHTML-MP support : $enable_xhtmlmp
971 XPATH support : $enable_xpath
972 XSLT support : $enable_xslt
973GTK+ configuration:
974 GTK+ version : $with_gtk
975 GDK target : $with_target
976 Hildon UI extensions : $with_hildon
977 Introspection support : $enable_introspection
978"
979if test "$with_unicode_backend" = "glib"; then
980 echo " >> WARNING: the glib-based unicode backend is slow and incomplete <<"
981 echo
982 echo
983fi
diff --git a/meta/packages/webkit/files/fix_im.patch b/meta/packages/webkit/files/fix_im.patch
deleted file mode 100644
index e69de29bb2..0000000000
--- a/meta/packages/webkit/files/fix_im.patch
+++ /dev/null
diff --git a/meta/packages/webkit/files/gtk-doc.make b/meta/packages/webkit/files/gtk-doc.make
deleted file mode 100644
index 354ffb7c66..0000000000
--- a/meta/packages/webkit/files/gtk-doc.make
+++ /dev/null
@@ -1,173 +0,0 @@
1# -*- mode: makefile -*-
2
3####################################
4# Everything below here is generic #
5####################################
6
7if GTK_DOC_USE_LIBTOOL
8GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
9GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
10else
11GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
12GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
13endif
14
15# We set GPATH here; this gives us semantics for GNU make
16# which are more like other make's VPATH, when it comes to
17# whether a source that is a target of one rule is then
18# searched for in VPATH/GPATH.
19#
20GPATH = $(srcdir)
21
22TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
23
24EXTRA_DIST = \
25 $(content_files) \
26 $(HTML_IMAGES) \
27 $(DOC_MAIN_SGML_FILE) \
28 $(DOC_MODULE)-sections.txt \
29 $(DOC_MODULE)-overrides.txt
30
31DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
32 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
33
34SCANOBJ_FILES = \
35 $(DOC_MODULE).args \
36 $(DOC_MODULE).hierarchy \
37 $(DOC_MODULE).interfaces \
38 $(DOC_MODULE).prerequisites \
39 $(DOC_MODULE).signals
40
41REPORT_FILES = \
42 $(DOC_MODULE)-undocumented.txt \
43 $(DOC_MODULE)-undeclared.txt \
44 $(DOC_MODULE)-unused.txt
45
46CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
47
48if ENABLE_GTK_DOC
49all-local: html-build.stamp
50else
51all-local:
52endif
53
54docs: html-build.stamp
55
56#### scan ####
57
58scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
59 @echo 'gtk-doc: Scanning header files'
60 @-chmod -R u+w $(srcdir)
61 cd $(srcdir) && \
62 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
63 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
64 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
65 else \
66 cd $(srcdir) ; \
67 for i in $(SCANOBJ_FILES) ; do \
68 test -f $$i || touch $$i ; \
69 done \
70 fi
71 touch scan-build.stamp
72
73$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
74 @true
75
76#### templates ####
77
78tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
79 @echo 'gtk-doc: Rebuilding template files'
80 @-chmod -R u+w $(srcdir)
81 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
82 touch tmpl-build.stamp
83
84tmpl.stamp: tmpl-build.stamp
85 @true
86
87tmpl/*.sgml:
88 @true
89
90
91#### xml ####
92
93sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
94 @echo 'gtk-doc: Building XML'
95 @-chmod -R u+w $(srcdir)
96 cd $(srcdir) && \
97 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
98 touch sgml-build.stamp
99
100sgml.stamp: sgml-build.stamp
101 @true
102
103#### html ####
104
105html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
106 @echo 'gtk-doc: Building HTML'
107 @-chmod -R u+w $(srcdir)
108 rm -rf $(srcdir)/html
109 mkdir $(srcdir)/html
110 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
111 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
112 @echo 'gtk-doc: Fixing cross-references'
113 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
114 touch html-build.stamp
115
116##############
117
118clean-local:
119 rm -f *~ *.bak
120 rm -rf .libs
121
122distclean-local:
123 cd $(srcdir) && \
124 rm -rf xml $(REPORT_FILES) \
125 $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
126
127maintainer-clean-local: clean
128 cd $(srcdir) && rm -rf xml html
129
130install-data-local:
131 -installfiles=`echo $(srcdir)/html/*`; \
132 if test "$$installfiles" = '$(srcdir)/html/*'; \
133 then echo '-- Nothing to install' ; \
134 else \
135 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
136 for i in $$installfiles; do \
137 echo '-- Installing '$$i ; \
138 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
139 done; \
140 echo '-- Installing $(srcdir)/html/index.sgml' ; \
141 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
142 which gtkdoc-rebase >/dev/null && \
143 gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
144 fi
145
146
147uninstall-local:
148 rm -f $(DESTDIR)$(TARGET_DIR)/*
149
150#
151# Require gtk-doc when making dist
152#
153if ENABLE_GTK_DOC
154dist-check-gtkdoc:
155else
156dist-check-gtkdoc:
157 @echo "*** gtk-doc must be installed and enabled in order to make dist"
158 @false
159endif
160
161dist-hook: dist-check-gtkdoc dist-hook-local
162 mkdir $(distdir)/tmpl
163 mkdir $(distdir)/xml
164 mkdir $(distdir)/html
165 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
166 -cp $(srcdir)/xml/*.xml $(distdir)/xml
167 cp $(srcdir)/html/* $(distdir)/html
168 -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
169 -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
170 cd $(distdir) && rm -f $(DISTCLEANFILES)
171 -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
172
173.PHONY : dist-hook-local docs
diff --git a/meta/packages/webkit/webkit-gtk_svn.bb b/meta/packages/webkit/webkit-gtk_svn.bb
deleted file mode 100644
index fe31b9c24c..0000000000
--- a/meta/packages/webkit/webkit-gtk_svn.bb
+++ /dev/null
@@ -1,71 +0,0 @@
1DESCRIPTION = "WebKitGTK+ is the port of the portable web rendering engine WebKitK to the GTK+ platform."
2HOMEPAGE = "http://www.webkitgtk.org/"
3BUGTRACKER = "http://bugs.webkit.org/"
4
5LICENSE = "BSD & LGPLv2+"
6LIC_FILES_CHKSUM = "file://WebCore/rendering/RenderApplet.h;endline=22;md5=fb9694013ad71b78f8913af7a5959680 \
7 file://WebKit/gtk/webkit/webkit.h;endline=21;md5=b4fbe9f4a944f1d071dba1d2c76b3351 \
8 file://JavaScriptCore/parser/Parser.h;endline=23;md5=2f3cff0ad0a9c486da5a376928973a90"
9
10DEPENDS = "enchant gnome-keyring libsoup-2.4 curl icu libxml2 cairo libxslt libxt libidn gnutls gtk+ gstreamer gst-plugins-base gnome-vfs flex-native gperf-native perl-native sqlite3"
11DEPENDS_darwin8 = "curl icu libxml2 cairo libxslt libidn gnutls gtk+ gstreamer flex-native gperf-native perl-native sqlite3"
12
13SRCREV_FORMAT = "webcore-rwebkit"
14
15PV = "1.3.2+svnr${SRCREV}"
16PR = "r0"
17
18SRC_URI = "\
19 svn://svn.webkit.org/repository/webkit/trunk/;module=JavaScriptCore;proto=http \
20 svn://svn.webkit.org/repository/webkit/trunk/;module=JavaScriptGlue;proto=http \
21 svn://svn.webkit.org/repository/webkit/trunk/;module=WebCore;proto=http;name=webcore \
22 svn://svn.webkit.org/repository/webkit/trunk/;module=WebKit;proto=http;name=webkit \
23 svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitLibraries;proto=http \
24 svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitTools;proto=http \
25 svn://svn.webkit.org/repository/webkit/trunk/;module=autotools;proto=http \
26 file://Makefile \
27 file://Makefile.shared \
28 file://autogen.sh \
29 file://configure.ac \
30 file://GNUmakefile.am \
31 file://gtk-doc.make \
32 "
33
34S = "${WORKDIR}/"
35
36inherit autotools lib_package pkgconfig
37
38EXTRA_OECONF = "\
39 --enable-debug=no \
40 --enable-svg \
41 --enable-icon-database=yes \
42 --disable-fast-malloc \
43 "
44
45EXTRA_AUTORECONF = " -I autotools "
46
47do_compile_prepend() {
48 mkdir -p ${S}/WebKitBuilds/Debug/JavaScriptCore/pcre/tmp/
49 mkdir -p ${S}/Programs/
50 cd ${S}/JavaScriptCore/pcre
51 if test -e dftables.c
52 then
53 ${BUILD_CC} dftables.c -o dftables -I. -I../wtf
54 elif test -e dftables.cpp
55 then
56 ${BUILD_CXX} dftables.cpp -o dftables -I. -I../wtf
57 fi
58 cp dftables ${S}/WebKitBuilds/Debug/JavaScriptCore/pcre/tmp/
59 cp dftables ${S}/Programs/
60 cd ${S}
61}
62
63PACKAGES =+ "${PN}-webinspector ${PN}launcher-dbg ${PN}launcher libjavascriptcore"
64FILES_${PN}launcher = "${bindir}/GtkLauncher"
65FILES_${PN}launcher-dbg = "${bindir}/.debug/GtkLauncher"
66FILES_libjavascriptcore = "${libdir}/libJavaScriptCore.so.*"
67FILES_${PN}-webinspector = "${datadir}/webkit-1.0/webinspector/"
68FILES_${PN} += "${datadir}/webkit-1.0/resources/error.html ${datadir}/webkit-1.0/images"
69
70
71
diff --git a/meta/packages/wv/wv-1.2.0/pkgconfig.patch b/meta/packages/wv/wv-1.2.0/pkgconfig.patch
deleted file mode 100644
index 136d89341f..0000000000
--- a/meta/packages/wv/wv-1.2.0/pkgconfig.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: wv-1.2.0/wv-1.0.pc.in
2===================================================================
3--- wv-1.2.0.orig/wv-1.0.pc.in 2008-03-19 22:25:18.000000000 +0000
4+++ wv-1.2.0/wv-1.0.pc.in 2008-03-19 22:26:32.000000000 +0000
5@@ -6,5 +6,6 @@
6 Name: wvWare
7 Description: Word Document Filter library and utilities
8 Version: @VERSION@
9-Libs: -L${libdir} -lwv @WMF_LIBS@ @XML_LIBS@ @GLIB_LIBS@ @GSF_LIBS@ @PNG_LIBS@ @ZLIB_LIBS@ @LIBS@ -lm
10-Cflags: -I${includedir}/wv @GSF_CFLAGS@
11+Requires: libgsf-1
12+Libs: -L${libdir} -lwv @WMF_LIBS@ @XML_LIBS@ @PNG_LIBS@ @ZLIB_LIBS@ @LIBS@ -lm
13+Cflags: -I${includedir}/wv
diff --git a/meta/packages/wv/wv_1.2.0.bb b/meta/packages/wv/wv_1.2.0.bb
deleted file mode 100644
index c4c115b90e..0000000000
--- a/meta/packages/wv/wv_1.2.0.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1DESCRIPTION = "Programs for accessing Microsoft Word documents"
2HOMEPAGE = "http://wvware.sourceforge.net/"
3LICENSE = "GPLv2"
4DEPENDS = "libgsf glib-2.0"
5PR = "r3"
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/wvware/wv-${PV}.tar.gz \
8 file://pkgconfig.patch;patch=1"
9
10inherit autotools pkgconfig
11
12S = "${WORKDIR}/${PN}-${PV}"
13
14EXTRA_OECONF = ""
diff --git a/meta/packages/x11vnc/x11vnc_0.9.3.bb b/meta/packages/x11vnc/x11vnc_0.9.3.bb
deleted file mode 100644
index 5269ff3091..0000000000
--- a/meta/packages/x11vnc/x11vnc_0.9.3.bb
+++ /dev/null
@@ -1,11 +0,0 @@
1DESCRIPTION = "Export your X session on-the-fly via VNC"
2SECTION = "x11/utils"
3HOMEPAGE = "http://www.karlrunge.com/x11vnc/"
4AUTHOR = "Karl Runge"
5LICENSE = "GPL"
6DEPENDS = "openssl virtual/libx11 libxext avahi jpeg zlib"
7
8SRC_URI = "${SOURCEFORGE_MIRROR}/libvncserver/x11vnc-${PV}.tar.gz"
9
10inherit autotools
11
diff --git a/meta/packages/xournal/files/ldflags.patch b/meta/packages/xournal/files/ldflags.patch
deleted file mode 100644
index 7f6585befb..0000000000
--- a/meta/packages/xournal/files/ldflags.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1---
2 src/Makefile.am | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5Index: xournal-0.2/src/Makefile.am
6===================================================================
7--- xournal-0.2.orig/src/Makefile.am 2007-05-09 15:06:26.000000000 +0100
8+++ xournal-0.2/src/Makefile.am 2007-05-09 15:06:35.000000000 +0100
9@@ -21,5 +21,5 @@ xournal_SOURCES = \
10 xo-interface.c xo-interface.h \
11 xo-callbacks.c xo-callbacks.h
12
13-xournal_LDADD = @PACKAGE_LIBS@
14+xournal_LDADD = @PACKAGE_LIBS@ -lz
15
diff --git a/meta/packages/xournal/files/no-printing.diff b/meta/packages/xournal/files/no-printing.diff
deleted file mode 100644
index 7a4724e696..0000000000
--- a/meta/packages/xournal/files/no-printing.diff
+++ /dev/null
@@ -1,178 +0,0 @@
1diff -ru xournal-0.2/configure.in xournal-0.2.noprint/configure.in
2--- xournal-0.2/configure.in 2006-01-29 22:25:10.000000000 +0000
3+++ xournal-0.2.noprint/configure.in 2006-03-17 13:08:01.000000000 +0000
4@@ -10,11 +10,16 @@
5 AM_PROG_CC_STDC
6 AC_HEADER_STDC
7
8-pkg_modules="gtk+-2.0 >= 2.4.0 libgnomecanvas-2.0 >= 2.4.0 libgnomeprintui-2.2 >= 2.0.0"
9+pkg_modules="gtk+-2.0 >= 2.4.0 libgnomecanvas-2.0 >= 2.4.0"
10 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
11 AC_SUBST(PACKAGE_CFLAGS)
12 AC_SUBST(PACKAGE_LIBS)
13
14+#PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprintui-2.2 >= 2.0.0
15+#AC_SUBST(GNOMEPRINT_CFLAGS)
16+#AC_SUBST(GNOMEPRINT_LIBS)
17+AM_CONDITIONAL(ENABLE_PRINTING, false)
18+
19 AC_OUTPUT([
20 Makefile
21 src/Makefile
22diff -ru xournal-0.2/src/main.c xournal-0.2.noprint/src/main.c
23--- xournal-0.2/src/main.c 2006-01-29 22:22:52.000000000 +0000
24+++ xournal-0.2.noprint/src/main.c 2006-03-17 13:14:50.000000000 +0000
25@@ -28,7 +28,9 @@
26
27 void hide_unimplemented(void)
28 {
29+#if ENABLE_PRINTING
30 gtk_widget_hide(GET_COMPONENT("filePrintOptions"));
31+#endif
32 gtk_widget_hide(GET_COMPONENT("journalFlatten"));
33 gtk_widget_hide(GET_COMPONENT("papercolorOther"));
34 gtk_widget_hide(GET_COMPONENT("journalApplyAllPages"));
35diff -ru xournal-0.2/src/Makefile.am xournal-0.2.noprint/src/Makefile.am
36--- xournal-0.2/src/Makefile.am 2005-12-14 20:54:42.000000000 +0000
37+++ xournal-0.2.noprint/src/Makefile.am 2006-03-17 13:07:47.000000000 +0000
38@@ -7,12 +7,16 @@
39
40 bin_PROGRAMS = xournal
41
42+if ENABLE_PRINTING
43+PRINT_SOURCE = xo-print.c xo-print.h
44+endif
45+
46 xournal_SOURCES = \
47 main.c xournal.h \
48 xo-misc.c xo-misc.h \
49 xo-file.c xo-file.h \
50 xo-paint.c xo-paint.h \
51- xo-print.c xo-print.h \
52+ $(PRINT_SOURCE) \
53 xo-support.c xo-support.h \
54 xo-interface.c xo-interface.h \
55 xo-callbacks.c xo-callbacks.h
56diff -ru xournal-0.2/src/xo-callbacks.c xournal-0.2.noprint/src/xo-callbacks.c
57--- xournal-0.2/src/xo-callbacks.c 2006-01-29 19:39:22.000000000 +0000
58+++ xournal-0.2.noprint/src/xo-callbacks.c 2006-03-17 13:12:01.000000000 +0000
59@@ -7,7 +7,9 @@
60 #include <gtk/gtk.h>
61 #include <libgnomecanvas/libgnomecanvas.h>
62 #include <time.h>
63+#if ENABLE_PRINTING
64 #include <libgnomeprintui/gnome-print-dialog.h>
65+#endif
66 #include <glib/gstdio.h>
67
68 #include "xournal.h"
69@@ -17,7 +19,9 @@
70 #include "xo-misc.h"
71 #include "xo-file.h"
72 #include "xo-paint.h"
73+#if ENABLE_PRINTING
74 #include "xo-print.h"
75+#endif
76
77 void
78 on_fileNew_activate (GtkMenuItem *menuitem,
79@@ -261,7 +265,7 @@
80
81 }
82
83-
84+#if ENABLE_PRINTING
85 void
86 on_filePrint_activate (GtkMenuItem *menuitem,
87 gpointer user_data)
88@@ -407,7 +411,7 @@
89
90 g_free(filename);
91 }
92-
93+#endif
94
95 void
96 on_fileQuit_activate (GtkMenuItem *menuitem,
97diff -ru xournal-0.2/src/xo-callbacks.h xournal-0.2.noprint/src/xo-callbacks.h
98--- xournal-0.2/src/xo-callbacks.h 2006-01-26 20:47:00.000000000 +0000
99+++ xournal-0.2.noprint/src/xo-callbacks.h 2006-03-17 13:08:45.000000000 +0000
100@@ -24,6 +24,7 @@
101 on_filePrintOptions_activate (GtkMenuItem *menuitem,
102 gpointer user_data);
103
104+#if ENABLE_PRINTING
105 void
106 on_filePrint_activate (GtkMenuItem *menuitem,
107 gpointer user_data);
108@@ -32,6 +33,8 @@
109 on_filePrintPDF_activate (GtkMenuItem *menuitem,
110 gpointer user_data);
111
112+#endif
113+
114 void
115 on_fileQuit_activate (GtkMenuItem *menuitem,
116 gpointer user_data);
117diff -ru xournal-0.2/src/xo-interface.c xournal-0.2.noprint/src/xo-interface.c
118--- xournal-0.2/src/xo-interface.c 2006-01-29 18:58:25.000000000 +0000
119+++ xournal-0.2.noprint/src/xo-interface.c 2006-03-17 13:11:31.000000000 +0000
120@@ -41,10 +41,12 @@
121 GtkWidget *fileSave;
122 GtkWidget *fileSaveAs;
123 GtkWidget *separator1;
124+#if ENABLE_PRINTING
125 GtkWidget *filePrintOptions;
126 GtkWidget *image501;
127 GtkWidget *filePrint;
128 GtkWidget *filePrintPDF;
129+#endif
130 GtkWidget *separator2;
131 GtkWidget *fileQuit;
132 GtkWidget *menuEdit;
133@@ -327,6 +329,7 @@
134 gtk_container_add (GTK_CONTAINER (menuFile_menu), separator1);
135 gtk_widget_set_sensitive (separator1, FALSE);
136
137+#if ENABLE_PRINTING
138 filePrintOptions = gtk_image_menu_item_new_with_mnemonic ("Print Options");
139 gtk_widget_show (filePrintOptions);
140 gtk_container_add (GTK_CONTAINER (menuFile_menu), filePrintOptions);
141@@ -347,6 +350,7 @@
142 gtk_widget_show (separator2);
143 gtk_container_add (GTK_CONTAINER (menuFile_menu), separator2);
144 gtk_widget_set_sensitive (separator2, FALSE);
145+#endif
146
147 fileQuit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
148 gtk_widget_show (fileQuit);
149@@ -1522,6 +1526,7 @@
150 g_signal_connect ((gpointer) fileSaveAs, "activate",
151 G_CALLBACK (on_fileSaveAs_activate),
152 NULL);
153+#if ENABLE_PRINTING
154 g_signal_connect ((gpointer) filePrintOptions, "activate",
155 G_CALLBACK (on_filePrintOptions_activate),
156 NULL);
157@@ -1531,6 +1536,7 @@
158 g_signal_connect ((gpointer) filePrintPDF, "activate",
159 G_CALLBACK (on_filePrintPDF_activate),
160 NULL);
161+#endif
162 g_signal_connect ((gpointer) fileQuit, "activate",
163 G_CALLBACK (on_fileQuit_activate),
164 NULL);
165@@ -1941,11 +1947,13 @@
166 GLADE_HOOKUP_OBJECT (winMain, fileSave, "fileSave");
167 GLADE_HOOKUP_OBJECT (winMain, fileSaveAs, "fileSaveAs");
168 GLADE_HOOKUP_OBJECT (winMain, separator1, "separator1");
169+#if ENABLE_PRINTING
170 GLADE_HOOKUP_OBJECT (winMain, filePrintOptions, "filePrintOptions");
171 GLADE_HOOKUP_OBJECT (winMain, image501, "image501");
172 GLADE_HOOKUP_OBJECT (winMain, filePrint, "filePrint");
173 GLADE_HOOKUP_OBJECT (winMain, filePrintPDF, "filePrintPDF");
174 GLADE_HOOKUP_OBJECT (winMain, separator2, "separator2");
175+#endif
176 GLADE_HOOKUP_OBJECT (winMain, fileQuit, "fileQuit");
177 GLADE_HOOKUP_OBJECT (winMain, menuEdit, "menuEdit");
178 GLADE_HOOKUP_OBJECT (winMain, menuEdit_menu, "menuEdit_menu");
diff --git a/meta/packages/xournal/xournal_0.2.bb b/meta/packages/xournal/xournal_0.2.bb
deleted file mode 100644
index 1ca6e1ed7c..0000000000
--- a/meta/packages/xournal/xournal_0.2.bb
+++ /dev/null
@@ -1,12 +0,0 @@
1HOMEPAGE = "http://www-math.mit.edu/~auroux/software/xournal/"
2DESCRIPTION = "Xournal is an application for notetaking, sketching, keeping a journal using a stylus."
3DEPENDS = "gtk+ libgnomecanvas zlib"
4SECTION = "x11"
5LICENSE = "GPL"
6PR = "r2"
7
8SRC_URI = "http://math.mit.edu/~auroux/software/xournal/xournal-0.2.tar.gz \
9 file://ldflags.patch;patch=1 \
10 file://no-printing.diff;patch=1"
11
12inherit autotools pkgconfig
diff --git a/meta/packages/xrestop/xrestop_0.4.bb b/meta/packages/xrestop/xrestop_0.4.bb
deleted file mode 100644
index 1fd24503a7..0000000000
--- a/meta/packages/xrestop/xrestop_0.4.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "top-like statistics of X11 server resource usage by clients"
2HOMEPAGE = "http://www.freedesktop.org/wiki/Software/xrestop"
3BUGTRACKER = "https://bugs.freedesktop.org/"
4
5LICENSE = "GPLv2 + GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
7 file://xrestop.c;endline=18;md5=730876c30f0d8a928676bcd1242a3b35"
8
9SECTION = "x11/utils"
10PR = "r2"
11
12DEPENDS = "libxres libxext virtual/libx11"
13
14SRC_URI = "http://projects.o-hand.com/sources/xrestop/xrestop-${PV}.tar.gz"
15
16inherit autotools
diff --git a/meta/packages/xvideo-tests/xvideo-tests_svn.bb b/meta/packages/xvideo-tests/xvideo-tests_svn.bb
deleted file mode 100644
index 0aa861f688..0000000000
--- a/meta/packages/xvideo-tests/xvideo-tests_svn.bb
+++ /dev/null
@@ -1,13 +0,0 @@
1DESCRIPTION = "Simple XVideo test application"
2LICENSE = "GPLv2+"
3LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
4 file://src/test-xvideo.c;beginline=1;endline=20;md5=6ae3b4c3c2ff9e51dbbc35bb237afa00"
5DEPENDS = "libxv"
6PV = "0.0+svnr${SRCREV}"
7PR = "r0"
8
9SRC_URI="svn://svn.o-hand.com/repos/misc/trunk;module=test-xvideo;proto=http"
10
11S = "${WORKDIR}/test-xvideo"
12
13inherit autotools
diff --git a/meta/packages/yaffs2/files/mkyaffs2image.patch b/meta/packages/yaffs2/files/mkyaffs2image.patch
deleted file mode 100644
index 521f1ba9a0..0000000000
--- a/meta/packages/yaffs2/files/mkyaffs2image.patch
+++ /dev/null
@@ -1,345 +0,0 @@
1 *
2 * mkyaffs2image hacks by NCB
3 *
4 * Changes by Sergey Kubushin flagged KSI
5 *
6 */
7
8/* KSI:
9 * All this nightmare should be rewritten from ground up. Why save return
10 * values if nobody checks them? The read/write function returns only one
11 * error, -1. Positive return value does NOT mean read/write operation has
12 * been completed successfully. If somebody opens files, he MUST close them
13 * when they are not longer needed. Only those brave enough can write 64
14 * bytes from a yaffs_PackedTags2 structure. The list is too long, there is
15 * enough bugs here to write a couple of thick books on how NOT to write
16 * programs...
17 *
18 * And BTW, what was one supposed to do with that file that this horror
19 * occasionally managed to generate?
20 */
21diff -urN yaffs2.orig/utils/mkyaffs2image.c yaffs2/utils/mkyaffs2image.c
22--- yaffs2.orig/utils/mkyaffs2image.c 2005-12-12 16:34:58.000000000 -0800
23+++ yaffs2/utils/mkyaffs2image.c 2006-02-10 16:56:13.000000000 -0800
24@@ -31,10 +47,10 @@
25 #include <dirent.h>
26 #include <string.h>
27 #include <unistd.h>
28+#include <mtd/mtd-user.h>
29 #include "yaffs_ecc.h"
30 #include "yaffs_guts.h"
31
32-#include "yaffs_tagsvalidity.h"
33 #include "yaffs_packedtags2.h"
34
35 unsigned yaffs_traceMask=0;
36@@ -43,9 +59,45 @@
37
38 #define chunkSize 2048
39 #define spareSize 64
40+#define PT2_BYTES 25
41
42 const char * mkyaffsimage_c_version = "$Id: mkyaffs2image.c,v 1.4 2007-02-14 01:09:06 wookey Exp $";
43
44+static int layout_no;
45+
46+static struct nand_oobinfo oob_layout[] = {
47+ /* KSI:
48+ * Dummy "raw" layout - no ECC, all the bytes are free. Does NOT
49+ * really work, only used for compatibility with CVS YAFFS2 that
50+ * never ever worked with any stock MTD.
51+ */
52+ {
53+ .useecc = MTD_NANDECC_AUTOPLACE,
54+ .eccbytes = 0,
55+ .eccpos = {},
56+ .oobfree = { {0, 64} }
57+ },
58+ /* KSI:
59+ * Regular MTD AUTOPLACED ECC for large page NAND devices, the
60+ * only one existing in stock MTD so far. It corresponds to layout# 1
61+ * in command line arguments. Any other layouts could be added to
62+ * the list when they made their way in kernel's MTD. The structure
63+ * is simply copied from kernel's drivers/mtd/nand/nand_base.c as-is.
64+ */
65+ {
66+ .useecc = MTD_NANDECC_AUTOPLACE,
67+ .eccbytes = 24,
68+ .eccpos = {
69+ 40, 41, 42, 43, 44, 45, 46, 47,
70+ 48, 49, 50, 51, 52, 53, 54, 55,
71+ 56, 57, 58, 59, 60, 61, 62, 63},
72+ .oobfree = { {2, 38} }
73+ },
74+ /* End-of-list marker */
75+ {
76+ .useecc = -1,
77+ }
78+};
79
80 typedef struct
81 {
82@@ -59,7 +111,7 @@
83 static int n_obj = 0;
84 static int obj_id = YAFFS_NOBJECT_BUCKETS + 1;
85
86-static int nObjects, nDirectories, nPages;
87+static int nObjects = 0, nDirectories = 0, nPages = 0;
88
89 static int outFile;
90
91@@ -123,6 +175,11 @@
92 return -1;
93 }
94
95+/* KSI:
96+ * No big endian for now. This is left for a later time. The existing code
97+ * is FUBAR.
98+ */
99+#if 0
100 /* This little function converts a little endian tag to a big endian tag.
101 * NOTE: The tag is not usable after this other than calculating the CRC
102 * with.
103@@ -155,11 +212,56 @@
104 tags->asBytes[7] = temp.asBytes[7];
105 #endif
106 }
107+#endif
108+
109+void nandmtd2_pt2buf(unsigned char *buf, yaffs_PackedTags2 *pt)
110+{
111+ int i, j = 0, k, n;
112+ unsigned char pt2_byte_buf[PT2_BYTES];
113+
114+ *((unsigned int *) &pt2_byte_buf[0]) = pt->t.sequenceNumber;
115+ *((unsigned int *) &pt2_byte_buf[4]) = pt->t.objectId;
116+ *((unsigned int *) &pt2_byte_buf[8]) = pt->t.chunkId;
117+ *((unsigned int *) &pt2_byte_buf[12]) = pt->t.byteCount;
118+ pt2_byte_buf[16] = pt->ecc.colParity;
119+ pt2_byte_buf[17] = pt->ecc.lineParity & 0xff;
120+ pt2_byte_buf[18] = (pt->ecc.lineParity >> 8) & 0xff;
121+ pt2_byte_buf[19] = (pt->ecc.lineParity >> 16) & 0xff;
122+ pt2_byte_buf[20] = (pt->ecc.lineParity >> 24) & 0xff;
123+ pt2_byte_buf[21] = pt->ecc.lineParityPrime & 0xff;
124+ pt2_byte_buf[22] = (pt->ecc.lineParityPrime >> 8) & 0xff;
125+ pt2_byte_buf[23] = (pt->ecc.lineParityPrime >> 16) & 0xff;
126+ pt2_byte_buf[24] = (pt->ecc.lineParityPrime >> 24) & 0xff;
127+
128+ k = oob_layout[layout_no].oobfree[j][0];
129+ n = oob_layout[layout_no].oobfree[j][1];
130+
131+ if (n == 0) {
132+ fprintf(stderr, "No OOB space for tags");
133+ exit(-1);
134+ }
135+
136+ for (i = 0; i < PT2_BYTES; i++) {
137+ if (n == 0) {
138+ j++;
139+ k = oob_layout[layout_no].oobfree[j][0];
140+ n = oob_layout[layout_no].oobfree[j][1];
141+ if (n == 0) {
142+ fprintf(stderr, "No OOB space for tags");
143+ exit(-1);
144+ }
145+ }
146+ buf[k++] = pt2_byte_buf[i];
147+ n--;
148+ }
149+}
150
151 static int write_chunk(__u8 *data, __u32 objId, __u32 chunkId, __u32 nBytes)
152 {
153 yaffs_ExtendedTags t;
154 yaffs_PackedTags2 pt;
155+ unsigned char spare_buf[spareSize];
156+
157
158 error = write(outFile,data,chunkSize);
159 if(error < 0) return error;
160@@ -177,18 +279,27 @@
161 // added NCB **CHECK**
162 t.chunkUsed = 1;
163
164+/* KSI: Broken anyway -- e.g. &t is pointer to a wrong type... */
165+#if 0
166 if (convert_endian)
167 {
168 little_to_big_endian(&t);
169 }
170+#endif
171
172 nPages++;
173
174 yaffs_PackTags2(&pt,&t);
175-
176-// return write(outFile,&pt,sizeof(yaffs_PackedTags2));
177- return write(outFile,&pt,spareSize);
178-
179+
180+ memset(spare_buf, 0xff, sizeof(spare_buf));
181+
182+ if (layout_no == 0) {
183+ memcpy(spare_buf, &pt, sizeof(yaffs_PackedTags2));
184+ } else {
185+ nandmtd2_pt2buf(spare_buf, &pt);
186+ }
187+
188+ return write(outFile,spare_buf,spareSize);
189 }
190
191 #define SWAP32(x) ((((x) & 0x000000FF) << 24) | \
192@@ -199,6 +310,8 @@
193 #define SWAP16(x) ((((x) & 0x00FF) << 8) | \
194 (((x) & 0xFF00) >> 8))
195
196+/* KSI: Removed for now. TBD later when the proper util (from scratch) is written */
197+#if 0
198 // This one is easier, since the types are more standard. No funky shifts here.
199 static void object_header_little_to_big_endian(yaffs_ObjectHeader* oh)
200 {
201@@ -256,6 +369,7 @@
202 oh->roomToGrow[11] = SWAP32(oh->roomToGrow[11]);
203 #endif
204 }
205+#endif
206
207 static int write_object_header(int objId, yaffs_ObjectType t, struct stat *s, int parent, const char *name, int equivalentObj, const char * alias)
208 {
209@@ -300,10 +414,13 @@
210 strncpy(oh->alias,alias,YAFFS_MAX_ALIAS_LENGTH);
211 }
212
213+/* KSI: FUBAR. Left for a leter time. */
214+#if 0
215 if (convert_endian)
216 {
217 object_header_little_to_big_endian(oh);
218 }
219+#endif
220
221 return write_chunk(bytes,objId,0,0xffff);
222
223@@ -319,7 +436,7 @@
224 nDirectories++;
225
226 dir = opendir(path);
227-
228+
229 if(dir)
230 {
231 while((entry = readdir(dir)) != NULL)
232@@ -403,12 +520,12 @@
233 error = nBytes;
234
235 printf("%d data chunks written\n",chunk);
236+ close(h);
237 }
238 else
239 {
240 perror("Error opening file");
241 }
242- close(h);
243
244 }
245
246@@ -448,58 +565,82 @@
247 }
248 }
249 }
250+ /* KSI:
251+ * Who is supposed to close those open directories in this
252+ * recursive function, lord Byron? Stock "ulimit -n" is 1024
253+ * and e.g. stock Fedora /etc directory has more that 1024
254+ * directories...
255+ */
256+ closedir(dir);
257 }
258
259 return 0;
260
261 }
262
263+void usage(void)
264+{
265+ printf("usage: mkyaffs2image layout# dir image_file [convert]\n");
266+ printf(" layout# NAND OOB layout # (0 - raw, 1 - nand_oob_64)\n");
267+ printf(" dir the directory tree to be converted\n");
268+ printf(" image_file the output file to hold the image\n");
269+ printf(" 'convert' make a big-endian img on a little-endian machine. BROKEN !\n");
270+ exit(1);
271+}
272
273 int main(int argc, char *argv[])
274 {
275 struct stat stats;
276+ int i;
277
278 printf("mkyaffs2image: image building tool for YAFFS2 built "__DATE__"\n");
279
280- if(argc < 3)
281+ if ((argc < 4) || (sscanf(argv[1], "%u", &layout_no) != 1))
282 {
283- printf("usage: mkyaffs2image dir image_file [convert]\n");
284- printf(" dir the directory tree to be converted\n");
285- printf(" image_file the output file to hold the image\n");
286- printf(" 'convert' produce a big-endian image from a little-endian machine\n");
287- exit(1);
288+ usage();
289 }
290
291- if ((argc == 4) && (!strncmp(argv[3], "convert", strlen("convert"))))
292- {
293- convert_endian = 1;
294- }
295+ i = 0;
296+
297+ while (oob_layout[i].useecc != -1)
298+ i++;
299+
300+ if (layout_no >= i)
301+ usage();
302+
303+ if ((argc == 5) && (!strncmp(argv[4], "convert", strlen("convert"))))
304+ {
305+ /* KSI: Broken as of now. TBD. Fail. */
306+ usage();
307+ convert_endian = 1;
308+ }
309
310- if(stat(argv[1],&stats) < 0)
311+ if(stat(argv[2],&stats) < 0)
312 {
313- printf("Could not stat %s\n",argv[1]);
314+ printf("Could not stat %s\n",argv[2]);
315 exit(1);
316 }
317
318 if(!S_ISDIR(stats.st_mode))
319 {
320- printf(" %s is not a directory\n",argv[1]);
321+ printf(" %s is not a directory\n",argv[2]);
322 exit(1);
323 }
324
325- outFile = open(argv[2],O_CREAT | O_TRUNC | O_WRONLY, S_IREAD | S_IWRITE);
326+ outFile = open(argv[3],O_CREAT | O_TRUNC | O_WRONLY, S_IREAD | S_IWRITE);
327
328
329 if(outFile < 0)
330 {
331- printf("Could not open output file %s\n",argv[2]);
332+ printf("Could not open output file %s\n",argv[3]);
333 exit(1);
334 }
335
336- printf("Processing directory %s into image file %s\n",argv[1],argv[2]);
337+ printf("Processing directory %s into image file %s\n",argv[2],argv[3]);
338 error = write_object_header(1, YAFFS_OBJECT_TYPE_DIRECTORY, &stats, 1,"", -1, NULL);
339+
340 if(error)
341- error = process_directory(YAFFS_OBJECTID_ROOT,argv[1]);
342+ error = process_directory(YAFFS_OBJECTID_ROOT,argv[2]);
343
344 close(outFile);
345
diff --git a/meta/packages/yaffs2/files/yaffs2-unioob.patch b/meta/packages/yaffs2/files/yaffs2-unioob.patch
deleted file mode 100644
index c894528ca1..0000000000
--- a/meta/packages/yaffs2/files/yaffs2-unioob.patch
+++ /dev/null
@@ -1,216 +0,0 @@
1diff -urN yaffs2.orig/yaffs_mtdif2.c yaffs2/yaffs_mtdif2.c
2--- yaffs2.orig/yaffs_mtdif2.c 2005-12-07 14:00:38.000000000 -0800
3+++ yaffs2/yaffs_mtdif2.c 2006-02-10 17:13:58.000000000 -0800
4@@ -29,6 +29,130 @@
5
6 #include "yaffs_packedtags2.h"
7
8+#define PT2_BYTES 25
9+
10+void nandmtd2_pt2buf(yaffs_Device *dev, yaffs_PackedTags2 *pt, int is_raw)
11+{
12+ struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
13+ int i, j = 0, k, n;
14+ __u8 pt2_byte_buf[PT2_BYTES];
15+
16+ /* Pack buffer with 0xff */
17+ for (i = 0; i < mtd->oobsize; i++)
18+ dev->spareBuffer[i] = 0xff;
19+
20+ if (!is_raw) {
21+ *((unsigned int *) &dev->spareBuffer[0]) = pt->t.sequenceNumber;
22+ *((unsigned int *) &dev->spareBuffer[4]) = pt->t.objectId;
23+ *((unsigned int *) &dev->spareBuffer[8]) = pt->t.chunkId;
24+ *((unsigned int *) &dev->spareBuffer[12]) = pt->t.byteCount;
25+ dev->spareBuffer[16] = pt->ecc.colParity;
26+ dev->spareBuffer[17] = pt->ecc.lineParity & 0xff;
27+ dev->spareBuffer[18] = (pt->ecc.lineParity >> 8) & 0xff;
28+ dev->spareBuffer[19] = (pt->ecc.lineParity >> 16) & 0xff;
29+ dev->spareBuffer[20] = (pt->ecc.lineParity >> 24) & 0xff;
30+ dev->spareBuffer[21] = pt->ecc.lineParityPrime & 0xff;
31+ dev->spareBuffer[22] = (pt->ecc.lineParityPrime >> 8) & 0xff;
32+ dev->spareBuffer[23] = (pt->ecc.lineParityPrime >> 16) & 0xff;
33+ dev->spareBuffer[24] = (pt->ecc.lineParityPrime >> 24) & 0xff;
34+ } else {
35+ *((unsigned int *) &pt2_byte_buf[0]) = pt->t.sequenceNumber;
36+ *((unsigned int *) &pt2_byte_buf[4]) = pt->t.objectId;
37+ *((unsigned int *) &pt2_byte_buf[8]) = pt->t.chunkId;
38+ *((unsigned int *) &pt2_byte_buf[12]) = pt->t.byteCount;
39+ pt2_byte_buf[16] = pt->ecc.colParity;
40+ pt2_byte_buf[17] = pt->ecc.lineParity & 0xff;
41+ pt2_byte_buf[18] = (pt->ecc.lineParity >> 8) & 0xff;
42+ pt2_byte_buf[19] = (pt->ecc.lineParity >> 16) & 0xff;
43+ pt2_byte_buf[20] = (pt->ecc.lineParity >> 24) & 0xff;
44+ pt2_byte_buf[21] = pt->ecc.lineParityPrime & 0xff;
45+ pt2_byte_buf[22] = (pt->ecc.lineParityPrime >> 8) & 0xff;
46+ pt2_byte_buf[23] = (pt->ecc.lineParityPrime >> 16) & 0xff;
47+ pt2_byte_buf[24] = (pt->ecc.lineParityPrime >> 24) & 0xff;
48+
49+ k = mtd->oobinfo.oobfree[j][0];
50+ n = mtd->oobinfo.oobfree[j][1];
51+
52+ if (n == 0) {
53+ T(YAFFS_TRACE_ERROR, (TSTR("No OOB space for tags" TENDSTR)));
54+ YBUG();
55+ }
56+
57+ for (i = 0; i < PT2_BYTES; i++) {
58+ if (n == 0) {
59+ j++;
60+ k = mtd->oobinfo.oobfree[j][0];
61+ n = mtd->oobinfo.oobfree[j][1];
62+ if (n == 0) {
63+ T(YAFFS_TRACE_ERROR, (TSTR("No OOB space for tags" TENDSTR)));
64+ YBUG();
65+ }
66+ }
67+ dev->spareBuffer[k++] = pt2_byte_buf[i];
68+ n--;
69+ }
70+ }
71+}
72+
73+void nandmtd2_buf2pt(yaffs_Device *dev, yaffs_PackedTags2 *pt, int is_raw)
74+{
75+ struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
76+ int i, j = 0, k, n;
77+ __u8 pt2_byte_buf[PT2_BYTES];
78+
79+
80+ if (!is_raw) {
81+ pt->t.sequenceNumber = *((unsigned int *) &dev->spareBuffer[0]);
82+ pt->t.objectId = *((unsigned int *) &dev->spareBuffer[4]);
83+ pt->t.chunkId = *((unsigned int *) &dev->spareBuffer[8]);
84+ pt->t.byteCount = *((unsigned int *) &dev->spareBuffer[12]);
85+ pt->ecc.colParity = dev->spareBuffer[16];
86+ pt->ecc.lineParity = (dev->spareBuffer[17] & 0x000000ff) |
87+ ((dev->spareBuffer[18] << 8) & 0x0000ff00) |
88+ ((dev->spareBuffer[19] << 16) & 0x00ff0000) |
89+ ((dev->spareBuffer[20] << 24) & 0xff000000);
90+ pt->ecc.lineParityPrime = (dev->spareBuffer[21] & 0x000000ff) |
91+ ((dev->spareBuffer[22] << 8) & 0x0000ff00) |
92+ ((dev->spareBuffer[23] << 16) & 0x00ff0000) |
93+ ((dev->spareBuffer[24] << 24) & 0xff000000);
94+ } else {
95+ k = mtd->oobinfo.oobfree[j][0];
96+ n = mtd->oobinfo.oobfree[j][1];
97+
98+ if (n == 0) {
99+ T(YAFFS_TRACE_ERROR, (TSTR("No space in OOB for tags" TENDSTR)));
100+ YBUG();
101+ }
102+
103+ for (i = 0; i < PT2_BYTES; i++) {
104+ if (n == 0) {
105+ j++;
106+ k = mtd->oobinfo.oobfree[j][0];
107+ n = mtd->oobinfo.oobfree[j][1];
108+ if (n == 0) {
109+ T(YAFFS_TRACE_ERROR, (TSTR("No space in OOB for tags" TENDSTR)));
110+ YBUG();
111+ }
112+ }
113+ pt2_byte_buf[i] = dev->spareBuffer[k++];
114+ n--;
115+ }
116+ pt->t.sequenceNumber = *((unsigned int *) &pt2_byte_buf[0]);
117+ pt->t.objectId = *((unsigned int *) &pt2_byte_buf[4]);
118+ pt->t.chunkId = *((unsigned int *) &pt2_byte_buf[8]);
119+ pt->t.byteCount = *((unsigned int *) &pt2_byte_buf[12]);
120+ pt->ecc.colParity = pt2_byte_buf[16];
121+ pt->ecc.lineParity = (pt2_byte_buf[17] & 0x000000ff) |
122+ ((pt2_byte_buf[18] << 8) & 0x0000ff00) |
123+ ((pt2_byte_buf[19] << 16) & 0x00ff0000) |
124+ ((pt2_byte_buf[20] << 24) & 0xff000000);
125+ pt->ecc.lineParityPrime = (pt2_byte_buf[21] & 0x000000ff) |
126+ ((pt2_byte_buf[22] << 8) & 0x0000ff00) |
127+ ((pt2_byte_buf[23] << 16) & 0x00ff0000) |
128+ ((pt2_byte_buf[24] << 24) & 0xff000000);
129+ }
130+}
131+
132 int nandmtd2_WriteChunkWithTagsToNAND(yaffs_Device * dev, int chunkInNAND,
133 const __u8 * data,
134 const yaffs_ExtendedTags * tags)
135@@ -51,24 +175,22 @@
136 }
137
138 if (data && tags) {
139- if (dev->useNANDECC)
140- retval =
141- mtd->write_ecc(mtd, addr, dev->nBytesPerChunk,
142- &dummy, data, (__u8 *) & pt, NULL);
143- else
144+ nandmtd2_pt2buf(dev, &pt, 0);
145 retval =
146 mtd->write_ecc(mtd, addr, dev->nBytesPerChunk,
147- &dummy, data, (__u8 *) & pt, NULL);
148+ &dummy, data, dev->spareBuffer,
149+ NULL);
150 } else {
151 if (data)
152 retval =
153 mtd->write(mtd, addr, dev->nBytesPerChunk, &dummy,
154 data);
155- if (tags)
156+ if (tags) {
157+ nandmtd2_pt2buf(dev, &pt, 1);
158 retval =
159 mtd->write_oob(mtd, addr, mtd->oobsize, &dummy,
160- (__u8 *) & pt);
161-
162+ dev->spareBuffer);
163+ }
164 }
165
166 if (retval == 0)
167@@ -94,30 +216,24 @@
168 TENDSTR), chunkInNAND, data, tags));
169
170 if (data && tags) {
171- if (dev->useNANDECC) {
172 retval =
173 mtd->read_ecc(mtd, addr, dev->nBytesPerChunk,
174 &dummy, data, dev->spareBuffer,
175 NULL);
176- } else {
177- retval =
178- mtd->read_ecc(mtd, addr, dev->nBytesPerChunk,
179- &dummy, data, dev->spareBuffer,
180- NULL);
181- }
182+ nandmtd2_buf2pt(dev, &pt, 0);
183 } else {
184 if (data)
185 retval =
186 mtd->read(mtd, addr, dev->nBytesPerChunk, &dummy,
187 data);
188- if (tags)
189+ if (tags) {
190 retval =
191 mtd->read_oob(mtd, addr, mtd->oobsize, &dummy,
192 dev->spareBuffer);
193+ nandmtd2_buf2pt(dev, &pt, 1);
194+ }
195 }
196
197- memcpy(&pt, dev->spareBuffer, sizeof(pt));
198-
199 if (tags)
200 yaffs_UnpackTags2(tags, &pt);
201
202@@ -178,10 +294,11 @@
203 *sequenceNumber = 0;
204 *state = YAFFS_BLOCK_STATE_EMPTY;
205 }
206+
207+ T(YAFFS_TRACE_MTD,
208+ (TSTR("block is OK seq %d state %d" TENDSTR), *sequenceNumber,
209+ *state));
210 }
211- T(YAFFS_TRACE_MTD,
212- (TSTR("block is bad seq %d state %d" TENDSTR), *sequenceNumber,
213- *state));
214
215 if (retval == 0)
216 return YAFFS_OK;
diff --git a/meta/packages/yaffs2/yaffs2-utils.inc b/meta/packages/yaffs2/yaffs2-utils.inc
deleted file mode 100644
index b25cc3b590..0000000000
--- a/meta/packages/yaffs2/yaffs2-utils.inc
+++ /dev/null
@@ -1,27 +0,0 @@
1DESCRIPTION = "Tools for managing 'yaffs2' file systems."
2SECTION = "base"
3HOMEPAGE = "http://www.yaffs.net"
4LICENSE = "GPLv2"
5PV = "0.0.0+cvs${SRCDATE}"
6PR = "r0"
7DEPENDS = "mtd-utils"
8
9SRC_URI = "cvs://anonymous@cvs.aleph1.co.uk/home/aleph1/cvs;module=yaffs2 \
10 file://mkyaffs2image.patch;patch=1"
11S = "${WORKDIR}/yaffs2"
12
13CFLAGS += "-I.. -DCONFIG_YAFFS_UTIL"
14CFLAGS_append_virtclass-native = " -I.. -DCONFIG_YAFFS_UTIL"
15
16do_compile() {
17 cd utils && oe_runmake
18}
19
20do_install() {
21 install -d ${D}${sbindir}/
22 for i in mkyaffsimage mkyaffs2image; do
23 install -m 0755 utils/$i ${D}${sbindir}/
24 done
25}
26
27BBCLASSEXTEND = "native"
diff --git a/meta/packages/yaffs2/yaffs2-utils_cvs.bb b/meta/packages/yaffs2/yaffs2-utils_cvs.bb
deleted file mode 100644
index 6171fe55bd..0000000000
--- a/meta/packages/yaffs2/yaffs2-utils_cvs.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require yaffs2-utils.inc
2PR = "r1"
3
diff --git a/meta/packages/zile/files/for_build.patch b/meta/packages/zile/files/for_build.patch
deleted file mode 100644
index 96380fa220..0000000000
--- a/meta/packages/zile/files/for_build.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1Index: zile-2.0beta6/acinclude.m4
2===================================================================
3--- zile-2.0beta6.orig/acinclude.m4 2004-12-20 19:13:07.000000000 -0500
4+++ zile-2.0beta6/acinclude.m4 2005-01-21 20:38:28.982166344 -0500
5@@ -35,3 +35,29 @@
6 t}
7 fi
8 AC_SUBST(EXEEXT_FOR_BUILD)])dnl
9+
10+dnl Get a default for CFLAGS_FOR_BUILD to put into Makefile.
11+AC_DEFUN([BFD_CFLAGS_FOR_BUILD],
12+[ac_test_CFLAGS=${CFLAGS+set}
13+# Put a plausible default for CFLAGS_FOR_BUILD in Makefile.
14+if test -z "$CFLAGS_FOR_BUILD"; then
15+ if test "x$cross_compiling" = "xyes"; then
16+ CFLAGS_FOR_BUILD="-O2"
17+ else
18+ CFLAGS_FOR_BUILD='$(CFLAGS)'
19+ fi
20+fi
21+AC_SUBST(CFLAGS_FOR_BUILD)])dnl
22+
23+dnl Get a default for LDFLAGS_FOR_BUILD to put into Makefile.
24+AC_DEFUN([BFD_LDFLAGS_FOR_BUILD],
25+[ac_test_LDFLAGS=${LDFLAGS+set}
26+# Put a plausible default for LDFLAGS_FOR_BUILD in Makefile.
27+if test -z "$LDFLAGS_FOR_BUILD"; then
28+ if test "x$cross_compiling" = "xyes"; then
29+ LDFLAGS_FOR_BUILD=""
30+ else
31+ LDFLAGS_FOR_BUILD='$(LDFLAGS)'
32+ fi
33+fi
34+AC_SUBST(LDFLAGS_FOR_BUILD)])dnl
35Index: zile-2.0beta6/configure.ac
36===================================================================
37--- zile-2.0beta6.orig/configure.ac 2005-01-12 07:56:19.000000000 -0500
38+++ zile-2.0beta6/configure.ac 2005-01-21 20:26:58.178184512 -0500
39@@ -19,6 +19,8 @@
40
41 AC_PROG_CC
42 BFD_CC_FOR_BUILD
43+BFD_CFLAGS_FOR_BUILD
44+BFD_LDFLAGS_FOR_BUILD
45 AC_C_INLINE
46 AC_PROG_INSTALL
47 AC_PROG_RANLIB
48Index: zile-2.0beta6/doc/Makefile.am
49===================================================================
50--- zile-2.0beta6.orig/doc/Makefile.am 2005-01-03 06:11:32.000000000 -0500
51+++ zile-2.0beta6/doc/Makefile.am 2005-01-21 20:27:17.271281920 -0500
52@@ -27,10 +27,10 @@
53 AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/src
54
55 mkdoc$(EXEEXT_FOR_BUILD): mkdoc.o config.h
56- $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ mkdoc.o
57+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ mkdoc.o
58
59 mkdoc.o: mkdoc.c
60- $(CC_FOR_BUILD) -c -I$(top_srcdir)/doc -I$(top_srcdir) -I$(top_srcdir)/src $(CFLAGS) $(srcdir)/mkdoc.c
61+ $(CC_FOR_BUILD) -c -I$(top_srcdir)/doc -I$(top_srcdir) -I$(top_srcdir)/src $(CFLAGS_FOR_BUILD) $(srcdir)/mkdoc.c
62
63 AUTODOC: $(AUTODOCSRCS) mkdoc
64 ./mkdoc $(AUTODOCSRCS) >AUTODOC
diff --git a/meta/packages/zile/zile_1.7+2.0beta6.bb b/meta/packages/zile/zile_1.7+2.0beta6.bb
deleted file mode 100644
index 74d832eef3..0000000000
--- a/meta/packages/zile/zile_1.7+2.0beta6.bb
+++ /dev/null
@@ -1,19 +0,0 @@
1DESCRIPTION = "Zile is a very small emacs-like editor."
2HOMEPAGE = "http://zile.sourceforge.net/"
3LICENSE = "GPL"
4DEPENDS = "ncurses"
5PRIORITY = "optional"
6SECTION = "console/editors"
7PR = "r1"
8
9UV = "${@bb.data.getVar('PV', d, 1).split('+')[1]}"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/zile/zile-${UV}.tar.gz \
12 file://for_build.patch;patch=1"
13S = "${WORKDIR}/zile-${UV}"
14
15inherit autotools
16
17export CC_FOR_BUILD = "${BUILD_CC}"
18export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS} -DHAVE_VASPRINTF"
19export LDFLAGS_FOR_BUILD = "${BUILD_LDFLAGS}"
diff --git a/meta/packages/zip/zip.inc b/meta/packages/zip/zip.inc
deleted file mode 100644
index 9550447264..0000000000
--- a/meta/packages/zip/zip.inc
+++ /dev/null
@@ -1,24 +0,0 @@
1DESCRIPTION = "Archiver for .zip files"
2HOMEPAGE = "http://www.info-zip.org"
3SECTION = "console/utils"
4
5LICENSE = "Info-ZIP"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d"
7
8SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@bb.data.getVar('PV',d,1).replace('.', '')}.tgz"
9
10EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \
11 'CFLAGS=-I. -DUNIX ${CFLAGS}' 'INSTALL=install' \
12 'BINFLAGS=0755' 'INSTALL_D=install -d'"
13
14do_compile() {
15 oe_runmake -f unix/Makefile generic
16}
17
18do_install() {
19 oe_runmake -f unix/Makefile prefix=${D}${prefix} \
20 BINDIR=${D}${bindir} MANDIR=${D}${mandir}/man1 \
21 install
22}
23
24BBCLASSEXTEND = "native"
diff --git a/meta/packages/zip/zip_3.0.bb b/meta/packages/zip/zip_3.0.bb
deleted file mode 100644
index c5df637a38..0000000000
--- a/meta/packages/zip/zip_3.0.bb
+++ /dev/null
@@ -1,6 +0,0 @@
1require zip.inc
2
3PR="r0"
4
5# zip-2.32 still uses directory name of zip-2.30
6S = "${WORKDIR}/zip30"