From 71c5bdac2ec7fac58d013512f7ca0d60dffd5dfa Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Tue, 19 Mar 2013 18:51:14 -0400 Subject: [PATCH] depends: nuke old darwin depends --- tools/darwin/depends/.autom4te.cfg | 3 - tools/darwin/depends/Backrow/Makefile | 24 - tools/darwin/depends/COPYING | 674 ---- tools/darwin/depends/Makefile.buildtools | 11 - tools/darwin/depends/Makefile.in | 61 - tools/darwin/depends/Makefile.include.in | 7 - tools/darwin/depends/README | 20 - tools/darwin/depends/afpfs-ng/01-gcrypt.patch | 26 - .../darwin/depends/afpfs-ng/02-pointer.patch | 280 -- tools/darwin/depends/afpfs-ng/04-boxee1.patch | 25 - tools/darwin/depends/afpfs-ng/05-boxee2.patch | 89 - tools/darwin/depends/afpfs-ng/06-boxee3.patch | 141 - tools/darwin/depends/afpfs-ng/07-boxee4.patch | 27 - tools/darwin/depends/afpfs-ng/08-boxee5.patch | 11 - .../depends/afpfs-ng/10-fix-errno.patch | 23 - .../darwin/depends/afpfs-ng/11-fix-stat.patch | 11 - .../afpfs-ng/12-fix-even-more-pointers.patch | 83 - tools/darwin/depends/afpfs-ng/Makefile | 53 - .../afpfs-ng/fix_afpfs-ng_includes.patch | 3082 ----------------- tools/darwin/depends/autoconf/Makefile | 39 - tools/darwin/depends/automake/Makefile | 38 - tools/darwin/depends/boost/Makefile | 61 - .../depends/boost/add-arm-mem-barrier.patch | 73 - .../depends/boost/fix-deprecated-swp.patch | 58 - tools/darwin/depends/bootstrap | 18 - tools/darwin/depends/cmake/Makefile | 39 - tools/darwin/depends/config.site_ios.in | 134 - tools/darwin/depends/config.site_ios.mk.in | 50 - tools/darwin/depends/config.site_osx.in | 103 - tools/darwin/depends/config.site_osx.mk.in | 62 - tools/darwin/depends/configure.in | 129 - tools/darwin/depends/curl/Makefile | 42 - tools/darwin/depends/distribute/Makefile | 32 - tools/darwin/depends/distutilscross/Makefile | 32 - tools/darwin/depends/dpkg/Makefile | 44 - tools/darwin/depends/expat/Makefile | 37 - .../01-fontconfig-cross-compile-fix.patch | 80 - tools/darwin/depends/fontconfig/Makefile | 42 - tools/darwin/depends/freetype2/Makefile | 40 - tools/darwin/depends/fribidi/Makefile | 38 - .../darwin/depends/gas-preprocessor/Makefile | 13 - tools/darwin/depends/gas-preprocessor/README | 20 - .../gas-preprocessor/gas-preprocessor.pl | 497 --- .../01-gettext-tools-Makefile.in.patch | 11 - .../gettext/02-gettext-tools-stpncpy.patch | 12 - tools/darwin/depends/gettext/Makefile | 51 - tools/darwin/depends/help2man/Makefile | 39 - tools/darwin/depends/jpeg/Makefile | 37 - tools/darwin/depends/lib-gpgerror/Makefile | 41 - tools/darwin/depends/libGLEW/Makefile | 45 - tools/darwin/depends/libarchive/Makefile | 40 - tools/darwin/depends/libass/Makefile | 37 - tools/darwin/depends/libbluray/Makefile | 42 - tools/darwin/depends/libboblight/Makefile | 46 - tools/darwin/depends/libcdio/Makefile | 40 - tools/darwin/depends/libcdio/osx.patch | 19 - tools/darwin/depends/libcec/Makefile | 39 - tools/darwin/depends/libcrystalhd/Makefile | 15 - .../libcrystalhd/libcrystalhd/bc_dts_defs.h | 635 ---- .../libcrystalhd/libcrystalhd/bc_dts_types.h | 68 - .../libcrystalhd/libcrystalhd_if.h | 1515 -------- .../libcrystalhd/libcrystalhd_version.h | 80 - tools/darwin/depends/libffi/Makefile | 40 - tools/darwin/depends/libflac/Makefile | 43 - .../01-static-mpi_mpi-internal.patch | 53 - .../darwin/depends/libgcrypt/02-armasm.patch | 13 - tools/darwin/depends/libgcrypt/Makefile | 44 - tools/darwin/depends/libgpg-error/Makefile | 41 - .../depends/libjpeg-turbo-native/Makefile | 46 - tools/darwin/depends/libjpeg-turbo/Makefile | 41 - tools/darwin/depends/liblzo2-native/Makefile | 42 - tools/darwin/depends/liblzo2/Makefile | 39 - .../depends/libmad/01-libmad-pkgconfig.patch | 31 - .../depends/libmad/02-libmad-thumb-fix.patch | 17 - tools/darwin/depends/libmad/Makefile | 48 - tools/darwin/depends/libmicrohttpd/Makefile | 38 - tools/darwin/depends/libmodplug/Makefile | 39 - tools/darwin/depends/libmp3lame/Makefile | 41 - ...libmpeg2-add-asm-leading-underscores.patch | 48 - tools/darwin/depends/libmpeg2/02-neon.patch | 385 -- .../depends/libmpeg2/03-config-fix.patch | 208 -- tools/darwin/depends/libmpeg2/Makefile | 43 - tools/darwin/depends/libnfs/Makefile | 45 - tools/darwin/depends/libnfs/rpcinc/auth.h | 216 -- .../darwin/depends/libnfs/rpcinc/auth_unix.h | 106 - tools/darwin/depends/libnfs/rpcinc/clnt.h | 445 --- .../darwin/depends/libnfs/rpcinc/pmap_clnt.h | 124 - .../darwin/depends/libnfs/rpcinc/pmap_prot.h | 147 - tools/darwin/depends/libnfs/rpcinc/pmap_rmt.h | 95 - tools/darwin/depends/libnfs/rpcinc/rpc.h | 93 - tools/darwin/depends/libnfs/rpcinc/rpc_msg.h | 243 -- tools/darwin/depends/libnfs/rpcinc/svc.h | 360 -- tools/darwin/depends/libnfs/rpcinc/svc_auth.h | 73 - tools/darwin/depends/libnfs/rpcinc/types.h | 102 - tools/darwin/depends/libnfs/rpcinc/xdr.h | 430 --- tools/darwin/depends/libogg/Makefile | 39 - .../depends/libplist/0001-dontbuildswig.patch | 11 - tools/darwin/depends/libplist/Makefile | 45 - tools/darwin/depends/libpng-native/Makefile | 41 - tools/darwin/depends/libpng/Makefile | 37 - tools/darwin/depends/librtmp/Makefile | 46 - .../librtmp/librtmp-60-second-fix.patch | 1913 ---------- .../libsamplerate/01-libsamplerate-arm.patch | 13 - tools/darwin/depends/libsamplerate/Makefile | 39 - .../libsdl-native/01-SDL_SetWidthHeight.patch | 33 - .../darwin/depends/libsdl-native/02-mmx.patch | 12 - tools/darwin/depends/libsdl-native/Makefile | 45 - .../libsdl/01-SDL_SetWidthHeight.patch | 33 - tools/darwin/depends/libsdl/02-mmx.patch | 12 - tools/darwin/depends/libsdl/Makefile | 41 - .../depends/libsdl_image-native/Makefile | 42 - tools/darwin/depends/libsdl_image/Makefile | 38 - tools/darwin/depends/libsdl_mixer/Makefile | 40 - .../depends/libshairport/001_add_ao.patch | 270 -- .../libshairport/002_fix_install_header.patch | 12 - .../libshairport/003_fix_deadlock.patch | 10 - .../libshairport/004_fix_bad_access.patch | 22 - .../libshairport/005_fix_shutdown.patch | 10 - .../depends/libshairport/006_no_printf.patch | 843 ----- .../libshairport/007_fix_syslog_defines.patch | 24 - .../libshairport/008-add-missing-libs.patch | 21 - .../depends/libshairport/009_fix_ipv6.patch | 22 - .../libshairport/010_handle_metadata.patch | 154 - .../libshairport/011_fix_ipv4_fallback.patch | 10 - tools/darwin/depends/libshairport/Makefile | 51 - tools/darwin/depends/libssh/Makefile | 45 - .../darwin/depends/libssh/removelegacy.patch | 10 - tools/darwin/depends/libssh2/Makefile | 42 - tools/darwin/depends/libtiff-native/Makefile | 41 - tools/darwin/depends/libtool/Makefile | 39 - tools/darwin/depends/libusb/Makefile | 36 - tools/darwin/depends/libvorbis/Makefile | 42 - tools/darwin/depends/libyajl/Makefile | 41 - tools/darwin/depends/m4/Makefile | 38 - .../01-mysqlclient-cross-compile.patch | 170 - .../mysqlclient/02-mysqlclient-ios.patch | 27 - tools/darwin/depends/mysqlclient/Makefile | 52 - tools/darwin/depends/openssl/Makefile | 55 - tools/darwin/depends/pcre/Makefile | 38 - tools/darwin/depends/pkg-config/Makefile | 38 - tools/darwin/depends/python26/Makefile.ios | 63 - tools/darwin/depends/python26/Makefile.osx | 60 - .../depends/python26/Python-2.6-ctypes.patch | 45 - .../python26/Python-2.6.5-xcompile.patch | 301 -- .../python26/python-osx-environ-fix.patch | 25 - tools/darwin/depends/readline/Makefile | 38 - tools/darwin/depends/samba/Makefile | 53 - tools/darwin/depends/sed/Makefile | 38 - tools/darwin/depends/sqlite3/Makefile | 43 - tools/darwin/depends/swig/Makefile | 39 - tools/darwin/depends/taglib/Makefile | 43 - tools/darwin/depends/tar/Makefile | 45 - tools/darwin/depends/tiff/Makefile | 38 - tools/darwin/depends/tinyxml/Makefile | 39 - tools/darwin/depends/xbmc-pvr-addons/Makefile | 50 - tools/darwin/depends/xbmc/Makefile | 29 - tools/darwin/depends/yasm/Makefile | 44 - 157 files changed, 18599 deletions(-) delete mode 100644 tools/darwin/depends/.autom4te.cfg delete mode 100644 tools/darwin/depends/Backrow/Makefile delete mode 100644 tools/darwin/depends/COPYING delete mode 100644 tools/darwin/depends/Makefile.buildtools delete mode 100644 tools/darwin/depends/Makefile.in delete mode 100644 tools/darwin/depends/Makefile.include.in delete mode 100644 tools/darwin/depends/README delete mode 100644 tools/darwin/depends/afpfs-ng/01-gcrypt.patch delete mode 100644 tools/darwin/depends/afpfs-ng/02-pointer.patch delete mode 100644 tools/darwin/depends/afpfs-ng/04-boxee1.patch delete mode 100644 tools/darwin/depends/afpfs-ng/05-boxee2.patch delete mode 100644 tools/darwin/depends/afpfs-ng/06-boxee3.patch delete mode 100644 tools/darwin/depends/afpfs-ng/07-boxee4.patch delete mode 100644 tools/darwin/depends/afpfs-ng/08-boxee5.patch delete mode 100644 tools/darwin/depends/afpfs-ng/10-fix-errno.patch delete mode 100644 tools/darwin/depends/afpfs-ng/11-fix-stat.patch delete mode 100644 tools/darwin/depends/afpfs-ng/12-fix-even-more-pointers.patch delete mode 100644 tools/darwin/depends/afpfs-ng/Makefile delete mode 100644 tools/darwin/depends/afpfs-ng/fix_afpfs-ng_includes.patch delete mode 100644 tools/darwin/depends/autoconf/Makefile delete mode 100644 tools/darwin/depends/automake/Makefile delete mode 100644 tools/darwin/depends/boost/Makefile delete mode 100644 tools/darwin/depends/boost/add-arm-mem-barrier.patch delete mode 100644 tools/darwin/depends/boost/fix-deprecated-swp.patch delete mode 100755 tools/darwin/depends/bootstrap delete mode 100644 tools/darwin/depends/cmake/Makefile delete mode 100644 tools/darwin/depends/config.site_ios.in delete mode 100644 tools/darwin/depends/config.site_ios.mk.in delete mode 100644 tools/darwin/depends/config.site_osx.in delete mode 100644 tools/darwin/depends/config.site_osx.mk.in delete mode 100644 tools/darwin/depends/configure.in delete mode 100644 tools/darwin/depends/curl/Makefile delete mode 100644 tools/darwin/depends/distribute/Makefile delete mode 100644 tools/darwin/depends/distutilscross/Makefile delete mode 100644 tools/darwin/depends/dpkg/Makefile delete mode 100644 tools/darwin/depends/expat/Makefile delete mode 100644 tools/darwin/depends/fontconfig/01-fontconfig-cross-compile-fix.patch delete mode 100644 tools/darwin/depends/fontconfig/Makefile delete mode 100644 tools/darwin/depends/freetype2/Makefile delete mode 100644 tools/darwin/depends/fribidi/Makefile delete mode 100644 tools/darwin/depends/gas-preprocessor/Makefile delete mode 100644 tools/darwin/depends/gas-preprocessor/README delete mode 100755 tools/darwin/depends/gas-preprocessor/gas-preprocessor.pl delete mode 100644 tools/darwin/depends/gettext/01-gettext-tools-Makefile.in.patch delete mode 100644 tools/darwin/depends/gettext/02-gettext-tools-stpncpy.patch delete mode 100644 tools/darwin/depends/gettext/Makefile delete mode 100644 tools/darwin/depends/help2man/Makefile delete mode 100644 tools/darwin/depends/jpeg/Makefile delete mode 100644 tools/darwin/depends/lib-gpgerror/Makefile delete mode 100644 tools/darwin/depends/libGLEW/Makefile delete mode 100644 tools/darwin/depends/libarchive/Makefile delete mode 100644 tools/darwin/depends/libass/Makefile delete mode 100644 tools/darwin/depends/libbluray/Makefile delete mode 100644 tools/darwin/depends/libboblight/Makefile delete mode 100644 tools/darwin/depends/libcdio/Makefile delete mode 100644 tools/darwin/depends/libcdio/osx.patch delete mode 100644 tools/darwin/depends/libcec/Makefile delete mode 100644 tools/darwin/depends/libcrystalhd/Makefile delete mode 100644 tools/darwin/depends/libcrystalhd/libcrystalhd/bc_dts_defs.h delete mode 100644 tools/darwin/depends/libcrystalhd/libcrystalhd/bc_dts_types.h delete mode 100644 tools/darwin/depends/libcrystalhd/libcrystalhd/libcrystalhd_if.h delete mode 100644 tools/darwin/depends/libcrystalhd/libcrystalhd/libcrystalhd_version.h delete mode 100644 tools/darwin/depends/libffi/Makefile delete mode 100644 tools/darwin/depends/libflac/Makefile delete mode 100644 tools/darwin/depends/libgcrypt/01-static-mpi_mpi-internal.patch delete mode 100644 tools/darwin/depends/libgcrypt/02-armasm.patch delete mode 100644 tools/darwin/depends/libgcrypt/Makefile delete mode 100644 tools/darwin/depends/libgpg-error/Makefile delete mode 100644 tools/darwin/depends/libjpeg-turbo-native/Makefile delete mode 100644 tools/darwin/depends/libjpeg-turbo/Makefile delete mode 100644 tools/darwin/depends/liblzo2-native/Makefile delete mode 100644 tools/darwin/depends/liblzo2/Makefile delete mode 100644 tools/darwin/depends/libmad/01-libmad-pkgconfig.patch delete mode 100644 tools/darwin/depends/libmad/02-libmad-thumb-fix.patch delete mode 100644 tools/darwin/depends/libmad/Makefile delete mode 100644 tools/darwin/depends/libmicrohttpd/Makefile delete mode 100644 tools/darwin/depends/libmodplug/Makefile delete mode 100644 tools/darwin/depends/libmp3lame/Makefile delete mode 100644 tools/darwin/depends/libmpeg2/01-libmpeg2-add-asm-leading-underscores.patch delete mode 100644 tools/darwin/depends/libmpeg2/02-neon.patch delete mode 100644 tools/darwin/depends/libmpeg2/03-config-fix.patch delete mode 100644 tools/darwin/depends/libmpeg2/Makefile delete mode 100644 tools/darwin/depends/libnfs/Makefile delete mode 100644 tools/darwin/depends/libnfs/rpcinc/auth.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/auth_unix.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/clnt.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/pmap_clnt.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/pmap_prot.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/pmap_rmt.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/rpc.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/rpc_msg.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/svc.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/svc_auth.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/types.h delete mode 100644 tools/darwin/depends/libnfs/rpcinc/xdr.h delete mode 100644 tools/darwin/depends/libogg/Makefile delete mode 100644 tools/darwin/depends/libplist/0001-dontbuildswig.patch delete mode 100644 tools/darwin/depends/libplist/Makefile delete mode 100644 tools/darwin/depends/libpng-native/Makefile delete mode 100644 tools/darwin/depends/libpng/Makefile delete mode 100644 tools/darwin/depends/librtmp/Makefile delete mode 100644 tools/darwin/depends/librtmp/librtmp-60-second-fix.patch delete mode 100644 tools/darwin/depends/libsamplerate/01-libsamplerate-arm.patch delete mode 100644 tools/darwin/depends/libsamplerate/Makefile delete mode 100644 tools/darwin/depends/libsdl-native/01-SDL_SetWidthHeight.patch delete mode 100644 tools/darwin/depends/libsdl-native/02-mmx.patch delete mode 100644 tools/darwin/depends/libsdl-native/Makefile delete mode 100644 tools/darwin/depends/libsdl/01-SDL_SetWidthHeight.patch delete mode 100644 tools/darwin/depends/libsdl/02-mmx.patch delete mode 100644 tools/darwin/depends/libsdl/Makefile delete mode 100644 tools/darwin/depends/libsdl_image-native/Makefile delete mode 100644 tools/darwin/depends/libsdl_image/Makefile delete mode 100644 tools/darwin/depends/libsdl_mixer/Makefile delete mode 100644 tools/darwin/depends/libshairport/001_add_ao.patch delete mode 100644 tools/darwin/depends/libshairport/002_fix_install_header.patch delete mode 100644 tools/darwin/depends/libshairport/003_fix_deadlock.patch delete mode 100644 tools/darwin/depends/libshairport/004_fix_bad_access.patch delete mode 100644 tools/darwin/depends/libshairport/005_fix_shutdown.patch delete mode 100644 tools/darwin/depends/libshairport/006_no_printf.patch delete mode 100644 tools/darwin/depends/libshairport/007_fix_syslog_defines.patch delete mode 100644 tools/darwin/depends/libshairport/008-add-missing-libs.patch delete mode 100644 tools/darwin/depends/libshairport/009_fix_ipv6.patch delete mode 100644 tools/darwin/depends/libshairport/010_handle_metadata.patch delete mode 100644 tools/darwin/depends/libshairport/011_fix_ipv4_fallback.patch delete mode 100644 tools/darwin/depends/libshairport/Makefile delete mode 100644 tools/darwin/depends/libssh/Makefile delete mode 100644 tools/darwin/depends/libssh/removelegacy.patch delete mode 100644 tools/darwin/depends/libssh2/Makefile delete mode 100644 tools/darwin/depends/libtiff-native/Makefile delete mode 100644 tools/darwin/depends/libtool/Makefile delete mode 100644 tools/darwin/depends/libusb/Makefile delete mode 100644 tools/darwin/depends/libvorbis/Makefile delete mode 100644 tools/darwin/depends/libyajl/Makefile delete mode 100644 tools/darwin/depends/m4/Makefile delete mode 100644 tools/darwin/depends/mysqlclient/01-mysqlclient-cross-compile.patch delete mode 100644 tools/darwin/depends/mysqlclient/02-mysqlclient-ios.patch delete mode 100644 tools/darwin/depends/mysqlclient/Makefile delete mode 100644 tools/darwin/depends/openssl/Makefile delete mode 100644 tools/darwin/depends/pcre/Makefile delete mode 100644 tools/darwin/depends/pkg-config/Makefile delete mode 100644 tools/darwin/depends/python26/Makefile.ios delete mode 100644 tools/darwin/depends/python26/Makefile.osx delete mode 100644 tools/darwin/depends/python26/Python-2.6-ctypes.patch delete mode 100644 tools/darwin/depends/python26/Python-2.6.5-xcompile.patch delete mode 100644 tools/darwin/depends/python26/python-osx-environ-fix.patch delete mode 100644 tools/darwin/depends/readline/Makefile delete mode 100644 tools/darwin/depends/samba/Makefile delete mode 100644 tools/darwin/depends/sed/Makefile delete mode 100644 tools/darwin/depends/sqlite3/Makefile delete mode 100644 tools/darwin/depends/swig/Makefile delete mode 100644 tools/darwin/depends/taglib/Makefile delete mode 100644 tools/darwin/depends/tar/Makefile delete mode 100644 tools/darwin/depends/tiff/Makefile delete mode 100644 tools/darwin/depends/tinyxml/Makefile delete mode 100644 tools/darwin/depends/xbmc-pvr-addons/Makefile delete mode 100644 tools/darwin/depends/xbmc/Makefile delete mode 100644 tools/darwin/depends/yasm/Makefile diff --git a/tools/darwin/depends/.autom4te.cfg b/tools/darwin/depends/.autom4te.cfg deleted file mode 100644 index 8f415d60728ae..0000000000000 --- a/tools/darwin/depends/.autom4te.cfg +++ /dev/null @@ -1,3 +0,0 @@ -begin-language: "Autoconf" -args: --no-cache -end-language: "Autoconf" diff --git a/tools/darwin/depends/Backrow/Makefile b/tools/darwin/depends/Backrow/Makefile deleted file mode 100644 index 90d63bb201594..0000000000000 --- a/tools/darwin/depends/Backrow/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -include ../Makefile.include - -SOURCE=Backrow -ARCHIVE=$(SOURCE).tar.gz -# Specific download location -BASE_URL=http://xbmc-for-atv2.googlecode.com/svn/trunk/Backrow - -all: $(SOURCE) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - -.installed: - mkdir -p $(PREFIX)/include - cp -rf $(SOURCE) $(PREFIX)/include/ - touch $@ - -clean: -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/COPYING b/tools/darwin/depends/COPYING deleted file mode 100644 index 94a9ed024d385..0000000000000 --- a/tools/darwin/depends/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/tools/darwin/depends/Makefile.buildtools b/tools/darwin/depends/Makefile.buildtools deleted file mode 100644 index f83a269b1eab2..0000000000000 --- a/tools/darwin/depends/Makefile.buildtools +++ /dev/null @@ -1,11 +0,0 @@ -TOOLCHAIN=/Users/Shared/xbmc-depends/toolchain -export PATH:=$(TOOLCHAIN)/bin:${PATH} - -TARBALLS_LOCATION=/Users/Shared/xbmc-depends/tarballs -BASE_URL=http://mirrors.xbmc.org/build-deps/darwin-libs -MAKE_JOBS=$(shell sysctl hw.ncpu | awk '{print $$2}') - -RETRIEVE_TOOL=/usr/bin/curl -RETRIEVE_TOOL_FLAGS=-Ls --create-dirs --output $(TARBALLS_LOCATION)/$(ARCHIVE) -ARCHIVE_TOOL=tar -ARCHIVE_TOOL_FLAGS=xf diff --git a/tools/darwin/depends/Makefile.in b/tools/darwin/depends/Makefile.in deleted file mode 100644 index b1ff6671ec890..0000000000000 --- a/tools/darwin/depends/Makefile.in +++ /dev/null @@ -1,61 +0,0 @@ -include Makefile.include - -BUILDTOOLS = gas-preprocessor help2man m4 autoconf automake libtool pkg-config yasm cmake sed tar dpkg swig -ifeq ($(DARWIN), ios) -BUILDTOOLS+= liblzo2-native libjpeg-turbo-native libpng-native libtiff-native libsdl-native libsdl_image-native -endif - -SUBDIRS := \ - Backrow pcre expat gettext readline sqlite3 \ - liblzo2 freetype2 fontconfig \ - openssl libssh libssh2 librtmp curl \ - libjpeg-turbo tiff libpng libogg \ - libvorbis libflac libmp3lame libmad fribidi libmpeg2 \ - libass libcdio libsamplerate libcrystalhd libnfs \ - libGLEW libsdl libsdl_mixer libsdl_image \ - libmicrohttpd libmodplug libbluray libyajl libffi \ - libgpg-error libgcrypt afpfs-ng \ - libplist libshairport libcec tinyxml \ - samba python26 distribute distutilscross \ - mysqlclient boost taglib xbmc-pvr-addons \ - -ifeq ($(DARWIN), ios) - EXCLUDED = libcec libcrystalhd libGLEW libsdl libsdl_mixer libsdl_image -else - EXCLUDED = Backrow -endif -SUBDIRS := $(filter-out $(EXCLUDED),$(SUBDIRS)) - -.PHONY: $(BUILDTOOLS) $(SUBDIRS) - -all: $(BUILDTOOLS) $(SUBDIRS) - -$(BUILDTOOLS): - $(MAKE) -C $@ - -$(SUBDIRS): - $(MAKE) -C $@ - -clean: - for d in $(BUILDTOOLS); do if test -f $$d/Makefile; then $(MAKE) -C $$d distclean; fi; done - for d in $(SUBDIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d distclean; fi; done - -cleanbuildtools: - for d in $(BUILDTOOLS); do if test -f $$d/Makefile; then $(MAKE) -C $$d distclean; fi; done - -cleanbuilddepends: - for d in $(SUBDIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d distclean; fi; done - -cleantoolchain: - rm -rf $(TOOLCHAIN) - -cleanprefix: - rm -rf $(PREFIX) - -distclean:: - for d in $(BUILDTOOLS); do if test -f $$d/Makefile; then $(MAKE) -C $$d distclean; fi; done - for d in $(SUBDIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d distclean; fi; done - find . -name .gitignore -exec rm -rf {} \; - rm -rf $(TOOLCHAIN) - rm -rf $(PREFIX) - rm -f Makefile Makefile.include config.site config.site.mk config.log config.status configure diff --git a/tools/darwin/depends/Makefile.include.in b/tools/darwin/depends/Makefile.include.in deleted file mode 100644 index 25e704bbb6db6..0000000000000 --- a/tools/darwin/depends/Makefile.include.in +++ /dev/null @@ -1,7 +0,0 @@ -SDK=@use_sdk@ -ARCH=@use_arch@ -DARWIN=@use_darwin@ -PREFIX=@use_prefix@ -STAGING=@use_staging@ - -include @abs_top_srcdir@/Makefile.buildtools diff --git a/tools/darwin/depends/README b/tools/darwin/depends/README deleted file mode 100644 index 3411b69bd58d7..0000000000000 --- a/tools/darwin/depends/README +++ /dev/null @@ -1,20 +0,0 @@ -Build xbmc depends libs for osx and ios. - -This build system uses a configure's config.site file method of setting up for cross-compiling. ${PREFIX}/share/config.site defines all the items and tweaks required and simply doing ./configure --prefix= will enabled the usage. - -We support drawn cross-compiles for OSX and iOS with selection of SDK. -Options are; ---with-staging depends build location (/Users/Shared/xbmc-depends). ---with-darwin build depend libs for darwin osx (default) or ios. ---with-arch build depend libs for arch i386 (default), ppc or armv7. ---with-sdk build depend libs using sdk 10.4 (default) or 4.2. - -Unfortunately some libraries do not use a configure based setup/compile so we must keep both a config.site seed and duplicate config.site.mk for including in the Makefile. It is very important to keep both files in sync and note their syntax differences as config.site runs under the shell and config.site.mk runs under make. - -For OSX, see; -config.site_osx.in -config.site_osx.mk.in - -For iOS, see; -config.site_ios.in -config.site_ios.mk.in diff --git a/tools/darwin/depends/afpfs-ng/01-gcrypt.patch b/tools/darwin/depends/afpfs-ng/01-gcrypt.patch deleted file mode 100644 index 7bcace2812fe3..0000000000000 --- a/tools/darwin/depends/afpfs-ng/01-gcrypt.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ru afpfs-ng-0.8.1/configure.ac afpfs-ng-0.8.1+iPhone/configure.ac ---- afpfs-ng-0.8.1/configure.ac 2008-03-08 16:23:12.000000000 +0000 -+++ afpfs-ng-0.8.1+iPhone/configure.ac 2010-10-24 05:26:15.000000000 +0000 -@@ -50,21 +50,6 @@ - case $host in - *-*-darwin*) - AC_MSG_CHECKING([for correct gcrypt version]) -- AC_RUN_IFELSE( -- [AC_LANG_PROGRAM([ -- #include -- #include ],[ -- char*p= GCRYPT_VERSION; -- unsigned int vers; -- vers=atoi(p)*10000; -- p=strchr(p,'.')+1; -- vers+=atoi(p)*100; -- p=strchr(p,'.')+1; -- vers+=atoi(p); -- if (vers<10400) return 1; -- ])], -- [AC_MSG_RESULT([yes])], -- [AC_MSG_ERROR([version is < 1.4.0])]) - AM_CONDITIONAL(HAVE_LIBGCRYPT, true) - AC_DEFINE([HAVE_LIBGCRYPT], [1] ) - ;; - diff --git a/tools/darwin/depends/afpfs-ng/02-pointer.patch b/tools/darwin/depends/afpfs-ng/02-pointer.patch deleted file mode 100644 index 80507b5725d86..0000000000000 --- a/tools/darwin/depends/afpfs-ng/02-pointer.patch +++ /dev/null @@ -1,280 +0,0 @@ -diff -up afpfs-ng-0.8.1/cmdline/getstatus.c.pointer afpfs-ng-0.8.1/cmdline/getstatus.c ---- afpfs-ng-0.8.1/cmdline/getstatus.c.pointer 2011-06-14 17:06:35.000000000 +0200 -+++ afpfs-ng-0.8.1/cmdline/getstatus.c 2011-06-14 17:07:25.000000000 +0200 -@@ -1,4 +1,5 @@ - #include -+#include - #include - #include - -diff -up afpfs-ng-0.8.1/fuse/client.c.pointer afpfs-ng-0.8.1/fuse/client.c ---- afpfs-ng-0.8.1/fuse/client.c.pointer 2008-03-08 03:44:16.000000000 +0100 -+++ afpfs-ng-0.8.1/fuse/client.c 2011-06-14 17:02:15.000000000 +0200 -@@ -61,8 +61,9 @@ static int start_afpfsd(void) - snprintf(filename, PATH_MAX, - "/usr/local/bin/%s",AFPFSD_FILENAME); - if (access(filename,X_OK)) { -- snprintf(filename, "/usr/bin/%s", -+ snprintf(filename, sizeof(filename), "/usr/bin/%s", - AFPFSD_FILENAME); -+ filename[sizeof(filename) - 1] = 0; - if (access(filename,X_OK)) { - printf("Could not find server (%s)\n", - filename); -diff -up afpfs-ng-0.8.1/fuse/fuse_int.c.pointer afpfs-ng-0.8.1/fuse/fuse_int.c ---- afpfs-ng-0.8.1/fuse/fuse_int.c.pointer 2008-03-02 06:06:24.000000000 +0100 -+++ afpfs-ng-0.8.1/fuse/fuse_int.c 2011-06-14 17:02:15.000000000 +0200 -@@ -197,7 +197,7 @@ static int fuse_open(const char *path, s - ret = ml_open(volume,path,flags,&fp); - - if (ret==0) -- fi->fh=(void *) fp; -+ fi->fh=(unsigned long) fp; - - return ret; - } -diff -up afpfs-ng-0.8.1/include/afpfs-ng/afp.h.pointer afpfs-ng-0.8.1/include/afp.h ---- afpfs-ng-0.8.1/include/afpfs-ng/afp.h.pointer 2008-03-08 17:08:18.000000000 +0100 -+++ afpfs-ng-0.8.1/include/afpfs-ng/afp.h 2011-06-14 17:02:15.000000000 +0200 -@@ -370,7 +370,7 @@ int afp_unmount_all_volumes(struct afp_s - - int afp_opendt(struct afp_volume *volume, unsigned short * refnum); - --int afp_closedt(struct afp_server * server, unsigned short * refnum); -+int afp_closedt(struct afp_server * server, unsigned short refnum); - - int afp_getcomment(struct afp_volume *volume, unsigned int did, - const char * pathname, struct afp_comment * comment); -diff -up afpfs-ng-0.8.1/include/afpfs-gn/utils.h.pointer afpfs-ng-0.8.1/include/utils.h ---- afpfs-ng-0.8.1/include/afpfs-ng/utils.h.pointer 2008-02-18 04:33:58.000000000 +0100 -+++ afpfs-ng-0.8.1/include/afpfs-ng/utils.h 2011-06-14 17:02:15.000000000 +0200 -@@ -8,8 +8,8 @@ - #define hton64(x) (x) - #define ntoh64(x) (x) - #else /* BYTE_ORDER == BIG_ENDIAN */ --#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \ -- (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32)) -+#define hton64(x) ((u_int64_t) (htonl((((unsigned long long)(x)) >> 32) & 0xffffffffLL)) | \ -+ (u_int64_t) ((htonl((unsigned long long)(x)) & 0xffffffffLL) << 32)) - #define ntoh64(x) (hton64(x)) - #endif /* BYTE_ORDER == BIG_ENDIAN */ - -diff -up afpfs-ng-0.8.1/lib/afp_url.c.pointer afpfs-ng-0.8.1/lib/afp_url.c ---- afpfs-ng-0.8.1/lib/afp_url.c.pointer 2008-03-04 21:16:49.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/afp_url.c 2011-06-14 17:02:15.000000000 +0200 -@@ -33,7 +33,7 @@ static int check_port(char * port) - static int check_uamname(const char * uam) - { - char * p; -- for (p=uam;*p;p++) { -+ for (p=(char *)uam;*p;p++) { - if (*p==' ') continue; - if ((*p<'A') || (*p>'z')) return -1; - } -@@ -188,7 +188,7 @@ int afp_parse_url(struct afp_url * url, - return -1; - - } -- if (p==NULL) p=toparse; -+ if (p==NULL) p=(char *)toparse; - - /* Now split on the first / */ - if (sscanf(p,"%[^/]/%[^$]", -diff -up afpfs-ng-0.8.1/lib/did.c.pointer afpfs-ng-0.8.1/lib/did.c ---- afpfs-ng-0.8.1/lib/did.c.pointer 2008-02-18 04:39:17.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/did.c 2011-06-14 17:02:15.000000000 +0200 -@@ -226,7 +226,7 @@ int get_dirid(struct afp_volume * volume - - - /* Go to the end of last known entry */ -- p=path+(p-copy); -+ p=(char *)path+(p-copy); - p2=p; - - while ((p=strchr(p+1,'/'))) { -diff -up afpfs-ng-0.8.1/lib/dsi.c.pointer afpfs-ng-0.8.1/lib/dsi.c ---- afpfs-ng-0.8.1/lib/dsi.c.pointer 2008-02-18 04:53:03.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/dsi.c 2011-06-14 17:02:15.000000000 +0200 -@@ -474,7 +474,7 @@ void dsi_getstatus_reply(struct afp_serv - } - server->flags=ntohs(reply1->flags); - -- p=(void *)((unsigned int) server->incoming_buffer + sizeof(*reply1)); -+ p=(void *)((unsigned long) server->incoming_buffer + sizeof(*reply1)); - p+=copy_from_pascal(server->server_name,p,AFP_SERVER_NAME_LEN)+1; - - /* Now work our way through the variable bits */ -@@ -757,7 +757,7 @@ gotenough: - printf("<<< read() of rest of AFP, %d bytes\n",amount_to_read); - #endif - ret = read(server->fd, (void *) -- (((unsigned int) server->incoming_buffer)+server->data_read), -+ (((unsigned long) server->incoming_buffer)+server->data_read), - amount_to_read); - if (ret<0) return -1; - if (ret==0) { -diff -up afpfs-ng-0.8.1/lib/loop.c.pointer afpfs-ng-0.8.1/lib/loop.c ---- afpfs-ng-0.8.1/lib/loop.c.pointer 2008-02-18 04:40:11.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/loop.c 2011-06-14 17:02:15.000000000 +0200 -@@ -25,7 +25,7 @@ - static unsigned char exit_program=0; - - static pthread_t ending_thread; --static pthread_t main_thread = NULL; -+static pthread_t main_thread = (pthread_t)NULL; - - static int loop_started=0; - static pthread_cond_t loop_started_condition; -diff -up afpfs-ng-0.8.1/lib/lowlevel.c.pointer afpfs-ng-0.8.1/lib/lowlevel.c ---- afpfs-ng-0.8.1/lib/lowlevel.c.pointer 2008-02-20 02:33:17.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/lowlevel.c 2011-06-14 17:02:15.000000000 +0200 -@@ -582,7 +582,7 @@ int ll_getattr(struct afp_volume * volum - if (volume->server->using_version->av_number>=30) - stbuf->st_mode |= fp.unixprivs.permissions; - else -- set_nonunix_perms(stbuf,&fp); -+ set_nonunix_perms(&stbuf->st_mode,&fp); - - stbuf->st_uid=fp.unixprivs.uid; - stbuf->st_gid=fp.unixprivs.gid; -diff -up afpfs-ng-0.8.1/lib/midlevel.c.pointer afpfs-ng-0.8.1/lib/midlevel.c ---- afpfs-ng-0.8.1/lib/midlevel.c.pointer 2008-03-08 17:08:18.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/midlevel.c 2011-06-14 17:02:15.000000000 +0200 -@@ -713,7 +713,7 @@ int ml_write(struct afp_volume * volume, - { - - int ret,err=0; -- int totalwritten = 0; -+ size_t totalwritten = 0; - uint64_t sizetowrite, ignored; - unsigned char flags = 0; - unsigned int max_packet_size=volume->server->tx_quantum; -diff -up afpfs-ng-0.8.1/lib/proto_attr.c.pointer afpfs-ng-0.8.1/lib/proto_attr.c ---- afpfs-ng-0.8.1/lib/proto_attr.c.pointer 2008-01-30 05:37:58.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_attr.c 2011-06-14 17:02:15.000000000 +0200 -@@ -166,7 +166,7 @@ int afp_getextattr(struct afp_volume * v - copy_path(server,p,pathname,strlen(pathname)); - unixpath_to_afppath(server,p); - p2=p+sizeof_path_header(server)+strlen(pathname); -- if (((unsigned int ) p2) & 0x1) p2++; -+ if (((unsigned long) p2) & 0x1) p2++; - req2=(void *) p2; - - req2->len=htons(namelen); -diff -up afpfs-ng-0.8.1/lib/proto_desktop.c.pointer afpfs-ng-0.8.1/lib/proto_desktop.c ---- afpfs-ng-0.8.1/lib/proto_desktop.c.pointer 2008-02-18 04:44:11.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_desktop.c 2011-06-14 17:02:15.000000000 +0200 -@@ -168,7 +168,7 @@ int afp_getcomment_reply(struct afp_serv - return 0; - } - --int afp_closedt(struct afp_server * server, unsigned short * refnum) -+int afp_closedt(struct afp_server * server, unsigned short refnum) - { - struct { - struct dsi_header dsi_header __attribute__((__packed__)); -diff -up afpfs-ng-0.8.1/lib/proto_directory.c.pointer afpfs-ng-0.8.1/lib/proto_directory.c ---- afpfs-ng-0.8.1/lib/proto_directory.c.pointer 2008-02-19 03:39:29.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_directory.c 2011-06-14 17:02:15.000000000 +0200 -@@ -248,6 +248,7 @@ int afp_enumerate_reply(struct afp_serve - - return 0; - } -+ - int afp_enumerateext2_reply(struct afp_server *server, char * buf, unsigned int size, void * other) - { - -@@ -266,8 +267,7 @@ int afp_enumerateext2_reply(struct afp_s - char * p = buf + sizeof(*reply); - int i; - char *max=buf+size; -- struct afp_file_info * filebase = NULL, *filecur=NULL, *new_file=NULL; -- void ** x = other; -+ struct afp_file_info * filebase = NULL, *filecur = NULL, *new_file = NULL, **x = (struct afp_file_info **) other; - - if (reply->dsi_header.return_code.error_code) { - return reply->dsi_header.return_code.error_code; -diff -up afpfs-ng-0.8.1/lib/proto_map.c.pointer afpfs-ng-0.8.1/lib/proto_map.c ---- afpfs-ng-0.8.1/lib/proto_map.c.pointer 2008-01-30 05:37:59.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_map.c 2011-06-14 17:02:15.000000000 +0200 -@@ -122,7 +122,7 @@ int afp_mapid_reply(struct afp_server *s - - if (reply->header.return_code.error_code!=kFPNoErr) return -1; - -- copy_from_pascal_two(name,&reply->name,255); -+ copy_from_pascal_two(name,reply->name,255); - - return 0; - } -diff -up afpfs-ng-0.8.1/lib/proto_session.c.pointer afpfs-ng-0.8.1/lib/proto_session.c ---- afpfs-ng-0.8.1/lib/proto_session.c.pointer 2008-02-18 04:46:19.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_session.c 2011-06-14 17:02:15.000000000 +0200 -@@ -39,7 +39,7 @@ int afp_getsessiontoken(struct afp_serve - switch (type) { - case kLoginWithTimeAndID: - case kReconnWithTimeAndID: { -- uint32_t *p = (void *) (((unsigned int) request)+ -+ uint32_t *p = (void *) (((unsigned long) request)+ - sizeof(*request)); - - offset=sizeof(timestamp); -@@ -63,7 +63,7 @@ int afp_getsessiontoken(struct afp_serve - goto error; - } - -- data=(void *) (((unsigned int) request)+sizeof(*request)+offset); -+ data=(void *) (((unsigned long) request)+sizeof(*request)+offset); - request->idlength=htonl(datalen); - request->pad=0; - request->type=htons(type); -@@ -127,7 +127,7 @@ int afp_disconnectoldsession(struct afp_ - if ((request=malloc(sizeof(*request) + AFP_TOKEN_MAX_LEN))==NULL) - return -1; - -- token_data = request + sizeof(*request); -+ token_data = (char *)request + sizeof(*request); - - request->type=htons(type); - -diff -up afpfs-ng-0.8.1/lib/uams.c.pointer afpfs-ng-0.8.1/lib/uams.c ---- afpfs-ng-0.8.1/lib/uams.c.pointer 2008-01-04 04:52:44.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/uams.c 2011-06-14 17:02:15.000000000 +0200 -@@ -180,7 +180,7 @@ static int cleartxt_login(struct afp_ser - goto cleartxt_fail; - - p += copy_to_pascal(p, username) + 1; -- if ((int)p & 0x1) -+ if ((long)p & 0x1) - len--; - else - p++; -@@ -230,7 +230,7 @@ static int cleartxt_passwd(struct afp_se - goto cleartxt_fail; - - p += copy_to_pascal(p, username) + 1; -- if ((int)p & 0x1) -+ if ((long)p & 0x1) - len--; - else - p++; -@@ -580,7 +580,7 @@ static int dhx_login(struct afp_server * - if (ai == NULL) - goto dhx_noctx_fail; - d += copy_to_pascal(ai, username) + 1; -- if (((int)d) % 2) -+ if (((long)d) % 2) - d++; - else - ai_len--; -diff -up afpfs-ng-0.8.1/lib/utils.c.pointer afpfs-ng-0.8.1/lib/utils.c ---- afpfs-ng-0.8.1/lib/utils.c.pointer 2008-02-18 04:53:37.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/utils.c 2011-06-14 17:02:15.000000000 +0200 -@@ -196,7 +196,7 @@ int invalid_filename(struct afp_server * - maxlen=255; - - -- p=filename+1; -+ p=(char *)filename+1; - while ((q=strchr(p,'/'))) { - if (q>p+maxlen) - return 1; diff --git a/tools/darwin/depends/afpfs-ng/04-boxee1.patch b/tools/darwin/depends/afpfs-ng/04-boxee1.patch deleted file mode 100644 index 9f3c20f35e94a..0000000000000 --- a/tools/darwin/depends/afpfs-ng/04-boxee1.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- afpfs-ng-0.8.1/include/afpfs-ng/dsi.h 2008-02-18 04:33:24.000000000 +0100 -+++ afpfs-ng-0.8.1/include/afpfs-ng/dsi.h 2011-08-26 21:33:33.000000000 +0200 -@@ -6,13 +6,15 @@ - - struct dsi_request - { -- unsigned short requestid; -- unsigned char subcommand; -- void * other; -- unsigned char wait; -- pthread_cond_t condition_cond; -- struct dsi_request * next; -- int return_code; -+ unsigned short requestid; -+ unsigned char subcommand; -+ void * other; -+ int wait; -+ int done_waiting; -+ pthread_cond_t waiting_cond; -+ pthread_mutex_t waiting_mutex; -+ struct dsi_request * next; -+ int return_code; - }; - - int dsi_receive(struct afp_server * server, void * data, int size); diff --git a/tools/darwin/depends/afpfs-ng/05-boxee2.patch b/tools/darwin/depends/afpfs-ng/05-boxee2.patch deleted file mode 100644 index 50250bc0afd68..0000000000000 --- a/tools/darwin/depends/afpfs-ng/05-boxee2.patch +++ /dev/null @@ -1,89 +0,0 @@ ---- afpfs-ng-0.8.1/lib/afp.c 2008-03-08 03:44:16.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/afp.c 2011-08-26 21:33:33.000000000 +0200 -@@ -68,7 +68,7 @@ - afp_getsessiontoken_reply,afp_blank_reply, NULL, NULL, - afp_enumerateext2_reply, NULL, NULL, NULL, /*64 - 71 */ - afp_listextattrs_reply, NULL, NULL, NULL, -- afp_blank_reply, NULL, NULL, NULL, /*72 - 79 */ -+ afp_blank_reply, NULL, afp_blank_reply, afp_blank_reply, /*72 - 79 */ - - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, -@@ -320,8 +320,16 @@ - - struct dsi_request * p; - struct afp_server *s2; -+ -+ -+ if (s==NULL) -+ goto out; -+ - for (p=s->command_requests;p;p=p->next) { -- pthread_cond_signal(&p->condition_cond); -+ pthread_mutex_lock(&p->waiting_mutex); -+ p->done_waiting=1; -+ pthread_cond_signal(&p->waiting_cond); -+ pthread_mutex_unlock(&p->waiting_mutex); - } - - if (s==server_base) { -@@ -354,7 +362,7 @@ - s->exit_flag = 0; - s->path_encoding=kFPUTF8Name; /* This is a default */ - s->next=NULL; -- s->bufsize=2048; -+ s->bufsize=4096; - s->incoming_buffer=malloc(s->bufsize); - - s->attention_quantum=AFP_DEFAULT_ATTENTION_QUANTUM; -@@ -524,13 +532,14 @@ - kFPVolCreateDateBit|kFPVolIDBit | - kFPVolNameBit; - char new_encoding; -+ int ret; - - if (server->using_version->av_number>=30) - bitmap|= kFPVolNameBit|kFPVolBlockSizeBit; - -- switch (afp_volopen(volume,bitmap, -- (strlen(volume->volpassword)>0) ? volume->volpassword : NULL)) -- { -+ ret = afp_volopen(volume,bitmap, -+ (strlen(volume->volpassword)>0) ? volume->volpassword : NULL); -+ switch(ret){ - case kFPAccessDenied: - *l+=snprintf(mesg,max-*l, - "Incorrect volume password\n"); -@@ -544,6 +553,10 @@ - *l+=snprintf(mesg,max-*l, - "Could not open volume\n"); - goto error; -+ case ETIMEDOUT: -+ *l+=snprintf(mesg,max-*l, -+ "Timed out waiting to open volume\n"); -+ goto error; - } - - /* It is said that if a volume's encoding will be the same -@@ -641,7 +654,6 @@ - add_server(server); - - add_fd_and_signal(server->fd); -- - if (!full) { - return 0; - } -@@ -649,10 +661,13 @@ - /* Get the status, and calculate the transmit time. We use this to - * calculate our rx quantum. */ - gettimeofday(&t1,NULL); -+ - if ((error=dsi_getstatus(server))!=0) - goto error; - gettimeofday(&t2,NULL); - -+ afp_server_identify(server); -+ - if ((t2.tv_sec - t1.tv_sec) > 0) - server->tx_delay= (t2.tv_sec - t1.tv_sec) * 1000; - else diff --git a/tools/darwin/depends/afpfs-ng/06-boxee3.patch b/tools/darwin/depends/afpfs-ng/06-boxee3.patch deleted file mode 100644 index 4b7c916da3d38..0000000000000 --- a/tools/darwin/depends/afpfs-ng/06-boxee3.patch +++ /dev/null @@ -1,141 +0,0 @@ ---- afpfs-ng-0.8.1/lib/dsi.c 2011-08-26 17:27:16.000000000 +0200 -+++ afpfs-ng-0.8.1/lib/dsi.c 2011-08-26 21:33:33.000000000 +0200 -@@ -64,7 +64,7 @@ - rx.size=0; - dsi_setup_header(server,&header,DSI_DSIGetStatus); - /* We're intentionally ignoring the results */ -- ret=dsi_send(server,(char *) &header,sizeof(struct dsi_header),20, -+ ret=dsi_send(server,(char *) &header,sizeof(struct dsi_header),60, - 0,(void *) &rx); - - free(rx.data); -@@ -197,6 +197,7 @@ - new_request->other=other; - new_request->wait=wait; - new_request->next=NULL; -+ new_request->done_waiting=0; - - pthread_mutex_lock(&server->request_queue_mutex); - if (server->command_requests==NULL) { -@@ -208,7 +209,8 @@ - server->stats.requests_pending++; - pthread_mutex_unlock(&server->request_queue_mutex); - -- pthread_cond_init(&new_request->condition_cond,NULL); -+ pthread_cond_init(&new_request->waiting_cond,NULL); -+ pthread_mutex_init(&new_request->waiting_mutex,NULL); - - if (server->connect_state==SERVER_STATE_DISCONNECTED) { - char mesg[1024]; -@@ -240,16 +242,12 @@ - server->stats.tx_bytes+=size; - pthread_mutex_unlock(&server->send_mutex); - -- int tmpwait=new_request->wait; - #ifdef DEBUG_DSI - printf("=== Waiting for response for %d %s\n", - new_request->requestid, - afp_get_command_name(new_request->subcommand)); - #endif -- if (tmpwait<0) { -- -- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; -- pthread_mutex_lock(&mutex); -+ if (new_request->wait<0) { - - /* Wait forever */ - #ifdef DEBUG_DSI -@@ -258,14 +256,17 @@ - afp_get_command_name(new_request->subcommand)); - #endif - -- rc=pthread_cond_wait( -- &new_request->condition_cond, -- &mutex ); -- pthread_mutex_unlock(&mutex); -- -- } else if (tmpwait>0) { -- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; -- pthread_mutex_lock(&mutex); -+ pthread_mutex_lock(&new_request->waiting_mutex); -+ -+ if (new_request->done_waiting==0) -+ rc=pthread_cond_wait( -+ &new_request->waiting_cond, -+ &new_request->waiting_mutex ); -+ -+ pthread_mutex_unlock(&new_request->waiting_mutex); -+ -+ } else if (new_request->wait>0) { -+ /* wait for new_request->wait seconds */ - - #ifdef DEBUG_DSI - printf("=== Waiting for %d %s, for %ds\n", -@@ -283,13 +284,15 @@ - printf("=== Changing my mind, no longer waiting for %d\n", - new_request->requestid); - #endif -- pthread_mutex_unlock(&mutex); - goto skip; - } -- rc=pthread_cond_timedwait( -- &new_request->condition_cond, -- &mutex,&ts); -- pthread_mutex_unlock(&mutex); -+ pthread_mutex_lock(&new_request->waiting_mutex); -+ if (new_request->done_waiting==0) -+ rc=pthread_cond_timedwait( -+ &new_request->waiting_cond, -+ &new_request->waiting_mutex,&ts); -+ pthread_mutex_unlock(&new_request->waiting_mutex); -+ - if (rc==ETIMEDOUT) { - /* FIXME: should handle this case properly */ - #ifdef DEBUG_DSI -@@ -299,6 +302,7 @@ - goto out; - } - } else { -+ /* Don't wait */ - #ifdef DEBUG_DSI - printf("=== Skipping wait altogether for %d\n",new_request->requestid); - #endif -@@ -474,7 +478,7 @@ - } - server->flags=ntohs(reply1->flags); - -- p=(void *)((unsigned long) server->incoming_buffer + sizeof(*reply1)); -+ p=(void *)((unsigned int) server->incoming_buffer + sizeof(*reply1)); - p+=copy_from_pascal(server->server_name,p,AFP_SERVER_NAME_LEN)+1; - - /* Now work our way through the variable bits */ -@@ -577,6 +581,7 @@ - unsigned char mins=0; - unsigned char checkmessage=0; - -+ memset(mesg,0,AFP_LOGINMESG_LEN); - - /* The logic here's undocumented. If we get an attention packet and - there's no flag, then go check the message. Also, go check the -@@ -757,7 +762,7 @@ - printf("<<< read() of rest of AFP, %d bytes\n",amount_to_read); - #endif - ret = read(server->fd, (void *) -- (((unsigned long) server->incoming_buffer)+server->data_read), -+ (((unsigned int) server->incoming_buffer)+server->data_read), - amount_to_read); - if (ret<0) return -1; - if (ret==0) { -@@ -862,8 +867,11 @@ - #ifdef DEBUG_DSI - printf("<<< Signalling %d, returning %d or %d\n",request->requestid,request->return_code,rc); - #endif -+ pthread_mutex_lock(&request->waiting_mutex); - request->wait=0; -- pthread_cond_signal(&request->condition_cond); -+ request->done_waiting=1; -+ pthread_cond_signal(&request->waiting_cond); -+ pthread_mutex_unlock(&request->waiting_mutex); - } else { - dsi_remove_from_request_queue(server,request); - } diff --git a/tools/darwin/depends/afpfs-ng/07-boxee4.patch b/tools/darwin/depends/afpfs-ng/07-boxee4.patch deleted file mode 100644 index 3e09f40dc5881..0000000000000 --- a/tools/darwin/depends/afpfs-ng/07-boxee4.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- afpfs-ng-0.8.1/lib/identify.c 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/identify.c 2011-08-26 21:33:33.000000000 +0200 -@@ -0,0 +1,24 @@ -+#include -+#include -+ -+ -+/* -+ * afp_server_identify() -+ * -+ * Identifies a server -+ * -+ * Right now, this only does identification using the machine_type -+ * given in getsrvrinfo, but this could later use mDNS to get -+ * more details. -+ */ -+void afp_server_identify(struct afp_server * s) -+{ -+ if (strcmp(s->machine_type,"Netatalk")==0) -+ s->server_type=AFPFS_SERVER_TYPE_NETATALK; -+ else if (strcmp(s->machine_type,"AirPort")==0) -+ s->server_type=AFPFS_SERVER_TYPE_AIRPORT; -+ else if (strcmp(s->machine_type,"Macintosh")==0) -+ s->server_type=AFPFS_SERVER_TYPE_MACINTOSH; -+ else -+ s->server_type=AFPFS_SERVER_TYPE_UNKNOWN; -+} diff --git a/tools/darwin/depends/afpfs-ng/08-boxee5.patch b/tools/darwin/depends/afpfs-ng/08-boxee5.patch deleted file mode 100644 index 253fb05c977c4..0000000000000 --- a/tools/darwin/depends/afpfs-ng/08-boxee5.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- afpfs-ng-0.8.1/lib/Makefile.am 2008-02-18 04:34:32.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/Makefile.am 2011-08-26 21:33:33.000000000 +0200 -@@ -4,7 +4,7 @@ - - lib_LTLIBRARIES = libafpclient.la - --libafpclient_la_SOURCES = afp.c codepage.c did.c dsi.c map_def.c uams.c uams_def.c unicode.c users.c utils.c resource.c log.c client.c server.c connect.c loop.c midlevel.c proto_attr.c proto_desktop.c proto_directory.c proto_files.c proto_fork.c proto_login.c proto_map.c proto_replyblock.c proto_server.c proto_volume.c proto_session.c afp_url.c status.c forklist.c debug.c lowlevel.c -+libafpclient_la_SOURCES = afp.c codepage.c did.c dsi.c map_def.c uams.c uams_def.c unicode.c users.c utils.c resource.c log.c client.c server.c connect.c loop.c midlevel.c proto_attr.c proto_desktop.c proto_directory.c proto_files.c proto_fork.c proto_login.c proto_map.c proto_replyblock.c proto_server.c proto_volume.c proto_session.c afp_url.c status.c forklist.c debug.c lowlevel.c identify.c - - # libafpclient_la_LDFLAGS = -module -avoid-version - diff --git a/tools/darwin/depends/afpfs-ng/10-fix-errno.patch b/tools/darwin/depends/afpfs-ng/10-fix-errno.patch deleted file mode 100644 index ff7ce44bdb6b4..0000000000000 --- a/tools/darwin/depends/afpfs-ng/10-fix-errno.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- afpfs-ng-0.8.1/lib/afp.c 2011-09-04 19:42:42.000000000 +0200 -+++ afpfs-ng-0.8.1/lib/afp.c 2011-09-04 19:39:44.000000000 +0200 -@@ -19,7 +19,6 @@ - #include - #include - #include --#include - - #include - #include ---- afpfs-ng-0.8.1/lib/afp_url.c 2011-09-04 19:42:42.000000000 +0200 -+++ afpfs-ng-0.8.1/lib/afp_url.c 2011-09-04 19:40:27.000000000 +0200 -@@ -21,7 +21,9 @@ - - static int check_port(char * port) - { -- long long ret = strtol(port,NULL,10); -+ long long ret = 0; -+ errno = 0; -+ ret = strtol(port,NULL,10); - if ((ret<0) || (ret>32767)) return -1; - if (errno) { - printf("port error\n"); diff --git a/tools/darwin/depends/afpfs-ng/11-fix-stat.patch b/tools/darwin/depends/afpfs-ng/11-fix-stat.patch deleted file mode 100644 index 09e9a35231e65..0000000000000 --- a/tools/darwin/depends/afpfs-ng/11-fix-stat.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- afpfs-ng-0.8.1/lib/lowlevel.c 2011-10-01 20:36:55.000000000 +0200 -+++ afpfs-ng-0.8.1/lib/lowlevel.c 2011-10-01 20:46:00.000000000 +0200 -@@ -579,7 +579,7 @@ - return -EIO; - } - -- if (volume->server->using_version->av_number>=30) -+ if (volume->server->using_version->av_number>=30 && fp.unixprivs.permissions != 0) - stbuf->st_mode |= fp.unixprivs.permissions; - else - set_nonunix_perms(&stbuf->st_mode,&fp); diff --git a/tools/darwin/depends/afpfs-ng/12-fix-even-more-pointers.patch b/tools/darwin/depends/afpfs-ng/12-fix-even-more-pointers.patch deleted file mode 100644 index b5926bceeda39..0000000000000 --- a/tools/darwin/depends/afpfs-ng/12-fix-even-more-pointers.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff -uPr afpfs-ng-0.8.1/include/afpfs-ng/afp.h afpfs-ng-0.8.1/include/afpfs-ng/afp.h ---- afpfs-ng-0.8.1/include/afpfs-ng/afp.h 2012-10-30 22:30:29.000000000 +0100 -+++ afpfs-ng-0.8.1/include/afpfs-ng/afp.h 2012-10-30 22:26:15.000000000 +0100 -@@ -71,7 +71,7 @@ - struct afp_file_info * largelist_next; - unsigned char isdir; - unsigned long long size; -- unsigned short resourcesize; -+ unsigned long long resourcesize; - unsigned int resource; - unsigned short forkid; - struct afp_icon * icon; ---- afpfs-ng-0.8.1/lib/loop.c 2012-10-30 22:48:19.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/loop.c 2012-10-30 22:48:47.000000000 +0100 -@@ -87,12 +87,13 @@ - static int ending=0; - void * just_end_it_now(void * ignore) - { -- if (ending) return; -+ if (ending) return NULL; - ending=1; - if (libafpclient->forced_ending_hook) - libafpclient->forced_ending_hook(); - exit_program=2; - signal_main_thread(); -+ return NULL; - } - - /*This is a hack to handle a problem where the first pthread_kill doesnt' work*/ -diff -uPr afpfs-ng-0.8.1/lib/dsi.c afpfs-ng-0.8.1/lib/dsi.c ---- afpfs-ng-0.8.1/lib/dsi.c 2012-10-30 22:30:29.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/dsi.c 2012-10-30 22:11:09.000000000 +0100 -@@ -478,7 +478,7 @@ - } - server->flags=ntohs(reply1->flags); - -- p=(void *)((unsigned int) server->incoming_buffer + sizeof(*reply1)); -+ p=(void *)((unsigned long) server->incoming_buffer + sizeof(*reply1)); - p+=copy_from_pascal(server->server_name,p,AFP_SERVER_NAME_LEN)+1; - - /* Now work our way through the variable bits */ -@@ -762,7 +762,7 @@ - printf("<<< read() of rest of AFP, %d bytes\n",amount_to_read); - #endif - ret = read(server->fd, (void *) -- (((unsigned int) server->incoming_buffer)+server->data_read), -+ (((unsigned long) server->incoming_buffer)+server->data_read), - amount_to_read); - if (ret<0) return -1; - if (ret==0) { -diff -uPr afpfs-ng-0.8.1/lib/lowlevel.c afpfs-ng-0.8.1/lib/lowlevel.c ---- afpfs-ng-0.8.1/lib/lowlevel.c 2012-10-30 22:30:29.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/lowlevel.c 2012-10-30 22:29:57.000000000 +0100 -@@ -582,7 +582,7 @@ - if (volume->server->using_version->av_number>=30 && fp.unixprivs.permissions != 0) - stbuf->st_mode |= fp.unixprivs.permissions; - else -- set_nonunix_perms(&stbuf->st_mode,&fp); -+ set_nonunix_perms((mode_t *)&stbuf->st_mode,&fp); - - stbuf->st_uid=fp.unixprivs.uid; - stbuf->st_gid=fp.unixprivs.gid; -diff -uPr afpfs-ng-0.8.1/lib/proto_directory.c afpfs-ng-0.8.1/lib/proto_directory.c ---- afpfs-ng-0.8.1/lib/proto_directory.c 2012-10-30 22:30:29.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_directory.c 2012-10-30 22:15:28.000000000 +0100 -@@ -259,7 +259,7 @@ - uint16_t reqcount; - } __attribute__((__packed__)) * reply = (void *) buf; - -- struct { -+ struct sEntry{ - uint16_t size; - uint8_t isdir; - uint8_t pad; -@@ -293,7 +293,7 @@ - filecur=new_file; - } - -- entry = p; -+ entry = (struct sEntry *)p; - - parse_reply_block(server,p+sizeof(*entry), - ntohs(entry->size),entry->isdir, diff --git a/tools/darwin/depends/afpfs-ng/Makefile b/tools/darwin/depends/afpfs-ng/Makefile deleted file mode 100644 index a6de49dc03ff8..0000000000000 --- a/tools/darwin/depends/afpfs-ng/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=afpfs-ng -VERSION=0.8.1 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.bz2 - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-fuse ac_cv_func_malloc_0_nonnull=yes - -LIBDYLIB=$(SOURCE)/lib/.libs/libafpclient.dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p1 <../fix_afpfs-ng_includes.patch - cd $(SOURCE); patch -p1 <../01-gcrypt.patch - cd $(SOURCE); patch -p1 <../02-pointer.patch - cd $(SOURCE); patch -p1 <../04-boxee1.patch - cd $(SOURCE); patch -p1 <../05-boxee2.patch - cd $(SOURCE); patch -p1 <../06-boxee3.patch - cd $(SOURCE); patch -p1 <../07-boxee4.patch - cd $(SOURCE); patch -p1 <../08-boxee5.patch - cd $(SOURCE); patch -p1 <../10-fix-errno.patch - cd $(SOURCE); patch -p1 <../11-fix-stat.patch - cd $(SOURCE); patch -p1 <../12-fix-even-more-pointers.patch - sed -ie 's|SUBDIRS = lib cmdline include docs|SUBDIRS = lib include|' $(SOURCE)/Makefile.am - cd $(SOURCE); autoreconf -vif - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/afpfs-ng/fix_afpfs-ng_includes.patch b/tools/darwin/depends/afpfs-ng/fix_afpfs-ng_includes.patch deleted file mode 100644 index f507a485ef869..0000000000000 --- a/tools/darwin/depends/afpfs-ng/fix_afpfs-ng_includes.patch +++ /dev/null @@ -1,3082 +0,0 @@ -diff -Naur afpfs-ng-0.8.1/cmdline/cmdline_afp.c afpfs-ng-0.8.1.patch/cmdline/cmdline_afp.c ---- afpfs-ng-0.8.1/cmdline/cmdline_afp.c 2008-02-19 02:54:19.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/cmdline/cmdline_afp.c 2011-09-10 12:13:50.102124369 +0200 -@@ -3,9 +3,9 @@ - - */ - --#include "afp.h" --#include "midlevel.h" --#include "map_def.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/midlevel.h" -+#include "afpfs-ng/map_def.h" - - #include - #include -diff -Naur afpfs-ng-0.8.1/cmdline/cmdline_testafp.c afpfs-ng-0.8.1.patch/cmdline/cmdline_testafp.c ---- afpfs-ng-0.8.1/cmdline/cmdline_testafp.c 2008-03-04 21:16:50.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/cmdline/cmdline_testafp.c 2011-09-10 12:13:50.102124369 +0200 -@@ -3,8 +3,8 @@ - - */ - --#include "afp.h" --#include "midlevel.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/midlevel.h" - - #include "cmdline_main.h" - -diff -Naur afpfs-ng-0.8.1/cmdline/getstatus.c afpfs-ng-0.8.1.patch/cmdline/getstatus.c ---- afpfs-ng-0.8.1/cmdline/getstatus.c 2008-02-18 04:28:09.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/cmdline/getstatus.c 2011-09-10 12:13:50.109124463 +0200 -@@ -2,7 +2,7 @@ - #include - #include - --#include "afp.h" -+#include "afpfs-ng/afp.h" - - static int getstatus(char * address_string, unsigned int port) - { -diff -Naur afpfs-ng-0.8.1/configure.ac afpfs-ng-0.8.1.patch/configure.ac ---- afpfs-ng-0.8.1/configure.ac 2008-03-08 17:23:12.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/configure.ac 2011-09-10 12:13:50.109124463 +0200 -@@ -11,6 +11,7 @@ - AC_PROG_CC - AC_PROG_INSTALL - AC_PROG_LIBTOOL -+AM_PROG_CC_C_O - - # Checks for libraries. - # FIXME: Replace `main' with a function in `-lncurses': -@@ -105,7 +106,7 @@ - - - --AC_CONFIG_FILES([lib/Makefile fuse/Makefile cmdline/Makefile Makefile docs/Makefile]) -+AC_CONFIG_FILES([lib/Makefile fuse/Makefile cmdline/Makefile Makefile include/Makefile include/afpfs-ng/Makefile docs/Makefile]) - - AC_OUTPUT - -diff -Naur afpfs-ng-0.8.1/fuse/client.c afpfs-ng-0.8.1.patch/fuse/client.c ---- afpfs-ng-0.8.1/fuse/client.c 2008-03-08 03:44:16.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/fuse/client.c 2011-09-10 12:13:50.110124477 +0200 -@@ -12,11 +12,11 @@ - #include - - #include "config.h" --#include -+#include - #include "afp_server.h" --#include "uams_def.h" --#include "map_def.h" --#include "libafpclient.h" -+#include "afpfs-ng/uams_def.h" -+#include "afpfs-ng/map_def.h" -+#include "afpfs-ng/libafpclient.h" - - #define default_uam "Cleartxt Passwrd" - -diff -Naur afpfs-ng-0.8.1/fuse/commands.c afpfs-ng-0.8.1.patch/fuse/commands.c ---- afpfs-ng-0.8.1/fuse/commands.c 2008-03-08 17:06:25.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/fuse/commands.c 2011-09-10 12:13:50.110124477 +0200 -@@ -19,15 +19,15 @@ - #include - #include - --#include "afp.h" --#include "dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/dsi.h" - #include "afp_server.h" --#include "utils.h" -+#include "afpfs-ng/utils.h" - #include "daemon.h" --#include "uams_def.h" --#include "codepage.h" --#include "libafpclient.h" --#include "map_def.h" -+#include "afpfs-ng/uams_def.h" -+#include "afpfs-ng/codepage.h" -+#include "afpfs-ng/libafpclient.h" -+#include "afpfs-ng/map_def.h" - #include "fuse_int.h" - #include "fuse_error.h" - #include "fuse_internal.h" -diff -Naur afpfs-ng-0.8.1/fuse/daemon.c afpfs-ng-0.8.1.patch/fuse/daemon.c ---- afpfs-ng-0.8.1/fuse/daemon.c 2008-03-04 18:26:05.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/fuse/daemon.c 2011-09-10 12:13:50.110124477 +0200 -@@ -23,11 +23,11 @@ - #include - #include - --#include "afp.h" -+#include "afpfs-ng/afp.h" - --#include "dsi.h" -+#include "afpfs-ng/dsi.h" - #include "afp_server.h" --#include "utils.h" -+#include "afpfs-ng/utils.h" - #include "daemon.h" - #include "commands.h" - -diff -Naur afpfs-ng-0.8.1/fuse/fuse_error.c afpfs-ng-0.8.1.patch/fuse/fuse_error.c ---- afpfs-ng-0.8.1/fuse/fuse_error.c 2008-01-18 05:40:10.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/fuse/fuse_error.c 2011-09-10 12:13:50.111124491 +0200 -@@ -4,7 +4,7 @@ - #include - #include - #include --#include "libafpclient.h" -+#include "afpfs-ng/libafpclient.h" - #include "fuse_internal.h" - - #define TMP_FILE "/tmp/fuse_stderr" -diff -Naur afpfs-ng-0.8.1/fuse/fuse_int.c afpfs-ng-0.8.1.patch/fuse/fuse_int.c ---- afpfs-ng-0.8.1/fuse/fuse_int.c 2008-03-02 06:06:24.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/fuse/fuse_int.c 2011-09-10 12:13:50.111124491 +0200 -@@ -18,7 +18,7 @@ - #define FUSE_USE_VERSION 25 - - --#include "afp.h" -+#include "afpfs-ng/afp.h" - - #include - #include -@@ -39,10 +39,10 @@ - #include - #include - --#include "dsi.h" --#include "afp_protocol.h" --#include "codepage.h" --#include "midlevel.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp_protocol.h" -+#include "afpfs-ng/codepage.h" -+#include "afpfs-ng/midlevel.h" - #include "fuse_error.h" - - /* Uncomment the following line to enable full debugging: */ -diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/afp.h afpfs-ng-0.8.1.patch/include/afpfs-ng/afp.h ---- afpfs-ng-0.8.1/include/afpfs-ng/afp.h 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afpfs-ng/afp.h 2011-09-10 12:13:50.112124505 +0200 -@@ -0,0 +1,533 @@ -+ -+#ifndef _AFP_H_ -+#define _AFP_H_ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+ -+#define AFPFS_VERSION "0.8.1" -+ -+/* This is the maximum AFP version this library supports */ -+#define AFP_MAX_SUPPORTED_VERSION 32 -+ -+/* afp_url is used to pass locations around */ -+struct afp_url { -+ enum {TCPIP,AT} protocol; -+ char username[AFP_MAX_USERNAME_LEN]; -+ char uamname[50]; -+ char password[AFP_MAX_PASSWORD_LEN]; -+ char servername[AFP_SERVER_NAME_UTF8_LEN]; -+ int port; -+ char volumename[AFP_VOLUME_NAME_UTF8_LEN]; -+ char path[AFP_MAX_PATH]; -+ -+ int requested_version; -+ char zone[AFP_ZONE_LEN]; /* Only used for Appletalk */ -+ char volpassword[9];; -+}; -+ -+struct afp_token { -+ unsigned int length; -+ char data[AFP_TOKEN_MAX_LEN]; -+}; -+ -+#define SERVER_MAX_VERSIONS 10 -+#define SERVER_MAX_UAMS 10 -+ -+struct afp_rx_buffer { -+ unsigned int size; -+ unsigned int maxsize; -+ char * data; -+ int errorcode; -+}; -+ -+ -+struct afp_file_info { -+ unsigned short attributes; -+ unsigned int did; -+ unsigned int creation_date; -+ unsigned int modification_date; -+ unsigned int backup_date; -+ unsigned int fileid; -+ unsigned short offspring; -+ char sync; -+ char finderinfo[32]; -+ char name[AFP_MAX_PATH]; -+ char basename[AFP_MAX_PATH]; -+ char translated_name[AFP_MAX_PATH]; -+ struct afp_unixprivs unixprivs; -+ unsigned int accessrights; -+ struct afp_file_info * next; -+ struct afp_file_info * largelist_next; -+ unsigned char isdir; -+ unsigned long long size; -+ unsigned short resourcesize; -+ unsigned int resource; -+ unsigned short forkid; -+ struct afp_icon * icon; -+ int eof; -+}; -+ -+ -+#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_KNOWN 0x1 -+#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_BROKEN 0x2 -+#define VOLUME_EXTRA_FLAGS_SHOW_APPLEDOUBLE 0x4 -+#define VOLUME_EXTRA_FLAGS_VOL_SUPPORTS_UNIX 0x8 -+#define VOLUME_EXTRA_FLAGS_NO_LOCKING 0x10 -+#define VOLUME_EXTRA_FLAGS_IGNORE_UNIXPRIVS 0x20 -+#define VOLUME_EXTRA_FLAGS_READONLY 0x40 -+ -+#define AFP_VOLUME_UNMOUNTED 0 -+#define AFP_VOLUME_MOUNTED 1 -+#define AFP_VOLUME_UNMOUNTING 2 -+ -+struct afp_volume { -+ unsigned short volid; -+ char flags; /* This is from afpGetSrvrParms */ -+ unsigned short attributes; /* This is from VolOpen */ -+ unsigned short signature; /* This is fixed or variable */ -+ unsigned int creation_date; -+ unsigned int modification_date; -+ unsigned int backup_date; -+ struct statvfs stat; -+ unsigned char mounted; -+ char mountpoint[255]; -+ struct afp_server * server; -+ char volume_name[AFP_VOLUME_NAME_LEN]; -+ char volume_name_printable[AFP_VOLUME_NAME_UTF8_LEN]; -+ unsigned short dtrefnum; -+ char volpassword[AFP_VOLPASS_LEN]; -+ unsigned int extra_flags; /* This is an afpfs-ng specific field */ -+ -+ /* Our directory ID cache */ -+ struct did_cache_entry * did_cache_base; -+ pthread_mutex_t did_cache_mutex; -+ -+ /* Our journal of open forks */ -+ struct afp_file_info * open_forks; -+ pthread_mutex_t open_forks_mutex; -+ -+ /* Used to trigger startup */ -+ pthread_cond_t startup_condition_cond; -+ -+ struct { -+ uint64_t hits; -+ uint64_t misses; -+ uint64_t expired; -+ uint64_t force_removed; -+ } did_cache_stats; -+ -+ void * priv; /* This is a private structure for fuse/cmdline, etc */ -+ pthread_t thread; /* This is the per-volume thread */ -+ -+ int mapping; -+ -+}; -+ -+#define SERVER_STATE_CONNECTED 1 -+#define SERVER_STATE_DISCONNECTED 2 -+ -+enum server_type{ -+ AFPFS_SERVER_TYPE_UNKNOWN, -+ AFPFS_SERVER_TYPE_NETATALK, -+ AFPFS_SERVER_TYPE_AIRPORT, -+ AFPFS_SERVER_TYPE_MACINTOSH, -+}; -+ -+#define is_netatalk(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_NETATALK ) -+#define is_airport(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_AIRPORT ) -+#define is_macintosh(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_MACINTOSH ) -+ -+ -+ -+struct afp_versions { -+ char *av_name; -+ int av_number; -+}; -+extern struct afp_versions afp_versions[]; -+ -+struct afp_server { -+ -+ /* Our buffer sizes */ -+ unsigned int tx_quantum; -+ unsigned int rx_quantum; -+ -+ unsigned int tx_delay; -+ -+ /* Connection information */ -+ struct sockaddr_in address; -+ int fd; -+ -+ /* Some stats, for information only */ -+ struct { -+ uint64_t runt_packets; -+ uint64_t incoming_dsi; -+ uint64_t rx_bytes; -+ uint64_t tx_bytes; -+ uint64_t requests_pending; -+ } stats; -+ -+ /* General information */ -+ char server_name[AFP_SERVER_NAME_LEN]; -+ char server_name_utf8[AFP_SERVER_NAME_UTF8_LEN]; -+ char server_name_printable[AFP_SERVER_NAME_UTF8_LEN]; -+ -+ char machine_type[17]; -+ char icon[256]; -+ char signature[16]; -+ unsigned short flags; -+ int connect_state; -+ enum server_type server_type; -+ -+ /* This is the time we connected */ -+ time_t connect_time; -+ -+ /* UAMs */ -+ unsigned int supported_uams; -+ unsigned int using_uam; -+ -+ /* Authentication */ -+ char username[AFP_MAX_USERNAME_LEN]; -+ char password[AFP_MAX_PASSWORD_LEN]; -+ -+ /* Session */ -+ struct afp_token token; -+ char need_resume; -+ -+ /* Versions */ -+ unsigned char requested_version; -+ unsigned char versions[SERVER_MAX_VERSIONS]; -+ struct afp_versions *using_version; -+ -+ /* Volumes */ -+ unsigned char num_volumes; -+ struct afp_volume * volumes; -+ -+ void * dsi; -+ unsigned int exit_flag; -+ -+ /* Our DSI request queue */ -+ pthread_mutex_t requestid_mutex; -+ pthread_mutex_t request_queue_mutex; -+ unsigned short lastrequestid; -+ unsigned short expectedrequestid; -+ struct dsi_request * command_requests; -+ -+ -+ char loginmesg[200]; -+ char servermesg[200]; -+ char path_encoding; -+ -+ /* This is the data for the incoming buffer */ -+ char * incoming_buffer; -+ int data_read; -+ int bufsize; -+ -+ /* And this is for the outgoing queue */ -+ pthread_mutex_t send_mutex; -+ -+ /* This is for user mapping */ -+ struct passwd passwd; -+ unsigned int server_uid, server_gid; -+ int server_gid_valid; -+ -+ struct afp_server *next; -+ -+ /* These are for DSI attention packets */ -+ unsigned int attention_quantum; -+ unsigned int attention_len; -+ char * attention_buffer; -+ -+}; -+ -+struct afp_extattr_info { -+ unsigned int maxsize; -+ unsigned int size; -+ char data[1024]; -+}; -+struct afp_comment { -+ unsigned int maxsize; -+ unsigned int size; -+ char *data; -+}; -+ -+struct afp_icon { -+ unsigned int maxsize; -+ unsigned int size; -+ char *data; -+}; -+ -+#define AFP_DEFAULT_ATTENTION_QUANTUM 1024 -+ -+void afp_unixpriv_to_stat(struct afp_file_info *fp, -+ struct stat *stat); -+ -+int init_uams(void) ; -+ -+unsigned int find_uam_by_name(const char * name); -+char * uam_bitmap_to_string(unsigned int bitmap); -+ -+ -+char * get_uam_names_list(void); -+ -+unsigned int default_uams_mask(void); -+ -+struct afp_volume * find_volume_by_name(struct afp_server * server, -+ const char * volname); -+ -+struct afp_connection_request { -+ unsigned int uam_mask; -+ struct afp_url url; -+}; -+ -+void afp_default_url(struct afp_url *url); -+int afp_parse_url(struct afp_url * url, const char * toparse, int verbose); -+void afp_print_url(struct afp_url * url); -+int afp_url_validate(char * url_string, struct afp_url * valid_url); -+ -+int afp_list_volnames(struct afp_server * server, char * names, int max); -+ -+/* User mapping */ -+int afp_detect_mapping(struct afp_volume * volume); -+ -+/* These are some functions that help with simple status text generation */ -+ -+int afp_status_header(char * text, int * len); -+int afp_status_server(struct afp_server * s,char * text, int * len); -+ -+ -+struct afp_server * afp_server_full_connect(void * priv, struct afp_connection_request * req); -+ -+void * just_end_it_now(void *other); -+void add_fd_and_signal(int fd); -+void loop_disconnect(struct afp_server *s); -+void afp_wait_for_started_loop(void); -+ -+ -+struct afp_versions * pick_version(unsigned char *versions, -+ unsigned char requested) ; -+int pick_uam(unsigned int u1, unsigned int u2); -+ -+int afp_server_login(struct afp_server *server, -+ char * mesg, unsigned int *l, unsigned int max); -+ -+ -+int afp_dologin(struct afp_server *server, -+ unsigned int uam, char * username, char * passwd); -+ -+void afp_free_server(struct afp_server **server); -+ -+struct afp_server * afp_server_init(struct sockaddr_in * address); -+int afp_get_address(void * priv, const char * hostname, unsigned int port, -+ struct sockaddr_in * address); -+ -+ -+int afp_main_loop(int command_fd); -+int afp_main_quick_startup(pthread_t * thread); -+ -+int afp_server_destroy(struct afp_server *s) ; -+int afp_server_reconnect(struct afp_server * s, char * mesg, -+ unsigned int *l, unsigned int max); -+int afp_server_connect(struct afp_server *s, int full); -+ -+struct afp_server * afp_server_complete_connection( -+ void * priv, -+ struct afp_server * server, -+ struct sockaddr_in * address, unsigned char * versions, -+ unsigned int uams, char * username, char * password, -+ unsigned int requested_version, unsigned int uam_mask); -+ -+int afp_connect_volume(struct afp_volume * volume, struct afp_server * server, -+ char * mesg, unsigned int * l, unsigned int max); -+int something_is_mounted(struct afp_server * server); -+ -+int add_cache_entry(struct afp_file_info * file) ; -+struct afp_file_info * get_cache_by_name(char * name); -+struct afp_server * find_server_by_address(struct sockaddr_in * address); -+struct afp_server * find_server_by_signature(char * signature); -+struct afp_server * find_server_by_name(char * name); -+int server_still_valid(struct afp_server * server); -+ -+ -+struct afp_server * get_server_base(void); -+int afp_server_remove(struct afp_server * server); -+ -+int afp_unmount_volume(struct afp_volume * volume); -+int afp_unmount_all_volumes(struct afp_server * server); -+ -+#define volume_is_readonly(x) (((x)->attributes&kReadOnly) || \ -+ ((x)->extra_flags & VOLUME_EXTRA_FLAGS_READONLY)) -+ -+int afp_opendt(struct afp_volume *volume, unsigned short * refnum); -+ -+int afp_closedt(struct afp_server * server, unsigned short * refnum); -+ -+int afp_getcomment(struct afp_volume *volume, unsigned int did, -+ const char * pathname, struct afp_comment * comment); -+ -+int afp_addcomment(struct afp_volume *volume, unsigned int did, -+ const char * pathname, char * comment,uint64_t *size); -+ -+int afp_geticon(struct afp_volume * volume, unsigned int filecreator, -+ unsigned int filetype, unsigned char icontype, -+ unsigned short length, struct afp_icon * icon); -+ -+/* Things you want to do to a server */ -+ -+int afp_getsrvrmsg(struct afp_server *server, unsigned short messagetype,unsigned char utf8, unsigned char block, char * mesg); -+ -+int afp_login(struct afp_server *server, char * uaname, -+ char * userauthinfo, unsigned int userauthinfo_len, -+ struct afp_rx_buffer *rx); -+ -+int afp_changepassword(struct afp_server *server, char * uaname, -+ char * userauthinfo, unsigned int userauthinfo_len, -+ struct afp_rx_buffer *rx); -+ -+int afp_logincont(struct afp_server *server, unsigned short id, -+ char * userauthinfo, unsigned int userauthinfo_len, -+ struct afp_rx_buffer *rx); -+ -+int afp_getsessiontoken(struct afp_server * server, int type, -+ unsigned int timestamp, struct afp_token *outgoing_token, -+ struct afp_token * incoming_token); -+ -+int afp_getsrvrparms(struct afp_server *server); -+ -+int afp_logout(struct afp_server *server,unsigned char wait); -+ -+int afp_mapname(struct afp_server * server, unsigned char subfunction, -+ char * name, unsigned int * id); -+ -+int afp_mapid(struct afp_server * server, unsigned char subfunction, -+ unsigned int id, char *name); -+ -+int afp_getuserinfo(struct afp_server * server, int thisuser, -+ unsigned int userid, unsigned short bitmap, -+ unsigned int *newuid, unsigned int *newgid); -+ -+int afp_zzzzz(struct afp_server *server); -+ -+int afp_volopen(struct afp_volume * volume, -+ unsigned short bitmap, char * password); -+ -+int afp_flush(struct afp_volume * volume); -+ -+int afp_getfiledirparms(struct afp_volume *volume, unsigned int did, -+ unsigned int filebitmap, unsigned int dirbitmap, const char * pathname, -+ struct afp_file_info *fp); -+ -+int afp_enumerate(struct afp_volume * volume, -+ unsigned int dirid, -+ unsigned int filebitmap, unsigned int dirbitmap, -+ unsigned short reqcount, -+ unsigned short startindex, -+ char * path, -+ struct afp_file_info ** file_p); -+ -+int afp_enumerateext2(struct afp_volume * volume, -+ unsigned int dirid, -+ unsigned int filebitmap, unsigned int dirbitmap, -+ unsigned short reqcount, -+ unsigned long startindex, -+ char * path, -+ struct afp_file_info ** file_p); -+ -+int afp_openfork(struct afp_volume * volume, -+ unsigned char forktype, -+ unsigned int dirid, -+ unsigned short accessmode, -+ char * filename, -+ struct afp_file_info *fp); -+ -+int afp_read(struct afp_volume * volume, unsigned short forkid, -+ uint32_t offset, -+ uint32_t count, struct afp_rx_buffer * rx); -+ -+int afp_readext(struct afp_volume * volume, unsigned short forkid, -+ uint64_t offset, -+ uint64_t count, struct afp_rx_buffer * rx); -+ -+int afp_getvolparms(struct afp_volume * volume, unsigned short bitmap); -+ -+ -+int afp_createdir(struct afp_volume * volume, unsigned int dirid, const char * pathname, unsigned int *did_p); -+ -+int afp_delete(struct afp_volume * volume, -+ unsigned int dirid, char * pathname); -+ -+ -+int afp_createfile(struct afp_volume * volume, unsigned char flag, -+ unsigned int did, char * pathname); -+ -+int afp_write(struct afp_volume * volume, unsigned short forkid, -+ uint32_t offset, uint32_t reqcount, -+ char * data, uint32_t * written); -+ -+int afp_writeext(struct afp_volume * volume, unsigned short forkid, -+ uint64_t offset, uint64_t reqcount, -+ char * data, uint64_t * written); -+ -+int afp_flushfork(struct afp_volume * volume, unsigned short forkid); -+ -+int afp_closefork(struct afp_volume * volume, unsigned short forkid); -+int afp_setfileparms(struct afp_volume * volume, -+ unsigned int dirid, const char * pathname, unsigned short bitmap, -+ struct afp_file_info *fp); -+int afp_setfiledirparms(struct afp_volume * volume, -+ unsigned int dirid, const char * pathname, unsigned short bitmap, -+ struct afp_file_info *fp); -+ -+int afp_setdirparms(struct afp_volume * volume, -+ unsigned int dirid, const char * pathname, unsigned short bitmap, -+ struct afp_file_info *fp); -+ -+int afp_volclose(struct afp_volume * volume); -+ -+ -+int afp_setforkparms(struct afp_volume *volume, -+ unsigned short forkid, unsigned short bitmap, unsigned long len); -+ -+int afp_byterangelock(struct afp_volume * volume, -+ unsigned char flag, -+ unsigned short forkid, -+ uint32_t offset, -+ uint32_t len, uint32_t *generated_offset); -+ -+int afp_byterangelockext(struct afp_volume * volume, -+ unsigned char flag, -+ unsigned short forkid, -+ uint64_t offset, -+ uint64_t len, uint64_t *generated_offset); -+ -+int afp_moveandrename(struct afp_volume *volume, -+ unsigned int src_did, -+ unsigned int dst_did, -+ char * src_path, char * dst_path, char *new_name); -+ -+int afp_rename(struct afp_volume * volume, -+ unsigned int dirid, -+ char * path_from, char * path_to); -+ -+int afp_listextattr(struct afp_volume * volume, -+ unsigned int dirid, unsigned short bitmap, -+ char * pathname, struct afp_extattr_info * info); -+ -+/* This is a currently undocumented command */ -+int afp_newcommand76(struct afp_volume * volume, unsigned int dlen, char * data); -+ -+/* For debugging */ -+char * afp_get_command_name(char code); -+ -+ -+#endif -diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/afp_protocol.h afpfs-ng-0.8.1.patch/include/afpfs-ng/afp_protocol.h ---- afpfs-ng-0.8.1/include/afpfs-ng/afp_protocol.h 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afpfs-ng/afp_protocol.h 2011-09-10 12:13:50.112124505 +0200 -@@ -0,0 +1,361 @@ -+ -+#ifndef _AFP_PROTOCOL_H_ -+#define _AFP_PROTOCOL_H_ -+ -+#include -+#include -+#include -+#include -+ -+/* This file defines constants for the Apple File Protocol. -+ All page references are from "Apple Filing Protocol Programming" version 3.2. -+ except where noted. -+*/ -+ -+#define AFP_SERVER_NAME_LEN 33 -+#define AFP_SERVER_NAME_UTF8_LEN 255 -+#define AFP_VOLUME_NAME_LEN 33 -+#define AFP_VOLUME_NAME_UTF8_LEN 33 -+#define AFP_SIGNATURE_LEN 16 -+#define AFP_MACHINETYPE_LEN 33 -+#define AFP_LOGINMESG_LEN 200 -+#define AFP_VOLPASS_LEN 8 -+#define AFP_HOSTNAME_LEN 255 -+/* This is actually just a guess, and only used for appletalk */ -+#define AFP_ZONE_LEN 255 -+ -+#define AFP_SERVER_ICON_LEN 256 -+ -+ -+#define AFP_MAX_USERNAME_LEN 127 -+#define AFP_MAX_PASSWORD_LEN 127 -+ -+ -+/* This is the maximum length of any UAM string */ -+#define AFP_UAM_LENGTH 24 -+ -+/* This is the maximum length of any path description */ -+#define AFP_MAX_PATH 768 -+ -+#define AFP_VOL_FLAT 1 -+#define AFP_VOL_FIXED 2 -+#define AFP_VOL_VARIABLE 3 -+ -+/* The root directory ID, p.26 */ -+ -+#define AFP_ROOT_DID 2 -+ -+/* Path type constants, p.249 */ -+ -+enum { -+kFPShortName = 1, -+kFPLongName = 2, -+kFPUTF8Name = 3 -+}; -+ -+/* fork types */ -+ -+#define AFP_FORKTYPE_DATA 0x0 -+#define AFP_FORKTYPE_RESOURCE 0x80 -+ -+/* openfork access modes, from p.196 */ -+ -+#define AFP_OPENFORK_ALLOWREAD 1 -+#define AFP_OPENFORK_ALLOWWRITE 2 -+#define AFP_OPENFORK_DENYREAD 0x10 -+#define AFP_OPENFORK_DENYWRITE 0x20 -+ -+/* Message type for getsrvmesg, p. 169*/ -+ -+typedef enum { -+ AFPMESG_LOGIN = 0, -+ AFPMESG_SERVER = 1 -+} afpmessage_t; -+ -+/* Message bitmap for getsrvrmsg */ -+ -+#define AFP_GETSRVRMSG_UTF8 0x2 -+#define AFP_GETSRVRMSG_GETMSG 0x1 -+ -+ -+/* Maximum Version length, p.17 */ -+#define AFP_MAX_VERSION_LENGTH 16 -+ -+/* Maximum length of a token, this is undocumented */ -+#define AFP_TOKEN_MAX_LEN 256 -+ -+/* The maximum size of a file for AFP 2 */ -+#define AFP_MAX_AFP2_FILESIZE (4294967296) -+ -+/* Unix privs, p.240 */ -+ -+struct afp_unixprivs { -+ uint32_t uid __attribute__((__packed__)); -+ uint32_t gid __attribute__((__packed__)); -+ uint32_t permissions __attribute__((__packed__)); -+ uint32_t ua_permissions __attribute__((__packed__)); -+ -+}; -+ -+ -+/* AFP Volume attributes bitmap, p.241 */ -+ -+enum { -+ kReadOnly = 0x01, -+ kHasVolumePassword = 0x02, -+ kSupportsFileIDs = 0x04, -+ kSupportsCatSearch = 0x08, -+ kSupportsBlankAccessPrivs = 0x10, -+ kSupportsUnixPrivs = 0x20, -+ kSupportsUTF8Names = 0x40, -+ kNoNetworkUserIDs = 0x80, -+ kDefaultPrivsFromParent = 0x100, -+ kNoExchangeFiles = 0x200, -+ kSupportsExtAttrs = 0x400, -+ kSupportsACLs=0x800 -+}; -+ -+/* AFP file creation constantes, p.250 */ -+enum { -+kFPSoftCreate = 0, -+kFPHardCreate = 0x80 -+}; -+ -+/* AFP Directory attributes, taken from the protocol guide p.236 */ -+ -+enum { -+ kFPAttributeBit = 0x1, -+ kFPParentDirIDBit = 0x2, -+ kFPCreateDateBit = 0x4, -+ kFPModDateBit = 0x8, -+ kFPBackupDateBit = 0x10, -+ kFPFinderInfoBit = 0x20, -+ kFPLongNameBit = 0x40, -+ kFPShortNameBit = 0x80, -+ kFPNodeIDBit = 0x100, -+ kFPOffspringCountBit = 0x0200, -+ kFPOwnerIDBit = 0x0400, -+ kFPGroupIDBit = 0x0800, -+ kFPAccessRightsBit = 0x1000, -+ kFPProDOSInfoBit = 0x2000, // AFP version 2.2 and earlier -+ kFPUTF8NameBit = 0x2000, // AFP version 3.0 and later -+ kFPUnixPrivsBit = 0x8000 // AFP version 3.0 and later -+}; -+ -+/* AFP File bitmap, p.238. These are the ones not in the AFP Directory -+ attributes map. */ -+ -+enum { -+ kFPDataForkLenBit = 0x0200, -+ kFPRsrcForkLenBit = 0x0400, -+ kFPExtDataForkLenBit = 0x0800, // AFP version 3.0 and later -+ kFPLaunchLimitBit = 0x1000, -+ kFPExtRsrcForkLenBit = 0x4000, // AFP version 3.0 and later -+}; -+ -+/* AFP Extended Attributes Bitmap, p.238 */ -+ -+enum { -+ kXAttrNoFollow = 0x1, -+ kXAttrCreate = 0x2, -+ kXAttrREplace=0x4 -+}; -+ -+ -+/* AFP function codes */ -+enum AFPFunction -+{ -+ afpByteRangeLock = 1, afpCloseVol, afpCloseDir, afpCloseFork, -+ afpCopyFile, afpCreateDir, afpCreateFile, -+ afpDelete, afpEnumerate, afpFlush, afpFlushFork, -+ afpGetForkParms = 14, afpGetSrvrInfo, afpGetSrvrParms, -+ afpGetVolParms, afpLogin, afpLoginCont, afpLogout, afpMapID, -+ afpMapName, afpMoveAndRename, afpOpenVol, afpOpenDir, afpOpenFork, -+ afpRead, afpRename, afpSetDirParms, afpSetFileParms, -+ afpSetForkParms, afpSetVolParms, afpWrite, afpGetFileDirParms, -+ afpSetFileDirParms, afpChangePassword, -+ afpGetUserInfo=37,afpGetSrvrMsg = 38, -+ afpOpenDT=48, -+ afpCloseDT=49, -+ afpGetIcon=51, afpGetIconInfo=52, -+ afpAddComment=56, afpRemoveComment=57, afpGetComment=58, -+ afpByteRangeLockExt=59, afpReadExt, afpWriteExt, -+ afpGetAuthMethods=62, -+ afp_LoginExt=63, -+ afpGetSessionToken=64, -+ afpDisconnectOldSession=65, -+ afpEnumerateExt=66, -+ afpCatSearchExt = 67, -+ afpEnumerateExt2 = 68, afpGetExtAttr, afpSetExtAttr, -+ afpRemoveExtAttr , afpListExtAttrs, -+ afpZzzzz = 122, -+ afpAddIcon=192, -+}; -+ -+/* AFP Volume bitmap. Take from 242 of the protocol guide. */ -+enum { -+ kFPBadVolPre222Bitmap = 0xFe00, -+ kFPBadVolBitmap = 0xF000, -+ kFPVolAttributeBit = 0x1, -+ kFPVolSignatureBit = 0x2, -+ kFPVolCreateDateBit = 0x4, -+ kFPVolModDateBit = 0x8, -+ kFPVolBackupDateBit = 0x10, -+ kFPVolIDBit = 0x20, -+ kFPVolBytesFreeBit = 0x40, -+ kFPVolBytesTotalBit = 0x80, -+ kFPVolNameBit = 0x100, -+ kFPVolExtBytesFreeBit = 0x200, -+ kFPVolExtBytesTotalBit = 0x400, -+ kFPVolBlockSizeBit = 0x800 -+}; -+ -+/* AFP Attention Codes -- 4 bits */ -+#define AFPATTN_SHUTDOWN (1 << 15) /* shutdown/disconnect */ -+#define AFPATTN_CRASH (1 << 14) /* server crashed */ -+#define AFPATTN_MESG (1 << 13) /* server has message */ -+#define AFPATTN_NORECONNECT (1 << 12) /* don't reconnect */ -+/* server notification */ -+#define AFPATTN_NOTIFY (AFPATTN_MESG | AFPATTN_NORECONNECT) -+ -+/* extended bitmap -- 12 bits. volchanged is only useful w/ a server -+ * notification, and time is only useful for shutdown. */ -+#define AFPATTN_VOLCHANGED (1 << 0) /* volume has changed */ -+#define AFPATTN_TIME(x) ((x) & 0xfff) /* time in minutes */ -+ -+#define kFPNoErr 0 -+ -+/* AFP result codes, p252 */ -+#define kASPSessClosed -1072 -+#define kFPAccessDenied -5000 -+#define kFPAuthContinue -5001 -+#define kFPBadUAM -5002 -+#define kFPBadVersNum -5003 -+#define kFPBitmapErr -5004 -+#define kFPCantMove -5005 -+#define kFPDenyConflict -5006 -+#define kFPDirNotEmpty -5007 -+#define kFPDiskFull -5008 -+#define kFPEOFErr -5009 -+#define kFPFileBusy -5010 -+#define kFPFlatVol -5011 -+#define kFPItemNotFound -5012 -+#define kFPLockErr -5013 -+#define kFPMiscErr -5014 -+#define kFPNoMoreLocks -5015 -+#define kFPNoServer -5016 -+#define kFPObjectExists -5017 -+#define kFPObjectNotFound -5018 -+#define kFPParamErr -5019 -+#define kFPRangeNotLocked -5020 -+#define kFPRangeOverlap -5021 -+#define kFPSessClosed -5022 -+#define kFPUserNotAuth -5023 -+#define kFPCallNotSupported -5024 -+#define kFPObjectTypeErr -5025 -+#define kFPTooManyFilesOpen -5026 -+#define kFPServerGoingDown -5027 -+#define kFPCantRename -5028 -+#define kFPDirNotFound -5029 -+#define kFPIconTypeError -5030 -+#define kFPVolLocked -5031 -+#define kFPObjectLocked -5032 -+#define kFPContainsSharedErr -5033 -+#define kFPIDNotFound -5034 -+#define kFPIDExists -5035 -+#define kFPDiffVolErr -5036 -+#define kFPCatalogChanged -5037 -+#define kFPSameObjectErr -5038 -+#define kFPBadIDErr -5039 -+#define kFPPwdSameErr -5040 -+#define kFPPwdTooShortErr -5041 -+#define kFPPwdExpiredErr -5042 -+#define kFPInsideSharedErr -5043 -+#define kFPInsideTrashErr -5044 -+#define kFPPwdNeedsChangeErr -5045 -+#define kFPPwdPolicyErr -5046 -+#define kFPDiskQuotaExceeded –5047 -+ -+ -+ -+/* These flags determine to lock or unlock in ByteRangeLock(Ext) */ -+ -+enum { -+ByteRangeLock_Lock = 0, -+ByteRangeLock_Unlock = 1 -+}; -+ -+/* These flags are used in volopen and getsrvrparm replies, p.171 */ -+ -+#define HasConfigInfo 0x1 -+#define HasPassword 0x80 -+ -+/* These are the subfunction for kFPMapID, as per p.248 */ -+ -+enum { -+kUserIDToName = 1, -+kGroupIDToName = 2, -+kUserIDToUTF8Name = 3, -+kGroupIDToUTF8Name = 4, -+kUserUUIDToUTF8Name = 5, -+kGroupUUIDToUTF8Name = 6 -+}; -+ -+ -+/* These are the subfunction flags described in the FPMapName command, p.286. -+ Note that this is different than what's described on p. 186. */ -+ -+enum { -+kNameToUserID = 1, -+kNameToGroupID = 2, -+kUTF8NameToUserID = 3, -+kUTF8NameToGroupID = 4, -+kUTF8NameToUserUUID = 5, -+kUTF8NameToGroupUUID = 6 -+}; -+ -+/* These are bits for FPGetUserInfo, p.173. */ -+#define kFPGetUserInfo_USER_ID 1 -+#define kFPGetUserInfo_PRI_GROUPID 2 -+ -+/* Flags for the replies of GetSrvrInfo and DSI GetStatus, p.240 */ -+ -+enum { -+ kSupportsCopyfile = 0x01, -+ kSupportsChgPwd = 0x02, -+ kDontAllowSavePwd = 0x04, -+ kSupportsSrvrMsg = 0x08, -+ kSrvrSig = 0x10, -+ kSupportsTCP = 0x20, -+ kSupportsSrvrNotify = 0x40, -+ kSupportsReconnect = 0x80, -+ kSupportsDirServices = 0x100, -+ kSupportsUTF8SrvrName = 0x200, -+ kSupportsUUIDs = 0x400, -+ kSupportsSuperClient = 0x8000 -+}; -+ -+ -+/* p.247 */ -+ -+enum { -+ kLoginWithoutID = 0, -+ kLoginWithID = 1, -+ kReconnWithID = 2, -+ kLoginWithTimeAndID = 3, -+ kReconnWithTimeAndID = 4, -+ kRecon1Login = 5, -+ kRecon1ReconnectLogin = 6, -+ kRecon1Refresh = 7, kGetKerberosSessionKey = 8 -+}; -+ -+ -+#define AFP_CHMOD_ALLOWED_BITS_22 \ -+ (S_IRUSR |S_IWUSR | S_IRGRP | S_IWGRP |S_IROTH | S_IWOTH | S_IFREG ) -+ -+ -+#endif -+ -+ -+ -+ -diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/codepage.h afpfs-ng-0.8.1.patch/include/afpfs-ng/codepage.h ---- afpfs-ng-0.8.1/include/afpfs-ng/codepage.h 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afpfs-ng/codepage.h 2011-09-10 12:13:50.113124518 +0200 -@@ -0,0 +1,11 @@ -+#ifndef __CODE_PAGE_H_ -+#define __CODE_PAGE_H_ -+int convert_utf8dec_to_utf8pre(const char *src, int src_len, -+ char * dest, int dest_len); -+int convert_utf8pre_to_utf8dec(const char * src, int src_len, -+ char * dest, int dest_len); -+int convert_path_to_unix(char encoding, char * dest, -+ char * src, int dest_len); -+int convert_path_to_afp(char encoding, char * dest, -+ char * src, int dest_len); -+#endif -diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/dsi.h afpfs-ng-0.8.1.patch/include/afpfs-ng/dsi.h ---- afpfs-ng-0.8.1/include/afpfs-ng/dsi.h 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afpfs-ng/dsi.h 2011-09-10 12:13:50.115124544 +0200 -@@ -0,0 +1,33 @@ -+ -+#ifndef __DSI_H_ -+#define __DSI_H_ -+ -+#include "afpfs-ng/afp.h" -+ -+struct dsi_request -+{ -+ unsigned short requestid; -+ unsigned char subcommand; -+ void * other; -+ unsigned char wait; -+ pthread_cond_t condition_cond; -+ struct dsi_request * next; -+ int return_code; -+}; -+ -+int dsi_receive(struct afp_server * server, void * data, int size); -+int dsi_getstatus(struct afp_server * server); -+ -+int dsi_opensession(struct afp_server *server); -+ -+int dsi_send(struct afp_server *server, char * msg, int size,int wait,unsigned char subcommand, void ** other); -+struct dsi_session * dsi_create(struct afp_server *server); -+int dsi_restart(struct afp_server *server); -+int dsi_recv(struct afp_server * server); -+ -+#define DSI_BLOCK_TIMEOUT -1 -+#define DSI_DONT_WAIT 0 -+#define DSI_DEFAULT_TIMEOUT 5 -+ -+ -+#endif -diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/libafpclient.h afpfs-ng-0.8.1.patch/include/afpfs-ng/libafpclient.h ---- afpfs-ng-0.8.1/include/afpfs-ng/libafpclient.h 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afpfs-ng/libafpclient.h 2011-09-10 12:13:50.115124544 +0200 -@@ -0,0 +1,50 @@ -+ -+#ifndef __CLIENT_H_ -+#define __CLIENT_H_ -+ -+#include -+#include -+ -+#define MAX_CLIENT_RESPONSE 2048 -+ -+ -+enum loglevels { -+ AFPFSD, -+}; -+ -+struct afp_server; -+struct afp_volume; -+ -+struct libafpclient { -+ int (*unmount_volume) (struct afp_volume * volume); -+ void (*log_for_client)(void * priv, -+ enum loglevels loglevel, int logtype, const char *message); -+ void (*forced_ending_hook)(void); -+ int (*scan_extra_fds)(int command_fd,fd_set *set, int * max_fd); -+ void (*loop_started)(void); -+} ; -+ -+extern struct libafpclient * libafpclient; -+ -+void libafpclient_register(struct libafpclient * tmpclient); -+ -+ -+void signal_main_thread(void); -+ -+/* These are logging functions */ -+ -+#define MAXLOGSIZE 2048 -+ -+#define LOG_METHOD_SYSLOG 1 -+#define LOG_METHOD_STDOUT 2 -+ -+void set_log_method(int m); -+ -+ -+void log_for_client(void * priv, -+ enum loglevels loglevel, int logtype, char * message,...); -+ -+void stdout_log_for_client(void * priv, -+ enum loglevels loglevel, int logtype, const char *message); -+ -+#endif -diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/Makefile.am afpfs-ng-0.8.1.patch/include/afpfs-ng/Makefile.am ---- afpfs-ng-0.8.1/include/afpfs-ng/Makefile.am 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afpfs-ng/Makefile.am 2011-09-10 12:13:50.115124544 +0200 -@@ -0,0 +1,6 @@ -+## Process this file with automake to produce Makefile.in -+ -+afpfsincludedir = $(includedir)/afpfs-ng -+ -+afpfsinclude_HEADERS = afp.h afp_protocol.h libafpclient.h -+nodist_afpfsinclude_HEADERS = codepage.h dsi.h map_def.h midlevel.h uams_def.h utils.h -diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/map_def.h afpfs-ng-0.8.1.patch/include/afpfs-ng/map_def.h ---- afpfs-ng-0.8.1/include/afpfs-ng/map_def.h 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afpfs-ng/map_def.h 2011-09-10 12:13:50.116124557 +0200 -@@ -0,0 +1,15 @@ -+#ifndef __MAP_H_ -+#define __MAP_H_ -+ -+#include "afpfs-ng/afp.h" -+ -+#define AFP_MAPPING_UNKNOWN 0 -+#define AFP_MAPPING_COMMON 1 -+#define AFP_MAPPING_LOGINIDS 2 -+#define AFP_MAPPING_NAME 3 -+ -+unsigned int map_string_to_num(char * name); -+char * get_mapping_name(struct afp_volume * volume); -+ -+ -+#endif -diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/midlevel.h afpfs-ng-0.8.1.patch/include/afpfs-ng/midlevel.h ---- afpfs-ng-0.8.1/include/afpfs-ng/midlevel.h 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afpfs-ng/midlevel.h 2011-09-10 12:13:50.116124557 +0200 -@@ -0,0 +1,64 @@ -+#ifndef __MIDLEVEL_H_ -+#define __MIDLEVEL_H_ -+ -+#include -+#include "afpfs-ng/afp.h" -+ -+int ml_open(struct afp_volume * volume, const char *path, int flags, -+ struct afp_file_info **newfp); -+ -+int ml_creat(struct afp_volume * volume, const char *path,mode_t mode); -+ -+int ml_readdir(struct afp_volume * volume, -+ const char *path, -+ struct afp_file_info **base); -+ -+int ml_read(struct afp_volume * volume, const char *path, -+ char *buf, size_t size, off_t offset, -+ struct afp_file_info *fp, int * eof); -+ -+int ml_chmod(struct afp_volume * vol, const char * path, mode_t mode); -+ -+int ml_unlink(struct afp_volume * vol, const char *path); -+ -+int ml_mkdir(struct afp_volume * vol, const char * path, mode_t mode); -+ -+int ml_close(struct afp_volume * volume, const char * path, -+ struct afp_file_info * fp); -+ -+int ml_getattr(struct afp_volume * volume, const char *path, -+ struct stat *stbuf); -+ -+int ml_write(struct afp_volume * volume, const char * path, -+ const char *data, size_t size, off_t offset, -+ struct afp_file_info * fp, uid_t uid, -+ gid_t gid); -+ -+int ml_readlink(struct afp_volume * vol, const char * path, -+ char *buf, size_t size); -+ -+int ml_rmdir(struct afp_volume * vol, const char *path); -+ -+int ml_chown(struct afp_volume * vol, const char * path, -+ uid_t uid, gid_t gid); -+ -+int ml_truncate(struct afp_volume * vol, const char * path, off_t offset); -+ -+int ml_utime(struct afp_volume * vol, const char * path, -+ struct utimbuf * timebuf); -+ -+int ml_symlink(struct afp_volume *vol, const char * path1, const char * path2); -+ -+int ml_rename(struct afp_volume * vol, -+ const char * path_from, const char * path_to); -+ -+int ml_statfs(struct afp_volume * vol, const char *path, struct statvfs *stat); -+ -+void afp_ml_filebase_free(struct afp_file_info **filebase); -+ -+int ml_passwd(struct afp_server *server, -+ char * username, char * oldpasswd, char * newpasswd); -+ -+ -+ -+#endif -diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/uams_def.h afpfs-ng-0.8.1.patch/include/afpfs-ng/uams_def.h ---- afpfs-ng-0.8.1/include/afpfs-ng/uams_def.h 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afpfs-ng/uams_def.h 2011-09-10 12:13:50.116124557 +0200 -@@ -0,0 +1,16 @@ -+#ifndef __UAM_DEFS_H_ -+#define __UAM_DEFS_H_ -+ -+#define UAM_NOUSERAUTHENT 0x1 -+#define UAM_CLEARTXTPASSWRD 0x2 -+#define UAM_RANDNUMEXCHANGE 0x4 -+#define UAM_2WAYRANDNUM 0x8 -+#define UAM_DHCAST128 0x10 -+#define UAM_CLIENTKRB 0x20 -+#define UAM_DHX2 0x40 -+#define UAM_RECON1 0x80 -+ -+int uam_string_to_bitmap(char * name); -+char * uam_bitmap_to_string(unsigned int bitmap); -+ -+#endif -diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/utils.h afpfs-ng-0.8.1.patch/include/afpfs-ng/utils.h ---- afpfs-ng-0.8.1/include/afpfs-ng/utils.h 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afpfs-ng/utils.h 2011-09-10 12:13:50.116124557 +0200 -@@ -0,0 +1,43 @@ -+#ifndef __UTILS_H_ -+#define __UTILS_H_ -+#include -+ -+#include "afpfs-ng/afp.h" -+ -+#if BYTE_ORDER == BIG_ENDIAN -+#define hton64(x) (x) -+#define ntoh64(x) (x) -+#else /* BYTE_ORDER == BIG_ENDIAN */ -+#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \ -+ (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32)) -+#define ntoh64(x) (hton64(x)) -+#endif /* BYTE_ORDER == BIG_ENDIAN */ -+ -+#define min(a,b) (((a)<(b)) ? (a) : (b)) -+#define max(a,b) (((a)>(b)) ? (a) : (b)) -+ -+ -+ -+unsigned char unixpath_to_afppath( -+ struct afp_server * server, -+ char * buf); -+ -+unsigned char sizeof_path_header(struct afp_server * server); -+ -+ -+ -+unsigned char copy_from_pascal(char *dest, char *pascal,unsigned int max_len) ; -+unsigned short copy_from_pascal_two(char *dest, char *pascal,unsigned int max_len); -+ -+unsigned char copy_to_pascal(char *dest, const char *src); -+unsigned short copy_to_pascal_two(char *dest, const char *src); -+ -+void copy_path(struct afp_server * server, char * dest, const char * pathname, unsigned char len); -+ -+ -+char * create_path(struct afp_server * server, char * pathname, unsigned short * len); -+ -+ -+int invalid_filename(struct afp_server * server, const char * filename); -+ -+#endif -diff -Naur afpfs-ng-0.8.1/include/afp.h afpfs-ng-0.8.1.patch/include/afp.h ---- afpfs-ng-0.8.1/include/afp.h 2008-03-08 17:08:18.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afp.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,533 +0,0 @@ -- --#ifndef _AFP_H_ --#define _AFP_H_ -- --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -- -- --#define AFPFS_VERSION "0.8.1" -- --/* This is the maximum AFP version this library supports */ --#define AFP_MAX_SUPPORTED_VERSION 32 -- --/* afp_url is used to pass locations around */ --struct afp_url { -- enum {TCPIP,AT} protocol; -- char username[AFP_MAX_USERNAME_LEN]; -- char uamname[50]; -- char password[AFP_MAX_PASSWORD_LEN]; -- char servername[AFP_SERVER_NAME_UTF8_LEN]; -- int port; -- char volumename[AFP_VOLUME_NAME_UTF8_LEN]; -- char path[AFP_MAX_PATH]; -- -- int requested_version; -- char zone[AFP_ZONE_LEN]; /* Only used for Appletalk */ -- char volpassword[9];; --}; -- --struct afp_token { -- unsigned int length; -- char data[AFP_TOKEN_MAX_LEN]; --}; -- --#define SERVER_MAX_VERSIONS 10 --#define SERVER_MAX_UAMS 10 -- --struct afp_rx_buffer { -- unsigned int size; -- unsigned int maxsize; -- char * data; -- int errorcode; --}; -- -- --struct afp_file_info { -- unsigned short attributes; -- unsigned int did; -- unsigned int creation_date; -- unsigned int modification_date; -- unsigned int backup_date; -- unsigned int fileid; -- unsigned short offspring; -- char sync; -- char finderinfo[32]; -- char name[AFP_MAX_PATH]; -- char basename[AFP_MAX_PATH]; -- char translated_name[AFP_MAX_PATH]; -- struct afp_unixprivs unixprivs; -- unsigned int accessrights; -- struct afp_file_info * next; -- struct afp_file_info * largelist_next; -- unsigned char isdir; -- unsigned long long size; -- unsigned short resourcesize; -- unsigned int resource; -- unsigned short forkid; -- struct afp_icon * icon; -- int eof; --}; -- -- --#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_KNOWN 0x1 --#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_BROKEN 0x2 --#define VOLUME_EXTRA_FLAGS_SHOW_APPLEDOUBLE 0x4 --#define VOLUME_EXTRA_FLAGS_VOL_SUPPORTS_UNIX 0x8 --#define VOLUME_EXTRA_FLAGS_NO_LOCKING 0x10 --#define VOLUME_EXTRA_FLAGS_IGNORE_UNIXPRIVS 0x20 --#define VOLUME_EXTRA_FLAGS_READONLY 0x40 -- --#define AFP_VOLUME_UNMOUNTED 0 --#define AFP_VOLUME_MOUNTED 1 --#define AFP_VOLUME_UNMOUNTING 2 -- --struct afp_volume { -- unsigned short volid; -- char flags; /* This is from afpGetSrvrParms */ -- unsigned short attributes; /* This is from VolOpen */ -- unsigned short signature; /* This is fixed or variable */ -- unsigned int creation_date; -- unsigned int modification_date; -- unsigned int backup_date; -- struct statvfs stat; -- unsigned char mounted; -- char mountpoint[255]; -- struct afp_server * server; -- char volume_name[AFP_VOLUME_NAME_LEN]; -- char volume_name_printable[AFP_VOLUME_NAME_UTF8_LEN]; -- unsigned short dtrefnum; -- char volpassword[AFP_VOLPASS_LEN]; -- unsigned int extra_flags; /* This is an afpfs-ng specific field */ -- -- /* Our directory ID cache */ -- struct did_cache_entry * did_cache_base; -- pthread_mutex_t did_cache_mutex; -- -- /* Our journal of open forks */ -- struct afp_file_info * open_forks; -- pthread_mutex_t open_forks_mutex; -- -- /* Used to trigger startup */ -- pthread_cond_t startup_condition_cond; -- -- struct { -- uint64_t hits; -- uint64_t misses; -- uint64_t expired; -- uint64_t force_removed; -- } did_cache_stats; -- -- void * priv; /* This is a private structure for fuse/cmdline, etc */ -- pthread_t thread; /* This is the per-volume thread */ -- -- int mapping; -- --}; -- --#define SERVER_STATE_CONNECTED 1 --#define SERVER_STATE_DISCONNECTED 2 -- --enum server_type{ -- AFPFS_SERVER_TYPE_UNKNOWN, -- AFPFS_SERVER_TYPE_NETATALK, -- AFPFS_SERVER_TYPE_AIRPORT, -- AFPFS_SERVER_TYPE_MACINTOSH, --}; -- --#define is_netatalk(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_NETATALK ) --#define is_airport(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_AIRPORT ) --#define is_macintosh(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_MACINTOSH ) -- -- -- --struct afp_versions { -- char *av_name; -- int av_number; --}; --extern struct afp_versions afp_versions[]; -- --struct afp_server { -- -- /* Our buffer sizes */ -- unsigned int tx_quantum; -- unsigned int rx_quantum; -- -- unsigned int tx_delay; -- -- /* Connection information */ -- struct sockaddr_in address; -- int fd; -- -- /* Some stats, for information only */ -- struct { -- uint64_t runt_packets; -- uint64_t incoming_dsi; -- uint64_t rx_bytes; -- uint64_t tx_bytes; -- uint64_t requests_pending; -- } stats; -- -- /* General information */ -- char server_name[AFP_SERVER_NAME_LEN]; -- char server_name_utf8[AFP_SERVER_NAME_UTF8_LEN]; -- char server_name_printable[AFP_SERVER_NAME_UTF8_LEN]; -- -- char machine_type[17]; -- char icon[256]; -- char signature[16]; -- unsigned short flags; -- int connect_state; -- enum server_type server_type; -- -- /* This is the time we connected */ -- time_t connect_time; -- -- /* UAMs */ -- unsigned int supported_uams; -- unsigned int using_uam; -- -- /* Authentication */ -- char username[AFP_MAX_USERNAME_LEN]; -- char password[AFP_MAX_PASSWORD_LEN]; -- -- /* Session */ -- struct afp_token token; -- char need_resume; -- -- /* Versions */ -- unsigned char requested_version; -- unsigned char versions[SERVER_MAX_VERSIONS]; -- struct afp_versions *using_version; -- -- /* Volumes */ -- unsigned char num_volumes; -- struct afp_volume * volumes; -- -- void * dsi; -- unsigned int exit_flag; -- -- /* Our DSI request queue */ -- pthread_mutex_t requestid_mutex; -- pthread_mutex_t request_queue_mutex; -- unsigned short lastrequestid; -- unsigned short expectedrequestid; -- struct dsi_request * command_requests; -- -- -- char loginmesg[200]; -- char servermesg[200]; -- char path_encoding; -- -- /* This is the data for the incoming buffer */ -- char * incoming_buffer; -- int data_read; -- int bufsize; -- -- /* And this is for the outgoing queue */ -- pthread_mutex_t send_mutex; -- -- /* This is for user mapping */ -- struct passwd passwd; -- unsigned int server_uid, server_gid; -- int server_gid_valid; -- -- struct afp_server *next; -- -- /* These are for DSI attention packets */ -- unsigned int attention_quantum; -- unsigned int attention_len; -- char * attention_buffer; -- --}; -- --struct afp_extattr_info { -- unsigned int maxsize; -- unsigned int size; -- char data[1024]; --}; --struct afp_comment { -- unsigned int maxsize; -- unsigned int size; -- char *data; --}; -- --struct afp_icon { -- unsigned int maxsize; -- unsigned int size; -- char *data; --}; -- --#define AFP_DEFAULT_ATTENTION_QUANTUM 1024 -- --void afp_unixpriv_to_stat(struct afp_file_info *fp, -- struct stat *stat); -- --int init_uams(void) ; -- --unsigned int find_uam_by_name(const char * name); --char * uam_bitmap_to_string(unsigned int bitmap); -- -- --char * get_uam_names_list(void); -- --unsigned int default_uams_mask(void); -- --struct afp_volume * find_volume_by_name(struct afp_server * server, -- const char * volname); -- --struct afp_connection_request { -- unsigned int uam_mask; -- struct afp_url url; --}; -- --void afp_default_url(struct afp_url *url); --int afp_parse_url(struct afp_url * url, const char * toparse, int verbose); --void afp_print_url(struct afp_url * url); --int afp_url_validate(char * url_string, struct afp_url * valid_url); -- --int afp_list_volnames(struct afp_server * server, char * names, int max); -- --/* User mapping */ --int afp_detect_mapping(struct afp_volume * volume); -- --/* These are some functions that help with simple status text generation */ -- --int afp_status_header(char * text, int * len); --int afp_status_server(struct afp_server * s,char * text, int * len); -- -- --struct afp_server * afp_server_full_connect(void * priv, struct afp_connection_request * req); -- --void * just_end_it_now(void *other); --void add_fd_and_signal(int fd); --void loop_disconnect(struct afp_server *s); --void afp_wait_for_started_loop(void); -- -- --struct afp_versions * pick_version(unsigned char *versions, -- unsigned char requested) ; --int pick_uam(unsigned int u1, unsigned int u2); -- --int afp_server_login(struct afp_server *server, -- char * mesg, unsigned int *l, unsigned int max); -- -- --int afp_dologin(struct afp_server *server, -- unsigned int uam, char * username, char * passwd); -- --void afp_free_server(struct afp_server **server); -- --struct afp_server * afp_server_init(struct sockaddr_in * address); --int afp_get_address(void * priv, const char * hostname, unsigned int port, -- struct sockaddr_in * address); -- -- --int afp_main_loop(int command_fd); --int afp_main_quick_startup(pthread_t * thread); -- --int afp_server_destroy(struct afp_server *s) ; --int afp_server_reconnect(struct afp_server * s, char * mesg, -- unsigned int *l, unsigned int max); --int afp_server_connect(struct afp_server *s, int full); -- --struct afp_server * afp_server_complete_connection( -- void * priv, -- struct afp_server * server, -- struct sockaddr_in * address, unsigned char * versions, -- unsigned int uams, char * username, char * password, -- unsigned int requested_version, unsigned int uam_mask); -- --int afp_connect_volume(struct afp_volume * volume, struct afp_server * server, -- char * mesg, unsigned int * l, unsigned int max); --int something_is_mounted(struct afp_server * server); -- --int add_cache_entry(struct afp_file_info * file) ; --struct afp_file_info * get_cache_by_name(char * name); --struct afp_server * find_server_by_address(struct sockaddr_in * address); --struct afp_server * find_server_by_signature(char * signature); --struct afp_server * find_server_by_name(char * name); --int server_still_valid(struct afp_server * server); -- -- --struct afp_server * get_server_base(void); --int afp_server_remove(struct afp_server * server); -- --int afp_unmount_volume(struct afp_volume * volume); --int afp_unmount_all_volumes(struct afp_server * server); -- --#define volume_is_readonly(x) (((x)->attributes&kReadOnly) || \ -- ((x)->extra_flags & VOLUME_EXTRA_FLAGS_READONLY)) -- --int afp_opendt(struct afp_volume *volume, unsigned short * refnum); -- --int afp_closedt(struct afp_server * server, unsigned short * refnum); -- --int afp_getcomment(struct afp_volume *volume, unsigned int did, -- const char * pathname, struct afp_comment * comment); -- --int afp_addcomment(struct afp_volume *volume, unsigned int did, -- const char * pathname, char * comment,uint64_t *size); -- --int afp_geticon(struct afp_volume * volume, unsigned int filecreator, -- unsigned int filetype, unsigned char icontype, -- unsigned short length, struct afp_icon * icon); -- --/* Things you want to do to a server */ -- --int afp_getsrvrmsg(struct afp_server *server, unsigned short messagetype,unsigned char utf8, unsigned char block, char * mesg); -- --int afp_login(struct afp_server *server, char * uaname, -- char * userauthinfo, unsigned int userauthinfo_len, -- struct afp_rx_buffer *rx); -- --int afp_changepassword(struct afp_server *server, char * uaname, -- char * userauthinfo, unsigned int userauthinfo_len, -- struct afp_rx_buffer *rx); -- --int afp_logincont(struct afp_server *server, unsigned short id, -- char * userauthinfo, unsigned int userauthinfo_len, -- struct afp_rx_buffer *rx); -- --int afp_getsessiontoken(struct afp_server * server, int type, -- unsigned int timestamp, struct afp_token *outgoing_token, -- struct afp_token * incoming_token); -- --int afp_getsrvrparms(struct afp_server *server); -- --int afp_logout(struct afp_server *server,unsigned char wait); -- --int afp_mapname(struct afp_server * server, unsigned char subfunction, -- char * name, unsigned int * id); -- --int afp_mapid(struct afp_server * server, unsigned char subfunction, -- unsigned int id, char *name); -- --int afp_getuserinfo(struct afp_server * server, int thisuser, -- unsigned int userid, unsigned short bitmap, -- unsigned int *newuid, unsigned int *newgid); -- --int afp_zzzzz(struct afp_server *server); -- --int afp_volopen(struct afp_volume * volume, -- unsigned short bitmap, char * password); -- --int afp_flush(struct afp_volume * volume); -- --int afp_getfiledirparms(struct afp_volume *volume, unsigned int did, -- unsigned int filebitmap, unsigned int dirbitmap, const char * pathname, -- struct afp_file_info *fp); -- --int afp_enumerate(struct afp_volume * volume, -- unsigned int dirid, -- unsigned int filebitmap, unsigned int dirbitmap, -- unsigned short reqcount, -- unsigned short startindex, -- char * path, -- struct afp_file_info ** file_p); -- --int afp_enumerateext2(struct afp_volume * volume, -- unsigned int dirid, -- unsigned int filebitmap, unsigned int dirbitmap, -- unsigned short reqcount, -- unsigned long startindex, -- char * path, -- struct afp_file_info ** file_p); -- --int afp_openfork(struct afp_volume * volume, -- unsigned char forktype, -- unsigned int dirid, -- unsigned short accessmode, -- char * filename, -- struct afp_file_info *fp); -- --int afp_read(struct afp_volume * volume, unsigned short forkid, -- uint32_t offset, -- uint32_t count, struct afp_rx_buffer * rx); -- --int afp_readext(struct afp_volume * volume, unsigned short forkid, -- uint64_t offset, -- uint64_t count, struct afp_rx_buffer * rx); -- --int afp_getvolparms(struct afp_volume * volume, unsigned short bitmap); -- -- --int afp_createdir(struct afp_volume * volume, unsigned int dirid, const char * pathname, unsigned int *did_p); -- --int afp_delete(struct afp_volume * volume, -- unsigned int dirid, char * pathname); -- -- --int afp_createfile(struct afp_volume * volume, unsigned char flag, -- unsigned int did, char * pathname); -- --int afp_write(struct afp_volume * volume, unsigned short forkid, -- uint32_t offset, uint32_t reqcount, -- char * data, uint32_t * written); -- --int afp_writeext(struct afp_volume * volume, unsigned short forkid, -- uint64_t offset, uint64_t reqcount, -- char * data, uint64_t * written); -- --int afp_flushfork(struct afp_volume * volume, unsigned short forkid); -- --int afp_closefork(struct afp_volume * volume, unsigned short forkid); --int afp_setfileparms(struct afp_volume * volume, -- unsigned int dirid, const char * pathname, unsigned short bitmap, -- struct afp_file_info *fp); --int afp_setfiledirparms(struct afp_volume * volume, -- unsigned int dirid, const char * pathname, unsigned short bitmap, -- struct afp_file_info *fp); -- --int afp_setdirparms(struct afp_volume * volume, -- unsigned int dirid, const char * pathname, unsigned short bitmap, -- struct afp_file_info *fp); -- --int afp_volclose(struct afp_volume * volume); -- -- --int afp_setforkparms(struct afp_volume *volume, -- unsigned short forkid, unsigned short bitmap, unsigned long len); -- --int afp_byterangelock(struct afp_volume * volume, -- unsigned char flag, -- unsigned short forkid, -- uint32_t offset, -- uint32_t len, uint32_t *generated_offset); -- --int afp_byterangelockext(struct afp_volume * volume, -- unsigned char flag, -- unsigned short forkid, -- uint64_t offset, -- uint64_t len, uint64_t *generated_offset); -- --int afp_moveandrename(struct afp_volume *volume, -- unsigned int src_did, -- unsigned int dst_did, -- char * src_path, char * dst_path, char *new_name); -- --int afp_rename(struct afp_volume * volume, -- unsigned int dirid, -- char * path_from, char * path_to); -- --int afp_listextattr(struct afp_volume * volume, -- unsigned int dirid, unsigned short bitmap, -- char * pathname, struct afp_extattr_info * info); -- --/* This is a currently undocumented command */ --int afp_newcommand76(struct afp_volume * volume, unsigned int dlen, char * data); -- --/* For debugging */ --char * afp_get_command_name(char code); -- -- --#endif -diff -Naur afpfs-ng-0.8.1/include/afp_protocol.h afpfs-ng-0.8.1.patch/include/afp_protocol.h ---- afpfs-ng-0.8.1/include/afp_protocol.h 2008-02-18 04:33:43.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/afp_protocol.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,361 +0,0 @@ -- --#ifndef _AFP_PROTOCOL_H_ --#define _AFP_PROTOCOL_H_ -- --#include --#include --#include --#include -- --/* This file defines constants for the Apple File Protocol. -- All page references are from "Apple Filing Protocol Programming" version 3.2. -- except where noted. --*/ -- --#define AFP_SERVER_NAME_LEN 33 --#define AFP_SERVER_NAME_UTF8_LEN 255 --#define AFP_VOLUME_NAME_LEN 33 --#define AFP_VOLUME_NAME_UTF8_LEN 33 --#define AFP_SIGNATURE_LEN 16 --#define AFP_MACHINETYPE_LEN 33 --#define AFP_LOGINMESG_LEN 200 --#define AFP_VOLPASS_LEN 8 --#define AFP_HOSTNAME_LEN 255 --/* This is actually just a guess, and only used for appletalk */ --#define AFP_ZONE_LEN 255 -- --#define AFP_SERVER_ICON_LEN 256 -- -- --#define AFP_MAX_USERNAME_LEN 127 --#define AFP_MAX_PASSWORD_LEN 127 -- -- --/* This is the maximum length of any UAM string */ --#define AFP_UAM_LENGTH 24 -- --/* This is the maximum length of any path description */ --#define AFP_MAX_PATH 768 -- --#define AFP_VOL_FLAT 1 --#define AFP_VOL_FIXED 2 --#define AFP_VOL_VARIABLE 3 -- --/* The root directory ID, p.26 */ -- --#define AFP_ROOT_DID 2 -- --/* Path type constants, p.249 */ -- --enum { --kFPShortName = 1, --kFPLongName = 2, --kFPUTF8Name = 3 --}; -- --/* fork types */ -- --#define AFP_FORKTYPE_DATA 0x0 --#define AFP_FORKTYPE_RESOURCE 0x80 -- --/* openfork access modes, from p.196 */ -- --#define AFP_OPENFORK_ALLOWREAD 1 --#define AFP_OPENFORK_ALLOWWRITE 2 --#define AFP_OPENFORK_DENYREAD 0x10 --#define AFP_OPENFORK_DENYWRITE 0x20 -- --/* Message type for getsrvmesg, p. 169*/ -- --typedef enum { -- AFPMESG_LOGIN = 0, -- AFPMESG_SERVER = 1 --} afpmessage_t; -- --/* Message bitmap for getsrvrmsg */ -- --#define AFP_GETSRVRMSG_UTF8 0x2 --#define AFP_GETSRVRMSG_GETMSG 0x1 -- -- --/* Maximum Version length, p.17 */ --#define AFP_MAX_VERSION_LENGTH 16 -- --/* Maximum length of a token, this is undocumented */ --#define AFP_TOKEN_MAX_LEN 256 -- --/* The maximum size of a file for AFP 2 */ --#define AFP_MAX_AFP2_FILESIZE (4294967296) -- --/* Unix privs, p.240 */ -- --struct afp_unixprivs { -- uint32_t uid __attribute__((__packed__)); -- uint32_t gid __attribute__((__packed__)); -- uint32_t permissions __attribute__((__packed__)); -- uint32_t ua_permissions __attribute__((__packed__)); -- --}; -- -- --/* AFP Volume attributes bitmap, p.241 */ -- --enum { -- kReadOnly = 0x01, -- kHasVolumePassword = 0x02, -- kSupportsFileIDs = 0x04, -- kSupportsCatSearch = 0x08, -- kSupportsBlankAccessPrivs = 0x10, -- kSupportsUnixPrivs = 0x20, -- kSupportsUTF8Names = 0x40, -- kNoNetworkUserIDs = 0x80, -- kDefaultPrivsFromParent = 0x100, -- kNoExchangeFiles = 0x200, -- kSupportsExtAttrs = 0x400, -- kSupportsACLs=0x800 --}; -- --/* AFP file creation constantes, p.250 */ --enum { --kFPSoftCreate = 0, --kFPHardCreate = 0x80 --}; -- --/* AFP Directory attributes, taken from the protocol guide p.236 */ -- --enum { -- kFPAttributeBit = 0x1, -- kFPParentDirIDBit = 0x2, -- kFPCreateDateBit = 0x4, -- kFPModDateBit = 0x8, -- kFPBackupDateBit = 0x10, -- kFPFinderInfoBit = 0x20, -- kFPLongNameBit = 0x40, -- kFPShortNameBit = 0x80, -- kFPNodeIDBit = 0x100, -- kFPOffspringCountBit = 0x0200, -- kFPOwnerIDBit = 0x0400, -- kFPGroupIDBit = 0x0800, -- kFPAccessRightsBit = 0x1000, -- kFPProDOSInfoBit = 0x2000, // AFP version 2.2 and earlier -- kFPUTF8NameBit = 0x2000, // AFP version 3.0 and later -- kFPUnixPrivsBit = 0x8000 // AFP version 3.0 and later --}; -- --/* AFP File bitmap, p.238. These are the ones not in the AFP Directory -- attributes map. */ -- --enum { -- kFPDataForkLenBit = 0x0200, -- kFPRsrcForkLenBit = 0x0400, -- kFPExtDataForkLenBit = 0x0800, // AFP version 3.0 and later -- kFPLaunchLimitBit = 0x1000, -- kFPExtRsrcForkLenBit = 0x4000, // AFP version 3.0 and later --}; -- --/* AFP Extended Attributes Bitmap, p.238 */ -- --enum { -- kXAttrNoFollow = 0x1, -- kXAttrCreate = 0x2, -- kXAttrREplace=0x4 --}; -- -- --/* AFP function codes */ --enum AFPFunction --{ -- afpByteRangeLock = 1, afpCloseVol, afpCloseDir, afpCloseFork, -- afpCopyFile, afpCreateDir, afpCreateFile, -- afpDelete, afpEnumerate, afpFlush, afpFlushFork, -- afpGetForkParms = 14, afpGetSrvrInfo, afpGetSrvrParms, -- afpGetVolParms, afpLogin, afpLoginCont, afpLogout, afpMapID, -- afpMapName, afpMoveAndRename, afpOpenVol, afpOpenDir, afpOpenFork, -- afpRead, afpRename, afpSetDirParms, afpSetFileParms, -- afpSetForkParms, afpSetVolParms, afpWrite, afpGetFileDirParms, -- afpSetFileDirParms, afpChangePassword, -- afpGetUserInfo=37,afpGetSrvrMsg = 38, -- afpOpenDT=48, -- afpCloseDT=49, -- afpGetIcon=51, afpGetIconInfo=52, -- afpAddComment=56, afpRemoveComment=57, afpGetComment=58, -- afpByteRangeLockExt=59, afpReadExt, afpWriteExt, -- afpGetAuthMethods=62, -- afp_LoginExt=63, -- afpGetSessionToken=64, -- afpDisconnectOldSession=65, -- afpEnumerateExt=66, -- afpCatSearchExt = 67, -- afpEnumerateExt2 = 68, afpGetExtAttr, afpSetExtAttr, -- afpRemoveExtAttr , afpListExtAttrs, -- afpZzzzz = 122, -- afpAddIcon=192, --}; -- --/* AFP Volume bitmap. Take from 242 of the protocol guide. */ --enum { -- kFPBadVolPre222Bitmap = 0xFe00, -- kFPBadVolBitmap = 0xF000, -- kFPVolAttributeBit = 0x1, -- kFPVolSignatureBit = 0x2, -- kFPVolCreateDateBit = 0x4, -- kFPVolModDateBit = 0x8, -- kFPVolBackupDateBit = 0x10, -- kFPVolIDBit = 0x20, -- kFPVolBytesFreeBit = 0x40, -- kFPVolBytesTotalBit = 0x80, -- kFPVolNameBit = 0x100, -- kFPVolExtBytesFreeBit = 0x200, -- kFPVolExtBytesTotalBit = 0x400, -- kFPVolBlockSizeBit = 0x800 --}; -- --/* AFP Attention Codes -- 4 bits */ --#define AFPATTN_SHUTDOWN (1 << 15) /* shutdown/disconnect */ --#define AFPATTN_CRASH (1 << 14) /* server crashed */ --#define AFPATTN_MESG (1 << 13) /* server has message */ --#define AFPATTN_NORECONNECT (1 << 12) /* don't reconnect */ --/* server notification */ --#define AFPATTN_NOTIFY (AFPATTN_MESG | AFPATTN_NORECONNECT) -- --/* extended bitmap -- 12 bits. volchanged is only useful w/ a server -- * notification, and time is only useful for shutdown. */ --#define AFPATTN_VOLCHANGED (1 << 0) /* volume has changed */ --#define AFPATTN_TIME(x) ((x) & 0xfff) /* time in minutes */ -- --#define kFPNoErr 0 -- --/* AFP result codes, p252 */ --#define kASPSessClosed -1072 --#define kFPAccessDenied -5000 --#define kFPAuthContinue -5001 --#define kFPBadUAM -5002 --#define kFPBadVersNum -5003 --#define kFPBitmapErr -5004 --#define kFPCantMove -5005 --#define kFPDenyConflict -5006 --#define kFPDirNotEmpty -5007 --#define kFPDiskFull -5008 --#define kFPEOFErr -5009 --#define kFPFileBusy -5010 --#define kFPFlatVol -5011 --#define kFPItemNotFound -5012 --#define kFPLockErr -5013 --#define kFPMiscErr -5014 --#define kFPNoMoreLocks -5015 --#define kFPNoServer -5016 --#define kFPObjectExists -5017 --#define kFPObjectNotFound -5018 --#define kFPParamErr -5019 --#define kFPRangeNotLocked -5020 --#define kFPRangeOverlap -5021 --#define kFPSessClosed -5022 --#define kFPUserNotAuth -5023 --#define kFPCallNotSupported -5024 --#define kFPObjectTypeErr -5025 --#define kFPTooManyFilesOpen -5026 --#define kFPServerGoingDown -5027 --#define kFPCantRename -5028 --#define kFPDirNotFound -5029 --#define kFPIconTypeError -5030 --#define kFPVolLocked -5031 --#define kFPObjectLocked -5032 --#define kFPContainsSharedErr -5033 --#define kFPIDNotFound -5034 --#define kFPIDExists -5035 --#define kFPDiffVolErr -5036 --#define kFPCatalogChanged -5037 --#define kFPSameObjectErr -5038 --#define kFPBadIDErr -5039 --#define kFPPwdSameErr -5040 --#define kFPPwdTooShortErr -5041 --#define kFPPwdExpiredErr -5042 --#define kFPInsideSharedErr -5043 --#define kFPInsideTrashErr -5044 --#define kFPPwdNeedsChangeErr -5045 --#define kFPPwdPolicyErr -5046 --#define kFPDiskQuotaExceeded –5047 -- -- -- --/* These flags determine to lock or unlock in ByteRangeLock(Ext) */ -- --enum { --ByteRangeLock_Lock = 0, --ByteRangeLock_Unlock = 1 --}; -- --/* These flags are used in volopen and getsrvrparm replies, p.171 */ -- --#define HasConfigInfo 0x1 --#define HasPassword 0x80 -- --/* These are the subfunction for kFPMapID, as per p.248 */ -- --enum { --kUserIDToName = 1, --kGroupIDToName = 2, --kUserIDToUTF8Name = 3, --kGroupIDToUTF8Name = 4, --kUserUUIDToUTF8Name = 5, --kGroupUUIDToUTF8Name = 6 --}; -- -- --/* These are the subfunction flags described in the FPMapName command, p.286. -- Note that this is different than what's described on p. 186. */ -- --enum { --kNameToUserID = 1, --kNameToGroupID = 2, --kUTF8NameToUserID = 3, --kUTF8NameToGroupID = 4, --kUTF8NameToUserUUID = 5, --kUTF8NameToGroupUUID = 6 --}; -- --/* These are bits for FPGetUserInfo, p.173. */ --#define kFPGetUserInfo_USER_ID 1 --#define kFPGetUserInfo_PRI_GROUPID 2 -- --/* Flags for the replies of GetSrvrInfo and DSI GetStatus, p.240 */ -- --enum { -- kSupportsCopyfile = 0x01, -- kSupportsChgPwd = 0x02, -- kDontAllowSavePwd = 0x04, -- kSupportsSrvrMsg = 0x08, -- kSrvrSig = 0x10, -- kSupportsTCP = 0x20, -- kSupportsSrvrNotify = 0x40, -- kSupportsReconnect = 0x80, -- kSupportsDirServices = 0x100, -- kSupportsUTF8SrvrName = 0x200, -- kSupportsUUIDs = 0x400, -- kSupportsSuperClient = 0x8000 --}; -- -- --/* p.247 */ -- --enum { -- kLoginWithoutID = 0, -- kLoginWithID = 1, -- kReconnWithID = 2, -- kLoginWithTimeAndID = 3, -- kReconnWithTimeAndID = 4, -- kRecon1Login = 5, -- kRecon1ReconnectLogin = 6, -- kRecon1Refresh = 7, kGetKerberosSessionKey = 8 --}; -- -- --#define AFP_CHMOD_ALLOWED_BITS_22 \ -- (S_IRUSR |S_IWUSR | S_IRGRP | S_IWGRP |S_IROTH | S_IWOTH | S_IFREG ) -- -- --#endif -- -- -- -- -diff -Naur afpfs-ng-0.8.1/include/codepage.h afpfs-ng-0.8.1.patch/include/codepage.h ---- afpfs-ng-0.8.1/include/codepage.h 2007-09-23 16:21:30.000000000 +0200 -+++ afpfs-ng-0.8.1.patch/include/codepage.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,11 +0,0 @@ --#ifndef __CODE_PAGE_H_ --#define __CODE_PAGE_H_ --int convert_utf8dec_to_utf8pre(const char *src, int src_len, -- char * dest, int dest_len); --int convert_utf8pre_to_utf8dec(const char * src, int src_len, -- char * dest, int dest_len); --int convert_path_to_unix(char encoding, char * dest, -- char * src, int dest_len); --int convert_path_to_afp(char encoding, char * dest, -- char * src, int dest_len); --#endif -diff -Naur afpfs-ng-0.8.1/include/dsi.h afpfs-ng-0.8.1.patch/include/dsi.h ---- afpfs-ng-0.8.1/include/dsi.h 2008-02-18 04:33:24.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/dsi.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,33 +0,0 @@ -- --#ifndef __DSI_H_ --#define __DSI_H_ -- --#include "afp.h" -- --struct dsi_request --{ -- unsigned short requestid; -- unsigned char subcommand; -- void * other; -- unsigned char wait; -- pthread_cond_t condition_cond; -- struct dsi_request * next; -- int return_code; --}; -- --int dsi_receive(struct afp_server * server, void * data, int size); --int dsi_getstatus(struct afp_server * server); -- --int dsi_opensession(struct afp_server *server); -- --int dsi_send(struct afp_server *server, char * msg, int size,int wait,unsigned char subcommand, void ** other); --struct dsi_session * dsi_create(struct afp_server *server); --int dsi_restart(struct afp_server *server); --int dsi_recv(struct afp_server * server); -- --#define DSI_BLOCK_TIMEOUT -1 --#define DSI_DONT_WAIT 0 --#define DSI_DEFAULT_TIMEOUT 5 -- -- --#endif -diff -Naur afpfs-ng-0.8.1/include/libafpclient.h afpfs-ng-0.8.1.patch/include/libafpclient.h ---- afpfs-ng-0.8.1/include/libafpclient.h 2008-01-30 05:37:59.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/libafpclient.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,50 +0,0 @@ -- --#ifndef __CLIENT_H_ --#define __CLIENT_H_ -- --#include --#include -- --#define MAX_CLIENT_RESPONSE 2048 -- -- --enum loglevels { -- AFPFSD, --}; -- --struct afp_server; --struct afp_volume; -- --struct libafpclient { -- int (*unmount_volume) (struct afp_volume * volume); -- void (*log_for_client)(void * priv, -- enum loglevels loglevel, int logtype, const char *message); -- void (*forced_ending_hook)(void); -- int (*scan_extra_fds)(int command_fd,fd_set *set, int * max_fd); -- void (*loop_started)(void); --} ; -- --extern struct libafpclient * libafpclient; -- --void libafpclient_register(struct libafpclient * tmpclient); -- -- --void signal_main_thread(void); -- --/* These are logging functions */ -- --#define MAXLOGSIZE 2048 -- --#define LOG_METHOD_SYSLOG 1 --#define LOG_METHOD_STDOUT 2 -- --void set_log_method(int m); -- -- --void log_for_client(void * priv, -- enum loglevels loglevel, int logtype, char * message,...); -- --void stdout_log_for_client(void * priv, -- enum loglevels loglevel, int logtype, const char *message); -- --#endif -diff -Naur afpfs-ng-0.8.1/include/Makefile.am afpfs-ng-0.8.1.patch/include/Makefile.am ---- afpfs-ng-0.8.1/include/Makefile.am 1970-01-01 01:00:00.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/Makefile.am 2011-09-10 12:13:50.126124692 +0200 -@@ -0,0 +1,3 @@ -+## Process this file with automake to produce Makefile.in -+ -+SUBDIRS = afpfs-ng -diff -Naur afpfs-ng-0.8.1/include/map_def.h afpfs-ng-0.8.1.patch/include/map_def.h ---- afpfs-ng-0.8.1/include/map_def.h 2008-01-17 05:55:46.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/map_def.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,15 +0,0 @@ --#ifndef __MAP_H_ --#define __MAP_H_ -- --#include "afp.h" -- --#define AFP_MAPPING_UNKNOWN 0 --#define AFP_MAPPING_COMMON 1 --#define AFP_MAPPING_LOGINIDS 2 --#define AFP_MAPPING_NAME 3 -- --unsigned int map_string_to_num(char * name); --char * get_mapping_name(struct afp_volume * volume); -- -- --#endif -diff -Naur afpfs-ng-0.8.1/include/midlevel.h afpfs-ng-0.8.1.patch/include/midlevel.h ---- afpfs-ng-0.8.1/include/midlevel.h 2007-12-24 20:39:25.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/midlevel.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,64 +0,0 @@ --#ifndef __MIDLEVEL_H_ --#define __MIDLEVEL_H_ -- --#include --#include "afp.h" -- --int ml_open(struct afp_volume * volume, const char *path, int flags, -- struct afp_file_info **newfp); -- --int ml_creat(struct afp_volume * volume, const char *path,mode_t mode); -- --int ml_readdir(struct afp_volume * volume, -- const char *path, -- struct afp_file_info **base); -- --int ml_read(struct afp_volume * volume, const char *path, -- char *buf, size_t size, off_t offset, -- struct afp_file_info *fp, int * eof); -- --int ml_chmod(struct afp_volume * vol, const char * path, mode_t mode); -- --int ml_unlink(struct afp_volume * vol, const char *path); -- --int ml_mkdir(struct afp_volume * vol, const char * path, mode_t mode); -- --int ml_close(struct afp_volume * volume, const char * path, -- struct afp_file_info * fp); -- --int ml_getattr(struct afp_volume * volume, const char *path, -- struct stat *stbuf); -- --int ml_write(struct afp_volume * volume, const char * path, -- const char *data, size_t size, off_t offset, -- struct afp_file_info * fp, uid_t uid, -- gid_t gid); -- --int ml_readlink(struct afp_volume * vol, const char * path, -- char *buf, size_t size); -- --int ml_rmdir(struct afp_volume * vol, const char *path); -- --int ml_chown(struct afp_volume * vol, const char * path, -- uid_t uid, gid_t gid); -- --int ml_truncate(struct afp_volume * vol, const char * path, off_t offset); -- --int ml_utime(struct afp_volume * vol, const char * path, -- struct utimbuf * timebuf); -- --int ml_symlink(struct afp_volume *vol, const char * path1, const char * path2); -- --int ml_rename(struct afp_volume * vol, -- const char * path_from, const char * path_to); -- --int ml_statfs(struct afp_volume * vol, const char *path, struct statvfs *stat); -- --void afp_ml_filebase_free(struct afp_file_info **filebase); -- --int ml_passwd(struct afp_server *server, -- char * username, char * oldpasswd, char * newpasswd); -- -- -- --#endif -diff -Naur afpfs-ng-0.8.1/include/uams_def.h afpfs-ng-0.8.1.patch/include/uams_def.h ---- afpfs-ng-0.8.1/include/uams_def.h 2007-09-07 15:10:51.000000000 +0200 -+++ afpfs-ng-0.8.1.patch/include/uams_def.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,16 +0,0 @@ --#ifndef __UAM_DEFS_H_ --#define __UAM_DEFS_H_ -- --#define UAM_NOUSERAUTHENT 0x1 --#define UAM_CLEARTXTPASSWRD 0x2 --#define UAM_RANDNUMEXCHANGE 0x4 --#define UAM_2WAYRANDNUM 0x8 --#define UAM_DHCAST128 0x10 --#define UAM_CLIENTKRB 0x20 --#define UAM_DHX2 0x40 --#define UAM_RECON1 0x80 -- --int uam_string_to_bitmap(char * name); --char * uam_bitmap_to_string(unsigned int bitmap); -- --#endif -diff -Naur afpfs-ng-0.8.1/include/utils.h afpfs-ng-0.8.1.patch/include/utils.h ---- afpfs-ng-0.8.1/include/utils.h 2008-02-18 04:33:58.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/include/utils.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,43 +0,0 @@ --#ifndef __UTILS_H_ --#define __UTILS_H_ --#include -- --#include "afp.h" -- --#if BYTE_ORDER == BIG_ENDIAN --#define hton64(x) (x) --#define ntoh64(x) (x) --#else /* BYTE_ORDER == BIG_ENDIAN */ --#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \ -- (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32)) --#define ntoh64(x) (hton64(x)) --#endif /* BYTE_ORDER == BIG_ENDIAN */ -- --#define min(a,b) (((a)<(b)) ? (a) : (b)) --#define max(a,b) (((a)>(b)) ? (a) : (b)) -- -- -- --unsigned char unixpath_to_afppath( -- struct afp_server * server, -- char * buf); -- --unsigned char sizeof_path_header(struct afp_server * server); -- -- -- --unsigned char copy_from_pascal(char *dest, char *pascal,unsigned int max_len) ; --unsigned short copy_from_pascal_two(char *dest, char *pascal,unsigned int max_len); -- --unsigned char copy_to_pascal(char *dest, const char *src); --unsigned short copy_to_pascal_two(char *dest, const char *src); -- --void copy_path(struct afp_server * server, char * dest, const char * pathname, unsigned char len); -- -- --char * create_path(struct afp_server * server, char * pathname, unsigned short * len); -- -- --int invalid_filename(struct afp_server * server, const char * filename); -- --#endif -diff -Naur afpfs-ng-0.8.1/lib/afp.c afpfs-ng-0.8.1.patch/lib/afp.c ---- afpfs-ng-0.8.1/lib/afp.c 2008-03-08 03:44:16.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/afp.c 2011-09-10 12:13:50.131124759 +0200 -@@ -9,7 +9,7 @@ - - - --#include "afp.h" -+#include "afpfs-ng/afp.h" - #include - - #include -@@ -21,17 +21,17 @@ - #include - #include - --#include "afp_protocol.h" --#include "libafpclient.h" -+#include "afpfs-ng/afp_protocol.h" -+#include "afpfs-ng/libafpclient.h" - #include "server.h" --#include "dsi.h" -+#include "afpfs-ng/dsi.h" - #include "dsi_protocol.h" --#include "utils.h" -+#include "afpfs-ng/utils.h" - #include "afp_replies.h" - #include "afp_internal.h" - #include "did.h" - #include "forklist.h" --#include "codepage.h" -+#include "afpfs-ng/codepage.h" - - struct afp_versions afp_versions[] = { - { "AFPVersion 1.1", 11 }, -diff -Naur afpfs-ng-0.8.1/lib/afp_internal.h afpfs-ng-0.8.1.patch/lib/afp_internal.h ---- afpfs-ng-0.8.1/lib/afp_internal.h 2007-11-09 05:27:20.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/afp_internal.h 2011-09-10 12:13:50.132124772 +0200 -@@ -1,7 +1,7 @@ - #ifndef _AFP_INTERNAL_H_ - #define _AFP_INTERNAL_H_ - --#include "afp.h" -+#include "afpfs-ng/afp.h" - - extern struct afp_versions afp_versions[]; - -diff -Naur afpfs-ng-0.8.1/lib/afp_url.c afpfs-ng-0.8.1.patch/lib/afp_url.c ---- afpfs-ng-0.8.1/lib/afp_url.c 2008-03-04 21:16:49.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/afp_url.c 2011-09-10 12:13:50.132124772 +0200 -@@ -3,7 +3,7 @@ - #include - #include - #include --#include "afp.h" -+#include "afpfs-ng/afp.h" - - void afp_default_url(struct afp_url *url) - { -diff -Naur afpfs-ng-0.8.1/lib/client.c afpfs-ng-0.8.1.patch/lib/client.c ---- afpfs-ng-0.8.1/lib/client.c 2008-02-18 04:36:30.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/client.c 2011-09-10 12:13:50.132124772 +0200 -@@ -1,5 +1,5 @@ --#include --#include -+#include -+#include - - - struct libafpclient * libafpclient = NULL; -diff -Naur afpfs-ng-0.8.1/lib/codepage.c afpfs-ng-0.8.1.patch/lib/codepage.c ---- afpfs-ng-0.8.1/lib/codepage.c 2008-02-18 04:36:54.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/codepage.c 2011-09-10 12:13:50.133124786 +0200 -@@ -14,8 +14,8 @@ - - #include - #include --#include "afp_protocol.h" --#include "utils.h" -+#include "afpfs-ng/afp_protocol.h" -+#include "afpfs-ng/utils.h" - #include "unicode.h" - - int convert_utf8dec_to_utf8pre(const char *src, int src_len, -diff -Naur afpfs-ng-0.8.1/lib/connect.c afpfs-ng-0.8.1.patch/lib/connect.c ---- afpfs-ng-0.8.1/lib/connect.c 2008-02-18 04:38:59.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/connect.c 2011-09-10 12:13:50.133124786 +0200 -@@ -10,13 +10,13 @@ - #include - #include - --#include "afp.h" --#include "dsi.h" --#include "utils.h" --#include "uams_def.h" --#include "codepage.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/utils.h" -+#include "afpfs-ng/uams_def.h" -+#include "afpfs-ng/codepage.h" - #include "users.h" --#include "libafpclient.h" -+#include "afpfs-ng/libafpclient.h" - #include "server.h" - - -diff -Naur afpfs-ng-0.8.1/lib/did.c afpfs-ng-0.8.1.patch/lib/did.c ---- afpfs-ng-0.8.1/lib/did.c 2008-02-18 04:39:17.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/did.c 2011-09-10 12:13:50.133124786 +0200 -@@ -9,8 +9,8 @@ - #include - #include - --#include "afp.h" --#include "afp_protocol.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/afp_protocol.h" - - #undef DID_CACHE_DISABLE - -diff -Naur afpfs-ng-0.8.1/lib/dsi.c afpfs-ng-0.8.1.patch/lib/dsi.c ---- afpfs-ng-0.8.1/lib/dsi.c 2008-02-18 04:53:03.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/dsi.c 2011-09-10 12:13:50.134124800 +0200 -@@ -19,12 +19,12 @@ - #include - #include - --#include "utils.h" --#include "dsi.h" --#include "afp.h" --#include "uams_def.h" -+#include "afpfs-ng/utils.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/uams_def.h" - #include "dsi_protocol.h" --#include "libafpclient.h" -+#include "afpfs-ng/libafpclient.h" - #include "afp_internal.h" - #include "afp_replies.h" - -diff -Naur afpfs-ng-0.8.1/lib/forklist.c afpfs-ng-0.8.1.patch/lib/forklist.c ---- afpfs-ng-0.8.1/lib/forklist.c 2008-01-17 05:49:16.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/forklist.c 2011-09-10 12:13:50.135124814 +0200 -@@ -10,7 +10,7 @@ - */ - - --#include "afp.h" -+#include "afpfs-ng/afp.h" - - #include - #include -diff -Naur afpfs-ng-0.8.1/lib/log.c afpfs-ng-0.8.1.patch/lib/log.c ---- afpfs-ng-0.8.1/lib/log.c 2008-01-30 05:37:58.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/log.c 2011-09-10 12:13:50.135124814 +0200 -@@ -3,7 +3,7 @@ - #include - #include - #include --#include "libafpclient.h" -+#include "afpfs-ng/libafpclient.h" - - void log_for_client(void * priv, - enum loglevels loglevel, int logtype, char *format, ...) { -diff -Naur afpfs-ng-0.8.1/lib/loop.c afpfs-ng-0.8.1.patch/lib/loop.c ---- afpfs-ng-0.8.1/lib/loop.c 2008-02-18 04:40:11.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/loop.c 2011-09-10 12:13:50.135124814 +0200 -@@ -16,9 +16,9 @@ - #include - #include - --#include "afp.h" --#include "dsi.h" --#include "utils.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/utils.h" - - #define SIGNAL_TO_USE SIGUSR2 - -diff -Naur afpfs-ng-0.8.1/lib/lowlevel.c afpfs-ng-0.8.1.patch/lib/lowlevel.c ---- afpfs-ng-0.8.1/lib/lowlevel.c 2008-02-20 02:33:17.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/lowlevel.c 2011-09-10 12:13:50.136124828 +0200 -@@ -19,10 +19,10 @@ - #else - #include - #endif --#include "afp.h" --#include "afp_protocol.h" --#include "codepage.h" --#include "utils.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/afp_protocol.h" -+#include "afpfs-ng/codepage.h" -+#include "afpfs-ng/utils.h" - #include "did.h" - #include "users.h" - -diff -Naur afpfs-ng-0.8.1/lib/map_def.c afpfs-ng-0.8.1.patch/lib/map_def.c ---- afpfs-ng-0.8.1/lib/map_def.c 2007-09-07 15:10:59.000000000 +0200 -+++ afpfs-ng-0.8.1.patch/lib/map_def.c 2011-09-10 12:13:50.136124828 +0200 -@@ -1,6 +1,6 @@ - #include --#include "afp.h" --#include "map_def.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/map_def.h" - - static char *afp_map_strings[] = { - "Unknown", -diff -Naur afpfs-ng-0.8.1/lib/meta.c afpfs-ng-0.8.1.patch/lib/meta.c ---- afpfs-ng-0.8.1/lib/meta.c 2008-01-04 04:52:44.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/meta.c 2011-09-10 12:13:50.137124841 +0200 -@@ -17,10 +17,10 @@ - #include - #include - --#include "afp.h" --#include "dsi.h" --#include "afp_protocol.h" --#include "utils.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp_protocol.h" -+#include "afpfs-ng/utils.h" - - - int afp_meta_getattr(const char *path, struct stat *stbuf) -diff -Naur afpfs-ng-0.8.1/lib/midlevel.c afpfs-ng-0.8.1.patch/lib/midlevel.c ---- afpfs-ng-0.8.1/lib/midlevel.c 2008-03-08 17:08:18.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/midlevel.c 2011-09-10 12:13:50.160125150 +0200 -@@ -10,7 +10,7 @@ - */ - - --#include "afp.h" -+#include "afpfs-ng/afp.h" - - #include - #include -@@ -28,9 +28,9 @@ - #include "users.h" - #include "did.h" - #include "resource.h" --#include "utils.h" --#include "codepage.h" --#include "midlevel.h" -+#include "afpfs-ng/utils.h" -+#include "afpfs-ng/codepage.h" -+#include "afpfs-ng/midlevel.h" - #include "afp_internal.h" - #include "forklist.h" - #include "uams.h" -diff -Naur afpfs-ng-0.8.1/lib/proto_attr.c afpfs-ng-0.8.1.patch/lib/proto_attr.c ---- afpfs-ng-0.8.1/lib/proto_attr.c 2008-01-30 05:37:58.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_attr.c 2011-09-10 12:13:50.168125257 +0200 -@@ -7,10 +7,10 @@ - - #include - #include --#include "dsi.h" --#include "afp.h" --#include "utils.h" --#include "afp_protocol.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" -+#include "afpfs-ng/afp_protocol.h" - #include "dsi_protocol.h" - - /* This is a new command, function 76. There are currently no docs, so this -diff -Naur afpfs-ng-0.8.1/lib/proto_desktop.c afpfs-ng-0.8.1.patch/lib/proto_desktop.c ---- afpfs-ng-0.8.1/lib/proto_desktop.c 2008-02-18 04:44:11.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_desktop.c 2011-09-10 12:13:50.168125257 +0200 -@@ -9,10 +9,10 @@ - #include - #include - --#include "dsi.h" --#include "afp.h" --#include "utils.h" --#include "afp_protocol.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" -+#include "afpfs-ng/afp_protocol.h" - #include "dsi_protocol.h" - - /* closedt, addicon, geticoninfo, addappl, removeappl */ -diff -Naur afpfs-ng-0.8.1/lib/proto_directory.c afpfs-ng-0.8.1.patch/lib/proto_directory.c ---- afpfs-ng-0.8.1/lib/proto_directory.c 2008-02-19 03:39:29.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_directory.c 2011-09-10 12:13:50.168125257 +0200 -@@ -9,10 +9,10 @@ - #include - #include - --#include "dsi.h" --#include "afp.h" --#include "utils.h" --#include "afp_protocol.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" -+#include "afpfs-ng/afp_protocol.h" - #include "dsi_protocol.h" - #include "afp_replies.h" - -diff -Naur afpfs-ng-0.8.1/lib/proto_files.c afpfs-ng-0.8.1.patch/lib/proto_files.c ---- afpfs-ng-0.8.1/lib/proto_files.c 2008-02-18 04:46:18.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_files.c 2011-09-10 12:13:50.169125270 +0200 -@@ -8,11 +8,11 @@ - - #include - #include --#include "dsi.h" --#include "afp.h" --#include "utils.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" - #include "dsi_protocol.h" --#include "afp_protocol.h" -+#include "afpfs-ng/afp_protocol.h" - #include "afp_internal.h" - - /* afp_setfileparms, afp_setdirparms and afpsetfiledirparms are all remarkably -diff -Naur afpfs-ng-0.8.1/lib/proto_fork.c afpfs-ng-0.8.1.patch/lib/proto_fork.c ---- afpfs-ng-0.8.1/lib/proto_fork.c 2008-01-30 05:37:58.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_fork.c 2011-09-10 12:13:50.169125270 +0200 -@@ -9,11 +9,11 @@ - #include - #include - --#include "dsi.h" --#include "afp.h" --#include "utils.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" - #include "dsi_protocol.h" --#include "afp_protocol.h" -+#include "afpfs-ng/afp_protocol.h" - - int afp_setforkparms(struct afp_volume * volume, - unsigned short forkid, unsigned short bitmap, unsigned long len) -diff -Naur afpfs-ng-0.8.1/lib/proto_login.c afpfs-ng-0.8.1.patch/lib/proto_login.c ---- afpfs-ng-0.8.1/lib/proto_login.c 2008-01-30 05:37:59.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_login.c 2011-09-10 12:13:50.169125270 +0200 -@@ -10,10 +10,10 @@ - - #include - #include --#include "dsi.h" -+#include "afpfs-ng/dsi.h" - #include "dsi_protocol.h" --#include "afp.h" --#include "utils.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" - #include "afp_internal.h" - - -diff -Naur afpfs-ng-0.8.1/lib/proto_map.c afpfs-ng-0.8.1.patch/lib/proto_map.c ---- afpfs-ng-0.8.1/lib/proto_map.c 2008-01-30 05:37:59.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_map.c 2011-09-10 12:13:50.170125283 +0200 -@@ -9,11 +9,11 @@ - #include - #include - --#include "dsi.h" --#include "afp.h" --#include "utils.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" - #include "dsi_protocol.h" --#include "afp_protocol.h" -+#include "afpfs-ng/afp_protocol.h" - - /* This is used to pass the return values back from afp_getuserinfo_reply() */ - struct uidgid { -diff -Naur afpfs-ng-0.8.1/lib/proto_replyblock.c afpfs-ng-0.8.1.patch/lib/proto_replyblock.c ---- afpfs-ng-0.8.1/lib/proto_replyblock.c 2008-02-18 04:46:19.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_replyblock.c 2011-09-10 12:13:50.170125283 +0200 -@@ -6,9 +6,9 @@ - */ - - #include --#include "dsi.h" --#include "afp.h" --#include "utils.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" - #include "afp_internal.h" - - -diff -Naur afpfs-ng-0.8.1/lib/proto_server.c afpfs-ng-0.8.1.patch/lib/proto_server.c ---- afpfs-ng-0.8.1/lib/proto_server.c 2008-02-19 02:56:21.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_server.c 2011-09-10 12:13:50.170125283 +0200 -@@ -7,12 +7,12 @@ - */ - #include - #include --#include "dsi.h" --#include "afp.h" --#include "utils.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" - #include "dsi_protocol.h" --#include "afp_protocol.h" --#include "codepage.h" -+#include "afpfs-ng/afp_protocol.h" -+#include "afpfs-ng/codepage.h" - #include "afp_internal.h" - - int afp_getsrvrparms(struct afp_server *server) -diff -Naur afpfs-ng-0.8.1/lib/proto_session.c afpfs-ng-0.8.1.patch/lib/proto_session.c ---- afpfs-ng-0.8.1/lib/proto_session.c 2008-02-18 04:46:19.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_session.c 2011-09-10 12:13:50.170125283 +0200 -@@ -8,10 +8,10 @@ - */ - #include - #include --#include "dsi.h" -+#include "afpfs-ng/dsi.h" - #include "dsi_protocol.h" --#include "afp.h" --#include "utils.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" - - int afp_getsessiontoken(struct afp_server * server, int type, - unsigned int timestamp, struct afp_token *outgoing_token, -diff -Naur afpfs-ng-0.8.1/lib/proto_volume.c afpfs-ng-0.8.1.patch/lib/proto_volume.c ---- afpfs-ng-0.8.1/lib/proto_volume.c 2008-02-18 04:47:48.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/proto_volume.c 2011-09-10 12:13:50.171125296 +0200 -@@ -8,13 +8,13 @@ - - #include - #include --#include "dsi.h" --#include "afp.h" --#include "utils.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" - #include "dsi_protocol.h" --#include "afp_protocol.h" -+#include "afpfs-ng/afp_protocol.h" - #include "afp_internal.h" --#include "codepage.h" -+#include "afpfs-ng/codepage.h" - - static int parse_volbitmap_reply(struct afp_server * server, - struct afp_volume * tmpvol, -diff -Naur afpfs-ng-0.8.1/lib/resource.c afpfs-ng-0.8.1.patch/lib/resource.c ---- afpfs-ng-0.8.1/lib/resource.c 2008-02-18 04:46:56.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/resource.c 2011-09-10 12:13:50.171125296 +0200 -@@ -3,11 +3,11 @@ - #include - #include - #include --#include "afp.h" -+#include "afpfs-ng/afp.h" - #include "resource.h" - #include "lowlevel.h" - #include "did.h" --#include "midlevel.h" -+#include "afpfs-ng/midlevel.h" - - #define appledouble ".AppleDouble" - #define finderinfo_string ".finderinfo" -diff -Naur afpfs-ng-0.8.1/lib/server.c afpfs-ng-0.8.1.patch/lib/server.c ---- afpfs-ng-0.8.1/lib/server.c 2008-02-19 02:56:21.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/server.c 2011-09-10 12:13:50.172125310 +0200 -@@ -8,15 +8,15 @@ - #include - #include - --#include "afp.h" --#include "dsi.h" --#include "utils.h" --#include "uams_def.h" --#include "codepage.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/utils.h" -+#include "afpfs-ng/uams_def.h" -+#include "afpfs-ng/codepage.h" - #include "users.h" --#include "libafpclient.h" -+#include "afpfs-ng/libafpclient.h" - #include "afp_internal.h" --#include "dsi.h" -+#include "afpfs-ng/dsi.h" - - - struct afp_server * afp_server_complete_connection( -diff -Naur afpfs-ng-0.8.1/lib/status.c afpfs-ng-0.8.1.patch/lib/status.c ---- afpfs-ng-0.8.1/lib/status.c 2008-03-08 17:08:38.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/status.c 2011-09-10 12:13:50.172125310 +0200 -@@ -1,8 +1,8 @@ - #include - #include --#include "map_def.h" --#include "dsi.h" --#include "afp.h" -+#include "afpfs-ng/map_def.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" - - int afp_status_header(char * text, int * len) - { -diff -Naur afpfs-ng-0.8.1/lib/uams.c afpfs-ng-0.8.1.patch/lib/uams.c ---- afpfs-ng-0.8.1/lib/uams.c 2008-01-04 04:52:44.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/uams.c 2011-09-10 12:13:50.173125324 +0200 -@@ -8,10 +8,10 @@ - - #include - #include --#include "dsi.h" --#include "afp.h" --#include "utils.h" --#include "uams_def.h" -+#include "afpfs-ng/dsi.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" -+#include "afpfs-ng/uams_def.h" - #include "config.h" - - #ifdef HAVE_LIBGCRYPT -diff -Naur afpfs-ng-0.8.1/lib/users.c afpfs-ng-0.8.1.patch/lib/users.c ---- afpfs-ng-0.8.1/lib/users.c 2008-02-18 04:48:56.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/users.c 2011-09-10 12:13:50.174125338 +0200 -@@ -3,8 +3,8 @@ - #include - #include - --#include "afp.h" --#include "map_def.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/map_def.h" - - /* How mapping works - * -diff -Naur afpfs-ng-0.8.1/lib/utils.c afpfs-ng-0.8.1.patch/lib/utils.c ---- afpfs-ng-0.8.1/lib/utils.c 2008-02-18 04:53:37.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/lib/utils.c 2011-09-10 12:13:50.174125338 +0200 -@@ -8,10 +8,10 @@ - #include - #include - #include --#include "afp.h" --#include "utils.h" -+#include "afpfs-ng/afp.h" -+#include "afpfs-ng/utils.h" - #include "afp_internal.h" --#include "afp_protocol.h" -+#include "afpfs-ng/afp_protocol.h" - - struct afp_path_header_long { - unsigned char type; -diff -Naur afpfs-ng-0.8.1/Makefile.am afpfs-ng-0.8.1.patch/Makefile.am ---- afpfs-ng-0.8.1/Makefile.am 2008-02-18 04:24:14.000000000 +0100 -+++ afpfs-ng-0.8.1.patch/Makefile.am 2011-09-10 12:13:50.176125365 +0200 -@@ -1,5 +1,5 @@ - if HAVE_LIBFUSE --SUBDIRS = lib fuse cmdline docs -+SUBDIRS = lib fuse cmdline include docs - else --SUBDIRS = lib cmdline docs -+SUBDIRS = lib cmdline include docs - endif diff --git a/tools/darwin/depends/autoconf/Makefile b/tools/darwin/depends/autoconf/Makefile deleted file mode 100644 index 8fd6fba5af5dd..0000000000000 --- a/tools/darwin/depends/autoconf/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.buildtools - -# lib name, version -APPNAME=autoconf -VERSION=2.63 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) - -APP=$(SOURCE)/bin/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - sed -ie "s/'libtoolize'/'glibtoolize'/" $(SOURCE)/bin/autoreconf.in - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/automake/Makefile b/tools/darwin/depends/automake/Makefile deleted file mode 100644 index d3017f29bb33e..0000000000000 --- a/tools/darwin/depends/automake/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include ../Makefile.buildtools - -# lib name, version -APPNAME=automake -VERSION=1.10.3 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) - -APP=$(SOURCE)/bin/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/boost/Makefile b/tools/darwin/depends/boost/Makefile deleted file mode 100644 index 4e331282e153f..0000000000000 --- a/tools/darwin/depends/boost/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -LIBNAME=boost -VERSION=1_44_0 -LIBVERSION=1.44.0 -SOURCE=$(LIBNAME)_$(VERSION) -ARCHIVE=$(SOURCE).tar.bz2 - -bjam_args = toolset=darwin-$(platform_gcc_version) -boost_flags = $(platform_sdk_path) -arch $(ARCH) -ifeq ("$(DARWIN)", "ios") - bjam_args += --architecture=arm target-os=iphone macosx-version=iphone-$(platform_sdk_version) define=_LITTLE_ENDIAN - # arm uses non-thread-safe compare-and-swap instruction so use posix thread primitives - boost_flags += -DBOOST_AC_USE_PTHREADS -DBOOST_SP_USE_PTHREADS -else - ifeq ("$(ARCH)", "ppc") - bjam_args += --architecture=$(boost_architecture)=power address-model=32 - else ifeq ("$(ARCH)", "i386") - bjam_args += --architecture=$(boost_architecture)=x86 address-model=32 - else - bjam_args += --architecture=$(boost_architecture)=x86 address-model=64 - endif - bjam_args += target-os=darwin --link=static -endif - -all: .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -.installed: $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - echo 'using darwin : $(platform_gcc_version) : $(platform_cxx) :' >> $(SOURCE)/tools/build/v2/user-config.jam - echo ' "-isysroot $(boost_flags) -fvisibility=default -fvisibility-inlines-hidden"' >> $(SOURCE)/tools/build/v2/user-config.jam - echo ' "-isysroot $(boost_flags) -fvisibility=default -fvisibility-inlines-hidden"' >> $(SOURCE)/tools/build/v2/user-config.jam - echo ' "-Wl,-syslibroot,$(boost_flags)"' >> $(SOURCE)/tools/build/v2/user-config.jam - echo ';' >> $(SOURCE)/tools/build/v2/user-config.jam - cd $(SOURCE); patch -p1 < ../add-arm-mem-barrier.patch - cd $(SOURCE); patch -p1 < ../fix-deprecated-swp.patch - cd $(SOURCE); ./bootstrap.sh --prefix=$(PREFIX) --with-libraries=thread,date_time - cd $(SOURCE); ./bjam --prefix=$(PREFIX) $(bjam_args) install - # boost builds .so instead of .dylib for iphone, fix it. - if test "$(DARWIN)" = "ios"; then \ - mv $(PREFIX)/lib/libboost_thread.so.$(LIBVERSION) $(PREFIX)/lib/libboost_thread.dylib; \ - rm $(PREFIX)/lib/libboost_thread.so; \ - mv $(PREFIX)/lib/libboost_date_time.so.$(LIBVERSION) $(PREFIX)/lib/libboost_date_time.dylib; \ - rm $(PREFIX)/lib/libboost_date_time.so; \ - fi - install_name_tool -id $(PREFIX)/lib/libboost_thread.dylib $(PREFIX)/lib/libboost_thread.dylib - install_name_tool -id $(PREFIX)/lib/libboost_date_time.dylib $(PREFIX)/lib/libboost_date_time.dylib - touch .installed - -clean: - rm -rf $(SOURCE) .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/boost/add-arm-mem-barrier.patch b/tools/darwin/depends/boost/add-arm-mem-barrier.patch deleted file mode 100644 index 86f8985ee2d28..0000000000000 --- a/tools/darwin/depends/boost/add-arm-mem-barrier.patch +++ /dev/null @@ -1,73 +0,0 @@ -From c87ad09331d239d6566e5eb409898ae38f04799a Mon Sep 17 00:00:00 2001 -From: Peter Dimov -Date: Mon, 7 Nov 2011 17:50:31 +0000 -Subject: [PATCH] Add ARM memory barriers. Refs #5372. - -SVN-Revision: 75389 ---- - boost/smart_ptr/detail/spinlock_gcc_arm.hpp | 23 ++++++++++++++++++++--- - 1 file changed, 20 insertions(+), 3 deletions(-) - -diff --git a/boost/smart_ptr/detail/spinlock_gcc_arm.hpp b/boost/smart_ptr/detail/spinlock_gcc_arm.hpp -index ba6c511..f58ea44 100644 ---- a/boost/smart_ptr/detail/spinlock_gcc_arm.hpp -+++ b/boost/smart_ptr/detail/spinlock_gcc_arm.hpp -@@ -2,7 +2,7 @@ - #define BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED - - // --// Copyright (c) 2008 Peter Dimov -+// Copyright (c) 2008, 2011 Peter Dimov - // - // Distributed under the Boost Software License, Version 1.0. - // See accompanying file LICENSE_1_0.txt or copy at -@@ -11,6 +11,20 @@ - - #include - -+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) -+ -+# define BOOST_SP_ARM_BARRIER "dmb" -+ -+#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) -+ -+# define BOOST_SP_ARM_BARRIER "mcr p15, 0, r0, c7, c10, 5" -+ -+#else -+ -+# define BOOST_SP_ARM_BARRIER "" -+ -+#endif -+ - namespace boost - { - -@@ -30,7 +44,8 @@ class spinlock - int r; - - __asm__ __volatile__( -- "swp %0, %1, [%2]": -+ "swp %0, %1, [%2]\n\t" -+ BOOST_SP_ARM_BARRIER : - "=&r"( r ): // outputs - "r"( 1 ), "r"( &v_ ): // inputs - "memory", "cc" ); -@@ -48,7 +63,7 @@ class spinlock - - void unlock() - { -- __asm__ __volatile__( "" ::: "memory" ); -+ __asm__ __volatile__( BOOST_SP_ARM_BARRIER ::: "memory" ); - *const_cast< int volatile* >( &v_ ) = 0; - } - -@@ -82,4 +97,6 @@ class spinlock - - #define BOOST_DETAIL_SPINLOCK_INIT {0} - -+#undef BOOST_SP_ARM_BARRIER -+ - #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED --- -1.7.10 - diff --git a/tools/darwin/depends/boost/fix-deprecated-swp.patch b/tools/darwin/depends/boost/fix-deprecated-swp.patch deleted file mode 100644 index de5888d737cf4..0000000000000 --- a/tools/darwin/depends/boost/fix-deprecated-swp.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 8d1ba081260f98d879759433a9d7248d6bd98966 Mon Sep 17 00:00:00 2001 -From: Peter Dimov -Date: Mon, 12 Mar 2012 17:31:21 +0000 -Subject: [PATCH] Apply patch from #5331. Refs #5331. - -SVN-Revision: 77315 ---- - boost/smart_ptr/detail/spinlock_gcc_arm.hpp | 29 +++++++++++++++++++++++++-- - 1 file changed, 27 insertions(+), 2 deletions(-) - -diff --git a/boost/smart_ptr/detail/spinlock_gcc_arm.hpp b/boost/smart_ptr/detail/spinlock_gcc_arm.hpp -index f58ea44..f1bbaf6 100644 ---- a/boost/smart_ptr/detail/spinlock_gcc_arm.hpp -+++ b/boost/smart_ptr/detail/spinlock_gcc_arm.hpp -@@ -43,13 +43,38 @@ class spinlock - { - int r; - -+#if defined(__ARM_ARCH_6__) \ -+ || defined(__ARM_ARCH_6J__) \ -+ || defined(__ARM_ARCH_6K__) \ -+ || defined(__ARM_ARCH_6Z__) \ -+ || defined(__ARM_ARCH_6ZK__) \ -+ || defined(__ARM_ARCH_6T2__) \ -+ || defined(__ARM_ARCH_7__) \ -+ || defined(__ARM_ARCH_7A__) \ -+ || defined(__ARM_ARCH_7R__) \ -+ || defined(__ARM_ARCH_7M__) \ -+ || defined(__ARM_ARCH_7EM__) -+ -+ __asm__ __volatile__( -+ "ldrex %0, [%2]; \n" -+ "cmp %0, %1; \n" -+ "strexne %0, %1, [%2]; \n" -+ BOOST_SP_ARM_BARRIER : -+ "=&r"( r ): // outputs -+ "r"( 1 ), "r"( &v_ ): // inputs -+ "memory", "cc" ); -+ -+#else -+ - __asm__ __volatile__( -- "swp %0, %1, [%2]\n\t" -- BOOST_SP_ARM_BARRIER : -+ "swp %0, %1, [%2];\n" -+ BOOST_SP_ARM_BARRIER : - "=&r"( r ): // outputs - "r"( 1 ), "r"( &v_ ): // inputs - "memory", "cc" ); - -+#endif -+ - return r == 0; - } - --- -1.7.10 - diff --git a/tools/darwin/depends/bootstrap b/tools/darwin/depends/bootstrap deleted file mode 100755 index 25d958da2f190..0000000000000 --- a/tools/darwin/depends/bootstrap +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -mkdir -p /Users/Shared/xbmc-depends/toolchain -mkdir -p /Users/Shared/xbmc-depends/tarballs -export PATH="/Users/Shared/xbmc-depends/toolchain/bin:${PATH}" - -# check if we can autoconf -type -P autoconf &>/dev/null && has_autoconf=yes || has_autoconf=no - -if test "$has_autoconf" = "no"; then - # if not then prebuild our autoconf. - echo "autoconf not found, pre-building autoconf" - make -C m4 - make -C help2man - make -C autoconf -fi - -autoconf diff --git a/tools/darwin/depends/cmake/Makefile b/tools/darwin/depends/cmake/Makefile deleted file mode 100644 index 94aeb846840ad..0000000000000 --- a/tools/darwin/depends/cmake/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.include - -# lib name, version -APPNAME=cmake -VERSION=2.8.8 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz -BASE_URL=http://www.cmake.org/files/v2.8 - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./bootstrap --prefix=$(TOOLCHAIN) - -APP=$(SOURCE)/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/config.site_ios.in b/tools/darwin/depends/config.site_ios.in deleted file mode 100644 index 5ca22f93c6457..0000000000000 --- a/tools/darwin/depends/config.site_ios.in +++ /dev/null @@ -1,134 +0,0 @@ -case @use_xcode@ in - 3.*.*) - platform_cc=gcc-4.2 - platform_cpp=cpp-4.2 - platform_cxx=g++-4.2 - ;; - *) - platform_cc=llvm-gcc-4.2 - platform_cpp="llvm-gcc-4.2 -E" - platform_cxx=llvm-g++-4.2 - ;; -esac -platform_gnu=gnu99 -platform_gcc_version=4.2 -platform_sdk_version=@use_sdk@ -platform_min_version="iphoneos-version-min=4.2" - -host_alias=arm-apple-darwin10 - -cross_compiling=yes - -platform_path="@use_xcodepath@/Platforms/iPhoneOS.platform/Developer" -platform_os_cflags="-arch @use_arch@ -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -Wno-trigraphs -fpascal-strings -O3 -Wreturn-type -Wunused-variable -fmessage-length=0 -gdwarf-2" -platform_os_ldflags="-arch @use_arch@ -mcpu=cortex-a8" -platform_sdk_path=@use_sdk_path@ - -export NM=${platform_path}/usr/bin/nm -export CPP=${platform_path}/usr/bin/${platform_cpp} -export CXXCPP=${CPP} -export CPPFLAGS="${CPPFLAGS} -no-cpp-precomp -I${prefix}/include -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" -export CC=${platform_path}/usr/bin/${platform_cc} -export CFLAGS="${CFLAGS} -std=gnu99 -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -I${platform_sdk_path}/usr/include" -export LD=${platform_path}/usr/bin/ld -export LDFLAGS="${LDFLAGS} -m${platform_min_version} -isysroot ${platform_sdk_path} -L${platform_sdk_path}/usr/lib -L${platform_sdk_path}/usr/lib/system ${platform_os_ldflags} -L${prefix}/lib" -export CXX=${platform_path}/usr/bin/${platform_cxx} -export CXXFLAGS="${CXXFLAGS} -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" -export AR=${platform_path}/usr/bin/ar -export AS="@use_toolchain@/bin/gas-preprocessor.pl ${CC}" -export M4=@use_toolchain@/bin/m4 -export CCAS="--tag CC @use_toolchain@/bin/gas-preprocessor.pl ${CC}" -export STRIP=${platform_path}/usr/bin/strip -export RANLIB=${platform_path}/usr/bin/ranlib -export SWIG_EXE=@use_toolchain@/bin/swig -export JAVA_EXE=/usr/bin/java -export JAVE_HOME=`/usr/libexec/java_home` -export ACLOCAL="@use_toolchain@/bin/aclocal -I ${prefix}/share/aclocal -I @use_toolchain@/share/aclocal" -export LIBTOOL=@use_toolchain@/bin/glibtool -export LIBTOOLIZE=@use_toolchain@/bin/glibtoolize -export PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${platform_sdk_path}/usr/lib/pkgconfig -export PATH="@use_toolchain@/bin:${prefix}/bin:${platform_path}/usr/bin:/Developer/usr/bin:${PATH}" -export YASM=@use_toolchain@/bin/yasm - -# tweaks for samba -if test "${PACKAGE_NAME}" = "Samba" ; then - # disable python support - export PYTHON_VER=0.0 - # ios/osx-10.6 issue with collision of _MD5 exported from a system lib - export LDFLAGS="${LDFLAGS} -Wl,-unexported_symbol,_MD5* -lc" - # uses OPT instead of CFLAGS - export OPT="${CFLAGS}" - # various configure overrides - ac_cv_header_libunwind_h=no - ac_cv_header_execinfo_h=no - ac_cv_header_rpcsvc_ypclnt_h=no - ac_cv_file__proc_sys_kernel_core_pattern=no - libreplace_cv_HAVE_GETADDRINFO=no - libreplace_cv_HAVE_C99_VSNPRINTF=yes - samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=no - samba_cv_CC_NEGATIVE_ENUM_VALUES=yes -fi - -# tweaks for python -if test "${PACKAGE_NAME}" = "python" ; then - export CC="${CC} -arch armv7" - export LD="${LD} -arch armv7" - export CPPFLAGS="${CPPFLAGS} -I${platform_sdk_path}/usr/include" -fi - -# tweaks for readline -if test "${PACKAGE_NAME}" = "readline" ; then - ac_cv_header_termcap_h=no -fi - -# tweaks for fontconfig -if test "${ac_unique_file}" = "fonts.dtd" ; then - with_arch=arm -fi - -# tweaks for flac -if test "${ac_unique_file}" = "src/flac/main.c" ; then - # compiler barfs if we use -O3/O2 for flac - export CFLAGS=`echo ${CFLAGS} | sed 's/-O3/-Os/'` - export CPPFLAGS=`echo ${CPPFLAGS} | sed 's/-O3/-Os/'` -fi - -# tweaks for curl -if test "${PACKAGE_NAME}" = "curl" ; then - ac_cv_file___dev_urandom_=yes -fi - -# tweaks for libmpeg2 -if test "${PACKAGE_NAME}" = "libmpeg2" ; then - export LDFLAGS="${LDFLAGS} -Wl,-read_only_relocs,suppress" -fi - -# tweaks for libcdio -if test "${PACKAGE_NAME}" = "libcdio" ; then - with_cd_drive=no - with_cd_info=no - with_cd_read=no - with_cd_paranoia=no - with_cdda_player=no - with_iso_info=no - with_iso_read=no -fi - -# tweaks for libgcrypt -if test "${PACKAGE_NAME}" = "libgcrypt" ; then - export CFLAGS="${CFLAGS} -fgnu89-inline" -fi - -# tweaks for libjpeg-turbo -if test "${PACKAGE_NAME}" = "libjpeg-turbo" ; then - export CCAS="${AS}" - export CFLAGS="${CFLAGS} -fexceptions" -fi - -# tweaks for libffi (ios must use llvm-gcc-4.2) -if test "${PACKAGE_NAME}" = "libffi" ; then - export CC="${platform_path}/usr/bin/llvm-gcc-4.2" - export CPP="${platform_path}/usr/bin/llvm-gcc-4.2 -E" - unset AS - unset CCAS -fi diff --git a/tools/darwin/depends/config.site_ios.mk.in b/tools/darwin/depends/config.site_ios.mk.in deleted file mode 100644 index 5390a950f655b..0000000000000 --- a/tools/darwin/depends/config.site_ios.mk.in +++ /dev/null @@ -1,50 +0,0 @@ -xcode3_chk=case @use_xcode@ in 3.*.*) echo 1 ;; *) echo 0 ;; esac -ifeq ($(shell $(xcode3_chk)) , 1) - platform_cc=gcc-4.2 - platform_cpp=cpp-4.2 - platform_cxx=g++-4.2 -else - platform_cc=llvm-gcc-4.2 - platform_cpp=llvm-gcc-4.2 -E - platform_cxx=llvm-g++-4.2 -endif -platform_gnu=gnu99 -platform_gcc_version=4.2 -platform_sdk_version=@use_sdk@ -platform_min_version=iphoneos-version-min=4.2 - -host_alias=arm-apple-darwin10 - -cross_compiling=yes - -platform_path=@use_xcodepath@/Platforms/iPhoneOS.platform/Developer -platform_xcode_path=@use_xcodepath@ -platform_os_cflags=-arch @use_arch@ -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -Wno-trigraphs -fpascal-strings -O3 -Wreturn-type -Wunused-variable -fmessage-length=0 -gdwarf-2 -platform_os_ldflags=-arch @use_arch@ -mcpu=cortex-a8 -platform_sdk_path=@use_sdk_path@ - -export NM=${platform_path}/usr/bin/nm -export CPP=${platform_path}/usr/bin/${platform_cpp} -export CXXCPP=${CPP} -export CPPFLAGS+=-no-cpp-precomp -I${PREFIX}/include -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -export CC=${platform_path}/usr/bin/${platform_cc} -export CFLAGS+=-std=gnu99 -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -I${platform_sdk_path}/usr/include -export LD=${platform_path}/usr/bin/ld -export LDFLAGS+=-m${platform_min_version} -isysroot ${platform_sdk_path} -L${platform_sdk_path}/usr/lib -L${platform_sdk_path}/usr/lib/system ${platform_os_ldflags} -L${PREFIX}/lib -export CXX=${platform_path}/usr/bin/${platform_cxx} -export CXXFLAGS+=-m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -export AR=${platform_path}/usr/bin/ar -export AS=@use_toolchain@/bin/gas-preprocessor.pl ${CC} -export M4=@use_toolchain@/bin/m4 -export CCAS=--tag CC @use_toolchain@/bin/gas-preprocessor.pl ${CC} -export STRIP=${platform_path}/usr/bin/strip -export RANLIB=${platform_path}/usr/bin/ranlib -export SWIG_EXE=@use_toolchain@/bin/swig -export JAVA_EXE=/usr/bin/java -export JAVE_HOME=`/usr/libexec/java_home` -export ACLOCAL=@use_toolchain@/bin/aclocal -I ${PREFIX}/share/aclocal -I @use_toolchain@/share/aclocal -export LIBTOOL=@use_toolchain@/bin/glibtool -export LIBTOOLIZE=@use_toolchain@/bin/glibtoolize -export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:${platform_sdk_path}/usr/lib/pkgconfig -export PATH:=@use_toolchain@/bin:${PREFIX}/bin:${platform_path}/usr/bin:/Developer/usr/bin:${PATH} -export YASM=@use_toolchain@/bin/yasm diff --git a/tools/darwin/depends/config.site_osx.in b/tools/darwin/depends/config.site_osx.in deleted file mode 100644 index 89c1735cd545f..0000000000000 --- a/tools/darwin/depends/config.site_osx.in +++ /dev/null @@ -1,103 +0,0 @@ -# setup the host_alias, gcc version based on sdk and arch -if test "@use_sdk@" = "10.4" ; then - if test "@use_arch@" = "ppc" ; then - host_alias=powerpc-apple-darwin8 - else - host_alias=i386-apple-darwin8 - fi - platform_gnu=gnu89 - platform_cc=gcc-4.0 - platform_cpp=cpp-4.0 - platform_cxx=g++-4.0 - platform_gcc_version=4.0 - platform_sdk_version=@use_sdk@u - export MACOSX_DEPLOYMENT_TARGET=10.4 - platform_min_version=macosx-version-min=10.4 -else - case @use_xcode@ in - 3.*.*) - platform_cc=gcc-4.2 - platform_cpp=cpp-4.2 - platform_cxx=g++-4.2 - ;; - *) - platform_cc=llvm-gcc-4.2 - platform_cpp="llvm-gcc-4.2 -E" - platform_cxx=llvm-g++-4.2 - ;; - esac - platform_gnu=gnu99 - platform_gcc_version=4.2 - platform_sdk_version=@use_sdk@ - host_alias=@use_arch@-apple-darwin - export MACOSX_DEPLOYMENT_TARGET=10.6 - platform_min_version=macosx-version-min=10.6 -fi - -platform_path=@use_xcodepath@ -platform_os_cflags="-arch @use_arch@ -no_compact_linkedit" -platform_os_ldflags="-arch @use_arch@ -Wl,-arch,@use_arch@ -no_compact_linkedit" -platform_sdk_path=@use_sdk_path@ - -export NM=${platform_path}/usr/bin/nm -export CPP=${platform_path}/usr/bin/${platform_cpp} -export CXXCPP=${CPP} -export CPPFLAGS="${CPPFLAGS} -no-cpp-precomp -I${prefix}/include -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" -export CC=/usr/bin/${platform_cc} -export CFLAGS="${CFLAGS} -std=${platform_gnu} -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" -export LD=${platform_path}/usr/bin/ld -export LDFLAGS="${LDFLAGS} -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_ldflags} -L${prefix}/lib" -export CXX=/usr/bin/${platform_cxx} -export CXXFLAGS="${CXXFLAGS} -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" -export AR=${platform_path}/usr/bin/ar -export AS=${platform_path}/usr/bin/as -export M4=@use_toolchain@/bin/m4 -export STRIP=${platform_path}/usr/bin/strip -export RANLIB=${platform_path}/usr/bin/ranlib -export SWIG_EXE=@use_toolchain@/bin/swig -export JAVA_EXE=/usr/bin/java -export JAVE_HOME=`/usr/libexec/java_home` -export ACLOCAL="@use_toolchain@/bin/aclocal -I ${prefix}/share/aclocal -I @use_toolchain@/share/aclocal" -export LIBTOOL=@use_toolchain@/bin/glibtool -export LIBTOOLIZE=@use_toolchain@/bin/glibtoolize -export PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${platform_sdk_path}/usr/lib/pkgconfig -export PATH="@use_toolchain@/bin:${prefix}/bin:${platform_path}/usr/bin:/Developer/usr/bin:${PATH}" -export YASM=@use_toolchain@/bin/yasm - -# tweaks for samba -if test "${PACKAGE_NAME}" = "Samba" ; then - # disable python support - export PYTHON_VER=0.0 - # ios/osx-10.6 issue with collision of _MD5 exported from a system lib - export LDFLAGS="${LDFLAGS} -Wl,-unexported_symbol,_MD5* -lc" - # uses OPT instead of CFLAGS - export OPT="${CFLAGS}" - # various configure overrides - samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=no - ac_cv_header_libunwind_h=no - ac_cv_header_execinfo_h=no - # fixes crash on 10.6 if xbmc is built using 10.7 SDK with 10.6 min - ac_cv_func_vdprintf=no -fi - -# tweaks for mysql -if test "${PACKAGE_NAME}" = "MySQL Server" ; then - # fixes crash on 10.6 if xbmc is built using 10.7 SDK with 10.6 min - ac_cv_func_strnlen=no -fi - -# tweaks for python -if test "${PACKAGE_NAME}" = "python" ; then - export OPT="${CFLAGS}" -fi - -# tweaks for libogg / libvorbis -if test "${PACKAGE_NAME}" = "libogg" || test "${PACKAGE_NAME}" = "libvorbis" ; then - export CFLAGS="${CFLAGS} -O" -fi - -# tweaks for libjpeg-turbo -if test "${PACKAGE_NAME}" = "libjpeg-turbo" ; then - export NASM="@use_toolchain@/bin/yasm" - export CFLAGS="${CFLAGS} -fexceptions" -fi diff --git a/tools/darwin/depends/config.site_osx.mk.in b/tools/darwin/depends/config.site_osx.mk.in deleted file mode 100644 index e8b9a5e0fa6f2..0000000000000 --- a/tools/darwin/depends/config.site_osx.mk.in +++ /dev/null @@ -1,62 +0,0 @@ -ifeq ("@use_sdk@", "10.4") - ifeq ("@use_arch@", "ppc") - host_alias=powerpc-apple-darwin8 - else - host_alias=i386-apple-darwin8 - endif - platform_gnu=gnu89 - platform_cc=gcc-4.0 - platform_cpp=cpp-4.0 - platform_cxx=g++-4.0 - platform_gcc_version=4.0 - platform_sdk_version=@use_sdk@u - export MACOSX_DEPLOYMENT_TARGET=10.4 - platform_min_version=macosx-version-min=10.4 -else - xcode3_chk=case @use_xcode@ in 3.*.*) echo 1 ;; *) echo 0 ;; esac - ifeq ($(shell $(xcode3_chk)) , 1) - platform_cc=gcc-4.2 - platform_cpp=cpp-4.2 - platform_cxx=g++-4.2 - else - platform_cc=llvm-gcc-4.2 - platform_cpp=llvm-gcc-4.2 -E - platform_cxx=llvm-g++-4.2 - endif - platform_gnu=gnu99 - platform_gcc_version=4.2 - platform_sdk_version=@use_sdk@ - host_alias=@use_arch@-apple-darwin - export MACOSX_DEPLOYMENT_TARGET=10.6 - platform_min_version=macosx-version-min=10.6 -endif - -platform_path=@use_xcodepath@ -platform_os_cflags=-arch @use_arch@ -no_compact_linkedit -platform_os_ldflags=-arch @use_arch@ -no_compact_linkedit -platform_sdk_path=@use_sdk_path@ - -export NM=${platform_path}/usr/bin/nm -export CPP=${platform_path}/usr/bin/${platform_cpp} -export CXXCPP=${CPP} -export CPPFLAGS+=-no-cpp-precomp -I${PREFIX}/include -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -export CC=/usr/bin/${platform_cc} -export CFLAGS+=-std=${platform_gnu} -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -export LD=${platform_path}/usr/bin/ld -export LDFLAGS+=-m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_ldflags} -L${PREFIX}/lib -export CXX=/usr/bin/${platform_cxx} -export CXXFLAGS+=-m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -export AR=${platform_path}/usr/bin/ar -export AS=${platform_path}/usr/bin/as -export M4=@use_toolchain@/bin/m4 -export STRIP=${platform_path}/usr/bin/strip -export RANLIB=${platform_path}/usr/bin/ranlib -export SWIG_EXE=@use_toolchain@/bin/swig -export JAVA_EXE=/usr/bin/java -export JAVE_HOME=`/usr/libexec/java_home` -export ACLOCAL=@use_toolchain@/bin/aclocal -I ${PREFIX}/share/aclocal -I @use_toolchain@/share/aclocal -export LIBTOOL=@use_toolchain@/bin/glibtool -export LIBTOOLIZE=@use_toolchain@/bin/glibtoolize -export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:${platform_sdk_path}/usr/lib/pkgconfig -export PATH:=@use_toolchain@/bin:${PREFIX}/bin:${platform_path}/usr/bin:/Developer/usr/bin:${PATH} -export YASM=@use_toolchain@/bin/yasm diff --git a/tools/darwin/depends/configure.in b/tools/darwin/depends/configure.in deleted file mode 100644 index 4159ed7d90729..0000000000000 --- a/tools/darwin/depends/configure.in +++ /dev/null @@ -1,129 +0,0 @@ -AC_PREREQ(2.59) -AC_INIT([darwin-depends], [2.00], [http://trac.xbmc.org]) - -AC_ARG_WITH([darwin], - [AS_HELP_STRING([--with-darwin], - [build depend libs for darwin osx (default) or ios.])], - [use_darwin=$withval], - [use_darwin=missing]) - -AC_ARG_WITH([arch], - [AS_HELP_STRING([--with-arch], - [build depend libs for arch i386 (default osx), x86_64, ppc or armv7 (default ios).])], - [use_arch=$withval],) - -AC_ARG_WITH([sdk], - [AS_HELP_STRING([--with-sdk], - [build depend libs using sdk 10.6 (default osx) or 4.2 (default ios).])], - [use_sdk=$withval],) - -use_staging="/Users/Shared/xbmc-depends" - -# find xcodebuild and xcodepath by xcode-select -# else test in Xcode.app, if not there, fall back to normal location -if [[ -f "/usr/bin/xcode-select" ]]; then - use_xcodepath=`/usr/bin/xcode-select -print-path` - use_xcodebuild="$use_xcodepath/usr/bin/xcodebuild" -else - use_xcodepath="/Applications/Xcode.app/Contents/Developer" - use_xcodebuild="/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild" - if [[ ! -f "$use_xcodebuild" ]]; then - use_xcodepath="/Developer" - use_xcodebuild="/usr/bin/xcodebuild" - fi -fi -AC_MSG_RESULT(found xcodebuild at $use_xcodebuild) -use_xcode=[`$use_xcodebuild -version | grep Xcode | awk '{ print $2}'`] - -OUTPUT_FILES="Makefile Makefile.include" -case $use_darwin in - osx) - use_arch="${use_arch:-i386}" - if test "$use_arch" = "armv7"; then - AC_MSG_ERROR(error in configure of --with-arch=$use_arch) - fi - found_sdk_version=[`$use_xcodebuild -showsdks | grep macosx | sort | tail -n 1 | grep -oE 'macosx[0-9.0-9]+' | cut -c 7-$NF`] - use_sdk="${use_sdk:-$found_sdk_version}" - case $use_sdk in - 10.5);; - 10.6);; - 10.7);; - 10.8);; - *) - AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk) - esac - sdk_name=macosx$use_sdk - use_prefix=${use_staging}/${sdk_name}_${use_arch} - CONFIG_SITE=" [config.site:config.site_osx.in]" - MK_CONFIG_SITE=" [config.site.mk:config.site_osx.mk.in]" - ;; - ios) - use_arch="${use_arch:-armv7}" - if test "$use_arch" != "armv7"; then - AC_MSG_ERROR(error in configure of --with-arch=$use_arch) - fi - found_sdk_version=[`$use_xcodebuild -showsdks | grep iphoneos | sort | tail -n 1 | awk '{ print $2}'`] - use_sdk="${use_sdk:-$found_sdk_version}" - case $use_sdk in - 4.*);; - 5.*);; - 6.*);; - *) - AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk) - esac - sdk_name=iphoneos$use_sdk - use_prefix=${use_staging}/${sdk_name}_${use_arch} - CONFIG_SITE=" [config.site:config.site_ios.in]" - MK_CONFIG_SITE=" [config.site.mk:config.site_ios.mk.in]" - ;; - *) - AC_MSG_ERROR([error in configure, missing or incorrect --with-darwin arg]) - ;; -esac - -use_sdk_path=[`$use_xcodebuild -version -sdk $sdk_name | grep ^Path | awk '{ print $2}'`] - -AC_MSG_RESULT(configuring for darwin $sdk_name) -AC_MSG_RESULT(using the sdk path of $use_sdk_path) -AC_MSG_RESULT(creating hostroot at $use_staging) - -OUTPUT_FILES+=${CONFIG_SITE} -OUTPUT_FILES+=${MK_CONFIG_SITE} - -use_toolchain=${use_staging}/toolchain -AC_MSG_RESULT(creating build toolchain at $use_toolchain) -mkdir -p ${use_toolchain} - -AC_MSG_RESULT(creating tarball storage at $use_staging/tarballs) -mkdir -p ${use_staging}/tarballs - -AC_MSG_RESULT(creating hostroot directories at $use_prefix) -mkdir -p ${use_prefix}/bin -mkdir -p ${use_prefix}/lib -mkdir -p ${use_prefix}/slib -mkdir -p ${use_prefix}/share -mkdir -p ${use_prefix}/share/aclocal -mkdir -p ${use_prefix}/include - - -AC_SUBST(use_xcode) -AC_SUBST(use_xcodepath) - -AC_SUBST(use_sdk) -AC_SUBST(use_arch) -AC_SUBST(use_darwin) -AC_SUBST(use_prefix) -AC_SUBST(use_staging) -AC_SUBST(use_sdk_path) -AC_SUBST(use_toolchain) - -AC_CONFIG_FILES([${OUTPUT_FILES}]) - -AC_OUTPUT - -AC_MSG_RESULT(setting up config.site files) -cp config.site ${use_prefix}/share/config.site - -AC_MSG_RESULT(setting up python26 Makefile) -cp python26/Makefile.${use_darwin} python26/Makefile - diff --git a/tools/darwin/depends/curl/Makefile b/tools/darwin/depends/curl/Makefile deleted file mode 100644 index 48f0f9a0e3601..0000000000000 --- a/tools/darwin/depends/curl/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=curl -VERSION=7.21.6 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.bz2 - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) -CONFIGURE_IOS=$(CONFIGURE) --with-random=/dev/urandom - -LIBDYLIB=$(SOURCE)/.libs/(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore -ifeq ($(ARCH),armv7) - cd $(SOURCE); $(CONFIGURE_IOS) -else - cd $(SOURCE); $(CONFIGURE) -endif - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/distribute/Makefile b/tools/darwin/depends/distribute/Makefile deleted file mode 100644 index 7b1b5954db5da..0000000000000 --- a/tools/darwin/depends/distribute/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -include ../Makefile.include - -# lib name, version -APPNAME=distribute -VERSION=0.6.21 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) - -APP=$(SOURCE)/bin/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - -$(APPBIN): $(SOURCE) - cd $(SOURCE); $(TOOLCHAIN)/bin/python setup.py install --prefix=$(TOOLCHAIN) - -clean: - rm -rf $(SOURCE) - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/distutilscross/Makefile b/tools/darwin/depends/distutilscross/Makefile deleted file mode 100644 index 63527081eea99..0000000000000 --- a/tools/darwin/depends/distutilscross/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -include ../Makefile.include - -# lib name, version -APPNAME=distutilscross -VERSION=0.1 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) - -APP=$(SOURCE)/bin/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - -$(APPBIN): $(SOURCE) - cd $(SOURCE); $(TOOLCHAIN)/bin/python setup.py install --prefix=$(TOOLCHAIN) - -clean: - rm -rf $(SOURCE) - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/dpkg/Makefile b/tools/darwin/depends/dpkg/Makefile deleted file mode 100644 index 610e7af7e8272..0000000000000 --- a/tools/darwin/depends/dpkg/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -include ../Makefile.include - -# lib name, version -APPNAME=dpkg -VERSION=1.14.30 -SOURCE=$(APPNAME)_$(VERSION) -SOURCE_DEBIAN=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -export LIBTOOL=builds/unix/libtool -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) \ - --enable-static --disable-shared \ - ac_cv_header_libintl_h=no - -APPBIN=$(TOOLCHAIN)/bin/dpkg-deb - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE_DEBIAN): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE_DEBIAN) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE_DEBIAN) > .gitignore - cd $(SOURCE_DEBIAN); $(CONFIGURE) - -$(APPNAME): $(SOURCE_DEBIAN) - make -C $(SOURCE_DEBIAN)/lib CFLAGS="" LDFLAGS="" - make -C $(SOURCE_DEBIAN)/libcompat CFLAGS="" LDFLAGS="" - make -C $(SOURCE_DEBIAN)/src CFLAGS="" LDFLAGS="" - make -C $(SOURCE_DEBIAN)/dpkg-deb CFLAGS="" LDFLAGS="" - -$(APPBIN): - make $(APPNAME) - make -C $(SOURCE_DEBIAN)/dpkg-deb install - -clean: - make -C $(SOURCE_DEBIAN) clean - -distclean:: - rm -rf $(SOURCE_DEBIAN) - diff --git a/tools/darwin/depends/expat/Makefile b/tools/darwin/depends/expat/Makefile deleted file mode 100644 index cb51291d2f4ea..0000000000000 --- a/tools/darwin/depends/expat/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=expat -VERSION=2.0.1 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/.libs/(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/fontconfig/01-fontconfig-cross-compile-fix.patch b/tools/darwin/depends/fontconfig/01-fontconfig-cross-compile-fix.patch deleted file mode 100644 index 334cbbaf81d16..0000000000000 --- a/tools/darwin/depends/fontconfig/01-fontconfig-cross-compile-fix.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -Naur fontconfig-2.6.0.orig/doc/Makefile.am fontconfig-2.6.0/doc/Makefile.am ---- fontconfig-2.6.0.orig/doc/Makefile.am 2007-11-06 01:05:37.000000000 +0100 -+++ fontconfig-2.6.0/doc/Makefile.am 2010-05-22 00:03:00.000000000 +0200 -@@ -21,9 +21,10 @@ - # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - # PERFORMANCE OF THIS SOFTWARE. - --CC = @CC_FOR_BUILD@ - EXEEXT = @EXEEXT_FOR_BUILD@ --LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ -+ $(CPPFLAGS_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) -+LINK = $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ - - DOC_SRC = $(srcdir) - DOC_MODULE = fontconfig -diff -Naur fontconfig-2.6.0.orig/fc-arch/Makefile.am fontconfig-2.6.0/fc-arch/Makefile.am ---- fontconfig-2.6.0.orig/fc-arch/Makefile.am 2008-01-02 17:44:39.000000000 +0100 -+++ fontconfig-2.6.0/fc-arch/Makefile.am 2010-05-21 23:59:18.000000000 +0200 -@@ -22,9 +22,10 @@ - # PERFORMANCE OF THIS SOFTWARE. - # - --CC = @CC_FOR_BUILD@ - EXEEXT = @EXEEXT_FOR_BUILD@ --LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ -+ $(CPPFLAGS_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) -+LINK = $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ - - INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS) - -diff -Naur fontconfig-2.6.0.orig/fc-case/Makefile.am fontconfig-2.6.0/fc-case/Makefile.am ---- fontconfig-2.6.0.orig/fc-case/Makefile.am 2010-05-21 23:55:02.000000000 +0200 -+++ fontconfig-2.6.0/fc-case/Makefile.am 2010-05-22 00:04:09.000000000 +0200 -@@ -22,9 +22,10 @@ - # PERFORMANCE OF THIS SOFTWARE. - # - --CC = @CC_FOR_BUILD@ - EXEEXT = @EXEEXT_FOR_BUILD@ --LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ -+ $(CPPFLAGS_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) -+LINK = $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ - - INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS) - -diff -Naur fontconfig-2.6.0.orig/fc-glyphname/Makefile.am fontconfig-2.6.0/fc-glyphname/Makefile.am ---- fontconfig-2.6.0.orig/fc-glyphname/Makefile.am 2008-01-02 17:44:39.000000000 +0100 -+++ fontconfig-2.6.0/fc-glyphname/Makefile.am 2010-05-22 00:04:54.000000000 +0200 -@@ -22,9 +22,10 @@ - # PERFORMANCE OF THIS SOFTWARE. - # - --CC = @CC_FOR_BUILD@ - EXEEXT = @EXEEXT_FOR_BUILD@ --LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ -+ $(CPPFLAGS_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) -+LINK = $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ - - INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS) - -diff -Naur fontconfig-2.6.0.orig/fc-lang/Makefile.am fontconfig-2.6.0/fc-lang/Makefile.am ---- fontconfig-2.6.0.orig/fc-lang/Makefile.am 2008-01-02 17:44:39.000000000 +0100 -+++ fontconfig-2.6.0/fc-lang/Makefile.am 2010-05-22 00:05:44.000000000 +0200 -@@ -22,9 +22,10 @@ - # PERFORMANCE OF THIS SOFTWARE. - # - --CC = @CC_FOR_BUILD@ - EXEEXT = @EXEEXT_FOR_BUILD@ --LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ -+ $(CPPFLAGS_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) -+LINK = $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ - - INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS) - diff --git a/tools/darwin/depends/fontconfig/Makefile b/tools/darwin/depends/fontconfig/Makefile deleted file mode 100644 index aad48491c3f84..0000000000000 --- a/tools/darwin/depends/fontconfig/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=fontconfig -VERSION=2.8.0 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-libxml2 --disable-docs \ - --with-freetype-config=$(PREFIX)/bin/freetype-config - -LIBDYLIB=$(SOURCE)/.libs/lib$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p1 < ../01-fontconfig-cross-compile-fix.patch - cd $(SOURCE); autoreconf -vif - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/freetype2/Makefile b/tools/darwin/depends/freetype2/Makefile deleted file mode 100644 index 7eb8bdef4907d..0000000000000 --- a/tools/darwin/depends/freetype2/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=freetype -VERSION=2.4.7 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.bz2 - -# configuration settings -# force using internal libtool -export LIBTOOL=builds/unix/libtool -CONFIGURE=./configure --prefix=$(PREFIX) \ - --without-old-mac-fonts --without-fsspec --without-fsref --without-ats - -LIBDYLIB=$(SOURCE)/objs/.libs/lib$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/fribidi/Makefile b/tools/darwin/depends/fribidi/Makefile deleted file mode 100644 index 6a0ee921acd12..0000000000000 --- a/tools/darwin/depends/fribidi/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=fribidi -VERSION=0.19.1 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-docs - -LIBDYLIB=$(SOURCE)/.libs/lib$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/gas-preprocessor/Makefile b/tools/darwin/depends/gas-preprocessor/Makefile deleted file mode 100644 index e3a051430ce33..0000000000000 --- a/tools/darwin/depends/gas-preprocessor/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -include ../Makefile.include - -GASBIN=$(TOOLCHAIN)/bin/gas-preprocessor.pl - -all: $(GASBIN) - -$(GASBIN): - mkdir -p $(TOOLCHAIN)/bin - cp gas-preprocessor.pl $(GASBIN) - -clean: -distclean:: - rm -f $(GASBIN) diff --git a/tools/darwin/depends/gas-preprocessor/README b/tools/darwin/depends/gas-preprocessor/README deleted file mode 100644 index d903ba107eac2..0000000000000 --- a/tools/darwin/depends/gas-preprocessor/README +++ /dev/null @@ -1,20 +0,0 @@ -To configure ffmpeg for the iPhone 3gs and iPod touch 3g: - -./configure --enable-cross-compile --arch=arm --target-os=darwin --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv7' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk --cpu=cortex-a8 --enable-pic - -To configure ffmpeg for all other iPhones and iPods: - -./configure --enable-cross-compile --arch=arm --target-os=darwin --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv6' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk --cpu=arm1176jzf-s - -Make sure to replace the iPhone SDK version with the version that you're using. -Pre-3.0 versions aren't supported and probably won't work. - -If deploying to all generations, it's recommended to do separate out-of-tree -builds for each architecture, then lipo together the resulting libs. For -instance, assuming separate builds in armv6 and armv7: - -lipo -create -arch armv6 armv6/libavcodec/libavcodec.a -arch armv7 armv7/libavcodec/libavcodec.a -output universal/libavcodec.a - -and similar for each library. Then in XCode, make sure to build for both armv6 -and armv7. If you only care about one generation (since the armv6 devices are -too slow for instance), then lipo is unnecessary of course. diff --git a/tools/darwin/depends/gas-preprocessor/gas-preprocessor.pl b/tools/darwin/depends/gas-preprocessor/gas-preprocessor.pl deleted file mode 100755 index b9decc2eb8909..0000000000000 --- a/tools/darwin/depends/gas-preprocessor/gas-preprocessor.pl +++ /dev/null @@ -1,497 +0,0 @@ -#!/usr/bin/env perl -# by David Conrad -# This code is licensed under GPLv2 or later; go to gnu.org to read it -# (not that it much matters for an asm preprocessor) -# usage: set your assembler to be something like "perl gas-preprocessor.pl gcc" -use strict; - -# Apple's gas is ancient and doesn't support modern preprocessing features like -# .rept and has ugly macro syntax, among other things. Thus, this script -# implements the subset of the gas preprocessor used by x264 and ffmpeg -# that isn't supported by Apple's gas. - -my @gcc_cmd = @ARGV; -my @preprocess_c_cmd; - -my $fix_unreq = $^O eq "darwin"; - -if ($gcc_cmd[0] eq "-fix-unreq") { - $fix_unreq = 1; - shift @gcc_cmd; -} elsif ($gcc_cmd[0] eq "-no-fix-unreq") { - $fix_unreq = 0; - shift @gcc_cmd; -} - -if (grep /\.c$/, @gcc_cmd) { - # C file (inline asm?) - compile - @preprocess_c_cmd = (@gcc_cmd, "-S"); -} elsif (grep /\.[sS]$/, @gcc_cmd) { - # asm file, just do C preprocessor - @preprocess_c_cmd = (@gcc_cmd, "-E"); -} else { - die "Unrecognized input filetype"; -} - -# if compiling, avoid creating an output file named '-.o' -if ((grep /^-c$/, @gcc_cmd) && !(grep /^-o/, @gcc_cmd)) { - foreach my $i (@gcc_cmd) { - if ($i =~ /\.[csS]$/) { - my $outputfile = $i; - $outputfile =~ s/\.[csS]$/.o/; - push(@gcc_cmd, "-o"); - push(@gcc_cmd, $outputfile); - last; - } - } -} -@gcc_cmd = map { /\.[csS]$/ ? qw(-x assembler -) : $_ } @gcc_cmd; -@preprocess_c_cmd = map { /\.o$/ ? "-" : $_ } @preprocess_c_cmd; - -my $comm; - -# detect architecture from gcc binary name -if ($gcc_cmd[0] =~ /arm/) { - $comm = '@'; -} elsif ($gcc_cmd[0] =~ /powerpc|ppc/) { - $comm = '#'; -} - -# look for -arch flag -foreach my $i (1 .. $#gcc_cmd-1) { - if ($gcc_cmd[$i] eq "-arch") { - if ($gcc_cmd[$i+1] =~ /arm/) { - $comm = '@'; - } elsif ($gcc_cmd[$i+1] =~ /powerpc|ppc/) { - $comm = '#'; - } - } -} - -# assume we're not cross-compiling if no -arch or the binary doesn't have the arch name -if (!$comm) { - my $native_arch = qx/arch/; - if ($native_arch =~ /arm/) { - $comm = '@'; - } elsif ($native_arch =~ /powerpc|ppc/) { - $comm = '#'; - } -} - -if (!$comm) { - die "Unable to identify target architecture"; -} - -my %ppc_spr = (ctr => 9, - vrsave => 256); - -open(ASMFILE, "-|", @preprocess_c_cmd) || die "Error running preprocessor"; - -my $current_macro = ''; -my $macro_level = 0; -my %macro_lines; -my %macro_args; -my %macro_args_default; -my $macro_count = 0; -my $altmacro = 0; - -my @pass1_lines; -my @ifstack; - -my %symbols; - -# pass 1: parse .macro -# note that the handling of arguments is probably overly permissive vs. gas -# but it should be the same for valid cases -while () { - # remove all comments (to avoid interfering with evaluating directives) - s/(? 0) { - $ifstack[-1] = -$ifstack[-1]; - } - return; - } elsif (/\.else/) { - $ifstack[-1] = !$ifstack[-1]; - return; - } elsif (handle_if($line)) { - return; - } - - # discard lines in false .if blocks - foreach my $i (0 .. $#ifstack) { - if ($ifstack[$i] <= 0) { - return; - } - } - } - - if (/\.macro/) { - $macro_level++; - if ($macro_level > 1 && !$current_macro) { - die "nested macros but we don't have master macro"; - } - } elsif (/\.endm/) { - $macro_level--; - if ($macro_level < 0) { - die "unmatched .endm"; - } elsif ($macro_level == 0) { - $current_macro = ''; - return; - } - } - - if ($macro_level > 1) { - push(@{$macro_lines{$current_macro}}, $line); - } elsif ($macro_level == 0) { - expand_macros($line); - } else { - if ($line =~ /\.macro\s+([\d\w\.]+)\s*(.*)/) { - $current_macro = $1; - - # commas in the argument list are optional, so only use whitespace as the separator - my $arglist = $2; - $arglist =~ s/,/ /g; - - my @args = split(/\s+/, $arglist); - foreach my $i (0 .. $#args) { - my @argpair = split(/=/, $args[$i]); - $macro_args{$current_macro}[$i] = $argpair[0]; - $argpair[0] =~ s/:vararg$//; - $macro_args_default{$current_macro}{$argpair[0]} = $argpair[1]; - } - # ensure %macro_lines has the macro name added as a key - $macro_lines{$current_macro} = []; - - } elsif ($current_macro) { - push(@{$macro_lines{$current_macro}}, $line); - } else { - die "macro level without a macro name"; - } - } -} - -sub expand_macros { - my $line = @_[0]; - - # handle .if directives; apple's assembler doesn't support important non-basic ones - # evaluating them is also needed to handle recursive macros - if (handle_if($line)) { - return; - } - - if (/\.purgem\s+([\d\w\.]+)/) { - delete $macro_lines{$1}; - delete $macro_args{$1}; - delete $macro_args_default{$1}; - return; - } - - if ($line =~ /\.altmacro/) { - $altmacro = 1; - return; - } - - if ($line =~ /\.noaltmacro/) { - $altmacro = 0; - return; - } - - $line =~ s/\%([^,]*)/eval_expr($1)/eg if $altmacro; - - if ($line =~ /\.set\s+(.*),\s*(.*)/) { - $symbols{$1} = eval_expr($2); - } - - if ($line =~ /(\S+:|)\s*([\w\d\.]+)\s*(.*)/ && exists $macro_lines{$2}) { - push(@pass1_lines, $1); - my $macro = $2; - - # commas are optional here too, but are syntactically important because - # parameters can be blank - my @arglist = split(/,/, $3); - my @args; - my @args_seperator; - - my $comma_sep_required = 0; - foreach (@arglist) { - # allow arithmetic/shift operators in macro arguments - $_ =~ s/\s*(\+|-|\*|\/|<<|>>)\s*/$1/g; - - my @whitespace_split = split(/\s+/, $_); - if (!@whitespace_split) { - push(@args, ''); - push(@args_seperator, ''); - } else { - foreach (@whitespace_split) { - #print ("arglist = \"$_\"\n"); - if (length($_)) { - push(@args, $_); - my $sep = $comma_sep_required ? "," : " "; - push(@args_seperator, $sep); - #print ("sep = \"$sep\", arg = \"$_\"\n"); - $comma_sep_required = 0; - } - } - } - - $comma_sep_required = 1; - } - - my %replacements; - if ($macro_args_default{$macro}){ - %replacements = %{$macro_args_default{$macro}}; - } - - # construct hashtable of text to replace - foreach my $i (0 .. $#args) { - my $argname = $macro_args{$macro}[$i]; - my @macro_args = @{ $macro_args{$macro} }; - if ($args[$i] =~ m/=/) { - # arg=val references the argument name - # XXX: I'm not sure what the expected behaviour if a lot of - # these are mixed with unnamed args - my @named_arg = split(/=/, $args[$i]); - $replacements{$named_arg[0]} = $named_arg[1]; - } elsif ($i > $#{$macro_args{$macro}}) { - # more args given than the macro has named args - # XXX: is vararg allowed on arguments before the last? - $argname = $macro_args{$macro}[-1]; - if ($argname =~ s/:vararg$//) { - #print "macro = $macro, args[$i] = $args[$i], args_seperator=@args_seperator, argname = $argname, arglist[$i] = $arglist[$i], arglist = @arglist, args=@args, macro_args=@macro_args\n"; - #$replacements{$argname} .= ", $args[$i]"; - $replacements{$argname} .= "$args_seperator[$i] $args[$i]"; - } else { - die "Too many arguments to macro $macro"; - } - } else { - $argname =~ s/:vararg$//; - $replacements{$argname} = $args[$i]; - } - } - - my $count = $macro_count++; - - # apply replacements as regex - foreach (@{$macro_lines{$macro}}) { - my $macro_line = $_; - # do replacements by longest first, this avoids wrong replacement - # when argument names are subsets of each other - foreach (reverse sort {length $a <=> length $b} keys %replacements) { - $macro_line =~ s/\\$_/$replacements{$_}/g; - } - $macro_line =~ s/\\\@/$count/g; - $macro_line =~ s/\\\(\)//g; # remove \() - parse_line($macro_line); - } - } else { - push(@pass1_lines, $line); - } -} - -close(ASMFILE) or exit 1; -open(ASMFILE, "|-", @gcc_cmd) or die "Error running assembler"; -#open(ASMFILE, ">/tmp/a.S") or die "Error running assembler"; - -my @sections; -my $num_repts; -my $rept_lines; - -my %literal_labels; # for ldr , = -my $literal_num = 0; - -my $in_irp = 0; -my @irp_args; -my $irp_param; - -# pass 2: parse .rept and .if variants -# NOTE: since we don't implement a proper parser, using .rept with a -# variable assigned from .set is not supported -foreach my $line (@pass1_lines) { - # handle .previous (only with regard to .section not .subsection) - if ($line =~ /\.(section|text|const_data)/) { - push(@sections, $line); - } elsif ($line =~ /\.previous/) { - if (!$sections[-2]) { - die ".previous without a previous section"; - } - $line = $sections[-2]; - push(@sections, $line); - } - - # handle ldr , = - if ($line =~ /(.*)\s*ldr([\w\s\d]+)\s*,\s*=(.*)/) { - my $label = $literal_labels{$3}; - if (!$label) { - $label = ".Literal_$literal_num"; - $literal_num++; - $literal_labels{$3} = $label; - } - $line = "$1 ldr$2, $label\n"; - } elsif ($line =~ /\.ltorg/) { - foreach my $literal (keys %literal_labels) { - $line .= "$literal_labels{$literal}:\n .word $literal\n"; - } - %literal_labels = (); - } - - # @l -> lo16() @ha -> ha16() - $line =~ s/,\s+([^,]+)\@l\b/, lo16($1)/g; - $line =~ s/,\s+([^,]+)\@ha\b/, ha16($1)/g; - - # move to/from SPR - if ($line =~ /(\s+)(m[ft])([a-z]+)\s+(\w+)/ and exists $ppc_spr{$3}) { - if ($2 eq 'mt') { - $line = "$1${2}spr $ppc_spr{$3}, $4\n"; - } else { - $line = "$1${2}spr $4, $ppc_spr{$3}\n"; - } - } - - # old gas versions store upper and lower case names on .req, - # but they remove only one on .unreq - if ($fix_unreq) { - if ($line =~ /\.unreq\s+(.*)/) { - $line = ".unreq " . lc($1) . "\n"; - print ASMFILE ".unreq " . uc($1) . "\n"; - } - } - - if ($line =~ /\.rept\s+(.*)/) { - $num_repts = $1; - $rept_lines = "\n"; - - # handle the possibility of repeating another directive on the same line - # .endr on the same line is not valid, I don't know if a non-directive is - if ($num_repts =~ s/(\.\w+.*)//) { - $rept_lines .= "$1\n"; - } - $num_repts = eval($num_repts); - } elsif ($line =~ /\.irp\s+([\d\w\.]+)\s*(.*)/) { - $in_irp = 1; - $num_repts = 1; - $rept_lines = "\n"; - $irp_param = $1; - - # only use whitespace as the separator - my $irp_arglist = $2; - $irp_arglist =~ s/,/ /g; - $irp_arglist =~ s/^\s+//; - @irp_args = split(/\s+/, $irp_arglist); - } elsif ($line =~ /\.irpc\s+([\d\w\.]+)\s*(.*)/) { - $in_irp = 1; - $num_repts = 1; - $rept_lines = "\n"; - $irp_param = $1; - - my $irp_arglist = $2; - $irp_arglist =~ s/,/ /g; - $irp_arglist =~ s/^\s+//; - @irp_args = split(//, $irp_arglist); - } elsif ($line =~ /\.endr/) { - if ($in_irp != 0) { - foreach my $i (@irp_args) { - my $line = $rept_lines; - $line =~ s/\\$irp_param/$i/g; - $line =~ s/\\\(\)//g; # remove \() - print ASMFILE $line; - } - } else { - for (1 .. $num_repts) { - print ASMFILE $rept_lines; - } - } - $rept_lines = ''; - $in_irp = 0; - @irp_args = ''; - } elsif ($rept_lines) { - $rept_lines .= $line; - } else { - print ASMFILE $line; - } -} - -print ASMFILE ".text\n"; -foreach my $literal (keys %literal_labels) { - print ASMFILE "$literal_labels{$literal}:\n .word $literal\n"; -} - -close(ASMFILE) or exit 1; -#exit 1 diff --git a/tools/darwin/depends/gettext/01-gettext-tools-Makefile.in.patch b/tools/darwin/depends/gettext/01-gettext-tools-Makefile.in.patch deleted file mode 100644 index da129dea470da..0000000000000 --- a/tools/darwin/depends/gettext/01-gettext-tools-Makefile.in.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gettext-tools/Makefile.in.orig 2010-06-03 16:38:55.000000000 -0500 -+++ gettext-tools/Makefile.in 2010-06-04 01:16:07.000000000 -0500 -@@ -724,7 +724,7 @@ - top_srcdir = @top_srcdir@ - AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies - ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../autoconf-lib-link/m4 -I ../m4 -I gnulib-m4 -I libgettextpo/gnulib-m4 --SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests examples -+SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests - - # Allow users to use "gnulib-tool --update". - diff --git a/tools/darwin/depends/gettext/02-gettext-tools-stpncpy.patch b/tools/darwin/depends/gettext/02-gettext-tools-stpncpy.patch deleted file mode 100644 index cc01d2f0d4436..0000000000000 --- a/tools/darwin/depends/gettext/02-gettext-tools-stpncpy.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur gettext-0.17.orig/gettext-tools/gnulib-lib/stpncpy.c gettext-0.17/gettext-tools/gnulib-lib/stpncpy.c ---- gettext-0.17.orig/gettext-tools/gnulib-lib/stpncpy.c 2007-10-07 23:29:35.000000000 +0300 -+++ gettext-0.17/gettext-tools/gnulib-lib/stpncpy.c 2011-03-11 23:34:40.000000000 +0200 -@@ -24,7 +24,7 @@ - #include - - #ifndef weak_alias --# define __stpncpy stpncpy -+//# define __stpncpy stpncpy - #endif - - /* Copy no more than N bytes of SRC to DST, returning a pointer past the diff --git a/tools/darwin/depends/gettext/Makefile b/tools/darwin/depends/gettext/Makefile deleted file mode 100644 index c0171ce6ffff9..0000000000000 --- a/tools/darwin/depends/gettext/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=gettext -VERSION=0.17 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-csharp --disable-native-java --disable-java --without-emacs \ - --disable-libasprintf --disable-openmp \ - --with-included-gettext \ - --with-included-glib \ - --with-included-libcroco \ - --with-included-libxml \ - --without-git --without-cvs - -LIBDYLIB=$(SOURCE)/.libs/lib$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p0 <../01-gettext-tools-Makefile.in.patch - if [ "$(DARWIN)" = "osx" ] && [ "$(SDK)" != "10.4" ] && [ "$(SDK)" != "10.5" ] && [ "$(SDK)" != "10.6" ];then \ - cd $(SOURCE); patch -p1 <../02-gettext-tools-stpncpy.patch; \ - fi - if [ "$(DARWIN)" = "ios" ] && [ "$(SDK)" != "4.2" ]; then \ - cd $(SOURCE); patch -p1 <../02-gettext-tools-stpncpy.patch; \ - fi - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/help2man/Makefile b/tools/darwin/depends/help2man/Makefile deleted file mode 100644 index c61080d9b15f7..0000000000000 --- a/tools/darwin/depends/help2man/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.buildtools - -# lib name, version -APPNAME=help2man -VERSION=1.38.2 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) - -APP=$(SOURCE)/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - sed -ie "s/-shared/-dynamiclib/g" "$(SOURCE)/Makefile.in" - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/jpeg/Makefile b/tools/darwin/depends/jpeg/Makefile deleted file mode 100644 index c99a102b5c439..0000000000000 --- a/tools/darwin/depends/jpeg/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=jpeg -VERSION=8b -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(LIBNAME)src.v$(VERSION).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/.libs/lib$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - -rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/lib-gpgerror/Makefile b/tools/darwin/depends/lib-gpgerror/Makefile deleted file mode 100644 index ab033a0cacd3b..0000000000000 --- a/tools/darwin/depends/lib-gpgerror/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libgpg-error -VERSION=1.10 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.bz2 - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --with-libintl-prefix=$(PREFIX)/lib - -LIBDYLIB=$(SOURCE)/.libs/libgpg-error.dylib - -CLEAN_FILES=$(ARCHIVE) $(SOURCE) - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/libGLEW/Makefile b/tools/darwin/depends/libGLEW/Makefile deleted file mode 100644 index f4ed096252919..0000000000000 --- a/tools/darwin/depends/libGLEW/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=glew -VERSION=1.7.0 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export SYSTEM=darwin -export GLEW_DEST=$(PREFIX) -export CC.ARCH=$(CC) -export CFLAGS.ARCH=$(CFLAGS) -export LDFLAGS.ARCH=$(LDFLAGS) - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - sed -ie "s|CC = cc|CC = $(CC.ARCH)|" "$(SOURCE)/config/Makefile.darwin" - sed -ie "s|LD = cc|LD = $(CC.ARCH)|" "$(SOURCE)/config/Makefile.darwin" - sed -ie "s|CFLAGS.EXTRA =|CFLAGS.EXTRA = \$(CFLAGS.ARCH)|" "$(SOURCE)/config/Makefile.darwin" - sed -ie "s|LDFLAGS.EXTRA =|LDFLAGS.EXTRA = \$(LDFLAGS.ARCH)|" "$(SOURCE)/config/Makefile.darwin" - echo $(SOURCE) > .gitignore - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libarchive/Makefile b/tools/darwin/depends/libarchive/Makefile deleted file mode 100644 index b950a5a6818df..0000000000000 --- a/tools/darwin/depends/libarchive/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libarchive -VERSION=2.8.4 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -BASE_URL=http://libarchive.googlecode.com/files - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --without-xml2 - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libass/Makefile b/tools/darwin/depends/libass/Makefile deleted file mode 100644 index ee18a59ce9d05..0000000000000 --- a/tools/darwin/depends/libass/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libass -VERSION=0.9.13 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/$(LIBNAME)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libbluray/Makefile b/tools/darwin/depends/libbluray/Makefile deleted file mode 100644 index 99e1bf486c3a2..0000000000000 --- a/tools/darwin/depends/libbluray/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libbluray -VERSION=0.2.1 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.bz2 - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) --exec-prefix=$(PREFIX) \ - --disable-examples --disable-doxygen-doc - -LIBDYLIB=$(SOURCE)/src/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - # libbluray has borked Makefile.am with respect to CFLAGS, remove the offending line - sed -i -e "s|CFLAGS=|#CFLAGS=|" $(SOURCE)/src/Makefile.am - sed -i -e "s|CFLAGS=|#CFLAGS=|" $(SOURCE)/src/examples/Makefile.am - cd $(SOURCE); ./bootstrap - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libboblight/Makefile b/tools/darwin/depends/libboblight/Makefile deleted file mode 100644 index 74d30e8959102..0000000000000 --- a/tools/darwin/depends/libboblight/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -#hint for building a fat lib - "lipo -arch i386 libboblight-i386.dylib -arch x86_64 libboblight-x86_64.dylib -output libboblight-fat.dylib" - -# lib name, version -LIBNAME=libboblight -VERSION=r429 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --without-opengl \ - --without-portaudio \ - --without-x11 - -LIBDYLIB=$(SOURCE)/src/.libs/$(LIBNAME).dylib - -CLEAN_FILES=$(ARCHIVE) $(SOURCE) - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - -rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); autoreconf -vif - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -C $(SOURCE) - -.installed: - echo "libboblight isn't a dependency of XBMC and won't be installed" - touch $@ -clean: - make -C $(SOURCE) clean - rm -r .installed - rm -rf $(SOURCE) - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libcdio/Makefile b/tools/darwin/depends/libcdio/Makefile deleted file mode 100644 index 7617ad42395ea..0000000000000 --- a/tools/darwin/depends/libcdio/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libcdio -VERSION=0.90 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/.libs/(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p1 < ../osx.patch - cd $(SOURCE); autoconf - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - cp $(SOURCE)/include/cdio/cdtext.h $(PREFIX)/include/cdio/ - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libcdio/osx.patch b/tools/darwin/depends/libcdio/osx.patch deleted file mode 100644 index 409bd19a89d13..0000000000000 --- a/tools/darwin/depends/libcdio/osx.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/configure.ac 2012-10-27 17:07:45.000000000 +0200 -+++ b/configure.ac.new 2012-10-28 11:07:00.000000000 +0100 -@@ -352,14 +352,14 @@ - esac - AC_SUBST(native_abs_top_srcdir) - --case $host_os in -+case $host in - aix*) - ## Don't use AIX driver until starts to really work - ## cd_drivers="${cd_drivers}, AIX" - ## AC_DEFINE([HAVE_AIX_CDROM], [1], - ## [Define 1 if you have AIX CD-ROM support]) - ;; -- darwin[[6-9]].*|darwin1[[0-2]].*) -+ *86*-apple-darwin*) - AC_CHECK_HEADERS(IOKit/IOKitLib.h CoreFoundation/CFBase.h, - [have_iokit_h="yes"]) - if test "x$have_iokit_h" = "xyes" ; then diff --git a/tools/darwin/depends/libcec/Makefile b/tools/darwin/depends/libcec/Makefile deleted file mode 100644 index 110c0977a7c51..0000000000000 --- a/tools/darwin/depends/libcec/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=libcec -VERSION=2.1.1 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/src/lib/.libs/$(LIBNAME).2.dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); autoreconf -vif - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - rm -rf $(SOURCE) .installed - -distclean: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/libcrystalhd/Makefile b/tools/darwin/depends/libcrystalhd/Makefile deleted file mode 100644 index 329757c0e261a..0000000000000 --- a/tools/darwin/depends/libcrystalhd/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -include ../Makefile.include - -SOURCE=libcrystalhd - -all: .installed - -.installed: - mkdir -p $(PREFIX)/include - cp -rf $(SOURCE) $(PREFIX)/include/ - touch $@ - -clean: -distclean:: - rm -f .installed - diff --git a/tools/darwin/depends/libcrystalhd/libcrystalhd/bc_dts_defs.h b/tools/darwin/depends/libcrystalhd/libcrystalhd/bc_dts_defs.h deleted file mode 100644 index 2bffb80631a14..0000000000000 --- a/tools/darwin/depends/libcrystalhd/libcrystalhd/bc_dts_defs.h +++ /dev/null @@ -1,635 +0,0 @@ -/******************************************************************** - * Copyright(c) 2006-2009 Broadcom Corporation. - * - * Name: bc_dts_defs.h - * - * Description: Common definitions for all components. Only types - * is allowed to be included from this file. - * - * AU - * - * HISTORY: - * - ******************************************************************** - * This header is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 2.1 of the License. - * - * This header is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License - * along with this header. If not, see . - *******************************************************************/ - -#ifndef _BC_DTS_DEFS_H_ -#define _BC_DTS_DEFS_H_ - -#include "bc_dts_types.h" - -/* BIT Mask */ -#define BC_BIT(_x) (1 << (_x)) - -typedef enum _BC_STATUS { - BC_STS_SUCCESS = 0, - BC_STS_INV_ARG = 1, - BC_STS_BUSY = 2, - BC_STS_NOT_IMPL = 3, - BC_STS_PGM_QUIT = 4, - BC_STS_NO_ACCESS = 5, - BC_STS_INSUFF_RES = 6, - BC_STS_IO_ERROR = 7, - BC_STS_NO_DATA = 8, - BC_STS_VER_MISMATCH = 9, - BC_STS_TIMEOUT = 10, - BC_STS_FW_CMD_ERR = 11, - BC_STS_DEC_NOT_OPEN = 12, - BC_STS_ERR_USAGE = 13, - BC_STS_IO_USER_ABORT = 14, - BC_STS_IO_XFR_ERROR = 15, - BC_STS_DEC_NOT_STARTED = 16, - BC_STS_FWHEX_NOT_FOUND = 17, - BC_STS_FMT_CHANGE = 18, - BC_STS_HIF_ACCESS = 19, - BC_STS_CMD_CANCELLED = 20, - BC_STS_FW_AUTH_FAILED = 21, - BC_STS_BOOTLOADER_FAILED = 22, - BC_STS_CERT_VERIFY_ERROR = 23, - BC_STS_DEC_EXIST_OPEN = 24, - BC_STS_PENDING = 25, - BC_STS_CLK_NOCHG = 26, - - /* Must be the last one.*/ - BC_STS_ERROR = -1 -} BC_STATUS; - -/*------------------------------------------------------* - * Registry Key Definitions * - *------------------------------------------------------*/ -#define BC_REG_KEY_MAIN_PATH "Software\\Broadcom\\MediaPC\\CrystalHD" -#define BC_REG_KEY_FWPATH "FirmwareFilePath" -#define BC_REG_KEY_SEC_OPT "DbgOptions" - -/* - * Options: - * - * b[5] = Enable RSA KEY in EEPROM Support - * b[6] = Enable Old PIB scheme. (0 = Use PIB with video scheme) - * - * b[12] = Enable send message to NotifyIcon - * - */ - -typedef enum _BC_SW_OPTIONS { - BC_OPT_DOSER_OUT_ENCRYPT = BC_BIT(3), - BC_OPT_LINK_OUT_ENCRYPT = BC_BIT(29), -} BC_SW_OPTIONS; - -typedef struct _BC_REG_CONFIG{ - uint32_t DbgOptions; -} BC_REG_CONFIG; - -#if defined(__KERNEL__) || defined(__LINUX_USER__) -#else -/* Align data structures */ -#define ALIGN(x) __declspec(align(x)) -#endif - -/* mode - * b[0]..b[7] = _DtsDeviceOpenMode - * b[8] = Load new FW - * b[9] = Load file play back FW - * b[10] = Disk format (0 for HD DVD and 1 for BLU ray) - * b[11]-b[15] = default output resolution - * b[16] = Skip TX CPB Buffer Check - * b[17] = Adaptive Output Encrypt/Scramble Scheme - * b[18]-b[31] = reserved for future use - */ - -/* To allow multiple apps to open the device. */ -enum _DtsDeviceOpenMode { - DTS_PLAYBACK_MODE = 0, - DTS_DIAG_MODE, - DTS_MONITOR_MODE, - DTS_HWINIT_MODE -}; - -/* To enable the filter to selectively enable/disable fixes or erratas */ -enum _DtsDeviceFixMode { - DTS_LOAD_NEW_FW = BC_BIT(8), - DTS_LOAD_FILE_PLAY_FW = BC_BIT(9), - DTS_DISK_FMT_BD = BC_BIT(10), - /* b[11]-b[15] : Default output resolution */ - DTS_SKIP_TX_CHK_CPB = BC_BIT(16), - DTS_ADAPTIVE_OUTPUT_PER = BC_BIT(17), - DTS_INTELLIMAP = BC_BIT(18), - /* b[19]-b[21] : select clock frequency */ - DTS_PLAYBACK_DROP_RPT_MODE = BC_BIT(22), - DTS_DIAG_TEST_MODE = BC_BIT(23), - DTS_SINGLE_THREADED_MODE = BC_BIT(24), - DTS_FILTER_MODE = BC_BIT(25), - DTS_MFT_MODE = BC_BIT(26) -}; - -#define DTS_DFLT_RESOLUTION(x) (x<<11) - -#define DTS_DFLT_CLOCK(x) (x<<19) - -/* F/W File Version corresponding to S/W Releases */ -enum _FW_FILE_VER { - /* S/W release: 02.04.02 F/W release 2.12.2.0 */ - BC_FW_VER_020402 = ((12<<16) | (2<<8) | (0)) -}; - -/*------------------------------------------------------* - * Stream Types for DtsOpenDecoder() * - *------------------------------------------------------*/ -enum _DtsOpenDecStreamTypes { - BC_STREAM_TYPE_ES = 0, - BC_STREAM_TYPE_PES = 1, - BC_STREAM_TYPE_TS = 2, - BC_STREAM_TYPE_ES_TSTAMP = 6, -}; - -/*------------------------------------------------------* - * Video Algorithms for DtsSetVideoParams() * - *------------------------------------------------------*/ -enum _DtsSetVideoParamsAlgo { - BC_VID_ALGO_H264 = 0, - BC_VID_ALGO_MPEG2 = 1, - BC_VID_ALGO_VC1 = 4, - BC_VID_ALGO_DIVX = 6, - BC_VID_ALGO_VC1MP = 7, -}; - -/*------------------------------------------------------* - * MPEG Extension to the PPB * - *------------------------------------------------------*/ -#define BC_MPEG_VALID_PANSCAN (1) - -typedef struct _BC_PIB_EXT_MPEG { - uint32_t valid; - /* Always valid, defaults to picture size if no - * sequence display extension in the stream. */ - uint32_t display_horizontal_size; - uint32_t display_vertical_size; - - /* MPEG_VALID_PANSCAN - * Offsets are a copy values from the MPEG stream. */ - uint32_t offset_count; - int32_t horizontal_offset[3]; - int32_t vertical_offset[3]; - -} BC_PIB_EXT_MPEG; - -/*------------------------------------------------------* - * H.264 Extension to the PPB * - *------------------------------------------------------*/ -/* Bit definitions for 'other.h264.valid' field */ -#define H264_VALID_PANSCAN (1) -#define H264_VALID_SPS_CROP (2) -#define H264_VALID_VUI (4) - -typedef struct _BC_PIB_EXT_H264 { - /* 'valid' specifies which fields (or sets of - * fields) below are valid. If the corresponding - * bit in 'valid' is NOT set then that field(s) - * is (are) not initialized. */ - uint32_t valid; - - /* H264_VALID_PANSCAN */ - uint32_t pan_scan_count; - int32_t pan_scan_left[3]; - int32_t pan_scan_right[3]; - int32_t pan_scan_top[3]; - int32_t pan_scan_bottom[3]; - - /* H264_VALID_SPS_CROP */ - int32_t sps_crop_left; - int32_t sps_crop_right; - int32_t sps_crop_top; - int32_t sps_crop_bottom; - - /* H264_VALID_VUI */ - uint32_t chroma_top; - uint32_t chroma_bottom; - -} BC_PIB_EXT_H264; - -/*------------------------------------------------------* - * VC1 Extension to the PPB * - *------------------------------------------------------*/ -#define VC1_VALID_PANSCAN (1) - -typedef struct _BC_PIB_EXT_VC1 { - uint32_t valid; - - /* Always valid, defaults to picture size if no - * sequence display extension in the stream. */ - uint32_t display_horizontal_size; - uint32_t display_vertical_size; - - /* VC1 pan scan windows */ - uint32_t num_panscan_windows; - int32_t ps_horiz_offset[4]; - int32_t ps_vert_offset[4]; - int32_t ps_width[4]; - int32_t ps_height[4]; - -} BC_PIB_EXT_VC1; - - -/*------------------------------------------------------* - * Picture Information Block * - *------------------------------------------------------*/ -#if defined(__LINUX_USER__) -/* Values for 'pulldown' field. '0' means no pulldown information - * was present for this picture. */ -enum { - vdecNoPulldownInfo = 0, - vdecTop = 1, - vdecBottom = 2, - vdecTopBottom = 3, - vdecBottomTop = 4, - vdecTopBottomTop = 5, - vdecBottomTopBottom = 6, - vdecFrame_X2 = 7, - vdecFrame_X3 = 8, - vdecFrame_X1 = 9, - vdecFrame_X4 = 10, -}; - -/* Values for the 'frame_rate' field. */ -enum { - vdecFrameRateUnknown = 0, - vdecFrameRate23_97, - vdecFrameRate24, - vdecFrameRate25, - vdecFrameRate29_97, - vdecFrameRate30, - vdecFrameRate50, - vdecFrameRate59_94, - vdecFrameRate60, - vdecFrameRate14_985, - vdecFrameRate7_496, -}; - -/* Values for the 'aspect_ratio' field. */ -enum { - vdecAspectRatioUnknown = 0, - vdecAspectRatioSquare, - vdecAspectRatio12_11, - vdecAspectRatio10_11, - vdecAspectRatio16_11, - vdecAspectRatio40_33, - vdecAspectRatio24_11, - vdecAspectRatio20_11, - vdecAspectRatio32_11, - vdecAspectRatio80_33, - vdecAspectRatio18_11, - vdecAspectRatio15_11, - vdecAspectRatio64_33, - vdecAspectRatio160_99, - vdecAspectRatio4_3, - vdecAspectRatio16_9, - vdecAspectRatio221_1, - vdecAspectRatioOther = 255, -}; - -/* Values for the 'colour_primaries' field. */ -enum { - vdecColourPrimariesUnknown = 0, - vdecColourPrimariesBT709, - vdecColourPrimariesUnspecified, - vdecColourPrimariesReserved, - vdecColourPrimariesBT470_2M = 4, - vdecColourPrimariesBT470_2BG, - vdecColourPrimariesSMPTE170M, - vdecColourPrimariesSMPTE240M, - vdecColourPrimariesGenericFilm, -}; - -enum { - vdecRESOLUTION_CUSTOM = 0x00000000, /* custom */ - vdecRESOLUTION_480i = 0x00000001, /* 480i */ - vdecRESOLUTION_1080i = 0x00000002, /* 1080i (1920x1080, 60i) */ - vdecRESOLUTION_NTSC = 0x00000003, /* NTSC (720x483, 60i) */ - vdecRESOLUTION_480p = 0x00000004, /* 480p (720x480, 60p) */ - vdecRESOLUTION_720p = 0x00000005, /* 720p (1280x720, 60p) */ - vdecRESOLUTION_PAL1 = 0x00000006, /* PAL_1 (720x576, 50i) */ - vdecRESOLUTION_1080i25 = 0x00000007, /* 1080i25 (1920x1080, 50i) */ - vdecRESOLUTION_720p50 = 0x00000008, /* 720p50 (1280x720, 50p) */ - vdecRESOLUTION_576p = 0x00000009, /* 576p (720x576, 50p) */ - vdecRESOLUTION_1080i29_97 = 0x0000000A, /* 1080i (1920x1080, 59.94i) */ - vdecRESOLUTION_720p59_94 = 0x0000000B, /* 720p (1280x720, 59.94p) */ - vdecRESOLUTION_SD_DVD = 0x0000000C, /* SD DVD (720x483, 60i) */ - vdecRESOLUTION_480p656 = 0x0000000D, /* 480p (720x480, 60p), output bus width 8 bit, clock 74.25MHz */ - vdecRESOLUTION_1080p23_976 = 0x0000000E, /* 1080p23_976 (1920x1080, 23.976p) */ - vdecRESOLUTION_720p23_976 = 0x0000000F, /* 720p23_976 (1280x720p, 23.976p) */ - vdecRESOLUTION_240p29_97 = 0x00000010, /* 240p (1440x240, 29.97p ) */ - vdecRESOLUTION_240p30 = 0x00000011, /* 240p (1440x240, 30p) */ - vdecRESOLUTION_288p25 = 0x00000012, /* 288p (1440x288p, 25p) */ - vdecRESOLUTION_1080p29_97 = 0x00000013, /* 1080p29_97 (1920x1080, 29.97p) */ - vdecRESOLUTION_1080p30 = 0x00000014, /* 1080p30 (1920x1080, 30p) */ - vdecRESOLUTION_1080p24 = 0x00000015, /* 1080p24 (1920x1080, 24p) */ - vdecRESOLUTION_1080p25 = 0x00000016, /* 1080p25 (1920x1080, 25p) */ - vdecRESOLUTION_720p24 = 0x00000017, /* 720p24 (1280x720, 25p) */ - vdecRESOLUTION_720p29_97 = 0x00000018, /* 720p29.97 (1280x720, 29.97p) */ - vdecRESOLUTION_480p23_976 = 0x00000019, /* 480p23.976 (720*480, 23.976) */ - vdecRESOLUTION_480p29_97 = 0x0000001A, /* 480p29.976 (720*480, 29.97p) */ - vdecRESOLUTION_576p25 = 0x0000001B, /* 576p25 (720*576, 25p) */ - /* For Zero Frame Rate */ - vdecRESOLUTION_480p0 = 0x0000001C, /* 480p (720x480, 0p) */ - vdecRESOLUTION_480i0 = 0x0000001D, /* 480i (720x480, 0i) */ - vdecRESOLUTION_576p0 = 0x0000001E, /* 576p (720x576, 0p) */ - vdecRESOLUTION_720p0 = 0x0000001F, /* 720p (1280x720, 0p) */ - vdecRESOLUTION_1080p0 = 0x00000020, /* 1080p (1920x1080, 0p) */ - vdecRESOLUTION_1080i0 = 0x00000021, /* 1080i (1920x1080, 0i) */ -}; - -/* Bit definitions for 'flags' field */ -#define VDEC_FLAG_EOS (0x0004) - -#define VDEC_FLAG_FRAME (0x0000) -#define VDEC_FLAG_FIELDPAIR (0x0008) -#define VDEC_FLAG_TOPFIELD (0x0010) -#define VDEC_FLAG_BOTTOMFIELD (0x0018) - -#define VDEC_FLAG_PROGRESSIVE_SRC (0x0000) -#define VDEC_FLAG_INTERLACED_SRC (0x0020) -#define VDEC_FLAG_UNKNOWN_SRC (0x0040) - -#define VDEC_FLAG_BOTTOM_FIRST (0x0080) -#define VDEC_FLAG_LAST_PICTURE (0x0100) - -#define VDEC_FLAG_PICTURE_META_DATA_PRESENT (0x40000) - -#endif /* __LINUX_USER__ */ - -typedef struct _BC_PIC_INFO_BLOCK { - /* Common fields. */ - uint64_t timeStamp; /* Timestamp */ - uint32_t picture_number; /* Ordinal display number */ - uint32_t width; /* pixels */ - uint32_t height; /* pixels */ - uint32_t chroma_format; /* 0x420, 0x422 or 0x444 */ - uint32_t pulldown; - uint32_t flags; - uint32_t frame_rate; - uint32_t aspect_ratio; - uint32_t colour_primaries; - uint32_t picture_meta_payload; - uint32_t sess_num; - uint32_t ycom; - uint32_t custom_aspect_ratio_width_height; - uint32_t n_drop; /* number of non-reference frames remaining to be dropped */ - - /* Protocol-specific extensions. */ - union { - BC_PIB_EXT_H264 h264; - BC_PIB_EXT_MPEG mpeg; - BC_PIB_EXT_VC1 vc1; - } other; - -} BC_PIC_INFO_BLOCK, *PBC_PIC_INFO_BLOCK; - -/*------------------------------------------------------* - * ProcOut Info * - *------------------------------------------------------*/ -/* Optional flags for ProcOut Interface.*/ -enum _POUT_OPTIONAL_IN_FLAGS_{ - /* Flags from App to Device */ - BC_POUT_FLAGS_YV12 = 0x01, /* Copy Data in YV12 format */ - BC_POUT_FLAGS_STRIDE = 0x02, /* Stride size is valid. */ - BC_POUT_FLAGS_SIZE = 0x04, /* Take size information from Application */ - BC_POUT_FLAGS_INTERLACED = 0x08, /* copy only half the bytes */ - BC_POUT_FLAGS_INTERLEAVED = 0x10, /* interleaved frame */ - BC_POUT_FLAGS_STRIDE_UV = 0x20, /* Stride size is valid (for UV buffers). */ - BC_POUT_FLAGS_MODE = 0x40, /* Take output mode from Application, overrides YV12 flag if on */ - - /* Flags from Device to APP */ - BC_POUT_FLAGS_FMT_CHANGE = 0x10000, /* Data is not VALID when this flag is set */ - BC_POUT_FLAGS_PIB_VALID = 0x20000, /* PIB Information valid */ - BC_POUT_FLAGS_ENCRYPTED = 0x40000, /* Data is encrypted. */ - BC_POUT_FLAGS_FLD_BOT = 0x80000, /* Bottom Field data */ -}; - -//Decoder Capability -enum DECODER_CAP_FLAGS -{ - BC_DEC_FLAGS_H264 = 0x01, - BC_DEC_FLAGS_MPEG2 = 0x02, - BC_DEC_FLAGS_VC1 = 0x04, - BC_DEC_FLAGS_M4P2 = 0x08, //MPEG-4 Part 2: Divx, Xvid etc. -}; - -#if defined(__KERNEL__) || defined(__LINUX_USER__) -typedef BC_STATUS(*dts_pout_callback)(void *shnd, uint32_t width, uint32_t height, uint32_t stride, void *pOut); -#else -typedef BC_STATUS(*dts_pout_callback)(void *shnd, uint32_t width, uint32_t height, uint32_t stride, struct _BC_DTS_PROC_OUT *pOut); -#endif - -/* Line 21 Closed Caption */ -/* User Data */ -#define MAX_UD_SIZE 1792 /* 1920 - 128 */ - -typedef struct _BC_DTS_PROC_OUT { - uint8_t *Ybuff; /* Caller Supplied buffer for Y data */ - uint32_t YbuffSz; /* Caller Supplied Y buffer size */ - uint32_t YBuffDoneSz; /* Transferred Y datasize */ - - uint8_t *UVbuff; /* Caller Supplied buffer for UV data */ - uint32_t UVbuffSz; /* Caller Supplied UV buffer size */ - uint32_t UVBuffDoneSz; /* Transferred UV data size */ - - uint32_t StrideSz; /* Caller supplied Stride Size */ - uint32_t PoutFlags; /* Call IN Flags */ - - uint32_t discCnt; /* Picture discontinuity count */ - - BC_PIC_INFO_BLOCK PicInfo; /* Picture Information Block Data */ - - /* Line 21 Closed Caption */ - /* User Data */ - uint32_t UserDataSz; - uint8_t UserData[MAX_UD_SIZE]; - - void *hnd; - dts_pout_callback AppCallBack; - uint8_t DropFrames; - uint8_t b422Mode; /* Picture output Mode */ - uint8_t bPibEnc; /* PIB encrypted */ - uint8_t bRevertScramble; - uint32_t StrideSzUV; /* Caller supplied Stride Size */ - -} BC_DTS_PROC_OUT; - -typedef struct _BC_DTS_STATUS { - uint8_t ReadyListCount; /* Number of frames in ready list (reported by driver) */ - uint8_t FreeListCount; /* Number of frame buffers free. (reported by driver) */ - uint8_t PowerStateChange; /* Number of active state power transitions (reported by driver) */ - uint8_t reserved_[1]; - - uint32_t FramesDropped; /* Number of frames dropped. (reported by DIL) */ - uint32_t FramesCaptured; /* Number of frames captured. (reported by DIL) */ - uint32_t FramesRepeated; /* Number of frames repeated. (reported by DIL) */ - - uint32_t InputCount; /* Times compressed video has been sent to the HW. - * i.e. Successful DtsProcInput() calls (reported by DIL) */ - uint64_t InputTotalSize; /* Amount of compressed video that has been sent to the HW. - * (reported by DIL) */ - uint32_t InputBusyCount; /* Times compressed video has attempted to be sent to the HW - * but the input FIFO was full. (reported by DIL) */ - - uint32_t PIBMissCount; /* Amount of times a PIB is invalid. (reported by DIL) */ - - uint32_t cpbEmptySize; /* supported only for H.264, specifically changed for - * SingleThreadedAppMode. Report size of CPB buffer available. - * Reported by DIL */ - uint64_t NextTimeStamp; /* TimeStamp of the next picture that will be returned - * by a call to ProcOutput. Added for SingleThreadedAppMode. - * Reported back from the driver */ - uint8_t TxBufData; - - uint8_t reserved__[3]; - - uint32_t picNumFlags; /* Picture number and flags of the next picture to be delivered from the driver */ - - uint8_t reserved___[8]; - -} BC_DTS_STATUS; - -#define BC_SWAP32(_v) \ - ((((_v) & 0xFF000000)>>24)| \ - (((_v) & 0x00FF0000)>>8)| \ - (((_v) & 0x0000FF00)<<8)| \ - (((_v) & 0x000000FF)<<24)) - -#define WM_AGENT_TRAYICON_DECODER_OPEN 10001 -#define WM_AGENT_TRAYICON_DECODER_CLOSE 10002 -#define WM_AGENT_TRAYICON_DECODER_START 10003 -#define WM_AGENT_TRAYICON_DECODER_STOP 10004 -#define WM_AGENT_TRAYICON_DECODER_RUN 10005 -#define WM_AGENT_TRAYICON_DECODER_PAUSE 10006 - -#define MAX_COLOR_SPACES 3 - -typedef enum _BC_OUTPUT_FORMAT { - MODE420 = 0x0, - MODE422_YUY2 = 0x1, - MODE422_UYVY = 0x2, - OUTPUT_MODE420 = 0x0, - OUTPUT_MODE422_YUY2 = 0x1, - OUTPUT_MODE422_UYVY = 0x2, - OUTPUT_MODE420_NV12 = 0x0, - OUTPUT_MODE_INVALID = 0xFF, -} BC_OUTPUT_FORMAT; - -typedef struct _BC_COLOR_SPACES_ { - BC_OUTPUT_FORMAT OutFmt[MAX_COLOR_SPACES]; - uint16_t Count; -} BC_COLOR_SPACES; - - -typedef enum _BC_CAPS_FLAGS_ { - PES_CONV_SUPPORT = 1, /*Support PES Conversion*/ - MULTIPLE_DECODE_SUPPORT = 2 /*Support multiple stream decode*/ -} BC_CAPS_FLAGS; - -typedef struct _BC_HW_CAPABILITY_ { - BC_CAPS_FLAGS flags; - BC_COLOR_SPACES ColorCaps; - void* Reserved1; /* Expansion Of API */ - - //Decoder Capability - uint32_t DecCaps; //DECODER_CAP_FLAGS -} BC_HW_CAPS, *PBC_HW_CAPS; - -typedef struct _BC_SCALING_PARAMS_ { - uint32_t sWidth; - uint32_t sHeight; - uint32_t DNR; - uint32_t Reserved1; /*Expansion Of API*/ - uint8_t *Reserved2; /*Expansion OF API*/ - uint32_t Reserved3; /*Expansion Of API*/ - uint8_t *Reserved4; /*Expansion Of API*/ - -} BC_SCALING_PARAMS, *PBC_SCALING_PARAMS; - -typedef enum _BC_MEDIA_SUBTYPE_ { - BC_MSUBTYPE_INVALID = 0, - BC_MSUBTYPE_MPEG1VIDEO, - BC_MSUBTYPE_MPEG2VIDEO, - BC_MSUBTYPE_H264, - BC_MSUBTYPE_WVC1, - BC_MSUBTYPE_WMV3, - BC_MSUBTYPE_AVC1, - BC_MSUBTYPE_WMVA, - BC_MSUBTYPE_VC1, - BC_MSUBTYPE_DIVX, - BC_MSUBTYPE_DIVX311, - BC_MSUBTYPE_OTHERS /*Types to facilitate PES conversion*/ -} BC_MEDIA_SUBTYPE; - -typedef struct _BC_INPUT_FORMAT_ { - BOOL FGTEnable; /*Enable processing of FGT SEI*/ - BOOL MetaDataEnable; /*Enable retrieval of picture metadata to be sent to video pipeline.*/ - BOOL Progressive; /*Instruct decoder to always try to send back progressive - frames. If input content is 1080p, the decoder will - ignore pull-down flags and always give 1080p output. - If 1080i content is processed, the decoder will return - 1080i data. When this flag is not set, the decoder will - use pull-down information in the input stream to decide - the decoded data format.*/ - uint32_t OptFlags; /*In this field bits 0:3 are used pass default frame rate, bits 4:5 are for operation mode - (used to indicate Blu-ray mode to the decoder) and bit 6 is for the flag mpcOutPutMaxFRate - which when set tells the FW to output at the max rate for the resolution and ignore the - frame rate determined from the stream. Bit 7 is set to indicate that this is single threaded - mode and the driver will be peeked to get timestamps ahead of time*/ - BC_MEDIA_SUBTYPE mSubtype; /* Video Media Type*/ - uint32_t width; - uint32_t height; - uint32_t startCodeSz; /*Start code size for H264 clips*/ - uint8_t *pMetaData; /*Metadata buffer that is used to pass sequence header*/ - uint32_t metaDataSz; /*Metadata size*/ - uint8_t bEnableScaling; - BC_SCALING_PARAMS ScalingParams; -} BC_INPUT_FORMAT; - -typedef struct _BC_INFO_CRYSTAL_ { - uint8_t device; - union { - struct { - uint32_t dilRelease:8; - uint32_t dilMajor:8; - uint32_t dilMinor:16; - }; - uint32_t version; - } dilVersion; - - union { - struct { - uint32_t drvRelease:4; - uint32_t drvMajor:8; - uint32_t drvMinor:12; - uint32_t drvBuild:8; - }; - uint32_t version; - } drvVersion; - - union { - struct { - uint32_t fwRelease:4; - uint32_t fwMajor:8; - uint32_t fwMinor:12; - uint32_t fwBuild:8; - }; - uint32_t version; - } fwVersion; - - uint32_t Reserved1; // For future expansion - uint32_t Reserved2; // For future expansion -} BC_INFO_CRYSTAL, *PBC_INFO_CRYSTAL; - -#endif /* _BC_DTS_DEFS_H_ */ diff --git a/tools/darwin/depends/libcrystalhd/libcrystalhd/bc_dts_types.h b/tools/darwin/depends/libcrystalhd/libcrystalhd/bc_dts_types.h deleted file mode 100644 index a0b9ca52ad28f..0000000000000 --- a/tools/darwin/depends/libcrystalhd/libcrystalhd/bc_dts_types.h +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************** - * Copyright(c) 2006-2009 Broadcom Corporation. - * - * Name: bc_dts_types.h - * - * Description: Data types - * - * AU - * - * HISTORY: - * - ******************************************************************** - * This header is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 2.1 of the License. - * - * This header is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License - * along with this header. If not, see . - *******************************************************************/ - -#ifndef _BC_DTS_TYPES_H_ -#define _BC_DTS_TYPES_H_ - -#ifdef __LINUX_USER__ /* Don't include these for KERNEL.. */ -#include -#endif - -#ifndef PVOID -typedef void *PVOID; -#endif - -#ifndef BOOL -typedef int BOOL; -#endif - -#ifdef __LINUX_USER__ /* Don't include these for KERNEL */ -typedef uint32_t ULONG; -typedef int32_t LONG; -typedef void *HANDLE; -#ifndef VOID -typedef void VOID; -#endif -typedef void *LPVOID; -typedef uint32_t DWORD; -typedef uint32_t UINT32; -typedef uint32_t *LPDWORD; -typedef unsigned char *PUCHAR; - -#ifndef TRUE - #define TRUE 1 -#endif - -#ifndef FALSE - #define FALSE 0 -#endif - -#else /* !__LINUX_USER__ */ - -/* For Kernel usage.. */ -typedef bool bc_bool_t; -#endif /* __LINUX_USER__ */ - -#endif - diff --git a/tools/darwin/depends/libcrystalhd/libcrystalhd/libcrystalhd_if.h b/tools/darwin/depends/libcrystalhd/libcrystalhd/libcrystalhd_if.h deleted file mode 100644 index 45fa7a63f8696..0000000000000 --- a/tools/darwin/depends/libcrystalhd/libcrystalhd/libcrystalhd_if.h +++ /dev/null @@ -1,1515 +0,0 @@ -/***************************************************************************** - * Copyright(c) 2006-2009 Broadcom Corporation. - * - * Name: libcrystalhd_if.h - * - * Description: Device Interface Library API. - * - * AU - * - * HISTORY: - * - ***************************************************************************** - * - * This file is part of libcrystalhd. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - * - ****************************************************************************/ - -#ifndef _BCM_LDIL_IF_H_ -#define _BCM_LDIL_IF_H_ - -#include "bc_dts_defs.h" - -#define FLEA_MAX_TRICK_MODE_SPEED 6 - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************** -****************************************************************************** - - Theory of operation - - - The Device Interface Library (DIL) allows application level code, such -as a DirectShow filter, to access the Broadcom CrystalHD decoder driver to -provide hardware decoding for MPEG-2, H.264 (AVC) and VC-1 streams. - - In the Microsoft DirectShow system, the overall system graph would look -like the following: - -+--------+ +---------------+ +---------------+ +--------------------+ -| Source |->| Demultiplexer |->| Audio decoder |->| DirectSound Device | -+--------+ +---------------+ +---------------+ +--------------------+ - | - | +-------------------------+ +----------------+ - +->| Broadcom decoder filter |->| Video Renderer | - +-------------------------+ +----------------+ - | | - +----------------+ - | Broadcom DIL | - +----------------+ - | | - +-----------------+ - | Broadcom Driver | - +-----------------+ - - From the view of the caller, the DIL will accept compressed video streams -and will output decoded video frames or fields to seperate Y and UV buffers. -The DIL is responsible solely for decoding video and has no responsibilities -for audio nor for rendering, as shown in the above diagram. Audio/video -sychronization is assisted by feeding the DIL with timestamps so that it -may pass those timestamps along with the decoded video. The timestamped -output video will then be presented at the appropriate time by the renderer. - -A minimal implementation would be: - - HANDLE hBRCMhandle; - uint8_t input_buffer[INPUT_SIZE]; - uint8_t y_output_buffer[WIDTH*HEIGHT]; - uint8_t uv_output_buffer[WIDTH*HEIGHT]; - BC_DTS_PROC_OUT sProcOutData = { fill in your values here }; - BC_PIC_INFO_BLOCK sPIB = { fill in your values here }; - - // Acquire handle for device. - DtsDeviceOpen(&hBRCMhandle, 0); - - // Elemental stream. - DtsOpenDecoder(hBRCMhandle, 0); - - // H.264, Enable FGT SEI, do not parse metadata, no forced progressive out - DtsSetVideoParams(hBRCMhandle,0,1,0,0,0); - - // Tell decoder to wait for input from host. (PC) - DtsStartDecoder(hBRCMhandle); - - // Input buffer address, input buffer size, no timestamp, Unencrypted - DtsProcInput(hBRCMhandle,input_buffer,sizeof(input_buffer),0,0); - - // Tell PC to wait for data from decoder. - DtsStartCapture(hBRCMhandle); - - // 16ms timeout, pass pointer to PIB then get the decoded picture. - DtsProcOutput(hBRCMhandle,16,&sPIB); - - // Stop the decoder. - DtsStopDecoder(hBRCMhandle); - - // Close the decoder - DtsCloseDecoder(hBRCMhandle); - - // Release handle for device. - DtsDeviceClose(hBRCMhandle); - -****************************************************************************** -*****************************************************************************/ - -#define DRVIFLIB_API - -/***************************************************************************** -Function name: - - DtsDeviceOpen - -Description: - - Opens a handle to the decoder device that will be used to address that - unique instance of the decoder for all subsequent operations. - - Must be called once when the application opens the decoder for use. - -Parameters: - - *hDevice Pointer to device handle that will be filled in after the - device is successfully opened. [OUTPUT] - - mode Controls the mode in which the device is opened. - Currently only mode 0 (normal playback) is supported. - All other values will return BC_STS_INV_ARG. - -Return: - - Returns BC_STS_SUCCESS or error codes as appropriate. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsDeviceOpen( - HANDLE *hDevice, - uint32_t mode - ); - -/***************************************************************************** - -Function name: - - DtsDeviceClose - -Description: - - Close the handle to the decoder device. - - Must be called once when the application closes the decoder after use. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen - -Return: - - Returns BC_STS_SUCCESS or error codes as appropriate. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsDeviceClose( - HANDLE hDevice - ); - -/***************************************************************************** - -Function name: - - DtsGetVersion - -Description: - - Get version information from the driver as well as API library. - Version numbers are maintained in .. format. - Example ?01.23.4567 - - The device must have been previously opened for this call to succeed. - The individual components of the revision number are available as follows: - - o Major (8 Bits) : Bit 31 ?24 - o Minor (8 Bits) : Bit 23 ?16 - o Revision (16 Bits) : Bits 15 ?Bit 0. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen - DrVer Device driver version - DilVer Driver interface library version - -Return: - The revision numbers from the currently loaded driver as well as the - driver interface API library. - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsGetVersion( - HANDLE hDevice, - uint32_t *DrVer, - uint32_t *DilVer - ); - -/***************************************************************************** - -Function name: - - DtsGetFWVersionFromFile - -Description: - - Get version information from the Firmware Bin file when FW is not running - Version numbers in FW are maintained in .. format. - the return value will be of the format: - (Major << 16) | (Minor<<8) | Spl_rev ?012345 - - The individual components of the revision number are available as follows: - - o Major (8 Bits) : Bit 24 ?16 - o Minor (8 Bits) : Bit 16 ?8 - o Revision (16 Bits) : Bits 8 ?0. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen - StreamVer Stream FW version - DecVer VDEC FW version - Rsvd Reserved for future use - -Return: - The Stream FW Version umbers from the FW bin file in the install directory - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsGetFWVersionFromFile( - HANDLE hDevice, - uint32_t *StreamVer, - uint32_t *DecVer, - char *fname - ); - -/***************************************************************************** - -Function name: - - DtsGetFWVersion - -Description: - - Get version information from the Firmware. The version information is obtained - from Bin file when the flag is not set. When the flag is set, a FW command is - issued to get the version numbers. - Version numbers in FW are maintained in .. format. - Version number will be returned in the following format - (Major << 16) | (Minor<<8) | Spl_rev ?012345 - - The individual components of the revision number are available as follows: - - o Major (8 Bits) : Bit 24 ?16 - o Minor (8 Bits) : Bit 16 ?8 - o Revision (16 Bits) : Bits 8 ?Bit 0. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen - StreamVer Stream FW version - DecVer VDEC FW version - HwVer Hardware version - Rsvd Reserved for future use - flag Reseved for future use - -Return: - The Stream FW Version number, VDEC FW version and Hwrev - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsGetFWVersion( - HANDLE hDevice, - uint32_t *StreamVer, - uint32_t *DecVer, - uint32_t *HwVer, - char *fname, - uint32_t flag - ); - - -/***************************************************************************** - -Function name: - - DtsOpenDecoder - -Description: - - Open the decoder for playback operations and sets appropriate parameters - for decode of input video data. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - StreamType Currently supported streams are: - Elementary Streams with no timestamp management (0) - Transport Streams (2) - Elementary Streams with timestamp management (6) - All other values will return BC_STS_INV_ARG. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsOpenDecoder( - HANDLE hDevice, - uint32_t StreamType - ); - -/***************************************************************************** - -Function name: - - DtsCloseDecoder - -Description: - - Close the decoder. No further pictures will be produced and all input - will be ignored. - - The device must have been previously opened for this call to succeed. - This function closes the decoder and cleans up the state of the driver - and the library. All pending pictures will be dropped and all outstanding - transfers to and from the decoder will be aborted. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsCloseDecoder( - HANDLE hDevice - ); - -/***************************************************************************** - -Function name: - - DtsStartDecoder - -Description: - - Start the actual processing of input data. Before this command the - decoder will ignore all of the presented input data. - - DtsOpenDecoder must always be followed by a DtsStartDecoder for the - decoder to start processing input data. The device must have been - previously opened for this call to succeed. In addition the video - parameters for codec must have been set via a call to DtsSetVideoParams. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsStartDecoder( - HANDLE hDevice - ); - - -/***************************************************************************** - -Function name: - - DtsSetVideoParams - -Description: - - Sets various codec parameters that would be used by a subsequent call - to DtsStartDecoder. - - DtsSetVideoParams must always be called before DtsStartDecoder for the - decoder to start processing input data. The device must have been - previously opened for this call to succeed. - -Parameters: - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - videoAlg Video Codec to be enabled to decode stream. - H.264 (0), VC-1 (4) and MPEG-2 (1) currently supported. - All other values will return BC_STS_INV_ARG - FGTEnable Enable processing of FGT SEI. - MetaDataEnable Enable retrieval of picture metadata to be sent to video - pipeline. - Progressive Instruct decoder to always try to send back progressive - frames. If input content is 1080p, the decoder will - ignore pull-down flags and always give 1080p output. - If 1080i content is processed, the decoder will return - 1080i data. When this flag is not set, the decoder will - use pull-down information in the input stream to decide - the decoded data format. - OptFlags In this field bits 0:3 are used pass default frame rate, - bits 4:5 are for operation mode (used to indicate Blu-ray - mode to the decoder) and bit 6 is for the flag mpcOutPutMaxFRate - which when set tells the FW to output at the max rate for the - resolution and ignore the frame rate determined from the - stream. Bit 7 is set to indicate that this is single threaded mode - and the driver will be peeked to get timestamps ahead of time. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsSetVideoParams( - HANDLE hDevice, - uint32_t videoAlg, - BOOL FGTEnable, - BOOL MetaDataEnable, - BOOL Progressive, - uint32_t OptFlags - ); - -/***************************************************************************** - -Function name: - - DtsSetInputFormat - -Description: - - Sets input video's various parameters that would be used by a subsequent call - to DtsStartDecoder. - - DtsSetInputFormat must always be called before DtsStartDecoder for the - decoder to start processing input data. The device must have been - previously opened for this call to succeed. - -Parameters: - hDevice Handle to device. This is obtained via a prior call to DtsDeviceOpen. - pInputFormat Pointer to the BC_INPUT_FORMAT data. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsSetInputFormat( - HANDLE hDevice, - BC_INPUT_FORMAT *pInputFormat - ); - -/***************************************************************************** - -Function name: - - DtsGetVideoParams - -Description: - - Returns various codec parameters that would be used by a subsequent call - to DtsStartDecoder. These parameters are either default values or were - set via a prior call to DtsSetVideoParams - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - *videoAlg See DtsSetVideoParams. [OUTPUT] - *FGTEnable See DtsSetVideoParams. [OUTPUT] - *MetaDataEnable See DtsSetVideoParams. [OUTPUT] - *Progressive See DtsSetVideoParams. [OUTPUT] - Reserved This field is reserved for possible future expansion. - Set to 0. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsGetVideoParams( - HANDLE hDevice, - uint32_t *videoAlg, - BOOL *FGTEnable, - BOOL *MetaDataEnable, - BOOL *Progressive, - uint32_t Reserved - ); - -/***************************************************************************** - -Function name: - - DtsFormatChange - -Description: - - Changes codec type and parameters. - - The device must have been previously opened for this call to succeed. - This function should be used only for mid-stream format changes. - DtsStartDecoder must have been called before for this function to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - videoAlg Video Codec to be enabled to decode stream. - H.264 (0), VC-1 (4) and MPEG-2 (1) currently supported. All - other values will return BC_STS_INV_ARG - FGTEnable Enable processing of FGT SEI. - Progressive Instruct decoder to always try to send back progressive - frames. If input content is 1080p, the decoder will ignore - pull-down flags and always give 1080p output. If 1080i - content is processed, the decoder will return 1080i data. - When this flag is not set, the decoder will use pull-down - information in the input stream to decide the decoded data - format. - Reserved This field is reserved for possible future expansion. - Set to 0. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsFormatChange( - HANDLE hDevice, - uint32_t videoAlg, - BOOL FGTEnable, - BOOL MetaDataEnable, - BOOL Progressive, - uint32_t Reserved - ); - -/***************************************************************************** - -Function name: - - DtsStopDecoder - -Description: - - Stop the decoder. - - The device must have been previously opened for this call to succeed. - This function will clean up any pending operations and stop the decoder. - Internal state is still maintained and the decoder can be restarted. - Any pending pictures will be dropped. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsStopDecoder( - HANDLE hDevice - ); - -/***************************************************************************** - -Function name: - - DtsPauseDecoder - -Description: - - Pause the decoder. The paused picture will be repeated by decoder. - - The device must have been previously opened for this call to succeed. - In addition the decoder must have been started as well. If the decoder - is open but not started, this function will return BC_STS_DEC_NOT_STARTED. - If the decoder has not been opened this function will return - BC_STS_DEC_NOT_OPEN. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsPauseDecoder( - HANDLE hDevice - ); - -/***************************************************************************** - -Function name: - - DtsResumeDecoder - -Description: - - Unpause the decoder from a previous paused condition. - - The device must have been previously opened for this call to succeed. - If the decoder was not paused previously, this function will return - without affecting the decoder with a BC_STS_SUCCESS status. If the - decoder is open but not started, this function will return - BC_STS_DEC_NOT_STARTED. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsResumeDecoder( - HANDLE hDevice - ); - -/***************************************************************************** - -Function name: - - DtsSetVideoPID - -Description: - - Sets the video PID in the input Transport Stream that the decoder - needs to process. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - PID PID value that decoder needs to process. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsSetVideoPID( - HANDLE hDevice, - uint32_t pid - ); - - -/***************************************************************************** - -Function name: - - StartCaptureImmidiate - -Description: - - Instruct the driver to start capturing decoded frames for output. - - The device must have been previously opened for this call to succeed. - This function must be called before the first call to DtsProcInput. - This function instructs the receive path in the driver to start waiting - for valid data to be presented from the decoder. - -Parameters: - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsStartCaptureImmidiate( - HANDLE hDevice, - uint32_t Reserved - ); - - -/***************************************************************************** - -Function name: - - StartCapture - -Description: - - Instruct the driver to start capturing decoded frames for output. - - The device must have been previously opened for this call to succeed. - This function must be called before the first call to DtsProcInput. - This function instructs the receive path in the driver to start waiting - for valid data to be presented from the decoder. - -Parameters: - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsStartCapture( - HANDLE hDevice - ); - -/***************************************************************************** - -Function name: - - FlushRxCapture - -Description: - - ***This function is deprecated and is for temporary use only.*** - - Flush the driverís queue of pictures and stops the capture process. These - functions will be replaced with automatic Stop (End of Sequence) detection. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsFlushRxCapture( - HANDLE hDevice, - BOOL bDiscardOnly - ); - -/***************************************************************************** - -Function name: - - DtsProcOutput - -Description: - - Returns one decoded picture to the caller. - - The device must have been previously opened for this call to succeed. - - == NOTE ==== - For PIB AND 100% output encryption/scrambling on Bcm LINK hardware - use ProcOutputNoCopy() Interace. This interface will not support - PIB encryption. - - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - milliSecWait Timeout parameter. DtsProcOutput will fail is no picture - is received in this time. - *pOut This is a pointer to the BC_DTS_PROC_OUT structure that is - allocated by the caller. The decoded picture is returned - in this structure. This structure is described in the - data structures section. The actual data buffer to be - filled with the decoded data is allocated by the caller. - Data is copied from the decoder to the buffers before this - function returns. [INPUT/OUTPUT] - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsProcOutput( - HANDLE hDevice, - uint32_t milliSecWait, - BC_DTS_PROC_OUT *pOut - ); - -/***************************************************************************** - -Function name: - - DtsProcOutputNoCopy - -Description: - - Returns one decoded picture to the caller. Functionality of this API() - is very similar to ProcOutPut() API. This API will not copy the video data - to caller's buffers but provides the source buffer pointers in pOut structure. - - This is more secure and preferred method for BCM's Link hardware. The actual - format conversion/copy routines are provided as part of the Filter/Security - layer source code. Using this method, all the clear data handling will be - done by bcmDFilter or bcmSec layers which are expected to be in Player's - tamper resistant area. - - == NOTE ==== - 1) DtsReleaseOutputBuffs() interface must be called to release the buffers - back to DIL if return Status is BC_STS_SUCCESS. - - 2) Only this interface supports PIB and full 100% output encryption/Scrambling. - - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - milliSecWait Timeout parameter. DtsProcOoutput will fail is no picture - is received in this time. - *pOut This is a pointer to the BC_DTS_PROC_OUT structure that is - allocated by the caller. The decoded picture is returned - in this structure. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsProcOutputNoCopy( - HANDLE hDevice, - uint32_t milliSecWait, - BC_DTS_PROC_OUT *pOut - ); - -/***************************************************************************** - -Function name: - - DtsReleaseOutputBuffs - -Description: - - Release Buffers acquired during ProcOutputNoCopy() interface. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - Reserved Reserved. Set to NULL. - - fChange FALSE. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsReleaseOutputBuffs( - HANDLE hDevice, - PVOID Reserved, - BOOL fChange - ); - - -/***************************************************************************** - -Function name: - - DtsProcInput - -Description: - - Sends compressed (coded) data to the decoder for processing. - - The device must have been previously opened for this call to succeed. - In addition, suitable keys must have been exchanged for decryption and - decode to be successful. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - pUserData Pointer to data buffer that holds the data to be transferred. - [INPUT] - sizeInBytes Size in Bytes of data available to be sent to the decoder for - processing. - Timestamp Optional timestamp information attached to the media sample - that is available in the buffer. If timestamp is present - (i.e. non-zero), then this will be reflected in the output - sample (picture) produced from the contents of this buffer. - Timestamp should be in units of 100 ns. - Encrypted Flag to indicate that the data transfer is not in the clear - and that the decoder needs to decrypt before it can decode - the data. Note that due to complexity, it is preferred that - the application writer uses the higher level - dts_pre_proc_input() call if encypted content will be sent. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsProcInput( - HANDLE hDevice, - uint8_t *pUserData, - uint32_t ulSizeInBytes, - uint64_t timeStamp, - BOOL encrypted - ); - -/***************************************************************************** - -Function name: - - DtsGetColorPrimaries - -Description: - - Returns color primaries information from the stream being processed. - - The device must have been previously opened for this call to succeed. - In addition at least one picture must have been successfully decoded and - returned back from the decoder. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - colorPrimaries Pointer to U32 to receive the color primaries information. - The values returned are described in the previous section - regarding the picture metadata. [OUTPUT] - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsGetColorPrimaries( - HANDLE hDevice, - uint32_t *colorPrimaries - ); - -/***************************************************************************** - -Function name: - - DtsFlushInput - -Description: - - Flushes the current channel and causes the decoder to stop accessing input - data. Based on the flush mode parameter, the channel will be flushed from - the current point in the input data or from the current processing point. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - Mode 0 Flush at the current input point. use to drain the - input FIFO . All the data that has been received will - be decoded. - 1 Flush at the current processing point. All the decoded - frames will be presented but no more data from the - input will be decoded. - 2 Flushes all the decoder buffers, input, decoded and - to be decoded. - 3 Cancels the pending TX Request from the DIL/driver - 4 Flushes all the decoder buffers, input, decoded and - to be decoded data. Also flushes the drivers buffers - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsFlushInput( - HANDLE hDevice, - uint32_t Mode - ); - -/***************************************************************************** - -Function name: - - DtsSetRateChange - -Description: - - Sets the decoder playback speed and direction of playback. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - rate Inverse of speed x 10000. - Examples: - 1/2x playback speed = 20000 - 1x playback speed = 10000 - 2x playback speed = 5000 - - direction Playback direction. - 0 Forward direction. - 1 Reverse direction. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsSetRateChange( - HANDLE hDevice, - uint32_t rate, - uint8_t direction - ); - - -//Set FF Rate for Catching Up -/***************************************************************************** - -Function name: - - DtsSetFFRate - -Description: - - Sets the decoder playback FF speed - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - rate Inverse of speed x 10000. - Examples: - 1/2x playback speed = 20000 - 1x playback speed = 10000 - 2x playback speed = 5000 - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsSetFFRate( - HANDLE hDevice, - uint32_t rate - ); - -/***************************************************************************** - -Function name: - - DtsSetSkipPictureMode - -Description: - - This command sets the decoder to only decode selected picture types. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - - SkipMode 0 IPB, All pictures are decoded. - - 1 IP decoding, This mode skips all non reference pictures. - - 2 I decoding, This mode skips all P/B pictures and only decodes - I pictures. -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsSetSkipPictureMode( - HANDLE hDevice, - uint32_t SkipMode - ); - -/***************************************************************************** - -Function name: - - DtsSetIFrameTrickMode - -Description: - - This command sets the decoder to decode only I Frames for FF and FR. - - Use this API for I Frame only trick mode play back in either direction. The - application/Up stream filter determines the speed of the playback by - means of Skip on the input compressed data. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsSetIFrameTrickMode( - HANDLE hDevice - ); - -/***************************************************************************** - -Function name: - - DtsStepDecoder - -Description: - - This function forwards one frame. - - The device must have been opened must be in paused - state previously for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsStepDecoder( - HANDLE hDevice - ); - - -/***************************************************************************** - -Function name: - - DtsIs422Supported - -Description: - - This function returns whether 422 YUV mode is supported or not. - - The device must have been opened previously for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - bSupported 1 - 422 is supported - 0 - 422 is not supported. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsIs422Supported( - HANDLE hDevice, - uint8_t *bSupported - ); - -/***************************************************************************** - -Function name: - - DtsSetColorSpace - -Description: - - This function sets the output sample's color space. - - The device must have been opened previously and must support 422 mode for - this call to succeed. - - Use "DtsIs422Supported" to find whether 422 mode is supported. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - 422Mode Mode is defined by BC_OUTPUT_FORMAT as follows - - OUTPUT_MODE420 = 0x0, - OUTPUT_MODE422_YUY2 = 0x1, - OUTPUT_MODE422_UYVY = 0x2, - OUTPUT_MODE_INVALID = 0xFF - Valid values for this API are OUTPUT_MODE422_YUY2 and OUTPUT_MODE422_UYVY - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsSetColorSpace( - HANDLE hDevice, - BC_OUTPUT_FORMAT Mode422 - ); - -/***************************************************************************** - -Function name: - - DtsSet422Mode - -Description: - - This function sets the 422 mode to either YUY2 or UYVY. - - The device must have been opened previously and must support 422 mode for - this call to succeed. - - Use "DtsIs422Supported" to find whether 422 mode is supported. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - 422Mode 0 - set the YUV mode to YUY2 - 1 - set the YUV mode to UYVY - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsSet422Mode( - HANDLE hDevice, - uint8_t Mode422 - ); - -/***************************************************************************** - -Function name: - - DtsGetDILPath - -Description: - - This is a helper function to return DIL's Path. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - - DilPath Buffer to hold DIL path info upto 256 bytes. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ - -DRVIFLIB_API BC_STATUS -DtsGetDILPath( - HANDLE hDevice, - char *DilPath, - uint32_t size - ); - -/***************************************************************************** - -Function name: - - DtsDropPictures - -Description: - - This command sets the decoder to skip one or more non-reference (B) pictures - in the input data stream. This is used for when the audio is ahead of - video and the application needs to cause video to move ahead to catch up. - Reference pictures are not skipped. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - - Pictures The number of non-reference pictures to drop. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsDropPictures( - HANDLE hDevice, - uint32_t Pictures - ); - -/***************************************************************************** - -Function name: - - DtsGetDriverStatus - -Description: - - This command returns various statistics related to the driver and DIL. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - - *pStatus Pointer to BC_DTS_STATUS to receive driver status. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsGetDriverStatus( - HANDLE hDevice, - BC_DTS_STATUS *pStatus - ); - -/***************************************************************************** - -Function name: - - DtsGetCapabilities - -Description: - - This command returns output format support and hardware capabilities. - - The device must have been previously opened for this call to succeed. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - - pCapsBuffer Pointer to BC_HW_CAPS to receive HW Output capabilities. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsGetCapabilities ( - HANDLE hDevice, - PBC_HW_CAPS pCapsBuffer - ); - -/***************************************************************************** - -Function name: - - DtsSetScaleParams - -Description: - - This command sets hardware scaling parameters. - -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - - pScaleParams Pointer to BC_SCALING_PARAMS to set hardware scaling parameters. - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsSetScaleParams ( - HANDLE hDevice, - PBC_SCALING_PARAMS pScaleParams - ); - -/***************************************************************************** - -Function name: - - DtsIsEndOfStream - -Description: - - This command returns whether the end of stream(EOS) is reaching. -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - - bEOS Pointer to uint8_t to indicate if EOS of not - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsIsEndOfStream( - HANDLE hDevice, - uint8_t* bEOS -); - -/***************************************************************************** - -Function name: - - DtsCrystalHDVersion - -Description: - - This API returns hw and sw version information for Crystal HD solutions -Parameters: - - hDevice Handle to device. This is obtained via a prior call to - DtsDeviceOpen. - - bCrystalInfo Pointer to structure to fill in with information - - device = 0 for BCM70012, 1 for BCM70015 - -Return: - - BC_STS_SUCCESS will be returned on successful completion. - -*****************************************************************************/ -DRVIFLIB_API BC_STATUS -DtsCrystalHDVersion( - HANDLE hDevice, - PBC_INFO_CRYSTAL bCrystalInfo -); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/tools/darwin/depends/libcrystalhd/libcrystalhd/libcrystalhd_version.h b/tools/darwin/depends/libcrystalhd/libcrystalhd/libcrystalhd_version.h deleted file mode 100644 index b640dac41a2dc..0000000000000 --- a/tools/darwin/depends/libcrystalhd/libcrystalhd/libcrystalhd_version.h +++ /dev/null @@ -1,80 +0,0 @@ -/******************************************************************** - * Copyright(c) 2006-2009 Broadcom Corporation. - * - * Name: libcrystalhd_version.h - * - * Description: Version numbering for the driver use. - * - * AU - * - * HISTORY: - * - ******************************************************************** - * This header is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 2.1 of the License. - * - * This header is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License - * along with this header. If not, see . - *******************************************************************/ - -#ifndef _BC_DTS_VERSION_LNX_ -#define _BC_DTS_VERSION_LNX_ -// -// The version format that we are adopting is -// MajorVersion.MinorVersion.Revision -// This will be the same for all the components. -// -// -#define STRINGIFY_VERSION(MAJ,MIN,REV) STRINGIFIED_VERSION(MAJ,MIN,REV) -#define STRINGIFIED_VERSION(MAJ,MIN,REV) #MAJ "." #MIN "." #REV - -#define STRINGIFY_VERSION_W(MAJ,MIN,REV) STRINGIFIED_VERSION_W(MAJ,MIN,REV) -#define STRINGIFIED_VERSION_W(MAJ,MIN,REV) #MAJ "." #MIN "." #REV - -// -// Product Version number is: -// x.y.z.a -// -// x = Major release. 1 = Dozer, 2 = Dozer + Link -// y = Minor release. Should increase +1 per "real" release. -// z = Branch release. 0 for main branch. This is +1 per branch release. -// a = Build number +1 per candidate release. Reset to 0 every "real" release. -// -// -// Enabling Check-In rules enforcement 08092007 -// -#define INVALID_VERSION 0xFFFF - -/*========================== Common For All Components =================================*/ -#define BRCM_MAJOR_VERSION 3 - -#define DRIVER_MAJOR_VERSION BRCM_MAJOR_VERSION -#define DRIVER_MINOR_VERSION 6 -#define DRIVER_REVISION 0 - -#define RC_FILE_VERSION STRINGIFY_VERSION(DRIVER_MAJOR_VERSION,DRIVER_MINOR_VERSION,DRIVER_REVISION) ".0" - -/*======================= Device Interface Library ========================*/ -#define DIL_MAJOR_VERSION BRCM_MAJOR_VERSION -#define DIL_MINOR_VERSION 6 -#define DIL_REVISION 0 - -#define DIL_RC_FILE_VERSION STRINGIFY_VERSION(DIL_MAJOR_VERSION,DIL_MINOR_VERSION,DIL_REVISION) - -/*========================== deconf utility ==============================*/ -#define DECONF_MAJOR_VERSION BRCM_MAJOR_VERSION -#define DECONF_MINOR_VERSION 9 -#define DECONF_REVISION 18 -#define DECONF_RC_FILE_VERSION STRINGIFY_VERSION(DIL_MAJOR_VERSION,DIL_MINOR_VERSION,DIL_REVISION) - -/*========================== Firmware ==============================*/ -#define FW_MAJOR_VERSION BRCM_MAJOR_VERSION -#define FW_MINOR_VERSION 60 -#define FW_REVISION 39 - -#endif diff --git a/tools/darwin/depends/libffi/Makefile b/tools/darwin/depends/libffi/Makefile deleted file mode 100644 index 9893e3859a452..0000000000000 --- a/tools/darwin/depends/libffi/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libffi -VERSION=3.0.11 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz -BASE_URL=ftp://sourceware.org/pub/libffi - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/$(LIBNAME)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - mkdir -p $(PREFIX)/include/ffi - cp $(PREFIX)/lib/$(SOURCE)/include/* $(PREFIX)/include/ffi/ - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libflac/Makefile b/tools/darwin/depends/libflac/Makefile deleted file mode 100644 index c9477ee1b5aa5..0000000000000 --- a/tools/darwin/depends/libflac/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=flac -VERSION=1.2.1 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-asm-optimizations \ - --disable-xmms-plugin \ - --disable-cpplibs - -LIBDYLIB=$(SOURCE)/$(LIBNAME)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - if test "$(DARWIN)" = "ios"; then \ - sed -ie "s|CC -dynamiclib|CC -arch armv7 -dynamiclib|" "$(SOURCE)/libtool"; \ - fi - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libgcrypt/01-static-mpi_mpi-internal.patch b/tools/darwin/depends/libgcrypt/01-static-mpi_mpi-internal.patch deleted file mode 100644 index 5a1f60f8d647c..0000000000000 --- a/tools/darwin/depends/libgcrypt/01-static-mpi_mpi-internal.patch +++ /dev/null @@ -1,53 +0,0 @@ -*** mpi/mpi-internal.h Sun May 6 17:39:56 2012 ---- mpi/mpi-internal_new.h Sun May 6 17:45:59 2012 -*************** void _gcry_mpi_lshift_limbs( gcry_mpi_t -*** 183,206 **** - - - /*-- mpih-add.c --*/ -! mpi_limb_t _gcry_mpih_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, -! mpi_size_t s1_size, mpi_limb_t s2_limb ); - mpi_limb_t _gcry_mpih_add_n( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, -! mpi_ptr_t s2_ptr, mpi_size_t size); -! mpi_limb_t _gcry_mpih_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, -! mpi_ptr_t s2_ptr, mpi_size_t s2_size); -! - /*-- mpih-sub.c --*/ -! mpi_limb_t _gcry_mpih_sub_1( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, -! mpi_size_t s1_size, mpi_limb_t s2_limb ); - mpi_limb_t _gcry_mpih_sub_n( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, -! mpi_ptr_t s2_ptr, mpi_size_t size); -! mpi_limb_t _gcry_mpih_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, -! mpi_ptr_t s2_ptr, mpi_size_t s2_size); -! - /*-- mpih-cmp.c --*/ -! int _gcry_mpih_cmp( mpi_ptr_t op1_ptr, mpi_ptr_t op2_ptr, mpi_size_t size ); -! - /*-- mpih-mul.c --*/ - - struct karatsuba_ctx { ---- 183,206 ---- - - - /*-- mpih-add.c --*/ -! static mpi_limb_t _gcry_mpih_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, -! mpi_size_t s1_size, mpi_limb_t s2_limb ); - mpi_limb_t _gcry_mpih_add_n( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, -! mpi_ptr_t s2_ptr, mpi_size_t size); -! static mpi_limb_t _gcry_mpih_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, -! mpi_ptr_t s2_ptr, mpi_size_t s2_size); -! - /*-- mpih-sub.c --*/ -! static mpi_limb_t _gcry_mpih_sub_1( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, -! mpi_size_t s1_size, mpi_limb_t s2_limb ); - mpi_limb_t _gcry_mpih_sub_n( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, -! mpi_ptr_t s2_ptr, mpi_size_t size); -! static mpi_limb_t _gcry_mpih_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, -! mpi_ptr_t s2_ptr, mpi_size_t s2_size); -! - /*-- mpih-cmp.c --*/ -! static int _gcry_mpih_cmp( mpi_ptr_t op1_ptr, mpi_ptr_t op2_ptr, mpi_size_t size ); -! - /*-- mpih-mul.c --*/ - - struct karatsuba_ctx { diff --git a/tools/darwin/depends/libgcrypt/02-armasm.patch b/tools/darwin/depends/libgcrypt/02-armasm.patch deleted file mode 100644 index 0b3bf2a16b7fd..0000000000000 --- a/tools/darwin/depends/libgcrypt/02-armasm.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- mpi/longlong.h 2005-07-29 13:31:17.000000000 +0000 -+++ mpi/longlong.h 2008-01-01 11:09:27.000000000 +0000 -@@ -225,8 +225,8 @@ - : "r0", "r1", "r2") - #else - #define umul_ppmm(xh, xl, a, b) \ -- __asm__ ("%@ Inlined umul_ppmm\n" \ -- "umull %r1, %r0, %r2, %r3" \ -+ __asm__ ("@ Inlined umul_ppmm\n" \ -+ "umull %1, %0, %2, %3" \ - : "=&r" ((USItype)(xh)), \ - "=r" ((USItype)(xl)) \ - : "r" ((USItype)(a)), \ diff --git a/tools/darwin/depends/libgcrypt/Makefile b/tools/darwin/depends/libgcrypt/Makefile deleted file mode 100644 index 83fc3779c8f08..0000000000000 --- a/tools/darwin/depends/libgcrypt/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libgcrypt -VERSION=1.4.5 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.bz2 - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/.libs/libgcrypt.dylib - -CLEAN_FILES=$(ARCHIVE) $(SOURCE) - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); autoreconf -vif - cd $(SOURCE); patch -p0 < ../01-static-mpi_mpi-internal.patch - cd $(SOURCE); patch -p0 < ../02-armasm.patch - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/libgpg-error/Makefile b/tools/darwin/depends/libgpg-error/Makefile deleted file mode 100644 index ab033a0cacd3b..0000000000000 --- a/tools/darwin/depends/libgpg-error/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libgpg-error -VERSION=1.10 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.bz2 - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --with-libintl-prefix=$(PREFIX)/lib - -LIBDYLIB=$(SOURCE)/.libs/libgpg-error.dylib - -CLEAN_FILES=$(ARCHIVE) $(SOURCE) - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/libjpeg-turbo-native/Makefile b/tools/darwin/depends/libjpeg-turbo-native/Makefile deleted file mode 100644 index f8c5979f71a44..0000000000000 --- a/tools/darwin/depends/libjpeg-turbo-native/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -include ../Makefile.buildtools -export NASM=$(TOOLCHAIN)/bin/yasm -export CFLAGS=-I$(TOOLCHAIN)/include -fexceptions -export LDFLAGS=-L$(TOOLCHAIN)/lib -export CPPFLAGS=-I$(TOOLCHAIN)/include -export CXXFLAGS=-I$(TOOLCHAIN)/include - -# lib name, version -LIBNAME=libjpeg-turbo -VERSION=1.2.0 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(TOOLCHAIN) \ - --with-jpeg8 - -LIBDYLIB=$(SOURCE)/.libs/lib$(LIBNAME).dylib - -CLEAN_FILES=$(ARCHIVE) $(SOURCE) - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); autoreconf -vif - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libjpeg-turbo/Makefile b/tools/darwin/depends/libjpeg-turbo/Makefile deleted file mode 100644 index e5fe96165d636..0000000000000 --- a/tools/darwin/depends/libjpeg-turbo/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libjpeg-turbo -VERSION=1.2.0 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --with-jpeg8 - -LIBDYLIB=$(SOURCE)/.libs/lib$(LIBNAME).dylib - -CLEAN_FILES=$(ARCHIVE) $(SOURCE) - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); autoreconf -vif - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/liblzo2-native/Makefile b/tools/darwin/depends/liblzo2-native/Makefile deleted file mode 100644 index e8d5c156c8ad4..0000000000000 --- a/tools/darwin/depends/liblzo2-native/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include ../Makefile.buildtools -export CFLAGS=-I$(TOOLCHAIN)/include -export LDFLAGS=-L$(TOOLCHAIN)/lib -export CPPFLAGS=-I$(TOOLCHAIN)/include -export CXXFLAGS=-I$(TOOLCHAIN)/include - -# lib name, version -LIBNAME=lzo -VERSION=2.06 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(TOOLCHAIN) \ - --enable-shared=yes - -LIBDYLIB=$(SOURCE)/src/.libs/lib$(LIBNAME)2.dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/liblzo2/Makefile b/tools/darwin/depends/liblzo2/Makefile deleted file mode 100644 index 8a3b492098b76..0000000000000 --- a/tools/darwin/depends/liblzo2/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=lzo -VERSION=2.06 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --enable-shared=yes - -LIBDYLIB=$(SOURCE)/src/.libs/lib$(LIBNAME)2.dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libmad/01-libmad-pkgconfig.patch b/tools/darwin/depends/libmad/01-libmad-pkgconfig.patch deleted file mode 100644 index 21da22ef20517..0000000000000 --- a/tools/darwin/depends/libmad/01-libmad-pkgconfig.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -ruN libmad-0.15.1b.orig/Makefile.am libmad-0.15.1b/Makefile.am ---- libmad-0.15.1b.orig/Makefile.am 2004-02-17 02:02:03.000000000 +0000 -+++ libmad-0.15.1b/Makefile.am 2005-08-25 12:08:04.000000000 +0000 -@@ -33,9 +33,12 @@ - minimad_INCLUDES = - minimad_LDADD = libmad.la - --EXTRA_DIST = mad.h.sed \ -+EXTRA_DIST = mad.h.sed \ - CHANGES COPYRIGHT CREDITS README TODO VERSION - -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA= mad.pc -+ - exported_headers = version.h fixed.h bit.h timer.h stream.h frame.h \ - synth.h decoder.h - -diff -ruN libmad-0.15.1b.orig/mad.pc.in libmad-0.15.1b/mad.pc.in ---- libmad-0.15.1b.orig/mad.pc.in 1970-01-01 00:00:00.000000000 +0000 -+++ libmad-0.15.1b/mad.pc.in 2005-08-25 12:08:04.000000000 +0000 -@@ -0,0 +1,10 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+ -+Name: MAD -+Description: libmad - MPEG audio decoder library -+Version: @VERSION@ -+Libs: -L${libdir} -lmad -+Cflags: diff --git a/tools/darwin/depends/libmad/02-libmad-thumb-fix.patch b/tools/darwin/depends/libmad/02-libmad-thumb-fix.patch deleted file mode 100644 index 398dbec815d0d..0000000000000 --- a/tools/darwin/depends/libmad/02-libmad-thumb-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -ruN libmad-0.15.1b.orig/imdct_l_arm.S libmad-0.15.1b/imdct_l_arm.S ---- libmad-0.15.1b.orig/imdct_l_arm.S.orig 2010-10-28 18:57:51.000000000 -0400 -+++ libmad-0.15.1b/imdct_l_arm.S 2010-10-28 18:58:41.000000000 -0400 -@@ -468,8 +468,11 @@ - - @---- - -- add r2, pc, #(imdct36_long_karray-.-8) @ r2 = base address of Knn array (PIC safe ?) -- -+#ifdef __thumb__ -+ adr r2, imdct36_long_karray -+#else -+ add r2, pc, #(imdct36_long_karray-.-8) @ r2 = base address of Knn array (PIC safe ?) -+#endif - - loop: - ldr r12, [r0, #X0] diff --git a/tools/darwin/depends/libmad/Makefile b/tools/darwin/depends/libmad/Makefile deleted file mode 100644 index f66b23452e452..0000000000000 --- a/tools/darwin/depends/libmad/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libmad -VERSION=0.15.1b -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:${PREFIX}/bin:/Developer/usr/bin:${PATH} -CONFIGURE=./configure --prefix=$(PREFIX) \ - --enable-fpm=default - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p1 < ../01-libmad-pkgconfig.patch - if test "$(DARWIN)" = "ios"; then \ - cd $(SOURCE); patch -p1 < ../02-libmad-thumb-fix.patch; \ - fi - sed -ie "s|libmad.list|libmad.list mad.pc|g" "$(SOURCE)/configure.ac" - cd $(SOURCE); touch NEWS - cd $(SOURCE); touch AUTHORS - cd $(SOURCE); touch ChangeLog - cd $(SOURCE); autoreconf -vi - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libmicrohttpd/Makefile b/tools/darwin/depends/libmicrohttpd/Makefile deleted file mode 100644 index 3fa5ae559f4d6..0000000000000 --- a/tools/darwin/depends/libmicrohttpd/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libmicrohttpd -VERSION=0.4.6 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --with-libgcrypt-prefix=/dev/null - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libmodplug/Makefile b/tools/darwin/depends/libmodplug/Makefile deleted file mode 100644 index 63dd95e6e24c4..0000000000000 --- a/tools/darwin/depends/libmodplug/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libmodplug -VERSION=0.8.7 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:${PREFIX}/bin:/Developer/usr/bin:${PATH} -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); autoreconf -vif - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libmp3lame/Makefile b/tools/darwin/depends/libmp3lame/Makefile deleted file mode 100644 index 0a23cfc67c3ed..0000000000000 --- a/tools/darwin/depends/libmp3lame/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=lame -VERSION=3.99.5 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-gtktest --disable-frontend - -LIBDYLIB=$(SOURCE)/.libs/libmp3lame.dylib - -CLEAN_FILES=$(ARCHIVE) $(SOURCE) - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - #cd $(SOURCE); autoreconf -vif - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libmpeg2/01-libmpeg2-add-asm-leading-underscores.patch b/tools/darwin/depends/libmpeg2/01-libmpeg2-add-asm-leading-underscores.patch deleted file mode 100644 index 532e53af4e584..0000000000000 --- a/tools/darwin/depends/libmpeg2/01-libmpeg2-add-asm-leading-underscores.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -ruN libmpeg2-0.5.1.org/libmpeg2/motion_comp_arm_s.S libmpeg2-0.5.1/libmpeg2/motion_comp_arm_s.S ---- libmpeg2-0.5.1.org/libmpeg2/motion_comp_arm_s.S 2008-07-09 15:16:05.000000000 -0400 -+++ libmpeg2-0.5.1/libmpeg2/motion_comp_arm_s.S 2010-10-29 13:33:02.000000000 -0400 -@@ -23,8 +23,8 @@ - - @ ---------------------------------------------------------------- - .align -- .global MC_put_o_16_arm --MC_put_o_16_arm: -+ .global _MC_put_o_16_arm -+_MC_put_o_16_arm: - @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) - pld [r1] - stmfd sp!, {r4-r11, lr} @ R14 is also called LR -@@ -83,8 +83,8 @@ - - @ ---------------------------------------------------------------- - .align -- .global MC_put_o_8_arm --MC_put_o_8_arm: -+ .global _MC_put_o_8_arm -+_MC_put_o_8_arm: - @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) - pld [r1] - stmfd sp!, {r4-r10, lr} @ R14 is also called LR -@@ -152,8 +152,8 @@ - .endm - - .align -- .global MC_put_x_16_arm --MC_put_x_16_arm: -+ .global _MC_put_x_16_arm -+_MC_put_x_16_arm: - @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) - pld [r1] - stmfd sp!, {r4-r11,lr} @ R14 is also called LR -@@ -244,8 +244,8 @@ - - @ ---------------------------------------------------------------- - .align -- .global MC_put_x_8_arm --MC_put_x_8_arm: -+ .global _MC_put_x_8_arm -+_MC_put_x_8_arm: - @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) - pld [r1] - stmfd sp!, {r4-r11,lr} @ R14 is also called LR - diff --git a/tools/darwin/depends/libmpeg2/02-neon.patch b/tools/darwin/depends/libmpeg2/02-neon.patch deleted file mode 100644 index 329551b65e07d..0000000000000 --- a/tools/darwin/depends/libmpeg2/02-neon.patch +++ /dev/null @@ -1,385 +0,0 @@ -Index: include/mpeg2.h -=================================================================== ---- include/mpeg2.h (révision 1193) -+++ include/mpeg2.h (copie de travail) -@@ -164,6 +164,7 @@ - #define MPEG2_ACCEL_SPARC_VIS 1 - #define MPEG2_ACCEL_SPARC_VIS2 2 - #define MPEG2_ACCEL_ARM 1 -+#define MPEG2_ACCEL_ARM_NEON 2 - #define MPEG2_ACCEL_DETECT 0x80000000 - - uint32_t mpeg2_accel (uint32_t accel); -Index: libmpeg2/motion_comp_neon.c -=================================================================== ---- libmpeg2/motion_comp_neon.c (révision 0) -+++ libmpeg2/motion_comp_neon.c (révision 0) -@@ -0,0 +1,302 @@ -+/* -+ * motion_comp_neon.c -+ * Copyright (C) 2009 Rémi Denis-Courmont -+ * -+ * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. -+ * See http://libmpeg2.sourceforge.net/ for updates. -+ * -+ * mpeg2dec is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * mpeg2dec is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with mpeg2dec; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ */ -+ -+#include "config.h" -+ -+#if defined(ARCH_ARM) -+ -+#include -+#include -+ -+#include "mpeg2.h" -+#include "attributes.h" -+#include "mpeg2_internal.h" -+ -+/* dest = ref */ -+static void MC_put_o_16_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ do { -+ memcpy (dest, ref, 16); -+ ref += stride; -+ dest += stride; -+ } while (--height); -+} -+ -+static void MC_put_o_8_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ do { -+ memcpy (dest, ref, 8); -+ ref += stride; -+ dest += stride; -+ } while (--height); -+} -+ -+/* dest = (src1 + src2 + 1) / 2 */ -+static void MC_avg_1_16_neon (uint8_t * dest, const uint8_t * src1, -+ const uint8_t * src2, -+ const int stride, unsigned height) -+{ -+ do { -+ asm volatile ( -+ "vld1.u8 {q0}, [%[src1]]\n" -+ "vld1.u8 {q1}, [%[src2]]\n" -+ "vrhadd.u8 q0, q0, q1\n" -+ /* XXX: three cycles stall */ -+ "vst1.u8 {q0}, [%[dest]]\n" -+ : -+ : [dest]"r"(dest), [src1]"r"(src1), [src2]"r"(src2) -+ : "memory", "q0", "q1"); -+ src1 += stride; -+ src2 += stride; -+ dest += stride; -+ } while (--height); -+} -+ -+static void MC_avg_1_8_neon (uint8_t * dest, const uint8_t * src1, -+ const uint8_t * src2, -+ const int stride, unsigned height) -+{ -+ do { -+ asm volatile ( -+ "vld1.u8 {d0}, [%[src1]]\n" -+ "vld1.u8 {d1}, [%[src2]]\n" -+ "vrhadd.u8 d0, d0, d1\n" -+ "vst1.u8 {d0}, [%[dest]]\n" -+ : -+ : [dest]"r"(dest), [src1]"r"(src1), [src2]"r"(src2) -+ : "memory", "q0"); -+ -+ src1 += stride; -+ src2 += stride; -+ dest += stride; -+ } while (--height); -+} -+ -+/* dest = (dest + ((src1 + src2 + 1) / 2) + 1) / 2 */ -+static void MC_avg_2_16_neon (uint8_t * dest, const uint8_t * src1, -+ const uint8_t * src2, -+ const int stride, unsigned height) -+{ -+ do { -+ asm volatile ( -+ "vld1.u8 {q0}, [%[src1]]\n" -+ "vld1.u8 {q1}, [%[src2]]\n" -+ "vrhadd.u8 q0, q0, q1\n" -+ "vld1.u8 {q2}, [%[dest]]\n" -+ /* XXX: one cycle stall */ -+ "vrhadd.u8 q0, q0, q2\n" -+ /* XXX: three cycles stall */ -+ "vst1.u8 {q0}, [%[dest]]\n" -+ : -+ : [dest]"r"(dest), [src1]"r"(src1), [src2]"r"(src2) -+ : "memory", "q0", "q1", "q2"); -+ src1 += stride; -+ src2 += stride; -+ dest += stride; -+ } while (--height); -+} -+ -+static void MC_avg_2_8_neon (uint8_t * dest, const uint8_t * src1, -+ const uint8_t * src2, -+ const int stride, unsigned height) -+{ -+ do { -+ asm volatile ( -+ "vld1.u8 {d0}, [%[src1]]\n" -+ "vld1.u8 {d1}, [%[src2]]\n" -+ "vrhadd.u8 d0, d0, d1\n" -+ "vld1.u8 {d2}, [%[dest]]\n" -+ "vrhadd.u8 d0, d0, d2\n" -+ "vst1.u8 {d0}, [%[dest]]\n" -+ : -+ : [dest]"r"(dest), [src1]"r"(src1), [src2]"r"(src2) -+ : "memory", "q0", "d2"); -+ src1 += stride; -+ src2 += stride; -+ dest += stride; -+ } while (--height); -+} -+ -+static void MC_avg_o_16_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ MC_avg_1_16_neon (dest, dest, ref, stride, height); -+} -+ -+static void MC_avg_o_8_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ MC_avg_1_8_neon (dest, dest, ref, stride, height); -+} -+ -+static void MC_put_x_16_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ MC_avg_1_16_neon (dest, ref, ref + 1, stride, height); -+} -+ -+static void MC_put_x_8_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ MC_avg_1_8_neon (dest, ref, ref + 1, stride, height); -+} -+ -+static void MC_avg_x_16_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ MC_avg_2_16_neon (dest, ref, ref + 1, stride, height); -+} -+ -+static void MC_avg_x_8_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ MC_avg_2_8_neon (dest, ref, ref + 1, stride, height); -+} -+ -+static void MC_put_y_16_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ MC_avg_1_16_neon (dest, ref, ref + stride, stride, height); -+} -+static void MC_put_y_8_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ MC_avg_1_8_neon (dest, ref, ref + stride, stride, height); -+} -+ -+static void MC_avg_y_16_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ MC_avg_2_16_neon (dest, ref, ref + stride, stride, height); -+} -+ -+static void MC_avg_y_8_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ MC_avg_2_8_neon (dest, ref, ref + stride, stride, height); -+} -+ -+static void MC_put_xy_16_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ do { -+ asm volatile ( -+ "vld1.u8 {q0}, [%[ref]]\n" -+ "vld1.u8 {q1}, [%[refx]]\n" -+ "vrhadd.u8 q0, q0, q1\n" -+ "vld1.u8 {q2}, [%[refy]]\n" -+ "vld1.u8 {q3}, [%[refxy]]\n" -+ "vrhadd.u8 q2, q2, q3\n" -+ /* XXX: three cycles stall */ -+ "vrhadd.u8 q0, q0, q2\n" -+ /* XXX: three cycles stall */ -+ "vst1.u8 {q0}, [%[dest]]\n" -+ : -+ : [dest]"r"(dest), [ref]"r"(ref), [refx]"r"(ref + 1), -+ [refy]"r"(ref + stride), [refxy]"r"(ref + stride + 1) -+ : "memory", "q0", "q1", "q2", "q3"); -+ ref += stride; -+ dest += stride; -+ } while (--height); -+} -+ -+static void MC_put_xy_8_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ do { -+ asm volatile ( -+ "vld1.u8 {d0}, [%[ref]]\n" -+ "vld1.u8 {d1}, [%[refx]]\n" -+ "vrhadd.u8 d0, d0, d1\n" -+ "vld1.u8 {d2}, [%[refy]]\n" -+ "vld1.u8 {d3}, [%[refxy]]\n" -+ "vrhadd.u8 d2, d2, d3\n" -+ /* XXX: three cycles stall */ -+ "vrhadd.u8 d0, d0, d2\n" -+ /* XXX: three cycles stall */ -+ "vst1.u8 {d0}, [%[dest]]\n" -+ : -+ : [dest]"r"(dest), [ref]"r"(ref), [refx]"r"(ref + 1), -+ [refy]"r"(ref + stride), [refxy]"r"(ref + stride + 1) -+ : "memory", "q0", "q1"); -+ ref += stride; -+ dest += stride; -+ } while (--height); -+} -+ -+static void MC_avg_xy_16_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ do { -+ asm volatile ( -+ "vld1.u8 {q0}, [%[ref]]\n" -+ "vld1.u8 {q1}, [%[refx]]\n" -+ "vrhadd.u8 q0, q0, q1\n" -+ "vld1.u8 {q2}, [%[refy]]\n" -+ "vld1.u8 {q3}, [%[refxy]]\n" -+ "vrhadd.u8 q2, q2, q3\n" -+ "vld1.u8 {q4}, [%[dest]]\n" -+ /* XXX: one cycle stall */ -+ "vrhadd.u8 q0, q0, q2\n" -+ /* XXX: three cycles stall */ -+ "vrhadd.u8 q0, q4, q0\n" -+ "vst1.u8 {q0}, [%[dest]]\n" -+ : -+ : [dest]"r"(dest), [ref]"r"(ref), [refx]"r"(ref + 1), -+ [refy]"r"(ref + stride), [refxy]"r"(ref + stride + 1) -+ : "memory", "q0", "q1", "q2", "q3", "q4"); -+ ref += stride; -+ dest += stride; -+ } while (--height); -+} -+ -+static void MC_avg_xy_8_neon (uint8_t * dest, const uint8_t * ref, -+ const int stride, int height) -+{ -+ do { -+ asm volatile ( -+ "vld1.u8 {d0}, [%[ref]]\n" -+ "vld1.u8 {d1}, [%[refx]]\n" -+ "vrhadd.u8 d0, d0, d1\n" -+ "vld1.u8 {d2}, [%[refy]]\n" -+ "vld1.u8 {d3}, [%[refxy]]\n" -+ "vrhadd.u8 d2, d2, d3\n" -+ "vld1.u8 {d4}, [%[dest]]\n" -+ /* XXX: one cycle stall */ -+ "vrhadd.u8 d0, d0, d2\n" -+ /* XXX: three cycles stall */ -+ "vrhadd.u8 d0, d4, d0\n" -+ "vst1.u8 {d0}, [%[dest]]\n" -+ : -+ : [dest]"r"(dest), [ref]"r"(ref), [refx]"r"(ref + 1), -+ [refy]"r"(ref + stride), [refxy]"r"(ref + stride + 1) -+ : "memory", "q0", "q1", "d4"); -+ ref += stride; -+ dest += stride; -+ } while (--height); -+} -+ -+MPEG2_MC_EXTERN (neon) -+ -+#endif /* ARCH_ARM */ - -Modification de propriétés sur libmpeg2/motion_comp_neon.c -___________________________________________________________________ -Ajouté : svn:eol-style - + native - -Index: libmpeg2/mpeg2_internal.h -=================================================================== ---- libmpeg2/mpeg2_internal.h (révision 1193) -+++ libmpeg2/mpeg2_internal.h (copie de travail) -@@ -313,5 +313,6 @@ - extern mpeg2_mc_t mpeg2_mc_alpha; - extern mpeg2_mc_t mpeg2_mc_vis; - extern mpeg2_mc_t mpeg2_mc_arm; -+extern mpeg2_mc_t mpeg2_mc_neon; - - #endif /* LIBMPEG2_MPEG2_INTERNAL_H */ -Index: libmpeg2/motion_comp.c -=================================================================== ---- libmpeg2/motion_comp.c (révision 1193) -+++ libmpeg2/motion_comp.c (copie de travail) -@@ -58,6 +58,11 @@ - else - #endif - #ifdef ARCH_ARM -+#ifdef ARCH_ARM -+ if (accel & MPEG2_ACCEL_ARM) -+ mpeg2_mc = mpeg2_mc_neon; -+ else -+#endif - if (accel & MPEG2_ACCEL_ARM) { - mpeg2_mc = mpeg2_mc_arm; - } else -Index: libmpeg2/Makefile.am -=================================================================== ---- libmpeg2/Makefile.am (révision 1193) -+++ libmpeg2/Makefile.am (copie de travail) -@@ -14,7 +14,7 @@ - motion_comp_vis.c motion_comp_arm.c \ - cpu_accel.c cpu_state.c - if ARCH_ARM --libmpeg2arch_la_SOURCES += motion_comp_arm_s.S -+libmpeg2arch_la_SOURCES += motion_comp_arm_s.S motion_comp_neon.c - endif - libmpeg2arch_la_CFLAGS = $(OPT_CFLAGS) $(ARCH_OPT_CFLAGS) $(LIBMPEG2_CFLAGS) - -Index: configure.ac -=================================================================== ---- configure.ac (révision 1193) -+++ configure.ac (copie de travail) -@@ -103,7 +103,14 @@ - AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);; - arm*) - arm_conditional=: -- AC_DEFINE([ARCH_ARM],,[ARM architecture]);; -+ AC_DEFINE([ARCH_ARM],,[ARM architecture]) -+ AC_MSG_CHECKING([if inline ARM Advanced SIMD assembly is supported]) -+ AC_TRY_COMPILE([], -+ [asm ("vqmovun.s64 d0, q1":::"d0");], -+ [AC_DEFINE([ARCH_ARM_NEON],, [ARM Advanced SIMD assembly]) -+ AC_MSG_RESULT(yes)], -+ [AC_MSG_RESULT(no)]) -+ ;; - esac - elif test x"$CC" = x"tendracc"; then - dnl TenDRA portability checking compiler diff --git a/tools/darwin/depends/libmpeg2/03-config-fix.patch b/tools/darwin/depends/libmpeg2/03-config-fix.patch deleted file mode 100644 index 98f766ed6a3cf..0000000000000 --- a/tools/darwin/depends/libmpeg2/03-config-fix.patch +++ /dev/null @@ -1,208 +0,0 @@ ---- a/libmpeg2/Makefile.in 2011-01-29 10:17:27.000000000 +0100 -+++ b/libmpeg2/Makefile.in 2011-01-29 10:28:26.000000000 +0100 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.10.1 from Makefile.am. -+# Makefile.in generated by automake 1.10 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -33,14 +33,17 @@ - POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ --@ARCH_ARM_TRUE@am__append_1 = motion_comp_arm_s.S -+@ARCH_ARM_TRUE@am__append_1 = motion_comp_arm_s.S motion_comp_neon.c - subdir = libmpeg2 - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/libmpeg2.pc.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/m4/cflags.m4 \ - $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/keywords.m4 \ -- $(top_srcdir)/m4/nonpic.m4 $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ -+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ -+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nonpic.m4 \ -+ $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - mkinstalldirs = $(install_sh) -d -@@ -66,8 +69,9 @@ - am__libmpeg2arch_la_SOURCES_DIST = motion_comp_mmx.c idct_mmx.c \ - motion_comp_altivec.c idct_altivec.c motion_comp_alpha.c \ - idct_alpha.c motion_comp_vis.c motion_comp_arm.c cpu_accel.c \ -- cpu_state.c motion_comp_arm_s.S --@ARCH_ARM_TRUE@am__objects_1 = motion_comp_arm_s.lo -+ cpu_state.c motion_comp_arm_s.S motion_comp_neon.c -+@ARCH_ARM_TRUE@am__objects_1 = motion_comp_arm_s.lo \ -+@ARCH_ARM_TRUE@ libmpeg2arch_la-motion_comp_neon.lo - am_libmpeg2arch_la_OBJECTS = libmpeg2arch_la-motion_comp_mmx.lo \ - libmpeg2arch_la-idct_mmx.lo \ - libmpeg2arch_la-motion_comp_altivec.lo \ -@@ -82,7 +86,7 @@ - libmpeg2arch_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmpeg2arch_la_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ --DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -+DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ - depcomp = $(SHELL) $(top_srcdir)/.auto/depcomp - am__depfiles_maybe = depfiles - CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -@@ -135,29 +139,25 @@ - CFLAGS = @CFLAGS@ - CPP = @CPP@ - CPPFLAGS = @CPPFLAGS@ --CXX = @CXX@ --CXXCPP = @CXXCPP@ --CXXDEPMODE = @CXXDEPMODE@ --CXXFLAGS = @CXXFLAGS@ - CYGPATH_W = @CYGPATH_W@ - DEFS = @DEFS@ - DEPDIR = @DEPDIR@ - DLLTOOL = @DLLTOOL@ - DSYMUTIL = @DSYMUTIL@ --ECHO = @ECHO@ -+DUMPBIN = @DUMPBIN@ - ECHO_C = @ECHO_C@ - ECHO_N = @ECHO_N@ - ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ --F77 = @F77@ --FFLAGS = @FFLAGS@ -+FGREP = @FGREP@ - GREP = @GREP@ - INSTALL = @INSTALL@ - INSTALL_DATA = @INSTALL_DATA@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -+LD = @LD@ - LDFLAGS = @LDFLAGS@ - LIBMPEG2_CFLAGS = @LIBMPEG2_CFLAGS@ - LIBOBJS = @LIBOBJS@ -@@ -165,16 +165,20 @@ - LIBTOOL = @LIBTOOL@ - LIBVO_CFLAGS = @LIBVO_CFLAGS@ - LIBVO_LIBS = @LIBVO_LIBS@ -+LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ - MAINT = @MAINT@ - MAKEINFO = @MAKEINFO@ - MKDIR_P = @MKDIR_P@ - MPEG2DEC_CFLAGS = @MPEG2DEC_CFLAGS@ -+NM = @NM@ - NMEDIT = @NMEDIT@ - OBJDUMP = @OBJDUMP@ - OBJEXT = @OBJEXT@ - OPT_CFLAGS = @OPT_CFLAGS@ -+OTOOL = @OTOOL@ -+OTOOL64 = @OTOOL64@ - PACKAGE = @PACKAGE@ - PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ -@@ -199,8 +203,7 @@ - abs_top_builddir = @abs_top_builddir@ - abs_top_srcdir = @abs_top_srcdir@ - ac_ct_CC = @ac_ct_CC@ --ac_ct_CXX = @ac_ct_CXX@ --ac_ct_F77 = @ac_ct_F77@ -+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ - am__include = @am__include@ - am__leading_dot = @am__leading_dot@ - am__quote = @am__quote@ -@@ -231,6 +234,7 @@ - libexecdir = @libexecdir@ - localedir = @localedir@ - localstatedir = @localstatedir@ -+lt_ECHO = @lt_ECHO@ - mandir = @mandir@ - mkdir_p = @mkdir_p@ - oldincludedir = @oldincludedir@ -@@ -301,8 +305,8 @@ - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ -- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ -- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ -+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ -+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -@@ -310,8 +314,8 @@ - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ -- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ -- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ -+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ -+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - - clean-libLTLIBRARIES: -@@ -355,6 +359,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpeg2arch_la-motion_comp_altivec.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpeg2arch_la-motion_comp_arm.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpeg2arch_la-motion_comp_mmx.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpeg2arch_la-motion_comp_neon.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpeg2arch_la-motion_comp_vis.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/motion_comp.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/motion_comp_arm_s.Plo@am__quote@ -@@ -472,6 +477,13 @@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmpeg2arch_la_CFLAGS) $(CFLAGS) -c -o libmpeg2arch_la-cpu_state.lo `test -f 'cpu_state.c' || echo '$(srcdir)/'`cpu_state.c - -+libmpeg2arch_la-motion_comp_neon.lo: motion_comp_neon.c -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmpeg2arch_la_CFLAGS) $(CFLAGS) -MT libmpeg2arch_la-motion_comp_neon.lo -MD -MP -MF $(DEPDIR)/libmpeg2arch_la-motion_comp_neon.Tpo -c -o libmpeg2arch_la-motion_comp_neon.lo `test -f 'motion_comp_neon.c' || echo '$(srcdir)/'`motion_comp_neon.c -+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libmpeg2arch_la-motion_comp_neon.Tpo $(DEPDIR)/libmpeg2arch_la-motion_comp_neon.Plo -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='motion_comp_neon.c' object='libmpeg2arch_la-motion_comp_neon.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmpeg2arch_la_CFLAGS) $(CFLAGS) -c -o libmpeg2arch_la-motion_comp_neon.lo `test -f 'motion_comp_neon.c' || echo '$(srcdir)/'`motion_comp_neon.c -+ - mostlyclean-libtool: - -rm -f *.lo - -@@ -570,8 +582,8 @@ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ -- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ -- END { if (nonempty) { for (i in files) print i; }; }'`; \ -+ $(AWK) ' { files[$$0] = 1; } \ -+ END { for (i in files) print i; }'`; \ - mkid -fID $$unique - tags: TAGS - -@@ -596,8 +608,8 @@ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ -- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ -- END { if (nonempty) { for (i in files) print i; }; }'`; \ -+ $(AWK) ' { files[$$0] = 1; } \ -+ END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -@@ -607,12 +619,13 @@ - CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ -+ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ -- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ -- END { if (nonempty) { for (i in files) print i; }; }'`; \ -+ $(AWK) ' { files[$$0] = 1; } \ -+ END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique diff --git a/tools/darwin/depends/libmpeg2/Makefile b/tools/darwin/depends/libmpeg2/Makefile deleted file mode 100644 index 839fa5b5c6f5f..0000000000000 --- a/tools/darwin/depends/libmpeg2/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libmpeg2 -VERSION=0.5.1 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-sdl - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p1 < ../01-libmpeg2-add-asm-leading-underscores.patch - if test "$(DARWIN)" = "ios"; then \ - cd $(SOURCE); patch -p0 < ../02-neon.patch; \ - fi - cd $(SOURCE); patch -p1 < ../03-config-fix.patch - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libnfs/Makefile b/tools/darwin/depends/libnfs/Makefile deleted file mode 100644 index aff0aeff660a0..0000000000000 --- a/tools/darwin/depends/libnfs/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=libnfs -VERSION=1.3.0 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -RPC_HEADERS=rpcinc/auth.h rpcinc/auth_unix.h rpcinc/clnt.h rpcinc/pmap_clnt.h rpcinc/pmap_prot.h rpcinc/pmap_rmt.h rpcinc/rpc.h rpcinc/rpc_msg.h rpcinc/svc.h rpcinc/svc_auth.h rpcinc/types.h rpcinc/xdr.h - -LIBDYLIB=$(SOURCE)/lib/$(DYLIBNAME) - -CLEAN_FILES=$(ARCHIVE) $(SOURCE) - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - -rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - mkdir -p $(PREFIX)/include/rpc - install -c -m 644 $(RPC_HEADERS) $(PREFIX)/include/rpc/ - cd $(SOURCE); ./bootstrap - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ -clean: - make -C $(SOURCE) clean - rm -r .installed - rm -rf $(SOURCE) - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libnfs/rpcinc/auth.h b/tools/darwin/depends/libnfs/rpcinc/auth.h deleted file mode 100644 index 97a289c821e29..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/auth.h +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)auth.h 1.17 88/02/08 SMI - * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC - * $Id: auth.h,v 1.4 2004/11/25 19:41:19 emoy Exp $ - */ - -/* - * auth.h, Authentication interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The data structures are completely opaque to the client. The client - * is required to pass a AUTH * to routines that create rpc - * "sessions". - */ - -#ifndef _RPC_AUTH_H -#define _RPC_AUTH_H -#include - -#define MAX_AUTH_BYTES 400 -#define MAXNETNAMELEN 255 /* maximum length of network user's name */ - -/* - * Status returned from authentication check - */ -enum auth_stat { - AUTH_OK=0, - /* - * failed at remote end - */ - AUTH_BADCRED=1, /* bogus credentials (seal broken) */ - AUTH_REJECTEDCRED=2, /* client should begin new session */ - AUTH_BADVERF=3, /* bogus verifier (seal broken) */ - AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */ - AUTH_TOOWEAK=5, /* rejected due to security reasons */ - /* - * failed locally - */ - AUTH_INVALIDRESP=6, /* bogus response verifier */ - AUTH_FAILED=7 /* some unknown reason */ -}; - -/* 32-bit unsigned integers */ -#ifdef __LP64__ -typedef unsigned int u_int32; -#else -typedef unsigned long u_int32; -#endif - -union des_block { - struct { - u_int32 high; - u_int32 low; - } key; - char c[8]; -}; -typedef union des_block des_block; -__BEGIN_DECLS -extern bool_t xdr_des_block __P((XDR *, des_block *)); -__END_DECLS - -/* - * Authentication info. Opaque to client. - */ -struct opaque_auth { - enum_t oa_flavor; /* flavor of auth */ - caddr_t oa_base; /* address of more auth stuff */ - unsigned int oa_length; /* not to exceed MAX_AUTH_BYTES */ -}; - - -/* - * Auth handle, interface to client side authenticators. - */ -struct AUTH{ - struct opaque_auth ah_cred; - struct opaque_auth ah_verf; - union des_block ah_key; - struct auth_ops { -#ifdef __cplusplus - void (*ah_nextverf)(...); - int (*ah_marshal)(...); /* nextverf & serialize */ - int (*ah_validate)(...); /* validate varifier */ - int (*ah_refresh)(...); /* refresh credentials */ - void (*ah_destroy)(...); /* destroy this structure */ -#else - /* DO NOT REMOVE THE COMMENTED OUT ...: fixincludes needs to see them */ - void (*ah_nextverf)(/*...*/); - int (*ah_marshal)(/*...*/); /* nextverf & serialize */ - int (*ah_validate)(/*...*/); /* validate varifier */ - int (*ah_refresh)(/*...*/); /* refresh credentials */ - void (*ah_destroy)(/*...*/); /* destroy this structure */ -#endif - } *ah_ops; - caddr_t ah_private; -}; -typedef struct AUTH AUTH; - - -/* - * Authentication ops. - * The ops and the auth handle provide the interface to the authenticators. - * - * AUTH *auth; - * XDR *xdrs; - * struct opaque_auth verf; - */ -#define AUTH_NEXTVERF(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) -#define auth_nextverf(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) - -#define AUTH_MARSHALL(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) -#define auth_marshall(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) - -#define AUTH_VALIDATE(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) -#define auth_validate(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) - -#define AUTH_REFRESH(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) -#define auth_refresh(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) - -#define AUTH_DESTROY(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) -#define auth_destroy(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) - - -extern struct opaque_auth _null_auth; - - -/* - * These are the various implementations of client side authenticators. - */ - -/* - * Unix style authentication - * AUTH *authunix_create(machname, uid, gid, len, aup_gids) - * char *machname; - * int uid; - * int gid; - * int len; - * int *aup_gids; - */ -__BEGIN_DECLS -extern AUTH *authunix_create __P((char *, int, int, int, int *)); -extern AUTH *authunix_create_default __P((void)); -extern AUTH *authnone_create __P((void)); -extern AUTH *authdes_create __P((char *, unsigned int, - struct sockaddr_in *, - des_block *)); -__END_DECLS - -#define AUTH_NONE 0 /* no authentication */ -#define AUTH_NULL 0 /* backward compatibility */ -#define AUTH_UNIX 1 /* unix style (uid, gids) */ -#define AUTH_SHORT 2 /* short hand unix style */ -#define AUTH_DES 3 /* des style (encrypted timestamps) */ - -#endif /* !_RPC_AUTH_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/auth_unix.h b/tools/darwin/depends/libnfs/rpcinc/auth_unix.h deleted file mode 100644 index 496defb79a9f2..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/auth_unix.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)auth_unix.h 1.8 88/02/08 SMI - * from: @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC - * $Id: auth_unix.h,v 1.4 2004/10/28 21:58:21 emoy Exp $ - */ - -/* - * auth_unix.h, Protocol for UNIX style authentication parameters for RPC - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -/* - * The system is very weak. The client uses no encryption for it - * credentials and only sends null verifiers. The server sends backs - * null verifiers or optionally a verifier that suggests a new short hand - * for the credentials. - */ - -#ifndef _RPC_AUTH_UNIX_H -#define _RPC_AUTH_UNIX_H -#include - -/* The machine name is part of a credential; it may not exceed 255 bytes */ -#define MAX_MACHINE_NAME 255 - -/* - * Unix style credentials. - */ -struct authunix_parms { -#ifdef __LP64__ - unsigned int aup_time; -#else - unsigned long aup_time; -#endif - char *aup_machname; - int aup_uid; - int aup_gid; - unsigned int aup_len; - int *aup_gids; -}; - -__BEGIN_DECLS -extern bool_t xdr_authunix_parms __P((XDR *, struct authunix_parms *)); -__END_DECLS - -/* - * If a response verifier has flavor AUTH_SHORT, - * then the body of the response verifier encapsulates the following structure; - * again it is serialized in the obvious fashion. - */ -struct short_hand_verf { - struct opaque_auth new_cred; -}; - -#endif /* !_RPC_AUTH_UNIX_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/clnt.h b/tools/darwin/depends/libnfs/rpcinc/clnt.h deleted file mode 100644 index 4ed9b51bf3361..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/clnt.h +++ /dev/null @@ -1,445 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)clnt.h 1.31 88/02/08 SMI - * from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC - * $Id: clnt.h,v 1.4 2004/10/28 21:58:22 emoy Exp $ - */ - -/* - * clnt.h - Client side remote procedure call interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_CLNT_H_ -#define _RPC_CLNT_H_ -#include - -/* - * Rpc calls return an enum clnt_stat. This should be looked at more, - * since each implementation is required to live with this (implementation - * independent) list of errors. - */ - -/* Avoid collision with mach definition */ -#if defined(RPC_SUCCESS) -#undef RPC_SUCCESS -#endif - -enum clnt_stat { - RPC_SUCCESS=0, /* call succeeded */ - /* - * local errors - */ - RPC_CANTENCODEARGS=1, /* can't encode arguments */ - RPC_CANTDECODERES=2, /* can't decode results */ - RPC_CANTSEND=3, /* failure in sending call */ - RPC_CANTRECV=4, /* failure in receiving result */ - RPC_TIMEDOUT=5, /* call timed out */ - /* - * remote errors - */ - RPC_VERSMISMATCH=6, /* rpc versions not compatible */ - RPC_AUTHERROR=7, /* authentication error */ - RPC_PROGUNAVAIL=8, /* program not available */ - RPC_PROGVERSMISMATCH=9, /* program version mismatched */ - RPC_PROCUNAVAIL=10, /* procedure unavailable */ - RPC_CANTDECODEARGS=11, /* decode arguments error */ - RPC_SYSTEMERROR=12, /* generic "other problem" */ - - /* - * callrpc & clnt_create errors - */ - RPC_UNKNOWNHOST=13, /* unknown host name */ - RPC_UNKNOWNPROTO=17, /* unkown protocol */ - - /* - * _ create errors - */ - RPC_PMAPFAILURE=14, /* the pmapper failed in its call */ - RPC_PROGNOTREGISTERED=15, /* remote program is not registered */ - /* - * unspecified error - */ - RPC_FAILED=16 -}; - - -/* - * Error info. - */ -struct rpc_err { - enum clnt_stat re_status; - union { - int RE_errno; /* realated system error */ - enum auth_stat RE_why; /* why the auth error occurred */ - struct { -#ifdef __LP64__ - unsigned int low; /* lowest verion supported */ - unsigned int high; /* highest verion supported */ -#else - unsigned long low; /* lowest verion supported */ - unsigned long high; /* highest verion supported */ -#endif - } RE_vers; - struct { /* maybe meaningful if RPC_FAILED */ -#ifdef __LP64__ - int s1; - int s2; -#else - long s1; - long s2; -#endif - } RE_lb; /* life boot & debugging only */ - } ru; -#define re_errno ru.RE_errno -#define re_why ru.RE_why -#define re_vers ru.RE_vers -#define re_lb ru.RE_lb -}; - - -/* - * Client rpc handle. - * Created by individual implementations, see e.g. rpc_udp.c. - * Client is responsible for initializing auth, see e.g. auth_none.c. - */ -typedef struct CLIENT CLIENT; -struct CLIENT -{ - AUTH *cl_auth; /* authenticator */ - struct clnt_ops { -#ifdef __LP64__ - enum clnt_stat (*cl_call)(CLIENT *, unsigned int, xdrproc_t, void *, xdrproc_t, void *, struct timeval); /* call remote procedure */ -#else - enum clnt_stat (*cl_call)(CLIENT *, unsigned long, xdrproc_t, void *, xdrproc_t, void *, struct timeval); /* call remote procedure */ -#endif - void (*cl_abort)(void); /* abort a call */ - void (*cl_geterr)(CLIENT *, struct rpc_err *); /* get specific error code */ - bool_t (*cl_freeres)(CLIENT *, xdrproc_t, void *); /* frees results */ - void (*cl_destroy)(CLIENT *); /* destroy this structure */ - bool_t (*cl_control)(CLIENT *, int, char *); /* the ioctl() of rpc */ - } *cl_ops; - caddr_t cl_private; /* private stuff */ -}; - -/* - * client side rpc interface ops - * - * Parameter types are: - * - */ - -/* - * enum clnt_stat - * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout) - * CLIENT *rh; - * u_long proc; - * xdrproc_t xargs; - * caddr_t argsp; - * xdrproc_t xres; - * caddr_t resp; - * struct timeval timeout; - */ -#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs)) -#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs)) - -/* - * void - * CLNT_ABORT(rh); - * CLIENT *rh; - */ -#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh)) -#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh)) - -/* - * struct rpc_err - * CLNT_GETERR(rh); - * CLIENT *rh; - */ -#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) -#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) - - -/* - * bool_t - * CLNT_FREERES(rh, xres, resp); - * CLIENT *rh; - * xdrproc_t xres; - * caddr_t resp; - */ -#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) -#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) - -/* - * bool_t - * CLNT_CONTROL(cl, request, info) - * CLIENT *cl; - * unsigned int request; - * char *info; - */ -#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) -#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) - -/* - * control operations that apply to both udp and tcp transports - */ -#define CLSET_TIMEOUT 1 /* set timeout (timeval) */ -#define CLGET_TIMEOUT 2 /* get timeout (timeval) */ -#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */ -/* - * udp only control operations - */ -#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */ -#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */ - -/* - * void - * CLNT_DESTROY(rh); - * CLIENT *rh; - */ -#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) -#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) - - -/* - * RPCTEST is a test program which is accessable on every rpc - * transport/port. It is used for testing, performance evaluation, - * and network administration. - */ - -#ifdef __LP64__ -#define RPCTEST_PROGRAM ((unsigned int)1) -#define RPCTEST_VERSION ((unsigned int)1) -#define RPCTEST_NULL_PROC ((unsigned int)2) -#define RPCTEST_NULL_BATCH_PROC ((unsigned int)3) -#else -#define RPCTEST_PROGRAM ((unsigned long)1) -#define RPCTEST_VERSION ((unsigned long)1) -#define RPCTEST_NULL_PROC ((unsigned long)2) -#define RPCTEST_NULL_BATCH_PROC ((unsigned long)3) -#endif - -/* - * By convention, procedure 0 takes null arguments and returns them - */ - -#ifdef __LP64__ -#define NULLPROC ((unsigned int)0) -#else -#define NULLPROC ((unsigned long)0) -#endif - -/* - * Below are the client handle creation routines for the various - * implementations of client side rpc. They can return NULL if a - * creation failure occurs. - */ - -/* - * Memory based rpc (for speed check and testing) - * CLIENT * - * clntraw_create(prog, vers) - * u_long prog; - * u_long vers; - */ -__BEGIN_DECLS -#ifdef __LP64__ -extern CLIENT *clntraw_create __P((unsigned int, unsigned int)); -#else -extern CLIENT *clntraw_create __P((unsigned long, unsigned long)); -#endif -__END_DECLS - - -/* - * Generic client creation routine. Supported protocols are "udp" and "tcp" - * CLIENT * - * clnt_create(host, prog, vers, prot); - * char *host; -- hostname - * u_long prog; -- program number - * u_long vers; -- version number - * char *prot; -- protocol - */ -__BEGIN_DECLS -#ifdef __LP64__ -extern CLIENT *clnt_create __P((char *, unsigned int, unsigned int, char *)); -#else -extern CLIENT *clnt_create __P((char *, unsigned long, unsigned long, char *)); -#endif -__END_DECLS - - -/* - * TCP based rpc - * CLIENT * - * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * u_long prog; - * u_long version; - * register int *sockp; - * unsigned int sendsz; - * unsigned int recvsz; - */ -__BEGIN_DECLS -#ifdef __LP64__ -extern CLIENT *clnttcp_create __P((struct sockaddr_in *, - unsigned int, - unsigned int, - int *, - unsigned int, - unsigned int)); -#else -extern CLIENT *clnttcp_create __P((struct sockaddr_in *, - unsigned long, - unsigned long, - int *, - unsigned int, - unsigned int)); -#endif -__END_DECLS - - -/* - * UDP based rpc. - * CLIENT * - * clntudp_create(raddr, program, version, wait, sockp) - * struct sockaddr_in *raddr; - * u_long program; - * u_long version; - * struct timeval wait; - * int *sockp; - * - * Same as above, but you specify max packet sizes. - * CLIENT * - * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * u_long program; - * u_long version; - * struct timeval wait; - * int *sockp; - * unsigned int sendsz; - * unsigned int recvsz; - */ -__BEGIN_DECLS -#ifdef __LP64__ -extern CLIENT *clntudp_create __P((struct sockaddr_in *, - unsigned int, - unsigned int, - struct timeval, - int *)); -extern CLIENT *clntudp_bufcreate __P((struct sockaddr_in *, - unsigned int, - unsigned int, - struct timeval, - int *, - unsigned int, - unsigned int)); -#else -extern CLIENT *clntudp_create __P((struct sockaddr_in *, - unsigned long, - unsigned long, - struct timeval, - int *)); -extern CLIENT *clntudp_bufcreate __P((struct sockaddr_in *, - unsigned long, - unsigned long, - struct timeval, - int *, - unsigned int, - unsigned int)); -#endif -__END_DECLS - - -/* - * Print why creation failed - */ -__BEGIN_DECLS -extern void clnt_pcreateerror __P((char *)); /* stderr */ -extern char *clnt_spcreateerror __P((char *)); /* string */ -__END_DECLS - -/* - * Like clnt_perror(), but is more verbose in its output - */ -__BEGIN_DECLS -extern void clnt_perrno __P((enum clnt_stat)); /* stderr */ -extern char *clnt_sperrno __P((enum clnt_stat)); /* string */ -__END_DECLS - -/* - * Print an English error message, given the client error code - */ -__BEGIN_DECLS -extern void clnt_perror __P((CLIENT *, char *)); /* stderr */ -extern char *clnt_sperror __P((CLIENT *, char *)); /* string */ -__END_DECLS - - -/* - * If a creation fails, the following allows the user to figure out why. - */ -struct rpc_createerr { - enum clnt_stat cf_stat; - struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */ -}; - -extern struct rpc_createerr rpc_createerr; - - -#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ -#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ - -#endif /* !_RPC_CLNT_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/pmap_clnt.h b/tools/darwin/depends/libnfs/rpcinc/pmap_clnt.h deleted file mode 100644 index c07a81902bd3f..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/pmap_clnt.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI - * from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC - * $Id: pmap_clnt.h,v 1.3 2004/10/28 21:58:22 emoy Exp $ - */ - -/* - * pmap_clnt.h - * Supplies C routines to get to portmap services. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -/* - * Usage: - * success = pmap_set(program, version, protocol, port); - * success = pmap_unset(program, version); - * port = pmap_getport(address, program, version, protocol); - * head = pmap_getmaps(address); - * clnt_stat = pmap_rmtcall(address, program, version, procedure, - * xdrargs, argsp, xdrres, resp, tout, port_ptr) - * (works for udp only.) - * clnt_stat = clnt_broadcast(program, version, procedure, - * xdrargs, argsp, xdrres, resp, eachresult) - * (like pmap_rmtcall, except the call is broadcasted to all - * locally connected nets. For each valid response received, - * the procedure eachresult is called. Its form is: - * done = eachresult(resp, raddr) - * bool_t done; - * caddr_t resp; - * struct sockaddr_in raddr; - * where resp points to the results of the call and raddr is the - * address if the responder to the broadcast. - */ - -#ifndef _RPC_PMAPCLNT_H -#define _RPC_PMAPCLNT_H -#include - -__BEGIN_DECLS -#ifdef __LP64__ -extern bool_t pmap_set __P((unsigned int, unsigned int, int, int)); -extern bool_t pmap_unset __P((unsigned int, unsigned int)); -extern enum clnt_stat pmap_rmtcall __P((struct sockaddr_in *, - unsigned int, unsigned int, unsigned int, - xdrproc_t, caddr_t, - xdrproc_t, caddr_t, - struct timeval, unsigned int *)); -extern enum clnt_stat clnt_broadcast __P((unsigned int, unsigned int, unsigned int, - xdrproc_t, char *, - xdrproc_t, char *, - bool_t (*)())); -extern unsigned short pmap_getport __P((struct sockaddr_in *, - unsigned int, unsigned int, unsigned int)); -#else -extern bool_t pmap_set __P((unsigned long, unsigned long, int, int)); -extern bool_t pmap_unset __P((unsigned long, unsigned long)); -extern enum clnt_stat pmap_rmtcall __P((struct sockaddr_in *, - unsigned long, unsigned long, unsigned long, - xdrproc_t, caddr_t, - xdrproc_t, caddr_t, - struct timeval, unsigned long *)); -extern enum clnt_stat clnt_broadcast __P((unsigned long, unsigned long, unsigned long, - xdrproc_t, char *, - xdrproc_t, char *, - bool_t (*)())); -extern unsigned short pmap_getport __P((struct sockaddr_in *, - unsigned long, unsigned long, unsigned int)); -#endif -extern struct pmaplist *pmap_getmaps __P((struct sockaddr_in *)); -extern int getrpcport __P((char *, int, int, int)); -__END_DECLS - -#endif /* !_RPC_PMAPCLNT_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/pmap_prot.h b/tools/darwin/depends/libnfs/rpcinc/pmap_prot.h deleted file mode 100644 index c5dc139e41487..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/pmap_prot.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)pmap_prot.h 1.14 88/02/08 SMI - * from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC - * $Id: pmap_prot.h,v 1.3 2004/10/28 21:58:22 emoy Exp $ - */ - -/* - * pmap_prot.h - * Protocol for the local binder service, or pmap. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The following procedures are supported by the protocol: - * - * PMAPPROC_NULL() returns () - * takes nothing, returns nothing - * - * PMAPPROC_SET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Registers the tuple - * [prog, vers, prot, port]. - * - * PMAPPROC_UNSET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Un-registers pair - * [prog, vers]. prot and port are ignored. - * - * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). - * 0 is failure. Otherwise returns the port number where the pair - * [prog, vers] is registered. It may lie! - * - * PMAPPROC_DUMP() RETURNS (struct pmaplist *) - * - * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) - * RETURNS (port, string<>); - * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs); - * Calls the procedure on the local machine. If it is not registered, - * this procedure is quite; ie it does not return error information!!! - * This procedure only is supported on rpc/udp and calls via - * rpc/udp. This routine only passes null authentication parameters. - * This file has no interface to xdr routines for PMAPPROC_CALLIT. - * - * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. - */ - -#ifndef _RPC_PMAPPROT_H -#define _RPC_PMAPPROT_H -#include - -#define PMAPPORT ((unsigned short)111) -#ifdef __LP64__ -#define PMAPPROG ((unsigned int)100000) -#define PMAPVERS ((unsigned int)2) -#define PMAPVERS_PROTO ((unsigned int)2) -#define PMAPVERS_ORIG ((unsigned int)1) -#define PMAPPROC_NULL ((unsigned int)0) -#define PMAPPROC_SET ((unsigned int)1) -#define PMAPPROC_UNSET ((unsigned int)2) -#define PMAPPROC_GETPORT ((unsigned int)3) -#define PMAPPROC_DUMP ((unsigned int)4) -#define PMAPPROC_CALLIT ((unsigned int)5) -#else -#define PMAPPROG ((unsigned long)100000) -#define PMAPVERS ((unsigned long)2) -#define PMAPVERS_PROTO ((unsigned long)2) -#define PMAPVERS_ORIG ((unsigned long)1) -#define PMAPPROC_NULL ((unsigned long)0) -#define PMAPPROC_SET ((unsigned long)1) -#define PMAPPROC_UNSET ((unsigned long)2) -#define PMAPPROC_GETPORT ((unsigned long)3) -#define PMAPPROC_DUMP ((unsigned long)4) -#define PMAPPROC_CALLIT ((unsigned long)5) -#endif - -struct pmap { -#ifdef __LP64__ - unsigned int pm_prog; - unsigned int pm_vers; - unsigned int pm_prot; - unsigned int pm_port; -#else - long unsigned pm_prog; - long unsigned pm_vers; - long unsigned pm_prot; - long unsigned pm_port; -#endif -}; - -struct pmaplist { - struct pmap pml_map; - struct pmaplist *pml_next; -}; - -__BEGIN_DECLS -extern bool_t xdr_pmap __P((XDR *, struct pmap *)); -extern bool_t xdr_pmaplist __P((XDR *, struct pmaplist **)); -__END_DECLS - -#endif /* !_RPC_PMAPPROT_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/pmap_rmt.h b/tools/darwin/depends/libnfs/rpcinc/pmap_rmt.h deleted file mode 100644 index 9ffbd1cb458c7..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/pmap_rmt.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI - * from: @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC - * $Id: pmap_rmt.h,v 1.3 2004/10/28 21:58:23 emoy Exp $ - */ - -/* - * Structures and XDR routines for parameters to and replies from - * the portmapper remote-call-service. - * - * Copyright (C) 1986, Sun Microsystems, Inc. - */ - -#ifndef _RPC_PMAPRMT_H -#define _RPC_PMAPRMT_H -#include - -struct rmtcallargs { -#ifdef __LP64__ - unsigned int prog, vers, proc, arglen; -#else - unsigned long prog, vers, proc, arglen; -#endif - caddr_t args_ptr; - xdrproc_t xdr_args; -}; - -struct rmtcallres { -#ifdef __LP64__ - unsigned int *port_ptr; - unsigned int resultslen; -#else - unsigned long *port_ptr; - unsigned long resultslen; -#endif - caddr_t results_ptr; - xdrproc_t xdr_results; -}; - -__BEGIN_DECLS -extern bool_t xdr_rmtcall_args __P((XDR *, struct rmtcallargs *)); -extern bool_t xdr_rmtcallres __P((XDR *, struct rmtcallres *)); -__END_DECLS - -#endif /* !_RPC_PMAPRMT_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/rpc.h b/tools/darwin/depends/libnfs/rpcinc/rpc.h deleted file mode 100644 index da89dff56311e..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/rpc.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)rpc.h 1.9 88/02/08 SMI - * from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC - * $Id: rpc.h,v 1.2 1999/10/14 21:56:53 wsanchez Exp $ - */ - -/* - * rpc.h, Just includes the billions of rpc header files necessary to - * do remote procedure calling. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ -#ifndef _RPC_RPC_H -#define _RPC_RPC_H - -#include /* some typedefs */ -#include - -/* external data representation interfaces */ -#include /* generic (de)serializer */ - -/* Client side only authentication */ -#include /* generic authenticator (client side) */ - -/* Client side (mostly) remote procedure call */ -#include /* generic rpc stuff */ - -/* semi-private protocol headers */ -#include /* protocol for rpc messages */ -#include /* protocol for unix style cred */ -/* - * Uncomment-out the next line if you are building the rpc library with - * DES Authentication (see the README file in the secure_rpc/ directory). - */ -/*#include protocol for des style cred */ - -/* Server side only remote procedure callee */ -#include /* service manager and multiplexer */ -#include /* service side authenticator */ - -#include - -#endif /* !_RPC_RPC_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/rpc_msg.h b/tools/darwin/depends/libnfs/rpcinc/rpc_msg.h deleted file mode 100644 index ec2d929c61f6e..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/rpc_msg.h +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)rpc_msg.h 1.7 86/07/16 SMI - * from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC - * $Id: rpc_msg.h,v 1.3 2004/10/28 21:58:24 emoy Exp $ - */ - -/* - * rpc_msg.h - * rpc message definition - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_RPCMSG_H -#define _RPC_RPCMSG_H - -#ifdef __LP64__ -#define RPC_MSG_VERSION ((unsigned int) 2) -#else -#define RPC_MSG_VERSION ((unsigned long) 2) -#endif -#define RPC_SERVICE_PORT ((unsigned short) 2048) - -/* - * Bottom up definition of an rpc message. - * NOTE: call and reply use the same overall stuct but - * different parts of unions within it. - */ - -enum msg_type { - CALL=0, - REPLY=1 -}; - -enum reply_stat { - MSG_ACCEPTED=0, - MSG_DENIED=1 -}; - -enum accept_stat { - SUCCESS=0, - PROG_UNAVAIL=1, - PROG_MISMATCH=2, - PROC_UNAVAIL=3, - GARBAGE_ARGS=4, - SYSTEM_ERR=5 -}; - -enum reject_stat { - RPC_MISMATCH=0, - AUTH_ERROR=1 -}; - -/* - * Reply part of an rpc exchange - */ - -/* - * Reply to an rpc request that was accepted by the server. - * Note: there could be an error even though the request was - * accepted. - */ -struct accepted_reply { - struct opaque_auth ar_verf; - enum accept_stat ar_stat; - union { - struct { -#ifdef __LP64__ - unsigned int low; - unsigned int high; -#else - unsigned long low; - unsigned long high; -#endif - } AR_versions; - struct { - caddr_t where; - xdrproc_t proc; - } AR_results; - /* and many other null cases */ - } ru; -#define ar_results ru.AR_results -#define ar_vers ru.AR_versions -}; - -/* - * Reply to an rpc request that was rejected by the server. - */ -struct rejected_reply { - enum reject_stat rj_stat; - union { - struct { -#ifdef __LP64__ - unsigned int low; - unsigned int high; -#else - unsigned long low; - unsigned long high; -#endif - } RJ_versions; - enum auth_stat RJ_why; /* why authentication did not work */ - } ru; -#define rj_vers ru.RJ_versions -#define rj_why ru.RJ_why -}; - -/* - * Body of a reply to an rpc request. - */ -struct reply_body { - enum reply_stat rp_stat; - union { - struct accepted_reply RP_ar; - struct rejected_reply RP_dr; - } ru; -#define rp_acpt ru.RP_ar -#define rp_rjct ru.RP_dr -}; - -/* - * Body of an rpc request call. - */ -struct call_body { -#ifdef __LP64__ - unsigned int cb_rpcvers; /* must be equal to two */ - unsigned int cb_prog; - unsigned int cb_vers; - unsigned int cb_proc; -#else - unsigned long cb_rpcvers; /* must be equal to two */ - unsigned long cb_prog; - unsigned long cb_vers; - unsigned long cb_proc; -#endif - struct opaque_auth cb_cred; - struct opaque_auth cb_verf; /* protocol specific - provided by client */ -}; - -/* - * The rpc message - */ -struct rpc_msg { -#ifdef __LP64__ - unsigned int rm_xid; -#else - unsigned long rm_xid; -#endif - enum msg_type rm_direction; - union { - struct call_body RM_cmb; - struct reply_body RM_rmb; - } ru; -#define rm_call ru.RM_cmb -#define rm_reply ru.RM_rmb -}; -#define acpted_rply ru.RM_rmb.ru.RP_ar -#define rjcted_rply ru.RM_rmb.ru.RP_dr - -__BEGIN_DECLS -/* - * XDR routine to handle a rpc message. - * xdr_callmsg(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callmsg __P((XDR *, struct rpc_msg *)); - -/* - * XDR routine to pre-serialize the static part of a rpc message. - * xdr_callhdr(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callhdr __P((XDR *, struct rpc_msg *)); - -/* - * XDR routine to handle a rpc reply. - * xdr_replymsg(xdrs, rmsg) - * XDR *xdrs; - * struct rpc_msg *rmsg; - */ -extern bool_t xdr_replymsg __P((XDR *, struct rpc_msg *)); - -/* - * Fills in the error part of a reply message. - * _seterr_reply(msg, error) - * struct rpc_msg *msg; - * struct rpc_err *error; - */ -extern void _seterr_reply __P((struct rpc_msg *, struct rpc_err *)); -__END_DECLS - -#endif /* !_RPC_RPCMSG_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/svc.h b/tools/darwin/depends/libnfs/rpcinc/svc.h deleted file mode 100644 index d671045f1795c..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/svc.h +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)svc.h 1.20 88/02/08 SMI - * from: @(#)svc.h 2.2 88/07/29 4.0 RPCSRC - * $Id: svc.h,v 1.4 2004/11/25 19:41:19 emoy Exp $ - */ - -/* - * svc.h, Server-side remote procedure call interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_SVC_H -#define _RPC_SVC_H -#include - -/* - * This interface must manage two items concerning remote procedure calling: - * - * 1) An arbitrary number of transport connections upon which rpc requests - * are received. The two most notable transports are TCP and UDP; they are - * created and registered by routines in svc_tcp.c and svc_udp.c, respectively; - * they in turn call xprt_register and xprt_unregister. - * - * 2) An arbitrary number of locally registered services. Services are - * described by the following four data: program number, version number, - * "service dispatch" function, a transport handle, and a boolean that - * indicates whether or not the exported program should be registered with a - * local binder service; if true the program's number and version and the - * port number from the transport handle are registered with the binder. - * These data are registered with the rpc svc system via svc_register. - * - * A service's dispatch function is called whenever an rpc request comes in - * on a transport. The request's program and version numbers must match - * those of the registered service. The dispatch function is passed two - * parameters, struct svc_req * and SVCXPRT *, defined below. - */ - -enum xprt_stat { - XPRT_DIED, - XPRT_MOREREQS, - XPRT_IDLE -}; - -/* - * Server side transport handle - */ -typedef struct { - int xp_sock; - unsigned short xp_port; /* associated port number */ - struct xp_ops { -#ifdef __cplusplus - bool_t (*xp_recv)(...); /* receive incomming requests */ - enum xprt_stat (*xp_stat)(...); /* get transport status */ - bool_t (*xp_getargs)(...); /* get arguments */ - bool_t (*xp_reply)(...); /* send reply */ - bool_t (*xp_freeargs)(...);/* free mem allocated for args */ - void (*xp_destroy)(...); /* destroy this struct */ -#else - /* DO NOT REMOVE THE COMMENTED OUT ...: fixincludes needs to see them */ - bool_t (*xp_recv)(/*...*/); /* receive incomming requests */ - enum xprt_stat (*xp_stat)(/*...*/); /* get transport status */ - bool_t (*xp_getargs)(/*...*/); /* get arguments */ - bool_t (*xp_reply)(/*...*/); /* send reply */ - bool_t (*xp_freeargs)(/*...*/);/* free mem allocated for args */ - void (*xp_destroy)(/*...*/); /* destroy this struct */ -#endif - } *xp_ops; - int xp_addrlen; /* length of remote address */ - struct sockaddr_in xp_raddr; /* remote address */ - struct opaque_auth xp_verf; /* raw response verifier */ - caddr_t xp_p1; /* private */ - caddr_t xp_p2; /* private */ -} SVCXPRT; - -/* - * Approved way of getting address of caller - */ -#define svc_getcaller(x) (&(x)->xp_raddr) - -/* - * Operations defined on an SVCXPRT handle - * - * SVCXPRT *xprt; - * struct rpc_msg *msg; - * xdrproc_t xargs; - * caddr_t argsp; - */ -#define SVC_RECV(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) -#define svc_recv(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) - -#define SVC_STAT(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) -#define svc_stat(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) - -#define SVC_GETARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) -#define svc_getargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) - -#define SVC_REPLY(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) -#define svc_reply(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) - -#define SVC_FREEARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) -#define svc_freeargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) - -#define SVC_DESTROY(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) -#define svc_destroy(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) - - -/* - * Service request - */ -struct svc_req { -#ifdef __LP64__ - unsigned int rq_prog; /* service program number */ - unsigned int rq_vers; /* service protocol version */ - unsigned int rq_proc; /* the desired procedure */ -#else - unsigned long rq_prog; /* service program number */ - unsigned long rq_vers; /* service protocol version */ - unsigned long rq_proc; /* the desired procedure */ -#endif - struct opaque_auth rq_cred; /* raw creds from the wire */ - caddr_t rq_clntcred; /* read only cooked cred */ - SVCXPRT *rq_xprt; /* associated transport */ -}; - - -/* - * Service registration - * - * svc_register(xprt, prog, vers, dispatch, protocol) - * SVCXPRT *xprt; - * u_long prog; - * u_long vers; - * void (*dispatch)(...); // fixincludes needs the ..., even in a comment - * int protocol; like TCP or UDP, zero means do not register - */ -__BEGIN_DECLS -#ifdef __LP64__ -extern bool_t svc_register __P((SVCXPRT *, unsigned int, unsigned int, void (*)(), int)); -#else -extern bool_t svc_register __P((SVCXPRT *, unsigned long, unsigned long, void (*)(), int)); -#endif -__END_DECLS - -/* - * Service un-registration - * - * svc_unregister(prog, vers) - * u_long prog; - * u_long vers; - */ -__BEGIN_DECLS -#ifdef __LP64__ -extern void svc_unregister __P((unsigned int, unsigned int)); -#else -extern void svc_unregister __P((unsigned long, unsigned long)); -#endif -__END_DECLS - -/* - * Transport registration. - * - * xprt_register(xprt) - * SVCXPRT *xprt; - */ -__BEGIN_DECLS -extern void xprt_register __P((SVCXPRT *)); -__END_DECLS - -/* - * Transport un-register - * - * xprt_unregister(xprt) - * SVCXPRT *xprt; - */ -__BEGIN_DECLS -extern void xprt_unregister __P((SVCXPRT *)); -__END_DECLS - - - - -/* - * When the service routine is called, it must first check to see if it - * knows about the procedure; if not, it should call svcerr_noproc - * and return. If so, it should deserialize its arguments via - * SVC_GETARGS (defined above). If the deserialization does not work, - * svcerr_decode should be called followed by a return. Successful - * decoding of the arguments should be followed the execution of the - * procedure's code and a call to svc_sendreply. - * - * Also, if the service refuses to execute the procedure due to too- - * weak authentication parameters, svcerr_weakauth should be called. - * Note: do not confuse access-control failure with weak authentication! - * - * NB: In pure implementations of rpc, the caller always waits for a reply - * msg. This message is sent when svc_sendreply is called. - * Therefore pure service implementations should always call - * svc_sendreply even if the function logically returns void; use - * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows - * for the abuse of pure rpc via batched calling or pipelining. In the - * case of a batched call, svc_sendreply should NOT be called since - * this would send a return message, which is what batching tries to avoid. - * It is the service/protocol writer's responsibility to know which calls are - * batched and which are not. Warning: responding to batch calls may - * deadlock the caller and server processes! - */ - -__BEGIN_DECLS -extern bool_t svc_sendreply __P((SVCXPRT *, xdrproc_t, char *)); -extern void svcerr_decode __P((SVCXPRT *)); -extern void svcerr_weakauth __P((SVCXPRT *)); -extern void svcerr_noproc __P((SVCXPRT *)); -#ifdef __LP64__ -extern void svcerr_progvers __P((SVCXPRT *, unsigned int, unsigned int)); -#else -extern void svcerr_progvers __P((SVCXPRT *, unsigned long, unsigned long)); -#endif -extern void svcerr_auth __P((SVCXPRT *, enum auth_stat)); -extern void svcerr_noprog __P((SVCXPRT *)); -extern void svcerr_systemerr __P((SVCXPRT *)); -__END_DECLS - -/* - * Lowest level dispatching -OR- who owns this process anyway. - * Somebody has to wait for incoming requests and then call the correct - * service routine. The routine svc_run does infinite waiting; i.e., - * svc_run never returns. - * Since another (co-existant) package may wish to selectively wait for - * incoming calls or other events outside of the rpc architecture, the - * routine svc_getreq is provided. It must be passed readfds, the - * "in-place" results of a select system call (see select, section 2). - */ - -/* - * Global keeper of rpc service descriptors in use - * dynamic; must be inspected before each call to select - */ -#ifdef FD_SETSIZE -extern fd_set svc_fdset; -#define svc_fds svc_fdset.fds_bits[0] /* compatibility */ -#else -extern int svc_fds; -#endif /* def FD_SETSIZE */ - -/* - * a small program implemented by the svc_rpc implementation itself; - * also see clnt.h for protocol numbers. - */ -extern void rpctest_service(); - -__BEGIN_DECLS -extern void svc_getreq __P((int)); -extern void svc_getreqset __P((fd_set *)); -extern void svc_run __P((void)); -__END_DECLS - -/* - * Socket to use on svcxxx_create call to get default socket - */ -#define RPC_ANYSOCK -1 - -/* - * These are the existing service side transport implementations - */ - -/* - * Memory based rpc for testing and timing. - */ -__BEGIN_DECLS -extern SVCXPRT *svcraw_create __P((void)); -__END_DECLS - - -/* - * Udp based rpc. - */ -__BEGIN_DECLS -extern SVCXPRT *svcudp_create __P((int)); -extern SVCXPRT *svcudp_bufcreate __P((int, unsigned int, unsigned int)); -__END_DECLS - - -/* - * Tcp based rpc. - */ -__BEGIN_DECLS -extern SVCXPRT *svctcp_create __P((int, unsigned int, unsigned int)); -__END_DECLS - -/* - * Any open file descriptor based rpc. - */ -__BEGIN_DECLS -extern SVCXPRT *svcfd_create __P((int, u_int, u_int)); -__END_DECLS - -#endif /* !_RPC_SVC_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/svc_auth.h b/tools/darwin/depends/libnfs/rpcinc/svc_auth.h deleted file mode 100644 index 3dc09591f2013..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/svc_auth.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)svc_auth.h 1.6 86/07/16 SMI - * from: @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC - * $Id: svc_auth.h,v 1.2 1999/10/14 21:56:54 wsanchez Exp $ - */ - -/* - * svc_auth.h, Service side of rpc authentication. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_SVCAUTH_H -#define _RPC_SVCAUTH_H - -/* - * Server side authenticator - */ -__BEGIN_DECLS -extern enum auth_stat _authenticate __P((struct svc_req *, struct rpc_msg *)); -__END_DECLS - -#endif /* !_RPC_SVCAUTH_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/types.h b/tools/darwin/depends/libnfs/rpcinc/types.h deleted file mode 100644 index 0fe5adc1c0134..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/types.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)types.h 1.18 87/07/24 SMI - * from: @(#)types.h 2.3 88/08/15 4.0 RPCSRC - * $Id: types.h,v 1.4 2003/10/16 22:15:15 majka Exp $ - */ - -/* - * Rpc additions to - */ -#ifndef _RPC_TYPES_H -#define _RPC_TYPES_H - -#define bool_t int -#define enum_t int -#define __dontcare__ -1 - -#ifndef FALSE -# define FALSE (0) -#endif -#ifndef TRUE -# define TRUE (1) -#endif - -#ifndef NULL -#ifdef __GNUG__ -#define NULL __null -#else /* ! __GNUG__ */ -#ifndef __cplusplus -#define NULL ((void *)0) -#else /* __cplusplus */ -#define NULL 0 -#endif /* ! __cplusplus */ -#endif /* __GNUG__ */ -#endif /* ! NULL */ - -#define mem_alloc(bsize) calloc(1, bsize) -#define mem_free(ptr, bsize) free(ptr) - -#ifndef makedev /* ie, we haven't already included it */ -#include -#endif -#include - -#ifdef __LP64__ -typedef int rpc_int; -typedef unsigned int rpc_uint; -#else -typedef long rpc_int; -typedef unsigned long rpc_uint; -#endif - -#endif /* !_RPC_TYPES_H */ diff --git a/tools/darwin/depends/libnfs/rpcinc/xdr.h b/tools/darwin/depends/libnfs/rpcinc/xdr.h deleted file mode 100644 index 9492ccfbbf5ea..0000000000000 --- a/tools/darwin/depends/libnfs/rpcinc/xdr.h +++ /dev/null @@ -1,430 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)xdr.h 1.19 87/04/22 SMI - * from: @(#)xdr.h 2.2 88/07/29 4.0 RPCSRC - * $FreeBSD: src/include/rpc/xdr.h,v 1.23 2003/03/07 13:19:40 nectar Exp $ - */ - -/* - * xdr.h, External Data Representation Serialization Routines. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_XDR_H -#define _RPC_XDR_H -#include - -/* - * XDR provides a conventional way for converting between C data - * types and an external bit-string representation. Library supplied - * routines provide for the conversion on built-in C data types. These - * routines and utility routines defined here are used to help implement - * a type encode/decode routine for each user-defined type. - * - * Each data type provides a single procedure which takes two arguments: - * - * bool_t - * xdrproc(xdrs, argresp) - * XDR *xdrs; - * *argresp; - * - * xdrs is an instance of a XDR handle, to which or from which the data - * type is to be converted. argresp is a pointer to the structure to be - * converted. The XDR handle contains an operation field which indicates - * which of the operations (ENCODE, DECODE * or FREE) is to be performed. - * - * XDR_DECODE may allocate space if the pointer argresp is null. This - * data can be freed with the XDR_FREE operation. - * - * We write only one procedure per data type to make it easy - * to keep the encode and decode procedures for a data type consistent. - * In many cases the same code performs all operations on a user defined type, - * because all the hard work is done in the component type routines. - * decode as a series of calls on the nested data types. - */ - -/* - * Xdr operations. XDR_ENCODE causes the type to be encoded into the - * stream. XDR_DECODE causes the type to be extracted from the stream. - * XDR_FREE can be used to release the space allocated by an XDR_DECODE - * request. - */ -enum xdr_op { - XDR_ENCODE=0, - XDR_DECODE=1, - XDR_FREE=2 -}; - -/* - * This is the number of bytes per unit of external data. - */ -#define BYTES_PER_XDR_UNIT (4) -#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \ - * BYTES_PER_XDR_UNIT) - -/* - * The XDR handle. - * Contains operation which is being applied to the stream, - * an operations vector for the particular implementation (e.g. see xdr_mem.c), - * and two private fields for the use of the particular implementation. - */ -typedef struct __rpc_xdr { - enum xdr_op x_op; /* operation; fast additional param */ - const struct xdr_ops { -#ifdef __LP64__ - /* get an int from underlying stream */ - bool_t (*x_getlong)(struct __rpc_xdr *, int *); - /* put an int to " */ - bool_t (*x_putlong)(struct __rpc_xdr *, const int *); -#else - /* get a long from underlying stream */ - bool_t (*x_getlong)(struct __rpc_xdr *, long *); - /* put a long to " */ - bool_t (*x_putlong)(struct __rpc_xdr *, const long *); -#endif - /* get some bytes from " */ - bool_t (*x_getbytes)(struct __rpc_xdr *, char *, unsigned int); - /* put some bytes to " */ - bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, unsigned int); - /* returns bytes off from beginning */ - unsigned int (*x_getpostn)(struct __rpc_xdr *); - /* lets you reposition the stream */ - bool_t (*x_setpostn)(struct __rpc_xdr *, unsigned int); - /* buf quick ptr to buffered data */ - int32_t *(*x_inline)(struct __rpc_xdr *, unsigned int); - /* free privates of this xdr_stream */ - void (*x_destroy)(struct __rpc_xdr *); - bool_t (*x_control)(struct __rpc_xdr *, int, void *); - } *x_ops; - char * x_public; /* users' data */ - void * x_private; /* pointer to private data */ - char * x_base; /* private used for position info */ - unsigned int x_handy; /* extra private word */ -} XDR; - -/* - * A xdrproc_t exists for each data type which is to be encoded or decoded. - * - * The second argument to the xdrproc_t is a pointer to an opaque pointer. - * The opaque pointer generally points to a structure of the data type - * to be decoded. If this pointer is 0, then the type routines should - * allocate dynamic storage of the appropriate size and return it. - */ -#ifdef _KERNEL -typedef bool_t (*xdrproc_t)(XDR *, void *, unsigned int); -#else -/* - * XXX can't actually prototype it, because some take three args!!! - */ -typedef bool_t (*xdrproc_t)(XDR *, ...); -#endif - -/* - * Operations defined on a XDR handle - * - * XDR *xdrs; - * long *longp; - * char * addr; - * unsigned int len; - * unsigned int pos; - */ -#define XDR_GETLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) -#define xdr_getlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) - -#define XDR_PUTLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) -#define xdr_putlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) - - -#ifdef __LP64__ -static __inline int -xdr_getint32(XDR *xdrs, int32_t *ip) -{ - int32_t l; - - if (!xdr_getlong(xdrs, &l)) - return (FALSE); - *ip = l; - return (TRUE); -} - -static __inline int -xdr_putint32(XDR *xdrs, int32_t *ip) -{ - int32_t l; - - l = *ip; - return xdr_putlong(xdrs, &l); -} -#else -static __inline int -xdr_getint32(XDR *xdrs, int32_t *ip) -{ - int32_t l; - - if (!xdr_getlong(xdrs, (long *)&l)) - return (FALSE); - *ip = l; - return (TRUE); -} - -static __inline int -xdr_putint32(XDR *xdrs, int32_t *ip) -{ - int32_t l; - - l = *ip; - return xdr_putlong(xdrs, (long *)&l); -} -#endif - -#define XDR_GETINT32(xdrs, int32p) xdr_getint32(xdrs, int32p) -#define XDR_PUTINT32(xdrs, int32p) xdr_putint32(xdrs, int32p) - -#define XDR_GETBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) -#define xdr_getbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) - -#define XDR_PUTBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) -#define xdr_putbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) - -#define XDR_GETPOS(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) -#define xdr_getpos(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) - -#define XDR_SETPOS(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) -#define xdr_setpos(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) - -#define XDR_INLINE(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) -#define xdr_inline(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) - -#define XDR_DESTROY(xdrs) \ - if ((xdrs)->x_ops->x_destroy) \ - (*(xdrs)->x_ops->x_destroy)(xdrs) -#define xdr_destroy(xdrs) \ - if ((xdrs)->x_ops->x_destroy) \ - (*(xdrs)->x_ops->x_destroy)(xdrs) - -#define XDR_CONTROL(xdrs, req, op) \ - if ((xdrs)->x_ops->x_control) \ - (*(xdrs)->x_ops->x_control)(xdrs, req, op) -#define xdr_control(xdrs, req, op) XDR_CONTROL(xdrs, req, op) - -/* - * Solaris strips the '_t' from these types -- not sure why. - * But, let's be compatible. - */ -#define xdr_rpcvers(xdrs, versp) xdr_u_int32(xdrs, versp) -#define xdr_rpcprog(xdrs, progp) xdr_u_int32(xdrs, progp) -#define xdr_rpcproc(xdrs, procp) xdr_u_int32(xdrs, procp) -#define xdr_rpcprot(xdrs, protp) xdr_u_int32(xdrs, protp) -#define xdr_rpcport(xdrs, portp) xdr_u_int32(xdrs, portp) - -/* - * Support struct for discriminated unions. - * You create an array of xdrdiscrim structures, terminated with - * an entry with a null procedure pointer. The xdr_union routine gets - * the discriminant value and then searches the array of structures - * for a matching value. If a match is found the associated xdr routine - * is called to handle that part of the union. If there is - * no match, then a default routine may be called. - * If there is no match and no default routine it is an error. - */ -#define NULL_xdrproc_t ((xdrproc_t)0) -struct xdr_discrim { - int value; - xdrproc_t proc; -}; - -/* - * In-line routines for fast encode/decode of primitive data types. - * Caveat emptor: these use single memory cycles to get the - * data from the underlying buffer, and will fail to operate - * properly if the data is not aligned. The standard way to use these - * is to say: - * if ((buf = XDR_INLINE(xdrs, count)) == NULL) - * return (FALSE); - * <<< macro calls >>> - * where ``count'' is the number of bytes of data occupied - * by the primitive data types. - * - * N.B. and frozen for all time: each data type here uses 4 bytes - * of external representation. - */ -#define IXDR_GET_INT32(buf) ((int32_t)ntohl((u_int32_t)*(buf)++)) -#define IXDR_PUT_INT32(buf, v) (*(buf)++ =(int32_t)htonl((u_int32_t)v)) -#define IXDR_GET_U_INT32(buf) ((u_int32_t)IXDR_GET_INT32(buf)) -#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32((buf), ((int32_t)(v))) - -#ifdef __LP64__ -#define IXDR_GET_LONG(buf) (ntohl((u_int32_t)*(buf)++)) -#define IXDR_PUT_LONG(buf, v) (*(buf)++ = htonl((u_int32_t)v)) -#else -#define IXDR_GET_LONG(buf) ((long)ntohl((u_int32_t)*(buf)++)) -#define IXDR_PUT_LONG(buf, v) (*(buf)++ =(int32_t)htonl((u_int32_t)v)) -#endif - -#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf)) -#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf)) -#ifdef __LP64__ -#define IXDR_GET_U_LONG(buf) ((unsigned int)IXDR_GET_LONG(buf)) -#else -#define IXDR_GET_U_LONG(buf) ((unsigned long)IXDR_GET_LONG(buf)) -#endif -#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_SHORT(buf) ((unsigned short)IXDR_GET_LONG(buf)) - -#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), (v)) -#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), (v)) -#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), (v)) -#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), (v)) -#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), (v)) - -/* - * These are the "generic" xdr routines. - */ -__BEGIN_DECLS -extern bool_t xdr_void(void); -extern bool_t xdr_int(XDR *, int *); -extern bool_t xdr_u_int(XDR *, unsigned int *); -#ifdef __LP64__ -extern bool_t xdr_long(XDR *, int *); -extern bool_t xdr_u_long(XDR *, unsigned int *); -#else -extern bool_t xdr_long(XDR *, long *); -extern bool_t xdr_u_long(XDR *, unsigned long *); -#endif -extern bool_t xdr_short(XDR *, short *); -extern bool_t xdr_u_short(XDR *, unsigned short *); -extern bool_t xdr_int16_t(XDR *, int16_t *); -extern bool_t xdr_u_int16_t(XDR *, u_int16_t *); -extern bool_t xdr_int32_t(XDR *, int32_t *); -extern bool_t xdr_u_int32_t(XDR *, u_int32_t *); -extern bool_t xdr_int64_t(XDR *, int64_t *); -extern bool_t xdr_u_int64_t(XDR *, u_int64_t *); -extern bool_t xdr_bool(XDR *, bool_t *); -extern bool_t xdr_enum(XDR *, enum_t *); -extern bool_t xdr_array(XDR *, char **, unsigned int *, unsigned int, unsigned int, xdrproc_t); -extern bool_t xdr_bytes(XDR *, char **, unsigned int *, unsigned int); -extern bool_t xdr_opaque(XDR *, char *, unsigned int); -extern bool_t xdr_string(XDR *, char **, unsigned int); -extern bool_t xdr_union(XDR *, enum_t *, char *, const struct xdr_discrim *, xdrproc_t); -extern bool_t xdr_char(XDR *, char *); -extern bool_t xdr_u_char(XDR *, unsigned char *); -extern bool_t xdr_vector(XDR *, char *, unsigned int, unsigned int, xdrproc_t); -extern bool_t xdr_float(XDR *, float *); -extern bool_t xdr_double(XDR *, double *); -extern bool_t xdr_quadruple(XDR *, long double *); -extern bool_t xdr_reference(XDR *, char **, unsigned int, xdrproc_t); -extern bool_t xdr_pointer(XDR *, char **, unsigned int, xdrproc_t); -extern bool_t xdr_wrapstring(XDR *, char **); -extern void xdr_free(xdrproc_t, void *); -extern bool_t xdr_hyper(XDR *, quad_t *); -extern bool_t xdr_u_hyper(XDR *, u_quad_t *); -extern bool_t xdr_longlong_t(XDR *, quad_t *); -extern bool_t xdr_u_longlong_t(XDR *, u_quad_t *); -__END_DECLS - -/* - * Common opaque bytes objects used by many rpc protocols; - * declared here due to commonality. - */ -#define MAX_NETOBJ_SZ 1024 -struct netobj { - unsigned int n_len; - char *n_bytes; -}; -typedef struct netobj netobj; -extern bool_t xdr_netobj(XDR *, struct netobj *); - -/* - * These are the public routines for the various implementations of - * xdr streams. - */ -__BEGIN_DECLS -/* XDR using memory buffers */ -extern void xdrmem_create(XDR *, char *, unsigned int, enum xdr_op); - -/* XDR using stdio library */ -#ifdef _STDIO_H_ -extern void xdrstdio_create(XDR *, FILE *, enum xdr_op); -#endif - -/* XDR pseudo records for tcp */ -extern void xdrrec_create(XDR *, unsigned int, unsigned int, void *, - int (*)(void *, void *, int), - int (*)(void *, void *, int)); - -/* make end of xdr record */ -extern bool_t xdrrec_endofrecord(XDR *, int); - -/* move to beginning of next record */ -extern bool_t xdrrec_skiprecord(XDR *); - -/* true if no more input */ -extern bool_t xdrrec_eof(XDR *); -extern unsigned int xdrrec_readbytes(XDR *, caddr_t, unsigned int); -__END_DECLS - -#endif /* !_RPC_XDR_H */ diff --git a/tools/darwin/depends/libogg/Makefile b/tools/darwin/depends/libogg/Makefile deleted file mode 100644 index 3b267717ca4a8..0000000000000 --- a/tools/darwin/depends/libogg/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libogg -VERSION=1.3.0 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz -PACKAGE_NAME=libogg - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - PACKAGE_NAME=$(PACKAGE_NAME) - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libplist/0001-dontbuildswig.patch b/tools/darwin/depends/libplist/0001-dontbuildswig.patch deleted file mode 100644 index 7ff491df8d18b..0000000000000 --- a/tools/darwin/depends/libplist/0001-dontbuildswig.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt 2011-08-18 21:45:33.000000000 +0200 -+++ b/CMakeLists.txt 2011-08-18 21:45:16.000000000 +0200 -@@ -36,7 +36,7 @@ - ADD_SUBDIRECTORY( test ) - - IF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND ) -- ADD_SUBDIRECTORY( swig ) -+# ADD_SUBDIRECTORY( swig ) - ENDIF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND ) - - # add uninstall target diff --git a/tools/darwin/depends/libplist/Makefile b/tools/darwin/depends/libplist/Makefile deleted file mode 100644 index 3f9734d241949..0000000000000 --- a/tools/darwin/depends/libplist/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=libplist -VERSION=1.6 -SOURCE=$(LIBNAME)-$(VERSION) -FILENAME=v$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -LIBDYLIB=$(SOURCE)/build/src/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p1 < ../0001-dontbuildswig.patch - cd $(SOURCE); rm -rf build; mkdir -p build - cd $(SOURCE)/build; CC=$(CC) CXX=$(CXX) cmake \ - -DCMAKE_C_FLAGS:STRING="$(CPPFLAGS) $(CFLAGS)" \ - -DCMAKE_CXX_FLAGS:STRING="$(CPPFLAGS) $(CXXFLAGS)" \ - -DCMAKE_INCLUDE_PATH=$(PREFIX)/include \ - -DCMAKE_LIBRARY_PATH=$(PREFIX)/lib \ - -DCMAKE_INSTALL_NAME_DIR=$(PREFIX)/lib \ - -DCMAKE_INSTALL_PREFIX=$(PREFIX) \ - -DCMAKE_FIND_ROOT_PATH=$(platform_sdk_path) .. - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE)/build - -.installed: - make -C $(SOURCE)/build install - touch $@ - -clean: - rm -rf $(SOURCE) .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/libpng-native/Makefile b/tools/darwin/depends/libpng-native/Makefile deleted file mode 100644 index 1d5d9f5de4d2e..0000000000000 --- a/tools/darwin/depends/libpng-native/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../Makefile.buildtools -export CFLAGS=-I$(TOOLCHAIN)/include -export LDFLAGS=-L$(TOOLCHAIN)/lib -export CPPFLAGS=-I$(TOOLCHAIN)/include -export CXXFLAGS=-I$(TOOLCHAIN)/include - -# lib name, version -LIBNAME=libpng -VERSION=1.2.38 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(TOOLCHAIN) - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libpng/Makefile b/tools/darwin/depends/libpng/Makefile deleted file mode 100644 index 486b9f53b389e..0000000000000 --- a/tools/darwin/depends/libpng/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libpng -VERSION=1.5.13 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/librtmp/Makefile b/tools/darwin/depends/librtmp/Makefile deleted file mode 100644 index 5b93d7c578116..0000000000000 --- a/tools/darwin/depends/librtmp/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=rtmpdump -VERSION=e0056c51cc1710c9a44d2a2c4e2f344fa9cabcf4 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - #git clone git://git.ffmpeg.org/rtmpdump $(SOURCE) - #cd $(SOURCE); git archive --format=tar --prefix=$(SOURCE)/ $(VERSION) | gzip -9 > $(TARBALLS_LOCATION)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p1 < ../librtmp-60-second-fix.patch - sed -i -e 's|CC=|#CC=|' $(SOURCE)/Makefile - sed -i -e 's|LD=|#LD=|' $(SOURCE)/Makefile - sed -i -e 's|CC=|#CC=|' $(SOURCE)/librtmp/Makefile - sed -i -e 's|LD=|#LD=|' $(SOURCE)/librtmp/Makefile - sed -i -e 's|AR=|#AR=|' $(SOURCE)/librtmp/Makefile - sed -i -e 's|headerpad_max_install_names|headerpad_max_install_names -install_name \$$(libdir)/\$$@|' $(SOURCE)/librtmp/Makefile - -$(LIBDYLIB): $(SOURCE) - make SYS=darwin prefix=$(PREFIX) XCFLAGS="$(CFLAGS)" XLDFLAGS="$(LDFLAGS)" -j $(MAKE_JOBS) -C $(SOURCE)/librtmp - -.installed: - make SYS=darwin prefix=$(PREFIX) -C $(SOURCE)/librtmp install - touch $@ - -clean: - make SYS=darwin -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/librtmp/librtmp-60-second-fix.patch b/tools/darwin/depends/librtmp/librtmp-60-second-fix.patch deleted file mode 100644 index 2914fc1b8eb20..0000000000000 --- a/tools/darwin/depends/librtmp/librtmp-60-second-fix.patch +++ /dev/null @@ -1,1913 +0,0 @@ -diff --git a/librtmp/amf.c b/librtmp/amf.c -index ce84f81..a25bc04 100644 ---- a/librtmp/amf.c -+++ b/librtmp/amf.c -@@ -610,6 +610,9 @@ AMFProp_Decode(AMFObjectProperty *prop, const char *pBuffer, int nSize, - return -1; - } - -+ if (*pBuffer == AMF_NULL) -+ bDecodeName = 0; -+ - if (bDecodeName && nSize < 4) - { /* at least name (length + at least 1 byte) and 1 byte of data */ - RTMP_Log(RTMP_LOGDEBUG, -@@ -801,8 +804,8 @@ AMFProp_Dump(AMFObjectProperty *prop) - } - else - { -- name.av_val = "no-name."; -- name.av_len = sizeof("no-name.") - 1; -+ name.av_val = "no-name"; -+ name.av_len = sizeof("no-name") - 1; - } - if (name.av_len > 18) - name.av_len = 18; -diff --git a/librtmp/dh.h b/librtmp/dh.h -index 9959532..e29587b 100644 ---- a/librtmp/dh.h -+++ b/librtmp/dh.h -@@ -61,7 +61,7 @@ static int MDH_generate_key(MDH *dh) - MP_set(&dh->ctx.P, dh->p); - MP_set(&dh->ctx.G, dh->g); - dh->ctx.len = 128; -- dhm_make_public(&dh->ctx, 1024, out, 1, havege_rand, &RTMP_TLS_ctx->hs); -+ dhm_make_public(&dh->ctx, 1024, out, 1, havege_random, &RTMP_TLS_ctx->hs); - MP_new(dh->pub_key); - MP_new(dh->priv_key); - MP_set(dh->pub_key, &dh->ctx.GX); -diff --git a/librtmp/handshake.h b/librtmp/handshake.h -index 0438486..102ba82 100644 ---- a/librtmp/handshake.h -+++ b/librtmp/handshake.h -@@ -965,8 +965,18 @@ HandShake(RTMP * r, int FP9HandShake) - __FUNCTION__); - RTMP_LogHex(RTMP_LOGDEBUG, reply, RTMP_SIG_SIZE); - #endif -- if (!WriteN(r, (char *)reply, RTMP_SIG_SIZE)) -- return FALSE; -+ if (r->Link.CombineConnectPacket) -+ { -+ char *HandshakeResponse = malloc(RTMP_SIG_SIZE); -+ memcpy(HandshakeResponse, (char *) reply, RTMP_SIG_SIZE); -+ r->Link.HandshakeResponse.av_val = HandshakeResponse; -+ r->Link.HandshakeResponse.av_len = RTMP_SIG_SIZE; -+ } -+ else -+ { -+ if (!WriteN(r, (char *) reply, RTMP_SIG_SIZE)) -+ return FALSE; -+ } - - /* 2nd part of handshake */ - if (ReadN(r, (char *)serversig, RTMP_SIG_SIZE) != RTMP_SIG_SIZE) -diff --git a/librtmp/hashswf.c b/librtmp/hashswf.c -index 9f4e2c0..eeed34c 100644 ---- a/librtmp/hashswf.c -+++ b/librtmp/hashswf.c -@@ -70,7 +70,7 @@ extern TLS_CTX RTMP_TLS_ctx; - - #endif /* CRYPTO */ - --#define AGENT "Mozilla/5.0" -+#define AGENT "Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0" - - HTTPResult - HTTP_get(struct HTTP_ctx *http, const char *url, HTTP_read_callback *cb) -@@ -528,7 +528,7 @@ RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash, - - if (strncmp(buf, "url: ", 5)) - continue; -- if (strncmp(buf + 5, url, hlen)) -+ if (strncmp(buf + 5, url, strlen(buf + 5) - 1)) - continue; - r1 = strrchr(buf, '/'); - i = strlen(r1); -diff --git a/librtmp/log.c b/librtmp/log.c -index 0012985..856e3e4 100644 ---- a/librtmp/log.c -+++ b/librtmp/log.c -@@ -52,8 +52,8 @@ static void rtmp_log_default(int level, const char *format, va_list vl) - vsnprintf(str, MAX_PRINT_LEN-1, format, vl); - - /* Filter out 'no-name' */ -- if ( RTMP_debuglevel - #include - #include -+#include - - #include "rtmp_sys.h" - #include "log.h" -@@ -45,6 +46,7 @@ TLS_CTX RTMP_TLS_ctx; - - #define RTMP_SIG_SIZE 1536 - #define RTMP_LARGE_HEADER_SIZE 12 -+#define HEX2BIN(a) (((a)&0x40)?((a)&0xf)+9:((a)&0xf)) - - static const int packetSize[] = { 12, 8, 4, 1 }; - -@@ -97,6 +99,9 @@ static int SendFCSubscribe(RTMP *r, AVal *subscribepath); - static int SendPlay(RTMP *r); - static int SendBytesReceived(RTMP *r); - static int SendUsherToken(RTMP *r, AVal *usherToken); -+static int SendInvoke(RTMP *r, AVal *Command, int queue); -+static int SendGetStreamLength(RTMP *r); -+static int strsplit(char *src, int srclen, char delim, char ***params); - - #if 0 /* unused */ - static int SendBGHasStream(RTMP *r, double dId, AVal *playpath); -@@ -259,6 +264,8 @@ RTMP_Init(RTMP *r) - r->m_fVideoCodecs = 252.0; - r->Link.timeout = 30; - r->Link.swfAge = 30; -+ r->Link.CombineConnectPacket = TRUE; -+ r->Link.ConnectPacket = FALSE; - } - - void -@@ -337,6 +344,7 @@ RTMP_SetupStream(RTMP *r, - AVal *flashVer, - AVal *subscribepath, - AVal *usherToken, -+ AVal *WeebToken, - int dStart, - int dStop, int bLiveStream, long int timeout) - { -@@ -359,6 +367,8 @@ RTMP_SetupStream(RTMP *r, - RTMP_Log(RTMP_LOGDEBUG, "subscribepath : %s", subscribepath->av_val); - if (usherToken && usherToken->av_val) - RTMP_Log(RTMP_LOGDEBUG, "NetStream.Authenticate.UsherToken : %s", usherToken->av_val); -+ if (WeebToken && WeebToken->av_val) -+ RTMP_Log(RTMP_LOGDEBUG, "WeebToken: %s", WeebToken->av_val); - if (flashVer && flashVer->av_val) - RTMP_Log(RTMP_LOGDEBUG, "flashVer : %s", flashVer->av_val); - if (dStart > 0) -@@ -426,6 +436,8 @@ RTMP_SetupStream(RTMP *r, - r->Link.subscribepath = *subscribepath; - if (usherToken && usherToken->av_len) - r->Link.usherToken = *usherToken; -+ if (WeebToken && WeebToken->av_len) -+ r->Link.WeebToken = *WeebToken; - r->Link.seekTime = dStart; - r->Link.stopTime = dStop; - if (bLiveStream) -@@ -483,14 +495,22 @@ static struct urlopt { - "Stream is live, no seeking possible" }, - { AVC("subscribe"), OFF(Link.subscribepath), OPT_STR, 0, - "Stream to subscribe to" }, -- { AVC("jtv"), OFF(Link.usherToken), OPT_STR, 0, -- "Justin.tv authentication token" }, -- { AVC("token"), OFF(Link.token), OPT_STR, 0, -+ { AVC("jtv"), OFF(Link.usherToken), OPT_STR, 0, -+ "Justin.tv authentication token"}, -+ { AVC("weeb"), OFF(Link.WeebToken), OPT_STR, 0, -+ "Weeb.tv authentication token"}, -+ { AVC("token"), OFF(Link.token), OPT_STR, 0, - "Key for SecureToken response" }, - { AVC("swfVfy"), OFF(Link.lFlags), OPT_BOOL, RTMP_LF_SWFV, - "Perform SWF Verification" }, - { AVC("swfAge"), OFF(Link.swfAge), OPT_INT, 0, - "Number of days to use cached SWF hash" }, -+#ifdef CRYPTO -+ { AVC("swfsize"), OFF(Link.swfSize), OPT_INT, 0, -+ "Size of the decompressed SWF file"}, -+ { AVC("swfhash"), OFF(Link.swfHash), OPT_STR, 0, -+ "SHA256 hash of the decompressed SWF file"}, -+#endif - { AVC("start"), OFF(Link.seekTime), OPT_INT, 0, - "Stream start position in milliseconds" }, - { AVC("stop"), OFF(Link.stopTime), OPT_INT, 0, -@@ -751,9 +771,16 @@ int RTMP_SetupURL(RTMP *r, char *url) - } - - #ifdef CRYPTO -- if ((r->Link.lFlags & RTMP_LF_SWFV) && r->Link.swfUrl.av_len) -- RTMP_HashSWF(r->Link.swfUrl.av_val, &r->Link.SWFSize, -- (unsigned char *)r->Link.SWFHash, r->Link.swfAge); -+ RTMP_Log(RTMP_LOGDEBUG, "Khalsa: %d %d %s\n", r->Link.swfSize, r->Link.swfHash.av_len, r->Link.swfHash.av_val); -+ if (r->Link.swfSize && r->Link.swfHash.av_len) -+ { -+ int i, j = 0; -+ for (i = 0; i < r->Link.swfHash.av_len; i += 2) -+ r->Link.SWFHash[j++] = (HEX2BIN(r->Link.swfHash.av_val[i]) << 4) | HEX2BIN(r->Link.swfHash.av_val[i + 1]); -+ r->Link.SWFSize = (uint32_t) r->Link.swfSize; -+ } -+ else if ((r->Link.lFlags & RTMP_LF_SWFV) && r->Link.swfUrl.av_len) -+ RTMP_HashSWF(r->Link.swfUrl.av_val, &r->Link.SWFSize, (unsigned char *) r->Link.SWFHash, r->Link.swfAge); - #endif - - if (r->Link.port == 0) -@@ -854,6 +881,8 @@ RTMP_Connect0(RTMP *r, struct sockaddr * service) - } - - setsockopt(r->m_sb.sb_socket, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof(on)); -+ if (r->Link.protocol & RTMP_FEATURE_HTTP) -+ setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, sizeof (on)); - - return TRUE; - } -@@ -1308,8 +1337,24 @@ ReadN(RTMP *r, char *buffer, int n) - return 0; - } - } -- if (r->m_resplen && !r->m_sb.sb_size) -- RTMPSockBuf_Fill(&r->m_sb); -+ -+ // Try to fill the whole buffer. previous buffer needs to be consumed -+ // completely before receiving new data. -+ if (r->m_resplen && (r->m_sb.sb_size <= 0)) -+ { -+ do -+ { -+ nBytes = RTMPSockBuf_Fill(&r->m_sb); -+ if (nBytes == -1) -+ { -+ if (!r->m_sb.sb_timedout) -+ RTMP_Close(r); -+ return 0; -+ } -+ } -+ while (r->m_resplen && (r->m_sb.sb_size < r->m_resplen) && (nBytes > 0)); -+ } -+ - avail = r->m_sb.sb_size; - if (avail > r->m_resplen) - avail = r->m_resplen; -@@ -1336,10 +1381,9 @@ ReadN(RTMP *r, char *buffer, int n) - r->m_sb.sb_size -= nRead; - nBytes = nRead; - r->m_nBytesIn += nRead; -- if (r->m_bSendCounter -- && r->m_nBytesIn > ( r->m_nBytesInSent + r->m_nClientBW / 10)) -- if (!SendBytesReceived(r)) -- return FALSE; -+ if (r->m_bSendCounter && r->m_nBytesIn > (r->m_nBytesInSent + r->m_nClientBW / 10)) -+ if (!SendBytesReceived(r)) -+ return FALSE; - } - /*RTMP_Log(RTMP_LOGDEBUG, "%s: %d bytes\n", __FUNCTION__, nBytes); */ - #ifdef _DEBUG -@@ -1390,6 +1434,16 @@ WriteN(RTMP *r, const char *buffer, int n) - } - #endif - -+ if (r->Link.ConnectPacket) -+ { -+ char *ConnectPacket = malloc(r->Link.HandshakeResponse.av_len + n); -+ memcpy(ConnectPacket, r->Link.HandshakeResponse.av_val, r->Link.HandshakeResponse.av_len); -+ memcpy(ConnectPacket + r->Link.HandshakeResponse.av_len, ptr, n); -+ ptr = ConnectPacket; -+ n += r->Link.HandshakeResponse.av_len; -+ r->Link.ConnectPacket = FALSE; -+ } -+ - while (n > 0) - { - int nBytes; -@@ -1455,6 +1509,9 @@ SendConnectPacket(RTMP *r, RTMPPacket *cp) - char pbuf[4096], *pend = pbuf + sizeof(pbuf); - char *enc; - -+ if (r->Link.CombineConnectPacket) -+ r->Link.ConnectPacket = TRUE; -+ - if (cp) - return RTMP_SendPacket(r, cp, TRUE); - -@@ -1667,7 +1724,7 @@ SendUsherToken(RTMP *r, AVal *usherToken) - packet.m_hasAbsTimestamp = 0; - packet.m_body = pbuf + RTMP_MAX_HEADER_SIZE; - -- RTMP_Log(RTMP_LOGDEBUG, "UsherToken: %s", usherToken->av_val); -+ RTMP_Log(RTMP_LOGDEBUG, "UsherToken: %.*s", usherToken->av_len, usherToken->av_val); - enc = packet.m_body; - enc = AMF_EncodeString(enc, pend, &av_NetStream_Authenticate_UsherToken); - enc = AMF_EncodeNumber(enc, pend, ++r->m_numInvokes); -@@ -2096,10 +2153,8 @@ SendPlay(RTMP *r) - enc = AMF_EncodeNumber(enc, pend, -1000.0); - else - { -- if (r->Link.seekTime > 0.0) -- enc = AMF_EncodeNumber(enc, pend, r->Link.seekTime); /* resume from here */ -- else -- enc = AMF_EncodeNumber(enc, pend, 0.0); /*-2000.0);*/ /* recorded as default, -2000.0 is not reliable since that freezes the player if the stream is not found */ -+ if (r->Link.seekTime > 0.0 || r->Link.stopTime) -+ enc = AMF_EncodeNumber(enc, pend, r->Link.seekTime); /* resume from here */ - } - if (!enc) - return FALSE; -@@ -2215,7 +2270,7 @@ RTMP_SendCtrl(RTMP *r, short nType, unsigned int nObject, unsigned int nTime) - int nSize; - char *buf; - -- RTMP_Log(RTMP_LOGDEBUG, "sending ctrl. type: 0x%04x", (unsigned short)nType); -+ RTMP_Log(RTMP_LOGDEBUG, "sending ctrl, type: 0x%04x", (unsigned short)nType); - - packet.m_nChannel = 0x02; /* control channel (ping) */ - packet.m_headerType = RTMP_PACKET_SIZE_MEDIUM; -@@ -2247,8 +2302,8 @@ RTMP_SendCtrl(RTMP *r, short nType, unsigned int nObject, unsigned int nTime) - } - else if (nType == 0x1A) - { -- *buf = nObject & 0xff; -- } -+ *buf = nObject & 0xff; -+ } - else - { - if (nSize > 2) -@@ -2305,6 +2360,7 @@ AV_clear(RTMP_METHOD *vals, int num) - free(vals); - } - -+SAVC(onBWCheck); - SAVC(onBWDone); - SAVC(onFCSubscribe); - SAVC(onFCUnsubscribe); -@@ -2314,24 +2370,26 @@ SAVC(_error); - SAVC(close); - SAVC(code); - SAVC(level); -+SAVC(description); - SAVC(onStatus); - SAVC(playlist_ready); - static const AVal av_NetStream_Failed = AVC("NetStream.Failed"); - static const AVal av_NetStream_Play_Failed = AVC("NetStream.Play.Failed"); --static const AVal av_NetStream_Play_StreamNotFound = --AVC("NetStream.Play.StreamNotFound"); --static const AVal av_NetConnection_Connect_InvalidApp = --AVC("NetConnection.Connect.InvalidApp"); -+static const AVal av_NetStream_Play_StreamNotFound = AVC("NetStream.Play.StreamNotFound"); -+static const AVal av_NetConnection_Connect_InvalidApp = AVC("NetConnection.Connect.InvalidApp"); - static const AVal av_NetStream_Play_Start = AVC("NetStream.Play.Start"); - static const AVal av_NetStream_Play_Complete = AVC("NetStream.Play.Complete"); - static const AVal av_NetStream_Play_Stop = AVC("NetStream.Play.Stop"); - static const AVal av_NetStream_Seek_Notify = AVC("NetStream.Seek.Notify"); - static const AVal av_NetStream_Pause_Notify = AVC("NetStream.Pause.Notify"); --static const AVal av_NetStream_Play_PublishNotify = --AVC("NetStream.Play.PublishNotify"); --static const AVal av_NetStream_Play_UnpublishNotify = --AVC("NetStream.Play.UnpublishNotify"); -+static const AVal av_NetStream_Play_PublishNotify = AVC("NetStream.Play.PublishNotify"); -+static const AVal av_NetStream_Play_UnpublishNotify = AVC("NetStream.Play.UnpublishNotify"); - static const AVal av_NetStream_Publish_Start = AVC("NetStream.Publish.Start"); -+static const AVal av_NetConnection_confStream = AVC("NetConnection.confStream"); -+static const AVal av_verifyClient = AVC("verifyClient"); -+static const AVal av_sendStatus = AVC("sendStatus"); -+static const AVal av_getStreamLength = AVC("getStreamLength"); -+static const AVal av_ReceiveCheckPublicStatus = AVC("ReceiveCheckPublicStatus"); - - /* Returns 0 for OK/Failed/error, 1 for 'Stop or Complete' */ - static int -@@ -2341,6 +2399,11 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize) - AVal method; - double txn; - int ret = 0, nRes; -+ char pbuf[256], *pend = pbuf + sizeof (pbuf), *enc, **params = NULL; -+ char *host = r->Link.hostname.av_len ? r->Link.hostname.av_val : ""; -+ char *pageUrl = r->Link.pageUrl.av_len ? r->Link.pageUrl.av_val : ""; -+ int param_count; -+ AVal av_Command, av_Response; - if (body[0] != 0x02) /* make sure it is a string method name we start with */ - { - RTMP_Log(RTMP_LOGWARNING, "%s, Sanity failed. no string method in invoke packet", -@@ -2402,23 +2465,137 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize) - RTMP_SendServerBW(r); - RTMP_SendCtrl(r, 3, 0, 300); - } -- RTMP_SendCreateStream(r); -- -- if (!(r->Link.protocol & RTMP_FEATURE_WRITE)) -- { -- /* Authenticate on Justin.tv legacy servers before sending FCSubscribe */ -- if (r->Link.usherToken.av_len) -- SendUsherToken(r, &r->Link.usherToken); -- /* Send the FCSubscribe if live stream or if subscribepath is set */ -- if (r->Link.subscribepath.av_len) -- SendFCSubscribe(r, &r->Link.subscribepath); -- else if (r->Link.lFlags & RTMP_LF_LIVE) -- SendFCSubscribe(r, &r->Link.playpath); -- } -- } -+ if (strstr(host, "tv-stream.to") || strstr(pageUrl, "tv-stream.to")) -+ { -+ static char auth[] = {'h', 0xC2, 0xA7, '4', 'j', 'h', 'H', '4', '3', 'd'}; -+ AVal av_auth; -+ SAVC(requestAccess); -+ av_auth.av_val = auth; -+ av_auth.av_len = sizeof (auth); -+ -+ enc = pbuf; -+ enc = AMF_EncodeString(enc, pend, &av_requestAccess); -+ enc = AMF_EncodeNumber(enc, pend, ++r->m_numInvokes); -+ *enc++ = AMF_NULL; -+ enc = AMF_EncodeString(enc, pend, &av_auth); -+ av_Command.av_val = pbuf; -+ av_Command.av_len = enc - pbuf; -+ SendInvoke(r, &av_Command, FALSE); -+ -+ SAVC(getConnectionCount); -+ enc = pbuf; -+ enc = AMF_EncodeString(enc, pend, &av_getConnectionCount); -+ enc = AMF_EncodeNumber(enc, pend, ++r->m_numInvokes); -+ *enc++ = AMF_NULL; -+ av_Command.av_val = pbuf; -+ av_Command.av_len = enc - pbuf; -+ SendInvoke(r, &av_Command, FALSE); -+ -+ SendGetStreamLength(r); -+ } -+ else if (strstr(host, "jampo.com.ua") || strstr(pageUrl, "jampo.com.ua")) -+ { -+ SendGetStreamLength(r); -+ } -+ else if (strstr(host, "streamscene.cc") || strstr(pageUrl, "streamscene.cc") -+ || strstr(host, "tsboard.tv") || strstr(pageUrl, "teamstream.in")) -+ { -+ SAVC(r); -+ enc = pbuf; -+ enc = AMF_EncodeString(enc, pend, &av_r); -+ enc = AMF_EncodeNumber(enc, pend, ++r->m_numInvokes); -+ *enc++ = AMF_NULL; -+ av_Command.av_val = pbuf; -+ av_Command.av_len = enc - pbuf; -+ SendInvoke(r, &av_Command, FALSE); -+ -+ SendGetStreamLength(r); -+ } -+ else if (strstr(host, "chaturbate.com") || strstr(pageUrl, "chaturbate.com")) -+ { -+ AVal av_ModelName; -+ SAVC(CheckPublicStatus); -+ -+ if (strlen(pageUrl) > 7) -+ { -+ strsplit(pageUrl + 7, FALSE, '/', ¶ms); -+ av_ModelName.av_val = params[1]; -+ av_ModelName.av_len = strlen(params[1]); -+ -+ enc = pbuf; -+ enc = AMF_EncodeString(enc, pend, &av_CheckPublicStatus); -+ enc = AMF_EncodeNumber(enc, pend, ++r->m_numInvokes); -+ *enc++ = AMF_NULL; -+ enc = AMF_EncodeString(enc, pend, &av_ModelName); -+ av_Command.av_val = pbuf; -+ av_Command.av_len = enc - pbuf; -+ -+ SendInvoke(r, &av_Command, FALSE); -+ } -+ else -+ { -+ RTMP_Log(RTMP_LOGERROR, "you must specify the pageUrl"); -+ RTMP_Close(r); -+ } -+ } -+ /* Weeb.tv specific authentication */ -+ else if (r->Link.WeebToken.av_len) -+ { -+ AVal av_Token, av_Username, av_Password; -+ SAVC(determineAccess); -+ -+ param_count = strsplit(r->Link.WeebToken.av_val, FALSE, ';', ¶ms); -+ if (param_count >= 1) -+ { -+ av_Token.av_val = params[0]; -+ av_Token.av_len = strlen(params[0]); -+ } -+ if (param_count >= 2) -+ { -+ av_Username.av_val = params[1]; -+ av_Username.av_len = strlen(params[1]); -+ } -+ if (param_count >= 3) -+ { -+ av_Password.av_val = params[2]; -+ av_Password.av_len = strlen(params[2]); -+ } -+ -+ enc = pbuf; -+ enc = AMF_EncodeString(enc, pend, &av_determineAccess); -+ enc = AMF_EncodeNumber(enc, pend, ++r->m_numInvokes); -+ *enc++ = AMF_NULL; -+ enc = AMF_EncodeString(enc, pend, &av_Token); -+ enc = AMF_EncodeString(enc, pend, &av_Username); -+ enc = AMF_EncodeString(enc, pend, &av_Password); -+ av_Command.av_val = pbuf; -+ av_Command.av_len = enc - pbuf; -+ -+ RTMP_Log(RTMP_LOGDEBUG, "WeebToken: %s", r->Link.WeebToken.av_val); -+ SendInvoke(r, &av_Command, FALSE); -+ } -+ else -+ RTMP_SendCreateStream(r); -+ } -+ else if (AVMATCH(&methodInvoked, &av_getStreamLength)) -+ { -+ RTMP_SendCreateStream(r); -+ } - else if (AVMATCH(&methodInvoked, &av_createStream)) -- { -- r->m_stream_id = (int)AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 3)); -+ { -+ r->m_stream_id = (int) AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 3)); -+ -+ if (!(r->Link.protocol & RTMP_FEATURE_WRITE)) -+ { -+ /* Authenticate on Justin.tv legacy servers before sending FCSubscribe */ -+ if (r->Link.usherToken.av_len) -+ SendUsherToken(r, &r->Link.usherToken); -+ /* Send the FCSubscribe if live stream or if subscribepath is set */ -+ if (r->Link.subscribepath.av_len) -+ SendFCSubscribe(r, &r->Link.subscribepath); -+ else if ((r->Link.lFlags & RTMP_LF_LIVE) && (!r->Link.WeebToken.av_len)) -+ SendFCSubscribe(r, &r->Link.playpath); -+ } - - if (r->Link.protocol & RTMP_FEATURE_WRITE) - { -@@ -2441,7 +2618,7 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize) - } - else if (AVMATCH(&method, &av_onBWDone)) - { -- if (!r->m_nBWCheckCounter) -+ if (!r->m_nBWCheckCounter) - SendCheckBW(r); - } - else if (AVMATCH(&method, &av_onFCSubscribe)) -@@ -2457,7 +2634,7 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize) - { - SendPong(r, txn); - } -- else if (AVMATCH(&method, &av__onbwcheck)) -+ else if (AVMATCH(&method, &av__onbwcheck) || AVMATCH(&method, &av_onBWCheck)) - { - SendCheckBWResult(r, txn); - } -@@ -2473,20 +2650,63 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize) - } - else if (AVMATCH(&method, &av__error)) - { -- RTMP_Log(RTMP_LOGERROR, "rtmp server sent error"); -+ double code = 0; -+ unsigned int parsedPort; -+ AMFObject obj2; -+ AMFObjectProperty p; -+ AVal redirect; -+ SAVC(ex); -+ SAVC(redirect); -+ -+ AMFProp_GetObject(AMF_GetProp(&obj, NULL, 3), &obj2); -+ if (RTMP_FindFirstMatchingProperty(&obj2, &av_ex, &p)) -+ { -+ AMFProp_GetObject(&p, &obj2); -+ if (RTMP_FindFirstMatchingProperty(&obj2, &av_code, &p)) -+ code = AMFProp_GetNumber(&p); -+ if (code == 302 && RTMP_FindFirstMatchingProperty(&obj2, &av_redirect, &p)) -+ { -+ AMFProp_GetString(&p, &redirect); -+ r->Link.redirected = TRUE; -+ -+ char *url = malloc(redirect.av_len + sizeof ("/playpath")); -+ strncpy(url, redirect.av_val, redirect.av_len); -+ url[redirect.av_len] = '\0'; -+ r->Link.tcUrl.av_val = url; -+ r->Link.tcUrl.av_len = redirect.av_len; -+ strcat(url, "/playpath"); -+ RTMP_ParseURL(url, &r->Link.protocol, &r->Link.hostname, &parsedPort, &r->Link.playpath0, &r->Link.app); -+ r->Link.port = parsedPort; -+ } -+ } -+ if (r->Link.redirected) -+ RTMP_Log(RTMP_LOGINFO, "rtmp server sent redirect"); -+ else -+ RTMP_Log(RTMP_LOGERROR, "rtmp server sent error"); - } - else if (AVMATCH(&method, &av_close)) - { -- RTMP_Log(RTMP_LOGERROR, "rtmp server requested close"); -- RTMP_Close(r); -+ if (r->Link.redirected) -+ { -+ RTMP_Log(RTMP_LOGINFO, "trying to connect with redirected url"); -+ RTMP_Close(r); -+ r->Link.redirected = FALSE; -+ RTMP_Connect(r, NULL); -+ } -+ else -+ { -+ RTMP_Log(RTMP_LOGERROR, "rtmp server requested close"); -+ RTMP_Close(r); -+ } - } - else if (AVMATCH(&method, &av_onStatus)) - { - AMFObject obj2; -- AVal code, level; -+ AVal code, level, description; - AMFProp_GetObject(AMF_GetProp(&obj, NULL, 3), &obj2); - AMFProp_GetString(AMF_GetProp(&obj2, &av_code, -1), &code); - AMFProp_GetString(AMF_GetProp(&obj2, &av_level, -1), &level); -+ AMFProp_GetString(AMF_GetProp(&obj2, &av_description, -1), &description); - - RTMP_Log(RTMP_LOGDEBUG, "%s, onStatus: %s", __FUNCTION__, code.av_val); - if (AVMATCH(&code, &av_NetStream_Failed) -@@ -2550,6 +2770,45 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize) - r->m_pausing = 3; - } - } -+ -+ else if (AVMATCH(&code, &av_NetConnection_confStream)) -+ { -+#ifdef CRYPTO -+ static const char hexdig[] = "0123456789abcdef"; -+ SAVC(cf_stream); -+ int i; -+ char hash_hex[33] = {0}; -+ unsigned char hash[16]; -+ AVal auth; -+ param_count = strsplit(description.av_val, description.av_len, ':', ¶ms); -+ if (param_count >= 3) -+ { -+ char *buf = malloc(strlen(params[0]) + r->Link.playpath.av_len + 1); -+ strcpy(buf, params[0]); -+ strncat(buf, r->Link.playpath.av_val, r->Link.playpath.av_len); -+ md5_hash((unsigned char *) buf, strlen(buf), hash); -+ for (i = 0; i < 16; i++) -+ { -+ hash_hex[i * 2] = hexdig[0x0f & (hash[i] >> 4)]; -+ hash_hex[i * 2 + 1] = hexdig[0x0f & (hash[i])]; -+ } -+ auth.av_val = &hash_hex[atoi(params[1]) - 1]; -+ auth.av_len = atoi(params[2]); -+ RTMP_Log(RTMP_LOGDEBUG, "Khalsa: %.*s", auth.av_len, auth.av_val); -+ -+ enc = pbuf; -+ enc = AMF_EncodeString(enc, pend, &av_cf_stream); -+ enc = AMF_EncodeNumber(enc, pend, txn); -+ *enc++ = AMF_NULL; -+ enc = AMF_EncodeString(enc, pend, &auth); -+ av_Command.av_val = pbuf; -+ av_Command.av_len = enc - pbuf; -+ -+ SendInvoke(r, &av_Command, FALSE); -+ free(buf); -+ } -+#endif -+ } - } - else if (AVMATCH(&method, &av_playlist_ready)) - { -@@ -2563,6 +2822,74 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize) - } - } - } -+ else if (AVMATCH(&method, &av_verifyClient)) -+ { -+ double VerificationNumber = AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 3)); -+ RTMP_Log(RTMP_LOGDEBUG, "VerificationNumber: %.2f", VerificationNumber); -+ -+ enc = pbuf; -+ enc = AMF_EncodeString(enc, pend, &av__result); -+ enc = AMF_EncodeNumber(enc, pend, txn); -+ *enc++ = AMF_NULL; -+ enc = AMF_EncodeNumber(enc, pend, exp(atan(sqrt(VerificationNumber))) + 1); -+ av_Response.av_val = pbuf; -+ av_Response.av_len = enc - pbuf; -+ -+ AMF_Decode(&obj, av_Response.av_val, av_Response.av_len, FALSE); -+ AMF_Dump(&obj); -+ SendInvoke(r, &av_Response, FALSE); -+ } -+ else if (AVMATCH(&method, &av_sendStatus)) -+ { -+ if (r->Link.WeebToken.av_len) -+ { -+ AVal av_Authorized = AVC("User.hasAccess"); -+ AVal av_TransferLimit = AVC("User.noPremium.limited"); -+ AVal av_UserLimit = AVC("User.noPremium.tooManyUsers"); -+ AVal av_TimeLeft = AVC("timeLeft"); -+ AVal av_Status, av_ReconnectionTime; -+ -+ AMFObject Status; -+ AMFProp_GetObject(AMF_GetProp(&obj, NULL, 3), &Status); -+ AMFProp_GetString(AMF_GetProp(&Status, &av_code, -1), &av_Status); -+ RTMP_Log(RTMP_LOGINFO, "%.*s", av_Status.av_len, av_Status.av_val); -+ if (AVMATCH(&av_Status, &av_Authorized)) -+ { -+ RTMP_Log(RTMP_LOGINFO, "Weeb.tv authentication successful"); -+ RTMP_SendCreateStream(r); -+ } -+ else if (AVMATCH(&av_Status, &av_UserLimit)) -+ { -+ RTMP_Log(RTMP_LOGINFO, "No free slots available"); -+ RTMP_Close(r); -+ } -+ else if (AVMATCH(&av_Status, &av_TransferLimit)) -+ { -+ AMFProp_GetString(AMF_GetProp(&Status, &av_TimeLeft, -1), &av_ReconnectionTime); -+ RTMP_Log(RTMP_LOGINFO, "Viewing limit exceeded. try again in %.*s minutes.", av_ReconnectionTime.av_len, av_ReconnectionTime.av_val); -+ RTMP_Close(r); -+ } -+ } -+ } -+ else if (AVMATCH(&method, &av_ReceiveCheckPublicStatus)) -+ { -+ AVal Status; -+ AMFProp_GetString(AMF_GetProp(&obj, NULL, 3), &Status); -+ strsplit(Status.av_val, Status.av_len, ',', ¶ms); -+ if (strcmp(params[0], "0") == 0) -+ { -+ RTMP_Log(RTMP_LOGINFO, "Model status is %s", params[1]); -+ RTMP_Close(r); -+ } -+ else -+ { -+ AVal Playpath; -+ Playpath.av_val = params[1]; -+ Playpath.av_len = strlen(params[1]); -+ RTMP_ParsePlaypath(&Playpath, &r->Link.playpath); -+ RTMP_SendCreateStream(r); -+ } -+ } - else - { - -@@ -2748,7 +3075,7 @@ HandleCtrl(RTMP *r, const RTMPPacket *packet) - unsigned int tmp; - if (packet->m_body && packet->m_nBodySize >= 2) - nType = AMF_DecodeInt16(packet->m_body); -- RTMP_Log(RTMP_LOGDEBUG, "%s, received ctrl. type: %d, len: %d", __FUNCTION__, nType, -+ RTMP_Log(RTMP_LOGDEBUG, "%s, received ctrl, type: %d, len: %d", __FUNCTION__, nType, - packet->m_nBodySize); - /*RTMP_LogHex(packet.m_body, packet.m_nBodySize); */ - -@@ -2856,15 +3183,15 @@ HandleCtrl(RTMP *r, const RTMPPacket *packet) - RTMP_Log(RTMP_LOGDEBUG, "%s, SWFVerification ping received: ", __FUNCTION__); - if (packet->m_nBodySize > 2 && packet->m_body[2] > 0x01) - { -- RTMP_Log(RTMP_LOGERROR, -- "%s: SWFVerification Type %d request not supported! Patches welcome...", -- __FUNCTION__, packet->m_body[2]); -+ RTMP_Log(RTMP_LOGERROR, -+ "%s: SWFVerification Type %d request not supported, attempting to use SWFVerification Type 1! Patches welcome...", -+ __FUNCTION__, packet->m_body[2]); - } - #ifdef CRYPTO - /*RTMP_LogHex(packet.m_body, packet.m_nBodySize); */ - - /* respond with HMAC SHA256 of decompressed SWF, key is the 30byte player key, also the last 30 bytes of the server handshake are applied */ -- else if (r->Link.SWFSize) -+ if (r->Link.SWFSize) - { - RTMP_SendCtrl(r, 0x1B, 0, 0); - } -@@ -3142,8 +3469,18 @@ HandShake(RTMP *r, int FP9HandShake) - serversig[4], serversig[5], serversig[6], serversig[7]); - - /* 2nd part of handshake */ -- if (!WriteN(r, serversig, RTMP_SIG_SIZE)) -- return FALSE; -+ if (r->Link.CombineConnectPacket) -+ { -+ char *HandshakeResponse = malloc(RTMP_SIG_SIZE); -+ memcpy(HandshakeResponse, (char *) serversig, RTMP_SIG_SIZE); -+ r->Link.HandshakeResponse.av_val = HandshakeResponse; -+ r->Link.HandshakeResponse.av_len = RTMP_SIG_SIZE; -+ } -+ else -+ { -+ if (!WriteN(r, (char *) serversig, RTMP_SIG_SIZE)) -+ return FALSE; -+ } - - if (ReadN(r, serversig, RTMP_SIG_SIZE) != RTMP_SIG_SIZE) - return FALSE; -@@ -3709,12 +4046,11 @@ HTTP_Post(RTMP *r, RTMPTCmd cmd, const char *buf, int len) - char hbuf[512]; - int hlen = snprintf(hbuf, sizeof(hbuf), "POST /%s%s/%d HTTP/1.1\r\n" - "Host: %.*s:%d\r\n" -- "Accept: */*\r\n" -- "User-Agent: Shockwave Flash\n" -- "Connection: Keep-Alive\n" -+ "User-Agent: Shockwave Flash\r\n" -+ "Connection: Keep-Alive\r\n" - "Cache-Control: no-cache\r\n" -- "Content-type: application/x-fcs\r\n" -- "Content-length: %d\r\n\r\n", RTMPT_cmds[cmd], -+ "Content-Type: application/x-fcs\r\n" -+ "Content-Length: %d\r\n\r\n", RTMPT_cmds[cmd], - r->m_clientID.av_val ? r->m_clientID.av_val : "", - r->m_msgCounter, r->Link.hostname.av_len, r->Link.hostname.av_val, - r->Link.port, len); -@@ -3749,6 +4085,14 @@ HTTP_read(RTMP *r, int fill) - if (!ptr) - return -1; - ptr += 4; -+ int resplen = r->m_sb.sb_size - (ptr - r->m_sb.sb_start); -+ if (hlen < 4096) -+ while (resplen < hlen) -+ { -+ if (RTMPSockBuf_Fill(&r->m_sb) == -1) -+ return -1; -+ resplen = r->m_sb.sb_size - (ptr - r->m_sb.sb_start); -+ } - r->m_sb.sb_size -= ptr - r->m_sb.sb_start; - r->m_sb.sb_start = ptr; - r->m_unackd--; -@@ -4301,13 +4645,21 @@ fail: - r->m_read.status = nRead; - goto fail; - } -- /* buffer overflow, fix buffer and give up */ -- if (r->m_read.buf < mybuf || r->m_read.buf > end) { -- mybuf = realloc(mybuf, cnt + nRead); -- memcpy(mybuf+cnt, r->m_read.buf, nRead); -- r->m_read.buf = mybuf+cnt+nRead; -- break; -- } -+ /* buffer overflow, fix buffer and give up */ -+ if (r->m_read.buf < mybuf || r->m_read.buf > end) -+ { -+ if (!cnt) -+ { -+ mybuf = realloc(mybuf, sizeof (flvHeader) + cnt + nRead); -+ memcpy(mybuf, flvHeader, sizeof (flvHeader)); -+ cnt += sizeof (flvHeader); -+ } -+ else -+ mybuf = realloc(mybuf, cnt + nRead); -+ memcpy(mybuf + cnt, r->m_read.buf, nRead); -+ r->m_read.buf = mybuf + cnt + nRead; -+ break; -+ } - cnt += nRead; - r->m_read.buf += nRead; - r->m_read.buflen -= nRead; -@@ -4458,3 +4810,90 @@ RTMP_Write(RTMP *r, const char *buf, int size) - } - return size+s2; - } -+ -+static int -+SendInvoke(RTMP *r, AVal *Command, int queue) -+{ -+ RTMPPacket packet; -+ char pbuf[512], *enc; -+ -+ packet.m_nChannel = 0x03; /* control channel (invoke) */ -+ packet.m_headerType = RTMP_PACKET_SIZE_MEDIUM; -+ packet.m_packetType = RTMP_PACKET_TYPE_INVOKE; -+ packet.m_nTimeStamp = 0; -+ packet.m_nInfoField2 = 0; -+ packet.m_hasAbsTimestamp = 0; -+ packet.m_body = pbuf + RTMP_MAX_HEADER_SIZE; -+ -+ enc = packet.m_body; -+ if (Command->av_len) -+ { -+ memcpy(enc, Command->av_val, Command->av_len); -+ enc += Command->av_len; -+ } -+ else -+ return FALSE; -+ packet.m_nBodySize = enc - packet.m_body; -+ -+ return RTMP_SendPacket(r, &packet, queue); -+} -+ -+static int -+strsplit(char *src, int srclen, char delim, char ***params) -+{ -+ char *sptr, *srcbeg, *srcend, *dstr; -+ int count = 1, i = 0, len = 0; -+ -+ if (src == NULL) -+ return 0; -+ if (!srclen) -+ srclen = strlen(src); -+ srcbeg = src; -+ srcend = srcbeg + srclen; -+ sptr = srcbeg; -+ -+ /* count the delimiters */ -+ while (sptr < srcend) -+ { -+ if (*sptr++ == delim) -+ count++; -+ } -+ sptr = srcbeg; -+ *params = calloc(count, sizeof (size_t)); -+ char **param = *params; -+ -+ for (i = 0; i < (count - 1); i++) -+ { -+ dstr = strchr(sptr, delim); -+ len = dstr - sptr; -+ param[i] = calloc(len + 1, sizeof (char)); -+ strncpy(param[i], sptr, len); -+ sptr += len + 1; -+ } -+ -+ /* copy the last string */ -+ if (sptr <= srcend) -+ { -+ len = srclen - (sptr - srcbeg); -+ param[i] = calloc(len + 1, sizeof (char)); -+ strncpy(param[i], sptr, len); -+ } -+ return count; -+} -+ -+static int -+SendGetStreamLength(RTMP *r) -+{ -+ char pbuf[256], *pend = pbuf + sizeof (pbuf), *enc; -+ AVal av_Command; -+ -+ enc = pbuf; -+ enc = AMF_EncodeString(enc, pend, &av_getStreamLength); -+ enc = AMF_EncodeNumber(enc, pend, ++r->m_numInvokes); -+ *enc++ = AMF_NULL; -+ enc = AMF_EncodeString(enc, pend, &r->Link.playpath); -+ av_Command.av_val = pbuf; -+ av_Command.av_len = enc - pbuf; -+ -+ return SendInvoke(r, &av_Command, TRUE); -+} -diff --git a/librtmp/rtmp.h b/librtmp/rtmp.h -index 6b2ae5b..411b488 100644 ---- a/librtmp/rtmp.h -+++ b/librtmp/rtmp.h -@@ -150,12 +150,14 @@ extern "C" - AVal playpath; /* passed in explicitly */ - AVal tcUrl; - AVal swfUrl; -+ AVal swfHash; - AVal pageUrl; - AVal app; - AVal auth; - AVal flashVer; - AVal subscribepath; - AVal usherToken; -+ AVal WeebToken; - AVal token; - AMFObject extras; - int edepth; -@@ -172,9 +174,15 @@ extern "C" - int lFlags; - - int swfAge; -+ int swfSize; - - int protocol; -+ int ConnectPacket; -+ int CombineConnectPacket; -+ int redirected; - int timeout; /* connection timeout in seconds */ -+ AVal Extras; -+ AVal HandshakeResponse; - - unsigned short socksport; - unsigned short port; -@@ -299,6 +307,7 @@ extern "C" - AVal *flashVer, - AVal *subscribepath, - AVal *usherToken, -+ AVal *WeebToken, - int dStart, - int dStop, int bLiveStream, long int timeout); - -diff --git a/librtmp/rtmp_sys.h b/librtmp/rtmp_sys.h -index c3fd4a6..1bfb562 100644 ---- a/librtmp/rtmp_sys.h -+++ b/librtmp/rtmp_sys.h -@@ -64,6 +64,7 @@ - #include - #include - #include -+#include - typedef struct tls_ctx { - havege_state hs; - ssl_session ssn; -@@ -71,7 +72,7 @@ typedef struct tls_ctx { - #define TLS_CTX tls_ctx * - #define TLS_client(ctx,s) s = malloc(sizeof(ssl_context)); ssl_init(s);\ - ssl_set_endpoint(s, SSL_IS_CLIENT); ssl_set_authmode(s, SSL_VERIFY_NONE);\ -- ssl_set_rng(s, havege_rand, &ctx->hs);\ -+ ssl_set_rng(s, havege_random, &ctx->hs);\ - ssl_set_ciphersuites(s, ssl_default_ciphersuites);\ - ssl_set_session(s, 1, 600, &ctx->ssn) - #define TLS_setfd(s,fd) ssl_set_bio(s, net_recv, &fd, net_send, &fd) -@@ -80,6 +81,7 @@ typedef struct tls_ctx { - #define TLS_write(s,b,l) ssl_write(s,(unsigned char *)b,l) - #define TLS_shutdown(s) ssl_close_notify(s) - #define TLS_close(s) ssl_free(s); free(s) -+#define md5_hash(i, ilen, o) md5(i, ilen, o) - - #elif defined(USE_GNUTLS) - #include -@@ -95,6 +97,8 @@ typedef struct tls_ctx { - #define TLS_write(s,b,l) gnutls_record_send(s,b,l) - #define TLS_shutdown(s) gnutls_bye(s, GNUTLS_SHUT_RDWR) - #define TLS_close(s) gnutls_deinit(s) -+#define md5_hash(i, ilen, o) gnutls_digest_algorithm_t algorithm = GNUTLS_DIG_MD5;\ -+ gnutls_hash_fast(algorithm, i, ilen, o); - - #else /* USE_OPENSSL */ - #define TLS_CTX SSL_CTX * -@@ -105,6 +109,7 @@ typedef struct tls_ctx { - #define TLS_write(s,b,l) SSL_write(s,b,l) - #define TLS_shutdown(s) SSL_shutdown(s) - #define TLS_close(s) SSL_free(s) -+#define md5_hash(i, ilen, o) MD5(i, ilen, o) - - #endif - #endif -diff --git a/rtmpdump.c b/rtmpdump.c -index e52f7d4..7bb0890 100644 ---- a/rtmpdump.c -+++ b/rtmpdump.c -@@ -701,6 +701,8 @@ void usage(char *prog) - RTMP_LogPrintf - ("--jtv|-j JSON Authentication token for Justin.tv legacy servers\n"); - RTMP_LogPrintf -+ ("--weeb|-J string Authentication token for weeb.tv servers\n"); -+ RTMP_LogPrintf - ("--hashes|-# Display progress with hashes, not with the byte counter\n"); - RTMP_LogPrintf - ("--buffer|-b Buffer time in milliseconds (default: %u)\n", -@@ -747,7 +749,8 @@ main(int argc, char **argv) - AVal hostname = { 0, 0 }; - AVal playpath = { 0, 0 }; - AVal subscribepath = { 0, 0 }; -- AVal usherToken = { 0, 0 }; //Justin.tv auth token -+ AVal usherToken = { 0, 0 }; // Justin.tv auth token -+ AVal WeebToken = { 0, 0 }; // Weeb.tv auth token - int port = -1; - int protocol = RTMP_PROTOCOL_UNDEFINED; - int retries = 0; -@@ -852,12 +855,13 @@ main(int argc, char **argv) - {"quiet", 0, NULL, 'q'}, - {"verbose", 0, NULL, 'V'}, - {"jtv", 1, NULL, 'j'}, -+ {"weeb", 1, NULL, 'J'}, - {0, 0, 0, 0} - }; - - while ((opt = - getopt_long(argc, argv, -- "hVveqzRr:s:t:p:a:b:f:o:u:C:n:c:l:y:Ym:k:d:A:B:T:w:x:W:X:S:#j:", -+ "hVveqzr:s:t:p:a:b:f:o:u:C:n:c:l:y:Ym:k:d:A:B:T:w:x:W:X:S:#j:J:", - longopts, NULL)) != -1) - { - switch (opt) -@@ -1070,6 +1074,9 @@ main(int argc, char **argv) - case 'j': - STR2AVAL(usherToken, optarg); - break; -+ case 'J': -+ STR2AVAL(WeebToken, optarg); -+ break; - default: - RTMP_LogPrintf("unknown option: %c\n", opt); - usage(argv[0]); -@@ -1161,14 +1168,14 @@ main(int argc, char **argv) - - if (tcUrl.av_len == 0) - { -- tcUrl.av_len = strlen(RTMPProtocolStringsLower[protocol]) + -- hostname.av_len + app.av_len + sizeof("://:65535/"); -+ tcUrl.av_len = strlen(RTMPProtocolStringsLower[protocol]) + -+ hostname.av_len + app.av_len + sizeof ("://:65535/"); - tcUrl.av_val = (char *) malloc(tcUrl.av_len); -- if (!tcUrl.av_val) -- return RD_FAILED; -+ if (!tcUrl.av_val) -+ return RD_FAILED; - tcUrl.av_len = snprintf(tcUrl.av_val, tcUrl.av_len, "%s://%.*s:%d/%.*s", -- RTMPProtocolStringsLower[protocol], hostname.av_len, -- hostname.av_val, port, app.av_len, app.av_val); -+ RTMPProtocolStringsLower[protocol], hostname.av_len, -+ hostname.av_val, port, app.av_len, app.av_val); - } - - int first = 1; -@@ -1187,7 +1194,7 @@ main(int argc, char **argv) - - RTMP_SetupStream(&rtmp, protocol, &hostname, port, &sockshost, &playpath, - &tcUrl, &swfUrl, &pageUrl, &app, &auth, &swfHash, swfSize, -- &flashVer, &subscribepath, &usherToken, dSeek, dStopOffset, bLiveStream, timeout); -+ &flashVer, &subscribepath, &usherToken, &WeebToken, dSeek, dStopOffset, bLiveStream, timeout); - - /* Try to keep the stream moving if it pauses on us */ - if (!bLiveStream && !bRealtimeStream && !(protocol & RTMP_FEATURE_HTTP)) -diff --git a/rtmpgw.c b/rtmpgw.c -index 0cf56bb..cd4396d 100644 ---- a/rtmpgw.c -+++ b/rtmpgw.c -@@ -95,7 +95,8 @@ typedef struct - AVal flashVer; - AVal token; - AVal subscribepath; -- AVal usherToken; //Justin.tv auth token -+ AVal usherToken; // Justin.tv auth token -+ AVal WeebToken; // Weeb.tv auth token - AVal sockshost; - AMFObject extras; - int edepth; -@@ -553,7 +554,7 @@ void processTCPrequest(STREAMING_SERVER * server, // server socket and state (ou - RTMP_Init(&rtmp); - RTMP_SetBufferMS(&rtmp, req.bufferTime); - RTMP_SetupStream(&rtmp, req.protocol, &req.hostname, req.rtmpport, &req.sockshost, -- &req.playpath, &req.tcUrl, &req.swfUrl, &req.pageUrl, &req.app, &req.auth, &req.swfHash, req.swfSize, &req.flashVer, &req.subscribepath, &req.usherToken, dSeek, req.dStopOffset, -+ &req.playpath, &req.tcUrl, &req.swfUrl, &req.pageUrl, &req.app, &req.auth, &req.swfHash, req.swfSize, &req.flashVer, &req.subscribepath, &req.usherToken, &req.WeebToken, dSeek, req.dStopOffset, - req.bLiveStream, req.timeout); - /* backward compatibility, we always sent this as true before */ - if (req.auth.av_len) -@@ -957,6 +958,9 @@ ParseOption(char opt, char *arg, RTMP_REQUEST * req) - case 'j': - STR2AVAL(req->usherToken, arg); - break; -+ case 'J': -+ STR2AVAL(req->WeebToken, arg); -+ break; - default: - RTMP_LogPrintf("unknown option: %c, arg: %s\n", opt, arg); - return FALSE; -@@ -1028,6 +1032,7 @@ main(int argc, char **argv) - {"quiet", 0, NULL, 'q'}, - {"verbose", 0, NULL, 'V'}, - {"jtv", 1, NULL, 'j'}, -+ {"weeb", 1, NULL, 'J'}, - {0, 0, 0, 0} - }; - -@@ -1040,7 +1045,7 @@ main(int argc, char **argv) - - while ((opt = - getopt_long(argc, argv, -- "hvqVzr:s:t:p:a:f:u:n:c:l:y:m:d:D:A:B:T:g:w:x:W:X:S:j:", longopts, -+ "hvqVzr:s:t:p:a:f:u:n:c:l:y:m:d:D:A:B:T:g:w:x:W:X:S:j:J:", longopts, - NULL)) != -1) - { - switch (opt) -@@ -1103,6 +1108,8 @@ main(int argc, char **argv) - RTMP_LogPrintf - ("--jtv|-j JSON Authentication token for Justin.tv legacy servers\n"); - RTMP_LogPrintf -+ ("--weeb|-J string Authentication token for weeb.tv servers\n"); -+ RTMP_LogPrintf - ("--buffer|-b Buffer time in milliseconds (default: %u)\n\n", - defaultRTMPRequest.bufferTime); - -diff --git a/rtmpsrv.c b/rtmpsrv.c -index 9aa62f3..9ec8f23 100644 ---- a/rtmpsrv.c -+++ b/rtmpsrv.c -@@ -96,9 +96,20 @@ STREAMING_SERVER *rtmpServer = 0; // server structure pointer - STREAMING_SERVER *startStreaming(const char *address, int port); - void stopStreaming(STREAMING_SERVER * server); - void AVreplace(AVal *src, const AVal *orig, const AVal *repl); -+char *strreplace(char *srcstr, int srclen, char *orig, char *repl); -+int file_exists(const char *fname); -+int SendCheckBWResponse(RTMP *r, int oldMethodType, int onBWDoneInit); -+AVal AVcopy(AVal src); -+AVal StripParams(AVal *src); - - static const AVal av_dquote = AVC("\""); - static const AVal av_escdquote = AVC("\\\""); -+#ifdef WIN32 -+static const AVal av_caret = AVC("^"); -+static const AVal av_esccaret = AVC("^^"); -+static const AVal av_pipe = AVC("|"); -+static const AVal av_escpipe = AVC("^|"); -+#endif - - typedef struct - { -@@ -167,6 +178,10 @@ SAVC(level); - SAVC(code); - SAVC(description); - SAVC(secureToken); -+SAVC(_checkbw); -+SAVC(_onbwdone); -+SAVC(checkBandwidth); -+SAVC(onBWDone); - - static int - SendConnectResult(RTMP *r, double txn) -@@ -190,7 +205,7 @@ SendConnectResult(RTMP *r, double txn) - enc = AMF_EncodeNumber(enc, pend, txn); - *enc++ = AMF_OBJECT; - -- STR2AVAL(av, "FMS/3,5,1,525"); -+ STR2AVAL(av, "FMS/3,5,7,7009"); - enc = AMF_EncodeNamedString(enc, pend, &av_fmsVer, &av); - enc = AMF_EncodeNamedNumber(enc, pend, &av_capabilities, 31.0); - enc = AMF_EncodeNamedNumber(enc, pend, &av_mode, 1.0); -@@ -212,7 +227,7 @@ SendConnectResult(RTMP *r, double txn) - enc = AMF_EncodeNamedString(enc, pend, &av_secureToken, &av); - #endif - STR2AVAL(p.p_name, "version"); -- STR2AVAL(p.p_vu.p_aval, "3,5,1,525"); -+ STR2AVAL(p.p_vu.p_aval, "3,5,7,7009"); - p.p_type = AMF_STRING; - obj.o_num = 1; - obj.o_props = &p; -@@ -268,7 +283,7 @@ static int - SendPlayStart(RTMP *r) - { - RTMPPacket packet; -- char pbuf[512], *pend = pbuf+sizeof(pbuf); -+ char pbuf[1024], *pend = pbuf + sizeof (pbuf); - - packet.m_nChannel = 0x03; // control channel (invoke) - packet.m_headerType = 1; /* RTMP_PACKET_SIZE_MEDIUM; */ -@@ -300,7 +315,7 @@ static int - SendPlayStop(RTMP *r) - { - RTMPPacket packet; -- char pbuf[512], *pend = pbuf+sizeof(pbuf); -+ char pbuf[1024], *pend = pbuf + sizeof (pbuf); - - packet.m_nChannel = 0x03; // control channel (invoke) - packet.m_headerType = 1; /* RTMP_PACKET_SIZE_MEDIUM; */ -@@ -328,6 +343,49 @@ SendPlayStop(RTMP *r) - return RTMP_SendPacket(r, &packet, FALSE); - } - -+int -+SendCheckBWResponse(RTMP *r, int oldMethodType, int onBWDoneInit) -+{ -+ RTMPPacket packet; -+ char pbuf[256], *pend = pbuf + sizeof (pbuf); -+ char *enc; -+ -+ packet.m_nChannel = 0x03; /* control channel (invoke) */ -+ packet.m_headerType = RTMP_PACKET_SIZE_MEDIUM; -+ packet.m_packetType = RTMP_PACKET_TYPE_INVOKE; -+ packet.m_nTimeStamp = 0; -+ packet.m_nInfoField2 = 0; -+ packet.m_hasAbsTimestamp = 0; -+ packet.m_body = pbuf + RTMP_MAX_HEADER_SIZE; -+ -+ enc = packet.m_body; -+ if (oldMethodType) -+ { -+ enc = AMF_EncodeString(enc, pend, &av__onbwdone); -+ enc = AMF_EncodeNumber(enc, pend, 0); -+ *enc++ = AMF_NULL; -+ enc = AMF_EncodeNumber(enc, pend, 10240); -+ enc = AMF_EncodeNumber(enc, pend, 10240); -+ } -+ else -+ { -+ enc = AMF_EncodeString(enc, pend, &av_onBWDone); -+ enc = AMF_EncodeNumber(enc, pend, 0); -+ *enc++ = AMF_NULL; -+ if (!onBWDoneInit) -+ { -+ enc = AMF_EncodeNumber(enc, pend, 10240); -+ enc = AMF_EncodeNumber(enc, pend, 10240); -+ enc = AMF_EncodeNumber(enc, pend, 0); -+ enc = AMF_EncodeNumber(enc, pend, 0); -+ } -+ } -+ -+ packet.m_nBodySize = enc - packet.m_body; -+ -+ return RTMP_SendPacket(r, &packet, FALSE); -+} -+ - static void - spawn_dumper(int argc, AVal *av, char *cmd) - { -@@ -568,6 +626,7 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int - server->arglen += countAMF(&r->Link.extras, &server->argc); - } - SendConnectResult(r, txn); -+ SendCheckBWResponse(r, FALSE, TRUE); - } - else if (AVMATCH(&method, &av_createStream)) - { -@@ -582,10 +641,22 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int - AVal usherToken; - AMFProp_GetString(AMF_GetProp(&obj, NULL, 3), &usherToken); - AVreplace(&usherToken, &av_dquote, &av_escdquote); -+#ifdef WIN32 -+ AVreplace(&usherToken, &av_caret, &av_esccaret); -+ AVreplace(&usherToken, &av_pipe, &av_escpipe); -+#endif - server->arglen += 6 + usherToken.av_len; - server->argc += 2; - r->Link.usherToken = usherToken; - } -+ else if (AVMATCH(&method, &av__checkbw)) -+ { -+ SendCheckBWResponse(r, TRUE, FALSE); -+ } -+ else if (AVMATCH(&method, &av_checkBandwidth)) -+ { -+ SendCheckBWResponse(r, FALSE, FALSE); -+ } - else if (AVMATCH(&method, &av_play)) - { - char *file, *p, *q, *cmd, *ptr; -@@ -599,6 +670,17 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int - if (obj.o_num > 5) - r->Link.length = AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 5)); - */ -+ double StartFlag = 0; -+ AMFObjectProperty *Start = AMF_GetProp(&obj, NULL, 4); -+ if (!(Start->p_type == AMF_INVALID)) -+ StartFlag = AMFProp_GetNumber(Start); -+ r->Link.app = AVcopy(r->Link.app); -+ if (StartFlag == -1000 || strstr(r->Link.app.av_val, "live")) -+ { -+ StartFlag = -1000; -+ server->arglen += 7; -+ server->argc += 1; -+ } - if (r->Link.tcUrl.av_len) - { - len = server->arglen + r->Link.playpath.av_len + 4 + -@@ -616,6 +698,7 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int - argv[argc].av_val = ptr + 1; - argv[argc++].av_len = 2; - argv[argc].av_val = ptr + 5; -+ r->Link.tcUrl = StripParams(&r->Link.tcUrl); - ptr += sprintf(ptr," -r \"%s\"", r->Link.tcUrl.av_val); - argv[argc++].av_len = r->Link.tcUrl.av_len; - -@@ -640,6 +723,7 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int - argv[argc].av_val = ptr + 1; - argv[argc++].av_len = 2; - argv[argc].av_val = ptr + 5; -+ r->Link.swfUrl = StripParams(&r->Link.swfUrl); - ptr += sprintf(ptr, " -W \"%s\"", r->Link.swfUrl.av_val); - argv[argc++].av_len = r->Link.swfUrl.av_len; - } -@@ -662,10 +746,17 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int - r->Link.usherToken.av_val = NULL; - r->Link.usherToken.av_len = 0; - } -- if (r->Link.extras.o_num) { -- ptr = dumpAMF(&r->Link.extras, ptr, argv, &argc); -- AMF_Reset(&r->Link.extras); -- } -+ if (StartFlag == -1000) -+ { -+ argv[argc].av_val = ptr + 1; -+ argv[argc++].av_len = 6; -+ ptr += sprintf(ptr, " --live"); -+ } -+ if (r->Link.extras.o_num) -+ { -+ ptr = dumpAMF(&r->Link.extras, ptr, argv, &argc); -+ AMF_Reset(&r->Link.extras); -+ } - argv[argc].av_val = ptr + 1; - argv[argc++].av_len = 2; - argv[argc].av_val = ptr + 5; -@@ -673,7 +764,13 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int - r->Link.playpath.av_len, r->Link.playpath.av_val); - argv[argc++].av_len = r->Link.playpath.av_len; - -- av = r->Link.playpath; -+ if (r->Link.playpath.av_len) -+ av = r->Link.playpath; -+ else -+ { -+ av.av_val = "file"; -+ av.av_len = 4; -+ } - /* strip trailing URL parameters */ - q = memchr(av.av_val, '?', av.av_len); - if (q) -@@ -725,7 +822,30 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int - argv[argc++].av_len = 2; - argv[argc].av_val = file; - argv[argc].av_len = av.av_len; -- ptr += sprintf(ptr, " -o %s", file); -+#ifdef VLC -+ char *vlc; -+ int didAlloc = FALSE; -+ -+ if (getenv("VLC")) -+ vlc = getenv("VLC"); -+ else if (getenv("ProgramFiles")) -+ { -+ vlc = malloc(512 * sizeof (char)); -+ didAlloc = TRUE; -+ char *ProgramFiles = getenv("ProgramFiles"); -+ sprintf(vlc, "%s%s", ProgramFiles, " (x86)\\VideoLAN\\VLC\\vlc.exe"); -+ if (!file_exists(vlc)) -+ sprintf(vlc, "%s%s", ProgramFiles, "\\VideoLAN\\VLC\\vlc.exe"); -+ } -+ else -+ vlc = "C:\\Program Files\\VideoLAN\\VLC\\vlc.exe"; -+ -+ ptr += sprintf(ptr, " | %s -", vlc); -+ if (didAlloc) -+ free(vlc); -+#else -+ ptr += sprintf(ptr, " -o %s", file); -+#endif - now = RTMP_GetTime(); - if (now - server->filetime < DUPTIME && AVMATCH(&argv[argc], &server->filename)) - { -@@ -739,7 +859,23 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int - server->filetime = now; - free(server->filename.av_val); - server->filename = argv[argc++]; -- spawn_dumper(argc, argv, cmd); -+#ifdef VLC -+ FILE *vlc_cmdfile = fopen("VLC.bat", "w"); -+ char *vlc_batchcmd = strreplace(cmd, 0, "%", "%%"); -+ fprintf(vlc_cmdfile, "%s\n", vlc_batchcmd); -+ fclose(vlc_cmdfile); -+ free(vlc_batchcmd); -+ spawn_dumper(argc, argv, "VLC.bat"); -+#else -+ spawn_dumper(argc, argv, cmd); -+#endif -+ -+#ifdef WIN32 -+ // Dump command to batch file -+ FILE *cmdfile = fopen("Command.bat", "a"); -+ fprintf(cmdfile, "%s\n", cmd); -+ fclose(cmdfile); -+#endif - } - - free(cmd); -@@ -1178,3 +1314,115 @@ AVreplace(AVal *src, const AVal *orig, const AVal *repl) - src->av_val = dest; - src->av_len = dptr - dest; - } -+ -+char * -+strreplace(char *srcstr, int srclen, char *orig, char *repl) -+{ -+ char *ptr = NULL, *sptr = srcstr; -+ int origlen = strlen(orig); -+ int repllen = strlen(repl); -+ if (!srclen) -+ srclen = strlen(srcstr); -+ char *srcend = srcstr + srclen; -+ int dstbuffer = srclen / origlen * repllen; -+ if (dstbuffer < srclen) -+ dstbuffer = srclen; -+ char *dststr = calloc(dstbuffer + 1, sizeof (char)); -+ char *dptr = dststr; -+ -+ if ((ptr = strstr(srcstr, orig))) -+ { -+ while (ptr < srcend && (ptr = strstr(sptr, orig))) -+ { -+ int len = ptr - sptr; -+ memcpy(dptr, sptr, len); -+ sptr += len + origlen; -+ dptr += len; -+ memcpy(dptr, repl, repllen); -+ dptr += repllen; -+ } -+ memcpy(dptr, sptr, srcend - sptr); -+ return dststr; -+ } -+ -+ memcpy(dststr, srcstr, srclen); -+ return dststr; -+} -+ -+AVal -+StripParams(AVal *src) -+{ -+ AVal str; -+ if (src->av_val) -+ { -+ str.av_val = calloc(src->av_len + 1, sizeof (char)); -+ strncpy(str.av_val, src->av_val, src->av_len); -+ str.av_len = src->av_len; -+ char *start = str.av_val; -+ char *end = start + str.av_len; -+ char *ptr = start; -+ -+ while (ptr < end) -+ { -+ if (*ptr == '?') -+ { -+ str.av_len = ptr - start; -+ break; -+ } -+ ptr++; -+ } -+ memset(start + str.av_len, 0, 1); -+ -+ char *dynamic = strstr(start, "[[DYNAMIC]]"); -+ if (dynamic) -+ { -+ dynamic -= 1; -+ memset(dynamic, 0, 1); -+ str.av_len = dynamic - start; -+ end = start + str.av_len; -+ } -+ -+ char *import = strstr(start, "[[IMPORT]]"); -+ if (import) -+ { -+ str.av_val = import + 11; -+ strcpy(start, "http://"); -+ str.av_val = strcat(start, str.av_val); -+ str.av_len = strlen(str.av_val); -+ } -+ return str; -+ } -+ str = *src; -+ return str; -+} -+ -+int -+file_exists(const char *fname) -+{ -+ FILE *file; -+ if ((file = fopen(fname, "r"))) -+ { -+ fclose(file); -+ return TRUE; -+ } -+ return FALSE; -+} -+ -+AVal -+AVcopy(AVal src) -+{ -+ AVal dst; -+ if (src.av_len) -+ { -+ dst.av_val = malloc(src.av_len + 1); -+ memcpy(dst.av_val, src.av_val, src.av_len); -+ dst.av_val[src.av_len] = '\0'; -+ dst.av_len = src.av_len; -+ } -+ else -+ { -+ dst.av_val = NULL; -+ dst.av_len = 0; -+ } -+ return dst; -+} -diff --git a/rtmpsuck.c b/rtmpsuck.c -index e886179..e80c686 100644 ---- a/rtmpsuck.c -+++ b/rtmpsuck.c -@@ -143,15 +143,18 @@ SAVC(onStatus); - SAVC(close); - static const AVal av_NetStream_Failed = AVC("NetStream.Failed"); - static const AVal av_NetStream_Play_Failed = AVC("NetStream.Play.Failed"); --static const AVal av_NetStream_Play_StreamNotFound = --AVC("NetStream.Play.StreamNotFound"); --static const AVal av_NetConnection_Connect_InvalidApp = --AVC("NetConnection.Connect.InvalidApp"); -+static const AVal av_NetStream_Play_StreamNotFound = AVC("NetStream.Play.StreamNotFound"); -+static const AVal av_NetConnection_Connect_InvalidApp = AVC("NetConnection.Connect.InvalidApp"); - static const AVal av_NetStream_Play_Start = AVC("NetStream.Play.Start"); - static const AVal av_NetStream_Play_Complete = AVC("NetStream.Play.Complete"); - static const AVal av_NetStream_Play_Stop = AVC("NetStream.Play.Stop"); -+static const AVal av_NetStream_Authenticate_UsherToken = AVC("NetStream.Authenticate.UsherToken"); - - static const char *cst[] = { "client", "server" }; -+char *dumpAMF(AMFObject *obj, char *ptr); -+char *strreplace(char *srcstr, int srclen, char *orig, char *repl); -+AVal AVcopy(AVal src); -+AVal StripParams(AVal *src); - - // Returns 0 for OK/Failed/error, 1 for 'Stop or Complete' - int -@@ -198,26 +201,28 @@ ServeInvoke(STREAMING_SERVER *server, int which, RTMPPacket *pack, const char *b - if (cobj.o_props[i].p_type == AMF_STRING) - { - pval = cobj.o_props[i].p_vu.p_aval; -- RTMP_LogPrintf("%.*s: %.*s\n", pname.av_len, pname.av_val, pval.av_len, pval.av_val); -+ RTMP_LogPrintf("%10.*s : %.*s\n", pname.av_len, pname.av_val, pval.av_len, pval.av_val); - } - if (AVMATCH(&pname, &av_app)) - { -- server->rc.Link.app = pval; -+ server->rc.Link.app = AVcopy(pval); - pval.av_val = NULL; - } - else if (AVMATCH(&pname, &av_flashVer)) - { -- server->rc.Link.flashVer = pval; -+ server->rc.Link.flashVer = AVcopy(pval); - pval.av_val = NULL; - } - else if (AVMATCH(&pname, &av_swfUrl)) - { - #ifdef CRYPTO - if (pval.av_val) -- RTMP_HashSWF(pval.av_val, &server->rc.Link.SWFSize, -- (unsigned char *)server->rc.Link.SWFHash, 30); -+ { -+ AVal swfUrl = StripParams(&pval); -+ RTMP_HashSWF(swfUrl.av_val, &server->rc.Link.SWFSize, (unsigned char *) server->rc.Link.SWFHash, 30); -+ } - #endif -- server->rc.Link.swfUrl = pval; -+ server->rc.Link.swfUrl = AVcopy(pval); - pval.av_val = NULL; - } - else if (AVMATCH(&pname, &av_tcUrl)) -@@ -225,7 +230,7 @@ ServeInvoke(STREAMING_SERVER *server, int which, RTMPPacket *pack, const char *b - char *r1 = NULL, *r2; - int len; - -- server->rc.Link.tcUrl = pval; -+ server->rc.Link.tcUrl = AVcopy(pval); - if ((pval.av_val[0] | 0x40) == 'r' && - (pval.av_val[1] | 0x40) == 't' && - (pval.av_val[2] | 0x40) == 'm' && -@@ -267,7 +272,7 @@ ServeInvoke(STREAMING_SERVER *server, int which, RTMPPacket *pack, const char *b - } - else if (AVMATCH(&pname, &av_pageUrl)) - { -- server->rc.Link.pageUrl = pval; -+ server->rc.Link.pageUrl = AVcopy(pval); - pval.av_val = NULL; - } - else if (AVMATCH(&pname, &av_audioCodecs)) -@@ -287,14 +292,21 @@ ServeInvoke(STREAMING_SERVER *server, int which, RTMPPacket *pack, const char *b - if (pval.av_val) - free(pval.av_val); - } -+ - if (obj.o_num > 3) - { -- if (AMFProp_GetBoolean(&obj.o_props[3])) -- server->rc.Link.lFlags |= RTMP_LF_AUTH; -- if (obj.o_num > 4) -- { -- AMFProp_GetString(&obj.o_props[4], &server->rc.Link.auth); -- } -+ int i = obj.o_num - 3; -+ server->rc.Link.extras.o_num = i; -+ server->rc.Link.extras.o_props = malloc(i * sizeof (AMFObjectProperty)); -+ memcpy(server->rc.Link.extras.o_props, obj.o_props + 3, i * sizeof (AMFObjectProperty)); -+ obj.o_num = 3; -+ } -+ -+ if (server->rc.Link.extras.o_num) -+ { -+ server->rc.Link.Extras.av_val = calloc(1024, sizeof (char)); -+ dumpAMF(&server->rc.Link.extras, server->rc.Link.Extras.av_val); -+ server->rc.Link.Extras.av_len = strlen(server->rc.Link.Extras.av_val); - } - - if (!RTMP_Connect(&server->rc, pack)) -@@ -303,6 +315,16 @@ ServeInvoke(STREAMING_SERVER *server, int which, RTMPPacket *pack, const char *b - return 1; - } - server->rc.m_bSendCounter = FALSE; -+ -+ if (server->rc.Link.extras.o_props) -+ { -+ AMF_Reset(&server->rc.Link.extras); -+ } -+ } -+ else if (AVMATCH(&method, &av_NetStream_Authenticate_UsherToken)) -+ { -+ AMFProp_GetString(AMF_GetProp(&obj, NULL, 3), &server->rc.Link.usherToken); -+ RTMP_LogPrintf("%10s : %.*s\n", "usherToken", server->rc.Link.usherToken.av_len, server->rc.Link.usherToken.av_val); - } - else if (AVMATCH(&method, &av_play)) - { -@@ -323,6 +345,14 @@ ServeInvoke(STREAMING_SERVER *server, int which, RTMPPacket *pack, const char *b - if (!av.av_val) - goto out; - -+ double StartFlag = 0; -+ AMFObjectProperty *Start = AMF_GetProp(&obj, NULL, 4); -+ if (!(Start->p_type == AMF_INVALID)) -+ StartFlag = AMFProp_GetNumber(Start); -+ if (StartFlag == -1000 || strstr(server->rc.Link.app.av_val, "live")) -+ StartFlag = -1000; -+ RTMP_LogPrintf("%10s : %s\n", "live", (StartFlag == -1000) ? "yes" : "no"); -+ - /* check for duplicates */ - for (fl = server->f_head; fl; fl=fl->f_next) - { -@@ -372,9 +402,51 @@ ServeInvoke(STREAMING_SERVER *server, int which, RTMPPacket *pack, const char *b - for (p=file; *p; p++) - if (*p == ':') - *p = '_'; -- RTMP_LogPrintf("Playpath: %.*s\nSaving as: %s\n", -- server->rc.Link.playpath.av_len, server->rc.Link.playpath.av_val, -- file); -+ RTMP_LogPrintf("%10s : %.*s\n%10s : %s\n", "Playpath", server->rc.Link.playpath.av_len, -+ server->rc.Link.playpath.av_val, "Saving as", file); -+ -+#ifdef WIN32 -+ // Dump command to batch file -+ char *cmd = NULL, *ptr = NULL; -+ AVal swfUrl, tcUrl; -+ -+ cmd = calloc(2048, sizeof (char)); -+ ptr = cmd; -+ tcUrl = StripParams(&server->rc.Link.tcUrl); -+ swfUrl = StripParams(&server->rc.Link.swfUrl); -+ ptr += sprintf(ptr, "rtmpdump -r \"%.*s\" -a \"%.*s\" -f \"%.*s\" -W \"%.*s\" -p \"%.*s\"", -+ tcUrl.av_len, tcUrl.av_val, -+ server->rc.Link.app.av_len, server->rc.Link.app.av_val, -+ server->rc.Link.flashVer.av_len, server->rc.Link.flashVer.av_val, -+ swfUrl.av_len, swfUrl.av_val, -+ server->rc.Link.pageUrl.av_len, server->rc.Link.pageUrl.av_val); -+ -+ if (server->rc.Link.usherToken.av_val) -+ { -+ char *usherToken = strreplace(server->rc.Link.usherToken.av_val, server->rc.Link.usherToken.av_len, "\"", "\\\""); -+ usherToken = strreplace(usherToken, 0, "^", "^^"); -+ usherToken = strreplace(usherToken, 0, "|", "^|"); -+ ptr += sprintf(ptr, " --jtv \"%s\"", usherToken); -+ free(usherToken); -+ } -+ -+ if (server->rc.Link.Extras.av_len) -+ { -+ ptr += sprintf(ptr, "%.*s", server->rc.Link.Extras.av_len, server->rc.Link.Extras.av_val); -+ } -+ -+ if (StartFlag == -1000) -+ ptr += sprintf(ptr, "%s", " --live"); -+ ptr += sprintf(ptr, " -y \"%.*s\"", server->rc.Link.playpath.av_len, server->rc.Link.playpath.av_val); -+ ptr += sprintf(ptr, " -o \"%s.flv\"\n", file); -+ -+ FILE *cmdfile = fopen("Command.bat", "a"); -+ fprintf(cmdfile, "%s", cmd); -+ fclose(cmdfile); -+ -+ free(cmd); -+#endif -+ - out = fopen(file, "wb"); - free(file); - if (!out) -@@ -1196,3 +1268,146 @@ main(int argc, char **argv) - #endif - return nStatus; - } -+ -+char * -+dumpAMF(AMFObject *obj, char *ptr) -+{ -+ int i; -+ const char opt[] = "NBSO Z"; -+ -+ for (i = 0; i < obj->o_num; i++) -+ { -+ AMFObjectProperty *p = &obj->o_props[i]; -+ if (p->p_type > 5) -+ continue; -+ ptr += sprintf(ptr, " -C "); -+ if (p->p_name.av_val) -+ *ptr++ = 'N'; -+ *ptr++ = opt[p->p_type]; -+ *ptr++ = ':'; -+ if (p->p_name.av_val) -+ ptr += sprintf(ptr, "%.*s:", p->p_name.av_len, p->p_name.av_val); -+ switch (p->p_type) -+ { -+ case AMF_BOOLEAN: -+ *ptr++ = p->p_vu.p_number != 0 ? '1' : '0'; -+ break; -+ case AMF_STRING: -+ memcpy(ptr, p->p_vu.p_aval.av_val, p->p_vu.p_aval.av_len); -+ ptr += p->p_vu.p_aval.av_len; -+ break; -+ case AMF_NUMBER: -+ ptr += sprintf(ptr, "%f", p->p_vu.p_number); -+ break; -+ case AMF_OBJECT: -+ *ptr++ = '1'; -+ ptr = dumpAMF(&p->p_vu.p_object, ptr); -+ ptr += sprintf(ptr, " -C O:0"); -+ break; -+ case AMF_NULL: -+ default: -+ break; -+ } -+ } -+ return ptr; -+} -+ -+char * -+strreplace(char *srcstr, int srclen, char *orig, char *repl) -+{ -+ char *ptr = NULL, *sptr = srcstr; -+ int origlen = strlen(orig); -+ int repllen = strlen(repl); -+ if (!srclen) -+ srclen = strlen(srcstr); -+ char *srcend = srcstr + srclen; -+ int dstbuffer = srclen / origlen * repllen; -+ if (dstbuffer < srclen) -+ dstbuffer = srclen; -+ char *dststr = calloc(dstbuffer + 1, sizeof (char)); -+ char *dptr = dststr; -+ -+ if ((ptr = strstr(srcstr, orig))) -+ { -+ while (ptr < srcend && (ptr = strstr(sptr, orig))) -+ { -+ int len = ptr - sptr; -+ memcpy(dptr, sptr, len); -+ sptr += len + origlen; -+ dptr += len; -+ memcpy(dptr, repl, repllen); -+ dptr += repllen; -+ } -+ memcpy(dptr, sptr, srcend - sptr); -+ return dststr; -+ } -+ -+ memcpy(dststr, srcstr, srclen); -+ return dststr; -+} -+ -+AVal -+StripParams(AVal *src) -+{ -+ AVal str; -+ if (src->av_val) -+ { -+ str.av_val = calloc(src->av_len + 1, sizeof (char)); -+ strncpy(str.av_val, src->av_val, src->av_len); -+ str.av_len = src->av_len; -+ char *start = str.av_val; -+ char *end = start + str.av_len; -+ char *ptr = start; -+ -+ while (ptr < end) -+ { -+ if (*ptr == '?') -+ { -+ str.av_len = ptr - start; -+ break; -+ } -+ ptr++; -+ } -+ memset(start + str.av_len, 0, 1); -+ -+ char *dynamic = strstr(start, "[[DYNAMIC]]"); -+ if (dynamic) -+ { -+ dynamic -= 1; -+ memset(dynamic, 0, 1); -+ str.av_len = dynamic - start; -+ end = start + str.av_len; -+ } -+ -+ char *import = strstr(start, "[[IMPORT]]"); -+ if (import) -+ { -+ str.av_val = import + 11; -+ strcpy(start, "http://"); -+ str.av_val = strcat(start, str.av_val); -+ str.av_len = strlen(str.av_val); -+ } -+ return str; -+ } -+ str = *src; -+ return str; -+} -+ -+AVal -+AVcopy(AVal src) -+{ -+ AVal dst; -+ if (src.av_len) -+ { -+ dst.av_val = malloc(src.av_len + 1); -+ memcpy(dst.av_val, src.av_val, src.av_len); -+ dst.av_val[src.av_len] = '\0'; -+ dst.av_len = src.av_len; -+ } -+ else -+ { -+ dst.av_val = NULL; -+ dst.av_len = 0; -+ } -+ return dst; -+} diff --git a/tools/darwin/depends/libsamplerate/01-libsamplerate-arm.patch b/tools/darwin/depends/libsamplerate/01-libsamplerate-arm.patch deleted file mode 100644 index b14b0dac571a7..0000000000000 --- a/tools/darwin/depends/libsamplerate/01-libsamplerate-arm.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ruN libsamplerate-0.1.7/src/float_cast.h.org src/float_cast.h ---- libsamplerate-0.1.7/src/float_cast.h.org 2010-10-28 21:00:19.000000000 -0400 -+++ libsamplerate-0.1.7/src/float_cast.h 2010-10-28 21:00:52.000000000 -0400 -@@ -193,7 +193,7 @@ - return res [1] ; - } /* double2int */ - --#elif (defined (__MACH__) && defined (__APPLE__)) -+#elif (defined (__MACH__) && defined (__APPLE__) && !defined(__arm__)) - - /* For Apple MacOSX. */ - - diff --git a/tools/darwin/depends/libsamplerate/Makefile b/tools/darwin/depends/libsamplerate/Makefile deleted file mode 100644 index c78120e0dfd8a..0000000000000 --- a/tools/darwin/depends/libsamplerate/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libsamplerate -VERSION=0.1.7 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-sndfile --disable-fftw - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p1 < ../01-libsamplerate-arm.patch - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libsdl-native/01-SDL_SetWidthHeight.patch b/tools/darwin/depends/libsdl-native/01-SDL_SetWidthHeight.patch deleted file mode 100644 index 0e260235545c3..0000000000000 --- a/tools/darwin/depends/libsdl-native/01-SDL_SetWidthHeight.patch +++ /dev/null @@ -1,33 +0,0 @@ -Index: include/SDL_video.h -=================================================================== ---- include/SDL_video.h (revision 4116) -+++ include/SDL_video.h (working copy) -@@ -324,6 +324,11 @@ - extern DECLSPEC SDL_Rect ** SDLCALL SDL_ListModes(SDL_PixelFormat *format, Uint32 flags); - - /** -+* Alter the width and height of the current surface to the given sizes. -+*/ -+extern DECLSPEC void SDLCALL SDL_SetWidthHeight(int width, int height); -+ -+/** - * Set up a video mode with the specified width, height and bits-per-pixel. - * - * If 'bpp' is 0, it is treated as the current display bits per pixel. - -Index: src/video/SDL_video.c -=================================================================== ---- src/video/SDL_video.c (revision 4116) -+++ src/video/SDL_video.c (working copy) -@@ -1956,3 +1956,11 @@ - return(0); - } - } -+ -+void SDL_SetWidthHeight(int width, int height) -+{ -+ if (current_video != NULL && current_video->screen != NULL) { -+ current_video->screen->w = width; -+ current_video->screen->h = height; -+ } -+} diff --git a/tools/darwin/depends/libsdl-native/02-mmx.patch b/tools/darwin/depends/libsdl-native/02-mmx.patch deleted file mode 100644 index 82f51aa78763d..0000000000000 --- a/tools/darwin/depends/libsdl-native/02-mmx.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- src/video/mmx.h Mon Feb 06 08:28:51 2006 +0000 -+++ src/video/mmx.h Sun Jan 30 13:38:57 2011 -0800 -@@ -355,7 +355,7 @@ - - #define mmx_r2m(op, reg, mem) \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ -- : "=X" (mem) \ -+ : "=m" (mem) \ - : /* nothing */ ) - - #define mmx_r2r(op, regs, regd) \ - diff --git a/tools/darwin/depends/libsdl-native/Makefile b/tools/darwin/depends/libsdl-native/Makefile deleted file mode 100644 index 9bb4c1dbe6873..0000000000000 --- a/tools/darwin/depends/libsdl-native/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -include ../Makefile.buildtools -export CFLAGS=-I$(TOOLCHAIN)/include -export LDFLAGS=-L$(TOOLCHAIN)/lib -export CPPFLAGS=-I$(TOOLCHAIN)/include -export CXXFLAGS=-I$(TOOLCHAIN)/include - -# lib name, version -LIBNAME=SDL -VERSION=1.2.14 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(TOOLCHAIN) \ - --without-x --disable-video-x11 - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - echo $(ARCHIVE) > .gitignore - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p0 < ../01-SDL_SetWidthHeight.patch - cd $(SOURCE); patch -p0 < ../02-mmx.patch - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libsdl/01-SDL_SetWidthHeight.patch b/tools/darwin/depends/libsdl/01-SDL_SetWidthHeight.patch deleted file mode 100644 index 0e260235545c3..0000000000000 --- a/tools/darwin/depends/libsdl/01-SDL_SetWidthHeight.patch +++ /dev/null @@ -1,33 +0,0 @@ -Index: include/SDL_video.h -=================================================================== ---- include/SDL_video.h (revision 4116) -+++ include/SDL_video.h (working copy) -@@ -324,6 +324,11 @@ - extern DECLSPEC SDL_Rect ** SDLCALL SDL_ListModes(SDL_PixelFormat *format, Uint32 flags); - - /** -+* Alter the width and height of the current surface to the given sizes. -+*/ -+extern DECLSPEC void SDLCALL SDL_SetWidthHeight(int width, int height); -+ -+/** - * Set up a video mode with the specified width, height and bits-per-pixel. - * - * If 'bpp' is 0, it is treated as the current display bits per pixel. - -Index: src/video/SDL_video.c -=================================================================== ---- src/video/SDL_video.c (revision 4116) -+++ src/video/SDL_video.c (working copy) -@@ -1956,3 +1956,11 @@ - return(0); - } - } -+ -+void SDL_SetWidthHeight(int width, int height) -+{ -+ if (current_video != NULL && current_video->screen != NULL) { -+ current_video->screen->w = width; -+ current_video->screen->h = height; -+ } -+} diff --git a/tools/darwin/depends/libsdl/02-mmx.patch b/tools/darwin/depends/libsdl/02-mmx.patch deleted file mode 100644 index 82f51aa78763d..0000000000000 --- a/tools/darwin/depends/libsdl/02-mmx.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- src/video/mmx.h Mon Feb 06 08:28:51 2006 +0000 -+++ src/video/mmx.h Sun Jan 30 13:38:57 2011 -0800 -@@ -355,7 +355,7 @@ - - #define mmx_r2m(op, reg, mem) \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ -- : "=X" (mem) \ -+ : "=m" (mem) \ - : /* nothing */ ) - - #define mmx_r2r(op, regs, regd) \ - diff --git a/tools/darwin/depends/libsdl/Makefile b/tools/darwin/depends/libsdl/Makefile deleted file mode 100644 index 45df4c544d547..0000000000000 --- a/tools/darwin/depends/libsdl/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=SDL -VERSION=1.2.14 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --without-x --disable-video-x11 - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - echo $(ARCHIVE) > .gitignore - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p0 < ../01-SDL_SetWidthHeight.patch - cd $(SOURCE); patch -p0 < ../02-mmx.patch - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libsdl_image-native/Makefile b/tools/darwin/depends/libsdl_image-native/Makefile deleted file mode 100644 index 786899bdacf01..0000000000000 --- a/tools/darwin/depends/libsdl_image-native/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include ../Makefile.buildtools -export CFLAGS=-I$(TOOLCHAIN)/include -export LDFLAGS=-L$(TOOLCHAIN)/lib -export CPPFLAGS=-I$(TOOLCHAIN)/include -export CXXFLAGS=-I$(TOOLCHAIN)/include - -# lib name, version -LIBNAME=SDL_image -VERSION=1.2.7 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(TOOLCHAIN) \ - --disable-jpg-shared --disable-png-shared --disable-tif-shared --disable-sdltest - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).a - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libsdl_image/Makefile b/tools/darwin/depends/libsdl_image/Makefile deleted file mode 100644 index 980838fcacda2..0000000000000 --- a/tools/darwin/depends/libsdl_image/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=SDL_image -VERSION=1.2.12 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-jpg-shared --disable-png-shared --disable-tif-shared --disable-sdltest - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).a - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libsdl_mixer/Makefile b/tools/darwin/depends/libsdl_mixer/Makefile deleted file mode 100644 index 55d8ad669d4b4..0000000000000 --- a/tools/darwin/depends/libsdl_mixer/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=SDL_mixer -VERSION=1.2.8 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-music-ogg --disable-music-mp3 \ - --disable-music-mod --disable-music-midi --disable-smpegtest --disable-sdltest - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).a - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - sed -ie "s|@SDL_LIBS@|@SDL_LIBS@ -arch $(ARCH) -mmacosx-version-min=$(SDK)|" "$(SOURCE)/Makefile.in" - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install-hdrs install-lib - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libshairport/001_add_ao.patch b/tools/darwin/depends/libshairport/001_add_ao.patch deleted file mode 100644 index 995f7b78eea86..0000000000000 --- a/tools/darwin/depends/libshairport/001_add_ao.patch +++ /dev/null @@ -1,270 +0,0 @@ -diff -uP libshairport-1.2.0.20310_lib/src/ao.h ../../../../../libshairport-1.2.0.20310_lib/src/ao.h ---- src/ao.h 1970-01-01 01:00:00.000000000 +0100 -+++ src/ao.h 2011-09-25 20:36:36.000000000 +0200 -@@ -0,0 +1,156 @@ -+/* -+ * -+ * ao.h -+ * -+ * Original Copyright (C) Aaron Holtzman - May 1999 -+ * Modifications Copyright (C) Stan Seibert - July 2000, July 2001 -+ * More Modifications Copyright (C) Jack Moffitt - October 2000 -+ * -+ * This file is part of libao, a cross-platform audio outputlibrary. See -+ * README for a history of this source code. -+ * -+ * libao is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * libao is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with GNU Make; see the file COPYING. If not, write to -+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+#ifndef __AO_H__ -+#define __AO_H__ -+ -+#ifdef __cplusplus -+extern "C" -+{ -+#endif /* __cplusplus */ -+ -+#include -+#include -+#include -+#include -+ -+/* --- Constants ---*/ -+ -+#define AO_TYPE_LIVE 1 -+#define AO_TYPE_FILE 2 -+ -+ -+#define AO_ENODRIVER 1 -+#define AO_ENOTFILE 2 -+#define AO_ENOTLIVE 3 -+#define AO_EBADOPTION 4 -+#define AO_EOPENDEVICE 5 -+#define AO_EOPENFILE 6 -+#define AO_EFILEEXISTS 7 -+#define AO_EBADFORMAT 8 -+ -+#define AO_EFAIL 100 -+ -+ -+#define AO_FMT_LITTLE 1 -+#define AO_FMT_BIG 2 -+#define AO_FMT_NATIVE 4 -+ -+/* --- Structures --- */ -+ -+typedef struct ao_info { -+ int type; /* live output or file output? */ -+ char *name; /* full name of driver */ -+ char *short_name; /* short name of driver */ -+ char *author; /* driver author */ -+ char *comment; /* driver comment */ -+ int preferred_byte_format; -+ int priority; -+ char **options; -+ int option_count; -+} ao_info; -+ -+typedef struct ao_functions ao_functions; -+typedef struct ao_device ao_device; -+ -+typedef struct ao_sample_format { -+ int bits; /* bits per sample */ -+ int rate; /* samples per second (in a single channel) */ -+ int channels; /* number of audio channels */ -+ int byte_format; /* Byte ordering in sample, see constants below */ -+ char *matrix; /* input channel location/ordering */ -+} ao_sample_format; -+ -+typedef struct ao_option { -+ char *key; -+ char *value; -+ struct ao_option *next; -+} ao_option; -+ -+#if defined(AO_BUILDING_LIBAO) -+#include "ao_private.h" -+#endif -+ -+/* --- Functions --- */ -+ -+/* library setup/teardown */ -+void ao_initialize(void); -+void ao_shutdown(void); -+ -+/* device setup/playback/teardown */ -+int ao_append_global_option(const char *key, -+ const char *value); -+int ao_append_option(ao_option **options, -+ const char *key, -+ const char *value); -+void ao_free_options(ao_option *options); -+ -+char* ao_get_option(ao_option *options, const char* key); -+ -+ao_device* ao_open_live(int driver_id, -+ ao_sample_format *format, -+ ao_option *option); -+ao_device* ao_open_file(int driver_id, -+ const char *filename, -+ int overwrite, -+ ao_sample_format *format, -+ ao_option *option); -+ -+int ao_play(ao_device *device, -+ char *output_samples, -+ uint32_t num_bytes); -+int ao_close(ao_device *device); -+ -+/* driver information */ -+int ao_driver_id(const char *short_name); -+int ao_default_driver_id(void); -+ao_info *ao_driver_info(int driver_id); -+ao_info **ao_driver_info_list(int *driver_count); -+char *ao_file_extension(int driver_id); -+ -+/* miscellaneous */ -+int ao_is_big_endian(void); -+ -+ -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ -+ -+#endif /* __AO_H__ */ -+ -+extern struct AudioOutput g_ao; -+struct AudioOutput -+ { -+ void (*ao_initialize)(void); -+ int (*ao_play)(ao_device *, char *, uint32_t); -+ int (*ao_default_driver_id)(void); -+ ao_device* (*ao_open_live)( int, ao_sample_format *, ao_option *); -+ int (*ao_close)(ao_device *); -+ /* -- Device Setup/Playback/Teardown -- */ -+ int (*ao_append_option)(ao_option **, const char *, const char *); -+ void (*ao_free_options)(ao_option *); -+ char* (*ao_get_option)(ao_option *, const char* ); -+ }; -diff -uP libshairport-1.2.0.20310_lib/src/hairtunes.c ../../../../../libshairport-1.2.0.20310_lib/src/hairtunes.c ---- src/hairtunes.c 2011-09-23 21:55:48.000000000 +0200 -+++ src/hairtunes.c 2011-09-25 20:37:49.000000000 +0200 -@@ -25,7 +25,7 @@ - */ - - #define XBMC --//#defined HAS_AO -+#define HAS_AO - - #include - #include -@@ -45,7 +45,7 @@ - #include - #include - #ifdef HAS_AO --#include -+#include "ao.h" - #endif - - #ifdef FANCY_RESAMPLING -@@ -881,7 +881,7 @@ - } - #ifdef HAS_AO - } else { -- ao_play(dev, (char *)outbuf, play_samples*4); -+ g_ao.ao_play(dev, (char *)outbuf, play_samples*4); - #endif - } - } -@@ -906,7 +906,7 @@ - ao_device *dev; - - void* init_ao() { -- ao_initialize(); -+ g_ao.ao_initialize(); - - int driver; - #ifndef XBMC -@@ -921,7 +921,7 @@ - #endif - { - // otherwise choose the default -- driver = ao_default_driver_id(); -+ driver = g_ao.ao_default_driver_id(); - } - - ao_sample_format fmt; -@@ -944,9 +944,9 @@ - } - #endif - -- ao_append_option(&ao_opts, "name", "Streaming..."); -+ g_ao.ao_append_option(&ao_opts, "name", "Streaming..."); - -- dev = ao_open_live(driver, &fmt, ao_opts); -+ dev = g_ao.ao_open_live(driver, &fmt, ao_opts); - if (dev == NULL) { - die("Could not open ao device"); - } -@@ -985,7 +985,7 @@ - audio_running = 0; - pthread_join(audio_thread, NULL); - #ifdef HAS_AO -- ao_close(dev); -+ g_ao.ao_close(dev); - #endif - } - -diff -uP libshairport-1.2.0.20310_lib/src/shairport.c ../../../../../libshairport-1.2.0.20310_lib/src/shairport.c ---- src/shairport.c 2011-08-21 01:57:56.000000000 +0200 -+++ src/shairport.c 2011-09-25 20:44:40.000000000 +0200 -@@ -92,6 +92,14 @@ - static char tPassword[56] = ""; - static char tHWID[HWID_SIZE] = {0,51,52,53,54,55}; - -+#ifdef XBMC -+struct AudioOutput g_ao; -+void shairport_set_ao(struct AudioOutput *ao) -+{ -+ g_ao=*ao; -+} -+#endif -+ - #ifndef XBMC - int main(int argc, char **argv) - #else -diff -uP libshairport-1.2.0.20310_lib/src/shairport.h ../../../../../libshairport-1.2.0.20310_lib/src/shairport.h ---- src/shairport.h 2011-08-21 01:58:11.000000000 +0200 -+++ src/shairport.h 2011-09-25 20:36:43.000000000 +0200 -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include "ao.h" - - - #define HWID_SIZE 6 -@@ -62,9 +63,11 @@ - void shairport_exit(void); - int shairport_loop(void); - int shairport_is_running(void); -+void shairport_set_ao(struct AudioOutput *ao); - - #ifdef __cplusplus - } - #endif /* __cplusplus */ - - #endif -+ diff --git a/tools/darwin/depends/libshairport/002_fix_install_header.patch b/tools/darwin/depends/libshairport/002_fix_install_header.patch deleted file mode 100644 index 495b97346c8dc..0000000000000 --- a/tools/darwin/depends/libshairport/002_fix_install_header.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- src/Makefile.am.old 2011-09-23 23:14:39.000000000 +0200 -+++ src/Makefile.am 2011-09-25 21:38:08.000000000 +0200 -@@ -1,7 +1,7 @@ - lib_LTLIBRARIES=libshairport.la - --library_includedir=$(includedir) --library_include_HEADERS = shairport.h -+library_includedir=$(includedir)/shairport -+library_include_HEADERS = shairport.h ao.h socketlib.h - - libshairport_la_SOURCES=shairport.c hairtunes.c socketlib.c alac.c - libshairport_la_LDFLAGS=-dynamiclib diff --git a/tools/darwin/depends/libshairport/003_fix_deadlock.patch b/tools/darwin/depends/libshairport/003_fix_deadlock.patch deleted file mode 100644 index c05970e138c28..0000000000000 --- a/tools/darwin/depends/libshairport/003_fix_deadlock.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/hairtunes.c.orig 2011-09-25 21:58:08.000000000 +0200 -+++ src/hairtunes.c 2011-09-25 21:58:12.000000000 +0200 -@@ -991,6 +991,7 @@ - - void hairtunes_cleanup(void) - { -+ pthread_cond_signal(&ab_buffer_ready); - clean_output(); - clean_rtp(); - clean_buffer(); diff --git a/tools/darwin/depends/libshairport/004_fix_bad_access.patch b/tools/darwin/depends/libshairport/004_fix_bad_access.patch deleted file mode 100644 index 1976904c4d6ec..0000000000000 --- a/tools/darwin/depends/libshairport/004_fix_bad_access.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/hairtunes.c.orig 2011-09-25 23:26:56.000000000 +0200 -+++ src/hairtunes.c 2011-09-25 23:29:27.000000000 +0200 -@@ -89,7 +89,6 @@ - // maximal resampling shift - conservative - #define OUTFRAME_BYTES (4*(frame_size+3)) - -- - alac_file *decoder_info; - - #ifdef FANCY_RESAMPLING -@@ -849,6 +848,11 @@ - inbuf = buffer_get_frame(); - } while (!inbuf && audio_running); - -+ if(!audio_running) -+ { -+ return 0; //don't access inbuf if audio stopped -+ } -+ - #ifdef FANCY_RESAMPLING - if (fancy_resampling) { - int i; diff --git a/tools/darwin/depends/libshairport/005_fix_shutdown.patch b/tools/darwin/depends/libshairport/005_fix_shutdown.patch deleted file mode 100644 index 32bd282719dbd..0000000000000 --- a/tools/darwin/depends/libshairport/005_fix_shutdown.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/shairport.c 2011-09-25 23:58:06.000000000 +0200 -+++ src/shairport.c.new 2011-09-25 23:57:54.000000000 +0200 -@@ -368,6 +368,7 @@ - void shairport_exit(void) - { - m_running = 0; -+ close(tServerSock); - } - - int shairport_is_running(void) diff --git a/tools/darwin/depends/libshairport/006_no_printf.patch b/tools/darwin/depends/libshairport/006_no_printf.patch deleted file mode 100644 index eb69d42b7492f..0000000000000 --- a/tools/darwin/depends/libshairport/006_no_printf.patch +++ /dev/null @@ -1,843 +0,0 @@ ---- src/alac.c 2011-08-21 00:06:21.000000000 +0200 -+++ src/alac.c 2011-10-01 04:12:09.000000000 +0200 -@@ -804,7 +804,7 @@ - } - else - { -- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type); -+ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type); - /* i think the only other prediction type (or perhaps this is just a - * boolean?) runs adaptive fir twice.. like: - * predictor_decompress_fir_adapt(predictor_error, tempout, ...) -@@ -885,7 +885,7 @@ - } - case 20: - case 32: -- fprintf(stderr, "FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size); -+ xprintf("FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size); - break; - default: - break; -@@ -1004,7 +1004,7 @@ - } - else - { /* see mono case */ -- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type_a); -+ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type_a); - } - - /* channel 2 */ -@@ -1029,7 +1029,7 @@ - } - else - { -- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type_b); -+ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type_b); - } - } - else -@@ -1106,7 +1106,7 @@ - } - case 20: - case 32: -- fprintf(stderr, "FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size); -+ xprintf("FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size); - break; - default: - break; ---- src/hairtunes.c 2011-10-01 17:45:08.000000000 +0200 -+++ src/hairtunes.c 2011-10-01 17:42:07.000000000 +0200 -@@ -121,8 +121,8 @@ - pthread_cond_t ab_buffer_ready; - - static void die(char *why) { -- fprintf(stderr, "FATAL: %s\n", why); -- exit(1); -+ xprintf("FATAL: %s\n", why); -+ //exit(1); - } - - static int hex2bin(unsigned char *buf, char *hex) { -@@ -245,13 +245,13 @@ - continue; - } - if (!strcmp(line, "exit\n")) { -- exit(0); -+ ;//exit(0); - } - if (!strcmp(line, "flush\n")) { - hairtunes_flush(); - } - } -- fprintf(stderr, "bye!\n"); -+ xprintf("bye!\n"); - fflush(stderr); - #endif - -@@ -262,7 +262,7 @@ - { - assert(f<=0); - if (debug) -- fprintf(stderr, "VOL: %lf\n", f); -+ xprintf("VOL: %lf\n", f); - volume = pow(10.0,0.05*f); - fix_volume = 65536.0 * volume; - } -@@ -273,7 +273,7 @@ - ab_resync(); - pthread_mutex_unlock(&ab_mutex); - if (debug) -- fprintf(stderr, "FLUSH\n"); -+ xprintf("FLUSH\n"); - } - - #ifdef HAIRTUNES_STANDALONE -@@ -423,7 +423,7 @@ - } else if (seq_order(ab_read, seqno)) { // late but not yet played - abuf = audio_buffer + BUFIDX(seqno); - } else { // too late. -- fprintf(stderr, "\nlate packet %04X (%04X:%04X)\n", seqno, ab_read, ab_write); -+ xprintf("\nlate packet %04X (%04X:%04X)\n", seqno, ab_read, ab_write); - } - buf_fill = ab_write - ab_read; - pthread_mutex_unlock(&ab_mutex); -@@ -520,7 +520,7 @@ - if (seq_order(last, first)) - return; - -- fprintf(stderr, "requesting resend on %d packets (port %d)\n", last-first+1, controlport); -+ xprintf("requesting resend on %d packets (port %d)\n", last-first+1, controlport); - - char req[8]; // *not* a standard RTCP NACK - req[0] = 0x80; -@@ -604,8 +604,8 @@ - port += 3; - } - -- printf("port: %d\n", port); // let our handler know where we end up listening -- printf("cport: %d\n", port+1); -+ xprintf("port: %d\n", port); // let our handler know where we end up listening -+ xprintf("cport: %d\n", port+1); - - rtp_sockets[0] = sock; - rtp_sockets[1] = csock; -@@ -708,7 +708,7 @@ - bf_est_drift = biquad_filt(&bf_drift_lpf, CONTROL_B*(bf_est_err*CONTROL_A + err_deriv) + bf_est_drift); - - if (debug) -- fprintf(stderr, "bf %d err %f drift %f desiring %f ed %f estd %f\r", fill, bf_est_err, bf_est_drift, desired_fill, err_deriv, err_deriv + CONTROL_A*bf_est_err); -+ xprintf("bf %d err %f drift %f desiring %f ed %f estd %f\r", fill, bf_est_err, bf_est_drift, desired_fill, err_deriv, err_deriv + CONTROL_A*bf_est_err); - bf_playback_rate = 1.0 + CONTROL_A*bf_est_err + bf_est_drift; - - bf_last_err = bf_est_err; -@@ -724,7 +724,7 @@ - buf_fill = ab_write - ab_read; - if (buf_fill < 1 || !ab_synced || ab_buffering) { // init or underrun. stop and wait - if (ab_synced) -- fprintf(stderr, "\nunderrun\n"); -+ xprintf("\nunderrun\n"); - - ab_buffering = 1; - pthread_cond_wait(&ab_buffer_ready, &ab_mutex); -@@ -736,7 +736,7 @@ - return 0; - } - if (buf_fill >= BUFFER_FRAMES) { // overrunning! uh-oh. restart at a sane distance -- fprintf(stderr, "\noverrun.\n"); -+ xprintf("\noverrun.\n"); - ab_read = ab_write - START_FILL; - } - read = ab_read; -@@ -748,7 +748,7 @@ - - volatile abuf_t *curframe = audio_buffer + BUFIDX(read); - if (!curframe->ready) { -- fprintf(stderr, "\nmissing frame.\n"); -+ xprintf("\nmissing frame.\n"); - memset(curframe->data, 0, FRAME_BYTES); - } - curframe->ready = 0; -@@ -775,13 +775,13 @@ - if (stuff) { - if (stuff==1) { - if (debug) -- fprintf(stderr, "+++++++++\n"); -+ xprintf("+++++++++\n"); - // interpolate one sample - *outptr++ = dithered_vol(((long)inptr[-2] + (long)inptr[0]) >> 1); - *outptr++ = dithered_vol(((long)inptr[-1] + (long)inptr[1]) >> 1); - } else if (stuff==-1) { - if (debug) -- fprintf(stderr, "---------\n"); -+ xprintf("---------\n"); - inptr++; - inptr++; - } ---- src/shairport.c 2011-10-01 17:45:08.000000000 +0200 -+++ src/shairport.c 2011-10-01 17:41:04.000000000 +0200 -@@ -31,6 +31,27 @@ - #include "shairport.h" - #include "hairtunes.h" - -+static struct printfPtr g_printf={NULL}; -+ -+int xprintf(const char *format, ...) -+{ -+ char dbg[2048]; -+ va_list args; -+ va_start(args, format); -+ vsnprintf(dbg, sizeof(dbg), format, args); -+ va_end(args); -+ if(g_printf.extprintf) -+ { -+ g_printf.extprintf(dbg, sizeof(dbg)); -+ } -+ else -+ { -+ printf(dbg); -+ } -+ -+ return 1; -+} -+ - #ifndef TRUE - #define TRUE (-1) - #endif -@@ -98,6 +119,11 @@ - { - g_ao=*ao; - } -+ -+void shairport_set_printf(struct printfPtr *funcPtr) -+{ -+ g_printf = *funcPtr; -+} - #endif - - #ifndef XBMC -@@ -106,7 +132,7 @@ - int shairport_main(int argc, char **argv) - #endif - { -- printf("initializing shairport\n"); -+ xprintf("initializing shairport\n",NULL); - char tHWID_Hex[HWID_SIZE * 2 + 1]; - char tKnownHwid[32]; - -@@ -185,22 +211,22 @@ - } - else if(!strcmp(arg, "-h") || !strcmp(arg, "--help")) - { -- slog(LOG_INFO, "ShairPort version 0.05 C port - Airport Express emulator\n"); -- slog(LOG_INFO, "Usage:\nshairport [OPTION...]\n\nOptions:\n"); -- slog(LOG_INFO, " -a, --apname=AirPort Sets Airport name\n"); -- slog(LOG_INFO, " -p, --password=secret Sets Password (not working)\n"); -- slog(LOG_INFO, " -o, --server_port=5000 Sets Port for Avahi/dns-sd\n"); -- slog(LOG_INFO, " -b, --buffer=282 Sets Number of frames to buffer before beginning playback\n"); -- slog(LOG_INFO, " -d Daemon mode\n"); -- slog(LOG_INFO, " -q, --quiet Supresses all output.\n"); -- slog(LOG_INFO, " -v,-v2,-v3,-vv Various debugging levels\n"); -- slog(LOG_INFO, "\n"); -+ xprintf("ShairPort version 0.05 C port - Airport Express emulator\n"); -+ xprintf("Usage:\nshairport [OPTION...]\n\nOptions:\n"); -+ xprintf(" -a, --apname=AirPort Sets Airport name\n"); -+ xprintf(" -p, --password=secret Sets Password (not working)\n"); -+ xprintf(" -o, --server_port=5000 Sets Port for Avahi/dns-sd\n"); -+ xprintf(" -b, --buffer=282 Sets Number of frames to buffer before beginning playback\n"); -+ xprintf(" -d Daemon mode\n"); -+ xprintf(" -q, --quiet Supresses all output.\n"); -+ xprintf(" -v,-v2,-v3,-vv Various debugging levels\n"); -+ xprintf("\n"); - return 0; - } - } - - if ( buffer_start_fill < 30 || buffer_start_fill > BUFFER_FRAMES ) { -- fprintf(stderr, "buffer value must be > 30 and < %d\n", BUFFER_FRAMES); -+ xprintf("buffer value must be > 30 and < %d\n", BUFFER_FRAMES); - return(0); - } - -@@ -209,11 +235,11 @@ - int tPid = fork(); - if(tPid < 0) - { -- exit(1); // Error on fork -+ //exit(1); // Error on fork - } - else if(tPid > 0) - { -- exit(0); -+ //exit(0); - } - else - { -@@ -254,10 +280,10 @@ - sscanf(tHWID_Hex, "%02X%02X%02X%02X%02X%02X", &tHWID[0], &tHWID[1], &tHWID[2], &tHWID[3], &tHWID[4], &tHWID[5]); - } - -- slog(LOG_INFO, "LogLevel: %d\n", kCurrentLogLevel); -- slog(LOG_INFO, "AirName: %s\n", tServerName); -- slog(LOG_INFO, "HWID: %.*s\n", HWID_SIZE, tHWID+1); -- slog(LOG_INFO, "HWID_Hex(%d): %s\n", strlen(tHWID_Hex), tHWID_Hex); -+ xprintf("LogLevel: %d\n", kCurrentLogLevel); -+ xprintf("AirName: %s\n", tServerName); -+ xprintf("HWID: %.*s\n", HWID_SIZE, tHWID+1); -+ xprintf("HWID_Hex(%d): %s\n", strlen(tHWID_Hex), tHWID_Hex); - - if(tSimLevel >= 1) - { -@@ -271,12 +297,12 @@ - #ifndef XBMC - startAvahi(tHWID_Hex, tServerName, tPort); - #endif -- slog(LOG_DEBUG_V, "Starting connection server: specified server port: %d\n", tPort); -+ xprintf("Starting connection server: specified server port: %d\n", tPort); - tServerSock = setupListenServer(&tAddrInfo, tPort); - if(tServerSock < 0) - { - freeaddrinfo(tAddrInfo); -- slog(LOG_INFO, "Error setting up server socket on port %d, try specifying a different port\n", tPort); -+ xprintf("Error setting up server socket on port %d, try specifying a different port\n", tPort); - return 0; - } - -@@ -303,7 +329,7 @@ - - int readsock; - -- slog(LOG_DEBUG_V, "Waiting for clients to connect\n"); -+ xprintf("Waiting for clients to connect\n"); - - while(m_running) - { -@@ -335,7 +361,7 @@ - { - freeaddrinfo(tAddrInfo); - tAddrInfo = NULL; -- slog(LOG_DEBUG, "...Accepted Client Connection..\n"); -+ xprintf("...Accepted Client Connection..\n"); - close(tServerSock); - handleClient(tClientSock, tPassword, tHWID); - //close(tClientSock); -@@ -343,11 +369,11 @@ - } - else - { -- slog(LOG_DEBUG_VV, "Child now busy handling new client\n"); -+ xprintf("Child now busy handling new client\n"); - close(tClientSock); - } - #else -- slog(LOG_DEBUG, "...Accepted Client Connection..\n"); -+ xprintf("...Accepted Client Connection..\n"); - handleClient(tClientSock, tPassword, tHWID); - #endif - } -@@ -357,7 +383,7 @@ - } - } - -- slog(LOG_DEBUG_VV, "Finished\n"); -+ xprintf("Finished\n"); - if(tAddrInfo != NULL) - { - freeaddrinfo(tAddrInfo); -@@ -416,7 +442,7 @@ - - void handleClient(int pSock, char *pPassword, char *pHWADDR) - { -- slog(LOG_DEBUG_VV, "In Handle Client\n"); -+ xprintf("In Handle Client\n"); - fflush(stdout); - - socklen_t len; -@@ -435,7 +461,7 @@ - - // deal with both IPv4 and IPv6: - if (addr.ss_family == AF_INET) { -- slog(LOG_DEBUG_V, "Constructing ipv4 address\n"); -+ xprintf("Constructing ipv4 address\n"); - struct sockaddr_in *s = (struct sockaddr_in *)&addr; - port = ntohs(s->sin_port); - inet_ntop(AF_INET, &s->sin_addr, ipstr, sizeof ipstr); -@@ -455,20 +481,20 @@ - if(memcmp(&addr.bin[0], "\x00\x00\x00\x00" "\x00\x00\x00\x00" "\x00\x00\xff\xff", 12) == 0) - { - // its ipv4... -- slog(LOG_DEBUG_V, "Constructing ipv4 from ipv6 address\n"); -+ xprintf("Constructing ipv4 from ipv6 address\n"); - memcpy(ipbin, &addr.bin[12], 4); - ipbinlen = 4; - } - else - { -- slog(LOG_DEBUG_V, "Constructing ipv6 address\n"); -+ xprintf("Constructing ipv6 address\n"); - memcpy(ipbin, &s->sin6_addr, 16); - ipbinlen = 16; - } - } - -- slog(LOG_DEBUG_V, "Peer IP address: %s\n", ipstr); -- slog(LOG_DEBUG_V, "Peer port : %d\n", port); -+ xprintf("Peer IP address: %s\n", ipstr); -+ xprintf("Peer port : %d\n", port); - - int tMoreDataNeeded = 1; - struct keyring tKeys; -@@ -489,16 +515,16 @@ - tError = readDataFromClient(pSock, &(tConn.recv)); - if(!tError && strlen(tConn.recv.data) > 0) - { -- slog(LOG_DEBUG_VV, "Finished Reading some data from client\n"); -+ xprintf("Finished Reading some data from client\n"); - // parse client request - tMoreDataNeeded = parseMessage(&tConn, ipbin, ipbinlen, pHWADDR); - if(1 == tMoreDataNeeded) - { -- slog(LOG_DEBUG_VV, "\n\nNeed to read more data\n"); -+ xprintf("\n\nNeed to read more data\n"); - } - else if(-1 == tMoreDataNeeded) // Forked process down below ended. - { -- slog(LOG_DEBUG_V, "Forked Process ended...cleaning up\n"); -+ xprintf("Forked Process ended...cleaning up\n"); - cleanup(&tConn); - // pSock was already closed - return; -@@ -507,13 +533,13 @@ - } - else - { -- slog(LOG_DEBUG, "Error reading from socket, closing client\n"); -+ xprintf("Error reading from socket, closing client\n"); - // Error reading data....quit. - cleanup(&tConn); - return; - } - } -- slog(LOG_DEBUG_VV, "Writing: %d chars to socket\n", tConn.resp.current); -+ xprintf("Writing: %d chars to socket\n", tConn.resp.current); - //tConn->resp.data[tConn->resp.current-1] = '\0'; - writeDataToClient(pSock, &(tConn.resp)); - // Finished reading one message... -@@ -526,9 +552,9 @@ - - void writeDataToClient(int pSock, struct shairbuffer *pResponse) - { -- slog(LOG_DEBUG_VV, "\n----Beg Send Response Header----\n%.*s\n", pResponse->current, pResponse->data); -+ xprintf("\n----Beg Send Response Header----\n%.*s\n", pResponse->current, pResponse->data); - send(pSock, pResponse->data, pResponse->current,0); -- slog(LOG_DEBUG_VV, "----Send Response Header----\n"); -+ xprintf("----Send Response Header----\n"); - } - - int readDataFromClient(int pSock, struct shairbuffer *pClientBuffer) -@@ -541,7 +567,7 @@ - while(tRetval > 0 && tEnd < 0) - { - // Read from socket until \n\n, \r\n\r\n, or \r\r is found -- slog(LOG_DEBUG_V, "Waiting To Read...\n"); -+ xprintf("Waiting To Read...\n"); - fflush(stdout); - tRetval = read(pSock, tReadBuf, MAX_SIZE); - // if new buffer contains the end of request string, only copy partial buffer? -@@ -552,40 +578,40 @@ - { - pClientBuffer->marker = tEnd+1; // Marks start of content - } -- slog(SOCKET_LOG_LEVEL, "Found end of http request at: %d\n", tEnd); -+ xprintf("Found end of http request at: %d\n", tEnd); - fflush(stdout); - } - else - { - tEnd = MAX_SIZE; -- slog(SOCKET_LOG_LEVEL, "Read %d of data so far\n%s\n", tRetval, tReadBuf); -+ xprintf("Read %d of data so far\n%s\n", tRetval, tReadBuf); - fflush(stdout); - } - if(tRetval > 0) - { - // Copy read data into tReceive; -- slog(SOCKET_LOG_LEVEL, "Read %d data, using %d of it\n", tRetval, tEnd); -+ xprintf("Read %d data, using %d of it\n", tRetval, tEnd); - addNToShairBuffer(pClientBuffer, tReadBuf, tRetval); -- slog(LOG_DEBUG_VV, "Finished copying data\n"); -+ xprintf("Finished copying data\n"); - } - else - { -- slog(LOG_DEBUG, "Error reading data from socket, got: %d bytes", tRetval); -+ xprintf("Error reading data from socket, got: %d bytes", tRetval); - return tRetval; - } - } - if(tEnd + 1 != tRetval) - { -- slog(SOCKET_LOG_LEVEL, "Read more data after end of http request. %d instead of %d\n", tRetval, tEnd+1); -+ xprintf("Read more data after end of http request. %d instead of %d\n", tRetval, tEnd+1); - } -- slog(SOCKET_LOG_LEVEL, "Finished Reading Data:\n%s\nEndOfData\n", pClientBuffer->data); -+ xprintf("Finished Reading Data:\n%s\nEndOfData\n", pClientBuffer->data); - fflush(stdout); - return 0; - } - - char *getFromBuffer(char *pBufferPtr, const char *pField, int pLenAfterField, int *pReturnSize, char *pDelims) - { -- slog(LOG_DEBUG_V, "GettingFromBuffer: %s\n", pField); -+ xprintf("GettingFromBuffer: %s\n", pField); - char* tFound = strstr(pBufferPtr, pField); - int tSize = 0; - if(tFound != NULL) -@@ -606,7 +632,7 @@ - } - - tSize = (int) (tShortest - tFound); -- slog(LOG_DEBUG_VV, "Found %.*s length: %d\n", tSize, tFound, tSize); -+ xprintf("Found %.*s length: %d\n", tSize, tFound, tSize); - if(pReturnSize != NULL) - { - *pReturnSize = tSize; -@@ -614,7 +640,7 @@ - } - else - { -- slog(LOG_DEBUG_V, "Not Found\n"); -+ xprintf("Not Found\n"); - } - return tFound; - } -@@ -648,10 +674,10 @@ - { - char tTrim[tFoundSize + 2]; - getTrimmed(tFound, tFoundSize, TRUE, TRUE, tTrim); -- slog(LOG_DEBUG_VV, "HeaderChallenge: [%s] len: %d sizeFound: %d\n", tTrim, strlen(tTrim), tFoundSize); -+ xprintf("HeaderChallenge: [%s] len: %d sizeFound: %d\n", tTrim, strlen(tTrim), tFoundSize); - int tChallengeDecodeSize = 16; - char *tChallenge = decode_base64((unsigned char *)tTrim, tFoundSize, &tChallengeDecodeSize); -- slog(LOG_DEBUG_VV, "Challenge Decode size: %d expected 16\n", tChallengeDecodeSize); -+ xprintf("Challenge Decode size: %d expected 16\n", tChallengeDecodeSize); - - int tCurSize = 0; - unsigned char tChalResp[38]; -@@ -673,7 +699,7 @@ - } - - char *tTmp = encode_base64((unsigned char *)tChalResp, tCurSize); -- slog(LOG_DEBUG_VV, "Full sig: %s\n", tTmp); -+ xprintf("Full sig: %s\n", tTmp); - free(tTmp); - - // RSA Encrypt -@@ -722,10 +748,10 @@ - { - if(isLogEnabledFor(HEADER_LOG_LEVEL)) - { -- slog(HEADER_LOG_LEVEL, "Content-Length: %s value -> %d\n", tContent, tContentSize); -+ xprintf("Content-Length: %s value -> %d\n", tContent, tContentSize); - if(pConn->recv.marker != 0) - { -- slog(HEADER_LOG_LEVEL, "ContentPtr has %d, but needs %d\n", -+ xprintf("ContentPtr has %d, but needs %d\n", - strlen(pConn->recv.data+pConn->recv.marker), tContentSize); - } - } -@@ -735,7 +761,7 @@ - } - else - { -- slog(LOG_DEBUG_VV, "No content, header only\n"); -+ xprintf("No content, header only\n"); - } - - // "Creates" a new Response Header for our response message -@@ -748,7 +774,7 @@ - { - tLen = 20; - } -- slog(LOG_INFO, "********** RECV %.*s **********\n", tLen, pConn->recv.data); -+ xprintf("********** RECV %.*s **********\n", tLen, pConn->recv.data); - } - - if(pConn->password != NULL) -@@ -758,7 +784,7 @@ - - if(buildAppleResponse(pConn, pIpBin, pIpBinLen, pHWID)) // need to free sig - { -- slog(LOG_DEBUG_V, "Added AppleResponse to Apple-Challenge request\n"); -+ xprintf("Added AppleResponse to Apple-Challenge request\n"); - } - - // Find option, then based on option, do different actions. -@@ -778,14 +804,14 @@ - int tKeySize = 0; - char tEncodedAesIV[tSize + 2]; - getTrimmed(tHeaderVal, tSize, TRUE, TRUE, tEncodedAesIV); -- slog(LOG_DEBUG_VV, "AESIV: [%.*s] Size: %d Strlen: %d\n", tSize, tEncodedAesIV, tSize, strlen(tEncodedAesIV)); -+ xprintf("AESIV: [%.*s] Size: %d Strlen: %d\n", tSize, tEncodedAesIV, tSize, strlen(tEncodedAesIV)); - char *tDecodedIV = decode_base64((unsigned char*) tEncodedAesIV, tSize, &tSize); - - // grab the key, copy it out of the receive buffer - tHeaderVal = getFromContent(tContent, "a=rsaaeskey", &tKeySize); - char tEncodedAesKey[tKeySize + 2]; // +1 for nl, +1 for \0 - getTrimmed(tHeaderVal, tKeySize, TRUE, TRUE, tEncodedAesKey); -- slog(LOG_DEBUG_VV, "AES KEY: [%s] Size: %d Strlen: %d\n", tEncodedAesKey, tKeySize, strlen(tEncodedAesKey)); -+ xprintf("AES KEY: [%s] Size: %d Strlen: %d\n", tEncodedAesKey, tKeySize, strlen(tEncodedAesKey)); - // remove base64 coding from key - char *tDecodedAesKey = decode_base64((unsigned char*) tEncodedAesKey, - tKeySize, &tKeySize); // Need to free DecodedAesKey -@@ -794,7 +820,7 @@ - int tFmtpSize = 0; - char *tFmtp = getFromContent(tContent, "a=fmtp", &tFmtpSize); // Don't need to free - tFmtp = getTrimmedMalloc(tFmtp, tFmtpSize, TRUE, FALSE); // will need to free -- slog(LOG_DEBUG_VV, "Format: %s\n", tFmtp); -+ xprintf("Format: %s\n", tFmtp); - - RSA *rsa = loadKey(); - // Decrypt the binary aes key -@@ -803,11 +829,11 @@ - if(RSA_private_decrypt(tKeySize, (unsigned char *)tDecodedAesKey, - (unsigned char*) tDecryptedKey, rsa, RSA_PKCS1_OAEP_PADDING) >= 0) - { -- slog(LOG_DEBUG, "Decrypted AES key from RSA Successfully\n"); -+ xprintf("Decrypted AES key from RSA Successfully\n"); - } - else - { -- slog(LOG_INFO, "Error Decrypting AES key from RSA\n"); -+ xprintf("Error Decrypting AES key from RSA\n"); - } - free(tDecodedAesKey); - RSA_free(rsa); -@@ -823,13 +849,13 @@ - // struct comms *tComms = pConn->hairtunes; - // if (! (pipe(tComms->in) == 0 && pipe(tComms->out) == 0)) - // { --// slog(LOG_INFO, "Error setting up hairtunes communications...some things probably wont work very well.\n"); -+// xprintf("Error setting up hairtunes communications...some things probably wont work very well.\n"); - // } - - // Setup fork - char tPort[8] = "6000"; // get this from dup()'d stdout of child pid - -- printf("******** SETUP!!!!!\n"); -+ xprintf("******** SETUP!!!!!\n",NULL); - #ifndef XBMC - int tPid = fork(); - if(tPid == 0) -@@ -845,11 +871,11 @@ - tFound = getFromSetup(pConn->recv.data, "timing_port", &tSize); - getTrimmed(tFound, tSize, 1, 0, tTPortStr); - -- slog(LOG_DEBUG_VV, "converting %s and %s from str->int\n", tCPortStr, tTPortStr); -+ xprintf("converting %s and %s from str->int\n", tCPortStr, tTPortStr); - int tControlport = atoi(tCPortStr); - int tTimingport = atoi(tTPortStr); - -- slog(LOG_DEBUG_V, "Got %d for CPort and %d for TPort\n", tControlport, tTimingport); -+ xprintf("Got %d for CPort and %d for TPort\n", tControlport, tTimingport); - char *tRtp = NULL; - char *tPipe = NULL; - char *tAoDriver = NULL; -@@ -884,7 +910,7 @@ - tDataport, tRtp, tPipe, tAoDriver, tAoDeviceName, tAoDeviceId); - #ifndef XBMC - // Quit when finished. -- slog(LOG_DEBUG, "Returned from hairtunes init....returning -1, should close out this whole side of the fork\n"); -+ xprintf("Returned from hairtunes init....returning -1, should close out this whole side of the fork\n"); - return -1; - } - else if(tPid >0) -@@ -897,7 +923,7 @@ - int tRead = read(tComms->out[0], tFromHairtunes, 80); - if(tRead <= 0) - { -- slog(LOG_INFO, "Error reading port from hairtunes function, assuming default port: %d\n", tPort); -+ xprintf("Error reading port from hairtunes function, assuming default port: %d\n", tPort); - } - else - { -@@ -909,7 +935,7 @@ - } - else - { -- slog(LOG_INFO, "Read %d bytes, Error translating %s into a port\n", tRead, tFromHairtunes); -+ xprintf("Read %d bytes, Error translating %s into a port\n", tRead, tFromHairtunes); - } - } - -@@ -930,7 +956,7 @@ - } - else - { -- slog(LOG_INFO, "Error forking process....dere' be errors round here.\n"); -+ xprintf("Error forking process....dere' be errors round here.\n"); - return -1; - } - #endif -@@ -942,7 +968,7 @@ - propogateCSeq(pConn); - #ifndef XBMC - close(pConn->hairtunes->in[1]); -- slog(LOG_DEBUG, "Tearing down connection, closing pipes\n"); -+ xprintf("Tearing down connection, closing pipes\n"); - #else - hairtunes_cleanup(); - #endif -@@ -964,7 +990,7 @@ - propogateCSeq(pConn); - int tSize = 0; - char *tVol = getFromHeader(pConn->recv.data, "volume", &tSize); -- slog(LOG_DEBUG_VV, "About to write [vol: %.*s] data to hairtunes\n", tSize, tVol); -+ xprintf("About to write [vol: %.*s] data to hairtunes\n", tSize, tVol); - // TBD VOLUME - #ifndef XBMC - write(pConn->hairtunes->in[1], "vol: ", 5); -@@ -973,11 +999,11 @@ - #else - hairtunes_setvolume(atof(tVol)); - #endif -- slog(LOG_DEBUG_VV, "Finished writing data write data to hairtunes\n"); -+ xprintf("Finished writing data write data to hairtunes\n"); - } - else - { -- slog(LOG_DEBUG, "\n\nUn-Handled recv: %s\n", pConn->recv.data); -+ xprintf("\n\nUn-Handled recv: %s\n", pConn->recv.data); - propogateCSeq(pConn); - } - addToShairBuffer(&(pConn->resp), "\r\n"); -@@ -1056,7 +1082,7 @@ - char tName[100 + HWID_SIZE + 3]; - if(strlen(pServerName) > tMaxServerName) - { -- slog(LOG_INFO,"Hey dog, we see you like long server names, " -+ xprintf("Hey dog, we see you like long server names, " - "so we put a strncat in our command so we don't buffer overflow, while you listen to your flow.\n" - "We just used the first %d characters. Pick something shorter if you want\n", tMaxServerName); - } -@@ -1067,7 +1093,7 @@ - strcat(tName, pHWStr); - strcat(tName, "@"); - strncat(tName, pServerName, tMaxServerName); -- slog(AVAHI_LOG_LEVEL, "Avahi/DNS-SD Name: %s\n", tName); -+ xprintf("Avahi/DNS-SD Name: %s\n", tName); - - execlp("avahi-publish-service", "avahi-publish-service", tName, - "_raop._tcp", tPort, "tp=UDP","sm=false","sv=false","ek=1","et=0,1", -@@ -1079,12 +1105,12 @@ - perror("error"); - } - -- slog(LOG_INFO, "Bad error... couldn't find or failed to run: avahi-publish-service OR dns-sd\n"); -- exit(1); -+ xprintf("Bad error... couldn't find or failed to run: avahi-publish-service OR dns-sd\n"); -+ //exit(1); - } - else - { -- slog(LOG_DEBUG_VV, "Avahi/DNS-SD started on PID: %d\n", tPid); -+ xprintf("Avahi/DNS-SD started on PID: %d\n", tPid); - } - return tPid; - } -@@ -1092,7 +1118,7 @@ - - void printBufferInfo(struct shairbuffer *pBuf, int pLevel) - { -- slog(pLevel, "Buffer: [%s] size: %d maxchars:%d\n", pBuf->data, pBuf->current, pBuf->maxsize/sizeof(char)); -+ xprintf("Buffer: [%s] size: %d maxchars:%d\n", pBuf->data, pBuf->current, pBuf->maxsize/sizeof(char)); - } - - int getAvailChars(struct shairbuffer *pBuf) -@@ -1173,7 +1199,8 @@ - { - va_list argp; - va_start(argp, pFormat); -- vprintf(pFormat, argp); -+ xprintf(pFormat, argp); -+ //vprintf(pFormat, argp); - va_end(argp); - } - //#endif -@@ -1227,9 +1254,9 @@ - { - if(pBuf->data != NULL) - { -- slog(LOG_DEBUG_VV, "Hrm, buffer wasn't cleaned up....trying to free\n"); -+ xprintf("Hrm, buffer wasn't cleaned up....trying to free\n"); - free(pBuf->data); -- slog(LOG_DEBUG_VV, "Free didn't seem to seg fault....huzzah\n"); -+ xprintf("Free didn't seem to seg fault....huzzah\n"); - } - pBuf->current = 0; - pBuf->marker = 0; -@@ -1287,6 +1314,6 @@ - BIO *tBio = BIO_new_mem_buf(AIRPORT_PRIVATE_KEY, -1); - RSA *rsa = PEM_read_bio_RSAPrivateKey(tBio, NULL, NULL, NULL); //NULL, NULL, NULL); - BIO_free(tBio); -- slog(RSA_LOG_LEVEL, "RSA Key: %d\n", RSA_check_key(rsa)); -+ xprintf("RSA Key: %d\n", RSA_check_key(rsa)); - return rsa; - } ---- src/shairport.h 2011-10-01 17:45:08.000000000 +0200 -+++ src/shairport.h 2011-10-01 17:19:43.000000000 +0200 -@@ -59,11 +59,17 @@ - { - #endif /* __cplusplus */ - -+struct printfPtr -+{ -+ int (*extprintf)(const char* msg, size_t msgSize); -+}; -+ - int shairport_main(int argc, char **argv); - void shairport_exit(void); - int shairport_loop(void); - int shairport_is_running(void); - void shairport_set_ao(struct AudioOutput *ao); -+void shairport_set_printf(struct printfPtr *funcPtr); - - #ifdef __cplusplus - } ---- src/socketlib.c 2011-09-23 22:00:48.000000000 +0200 -+++ src/socketlib.c 2011-10-01 17:42:39.000000000 +0200 -@@ -82,7 +82,7 @@ - delay(RETRY_DELAY, &tRes); - } - } -- printf("%d Retry attempts exceeded\n", RETRY_COUNT); -+ xprintf("%d Retry attempts exceeded\n", RETRY_COUNT); - return ERROR; - } - -@@ -102,7 +102,7 @@ - tError = getaddrinfo(pHostname, pService, &hints, pAddrInfo); - if(tError != 0) - { -- printf("Error getting address info\n"); -+ xprintf("Error getting address info\n"); - } - return tError; - } -@@ -200,7 +200,7 @@ - else - { - // Invalid encoded data, no other cases are possible. -- printf("Unrecoverable error....base64 values are incorrectly encoded\n"); -+ xprintf("Unrecoverable error....base64 values are incorrectly encoded\n"); - return pSize; - } - } -@@ -226,7 +226,7 @@ - memset(input, 0, length); - memcpy(input, pInput, pLength); - memset(input+pLength, '=', length-pLength); -- printf("Fixed value: [%.*s]\n", length, input); -+ xprintf("Fixed value: [%.*s]\n", length, input); - } - char *buffer = (char *)malloc(length); - memset(buffer, 0, length); diff --git a/tools/darwin/depends/libshairport/007_fix_syslog_defines.patch b/tools/darwin/depends/libshairport/007_fix_syslog_defines.patch deleted file mode 100644 index 4d9b834f9c5de..0000000000000 --- a/tools/darwin/depends/libshairport/007_fix_syslog_defines.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- src/shairport.h 2011-10-01 04:09:16.000000000 +0200 -+++ src/shairport.h 2011-11-07 18:05:05.000000000 +0100 -@@ -16,10 +16,17 @@ - - #define HWID_SIZE 6 - #define SHAIRPORT_LOG 1 --#define LOG_INFO 1 --#define LOG_DEBUG 5 --#define LOG_DEBUG_V 6 --#define LOG_DEBUG_VV 7 -+ -+#ifndef LOG_INFO -+#define LOG_INFO 5 -+#endif -+ -+#ifndef LOG_DEBUG -+#define LOG_DEBUG 6 -+#endif -+ -+#define LOG_DEBUG_V 7 -+#define LOG_DEBUG_VV 8 - - struct shairbuffer - { diff --git a/tools/darwin/depends/libshairport/008-add-missing-libs.patch b/tools/darwin/depends/libshairport/008-add-missing-libs.patch deleted file mode 100644 index 6efd30222a054..0000000000000 --- a/tools/darwin/depends/libshairport/008-add-missing-libs.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- configure.in-org 2011-11-08 11:53:42.802419355 -0500 -+++ configure.in 2011-11-08 11:55:38.082419413 -0500 -@@ -11,8 +11,9 @@ AC_PROG_LIBTOOL - - # Checks for libraries. - #AC_CHECK_LIB([c], [main]) --#AC_CHECK_LIB([m], [main]) -+AC_CHECK_LIB([m], [main]) - AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library)) -+AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library)) - - OUTPUT_FILES="Makefile" -@@ -21,4 +22,4 @@ LIBDIR=$PREFIX - - AC_CONFIG_FILES([${OUTPUT_FILES}]) - AC_OUTPUT(Makefile src/Makefile) --AC_OUTPUT -\ No newline at end of file -+AC_OUTPUT - diff --git a/tools/darwin/depends/libshairport/009_fix_ipv6.patch b/tools/darwin/depends/libshairport/009_fix_ipv6.patch deleted file mode 100644 index 01ff026d071c9..0000000000000 --- a/tools/darwin/depends/libshairport/009_fix_ipv6.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/socketlib.c 2012-01-04 20:41:05.000000000 +0100 -+++ src/socketlib.c 2012-01-04 20:35:53.000000000 +0100 -@@ -48,7 +48,7 @@ - if((tSock==-1) && (pAddrInfo->ai_family == AF_INET6) && (errno == EAFNOSUPPORT)) - { - //Fallback to ipv4 -- perror("Failed to create ipv6 socket. Trying ipv4"); -+ xprintf("Failed to create ipv6 socket. Trying ipv4"); - pAddrInfo->ai_family = AF_INET; - tSock = socket(pAddrInfo->ai_family, pAddrInfo->ai_socktype, 0); - } -@@ -158,8 +158,8 @@ - sprintf(tService, "%d", pPort); // copies port to string - int tFamily = AF_INET; - #ifdef AF_INET6 -- //printf("Listening on IPv6 Socket\n"); -- //tFamily = AF_INET6; -+ xprintf("Listening on IPv6 Socket\n"); -+ tFamily = AF_INET6; - #else - //printf("Listening on IPv4 Socket"); - #endif diff --git a/tools/darwin/depends/libshairport/010_handle_metadata.patch b/tools/darwin/depends/libshairport/010_handle_metadata.patch deleted file mode 100644 index a48782ed08c53..0000000000000 --- a/tools/darwin/depends/libshairport/010_handle_metadata.patch +++ /dev/null @@ -1,154 +0,0 @@ -diff -ruP src/ao.h libshairport.new/src/ao.h ---- src/ao.h 2012-05-07 22:26:53.000000000 +0200 -+++ src/ao.h 2012-05-08 18:46:42.000000000 +0200 -@@ -152,5 +152,7 @@ - /* -- Device Setup/Playback/Teardown -- */ - int (*ao_append_option)(ao_option **, const char *, const char *); - void (*ao_free_options)(ao_option *); -- char* (*ao_get_option)(ao_option *, const char* ); -+ char* (*ao_get_option)(ao_option *, const char* ); -+ void (*ao_set_metadata)(const char *buffer, unsigned int size); -+ void (*ao_set_metadata_coverart)(const char *buffer, unsigned int size); - }; -diff -ruP src/hairtunes.c src/hairtunes.c ---- src/hairtunes.c 2012-05-07 22:26:53.000000000 +0200 -+++ src/hairtunes.c 2012-05-08 18:45:51.000000000 +0200 -@@ -267,6 +267,16 @@ - fix_volume = 65536.0 * volume; - } - -+void hairtunes_set_metadata(const char *buffer, unsigned int size) -+{ -+ g_ao.ao_set_metadata(buffer, size); -+} -+ -+void hairtunes_set_metadata_coverart(const char *buffer, unsigned int size) -+{ -+ g_ao.ao_set_metadata_coverart(buffer, size); -+} -+ - void hairtunes_flush(void) - { - pthread_mutex_lock(&ab_mutex); -diff -ruP src/hairtunes.h src/hairtunes.h ---- src/hairtunes.h 2011-08-21 00:06:21.000000000 +0200 -+++ src/hairtunes.h 2012-05-08 18:46:00.000000000 +0200 -@@ -4,6 +4,8 @@ - int hairtunes_init(char *pAeskey, char *pAesiv, char *pFmtpstr, int pCtrlPort, int pTimingPort, - int pDataPort, char *pRtpHost, char*pPipeName, char *pLibaoDriver, char *pLibaoDeviceName, char *pLibaoDeviceId); - void hairtunes_setvolume(float vol); -+void hairtunes_set_metadata(const char *buffer, unsigned int size); -+void hairtunes_set_metadata_coverart(const char *buffer, unsigned int size); - void hairtunes_flush(void); - void hairtunes_cleanup(void); - -diff -ruP src/shairport.c src/shairport.c ---- src/shairport.c 2012-05-07 22:26:53.000000000 +0200 -+++ src/shairport.c 2012-05-08 18:45:30.000000000 +0200 -@@ -513,7 +513,8 @@ - while(1 == tMoreDataNeeded) - { - tError = readDataFromClient(pSock, &(tConn.recv)); -- if(!tError && strlen(tConn.recv.data) > 0) -+ //if(!tError && strlen(tConn.recv.data) > 0) -+ if(!tError && tConn.recv.current > 0) - { - xprintf("Finished Reading some data from client\n"); - // parse client request -@@ -632,7 +633,7 @@ - } - - tSize = (int) (tShortest - tFound); -- xprintf("Found %.*s length: %d\n", tSize, tFound, tSize); -+ xprintf("Found %s length: %d\n",tFound, tSize); - if(pReturnSize != NULL) - { - *pReturnSize = tSize; -@@ -744,7 +745,7 @@ - if(tContent != NULL) - { - int tContentSize = atoi(tContent); -- if(pConn->recv.marker == 0 || strlen(pConn->recv.data+pConn->recv.marker) != tContentSize) -+ if(pConn->recv.marker == 0 || pConn->recv.current-pConn->recv.marker != tContentSize) - { - if(isLogEnabledFor(HEADER_LOG_LEVEL)) - { -@@ -752,7 +753,7 @@ - if(pConn->recv.marker != 0) - { - xprintf("ContentPtr has %d, but needs %d\n", -- strlen(pConn->recv.data+pConn->recv.marker), tContentSize); -+ (pConn->recv.current-pConn->recv.marker), tContentSize); - } - } - // check if value in tContent > 2nd read from client. -@@ -989,15 +990,67 @@ - { - propogateCSeq(pConn); - int tSize = 0; -+ char *buffer = NULL; -+ char *contentType = getFromHeader(pConn->recv.data, "Content-Type", &tSize); -+ char *tContent = getFromHeader(pConn->recv.data, "Content-Length", NULL); -+ int iContentSize = 0; -+ int isJpg = 0; -+ -+ if(tContent != NULL) -+ { -+ iContentSize = atoi(tContent); -+ } -+ -+ if( tSize > 1 && -+ (strncmp(contentType, "application/x-dmap-tagged", tSize) == 0) || -+ (strncmp(contentType, "image/jpeg", tSize) == 0) ) -+ { -+ if( (pConn->recv.current - pConn->recv.marker) == iContentSize && pConn->recv.marker != 0) -+ { -+ if(strncmp(contentType, "image/jpeg", tSize) == 0) -+ { -+ isJpg = 1; -+ } -+ buffer = (char *)malloc(iContentSize * sizeof(char)); -+ memcpy(buffer, pConn->recv.data + pConn->recv.marker, iContentSize); -+ } -+ else -+ { -+ iContentSize = 0; -+ } -+ } -+ else -+ { -+ iContentSize = 0; -+ } - char *tVol = getFromHeader(pConn->recv.data, "volume", &tSize); -- xprintf("About to write [vol: %.*s] data to hairtunes\n", tSize, tVol); -+ if( tVol) -+ { -+ xprintf("About to write [vol: %.*s] data to hairtunes\n", tSize, tVol); -+ } - // TBD VOLUME - #ifndef XBMC - write(pConn->hairtunes->in[1], "vol: ", 5); - write(pConn->hairtunes->in[1], tVol, tSize); - write(pConn->hairtunes->in[1], "\n", 1); - #else -- hairtunes_setvolume(atof(tVol)); -+ if(tVol) -+ { -+ hairtunes_setvolume(atof(tVol)); -+ } -+ -+ if(iContentSize) -+ { -+ if(isJpg) -+ { -+ hairtunes_set_metadata_coverart(buffer, iContentSize); -+ } -+ else -+ { -+ hairtunes_set_metadata(buffer, iContentSize); -+ } -+ free(buffer); -+ } - #endif - xprintf("Finished writing data write data to hairtunes\n"); - } diff --git a/tools/darwin/depends/libshairport/011_fix_ipv4_fallback.patch b/tools/darwin/depends/libshairport/011_fix_ipv4_fallback.patch deleted file mode 100644 index 2c813f224e850..0000000000000 --- a/tools/darwin/depends/libshairport/011_fix_ipv4_fallback.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/socketlib.c 2012-07-14 22:49:30.000000000 +0200 -+++ src/socketlib.c 2012-10-08 21:55:51.000000000 +0200 -@@ -118,6 +118,7 @@ - - int tEnable = 1; - setsockopt(tSock, SOL_SOCKET, SO_REUSEADDR, &tEnable, sizeof (tEnable)); -+ server_addr->ai_addr->sa_family = server_addr->ai_family; // ensure that server_addr has same famliy than the socket - if (bind(tSock, server_addr->ai_addr, server_addr->ai_addrlen) < 0) - { - close(tSock); diff --git a/tools/darwin/depends/libshairport/Makefile b/tools/darwin/depends/libshairport/Makefile deleted file mode 100644 index 7c833161d2f22..0000000000000 --- a/tools/darwin/depends/libshairport/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=libshairport -VERSION=1.2.0.20310_lib -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); patch -p0 < ../001_add_ao.patch - cd $(SOURCE); patch -p0 < ../002_fix_install_header.patch - cd $(SOURCE); patch -p0 < ../003_fix_deadlock.patch - cd $(SOURCE); patch -p0 < ../004_fix_bad_access.patch - cd $(SOURCE); patch -p0 < ../005_fix_shutdown.patch - cd $(SOURCE); patch -p0 < ../006_no_printf.patch - cd $(SOURCE); patch -p0 < ../007_fix_syslog_defines.patch - cd $(SOURCE); patch -p0 < ../008-add-missing-libs.patch - cd $(SOURCE); patch -p0 < ../009_fix_ipv6.patch - cd $(SOURCE); patch -p0 < ../010_handle_metadata.patch - cd $(SOURCE); patch -p0 < ../011_fix_ipv4_fallback.patch - cd $(SOURCE); autoreconf -vif - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - rm -rf $(SOURCE) .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/libssh/Makefile b/tools/darwin/depends/libssh/Makefile deleted file mode 100644 index e6a9ff4b63655..0000000000000 --- a/tools/darwin/depends/libssh/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=libssh -VERSION=0.5.0 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - -LIBDYLIB=$(SOURCE)/build/src/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); rm -rf build; mkdir -p build - cd $(SOURCE); patch -p0 < ../removelegacy.patch - cd $(SOURCE)/build; CC=$(CC) CXX=$(CXX) cmake \ - -DCMAKE_C_FLAGS:STRING="$(CPPFLAGS) $(CFLAGS)" \ - -DCMAKE_CXX_FLAGS:STRING="$(CPPFLAGS) $(CXXFLAGS)" \ - -DCMAKE_INCLUDE_PATH=$(PREFIX)/include \ - -DCMAKE_LIBRARY_PATH=$(PREFIX)/lib \ - -DCMAKE_INSTALL_NAME_DIR=$(PREFIX)/lib \ - -DCMAKE_INSTALL_PREFIX=$(PREFIX) .. - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE)/build - -.installed: - make -C $(SOURCE)/build install - touch $@ - -clean: - rm -rf $(SOURCE) .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libssh/removelegacy.patch b/tools/darwin/depends/libssh/removelegacy.patch deleted file mode 100644 index 69683cb8693af..0000000000000 --- a/tools/darwin/depends/libssh/removelegacy.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/CMakeLists.txt 2011-06-16 19:04:44.000000000 +0200 -+++ src/CMakeLists.txt 2011-06-16 19:03:40.000000000 +0200 -@@ -94,7 +94,6 @@ - keyfiles.c - keys.c - known_hosts.c -- legacy.c - libcrypto.c - libgcrypt.c - log.c diff --git a/tools/darwin/depends/libssh2/Makefile b/tools/darwin/depends/libssh2/Makefile deleted file mode 100644 index 059237eb77b81..0000000000000 --- a/tools/darwin/depends/libssh2/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libssh2 -VERSION=1.2.7 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --with-openssl --without-libgcrypt - -SHELL := /bin/bash -RM := rm -rf - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/libtiff-native/Makefile b/tools/darwin/depends/libtiff-native/Makefile deleted file mode 100644 index 94ae0b1416c58..0000000000000 --- a/tools/darwin/depends/libtiff-native/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../Makefile.buildtools -export CFLAGS=-I$(TOOLCHAIN)/include -export LDFLAGS=-L$(TOOLCHAIN)/lib -export CPPFLAGS=-I$(TOOLCHAIN)/include -export CXXFLAGS=-I$(TOOLCHAIN)/include - -# lib name, version -LIBNAME=tiff -VERSION=3.8.2 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(TOOLCHAIN) - -LIBDYLIB=$(SOURCE)/libtiff/.libs/lib$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libtool/Makefile b/tools/darwin/depends/libtool/Makefile deleted file mode 100644 index de98cb4356536..0000000000000 --- a/tools/darwin/depends/libtool/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.buildtools - -# lib name, version -APPNAME=libtool -VERSION=2.2.6 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE)a.tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) \ - --program-prefix=g - -APP=$(SOURCE)/bin/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/glibtool - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/libusb/Makefile b/tools/darwin/depends/libusb/Makefile deleted file mode 100644 index 294a7aafe40f7..0000000000000 --- a/tools/darwin/depends/libusb/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libusb -VERSION=0.1.12 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - rm -rf $(SOURCE) .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libvorbis/Makefile b/tools/darwin/depends/libvorbis/Makefile deleted file mode 100644 index ac2b66c988e3a..0000000000000 --- a/tools/darwin/depends/libvorbis/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=libvorbis -VERSION=1.3.2 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz -PACKAGE_NAME=libvorbis - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - PACKAGE_NAME=$(PACKAGE_NAME) \ - --disable-oggtest --disable-docs --disable-examples - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - sed -ie "s|DDARWIN -fno-common -force_cpusubtype_ALL|DARWIN_NO_CARBON -fno-common -noforce_cpusubtype_ALL|" "$(SOURCE)/configure" - sed -ie "s|SUBDIRS = m4 include vq lib examples test doc|SUBDIRS = m4 include lib|" "$(SOURCE)/Makefile.in" - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/libyajl/Makefile b/tools/darwin/depends/libyajl/Makefile deleted file mode 100644 index 008f9c36271e7..0000000000000 --- a/tools/darwin/depends/libyajl/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=lloyd-yajl -VERSION=1.0.12 -SOURCE=lloyd-yajl-17b1790 -ARCHIVE=lloyd-yajl-1.0.12-0-g17b1790.tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/build/yajl-1.0.12/lib/libyajl.dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - sed -ie "s|ADD_CUSTOM_TARGET|#ADD_CUSTOM_TARGET|g" "$(SOURCE)/CMakeLists.txt" - sed -ie "s|./run_tests.sh|#./run_tests.sh|g" "$(SOURCE)/CMakeLists.txt" - sed -ie "s|WORKING_DIRECTORY|#WORKING_DIRECTORY|g" "$(SOURCE)/CMakeLists.txt" - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/m4/Makefile b/tools/darwin/depends/m4/Makefile deleted file mode 100644 index 5e61734ba75d9..0000000000000 --- a/tools/darwin/depends/m4/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include ../Makefile.buildtools - -# lib name, version -APPNAME=m4 -VERSION=1.4.9 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) - -APP=$(SOURCE)/bin/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/mysqlclient/01-mysqlclient-cross-compile.patch b/tools/darwin/depends/mysqlclient/01-mysqlclient-cross-compile.patch deleted file mode 100644 index 12b22b7e0d92f..0000000000000 --- a/tools/darwin/depends/mysqlclient/01-mysqlclient-cross-compile.patch +++ /dev/null @@ -1,170 +0,0 @@ -diff -ruN mysql-5.1.55.org/configure.in mysql-5.1.55/configure.in ---- mysql-5.1.55.org/configure.in 2011-01-25 16:04:35.000000000 +0100 -+++ mysql-5.1.55/configure.in 2011-05-19 20:14:38.000000000 +0200 -@@ -1571,13 +1571,6 @@ - esac - - --# System characteristics --case $SYSTEM_TYPE in -- *netware*) ;; -- *) --AC_SYS_RESTARTABLE_SYSCALLS -- ;; --esac - - # Build optimized or debug version ? - # First check for gcc and g++ -diff -ruN mysql-5.1.55.org/storage/innodb_plugin/plug.in mysql-5.1.55/storage/innodb_plugin/plug.in ---- mysql-5.1.55.org/storage/innodb_plugin/plug.in 2011-01-25 16:04:35.000000000 +0100 -+++ mysql-5.1.55/storage/innodb_plugin/plug.in 2011-05-19 21:59:28.000000000 +0200 -@@ -56,149 +56,6 @@ - esac - AC_SUBST(INNODB_DYNAMIC_CFLAGS) - -- AC_MSG_CHECKING(whether GCC atomic builtins are available) -- # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not -- AC_TRY_RUN( -- [ -- int main() -- { -- long x; -- long y; -- long res; -- char c; -- -- x = 10; -- y = 123; -- res = __sync_bool_compare_and_swap(&x, x, y); -- if (!res || x != y) { -- return(1); -- } -- -- x = 10; -- y = 123; -- res = __sync_bool_compare_and_swap(&x, x + 1, y); -- if (res || x != 10) { -- return(1); -- } -- -- x = 10; -- y = 123; -- res = __sync_add_and_fetch(&x, y); -- if (res != 123 + 10 || x != 123 + 10) { -- return(1); -- } -- -- c = 10; -- res = __sync_lock_test_and_set(&c, 123); -- if (res != 10 || c != 123) { -- return(1); -- } -- -- return(0); -- } -- ], -- [ -- AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1], -- [GCC atomic builtins are available]) -- AC_MSG_RESULT(yes) -- ], -- [ -- AC_MSG_RESULT(no) -- ] -- ) -- -- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins) -- # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not -- AC_TRY_RUN( -- [ -- #include -- #include -- -- int main(int argc, char** argv) { -- pthread_t x1; -- pthread_t x2; -- pthread_t x3; -- -- memset(&x1, 0x0, sizeof(x1)); -- memset(&x2, 0x0, sizeof(x2)); -- memset(&x3, 0x0, sizeof(x3)); -- -- __sync_bool_compare_and_swap(&x1, x2, x3); -- -- return(0); -- } -- ], -- [ -- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1], -- [pthread_t can be used by GCC atomic builtins]) -- AC_MSG_RESULT(yes) -- ], -- [ -- AC_MSG_RESULT(no) -- ] -- ) -- -- AC_MSG_CHECKING(whether Solaris libc atomic functions are available) -- # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following -- # functions are present. -- AC_CHECK_FUNCS(atomic_add_long_nv \ -- atomic_cas_32 \ -- atomic_cas_64 \ -- atomic_cas_ulong \ -- atomic_swap_uchar) -- -- if test "${ac_cv_func_atomic_add_long_nv}" = "yes" -a \ -- "${ac_cv_func_atomic_cas_32}" = "yes" -a \ -- "${ac_cv_func_atomic_cas_64}" = "yes" -a \ -- "${ac_cv_func_atomic_cas_ulong}" = "yes" -a \ -- "${ac_cv_func_atomic_swap_uchar}" = "yes" ; then -- -- AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1], -- [Define to 1 if Solaris libc atomic functions are available] -- ) -- fi -- -- AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions) -- # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not -- AC_TRY_RUN( -- [ -- #include -- #include -- -- int main(int argc, char** argv) { -- pthread_t x1; -- pthread_t x2; -- pthread_t x3; -- -- memset(&x1, 0x0, sizeof(x1)); -- memset(&x2, 0x0, sizeof(x2)); -- memset(&x3, 0x0, sizeof(x3)); -- -- if (sizeof(pthread_t) == 4) { -- -- atomic_cas_32(&x1, x2, x3); -- -- } else if (sizeof(pthread_t) == 8) { -- -- atomic_cas_64(&x1, x2, x3); -- -- } else { -- -- return(1); -- } -- -- return(0); -- } -- ], -- [ -- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1], -- [pthread_t can be used by solaris atomics]) -- AC_MSG_RESULT(yes) -- ], -- [ -- AC_MSG_RESULT(no) -- ] -- ) - - # this is needed to know which one of atomic_cas_32() or atomic_cas_64() - # to use in the source diff --git a/tools/darwin/depends/mysqlclient/02-mysqlclient-ios.patch b/tools/darwin/depends/mysqlclient/02-mysqlclient-ios.patch deleted file mode 100644 index 3945b48f554a3..0000000000000 --- a/tools/darwin/depends/mysqlclient/02-mysqlclient-ios.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -ruN mysql-5.1.55.org/include/my_global.h mysql-5.1.55/include/my_global.h ---- mysql-5.1.55.org/include/my_global.h 2011-01-25 16:04:37.000000000 +0100 -+++ mysql-5.1.55/include/my_global.h 2011-05-19 22:12:13.000000000 +0200 -@@ -132,7 +132,7 @@ - # define SIZEOF_INT 4 - # define SIZEOF_LONG_LONG 8 - # define SIZEOF_OFF_T 8 --# if defined(__i386__) || defined(__ppc__) -+# if defined(__i386__) || defined(__ppc__) || defined(__arm__) - # define SIZEOF_CHARP 4 - # define SIZEOF_LONG 4 - # elif defined(__x86_64__) || defined(__ppc64__) -diff -ruN mysql-5.1.55.org/include/my_net.h mysql-5.1.55/include/my_net.h ---- mysql-5.1.55.org/include/my_net.h 2011-01-25 16:04:48.000000000 +0100 -+++ mysql-5.1.55/include/my_net.h 2011-05-19 22:13:39.000000000 +0200 -@@ -44,9 +44,9 @@ - #endif - - #if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) && !defined(__NETWARE__) --#include -+/* #include */ - #include --#include -+/* #include */ - #if !defined(alpha_linux_port) - #include - #endif diff --git a/tools/darwin/depends/mysqlclient/Makefile b/tools/darwin/depends/mysqlclient/Makefile deleted file mode 100644 index dee71afaeb67c..0000000000000 --- a/tools/darwin/depends/mysqlclient/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -include ../Makefile.include - -LIBNAME=mysql -VERSION=5.1.55 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --enable-thread-safe-client -with-extra-charsets=complex \ - --without-readline --without-server --without-bench --without-docs --without-man - -LIBDYLIB=$(SOURCE)/libmysql/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - if test "$(DARWIN)" = "ios"; then \ - cd $(SOURCE); patch -p1 < ../01-mysqlclient-cross-compile.patch; \ - autoreconf -vif; \ - fi - cd $(SOURCE); $(CONFIGURE) - if test "$(DARWIN)" = "ios"; then \ - sed -i "" -e "s|#define HAVE_CURSES_H 1|/* & */|" \ - -e "s|#define HAVE_FDATASYNC 1|/* & */|" \ - -e "s|#define HAVE_TERMCAP_H 1|/* & */|" \ - -e "s|#define HAVE_TERM_H 1|/* & */|" \ - $(SOURCE)/include/config.h; \ - cd $(SOURCE); patch -p1 < ../02-mysqlclient-ios.patch; \ - fi - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE)/scripts install - make -C $(SOURCE)/include install - make -C $(SOURCE)/libmysql install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/openssl/Makefile b/tools/darwin/depends/openssl/Makefile deleted file mode 100644 index a7c72dcb19492..0000000000000 --- a/tools/darwin/depends/openssl/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=openssl -VERSION=0.9.8r -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -ifeq ($(DARWIN), ios) - # No darwin-arm-cc so use darwin-i386-cc and patch files after configure - CONFIGURE=./Configure darwin-i386-cc zlib no-asm no-krb5 shared --openssldir=$(PREFIX) -else - ifeq ($(ARCH), x86_64) - CONFIGURE=./Configure darwin64-$(ARCH)-cc zlib no-asm no-krb5 shared --openssldir=$(PREFIX) - else - CONFIGURE=./Configure darwin-$(ARCH)-cc zlib no-asm no-krb5 shared --openssldir=$(PREFIX) - endif -endif - -LIBDYLIB=$(SOURCE)/src/.libs/lib$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - -rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - if test "$(DARWIN)" = "osx"; then \ - sed -ie "s|CC= /usr/bin/gcc-4.2|CC= /usr/bin/gcc|" "$(SOURCE)/Makefile"; \ - fi - if test "$(DARWIN)" = "ios"; then \ - sed -ie "s|CFLAG= |CFLAG=-arch armv7 -isysroot ${platform_sdk_path} |" "$(SOURCE)/Makefile"; \ - sed -ie "s|-arch i386|-arch armv7|" "$(SOURCE)/Makefile"; \ - sed -ie "s|static volatile sig_atomic_t intr_signal;|static volatile intr_signal;|" "$(SOURCE)/crypto/ui/ui_openssl.c"; \ - fi - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE) - -.installed: - make -C $(SOURCE) install_sw - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/pcre/Makefile b/tools/darwin/depends/pcre/Makefile deleted file mode 100644 index 8d41d379ee376..0000000000000 --- a/tools/darwin/depends/pcre/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=pcre -VERSION=7.9 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --disable-stack-for-recursion - -LIBDYLIB=$(SOURCE)/.libs/lib$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/pkg-config/Makefile b/tools/darwin/depends/pkg-config/Makefile deleted file mode 100644 index 47fee3e6efe09..0000000000000 --- a/tools/darwin/depends/pkg-config/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include ../Makefile.include - -# lib name, version -APPNAME=pkg-config -VERSION=0.23 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) --enable-indirect-deps --with-pc-path=$(PREFIX)/lib/pkgconfig:$(PREFIX)/share/pkgconfig - -APP=$(SOURCE)/bin/pkg-config -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/python26/Makefile.ios b/tools/darwin/depends/python26/Makefile.ios deleted file mode 100644 index d891f3ab200a1..0000000000000 --- a/tools/darwin/depends/python26/Makefile.ios +++ /dev/null @@ -1,63 +0,0 @@ -# credits to: -# http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html -# http://github.com/cobbal/python-for-iphone - -include ../Makefile.include - -# lib name, version -LIBNAME=Python -VERSION=2.6.5 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.bz2 - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) --enable-shared \ - --disable-toolbox-glue --disable-framework \ - --with-system-ffi - -CONFIGURE_NATIVE= CFLAGS="" CXXFLAGS="" LDFLAGS="" CPPFLAGS="" \ - CPP="gcc -E" \ - CC="gcc" \ - CXX="g++" \ - LD="ld" \ - ./configure --prefix=$(TOOLCHAIN) --enable-shared --disable-toolbox-glue --disable-framework - -LIBDYLIB=$(SOURCE)/libpython2.6.dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(LIBDYLIB): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - # http://bugs.python.org/issue6869 - cd $(SOURCE); patch -p1 < ../Python-2.6-ctypes.patch - # http://bugs.python.org/issue1602133 - cd $(SOURCE); patch -p1 < ../python-osx-environ-fix.patch - cd $(SOURCE); $(CONFIGURE_NATIVE) - cd $(SOURCE); make python.exe Parser/pgen - cd $(SOURCE); mv python.exe hostpython - cd $(SOURCE); mv Parser/pgen Parser/hostpgen - cd $(SOURCE); mv libpython2.6.a hostlibpython2.6.a - cd $(SOURCE); make install HOSTPYTHON=./hostpython - cd $(SOURCE); make distclean - cd $(SOURCE); patch -p1 <../Python-2.6.5-xcompile.patch - sed -ie "s#/usr/include/ffi#$(PREFIX)/include/ffi#" $(SOURCE)/setup.py - cd $(SOURCE); $(CONFIGURE) - cd $(SOURCE); make -j $(MAKE_JOBS) HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen CROSS_COMPILE_TARGET=yes - -.installed: - cd $(SOURCE); make install HOSTPYTHON=./hostpython CROSS_COMPILE_TARGET=yes - find $(PREFIX)/lib/python2.6 -type f -name *.pyc -exec rm -f {} \; - find $(PREFIX)/lib/python2.6 -type f -name *.pyo -exec rm -f {} \; - touch $@ - -clean: - rm -rf $(SOURCE) .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/python26/Makefile.osx b/tools/darwin/depends/python26/Makefile.osx deleted file mode 100644 index 33bfcd311c409..0000000000000 --- a/tools/darwin/depends/python26/Makefile.osx +++ /dev/null @@ -1,60 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=Python -VERSION=2.6.5 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.bz2 - -# configuration settings -export OPT=$(CFLAGS) -CONFIGURE=./configure --prefix=$(PREFIX) --enable-shared \ - --disable-toolbox-glue --disable-framework --enable-unicode=ucs4 \ - --with-system-ffi - -CONFIGURE_NATIVE= CFLAGS="" CXXFLAGS="" LDFLAGS="" CPPFLAGS="" \ - CPP="gcc -E" \ - CC="gcc" \ - CXX="g++" \ - LD="ld" \ - ./configure --prefix=$(TOOLCHAIN) --enable-shared --disable-toolbox-glue --disable-framework - -LIBDYLIB=$(SOURCE)/libpython2.6.dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(LIBDYLIB): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - # http://bugs.python.org/issue6869 - cd $(SOURCE); patch -p1 < ../Python-2.6-ctypes.patch - # http://bugs.python.org/issue1602133 - cd $(SOURCE); patch -p1 < ../python-osx-environ-fix.patch - cd $(SOURCE); $(CONFIGURE_NATIVE) - cd $(SOURCE); make -j $(MAKE_JOBS) - cd $(SOURCE); make install - cd $(SOURCE); make distclean - sed -ie "s#/usr/include/ffi#$(PREFIX)/include/ffi#" $(SOURCE)/setup.py - cd $(SOURCE); $(CONFIGURE) - # python2.6 has an issue detecting and using the same version of openssl in configure and setup.py - # this forces python2.6 hashlib to be compatible with osx 10.4 boxes. - sed -ie "s|openssl_ver >= 0x00907000)|openssl_ver >= 0x00907000 and False)|" "$(SOURCE)/setup.py" - sed -ie "s|(openssl_ver < 0x00908000)|(True or openssl_ver < 0x00908000)|" "$(SOURCE)/setup.py" - cd $(SOURCE); make -j $(MAKE_JOBS) - -.installed: - cd $(SOURCE); make install - find $(PREFIX)/lib/python2.6 -type f -name *.pyc -exec rm -f {} \; - find $(PREFIX)/lib/python2.6 -type f -name *.pyo -exec rm -f {} \; - touch $@ - -clean: - rm -rf $(SOURCE) .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/python26/Python-2.6-ctypes.patch b/tools/darwin/depends/python26/Python-2.6-ctypes.patch deleted file mode 100644 index 647dca800b67b..0000000000000 --- a/tools/darwin/depends/python26/Python-2.6-ctypes.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- a/Modules/_ctypes/_ctypes.c (revision 74955) -+++ b/Modules/_ctypes/_ctypes.c (working copy) -@@ -5521,36 +5521,42 @@ - Struct_Type.tp_base = &CData_Type; - if (PyType_Ready(&Struct_Type) < 0) - return; -+ Py_INCREF(&Struct_Type); - PyModule_AddObject(m, "Structure", (PyObject *)&Struct_Type); - - Py_TYPE(&Union_Type) = &UnionType_Type; - Union_Type.tp_base = &CData_Type; - if (PyType_Ready(&Union_Type) < 0) - return; -+ Py_INCREF(&Union_Type); - PyModule_AddObject(m, "Union", (PyObject *)&Union_Type); - - Py_TYPE(&Pointer_Type) = &PointerType_Type; - Pointer_Type.tp_base = &CData_Type; - if (PyType_Ready(&Pointer_Type) < 0) - return; -+ Py_INCREF(&Pointer_Type); - PyModule_AddObject(m, "_Pointer", (PyObject *)&Pointer_Type); - - Py_TYPE(&Array_Type) = &ArrayType_Type; - Array_Type.tp_base = &CData_Type; - if (PyType_Ready(&Array_Type) < 0) - return; -+ Py_INCREF(&Array_Type); - PyModule_AddObject(m, "Array", (PyObject *)&Array_Type); - - Py_TYPE(&Simple_Type) = &SimpleType_Type; - Simple_Type.tp_base = &CData_Type; - if (PyType_Ready(&Simple_Type) < 0) - return; -+ Py_INCREF(&Simple_Type); - PyModule_AddObject(m, "_SimpleCData", (PyObject *)&Simple_Type); - - Py_TYPE(&CFuncPtr_Type) = &CFuncPtrType_Type; - CFuncPtr_Type.tp_base = &CData_Type; - if (PyType_Ready(&CFuncPtr_Type) < 0) - return; -+ Py_INCREF(&CFuncPtr_Type); - PyModule_AddObject(m, "CFuncPtr", (PyObject *)&CFuncPtr_Type); - - /************************************************* diff --git a/tools/darwin/depends/python26/Python-2.6.5-xcompile.patch b/tools/darwin/depends/python26/Python-2.6.5-xcompile.patch deleted file mode 100644 index aa5fc8a725cf2..0000000000000 --- a/tools/darwin/depends/python26/Python-2.6.5-xcompile.patch +++ /dev/null @@ -1,301 +0,0 @@ -diff -uN Python-2.6.2/configure Python-2.6.2POld/configure ---- Python-2.6.2/configure 2009-03-31 03:56:14.000000000 +1000 - -@@ -24326,14 +24326,14 @@ - - { echo "$as_me:$LINENO: checking for %zd printf() format support" >&5 - echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; } --if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else -- cat >conftest.$ac_ext <<_ACEOF -+#if test "$cross_compiling" = yes; then -+# { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -+#See \`config.log' for more details." >&5 -+#echo "$as_me: error: cannot run test program while cross compiling -+#See \`config.log' for more details." >&2;} -+# { (exit 1); exit 1; }; } -+#else -+cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24411,7 +24411,7 @@ - echo "${ECHO_T}no" >&6; } - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -+#fi - - - -diff -uN Python-2.6.2/configure.in Python-2.6.2POld/configure.in ---- Python-2.6.2/configure.in 2009-03-31 03:56:14.000000000 +1000 -+++ Python-2.6.2POld/configure.in 2009-08-17 12:19:15.000000000 +1000 -@@ -3656,48 +3656,48 @@ - AC_MSG_RESULT(no) - fi - --AC_MSG_CHECKING(for %zd printf() format support) --AC_TRY_RUN([#include --#include --#include -- --#ifdef HAVE_SYS_TYPES_H --#include --#endif -- --#ifdef HAVE_SSIZE_T --typedef ssize_t Py_ssize_t; --#elif SIZEOF_VOID_P == SIZEOF_LONG --typedef long Py_ssize_t; --#else --typedef int Py_ssize_t; --#endif -- --int main() --{ -- char buffer[256]; -- -- if(sprintf(buffer, "%zd", (size_t)123) < 0) -- return 1; -- -- if (strcmp(buffer, "123")) -- return 1; -- -- if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0) -- return 1; -- -- if (strcmp(buffer, "-123")) -- return 1; -- -- return 0; --}], --[AC_MSG_RESULT(yes) -- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], -- AC_MSG_RESULT(no)) -+#AC_MSG_CHECKING(for %zd printf() format support) -+#AC_TRY_RUN([#include -+##include -+##include -+ -+##ifdef HAVE_SYS_TYPES_H -+##include -+##endif -+ -+##ifdef HAVE_SSIZE_T -+#typedef ssize_t Py_ssize_t; -+##elif SIZEOF_VOID_P == SIZEOF_LONG -+#typedef long Py_ssize_t; -+##else -+#typedef int Py_ssize_t; -+##endif -+# -+#int main() -+#{ -+# char buffer[256]; -+# -+# if(sprintf(buffer, "%zd", (size_t)123) < 0) -+# return 1;# -+# -+# if (strcmp(buffer, "123")) -+# return 1; -+# -+# if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0) -+# return 1; -+# -+# if (strcmp(buffer, "-123")) -+# return 1; -+# -+# return 0; -+#}], -+#[AC_MSG_RESULT(yes) -+# AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], -+# AC_MSG_RESULT(no)) - - AC_CHECK_TYPE(socklen_t,, - AC_DEFINE(socklen_t,int, -- Define to `int' if does not define.),[ -+ Define to 'int' if does not define.),[ - #ifdef HAVE_SYS_TYPES_H - #include - #endif -diff -uN Python-2.6.2/Makefile.pre.in Python-2.6.2POld/Makefile.pre.in ---- Python-2.6.2/Makefile.pre.in 2009-02-24 21:07:44.000000000 +1000 -+++ Python-2.6.2POld/Makefile.pre.in 2009-08-17 12:19:15.000000000 +1000 -@@ -175,6 +175,7 @@ - - PYTHON= python$(EXE) - BUILDPYTHON= python$(BUILDEXE) -+HOSTPYTHON= ./$(BUILDPYTHON) - - # The task to run while instrument when building the profile-opt target - PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck -@@ -206,6 +207,8 @@ - # Parser - PGEN= Parser/pgen$(EXE) - -+HOSTPGEN= $(PGEN) -+ - POBJS= \ - Parser/acceler.o \ - Parser/grammar1.o \ -@@ -394,8 +397,8 @@ - # Build the shared modules - sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ - esac - - # Build static library -@@ -517,7 +520,7 @@ - - $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) - -@$(INSTALL) -d Include -- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - - $(PGEN): $(PGENOBJS) - $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) -@@ -886,24 +889,24 @@ - done; \ - done - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ -+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ -+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ -+ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ -+ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" -+ $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" - - # Create the PLATDIR source directory, if one wasn't distributed.. - $(srcdir)/Lib/$(PLATDIR): -@@ -1001,7 +1004,8 @@ - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: -- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ -+ CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILE='$(CROSS_COMPILE)' \ -+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -diff -uN Python-2.6.2/setup.py Python-2.6.2POld/setup.py ---- Python-2.6.2/setup.py 2009-04-01 04:20:48.000000000 +1000 -+++ Python-2.6.2POld/setup.py 2009-08-17 12:19:15.000000000 +1000 -@@ -17,7 +17,7 @@ - from distutils.command.install_lib import install_lib - - # This global variable is used to hold the list of modules to be disabled. --disabled_module_list = [] -+disabled_module_list = ['_curses', '_curses_panel', '_cursesmodule', '_tkinter', 'syslogmodule', 'nismodule'] - - def add_dir_to_list(dirlist, dir): - """Add the directory 'dir' to the list 'dirlist' (at the front) if -@@ -267,33 +267,40 @@ - self.announce('WARNING: skipping import check for Cygwin-based "%s"' - % ext.name) - return -+ if os.environ.get('CROSS_COMPILE_TARGET') == 'yes': -+ return -+ - ext_filename = os.path.join( - self.build_lib, - self.get_ext_filename(self.get_ext_fullname(ext.name))) - try: - imp.load_dynamic(ext.name, ext_filename) - except ImportError, why: -- self.failed.append(ext.name) -- self.announce('*** WARNING: renaming "%s" since importing it' -- ' failed: %s' % (ext.name, why), level=3) -- assert not self.inplace -- basename, tail = os.path.splitext(ext_filename) -- newname = basename + "_failed" + tail -- if os.path.exists(newname): -- os.remove(newname) -- os.rename(ext_filename, newname) -- -- # XXX -- This relies on a Vile HACK in -- # distutils.command.build_ext.build_extension(). The -- # _built_objects attribute is stored there strictly for -- # use here. -- # If there is a failure, _built_objects may not be there, -- # so catch the AttributeError and move on. -- try: -- for filename in self._built_objects: -- os.remove(filename) -- except AttributeError: -- self.announce('unable to remove files (ignored)') -+ if os.environ.get('CROSS_COMPILE_TARGET') != "yes": -+ self.announce('*** WARNING: renaming "%s" since importing it' -+ ' failed: %s' % (ext.name, why), level=3) -+ assert not self.inplace -+ basename, tail = os.path.splitext(ext_filename) -+ newname = basename + "_failed" + tail -+ if os.path.exists(newname): -+ os.remove(newname) -+ os.rename(ext_filename, newname) -+ -+ # XXX -- This relies on a Vile HACK in -+ # distutils.command.build_ext.build_extension(). The -+ # _built_objects attribute is stored there strictly for -+ # use here. -+ # If there is a failure, _built_objects may not be there, -+ # so catch the AttributeError and move on. -+ try: -+ for filename in self._built_objects: -+ os.remove(filename) -+ except AttributeError: -+ self.announce('unable to remove files (ignored)') -+ else: -+ self.announce('WARNING: "%s" failed importing, but we leave it ' -+ 'because we are cross-compiling' % -+ ext.name) - except: - exc_type, why, tb = sys.exc_info() - self.announce('*** WARNING: importing extension "%s" ' -@@ -665,7 +672,7 @@ - - if (ssl_incs is not None and - ssl_libs is not None and -- openssl_ver >= 0x00907000): -+ openssl_ver >= 0x00907000 and False): - # The _hashlib module wraps optimized implementations - # of hash functions from the OpenSSL library. - exts.append( Extension('_hashlib', ['_hashopenssl.c'], -@@ -685,7 +692,7 @@ - depends = ['md5.h']) ) - missing.append('_hashlib') - -- if (openssl_ver < 0x00908000): -+ if (True or openssl_ver < 0x00908000): - # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash - exts.append( Extension('_sha256', ['sha256module.c']) ) - exts.append( Extension('_sha512', ['sha512module.c']) ) - diff --git a/tools/darwin/depends/python26/python-osx-environ-fix.patch b/tools/darwin/depends/python26/python-osx-environ-fix.patch deleted file mode 100644 index b6f6a725e0b50..0000000000000 --- a/tools/darwin/depends/python26/python-osx-environ-fix.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: Modules/posixmodule.c -=================================================================== ---- a/Modules/posixmodule.c (revision 52827) -+++ b/Modules/posixmodule.c (working copy) -@@ -314,7 +314,7 @@ - #endif - - /* Return a dictionary corresponding to the POSIX environment table */ --#ifdef WITH_NEXT_FRAMEWORK -+#ifdef __APPLE__ - /* On Darwin/MacOSX a shared library or framework has no access to - ** environ directly, we must obtain it with _NSGetEnviron(). - */ -@@ -332,7 +332,7 @@ - d = PyDict_New(); - if (d == NULL) - return NULL; --#ifdef WITH_NEXT_FRAMEWORK -+#ifdef __APPLE__ - if (environ == NULL) - environ = *_NSGetEnviron(); - #endif - - - diff --git a/tools/darwin/depends/readline/Makefile b/tools/darwin/depends/readline/Makefile deleted file mode 100644 index abf141c8caef8..0000000000000 --- a/tools/darwin/depends/readline/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=readline -VERSION=6.0 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - -LIBDYLIB=$(SOURCE)/shlib/(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); autoconf - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/samba/Makefile b/tools/darwin/depends/samba/Makefile deleted file mode 100644 index dacf39cf0a86c..0000000000000 --- a/tools/darwin/depends/samba/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=samba -VERSION=3.6.12 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --without-cluster-support --disable-swat --without-ldap \ - --without-pam --without-pam_smbpass --with-fhs - -LIBDYLIB=$(SOURCE)/source3/bin/libsmbclient.dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(LIBDYLIB): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE)/source3; ./autogen.sh - cd $(SOURCE)/source3; $(CONFIGURE) - if test "$(DARWIN)" = "ios"; then \ - cp -f $(platform_xcode_path)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(SDK).sdk/usr/include/crt_externs.h $(PREFIX)/include/; \ - fi - cd $(SOURCE)/source3; make -j 1 bin/libsmbclient.dylib - -.installed: - cp -f $(SOURCE)/source3/include/libsmbclient.h $(PREFIX)/include/ - cp -f $(SOURCE)/source3/bin/libtdb.dylib.1 $(PREFIX)/lib/ - cp -f $(SOURCE)/source3/bin/libtalloc.dylib.2 $(PREFIX)/lib/ - cp -f $(SOURCE)/source3/bin/libsmbclient.dylib.0 $(PREFIX)/lib/ - cd $(PREFIX)/lib; ln -sf libsmbclient.dylib.0 libsmbclient.dylib - install_name_tool -id $(PREFIX)/lib/libtdb.dylib.1 $(PREFIX)/lib/libtdb.dylib.1 - install_name_tool -id $(PREFIX)/lib/libtalloc.dylib.2 $(PREFIX)/lib/libtalloc.dylib.2 - install_name_tool -id $(PREFIX)/lib/libsmbclient.dylib.0 $(PREFIX)/lib/libsmbclient.dylib.0 - install_name_tool -change bin/libtdb.dylib.1 $(PREFIX)/lib/libtdb.dylib.1 \ - $(PREFIX)/lib/libsmbclient.dylib.0 - install_name_tool -change bin/libtalloc.dylib.2 $(PREFIX)/lib/libtalloc.dylib.2 \ - $(PREFIX)/lib/libsmbclient.dylib.0 - touch $@ - -clean: - make -C $(SOURCE)/source3 clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/sed/Makefile b/tools/darwin/depends/sed/Makefile deleted file mode 100644 index d07ea3b59a1b8..0000000000000 --- a/tools/darwin/depends/sed/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include ../Makefile.include - -# lib name, version -APPNAME=sed -VERSION=4.2.1 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) - -APP=$(SOURCE)/bin/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/sqlite3/Makefile b/tools/darwin/depends/sqlite3/Makefile deleted file mode 100644 index fbbcaa70b2fc9..0000000000000 --- a/tools/darwin/depends/sqlite3/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=sqlite -VERSION=3.7.7.1 -SOURCE=sqlite-autoconf-3070701 -ARCHIVE=sqlite-autoconf-3070701.tar.gz -BASE_URL=http://www.sqlite.org - -# configuration settings -export CXXFLAGS+=-DSQLITE_ENABLE_COLUMN_METADATA=1 -export TCLLIBDIR=/dev/null -CONFIGURE=./configure --prefix=$(PREFIX) \ - --enable-threadsafe --disable-tcl \ - --with-readline-inc="-I${PREFIX}/include" \ - --with-readline-lib="-L${PREFIX}/lib -lreadline -lm -lncurses" - -LIBDYLIB=$(SOURCE)/.libs/lib$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/swig/Makefile b/tools/darwin/depends/swig/Makefile deleted file mode 100644 index 88323609c2b45..0000000000000 --- a/tools/darwin/depends/swig/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.include - -# lib name, version -APPNAME=swig -VERSION=2.0.8 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) \ - --without-pcre --without-alllang --without-x - -APP=$(SOURCE)/bin/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) diff --git a/tools/darwin/depends/taglib/Makefile b/tools/darwin/depends/taglib/Makefile deleted file mode 100644 index 709566b97ade9..0000000000000 --- a/tools/darwin/depends/taglib/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -# lib name, version -LIBNAME=taglib -VERSION=1.8 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz - -LIBDYLIB=$(SOURCE)/build/src/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); rm -rf build; mkdir -p build - cd $(SOURCE)/build; CC=$(CC) CXX=$(CXX) cmake \ - -DCMAKE_C_FLAGS:STRING="$(CPPFLAGS) $(CFLAGS)" \ - -DCMAKE_CXX_FLAGS:STRING="$(CPPFLAGS) $(CXXFLAGS)" \ - -DCMAKE_INCLUDE_PATH=$(PREFIX)/include \ - -DCMAKE_LIBRARY_PATH=$(PREFIX)/lib \ - -DCMAKE_INSTALL_NAME_DIR=$(PREFIX)/lib \ - -DCMAKE_INSTALL_PREFIX=$(PREFIX) \ - -DCMAKE_FIND_ROOT_PATH=$(platform_sdk_path) .. - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE)/build - -.installed: - make -C $(SOURCE)/build install - touch $@ - -clean: - make -C $(SOURCE)/build clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/tar/Makefile b/tools/darwin/depends/tar/Makefile deleted file mode 100644 index 021fe070007c5..0000000000000 --- a/tools/darwin/depends/tar/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -include ../Makefile.include - -# app name, version -APPNAME=tar -VERSION=1.23 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -export LIBTOOL=builds/unix/libtool -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) \ ---program-transform-name=s/tar/gtar/ --disable-dependency-tracking - -APP=$(SOURCE)/src/tar -APPBIN=$(TOOLCHAIN)/bin/tar -TAR=$(PREFIX)/bin/$(APPNAME) - -all: $(APPBIN) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - rm -f $(TOOLCHAIN)/bin/tar $(TOOLCHAIN)/bin/gnutar - cd $(TOOLCHAIN)/bin; ln -s gtar tar; ln -s gtar gnutar - # remove this once we change over to darwin/depends - rm -f $(TAR); ln -s $(TOOLCHAIN)/bin/gtar $(TAR) - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) - diff --git a/tools/darwin/depends/tiff/Makefile b/tools/darwin/depends/tiff/Makefile deleted file mode 100644 index fb3dc59cdaa50..0000000000000 --- a/tools/darwin/depends/tiff/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=tiff -VERSION=3.9.7 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) \ - --without-x - -LIBDYLIB=$(SOURCE)/libtiff/.libs/lib$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -.installed: - make -C $(SOURCE) install - touch $@ - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed diff --git a/tools/darwin/depends/tinyxml/Makefile b/tools/darwin/depends/tinyxml/Makefile deleted file mode 100644 index c9c470ab79559..0000000000000 --- a/tools/darwin/depends/tinyxml/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include ../Makefile.include - -# lib name, version -LIBNAME=tinyxml -VERSION=2.6.2_2 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) - - -LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); autoreconf -vif - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -j 1 -C $(SOURCE)/src - -.installed: - make -C $(SOURCE)/src install - touch $@ - -clean: - rm -rf $(SOURCE) .installed - -distclean:: - rm -rf $(SOURCE) .installed - diff --git a/tools/darwin/depends/xbmc-pvr-addons/Makefile b/tools/darwin/depends/xbmc-pvr-addons/Makefile deleted file mode 100644 index 310b25890f880..0000000000000 --- a/tools/darwin/depends/xbmc-pvr-addons/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -include ../Makefile.include -include ../config.site.mk - -XBMC_ADDONSDIR=../../../../addons - -# lib name, version -LIBNAME=xbmc-pvr-addons -VERSION=5ef7f7f88c9dd3ca9c1daf57e7c92c005faa5910 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz - -# configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) --enable-addons-with-dependencies - -LIBDYLIB=$(SOURCE)/addons/pvr.demo/.libs/libpvrdemo-addon.dylib - -all: $(LIBDYLIB) .installed - -$(TARBALLS_LOCATION)/$(ARCHIVE): - git clone git://github.com/opdenkamp/xbmc-pvr-addons.git $(SOURCE) - cd $(SOURCE); git archive --format=tar --prefix=$(SOURCE)/ $(VERSION) | gzip -9 > $(TARBALLS_LOCATION)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); ./bootstrap - cd $(SOURCE); $(CONFIGURE) - -$(LIBDYLIB): $(SOURCE) - make -C $(SOURCE) - -.installed: - for ADDON in `find $(SOURCE)/addons -type d -name "pvr.*"`; do \ - ADDON=`basename $$ADDON` ; \ - mkdir -p $(XBMC_ADDONSDIR)/$$ADDON ; \ - cp -PRf $(SOURCE)/addons/$$ADDON/addon/* $(XBMC_ADDONSDIR)/$$ADDON ; \ - cp -Pf $(SOURCE)/addons/$$ADDON/*.pvr $(XBMC_ADDONSDIR)/$$ADDON ; \ - install_name_tool -id "$$ADDON" `find "$(XBMC_ADDONSDIR)/$$ADDON" -type f -name "*.pvr"` ; \ - done - touch .installed - -clean: - make -C $(SOURCE) clean - rm -f .installed - -distclean:: - rm -rf $(SOURCE) .installed - rm -f $(TARBALLS_LOCATION)/$(ARCHIVE) - diff --git a/tools/darwin/depends/xbmc/Makefile b/tools/darwin/depends/xbmc/Makefile deleted file mode 100644 index 36c3c81bdbdee..0000000000000 --- a/tools/darwin/depends/xbmc/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -include ../Makefile.include - -SOURCE=../../../../ - -ifeq ($(DARWIN), ios) -include ../Makefile.buildtools -export USE_TEXTUREPACKER_NATIVE_ROOT=$(TOOLCHAIN) -else -export USE_TEXTUREPACKER_NATIVE_ROOT=$(PREFIX) -endif - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PREFIX)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(PREFIX) \ - --enable-upnp \ - --enable-gtest \ - PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig \ - PYTHON=$(PREFIX)/bin/python - -ifeq ($(XBMC_DARWIN_RELEASE),Release) - CONFIGURE+= --disable-debug -endif - -all: configure - -configure: - cd $(SOURCE); ./bootstrap - cd $(SOURCE); $(CONFIGURE) - #cd $(SOURCE); make xcode_depends diff --git a/tools/darwin/depends/yasm/Makefile b/tools/darwin/depends/yasm/Makefile deleted file mode 100644 index d4e65fe0e3b82..0000000000000 --- a/tools/darwin/depends/yasm/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -include ../Makefile.include - -# lib name, version -APPNAME=yasm -VERSION=1.2.0 -SOURCE=$(APPNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz -BASE_URL=http://www.tortall.net/projects/yasm/releases - -# configuration settings -export PATH:=$(TOOLCHAIN)/bin:$(PATH) -CONFIGURE=./configure --prefix=$(TOOLCHAIN) - -APP=$(SOURCE)/$(APPNAME) -APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) -YASM=$(PREFIX)/bin/$(APPNAME) - -all: $(YASM) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) - -$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) - rm -rf $(SOURCE) - $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - echo $(SOURCE) > .gitignore - cd $(SOURCE); $(CONFIGURE) - -$(APP): $(SOURCE) - make -j $(MAKE_JOBS) -C $(SOURCE) - -$(APPBIN): - make $(APP) - make -C $(SOURCE) install - -$(YASM): $(APPBIN) - rm -f $(YASM); ln -s $(APPBIN) $(YASM) - -clean: - make -C $(SOURCE) clean - -distclean:: - rm -rf $(SOURCE) -