aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--XBMC-ATV2.xcodeproj/project.pbxproj56
-rw-r--r--XBMC-IOS.xcodeproj/project.pbxproj50
-rw-r--r--XBMC.xcodeproj/project.pbxproj56
-rwxr-xr-xaddons/metadata.local/addon.xml29
-rwxr-xr-xaddons/metadata.local/local.xml3
-rw-r--r--addons/service.xbmc.versioncheck/LICENSE.txt282
-rw-r--r--addons/service.xbmc.versioncheck/README.md6
-rw-r--r--addons/service.xbmc.versioncheck/addon.xml23
-rw-r--r--addons/service.xbmc.versioncheck/changelog.txt5
-rw-r--r--addons/service.xbmc.versioncheck/icon.pngbin0 -> 26829 bytes
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/English/strings.po69
-rw-r--r--addons/service.xbmc.versioncheck/resources/settings.xml6
-rw-r--r--addons/service.xbmc.versioncheck/resources/versions.txt190
-rw-r--r--addons/service.xbmc.versioncheck/service.py253
-rw-r--r--addons/xbmc.addon/addon.xml2
-rw-r--r--configure.in3
-rw-r--r--docs/README.android7
-rw-r--r--docs/README.ios36
-rw-r--r--docs/README.linux8
-rw-r--r--docs/README.osx54
-rw-r--r--docs/README.raspberrypi2
-rw-r--r--lib/addons/script.module.pil/Imaging-1.1.7-access.patch13
-rw-r--r--lib/addons/script.module.pil/Imaging-1.1.7-crosscompiling-0.1.patch34
-rw-r--r--lib/addons/script.module.pil/Imaging-1.1.7-setuptools-0.1.patch12
-rw-r--r--lib/addons/script.module.pil/Makefile.in58
-rw-r--r--project/BuildDependencies/scripts/libbzip2_d.bat2
-rw-r--r--project/VS2010Express/XBMC.vcxproj10
-rw-r--r--project/VS2010Express/XBMC.vcxproj.filters30
-rw-r--r--project/Win32BuildSetup/BuildSetup.bat12
-rw-r--r--project/Win32BuildSetup/buildmingwlibs.bat30
-rw-r--r--system/Lircmap.xml26
-rw-r--r--tools/EventClients/lib/python/ps3/keymaps.py12
-rw-r--r--tools/android/depends/.gitignore10
-rw-r--r--tools/android/depends/Makefile.in92
-rw-r--r--tools/android/depends/Makefile.include.in83
-rw-r--r--tools/android/depends/afpfs-ng/01-gcrypt.patch26
-rw-r--r--tools/android/depends/afpfs-ng/02-pointer.patch280
-rw-r--r--tools/android/depends/afpfs-ng/04-boxee1.patch25
-rw-r--r--tools/android/depends/afpfs-ng/05-boxee2.patch89
-rw-r--r--tools/android/depends/afpfs-ng/06-boxee3.patch141
-rw-r--r--tools/android/depends/afpfs-ng/07-boxee4.patch27
-rw-r--r--tools/android/depends/afpfs-ng/08-boxee5.patch11
-rw-r--r--tools/android/depends/afpfs-ng/10-fix-errno.patch23
-rw-r--r--tools/android/depends/afpfs-ng/11-fix-stat.patch11
-rw-r--r--tools/android/depends/afpfs-ng/Makefile60
-rw-r--r--tools/android/depends/afpfs-ng/android.patch64
-rw-r--r--tools/android/depends/afpfs-ng/fix_afpfs-ng_includes.patch3082
-rw-r--r--tools/android/depends/alsa-lib/Makefile60
-rw-r--r--tools/android/depends/alsa-lib/removeshm-2.patch11
-rw-r--r--tools/android/depends/alsa-lib/removeshm-3.patch11
-rw-r--r--tools/android/depends/alsa-lib/removeshm-upstream.patch187
-rw-r--r--tools/android/depends/alsa-lib/timeval.patch11
-rw-r--r--tools/android/depends/android-sys/Makefile53
-rw-r--r--tools/android/depends/android-sys/iomx.cpp473
-rw-r--r--tools/android/depends/autoconf/Makefile40
-rw-r--r--tools/android/depends/automake/Makefile40
-rw-r--r--tools/android/depends/boost/Makefile34
-rw-r--r--tools/android/depends/boost/add-arm-mem-barrier.patch73
-rw-r--r--tools/android/depends/boost/fix-deprecated-swp.patch58
-rwxr-xr-xtools/android/depends/bootstrap1
-rw-r--r--tools/android/depends/bzip2/Makefile40
-rw-r--r--tools/android/depends/bzip2/Makefile.patch34
-rw-r--r--tools/android/depends/cmake/Makefile40
-rw-r--r--tools/android/depends/configure.in151
-rw-r--r--tools/android/depends/curl/Makefile48
-rw-r--r--tools/android/depends/dbus/Makefile40
-rw-r--r--tools/android/depends/dummy-libxbmc/Makefile24
-rw-r--r--tools/android/depends/dummy-libxbmc/dummy-libxbmc.c4
-rw-r--r--tools/android/depends/expat/Makefile40
-rw-r--r--tools/android/depends/fontconfig/01-fontconfig-cross-compile-fix.patch80
-rw-r--r--tools/android/depends/fontconfig/Makefile45
-rw-r--r--tools/android/depends/fontconfig/lconv.patch18
-rw-r--r--tools/android/depends/freetype2/Makefile43
-rw-r--r--tools/android/depends/fribidi/Makefile42
-rw-r--r--tools/android/depends/gettext-native/Makefile52
-rw-r--r--tools/android/depends/gettext/02-gettext_msginit.patch12
-rw-r--r--tools/android/depends/gettext/Makefile50
-rw-r--r--tools/android/depends/help2man/Makefile40
-rw-r--r--tools/android/depends/jasper/Makefile44
-rw-r--r--tools/android/depends/jpeg/Makefile39
-rw-r--r--tools/android/depends/libamplayer/Makefile14
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/amports/aformat.h89
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/amports/amstream.h148
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/amports/vformat.h111
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/log_print.h40
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/message.h90
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/player.h80
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/player_error.h63
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/player_id.h14
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/player_set_sys.h80
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/player_thumbnail.h27
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/player_type.h271
-rw-r--r--tools/android/depends/libamplayer/libamplayer/include/stream_format.h43
-rw-r--r--tools/android/depends/libass/Makefile45
-rw-r--r--tools/android/depends/libbluray/Makefile46
-rw-r--r--tools/android/depends/libcdio/Makefile47
-rw-r--r--tools/android/depends/libcdio/configure.patch11
-rw-r--r--tools/android/depends/libcec/Makefile43
-rw-r--r--tools/android/depends/libffi/Makefile39
-rw-r--r--tools/android/depends/libflac/Makefile48
-rw-r--r--tools/android/depends/libflac/nasm.patch14
-rw-r--r--tools/android/depends/libgcrypt/01-gcrypt-android-select.patch13
-rw-r--r--tools/android/depends/libgcrypt/Makefile48
-rw-r--r--tools/android/depends/libgcrypt/gcrypt-disable-tests.patch24
-rw-r--r--tools/android/depends/libgpg-error/Makefile41
-rw-r--r--tools/android/depends/libiconv/Makefile42
-rw-r--r--tools/android/depends/libjpeg-turbo-native/Makefile42
-rw-r--r--tools/android/depends/libjpeg-turbo/Makefile41
-rw-r--r--tools/android/depends/liblzo2-native/Makefile42
-rw-r--r--tools/android/depends/liblzo2/Makefile41
-rw-r--r--tools/android/depends/libmad/01-libmad-pkgconfig.patch118
-rw-r--r--tools/android/depends/libmad/Makefile50
-rw-r--r--tools/android/depends/libmicrohttpd/Makefile44
-rw-r--r--tools/android/depends/libmicrohttpd/fix-android-include.patch33
-rw-r--r--tools/android/depends/libmodplug/Makefile45
-rw-r--r--tools/android/depends/libmpeg2/Makefile53
-rw-r--r--tools/android/depends/libnfs/Makefile44
-rw-r--r--tools/android/depends/libogg/Makefile46
-rw-r--r--tools/android/depends/libomxil-bellagio/Makefile43
-rw-r--r--tools/android/depends/libomxil-bellagio/android-fix-build.patch33
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/oscl_base_macros.h159
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig.h105
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_ansi_memory.h42
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_check.h423
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_compiler_warnings.h44
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_error.h53
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_error_check.h63
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_global_new_delete.h30
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_global_placement_new.h31
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_io.h309
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_io_check.h605
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_ix86.h41
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_lib.h63
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_lib_check.h67
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_limits_typedefs.h88
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_memory.h91
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_memory_check.h72
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_no_os.h71
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc.h43
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_check.h157
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_unix_android.h60
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_unix_common.h59
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_time.h50
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_time_check.h47
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_unix_android.h105
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_unix_common.h103
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_util.h43
-rw-r--r--tools/android/depends/libomxil-bellagio/oscl/osclconfig_util_check.h58
-rw-r--r--tools/android/depends/libplist/0001-dontbuildswig.patch11
-rw-r--r--tools/android/depends/libplist/0002-missing-libs.patch12
-rw-r--r--tools/android/depends/libplist/0003-no-so-version.patch23
-rw-r--r--tools/android/depends/libplist/Makefile54
-rw-r--r--tools/android/depends/libpng-native/Makefile42
-rw-r--r--tools/android/depends/libpng/Makefile41
-rw-r--r--tools/android/depends/librtmp/Makefile56
-rw-r--r--tools/android/depends/librtmp/librtmp-60-second-fix.patch1913
-rw-r--r--tools/android/depends/librtmp/prefix.patch10
-rw-r--r--tools/android/depends/libsamplerate/Makefile42
-rw-r--r--tools/android/depends/libsdl/01-SDL_SetWidthHeight.patch33
-rw-r--r--tools/android/depends/libsdl/02-mmx.patch12
-rw-r--r--tools/android/depends/libsdl/Makefile43
-rw-r--r--tools/android/depends/libsdl_image/Makefile40
-rw-r--r--tools/android/depends/libshairport/001_add_ao.patch270
-rw-r--r--tools/android/depends/libshairport/002_fix_install_header.patch12
-rw-r--r--tools/android/depends/libshairport/003_fix_deadlock.patch10
-rw-r--r--tools/android/depends/libshairport/004_fix_bad_access.patch22
-rw-r--r--tools/android/depends/libshairport/005_fix_shutdown.patch10
-rw-r--r--tools/android/depends/libshairport/006_no_printf.patch843
-rw-r--r--tools/android/depends/libshairport/007_fix_syslog_defines.patch24
-rw-r--r--tools/android/depends/libshairport/008-add-missing-libs.patch21
-rw-r--r--tools/android/depends/libshairport/009_fix_ipv6.patch22
-rw-r--r--tools/android/depends/libshairport/010_handle_metadata.patch154
-rw-r--r--tools/android/depends/libshairport/011_fix_ipv4_fallback.patch10
-rw-r--r--tools/android/depends/libshairport/Makefile58
-rw-r--r--tools/android/depends/libshairport/android.patch21
-rw-r--r--tools/android/depends/libssh/Makefile46
-rw-r--r--tools/android/depends/libssh/android.patch49
-rw-r--r--tools/android/depends/libssh/md5.patch72
-rw-r--r--tools/android/depends/libssh/removelegacy.patch10
-rw-r--r--tools/android/depends/libssh2/Makefile48
-rw-r--r--tools/android/depends/libtool/Makefile43
-rw-r--r--tools/android/depends/libtool/fix-libcrystax.patch13
-rw-r--r--tools/android/depends/libusb/Makefile40
-rw-r--r--tools/android/depends/libvorbis/Makefile63
-rw-r--r--tools/android/depends/libxml2/Makefile43
-rw-r--r--tools/android/depends/libzip/Makefile39
-rw-r--r--tools/android/depends/mysql/01-mysqlclient-cross-compile.patch170
-rw-r--r--tools/android/depends/mysql/02-mysqlclient-ios.patch27
-rw-r--r--tools/android/depends/mysql/03-mysqlclient-android.patch93
-rw-r--r--tools/android/depends/mysql/Makefile52
-rw-r--r--tools/android/depends/ncurses/Makefile41
-rw-r--r--tools/android/depends/openssl/Makefile45
-rw-r--r--tools/android/depends/pcre-native/Makefile41
-rw-r--r--tools/android/depends/pcre/Makefile39
-rw-r--r--tools/android/depends/pkg-config/Makefile41
-rw-r--r--tools/android/depends/python26-native/Makefile38
-rw-r--r--tools/android/depends/python26-native/cpython-2.6.5-multiarch.patch36
-rw-r--r--tools/android/depends/python26-native/cpython-2.6.5-nosslv2.patch127
-rw-r--r--tools/android/depends/python26/Makefile53
-rw-r--r--tools/android/depends/python26/Python-2.6-ctypes.patch45
-rw-r--r--tools/android/depends/python26/Python-2.6.2-android.patch61
-rw-r--r--tools/android/depends/python26/Python-2.6.5-xcompile.patch301
-rw-r--r--tools/android/depends/python26/Python-no-export-path.patch12
-rw-r--r--tools/android/depends/python26/Python-no-modules.patch12
-rw-r--r--tools/android/depends/python26/modules.setup519
-rw-r--r--tools/android/depends/readline/01-readline-setpwent.patch20
-rw-r--r--tools/android/depends/readline/Makefile41
-rw-r--r--tools/android/depends/rpl/Makefile16
-rwxr-xr-xtools/android/depends/rpl/rpl310
-rw-r--r--tools/android/depends/samba/Makefile101
-rw-r--r--tools/android/depends/samba/samba30-3.0.37-CVE-2010-2063.patch38
-rw-r--r--tools/android/depends/samba/samba30-3.0.37-configure.in.patch64
-rw-r--r--tools/android/depends/samba/samba30-3.0.37-silence-receive-warning.patch11
-rw-r--r--tools/android/depends/samba/samba30-3.0.37-vfs_default.c.patch16
-rw-r--r--tools/android/depends/samba/samba30-3.0.37-wle-fix.patch101
-rw-r--r--tools/android/depends/samba/samba_android.patch220
-rw-r--r--tools/android/depends/sqlite3/Makefile45
-rw-r--r--tools/android/depends/swig-native/Makefile41
-rw-r--r--tools/android/depends/taglib/Makefile43
-rw-r--r--tools/android/depends/tiff-native/Makefile42
-rw-r--r--tools/android/depends/tiff/Makefile41
-rw-r--r--tools/android/depends/tinyxml/Makefile39
-rw-r--r--tools/android/depends/xbmc-pvr-addons/Makefile54
-rw-r--r--tools/android/depends/xbmc/Makefile42
-rw-r--r--tools/android/depends/yajl/Makefile52
-rw-r--r--tools/android/depends/yajl/shared.patch20
-rw-r--r--tools/android/depends/yajl/static.patch19
-rw-r--r--tools/android/depends/yasm/Makefile41
-rw-r--r--tools/android/packaging/.gitignore2
-rw-r--r--tools/android/packaging/xbmc/AndroidManifest.xml6
-rw-r--r--tools/buildsteps/README15
-rw-r--r--tools/buildsteps/android/configure-depends15
-rw-r--r--tools/buildsteps/android/configure-xbmc5
-rw-r--r--tools/buildsteps/android/make-depends9
-rw-r--r--tools/buildsteps/android/make-xbmc5
-rw-r--r--tools/buildsteps/android/package10
-rw-r--r--tools/buildsteps/android/prepare-depends13
-rw-r--r--tools/buildsteps/android/prepare-xbmc5
-rwxr-xr-xtools/buildsteps/atv2/configure-depends13
-rwxr-xr-xtools/buildsteps/atv2/configure-xbmc5
-rwxr-xr-xtools/buildsteps/atv2/make-depends9
-rwxr-xr-xtools/buildsteps/atv2/make-xbmc8
-rwxr-xr-xtools/buildsteps/atv2/package13
-rwxr-xr-xtools/buildsteps/atv2/prepare-depends15
-rwxr-xr-xtools/buildsteps/atv2/prepare-xbmc6
-rw-r--r--tools/buildsteps/defaultenv124
-rwxr-xr-xtools/buildsteps/ios/configure-depends12
-rwxr-xr-xtools/buildsteps/ios/configure-xbmc5
-rwxr-xr-xtools/buildsteps/ios/make-depends9
-rwxr-xr-xtools/buildsteps/ios/make-xbmc9
-rwxr-xr-xtools/buildsteps/ios/package13
-rwxr-xr-xtools/buildsteps/ios/prepare-depends14
-rwxr-xr-xtools/buildsteps/ios/prepare-xbmc6
-rwxr-xr-xtools/buildsteps/osx32/configure-depends12
-rwxr-xr-xtools/buildsteps/osx32/configure-xbmc5
-rwxr-xr-xtools/buildsteps/osx32/make-depends9
-rwxr-xr-xtools/buildsteps/osx32/make-xbmc8
-rwxr-xr-xtools/buildsteps/osx32/package10
-rwxr-xr-xtools/buildsteps/osx32/prepare-depends14
-rwxr-xr-xtools/buildsteps/osx32/prepare-xbmc5
-rwxr-xr-xtools/buildsteps/osx64/configure-depends12
-rwxr-xr-xtools/buildsteps/osx64/configure-xbmc5
-rwxr-xr-xtools/buildsteps/osx64/make-depends9
-rwxr-xr-xtools/buildsteps/osx64/make-xbmc8
-rwxr-xr-xtools/buildsteps/osx64/package10
-rwxr-xr-xtools/buildsteps/osx64/prepare-depends14
-rwxr-xr-xtools/buildsteps/osx64/prepare-xbmc5
-rw-r--r--tools/buildsteps/win32/download-depends.bat40
-rw-r--r--tools/buildsteps/win32/download-msys.bat72
-rw-r--r--tools/buildsteps/win32/make-xbmc.bat176
-rw-r--r--tools/buildsteps/win32/prepare-env.bat20
-rw-r--r--tools/darwin/depends/.autom4te.cfg3
-rw-r--r--tools/darwin/depends/Backrow/Makefile24
-rw-r--r--tools/darwin/depends/COPYING674
-rw-r--r--tools/darwin/depends/Makefile.buildtools11
-rw-r--r--tools/darwin/depends/Makefile.in61
-rw-r--r--tools/darwin/depends/Makefile.include.in7
-rw-r--r--tools/darwin/depends/README20
-rw-r--r--tools/darwin/depends/afpfs-ng/01-gcrypt.patch26
-rw-r--r--tools/darwin/depends/afpfs-ng/02-pointer.patch280
-rw-r--r--tools/darwin/depends/afpfs-ng/04-boxee1.patch25
-rw-r--r--tools/darwin/depends/afpfs-ng/05-boxee2.patch89
-rw-r--r--tools/darwin/depends/afpfs-ng/06-boxee3.patch141
-rw-r--r--tools/darwin/depends/afpfs-ng/07-boxee4.patch27
-rw-r--r--tools/darwin/depends/afpfs-ng/08-boxee5.patch11
-rw-r--r--tools/darwin/depends/afpfs-ng/10-fix-errno.patch23
-rw-r--r--tools/darwin/depends/afpfs-ng/11-fix-stat.patch11
-rw-r--r--tools/darwin/depends/afpfs-ng/12-fix-even-more-pointers.patch83
-rw-r--r--tools/darwin/depends/afpfs-ng/Makefile53
-rw-r--r--tools/darwin/depends/afpfs-ng/fix_afpfs-ng_includes.patch3082
-rw-r--r--tools/darwin/depends/autoconf/Makefile39
-rw-r--r--tools/darwin/depends/automake/Makefile38
-rw-r--r--tools/darwin/depends/boost/Makefile61
-rw-r--r--tools/darwin/depends/boost/add-arm-mem-barrier.patch73
-rw-r--r--tools/darwin/depends/boost/fix-deprecated-swp.patch58
-rwxr-xr-xtools/darwin/depends/bootstrap18
-rw-r--r--tools/darwin/depends/cmake/Makefile39
-rw-r--r--tools/darwin/depends/config.site_ios.in134
-rw-r--r--tools/darwin/depends/config.site_ios.mk.in50
-rw-r--r--tools/darwin/depends/config.site_osx.in103
-rw-r--r--tools/darwin/depends/config.site_osx.mk.in62
-rw-r--r--tools/darwin/depends/configure.in129
-rw-r--r--tools/darwin/depends/curl/Makefile42
-rw-r--r--tools/darwin/depends/distribute/Makefile32
-rw-r--r--tools/darwin/depends/distutilscross/Makefile32
-rw-r--r--tools/darwin/depends/dpkg/Makefile44
-rw-r--r--tools/darwin/depends/expat/Makefile37
-rw-r--r--tools/darwin/depends/fontconfig/01-fontconfig-cross-compile-fix.patch80
-rw-r--r--tools/darwin/depends/fontconfig/Makefile42
-rw-r--r--tools/darwin/depends/freetype2/Makefile40
-rw-r--r--tools/darwin/depends/fribidi/Makefile38
-rw-r--r--tools/darwin/depends/gas-preprocessor/Makefile13
-rw-r--r--tools/darwin/depends/gas-preprocessor/README20
-rwxr-xr-xtools/darwin/depends/gas-preprocessor/gas-preprocessor.pl497
-rw-r--r--tools/darwin/depends/gettext/01-gettext-tools-Makefile.in.patch11
-rw-r--r--tools/darwin/depends/gettext/02-gettext-tools-stpncpy.patch12
-rw-r--r--tools/darwin/depends/gettext/Makefile51
-rw-r--r--tools/darwin/depends/help2man/Makefile39
-rw-r--r--tools/darwin/depends/jpeg/Makefile37
-rw-r--r--tools/darwin/depends/lib-gpgerror/Makefile41
-rw-r--r--tools/darwin/depends/libGLEW/Makefile45
-rw-r--r--tools/darwin/depends/libarchive/Makefile40
-rw-r--r--tools/darwin/depends/libass/Makefile37
-rw-r--r--tools/darwin/depends/libbluray/Makefile42
-rw-r--r--tools/darwin/depends/libboblight/Makefile46
-rw-r--r--tools/darwin/depends/libcdio/Makefile40
-rw-r--r--tools/darwin/depends/libcdio/osx.patch19
-rw-r--r--tools/darwin/depends/libcec/Makefile39
-rw-r--r--tools/darwin/depends/libcrystalhd/Makefile15
-rw-r--r--tools/darwin/depends/libcrystalhd/libcrystalhd/bc_dts_defs.h635
-rw-r--r--tools/darwin/depends/libcrystalhd/libcrystalhd/bc_dts_types.h68
-rw-r--r--tools/darwin/depends/libcrystalhd/libcrystalhd/libcrystalhd_if.h1515
-rw-r--r--tools/darwin/depends/libcrystalhd/libcrystalhd/libcrystalhd_version.h80
-rw-r--r--tools/darwin/depends/libffi/Makefile40
-rw-r--r--tools/darwin/depends/libflac/Makefile43
-rw-r--r--tools/darwin/depends/libgcrypt/01-static-mpi_mpi-internal.patch53
-rw-r--r--tools/darwin/depends/libgcrypt/02-armasm.patch13
-rw-r--r--tools/darwin/depends/libgcrypt/Makefile44
-rw-r--r--tools/darwin/depends/libgpg-error/Makefile41
-rw-r--r--tools/darwin/depends/libjpeg-turbo-native/Makefile46
-rw-r--r--tools/darwin/depends/libjpeg-turbo/Makefile41
-rw-r--r--tools/darwin/depends/liblzo2-native/Makefile42
-rw-r--r--tools/darwin/depends/liblzo2/Makefile39
-rw-r--r--tools/darwin/depends/libmad/01-libmad-pkgconfig.patch31
-rw-r--r--tools/darwin/depends/libmad/02-libmad-thumb-fix.patch17
-rw-r--r--tools/darwin/depends/libmad/Makefile48
-rw-r--r--tools/darwin/depends/libmicrohttpd/Makefile38
-rw-r--r--tools/darwin/depends/libmodplug/Makefile39
-rw-r--r--tools/darwin/depends/libmp3lame/Makefile41
-rw-r--r--tools/darwin/depends/libmpeg2/01-libmpeg2-add-asm-leading-underscores.patch48
-rw-r--r--tools/darwin/depends/libmpeg2/02-neon.patch385
-rw-r--r--tools/darwin/depends/libmpeg2/03-config-fix.patch208
-rw-r--r--tools/darwin/depends/libmpeg2/Makefile43
-rw-r--r--tools/darwin/depends/libnfs/Makefile45
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/auth.h216
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/auth_unix.h106
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/clnt.h445
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/pmap_clnt.h124
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/pmap_prot.h147
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/pmap_rmt.h95
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/rpc.h93
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/rpc_msg.h243
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/svc.h360
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/svc_auth.h73
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/types.h102
-rw-r--r--tools/darwin/depends/libnfs/rpcinc/xdr.h430
-rw-r--r--tools/darwin/depends/libogg/Makefile39
-rw-r--r--tools/darwin/depends/libplist/0001-dontbuildswig.patch11
-rw-r--r--tools/darwin/depends/libplist/Makefile45
-rw-r--r--tools/darwin/depends/libpng-native/Makefile41
-rw-r--r--tools/darwin/depends/libpng/Makefile37
-rw-r--r--tools/darwin/depends/librtmp/Makefile46
-rw-r--r--tools/darwin/depends/librtmp/librtmp-60-second-fix.patch1913
-rw-r--r--tools/darwin/depends/libsamplerate/01-libsamplerate-arm.patch13
-rw-r--r--tools/darwin/depends/libsamplerate/Makefile39
-rw-r--r--tools/darwin/depends/libsdl-native/01-SDL_SetWidthHeight.patch33
-rw-r--r--tools/darwin/depends/libsdl-native/02-mmx.patch12
-rw-r--r--tools/darwin/depends/libsdl-native/Makefile45
-rw-r--r--tools/darwin/depends/libsdl/01-SDL_SetWidthHeight.patch33
-rw-r--r--tools/darwin/depends/libsdl/02-mmx.patch12
-rw-r--r--tools/darwin/depends/libsdl/Makefile41
-rw-r--r--tools/darwin/depends/libsdl_image-native/Makefile42
-rw-r--r--tools/darwin/depends/libsdl_image/Makefile38
-rw-r--r--tools/darwin/depends/libsdl_mixer/Makefile40
-rw-r--r--tools/darwin/depends/libshairport/001_add_ao.patch270
-rw-r--r--tools/darwin/depends/libshairport/002_fix_install_header.patch12
-rw-r--r--tools/darwin/depends/libshairport/003_fix_deadlock.patch10
-rw-r--r--tools/darwin/depends/libshairport/004_fix_bad_access.patch22
-rw-r--r--tools/darwin/depends/libshairport/005_fix_shutdown.patch10
-rw-r--r--tools/darwin/depends/libshairport/006_no_printf.patch843
-rw-r--r--tools/darwin/depends/libshairport/007_fix_syslog_defines.patch24
-rw-r--r--tools/darwin/depends/libshairport/008-add-missing-libs.patch21
-rw-r--r--tools/darwin/depends/libshairport/009_fix_ipv6.patch22
-rw-r--r--tools/darwin/depends/libshairport/010_handle_metadata.patch154
-rw-r--r--tools/darwin/depends/libshairport/011_fix_ipv4_fallback.patch10
-rw-r--r--tools/darwin/depends/libshairport/Makefile51
-rw-r--r--tools/darwin/depends/libssh/Makefile45
-rw-r--r--tools/darwin/depends/libssh/removelegacy.patch10
-rw-r--r--tools/darwin/depends/libssh2/Makefile42
-rw-r--r--tools/darwin/depends/libtiff-native/Makefile41
-rw-r--r--tools/darwin/depends/libtool/Makefile39
-rw-r--r--tools/darwin/depends/libusb/Makefile36
-rw-r--r--tools/darwin/depends/libvorbis/Makefile42
-rw-r--r--tools/darwin/depends/libyajl/Makefile41
-rw-r--r--tools/darwin/depends/m4/Makefile38
-rw-r--r--tools/darwin/depends/mysqlclient/01-mysqlclient-cross-compile.patch170
-rw-r--r--tools/darwin/depends/mysqlclient/02-mysqlclient-ios.patch27
-rw-r--r--tools/darwin/depends/mysqlclient/Makefile52
-rw-r--r--tools/darwin/depends/openssl/Makefile55
-rw-r--r--tools/darwin/depends/pcre/Makefile38
-rw-r--r--tools/darwin/depends/pkg-config/Makefile38
-rw-r--r--tools/darwin/depends/python26/Makefile.ios63
-rw-r--r--tools/darwin/depends/python26/Makefile.osx60
-rw-r--r--tools/darwin/depends/python26/Python-2.6-ctypes.patch45
-rw-r--r--tools/darwin/depends/python26/Python-2.6.5-xcompile.patch301
-rw-r--r--tools/darwin/depends/python26/python-osx-environ-fix.patch25
-rw-r--r--tools/darwin/depends/readline/Makefile38
-rw-r--r--tools/darwin/depends/samba/Makefile53
-rw-r--r--tools/darwin/depends/sed/Makefile38
-rw-r--r--tools/darwin/depends/sqlite3/Makefile43
-rw-r--r--tools/darwin/depends/swig/Makefile39
-rw-r--r--tools/darwin/depends/taglib/Makefile43
-rw-r--r--tools/darwin/depends/tar/Makefile45
-rw-r--r--tools/darwin/depends/tiff/Makefile38
-rw-r--r--tools/darwin/depends/tinyxml/Makefile39
-rw-r--r--tools/darwin/depends/xbmc-pvr-addons/Makefile50
-rw-r--r--tools/darwin/depends/xbmc/Makefile29
-rw-r--r--tools/darwin/depends/yasm/Makefile44
-rwxr-xr-xtools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh6
-rwxr-xr-xtools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh6
-rw-r--r--tools/darwin/packaging/xbmc-osx/Makefile18
-rwxr-xr-xtools/darwin/packaging/xbmc-osx/dmgmaker.pl16
-rwxr-xr-xtools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh41
-rw-r--r--tools/depends/.gitignore8
-rw-r--r--tools/depends/README2
-rw-r--r--tools/depends/configure.in6
-rw-r--r--tools/depends/native/Makefile2
-rw-r--r--tools/depends/native/gettext-native/Makefile2
-rw-r--r--tools/depends/native/tar-native/Makefile43
-rw-r--r--tools/depends/target/Makefile5
-rw-r--r--tools/depends/target/config.site.in7
-rw-r--r--tools/depends/target/libgcrypt/04-oflagmunging.patch22
-rw-r--r--tools/depends/target/libgcrypt/Makefile1
-rw-r--r--tools/depends/target/libshairport/012_add_volume_control.patch28
-rw-r--r--tools/depends/target/libshairport/Makefile1
-rw-r--r--tools/depends/target/pythonmodule-pil/Imaging-1.1.7-remove-zlib-check.patch15
-rw-r--r--tools/depends/target/pythonmodule-pil/Makefile8
-rw-r--r--xbmc/Application.cpp63
-rw-r--r--xbmc/Application.h7
-rw-r--r--xbmc/AutoSwitch.cpp1
-rw-r--r--xbmc/GUIInfoManager.cpp34
-rw-r--r--xbmc/GUIInfoManager.h2
-rw-r--r--xbmc/GUIPassword.cpp19
-rw-r--r--xbmc/MediaSource.h1
-rw-r--r--xbmc/NfoFile.cpp5
-rw-r--r--xbmc/URL.cpp2
-rw-r--r--xbmc/Util.cpp1
-rw-r--r--xbmc/XBDateTime.h26
-rw-r--r--xbmc/addons/Addon.cpp1
-rw-r--r--xbmc/addons/AddonCallbacksAddon.cpp1
-rw-r--r--xbmc/addons/AddonCallbacksGUI.cpp2
-rw-r--r--xbmc/addons/AddonInstaller.cpp22
-rw-r--r--xbmc/addons/AddonInstaller.h10
-rw-r--r--xbmc/addons/GUIDialogAddonSettings.cpp3
-rw-r--r--xbmc/addons/GUIWindowAddonBrowser.cpp3
-rw-r--r--xbmc/addons/Scraper.cpp32
-rw-r--r--xbmc/addons/Scraper.h1
-rw-r--r--xbmc/android/activity/AndroidExtra.h26
-rw-r--r--xbmc/android/activity/AndroidKey.cpp10
-rw-r--r--xbmc/android/activity/XBMCApp.cpp2
-rw-r--r--xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp2
-rw-r--r--xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp12
-rw-r--r--xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp8
-rw-r--r--xbmc/cores/ExternalPlayer/ExternalPlayer.cpp1
-rw-r--r--xbmc/cores/VideoRenderers/BaseRenderer.cpp61
-rw-r--r--xbmc/cores/VideoRenderers/LinuxRendererGL.cpp23
-rw-r--r--xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp15
-rw-r--r--xbmc/cores/VideoRenderers/RenderManager.cpp5
-rw-r--r--xbmc/cores/VideoRenderers/WinRenderer.cpp21
-rw-r--r--xbmc/cores/VideoRenderers/legacy/ComboRenderer.cpp8
-rw-r--r--xbmc/cores/amlplayer/AMLPlayer.cpp18
-rw-r--r--xbmc/cores/dvdplayer/DVDAudio.cpp3
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp3
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h4
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp13
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp53
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStream.h11
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h3
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp15
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.h9
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp4
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.h4
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamPVRManager.h1
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayer.cpp81
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayerAudio.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayerVideo.cpp39
-rw-r--r--xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleTagMicroDVD.cpp1
-rw-r--r--xbmc/cores/omxplayer/OMXPlayer.cpp27
-rw-r--r--xbmc/cores/omxplayer/OMXPlayerVideo.cpp6
-rw-r--r--xbmc/cores/playercorefactory/PlayerCoreFactory.cpp9
-rw-r--r--xbmc/cores/playercorefactory/PlayerCoreFactory.h11
-rw-r--r--xbmc/dialogs/GUIDialogContextMenu.cpp52
-rw-r--r--xbmc/dialogs/GUIDialogFileBrowser.cpp10
-rw-r--r--xbmc/dialogs/GUIDialogMediaSource.cpp13
-rw-r--r--xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp5
-rw-r--r--xbmc/filesystem/CurlFile.cpp172
-rw-r--r--xbmc/filesystem/CurlFile.h3
-rw-r--r--[-rwxr-xr-x]xbmc/filesystem/DAVCommon.cpp0
-rw-r--r--[-rwxr-xr-x]xbmc/filesystem/DAVCommon.h0
-rw-r--r--xbmc/filesystem/DAVDirectory.cpp1
-rw-r--r--[-rwxr-xr-x]xbmc/filesystem/DAVFile.cpp0
-rw-r--r--[-rwxr-xr-x]xbmc/filesystem/DAVFile.h0
-rw-r--r--xbmc/filesystem/DllLibCurl.h2
-rw-r--r--xbmc/filesystem/FTPDirectory.cpp16
-rw-r--r--xbmc/filesystem/SourcesDirectory.cpp3
-rw-r--r--xbmc/filesystem/UPnPDirectory.cpp7
-rw-r--r--xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp4
-rw-r--r--xbmc/filesystem/test/TestRarFile.cpp1
-rw-r--r--xbmc/guilib/GUIButtonControl.cpp1
-rw-r--r--xbmc/guilib/GUICheckMarkControl.cpp1
-rw-r--r--xbmc/guilib/GUIFadeLabelControl.cpp1
-rw-r--r--xbmc/guilib/GUIInfoTypes.cpp1
-rw-r--r--xbmc/guilib/GUILabel.cpp1
-rw-r--r--xbmc/guilib/GUIListLabel.cpp1
-rw-r--r--xbmc/guilib/GUISelectButtonControl.cpp1
-rw-r--r--xbmc/guilib/GUISpinControl.cpp1
-rw-r--r--xbmc/guilib/GUITextBox.cpp1
-rw-r--r--xbmc/guilib/GUIToggleButtonControl.cpp1
-rw-r--r--xbmc/guilib/GUIWindowManager.cpp7
-rw-r--r--xbmc/guilib/TextureManager.cpp1
-rw-r--r--xbmc/input/ButtonTranslator.cpp5
-rw-r--r--xbmc/input/ButtonTranslator.h2
-rw-r--r--xbmc/input/touch/generic/GenericTouchInputHandler.cpp16
-rw-r--r--xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp60
-rw-r--r--xbmc/input/touch/generic/GenericTouchSwipeDetector.h5
-rw-r--r--xbmc/interfaces/Builtins.cpp48
-rw-r--r--xbmc/interfaces/json-rpc/FileOperations.cpp5
-rw-r--r--xbmc/interfaces/json-rpc/InputOperations.cpp1
-rw-r--r--xbmc/interfaces/legacy/Dialog.cpp67
-rw-r--r--xbmc/interfaces/legacy/Dialog.h64
-rw-r--r--xbmc/interfaces/legacy/ModuleXbmc.h10
-rw-r--r--xbmc/interfaces/legacy/Player.cpp9
-rw-r--r--xbmc/music/GUIViewStateMusic.cpp100
-rw-r--r--xbmc/music/dialogs/GUIDialogMusicInfo.cpp5
-rw-r--r--xbmc/music/dialogs/GUIDialogSongInfo.cpp3
-rw-r--r--xbmc/music/infoscanner/MusicInfoScraper.cpp1
-rw-r--r--xbmc/music/tags/TagLoaderTagLib.cpp5
-rw-r--r--xbmc/music/windows/GUIWindowMusicSongs.cpp5
-rw-r--r--xbmc/music/windows/GUIWindowVisualisation.cpp2
-rw-r--r--xbmc/network/AirPlayServer.cpp158
-rw-r--r--xbmc/network/AirPlayServer.h22
-rw-r--r--xbmc/network/AirTunesServer.cpp33
-rw-r--r--xbmc/network/AirTunesServer.h6
-rw-r--r--xbmc/network/httprequesthandler/HTTPVfsHandler.cpp3
-rw-r--r--xbmc/network/upnp/UPnPServer.cpp12
-rw-r--r--xbmc/network/upnp/UPnPSettings.cpp12
-rw-r--r--xbmc/network/upnp/UPnPSettings.h9
-rw-r--r--xbmc/network/websocket/WebSocketV13.cpp1
-rw-r--r--xbmc/network/websocket/WebSocketV8.cpp1
-rw-r--r--xbmc/osx/Info.plist4
-rw-r--r--xbmc/osx/atv2/XBMCController.mm14
-rw-r--r--xbmc/osx/ios/XBMCController.mm54
-rw-r--r--xbmc/pictures/GUIViewStatePictures.cpp18
-rw-r--r--xbmc/pictures/GUIWindowPictures.cpp11
-rw-r--r--xbmc/pictures/GUIWindowSlideShow.cpp17
-rw-r--r--xbmc/powermanagement/PowerManager.cpp45
-rw-r--r--xbmc/programs/GUIViewStatePrograms.cpp19
-rw-r--r--xbmc/programs/GUIWindowPrograms.cpp3
-rw-r--r--xbmc/pvr/addons/PVRClients.cpp87
-rw-r--r--xbmc/settings/AdvancedSettings.cpp28
-rw-r--r--xbmc/settings/AdvancedSettings.h6
-rw-r--r--xbmc/settings/GUISettings.cpp29
-rw-r--r--xbmc/settings/GUISettings.h8
-rw-r--r--xbmc/settings/ISettingsHandler.h58
-rw-r--r--xbmc/settings/ISubSettings.h47
-rw-r--r--xbmc/settings/Makefile3
-rw-r--r--xbmc/settings/MediaSettings.cpp211
-rw-r--r--xbmc/settings/MediaSettings.h89
-rw-r--r--xbmc/settings/MediaSourceSettings.cpp495
-rw-r--r--xbmc/settings/MediaSourceSettings.h75
-rw-r--r--xbmc/settings/Settings.cpp1001
-rw-r--r--xbmc/settings/Settings.h149
-rw-r--r--xbmc/settings/SkinSettings.cpp281
-rw-r--r--xbmc/settings/SkinSettings.h80
-rw-r--r--xbmc/settings/VideoSettings.cpp2
-rw-r--r--xbmc/settings/VideoSettings.h10
-rw-r--r--xbmc/settings/windows/GUIWindowSettingsCategory.cpp5
-rw-r--r--xbmc/storage/MediaManager.cpp21
-rw-r--r--xbmc/utils/HTMLUtil.cpp1
-rw-r--r--xbmc/utils/RssManager.cpp10
-rw-r--r--xbmc/utils/RssManager.h7
-rw-r--r--xbmc/utils/SaveFileStateJob.h5
-rw-r--r--xbmc/utils/ScraperParser.cpp5
-rw-r--r--xbmc/utils/ScraperParser.h2
-rw-r--r--xbmc/utils/StringUtils.cpp1
-rw-r--r--xbmc/utils/StringUtils.h1
-rw-r--r--xbmc/utils/Weather.cpp1
-rw-r--r--xbmc/utils/test/TestJobManager.cpp12
-rw-r--r--xbmc/video/GUIViewStateVideo.cpp188
-rw-r--r--xbmc/video/VideoDatabase.cpp62
-rw-r--r--xbmc/video/VideoInfoTag.cpp1
-rw-r--r--xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp44
-rw-r--r--xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp31
-rw-r--r--xbmc/video/dialogs/GUIDialogVideoInfo.cpp5
-rw-r--r--xbmc/video/dialogs/GUIDialogVideoSettings.cpp47
-rw-r--r--xbmc/video/windows/GUIWindowFullScreen.cpp183
-rw-r--r--xbmc/video/windows/GUIWindowVideoBase.cpp14
-rw-r--r--xbmc/video/windows/GUIWindowVideoNav.cpp34
-rw-r--r--xbmc/view/GUIViewState.cpp3
-rw-r--r--xbmc/view/Makefile1
-rw-r--r--xbmc/view/ViewStateSettings.cpp165
-rw-r--r--xbmc/view/ViewStateSettings.h54
-rw-r--r--xbmc/win32/WIN32Util.cpp1
-rw-r--r--xbmc/win32/XBMC_PC.rc8
-rw-r--r--xbmc/windowing/WinEvents.h2
-rw-r--r--xbmc/windowing/WinEventsLinux.cpp2
-rw-r--r--xbmc/windowing/WinEventsSDL.cpp2
-rw-r--r--xbmc/windowing/android/WinEventsAndroid.cpp2
-rw-r--r--xbmc/windowing/osx/WinEventsIOS.mm2
-rw-r--r--xbmc/windowing/windows/WinEventsWin32.cpp2
-rw-r--r--xbmc/windowing/windows/WinEventsWin32.h1
-rw-r--r--xbmc/windows/GUIMediaWindow.cpp53
-rw-r--r--xbmc/windows/GUIMediaWindow.h2
-rw-r--r--xbmc/windows/GUIWindowFileManager.cpp11
-rw-r--r--xbmc/windows/GUIWindowLoginScreen.cpp1
626 files changed, 5630 insertions, 39624 deletions
diff --git a/.gitignore b/.gitignore
index 88617d3f15..c7af9f8919 100644
--- a/.gitignore
+++ b/.gitignore
@@ -155,10 +155,6 @@ config.log
# /lib/
/lib/Makefile
-# /lib/addons/
-/lib/addons/script.module.pil/
-!/lib/addons/script.module.pil/Makefile
-
# /lib/asap/
/lib/asap/Makefile
/lib/asap/players.h
diff --git a/XBMC-ATV2.xcodeproj/project.pbxproj b/XBMC-ATV2.xcodeproj/project.pbxproj
index bf1a93917e..5e15527ebd 100644
--- a/XBMC-ATV2.xcodeproj/project.pbxproj
+++ b/XBMC-ATV2.xcodeproj/project.pbxproj
@@ -137,6 +137,10 @@
DF64FE6F16C07B2C00D028FB /* ViewDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF64FE6916C07B2C00D028FB /* ViewDatabase.cpp */; };
DF830D4815BB2CFC00602BE6 /* GUIKeyboardFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830D4515BB2CFC00602BE6 /* GUIKeyboardFactory.cpp */; };
DF830D4B15BB2D2300602BE6 /* GUIDialogKeyboardGeneric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830D4915BB2D2300602BE6 /* GUIDialogKeyboardGeneric.cpp */; };
+ DF8990041709B95B00B35C21 /* MediaSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF898FFE1709B95B00B35C21 /* MediaSettings.cpp */; };
+ DF8990051709B95B00B35C21 /* MediaSourceSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF8990001709B95B00B35C21 /* MediaSourceSettings.cpp */; };
+ DF8990061709B95B00B35C21 /* SkinSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF8990021709B95B00B35C21 /* SkinSettings.cpp */; };
+ DF8990091709B97800B35C21 /* ViewStateSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF8990071709B97800B35C21 /* ViewStateSettings.cpp */; };
DF91D899161B759B004E6637 /* AddonsOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF91D897161B759B004E6637 /* AddonsOperations.cpp */; };
DF93D7701444B09C007C6459 /* AFPFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D7381444B09C007C6459 /* AFPFile.cpp */; };
DF93D7731444B09C007C6459 /* CDDAFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D73E1444B09C007C6459 /* CDDAFile.cpp */; };
@@ -1116,7 +1120,7 @@
7CEE2E6B13D6B7A8000ABF2A /* TimeSmoother.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimeSmoother.cpp; sourceTree = "<group>"; };
7CEE2E6C13D6B7A8000ABF2A /* TimeSmoother.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimeSmoother.h; sourceTree = "<group>"; };
82F6F0EA16F269BB0081CC3C /* Buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Buffer.h; sourceTree = "<group>"; };
- 8316267613B670FF004AED87 /* README.ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.ios; sourceTree = "<group>"; };
+ 8316267613B670FF004AED87 /* README.ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.ios; path = docs/README.ios; sourceTree = SOURCE_ROOT; };
8D576316048677EA00EA77CD /* XBMC.frappliance */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XBMC.frappliance; sourceTree = BUILT_PRODUCTS_DIR; };
C807119D135DB842002F601B /* InputOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InputOperations.cpp; sourceTree = "<group>"; };
C807119E135DB842002F601B /* InputOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputOperations.h; sourceTree = "<group>"; };
@@ -1345,6 +1349,16 @@
DF830D4615BB2CFC00602BE6 /* GUIKeyboardFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboardFactory.h; sourceTree = "<group>"; };
DF830D4915BB2D2300602BE6 /* GUIDialogKeyboardGeneric.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogKeyboardGeneric.cpp; sourceTree = "<group>"; };
DF830D4A15BB2D2300602BE6 /* GUIDialogKeyboardGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogKeyboardGeneric.h; sourceTree = "<group>"; };
+ DF898FFC1709B95B00B35C21 /* ISettingsHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISettingsHandler.h; sourceTree = "<group>"; };
+ DF898FFD1709B95B00B35C21 /* ISubSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISubSettings.h; sourceTree = "<group>"; };
+ DF898FFE1709B95B00B35C21 /* MediaSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSettings.cpp; sourceTree = "<group>"; };
+ DF898FFF1709B95B00B35C21 /* MediaSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSettings.h; sourceTree = "<group>"; };
+ DF8990001709B95B00B35C21 /* MediaSourceSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSourceSettings.cpp; sourceTree = "<group>"; };
+ DF8990011709B95B00B35C21 /* MediaSourceSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSourceSettings.h; sourceTree = "<group>"; };
+ DF8990021709B95B00B35C21 /* SkinSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkinSettings.cpp; sourceTree = "<group>"; };
+ DF8990031709B95B00B35C21 /* SkinSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkinSettings.h; sourceTree = "<group>"; };
+ DF8990071709B97800B35C21 /* ViewStateSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewStateSettings.cpp; sourceTree = "<group>"; };
+ DF8990081709B97800B35C21 /* ViewStateSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewStateSettings.h; sourceTree = "<group>"; };
DF91D897161B759B004E6637 /* AddonsOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AddonsOperations.cpp; sourceTree = "<group>"; };
DF91D898161B759B004E6637 /* AddonsOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddonsOperations.h; sourceTree = "<group>"; };
DF93D7381444B09C007C6459 /* AFPFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AFPFile.cpp; sourceTree = "<group>"; };
@@ -3269,8 +3283,6 @@
089C166AFE841209C02AAC07 /* XBMC-frapp */ = {
isa = PBXGroup;
children = (
- DFC539391526659D00D5FD5C /* AppIcon.png */,
- 8316267513B670D7004AED87 /* Documentation */,
F56C704E131EC150000AD0F6 /* Source */,
F589AE6D12890B6700D8079E /* Internal Libs */,
F5899DC91287212700D8079E /* System Libs and Frameworks */,
@@ -3287,12 +3299,12 @@
name = Products;
sourceTree = "<group>";
};
- 8316267513B670D7004AED87 /* Documentation */ = {
+ 8316267513B670D7004AED87 /* docs */ = {
isa = PBXGroup;
children = (
8316267613B670FF004AED87 /* README.ios */,
);
- name = Documentation;
+ name = docs;
sourceTree = "<group>";
};
C8B92A7415735D0300284190 /* epg */ = {
@@ -3591,6 +3603,8 @@
DF64FE6916C07B2C00D028FB /* ViewDatabase.cpp */,
DF64FE6A16C07B2C00D028FB /* ViewDatabase.h */,
DF64FE6B16C07B2C00D028FB /* ViewState.h */,
+ DF8990071709B97800B35C21 /* ViewStateSettings.cpp */,
+ DF8990081709B97800B35C21 /* ViewStateSettings.h */,
);
path = view;
sourceTree = "<group>";
@@ -3785,7 +3799,9 @@
F56C704E131EC150000AD0F6 /* Source */ = {
isa = PBXGroup;
children = (
+ 8316267513B670D7004AED87 /* docs */,
F56C704F131EC150000AD0F6 /* lib */,
+ F5E3CD4D170794640059B179 /* media */,
F56C71D7131EC151000AD0F6 /* xbmc */,
);
name = Source;
@@ -5653,10 +5669,18 @@
F56C76D4131EC153000AD0F6 /* AdvancedSettings.h */,
F56C76D1131EC153000AD0F6 /* GUISettings.cpp */,
F56C76D2131EC153000AD0F6 /* GUISettings.h */,
+ DF898FFC1709B95B00B35C21 /* ISettingsHandler.h */,
+ DF898FFD1709B95B00B35C21 /* ISubSettings.h */,
+ DF898FFE1709B95B00B35C21 /* MediaSettings.cpp */,
+ DF898FFF1709B95B00B35C21 /* MediaSettings.h */,
+ DF8990001709B95B00B35C21 /* MediaSourceSettings.cpp */,
+ DF8990011709B95B00B35C21 /* MediaSourceSettings.h */,
F56C76DD131EC153000AD0F6 /* Profile.cpp */,
F56C76DE131EC153000AD0F6 /* Profile.h */,
F56C76DF131EC153000AD0F6 /* Settings.cpp */,
F56C76E0131EC153000AD0F6 /* Settings.h */,
+ DF8990021709B95B00B35C21 /* SkinSettings.cpp */,
+ DF8990031709B95B00B35C21 /* SkinSettings.h */,
F56C76E3131EC153000AD0F6 /* VideoSettings.cpp */,
F56C76E4131EC153000AD0F6 /* VideoSettings.h */,
);
@@ -6517,6 +6541,14 @@
path = dialogs;
sourceTree = "<group>";
};
+ F5E3CD4D170794640059B179 /* media */ = {
+ isa = PBXGroup;
+ children = (
+ DFC539391526659D00D5FD5C /* AppIcon.png */,
+ );
+ name = media;
+ sourceTree = "<group>";
+ };
F5E6209C13E9081400D5F2CD /* info */ = {
isa = PBXGroup;
children = (
@@ -6625,7 +6657,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "if [ -d \"/Users/Shared/xbmc-depends/buildtools-native/bin\" ]; then\nPATH=$PATH:/Users/Shared/xbmc-depends/buildtools-native/bin\nelse\nPATH=$PATH:/Users/Shared/xbmc-depends/toolchain/bin\nfi\n\nif [ \"$ACTION\" = build ] ; then\nmake -f ${SRCROOT}/codegenerator.mk\nfi";
+ shellScript = "if [ -d \"$XBMC_DEPENDS_ROOT/buildtools-native/bin\" ]; then\nPATH=$PATH:$XBMC_DEPENDS_ROOT/buildtools-native/bin\nelse\nPATH=$PATH:$XBMC_DEPENDS_ROOT/toolchain/bin\nfi\n\nif [ \"$ACTION\" = build ] ; then\nmake -f ${SRCROOT}/codegenerator.mk\nfi";
};
F589B48B128A696700D8079E /* copy root files */ = {
isa = PBXShellScriptBuildPhase;
@@ -6654,7 +6686,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "#set -x\n\nfunction check_dyloaded_depends\n{\n b=$(find \"$EXTERNAL_LIBS\" -name $1 -print)\n if [ -f \"$b\" ]; then\n #echo \"Processing $b\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $b)\" ]; then\n echo \" Packaging $b\"\n cp -f \"$b\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n if [ -f \"$a\" ]; then\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n fi\n done \n fi\n}\n\nfunction check_xbmc_dylib_depends\n{\n REWIND=\"1\"\n while [ $REWIND = \"1\" ]\n do\n let REWIND=\"0\"\n for b in $(find \"$1\" -type f -name \"$2\" -print) ; do\n #echo \"Processing $b\"\n install_name_tool -id \"$(basename $b)\" \"$b\"\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n #echo \" Packaging $a\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n let REWIND=\"1\"\n fi\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$b\"\n done\n done\n done\n}\n\nEXTERNAL_LIBS=/Users/Shared/xbmc-depends/\"$SDK_NAME\"_\"$CURRENT_ARCH\"-target\n\nTARGET_NAME=$PRODUCT_NAME.$WRAPPER_EXTENSION\nTARGET_CONTENTS=$TARGET_BUILD_DIR/$TARGET_NAME\n\nTARGET_BINARY=$TARGET_CONTENTS/XBMC\nTARGET_FRAMEWORKS=$TARGET_CONTENTS/Frameworks\nDYLIB_NAMEPATH=@executable_path/Appliances/XBMC.frappliance/Frameworks\nXBMC_HOME=$TARGET_CONTENTS/XBMCData/XBMCHome\n\nmkdir -p \"$TARGET_CONTENTS\"\nmkdir -p \"$TARGET_CONTENTS/XBMCData/XBMCHome\"\n# start clean so we don't keep old dylibs\nrm -rf \"$TARGET_CONTENTS/Frameworks\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks\"\n\necho \"Package $TARGET_BUILD_DIR/XBMC\"\n\n# Copy all of XBMC's dylib dependencies and rename their locations to inside the Framework\necho \"Checking $TARGET_BINARY dylib dependencies\"\nfor a in $(otool -L \"$TARGET_BINARY\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do \n\techo \" Packaging $a\"\n\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_BINARY\"\ndone\n\nif [ \"$SDK_NAME\" = \"iphoneos6.0\" ] ; then\n\techo \"Fixing $TARGET_BINARY VideoToolbox dylib name\"\n VTB_SDK6=/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox\n VTB_SDK5=/System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox\n\tinstall_name_tool -change \"$VTB_SDK6\" \"$VTB_SDK5\" \"$TARGET_BINARY\"\nfi\n\necho \"Package $EXTERNAL_LIBS/lib/python2.6\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks/lib\"\nPYTHONSYNC=\"rsync -aq --exclude .DS_Store --exclude *.a --exclude *.exe --exclude test --exclude tests\"\n${PYTHONSYNC} \"$EXTERNAL_LIBS/lib/python2.6\" \"$TARGET_FRAMEWORKS/lib/\"\nrm -rf \"$TARGET_FRAMEWORKS/lib/python2.6/config\"\n\necho \"Checking $TARGET_FRAMEWORKS/lib/python2.6 *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$TARGET_FRAMEWORKS\"/lib/python2.6 \"*.so\"\n\necho \"Checking $XBMC_HOME/system *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/system \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.pvr for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.pvr\"\n\necho \"Checking $XBMC_HOME/addons *.xbs for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.xbs\"\n\necho \"Checking xbmc/DllPaths_generated.h for dylib dependencies\"\nfor a in $(grep .dylib \"$SRCROOT\"/xbmc/DllPaths_generated.h | awk '{print $3}' | sed s/\\\"//g) ; do\n check_dyloaded_depends $a\ndone\n\necho \"Checking $TARGET_FRAMEWORKS for missing dylib dependencies\"\nREWIND=\"1\"\nwhile [ $REWIND = \"1\" ]\ndo\n\tlet REWIND=\"0\"\n\tfor b in \"$TARGET_FRAMEWORKS/\"*dylib* ; do\n\t\t#echo \" Processing $b\"\n\t\tfor a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n\t\t\t#echo \"Processing $a\"\n\t\t\tif [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n\t\t\t\techo \" Packaging $a\"\n\t\t\t\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\t\t\t\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\t\t\t\tlet REWIND=\"1\"\n\t\t\tfi\n\t\t\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n\t\tdone \n\tdone\ndone\n";
+ shellScript = "#set -x\n\nfunction check_dyloaded_depends\n{\n b=$(find \"$EXTERNAL_LIBS\" -name $1 -print)\n if [ -f \"$b\" ]; then\n #echo \"Processing $b\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $b)\" ]; then\n echo \" Packaging $b\"\n cp -f \"$b\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n if [ -f \"$a\" ]; then\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n fi\n done \n fi\n}\n\nfunction check_xbmc_dylib_depends\n{\n REWIND=\"1\"\n while [ $REWIND = \"1\" ]\n do\n let REWIND=\"0\"\n for b in $(find \"$1\" -type f -name \"$2\" -print) ; do\n #echo \"Processing $b\"\n install_name_tool -id \"$(basename $b)\" \"$b\"\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n #echo \" Packaging $a\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n let REWIND=\"1\"\n fi\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$b\"\n done\n done\n done\n}\n\nEXTERNAL_LIBS=$XBMC_DEPENDS\n\nTARGET_NAME=$PRODUCT_NAME.$WRAPPER_EXTENSION\nTARGET_CONTENTS=$TARGET_BUILD_DIR/$TARGET_NAME\n\nTARGET_BINARY=$TARGET_CONTENTS/XBMC\nTARGET_FRAMEWORKS=$TARGET_CONTENTS/Frameworks\nDYLIB_NAMEPATH=@executable_path/Appliances/XBMC.frappliance/Frameworks\nXBMC_HOME=$TARGET_CONTENTS/XBMCData/XBMCHome\n\nmkdir -p \"$TARGET_CONTENTS\"\nmkdir -p \"$TARGET_CONTENTS/XBMCData/XBMCHome\"\n# start clean so we don't keep old dylibs\nrm -rf \"$TARGET_CONTENTS/Frameworks\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks\"\n\necho \"Package $TARGET_BUILD_DIR/XBMC\"\n\n# Copy all of XBMC's dylib dependencies and rename their locations to inside the Framework\necho \"Checking $TARGET_BINARY dylib dependencies\"\nfor a in $(otool -L \"$TARGET_BINARY\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do \n\techo \" Packaging $a\"\n\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_BINARY\"\ndone\n\nif [ \"$SDK_NAME\" = \"iphoneos6.0\" ] ; then\n\techo \"Fixing $TARGET_BINARY VideoToolbox dylib name\"\n VTB_SDK6=/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox\n VTB_SDK5=/System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox\n\tinstall_name_tool -change \"$VTB_SDK6\" \"$VTB_SDK5\" \"$TARGET_BINARY\"\nfi\n\necho \"Package $EXTERNAL_LIBS/lib/python2.6\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks/lib\"\nPYTHONSYNC=\"rsync -aq --exclude .DS_Store --exclude *.a --exclude *.exe --exclude test --exclude tests\"\n${PYTHONSYNC} \"$EXTERNAL_LIBS/lib/python2.6\" \"$TARGET_FRAMEWORKS/lib/\"\nrm -rf \"$TARGET_FRAMEWORKS/lib/python2.6/config\"\n\necho \"Checking $TARGET_FRAMEWORKS/lib/python2.6 *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$TARGET_FRAMEWORKS\"/lib/python2.6 \"*.so\"\n\necho \"Checking $XBMC_HOME/system *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/system \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.pvr for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.pvr\"\n\necho \"Checking $XBMC_HOME/addons *.xbs for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.xbs\"\n\necho \"Checking xbmc/DllPaths_generated.h for dylib dependencies\"\nfor a in $(grep .dylib \"$SRCROOT\"/xbmc/DllPaths_generated.h | awk '{print $3}' | sed s/\\\"//g) ; do\n check_dyloaded_depends $a\ndone\n\necho \"Checking $TARGET_FRAMEWORKS for missing dylib dependencies\"\nREWIND=\"1\"\nwhile [ $REWIND = \"1\" ]\ndo\n\tlet REWIND=\"0\"\n\tfor b in \"$TARGET_FRAMEWORKS/\"*dylib* ; do\n\t\t#echo \" Processing $b\"\n\t\tfor a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n\t\t\t#echo \"Processing $a\"\n\t\t\tif [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n\t\t\t\techo \" Packaging $a\"\n\t\t\t\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\t\t\t\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\t\t\t\tlet REWIND=\"1\"\n\t\t\tfi\n\t\t\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n\t\tdone \n\tdone\ndone\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -7661,6 +7693,10 @@
F563532416E5446C00D21BAD /* GUIWindowTestPattern.cpp in Sources */,
F563532716E5447C00D21BAD /* AppParamParser.cpp in Sources */,
DFAF6A6216EBAED000D6AE12 /* RssManager.cpp in Sources */,
+ DF8990041709B95B00B35C21 /* MediaSettings.cpp in Sources */,
+ DF8990051709B95B00B35C21 /* MediaSourceSettings.cpp in Sources */,
+ DF8990061709B95B00B35C21 /* SkinSettings.cpp in Sources */,
+ DF8990091709B97800B35C21 /* ViewStateSettings.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -7803,7 +7839,8 @@
USER_HEADER_SEARCH_PATHS = "$XBMC_DEPENDS/include $XBMC_DEPENDS/include/mysql $XBMC_DEPENDS/include/freetype2 $XBMC_DEPENDS/include/python2.6";
WARNING_CFLAGS = "";
WRAPPER_EXTENSION = frappliance;
- XBMC_DEPENDS = "/Users/Shared/xbmc-depends/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
};
name = Debug;
};
@@ -7932,7 +7969,8 @@
USER_HEADER_SEARCH_PATHS = "$XBMC_DEPENDS/include $XBMC_DEPENDS/include/mysql $XBMC_DEPENDS/include/freetype2 $XBMC_DEPENDS/include/python2.6";
WARNING_CFLAGS = "";
WRAPPER_EXTENSION = frappliance;
- XBMC_DEPENDS = "/Users/Shared/xbmc-depends/$(SDK_NAME)_$(ARCHS)-target";
+ XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(ARCHS)-target";
+ XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
};
name = Release;
};
diff --git a/XBMC-IOS.xcodeproj/project.pbxproj b/XBMC-IOS.xcodeproj/project.pbxproj
index 577c2344c8..79c8fe0051 100644
--- a/XBMC-IOS.xcodeproj/project.pbxproj
+++ b/XBMC-IOS.xcodeproj/project.pbxproj
@@ -143,6 +143,10 @@
DF64FE5916C07AF700D028FB /* ViewDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF64FE5316C07AF700D028FB /* ViewDatabase.cpp */; };
DF830C9515BB20FC00602BE6 /* GUIDialogKeyboardGeneric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830C9315BB20FC00602BE6 /* GUIDialogKeyboardGeneric.cpp */; };
DF830C9E15BB215500602BE6 /* GUIKeyboardFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830C9C15BB215500602BE6 /* GUIKeyboardFactory.cpp */; };
+ DF898FC21709B8E600B35C21 /* MediaSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF898FBC1709B8E600B35C21 /* MediaSettings.cpp */; };
+ DF898FC31709B8E600B35C21 /* MediaSourceSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF898FBE1709B8E600B35C21 /* MediaSourceSettings.cpp */; };
+ DF898FC41709B8E600B35C21 /* SkinSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF898FC01709B8E600B35C21 /* SkinSettings.cpp */; };
+ DF898FC71709B90400B35C21 /* ViewStateSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF898FC51709B90400B35C21 /* ViewStateSettings.cpp */; };
DF91D88A161B7581004E6637 /* AddonsOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF91D888161B7581004E6637 /* AddonsOperations.cpp */; };
DF93D7CF1444B105007C6459 /* AFPFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D7971444B105007C6459 /* AFPFile.cpp */; };
DF93D7D21444B105007C6459 /* CDDAFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D79D1444B105007C6459 /* CDDAFile.cpp */; };
@@ -1135,7 +1139,7 @@
8253940416B25C2C00A85509 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
8253940616B25C2C00A85509 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
82F6F0EA16F269BB0081CC3C /* Buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Buffer.h; sourceTree = "<group>"; };
- 83D619BB13C0D25300418A0F /* README.ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.ios; sourceTree = "<group>"; };
+ 83D619BB13C0D25300418A0F /* README.ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.ios; path = docs/README.ios; sourceTree = "<group>"; };
8D576316048677EA00EA77CD /* XBMC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XBMC.app; sourceTree = BUILT_PRODUCTS_DIR; };
C80711AB135DB85F002F601B /* InputOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InputOperations.cpp; sourceTree = "<group>"; };
C80711AC135DB85F002F601B /* InputOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputOperations.h; sourceTree = "<group>"; };
@@ -1366,6 +1370,16 @@
DF830C9415BB20FC00602BE6 /* GUIDialogKeyboardGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogKeyboardGeneric.h; sourceTree = "<group>"; };
DF830C9C15BB215500602BE6 /* GUIKeyboardFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIKeyboardFactory.cpp; sourceTree = "<group>"; };
DF830C9D15BB215500602BE6 /* GUIKeyboardFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboardFactory.h; sourceTree = "<group>"; };
+ DF898FBA1709B8E600B35C21 /* ISettingsHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISettingsHandler.h; sourceTree = "<group>"; };
+ DF898FBB1709B8E600B35C21 /* ISubSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISubSettings.h; sourceTree = "<group>"; };
+ DF898FBC1709B8E600B35C21 /* MediaSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSettings.cpp; sourceTree = "<group>"; };
+ DF898FBD1709B8E600B35C21 /* MediaSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSettings.h; sourceTree = "<group>"; };
+ DF898FBE1709B8E600B35C21 /* MediaSourceSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSourceSettings.cpp; sourceTree = "<group>"; };
+ DF898FBF1709B8E600B35C21 /* MediaSourceSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSourceSettings.h; sourceTree = "<group>"; };
+ DF898FC01709B8E600B35C21 /* SkinSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkinSettings.cpp; sourceTree = "<group>"; };
+ DF898FC11709B8E600B35C21 /* SkinSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkinSettings.h; sourceTree = "<group>"; };
+ DF898FC51709B90400B35C21 /* ViewStateSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewStateSettings.cpp; sourceTree = "<group>"; };
+ DF898FC61709B90400B35C21 /* ViewStateSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewStateSettings.h; sourceTree = "<group>"; };
DF91D888161B7581004E6637 /* AddonsOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AddonsOperations.cpp; sourceTree = "<group>"; };
DF91D889161B7581004E6637 /* AddonsOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddonsOperations.h; sourceTree = "<group>"; };
DF93D7971444B105007C6459 /* AFPFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AFPFile.cpp; sourceTree = "<group>"; };
@@ -1548,7 +1562,7 @@
DFDB00211516403A005079A4 /* FileCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileCache.h; sourceTree = "<group>"; };
DFDB00221516403A005079A4 /* MemBufferCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemBufferCache.cpp; sourceTree = "<group>"; };
DFDB00231516403A005079A4 /* MemBufferCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemBufferCache.h; sourceTree = "<group>"; };
- DFDD077216C0B58B000A1F73 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "xbmc/osx/ios/Default-568h@2x.png"; sourceTree = "<group>"; };
+ DFDD077216C0B58B000A1F73 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
DFE350591532535500F84CAA /* IOSKeyboardView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSKeyboardView.h; sourceTree = "<group>"; };
DFE3505A1532535500F84CAA /* IOSKeyboardView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IOSKeyboardView.mm; sourceTree = "<group>"; };
DFF7A91F15F7C62900D316E9 /* PltMimeType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PltMimeType.cpp; sourceTree = "<group>"; };
@@ -3295,8 +3309,6 @@
089C166AFE841209C02AAC07 /* XBMC-frapp */ = {
isa = PBXGroup;
children = (
- DFDD077216C0B58B000A1F73 /* Default-568h@2x.png */,
- 83D619BA13C0D23400418A0F /* Documentation */,
F56C8034131F42E5000AD0F6 /* Source */,
F589AE6D12890B6700D8079E /* Internal Libs */,
F5899DC91287212700D8079E /* System Libs and Frameworks */,
@@ -3335,12 +3347,12 @@
path = generic;
sourceTree = "<group>";
};
- 83D619BA13C0D23400418A0F /* Documentation */ = {
+ 83D619BA13C0D23400418A0F /* docs */ = {
isa = PBXGroup;
children = (
83D619BB13C0D25300418A0F /* README.ios */,
);
- name = Documentation;
+ name = docs;
sourceTree = "<group>";
};
C8B929C21573557B00284190 /* epg */ = {
@@ -3639,6 +3651,8 @@
DF64FE5316C07AF700D028FB /* ViewDatabase.cpp */,
DF64FE5416C07AF700D028FB /* ViewDatabase.h */,
DF64FE5516C07AF700D028FB /* ViewState.h */,
+ DF898FC51709B90400B35C21 /* ViewStateSettings.cpp */,
+ DF898FC61709B90400B35C21 /* ViewStateSettings.h */,
);
path = view;
sourceTree = "<group>";
@@ -3833,6 +3847,7 @@
F56C8034131F42E5000AD0F6 /* Source */ = {
isa = PBXGroup;
children = (
+ 83D619BA13C0D23400418A0F /* docs */,
F56C8035131F42E5000AD0F6 /* lib */,
F56C81B9131F42E6000AD0F6 /* xbmc */,
);
@@ -6065,10 +6080,18 @@
F56C86BF131F42EB000AD0F6 /* AdvancedSettings.h */,
F56C86BC131F42EB000AD0F6 /* GUISettings.cpp */,
F56C86BD131F42EB000AD0F6 /* GUISettings.h */,
+ DF898FBA1709B8E600B35C21 /* ISettingsHandler.h */,
+ DF898FBB1709B8E600B35C21 /* ISubSettings.h */,
+ DF898FBC1709B8E600B35C21 /* MediaSettings.cpp */,
+ DF898FBD1709B8E600B35C21 /* MediaSettings.h */,
+ DF898FBE1709B8E600B35C21 /* MediaSourceSettings.cpp */,
+ DF898FBF1709B8E600B35C21 /* MediaSourceSettings.h */,
F56C86C8131F42EB000AD0F6 /* Profile.cpp */,
F56C86C9131F42EB000AD0F6 /* Profile.h */,
F56C86CA131F42EB000AD0F6 /* Settings.cpp */,
F56C86CB131F42EB000AD0F6 /* Settings.h */,
+ DF898FC01709B8E600B35C21 /* SkinSettings.cpp */,
+ DF898FC11709B8E600B35C21 /* SkinSettings.h */,
F56C86CE131F42EB000AD0F6 /* VideoSettings.cpp */,
F56C86CF131F42EB000AD0F6 /* VideoSettings.h */,
);
@@ -6408,6 +6431,7 @@
isa = PBXGroup;
children = (
F56C8BB6131F44AA000AD0F6 /* English.lproj */,
+ DFDD077216C0B58B000A1F73 /* Default-568h@2x.png */,
DF02A887153382A60084754E /* IOSKeyboard.mm */,
DF02A881153382560084754E /* IOSKeyboard.h */,
DFE350591532535500F84CAA /* IOSKeyboardView.h */,
@@ -6699,7 +6723,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "if [ -d \"/Users/Shared/xbmc-depends/buildtools-native/bin\" ]; then\nPATH=$PATH:/Users/Shared/xbmc-depends/buildtools-native/bin\nelse\nPATH=$PATH:/Users/Shared/xbmc-depends/toolchain/bin\nfi\n\nif [ \"$ACTION\" = build ] ; then\nmake -f ${SRCROOT}/codegenerator.mk\nfi";
+ shellScript = "if [ -d \"$XBMC_DEPENDS_ROOT/buildtools-native/bin\" ]; then\nPATH=$PATH:$XBMC_DEPENDS_ROOT/buildtools-native/bin\nelse\nPATH=$PATH:$XBMC_DEPENDS_ROOT/toolchain/bin\nfi\n\nif [ \"$ACTION\" = build ] ; then\nmake -f ${SRCROOT}/codegenerator.mk\nfi";
};
F589B48B128A696700D8079E /* copy root files */ = {
isa = PBXShellScriptBuildPhase;
@@ -6728,7 +6752,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "#set -x\n\nfunction check_dyloaded_depends\n{\n b=$(find \"$EXTERNAL_LIBS\" -name $1 -print)\n if [ -f \"$b\" ]; then\n #echo \"Processing $b\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $b)\" ]; then\n echo \" Packaging $b\"\n cp -f \"$b\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n if [ -f \"$a\" ]; then\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n fi\n done \n fi\n}\n\nfunction check_xbmc_dylib_depends\n{\n REWIND=\"1\"\n while [ $REWIND = \"1\" ]\n do\n let REWIND=\"0\"\n for b in $(find \"$1\" -type f -name \"$2\" -print) ; do\n #echo \"Processing $b\"\n install_name_tool -id \"$(basename $b)\" \"$b\"\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n #echo \" Packaging $a\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n let REWIND=\"1\"\n fi\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$b\"\n done\n done\n done\n}\n\nEXTERNAL_LIBS=/Users/Shared/xbmc-depends/\"$SDK_NAME\"_\"$CURRENT_ARCH\"-target\n\nTARGET_NAME=$PRODUCT_NAME.$WRAPPER_EXTENSION\nTARGET_CONTENTS=$TARGET_BUILD_DIR/$TARGET_NAME\n\nTARGET_BINARY=$TARGET_CONTENTS/XBMC\nTARGET_FRAMEWORKS=$TARGET_CONTENTS/Frameworks\nDYLIB_NAMEPATH=@executable_path/Frameworks\nXBMC_HOME=$TARGET_CONTENTS/XBMCData/XBMCHome\n\nmkdir -p \"$TARGET_CONTENTS\"\nmkdir -p \"$TARGET_CONTENTS/XBMCData/XBMCHome\"\n# start clean so we don't keep old dylibs\nrm -rf \"$TARGET_CONTENTS/Frameworks\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks\"\n\necho \"Package $TARGET_BUILD_DIR/XBMC\"\n\n# Copy all of XBMC's dylib dependencies and rename their locations to inside the Framework\necho \"Checking $TARGET_BINARY dylib dependencies\"\nfor a in $(otool -L \"$TARGET_BINARY\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do \n\techo \" Packaging $a\"\n\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_BINARY\"\ndone\n\nif [ \"$SDK_NAME\" = \"iphoneos6.0\" ] ; then\n\techo \"Fixing $TARGET_BINARY VideoToolbox dylib name\"\n VTB_SDK6=/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox\n VTB_SDK5=/System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox\n\tinstall_name_tool -change \"$VTB_SDK6\" \"$VTB_SDK5\" \"$TARGET_BINARY\"\nfi\n\necho \"Package $EXTERNAL_LIBS/lib/python2.6\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks/lib\"\nPYTHONSYNC=\"rsync -aq --exclude .DS_Store --exclude *.a --exclude *.exe --exclude test --exclude tests\"\n${PYTHONSYNC} \"$EXTERNAL_LIBS/lib/python2.6\" \"$TARGET_FRAMEWORKS/lib/\"\nrm -rf \"$TARGET_FRAMEWORKS/lib/python2.6/config\"\n\necho \"Checking $TARGET_FRAMEWORKS/lib/python2.6 *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$TARGET_FRAMEWORKS\"/lib/python2.6 \"*.so\"\n\necho \"Checking $XBMC_HOME/system *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/system \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.pvr for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.pvr\"\n\necho \"Checking $XBMC_HOME/addons *.xbs for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.xbs\"\n\necho \"Checking xbmc/DllPaths_generated.h for dylib dependencies\"\nfor a in $(grep .dylib \"$SRCROOT\"/xbmc/DllPaths_generated.h | awk '{print $3}' | sed s/\\\"//g) ; do\n check_dyloaded_depends $a\ndone\n\necho \"Checking $TARGET_FRAMEWORKS for missing dylib dependencies\"\nREWIND=\"1\"\nwhile [ $REWIND = \"1\" ]\ndo\n\tlet REWIND=\"0\"\n\tfor b in \"$TARGET_FRAMEWORKS/\"*dylib* ; do\n\t\t#echo \" Processing $b\"\n\t\tfor a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n\t\t\t#echo \"Processing $a\"\n\t\t\tif [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n\t\t\t\techo \" Packaging $a\"\n\t\t\t\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\t\t\t\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\t\t\t\tlet REWIND=\"1\"\n\t\t\tfi\n\t\t\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n\t\tdone \n\tdone\ndone\n";
+ shellScript = "#set -x\n\nfunction check_dyloaded_depends\n{\n b=$(find \"$EXTERNAL_LIBS\" -name $1 -print)\n if [ -f \"$b\" ]; then\n #echo \"Processing $b\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $b)\" ]; then\n echo \" Packaging $b\"\n cp -f \"$b\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n if [ -f \"$a\" ]; then\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n fi\n done \n fi\n}\n\nfunction check_xbmc_dylib_depends\n{\n REWIND=\"1\"\n while [ $REWIND = \"1\" ]\n do\n let REWIND=\"0\"\n for b in $(find \"$1\" -type f -name \"$2\" -print) ; do\n #echo \"Processing $b\"\n install_name_tool -id \"$(basename $b)\" \"$b\"\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n #echo \" Packaging $a\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n let REWIND=\"1\"\n fi\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$b\"\n done\n done\n done\n}\n\nEXTERNAL_LIBS=$XBMC_DEPENDS\n\nTARGET_NAME=$PRODUCT_NAME.$WRAPPER_EXTENSION\nTARGET_CONTENTS=$TARGET_BUILD_DIR/$TARGET_NAME\n\nTARGET_BINARY=$TARGET_CONTENTS/XBMC\nTARGET_FRAMEWORKS=$TARGET_CONTENTS/Frameworks\nDYLIB_NAMEPATH=@executable_path/Frameworks\nXBMC_HOME=$TARGET_CONTENTS/XBMCData/XBMCHome\n\nmkdir -p \"$TARGET_CONTENTS\"\nmkdir -p \"$TARGET_CONTENTS/XBMCData/XBMCHome\"\n# start clean so we don't keep old dylibs\nrm -rf \"$TARGET_CONTENTS/Frameworks\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks\"\n\necho \"Package $TARGET_BUILD_DIR/XBMC\"\n\n# Copy all of XBMC's dylib dependencies and rename their locations to inside the Framework\necho \"Checking $TARGET_BINARY dylib dependencies\"\nfor a in $(otool -L \"$TARGET_BINARY\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do \n\techo \" Packaging $a\"\n\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_BINARY\"\ndone\n\nif [ \"$SDK_NAME\" = \"iphoneos6.0\" ] ; then\n\techo \"Fixing $TARGET_BINARY VideoToolbox dylib name\"\n VTB_SDK6=/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox\n VTB_SDK5=/System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox\n\tinstall_name_tool -change \"$VTB_SDK6\" \"$VTB_SDK5\" \"$TARGET_BINARY\"\nfi\n\necho \"Package $EXTERNAL_LIBS/lib/python2.6\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks/lib\"\nPYTHONSYNC=\"rsync -aq --exclude .DS_Store --exclude *.a --exclude *.exe --exclude test --exclude tests\"\n${PYTHONSYNC} \"$EXTERNAL_LIBS/lib/python2.6\" \"$TARGET_FRAMEWORKS/lib/\"\nrm -rf \"$TARGET_FRAMEWORKS/lib/python2.6/config\"\n\necho \"Checking $TARGET_FRAMEWORKS/lib/python2.6 *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$TARGET_FRAMEWORKS\"/lib/python2.6 \"*.so\"\n\necho \"Checking $XBMC_HOME/system *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/system \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.pvr for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.pvr\"\n\necho \"Checking $XBMC_HOME/addons *.xbs for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.xbs\"\n\necho \"Checking xbmc/DllPaths_generated.h for dylib dependencies\"\nfor a in $(grep .dylib \"$SRCROOT\"/xbmc/DllPaths_generated.h | awk '{print $3}' | sed s/\\\"//g) ; do\n check_dyloaded_depends $a\ndone\n\necho \"Checking $TARGET_FRAMEWORKS for missing dylib dependencies\"\nREWIND=\"1\"\nwhile [ $REWIND = \"1\" ]\ndo\n\tlet REWIND=\"0\"\n\tfor b in \"$TARGET_FRAMEWORKS/\"*dylib* ; do\n\t\t#echo \" Processing $b\"\n\t\tfor a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n\t\t\t#echo \"Processing $a\"\n\t\t\tif [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n\t\t\t\techo \" Packaging $a\"\n\t\t\t\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\t\t\t\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\t\t\t\tlet REWIND=\"1\"\n\t\t\tfi\n\t\t\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n\t\tdone \n\tdone\ndone\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -7740,6 +7764,10 @@
1D04C23B16E67BA20001BA1E /* GenericTouchActionHandler.cpp in Sources */,
1D04C24116E67BA20001BA1E /* ITouchInputHandling.cpp in Sources */,
DFAF6A6D16EBAF4800D6AE12 /* RssManager.cpp in Sources */,
+ DF898FC21709B8E600B35C21 /* MediaSettings.cpp in Sources */,
+ DF898FC31709B8E600B35C21 /* MediaSourceSettings.cpp in Sources */,
+ DF898FC41709B8E600B35C21 /* SkinSettings.cpp in Sources */,
+ DF898FC71709B90400B35C21 /* ViewStateSettings.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -7879,7 +7907,8 @@
VALIDATE_PRODUCT = NO;
WARNING_CFLAGS = "";
WRAPPER_EXTENSION = app;
- XBMC_DEPENDS = "/Users/Shared/xbmc-depends/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
};
name = Debug;
};
@@ -8007,7 +8036,8 @@
VALIDATE_PRODUCT = NO;
WARNING_CFLAGS = "";
WRAPPER_EXTENSION = app;
- XBMC_DEPENDS = "/Users/Shared/xbmc-depends/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
};
name = Release;
};
diff --git a/XBMC.xcodeproj/project.pbxproj b/XBMC.xcodeproj/project.pbxproj
index fde599e2d7..cf937da9d7 100644
--- a/XBMC.xcodeproj/project.pbxproj
+++ b/XBMC.xcodeproj/project.pbxproj
@@ -404,6 +404,10 @@
DF673AA51443819600A5A509 /* AddonManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18B49FF41152BFA5001AF8A6 /* AddonManager.cpp */; };
DF830D0C15BB260C00602BE6 /* GUIDialogKeyboardGeneric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830D0A15BB260C00602BE6 /* GUIDialogKeyboardGeneric.cpp */; };
DF830D1215BB262700602BE6 /* GUIKeyboardFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830D0F15BB262700602BE6 /* GUIKeyboardFactory.cpp */; };
+ DF89901C1709BB2D00B35C21 /* MediaSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF8990161709BB2D00B35C21 /* MediaSettings.cpp */; };
+ DF89901D1709BB2D00B35C21 /* MediaSourceSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF8990181709BB2D00B35C21 /* MediaSourceSettings.cpp */; };
+ DF89901E1709BB2D00B35C21 /* SkinSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF89901A1709BB2D00B35C21 /* SkinSettings.cpp */; };
+ DF8990211709BB5400B35C21 /* ViewStateSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF89901F1709BB5400B35C21 /* ViewStateSettings.cpp */; };
DF93D65D1444A7A3007C6459 /* SlingboxDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D65C1444A7A3007C6459 /* SlingboxDirectory.cpp */; };
DF93D6991444A8B1007C6459 /* AFPFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6631444A8B0007C6459 /* AFPFile.cpp */; };
DF93D69A1444A8B1007C6459 /* DirectoryCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6651444A8B0007C6459 /* DirectoryCache.cpp */; };
@@ -1930,6 +1934,16 @@
DF830D0E15BB262700602BE6 /* GUIKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboard.h; sourceTree = "<group>"; };
DF830D0F15BB262700602BE6 /* GUIKeyboardFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIKeyboardFactory.cpp; sourceTree = "<group>"; };
DF830D1015BB262700602BE6 /* GUIKeyboardFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboardFactory.h; sourceTree = "<group>"; };
+ DF8990141709BB2D00B35C21 /* ISettingsHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISettingsHandler.h; sourceTree = "<group>"; };
+ DF8990151709BB2D00B35C21 /* ISubSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISubSettings.h; sourceTree = "<group>"; };
+ DF8990161709BB2D00B35C21 /* MediaSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSettings.cpp; sourceTree = "<group>"; };
+ DF8990171709BB2D00B35C21 /* MediaSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSettings.h; sourceTree = "<group>"; };
+ DF8990181709BB2D00B35C21 /* MediaSourceSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSourceSettings.cpp; sourceTree = "<group>"; };
+ DF8990191709BB2D00B35C21 /* MediaSourceSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSourceSettings.h; sourceTree = "<group>"; };
+ DF89901A1709BB2D00B35C21 /* SkinSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkinSettings.cpp; sourceTree = "<group>"; };
+ DF89901B1709BB2D00B35C21 /* SkinSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkinSettings.h; sourceTree = "<group>"; };
+ DF89901F1709BB5400B35C21 /* ViewStateSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewStateSettings.cpp; sourceTree = "<group>"; };
+ DF8990201709BB5400B35C21 /* ViewStateSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewStateSettings.h; sourceTree = "<group>"; };
DF93D65B1444A7A3007C6459 /* SlingboxDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlingboxDirectory.h; sourceTree = "<group>"; };
DF93D65C1444A7A3007C6459 /* SlingboxDirectory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SlingboxDirectory.cpp; sourceTree = "<group>"; };
DF93D6631444A8B0007C6459 /* AFPFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AFPFile.cpp; sourceTree = "<group>"; };
@@ -3315,7 +3329,6 @@
08FB7794FE84155DC02AAC07 /* XBMC */ = {
isa = PBXGroup;
children = (
- C6859E96029091FE04C91782 /* Documentation */,
08FB7795FE84155DC02AAC07 /* Source */,
F57E1ED20E36E8FD00700C9D /* internal libs */,
08FB779DFE84155DC02AAC07 /* System Libs and Frameworks */,
@@ -3327,6 +3340,7 @@
08FB7795FE84155DC02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
+ C6859E96029091FE04C91782 /* docs */,
E38E185C0D25F9FA00618676 /* lib */,
E38E14610D25F9F900618676 /* xbmc */,
);
@@ -4302,12 +4316,12 @@
name = MediaConnect;
sourceTree = "<group>";
};
- C6859E96029091FE04C91782 /* Documentation */ = {
+ C6859E96029091FE04C91782 /* docs */ = {
isa = PBXGroup;
children = (
18576525156ED3710088C35A /* README.osx */,
);
- name = Documentation;
+ name = docs;
sourceTree = "<group>";
};
C8482871156CFCD8005A996F /* pvr */ = {
@@ -4594,6 +4608,8 @@
DF64FE3A16C07AAA00D028FB /* ViewDatabase.cpp */,
DF64FE3B16C07AAA00D028FB /* ViewDatabase.h */,
DF64FE3C16C07AAA00D028FB /* ViewState.h */,
+ DF89901F1709BB5400B35C21 /* ViewStateSettings.cpp */,
+ DF8990201709BB5400B35C21 /* ViewStateSettings.h */,
);
path = view;
sourceTree = "<group>";
@@ -6087,10 +6103,18 @@
18B7C3A712942132009E7A26 /* AdvancedSettings.h */,
18B7C8C212942451009E7A26 /* GUISettings.cpp */,
18B7C8C312942451009E7A26 /* GUISettings.h */,
+ DF8990141709BB2D00B35C21 /* ISettingsHandler.h */,
+ DF8990151709BB2D00B35C21 /* ISubSettings.h */,
+ DF8990161709BB2D00B35C21 /* MediaSettings.cpp */,
+ DF8990171709BB2D00B35C21 /* MediaSettings.h */,
+ DF8990181709BB2D00B35C21 /* MediaSourceSettings.cpp */,
+ DF8990191709BB2D00B35C21 /* MediaSourceSettings.h */,
E38E1DF10D25F9FD00618676 /* Profile.cpp */,
E38E1DF20D25F9FD00618676 /* Profile.h */,
18B7C38E129420E5009E7A26 /* Settings.cpp */,
18B7C38F129420E5009E7A26 /* Settings.h */,
+ DF89901A1709BB2D00B35C21 /* SkinSettings.cpp */,
+ DF89901B1709BB2D00B35C21 /* SkinSettings.h */,
E38E1E010D25F9FD00618676 /* VideoSettings.cpp */,
E38E1E020D25F9FD00618676 /* VideoSettings.h */,
);
@@ -6685,7 +6709,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "#set -x\n\nfunction check_dyloaded_depends\n{\n b=$(find \"$EXTERNAL_LIBS\" -name $1 -print)\n if [ -f \"$b\" ]; then\n #echo \"Processing $b\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $b)\" ]; then\n echo \" Packaging $b\"\n cp -f \"$b\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n if [ -f \"$a\" ]; then\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n fi\n done \n fi\n}\n\nfunction check_xbmc_dylib_depends\n{\n REWIND=\"1\"\n while [ $REWIND = \"1\" ]\n do\n let REWIND=\"0\"\n for b in $(find \"$1\" -type f -name \"$2\" -print) ; do\n #echo \"Processing $b\"\n install_name_tool -id \"$(basename $b)\" \"$b\"\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n #echo \" Packaging $a\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n let REWIND=\"1\"\n fi\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$b\"\n done\n done\n done\n}\n\nEXTERNAL_LIBS=/Users/Shared/xbmc-depends/\"$SDK_NAME\"_\"$CURRENT_ARCH\"-target\n\nTARGET_NAME=$PRODUCT_NAME\nTARGET_CONTENTS=$TARGET_BUILD_DIR/$TARGET_NAME/Contents\n\nTARGET_BINARY=$TARGET_CONTENTS/MacOS/XBMC\nTARGET_FRAMEWORKS=$TARGET_CONTENTS/Frameworks\nDYLIB_NAMEPATH=@executable_path/../Frameworks\nXBMC_HOME=$TARGET_CONTENTS/Resources/XBMC\n\nmkdir -p \"$TARGET_CONTENTS/MacOS\"\nmkdir -p \"$TARGET_CONTENTS/Resources\"\n# start clean so we don't keep old dylibs\nrm -rf \"$TARGET_CONTENTS/Frameworks\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks\"\n\necho \"Package $TARGET_BUILD_DIR/XBMC\"\ncp -f \"$TARGET_BUILD_DIR/XBMC\" \"$TARGET_BINARY\"\ncp -f \"$SRCROOT/media/xbmc.icns\" \"$TARGET_CONTENTS/Resources/\"\ncp -f \"$SRCROOT/xbmc/osx/Info.plist\" \"$TARGET_CONTENTS/\"\n\n# Copy all of XBMC's dylib dependencies and rename their locations to inside the Framework\necho \"Checking $TARGET_BINARY dylib dependencies\"\nfor a in $(otool -L \"$TARGET_BINARY\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do \n\techo \" Packaging $a\"\n\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_BINARY\"\ndone\n\necho \"Package $EXTERNAL_LIBS/lib/python2.6\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks/lib\"\nPYTHONSYNC=\"rsync -aq --exclude .DS_Store --exclude *.a --exclude *.exe --exclude test --exclude tests\"\n${PYTHONSYNC} \"$EXTERNAL_LIBS/lib/python2.6\" \"$TARGET_FRAMEWORKS/lib/\"\nrm -rf \"$TARGET_FRAMEWORKS/lib/python2.6/config\"\n\necho \"Checking $TARGET_FRAMEWORKS/lib/python2.6 *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$TARGET_FRAMEWORKS\"/lib/python2.6 \"*.so\"\n\necho \"Checking $XBMC_HOME/system *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/system \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.pvr for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.pvr\"\n\necho \"Checking $XBMC_HOME/addons *.xbs for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.xbs\"\n\necho \"Checking xbmc/DllPaths_generated.h for dylib dependencies\"\nfor a in $(grep .dylib \"$SRCROOT\"/xbmc/DllPaths_generated.h | awk '{print $3}' | sed s/\\\"//g) ; do\n check_dyloaded_depends $a\ndone\n\necho \"Checking $TARGET_FRAMEWORKS for missing dylib dependencies\"\nREWIND=\"1\"\nwhile [ $REWIND = \"1\" ]\ndo\n\tlet REWIND=\"0\"\n\tfor b in \"$TARGET_FRAMEWORKS/\"*dylib* ; do\n\t\t#echo \" Processing $b\"\n\t\tfor a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n\t\t\t#echo \"Processing $a\"\n\t\t\tif [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n\t\t\t\techo \" Packaging $a\"\n\t\t\t\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\t\t\t\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\t\t\t\tlet REWIND=\"1\"\n\t\t\tfi\n\t\t\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n\t\tdone \n\tdone\ndone\n";
+ shellScript = "#set -x\n\nfunction check_dyloaded_depends\n{\n b=$(find \"$EXTERNAL_LIBS\" -name $1 -print)\n if [ -f \"$b\" ]; then\n #echo \"Processing $b\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $b)\" ]; then\n echo \" Packaging $b\"\n cp -f \"$b\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n if [ -f \"$a\" ]; then\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n fi\n fi\n done \n fi\n}\n\nfunction check_xbmc_dylib_depends\n{\n REWIND=\"1\"\n while [ $REWIND = \"1\" ]\n do\n let REWIND=\"0\"\n for b in $(find \"$1\" -type f -name \"$2\" -print) ; do\n #echo \"Processing $b\"\n install_name_tool -id \"$(basename $b)\" \"$b\"\n for a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n #echo \" Packaging $a\"\n if [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n echo \" Packaging $a\"\n cp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n chmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n let REWIND=\"1\"\n fi\n install_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$b\"\n done\n done\n done\n}\n\nEXTERNAL_LIBS=$XBMC_DEPENDS\n\nTARGET_NAME=$PRODUCT_NAME\nTARGET_CONTENTS=$TARGET_BUILD_DIR/$TARGET_NAME/Contents\n\nTARGET_BINARY=$TARGET_CONTENTS/MacOS/XBMC\nTARGET_FRAMEWORKS=$TARGET_CONTENTS/Frameworks\nDYLIB_NAMEPATH=@executable_path/../Frameworks\nXBMC_HOME=$TARGET_CONTENTS/Resources/XBMC\n\nmkdir -p \"$TARGET_CONTENTS/MacOS\"\nmkdir -p \"$TARGET_CONTENTS/Resources\"\n# start clean so we don't keep old dylibs\nrm -rf \"$TARGET_CONTENTS/Frameworks\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks\"\n\necho \"Package $TARGET_BUILD_DIR/XBMC\"\ncp -f \"$TARGET_BUILD_DIR/XBMC\" \"$TARGET_BINARY\"\ncp -f \"$SRCROOT/media/xbmc.icns\" \"$TARGET_CONTENTS/Resources/\"\ncp -f \"$SRCROOT/xbmc/osx/Info.plist\" \"$TARGET_CONTENTS/\"\n\n# Copy all of XBMC's dylib dependencies and rename their locations to inside the Framework\necho \"Checking $TARGET_BINARY dylib dependencies\"\nfor a in $(otool -L \"$TARGET_BINARY\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do \n\techo \" Packaging $a\"\n\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_BINARY\"\ndone\n\necho \"Package $EXTERNAL_LIBS/lib/python2.6\"\nmkdir -p \"$TARGET_CONTENTS/Frameworks/lib\"\nPYTHONSYNC=\"rsync -aq --exclude .DS_Store --exclude *.a --exclude *.exe --exclude test --exclude tests\"\n${PYTHONSYNC} \"$EXTERNAL_LIBS/lib/python2.6\" \"$TARGET_FRAMEWORKS/lib/\"\nrm -rf \"$TARGET_FRAMEWORKS/lib/python2.6/config\"\n\necho \"Checking $TARGET_FRAMEWORKS/lib/python2.6 *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$TARGET_FRAMEWORKS\"/lib/python2.6 \"*.so\"\n\necho \"Checking $XBMC_HOME/system *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/system \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.so for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.so\"\n\necho \"Checking $XBMC_HOME/addons *.pvr for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.pvr\"\n\necho \"Checking $XBMC_HOME/addons *.xbs for dylib dependencies\"\ncheck_xbmc_dylib_depends \"$XBMC_HOME\"/addons \"*.xbs\"\n\necho \"Checking xbmc/DllPaths_generated.h for dylib dependencies\"\nfor a in $(grep .dylib \"$SRCROOT\"/xbmc/DllPaths_generated.h | awk '{print $3}' | sed s/\\\"//g) ; do\n check_dyloaded_depends $a\ndone\n\necho \"Checking $TARGET_FRAMEWORKS for missing dylib dependencies\"\nREWIND=\"1\"\nwhile [ $REWIND = \"1\" ]\ndo\n\tlet REWIND=\"0\"\n\tfor b in \"$TARGET_FRAMEWORKS/\"*dylib* ; do\n\t\t#echo \" Processing $b\"\n\t\tfor a in $(otool -L \"$b\" | grep \"$EXTERNAL_LIBS\" | awk ' { print $1 } ') ; do\n\t\t\t#echo \"Processing $a\"\n\t\t\tif [ ! -f \"$TARGET_FRAMEWORKS/$(basename $a)\" ]; then\n\t\t\t\techo \" Packaging $a\"\n\t\t\t\tcp -f \"$a\" \"$TARGET_FRAMEWORKS/\"\n\t\t\t\tchmod u+w \"$TARGET_FRAMEWORKS/$(basename $a)\"\n\t\t\t\tlet REWIND=\"1\"\n\t\t\tfi\n\t\t\tinstall_name_tool -change \"$a\" \"$DYLIB_NAMEPATH/$(basename $a)\" \"$TARGET_FRAMEWORKS/$(basename $b)\"\n\t\tdone \n\tdone\ndone\n";
};
81B8FC150E7D927A00354E2E /* update version info */ = {
isa = PBXShellScriptBuildPhase;
@@ -6713,7 +6737,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "if [ -d \"/Users/Shared/xbmc-depends/buildtools-native/bin\" ]; then\nPATH=$PATH:/Users/Shared/xbmc-depends/buildtools-native/bin\nelse\nPATH=$PATH:/Users/Shared/xbmc-depends/toolchain/bin\nfi\n\nif [ \"$ACTION\" = build ] ; then\nmake -f ${SRCROOT}/codegenerator.mk\nfi";
+ shellScript = "if [ -d \"$XBMC_DEPENDS_ROOT/buildtools-native/bin\" ]; then\nPATH=$PATH:$XBMC_DEPENDS_ROOT/buildtools-native/bin\nelse\nPATH=$PATH:$XBMC_DEPENDS_ROOT/toolchain/bin\nfi\n\nif [ \"$ACTION\" = build ] ; then\nmake -f ${SRCROOT}/codegenerator.mk\nfi";
};
F5DEC3580E6DEBB2005A4E24 /* copy root files */ = {
isa = PBXShellScriptBuildPhase;
@@ -7740,6 +7764,10 @@
F56352C816E5436900D21BAD /* AppParamParser.cpp in Sources */,
F56353BF16E9BB3500D21BAD /* BitstreamConverter.cpp in Sources */,
DFAF6A4F16EBAE3800D6AE12 /* RssManager.cpp in Sources */,
+ DF89901C1709BB2D00B35C21 /* MediaSettings.cpp in Sources */,
+ DF89901D1709BB2D00B35C21 /* MediaSourceSettings.cpp in Sources */,
+ DF89901E1709BB2D00B35C21 /* SkinSettings.cpp in Sources */,
+ DF8990211709BB5400B35C21 /* ViewStateSettings.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -7764,8 +7792,8 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_SSE3_EXTENSIONS = YES;
- GCC_ENABLE_SSE41_EXTENSIONS = YES;
- GCC_ENABLE_SSE42_EXTENSIONS = YES;
+ GCC_ENABLE_SSE41_EXTENSIONS = NO;
+ GCC_ENABLE_SSE42_EXTENSIONS = NO;
GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_MODEL_TUNING = "";
@@ -7875,7 +7903,8 @@
USER_HEADER_SEARCH_PATHS = "$XBMC_DEPENDS/include $XBMC_DEPENDS/include/libcec $XBMC_DEPENDS/include/mysql $XBMC_DEPENDS/include/freetype2 $XBMC_DEPENDS/include/python2.6";
USE_HEADERMAP = NO;
WARNING_CFLAGS = "";
- XBMC_DEPENDS = "/Users/Shared/xbmc-depends/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
ZERO_LINK = NO;
};
name = Debug;
@@ -7891,8 +7920,8 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_SSE3_EXTENSIONS = YES;
- GCC_ENABLE_SSE41_EXTENSIONS = YES;
- GCC_ENABLE_SSE42_EXTENSIONS = YES;
+ GCC_ENABLE_SSE41_EXTENSIONS = NO;
+ GCC_ENABLE_SSE42_EXTENSIONS = NO;
GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES;
GCC_FAST_OBJC_DISPATCH = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
@@ -8004,7 +8033,8 @@
USER_HEADER_SEARCH_PATHS = "$XBMC_DEPENDS/include $XBMC_DEPENDS/include/libcec $XBMC_DEPENDS/include/mysql $XBMC_DEPENDS/include/freetype2 $XBMC_DEPENDS/include/python2.6";
USE_HEADERMAP = NO;
WARNING_CFLAGS = "";
- XBMC_DEPENDS = "/Users/Shared/xbmc-depends/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
ZERO_LINK = NO;
};
name = Release;
@@ -8062,6 +8092,8 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
PRODUCT_NAME = XBMC.app;
+ XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
};
name = Debug;
};
@@ -8071,6 +8103,8 @@
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
PRODUCT_NAME = XBMC.app;
+ XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
+ XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
ZERO_LINK = NO;
};
name = Release;
diff --git a/addons/metadata.local/addon.xml b/addons/metadata.local/addon.xml
new file mode 100755
index 0000000000..908656d8ff
--- /dev/null
+++ b/addons/metadata.local/addon.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<addon id="metadata.local"
+ name="Local information only"
+ version="1.0.0"
+ provider-name="Team XBMC">
+ <requires>
+ <import addon="xbmc.metadata" version="1.0"/>
+ </requires>
+ <extension point="xbmc.metadata.scraper.albums"
+ language="multi"
+ library="local.xml"/>
+ <extension point="xbmc.metadata.scraper.artists"
+ language="multi"
+ library="local.xml"/>
+ <extension point="xbmc.metadata.scraper.musicvideos"
+ language="multi"
+ library="local.xml"/>
+ <extension point="xbmc.metadata.scraper.tvshows"
+ language="multi"
+ library="local.xml"/>
+ <extension point="xbmc.metadata.scraper.movies"
+ language="multi"
+ library="local.xml"/>
+ <extension point="xbmc.addon.metadata">
+ <summary lang="en">Local Infomation only pseudo-scraper</summary>
+ <description lang="en">Use local information only</description>
+ <platform>all</platform>
+ </extension>
+</addon>
diff --git a/addons/metadata.local/local.xml b/addons/metadata.local/local.xml
new file mode 100755
index 0000000000..9882f464fe
--- /dev/null
+++ b/addons/metadata.local/local.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<scraper framework="1.1">
+</scraper>
diff --git a/addons/service.xbmc.versioncheck/LICENSE.txt b/addons/service.xbmc.versioncheck/LICENSE.txt
new file mode 100644
index 0000000000..ab123ffca1
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/LICENSE.txt
@@ -0,0 +1,282 @@
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) 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
+this service 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 make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. 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.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+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
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the 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 a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE 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.
+
+ END OF TERMS AND CONDITIONS
+-------------------------------------------------------------------------
diff --git a/addons/service.xbmc.versioncheck/README.md b/addons/service.xbmc.versioncheck/README.md
new file mode 100644
index 0000000000..5f8cbc56e5
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/README.md
@@ -0,0 +1,6 @@
+XBMC Versioncheck
+=========================
+
+This service checks the installed XBMC version against the next available one and notifies you if there is a new version available.
+When a new version comes out the versions.txt should be updated to reflect the latest version available.
+When updating the version.txt always put latest release at the top since the list is read in chronological order.
diff --git a/addons/service.xbmc.versioncheck/addon.xml b/addons/service.xbmc.versioncheck/addon.xml
new file mode 100644
index 0000000000..f196a48f41
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/addon.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<addon id="service.xbmc.versioncheck"
+ name="XBMC Version Check"
+ version="0.1.2"
+ provider-name="Team XBMC">
+ <requires>
+ <import addon="xbmc.addon" version="12.0.0"/>
+ <import addon="xbmc.python" version="2.1.0"/>
+ <import addon="script.module.simplejson" version="2.0.10"/>
+ </requires>
+ <extension point="xbmc.service" library="service.py" start="login"/>
+ <extension point="xbmc.addon.metadata">
+ <summary lang="en">XBMC Version Check checks if you are running latest released version.</summary>
+ <description lang="en">XBMC Version Check only supports a number of platforms/distros as releases may differ between them. For more information visit the xbmc.org website.</description>
+ <disclaimer lang="en">Feel free to use this script. For information visit xbmc.org</disclaimer>
+ <license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
+ <platform>osx osx32 osx64 ios windx wingl linux</platform>
+ <website>http://xbmc.org</website>
+ <source>https://github.com/XBMC-Addons/service.xbmc.versioncheck</source>
+ <forum>http://forum.xbmc.org/showthread.php?tid=160228</forum>
+ <email></email>
+ </extension>
+</addon>
diff --git a/addons/service.xbmc.versioncheck/changelog.txt b/addons/service.xbmc.versioncheck/changelog.txt
new file mode 100644
index 0000000000..be117b0a3e
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/changelog.txt
@@ -0,0 +1,5 @@
+v0.1.2
+- Add notification for Ubuntu users checking through apt command
+
+v0.1.1
+- Initial version \ No newline at end of file
diff --git a/addons/service.xbmc.versioncheck/icon.png b/addons/service.xbmc.versioncheck/icon.png
new file mode 100644
index 0000000000..a7ad3ebb84
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/icon.png
Binary files differ
diff --git a/addons/service.xbmc.versioncheck/resources/language/English/strings.po b/addons/service.xbmc.versioncheck/resources/language/English/strings.po
new file mode 100644
index 0000000000..38b4c9a7e3
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/language/English/strings.po
@@ -0,0 +1,69 @@
+# XBMC Media Center language file
+# Addon Name: XBMC Version Check
+# Addon id: service.xbmc.versioncheck
+# Addon Provider: Team XBMC
+msgid ""
+msgstr ""
+"Project-Id-Version: XBMC Addons\n"
+"Report-Msgid-Bugs-To: alanwww1@xbmc.org\n"
+"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: XBMC Translation Team\n"
+"Language-Team: English (http://www.transifex.com/projects/p/xbmc-addons/language/en/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: en\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "#32001"
+msgid "We would like to recommend you to upgrade."
+msgstr ""
+
+msgctxt "#32002"
+msgid "Visit XBMC.org for more information."
+msgstr ""
+
+msgctxt "#32003"
+msgid "You are still using an older stable version of XBMC."
+msgstr ""
+
+msgctxt "#32004"
+msgid "You are still using an older RC version of XBMC."
+msgstr ""
+
+msgctxt "#32005"
+msgid "You are still using an older beta version of XBMC."
+msgstr ""
+
+msgctxt "#32006"
+msgid "You are still using an older alpha version of XBMC."
+msgstr ""
+
+msgctxt "#32007"
+msgid "You are still using an older monthly version of XBMC."
+msgstr ""
+
+msgctxt "#32008"
+msgid "You are still using an older non stable version of XBMC."
+msgstr ""
+
+msgctxt "#32009"
+msgid "Would you like to remove this reminder?"
+msgstr ""
+
+msgctxt "#32010"
+msgid "You can enable/disable it through addon settings."
+msgstr ""
+
+msgctxt "#32011"
+msgid "Use your package manager(apt) to upgrade."
+msgstr ""
+
+msgctxt "#32020"
+msgid "General"
+msgstr ""
+
+msgctxt "#32021"
+msgid "Enable XBMC version check?"
+msgstr "" \ No newline at end of file
diff --git a/addons/service.xbmc.versioncheck/resources/settings.xml b/addons/service.xbmc.versioncheck/resources/settings.xml
new file mode 100644
index 0000000000..f4efe60348
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/settings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<settings>
+ <category label="32020">
+ <setting label="32021" type="bool" id="versioncheck_enable" default="true"/>
+ </category>
+</settings>
diff --git a/addons/service.xbmc.versioncheck/resources/versions.txt b/addons/service.xbmc.versioncheck/resources/versions.txt
new file mode 100644
index 0000000000..0ababef907
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/versions.txt
@@ -0,0 +1,190 @@
+{
+ "jsonrpc": "2.0",
+ "releases": {
+ "stable": [
+ {
+ "major": "12",
+ "minor": "1",
+ "tag": "stable",
+ "revision": "20130317-0d373cc",
+ "extrainfo": "final"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "stable",
+ "revision": "20130127-fb595f2",
+ "extrainfo": "final"
+ },
+ {
+ "major": "11",
+ "minor": "0",
+ "tag": "stable",
+ "revision": "20120321-14feb09",
+ "extrainfo": "final"
+ },
+ {
+ "major": "10",
+ "minor": "1",
+ "tag": "stable",
+ "revision": "",
+ "extrainfo": "final"
+ },
+ {
+ "major": "10",
+ "minor": "0",
+ "tag": "stable",
+ "revision": "",
+ "extrainfo": "final"
+ }
+ ],
+ "releasecandidate": [
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "releasecandidate",
+ "revision": "20130127-fb595f2",
+ "extrainfo": "RC3"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "releasecandidate",
+ "revision": "20121219-74b907c",
+ "extrainfo": "RC2"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "releasecandidate",
+ "revision": "20121210-baaa51c",
+ "extrainfo": "RC1"
+ },
+ {
+ "major": "11",
+ "minor": "0",
+ "tag": "releasecandidate",
+ "revision": "20120229-f38655f",
+ "extrainfo": "RC2"
+ },
+ {
+ "major": "11",
+ "minor": "0",
+ "tag": "releasecandidate",
+ "revision": "20120226-30312f1",
+ "extrainfo": "RC1"
+ }
+ ],
+ "beta": [
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "beta",
+ "revision": "20121210-baaa51c",
+ "extrainfo": "beta3"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "beta",
+ "revision": "20121201-192701b",
+ "extrainfo": "beta2"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "beta",
+ "revision": "20121116-f7dc858",
+ "extrainfo": "beta1-repack"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "beta",
+ "revision": "20121114-25bb46a",
+ "extrainfo": "beta1"
+ },
+ {
+ "major": "11",
+ "minor": "0",
+ "tag": "beta",
+ "revision": "20120207-1fef727",
+ "extrainfo": "beta3"
+ } ,
+ {
+ "major": "11",
+ "minor": "0",
+ "tag": "beta",
+ "revision": "20120120-f76c547",
+ "extrainfo": "beta2"
+ },
+ {
+ "major": "11",
+ "minor": "0",
+ "tag": "beta",
+ "revision": "20111222-22ad8e4",
+ "extrainfo": "beta1"
+ }
+ ],
+ "alpha": [
+ ],
+ "prealpha": [
+ {
+ "major": "13",
+ "minor": "0",
+ "tag": "prealpha",
+ "revision": "20130227-8d2e0fe",
+ "extrainfo": "alpha1"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "prealpha",
+ "revision": "20121102-e292b11",
+ "extrainfo": "alpha7"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "prealpha",
+ "revision": "20121001-f4d8117",
+ "extrainfo": "alpha6"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "prealpha",
+ "revision": "20120831-12840c2",
+ "extrainfo": "alpha5"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "prealpha",
+ "revision": "20120801-e4443f2",
+ "extrainfo": "alpha4"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "prealpha",
+ "revision": "20120701-37fc72c",
+ "extrainfo": "alpha3"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "prealpha",
+ "revision": "20120531-1495cbe",
+ "extrainfo": "alpha2"
+ },
+ {
+ "major": "12",
+ "minor": "0",
+ "tag": "prealpha",
+ "revision": "20120430-4505d08",
+ "extrainfo": "alpha1"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/addons/service.xbmc.versioncheck/service.py b/addons/service.xbmc.versioncheck/service.py
new file mode 100644
index 0000000000..49acf3a6ab
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/service.py
@@ -0,0 +1,253 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013 Team-XBMC
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+import os
+import platform
+import xbmc
+import xbmcaddon
+import xbmcgui
+import xbmcvfs
+
+if sys.version_info < (2, 7):
+ import simplejson
+else:
+ import json as simplejson
+
+__addon__ = xbmcaddon.Addon()
+__addonversion__ = __addon__.getAddonInfo('version')
+__addonname__ = __addon__.getAddonInfo('name')
+__addonpath__ = __addon__.getAddonInfo('path').decode('utf-8')
+__icon__ = __addon__.getAddonInfo('icon')
+__localize__ = __addon__.getLocalizedString
+
+def log(txt):
+ if isinstance (txt,str):
+ txt = txt.decode("utf-8")
+ message = u'%s: %s' % (__addonname__, txt)
+ xbmc.log(msg=message.encode("utf-8"), level=xbmc.LOGDEBUG)
+
+class Main:
+ def __init__(self):
+ if __addon__.getSetting("versioncheck_enable") == 'true' and not xbmc.getCondVisibility('System.HasAddon(os.openelec.tv)'):
+ if not sys.argv[0]:
+ xbmc.executebuiltin('XBMC.AlarmClock(CheckAtBoot,XBMC.RunScript(service.xbmc.versioncheck, started),00:00:30,silent)')
+ xbmc.executebuiltin('XBMC.AlarmClock(CheckWhileRunning,XBMC.RunScript(service.xbmc.versioncheck, started),24:00:00,silent,loop)')
+ elif sys.argv[0] and sys.argv[1] == 'started':
+ if xbmc.getCondVisibility('System.Platform.Linux'):
+ oldversion = _versionchecklinux('xbmc')
+ else:
+ oldversion = _versioncheck()
+ if oldversion[0]:
+ _upgrademessage(oldversion[1])
+ else:
+ pass
+
+def _versioncheck():
+ # initial vars
+ oldversion = False
+ msg = ''
+ # retrieve versionlists from supplied version file
+ version_file = os.path.join(__addonpath__, 'resources/versions.txt')
+ # Eden didn't have xbmcvfs.File()
+ if xbmcaddon.Addon('xbmc.addon').getAddonInfo('version') < "11.9.3":
+ file = open(version_file, 'r')
+ else:
+ file = xbmcvfs.File(version_file)
+ data = file.read()
+ file.close()
+ version_query = unicode(data, 'utf-8', errors='ignore')
+ version_query = simplejson.loads(version_query)
+
+ # Create seperate version lists
+ versionlist_stable = version_query['releases']['stable']
+ versionlist_rc = version_query['releases']['releasecandidate']
+ versionlist_beta = version_query['releases']['beta']
+ versionlist_alpha = version_query['releases']['alpha']
+ versionlist_prealpha = version_query['releases']['prealpha']
+
+ # retrieve current installed version
+ json_query = xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "Application.GetProperties", "params": {"properties": ["version", "name"]}, "id": 1 }')
+ json_query = unicode(json_query, 'utf-8', errors='ignore')
+ json_query = simplejson.loads(json_query)
+ version_installed = []
+ if json_query.has_key('result') and json_query['result'].has_key('version'):
+ version_installed = json_query['result']['version']
+ log("Version installed %s" %version_installed)
+ # set oldversion flag to false
+ oldversion = False
+
+ ### Check to upgrade to newest available stable version
+ # check on smaller major version. Smaller version than available always notify
+ if version_installed['major'] < int(versionlist_stable[0]['major']):
+ msg = __localize__(32003)
+ oldversion = True
+ log("Version available %s" %versionlist_stable[0])
+
+ # check on same major version installed and available
+ elif version_installed['major'] == int(versionlist_stable[0]['major']):
+ # check on smaller minor version
+ if version_installed['minor'] < int(versionlist_stable[0]['minor']):
+ msg = __localize__(32003)
+ oldversion = True
+ log("Version available %s" %versionlist_stable[0])
+ # check if not installed a stable so always notify
+ elif version_installed['tag'] != "stable":
+ msg = __localize__(32008)
+ oldversion = True
+ log("Version available %s" %versionlist_stable[0])
+ else:
+ log("Last available stable installed")
+
+ ### Check to upgrade to newest available RC version if not installed stable
+ ## Check also oldversion hasn't been set true by previous check because if so this need to be skipped
+ if not oldversion and version_installed['tag'] != "stable":
+ # only check on equal or lower major because newer installed beta/alpha/prealpha version will be higher
+ if versionlist_rc and version_installed['major'] <= int(versionlist_rc[0]['major']):
+ if version_installed['revision'] <= versionlist_rc[0]['revision']:
+ msg = __localize__(32004)
+ oldversion = True
+ log("Version available %s" %versionlist_rc[0])
+
+ # exclude if installed RC on checking for newer beta
+ if not oldversion and versionlist_beta and version_installed['tag'] not in ["releasecandidate"]:
+ if version_installed['major'] <= int(versionlist_beta[0]['major']):
+ if version_installed['revision'] < versionlist_beta[0]['revision']:
+ msg = __localize__(32005)
+ oldversion = True
+ log("Version available %s" %versionlist_beta[0])
+
+ # exclude if installed RC or beta on checking for newer alpha
+ if not oldversion and versionlist_alpha and version_installed['tag'] not in ["releasecandidate", "beta"]:
+ if version_installed['major'] <= int(versionlist_alpha[0]['major']):
+ if version_installed['revision'] < versionlist_alpha[0]['revision']:
+ msg = __localize__(32006)
+ oldversion = True
+ log("Version available %s" %versionlist_alpha[0])
+
+ # exclude if installed RC, beta or alpha on checking for newer prealpha
+ if not oldversion and versionlist_prealpha and version_installed['tag'] not in ["releasecandidate", "beta", "alpha"]:
+ if version_installed['major'] <= int(versionlist_prealpha[0]['major']):
+ if version_installed['revision'] < versionlist_prealpha[0]['revision']:
+ msg = __localize__(32007)
+ oldversion = True
+ log("Version available %s" %versionlist_prealpha[0])
+
+ # Nothing to see here, move along
+ else:
+ # Nothing to see here, move along
+ pass
+ return oldversion, msg
+
+
+def _versionchecklinux(package):
+ if (platform.dist()[0] == "Ubuntu" or platform.dist()[0] == "Debian"):
+ oldversion, msg = _versioncheckapt(package)
+ else:
+ log("Unsupported platform %s" %platform.dist()[0])
+ sys.exit(0)
+ return oldversion, msg
+
+def _versioncheckapt(package):
+ #check for linux using Apt
+ # initial vars
+ oldversion = False
+ msg = ''
+ result = ''
+
+ # try to import apt
+ try:
+ import apt
+ from aptdaemon import client
+ from aptdaemon import errors
+ except:
+ log('python apt import error')
+ sys.exit(0)
+ apt_client = client.AptClient()
+ try:
+ result = apt_client.update_cache(wait=True)
+ if (result == "exit-success"):
+ log("Finished updating the cache")
+ else:
+ log("Error updating the cache %s" %result)
+ except errors.NotAuthorizedError:
+ log("You are not allowed to update the cache")
+ sys.exit(0)
+
+ trans = apt_client.upgrade_packages([package])
+ trans.simulate(reply_handler=_apttransstarted, error_handler=_apterrorhandler)
+ pkg = trans.packages[4][0]
+ if (pkg == package):
+ cache=apt.Cache()
+ cache.open(None)
+ cache.upgrade()
+ if (cache[package].installed and cache[package].installed.version != cache[package].candidate.version):
+ log("Version installed %s" %cache[package].installed.version)
+ log("Version available %s" %cache[package].candidate.version)
+ oldversion = True
+ msg = __localize__(32011)
+ elif (cache[package].installed):
+ log("Already on newest version %s" %cache[package].installed.version)
+ else:
+ log("No installed package found, probably manual install")
+ sys.exit(0)
+
+ return oldversion, msg
+
+def _apttransstarted():
+ pass
+
+def _apterrorhandler(error):
+ raise error
+
+def _upgrademessage(msg):
+ # Don't show while watching a video
+ while(xbmc.Player().isPlayingVideo() and not xbmc.abortRequested):
+ xbmc.sleep(1000)
+ i = 0
+ while(i < 5 and not xbmc.abortRequested):
+ xbmc.sleep(1000)
+ i += 1
+ # Detect if it's first run and only show OK dialog + ask to disable on that
+ firstrun = __addon__.getSetting("versioncheck_firstrun") != 'false'
+ if firstrun and not xbmc.abortRequested:
+ xbmcgui.Dialog().ok(__addonname__,
+ msg,
+ __localize__(32001),
+ __localize__(32002))
+ # sets check to false which is checked on startup
+ if xbmcgui.Dialog().yesno(__addonname__,
+ __localize__(32009),
+ __localize__(32010)):
+ __addon__.setSetting("versioncheck_enable", 'false')
+ # set first run to false to only show a popup next startup / every two days
+ __addon__.setSetting("versioncheck_firstrun", 'false')
+ # Show notification after firstrun
+ elif not xbmc.abortRequested:
+ log(__localize__(32001) + '' + __localize__(32002))
+ xbmc.executebuiltin("XBMC.Notification(%s, %s, %d, %s)" %(__addonname__,
+ __localize__(32001) + '' + __localize__(32002),
+ 15000,
+ __icon__))
+ else:
+ pass
+
+if (__name__ == "__main__"):
+ log('Version %s started' % __addonversion__)
+ Main()
diff --git a/addons/xbmc.addon/addon.xml b/addons/xbmc.addon/addon.xml
index 0d1f18cad0..8bc67a6411 100644
--- a/addons/xbmc.addon/addon.xml
+++ b/addons/xbmc.addon/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<addon id="xbmc.addon" version="12.9.2" provider-name="Team XBMC">
+<addon id="xbmc.addon" version="12.9.3" provider-name="Team XBMC">
<backwards-compatibility abi="12.0"/>
<requires>
<import addon="xbmc.core" version="0.1.0"/>
diff --git a/configure.in b/configure.in
index 489a2e11b4..f0e49051ed 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([xbmc], [12.9.2], [http://trac.xbmc.org])
+AC_INIT([xbmc], [12.9.3], [http://trac.xbmc.org])
AC_CONFIG_HEADERS([xbmc/config.h])
AH_TOP([#pragma once])
m4_include([m4/ax_python_devel.m4])
@@ -2377,7 +2377,6 @@ OUTPUT_FILES="Makefile \
lib/libhdhomerun/Makefile \
lib/libsquish/Makefile \
lib/cximage-6.0/Makefile \
- lib/addons/script.module.pil/Makefile \
lib/libUPnP/Makefile \
xbmc/DllPaths_generated.h \
xbmc/DllPaths_generated_android.h \
diff --git a/docs/README.android b/docs/README.android
index 7735485e5a..6ff28ab93c 100644
--- a/docs/README.android
+++ b/docs/README.android
@@ -93,7 +93,7 @@ specifies where the resulting toolchain should be installed (your choice).
# ls platforms
# cd build/tools
# ./make-standalone-toolchain.sh --ndk-dir=../../ \
- --install-dir=<android-toolchain>/android-9 --platform=android-9
+ --install-dir=<android-toolchain>/android-14 --platform=android-14
ATTENTION FOR X86 BUILDS - THIS DOES NOT APPLY TO 99% OF BUILDS:
If you want to build for the x86 platform there is a flaw in the mentioned
@@ -141,7 +141,7 @@ on with the Android toolchain and creating an Android Application Package
5.1. Building dependencies
--------------------------------------------------------------------
- # cd $HOME/xbmc-android/tools/android/depends
+ # cd $HOME/xbmc-android/tools/depends
# ./bootstrap
# ./configure --help
@@ -164,7 +164,8 @@ on with the Android toolchain and creating an Android Application Package
--------------------------------------------------------------------
# cd $HOME/xbmc-android
- # make -C tools/android/depends/xbmc
+ # make -C tools/android/xbmc
+ # make
After the first build (assuming bootstrap and configure are successful),
subsequent builds can be run with a simple 'make' and 'make apk'.
diff --git a/docs/README.ios b/docs/README.ios
index 971a99fa49..9544cd0938 100644
--- a/docs/README.ios
+++ b/docs/README.ios
@@ -70,7 +70,7 @@ constellations of Xcode and osx versions (to be updated once we know more):
1. XCode 3.2.6 against iOS SDK 4.3 on 10.6.x (Snow Leopard)
2. XCode 4.3.x against iOS SDK 4.3 and 5.1 on 10.7.x (Lion)
-3. XCode 4.5.1 against iOS SDK 4.3, 5.1 and 6.0 on 10.7.x (Lion) and 10.8.x (ML)
+3. XCode 4.6 against iOS SDK 4.3, 5.1 and 6.1 on 10.7.x (Lion) and 10.8.x (ML)
3.a Building against iOS SDK 6.0 will only allow to run on targets with iOS 5.1 and below.
There is no support for devices running iOS 6.0 for now!
@@ -78,12 +78,28 @@ constellations of Xcode and osx versions (to be updated once we know more):
3.1 Install Cross libs and runtime environment
-----------------------------------------------------------------------------
+ The following commands will build using the latest iOS SDK found on your
+ system.
+
$ cd $HOME/XBMC
- $ cd tools/darwin/depends
+ $ cd tools/depends
$ ./bootstrap
- $ ./configure --with-darwin=ios
+ $ ./configure --host=arm-apple-darwin
$ make
+ NOTE: You can speedup compilation on multicore systems by doing
+ "make -j<number of cores>" instead of "make". For a dualcore this would read:
+ "make -j2"
+
+ ADVANCED developers only! If you want to specify an iOS SDK version (if
+ multiple versions are installed) - then append it to the configure line
+ above (example below would use iOS SDK 6.0):
+
+ $ ./configure --host=arm-apple-darwin --with-sdk=6.0
+
+ Ensure that you also adapt the xcode project to use this SDK version or
+ if building via cmdline the SDKROOT parameter of the xcodebuild command.
+
-----------------------------------------------------------------------------
4. How to compile
-----------------------------------------------------------------------------
@@ -91,10 +107,9 @@ Both Xcode and Terminal compilation require that build environment be setup
from the step 3.1.
$ cd $HOME/XBMC
- $ make -C tools/darwin/depends/xbmc
+ $ make -C tools/depends/target/xbmc
$ make clean
$ make xcode_depends
- $ make -C lib/addons/script.module.pil
-----------------------------------------------------------------------------
4.1 Using Xcode
@@ -105,6 +120,10 @@ located in $HOME/XBMC.
There are two relevant build targets : Release and Debug. Compile always for device
end not simulator.
+If you have selected a specific iOS SDK Version in step 3.1 then you might need
+to adapt the active target to use the same iOS SDK version. Else build will fail
+(you will see alot of errors with at least non-found boost/shared_ptr.hpp).
+
-----------------------------------------------------------------------------
4.2 Using Terminal (command-line)
-----------------------------------------------------------------------------
@@ -120,7 +139,8 @@ or
ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
SDKROOT=iphoneos4.2
- Make sure to set SDKROOT to the iOS SDK you want to use.
+ Make sure to set SDKROOT to the iOS SDK you want to use. This should be the same
+ you used on point 3.1!
-----------------------------------------------------------------------------
5. Packaging
@@ -137,9 +157,9 @@ distribution.
or
$ cd tools/darwin/packaging/xbmc-ios
- 3. $ ./mk-xbmc-atv2.sh release
+ 3. $ ./mkdeb-xbmc-atv2.sh release
or
- $ ./mk-xbmc-ios.sh release
+ $ ./mkdeb-xbmc-ios.sh release
4. Use release or debug - you have to be sure that you build the corresponding
version before.
diff --git a/docs/README.linux b/docs/README.linux
index 1f3f2f71d3..c0d5e78748 100644
--- a/docs/README.linux
+++ b/docs/README.linux
@@ -44,7 +44,7 @@ Build-Depends: autoconf, automake, autopoint, autotools-dev, cmake, curl,
libavcodec-dev, libavfilter-dev, libavformat-dev, libavutil-dev,
libbluetooth-dev, libbluray-dev, libboost-dev, libboost-thread-dev,
libiso9660-dev, libbz2-dev, libcdio-dev, libcec-dev, libcrystalhd-dev,
- libcurl4-gnutls-dev | libcurl-dev, libcwiid1-dev, libdbus-1-dev,
+ libcurl4-gnutls-dev | libcurl-dev, libcwiid-dev, libdbus-1-dev,
libenca-dev, libflac-dev, libfontconfig-dev, libfreetype6-dev,
libfribidi-dev, libgl1-mesa-dev | libgl-dev, libglew-dev,
libglu1-mesa-dev | libglu-dev, libhal-dev, libhal-storage-dev,
@@ -57,7 +57,7 @@ Build-Depends: autoconf, automake, autopoint, autotools-dev, cmake, curl,
libswscale-dev, libtinyxml-dev, libtool, libudev-dev, libusb-dev, libva-dev,
libvdpau-dev, libvorbis-dev, libxinerama-dev, libxmu-dev, libxrandr-dev,
libxt-dev, libyajl-dev, lsb-release, nasm [!amd64], python-dev,
- python-support, unzip, yasm, zip, zlib1g-dev, libcap-dev, swig, taglib(>= 1.8),
+ python-support, unzip, yasm, zip, zlib1g-dev, libcap-dev, swig, libtag1-dev (>= 1.8),
default-jre, libtiff-dev
*** For developers and anyone else who compiles frequently it is recommended to
@@ -99,9 +99,7 @@ Tip: by adding -j<number> to the make command, you describe how many
$ make -j2
-.3 $ make -C lib/addons/script.module.pil
-
-.4 $ make install
+.3 $ make install
This will install XBMC in the prefix provided in 4.1 as well as a launcher script.
diff --git a/docs/README.osx b/docs/README.osx
index 60219f51ee..fa4ec456d7 100644
--- a/docs/README.osx
+++ b/docs/README.osx
@@ -47,6 +47,8 @@ anymore.
-----------------------------------------------------------------------------
3.0 Install XCODE
-----------------------------------------------------------------------------
+See point 3.0a below for an updated list of supported/tested Xcode/osx constellations!!!
+
Install latest Xcode (4.3.2 or 3.2.6 as of the writing). You can download it from
1. Apple's site after registration at http://developer.apple.com/tools/download (Xcode 3.2.6)
@@ -61,23 +63,47 @@ Xcode 4.3.x only runs on 10.7.x (Lion).
Xcode 4.4 only runs on 10.8.x (Mountain Lion).
-----------------------------------------------------------------------------
+3.0a Supported Xcode and OSX constellations
+-----------------------------------------------------------------------------
+As far as we know the compilation for mac osx should work with the following
+constellations of Xcode and osx versions (to be updated once we know more):
+
+1. XCode 3.2.6 against OSX SDK 10.6 on 10.6.x (Snow Leopard)
+2. XCode 4.3.x against OSX SDK 10.6 and 10.7 on 10.7.x (Lion)
+3. XCode 4.6 against OSX SDK 10.6, 10.7 and 10.8 on 10.7.x (Lion) and 10.8.x (ML)
+
+-----------------------------------------------------------------------------
3.1 Install XBMC build depends
-----------------------------------------------------------------------------
+ The following commands will build using the latest OSX SDK found on your
+ system.
3.1.1 Compiling as 32 Bit binary
$ cd $HOME/XBMC
- $ cd tools/darwin/depends
+ $ cd tools/depends
$ ./bootstrap
- $ ./configure --with-darwin=osx
+ $ ./configure --host=i386-apple-darwin
$ make
3.1.2 Compiling as 64 Bit binary
$ cd $HOME/XBMC
- $ cd tools/darwin/depends
+ $ cd tools/depends
$ ./bootstrap
- $ ./configure --with-darwin=osx --with-arch=x86_64
+ $ ./configure --host=x86_64-apple-darwin
$ make
+ NOTE: You can speedup compilation on multicore systems by doing
+ "make -j<number of cores>" instead of "make". For a dualcore this would read:
+ "make -j2"
+
+ ADVANCED developers only! If you want to specify an OSX SDK version (if
+ multiple versions are installed) - then append it to the configure line
+ above (example below would use OSX SDK 10.7 and build for 64bit):
+
+ $ ./configure --host=x86_64-apple-darwin --with-sdk=10.7
+
+ Ensure that you also adapt the xcode project to use this SDK version.
+
-----------------------------------------------------------------------------
4. How to compile
-----------------------------------------------------------------------------
@@ -88,15 +114,14 @@ first. This is a simple step and involves the following:
by compiling via Xcode GUI
$ cd $HOME/XBMC
- $ make -C tools/darwin/depends/xbmc
+ $ make -C tools/depends/target/xbmc
$ make clean
$ make xcode_depends
- $ make -C lib/addons/script.module.pil
4.b Compilation by using command-line building via make (experimental)
$ cd $HOME/XBMC
- $ make -C tools/darwin/depends/xbmc
+ $ make -C tools/depends/target/xbmc
$ make clean
The configure operation will setup the build environment for codecs and
@@ -131,6 +156,10 @@ Set the build target to "XBMC" or "XBMC.app" and be sure to select the same
architecture as selected in step 3.1 (either i386 for 32Bit or x86_64 for 64Bit),
then build.
+If you have selected a specific OSX SDK Version in step 3.1 then you might need
+to adapt the active target to use the same OSX SDK version. Else build will fail
+(you will see alot of errors with at least non-found boost/shared_ptr.hpp).
+
The build process will take a long time when building the first time.
You can see the progress in "Build Results". There are a large number of static
and dynamic libaries that will need to be built. Once these are built,
@@ -170,7 +199,6 @@ developers).
$ cd $HOME/XBMC
$ export XBMC_HOME=`pwd`
$ make xcode_depends
- $ make -C lib/addons/script.module.pil
$ xcodebuild -sdk macosx10.7 -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES \
ARCHS=x86_64 VALID_ARCHS=x86_64 -configuration Release build
@@ -188,11 +216,11 @@ distribution.
1. build XBMC.app from XCode so that the application bundle is correctly updated.
- 2. make -C tools/darwin/packaging/xbmc-osx
+ 2. $ cd tools/darwin/packaging/xbmc-osx
- 3. If completed successfully, a disk image named XBMC_for_Mac.dmg will be
- present in the users XBMC build directory:
+ 3. $ ./mkdmg-xbmc-osx.sh release
-Remember to unmount/eject XBMC.dmg before attempting to recreate it,
-otherwise dmgmaker.pl will fail.
+ 4. Use release or debug - you have to be sure that you build the corresponding
+ version before.
+ 6. Find the corresponding dmg in the packaging dir.
diff --git a/docs/README.raspberrypi b/docs/README.raspberrypi
index 57b67f80fb..6b6f1b1d74 100644
--- a/docs/README.raspberrypi
+++ b/docs/README.raspberrypi
@@ -31,5 +31,5 @@ git clone https://github.com/huceke/buildroot-rbp.git
cd /opt/xbmc-raspberrypi/buildroot-rbp
-Follow the instroctions in README.rbp how to build the system and xbmc.
+Follow the instructions in README.rbp how to build the system and xbmc.
diff --git a/lib/addons/script.module.pil/Imaging-1.1.7-access.patch b/lib/addons/script.module.pil/Imaging-1.1.7-access.patch
deleted file mode 100644
index dd51f4ac8e..0000000000
--- a/lib/addons/script.module.pil/Imaging-1.1.7-access.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -rupN Imaging-1.1.7/libImaging/Access.c Imaging-1.1.7-mod/libImaging/Access.c
---- Imaging-1.1.7/libImaging/Access.c 2009-10-31 20:44:12.000000000 -0400
-+++ Imaging-1.1.7-mod/libImaging/Access.c 2011-10-10 19:40:22.000000000 -0400
-@@ -32,7 +32,7 @@ add_item(const char* mode)
- {
- UINT32 i = hash(mode);
- /* printf("hash %s => %d\n", mode, i); */
-- if (access_table[i].mode) {
-+ if (access_table[i].mode && (strcmp(mode, access_table[i].mode) != 0)) {
- fprintf(stderr, "AccessInit: hash collision: %d for both %s and %s\n",
- i, mode, access_table[i].mode);
- exit(1);
-
diff --git a/lib/addons/script.module.pil/Imaging-1.1.7-crosscompiling-0.1.patch b/lib/addons/script.module.pil/Imaging-1.1.7-crosscompiling-0.1.patch
deleted file mode 100644
index ccd7afde48..0000000000
--- a/lib/addons/script.module.pil/Imaging-1.1.7-crosscompiling-0.1.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -Naur Imaging-1.1.7/setup.py Imaging-1.1.7.patch/setup.py
---- Imaging-1.1.7/setup.py 2011-04-17 09:31:07.000000000 +0200
-+++ Imaging-1.1.7.patch/setup.py 2011-04-17 09:54:20.880047886 +0200
-@@ -147,7 +147,6 @@
- add_directory(library_dirs, "/opt/local/lib")
- add_directory(include_dirs, "/opt/local/include")
-
-- add_directory(library_dirs, "/usr/local/lib")
- # FIXME: check /opt/stuff directories here?
-
- prefix = sysconfig.get_config_var("prefix")
-@@ -199,22 +198,6 @@
- add_directory(include_dirs, include_root)
-
- #
-- # add standard directories
--
-- # look for tcl specific subdirectory (e.g debian)
-- if _tkinter:
-- tcl_dir = "/usr/include/tcl" + TCL_VERSION
-- if os.path.isfile(os.path.join(tcl_dir, "tk.h")):
-- add_directory(include_dirs, tcl_dir)
--
-- # standard locations
-- add_directory(library_dirs, "/usr/local/lib")
-- add_directory(include_dirs, "/usr/local/include")
--
-- add_directory(library_dirs, "/usr/lib")
-- add_directory(include_dirs, "/usr/include")
--
-- #
- # insert new dirs *before* default libs, to avoid conflicts
- # between Python PYD stub libs and real libraries
-
diff --git a/lib/addons/script.module.pil/Imaging-1.1.7-setuptools-0.1.patch b/lib/addons/script.module.pil/Imaging-1.1.7-setuptools-0.1.patch
deleted file mode 100644
index a59ea79c5b..0000000000
--- a/lib/addons/script.module.pil/Imaging-1.1.7-setuptools-0.1.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur Imaging-1.1.7/setup.py Imaging-1.1.7.patch/setup.py
---- Imaging-1.1.7/setup.py 2009-11-15 17:06:10.000000000 +0100
-+++ Imaging-1.1.7.patch/setup.py 2011-04-17 09:31:07.545708559 +0200
-@@ -83,7 +83,7 @@
- # --------------------------------------------------------------------
-
- from distutils import sysconfig
--from distutils.core import Extension, setup
-+from setuptools import Extension, setup
- from distutils.command.build_ext import build_ext
-
- try:
diff --git a/lib/addons/script.module.pil/Makefile.in b/lib/addons/script.module.pil/Makefile.in
deleted file mode 100644
index 0cc40f4dbc..0000000000
--- a/lib/addons/script.module.pil/Makefile.in
+++ /dev/null
@@ -1,58 +0,0 @@
-
-OSTYPE=$(shell uname)
-VERSION=1.1.7
-BASE_URL=http://mirrors.xbmc.org/build-deps/darwin-libs
-SOURCE=Imaging-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-RETRIEVE_TOOL=curl
-RETRIEVE_TOOL_FLAGS=-Ls --output $(ARCHIVE)
-ARCHIVE_TOOL=tar
-ARCHIVE_TOOL_FLAGS=xf
-
-ifeq ($(OSTYPE),Darwin)
-include @abs_top_srcdir@/tools/darwin/depends/Makefile.include
-include @abs_top_srcdir@/tools/darwin/depends/config.site.mk
-export TARBALLS_LOCATION=.
-export PYTHONXCPREFIX=$(PREFIX)
-export LDFLAGS+=-L$(PREFIX)/lib
-PYTHON=$(TOOLCHAIN)/bin/python
-PYTHONCROSS=--cross-compile
-else
-PYTHON=@PYTHON@
-endif
-
-NO_SYSTEM_PIL=$(shell $(PYTHON) -m Image >/dev/null 2>&1 || echo "1")
-
-DESTDIR=@abs_top_srcdir@/addons/script.module.pil/lib/PIL
-
-CLEAN_FILES=$(ARCHIVE) $(SOURCE) $(DESTDIR)
-
-all: $(DESTDIR)
-
-ifeq (1,$(NO_SYSTEM_PIL))
-$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(SOURCE): $(ARCHIVE)
- -rm -rf $(SOURCE)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(ARCHIVE)
- if test "$(OSTYPE)" = "Darwin"; then \
- cd $(SOURCE); \
- patch -p1 < ../Imaging-1.1.7-crosscompiling-0.1.patch; \
- patch -p1 < ../Imaging-1.1.7-setuptools-0.1.patch; \
- patch -p1 < ../Imaging-1.1.7-access.patch; \
- sed -ie "s|"darwin"|"darwinNot"|g" "setup.py"; \
- sed -ie "s|ZLIB_ROOT = None|ZLIB_ROOT = libinclude(\"${platform_sdk_path}/usr\")|" "setup.py"; \
- fi
-
-$(DESTDIR): $(SOURCE)
- -rm -rf $(DESTDIR)
- pushd $(SOURCE) && $(PYTHON) setup.py build $(PYTHONCROSS) --build-lib $(DESTDIR); popd
-else
-$(DESTDIR):
- @true
-endif
-
-include ../../../Makefile.include
-
diff --git a/project/BuildDependencies/scripts/libbzip2_d.bat b/project/BuildDependencies/scripts/libbzip2_d.bat
index ee7b1d00b7..db51924121 100644
--- a/project/BuildDependencies/scripts/libbzip2_d.bat
+++ b/project/BuildDependencies/scripts/libbzip2_d.bat
@@ -7,7 +7,7 @@ CALL dlextract.bat libbzip2 %FILES%
cd %TMP_PATH%
-copy include\bzlib2.h "%CUR_PATH%\include\" /Y
+copy include\* "%CUR_PATH%\include\" /Y
copy lib\bzip2.lib "%CUR_PATH%\lib\" /Y
cd %LOC_PATH%
diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj
index ba3d8c25cd..0493f5bdb9 100644
--- a/project/VS2010Express/XBMC.vcxproj
+++ b/project/VS2010Express/XBMC.vcxproj
@@ -946,8 +946,11 @@
<ClCompile Include="..\..\xbmc\settings\dialogs\GUIDialogProfileSettings.cpp" />
<ClCompile Include="..\..\xbmc\settings\dialogs\GUIDialogSettings.cpp" />
<ClCompile Include="..\..\xbmc\settings\GUISettings.cpp" />
+ <ClCompile Include="..\..\xbmc\settings\MediaSettings.cpp" />
+ <ClCompile Include="..\..\xbmc\settings\MediaSourceSettings.cpp" />
<ClCompile Include="..\..\xbmc\settings\Profile.cpp" />
<ClCompile Include="..\..\xbmc\settings\Settings.cpp" />
+ <ClCompile Include="..\..\xbmc\settings\SkinSettings.cpp" />
<ClCompile Include="..\..\xbmc\settings\VideoSettings.cpp" />
<ClCompile Include="..\..\xbmc\settings\windows\GUISettingControls.cpp" />
<ClCompile Include="..\..\xbmc\settings\windows\GUIWindowSettings.cpp" />
@@ -1093,6 +1096,11 @@
<ClInclude Include="..\..\xbmc\settings\dialogs\GUIDialogLockSettings.h" />
<ClInclude Include="..\..\xbmc\settings\dialogs\GUIDialogProfileSettings.h" />
<ClInclude Include="..\..\xbmc\settings\dialogs\GUIDialogSettings.h" />
+ <ClInclude Include="..\..\xbmc\settings\ISettingsHandler.h" />
+ <ClInclude Include="..\..\xbmc\settings\ISubSettings.h" />
+ <ClInclude Include="..\..\xbmc\settings\MediaSettings.h" />
+ <ClInclude Include="..\..\xbmc\settings\MediaSourceSettings.h" />
+ <ClInclude Include="..\..\xbmc\settings\SkinSettings.h" />
<ClInclude Include="..\..\xbmc\settings\windows\GUISettingControls.h" />
<ClInclude Include="..\..\xbmc\settings\windows\GUIWindowSettings.h" />
<ClInclude Include="..\..\xbmc\settings\windows\GUIWindowSettingsCategory.h" />
@@ -1665,6 +1673,7 @@
<ClCompile Include="..\..\xbmc\view\GUIViewControl.cpp" />
<ClCompile Include="..\..\xbmc\view\GUIViewState.cpp" />
<ClCompile Include="..\..\xbmc\view\ViewDatabase.cpp" />
+ <ClCompile Include="..\..\xbmc\view\ViewStateSettings.cpp" />
<ClCompile Include="..\..\xbmc\win32\pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug (DirectX)|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Testsuite|Win32'">Create</PrecompiledHeader>
@@ -2495,6 +2504,7 @@
<ClInclude Include="..\..\xbmc\view\GUIViewState.h" />
<ClInclude Include="..\..\xbmc\view\ViewDatabase.h" />
<ClInclude Include="..\..\xbmc\view\ViewState.h" />
+ <ClInclude Include="..\..\xbmc\view\ViewStateSettings.h" />
<ClInclude Include="..\..\xbmc\win32\pch.h" />
<ClInclude Include="..\..\xbmc\win32\PlatformDefs.h" />
<ClInclude Include="..\..\xbmc\XBDateTime.h" />
diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters
index 791c5182f7..e66cf60dc7 100644
--- a/project/VS2010Express/XBMC.vcxproj.filters
+++ b/project/VS2010Express/XBMC.vcxproj.filters
@@ -2973,6 +2973,18 @@
<ClCompile Include="..\..\xbmc\utils\RssManager.cpp">
<Filter>utils</Filter>
</ClCompile>
+ <ClCompile Include="..\..\xbmc\settings\SkinSettings.cpp">
+ <Filter>settings</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\settings\MediaSourceSettings.cpp">
+ <Filter>settings</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\view\ViewStateSettings.cpp">
+ <Filter>view</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\settings\MediaSettings.cpp">
+ <Filter>settings</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\xbmc\win32\pch.h">
@@ -5807,6 +5819,24 @@
<ClInclude Include="..\..\xbmc\utils\RssManager.h">
<Filter>utils</Filter>
</ClInclude>
+ <ClInclude Include="..\..\xbmc\settings\ISettingsHandler.h">
+ <Filter>settings</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\settings\ISubSettings.h">
+ <Filter>settings</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\settings\SkinSettings.h">
+ <Filter>settings</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\settings\MediaSourceSettings.h">
+ <Filter>settings</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\view\ViewStateSettings.h">
+ <Filter>view</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\settings\MediaSettings.h">
+ <Filter>settings</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\xbmc\win32\XBMC_PC.rc">
diff --git a/project/Win32BuildSetup/BuildSetup.bat b/project/Win32BuildSetup/BuildSetup.bat
index b3afd93b09..ef1dc2a5f3 100644
--- a/project/Win32BuildSetup/BuildSetup.bat
+++ b/project/Win32BuildSetup/BuildSetup.bat
@@ -24,6 +24,7 @@ SET buildmode=ask
SET promptlevel=prompt
SET buildmingwlibs=true
SET exitcode=0
+SET useshell=rxvt
FOR %%b in (%1, %2, %3, %4, %5) DO (
IF %%b==vs2010 SET comp=vs2010
IF %%b==dx SET target=dx
@@ -32,6 +33,7 @@ FOR %%b in (%1, %2, %3, %4, %5) DO (
IF %%b==noclean SET buildmode=noclean
IF %%b==noprompt SET promptlevel=noprompt
IF %%b==nomingwlibs SET buildmingwlibs=false
+ IF %%b==sh SET useshell=sh
)
SET buildconfig=Release (DirectX)
@@ -55,6 +57,7 @@ IF %comp%==vs2010 (
set OPTS_EXE="..\VS2010Express\XBMC for Windows.sln" /build "%buildconfig%"
set CLEAN_EXE="..\VS2010Express\XBMC for Windows.sln" /clean "%buildconfig%"
set EXE= "..\VS2010Express\XBMC\%buildconfig%\XBMC.exe"
+ set PDB= "..\VS2010Express\XBMC\%buildconfig%\XBMC.pdb"
rem CONFIG END
rem -------------------------------------------------------------
@@ -147,7 +150,12 @@ IF %comp%==vs2010 (
IF %buildmode%==clean (
ECHO bla>makeclean
)
- call buildmingwlibs.bat
+ rem only use sh to please jenkins
+ IF %useshell%==sh (
+ call buildmingwlibs.bat sh
+ ) ELSE (
+ call buildmingwlibs.bat
+ )
IF EXIST errormingw (
set DIETEXT="failed to build mingw libs"
goto DIE
@@ -233,6 +241,7 @@ IF %comp%==vs2010 (
call getdeploydependencies.bat
CALL extract_git_rev.bat > NUL
SET XBMC_SETUPFILE=XBMCSetup-%GIT_REV%-%target%.exe
+ SET XBMC_PDBFILE=XBMCSetup-%GIT_REV%-%target%.pdb
ECHO Creating installer %XBMC_SETUPFILE%...
IF EXIST %XBMC_SETUPFILE% del %XBMC_SETUPFILE% > NUL
rem get path to makensis.exe from registry, first try tab delim
@@ -276,6 +285,7 @@ IF %comp%==vs2010 (
set DIETEXT=Failed to create %XBMC_SETUPFILE%. NSIS installed?
goto DIE
)
+ copy %PDB% %XBMC_PDBFILE% > nul
ECHO ------------------------------------------------------------
ECHO Done!
ECHO Setup is located at %CD%\%XBMC_SETUPFILE%
diff --git a/project/Win32BuildSetup/buildmingwlibs.bat b/project/Win32BuildSetup/buildmingwlibs.bat
index 2e6206a32c..2bf4313d60 100644
--- a/project/Win32BuildSetup/buildmingwlibs.bat
+++ b/project/Win32BuildSetup/buildmingwlibs.bat
@@ -4,11 +4,29 @@ rem batch file to compile mingw libs via BuildSetup
rem set M$ env
call "%VS100COMNTOOLS%..\..\VC\bin\vcvars32.bat"
-rem check for mingw env
-IF EXIST ..\BuildDependencies\msys\bin\sh.exe (
- rem compiles a bunch of mingw libs and not more
+SET opt=sh
+IF $%1$==$$ SET opt=rxvt
+
+rem compiles a bunch of mingw libs and not more
+IF %opt%==sh (
+ IF EXIST ..\BuildDependencies\msys\bin\sh.exe (
+ ECHO starting sh shell
+ ..\BuildDependencies\msys\bin\sh --login /xbmc/project/Win32BuildSetup/buildmingwlibs.sh
+ GOTO END
+ ) ELSE (
+ GOTO ENDWITHERROR
+ )
+)
+IF EXIST ..\BuildDependencies\msys\bin\rxvt.exe (
+ ECHO starting rxvt shell
..\BuildDependencies\msys\bin\rxvt -backspacekey  -sl 2500 -sr -fn Courier-12 -tn msys -geometry 120x25 -title "building mingw dlls" -e /bin/sh --login /xbmc/project/Win32BuildSetup/buildmingwlibs.sh
-) ELSE (
+ GOTO END
+)
+GOTO ENDWITHERROR
+
+:ENDWITHERROR
ECHO bla>errormingw
- ECHO mingw environment not found
-) \ No newline at end of file
+ ECHO msys environment not found
+
+:END
+ ECHO exiting msys environment \ No newline at end of file
diff --git a/system/Lircmap.xml b/system/Lircmap.xml
index e69eda07b1..3034fb4a40 100644
--- a/system/Lircmap.xml
+++ b/system/Lircmap.xml
@@ -416,7 +416,11 @@
<down>KEY_DOWN</down>
<select>KEY_OK</select>
<select>KEY_ENTER</select>
+ <enter>KEY_ENTER</enter>
+ <clear>KEY_DELETE</clear>
<start>KEY_SELECT</start>
+ <start>KEY_PROG1</start>
+ <start>KEY_HOME</start>
<back>KEY_ESC</back>
<back>KEY_EXIT</back>
<back>KEY_BACK</back>
@@ -434,8 +438,11 @@
<channelplus>KEY_CHANNELUP</channelplus>
<channelminus>KEY_CHANNELDOWN</channelminus>
<skipplus>KEY_NEXTSONG</skipplus>
+ <skipplus>KEY_NEXT</skipplus>
<skipminus>KEY_PREVIOUSSONG</skipminus>
+ <skipminus>KEY_PREVIOUS</skipminus>
<title>KEY_TITLE</title>
+ <title>KEY_EPG</title>
<subtitle>KEY_SUBTITLE</subtitle>
<language>KEY_LANGUAGE</language>
<mute>KEY_MUTE</mute>
@@ -443,7 +450,10 @@
<myvideo>KEY_VIDEO</myvideo>
<mymusic>KEY_AUDIO</mymusic>
<mypictures>KEY_MHP</mypictures>
+ <mypictures>KEY_CAMERA</mypictures>
<mytv>KEY_TV</mytv>
+ <liveradio>KEY_RADIO</liveradio>
+ <mytv>KEY_TUNER</mytv>
<one>KEY_1</one>
<two>KEY_2</two>
<three>KEY_3</three>
@@ -454,17 +464,31 @@
<eight>KEY_8</eight>
<nine>KEY_9</nine>
<zero>KEY_0</zero>
+ <one>KEY_NUMERIC_1</one>
+ <two>KEY_NUMERIC_2</two>
+ <three>KEY_NUMERIC_3</three>
+ <four>KEY_NUMERIC_4</four>
+ <five>KEY_NUMERIC_5</five>
+ <six>KEY_NUMERIC_6</six>
+ <seven>KEY_NUMERIC_7</seven>
+ <eight>KEY_NUMERIC_8</eight>
+ <nine>KEY_NUMERIC_9</nine>
+ <zero>KEY_NUMERIC_0</zero>
+ <star>KEY_NUMERIC_STAR</star>
+ <hash>KEY_NUMERIC_POUND</hash>
<red>KEY_RED</red>
<green>KEY_GREEN</green>
<yellow>KEY_YELLOW</yellow>
<blue>KEY_BLUE</blue>
+ <menu>KEY_DVD</menu>
<menu>KEY_MENU</menu>
<info>KEY_INFO</info>
<info>KEY_PROPS</info>
- <start>KEY_HOME</start>
<display>KEY_ANGLE</display>
+ <display>KEY_ZOOM</display>
<recordedtv>KEY_PVR</recordedtv>
<teletext>KEY_TEXT</teletext>
+ <clear>KEY_DELETE</clear>
</remote>
<remote device="mediacenter">
<pause>pause</pause>
diff --git a/tools/EventClients/lib/python/ps3/keymaps.py b/tools/EventClients/lib/python/ps3/keymaps.py
index c7c1308862..99c6e0424e 100644
--- a/tools/EventClients/lib/python/ps3/keymaps.py
+++ b/tools/EventClients/lib/python/ps3/keymaps.py
@@ -18,12 +18,12 @@
# PS3 Remote and Controller Keymaps
keymap_remote = {
- "16": 'power' ,#EJECT
- "64": None ,#AUDIO
- "65": None ,#ANGLE
- "63": None ,#SUBTITLE
- "0f": None ,#CLEAR
- "28": None ,#TIME
+ "16": 'power' ,#EJECT
+ "64": None ,#AUDIO
+ "65": None ,#ANGLE
+ "63": 'subtitle' ,#SUBTITLE
+ "0f": None ,#CLEAR
+ "28": None ,#TIME
"00": 'one' ,#1
"01": 'two' ,#2
diff --git a/tools/android/depends/.gitignore b/tools/android/depends/.gitignore
deleted file mode 100644
index 923edf28fe..0000000000
--- a/tools/android/depends/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-/Makefile
-/configure
-/Makefile.include
-/autom4te.cache/
-/**/.gitignore
-/**/.installed-*
-/*/x86/*
-/*/x86-native/*
-/*/armeabi-v7a/*
-/*/armeabi-v7a-native/*
diff --git a/tools/android/depends/Makefile.in b/tools/android/depends/Makefile.in
deleted file mode 100644
index a3e65db507..0000000000
--- a/tools/android/depends/Makefile.in
+++ /dev/null
@@ -1,92 +0,0 @@
-#include Makefile.include
-
-BUILDTOOLS = help2man gettext-native autoconf automake libtool pkg-config yasm cmake
-
-SUBDIRS = \
- ncurses pcre expat libiconv gettext readline sqlite3 libgpg-error \
- libgcrypt bzip2 liblzo2 libzip freetype2 fontconfig \
- openssl libssh2 curl \
- libjpeg-turbo tiff jasper libpng \
- libogg libvorbis libflac libmad fribidi libmpeg2 \
- libass libsamplerate \
- libmodplug librtmp libxml2 yajl libmicrohttpd mysql libffi \
- python26-native python26 samba alsa-lib libcdio afpfs-ng libshairport \
- libplist libcec libbluray boost tinyxml dummy-libxbmc libsdl \
- liblzo2-native libjpeg-turbo-native libpng-native tiff-native libsdl_image rpl \
- libamplayer libssh taglib swig-native pcre-native xbmc-pvr-addons libusb libnfs
-
-.PHONY: buildtools $(BUILDTOOLS) subdirs $(SUBDIRS) arm
-
-all: subdirs
- @echo "Dependencies built successfully."
-
-release: armeabi-v7a x86
-
-# Dependency layout for parallel builds
-gettext: libiconv ncurses
-libgcrypt: libgpg-error
-fontconfig: freetype2 expat libiconv
-libssh2: libgcrypt openssl rpl
-curl: openssl libssh2 rpl
-tiff: libjpeg-turbo
-jasper: libjpeg-turbo
-libvorbis: libogg rpl
-libflac: libogg gettext rpl
-libass: fontconfig libpng freetype2 expat libiconv rpl
-librtmp: openssl rpl
-libxml2: libiconv
-libmicrohttpd: openssl libgpg-error libgcrypt
-python26: python26-native expat gettext libxml2 sqlite3 openssl libffi
-libcdio: libiconv
-afpfs-ng: libgcrypt readline libiconv rpl
-libshairport: openssl rpl
-libplist: libxml2 cmake
-libbluray: libiconv libxml2 rpl
-yajl: cmake
-libsdl_image: buildtools libsdl libjpeg-turbo-native libpng-native tiff-native
-python26-native: buildtools
-libsdl: buildtools
-alsa-lib: rpl
-libcec: rpl
-libmad: rpl
-libmodplug: rpl
-libmpeg2: rpl
-libogg: rpl
-rpl: python26-native
-libjpeg-turbo-native: buildtools
-libpng-native: buildtools
-tiff-native: buildtools libjpeg-turbo-native
-liblzo2-native: buildtools
-libssh: openssl cmake rpl
-taglib: cmake
-swig-native: buildtools pcre-native
-pcre-native: buildtools
-libnfs: rpl
-xbmc-pvr-addons: boost mysql
-
-
-X86OVERRIDES=XBMC_OVERRIDE_HOST=i686-android-linux XBMC_OVERRIDE_TOOLCHAIN=$(XBMC_X86_TOOLCHAIN)
-ARMOVERRIDES=XBMC_OVERRIDE_HOST=arm-linux-androideabi XBMC_OVERRIDE_TOOLCHAIN=$(XBMC_ARM_TOOLCHAIN)
-
-buildtools: $(BUILDTOOLS)
-$(BUILDTOOLS):
- $(MAKE) -C $@
-
-subdirs: $(SUBDIRS)
-$(SUBDIRS): help2man autoconf automake libtool pkg-config yasm
- $(MAKE) -C $@
-clean:
- for d in $(BUILDTOOLS); do $(MAKE) -C $$d clean; done
- for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done
-
-distclean::
- for d in $(BUILDTOOLS); do $(MAKE) -C $$d distclean; done
- for d in $(SUBDIRS); do $(MAKE) -C $$d distclean; done
-
-arm: armeabi-v7a
-
-armeabi-v7a: $(XBMC_ARM_TOOLCHAIN)
- XBMC_OVERRIDE_PLATFORM=$@ $(ARMOVERRIDES) $(MAKE) all
-
-x86: $(XBMC_X86_TOOLCHAIN)
- XBMC_OVERRIDE_PLATFORM=$@ $(X86OVERRIDES) $(MAKE) all
diff --git a/tools/android/depends/Makefile.include.in b/tools/android/depends/Makefile.include.in
deleted file mode 100644
index a209546445..0000000000
--- a/tools/android/depends/Makefile.include.in
+++ /dev/null
@@ -1,83 +0,0 @@
-TOOLCHAIN=@use_toolchain@
-NDKROOT=@use_ndk@
-SDKROOT=@use_sdk@
-XBMCPREFIX=@use_staging@
-TARBALLS_LOCATION=@use_tarballs@
-HOST=@use_host@
-PLATFORM=@use_cpu@
-NATIVEPLATFORM=@use_cpu@-native
-SDK_PLATFORM=@use_sdk_platform@
-RETRIEVE_TOOL=@CURL@
-ARCHIVE_TOOL=@TAR@
-
-ifneq ($(XBMC_OVERRIDE_TOOLCHAIN),)
-TOOLCHAIN=$(XBMC_OVERRIDE_TOOLCHAIN)
-endif
-
-ifneq ($(XBMC_OVERRIDE_PLATFORM),)
-PLATFORM=$(XBMC_OVERRIDE_PLATFORM)
-NATIVEPLATFORM=$(XBMC_OVERRIDE_PLATFORM)-native
-endif
-
-ifneq ($(XBMC_OVERRIDE_HOST),)
-HOST=$(XBMC_OVERRIDE_HOST)
-endif
-
-PREFIX=$(XBMCPREFIX)/$(PLATFORM)
-NATIVEPREFIX=$(XBMCPREFIX)/$(NATIVEPLATFORM)
-
-PLATFORM_FLAGS=-DANDROID -Os
-ifeq ($(PLATFORM),armeabi-v7a)
- PLATFORM_FLAGS+=-march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon -D__ARM_ARCH_7__ -D__ARM_ARCH_7A__
-endif
-
-ifeq ($(PLATFORM),x86)
- PLATFORM_FLAGS+=-fomit-frame-pointer
-endif
-
-BASE_URL=http://mirrors.xbmc.org/build-deps/sources
-RETRIEVE_TOOL_FLAGS=-Ls --create-dirs -f --output $(TARBALLS_LOCATION)/$(ARCHIVE)
-ARCHIVE_TOOL_FLAGS=-C $(PLATFORM) --strip-components=1 -xf
-CONFIG_SUB=$(NATIVEPREFIX)/share/automake-1.11/config.sub
-CONFIG_GUESS=$(NATIVEPREFIX)/share/automake-1.11/config.guess
-RPL=$(NATIVEPREFIX)/bin/python $(NATIVEPREFIX)/bin/rpl
-YASM=$(NATIVEPREFIX)/bin/yasm
-
-ifneq ($(NATIVE_BUILD),1)
- export SYSROOT=$(TOOLCHAIN)/sysroot
- export CROSSTOOLS=$(TOOLCHAIN)/bin/$(HOST)-
- export LD=$(CROSSTOOLS)ld
- export CC=$(CROSSTOOLS)gcc
- export CXX=$(CROSSTOOLS)g++
- export AR=$(CROSSTOOLS)ar
- export AS=$(CROSSTOOLS)as
- export NM=$(CROSSTOOLS)nm
- export STRIP=$(CROSSTOOLS)strip
- export RANLIB=$(CROSSTOOLS)ranlib
- export OBJDUMP=$(CROSSTOOLS)objdump
- export READELF=$(CROSSTOOLS)readelf
- export CFLAGS=$(PLATFORM_FLAGS) -I$(PREFIX)/include -I$(PREFIX)/include/$(SDK_PLATFORM) -fexceptions
- export LDFLAGS=$(PLATFORM_FLAGS) -L$(PREFIX)/lib -L$(PREFIX)/lib/$(SDK_PLATFORM)
- export CPPFLAGS=$(PLATFORM_FLAGS) -I$(PREFIX)/include -I$(PREFIX)/include/$(SDK_PLATFORM) -fexceptions
- export CXXFLAGS=$(PLATFORM_FLAGS) -I$(PREFIX)/include -I$(PREFIX)/include/$(SDK_PLATFORM) -fexceptions -frtti
-
- export PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig
- export PKG_CONFIG=$(NATIVEPREFIX)/bin/pkg-config
-
- export AUTOMAKE=$(NATIVEPREFIX)/bin/automake
- export AUTOCONF=$(NATIVEPREFIX)/bin/autoconf
- export ACLOCAL=$(NATIVEPREFIX)/bin/aclocal
- export ACLOCAL_PATH=$(PREFIX)/share/aclocal:$(NATIVEPREFIX)/share/aclocal
- export LIBTOOLIZE=$(NATIVEPREFIX)/bin/libtoolize
- export AUTORECONF=$(NATIVEPREFIX)/bin/autoreconf
-else
- PLATFORM=$(NATIVEPLATFORM)
- PREFIX=$(NATIVEPREFIX)
-
- export CFLAGS=-I$(PREFIX)/include
- export LDFLAGS=-L$(PREFIX)/lib
- export CPPFLAGS=-I$(PREFIX)/include
- export CXXFLAGS=-I$(PREFIX)/include
-endif
- export PATH:=$(NATIVEPREFIX)/bin:$(PATH)
- export LD_LIBRARY_PATH:=$(NATIVEPREFIX)/lib:$(LD_LIBRARY_PATH)
diff --git a/tools/android/depends/afpfs-ng/01-gcrypt.patch b/tools/android/depends/afpfs-ng/01-gcrypt.patch
deleted file mode 100644
index 7bcace2812..0000000000
--- a/tools/android/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 <gcrypt.h>
-- #include <stdio.h>],[
-- 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/android/depends/afpfs-ng/02-pointer.patch b/tools/android/depends/afpfs-ng/02-pointer.patch
deleted file mode 100644
index 80507b5725..0000000000
--- a/tools/android/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 <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
- #include <pthread.h>
-
-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/android/depends/afpfs-ng/04-boxee1.patch b/tools/android/depends/afpfs-ng/04-boxee1.patch
deleted file mode 100644
index 9f3c20f35e..0000000000
--- a/tools/android/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/android/depends/afpfs-ng/05-boxee2.patch b/tools/android/depends/afpfs-ng/05-boxee2.patch
deleted file mode 100644
index 50250bc0af..0000000000
--- a/tools/android/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/android/depends/afpfs-ng/06-boxee3.patch b/tools/android/depends/afpfs-ng/06-boxee3.patch
deleted file mode 100644
index 4b7c916da3..0000000000
--- a/tools/android/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/android/depends/afpfs-ng/07-boxee4.patch b/tools/android/depends/afpfs-ng/07-boxee4.patch
deleted file mode 100644
index 3e09f40dc5..0000000000
--- a/tools/android/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 <string.h>
-+#include <afpfs-ng/afp.h>
-+
-+
-+/*
-+ * 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/android/depends/afpfs-ng/08-boxee5.patch b/tools/android/depends/afpfs-ng/08-boxee5.patch
deleted file mode 100644
index 253fb05c97..0000000000
--- a/tools/android/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/android/depends/afpfs-ng/10-fix-errno.patch b/tools/android/depends/afpfs-ng/10-fix-errno.patch
deleted file mode 100644
index ff7ce44bdb..0000000000
--- a/tools/android/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 <sys/time.h>
- #include <sys/types.h>
- #include <sys/socket.h>
--#include <errno.h>
-
- #include <afpfs-ng/afp_protocol.h>
- #include <afpfs-ng/libafpclient.h>
---- 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/android/depends/afpfs-ng/11-fix-stat.patch b/tools/android/depends/afpfs-ng/11-fix-stat.patch
deleted file mode 100644
index 09e9a35231..0000000000
--- a/tools/android/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/android/depends/afpfs-ng/Makefile b/tools/android/depends/afpfs-ng/Makefile
deleted file mode 100644
index ea3d54cc03..0000000000
--- a/tools/android/depends/afpfs-ng/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include 01-gcrypt.patch 02-pointer.patch 04-boxee1.patch \
- 05-boxee2.patch 06-boxee3.patch 07-boxee4.patch \
- 08-boxee5.patch 10-fix-errno.patch 11-fix-stat.patch \
- android.patch fix_afpfs-ng_includes.patch Makefile
-
-# lib name, version
-LIBNAME=afpfs-ng
-VERSION=0.8.1
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.bz2
-
-# configuration settings
-export PATH:=$(TOOLCHAIN)/bin:$(PATH)
-export LIBS=-liconv
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST) \
- --disable-fuse ac_cv_func_malloc_0_nonnull=yes
-
-LIBDYLIB=$(PLATFORM)/lib/.libs/libafpclient.so.0.0.0
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p1 <../fix_afpfs-ng_includes.patch
- cd $(PLATFORM); patch -p1 <../01-gcrypt.patch
- cd $(PLATFORM); patch -p1 <../02-pointer.patch
- cd $(PLATFORM); patch -p1 <../04-boxee1.patch
- cd $(PLATFORM); patch -p1 <../05-boxee2.patch
- cd $(PLATFORM); patch -p1 <../06-boxee3.patch
- cd $(PLATFORM); patch -p1 <../07-boxee4.patch
- cd $(PLATFORM); patch -p1 <../08-boxee5.patch
- cd $(PLATFORM); patch -p1 <../10-fix-errno.patch
- cd $(PLATFORM); patch -p1 <../11-fix-stat.patch
- cd $(PLATFORM); patch -p0 < ../android.patch
- cd $(PLATFORM); $(AUTORECONF) -vif
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -j 1 -C $(PLATFORM)/lib
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/lib install
- $(MAKE) -C $(PLATFORM)/include install
- rm -f $(PREFIX)/lib/libafpclient.la $(PREFIX)/lib/libafpclient.so $(PREFIX)/lib/libafpclient.so.0
- mv -f $(PREFIX)/lib/libafpclient.so.0.0.0 $(PREFIX)/lib/libafpclient.so
- $(RPL) -e "libafpclient.so.0" "libafpclient.so\x00\x00" $(PREFIX)/lib/libafpclient.so
- -$(READELF) --dynamic $(PREFIX)/lib/libafpclient.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/afpfs-ng/android.patch b/tools/android/depends/afpfs-ng/android.patch
deleted file mode 100644
index b8acfeca5f..0000000000
--- a/tools/android/depends/afpfs-ng/android.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- include/afpfs-ng/afp.h 2012-06-03 22:47:49.014348648 -0400
-+++ include/afpfs-ng/afp.h 2012-06-03 22:46:28.924348698 -0400
-@@ -5,7 +5,13 @@
- #include <arpa/inet.h>
- #include <pthread.h>
- #include <netdb.h>
-+#ifndef ANDROID
- #include <sys/statvfs.h>
-+#else
-+#include <sys/vfs.h>
-+#define statvfs statfs
-+#define fstatvfs fstatfs
-+#endif
- #include <pwd.h>
- #include <afpfs-ng/afp_protocol.h>
- #include <afpfs-ng/libafpclient.h>
---- lib/midlevel.c 2012-06-03 22:47:49.014348648 -0400
-+++ lib/midlevel.c 2012-06-03 22:46:28.924348698 -0400
-@@ -1388,10 +1388,12 @@
- stat->f_frsize=0;
- stat->f_files=0;
- stat->f_ffree=0;
-+#ifndef ANDROID
- stat->f_favail=0;
- stat->f_fsid=0;
- stat->f_flag=0;
- stat->f_namemax=255;
-+#endif
- return 0;
-
- }
---- lib/lowlevel.c 2012-06-03 22:47:49.054348648 -0400
-+++ lib/lowlevel.c 2012-06-03 22:46:28.914348698 -0400
-@@ -612,7 +612,7 @@
- modification_date=fp.modification_date;
- }
-
--#ifdef __linux__
-+#if defined(__linux__) && !defined(ANDROID)
- stbuf->st_ctim.tv_sec=creation_date;
- stbuf->st_mtim.tv_sec=modification_date;
- #else
---- lib/dsi.c 2012-06-03 23:24:15.454347269 -0400
-+++ lib/dsi.c 2012-06-03 23:25:01.634347240 -0400
-@@ -610,7 +610,7 @@
- afp_getsrvrmsg(server,AFPMESG_SERVER,
- ((server->using_version->av_number>=30)?1:0),
- DSI_DEFAULT_TIMEOUT,mesg);
-- if(bcmp(mesg,"The server is going down for maintenance.",41)==0)
-+ if(memcmp(mesg,"The server is going down for maintenance.",41)==0)
- shutdown=1;
- }
-
---- lib/afp.c 2012-06-03 23:24:15.474347269 -0400
-+++ lib/afp.c 2012-06-03 23:25:12.464347233 -0400
-@@ -205,7 +205,7 @@
- {
- struct afp_server *s;
- for (s=server_base;s;s=s->next) {
-- if (bcmp(&s->address,address,sizeof(struct sockaddr_in))==0)
-+ if (memcmp(&s->address,address,sizeof(struct sockaddr_in))==0)
- return s;
- }
- return NULL;
diff --git a/tools/android/depends/afpfs-ng/fix_afpfs-ng_includes.patch b/tools/android/depends/afpfs-ng/fix_afpfs-ng_includes.patch
deleted file mode 100644
index f507a485ef..0000000000
--- a/tools/android/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 <string.h>
- #include <stdio.h>
-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 <string.h>
- #include <pthread.h>
-
--#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 <grp.h>
-
- #include "config.h"
--#include <afp.h>
-+#include <afpfs-ng/afp.h>
- #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 <getopt.h>
- #include <signal.h>
-
--#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 <signal.h>
- #include <sys/socket.h>
-
--#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 <unistd.h>
- #include <string.h>
- #include <stdio.h>
--#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 <fuse.h>
- #include <stdio.h>
-@@ -39,10 +39,10 @@
- #include <pwd.h>
- #include <stdarg.h>
-
--#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 <arpa/inet.h>
-+#include <pthread.h>
-+#include <netdb.h>
-+#include <sys/statvfs.h>
-+#include <pwd.h>
-+#include <afpfs-ng/afp_protocol.h>
-+#include <afpfs-ng/libafpclient.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <netinet/in.h>
-+
-+
-+#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 <sys/types.h>
-+#include <stddef.h>
-+#include <unistd.h>
-+#include <stdint.h>
-+
-+/* 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 <unistd.h>
-+#include <syslog.h>
-+
-+#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 <utime.h>
-+#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 <stdio.h>
-+
-+#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 <arpa/inet.h>
--#include <pthread.h>
--#include <netdb.h>
--#include <sys/statvfs.h>
--#include <pwd.h>
--#include <afp_protocol.h>
--#include <libafpclient.h>
--#include <sys/types.h>
--#include <sys/stat.h>
--#include <unistd.h>
--#include <netinet/in.h>
--
--
--#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 <sys/types.h>
--#include <stddef.h>
--#include <unistd.h>
--#include <stdint.h>
--
--/* 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 <unistd.h>
--#include <syslog.h>
--
--#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 <utime.h>
--#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 <stdio.h>
--
--#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 <config.h>
-
- #include <stdio.h>
-@@ -21,17 +21,17 @@
- #include <sys/socket.h>
- #include <errno.h>
-
--#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 <stdio.h>
- #include <stdlib.h>
- #include <errno.h>
--#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 <afp.h>
--#include <libafpclient.h>
-+#include <afpfs-ng/afp.h>
-+#include <afpfs-ng/libafpclient.h>
-
-
- 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 <string.h>
- #include <stdlib.h>
--#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 <string.h>
- #include <sys/socket.h>
-
--#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 <string.h>
- #include <stdio.h>
-
--#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 <signal.h>
- #include <iconv.h>
-
--#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 <stdlib.h>
- #include <pthread.h>
-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 <stdarg.h>
- #include <string.h>
- #include <stdlib.h>
--#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 <sys/time.h>
- #include <signal.h>
-
--#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 <fcntl.h>
- #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 <string.h>
--#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 <unistd.h>
- #include <sys/time.h>
-
--#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 <sys/stat.h>
- #include <string.h>
-@@ -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 <string.h>
- #include <stdlib.h>
--#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 <string.h>
- #include <stdlib.h>
-
--#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 <string.h>
- #include <stdlib.h>
-
--#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 <stdlib.h>
- #include <string.h>
--#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 <stdlib.h>
- #include <string.h>
-
--#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 <stdlib.h>
- #include <string.h>
--#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 <stdlib.h>
- #include <string.h>
-
--#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 <string.h>
--#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 <stdlib.h>
- #include <string.h>
--#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 <stdlib.h>
- #include <string.h>
--#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 <string.h>
- #include <stdlib.h>
--#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 <string.h>
- #include <errno.h>
- #include <fcntl.h>
--#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 <string.h>
- #include <time.h>
-
--#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 <string.h>
- #include <stdio.h>
--#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 <string.h>
- #include <stdlib.h>
--#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 <grp.h>
- #include <string.h>
-
--#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 <stdio.h>
- #include <string.h>
- #include <stdlib.h>
--#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/android/depends/alsa-lib/Makefile b/tools/android/depends/alsa-lib/Makefile
deleted file mode 100644
index aba5badb6e..0000000000
--- a/tools/android/depends/alsa-lib/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile removeshm-2.patch removeshm-3.patch removeshm-upstream.patch timeval.patch
-
-# lib name, version
-LIBNAME=libasound
-VERSION=1.0.23
-SOURCE=alsa-lib-$(VERSION)
-ARCHIVE=$(SOURCE).tar.bz2
-
-# configuration settings
-CFLAGS += \
- -fPIC -DPIC \
- -finline-limit=300 -finline-functions -fno-inline-functions-called-once \
-
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- $(AUTORECONF) -vif; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) \
- --with-alsa-devdir=/dev/snd/ --with-plugindir=/system/usr/lib/alsa-lib --with-configdir=/system/usr/share/alsa \
- --with-ctl-plugins=ext \
- --with-pcm-plugins="copy,linear,route,mulaw,alaw,adpcm,rate,plug,multi,file,null,empty,share,meter,hooks,lfloat,ladspa,asym,iec958,softvol,extplug,ioplug,mmap_emul" \
- --disable-resmgr --enable-aload --enable-mixer --enable-pcm --disable-rawmidi --enable-hwdep --disable-seq --disable-alisp --disable-old-symbols --disable-python \
- --with-softfloat=yes --with-libdl=yes --with-pthread=yes --with-librt=no \
-
-LIBDYLIB=$(PLATFORM)/src/.libs/$(LIBNAME).so
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p1 < ../removeshm-upstream.patch
- cd $(PLATFORM); patch -p0 < ../removeshm-2.patch
- cd $(PLATFORM); patch -p0 < ../removeshm-3.patch
- cd $(PLATFORM); patch -p0 < ../timeval.patch
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)/src
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/src install-libLTLIBRARIES
- $(MAKE) -C $(PLATFORM)/include install
- $(MAKE) -C $(PLATFORM)/utils install
- rm -f $(PREFIX)/lib/libasound.la $(PREFIX)/lib/libasound.so $(PREFIX)/lib/libxbasound.so $(PREFIX)/lib/libasound.so.2
- mv -f $(PREFIX)/lib/libasound.so.2.0.0 $(PREFIX)/lib/libasound.so
- $(RPL) -e "libasound.so.2" "libasound.so\x00\x00" $(PREFIX)/lib/libasound.so
- -$(READELF) --dynamic $(PREFIX)/lib/libasound.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/alsa-lib/removeshm-2.patch b/tools/android/depends/alsa-lib/removeshm-2.patch
deleted file mode 100644
index 0bf5b18a4b..0000000000
--- a/tools/android/depends/alsa-lib/removeshm-2.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/compat/Makefile.am 2012-05-25 00:00:09.824890740 -0400
-+++ src/compat/Makefile.am 2012-05-25 14:47:53.694857153 -0400
-@@ -1,8 +1,3 @@
- noinst_LTLIBRARIES = libcompat.la
--EXTRA_libcompat_la_SOURCES = hsearch_r.c
-
--if ALSA_HSEARCH_R
--libcompat_la_SOURCES = empty.c hsearch_r.c
--else
- libcompat_la_SOURCES = empty.c
--endif
diff --git a/tools/android/depends/alsa-lib/removeshm-3.patch b/tools/android/depends/alsa-lib/removeshm-3.patch
deleted file mode 100644
index 8f651fea39..0000000000
--- a/tools/android/depends/alsa-lib/removeshm-3.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/Makefile.am 2011-01-12 17:02:37.000000000 -0500
-+++ src/Makefile.am 2012-05-25 00:10:22.184890354 -0400
-@@ -14,7 +14,7 @@
- endif
-
- lib_LTLIBRARIES = libasound.la
--libasound_la_SOURCES = conf.c confmisc.c input.c output.c async.c error.c dlmisc.c socket.c shmarea.c userfile.c names.c
-+libasound_la_SOURCES = conf.c confmisc.c input.c output.c async.c error.c dlmisc.c socket.c userfile.c names.c
-
- SUBDIRS=control
- libasound_la_LIBADD = control/libcontrol.la
diff --git a/tools/android/depends/alsa-lib/removeshm-upstream.patch b/tools/android/depends/alsa-lib/removeshm-upstream.patch
deleted file mode 100644
index ab899c3ed6..0000000000
--- a/tools/android/depends/alsa-lib/removeshm-upstream.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-From: Sean McNeil <sean.mcneil@windriver.com>
-Date: Wed, 7 Jul 2010 02:03:47 +0000 (+0700)
-Subject: Remove shared memory access.
-X-Git-Tag: tegra-10.11.0~2
-X-Git-Url: http://nv-tegra.nvidia.com/gitweb/?p=android%2Fplatform%2Fexternal%2Falsa-lib.git;a=commitdiff_plain;h=24def9277c1bf4ed5c19b73ed3e76d761f992ddb
-
-Remove shared memory access.
-
-Somehow these changes didn't get committed.
-
-Change-Id: Ida7b706de56d95c8fb22d2708711a4d68c41ddaa
----
-
-diff --git a/src/alisp/alisp.c b/src/alisp/alisp.c
-index f3580f9..279a24c 100644
---- a/src/alisp/alisp.c
-+++ b/src/alisp/alisp.c
-@@ -1025,6 +1025,7 @@ static const char *obj_type_str(struct alisp_object * p)
- case ALISP_OBJ_CONS: return "cons";
- default: assert(0);
- }
-+ return 0; /* make compiler happy */
- }
-
- static void print_obj_lists(struct alisp_instance *instance, snd_output_t *out)
-diff --git a/src/dlmisc.c b/src/dlmisc.c
-index a0d62d3..b84eaf6 100644
---- a/src/dlmisc.c
-+++ b/src/dlmisc.c
-@@ -27,6 +27,7 @@
- *
- */
-
-+#define _GNU_SOURCE
- #include "list.h"
- #include "local.h"
-
-@@ -53,13 +54,13 @@ void *snd_dlopen(const char *name, int mode)
- #else
- #ifdef HAVE_LIBDL
- if (name == NULL) {
-- static const char * self = NULL;
-- if (self == NULL) {
-- Dl_info dlinfo;
-- if (dladdr(snd_dlopen, &dlinfo) > 0)
-- self = dlinfo.dli_fname;
-- }
-- name = self;
-+#ifdef ANDROID
-+ return RTLD_DEFAULT;
-+#else
-+ Dl_info dlinfo;
-+ if (dladdr(snd_dlopen, &dlinfo) > 0)
-+ name = dlinfo.dli_fname;
-+#endif
- }
- #endif
- #endif
-@@ -85,6 +86,10 @@ int snd_dlclose(void *handle)
- return 0;
- #endif
- #ifdef HAVE_LIBDL
-+#ifdef ANDROID
-+ if (handle == RTLD_DEFAULT)
-+ return 0;
-+#endif
- return dlclose(handle);
- #else
- return 0;
-diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
-index f910189..71d5e99 100644
---- a/src/pcm/pcm.c
-+++ b/src/pcm/pcm.c
-@@ -634,7 +634,6 @@ playback devices.
- #include <stdarg.h>
- #include <signal.h>
- #include <sys/poll.h>
--#include <sys/shm.h>
- #include <sys/mman.h>
- #include <limits.h>
- #include "pcm_local.h"
-diff --git a/src/pcm/pcm_generic.c b/src/pcm/pcm_generic.c
-index 84ea85f..d26aead 100644
---- a/src/pcm/pcm_generic.c
-+++ b/src/pcm/pcm_generic.c
-@@ -26,7 +26,6 @@
- *
- */
-
--#include <sys/shm.h>
- #include <sys/ioctl.h>
- #include <limits.h>
- #include "pcm_local.h"
-diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c
-index 9d243d5..7f88a5b 100644
---- a/src/pcm/pcm_hw.c
-+++ b/src/pcm/pcm_hw.c
-@@ -36,7 +36,6 @@
- #include <fcntl.h>
- #include <sys/ioctl.h>
- #include <sys/mman.h>
--#include <sys/shm.h>
- #include "pcm_local.h"
- #include "../control/control_local.h"
- #include "../timer/timer_local.h"
-diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c
-index 4621fe6..4b7a353 100644
---- a/src/pcm/pcm_mmap.c
-+++ b/src/pcm/pcm_mmap.c
-@@ -23,7 +23,9 @@
- #include <string.h>
- #include <sys/poll.h>
- #include <sys/mman.h>
-+#ifndef ANDROID
- #include <sys/shm.h>
-+#endif
- #include "pcm_local.h"
-
- size_t page_size(void)
-@@ -371,6 +373,7 @@ int snd_pcm_mmap(snd_pcm_t *pcm)
- }
- i->addr = ptr;
- break;
-+#ifndef ANDROID
- case SND_PCM_AREA_SHM:
- if (i->u.shm.shmid < 0) {
- int id;
-@@ -416,6 +419,7 @@ int snd_pcm_mmap(snd_pcm_t *pcm)
- }
- i->addr = ptr;
- break;
-+#endif
- case SND_PCM_AREA_LOCAL:
- ptr = malloc(size);
- if (ptr == NULL) {
-@@ -496,6 +500,7 @@ int snd_pcm_munmap(snd_pcm_t *pcm)
- }
- errno = 0;
- break;
-+#ifndef ANDROID
- case SND_PCM_AREA_SHM:
- if (i->u.shm.area) {
- snd_shm_area_destroy(i->u.shm.area);
-@@ -513,6 +518,7 @@ int snd_pcm_munmap(snd_pcm_t *pcm)
- }
- }
- break;
-+#endif
- case SND_PCM_AREA_LOCAL:
- free(i->addr);
- break;
-diff --git a/src/pcm/pcm_null.c b/src/pcm/pcm_null.c
-index 692254a..2f2a42f 100644
---- a/src/pcm/pcm_null.c
-+++ b/src/pcm/pcm_null.c
-@@ -28,7 +28,6 @@
-
- #include <byteswap.h>
- #include <limits.h>
--#include <sys/shm.h>
- #include "pcm_local.h"
- #include "pcm_plugin.h"
-
-diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
-index 0ef394a..a751deb 100644
---- a/src/pcm/pcm_plugin.c
-+++ b/src/pcm/pcm_plugin.c
-@@ -82,7 +82,6 @@ pcm.rate44100Hz {
-
- */
-
--#include <sys/shm.h>
- #include <limits.h>
- #include "pcm_local.h"
- #include "pcm_plugin.h"
-diff --git a/src/pcm/pcm_share.c b/src/pcm/pcm_share.c
-index 56a8685..72084fc 100644
---- a/src/pcm/pcm_share.c
-+++ b/src/pcm/pcm_share.c
-@@ -35,7 +35,6 @@
- #include <math.h>
- #include <sys/socket.h>
- #include <sys/poll.h>
--#include <sys/shm.h>
- #include <pthread.h>
- #include "pcm_local.h"
-
diff --git a/tools/android/depends/alsa-lib/timeval.patch b/tools/android/depends/alsa-lib/timeval.patch
deleted file mode 100644
index 0c8cbe718c..0000000000
--- a/tools/android/depends/alsa-lib/timeval.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/global.h 2010-04-16 07:11:05.000000000 -0400
-+++ include/global.h 2012-05-25 15:38:15.494855247 -0400
-@@ -133,7 +133,7 @@
-
- int snd_user_file(const char *file, char **result);
-
--#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE)
-+#if 0
- struct timeval {
- time_t tv_sec; /* seconds */
- long tv_usec; /* microseconds */
diff --git a/tools/android/depends/android-sys/Makefile b/tools/android/depends/android-sys/Makefile
deleted file mode 100644
index 036ecc3d77..0000000000
--- a/tools/android/depends/android-sys/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-include ../Makefile.include
-DEPS = ../Makefile.include Makefile iomx.cpp
-
-LIBNAME=android-sys
-VERSION=0.1
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-PRIVATE_LIBDIR=$(PLATFORM)/android-libs
-PRIVATE_LIBS =$(PRIVATE_LIBDIR)/libutils.so
-PRIVATE_LIBS+=$(PRIVATE_LIBDIR)/libmedia.so
-PRIVATE_LIBS+=$(PRIVATE_LIBDIR)/libbinder.so
-PRIVATE_LIBS+=$(PRIVATE_LIBDIR)/libstagefright.so
-
-CXXFLAGS =$(PLATFORM_FLAGS) -I$(PREFIX)/include -fexceptions
-LDFLAGS += -L$(PRIVATE_LIBDIR) -lmedia -lutils -lbinder
-INCLUDES+=-I$(PLATFORM)/$(SDK_PLATFORM)/system/core/include
-INCLUDES+=-I$(PLATFORM)/$(SDK_PLATFORM)/frameworks/base/include
-INCLUDES+=-I$(PLATFORM)/$(SDK_PLATFORM)/frameworks/base/include/media/stagefright/openmax
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
-
-$(PRIVATE_LIBS:.so=.symbols): $(PLATFORM)
-
-$(PRIVATE_LIBS:.so=.c): $(PRIVATE_LIBS:.so=.symbols)
- rm -f $@
- for s in `cat $(@:.c=.symbols)`; do echo "void $$s() {}" >> $@; done
-
-$(PRIVATE_LIBS): $(PRIVATE_LIBS:.so=.c)
- $(CC) $(@:.so=.c) -shared -o $@
-
-$(PLATFORM)/$(SDK_PLATFORM)/libiomx.so: iomx.cpp
- $(CXX) $(CXXFLAGS) $(INCLUDES) -shared -o $@ iomx.cpp $(LDFLAGS) -lstagefright
-
-.installed-$(PLATFORM): $(PRIVATE_LIBS) $(PLATFORM)/$(SDK_PLATFORM)/libiomx.so
- mkdir -p $(PREFIX)/include/$(SDK_PLATFORM)
- mkdir -p $(PREFIX)/lib/$(SDK_PLATFORM)
- cp -f $(PLATFORM)/$(SDK_PLATFORM)/libiomx.so $(PREFIX)/lib/$(SDK_PLATFORM)/
- cp -f $(PLATFORM)/$(SDK_PLATFORM)/frameworks/base/include/media/stagefright/openmax/* $(PREFIX)/include/$(SDK_PLATFORM)/
- touch $@
-
-clean:
- rm -f .installed-$(PLATFORM) $(PLATFORM)/libiomx.so $(PRIVATE_LIBS) $(PRIVATE_LIBS:.so=.c)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/android-sys/iomx.cpp b/tools/android/depends/android-sys/iomx.cpp
deleted file mode 100644
index d21fae74ca..0000000000
--- a/tools/android/depends/android-sys/iomx.cpp
+++ /dev/null
@@ -1,473 +0,0 @@
-/*****************************************************************************
- * iomx.cpp: OpenMAX interface implementation based on IOMX
- *****************************************************************************
- * Copyright (C) 2011 VLC authors and VideoLAN
- *
- * Authors: Martin Storsjo <martin@martin.st>
- *
- * This program 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, 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-
-#include <media/stagefright/OMXClient.h>
-#include <media/IOMX.h>
-#include <binder/MemoryDealer.h>
-#include <OMX_Component.h>
-
-extern "C" {
-
-int android_printf(const char *format, ...)
-{
- // For use before CLog is setup by XBMC_Run()
- va_list args;
- va_start(args, format);
- int result = __android_log_vprint(ANDROID_LOG_VERBOSE, "XBMC", format, args);
- va_end(args);
- return result;
-}
-}
-
-//#define PREFIX(x) I ## x
-#define PREFIX(x) x
-
-using namespace android;
-
-class IOMXContext {
-public:
- IOMXContext() {
- }
-
- sp<IOMX> iomx;
- List<IOMX::ComponentInfo> components;
-};
-
-static IOMXContext *ctx;
-
-class OMXNode;
-
-class OMXCodecObserver : public BnOMXObserver {
-public:
- OMXCodecObserver() {
- node = NULL;
- }
- void setNode(OMXNode* n) {
- node = n;
- }
- void onMessage(const omx_message &msg);
- void registerBuffers(const sp<IMemoryHeap> &) {
- }
-private:
- OMXNode *node;
-};
-
-class OMXNode {
-public:
- IOMX::node_id node;
- sp<OMXCodecObserver> observer;
- OMX_CALLBACKTYPE callbacks;
- OMX_PTR app_data;
- OMX_STATETYPE state;
- List<OMX_BUFFERHEADERTYPE*> buffers;
- OMX_HANDLETYPE handle;
- String8 component_name;
-};
-
-class OMXBuffer {
-public:
- sp<MemoryDealer> dealer;
- IOMX::buffer_id id;
-};
-
-void OMXCodecObserver::onMessage(const omx_message &msg)
-{
- if (!node)
- return;
- switch (msg.type) {
- case omx_message::EVENT:
- // TODO: Needs locking
- if (msg.u.event_data.event == OMX_EventCmdComplete && msg.u.event_data.data1 == OMX_CommandStateSet)
- node->state = (OMX_STATETYPE) msg.u.event_data.data2;
- node->callbacks.EventHandler(node->handle, node->app_data, msg.u.event_data.event, msg.u.event_data.data1, msg.u.event_data.data2, NULL);
- break;
- case omx_message::EMPTY_BUFFER_DONE:
- for( List<OMX_BUFFERHEADERTYPE*>::iterator it = node->buffers.begin(); it != node->buffers.end(); it++ ) {
- OMXBuffer* info = (OMXBuffer*) (*it)->pPlatformPrivate;
- if (msg.u.buffer_data.buffer == info->id) {
- node->callbacks.EmptyBufferDone(node->handle, node->app_data, *it);
- break;
- }
- }
- break;
- case omx_message::FILL_BUFFER_DONE:
- for( List<OMX_BUFFERHEADERTYPE*>::iterator it = node->buffers.begin(); it != node->buffers.end(); it++ ) {
- OMXBuffer* info = (OMXBuffer*) (*it)->pPlatformPrivate;
- if (msg.u.extended_buffer_data.buffer == info->id) {
- OMX_BUFFERHEADERTYPE *buffer = *it;
- buffer->nOffset = msg.u.extended_buffer_data.range_offset;
- buffer->nFilledLen = msg.u.extended_buffer_data.range_length;
- buffer->nFlags = msg.u.extended_buffer_data.flags;
- buffer->nTimeStamp = msg.u.extended_buffer_data.timestamp;
- node->callbacks.FillBufferDone(node->handle, node->app_data, buffer);
- break;
- }
- }
- break;
- default:
- break;
- }
-}
-
-static OMX_ERRORTYPE get_error(status_t err)
-{
- if (err == OK)
- return OMX_ErrorNone;
- return OMX_ErrorUndefined;
-}
-
-static int get_param_size(OMX_INDEXTYPE param_index)
-{
- switch (param_index) {
- case OMX_IndexParamPortDefinition:
- return sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
- case OMX_IndexParamStandardComponentRole:
- return sizeof(OMX_PARAM_COMPONENTROLETYPE);
- case OMX_IndexParamVideoInit:
- case OMX_IndexParamAudioInit:
- case OMX_IndexParamImageInit:
- case OMX_IndexParamOtherInit:
- return sizeof(OMX_PORT_PARAM_TYPE);
- case OMX_IndexParamNumAvailableStreams:
- return sizeof(OMX_PARAM_U32TYPE);
- case OMX_IndexParamAudioPcm:
- return sizeof(OMX_AUDIO_PARAM_PCMMODETYPE);
- case OMX_IndexParamAudioAdpcm:
- return sizeof(OMX_AUDIO_PARAM_AMRTYPE);
- case OMX_IndexParamAudioAmr:
- return sizeof(OMX_AUDIO_PARAM_AMRTYPE);
- case OMX_IndexParamAudioG723:
- return sizeof(OMX_AUDIO_PARAM_G723TYPE);
- case OMX_IndexParamAudioG726:
- return sizeof(OMX_AUDIO_PARAM_G726TYPE);
- case OMX_IndexParamAudioG729:
- return sizeof(OMX_AUDIO_PARAM_G729TYPE);
- case OMX_IndexParamAudioAac:
- return sizeof(OMX_AUDIO_PARAM_AACPROFILETYPE);
- case OMX_IndexParamAudioMp3:
- return sizeof(OMX_AUDIO_PARAM_MP3TYPE);
- case OMX_IndexParamAudioSbc:
- return sizeof(OMX_AUDIO_PARAM_SBCTYPE);
- case OMX_IndexParamAudioVorbis:
- return sizeof(OMX_AUDIO_PARAM_VORBISTYPE);
- case OMX_IndexParamAudioWma:
- return sizeof(OMX_AUDIO_PARAM_WMATYPE);
- case OMX_IndexParamAudioRa:
- return sizeof(OMX_AUDIO_PARAM_RATYPE);
- case OMX_IndexParamVideoPortFormat:
- return sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE);
- case OMX_IndexParamVideoBitrate:
- return sizeof(OMX_VIDEO_PARAM_BITRATETYPE);
- case OMX_IndexParamVideoH263:
- return sizeof(OMX_VIDEO_PARAM_H263TYPE);
- case OMX_IndexParamVideoMpeg4:
- return sizeof(OMX_VIDEO_PARAM_MPEG4TYPE);
- case OMX_IndexParamVideoAvc:
- return sizeof(OMX_VIDEO_PARAM_AVCTYPE);
- default:
- return 0;
- }
-}
-
-static int get_config_size(OMX_INDEXTYPE param_index)
-{
- switch (param_index) {
- case OMX_IndexConfigCommonOutputCrop:
- return sizeof(OMX_CONFIG_RECTTYPE);
- default:
- /* Dynamically queried config indices could have any size, but
- * are currently only used with OMX_BOOL. */
- return sizeof(OMX_BOOL);
- }
-}
-
-static OMX_ERRORTYPE iomx_send_command(OMX_HANDLETYPE component, OMX_COMMANDTYPE command, OMX_U32 param1, OMX_PTR)
-{
- android_printf("iomx_send_command\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- return get_error(ctx->iomx->sendCommand(node->node, command, param1));
-}
-
-static OMX_ERRORTYPE iomx_get_parameter(OMX_HANDLETYPE component, OMX_INDEXTYPE param_index, OMX_PTR param)
-{
- android_printf("iomx_get_parameter\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- return get_error(ctx->iomx->getParameter(node->node, param_index, param, get_param_size(param_index)));
-}
-
-static OMX_ERRORTYPE iomx_set_parameter(OMX_HANDLETYPE component, OMX_INDEXTYPE param_index, OMX_PTR param)
-{
- android_printf("iomx_set_parameter\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- return get_error(ctx->iomx->setParameter(node->node, param_index, param, get_param_size(param_index)));
-}
-
-static OMX_ERRORTYPE iomx_get_state(OMX_HANDLETYPE component, OMX_STATETYPE *ptr)
-{
- android_printf("iomx_get_state\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- *ptr = node->state;
- return OMX_ErrorNone;
-}
-
-static OMX_ERRORTYPE iomx_allocate_buffer(OMX_HANDLETYPE component, OMX_BUFFERHEADERTYPE **bufferptr, OMX_U32 port_index, OMX_PTR app_private, OMX_U32 size)
-{
- android_printf("iomx_allocate_buffer\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- OMXBuffer* info = new OMXBuffer;
- info->dealer = new MemoryDealer(size + 4096); // Do we need to keep this around, or is it kept alive via the IMemory that references it?
- sp<IMemory> mem = info->dealer->allocate(size);
- int ret = ctx->iomx->allocateBufferWithBackup(node->node, port_index, mem, &info->id);
- if (ret != OK)
- return OMX_ErrorUndefined;
- OMX_BUFFERHEADERTYPE *buffer = (OMX_BUFFERHEADERTYPE*) calloc(1, sizeof(OMX_BUFFERHEADERTYPE));
- *bufferptr = buffer;
- buffer->pPlatformPrivate = info;
- buffer->pAppPrivate = app_private;
- buffer->nAllocLen = size;
- buffer->pBuffer = (OMX_U8*) mem->pointer();
- node->buffers.push_back(buffer);
- return OMX_ErrorNone;
-}
-
-static OMX_ERRORTYPE iomx_free_buffer(OMX_HANDLETYPE component, OMX_U32 port, OMX_BUFFERHEADERTYPE *buffer)
-{
- android_printf("iomx_free_buffer\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- OMXBuffer* info = (OMXBuffer*) buffer->pPlatformPrivate;
- status_t ret = ctx->iomx->freeBuffer(node->node, port, info->id);
- for( List<OMX_BUFFERHEADERTYPE*>::iterator it = node->buffers.begin(); it != node->buffers.end(); it++ ) {
- if (buffer == *it) {
- node->buffers.erase(it);
- break;
- }
- }
- free(buffer);
- delete info;
- return get_error(ret);
-}
-
-static OMX_ERRORTYPE iomx_empty_this_buffer(OMX_HANDLETYPE component, OMX_BUFFERHEADERTYPE *buffer)
-{
- android_printf("iomx_empty_this_buffer\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- OMXBuffer* info = (OMXBuffer*) buffer->pPlatformPrivate;
- return get_error(ctx->iomx->emptyBuffer(node->node, info->id, buffer->nOffset, buffer->nFilledLen, buffer->nFlags, buffer->nTimeStamp));
-}
-
-static OMX_ERRORTYPE iomx_fill_this_buffer(OMX_HANDLETYPE component, OMX_BUFFERHEADERTYPE *buffer)
-{
- android_printf("iomx_fill_this_buffer\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- OMXBuffer* info = (OMXBuffer*) buffer->pPlatformPrivate;
- return get_error(ctx->iomx->fillBuffer(node->node, info->id));
-}
-
-static OMX_ERRORTYPE iomx_component_role_enum(OMX_HANDLETYPE component, OMX_U8 *role, OMX_U32 index)
-{
- android_printf("iomx_component_role_enum\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- for( List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); it != ctx->components.end(); it++ ) {
- if (node->component_name == it->mName) {
- if (index >= it->mRoles.size())
- return OMX_ErrorNoMore;
- List<String8>::iterator it2 = it->mRoles.begin();
- for( OMX_U32 i = 0; it2 != it->mRoles.end() && i < index; i++, it2++ ) ;
- strncpy((char*)role, it2->string(), OMX_MAX_STRINGNAME_SIZE);
- if (it2->length() >= OMX_MAX_STRINGNAME_SIZE)
- role[OMX_MAX_STRINGNAME_SIZE - 1] = '\0';
- return OMX_ErrorNone;
- }
- }
- return OMX_ErrorInvalidComponentName;
-}
-
-static OMX_ERRORTYPE iomx_get_extension_index(OMX_HANDLETYPE component, OMX_STRING parameter, OMX_INDEXTYPE *index)
-{
- android_printf("iomx_get_extension_index\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- return get_error(ctx->iomx->getExtensionIndex(node->node, parameter, index));
-}
-
-static OMX_ERRORTYPE iomx_set_config(OMX_HANDLETYPE component, OMX_INDEXTYPE index, OMX_PTR param)
-{
- android_printf("iomx_set_config\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- return get_error(ctx->iomx->setConfig(node->node, index, param, get_config_size(index)));
-}
-
-static OMX_ERRORTYPE iomx_get_config(OMX_HANDLETYPE component, OMX_INDEXTYPE index, OMX_PTR param)
-{
- android_printf("iomx_get_config\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)component)->pComponentPrivate;
- return get_error(ctx->iomx->getConfig(node->node, index, param, get_config_size(index)));
-}
-
-extern "C" {
-OMX_ERRORTYPE PREFIX(OMX_GetHandle)(OMX_HANDLETYPE *handle_ptr, OMX_STRING component_name, OMX_PTR app_data, OMX_CALLBACKTYPE *callbacks)
-{
- android_printf("OMX_GetHandle\n");
- OMXNode* node = new OMXNode();
- node->app_data = app_data;
- node->callbacks = *callbacks;
- node->observer = new OMXCodecObserver();
- node->observer->setNode(node);
- node->state = OMX_StateLoaded;
- node->component_name = component_name;
-
- OMX_COMPONENTTYPE* component = (OMX_COMPONENTTYPE*) malloc(sizeof(OMX_COMPONENTTYPE));
- memset(component, 0, sizeof(OMX_COMPONENTTYPE));
- component->nSize = sizeof(OMX_COMPONENTTYPE);
- component->nVersion.s.nVersionMajor = 1;
- component->nVersion.s.nVersionMinor = 0;
- component->nVersion.s.nRevision = 0;
- component->nVersion.s.nStep = 0;
- component->pComponentPrivate = node;
- component->SendCommand = iomx_send_command;
- component->GetParameter = iomx_get_parameter;
- component->SetParameter = iomx_set_parameter;
- component->FreeBuffer = iomx_free_buffer;
- component->EmptyThisBuffer = iomx_empty_this_buffer;
- component->FillThisBuffer = iomx_fill_this_buffer;
- component->GetState = iomx_get_state;
- component->AllocateBuffer = iomx_allocate_buffer;
- component->ComponentRoleEnum = iomx_component_role_enum;
- component->GetExtensionIndex = iomx_get_extension_index;
- component->SetConfig = iomx_set_config;
- component->GetConfig = iomx_get_config;
-
- *handle_ptr = component;
- node->handle = component;
- status_t ret;
- if ((ret = ctx->iomx->allocateNode( component_name, node->observer, &node->node )) != OK)
- return OMX_ErrorUndefined;
- return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE PREFIX(OMX_FreeHandle)(OMX_HANDLETYPE handle)
-{
- android_printf("OMX_FreeHandle\n");
- OMXNode* node = (OMXNode*) ((OMX_COMPONENTTYPE*)handle)->pComponentPrivate;
- ctx->iomx->freeNode( node->node );
- node->observer->setNode(NULL);
- delete node;
- free(handle);
- return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE PREFIX(OMX_Init)(void)
-{
- android_printf("OMX_Init\n");
- OMXClient client;
- if (client.connect() != OK)
- return OMX_ErrorUndefined;
-
- if (!ctx)
- ctx = new IOMXContext();
- ctx->iomx = client.interface();
- ctx->iomx->listNodes(&ctx->components);
-
- for (List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); it != ctx->components.end(); it++)
- {
- const IOMX::ComponentInfo &info = *it;
- const char* componentName = info.mName.string();
- for (List<String8>::const_iterator role_it = info.mRoles.begin(); role_it != info.mRoles.end(); role_it++)
- {
- const char* componentRole = (*role_it).string();
- android_printf("componentName:%s,componentRole:%s\n", componentName, componentRole);
- }
- }
- return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE PREFIX(OMX_Deinit)(void)
-{
- android_printf("OMX_Deinit\n");
- ctx->iomx = NULL;
- delete ctx;
- ctx = NULL;
- return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE PREFIX(OMX_ComponentNameEnum)(OMX_STRING component_name, OMX_U32 name_length, OMX_U32 index)
-{
- android_printf("OMX_ComponentNameEnum\n");
- if (index >= ctx->components.size())
- return OMX_ErrorNoMore;
- List<IOMX::ComponentInfo>::iterator it = ctx->components.begin();
- for( OMX_U32 i = 0; i < index; i++ )
- it++;
- strncpy(component_name, it->mName.string(), name_length);
- component_name[name_length - 1] = '\0';
- return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE PREFIX(OMX_GetRolesOfComponent)(OMX_STRING component_name, OMX_U32 *num_roles, OMX_U8 **roles)
-{
- android_printf("OMX_GetRolesOfComponent\n");
- for( List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); it != ctx->components.end(); it++ ) {
- if (!strcmp(component_name, it->mName.string())) {
- if (!roles) {
- *num_roles = it->mRoles.size();
- return OMX_ErrorNone;
- }
- if (*num_roles < it->mRoles.size())
- return OMX_ErrorInsufficientResources;
- *num_roles = it->mRoles.size();
- OMX_U32 i = 0;
- for( List<String8>::iterator it2 = it->mRoles.begin(); it2 != it->mRoles.end(); i++, it2++ ) {
- strncpy((char*)roles[i], it2->string(), OMX_MAX_STRINGNAME_SIZE);
- roles[i][OMX_MAX_STRINGNAME_SIZE - 1] = '\0';
- }
- return OMX_ErrorNone;
- }
- }
- return OMX_ErrorInvalidComponentName;
-}
-
-OMX_ERRORTYPE PREFIX(OMX_GetComponentsOfRole)(OMX_STRING role, OMX_U32 *num_comps, OMX_U8 **comp_names)
-{
- android_printf("OMX_GetComponentsOfRole\n");
- OMX_U32 i = 0;
- for( List<IOMX::ComponentInfo>::iterator it = ctx->components.begin(); it != ctx->components.end(); it++ ) {
- for( List<String8>::iterator it2 = it->mRoles.begin(); it2 != it->mRoles.end(); it2++ ) {
- if (!strcmp(it2->string(), role)) {
- if (comp_names) {
- if (*num_comps < i)
- return OMX_ErrorInsufficientResources;
- strncpy((char*)comp_names[i], it->mName.string(), OMX_MAX_STRINGNAME_SIZE);
- comp_names[i][OMX_MAX_STRINGNAME_SIZE - 1] = '\0';
- }
- i++;
- break;
- }
- }
- }
- *num_comps = i;
- return OMX_ErrorNone;
-}
-}
-
diff --git a/tools/android/depends/autoconf/Makefile b/tools/android/depends/autoconf/Makefile
deleted file mode 100644
index 7bd9cae384..0000000000
--- a/tools/android/depends/autoconf/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=autoconf
-VERSION=2.68
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX)
-
-LIBDYLIB=$(PLATFORM)/bin/autoconf
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
-
-$(LIBDYLIB): $(PLATFORM)
- cd $(PLATFORM); $(CONFIGURE)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/automake/Makefile b/tools/android/depends/automake/Makefile
deleted file mode 100644
index a74ffef8fc..0000000000
--- a/tools/android/depends/automake/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=automake
-VERSION=1.11.3
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX)
-
-LIBDYLIB=$(PLATFORM)/automake
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/boost/Makefile b/tools/android/depends/boost/Makefile
deleted file mode 100644
index 76af96f721..0000000000
--- a/tools/android/depends/boost/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include add-arm-mem-barrier.patch fix-deprecated-swp.patch Makefile
-
-#Headers Only!
-LIBNAME=boost
-VERSION=1_44_0
-SOURCE=$(LIBNAME)_$(VERSION)
-ARCHIVE=$(SOURCE).tar.bz2
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-.installed-$(PLATFORM): $(LIBDYLIB) $(TARBALLS_LOCATION)/$(ARCHIVE)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- echo 'using gcc : : $(CC) : ' > $(PLATFORM)/tools/build/v2/user-config.jam
- echo ' <cflags>"$(CFLAGS)"' >> $(PLATFORM)/tools/build/v2/user-config.jam
- echo ' <cxxflags>"$(CXXFLAGS)"' >> $(PLATFORM)/tools/build/v2/user-config.jam
- echo ' ;' >> $(PLATFORM)/tools/build/v2/user-config.jam
- cd $(PLATFORM); patch -p1 < ../add-arm-mem-barrier.patch
- cd $(PLATFORM); patch -p1 < ../fix-deprecated-swp.patch
- cd $(PLATFORM); ./bootstrap.sh --prefix=$(PREFIX)
- cd $(PLATFORM); ./bjam --prefix=$(PREFIX) toolset=gcc --toolset-root=$(TOOLCHAIN)/$(HOST)/bin --disable-icu \
- --without-date_time --without-filesystem --without-graph --without-graph_parallel --without-iostreams --without-math --without-mpi --without-program_options \
---without-python --without-random --without-regex --without-serialization --without-signals --without-system --without-test --without-thread --without-wave install
- touch .installed-$(PLATFORM)
-
-clean:
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/boost/add-arm-mem-barrier.patch b/tools/android/depends/boost/add-arm-mem-barrier.patch
deleted file mode 100644
index 86f8985ee2..0000000000
--- a/tools/android/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 <pdimov@boostpro.com>
-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 <boost/smart_ptr/detail/yield_k.hpp>
-
-+#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/android/depends/boost/fix-deprecated-swp.patch b/tools/android/depends/boost/fix-deprecated-swp.patch
deleted file mode 100644
index de5888d737..0000000000
--- a/tools/android/depends/boost/fix-deprecated-swp.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 8d1ba081260f98d879759433a9d7248d6bd98966 Mon Sep 17 00:00:00 2001
-From: Peter Dimov <pdimov@boostpro.com>
-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/android/depends/bootstrap b/tools/android/depends/bootstrap
deleted file mode 100755
index 171a93908c..0000000000
--- a/tools/android/depends/bootstrap
+++ /dev/null
@@ -1 +0,0 @@
-autoconf
diff --git a/tools/android/depends/bzip2/Makefile b/tools/android/depends/bzip2/Makefile
deleted file mode 100644
index bb59fadb1c..0000000000
--- a/tools/android/depends/bzip2/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile Makefile.patch
-
-# lib name, version
-LIBNAME=bzip2
-VERSION=1.0.6
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
-
-LIBDYLIB=$(PLATFORM)/libbz2.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p1 <../Makefile.patch
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM) PREFIX=$(PREFIX)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install PREFIX=$(PREFIX)
- rm $(PREFIX)/bin/bzip2
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/bzip2/Makefile.patch b/tools/android/depends/bzip2/Makefile.patch
deleted file mode 100644
index 40dc70a2c2..0000000000
--- a/tools/android/depends/bzip2/Makefile.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- Makefile 2008-02-14 14:39:18.000000000 +0200
-+++ ../Makefile 2009-08-30 15:59:16.000000000 +0300
-@@ -15,16 +15,16 @@
- SHELL=/bin/sh
-
- # To assist in cross-compiling
--CC=gcc
--AR=ar
--RANLIB=ranlib
--LDFLAGS=
-+#CC=gcc
-+#AR=ar
-+#RANLIB=ranlib
-+#LDFLAGS=
-
- BIGFILES=-D_FILE_OFFSET_BITS=64
--CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
-+#CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
-
- # Where you want it installed when you do 'make install'
--PREFIX=/usr/local
-+#PREFIX=/usr/local
-
-
- OBJS= blocksort.o \
-@@ -35,7 +35,7 @@
- decompress.o \
- bzlib.o
-
--all: libbz2.a bzip2 bzip2recover test
-+all: libbz2.a bzip2 bzip2recover
-
- bzip2: libbz2.a bzip2.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
diff --git a/tools/android/depends/cmake/Makefile b/tools/android/depends/cmake/Makefile
deleted file mode 100644
index 3237d57e52..0000000000
--- a/tools/android/depends/cmake/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-APPNAME=cmake
-VERSION=2.8.4
-SOURCE=$(APPNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./bootstrap --prefix=$(PREFIX)
-
-APP=$(PLATFORM)/bin/$(APPNAME)
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(APP): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(APP)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/configure.in b/tools/android/depends/configure.in
deleted file mode 100644
index 629c46950d..0000000000
--- a/tools/android/depends/configure.in
+++ /dev/null
@@ -1,151 +0,0 @@
-AC_PREREQ(2.59)
-AC_INIT([android-depends], [2.00], [http://trac.xbmc.org])
-AC_CONFIG_FILES([Makefile Makefile.include])
-
-AC_ARG_VAR(XBMC_ANDROID_NDK, path to android ndk)
-AC_ARG_VAR(XBMC_ANDROID_SDK, path to android sdk)
-AC_ARG_VAR(XBMC_ANDROID_TARBALLS, path where tarballs will be saved)
-
-use_ndk=$XBMC_ANDROID_NDK
-use_sdk=$XBMC_ANDROID_SDK
-use_staging=$XBMC_ANDROID_STAGING
-use_tarballs=$XBMC_ANDROID_TARBALLS
-
-AC_ARG_WITH([toolchain],
- [AS_HELP_STRING([--with-toolchain],
- [specify path to android toolchain])],
- [use_toolchain=$withval],AC_MSG_ERROR([No toolchain defined]))
-
-AC_ARG_WITH([sdk],
- [AS_HELP_STRING([--with-sdk],
- [specify path to android sdk])],
- [use_sdk=$withval],[if test -z $use_sdk; then AC_MSG_ERROR([No SDK path defined]); fi])
-
-AC_ARG_WITH([ndk],
- [AS_HELP_STRING([--with-ndk],
- [specify path to android ndk])],
- [use_ndk=$withval],[if test -z $use_ndk; then AC_MSG_ERROR([No NDK path defined]); fi])
-
-AC_ARG_WITH([tarballs],
- [AS_HELP_STRING([--with-tarballs],
- [path where tarballs will be saved])],
- [use_tarballs=$withval], [if test -z $use_tarballs; then AC_MSG_ERROR([No tarballs path defined]); fi])
-
-AC_ARG_WITH([staging],
- [AS_HELP_STRING([--with-staging],
- [optional. path for staging sysroot. defaults to $toolchain/staging])],
- [use_staging=$withval],[use_staging=$use_toolchain/staging])
-
-AC_ARG_WITH([cpu],
- [AS_HELP_STRING([--with-cpu],
- [optional. specify target cpu. guessed if not specified])],
- [use_cpu=$withval],use_cpu=no)
-
-AC_ARG_WITH([sdk-platform],
- [AS_HELP_STRING([--with-sdk-platform],
- [optional. spcify sdk platform version (for android headers). default is android-10])],
- [use_sdk_platform=$withval],use_sdk_platform=android-10)
-
-AC_PROG_CXX
-AC_PROG_CC
-AC_CHECK_LIB([z], [main],, AC_MSG_ERROR("Missing libz development files"))
-
-AC_CHECK_PROG(HAVE_UNZIP,unzip,"yes","no",)
-if test "x$HAVE_UNZIP" = "xno" ; then
- AC_MSG_ERROR("Missing program: unzip")
-fi
-
-AC_CHECK_PROG(HAVE_ZIP,zip,"yes","no",)
-if test "x$HAVE_ZIP" = "xno" ; then
- AC_MSG_ERROR("Missing program: zip")
-fi
-
-AC_PATH_PROG(CURL,curl,"no")
-if test "x$CURL" = "xno" ; then
- AC_MSG_ERROR("Missing program: curl")
-fi
-
-AC_PATH_PROG(TAR,tar,"no")
-if test "x$TAR" = "xno" ; then
- AC_MSG_ERROR("Missing program: tar")
-fi
-
-#find host toolchain
-AC_CHECK_PROG(host_gcc,$host-gcc,yes,no,$use_toolchain/bin)
-if test "$host_gcc" = "no"; then
- AC_MSG_WARN(host was not specified. guessing.)
- AC_PATH_PROG(host_gcc,gcc,no,[$use_toolchain/*/bin])
- if test "$host_gcc" = "no"; then
- AC_MSG_ERROR([Arm toolchain not found at specified path])
- fi
- use_host=`$host_gcc -dumpmachine 2>/dev/null`
-else
- use_host=$host
-fi
-
-#guess host cpu
-if test "$use_cpu" = "no"; then
- case $use_host in
- arm*)
- use_cpu="armeabi-v7a"
- ;;
- *i686*)
- use_cpu="x86"
- ;;
- *)
- AC_MSG_ERROR(unsupported host ($host))
- esac
-fi
-
-
-# Some dumb checks to see if paths might be correct.
-
-if [ ! `mkdir -p $use_staging/$use_cpu/include` ]; then
- AC_MSG_ERROR(unable to create $use_staging/$use_cpu/include. verify that the path and permissions are correct.)
-fi
-
-if [ ! `mkdir -p $use_staging/$use_cpu/lib` ]; then
- AC_MSG_ERROR(unable to create $use_staging/$use_cpu/lib. verify that the path and permissions are correct.)
-fi
-
-if [ ! `mkdir -p $use_staging/$use_cpu-native/include` ]; then
- AC_MSG_ERROR(unable to create $use_staging/$use_cpu-native/include. verify that the path and permissions are correct.)
-fi
-
-if [ ! `mkdir -p $use_staging/$use_cpu-native/lib` ]; then
- AC_MSG_ERROR(unable to create $use_staging/$use_cpu-native/lib. verify that the path and permissions are correct.)
-fi
-
-if [ ! `mkdir -p $use_staging/$use_cpu/include/$use_sdk_platform` ]; then
- AC_MSG_ERROR(unable to create $use_staging/$use_cpu/include/$use_sdk_platform. verify that the path and permissions are correct.)
-fi
-
-if [ ! `mkdir -p $use_staging/$use_cpu/lib/$use_sdk_platform` ]; then
- AC_MSG_ERROR(unable to create $use_staging/$use_cpu/lib/$use_sdk_platform. verify that the path and permissions are correct.)
-fi
-
-if [ ! `mkdir -p $use_tarballs` ]; then
- AC_MSG_ERROR(unable to create tarballs dir. verify that the path and permissions are correct.)
-fi
-
-if [ ! test -f $use_sdk/tools/zipalign ]; then
- AC_MSG_ERROR(verify sdk path)
-fi
-
-if [ ! test -f $use_ndk/sources/android/native_app_glue/android_native_app_glue.h ]; then
- AC_MSG_ERROR(verify ndk path)
-fi
-
-AC_SUBST(use_sdk)
-AC_SUBST(use_ndk)
-AC_SUBST(use_arch)
-AC_SUBST(use_host)
-AC_SUBST(use_cpu)
-AC_SUBST(use_staging)
-AC_SUBST(use_toolchain)
-AC_SUBST(use_tarballs)
-AC_SUBST(use_sdk_platform)
-
-echo -e " \ttoolchain:\t $use_toolchain\n \tcpu:\t\t $use_cpu\n \thost:\t\t $use_host\n \tsdk-platform:\t $use_sdk_platform"
-
-AC_OUTPUT
diff --git a/tools/android/depends/curl/Makefile b/tools/android/depends/curl/Makefile
deleted file mode 100644
index a76ddc927d..0000000000
--- a/tools/android/depends/curl/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=curl
-VERSION=7.21.3
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.bz2
-CFLAGS+=-DANDROID
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --without-libssh2 \
-ac_cv_file__dev_urandom=yes \
-ac_cv_lib_ssl_SSL_connect=yes \
-
-LIBDYLIB=$(PLATFORM)/lib/.libs/lib$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libcurl.la $(PREFIX)/lib/libcurl.so $(PREFIX)/lib/libcurl.so.5
- mv -f $(PREFIX)/lib/libcurl.so.5.2.0 $(PREFIX)/lib/libcurl.so
- $(RPL) -e "libcurl.so.5" "libcurl.so\x00\x00" $(PREFIX)/lib/libcurl.so
- -$(READELF) --dynamic $(PREFIX)/lib/libcurl.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/dbus/Makefile b/tools/android/depends/dbus/Makefile
deleted file mode 100644
index c0df9c4a51..0000000000
--- a/tools/android/depends/dbus/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=dbus
-VERSION=1.4.6
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST) \
- --without-x --disable-xml-docs --disable-doxygen-docs
-
-LIBDYLIB=$(PLATFORM)/$(LIBNAME)/.libs/$(LIBNAME).so
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: $(LIBDYLIB) .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/dummy-libxbmc/Makefile b/tools/android/depends/dummy-libxbmc/Makefile
deleted file mode 100644
index 4b72d51cfd..0000000000
--- a/tools/android/depends/dummy-libxbmc/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile dummy-libxbmc.c
-
-LIBDYLIB=libxbmc.so
-
-all: $(PLATFORM)/$(LIBDYLIB) .installed-$(PLATFORM)
-
-$(PLATFORM):
- mkdir -p $(PLATFORM)
-
-$(PLATFORM)/$(LIBDYLIB): $(PLATFORM) $(DEPS)
- $(CC) -shared -o $(PLATFORM)/libxbmc.so dummy-libxbmc.c
-
-.installed-$(PLATFORM): $(PLATFORM)/$(LIBDYLIB)
- mkdir -p $(PREFIX)/lib/dummy-libxbmc
- cp $(PLATFORM)/libxbmc.so $(PREFIX)/lib/dummy-libxbmc
- touch $@
-
-clean:
- rm -rf $(PLATFORM)
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/dummy-libxbmc/dummy-libxbmc.c b/tools/android/depends/dummy-libxbmc/dummy-libxbmc.c
deleted file mode 100644
index 2d72d2be7c..0000000000
--- a/tools/android/depends/dummy-libxbmc/dummy-libxbmc.c
+++ /dev/null
@@ -1,4 +0,0 @@
-void xbmc_dummy_function()
-{
- return;
-}
diff --git a/tools/android/depends/expat/Makefile b/tools/android/depends/expat/Makefile
deleted file mode 100644
index 88353d3ace..0000000000
--- a/tools/android/depends/expat/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=expat
-VERSION=2.0.1
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) ./conftools; ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
-
-LIBDYLIB=$(PLATFORM)/.libs/lib$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/fontconfig/01-fontconfig-cross-compile-fix.patch b/tools/android/depends/fontconfig/01-fontconfig-cross-compile-fix.patch
deleted file mode 100644
index 334cbbaf81..0000000000
--- a/tools/android/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/android/depends/fontconfig/Makefile b/tools/android/depends/fontconfig/Makefile
deleted file mode 100644
index 46b0fb151d..0000000000
--- a/tools/android/depends/fontconfig/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include 01-fontconfig-cross-compile-fix.patch lconv.patch Makefile
-
-# lib name, version
-LIBNAME=fontconfig
-VERSION=2.8.0
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST) \
- --with-freetype-config=$(PREFIX)/bin/freetype-config \
- --disable-libxml2 --disable-docs --with-arch=arm --disable-shared
-
-LIBDYLIB=$(PLATFORM)/src/.libs/lib$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p1 < ../01-fontconfig-cross-compile-fix.patch
- cd $(PLATFORM); patch -p1 < ../lconv.patch
- cd $(PLATFORM); $(AUTORECONF) -vif
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/fontconfig/lconv.patch b/tools/android/depends/fontconfig/lconv.patch
deleted file mode 100644
index c760d7f7a4..0000000000
--- a/tools/android/depends/fontconfig/lconv.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- fontconfig-2.6.0.old/src/fcxml.c 2011-10-15 16:16:43.809967115 -0400
-+++ fontconfig-2.6.0/src/fcxml.c 2011-10-15 16:18:39.059967042 -0400
-@@ -1139,6 +1139,7 @@
- static double
- FcStrtod (char *s, char **end)
- {
-+#if 0
- struct lconv *locale_data;
- char *dot;
- double v;
-@@ -1185,6 +1186,7 @@
- else
- v = strtod (s, end);
- return v;
-+#endif
- }
-
- static void \ No newline at end of file
diff --git a/tools/android/depends/freetype2/Makefile b/tools/android/depends/freetype2/Makefile
deleted file mode 100644
index d25a378623..0000000000
--- a/tools/android/depends/freetype2/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=freetype
-VERSION=2.3.9
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.bz2
-
-# configuration settings
-# force using internal libtool
-export LIBTOOL=builds/unix/libtool
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) builds/unix; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
-
-LIBDYLIB=$(PLATFORM)/objs/.libs/lib$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/fribidi/Makefile b/tools/android/depends/fribidi/Makefile
deleted file mode 100644
index 0a36bda101..0000000000
--- a/tools/android/depends/fribidi/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=fribidi
-VERSION=0.19.1
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-CFLAGS+=-D__STDC_INT64__
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-docs --enable-malloc \
- --disable-shared
-
-LIBDYLIB=$(PLATFORM)/.libs/lib$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/gettext-native/Makefile b/tools/android/depends/gettext-native/Makefile
deleted file mode 100644
index 35aecf8345..0000000000
--- a/tools/android/depends/gettext-native/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=gettext
-VERSION=0.18.1.1
-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 \
- --disable-shared
-
-LIBDYLIB=$(PLATFORM)/gettext-tools/src/.libs/libgettextsrc.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); sed -ie '/gets is a security hole/d' gettext-tools/gnulib-lib/stdio.in.h
- cd $(PLATFORM); sed -ie '/gets is a security hole/d' gettext-tools/libgettextpo/stdio.in.h
- cd $(PLATFORM); sed -ie '/gets is a security hole/d' gettext-runtime/gnulib-lib/stdio.in.h
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/gettext/02-gettext_msginit.patch b/tools/android/depends/gettext/02-gettext_msginit.patch
deleted file mode 100644
index 3a63ba5aaa..0000000000
--- a/tools/android/depends/gettext/02-gettext_msginit.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- gettext-tools/src/msginit.c 2010-06-06 08:49:58.000000000 -0400
-+++ gettext-tools/src/msginit.c 2012-07-25 14:54:54.511533424 -0400
-@@ -1073,7 +1073,7 @@
- struct passwd *pwd;
-
- pwd = get_user_pwd ();
--#if HAVE_PWD_H
-+#if HAVE_PWD_H && !defined(__ANDROID__)
- if (pwd != NULL)
- {
- const char *fullname;
-
diff --git a/tools/android/depends/gettext/Makefile b/tools/android/depends/gettext/Makefile
deleted file mode 100644
index 85344e5402..0000000000
--- a/tools/android/depends/gettext/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include 02-gettext_msginit.patch Makefile
-
-# lib name, version
-LIBNAME=gettext
-VERSION=0.18.1.1
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) build-aux/; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) \
- --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 \
- --disable-shared gl_cv_header_working_stdint_h=yes
-
-LIBDYLIB=$(PLATFORM)/gettext-tools/src/.libs/libgettextsrc.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p0 < ../02-gettext_msginit.patch
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/help2man/Makefile b/tools/android/depends/help2man/Makefile
deleted file mode 100644
index e4c0d7ae35..0000000000
--- a/tools/android/depends/help2man/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=help2man
-VERSION=1.38.2
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX)
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-LIBDYLIB=$(PLATFORM)/help2man
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/jasper/Makefile b/tools/android/depends/jasper/Makefile
deleted file mode 100644
index aaa98868b7..0000000000
--- a/tools/android/depends/jasper/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=jasper
-VERSION=1.900.1
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).zip
-ARCHIVE_TOOL=unzip
-ARCHIVE_TOOL_FLAGS=
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) acaux/ ;\
- ./configure --prefix=$(PREFIX) --host=$(HOST)
-
-LIBDYLIB=$(PLATFORM)/src/lib$(LIBNAME)/.libs/lib$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- mv $(SOURCE)/* $(PLATFORM) && rm -rf $(SOURCE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/jpeg/Makefile b/tools/android/depends/jpeg/Makefile
deleted file mode 100644
index e781d74076..0000000000
--- a/tools/android/depends/jpeg/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=jpeg
-VERSION=8b
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(LIBNAME)src.v$(VERSION).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST)
-
-LIBDYLIB=$(PLATFORM)/.libs/lib$(LIBNAME).so
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: $(LIBDYLIB) .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libamplayer/Makefile b/tools/android/depends/libamplayer/Makefile
deleted file mode 100644
index f11183a2c9..0000000000
--- a/tools/android/depends/libamplayer/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-all: .installed-$(PLATFORM)
-
-.installed-$(PLATFORM): $(DEPS)
- mkdir -p $(PREFIX)/include/amlplayer
- cp -rf libamplayer/include/* $(PREFIX)/include/amlplayer
- touch $@
-
-clean:
- rm -f .installed-$(PLATFORM)
-
-distclean:: clean
diff --git a/tools/android/depends/libamplayer/libamplayer/include/amports/aformat.h b/tools/android/depends/libamplayer/libamplayer/include/amports/aformat.h
deleted file mode 100644
index 25cb852b05..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/amports/aformat.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
-* @file aformat.h
-* @brief Porting from decoder driver for audio format
-* @author Tim Yao <timyao@amlogic.com>
-* @version 1.0.0
-* @date 2011-02-24
-*/
-/* Copyright (C) 2007-2011, Amlogic Inc.
-* All right reserved
-*
-*/
-
-/*
- * AMLOGIC Audio/Video streaming port driver.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the named License,
- * or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
- *
- * Author: Tim Yao <timyao@amlogic.com>
- *
- */
-
-#ifndef AFORMAT_H
-#define AFORMAT_H
-
-typedef enum {
- AFORMAT_UNKNOWN = -1,
- AFORMAT_MPEG = 0,
- AFORMAT_PCM_S16LE = 1,
- AFORMAT_AAC = 2,
- AFORMAT_AC3 = 3,
- AFORMAT_ALAW = 4,
- AFORMAT_MULAW = 5,
- AFORMAT_DTS = 6,
- AFORMAT_PCM_S16BE = 7,
- AFORMAT_FLAC = 8,
- AFORMAT_COOK = 9,
- AFORMAT_PCM_U8 = 10,
- AFORMAT_ADPCM = 11,
- AFORMAT_AMR = 12,
- AFORMAT_RAAC = 13,
- AFORMAT_WMA = 14,
- AFORMAT_WMAPRO = 15,
- AFORMAT_PCM_BLURAY = 16,
- AFORMAT_ALAC = 17,
- AFORMAT_VORBIS = 18,
- AFORMAT_AAC_LATM = 19,
- AFORMAT_APE = 20,
- AFORMAT_UNSUPPORT ,
- AFORMAT_MAX
-
-} aformat_t;
-
-#define AUDIO_EXTRA_DATA_SIZE (4096)
-#define IS_AFMT_VALID(afmt) ((afmt > AFORMAT_UNKNOWN) && (afmt < AFORMAT_MAX))
-
-#define IS_AUIDO_NEED_EXT_INFO(afmt) ((afmt == AFORMAT_ADPCM) \
- ||(afmt == AFORMAT_WMA) \
- ||(afmt == AFORMAT_WMAPRO) \
- ||(afmt == AFORMAT_PCM_S16BE) \
- ||(afmt == AFORMAT_PCM_S16LE) \
- ||(afmt == AFORMAT_PCM_U8) \
- ||(afmt == AFORMAT_PCM_BLURAY) \
- ||(afmt == AFORMAT_AMR)\
- ||(afmt == AFORMAT_ALAC)\
- ||(afmt == AFORMAT_AC3) \
- ||(afmt == AFORMAT_APE) \
- ||(afmt == AFORMAT_FLAC) )
-
-
-#define IS_AUDIO_NOT_SUPPORT_EXCEED_2CH(afmt) ((afmt == AFORMAT_RAAC) \
- ||(afmt == AFORMAT_COOK) \
- ||(afmt == AFORMAT_FLAC))
-
-#define IS_AUIDO_NEED_PREFEED_HEADER(afmt) ((afmt == AFORMAT_VORBIS) )
-
-#endif /* AFORMAT_H */
-
diff --git a/tools/android/depends/libamplayer/libamplayer/include/amports/amstream.h b/tools/android/depends/libamplayer/libamplayer/include/amports/amstream.h
deleted file mode 100644
index 09f6a4a8a9..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/amports/amstream.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
-* @file amstream.h
-* @brief Porting from decoder driver for codec ioctl commands
-* @author Tim Yao <timyao@amlogic.com>
-* @version 1.0.0
-* @date 2011-02-24
-*/
-/* Copyright (C) 2007-2011, Amlogic Inc.
-* All right reserved
-*
-*/
-
-/*
- * AMLOGIC Audio/Video streaming port driver.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the named License,
- * or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
- *
- * Author: Tim Yao <timyao@amlogic.com>
- *
- */
-
-#ifndef AMSTREAM_H
-#define AMSTREAM_H
-
-#define PORT_FLAG_IN_USE 0x0001
-#define PORT_FLAG_VFORMAT 0x0002
-#define PORT_FLAG_AFORMAT 0x0004
-#define PORT_FLAG_FORMAT (PORT_FLAG_VFORMAT | PORT_FLAG_AFORMAT)
-#define PORT_FLAG_VID 0x0008
-#define PORT_FLAG_AID 0x0010
-#define PORT_FLAG_ID (PORT_FLAG_VID | PORT_FLAG_AID)
-#define PORT_FLAG_INITED 0x100
-
-#define PORT_TYPE_VIDEO 0x01
-#define PORT_TYPE_AUDIO 0x02
-#define PORT_TYPE_MPTS 0x04
-#define PORT_TYPE_MPPS 0x08
-#define PORT_TYPE_ES 0x10
-#define PORT_TYPE_RM 0x20
-
-#define AMSTREAM_IOC_MAGIC 'S'
-
-#define AMSTREAM_IOC_VB_START _IOW(AMSTREAM_IOC_MAGIC, 0x00, int)
-#define AMSTREAM_IOC_VB_SIZE _IOW(AMSTREAM_IOC_MAGIC, 0x01, int)
-#define AMSTREAM_IOC_AB_START _IOW(AMSTREAM_IOC_MAGIC, 0x02, int)
-#define AMSTREAM_IOC_AB_SIZE _IOW(AMSTREAM_IOC_MAGIC, 0x03, int)
-#define AMSTREAM_IOC_VFORMAT _IOW(AMSTREAM_IOC_MAGIC, 0x04, int)
-#define AMSTREAM_IOC_AFORMAT _IOW(AMSTREAM_IOC_MAGIC, 0x05, int)
-#define AMSTREAM_IOC_VID _IOW(AMSTREAM_IOC_MAGIC, 0x06, int)
-#define AMSTREAM_IOC_AID _IOW(AMSTREAM_IOC_MAGIC, 0x07, int)
-#define AMSTREAM_IOC_VB_STATUS _IOR(AMSTREAM_IOC_MAGIC, 0x08, unsigned long)
-#define AMSTREAM_IOC_AB_STATUS _IOR(AMSTREAM_IOC_MAGIC, 0x09, unsigned long)
-#define AMSTREAM_IOC_SYSINFO _IOW(AMSTREAM_IOC_MAGIC, 0x0a, int)
-#define AMSTREAM_IOC_ACHANNEL _IOW(AMSTREAM_IOC_MAGIC, 0x0b, int)
-#define AMSTREAM_IOC_SAMPLERATE _IOW(AMSTREAM_IOC_MAGIC, 0x0c, int)
-#define AMSTREAM_IOC_DATAWIDTH _IOW(AMSTREAM_IOC_MAGIC, 0x0d, int)
-#define AMSTREAM_IOC_TSTAMP _IOW(AMSTREAM_IOC_MAGIC, 0x0e, unsigned long)
-#define AMSTREAM_IOC_VDECSTAT _IOR(AMSTREAM_IOC_MAGIC, 0x0f, unsigned long)
-#define AMSTREAM_IOC_ADECSTAT _IOR(AMSTREAM_IOC_MAGIC, 0x10, unsigned long)
-#define AMSTREAM_IOC_PORT_INIT _IO(AMSTREAM_IOC_MAGIC, 0x11)
-#define AMSTREAM_IOC_TRICKMODE _IOW(AMSTREAM_IOC_MAGIC, 0x12, unsigned long)
-#define AMSTREAM_IOC_AUDIO_INFO _IOW(AMSTREAM_IOC_MAGIC, 0x13, unsigned long)
-#define AMSTREAM_IOC_TRICK_STAT _IOR(AMSTREAM_IOC_MAGIC, 0x14, unsigned long)
-#define AMSTREAM_IOC_AUDIO_RESET _IO(AMSTREAM_IOC_MAGIC, 0x15)
-#define AMSTREAM_IOC_SID _IOW(AMSTREAM_IOC_MAGIC, 0x16, int)
-#define AMSTREAM_IOC_VPAUSE _IOW(AMSTREAM_IOC_MAGIC, 0x17, int)
-#define AMSTREAM_IOC_AVTHRESH _IOW(AMSTREAM_IOC_MAGIC, 0x18, int)
-#define AMSTREAM_IOC_SYNCTHRESH _IOW(AMSTREAM_IOC_MAGIC, 0x19, int)
-#define AMSTREAM_IOC_SUB_RESET _IOW(AMSTREAM_IOC_MAGIC, 0x1a, int)
-#define AMSTREAM_IOC_SUB_LENGTH _IOR(AMSTREAM_IOC_MAGIC, 0x1b, unsigned long)
-#define AMSTREAM_IOC_SET_DEC_RESET _IOW(AMSTREAM_IOC_MAGIC, 0x1c, int)
-#define AMSTREAM_IOC_TS_SKIPBYTE _IOW(AMSTREAM_IOC_MAGIC, 0x1d, int)
-#define AMSTREAM_IOC_SUB_TYPE _IOW(AMSTREAM_IOC_MAGIC, 0x1e, int)
-#define AMSTREAM_IOC_APTS _IOR(AMSTREAM_IOC_MAGIC, 0x40, unsigned long)
-#define AMSTREAM_IOC_VPTS _IOR(AMSTREAM_IOC_MAGIC, 0x41, unsigned long)
-#define AMSTREAM_IOC_PCRSCR _IOR(AMSTREAM_IOC_MAGIC, 0x42, unsigned long)
-#define AMSTREAM_IOC_SYNCENABLE _IOW(AMSTREAM_IOC_MAGIC, 0x43, unsigned long)
-#define AMSTREAM_IOC_GET_SYNC_ADISCON _IOR(AMSTREAM_IOC_MAGIC, 0x44, unsigned long)
-#define AMSTREAM_IOC_SET_SYNC_ADISCON _IOW(AMSTREAM_IOC_MAGIC, 0x45, unsigned long)
-#define AMSTREAM_IOC_GET_SYNC_VDISCON _IOR(AMSTREAM_IOC_MAGIC, 0x46, unsigned long)
-#define AMSTREAM_IOC_SET_SYNC_VDISCON _IOW(AMSTREAM_IOC_MAGIC, 0x47, unsigned long)
-#define AMSTREAM_IOC_GET_VIDEO_DISABLE _IOR(AMSTREAM_IOC_MAGIC, 0x48, unsigned long)
-#define AMSTREAM_IOC_SET_VIDEO_DISABLE _IOW(AMSTREAM_IOC_MAGIC, 0x49, unsigned long)
-#define AMSTREAM_IOC_SET_PCRSCR _IOW(AMSTREAM_IOC_MAGIC, 0x4a, unsigned long)
-#define AMSTREAM_IOC_GET_VIDEO_AXIS _IOR(AMSTREAM_IOC_MAGIC, 0x4b, unsigned long)
-#define AMSTREAM_IOC_SET_VIDEO_AXIS _IOW(AMSTREAM_IOC_MAGIC, 0x4c, unsigned long)
-#define AMSTREAM_IOC_SUB_NUM _IOR(AMSTREAM_IOC_MAGIC, 0x50, unsigned long)
-#define AMSTREAM_IOC_SUB_INFO _IOR(AMSTREAM_IOC_MAGIC, 0x51, unsigned long)
-
-#define AMSTREAM_IOC_SET_DEMUX _IOW(AMSTREAM_IOC_MAGIC, 0x90, unsigned long)
-
-struct buf_status {
- int size;
- int data_len;
- int free_len;
- unsigned int read_pointer;
- unsigned int write_pointer;
-};
-
-
-struct vdec_status {
- unsigned int width;
- unsigned int height;
- unsigned int fps;
- unsigned int error_count;
- unsigned int status;
-};
-
-struct adec_status {
- unsigned int channels;
- unsigned int sample_rate;
- unsigned int resolution;
- unsigned int error_count;
- unsigned int status;
-};
-
-struct am_io_param {
- union {
- int data;
- int id;//get bufstatus? //or others
- };
-
- int len; //buffer size;
-
- union {
- char buf[1];
- struct buf_status status;
- struct vdec_status vstatus;
- struct adec_status astatus;
- };
-};
-void set_vdec_func(int (*vdec_func)(struct vdec_status *));
-void set_adec_func(int (*adec_func)(struct adec_status *));
-
-#endif /* AMSTREAM_H */
-
diff --git a/tools/android/depends/libamplayer/libamplayer/include/amports/vformat.h b/tools/android/depends/libamplayer/libamplayer/include/amports/vformat.h
deleted file mode 100644
index 6ded0d47d2..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/amports/vformat.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
-* @file vformat.h
-* @brief Porting from decoder driver for video format
-* @author Tim Yao <timyao@amlogic.com>
-* @version 1.0.0
-* @date 2011-02-24
-*/
-/* Copyright (C) 2007-2011, Amlogic Inc.
-* All right reserved
-*
-*/
-
-/*
- * AMLOGIC Audio/Video streaming port driver.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the named License,
- * or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
- *
- * Author: Tim Yao <timyao@amlogic.com>
- *
- */
-
-#ifndef VFORMAT_H
-#define VFORMAT_H
-
-typedef enum {
- VIDEO_DEC_FORMAT_UNKNOW,
- VIDEO_DEC_FORMAT_MPEG4_3,
- VIDEO_DEC_FORMAT_MPEG4_4,
- VIDEO_DEC_FORMAT_MPEG4_5,
- VIDEO_DEC_FORMAT_H264,
- VIDEO_DEC_FORMAT_MJPEG,
- VIDEO_DEC_FORMAT_MP4,
- VIDEO_DEC_FORMAT_H263,
- VIDEO_DEC_FORMAT_REAL_8,
- VIDEO_DEC_FORMAT_REAL_9,
- VIDEO_DEC_FORMAT_WMV3,
- VIDEO_DEC_FORMAT_WVC1,
- VIDEO_DEC_FORMAT_SW,
- VIDEO_DEC_FORMAT_MAX
-} vdec_type_t;
-
-typedef enum {
- VFORMAT_UNKNOWN = -1,
- VFORMAT_MPEG12 = 0,
- VFORMAT_MPEG4,
- VFORMAT_H264,
- VFORMAT_MJPEG,
- VFORMAT_REAL,
- VFORMAT_JPEG,
- VFORMAT_VC1,
- VFORMAT_AVS,
- VFORMAT_SW,
- VFORMAT_H264MVC,
- VFORMAT_UNSUPPORT,
- VFORMAT_MAX
-} vformat_t;
-
-#define IS_VFMT_VALID(vfmt) ((vfmt > VFORMAT_UNKNOWN) && (vfmt < VFORMAT_MAX))
-#define IS_NEED_VDEC_INFO(vfmt) ((vfmt == VFORMAT_MPEG4) || (vfmt == VFORMAT_REAL))
-
-#define CODEC_TAG_MJPEG (0x47504a4d)
-#define CODEC_TAG_mjpeg (0x47504a4c)
-#define CODEC_TAG_jpeg (0x6765706a)
-#define CODEC_TAG_mjpa (0x61706a6d)
-#define CODEC_TAG_XVID (0x44495658)
-#define CODEC_TAG_xvid (0x64697678)
-#define CODEC_TAG_XVIX (0x58495658)
-#define CODEC_TAG_xvix (0x78697678)
-#define CODEC_TAG_MP4 (0x8e22ada)
-#define CODEC_TAG_COL1 (0x314c4f43)
-#define CODEC_TAG_DIV3 (0x33564944)
-#define CODEC_TAG_MP43 (0x3334504d)
-#define CODEC_TAG_M4S2 (0x3253344d)
-#define CODEC_TAG_DIV4 (0x34564944)
-#define CODEC_TAG_DIVX (0x58564944)
-#define CODEC_TAG_DIV5 (0x35564944)
-#define CODEC_TAG_DX50 (0x30355844)
-#define CODEC_TAG_DIV6 (0x36564944)
-#define CODEC_TAG_RMP4 (0x34504d52)
-#define CODEC_TAG_MP42 (0x3234504d)
-#define CODEC_TAG_MPG4 (0x3447504d)
-#define CODEC_TAG_MP4V (0x5634504d)
-#define CODEC_TAG_mp4v (0x7634706d)
-#define CODEC_TAG_AVC1 (0x31435641)
-#define CODEC_TAG_avc1 (0x31637661)
-#define CODEC_TAG_H264 (0x34363248)
-#define CODEC_TAG_h264 (0x34363268)
-#define CODEC_TAG_H263 (0x33363248)
-#define CODEC_TAG_h263 (0x33363268)
-#define CODEC_TAG_s263 (0x33363273)
-#define CODEC_TAG_F263 (0x33363246)
-#define CODEC_TAG_WMV1 (0x31564d57)
-#define CODEC_TAG_WMV2 (0x32564d57)
-#define CODEC_TAG_WMV3 (0x33564d57)
-#define CODEC_TAG_WVC1 (0x31435657)
-#define CODEC_TAG_WMVA (0x41564d57)
-#define CODEC_TAG_FMP4 (0x34504d46)
-
-#endif /* VFORMAT_H */
diff --git a/tools/android/depends/libamplayer/libamplayer/include/log_print.h b/tools/android/depends/libamplayer/libamplayer/include/log_print.h
deleted file mode 100644
index 773727fe1e..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/log_print.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#ifndef PLAYER_LOG_H
-#define PLAYER_LOG_H
-
-#define MAX_LOG_SIZE (20*1024)
-
-__attribute__ ((format (printf, 2, 3)))
-void log_lprint(const int level, const char *fmt, ...);
-
-
-#define AM_LOG_PANIC 0
-#define AM_LOG_FATAL 8
-#define AM_LOG_ERROR 16
-#define AM_LOG_WARNING 24
-#define AM_LOG_INFO 32
-#define AM_LOG_VERBOSE 40
-#define AM_LOG_DEBUG 60
-#define AM_LOG_DEBUG1 70
-#define AM_LOG_DEBUG2 80
-#define AM_LOG_TRACE 90
-
-
-#define log_print(fmt...) log_lprint(0,##fmt)
-#define log_error(fmt...) log_lprint(AM_LOG_ERROR,##fmt)
-#define log_warning(fmt...) log_lprint(AM_LOG_WARNING,##fmt)
-#define log_info(fmt...) log_lprint(AM_LOG_INFO,##fmt)
-/*default global_level=5,
-if the level<global_level print out
-*/
-#define log_debug(fmt...) log_lprint(AM_LOG_DEBUG,##fmt)
-#define log_debug1(fmt...) log_lprint(AM_LOG_DEBUG1,##fmt)
-#define log_debug2(fmt...) log_lprint(AM_LOG_DEBUG2,##fmt)
-#define log_trace(fmt...) log_lprint(AM_LOG_TRACE,##fmt)
-
-#define DEBUG_PN() log_print("[%s:%d]\n", __FUNCTION__, __LINE__)
-
-void log_close(void);
-int log_open(const char *name);
-int update_loglevel_setting(void);
-#endif
diff --git a/tools/android/depends/libamplayer/libamplayer/include/message.h b/tools/android/depends/libamplayer/libamplayer/include/message.h
deleted file mode 100644
index 0ddedf1a2d..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/message.h
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef PLAYER_MESSAGE_H
-#define PLAYER_MESSAGE_H
-
-#define MESSAGE_MAX 4
-
-#define CTRL_CMD_RESPONSE (0xffff)
-
-typedef enum {
- CMD_EXIT = (1 << 0),
- CMD_PLAY = (1 << 1),
- CMD_PLAY_START = (1 << 2),
- CMD_STOP = (1 << 3),
- CMD_START = (1 << 4),
- CMD_NEXT = (1 << 5),
- CMD_PREV = (1 << 6),
- CMD_PAUSE = (1 << 7),
- CMD_RESUME = (1 << 8),
- CMD_SEARCH = (1 << 9),
- CMD_FF = (1 << 10),
- CMD_FB = (1 << 11),
- CMD_SWITCH_AID = (1 << 12),
- CMD_SWITCH_SID = (1 << 13),
- CMD_CTRL_MAX = (1 << 31),
-} ctrl_cmd_t;
-
-typedef enum {
- CMD_LOOP = (1 << 0),
- CMD_NOLOOP = (1 << 1),
- CMD_BLACKOUT = (1 << 2),
- CMD_NOBLACK = (1 << 3),
- CMD_NOAUDIO = (1 << 4),
- CMD_NOVIDEO = (1 << 5),
- CMD_MUTE = (1 << 6),
- CMD_UNMUTE = (1 << 7),
- CMD_SET_VOLUME = (1 << 8),
- CMD_SPECTRUM_SWITCH = (1 << 9),
- CMD_SET_BALANCE = (1 << 10),
- CMD_SWAP_LR = (1 << 11),
- CMD_LEFT_MONO = (1 << 12),
- CMD_RIGHT_MONO = (1 << 13),
- CMD_SET_STEREO = (1 << 14),
- CMD_EN_AUTOBUF = (1 << 15),
- CMD_SET_AUTOBUF_LEV = (1 << 16),
- CMD_MODE_MAX = (1 << 31),
-} ctrl_mode_t;
-
-typedef enum {
- CMD_GET_VOLUME = (1 << 0),
- CMD_GET_VOL_RANGE = (1 << 1),
- CMD_GET_PLAY_STA = (1 << 2),
- CMD_GET_CURTIME = (1 << 3),
- CMD_GET_DURATION = (1 << 4),
- CMD_GET_MEDIA_INFO = (1 << 5),
- CMD_LIST_PID = (1 << 6),
- CMD_GET_MAX = (1 << 31),
-} get_info_t;
-
-typedef struct {
- float min;
- float max;
-} volume_range_t;
-
-typedef struct {
- ctrl_cmd_t ctrl_cmd;
- get_info_t info_cmd;
- ctrl_mode_t set_mode;
- int pid;
- int cid;
- union {
- char *filename;
- char *file_list;
- int param;
- float f_param;
- };
- union {
- int param1;
- float f_param1;
- };
- union {
- int param2;
- float f_param2;
- };
-} player_cmd_t;
-
-int message_free(player_cmd_t * cmd);
-player_cmd_t * message_alloc(void);
-int cmd2str(player_cmd_t *cmd, char *buf);
-
-#endif
-
diff --git a/tools/android/depends/libamplayer/libamplayer/include/player.h b/tools/android/depends/libamplayer/libamplayer/include/player.h
deleted file mode 100644
index b3eedc98b5..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/player.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef _PLAYER_H_
-#define _PLAYER_H_
-
-
-#include <codec.h>
-#include <player_type.h>
-#include <player_error.h>
-#include <message.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int player_init();
-int player_start(play_control_t *p,unsigned long priv);
-int player_stop(int pid);
-int player_stop_async(int pid);
-int player_exit(int pid);
-int player_pause(int pid);
-int player_resume(int pid);
-int player_timesearch(int pid,float s_time);
-int player_forward(int pid,int speed);
-int player_backward(int pid,int speed);
-int player_aid(int pid,int audio_id);
-int player_sid(int pid,int sub_id);
-int player_progress_exit(void);
-int player_list_allpid(pid_info_t *pid);
-int check_pid_valid(int pid);
-int player_get_play_info(int pid,player_info_t *info);
-int player_get_media_info(int pid,media_info_t *minfo);
-int player_video_overlay_en(unsigned enable);
-int player_start_play(int pid);
-int player_send_message(int pid, player_cmd_t *cmd);
-player_status player_get_state(int pid);
-unsigned int player_get_extern_priv(int pid);
-int player_enable_autobuffer(int pid, int enable);
-int player_set_autobuffer_level(int pid, float min, float middle, float max);
-
-int audio_set_mute(int pid,int mute);
-int audio_get_volume_range(int pid,float *min,float *max);
-int audio_set_volume(int pid,float val);
-int audio_get_volume(int pid, float *val);
-
-int audio_set_lrvolume(int pid,float lvol,float rvol);
-int audio_get_lrvolume(int pid, float* lvol,float* rvol);
-
-int audio_set_volume_balance(int pid,int balance);
-int audio_swap_left_right(int pid);
-int audio_left_mono(int pid);
-int audio_right_mono(int pid);
-int audio_stereo(int pid);
-int audio_set_spectrum_switch(int pid,int isStart,int interval);
-int player_register_update_callback(callback_t *cb,update_state_fun_t up_fn,int interval_s);
-char *player_status2str(player_status status);
-int player_cache_system_init(int enable,const char*dir,int max_size,int block_size);
-
-//control interface
-int player_loop(int pid);
-int player_noloop(int pid);
-
-int check_url_type(char *filename);
-int play_list_player(play_control_t *pctrl,unsigned long priv);
-
-//freescale
-int enable_freescale(int cfg);
-int disable_freescale(int cfg);
-int disable_freescale_MBX();
-int enable_2Xscale();
-int enable_2XYscale();
-int enable_freescale_MBX();
-int disable_2X_2XYscale();
-int GL_2X_scale(int mSwitch);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/tools/android/depends/libamplayer/libamplayer/include/player_error.h b/tools/android/depends/libamplayer/libamplayer/include/player_error.h
deleted file mode 100644
index 0d222118f6..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/player_error.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef _PLAYER_ERROR_H_
-#define _PLAYER_ERROR_H_
-
-#define P_PRE (0x02000000)
-#define F_PRE (0x03000000)
-#define X_PRE (0x04000000)
-#define D_PRE (0x05000000)
-
-#define PLAYER_SUCCESS (0)
-#define PLAYER_FAILED (-(P_PRE|0x01))
-#define PLAYER_NOMEM (-(P_PRE|0x02))
-#define PLAYER_EMPTY_P (-(P_PRE|0x03))
-#define PLAYER_NOT_VALID_PID (-(P_PRE|0x04))
-#define PLAYER_CAN_NOT_CREAT_THREADS (-(P_PRE|0x05))
-#define PLAYER_ERROR_PARAM (-(P_PRE|0x06))
-#define PLAYER_ERROR_CALLBACK (-(P_PRE|0x07))
-
-#define PLAYER_RD_FAILED (-(P_PRE|0x11))
-#define PLAYER_RD_EMPTYP (-(P_PRE|0x12))
-#define PLAYER_RD_TIMEOUT (-(P_PRE|0x13))
-#define PLAYER_RD_AGAIN (-(P_PRE|0x14))
-
-#define PLAYER_WR_FAILED (-(P_PRE|0x21))
-#define PLAYER_WR_EMPTYP (-(P_PRE|0x22))
-#define PLAYER_WR_AGAIN (-(P_PRE|0x23))
-#define PLAYER_WR_FINISH (P_PRE|0x1)
-
-#define PLAYER_PTS_ERROR (-(P_PRE|0x31))
-#define PLAYER_NO_DECODER (-(P_PRE|0x32))
-#define DECODER_RESET_FAILED (-(P_PRE|0x33))
-#define DECODER_INIT_FAILED (-(P_PRE|0x34))
-#define PLAYER_UNSUPPORT (-(P_PRE|0x35))
-#define PLAYER_UNSUPPORT_VIDEO (-(P_PRE|0x36))
-#define PLAYER_UNSUPPORT_AUDIO (-(P_PRE|0x37))
-#define PLAYER_SEEK_OVERSPILL (-(P_PRE|0x38))
-#define PLAYER_CHECK_CODEC_ERROR (-(P_PRE|0x39))
-#define PLAYER_INVALID_CMD (-(P_PRE|0x40))
-#define PLAYER_REAL_AUDIO_FAILED (-(P_PRE|0x41))
-#define PLAYER_ADTS_NOIDX (-(P_PRE|0x42))
-#define PLAYER_SEEK_FAILED (-(P_PRE|0x43))
-#define PLAYER_NO_VIDEO (-(P_PRE|0x44))
-#define PLAYER_NO_AUDIO (-(P_PRE|0x45))
-#define PLAYER_SET_NOVIDEO (-(P_PRE|0x46))
-#define PLAYER_SET_NOAUDIO (-(P_PRE|0x47))
-#define PLAYER_FFFB_UNSUPPORT (-(P_PRE|0x48))
-#define PLAYER_UNSUPPORT_VCODEC (-(P_PRE|0x49))
-#define PLAYER_UNSUPPORT_ACODEC (-(P_PRE|0x4a))
-
-#define FFMPEG_SUCCESS (0)
-#define FFMPEG_OPEN_FAILED (-(F_PRE|0x1))
-#define FFMPEG_PARSE_FAILED (-(F_PRE|0x2))
-#define FFMPEG_EMP_POINTER (-(F_PRE|0x3))
-#define FFMPEG_NO_FILE (-(F_PRE|0x4))
-
-#define DIVX_SUCCESS (0)
-#define DIVX_AUTHOR_ERR (-(X_PRE|0x1))
-#define DIVX_EXPIRED (-(X_PRE|0x2))
-
-#define DRM_NOERROR (0)
-#define DRM_UNSUPPORT (-(D_PRE|0x1))
-
-char * player_error_msg(int error);
-#endif
diff --git a/tools/android/depends/libamplayer/libamplayer/include/player_id.h b/tools/android/depends/libamplayer/libamplayer/include/player_id.h
deleted file mode 100644
index 45ae74d4c5..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/player_id.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef PLAYER_ID_MGT__
-#define PLAYER_ID_MGT__
-
-int player_request_pid(void);
-int player_release_pid(int pid);
-int player_init_pid_data(int pid,void * data);
-void * player_open_pid_data(int pid);
-int player_close_pid_data(int pid);
-int player_id_pool_init(void);
-int player_list_pid(char id[],int size);
-
-#endif
-
-
diff --git a/tools/android/depends/libamplayer/libamplayer/include/player_set_sys.h b/tools/android/depends/libamplayer/libamplayer/include/player_set_sys.h
deleted file mode 100644
index c47dfd2b05..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/player_set_sys.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef _PLAYER_SET_DISP_H_
-#define _PLAYER_SET_DISP_H_
-
-#define MID_800_400_FREESCALE (0x10001) //mid 800*400
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum
-{
- DISP_MODE_480I = 1,
- DISP_MODE_480P = 2,
- DISP_MODE_576I = 3,
- DISP_MODE_576P = 4,
- DISP_MODE_720P = 5,
- DISP_MODE_1080I = 6,
- DISP_MODE_1080P = 7
-} display_mode;
-
-typedef struct {
- display_mode disp_mode;
- int osd_disble_coordinate[8];
- int osd_enable_coordinate[8];
- int video_enablecoordinate[4];
- int fb0_freescale_width;
- int fb0_freescale_height;
- int fb1_freescale_width;
- int fb1_freescale_height;
-} freescale_setting_t;
-
-
-
-int set_sysfs_str(const char *path, const char *val);
-int get_sysfs_str(const char *path, char *valstr, int size);
-int set_sysfs_int(const char *path, int val);
-int get_sysfs_int(const char *path);
-
-int set_black_policy(int blackout);
-int get_black_policy();
-int get_karaok_flag();
-int set_tsync_enable(int enable);
-int set_tsync_discontinue(int enable);
-int get_pts_discontinue();
-int set_fb0_blank(int blank);
-int set_fb1_blank(int blank);
-int set_subtitle_num(int num);
-int av_get_subtitle_curr();
-int set_subtitle_startpts(int pts);
-int set_subtitle_fps(int fps);
-int set_subtitle_subtype(int subtype);
-void get_display_mode(char *mode);
-int set_fb0_freescale(int freescale);
-int set_fb1_freescale(int freescale);
-int set_display_axis(int *coordinate);
-int set_video_axis(int *coordinate);
-int set_fb0_scale_width(int width);
-int set_fb0_scale_height(int height);
-int set_fb1_scale_width(int width);
-int set_fb1_scale_height(int height);
-int check_audiodsp_fatal_err(void);
-int set_stb_source_hiu(void);
-int set_stb_demux_source_hiu(void);
-int get_stb_demux_source(char *strval, int size);
-int get_stb_source(char *strval, int size);
-
-int set_subtitle_enable(int num);
-int set_subtitle_curr(int num);
-int check_file_same(char *filename2);
-
-//player sysfs API channel
-int set_amutils_enable(int isOn);
-int set_amutils_cmd(const char* cmd);
-int get_amutils_cmd(char* cmd);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/tools/android/depends/libamplayer/libamplayer/include/player_thumbnail.h b/tools/android/depends/libamplayer/libamplayer/include/player_thumbnail.h
deleted file mode 100644
index d1387e2a00..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/player_thumbnail.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef PLAYER_THUMBNAIL_H
-#define PLAYER_THUMBNAIL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void * thumbnail_res_alloc(void);
-int thumbnail_find_stream_info(void *handle, const char* filename);
-int thumbnail_find_stream_info_end(void *handle);
-int thumbnail_decoder_open(void *handle, const char* filename);
-int thumbnail_extract_video_frame(void * handle, int64_t time, int flag);
-int thumbnail_read_frame(void *handle, char* buffer);
-void thumbnail_get_video_size(void *handle, int* width, int* height);
-float thumbnail_get_aspect_ratio(void *handle);
-void thumbnail_get_duration(void *handle, int64_t *duration);
-int thumbnail_get_key_metadata(void* handle, char* key, const char** value);
-int thumbnail_get_key_data(void* handle, char* key, const void** data, int* data_size);
-void thumbnail_get_video_rotation(void *handle, int* rotation);
-int thumbnail_decoder_close(void *handle);
-void thumbnail_res_free(void* handle);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/tools/android/depends/libamplayer/libamplayer/include/player_type.h b/tools/android/depends/libamplayer/libamplayer/include/player_type.h
deleted file mode 100644
index 2abd1940f3..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/player_type.h
+++ /dev/null
@@ -1,271 +0,0 @@
-#ifndef _PLAYER_TYPE_H_
-#define _PLAYER_TYPE_H_
-
-#include <libavformat/avformat.h>
-#include <stream_format.h>
-
-#define MSG_SIZE 64
-#define MAX_VIDEO_STREAMS 8
-#define MAX_AUDIO_STREAMS 8
-#define MAX_SUB_INTERNAL 8
-#define MAX_SUB_EXTERNAL 24
-#define MAX_SUB_STREAMS (MAX_SUB_INTERNAL + MAX_SUB_EXTERNAL)
-#define MAX_PLAYER_THREADS 32
-
-#define CALLBACK_INTERVAL (300)
-
-//#define DEBUG_VARIABLE_DUR
-
-typedef enum
-{
- /******************************
- * 0x1000x:
- * player do parse file
- * decoder not running
- ******************************/
- PLAYER_INITING = 0x10001,
- PLAYER_TYPE_REDY = 0x10002,
- PLAYER_INITOK = 0x10003,
-
- /******************************
- * 0x2000x:
- * playback status
- * decoder is running
- ******************************/
- PLAYER_RUNNING = 0x20001,
- PLAYER_BUFFERING = 0x20002,
- PLAYER_PAUSE = 0x20003,
- PLAYER_SEARCHING = 0x20004,
-
- PLAYER_SEARCHOK = 0x20005,
- PLAYER_START = 0x20006,
- PLAYER_FF_END = 0x20007,
- PLAYER_FB_END = 0x20008,
-
- PLAYER_PLAY_NEXT = 0x20009,
- PLAYER_BUFFER_OK = 0x2000a,
- PLAYER_FOUND_SUB = 0x2000b,
-
- /******************************
- * 0x3000x:
- * player will exit
- ******************************/
- PLAYER_ERROR = 0x30001,
- PLAYER_PLAYEND = 0x30002,
- PLAYER_STOPED = 0x30003,
- PLAYER_EXIT = 0x30004,
-
- /******************************
- * 0x4000x:
- * divx drm
- * decoder will exit or give
- * a message dialog
- * ****************************/
- PLAYER_DIVX_AUTHORERR = 0x40001,
- PLAYER_DIVX_RENTAL_EXPIRED = 0x40002,
- PLAYER_DIVX_RENTAL_VIEW = 0x40003,
-
-
-}player_status;
-
-
-typedef struct
-{
- int index;
- int id;
- int width;
- int height;
- int aspect_ratio_num;
- int aspect_ratio_den;
- int frame_rate_num;
- int frame_rate_den;
- int bit_rate;
- vformat_t format;
- int duartion;
- unsigned int video_rotation_degree;
-}mvideo_info_t;
-
-typedef enum
-{
- ACOVER_NONE = 0,
- ACOVER_JPG ,
- ACOVER_PNG ,
-}audio_cover_type;
-
-typedef struct
-{
- char title[512];
- char author[512];
- char album[512];
- char comment[512];
- char year[4];
- int track;
- char genre[32];
- char copyright[512];
- audio_cover_type pic;
-}audio_tag_info;
-
-typedef struct
-{
- int id;
- int channel;
- int sample_rate;
- int bit_rate;
- aformat_t aformat;
- int duration;
- audio_tag_info *audio_tag;
-}maudio_info_t;
-
-typedef struct
-{
- char id;
- char internal_external; //0:internal_sub 1:external_sub
- unsigned short width;
- unsigned short height;
- unsigned int sub_type;
- char resolution;
- long long subtitle_size;
- char *sub_language;
-}msub_info_t;
-
-typedef struct
-{
- char *filename;
- int duration;
- long long file_size;
- pfile_type type;
- int bitrate;
- int has_video;
- int has_audio;
- int has_sub;
- int nb_streams;
- int total_video_num;
- int cur_video_index;
- int total_audio_num;
- int cur_audio_index;
- int total_sub_num;
- int cur_sub_index;
- int seekable;
- int drm_check;
-}mstream_info_t;
-
-typedef struct
-{
- mstream_info_t stream_info;
- mvideo_info_t *video_info[MAX_VIDEO_STREAMS];
- maudio_info_t *audio_info[MAX_AUDIO_STREAMS];
- msub_info_t *sub_info[MAX_SUB_STREAMS];
-}media_info_t;
-
-typedef struct player_info
-{
- char *name;
- player_status last_sta;
- player_status status; /*stop,pause */
- int full_time; /*Seconds */
- int full_time_ms; /* mSeconds */
- int current_time; /*Seconds */
- int current_ms; /*ms*/
- int last_time;
- int error_no;
- int start_time;
- int first_time;
- int pts_video;
- //int pts_pcrscr;
- unsigned int current_pts;
- long curtime_old_time;
- unsigned int video_error_cnt;
- unsigned int audio_error_cnt;
- float audio_bufferlevel; // relative value
- float video_bufferlevel; // relative value
- int64_t bufed_pos;
- int bufed_time;/* Second*/
- unsigned int drm_rental;
-}player_info_t;
-
-typedef struct pid_info
-{
- int num;
- int pid[MAX_PLAYER_THREADS];
-}pid_info_t;
-
-typedef struct player_file_type
-{
- const char *fmt_string;
- int video_tracks;
- int audio_tracks;
- int subtitle_tracks;
- /**/
-}player_file_type_t;
-
-
-#define STATE_PRE(sta) (sta>>16)
-#define PLAYER_THREAD_IS_INITING(sta) (STATE_PRE(sta)==0x1)
-#define PLAYER_THREAD_IS_RUNNING(sta) (STATE_PRE(sta)==0x2)
-#define PLAYER_THREAD_IS_STOPPED(sta) (STATE_PRE(sta)==0x3)
-
-typedef int (*update_state_fun_t)(int pid,player_info_t *) ;
-typedef int (*notify_callback)(int pid,int msg,unsigned long ext1,unsigned long ext2);
-typedef enum
-{
- PLAYER_EVENTS_PLAYER_INFO=1, ///<ext1=player_info*,ext2=0,same as update_statue_callback
- PLAYER_EVENTS_STATE_CHANGED, ///<ext1=new_state,ext2=0,
- PLAYER_EVENTS_ERROR, ///<ext1=error_code,ext2=message char *
- PLAYER_EVENTS_BUFFERING, ///<ext1=buffered=d,d={0-100},ext2=0,
- PLAYER_EVENTS_FILE_TYPE, ///<ext1=player_file_type_t*,ext2=0
-}player_events;
-
-typedef struct
-{
- update_state_fun_t update_statue_callback;
- int update_interval;
- long callback_old_time;
- notify_callback notify_fn;
-}callback_t;
-
-typedef struct
- {
- char *file_name; //file url
- char *headers; //file name's authentication information,maybe used in network streaming
- //List *play_list;
- int video_index; //video track, no assigned, please set to -1
- int audio_index; //audio track, no assigned, please set to -1
- int sub_index; //subtitle track, no assigned, please set to -1
- int t_pos; //start postion, use second as unit
- int read_max_cnt; //read retry maxium counts, if exceed it, return error
- int avsync_threshold; //for adec av sync threshold in ms
- union
- {
- struct{
- unsigned int loop_mode:1; //file loop mode 0:loop 1:not loop
- unsigned int nosound:1; //0:play with audio 1:play without audio
- unsigned int novideo:1; //0:play with video 1:play without video
- unsigned int hassub:1; //0:ignore subtitle 1:extract subtitle if have
- unsigned int need_start:1;/*If set need_start, we need call player_start_play to playback*/
- #ifdef DEBUG_VARIABLE_DUR
- unsigned int is_variable:1; //0:extrack duration from header 1:update duration during playback
- #endif
- unsigned int displast_frame : 1;//0:black out when player exit 1:keep last frame when player exit
- };
- int mode; //no use
- };
- callback_t callback_fn; //callback function
- int byteiobufsize; //byteio buffer size used in ffmpeg
- int loopbufsize; //loop buffer size used in ffmpeg
- int enable_rw_on_pause; //no use
- /*
- data%<min && data% <max enter buffering;
- data% >middle exit buffering;
- */
- int auto_buffing_enable; //auto buffering switch
- float buffing_min; //auto buffering low limit
- float buffing_middle; //auto buffering middle limit
- float buffing_max; //auto buffering high limit
- int is_playlist; //no use
- int is_type_parser; //is try to get file type
- int buffing_starttime_s; //for rest buffing_middle,buffering seconds data to start.
- int buffing_force_delay_s;
- int reserved [56]; //reserved for furthur used,some one add more ,can del reserved num
- }play_control_t;
-
-#endif
diff --git a/tools/android/depends/libamplayer/libamplayer/include/stream_format.h b/tools/android/depends/libamplayer/libamplayer/include/stream_format.h
deleted file mode 100644
index 5444f528eb..0000000000
--- a/tools/android/depends/libamplayer/libamplayer/include/stream_format.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _STREAM_FORMAT_H_
-#define _STREAM_FORMAT_H_
-
-#include "amports/vformat.h"
-#include "amports/aformat.h"
-
-typedef enum
-{
- NONE = 0,
- ID3V1,
- ID3V2,
- APEV1,
- APEV2,
- WMATAG,
- MPEG4TAG,
-}audio_tag_type;
-
-typedef enum
-{
- UNKNOWN_FILE = 0,
- AVI_FILE = 1,
- MPEG_FILE = 2,
- WAV_FILE = 3,
- MP3_FILE = 4,
- AAC_FILE = 5,
- AC3_FILE = 6,
- RM_FILE = 7,
- DTS_FILE = 8,
- MKV_FILE = 9,
- MOV_FILE = 10,
- MP4_FILE = 11,
- FLAC_FILE = 12,
- H264_FILE = 13,
- M2V_FILE = 14,
- FLV_FILE = 15,
- P2P_FILE = 16,
- ASF_FILE = 17,
- STREAM_FILE = 18,
- APE_FILE = 19,
- FILE_MAX = 20,
-}pfile_type;
-
-#endif
diff --git a/tools/android/depends/libass/Makefile b/tools/android/depends/libass/Makefile
deleted file mode 100644
index 116510847a..0000000000
--- a/tools/android/depends/libass/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libass
-VERSION=0.9.13
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST)
-
-LIBDYLIB=$(PLATFORM)/$(LIBNAME)/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libass.la $(PREFIX)/lib/libass.so $(PREFIX)/lib/libass.so.4
- mv -f $(PREFIX)/lib/libass.so.4.1.0 $(PREFIX)/lib/libass.so
- $(RPL) -e "libass.so.4" "libass.so\x00\x00" $(PREFIX)/lib/libass.so
- -$(READELF) --dynamic $(PREFIX)/lib/libass.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libbluray/Makefile b/tools/android/depends/libbluray/Makefile
deleted file mode 100644
index ca4e428a70..0000000000
--- a/tools/android/depends/libbluray/Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# 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) --host=$(HOST) \
- --disable-examples --disable-doxygen-doc
-
-LIBDYLIB=$(PLATFORM)/src/.libs/libbluray.so.1.0.0
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- # libbluray has borked Makefile.am with respect to CFLAGS, remove the offending line
- sed -i -e "s|CFLAGS=|#CFLAGS=|" $(PLATFORM)/src/Makefile.am
- sed -i -e "s|CFLAGS=|#CFLAGS=|" $(PLATFORM)/src/examples/Makefile.am
- cd $(PLATFORM); ./bootstrap
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libbluray.la $(PREFIX)/lib/libbluray.so $(PREFIX)/lib/libbluray.so.1
- mv -f $(PREFIX)/lib/libbluray.so.1.0.0 $(PREFIX)/lib/libbluray.so
- $(RPL) -e "libbluray.so.1" "libbluray.so\x00\x00" $(PREFIX)/lib/libbluray.so
- -$(READELF) --dynamic $(PREFIX)/lib/libbluray.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libcdio/Makefile b/tools/android/depends/libcdio/Makefile
deleted file mode 100644
index 7532085701..0000000000
--- a/tools/android/depends/libcdio/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include configure.patch Makefile
-
-# lib name, version
-LIBNAME=libcdio
-VERSION=0.82
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --without-cd-drive --without-cd-info --without-cd-paranoia \
- --without-cdda-player --without-cd-read --without-iso-info --without-iso-read --disable-example-progs \
- --disable-cpp-progs --without-cd-drive --without-cd-info --without-cd-paranoia --without-cdda-player \
- --without-cd-read --without-iso-info --without-iso-read --disable-shared
-
-LIBDYLIB=$(PLATFORM)/lib/driver/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p0 < ../configure.patch
- cd $(PLATFORM); $(AUTORECONF) -vif
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- cp $(PLATFORM)/include/cdio/cdtext.h $(PREFIX)/include/cdio/
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libcdio/configure.patch b/tools/android/depends/libcdio/configure.patch
deleted file mode 100644
index a4110ef9cb..0000000000
--- a/tools/android/depends/libcdio/configure.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.ac 2012-05-27 15:06:13.044747493 -0400
-+++ configure.ac 2012-05-27 15:05:52.364747505 -0400
-@@ -378,7 +378,7 @@
- ;;
- linux*|uclinux)
- AC_CHECK_HEADERS(linux/version.h linux/major.h)
-- AC_CHECK_HEADERS(linux/cdrom.h, [have_linux_cdrom_h="yes"])
-+ AC_CHECK_HEADERS(linux/cdrom.h, [have_linux_cdrom_h="no"])
- if test "x$have_linux_cdrom_h" = "xyes" ; then
- AC_TRY_COMPILE(,[
- #include <linux/cdrom.h>
diff --git a/tools/android/depends/libcec/Makefile b/tools/android/depends/libcec/Makefile
deleted file mode 100644
index 47324d50d8..0000000000
--- a/tools/android/depends/libcec/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libcec
-VERSION=2.1.1
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST) \
- ac_cv_search_dlopen=yes
-
-LIBDYLIB=$(PLATFORM)/src/lib/.libs/libcec.so.2.0.1
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(AUTORECONF) -vif
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)/src/lib
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/src/lib install
- rm -f $(PREFIX)/lib/libcec.la $(PREFIX)/lib/libcec.so $(PREFIX)/lib/libcec.so.2
- mv -f $(PREFIX)/lib/libcec.so.2.0.1 $(PREFIX)/lib/libcec.so
- $(RPL) -e "libcec.so.2" "libcec.so\x00\x00" $(PREFIX)/lib/libcec.so
- -$(READELF) --dynamic $(PREFIX)/lib/libcec.so | grep ibrary
- touch $@
-
-clean:
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libffi/Makefile b/tools/android/depends/libffi/Makefile
deleted file mode 100644
index e4971389a8..0000000000
--- a/tools/android/depends/libffi/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libffi
-VERSION=3.0.11
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE= ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared --disable-builddir
-
-LIBDYLIB=$(PLATFORM)/.libs/$(LIBNAME).a
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -j 1 -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- mkdir -p $(PREFIX)/include/ffi
- cp $(PREFIX)/lib/$(SOURCE)/include/* $(PREFIX)/include/ffi/
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libflac/Makefile b/tools/android/depends/libflac/Makefile
deleted file mode 100644
index c88ea559df..0000000000
--- a/tools/android/depends/libflac/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile nasm.patch
-
-# lib name, version
-LIBNAME=flac
-VERSION=1.2.1
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-export NASM=
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-xmms-plugin --disable-cpplibs
-
-LIBDYLIB=$(PLATFORM)/src/libFLAC/.libs/libFLAC.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p0 < ../nasm.patch
- cd $(PLATFORM); $(AUTOCONF)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libFLAC.la $(PREFIX)/lib/libFLAC.so $(PREFIX)/lib/libFLAC.so.8
- mv -f $(PREFIX)/lib/libFLAC.so.8.2.0 $(PREFIX)/lib/libxbFLAC.so
- ln -sf $(PREFIX)/lib/libxbFLAC.so $(PREFIX)/lib/libFLAC.so
- $(RPL) -e "libFLAC.so.8" "libxbFLAC.so" $(PREFIX)/lib/libxbFLAC.so
- -$(READELF) --dynamic $(PREFIX)/lib/libxbFLAC.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libflac/nasm.patch b/tools/android/depends/libflac/nasm.patch
deleted file mode 100644
index 0371cb9e0e..0000000000
--- a/tools/android/depends/libflac/nasm.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -ruN configure.in configure.in
---- configure.in 2007-09-13 11:48:42.000000000 -0400
-+++ configure.in 2012-06-10 20:13:50.543973093 -0400
-@@ -269,10 +269,6 @@
- # only matters for x86
- AC_CHECK_PROGS(NASM, nasm)
- AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM")
--if test -n "$NASM" ; then
--AC_DEFINE(FLAC__HAS_NASM)
--AH_TEMPLATE(FLAC__HAS_NASM, [define if you are compiling for x86 and have the NASM assembler])
--fi
-
- # only matters for PowerPC
- AC_CHECK_PROGS(AS, as, as)
diff --git a/tools/android/depends/libgcrypt/01-gcrypt-android-select.patch b/tools/android/depends/libgcrypt/01-gcrypt-android-select.patch
deleted file mode 100644
index 2e26a211cb..0000000000
--- a/tools/android/depends/libgcrypt/01-gcrypt-android-select.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- libgcrypt-1.4.0/src/gcrypt.h 2007-12-10 10:05:46.000000000 +0100
-+++ libgcrypt-1.4.0.new/src/gcrypt.h 2011-11-13 12:12:23.000000000 +0100
-@@ -37,6 +37,10 @@
- # include <sys/socket.h>
- #endif /*!_WIN32*/
-
-+#if defined(__ANDROID__)
-+#include <sys/select.h>
-+#endif
-+
- typedef socklen_t gcry_socklen_t;
-
- #include <sys/time.h>
diff --git a/tools/android/depends/libgcrypt/Makefile b/tools/android/depends/libgcrypt/Makefile
deleted file mode 100644
index 4807eff051..0000000000
--- a/tools/android/depends/libgcrypt/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include 01-gcrypt-android-select.patch gcrypt-disable-tests.patch Makefile
-
-# lib name, version
-LIBNAME=libgcrypt
-VERSION=1.4.0
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.bz2
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared \
- ac_cv_path_GPG_ERROR_CONFIG=$(PREFIX)/bin/gpg-error-config
-# ac_cv_sys_symbol_underscore=no \
-
-ifeq ($(PLATFORM),x86)
-CONFIGURE+=--disable-asm
-endif
-
-LIBDYLIB=$(PLATFORM)/src/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p1 < ../gcrypt-disable-tests.patch
- cd $(PLATFORM); $(CONFIGURE)
- cd $(PLATFORM); patch -p1 < ../01-gcrypt-android-select.patch
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libgcrypt/gcrypt-disable-tests.patch b/tools/android/depends/libgcrypt/gcrypt-disable-tests.patch
deleted file mode 100644
index 9ff4445d3f..0000000000
--- a/tools/android/depends/libgcrypt/gcrypt-disable-tests.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -ruN libgcrypt-1.4.0/Makefile.am libgcrypt-1.4.0-good//Makefile.am
---- libgcrypt-1.4.0/Makefile.am 2007-05-04 06:11:28.000000000 -0400
-+++ libgcrypt-1.4.0-good//Makefile.am 2012-04-27 15:13:42.526381700 -0400
-@@ -23,7 +23,7 @@
- --enable-ciphers=arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia
-
- DIST_SUBDIRS = m4 mpi cipher src doc tests
--SUBDIRS = mpi cipher src doc tests
-+SUBDIRS = mpi cipher src
- EXTRA_DIST = BUGS autogen.sh README.SVN
- DISTCLEANFILES =
-
-diff -ruN libgcrypt-1.4.0/Makefile.in libgcrypt-1.4.0-good//Makefile.in
---- libgcrypt-1.4.0/Makefile.in 2007-12-10 04:05:13.000000000 -0500
-+++ libgcrypt-1.4.0-good//Makefile.in 2012-04-27 15:14:14.186381680 -0400
-@@ -237,7 +237,7 @@
- --enable-ciphers=arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia
-
- DIST_SUBDIRS = m4 mpi cipher src doc tests
--SUBDIRS = mpi cipher src doc tests
-+SUBDIRS = mpi cipher src
- EXTRA_DIST = BUGS autogen.sh README.SVN
- DISTCLEANFILES =
- all: config.h
diff --git a/tools/android/depends/libgpg-error/Makefile b/tools/android/depends/libgpg-error/Makefile
deleted file mode 100644
index cb43d1939f..0000000000
--- a/tools/android/depends/libgpg-error/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libgpg-error
-VERSION=1.10
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.bz2
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST) \
- --disable-languages \
- --disable-nls --disable-shared
-
-LIBDYLIB=$(PLATFORM)/src/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libiconv/Makefile b/tools/android/depends/libiconv/Makefile
deleted file mode 100644
index a54de13ca6..0000000000
--- a/tools/android/depends/libiconv/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libiconv
-VERSION=1.13.1
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) build-aux/; \
- cp -f $(CONFIG_SUB) $(CONFIG_GUESS) libcharset/build-aux/; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) gl_cv_header_working_stdint_h=yes --disable-shared
-
-LIBDYLIB=$(PLATFORM)/lib/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libjpeg-turbo-native/Makefile b/tools/android/depends/libjpeg-turbo-native/Makefile
deleted file mode 100644
index 434b60905a..0000000000
--- a/tools/android/depends/libjpeg-turbo-native/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libjpeg-turbo
-VERSION=1.2.0
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- NASM=$(YASM) ./configure --prefix=$(PREFIX) --with-jpeg8
-
-CFLAGS+=-O3
-
-LIBDYLIB=$(PLATFORM)/.libs/libjpeg.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-jpegtest: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -j 1 -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libjpeg-turbo/Makefile b/tools/android/depends/libjpeg-turbo/Makefile
deleted file mode 100644
index f0c9391988..0000000000
--- a/tools/android/depends/libjpeg-turbo/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libjpeg-turbo
-VERSION=1.2.0
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- NASM=$(YASM) ./configure --prefix=$(PREFIX) --host=$(HOST) --with-jpeg8 --disable-shared
-
-CFLAGS+=-O3
-
-LIBDYLIB=$(PLATFORM)/.libs/libjpeg.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -j 1 -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/liblzo2-native/Makefile b/tools/android/depends/liblzo2-native/Makefile
deleted file mode 100644
index 451c58b1b1..0000000000
--- a/tools/android/depends/liblzo2-native/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=lzo
-VERSION=2.03
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) autoconf/; \
- ./configure --prefix=$(PREFIX) --enable-shared
-
-LIBDYLIB=$(PLATFORM)/src/.libs/lib$(LIBNAME)2.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/liblzo2/Makefile b/tools/android/depends/liblzo2/Makefile
deleted file mode 100644
index b5a7e47f33..0000000000
--- a/tools/android/depends/liblzo2/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=lzo
-VERSION=2.03
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) autoconf/; \
- ./configure --prefix=$(PREFIX) --host=$(HOST)
-
-LIBDYLIB=$(PLATFORM)/src/.libs/lib$(LIBNAME)2.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libmad/01-libmad-pkgconfig.patch b/tools/android/depends/libmad/01-libmad-pkgconfig.patch
deleted file mode 100644
index fcfd34164a..0000000000
--- a/tools/android/depends/libmad/01-libmad-pkgconfig.patch
+++ /dev/null
@@ -1,118 +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 mad.pc.in \
- 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/Makefile.in libmad-0.15.1b/Makefile.in
---- libmad-0.15.1b.orig/Makefile.in 2004-02-17 02:33:23.000000000 +0000
-+++ libmad-0.15.1b/Makefile.in 2005-08-25 12:09:34.000000000 +0000
-@@ -14,6 +14,8 @@
-
- @SET_MAKE@
-
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = mad.pc
-
- SOURCES = $(libmad_la_SOURCES) $(EXTRA_libmad_la_SOURCES) $(minimad_SOURCES)
-
-@@ -43,7 +45,7 @@
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.h.in $(srcdir)/libmad.list.in \
- $(top_srcdir)/configure COPYING INSTALL TODO config.guess \
-- config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
-+ config.sub depcomp install-sh ltmain.sh missing mkinstalldirs mad.pc.in
- subdir = .
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-@@ -53,7 +55,7 @@
- configure.lineno configure.status.lineno
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
- CONFIG_HEADER = config.h
--CONFIG_CLEAN_FILES = libmad.list
-+CONFIG_CLEAN_FILES = libmad.list mad.pc
- am__installdirs = $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
- libLTLIBRARIES_INSTALL = $(INSTALL)
- LTLIBRARIES = $(lib_LTLIBRARIES)
-@@ -218,7 +220,7 @@
- minimad_SOURCES = minimad.c
- minimad_INCLUDES =
- minimad_LDADD = libmad.la
--EXTRA_DIST = mad.h.sed \
-+EXTRA_DIST = mad.h.sed mad.pc.in \
- CHANGES COPYRIGHT CREDITS README TODO VERSION
-
- exported_headers = version.h fixed.h bit.h timer.h stream.h frame.h \
-@@ -298,6 +300,28 @@
- rm -f stamp-h1
- touch $@
-
-+mad.pc: $(top_builddir)/config.status mad.pc.in
-+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-+
-+install-pkgconfigDATA: $(pkgconfig_DATA)
-+ @$(NORMAL_INSTALL)
-+ $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir)
-+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
-+ if test -f $(srcdir)/$$p; then \
-+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfigdir)/$$p"; \
-+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfigdir)/$$p; \
-+ else if test -f $$p; then \
-+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfigdir)/$$p"; \
-+ $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfigdir)/$$p; \
-+ fi; fi; \
-+ done
-+
-+uninstall-pkgconfigDATA:
-+ @$(NORMAL_UNINSTALL)
-+ list='$(pkgconfig_DATA)'; for p in $$list; do \
-+ rm -f $(DESTDIR)$(pkgconfigdir)/$$p; \
-+ done
-+
- distclean-hdr:
- -rm -f config.h stamp-h1
- libmad.list: $(top_builddir)/config.status $(srcdir)/libmad.list.in
-@@ -726,7 +750,7 @@
-
- info-am:
-
--install-data-am: install-includeHEADERS
-+install-data-am: install-includeHEADERS install-pkgconfigDATA
-
- install-exec-am: install-libLTLIBRARIES
-
-@@ -757,7 +781,7 @@
- ps-am:
-
- uninstall-am: uninstall-includeHEADERS uninstall-info-am \
-- uninstall-libLTLIBRARIES
-+ uninstall-libLTLIBRARIES install-pkgconfigDATA
-
- uninstall-info: uninstall-info-recursive
-
-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/android/depends/libmad/Makefile b/tools/android/depends/libmad/Makefile
deleted file mode 100644
index 4279838e12..0000000000
--- a/tools/android/depends/libmad/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include 01-libmad-pkgconfig.patch Makefile
-
-# lib name, version
-LIBNAME=libmad
-VERSION=0.15.1b
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-#Arm build borks with -mthumb
-ifeq ($(findstring arm,$(PLATFORM)),arm)
-export CFLAGS+=-marm
-endif
-
-# configuration settings
-CONFIGURE=rm config.sub config.guess; $(AUTOMAKE) -ac; ./configure --prefix=$(PREFIX) --host=$(HOST)
-
-LIBDYLIB=$(PLATFORM)/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p1 < ../01-libmad-pkgconfig.patch
- cd $(PLATFORM); sed -i '/-fforce-mem/d' configure; $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libmad.la $(PREFIX)/lib/libmad.so $(PREFIX)/lib/libmad.so.0
- mv -f $(PREFIX)/lib/libmad.so.0.2.1 $(PREFIX)/lib/libmad.so
- $(RPL) -e "libmad.so.0" "libmad.so\x00\x00" $(PREFIX)/lib/libmad.so
- -$(READELF) --dynamic $(PREFIX)/lib/libmad.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libmicrohttpd/Makefile b/tools/android/depends/libmicrohttpd/Makefile
deleted file mode 100644
index e55b03a9e9..0000000000
--- a/tools/android/depends/libmicrohttpd/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include fix-android-include.patch Makefile
-
-# lib name, version
-LIBNAME=libmicrohttpd
-VERSION=0.4.6
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
-
-LIBDYLIB=$(PLATFORM)/src/daemon/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p0 < ../fix-android-include.patch
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)/src/daemon
- $(MAKE) -C $(PLATFORM)/src/include install
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- rm -f $(PREFIX)/lib/libmicrohttpd.so $(PREFIX)/lib/libmicrohttpd.so.5 $(PREFIX)/lib/libmicrohttpd.so.5.2.1
- $(MAKE) -C $(PLATFORM)/src/daemon install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libmicrohttpd/fix-android-include.patch b/tools/android/depends/libmicrohttpd/fix-android-include.patch
deleted file mode 100644
index 5c14087f06..0000000000
--- a/tools/android/depends/libmicrohttpd/fix-android-include.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -ruN src/daemon/daemon.c src/daemon/daemon.c
---- src/daemon/daemon.c 2012-05-07 17:21:43.695832026 -0400
-+++ src/daemon/daemon.c 2012-05-07 17:20:20.365832079 -0400
-@@ -244,7 +244,7 @@
- MHD_ip_count_lock (daemon);
-
- /* Search for the IP address */
-- node = (void*)TSEARCH (key, &daemon->per_ip_connection_count, MHD_ip_addr_compare);
-+// node = (void*)TSEARCH (key, &daemon->per_ip_connection_count, MHD_ip_addr_compare);
- if (!node)
- {
- #if HAVE_MESSAGES
-@@ -296,7 +296,7 @@
- MHD_ip_count_lock (daemon);
-
- /* Search for the IP address */
-- node = (void*)TFIND (&search_key, &daemon->per_ip_connection_count, MHD_ip_addr_compare);
-+// node = (void*)TFIND (&search_key, &daemon->per_ip_connection_count, MHD_ip_addr_compare);
-
- /* Something's wrong if we couldn't find an IP address
- * that was previously added */
-diff -ruN src/include/platform.h src/include/platform.h
---- src/include/platform.h 2012-05-07 17:34:57.345831526 -0400
-+++ src/include/platform.h 2012-05-07 17:20:20.375832079 -0400
-@@ -53,7 +53,7 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <signal.h>
--#if !defined(MINGW) && !defined(__SYMBIAN32__)
-+#if !defined(MINGW) && !defined(__SYMBIAN32__) && !defined(ANDROID)
- #include <search.h>
- #endif
- #include <stddef.h>
diff --git a/tools/android/depends/libmodplug/Makefile b/tools/android/depends/libmodplug/Makefile
deleted file mode 100644
index f38b6d915e..0000000000
--- a/tools/android/depends/libmodplug/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libmodplug
-VERSION=0.8.7
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST)
-
-LIBDYLIB=$(PLATFORM)/src/.libs/$(LIBNAME).so
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libmodplug.la $(PREFIX)/lib/libmodplug.so $(PREFIX)/lib/libmodplug.so.0
- mv -f $(PREFIX)/lib/libmodplug.so.0.0.0 $(PREFIX)/lib/libmodplug.so
- $(RPL) -e "libmodplug.so.0" "libmodplug.so\x00\x00" $(PREFIX)/lib/libmodplug.so
- -$(READELF) --dynamic $(PREFIX)/lib/libmodplug.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libmpeg2/Makefile b/tools/android/depends/libmpeg2/Makefile
deleted file mode 100644
index 8bd2eb7981..0000000000
--- a/tools/android/depends/libmpeg2/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libmpeg2
-VERSION=0.5.1
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .auto/ ; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-sdl
-
-LIBDYLIB=$(PLATFORM)/$(LIBNAME)/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libmpeg2.la $(PREFIX)/lib/libmpeg2.so $(PREFIX)/lib/libmpeg2.so.0
- mv -f $(PREFIX)/lib/libmpeg2.so.0.1.0 $(PREFIX)/lib/libxbmpeg2.so
- ln -sf $(PREFIX)/lib/libxbmpeg2.so $(PREFIX)/lib/libmpeg2.so
- $(RPL) -e "libmpeg2.so.0" "libxbmpeg2.so" $(PREFIX)/lib/libxbmpeg2.so
- -$(READELF) --dynamic $(PREFIX)/lib/libxbmpeg2.so | grep ibrary
- #
- rm -f $(PREFIX)/lib/libmpeg2convert.la $(PREFIX)/lib/libmpeg2convert.so $(PREFIX)/lib/libmpeg2convert.so.0
- mv -f $(PREFIX)/lib/libmpeg2convert.so.0.0.0 $(PREFIX)/lib/libxbmpeg2convert.so
- ln -sf $(PREFIX)/lib/libxbmpeg2convert.so $(PREFIX)/lib/libmpeg2convert.so
- $(RPL) -e "libmpeg2convert.so.0" "libxbmpeg2convert.so" $(PREFIX)/lib/libxbmpeg2convert.so
- -$(READELF) --dynamic $(PREFIX)/lib/libxbmpeg2convert.so | grep ibrary
- #
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libnfs/Makefile b/tools/android/depends/libnfs/Makefile
deleted file mode 100644
index e14f99c440..0000000000
--- a/tools/android/depends/libnfs/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libnfs
-VERSION=1.5.0
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST)
-
-LIBDYLIB=$(PLATFORM)/lib/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- -rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); ./bootstrap
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libnfs.la $(PREFIX)/lib/libnfs.so $(PREFIX)/lib/libnfs.so.1
- mv -f $(PREFIX)/lib/libnfs.so.1.0.5 $(PREFIX)/lib/libnfs.so
- $(RPL) -e "libnfs.so.1" "libnfs.so\x00\x00" $(PREFIX)/lib/libnfs.so
- -$(READELF) --dynamic $(PREFIX)/lib/libnfs.so | grep ibrary
- touch $@
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -r .installed-$(PLATFORM)
- rm -rf $(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libogg/Makefile b/tools/android/depends/libogg/Makefile
deleted file mode 100644
index 4a84d34d97..0000000000
--- a/tools/android/depends/libogg/Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libogg
-VERSION=1.1.4
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST)
-
-LIBDYLIB=$(PLATFORM)/src/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libogg.la $(PREFIX)/lib/libogg.so $(PREFIX)/lib/libogg.so.0
- mv -f $(PREFIX)/lib/libogg.so.0.6.0 $(PREFIX)/lib/libxbogg.so
- ln -sf $(PREFIX)/lib/libxbogg.so $(PREFIX)/lib/libogg.so
- $(RPL) -e "libogg.so.0" "libxbogg.so" $(PREFIX)/lib/libxbogg.so
- -$(READELF) --dynamic $(PREFIX)/lib/libxbogg.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libomxil-bellagio/Makefile b/tools/android/depends/libomxil-bellagio/Makefile
deleted file mode 100644
index d1317f885d..0000000000
--- a/tools/android/depends/libomxil-bellagio/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include android-fix-build.patch Makefile oscl/*
-
-# lib name, version
-LIBNAME=libomxil-bellagio
-VERSION=0.9.3
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
-# configuration settings
-CFLAGS+=-I$(CURDIR)/oscl
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared \
- --enable-android ac_cv_func_malloc_0_nonnull=yes
-
-LIBDYLIB=$(PLATFORM)/src/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) "$(BASE_URL)/$(ARCHIVE)"
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p1 < ../android-fix-build.patch
- cd $(PLATFORM); autoreconf -vif
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -j 1 -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libomxil-bellagio/android-fix-build.patch b/tools/android/depends/libomxil-bellagio/android-fix-build.patch
deleted file mode 100644
index a6e61db326..0000000000
--- a/tools/android/depends/libomxil-bellagio/android-fix-build.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -ruN armeabi-v7a/configure.ac armeabi-v7a-good/configure.ac
---- armeabi-v7a/configure.ac 2011-05-20 01:44:18.000000000 -0400
-+++ armeabi-v7a-good/configure.ac 2012-06-19 01:58:45.483524179 -0400
-@@ -5,7 +5,7 @@
- AC_PREREQ([2.59])
-
- AC_CONFIG_HEADERS([config.h])
--CFLAGS="${CFLAGS} -Wall -Werror"
-+CFLAGS="${CFLAGS} -Wall"
-
- ################################################################################
- # Set the shared versioning info, according to section 6.3 of the libtool info #
-@@ -149,8 +149,6 @@
- # Check for libraries #
- ################################################################################
-
--AC_CHECK_LIB([pthread], [pthread_create])
--
- # Check for libdl
- AC_SEARCH_LIBS([dlopen], [dl], [], [AC_MSG_ERROR([libdl is required])])
-
-diff -ruN armeabi-v7a/src/Makefile.am armeabi-v7a-good/src/Makefile.am
---- armeabi-v7a/src/Makefile.am 2011-05-20 01:28:17.000000000 -0400
-+++ armeabi-v7a-good/src/Makefile.am 2012-06-19 01:59:23.603524155 -0400
-@@ -27,7 +27,7 @@
-
- libomxil_bellagio_la_CFLAGS = -I$(top_srcdir)/include -I$(srcdir)/base -I$(srcdir)/core_extensions \
- -DINSTALL_PATH_STR=\"$(plugindir)\" -DOMX_LOADERS_DIRNAME=\"$(libdir)/omxloaders\/\"
--libomxil_bellagio_la_LIBADD = base/libomxbase.la core_extensions/libomxcoreext.la -lpthread
-+libomxil_bellagio_la_LIBADD = base/libomxbase.la core_extensions/libomxcoreext.la
- libomxil_bellagio_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
-
- include_extradir = $(includedir)/bellagio
diff --git a/tools/android/depends/libomxil-bellagio/oscl/oscl_base_macros.h b/tools/android/depends/libomxil-bellagio/oscl/oscl_base_macros.h
deleted file mode 100644
index 30fc86863d..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/oscl_base_macros.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L B A S E _ M A C R O S
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-/*! \addtogroup osclbase OSCL Base
- *
- * @{
- */
-
-
-/*! \file oscl_base_macros.h
- \brief This file defines common macros and constants for basic compilation support.
-*/
-
-#ifndef OSCL_BASE_MACROS_H_INCLUDED
-#define OSCL_BASE_MACROS_H_INCLUDED
-
-// Pick up any platform-specific definitions for the common
-// macros.
-#include "osclconfig.h"
-
-// Define default values for the common macros
-#ifndef OSCL_EXPORT_REF
-#define OSCL_EXPORT_REF
-#endif
-
-#ifndef OSCL_IMPORT_REF
-#define OSCL_IMPORT_REF
-#endif
-
-//! The NULL_TERM_CHAR is used to terminate c-style strings.
-//static const char NULL_TERM_CHAR = '\0';
-#ifndef NULL_TERM_CHAR
-#define NULL_TERM_CHAR '\0'
-#endif
-
-//! if the NULL macro isn't already defined, then define it as zero.
-#ifndef NULL
-#define NULL (0)
-#endif
-
-#if (OSCL_DISABLE_INLINES)
-#define OSCL_INLINE
-#define OSCL_COND_EXPORT_REF OSCL_EXPORT_REF
-#define OSCL_COND_IMPORT_REF OSCL_IMPORT_REF
-#else
-#define OSCL_INLINE inline
-#define OSCL_COND_EXPORT_REF
-#define OSCL_COND_IMPORT_REF
-#endif
-
-//this macro may not be defined in all configurations
-//so a default is defined here.
-
-//! Type casting macros
-/*!
- \param type Destination type of cast
- \param exp Expression to cast
-*/
-
-#define OSCL_CONST_CAST(type,exp) ((type)(exp))
-#define OSCL_STATIC_CAST(type,exp) ((type)(exp))
-#define OSCL_REINTERPRET_CAST(type,exp) ((type)(exp))
-#define OSCL_DYNAMIC_CAST(type, exp) ((type)(exp))
-#define OSCL_VIRTUAL_BASE(type) type
-
-
-/**
- * The following two macros are used to avoid compiler warnings.
- *
- * OSCL_UNUSED_ARG(vbl) is used to "reference" an otherwise unused
- * parameter or variable, often one which is used only in an
- * OSCL_ASSERT and thus unreferenced in release mode
- * OSCL_UNUSED_RETURN(val) provides a "return" of a value, in places
- * which will not actually be executed, such as after an
- * OSCL_LEAVE or Thread::exit or abort. The value needs to
- * be of an appropriate type for the current function, though
- * zero will usually suffice. Note that OSCL_UNUSED_RETURN
- * will not be necessary for 'void' functions, as there is no
- * requirement for a value-return operation.
- */
-#define OSCL_UNUSED_ARG(vbl) (void)(vbl)
-#define OSCL_UNUSED_RETURN(value) return value
-
-/* The __TFS__ macro is used to optionally expand to "<>" depending on the
- * compiler. Some compilers require it to indicate that the friend function
- * is a template function as specified in the standard, but others don't
- * like it so it will handled with a macro expansion that depends on the
- * compiler.
- */
-#ifndef __TFS__
-#define __TFS__
-#endif
-
-#define OSCL_MIN(a,b) ((a) < (b) ? (a) : (b))
-#define OSCL_MAX(a,b) ((a) > (b) ? (a) : (b))
-#define OSCL_ABS(a) ((a) > (0) ? (a) : -(a))
-
-// the syntax for explicitly calling the destructor varies on some platforms
-// below is the default syntax as defined in the C++ standard
-#ifndef OSCL_TEMPLATED_DESTRUCTOR_CALL
-#define OSCL_TEMPLATED_DESTRUCTOR_CALL(type,simple_type) type :: ~simple_type ()
-#endif
-
-
-/*
- * The OSCL_UNSIGNED_CONST macro is used to optionally add a suffix to the
- * end of integer constants to identify them as unsigned constants. It is
- * usually only necessary to do that for very large constants that are too
- * big to fit within the range of a signed integer. Some compilers will issue
- * warnings for that. The default behavior will be to add no suffix.
- */
-
-#ifndef OSCL_UNSIGNED_CONST
-#define OSCL_UNSIGNED_CONST(x) x
-#endif
-
-/*
- * These macros are used by MTP to avoid byte aligning structures.
- */
-#ifndef OSCL_PACKED_VAR
-#define OSCL_PACKED_VAR "error"
-#endif
-
-
-/* The following macros enumerate the possible values of the build flag PV_COMPILER */
-
-#define EPV_ARM_GNUC 1 /* for GNU compiler */
-#define EPV_ARM_RVCT 2 /* for RVCT compiler from ARM */
-#define EPV_ARM_MSEVC 3 /* for MS Embedded VC compiler */
-
-/* PV_COMPILER value must be set to build command.
- In addition, PV_CPU_ARCH_VERSION must be defined to take on an integer value that specifies the version of target
- ARM architecture. */
-
-
-/*! @} */
-
-#endif // OSCL_BASE_MACROS_H_INCLUDED
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig.h
deleted file mode 100644
index e664e19008..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G ( P L A T F O R M C O N F I G I N F O )
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig.h
- * \brief This file contains configuration information for the linux platform
- *
- */
-
-#ifndef OSCLCONFIG_H_INCLUDED
-#define OSCLCONFIG_H_INCLUDED
-
-// system includes for dynamic registry
-#include <dirent.h>
-#include <dlfcn.h>
-
-#define OSCL_HAS_ANDROID_SUPPORT 1
-#define OSCL_HAS_ANDROID_FILE_IO_SUPPORT 1
-
-#define OSCL_EXPORT_REF __attribute__ ((visibility("default")))
-#define OSCL_IMPORT_REF __attribute__ ((visibility("default")))
-
-// include common include for determining sizes from limits.h
-#include "osclconfig_limits_typedefs.h"
-
-//This switch turns off some profiling and debug settings
-#ifndef OSCL_RELEASE_BUILD
-#ifdef NDEBUG
-#define OSCL_RELEASE_BUILD 1
-#else
-#define OSCL_RELEASE_BUILD 0
-#endif
-#endif
-
-#ifndef PVLOGGER_INST_LEVEL
-#if (OSCL_RELEASE_BUILD)
-//Release mode logging - should be kept minimum
-#define PVLOGGER_INST_LEVEL 2
-#else
-//full logging
-#define PVLOGGER_INST_LEVEL 5
-#endif
-#endif
-
-// include common unix definitions
-#include "osclconfig_unix_android.h"
-
-// define the suffix for unsigned constants
-#define OSCL_UNSIGNED_CONST(x) x##u
-
-// override the common definition for
-#undef OSCL_NATIVE_UINT64_TYPE
-#define OSCL_NATIVE_UINT64_TYPE u_int64_t
-
-// include the definitions for the processor
-#include "osclconfig_ix86.h"
-
-// the syntax for explicitly calling the destructor varies on some platforms
-// below is the default syntax as defined by another ARM project
-#define OSCL_TEMPLATED_DESTRUCTOR_CALL(type,simple_type) ~type ()
-
-
-/* The __TFS__ macro is used to optionally expand to "<>" depending on the
- * compiler. Some compilers require it to indicate that the friend function
- * is a template function as specified in the standard, but others don't
- * like it so it will handled with a macro expansion that depends on the
- * compiler.
- */
-#define __TFS__ <>
-
-#define OSCL_HAS_PRAGMA_PACK 0
-#define OSCL_HAS_PACKED_STRUCT 1
-#define OSCL_PACKED_VAR(x) x __attribute__((packed))
-#define OSCL_PACKED_STRUCT_BEGIN
-#define OSCL_PACKED_STRUCT_END __attribute__((packed))
-
-//set this to 1 to enable OSCL_ASSERT in release builds.
-#define OSCL_ASSERT_ALWAYS 0
-
-
-// check all osclconfig required macros are defined
-#include "osclconfig_check.h"
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_ansi_memory.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_ansi_memory.h
deleted file mode 100644
index fb53ea1326..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_ansi_memory.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ A N S I _ M E M O R Y
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_ansi_memory.h
- * \brief This file contains common typedefs based on the ANSI C limits.h header
- *
- * This header file should work for any ANSI C compiler to determine the
- * proper native C types to use for OSCL integer types.
- */
-
-
-#ifndef OSCLCONFIG_ANSI_MEMORY_H_INCLUDED
-#define OSCLCONFIG_ANSI_MEMORY_H_INCLUDED
-
-#include <memory.h>
-typedef size_t oscl_memsize_t;
-#define OSCL_HAS_ANSI_MEMORY_FUNCS 1
-
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_check.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_check.h
deleted file mode 100644
index 19d0b63e61..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_check.h
+++ /dev/null
@@ -1,423 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-
-#ifndef OSCLCONFIG_CHECK_H_INCLUDED
-#define OSCLCONFIG_CHECK_H_INCLUDED
-
-/*! \addtogroup osclconfig OSCL config
- *
- * @{
- */
-
-/**
-\def Make sure the basic types are defined,
-either in osclconfig_limits_typedefs.h or elsewhere.
-*/
-typedef int8 __int8__check__;
-typedef uint8 __uint8__check__;
-typedef int16 __int16__check__;
-typedef uint16 __uint16__check__;
-typedef int32 __int32__check__;
-typedef uint32 __uint32__check__;
-
-/**
-\def OSCL_ASSERT_ALWAYS macro should be set to 0 or 1.
-When set to 1, OSCL_ASSERT will be compiled in release mode as well
-as debug mode.
-*/
-#ifndef OSCL_ASSERT_ALWAYS
-#error "ERROR: OSCL_ASSERT_ALWAYS has to be defined to either 1 or 0."
-#endif
-
-
-/**
-\def OSCL_DISABLE_INLINES macro should be set to 1 if
-the target compiler supports 'inline' function definitions.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_DISABLE_INLINES
-#error "ERROR: OSCL_DISABLE_INLINES has to be defined to either 1 or 0."
-#endif
-
-/**
-\def OSCL_HAS_ANSI_STDLIB_SUPPORT macro should be set to 1 if
-the target compiler supports ANSI C standard lib functions.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_ANSI_STDLIB_SUPPORT
-#error "ERROR: OSCL_HAS_ANSI_STDLIB_SUPPORT has to be defined to either 1 or 0."
-#endif
-
-/**
-\def OSCL_HAS_ANSI_STDIO_SUPPORT macro should be set to 1 if
-the target compiler supports ANSI C standard I/O functions.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_ANSI_STDIO_SUPPORT
-#error "ERROR: OSCL_HAS_ANSI_STDIO_SUPPORT has to be defined to either 1 or 0."
-#endif
-
-/**
-\def OSCL_HAS_ANSI_STRING_SUPPORT macro should be set to 1 if
-the target compiler supports ANSI C standard string functions.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_ANSI_STRING_SUPPORT
-#error "ERROR: OSCL_HAS_ANSI_STRING_SUPPORT has to be defined to either 1 or 0."
-#endif
-
-/**
-\def OSCL_HAS_UNICODE_SUPPORT macro should be set to 1 if
-the target platform has a native 16-bit (wide) character type.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_UNICODE_SUPPORT
-#error "ERROR: OSCL_HAS_UNICODE_SUPPORT has to be defined to either 1 or 0."
-#endif
-
-/**
-\def _STRLIT macro should be set to an expression to convert
-a constant character string into a string literal type
-appropriate for the platform.
-Otherwise it should be set to 0.
-*/
-#ifndef _STRLIT
-#error "ERROR: _STRLIT has to be defined."
-#endif
-
-/**
-\def _STRLIT_CHAR macro should be set to an expression to convert
-a constant character string into a char string literal type
-appropriate for the platform.
-Otherwise it should be set to 0.
-*/
-#ifndef _STRLIT_CHAR
-#error "ERROR: _STRLIT_CHAR has to be defined."
-#endif
-
-/**
-When OSCL_HAS_UNICODE_SUPPORT==1,
-\def _STRLIT_WCHAR macro should be set to an expression to convert
-a constant character string into a wchar string literal type
-appropriate for the platform.
-Otherwise it should be set to 0.
-*/
-#if (OSCL_HAS_UNICODE_SUPPORT) && !defined(_STRLIT_WCHAR)
-#error "ERROR: _STRLIT_WCHAR has to be defined"
-#endif
-
-/**
-When OSCL_HAS_UNICODE_SUPPORT==1,
-\def OSCL_NATIVE_WCHAR_TYPE macro should be set to
-the native wide character type for the platform.
-Otherwise it should be set to 0.
-*/
-#if (OSCL_HAS_UNICODE_SUPPORT) && !defined(OSCL_NATIVE_WCHAR_TYPE)
-#error "ERROR: OSCL_NATIVE_WCHAR_TYPE has to be defined."
-#endif
-
-/**
-\def OSCL_HAS_MSWIN_SUPPORT macro should be set to 1 if
-the target platform supports the Win32 API.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_MSWIN_SUPPORT
-#error "ERROR: OSCL_HAS_MSWIN_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-\def OSCL_HAS_MSWIN_PARTIAL_SUPPORT macro should be set to 1 if
-the target platform supports the WinMobile API.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_MSWIN_PARTIAL_SUPPORT
-#error "ERROR: OSCL_HAS_MSWIN_PARTIAL_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-\def OSCL_HAS_UNIX_SUPPORT macro should be set to 1 if
-the target platform supports the Unix API.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_UNIX_SUPPORT
-#error "ERROR: OSCL_HAS_UNIX_SUPPORT has to be defined to either 1 or 0."
-#endif
-
-/**
-\def OSCL_HAS_SYMBIAN_SUPPORT macro should be set to 1 if
-the target platform supports the Symbian API.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SYMBIAN_SUPPORT
-#error "ERROR: OSCL_HAS_SYMBIAN_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-\def OSCL_HAS_ANDROID_SUPPORT macro should be set to 1 if
-the target platform supports the Android API.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_ANDROID_SUPPORT
-#error "ERROR: OSCL_HAS_ANDROID_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-\def OSCL_HAS_IPHONE_SUPPORT macro should be set to 1 if
-the target platform supports the iPhone API.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_IPHONE_SUPPORT
-#error "ERROR: OSCL_HAS_IPHONE_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-\def OSCL_INTEGERS_WORD_ALIGNED macro should be set to 1 if
-the target platform requires integers to be word-aligned in memory.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_INTEGERS_WORD_ALIGNED
-#error "ERROR: OSCL_INTEGERS_WORD_ALIGNED has to be defined to either 1 or 0."
-#endif
-
-/**
-\def OSCL_BYTE_ORDER_BIG_ENDIAN macro should be set to 1 if
-the target platform uses big-endian byte order in memory.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_BYTE_ORDER_BIG_ENDIAN
-#error "ERROR: OSCL_BYTE_ORDER_BIG_ENDIAN has to be defined to either 1 or 0."
-#endif
-
-/**
-\def OSCL_BYTE_ORDER_LITTLE_ENDIAN macro should be set to 1 if
-the target platform uses little-endian byte order in memory.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_BYTE_ORDER_LITTLE_ENDIAN
-#error "ERROR: OSCL_BYTE_ORDER_LITTLE_ENDIAN has to be defined to either 1 or 0."
-#endif
-
-/**
-\def Either OSCL_BYTE_ORDER_BIG_ENDIAN must be set to 1
-or else OSCL_BYTE_ORDER_LITTLE_ENDIAN must be set to 1.
-*/
-#if !(OSCL_BYTE_ORDER_BIG_ENDIAN) && !(OSCL_BYTE_ORDER_LITTLE_ENDIAN)
-#error "ERROR: either OSCL_BYTE_ORDER_LITTLE_ENDIAN or else OSCL_BYTE_ORDER_BIG_ENDIAN must be 1."
-#endif
-#if (OSCL_BYTE_ORDER_BIG_ENDIAN) && (OSCL_BYTE_ORDER_LITTLE_ENDIAN)
-#error "ERROR: either OSCL_BYTE_ORDER_LITTLE_ENDIAN or else OSCL_BYTE_ORDER_BIG_ENDIAN must be 1."
-#endif
-
-/**
-\def OSCL_HAS_GLOBAL_VARIABLE_SUPPORT macro should be set to 1 if
-the target platform allows global variable definitions.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_GLOBAL_VARIABLE_SUPPORT
-#error "ERROR: OSCL_HAS_GLOBAL_VARIABLE_SUPPORT has to be defined to either 1 or 0."
-#endif
-
-/**
-Note: only one byte order mode can be defined per platform.
-*/
-#if (OSCL_BYTE_ORDER_LITTLE_ENDIAN) && (OSCL_BYTE_ORDER_BIG_ENDIAN)
-#error "ERROR: Multiple selection for OSCL_BYTE_ORDER."
-#endif
-
-/**
-\def OSCL_HAS_ANSI_STRING_SUPPORT macro should be set to 1 if
-the target platform supports C standard string functions (string.h).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_ANSI_STRING_SUPPORT
-#error "ERROR: OSCL_HAS_ANSI_STRING_SUPPORT has to be defined to either 1 or 0."
-#endif
-
-/**
-\def OSCL_NATIVE_INT64_TYPE has to be defined to the native
-signed 64-bit integer type.
-*/
-#ifndef OSCL_NATIVE_INT64_TYPE
-#error "ERROR: OSCL_NATIVE_INT64_TYPE has to be defined."
-#endif
-
-/**
-\def OSCL_NATIVE_UINT64_TYPE has to be defined to the native
-unsigned 64-bit integer type.
-*/
-#ifndef OSCL_NATIVE_UINT64_TYPE
-#error "ERROR: OSCL_NATIVE_UINT64_TYPE has to be defined."
-#endif
-
-/**
-\def INT64(x) has to be defined to the expression for a signed
-64-bit literal.
-*/
-#ifndef INT64
-#error "ERROR: INT64(x) has to be defined."
-#endif
-
-/**
-\def UINT64(x) has to be defined to the expression for an unsigned
-64-bit literal.
-*/
-#ifndef UINT64
-#error "ERROR: UINT64(x) has to be defined."
-#endif
-
-/**
-\def INT64_HILO(high,low) has to be defined to an expression
-to create a signed 64-bit integer from 2 32-bit integers.
-*/
-#ifndef INT64_HILO
-#error "ERROR: INT64_HILO(high,low) has to be defined."
-#endif
-
-/**
-\def UINT64_HILO(high,low) has to be defined to an expression
-to create an unsigned 64-bit integer from 2 32-bit integers.
-*/
-#ifndef UINT64_HILO
-#error "ERROR: UINT64_HILO(high,low) has to be defined."
-#endif
-
-/**
-\def OSCL_MEMFRAG_PTR_BEFORE_LEN macro should be set to 1 if
-memory fragements data structures, such as used by sendmsg
-(i.e., the iovec data structures), should use ptr before length.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_MEMFRAG_PTR_BEFORE_LEN
-#error "ERROR: OSCL_MEMFRAG_PTR_BEFORE_LEN has to be defined to either 0 or 1"
-#endif
-
-/**
-\def OSCL_HAS_TLS_SUPPORT macro should be set to 1 if
-the target platform has thread-local storage functions.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_TLS_SUPPORT
-#error "ERROR: OSCL_HAS_TLS_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-\def OSCL_TLS_IS_KEYED macro should be set to 1 if
-the target platform's thread local storage function requires an
-input key value to uniquely identify the TLS.
-If the thread local storage function does not require any key,
-or thread local storage is not supported, it should be set to 0.
-*/
-#ifndef OSCL_TLS_IS_KEYED
-#error "ERROR: OSCL_TLS_IS_KEYED has to be defined to either 1 or 0"
-#endif
-
-
-/**
-When OSCL_TLS_IS_KEYED==1,
-\def OSCL_TLS_STORE_FUNC macro must be set to an expression that will
-set the TLS value and evalutes to true on success, false on failure.
-The macro takes 2 input parameters (key, ptr).
-*/
-#if (OSCL_TLS_IS_KEYED) && !defined(OSCL_TLS_STORE_FUNC)
-#error "ERROR: OSCL_TLS_STORE_FUNC has to be defined"
-#endif
-
-/**
-When OSCL_TLS_IS_KEYED==1,
-\def OSCL_TLS_GET_FUNC macro should be set to an expression that
-returns the TLS value.
-The macro takes 1 input parameter (key).
-*/
-#if (OSCL_TLS_IS_KEYED) && !defined(OSCL_TLS_GET_FUNC)
-#error "ERROR: OSCL_TLS_GET_FUNC has to be defined"
-#endif
-
-/**
-When OSCL_TLS_IS_KEYED==1,
-\def OSCL_TLS_GET_FUNC macro should be set to an expression that
-creates a TLS entry and evalutes to true on success, false on failure.
-The macro takes 1 input parameter (key).
-*/
-#if (OSCL_TLS_IS_KEYED) && !defined(OSCL_TLS_KEY_CREATE_FUNC)
-#error "ERROR: OSCL_TLS_KEY_CREATE_FUNC has to be defined"
-#endif
-
-/**
-When OSCL_TLS_IS_KEYED==1,
-\def OSCL_TLS_GET_FUNC macro should be set to an expression that
-deletes a TLS entry.
-The macro takes 1 input parameter (key).
-*/
-#if (OSCL_TLS_IS_KEYED) && !defined(OSCL_TLS_KEY_DELETE_FUNC)
-#error "ERROR: OSCL_TLS_KEY_DELETE_FUNC has to be defined"
-#endif
-
-
-/**
-When OSCL_TLS_IS_KEYED==0,
-\def OSCL_TLS_STORE_FUNC macro must be set to an expression that will
-set the TLS value and evalutes to true on success, false on failure.
-The macro takes 1 input parameter (ptr).
-*/
-#if (OSCL_HAS_TLS_SUPPORT) && !(OSCL_TLS_IS_KEYED) && !defined(OSCL_TLS_STORE_FUNC)
-#error "ERROR: OSCL_TLS_STORE_FUNC has to be defined"
-#endif
-
-/**
-When OSCL_TLS_IS_KEYED==0,
-\def OSCL_TLS_GET_FUNC macro should be set to an expression that
-returns the TLS value.
-*/
-#if (OSCL_HAS_TLS_SUPPORT) && !(OSCL_TLS_IS_KEYED) && !defined(OSCL_TLS_GET_FUNC)
-#error "ERROR: OSCL_TLS_GET_FUNC has to be defined"
-#endif
-
-/**
-OSCL_HAS_BASIC_LOCK should be set to 1 if the platform has basic lock support.
-*/
-#if !defined(OSCL_HAS_BASIC_LOCK )
-#error "ERROR: OSCL_HAS_BASIC_LOCK must be defined to 0 or 1"
-#endif
-
-
-/**
-When OSCL_HAS_BASIC_LOCK is 1,
-type TOsclBasicLockObject should be defined as the type used as
-a mutex object or handle on the target platform. It can
-be either typedef'd as a C-compilable type or can be #defined.
-Examples:
-typedef pthread_mutex_t TOsclBasicLockObject;
-#define TOsclBasicLockObject RMutex
-*/
-#if (OSCL_HAS_BASIC_LOCK) && !defined(TOsclBasicLockObject)
-typedef TOsclBasicLockObject __verify__TOsclBasicLockObject__defined__;
-#endif
-
-/**
-\def OSCL_HAS_PRAGMA_PACK macro should be set to 1 if the compiler supports
-pragma pack, 0 if it does not.
-*/
-#ifndef OSCL_HAS_PRAGMA_PACK
-#error "ERROR: OSCL_HAS_PRAGMA_PACK must be defined to 0 or 1"
-#endif
-
-/*! @} */
-
-#endif // OSCLCONFIG_CHECK_H_INCLUDED
-
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_compiler_warnings.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_compiler_warnings.h
deleted file mode 100644
index 28d741813f..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_compiler_warnings.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ C O M P I L E R _ W A R N I N G S
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_compiler_warnings.h
- * \brief This file contains the ability to turn off/on compiler warnings
- *
- */
-
-// This macro enables the "#pragma GCC system_header" found in any header file that
-// includes this config file.
-// "#pragma GCC system_header" suppresses compiler warnings in the rest of that header
-// file by treating the header as a system header file.
-// For instance, foo.h has 30 lines, "#pragma GCC system_header" is inserted at line 10,
-// from line 11 to the end of file, all compiler warnings are disabled.
-// However, this does not affect any files that include foo.h.
-//
-#ifdef __GNUC__
-#define OSCL_DISABLE_GCC_WARNING_SYSTEM_HEADER
-#endif
-
-#define OSCL_FUNCTION_PTR(x) (&x)
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_error.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_error.h
deleted file mode 100644
index 6cdf86c270..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_error.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ E R R O R
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_error.h
- * \brief This file contains the common typedefs and header files needed to compile osclerror
- *
- */
-
-
-#ifndef OSCLCONFIG_ERROR_H_INCLUDED
-#define OSCLCONFIG_ERROR_H_INCLUDED
-
-#ifndef OSCLCONFIG_H_INCLUDED
-#include "osclconfig.h"
-#endif
-
-#define OSCL_HAS_EXCEPTIONS 1
-#define OSCL_HAS_ERRNO_H 1
-#define OSCL_HAS_SYMBIAN_ERRORTRAP 0
-#define OSCL_HAS_SETJMP_H 1
-
-// system header files
-#include <setjmp.h>
-#include <errno.h>
-
-
-// confirm that all definitions have been defined
-#include "osclconfig_error_check.h"
-
-#endif // OSCLCONFIG_ERROR_H_INCLUDED
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_error_check.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_error_check.h
deleted file mode 100644
index 301181e89c..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_error_check.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-
-#ifndef OSCLCONFIG_ERROR_CHECK_H_INCLUDED
-#define OSCLCONFIG_ERROR_CHECK_H_INCLUDED
-
-
-/**
-OSCL_HAS_EXCEPTIONS macro should be set to 1 if
-the target platform supports C++ exceptions (throw, catch).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_EXCEPTIONS
-#error "ERROR: OSCL_HAS_EXCEPTIONS has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_EXCEPTIONS macro should be set to 1 if
-the target platform supports the POSIX-compliant errno.h header file.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_ERRNO_H
-#error "ERROR: OSCL_HAS_ERRNO_H has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_SYMBIAN_ERRORTRAP macro should be set to 1 if
-the target platform has Symbian leave, trap, and cleanup stack support.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SYMBIAN_ERRORTRAP
-#error "ERROR: OSCL_HAS_SYMBIAN_ERRORTRAP has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_SETJMP_H macro should be set to 1 if
-the target platform supports the setjmp.h header file including
-the setjmp and longjmp functions.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SETJMP_H
-#error "ERROR: OSCL_HAS_SETJMP_H has to be defined to either 1 or 0"
-#endif
-
-
-#endif //OSCLCONFIG_ERROR_CHECK_H_INCLUDED
-
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_global_new_delete.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_global_new_delete.h
deleted file mode 100644
index d3d0112007..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_global_new_delete.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-#ifndef OSCLCONFIG_GLOBAL_NEW_DELETE_H_INCLUDED
-#define OSCLCONFIG_GLOBAL_NEW_DELETE_H_INCLUDED
-
-//This file contains overloads for the global new/delete operators
-//for use in configurations without a native new/delete operator,
-//or where it is desirable to overload the existing global new/delete
-//operators. The implementation of the operators is in oscl_mem.cpp.
-
-void* operator new(size_t);
-void operator delete(void*);
-
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_global_placement_new.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_global_placement_new.h
deleted file mode 100644
index 4ab19e7aa3..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_global_placement_new.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-#ifndef OSCLCONFIG_GLOBAL_PLACEMENT_NEW_H_INCLUDED
-#define OSCLCONFIG_GLOBAL_PLACEMENT_NEW_H_INCLUDED
-
-//This file contains a definition of placement new operator
-//for use in configurations without a native placement new
-//operator definition.
-
-inline void* operator new(size_t, void* ptr)
-{
- return ptr;
-}
-
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_io.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_io.h
deleted file mode 100644
index bca1245588..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_io.h
+++ /dev/null
@@ -1,309 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ I O
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_io.h
- * \brief This file contains common typedefs based on the ANSI C limits.h header
- *
- * This header file should work for any ANSI C compiler to determine the
- * proper native C types to use for OSCL integer types.
- */
-
-
-#ifndef OSCLCONFIG_IO_H_INCLUDED
-#define OSCLCONFIG_IO_H_INCLUDED
-
-#ifndef OSCLCONFIG_H_INCLUDED
-#include "osclconfig.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <netdb.h>
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <sys/vfs.h>
-#include <dirent.h>
-//#include <glob.h>
-#if (OSCL_HAS_ANSI_STDLIB_SUPPORT)
-#if (OSCL_HAS_UNIX_SUPPORT)
-#include <sys/stat.h>
-#endif
-#endif
-
-//For File I/O
-#define OSCL_HAS_GLOB 0
-#define OSCL_HAS_ANSI_FILE_IO_SUPPORT 1
-#define OSCL_HAS_ANSI_64BIT_FILE_IO_SUPPORT 0
-#define OSCL_HAS_MSWIN_FILE_IO_SUPPORT 0
-#define OSCL_HAS_SYMBIAN_COMPATIBLE_IO_FUNCTION 0
-#define OSCL_HAS_NATIVE_FILE_CACHE_ENABLE 1
-#define OSCL_FILE_BUFFER_MAX_SIZE 32768
-#define OSCL_HAS_PV_FILE_CACHE 0
-#define OSCL_HAS_LARGE_FILE_SUPPORT 1
-
-//For Sockets
-#define OSCL_HAS_SYMBIAN_SOCKET_SERVER 0
-#define OSCL_HAS_SYMBIAN_DNS_SERVER 0
-#define OSCL_HAS_BERKELEY_SOCKETS 1
-#define OSCL_HAS_SOCKET_SUPPORT 1
-
-//basic socket types
-typedef int TOsclSocket;
-typedef struct sockaddr_in TOsclSockAddr;
-typedef socklen_t TOsclSockAddrLen;
-typedef struct ip_mreq TIpMReq;
-
-//Init addr macro, inet_addr returns an uint32
-#define OsclValidInetAddr(addr) (inet_addr(addr)!=INADDR_NONE)
-
-//address conversion macro-- from string to network address.
-#define OsclMakeSockAddr(sockaddr,port,addrstr,ok)\
- sockaddr.sin_family=OSCL_AF_INET;\
- sockaddr.sin_port=htons(port);\
- int32 result=inet_aton((const char*)addrstr,&sockaddr.sin_addr);\
- ok=(result!=0);
-
-//address conversion macro-- from network address to string
-#define OsclUnMakeSockAddr(sockaddr,addrstr)\
- addrstr=inet_ntoa(sockaddr.sin_addr);
-//address conversion macro-- from string to inaddr
-#define OsclMakeInAddr(in_addr,addrstr,ok)\
- int32 result = inet_aton((const char*)addrstr, &in_addr);\
- ok=(result!=0);
-
-//address conversion macro-- from inaddr to string
-#define OsclUnMakeInAddr(in_addr,addrstr)\
- addrstr=inet_ntoa(in_addr);
-
-//wrappers for berkeley socket calls
-#define OsclSetRecvBufferSize(s,val,ok,err) \
- ok=(setsockopt(s,SOL_SOCKET,SO_RCVBUF,(char*)&val, sizeof(int)) !=-1);\
- if (!ok)err=errno
-
-#define OsclBind(s,addr,ok,err)\
- TOsclSockAddr* tmpadr = &addr;\
- sockaddr* sadr = OSCL_STATIC_CAST(sockaddr*, tmpadr);\
- ok=(bind(s,sadr,sizeof(addr))!=(-1));\
- if (!ok)err=errno
-
-#define OsclSetSockOpt(s,optLevel,optName,optVal,optLen,ok,err)\
- ok=(setsockopt(s,optLevel,optName,OSCL_STATIC_CAST(const char*,optVal),optLen) != (-1));\
- if (!ok)err=errno
-#define OsclJoin(s,addr,ok,err)\
-{\
- struct ip_mreq mreq; \
- void* p = &addr; \
- ok=(bind(s,(sockaddr*)p,sizeof(addr))!=(-1));\
- mreq.imr_multiaddr.s_addr = addr.sin_addr.s_addr ; \
- mreq.imr_interface.s_addr = htonl(INADDR_ANY); \
- ok=(setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(struct ip_mreq))!=(-1)); \
- if (!ok)err=errno;\
-}
-
-
-#define OsclListen(s,size,ok,err)\
- ok=(listen(iSocket,qSize)!=(-1));\
- if (!ok)err=errno
-
-#define OsclAccept(s,accept_s,ok,err,wouldblock)\
- accept_s=accept(s,NULL,NULL);\
- ok=(accept_s!=(-1));\
- if (!ok){err=errno;wouldblock=(err==EAGAIN||err==EWOULDBLOCK);}
-
-#define OsclSetNonBlocking(s,ok,err)\
- ok=(fcntl(s,F_SETFL,O_NONBLOCK)!=(-1));\
- if (!ok)err=errno
-
-#define OsclShutdown(s,how,ok,err)\
- ok=(shutdown(iSocket,how)!=(-1));\
- if (!ok)err=errno
-
-#define OsclSocket(s,fam,type,prot,ok,err)\
- s=socket(fam,type,prot);\
- ok=(s!=(-1));\
- if (!ok)err=errno
-
-#define OsclSendTo(s,buf,len,addr,ok,err,nbytes,wouldblock)\
- TOsclSockAddr* tmpadr = &addr;\
- sockaddr* sadr = OSCL_STATIC_CAST(sockaddr*, tmpadr);\
- nbytes=sendto(s,(const void*)(buf),(size_t)(len),0,sadr,(socklen_t)sizeof(addr));\
- ok=(nbytes!=(-1));\
- if (!ok){err=errno;wouldblock=(err==EAGAIN||err==EWOULDBLOCK);}
-
-#define OsclSend(s,buf,len,ok,err,nbytes,wouldblock)\
- nbytes=send(s,(const void*)(buf),(size_t)(len),0);\
- ok=(nbytes!=(-1));\
- if (!ok){err=errno;wouldblock=(err==EAGAIN||err==EWOULDBLOCK);}
-
-#define OsclCloseSocket(s,ok,err)\
- ok=(close(s)!=(-1));\
- if (!ok)err=errno
-
-#define OsclConnect(s,addr,ok,err,wouldblock)\
- TOsclSockAddr* tmpadr = &addr;\
- sockaddr* sadr = OSCL_STATIC_CAST(sockaddr*, tmpadr);\
- ok=(connect(s,sadr,sizeof(addr))!=(-1));\
- if (!ok){err=errno;wouldblock=(err==EINPROGRESS);}
-#define OsclGetPeerName(s,name,namelen,ok,err)\
- ok=(getpeername(s,(sockaddr*)&name,(socklen_t*)&namelen) != (-1) );\
- if (!ok)err=errno
-
-#define OsclGetAsyncSockErr(s,ok,err)\
- int opterr;socklen_t optlen=sizeof(opterr);\
- ok=(getsockopt(s,SOL_SOCKET,SO_ERROR,(void *)&opterr,&optlen)!=(-1));\
- if(ok)err=opterr;else err=errno;
-
-#define OsclPipe(x) pipe(x)
-#define OsclReadFD(fd,buf,cnt) read(fd,buf,cnt)
-#define OsclWriteFD(fd,buf,cnt) write(fd,buf,cnt)
-
-//unix reports connect completion in write set in the getsockopt
-//error.
-#define OsclConnectComplete(s,wset,eset,success,fail,ok,err)\
- success=fail=false;\
- if (FD_ISSET(s,&eset))\
- {fail=true;OsclGetAsyncSockErr(s,ok,err);}\
- else if (FD_ISSET(s,&wset))\
- {OsclGetAsyncSockErr(s,ok,err);if (ok && err==0)success=true;else fail=true;}
-
-#define OsclRecv(s,buf,len,ok,err,nbytes,wouldblock)\
- nbytes=recv(s,(void *)(buf),(size_t)(len),0);\
- ok=(nbytes!=(-1));\
- if (!ok){err=errno;wouldblock=(err==EAGAIN);}
-
-#define OsclRecvFrom(s,buf,len,paddr,paddrlen,ok,err,nbytes,wouldblock)\
-{\
-void* p=paddr;\
-nbytes=recvfrom(s,(void*)(buf),(size_t)(len),0,(struct sockaddr*)p,paddrlen);\
- ok=(nbytes!=(-1));\
- if (!ok){err=errno;wouldblock=(err==EAGAIN);}\
-}
-
-
-#define OsclSocketSelect(nfds,rd,wr,ex,timeout,ok,err,nhandles)\
- nhandles=select(nfds,&rd,&wr,&ex,&timeout);\
- ok=(nhandles!=(-1));\
- if (!ok)err=errno
-
-//there's not really any socket startup needed on unix, but
-//you need to define a signal handler for SIGPIPE to avoid
-//broken pipe crashes.
-#define OsclSocketStartup(ok)\
- signal(SIGPIPE,SIG_IGN);\
- ok=true
-
-#define OsclSocketCleanup(ok)\
- signal(SIGPIPE,SIG_DFL);\
- ok=true
-
-//hostent type
-typedef struct hostent TOsclHostent;
-
-//wrapper for gethostbyname
-#define OsclGethostbyname(name,hostent,ok,err)\
- hostent=gethostbyname((const char*)name);\
- ok=(hostent!=NULL);\
- if (!ok)err=errno;
-
-//extract dotted address from a hostent
-#define OsclGetDottedAddr(hostent,dottedaddr,ok)\
- long *_hostaddr=(long*)hostent->h_addr_list[0];\
- struct in_addr _inaddr;\
- _inaddr.s_addr=*_hostaddr;\
- dottedaddr=inet_ntoa(_inaddr);\
- ok=(dottedaddr!=NULL);
-
-//extract dotted address from a hostent into the vector of OsclNetworkAddress
-#define OsclGetDottedAddrVector(hostent,dottedaddr,dottedaddrvect,ok)\
- if(dottedaddrvect)\
- {\
- long **_addrlist=(long**)hostent->h_addr_list;\
- for(int i = 0; _addrlist[i] != NULL; i++){\
- struct in_addr _inaddr;\
- _inaddr.s_addr=*_addrlist[i];\
- OsclNetworkAddress addr(inet_ntoa(_inaddr), 0);\
- dottedaddrvect->push_back(addr);\
- }\
- if (!dottedaddrvect->empty())\
- {dottedaddr->port = dottedaddrvect->front().port; dottedaddr->ipAddr.Set(dottedaddrvect->front().ipAddr.Str());}\
- ok=(!dottedaddrvect->empty() && (((*dottedaddrvect)[0]).ipAddr.Str() != NULL));\
- }\
- else\
- {\
- char *add;\
- OsclGetDottedAddr(hostent,add,ok);\
- if(ok) dottedaddr->ipAddr.Set(add);\
- }
-
-//socket shutdown codes
-#define OSCL_SD_RECEIVE SHUT_RD
-#define OSCL_SD_SEND SHUT_WR
-#define OSCL_SD_BOTH SHUT_RDWR
-
-//address family codes
-#define OSCL_AF_INET AF_INET
-
-//socket type codes
-#define OSCL_SOCK_STREAM SOCK_STREAM
-#define OSCL_SOCK_DATAGRAM SOCK_DGRAM
-
-//IP protocol codes
-#define OSCL_IPPROTO_IP IPPROTO_IP
-#define OSCL_IPPROTO_TCP IPPROTO_TCP
-#define OSCL_IPPROTO_UDP IPPROTO_UDP
-
-//Socket option Levels
-#define OSCL_SOL_SOCKET SOL_SOCKET
-#define OSCL_SOL_IP IPPROTO_IP
-#define OSCL_SOL_TCP IPPROTO_TCP
-#define OSCL_SOL_UDP IPPROTO_UDP
-
-//Socket Option Values (level = IP)
-#define OSCL_SOCKOPT_IP_MULTICAST_TTL IP_MULTICAST_TTL
-#define OSCL_SOCKOPT_IP_ADDMEMBERSHIP IP_ADD_MEMBERSHIP
-#define OSCL_SOCKOPT_IP_TOS IP_TOS
-
-//Socket Option Values (level = Socket)
-#define OSCL_SOCKOPT_SOL_REUSEADDR SO_REUSEADDR
-//End sockets
-
-// file IO support
-#if (OSCL_HAS_LARGE_FILE_SUPPORT)
-typedef off64_t TOsclFileOffset;
-#else
-typedef int32 TOsclFileOffset;
-#endif
-
-#include "osclconfig_io_check.h"
-
-#endif
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_io_check.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_io_check.h
deleted file mode 100644
index 22ddebbd10..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_io_check.h
+++ /dev/null
@@ -1,605 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-#ifndef OSCLCONFIG_IO_CHECK_H_INCLUDED
-#define OSCLCONFIG_IO_CHECK_H_INCLUDED
-
-/**
-OSCL_HAS_ANSI_FILE_IO_SUPPORT macro should be set to 1 if
-the target platform supports the ANSI C file I/O functions (fopen, fread, etc).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_ANSI_FILE_IO_SUPPORT
-#error "ERROR: OSCL_HAS_ANSI_FILE_IO_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_ANSI_64BIT_FILE_IO_SUPPORT macro should be set to 1 if
-the target platform supports the 64-bit ANSI C file I/O functions (fopen, fread, etc).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_ANSI_64BIT_FILE_IO_SUPPORT
-#error "ERROR: OSCL_HAS_ANSI_64BIT_FILE_IO_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_MSWIN_FILE_IO_SUPPORT macro should be set to 1 if
-the target platform supports the ANSI C file I/O functions (fopen, fread, etc).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_MSWIN_FILE_IO_SUPPORT
-#error "ERROR: OSCL_HAS_MSWIN_FILE_IO_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_SYMBIAN_COMPATIBLE_IO_FUNCTION macro should be set to 1 if
-the target platform supports the Symbian file I/O functions (RFile, RFs).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SYMBIAN_COMPATIBLE_IO_FUNCTION
-#error "ERROR: OSCL_HAS_SYMBIAN_COMPATIBLE_IO_FUNCTION has to be defined to either 1 or 0"
-#endif
-
-/**
-On Symbian platforms only:
-OSCL_HAS_NATIVE_DUPLICATE_FILE_HANDLE macro should be set to 1 if
-the target platform supports the Symbian file I/O function RFile::Duplicate.
-Otherwise it should be set to 0.
-*/
-#if (OSCL_HAS_SYMBIAN_COMPATIBLE_IO_FUNCTION)
-#ifndef OSCL_HAS_NATIVE_DUPLICATE_FILE_HANDLE
-#error "ERROR: OSCL_HAS_NATIVE_DUPLICATE_FILE_HANDLE has to be defined to either 1 or 0"
-#endif
-#endif
-
-
-/**
-OSCL_HAS_NATIVE_FILE_CACHE_ENABLE macro should be set to 1 if
-the target platform includes native file cache capability.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_NATIVE_FILE_CACHE_ENABLE
-#error "ERROR: OSCL_HAS_NATIVE_FILE_CACHE_ENABLE has to be defined to either 1 or 0"
-#endif
-
-
-/**
-OSCL_HAS_PV_FILE_CACHE macro should be set to 1 if
-the target platform includes PV file cache capability.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_PV_FILE_CACHE
-#error "ERROR: OSCL_HAS_PV_FILE_CACHE has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_LARGE_FILE_SUPPORT macro should be set to 1 if
-the target platform supports more than 32bit file I/O capability.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_LARGE_FILE_SUPPORT
-#error "ERROR: OSCL_HAS_LARGE_FILE_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-type TOsclFileOffset should be defined as the type used for file size
-and offsets on the target platform.
-Example:
-typedef size_t TOsclFileOffset;
-*/
-typedef TOsclFileOffset __verify__TOsclFileOffset__defined__;
-
-
-/**
-OSCL_FILE_BUFFER_MAX_SIZE macro should be set to
-the desired size of the file I/O cache in bytes.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_FILE_BUFFER_MAX_SIZE
-#error "ERROR: OSCL_FILE_BUFFER_MAX_SIZE has to be defined to a numeric value"
-#endif
-
-/**
-OSCL_HAS_SOCKET_SUPPORT macro should be set to 1 if
-the target platform supports sockets of any type.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SOCKET_SUPPORT
-#error "ERROR: OSCL_HAS_SOCKET_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_SYMBIAN_SOCKET_SERVER macro should be set to
-1 if the platform supports Symbian socket API (RSocket, RSocketServ).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SYMBIAN_SOCKET_SERVER
-#error "ERROR: OSCL_HAS_SYMBIAN_SOCKET_SERVER has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_SYMBIAN_DNS_SERVER macro should be set to
-1 if the platform supports Symbian Host Resolver API (RHostResolver).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SYMBIAN_DNS_SERVER
-#error "ERROR: OSCL_HAS_SYMBIAN_DNS_SERVER has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_BERKELEY_SOCKETS macro should be set to
-1 if the platform supports Berkeley style socket API, including
-non-blocking I/O and a 'select' call.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_BERKELEY_SOCKETS
-#error "ERROR: OSCL_HAS_BERKELEY_SOCKETS has to be defined to either 1 or 0"
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-TOsclSocket typedef should be set to platform native socket type.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-typedef TOsclSocket __TOsclSocketCheck___;
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-TOsclSockAddr typedef should be set to platform native socket address type.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-typedef TOsclSockAddr __TOsclSockAddrCheck___;
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-TOsclSockAddrLen typedef should be set to platform native socket address
-length type.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-typedef TOsclSockAddrLen __TOsclSockAddrLenCheck___;
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclBind(s,addr,ok,err) must be defined to
-an expression that does a bind call.
-'s' and 'addr' are the socket and address parameters
-to the bind command.
-On success, 'ok' must be set to true.
-On failure, 'ok' must be set to false and 'err' must be set
-to the bind error.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclBind
-#error "ERROR: OsclBind(s,addr,ok,err) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclListen(s,size,ok,err) must be defined to
-an expression that does a listen call and sets 'ok' and 'err'
-to indicate the result.
-'s' and 'size' are the socket and queue size args to the listen
-call.
-On success, 'ok' must be set to true.
-On failure, 'ok' must be set to false and 'err' must be set
-to the listen error.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclListen
-#error "ERROR: OsclListen(s,size,ok,err) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclAccept(s,accept_s,ok,err,wouldblock) must be defined to
-an expression that does an accept call and sets 'ok', 'err',
-and 'wouldblock' to indicate the result.
-'s' and 'accept_s' are the socket and accept socket args to the
-accept call.
-On success, 'ok' must be set to true.
-On failure, 'ok' must be set to false and 'err' must be set
-to the accept error. Additionally 'wouldblock' must be set to true
-if the error code indicates that the socket is non-blocking and
-would block, or to false otherwise.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclAccept
-#error "ERROR: OsclAccept(s,accept_s,ok,err,wouldblock) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclSetNonBlocking(s,ok,err) must be defined to
-an expression that sets socket 's' to non-blocking I/O mode
-and sets 'ok' and 'err' to indicate the result.
-On success, 'ok' must be set to true.
-On failure, 'ok' must be set to false and 'err' must be set
-to the error.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclSetNonBlocking
-#error "ERROR: OsclSetNonBlocking(s,ok,err) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclShutdown(s,how,ok,err) must be defined to
-an expression that does a shutdown call and sets 'ok' and 'err'
-to indicate the result.
-'s' and 'how' are the socket and shutdown type args to the
-shutdown call.
-On success, 'ok' must be set to true.
-On failure, 'ok' must be set to false and 'err' must be set
-to the shutdown error.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclShutdown
-#error "ERROR: OsclShutdown(s,how,ok,err) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclSocket(s,fam,type,prot,ok,err) must be defined to
-an expression that does a socket creation call and sets 'ok'
-and 'err' to indicate the result.
-'s', 'fam', 'type', and 'prot' are the socket, family, type, and
-protocol args to the socket call.
-On success, 'ok' must be set to true.
-On failure, 'ok' must be set to false and 'err' must be set
-to the socket error.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclSocket
-#error "ERROR: OsclSocket(s,fam,type,prot,ok,err) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclSendTo(s,buf,len,addr,ok,err,nbytes,wouldblock) must be defined
-to an expression that does a sendto call and sets 'ok, 'err', 'nbytes',
-and 'wouldblock' to indicate the result.
-'s', 'buf', 'len', 'flags' and 'addr' are the arguments to the sendto
-call.
-On success, 'ok' must be set to true, and 'nbytes' must be set to
-the number of bytes sent.
-On failure, 'ok' must be set to false 'err' must be set
-to the socket error. Additionally 'wouldblock' must be set to true
-if the error code indicates that the socket is non-blocking and
-would block, or to false otherwise.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclSendTo
-#error "ERROR: OsclSendTo(s,buf,len,flags,addr,ok,err,nbytes,wouldblock) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclSend(s,buf,len,ok,err,nbytes,wouldblock) must be defined to
-an expression that does a send operation and sets 'ok, 'err', 'nbytes',
-and 'wouldblock' to indicate the result.
-'s', 'buf', and 'len' are the args to the send call.
-On success, 'ok' must be set to true, and 'nbytes' must be set to
-the number of bytes sent.
-On failure, 'ok' must be set to false 'err' must be set
-to the socket error. Additionally 'wouldblock' must be set to true
-if the error code indicates that the socket is non-blocking and
-would block, or to false otherwise.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclSend
-#error "ERROR: OsclSend(s,buf,len,ok,err,nbytes,wouldblock) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclCloseSocket(s,ok,err) must be defined to
-an expression that closes socket 's' and sets 'ok and 'err'
-to indicate the result.
-On success, 'ok' must be set to true.
-On failure, 'ok' must be set to false and 'err' must be set
-to the close error.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclCloseSocket
-#error "ERROR: OsclCloseSocket(s,ok,err) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclConnect(s,addr,ok,err,wouldblock) must be defined to
-an expression that does a connect call and sets 'ok', 'err',
-and 'wouldblock' to indicate the result.
-'s' and 'addr' are the socket and address args to the connect call.
-On success, 'ok' must be set to true.
-On failure, 'ok' must be set to false 'err' must be set
-to the socket error. Additionally 'wouldblock' must be set to true
-if the error code indicates that the socket is non-blocking and
-would block, or to false otherwise.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclConnect
-#error "ERROR: OsclConnect(s,addr,ok,err,wouldblock) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclConnectComplete(s,wset,eset,success,fail,ok,err) must be set
-to an expression that checks for completion of a connect operation
-on a non-blocking socket and sets 'success', 'fail', 'ok', and 'err'
-to indicate the result.
-'s' is the socket, 'wset' is the write set from the select call,
-'eset' is the exception set from the select call.
-If connect is not yet complete, 'success' and 'fail' must be
-set false.
-On connect success, 'success' must be set true.
-On conneect failure, 'success' must be set false, 'fail' must be
-set true. Additionally, the call attempts to retrieve the connect error.
-If the connect error is obtained, 'ok' is set true and 'err' contains
-the error. If the connect error is not obtained, 'ok' is set false
-and 'err' is the error code from the attempt.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclConnectComplete
-#error "ERROR: OsclConnectComplete(s,wset,eset,success,fail,ok,err) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclRecv(s,buf,len,ok,err,nbytes,wouldblock) must be defined to
-an expression that does a recv call and sets 'ok', 'err', 'nbytes',
-and 'wouldblock' to indicate the result.
-'s', 'buf', and 'len' are the arguments to the recv call.
-On success, 'ok' must be set to true, and 'nbytes' must be set to
-the number of bytes received.
-On failure, 'ok' must be set to false 'err' must be set
-to the socket error. Additionally 'wouldblock' must be set to true
-if the error code indicates that the socket is non-blocking and
-would block, or to false otherwise.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclRecv
-#error "ERROR: OsclRecv(s,buf,len,ok,err,nbytes,wouldblock) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclRecvFrom(s,buf,len,addr,addrlen,ok,err,nbytes,wouldblock) must be defined to
-an expression that does a recvfrom call and sets 'ok', 'err', 'nbytes',
-and 'wouldblock' to indicate the result.
-'s', 'buf', 'len', 'paddr', and 'paddrlen' are the arguments to the recvfrom call.
-On success, 'ok' must be set to true, 'nbytes' must be set to
-the number of bytes received, and 'paddr' must be set to the source address.
-On failure, 'ok' must be set to false 'err' must be set
-to the socket error. Additionally 'wouldblock' must be set to true
-if the error code indicates that the socket is non-blocking and
-would block, or to false otherwise.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclRecvFrom
-#error "ERROR: OsclRecvFrom(s,buf,len,paddr,paddrlen,ok,err,nbytes,wouldblock) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclSocketSelect(nfds,rd,wr,ex,timeout,ok,err,nhandles) must be defined to
-an expression that does a select call and sets 'ok', 'err', and
-'nhandles' to indicate the result.
-'nfds', 'rd', 'wr', 'ex', and 'timeout' are the arguments to the
-select call.
-On success, 'ok' must be set to true, and 'nhandles' must be set to
-the number of socket handles with activitiy detected.
-On failure, 'ok' must be set to false 'err' must be set
-to the select error.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclSocketSelect
-#error "ERROR: OsclSocketSelect(nfds,rd,wr,ex,timeout,ok,err,nhandles) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclSocketStartup(ok) must be defined to
-an expression that does any necessary startup of the socket system
-and sets 'ok' to indicate the result.
-On success, 'ok' must be set to true.
-On failure, 'ok' must be set to false.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclSocketStartup
-#error "ERROR: OsclSocketStartup(ok) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclSocketCleanup(ok) must be defined to
-an expression that does any necessary cleanup of the socket system
-and sets 'ok' to indicate the result.
-On success, 'ok' must be set to true.
-On failure, 'ok' must be set to false.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclSocketCleanup
-#error "ERROR: OsclSocketCleanup(ok) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclGetAsyncSockErr(s,ok,err) must be defined to
-an expression that does a getsockopt call to retrieve a socket error
-and sets 'ok' and 'err' to indicate the result.
-'s' is the socket argument to the getsockopt call.
-On success, 'ok' must be set true and 'err' must be set to the
-error retrieved.
-On failure, 'ok' must be set false and 'err' must be set to the
-error from the getsockopt call.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclGetAsyncSockErr
-#error "ERROR: OsclGetAsyncSockErr(s,ok,err) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-TOsclHostent typedef should be set to platform native hostent type.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-typedef TOsclHostent __TOsclHostentCheck___;
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclGethostbyname(name,hostent,ok,err) must be defined to
-an expression that does a gethostbyname call on host 'name'
-and sets 'hostent', 'ok' and 'err' to indicate the result.
-'name' is the name argument to the gethostbyname call.
-On success, 'ok' must be set true and 'hostent' must be set to
-the TOsclHostent* retrieved.
-On failure, 'ok' must be set false and 'err' must be set to the
-error from the gethostbyname call.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclGethostbyname
-#error "ERROR: OsclGethostbyname(name,hostent,ok,err) has to be defined"
-#endif
-#endif
-
-/**
-For platforms with Berkeley type sockets,
-OsclGetDottedAddr(hostent,dottedaddr,ok) must be defined to
-an expression that does extracts an address in dotted decimal
-notation from a hostent structure.
-'hostent' is the TOsclHostent*,
-'dottedaddr' is a char* output containing the dotted address,
-and 'ok' is a bool that should be set true on success, false on failure.
-*/
-#if OSCL_HAS_BERKELEY_SOCKETS
-#ifndef OsclGetDottedAddr
-#error "ERROR: OsclGetDottedAddr(hostent,dottedaddr,ok) has to be defined"
-#endif
-#endif
-
-
-/**
-For platforms in which file descriptors created with a pipe() command can be
-used with the select() system call the following 3 macros must be defined
-*/
-
-#if OSCL_HAS_SELECTABLE_PIPES
-#ifndef OsclPipe
-#error "ERROR: OsclPipe(pipearray) has to be defined"
-#endif
-#endif
-
-#if OSCL_HAS_SELECTABLE_PIPES
-#ifndef OsclReadFD
-#error "ERROR: OsclReadFD(fd,buffer,cnt) has to be defined"
-#endif
-#endif
-
-#if OSCL_HAS_SELECTABLE_PIPES
-#ifndef OsclWriteFD
-#error "ERROR: OsclWriteFD(fd,buffer,cnt) has to be defined"
-#endif
-#endif
-
-#if OSCL_HAS_SOCKET_SUPPORT
-/**
-OsclValidInetAddr must be defined to a boolean expression to
-evaluate whether an address is proper IP4 format.
-'addr' is a char* containing the address string.
-*/
-#ifndef OsclValidInetAddr
-#error "ERROR: OsclValidInetAddr(addr) must be defined"
-#endif
-#endif
-
-#if OSCL_HAS_SOCKET_SUPPORT
-/**
-OSCL_SD_RECEIVE, OSCL_SD_SEND, and OSCL_SD_BOTH must be defined to
-the platform-specific socket shutdown codes.
-*/
-#ifndef OSCL_SD_RECEIVE
-#error "ERROR: OSCL_SD_RECEIVE has to be defined"
-#endif
-#ifndef OSCL_SD_SEND
-#error "ERROR: OSCL_SD_SEND has to be defined"
-#endif
-#ifndef OSCL_SD_BOTH
-#error "ERROR: OSCL_SD_BOTH has to be defined"
-#endif
-#endif
-
-#if OSCL_HAS_SOCKET_SUPPORT
-/**
-OSCL_AF_INET must be defined to the platform-specific
-network address family codes for INET.
-*/
-#ifndef OSCL_AF_INET
-#error "ERROR: OSCL_AF_INET has to be defined"
-#endif
-#endif
-
-#if OSCL_HAS_SOCKET_SUPPORT
-/**
-OSCL_SOCK_STREAM and OSCL_SOCK_DATAGRAM must be defined to
-the platform-specific socket type codes.
-*/
-#ifndef OSCL_SOCK_STREAM
-#error "ERROR: OSCL_SOCK_STREAM has to be defined"
-#endif
-#ifndef OSCL_SOCK_DATAGRAM
-#error "ERROR: OSCL_SOCK_DATAGRAM has to be defined"
-#endif
-#endif
-
-#if OSCL_HAS_SOCKET_SUPPORT
-/**
-OSCL_IPPROTO_TCP and OSCL_IPPROTO_UDP must be defined to
-the platform-specific IP protocol codes.
-*/
-#ifndef OSCL_IPPROTO_TCP
-#error "ERROR: OSCL_IPPROTO_TCP has to be defined"
-#endif
-#ifndef OSCL_IPPROTO_UDP
-#error "ERROR: OSCL_IPPROTO_UDP has to be defined"
-#endif
-#endif
-
-
-#endif // OSCLCONFIG_IO_CHECK_H_INCLUDED
-
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_ix86.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_ix86.h
deleted file mode 100644
index 87d7afb43f..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_ix86.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G ( P L A T F O R M C O N F I G I N F O )
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_ix86.h
- * \brief This file contains configuration information for the ix86 processor family
- *
- */
-
-#ifndef OSCLCONFIG_IX86_H_INCLUDED
-#define OSCLCONFIG_IX86_H_INCLUDED
-
-
-// Define macros for integer alignment and little endian byte order.
-#define OSCL_INTEGERS_WORD_ALIGNED 1
-#define OSCL_BYTE_ORDER_BIG_ENDIAN 0
-#define OSCL_BYTE_ORDER_LITTLE_ENDIAN 1
-
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_lib.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_lib.h
deleted file mode 100644
index ee71a6ad52..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_lib.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ L I B ( P L A T F O R M C O N F I G I N F O )
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_lib.h
- \brief This file contains configuration information for the ANSI build.
-
-*/
-
-#ifndef OSCLCONFIG_LIB_H_INCLUDED
-#define OSCLCONFIG_LIB_H_INCLUDED
-
-
-
-//Set this to 1 to indicate this platform has oscllib support
-#define OSCL_HAS_RUNTIME_LIB_LOADING_SUPPORT 1
-#define PV_RUNTIME_LIB_FILENAME_EXTENSION "so"
-
-//Set this to 1 to enable looking for debug versions of libraries.
-//Use #ifndef to allow the compiler setting to override this definition
-#ifndef OSCL_LIB_READ_DEBUG_LIBS
-#if (OSCL_RELEASE_BUILD)
-#define OSCL_LIB_READ_DEBUG_LIBS 0
-#else
-#define OSCL_LIB_READ_DEBUG_LIBS 1
-#endif
-#endif
-
-// The path recursively from which the config files are picked up
-#ifndef PV_DYNAMIC_LOADING_CONFIG_FILE_PATH
-#ifdef ANDROID
-#define PV_DYNAMIC_LOADING_CONFIG_FILE_PATH "/system/etc"
-#else
-#define PV_DYNAMIC_LOADING_CONFIG_FILE_PATH "./"
-#endif
-#endif
-
-// check all osclconfig required macros are defined
-#include "osclconfig_lib_check.h"
-
-#endif // OSCLCONFIG_LIB_H_INCLUDED
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_lib_check.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_lib_check.h
deleted file mode 100644
index e4f7479eab..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_lib_check.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-
-#ifndef OSCLCONFIG_LIB_CHECK_H_INCLUDED
-#define OSCLCONFIG_LIB_CHECK_H_INCLUDED
-
-/*! \addtogroup osclconfig OSCL config
- *
- * @{
- */
-
-
-
-/**
-OSCL_HAS_RUNTIME_LIB_LOADING_SUPPORT should be set to 1 if the platform has basic explicit runtime DLL loading support.
-*/
-#if !defined(OSCL_HAS_RUNTIME_LIB_LOADING_SUPPORT )
-#error "ERROR: OSCL_HAS_RUNTIME_LIB_LOADING_SUPPORT must be defined to 0 or 1"
-#endif
-
-#if(OSCL_HAS_RUNTIME_LIB_LOADING_SUPPORT)
-/**
-** When OSCL_HAS_RUNTIME_LIB_LOADING_SUPPORT is 1,
-** OSCL_LIB_READ_DEBUG_LIBS should be set to 0 or 1. Set to 1 to enable loading
-** debug versions of libs.
-*/
-#if !defined(OSCL_LIB_READ_DEBUG_LIBS)
-#error "ERROR: OSCL_LIB_READ_DEBUG_LIBS must be defined to 0 or 1"
-#endif
-
-/*
-** When OSCL_HAS_RUNTIME_LIB_LOADING_SUPPORT is 1,
-** PV_DYNAMIC_LOADING_CONFIG_FILE_PATH should be set.
-*/
-#if !defined(PV_DYNAMIC_LOADING_CONFIG_FILE_PATH)
-#error "ERROR: PV_DYNAMIC_LOADING_CONFIG_FILE_PATH must be set to a path where the config files are expected to be present"
-#endif
-
-/*
-** When OSCL_HAS_RUNTIME_LIB_LOADING_SUPPORT is 1,
-** PV_RUNTIME_LIB_FILENAME_EXTENSION should be set.
-*/
-#if !defined(PV_RUNTIME_LIB_FILENAME_EXTENSION)
-#error "ERROR: PV_RUNTIME_LIB_FILENAME_EXTENSION must be specified for use as the dynamic library file extension"
-#endif
-#endif // OSCL_HAS_RUNTIME_LIB_LOADING_SUPPORT
-
-/*! @} */
-
-#endif // OSCLCONFIG_LIB_CHECK_H_INCLUDED
-
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_limits_typedefs.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_limits_typedefs.h
deleted file mode 100644
index 4ce355dfa4..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_limits_typedefs.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G_ L I M I T S _ T Y P E D E F S
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_limits_typedefs.h
- * \brief This file contains common typedefs based on the ANSI C limits.h header
- *
- * This header file should work for any ANSI C compiler to determine the
- * proper native C types to use for OSCL integer types.
- */
-
-
-#ifndef OSCLCONFIG_LIMITS_TYPEDEFS_H_INCLUDED
-#define OSCLCONFIG_LIMITS_TYPEDEFS_H_INCLUDED
-
-
-#include <limits.h>
-
-// determine if char is signed or unsigned
-#if ( CHAR_MIN == 0 )
-#define OSCL_CHAR_IS_UNSIGNED 1
-#define OSCL_CHAR_IS_SIGNED 0
-#elif ( CHAR_MIN == SCHAR_MIN )
-#define OSCL_CHAR_IS_UNSIGNED 0
-#define OSCL_CHAR_IS_SIGNED 1
-#else
-#error "Cannot determine if char is signed or unsigned"
-#endif
-
-
-#if ( (CHAR_MAX == 255) || (CHAR_MAX == 127) )
-typedef signed char int8;
-typedef unsigned char uint8;
-#else
-#error "Cannot determine an 8-bit interger type"
-#endif
-
-
-#if ( SHRT_MAX == 32767 )
-typedef short int16;
-typedef unsigned short uint16;
-
-#elif ( INT_MAX == 32767 )
-typedef int int16;
-typedef unsigned int uint16;
-
-#else
-#error "Cannot determine 16-bit integer type"
-#endif
-
-
-
-#if ( INT_MAX == 2147483647 )
-typedef int int32;
-typedef unsigned int uint32;
-
-#elif ( LONG_MAX == 2147483647 )
-typedef long int32;
-typedef unsigned long uint32;
-
-#else
-#error "Cannot determine 32-bit integer type"
-#endif
-
-
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_memory.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_memory.h
deleted file mode 100644
index b5c69d04ef..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_memory.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ M E M O R Y
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-
-
-#ifndef OSCLCONFIG_MEMORY_H_INCLUDED
-#define OSCLCONFIG_MEMORY_H_INCLUDED
-
-
-#ifndef OSCLCONFIG_H_INCLUDED
-#include "osclconfig.h"
-#endif
-
-#ifndef OSCLCONFIG_ANSI_MEMORY_H_INCLUDED
-#include "osclconfig_ansi_memory.h"
-#endif
-
-/* OSCL_HAS_GLOBAL_NEW_DELETE - Enables or disables the definition of overloaded
- * global memory operators in oscl_mem.h
- *
- * Release Mode: OSCL_HAS_GLOBAL_NEW_DELETE 0
- * Debug Mode: OSCL_HAS_GLOBAL_NEW_DELETE 1
- */
-
-
-#if (OSCL_RELEASE_BUILD)
-#define OSCL_BYPASS_MEMMGT 1
-#define OSCL_HAS_GLOBAL_NEW_DELETE 0
-#else
-#define OSCL_BYPASS_MEMMGT 1 //Temporarily disabling
-#define OSCL_HAS_GLOBAL_NEW_DELETE 1
-#endif
-
-/* PVMEM_INST_LEVEL - Memory leak instrumentation level enables the compilation
- * of detailed memory leak info (filename + line number).
- * PVMEM_INST_LEVEL 0: Release mode.
- * PVMEM_INST_LEVEL 1: Debug mode.
- */
-
-#if(OSCL_RELEASE_BUILD)
-#define PVMEM_INST_LEVEL 0
-#else
-#define PVMEM_INST_LEVEL 1
-#endif
-
-#if(OSCL_HAS_GLOBAL_NEW_DELETE)
-//Detect if <new> or <new.h> is included anyplace to avoid a compile error.
-#if defined(_INC_NEW)
-#error Duplicate New Definition!
-#endif //_INC_NEW
-#if defined(_NEW_)
-#error Duplicate New Definition!
-#endif //_NEW_
-#endif //OSCL_HAS_GLOBAL_NEW_DELETE
-
-#ifdef __cplusplus
-#include <new> //for placement new
-#endif //__cplusplus
-
-//OSCL_HAS_HEAP_BASE_SUPPORT - Enables or disables overloaded memory operators in HeapBase class
-#define OSCL_HAS_HEAP_BASE_SUPPORT 1
-
-#define OSCL_HAS_SYMBIAN_MEMORY_FUNCS 0
-
-
-#include "osclconfig_memory_check.h"
-
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_memory_check.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_memory_check.h
deleted file mode 100644
index 8903111292..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_memory_check.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-
-#ifndef OSCLCONFIG_MEMORY_CHECK_H_INCLUDED
-#define OSCLCONFIG_MEMORY_CHECK_H_INCLUDED
-
-
-/**
-OSCL_BYPASS_MEMMGT macro should be set to 1 if
-it is desirable to bypass the PV memory management system and just
-use the native memory management.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_BYPASS_MEMMGT
-#error "ERROR: OSCL_BYPASS_MEMMGT has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_ANSI_MEMORY_FUNCS macro should be set to 1 if
-the target platform supports ANSI C memory functions (malloc, free, etc).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_ANSI_MEMORY_FUNCS
-#error "ERROR: OSCL_HAS_ANSI_MEMORY_FUNCS has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_SYMBIAN_MEMORY_FUNCS macro should be set to 1 if
-the target platform supports Symbian memory functions User::Alloc, User::Free, etc.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SYMBIAN_MEMORY_FUNCS
-#error "ERROR: OSCL_HAS_SYMBIAN_MEMORY_FUNCS has to be defined to either 1 or 0"
-#endif
-
-/*
- * OSCL_HAS_HEAP_BASE_SUPPORT macro should be set to 1 for the
- * platforms that allows inheritance from HeapBase class for
- * overloading of new/delete operators.
- */
-
-#ifndef OSCL_HAS_HEAP_BASE_SUPPORT
-#error "ERROR: OSCL_HAS_HEAP_BASE_SUPPORT has to be defined to either 1 or 0."
-#endif
-
-/*
- * OSCL_HAS_GLOBAL_NEW_DELETE macro should be set to 1 for the
- * platforms that allows overloading of new/delete operators.
- */
-
-#ifndef OSCL_HAS_GLOBAL_NEW_DELETE
-#error "ERROR: OSCL_HAS_GLOBAL_NEW_DELETE has to be defined to either 1 or 0."
-#endif
-
-#endif // OSCLCONFIG_MEMORY_CHECK_H_INCLUDED
-
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_no_os.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_no_os.h
deleted file mode 100644
index c1a06e3316..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_no_os.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-
-#ifndef OSCLCONFIG_NO_OS_H_INCLUDED
-#define OSCLCONFIG_NO_OS_H_INCLUDED
-
-/*! \addtogroup osclconfig OSCL config
- *
- * @{
- */
-
-//a file to turn off ALL os-specific switches.
-
-//osclconfig
-#define OSCL_HAS_UNIX_SUPPORT 0
-#define OSCL_HAS_MSWIN_SUPPORT 0
-#define OSCL_HAS_MSWIN_PARTIAL_SUPPORT 0
-#define OSCL_HAS_SYMBIAN_SUPPORT 0
-#define OSCL_HAS_SAVAJE_SUPPORT 0
-#define OSCL_HAS_PV_C_OS_SUPPORT 0
-#define OSCL_HAS_ANDROID_SUPPORT 0
-#define OSCL_HAS_IPHONE_SUPPORT 0
-
-//osclconfig_error
-#define OSCL_HAS_SYMBIAN_ERRORTRAP 0
-
-//osclconfig_memory
-#define OSCL_HAS_SYMBIAN_MEMORY_FUNCS 0
-#define OSCL_HAS_PV_C_OS_API_MEMORY_FUNCS 0
-
-//osclconfig_time
-#define OSCL_HAS_PV_C_OS_TIME_FUNCS 0
-#define OSCL_HAS_UNIX_TIME_FUNCS 0
-
-//osclconfig_util
-#define OSCL_HAS_SYMBIAN_TIMERS 0
-#define OSCL_HAS_SYMBIAN_MATH 0
-
-//osclconfig_proc
-#define OSCL_HAS_SYMBIAN_SCHEDULER 0
-#define OSCL_HAS_SEM_TIMEDWAIT_SUPPORT 0
-#define OSCL_HAS_PTHREAD_SUPPORT 0
-
-//osclconfig_io
-#define OSCL_HAS_SYMBIAN_COMPATIBLE_IO_FUNCTION 0
-#define OSCL_HAS_SAVAJE_IO_SUPPORT 0
-#define OSCL_HAS_SYMBIAN_SOCKET_SERVER 0
-#define OSCL_HAS_SYMBIAN_DNS_SERVER 0
-#define OSCL_HAS_BERKELEY_SOCKETS 0
-
-
-/*! @} */
-
-#endif // OSCLCONFIG_CHECK_H_INCLUDED
-
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc.h
deleted file mode 100644
index 9f4396549a..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ P R O C ( P L A T F O R M C O N F I G I N F O )
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_proc.h
- * \brief This file contains configuration information for the linux platform
- *
- */
-
-#ifndef OSCLCONFIG_PROC_H_INCLUDED
-#define OSCLCONFIG_PROC_H_INCLUDED
-
-#ifndef OSCLCONFIG_H_INCLUDED
-#include "osclconfig.h"
-#endif
-
-#include "osclconfig_proc_unix_android.h"
-
-#include "osclconfig_proc_check.h"
-
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_check.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_check.h
deleted file mode 100644
index 0cba8f2556..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_check.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-
-#ifndef OSCLCONFIG_PROC_CHECK_H_INCLUDED
-#define OSCLCONFIG_PROC_CHECK_H_INCLUDED
-
-/**
-OSCL_HAS_THREAD_SUPPORT macro should be set to 1 if
-the target platform supports threads.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_THREAD_SUPPORT
-#error "ERROR: OSCL_HAS_THREAD_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_NON_PREEMPTIVE_THREAD_SUPPORT macro should be set to 1 if
-the target platform supports non-pre-emptive threads.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_NON_PREEMPTIVE_THREAD_SUPPORT
-#error "ERROR: OSCL_HAS_NON_PREEMPTIVE_THREAD_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_SYMBIAN_SCHEDULER macro should be set to 1 if
-the target platform supports Symbian active object scheduler.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SYMBIAN_SCHEDULER
-#error "ERROR: OSCL_HAS_SYMBIAN_SCHEDULER has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_SEM_TIMEDWAIT_SUPPORT macro should be set to 1 if
-the target platform supports POSIX-compliant semaphores (semaphore.h)
-with advanced realtime features including sem_timedwait.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SEM_TIMEDWAIT_SUPPORT
-#error "ERROR: OSCL_HAS_SEM_TIMEDWAIT_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_PTHREAD_SUPPORT macro should be set to 1 if
-the target platform supports POSIX-compliand pthreads (pthread.h).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_PTHREAD_SUPPORT
-#error "ERROR: OSCL_HAS_PTHREAD_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-type TOsclThreadId should be defined as the type used as
-a thread ID
-on the target platform.
-Example:
-typedef DWORD TOsclThreadId;
-*/
-typedef TOsclThreadId __verify__TOsclThreadId__defined__;
-
-/**
-type TOsclThreadFuncRet should be defined as the type used as
-a thread function return value
-on the target platform.
-Example:
-typedef DWORD TOsclThreadFuncRet;
-*/
-typedef TOsclThreadFuncRet __verify__TOsclThreadFuncRet__defined__;
-
-/**
-type TOsclThreadFuncArg should be defined as the type used as
-a thread function argument
-on the target platform.
-Example:
-typedef LPVOID TOsclThreadFuncArg;
-*/
-typedef TOsclThreadFuncArg __verify__TOsclThreadFuncArg__defined__;
-
-/**
-OSCL_THREAD_DECL macro should be defined to the
-necessary function declaration modifiers for thread routines,
-or a null macro if no modifiers are needed.
-Example:
-#define OSCL_THREAD_DECL WINAPI
-*/
-#ifndef OSCL_THREAD_DECL
-#error "ERROR: OSCL_THREAD_DECL has to be defined."
-#endif
-
-/**
-Example of a declaration of a thread routine called MyThreadMain using
-the Oscl definitions:
-
-static TOsclThreadFuncRet OSCL_THREAD_DECL MyThreadMain(TOsclThreadFuncArg arg);
-*/
-
-/**
-type TOsclThreadObject should be defined as the type used as
-a thread object or handle
-on the target platform.
-Example:
-typedef pthread_t TOsclThreadObject;
-*/
-typedef TOsclThreadObject __verify__TOsclThreadObject__defined__;
-
-/**
-type TOsclMutexObject should be defined as the type used as
-a mutex object or handle
-on the target platform.
-Example:
-typedef pthread_mutex_t TOsclMutexObject;
-*/
-typedef TOsclMutexObject __verify__TOsclMutexObject__defined__;
-
-/**
-type TOsclSemaphoreObject should be defined as the type used as
-a mutex object or handle
-on the target platform.
-Example:
-typedef sem_t TOsclSemaphoreObject;
-*/
-typedef TOsclSemaphoreObject __verify__TOsclSemaphoreObject__defined__;
-
-/**
-type TOsclConditionObject should be defined as the type used as
-a condition variable
-on the target platform.
-Example:
-typedef pthread_cond_t TOsclConditionObject;
-
-Note: Condition variables are only used with certain semaphore implementations.
-If the semaphore implementation does not require a condition variable,
-then this type can be defined as 'int' as follows:
-typedef int TOsclConditionObject; //not used
-*/
-typedef TOsclConditionObject __verify__TOsclConditionObject__defined__;
-
-
-#endif //OSCLCONFIG_PROC_CHECK_H_INCLUDED
-
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_unix_android.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_unix_android.h
deleted file mode 100644
index c5d05eb4ef..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_unix_android.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ P R O C ( P L A T F O R M C O N F I G I N F O )
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_proc.h
- * \brief This file contains configuration information for the linux platform
- *
- */
-
-#ifndef OSCLCONFIG_PROC_UNIX_ANDROID_H_INCLUDED
-#define OSCLCONFIG_PROC_UNIX_ANDROID_H_INCLUDED
-
-#define OSCL_HAS_SYMBIAN_SCHEDULER 0
-
-#define OSCL_HAS_THREAD_SUPPORT 1
-#define OSCL_HAS_NON_PREEMPTIVE_THREAD_SUPPORT 0
-
-//semaphore with advanced realtime features incl. timed wait.
-#define OSCL_HAS_SEM_TIMEDWAIT_SUPPORT 0
-//#include <time.h>
-//#include <semaphore.h>
-
-//pthreads
-#define OSCL_HAS_PTHREAD_SUPPORT 1
-#include <pthread.h>
-#include <errno.h>
-#include <signal.h>
-
-// threads, mutex, semaphores
-typedef pthread_t TOsclThreadId;
-typedef void* TOsclThreadFuncArg;
-typedef void* TOsclThreadFuncRet;
-#define OSCL_THREAD_DECL
-typedef pthread_t TOsclThreadObject;
-typedef pthread_mutex_t TOsclMutexObject;
-typedef int TOsclSemaphoreObject;
-typedef pthread_cond_t TOsclConditionObject;
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_unix_common.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_unix_common.h
deleted file mode 100644
index 104a2ccafe..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_proc_unix_common.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ P R O C ( P L A T F O R M C O N F I G I N F O )
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_proc.h
- * \brief This file contains configuration information for the linux platform
- *
- */
-
-#ifndef OSCLCONFIG_PROC_UNIX_COMMON_H_INCLUDED
-#define OSCLCONFIG_PROC_UNIX_COMMON_H_INCLUDED
-
-#define OSCL_HAS_SYMBIAN_SCHEDULER 0
-
-#define OSCL_HAS_THREAD_SUPPORT 1
-#define OSCL_HAS_NON_PREEMPTIVE_THREAD_SUPPORT 0
-
-//semaphore with advanced realtime features incl. timed wait.
-#define OSCL_HAS_SEM_TIMEDWAIT_SUPPORT 1
-#include <time.h>
-#include <semaphore.h>
-
-//pthreads
-#define OSCL_HAS_PTHREAD_SUPPORT 1
-#include <pthread.h>
-#include <errno.h>
-
-// threads, mutex, semaphores
-typedef pthread_t TOsclThreadId;
-typedef void* TOsclThreadFuncArg;
-typedef void* TOsclThreadFuncRet;
-#define OSCL_THREAD_DECL
-typedef pthread_t TOsclThreadObject;
-typedef pthread_mutex_t TOsclMutexObject;
-typedef sem_t TOsclSemaphoreObject;
-typedef pthread_cond_t TOsclConditionObject;
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_time.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_time.h
deleted file mode 100644
index cb5365906c..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_time.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ T I M E ( T I M E - D E F I N I T I O N S )
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-
-
-#ifndef OSCLCONFIG_TIME_H_INCLUDED
-#define OSCLCONFIG_TIME_H_INCLUDED
-
-
-#ifndef OSCLCONFIG_H_INCLUDED
-#include "osclconfig.h"
-#endif
-
-// system header files
-#include <time.h> // timeval
-#include <sys/time.h> // timercmp
-#include <unistd.h>
-
-
-
-#define OSCL_HAS_UNIX_TIME_FUNCS 1
-
-typedef struct timeval OsclBasicTimeStruct;
-typedef tm OsclBasicDateTimeStruct;
-
-#include "osclconfig_time_check.h"
-
-#endif
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_time_check.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_time_check.h
deleted file mode 100644
index 0243d5c1f6..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_time_check.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-
-//osclconfig: this build configuration file is for win32
-#ifndef OSCLCONFIG_TIME_CHECK_H_INCLUDED
-#define OSCLCONFIG_TIME_CHECK_H_INCLUDED
-
-
-/**
-OSCL_HAS_UNIX_TIME_FUNCS macro should be set to 1 if
-the target platform supports unix time of day functions.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_UNIX_TIME_FUNCS
-#error "ERROR: OSCL_HAS_UNIX_TIME_FUNCS has to be defined to either 1 or 0"
-#endif
-
-/**
-OsclBasicTimeStruct type should be defined to the platform-specific
-time of day type.
-*/
-typedef OsclBasicTimeStruct __Validate__BasicTimeStruct__;
-
-/**
-OsclBasicDateTimeStruct type should be defined to the platform-specific
-date + time type.
-*/
-typedef OsclBasicDateTimeStruct __Validate__BasicTimeDateStruct__;
-
-#endif //OSCLCONFIG_TIME_CHECK_H_INCLUDED
-
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_unix_android.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_unix_android.h
deleted file mode 100644
index f4508ac48d..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_unix_android.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ U N I X _ C O M M O N
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_limits_typedefs.h
- * \brief This file contains common typedefs based on the ANSI C limits.h header
- *
- * This header file should work for any ANSI C compiler to determine the
- * proper native C types to use for OSCL integer types.
- */
-
-
-#ifndef OSCLCONFIG_UNIX_ANDROID_H_INCLUDED
-#define OSCLCONFIG_UNIX_ANDROID_H_INCLUDED
-
-
-// system header files
-#include <stdlib.h> // abort
-#include <stdarg.h> // va_list
-#include <sys/types.h>
-#include <stdio.h>
-//#include <wchar.h>
-#include <string.h>
-#include <unistd.h> //for sleep
-#include <pthread.h>
-#include <ctype.h> // for tolower and toupper
-#ifdef __cplusplus
-#include <new> //for placement new
-#endif
-#include <math.h>
-
-#define OSCL_DISABLE_INLINES 0
-
-#define OSCL_HAS_ANSI_STDLIB_SUPPORT 1
-#define OSCL_HAS_ANSI_MATH_SUPPORT 1
-#define OSCL_HAS_GLOBAL_VARIABLE_SUPPORT 1
-#define OSCL_HAS_ANSI_STRING_SUPPORT 1
-#define OSCL_HAS_ANSI_WIDE_STRING_SUPPORT 0
-#define OSCL_HAS_ANSI_STDIO_SUPPORT 1
-
-#define OSCL_MEMFRAG_PTR_BEFORE_LEN 1
-
-#define OSCL_HAS_UNIX_SUPPORT 1
-#define OSCL_HAS_MSWIN_SUPPORT 0
-#define OSCL_HAS_MSWIN_PARTIAL_SUPPORT 0
-#define OSCL_HAS_SYMBIAN_SUPPORT 0
-#define OSCL_HAS_IPHONE_SUPPORT 0
-
-
-// 64-bit int
-#define OSCL_NATIVE_INT64_TYPE int64_t
-#define OSCL_NATIVE_UINT64_TYPE uint64_t
-#define INT64(x) x##LL
-#define UINT64(x) x##ULL
-#define INT64_HILO(high,low) ((((high##LL))<<32)|low)
-#define UINT64_HILO(high,low) ((((high##ULL))<<32)|low)
-
-// character set.
-#define OSCL_HAS_UNICODE_SUPPORT 1
-#define OSCL_NATIVE_WCHAR_TYPE wchar_t
-#if (OSCL_HAS_UNICODE_SUPPORT)
-#define _STRLIT(x) L ## x
-#else
-#define _STRLIT(x) x
-#endif
-#define _STRLIT_CHAR(x) x
-#define _STRLIT_WCHAR(x) L ## x
-
-// Thread-local storage. Unix has keyed TLS.
-#define OSCL_HAS_TLS_SUPPORT 1
-#define OSCL_TLS_IS_KEYED 1
-typedef pthread_key_t TOsclTlsKey ;
-#define OSCL_TLS_KEY_CREATE_FUNC(key) (pthread_key_create(&key,NULL)==0)
-#define OSCL_TLS_KEY_DELETE_FUNC(key) pthread_key_delete(key)
-#define OSCL_TLS_STORE_FUNC(key,ptr) (pthread_setspecific(key,(const void*)ptr)==0)
-#define OSCL_TLS_GET_FUNC(key) pthread_getspecific(key)
-
-//Basic lock
-#define OSCL_HAS_BASIC_LOCK 1
-#include <pthread.h>
-typedef pthread_mutex_t TOsclBasicLockObject;
-
-#endif // OSCLCONFIG_UNIX_COMMON_H_INCLUDED
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_unix_common.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_unix_common.h
deleted file mode 100644
index d795c497cb..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_unix_common.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2010 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-// O S C L C O N F I G _ U N I X _ C O M M O N
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-
-/*! \file osclconfig_limits_typedefs.h
- * \brief This file contains common typedefs based on the ANSI C limits.h header
- *
- * This header file should work for any ANSI C compiler to determine the
- * proper native C types to use for OSCL integer types.
- */
-
-
-#ifndef OSCLCONFIG_UNIX_COMMON_H_INCLUDED
-#define OSCLCONFIG_UNIX_COMMON_H_INCLUDED
-
-
-// system header files
-#include <stdlib.h> // abort
-#include <stdarg.h> // va_list
-#include <sys/types.h>
-#include <stdio.h>
-#include <wchar.h>
-#include <string.h>
-#include <unistd.h> //for sleep
-#include <pthread.h>
-#include <ctype.h> // for tolower and toupper
-#ifdef __cplusplus
-#include <new> //for placement new
-#endif
-#include <math.h>
-
-#define OSCL_DISABLE_INLINES 0
-
-#define OSCL_HAS_ANSI_STDLIB_SUPPORT 1
-#define OSCL_HAS_ANSI_MATH_SUPPORT 1
-#define OSCL_HAS_GLOBAL_VARIABLE_SUPPORT 1
-#define OSCL_HAS_ANSI_STRING_SUPPORT 1
-#define OSCL_HAS_ANSI_WIDE_STRING_SUPPORT 1
-#define OSCL_HAS_ANSI_STDIO_SUPPORT 1
-
-#define OSCL_MEMFRAG_PTR_BEFORE_LEN 1
-
-#define OSCL_HAS_UNIX_SUPPORT 1
-#define OSCL_HAS_MSWIN_SUPPORT 0
-#define OSCL_HAS_MSWIN_PARTIAL_SUPPORT 0
-#define OSCL_HAS_SYMBIAN_SUPPORT 0
-
-// 64-bit int
-#define OSCL_NATIVE_INT64_TYPE int64_t
-#define OSCL_NATIVE_UINT64_TYPE uint64_t
-#define INT64(x) x##LL
-#define UINT64(x) x##ULL
-#define INT64_HILO(high,low) ((((high##LL))<<32)|low)
-#define UINT64_HILO(high,low) ((((high##ULL))<<32)|low)
-
-// character set.
-#define OSCL_HAS_UNICODE_SUPPORT 1
-#define OSCL_NATIVE_WCHAR_TYPE wchar_t
-#if (OSCL_HAS_UNICODE_SUPPORT)
-#define _STRLIT(x) L ## x
-#else
-#define _STRLIT(x) x
-#endif
-#define _STRLIT_CHAR(x) x
-#define _STRLIT_WCHAR(x) L ## x
-
-// Thread-local storage. Unix has keyed TLS.
-#define OSCL_HAS_TLS_SUPPORT 1
-#define OSCL_TLS_IS_KEYED 1
-typedef pthread_key_t TOsclTlsKey ;
-#define OSCL_TLS_KEY_CREATE_FUNC(key) (pthread_key_create(&key,NULL)==0)
-#define OSCL_TLS_KEY_DELETE_FUNC(key) pthread_key_delete(key)
-#define OSCL_TLS_STORE_FUNC(key,ptr) (pthread_setspecific(key,(const void*)ptr)==0)
-#define OSCL_TLS_GET_FUNC(key) pthread_getspecific(key)
-
-//Basic lock
-#define OSCL_HAS_BASIC_LOCK 1
-#include <pthread.h>
-typedef pthread_mutex_t TOsclBasicLockObject;
-
-#endif // OSCLCONFIG_UNIX_COMMON_H_INCLUDED
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_util.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_util.h
deleted file mode 100644
index a169848541..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_util.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-#ifndef OSCLCONFIG_UTIL_H_INCLUDED
-#define OSCLCONFIG_UTIL_H_INCLUDED
-
-#ifndef OSCLCONFIG_H_INCLUDED
-#include "osclconfig.h"
-#endif
-
-#include <stdio.h> //sprintf
-#include <time.h> // OSCL clock
-#include <sys/time.h> // timeval
-
-#define OSCL_CLOCK_HAS_DRIFT_CORRECTION 0
-#define OSCL_HAS_SYMBIAN_TIMERS 0
-#define OSCL_HAS_SYMBIAN_MATH 0
-
-#define OSCL_RAND_MAX RAND_MAX
-
-//Define system sleep call for the tick count test here.
-#include <unistd.h>
-#define SLEEP_ONE_SEC sleep(1)
-
-
-#include "osclconfig_util_check.h"
-
-#endif
-
diff --git a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_util_check.h b/tools/android/depends/libomxil-bellagio/oscl/osclconfig_util_check.h
deleted file mode 100644
index f615c4a164..0000000000
--- a/tools/android/depends/libomxil-bellagio/oscl/osclconfig_util_check.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-#ifndef OSCLCONFIG_UTIL_CHECK_H_INCLUDED
-#define OSCLCONFIG_UTIL_CHECK_H_INCLUDED
-
-/**
-OSCL_HAS_SYMBIAN_TIMERS macro should be set to 1 if
-the target platform supports Symbian timers (RTimer).
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SYMBIAN_TIMERS
-#error "ERROR: OSCL_HAS_SYMBIAN_TIMERS has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_SYMBIAN_MATH macro should be set to 1 if
-the target platform supports Symbian <e32math.h> features.
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_SYMBIAN_MATH
-#error "ERROR: OSCL_HAS_SYMBIAN_MATH has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_HAS_ANSI_MATH_SUPPORT macro should be set to 1 if
-the target platform supports the ANSI C math functions (math.h)
-Otherwise it should be set to 0.
-*/
-#ifndef OSCL_HAS_ANSI_MATH_SUPPORT
-#error "ERROR: OSCL_HAS_ANSI_MATH_SUPPORT has to be defined to either 1 or 0"
-#endif
-
-/**
-OSCL_CLOCK_HAS_DRIFT_CORRECTION macro should be set to 1 if the target platform
-has drift correction Otherwise it should be set to 0.
-*/
-#ifndef OSCL_CLOCK_HAS_DRIFT_CORRECTION
-#error "ERROR: OSCL_CLOCK_HAS_DRIFT_CORRECTION has to be defined to either 1 or 0"
-#endif
-
-#endif // OSCLCONFIG_UTIL_CHECK_H_INCLUDED
-
-
diff --git a/tools/android/depends/libplist/0001-dontbuildswig.patch b/tools/android/depends/libplist/0001-dontbuildswig.patch
deleted file mode 100644
index 7ff491df8d..0000000000
--- a/tools/android/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/android/depends/libplist/0002-missing-libs.patch b/tools/android/depends/libplist/0002-missing-libs.patch
deleted file mode 100644
index 5d2bf7fdbe..0000000000
--- a/tools/android/depends/libplist/0002-missing-libs.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN armeabi-v7a/src/CMakeLists.txt armeabi-v7a.good//src/CMakeLists.txt
---- src/CMakeLists.txt 2011-06-24 21:00:48.000000000 -0400
-+++ src/CMakeLists.txt 2012-06-08 13:52:14.934096496 -0400
-@@ -35,7 +35,7 @@
- SET_SOURCE_FILES_PROPERTIES(${libcnary_object_files} PROPERTIES EXTERNAL_OBJECT true GENERATED true)
-
- ADD_LIBRARY( plist SHARED ${libplist_SRC} ${libcnary_object_files} )
--TARGET_LINK_LIBRARIES( plist ${LIBXML2_LIBRARIES} )
-+TARGET_LINK_LIBRARIES( plist m z iconv ${LIBXML2_LIBRARIES} )
- SET_TARGET_PROPERTIES( plist PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
- SET_TARGET_PROPERTIES( plist PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
- if(APPLE)
diff --git a/tools/android/depends/libplist/0003-no-so-version.patch b/tools/android/depends/libplist/0003-no-so-version.patch
deleted file mode 100644
index 5474b29796..0000000000
--- a/tools/android/depends/libplist/0003-no-so-version.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/CMakeLists.txt.orig 2012-06-23 03:33:46.000000000 +0200
-+++ src/CMakeLists.txt 2012-06-23 03:34:24.000000000 +0200
-@@ -36,16 +36,16 @@
-
- ADD_LIBRARY( plist SHARED ${libplist_SRC} ${libcnary_object_files} )
- TARGET_LINK_LIBRARIES( plist m z iconv ${LIBXML2_LIBRARIES} )
--SET_TARGET_PROPERTIES( plist PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
--SET_TARGET_PROPERTIES( plist PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
-+#SET_TARGET_PROPERTIES( plist PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
-+#SET_TARGET_PROPERTIES( plist PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
- if(APPLE)
- SET_TARGET_PROPERTIES( plist PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
- endif()
-
- ADD_LIBRARY( plist++ SHARED ${libplist++_SRC} )
- TARGET_LINK_LIBRARIES( plist++ plist )
--SET_TARGET_PROPERTIES( plist++ PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
--SET_TARGET_PROPERTIES( plist++ PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
-+#SET_TARGET_PROPERTIES( plist++ PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
-+#SET_TARGET_PROPERTIES( plist++ PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
- if(APPLE)
- SET_TARGET_PROPERTIES( plist++ PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
- endif()
diff --git a/tools/android/depends/libplist/Makefile b/tools/android/depends/libplist/Makefile
deleted file mode 100644
index 104f51c73a..0000000000
--- a/tools/android/depends/libplist/Makefile
+++ /dev/null
@@ -1,54 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include 0001-dontbuildswig.patch 0002-missing-libs.patch \
- 0003-no-so-version.patch Makefile
-
-# lib name, version
-LIBNAME=libplist
-VERSION=1.6
-SOURCE=$(LIBNAME)-$(VERSION)
-FILENAME=v$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-LIBDYLIB=$(PLATFORM)/build/src/libplist++.so
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p1 < ../0001-dontbuildswig.patch
- cd $(PLATFORM); patch -p0 < ../0002-missing-libs.patch
- cd $(PLATFORM); patch -p0 < ../0003-no-so-version.patch
- cd $(PLATFORM); rm -rf build; mkdir -p build
- cd $(PLATFORM)/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_SYSTEM_NAME=Linux \
- -DCMAKE_FIND_ROOT_PATH=$(platform_sdk_path) ..
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -j 1 -C $(PLATFORM)/build
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/build install
-
- rm -f $(PREFIX)/lib/libplist.la
- -$(READELF) --dynamic $(PREFIX)/lib/libplist.so | grep ibrary
-
- rm -f $(PREFIX)/lib/libplist++.la
- -$(READELF) --dynamic $(PREFIX)/lib/libplist++.so | grep ibrary
- touch $@
-
-clean:
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libpng-native/Makefile b/tools/android/depends/libpng-native/Makefile
deleted file mode 100644
index e220ae1864..0000000000
--- a/tools/android/depends/libpng-native/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libpng
-#VERSION=1.4.4
-VERSION=1.2.38
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX)
-
-LIBDYLIB=$(PLATFORM)/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libpng/Makefile b/tools/android/depends/libpng/Makefile
deleted file mode 100644
index 9990124e44..0000000000
--- a/tools/android/depends/libpng/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libpng
-#VERSION=1.4.4
-VERSION=1.2.38
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
-
-LIBDYLIB=$(PLATFORM)/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/librtmp/Makefile b/tools/android/depends/librtmp/Makefile
deleted file mode 100644
index 2537929afe..0000000000
--- a/tools/android/depends/librtmp/Makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile prefix.patch
-
-# lib name, version
-LIBNAME=rtmpdump
-VERSION=e0056c51cc1710c9a44d2a2c4e2f344fa9cabcf4
-GIT_DIR=$(TARBALLS_LOCATION)/$(LIBNAME).git
-BASE_URL=git://git.ffmpeg.org/$(LIBNAME).git
-SOURCE=$(LIBNAME)-$(VERSION)
-#tell git to use the addons repo rather than xbmc's repo
-export GIT_DIR
-export GIT_WORK_TREE=$(PLATFORM)
-
-# configuration settings
-
-LIBDYLIB=$(PLATFORM)/librtmp/librtmp.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(GIT_DIR)/HEAD:
- cd $(TARBALLS_LOCATION); git clone --bare $(BASE_URL)
-
-$(GIT_DIR)/current/$(VERSION): $(GIT_DIR)/HEAD $(DEPS)
- git rev-list -1 $(VERSION) >/dev/null || git fetch origin "+refs/heads/*:refs/remotes/origin/*"
- git rev-list -1 $(VERSION) >/dev/null
- rm -rf $(GIT_DIR)/current; mkdir -p $(GIT_DIR)/current
- touch $@
-
-$(PLATFORM)/bootstrap: $(GIT_DIR)/current/$(VERSION)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- git checkout $(VERSION) -- .
-
-$(PLATFORM): $(PLATFORM)/bootstrap
- cd $(PLATFORM); patch -p1 < ../librtmp-60-second-fix.patch
- cd $(PLATFORM); patch -p0 < ../prefix.patch
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)/librtmp CROSS_COMPILE=$(CROSSTOOLS) PREFIX=$(PREFIX) XCFLAGS="$(CFLAGS)" XLDFLAGS="$(LDFLAGS) -lm"
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/librtmp install PREFIX=$(PREFIX)
- rm -f $(PREFIX)/lib/librtmp.la $(PREFIX)/lib/librtmp.so
- mv -f $(PREFIX)/lib/librtmp.so.0 $(PREFIX)/lib/librtmp.so
- $(RPL) -e "librtmp.so.0" "librtmp.so\x00\x00" $(PREFIX)/lib/librtmp.so
- -$(READELF) --dynamic $(PREFIX)/lib/librtmp.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/librtmp/librtmp-60-second-fix.patch b/tools/android/depends/librtmp/librtmp-60-second-fix.patch
deleted file mode 100644
index 2914fc1b8e..0000000000
--- a/tools/android/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<RTMP_LOGALL && strstr(str, "no-name" ) != NULL )
-- return;
-+ if (RTMP_debuglevel < RTMP_LOGDEBUG && strstr(str, "no-name") != NULL)
-+ return;
-
- if ( !fmsg ) fmsg = stderr;
-
-diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
-index 52d0254..bef37aa 100644
---- a/librtmp/rtmp.c
-+++ b/librtmp/rtmp.c
-@@ -27,6 +27,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <assert.h>
-+#include <math.h>
-
- #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, '/', &params);
-+ 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, ';', &params);
-+ 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, ':', &params);
-+ 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, ',', &params);
-+ 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 <polarssl/net.h>
- #include <polarssl/ssl.h>
- #include <polarssl/havege.h>
-+#include <polarssl/md5.h>
- 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 <gnutls/gnutls.h>
-@@ -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/android/depends/librtmp/prefix.patch b/tools/android/depends/librtmp/prefix.patch
deleted file mode 100644
index 198a85cf79..0000000000
--- a/tools/android/depends/librtmp/prefix.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- librtmp/Makefile 2010-06-30 15:58:35.000000000 -0400
-+++ librtmp/Makefile.2 2011-03-31 16:19:52.813884882 -0400
-@@ -1,6 +1,6 @@
- VERSION=v2.3
-
--prefix=/usr/local
-+prefix=$(PREFIX)
-
- CC=$(CROSS_COMPILE)gcc
- LD=$(CROSS_COMPILE)ld
diff --git a/tools/android/depends/libsamplerate/Makefile b/tools/android/depends/libsamplerate/Makefile
deleted file mode 100644
index ef3b0925fe..0000000000
--- a/tools/android/depends/libsamplerate/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libsamplerate
-VERSION=0.1.7
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- cp -f $(CONFIG_SUB) $(CONFIG_GUESS) Cfg; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-sndfile --disable-fftw --disable-shared
-
-LIBDYLIB=$(PLATFORM)/src/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libsdl/01-SDL_SetWidthHeight.patch b/tools/android/depends/libsdl/01-SDL_SetWidthHeight.patch
deleted file mode 100644
index 0e26023554..0000000000
--- a/tools/android/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/android/depends/libsdl/02-mmx.patch b/tools/android/depends/libsdl/02-mmx.patch
deleted file mode 100644
index 82f51aa787..0000000000
--- a/tools/android/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/android/depends/libsdl/Makefile b/tools/android/depends/libsdl/Makefile
deleted file mode 100644
index 660c0ed59b..0000000000
--- a/tools/android/depends/libsdl/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include 01-SDL_SetWidthHeight.patch 02-mmx.patch Makefile
-
-# 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 --disable-video-directfb
-
-LIBDYLIB=$(PLATFORM)/build/.libs/lib$(LIBNAME).so
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
- echo $(ARCHIVE) > .gitignore
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- echo $(PLATFORM) > .gitignore
- cd $(PLATFORM); patch -p0 < ../01-SDL_SetWidthHeight.patch
- cd $(PLATFORM); patch -p0 < ../02-mmx.patch
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -j 1 -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libsdl_image/Makefile b/tools/android/depends/libsdl_image/Makefile
deleted file mode 100644
index 22bde73ecc..0000000000
--- a/tools/android/depends/libsdl_image/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS=Makefile
-
-# lib name, version
-LIBNAME=SDL_image
-VERSION=1.2.7
-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=$(PLATFORM)/.libs/lib$(LIBNAME).so
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- echo $(PLATFORM) > .gitignore
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libshairport/001_add_ao.patch b/tools/android/depends/libshairport/001_add_ao.patch
deleted file mode 100644
index 995f7b78ee..0000000000
--- a/tools/android/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 <stdio.h>
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include <errno.h>
-+
-+/* --- 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 <stdio.h>
- #include <stdlib.h>
-@@ -45,7 +45,7 @@
- #include <sys/signal.h>
- #include <fcntl.h>
- #ifdef HAS_AO
--#include <ao/ao.h>
-+#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 <regex.h>
- #include <sys/types.h>
- #include <regex.h>
-+#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/android/depends/libshairport/002_fix_install_header.patch b/tools/android/depends/libshairport/002_fix_install_header.patch
deleted file mode 100644
index 495b97346c..0000000000
--- a/tools/android/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/android/depends/libshairport/003_fix_deadlock.patch b/tools/android/depends/libshairport/003_fix_deadlock.patch
deleted file mode 100644
index c05970e138..0000000000
--- a/tools/android/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/android/depends/libshairport/004_fix_bad_access.patch b/tools/android/depends/libshairport/004_fix_bad_access.patch
deleted file mode 100644
index 1976904c4d..0000000000
--- a/tools/android/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/android/depends/libshairport/005_fix_shutdown.patch b/tools/android/depends/libshairport/005_fix_shutdown.patch
deleted file mode 100644
index 32bd282719..0000000000
--- a/tools/android/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/android/depends/libshairport/006_no_printf.patch b/tools/android/depends/libshairport/006_no_printf.patch
deleted file mode 100644
index eb69d42b74..0000000000
--- a/tools/android/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/android/depends/libshairport/007_fix_syslog_defines.patch b/tools/android/depends/libshairport/007_fix_syslog_defines.patch
deleted file mode 100644
index 4d9b834f9c..0000000000
--- a/tools/android/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/android/depends/libshairport/008-add-missing-libs.patch b/tools/android/depends/libshairport/008-add-missing-libs.patch
deleted file mode 100644
index 6efd30222a..0000000000
--- a/tools/android/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/android/depends/libshairport/009_fix_ipv6.patch b/tools/android/depends/libshairport/009_fix_ipv6.patch
deleted file mode 100644
index 01ff026d07..0000000000
--- a/tools/android/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/android/depends/libshairport/010_handle_metadata.patch b/tools/android/depends/libshairport/010_handle_metadata.patch
deleted file mode 100644
index a48782ed08..0000000000
--- a/tools/android/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/android/depends/libshairport/011_fix_ipv4_fallback.patch b/tools/android/depends/libshairport/011_fix_ipv4_fallback.patch
deleted file mode 100644
index 2c813f224e..0000000000
--- a/tools/android/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/android/depends/libshairport/Makefile b/tools/android/depends/libshairport/Makefile
deleted file mode 100644
index c8af95b748..0000000000
--- a/tools/android/depends/libshairport/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include 001_add_ao.patch 002_fix_install_header.patch 003_fix_deadlock.patch \
- 004_fix_bad_access.patch 005_fix_shutdown.patch 006_no_printf.patch \
- 007_fix_syslog_defines.patch 008-add-missing-libs.patch \
- 009_fix_ipv6.patch 010_handle_metadata.patch android.patch Makefile
-
-# lib name, version
-LIBNAME=libshairport
-VERSION=1.2.0.20310_lib
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST)
-
-
-LIBDYLIB=$(PLATFORM)/src/.libs/libshairport.so.0.0.0
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p0 < ../001_add_ao.patch
- cd $(PLATFORM); patch -p0 < ../002_fix_install_header.patch
- cd $(PLATFORM); patch -p0 < ../003_fix_deadlock.patch
- cd $(PLATFORM); patch -p0 < ../004_fix_bad_access.patch
- cd $(PLATFORM); patch -p0 < ../005_fix_shutdown.patch
- cd $(PLATFORM); patch -p0 < ../006_no_printf.patch
- cd $(PLATFORM); patch -p0 < ../007_fix_syslog_defines.patch
- cd $(PLATFORM); patch -p0 < ../008-add-missing-libs.patch
- cd $(PLATFORM); patch -p0 < ../009_fix_ipv6.patch
- cd $(PLATFORM); patch -p0 < ../010_handle_metadata.patch
- cd $(PLATFORM); patch -p0 < ../011_fix_ipv4_fallback.patch
- cd $(PLATFORM); patch -p0 < ../android.patch
- cd $(PLATFORM); $(AUTORECONF) -vif
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -j 1 -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libshairport.la $(PREFIX)/lib/libshairport.so $(PREFIX)/lib/libshairport.so.0
- mv -f $(PREFIX)/lib/libshairport.so.0.0.0 $(PREFIX)/lib/libshairport.so
- $(RPL) -e "libshairport.so.0" "libshairport.so\x00\x00" $(PREFIX)/lib/libshairport.so
- -$(READELF) --dynamic $(PREFIX)/lib/libshairport.so | grep ibrary
- touch $@
-
-clean:
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libshairport/android.patch b/tools/android/depends/libshairport/android.patch
deleted file mode 100644
index 673cfeb7da..0000000000
--- a/tools/android/depends/libshairport/android.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- configure.in 2012-06-03 23:09:30.024347827 -0400
-+++ configure.in 2012-06-03 23:11:37.494347747 -0400
-@@ -14,7 +14,7 @@
- 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))
-+#AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
-
- OUTPUT_FILES="Makefile"
-
---- src/hairtunes.c 2012-06-03 23:15:47.944347589 -0400
-+++ src/hairtunes.c 2012-06-03 23:16:23.044347567 -0400
-@@ -42,7 +42,6 @@
- #include <sys/stat.h>
-
- #include "hairtunes.h"
--#include <sys/signal.h>
- #include <fcntl.h>
- #ifdef HAS_AO
- #include "ao.h"
diff --git a/tools/android/depends/libssh/Makefile b/tools/android/depends/libssh/Makefile
deleted file mode 100644
index 8402d9bafa..0000000000
--- a/tools/android/depends/libssh/Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile removelegacy.patch android.patch
-
-# lib name, version
-LIBNAME=libssh
-VERSION=0.5.0
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-LIBDYLIB=$(PLATFORM)/build/src/$(LIBNAME).so.4.2.0
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); rm -rf build; mkdir -p build
- cd $(PLATFORM); patch -p0 < ../removelegacy.patch
- cd $(PLATFORM); patch -p0 < ../android.patch
- cd $(PLATFORM); patch -p0 < ../md5.patch
- sed -ie "s|-fstack-protector|-fnostack-protector|" "$(PLATFORM)/cmake/Modules/DefineCompilerFlags.cmake"
- sed -ie "s|add_subdirectory(examples)||" "$(PLATFORM)/CMakeLists.txt"
- cd $(PLATFORM)/build; CC=$(CC) CXX=$(CXX) cmake \
- -DCMAKE_C_FLAGS:STRING="$(CPPFLAGS) $(CFLAGS)" \
- -DCMAKE_CXX_FLAGS:STRING="$(CPPFLAGS) $(CXXFLAGS)" \
- -DCMAKE_INSTALL_NAME_DIR=$(PREFIX)/lib \
- -DCMAKE_INSTALL_PREFIX=$(PREFIX) \
- -DCMAKE_SYSTEM_NAME=Linux \
- -DWITH_STATIC_LIB=1 \
- -DCMAKE_FIND_ROOT_PATH="$(TOOLCHAIN)/sysroot/usr;$(PREFIX)" ..
-$(LIBDYLIB): $(PLATFORM)
- make -j 1 -C $(PLATFORM)/build
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- make -C $(PLATFORM)/build install
- rm -f $(PREFIX)/lib/libssh.so $(PREFIX)/lib/libssh.so.4.2.0 $(PREFIX)/lib/libssh.so.4
- touch $@
-
-clean:
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libssh/android.patch b/tools/android/depends/libssh/android.patch
deleted file mode 100644
index 2e64d05858..0000000000
--- a/tools/android/depends/libssh/android.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- src/connect.c 2011-05-31 10:29:52.000000000 -0400
-+++ src/connect.c 2012-07-25 23:15:22.281514489 -0400
-@@ -159,7 +159,7 @@
- int timeout_ms;
- ssh_pollfd_t fds;
- int rc = 0;
-- unsigned int len = sizeof(rc);
-+ socklen_t len = sizeof(rc);
-
- enter_function();
-
---- src/misc.c 2011-05-31 10:29:52.000000000 -0400
-+++ src/misc.c 2012-07-25 23:24:46.611514133 -0400
-@@ -207,6 +207,9 @@
- #endif /* NSS_BUFLEN_PASSWD */
-
- char *ssh_get_user_home_dir(void) {
-+#if defined(__ANDROID__)
-+ return strdup(getenv("HOME"));
-+#else
- char *szPath = NULL;
- struct passwd pwd;
- struct passwd *pwdbuf;
-@@ -221,6 +224,7 @@
- szPath = strdup(pwd.pw_dir);
-
- return szPath;
-+#endif
- }
-
- /* we have read access on file */
-@@ -233,6 +237,9 @@
- }
-
- char *ssh_get_local_username(ssh_session session) {
-+#if defined(__ANDROID__)
-+ return NULL;
-+#else
- struct passwd pwd;
- struct passwd *pwdbuf;
- char buf[NSS_BUFLEN_PASSWD];
-@@ -254,6 +261,7 @@
- }
-
- return name;
-+#endif
- }
-
- int ssh_is_ipaddr_v4(const char *str) {
diff --git a/tools/android/depends/libssh/md5.patch b/tools/android/depends/libssh/md5.patch
deleted file mode 100644
index b5985f0be8..0000000000
--- a/tools/android/depends/libssh/md5.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff -ruN include/libssh/wrapper.h include/libssh/wrapper.h
---- include/libssh/wrapper.h 2011-05-31 10:29:52.000000000 -0400
-+++ include/libssh/wrapper.h 2012-07-26 00:21:16.021511996 -0400
-@@ -26,7 +26,7 @@
- #include "libssh/libcrypto.h"
- #include "libssh/libgcrypt.h"
-
--MD5CTX md5_init(void);
-+MD5CTX ssh_md5_init(void);
- void md5_update(MD5CTX c, const void *data, unsigned long len);
- void md5_final(unsigned char *md,MD5CTX c);
- SHACTX sha1_init(void);
-diff -ruN src/dh.c src/dh.c
---- src/dh.c 2011-05-31 10:29:52.000000000 -0400
-+++ src/dh.c 2012-07-26 00:19:52.961512049 -0400
-@@ -854,7 +854,7 @@
- return SSH_ERROR;
- }
-
-- ctx = md5_init();
-+ ctx = ssh_md5_init();
- if (ctx == NULL) {
- SAFE_FREE(h);
- return SSH_ERROR;
-diff -ruN src/kex.c src/kex.c
---- src/kex.c 2011-05-31 10:29:52.000000000 -0400
-+++ src/kex.c 2012-07-26 00:20:37.671512021 -0400
-@@ -509,7 +509,7 @@
- ssh_string hostn) {
- MD5CTX md5 = NULL;
-
-- md5 = md5_init();
-+ md5 = ssh_md5_init();
- if (md5 == NULL) {
- return -1;
- }
-diff -ruN src/keyfiles.c src/keyfiles.c
---- src/keyfiles.c 2011-05-31 10:29:52.000000000 -0400
-+++ src/keyfiles.c 2012-07-26 00:20:51.801512011 -0400
-@@ -223,7 +223,7 @@
- unsigned int md_not_empty;
-
- for (j = 0, md_not_empty = 0; j < keylen; ) {
-- md = md5_init();
-+ md = ssh_md5_init();
- if (md == NULL) {
- return -1;
- }
-diff -ruN src/libcrypto.c src/libcrypto.c
---- src/libcrypto.c 2011-05-31 10:29:52.000000000 -0400
-+++ src/libcrypto.c 2012-07-26 00:20:07.061512022 -0400
-@@ -89,7 +89,7 @@
- SHA1(digest, len, hash);
- }
-
--MD5CTX md5_init(void) {
-+MD5CTX ssh_md5_init(void) {
- MD5CTX c = malloc(sizeof(*c));
- if (c == NULL) {
- return NULL;
-diff -ruN src/libgcrypt.c src/libgcrypt.c
---- src/libgcrypt.c 2011-05-31 10:29:52.000000000 -0400
-+++ src/libgcrypt.c 2012-07-26 00:20:19.401512036 -0400
-@@ -62,7 +62,7 @@
- gcry_md_hash_buffer(GCRY_MD_SHA1, hash, digest, len);
- }
-
--MD5CTX md5_init(void) {
-+MD5CTX ssh_md5_init(void) {
- MD5CTX c = NULL;
- gcry_md_open(&c, GCRY_MD_MD5, 0);
-
diff --git a/tools/android/depends/libssh/removelegacy.patch b/tools/android/depends/libssh/removelegacy.patch
deleted file mode 100644
index 69683cb869..0000000000
--- a/tools/android/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/android/depends/libssh2/Makefile b/tools/android/depends/libssh2/Makefile
deleted file mode 100644
index 352f129e5a..0000000000
--- a/tools/android/depends/libssh2/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libssh2
-VERSION=1.2.7
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --with-openssl
-
-SHELL := /bin/bash
-RM := rm -rf
-
-LIBDYLIB=$(PLATFORM)/src/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libssh2.la $(PREFIX)/lib/libssh2.so $(PREFIX)/lib/libssh2.so.1
- mv -f $(PREFIX)/lib/libssh2.so.1.0.1 $(PREFIX)/lib/libssh2.so
- $(RPL) -e "libssh2.so.1" "libssh2.so\x00\x00" $(PREFIX)/lib/libssh2.so
- -$(READELF) --dynamic $(PREFIX)/lib/libssh2.so | grep ibrary
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libtool/Makefile b/tools/android/depends/libtool/Makefile
deleted file mode 100644
index 2a4cb515fc..0000000000
--- a/tools/android/depends/libtool/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libtool
-VERSION=2.2.6
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE)a.tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) \
- --disable-shared
-
-LIBDYLIB=$(PLATFORM)/libtool
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p0 < ../fix-libcrystax.patch
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -rf $(PREFIX)/lib/libltdl.a $(PREFIX)/lib/libltdl.la
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libtool/fix-libcrystax.patch b/tools/android/depends/libtool/fix-libcrystax.patch
deleted file mode 100644
index 4963cb6059..0000000000
--- a/tools/android/depends/libtool/fix-libcrystax.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- libltdl/m4/libtool.m4 2008-09-05 07:54:41.000000000 -0400
-+++ libltdl/m4/libtool.m4 2012-11-27 23:25:25.414701465 -0500
-@@ -6489,6 +6489,10 @@
- _LT_TAGVAR(postdeps,$1)=
- ;;
-
-+linux-android*)
-+ _LT_TAGVAR(postdeps, $1)="$_LT_TAGVAR(postdeps, $1) -lcrystax"
-+ ;;
-+
- linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
diff --git a/tools/android/depends/libusb/Makefile b/tools/android/depends/libusb/Makefile
deleted file mode 100644
index 8626c80ae4..0000000000
--- a/tools/android/depends/libusb/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libusb
-VERSION=0.1.12
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
-
-LIBDYLIB=$(PLATFORM)/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: $(LIBDYLIB) .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/libvorbis/Makefile b/tools/android/depends/libvorbis/Makefile
deleted file mode 100644
index 6e5e190f94..0000000000
--- a/tools/android/depends/libvorbis/Makefile
+++ /dev/null
@@ -1,63 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libvorbis
-VERSION=1.2.3
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-export LIBS=-lm
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-oggtest --disable-docs --disable-examples
-
-LIBDYLIB=$(PLATFORM)/lib/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- sed -ie "s|SUBDIRS = m4 include vq lib examples test doc|SUBDIRS = m4 include lib|" "$(PLATFORM)/Makefile.in"
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libvorbis.la $(PREFIX)/lib/libvorbis.so $(PREFIX)/lib/libvorbis.so.0
- mv -f $(PREFIX)/lib/libvorbis.so.0.4.3 $(PREFIX)/lib/libxbvorbis.so
- ln -sf $(PREFIX)/lib/libxbvorbis.so $(PREFIX)/lib/libvorbis.so
- $(RPL) -e "libvorbis.so.0" "libxbvorbis.so" $(PREFIX)/lib/libxbvorbis.so
- -$(READELF) --dynamic $(PREFIX)/lib/libxbvorbis.so | grep ibrary
- #
- rm -f $(PREFIX)/lib/libvorbisfile.la $(PREFIX)/lib/libvorbisfile.so $(PREFIX)/lib/libvorbisfile.so.3
- mv -f $(PREFIX)/lib/libvorbisfile.so.3.3.2 $(PREFIX)/lib/libxbvorbisfile.so
- ln -sf $(PREFIX)/lib/libxbvorbisfile.so $(PREFIX)/lib/libvorbisfile.so
- $(RPL) -e "libvorbisfile.so.3" "libxbvorbisfile.so" $(PREFIX)/lib/libxbvorbisfile.so
- $(RPL) -e "libvorbis.so.0" "libxbvorbis.so" $(PREFIX)/lib/libxbvorbisfile.so
- -$(READELF) --dynamic $(PREFIX)/lib/libxbvorbisfile.so | grep ibrary
- #
- rm -f $(PREFIX)/lib/libvorbisenc.la $(PREFIX)/lib/libvorbisenc.so $(PREFIX)/lib/libvorbisenc.so.2
- mv -f $(PREFIX)/lib/libvorbisenc.so.2.0.6 $(PREFIX)/lib/libxbvorbisenc.so
- ln -sf $(PREFIX)/lib/libxbvorbisenc.so $(PREFIX)/lib/libvorbisenc.so
- $(RPL) -e "libvorbisenc.so.2" "libxbvorbisenc.so" $(PREFIX)/lib/libxbvorbisenc.so
- $(RPL) -e "libvorbis.so.0" "libxbvorbis.so" $(PREFIX)/lib/libxbvorbisenc.so
- -$(READELF) --dynamic $(PREFIX)/lib/libxbvorbisenc.so | grep ibrary
- #
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libxml2/Makefile b/tools/android/depends/libxml2/Makefile
deleted file mode 100644
index 61215314d7..0000000000
--- a/tools/android/depends/libxml2/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libxml2
-VERSION=2.7.6
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --without-python --disable-shared
-
-LIBDYLIB=$(PLATFORM)/.libs/$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- sed -ie "s|runtest$$(EXEEXT)||" "$(PLATFORM)/Makefile.in"
- sed -ie "s|testrecurse$$(EXEEXT)||" "$(PLATFORM)/Makefile.in"
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/libzip/Makefile b/tools/android/depends/libzip/Makefile
deleted file mode 100644
index d578770798..0000000000
--- a/tools/android/depends/libzip/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=libzip
-VERSION=0.10
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
-
-LIBDYLIB=$(PLATFORM)/lib/.libs/$(LIBNAME).a
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libzip.la $(PREFIX)/lib/libzip*.so*
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/mysql/01-mysqlclient-cross-compile.patch b/tools/android/depends/mysql/01-mysqlclient-cross-compile.patch
deleted file mode 100644
index 12b22b7e0d..0000000000
--- a/tools/android/depends/mysql/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 <pthread.h>
-- #include <string.h>
--
-- 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 <pthread.h>
-- #include <string.h>
--
-- 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/android/depends/mysql/02-mysqlclient-ios.patch b/tools/android/depends/mysql/02-mysqlclient-ios.patch
deleted file mode 100644
index 3945b48f55..0000000000
--- a/tools/android/depends/mysql/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 <netinet/in_systm.h>
-+/* #include <netinet/in_systm.h> */
- #include <netinet/in.h>
--#include <netinet/ip.h>
-+/* #include <netinet/ip.h> */
- #if !defined(alpha_linux_port)
- #include <netinet/tcp.h>
- #endif
diff --git a/tools/android/depends/mysql/03-mysqlclient-android.patch b/tools/android/depends/mysql/03-mysqlclient-android.patch
deleted file mode 100644
index 2993fdda49..0000000000
--- a/tools/android/depends/mysql/03-mysqlclient-android.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff -ru mysql-5.1.55.org/client/mysql.cc mysql-5.1.55/client/mysql.cc
---- mysql-5.1.55.org/client/mysql.cc 2011-01-25 16:04:37.000000000 +0100
-+++ mysql-5.1.55/client/mysql.cc 2011-11-15 20:17:00.000000000 +0100
-@@ -97,6 +97,7 @@
- #include <conio.h>
- #elif !defined(__NETWARE__)
- #include <readline/readline.h>
-+#include <readline/history.h>
- #define HAVE_READLINE
- #endif
- //int vidattr(long unsigned int attrs); // Was missing in sun curses
-@@ -1045,14 +1046,16 @@
- } HIST_ENTRY;
- #endif
-
-+#if !defined(__ANDROID__)
- extern "C" int add_history(const char *command); /* From readline directory */
- extern "C" int read_history(const char *command);
- extern "C" int write_history(const char *command);
- extern "C" HIST_ENTRY *history_get(int num);
- extern "C" int history_length;
-+static void fix_history(String *final_command);
-+#endif
- static int not_in_history(const char *line);
- static void initialize_readline (char *name);
--static void fix_history(String *final_command);
- #endif
-
- static COMMANDS *find_command(char *name,char cmd_name);
-Only in mysql-5.1.55/client: mysql.cc~
-diff -ru mysql-5.1.55.org/config/ac-macros/readline.m4 mysql-5.1.55/config/ac-macros/readline.m4
---- mysql-5.1.55.org/config/ac-macros/readline.m4 2011-01-25 16:04:51.000000000 +0100
-+++ mysql-5.1.55/config/ac-macros/readline.m4 2011-11-15 20:17:54.000000000 +0100
-@@ -4,6 +4,7 @@
- [
- #include "stdio.h"
- #include "readline/readline.h"
-+ #include "readline/history.h"
- ],
- [
- HIST_ENTRY entry;
-Only in mysql-5.1.55/config/ac-macros: readline.m4~
-diff -ru mysql-5.1.55.org/include/my_dir.h mysql-5.1.55/include/my_dir.h
---- mysql-5.1.55.org/include/my_dir.h 2011-01-25 16:04:48.000000000 +0100
-+++ mysql-5.1.55/include/my_dir.h 2011-11-15 20:15:46.000000000 +0100
-@@ -35,9 +35,15 @@
- #define MY_S_ISUID S_ISUID /* set user id on execution */
- #define MY_S_ISGID S_ISGID /* set group id on execution */
- #define MY_S_ISVTX S_ISVTX /* save swapped text even after use */
-+#if defined(__ANDROID__)
-+#define MY_S_IREAD S_IRUSR /* read permission, owner */
-+#define MY_S_IWRITE S_IWUSR /* write permission, owner */
-+#define MY_S_IEXEC S_IEXEC /* execute/search permission, owner */
-+#else
- #define MY_S_IREAD S_IREAD /* read permission, owner */
- #define MY_S_IWRITE S_IWRITE /* write permission, owner */
- #define MY_S_IEXEC S_IEXEC /* execute/search permission, owner */
-+#endif
-
- #define MY_S_ISDIR(m) (((m) & MY_S_IFMT) == MY_S_IFDIR)
- #define MY_S_ISCHR(m) (((m) & MY_S_IFMT) == MY_S_IFCHR)
-Only in mysql-5.1.55/include: my_dir.h~
-diff -ru 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-11-15 20:14:37.000000000 +0100
-+++ mysql-5.1.55/include/my_global.h 2011-11-15 20:15:13.000000000 +0100
-@@ -979,6 +979,10 @@
- typedef unsigned char uchar; /* Short for unsigned char */
- #endif
-
-+#ifndef HAVE_USHORT
-+typedef unsigned short ushort;
-+#endif
-+
- #ifndef HAVE_INT8
- typedef signed char int8; /* Signed integer >= 8 bits */
- #endif
-Only in mysql-5.1.55/include: my_global.h~
-diff -ru mysql-5.1.55.org/mysys/my_gethwaddr.c mysql-5.1.55/mysys/my_gethwaddr.c
---- mysql-5.1.55.org/mysys/my_gethwaddr.c 2011-01-25 16:04:35.000000000 +0100
-+++ mysql-5.1.55/mysys/my_gethwaddr.c 2011-11-15 20:19:11.000000000 +0100
-@@ -66,7 +66,11 @@
-
- #include <net/if.h>
- #include <sys/ioctl.h>
-+#ifdef __ANDROID__
-+#include <net/if_ether.h>
-+#else
- #include <net/ethernet.h>
-+#endif
-
- my_bool my_gethwaddr(uchar *to)
- {
-Only in mysql-5.1.55/mysys: my_gethwaddr.c~
diff --git a/tools/android/depends/mysql/Makefile b/tools/android/depends/mysql/Makefile
deleted file mode 100644
index 34cf040e82..0000000000
--- a/tools/android/depends/mysql/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include 01-mysqlclient-cross-compile.patch 02-mysqlclient-ios.patch 03-mysqlclient-android.patch Makefile
-
-# lib name, version
-LIBNAME=mysql
-VERSION=5.1.55
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --build=$(BUILD) \
- --enable-thread-safe-client --with-extra-charsets=complex \
- --with-named-thread-libs=-lc --with-named-curses-libs=-lncurses \
- --without-readline --without-libedit \
- --without-server --without-bench --without-docs --without-man --disable-shared
-
-LIBDYLIB=$(PLATFORM)/lib$(LIBNAME)/.libs/lib$(LIBNAME)client.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -Np1 -i ../01-mysqlclient-cross-compile.patch
- cd $(PLATFORM); patch -Np1 -i ../02-mysqlclient-ios.patch
- cd $(PLATFORM); patch -Np1 -i ../03-mysqlclient-android.patch
- cd $(PLATFORM); autoconf
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)/include
- $(MAKE) -C $(PLATFORM)/libmysql
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/libmysql install
- $(MAKE) -C $(PLATFORM)/scripts/ install-binSCRIPTS
- $(MAKE) -C $(PLATFORM)/include/ install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/ncurses/Makefile b/tools/android/depends/ncurses/Makefile
deleted file mode 100644
index 34ae2a20d1..0000000000
--- a/tools/android/depends/ncurses/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=ncurses
-VERSION=5.9
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST) --build=$(BUILD) --without-cxx-binding --without-progs --without-tests --without-manpages --disable-shared --without-ada
-
-LIBDYLIB=$(PLATFORM)/lib/lib$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) http://ftp.gnu.org/gnu/ncurses/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-# cd $(PLATFORM); patch -Np1 -i ../01-ncurses-locale.patch
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/openssl/Makefile b/tools/android/depends/openssl/Makefile
deleted file mode 100644
index d951c38742..0000000000
--- a/tools/android/depends/openssl/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=openssl
-VERSION=0.9.8r
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=MACHINE=$(HOST) ./config no-shared zlib no-shared --openssldir=$(PREFIX)
-
-LIBDYLIB=$(PLATFORM)/libssl.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- #when compiled on darwin it just won't realise that we do crosscompiling
- #so it would stick in -arch i386 or -arch x86_64 into the cflags
- #that would break the cross compile so we have to get rid of these
- sed -ie 's/-arch i386//' $(PLATFORM)/Configure
- sed -ie 's/-arch x86_64//' $(PLATFORM)/Configure
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -j 1 -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install_sw
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/pcre-native/Makefile b/tools/android/depends/pcre-native/Makefile
deleted file mode 100644
index 832ed4b064..0000000000
--- a/tools/android/depends/pcre-native/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=pcre
-VERSION=7.9
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --disable-cpp --disable-shared
-
-
-LIBDYLIB=$(PLATFORM)/.libs/lib$(LIBNAME).so
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $(LIBDYLIB)
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/pcre/Makefile b/tools/android/depends/pcre/Makefile
deleted file mode 100644
index 039904d743..0000000000
--- a/tools/android/depends/pcre/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=pcre
-VERSION=7.9
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-stack-for-recursion --disable-shared
-
-
-LIBDYLIB=$(PLATFORM)/.libs/lib$(LIBNAME).a
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/pkg-config/Makefile b/tools/android/depends/pkg-config/Makefile
deleted file mode 100644
index 4eeed4c63e..0000000000
--- a/tools/android/depends/pkg-config/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-# lib name, version
-LIBNAME=pkg-config
-VERSION=0.23
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --enable-indirect-deps --with-pc-path=$(PREFIX)/lib/pkgconfig:$(PREFIX)/share/pkgconfig
-
-LIBDYLIB=$(PLATFORM)/pkg-config
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/python26-native/Makefile b/tools/android/depends/python26-native/Makefile
deleted file mode 100644
index c1c6579620..0000000000
--- a/tools/android/depends/python26-native/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=Python
-VERSION=2.6.5
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.bz2
-CWD=$(shell pwd)
-HOSTPYTHONDIR=$(CWD)/$(PLATFORM)/hostpython
-
-CONFIGURE=./configure --prefix=$(PREFIX) --disable-shared --disable-toolbox-glue --disable-framework
-
-LIBDYLIB=$(PLATFORM)/python
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- cd $(PLATFORM); $(MAKE)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- cd $(PLATFORM); make install
- touch $@
-
-clean:
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/python26-native/cpython-2.6.5-multiarch.patch b/tools/android/depends/python26-native/cpython-2.6.5-multiarch.patch
deleted file mode 100644
index e1f756ce0d..0000000000
--- a/tools/android/depends/python26-native/cpython-2.6.5-multiarch.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -rupN setup.py setup.py
---- setup.py 2010-03-08 08:08:25.000000000 +0100
-+++ setup.py 2012-07-13 11:15:27.000000000 +0200
-@@ -308,10 +308,32 @@ class PyBuildExt(build_ext):
- return platform
- return sys.platform
-
-+ def add_multiarch_paths(self):
-+ # Debian/Ubuntu multiarch support.
-+ # https://wiki.ubuntu.com/MultiarchSpec
-+ # self.build_temp
-+ tmpfile = os.path.join(self.build_temp, 'multiarch')
-+ if not os.path.exists(self.build_temp):
-+ os.makedirs(self.build_temp)
-+ ret = os.system('dpkg-architecture -qDEB_HOST_MULTIARCH > %s' %
-+ tmpfile)
-+ try:
-+ if ret >> 8 == 0:
-+ with open(tmpfile) as fp:
-+ multiarch_path_component = fp.readline().strip()
-+ add_dir_to_list(self.compiler.library_dirs,
-+ '/usr/lib/' + multiarch_path_component)
-+ add_dir_to_list(self.compiler.include_dirs,
-+ '/usr/include/' + multiarch_path_component)
-+ finally:
-+ os.unlink(tmpfile)
-+
-+
- def detect_modules(self):
- # Ensure that /usr/local is always used
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+ self.add_multiarch_paths()
-
- # Add paths specified in the environment variables LDFLAGS and
- # CPPFLAGS for header and library files.
diff --git a/tools/android/depends/python26-native/cpython-2.6.5-nosslv2.patch b/tools/android/depends/python26-native/cpython-2.6.5-nosslv2.patch
deleted file mode 100644
index 087fc895c7..0000000000
--- a/tools/android/depends/python26-native/cpython-2.6.5-nosslv2.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-diff -rupN Doc/library/ssl.rst Doc/library/ssl.rst
---- Doc/library/ssl.rst 2009-10-27 15:50:20.000000000 +0100
-+++ Doc/library/ssl.rst 2012-07-13 11:23:12.000000000 +0200
-@@ -113,7 +113,6 @@ Functions, Constants, and Exceptions
- ======================== ========= ========= ========== =========
- *client* / **server** **SSLv2** **SSLv3** **SSLv23** **TLSv1**
- ------------------------ --------- --------- ---------- ---------
-- *SSLv2* yes no yes* no
- *SSLv3* yes yes yes no
- *SSLv23* yes no yes no
- *TLSv1* no no yes yes
-@@ -218,10 +217,6 @@ Functions, Constants, and Exceptions
- Note that use of this setting requires a valid certificate validation file
- also be passed as a value of the ``ca_certs`` parameter.
-
--.. data:: PROTOCOL_SSLv2
--
-- Selects SSL version 2 as the channel encryption protocol.
--
- .. data:: PROTOCOL_SSLv23
-
- Selects SSL version 2 or 3 as the channel encryption protocol. This is a
-diff -rupN Lib/ssl.py Lib/ssl.py
---- Lib/ssl.py 2010-01-18 10:12:06.000000000 +0100
-+++ Lib/ssl.py 2012-07-13 11:27:10.000000000 +0200
-@@ -49,7 +49,6 @@ CERT_REQUIRED - certificates are require
-
- The following constants identify various SSL protocol variants:
-
--PROTOCOL_SSLv2
- PROTOCOL_SSLv3
- PROTOCOL_SSLv23
- PROTOCOL_TLSv1
-@@ -61,7 +60,7 @@ import _ssl # if we can't im
-
- from _ssl import SSLError
- from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
--from _ssl import PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
-+from _ssl import PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
- from _ssl import RAND_status, RAND_egd, RAND_add
- from _ssl import \
- SSL_ERROR_ZERO_RETURN, \
-@@ -418,8 +417,6 @@ def get_protocol_name(protocol_code):
- return "TLSv1"
- elif protocol_code == PROTOCOL_SSLv23:
- return "SSLv23"
-- elif protocol_code == PROTOCOL_SSLv2:
-- return "SSLv2"
- elif protocol_code == PROTOCOL_SSLv3:
- return "SSLv3"
- else:
-diff -rupN Lib/test/test_ssl.py Lib/test/test_ssl.py
---- Lib/test/test_ssl.py 2008-09-29 20:56:38.000000000 +0200
-+++ Lib/test/test_ssl.py 2012-07-13 11:26:29.000000000 +0200
-@@ -74,7 +74,6 @@ class BasicTests(unittest.TestCase):
- s.close()
-
- def testCrucialConstants(self):
-- ssl.PROTOCOL_SSLv2
- ssl.PROTOCOL_SSLv23
- ssl.PROTOCOL_SSLv3
- ssl.PROTOCOL_TLSv1
-@@ -834,27 +833,9 @@ else:
- badCertTest(os.path.join(os.path.dirname(__file__) or os.curdir,
- "badkey.pem"))
-
-- def testProtocolSSL2(self):
-- if test_support.verbose:
-- sys.stdout.write("\n")
-- tryProtocolCombo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True)
-- tryProtocolCombo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_OPTIONAL)
-- tryProtocolCombo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_REQUIRED)
-- tryProtocolCombo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, True)
-- tryProtocolCombo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3, False)
-- tryProtocolCombo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_TLSv1, False)
--
- def testProtocolSSL23(self):
- if test_support.verbose:
- sys.stdout.write("\n")
-- try:
-- tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv2, True)
-- except test_support.TestFailed, x:
-- # this fails on some older versions of OpenSSL (0.9.7l, for instance)
-- if test_support.verbose:
-- sys.stdout.write(
-- " SSL2 client to SSL23 server test unexpectedly failed:\n %s\n"
-- % str(x))
- tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True)
- tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True)
- tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True)
-@@ -873,7 +854,6 @@ else:
- tryProtocolCombo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, True)
- tryProtocolCombo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, True, ssl.CERT_OPTIONAL)
- tryProtocolCombo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, True, ssl.CERT_REQUIRED)
-- tryProtocolCombo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv2, False)
- tryProtocolCombo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, False)
- tryProtocolCombo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLSv1, False)
-
-@@ -883,7 +863,6 @@ else:
- tryProtocolCombo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, True)
- tryProtocolCombo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, True, ssl.CERT_OPTIONAL)
- tryProtocolCombo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, True, ssl.CERT_REQUIRED)
-- tryProtocolCombo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv2, False)
- tryProtocolCombo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv3, False)
- tryProtocolCombo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv23, False)
-
-diff -rupN Modules/_ssl.c Modules/_ssl.c
---- Modules/_ssl.c 2010-03-03 13:34:43.000000000 +0100
-+++ Modules/_ssl.c 2012-07-13 11:26:52.000000000 +0200
-@@ -300,8 +300,6 @@ newPySSLObject(PySocketSockObject *Sock,
- self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
- else if (proto_version == PY_SSL_VERSION_SSL3)
- self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
-- else if (proto_version == PY_SSL_VERSION_SSL2)
-- self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
- else if (proto_version == PY_SSL_VERSION_SSL23)
- self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
- PySSL_END_ALLOW_THREADS
-@@ -1627,8 +1625,6 @@ init_ssl(void)
- PY_SSL_CERT_REQUIRED);
-
- /* protocol versions */
-- PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
-- PY_SSL_VERSION_SSL2);
- PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
- PY_SSL_VERSION_SSL3);
- PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
diff --git a/tools/android/depends/python26/Makefile b/tools/android/depends/python26/Makefile
deleted file mode 100644
index 51a7db1b1d..0000000000
--- a/tools/android/depends/python26/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile Python-2.6.2-android.patch \
- Python-2.6.5-xcompile.patch Python-2.6-ctypes.patch \
- Python-no-modules.patch Python-no-export-path.patch modules.setup
-
-# lib name, version
-LIBNAME=Python
-VERSION=2.6.5
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.bz2
-
-# configuration settings
-CONFIGURE=OPT=-Os \
- LIBS=-lm \
- ./configure --prefix=$(PREFIX) --host=$(HOST) \
- --disable-toolbox-glue --disable-framework --with-system-ffi \
- ac_cv_func_gethostbyname_r=no ac_cv_header_sys_un_h=yes
-
-LIBDYLIB=$(PLATFORM)/libpython2.6.a
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- echo $(NATIVEPREFIX)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -Np1 -i ../Python-2.6.5-xcompile.patch
- cd $(PLATFORM); patch -Np1 -i ../Python-2.6.2-android.patch
- cd $(PLATFORM); patch -p0 < ../Python-no-modules.patch
- cd $(PLATFORM); patch -p0 < ../Python-no-export-path.patch
- cp modules.setup $(PLATFORM)/Modules/Setup.dist
- cd $(PLATFORM); sed -ie 's|-framework CoreFoundation||' configure.in
- cd $(PLATFORM); $(AUTORECONF)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM) HOSTPYTHON=$(NATIVEPREFIX)/bin/python HOSTPGEN=$(NATIVEPREFIX)/bin/pgen CROSS_COMPILE_TARGET=yes libpython2.6.a
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- make -C $(PLATFORM) HOSTPYTHON=$(NATIVEPREFIX)/bin/python HOSTPGEN=$(NATIVEPREFIX)/bin/pgen CROSS_COMPILE_TARGET=yes install
- find $(PREFIX)/lib/python2.6 -type f -name "*.py" -delete
- find $(PREFIX)/lib/python2.6 -type f -name "*.pyc" -delete
- #
- touch $@
-
-clean:
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/python26/Python-2.6-ctypes.patch b/tools/android/depends/python26/Python-2.6-ctypes.patch
deleted file mode 100644
index 647dca800b..0000000000
--- a/tools/android/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/android/depends/python26/Python-2.6.2-android.patch b/tools/android/depends/python26/Python-2.6.2-android.patch
deleted file mode 100644
index 78ad30008a..0000000000
--- a/tools/android/depends/python26/Python-2.6.2-android.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff --ignore-file-name-case -wuprN Python-2.6.2/Modules/pwdmodule.c python-src//Modules/pwdmodule.c
---- Python-2.6.2/Modules/pwdmodule.c 2008-06-09 01:58:54.000000000 -0300
-+++ python-src//Modules/pwdmodule.c 2011-01-05 17:09:37.000000000 -0300
-@@ -68,14 +68,14 @@ mkpwent(struct passwd *p)
- #define SETS(i,val) sets(v, i, val)
-
- SETS(setIndex++, p->pw_name);
--#ifdef __VMS
-+#if defined(__VMS) || defined(ANDROID)
- SETS(setIndex++, "");
- #else
- SETS(setIndex++, p->pw_passwd);
- #endif
- SETI(setIndex++, p->pw_uid);
- SETI(setIndex++, p->pw_gid);
--#ifdef __VMS
-+#if defined(__VMS) || defined(ANDROID)
- SETS(setIndex++, "");
- #else
- SETS(setIndex++, p->pw_gecos);
-diff --ignore-file-name-case -wuprN Python-2.6.2/Modules/termios.c python-src//Modules/termios.c
---- Python-2.6.2/Modules/termios.c 2008-06-09 01:58:54.000000000 -0300
-+++ python-src//Modules/termios.c 2011-01-05 17:09:37.000000000 -0300
-@@ -227,6 +227,7 @@ termios_tcsendbreak(PyObject *self, PyOb
- return Py_None;
- }
-
-+#if 0 // No tcdrain defined for Android.
- PyDoc_STRVAR(termios_tcdrain__doc__,
- "tcdrain(fd) -> None\n\
- \n\
-@@ -246,6 +247,7 @@ termios_tcdrain(PyObject *self, PyObject
- Py_INCREF(Py_None);
- return Py_None;
- }
-+#endif
-
- PyDoc_STRVAR(termios_tcflush__doc__,
- "tcflush(fd, queue) -> None\n\
-@@ -301,8 +303,8 @@ static PyMethodDef termios_methods[] =
- METH_VARARGS, termios_tcsetattr__doc__},
- {"tcsendbreak", termios_tcsendbreak,
- METH_VARARGS, termios_tcsendbreak__doc__},
-- {"tcdrain", termios_tcdrain,
-- METH_VARARGS, termios_tcdrain__doc__},
-+ // {"tcdrain", termios_tcdrain,
-+ // METH_VARARGS, termios_tcdrain__doc__},
- {"tcflush", termios_tcflush,
- METH_VARARGS, termios_tcflush__doc__},
- {"tcflow", termios_tcflow,
---- Python-2.6.2/Modules/posixmodule.c 2012-06-20 14:20:07.833441645 -0400
-+++ Python-2.6.2/Modules/posixmodule.c 2012-06-20 14:23:03.023441535 -0400
-@@ -3761,7 +3761,7 @@
- slave_fd = open(slave_name, O_RDWR | O_NOCTTY); /* open slave */
- if (slave_fd < 0)
- return posix_error();
--#if !defined(__CYGWIN__) && !defined(HAVE_DEV_PTC)
-+#if !defined(__CYGWIN__) && !defined(HAVE_DEV_PTC) && !defined(ANDROID)
- ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */
- ioctl(slave_fd, I_PUSH, "ldterm"); /* push ldterm */
- #ifndef __hpux
diff --git a/tools/android/depends/python26/Python-2.6.5-xcompile.patch b/tools/android/depends/python26/Python-2.6.5-xcompile.patch
deleted file mode 100644
index 51df2d347d..0000000000
--- a/tools/android/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 <stdio.h>
--#include <stddef.h>
--#include <string.h>
--
--#ifdef HAVE_SYS_TYPES_H
--#include <sys/types.h>
--#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 <stdio.h>
-+##include <stddef.h>
-+##include <string.h>
-+
-+##ifdef HAVE_SYS_TYPES_H
-+##include <sys/types.h>
-+##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 <sys/socket.h> does not define.),[
-+ Define to 'int' if <sys/socket.h> does not define.),[
- #ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #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 = ['_ctypes', '_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/android/depends/python26/Python-no-export-path.patch b/tools/android/depends/python26/Python-no-export-path.patch
deleted file mode 100644
index 6753baa9c8..0000000000
--- a/tools/android/depends/python26/Python-no-export-path.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN Makefile.pre.in Makefile.pre.in
---- Makefile.pre.in 2012-07-12 17:52:37.072234980 -0400
-+++ Makefile.pre.in 2012-07-13 15:45:36.522185303 -0400
-@@ -912,8 +912,6 @@
- $(srcdir)/Lib/$(PLATDIR):
- mkdir $(srcdir)/Lib/$(PLATDIR)
- cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
-- export PATH; PATH="`pwd`:$$PATH"; \
-- export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
- export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
- export EXE; EXE="$(BUILDEXE)"; \
- cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen \ No newline at end of file
diff --git a/tools/android/depends/python26/Python-no-modules.patch b/tools/android/depends/python26/Python-no-modules.patch
deleted file mode 100644
index f65683799f..0000000000
--- a/tools/android/depends/python26/Python-no-modules.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN setup.py /setup.py
---- setup.py 2012-06-22 19:56:02.633319969 -0400
-+++ setup.py 2012-06-22 19:56:49.403319941 -0400
-@@ -98,7 +98,7 @@
- self.failed = []
-
- def build_extensions(self):
--
-+ return
- # Detect which modules should be compiled
- missing = self.detect_modules()
-
diff --git a/tools/android/depends/python26/modules.setup b/tools/android/depends/python26/modules.setup
deleted file mode 100644
index 7af2e85f83..0000000000
--- a/tools/android/depends/python26/modules.setup
+++ /dev/null
@@ -1,519 +0,0 @@
-# -*- makefile -*-
-# The file Setup is used by the makesetup script to construct the files
-# Makefile and config.c, from Makefile.pre and config.c.in,
-# respectively. The file Setup itself is initially copied from
-# Setup.dist; once it exists it will not be overwritten, so you can edit
-# Setup to your heart's content. Note that Makefile.pre is created
-# from Makefile.pre.in by the toplevel configure script.
-
-# (VPATH notes: Setup and Makefile.pre are in the build directory, as
-# are Makefile and config.c; the *.in and *.dist files are in the source
-# directory.)
-
-# Each line in this file describes one or more optional modules.
-# Modules enabled here will not be compiled by the setup.py script,
-# so the file can be used to override setup.py's behavior.
-
-# Lines have the following structure:
-#
-# <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]
-#
-# <sourcefile> is anything ending in .c (.C, .cc, .c++ are C++ files)
-# <cpparg> is anything starting with -I, -D, -U or -C
-# <library> is anything ending in .a or beginning with -l or -L
-# <module> is anything else but should be a valid Python
-# identifier (letters, digits, underscores, beginning with non-digit)
-#
-# (As the makesetup script changes, it may recognize some other
-# arguments as well, e.g. *.so and *.sl as libraries. See the big
-# case statement in the makesetup script.)
-#
-# Lines can also have the form
-#
-# <name> = <value>
-#
-# which defines a Make variable definition inserted into Makefile.in
-#
-# Finally, if a line contains just the word "*shared*" (without the
-# quotes but with the stars), then the following modules will not be
-# built statically. The build process works like this:
-#
-# 1. Build all modules that are declared as static in Modules/Setup,
-# combine them into libpythonxy.a, combine that into python.
-# 2. Build all modules that are listed as shared in Modules/Setup.
-# 3. Invoke setup.py. That builds all modules that
-# a) are not builtin, and
-# b) are not listed in Modules/Setup, and
-# c) can be build on the target
-#
-# Therefore, modules declared to be shared will not be
-# included in the config.c file, nor in the list of objects to be
-# added to the library archive, and their linker options won't be
-# added to the linker options. Rules to create their .o files and
-# their shared libraries will still be added to the Makefile, and
-# their names will be collected in the Make variable SHAREDMODS. This
-# is used to build modules as shared libraries. (They can be
-# installed using "make sharedinstall", which is implied by the
-# toplevel "make install" target.) (For compatibility,
-# *noconfig* has the same effect as *shared*.)
-#
-# In addition, *static* explicitly declares the following modules to
-# be static. Lines containing "*static*" and "*shared*" may thus
-# alternate throughout this file.
-
-# NOTE: As a standard policy, as many modules as can be supported by a
-# platform should be present. The distribution comes with all modules
-# enabled that are supported by most platforms and don't require you
-# to ftp sources from elsewhere.
-*static*
-
-# Some special rules to define PYTHONPATH.
-# Edit the definitions below to indicate which options you are using.
-# Don't add any whitespace or comments!
-
-# Directories where library files get installed.
-# DESTLIB is for Python modules; MACHDESTLIB for shared libraries.
-DESTLIB=$(LIBDEST)
-MACHDESTLIB=$(BINLIBDEST)
-
-# NOTE: all the paths are now relative to the prefix that is computed
-# at run time!
-
-# Standard path -- don't edit.
-# No leading colon since this is the first entry.
-# Empty since this is now just the runtime prefix.
-DESTPATH=
-
-# Site specific path components -- should begin with : if non-empty
-SITEPATH=
-
-# Standard path components for test modules
-TESTPATH=
-
-# Path components for machine- or system-dependent modules and shared libraries
-MACHDEPPATH=:plat-$(MACHDEP)
-EXTRAMACHDEPPATH=
-
-# Path component for the Tkinter-related modules
-# The TKPATH variable is always enabled, to save you the effort.
-TKPATH=:lib-tk
-
-# Path component for old modules.
-OLDPATH=:lib-old
-
-COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH)
-PYTHONPATH=$(COREPYTHONPATH)
-
-
-# The modules listed here can't be built as shared libraries for
-# various reasons; therefore they are listed here instead of in the
-# normal order.
-
-# This only contains the minimal set of modules required to run the
-# setup.py script in the root of the Python source tree.
-
-posix posixmodule.c # posix (UNIX) system calls
-errno errnomodule.c # posix (UNIX) errno values
-pwd pwdmodule.c # this is needed to find out the user's home dir
- # if $HOME is not set
-_sre _sre.c # Fredrik Lundh's new regular expressions
-_codecs _codecsmodule.c # access to the builtin codecs and codec registry
-
-# The zipimport module is always imported at startup. Having it as a
-# builtin module avoids some bootstrapping problems and reduces overhead.
-zipimport zipimport.c
-
-# The rest of the modules listed in this file are all commented out by
-# default. Usually they can be detected and built as dynamically
-# loaded modules by the new setup.py script added in Python 2.1. If
-# you're on a platform that doesn't support dynamic loading, want to
-# compile modules statically into the Python binary, or need to
-# specify some odd set of compiler switches, you can uncomment the
-# appropriate lines below.
-
-# ======================================================================
-
-# The Python symtable module depends on .h files that setup.py doesn't track
-_symtable symtablemodule.c
-
-# The SGI specific GL module:
-
-GLHACK=-Dclear=__GLclear
-#gl glmodule.c cgensupport.c -I$(srcdir) $(GLHACK) -lgl -lX11
-
-# Pure module. Cannot be linked dynamically.
-# -DWITH_QUANTIFY, -DWITH_PURIFY, or -DWITH_ALL_PURE
-#WHICH_PURE_PRODUCTS=-DWITH_ALL_PURE
-#PURE_INCLS=-I/usr/local/include
-#PURE_STUBLIBS=-L/usr/local/lib -lpurify_stubs -lquantify_stubs
-#pure puremodule.c $(WHICH_PURE_PRODUCTS) $(PURE_INCLS) $(PURE_STUBLIBS)
-
-# Uncommenting the following line tells makesetup that all following
-# modules are to be built as shared libraries (see above for more
-# detail; also note that *static* reverses this effect):
-
-#*shared*
-
-# GNU readline. Unlike previous Python incarnations, GNU readline is
-# now incorporated in an optional module, configured in the Setup file
-# instead of by a configure script switch. You may have to insert a
-# -L option pointing to the directory where libreadline.* lives,
-# and you may have to change -ltermcap to -ltermlib or perhaps remove
-# it, depending on your system -- see the GNU readline instructions.
-# It's okay for this to be a shared library, too.
-
-#readline readline.c -lreadline -lncurses
-
-
-# Modules that should always be present (non UNIX dependent):
-
-array arraymodule.c # array objects
-cmath cmathmodule.c # -lm # complex math library functions
-math mathmodule.c # -lm # math library functions, e.g. sin()
-_struct _struct.c # binary structure packing/unpacking
-time timemodule.c # -lm # time operations and variables
-operator operator.c # operator.add() and similar goodies
-_weakref _weakref.c # basic weak reference support
-_testcapi _testcapimodule.c # Python C API test module
-_random _randommodule.c # Random number generator
-_collections _collectionsmodule.c # Container types
-itertools itertoolsmodule.c # Functions creating iterators for efficient looping
-strop stropmodule.c # String manipulations
-_functools _functoolsmodule.c # Tools for working with functions and callable objects
-
-EXPATDEFINES='-DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI'
-_elementtree -I$(srcdir)/Modules/expat $(EXPATDEFINES) _elementtree.c # elementtree accelerator
-#_pickle _pickle.c # pickle accelerator
-datetime datetimemodule.c # date/time type
-_bisect _bisectmodule.c # Bisection algorithms
-
-unicodedata unicodedata.c # static Unicode character database
-
-# access to ISO C locale support
-_locale _localemodule.c -lintl -liconv
-
-
-# Modules with some UNIX dependencies -- on by default:
-# (If you have a really backward UNIX, select and socket may not be
-# supported...)
-#
-fcntl fcntlmodule.c # fcntl(2) and ioctl(2)
-#spwd spwdmodule.c # spwd(3)
-#grp grpmodule.c # grp(3)
-select selectmodule.c # select(2); not on ancient System V
-
-# Memory-mapped files (also works on Win32).
-mmap mmapmodule.c
-
-# CSV file helper
-_csv _csv.c
-
-# Socket module helper for socket(2)
-_socket socketmodule.c
-
-# Socket module helper for SSL support; you must comment out the other
-# socket line above, and possibly edit the SSL variable:
-SSLDEFINES='-DUSE_SSL'
-_ssl _ssl.c \
- $(SSLDEFINES) -I$(prefix)/include -I$(prefix)/include/openssl \
- -L$(prefix)/lib -lssl -lcrypto
-
-_hashlib _hashopenssl.c \
- $(SSLDEFINES) -I$(prefix)/include -I$(prefix)/include/openssl \
- -L$(prefix)/lib -lssl -lcrypto
-
-# The crypt module is now disabled by default because it breaks builds
-# on many systems (where -lcrypt is needed), e.g. Linux (I believe).
-#
-# First, look at Setup.config; configure may have set this for you.
-
-#crypt cryptmodule.c -lcrypt # crypt(3); needs -lcrypt on some systems
-
-# Some more UNIX dependent modules -- off by default, since these
-# are not supported by all UNIX systems:
-
-#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
-termios termios.c # Steen Lumholt's termios module
-resource resource.c # Jeremy Hylton's rlimit interface
-
-
-# Multimedia modules -- off by default.
-# These don't work for 64-bit platforms!!!
-# #993173 says audioop works on 64-bit platforms, though.
-# These represent audio samples or images as strings:
-
-#audioop audioop.c # Operations on audio samples
-#imageop imageop.c # Operations on images
-
-
-# Note that the _md5 and _sha modules are normally only built if the
-# system does not have the OpenSSL libs containing an optimized version.
-
-# The _md5 module implements the RSA Data Security, Inc. MD5
-# Message-Digest Algorithm, described in RFC 1321. The necessary files
-# md5.c and md5.h are included here.
-
-_md5 md5module.c md5.c
-
-
-# The _sha module implements the SHA checksum algorithms.
-# (NIST's Secure Hash Algorithms.)
-_sha shamodule.c
-_sha256 sha256module.c
-_sha512 sha512module.c
-
-
-# SGI IRIX specific modules -- off by default.
-
-# These module work on any SGI machine:
-
-# *** gl must be enabled higher up in this file ***
-#fm fmmodule.c $(GLHACK) -lfm -lgl # Font Manager
-#sgi sgimodule.c # sgi.nap() and a few more
-
-# This module requires the header file
-# /usr/people/4Dgifts/iristools/include/izoom.h:
-#imgfile imgfile.c -limage -lgutil -lgl -lm # Image Processing Utilities
-
-
-# These modules require the Multimedia Development Option (I think):
-
-#al almodule.c -laudio # Audio Library
-#cd cdmodule.c -lcdaudio -lds -lmediad # CD Audio Library
-#cl clmodule.c -lcl -lawareaudio # Compression Library
-#sv svmodule.c yuvconvert.c -lsvideo -lXext -lX11 # Starter Video
-
-
-# The FORMS library, by Mark Overmars, implements user interface
-# components such as dialogs and buttons using SGI's GL and FM
-# libraries. You must ftp the FORMS library separately from
-# ftp://ftp.cs.ruu.nl/pub/SGI/FORMS. It was tested with FORMS 2.2a.
-# NOTE: if you want to be able to use FORMS and curses simultaneously
-# (or both link them statically into the same binary), you must
-# compile all of FORMS with the cc option "-Dclear=__GLclear".
-
-# The FORMS variable must point to the FORMS subdirectory of the forms
-# toplevel directory:
-
-#FORMS=/ufs/guido/src/forms/FORMS
-#fl flmodule.c -I$(FORMS) $(GLHACK) $(FORMS)/libforms.a -lfm -lgl
-
-
-# SunOS specific modules -- off by default:
-
-#sunaudiodev sunaudiodev.c
-
-
-# A Linux specific module -- off by default; this may also work on
-# some *BSDs.
-
-#linuxaudiodev linuxaudiodev.c
-
-
-# George Neville-Neil's timing module:
-
-timing timingmodule.c
-
-
-# The _tkinter module.
-#
-# The command for _tkinter is long and site specific. Please
-# uncomment and/or edit those parts as indicated. If you don't have a
-# specific extension (e.g. Tix or BLT), leave the corresponding line
-# commented out. (Leave the trailing backslashes in! If you
-# experience strange errors, you may want to join all uncommented
-# lines and remove the backslashes -- the backslash interpretation is
-# done by the shell's "read" command and it may not be implemented on
-# every system.
-
-# *** Always uncomment this (leave the leading underscore in!):
-# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
-# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-# -L/usr/local/lib \
-# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-# -I/usr/local/include \
-# *** Uncomment and edit to reflect where your X11 header files are:
-# -I/usr/X11R6/include \
-# *** Or uncomment this for Solaris:
-# -I/usr/openwin/include \
-# *** Uncomment and edit for Tix extension only:
-# -DWITH_TIX -ltix8.1.8.2 \
-# *** Uncomment and edit for BLT extension only:
-# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
-# *** Uncomment and edit for PIL (TkImaging) extension only:
-# (See http://www.pythonware.com/products/pil/ for more info)
-# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
-# *** Uncomment and edit for TOGL extension only:
-# -DWITH_TOGL togl.c \
-# *** Uncomment and edit to reflect your Tcl/Tk versions:
-# -ltk8.2 -ltcl8.2 \
-# *** Uncomment and edit to reflect where your X11 libraries are:
-# -L/usr/X11R6/lib \
-# *** Or uncomment this for Solaris:
-# -L/usr/openwin/lib \
-# *** Uncomment these for TOGL extension only:
-# -lGL -lGLU -lXext -lXmu \
-# *** Uncomment for AIX:
-# -lld \
-# *** Always uncomment this; X11 libraries to link with:
-# -lX11
-
-# Lance Ellinghaus's syslog module
-syslog syslogmodule.c # syslog daemon interface
-
-
-# Curses support, requring the System V version of curses, often
-# provided by the ncurses library. e.g. on Linux, link with -lncurses
-# instead of -lcurses).
-#
-# First, look at Setup.config; configure may have set this for you.
-
-#_curses _cursesmodule.c -lcurses -ltermcap
-# Wrapper for the panel library that's part of ncurses and SYSV curses.
-#_curses_panel _curses_panel.c -lpanel -lncurses
-
-
-# Generic (SunOS / SVR4) dynamic loading module.
-# This is not needed for dynamic loading of Python modules --
-# it is a highly experimental and dangerous device for calling
-# *arbitrary* C functions in *arbitrary* shared libraries:
-
-#dl dlmodule.c
-
-
-# Modules that provide persistent dictionary-like semantics. You will
-# probably want to arrange for at least one of them to be available on
-# your machine, though none are defined by default because of library
-# dependencies. The Python module anydbm.py provides an
-# implementation independent wrapper for these; dumbdbm.py provides
-# similar functionality (but slower of course) implemented in Python.
-
-# The standard Unix dbm module has been moved to Setup.config so that
-# it will be compiled as a shared library by default. Compiling it as
-# a built-in module causes conflicts with the pybsddb3 module since it
-# creates a static dependency on an out-of-date version of db.so.
-#
-# First, look at Setup.config; configure may have set this for you.
-
-#dbm -I$(prefix)/include -L$(prefix)/lib dbmmodule.c # dbm(3) may require -lndbm or similar
-
-# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
-#
-# First, look at Setup.config; configure may have set this for you.
-
-#gdbm gdbmmodule.c -I$(prefix)/include -L$(prefix)/lib -lgdbm
-
-
-# Sleepycat Berkeley DB interface.
-#
-# This requires the Sleepycat DB code, see http://www.sleepycat.com/
-# The earliest supported version of that library is 3.0, the latest
-# supported version is 4.0 (4.1 is specifically not supported, as that
-# changes the semantics of transactional databases). A list of available
-# releases can be found at
-#
-# http://www.sleepycat.com/update/index.html
-#
-# Edit the variables DB and DBLIBVERto point to the db top directory
-# and the subdirectory of PORT where you built it.
-#DB=/usr/local/BerkeleyDB.4.0
-#DBLIBVER=4.0
-#DBINC=$(DB)/include
-#DBLIB=$(DB)/lib
-#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
-
-# Historical Berkeley DB 1.85
-#
-# This module is deprecated; the 1.85 version of the Berkeley DB library has
-# bugs that can cause data corruption. If you can, use later versions of the
-# library instead, available from <http://www.sleepycat.com/>.
-
-#DB=/depot/sundry/src/berkeley-db/db.1.85
-#DBPORT=$(DB)/PORT/irix.5.3
-#bsddb185 bsddbmodule.c -I$(DBPORT)/include -I$(DBPORT) $(DBPORT)/libdb.a
-
-
-
-# Helper module for various ascii-encoders
-binascii binascii.c
-
-# Fred Drake's interface to the Python parser
-parser parsermodule.c
-
-# cStringIO and cPickle
-cStringIO cStringIO.c
-cPickle cPickle.c
-
-
-# Lee Busby's SIGFPE modules.
-# The library to link fpectl with is platform specific.
-# Choose *one* of the options below for fpectl:
-
-# For SGI IRIX (tested on 5.3):
-#fpectl fpectlmodule.c -lfpe
-
-# For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2):
-# (Without the compiler you don't have -lsunmath.)
-#fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm
-
-# For other systems: see instructions in fpectlmodule.c.
-#fpectl fpectlmodule.c ...
-
-# Test module for fpectl. No extra libraries needed.
-#fpetest fpetestmodule.c
-
-# Andrew Kuchling's zlib module.
-# This require zlib 1.1.3 (or later).
-# See http://www.gzip.org/zlib/
-zlib zlibmodule.c -I$(prefix)/include -L$(prefix)/lib -lz
-
-# Interface to the Expat XML parser
-#
-# Expat was written by James Clark and is now maintained by a group of
-# developers on SourceForge; see www.libexpat.org for more
-# information. The pyexpat module was written by Paul Prescod after a
-# prototype by Jack Jansen. Source of Expat 1.95.2 is included in
-# Modules/expat/. Usage of a system shared libexpat.so/expat.dll is
-# not advised.
-#
-# More information on Expat can be found at www.libexpat.org.
-#
-pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat $(EXPATDEFINES) -I$(prefix)/include -L$(prefix)/lib -lexpat
-
-
-# Hye-Shik Chang's CJKCodecs
-
-# multibytecodec is required for all the other CJK codec modules
-_multibytecodec cjkcodecs/multibytecodec.c
-
-_codecs_cn cjkcodecs/_codecs_cn.c
-_codecs_hk cjkcodecs/_codecs_hk.c
-_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
-_codecs_jp cjkcodecs/_codecs_jp.c
-_codecs_kr cjkcodecs/_codecs_kr.c
-_codecs_tw cjkcodecs/_codecs_tw.c
-
-# Example -- included for reference only:
-# xx xxmodule.c
-
-# Another example -- the 'xxsubtype' module shows C-level subtyping in action
-xxsubtype xxsubtype.c
-
-_lsprof _lsprof.c rotatingtree.c
-_json _json.c
-_fileio _fileio.c
-_heapq _heapqmodule.c
-_hotshot _hotshot.c
-future_builtins future_builtins.c
-
-SQLITEDEFINES='-DMODULE_NAME="sqlite3"'
-_sqlite3 _sqlite/connection.c \
- _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/prepare_protocol.c \
- _sqlite/row.c _sqlite/statement.c _sqlite/module.c _sqlite/util.c _sqlite/cache.c \
- -I$(prefix)/include -L$(prefix)/lib -lsqlite3 $(SQLITEDEFINES)
-
-_ctypes _ctypes/callbacks.c _ctypes/callproc.c _ctypes/cfield.c _ctypes/_ctypes.c \
- _ctypes/_ctypes_test.c _ctypes/malloc_closure.c _ctypes/stgdict.c \
- -I$(prefix)/include/ffi -L$(prefix)/lib -lffi
-
-#bz2 bz2module.c -I$(prefix)/include -L$(prefix)/lib -lbz2
diff --git a/tools/android/depends/readline/01-readline-setpwent.patch b/tools/android/depends/readline/01-readline-setpwent.patch
deleted file mode 100644
index 3d04de77c9..0000000000
--- a/tools/android/depends/readline/01-readline-setpwent.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- readline-6.0/complete.c 2011-01-16 21:32:57.000000000 +0100
-+++ readline-6.0.orig/complete.c 2011-10-15 22:45:29.000000000 +0200
-@@ -2029,6 +2029,9 @@
- static int namelen, first_char, first_char_loc;
- char *value;
-
-+#if defined(__ANDROID__)
-+ return (char*)NULL;
-+#else
- if (state == 0)
- {
- FREE (username);
-@@ -2040,6 +2043,7 @@
- namelen = strlen (username);
- setpwent ();
- }
-+#endif;
-
- #if defined (HAVE_GETPWENT)
- while (entry = getpwent ())
diff --git a/tools/android/depends/readline/Makefile b/tools/android/depends/readline/Makefile
deleted file mode 100644
index 33e3d01be9..0000000000
--- a/tools/android/depends/readline/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include 01-readline-setpwent.patch Makefile
-
-# lib name, version
-LIBNAME=readline
-VERSION=6.0
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) support/; ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
-
-LIBDYLIB=$(PLATFORM)/lib$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -Np1 -i ../01-readline-setpwent.patch
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/rpl/Makefile b/tools/android/depends/rpl/Makefile
deleted file mode 100644
index 21430c7cd0..0000000000
--- a/tools/android/depends/rpl/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile rpl
-
-all: .installed-$(PLATFORM)
-
-.installed-$(PLATFORM): $(DEPS)
- mkdir -p $(PREFIX)/bin
- cp rpl $(PREFIX)/bin
- touch $@
-
-clean:
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -f .installed-$(PLATFORM)
diff --git a/tools/android/depends/rpl/rpl b/tools/android/depends/rpl/rpl
deleted file mode 100755
index d528850571..0000000000
--- a/tools/android/depends/rpl/rpl
+++ /dev/null
@@ -1,310 +0,0 @@
-#!/usr/bin/python
-
-import optparse, sys, os, tempfile, re
-try: import readline
-except ImportError: pass
-from stat import *
-
-def show_license(*eat):
- print """rpl - replace strings in files
-Copyright (C) 2004-2005 Goran Weinholt <weinholt@debian.org>
-Copyright (C) 2004 Christian Haggstrom <chm@c00.info>
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 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, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-"""
- sys.exit(0)
-
-def get_files(filenames, recurse, suffixen, verbose, hidden_files):
- new_files = []
- for filename in filenames:
- try:
- perms = os.lstat(filename)
- except OSError, e:
- sys.stderr.write("\nrpl: Unable to read permissions of %s."
- % filename)
- sys.stderr.write("\nrpl: Error: %s" % e)
- sys.stderr.write("\nrpl: SKIPPING %s\n\n" % filename)
- continue
-
- if S_ISDIR(perms.st_mode):
- if recurse:
- if verbose:
- sys.stderr.write("Scanning Directory: %s\n" % filename)
- for f in os.listdir(filename):
- if not hidden_files and f.startswith('.'):
- if verbose:
- sys.stderr.write("Skipping: %s (hidden)\n"
- % os.path.join(filename, f))
- continue
- new_files += get_files([os.path.join(filename, f)],
- recurse, suffixen, verbose,
- hidden_files)
- else:
- if verbose:
- sys.stderr.write("Directory: %s skipped.\n" % filename)
- continue
- elif S_ISREG(perms.st_mode):
- if suffixen != [] and \
- not True in [ filename.endswith(s) for s in suffixen ]:
- sys.stderr.write("Skipping: %s (suffix not in list)\n"
- % filename)
- continue
- new_files += [(filename, perms)]
- else:
- sys.stderr.write("Skipping: %s (not a regular file)\n"
- % filename)
- return new_files
-
-def unescape(s):
- regex = re.compile(r'\\([0-7]{1,3}|x[0-9a-fA-F]{2}|[nrtvafb\\])')
- return regex.sub(lambda match: eval('"%s"' % match.group()), s)
-
-def blockrepl(instream, outstream, regex, before, after, blocksize=None):
- patlen = len(before)
- sum = 0
- if not blocksize: blocksize = 2*patlen
- tonext = ''
- while 1:
- block = instream.read(blocksize)
- if not block: break
- parts = regex.split(tonext+block)
- sum += len(parts)-1
- lastpart = parts[-1]
- if lastpart:
- tonext = lastpart[-patlen:]
- parts[-1] = lastpart[:-len(tonext)]
- else:
- tonext = ''
- outstream.write(after.join(parts))
- outstream.write(tonext)
- return sum
-
-def main():
- # First we parse the command line arguments...
- usage = "usage: %prog [options] old_string new_string target_file(s)"
- parser = optparse.OptionParser(usage, version="%prog 1.5.2")
- parser.add_option("-L", "--license", action="callback",
- callback=show_license, help="show the software license")
- parser.add_option("-x", metavar="SUFFIX",
- action="append", dest="suffixen", default=[],
- help="specify file suffix to match")
- parser.add_option("-i", "--ignore-case",
- action="store_true", dest="ignore_case", default=False,
- help="do a case insensitive match")
- parser.add_option("-w", "--whole-words",
- action="store_true", dest="whole_words", default=False,
- help="whole words (old_string matches on word boundaries only)")
- parser.add_option("-b", "--backup",
- action="store_true", dest="do_backup", default=False,
- help="make a backup before overwriting files")
- parser.add_option("-q", "--quiet",
- action="store_true", dest="quiet", default=False,
- help="quiet mode")
- parser.add_option("-v", "--verbose",
- action="store_true", dest="verbose", default=False,
- help="verbose mode")
- parser.add_option("-s", "--dry-run",
- action="store_true", dest="dry_run", default=False,
- help="simulation mode")
- parser.add_option("-R", "--recursive",
- action="store_true", dest="recurse", default=False,
- help="recurse into subdirectories")
- parser.add_option("-e", "--escape",
- action="store_true", dest="escapes", default=False,
- help="expand escapes in old_string and new_string")
- parser.add_option("-p", "--prompt",
- action="store_true", dest="prompt", default=False,
- help="prompt before modifying each file")
- parser.add_option("-f", "--force",
- action="store_true", dest="force", default=False,
- help="ignore errors when trying to preserve permissions")
- parser.add_option("-d", "--keep-times",
- action="store_true", dest="keep_times", default=False,
- help="keep the modification times on modified files")
- parser.add_option("-t", "--use-tmpdir",
- action="store_true", dest="use_tmpdir", default=False,
- help="use $TMPDIR for storing temporary files")
- parser.add_option("-a", "--all",
- action="store_true", dest="hidden_files", default=False,
- help="do not ignore files and directories starting with .")
- (opts, args) = parser.parse_args()
-
- # args should now contain old_str, new_str and a list of files/dirs
- if len(args) < 3:
- parser.error("must have at least three arguments")
- if args[0] == "":
- parser.error("must have something to replace")
-
- old_str = args[0]
- new_str = args[1]
- files = args[2:]
-
- # See if all the files actually exist
- for file in files:
- if not os.path.exists(file):
- sys.stderr.write("\nrpl: File \"%s\" not found.\n" % file)
- sys.exit(os.EX_DATAERR)
-
- if new_str == "" and not opts.quiet:
- sys.stderr.write("Really DELETE all occurences of %s " % old_str)
- if opts.ignore_case:
- sys.stderr.write("(ignoring case)? (Y/[N]) ")
- else:
- sys.stderr.write("(case sensitive)? (Y/[N]) ")
- line = raw_input()
- if line != "" and line[0] in "nN":
- sys.stderr.write("\nrpl: User cancelled operation.\n")
- sys.exit(os.EX_TEMPFAIL)
-
- # Tell the user what is going to happen
- if opts.dry_run:
- sys.stderr.write("Simulating replacement of \"%s\" with \"%s\" "
- % (old_str, new_str))
- else:
- sys.stderr.write("Replacing \"%s\" with \"%s\" " % (old_str, new_str))
- if opts.ignore_case: sys.stderr.write("(ignoring case) ")
- else: sys.stderr.write("(case sensitive) ")
- if opts.whole_words: sys.stderr.write("(whole words only)\n")
- else: sys.stderr.write("(partial words matched)\n")
- if opts.dry_run and not opts.quiet:
- sys.stderr.write("The files listed below would be modified in a replace operation.\n")
-
- if opts.escapes:
- old_str = unescape(old_str)
- new_str = unescape(new_str)
- if opts.whole_words:
- regex = re.compile(r"(?:(?<=\s)|^)" + re.escape(old_str) + r"(?=\s|$)",
- opts.ignore_case and re.I or 0)
- else:
- regex = re.compile(re.escape(old_str), opts.ignore_case and re.I or 0)
-
- total_matches = 0
- files = get_files(files, opts.recurse, opts.suffixen, opts.verbose, opts.hidden_files)
- for filename, perms in files:
- # Open the input file
- try: f = open(filename, "rb")
- except IOError, e:
- sys.stderr.write("\nrpl: Unable to open %s for reading." % fn)
- sys.stderr.write("\nrpl: Error: %s" % e)
- sys.stderr.write("\nrpl: SKIPPING %s\n\n" % fn)
- continue
-
- # Find out where we should put the temporary file
- if opts.use_tmpdir: tempfile.tempdir = None
- else: tempfile.tempdir = os.path.dirname(filename)
-
- # Create the output file
- try:
- o, tmp_path = tempfile.mkstemp("", ".tmp.")
- o = os.fdopen(o, "wb")
- except OSError, e:
- sys.stderr.write("\nrpl: Unable to create temp file.")
- sys.stderr.write("\nrpl: Error: %s" % e)
- sys.stderr.write("\nrpl: (Type \"rpl -h\" and consider \"-t\" to specify temp file location.)")
- sys.stderr.write("\nrpl: SKIPPING %s\n\n" % filename)
- continue
-
- # Set permissions and owner
- try:
- os.chown(tmp_path, perms.st_uid, perms.st_gid)
- os.chmod(tmp_path, perms.st_mode)
- except OSError, e:
- sys.stderr.write("\nrpl: Unable to set owner/group/perms of %s"
- % filename)
- sys.stderr.write("\nrpl: Error: %s" % e)
- if opts.force:
- sys.stderr.write("\nrpl: WARNING: New owner/group/perms may not match!\n\n")
- else:
- sys.stderr.write("\nrpl: SKIPPING %s!\n\n" % filename)
- os.unlink(tmp_path)
- continue
-
- if opts.verbose and not opts.dry_run:
- sys.stderr.write("Processing: %s\n" % filename)
- elif not opts.quiet and not opts.dry_run:
- sys.stderr.write(".")
- sys.stderr.flush()
-
- # Do the actual work now
- matches = blockrepl(f, o, regex, old_str, new_str, 1024)
-
- f.close()
- o.close()
-
- if matches == 0:
- os.unlink(tmp_path)
- continue
-
- if opts.dry_run:
- try:
- fn = os.path.realpath(filename)
- except OSError, e:
- fn = filename
- if not opts.quiet: sys.stderr.write(" %s\n" % fn)
- os.unlink(tmp_path)
- total_matches += matches
- continue
-
- if opts.prompt:
- sys.stderr.write("\nSave '%s' ? ([Y]/N) " % filename)
- line = ""
- while line == "" or line[0] not in "Yy\nnN":
- line = raw_input()
- if line[0] in "nN":
- sys.stderr.write("Not Saved.\n")
- os.unlink(tmp_path)
- continue
- sys.stderr.write("Saved.\n")
-
- if opts.do_backup:
- try: os.rename(filename, filename + "~")
- except OSError, e:
- sys.stderr.write("rpl: An error occured renaming %s to %s." % (filename, filename + "~"))
- sys.stderr.write("\nrpl: Error: %s" % e)
- continue
-
- # Rename the file
- try: os.rename(tmp_path, filename)
- except OSError, e:
- sys.stderr.write("rpl: An error occured replacing %s with %s."
- % (tmp_path, filename))
- sys.stderr.write("\nrpl: Error: %s" % e)
- os.unlink(tmp_path)
- continue
-
- # Restore the times
- if opts.keep_times:
- try: os.utime(filename, (perms.st_atime, perms.st_mtime))
- except OSError, e:
- sys.stderr.write("\nrpl: An error occured setting the access time and mod time of the file %s.", filename)
- sys.stderr.write("\nrpl: Error: %s" % e)
- total_matches += matches
-
- # We're about to exit, give a summary
- if not opts.quiet:
- if opts.dry_run:
- sys.stderr.write("\nA Total of %lu matches found in %lu file%s searched."
- % (total_matches,
- len(files),
- len(files) != 1 and "s" or ""))
- sys.stderr.write("\nNone replaced (simulation mode).\n")
- else:
- sys.stderr.write("\nA Total of %lu matches replaced in %lu file%s searched.\n"
- % (total_matches,
- len(files),
- len(files) != 1 and "s" or ""))
-
-if __name__ == "__main__":
- main()
diff --git a/tools/android/depends/samba/Makefile b/tools/android/depends/samba/Makefile
deleted file mode 100644
index ef208caf70..0000000000
--- a/tools/android/depends/samba/Makefile
+++ /dev/null
@@ -1,101 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile samba30-3.0.37-configure.in.patch \
- samba30-3.0.37-CVE-2010-2063.patch \
- samba30-3.0.37-silence-receive-warning.patch \
- samba30-3.0.37-vfs_default.c.patch samba30-3.0.37-wle-fix.patch \
- samba_android.patch
-
-# lib name, version
-LIBNAME=samba
-VERSION=3.0.37
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-# android does not really support LFS but we can force it
-# in libsmbclient by defining off_t to off64_t and changing
-# libsmbclient.h to match. Defining _OFF_T_DEFINED_ allows
-# us to change the typedef of off_t in android's sys/type.h.
-# Then xbmc will correctly access smb shares with LFS enabled
-# using the altered libsmbclient.h.
-export CFLAGS+=-D_FILE_OFFSET_BITS=64 -D_OFF_T_DEFINED_ -Doff_t=off64_t -Dlseek=lseek64
-CONFIGURE= cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) \
- SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \
- libreplace_cv_READDIR_GETDIRENTRIES=no \
- libreplace_cv_READDIR_GETDENTS=no \
- linux_getgrouplist_ok=no \
- samba_cv_REPLACE_READDIR=no \
- samba_cv_HAVE_WRFILE_KEYTAB=yes \
- samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
- samba_cv_USE_SETREUID=yes \
- samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
- samba_cv_HAVE_IFACE_IFCONF=yes \
- samba_cv_HAVE_MMAP=yes \
- samba_cv_HAVE_FCNTL_LOCK=yes \
- samba_cv_HAVE_SECURE_MKSTEMP=yes \
- samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
- samba_cv_fpie=no \
- samba_cv_have_longlong=yes \
- samba_cv_HAVE_OFF64_T=yes \
- samba_cv_HAVE_UT_UT_TYPE=no \
- ac_cv_func_srand=yes \
- ac_cv_func_rand=yes \
- --disable-cups \
- --enable-static \
- --disable-shared \
- --disable-pie \
- --disable-iprint \
- --disable-fam \
- --without-cluster-support \
- --without-cifsupcall \
- --without-ads \
- --without-ldap \
- --with-included-popt \
- --with-included-iniparser \
- --without-sys-quotas \
- --without-krb5 \
- --without-automount \
- --without-sendfile-support \
- --with-libiconv=$(STAGING_DIR) \
- --without-cifsmount \
- --without-winbind \
-
-LIBDYLIB=$(PLATFORM)/source/bin/libsmbclient.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p1 < ../samba30-3.0.37-configure.in.patch
- cd $(PLATFORM); patch -p1 < ../samba30-3.0.37-CVE-2010-2063.patch
- cd $(PLATFORM); patch -p1 < ../samba30-3.0.37-silence-receive-warning.patch
- cd $(PLATFORM); patch -p1 < ../samba30-3.0.37-vfs_default.c.patch
- cd $(PLATFORM); patch -p1 < ../samba30-3.0.37-wle-fix.patch
- cd $(PLATFORM); patch -p0 < ../samba_android.patch
- sed -ie "s|off_t|off64_t|g" "$(PLATFORM)/source/include/libsmbclient.h"
- cd $(PLATFORM)/source && ./autogen.sh
- cd $(PLATFORM)/source; $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)/source headers
- mkdir -p $(PLATFORM)/source/bin
- $(MAKE) -C $(PLATFORM)/source libsmbclient
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/source installclientlib
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM)/source clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/samba/samba30-3.0.37-CVE-2010-2063.patch b/tools/android/depends/samba/samba30-3.0.37-CVE-2010-2063.patch
deleted file mode 100644
index b4657de2c0..0000000000
--- a/tools/android/depends/samba/samba30-3.0.37-CVE-2010-2063.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/source/smbd/process.c b/source/smbd/process.c
-index e861e16..6499bc7 100644
---- a/source/smbd/process.c
-+++ b/source/smbd/process.c
-@@ -1159,6 +1159,7 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize)
- {
- static char *orig_inbuf;
- static char *orig_outbuf;
-+ static int orig_size;
- int smb_com1, smb_com2 = CVAL(inbuf,smb_vwv0);
- unsigned smb_off2 = SVAL(inbuf,smb_vwv1);
- char *inbuf2, *outbuf2;
-@@ -1178,6 +1179,13 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize)
- /* this is the first part of the chain */
- orig_inbuf = inbuf;
- orig_outbuf = outbuf;
-+ orig_size = size;
-+ }
-+
-+ /* Validate smb_off2 */
-+ if ((smb_off2 < smb_wct - 4) || orig_size < (smb_off2 + 4 - smb_wct)) {
-+ exit_server_cleanly("Bad chained packet");
-+ return -1;
- }
-
- /*
-@@ -1192,6 +1200,11 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize)
- SSVAL(outbuf,smb_vwv1,smb_offset(outbuf+outsize,outbuf));
- SCVAL(outbuf,smb_vwv0,smb_com2);
-
-+ if (outsize <= smb_wct) {
-+ exit_server_cleanly("Bad chained packet");
-+ return -1;
-+ }
-+
- /* remember how much the caller added to the chain, only counting stuff
- after the parameter words */
- chain_size += outsize - smb_wct;
diff --git a/tools/android/depends/samba/samba30-3.0.37-configure.in.patch b/tools/android/depends/samba/samba30-3.0.37-configure.in.patch
deleted file mode 100644
index 3af1e125fc..0000000000
--- a/tools/android/depends/samba/samba30-3.0.37-configure.in.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- samba-3.0.25borig/source/configure.in 2007-05-23 08:29:20.000000000 -0700
-+++ samba3025bfinal/source/configure.in 2007-07-24 12:15:13.000000000 -0700
-@@ -1374,31 +1374,40 @@
- #
- case "$host_os" in
- *linux*)
-- # glibc <= 2.3.2 has a broken getgrouplist
-- AC_TRY_RUN([
-+
-+AC_CACHE_CHECK([for a broken Linux getgrouplist API],
-+ linux_getgrouplist_ok,
-+ [
-+ AC_TRY_RUN([
- #include <unistd.h>
- #include <sys/utsname.h>
--main() {
-- /* glibc up to 2.3 has a broken getgrouplist */
-+
-+ int main() {
-+ /* glibc up to 2.3 has a broken
-+getgrouplist */
- #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-- int libc_major = __GLIBC__;
-- int libc_minor = __GLIBC_MINOR__;
-+ int libc_major = __GLIBC__;
-+ int libc_minor = __GLIBC_MINOR__;
-+
-+ if (libc_major < 2)
-+ return 1;
-+ if ((libc_major == 2) && (libc_minor <= 3))
-+ return 1;
-+#endif
-+ return 0;
-+ }
-+
-+ ],
-+ [linux_getgrouplist_ok=yes],
-+ [linux_getgrouplist_ok=no],
-+ [linux_getgrouplist_ok=cross])
-+ ])
-+
-+ if test x"$linux_getgrouplist_ok" = x"yes"; then
-+ AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
-+ fi
-+
-
-- if (libc_major < 2)
-- exit(1);
-- if ((libc_major == 2) && (libc_minor <= 3))
-- exit(1);
--#endif
-- exit(0);
--}
--], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no])
-- if test x"$linux_getgrouplist_ok" = x"yes"; then
-- AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
-- fi
-- ;;
-- *)
-- AC_CHECK_FUNCS(getgrouplist)
-- ;;
- esac
-
- #
diff --git a/tools/android/depends/samba/samba30-3.0.37-silence-receive-warning.patch b/tools/android/depends/samba/samba30-3.0.37-silence-receive-warning.patch
deleted file mode 100644
index 92b84336c8..0000000000
--- a/tools/android/depends/samba/samba30-3.0.37-silence-receive-warning.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- samba-3.0.37-clean/source/libsmb/clientgen.c 2009-09-30 05:21:56.000000000 -0700
-+++ samba-3.0.37/source/libsmb/clientgen.c 2010-11-18 21:56:06.874516928 -0800
-@@ -108,7 +108,7 @@
-
- /* If the server is not responding, note that now */
- if (!ret) {
-- DEBUG(0, ("Receiving SMB: Server stopped responding\n"));
-+ DEBUG(1, ("Receiving SMB: Server stopped responding\n"));
- cli->smb_rw_error = smb_read_error;
- close(cli->fd);
- cli->fd = -1;
diff --git a/tools/android/depends/samba/samba30-3.0.37-vfs_default.c.patch b/tools/android/depends/samba/samba30-3.0.37-vfs_default.c.patch
deleted file mode 100644
index 7a640ecb85..0000000000
--- a/tools/android/depends/samba/samba30-3.0.37-vfs_default.c.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- samba-3.0.25borig/source/modules/vfs_default.c 2007-04-09 10:30:58.000000000 -0700
-+++ samba3025bfinal/source/modules/vfs_default.c 2007-07-24 12:18:07.000000000 -0700
-@@ -813,10 +813,11 @@
-
- START_PROFILE(syscall_linux_setlease);
-
--#ifdef LINUX
-+#ifdef HAVE_KERNEL_OPLOCKS_LINUX
- /* first set the signal handler */
-- if(linux_set_lease_sighandler(fd) == -1)
-+ if(linux_set_lease_sighandler(fd) == -1) {
- return -1;
-+ }
-
- result = linux_setlease(fd, leasetype);
- #else
diff --git a/tools/android/depends/samba/samba30-3.0.37-wle-fix.patch b/tools/android/depends/samba/samba30-3.0.37-wle-fix.patch
deleted file mode 100644
index 8a41f455a3..0000000000
--- a/tools/android/depends/samba/samba30-3.0.37-wle-fix.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-diff -r -u samba-3.0.37-clean/source/libsmb/asn1.c samba-3.0.37/source/libsmb/asn1.c
---- samba-3.0.37-clean/source/libsmb/asn1.c 2009-09-30 05:21:56.000000000 -0700
-+++ samba-3.0.37/source/libsmb/asn1.c 2010-11-18 12:40:06.981517350 -0800
-@@ -261,6 +261,36 @@
- return asn1_read(data, v, 1);
- }
-
-+/* peek to see if a tag is present */
-+/* this was not ported from samba and may not be identical to libsmb mainline */
-+BOOL asn1_peek_tag(ASN1_DATA *data, uint8 tag)
-+{
-+ uint8 curtag;
-+
-+ if (data->has_error)
-+ return False;
-+
-+ // overflow checking
-+ if (data->ofs + 1 < data->ofs || data->ofs + 1 < 1) {
-+ return False;
-+ }
-+
-+ // boundary checking
-+ if (data->ofs + 1 > data->length) {
-+ return False;
-+ }
-+
-+ memcpy( (void*)&curtag, data->data + data->ofs, 1);
-+
-+ // don't move cursor
-+ // don't set error
-+
-+ if( tag != curtag )
-+ return False;
-+
-+ return True;
-+}
-+
- /* start reading a nested asn1 structure */
- BOOL asn1_start_tag(ASN1_DATA *data, uint8 tag)
- {
-diff -r -u samba-3.0.37-clean/source/libsmb/clispnego.c samba-3.0.37/source/libsmb/clispnego.c
---- samba-3.0.37-clean/source/libsmb/clispnego.c 2009-09-30 05:21:56.000000000 -0700
-+++ samba-3.0.37/source/libsmb/clispnego.c 2010-11-18 12:52:54.833518134 -0800
-@@ -135,9 +135,16 @@
-
- asn1_start_tag(&data,ASN1_APPLICATION(0));
- asn1_check_OID(&data,OID_SPNEGO);
-+
-+ /* negTokenInit [0] NegTokenInit */
- asn1_start_tag(&data,ASN1_CONTEXT(0));
- asn1_start_tag(&data,ASN1_SEQUENCE(0));
-
-+ /* mechTypes [0] MechTypeList OPTIONAL */
-+
-+ /* Not really optional, we depend on this to decide
-+ * what mechanisms we have to work with. */
-+
- asn1_start_tag(&data,ASN1_CONTEXT(0));
- asn1_start_tag(&data,ASN1_SEQUENCE(0));
- for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS-1; i++) {
-@@ -150,7 +157,39 @@
- asn1_end_tag(&data);
-
- *principal = NULL;
-- if (asn1_tag_remaining(&data) > 0) {
-+
-+ /*
-+ Win7 + Live Sign-in Assistant attaches a mechToken
-+ ASN1_CONTEXT(2) to the negTokenInit packet
-+ which breaks our negotiation if we just assume
-+ the next tag is ASN1_CONTEXT(3).
-+ */
-+
-+ if (asn1_peek_tag(&data, ASN1_CONTEXT(1))) {
-+ uint8 flags;
-+
-+ /* reqFlags [1] ContextFlags OPTIONAL */
-+ asn1_start_tag(&data, ASN1_CONTEXT(1));
-+ asn1_start_tag(&data, ASN1_BITFIELD);
-+ while (asn1_tag_remaining(&data) > 0) {
-+ asn1_read_uint8(&data, &flags);
-+ }
-+ asn1_end_tag(&data);
-+ asn1_end_tag(&data);
-+ }
-+
-+ if (asn1_peek_tag(&data, ASN1_CONTEXT(2))) {
-+ /* mechToken [2] OCTET STRING OPTIONAL */
-+ DATA_BLOB token;
-+ asn1_start_tag(&data, ASN1_CONTEXT(2));
-+ asn1_read_OctetString(&data, &token);
-+ asn1_end_tag(&data);
-+ /* Throw away the token - not used. */
-+ data_blob_free(&token);
-+ }
-+
-+ if (asn1_peek_tag(&data, ASN1_CONTEXT(3))) {
-+ /* mechListMIC [3] OCTET STRING OPTIONAL */
- asn1_start_tag(&data, ASN1_CONTEXT(3));
- asn1_start_tag(&data, ASN1_SEQUENCE(0));
- asn1_start_tag(&data, ASN1_CONTEXT(0));
diff --git a/tools/android/depends/samba/samba_android.patch b/tools/android/depends/samba/samba_android.patch
deleted file mode 100644
index b48c0e7631..0000000000
--- a/tools/android/depends/samba/samba_android.patch
+++ /dev/null
@@ -1,220 +0,0 @@
---- source/lib/fault.c 2009-09-30 08:21:56.000000000 -0400
-+++ source/lib/fault.c 2012-05-11 00:55:11.115651420 -0400
-@@ -136,7 +136,7 @@
- #endif
- #endif
-
--#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
-+#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) && !defined(ANDROID)
- /* On Linux we lose the ability to dump core when we change our user
- * ID. We know how to dump core safely, so let's make sure we have our
- * dumpable flag set.
---- source/lib/system.c 2009-09-30 08:21:56.000000000 -0400
-+++ source/lib/system.c 2012-05-11 00:56:25.965651373 -0400
-@@ -1065,7 +1065,7 @@
- new_pwd.pw_passwd = SMB_STRDUP("x");
- new_pwd.pw_uid = uid;
- new_pwd.pw_gid = 100;
-- new_pwd.pw_gecos = SMB_STRDUP("faked user");
-+// new_pwd.pw_gecos = SMB_STRDUP("faked user");
- new_pwd.pw_dir = SMB_STRDUP("/nodir");
- new_pwd.pw_shell = SMB_STRDUP("/bin/false");
-
-@@ -1241,7 +1241,7 @@
- retval.pw_passwd = pwret->pw_passwd;
- retval.pw_uid = pwret->pw_uid;
- retval.pw_gid = pwret->pw_gid;
-- unix_to_unicode(retval.pw_gecos, pwret->pw_gecos, sizeof(retval.pw_gecos));
-+// unix_to_unicode(retval.pw_gecos, pwret->pw_gecos, sizeof(retval.pw_gecos));
- unix_to_unicode(retval.pw_dir, pwret->pw_dir, sizeof(retval.pw_dir));
- unix_to_unicode(retval.pw_shell, pwret->pw_shell, sizeof(retval.pw_shell));
-
-@@ -1264,7 +1264,7 @@
- retval.pw_passwd = pwret->pw_passwd;
- retval.pw_uid = pwret->pw_uid;
- retval.pw_gid = pwret->pw_gid;
-- unix_to_unicode(retval.pw_gecos, pwret->pw_gecos, sizeof(retval.pw_gecos));
-+// unix_to_unicode(retval.pw_gecos, pwret->pw_gecos, sizeof(retval.pw_gecos));
- unix_to_unicode(retval.pw_dir, pwret->pw_dir, sizeof(retval.pw_dir));
- unix_to_unicode(retval.pw_shell, pwret->pw_shell, sizeof(retval.pw_shell));
-
---- source/lib/util_pw.c 2009-09-30 08:21:56.000000000 -0400
-+++ source/lib/util_pw.c 2012-05-11 00:55:43.485651400 -0400
-@@ -32,7 +32,7 @@
- ret->pw_passwd = talloc_strdup(ret, from->pw_passwd);
- ret->pw_uid = from->pw_uid;
- ret->pw_gid = from->pw_gid;
-- ret->pw_gecos = talloc_strdup(ret, from->pw_gecos);
-+// ret->pw_gecos = talloc_strdup(ret, from->pw_gecos);
- ret->pw_dir = talloc_strdup(ret, from->pw_dir);
- ret->pw_shell = talloc_strdup(ret, from->pw_shell);
- return ret;
---- source/libads/dns.c 2009-09-30 08:21:56.000000000 -0400
-+++ source/libads/dns.c 2012-05-11 01:05:46.485651020 -0400
-@@ -38,6 +38,11 @@
-
- #define MAX_DNS_PACKET_SIZE 0xffff
-
-+# define C_IN 1
-+# define T_A 1
-+# define T_NS 2
-+# define NS_HFIXEDSZ 12
-+# define NS_PACKETSZ 512
- #ifdef NS_HFIXEDSZ /* Bind 8/9 interface */
- #if !defined(C_IN) /* AIX 5.3 already defines C_IN */
- # define C_IN ns_c_in
-@@ -45,18 +50,18 @@
- #if !defined(T_A) /* AIX 5.3 already defines T_A */
- # define T_A ns_t_a
- #endif
--# define T_SRV ns_t_srv
-+# define T_SRV 33
- #if !defined(T_NS) /* AIX 5.3 already defines T_NS */
--# define T_NS ns_t_ns
-+# define T_NS 2
- #endif
- #else
--# ifdef HFIXEDSZ
--# define NS_HFIXEDSZ HFIXEDSZ
--# else
--# define NS_HFIXEDSZ sizeof(HEADER)
--# endif /* HFIXEDSZ */
-+//# ifdef HFIXEDSZ
-+//# define NS_HFIXEDSZ HFIXEDSZ
-+//# else
-+//# define NS_HFIXEDSZ sizeof(HEADER)
-+//# endif /* HFIXEDSZ */
- # ifdef PACKETSZ
--# define NS_PACKETSZ PACKETSZ
-+# define NS_PACKETSZ 512
- # else /* 512 is usually the default */
- # define NS_PACKETSZ 512
- # endif /* PACKETSZ */
---- source/passdb/passdb.c 2009-09-30 08:21:56.000000000 -0400
-+++ source/passdb/passdb.c 2012-05-11 00:57:08.295651347 -0400
-@@ -143,7 +143,7 @@
- /* Basic properties based upon the Unix account information */
-
- pdb_set_username(user, pwd->pw_name, PDB_SET);
-- pdb_set_fullname(user, pwd->pw_gecos, PDB_SET);
-+// pdb_set_fullname(user, pwd->pw_gecos, PDB_SET);
- pdb_set_domain (user, get_global_sam_name(), PDB_DEFAULT);
- #if 0
- /* This can lead to a primary group of S-1-22-2-XX which
-diff -ruN source/lib/iconv.c source/lib/iconv.c
---- source/lib/iconv.c 2009-09-30 08:21:56.000000000 -0400
-+++ source/lib/iconv.c 2012-05-11 02:13:02.365648475 -0400
-@@ -20,6 +20,8 @@
- */
-
- #include "includes.h"
-+//#include <stdint.h>
-+//#include <asm/byteorder.h>
-
- /*
- * We have to use strcasecmp here as the character conversions
-@@ -489,6 +491,21 @@
- return 0;
- }
-
-+#include <stdint.h>
-+#include <asm/byteorder.h>
-+
-+void swab(const void *from, void*to, ssize_t n)
-+{
-+ ssize_t i;
-+
-+ if (n < 0)
-+ return;
-+
-+ for (i = 0; i < (n/2)*2; i += 2)
-+ *((uint16_t*)to+i) = __arch__swab16(*((uint16_t*)from+i));
-+}
-+
-+
- static size_t iconv_swab(void *cd, const char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft)
- {
-diff -ruN source/lib/replace/system/passwd.h source/lib/replace/system/passwd.h
---- source/lib/replace/system/passwd.h 2009-09-30 08:21:56.000000000 -0400
-+++ source/lib/replace/system/passwd.h 2012-05-11 02:19:27.025648232 -0400
-@@ -60,8 +60,8 @@
- #include <compat.h>
- #endif
-
--#ifdef REPLACE_GETPASS
--#define getpass(prompt) getsmbpass((prompt))
-+#ifndef REPLACE_GETPASS
-+#define getpass(prompt) NULL
- #endif
-
- #ifndef NGROUPS_MAX
-diff -ruN source/lib/system.c source/lib/system.c
---- source/lib/system.c 2012-05-11 00:56:25.965651373 -0400
-+++ source/lib/system.c 2012-05-11 02:22:37.945648112 -0400
-@@ -476,7 +476,8 @@
- #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_SEEKDIR64)
- seekdir64(dirp, offset);
- #else
-- seekdir(dirp, offset);
-+// seekdir64(dirp, offset);
-+ return;
- #endif
- }
-
-@@ -489,7 +490,8 @@
- #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_TELLDIR64)
- return (long)telldir64(dirp);
- #else
-- return (long)telldir(dirp);
-+// return (long)telldir(dirp);
-+ return(0);
- #endif
- }
-
-@@ -985,17 +987,19 @@
-
- void sys_setpwent(void)
- {
-- setpwent();
-+// setpwent();
- }
-
- struct passwd *sys_getpwent(void)
- {
-- return getpwent();
-+// return getpwent();
-+ return NULL;
-+
- }
-
- void sys_endpwent(void)
- {
-- endpwent();
-+// endpwent();
- }
-
- /**************************************************************************
-diff -ruN source/passdb/pdb_interface.c source/passdb/pdb_interface.c
---- source/passdb/pdb_interface.c 2009-09-30 08:21:56.000000000 -0400
-+++ source/passdb/pdb_interface.c 2012-05-11 02:22:29.085648117 -0400
-@@ -1380,8 +1380,8 @@
- }
-
- /* Primary group members */
-- setpwent();
-- while ((pwd = getpwent()) != NULL) {
-+ sys_setpwent();
-+ while ((pwd = sys_getpwent()) != NULL) {
- if (pwd->pw_gid == gid) {
- if (!add_uid_to_array_unique(mem_ctx, pwd->pw_uid,
- pp_uids, p_num)) {
-@@ -1389,7 +1389,7 @@
- }
- }
- }
-- endpwent();
-+ sys_endpwent();
-
- /* Secondary group members */
- for (gr = grp->gr_mem; (*gr != NULL) && ((*gr)[0] != '\0'); gr += 1) {
diff --git a/tools/android/depends/sqlite3/Makefile b/tools/android/depends/sqlite3/Makefile
deleted file mode 100644
index f8208cd99d..0000000000
--- a/tools/android/depends/sqlite3/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=sqlite
-VERSION=3071000
-SOURCE=$(LIBNAME)-autoconf-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-export CXXFLAGS+=-DSQLITE_ENABLE_COLUMN_METADATA=1
-export CFLAGS+=-DSQLITE_TEMP_STORE=3
-export TCLLIBDIR=/dev/null
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared \
- --enable-threadsafe --disable-tcl --disable-readline \
-
-LIBDYLIB=$(PLATFORM)/.libs/lib$(LIBNAME)3.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/swig-native/Makefile b/tools/android/depends/swig-native/Makefile
deleted file mode 100644
index 512203a4ba..0000000000
--- a/tools/android/depends/swig-native/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=swig
-VERSION=2.0.8
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --without-alllang --without-x
-
-LIBDYLIB=$(PLATFORM)/swig
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/taglib/Makefile b/tools/android/depends/taglib/Makefile
deleted file mode 100644
index cbb8724105..0000000000
--- a/tools/android/depends/taglib/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-LIBNAME=taglib
-VERSION=1.8
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
-
-LIBDYLIB=$(PLATFORM)/build/$(LIBNAME)/libtag.a
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); rm -rf build; mkdir -p build
- cd $(PLATFORM)/build; CC=$(CC) CXX=$(CXX) cmake \
- -DENABLE_STATIC=1 \
- -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_RANLIB=$(RANLIB) \
- -DCMAKE_FIND_ROOT_PATH="$(TOOLCHAIN)/sysroot/usr;$(PREFIX)" ..
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)/build
- touch $@
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/build install
- rm -f $(PREFIX)/lib/libtag_c.*
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM)/build clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/tiff-native/Makefile b/tools/android/depends/tiff-native/Makefile
deleted file mode 100644
index cabf30f2ae..0000000000
--- a/tools/android/depends/tiff-native/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=tiff
-VERSION=3.8.2
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) config/; \
- ./configure --prefix=$(PREFIX)
-
-LIBDYLIB=$(PLATFORM)/libtiff/.libs/lib$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/tiff/Makefile b/tools/android/depends/tiff/Makefile
deleted file mode 100644
index 2f02c9bb40..0000000000
--- a/tools/android/depends/tiff/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=tiff
-VERSION=3.8.2
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) config/; \
- ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
-
-LIBDYLIB=$(PLATFORM)/libtiff/.libs/lib$(LIBNAME).a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/tinyxml/Makefile b/tools/android/depends/tinyxml/Makefile
deleted file mode 100644
index 19239a69b3..0000000000
--- a/tools/android/depends/tinyxml/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-# lib name, version
-LIBNAME=tinyxml
-VERSION=2.6.2_2
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
-
-
-LIBDYLIB=$(PLATFORM)/src/.libs/libtinyxml.a
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(AUTORECONF) -vif
- cd $(PLATFORM); $(CONFIGURE)
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -j 1 -C $(PLATFORM)/src
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/src install
- touch $@
-
-clean:
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/depends/xbmc-pvr-addons/Makefile b/tools/android/depends/xbmc-pvr-addons/Makefile
deleted file mode 100644
index 6ded314d0b..0000000000
--- a/tools/android/depends/xbmc-pvr-addons/Makefile
+++ /dev/null
@@ -1,54 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-LIBNAME=xbmc-pvr-addons
-VERSION=5ef7f7f88c9dd3ca9c1daf57e7c92c005faa5910
-GIT_DIR=$(TARBALLS_LOCATION)/$(LIBNAME).git
-BASE_URL=git://github.com/opdenkamp/$(LIBNAME).git
-DYLIB=$(PLATFORM)/addons/pvr.demo/.libs/libpvrdemo-addon.so
-#tell git to use the addons repo rather than xbmc's repo
-export GIT_DIR
-export GIT_WORK_TREE=$(PLATFORM)
-
-#mysql_config is remarkably useless. Help configure find the right one.
-export MYSQL_CONFIG=$(PREFIX)/bin/mysql_config
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST) --enable-addons-with-dependencies
-
-all: .installed-$(PLATFORM)
-
-$(GIT_DIR)/HEAD:
- cd $(TARBALLS_LOCATION); git clone --bare $(BASE_URL)
-
-$(GIT_DIR)/current/$(VERSION): $(GIT_DIR)/HEAD $(DEPS)
- git rev-list -1 $(VERSION) >/dev/null || git fetch origin "+refs/heads/*:refs/remotes/origin/*"
- git rev-list -1 $(VERSION) >/dev/null
- rm -rf $(GIT_DIR)/current; mkdir -p $(GIT_DIR)/current
- touch $@
-
-$(PLATFORM)/bootstrap: $(GIT_DIR)/current/$(VERSION)
- rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
- git checkout $(VERSION) -- .
-
-$(PLATFORM)/configure: $(PLATFORM)/bootstrap
- cd $(PLATFORM); ./bootstrap
-
-$(PLATFORM)/Makefile: $(PLATFORM)/configure
- cd $(PLATFORM); $(CONFIGURE)
-
-$(DYLIB): $(PLATFORM)/Makefile
- make -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(DYLIB)
- $(MAKE) -C $(PLATFORM) install
- touch $@
-
-clean:
- -make -C $(PLATFORM) clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
- rm -rf $(GIT_DIR)/current
-
diff --git a/tools/android/depends/xbmc/Makefile b/tools/android/depends/xbmc/Makefile
deleted file mode 100644
index a5c5c3207b..0000000000
--- a/tools/android/depends/xbmc/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
--include ../Makefile.include
-
-SOURCE=../../../../
-
-export PYTHON_VERSION=2.6
-export PYTHON_LDFLAGS=-L$(PREFIX)/lib -lpython$(PYTHON_VERSION) -lc -ldl -lm -lexpat -lffi -lintl
-export PYTHON_CPPFLAGS=-I$(PREFIX)/include/python$(PYTHON_VERSION)
-export PYTHON_SITE_PKG=$(PREFIX)/lib/python$(PYTHON_VERSION)/site-packages
-export PYTHON_NOVERSIONCHECK=no-check
-export USE_TEXTUREPACKER_NATIVE_ROOT=$(NATIVEPREFIX)
-export MYSQL_CONFIG=$(PREFIX)/bin/mysql_config
-export LIBS+=-lcrystax
-
-export CXXFLAGS+=-O3
-export CFLAGS+=-O3
-
-# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) build-aux/ ;\
- ./configure --prefix=$(PREFIX) --host=$(HOST) \
- --enable-neon --enable-gles --enable-debug \
- --disable-sdl --disable-x11 --disable-xrandr \
- --disable-optical-drive --disable-joystick \
- --enable-shared-lib --disable-alsa
-
-
-all: $(SOURCE)/libxbmc.so
-
-
-$(SOURCE)/libxbmc.so:
- cd $(SOURCE); ./bootstrap
- cd $(SOURCE); $(CONFIGURE)
- cd $(SOURCE); $(MAKE)
- cd $(SOURCE); $(MAKE) apk
-
-../Makefile.include:
- $(error Please run edit and run setup-sdk.sh)
-
-clean:
- cd $(SOURCE); $(MAKE) clean
-
-distclean:
- cd $(SOURCE); $(MAKE) clean
diff --git a/tools/android/depends/yajl/Makefile b/tools/android/depends/yajl/Makefile
deleted file mode 100644
index 03965dc68b..0000000000
--- a/tools/android/depends/yajl/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile static.patch
-
-# lib name, version
-LIBNAME=yajl
-VERSION=2.0.1
-SOURCE=lloyd-$(LIBNAME)-f4b2b1a
-ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
-CMAKE=$(PREFIX)/bin/cmake
-# configuration settings
-LIBDYLIB=$(PLATFORM)/build/$(LIBNAME)-$(VERSION)/lib/libyajl.a
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- sed -ie "s|ADD_CUSTOM_TARGET|#ADD_CUSTOM_TARGET|g" "$(PLATFORM)/CMakeLists.txt"
- sed -ie "s|./run_tests.sh|#./run_tests.sh|g" "$(PLATFORM)/CMakeLists.txt"
- sed -ie "s|WORKING_DIRECTORY|#WORKING_DIRECTORY|g" "$(PLATFORM)/CMakeLists.txt"
- sed -ie "s|ADD_SUBDIRECTORY(reformatter)|#ADD_SUBDIRECTORY(reformatter)|g" "$(PLATFORM)/CMakeLists.txt"
- cd $(PLATFORM); patch -p0 < ../static.patch
- cd $(PLATFORM); patch -p0 < ../shared.patch
- cd $(PLATFORM); rm -rf build; mkdir -p build
- cd $(PLATFORM)/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_SYSTEM_NAME=Linux \
- -DCMAKE_FIND_ROOT_PATH=$(platform_sdk_path) ..
-
-$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)/build
-
-.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/build install
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM)/build clean
- rm -f .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/android/depends/yajl/shared.patch b/tools/android/depends/yajl/shared.patch
deleted file mode 100644
index 13ea0c7464..0000000000
--- a/tools/android/depends/yajl/shared.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/CMakeLists.txt.orig 2012-06-22 21:09:34.000000000 +0200
-+++ src/CMakeLists.txt 2012-06-22 21:11:49.000000000 +0200
-@@ -40,6 +40,8 @@
-
- TARGET_LINK_LIBRARIES(yajl_s m)
-
-+TARGET_LINK_LIBRARIES(yajl m)
-+
- #### setup shared library version number
- SET_TARGET_PROPERTIES(yajl PROPERTIES
- DEFINE_SYMBOL YAJL_SHARED
-@@ -79,7 +79,7 @@
- IF(NOT WIN32)
- # at build time you may specify the cmake variable LIB_SUFFIX to handle
- # 64-bit systems which use 'lib64'
-- INSTALL(TARGETS yajl LIBRARY DESTINATION lib${LIB_SUFFIX})
-+# INSTALL(TARGETS yajl LIBRARY DESTINATION lib${LIB_SUFFIX})
- INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX})
- INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl)
- INSTALL(FILES ${incDir}/yajl_version.h DESTINATION include/yajl)
diff --git a/tools/android/depends/yajl/static.patch b/tools/android/depends/yajl/static.patch
deleted file mode 100644
index ca1a9433ef..0000000000
--- a/tools/android/depends/yajl/static.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/CMakeLists.txt.orig 2011-04-28 04:48:41.000000000 +0200
-+++ src/CMakeLists.txt 2012-06-22 21:07:59.000000000 +0200
-@@ -38,12 +38,16 @@
-
- ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS})
-
-+TARGET_LINK_LIBRARIES(yajl_s m)
-+
- #### setup shared library version number
- SET_TARGET_PROPERTIES(yajl PROPERTIES
- DEFINE_SYMBOL YAJL_SHARED
- SOVERSION ${YAJL_MAJOR}
- VERSION ${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO})
-
-+SET_TARGET_PROPERTIES(yajl_s PROPERTIES OUTPUT_NAME yajl)
-+
- #### ensure a .dylib has correct absolute installation paths upon installation
- IF(APPLE)
- MESSAGE("INSTALL_NAME_DIR: ${CMAKE_INSTALL_PREFIX}/lib")
diff --git a/tools/android/depends/yasm/Makefile b/tools/android/depends/yasm/Makefile
deleted file mode 100644
index eb4c4e0e5e..0000000000
--- a/tools/android/depends/yasm/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-NATIVE_BUILD=1
-include ../Makefile.include
-DEPS= ../Makefile.include Makefile
-
-APPNAME=yasm
-VERSION=1.1.0
-SOURCE=$(APPNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.gz
-
-# configuration settings
-CONFIGURE=./configure --prefix=$(PREFIX)
-
-APP=$(PLATFORM)/$(APPNAME)
-
-CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
-
-all: .installed-$(PLATFORM)
-
-$(TARBALLS_LOCATION)/$(ARCHIVE):
- $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
-
-$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
- -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
- $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(CONFIGURE)
-
-$(APP): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
-
-.installed-$(PLATFORM): $(APP)
- $(MAKE) -C $(PLATFORM) install
- rm -rf $(PREFIX)/lib/libyasm.a
- touch $@
-
-clean:
- $(MAKE) -C $(PLATFORM) clean
- rm .installed-$(PLATFORM)
-
-distclean::
- rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/android/packaging/.gitignore b/tools/android/packaging/.gitignore
index 7132ab579f..0401aa1d7e 100644
--- a/tools/android/packaging/.gitignore
+++ b/tools/android/packaging/.gitignore
@@ -3,6 +3,8 @@ xbmc/assets/*
xbmc/lib/*
xbmc/libs/*
xbmc/obj/*
+xbmc/res/drawable/splash.png
+xbmc/src/R.java
xbmc/src/org/xbmc/xbmc/*.class
xbmc/classes.dex
tmp/*
diff --git a/tools/android/packaging/xbmc/AndroidManifest.xml b/tools/android/packaging/xbmc/AndroidManifest.xml
index 8210f0b534..31573a988a 100644
--- a/tools/android/packaging/xbmc/AndroidManifest.xml
+++ b/tools/android/packaging/xbmc/AndroidManifest.xml
@@ -2,11 +2,11 @@
<!-- BEGIN_INCLUDE(manifest) -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.xbmc.xbmc"
- android:versionCode="8"
- android:versionName="13.0-ALPHA2" >
+ android:versionCode="9"
+ android:versionName="13.0-ALPHA3" >
<!-- This is the platform API where NativeActivity was introduced. -->
- <uses-sdk android:minSdkVersion="9" />
+ <uses-sdk android:minSdkVersion="14" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
diff --git a/tools/buildsteps/README b/tools/buildsteps/README
new file mode 100644
index 0000000000..68c5354521
--- /dev/null
+++ b/tools/buildsteps/README
@@ -0,0 +1,15 @@
+This folder holds all the platform dependend build scripts which are called from the jenkins buildserver.
+
+The following ENV variables are available on all scripts:
+
+$WORKSPACE - the folder where jenkins checked out the source - XBMC_HOME so to say
+$Configuration - its either Debug, Release or Default and should be taken into account if possible (Defaults select platform default from <platformdir>/startbuild)
+$SDK_VERSION - the requested SDK_VERSION to be used for building. If "Default" is passed it uses the platform default from <platformdir>/startbuild
+$BUILDTHREADS - number of threads which can be used when building (e.x. use it for make -j$BUILDTHREADS)
+$XBMC_DEPENDS_ROOT - root for installing the xbmc build depends and toolchain helpers. If "Default" is passed it uses the platform default from <platformdir>/startbuild
+
+Additional ENV variables might be specified by the buildnodes. For android buildslaves these are:
+
+TOOLCHAIN - the used toolchain dir
+NDK_PATH - the path to the android native ndk
+SDK_PATH - the path to the android sdk \ No newline at end of file
diff --git a/tools/buildsteps/android/configure-depends b/tools/buildsteps/android/configure-depends
new file mode 100644
index 0000000000..13ab6cdd53
--- /dev/null
+++ b/tools/buildsteps/android/configure-depends
@@ -0,0 +1,15 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/opt/xbmc-tarballs \
+ --host=arm-linux-androideabi \
+ --with-sdk-path=$SDK_PATH \
+ --with-ndk=$NDK_PATH \
+ --with-sdk=android-$SDK_VERSION \
+ --with-toolchain=$TOOLCHAIN \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
diff --git a/tools/buildsteps/android/configure-xbmc b/tools/buildsteps/android/configure-xbmc
new file mode 100644
index 0000000000..afdd82a1d9
--- /dev/null
+++ b/tools/buildsteps/android/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/android/make-depends b/tools/buildsteps/android/make-depends
new file mode 100644
index 0000000000..2deb44a7cb
--- /dev/null
+++ b/tools/buildsteps/android/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/android/make-xbmc b/tools/buildsteps/android/make-xbmc
new file mode 100644
index 0000000000..738656fddb
--- /dev/null
+++ b/tools/buildsteps/android/make-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS
diff --git a/tools/buildsteps/android/package b/tools/buildsteps/android/package
new file mode 100644
index 0000000000..4708d969bb
--- /dev/null
+++ b/tools/buildsteps/android/package
@@ -0,0 +1,10 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make apk
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-armeabi-v7a.apk
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-armeabi-v7a.apk"
+mv xbmcapp-armeabi-*.apk $UPLOAD_FILENAME
diff --git a/tools/buildsteps/android/prepare-depends b/tools/buildsteps/android/prepare-depends
new file mode 100644
index 0000000000..8aabe48b7c
--- /dev/null
+++ b/tools/buildsteps/android/prepare-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+cd $WORKSPACE;git clean -xfd -e "tools/depends"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xfd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
diff --git a/tools/buildsteps/android/prepare-xbmc b/tools/buildsteps/android/prepare-xbmc
new file mode 100644
index 0000000000..020bc03022
--- /dev/null
+++ b/tools/buildsteps/android/prepare-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on android
diff --git a/tools/buildsteps/atv2/configure-depends b/tools/buildsteps/atv2/configure-depends
new file mode 100755
index 0000000000..f7b998b397
--- /dev/null
+++ b/tools/buildsteps/atv2/configure-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=arm-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
+
diff --git a/tools/buildsteps/atv2/configure-xbmc b/tools/buildsteps/atv2/configure-xbmc
new file mode 100755
index 0000000000..04acb68955
--- /dev/null
+++ b/tools/buildsteps/atv2/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/atv2/make-depends b/tools/buildsteps/atv2/make-depends
new file mode 100755
index 0000000000..a633bb621a
--- /dev/null
+++ b/tools/buildsteps/atv2/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/atv2/make-xbmc b/tools/buildsteps/atv2/make-xbmc
new file mode 100755
index 0000000000..743db59d11
--- /dev/null
+++ b/tools/buildsteps/atv2/make-xbmc
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+cd $WORKSPACE;xcodebuild -project XBMC-ATV2.xcodeproj -target XBMC -configuration $Configuration build \
+ ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
+ SDKROOT=iphoneos$SDK_VERSION XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT
diff --git a/tools/buildsteps/atv2/package b/tools/buildsteps/atv2/package
new file mode 100755
index 0000000000..d357e36b0c
--- /dev/null
+++ b/tools/buildsteps/atv2/package
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#ensure that dpkg tools are used from our toolchain
+export PATH=$XBMC_DEPENDS_ROOT/buildtools-native/bin/:$PATH
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-atv2/;./mkdeb-xbmc-atv2.sh $Configuration
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-atv2.deb
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-atv2.deb"
+mv *.deb $UPLOAD_FILENAME
diff --git a/tools/buildsteps/atv2/prepare-depends b/tools/buildsteps/atv2/prepare-depends
new file mode 100755
index 0000000000..133dee826d
--- /dev/null
+++ b/tools/buildsteps/atv2/prepare-depends
@@ -0,0 +1,15 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+#also skip pvraddons as long as they are deployed in tree
+cd $WORKSPACE;git clean -xfd -e "tools/depends" -e "addons/pvr.*"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xfd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
+
diff --git a/tools/buildsteps/atv2/prepare-xbmc b/tools/buildsteps/atv2/prepare-xbmc
new file mode 100755
index 0000000000..c3738f9e7a
--- /dev/null
+++ b/tools/buildsteps/atv2/prepare-xbmc
@@ -0,0 +1,6 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on ios
+
diff --git a/tools/buildsteps/defaultenv b/tools/buildsteps/defaultenv
new file mode 100644
index 0000000000..9547e835c0
--- /dev/null
+++ b/tools/buildsteps/defaultenv
@@ -0,0 +1,124 @@
+BUILDTHREADS=${BUILDTHREADS:-1}
+SDK_VERSION=${SDK_VERSION:-"Default"}
+Configuration=${Configuration:-"Default"}
+XBMC_DEPENDS_ROOT=${XBMC_DEPENDS_ROOT:-"Default"}
+PATH_CHANGE_REV_FILENAME=".last_success_revision"
+
+#set platform defaults
+#$XBMC_PLATFORM_DIR matches the platform subdirs!
+case $XBMC_PLATFORM_DIR in
+ atv2)
+ DEFAULT_SDK_VERSION=4.3
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+
+ ios)
+ DEFAULT_SDK_VERSION=4.3
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+
+ osx32)
+ DEFAULT_SDK_VERSION=10.8
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+
+ osx64)
+ DEFAULT_SDK_VERSION=10.8
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+ android)
+ DEFAULT_SDK_VERSION=10
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+esac
+
+if [ $SDK_VERSION == "Default" ]
+then
+ SDK_VERSION=$DEFAULT_SDK_VERSION
+fi
+
+if [ $XBMC_DEPENDS_ROOT == "Default" ]
+then
+ XBMC_DEPENDS_ROOT=$DEFAULT_XBMC_DEPENDS_ROOT
+fi
+
+if [ $Configuration == "Default" ]
+then
+ Configuration=$DEFAULT_CONFIGURATION
+fi
+
+#clamp release builds to 1 thread only
+if [ $Configuration == "Release" ]
+then
+ BUILDTHREADS=1
+fi
+
+#helper functions
+
+#hash a dir based on the git revision, SDK_PATH, NDK_PATH, SDK_VERSION, TOOLCHAIN and XBMC_DEPENDS_ROOT
+function getBuildHash ()
+{
+ local checkPath
+ checkPath="$1"
+ local hashStr
+ hashStr="$(git rev-list HEAD --max-count=1 -- $checkPath)"
+ hashStr="$hashStr $SDK_PATH $NDK_PATH $SDK_VERSION $TOOLCHAIN $XBMC_DEPENDS_ROOT"
+ echo $hashStr
+}
+
+function pathChanged ()
+{
+ local ret
+ local checkPath
+ ret="0"
+ #no optims in release builds!
+ if [ $Configuration == "Release" ]
+ then
+ echo "1"
+ return
+ fi
+
+ checkPath="$1"
+ if [ -e $checkPath/$PATH_CHANGE_REV_FILENAME ]
+ then
+ if [ "$(cat $checkPath/$PATH_CHANGE_REV_FILENAME)" != "$(getBuildHash $WORKSPACE/tools/depends)" ]
+ then
+ ret="1"
+ fi
+ else
+ ret="1"
+ fi
+
+ echo $ret
+}
+
+function tagSuccessFulBuild ()
+{
+ local checkPath
+ checkPath="$1"
+ echo "$(getBuildHash $checkPath)" > $checkPath/$PATH_CHANGE_REV_FILENAME
+}
+
+function getBuildRevDateStr ()
+{
+ local revStr
+ #fetch date-rev
+ revStr=`git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}' 2>/dev/null`
+ if [ "$?" == "0" ]
+ then
+ #fetch the first branch containing head
+ revStr=$revStr"-"`git branch -r --contains HEAD | head -n1 | awk '{gsub(".*/","");print $1}'`
+ if [ "$?" == "0" ]
+ then
+ echo $revStr
+ else
+ echo "Unknown"
+ fi
+ else
+ echo "Unknown"
+ fi
+}
diff --git a/tools/buildsteps/ios/configure-depends b/tools/buildsteps/ios/configure-depends
new file mode 100755
index 0000000000..d09f0cb269
--- /dev/null
+++ b/tools/buildsteps/ios/configure-depends
@@ -0,0 +1,12 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=arm-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
diff --git a/tools/buildsteps/ios/configure-xbmc b/tools/buildsteps/ios/configure-xbmc
new file mode 100755
index 0000000000..0ce4bf5e7a
--- /dev/null
+++ b/tools/buildsteps/ios/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/ios/make-depends b/tools/buildsteps/ios/make-depends
new file mode 100755
index 0000000000..d1e52dd43f
--- /dev/null
+++ b/tools/buildsteps/ios/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/ios/make-xbmc b/tools/buildsteps/ios/make-xbmc
new file mode 100755
index 0000000000..7693d21472
--- /dev/null
+++ b/tools/buildsteps/ios/make-xbmc
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+cd $WORKSPACE;xcodebuild -project XBMC-IOS.xcodeproj -target XBMC -configuration $Configuration build \
+ ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
+ SDKROOT=iphoneos$SDK_VERSION XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT
+
diff --git a/tools/buildsteps/ios/package b/tools/buildsteps/ios/package
new file mode 100755
index 0000000000..0b4830d139
--- /dev/null
+++ b/tools/buildsteps/ios/package
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#ensure that dpkg tools are used from our toolchain
+export PATH=$XBMC_DEPENDS_ROOT/buildtools-native/bin/:$PATH
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-ios/;./mkdeb-xbmc-ios.sh $Configuration
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-ios.deb
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-ios.deb"
+mv *.deb $UPLOAD_FILENAME
diff --git a/tools/buildsteps/ios/prepare-depends b/tools/buildsteps/ios/prepare-depends
new file mode 100755
index 0000000000..3d2eef33af
--- /dev/null
+++ b/tools/buildsteps/ios/prepare-depends
@@ -0,0 +1,14 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+#also skip pvraddons as long as they are deployed in tree
+cd $WORKSPACE;git clean -xfd -e "tools/depends" -e "addons/pvr.*"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xfd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
diff --git a/tools/buildsteps/ios/prepare-xbmc b/tools/buildsteps/ios/prepare-xbmc
new file mode 100755
index 0000000000..4b75e9158a
--- /dev/null
+++ b/tools/buildsteps/ios/prepare-xbmc
@@ -0,0 +1,6 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on ios
+
diff --git a/tools/buildsteps/osx32/configure-depends b/tools/buildsteps/osx32/configure-depends
new file mode 100755
index 0000000000..3ccfc3553c
--- /dev/null
+++ b/tools/buildsteps/osx32/configure-depends
@@ -0,0 +1,12 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=i386-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
diff --git a/tools/buildsteps/osx32/configure-xbmc b/tools/buildsteps/osx32/configure-xbmc
new file mode 100755
index 0000000000..b7456ca4fd
--- /dev/null
+++ b/tools/buildsteps/osx32/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/osx32/make-depends b/tools/buildsteps/osx32/make-depends
new file mode 100755
index 0000000000..e4d4d3030d
--- /dev/null
+++ b/tools/buildsteps/osx32/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/osx32/make-xbmc b/tools/buildsteps/osx32/make-xbmc
new file mode 100755
index 0000000000..f93348ba7c
--- /dev/null
+++ b/tools/buildsteps/osx32/make-xbmc
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+
+cd $WORKSPACE;xcodebuild -sdk macosx$SDK_VERSION -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES \
+ ARCHS=i386 VALID_ARCHS=i386 XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT -configuration $Configuration build
diff --git a/tools/buildsteps/osx32/package b/tools/buildsteps/osx32/package
new file mode 100755
index 0000000000..5bce61925a
--- /dev/null
+++ b/tools/buildsteps/osx32/package
@@ -0,0 +1,10 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-osx/;./mkdmg-xbmc-osx.sh $Configuration
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-i386.dmg
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-i386.dmg"
+mv *.dmg $UPLOAD_FILENAME
diff --git a/tools/buildsteps/osx32/prepare-depends b/tools/buildsteps/osx32/prepare-depends
new file mode 100755
index 0000000000..e3661ccde1
--- /dev/null
+++ b/tools/buildsteps/osx32/prepare-depends
@@ -0,0 +1,14 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+#also skip pvraddons as long as they are deployed in tree
+cd $WORKSPACE;git clean -xfd -e "tools/depends" -e "addons/pvr.*"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xfd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
diff --git a/tools/buildsteps/osx32/prepare-xbmc b/tools/buildsteps/osx32/prepare-xbmc
new file mode 100755
index 0000000000..01f97dac74
--- /dev/null
+++ b/tools/buildsteps/osx32/prepare-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on osx
diff --git a/tools/buildsteps/osx64/configure-depends b/tools/buildsteps/osx64/configure-depends
new file mode 100755
index 0000000000..62f97700b3
--- /dev/null
+++ b/tools/buildsteps/osx64/configure-depends
@@ -0,0 +1,12 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=x86_64-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
diff --git a/tools/buildsteps/osx64/configure-xbmc b/tools/buildsteps/osx64/configure-xbmc
new file mode 100755
index 0000000000..92e13e24e6
--- /dev/null
+++ b/tools/buildsteps/osx64/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/osx64/make-depends b/tools/buildsteps/osx64/make-depends
new file mode 100755
index 0000000000..11a62bf470
--- /dev/null
+++ b/tools/buildsteps/osx64/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/osx64/make-xbmc b/tools/buildsteps/osx64/make-xbmc
new file mode 100755
index 0000000000..421613e5e3
--- /dev/null
+++ b/tools/buildsteps/osx64/make-xbmc
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+
+cd $WORKSPACE;xcodebuild -sdk macosx$SDK_VERSION -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES \
+ ARCHS=x86_64 VALID_ARCHS=x86_64 XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT -configuration $Configuration build
diff --git a/tools/buildsteps/osx64/package b/tools/buildsteps/osx64/package
new file mode 100755
index 0000000000..ac50195325
--- /dev/null
+++ b/tools/buildsteps/osx64/package
@@ -0,0 +1,10 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-osx/;./mkdmg-xbmc-osx.sh $Configuration
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-x86_64.dmg
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-x86_64.dmg"
+mv *.dmg $UPLOAD_FILENAME
diff --git a/tools/buildsteps/osx64/prepare-depends b/tools/buildsteps/osx64/prepare-depends
new file mode 100755
index 0000000000..81403fadda
--- /dev/null
+++ b/tools/buildsteps/osx64/prepare-depends
@@ -0,0 +1,14 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+#also skip pvraddons as long as they are deployed in tree
+cd $WORKSPACE;git clean -xfd -e "tools/depends" -e "addons/pvr.*"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xfd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
diff --git a/tools/buildsteps/osx64/prepare-xbmc b/tools/buildsteps/osx64/prepare-xbmc
new file mode 100755
index 0000000000..6eea638e97
--- /dev/null
+++ b/tools/buildsteps/osx64/prepare-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on osx
diff --git a/tools/buildsteps/win32/download-depends.bat b/tools/buildsteps/win32/download-depends.bat
new file mode 100644
index 0000000000..6faf963a51
--- /dev/null
+++ b/tools/buildsteps/win32/download-depends.bat
@@ -0,0 +1,40 @@
+@ECHO OFF
+
+SETLOCAL
+
+SET CUR_PATH=%WORKSPACE%\project\BuildDependencies
+SET TMP_PATH=%WORKSPACE%\project\BuildDependencies\scripts\tmp
+SET XBMC_PATH=%WORKSPACE%
+
+cd %CUR_PATH%
+
+rem can't run rmdir and md back to back. access denied error otherwise.
+IF EXIST lib rmdir lib /S /Q
+IF EXIST include rmdir include /S /Q
+IF EXIST %TMP_PATH% rmdir %TMP_PATH% /S /Q
+
+IF $%1$ == $$ (
+ SET DL_PATH="%CD%\downloads"
+) ELSE (
+ SET DL_PATH="%1"
+)
+
+SET WGET=%CUR_PATH%\bin\wget
+SET ZIP=%CUR_PATH%\..\Win32BuildSetup\tools\7z\7za
+
+IF NOT EXIST %DL_PATH% md %DL_PATH%
+
+md lib
+md include
+md %TMP_PATH%
+
+cd scripts
+
+FOR /F "tokens=*" %%S IN ('dir /B "*_d.bat"') DO (
+ echo running %%S ...
+ CALL %%S
+)
+
+cd %CUR_PATH%
+
+rmdir %TMP_PATH% /S /Q \ No newline at end of file
diff --git a/tools/buildsteps/win32/download-msys.bat b/tools/buildsteps/win32/download-msys.bat
new file mode 100644
index 0000000000..a1e72e778b
--- /dev/null
+++ b/tools/buildsteps/win32/download-msys.bat
@@ -0,0 +1,72 @@
+@ECHO OFF
+
+SETLOCAL
+
+SET CUR_PATH=%WORKSPACE%\project\BuildDependencies
+SET XBMC_PATH=%WORKSPACE%
+SET TMP_PATH=%CUR_PATH%\scripts\tmp
+
+SET MSYS_INSTALL_PATH="%CUR_PATH%\msys"
+SET MINGW_INSTALL_PATH="%CUR_PATH%\msys\mingw"
+
+cd %CUR_PATH%
+
+rem can't run rmdir and md back to back. access denied error otherwise.
+IF EXIST %MSYS_INSTALL_PATH% rmdir %MSYS_INSTALL_PATH% /S /Q
+IF EXIST %TMP_PATH% rmdir %TMP_PATH% /S /Q
+
+IF $%1$ == $$ (
+ SET DL_PATH="%CD%\downloads2"
+) ELSE (
+ SET DL_PATH="%1"
+)
+
+SET WGET=%CUR_PATH%\bin\wget
+SET ZIP=%CUR_PATH%\..\Win32BuildSetup\tools\7z\7za
+
+IF NOT EXIST %DL_PATH% md %DL_PATH%
+
+IF NOT EXIST %MSYS_INSTALL_PATH% md %MSYS_INSTALL_PATH%
+IF NOT EXIST %MINGW_INSTALL_PATH% md %MINGW_INSTALL_PATH%
+IF NOT EXIST %TMP_PATH% md %TMP_PATH%
+
+cd scripts
+
+CALL get_msys_env.bat
+IF EXIST %TMP_PATH% rmdir %TMP_PATH% /S /Q
+CALL get_mingw_env.bat
+
+cd %CUR_PATH%
+
+rem update fstab to install path
+SET FSTAB=%MINGW_INSTALL_PATH%
+SET FSTAB=%FSTAB:\=/%
+SET FSTAB=%FSTAB:"=%
+ECHO %FSTAB% /mingw>>"%MSYS_INSTALL_PATH%\etc\fstab"
+SET FSTAB=%XBMC_PATH%
+SET FSTAB=%FSTAB:\=/%
+SET FSTAB=%FSTAB:"=%
+ECHO %FSTAB% /xbmc>>"%MSYS_INSTALL_PATH%\etc\fstab"
+
+rem patch mingw headers to compile ffmpeg
+xcopy mingw_support\postinstall\* "%MSYS_INSTALL_PATH%\postinstall\" /E /Q /I /Y
+cd "%MSYS_INSTALL_PATH%\postinstall"
+CALL pi_patches.bat
+
+cd %CUR_PATH%
+
+rem insert call to vcvars32.bat in msys.bat
+SET NET90VARS="%VS90COMNTOOLS%..\..\VC\bin\vcvars32.bat"
+SET NET100VARS="%VS100COMNTOOLS%..\..\VC\bin\vcvars32.bat"
+cd %MSYS_INSTALL_PATH%
+Move msys.bat msys.bat_dist
+IF EXIST %NET100VARS% (
+ ECHO CALL %NET100VARS%>>msys.bat
+) ELSE IF EXIST %NET90VARS% (
+ ECHO CALL %NET90VARS%>>msys.bat
+)
+TYPE msys.bat_dist>>msys.bat
+
+cd %CUR_PATH%
+
+IF EXIST %TMP_PATH% rmdir %TMP_PATH% /S /Q
diff --git a/tools/buildsteps/win32/make-xbmc.bat b/tools/buildsteps/win32/make-xbmc.bat
new file mode 100644
index 0000000000..19d8e69a68
--- /dev/null
+++ b/tools/buildsteps/win32/make-xbmc.bat
@@ -0,0 +1,176 @@
+@ECHO OFF
+rem ----Usage----
+rem BuildSetup [clean|noclean]
+rem clean to force a full rebuild
+rem noclean to force a build without clean
+rem noprompt to avoid all prompts
+CLS
+COLOR 1B
+TITLE XBMC for Windows Build Script
+rem ----PURPOSE----
+rem - Create a working XBMC build with a single click
+rem -------------------------------------------------------------
+rem Config
+rem If you get an error that Visual studio was not found, SET your path for VSNET main executable.
+rem -------------------------------------------------------------
+rem CONFIG START
+SET comp=vs2010
+SET buildconfig=Release (DirectX)
+SET buildmode=ask
+SET promptlevel=prompt
+SET buildmingwlibs=true
+SET exitcode=0
+FOR %%b in (%1, %2, %3, %4, %5) DO (
+ IF %%b==clean SET buildmode=clean
+ IF %%b==noclean SET buildmode=noclean
+ IF %%b==noprompt SET promptlevel=noprompt
+ IF %%b==nomingwlibs SET buildmingwlibs=false
+)
+
+IF $%Configuration%$ == $$ (
+ IF %Configuration%==Release SET buildconfig=Release (DirectX)
+ IF %Configuration%==Debug SET buildconfig=Debug (DirectX)
+)
+
+SET BS_DIR=%WORKSPACE%\project\Win32BuildSetup
+cd %BS_DIR%
+
+IF %comp%==vs2010 (
+ IF "%VS100COMNTOOLS%"=="" (
+ set NET="%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe"
+ ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\VCExpress.exe" (
+ set NET="%VS100COMNTOOLS%\..\IDE\VCExpress.exe"
+ ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\devenv.exe" (
+ set NET="%VS100COMNTOOLS%\..\IDE\devenv.exe"
+ )
+)
+
+IF NOT EXIST %NET% (
+ set DIETEXT=Visual Studio .NET 2010 Express was not found.
+ goto DIE
+)
+
+set OPTS_EXE="..\VS2010Express\XBMC for Windows.sln" /build "%buildconfig%"
+set CLEAN_EXE="..\VS2010Express\XBMC for Windows.sln" /clean "%buildconfig%"
+set EXE= "..\VS2010Express\XBMC\%buildconfig%\XBMC.exe"
+set PDB= "..\VS2010Express\XBMC\%buildconfig%\XBMC.pdb"
+
+rem CONFIG END
+rem -------------------------------------------------------------
+
+echo :
+echo :::
+echo ::::
+echo ::::
+echo ::::::: ::::::::::::::::: :::::: :::::: :::::::
+echo ::::::::: :::::::::::::::::::: :::::::::: :::::::::: :::::::::
+echo ::::::::: :::::::::::::::::::::: :::::::::::::::::::::::: :::::::::
+echo ::::::::: ::: ::::: ::::: :::::::: :::: :::::
+echo :::::: :::: :::: :::: ::::: :::::::
+echo ::::: :::: ::::::: ::::: ::::::
+echo ::::: ::: :::::: ::: ::::::
+echo :::: ::: :::::: :::: ::::::
+echo :::: ::: ::::::: :::: ::::::
+echo ::::: :::: ::::::: :::: ::::::
+echo ::::::: :::: :::::::: ::: :::::::
+echo ::::::::::::::: ::::: ::::: ::: ::: :::::::::
+echo ::::::::: ::::::::: ::::::::::: ::: ::: ::: :::::::::
+echo :::::::: ::::::::: ::::::::: ::: ::: ::: ::::::::
+echo :::::: ::::::: ::::: : :: :: ::::::
+echo Building %buildconfig%
+goto EXE_COMPILE
+
+:EXE_COMPILE
+ IF EXIST buildlog.html del buildlog.html /q
+ IF %buildmode%==clean goto COMPILE_EXE
+ IF %buildmode%==noclean goto COMPILE_NO_CLEAN_EXE
+ rem ---------------------------------------------
+ rem check for existing exe
+ rem ---------------------------------------------
+
+ IF EXIST %EXE% (
+ goto EXE_EXIST
+ )
+ goto COMPILE_EXE
+
+:EXE_EXIST
+ IF %promptlevel%==noprompt goto COMPILE_EXE
+ ECHO ------------------------------------------------------------
+ ECHO Found a previous Compiled WIN32 EXE!
+ ECHO [1] a NEW EXE will be compiled for the BUILD_WIN32
+ ECHO [2] existing EXE will be updated (quick mode compile) for the BUILD_WIN32
+ ECHO ------------------------------------------------------------
+ set /P XBMC_COMPILE_ANSWER=Compile a new EXE? [1/2]:
+ if /I %XBMC_COMPILE_ANSWER% EQU 1 goto COMPILE_EXE
+ if /I %XBMC_COMPILE_ANSWER% EQU 2 goto COMPILE_NO_CLEAN_EXE
+
+:COMPILE_EXE
+ ECHO Wait while preparing the build.
+ ECHO ------------------------------------------------------------
+ ECHO Cleaning Solution...
+ %NET% %CLEAN_EXE%
+ ECHO Compiling XBMC...
+ %NET% %OPTS_EXE%
+ IF NOT EXIST %EXE% (
+ set DIETEXT="XBMC.EXE failed to build! See %WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
+ IF %promptlevel%==noprompt (
+ type "%WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
+ )
+ goto DIE
+ )
+ ECHO Done!
+ ECHO ------------------------------------------------------------
+ set buildmode=clean
+ GOTO END
+
+:COMPILE_NO_CLEAN_EXE
+ ECHO Wait while preparing the build.
+ ECHO ------------------------------------------------------------
+ ECHO Compiling Solution...
+ %NET% %OPTS_EXE%
+ IF NOT EXIST %EXE% (
+ set DIETEXT="XBMC.EXE failed to build! See %WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
+ IF %promptlevel%==noprompt (
+ type "%WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
+ )
+ goto DIE
+ )
+ ECHO Done!
+ ECHO ------------------------------------------------------------
+ GOTO END
+
+
+:DIE
+ ECHO ------------------------------------------------------------
+ ECHO !-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-
+ ECHO ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR
+ ECHO !-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-
+ set DIETEXT=ERROR: %DIETEXT%
+ echo %DIETEXT%
+ SET exitcode=1
+ ECHO ------------------------------------------------------------
+
+:VIEWLOG_EXE
+ SET log="%WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
+ IF NOT EXIST %log% goto END
+
+ copy %log% ./buildlog.html > NUL
+
+ IF %promptlevel%==noprompt (
+ goto END
+ )
+
+ set /P XBMC_BUILD_ANSWER=View the build log in your HTML browser? [y/n]
+ if /I %XBMC_BUILD_ANSWER% NEQ y goto END
+
+ SET log="%WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\" XBMC.log
+
+ start /D%log%
+ goto END
+
+:END
+ IF %promptlevel% NEQ noprompt (
+ ECHO Press any key to exit...
+ pause > NUL
+ )
+ EXIT /B %exitcode% \ No newline at end of file
diff --git a/tools/buildsteps/win32/prepare-env.bat b/tools/buildsteps/win32/prepare-env.bat
new file mode 100644
index 0000000000..32ab40fcf1
--- /dev/null
+++ b/tools/buildsteps/win32/prepare-env.bat
@@ -0,0 +1,20 @@
+@ECHO OFF
+
+ECHO Workspace is %WORKSPACE%
+
+rem git clean the untracked files but not the directories
+rem to keep the downloaded dependencies
+rem we assume git in path as this is a requirement
+
+cd %WORKSPACE%
+ECHO running git clean -xf
+git clean -xf
+
+rem cleaning additional directories
+ECHO delete build directories
+IF EXIST %WORKSPACE%\project\Win32BuildSetup\BUILD_WIN32 rmdir %WORKSPACE%\project\Win32BuildSetup\BUILD_WIN32 /S /Q
+IF EXIST %WORKSPACE%\project\Win32BuildSetup\dependencies rmdir %WORKSPACE%\project\Win32BuildSetup\dependencies /S /Q
+
+IF EXIST %WORKSPACE%\project\BuildDependencies\include rmdir %WORKSPACE%\project\BuildDependencies\include /S /Q
+IF EXIST %WORKSPACE%\project\BuildDependencies\lib rmdir %WORKSPACE%\project\BuildDependencies\lib /S /Q
+IF EXIST %WORKSPACE%\project\BuildDependencies\msys rmdir %WORKSPACE%\project\BuildDependencies\msys /S /Q \ No newline at end of file
diff --git a/tools/darwin/depends/.autom4te.cfg b/tools/darwin/depends/.autom4te.cfg
deleted file mode 100644
index 8f415d6072..0000000000
--- 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 90d63bb201..0000000000
--- 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 94a9ed024d..0000000000
--- 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. <http://fsf.org/>
- 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.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-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:
-
- <program> Copyright (C) <year> <name of author>
- 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
-<http://www.gnu.org/licenses/>.
-
- 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
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/tools/darwin/depends/Makefile.buildtools b/tools/darwin/depends/Makefile.buildtools
deleted file mode 100644
index f83a269b1e..0000000000
--- 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 b1ff6671ec..0000000000
--- 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 25e704bbb6..0000000000
--- 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 3411b69bd5..0000000000
--- 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=<some 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 7bcace2812..0000000000
--- 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 <gcrypt.h>
-- #include <stdio.h>],[
-- 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 80507b5725..0000000000
--- 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 <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
- #include <pthread.h>
-
-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 9f3c20f35e..0000000000
--- 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 50250bc0af..0000000000
--- 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 4b7c916da3..0000000000
--- 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 3e09f40dc5..0000000000
--- 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 <string.h>
-+#include <afpfs-ng/afp.h>
-+
-+
-+/*
-+ * 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 253fb05c97..0000000000
--- 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 ff7ce44bdb..0000000000
--- 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 <sys/time.h>
- #include <sys/types.h>
- #include <sys/socket.h>
--#include <errno.h>
-
- #include <afpfs-ng/afp_protocol.h>
- #include <afpfs-ng/libafpclient.h>
---- 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 09e9a35231..0000000000
--- 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 b5926bceed..0000000000
--- 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 a6de49dc03..0000000000
--- 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 f507a485ef..0000000000
--- 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 <string.h>
- #include <stdio.h>
-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 <string.h>
- #include <pthread.h>
-
--#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 <grp.h>
-
- #include "config.h"
--#include <afp.h>
-+#include <afpfs-ng/afp.h>
- #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 <getopt.h>
- #include <signal.h>
-
--#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 <signal.h>
- #include <sys/socket.h>
-
--#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 <unistd.h>
- #include <string.h>
- #include <stdio.h>
--#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 <fuse.h>
- #include <stdio.h>
-@@ -39,10 +39,10 @@
- #include <pwd.h>
- #include <stdarg.h>
-
--#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 <arpa/inet.h>
-+#include <pthread.h>
-+#include <netdb.h>
-+#include <sys/statvfs.h>
-+#include <pwd.h>
-+#include <afpfs-ng/afp_protocol.h>
-+#include <afpfs-ng/libafpclient.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <netinet/in.h>
-+
-+
-+#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 <sys/types.h>
-+#include <stddef.h>
-+#include <unistd.h>
-+#include <stdint.h>
-+
-+/* 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 <unistd.h>
-+#include <syslog.h>
-+
-+#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 <utime.h>
-+#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 <stdio.h>
-+
-+#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 <arpa/inet.h>
--#include <pthread.h>
--#include <netdb.h>
--#include <sys/statvfs.h>
--#include <pwd.h>
--#include <afp_protocol.h>
--#include <libafpclient.h>
--#include <sys/types.h>
--#include <sys/stat.h>
--#include <unistd.h>
--#include <netinet/in.h>
--
--
--#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 <sys/types.h>
--#include <stddef.h>
--#include <unistd.h>
--#include <stdint.h>
--
--/* 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 <unistd.h>
--#include <syslog.h>
--
--#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 <utime.h>
--#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 <stdio.h>
--
--#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 <config.h>
-
- #include <stdio.h>
-@@ -21,17 +21,17 @@
- #include <sys/socket.h>
- #include <errno.h>
-
--#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 <stdio.h>
- #include <stdlib.h>
- #include <errno.h>
--#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 <afp.h>
--#include <libafpclient.h>
-+#include <afpfs-ng/afp.h>
-+#include <afpfs-ng/libafpclient.h>
-
-
- 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 <string.h>
- #include <stdlib.h>
--#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 <string.h>
- #include <sys/socket.h>
-
--#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 <string.h>
- #include <stdio.h>
-
--#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 <signal.h>
- #include <iconv.h>
-
--#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 <stdlib.h>
- #include <pthread.h>
-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 <stdarg.h>
- #include <string.h>
- #include <stdlib.h>
--#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 <sys/time.h>
- #include <signal.h>
-
--#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 <fcntl.h>
- #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 <string.h>
--#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 <unistd.h>
- #include <sys/time.h>
-
--#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 <sys/stat.h>
- #include <string.h>
-@@ -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 <string.h>
- #include <stdlib.h>
--#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 <string.h>
- #include <stdlib.h>
-
--#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 <string.h>
- #include <stdlib.h>
-
--#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 <stdlib.h>
- #include <string.h>
--#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 <stdlib.h>
- #include <string.h>
-
--#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 <stdlib.h>
- #include <string.h>
--#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 <stdlib.h>
- #include <string.h>
-
--#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 <string.h>
--#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 <stdlib.h>
- #include <string.h>
--#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 <stdlib.h>
- #include <string.h>
--#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 <string.h>
- #include <stdlib.h>
--#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 <string.h>
- #include <errno.h>
- #include <fcntl.h>
--#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 <string.h>
- #include <time.h>
-
--#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 <string.h>
- #include <stdio.h>
--#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 <string.h>
- #include <stdlib.h>
--#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 <grp.h>
- #include <string.h>
-
--#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 <stdio.h>
- #include <string.h>
- #include <stdlib.h>
--#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 8fd6fba5af..0000000000
--- 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 d3017f29bb..0000000000
--- 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 4e331282e1..0000000000
--- 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 ' <cflags>"-isysroot $(boost_flags) -fvisibility=default -fvisibility-inlines-hidden"' >> $(SOURCE)/tools/build/v2/user-config.jam
- echo ' <cxxflags>"-isysroot $(boost_flags) -fvisibility=default -fvisibility-inlines-hidden"' >> $(SOURCE)/tools/build/v2/user-config.jam
- echo ' <linkflags>"-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 86f8985ee2..0000000000
--- 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 <pdimov@boostpro.com>
-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 <boost/smart_ptr/detail/yield_k.hpp>
-
-+#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 de5888d737..0000000000
--- 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 <pdimov@boostpro.com>
-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 25d958da2f..0000000000
--- 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 94aeb84684..0000000000
--- 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 5ca22f93c6..0000000000
--- 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 5390a950f6..0000000000
--- 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 89c1735cd5..0000000000
--- 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 e8b9a5e0fa..0000000000
--- 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 4159ed7d90..0000000000
--- 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 48f0f9a0e3..0000000000
--- 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 7b1b5954db..0000000000
--- 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 63527081ee..0000000000
--- 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 610e7af7e8..0000000000
--- 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 cb51291d2f..0000000000
--- 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 334cbbaf81..0000000000
--- 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 aad48491c3..0000000000
--- 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 7eb8bdef49..0000000000
--- 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 6a0ee921ac..0000000000
--- 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 e3a051430c..0000000000
--- 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 d903ba107e..0000000000
--- 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 b9decc2eb8..0000000000
--- 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 (<ASMFILE>) {
- # remove all comments (to avoid interfering with evaluating directives)
- s/(?<!\\)$comm.*//x;
-
- # comment out unsupported directives
- s/\.type/$comm.type/x;
- s/\.func/$comm.func/x;
- s/\.endfunc/$comm.endfunc/x;
- s/\.ltorg/$comm.ltorg/x;
- s/\.size/$comm.size/x;
- s/\.fpu/$comm.fpu/x;
- s/\.arch/$comm.arch/x;
- s/\.object_arch/$comm.object_arch/x;
-
- # the syntax for these is a little different
- s/\.global/.globl/x;
- # also catch .section .rodata since the equivalent to .const_data is .section __DATA,__const
- s/(.*)\.rodata/.const_data/x;
- s/\.int/.long/x;
- s/\.float/.single/x;
-
- # catch unknown section names that aren't mach-o style (with a comma)
- if (/.section ([^,]*)$/) {
- die ".section $1 unsupported; figure out the mach-o section name and add it";
- }
-
- parse_line($_);
-}
-
-sub eval_expr {
- my $expr = $_[0];
- $expr =~ s/([A-Za-z._][A-Za-z0-9._]*)/$symbols{$1}/g;
- eval $expr;
-}
-
-sub handle_if {
- 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 ($line =~ /\.if(n?)([a-z]*)\s+(.*)/) {
- my $result = $1 eq "n";
- my $type = $2;
- my $expr = $3;
-
- if ($type eq "b") {
- $expr =~ s/\s//g;
- $result ^= $expr eq "";
- } elsif ($type eq "c") {
- if ($expr =~ /(.*)\s*,\s*(.*)/) {
- $result ^= $1 eq $2;
- } else {
- die "argument to .ifc not recognized";
- }
- } elsif ($type eq "") {
- $result ^= eval_expr($expr) != 0;
- } elsif ($type eq "eq") {
- $result = eval_expr($expr) == 0;
- } elsif ($type eq "lt") {
- $result = eval_expr($expr) < 0;
- } else {
- chomp($line);
- die "unhandled .if varient. \"$line\"";
- }
- push (@ifstack, $result);
- return 1;
- } else {
- return 0;
- }
-}
-
-sub parse_line {
- my $line = @_[0];
-
- # evaluate .if blocks
- if (scalar(@ifstack)) {
- if (/\.endif/) {
- pop(@ifstack);
- return;
- } elsif ($line =~ /\.elseif\s+(.*)/) {
- if ($ifstack[-1] == 0) {
- $ifstack[-1] = !!eval_expr($1);
- } elsif ($ifstack[-1] > 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 <reg>, =<expr>
-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 <reg>, =<expr>
- 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 da129dea47..0000000000
--- 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 cc01d2f0d4..0000000000
--- 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 <string.h>
-
- #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 c0171ce6ff..0000000000
--- 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 c61080d9b1..0000000000
--- 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 c99a102b5c..0000000000
--- 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 ab033a0cac..0000000000
--- 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 f4ed096252..0000000000
--- 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 b950a5a681..0000000000
--- 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 ee18a59ce9..0000000000
--- 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 99e1bf486c..0000000000
--- 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 74d30e8959..0000000000
--- 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 7617ad4239..0000000000
--- 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 409bd19a89..0000000000
--- 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 110c0977a7..0000000000
--- 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 329757c0e2..0000000000
--- 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 2bffb80631..0000000000
--- 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 <http://www.gnu.org/licenses/>.
- *******************************************************************/
-
-#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 a0b9ca52ad..0000000000
--- 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 <http://www.gnu.org/licenses/>.
- *******************************************************************/
-
-#ifndef _BC_DTS_TYPES_H_
-#define _BC_DTS_TYPES_H_
-
-#ifdef __LINUX_USER__ /* Don't include these for KERNEL.. */
-#include <stdint.h>
-#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 45fa7a63f8..0000000000
--- 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 <http://www.gnu.org/licenses/>.
- *
- ****************************************************************************/
-
-#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 <Major>.<Minor>.<Revision> 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 <Major>.<Minor>.<Spl Revision> 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 <Major>.<Minor>.<Spl Revision> 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 b640dac41a..0000000000
--- 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 <http://www.gnu.org/licenses/>.
- *******************************************************************/
-
-#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 9893e3859a..0000000000
--- 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 c9477ee1b5..0000000000
--- 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 5a1f60f8d6..0000000000
--- 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 0b3bf2a16b..0000000000
--- 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 83fc3779c8..0000000000
--- 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 ab033a0cac..0000000000
--- 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 f8c5979f71..0000000000
--- 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 e5fe96165d..0000000000
--- 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 e8d5c156c8..0000000000
--- 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 8a3b492098..0000000000
--- 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 21da22ef20..0000000000
--- 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 398dbec815..0000000000
--- 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 f66b23452e..0000000000
--- 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 3fa5ae559f..0000000000
--- 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 63dd95e6e2..0000000000
--- 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 0a23cfc67c..0000000000
--- 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 532e53af4e..0000000000
--- 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 329551b65e..0000000000
--- 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 <stdint.h>
-+#include <string.h>
-+
-+#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 98f766ed6a..0000000000
--- 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 839fa5b5c6..0000000000
--- 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 aff0aeff66..0000000000
--- 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 97a289c821..0000000000
--- 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 <sys/cdefs.h>
-
-#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 496defb79a..0000000000
--- 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 <sys/cdefs.h>
-
-/* 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 4ed9b51bf3..0000000000
--- 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 <sys/cdefs.h>
-
-/*
- * 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 c07a81902b..0000000000
--- 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 <sys/cdefs.h>
-
-__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 c5dc139e41..0000000000
--- 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 <sys/cdefs.h>
-
-#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 9ffbd1cb45..0000000000
--- 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 <sys/cdefs.h>
-
-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 da89dff563..0000000000
--- 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 <rpc/types.h> /* some typedefs */
-#include <netinet/in.h>
-
-/* external data representation interfaces */
-#include <rpc/xdr.h> /* generic (de)serializer */
-
-/* Client side only authentication */
-#include <rpc/auth.h> /* generic authenticator (client side) */
-
-/* Client side (mostly) remote procedure call */
-#include <rpc/clnt.h> /* generic rpc stuff */
-
-/* semi-private protocol headers */
-#include <rpc/rpc_msg.h> /* protocol for rpc messages */
-#include <rpc/auth_unix.h> /* 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 <rpc/auth_des.h> protocol for des style cred */
-
-/* Server side only remote procedure callee */
-#include <rpc/svc.h> /* service manager and multiplexer */
-#include <rpc/svc_auth.h> /* service side authenticator */
-
-#include <netdb.h>
-
-#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 ec2d929c61..0000000000
--- 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 d671045f17..0000000000
--- 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 <sys/cdefs.h>
-
-/*
- * 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 3dc09591f2..0000000000
--- 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 0fe5adc1c0..0000000000
--- 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 <sys/types.h>
- */
-#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 <sys/types.h>
-#endif
-#include <sys/time.h>
-
-#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 9492ccfbbf..0000000000
--- 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 <sys/cdefs.h>
-
-/*
- * 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;
- * <type> *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 3b267717ca..0000000000
--- 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 7ff491df8d..0000000000
--- 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 3f9734d241..0000000000
--- 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 1d5d9f5de4..0000000000
--- 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 486b9f53b3..0000000000
--- 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 5b93d7c578..0000000000
--- 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 2914fc1b8e..0000000000
--- 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<RTMP_LOGALL && strstr(str, "no-name" ) != NULL )
-- return;
-+ if (RTMP_debuglevel < RTMP_LOGDEBUG && strstr(str, "no-name") != NULL)
-+ return;
-
- if ( !fmsg ) fmsg = stderr;
-
-diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
-index 52d0254..bef37aa 100644
---- a/librtmp/rtmp.c
-+++ b/librtmp/rtmp.c
-@@ -27,6 +27,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <assert.h>
-+#include <math.h>
-
- #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, '/', &params);
-+ 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, ';', &params);
-+ 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, ':', &params);
-+ 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, ',', &params);
-+ 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 <polarssl/net.h>
- #include <polarssl/ssl.h>
- #include <polarssl/havege.h>
-+#include <polarssl/md5.h>
- 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 <gnutls/gnutls.h>
-@@ -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 b14b0dac57..0000000000
--- 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 c78120e0df..0000000000
--- 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 0e26023554..0000000000
--- 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 82f51aa787..0000000000
--- 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 9bb4c1dbe6..0000000000
--- 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 0e26023554..0000000000
--- 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 82f51aa787..0000000000
--- 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 45df4c544d..0000000000
--- 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 786899bdac..0000000000
--- 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 980838fcac..0000000000
--- 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 55d8ad669d..0000000000
--- 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 995f7b78ee..0000000000
--- 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 <stdio.h>
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include <errno.h>
-+
-+/* --- 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 <stdio.h>
- #include <stdlib.h>
-@@ -45,7 +45,7 @@
- #include <sys/signal.h>
- #include <fcntl.h>
- #ifdef HAS_AO
--#include <ao/ao.h>
-+#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 <regex.h>
- #include <sys/types.h>
- #include <regex.h>
-+#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 495b97346c..0000000000
--- 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 c05970e138..0000000000
--- 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 1976904c4d..0000000000
--- 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 32bd282719..0000000000
--- 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 eb69d42b74..0000000000
--- 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 4d9b834f9c..0000000000
--- 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 6efd30222a..0000000000
--- 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 01ff026d07..0000000000
--- 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 a48782ed08..0000000000
--- 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 2c813f224e..0000000000
--- 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 7c833161d2..0000000000
--- 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 e6a9ff4b63..0000000000
--- 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 69683cb869..0000000000
--- 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 059237eb77..0000000000
--- 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 94ae0b1416..0000000000
--- 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 de98cb4356..0000000000
--- 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 294a7aafe4..0000000000
--- 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 ac2b66c988..0000000000
--- 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 008f9c3627..0000000000
--- 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 5e61734ba7..0000000000
--- 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 12b22b7e0d..0000000000
--- 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 <pthread.h>
-- #include <string.h>
--
-- 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 <pthread.h>
-- #include <string.h>
--
-- 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 3945b48f55..0000000000
--- 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 <netinet/in_systm.h>
-+/* #include <netinet/in_systm.h> */
- #include <netinet/in.h>
--#include <netinet/ip.h>
-+/* #include <netinet/ip.h> */
- #if !defined(alpha_linux_port)
- #include <netinet/tcp.h>
- #endif
diff --git a/tools/darwin/depends/mysqlclient/Makefile b/tools/darwin/depends/mysqlclient/Makefile
deleted file mode 100644
index dee71afaeb..0000000000
--- 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 a7c72dcb19..0000000000
--- 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 8d41d379ee..0000000000
--- 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 47fee3e6ef..0000000000
--- 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 d891f3ab20..0000000000
--- 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 33bfcd311c..0000000000
--- 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 647dca800b..0000000000
--- 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 aa5fc8a725..0000000000
--- 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 <stdio.h>
--#include <stddef.h>
--#include <string.h>
--
--#ifdef HAVE_SYS_TYPES_H
--#include <sys/types.h>
--#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 <stdio.h>
-+##include <stddef.h>
-+##include <string.h>
-+
-+##ifdef HAVE_SYS_TYPES_H
-+##include <sys/types.h>
-+##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 <sys/socket.h> does not define.),[
-+ Define to 'int' if <sys/socket.h> does not define.),[
- #ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #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 b6f6a725e0..0000000000
--- 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 abf141c8ca..0000000000
--- 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 dacf39cf0a..0000000000
--- 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 d07ea3b59a..0000000000
--- 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 fbbcaa70b2..0000000000
--- 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 88323609c2..0000000000
--- 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 709566b97a..0000000000
--- 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 021fe07000..0000000000
--- 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 fb3dc59cda..0000000000
--- 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 c9c470ab79..0000000000
--- 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 310b25890f..0000000000
--- 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 36c3c81bdb..0000000000
--- 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 d4e65fe0e3..0000000000
--- 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)
-
diff --git a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh
index e657e00ca0..bfce090088 100755
--- a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh
+++ b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh
@@ -36,16 +36,16 @@ if [ -f "/usr/libexec/fauxsu/libfauxsu.dylib" ]; then
elif [ -f "/usr/bin/sudo" ]; then
SUDO="/usr/bin/sudo"
fi
-if [ -f "/Users/Shared/xbmc-depends/toolchain/bin/dpkg-deb" ]; then
+if [ -f "/Users/Shared/xbmc-depends/buildtools-native/bin/dpkg-deb" ]; then
# make sure we pickup our tar, gnutar will fail when dpkg -i
- bin_path=$(cd /Users/Shared/xbmc-depends/toolchain/bin; pwd)
+ bin_path=$(cd /Users/Shared/xbmc-depends/buildtools-native/bin; pwd)
export PATH=${bin_path}:${PATH}
fi
PACKAGE=org.xbmc.xbmc-atv2
VERSION=13.0
-REVISION=0~alpha2
+REVISION=0~alpha3
ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
echo Creating $PACKAGE package version $VERSION revision $REVISION
diff --git a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh
index 03343eebb6..57bbcb7f99 100755
--- a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh
+++ b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh
@@ -37,16 +37,16 @@ if [ -f "/usr/libexec/fauxsu/libfauxsu.dylib" ]; then
elif [ -f "/usr/bin/sudo" ]; then
SUDO="/usr/bin/sudo"
fi
-if [ -f "/Users/Shared/xbmc-depends/toolchain/bin/dpkg-deb" ]; then
+if [ -f "/Users/Shared/xbmc-depends/buildtools-native/bin/dpkg-deb" ]; then
# make sure we pickup our tar, gnutar will fail when dpkg -i
- bin_path=$(cd /Users/Shared/xbmc-depends/toolchain/bin; pwd)
+ bin_path=$(cd /Users/Shared/xbmc-depends/buildtools-native/bin; pwd)
export PATH=${bin_path}:${PATH}
fi
PACKAGE=org.xbmc.xbmc-ios
VERSION=13.0
-REVISION=0~alpha2
+REVISION=0~alpha3
ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
echo Creating $PACKAGE package version $VERSION revision $REVISION
diff --git a/tools/darwin/packaging/xbmc-osx/Makefile b/tools/darwin/packaging/xbmc-osx/Makefile
deleted file mode 100644
index d1d0b80df0..0000000000
--- a/tools/darwin/packaging/xbmc-osx/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-TARGET = ../../../../XBMC_for_Mac.dmg
-
-all: $(TARGET)
-
-include ../../../../Makefile.include
-
-$(TARGET): dist/XBMC.dmg
- mv -f dist/XBMC.dmg $(TARGET)
-
-ifeq ($(findstring D_DEBUG,$(CFLAGS)),D_DEBUG)
-dist/XBMC.dmg:
- if [ -e "/Volumes/XBMC" ] ; then umount /Volumes/XBMC ; fi
- ./dmgmaker.pl ../../../../build/Debug/XBMC.app
-else
-dist/XBMC.dmg:
- if [ -e "/Volumes/XBMC" ] ; then umount /Volumes/XBMC ; fi
- ./dmgmaker.pl ../../../../build/Release/XBMC.app
-endif
diff --git a/tools/darwin/packaging/xbmc-osx/dmgmaker.pl b/tools/darwin/packaging/xbmc-osx/dmgmaker.pl
index 6e6caacaa9..1047d0a848 100755
--- a/tools/darwin/packaging/xbmc-osx/dmgmaker.pl
+++ b/tools/darwin/packaging/xbmc-osx/dmgmaker.pl
@@ -32,10 +32,8 @@ sub make_dmg {
$ext = "mpkg" if !$ext;
# thanks to http://dev.simon-cozens.org/songbee/browser/release-manager-tools/build-dmg.sh
- `rm -fr dist`;
- `mkdir dist`;
- `hdiutil create -fs HFS+ -volname "$volname" -format UDRW -srcfolder "$mpkg" "dist/$volname.dmg"`;
- $dev_handle = `hdiutil attach -readwrite -noverify -noautoopen "dist/$volname.dmg" | grep Apple_HFS`;
+ `hdiutil create -fs HFS+ -volname "$volname" -format UDRW -srcfolder "$mpkg" "$volname.dmg"`;
+ $dev_handle = `hdiutil attach -readwrite -noverify -noautoopen "$volname.dmg" | grep Apple_HFS`;
chomp $dev_handle;
$dev_handle = $1 if $dev_handle =~ /^\/dev\/(disk.)/;
die("Could not obtain device handle\n") if !$dev_handle;
@@ -63,10 +61,10 @@ sub make_dmg {
}
`xcrun SetFile -a C "/Volumes/$volname/"`;
`hdiutil detach $dev_handle`;
- `hdiutil convert "dist/$volname.dmg" -format UDZO -imagekey zlib-level=9 -o "dist/$volname.udzo.dmg"`;
- `rm -f "dist/$volname.dmg"`;
- `mv "dist/$volname.udzo.dmg" "dist/$volname.dmg"`;
- `hdiutil internet-enable -yes "dist/$volname.dmg"`;
+ `hdiutil convert "$volname.dmg" -format UDZO -imagekey zlib-level=9 -o "$volname.udzo.dmg"`;
+ `rm -f "$volname.dmg"`;
+ `mv "$volname.udzo.dmg" "$volname.dmg"`;
+ `hdiutil internet-enable -yes "$volname.dmg"`;
}
if (! defined $ARGV[0]) {
@@ -80,4 +78,4 @@ if ( $ARGV[0] eq "-c" ) {
exit;
}
-make_dmg($ARGV[0], "XBMC", "XBMC");
+make_dmg($ARGV[0], $ARGV[1], "XBMC");
diff --git a/tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh b/tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh
new file mode 100755
index 0000000000..9d49379579
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# usage: ./mkdmg-xbmc-osx.sh release/debug (case insensitive)
+# Allows us to run mkdmg-xbmc-osx.sh from anywhere in the three, rather than the tools/darwin/packaging/xbmc-osx folder only
+SWITCH=`echo $1 | tr [A-Z] [a-z]`
+DIRNAME=`dirname $0`
+
+if [ ${SWITCH:-""} = "debug" ]; then
+ echo "Packaging Debug target for OSX"
+ XBMC="$DIRNAME/../../../../build/Debug/XBMC.app"
+elif [ ${SWITCH:-""} = "release" ]; then
+ echo "Packaging Release target for OSX"
+ XBMC="$DIRNAME/../../../../build/Release/XBMC.app"
+else
+ echo "You need to specify the build target"
+ exit 1
+fi
+
+if [ ! -d $XBMC ]; then
+ echo "XBMC.app not found! are you sure you built $1 target?"
+ exit 1
+fi
+ARCHITECTURE=`file $XBMC/Contents/MacOS/XBMC | awk '{print $NF}'`
+
+PACKAGE=org.xbmc.xbmc-osx
+
+VERSION=13.0
+REVISION=0~alpha2
+ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_macosx-intel-${ARCHITECTURE}
+
+echo Creating $PACKAGE package version $VERSION revision $REVISION
+${SUDO} rm -rf $DIRNAME/$ARCHIVE
+
+if [ -e "/Volumes/$ARCHIVE" ]
+then
+ umount /Volumes/$ARCHIVE
+fi
+
+$DIRNAME/dmgmaker.pl $XBMC $ARCHIVE
+
+echo "done"
diff --git a/tools/depends/.gitignore b/tools/depends/.gitignore
index 0bf39a6fff..3932ef0590 100644
--- a/tools/depends/.gitignore
+++ b/tools/depends/.gitignore
@@ -15,10 +15,12 @@
/target/*/x86_64-linux-gnu/*
/target/*/arm-linux-gnueabi/*
/native/*/x86_64-darwin*.*.*-native/
-/target/*/arm-apple-darwin/*
-/target/*/x86_64-apple-darwin/*
-/target/*/i386-apple-darwin/*
+/target/*/iphoneos*.*_arm*-target/*
+/target/*/macosx*.*_x86_64-target/*
+/target/*/macosx*.*_i386-target/*
+/target/*/iphoneos*.*_arm*-target/
/target/*/macosx*.*_x86_64-target/
+/target/*/macosx*.*_i386-target/
Toolchain.cmake
config.site
config.site.native
diff --git a/tools/depends/README b/tools/depends/README
index 63373c4dcb..fb44f8dffd 100644
--- a/tools/depends/README
+++ b/tools/depends/README
@@ -13,7 +13,7 @@ IOS:
./configure --host=arm-apple-darwin --with-sdk=4.3 --prefix=home/foo/xbmc-deps
Android:
- ./configure --with-toolchain=/opt/toolchains/android-ndk-r7-crystax-5.beta3-toolchain --prefix=/opt/xbmc-deps --host=arm-linux-androideabi
+ ./configure --with-toolchain=/opt/toolchains/android-ndk-r7-crystax-5.beta3-toolchain-14 --prefix=/opt/xbmc-deps --host=arm-linux-androideabi --with-sdk-path=/opt/android-sdk --with-ndk=/opt/android-ndk-r7-crystax-5.beta3 --with-sdk=android-14 --with-tarballs=/tmp/xbmc-android
Linux:
ARM toolchain (codesourcery/lenaro/etc)
diff --git a/tools/depends/configure.in b/tools/depends/configure.in
index bc23063033..d361c30a19 100644
--- a/tools/depends/configure.in
+++ b/tools/depends/configure.in
@@ -32,7 +32,7 @@ AC_ARG_WITH([sdk-path],
AC_ARG_WITH([sdk],
[AS_HELP_STRING([--with-sdk],
- [spcify sdk platform version (optional for android). default is android-10])],
+ [spcify sdk platform version (optional for android). default is android-14])],
[use_sdk=$withval])
AC_ARG_ENABLE([gplv3],
@@ -88,7 +88,7 @@ case $host in
if test "x$use_cpu" = "xarmeabi-v7a"; then
platform_cflags+=" -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon "
fi
- use_sdk="${use_sdk:-android-10}"
+ use_sdk="${use_sdk:-android-14}"
deps_dir="$use_host-$use_sdk"
platform_cflags+=" -DANDROID -Os -fexceptions"
platform_cxxflags="$platform_cflags -frtti"
@@ -105,7 +105,7 @@ case $host in
if test "x$use_cpu" = "xauto"; then
use_cpu=$host_cpu
fi
- use_sdk="${use_sdk:-android-10}"
+ use_sdk="${use_sdk:-android-14}"
deps_dir="$use_host-$use_sdk"
platform_cflags="-DANDROID -Os -fexceptions"
platform_cxxflags="$platform_cflags -frtti"
diff --git a/tools/depends/native/Makefile b/tools/depends/native/Makefile
index 4e5bc1fb7d..8dc74a2902 100644
--- a/tools/depends/native/Makefile
+++ b/tools/depends/native/Makefile
@@ -13,7 +13,7 @@ NATIVE= m4-native gettext-native autoconf-native automake-native \
ifeq ($(OS),ios)
- NATIVE += dpkg-native
+ NATIVE += dpkg-native tar-native
endif
.PHONY: $(NATIVE) native
diff --git a/tools/depends/native/gettext-native/Makefile b/tools/depends/native/gettext-native/Makefile
index 6c94a3bfa3..cbde5f59ed 100644
--- a/tools/depends/native/gettext-native/Makefile
+++ b/tools/depends/native/gettext-native/Makefile
@@ -43,7 +43,7 @@ $(LIBDYLIB): $(PLATFORM)
$(MAKE) -C $(PLATFORM)/gettext-tools
.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM)/gettext-tools install
+ $(MAKE) -j1 -C $(PLATFORM)/gettext-tools install
touch $@
clean:
diff --git a/tools/depends/native/tar-native/Makefile b/tools/depends/native/tar-native/Makefile
new file mode 100644
index 0000000000..c0ea279c12
--- /dev/null
+++ b/tools/depends/native/tar-native/Makefile
@@ -0,0 +1,43 @@
+include ../../Makefile.include
+PREFIX=$(NATIVEPREFIX)
+PLATFORM=$(NATIVEPLATFORM)
+DEPS= ../../Makefile.include.in Makefile
+
+# app name, version
+APPNAME=tar
+VERSION=1.23
+SOURCE=$(APPNAME)-$(VERSION)
+ARCHIVE=$(SOURCE).tar.gz
+
+export LIBTOOL=builds/unix/libtool
+export PATH:=$(PREFIX)/bin:$(PATH)
+CONFIGURE=./configure --prefix=$(PREFIX) \
+--program-transform-name=s/tar/gtar/ --disable-dependency-tracking
+
+APP=$(SOURCE)/src/tar
+APPBIN=$(PREFIX)/bin/tar
+
+all: .installed-$(PLATFORM)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); $(CONFIGURE)
+ touch $@
+
+$(APP): $(PLATFORM)
+ $(MAKE) -C $(PLATFORM)
+
+.installed-$(PLATFORM): $(APP)
+ $(MAKE) -C $(PLATFORM) install
+ rm -f $(PREFIX)/bin/tar $(PREFIX)/bin/gnutar
+ cd $(PREFIX)/bin; ln -s gtar tar; ln -s gtar gnutar
+
+clean:
+ $(MAKE) -C $(PLATFORM) clean
+
+distclean::
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile
index b7aa8250e7..17298f1d2b 100644
--- a/tools/depends/target/Makefile
+++ b/tools/depends/target/Makefile
@@ -14,7 +14,8 @@ DEPENDS = \
libmodplug librtmp libxml2 yajl libmicrohttpd mysql libffi \
python26 afpfs-ng libshairport \
libplist libcec libbluray boost tinyxml dummy-libxbmc \
- libamplayer libssh taglib xbmc-pvr-addons libusb libnfs libmp3lame
+ libamplayer libssh taglib xbmc-pvr-addons libusb libnfs libmp3lame \
+ pythonmodule-pil
ifeq ($(ENABLE_GPLV3),1)
DEPENDS+=samba-gplv3 libcdio-gplv3
@@ -82,7 +83,7 @@ libzip: $(ZLIB)
libmp3lame: $(ICONV)
libpng: $(ZLIB)
openssl: $(ZLIB)
-pythonmodule-pil: $(ZLIB) libjpeg-turbo libpng
+pythonmodule-pil: $(ZLIB) libjpeg-turbo libpng freetype2 python26
.installed-$(PLATFORM): $(DEPENDS)
touch $@
diff --git a/tools/depends/target/config.site.in b/tools/depends/target/config.site.in
index 20576143e1..7719297871 100644
--- a/tools/depends/target/config.site.in
+++ b/tools/depends/target/config.site.in
@@ -55,8 +55,11 @@ gl_cv_header_working_stdint_h=yes
ac_cv_search_dlopen=-ldl
#libgcrypt
-ac_cv_path_GPG_ERROR_CONFIG=@prefix@/@deps_dir@/bin/gpg-error-config
-ac_cv_sys_symbol_underscore=no
+if test "${PACKAGE_NAME}" = "libgcrypt"; then
+ ac_cv_path_GPG_ERROR_CONFIG=@prefix@/@deps_dir@/bin/gpg-error-config
+ ac_cv_sys_symbol_underscore=no
+ CFLAGS="$CFLAGS -std=gnu99"
+fi
#python
ac_cv_func_gethostbyname_r=no
diff --git a/tools/depends/target/libgcrypt/04-oflagmunging.patch b/tools/depends/target/libgcrypt/04-oflagmunging.patch
new file mode 100644
index 0000000000..98ec8d30a1
--- /dev/null
+++ b/tools/depends/target/libgcrypt/04-oflagmunging.patch
@@ -0,0 +1,22 @@
+--- cipher/Makefile.am.orig 2013-03-23 23:55:30.000000000 +0100
++++ cipher/Makefile.am 2013-03-24 00:03:34.000000000 +0100
+@@ -68,7 +68,7 @@
+ camellia.c camellia.h camellia-glue.c
+
+ if ENABLE_O_FLAG_MUNGING
+-o_flag_munging = sed -e 's/-O[2-9s]*/-O1/g'
++o_flag_munging = sed -e 's/ -O[2-9s]* / -O1 /g'
+ else
+ o_flag_munging = cat
+ endif
+--- cipher/Makefile.in.orig 2013-03-24 00:03:10.000000000 +0100
++++ cipher/Makefile.in 2013-03-24 00:03:25.000000000 +0100
+@@ -274,7 +274,7 @@
+ camellia.c camellia.h camellia-glue.c
+
+ @ENABLE_O_FLAG_MUNGING_FALSE@o_flag_munging = cat
+-@ENABLE_O_FLAG_MUNGING_TRUE@o_flag_munging = sed -e 's/-O[2-9s]*/-O1/g'
++@ENABLE_O_FLAG_MUNGING_TRUE@o_flag_munging = sed -e 's/ -O[2-9s]* / -O1 /g'
+ all: all-am
+
+ .SUFFIXES:
diff --git a/tools/depends/target/libgcrypt/Makefile b/tools/depends/target/libgcrypt/Makefile
index 6d86b59c3f..e4e121fb60 100644
--- a/tools/depends/target/libgcrypt/Makefile
+++ b/tools/depends/target/libgcrypt/Makefile
@@ -30,6 +30,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
cd $(PLATFORM); patch -p0 < ../01-static-mpi_mpi-internal.patch
cd $(PLATFORM); patch -p0 < ../02-armasm.patch
cd $(PLATFORM); patch -p0 < ../03-gcrypt-android-select.patch
+ cd $(PLATFORM); patch -p0 < ../04-oflagmunging.patch
cd $(PLATFORM); $(CONFIGURE)
$(LIBDYLIB): $(PLATFORM)
diff --git a/tools/depends/target/libshairport/012_add_volume_control.patch b/tools/depends/target/libshairport/012_add_volume_control.patch
new file mode 100644
index 0000000000..c036b94c6e
--- /dev/null
+++ b/tools/depends/target/libshairport/012_add_volume_control.patch
@@ -0,0 +1,28 @@
+--- src/ao.h 2013-03-14 19:07:04.000000000 +0100
++++ src/ao.h 2013-03-14 20:45:15.000000000 +0100
+@@ -141,6 +141,7 @@
+
+ #endif /* __AO_H__ */
+
++#define SHAIRPORT_AUDIOOUTPUT_VERSION 2
+ extern struct AudioOutput g_ao;
+ struct AudioOutput
+ {
+@@ -155,4 +156,5 @@
+ 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);
++ void (*ao_set_volume)(float volume);
+ };
+diff -uPr orig/src/hairtunes.c macosx10.6_i386-target/src/hairtunes.c
+--- src/hairtunes.c 2013-03-14 19:07:04.000000000 +0100
++++ src/hairtunes.c 2013-03-14 20:46:33.000000000 +0100
+@@ -265,6 +265,8 @@
+ assert(f<=0);
+ if (debug)
+ xprintf("VOL: %lf\n", f);
++ if (g_ao.ao_set_volume)
++ g_ao.ao_set_volume(f);
+ volume = pow(10.0,0.05*f);
+ fix_volume = 65536.0 * volume;
+ }
diff --git a/tools/depends/target/libshairport/Makefile b/tools/depends/target/libshairport/Makefile
index bb553bf3a8..03016ca5da 100644
--- a/tools/depends/target/libshairport/Makefile
+++ b/tools/depends/target/libshairport/Makefile
@@ -36,6 +36,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
cd $(PLATFORM); patch -p0 < ../010_handle_metadata.patch
cd $(PLATFORM); patch -p0 < ../011_fix_ipv4_fallback.patch
cd $(PLATFORM); patch -p0 < ../android.patch
+ cd $(PLATFORM); patch -p0 < ../012_add_volume_control.patch
cd $(PLATFORM); $(AUTORECONF) -vif
cd $(PLATFORM); $(CONFIGURE)
diff --git a/tools/depends/target/pythonmodule-pil/Imaging-1.1.7-remove-zlib-check.patch b/tools/depends/target/pythonmodule-pil/Imaging-1.1.7-remove-zlib-check.patch
new file mode 100644
index 0000000000..3f97fa820e
--- /dev/null
+++ b/tools/depends/target/pythonmodule-pil/Imaging-1.1.7-remove-zlib-check.patch
@@ -0,0 +1,15 @@
+--- setup.py 2013-03-19 18:26:03.725978243 -0400
++++ setup.py 2013-03-19 18:24:50.435978289 -0400
+@@ -211,11 +211,7 @@
+ zlib = jpeg = tiff = freetype = tcl = tk = lcms = None
+ feature = feature()
+
+- if find_include_file(self, "zlib.h"):
+- if find_library_file(self, "z"):
+- feature.zlib = "z"
+- elif sys.platform == "win32" and find_library_file(self, "zlib"):
+- feature.zlib = "zlib" # alternative name
++ feature.zlib = "z"
+
+ if find_include_file(self, "jpeglib.h"):
+ if find_library_file(self, "jpeg"):
diff --git a/tools/depends/target/pythonmodule-pil/Makefile b/tools/depends/target/pythonmodule-pil/Makefile
index 4dee27fcae..775c9e031d 100644
--- a/tools/depends/target/pythonmodule-pil/Makefile
+++ b/tools/depends/target/pythonmodule-pil/Makefile
@@ -8,12 +8,6 @@ VERSION=1.1.7
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.gz
-ifeq ($(HAS_ZLIB),1)
- ZLIBROOT=$(TOOLCHAIN)/sysroot
-else
- ZLIBROOT=$(PREFIX)
-endif
-
CROSSFLAGS=PYTHONXCPREFIX="$(PREFIX)" LDFLAGS="$(LDFLAGS)"
LIBDYLIB=$(PLATFORM)/dist/PIL-$(VERSION)-py2.6-$(OS)-$(CPU).egg
@@ -30,8 +24,8 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
cd $(PLATFORM); patch -p1 < ../Imaging-1.1.7-setuptools-0.1.patch
cd $(PLATFORM); patch -p1 < ../Imaging-1.1.7-access.patch
cd $(PLATFORM); patch -p0 < ../Imaging-1.1.7-zip-include.patch
+ cd $(PLATFORM); patch -p0 < ../Imaging-1.1.7-remove-zlib-check.patch
cd $(PLATFORM); sed -ie "s|"darwin"|"darwinNot"|g" "setup.py"
- sed -ie "s|ZLIB_ROOT = None|ZLIB_ROOT = libinclude(\"$(ZLIBROOT)\")|" $(PLATFORM)/setup.py
$(LIBDYLIB): $(PLATFORM)
mkdir -p $(PLATFORM)/output
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index a976ecb36f..c3358ca30d 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -95,9 +95,14 @@
#include "powermanagement/DPMSSupport.h"
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSettings.h"
+#include "settings/MediaSourceSettings.h"
+#include "settings/SkinSettings.h"
#include "guilib/LocalizeStrings.h"
#include "utils/CPUInfo.h"
+#include "utils/RssManager.h"
#include "utils/SeekHandler.h"
+#include "view/ViewStateSettings.h"
#include "input/KeyboardStat.h"
#include "input/XBMC_vkeys.h"
@@ -112,6 +117,7 @@
#endif
#ifdef HAS_UPNP
#include "network/upnp/UPnP.h"
+#include "network/upnp/UPnPSettings.h"
#include "filesystem/UPnPDirectory.h"
#endif
#if defined(_LINUX) && defined(HAS_FILESYSTEM_SMB)
@@ -528,12 +534,15 @@ bool CApplication::OnEvent(XBMC_Event& newEvent)
int windowId = g_windowManager.GetActiveWindow() & WINDOW_ID_MASK;
int actionId = 0;
if (newEvent.touch.action == ACTION_GESTURE_BEGIN || newEvent.touch.action == ACTION_GESTURE_END)
+ {
actionId = newEvent.touch.action;
- else if (!CButtonTranslator::GetInstance().TranslateTouchAction(windowId, newEvent.touch.action, newEvent.touch.pointers, actionId) ||
+ windowId = WINDOW_INVALID;
+ }
+ else if (!CButtonTranslator::GetInstance().TranslateTouchAction(newEvent.touch.action, newEvent.touch.pointers, windowId, actionId) ||
actionId <= 0)
return false;
- CApplicationMessenger::Get().SendAction(CAction(actionId, 0, newEvent.touch.x, newEvent.touch.y, newEvent.touch.x2, newEvent.touch.y2), WINDOW_INVALID, false);
+ CApplicationMessenger::Get().SendAction(CAction(actionId, 0, newEvent.touch.x, newEvent.touch.y, newEvent.touch.x2, newEvent.touch.y2), windowId, false);
break;
}
}
@@ -702,6 +711,18 @@ bool CApplication::Create()
}
CLog::Log(LOGNOTICE, "load settings...");
+ g_settings.RegisterSettingsHandler(this);
+ g_settings.RegisterSettingsHandler(&g_advancedSettings);
+ g_settings.RegisterSettingsHandler(&CMediaSourceSettings::Get());
+ g_settings.RegisterSettingsHandler(&CPlayerCoreFactory::Get());
+ g_settings.RegisterSettingsHandler(&CRssManager::Get());
+#ifdef HAS_UPNP
+ g_settings.RegisterSettingsHandler(&CUPnPSettings::Get());
+#endif
+
+ g_settings.RegisterSubSettings(&CMediaSettings::Get());
+ g_settings.RegisterSubSettings(&CSkinSettings::Get());
+ g_settings.RegisterSubSettings(&CViewStateSettings::Get());
g_guiSettings.Initialize(); // Initialize default Settings - don't move
g_powerManager.SetDefaults();
@@ -1913,6 +1934,14 @@ void CApplication::ReloadSkin()
}
}
+bool CApplication::OnSettingsSaving() const
+{
+ // Don't save settings when we're busy stopping the application.
+ // A lot of screens try to save settings on deinit and deinit is called
+ // for every screen when the application is stopping.
+ return !m_bStop;
+}
+
bool CApplication::LoadSkin(const CStdString& skinID)
{
if (m_skinReloading)
@@ -2347,6 +2376,9 @@ void CApplication::Render()
g_Windowing.EndRender();
+ // execute post rendering actions (finalize window closing)
+ g_windowManager.AfterRender();
+
// reset our info cache - we do this at the end of Render so that it is
// fresh for the next process(), or after a windowclose animation (where process()
// isn't called)
@@ -3482,6 +3514,19 @@ bool CApplication::Cleanup()
g_settings.Clear();
g_guiSettings.Clear();
g_advancedSettings.Clear();
+
+ g_settings.UnregisterSubSettings(&CMediaSettings::Get());
+ g_settings.UnregisterSubSettings(&CSkinSettings::Get());
+ g_settings.UnregisterSubSettings(&CViewStateSettings::Get());
+
+ g_settings.UnregisterSettingsHandler(&g_advancedSettings);
+ g_settings.UnregisterSettingsHandler(&CMediaSourceSettings::Get());
+ g_settings.UnregisterSettingsHandler(&CPlayerCoreFactory::Get());
+ g_settings.UnregisterSettingsHandler(&CRssManager::Get());
+#ifdef HAS_UPNP
+ g_settings.UnregisterSettingsHandler(&CUPnPSettings::Get());
+#endif
+ g_settings.UnregisterSettingsHandler(this);
#ifdef _LINUX
CXHandle::DumpObjectTracker();
@@ -3786,7 +3831,7 @@ bool CApplication::PlayStack(const CFileItem& item, bool bRestart)
CVideoDatabase dbs;
if (dbs.Open())
{
- dbs.GetVideoSettings(item.GetPath(), g_settings.m_currentVideoSettings);
+ dbs.GetVideoSettings(item.GetPath(), CMediaSettings::Get().GetCurrentVideoSettings());
haveTimes = dbs.GetStackTimes(item.GetPath(), times);
dbs.Close();
}
@@ -3869,7 +3914,7 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart)
OutputDebugString("new file set audiostream:0\n");
// Switch to default options
- g_settings.m_currentVideoSettings = g_settings.m_defaultVideoSettings;
+ CMediaSettings::Get().GetCurrentVideoSettings() = CMediaSettings::Get().GetDefaultVideoSettings();
// see if we have saved options in the database
SetPlaySpeed(1);
@@ -3991,7 +4036,7 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart)
// open the d/b and retrieve the bookmarks for the current movie
CVideoDatabase dbs;
dbs.Open();
- dbs.GetVideoSettings(item.GetPath(), g_settings.m_currentVideoSettings);
+ dbs.GetVideoSettings(item.GetPath(), CMediaSettings::Get().GetCurrentVideoSettings());
if( item.m_lStartOffset == STARTOFFSET_RESUME )
{
@@ -5360,13 +5405,13 @@ void CApplication::VolumeChanged() const
int CApplication::GetSubtitleDelay() const
{
// converts subtitle delay to a percentage
- return int(((float)(g_settings.m_currentVideoSettings.m_SubtitleDelay + g_advancedSettings.m_videoSubsDelayRange)) / (2 * g_advancedSettings.m_videoSubsDelayRange)*100.0f + 0.5f);
+ return int(((float)(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay + g_advancedSettings.m_videoSubsDelayRange)) / (2 * g_advancedSettings.m_videoSubsDelayRange)*100.0f + 0.5f);
}
int CApplication::GetAudioDelay() const
{
// converts audio delay to a percentage
- return int(((float)(g_settings.m_currentVideoSettings.m_AudioDelay + g_advancedSettings.m_videoAudioDelayRange)) / (2 * g_advancedSettings.m_videoAudioDelayRange)*100.0f + 0.5f);
+ return int(((float)(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay + g_advancedSettings.m_videoAudioDelayRange)) / (2 * g_advancedSettings.m_videoAudioDelayRange)*100.0f + 0.5f);
}
void CApplication::SetPlaySpeed(int iSpeed)
@@ -5769,11 +5814,11 @@ void CApplication::SaveCurrentFileSettings()
if (m_itemCurrentFile->IsVideo() && !m_itemCurrentFile->IsPVRChannel())
{
// save video settings
- if (g_settings.m_currentVideoSettings != g_settings.m_defaultVideoSettings)
+ if (CMediaSettings::Get().GetCurrentVideoSettings() != CMediaSettings::Get().GetDefaultVideoSettings())
{
CVideoDatabase dbs;
dbs.Open();
- dbs.SetVideoSettings(m_itemCurrentFile->GetPath(), g_settings.m_currentVideoSettings);
+ dbs.SetVideoSettings(m_itemCurrentFile->GetPath(), CMediaSettings::Get().GetCurrentVideoSettings());
dbs.Close();
}
}
diff --git a/xbmc/Application.h b/xbmc/Application.h
index 2a66187f0d..ef31d06d84 100644
--- a/xbmc/Application.h
+++ b/xbmc/Application.h
@@ -48,6 +48,7 @@ namespace MEDIA_DETECT
#include "cores/IPlayerCallback.h"
#include "cores/playercorefactory/PlayerCoreFactory.h"
#include "PlayListPlayer.h"
+#include "settings/ISettingsHandler.h"
#if !defined(_WIN32) && defined(HAS_DVD_DRIVE)
#include "storage/DetectDVDType.h"
#endif
@@ -55,7 +56,6 @@ namespace MEDIA_DETECT
#include "win32/WIN32Util.h"
#endif
#include "utils/Stopwatch.h"
-#include "utils/CharsetConverter.h"
#ifdef HAS_PERFORMANCE_SAMPLE
#include "utils/PerformanceStats.h"
#endif
@@ -106,7 +106,8 @@ protected:
int m_iPlayList;
};
-class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMsgTargetCallback
+class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMsgTargetCallback,
+ public ISettingsHandler
{
public:
@@ -368,6 +369,8 @@ public:
CSplash* GetSplash() { return m_splash; }
void SetRenderGUI(bool renderGUI);
protected:
+ virtual bool OnSettingsSaving() const;
+
bool LoadSkin(const CStdString& skinID);
void LoadSkin(const boost::shared_ptr<ADDON::CSkinInfo>& skin);
diff --git a/xbmc/AutoSwitch.cpp b/xbmc/AutoSwitch.cpp
index ab07066944..76eec917dc 100644
--- a/xbmc/AutoSwitch.cpp
+++ b/xbmc/AutoSwitch.cpp
@@ -24,6 +24,7 @@
#include "guilib/GUIWindowManager.h"
#include "FileItem.h"
#include "guilib/WindowIDs.h"
+#include "view/ViewState.h"
#define METHOD_BYFOLDERS 0
#define METHOD_BYFILES 1
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp
index 8a08de0ebc..3e1e8fda66 100644
--- a/xbmc/GUIInfoManager.cpp
+++ b/xbmc/GUIInfoManager.cpp
@@ -43,8 +43,11 @@
#include "windowing/WindowingFactory.h"
#include "powermanagement/PowerManager.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSettings.h"
#include "settings/Settings.h"
+#include "settings/SkinSettings.h"
#include "guilib/LocalizeStrings.h"
+#include "utils/CharsetConverter.h"
#include "utils/CPUInfo.h"
#include "utils/StringUtils.h"
#include "utils/MathUtils.h"
@@ -184,7 +187,6 @@ const infomap player_labels[] = {{ "hasmedia", PLAYER_HAS_MEDIA },
{ "hasduration", PLAYER_HASDURATION },
{ "passthrough", PLAYER_PASSTHROUGH },
{ "cachelevel", PLAYER_CACHELEVEL }, // labels from here
- { "seekbar", PLAYER_SEEKBAR },
{ "progress", PLAYER_PROGRESS },
{ "progresscache", PLAYER_PROGRESS_CACHE },
{ "volume", PLAYER_VOLUME },
@@ -1017,12 +1019,12 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
if (prop.name == "string")
{
if (prop.num_params() == 2)
- return AddMultiInfo(GUIInfo(SKIN_STRING, g_settings.TranslateSkinString(prop.param(0)), ConditionalStringParameter(prop.param(1))));
+ return AddMultiInfo(GUIInfo(SKIN_STRING, CSkinSettings::Get().TranslateString(prop.param(0)), ConditionalStringParameter(prop.param(1))));
else
- return AddMultiInfo(GUIInfo(SKIN_STRING, g_settings.TranslateSkinString(prop.param(0))));
+ return AddMultiInfo(GUIInfo(SKIN_STRING, CSkinSettings::Get().TranslateString(prop.param(0))));
}
if (prop.name == "hassetting")
- return AddMultiInfo(GUIInfo(SKIN_BOOL, g_settings.TranslateSkinBool(prop.param(0))));
+ return AddMultiInfo(GUIInfo(SKIN_BOOL, CSkinSettings::Get().TranslateBool(prop.param(0))));
else if (prop.name == "hastheme")
return AddMultiInfo(GUIInfo(SKIN_HAS_THEME, ConditionalStringParameter(prop.param(0))));
}
@@ -1165,8 +1167,10 @@ TIME_FORMAT CGUIInfoManager::TranslateTimeFormat(const CStdString &format)
else if (format.Equals("hh:mm")) return TIME_FORMAT_HH_MM;
else if (format.Equals("mm:ss")) return TIME_FORMAT_MM_SS;
else if (format.Equals("hh:mm:ss")) return TIME_FORMAT_HH_MM_SS;
+ else if (format.Equals("hh:mm:ss xx")) return TIME_FORMAT_HH_MM_SS_XX;
else if (format.Equals("h")) return TIME_FORMAT_H;
else if (format.Equals("h:mm:ss")) return TIME_FORMAT_H_MM_SS;
+ else if (format.Equals("h:mm:ss xx")) return TIME_FORMAT_H_MM_SS_XX;
else if (format.Equals("xx")) return TIME_FORMAT_XX;
return TIME_FORMAT_GUESS;
}
@@ -1270,10 +1274,10 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, CStdString *fa
strLabel.Format("%2.1f dB", CAEUtil::PercentToGain(g_settings.m_fVolumeLevel));
break;
case PLAYER_SUBTITLE_DELAY:
- strLabel.Format("%2.3f s", g_settings.m_currentVideoSettings.m_SubtitleDelay);
+ strLabel.Format("%2.3f s", CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
break;
case PLAYER_AUDIO_DELAY:
- strLabel.Format("%2.3f s", g_settings.m_currentVideoSettings.m_AudioDelay);
+ strLabel.Format("%2.3f s", CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay);
break;
case PLAYER_CHAPTER:
if(g_application.IsPlaying() && g_application.m_pPlayer)
@@ -2442,15 +2446,15 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c
{
case SKIN_BOOL:
{
- bReturn = g_settings.GetSkinBool(info.GetData1());
+ bReturn = CSkinSettings::Get().GetBool(info.GetData1());
}
break;
case SKIN_STRING:
{
if (info.GetData2())
- bReturn = g_settings.GetSkinString(info.GetData1()).Equals(m_stringParameters[info.GetData2()]);
+ bReturn = StringUtils::EqualsNoCase(CSkinSettings::Get().GetString(info.GetData1()), m_stringParameters[info.GetData2()]);
else
- bReturn = !g_settings.GetSkinString(info.GetData1()).IsEmpty();
+ bReturn = !CSkinSettings::Get().GetString(info.GetData1()).empty();
}
break;
case SKIN_HAS_THEME:
@@ -2636,7 +2640,7 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c
{
CGUIWindow *window = GetWindowWithCondition(contextWindow, WINDOW_CONDITION_IS_MEDIA_WINDOW);
if (window)
- bReturn = g_settings.GetWatchMode(((CGUIMediaWindow *)window)->CurrentDirectory().GetContent()) == VIDEO_SHOW_UNWATCHED;
+ bReturn = CMediaSettings::Get().GetWatchedMode(((CGUIMediaWindow *)window)->CurrentDirectory().GetContent()) == WatchedModeUnwatched;
}
}
break;
@@ -2843,11 +2847,11 @@ CStdString CGUIInfoManager::GetMultiInfoLabel(const GUIInfo &info, int contextWi
{
if (info.m_info == SKIN_STRING)
{
- return g_settings.GetSkinString(info.GetData1());
+ return CSkinSettings::Get().GetString(info.GetData1());
}
else if (info.m_info == SKIN_BOOL)
{
- bool bInfo = g_settings.GetSkinBool(info.GetData1());
+ bool bInfo = CSkinSettings::Get().GetBool(info.GetData1());
if (bInfo)
return g_localizeStrings.Get(20122);
}
@@ -3151,11 +3155,15 @@ CStdString CGUIInfoManager::LocalizeTime(const CDateTime &time, TIME_FORMAT form
case TIME_FORMAT_HH_MM_XX:
return time.GetAsLocalizedTime(use12hourclock ? "h:mm xx" : "HH:mm", false);
case TIME_FORMAT_HH_MM_SS:
- return time.GetAsLocalizedTime("", true);
+ return time.GetAsLocalizedTime("hh:mm:ss", true);
+ case TIME_FORMAT_HH_MM_SS_XX:
+ return time.GetAsLocalizedTime("hh:mm:ss xx", true);
case TIME_FORMAT_H:
return time.GetAsLocalizedTime("h", false);
case TIME_FORMAT_H_MM_SS:
return time.GetAsLocalizedTime("h:mm:ss", true);
+ case TIME_FORMAT_H_MM_SS_XX:
+ return time.GetAsLocalizedTime("h:mm:ss xx", true);
case TIME_FORMAT_XX:
return use12hourclock ? time.GetAsLocalizedTime("xx", false) : "";
default:
diff --git a/xbmc/GUIInfoManager.h b/xbmc/GUIInfoManager.h
index f7f8d6ff45..06a176198f 100644
--- a/xbmc/GUIInfoManager.h
+++ b/xbmc/GUIInfoManager.h
@@ -480,7 +480,7 @@ namespace INFO
#define VERSION_MAJOR 13
#define VERSION_MINOR 0
-#define VERSION_TAG "-ALPHA2"
+#define VERSION_TAG "-ALPHA3"
#define LISTITEM_START 35000
#define LISTITEM_THUMB (LISTITEM_START)
diff --git a/xbmc/GUIPassword.cpp b/xbmc/GUIPassword.cpp
index 4a70328cc0..8cbc6729bc 100644
--- a/xbmc/GUIPassword.cpp
+++ b/xbmc/GUIPassword.cpp
@@ -30,6 +30,7 @@
#include "Util.h"
#include "settings/Settings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSourceSettings.h"
#include "guilib/GUIWindowManager.h"
#include "FileItem.h"
#include "guilib/LocalizeStrings.h"
@@ -92,8 +93,8 @@ bool CGUIPassword::IsItemUnlocked(CFileItem* pItem, const CStdString &strType)
pItem->m_iHasLock = 1;
g_passwordManager.LockSource(strType,strLabel,false);
sprintf(buffer,"%i",pItem->m_iBadPwdCount);
- g_settings.UpdateSource(strType, strLabel, "badpwdcount", buffer);
- g_settings.SaveSources();
+ CMediaSourceSettings::Get().UpdateSource(strType, strLabel, "badpwdcount", buffer);
+ CMediaSourceSettings::Get().Save();
break;
}
case 1:
@@ -102,8 +103,8 @@ bool CGUIPassword::IsItemUnlocked(CFileItem* pItem, const CStdString &strType)
if (0 != g_guiSettings.GetInt("masterlock.maxretries"))
pItem->m_iBadPwdCount++;
sprintf(buffer,"%i",pItem->m_iBadPwdCount);
- g_settings.UpdateSource(strType, strLabel, "badpwdcount", buffer);
- g_settings.SaveSources();
+ CMediaSourceSettings::Get().UpdateSource(strType, strLabel, "badpwdcount", buffer);
+ CMediaSourceSettings::Get().Save();
break;
}
default:
@@ -382,7 +383,7 @@ bool CGUIPassword::CheckMenuLock(int iWindowID)
bool CGUIPassword::LockSource(const CStdString& strType, const CStdString& strName, bool bState)
{
- VECSOURCES* pShares = g_settings.GetSourcesFromType(strType);
+ VECSOURCES* pShares = CMediaSourceSettings::Get().GetSources(strType);
bool bResult = false;
for (IVECSOURCES it=pShares->begin();it != pShares->end();++it)
{
@@ -408,7 +409,7 @@ void CGUIPassword::LockSources(bool lock)
const char* strType[5] = {"programs","music","video","pictures","files"};
for (int i=0;i<5;++i)
{
- VECSOURCES *shares = g_settings.GetSourcesFromType(strType[i]);
+ VECSOURCES *shares = CMediaSourceSettings::Get().GetSources(strType[i]);
for (IVECSOURCES it=shares->begin();it != shares->end();++it)
if (it->m_iLockMode != LOCK_MODE_EVERYONE)
it->m_iHasLock = lock ? 2 : 1;
@@ -423,16 +424,16 @@ void CGUIPassword::RemoveSourceLocks()
const char* strType[5] = {"programs","music","video","pictures","files"};
for (int i=0;i<5;++i)
{
- VECSOURCES *shares = g_settings.GetSourcesFromType(strType[i]);
+ VECSOURCES *shares = CMediaSourceSettings::Get().GetSources(strType[i]);
for (IVECSOURCES it=shares->begin();it != shares->end();++it)
if (it->m_iLockMode != LOCK_MODE_EVERYONE) // remove old info
{
it->m_iHasLock = 0;
it->m_iLockMode = LOCK_MODE_EVERYONE;
- g_settings.UpdateSource(strType[i],it->strName,"lockmode","0"); // removes locks from xml
+ CMediaSourceSettings::Get().UpdateSource(strType[i], it->strName, "lockmode", "0"); // removes locks from xml
}
}
- g_settings.SaveSources();
+ CMediaSourceSettings::Get().Save();
CGUIMessage msg(GUI_MSG_NOTIFY_ALL,0,0, GUI_MSG_UPDATE_SOURCES);
g_windowManager.SendThreadMessage(msg);
}
diff --git a/xbmc/MediaSource.h b/xbmc/MediaSource.h
index f24124d328..cc8cf3b6c7 100644
--- a/xbmc/MediaSource.h
+++ b/xbmc/MediaSource.h
@@ -113,6 +113,7 @@ typedef std::vector<CMediaSource> VECSOURCES;
\sa CMediaSource, VECSOURCES
*/
typedef std::vector<CMediaSource>::iterator IVECSOURCES;
+typedef std::vector<CMediaSource>::const_iterator CIVECSOURCES;
void AddOrReplace(VECSOURCES& sources, const VECSOURCES& extras);
void AddOrReplace(VECSOURCES& sources, const CMediaSource& source);
diff --git a/xbmc/NfoFile.cpp b/xbmc/NfoFile.cpp
index 953fd8500d..128b07411d 100644
--- a/xbmc/NfoFile.cpp
+++ b/xbmc/NfoFile.cpp
@@ -131,6 +131,11 @@ CNfoFile::NFOResult CNfoFile::Create(const CStdString& strPath, const ScraperPtr
// return value: 0 - success; 1 - no result; skip; 2 - error
int CNfoFile::Scrape(ScraperPtr& scraper)
{
+ if (scraper->IsNoop())
+ {
+ m_scurl = CScraperUrl();
+ return 0;
+ }
if (scraper->Type() != m_type)
return 1;
scraper->ClearCache();
diff --git a/xbmc/URL.cpp b/xbmc/URL.cpp
index c629995b95..f0d81b4ebe 100644
--- a/xbmc/URL.cpp
+++ b/xbmc/URL.cpp
@@ -195,7 +195,7 @@ void CURL::Parse(const CStdString& strURL1)
sep = "?;#|";
else if(strProtocol2.Equals("ftp")
|| strProtocol2.Equals("ftps"))
- sep = "?;";
+ sep = "?;|";
if(sep)
{
diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp
index 6ef1856ff7..0f3d2acfa6 100644
--- a/xbmc/Util.cpp
+++ b/xbmc/Util.cpp
@@ -63,6 +63,7 @@
#include "utils/fstrcmp.h"
#include "storage/MediaManager.h"
#ifdef _WIN32
+#include "utils/CharsetConverter.h"
#include <shlobj.h>
#include "WIN32Util.h"
#endif
diff --git a/xbmc/XBDateTime.h b/xbmc/XBDateTime.h
index 335f8d22c4..e4e34a97be 100644
--- a/xbmc/XBDateTime.h
+++ b/xbmc/XBDateTime.h
@@ -27,18 +27,20 @@
TIME_FORMAT_HH_MM_SS = TIME_FORMAT_HH | TIME_FORMAT_MM | TIME_FORMAT_SS
\sa StringUtils::SecondsToTimeString
*/
-enum TIME_FORMAT { TIME_FORMAT_GUESS = 0,
- TIME_FORMAT_SS = 1,
- TIME_FORMAT_MM = 2,
- TIME_FORMAT_MM_SS = 3,
- TIME_FORMAT_HH = 4,
- TIME_FORMAT_HH_SS = 5, // not particularly useful
- TIME_FORMAT_HH_MM = 6,
- TIME_FORMAT_HH_MM_SS = 7,
- TIME_FORMAT_XX = 8, // AM/PM
- TIME_FORMAT_HH_MM_XX = 14,
- TIME_FORMAT_H = 16,
- TIME_FORMAT_H_MM_SS = 19};
+enum TIME_FORMAT { TIME_FORMAT_GUESS = 0,
+ TIME_FORMAT_SS = 1,
+ TIME_FORMAT_MM = 2,
+ TIME_FORMAT_MM_SS = 3,
+ TIME_FORMAT_HH = 4,
+ TIME_FORMAT_HH_SS = 5, // not particularly useful
+ TIME_FORMAT_HH_MM = 6,
+ TIME_FORMAT_HH_MM_SS = 7,
+ TIME_FORMAT_XX = 8, // AM/PM
+ TIME_FORMAT_HH_MM_XX = 14,
+ TIME_FORMAT_HH_MM_SS_XX = 15,
+ TIME_FORMAT_H = 16,
+ TIME_FORMAT_H_MM_SS = 19,
+ TIME_FORMAT_H_MM_SS_XX = 27};
class CDateTime;
diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp
index 23f89b8657..7315ab0154 100644
--- a/xbmc/addons/Addon.cpp
+++ b/xbmc/addons/Addon.cpp
@@ -512,6 +512,7 @@ void CAddon::SaveSettings(void)
CXBMCTinyXML doc;
SettingsToXML(doc);
doc.SaveFile(m_userSettingsPath);
+ m_userSettingsLoaded = true;
CAddonMgr::Get().ReloadSettings(ID());//push the settings changes to the running addon instance
g_pythonParser.OnSettingsChanged(ID());
diff --git a/xbmc/addons/AddonCallbacksAddon.cpp b/xbmc/addons/AddonCallbacksAddon.cpp
index b0dcd0aaa3..33e97782f8 100644
--- a/xbmc/addons/AddonCallbacksAddon.cpp
+++ b/xbmc/addons/AddonCallbacksAddon.cpp
@@ -29,6 +29,7 @@
#include "utils/URIUtils.h"
#include "FileItem.h"
#include "network/Network.h"
+#include "utils/CharsetConverter.h"
using namespace XFILE;
diff --git a/xbmc/addons/AddonCallbacksGUI.cpp b/xbmc/addons/AddonCallbacksGUI.cpp
index 424f7e1130..ddbf3f6205 100644
--- a/xbmc/addons/AddonCallbacksGUI.cpp
+++ b/xbmc/addons/AddonCallbacksGUI.cpp
@@ -207,13 +207,13 @@ GUIHANDLE CAddonCallbacksGUI::Window_New(void *addonData, const char *xmlFilenam
//FIXME make this static method of current skin?
CStdString str("none");
AddonProps props(str, ADDON_SKIN, str, str);
- CSkinInfo skinInfo(props);
CStdString basePath;
URIUtils::AddFileToFolder(guiHelper->m_addon->Path(), "resources", basePath);
URIUtils::AddFileToFolder(basePath, "skins", basePath);
URIUtils::AddFileToFolder(basePath, defaultSkin, basePath);
props.path = basePath;
+ CSkinInfo skinInfo(props);
skinInfo.Start();
strSkinPath = skinInfo.GetSkinPath(xmlFilename, &res, basePath);
diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp
index b5ba7a0088..631a01c481 100644
--- a/xbmc/addons/AddonInstaller.cpp
+++ b/xbmc/addons/AddonInstaller.cpp
@@ -313,6 +313,14 @@ void CAddonInstaller::InstallFromXBMCRepo(const set<CStdString> &addonIDs)
bool CAddonInstaller::CheckDependencies(const AddonPtr &addon)
{
+ std::vector<std::string> preDeps;
+ preDeps.push_back(addon->ID());
+ return CheckDependencies(addon, preDeps);
+}
+
+bool CAddonInstaller::CheckDependencies(const AddonPtr &addon,
+ std::vector<std::string>& preDeps)
+{
if (!addon.get())
return true; // a NULL addon has no dependencies
ADDONDEPS deps = addon->GetDeps();
@@ -333,16 +341,14 @@ bool CAddonInstaller::CheckDependencies(const AddonPtr &addon)
return false;
}
}
- // prevent infinite loops
- if (dep && dep->ID() == addon->ID())
- {
- CLog::Log(LOGERROR, "Addon %s depends on itself, ignoring", addon->ID().c_str());
- return false;
- }
// at this point we have our dep, or the dep is optional (and we don't have it) so check that it's OK as well
// TODO: should we assume that installed deps are OK?
- if (dep && !CheckDependencies(dep))
- return false;
+ if (dep && std::find(preDeps.begin(), preDeps.end(), dep->ID()) == preDeps.end())
+ {
+ if (!CheckDependencies(dep, preDeps))
+ return false;
+ preDeps.push_back(dep->ID());
+ }
}
return true;
}
diff --git a/xbmc/addons/AddonInstaller.h b/xbmc/addons/AddonInstaller.h
index b0ff2bd8ad..5df69fbad8 100644
--- a/xbmc/addons/AddonInstaller.h
+++ b/xbmc/addons/AddonInstaller.h
@@ -122,6 +122,16 @@ private:
*/
bool DoInstall(const ADDON::AddonPtr &addon, const CStdString &hash = "", bool update = false, const CStdString &referer = "", bool background = true);
+ /*! \brief Check whether dependencies of an addon exist or are installable.
+ Iterates through the addon's dependencies, checking they're installed or installable.
+ Each dependency must also satisfies CheckDependencies in turn.
+ \param addon the addon to check
+ \param preDeps previous dependencies encountered during recursion. aids in avoiding infinite recursion
+ \return true if dependencies are available, false otherwise.
+ */
+ bool CheckDependencies(const ADDON::AddonPtr &addon,
+ std::vector<std::string>& preDeps);
+
void PrunePackageCache();
int64_t EnumeratePackageFolder(std::map<CStdString,CFileItemList*>& result);
diff --git a/xbmc/addons/GUIDialogAddonSettings.cpp b/xbmc/addons/GUIDialogAddonSettings.cpp
index dc6ec95ea9..c304dc15f5 100644
--- a/xbmc/addons/GUIDialogAddonSettings.cpp
+++ b/xbmc/addons/GUIDialogAddonSettings.cpp
@@ -43,6 +43,7 @@
#include "guilib/GUIKeyboardFactory.h"
#include "FileItem.h"
#include "settings/Settings.h"
+#include "settings/MediaSourceSettings.h"
#include "GUIInfoManager.h"
#include "GUIUserMessages.h"
#include "dialogs/GUIDialogSelect.h"
@@ -331,7 +332,7 @@ bool CGUIDialogAddonSettings::ShowVirtualKeyboard(int iControl)
// setup the shares
VECSOURCES *shares = NULL;
if (source && strcmpi(source, "") != 0)
- shares = g_settings.GetSourcesFromType(source);
+ shares = CMediaSourceSettings::Get().GetSources(source);
VECSOURCES localShares;
if (!shares)
diff --git a/xbmc/addons/GUIWindowAddonBrowser.cpp b/xbmc/addons/GUIWindowAddonBrowser.cpp
index 09db4c68aa..d926e4a3c1 100644
--- a/xbmc/addons/GUIWindowAddonBrowser.cpp
+++ b/xbmc/addons/GUIWindowAddonBrowser.cpp
@@ -43,6 +43,7 @@
#include "Application.h"
#include "AddonDatabase.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSourceSettings.h"
#include "storage/MediaManager.h"
#include "settings/GUISettings.h"
#include "LangInfo.h"
@@ -217,7 +218,7 @@ bool CGUIWindowAddonBrowser::OnClick(int iItem)
if (item->GetPath() == "addons://install/")
{
// pop up filebrowser to grab an installed folder
- VECSOURCES shares = g_settings.m_fileSources;
+ VECSOURCES shares = *CMediaSourceSettings::Get().GetSources("files");
g_mediaManager.GetLocalDrives(shares);
g_mediaManager.GetNetworkLocations(shares);
CStdString path;
diff --git a/xbmc/addons/Scraper.cpp b/xbmc/addons/Scraper.cpp
index a7c373ed3b..75d185a79f 100644
--- a/xbmc/addons/Scraper.cpp
+++ b/xbmc/addons/Scraper.cpp
@@ -412,12 +412,23 @@ bool CScraper::IsInUse() const
return false;
}
+bool CScraper::IsNoop()
+{
+ if (!Load())
+ throw CScraperError();
+
+ return m_parser.IsNoop();
+}
+
// pass in contents of .nfo file; returns URL (possibly empty if none found)
// and may populate strId, or throws CScraperError on error
CScraperUrl CScraper::NfoUrl(const CStdString &sNfoContent)
{
CScraperUrl scurlRet;
+ if (IsNoop())
+ return scurlRet;
+
// scraper function takes contents of .nfo file, returns XML (see below)
vector<CStdString> vcsIn;
vcsIn.push_back(sNfoContent);
@@ -490,14 +501,18 @@ std::vector<CScraperUrl> CScraper::FindMovie(XFILE::CCurlFile &fcurl, const CStd
CStdString sTitle, sTitleYear, sYear;
CUtil::CleanString(sMovie, sTitle, sTitleYear, sYear, true/*fRemoveExt*/, fFirst);
- if (!fFirst || Content() == CONTENT_MUSICVIDEOS)
- sTitle.Replace("-"," ");
-
CLog::Log(LOGDEBUG, "%s: Searching for '%s' using %s scraper "
"(path: '%s', content: '%s', version: '%s')", __FUNCTION__, sTitle.c_str(),
Name().c_str(), Path().c_str(),
ADDON::TranslateContent(Content()).c_str(), Version().c_str());
+ std::vector<CScraperUrl> vcscurl;
+ if (IsNoop())
+ return vcscurl;
+
+ if (!fFirst || Content() == CONTENT_MUSICVIDEOS)
+ sTitle.Replace("-"," ");
+
sTitle.ToLower();
vector<CStdString> vcsIn(1);
@@ -509,7 +524,6 @@ std::vector<CScraperUrl> CScraper::FindMovie(XFILE::CCurlFile &fcurl, const CStd
// request a search URL from the title/filename/etc.
CScraperUrl scurl;
vector<CStdString> vcsOut = Run("CreateSearchUrl", scurl, fcurl, &vcsIn);
- std::vector<CScraperUrl> vcscurl;
if (vcsOut.empty())
{
CLog::Log(LOGDEBUG, "%s: CreateSearchUrl failed", __FUNCTION__);
@@ -616,6 +630,10 @@ std::vector<CMusicAlbumInfo> CScraper::FindAlbum(CCurlFile &fcurl, const CStdStr
sAlbum.c_str(), Name().c_str(), Path().c_str(),
ADDON::TranslateContent(Content()).c_str(), Version().c_str());
+ std::vector<CMusicAlbumInfo> vcali;
+ if (IsNoop())
+ return vcali;
+
// scraper function is given the album and artist as parameters and
// returns an XML <url> element parseable by CScraperUrl
std::vector<CStdString> extras(2);
@@ -628,7 +646,6 @@ std::vector<CMusicAlbumInfo> CScraper::FindAlbum(CCurlFile &fcurl, const CStdStr
if (vcsOut.size() > 1)
CLog::Log(LOGWARNING, "%s: scraper returned multiple results; using first", __FUNCTION__);
- std::vector<CMusicAlbumInfo> vcali;
if (vcsOut.empty() || vcsOut[0].empty())
return vcali;
scurl.ParseString(vcsOut[0]);
@@ -710,6 +727,10 @@ std::vector<CMusicArtistInfo> CScraper::FindArtist(CCurlFile &fcurl,
Name().c_str(), Path().c_str(),
ADDON::TranslateContent(Content()).c_str(), Version().c_str());
+ std::vector<CMusicArtistInfo> vcari;
+ if (IsNoop())
+ return vcari;
+
// scraper function is given the artist as parameter and
// returns an XML <url> element parseable by CScraperUrl
std::vector<CStdString> extras(1);
@@ -718,7 +739,6 @@ std::vector<CMusicArtistInfo> CScraper::FindArtist(CCurlFile &fcurl,
CScraperUrl scurl;
vector<CStdString> vcsOut = RunNoThrow("CreateArtistSearchUrl", scurl, fcurl, &extras);
- std::vector<CMusicArtistInfo> vcari;
if (vcsOut.empty() || vcsOut[0].empty())
return vcari;
scurl.ParseString(vcsOut[0]);
diff --git a/xbmc/addons/Scraper.h b/xbmc/addons/Scraper.h
index 562a9b20d5..0d542870b4 100644
--- a/xbmc/addons/Scraper.h
+++ b/xbmc/addons/Scraper.h
@@ -116,6 +116,7 @@ public:
bool Supports(const CONTENT_TYPE &content) const;
bool IsInUse() const;
+ bool IsNoop();
// scraper media functions
CScraperUrl NfoUrl(const CStdString &sNfoContent);
diff --git a/xbmc/android/activity/AndroidExtra.h b/xbmc/android/activity/AndroidExtra.h
new file mode 100644
index 0000000000..4fa556a2e5
--- /dev/null
+++ b/xbmc/android/activity/AndroidExtra.h
@@ -0,0 +1,26 @@
+#pragma once
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+ /*** Extra's not found in the Android NDK ***/
+
+ //Additional defines from android.view.KeyEvent (http://developer.android.com/reference/android/view/KeyEvent.html)
+#define AKEYCODE_ESCAPE 111
+#define AKEYCODE_FORWARD_DEL 112
diff --git a/xbmc/android/activity/AndroidKey.cpp b/xbmc/android/activity/AndroidKey.cpp
index 4e7be06f69..091913dd20 100644
--- a/xbmc/android/activity/AndroidKey.cpp
+++ b/xbmc/android/activity/AndroidKey.cpp
@@ -23,6 +23,8 @@
#include "guilib/Key.h"
#include "windowing/WinEvents.h"
+#include "AndroidExtra.h"
+
static KeyMap keyMap[] = {
{ AKEYCODE_UNKNOWN , XBMCK_LAST },
{ AKEYCODE_SOFT_LEFT , XBMCK_LEFT },
@@ -91,7 +93,7 @@ static KeyMap keyMap[] = {
{ AKEYCODE_EXPLORER , XBMCK_LAST },
{ AKEYCODE_ENVELOPE , XBMCK_LAST },
{ AKEYCODE_ENTER , XBMCK_RETURN },
- { AKEYCODE_DEL , XBMCK_DELETE },
+ { AKEYCODE_DEL , XBMCK_BACKSPACE },
{ AKEYCODE_GRAVE , XBMCK_BACKQUOTE },
{ AKEYCODE_MINUS , XBMCK_MINUS },
{ AKEYCODE_EQUALS , XBMCK_EQUALS },
@@ -134,7 +136,9 @@ static KeyMap keyMap[] = {
{ AKEYCODE_BUTTON_THUMBR , XBMCK_LAST },
{ AKEYCODE_BUTTON_START , XBMCK_LAST },
{ AKEYCODE_BUTTON_SELECT , XBMCK_LAST },
- { AKEYCODE_BUTTON_MODE , XBMCK_LAST }
+ { AKEYCODE_BUTTON_MODE , XBMCK_LAST },
+ { AKEYCODE_ESCAPE , XBMCK_ESCAPE },
+ { AKEYCODE_FORWARD_DEL , XBMCK_DELETE }
};
bool CAndroidKey::onKeyboardEvent(AInputEvent* event)
@@ -231,4 +235,4 @@ void CAndroidKey::XBMC_Key(uint8_t code, uint16_t key, uint16_t modifiers, bool
CXBMCApp::android_printf("XBMC_Key(%u, %u, 0x%04X, %d)", code, key, modifiers, up);
CWinEvents::MessagePush(&newEvent);
-} \ No newline at end of file
+}
diff --git a/xbmc/android/activity/XBMCApp.cpp b/xbmc/android/activity/XBMCApp.cpp
index c4046199a8..87d3a6f9bb 100644
--- a/xbmc/android/activity/XBMCApp.cpp
+++ b/xbmc/android/activity/XBMCApp.cpp
@@ -941,7 +941,7 @@ int CXBMCApp::GetMaxSystemVolume(JNIEnv *env)
jmethodID mgetStreamMaxVolume = env->GetMethodID(cAudioManager, "getStreamMaxVolume", "(I)I");
jfieldID fstreamMusic = env->GetStaticFieldID(cAudioManager, "STREAM_MUSIC", "I");
jint stream_music = env->GetStaticIntField(cAudioManager, fstreamMusic);
- int maxVolume = (int)env->CallObjectMethod(oAudioManager, mgetStreamMaxVolume, stream_music); // AudioManager.STREAM_MUSIC
+ int maxVolume = (int)env->CallIntMethod(oAudioManager, mgetStreamMaxVolume, stream_music); // AudioManager.STREAM_MUSIC
env->DeleteLocalRef(oAudioManager);
env->DeleteLocalRef(cAudioManager);
diff --git a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
index 59a37a5a65..34ddda64eb 100644
--- a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
+++ b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
@@ -29,8 +29,8 @@
#include <string.h>
CAEEncoderFFmpeg::CAEEncoderFFmpeg():
- m_CodecCtx (NULL ),
m_BitRate (0 ),
+ m_CodecCtx (NULL ),
m_BufferSize (0 ),
m_OutputSize (0 ),
m_OutputRatio (0.0 ),
diff --git a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp
index 2c1d4bbdc7..a9302ac5fb 100644
--- a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp
@@ -51,8 +51,11 @@ OSStatus deviceChangedCB( AudioObjectID inObjectID,
void* inClientData)
{
CCoreAudioAE *pEngine = (CCoreAudioAE *)inClientData;
- pEngine->AudioDevicesChanged();
- CLog::Log(LOGDEBUG, "CCoreAudioAE - audiodevicelist changed!");
+ if (pEngine->GetHAL())
+ {
+ pEngine->AudioDevicesChanged();
+ CLog::Log(LOGDEBUG, "CCoreAudioAE - audiodevicelist changed!");
+ }
return noErr;
}
@@ -102,8 +105,8 @@ CCoreAudioAE::CCoreAudioAE() :
CCoreAudioAE::~CCoreAudioAE()
{
- RegisterDeviceChangedCB(false, this);
Shutdown();
+ RegisterDeviceChangedCB(false, this);
}
void CCoreAudioAE::Shutdown()
@@ -138,6 +141,9 @@ void CCoreAudioAE::Shutdown()
void CCoreAudioAE::AudioDevicesChanged()
{
+ if (!m_Initialized)
+ return;
+
// give CA a bit time to realise that maybe the
// default device might have changed now - else
// OpenCoreAudio might open the old default device
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
index 6ec78c5ba0..3dabe2d23b 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
@@ -975,8 +975,10 @@ bool CSoftAE::Suspend()
{
CLog::Log(LOGDEBUG, "CSoftAE::Suspend - Suspending AE processing");
m_isSuspended = true;
+
+ StopAllSounds();
+
CSingleLock streamLock(m_streamLock);
-
for (StreamList::iterator itt = m_playingStreams.begin(); itt != m_playingStreams.end(); ++itt)
{
CSoftAEStream *stream = *itt;
@@ -985,7 +987,6 @@ bool CSoftAE::Suspend()
streamLock.Leave();
#if defined(TARGET_LINUX)
/*workaround sinks not playing sound after resume */
- StopAllSounds();
bool ret = true;
if(m_sink)
{
@@ -1536,7 +1537,8 @@ inline void CSoftAE::ProcessSuspend()
*/
if (!m_isSuspended && (!m_playingStreams.empty() || !m_playing_sounds.empty()))
{
- m_reOpen = !m_sink->SoftResume() || m_reOpen; // sink returns false if it requires reinit (worthless with current implementation)
+ // the sink might still be not initialized after Resume of real suspend
+ m_reOpen = m_sink && (!m_sink->SoftResume() || m_reOpen); // sink returns false if it requires reinit (worthless with current implementation)
m_sinkIsSuspended = false; //sink processing data
m_softSuspend = false; //break suspend loop (under some conditions)
CLog::Log(LOGDEBUG, "Resumed the Sink");
diff --git a/xbmc/cores/ExternalPlayer/ExternalPlayer.cpp b/xbmc/cores/ExternalPlayer/ExternalPlayer.cpp
index 388884edf4..782fb27d53 100644
--- a/xbmc/cores/ExternalPlayer/ExternalPlayer.cpp
+++ b/xbmc/cores/ExternalPlayer/ExternalPlayer.cpp
@@ -39,6 +39,7 @@
#include "utils/log.h"
#include "cores/AudioEngine/AEFactory.h"
#if defined(_WIN32)
+ #include "utils/CharsetConverter.h"
#include "Windows.h"
#ifdef HAS_IRSERVERSUITE
#include "input/windows/IRServerSuite.h"
diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.cpp b/xbmc/cores/VideoRenderers/BaseRenderer.cpp
index bd7850dad3..7090728e31 100644
--- a/xbmc/cores/VideoRenderers/BaseRenderer.cpp
+++ b/xbmc/cores/VideoRenderers/BaseRenderer.cpp
@@ -24,6 +24,7 @@
#include "BaseRenderer.h"
#include "settings/Settings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
#include "guilib/GraphicContext.h"
#include "guilib/GUIWindowManager.h"
#include "utils/log.h"
@@ -303,8 +304,8 @@ RESOLUTION CBaseRenderer::GetResolution() const
float CBaseRenderer::GetAspectRatio() const
{
- float width = (float)m_sourceWidth - g_settings.m_currentVideoSettings.m_CropLeft - g_settings.m_currentVideoSettings.m_CropRight;
- float height = (float)m_sourceHeight - g_settings.m_currentVideoSettings.m_CropTop - g_settings.m_currentVideoSettings.m_CropBottom;
+ float width = (float)m_sourceWidth - CMediaSettings::Get().GetCurrentVideoSettings().m_CropLeft - CMediaSettings::Get().GetCurrentVideoSettings().m_CropRight;
+ float height = (float)m_sourceHeight - CMediaSettings::Get().GetCurrentVideoSettings().m_CropTop - CMediaSettings::Get().GetCurrentVideoSettings().m_CropBottom;
return m_sourceFrameRatio * width / height * m_sourceHeight / m_sourceWidth;
}
@@ -565,23 +566,23 @@ void CBaseRenderer::ManageDisplay()
{
const CRect view = g_graphicsContext.GetViewWindow();
- m_sourceRect.x1 = (float)g_settings.m_currentVideoSettings.m_CropLeft;
- m_sourceRect.y1 = (float)g_settings.m_currentVideoSettings.m_CropTop;
- m_sourceRect.x2 = (float)m_sourceWidth - g_settings.m_currentVideoSettings.m_CropRight;
- m_sourceRect.y2 = (float)m_sourceHeight - g_settings.m_currentVideoSettings.m_CropBottom;
+ m_sourceRect.x1 = (float)CMediaSettings::Get().GetCurrentVideoSettings().m_CropLeft;
+ m_sourceRect.y1 = (float)CMediaSettings::Get().GetCurrentVideoSettings().m_CropTop;
+ m_sourceRect.x2 = (float)m_sourceWidth - CMediaSettings::Get().GetCurrentVideoSettings().m_CropRight;
+ m_sourceRect.y2 = (float)m_sourceHeight - CMediaSettings::Get().GetCurrentVideoSettings().m_CropBottom;
CalcNormalDisplayRect(view.x1, view.y1, view.Width(), view.Height(), GetAspectRatio() * g_settings.m_fPixelRatio, g_settings.m_fZoomAmount, g_settings.m_fVerticalShift);
}
void CBaseRenderer::SetViewMode(int viewMode)
{
- if (viewMode < VIEW_MODE_NORMAL || viewMode > VIEW_MODE_CUSTOM)
- viewMode = VIEW_MODE_NORMAL;
+ if (viewMode < ViewModeNormal || viewMode > ViewModeCustom)
+ viewMode = ViewModeNormal;
if (m_iFlags & (CONF_FLAGS_FORMAT_SBS | CONF_FLAGS_FORMAT_TB))
- viewMode = VIEW_MODE_NORMAL;
+ viewMode = ViewModeNormal;
- g_settings.m_currentVideoSettings.m_ViewMode = viewMode;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode = viewMode;
// get our calibrated full screen resolution
RESOLUTION res = GetResolution();
@@ -596,7 +597,7 @@ void CBaseRenderer::SetViewMode(int viewMode)
float sourceFrameRatio = GetAspectRatio();
bool is43 = (sourceFrameRatio < 8.f/(3.f*sqrt(3.f)) &&
- g_settings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_NORMAL);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeNormal);
// Splitres scaling factor
float xscale = (float)g_settings.m_ResInfo[res].iScreenWidth / (float)g_settings.m_ResInfo[res].iWidth;
@@ -608,8 +609,8 @@ void CBaseRenderer::SetViewMode(int viewMode)
g_settings.m_fVerticalShift = 0.0f;
g_settings.m_bNonLinStretch = false;
- if ( g_settings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_ZOOM ||
- (is43 && g_guiSettings.GetInt("videoplayer.stretch43") == VIEW_MODE_ZOOM))
+ if ( CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeZoom ||
+ (is43 && g_guiSettings.GetInt("videoplayer.stretch43") == ViewModeZoom))
{ // zoom image so no black bars
g_settings.m_fPixelRatio = 1.0;
// calculate the desired output ratio
@@ -625,7 +626,7 @@ void CBaseRenderer::SetViewMode(int viewMode)
g_settings.m_fZoomAmount = newHeight / screenHeight;
}
}
- else if (g_settings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_STRETCH_4x3)
+ else if (CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeStretch4x3)
{ // stretch image to 4:3 ratio
g_settings.m_fZoomAmount = 1.0;
if (res == RES_PAL_4x3 || res == RES_PAL60_4x3 || res == RES_NTSC_4x3 || res == RES_HDTV_480p_4x3)
@@ -640,16 +641,16 @@ void CBaseRenderer::SetViewMode(int viewMode)
g_settings.m_fPixelRatio = (4.0f / 3.0f) / sourceFrameRatio;
}
}
- else if ( g_settings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_WIDE_ZOOM ||
- (is43 && g_guiSettings.GetInt("videoplayer.stretch43") == VIEW_MODE_WIDE_ZOOM))
+ else if ( CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeWideZoom ||
+ (is43 && g_guiSettings.GetInt("videoplayer.stretch43") == ViewModeWideZoom))
{ // super zoom
float stretchAmount = (screenWidth / screenHeight) * g_settings.m_ResInfo[res].fPixelRatio / sourceFrameRatio;
g_settings.m_fPixelRatio = pow(stretchAmount, float(2.0/3.0));
g_settings.m_fZoomAmount = pow(stretchAmount, float((stretchAmount < 1.0) ? -1.0/3.0 : 1.0/3.0));
g_settings.m_bNonLinStretch = true;
}
- else if ( g_settings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_STRETCH_16x9 ||
- (is43 && g_guiSettings.GetInt("videoplayer.stretch43") == VIEW_MODE_STRETCH_16x9))
+ else if ( CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeStretch16x9 ||
+ (is43 && g_guiSettings.GetInt("videoplayer.stretch43") == ViewModeStretch16x9))
{ // stretch image to 16:9 ratio
g_settings.m_fZoomAmount = 1.0;
if (res == RES_PAL_4x3 || res == RES_PAL60_4x3 || res == RES_NTSC_4x3 || res == RES_HDTV_480p_4x3)
@@ -663,7 +664,7 @@ void CBaseRenderer::SetViewMode(int viewMode)
g_settings.m_fPixelRatio = (screenWidth / screenHeight) * g_settings.m_ResInfo[res].fPixelRatio / sourceFrameRatio;
}
}
- else if (g_settings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_ORIGINAL)
+ else if (CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeOriginal)
{ // zoom image so that the height is the original size
g_settings.m_fPixelRatio = 1.0;
// get the size of the media file
@@ -678,25 +679,25 @@ void CBaseRenderer::SetViewMode(int viewMode)
newWidth = newHeight * outputFrameRatio;
}
// now work out the zoom amount so that no zoom is done
- g_settings.m_fZoomAmount = (m_sourceHeight - g_settings.m_currentVideoSettings.m_CropTop - g_settings.m_currentVideoSettings.m_CropBottom) / newHeight;
+ g_settings.m_fZoomAmount = (m_sourceHeight - CMediaSettings::Get().GetCurrentVideoSettings().m_CropTop - CMediaSettings::Get().GetCurrentVideoSettings().m_CropBottom) / newHeight;
}
- else if (g_settings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_CUSTOM)
+ else if (CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeCustom)
{
- g_settings.m_fZoomAmount = g_settings.m_currentVideoSettings.m_CustomZoomAmount;
- g_settings.m_fPixelRatio = g_settings.m_currentVideoSettings.m_CustomPixelRatio;
- g_settings.m_bNonLinStretch = g_settings.m_currentVideoSettings.m_CustomNonLinStretch;
- g_settings.m_fVerticalShift = g_settings.m_currentVideoSettings.m_CustomVerticalShift;
+ g_settings.m_fZoomAmount = CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount;
+ g_settings.m_fPixelRatio = CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio;
+ g_settings.m_bNonLinStretch = CMediaSettings::Get().GetCurrentVideoSettings().m_CustomNonLinStretch;
+ g_settings.m_fVerticalShift = CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift;
}
- else // if (g_settings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_NORMAL)
+ else // if (CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeNormal)
{
g_settings.m_fPixelRatio = 1.0;
g_settings.m_fZoomAmount = 1.0;
}
- g_settings.m_currentVideoSettings.m_CustomZoomAmount = g_settings.m_fZoomAmount;
- g_settings.m_currentVideoSettings.m_CustomPixelRatio = g_settings.m_fPixelRatio;
- g_settings.m_currentVideoSettings.m_CustomNonLinStretch = g_settings.m_bNonLinStretch;
- g_settings.m_currentVideoSettings.m_CustomVerticalShift = g_settings.m_fVerticalShift;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount = g_settings.m_fZoomAmount;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio = g_settings.m_fPixelRatio;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomNonLinStretch = g_settings.m_bNonLinStretch;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift = g_settings.m_fVerticalShift;
}
void CBaseRenderer::MarkDirty()
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
index 7771daf897..a3c46405cf 100644
--- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
@@ -33,6 +33,7 @@
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
#include "VideoShaders/YUV2RGBShader.h"
#include "VideoShaders/VideoFilterShader.h"
#include "windowing/WindowingFactory.h"
@@ -292,7 +293,7 @@ bool CLinuxRendererGL::Configure(unsigned int width, unsigned int height, unsign
// Calculate the input frame aspect ratio.
CalculateFrameAspectRatio(d_width, d_height);
ChooseBestResolution(fps);
- SetViewMode(g_settings.m_currentVideoSettings.m_ViewMode);
+ SetViewMode(CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode);
ManageDisplay();
m_bConfigured = true;
@@ -835,7 +836,7 @@ void CLinuxRendererGL::UpdateVideoFilter()
}
}
- if (m_scalingMethodGui == g_settings.m_currentVideoSettings.m_ScalingMethod && !nonLinStretchChanged)
+ if (m_scalingMethodGui == CMediaSettings::Get().GetCurrentVideoSettings().m_ScalingMethod && !nonLinStretchChanged)
return;
//recompile YUV shader when non-linear stretch is turned on/off
@@ -843,7 +844,7 @@ void CLinuxRendererGL::UpdateVideoFilter()
if (m_nonLinStretch || nonLinStretchChanged)
m_reloadShaders = 1;
- m_scalingMethodGui = g_settings.m_currentVideoSettings.m_ScalingMethod;
+ m_scalingMethodGui = CMediaSettings::Get().GetCurrentVideoSettings().m_ScalingMethod;
m_scalingMethod = m_scalingMethodGui;
if(!Supports(m_scalingMethod))
@@ -1247,8 +1248,8 @@ void CLinuxRendererGL::RenderSinglePass(int index, int field)
glActiveTextureARB(GL_TEXTURE0);
VerifyGLState();
- m_pYUVShader->SetBlack(g_settings.m_currentVideoSettings.m_Brightness * 0.01f - 0.5f);
- m_pYUVShader->SetContrast(g_settings.m_currentVideoSettings.m_Contrast * 0.02f);
+ m_pYUVShader->SetBlack(CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness * 0.01f - 0.5f);
+ m_pYUVShader->SetContrast(CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast * 0.02f);
m_pYUVShader->SetWidth(planes[0].texwidth);
m_pYUVShader->SetHeight(planes[0].texheight);
@@ -1372,8 +1373,8 @@ void CLinuxRendererGL::RenderToFBO(int index, int field)
m_fbo.fbo.BeginRender();
VerifyGLState();
- m_pYUVShader->SetBlack(g_settings.m_currentVideoSettings.m_Brightness * 0.01f - 0.5f);
- m_pYUVShader->SetContrast(g_settings.m_currentVideoSettings.m_Contrast * 0.02f);
+ m_pYUVShader->SetBlack(CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness * 0.01f - 0.5f);
+ m_pYUVShader->SetContrast(CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast * 0.02f);
m_pYUVShader->SetWidth(planes[0].texwidth);
m_pYUVShader->SetHeight(planes[0].texheight);
m_pYUVShader->SetNonLinStretch(1.0);
@@ -3098,11 +3099,11 @@ void CLinuxRendererGL::UploadRGBTexture(int source)
}
if (imaging==1 &&
- ((g_settings.m_currentVideoSettings.m_Brightness!=50) ||
- (g_settings.m_currentVideoSettings.m_Contrast!=50)))
+ ((CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness!=50) ||
+ (CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast!=50)))
{
- GLfloat brightness = ((GLfloat)g_settings.m_currentVideoSettings.m_Brightness - 50.0f)/100.0f;;
- GLfloat contrast = ((GLfloat)g_settings.m_currentVideoSettings.m_Contrast)/50.0f;
+ GLfloat brightness = ((GLfloat)CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness - 50.0f)/100.0f;;
+ GLfloat contrast = ((GLfloat)CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast)/50.0f;
glPixelTransferf(GL_RED_SCALE , contrast);
glPixelTransferf(GL_GREEN_SCALE, contrast);
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
index 3574a27e62..176d946646 100644
--- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
@@ -35,6 +35,7 @@
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
#include "guilib/FrameBufferObject.h"
#include "VideoShaders/YUV2RGBShader.h"
#include "VideoShaders/VideoFilterShader.h"
@@ -174,7 +175,7 @@ bool CLinuxRendererGLES::Configure(unsigned int width, unsigned int height, unsi
// Calculate the input frame aspect ratio.
CalculateFrameAspectRatio(d_width, d_height);
ChooseBestResolution(fps);
- SetViewMode(g_settings.m_currentVideoSettings.m_ViewMode);
+ SetViewMode(CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode);
ManageDisplay();
m_bConfigured = true;
@@ -545,9 +546,9 @@ unsigned int CLinuxRendererGLES::PreInit()
void CLinuxRendererGLES::UpdateVideoFilter()
{
- if (m_scalingMethodGui == g_settings.m_currentVideoSettings.m_ScalingMethod)
+ if (m_scalingMethodGui == CMediaSettings::Get().GetCurrentVideoSettings().m_ScalingMethod)
return;
- m_scalingMethodGui = g_settings.m_currentVideoSettings.m_ScalingMethod;
+ m_scalingMethodGui = CMediaSettings::Get().GetCurrentVideoSettings().m_ScalingMethod;
m_scalingMethod = m_scalingMethodGui;
if(!Supports(m_scalingMethod))
@@ -859,8 +860,8 @@ void CLinuxRendererGLES::RenderSinglePass(int index, int field)
glActiveTexture(GL_TEXTURE0);
VerifyGLState();
- m_pYUVShader->SetBlack(g_settings.m_currentVideoSettings.m_Brightness * 0.01f - 0.5f);
- m_pYUVShader->SetContrast(g_settings.m_currentVideoSettings.m_Contrast * 0.02f);
+ m_pYUVShader->SetBlack(CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness * 0.01f - 0.5f);
+ m_pYUVShader->SetContrast(CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast * 0.02f);
m_pYUVShader->SetWidth(im.width);
m_pYUVShader->SetHeight(im.height);
if (field == FIELD_TOP)
@@ -981,8 +982,8 @@ void CLinuxRendererGLES::RenderMultiPass(int index, int field)
m_fbo.BeginRender();
VerifyGLState();
- m_pYUVShader->SetBlack(g_settings.m_currentVideoSettings.m_Brightness * 0.01f - 0.5f);
- m_pYUVShader->SetContrast(g_settings.m_currentVideoSettings.m_Contrast * 0.02f);
+ m_pYUVShader->SetBlack(CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness * 0.01f - 0.5f);
+ m_pYUVShader->SetContrast(CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast * 0.02f);
m_pYUVShader->SetWidth(im.width);
m_pYUVShader->SetHeight(im.height);
if (field == FIELD_TOP)
diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp
index d15424f8f0..1b761ace01 100644
--- a/xbmc/cores/VideoRenderers/RenderManager.cpp
+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp
@@ -34,6 +34,7 @@
#include "settings/Settings.h"
#include "settings/GUISettings.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSettings.h"
#if defined(HAS_GL)
#include "LinuxRendererGL.h"
@@ -564,8 +565,8 @@ void CXBMCRenderManager::FlipPage(volatile bool& bStop, double timestamp /* = 0L
m_presentfield = sync;
m_presentstep = PRESENT_FLIP;
m_presentsource = source;
- EDEINTERLACEMODE deinterlacemode = g_settings.m_currentVideoSettings.m_DeinterlaceMode;
- EINTERLACEMETHOD interlacemethod = AutoInterlaceMethodInternal(g_settings.m_currentVideoSettings.m_InterlaceMethod);
+ EDEINTERLACEMODE deinterlacemode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
+ EINTERLACEMETHOD interlacemethod = AutoInterlaceMethodInternal(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod);
bool invert = false;
diff --git a/xbmc/cores/VideoRenderers/WinRenderer.cpp b/xbmc/cores/VideoRenderers/WinRenderer.cpp
index f8091fd8ac..c103c2942a 100644
--- a/xbmc/cores/VideoRenderers/WinRenderer.cpp
+++ b/xbmc/cores/VideoRenderers/WinRenderer.cpp
@@ -24,6 +24,7 @@
#include "Util.h"
#include "settings/Settings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
#include "guilib/Texture.h"
#include "windowing/WindowingFactory.h"
#include "settings/AdvancedSettings.h"
@@ -234,7 +235,7 @@ bool CWinRenderer::Configure(unsigned int width, unsigned int height, unsigned i
ChooseBestResolution(fps);
m_destWidth = g_settings.m_ResInfo[m_resolution].iWidth;
m_destHeight = g_settings.m_ResInfo[m_resolution].iHeight;
- SetViewMode(g_settings.m_currentVideoSettings.m_ViewMode);
+ SetViewMode(CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode);
ManageDisplay();
m_bConfigured = true;
@@ -582,12 +583,12 @@ void CWinRenderer::UpdatePSVideoFilter()
void CWinRenderer::UpdateVideoFilter()
{
- if (m_scalingMethodGui == g_settings.m_currentVideoSettings.m_ScalingMethod && m_bFilterInitialized)
+ if (m_scalingMethodGui == CMediaSettings::Get().GetCurrentVideoSettings().m_ScalingMethod && m_bFilterInitialized)
return;
m_bFilterInitialized = true;
- m_scalingMethodGui = g_settings.m_currentVideoSettings.m_ScalingMethod;
+ m_scalingMethodGui = CMediaSettings::Get().GetCurrentVideoSettings().m_ScalingMethod;
m_scalingMethod = m_scalingMethodGui;
if (!Supports(m_scalingMethod))
@@ -762,9 +763,9 @@ void CWinRenderer::ScaleFixedPipeline()
float srcWidth = (float)srcDesc.Width;
float srcHeight = (float)srcDesc.Height;
- bool cbcontrol = (g_settings.m_currentVideoSettings.m_Contrast != 50.0f || g_settings.m_currentVideoSettings.m_Brightness != 50.0f);
- unsigned int contrast = (unsigned int)(g_settings.m_currentVideoSettings.m_Contrast *.01f * 255.0f); // we have to divide by two here/multiply by two later
- unsigned int brightness = (unsigned int)(g_settings.m_currentVideoSettings.m_Brightness * .01f * 255.0f);
+ bool cbcontrol = (CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast != 50.0f || CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness != 50.0f);
+ unsigned int contrast = (unsigned int)(CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast *.01f * 255.0f); // we have to divide by two here/multiply by two later
+ unsigned int brightness = (unsigned int)(CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness * .01f * 255.0f);
D3DCOLOR diffuse = D3DCOLOR_ARGB(255, contrast, contrast, contrast);
D3DCOLOR specular = D3DCOLOR_ARGB(255, brightness, brightness, brightness);
@@ -861,8 +862,8 @@ void CWinRenderer::Stage1()
if (!m_bUseHQScaler)
{
m_colorShader->Render(m_sourceRect, m_destRect,
- g_settings.m_currentVideoSettings.m_Contrast,
- g_settings.m_currentVideoSettings.m_Brightness,
+ CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast,
+ CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness,
m_iFlags,
(YUVBuffer*)m_VideoBuffers[m_iYV12RenderBuffer]);
}
@@ -879,8 +880,8 @@ void CWinRenderer::Stage1()
CRect rtRect(0.0f, 0.0f, m_sourceWidth, m_sourceHeight);
m_colorShader->Render(srcRect, rtRect,
- g_settings.m_currentVideoSettings.m_Contrast,
- g_settings.m_currentVideoSettings.m_Brightness,
+ CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast,
+ CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness,
m_iFlags,
(YUVBuffer*)m_VideoBuffers[m_iYV12RenderBuffer]);
diff --git a/xbmc/cores/VideoRenderers/legacy/ComboRenderer.cpp b/xbmc/cores/VideoRenderers/legacy/ComboRenderer.cpp
index 8980bdc3d4..78b5d72e92 100644
--- a/xbmc/cores/VideoRenderers/legacy/ComboRenderer.cpp
+++ b/xbmc/cores/VideoRenderers/legacy/ComboRenderer.cpp
@@ -132,10 +132,10 @@ void CComboRenderer::ManageDisplay()
}
// source rect
- rs.left = g_settings.m_currentVideoSettings.m_CropLeft;
- rs.top = g_settings.m_currentVideoSettings.m_CropTop;
- rs.right = m_iSourceWidth - g_settings.m_currentVideoSettings.m_CropRight;
- rs.bottom = m_iSourceHeight - g_settings.m_currentVideoSettings.m_CropBottom;
+ rs.left = CMediaSettings::Get().GetCurrentVideoSettings().m_CropLeft;
+ rs.top = CMediaSettings::Get().GetCurrentVideoSettings().m_CropTop;
+ rs.right = m_iSourceWidth - CMediaSettings::Get().GetCurrentVideoSettings().m_CropRight;
+ rs.bottom = m_iSourceHeight - CMediaSettings::Get().GetCurrentVideoSettings().m_CropBottom;
CalcNormalDisplayRect(fOffsetX1, fOffsetY1, fScreenWidth, fScreenHeight, GetAspectRatio() * fPixelRatio, g_settings.m_fZoomAmount);
diff --git a/xbmc/cores/amlplayer/AMLPlayer.cpp b/xbmc/cores/amlplayer/AMLPlayer.cpp
index 09f82b1a8b..bd9c75501d 100644
--- a/xbmc/cores/amlplayer/AMLPlayer.cpp
+++ b/xbmc/cores/amlplayer/AMLPlayer.cpp
@@ -953,7 +953,7 @@ bool CAMLPlayer::GetSubtitleVisible()
void CAMLPlayer::SetSubtitleVisible(bool bVisible)
{
m_subtitle_show = (bVisible && m_subtitle_count);
- g_settings.m_currentVideoSettings.m_SubtitleOn = bVisible;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = bVisible;
if (m_subtitle_show && m_subtitle_count)
{
@@ -1437,11 +1437,11 @@ void CAMLPlayer::Process()
// check for video in media content
if (GetVideoStreamCount() > 0)
{
- SetAVDelay(g_settings.m_currentVideoSettings.m_AudioDelay);
+ SetAVDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay);
// turn on/off subs
- SetSubtitleVisible(g_settings.m_currentVideoSettings.m_SubtitleOn);
- SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
+ SetSubtitleVisible(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn);
+ SetSubTitleDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
// setup renderer for bypass. This tell renderer to get out of the way as
// hw decoder will be doing the actual video rendering in a video plane
@@ -2217,20 +2217,20 @@ void CAMLPlayer::SetVideoRect(const CRect &SrcRect, const CRect &DestRect)
// do not do anything stupid here.
// video zoom adjustment.
- float zoom = g_settings.m_currentVideoSettings.m_CustomZoomAmount;
+ float zoom = CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount;
if ((int)(zoom * 1000) != (int)(m_zoom * 1000))
{
m_zoom = zoom;
}
// video contrast adjustment.
- int contrast = g_settings.m_currentVideoSettings.m_Contrast;
+ int contrast = CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast;
if (contrast != m_contrast)
{
SetVideoContrast(contrast);
m_contrast = contrast;
}
// video brightness adjustment.
- int brightness = g_settings.m_currentVideoSettings.m_Brightness;
+ int brightness = CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness;
if (brightness != m_brightness)
{
SetVideoBrightness(brightness);
@@ -2238,10 +2238,10 @@ void CAMLPlayer::SetVideoRect(const CRect &SrcRect, const CRect &DestRect)
}
// check if destination rect or video view mode has changed
- if ((m_dst_rect != DestRect) || (m_view_mode != g_settings.m_currentVideoSettings.m_ViewMode))
+ if ((m_dst_rect != DestRect) || (m_view_mode != CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode))
{
m_dst_rect = DestRect;
- m_view_mode = g_settings.m_currentVideoSettings.m_ViewMode;
+ m_view_mode = CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode;
}
else
{
diff --git a/xbmc/cores/dvdplayer/DVDAudio.cpp b/xbmc/cores/dvdplayer/DVDAudio.cpp
index d46981d0af..1b31ad161f 100644
--- a/xbmc/cores/dvdplayer/DVDAudio.cpp
+++ b/xbmc/cores/dvdplayer/DVDAudio.cpp
@@ -27,6 +27,7 @@
#include "cores/AudioEngine/AEFactory.h"
#include "cores/AudioEngine/Interfaces/AEStream.h"
#include "settings/Settings.h"
+#include "settings/MediaSettings.h"
using namespace std;
@@ -152,7 +153,7 @@ bool CDVDAudio::Create(const DVDAudioFrame &audioframe, CodecID codec, bool need
m_SecondsPerByte = 0.0;
m_iBufferSize = 0;
- SetDynamicRangeCompression((long)(g_settings.m_currentVideoSettings.m_VolumeAmplification * 100));
+ SetDynamicRangeCompression((long)(CMediaSettings::Get().GetCurrentVideoSettings().m_VolumeAmplification * 100));
if (m_pAudioCallback)
RegisterAudioCallback(m_pAudioCallback);
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
index be5601c9f3..acb468ef59 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
@@ -22,6 +22,7 @@
#include "DVDCodecs/DVDCodecs.h"
#include "DVDStreamInfo.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
#include "settings/Settings.h"
#include "utils/log.h"
@@ -300,7 +301,7 @@ bool CDVDAudioCodecPassthroughFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptio
return false;
// TODO - this is only valid for video files, and should be moved somewhere else
- if( hints.channels == 2 && g_settings.m_currentVideoSettings.m_OutputToAllSpeakers )
+ if( hints.channels == 2 && CMediaSettings::Get().GetCurrentVideoSettings().m_OutputToAllSpeakers )
{
CLog::Log(LOGINFO, "CDVDAudioCodecPassthroughFFmpeg::Open - disabled passthrough due to video OTAS");
return false;
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h
index 54e3bfac66..c62c34709b 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h
@@ -21,10 +21,8 @@
*/
#include "DVDOverlay.h"
-#ifdef _LINUX
-#include "utils/CharsetConverter.h"
-#endif
#include <string.h>
+#include <stdlib.h>
class CDVDOverlayText : public CDVDOverlay
{
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
index 3c916c4275..466a03a13c 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
@@ -39,6 +39,7 @@
#include "boost/shared_ptr.hpp"
#include "utils/AutoPtrHandle.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSettings.h"
#include "cores/VideoRenderers/RenderManager.h"
#include "win32/WIN32Util.h"
@@ -1175,8 +1176,8 @@ bool CProcessor::Open(UINT width, UINT height, unsigned int flags, unsigned int
// And for those GPUs, the correct values will be calculated with the first Render() and the correct processor
// will replace the one allocated here, before the user sees anything.
// It's a bit inefficient, that's all.
- m_deinterlace_mode = g_settings.m_currentVideoSettings.m_DeinterlaceMode;
- m_interlace_method = g_renderManager.AutoInterlaceMethod(g_settings.m_currentVideoSettings.m_InterlaceMethod);;
+ m_deinterlace_mode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
+ m_interlace_method = g_renderManager.AutoInterlaceMethod(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod);;
EvaluateQuirkNoDeintProcForProg();
@@ -1460,10 +1461,10 @@ bool CProcessor::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFEREN
// With auto deinterlacing, the Ion Gen. 1 drops some frames with deinterlacing processor + progressive flags for progressive material.
// For that GPU (or when specified by an advanced setting), use the progressive processor.
// This is at the expense of the switch speed when video interlacing flags change and a deinterlacing processor is actually required.
- EDEINTERLACEMODE mode = g_settings.m_currentVideoSettings.m_DeinterlaceMode;
+ EDEINTERLACEMODE mode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
if (g_advancedSettings.m_DXVANoDeintProcForProgressive || m_quirk_nodeintprocforprog)
mode = (flags & RENDER_FLAG_FIELD0 || flags & RENDER_FLAG_FIELD1) ? VS_DEINTERLACEMODE_FORCE : VS_DEINTERLACEMODE_OFF;
- EINTERLACEMETHOD method = g_renderManager.AutoInterlaceMethod(g_settings.m_currentVideoSettings.m_InterlaceMethod);
+ EINTERLACEMETHOD method = g_renderManager.AutoInterlaceMethod(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod);
if(m_interlace_method != method
|| m_deinterlace_mode != mode
|| !m_process)
@@ -1577,9 +1578,9 @@ bool CProcessor::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFEREN
blt.DestFormat.NominalRange = DXVA2_NominalRange_0_255;
blt.Alpha = DXVA2_Fixed32OpaqueAlpha();
- blt.ProcAmpValues.Brightness = ConvertRange( m_brightness, g_settings.m_currentVideoSettings.m_Brightness
+ blt.ProcAmpValues.Brightness = ConvertRange( m_brightness, CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness
, 0, 100, 50);
- blt.ProcAmpValues.Contrast = ConvertRange( m_contrast, g_settings.m_currentVideoSettings.m_Contrast
+ blt.ProcAmpValues.Contrast = ConvertRange( m_contrast, CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast
, 0, 100, 50);
blt.ProcAmpValues.Hue = m_hue.DefaultValue;
blt.ProcAmpValues.Saturation = m_saturation.DefaultValue;
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
index f8d6e19301..8acacd636b 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
@@ -30,6 +30,7 @@
#include "settings/Settings.h"
#include "settings/GUISettings.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSettings.h"
#include "Application.h"
#include "utils/MathUtils.h"
#include "DVDCodecs/DVDCodecUtils.h"
@@ -514,29 +515,29 @@ void CVDPAU::CheckFeatures()
SetHWUpscaling();
}
- if (tmpBrightness != g_settings.m_currentVideoSettings.m_Brightness ||
- tmpContrast != g_settings.m_currentVideoSettings.m_Contrast)
+ if (tmpBrightness != CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness ||
+ tmpContrast != CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast)
{
SetColor();
- tmpBrightness = g_settings.m_currentVideoSettings.m_Brightness;
- tmpContrast = g_settings.m_currentVideoSettings.m_Contrast;
+ tmpBrightness = CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness;
+ tmpContrast = CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast;
}
- if (tmpNoiseReduction != g_settings.m_currentVideoSettings.m_NoiseReduction)
+ if (tmpNoiseReduction != CMediaSettings::Get().GetCurrentVideoSettings().m_NoiseReduction)
{
- tmpNoiseReduction = g_settings.m_currentVideoSettings.m_NoiseReduction;
+ tmpNoiseReduction = CMediaSettings::Get().GetCurrentVideoSettings().m_NoiseReduction;
SetNoiseReduction();
}
- if (tmpSharpness != g_settings.m_currentVideoSettings.m_Sharpness)
+ if (tmpSharpness != CMediaSettings::Get().GetCurrentVideoSettings().m_Sharpness)
{
- tmpSharpness = g_settings.m_currentVideoSettings.m_Sharpness;
+ tmpSharpness = CMediaSettings::Get().GetCurrentVideoSettings().m_Sharpness;
SetSharpness();
}
- if ( tmpDeintMode != g_settings.m_currentVideoSettings.m_DeinterlaceMode ||
- tmpDeintGUI != g_settings.m_currentVideoSettings.m_InterlaceMethod ||
+ if ( tmpDeintMode != CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode ||
+ tmpDeintGUI != CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod ||
(tmpDeintGUI == VS_INTERLACEMETHOD_AUTO && tmpDeint != AutoInterlaceMethod()))
{
- tmpDeintMode = g_settings.m_currentVideoSettings.m_DeinterlaceMode;
- tmpDeintGUI = g_settings.m_currentVideoSettings.m_InterlaceMethod;
+ tmpDeintMode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
+ tmpDeintGUI = CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod;
if (tmpDeintGUI == VS_INTERLACEMETHOD_AUTO)
tmpDeint = AutoInterlaceMethod();
else
@@ -580,10 +581,10 @@ void CVDPAU::SetColor()
{
VdpStatus vdp_st;
- if (tmpBrightness != g_settings.m_currentVideoSettings.m_Brightness)
- m_Procamp.brightness = (float)((g_settings.m_currentVideoSettings.m_Brightness)-50) / 100;
- if (tmpContrast != g_settings.m_currentVideoSettings.m_Contrast)
- m_Procamp.contrast = (float)((g_settings.m_currentVideoSettings.m_Contrast)+50) / 100;
+ if (tmpBrightness != CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness)
+ m_Procamp.brightness = (float)((CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness)-50) / 100;
+ if (tmpContrast != CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast)
+ m_Procamp.contrast = (float)((CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast)+50) / 100;
if(vid_height >= 600 || vid_width > 1024)
vdp_st = vdp_generate_csc_matrix(&m_Procamp, VDP_COLOR_STANDARD_ITUR_BT_709, &m_CSCMatrix);
@@ -613,7 +614,7 @@ void CVDPAU::SetNoiseReduction()
VdpVideoMixerAttribute attributes[] = { VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL };
VdpStatus vdp_st;
- if (!g_settings.m_currentVideoSettings.m_NoiseReduction)
+ if (!CMediaSettings::Get().GetCurrentVideoSettings().m_NoiseReduction)
{
VdpBool enabled[]= {0};
vdp_st = vdp_video_mixer_set_feature_enables(videoMixer, ARSIZE(feature), feature, enabled);
@@ -623,8 +624,8 @@ void CVDPAU::SetNoiseReduction()
VdpBool enabled[]={1};
vdp_st = vdp_video_mixer_set_feature_enables(videoMixer, ARSIZE(feature), feature, enabled);
CheckStatus(vdp_st, __LINE__);
- void* nr[] = { &g_settings.m_currentVideoSettings.m_NoiseReduction };
- CLog::Log(LOGNOTICE,"Setting Noise Reduction to %f",g_settings.m_currentVideoSettings.m_NoiseReduction);
+ void* nr[] = { &CMediaSettings::Get().GetCurrentVideoSettings().m_NoiseReduction };
+ CLog::Log(LOGNOTICE,"Setting Noise Reduction to %f",CMediaSettings::Get().GetCurrentVideoSettings().m_NoiseReduction);
vdp_st = vdp_video_mixer_set_attribute_values(videoMixer, ARSIZE(attributes), attributes, nr);
CheckStatus(vdp_st, __LINE__);
}
@@ -638,7 +639,7 @@ void CVDPAU::SetSharpness()
VdpVideoMixerAttribute attributes[] = { VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL };
VdpStatus vdp_st;
- if (!g_settings.m_currentVideoSettings.m_Sharpness)
+ if (!CMediaSettings::Get().GetCurrentVideoSettings().m_Sharpness)
{
VdpBool enabled[]={0};
vdp_st = vdp_video_mixer_set_feature_enables(videoMixer, ARSIZE(feature), feature, enabled);
@@ -648,8 +649,8 @@ void CVDPAU::SetSharpness()
VdpBool enabled[]={1};
vdp_st = vdp_video_mixer_set_feature_enables(videoMixer, ARSIZE(feature), feature, enabled);
CheckStatus(vdp_st, __LINE__);
- void* sh[] = { &g_settings.m_currentVideoSettings.m_Sharpness };
- CLog::Log(LOGNOTICE,"Setting Sharpness to %f",g_settings.m_currentVideoSettings.m_Sharpness);
+ void* sh[] = { &CMediaSettings::Get().GetCurrentVideoSettings().m_Sharpness };
+ CLog::Log(LOGNOTICE,"Setting Sharpness to %f",CMediaSettings::Get().GetCurrentVideoSettings().m_Sharpness);
vdp_st = vdp_video_mixer_set_attribute_values(videoMixer, ARSIZE(attributes), attributes, sh);
CheckStatus(vdp_st, __LINE__);
}
@@ -671,8 +672,8 @@ void CVDPAU::SetHWUpscaling()
void CVDPAU::SetDeinterlacing()
{
VdpStatus vdp_st;
- EDEINTERLACEMODE mode = g_settings.m_currentVideoSettings.m_DeinterlaceMode;
- EINTERLACEMETHOD method = g_settings.m_currentVideoSettings.m_InterlaceMethod;
+ EDEINTERLACEMODE mode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
+ EINTERLACEMETHOD method = CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod;
if (method == VS_INTERLACEMETHOD_AUTO)
method = AutoInterlaceMethod();
@@ -1381,8 +1382,8 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame)
outRectVid.y1 = OutHeight;
}
- EDEINTERLACEMODE mode = g_settings.m_currentVideoSettings.m_DeinterlaceMode;
- EINTERLACEMETHOD method = g_settings.m_currentVideoSettings.m_InterlaceMethod;
+ EDEINTERLACEMODE mode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
+ EINTERLACEMETHOD method = CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod;
if (method == VS_INTERLACEMETHOD_AUTO)
method = AutoInterlaceMethod();
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStream.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStream.h
index f4769494e9..3ebede7c46 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStream.h
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStream.h
@@ -120,6 +120,17 @@ public:
virtual bool IsInMenu() = 0;
virtual void SkipStill() = 0;
virtual double GetTimeStampCorrection() = 0;
+ virtual bool GetState(std::string &xmlstate) = 0;
+ virtual bool SetState(const std::string &xmlstate) = 0;
+
+ };
+
+ class ISeekable
+ {
+ public:
+ virtual ~ISeekable() {};
+ virtual bool CanSeek() = 0;
+ virtual bool CanPause() = 0;
};
enum ENextStream
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
index 4f3e8a027b..6837605e0c 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
@@ -82,6 +82,9 @@ public:
virtual bool OnMouseClick(const CPoint &point) { return false; }
virtual double GetTimeStampCorrection() { return 0.0; }
virtual void SkipStill();
+ virtual bool GetState(std::string &xmlstate) { return false; }
+ virtual bool SetState(const std::string &xmlstate) { return false; }
+
void UserInput(bd_vk_key_e vk);
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp
index aa41442a90..a96c03df56 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp
@@ -43,6 +43,21 @@ bool CDVDInputStreamFFmpeg::Open(const char* strFile, const std::string& content
if (!CDVDInputStream::Open(strFile, content))
return false;
+ m_can_pause = true;
+ m_can_seek = true;
+
+ if(strnicmp(strFile, "udp://", 6) == 0
+ || strnicmp(strFile, "rtp://", 6) == 0)
+ {
+ m_can_pause = false;
+ m_can_seek = false;
+ }
+
+ if(strnicmp(strFile, "tcp://", 6) == 0)
+ {
+ m_can_pause = true;
+ m_can_seek = false;
+ }
return true;
}
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.h
index a462a5f0a6..acbbc07f4e 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.h
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.h
@@ -22,7 +22,9 @@
#include "DVDInputStream.h"
-class CDVDInputStreamFFmpeg : public CDVDInputStream
+class CDVDInputStreamFFmpeg
+ : public CDVDInputStream
+ , public CDVDInputStream::ISeekable
{
public:
CDVDInputStreamFFmpeg();
@@ -35,5 +37,10 @@ public:
virtual bool IsEOF();
virtual int64_t GetLength();
+ bool CanSeek() { return m_can_seek; }
+ bool CanPause() { return m_can_pause; }
+
protected:
+ bool m_can_pause;
+ bool m_can_seek;
};
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
index 78bfa9de6f..2e760cbc09 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
@@ -1223,7 +1223,7 @@ bool CDVDInputStreamNavigator::IsSubtitleStreamEnabled()
return false;
}
-bool CDVDInputStreamNavigator::GetNavigatorState(std::string &xmlstate)
+bool CDVDInputStreamNavigator::GetState(std::string &xmlstate)
{
if( !m_dvdnav )
return false;
@@ -1244,7 +1244,7 @@ bool CDVDInputStreamNavigator::GetNavigatorState(std::string &xmlstate)
return true;
}
-bool CDVDInputStreamNavigator::SetNavigatorState(std::string &xmlstate)
+bool CDVDInputStreamNavigator::SetState(const std::string &xmlstate)
{
if( !m_dvdnav )
return false;
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.h
index 2502ea4560..8da8a9bc6c 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.h
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.h
@@ -117,8 +117,8 @@ public:
bool SetActiveAudioStream(int iId);
bool GetAudioStreamInfo(const int iId, DVDNavStreamInfo &info);
- bool GetNavigatorState(std::string &xmlstate);
- bool SetNavigatorState(std::string &xmlstate);
+ bool GetState(std::string &xmlstate);
+ bool SetState(const std::string &xmlstate);
int GetChapter() { return m_iPart; } // the current part in the current title
int GetChapterCount() { return m_iPartCount; } // the number of parts in the current title
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamPVRManager.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamPVRManager.h
index 0e2822e735..3eea0c72e4 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamPVRManager.h
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamPVRManager.h
@@ -39,6 +39,7 @@ class CDVDInputStreamPVRManager
: public CDVDInputStream
, public CDVDInputStream::IChannel
, public CDVDInputStream::IDisplayTime
+ , public CDVDInputStream::ISeekable
{
public:
CDVDInputStreamPVRManager(IDVDPlayer* pPlayer);
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
index 1ed895353b..e0fb10c625 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -64,6 +64,7 @@
#include "settings/AdvancedSettings.h"
#include "FileItem.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
#include "GUIUserMessages.h"
#include "settings/Settings.h"
#include "utils/log.h"
@@ -138,8 +139,8 @@ std::vector<SelectionStream> CSelectionStreams::Get(StreamType type)
static bool PredicateAudioPriority(const SelectionStream& lh, const SelectionStream& rh)
{
- PREDICATE_RETURN(lh.type_index == g_settings.m_currentVideoSettings.m_AudioStream
- , rh.type_index == g_settings.m_currentVideoSettings.m_AudioStream);
+ PREDICATE_RETURN(lh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream
+ , rh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream);
if(!g_guiSettings.GetString("locale.audiolanguage").Equals("original"))
{
@@ -161,14 +162,14 @@ static bool PredicateAudioPriority(const SelectionStream& lh, const SelectionStr
static bool PredicateSubtitlePriority(const SelectionStream& lh, const SelectionStream& rh)
{
- if(!g_settings.m_currentVideoSettings.m_SubtitleOn)
+ if(!CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn)
{
PREDICATE_RETURN(lh.flags & CDemuxStream::FLAG_FORCED
, rh.flags & CDemuxStream::FLAG_FORCED);
}
- PREDICATE_RETURN(lh.type_index == g_settings.m_currentVideoSettings.m_SubtitleStream
- , rh.type_index == g_settings.m_currentVideoSettings.m_SubtitleStream);
+ PREDICATE_RETURN(lh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream
+ , rh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream);
CStdString subtitle_language = g_langInfo.GetSubtitleLanguage();
if(!g_guiSettings.GetString("locale.subtitlelanguage").Equals("original"))
@@ -633,11 +634,11 @@ bool CDVDPlayer::OpenInputStream()
}
} // end loop over all subtitle files
- g_settings.m_currentVideoSettings.m_SubtitleCached = true;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleCached = true;
}
- SetAVDelay(g_settings.m_currentVideoSettings.m_AudioDelay);
- SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
+ SetAVDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay);
+ SetSubTitleDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
m_clock.Reset();
m_dvd.Clear();
m_errorCount = 0;
@@ -733,7 +734,7 @@ void CDVDPlayer::OpenDefaultStreams(bool reset)
CloseAudioStream(true);
// enable subtitles
- m_dvdPlayerVideo.EnableSubtitle(g_settings.m_currentVideoSettings.m_SubtitleOn);
+ m_dvdPlayerVideo.EnableSubtitle(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn);
// open subtitle stream
streams = m_SelectionStreams.Get(STREAM_SUBTITLE, PredicateSubtitlePriority);
@@ -933,18 +934,17 @@ void CDVDPlayer::Process()
return;
}
- if(m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD))
+ if (CDVDInputStream::IMenus* ptr = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream))
{
- CLog::Log(LOGNOTICE, "DVDPlayer: playing a dvd with menu's");
+ CLog::Log(LOGNOTICE, "DVDPlayer: playing a file with menu's");
m_PlayerOptions.starttime = 0;
-
if(m_PlayerOptions.state.size() > 0)
- ((CDVDInputStreamNavigator*)m_pInputStream)->SetNavigatorState(m_PlayerOptions.state);
- else
- ((CDVDInputStreamNavigator*)m_pInputStream)->EnableSubtitleStream(g_settings.m_currentVideoSettings.m_SubtitleOn);
+ ptr->SetState(m_PlayerOptions.state);
+ else if(CDVDInputStreamNavigator* nav = dynamic_cast<CDVDInputStreamNavigator*>(m_pInputStream))
+ nav->EnableSubtitleStream(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn);
- g_settings.m_currentVideoSettings.m_SubtitleCached = true;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleCached = true;
}
if(!OpenDemuxStream())
@@ -2175,13 +2175,14 @@ void CDVDPlayer::HandleMessages()
CDVDMsgPlayerSetState* pMsgPlayerSetState = (CDVDMsgPlayerSetState*)pMsg;
- if (m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD))
+ if (CDVDInputStream::IMenus* ptr = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream))
{
- std::string s = pMsgPlayerSetState->GetState();
- ((CDVDInputStreamNavigator*)m_pInputStream)->SetNavigatorState(s);
- m_dvd.state = DVDSTATE_NORMAL;
- m_dvd.iDVDStillStartTime = 0;
- m_dvd.iDVDStillTime = 0;
+ if(ptr->SetState(pMsgPlayerSetState->GetState()))
+ {
+ m_dvd.state = DVDSTATE_NORMAL;
+ m_dvd.iDVDStillStartTime = 0;
+ m_dvd.iDVDStillTime = 0;
+ }
}
g_infoManager.SetDisplayAfterSeek();
@@ -2590,7 +2591,7 @@ void CDVDPlayer::GetAudioInfo(CStdString& strAudioInfo)
{ CSingleLock lock(m_StateSection);
strAudioInfo.Format("D(%s)", m_StateInput.demux_audio.c_str());
}
- strAudioInfo.AppendFormat(" P(%s)", m_dvdPlayerAudio.GetPlayerInfo().c_str());
+ strAudioInfo.AppendFormat("\nP(%s)", m_dvdPlayerAudio.GetPlayerInfo().c_str());
}
void CDVDPlayer::GetVideoInfo(CStdString& strVideoInfo)
@@ -2725,7 +2726,7 @@ bool CDVDPlayer::GetSubtitleVisible()
{
CDVDInputStreamNavigator* pStream = (CDVDInputStreamNavigator*)m_pInputStream;
if(pStream->IsInMenu())
- return g_settings.m_currentVideoSettings.m_SubtitleOn;
+ return CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn;
else
return pStream->IsSubtitleStreamEnabled();
}
@@ -2735,7 +2736,7 @@ bool CDVDPlayer::GetSubtitleVisible()
void CDVDPlayer::SetSubtitleVisible(bool bVisible)
{
- g_settings.m_currentVideoSettings.m_SubtitleOn = bVisible;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = bVisible;
m_messenger.Put(new CDVDMsgBool(CDVDMsg::PLAYER_SET_SUBTITLESTREAM_VISIBLE, bVisible));
}
@@ -3521,7 +3522,7 @@ bool CDVDPlayer::OnAction(const CAction &action)
pMenus->OnMenu();
// send a message to everyone that we've gone to the menu
CGUIMessage msg(GUI_MSG_VIDEO_MENU_STARTED, 0, 0);
- g_windowManager.SendMessage(msg);
+ g_windowManager.SendThreadMessage(msg);
return true;
}
break;
@@ -3924,6 +3925,9 @@ void CDVDPlayer::UpdatePlayState(double timeout)
state.time_src = ETIMESOURCE_CLOCK;
}
+ state.canpause = true;
+ state.canseek = true;
+
if(m_pInputStream)
{
// override from input stream if needed
@@ -3942,8 +3946,11 @@ void CDVDPlayer::UpdatePlayState(double timeout)
state.time_src = ETIMESOURCE_INPUT;
}
- if (dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream))
+ if (CDVDInputStream::IMenus* ptr = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream))
{
+ if(!ptr->GetState(state.player_state))
+ state.player_state = "";
+
if(m_dvd.state == DVDSTATE_STILL)
{
state.time = XbmcThreads::SystemClockMillis() - m_dvd.iDVDStillStartTime;
@@ -3952,16 +3959,10 @@ void CDVDPlayer::UpdatePlayState(double timeout)
}
}
- if (m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER))
- {
- CDVDInputStreamPVRManager* pvrinputstream = static_cast<CDVDInputStreamPVRManager*>(m_pInputStream);
- state.canpause = pvrinputstream->CanPause();
- state.canseek = pvrinputstream->CanSeek();
- }
- else
+ if (CDVDInputStream::ISeekable* ptr = dynamic_cast<CDVDInputStream::ISeekable*>(m_pInputStream))
{
- state.canseek = state.time_total > 0 ? true : false;
- state.canpause = true;
+ state.canpause = ptr->CanPause();
+ state.canseek = ptr->CanSeek();
}
}
@@ -3971,12 +3972,8 @@ void CDVDPlayer::UpdatePlayState(double timeout)
state.time_total = m_Edl.RemoveCutTime(llrint(state.time_total));
}
- state.player_state = "";
- if (m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD))
- {
- if(!((CDVDInputStreamNavigator*)m_pInputStream)->GetNavigatorState(state.player_state))
- state.player_state = "";
- }
+ if(state.time_total <= 0)
+ state.canseek = false;
if (state.time_src == ETIMESOURCE_CLOCK)
state.time_offset = m_offset_pts;
diff --git a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp
index 03ba5eaeaa..e075cd67ec 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp
@@ -284,7 +284,7 @@ int CDVDPlayerAudio::DecodeFrame(DVDAudioFrame &audioframe, bool bDropPacket)
CLog::Log(LOGERROR, "CDVDPlayerAudio:DecodeFrame - Codec tried to consume more data than available. Potential memory corruption");
m_decode.Release();
m_pAudioCodec->Reset();
- assert(0);
+ return DECODE_FLAG_ERROR;
}
m_decode.data += len;
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index b809b8202e..9ee51c01ae 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -23,6 +23,7 @@
#include "windowing/WindowingFactory.h"
#include "settings/AdvancedSettings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
#include "settings/Settings.h"
#include "video/VideoReferenceClock.h"
#include "utils/MathUtils.h"
@@ -535,8 +536,8 @@ void CDVDPlayerVideo::Process()
m_pVideoCodec->SetDropState(bRequestDrop);
// ask codec to do deinterlacing if possible
- EDEINTERLACEMODE mDeintMode = g_settings.m_currentVideoSettings.m_DeinterlaceMode;
- EINTERLACEMETHOD mInt = g_renderManager.AutoInterlaceMethod(g_settings.m_currentVideoSettings.m_InterlaceMethod);
+ EDEINTERLACEMODE mDeintMode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
+ EINTERLACEMETHOD mInt = g_renderManager.AutoInterlaceMethod(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod);
unsigned int mFilters = 0;
@@ -658,7 +659,7 @@ void CDVDPlayerVideo::Process()
}
}
- if (g_settings.m_currentVideoSettings.m_PostProcess)
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_PostProcess)
{
if (!sPostProcessType.empty())
sPostProcessType += ",";
@@ -1364,7 +1365,7 @@ void CDVDPlayerVideo::AutoCrop(DVDVideoPicture *pPicture)
{
RECT crop;
- if (g_settings.m_currentVideoSettings.m_Crop)
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_Crop)
AutoCrop(pPicture, crop);
else
{ // reset to defaults
@@ -1386,16 +1387,16 @@ void CDVDPlayerVideo::AutoCrop(DVDVideoPicture *pPicture)
//compare with hysteresis
# define HYST(n, o) ((n) > (o) || (n) + 1 < (o))
- if(HYST(g_settings.m_currentVideoSettings.m_CropLeft , crop.left)
- || HYST(g_settings.m_currentVideoSettings.m_CropRight , crop.right)
- || HYST(g_settings.m_currentVideoSettings.m_CropTop , crop.top)
- || HYST(g_settings.m_currentVideoSettings.m_CropBottom, crop.bottom))
+ if(HYST(CMediaSettings::Get().GetCurrentVideoSettings().m_CropLeft , crop.left)
+ || HYST(CMediaSettings::Get().GetCurrentVideoSettings().m_CropRight , crop.right)
+ || HYST(CMediaSettings::Get().GetCurrentVideoSettings().m_CropTop , crop.top)
+ || HYST(CMediaSettings::Get().GetCurrentVideoSettings().m_CropBottom, crop.bottom))
{
- g_settings.m_currentVideoSettings.m_CropLeft = crop.left;
- g_settings.m_currentVideoSettings.m_CropRight = crop.right;
- g_settings.m_currentVideoSettings.m_CropTop = crop.top;
- g_settings.m_currentVideoSettings.m_CropBottom = crop.bottom;
- g_renderManager.SetViewMode(g_settings.m_currentVideoSettings.m_ViewMode);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CropLeft = crop.left;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CropRight = crop.right;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CropTop = crop.top;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CropBottom = crop.bottom;
+ g_renderManager.SetViewMode(CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode);
}
# undef HYST
}
@@ -1403,10 +1404,10 @@ void CDVDPlayerVideo::AutoCrop(DVDVideoPicture *pPicture)
void CDVDPlayerVideo::AutoCrop(DVDVideoPicture *pPicture, RECT &crop)
{
- crop.left = g_settings.m_currentVideoSettings.m_CropLeft;
- crop.right = g_settings.m_currentVideoSettings.m_CropRight;
- crop.top = g_settings.m_currentVideoSettings.m_CropTop;
- crop.bottom = g_settings.m_currentVideoSettings.m_CropBottom;
+ crop.left = CMediaSettings::Get().GetCurrentVideoSettings().m_CropLeft;
+ crop.right = CMediaSettings::Get().GetCurrentVideoSettings().m_CropRight;
+ crop.top = CMediaSettings::Get().GetCurrentVideoSettings().m_CropTop;
+ crop.bottom = CMediaSettings::Get().GetCurrentVideoSettings().m_CropBottom;
int black = 16; // what is black in the image
int level = 8; // how high above this should we detect
@@ -1561,7 +1562,7 @@ void CDVDPlayerVideo::ResetFrameRateCalc()
m_iFrameRateLength = 1;
m_iFrameRateErr = 0;
- m_bAllowDrop = (!m_bCalcFrameRate && g_settings.m_currentVideoSettings.m_ScalingMethod != VS_SCALINGMETHOD_AUTO) ||
+ m_bAllowDrop = (!m_bCalcFrameRate && CMediaSettings::Get().GetCurrentVideoSettings().m_ScalingMethod != VS_SCALINGMETHOD_AUTO) ||
g_advancedSettings.m_videoFpsDetect == 0;
}
@@ -1575,7 +1576,7 @@ void CDVDPlayerVideo::CalcFrameRate()
//only calculate the framerate if sync playback to display is on, adjust refreshrate is on,
//or scaling method is set to auto
- if (!m_bCalcFrameRate && g_settings.m_currentVideoSettings.m_ScalingMethod != VS_SCALINGMETHOD_AUTO)
+ if (!m_bCalcFrameRate && CMediaSettings::Get().GetCurrentVideoSettings().m_ScalingMethod != VS_SCALINGMETHOD_AUTO)
{
ResetFrameRateCalc();
return;
diff --git a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleTagMicroDVD.cpp b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleTagMicroDVD.cpp
index b27d2b1d1d..9c1cb25bd6 100644
--- a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleTagMicroDVD.cpp
+++ b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleTagMicroDVD.cpp
@@ -20,6 +20,7 @@
#include "DVDSubtitleTagMicroDVD.h"
#include "DVDCodecs/Overlay/DVDOverlayText.h"
+#include "utils/StdString.h"
void CDVDSubtitleTagMicroDVD::ConvertLine(CDVDOverlayText* pOverlay, const char* line, int len)
{
diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp
index 9c2705d58a..175938a736 100644
--- a/xbmc/cores/omxplayer/OMXPlayer.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -52,6 +52,7 @@
#include "utils/LangCodeExpander.h"
#include "guilib/LocalizeStrings.h"
+#include "guilib/Key.h"
#include "storage/MediaManager.h"
#include "GUIUserMessages.h"
@@ -138,8 +139,8 @@ std::vector<OMXSelectionStream> COMXSelectionStreams::Get(StreamType type)
static bool PredicateAudioPriority(const OMXSelectionStream& lh, const OMXSelectionStream& rh)
{
- PREDICATE_RETURN(lh.type_index == g_settings.m_currentVideoSettings.m_AudioStream
- , rh.type_index == g_settings.m_currentVideoSettings.m_AudioStream);
+ PREDICATE_RETURN(lh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream
+ , rh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream);
if(!g_guiSettings.GetString("locale.audiolanguage").Equals("original"))
{
@@ -161,14 +162,14 @@ static bool PredicateAudioPriority(const OMXSelectionStream& lh, const OMXSelect
static bool PredicateSubtitlePriority(const OMXSelectionStream& lh, const OMXSelectionStream& rh)
{
- if(!g_settings.m_currentVideoSettings.m_SubtitleOn)
+ if(!CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn)
{
PREDICATE_RETURN(lh.flags & CDemuxStream::FLAG_FORCED
, rh.flags & CDemuxStream::FLAG_FORCED);
}
- PREDICATE_RETURN(lh.type_index == g_settings.m_currentVideoSettings.m_SubtitleStream
- , rh.type_index == g_settings.m_currentVideoSettings.m_SubtitleStream);
+ PREDICATE_RETURN(lh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream
+ , rh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream);
CStdString subtitle_language = g_langInfo.GetSubtitleLanguage();
if(!g_guiSettings.GetString("locale.subtitlelanguage").Equals("original"))
@@ -638,11 +639,11 @@ retry:
}
} // end loop over all subtitle files
- g_settings.m_currentVideoSettings.m_SubtitleCached = true;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleCached = true;
}
- SetAVDelay(g_settings.m_currentVideoSettings.m_AudioDelay);
- SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
+ SetAVDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay);
+ SetSubTitleDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
m_av_clock.Reset();
//m_av_clock.OMXReset();
m_dvd.Clear();
@@ -737,7 +738,7 @@ void COMXPlayer::OpenDefaultStreams(bool reset)
CloseAudioStream(true);
// enable subtitles
- m_player_video.EnableSubtitle(g_settings.m_currentVideoSettings.m_SubtitleOn);
+ m_player_video.EnableSubtitle(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn);
// open subtitle stream
streams = m_SelectionStreams.Get(STREAM_SUBTITLE, PredicateSubtitlePriority);
@@ -953,9 +954,9 @@ void COMXPlayer::Process()
if(m_PlayerOptions.state.size() > 0)
((CDVDInputStreamNavigator*)m_pInputStream)->SetNavigatorState(m_PlayerOptions.state);
else
- ((CDVDInputStreamNavigator*)m_pInputStream)->EnableSubtitleStream(g_settings.m_currentVideoSettings.m_SubtitleOn);
+ ((CDVDInputStreamNavigator*)m_pInputStream)->EnableSubtitleStream(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn);
- g_settings.m_currentVideoSettings.m_SubtitleCached = true;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleCached = true;
}
if(!OpenDemuxStream())
@@ -2726,7 +2727,7 @@ bool COMXPlayer::GetSubtitleVisible()
{
CDVDInputStreamNavigator* pStream = (CDVDInputStreamNavigator*)m_pInputStream;
if(pStream->IsInMenu())
- return g_settings.m_currentVideoSettings.m_SubtitleOn;
+ return CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn;
else
return pStream->IsSubtitleStreamEnabled();
}
@@ -2736,7 +2737,7 @@ bool COMXPlayer::GetSubtitleVisible()
void COMXPlayer::SetSubtitleVisible(bool bVisible)
{
- g_settings.m_currentVideoSettings.m_SubtitleOn = bVisible;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = bVisible;
m_messenger.Put(new CDVDMsgBool(CDVDMsg::PLAYER_SET_SUBTITLESTREAM_VISIBLE, bVisible));
}
diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
index 3e27f4f3c7..96a44280df 100644
--- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
@@ -111,7 +111,7 @@ bool OMXPlayerVideo::OpenStream(CDVDStreamInfo &hints)
*/
m_hints = hints;
- m_Deinterlace = ( g_settings.m_currentVideoSettings.m_DeinterlaceMode == VS_DEINTERLACEMODE_OFF ) ? false : true;
+ m_Deinterlace = ( CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode == VS_DEINTERLACEMODE_OFF ) ? false : true;
m_hdmi_clock_sync = (g_guiSettings.GetInt("videoplayer.adjustrefreshrate") != ADJUST_REFRESHRATE_OFF);
m_started = false;
m_flush = false;
@@ -713,10 +713,10 @@ int OMXPlayerVideo::GetFreeSpace()
void OMXPlayerVideo::SetVideoRect(const CRect &SrcRect, const CRect &DestRect)
{
// check if destination rect or video view mode has changed
- if ((m_dst_rect != DestRect) || (m_view_mode != g_settings.m_currentVideoSettings.m_ViewMode))
+ if ((m_dst_rect != DestRect) || (m_view_mode != CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode))
{
m_dst_rect = DestRect;
- m_view_mode = g_settings.m_currentVideoSettings.m_ViewMode;
+ m_view_mode = CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode;
}
else
{
diff --git a/xbmc/cores/playercorefactory/PlayerCoreFactory.cpp b/xbmc/cores/playercorefactory/PlayerCoreFactory.cpp
index 949b103f1f..de800edcdb 100644
--- a/xbmc/cores/playercorefactory/PlayerCoreFactory.cpp
+++ b/xbmc/cores/playercorefactory/PlayerCoreFactory.cpp
@@ -30,12 +30,15 @@
#include "URL.h"
#include "FileItem.h"
#include "settings/AdvancedSettings.h"
+#include "settings/Settings.h"
#include "utils/AutoPtrHandle.h"
#include "cores/ExternalPlayer/ExternalPlayer.h"
#include "PlayerCoreConfig.h"
#include "PlayerSelectionRule.h"
#include "guilib/LocalizeStrings.h"
+#define PLAYERCOREFACTORY_XML "playercorefactory.xml"
+
using namespace AUTOPTR;
CPlayerCoreFactory::CPlayerCoreFactory()
@@ -55,6 +58,12 @@ CPlayerCoreFactory& CPlayerCoreFactory::Get()
return sPlayerCoreFactory;
}
+void CPlayerCoreFactory::OnSettingsLoaded()
+{
+ LoadConfiguration("special://xbmc/system/" PLAYERCOREFACTORY_XML, true);
+ LoadConfiguration(g_settings.GetUserDataItem(PLAYERCOREFACTORY_XML), false);
+}
+
/* generic function to make a vector unique, removes later duplicates */
template<typename T> void unique (T &con)
{
diff --git a/xbmc/cores/playercorefactory/PlayerCoreFactory.h b/xbmc/cores/playercorefactory/PlayerCoreFactory.h
index 9e964bac99..0a60e0978e 100644
--- a/xbmc/cores/playercorefactory/PlayerCoreFactory.h
+++ b/xbmc/cores/playercorefactory/PlayerCoreFactory.h
@@ -20,7 +20,10 @@
*
*/
+#include "system.h"
+
#include "cores/IPlayerCallback.h"
+#include "settings/ISettingsHandler.h"
#include "threads/CriticalSection.h"
#include "utils/StdString.h"
@@ -65,11 +68,13 @@ const PLAYERCOREID PCID_AMLPLAYER = EPC_AMLPLAYER;
const PLAYERCOREID PCID_OMXPLAYER = EPC_OMXPLAYER;
#endif
-class CPlayerCoreFactory
+class CPlayerCoreFactory : public ISettingsHandler
{
public:
static CPlayerCoreFactory& Get();
+ virtual void OnSettingsLoaded();
+
PLAYERCOREID GetPlayerCore(const CStdString& strCoreName) const;
CPlayerCoreConfig* GetPlayerConfig(const CStdString& strCoreName) const;
CStdString GetPlayerName(const PLAYERCOREID eCore) const;
@@ -87,8 +92,6 @@ public:
PLAYERCOREID SelectPlayerDialog(VECPLAYERCORES &vecCores, float posX = 0, float posY = 0) const;
PLAYERCOREID SelectPlayerDialog(float posX, float posY) const;
- bool LoadConfiguration(const std::string &file, bool clear);
-
void OnPlayerDiscovered(const CStdString& id, const CStdString& name, EPLAYERCORES core);
void OnPlayerRemoved(const CStdString& id);
@@ -99,6 +102,8 @@ protected:
virtual ~CPlayerCoreFactory();
private:
+ bool LoadConfiguration(const std::string &file, bool clear);
+
std::vector<CPlayerCoreConfig *> m_vecCoreConfigs;
std::vector<CPlayerSelectionRule *> m_vecCoreSelectionRules;
CCriticalSection m_section;
diff --git a/xbmc/dialogs/GUIDialogContextMenu.cpp b/xbmc/dialogs/GUIDialogContextMenu.cpp
index fc8cc0fe04..f09952ffcc 100644
--- a/xbmc/dialogs/GUIDialogContextMenu.cpp
+++ b/xbmc/dialogs/GUIDialogContextMenu.cpp
@@ -29,6 +29,7 @@
#include "Util.h"
#include "utils/URIUtils.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSourceSettings.h"
#include "GUIDialogMediaSource.h"
#include "settings/dialogs/GUIDialogLockSettings.h"
#include "storage/MediaManager.h"
@@ -457,7 +458,7 @@ bool CGUIDialogContextMenu::OnContextButton(const CStdString &type, const CFileI
if (share->strName.Equals(defaultSource))
ClearDefault(type);
}
- g_settings.DeleteSource(type, share->strName, share->strPath);
+ CMediaSourceSettings::Get().DeleteSource(type, share->strName, share->strPath);
}
return true;
}
@@ -537,8 +538,8 @@ bool CGUIDialogContextMenu::OnContextButton(const CStdString &type, const CFileI
if (!share->m_ignore)
{
- g_settings.UpdateSource(type,share->strName,"thumbnail",strThumb);
- g_settings.SaveSources();
+ CMediaSourceSettings::Get().UpdateSource(type,share->strName,"thumbnail",strThumb);
+ CMediaSourceSettings::Get().Save();
}
else if (!strThumb.IsEmpty())
{ // this is some sort of an auto-share, so store in the texture database
@@ -563,11 +564,11 @@ bool CGUIDialogContextMenu::OnContextButton(const CStdString &type, const CFileI
return false;
// password entry and re-entry succeeded, write out the lock data
share->m_iHasLock = 2;
- g_settings.UpdateSource(type, share->strName, "lockcode", strNewPassword);
+ CMediaSourceSettings::Get().UpdateSource(type, share->strName, "lockcode", strNewPassword);
strNewPassword.Format("%i",share->m_iLockMode);
- g_settings.UpdateSource(type, share->strName, "lockmode", strNewPassword);
- g_settings.UpdateSource(type, share->strName, "badpwdcount", "0");
- g_settings.SaveSources();
+ CMediaSourceSettings::Get().UpdateSource(type, share->strName, "lockmode", strNewPassword);
+ CMediaSourceSettings::Get().UpdateSource(type, share->strName, "badpwdcount", "0");
+ CMediaSourceSettings::Get().Save();
CGUIMessage msg(GUI_MSG_NOTIFY_ALL,0,0,GUI_MSG_UPDATE_SOURCES);
g_windowManager.SendThreadMessage(msg);
@@ -579,8 +580,8 @@ bool CGUIDialogContextMenu::OnContextButton(const CStdString &type, const CFileI
if (!g_passwordManager.IsMasterLockUnlocked(true))
return false;
- g_settings.UpdateSource(type, share->strName, "badpwdcount", "0");
- g_settings.SaveSources();
+ CMediaSourceSettings::Get().UpdateSource(type, share->strName, "badpwdcount", "0");
+ CMediaSourceSettings::Get().Save();
CGUIMessage msg(GUI_MSG_NOTIFY_ALL,0,0,GUI_MSG_UPDATE_SOURCES);
g_windowManager.SendThreadMessage(msg);
return true;
@@ -594,10 +595,10 @@ bool CGUIDialogContextMenu::OnContextButton(const CStdString &type, const CFileI
return false;
share->m_iHasLock = 0;
- g_settings.UpdateSource(type, share->strName, "lockmode", "0");
- g_settings.UpdateSource(type, share->strName, "lockcode", "0");
- g_settings.UpdateSource(type, share->strName, "badpwdcount", "0");
- g_settings.SaveSources();
+ CMediaSourceSettings::Get().UpdateSource(type, share->strName, "lockmode", "0");
+ CMediaSourceSettings::Get().UpdateSource(type, share->strName, "lockcode", "0");
+ CMediaSourceSettings::Get().UpdateSource(type, share->strName, "badpwdcount", "0");
+ CMediaSourceSettings::Get().Save();
CGUIMessage msg(GUI_MSG_NOTIFY_ALL,0,0,GUI_MSG_UPDATE_SOURCES);
g_windowManager.SendThreadMessage(msg);
return true;
@@ -627,10 +628,10 @@ bool CGUIDialogContextMenu::OnContextButton(const CStdString &type, const CFileI
else
return false;
// password ReSet and re-entry succeeded, write out the lock data
- g_settings.UpdateSource(type, share->strName, "lockcode", strNewPW);
- g_settings.UpdateSource(type, share->strName, "lockmode", strNewLockMode);
- g_settings.UpdateSource(type, share->strName, "badpwdcount", "0");
- g_settings.SaveSources();
+ CMediaSourceSettings::Get().UpdateSource(type, share->strName, "lockcode", strNewPW);
+ CMediaSourceSettings::Get().UpdateSource(type, share->strName, "lockmode", strNewLockMode);
+ CMediaSourceSettings::Get().UpdateSource(type, share->strName, "badpwdcount", "0");
+ CMediaSourceSettings::Get().Save();
CGUIMessage msg(GUI_MSG_NOTIFY_ALL,0,0,GUI_MSG_UPDATE_SOURCES);
g_windowManager.SendThreadMessage(msg);
return true;
@@ -643,7 +644,7 @@ bool CGUIDialogContextMenu::OnContextButton(const CStdString &type, const CFileI
CMediaSource *CGUIDialogContextMenu::GetShare(const CStdString &type, const CFileItem *item)
{
- VECSOURCES *shares = g_settings.GetSourcesFromType(type);
+ VECSOURCES *shares = CMediaSourceSettings::Get().GetSources(type);
if (!shares) return NULL;
for (unsigned int i = 0; i < shares->size(); i++)
{
@@ -707,8 +708,8 @@ void CGUIDialogContextMenu::OnDeinitWindow(int nextWindowID)
CStdString CGUIDialogContextMenu::GetDefaultShareNameByType(const CStdString &strType)
{
- VECSOURCES *pShares = g_settings.GetSourcesFromType(strType);
- CStdString strDefault = g_settings.GetDefaultSourceFromType(strType);
+ VECSOURCES *pShares = CMediaSourceSettings::Get().GetSources(strType);
+ CStdString strDefault = CMediaSourceSettings::Get().GetDefaultSource(strType);
if (!pShares) return "";
@@ -722,15 +723,8 @@ CStdString CGUIDialogContextMenu::GetDefaultShareNameByType(const CStdString &st
void CGUIDialogContextMenu::SetDefault(const CStdString &strType, const CStdString &strDefault)
{
- if (strType == "programs")
- g_settings.m_defaultProgramSource = strDefault;
- else if (strType == "files")
- g_settings.m_defaultFileSource = strDefault;
- else if (strType == "music")
- g_settings.m_defaultMusicSource = strDefault;
- else if (strType == "pictures")
- g_settings.m_defaultPictureSource = strDefault;
- g_settings.SaveSources();
+ CMediaSourceSettings::Get().SetDefaultSource(strType, strDefault);
+ CMediaSourceSettings::Get().Save();
}
void CGUIDialogContextMenu::ClearDefault(const CStdString &strType)
diff --git a/xbmc/dialogs/GUIDialogFileBrowser.cpp b/xbmc/dialogs/GUIDialogFileBrowser.cpp
index 87d7bc0655..f55ba0864a 100644
--- a/xbmc/dialogs/GUIDialogFileBrowser.cpp
+++ b/xbmc/dialogs/GUIDialogFileBrowser.cpp
@@ -41,10 +41,12 @@
#include "settings/AdvancedSettings.h"
#include "settings/Settings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSourceSettings.h"
#include "guilib/Key.h"
#include "guilib/LocalizeStrings.h"
#include "utils/log.h"
#include "URL.h"
+#include "view/ViewState.h"
using namespace XFILE;
@@ -915,7 +917,7 @@ void CGUIDialogFileBrowser::OnAddMediaSource()
{
if (CGUIDialogMediaSource::ShowAndAddMediaSource(m_addSourceType))
{
- SetSources(*g_settings.GetSourcesFromType(m_addSourceType));
+ SetSources(*CMediaSourceSettings::Get().GetSources(m_addSourceType));
Update("");
}
}
@@ -924,7 +926,7 @@ void CGUIDialogFileBrowser::OnEditMediaSource(CFileItem* pItem)
{
if (CGUIDialogMediaSource::ShowAndEditMediaSource(m_addSourceType,pItem->GetLabel()))
{
- SetSources(*g_settings.GetSourcesFromType(m_addSourceType));
+ SetSources(*CMediaSourceSettings::Get().GetSources(m_addSourceType));
Update("");
}
}
@@ -995,8 +997,8 @@ bool CGUIDialogFileBrowser::OnPopupMenu(int iItem)
}
else
{
- g_settings.DeleteSource(m_addSourceType,(*m_vecItems)[iItem]->GetLabel(),(*m_vecItems)[iItem]->GetPath());
- SetSources(*g_settings.GetSourcesFromType(m_addSourceType));
+ CMediaSourceSettings::Get().DeleteSource(m_addSourceType,(*m_vecItems)[iItem]->GetLabel(),(*m_vecItems)[iItem]->GetPath());
+ SetSources(*CMediaSourceSettings::Get().GetSources(m_addSourceType));
Update("");
}
}
diff --git a/xbmc/dialogs/GUIDialogMediaSource.cpp b/xbmc/dialogs/GUIDialogMediaSource.cpp
index 20bdc84da7..3ca567eb01 100644
--- a/xbmc/dialogs/GUIDialogMediaSource.cpp
+++ b/xbmc/dialogs/GUIDialogMediaSource.cpp
@@ -33,6 +33,7 @@
#include "FileItem.h"
#include "settings/Settings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSourceSettings.h"
#include "guilib/LocalizeStrings.h"
#include "PasswordManager.h"
#include "URL.h"
@@ -140,7 +141,7 @@ bool CGUIDialogMediaSource::ShowAndAddMediaSource(const CStdString &type)
CMediaSource share;
unsigned int i,j=2;
bool bConfirmed=false;
- VECSOURCES* pShares = g_settings.GetSourcesFromType(type);
+ VECSOURCES* pShares = CMediaSourceSettings::Get().GetSources(type);
CStdString strName = dialog->m_name;
while (!bConfirmed)
{
@@ -158,7 +159,7 @@ bool CGUIDialogMediaSource::ShowAndAddMediaSource(const CStdString &type)
if (dialog->m_paths->Size() > 0) {
share.m_strThumbnailImage = dialog->m_paths->Get(0)->GetArt("thumb");
}
- g_settings.AddShare(type, share);
+ CMediaSourceSettings::Get().AddShare(type, share);
}
dialog->m_paths->Clear();
return confirmed;
@@ -166,7 +167,7 @@ bool CGUIDialogMediaSource::ShowAndAddMediaSource(const CStdString &type)
bool CGUIDialogMediaSource::ShowAndEditMediaSource(const CStdString &type, const CStdString&share)
{
- VECSOURCES* pShares = g_settings.GetSourcesFromType(type);
+ VECSOURCES* pShares = CMediaSourceSettings::Get().GetSources(type);
if (pShares)
{
for (unsigned int i=0;i<pShares->size();++i)
@@ -192,7 +193,7 @@ bool CGUIDialogMediaSource::ShowAndEditMediaSource(const CStdString &type, const
{ // yay, add this share
unsigned int i,j=2;
bool bConfirmed=false;
- VECSOURCES* pShares = g_settings.GetSourcesFromType(type);
+ VECSOURCES* pShares = CMediaSourceSettings::Get().GetSources(type);
CStdString strName = dialog->m_name;
while (!bConfirmed)
{
@@ -209,7 +210,7 @@ bool CGUIDialogMediaSource::ShowAndEditMediaSource(const CStdString &type, const
CMediaSource newShare;
newShare.FromNameAndPaths(type, strName, dialog->GetPaths());
- g_settings.UpdateShare(type, strOldName, newShare);
+ CMediaSourceSettings::Get().UpdateShare(type, strOldName, newShare);
}
dialog->m_paths->Clear();
return confirmed;
@@ -381,7 +382,7 @@ void CGUIDialogMediaSource::OnOK()
CMediaSource share;
share.FromNameAndPaths(m_type, m_name, GetPaths());
// hack: Need to temporarily add the share, then get path, then remove share
- VECSOURCES *shares = g_settings.GetSourcesFromType(m_type);
+ VECSOURCES *shares = CMediaSourceSettings::Get().GetSources(m_type);
if (shares)
shares->push_back(share);
if (share.strPath.Left(9).Equals("plugin://") || CDirectory::GetDirectory(share.strPath, items, "", DIR_FLAG_NO_FILE_DIRS | DIR_FLAG_ALLOW_PROMPT) || CGUIDialogYesNo::ShowAndGetInput(1001,1025,1003,1004))
diff --git a/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp b/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp
index af9bda0556..f39d7d1c47 100644
--- a/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp
+++ b/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp
@@ -29,6 +29,7 @@
#include "guilib/GUIEditControl.h"
#include "guilib/LocalizeStrings.h"
#include "settings/Settings.h"
+#include "settings/MediaSourceSettings.h"
#include "storage/MediaManager.h"
#include "utils/LabelFormatter.h"
@@ -273,10 +274,10 @@ void CGUIDialogSmartPlaylistRule::OnBrowse()
{
VECSOURCES sources;
if (m_type == "songs" || m_type == "mixed")
- sources = *g_settings.GetSourcesFromType("music");
+ sources = *CMediaSourceSettings::Get().GetSources("music");
if (m_type != "songs")
{
- VECSOURCES sources2 = *g_settings.GetSourcesFromType("video");
+ VECSOURCES sources2 = *CMediaSourceSettings::Get().GetSources("video");
sources.insert(sources.end(),sources2.begin(),sources2.end());
}
g_mediaManager.GetLocalDrives(sources);
diff --git a/xbmc/filesystem/CurlFile.cpp b/xbmc/filesystem/CurlFile.cpp
index 986b06ab91..775586d888 100644
--- a/xbmc/filesystem/CurlFile.cpp
+++ b/xbmc/filesystem/CurlFile.cpp
@@ -77,8 +77,21 @@ extern "C" int debug_callback(CURL_HANDLE *handle, curl_infotype info, char *out
CUtil::Tokenize(strLine, vecLines, "\r\n");
std::vector<CStdString>::const_iterator it = vecLines.begin();
- while (it != vecLines.end()) {
- CLog::Log(LOGDEBUG, "Curl::Debug %s", (*it).c_str());
+ char *infotype;
+ switch(info)
+ {
+ case CURLINFO_TEXT : infotype = (char *) "TEXT: "; break;
+ case CURLINFO_HEADER_IN : infotype = (char *) "HEADER_IN: "; break;
+ case CURLINFO_HEADER_OUT : infotype = (char *) "HEADER_OUT: "; break;
+ case CURLINFO_SSL_DATA_IN : infotype = (char *) "SSL_DATA_IN: "; break;
+ case CURLINFO_SSL_DATA_OUT : infotype = (char *) "SSL_DATA_OUT: "; break;
+ case CURLINFO_END : infotype = (char *) "END: "; break;
+ default : infotype = (char *) ""; break;
+ }
+
+ while (it != vecLines.end())
+ {
+ CLog::Log(LOGDEBUG, "Curl::Debug - %s%s", infotype, (*it).c_str());
it++;
}
return 0;
@@ -186,7 +199,7 @@ size_t CCurlFile::CReadState::WriteCallback(char *buffer, size_t size, size_t ni
if (maxWriteable)
{
if (!m_buffer.WriteData(m_overflowBuffer, maxWriteable))
- CLog::Log(LOGERROR, "Unable to write to buffer - what's up?");
+ CLog::Log(LOGERROR, "CCurlFile::WriteCallback - Unable to write to buffer - what's up?");
if (m_overflowSize > maxWriteable)
{ // still have some more - copy it down
memmove(m_overflowBuffer, m_overflowBuffer + maxWriteable, m_overflowSize - maxWriteable);
@@ -200,7 +213,7 @@ size_t CCurlFile::CReadState::WriteCallback(char *buffer, size_t size, size_t ni
{
if (!m_buffer.WriteData(buffer, maxWriteable))
{
- CLog::Log(LOGERROR, "%s - Unable to write to buffer with %i bytes - what's up?", __FUNCTION__, maxWriteable);
+ CLog::Log(LOGERROR, "CCurlFile::WriteCallback - Unable to write to buffer with %i bytes - what's up?", maxWriteable);
}
else
{
@@ -215,7 +228,7 @@ size_t CCurlFile::CReadState::WriteCallback(char *buffer, size_t size, size_t ni
m_overflowBuffer = (char*)realloc_simple(m_overflowBuffer, amount + m_overflowSize);
if(m_overflowBuffer == NULL)
{
- CLog::Log(LOGWARNING, "%s - Failed to grow overflow buffer from %i bytes to %i bytes", __FUNCTION__, m_overflowSize, amount + m_overflowSize);
+ CLog::Log(LOGWARNING, "CCurlFile::WriteCallback - Failed to grow overflow buffer from %i bytes to %i bytes", m_overflowSize, amount + m_overflowSize);
return 0;
}
memcpy(m_overflowBuffer + m_overflowSize, buffer, amount);
@@ -291,14 +304,14 @@ bool CCurlFile::CReadState::Seek(int64_t pos)
void CCurlFile::CReadState::SetResume(void)
{
/*
- * Use RANGE method for resuming. We used to use RESUME_FROM_LARGE for this but some http servers
- * require us to always send the range request header. If we don't the server may provide different
- * content causing seeking to fail. Note that internally Curl will automatically handle this for FTP
- * so we don't need to worry about that here.
+ * Explicitly set RANGE header when filepos=0 as some http servers require us to always send the range
+ * request header. If we don't the server may provide different content causing seeking to fail.
+ * This only affects HTTP-like items, for FTP it's a null operation.
*/
- char str[21];
- sprintf(str, "%"PRId64"-", m_filePos);
- g_curlInterface.easy_setopt(m_easyHandle, CURLOPT_RANGE, str);
+ if (m_filePos == 0)
+ g_curlInterface.easy_setopt(m_easyHandle, CURLOPT_RANGE, "0-");
+
+ g_curlInterface.easy_setopt(m_easyHandle, CURLOPT_RESUME_FROM_LARGE, m_filePos);
}
long CCurlFile::CReadState::Connect(unsigned int size)
@@ -316,7 +329,7 @@ long CCurlFile::CReadState::Connect(unsigned int size)
m_stillRunning = 1;
if (!FillBuffer(1))
{
- CLog::Log(LOGERROR, "CCurlFile::CReadState::Open, didn't get any data from stream.");
+ CLog::Log(LOGERROR, "CCurlFile::CReadState::Connect, didn't get any data from stream.");
return -1;
}
@@ -647,6 +660,15 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
if( strProtocol.Equals("ftp")
|| strProtocol.Equals("ftps") )
{
+ // we was using url optons for urls, keep the old code work and warning
+ if (!url2.GetOptions().IsEmpty())
+ {
+ CLog::Log(LOGWARNING, "%s: ftp url option is deprecated, please switch to use protocol option (change '?' to '|'), url: [%s]", __FUNCTION__, url2.Get().c_str());
+ url2.SetProtocolOptions(url2.GetOptions().Mid(1));
+ /* ftp has no options */
+ url2.SetOptions("");
+ }
+
/* this is uggly, depending on from where */
/* we get the link it may or may not be */
/* url encoded. if handed from ftpdirectory */
@@ -655,8 +677,9 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
CStdString partial, filename(url2.GetFileName());
CStdStringArray array;
- /* our current client doesn't support utf8 */
- g_charsetConverter.utf8ToStringCharset(filename);
+ // if server sent us the filename in non-utf8, we need send back with same encoding.
+ if (url2.GetProtocolOption("utf8") == "0")
+ g_charsetConverter.utf8ToStringCharset(filename);
/* TODO: create a tokenizer that doesn't skip empty's */
CUtil::Tokenize(filename, array, "/");
@@ -677,53 +700,21 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
url2.SetFileName(filename);
- CStdString options = url2.GetOptions().Mid(1);
- options.TrimRight('/'); // hack for trailing slashes being added from source
-
m_ftpauth = "";
+ if (url2.HasProtocolOption("auth"))
+ {
+ m_ftpauth = url2.GetProtocolOption("auth");
+ if(m_ftpauth.IsEmpty())
+ m_ftpauth = "any";
+ }
m_ftpport = "";
- m_ftppasvip = false;
-
- /* parse options given */
- CUtil::Tokenize(options, array, "&");
- for(CStdStringArray::iterator it = array.begin(); it != array.end(); it++)
+ if (url2.HasProtocolOption("active"))
{
- CStdString name, value;
- int pos = it->Find('=');
- if(pos >= 0)
- {
- name = it->Left(pos);
- value = it->Mid(pos+1, it->size());
- }
- else
- {
- name = (*it);
- value = "";
- }
-
- if(name.Equals("auth"))
- {
- m_ftpauth = value;
- if(m_ftpauth.IsEmpty())
- m_ftpauth = "any";
- }
- else if(name.Equals("active"))
- {
- m_ftpport = value;
- if(value.IsEmpty())
- m_ftpport = "-";
- }
- else if(name.Equals("pasvip"))
- {
- if(value == "0")
- m_ftppasvip = false;
- else
- m_ftppasvip = true;
- }
+ m_ftpport = url2.GetProtocolOption("active");
+ if(m_ftpport.IsEmpty())
+ m_ftpport = "-";
}
-
- /* ftp has no options */
- url2.SetOptions("");
+ m_ftppasvip = url2.HasProtocolOption("pasvip") && url2.GetProtocolOption("pasvip") != "0";
}
else if( strProtocol.Equals("http")
|| strProtocol.Equals("https"))
@@ -780,6 +771,8 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
SetContentEncoding(value);
else if (name.Equals("noshout") && value.Equals("true"))
m_skipshout = true;
+ else if (name.Equals("seekable") && value.Equals("0"))
+ m_seekable = false;
else
SetRequestHeader(name, value);
}
@@ -839,7 +832,7 @@ bool CCurlFile::ReadData(CStdString& strHTML)
bool CCurlFile::Download(const CStdString& strURL, const CStdString& strFileName, LPDWORD pdwSize)
{
- CLog::Log(LOGINFO, "Download: %s->%s", strURL.c_str(), strFileName.c_str());
+ CLog::Log(LOGINFO, "CCurlFile::Download - %s->%s", strURL.c_str(), strFileName.c_str());
CStdString strData;
if (!Get(strURL, strData))
@@ -848,7 +841,7 @@ bool CCurlFile::Download(const CStdString& strURL, const CStdString& strFileName
XFILE::CFile file;
if (!file.OpenForWrite(strFileName, true))
{
- CLog::Log(LOGERROR, "Unable to open file %s: %u",
+ CLog::Log(LOGERROR, "CCurlFile::Download - Unable to open file %s: %u",
strFileName.c_str(), GetLastError());
return false;
}
@@ -902,6 +895,7 @@ bool CCurlFile::Open(const CURL& url)
if( m_state->m_easyHandle == NULL )
g_curlInterface.easy_aquire(url2.GetProtocol(), url2.GetHostName(), &m_state->m_easyHandle, &m_state->m_multiHandle );
+ m_seekable = true;
// setup common curl options
SetCommonOptions(m_state);
SetRequestHeaders(m_state);
@@ -924,7 +918,7 @@ bool CCurlFile::Open(const CURL& url)
|| !m_state->m_httpheader.GetValue("icy-name").IsEmpty()
|| !m_state->m_httpheader.GetValue("icy-br").IsEmpty()) && !m_skipshout)
{
- CLog::Log(LOGDEBUG,"CurlFile - file <%s> is a shoutcast stream. re-opening", m_url.c_str());
+ CLog::Log(LOGDEBUG,"CCurlFile::Open - File <%s> is a shoutcast stream. Re-opening", m_url.c_str());
throw new CRedirectException(new CShoutcastFile);
}
@@ -934,7 +928,7 @@ bool CCurlFile::Open(const CURL& url)
m_multisession = true;
if(m_state->m_httpheader.GetValue("Server").Find("Portable SDK for UPnP devices") >= 0)
{
- CLog::Log(LOGWARNING, "CurlFile - disabling multi session due to broken libupnp server");
+ CLog::Log(LOGWARNING, "CCurlFile::Open - Disabling multi session due to broken libupnp server");
m_multisession = false;
}
}
@@ -942,11 +936,10 @@ bool CCurlFile::Open(const CURL& url)
if(m_state->m_httpheader.GetValue("Transfer-Encoding").Equals("chunked"))
m_state->m_fileSize = 0;
- m_seekable = false;
- if(m_state->m_fileSize > 0)
+ if(m_state->m_fileSize <= 0)
+ m_seekable = false;
+ if (m_seekable)
{
- m_seekable = true;
-
if(url2.GetProtocol().Equals("http")
|| url2.GetProtocol().Equals("https"))
{
@@ -1029,7 +1022,7 @@ int CCurlFile::Write(const void* lpBuf, int64_t uiBufSize)
{
long code;
if(g_curlInterface.easy_getinfo(m_state->m_easyHandle, CURLINFO_RESPONSE_CODE, &code) == CURLE_OK )
- CLog::Log(LOGERROR, "%s - unable to write curl resource (%s) - %ld", __FUNCTION__, m_url.c_str(), code);
+ CLog::Log(LOGERROR, "%s - Unable to write curl resource (%s) - %ld", __FUNCTION__, m_url.c_str(), code);
m_inError = true;
return -1;
}
@@ -1076,7 +1069,7 @@ bool CCurlFile::Exists(const CURL& url)
// if file is already running, get info from it
if( m_opened )
{
- CLog::Log(LOGWARNING, "%s - Exist called on open file", __FUNCTION__);
+ CLog::Log(LOGWARNING, "CCurlFile::Exists - Exist called on open file %s", url.Get().c_str());
return true;
}
@@ -1108,6 +1101,17 @@ bool CCurlFile::Exists(const CURL& url)
if (result == CURLE_WRITE_ERROR || result == CURLE_OK)
return true;
+ if (result == CURLE_HTTP_RETURNED_ERROR)
+ {
+ long code;
+ if(g_curlInterface.easy_getinfo(m_state->m_easyHandle, CURLINFO_RESPONSE_CODE, &code) == CURLE_OK && code != 404 )
+ CLog::Log(LOGERROR, "CCurlFile::Exists - Failed: HTTP returned error %ld for %s", code, url.Get().c_str());
+ }
+ else if (result != CURLE_REMOTE_FILE_NOT_FOUND && result != CURLE_FTP_COULDNT_RETR_FILE)
+ {
+ CLog::Log(LOGERROR, "CCurlFile::Exists - Failed: %s(%d) for %s", g_curlInterface.easy_strerror(result), result, url.Get().c_str());
+ }
+
errno = ENOENT;
return false;
}
@@ -1199,7 +1203,7 @@ int CCurlFile::Stat(const CURL& url, struct __stat64* buffer)
// if file is already running, get info from it
if( m_opened )
{
- CLog::Log(LOGWARNING, "%s - Stat called on open file %s", __FUNCTION__, url.Get().c_str());
+ CLog::Log(LOGWARNING, "CCurlFile::Stat - Stat called on open file %s", url.Get().c_str());
if (buffer)
{
memset(buffer, 0, sizeof(struct __stat64));
@@ -1217,7 +1221,7 @@ int CCurlFile::Stat(const CURL& url, struct __stat64* buffer)
SetCommonOptions(m_state);
SetRequestHeaders(m_state);
- g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_TIMEOUT, 5);
+ g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_TIMEOUT, g_advancedSettings.m_curlconnecttimeout);
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_NOBODY, 1);
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_WRITEDATA, NULL); /* will cause write failure*/
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_FILETIME , 1);
@@ -1249,10 +1253,10 @@ int CCurlFile::Stat(const CURL& url, struct __stat64* buffer)
/* somehow curl doesn't reset CURLOPT_NOBODY properly so reset everything */
SetCommonOptions(m_state);
SetRequestHeaders(m_state);
- g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_TIMEOUT, 5);
+ g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_TIMEOUT, g_advancedSettings.m_curlconnecttimeout);
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_RANGE, "0-0");
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_WRITEDATA, NULL); /* will cause write failure*/
- g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_FILETIME , 1);
+ g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_FILETIME, 1);
result = g_curlInterface.easy_perform(m_state->m_easyHandle);
}
@@ -1267,15 +1271,18 @@ int CCurlFile::Stat(const CURL& url, struct __stat64* buffer)
{
g_curlInterface.easy_release(&m_state->m_easyHandle, NULL);
errno = ENOENT;
+ CLog::Log(LOGERROR, "CCurlFile::Stat - Failed: %s(%d) for %s", g_curlInterface.easy_strerror(result), result, url.Get().c_str());
return -1;
}
double length;
- if (CURLE_OK != g_curlInterface.easy_getinfo(m_state->m_easyHandle, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &length) || length < 0.0)
+ result = g_curlInterface.easy_getinfo(m_state->m_easyHandle, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &length);
+ if (result != CURLE_OK || length < 0.0)
{
if (url.GetProtocol() == "ftp")
{
g_curlInterface.easy_release(&m_state->m_easyHandle, NULL);
+ CLog::Log(LOGNOTICE, "CCurlFile::Stat - Content length failed: %s(%d) for %s", g_curlInterface.easy_strerror(result), result, url.Get().c_str());
errno = ENOENT;
return -1;
}
@@ -1288,8 +1295,10 @@ int CCurlFile::Stat(const CURL& url, struct __stat64* buffer)
if(buffer)
{
char *content;
- if (CURLE_OK != g_curlInterface.easy_getinfo(m_state->m_easyHandle, CURLINFO_CONTENT_TYPE, &content))
+ result = g_curlInterface.easy_getinfo(m_state->m_easyHandle, CURLINFO_CONTENT_TYPE, &content);
+ if (result != CURLE_OK)
{
+ CLog::Log(LOGNOTICE, "CCurlFile::Stat - Content type failed: %s(%d) for %s", g_curlInterface.easy_strerror(result), result, url.Get().c_str());
g_curlInterface.easy_release(&m_state->m_easyHandle, NULL);
errno = ENOENT;
return -1;
@@ -1304,9 +1313,10 @@ int CCurlFile::Stat(const CURL& url, struct __stat64* buffer)
buffer->st_mode = _S_IFREG;
}
long filetime;
- if (CURLE_OK != g_curlInterface.easy_getinfo(m_state->m_easyHandle, CURLINFO_FILETIME, &filetime))
+ result = g_curlInterface.easy_getinfo(m_state->m_easyHandle, CURLINFO_FILETIME, &filetime);
+ if (result != CURLE_OK)
{
- CLog::Log(LOGWARNING, "%s - Cannot get curl filetime for %s", __FUNCTION__, url.Get().c_str());
+ CLog::Log(LOGNOTICE, "CCurlFile::Stat - Filetime failed: %s(%d) for %s", g_curlInterface.easy_strerror(result), result, url.Get().c_str());
}
else
{
@@ -1393,7 +1403,7 @@ bool CCurlFile::CReadState::FillBuffer(unsigned int want)
if (msg->data.result == CURLE_OK)
return true;
- CLog::Log(LOGWARNING, "%s: curl failed with code %i", __FUNCTION__, msg->data.result);
+ CLog::Log(LOGERROR, "CCurlFile::FillBuffer - Failed: %s(%d)", g_curlInterface.easy_strerror(msg->data.result), msg->data.result);
// We need to check the result here as we don't want to retry on every error
if ( (msg->data.result == CURLE_OPERATION_TIMEDOUT ||
@@ -1424,7 +1434,7 @@ bool CCurlFile::CReadState::FillBuffer(unsigned int want)
// If we got here something is wrong
if (++retry > g_advancedSettings.m_curlretries)
{
- CLog::Log(LOGWARNING, "%s: Reconnect failed!", __FUNCTION__);
+ CLog::Log(LOGERROR, "CCurlFile::FillBuffer - Reconnect failed!");
// Reset the rest of the variables like we would in Disconnect()
m_filePos = 0;
m_fileSize = 0;
@@ -1433,7 +1443,7 @@ bool CCurlFile::CReadState::FillBuffer(unsigned int want)
return false;
}
- CLog::Log(LOGWARNING, "%s: Reconnect, (re)try %i", __FUNCTION__, retry);
+ CLog::Log(LOGNOTICE, "CCurlFile::FillBuffer - Reconnect, (re)try %i", retry);
// Connect + seek to current position (again)
SetResume();
@@ -1472,7 +1482,7 @@ bool CCurlFile::CReadState::FillBuffer(unsigned int want)
we call dllselect(0, ...), which is basically equal to sleep. */
if (SOCKET_ERROR == dllselect(maxfd + 1, &fdread, &fdwrite, &fdexcep, &t))
{
- CLog::Log(LOGERROR, "%s - curl failed with socket error", __FUNCTION__);
+ CLog::Log(LOGERROR, "CCurlFile::FillBuffer - Failed with socket error");
return false;
}
}
@@ -1487,7 +1497,7 @@ bool CCurlFile::CReadState::FillBuffer(unsigned int want)
break;
default:
{
- CLog::Log(LOGERROR, "%s - curl multi perform failed with code %d, aborting", __FUNCTION__, result);
+ CLog::Log(LOGERROR, "CCurlFile::FillBuffer - Multi perform failed with code %d, aborting", result);
return false;
}
break;
diff --git a/xbmc/filesystem/CurlFile.h b/xbmc/filesystem/CurlFile.h
index 2bb8f5497f..fefd5722de 100644
--- a/xbmc/filesystem/CurlFile.h
+++ b/xbmc/filesystem/CurlFile.h
@@ -191,6 +191,3 @@ namespace XFILE
long m_httpresponse;
};
}
-
-
-
diff --git a/xbmc/filesystem/DAVCommon.cpp b/xbmc/filesystem/DAVCommon.cpp
index 3e0970721d..3e0970721d 100755..100644
--- a/xbmc/filesystem/DAVCommon.cpp
+++ b/xbmc/filesystem/DAVCommon.cpp
diff --git a/xbmc/filesystem/DAVCommon.h b/xbmc/filesystem/DAVCommon.h
index 08de90ef04..08de90ef04 100755..100644
--- a/xbmc/filesystem/DAVCommon.h
+++ b/xbmc/filesystem/DAVCommon.h
diff --git a/xbmc/filesystem/DAVDirectory.cpp b/xbmc/filesystem/DAVDirectory.cpp
index 148b2622dc..470a373a29 100644
--- a/xbmc/filesystem/DAVDirectory.cpp
+++ b/xbmc/filesystem/DAVDirectory.cpp
@@ -27,7 +27,6 @@
#include "FileItem.h"
#include "utils/RegExp.h"
#include "utils/StringUtils.h"
-#include "utils/CharsetConverter.h"
#include "utils/log.h"
#include "utils/URIUtils.h"
diff --git a/xbmc/filesystem/DAVFile.cpp b/xbmc/filesystem/DAVFile.cpp
index 41e74c32a4..41e74c32a4 100755..100644
--- a/xbmc/filesystem/DAVFile.cpp
+++ b/xbmc/filesystem/DAVFile.cpp
diff --git a/xbmc/filesystem/DAVFile.h b/xbmc/filesystem/DAVFile.h
index 3e31de5e14..3e31de5e14 100755..100644
--- a/xbmc/filesystem/DAVFile.h
+++ b/xbmc/filesystem/DAVFile.h
diff --git a/xbmc/filesystem/DllLibCurl.h b/xbmc/filesystem/DllLibCurl.h
index bff870c01e..90802aa524 100644
--- a/xbmc/filesystem/DllLibCurl.h
+++ b/xbmc/filesystem/DllLibCurl.h
@@ -78,10 +78,12 @@ namespace XCURL
DEFINE_METHOD1(void, multi_cleanup, (CURLM *p1))
DEFINE_METHOD2(struct curl_slist*, slist_append, (struct curl_slist * p1, const char * p2))
DEFINE_METHOD1(void, slist_free_all, (struct curl_slist * p1))
+ DEFINE_METHOD1(const char *, easy_strerror, (CURLcode p1))
BEGIN_METHOD_RESOLVE()
RESOLVE_METHOD_RENAME(curl_global_init, global_init)
RESOLVE_METHOD_RENAME(curl_global_cleanup, global_cleanup)
RESOLVE_METHOD_RENAME(curl_easy_init, easy_init)
+ RESOLVE_METHOD_RENAME(curl_easy_strerror, easy_strerror)
RESOLVE_METHOD_RENAME_FP(curl_easy_setopt, easy_setopt)
RESOLVE_METHOD_RENAME(curl_easy_perform, easy_perform)
RESOLVE_METHOD_RENAME(curl_easy_pause, easy_pause)
diff --git a/xbmc/filesystem/FTPDirectory.cpp b/xbmc/filesystem/FTPDirectory.cpp
index 00720cf418..e7a5e6f7dd 100644
--- a/xbmc/filesystem/FTPDirectory.cpp
+++ b/xbmc/filesystem/FTPDirectory.cpp
@@ -49,6 +49,7 @@ bool CFTPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
if (!reader.Open(url))
return false;
+ bool serverNotUseUTF8 = url.GetProtocolOption("utf8").Equals("0");
char buffer[MAX_PATH + 1024];
while( reader.ReadString(buffer, sizeof(buffer)) )
@@ -73,10 +74,21 @@ bool CFTPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
if( name.Equals("..") || name.Equals(".") )
continue;
- /* this should be conditional if we ever add */
- /* support for the utf8 extension in ftp client */
+ // server returned filename could in utf8 or non-utf8 encoding
+ // we need utf8, so convert it to utf8 anyway
g_charsetConverter.unknownToUTF8(name);
+ // convert got empty result, ignore it
+ if (name.IsEmpty())
+ continue;
+
+ if (serverNotUseUTF8 || name != parse.getName())
+ // non-utf8 name path, tag it with protocol option.
+ // then we can talk to server with the same encoding in CurlFile according to this tag.
+ url.SetProtocolOption("utf8", "0");
+ else
+ url.RemoveProtocolOption("utf8");
+
CFileItemPtr pItem(new CFileItem(name));
pItem->m_bIsFolder = (bool)(parse.getFlagtrycwd() != 0);
diff --git a/xbmc/filesystem/SourcesDirectory.cpp b/xbmc/filesystem/SourcesDirectory.cpp
index 5d86f9e421..1d5d4e8e6d 100644
--- a/xbmc/filesystem/SourcesDirectory.cpp
+++ b/xbmc/filesystem/SourcesDirectory.cpp
@@ -25,6 +25,7 @@
#include "FileItem.h"
#include "File.h"
#include "settings/Settings.h"
+#include "settings/MediaSourceSettings.h"
#include "guilib/TextureManager.h"
#include "storage/MediaManager.h"
@@ -47,7 +48,7 @@ bool CSourcesDirectory::GetDirectory(const CStdString& strPath, CFileItemList &i
URIUtils::RemoveSlashAtEnd(type);
VECSOURCES sources;
- VECSOURCES *sourcesFromType = g_settings.GetSourcesFromType(type);
+ VECSOURCES *sourcesFromType = CMediaSourceSettings::Get().GetSources(type);
if (sourcesFromType)
sources = *sourcesFromType;
g_mediaManager.GetRemovableDrives(sources);
diff --git a/xbmc/filesystem/UPnPDirectory.cpp b/xbmc/filesystem/UPnPDirectory.cpp
index 2a3c893825..49c844925d 100644
--- a/xbmc/filesystem/UPnPDirectory.cpp
+++ b/xbmc/filesystem/UPnPDirectory.cpp
@@ -349,7 +349,12 @@ CUPnPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items)
std::string content = GetContentMapping(max_string);
items.SetContent(content);
if (content == "unknown")
- items.AddSortMethod(SORT_METHOD_NONE, 551, LABEL_MASKS("%L", "%I", "%L", ""));
+ {
+ items.AddSortMethod(SORT_METHOD_UNSORTED, 571, LABEL_MASKS("%L", "%I", "%L", ""));
+ items.AddSortMethod(SORT_METHOD_LABEL_IGNORE_FOLDERS, 551, LABEL_MASKS("%L", "%I", "%L", ""));
+ items.AddSortMethod(SORT_METHOD_SIZE, 553, LABEL_MASKS("%L", "%I", "%L", "%I"));
+ items.AddSortMethod(SORT_METHOD_DATE, 552, LABEL_MASKS("%L", "%J", "%L", "%J"));
+ }
}
cleanup:
diff --git a/xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp b/xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp
index bcd13f6b42..aaaab2a7c1 100644
--- a/xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp
+++ b/xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp
@@ -23,7 +23,7 @@
#include "video/VideoDatabase.h"
#include "video/VideoDbUrl.h"
#include "settings/GUISettings.h"
-#include "settings/Settings.h"
+#include "settings/MediaSettings.h"
#include "FileItem.h"
#include "utils/Variant.h"
@@ -78,7 +78,7 @@ bool CDirectoryNodeSeasons::GetContent(CFileItemList& items) const
if (items[0]->GetVideoInfoTag()->m_iSeason == 0 || items[1]->GetVideoInfoTag()->m_iSeason == 0)
bFlatten = true; // flatten if one season + specials
- if (iFlatten > 0 && !bFlatten && g_settings.GetWatchMode("tvshows") == VIDEO_SHOW_UNWATCHED)
+ if (iFlatten > 0 && !bFlatten && CMediaSettings::Get().GetWatchedMode("tvshows") == WatchedModeUnwatched)
{
int count = 0;
for(int i = 0; i < items.Size(); i++)
diff --git a/xbmc/filesystem/test/TestRarFile.cpp b/xbmc/filesystem/test/TestRarFile.cpp
index d227d86d31..a29430249f 100644
--- a/xbmc/filesystem/test/TestRarFile.cpp
+++ b/xbmc/filesystem/test/TestRarFile.cpp
@@ -22,6 +22,7 @@
#ifdef HAS_FILESYSTEM_RAR
#include "filesystem/Directory.h"
#include "filesystem/File.h"
+#include "filesystem/NFSFile.h"
#include "settings/GUISettings.h"
#include "utils/URIUtils.h"
#include "FileItem.h"
diff --git a/xbmc/guilib/GUIButtonControl.cpp b/xbmc/guilib/GUIButtonControl.cpp
index 657f64f452..29e1330e5f 100644
--- a/xbmc/guilib/GUIButtonControl.cpp
+++ b/xbmc/guilib/GUIButtonControl.cpp
@@ -21,7 +21,6 @@
#include "GUIButtonControl.h"
#include "GUIWindowManager.h"
#include "GUIDialog.h"
-#include "utils/CharsetConverter.h"
#include "GUIFontManager.h"
#include "Key.h"
diff --git a/xbmc/guilib/GUICheckMarkControl.cpp b/xbmc/guilib/GUICheckMarkControl.cpp
index 383c574cab..c234ea09fb 100644
--- a/xbmc/guilib/GUICheckMarkControl.cpp
+++ b/xbmc/guilib/GUICheckMarkControl.cpp
@@ -19,7 +19,6 @@
*/
#include "GUICheckMarkControl.h"
-#include "utils/CharsetConverter.h"
#include "GUIFontManager.h"
#include "Key.h"
diff --git a/xbmc/guilib/GUIFadeLabelControl.cpp b/xbmc/guilib/GUIFadeLabelControl.cpp
index 0ed18d8741..706d073219 100644
--- a/xbmc/guilib/GUIFadeLabelControl.cpp
+++ b/xbmc/guilib/GUIFadeLabelControl.cpp
@@ -19,7 +19,6 @@
*/
#include "GUIFadeLabelControl.h"
-#include "utils/CharsetConverter.h"
using namespace std;
diff --git a/xbmc/guilib/GUIInfoTypes.cpp b/xbmc/guilib/GUIInfoTypes.cpp
index 5f7d2dbd0f..e4cd48c9c3 100644
--- a/xbmc/guilib/GUIInfoTypes.cpp
+++ b/xbmc/guilib/GUIInfoTypes.cpp
@@ -19,7 +19,6 @@
*/
#include "GUIInfoTypes.h"
-#include "utils/CharsetConverter.h"
#include "GUIInfoManager.h"
#include "addons/AddonManager.h"
#include "utils/log.h"
diff --git a/xbmc/guilib/GUILabel.cpp b/xbmc/guilib/GUILabel.cpp
index 161fadbc37..e8a03ab44e 100644
--- a/xbmc/guilib/GUILabel.cpp
+++ b/xbmc/guilib/GUILabel.cpp
@@ -19,7 +19,6 @@
*/
#include "GUILabel.h"
-#include "utils/CharsetConverter.h"
#include <limits>
CGUILabel::CGUILabel(float posX, float posY, float width, float height, const CLabelInfo& labelInfo, CGUILabel::OVER_FLOW overflow)
diff --git a/xbmc/guilib/GUIListLabel.cpp b/xbmc/guilib/GUIListLabel.cpp
index 5aab415efb..bc85b8f591 100644
--- a/xbmc/guilib/GUIListLabel.cpp
+++ b/xbmc/guilib/GUIListLabel.cpp
@@ -19,7 +19,6 @@
*/
#include "GUIListLabel.h"
-#include "utils/CharsetConverter.h"
#include <limits>
CGUIListLabel::CGUIListLabel(int parentID, int controlID, float posX, float posY, float width, float height, const CLabelInfo& labelInfo, const CGUIInfoLabel &info, bool alwaysScroll)
diff --git a/xbmc/guilib/GUISelectButtonControl.cpp b/xbmc/guilib/GUISelectButtonControl.cpp
index 78e8b92653..9d594e503b 100644
--- a/xbmc/guilib/GUISelectButtonControl.cpp
+++ b/xbmc/guilib/GUISelectButtonControl.cpp
@@ -20,7 +20,6 @@
#include "GUISelectButtonControl.h"
#include "GUIWindowManager.h"
-#include "utils/CharsetConverter.h"
#include "utils/TimeUtils.h"
#include "Key.h"
diff --git a/xbmc/guilib/GUISpinControl.cpp b/xbmc/guilib/GUISpinControl.cpp
index a7c890f933..660bf8e738 100644
--- a/xbmc/guilib/GUISpinControl.cpp
+++ b/xbmc/guilib/GUISpinControl.cpp
@@ -19,7 +19,6 @@
*/
#include "GUISpinControl.h"
-#include "utils/CharsetConverter.h"
#include "Key.h"
using namespace std;
diff --git a/xbmc/guilib/GUITextBox.cpp b/xbmc/guilib/GUITextBox.cpp
index 0986e56d42..6f02a84810 100644
--- a/xbmc/guilib/GUITextBox.cpp
+++ b/xbmc/guilib/GUITextBox.cpp
@@ -19,7 +19,6 @@
*/
#include "GUITextBox.h"
-#include "utils/CharsetConverter.h"
#include "GUIInfoManager.h"
#include "utils/XBMCTinyXML.h"
#include "utils/MathUtils.h"
diff --git a/xbmc/guilib/GUIToggleButtonControl.cpp b/xbmc/guilib/GUIToggleButtonControl.cpp
index 7fc4e3edc3..7a278f0511 100644
--- a/xbmc/guilib/GUIToggleButtonControl.cpp
+++ b/xbmc/guilib/GUIToggleButtonControl.cpp
@@ -21,7 +21,6 @@
#include "GUIToggleButtonControl.h"
#include "GUIWindowManager.h"
#include "GUIDialog.h"
-#include "utils/CharsetConverter.h"
#include "GUIInfoManager.h"
#include "Key.h"
diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp
index afd759a877..c589d6d597 100644
--- a/xbmc/guilib/GUIWindowManager.cpp
+++ b/xbmc/guilib/GUIWindowManager.cpp
@@ -595,16 +595,13 @@ bool CGUIWindowManager::Render()
CGUITexture::DrawQuad(*i, 0x4c00ff00);
}
- m_tracker.CleanMarkedRegions();
-
- // execute post rendering actions (finalize window closing)
- AfterRender();
-
return hasRendered;
}
void CGUIWindowManager::AfterRender()
{
+ m_tracker.CleanMarkedRegions();
+
CGUIWindow* pWindow = GetWindow(GetActiveWindow());
if (pWindow)
pWindow->AfterRender();
diff --git a/xbmc/guilib/TextureManager.cpp b/xbmc/guilib/TextureManager.cpp
index 28a8ef0cb3..93fdcd1f74 100644
--- a/xbmc/guilib/TextureManager.cpp
+++ b/xbmc/guilib/TextureManager.cpp
@@ -23,7 +23,6 @@
#include "AnimatedGif.h"
#include "GraphicContext.h"
#include "threads/SingleLock.h"
-#include "utils/CharsetConverter.h"
#include "utils/log.h"
#include "utils/URIUtils.h"
#include "addons/Skin.h"
diff --git a/xbmc/input/ButtonTranslator.cpp b/xbmc/input/ButtonTranslator.cpp
index 940a55a6ac..992a865eb0 100644
--- a/xbmc/input/ButtonTranslator.cpp
+++ b/xbmc/input/ButtonTranslator.cpp
@@ -870,7 +870,7 @@ bool CButtonTranslator::TranslateJoystickString(int window, const char* szDevice
return (action > 0);
}
-bool CButtonTranslator::TranslateTouchAction(int window, int touchAction, int touchPointers, int &action)
+bool CButtonTranslator::TranslateTouchAction(int touchAction, int touchPointers, int &window, int &action)
{
action = 0;
if (touchPointers <= 0)
@@ -881,7 +881,10 @@ bool CButtonTranslator::TranslateTouchAction(int window, int touchAction, int to
action = GetTouchActionCode(window, touchAction);
if (action <= 0)
+ {
+ window = WINDOW_INVALID;
action = GetTouchActionCode(-1, touchAction);
+ }
return action > 0;
}
diff --git a/xbmc/input/ButtonTranslator.h b/xbmc/input/ButtonTranslator.h
index 4fd02be7cb..6280ae47dc 100644
--- a/xbmc/input/ButtonTranslator.h
+++ b/xbmc/input/ButtonTranslator.h
@@ -97,7 +97,7 @@ public:
bool &fullrange);
#endif
- bool TranslateTouchAction(int window, int touchAction, int touchPointers, int &action);
+ bool TranslateTouchAction(int touchAction, int touchPointers, int &window, int &action);
private:
typedef std::multimap<uint32_t, CButtonAction> buttonMap; // our button map to fill in
diff --git a/xbmc/input/touch/generic/GenericTouchInputHandler.cpp b/xbmc/input/touch/generic/GenericTouchInputHandler.cpp
index fad609f576..90fc213238 100644
--- a/xbmc/input/touch/generic/GenericTouchInputHandler.cpp
+++ b/xbmc/input/touch/generic/GenericTouchInputHandler.cpp
@@ -212,9 +212,17 @@ bool CGenericTouchInputHandler::HandleTouchInput(TouchInput event, float x, floa
m_gestureState == TouchGestureMultiTouchDone)
break;
- triggerDetectors(event, pointer);
+ bool moving = false;
+ for (unsigned int index = 0; index < TOUCH_MAX_POINTERS; index++)
+ {
+ if (m_pointers[index].valid() && m_pointers[index].moving)
+ {
+ moving = true;
+ break;
+ }
+ }
- if (m_pointers[pointer].moving)
+ if (moving)
{
m_holdTimer->Stop();
@@ -223,6 +231,8 @@ bool CGenericTouchInputHandler::HandleTouchInput(TouchInput event, float x, floa
result = OnTouchGestureStart(m_pointers[pointer].down.x, m_pointers[pointer].down.y);
}
+ triggerDetectors(event, pointer);
+
if (m_gestureState == TouchGestureSingleTouch)
{
// Check if the touch has moved far enough to count as movement
@@ -260,7 +270,7 @@ bool CGenericTouchInputHandler::HandleTouchInput(TouchInput event, float x, floa
}
else if (m_gestureState == TouchGestureMultiTouch)
{
- if (m_pointers[pointer].moving)
+ if (moving)
result = OnMultiTouchMove(x, y,offsetX, offsetY, velocityX, velocityY, pointer);
}
else
diff --git a/xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp b/xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp
index dfc95c708d..3c34adda5a 100644
--- a/xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp
+++ b/xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp
@@ -18,22 +18,29 @@
*
*/
+#ifndef _USE_MATH_DEFINES
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
#include <stdlib.h>
#include "GenericTouchSwipeDetector.h"
// maximum time between touch down and up (in nanoseconds)
-#define SWIPE_MAX_TIME 500000000
+#define SWIPE_MAX_TIME 500000000
// maxmium swipe distance between touch down and up (in multiples of screen DPI)
-#define SWIPE_MIN_DISTANCE 0.5
-// maximum distance the touch movement may vary in a direction transversal to
-// the swipe direction
-#define SWIPE_MAX_VARIANCE 30.0
+#define SWIPE_MIN_DISTANCE 0.5
+// original maximum variance of the touch movement
+#define SWIPE_MAX_VARIANCE 0.2
+// tangens of the maximum angle (20 degrees) the touch movement may vary in a
+// direction perpendicular to the swipe direction (in radians)
+// => tan(20 deg) = tan(20 * M_PI / 180)
+#define SWIPE_MAX_VARIANCE_ANGLE 0.363970234266
CGenericTouchSwipeDetector::CGenericTouchSwipeDetector(ITouchActionHandler *handler, float dpi)
: IGenericTouchGestureDetector(handler, dpi),
m_directions(TouchMoveDirectionLeft | TouchMoveDirectionRight | TouchMoveDirectionUp | TouchMoveDirectionDown),
- m_swipeDetected(false)
+ m_swipeDetected(false), m_size(0)
{ }
bool CGenericTouchSwipeDetector::OnTouchDown(unsigned int index, const Pointer &pointer)
@@ -41,9 +48,9 @@ bool CGenericTouchSwipeDetector::OnTouchDown(unsigned int index, const Pointer &
if (index < 0 || index >= TOUCH_MAX_POINTERS)
return false;
- // only handle one-finger swipes
- if (index > 0)
- return false;
+ m_size += 1;
+ if (m_size > 1)
+ return true;
// reset all values
m_done = false;
@@ -58,8 +65,8 @@ bool CGenericTouchSwipeDetector::OnTouchUp(unsigned int index, const Pointer &po
if (index < 0 || index >= TOUCH_MAX_POINTERS)
return false;
- // only handle one-finger swipes
- if (index > 0 || m_done)
+ m_size -= 1;
+ if (m_done)
return false;
m_done = true;
@@ -78,7 +85,7 @@ bool CGenericTouchSwipeDetector::OnTouchUp(unsigned int index, const Pointer &po
pointer.velocity(velocityX, velocityY, false);
// call the OnSwipe() callback
- OnSwipe((TouchMoveDirection)m_directions, pointer.down.x, pointer.down.y, pointer.current.x, pointer.current.y, velocityX, velocityY, 1);
+ OnSwipe((TouchMoveDirection)m_directions, pointer.down.x, pointer.down.y, pointer.current.x, pointer.current.y, velocityX, velocityY, m_size + 1);
return true;
}
@@ -87,8 +94,8 @@ bool CGenericTouchSwipeDetector::OnTouchMove(unsigned int index, const Pointer &
if (index < 0 || index >= TOUCH_MAX_POINTERS)
return false;
- // only handle one-finger swipes of moved pointers
- if (index > 0 || m_done || !pointer.moving)
+ // only handle swipes of moved pointers
+ if (index >= m_size || m_done || !pointer.moving)
return false;
float deltaXmovement = pointer.current.x - pointer.last.x;
@@ -100,9 +107,9 @@ bool CGenericTouchSwipeDetector::OnTouchMove(unsigned int index, const Pointer &
m_directions &= ~TouchMoveDirectionRight;
if (deltaYmovement > 0.0f)
- m_directions &= ~TouchMoveDirectionDown;
- else if (deltaYmovement < 0.0f)
m_directions &= ~TouchMoveDirectionUp;
+ else if (deltaYmovement < 0.0f)
+ m_directions &= ~TouchMoveDirectionDown;
if (m_directions == TouchMoveDirectionNone)
{
@@ -112,11 +119,13 @@ bool CGenericTouchSwipeDetector::OnTouchMove(unsigned int index, const Pointer &
float deltaXabs = abs(pointer.current.x - pointer.down.x);
float deltaYabs = abs(pointer.current.y - pointer.down.y);
+ float varXabs = deltaYabs * SWIPE_MAX_VARIANCE_ANGLE + (m_dpi * SWIPE_MAX_VARIANCE) / 2;
+ float varYabs = deltaXabs * SWIPE_MAX_VARIANCE_ANGLE + (m_dpi * SWIPE_MAX_VARIANCE) / 2;
if (m_directions & TouchMoveDirectionLeft)
{
// check if the movement went too much in Y direction
- if (deltaYabs > SWIPE_MAX_VARIANCE)
+ if (deltaYabs > varYabs)
m_directions &= ~TouchMoveDirectionLeft;
// check if the movement went far enough in the X direction
else if (deltaXabs > m_dpi * SWIPE_MIN_DISTANCE)
@@ -126,7 +135,7 @@ bool CGenericTouchSwipeDetector::OnTouchMove(unsigned int index, const Pointer &
if (m_directions & TouchMoveDirectionRight)
{
// check if the movement went too much in Y direction
- if (deltaYabs > SWIPE_MAX_VARIANCE)
+ if (deltaYabs > varYabs)
m_directions &= ~TouchMoveDirectionRight;
// check if the movement went far enough in the X direction
else if (deltaXabs > m_dpi * SWIPE_MIN_DISTANCE)
@@ -136,7 +145,7 @@ bool CGenericTouchSwipeDetector::OnTouchMove(unsigned int index, const Pointer &
if (m_directions & TouchMoveDirectionUp)
{
// check if the movement went too much in X direction
- if (deltaXabs > SWIPE_MAX_VARIANCE)
+ if (deltaXabs > varXabs)
m_directions &= ~TouchMoveDirectionUp;
// check if the movement went far enough in the Y direction
else if (deltaYabs > m_dpi * SWIPE_MIN_DISTANCE)
@@ -146,7 +155,7 @@ bool CGenericTouchSwipeDetector::OnTouchMove(unsigned int index, const Pointer &
if (m_directions & TouchMoveDirectionDown)
{
// check if the movement went too much in X direction
- if (deltaXabs > SWIPE_MAX_VARIANCE)
+ if (deltaXabs > varXabs)
m_directions &= ~TouchMoveDirectionDown;
// check if the movement went far enough in the Y direction
else if (deltaYabs > m_dpi * SWIPE_MIN_DISTANCE)
@@ -155,3 +164,14 @@ bool CGenericTouchSwipeDetector::OnTouchMove(unsigned int index, const Pointer &
return true;
}
+
+bool CGenericTouchSwipeDetector::OnTouchUpdate(unsigned int index, const Pointer &pointer)
+{
+ if (index < 0 || index >= TOUCH_MAX_POINTERS)
+ return false;
+
+ if (m_done)
+ return true;
+
+ return OnTouchMove(index, pointer);
+}
diff --git a/xbmc/input/touch/generic/GenericTouchSwipeDetector.h b/xbmc/input/touch/generic/GenericTouchSwipeDetector.h
index caa9e2488f..06092226a0 100644
--- a/xbmc/input/touch/generic/GenericTouchSwipeDetector.h
+++ b/xbmc/input/touch/generic/GenericTouchSwipeDetector.h
@@ -37,6 +37,7 @@ public:
virtual bool OnTouchDown(unsigned int index, const Pointer &pointer);
virtual bool OnTouchUp(unsigned int index, const Pointer &pointer);
virtual bool OnTouchMove(unsigned int index, const Pointer &pointer);
+ virtual bool OnTouchUpdate(unsigned int index, const Pointer &pointer);
private:
/*!
@@ -52,4 +53,8 @@ private:
* \brief Whether a swipe gesture has been detected or not
*/
bool m_swipeDetected;
+ /*!
+ * \brief Number of active pointeres
+ */
+ unsigned int m_size;
};
diff --git a/xbmc/interfaces/Builtins.cpp b/xbmc/interfaces/Builtins.cpp
index 19ddecad32..06bcbb0de3 100644
--- a/xbmc/interfaces/Builtins.cpp
+++ b/xbmc/interfaces/Builtins.cpp
@@ -49,6 +49,8 @@
#include "utils/RssManager.h"
#include "PartyModeManager.h"
#include "settings/Settings.h"
+#include "settings/MediaSourceSettings.h"
+#include "settings/SkinSettings.h"
#include "utils/StringUtils.h"
#include "utils/URIUtils.h"
#include "Util.h"
@@ -1023,32 +1025,32 @@ int CBuiltins::Execute(const CStdString& execString)
}
else if (execute.Equals("skin.togglesetting"))
{
- int setting = g_settings.TranslateSkinBool(parameter);
- g_settings.SetSkinBool(setting, !g_settings.GetSkinBool(setting));
+ int setting = CSkinSettings::Get().TranslateBool(parameter);
+ CSkinSettings::Get().SetBool(setting, !CSkinSettings::Get().GetBool(setting));
g_settings.Save();
}
else if (execute.Equals("skin.setbool") && params.size())
{
if (params.size() > 1)
{
- int string = g_settings.TranslateSkinBool(params[0]);
- g_settings.SetSkinBool(string, params[1].CompareNoCase("true") == 0);
+ int string = CSkinSettings::Get().TranslateBool(params[0]);
+ CSkinSettings::Get().SetBool(string, params[1].CompareNoCase("true") == 0);
g_settings.Save();
return 0;
}
// default is to set it to true
- int setting = g_settings.TranslateSkinBool(params[0]);
- g_settings.SetSkinBool(setting, true);
+ int setting = CSkinSettings::Get().TranslateBool(params[0]);
+ CSkinSettings::Get().SetBool(setting, true);
g_settings.Save();
}
else if (execute.Equals("skin.reset"))
{
- g_settings.ResetSkinSetting(parameter);
+ CSkinSettings::Get().Reset(parameter);
g_settings.Save();
}
else if (execute.Equals("skin.resetsettings"))
{
- g_settings.ResetSkinSettings();
+ CSkinSettings::Get().Reset();
g_settings.Save();
}
else if (execute.Equals("skin.theme"))
@@ -1103,40 +1105,40 @@ int CBuiltins::Execute(const CStdString& execString)
int string = 0;
if (params.size() > 1)
{
- string = g_settings.TranslateSkinString(params[0]);
+ string = CSkinSettings::Get().TranslateString(params[0]);
if (execute.Equals("skin.setstring"))
{
- g_settings.SetSkinString(string, params[1]);
+ CSkinSettings::Get().SetString(string, params[1]);
g_settings.Save();
return 0;
}
}
else
- string = g_settings.TranslateSkinString(params[0]);
- CStdString value = g_settings.GetSkinString(string);
+ string = CSkinSettings::Get().TranslateString(params[0]);
+ CStdString value = CSkinSettings::Get().GetString(string);
VECSOURCES localShares;
g_mediaManager.GetLocalDrives(localShares);
if (execute.Equals("skin.setstring"))
{
if (CGUIKeyboardFactory::ShowAndGetInput(value, g_localizeStrings.Get(1029), true))
- g_settings.SetSkinString(string, value);
+ CSkinSettings::Get().SetString(string, value);
}
else if (execute.Equals("skin.setnumeric"))
{
if (CGUIDialogNumeric::ShowAndGetNumber(value, g_localizeStrings.Get(611)))
- g_settings.SetSkinString(string, value);
+ CSkinSettings::Get().SetString(string, value);
}
else if (execute.Equals("skin.setimage"))
{
if (CGUIDialogFileBrowser::ShowAndGetImage(localShares, g_localizeStrings.Get(1030), value))
- g_settings.SetSkinString(string, value);
+ CSkinSettings::Get().SetString(string, value);
}
else if (execute.Equals("skin.setlargeimage"))
{
- VECSOURCES *shares = g_settings.GetSourcesFromType("pictures");
+ VECSOURCES *shares = CMediaSourceSettings::Get().GetSources("pictures");
if (!shares) shares = &localShares;
if (CGUIDialogFileBrowser::ShowAndGetImage(*shares, g_localizeStrings.Get(1030), value))
- g_settings.SetSkinString(string, value);
+ CSkinSettings::Get().SetString(string, value);
}
else if (execute.Equals("skin.setfile"))
{
@@ -1163,9 +1165,9 @@ int CBuiltins::Execute(const CStdString& execString)
if (CGUIDialogFileBrowser::ShowAndGetFile(url.Get(), strMask, TranslateType(type, true), replace, true, true, true))
{
if (replace.Mid(0,9).Equals("addons://"))
- g_settings.SetSkinString(string, URIUtils::GetFileName(replace));
+ CSkinSettings::Get().SetString(string, URIUtils::GetFileName(replace));
else
- g_settings.SetSkinString(string, replace);
+ CSkinSettings::Get().SetString(string, replace);
}
}
else
@@ -1184,7 +1186,7 @@ int CBuiltins::Execute(const CStdString& execString)
}
}
if (CGUIDialogFileBrowser::ShowAndGetFile(localShares, strMask, g_localizeStrings.Get(1033), value))
- g_settings.SetSkinString(string, value);
+ CSkinSettings::Get().SetString(string, value);
}
}
else // execute.Equals("skin.setpath"))
@@ -1204,13 +1206,13 @@ int CBuiltins::Execute(const CStdString& execString)
}
}
if (CGUIDialogFileBrowser::ShowAndGetDirectory(localShares, g_localizeStrings.Get(1031), value))
- g_settings.SetSkinString(string, value);
+ CSkinSettings::Get().SetString(string, value);
}
g_settings.Save();
}
else if (execute.Equals("skin.setaddon") && params.size() > 1)
{
- int string = g_settings.TranslateSkinString(params[0]);
+ int string = CSkinSettings::Get().TranslateString(params[0]);
vector<ADDON::TYPE> types;
for (unsigned int i = 1 ; i < params.size() ; i++)
{
@@ -1221,7 +1223,7 @@ int CBuiltins::Execute(const CStdString& execString)
CStdString result;
if (types.size() > 0 && CGUIWindowAddonBrowser::SelectAddonID(types, result, true) == 1)
{
- g_settings.SetSkinString(string, result);
+ CSkinSettings::Get().SetString(string, result);
g_settings.Save();
}
}
diff --git a/xbmc/interfaces/json-rpc/FileOperations.cpp b/xbmc/interfaces/json-rpc/FileOperations.cpp
index cfc8717f1f..0b8ca264ee 100644
--- a/xbmc/interfaces/json-rpc/FileOperations.cpp
+++ b/xbmc/interfaces/json-rpc/FileOperations.cpp
@@ -27,6 +27,7 @@
#include "filesystem/File.h"
#include "FileItem.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSourceSettings.h"
#include "Util.h"
#include "URL.h"
#include "utils/URIUtils.h"
@@ -42,7 +43,7 @@ JSONRPC_STATUS CFileOperations::GetRootDirectory(const CStdString &method, ITran
CStdString media = parameterObject["media"].asString();
media = media.ToLower();
- VECSOURCES *sources = g_settings.GetSourcesFromType(media);
+ VECSOURCES *sources = CMediaSourceSettings::Get().GetSources(media);
if (sources)
{
CFileItemList items;
@@ -87,7 +88,7 @@ JSONRPC_STATUS CFileOperations::GetDirectory(const CStdString &method, ITranspor
bool isSource;
for (unsigned int index = 0; index < SourcesSize; index++)
{
- sources = g_settings.GetSourcesFromType(SourceNames[index]);
+ sources = CMediaSourceSettings::Get().GetSources(SourceNames[index]);
int sourceIndex = CUtil::GetMatchingSource(strPath, *sources, isSource);
if (sourceIndex >= 0 && sourceIndex < (int)sources->size() && sources->at(sourceIndex).m_iHasLock == 2)
return InvalidParams;
diff --git a/xbmc/interfaces/json-rpc/InputOperations.cpp b/xbmc/interfaces/json-rpc/InputOperations.cpp
index 321b0a8c9a..215fbe6256 100644
--- a/xbmc/interfaces/json-rpc/InputOperations.cpp
+++ b/xbmc/interfaces/json-rpc/InputOperations.cpp
@@ -28,7 +28,6 @@
#include "input/XBMC_keyboard.h"
#include "input/XBMC_vkeys.h"
#include "threads/SingleLock.h"
-#include "utils/CharsetConverter.h"
using namespace JSONRPC;
diff --git a/xbmc/interfaces/legacy/Dialog.cpp b/xbmc/interfaces/legacy/Dialog.cpp
index af0941c1b6..d360223cbb 100644
--- a/xbmc/interfaces/legacy/Dialog.cpp
+++ b/xbmc/interfaces/legacy/Dialog.cpp
@@ -8,6 +8,7 @@
#include "guilib/GUIWindowManager.h"
#include "dialogs/GUIDialogFileBrowser.h"
#include "dialogs/GUIDialogNumeric.h"
+#include "settings/MediaSourceSettings.h"
#include "settings/Settings.h"
#define ACTIVE_WINDOW g_windowManager.GetActiveWindow()
@@ -132,7 +133,7 @@ namespace XBMCAddon
DelayedCallGuard dcguard(languageHook);
CStdString value;
std::string mask = maskparam;
- VECSOURCES *shares = g_settings.GetSourcesFromType(s_shares);
+ VECSOURCES *shares = CMediaSourceSettings::Get().GetSources(s_shares);
if (!shares)
throw WindowException("Error: GetSourcesFromType given %s is NULL.",s_shares.c_str());
@@ -154,7 +155,7 @@ namespace XBMCAddon
bool useFileDirectories, const String& defaultt ) throw (WindowException)
{
DelayedCallGuard dcguard(languageHook);
- VECSOURCES *shares = g_settings.GetSourcesFromType(s_shares);
+ VECSOURCES *shares = CMediaSourceSettings::Get().GetSources(s_shares);
CStdStringArray tmpret;
String lmask = mask;
if (!shares)
@@ -305,6 +306,66 @@ namespace XBMCAddon
{
return dlg->IsCanceled();
}
+
+ DialogProgressBG::~DialogProgressBG() { TRACE; deallocating(); }
+
+ void DialogProgressBG::deallocating()
+ {
+ TRACE;
+
+ if (dlg)
+ {
+ DelayedCallGuard dg;
+ dlg->Close();
+ }
+ }
+
+ void DialogProgressBG::create(const String& heading, const String& message) throw (WindowException)
+ {
+ DelayedCallGuard dcguard(languageHook);
+ CGUIDialogExtendedProgressBar* pDialog =
+ (CGUIDialogExtendedProgressBar*)g_windowManager.GetWindow(WINDOW_DIALOG_EXT_PROGRESS);
+
+ if (pDialog == NULL)
+ throw WindowException("Error: Window is NULL, this is not possible :-)");
+
+ CGUIDialogProgressBarHandle* pHandle = pDialog->GetHandle(heading);
+
+ dlg = pDialog;
+ handle = pHandle;
+
+ pHandle->SetTitle(heading);
+ if (!message.empty())
+ pHandle->SetText(message);
+ }
+
+ void DialogProgressBG::update(int percent, const String& heading, const String& message) throw (WindowException)
+ {
+ DelayedCallGuard dcguard(languageHook);
+ CGUIDialogExtendedProgressBar* pDialog = dlg;
+ CGUIDialogProgressBarHandle* pHandle = handle;
+
+ if (pDialog == NULL)
+ throw WindowException("Error: Window is NULL, this is not possible :-)");
+
+ if (percent >= 0 && percent <= 100)
+ pHandle->SetPercentage((float)percent);
+ if (!heading.empty())
+ pHandle->SetTitle(heading);
+ if (!message.empty())
+ pHandle->SetText(message);
+ }
+
+ void DialogProgressBG::close()
+ {
+ DelayedCallGuard dcguard(languageHook);
+ handle->MarkFinished();
+ }
+
+ bool DialogProgressBG::isFinished()
+ {
+ return handle->IsFinished();
+ }
+
}
}
-
diff --git a/xbmc/interfaces/legacy/Dialog.h b/xbmc/interfaces/legacy/Dialog.h
index 66c6269717..f64b6eb1a7 100644
--- a/xbmc/interfaces/legacy/Dialog.h
+++ b/xbmc/interfaces/legacy/Dialog.h
@@ -28,6 +28,7 @@
#include "AddonString.h"
#include "ApplicationMessenger.h"
#include "dialogs/GUIDialogProgress.h"
+#include "dialogs/GUIDialogExtendedProgressBar.h"
#include "Alternative.h"
namespace XBMCAddon
@@ -285,5 +286,68 @@ namespace XBMCAddon
bool iscanceled();
};
+ /**
+ * DialogProgressBG class
+ */
+ class DialogProgressBG : public AddonClass
+ {
+ CGUIDialogExtendedProgressBar* dlg;
+ CGUIDialogProgressBarHandle* handle;
+
+ protected:
+ virtual void deallocating();
+
+ public:
+
+ DialogProgressBG() : AddonClass("DialogProgressBG"), dlg(NULL), handle(NULL) {}
+ virtual ~DialogProgressBG();
+
+
+ /**
+ * create(heading[, message]) -- Create and show a background progress dialog.\n
+ *\n
+ * heading : string or unicode - dialog heading\n
+ * message : [opt] string or unicode - message text\n
+ *\n
+ * *Note, 'heading' is used for the dialog's id. Use a unique heading.\n
+ * Use update() to update heading, message and progressbar.\n
+ *\n
+ * example:\n
+ * - pDialog = xbmcgui.DialogProgressBG()\n
+ * - pDialog.create('Movie Trailers', 'Downloading Monsters Inc. ...')\n
+ */
+ void create(const String& heading, const String& message = emptyString) throw (WindowException);
+
+ /**
+ * update([percent, heading, message]) -- Updates the background progress dialog.\n
+ *\n
+ * percent : [opt] integer - percent complete. (0:100)\n
+ * heading : [opt] string or unicode - dialog heading\n
+ * message : [opt] string or unicode - message text\n
+ *\n
+ * *Note, To clear heading or message, you must pass a blank character.\n
+ *\n
+ * example:\n
+ * - pDialog.update(25, message='Downloading Finding Nemo ...')\n
+ */
+ void update(int percent = 0, const String& heading = emptyString, const String& message = emptyString) throw (WindowException);
+
+ /**
+ * close() -- Close the background progress dialog\n
+ *\n
+ * example:\n
+ * - pDialog.close()\n
+ */
+ void close();
+
+ /**
+ * isFinished() -- Returns True if the background dialog is active.\n
+ *\n
+ * example:\n
+ * - if (pDialog.isFinished()): return\n
+ */
+ bool isFinished();
+ };
+
}
}
diff --git a/xbmc/interfaces/legacy/ModuleXbmc.h b/xbmc/interfaces/legacy/ModuleXbmc.h
index 6b074f7ba6..6c8cf09700 100644
--- a/xbmc/interfaces/legacy/ModuleXbmc.h
+++ b/xbmc/interfaces/legacy/ModuleXbmc.h
@@ -58,7 +58,7 @@ namespace XBMCAddon
void log(const char* msg, int level = lLOGNOTICE);
/**
- * Shutdown() -- Shutdown the xbox.
+ * Shutdown() -- Shutdown the htpc.
*
* example:
* - xbmc.shutdown()
@@ -66,7 +66,7 @@ namespace XBMCAddon
void shutdown();
/**
- * restart() -- Restart the xbox.
+ * restart() -- Restart the htpc.
* example:
* - xbmc.restart()
*/
@@ -287,9 +287,9 @@ namespace XBMCAddon
*
* path : string or unicode - Path to format
*
- * *Note, Only useful if you are coding for both Linux and Windows/Xbox.
+ * *Note, Only useful if you are coding for both Linux and Windows.
* e.g. Converts 'special://masterprofile/script_data' -> '/home/user/XBMC/UserData/script_data'
- * on Linux. Would return 'special://masterprofile/script_data' on the Xbox.
+ * on Linux.
*
* example:
* - fpath = xbmc.translatePath('special://masterprofile/script_data')
@@ -312,7 +312,7 @@ namespace XBMCAddon
*
* path : string or unicode - Path to format
*
- * *Note, Only useful if you are coding for both Linux and Windows/Xbox for fixing slash problems.
+ * *Note, Only useful if you are coding for both Linux and Windows for fixing slash problems.
* e.g. Corrects 'Z://something' -> 'Z:\\something'
*
* example:
diff --git a/xbmc/interfaces/legacy/Player.cpp b/xbmc/interfaces/legacy/Player.cpp
index 10f789cf91..751ccdb896 100644
--- a/xbmc/interfaces/legacy/Player.cpp
+++ b/xbmc/interfaces/legacy/Player.cpp
@@ -24,6 +24,7 @@
#include "PlayList.h"
#include "PlayListPlayer.h"
#include "settings/Settings.h"
+#include "settings/MediaSettings.h"
#include "Application.h"
#include "ApplicationMessenger.h"
#include "GUIInfoManager.h"
@@ -372,8 +373,8 @@ namespace XBMCAddon
{
g_application.m_pPlayer->SetSubtitle(nStream);
g_application.m_pPlayer->SetSubtitleVisible(true);
- g_settings.m_currentVideoSettings.m_SubtitleDelay = 0.0f;
- g_application.m_pPlayer->SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay = 0.0f;
+ g_application.m_pPlayer->SetSubTitleDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
}
}
}
@@ -383,7 +384,7 @@ namespace XBMCAddon
TRACE;
if (g_application.m_pPlayer)
{
- g_settings.m_currentVideoSettings.m_SubtitleOn = bVisible != 0;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = bVisible != 0;
g_application.m_pPlayer->SetSubtitleVisible(bVisible != 0);
}
}
@@ -411,7 +412,7 @@ namespace XBMCAddon
CLog::Log(LOGWARNING,"'xbmc.Player().disableSubtitles()' is deprecated and will be removed in future releases, please use 'xbmc.Player().showSubtitles(false)' instead");
if (g_application.m_pPlayer)
{
- g_settings.m_currentVideoSettings.m_SubtitleOn = false;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = false;
g_application.m_pPlayer->SetSubtitleVisible(false);
}
}
diff --git a/xbmc/music/GUIViewStateMusic.cpp b/xbmc/music/GUIViewStateMusic.cpp
index 03cb0005f7..2046b02e14 100644
--- a/xbmc/music/GUIViewStateMusic.cpp
+++ b/xbmc/music/GUIViewStateMusic.cpp
@@ -23,12 +23,14 @@
#include "video/VideoDatabase.h"
#include "settings/GUISettings.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSourceSettings.h"
#include "settings/Settings.h"
#include "FileItem.h"
#include "guilib/WindowIDs.h"
#include "Util.h"
#include "guilib/LocalizeStrings.h"
#include "utils/log.h"
+#include "view/ViewStateSettings.h"
#include "filesystem/Directory.h"
#include "filesystem/MusicDatabaseDirectory.h"
@@ -92,16 +94,16 @@ CGUIViewStateMusicSearch::CGUIViewStateMusicSearch(const CFileItemList& items) :
SetSortMethod(SORT_METHOD_TITLE);
}
- SetViewAsControl(g_settings.m_viewStateMusicNavSongs.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateMusicNavSongs.m_sortOrder);
+ CViewState *viewState = CViewStateSettings::Get().Get("musicnavsongs");
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
LoadViewState(items.GetPath(), WINDOW_MUSIC_NAV);
}
void CGUIViewStateMusicSearch::SaveViewState()
{
- SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, &g_settings.m_viewStateMusicNavSongs);
+ SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, CViewStateSettings::Get().Get("musicnavsongs"));
}
CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& items) : CGUIViewStateWindowMusic(items)
@@ -180,10 +182,10 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
AddSortMethod(SORT_METHOD_ARTIST, 557, LABEL_MASKS("%F", "", "%A", "")); // Filename, empty | Artist, empty
SetSortMethod(SORT_METHOD_ARTIST);
}
-
- SetViewAsControl(g_settings.m_viewStateMusicNavArtists.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateMusicNavArtists.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("musicnavartists");
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_ALBUM_COMPILATIONS:
@@ -205,11 +207,10 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
// year
AddSortMethod(SORT_METHOD_YEAR, 562, LABEL_MASKS("%F", "", strAlbumLeft, strAlbumRight));
- SetSortMethod(g_settings.m_viewStateMusicNavAlbums.m_sortMethod);
-
- SetViewAsControl(g_settings.m_viewStateMusicNavAlbums.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateMusicNavAlbums.m_sortOrder);
+ CViewState *viewState = CViewStateSettings::Get().Get("musicnavalbums");
+ SetSortMethod(viewState->m_sortMethod);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_ALBUM_RECENTLY_ADDED:
@@ -217,7 +218,7 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
AddSortMethod(SORT_METHOD_NONE, 552, LABEL_MASKS("%F", "", strAlbumLeft, strAlbumRight)); // Filename, empty | Userdefined, Userdefined
SetSortMethod(SORT_METHOD_NONE);
- SetViewAsControl(g_settings.m_viewStateMusicNavAlbums.m_viewMode);
+ SetViewAsControl(CViewStateSettings::Get().Get("musicnavalbums")->m_viewMode);
SetSortOrder(SortOrderNone);
}
@@ -227,7 +228,7 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
AddSortMethod(SORT_METHOD_NONE, 552, LABEL_MASKS(strTrackLeft, strTrackRight)); // Userdefined, Userdefined | empty, empty
SetSortMethod(SORT_METHOD_NONE);
- SetViewAsControl(g_settings.m_viewStateMusicNavSongs.m_viewMode);
+ SetViewAsControl(CViewStateSettings::Get().Get("musicnavsongs")->m_viewMode);
SetSortOrder(SortOrderNone);
}
@@ -237,7 +238,7 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
AddSortMethod(SORT_METHOD_NONE, 551, LABEL_MASKS("%F", "", strAlbumLeft, strAlbumRight)); // Filename, empty | Userdefined, Userdefined
SetSortMethod(SORT_METHOD_NONE);
- SetViewAsControl(g_settings.m_viewStateMusicNavAlbums.m_viewMode);
+ SetViewAsControl(CViewStateSettings::Get().Get("musicnavalbums")->m_viewMode);
SetSortOrder(SortOrderNone);
}
@@ -247,7 +248,7 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
AddSortMethod(SORT_METHOD_NONE, 551, LABEL_MASKS(strTrackLeft, strTrackRight)); // Userdefined, Userdefined | empty, empty
SetSortMethod(SORT_METHOD_NONE);
- SetViewAsControl(g_settings.m_viewStateMusicNavAlbums.m_viewMode);
+ SetViewAsControl(CViewStateSettings::Get().Get("musicnavalbums")->m_viewMode);
SetSortOrder(SortOrderNone);
}
@@ -278,12 +279,11 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
}
AddSortMethod(SORT_METHOD_DURATION, 180, LABEL_MASKS("%T - %A", "%D")); // Titel, Artist, Duration| empty, empty
AddSortMethod(SORT_METHOD_SONG_RATING, 563, LABEL_MASKS("%T - %A", "%R")); // Title - Artist, Rating
-
- SetSortMethod(g_settings.m_viewStateMusicNavSongs.m_sortMethod);
-
- SetViewAsControl(g_settings.m_viewStateMusicNavSongs.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateMusicNavSongs.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("musicnavsongs");
+ SetSortMethod(viewState->m_sortMethod);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_ALBUM_COMPILATIONS_SONGS:
@@ -309,19 +309,19 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
AddSortMethod(SORT_METHOD_DURATION, 180, LABEL_MASKS("%T - %A", "%D")); // Titel, Artist, Duration| empty, empty
AddSortMethod(SORT_METHOD_SONG_RATING, 563, LABEL_MASKS("%T - %A", "%R")); // Title - Artist, Rating
AddSortMethod(SORT_METHOD_YEAR, 562, LABEL_MASKS("%T - %A", "%Y")); // Title, Artist, Year
-
+
+ CViewState *viewState = CViewStateSettings::Get().Get("musicnavsongs");
// the "All Albums" entries always default to SORT_METHOD_ALBUM as this is most logical - user can always
// change it and the change will be saved for this particular path
if (dir.IsAllItem(items.GetPath()))
SetSortMethod(g_guiSettings.GetBool("filelists.ignorethewhensorting") ? SORT_METHOD_ALBUM_IGNORE_THE : SORT_METHOD_ALBUM);
else
- SetSortMethod(g_settings.m_viewStateMusicNavSongs.m_sortMethod);
+ SetSortMethod(viewState->m_sortMethod);
AddSortMethod(SORT_METHOD_PLAYCOUNT, 567, LABEL_MASKS("%T - %A", "%V")); // Titel - Artist, PlayCount
- SetViewAsControl(g_settings.m_viewStateMusicNavSongs.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateMusicNavSongs.m_sortOrder);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_SONG_TOP100:
@@ -329,7 +329,7 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
AddSortMethod(SORT_METHOD_NONE, 576, LABEL_MASKS("%T - %A", "%V"));
SetSortMethod(SORT_METHOD_PLAYCOUNT);
- SetViewAsControl(g_settings.m_viewStateMusicNavSongs.m_viewMode);
+ SetViewAsControl(CViewStateSettings::Get().Get("musicnavsongs")->m_viewMode);
SetSortOrder(SortOrderNone);
}
@@ -349,12 +349,12 @@ void CGUIViewStateMusicDatabase::SaveViewState()
switch (NodeType)
{
case NODE_TYPE_ARTIST:
- SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, &g_settings.m_viewStateMusicNavArtists);
+ SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, CViewStateSettings::Get().Get("musicnavartists"));
break;
case NODE_TYPE_ALBUM_COMPILATIONS:
case NODE_TYPE_ALBUM:
case NODE_TYPE_YEAR_ALBUM:
- SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, &g_settings.m_viewStateMusicNavAlbums);
+ SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, CViewStateSettings::Get().Get("musicnavalbums"));
break;
case NODE_TYPE_ALBUM_RECENTLY_ADDED:
case NODE_TYPE_ALBUM_TOP100:
@@ -365,7 +365,7 @@ void CGUIViewStateMusicDatabase::SaveViewState()
case NODE_TYPE_ALBUM_COMPILATIONS_SONGS:
case NODE_TYPE_SONG:
case NODE_TYPE_YEAR_SONG:
- SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, &g_settings.m_viewStateMusicNavSongs);
+ SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, CViewStateSettings::Get().Get("musicnavsongs"));
break;
case NODE_TYPE_ALBUM_RECENTLY_PLAYED_SONGS:
case NODE_TYPE_ALBUM_RECENTLY_ADDED_SONGS:
@@ -405,7 +405,7 @@ CGUIViewStateMusicSmartPlaylist::CGUIViewStateMusicSmartPlaylist(const CFileItem
AddSortMethod(SORT_METHOD_SONG_RATING, 563, LABEL_MASKS("%T - %A", "%R")); // Titel, Artist, Rating| empty, empty
AddPlaylistOrder(items, LABEL_MASKS(strTrackLeft, strTrackRight));
- SetViewAsControl(g_settings.m_viewStateMusicNavSongs.m_viewMode);
+ SetViewAsControl(CViewStateSettings::Get().Get("musicnavsongs")->m_viewMode);
}
else if (items.GetContent() == "albums")
{
@@ -433,7 +433,7 @@ CGUIViewStateMusicSmartPlaylist::CGUIViewStateMusicSmartPlaylist(const CFileItem
AddPlaylistOrder(items, LABEL_MASKS("%F", "", strAlbumLeft, strAlbumRight));
- SetViewAsControl(g_settings.m_viewStateMusicNavAlbums.m_viewMode);
+ SetViewAsControl(CViewStateSettings::Get().Get("musicnavalbums")->m_viewMode);
}
else
{
@@ -445,7 +445,7 @@ CGUIViewStateMusicSmartPlaylist::CGUIViewStateMusicSmartPlaylist(const CFileItem
void CGUIViewStateMusicSmartPlaylist::SaveViewState()
{
- SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, &g_settings.m_viewStateMusicNavSongs);
+ SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, CViewStateSettings::Get().Get("musicnavsongs"));
}
CGUIViewStateMusicPlaylist::CGUIViewStateMusicPlaylist(const CFileItemList& items) : CGUIViewStateWindowMusic(items)
@@ -473,8 +473,9 @@ CGUIViewStateMusicPlaylist::CGUIViewStateMusicPlaylist(const CFileItemList& item
AddSortMethod(SORT_METHOD_SONG_RATING, 563, LABEL_MASKS("%T - %A", "%R")); // Titel, Artist, Rating| empty, empty
SetSortMethod(SORT_METHOD_PLAYLIST_ORDER);
- SetViewAsControl(g_settings.m_viewStateMusicFiles.m_viewMode);
- SetSortOrder(g_settings.m_viewStateMusicFiles.m_sortOrder);
+ CViewState *viewState = CViewStateSettings::Get().Get("musicfiles");
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
LoadViewState(items.GetPath(), WINDOW_MUSIC_FILES);
}
@@ -548,10 +549,14 @@ void CGUIViewStateWindowMusicNav::SaveViewState()
void CGUIViewStateWindowMusicNav::AddOnlineShares()
{
- if (!g_advancedSettings.m_bVirtualShares) return;
- for (int i = 0; i < (int)g_settings.m_musicSources.size(); ++i)
+ if (!g_advancedSettings.m_bVirtualShares)
+ return;
+
+ VECSOURCES *musicSources = CMediaSourceSettings::Get().GetSources("music");
+
+ for (int i = 0; i < (int)musicSources->size(); ++i)
{
- CMediaSource share = g_settings.m_musicSources.at(i);
+ CMediaSource share = musicSources->at(i);
}
}
@@ -636,22 +641,25 @@ CGUIViewStateWindowMusicSongs::CGUIViewStateWindowMusicSongs(const CFileItemList
AddSortMethod(SORT_METHOD_DATE, 552, LABEL_MASKS(strTrackLeft, "%J", "%L", "%J")); // Userdefined, Date | FolderName, Date
AddSortMethod(SORT_METHOD_FILE, 561, LABEL_MASKS(strTrackLeft, strTrackRight, "%L", "")); // Userdefined, Userdefined | FolderName, empty
AddSortMethod(SORT_METHOD_LISTENERS,20455,LABEL_MASKS(strTrackLeft, "%W", "%L", "%W"));
- SetSortMethod(g_settings.m_viewStateMusicFiles.m_sortMethod);
- SetViewAsControl(g_settings.m_viewStateMusicFiles.m_viewMode);
- SetSortOrder(g_settings.m_viewStateMusicFiles.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("musicfiles");
+ SetSortMethod(viewState->m_sortMethod);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
LoadViewState(items.GetPath(), WINDOW_MUSIC_FILES);
}
void CGUIViewStateWindowMusicSongs::SaveViewState()
{
- SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_FILES, &g_settings.m_viewStateMusicFiles);
+ SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_FILES, CViewStateSettings::Get().Get("musicfiles"));
}
VECSOURCES& CGUIViewStateWindowMusicSongs::GetSources()
{
- AddOrReplace(g_settings.m_musicSources, CGUIViewStateWindowMusic::GetSources());
- return g_settings.m_musicSources;
+ VECSOURCES *musicSources = CMediaSourceSettings::Get().GetSources("music");
+ AddOrReplace(*musicSources, CGUIViewStateWindowMusic::GetSources());
+ return *musicSources;
}
CGUIViewStateWindowMusicPlaylist::CGUIViewStateWindowMusicPlaylist(const CFileItemList& items) : CGUIViewStateWindowMusic(items)
diff --git a/xbmc/music/dialogs/GUIDialogMusicInfo.cpp b/xbmc/music/dialogs/GUIDialogMusicInfo.cpp
index 70f98cc90c..9f588bf218 100644
--- a/xbmc/music/dialogs/GUIDialogMusicInfo.cpp
+++ b/xbmc/music/dialogs/GUIDialogMusicInfo.cpp
@@ -33,6 +33,7 @@
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSourceSettings.h"
#include "guilib/Key.h"
#include "guilib/LocalizeStrings.h"
#include "utils/log.h"
@@ -396,7 +397,7 @@ void CGUIDialogMusicInfo::OnGetThumb()
CStdString result;
bool flip=false;
- VECSOURCES sources(g_settings.m_musicSources);
+ VECSOURCES sources(*CMediaSourceSettings::Get().GetSources("music"));
AddItemPathToFileBrowserSources(sources, *m_albumItem);
g_mediaManager.GetLocalDrives(sources);
if (!CGUIDialogFileBrowser::ShowAndGetImage(items, sources, g_localizeStrings.Get(1030), result, &flip))
@@ -493,7 +494,7 @@ void CGUIDialogMusicInfo::OnGetFanart()
}
CStdString result;
- VECSOURCES sources(g_settings.m_musicSources);
+ VECSOURCES sources(*CMediaSourceSettings::Get().GetSources("music"));
g_mediaManager.GetLocalDrives(sources);
bool flip=false;
if (!CGUIDialogFileBrowser::ShowAndGetImage(items, sources, g_localizeStrings.Get(20437), result, &flip, 20445))
diff --git a/xbmc/music/dialogs/GUIDialogSongInfo.cpp b/xbmc/music/dialogs/GUIDialogSongInfo.cpp
index c0fa47579c..c5f9f4517c 100644
--- a/xbmc/music/dialogs/GUIDialogSongInfo.cpp
+++ b/xbmc/music/dialogs/GUIDialogSongInfo.cpp
@@ -35,6 +35,7 @@
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSourceSettings.h"
#include "guilib/LocalizeStrings.h"
#include "TextureCache.h"
#include "music/Album.h"
@@ -289,7 +290,7 @@ void CGUIDialogSongInfo::OnGetThumb()
}
CStdString result;
- VECSOURCES sources(g_settings.m_musicSources);
+ VECSOURCES sources(*CMediaSourceSettings::Get().GetSources("music"));
CGUIDialogMusicInfo::AddItemPathToFileBrowserSources(sources, *m_song);
g_mediaManager.GetLocalDrives(sources);
if (!CGUIDialogFileBrowser::ShowAndGetImage(items, sources, g_localizeStrings.Get(1030), result))
diff --git a/xbmc/music/infoscanner/MusicInfoScraper.cpp b/xbmc/music/infoscanner/MusicInfoScraper.cpp
index d56165ec33..d61bb1317d 100644
--- a/xbmc/music/infoscanner/MusicInfoScraper.cpp
+++ b/xbmc/music/infoscanner/MusicInfoScraper.cpp
@@ -19,7 +19,6 @@
*/
#include "MusicInfoScraper.h"
-#include "utils/CharsetConverter.h"
#include "utils/log.h"
#include "filesystem/CurlFile.h"
diff --git a/xbmc/music/tags/TagLoaderTagLib.cpp b/xbmc/music/tags/TagLoaderTagLib.cpp
index c6ac758df9..6b8830214f 100644
--- a/xbmc/music/tags/TagLoaderTagLib.cpp
+++ b/xbmc/music/tags/TagLoaderTagLib.cpp
@@ -262,7 +262,7 @@ bool CTagLoaderTagLib::ParseASF(ASF::Tag *asf, EmbeddedArt *art, CMusicInfoTag&
else if (it->first == "WM/AlbumArtistSortOrder") {} // Known unsupported, supress warnings
else if (it->first == "WM/ArtistSortOrder") {} // Known unsupported, supress warnings
else if (it->first == "WM/Script") {} // Known unsupported, supress warnings
- else if (it->first == "WM/Year") tag.SetYear(it->second.front().toUInt());
+ else if (it->first == "WM/Year") tag.SetYear(atoi(it->second.front().toString().toCString(true)));
else if (it->first == "MusicBrainz/Artist Id") tag.SetMusicBrainzArtistID(it->second.front().toString().to8Bit(true));
else if (it->first == "MusicBrainz/Album Id") tag.SetMusicBrainzAlbumID(it->second.front().toString().to8Bit(true));
else if (it->first == "MusicBrainz/Album Artist Id") tag.SetMusicBrainzAlbumArtistID(it->second.front().toString().to8Bit(true));
@@ -284,6 +284,9 @@ bool CTagLoaderTagLib::ParseASF(ASF::Tag *asf, EmbeddedArt *art, CMusicInfoTag&
else if (g_advancedSettings.m_logLevel == LOG_LEVEL_MAX)
CLog::Log(LOGDEBUG, "unrecognized ASF tag name: %s", it->first.toCString(true));
}
+ // artist may be specified in the ContentDescription block rather than using the 'Author' attribute.
+ if (tag.GetArtist().empty())
+ tag.SetArtist(asf->artist().toCString(true));
tag.SetLoaded(true);
return true;
}
diff --git a/xbmc/music/windows/GUIWindowMusicSongs.cpp b/xbmc/music/windows/GUIWindowMusicSongs.cpp
index f346483018..46c8d4c6dc 100644
--- a/xbmc/music/windows/GUIWindowMusicSongs.cpp
+++ b/xbmc/music/windows/GUIWindowMusicSongs.cpp
@@ -32,6 +32,7 @@
#include "storage/MediaManager.h"
#include "settings/Settings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSourceSettings.h"
#include "guilib/Key.h"
#include "guilib/LocalizeStrings.h"
#include "utils/log.h"
@@ -81,7 +82,7 @@ bool CGUIWindowMusicSongs::OnMessage(CGUIMessage& message)
// is this the first time the window is opened?
if (m_vecItems->GetPath() == "?" && message.GetStringParam().IsEmpty())
- message.SetStringParam(g_settings.m_defaultMusicSource);
+ message.SetStringParam(CMediaSourceSettings::Get().GetDefaultSource("music"));
return CGUIWindowMusicBase::OnMessage(message);
}
@@ -200,7 +201,7 @@ bool CGUIWindowMusicSongs::GetDirectory(const CStdString &strDirectory, CFileIte
items.FilterCueItems();
CStdString label;
- if (items.GetLabel().IsEmpty() && m_rootDir.IsSource(items.GetPath(), g_settings.GetSourcesFromType("music"), &label))
+ if (items.GetLabel().IsEmpty() && m_rootDir.IsSource(items.GetPath(), CMediaSourceSettings::Get().GetSources("music"), &label))
items.SetLabel(label);
return true;
diff --git a/xbmc/music/windows/GUIWindowVisualisation.cpp b/xbmc/music/windows/GUIWindowVisualisation.cpp
index da9dcfcc25..9f1793b04d 100644
--- a/xbmc/music/windows/GUIWindowVisualisation.cpp
+++ b/xbmc/music/windows/GUIWindowVisualisation.cpp
@@ -198,6 +198,8 @@ EVENT_RESULT CGUIWindowVisualisation::OnMouseEvent(const CPoint &point, const CM
OnAction(CAction(ACTION_SHOW_GUI));
return EVENT_RESULT_HANDLED;
}
+ if (event.m_id == ACTION_GESTURE_NOTIFY)
+ return EVENT_RESULT_UNHANDLED;
if (event.m_id != ACTION_MOUSE_MOVE || event.m_offsetX || event.m_offsetY)
{ // some other mouse action has occurred - bring up the OSD
CGUIDialog *pOSD = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_MUSIC_OSD);
diff --git a/xbmc/network/AirPlayServer.cpp b/xbmc/network/AirPlayServer.cpp
index 11daa9755b..e39d917116 100644
--- a/xbmc/network/AirPlayServer.cpp
+++ b/xbmc/network/AirPlayServer.cpp
@@ -38,6 +38,9 @@
#include "guilib/GUIWindowManager.h"
#include "URL.h"
#include "cores/IPlayer.h"
+#include "interfaces/AnnouncementManager.h"
+
+using namespace ANNOUNCEMENT;
#ifdef TARGET_WINDOWS
#define close closesocket
@@ -134,6 +137,8 @@ const char *eventStrings[] = {"playing", "paused", "loading", "stopped"};
"<dict>\r\n"\
"<key>category</key>\r\n"\
"<string>video</string>\r\n"\
+"<key>sessionID</key>\r\n"\
+"<integer>%d</integer>\r\n"\
"<key>state</key>\r\n"\
"<string>%s</string>\r\n"\
"</dict>\r\n"\
@@ -142,6 +147,26 @@ const char *eventStrings[] = {"playing", "paused", "loading", "stopped"};
#define AUTH_REALM "AirPlay"
#define AUTH_REQUIRED "WWW-Authenticate: Digest realm=\"" AUTH_REALM "\", nonce=\"%s\"\r\n"
+void CAirPlayServer::Announce(AnnouncementFlag flag, const char *sender, const char *message, const CVariant &data)
+{
+ if ( (flag & Player) && strcmp(sender, "xbmc") == 0 && ServerInstance)
+ {
+ if (strcmp(message, "OnStop") == 0)
+ {
+ restoreVolume();
+ ServerInstance->AnnounceToClients(EVENT_STOPPED);
+ }
+ else if (strcmp(message, "OnPlay") == 0)
+ {
+ ServerInstance->AnnounceToClients(EVENT_PLAYING);
+ }
+ else if (strcmp(message, "OnPause") == 0)
+ {
+ ServerInstance->AnnounceToClients(EVENT_PAUSED);
+ }
+ }
+}
+
bool CAirPlayServer::StartServer(int port, bool nonlocal)
{
StopServer(true);
@@ -187,17 +212,63 @@ void CAirPlayServer::StopServer(bool bWait)
}
}
+void CAirPlayServer::AnnounceToClients(int state)
+{
+ CSingleLock lock (m_connectionLock);
+
+ std::vector<CTCPClient>::iterator it;
+ for (it = m_connections.begin(); it != m_connections.end(); it++)
+ {
+ CStdString reverseHeader;
+ CStdString reverseBody;
+ CStdString response;
+ int reverseSocket = INVALID_SOCKET;
+ it->ComposeReverseEvent(reverseHeader, reverseBody, state);
+
+ // Send event status per reverse http socket (play, loading, paused)
+ // if we have a reverse header and a reverse socket
+ if (reverseHeader.size() > 0 && m_reverseSockets.find(it->m_sessionId) != m_reverseSockets.end())
+ {
+ //search the reverse socket to this sessionid
+ response.Format("POST /event HTTP/1.1\r\n");
+ reverseSocket = m_reverseSockets[it->m_sessionId]; //that is our reverse socket
+ response += reverseHeader;
+ }
+ response += "\r\n";
+
+ if (reverseBody.size() > 0)
+ {
+ response += reverseBody;
+ }
+
+ // don't send it to the connection object
+ // the reverse socket itself belongs to
+ if (reverseSocket != INVALID_SOCKET && reverseSocket != it->m_socket)
+ {
+ send(reverseSocket, response.c_str(), response.size(), 0);//send the event status on the eventSocket
+ }
+ }
+}
+
CAirPlayServer::CAirPlayServer(int port, bool nonlocal) : CThread("AirPlayServer")
{
m_port = port;
m_nonlocal = nonlocal;
m_ServerSocket = INVALID_SOCKET;
m_usePassword = false;
+ m_origVolume = -1;
+ CAnnouncementManager::AddAnnouncer(this);
+}
+
+CAirPlayServer::~CAirPlayServer()
+{
+ CAnnouncementManager::RemoveAnnouncer(this);
}
void CAirPlayServer::Process()
{
m_bStop = false;
+ static int sessionCounter = 0;
while (!m_bStop)
{
@@ -240,6 +311,7 @@ void CAirPlayServer::Process()
}
if (nread <= 0)
{
+ CSingleLock lock (m_connectionLock);
CLog::Log(LOGINFO, "AIRPLAY Server: Disconnection detected");
m_connections[i].Disconnect();
m_connections.erase(m_connections.begin() + i);
@@ -252,6 +324,8 @@ void CAirPlayServer::Process()
CLog::Log(LOGDEBUG, "AIRPLAY Server: New connection detected");
CTCPClient newconnection;
newconnection.m_socket = accept(m_ServerSocket, &newconnection.m_cliaddr, &newconnection.m_addrlen);
+ sessionCounter++;
+ newconnection.m_sessionCounter = sessionCounter;
if (newconnection.m_socket == INVALID_SOCKET)
{
@@ -265,6 +339,7 @@ void CAirPlayServer::Process()
}
else
{
+ CSingleLock lock (m_connectionLock);
CLog::Log(LOGINFO, "AIRPLAY Server: New connection added");
m_connections.push_back(newconnection);
}
@@ -319,6 +394,7 @@ bool CAirPlayServer::Initialize()
void CAirPlayServer::Deinitialize()
{
+ CSingleLock lock (m_connectionLock);
for (unsigned int i = 0; i < m_connections.size(); i++)
m_connections[i].Disconnect();
@@ -381,11 +457,9 @@ void CAirPlayServer::CTCPClient::PushBuffer(CAirPlayServer *host, const char *bu
// Parse the request
CStdString responseHeader;
CStdString responseBody;
- CStdString reverseHeader;
- CStdString reverseBody;
- int status = ProcessRequest(responseHeader, responseBody, reverseHeader, reverseBody, sessionId);
+ int status = ProcessRequest(responseHeader, responseBody);
+ sessionId = m_sessionId;
CStdString statusMsg = "OK";
- int reverseSocket = INVALID_SOCKET;
switch(status)
{
@@ -435,28 +509,6 @@ void CAirPlayServer::CTCPClient::PushBuffer(CAirPlayServer *host, const char *bu
{
send(m_socket, response.c_str(), response.size(), 0);
}
-
- // Send event status per reverse http socket (play, loading, paused)
- // if we have a reverse header and a reverse socket
- if (reverseHeader.size() > 0 && reverseSockets.find(sessionId) != reverseSockets.end())
- {
- //search the reverse socket to this sessionid
- response.Format("POST /event HTTP/1.1\r\n");
- reverseSocket = reverseSockets[sessionId]; //that is our reverse socket
- response += reverseHeader;
- }
- response += "\r\n";
-
- if (reverseBody.size() > 0)
- {
- response += reverseBody;
- }
-
- if (reverseSocket != INVALID_SOCKET)
- {
- send(reverseSocket, response.c_str(), response.size(), 0);//send the event status on the eventSocket
- }
-
// We need a new parser...
delete m_httpParser;
m_httpParser = new HttpParser;
@@ -484,12 +536,12 @@ void CAirPlayServer::CTCPClient::Copy(const CTCPClient& client)
m_httpParser = client.m_httpParser;
m_authNonce = client.m_authNonce;
m_bAuthenticated = client.m_bAuthenticated;
+ m_sessionCounter = client.m_sessionCounter;
}
void CAirPlayServer::CTCPClient::ComposeReverseEvent( CStdString& reverseHeader,
CStdString& reverseBody,
- CStdString sessionId,
int state)
{
@@ -501,13 +553,13 @@ void CAirPlayServer::CTCPClient::ComposeReverseEvent( CStdString& reverseHeader,
case EVENT_LOADING:
case EVENT_PAUSED:
case EVENT_STOPPED:
- reverseBody.Format(EVENT_INFO, eventStrings[state]);
+ reverseBody.Format(EVENT_INFO, m_sessionCounter, eventStrings[state]);
CLog::Log(LOGDEBUG, "AIRPLAY: sending event: %s", eventStrings[state]);
break;
}
reverseHeader = "Content-Type: text/x-apple-plist+xml\r\n";
- reverseHeader.Format("%sContent-Length: %d",reverseHeader.c_str(),reverseBody.size());
- reverseHeader.Format("%sx-apple-session-id: %s\r\n",reverseHeader.c_str(),sessionId.c_str());
+ reverseHeader.Format("%sContent-Length: %d\r\n",reverseHeader.c_str(),reverseBody.size());
+ reverseHeader.Format("%sx-apple-session-id: %s\r\n",reverseHeader.c_str(),m_sessionId.c_str());
m_lastEvent = state;
}
}
@@ -630,21 +682,38 @@ bool CAirPlayServer::CTCPClient::checkAuthorization(const CStdString& authStr,
return m_bAuthenticated;
}
+void CAirPlayServer::backupVolume()
+{
+ if (ServerInstance->m_origVolume == -1)
+ ServerInstance->m_origVolume = g_application.GetVolume();
+}
+
+void CAirPlayServer::restoreVolume()
+{
+ if (ServerInstance->m_origVolume != -1)
+ {
+ float oldVolume = g_application.GetVolume();
+ g_application.SetVolume((float)ServerInstance->m_origVolume);
+ CApplicationMessenger::Get().ShowVolumeBar(oldVolume < (float)ServerInstance->m_origVolume);
+ ServerInstance->m_origVolume = -1;
+ }
+}
+
int CAirPlayServer::CTCPClient::ProcessRequest( CStdString& responseHeader,
- CStdString& responseBody,
- CStdString& reverseHeader,
- CStdString& reverseBody,
- CStdString& sessionId)
+ CStdString& responseBody)
{
CStdString method = m_httpParser->getMethod();
CStdString uri = m_httpParser->getUri();
CStdString queryString = m_httpParser->getQueryString();
CStdString body = m_httpParser->getBody();
CStdString contentType = m_httpParser->getValue("content-type");
- sessionId = m_httpParser->getValue("x-apple-session-id");
+ m_sessionId = m_httpParser->getValue("x-apple-session-id");
CStdString authorization = m_httpParser->getValue("authorization");
int status = AIRPLAY_STATUS_OK;
bool needAuth = false;
+
+ if (m_sessionId.IsEmpty())
+ m_sessionId = "00000000-0000-0000-0000-000000000000";
if (ServerInstance->m_usePassword && !m_bAuthenticated)
{
@@ -685,7 +754,6 @@ int CAirPlayServer::CTCPClient::ProcessRequest( CStdString& responseHeader,
if (g_application.m_pPlayer && g_application.m_pPlayer->IsPlaying() && !g_application.m_pPlayer->IsPaused())
{
CApplicationMessenger::Get().MediaPause();
- ComposeReverseEvent(reverseHeader, reverseBody, sessionId, EVENT_PAUSED);
}
}
else
@@ -693,7 +761,6 @@ int CAirPlayServer::CTCPClient::ProcessRequest( CStdString& responseHeader,
if (g_application.m_pPlayer && g_application.m_pPlayer->IsPlaying() && g_application.m_pPlayer->IsPaused())
{
CApplicationMessenger::Get().MediaPause();
- ComposeReverseEvent(reverseHeader, reverseBody, sessionId, EVENT_PLAYING);
}
}
}
@@ -719,6 +786,7 @@ int CAirPlayServer::CTCPClient::ProcessRequest( CStdString& responseHeader,
volume *= 100;
if(oldVolume != (int)volume)
{
+ backupVolume();
g_application.SetVolume(volume);
CApplicationMessenger::Get().ShowVolumeBar(oldVolume < volume);
}
@@ -817,8 +885,8 @@ int CAirPlayServer::CTCPClient::ProcessRequest( CStdString& responseHeader,
CFileItem fileToPlay(location, false);
fileToPlay.SetProperty("StartPercent", position*100.0f);
+ ServerInstance->AnnounceToClients(EVENT_LOADING);
CApplicationMessenger::Get().MediaPlay(fileToPlay);
- ComposeReverseEvent(reverseHeader, reverseBody, sessionId, EVENT_PLAYING);
}
}
@@ -837,7 +905,7 @@ int CAirPlayServer::CTCPClient::ProcessRequest( CStdString& responseHeader,
if (g_application.m_pPlayer && g_application.m_pPlayer->GetTotalTime())
{
float position = ((float) g_application.m_pPlayer->GetTime()) / 1000;
- responseBody.Format("duration: %d\r\nposition: %f", g_application.m_pPlayer->GetTotalTime() / 1000, position);
+ responseBody.Format("duration: %.6f\r\nposition: %.6f\r\n", (float)g_application.m_pPlayer->GetTotalTime() / 1000, position);
}
else
{
@@ -876,7 +944,6 @@ int CAirPlayServer::CTCPClient::ProcessRequest( CStdString& responseHeader,
{
g_windowManager.PreviousWindow();
}
- ComposeReverseEvent(reverseHeader, reverseBody, sessionId, EVENT_STOPPED);
}
}
@@ -947,22 +1014,13 @@ int CAirPlayServer::CTCPClient::ProcessRequest( CStdString& responseHeader,
if (g_application.m_pPlayer->IsCaching())
{
- ComposeReverseEvent(reverseHeader, reverseBody, sessionId, EVENT_LOADING);
- }
- else if (playing)
- {
- ComposeReverseEvent(reverseHeader, reverseBody, sessionId, EVENT_PLAYING);
- }
- else
- {
- ComposeReverseEvent(reverseHeader, reverseBody, sessionId, EVENT_PAUSED);
+ CAirPlayServer::ServerInstance->AnnounceToClients(EVENT_LOADING);
}
}
else
{
responseBody.Format(PLAYBACK_INFO_NOT_READY, duration, cachePosition, position, (playing ? 1 : 0), duration);
responseHeader = "Content-Type: text/x-apple-plist+xml\r\n";
- ComposeReverseEvent(reverseHeader, reverseBody, sessionId, EVENT_STOPPED);
}
}
diff --git a/xbmc/network/AirPlayServer.h b/xbmc/network/AirPlayServer.h
index 168a09fc14..a830aff78a 100644
--- a/xbmc/network/AirPlayServer.h
+++ b/xbmc/network/AirPlayServer.h
@@ -31,18 +31,25 @@
#include "threads/CriticalSection.h"
#include "utils/HttpParser.h"
#include "utils/StdString.h"
+#include "interfaces/IAnnouncer.h"
class DllLibPlist;
#define AIRPLAY_SERVER_VERSION_STR "101.28"
-class CAirPlayServer : public CThread
+class CAirPlayServer : public CThread, public ANNOUNCEMENT::IAnnouncer
{
public:
+ // IAnnouncer IF
+ virtual void Announce(ANNOUNCEMENT::AnnouncementFlag flag, const char *sender, const char *message, const CVariant &data);
+
+ //AirPlayServer impl.
static bool StartServer(int port, bool nonlocal);
static void StopServer(bool bWait);
static bool SetCredentials(bool usePassword, const CStdString& password);
static bool IsPlaying(){ return m_isPlaying > 0;}
+ static void backupVolume();
+ static void restoreVolume();
static int m_isPlaying;
protected:
@@ -50,9 +57,11 @@ protected:
private:
CAirPlayServer(int port, bool nonlocal);
+ ~CAirPlayServer();
bool SetInternalCredentials(bool usePassword, const CStdString& password);
bool Initialize();
void Deinitialize();
+ void AnnounceToClients(int state);
class CTCPClient
{
@@ -66,6 +75,7 @@ private:
void PushBuffer(CAirPlayServer *host, const char *buffer,
int length, CStdString &sessionId,
std::map<CStdString, int> &reverseSockets);
+ void ComposeReverseEvent(CStdString& reverseHeader, CStdString& reverseBody, int state);
void Disconnect();
@@ -73,15 +83,13 @@ private:
struct sockaddr m_cliaddr;
socklen_t m_addrlen;
CCriticalSection m_critSection;
+ int m_sessionCounter;
+ CStdString m_sessionId;
private:
int ProcessRequest( CStdString& responseHeader,
- CStdString& response,
- CStdString& reverseHeader,
- CStdString& reverseBody,
- CStdString& sessionId);
+ CStdString& response);
- void ComposeReverseEvent(CStdString& reverseHeader, CStdString& reverseBody, CStdString sessionId, int state);
void ComposeAuthRequestAnswer(CStdString& responseHeader, CStdString& responseBody);
bool checkAuthorization(const CStdString& authStr, const CStdString& method, const CStdString& uri);
void Copy(const CTCPClient& client);
@@ -93,6 +101,7 @@ private:
CStdString m_authNonce;
};
+ CCriticalSection m_connectionLock;
std::vector<CTCPClient> m_connections;
std::map<CStdString, int> m_reverseSockets;
int m_ServerSocket;
@@ -100,6 +109,7 @@ private:
bool m_nonlocal;
bool m_usePassword;
CStdString m_password;
+ int m_origVolume;
static CAirPlayServer *ServerInstance;
};
diff --git a/xbmc/network/AirTunesServer.cpp b/xbmc/network/AirTunesServer.cpp
index 49121fedf5..d041e0da0e 100644
--- a/xbmc/network/AirTunesServer.cpp
+++ b/xbmc/network/AirTunesServer.cpp
@@ -46,11 +46,13 @@
#include "settings/AdvancedSettings.h"
#include "utils/EndianSwap.h"
#include "URL.h"
+#include "interfaces/AnnouncementManager.h"
#include <map>
#include <string>
using namespace XFILE;
+using namespace ANNOUNCEMENT;
#if defined(TARGET_WINDOWS)
DllLibShairplay *CAirTunesServer::m_pLibShairplay = NULL;
@@ -93,6 +95,16 @@ void CAirTunesServer::SetMetadataFromBuffer(const char *buffer, unsigned int siz
CApplicationMessenger::Get().SetCurrentSongTag(tag);
}
+void CAirTunesServer::Announce(AnnouncementFlag flag, const char *sender, const char *message, const CVariant &data)
+{
+ if ( (flag & Player) && strcmp(sender, "xbmc") == 0 && strcmp(message, "OnStop") == 0)
+ {
+#ifdef HAS_AIRPLAY
+ CAirPlayServer::restoreVolume();
+#endif
+ }
+}
+
void CAirTunesServer::SetCoverArtFromBuffer(const char *buffer, unsigned int size)
{
XFILE::CFile tmpFile;
@@ -192,6 +204,9 @@ void CAirTunesServer::AudioOutputFunctions::audio_set_volume(void *cls, void *s
{
//volume from -30 - 0 - -144 means mute
float volPercent = volume < -30.0f ? 0 : 1 - volume/-30;
+#ifdef HAS_AIRPLAY
+ CAirPlayServer::backupVolume();
+#endif
g_application.SetVolume(volPercent, false);//non-percent volume 0.0-1.0
}
@@ -288,6 +303,17 @@ void CAirTunesServer::AudioOutputFunctions::ao_initialize(void)
{
}
+void CAirTunesServer::AudioOutputFunctions::ao_set_volume(float volume)
+{
+ //volume from -30 - 0 - -144 means mute
+ float volPercent = volume < -30.0f ? 0 : 1 - volume/-30;
+#ifdef HAS_AIRPLAY
+ CAirPlayServer::backupVolume();
+#endif
+ g_application.SetVolume(volPercent, false);//non-percent volume 0.0-1.0
+}
+
+
int CAirTunesServer::AudioOutputFunctions::ao_play(ao_device *device, char *output_samples, uint32_t num_bytes)
{
if (!device)
@@ -563,6 +589,7 @@ CAirTunesServer::CAirTunesServer(int port, bool nonlocal) : CThread("AirTunesSer
#else
m_pLibShairport = new DllLibShairport();
#endif
+ CAnnouncementManager::AddAnnouncer(this);
}
CAirTunesServer::~CAirTunesServer()
@@ -581,6 +608,7 @@ CAirTunesServer::~CAirTunesServer()
}
delete m_pLibShairport;
#endif
+ CAnnouncementManager::RemoveAnnouncer(this);
}
void CAirTunesServer::Process()
@@ -676,6 +704,11 @@ bool CAirTunesServer::Initialize(const CStdString &password)
ao.ao_set_metadata = AudioOutputFunctions::ao_set_metadata;
ao.ao_set_metadata_coverart = AudioOutputFunctions::ao_set_metadata_coverart;
#endif
+#if defined(SHAIRPORT_AUDIOOUTPUT_VERSION)
+#if SHAIRPORT_AUDIOOUTPUT_VERSION >= 2
+ ao.ao_set_volume = AudioOutputFunctions::ao_set_volume;
+#endif
+#endif
struct printfPtr funcPtr;
funcPtr.extprintf = shairport_log;
diff --git a/xbmc/network/AirTunesServer.h b/xbmc/network/AirTunesServer.h
index 62ff7f0993..b776c46506 100644
--- a/xbmc/network/AirTunesServer.h
+++ b/xbmc/network/AirTunesServer.h
@@ -41,13 +41,16 @@
#include "utils/HttpParser.h"
#include "utils/StdString.h"
#include "filesystem/PipeFile.h"
+#include "interfaces/IAnnouncer.h"
class DllLibShairport;
-class CAirTunesServer : public CThread
+class CAirTunesServer : public CThread, public ANNOUNCEMENT::IAnnouncer
{
public:
+ virtual void Announce(ANNOUNCEMENT::AnnouncementFlag flag, const char *sender, const char *message, const CVariant &data);
+
static bool StartServer(int port, bool nonlocal, bool usePassword, const CStdString &password="");
static void StopServer(bool bWait);
static void SetMetadataFromBuffer(const char *buffer, unsigned int size);
@@ -86,6 +89,7 @@ private:
static void audio_destroy(void *cls, void *session);
#else
static void ao_initialize(void);
+ static void ao_set_volume(float volume);
static int ao_play(ao_device *device, char *output_samples, uint32_t num_bytes);
static int ao_default_driver_id(void);
static ao_device* ao_open_live( int driver_id, ao_sample_format *format,
diff --git a/xbmc/network/httprequesthandler/HTTPVfsHandler.cpp b/xbmc/network/httprequesthandler/HTTPVfsHandler.cpp
index b2b9ff5843..f19aa31c83 100644
--- a/xbmc/network/httprequesthandler/HTTPVfsHandler.cpp
+++ b/xbmc/network/httprequesthandler/HTTPVfsHandler.cpp
@@ -23,6 +23,7 @@
#include "URL.h"
#include "filesystem/File.h"
#include "network/WebServer.h"
+#include "settings/MediaSourceSettings.h"
#include "settings/Settings.h"
#include "utils/URIUtils.h"
@@ -58,7 +59,7 @@ int CHTTPVfsHandler::HandleHTTPRequest(const HTTPRequest &request)
VECSOURCES *sources = NULL;
for (unsigned int index = 0; index < size && !accessible; index++)
{
- sources = g_settings.GetSourcesFromType(sourceTypes[index]);
+ sources = CMediaSourceSettings::Get().GetSources(sourceTypes[index]);
if (sources == NULL)
continue;
diff --git a/xbmc/network/upnp/UPnPServer.cpp b/xbmc/network/upnp/UPnPServer.cpp
index 86f13eb560..1b92f99f17 100644
--- a/xbmc/network/upnp/UPnPServer.cpp
+++ b/xbmc/network/upnp/UPnPServer.cpp
@@ -13,6 +13,7 @@
#include "filesystem/VideoDatabaseDirectory.h"
#include "guilib/WindowIDs.h"
#include "music/tags/MusicInfoTag.h"
+#include "settings/Settings.h"
#include "settings/GUISettings.h"
#include "utils/log.h"
#include "utils/md5.h"
@@ -307,6 +308,8 @@ CUPnPServer::Build(CFileItemPtr item,
if (params.GetMovieId() >= 0 )
db.GetMovieInfo((const char*)path, *item->GetVideoInfoTag(), params.GetMovieId());
+ if (params.GetMVideoId() >= 0 )
+ db.GetMusicVideoInfo((const char*)path, *item->GetVideoInfoTag(), params.GetMVideoId());
else if (params.GetEpisodeId() >= 0 )
db.GetEpisodeInfo((const char*)path, *item->GetVideoInfoTag(), params.GetEpisodeId());
else if (params.GetTvShowId() >= 0 )
@@ -600,7 +603,14 @@ CUPnPServer::OnBrowseDirectChildren(PLT_ActionReference& action,
items.Sort(SORT_METHOD_LABEL, SortOrderAscending);
} else {
- CDirectory::GetDirectory((const char*)parent_id, items);
+ // this is the only way to hide unplayable items in the 'files'
+ // view as we cannot tell what context (eg music vs video) the
+ // request came from
+ string supported = g_settings.m_pictureExtensions + "|"
+ + g_settings.m_videoExtensions + "|"
+ + g_settings.m_musicExtensions + "|"
+ + g_settings.m_discStubExtensions;
+ CDirectory::GetDirectory((const char*)parent_id, items, supported);
DefaultSortItems(items);
}
diff --git a/xbmc/network/upnp/UPnPSettings.cpp b/xbmc/network/upnp/UPnPSettings.cpp
index 70a8344b5f..03b05078e8 100644
--- a/xbmc/network/upnp/UPnPSettings.cpp
+++ b/xbmc/network/upnp/UPnPSettings.cpp
@@ -20,6 +20,7 @@
#include "UPnPSettings.h"
#include "filesystem/File.h"
+#include "threads/SingleLock.h"
#include "utils/log.h"
#include "utils/StringUtils.h"
#include "utils/XBMCTinyXML.h"
@@ -51,8 +52,15 @@ CUPnPSettings& CUPnPSettings::Get()
return sUPnPSettings;
}
+void CUPnPSettings::OnSettingsCleared()
+{
+ Clear();
+}
+
bool CUPnPSettings::Load(const std::string &file)
{
+ CSingleLock lock(m_critical);
+
Clear();
if (!CFile::Exists(file))
@@ -84,6 +92,8 @@ bool CUPnPSettings::Load(const std::string &file)
bool CUPnPSettings::Save(const std::string &file) const
{
+ CSingleLock lock(m_critical);
+
CXBMCTinyXML doc;
TiXmlElement xmlRootElement(XML_UPNP);
TiXmlNode *pRoot = doc.InsertEndChild(xmlRootElement);
@@ -102,6 +112,8 @@ bool CUPnPSettings::Save(const std::string &file) const
void CUPnPSettings::Clear()
{
+ CSingleLock lock(m_critical);
+
m_serverUUID.clear();
m_serverPort = 0;
m_maxReturnedItems = 0;
diff --git a/xbmc/network/upnp/UPnPSettings.h b/xbmc/network/upnp/UPnPSettings.h
index 5ef286122d..4efb6f5d49 100644
--- a/xbmc/network/upnp/UPnPSettings.h
+++ b/xbmc/network/upnp/UPnPSettings.h
@@ -21,10 +21,15 @@
#include <string>
-class CUPnPSettings
+#include "settings/ISettingsHandler.h"
+#include "threads/CriticalSection.h"
+
+class CUPnPSettings : public ISettingsHandler
{
public:
static CUPnPSettings& Get();
+
+ virtual void OnSettingsCleared();
bool Load(const std::string &file);
bool Save(const std::string &file) const;
@@ -54,4 +59,6 @@ private:
int m_maxReturnedItems;
std::string m_rendererUUID;
int m_rendererPort;
+
+ CCriticalSection m_critical;
};
diff --git a/xbmc/network/websocket/WebSocketV13.cpp b/xbmc/network/websocket/WebSocketV13.cpp
index 6f969d363b..979dee1b90 100644
--- a/xbmc/network/websocket/WebSocketV13.cpp
+++ b/xbmc/network/websocket/WebSocketV13.cpp
@@ -24,7 +24,6 @@
#include "WebSocketV13.h"
#include "WebSocket.h"
#include "utils/Base64.h"
-#include "utils/CharsetConverter.h"
#include "utils/HttpParser.h"
#include "utils/HttpResponse.h"
#include "utils/log.h"
diff --git a/xbmc/network/websocket/WebSocketV8.cpp b/xbmc/network/websocket/WebSocketV8.cpp
index ca03a2fab2..7cddbfb62b 100644
--- a/xbmc/network/websocket/WebSocketV8.cpp
+++ b/xbmc/network/websocket/WebSocketV8.cpp
@@ -25,7 +25,6 @@
#include "WebSocketV8.h"
#include "WebSocket.h"
#include "utils/Base64.h"
-#include "utils/CharsetConverter.h"
#include "utils/EndianSwap.h"
#include "utils/HttpParser.h"
#include "utils/HttpResponse.h"
diff --git a/xbmc/osx/Info.plist b/xbmc/osx/Info.plist
index f20590d06e..5eef3fdee6 100644
--- a/xbmc/osx/Info.plist
+++ b/xbmc/osx/Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>XBMC</string>
<key>CFBundleGetInfoString</key>
- <string>13.0.alpha2</string>
+ <string>13.0.alpha3</string>
<key>CFBundleIconFile</key>
<string>xbmc.icns</string>
<key>CFBundleIdentifier</key>
@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>13.0.alpha2</string>
+ <string>13.0.alpha3</string>
<key>CFBundleVersion</key>
<string>r####</string>
<key>CFBundleSignature</key>
diff --git a/xbmc/osx/atv2/XBMCController.mm b/xbmc/osx/atv2/XBMCController.mm
index e5ecd6c36b..0dc8a772f9 100644
--- a/xbmc/osx/atv2/XBMCController.mm
+++ b/xbmc/osx/atv2/XBMCController.mm
@@ -147,6 +147,8 @@ typedef enum {
kBREventRemoteActionPlay = 5,
kBREventRemoteActionLeft = 6,
kBREventRemoteActionRight = 7,
+ kBREventRemoteActionRewind2 = 8,
+ kBREventRemoteActionFastFwd2 = 9,
kBREventRemoteActionALPlay = 10,
@@ -575,13 +577,21 @@ static void XBMCController$ATVClientEventFromBREvent(XBMCController* self, SEL _
// Fast Forward
case kBREventRemoteActionFastFwd:
+ case kBREventRemoteActionFastFwd2:
+ *isRepeatable = true;
+ if([f_event value] == 1)
+ *isPressed = true;
*result = ATV_BUTTON_FASTFWD;
- return ;
+ return;
// Rewind
case kBREventRemoteActionRewind:
+ case kBREventRemoteActionRewind2:
+ *isRepeatable = true;
+ if([f_event value] == 1)
+ *isPressed = true;
*result = ATV_BUTTON_REWIND;
- return ;
+ return;
// Skip Forward
case kBREventRemoteActionSkipFwd:
diff --git a/xbmc/osx/ios/XBMCController.mm b/xbmc/osx/ios/XBMCController.mm
index 0afa4078d7..10c2c69771 100644
--- a/xbmc/osx/ios/XBMCController.mm
+++ b/xbmc/osx/ios/XBMCController.mm
@@ -584,48 +584,30 @@ AnnounceReceiver *AnnounceReceiver::g_announceReceiver = NULL;
if (sender.state == UIGestureRecognizerStateRecognized)
{
- bool swipeAllowed = false;
CGPoint point = [sender locationOfTouch:0 inView:m_glView];
point.x *= screenScale;
point.y *= screenScale;
- swipeAllowed = false;
- if ([sender numberOfTouches] == 2)
+ TouchMoveDirection direction = TouchMoveDirectionNone;
+ switch ([sender direction])
{
- swipeAllowed = true;
- }
- else
- {
- int gestures = CGenericTouchActionHandler::Get().QuerySupportedGestures(point.x, point.y);
- if (gestures & EVENT_RESULT_SWIPE)
- {
- swipeAllowed = true;
- }
- }
-
- if (swipeAllowed)
- {
- TouchMoveDirection direction = TouchMoveDirectionNone;
- switch ([sender direction])
- {
- case UISwipeGestureRecognizerDirectionRight:
- direction = TouchMoveDirectionRight;
- break;
- case UISwipeGestureRecognizerDirectionLeft:
- direction = TouchMoveDirectionLeft;
- break;
- case UISwipeGestureRecognizerDirectionUp:
- direction = TouchMoveDirectionUp;
- break;
- case UISwipeGestureRecognizerDirectionDown:
- direction = TouchMoveDirectionDown;
- break;
- }
- CGenericTouchActionHandler::Get().OnSwipe(direction,
- 0.0, 0.0,
- point.x, point.y, 0, 0,
- [sender numberOfTouches]);
+ case UISwipeGestureRecognizerDirectionRight:
+ direction = TouchMoveDirectionRight;
+ break;
+ case UISwipeGestureRecognizerDirectionLeft:
+ direction = TouchMoveDirectionLeft;
+ break;
+ case UISwipeGestureRecognizerDirectionUp:
+ direction = TouchMoveDirectionUp;
+ break;
+ case UISwipeGestureRecognizerDirectionDown:
+ direction = TouchMoveDirectionDown;
+ break;
}
+ CGenericTouchActionHandler::Get().OnSwipe(direction,
+ 0.0, 0.0,
+ point.x, point.y, 0, 0,
+ [sender numberOfTouches]);
}
}
}
diff --git a/xbmc/pictures/GUIViewStatePictures.cpp b/xbmc/pictures/GUIViewStatePictures.cpp
index 80295b416f..621f640e77 100644
--- a/xbmc/pictures/GUIViewStatePictures.cpp
+++ b/xbmc/pictures/GUIViewStatePictures.cpp
@@ -24,10 +24,12 @@
#include "settings/GUISettings.h"
#include "settings/AdvancedSettings.h"
#include "settings/Settings.h"
+#include "settings/MediaSourceSettings.h"
#include "filesystem/Directory.h"
#include "filesystem/PluginDirectory.h"
#include "guilib/LocalizeStrings.h"
#include "guilib/WindowIDs.h"
+#include "view/ViewStateSettings.h"
using namespace XFILE;
using namespace ADDON;
@@ -51,17 +53,18 @@ CGUIViewStateWindowPictures::CGUIViewStateWindowPictures(const CFileItemList& it
AddSortMethod(SORT_METHOD_DATE, 552, LABEL_MASKS("%L", "%J", "%L", "%J")); // Filename, Date | Foldername, Date
AddSortMethod(SORT_METHOD_DATE_TAKEN, 577, LABEL_MASKS("%L", "%t", "%L", "%J")); // Filename, DateTaken | Foldername, Date
AddSortMethod(SORT_METHOD_FILE, 561, LABEL_MASKS("%L", "%I", "%L", "")); // Filename, Size | FolderName, empty
-
- SetSortMethod(g_settings.m_viewStatePictures.m_sortMethod);
- SetViewAsControl(g_settings.m_viewStatePictures.m_viewMode);
- SetSortOrder(g_settings.m_viewStatePictures.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("pictures");
+ SetSortMethod(viewState->m_sortMethod);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
LoadViewState(items.GetPath(), WINDOW_PICTURES);
}
void CGUIViewStateWindowPictures::SaveViewState()
{
- SaveViewToDb(m_items.GetPath(), WINDOW_PICTURES, &g_settings.m_viewStatePictures);
+ SaveViewToDb(m_items.GetPath(), WINDOW_PICTURES, CViewStateSettings::Get().Get("pictures"));
}
CStdString CGUIViewStateWindowPictures::GetLockType()
@@ -79,8 +82,9 @@ CStdString CGUIViewStateWindowPictures::GetExtensions()
VECSOURCES& CGUIViewStateWindowPictures::GetSources()
{
+ VECSOURCES *pictureSources = CMediaSourceSettings::Get().GetSources("pictures");
AddAddonsSource("image", g_localizeStrings.Get(1039), "DefaultAddonPicture.png");
- AddOrReplace(g_settings.m_pictureSources, CGUIViewState::GetSources());
- return g_settings.m_pictureSources;
+ AddOrReplace(*pictureSources, CGUIViewState::GetSources());
+ return *pictureSources;
}
diff --git a/xbmc/pictures/GUIWindowPictures.cpp b/xbmc/pictures/GUIWindowPictures.cpp
index d5e32f1f97..e54450b8fc 100644
--- a/xbmc/pictures/GUIWindowPictures.cpp
+++ b/xbmc/pictures/GUIWindowPictures.cpp
@@ -38,6 +38,7 @@
#include "playlists/PlayList.h"
#include "settings/Settings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSourceSettings.h"
#include "utils/TimeUtils.h"
#include "utils/log.h"
#include "utils/URIUtils.h"
@@ -107,7 +108,7 @@ bool CGUIWindowPictures::OnMessage(CGUIMessage& message)
{
// is this the first time accessing this window?
if (m_vecItems->GetPath() == "?" && message.GetStringParam().IsEmpty())
- message.SetStringParam(g_settings.m_defaultPictureSource);
+ message.SetStringParam(CMediaSourceSettings::Get().GetDefaultSource("pictures"));
m_dlgProgress = (CGUIDialogProgress*)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
@@ -188,7 +189,8 @@ void CGUIWindowPictures::UpdateButtons()
// check we can slideshow or recursive slideshow
int nFolders = m_vecItems->GetFolderCount();
- if (nFolders == m_vecItems->Size())
+ if (nFolders == m_vecItems->Size() ||
+ m_vecItems->GetPath() == "addons://sources/image/")
{
CONTROL_DISABLE(CONTROL_BTNSLIDESHOW);
}
@@ -198,7 +200,8 @@ void CGUIWindowPictures::UpdateButtons()
}
if (m_guiState.get() && !m_guiState->HideParentDirItems())
nFolders--;
- if (m_vecItems->Size() == 0 || nFolders == 0)
+ if (m_vecItems->Size() == 0 || nFolders == 0 ||
+ m_vecItems->GetPath() == "addons://sources/image/")
{
CONTROL_DISABLE(CONTROL_BTNSLIDESHOW_RECURSIVE);
}
@@ -302,7 +305,7 @@ bool CGUIWindowPictures::GetDirectory(const CStdString &strDirectory, CFileItemL
return false;
CStdString label;
- if (items.GetLabel().IsEmpty() && m_rootDir.IsSource(items.GetPath(), g_settings.GetSourcesFromType("pictures"), &label))
+ if (items.GetLabel().IsEmpty() && m_rootDir.IsSource(items.GetPath(), CMediaSourceSettings::Get().GetSources("pictures"), &label))
items.SetLabel(label);
return true;
diff --git a/xbmc/pictures/GUIWindowSlideShow.cpp b/xbmc/pictures/GUIWindowSlideShow.cpp
index b43595c1ee..77fdc34490 100644
--- a/xbmc/pictures/GUIWindowSlideShow.cpp
+++ b/xbmc/pictures/GUIWindowSlideShow.cpp
@@ -645,12 +645,10 @@ EVENT_RESULT CGUIWindowSlideShow::OnMouseEvent(const CPoint &point, const CMouse
if (m_iZoomFactor == 1 || !m_Image[m_iCurrentPic].m_bCanMoveHorizontally)
{
// on zoomlevel 1 just detect swipe left and right
- if (point.x < m_firstGesturePoint.x)
+ if (event.m_id == ACTION_GESTURE_SWIPE_LEFT)
OnAction(CAction(ACTION_NEXT_PICTURE));
else
OnAction(CAction(ACTION_PREV_PICTURE));
-
- m_firstGesturePoint.x = 0;
}
}
else if (event.m_id == ACTION_GESTURE_END)
@@ -774,6 +772,19 @@ bool CGUIWindowSlideShow::OnAction(const CAction &action)
Zoom(m_iZoomFactor + 1);
break;
+ case ACTION_GESTURE_SWIPE_UP:
+ case ACTION_GESTURE_SWIPE_DOWN:
+ if (m_iZoomFactor == 1 || !m_Image[m_iCurrentPic].m_bCanMoveVertically)
+ {
+ bool swipeOnLeft = action.GetAmount() < g_graphicsContext.GetWidth() / 2;
+ bool swipeUp = action.GetID() == ACTION_GESTURE_SWIPE_UP;
+ if (swipeUp == swipeOnLeft)
+ Rotate(90.0f);
+ else
+ Rotate(-90.0f);
+ }
+ break;
+
case ACTION_ROTATE_PICTURE_CW:
Rotate(90.0f);
break;
diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp
index ca94f49034..0756b1e1b1 100644
--- a/xbmc/powermanagement/PowerManager.cpp
+++ b/xbmc/powermanagement/PowerManager.cpp
@@ -31,6 +31,8 @@
#include "interfaces/AnnouncementManager.h"
#include "guilib/LocalizeStrings.h"
#include "guilib/GraphicContext.h"
+#include "guilib/GUIWindowManager.h"
+#include "dialogs/GUIDialogBusy.h"
#include "dialogs/GUIDialogKaiToast.h"
#if defined(TARGET_DARWIN)
@@ -137,25 +139,58 @@ void CPowerManager::SetDefaults()
bool CPowerManager::Powerdown()
{
- return CanPowerdown() ? m_instance->Powerdown() : false;
+ if (CanPowerdown() && m_instance->Powerdown())
+ {
+ CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
+ if (dialog)
+ dialog->Show();
+
+ return true;
+ }
+
+ return false;
}
bool CPowerManager::Suspend()
{
- return CanSuspend() ? m_instance->Suspend() : false;
+ if (CanSuspend() && m_instance->Suspend())
+ {
+ CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
+ if (dialog)
+ dialog->Show();
+
+ return true;
+ }
+
+ return false;
}
bool CPowerManager::Hibernate()
{
- return CanHibernate() ? m_instance->Hibernate() : false;
+ if (CanHibernate() && m_instance->Hibernate())
+ {
+ CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
+ if (dialog)
+ dialog->Show();
+
+ return true;
+ }
+
+ return false;
}
bool CPowerManager::Reboot()
{
bool success = CanReboot() ? m_instance->Reboot() : false;
if (success)
+ {
CAnnouncementManager::Announce(System, "xbmc", "OnRestart");
+ CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
+ if (dialog)
+ dialog->Show();
+ }
+
return success;
}
@@ -209,6 +244,10 @@ void CPowerManager::OnWake()
// reset out timers
g_application.ResetShutdownTimers();
+ CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
+ if (dialog)
+ dialog->Close();
+
#if defined(HAS_SDL) || defined(TARGET_WINDOWS)
if (g_Windowing.IsFullScreen())
{
diff --git a/xbmc/programs/GUIViewStatePrograms.cpp b/xbmc/programs/GUIViewStatePrograms.cpp
index 5584fd35fd..6be388c0e1 100644
--- a/xbmc/programs/GUIViewStatePrograms.cpp
+++ b/xbmc/programs/GUIViewStatePrograms.cpp
@@ -23,9 +23,11 @@
#include "view/ViewState.h"
#include "settings/GUISettings.h"
#include "settings/Settings.h"
+#include "settings/MediaSourceSettings.h"
#include "filesystem/Directory.h"
#include "guilib/LocalizeStrings.h"
#include "guilib/WindowIDs.h"
+#include "view/ViewStateSettings.h"
using namespace XFILE;
using namespace ADDON;
@@ -36,17 +38,18 @@ CGUIViewStateWindowPrograms::CGUIViewStateWindowPrograms(const CFileItemList& it
AddSortMethod(SORT_METHOD_LABEL_IGNORE_THE, 551, LABEL_MASKS("%K", "%I", "%L", "")); // Titel, Size | Foldername, empty
else
AddSortMethod(SORT_METHOD_LABEL, 551, LABEL_MASKS("%K", "%I", "%L", "")); // Titel, Size | Foldername, empty
-
- SetSortMethod(g_settings.m_viewStatePrograms.m_sortMethod);
- SetViewAsControl(g_settings.m_viewStatePrograms.m_viewMode);
- SetSortOrder(g_settings.m_viewStatePrograms.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("programs");
+ SetSortMethod(viewState->m_sortMethod);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
LoadViewState(items.GetPath(), WINDOW_PROGRAMS);
}
void CGUIViewStateWindowPrograms::SaveViewState()
{
- SaveViewToDb(m_items.GetPath(), WINDOW_PROGRAMS, &g_settings.m_viewStatePrograms);
+ SaveViewToDb(m_items.GetPath(), WINDOW_PROGRAMS, CViewStateSettings::Get().Get("programs"));
}
CStdString CGUIViewStateWindowPrograms::GetLockType()
@@ -65,7 +68,9 @@ VECSOURCES& CGUIViewStateWindowPrograms::GetSources()
#if defined(TARGET_ANDROID)
AddAndroidSource("apps", g_localizeStrings.Get(20244), "DefaultProgram.png");
#endif
- AddOrReplace(g_settings.m_programSources,CGUIViewState::GetSources());
- return g_settings.m_programSources;
+
+ VECSOURCES *programSources = CMediaSourceSettings::Get().GetSources("programs");
+ AddOrReplace(*programSources, CGUIViewState::GetSources());
+ return *programSources;
}
diff --git a/xbmc/programs/GUIWindowPrograms.cpp b/xbmc/programs/GUIWindowPrograms.cpp
index c4c250e8e0..57a34dba20 100644
--- a/xbmc/programs/GUIWindowPrograms.cpp
+++ b/xbmc/programs/GUIWindowPrograms.cpp
@@ -25,6 +25,7 @@
#include "Autorun.h"
#include "guilib/GUIWindowManager.h"
#include "FileItem.h"
+#include "settings/MediaSourceSettings.h"
#include "settings/Settings.h"
#include "guilib/Key.h"
#include "guilib/LocalizeStrings.h"
@@ -65,7 +66,7 @@ bool CGUIWindowPrograms::OnMessage(CGUIMessage& message)
// is this the first time accessing this window?
if (m_vecItems->GetPath() == "?" && message.GetStringParam().IsEmpty())
- message.SetStringParam(g_settings.m_defaultProgramSource);
+ message.SetStringParam(CMediaSourceSettings::Get().GetDefaultSource("programs"));
return CGUIMediaWindow::OnMessage(message);
}
diff --git a/xbmc/pvr/addons/PVRClients.cpp b/xbmc/pvr/addons/PVRClients.cpp
index dc6324e15b..472ede3fd6 100644
--- a/xbmc/pvr/addons/PVRClients.cpp
+++ b/xbmc/pvr/addons/PVRClients.cpp
@@ -30,6 +30,7 @@
#include "pvr/PVRDatabase.h"
#include "guilib/GUIWindowManager.h"
#include "settings/Settings.h"
+#include "settings/MediaSettings.h"
#include "pvr/channels/PVRChannelGroups.h"
#include "pvr/channels/PVRChannelGroupInternal.h"
#include "pvr/recordings/PVRRecordings.h"
@@ -1032,11 +1033,11 @@ void CPVRClients::SaveCurrentChannelSettings(void)
if (!database)
return;
- if (g_settings.m_currentVideoSettings != g_settings.m_defaultVideoSettings)
+ if (CMediaSettings::Get().GetCurrentVideoSettings() != CMediaSettings::Get().GetDefaultVideoSettings())
{
CLog::Log(LOGDEBUG, "PVR - %s - persisting custom channel settings for channel '%s'",
__FUNCTION__, channel->ChannelName().c_str());
- database->PersistChannelSettings(*channel, g_settings.m_currentVideoSettings);
+ database->PersistChannelSettings(*channel, CMediaSettings::Get().GetCurrentVideoSettings());
}
else
{
@@ -1062,63 +1063,63 @@ void CPVRClients::LoadCurrentChannelSettings(void)
if (g_application.m_pPlayer)
{
/* set the default settings first */
- CVideoSettings loadedChannelSettings = g_settings.m_defaultVideoSettings;
+ CVideoSettings loadedChannelSettings = CMediaSettings::Get().GetDefaultVideoSettings();
/* try to load the settings from the database */
database->GetChannelSettings(*channel, loadedChannelSettings);
- g_settings.m_currentVideoSettings = g_settings.m_defaultVideoSettings;
- g_settings.m_currentVideoSettings.m_Brightness = loadedChannelSettings.m_Brightness;
- g_settings.m_currentVideoSettings.m_Contrast = loadedChannelSettings.m_Contrast;
- g_settings.m_currentVideoSettings.m_Gamma = loadedChannelSettings.m_Gamma;
- g_settings.m_currentVideoSettings.m_Crop = loadedChannelSettings.m_Crop;
- g_settings.m_currentVideoSettings.m_CropLeft = loadedChannelSettings.m_CropLeft;
- g_settings.m_currentVideoSettings.m_CropRight = loadedChannelSettings.m_CropRight;
- g_settings.m_currentVideoSettings.m_CropTop = loadedChannelSettings.m_CropTop;
- g_settings.m_currentVideoSettings.m_CropBottom = loadedChannelSettings.m_CropBottom;
- g_settings.m_currentVideoSettings.m_CustomPixelRatio = loadedChannelSettings.m_CustomPixelRatio;
- g_settings.m_currentVideoSettings.m_CustomZoomAmount = loadedChannelSettings.m_CustomZoomAmount;
- g_settings.m_currentVideoSettings.m_CustomVerticalShift = loadedChannelSettings.m_CustomVerticalShift;
- g_settings.m_currentVideoSettings.m_NoiseReduction = loadedChannelSettings.m_NoiseReduction;
- g_settings.m_currentVideoSettings.m_Sharpness = loadedChannelSettings.m_Sharpness;
- g_settings.m_currentVideoSettings.m_InterlaceMethod = loadedChannelSettings.m_InterlaceMethod;
- g_settings.m_currentVideoSettings.m_OutputToAllSpeakers = loadedChannelSettings.m_OutputToAllSpeakers;
- g_settings.m_currentVideoSettings.m_AudioDelay = loadedChannelSettings.m_AudioDelay;
- g_settings.m_currentVideoSettings.m_AudioStream = loadedChannelSettings.m_AudioStream;
- g_settings.m_currentVideoSettings.m_SubtitleOn = loadedChannelSettings.m_SubtitleOn;
- g_settings.m_currentVideoSettings.m_SubtitleDelay = loadedChannelSettings.m_SubtitleDelay;
- g_settings.m_currentVideoSettings.m_CustomNonLinStretch = loadedChannelSettings.m_CustomNonLinStretch;
- g_settings.m_currentVideoSettings.m_ScalingMethod = loadedChannelSettings.m_ScalingMethod;
- g_settings.m_currentVideoSettings.m_PostProcess = loadedChannelSettings.m_PostProcess;
- g_settings.m_currentVideoSettings.m_DeinterlaceMode = loadedChannelSettings.m_DeinterlaceMode;
+ CMediaSettings::Get().GetCurrentVideoSettings() = CMediaSettings::Get().GetDefaultVideoSettings();
+ CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness = loadedChannelSettings.m_Brightness;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast = loadedChannelSettings.m_Contrast;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_Gamma = loadedChannelSettings.m_Gamma;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_Crop = loadedChannelSettings.m_Crop;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CropLeft = loadedChannelSettings.m_CropLeft;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CropRight = loadedChannelSettings.m_CropRight;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CropTop = loadedChannelSettings.m_CropTop;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CropBottom = loadedChannelSettings.m_CropBottom;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio = loadedChannelSettings.m_CustomPixelRatio;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount = loadedChannelSettings.m_CustomZoomAmount;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift = loadedChannelSettings.m_CustomVerticalShift;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_NoiseReduction = loadedChannelSettings.m_NoiseReduction;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_Sharpness = loadedChannelSettings.m_Sharpness;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod = loadedChannelSettings.m_InterlaceMethod;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_OutputToAllSpeakers = loadedChannelSettings.m_OutputToAllSpeakers;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay = loadedChannelSettings.m_AudioDelay;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream = loadedChannelSettings.m_AudioStream;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = loadedChannelSettings.m_SubtitleOn;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay = loadedChannelSettings.m_SubtitleDelay;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomNonLinStretch = loadedChannelSettings.m_CustomNonLinStretch;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ScalingMethod = loadedChannelSettings.m_ScalingMethod;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_PostProcess = loadedChannelSettings.m_PostProcess;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode = loadedChannelSettings.m_DeinterlaceMode;
/* only change the view mode if it's different */
- if (g_settings.m_currentVideoSettings.m_ViewMode != loadedChannelSettings.m_ViewMode)
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode != loadedChannelSettings.m_ViewMode)
{
- g_settings.m_currentVideoSettings.m_ViewMode = loadedChannelSettings.m_ViewMode;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode = loadedChannelSettings.m_ViewMode;
- g_renderManager.SetViewMode(g_settings.m_currentVideoSettings.m_ViewMode);
- g_settings.m_currentVideoSettings.m_CustomZoomAmount = g_settings.m_fZoomAmount;
- g_settings.m_currentVideoSettings.m_CustomPixelRatio = g_settings.m_fPixelRatio;
+ g_renderManager.SetViewMode(CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount = g_settings.m_fZoomAmount;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio = g_settings.m_fPixelRatio;
}
/* only change the subtitle stream, if it's different */
- if (g_settings.m_currentVideoSettings.m_SubtitleStream != loadedChannelSettings.m_SubtitleStream)
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream != loadedChannelSettings.m_SubtitleStream)
{
- g_settings.m_currentVideoSettings.m_SubtitleStream = loadedChannelSettings.m_SubtitleStream;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream = loadedChannelSettings.m_SubtitleStream;
- g_application.m_pPlayer->SetSubtitle(g_settings.m_currentVideoSettings.m_SubtitleStream);
+ g_application.m_pPlayer->SetSubtitle(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream);
}
/* only change the audio stream if it's different */
- if (g_application.m_pPlayer->GetAudioStream() != g_settings.m_currentVideoSettings.m_AudioStream &&
- g_settings.m_currentVideoSettings.m_AudioStream >= 0)
- g_application.m_pPlayer->SetAudioStream(g_settings.m_currentVideoSettings.m_AudioStream);
-
- g_application.m_pPlayer->SetAVDelay(g_settings.m_currentVideoSettings.m_AudioDelay);
- g_application.m_pPlayer->SetDynamicRangeCompression((long)(g_settings.m_currentVideoSettings.m_VolumeAmplification * 100));
- g_application.m_pPlayer->SetSubtitleVisible(g_settings.m_currentVideoSettings.m_SubtitleOn);
- g_application.m_pPlayer->SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
+ if (g_application.m_pPlayer->GetAudioStream() != CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream &&
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream >= 0)
+ g_application.m_pPlayer->SetAudioStream(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream);
+
+ g_application.m_pPlayer->SetAVDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay);
+ g_application.m_pPlayer->SetDynamicRangeCompression((long)(CMediaSettings::Get().GetCurrentVideoSettings().m_VolumeAmplification * 100));
+ g_application.m_pPlayer->SetSubtitleVisible(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn);
+ g_application.m_pPlayer->SetSubTitleDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
/* settings can be saved on next channel switch */
m_bIsValidChannelSettings = true;
diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp
index a85006b75d..53a9b5609f 100644
--- a/xbmc/settings/AdvancedSettings.cpp
+++ b/xbmc/settings/AdvancedSettings.cpp
@@ -43,6 +43,34 @@ CAdvancedSettings::CAdvancedSettings()
m_initialized = false;
}
+void CAdvancedSettings::OnSettingsLoaded()
+{
+ // load advanced settings
+ Load();
+
+ // Add the list of disc stub extensions (if any) to the list of video extensions
+ if (!g_settings.m_discStubExtensions.IsEmpty())
+ g_settings.m_videoExtensions += "|" + g_settings.m_discStubExtensions;
+
+ // default players?
+ CLog::Log(LOGNOTICE, "Default DVD Player: %s", m_videoDefaultDVDPlayer.c_str());
+ CLog::Log(LOGNOTICE, "Default Video Player: %s", m_videoDefaultPlayer.c_str());
+ CLog::Log(LOGNOTICE, "Default Audio Player: %s", m_audioDefaultPlayer.c_str());
+
+ // setup any logging...
+ if (g_guiSettings.GetBool("debug.showloginfo"))
+ {
+ m_logLevel = std::max(m_logLevelHint, LOG_LEVEL_DEBUG_FREEMEM);
+ CLog::Log(LOGNOTICE, "Enabled debug logging due to GUI setting (%d)", m_logLevel);
+ }
+ else
+ {
+ m_logLevel = std::min(m_logLevelHint, LOG_LEVEL_DEBUG/*LOG_LEVEL_NORMAL*/);
+ CLog::Log(LOGNOTICE, "Disabled debug logging due to GUI setting. Level %d.", m_logLevel);
+ }
+ CLog::SetLogLevel(m_logLevel);
+}
+
void CAdvancedSettings::Initialize()
{
m_audioHeadRoom = 0;
diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h
index 4bc7cb013b..0e6f7ac090 100644
--- a/xbmc/settings/AdvancedSettings.h
+++ b/xbmc/settings/AdvancedSettings.h
@@ -20,6 +20,8 @@
*/
#include <vector>
+
+#include "settings/ISettingsHandler.h"
#include "utils/StdString.h"
#include "utils/GlobalsHandling.h"
@@ -80,13 +82,15 @@ struct RefreshVideoLatency
typedef std::vector<TVShowRegexp> SETTINGS_TVSHOWLIST;
-class CAdvancedSettings
+class CAdvancedSettings : public ISettingsHandler
{
public:
CAdvancedSettings();
static CAdvancedSettings* getInstance();
+ virtual void OnSettingsLoaded();
+
void Initialize();
bool Initialized() { return m_initialized; };
void AddSettingsFile(const CStdString &filename);
diff --git a/xbmc/settings/GUISettings.cpp b/xbmc/settings/GUISettings.cpp
index 8dba6d37e5..a5a33e678a 100644
--- a/xbmc/settings/GUISettings.cpp
+++ b/xbmc/settings/GUISettings.cpp
@@ -31,6 +31,7 @@
#include "Application.h"
#include "AdvancedSettings.h"
#include "guilib/LocalizeStrings.h"
+#include "utils/CharsetConverter.h"
#include "utils/StringUtils.h"
#include "utils/SystemInfo.h"
#include "utils/log.h"
@@ -226,6 +227,24 @@ CSettingAddon::CSettingAddon(int iOrder, const char *strSetting, int iLabel, con
{
}
+CSettingsCategory* CSettingsGroup::AddCategory(const char *strCategory, int labelID)
+{
+ // Remove the category if it already exists
+ for (vecSettingsCategory::iterator it = m_vecCategories.begin(); it != m_vecCategories.end(); it++)
+ {
+ if ((*it)->m_strCategory.Equals(strCategory))
+ {
+ delete (*it);
+ m_vecCategories.erase(it);
+ break;
+ }
+ }
+ CSettingsCategory *pCategory = new CSettingsCategory(strCategory, labelID);
+ if (pCategory)
+ m_vecCategories.push_back(pCategory);
+ return pCategory;
+}
+
void CSettingsGroup::GetCategories(vecSettingsCategory &vecCategories)
{
vecCategories.clear();
@@ -754,11 +773,11 @@ void CGUISettings::Initialize()
AddInt(vp, "videoplayer.errorinaspect", 22021, 0, 0, 1, 20, SPIN_CONTROL_INT_PLUS, MASK_PERCENT, TEXT_NONE);
map<int,int> stretch;
- stretch.insert(make_pair(630,VIEW_MODE_NORMAL));
- stretch.insert(make_pair(633,VIEW_MODE_WIDE_ZOOM));
- stretch.insert(make_pair(634,VIEW_MODE_STRETCH_16x9));
- stretch.insert(make_pair(631,VIEW_MODE_ZOOM));
- AddInt(vp, "videoplayer.stretch43", 173, VIEW_MODE_NORMAL, stretch, SPIN_CONTROL_TEXT);
+ stretch.insert(make_pair(630,ViewModeNormal));
+ stretch.insert(make_pair(633,ViewModeWideZoom));
+ stretch.insert(make_pair(634,ViewModeStretch16x9));
+ stretch.insert(make_pair(631,ViewModeZoom));
+ AddInt(vp, "videoplayer.stretch43", 173, ViewModeNormal, stretch, SPIN_CONTROL_TEXT);
#ifdef HAVE_LIBVDPAU
AddBool(NULL, "videoplayer.vdpau_allow_xrandr", 13122, false);
#endif
diff --git a/xbmc/settings/GUISettings.h b/xbmc/settings/GUISettings.h
index 98f9836d99..eb788314ff 100644
--- a/xbmc/settings/GUISettings.h
+++ b/xbmc/settings/GUISettings.h
@@ -436,13 +436,7 @@ public:
m_vecCategories.clear();
};
- CSettingsCategory* AddCategory(const char *strCategory, int labelID)
- {
- CSettingsCategory *pCategory = new CSettingsCategory(strCategory, labelID);
- if (pCategory)
- m_vecCategories.push_back(pCategory);
- return pCategory;
- }
+ CSettingsCategory* AddCategory(const char *strCategory, int labelID);
void GetCategories(vecSettingsCategory &vecCategories);
int GetLabelID() { return m_labelID; };
int GetGroupID() { return m_groupID; };
diff --git a/xbmc/settings/ISettingsHandler.h b/xbmc/settings/ISettingsHandler.h
new file mode 100644
index 0000000000..15804377c3
--- /dev/null
+++ b/xbmc/settings/ISettingsHandler.h
@@ -0,0 +1,58 @@
+#pragma once
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+class ISettingsHandler
+{
+public:
+ virtual ~ISettingsHandler() { }
+
+ /*!
+ \brief Settings loading has been initiated.
+
+ \return True if the settings should be loaded, false if the loading should be aborted.
+ */
+ virtual bool OnSettingsLoading() { return true; }
+ /*!
+ \brief Settings have been loaded.
+
+ This callback can be used to trigger loading other settings.
+ */
+ virtual void OnSettingsLoaded() { }
+ /*!
+ \brief Settings saving has been initiated.
+
+ \return True if the settings should be saved, false if the saving should be aborted.
+ */
+ virtual bool OnSettingsSaving() const { return true; }
+ /*!
+ \brief Settings have been saved.
+
+ This callback can be used to trigger saving other settings.
+ */
+ virtual void OnSettingsSaved() const { }
+ /*!
+ \brief Settings have been cleared.
+
+ This callback can be used to trigger clearing any state variables
+ (e.g. before re-loading the settings).
+ */
+ virtual void OnSettingsCleared() { }
+};
diff --git a/xbmc/settings/ISubSettings.h b/xbmc/settings/ISubSettings.h
new file mode 100644
index 0000000000..3f3b316646
--- /dev/null
+++ b/xbmc/settings/ISubSettings.h
@@ -0,0 +1,47 @@
+#pragma once
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+class TiXmlNode;
+
+class ISubSettings
+{
+public:
+ virtual ~ISubSettings() { }
+
+ /*!
+ \brief Load settings from the given XML node.
+
+ \param settings XML node containing setting values
+ \return True if loading the settings was successful, false otherwise.
+ */
+ virtual bool Load(const TiXmlNode *settings) { return true; }
+ /*!
+ \brief Save settings to the given XML node.
+
+ \param settings XML node in which the settings will be saved
+ \return True if saving the settings was successful, false otherwise.
+ */
+ virtual bool Save(TiXmlNode *settings) const { return true; }
+ /*!
+ \brief Clear any loaded setting values.
+ */
+ virtual void Clear() { }
+}; \ No newline at end of file
diff --git a/xbmc/settings/Makefile b/xbmc/settings/Makefile
index d77b7e95b6..35f892bd6a 100644
--- a/xbmc/settings/Makefile
+++ b/xbmc/settings/Makefile
@@ -1,7 +1,10 @@
SRCS=AdvancedSettings.cpp \
GUISettings.cpp \
+ MediaSettings.cpp \
+ MediaSourceSettings.cpp \
Profile.cpp \
Settings.cpp \
+ SkinSettings.cpp \
VideoSettings.cpp \
LIB=settings.a
diff --git a/xbmc/settings/MediaSettings.cpp b/xbmc/settings/MediaSettings.cpp
new file mode 100644
index 0000000000..61c426713a
--- /dev/null
+++ b/xbmc/settings/MediaSettings.cpp
@@ -0,0 +1,211 @@
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "MediaSettings.h"
+#include "threads/SingleLock.h"
+#include "utils/log.h"
+#include "utils/XBMCTinyXML.h"
+#include "utils/XMLUtils.h"
+
+using namespace std;
+
+CMediaSettings::CMediaSettings()
+{
+ m_watchedModes["movies"] = WatchedModeAll;
+ m_watchedModes["tvshows"] = WatchedModeAll;
+ m_watchedModes["musicvideos"] = WatchedModeAll;
+}
+
+CMediaSettings::~CMediaSettings()
+{ }
+
+CMediaSettings& CMediaSettings::Get()
+{
+ static CMediaSettings sMediaSettings;
+ return sMediaSettings;
+}
+
+bool CMediaSettings::Load(const TiXmlNode *settings)
+{
+ if (settings == NULL)
+ return false;
+
+ CSingleLock lock(m_critical);
+ const TiXmlElement *pElement = settings->FirstChildElement("defaultvideosettings");
+ if (pElement != NULL)
+ {
+ int deinterlaceMode;
+ bool deinterlaceModePresent = XMLUtils::GetInt(pElement, "deinterlacemode", deinterlaceMode, VS_DEINTERLACEMODE_OFF, VS_DEINTERLACEMODE_FORCE);
+ int interlaceMethod;
+ bool interlaceMethodPresent = XMLUtils::GetInt(pElement, "interlacemethod", interlaceMethod, VS_INTERLACEMETHOD_AUTO, VS_INTERLACEMETHOD_MAX);
+ // For smooth conversion of settings stored before the deinterlaceMode existed
+ if (!deinterlaceModePresent && interlaceMethodPresent)
+ {
+ if (interlaceMethod == VS_INTERLACEMETHOD_NONE)
+ {
+ deinterlaceMode = VS_DEINTERLACEMODE_OFF;
+ interlaceMethod = VS_INTERLACEMETHOD_AUTO;
+ }
+ else if (interlaceMethod == VS_INTERLACEMETHOD_AUTO)
+ deinterlaceMode = VS_DEINTERLACEMODE_AUTO;
+ else
+ deinterlaceMode = VS_DEINTERLACEMODE_FORCE;
+ }
+ m_defaultVideoSettings.m_DeinterlaceMode = (EDEINTERLACEMODE)deinterlaceMode;
+ m_defaultVideoSettings.m_InterlaceMethod = (EINTERLACEMETHOD)interlaceMethod;
+ int scalingMethod;
+ if (!XMLUtils::GetInt(pElement, "scalingmethod", scalingMethod, VS_SCALINGMETHOD_NEAREST, VS_SCALINGMETHOD_MAX))
+ scalingMethod = (int)VS_SCALINGMETHOD_LINEAR;
+ m_defaultVideoSettings.m_ScalingMethod = (ESCALINGMETHOD)scalingMethod;
+
+ XMLUtils::GetInt(pElement, "viewmode", m_defaultVideoSettings.m_ViewMode, ViewModeNormal, ViewModeCustom);
+ if (!XMLUtils::GetFloat(pElement, "zoomamount", m_defaultVideoSettings.m_CustomZoomAmount, 0.5f, 2.0f))
+ m_defaultVideoSettings.m_CustomZoomAmount = 1.0f;
+ if (!XMLUtils::GetFloat(pElement, "pixelratio", m_defaultVideoSettings.m_CustomPixelRatio, 0.5f, 2.0f))
+ m_defaultVideoSettings.m_CustomPixelRatio = 1.0f;
+ if (!XMLUtils::GetFloat(pElement, "verticalshift", m_defaultVideoSettings.m_CustomVerticalShift, -2.0f, 2.0f))
+ m_defaultVideoSettings.m_CustomVerticalShift = 0.0f;
+ if (!XMLUtils::GetFloat(pElement, "volumeamplification", m_defaultVideoSettings.m_VolumeAmplification, VOLUME_DRC_MINIMUM * 0.01f, VOLUME_DRC_MAXIMUM * 0.01f))
+ m_defaultVideoSettings.m_VolumeAmplification = VOLUME_DRC_MINIMUM * 0.01f;
+ if (!XMLUtils::GetFloat(pElement, "noisereduction", m_defaultVideoSettings.m_NoiseReduction, 0.0f, 1.0f))
+ m_defaultVideoSettings.m_NoiseReduction = 0.0f;
+ XMLUtils::GetBoolean(pElement, "postprocess", m_defaultVideoSettings.m_PostProcess);
+ if (!XMLUtils::GetFloat(pElement, "sharpness", m_defaultVideoSettings.m_Sharpness, -1.0f, 1.0f))
+ m_defaultVideoSettings.m_Sharpness = 0.0f;
+ XMLUtils::GetBoolean(pElement, "outputtoallspeakers", m_defaultVideoSettings.m_OutputToAllSpeakers);
+ XMLUtils::GetBoolean(pElement, "showsubtitles", m_defaultVideoSettings.m_SubtitleOn);
+ if (!XMLUtils::GetFloat(pElement, "brightness", m_defaultVideoSettings.m_Brightness, 0, 100))
+ m_defaultVideoSettings.m_Brightness = 50;
+ if (!XMLUtils::GetFloat(pElement, "contrast", m_defaultVideoSettings.m_Contrast, 0, 100))
+ m_defaultVideoSettings.m_Contrast = 50;
+ if (!XMLUtils::GetFloat(pElement, "gamma", m_defaultVideoSettings.m_Gamma, 0, 100))
+ m_defaultVideoSettings.m_Gamma = 20;
+ if (!XMLUtils::GetFloat(pElement, "audiodelay", m_defaultVideoSettings.m_AudioDelay, -10.0f, 10.0f))
+ m_defaultVideoSettings.m_AudioDelay = 0.0f;
+ if (!XMLUtils::GetFloat(pElement, "subtitledelay", m_defaultVideoSettings.m_SubtitleDelay, -10.0f, 10.0f))
+ m_defaultVideoSettings.m_SubtitleDelay = 0.0f;
+ XMLUtils::GetBoolean(pElement, "autocrop", m_defaultVideoSettings.m_Crop);
+ XMLUtils::GetBoolean(pElement, "nonlinstretch", m_defaultVideoSettings.m_CustomNonLinStretch);
+
+ m_defaultVideoSettings.m_SubtitleCached = false;
+ }
+
+ // Read the watchmode settings for the various media views
+ pElement = settings->FirstChildElement("myvideos");
+ if (pElement != NULL)
+ {
+ int tmp;
+ if (XMLUtils::GetInt(pElement, "watchmodemovies", tmp, (int)WatchedModeAll, (int)WatchedModeWatched))
+ m_watchedModes["movies"] = (WatchedMode)tmp;
+ if (XMLUtils::GetInt(pElement, "watchmodetvshows", tmp, (int)WatchedModeAll, (int)WatchedModeWatched))
+ m_watchedModes["tvshows"] = (WatchedMode)tmp;
+ if (XMLUtils::GetInt(pElement, "watchmodemusicvideos", tmp, (int)WatchedModeAll, (int)WatchedModeWatched))
+ m_watchedModes["musicvideos"] = (WatchedMode)tmp;
+ }
+
+ return true;
+}
+
+bool CMediaSettings::Save(TiXmlNode *settings) const
+{
+ if (settings == NULL)
+ return false;
+
+ CSingleLock lock(m_critical);
+ // default video settings
+ TiXmlElement videoSettingsNode("defaultvideosettings");
+ TiXmlNode *pNode = settings->InsertEndChild(videoSettingsNode);
+ if (pNode == NULL)
+ return false;
+
+ XMLUtils::SetInt(pNode, "deinterlacemode", m_defaultVideoSettings.m_DeinterlaceMode);
+ XMLUtils::SetInt(pNode, "interlacemethod", m_defaultVideoSettings.m_InterlaceMethod);
+ XMLUtils::SetInt(pNode, "scalingmethod", m_defaultVideoSettings.m_ScalingMethod);
+ XMLUtils::SetFloat(pNode, "noisereduction", m_defaultVideoSettings.m_NoiseReduction);
+ XMLUtils::SetBoolean(pNode, "postprocess", m_defaultVideoSettings.m_PostProcess);
+ XMLUtils::SetFloat(pNode, "sharpness", m_defaultVideoSettings.m_Sharpness);
+ XMLUtils::SetInt(pNode, "viewmode", m_defaultVideoSettings.m_ViewMode);
+ XMLUtils::SetFloat(pNode, "zoomamount", m_defaultVideoSettings.m_CustomZoomAmount);
+ XMLUtils::SetFloat(pNode, "pixelratio", m_defaultVideoSettings.m_CustomPixelRatio);
+ XMLUtils::SetFloat(pNode, "verticalshift", m_defaultVideoSettings.m_CustomVerticalShift);
+ XMLUtils::SetFloat(pNode, "volumeamplification", m_defaultVideoSettings.m_VolumeAmplification);
+ XMLUtils::SetBoolean(pNode, "outputtoallspeakers", m_defaultVideoSettings.m_OutputToAllSpeakers);
+ XMLUtils::SetBoolean(pNode, "showsubtitles", m_defaultVideoSettings.m_SubtitleOn);
+ XMLUtils::SetFloat(pNode, "brightness", m_defaultVideoSettings.m_Brightness);
+ XMLUtils::SetFloat(pNode, "contrast", m_defaultVideoSettings.m_Contrast);
+ XMLUtils::SetFloat(pNode, "gamma", m_defaultVideoSettings.m_Gamma);
+ XMLUtils::SetFloat(pNode, "audiodelay", m_defaultVideoSettings.m_AudioDelay);
+ XMLUtils::SetFloat(pNode, "subtitledelay", m_defaultVideoSettings.m_SubtitleDelay);
+ XMLUtils::SetBoolean(pNode, "autocrop", m_defaultVideoSettings.m_Crop);
+ XMLUtils::SetBoolean(pNode, "nonlinstretch", m_defaultVideoSettings.m_CustomNonLinStretch);
+
+ pNode = settings->FirstChild("myvideos");
+ if (pNode == NULL)
+ {
+ TiXmlElement videosNode("myvideos");
+ pNode = settings->InsertEndChild(videosNode);
+ if (pNode == NULL)
+ return false;
+ }
+
+ XMLUtils::SetInt(pNode, "watchmodemovies", m_watchedModes.find("movies")->second);
+ XMLUtils::SetInt(pNode, "watchmodetvshows", m_watchedModes.find("tvshows")->second);
+ XMLUtils::SetInt(pNode, "watchmodemusicvideos", m_watchedModes.find("musicvideos")->second);
+
+ return true;
+}
+
+int CMediaSettings::GetWatchedMode(const std::string &content) const
+{
+ CSingleLock lock(m_critical);
+ WatchedModes::const_iterator it = m_watchedModes.find(GetWatchedContent(content));
+ if (it != m_watchedModes.end())
+ return it->second;
+
+ return WatchedModeAll;
+}
+
+void CMediaSettings::SetWatchedMode(const std::string &content, WatchedMode mode)
+{
+ CSingleLock lock(m_critical);
+ WatchedModes::iterator it = m_watchedModes.find(GetWatchedContent(content));
+ if (it != m_watchedModes.end())
+ it->second = mode;
+}
+
+void CMediaSettings::CycleWatchedMode(const std::string &content)
+{
+ CSingleLock lock(m_critical);
+ WatchedModes::iterator it = m_watchedModes.find(GetWatchedContent(content));
+ if (it != m_watchedModes.end())
+ {
+ it->second = (WatchedMode)((int)it->second + 1);
+ if (it->second > WatchedModeWatched)
+ it->second = WatchedModeAll;
+ }
+}
+
+std::string CMediaSettings::GetWatchedContent(const std::string &content)
+{
+ if (content == "seasons" || content == "episodes")
+ return "tvshows";
+
+ return content;
+}
diff --git a/xbmc/settings/MediaSettings.h b/xbmc/settings/MediaSettings.h
new file mode 100644
index 0000000000..9b29fc7268
--- /dev/null
+++ b/xbmc/settings/MediaSettings.h
@@ -0,0 +1,89 @@
+#pragma once
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <map>
+#include <string>
+
+#include "settings/ISubSettings.h"
+#include "settings/VideoSettings.h"
+#include "threads/CriticalSection.h"
+
+#define VOLUME_DRC_MINIMUM 0 // 0dB
+#define VOLUME_DRC_MAXIMUM 6000 // 60dB
+
+class TiXmlNode;
+
+typedef enum {
+ WatchedModeAll = 0,
+ WatchedModeUnwatched,
+ WatchedModeWatched
+} WatchedMode;
+
+class CMediaSettings : public ISubSettings
+{
+public:
+ static CMediaSettings& Get();
+
+ virtual bool Load(const TiXmlNode *settings);
+ virtual bool Save(TiXmlNode *settings) const;
+
+ const CVideoSettings& GetDefaultVideoSettings() const { return m_defaultVideoSettings; }
+ CVideoSettings& GetDefaultVideoSettings() { return m_defaultVideoSettings; }
+ const CVideoSettings& GetCurrentVideoSettings() const { return m_currentVideoSettings; }
+ CVideoSettings& GetCurrentVideoSettings() { return m_currentVideoSettings; }
+
+ /*! \brief Retreive the watched mode for the given content type
+ \param content Current content type
+ \return the current watch mode for this content type, WATCH_MODE_ALL if the content type is unknown.
+ \sa SetWatchMode
+ */
+ int GetWatchedMode(const std::string &content) const;
+
+ /*! \brief Set the watched mode for the given content type
+ \param content Current content type
+ \param value Watched mode to set
+ \sa GetWatchMode
+ */
+ void SetWatchedMode(const std::string &content, WatchedMode mode);
+
+ /*! \brief Cycle the watched mode for the given content type
+ \param content Current content type
+ \sa GetWatchMode, SetWatchMode
+ */
+ void CycleWatchedMode(const std::string &content);
+
+protected:
+ CMediaSettings();
+ CMediaSettings(const CMediaSettings&);
+ CMediaSettings const& operator=(CMediaSettings const&);
+ virtual ~CMediaSettings();
+
+ static std::string GetWatchedContent(const std::string &content);
+
+private:
+ CVideoSettings m_defaultVideoSettings;
+ CVideoSettings m_currentVideoSettings;
+
+ typedef std::map<std::string, WatchedMode> WatchedModes;
+ WatchedModes m_watchedModes;
+
+ CCriticalSection m_critical;
+};
diff --git a/xbmc/settings/MediaSourceSettings.cpp b/xbmc/settings/MediaSourceSettings.cpp
new file mode 100644
index 0000000000..60c679fa3d
--- /dev/null
+++ b/xbmc/settings/MediaSourceSettings.cpp
@@ -0,0 +1,495 @@
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "MediaSourceSettings.h"
+#include "URL.h"
+#include "Util.h"
+#include "filesystem/File.h"
+#include "settings/Settings.h"
+#include "utils/log.h"
+#include "utils/StringUtils.h"
+#include "utils/URIUtils.h"
+#include "utils/XBMCTinyXML.h"
+#include "utils/XMLUtils.h"
+
+#define SOURCES_FILE "sources.xml"
+#define XML_SOURCES "sources"
+#define XML_SOURCE "source"
+
+using namespace std;
+using namespace XFILE;
+
+CMediaSourceSettings::CMediaSourceSettings()
+{
+ Clear();
+}
+
+CMediaSourceSettings::~CMediaSourceSettings()
+{ }
+
+CMediaSourceSettings& CMediaSourceSettings::Get()
+{
+ static CMediaSourceSettings sMediaSourceSettings;
+ return sMediaSourceSettings;
+}
+
+std::string CMediaSourceSettings::GetSourcesFile()
+{
+ std::string file;
+ if (g_settings.GetCurrentProfile().hasSources())
+ file = g_settings.GetProfileUserDataFolder();
+ else
+ file = g_settings.GetUserDataFolder();
+
+ return URIUtils::AddFileToFolder(file, SOURCES_FILE);
+}
+
+void CMediaSourceSettings::OnSettingsLoaded()
+{
+ Load();
+}
+
+void CMediaSourceSettings::OnSettingsCleared()
+{
+ Clear();
+}
+
+bool CMediaSourceSettings::Load()
+{
+ return Load(GetSourcesFile());
+}
+
+bool CMediaSourceSettings::Load(const std::string &file)
+{
+ Clear();
+
+ if (!CFile::Exists(file))
+ return false;
+
+ CLog::Log(LOGNOTICE, "CMediaSourceSettings: loading media sources from %s", file.c_str());
+
+ // load xml file
+ CXBMCTinyXML xmlDoc;
+ if (!xmlDoc.LoadFile(file))
+ {
+ CLog::Log(LOGERROR, "CMediaSourceSettings: error loading %s: Line %d, %s", file.c_str(), xmlDoc.ErrorRow(), xmlDoc.ErrorDesc());
+ return false;
+ }
+
+ TiXmlElement *pRootElement = xmlDoc.RootElement();
+ if (pRootElement == NULL || !StringUtils::EqualsNoCase(pRootElement->ValueStr(), XML_SOURCES))
+ CLog::Log(LOGERROR, "CMediaSourceSettings: sources.xml file does not contain <sources>");
+
+ // parse sources
+ std::string dummy;
+ GetSources(pRootElement, "video", m_videoSources, dummy);
+ GetSources(pRootElement, "programs", m_programSources, m_defaultProgramSource);
+ GetSources(pRootElement, "pictures", m_pictureSources, m_defaultPictureSource);
+ GetSources(pRootElement, "files", m_fileSources, m_defaultFileSource);
+ GetSources(pRootElement, "music", m_musicSources, m_defaultMusicSource);
+
+ return true;
+}
+
+bool CMediaSourceSettings::Save()
+{
+ return Save(GetSourcesFile());
+}
+
+bool CMediaSourceSettings::Save(const std::string &file) const
+{
+ if (!CFile::Exists(file))
+ return false;
+
+ // TODO: Should we be specifying utf8 here??
+ CXBMCTinyXML doc;
+ TiXmlElement xmlRootElement(XML_SOURCES);
+ TiXmlNode *pRoot = doc.InsertEndChild(xmlRootElement);
+ if (pRoot == NULL)
+ return false;
+
+ // ok, now run through and save each sources section
+ SetSources(pRoot, "programs", m_programSources, m_defaultProgramSource);
+ SetSources(pRoot, "video", m_videoSources, "");
+ SetSources(pRoot, "music", m_musicSources, m_defaultMusicSource);
+ SetSources(pRoot, "pictures", m_pictureSources, m_defaultPictureSource);
+ SetSources(pRoot, "files", m_fileSources, m_defaultFileSource);
+
+ return doc.SaveFile(file);
+}
+
+void CMediaSourceSettings::Clear()
+{
+ m_programSources.clear();
+ m_pictureSources.clear();
+ m_fileSources.clear();
+ m_musicSources.clear();
+ m_videoSources.clear();
+}
+
+VECSOURCES* CMediaSourceSettings::GetSources(const std::string &type)
+{
+ if (type == "programs" || type == "myprograms")
+ return &m_programSources;
+ else if (type == "files")
+ return &m_fileSources;
+ else if (type == "music")
+ return &m_musicSources;
+ else if (type == "video" || type == "videos")
+ return &m_videoSources;
+ else if (type == "pictures")
+ return &m_pictureSources;
+
+ return NULL;
+}
+
+const std::string& CMediaSourceSettings::GetDefaultSource(const std::string &type) const
+{
+ if (type == "programs" || type == "myprograms")
+ return m_defaultProgramSource;
+ else if (type == "files")
+ return m_defaultFileSource;
+ else if (type == "music")
+ return m_defaultMusicSource;
+ else if (type == "pictures")
+ return m_defaultPictureSource;
+
+ return StringUtils::Empty;
+}
+
+void CMediaSourceSettings::SetDefaultSource(const std::string &type, const std::string &source)
+{
+ if (type == "programs" || type == "myprograms")
+ m_defaultProgramSource = source;
+ else if (type == "files")
+ m_defaultFileSource = source;
+ else if (type == "music")
+ m_defaultMusicSource = source;
+ else if (type == "pictures")
+ m_defaultPictureSource = source;
+}
+
+// NOTE: This function does NOT save the sources.xml file - you need to call SaveSources() separately.
+bool CMediaSourceSettings::UpdateSource(const std::string &strType, const std::string strOldName, const std::string &strUpdateChild, const std::string &strUpdateValue)
+{
+ VECSOURCES *pShares = GetSources(strType);
+ if (pShares == NULL)
+ return false;
+
+ for (IVECSOURCES it = pShares->begin(); it != pShares->end(); it++)
+ {
+ if (it->strName == strOldName)
+ {
+ if (strUpdateChild == "name")
+ it->strName = strUpdateValue;
+ else if (strUpdateChild == "lockmode")
+ it->m_iLockMode = (LockType)strtol(strUpdateValue.c_str(), NULL, 10);
+ else if (strUpdateChild == "lockcode")
+ it->m_strLockCode = strUpdateValue;
+ else if (strUpdateChild == "badpwdcount")
+ it->m_iBadPwdCount = (int)strtol(strUpdateValue.c_str(), NULL, 10);
+ else if (strUpdateChild == "thumbnail")
+ it->m_strThumbnailImage = strUpdateValue;
+ else if (strUpdateChild == "path")
+ {
+ it->vecPaths.clear();
+ it->strPath = strUpdateValue;
+ it->vecPaths.push_back(strUpdateValue);
+ }
+ else
+ return false;
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool CMediaSourceSettings::DeleteSource(const std::string &strType, const std::string &strName, const std::string strPath, bool virtualSource /* = false */)
+{
+ VECSOURCES *pShares = GetSources(strType);
+ if (pShares == NULL)
+ return false;
+
+ bool found = false;
+
+ for (IVECSOURCES it = pShares->begin(); it != pShares->end(); it++)
+ {
+ if (it->strName == strName && it->strPath == strPath)
+ {
+ CLog::Log(LOGDEBUG, "CMediaSourceSettings: found share, removing!");
+ pShares->erase(it);
+ found = true;
+ break;
+ }
+ }
+
+ if (virtualSource)
+ return found;
+
+ return Save();
+}
+
+bool CMediaSourceSettings::AddShare(const std::string &type, const CMediaSource &share)
+{
+ VECSOURCES *pShares = GetSources(type);
+ if (pShares == NULL)
+ return false;
+
+ // translate dir and add to our current shares
+ string strPath1 = share.strPath;
+ if (strPath1.empty())
+ {
+ CLog::Log(LOGERROR, "CMediaSourceSettings: unable to add empty path");
+ return false;
+ }
+ StringUtils::ToUpper(strPath1);
+
+ CMediaSource shareToAdd = share;
+ if (strPath1.at(0) == '$')
+ {
+ shareToAdd.strPath = CUtil::TranslateSpecialSource(strPath1);
+ if (!share.strPath.empty())
+ CLog::Log(LOGDEBUG, "CMediaSourceSettings: translated (%s) to path (%s)", strPath1.c_str(), shareToAdd.strPath.c_str());
+ else
+ {
+ CLog::Log(LOGDEBUG, "CMediaSourceSettings: skipping invalid special directory token (%s)", strPath1.c_str());
+ return false;
+ }
+ }
+ pShares->push_back(shareToAdd);
+
+ if (!share.m_ignore)
+ return Save();
+
+ return true;
+}
+
+bool CMediaSourceSettings::UpdateShare(const std::string &type, const std::string &oldName, const CMediaSource &share)
+{
+ VECSOURCES *pShares = GetSources(type);
+ if (pShares == NULL)
+ return false;
+
+ // update our current share list
+ CMediaSource* pShare = NULL;
+ for (IVECSOURCES it = pShares->begin(); it != pShares->end(); it++)
+ {
+ if (it->strName == oldName)
+ {
+ it->strName = share.strName;
+ it->strPath = share.strPath;
+ it->vecPaths = share.vecPaths;
+ pShare = &(*it);
+ break;
+ }
+ }
+
+ if (pShare == NULL)
+ return false;
+
+ // Update our XML file as well
+ return Save();
+}
+
+bool CMediaSourceSettings::GetSource(const std::string &category, const TiXmlNode *source, CMediaSource &share)
+{
+ const TiXmlNode *pNodeName = source->FirstChild("name");
+ string strName;
+ if (pNodeName && pNodeName->FirstChild())
+ strName = pNodeName->FirstChild()->ValueStr();
+
+ // get multiple paths
+ vector<string> vecPaths;
+ const TiXmlElement *pPathName = source->FirstChildElement("path");
+ while (pPathName != NULL)
+ {
+ if (pPathName->FirstChild())
+ {
+ CStdString strPath = pPathName->FirstChild()->ValueStr();
+
+ // make sure there are no virtualpaths or stack paths defined in xboxmediacenter.xml
+ if (!URIUtils::IsStack(strPath))
+ {
+ // translate special tags
+ if (!strPath.empty() && strPath.at(0) == '$')
+ {
+ string strPathOld(strPath);
+ strPath = CUtil::TranslateSpecialSource(strPath);
+ }
+
+ // need to check path validity again as CUtil::TranslateSpecialSource() may have failed
+ if (!strPath.empty())
+ {
+ URIUtils::AddSlashAtEnd(strPath);
+ vecPaths.push_back(strPath);
+ }
+ }
+ else
+ CLog::Log(LOGERROR, "CMediaSourceSettings: invalid path type (%s) in source", strPath.c_str());
+ }
+
+ pPathName = pPathName->NextSiblingElement("path");
+ }
+
+ const TiXmlNode *pLockMode = source->FirstChild("lockmode");
+ const TiXmlNode *pLockCode = source->FirstChild("lockcode");
+ const TiXmlNode *pBadPwdCount = source->FirstChild("badpwdcount");
+ const TiXmlNode *pThumbnailNode = source->FirstChild("thumbnail");
+
+ if (strName.empty() || vecPaths.empty())
+ return false;
+
+ vector<CStdString> verifiedPaths;
+ // disallowed for files, or theres only a single path in the vector
+ if (StringUtils::EqualsNoCase(category, "files") || vecPaths.size() == 1)
+ verifiedPaths.push_back(vecPaths[0]);
+ // multiple paths?
+ else
+ {
+ // validate the paths
+ for (vector<string>::const_iterator path = vecPaths.begin(); path != vecPaths.end(); path++)
+ {
+ CURL url(*path);
+ string protocol = url.GetProtocol();
+ bool bIsInvalid = false;
+
+ // for my programs
+ if (StringUtils::EqualsNoCase(category, "programs") || StringUtils::EqualsNoCase(category, "myprograms"))
+ {
+ // only allow HD and plugins
+ if (url.IsLocal() || StringUtils::EqualsNoCase(protocol, "plugin"))
+ verifiedPaths.push_back(*path);
+ else
+ bIsInvalid = true;
+ }
+ // for others allow everything (if the user does something silly, we can't stop them)
+ else
+ verifiedPaths.push_back(*path);
+
+ // error message
+ if (bIsInvalid)
+ CLog::Log(LOGERROR,"CMediaSourceSettings: invalid path type (%s) for multipath source", path->c_str());
+ }
+
+ // no valid paths? skip to next source
+ if (verifiedPaths.empty())
+ {
+ CLog::Log(LOGERROR,"CMediaSourceSettings: missing or invalid <name> and/or <path> in source");
+ return false;
+ }
+ }
+
+ share.FromNameAndPaths(category, strName, verifiedPaths);
+
+ share.m_iBadPwdCount = 0;
+ if (pLockMode)
+ {
+ share.m_iLockMode = (LockType)strtol(pLockMode->FirstChild()->Value(), NULL, 10);
+ share.m_iHasLock = 2;
+ }
+
+ if (pLockCode && pLockCode->FirstChild())
+ share.m_strLockCode = pLockCode->FirstChild()->Value();
+
+ if (pBadPwdCount && pBadPwdCount->FirstChild())
+ share.m_iBadPwdCount = (int)strtol(pBadPwdCount->FirstChild()->Value(), NULL, 10);
+
+ if (pThumbnailNode && pThumbnailNode->FirstChild())
+ share.m_strThumbnailImage = pThumbnailNode->FirstChild()->Value();
+
+ return true;
+}
+
+void CMediaSourceSettings::GetSources(const TiXmlNode* pRootElement, const std::string& strTagName, VECSOURCES& items, std::string& strDefault)
+{
+ strDefault = "";
+ items.clear();
+
+ const TiXmlNode *pChild = pRootElement->FirstChild(strTagName.c_str());
+ if (pChild == NULL)
+ {
+ CLog::Log(LOGDEBUG, "CMediaSourceSettings: <%s> tag is missing or sources.xml is malformed", strTagName.c_str());
+ return;
+ }
+
+ pChild = pChild->FirstChild();
+ while (pChild != NULL)
+ {
+ std::string strValue = pChild->ValueStr();
+ if (strValue == XML_SOURCE || strValue == "bookmark") // "bookmark" left in for backwards compatibility
+ {
+ CMediaSource share;
+ if (GetSource(strTagName, pChild, share))
+ items.push_back(share);
+ else
+ CLog::Log(LOGERROR, "CMediaSourceSettings: Missing or invalid <name> and/or <path> in source");
+ }
+ else if (strValue == "default")
+ {
+ const TiXmlNode *pValueNode = pChild->FirstChild();
+ if (pValueNode)
+ {
+ std::string pszText = pChild->FirstChild()->ValueStr();
+ if (!pszText.empty())
+ strDefault = pszText;
+ CLog::Log(LOGDEBUG, "CMediaSourceSettings: Setting <default> source to : %s", strDefault.c_str());
+ }
+ }
+
+ pChild = pChild->NextSibling();
+ }
+}
+
+bool CMediaSourceSettings::SetSources(TiXmlNode *root, const char *section, const VECSOURCES &shares, const std::string &defaultPath) const
+{
+ TiXmlElement sectionElement(section);
+ TiXmlNode *sectionNode = root->InsertEndChild(sectionElement);
+ if (sectionNode == NULL)
+ return false;
+
+ XMLUtils::SetPath(sectionNode, "default", defaultPath);
+ for (CIVECSOURCES it = shares.begin(); it != shares.end(); it++)
+ {
+ const CMediaSource &share = *it;
+ if (share.m_ignore)
+ continue;
+
+ TiXmlElement source(XML_SOURCE);
+ XMLUtils::SetString(&source, "name", share.strName);
+
+ for (unsigned int i = 0; i < share.vecPaths.size(); i++)
+ XMLUtils::SetPath(&source, "path", share.vecPaths[i]);
+
+ if (share.m_iHasLock)
+ {
+ XMLUtils::SetInt(&source, "lockmode", share.m_iLockMode);
+ XMLUtils::SetString(&source, "lockcode", share.m_strLockCode);
+ XMLUtils::SetInt(&source, "badpwdcount", share.m_iBadPwdCount);
+ }
+ if (!share.m_strThumbnailImage.empty())
+ XMLUtils::SetPath(&source, "thumbnail", share.m_strThumbnailImage);
+
+ sectionNode->InsertEndChild(source);
+ }
+
+ return true;
+}
diff --git a/xbmc/settings/MediaSourceSettings.h b/xbmc/settings/MediaSourceSettings.h
new file mode 100644
index 0000000000..0602f80383
--- /dev/null
+++ b/xbmc/settings/MediaSourceSettings.h
@@ -0,0 +1,75 @@
+#pragma once
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+
+#include "MediaSource.h"
+#include "settings/ISettingsHandler.h"
+
+class TiXmlNode;
+
+class CMediaSourceSettings : public ISettingsHandler
+{
+public:
+ static CMediaSourceSettings& Get();
+
+ static std::string GetSourcesFile();
+
+ virtual void OnSettingsLoaded();
+ virtual void OnSettingsCleared();
+
+ bool Load();
+ bool Load(const std::string &file);
+ bool Save();
+ bool Save(const std::string &file) const;
+ void Clear();
+
+ VECSOURCES* GetSources(const std::string &type);
+ const std::string& GetDefaultSource(const std::string &type) const;
+ void SetDefaultSource(const std::string &type, const std::string &source);
+
+ bool UpdateSource(const std::string &strType, const std::string strOldName, const std::string &strUpdateChild, const std::string &strUpdateValue);
+ bool DeleteSource(const std::string &strType, const std::string &strName, const std::string strPath, bool virtualSource = false);
+ bool AddShare(const std::string &type, const CMediaSource &share);
+ bool UpdateShare(const std::string &type, const std::string &oldName, const CMediaSource &share);
+
+protected:
+ CMediaSourceSettings();
+ CMediaSourceSettings(const CMediaSourceSettings&);
+ CMediaSourceSettings const& operator=(CMediaSourceSettings const&);
+ virtual ~CMediaSourceSettings();
+
+private:
+ bool GetSource(const std::string &category, const TiXmlNode *source, CMediaSource &share);
+ void GetSources(const TiXmlNode* pRootElement, const std::string& strTagName, VECSOURCES& items, std::string& strDefault);
+ bool SetSources(TiXmlNode *root, const char *section, const VECSOURCES &shares, const std::string &defaultPath) const;
+
+ VECSOURCES m_programSources;
+ VECSOURCES m_pictureSources;
+ VECSOURCES m_fileSources;
+ VECSOURCES m_musicSources;
+ VECSOURCES m_videoSources;
+
+ std::string m_defaultProgramSource;
+ std::string m_defaultMusicSource;
+ std::string m_defaultPictureSource;
+ std::string m_defaultFileSource;
+};
diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
index 090ca9990f..8f18e00169 100644
--- a/xbmc/settings/Settings.cpp
+++ b/xbmc/settings/Settings.cpp
@@ -27,6 +27,7 @@
#include "URL.h"
#include "guilib/GUIFontManager.h"
#include "input/ButtonTranslator.h"
+#include "utils/CharsetConverter.h"
#include "utils/XMLUtils.h"
#include "PasswordManager.h"
#include "utils/RegExp.h"
@@ -48,16 +49,13 @@
#if defined(_LINUX) && defined(HAS_FILESYSTEM_SMB)
#include "filesystem/SMBDirectory.h"
#endif
-#include "cores/playercorefactory/PlayerCoreFactory.h"
#include "utils/FileUtils.h"
#include "utils/URIUtils.h"
#include "input/MouseStat.h"
#include "filesystem/File.h"
#include "filesystem/DirectoryCache.h"
#include "DatabaseManager.h"
-#ifdef HAS_UPNP
-#include "network/upnp/UPnPSettings.h"
-#endif
+#include "threads/SingleLock.h"
#include "utils/RssManager.h"
using namespace std;
@@ -67,6 +65,42 @@ CSettings::CSettings(void)
{
}
+void CSettings::RegisterSettingsHandler(ISettingsHandler *settingsHandler)
+{
+ if (settingsHandler == NULL)
+ return;
+
+ CSingleLock lock(m_critical);
+ m_settingsHandlers.insert(settingsHandler);
+}
+
+void CSettings::UnregisterSettingsHandler(ISettingsHandler *settingsHandler)
+{
+ if (settingsHandler == NULL)
+ return;
+
+ CSingleLock lock(m_critical);
+ m_settingsHandlers.erase(settingsHandler);
+}
+
+void CSettings::RegisterSubSettings(ISubSettings *subSettings)
+{
+ if (subSettings == NULL)
+ return;
+
+ CSingleLock lock(m_critical);
+ m_subSettings.insert(subSettings);
+}
+
+void CSettings::UnregisterSubSettings(ISubSettings *subSettings)
+{
+ if (subSettings == NULL)
+ return;
+
+ CSingleLock lock(m_critical);
+ m_subSettings.erase(subSettings);
+}
+
void CSettings::Initialize()
{
RESOLUTION_INFO res;
@@ -123,10 +157,6 @@ void CSettings::Initialize()
m_iMyMusicStartWindow = WINDOW_MUSIC_FILES;
m_iVideoStartWindow = WINDOW_VIDEO_FILES;
- m_watchMode["movies"] = VIDEO_SHOW_ALL;
- m_watchMode["tvshows"] = VIDEO_SHOW_ALL;
- m_watchMode["musicvideos"] = VIDEO_SHOW_ALL;
-
m_iSystemTimeTotalUp = 0;
m_userAgent = g_sysinfo.GetUserAgent();
@@ -141,22 +171,20 @@ void CSettings::Initialize()
}
CSettings::~CSettings(void)
-{ }
+{
+ // first clear all registered settings handler and subsettings
+ // implementations because we can't be sure that they are still valid
+ m_settingsHandlers.clear();
+ m_subSettings.clear();
+
+ Clear();
+}
void CSettings::Save() const
{
- if (g_application.m_bStop)
- {
- //don't save settings when we're busy stopping the application
- //a lot of screens try to save settings on deinit and deinit is called
- //for every screen when the application is stopping.
- return ;
- }
if (!SaveSettings(GetSettingsFile()))
- {
CLog::Log(LOGERROR, "Unable to save settings to %s", GetSettingsFile().c_str());
- }
}
bool CSettings::Reset()
@@ -169,6 +197,9 @@ bool CSettings::Reset()
bool CSettings::Load()
{
+ if (!OnSettingsLoading())
+ return false;
+
CSpecialProtocol::SetProfilePath(GetProfileUserDataFolder());
CLog::Log(LOGNOTICE, "loading %s", GetSettingsFile().c_str());
if (!LoadSettings(GetSettingsFile()))
@@ -178,215 +209,11 @@ bool CSettings::Load()
return false;
}
- LoadSources();
- CRssManager::Get().Load();
LoadUserFolderLayout();
- return true;
-}
-
-VECSOURCES *CSettings::GetSourcesFromType(const CStdString &type)
-{
- if (type == "programs" || type == "myprograms")
- return &m_programSources;
- else if (type == "files")
- return &m_fileSources;
- else if (type == "music")
- return &m_musicSources;
- else if (type == "video")
- return &m_videoSources;
- else if (type == "pictures")
- return &m_pictureSources;
-
- return NULL;
-}
-
-CStdString CSettings::GetDefaultSourceFromType(const CStdString &type)
-{
- CStdString defaultShare;
- if (type == "programs" || type == "myprograms")
- defaultShare = m_defaultProgramSource;
- else if (type == "files")
- defaultShare = m_defaultFileSource;
- else if (type == "music")
- defaultShare = m_defaultMusicSource;
- else if (type == "pictures")
- defaultShare = m_defaultPictureSource;
- return defaultShare;
-}
-
-void CSettings::GetSources(const TiXmlElement* pRootElement, const CStdString& strTagName, VECSOURCES& items, CStdString& strDefault)
-{
- //CLog::Log(LOGDEBUG, " Parsing <%s> tag", strTagName.c_str());
- strDefault = "";
-
- items.clear();
- const TiXmlNode *pChild = pRootElement->FirstChild(strTagName.c_str());
- if (pChild)
- {
- pChild = pChild->FirstChild();
- while (pChild > 0)
- {
- CStdString strValue = pChild->Value();
- if (strValue == "source" || strValue == "bookmark") // "bookmark" left in for backwards compatibility
- {
- CMediaSource share;
- if (GetSource(strTagName, pChild, share))
- {
- items.push_back(share);
- }
- else
- {
- CLog::Log(LOGERROR, " Missing or invalid <name> and/or <path> in source");
- }
- }
-
- if (strValue == "default")
- {
- const TiXmlNode *pValueNode = pChild->FirstChild();
- if (pValueNode)
- {
- const char* pszText = pChild->FirstChild()->Value();
- if (strlen(pszText) > 0)
- strDefault = pszText;
- CLog::Log(LOGDEBUG, " Setting <default> source to : %s", strDefault.c_str());
- }
- }
- pChild = pChild->NextSibling();
- }
- }
- else
- {
- CLog::Log(LOGDEBUG, " <%s> tag is missing or sources.xml is malformed", strTagName.c_str());
- }
-}
-
-bool CSettings::GetSource(const CStdString &category, const TiXmlNode *source, CMediaSource &share)
-{
- //CLog::Log(LOGDEBUG," ---- SOURCE START ----");
- const TiXmlNode *pNodeName = source->FirstChild("name");
- CStdString strName;
- if (pNodeName && pNodeName->FirstChild())
- {
- strName = pNodeName->FirstChild()->Value();
- //CLog::Log(LOGDEBUG," Found name: %s", strName.c_str());
- }
- // get multiple paths
- vector<CStdString> vecPaths;
- const TiXmlElement *pPathName = source->FirstChildElement("path");
- while (pPathName)
- {
- if (pPathName->FirstChild())
- {
- CStdString strPath = pPathName->FirstChild()->Value();
- // make sure there are no virtualpaths or stack paths defined in xboxmediacenter.xml
- //CLog::Log(LOGDEBUG," Found path: %s", strPath.c_str());
- if (!URIUtils::IsStack(strPath))
- {
- // translate special tags
- if (!strPath.IsEmpty() && strPath.at(0) == '$')
- {
- CStdString strPathOld(strPath);
- strPath = CUtil::TranslateSpecialSource(strPath);
- if (!strPath.IsEmpty())
- {
- //CLog::Log(LOGDEBUG," -> Translated to path: %s", strPath.c_str());
- }
- else
- {
- //CLog::Log(LOGERROR," -> Skipping invalid token: %s", strPathOld.c_str());
- pPathName = pPathName->NextSiblingElement("path");
- continue;
- }
- }
- URIUtils::AddSlashAtEnd(strPath);
- vecPaths.push_back(strPath);
- }
- else
- CLog::Log(LOGERROR," Invalid path type (%s) in source", strPath.c_str());
- }
- pPathName = pPathName->NextSiblingElement("path");
- }
-
- const TiXmlNode *pLockMode = source->FirstChild("lockmode");
- const TiXmlNode *pLockCode = source->FirstChild("lockcode");
- const TiXmlNode *pBadPwdCount = source->FirstChild("badpwdcount");
- const TiXmlNode *pThumbnailNode = source->FirstChild("thumbnail");
-
- if (!strName.IsEmpty() && vecPaths.size() > 0)
- {
- vector<CStdString> verifiedPaths;
- // disallowed for files, or theres only a single path in the vector
- if ((category.Equals("files")) || (vecPaths.size() == 1))
- verifiedPaths.push_back(vecPaths[0]);
-
- // multiple paths?
- else
- {
- // validate the paths
- for (int j = 0; j < (int)vecPaths.size(); ++j)
- {
- CURL url(vecPaths[j]);
- CStdString protocol = url.GetProtocol();
- bool bIsInvalid = false;
-
- // for my programs
- if (category.Equals("programs") || category.Equals("myprograms"))
- {
- // only allow HD and plugins
- if (url.IsLocal() || protocol.Equals("plugin"))
- verifiedPaths.push_back(vecPaths[j]);
- else
- bIsInvalid = true;
- }
-
- // for others allow everything (if the user does something silly, we can't stop them)
- else
- verifiedPaths.push_back(vecPaths[j]);
-
- // error message
- if (bIsInvalid)
- CLog::Log(LOGERROR," Invalid path type (%s) for multipath source", vecPaths[j].c_str());
- }
-
- // no valid paths? skip to next source
- if (verifiedPaths.size() == 0)
- {
- CLog::Log(LOGERROR," Missing or invalid <name> and/or <path> in source");
- return false;
- }
- }
-
- share.FromNameAndPaths(category, strName, verifiedPaths);
-
- share.m_iBadPwdCount = 0;
- if (pLockMode)
- {
- share.m_iLockMode = LockType(atoi(pLockMode->FirstChild()->Value()));
- share.m_iHasLock = 2;
- }
-
- if (pLockCode)
- {
- if (pLockCode->FirstChild())
- share.m_strLockCode = pLockCode->FirstChild()->Value();
- }
-
- if (pBadPwdCount)
- {
- if (pBadPwdCount->FirstChild())
- share.m_iBadPwdCount = atoi( pBadPwdCount->FirstChild()->Value() );
- }
-
- if (pThumbnailNode)
- {
- if (pThumbnailNode->FirstChild())
- share.m_strThumbnailImage = pThumbnailNode->FirstChild()->Value();
- }
+ OnSettingsLoaded();
- return true;
- }
- return false;
+ return true;
}
bool CSettings::GetPath(const TiXmlElement* pRootElement, const char *tagName, CStdString &strValue)
@@ -443,38 +270,6 @@ bool CSettings::GetFloat(const TiXmlElement* pRootElement, const char *tagName,
return false;
}
-void CSettings::GetViewState(const TiXmlElement *pRootElement, const CStdString &strTagName, CViewState &viewState, SORT_METHOD defaultSort, int defaultView)
-{
- const TiXmlElement* pNode = pRootElement->FirstChildElement(strTagName);
- if (!pNode)
- {
- viewState.m_sortMethod = defaultSort;
- viewState.m_viewMode = defaultView;
- return;
- }
- GetInteger(pNode, "viewmode", viewState.m_viewMode, defaultView, DEFAULT_VIEW_LIST, DEFAULT_VIEW_MAX);
-
- int sortMethod;
- GetInteger(pNode, "sortmethod", sortMethod, defaultSort, SORT_METHOD_NONE, SORT_METHOD_MAX);
- viewState.m_sortMethod = (SORT_METHOD)sortMethod;
-
- int sortOrder;
- GetInteger(pNode, "sortorder", sortOrder, SortOrderAscending, SortOrderNone, SortOrderDescending);
- viewState.m_sortOrder = (SortOrder)sortOrder;
-}
-
-void CSettings::SetViewState(TiXmlNode *pRootNode, const CStdString &strTagName, const CViewState &viewState) const
-{
- TiXmlElement newElement(strTagName);
- TiXmlNode *pNewNode = pRootNode->InsertEndChild(newElement);
- if (pNewNode)
- {
- XMLUtils::SetInt(pNewNode, "viewmode", viewState.m_viewMode);
- XMLUtils::SetInt(pNewNode, "sortmethod", (int)viewState.m_sortMethod);
- XMLUtils::SetInt(pNewNode, "sortorder", (int)viewState.m_sortOrder);
- }
-}
-
bool CSettings::LoadCalibration(const TiXmlElement* pRoot, const CStdString& strSettingsFile)
{
m_Calibrations.clear();
@@ -673,18 +468,13 @@ bool CSettings::LoadSettings(const CStdString& strSettingsFile)
GetInteger(pElement, "needsupdate", m_musicNeedsUpdate, 0, 0, INT_MAX);
GetPath(pElement, "defaultlibview", m_defaultMusicLibSource);
}
+
// myvideos settings
pElement = pRootElement->FirstChildElement("myvideos");
if (pElement)
{
GetInteger(pElement, "startwindow", m_iVideoStartWindow, WINDOW_VIDEO_FILES, WINDOW_VIDEO_FILES, WINDOW_VIDEO_NAV);
XMLUtils::GetBoolean(pElement, "stackvideos", m_videoStacking);
-
- // Read the watchmode settings for the various media views
- GetInteger(pElement, "watchmodemovies", m_watchMode["movies"], VIDEO_SHOW_ALL, VIDEO_SHOW_ALL, VIDEO_SHOW_WATCHED);
- GetInteger(pElement, "watchmodetvshows", m_watchMode["tvshows"], VIDEO_SHOW_ALL, VIDEO_SHOW_ALL, VIDEO_SHOW_WATCHED);
- GetInteger(pElement, "watchmodemusicvideos", m_watchMode["musicvideos"], VIDEO_SHOW_ALL, VIDEO_SHOW_ALL, VIDEO_SHOW_WATCHED);
-
XMLUtils::GetBoolean(pElement, "flatten", m_bMyVideoNavFlatten);
GetInteger(pElement, "needsupdate", m_videoNeedsUpdate, 0, 0, INT_MAX);
@@ -696,27 +486,6 @@ bool CSettings::LoadSettings(const CStdString& strSettingsFile)
}
}
- pElement = pRootElement->FirstChildElement("viewstates");
- if (pElement)
- {
- GetViewState(pElement, "musicnavartists", m_viewStateMusicNavArtists);
- GetViewState(pElement, "musicnavalbums", m_viewStateMusicNavAlbums);
- GetViewState(pElement, "musicnavsongs", m_viewStateMusicNavSongs);
- GetViewState(pElement, "videonavactors", m_viewStateVideoNavActors);
- GetViewState(pElement, "videonavyears", m_viewStateVideoNavYears);
- GetViewState(pElement, "videonavgenres", m_viewStateVideoNavGenres);
- GetViewState(pElement, "videonavtitles", m_viewStateVideoNavTitles);
- GetViewState(pElement, "videonavepisodes", m_viewStateVideoNavEpisodes, SORT_METHOD_EPISODE);
- GetViewState(pElement, "videonavtvshows", m_viewStateVideoNavTvShows);
- GetViewState(pElement, "videonavseasons", m_viewStateVideoNavSeasons);
- GetViewState(pElement, "videonavmusicvideos", m_viewStateVideoNavMusicVideos);
-
- GetViewState(pElement, "programs", m_viewStatePrograms, SORT_METHOD_LABEL, DEFAULT_VIEW_AUTO);
- GetViewState(pElement, "pictures", m_viewStatePictures, SORT_METHOD_LABEL, DEFAULT_VIEW_AUTO);
- GetViewState(pElement, "videofiles", m_viewStateVideoFiles, SORT_METHOD_LABEL, DEFAULT_VIEW_AUTO);
- GetViewState(pElement, "musicfiles", m_viewStateMusicFiles, SORT_METHOD_LABEL, DEFAULT_VIEW_AUTO);
- }
-
// general settings
pElement = pRootElement->FirstChildElement("general");
if (pElement)
@@ -727,56 +496,6 @@ bool CSettings::LoadSettings(const CStdString& strSettingsFile)
XMLUtils::GetBoolean(pElement, "addonforeignfilter", m_bAddonForeignFilter);
}
- pElement = pRootElement->FirstChildElement("defaultvideosettings");
- if (pElement)
- {
- int deinterlaceMode;
- bool deinterlaceModePresent = GetInteger(pElement, "deinterlacemode", deinterlaceMode, VS_DEINTERLACEMODE_OFF, VS_DEINTERLACEMODE_OFF, VS_DEINTERLACEMODE_FORCE);
- int interlaceMethod;
- bool interlaceMethodPresent = GetInteger(pElement, "interlacemethod", interlaceMethod, VS_INTERLACEMETHOD_AUTO, VS_INTERLACEMETHOD_AUTO, VS_INTERLACEMETHOD_MAX);
- // For smooth conversion of settings stored before the deinterlaceMode existed
- if (!deinterlaceModePresent && interlaceMethodPresent)
- {
- if (interlaceMethod == VS_INTERLACEMETHOD_NONE)
- {
- deinterlaceMode = VS_DEINTERLACEMODE_OFF;
- interlaceMethod = VS_INTERLACEMETHOD_AUTO;
- }
- else if (interlaceMethod == VS_INTERLACEMETHOD_AUTO)
- {
- deinterlaceMode = VS_DEINTERLACEMODE_AUTO;
- }
- else
- {
- deinterlaceMode = VS_DEINTERLACEMODE_FORCE;
- }
- }
- m_defaultVideoSettings.m_DeinterlaceMode = (EDEINTERLACEMODE)deinterlaceMode;
- m_defaultVideoSettings.m_InterlaceMethod = (EINTERLACEMETHOD)interlaceMethod;
- int scalingMethod;
- GetInteger(pElement, "scalingmethod", scalingMethod, VS_SCALINGMETHOD_LINEAR, VS_SCALINGMETHOD_NEAREST, VS_SCALINGMETHOD_MAX);
- m_defaultVideoSettings.m_ScalingMethod = (ESCALINGMETHOD)scalingMethod;
-
- GetInteger(pElement, "viewmode", m_defaultVideoSettings.m_ViewMode, VIEW_MODE_NORMAL, VIEW_MODE_NORMAL, VIEW_MODE_CUSTOM);
- GetFloat(pElement, "zoomamount", m_defaultVideoSettings.m_CustomZoomAmount, 1.0f, 0.5f, 2.0f);
- GetFloat(pElement, "pixelratio", m_defaultVideoSettings.m_CustomPixelRatio, 1.0f, 0.5f, 2.0f);
- GetFloat(pElement, "verticalshift", m_defaultVideoSettings.m_CustomVerticalShift, 0.0f, -2.0f, 2.0f);
- GetFloat(pElement, "volumeamplification", m_defaultVideoSettings.m_VolumeAmplification, VOLUME_DRC_MINIMUM * 0.01f, VOLUME_DRC_MINIMUM * 0.01f, VOLUME_DRC_MAXIMUM * 0.01f);
- GetFloat(pElement, "noisereduction", m_defaultVideoSettings.m_NoiseReduction, 0.0f, 0.0f, 1.0f);
- XMLUtils::GetBoolean(pElement, "postprocess", m_defaultVideoSettings.m_PostProcess);
- GetFloat(pElement, "sharpness", m_defaultVideoSettings.m_Sharpness, 0.0f, -1.0f, 1.0f);
- XMLUtils::GetBoolean(pElement, "outputtoallspeakers", m_defaultVideoSettings.m_OutputToAllSpeakers);
- XMLUtils::GetBoolean(pElement, "showsubtitles", m_defaultVideoSettings.m_SubtitleOn);
- GetFloat(pElement, "brightness", m_defaultVideoSettings.m_Brightness, 50, 0, 100);
- GetFloat(pElement, "contrast", m_defaultVideoSettings.m_Contrast, 50, 0, 100);
- GetFloat(pElement, "gamma", m_defaultVideoSettings.m_Gamma, 20, 0, 100);
- GetFloat(pElement, "audiodelay", m_defaultVideoSettings.m_AudioDelay, 0.0f, -10.0f, 10.0f);
- GetFloat(pElement, "subtitledelay", m_defaultVideoSettings.m_SubtitleDelay, 0.0f, -10.0f, 10.0f);
- XMLUtils::GetBoolean(pElement, "autocrop", m_defaultVideoSettings.m_Crop);
- XMLUtils::GetBoolean(pElement, "nonlinstretch", m_defaultVideoSettings.m_CustomNonLinStretch);
-
- m_defaultVideoSettings.m_SubtitleCached = false;
- }
// audio settings
pElement = pRootElement->FirstChildElement("audio");
if (pElement)
@@ -787,37 +506,9 @@ bool CSettings::LoadSettings(const CStdString& strSettingsFile)
LoadCalibration(pRootElement, strSettingsFile);
g_guiSettings.LoadXML(pRootElement);
- LoadSkinSettings(pRootElement);
-
- // Configure the PlayerCoreFactory
- CPlayerCoreFactory::Get().LoadConfiguration("special://xbmc/system/playercorefactory.xml", true);
- CPlayerCoreFactory::Get().LoadConfiguration(GetUserDataItem("playercorefactory.xml"), false);
-
- // Advanced settings
- g_advancedSettings.Load();
-
- // Add the list of disc stub extensions (if any) to the list of video extensions
- if (!m_discStubExtensions.IsEmpty())
- g_settings.m_videoExtensions += "|" + m_discStubExtensions;
-
- // Default players?
- CLog::Log(LOGNOTICE, "Default DVD Player: %s", g_advancedSettings.m_videoDefaultDVDPlayer.c_str());
- CLog::Log(LOGNOTICE, "Default Video Player: %s", g_advancedSettings.m_videoDefaultPlayer.c_str());
- CLog::Log(LOGNOTICE, "Default Audio Player: %s", g_advancedSettings.m_audioDefaultPlayer.c_str());
-
- // setup any logging...
- if (g_guiSettings.GetBool("debug.showloginfo"))
- {
- g_advancedSettings.m_logLevel = std::max(g_advancedSettings.m_logLevelHint, LOG_LEVEL_DEBUG_FREEMEM);
- CLog::Log(LOGNOTICE, "Enabled debug logging due to GUI setting (%d)", g_advancedSettings.m_logLevel);
- }
- else
- {
- g_advancedSettings.m_logLevel = std::min(g_advancedSettings.m_logLevelHint, LOG_LEVEL_DEBUG/*LOG_LEVEL_NORMAL*/);
- CLog::Log(LOGNOTICE, "Disabled debug logging due to GUI setting. Level %d.", g_advancedSettings.m_logLevel);
- }
- CLog::SetLogLevel(g_advancedSettings.m_logLevel);
- return true;
+
+ // load any ISubSettings implementations
+ return Load(pRootElement);
}
bool CSettings::SaveSettings(const CStdString& strSettingsFile, CGUISettings *localSettings /* = NULL */) const
@@ -828,6 +519,9 @@ bool CSettings::SaveSettings(const CStdString& strSettingsFile, CGUISettings *lo
if (!pRoot) return false;
// write our tags one by one - just a big list for now (can be flashed up later)
+ if (!OnSettingsSaving())
+ return false;
+
// mymusic settings
TiXmlElement musicNode("mymusic");
TiXmlNode *pNode = pRoot->InsertEndChild(musicNode);
@@ -854,10 +548,6 @@ bool CSettings::SaveSettings(const CStdString& strSettingsFile, CGUISettings *lo
XMLUtils::SetInt(pNode, "startwindow", m_iVideoStartWindow);
XMLUtils::SetBoolean(pNode, "stackvideos", m_videoStacking);
-
- XMLUtils::SetInt(pNode, "watchmodemovies", m_watchMode.find("movies")->second);
- XMLUtils::SetInt(pNode, "watchmodetvshows", m_watchMode.find("tvshows")->second);
- XMLUtils::SetInt(pNode, "watchmodemusicvideos", m_watchMode.find("musicvideos")->second);
XMLUtils::SetInt(pNode, "needsupdate", m_videoNeedsUpdate);
XMLUtils::SetBoolean(pNode, "flatten", m_bMyVideoNavFlatten);
@@ -869,29 +559,6 @@ bool CSettings::SaveSettings(const CStdString& strSettingsFile, CGUISettings *lo
XMLUtils::SetBoolean(pChild, "shuffle", m_bMyVideoPlaylistShuffle);
}
- // view states
- TiXmlElement viewStateNode("viewstates");
- pNode = pRoot->InsertEndChild(viewStateNode);
- if (pNode)
- {
- SetViewState(pNode, "musicnavartists", m_viewStateMusicNavArtists);
- SetViewState(pNode, "musicnavalbums", m_viewStateMusicNavAlbums);
- SetViewState(pNode, "musicnavsongs", m_viewStateMusicNavSongs);
- SetViewState(pNode, "videonavactors", m_viewStateVideoNavActors);
- SetViewState(pNode, "videonavyears", m_viewStateVideoNavYears);
- SetViewState(pNode, "videonavgenres", m_viewStateVideoNavGenres);
- SetViewState(pNode, "videonavtitles", m_viewStateVideoNavTitles);
- SetViewState(pNode, "videonavepisodes", m_viewStateVideoNavEpisodes);
- SetViewState(pNode, "videonavseasons", m_viewStateVideoNavSeasons);
- SetViewState(pNode, "videonavtvshows", m_viewStateVideoNavTvShows);
- SetViewState(pNode, "videonavmusicvideos", m_viewStateVideoNavMusicVideos);
-
- SetViewState(pNode, "programs", m_viewStatePrograms);
- SetViewState(pNode, "pictures", m_viewStatePictures);
- SetViewState(pNode, "videofiles", m_viewStateVideoFiles);
- SetViewState(pNode, "musicfiles", m_viewStateMusicFiles);
- }
-
// general settings
TiXmlElement generalNode("general");
pNode = pRoot->InsertEndChild(generalNode);
@@ -901,32 +568,6 @@ bool CSettings::SaveSettings(const CStdString& strSettingsFile, CGUISettings *lo
XMLUtils::SetBoolean(pNode, "addonnotifications", m_bAddonNotifications);
XMLUtils::SetBoolean(pNode, "addonforeignfilter", m_bAddonForeignFilter);
- // default video settings
- TiXmlElement videoSettingsNode("defaultvideosettings");
- pNode = pRoot->InsertEndChild(videoSettingsNode);
- if (!pNode) return false;
- XMLUtils::SetInt(pNode, "deinterlacemode", m_defaultVideoSettings.m_DeinterlaceMode);
- XMLUtils::SetInt(pNode, "interlacemethod", m_defaultVideoSettings.m_InterlaceMethod);
- XMLUtils::SetInt(pNode, "scalingmethod", m_defaultVideoSettings.m_ScalingMethod);
- XMLUtils::SetFloat(pNode, "noisereduction", m_defaultVideoSettings.m_NoiseReduction);
- XMLUtils::SetBoolean(pNode, "postprocess", m_defaultVideoSettings.m_PostProcess);
- XMLUtils::SetFloat(pNode, "sharpness", m_defaultVideoSettings.m_Sharpness);
- XMLUtils::SetInt(pNode, "viewmode", m_defaultVideoSettings.m_ViewMode);
- XMLUtils::SetFloat(pNode, "zoomamount", m_defaultVideoSettings.m_CustomZoomAmount);
- XMLUtils::SetFloat(pNode, "pixelratio", m_defaultVideoSettings.m_CustomPixelRatio);
- XMLUtils::SetFloat(pNode, "verticalshift", m_defaultVideoSettings.m_CustomVerticalShift);
- XMLUtils::SetFloat(pNode, "volumeamplification", m_defaultVideoSettings.m_VolumeAmplification);
- XMLUtils::SetBoolean(pNode, "outputtoallspeakers", m_defaultVideoSettings.m_OutputToAllSpeakers);
- XMLUtils::SetBoolean(pNode, "showsubtitles", m_defaultVideoSettings.m_SubtitleOn);
- XMLUtils::SetFloat(pNode, "brightness", m_defaultVideoSettings.m_Brightness);
- XMLUtils::SetFloat(pNode, "contrast", m_defaultVideoSettings.m_Contrast);
- XMLUtils::SetFloat(pNode, "gamma", m_defaultVideoSettings.m_Gamma);
- XMLUtils::SetFloat(pNode, "audiodelay", m_defaultVideoSettings.m_AudioDelay);
- XMLUtils::SetFloat(pNode, "subtitledelay", m_defaultVideoSettings.m_SubtitleDelay);
- XMLUtils::SetBoolean(pNode, "autocrop", m_defaultVideoSettings.m_Crop);
- XMLUtils::SetBoolean(pNode, "nonlinstretch", m_defaultVideoSettings.m_CustomNonLinStretch);
-
-
// audio settings
TiXmlElement volumeNode("audio");
pNode = pRoot->InsertEndChild(volumeNode);
@@ -941,11 +582,14 @@ bool CSettings::SaveSettings(const CStdString& strSettingsFile, CGUISettings *lo
else // save the global settings
g_guiSettings.SaveXML(pRoot);
- SaveSkinSettings(pRoot);
-
// For mastercode
SaveProfiles( PROFILES_FILE );
+ OnSettingsSaved();
+
+ if (!Save(pRoot))
+ return false;
+
// save the file
return xmlDoc.SaveFile(strSettingsFile);
}
@@ -1130,274 +774,6 @@ bool CSettings::SaveProfiles(const CStdString& profilesFile) const
return xmlDoc.SaveFile(profilesFile);
}
-bool CSettings::UpdateShare(const CStdString &type, const CStdString oldName, const CMediaSource &share)
-{
- VECSOURCES *pShares = GetSourcesFromType(type);
-
- if (!pShares) return false;
-
- // update our current share list
- CMediaSource* pShare=NULL;
- for (IVECSOURCES it = pShares->begin(); it != pShares->end(); it++)
- {
- if ((*it).strName == oldName)
- {
- (*it).strName = share.strName;
- (*it).strPath = share.strPath;
- (*it).vecPaths = share.vecPaths;
- pShare = &(*it);
- break;
- }
- }
-
- if (!pShare)
- return false;
-
- // Update our XML file as well
- return SaveSources();
-}
-
-// NOTE: This function does NOT save the sources.xml file - you need to call SaveSources() separately.
-bool CSettings::UpdateSource(const CStdString &strType, const CStdString strOldName, const CStdString &strUpdateElement, const CStdString &strUpdateText)
-{
- VECSOURCES *pShares = GetSourcesFromType(strType);
-
- if (!pShares) return false;
-
- for (IVECSOURCES it = pShares->begin(); it != pShares->end(); it++)
- {
- if ((*it).strName == strOldName)
- {
- if ("name" == strUpdateElement)
- (*it).strName = strUpdateText;
- else if ("lockmode" == strUpdateElement)
- (*it).m_iLockMode = LockType(atoi(strUpdateText));
- else if ("lockcode" == strUpdateElement)
- (*it).m_strLockCode = strUpdateText;
- else if ("badpwdcount" == strUpdateElement)
- (*it).m_iBadPwdCount = atoi(strUpdateText);
- else if ("thumbnail" == strUpdateElement)
- (*it).m_strThumbnailImage = strUpdateText;
- else if ("path" == strUpdateElement)
- {
- (*it).vecPaths.clear();
- (*it).strPath = strUpdateText;
- (*it).vecPaths.push_back(strUpdateText);
- }
- else
- return false;
- return true;
- }
- }
- return false;
-}
-
-bool CSettings::DeleteSource(const CStdString &strType, const CStdString strName, const CStdString strPath, bool virtualSource)
-{
- VECSOURCES *pShares = GetSourcesFromType(strType);
- if (!pShares) return false;
-
- bool found(false);
-
- for (IVECSOURCES it = pShares->begin(); it != pShares->end(); it++)
- {
- if ((*it).strName == strName && (*it).strPath == strPath)
- {
- CLog::Log(LOGDEBUG,"found share, removing!");
- pShares->erase(it);
- found = true;
- break;
- }
- }
-
- if (virtualSource)
- return found;
-
- return SaveSources();
-}
-
-bool CSettings::AddShare(const CStdString &type, const CMediaSource &share)
-{
- VECSOURCES *pShares = GetSourcesFromType(type);
- if (!pShares) return false;
-
- // translate dir and add to our current shares
- CStdString strPath1 = share.strPath;
- strPath1.ToUpper();
- if(strPath1.IsEmpty())
- {
- CLog::Log(LOGERROR, "unable to add empty path");
- return false;
- }
-
- CMediaSource shareToAdd = share;
- if (strPath1.at(0) == '$')
- {
- shareToAdd.strPath = CUtil::TranslateSpecialSource(strPath1);
- if (!share.strPath.IsEmpty())
- CLog::Log(LOGDEBUG, "%s Translated (%s) to Path (%s)",__FUNCTION__ ,strPath1.c_str(),shareToAdd.strPath.c_str());
- else
- {
- CLog::Log(LOGDEBUG, "%s Skipping invalid special directory token: %s",__FUNCTION__,strPath1.c_str());
- return false;
- }
- }
- pShares->push_back(shareToAdd);
-
- if (!share.m_ignore)
- {
- return SaveSources();
- }
- return true;
-}
-
-bool CSettings::SaveSources()
-{
- // TODO: Should we be specifying utf8 here??
- CXBMCTinyXML doc;
- TiXmlElement xmlRootElement("sources");
- TiXmlNode *pRoot = doc.InsertEndChild(xmlRootElement);
- if (!pRoot) return false;
-
- // ok, now run through and save each sources section
- SetSources(pRoot, "programs", m_programSources, m_defaultProgramSource);
- SetSources(pRoot, "video", m_videoSources, "");
- SetSources(pRoot, "music", m_musicSources, m_defaultMusicSource);
- SetSources(pRoot, "pictures", m_pictureSources, m_defaultPictureSource);
- SetSources(pRoot, "files", m_fileSources, m_defaultFileSource);
-
- return doc.SaveFile(GetSourcesFile());
-}
-
-bool CSettings::SetSources(TiXmlNode *root, const char *section, const VECSOURCES &shares, const char *defaultPath)
-{
- TiXmlElement sectionElement(section);
- TiXmlNode *sectionNode = root->InsertEndChild(sectionElement);
- if (sectionNode)
- {
- XMLUtils::SetPath(sectionNode, "default", defaultPath);
- for (unsigned int i = 0; i < shares.size(); i++)
- {
- const CMediaSource &share = shares[i];
- if (share.m_ignore)
- continue;
- TiXmlElement source("source");
-
- XMLUtils::SetString(&source, "name", share.strName);
-
- for (unsigned int i = 0; i < share.vecPaths.size(); i++)
- XMLUtils::SetPath(&source, "path", share.vecPaths[i]);
-
- if (share.m_iHasLock)
- {
- XMLUtils::SetInt(&source, "lockmode", share.m_iLockMode);
- XMLUtils::SetString(&source, "lockcode", share.m_strLockCode);
- XMLUtils::SetInt(&source, "badpwdcount", share.m_iBadPwdCount);
- }
- if (!share.m_strThumbnailImage.IsEmpty())
- XMLUtils::SetPath(&source, "thumbnail", share.m_strThumbnailImage);
-
- sectionNode->InsertEndChild(source);
- }
- }
- return true;
-}
-
-void CSettings::LoadSources()
-{
- // clear sources
- m_fileSources.clear();
- m_musicSources.clear();
- m_pictureSources.clear();
- m_programSources.clear();
- m_videoSources.clear();
-
- CStdString strSourcesFile = GetSourcesFile();
- CLog::Log(LOGNOTICE, "Loading media sources from %s", strSourcesFile.c_str());
-
- // load xml file
- CXBMCTinyXML xmlDoc;
- TiXmlElement *pRootElement = NULL;
- if (xmlDoc.LoadFile(strSourcesFile))
- {
- pRootElement = xmlDoc.RootElement();
- if (pRootElement && strcmpi(pRootElement->Value(),"sources") != 0)
- CLog::Log(LOGERROR, "%s sources.xml file does not contain <sources>", __FUNCTION__);
- }
- else if (CFile::Exists(strSourcesFile))
- CLog::Log(LOGERROR, "%s Error loading %s: Line %d, %s", __FUNCTION__, strSourcesFile.c_str(), xmlDoc.ErrorRow(), xmlDoc.ErrorDesc());
-
- // parse sources
- if (pRootElement)
- {
- CStdString dummy;
- GetSources(pRootElement, "programs", m_programSources, m_defaultProgramSource);
- GetSources(pRootElement, "pictures", m_pictureSources, m_defaultPictureSource);
- GetSources(pRootElement, "files", m_fileSources, m_defaultFileSource);
- GetSources(pRootElement, "music", m_musicSources, m_defaultMusicSource);
- GetSources(pRootElement, "video", m_videoSources, dummy);
- }
-}
-
-void CSettings::LoadSkinSettings(const TiXmlElement* pRootElement)
-{
- int number = 0;
- const TiXmlElement *pElement = pRootElement->FirstChildElement("skinsettings");
- if (pElement)
- {
- m_skinStrings.clear();
- m_skinBools.clear();
- const TiXmlElement *pChild = pElement->FirstChildElement("setting");
- while (pChild)
- {
- CStdString settingName = pChild->Attribute("name");
- if (pChild->Attribute("type") && strcmpi(pChild->Attribute("type"),"string") == 0)
- { // string setting
- CSkinString string;
- string.name = settingName;
- string.value = pChild->FirstChild() ? pChild->FirstChild()->Value() : "";
- m_skinStrings.insert(pair<int, CSkinString>(number++, string));
- }
- else
- { // bool setting
- CSkinBool setting;
- setting.name = settingName;
- setting.value = pChild->FirstChild() ? strcmpi(pChild->FirstChild()->Value(), "true") == 0 : false;
- m_skinBools.insert(pair<int, CSkinBool>(number++, setting));
- }
- pChild = pChild->NextSiblingElement("setting");
- }
- }
-}
-
-void CSettings::SaveSkinSettings(TiXmlNode *pRootElement) const
-{
- // add the <skinsettings> tag
- TiXmlElement xmlSettingsElement("skinsettings");
- TiXmlNode *pSettingsNode = pRootElement->InsertEndChild(xmlSettingsElement);
- if (!pSettingsNode) return;
- for (map<int, CSkinBool>::const_iterator it = m_skinBools.begin(); it != m_skinBools.end(); ++it)
- {
- // Add a <setting type="bool" name="name">true/false</setting>
- TiXmlElement xmlSetting("setting");
- xmlSetting.SetAttribute("type", "bool");
- xmlSetting.SetAttribute("name", (*it).second.name.c_str());
- TiXmlText xmlBool((*it).second.value ? "true" : "false");
- xmlSetting.InsertEndChild(xmlBool);
- pSettingsNode->InsertEndChild(xmlSetting);
- }
- for (map<int, CSkinString>::const_iterator it = m_skinStrings.begin(); it != m_skinStrings.end(); ++it)
- {
- // Add a <setting type="string" name="name">string</setting>
- TiXmlElement xmlSetting("setting");
- xmlSetting.SetAttribute("type", "string");
- xmlSetting.SetAttribute("name", (*it).second.name.c_str());
- TiXmlText xmlLabel((*it).second.value);
- xmlSetting.InsertEndChild(xmlLabel);
- pSettingsNode->InsertEndChild(xmlSetting);
- }
-}
-
void CSettings::Clear()
{
m_vecProfiles.clear();
@@ -1410,157 +786,15 @@ void CSettings::Clear()
m_logFolder.clear();
m_userAgent.clear();
- m_skinStrings.clear();
- m_skinBools.clear();
-
- m_programSources.clear();
- m_pictureSources.clear();
- m_fileSources.clear();
- m_musicSources.clear();
- m_videoSources.clear();
-
- m_defaultProgramSource.clear();
- m_defaultMusicSource.clear();
- m_defaultPictureSource.clear();
- m_defaultFileSource.clear();
m_defaultMusicLibSource.clear();
m_ResInfo.clear();
m_Calibrations.clear();
-#ifdef HAS_UPNP
- CUPnPSettings::Get().Clear();
-#endif
- CRssManager::Get().Clear();
-}
+ OnSettingsCleared();
-int CSettings::TranslateSkinString(const CStdString &setting)
-{
- CStdString settingName;
- settingName.Format("%s.%s", g_guiSettings.GetString("lookandfeel.skin").c_str(), setting);
- // run through and see if we have this setting
- for (map<int, CSkinString>::const_iterator it = m_skinStrings.begin(); it != m_skinStrings.end(); it++)
- {
- if (settingName.Equals((*it).second.name))
- return (*it).first;
- }
- // didn't find it - insert it
- CSkinString skinString;
- skinString.name = settingName;
- m_skinStrings.insert(pair<int, CSkinString>(m_skinStrings.size() + m_skinBools.size(), skinString));
- return m_skinStrings.size() + m_skinBools.size() - 1;
-}
-
-const CStdString &CSettings::GetSkinString(int setting) const
-{
- map<int, CSkinString>::const_iterator it = m_skinStrings.find(setting);
- if (it != m_skinStrings.end())
- {
- return (*it).second.value;
- }
- return StringUtils::EmptyString;
-}
-
-void CSettings::SetSkinString(int setting, const CStdString &label)
-{
- map<int, CSkinString>::iterator it = m_skinStrings.find(setting);
- if (it != m_skinStrings.end())
- {
- (*it).second.value = label;
- return;
- }
- assert(false);
- CLog::Log(LOGFATAL, "%s : Unknown setting requested", __FUNCTION__);
-}
-
-void CSettings::ResetSkinSetting(const CStdString &setting)
-{
- CStdString settingName;
- settingName.Format("%s.%s", g_guiSettings.GetString("lookandfeel.skin").c_str(), setting);
- // run through and see if we have this setting as a string
- for (map<int, CSkinString>::iterator it = m_skinStrings.begin(); it != m_skinStrings.end(); it++)
- {
- if (settingName.Equals((*it).second.name))
- {
- (*it).second.value = "";
- return;
- }
- }
- // and now check for the skin bool
- for (map<int, CSkinBool>::iterator it = m_skinBools.begin(); it != m_skinBools.end(); it++)
- {
- if (settingName.Equals((*it).second.name))
- {
- (*it).second.value = false;
- return;
- }
- }
-}
-
-int CSettings::TranslateSkinBool(const CStdString &setting)
-{
- CStdString settingName;
- settingName.Format("%s.%s", g_guiSettings.GetString("lookandfeel.skin").c_str(), setting);
- // run through and see if we have this setting
- for (map<int, CSkinBool>::const_iterator it = m_skinBools.begin(); it != m_skinBools.end(); it++)
- {
- if (settingName.Equals((*it).second.name))
- return (*it).first;
- }
- // didn't find it - insert it
- CSkinBool skinBool;
- skinBool.name = settingName;
- skinBool.value = false;
- m_skinBools.insert(pair<int, CSkinBool>(m_skinBools.size() + m_skinStrings.size(), skinBool));
- return m_skinBools.size() + m_skinStrings.size() - 1;
-}
-
-bool CSettings::GetSkinBool(int setting) const
-{
- map<int, CSkinBool>::const_iterator it = m_skinBools.find(setting);
- if (it != m_skinBools.end())
- {
- return (*it).second.value;
- }
- // default is to return false
- return false;
-}
-
-void CSettings::SetSkinBool(int setting, bool set)
-{
- map<int, CSkinBool>::iterator it = m_skinBools.find(setting);
- if (it != m_skinBools.end())
- {
- (*it).second.value = set;
- return;
- }
- assert(false);
- CLog::Log(LOGFATAL,"%s : Unknown setting requested", __FUNCTION__);
-}
-
-void CSettings::ResetSkinSettings()
-{
- CStdString currentSkin = g_guiSettings.GetString("lookandfeel.skin") + ".";
- // clear all the settings and strings from this skin.
- map<int, CSkinBool>::iterator it = m_skinBools.begin();
- while (it != m_skinBools.end())
- {
- CStdString skinName = (*it).second.name;
- if (skinName.Left(currentSkin.size()) == currentSkin)
- (*it).second.value = false;
-
- it++;
- }
- map<int, CSkinString>::iterator it2 = m_skinStrings.begin();
- while (it2 != m_skinStrings.end())
- {
- CStdString skinName = (*it2).second.name;
- if (skinName.Left(currentSkin.size()) == currentSkin)
- (*it2).second.value = "";
-
- it2++;
- }
- g_infoManager.ResetCache();
+ for (SubSettings::const_iterator it = m_subSettings.begin(); it != m_subSettings.end(); it++)
+ (*it)->Clear();
}
static CStdString ToWatchContent(const CStdString &content)
@@ -1571,32 +805,6 @@ static CStdString ToWatchContent(const CStdString &content)
return content;
}
-int CSettings::GetWatchMode(const CStdString& content) const
-{
- std::map<CStdString, int>::iterator it = g_settings.m_watchMode.find(ToWatchContent(content));
- if (it != g_settings.m_watchMode.end())
- return it->second;
- return VIDEO_SHOW_ALL;
-}
-
-void CSettings::SetWatchMode(const CStdString& content, int value)
-{
- std::map<CStdString, int>::iterator it = g_settings.m_watchMode.find(ToWatchContent(content));
- if (it != g_settings.m_watchMode.end())
- it->second = value;
-}
-
-void CSettings::CycleWatchMode(const CStdString& content)
-{
- std::map<CStdString, int>::iterator it = g_settings.m_watchMode.find(ToWatchContent(content));
- if (it != g_settings.m_watchMode.end())
- {
- it->second++;
- if (it->second > VIDEO_SHOW_WATCHED)
- it->second = VIDEO_SHOW_ALL;
- }
-}
-
void CSettings::LoadUserFolderLayout()
{
// check them all
@@ -1706,17 +914,6 @@ CStdString CSettings::GetLibraryFolder() const
return folder;
}
-CStdString CSettings::GetSourcesFile() const
-{
- CStdString folder;
- if (GetCurrentProfile().hasSources())
- URIUtils::AddFileToFolder(GetProfileUserDataFolder(),"sources.xml",folder);
- else
- URIUtils::AddFileToFolder(GetUserDataFolder(),"sources.xml",folder);
-
- return folder;
-}
-
CStdString CSettings::GetSettingsFile() const
{
CStdString settings;
@@ -1819,3 +1016,69 @@ void CSettings::LoadMasterForLogin()
if (m_currentProfile != 0)
LoadProfile(0);
}
+
+bool CSettings::OnSettingsLoading()
+{
+ CSingleLock lock(m_critical);
+ for (SettingsHandlers::const_iterator it = m_settingsHandlers.begin(); it != m_settingsHandlers.end(); it++)
+ {
+ if (!(*it)->OnSettingsLoading())
+ return false;
+ }
+
+ return true;
+}
+
+void CSettings::OnSettingsLoaded()
+{
+ CSingleLock lock(m_critical);
+ for (SettingsHandlers::const_iterator it = m_settingsHandlers.begin(); it != m_settingsHandlers.end(); it++)
+ (*it)->OnSettingsLoaded();
+}
+
+bool CSettings::OnSettingsSaving() const
+{
+ CSingleLock lock(m_critical);
+ for (SettingsHandlers::const_iterator it = m_settingsHandlers.begin(); it != m_settingsHandlers.end(); it++)
+ {
+ if (!(*it)->OnSettingsSaving())
+ return false;
+ }
+
+ return true;
+}
+
+void CSettings::OnSettingsSaved() const
+{
+ CSingleLock lock(m_critical);
+ for (SettingsHandlers::const_iterator it = m_settingsHandlers.begin(); it != m_settingsHandlers.end(); it++)
+ (*it)->OnSettingsSaved();
+}
+
+void CSettings::OnSettingsCleared()
+{
+ CSingleLock lock(m_critical);
+ for (SettingsHandlers::const_iterator it = m_settingsHandlers.begin(); it != m_settingsHandlers.end(); it++)
+ (*it)->OnSettingsCleared();
+}
+
+bool CSettings::Load(const TiXmlNode *settings)
+{
+ bool ok = true;
+ for (SubSettings::const_iterator it = m_subSettings.begin(); it != m_subSettings.end(); it++)
+ ok &= (*it)->Load(settings);
+
+ return ok;
+}
+
+bool CSettings::Save(TiXmlNode *settings) const
+{
+ CSingleLock lock(m_critical);
+ for (SubSettings::const_iterator it = m_subSettings.begin(); it != m_subSettings.end(); it++)
+ {
+ if (!(*it)->Save(settings))
+ return false;
+ }
+
+ return true;
+}
diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h
index 050f8d6f04..19729791fe 100644
--- a/xbmc/settings/Settings.h
+++ b/xbmc/settings/Settings.h
@@ -43,14 +43,17 @@
#endif
#endif // MID
+#include "settings/ISettingsHandler.h"
+#include "settings/ISubSettings.h"
#include "settings/VideoSettings.h"
#include "Profile.h"
-#include "view/ViewState.h"
#include "guilib/Resolution.h"
#include "guilib/GraphicContext.h"
+#include "threads/CriticalSection.h"
#include <vector>
#include <map>
+#include <set>
#define CACHE_AUDIO 0
#define CACHE_VIDEO 1
@@ -60,52 +63,27 @@
#define VOLUME_MAXIMUM 1.0f // 0dB
#define VOLUME_DYNAMIC_RANGE 90.0f // 60dB
#define VOLUME_CONTROL_STEPS 90 // 90 steps
-#define VOLUME_DRC_MINIMUM 0 // 0dB
-#define VOLUME_DRC_MAXIMUM 6000 // 60dB
-
-#define VIEW_MODE_NORMAL 0
-#define VIEW_MODE_ZOOM 1
-#define VIEW_MODE_STRETCH_4x3 2
-#define VIEW_MODE_WIDE_ZOOM 3
-#define VIEW_MODE_STRETCH_16x9 4
-#define VIEW_MODE_ORIGINAL 5
-#define VIEW_MODE_CUSTOM 6
-
-#define VIDEO_SHOW_ALL 0
-#define VIDEO_SHOW_UNWATCHED 1
-#define VIDEO_SHOW_WATCHED 2
/* FIXME: eventually the profile should dictate where special://masterprofile/ is but for now it
makes sense to leave all the profile settings in a user writeable location
like special://masterprofile/ */
#define PROFILES_FILE "special://masterprofile/profiles.xml"
-class CSkinString
-{
-public:
- CStdString name;
- CStdString value;
-};
-
-class CSkinBool
-{
-public:
- CSkinBool() : value(false) {};
- CStdString name;
- bool value;
-};
-
class CGUISettings;
class TiXmlElement;
class TiXmlNode;
-class CMediaSource;
-class CSettings
+class CSettings : private ISettingsHandler, ISubSettings
{
public:
CSettings(void);
virtual ~CSettings(void);
+ void RegisterSettingsHandler(ISettingsHandler *settingsHandler);
+ void UnregisterSettingsHandler(ISettingsHandler *settingsHandler);
+ void RegisterSubSettings(ISubSettings *subSettings);
+ void UnregisterSubSettings(ISubSettings *subSettings);
+
void Initialize();
bool Load();
@@ -118,45 +96,6 @@ public:
bool DeleteProfile(unsigned int index);
void CreateProfileFolders();
- VECSOURCES *GetSourcesFromType(const CStdString &type);
- CStdString GetDefaultSourceFromType(const CStdString &type);
-
- bool UpdateSource(const CStdString &strType, const CStdString strOldName, const CStdString &strUpdateChild, const CStdString &strUpdateValue);
- bool DeleteSource(const CStdString &strType, const CStdString strName, const CStdString strPath, bool virtualSource = false);
- bool UpdateShare(const CStdString &type, const CStdString oldName, const CMediaSource &share);
- bool AddShare(const CStdString &type, const CMediaSource &share);
-
- int TranslateSkinString(const CStdString &setting);
- const CStdString &GetSkinString(int setting) const;
- void SetSkinString(int setting, const CStdString &label);
-
- int TranslateSkinBool(const CStdString &setting);
- bool GetSkinBool(int setting) const;
- void SetSkinBool(int setting, bool set);
-
- /*! \brief Retreive the watched mode for the given content type
- \param content Current content type
- \return the current watch mode for this content type, WATCH_MODE_ALL if the content type is unknown.
- \sa SetWatchMode, IncrementWatchMode
- */
- int GetWatchMode(const CStdString& content) const;
-
- /*! \brief Set the watched mode for the given content type
- \param content Current content type
- \param value Watched mode to set
- \sa GetWatchMode, IncrementWatchMode
- */
- void SetWatchMode(const CStdString& content, int value);
-
- /*! \brief Cycle the watched mode for the given content type
- \param content Current content type
- \sa GetWatchMode, SetWatchMode
- */
- void CycleWatchMode(const CStdString& content);
-
- void ResetSkinSetting(const CStdString &setting);
- void ResetSkinSettings();
-
CStdString m_pictureExtensions;
CStdString m_musicExtensions;
CStdString m_videoExtensions;
@@ -166,31 +105,10 @@ public:
bool m_bMyMusicSongInfoInVis;
bool m_bMyMusicSongThumbInVis;
-
- CViewState m_viewStateMusicNavArtists;
- CViewState m_viewStateMusicNavAlbums;
- CViewState m_viewStateMusicNavSongs;
- CViewState m_viewStateVideoNavActors;
- CViewState m_viewStateVideoNavYears;
- CViewState m_viewStateVideoNavGenres;
- CViewState m_viewStateVideoNavTitles;
- CViewState m_viewStateVideoNavEpisodes;
- CViewState m_viewStateVideoNavSeasons;
- CViewState m_viewStateVideoNavTvShows;
- CViewState m_viewStateVideoNavMusicVideos;
-
- CViewState m_viewStatePrograms;
- CViewState m_viewStatePictures;
- CViewState m_viewStateMusicFiles;
- CViewState m_viewStateVideoFiles;
-
bool m_bMyMusicPlaylistRepeat;
bool m_bMyMusicPlaylistShuffle;
int m_iMyMusicStartWindow;
- CVideoSettings m_defaultVideoSettings;
- CVideoSettings m_currentVideoSettings;
-
float m_fZoomAmount; // current zoom amount
float m_fPixelRatio; // current pixel ratio
float m_fVerticalShift; // current vertical shift
@@ -216,19 +134,6 @@ public:
CStdString m_userAgent;
- std::map<int, CSkinString> m_skinStrings;
- std::map<int, CSkinBool> m_skinBools;
-
- VECSOURCES m_programSources;
- VECSOURCES m_pictureSources;
- VECSOURCES m_fileSources;
- VECSOURCES m_musicSources;
- VECSOURCES m_videoSources;
-
- CStdString m_defaultProgramSource;
- CStdString m_defaultMusicSource;
- CStdString m_defaultPictureSource;
- CStdString m_defaultFileSource;
CStdString m_defaultMusicLibSource;
int m_musicNeedsUpdate; ///< if a database update means an update is required (set to the version number of the db)
@@ -328,7 +233,6 @@ public:
CStdString GetVideoThumbFolder() const;
CStdString GetBookmarksThumbFolder() const;
CStdString GetLibraryFolder() const;
- CStdString GetSourcesFile() const;
CStdString GetSettingsFile() const;
@@ -349,41 +253,42 @@ public:
bool SaveSettings(const CStdString& strSettingsFile, CGUISettings *localSettings = NULL) const;
- void LoadSources();
- bool SaveSources();
-
bool GetInteger(const TiXmlElement* pRootElement, const char *strTagName, int& iValue, const int iDefault, const int iMin, const int iMax);
bool GetFloat(const TiXmlElement* pRootElement, const char *strTagName, float& fValue, const float fDefault, const float fMin, const float fMax);
static bool GetPath(const TiXmlElement* pRootElement, const char *tagName, CStdString &strValue);
static bool GetString(const TiXmlElement* pRootElement, const char *strTagName, CStdString& strValue, const CStdString& strDefaultValue);
bool GetString(const TiXmlElement* pRootElement, const char *strTagName, char *szValue, const CStdString& strDefaultValue);
- bool GetSource(const CStdString &category, const TiXmlNode *source, CMediaSource &share);
void ApplyCalibrations();
void UpdateCalibrations();
protected:
- void GetSources(const TiXmlElement* pRootElement, const CStdString& strTagName, VECSOURCES& items, CStdString& strDefault);
- bool SetSources(TiXmlNode *root, const char *section, const VECSOURCES &shares, const char *defaultPath);
- void GetViewState(const TiXmlElement* pRootElement, const CStdString& strTagName, CViewState &viewState, SORT_METHOD defaultSort = SORT_METHOD_LABEL, int defaultView = DEFAULT_VIEW_LIST);
-
- // functions for writing xml files
- void SetViewState(TiXmlNode* pRootNode, const CStdString& strTagName, const CViewState &viewState) const;
-
bool LoadCalibration(const TiXmlElement* pElement, const CStdString& strSettingsFile);
bool SaveCalibration(TiXmlNode* pRootNode) const;
bool LoadSettings(const CStdString& strSettingsFile);
// bool SaveSettings(const CStdString& strSettingsFile) const;
- // skin activated settings
- void LoadSkinSettings(const TiXmlElement* pElement);
- void SaveSkinSettings(TiXmlNode *pElement) const;
-
void LoadUserFolderLayout();
private:
+ // implementation of ISettingsHandler
+ virtual bool OnSettingsLoading();
+ virtual void OnSettingsLoaded();
+ virtual bool OnSettingsSaving() const;
+ virtual void OnSettingsSaved() const;
+ virtual void OnSettingsCleared();
+
+ // implementation of ISubSettings
+ virtual bool Load(const TiXmlNode *settings);
+ virtual bool Save(TiXmlNode *settings) const;
+
+ CCriticalSection m_critical;
+ typedef std::set<ISettingsHandler*> SettingsHandlers;
+ SettingsHandlers m_settingsHandlers;
+ typedef std::set<ISubSettings*> SubSettings;
+ SubSettings m_subSettings;
+
std::vector<CProfile> m_vecProfiles;
- std::map<CStdString, int> m_watchMode;
bool m_usingLoginScreen;
unsigned int m_lastUsedProfile;
unsigned int m_currentProfile;
diff --git a/xbmc/settings/SkinSettings.cpp b/xbmc/settings/SkinSettings.cpp
new file mode 100644
index 0000000000..0d9044eabf
--- /dev/null
+++ b/xbmc/settings/SkinSettings.cpp
@@ -0,0 +1,281 @@
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string.h>
+
+#include "SkinSettings.h"
+#include "GUIInfoManager.h"
+#include "settings/GUISettings.h"
+#include "threads/SingleLock.h"
+#include "utils/log.h"
+#include "utils/StringUtils.h"
+#include "utils/XBMCTinyXML.h"
+
+#define XML_SKINSETTINGS "skinsettings"
+#define XML_SETTING "setting"
+#define XML_ATTR_TYPE "type"
+#define XML_ATTR_NAME "name"
+
+using namespace std;
+
+CSkinSettings::CSkinSettings()
+{
+ Clear();
+}
+
+CSkinSettings::~CSkinSettings()
+{ }
+
+CSkinSettings& CSkinSettings::Get()
+{
+ static CSkinSettings sSkinSettings;
+ return sSkinSettings;
+}
+
+int CSkinSettings::TranslateString(const string &setting)
+{
+ std::string settingName = StringUtils::Format("%s.%s", GetCurrentSkin().c_str(), setting.c_str());
+
+ CSingleLock lock(m_critical);
+ // run through and see if we have this setting
+ for (map<int, CSkinString>::const_iterator it = m_strings.begin(); it != m_strings.end(); it++)
+ {
+ if (StringUtils::EqualsNoCase(settingName, it->second.name))
+ return it->first;
+ }
+
+ // didn't find it - insert it
+ CSkinString skinString;
+ skinString.name = settingName;
+
+ int number = m_bools.size() + m_strings.size();
+ m_strings.insert(pair<int, CSkinString>(number, skinString));
+ return number;
+}
+
+const string& CSkinSettings::GetString(int setting) const
+{
+ CSingleLock lock(m_critical);
+ map<int, CSkinString>::const_iterator it = m_strings.find(setting);
+ if (it != m_strings.end())
+ return it->second.value;
+
+ return StringUtils::EmptyString;
+}
+
+void CSkinSettings::SetString(int setting, const string &label)
+{
+ CSingleLock lock(m_critical);
+ map<int, CSkinString>::iterator it = m_strings.find(setting);
+ if (it != m_strings.end())
+ {
+ it->second.value = label;
+ return;
+ }
+
+ assert(false);
+ CLog::Log(LOGFATAL, "%s: unknown setting (%d) requested", __FUNCTION__, setting);
+}
+
+int CSkinSettings::TranslateBool(const string &setting)
+{
+ string settingName = StringUtils::Format("%s.%s", GetCurrentSkin().c_str(), setting.c_str());
+
+ CSingleLock lock(m_critical);
+ // run through and see if we have this setting
+ for (map<int, CSkinBool>::const_iterator it = m_bools.begin(); it != m_bools.end(); it++)
+ {
+ if (StringUtils::EqualsNoCase(settingName, it->second.name))
+ return it->first;
+ }
+
+ // didn't find it - insert it
+ CSkinBool skinBool;
+ skinBool.name = settingName;
+ skinBool.value = false;
+
+ int number = m_bools.size() + m_strings.size();
+ m_bools.insert(pair<int, CSkinBool>(number, skinBool));
+ return number;
+}
+
+bool CSkinSettings::GetBool(int setting) const
+{
+ CSingleLock lock(m_critical);
+ map<int, CSkinBool>::const_iterator it = m_bools.find(setting);
+ if (it != m_bools.end())
+ return it->second.value;
+
+ // default is to return false
+ return false;
+}
+
+void CSkinSettings::SetBool(int setting, bool set)
+{
+ CSingleLock lock(m_critical);
+ map<int, CSkinBool>::iterator it = m_bools.find(setting);
+ if (it != m_bools.end())
+ {
+ it->second.value = set;
+ return;
+ }
+
+ assert(false);
+ CLog::Log(LOGFATAL,"%s: unknown setting (%d) requested", __FUNCTION__, setting);
+}
+
+void CSkinSettings::Reset(const string &setting)
+{
+ string settingName = StringUtils::Format("%s.%s", GetCurrentSkin().c_str(), setting.c_str());
+
+ CSingleLock lock(m_critical);
+ // run through and see if we have this setting as a string
+ for (map<int, CSkinString>::iterator it = m_strings.begin(); it != m_strings.end(); it++)
+ {
+ if (StringUtils::EqualsNoCase(settingName, it->second.name))
+ {
+ it->second.value.clear();
+ return;
+ }
+ }
+
+ // and now check for the skin bool
+ for (map<int, CSkinBool>::iterator it = m_bools.begin(); it != m_bools.end(); it++)
+ {
+ if (StringUtils::EqualsNoCase(settingName, it->second.name))
+ {
+ it->second.value = false;
+ return;
+ }
+ }
+}
+
+void CSkinSettings::Reset()
+{
+ string currentSkin = GetCurrentSkin() + ".";
+
+ CSingleLock lock(m_critical);
+ // clear all the settings and strings from this skin.
+ for (map<int, CSkinBool>::iterator it = m_bools.begin(); it != m_bools.end(); it++)
+ {
+ if (StringUtils::StartsWith(it->second.name, currentSkin))
+ it->second.value = false;
+ }
+
+ for (map<int, CSkinString>::iterator it = m_strings.begin(); it != m_strings.end(); it++)
+ {
+ if (StringUtils::StartsWith(it->second.name, currentSkin))
+ it->second.value.clear();
+ }
+
+ g_infoManager.ResetCache();
+}
+
+bool CSkinSettings::Load(const TiXmlNode *settings)
+{
+ if (settings == NULL)
+ return false;
+
+ const TiXmlElement *pElement = settings->FirstChildElement(XML_SKINSETTINGS);
+ if (pElement == NULL)
+ {
+ CLog::Log(LOGWARNING, "CSkinSettings: no <skinsettings> tag found");
+ return false;
+ }
+
+ CSingleLock lock(m_critical);
+ m_strings.clear();
+ m_bools.clear();
+
+ int number = 0;
+ const TiXmlElement *pChild = pElement->FirstChildElement(XML_SETTING);
+ while (pChild)
+ {
+ CStdString settingName = pChild->Attribute(XML_ATTR_NAME);
+ if (pChild->Attribute("type") && StringUtils::EqualsNoCase(pChild->Attribute(XML_ATTR_TYPE), "string"))
+ { // string setting
+ CSkinString string;
+ string.name = settingName;
+ string.value = pChild->FirstChild() ? pChild->FirstChild()->Value() : "";
+ m_strings.insert(pair<int, CSkinString>(number++, string));
+ }
+ else
+ { // bool setting
+ CSkinBool setting;
+ setting.name = settingName;
+ setting.value = pChild->FirstChild() ? StringUtils::EqualsNoCase(pChild->FirstChild()->Value(), "true") : false;
+ m_bools.insert(pair<int, CSkinBool>(number++, setting));
+ }
+ pChild = pChild->NextSiblingElement(XML_SETTING);
+ }
+
+ return true;
+}
+
+bool CSkinSettings::Save(TiXmlNode *settings) const
+{
+ if (settings == NULL)
+ return false;
+
+ CSingleLock lock(m_critical);
+ // add the <skinsettings> tag
+ TiXmlElement xmlSettingsElement(XML_SKINSETTINGS);
+ TiXmlNode *pSettingsNode = settings->InsertEndChild(xmlSettingsElement);
+ if (pSettingsNode == NULL)
+ {
+ CLog::Log(LOGWARNING, "CSkinSettings: could not create <skinsettings> tag");
+ return false;
+ }
+
+ for (map<int, CSkinBool>::const_iterator it = m_bools.begin(); it != m_bools.end(); ++it)
+ {
+ // Add a <setting type="bool" name="name">true/false</setting>
+ TiXmlElement xmlSetting(XML_SETTING);
+ xmlSetting.SetAttribute(XML_ATTR_TYPE, "bool");
+ xmlSetting.SetAttribute(XML_ATTR_NAME, (*it).second.name.c_str());
+ TiXmlText xmlBool((*it).second.value ? "true" : "false");
+ xmlSetting.InsertEndChild(xmlBool);
+ pSettingsNode->InsertEndChild(xmlSetting);
+ }
+ for (map<int, CSkinString>::const_iterator it = m_strings.begin(); it != m_strings.end(); ++it)
+ {
+ // Add a <setting type="string" name="name">string</setting>
+ TiXmlElement xmlSetting(XML_SETTING);
+ xmlSetting.SetAttribute(XML_ATTR_TYPE, "string");
+ xmlSetting.SetAttribute(XML_ATTR_NAME, (*it).second.name.c_str());
+ TiXmlText xmlLabel((*it).second.value);
+ xmlSetting.InsertEndChild(xmlLabel);
+ pSettingsNode->InsertEndChild(xmlSetting);
+ }
+
+ return true;
+}
+
+void CSkinSettings::Clear()
+{
+ CSingleLock lock(m_critical);
+ m_strings.clear();
+ m_bools.clear();
+}
+
+std::string CSkinSettings::GetCurrentSkin() const
+{
+ return g_guiSettings.GetString("lookandfeel.skin");
+} \ No newline at end of file
diff --git a/xbmc/settings/SkinSettings.h b/xbmc/settings/SkinSettings.h
new file mode 100644
index 0000000000..d7f2fab547
--- /dev/null
+++ b/xbmc/settings/SkinSettings.h
@@ -0,0 +1,80 @@
+#pragma once
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <map>
+#include <string>
+
+#include "settings/ISubSettings.h"
+#include "threads/CriticalSection.h"
+
+class TiXmlNode;
+
+class CSkinString
+{
+public:
+ std::string name;
+ std::string value;
+};
+
+class CSkinBool
+{
+public:
+ CSkinBool()
+ : value(false)
+ { }
+
+ std::string name;
+ bool value;
+};
+
+class CSkinSettings : public ISubSettings
+{
+public:
+ static CSkinSettings& Get();
+
+ virtual bool Load(const TiXmlNode *settings);
+ virtual bool Save(TiXmlNode *settings) const;
+ virtual void Clear();
+
+ int TranslateString(const std::string &setting);
+ const std::string& GetString(int setting) const;
+ void SetString(int setting, const std::string &label);
+
+ int TranslateBool(const std::string &setting);
+ bool GetBool(int setting) const;
+ void SetBool(int setting, bool set);
+
+ void Reset(const std::string &setting);
+ void Reset();
+
+protected:
+ CSkinSettings();
+ CSkinSettings(const CSkinSettings&);
+ CSkinSettings const& operator=(CSkinSettings const&);
+ virtual ~CSkinSettings();
+
+ std::string GetCurrentSkin() const;
+
+private:
+ std::map<int, CSkinString> m_strings;
+ std::map<int, CSkinBool> m_bools;
+ CCriticalSection m_critical;
+}; \ No newline at end of file
diff --git a/xbmc/settings/VideoSettings.cpp b/xbmc/settings/VideoSettings.cpp
index 5b5ead0db0..556288e8af 100644
--- a/xbmc/settings/VideoSettings.cpp
+++ b/xbmc/settings/VideoSettings.cpp
@@ -33,7 +33,7 @@ CVideoSettings::CVideoSettings()
m_DeinterlaceMode = VS_DEINTERLACEMODE_OFF;
m_InterlaceMethod = VS_INTERLACEMETHOD_AUTO;
m_ScalingMethod = VS_SCALINGMETHOD_LINEAR;
- m_ViewMode = VIEW_MODE_NORMAL;
+ m_ViewMode = ViewModeNormal;
m_CustomZoomAmount = 1.0f;
m_CustomPixelRatio = 1.0f;
m_CustomVerticalShift = 0.0f;
diff --git a/xbmc/settings/VideoSettings.h b/xbmc/settings/VideoSettings.h
index fe4f0032c5..3ca4c8b89f 100644
--- a/xbmc/settings/VideoSettings.h
+++ b/xbmc/settings/VideoSettings.h
@@ -94,6 +94,16 @@ enum ESCALINGMETHOD
VS_SCALINGMETHOD_MAX // do not use and keep as last enum value.
};
+typedef enum {
+ ViewModeNormal = 0,
+ ViewModeZoom,
+ ViewModeStretch4x3,
+ ViewModeWideZoom,
+ ViewModeStretch16x9,
+ ViewModeOriginal,
+ ViewModeCustom
+} ViewMode;
+
class CVideoSettings
{
public:
diff --git a/xbmc/settings/windows/GUIWindowSettingsCategory.cpp b/xbmc/settings/windows/GUIWindowSettingsCategory.cpp
index 80b5d77afd..4a94ecc346 100644
--- a/xbmc/settings/windows/GUIWindowSettingsCategory.cpp
+++ b/xbmc/settings/windows/GUIWindowSettingsCategory.cpp
@@ -35,6 +35,7 @@
#include "music/MusicDatabase.h"
#include "video/VideoDatabase.h"
#include "view/ViewDatabase.h"
+#include "view/ViewState.h"
#include "PlayListPlayer.h"
#include "addons/Skin.h"
#include "guilib/GUIAudioManager.h"
@@ -87,6 +88,7 @@
#include <map>
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSourceSettings.h"
#include "input/MouseStat.h"
#if defined(TARGET_WINDOWS)
#include "input/windows/WINJoystick.h"
@@ -95,6 +97,7 @@
#endif
#include "guilib/LocalizeStrings.h"
#include "LangInfo.h"
+#include "utils/CharsetConverter.h"
#include "utils/StringUtils.h"
#include "utils/URIUtils.h"
#include "utils/SystemInfo.h"
@@ -1569,7 +1572,7 @@ void CGUIWindowSettingsCategory::OnSettingChanged(BaseSettingControlPtr pSetting
else if (strSetting.Equals("subtitles.custompath"))
{
bWriteOnly = false;
- shares = g_settings.m_videoSources;
+ shares = *CMediaSourceSettings::Get().GetSources("video");
}
g_mediaManager.GetNetworkLocations(shares);
diff --git a/xbmc/storage/MediaManager.cpp b/xbmc/storage/MediaManager.cpp
index 545813a954..f3758e84f7 100644
--- a/xbmc/storage/MediaManager.cpp
+++ b/xbmc/storage/MediaManager.cpp
@@ -38,6 +38,7 @@
#include "Autorun.h"
#include "GUIUserMessages.h"
#include "settings/Settings.h"
+#include "settings/MediaSourceSettings.h"
#include "utils/XBMCTinyXML.h"
#include "threads/SingleLock.h"
#include "utils/log.h"
@@ -273,11 +274,11 @@ bool CMediaManager::SetLocationPath(const CStdString& oldPath, const CStdString&
void CMediaManager::AddAutoSource(const CMediaSource &share, bool bAutorun)
{
- g_settings.AddShare("files",share);
- g_settings.AddShare("video",share);
- g_settings.AddShare("pictures",share);
- g_settings.AddShare("music",share);
- g_settings.AddShare("programs",share);
+ CMediaSourceSettings::Get().AddShare("files", share);
+ CMediaSourceSettings::Get().AddShare("video", share);
+ CMediaSourceSettings::Get().AddShare("pictures", share);
+ CMediaSourceSettings::Get().AddShare("music", share);
+ CMediaSourceSettings::Get().AddShare("programs", share);
CGUIMessage msg(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_UPDATE_SOURCES);
g_windowManager.SendThreadMessage( msg );
@@ -289,11 +290,11 @@ void CMediaManager::AddAutoSource(const CMediaSource &share, bool bAutorun)
void CMediaManager::RemoveAutoSource(const CMediaSource &share)
{
- g_settings.DeleteSource("files", share.strName, share.strPath, true);
- g_settings.DeleteSource("video", share.strName, share.strPath, true);
- g_settings.DeleteSource("pictures", share.strName, share.strPath, true);
- g_settings.DeleteSource("music", share.strName, share.strPath, true);
- g_settings.DeleteSource("programs", share.strName, share.strPath, true);
+ CMediaSourceSettings::Get().DeleteSource("files", share.strName, share.strPath, true);
+ CMediaSourceSettings::Get().DeleteSource("video", share.strName, share.strPath, true);
+ CMediaSourceSettings::Get().DeleteSource("pictures", share.strName, share.strPath, true);
+ CMediaSourceSettings::Get().DeleteSource("music", share.strName, share.strPath, true);
+ CMediaSourceSettings::Get().DeleteSource("programs", share.strName, share.strPath, true);
CGUIMessage msg(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_UPDATE_SOURCES);
g_windowManager.SendThreadMessage( msg );
diff --git a/xbmc/utils/HTMLUtil.cpp b/xbmc/utils/HTMLUtil.cpp
index e4337786bf..676b00cacf 100644
--- a/xbmc/utils/HTMLUtil.cpp
+++ b/xbmc/utils/HTMLUtil.cpp
@@ -18,7 +18,6 @@
*
*/
-#include "CharsetConverter.h"
#include "HTMLUtil.h"
using namespace std;
diff --git a/xbmc/utils/RssManager.cpp b/xbmc/utils/RssManager.cpp
index 3eda16f294..7e5b57fb3a 100644
--- a/xbmc/utils/RssManager.cpp
+++ b/xbmc/utils/RssManager.cpp
@@ -45,6 +45,16 @@ CRssManager& CRssManager::Get()
return sRssManager;
}
+void CRssManager::OnSettingsLoaded()
+{
+ Load();
+}
+
+void CRssManager::OnSettingsCleared()
+{
+ Clear();
+}
+
void CRssManager::Start()
{
m_bActive = true;
diff --git a/xbmc/utils/RssManager.h b/xbmc/utils/RssManager.h
index 86d01e9f62..5277876c67 100644
--- a/xbmc/utils/RssManager.h
+++ b/xbmc/utils/RssManager.h
@@ -25,6 +25,8 @@
#include "threads/CriticalSection.h"
+#include "settings/ISettingsHandler.h"
+
class CRssReader;
class IRssObserver;
@@ -36,11 +38,14 @@ typedef struct
} RssSet;
typedef std::map<int, RssSet> RssUrls;
-class CRssManager
+class CRssManager : public ISettingsHandler
{
public:
static CRssManager& Get();
+ virtual void OnSettingsLoaded();
+ virtual void OnSettingsCleared();
+
void Start();
void Stop();
bool Load();
diff --git a/xbmc/utils/SaveFileStateJob.h b/xbmc/utils/SaveFileStateJob.h
index 6839005ce3..0d24dff601 100644
--- a/xbmc/utils/SaveFileStateJob.h
+++ b/xbmc/utils/SaveFileStateJob.h
@@ -6,6 +6,7 @@
#include "FileItem.h"
#include "pvr/PVRManager.h"
#include "pvr/recordings/PVRRecordings.h"
+#include "settings/MediaSettings.h"
class CSaveFileStateJob : public CJob
{
@@ -91,9 +92,9 @@ bool CSaveFileStateJob::DoWork()
}
}
- if (g_settings.m_currentVideoSettings != g_settings.m_defaultVideoSettings)
+ if (CMediaSettings::Get().GetCurrentVideoSettings() != CMediaSettings::Get().GetDefaultVideoSettings())
{
- videodatabase.SetVideoSettings(progressTrackingFile, g_settings.m_currentVideoSettings);
+ videodatabase.SetVideoSettings(progressTrackingFile, CMediaSettings::Get().GetCurrentVideoSettings());
}
if (m_item.HasVideoInfoTag() && m_item.GetVideoInfoTag()->HasStreamDetails())
diff --git a/xbmc/utils/ScraperParser.cpp b/xbmc/utils/ScraperParser.cpp
index 5b4e7d60bd..1b83c6cdbc 100644
--- a/xbmc/utils/ScraperParser.cpp
+++ b/xbmc/utils/ScraperParser.cpp
@@ -42,6 +42,7 @@ CScraperParser::CScraperParser()
m_document = NULL;
m_SearchStringEncoding = "UTF-8";
m_scraper = NULL;
+ m_isNoop = true;
}
CScraperParser::CScraperParser(const CScraperParser& parser)
@@ -50,6 +51,7 @@ CScraperParser::CScraperParser(const CScraperParser& parser)
m_document = NULL;
m_SearchStringEncoding = "UTF-8";
m_scraper = NULL;
+ m_isNoop = true;
*this = parser;
}
@@ -115,6 +117,7 @@ bool CScraperParser::LoadFromXML()
TiXmlElement* pChildElement = m_pRootElement->FirstChildElement("CreateSearchUrl");
if (pChildElement)
{
+ m_isNoop = false;
if (!(m_SearchStringEncoding = pChildElement->Attribute("SearchStringEncoding")))
m_SearchStringEncoding = "UTF-8";
}
@@ -122,12 +125,14 @@ bool CScraperParser::LoadFromXML()
pChildElement = m_pRootElement->FirstChildElement("CreateArtistSearchUrl");
if (pChildElement)
{
+ m_isNoop = false;
if (!(m_SearchStringEncoding = pChildElement->Attribute("SearchStringEncoding")))
m_SearchStringEncoding = "UTF-8";
}
pChildElement = m_pRootElement->FirstChildElement("CreateAlbumSearchUrl");
if (pChildElement)
{
+ m_isNoop = false;
if (!(m_SearchStringEncoding = pChildElement->Attribute("SearchStringEncoding")))
m_SearchStringEncoding = "UTF-8";
}
diff --git a/xbmc/utils/ScraperParser.h b/xbmc/utils/ScraperParser.h
index 92241bed5c..06c775a65a 100644
--- a/xbmc/utils/ScraperParser.h
+++ b/xbmc/utils/ScraperParser.h
@@ -45,6 +45,7 @@ public:
~CScraperParser();
CScraperParser& operator= (const CScraperParser& parser);
bool Load(const CStdString& strXMLFile);
+ bool IsNoop() { return m_isNoop; };
void Clear();
const CStdString GetFilename() { return m_strFile; }
@@ -76,6 +77,7 @@ private:
TiXmlElement* m_pRootElement;
const char* m_SearchStringEncoding;
+ bool m_isNoop;
CStdString m_strFile;
ADDON::CScraper* m_scraper;
diff --git a/xbmc/utils/StringUtils.cpp b/xbmc/utils/StringUtils.cpp
index ba4546912a..bdd6f5df12 100644
--- a/xbmc/utils/StringUtils.cpp
+++ b/xbmc/utils/StringUtils.cpp
@@ -46,6 +46,7 @@ const char* ADDON_GUID_RE = "^(\\{){0,1}[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-
/* empty string for use in returns by ref */
const CStdString StringUtils::EmptyString = "";
+const std::string StringUtils::Empty = "";
CStdString StringUtils::m_lastUUID = "";
string StringUtils::Format(const char *fmt, ...)
diff --git a/xbmc/utils/StringUtils.h b/xbmc/utils/StringUtils.h
index e4c9e5bb12..7928624890 100644
--- a/xbmc/utils/StringUtils.h
+++ b/xbmc/utils/StringUtils.h
@@ -106,6 +106,7 @@ public:
static bool IsInteger(const CStdString& str);
static CStdString SizeToString(int64_t size);
static const CStdString EmptyString;
+ static const std::string Empty;
static size_t FindWords(const char *str, const char *wordLowerCase);
static int FindEndBracket(const CStdString &str, char opener, char closer, int startPos = 0);
static int DateStringToYYYYMMDD(const CStdString &dateString);
diff --git a/xbmc/utils/Weather.cpp b/xbmc/utils/Weather.cpp
index e32cda4946..19d0039217 100644
--- a/xbmc/utils/Weather.cpp
+++ b/xbmc/utils/Weather.cpp
@@ -42,6 +42,7 @@
#include "log.h"
#include "addons/AddonManager.h"
#include "interfaces/python/XBPython.h"
+#include "CharsetConverter.h"
using namespace std;
using namespace ADDON;
diff --git a/xbmc/utils/test/TestJobManager.cpp b/xbmc/utils/test/TestJobManager.cpp
index b47afc1cc1..bf77c97175 100644
--- a/xbmc/utils/test/TestJobManager.cpp
+++ b/xbmc/utils/test/TestJobManager.cpp
@@ -68,13 +68,13 @@ TEST_F(TestJobManager, CancelJob)
TEST_F(TestJobManager, Pause)
{
CJob* job = new CSysInfoJob();
- CJobManager::GetInstance().AddJob(job, NULL);
+ CJobManager::GetInstance().AddJob(job, NULL, CJob::PRIORITY_NORMAL);
- EXPECT_FALSE(CJobManager::GetInstance().IsPaused(""));
- CJobManager::GetInstance().Pause("");
- EXPECT_TRUE(CJobManager::GetInstance().IsPaused(""));
- CJobManager::GetInstance().UnPause("");
- EXPECT_FALSE(CJobManager::GetInstance().IsPaused(""));
+ EXPECT_FALSE(CJobManager::GetInstance().IsPaused(CJob::PRIORITY_NORMAL));
+ CJobManager::GetInstance().Pause(CJob::PRIORITY_NORMAL);
+ EXPECT_TRUE(CJobManager::GetInstance().IsPaused(CJob::PRIORITY_NORMAL));
+ CJobManager::GetInstance().UnPause(CJob::PRIORITY_NORMAL);
+ EXPECT_FALSE(CJobManager::GetInstance().IsPaused(CJob::PRIORITY_NORMAL));
CJobManager::GetInstance().CancelJobs();
}
diff --git a/xbmc/video/GUIViewStateVideo.cpp b/xbmc/video/GUIViewStateVideo.cpp
index 5b2b67ee1e..18baf2ce62 100644
--- a/xbmc/video/GUIViewStateVideo.cpp
+++ b/xbmc/video/GUIViewStateVideo.cpp
@@ -27,10 +27,13 @@
#include "VideoDatabase.h"
#include "settings/GUISettings.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSettings.h"
+#include "settings/MediaSourceSettings.h"
#include "settings/Settings.h"
#include "FileItem.h"
#include "guilib/WindowIDs.h"
#include "guilib/LocalizeStrings.h"
+#include "view/ViewStateSettings.h"
using namespace XFILE;
using namespace VIDEODATABASEDIRECTORY;
@@ -77,23 +80,25 @@ CGUIViewStateWindowVideoFiles::CGUIViewStateWindowVideoFiles(const CFileItemList
AddSortMethod(SORT_METHOD_SIZE, 553, LABEL_MASKS("%L", "%I", "%L", "%I")); // Label, Size | Label, Size
AddSortMethod(SORT_METHOD_DATE, 552, LABEL_MASKS("%L", "%J", "%L", "%J")); // Label, Date | Label, Date
AddSortMethod(SORT_METHOD_FILE, 561, LABEL_MASKS("%L", "%I", "%L", "")); // Label, Size | Label, empty
-
- SetSortMethod(g_settings.m_viewStateVideoFiles.m_sortMethod);
- SetViewAsControl(g_settings.m_viewStateVideoFiles.m_viewMode);
- SetSortOrder(g_settings.m_viewStateVideoFiles.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videofiles");
+ SetSortMethod(viewState->m_sortMethod);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
LoadViewState(items.GetPath(), WINDOW_VIDEO_FILES);
}
void CGUIViewStateWindowVideoFiles::SaveViewState()
{
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_FILES, &g_settings.m_viewStateVideoFiles);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_FILES, CViewStateSettings::Get().Get("videofiles"));
}
VECSOURCES& CGUIViewStateWindowVideoFiles::GetSources()
{
- AddOrReplace(g_settings.m_videoSources, CGUIViewStateWindowVideo::GetSources());
- return g_settings.m_videoSources;
+ VECSOURCES *videoSources = CMediaSourceSettings::Get().GetSources("video");
+ AddOrReplace(*videoSources, CGUIViewStateWindowVideo::GetSources());
+ return *videoSources;
}
CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& items) : CGUIViewStateWindowVideo(items)
@@ -134,30 +139,30 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
{
AddSortMethod(SORT_METHOD_LABEL, 551, LABEL_MASKS("%T", "%R", "%L", "")); // Title, Rating | Label, empty
SetSortMethod(SORT_METHOD_LABEL);
-
- SetViewAsControl(g_settings.m_viewStateVideoNavActors.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateVideoNavActors.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavactors");
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_YEAR:
{
AddSortMethod(SORT_METHOD_LABEL, 551, LABEL_MASKS("%T", "%R", "%L", "")); // Title, Rating | Label, empty
SetSortMethod(SORT_METHOD_LABEL);
-
- SetViewAsControl(g_settings.m_viewStateVideoNavYears.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateVideoNavYears.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavyears");
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_SEASONS:
{
AddSortMethod(SORT_METHOD_VIDEO_SORT_TITLE, 556, LABEL_MASKS("%L", "","%L","")); // Label, empty | Label, empty
SetSortMethod(SORT_METHOD_VIDEO_SORT_TITLE);
-
- SetViewAsControl(g_settings.m_viewStateVideoNavSeasons.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateVideoNavSeasons.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavseasons");
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_TITLE_TVSHOWS:
@@ -172,10 +177,10 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(SORT_METHOD_LASTPLAYED, 568, LABEL_MASKS("%T", "%p", "%T", "%p")); // Title, #Last played | Title, #Last played
AddSortMethod(SORT_METHOD_YEAR, 562, LABEL_MASKS("%L","%Y","%L","%Y")); // Label, Year | Label, Year
SetSortMethod(SORT_METHOD_LABEL);
-
- SetViewAsControl(g_settings.m_viewStateVideoNavTvShows.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateVideoNavTvShows.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavtvshows");
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_MUSICVIDEOS_ALBUM:
@@ -185,10 +190,10 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
{
AddSortMethod(SORT_METHOD_LABEL, 551, LABEL_MASKS("%T", "%R", "%L", "")); // Title, Rating | Label, empty
SetSortMethod(SORT_METHOD_LABEL);
-
- SetViewAsControl(g_settings.m_viewStateVideoNavGenres.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateVideoNavGenres.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavgenres");
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_SETS:
@@ -202,14 +207,14 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(SORT_METHOD_VIDEO_RATING, 563, LABEL_MASKS("%T", "%R", "%T", "%R")); // Title, Rating | Title, Rating
AddSortMethod(SORT_METHOD_DATEADDED, 570, LABEL_MASKS("%T", "%a", "%T", "%a")); // Title, DateAdded | Title, DateAdded
- if (g_settings.GetWatchMode(items.GetContent()) == VIDEO_SHOW_ALL)
+ if (CMediaSettings::Get().GetWatchedMode(items.GetContent()) == WatchedModeAll)
AddSortMethod(SORT_METHOD_PLAYCOUNT, 567, LABEL_MASKS("%T", "%V", "%T", "%V")); // Title, Playcount | Title, Playcount
SetSortMethod(SORT_METHOD_LABEL_IGNORE_THE);
-
- SetViewAsControl(g_settings.m_viewStateVideoNavGenres.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateVideoNavGenres.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavgenres");
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_TAGS:
@@ -220,8 +225,10 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(method, 551, LABEL_MASKS("%T","", "%T","")); // Title, empty | Title, empty
SetSortMethod(method);
- SetViewAsControl(g_settings.m_viewStateVideoNavGenres.m_viewMode);
- SetSortOrder(g_settings.m_viewStateVideoNavGenres.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavgenres");
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_EPISODES:
@@ -234,7 +241,7 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(SORT_METHOD_PRODUCTIONCODE, 20368, LABEL_MASKS("%E. %T","%P", "%E. %T","%P")); // Episode. Title, ProductionCode | Episode. Title, ProductionCode
AddSortMethod(SORT_METHOD_DATE, 552, LABEL_MASKS("%E. %T","%J","%E. %T","%J")); // Episode. Title, Date | Episode. Title, Date
- if (g_settings.GetWatchMode(items.GetContent()) == VIDEO_SHOW_ALL)
+ if (CMediaSettings::Get().GetWatchedMode(items.GetContent()) == WatchedModeAll)
AddSortMethod(SORT_METHOD_PLAYCOUNT, 567, LABEL_MASKS("%E. %T", "%V")); // Episode. Title, Playcount | empty, empty
}
else
@@ -245,19 +252,18 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(SORT_METHOD_PRODUCTIONCODE, 20368, LABEL_MASKS("%H. %T","%P", "%H. %T","%P")); // Order. Title, ProductionCode | Episode. Title, ProductionCode
AddSortMethod(SORT_METHOD_DATE, 552, LABEL_MASKS("%H. %T","%J","%H. %T","%J")); // Order. Title, Date | Episode. Title, Date
- if (g_settings.GetWatchMode(items.GetContent()) == VIDEO_SHOW_ALL)
+ if (CMediaSettings::Get().GetWatchedMode(items.GetContent()) == WatchedModeAll)
AddSortMethod(SORT_METHOD_PLAYCOUNT, 567, LABEL_MASKS("%H. %T", "%V")); // Order. Title, Playcount | empty, empty
}
if (g_guiSettings.GetBool("filelists.ignorethewhensorting"))
AddSortMethod(SORT_METHOD_LABEL_IGNORE_THE, 551, LABEL_MASKS("%T","%R")); // Title, Rating | empty, empty
else
AddSortMethod(SORT_METHOD_LABEL, 551, LABEL_MASKS("%T", "%R")); // Title, Rating | empty, empty
-
- SetSortMethod(g_settings.m_viewStateVideoNavEpisodes.m_sortMethod);
-
- SetViewAsControl(g_settings.m_viewStateVideoNavEpisodes.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateVideoNavEpisodes.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavepisodes");
+ SetSortMethod(viewState->m_sortMethod);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
break;
}
case NODE_TYPE_RECENTLY_ADDED_EPISODES:
@@ -265,7 +271,7 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(SORT_METHOD_NONE, 552, LABEL_MASKS("%Z - %H. %T", "%R")); // TvShow - Order. Title, Rating | empty, empty
SetSortMethod(SORT_METHOD_NONE);
- SetViewAsControl(g_settings.m_viewStateVideoNavEpisodes.m_viewMode);
+ SetViewAsControl(CViewStateSettings::Get().Get("videonavepisodes")->m_viewMode);
SetSortOrder(SortOrderNone);
break;
@@ -295,17 +301,17 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(SORT_METHOD_VIDEO_RUNTIME, 180, LABEL_MASKS("%T", "%D")); // Title, Duration | empty, empty
AddSortMethod(SORT_METHOD_DATEADDED, 570, LABEL_MASKS("%T", "%a", "%T", "%a")); // Title, DateAdded | Title, DateAdded
- if (g_settings.GetWatchMode(items.GetContent()) == VIDEO_SHOW_ALL)
+ if (CMediaSettings::Get().GetWatchedMode(items.GetContent()) == WatchedModeAll)
AddSortMethod(SORT_METHOD_PLAYCOUNT, 567, LABEL_MASKS("%T", "%V", "%T", "%V")); // Title, Playcount | Title, Playcount
-
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavtitles");
if (params.GetSetId() > -1)
SetSortMethod(SORT_METHOD_YEAR);
else
- SetSortMethod(g_settings.m_viewStateVideoNavTitles.m_sortMethod);
-
- SetViewAsControl(g_settings.m_viewStateVideoNavTitles.m_viewMode);
+ SetSortMethod(viewState->m_sortMethod);
- SetSortOrder(g_settings.m_viewStateVideoNavTitles.m_sortOrder);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_TITLE_MUSICVIDEOS:
@@ -327,18 +333,17 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(SORT_METHOD_ALBUM, 558, LABEL_MASKS("%B - %T", "%Y")); // Album - Title, Year | empty, empty
}
- if (g_settings.GetWatchMode(items.GetContent()) == VIDEO_SHOW_ALL)
+ if (CMediaSettings::Get().GetWatchedMode(items.GetContent()) == WatchedModeAll)
AddSortMethod(SORT_METHOD_PLAYCOUNT, 567, LABEL_MASKS("%T", "%V")); // Title, Playcount | empty, empty
CStdString strTrackLeft=g_guiSettings.GetString("musicfiles.trackformat");
CStdString strTrackRight=g_guiSettings.GetString("musicfiles.trackformatright");
AddSortMethod(SORT_METHOD_TRACKNUM, 554, LABEL_MASKS(strTrackLeft, strTrackRight)); // Userdefined, Userdefined | empty, empty
-
- SetSortMethod(g_settings.m_viewStateVideoNavMusicVideos.m_sortMethod);
-
- SetViewAsControl(g_settings.m_viewStateVideoNavMusicVideos.m_viewMode);
-
- SetSortOrder(g_settings.m_viewStateVideoNavMusicVideos.m_sortOrder);
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavmusicvideos");
+ SetSortMethod(viewState->m_sortMethod);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
break;
case NODE_TYPE_RECENTLY_ADDED_MOVIES:
@@ -346,7 +351,7 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(SORT_METHOD_NONE, 552, LABEL_MASKS("%T", "%R")); // Title, Rating | empty, empty
SetSortMethod(SORT_METHOD_NONE);
- SetViewAsControl(g_settings.m_viewStateVideoNavTitles.m_viewMode);
+ SetViewAsControl(CViewStateSettings::Get().Get("videonavtitles")->m_viewMode);
SetSortOrder(SortOrderNone);
}
@@ -356,7 +361,7 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(SORT_METHOD_NONE, 552, LABEL_MASKS("%A - %T", "%Y")); // Artist - Title, Year | empty, empty
SetSortMethod(SORT_METHOD_NONE);
- SetViewAsControl(g_settings.m_viewStateVideoNavMusicVideos.m_viewMode);
+ SetViewAsControl(CViewStateSettings::Get().Get("videonavmusicvideos")->m_viewMode);
SetSortOrder(SortOrderNone);
}
@@ -375,9 +380,10 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
AddSortMethod(SORT_METHOD_DATE, 552, LABEL_MASKS("%L", "%J", "%L", "%J")); // Label, Date | Label, Date
AddSortMethod(SORT_METHOD_FILE, 561, LABEL_MASKS("%L", "%I", "%L", "")); // Label, Size | Label, empty
- SetSortMethod(g_settings.m_viewStateVideoFiles.m_sortMethod);
- SetViewAsControl(g_settings.m_viewStateVideoFiles.m_viewMode);
- SetSortOrder(g_settings.m_viewStateVideoFiles.m_sortOrder);
+ CViewState *viewState = CViewStateSettings::Get().Get("videofiles");
+ SetSortMethod(viewState->m_sortMethod);
+ SetViewAsControl(viewState->m_viewMode);
+ SetSortOrder(viewState->m_sortOrder);
}
LoadViewState(items.GetPath(), WINDOW_VIDEO_NAV);
}
@@ -392,28 +398,28 @@ void CGUIViewStateWindowVideoNav::SaveViewState()
switch (NodeType)
{
case NODE_TYPE_ACTOR:
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavActors);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videonavactors"));
break;
case NODE_TYPE_YEAR:
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavYears);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videonavyears"));
break;
case NODE_TYPE_GENRE:
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavGenres);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videonavgenres"));
break;
case NODE_TYPE_TITLE_MOVIES:
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, params.GetSetId() > -1 ? NULL : &g_settings.m_viewStateVideoNavTitles);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, params.GetSetId() > -1 ? NULL : CViewStateSettings::Get().Get("videonavtitles"));
break;
case NODE_TYPE_EPISODES:
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavEpisodes);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videonavepisodes"));
break;
case NODE_TYPE_TITLE_TVSHOWS:
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavTvShows);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videonavtvshows"));
break;
case NODE_TYPE_SEASONS:
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavSeasons);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videonavseasons"));
break;
case NODE_TYPE_TITLE_MUSICVIDEOS:
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavMusicVideos);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV,CViewStateSettings::Get().Get("videonavmusicvideos"));
break;
default:
SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV);
@@ -422,7 +428,7 @@ void CGUIViewStateWindowVideoNav::SaveViewState()
}
else
{
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoFiles);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videofiles"));
}
}
@@ -509,22 +515,23 @@ CGUIViewStateVideoMovies::CGUIViewStateVideoMovies(const CFileItemList& items) :
AddSortMethod(SORT_METHOD_MPAA_RATING, 20074, LABEL_MASKS("%T", "%O")); // Title, MPAA | empty, empty
AddSortMethod(SORT_METHOD_YEAR, 562, LABEL_MASKS("%T", "%Y", "%T", "%Y")); // Title, Year | Title, Year
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavtitles");
if (items.IsSmartPlayList() || items.GetProperty("library.filter").asBoolean())
AddPlaylistOrder(items, LABEL_MASKS("%T", "%R", "%T", "%R")); // Title, Rating | Title, Rating
else
{
- SetSortMethod(g_settings.m_viewStateVideoNavTitles.m_sortMethod);
- SetSortOrder(g_settings.m_viewStateVideoNavTitles.m_sortOrder);
+ SetSortMethod(viewState->m_sortMethod);
+ SetSortOrder(viewState->m_sortOrder);
}
- SetViewAsControl(g_settings.m_viewStateVideoNavTitles.m_viewMode);
+ SetViewAsControl(viewState->m_viewMode);
LoadViewState(items.GetPath(), WINDOW_VIDEO_NAV);
}
void CGUIViewStateVideoMovies::SaveViewState()
{
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavTitles);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videonavtitles"));
}
@@ -552,23 +559,24 @@ CGUIViewStateVideoMusicVideos::CGUIViewStateVideoMusicVideos(const CFileItemList
CStdString strTrackLeft=g_guiSettings.GetString("musicfiles.trackformat");
CStdString strTrackRight=g_guiSettings.GetString("musicfiles.trackformatright");
AddSortMethod(SORT_METHOD_TRACKNUM, 554, LABEL_MASKS(strTrackLeft, strTrackRight)); // Userdefined, Userdefined | empty, empty
-
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavmusicvideos");
if (items.IsSmartPlayList() || items.GetProperty("library.filter").asBoolean())
AddPlaylistOrder(items, LABEL_MASKS("%A - %T", "%Y")); // Artist - Title, Year | empty, empty
else
{
- SetSortMethod(g_settings.m_viewStateVideoNavMusicVideos.m_sortMethod);
- SetSortOrder(g_settings.m_viewStateVideoNavMusicVideos.m_sortOrder);
+ SetSortMethod(viewState->m_sortMethod);
+ SetSortOrder(viewState->m_sortOrder);
}
- SetViewAsControl(g_settings.m_viewStateVideoNavMusicVideos.m_viewMode);
+ SetViewAsControl(viewState->m_viewMode);
LoadViewState(items.GetPath(), WINDOW_VIDEO_NAV);
}
void CGUIViewStateVideoMusicVideos::SaveViewState()
{
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavMusicVideos);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videonavmusicvideos"));
}
CGUIViewStateVideoTVShows::CGUIViewStateVideoTVShows(const CFileItemList& items) : CGUIViewStateWindowVideo(items)
@@ -578,23 +586,24 @@ CGUIViewStateVideoTVShows::CGUIViewStateVideoTVShows(const CFileItemList& items)
else
AddSortMethod(SORT_METHOD_VIDEO_SORT_TITLE, 556, LABEL_MASKS("%T", "%M", "%T", "%M")); // Title, #Episodes | Title, #Episodes
AddSortMethod(SORT_METHOD_YEAR, 562, LABEL_MASKS("%T", "%Y", "%T", "%Y")); // Title, Year | Title, Year
-
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavtvshows");
if (items.IsSmartPlayList() || items.GetProperty("library.filter").asBoolean())
AddPlaylistOrder(items, LABEL_MASKS("%T", "%M", "%T", "%M")); // Title, #Episodes | Title, #Episodes
else
{
- SetSortMethod(g_settings.m_viewStateVideoNavTvShows.m_sortMethod);
- SetSortOrder(g_settings.m_viewStateVideoNavTvShows.m_sortOrder);
+ SetSortMethod(viewState->m_sortMethod);
+ SetSortOrder(viewState->m_sortOrder);
}
- SetViewAsControl(g_settings.m_viewStateVideoNavTvShows.m_viewMode);
+ SetViewAsControl(viewState->m_viewMode);
LoadViewState(items.GetPath(), WINDOW_VIDEO_NAV);
}
void CGUIViewStateVideoTVShows::SaveViewState()
{
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavTvShows);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videonavtvshows"));
}
@@ -620,22 +629,23 @@ CGUIViewStateVideoEpisodes::CGUIViewStateVideoEpisodes(const CFileItemList& item
AddSortMethod(SORT_METHOD_PRODUCTIONCODE, 20368, LABEL_MASKS("%Z - %H. %T","%P")); // TvShow - Order. Title, Production Code | empty, empty
AddSortMethod(SORT_METHOD_DATE, 552, LABEL_MASKS("%Z - %H. %T","%J")); // TvShow - Order. Title, Date | empty, empty
}
-
+
+ CViewState *viewState = CViewStateSettings::Get().Get("videonavepisodes");
if (items.IsSmartPlayList() || items.GetProperty("library.filter").asBoolean())
AddPlaylistOrder(items, LABEL_MASKS("%Z - %H. %T", "%R")); // TvShow - Order. Title, Rating | empty, empty
else
{
- SetSortMethod(g_settings.m_viewStateVideoNavEpisodes.m_sortMethod);
- SetSortOrder(g_settings.m_viewStateVideoNavEpisodes.m_sortOrder);
+ SetSortMethod(viewState->m_sortMethod);
+ SetSortOrder(viewState->m_sortOrder);
}
- SetViewAsControl(g_settings.m_viewStateVideoNavEpisodes.m_viewMode);
+ SetViewAsControl(viewState->m_viewMode);
LoadViewState(items.GetPath(), WINDOW_VIDEO_NAV);
}
void CGUIViewStateVideoEpisodes::SaveViewState()
{
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavEpisodes);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, CViewStateSettings::Get().Get("videonavepisodes"));
}
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp
index 4727fe5cef..43957e61c0 100644
--- a/xbmc/video/VideoDatabase.cpp
+++ b/xbmc/video/VideoDatabase.cpp
@@ -41,6 +41,8 @@
#include "FileItem.h"
#include "settings/AdvancedSettings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
+#include "settings/MediaSourceSettings.h"
#include "settings/Settings.h"
#include "utils/StringUtils.h"
#include "guilib/LocalizeStrings.h"
@@ -4089,7 +4091,7 @@ bool CVideoDatabase::UpdateOldVersion(int iVersion)
if (iVersion < 50)
{
m_pDS->exec("ALTER TABLE settings ADD ScalingMethod integer");
- m_pDS->exec(PrepareSQL("UPDATE settings set ScalingMethod=%i", g_settings.m_defaultVideoSettings.m_ScalingMethod));
+ m_pDS->exec(PrepareSQL("UPDATE settings set ScalingMethod=%i", CMediaSettings::Get().GetDefaultVideoSettings().m_ScalingMethod));
}
if (iVersion < 51)
{
@@ -4808,7 +4810,7 @@ bool CVideoDatabase::GetNavCommon(const CStdString& strBaseDir, CFileItemList& i
if (it == mapItems.end())
{
// check path
- if (g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv(2).get_asString()),g_settings.m_videoSources))
+ if (g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv(2).get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
if (idContent == VIDEODB_CONTENT_MOVIES || idContent == VIDEODB_CONTENT_MUSICVIDEOS)
mapItems.insert(pair<int, pair<CStdString,int> >(id, pair<CStdString,int>(str,m_pDS->fv(3).get_asInt()))); //fv(3) is file.playCount
@@ -5072,7 +5074,7 @@ bool CVideoDatabase::GetMusicVideoAlbumsNav(const CStdString& strBaseDir, CFileI
if (it == mapAlbums.end())
{
// check path
- if (g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
mapAlbums.insert(make_pair(lidMVideo, make_pair(strAlbum,m_pDS->fv(2).get_asString())));
}
m_pDS->next();
@@ -5304,7 +5306,7 @@ bool CVideoDatabase::GetPeopleNav(const CStdString& strBaseDir, CFileItemList& i
if (it == mapActors.end())
{
// check path
- if (g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
mapActors.insert(pair<int, CActor>(idActor, actor));
}
m_pDS->next();
@@ -5455,7 +5457,7 @@ bool CVideoDatabase::GetYearsNav(const CStdString& strBaseDir, CFileItemList& it
if (it == mapYears.end())
{
// check path
- if (g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
CStdString year;
year.Format("%d", lYear);
@@ -5642,7 +5644,7 @@ bool CVideoDatabase::GetSeasonsNav(const CStdString& strBaseDir, CFileItemList&
int iSeason = m_pDS->fv(0).get_asInt();
it = mapSeasons.find(iSeason);
// check path
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -5906,7 +5908,7 @@ bool CVideoDatabase::GetMoviesByWhere(const CStdString& strBaseDir, const Filter
CVideoInfoTag movie = GetDetailsForMovie(record);
if (g_settings.GetMasterProfile().getLockMode() == LOCK_MODE_EVERYONE ||
g_passwordManager.bMasterUser ||
- g_passwordManager.IsDatabasePathUnlocked(movie.m_strPath, g_settings.m_videoSources))
+ g_passwordManager.IsDatabasePathUnlocked(movie.m_strPath, *CMediaSourceSettings::Get().GetSources("video")))
{
CFileItemPtr pItem(new CFileItem(movie));
@@ -6011,7 +6013,7 @@ bool CVideoDatabase::GetTvShowsByWhere(const CStdString& strBaseDir, const Filte
CVideoInfoTag movie = GetDetailsForTvShow(record, false);
if ((g_settings.GetMasterProfile().getLockMode() == LOCK_MODE_EVERYONE ||
g_passwordManager.bMasterUser ||
- g_passwordManager.IsDatabasePathUnlocked(movie.m_strPath, g_settings.m_videoSources)) &&
+ g_passwordManager.IsDatabasePathUnlocked(movie.m_strPath, *CMediaSourceSettings::Get().GetSources("video"))) &&
(!g_advancedSettings.m_bVideoLibraryHideEmptySeries || movie.m_iEpisode > 0))
{
CFileItemPtr pItem(new CFileItem(movie));
@@ -6332,7 +6334,7 @@ bool CVideoDatabase::GetEpisodesByWhere(const CStdString& strBaseDir, const Filt
CVideoInfoTag movie = GetDetailsForEpisode(record);
if (g_settings.GetMasterProfile().getLockMode() == LOCK_MODE_EVERYONE ||
g_passwordManager.bMasterUser ||
- g_passwordManager.IsDatabasePathUnlocked(movie.m_strPath, g_settings.m_videoSources))
+ g_passwordManager.IsDatabasePathUnlocked(movie.m_strPath, *CMediaSourceSettings::Get().GetSources("video")))
{
CFileItemPtr pItem(new CFileItem(movie));
formatter.FormatLabel(pItem.get());
@@ -6773,7 +6775,7 @@ void CVideoDatabase::GetMovieGenresByName(const CStdString& strSearch, CFileItem
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),
- g_settings.m_videoSources))
+ *CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -6814,7 +6816,7 @@ void CVideoDatabase::GetMovieCountriesByName(const CStdString& strSearch, CFileI
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),
- g_settings.m_videoSources))
+ *CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -6854,7 +6856,7 @@ void CVideoDatabase::GetTvShowGenresByName(const CStdString& strSearch, CFileIte
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -6894,7 +6896,7 @@ void CVideoDatabase::GetMovieActorsByName(const CStdString& strSearch, CFileItem
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -6934,7 +6936,7 @@ void CVideoDatabase::GetTvShowsActorsByName(const CStdString& strSearch, CFileIt
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -6977,7 +6979,7 @@ void CVideoDatabase::GetMusicVideoArtistsByName(const CStdString& strSearch, CFi
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7017,7 +7019,7 @@ void CVideoDatabase::GetMusicVideoGenresByName(const CStdString& strSearch, CFil
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7073,7 +7075,7 @@ void CVideoDatabase::GetMusicVideoAlbumsByName(const CStdString& strSearch, CFil
}
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7113,7 +7115,7 @@ void CVideoDatabase::GetMusicVideosByAlbum(const CStdString& strSearch, CFileIte
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7192,7 +7194,7 @@ bool CVideoDatabase::GetMusicVideosByWhere(const CStdString &baseDir, const Filt
CVideoInfoTag musicvideo = GetDetailsForMusicVideo(record);
if (!checkLocks || g_settings.GetMasterProfile().getLockMode() == LOCK_MODE_EVERYONE || g_passwordManager.bMasterUser ||
- g_passwordManager.IsDatabasePathUnlocked(musicvideo.m_strPath, g_settings.m_videoSources))
+ g_passwordManager.IsDatabasePathUnlocked(musicvideo.m_strPath, *CMediaSourceSettings::Get().GetSources("video")))
{
CFileItemPtr item(new CFileItem(musicvideo));
@@ -7313,7 +7315,7 @@ int CVideoDatabase::GetMatchingMusicVideo(const CStdString& strArtist, const CSt
return -1;
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->close();
return -1;
@@ -7348,7 +7350,7 @@ void CVideoDatabase::GetMoviesByName(const CStdString& strSearch, CFileItemList&
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7393,7 +7395,7 @@ void CVideoDatabase::GetTvShowsByName(const CStdString& strSearch, CFileItemList
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7435,7 +7437,7 @@ void CVideoDatabase::GetEpisodesByName(const CStdString& strSearch, CFileItemLis
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7478,7 +7480,7 @@ void CVideoDatabase::GetMusicVideosByName(const CStdString& strSearch, CFileItem
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7526,7 +7528,7 @@ void CVideoDatabase::GetEpisodesByPlot(const CStdString& strSearch, CFileItemLis
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7566,7 +7568,7 @@ void CVideoDatabase::GetMoviesByPlot(const CStdString& strSearch, CFileItemList&
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv(2).get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv(2).get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7608,7 +7610,7 @@ void CVideoDatabase::GetMovieDirectorsByName(const CStdString& strSearch, CFileI
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7650,7 +7652,7 @@ void CVideoDatabase::GetTvShowsDirectorsByName(const CStdString& strSearch, CFil
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7692,7 +7694,7 @@ void CVideoDatabase::GetMusicVideoDirectorsByName(const CStdString& strSearch, C
while (!m_pDS->eof())
{
if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
- if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),g_settings.m_videoSources))
+ if (!g_passwordManager.IsDatabasePathUnlocked(CStdString(m_pDS->fv("path.strPath").get_asString()),*CMediaSourceSettings::Get().GetSources("video")))
{
m_pDS->next();
continue;
@@ -7784,7 +7786,7 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se
int current = 0;
bool bIsSource;
- VECSOURCES *pShares = g_settings.GetSourcesFromType("video");
+ VECSOURCES *pShares = CMediaSourceSettings::Get().GetSources("video");
while (!m_pDS->eof())
{
diff --git a/xbmc/video/VideoInfoTag.cpp b/xbmc/video/VideoInfoTag.cpp
index 404f033e20..d59205d391 100644
--- a/xbmc/video/VideoInfoTag.cpp
+++ b/xbmc/video/VideoInfoTag.cpp
@@ -26,7 +26,6 @@
#include "utils/log.h"
#include "utils/StringUtils.h"
#include "utils/Variant.h"
-#include "utils/CharsetConverter.h"
#include "TextureCache.h"
#include "filesystem/File.h"
diff --git a/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp b/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
index 3157bd7480..e8a581a8c2 100644
--- a/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
+++ b/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
@@ -34,6 +34,8 @@
#include "settings/AdvancedSettings.h"
#include "settings/Settings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
+#include "settings/MediaSourceSettings.h"
#include "guilib/LocalizeStrings.h"
#include "pvr/PVRManager.h"
#include "cores/AudioEngine/Utils/AEUtil.h"
@@ -87,20 +89,20 @@ void CGUIDialogAudioSubtitleSettings::CreateSettings()
m_volume = g_settings.m_fVolumeLevel;
AddSlider(AUDIO_SETTINGS_VOLUME, 13376, &m_volume, VOLUME_MINIMUM, VOLUME_MAXIMUM / 100.0f, VOLUME_MAXIMUM, PercentAsDecibel, false);
if (SupportsAudioFeature(IPC_AUD_AMP))
- AddSlider(AUDIO_SETTINGS_VOLUME_AMPLIFICATION, 660, &g_settings.m_currentVideoSettings.m_VolumeAmplification, VOLUME_DRC_MINIMUM * 0.01f, (VOLUME_DRC_MAXIMUM - VOLUME_DRC_MINIMUM) / 6000.0f, VOLUME_DRC_MAXIMUM * 0.01f, FormatDecibel, false);
+ AddSlider(AUDIO_SETTINGS_VOLUME_AMPLIFICATION, 660, &CMediaSettings::Get().GetCurrentVideoSettings().m_VolumeAmplification, VOLUME_DRC_MINIMUM * 0.01f, (VOLUME_DRC_MAXIMUM - VOLUME_DRC_MINIMUM) / 6000.0f, VOLUME_DRC_MAXIMUM * 0.01f, FormatDecibel, false);
if (g_application.m_pPlayer && g_application.m_pPlayer->IsPassthrough())
{
EnableSettings(AUDIO_SETTINGS_VOLUME,false);
EnableSettings(AUDIO_SETTINGS_VOLUME_AMPLIFICATION,false);
}
if (SupportsAudioFeature(IPC_AUD_OFFSET))
- AddSlider(AUDIO_SETTINGS_DELAY, 297, &g_settings.m_currentVideoSettings.m_AudioDelay, -g_advancedSettings.m_videoAudioDelayRange, .025f, g_advancedSettings.m_videoAudioDelayRange, FormatDelay);
+ AddSlider(AUDIO_SETTINGS_DELAY, 297, &CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay, -g_advancedSettings.m_videoAudioDelayRange, .025f, g_advancedSettings.m_videoAudioDelayRange, FormatDelay);
if (SupportsAudioFeature(IPC_AUD_SELECT_STREAM))
AddAudioStreams(AUDIO_SETTINGS_STREAM);
// only show stuff available in digital mode if we have digital output
if (SupportsAudioFeature(IPC_AUD_OUTPUT_STEREO))
- AddBool(AUDIO_SETTINGS_OUTPUT_TO_ALL_SPEAKERS, 252, &g_settings.m_currentVideoSettings.m_OutputToAllSpeakers, AUDIO_IS_BITSTREAM(g_guiSettings.GetInt("audiooutput.mode")));
+ AddBool(AUDIO_SETTINGS_OUTPUT_TO_ALL_SPEAKERS, 252, &CMediaSettings::Get().GetCurrentVideoSettings().m_OutputToAllSpeakers, AUDIO_IS_BITSTREAM(g_guiSettings.GetInt("audiooutput.mode")));
int settings[3] = { 338, 339, 420 }; //ANALOG, IEC958, HDMI
m_outputmode = g_guiSettings.GetInt("audiooutput.mode");
@@ -111,7 +113,7 @@ void CGUIDialogAudioSubtitleSettings::CreateSettings()
m_subtitleVisible = g_application.m_pPlayer->GetSubtitleVisible();
AddBool(SUBTITLE_SETTINGS_ENABLE, 13397, &m_subtitleVisible);
if (SupportsSubtitleFeature(IPC_SUBS_OFFSET))
- AddSlider(SUBTITLE_SETTINGS_DELAY, 22006, &g_settings.m_currentVideoSettings.m_SubtitleDelay, -g_advancedSettings.m_videoSubsDelayRange, 0.1f, g_advancedSettings.m_videoSubsDelayRange, FormatDelay);
+ AddSlider(SUBTITLE_SETTINGS_DELAY, 22006, &CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay, -g_advancedSettings.m_videoSubsDelayRange, 0.1f, g_advancedSettings.m_videoSubsDelayRange, FormatDelay);
if (SupportsSubtitleFeature(IPC_SUBS_SELECT))
AddSubtitleStreams(SUBTITLE_SETTINGS_STREAM);
if (SupportsSubtitleFeature(IPC_SUBS_EXTERNAL))
@@ -146,14 +148,14 @@ void CGUIDialogAudioSubtitleSettings::AddAudioStreams(unsigned int id)
bool bAC3 = strstr(strAudioCodec.c_str(), "AC3") != 0;
if (iNumChannels == 2 && !(bDTS || bAC3))
{ // ok, enable these options
-/* if (g_settings.m_currentVideoSettings.m_AudioStream == -1)
+/* if (CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream == -1)
{ // default to stereo stream
- g_settings.m_currentVideoSettings.m_AudioStream = 0;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream = 0;
}*/
setting.max = 2;
for (int i = 0; i <= setting.max; i++)
setting.entry.push_back(make_pair(setting.entry.size(), g_localizeStrings.Get(13320 + i)));
- m_audioStream = -g_settings.m_currentVideoSettings.m_AudioStream - 1;
+ m_audioStream = -CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream - 1;
m_settings.push_back(setting);
return;
}
@@ -247,12 +249,12 @@ void CGUIDialogAudioSubtitleSettings::OnSettingChanged(SettingInfo &setting)
else if (setting.id == AUDIO_SETTINGS_VOLUME_AMPLIFICATION)
{
if (g_application.m_pPlayer)
- g_application.m_pPlayer->SetDynamicRangeCompression((long)(g_settings.m_currentVideoSettings.m_VolumeAmplification * 100));
+ g_application.m_pPlayer->SetDynamicRangeCompression((long)(CMediaSettings::Get().GetCurrentVideoSettings().m_VolumeAmplification * 100));
}
else if (setting.id == AUDIO_SETTINGS_DELAY)
{
if (g_application.m_pPlayer)
- g_application.m_pPlayer->SetAVDelay(g_settings.m_currentVideoSettings.m_AudioDelay);
+ g_application.m_pPlayer->SetAVDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay);
}
else if (setting.id == AUDIO_SETTINGS_STREAM)
{
@@ -262,16 +264,16 @@ void CGUIDialogAudioSubtitleSettings::OnSettingChanged(SettingInfo &setting)
if (setting.max == 2)
{ // we're in the case we want - call the code to switch channels etc.
// update the screen setting...
- g_settings.m_currentVideoSettings.m_AudioStream = -1 - m_audioStream;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream = -1 - m_audioStream;
// call monkeyh1's code here...
- //bool bAudioOnAllSpeakers = (g_guiSettings.GetInt("audiooutput.mode") == AUDIO_IEC958) && g_settings.m_currentVideoSettings.m_OutputToAllSpeakers;
+ //bool bAudioOnAllSpeakers = (g_guiSettings.GetInt("audiooutput.mode") == AUDIO_IEC958) && CMediaSettings::Get().GetCurrentVideoSettings().m_OutputToAllSpeakers;
return;
}
}
// only change the audio stream if a different one has been asked for
if (g_application.m_pPlayer->GetAudioStream() != m_audioStream)
{
- g_settings.m_currentVideoSettings.m_AudioStream = m_audioStream;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream = m_audioStream;
g_application.m_pPlayer->SetAudioStream(m_audioStream); // Set the audio stream to the one selected
EnableSettings(AUDIO_SETTINGS_VOLUME, !g_application.m_pPlayer->IsPassthrough());
}
@@ -297,16 +299,16 @@ void CGUIDialogAudioSubtitleSettings::OnSettingChanged(SettingInfo &setting)
}
else if (setting.id == SUBTITLE_SETTINGS_ENABLE)
{
- g_settings.m_currentVideoSettings.m_SubtitleOn = m_subtitleVisible;
- g_application.m_pPlayer->SetSubtitleVisible(g_settings.m_currentVideoSettings.m_SubtitleOn);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = m_subtitleVisible;
+ g_application.m_pPlayer->SetSubtitleVisible(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn);
}
else if (setting.id == SUBTITLE_SETTINGS_DELAY)
{
- g_application.m_pPlayer->SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
+ g_application.m_pPlayer->SetSubTitleDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
}
else if (setting.id == SUBTITLE_SETTINGS_STREAM && setting.max > 0)
{
- g_settings.m_currentVideoSettings.m_SubtitleStream = m_subtitleStream;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream = m_subtitleStream;
g_application.m_pPlayer->SetSubtitle(m_subtitleStream);
}
else if (setting.id == SUBTITLE_SETTINGS_BROWSER)
@@ -323,7 +325,7 @@ void CGUIDialogAudioSubtitleSettings::OnSettingChanged(SettingInfo &setting)
CStdString strMask = ".utf|.utf8|.utf-8|.sub|.srt|.smi|.rt|.txt|.ssa|.aqt|.jss|.ass|.idx|.rar|.zip";
if (g_application.GetCurrentPlayer() == EPC_DVDPLAYER)
strMask = ".srt|.rar|.zip|.ifo|.smi|.sub|.idx|.ass|.ssa|.txt";
- VECSOURCES shares(g_settings.m_videoSources);
+ VECSOURCES shares(*CMediaSourceSettings::Get().GetSources("video"));
if (g_settings.iAdditionalSubtitleDirectoryChecked != -1 && !g_guiSettings.GetString("subtitles.custompath").IsEmpty())
{
CMediaSource share;
@@ -351,7 +353,7 @@ void CGUIDialogAudioSubtitleSettings::OnSettingChanged(SettingInfo &setting)
g_application.m_pPlayer->SetSubtitle(m_subtitleStream);
g_application.m_pPlayer->SetSubtitleVisible(true);
}
- g_settings.m_currentVideoSettings.m_SubtitleCached = true;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleCached = true;
Close();
}
}
@@ -369,9 +371,9 @@ void CGUIDialogAudioSubtitleSettings::OnSettingChanged(SettingInfo &setting)
db.Open();
db.EraseVideoSettings();
db.Close();
- g_settings.m_defaultVideoSettings = g_settings.m_currentVideoSettings;
- g_settings.m_defaultVideoSettings.m_SubtitleStream = -1;
- g_settings.m_defaultVideoSettings.m_AudioStream = -1;
+ CMediaSettings::Get().GetDefaultVideoSettings() = CMediaSettings::Get().GetCurrentVideoSettings();
+ CMediaSettings::Get().GetDefaultVideoSettings().m_SubtitleStream = -1;
+ CMediaSettings::Get().GetDefaultVideoSettings().m_AudioStream = -1;
g_settings.Save();
}
}
diff --git a/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp b/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp
index baccbdbea5..99d698ebac 100644
--- a/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp
@@ -264,21 +264,26 @@ void CGUIDialogVideoBookmarks::AddBookmark(CVideoInfoTag* tag)
{
#ifdef HAS_VIDEO_PLAYBACK
CRenderCapture* thumbnail = g_renderManager.AllocRenderCapture();
- g_renderManager.Capture(thumbnail, width, height, CAPTUREFLAG_IMMEDIATELY);
- if (thumbnail->GetUserState() == CAPTURESTATE_DONE)
+
+ if (thumbnail)
{
- Crc32 crc;
- crc.ComputeFromLowerCase(g_application.CurrentFile());
- bookmark.thumbNailImage.Format("%08x_%i.jpg", (unsigned __int32) crc, m_vecItems->Size() + 1);
- bookmark.thumbNailImage = URIUtils::AddFileToFolder(g_settings.GetBookmarksThumbFolder(), bookmark.thumbNailImage);
- if (!CPicture::CreateThumbnailFromSurface(thumbnail->GetPixels(), width, height, thumbnail->GetWidth() * 4,
- bookmark.thumbNailImage))
- bookmark.thumbNailImage.Empty();
- }
- else
- CLog::Log(LOGERROR,"CGUIDialogVideoBookmarks: failed to create thumbnail");
+ g_renderManager.Capture(thumbnail, width, height, CAPTUREFLAG_IMMEDIATELY);
- g_renderManager.ReleaseRenderCapture(thumbnail);
+ if (thumbnail->GetUserState() == CAPTURESTATE_DONE)
+ {
+ Crc32 crc;
+ crc.ComputeFromLowerCase(g_application.CurrentFile());
+ bookmark.thumbNailImage.Format("%08x_%i.jpg", (unsigned __int32) crc, m_vecItems->Size() + 1);
+ bookmark.thumbNailImage = URIUtils::AddFileToFolder(g_settings.GetBookmarksThumbFolder(), bookmark.thumbNailImage);
+ if (!CPicture::CreateThumbnailFromSurface(thumbnail->GetPixels(), width, height, thumbnail->GetWidth() * 4,
+ bookmark.thumbNailImage))
+ bookmark.thumbNailImage.Empty();
+ }
+ else
+ CLog::Log(LOGERROR,"CGUIDialogVideoBookmarks: failed to create thumbnail");
+
+ g_renderManager.ReleaseRenderCapture(thumbnail);
+ }
#endif
}
videoDatabase.Open();
diff --git a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
index 680f049637..633dc69f65 100644
--- a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
@@ -42,6 +42,7 @@
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSourceSettings.h"
#include "guilib/Key.h"
#include "guilib/LocalizeStrings.h"
#include "GUIUserMessages.h"
@@ -724,7 +725,7 @@ void CGUIDialogVideoInfo::OnGetArt()
}
CStdString result;
- VECSOURCES sources(g_settings.m_videoSources);
+ VECSOURCES sources(*CMediaSourceSettings::Get().GetSources("video"));
AddItemPathToFileBrowserSources(sources, *m_movieItem);
g_mediaManager.GetLocalDrives(sources);
if (CGUIDialogFileBrowser::ShowAndGetImage(items, sources, g_localizeStrings.Get(13511), result) &&
@@ -823,7 +824,7 @@ void CGUIDialogVideoInfo::OnGetFanart()
}
CStdString result;
- VECSOURCES sources(g_settings.m_videoSources);
+ VECSOURCES sources(*CMediaSourceSettings::Get().GetSources("video"));
AddItemPathToFileBrowserSources(sources, item);
g_mediaManager.GetLocalDrives(sources);
bool flip=false;
diff --git a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp
index 5fa35c172f..ae73489b19 100644
--- a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp
@@ -30,6 +30,7 @@
#include "video/VideoDatabase.h"
#include "dialogs/GUIDialogYesNo.h"
#include "settings/Settings.h"
+#include "settings/MediaSettings.h"
#include "addons/Skin.h"
#include "pvr/PVRManager.h"
@@ -87,7 +88,7 @@ void CGUIDialogVideoSettings::CreateSettings()
entries.push_back(make_pair(VS_DEINTERLACEMODE_FORCE , 16041));
if (entries.size())
- AddSpin(VIDEO_SETTINGS_DEINTERLACEMODE, 16037, (int*)&g_settings.m_currentVideoSettings.m_DeinterlaceMode, entries);
+ AddSpin(VIDEO_SETTINGS_DEINTERLACEMODE, 16037, (int*)&CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode, entries);
}
{
vector<pair<int, int> > entries;
@@ -122,8 +123,8 @@ void CGUIDialogVideoSettings::CreateSettings()
if (entries.size() > 1)
{
- AddSpin(VIDEO_SETTINGS_INTERLACEMETHOD, 16038, (int*)&g_settings.m_currentVideoSettings.m_InterlaceMethod, entries);
- if (g_settings.m_currentVideoSettings.m_DeinterlaceMode == VS_DEINTERLACEMODE_OFF)
+ AddSpin(VIDEO_SETTINGS_INTERLACEMETHOD, 16038, (int*)&CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod, entries);
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode == VS_DEINTERLACEMODE_OFF)
EnableSettings(VIDEO_SETTINGS_INTERLACEMETHOD, false);
}
}
@@ -155,37 +156,37 @@ void CGUIDialogVideoSettings::CreateSettings()
it = entries.erase(it);
}
- AddSpin(VIDEO_SETTINGS_SCALINGMETHOD, 16300, (int*)&g_settings.m_currentVideoSettings.m_ScalingMethod, entries);
+ AddSpin(VIDEO_SETTINGS_SCALINGMETHOD, 16300, (int*)&CMediaSettings::Get().GetCurrentVideoSettings().m_ScalingMethod, entries);
}
if (g_renderManager.Supports(RENDERFEATURE_CROP))
- AddBool(VIDEO_SETTINGS_CROP, 644, &g_settings.m_currentVideoSettings.m_Crop);
+ AddBool(VIDEO_SETTINGS_CROP, 644, &CMediaSettings::Get().GetCurrentVideoSettings().m_Crop);
if (g_renderManager.Supports(RENDERFEATURE_STRETCH) || g_renderManager.Supports(RENDERFEATURE_PIXEL_RATIO))
{
const int entries[] = {630, 631, 632, 633, 634, 635, 636 };
- AddSpin(VIDEO_SETTINGS_VIEW_MODE, 629, &g_settings.m_currentVideoSettings.m_ViewMode, 7, entries);
+ AddSpin(VIDEO_SETTINGS_VIEW_MODE, 629, &CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode, 7, entries);
}
if (g_renderManager.Supports(RENDERFEATURE_ZOOM))
- AddSlider(VIDEO_SETTINGS_ZOOM, 216, &g_settings.m_currentVideoSettings.m_CustomZoomAmount, 0.5f, 0.01f, 2.0f, FormatFloat);
+ AddSlider(VIDEO_SETTINGS_ZOOM, 216, &CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount, 0.5f, 0.01f, 2.0f, FormatFloat);
if (g_renderManager.Supports(RENDERFEATURE_VERTICAL_SHIFT))
- AddSlider(VIDEO_SETTINGS_VERTICAL_SHIFT, 225, &g_settings.m_currentVideoSettings.m_CustomVerticalShift, -2.0f, 0.01f, 2.0f, FormatFloat);
+ AddSlider(VIDEO_SETTINGS_VERTICAL_SHIFT, 225, &CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift, -2.0f, 0.01f, 2.0f, FormatFloat);
if (g_renderManager.Supports(RENDERFEATURE_PIXEL_RATIO))
- AddSlider(VIDEO_SETTINGS_PIXEL_RATIO, 217, &g_settings.m_currentVideoSettings.m_CustomPixelRatio, 0.5f, 0.01f, 2.0f, FormatFloat);
+ AddSlider(VIDEO_SETTINGS_PIXEL_RATIO, 217, &CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio, 0.5f, 0.01f, 2.0f, FormatFloat);
if (g_renderManager.Supports(RENDERFEATURE_POSTPROCESS))
- AddBool(VIDEO_SETTINGS_POSTPROCESS, 16400, &g_settings.m_currentVideoSettings.m_PostProcess);
+ AddBool(VIDEO_SETTINGS_POSTPROCESS, 16400, &CMediaSettings::Get().GetCurrentVideoSettings().m_PostProcess);
#ifdef HAS_VIDEO_PLAYBACK
if (g_renderManager.Supports(RENDERFEATURE_BRIGHTNESS))
- AddSlider(VIDEO_SETTINGS_BRIGHTNESS, 464, &g_settings.m_currentVideoSettings.m_Brightness, 0, 1, 100, FormatInteger);
+ AddSlider(VIDEO_SETTINGS_BRIGHTNESS, 464, &CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness, 0, 1, 100, FormatInteger);
if (g_renderManager.Supports(RENDERFEATURE_CONTRAST))
- AddSlider(VIDEO_SETTINGS_CONTRAST, 465, &g_settings.m_currentVideoSettings.m_Contrast, 0, 1, 100, FormatInteger);
+ AddSlider(VIDEO_SETTINGS_CONTRAST, 465, &CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast, 0, 1, 100, FormatInteger);
if (g_renderManager.Supports(RENDERFEATURE_GAMMA))
- AddSlider(VIDEO_SETTINGS_GAMMA, 466, &g_settings.m_currentVideoSettings.m_Gamma, 0, 1, 100, FormatInteger);
+ AddSlider(VIDEO_SETTINGS_GAMMA, 466, &CMediaSettings::Get().GetCurrentVideoSettings().m_Gamma, 0, 1, 100, FormatInteger);
if (g_renderManager.Supports(RENDERFEATURE_NOISE))
- AddSlider(VIDEO_SETTING_VDPAU_NOISE, 16312, &g_settings.m_currentVideoSettings.m_NoiseReduction, 0.0f, 0.01f, 1.0f, FormatFloat);
+ AddSlider(VIDEO_SETTING_VDPAU_NOISE, 16312, &CMediaSettings::Get().GetCurrentVideoSettings().m_NoiseReduction, 0.0f, 0.01f, 1.0f, FormatFloat);
if (g_renderManager.Supports(RENDERFEATURE_SHARPNESS))
- AddSlider(VIDEO_SETTING_VDPAU_SHARPNESS, 16313, &g_settings.m_currentVideoSettings.m_Sharpness, -1.0f, 0.02f, 1.0f, FormatFloat);
+ AddSlider(VIDEO_SETTING_VDPAU_SHARPNESS, 16313, &CMediaSettings::Get().GetCurrentVideoSettings().m_Sharpness, -1.0f, 0.02f, 1.0f, FormatFloat);
if (g_renderManager.Supports(RENDERFEATURE_NONLINSTRETCH))
- AddBool(VIDEO_SETTINGS_NONLIN_STRETCH, 659, &g_settings.m_currentVideoSettings.m_CustomNonLinStretch);
+ AddBool(VIDEO_SETTINGS_NONLIN_STRETCH, 659, &CMediaSettings::Get().GetCurrentVideoSettings().m_CustomNonLinStretch);
#endif
AddSeparator(8);
AddButton(VIDEO_SETTINGS_MAKE_DEFAULT, 12376);
@@ -202,7 +203,7 @@ void CGUIDialogVideoSettings::OnSettingChanged(SettingInfo &setting)
}
else if (setting.id == VIDEO_SETTINGS_VIEW_MODE)
{
- g_renderManager.SetViewMode(g_settings.m_currentVideoSettings.m_ViewMode);
+ g_renderManager.SetViewMode(CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode);
UpdateSetting(VIDEO_SETTINGS_ZOOM);
UpdateSetting(VIDEO_SETTINGS_PIXEL_RATIO);
UpdateSetting(VIDEO_SETTINGS_NONLIN_STRETCH);
@@ -212,8 +213,8 @@ void CGUIDialogVideoSettings::OnSettingChanged(SettingInfo &setting)
|| setting.id == VIDEO_SETTINGS_NONLIN_STRETCH
|| setting.id == VIDEO_SETTINGS_VERTICAL_SHIFT)
{
- g_settings.m_currentVideoSettings.m_ViewMode = VIEW_MODE_CUSTOM;
- g_renderManager.SetViewMode(VIEW_MODE_CUSTOM);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode = ViewModeCustom;
+ g_renderManager.SetViewMode(ViewModeCustom);
UpdateSetting(VIDEO_SETTINGS_VIEW_MODE);
}
else
@@ -239,15 +240,15 @@ void CGUIDialogVideoSettings::OnSettingChanged(SettingInfo &setting)
db.Open();
db.EraseVideoSettings();
db.Close();
- g_settings.m_defaultVideoSettings = g_settings.m_currentVideoSettings;
- g_settings.m_defaultVideoSettings.m_SubtitleStream = -1;
- g_settings.m_defaultVideoSettings.m_AudioStream = -1;
+ CMediaSettings::Get().GetDefaultVideoSettings() = CMediaSettings::Get().GetCurrentVideoSettings();
+ CMediaSettings::Get().GetDefaultVideoSettings().m_SubtitleStream = -1;
+ CMediaSettings::Get().GetDefaultVideoSettings().m_AudioStream = -1;
g_settings.Save();
}
}
else if (setting.id == VIDEO_SETTINGS_DEINTERLACEMODE)
{
- EnableSettings(VIDEO_SETTINGS_INTERLACEMETHOD, g_settings.m_currentVideoSettings.m_DeinterlaceMode != VS_DEINTERLACEMODE_OFF);
+ EnableSettings(VIDEO_SETTINGS_INTERLACEMETHOD, CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode != VS_DEINTERLACEMODE_OFF);
}
if (g_PVRManager.IsPlayingRadio() || g_PVRManager.IsPlayingTV())
diff --git a/xbmc/video/windows/GUIWindowFullScreen.cpp b/xbmc/video/windows/GUIWindowFullScreen.cpp
index 969c3f596f..0d26a97f1c 100644
--- a/xbmc/video/windows/GUIWindowFullScreen.cpp
+++ b/xbmc/video/windows/GUIWindowFullScreen.cpp
@@ -42,6 +42,7 @@
#include "dialogs/GUIDialogKaiToast.h"
#include "guilib/GUISliderControl.h"
#include "settings/Settings.h"
+#include "settings/MediaSettings.h"
#include "guilib/GUISelectButtonControl.h"
#include "FileItem.h"
#include "video/VideoReferenceClock.h"
@@ -223,10 +224,10 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
if (g_application.m_pPlayer->GetSubtitleCount() == 0)
return true;
- g_settings.m_currentVideoSettings.m_SubtitleOn = !g_settings.m_currentVideoSettings.m_SubtitleOn;
- g_application.m_pPlayer->SetSubtitleVisible(g_settings.m_currentVideoSettings.m_SubtitleOn);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = !CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn;
+ g_application.m_pPlayer->SetSubtitleVisible(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn);
CStdString sub, lang;
- if (g_settings.m_currentVideoSettings.m_SubtitleOn)
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn)
{
SPlayerSubtitleStreamInfo info;
g_application.m_pPlayer->GetSubtitleStreamInfo(g_application.m_pPlayer->GetSubtitle(), info);
@@ -259,28 +260,28 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
if (g_application.m_pPlayer->GetSubtitleCount() == 0)
return true;
- if(g_settings.m_currentVideoSettings.m_SubtitleStream < 0)
- g_settings.m_currentVideoSettings.m_SubtitleStream = g_application.m_pPlayer->GetSubtitle();
+ if(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream < 0)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream = g_application.m_pPlayer->GetSubtitle();
- if (g_settings.m_currentVideoSettings.m_SubtitleOn)
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn)
{
- g_settings.m_currentVideoSettings.m_SubtitleStream++;
- if (g_settings.m_currentVideoSettings.m_SubtitleStream >= g_application.m_pPlayer->GetSubtitleCount())
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream++;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream >= g_application.m_pPlayer->GetSubtitleCount())
{
- g_settings.m_currentVideoSettings.m_SubtitleStream = 0;
- g_settings.m_currentVideoSettings.m_SubtitleOn = false;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream = 0;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = false;
g_application.m_pPlayer->SetSubtitleVisible(false);
}
- g_application.m_pPlayer->SetSubtitle(g_settings.m_currentVideoSettings.m_SubtitleStream);
+ g_application.m_pPlayer->SetSubtitle(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream);
}
else
{
- g_settings.m_currentVideoSettings.m_SubtitleOn = true;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = true;
g_application.m_pPlayer->SetSubtitleVisible(true);
}
CStdString sub, lang;
- if (g_settings.m_currentVideoSettings.m_SubtitleOn)
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn)
{
SPlayerSubtitleStreamInfo info;
g_application.m_pPlayer->GetSubtitleStreamInfo(g_application.m_pPlayer->GetSubtitle(), info);
@@ -296,61 +297,61 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
break;
case ACTION_SUBTITLE_DELAY_MIN:
- g_settings.m_currentVideoSettings.m_SubtitleDelay -= 0.1f;
- if (g_settings.m_currentVideoSettings.m_SubtitleDelay < -g_advancedSettings.m_videoSubsDelayRange)
- g_settings.m_currentVideoSettings.m_SubtitleDelay = -g_advancedSettings.m_videoSubsDelayRange;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay -= 0.1f;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay < -g_advancedSettings.m_videoSubsDelayRange)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay = -g_advancedSettings.m_videoSubsDelayRange;
if (g_application.m_pPlayer)
- g_application.m_pPlayer->SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
+ g_application.m_pPlayer->SetSubTitleDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
- ShowSlider(action.GetID(), 22006, g_settings.m_currentVideoSettings.m_SubtitleDelay,
+ ShowSlider(action.GetID(), 22006, CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay,
-g_advancedSettings.m_videoSubsDelayRange, 0.1f,
g_advancedSettings.m_videoSubsDelayRange);
return true;
break;
case ACTION_SUBTITLE_DELAY_PLUS:
- g_settings.m_currentVideoSettings.m_SubtitleDelay += 0.1f;
- if (g_settings.m_currentVideoSettings.m_SubtitleDelay > g_advancedSettings.m_videoSubsDelayRange)
- g_settings.m_currentVideoSettings.m_SubtitleDelay = g_advancedSettings.m_videoSubsDelayRange;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay += 0.1f;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay > g_advancedSettings.m_videoSubsDelayRange)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay = g_advancedSettings.m_videoSubsDelayRange;
if (g_application.m_pPlayer)
- g_application.m_pPlayer->SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
+ g_application.m_pPlayer->SetSubTitleDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
- ShowSlider(action.GetID(), 22006, g_settings.m_currentVideoSettings.m_SubtitleDelay,
+ ShowSlider(action.GetID(), 22006, CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay,
-g_advancedSettings.m_videoSubsDelayRange, 0.1f,
g_advancedSettings.m_videoSubsDelayRange);
return true;
break;
case ACTION_SUBTITLE_DELAY:
- ShowSlider(action.GetID(), 22006, g_settings.m_currentVideoSettings.m_SubtitleDelay,
+ ShowSlider(action.GetID(), 22006, CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay,
-g_advancedSettings.m_videoSubsDelayRange, 0.1f,
g_advancedSettings.m_videoSubsDelayRange, true);
return true;
break;
case ACTION_AUDIO_DELAY:
- ShowSlider(action.GetID(), 297, g_settings.m_currentVideoSettings.m_AudioDelay,
+ ShowSlider(action.GetID(), 297, CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay,
-g_advancedSettings.m_videoAudioDelayRange, 0.025f,
g_advancedSettings.m_videoAudioDelayRange, true);
return true;
break;
case ACTION_AUDIO_DELAY_MIN:
- g_settings.m_currentVideoSettings.m_AudioDelay -= 0.025f;
- if (g_settings.m_currentVideoSettings.m_AudioDelay < -g_advancedSettings.m_videoAudioDelayRange)
- g_settings.m_currentVideoSettings.m_AudioDelay = -g_advancedSettings.m_videoAudioDelayRange;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay -= 0.025f;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay < -g_advancedSettings.m_videoAudioDelayRange)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay = -g_advancedSettings.m_videoAudioDelayRange;
if (g_application.m_pPlayer)
- g_application.m_pPlayer->SetAVDelay(g_settings.m_currentVideoSettings.m_AudioDelay);
+ g_application.m_pPlayer->SetAVDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay);
- ShowSlider(action.GetID(), 297, g_settings.m_currentVideoSettings.m_AudioDelay,
+ ShowSlider(action.GetID(), 297, CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay,
-g_advancedSettings.m_videoAudioDelayRange, 0.025f,
g_advancedSettings.m_videoAudioDelayRange);
return true;
break;
case ACTION_AUDIO_DELAY_PLUS:
- g_settings.m_currentVideoSettings.m_AudioDelay += 0.025f;
- if (g_settings.m_currentVideoSettings.m_AudioDelay > g_advancedSettings.m_videoAudioDelayRange)
- g_settings.m_currentVideoSettings.m_AudioDelay = g_advancedSettings.m_videoAudioDelayRange;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay += 0.025f;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay > g_advancedSettings.m_videoAudioDelayRange)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay = g_advancedSettings.m_videoAudioDelayRange;
if (g_application.m_pPlayer)
- g_application.m_pPlayer->SetAVDelay(g_settings.m_currentVideoSettings.m_AudioDelay);
+ g_application.m_pPlayer->SetAVDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay);
- ShowSlider(action.GetID(), 297, g_settings.m_currentVideoSettings.m_AudioDelay,
+ ShowSlider(action.GetID(), 297, CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay,
-g_advancedSettings.m_videoAudioDelayRange, 0.025f,
g_advancedSettings.m_videoAudioDelayRange);
return true;
@@ -360,16 +361,16 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
if (g_application.m_pPlayer->GetAudioStreamCount() == 1)
return true;
- if(g_settings.m_currentVideoSettings.m_AudioStream < 0)
- g_settings.m_currentVideoSettings.m_AudioStream = g_application.m_pPlayer->GetAudioStream();
+ if(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream < 0)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream = g_application.m_pPlayer->GetAudioStream();
- g_settings.m_currentVideoSettings.m_AudioStream++;
- if (g_settings.m_currentVideoSettings.m_AudioStream >= g_application.m_pPlayer->GetAudioStreamCount())
- g_settings.m_currentVideoSettings.m_AudioStream = 0;
- g_application.m_pPlayer->SetAudioStream(g_settings.m_currentVideoSettings.m_AudioStream); // Set the audio stream to the one selected
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream++;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream >= g_application.m_pPlayer->GetAudioStreamCount())
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream = 0;
+ g_application.m_pPlayer->SetAudioStream(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream); // Set the audio stream to the one selected
CStdString aud;
SPlayerAudioStreamInfo info;
- g_application.m_pPlayer->GetAudioStreamInfo(g_settings.m_currentVideoSettings.m_AudioStream, info);
+ g_application.m_pPlayer->GetAudioStreamInfo(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream, info);
aud = info.name;
CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(460), aud, DisplTime, false, MsgTime);
return true;
@@ -432,7 +433,7 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
if (m_bShowViewModeInfo)
{
#ifdef HAS_VIDEO_PLAYBACK
- g_renderManager.SetViewMode(++g_settings.m_currentVideoSettings.m_ViewMode);
+ g_renderManager.SetViewMode(++CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode);
#endif
}
m_bShowViewModeInfo = true;
@@ -466,67 +467,67 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
break;
case ACTION_ZOOM_IN:
{
- g_settings.m_currentVideoSettings.m_CustomZoomAmount += 0.01f;
- if (g_settings.m_currentVideoSettings.m_CustomZoomAmount > 2.f)
- g_settings.m_currentVideoSettings.m_CustomZoomAmount = 2.f;
- g_settings.m_currentVideoSettings.m_ViewMode = VIEW_MODE_CUSTOM;
- g_renderManager.SetViewMode(VIEW_MODE_CUSTOM);
- ShowSlider(action.GetID(), 216, g_settings.m_currentVideoSettings.m_CustomZoomAmount, 0.5f, 0.1f, 2.0f);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount += 0.01f;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount > 2.f)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount = 2.f;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode = ViewModeCustom;
+ g_renderManager.SetViewMode(ViewModeCustom);
+ ShowSlider(action.GetID(), 216, CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount, 0.5f, 0.1f, 2.0f);
}
return true;
break;
case ACTION_ZOOM_OUT:
{
- g_settings.m_currentVideoSettings.m_CustomZoomAmount -= 0.01f;
- if (g_settings.m_currentVideoSettings.m_CustomZoomAmount < 0.5f)
- g_settings.m_currentVideoSettings.m_CustomZoomAmount = 0.5f;
- g_settings.m_currentVideoSettings.m_ViewMode = VIEW_MODE_CUSTOM;
- g_renderManager.SetViewMode(VIEW_MODE_CUSTOM);
- ShowSlider(action.GetID(), 216, g_settings.m_currentVideoSettings.m_CustomZoomAmount, 0.5f, 0.1f, 2.0f);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount -= 0.01f;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount < 0.5f)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount = 0.5f;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode = ViewModeCustom;
+ g_renderManager.SetViewMode(ViewModeCustom);
+ ShowSlider(action.GetID(), 216, CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount, 0.5f, 0.1f, 2.0f);
}
return true;
break;
case ACTION_INCREASE_PAR:
{
- g_settings.m_currentVideoSettings.m_CustomPixelRatio += 0.01f;
- if (g_settings.m_currentVideoSettings.m_CustomPixelRatio > 2.f)
- g_settings.m_currentVideoSettings.m_CustomZoomAmount = 2.f;
- g_settings.m_currentVideoSettings.m_ViewMode = VIEW_MODE_CUSTOM;
- g_renderManager.SetViewMode(VIEW_MODE_CUSTOM);
- ShowSlider(action.GetID(), 217, g_settings.m_currentVideoSettings.m_CustomPixelRatio, 0.5f, 0.1f, 2.0f);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio += 0.01f;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio > 2.f)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount = 2.f;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode = ViewModeCustom;
+ g_renderManager.SetViewMode(ViewModeCustom);
+ ShowSlider(action.GetID(), 217, CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio, 0.5f, 0.1f, 2.0f);
}
return true;
break;
case ACTION_DECREASE_PAR:
{
- g_settings.m_currentVideoSettings.m_CustomPixelRatio -= 0.01f;
- if (g_settings.m_currentVideoSettings.m_CustomZoomAmount < 0.5f)
- g_settings.m_currentVideoSettings.m_CustomPixelRatio = 0.5f;
- g_settings.m_currentVideoSettings.m_ViewMode = VIEW_MODE_CUSTOM;
- g_renderManager.SetViewMode(VIEW_MODE_CUSTOM);
- ShowSlider(action.GetID(), 217, g_settings.m_currentVideoSettings.m_CustomPixelRatio, 0.5f, 0.1f, 2.0f);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio -= 0.01f;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_CustomZoomAmount < 0.5f)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio = 0.5f;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode = ViewModeCustom;
+ g_renderManager.SetViewMode(ViewModeCustom);
+ ShowSlider(action.GetID(), 217, CMediaSettings::Get().GetCurrentVideoSettings().m_CustomPixelRatio, 0.5f, 0.1f, 2.0f);
}
return true;
break;
case ACTION_VSHIFT_UP:
{
- g_settings.m_currentVideoSettings.m_CustomVerticalShift -= 0.01f;
- if (g_settings.m_currentVideoSettings.m_CustomVerticalShift < -2.0f)
- g_settings.m_currentVideoSettings.m_CustomVerticalShift = -2.0f;
- g_settings.m_currentVideoSettings.m_ViewMode = VIEW_MODE_CUSTOM;
- g_renderManager.SetViewMode(VIEW_MODE_CUSTOM);
- ShowSlider(action.GetID(), 225, g_settings.m_currentVideoSettings.m_CustomVerticalShift, -2.0f, 0.1f, 2.0f);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift -= 0.01f;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift < -2.0f)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift = -2.0f;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode = ViewModeCustom;
+ g_renderManager.SetViewMode(ViewModeCustom);
+ ShowSlider(action.GetID(), 225, CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift, -2.0f, 0.1f, 2.0f);
}
return true;
break;
case ACTION_VSHIFT_DOWN:
{
- g_settings.m_currentVideoSettings.m_CustomVerticalShift += 0.01f;
- if (g_settings.m_currentVideoSettings.m_CustomVerticalShift > 2.0f)
- g_settings.m_currentVideoSettings.m_CustomVerticalShift = 2.0f;
- g_settings.m_currentVideoSettings.m_ViewMode = VIEW_MODE_CUSTOM;
- g_renderManager.SetViewMode(VIEW_MODE_CUSTOM);
- ShowSlider(action.GetID(), 225, g_settings.m_currentVideoSettings.m_CustomVerticalShift, -2.0f, 0.1f, 2.0f);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift += 0.01f;
+ if (CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift > 2.0f)
+ CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift = 2.0f;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode = ViewModeCustom;
+ g_renderManager.SetViewMode(ViewModeCustom);
+ ShowSlider(action.GetID(), 225, CMediaSettings::Get().GetCurrentVideoSettings().m_CustomVerticalShift, -2.0f, 0.1f, 2.0f);
}
return true;
break;
@@ -608,17 +609,17 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
float sliderMin = VOLUME_DRC_MINIMUM / 100.0f;
if (action.GetID() == ACTION_VOLAMP_UP)
- g_settings.m_currentVideoSettings.m_VolumeAmplification += 1.0f;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_VolumeAmplification += 1.0f;
else
- g_settings.m_currentVideoSettings.m_VolumeAmplification -= 1.0f;
+ CMediaSettings::Get().GetCurrentVideoSettings().m_VolumeAmplification -= 1.0f;
- g_settings.m_currentVideoSettings.m_VolumeAmplification =
- std::max(std::min(g_settings.m_currentVideoSettings.m_VolumeAmplification, sliderMax), sliderMin);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_VolumeAmplification =
+ std::max(std::min(CMediaSettings::Get().GetCurrentVideoSettings().m_VolumeAmplification, sliderMax), sliderMin);
if (g_application.m_pPlayer)
- g_application.m_pPlayer->SetDynamicRangeCompression((long)(g_settings.m_currentVideoSettings.m_VolumeAmplification * 100));
+ g_application.m_pPlayer->SetDynamicRangeCompression((long)(CMediaSettings::Get().GetCurrentVideoSettings().m_VolumeAmplification * 100));
- ShowSlider(action.GetID(), 660, g_settings.m_currentVideoSettings.m_VolumeAmplification, sliderMin, 1.0f, sliderMax);
+ ShowSlider(action.GetID(), 660, CMediaSettings::Get().GetCurrentVideoSettings().m_VolumeAmplification, sliderMin, 1.0f, sliderMax);
break;
}
@@ -852,6 +853,8 @@ EVENT_RESULT CGUIWindowFullScreen::OnMouseEvent(const CPoint &point, const CMous
{
return g_application.OnAction(CAction(ACTION_ANALOG_SEEK_BACK, 0.5f)) ? EVENT_RESULT_HANDLED : EVENT_RESULT_UNHANDLED;
}
+ if (event.m_id == ACTION_GESTURE_NOTIFY)
+ return EVENT_RESULT_UNHANDLED;
if (event.m_id != ACTION_MOUSE_MOVE || event.m_offsetX || event.m_offsetY)
{ // some other mouse action has occurred - bring up the OSD
// if it is not already running
@@ -945,7 +948,7 @@ void CGUIWindowFullScreen::FrameMove()
{
// get the "View Mode" string
CStdString strTitle = g_localizeStrings.Get(629);
- CStdString strMode = g_localizeStrings.Get(630 + g_settings.m_currentVideoSettings.m_ViewMode);
+ CStdString strMode = g_localizeStrings.Get(630 + CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode);
CStdString strInfo;
strInfo.Format("%s : %s", strTitle.c_str(), strMode.c_str());
CGUIMessage msg(GUI_MSG_LABEL_SET, GetID(), LABEL_ROW1);
@@ -1234,13 +1237,13 @@ void CGUIWindowFullScreen::OnSliderChange(void *data, CGUISliderControl *slider)
{
if (m_sliderAction == ACTION_AUDIO_DELAY)
{
- g_settings.m_currentVideoSettings.m_AudioDelay = slider->GetFloatValue();
- g_application.m_pPlayer->SetAVDelay(g_settings.m_currentVideoSettings.m_AudioDelay);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay = slider->GetFloatValue();
+ g_application.m_pPlayer->SetAVDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay);
}
else if (m_sliderAction == ACTION_SUBTITLE_DELAY)
{
- g_settings.m_currentVideoSettings.m_SubtitleDelay = slider->GetFloatValue();
- g_application.m_pPlayer->SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
+ CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay = slider->GetFloatValue();
+ g_application.m_pPlayer->SetSubTitleDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
}
}
}
diff --git a/xbmc/video/windows/GUIWindowVideoBase.cpp b/xbmc/video/windows/GUIWindowVideoBase.cpp
index ed4b3777eb..9030a7b1c8 100644
--- a/xbmc/video/windows/GUIWindowVideoBase.cpp
+++ b/xbmc/video/windows/GUIWindowVideoBase.cpp
@@ -55,6 +55,7 @@
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
#include "settings/dialogs/GUIDialogContentSettings.h"
#include "guilib/Key.h"
#include "guilib/LocalizeStrings.h"
@@ -511,7 +512,7 @@ bool CGUIWindowVideoBase::ShowIMDB(CFileItem *item, const ScraperPtr &info2)
if (needsRefresh)
{
bHasInfo = true;
- if (nfoResult == CNfoFile::URL_NFO || nfoResult == CNfoFile::COMBINED_NFO || nfoResult == CNfoFile::FULL_NFO)
+ if (!info->IsNoop() && (nfoResult == CNfoFile::URL_NFO || nfoResult == CNfoFile::COMBINED_NFO || nfoResult == CNfoFile::FULL_NFO))
{
if (CGUIDialogYesNo::ShowAndGetInput(13346,20446,20447,20022))
{
@@ -782,9 +783,9 @@ void CGUIWindowVideoBase::AddItemToPlayList(const CFileItemPtr &pItem, CFileItem
GetDirectory(pItem->GetPath(), items);
FormatAndSort(items);
- int watchedMode = g_settings.GetWatchMode(items.GetContent());
- bool unwatchedOnly = watchedMode == VIDEO_SHOW_UNWATCHED;
- bool watchedOnly = watchedMode == VIDEO_SHOW_WATCHED;
+ int watchedMode = CMediaSettings::Get().GetWatchedMode(items.GetContent());
+ bool unwatchedOnly = watchedMode == WatchedModeUnwatched;
+ bool watchedOnly = watchedMode == WatchedModeWatched;
for (int i = 0; i < items.Size(); ++i)
{
if (items[i]->m_bIsFolder)
@@ -2086,7 +2087,10 @@ void CGUIWindowVideoBase::OnSearchItemFound(const CFileItem* pSelItem)
for (int i = 0; i < (int)m_vecItems->Size(); i++)
{
CFileItemPtr pItem = m_vecItems->Get(i);
- if (pItem->GetPath() == pSelItem->GetPath())
+ CURL url(pItem->GetPath());
+ if (pSelItem->IsVideoDb())
+ url.SetOptions("");
+ if (url.Get() == pSelItem->GetPath())
{
m_viewControl.SetSelectedItem(i);
break;
diff --git a/xbmc/video/windows/GUIWindowVideoNav.cpp b/xbmc/video/windows/GUIWindowVideoNav.cpp
index 9c04164bdb..50981c5c7b 100644
--- a/xbmc/video/windows/GUIWindowVideoNav.cpp
+++ b/xbmc/video/windows/GUIWindowVideoNav.cpp
@@ -44,6 +44,8 @@
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSettings.h"
+#include "settings/MediaSourceSettings.h"
#include "guilib/Key.h"
#include "guilib/LocalizeStrings.h"
#include "storage/MediaManager.h"
@@ -120,7 +122,7 @@ bool CGUIWindowVideoNav::OnMessage(CGUIMessage& message)
SetProperty("flattened", g_settings.m_bMyVideoNavFlatten);
if (message.GetNumStringParams() && message.GetStringParam(0).Equals("Files") &&
- g_settings.GetSourcesFromType("video")->empty())
+ CMediaSourceSettings::Get().GetSources("video")->empty())
{
message.SetStringParam("");
}
@@ -161,7 +163,7 @@ bool CGUIWindowVideoNav::OnMessage(CGUIMessage& message)
}
else if (iControl == CONTROL_BTNSHOWMODE)
{
- g_settings.CycleWatchMode(m_vecItems->GetContent());
+ CMediaSettings::Get().CycleWatchedMode(m_vecItems->GetContent());
g_settings.Save();
OnFilterItems(GetProperty("filter").asString());
return true;
@@ -178,10 +180,10 @@ bool CGUIWindowVideoNav::OnMessage(CGUIMessage& message)
}
else if (iControl == CONTROL_BTNSHOWALL)
{
- if (g_settings.GetWatchMode(m_vecItems->GetContent()) == VIDEO_SHOW_ALL)
- g_settings.SetWatchMode(m_vecItems->GetContent(), VIDEO_SHOW_UNWATCHED);
+ if (CMediaSettings::Get().GetWatchedMode(m_vecItems->GetContent()) == WatchedModeAll)
+ CMediaSettings::Get().SetWatchedMode(m_vecItems->GetContent(), WatchedModeUnwatched);
else
- g_settings.SetWatchMode(m_vecItems->GetContent(), VIDEO_SHOW_ALL);
+ CMediaSettings::Get().SetWatchedMode(m_vecItems->GetContent(), WatchedModeAll);
g_settings.Save();
OnFilterItems(GetProperty("filter").asString());
return true;
@@ -371,7 +373,7 @@ bool CGUIWindowVideoNav::GetDirectory(const CStdString &strDirectory, CFileItemL
else if (!items.IsVirtualDirectoryRoot())
{ // load info from the database
CStdString label;
- if (items.GetLabel().IsEmpty() && m_rootDir.IsSource(items.GetPath(), g_settings.GetSourcesFromType("video"), &label))
+ if (items.GetLabel().IsEmpty() && m_rootDir.IsSource(items.GetPath(), CMediaSourceSettings::Get().GetSources("video"), &label))
items.SetLabel(label);
if (!items.IsSourcesPath())
LoadVideoInfo(items);
@@ -533,10 +535,10 @@ void CGUIWindowVideoNav::UpdateButtons()
SET_CONTROL_LABEL(CONTROL_FILTER, strLabel);
- int watchMode = g_settings.GetWatchMode(m_vecItems->GetContent());
+ int watchMode = CMediaSettings::Get().GetWatchedMode(m_vecItems->GetContent());
SET_CONTROL_LABEL(CONTROL_BTNSHOWMODE, g_localizeStrings.Get(16100 + watchMode));
- SET_CONTROL_SELECTED(GetID(), CONTROL_BTNSHOWALL, watchMode != VIDEO_SHOW_ALL);
+ SET_CONTROL_SELECTED(GetID(), CONTROL_BTNSHOWALL, watchMode != WatchedModeAll);
SET_CONTROL_SELECTED(GetID(),CONTROL_BTNPARTYMODE, g_partyModeManager.IsEnabled());
@@ -1215,7 +1217,7 @@ bool CGUIWindowVideoNav::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
if (!local)
items.Add(noneitem);
- VECSOURCES sources=g_settings.m_videoSources;
+ VECSOURCES sources=*CMediaSourceSettings::Get().GetSources("video");
g_mediaManager.GetLocalDrives(sources);
CStdString result;
CGUIDialogVideoInfo::AddItemPathToFileBrowserSources(sources, *item);
@@ -1414,7 +1416,7 @@ void CGUIWindowVideoNav::OnChooseFanart(const CFileItem &videoItem)
}
CStdString result;
- VECSOURCES sources(g_settings.m_videoSources);
+ VECSOURCES sources(*CMediaSourceSettings::Get().GetSources("video"));
g_mediaManager.GetLocalDrives(sources);
CGUIDialogVideoInfo::AddItemPathToFileBrowserSources(sources, item);
bool flip=false;
@@ -1654,7 +1656,7 @@ bool CGUIWindowVideoNav::ApplyWatchedFilter(CFileItemList &items)
(items.IsSmartPlayList() || (items.HasProperty("library.filter") && items.GetProperty("library.filter").asBoolean())))
node = NODE_TYPE_TITLE_TVSHOWS; // so that the check below works
- int watchMode = g_settings.GetWatchMode(m_vecItems->GetContent());
+ int watchMode = CMediaSettings::Get().GetWatchedMode(m_vecItems->GetContent());
for (int i = 0; i < items.Size(); i++)
{
@@ -1662,11 +1664,11 @@ bool CGUIWindowVideoNav::ApplyWatchedFilter(CFileItemList &items)
if(item->HasVideoInfoTag() && (node == NODE_TYPE_TITLE_TVSHOWS || node == NODE_TYPE_SEASONS))
{
- if (watchMode == VIDEO_SHOW_UNWATCHED)
+ if (watchMode == WatchedModeUnwatched)
item->GetVideoInfoTag()->m_iEpisode = (int)item->GetProperty("unwatchedepisodes").asInteger();
- if (watchMode == VIDEO_SHOW_WATCHED)
+ if (watchMode == WatchedModeWatched)
item->GetVideoInfoTag()->m_iEpisode = (int)item->GetProperty("watchedepisodes").asInteger();
- if (watchMode == VIDEO_SHOW_ALL)
+ if (watchMode == WatchedModeAll)
item->GetVideoInfoTag()->m_iEpisode = (int)item->GetProperty("totalepisodes").asInteger();
item->SetProperty("numepisodes", item->GetVideoInfoTag()->m_iEpisode);
listchanged = true;
@@ -1674,8 +1676,8 @@ bool CGUIWindowVideoNav::ApplyWatchedFilter(CFileItemList &items)
if (filterWatched)
{
- if((watchMode==VIDEO_SHOW_WATCHED && item->GetVideoInfoTag()->m_playCount== 0)
- || (watchMode==VIDEO_SHOW_UNWATCHED && item->GetVideoInfoTag()->m_playCount > 0))
+ if((watchMode==WatchedModeWatched && item->GetVideoInfoTag()->m_playCount== 0)
+ || (watchMode==WatchedModeUnwatched && item->GetVideoInfoTag()->m_playCount > 0))
{
items.Remove(i);
i--;
diff --git a/xbmc/view/GUIViewState.cpp b/xbmc/view/GUIViewState.cpp
index 6778263893..864e448a10 100644
--- a/xbmc/view/GUIViewState.cpp
+++ b/xbmc/view/GUIViewState.cpp
@@ -38,6 +38,7 @@
#include "view/ViewState.h"
#include "settings/GUISettings.h"
#include "settings/AdvancedSettings.h"
+#include "settings/MediaSourceSettings.h"
#include "settings/Settings.h"
#include "FileItem.h"
#include "guilib/Key.h"
@@ -405,7 +406,7 @@ void CGUIViewState::AddAndroidSource(const CStdString &content, const CStdString
void CGUIViewState::AddLiveTVSources()
{
- VECSOURCES *sources = g_settings.GetSourcesFromType("video");
+ VECSOURCES *sources = CMediaSourceSettings::Get().GetSources("video");
for (IVECSOURCES it = sources->begin(); it != sources->end(); it++)
{
if (URIUtils::IsLiveTV((*it).strPath))
diff --git a/xbmc/view/Makefile b/xbmc/view/Makefile
index 2afefa4689..3b35a25f0b 100644
--- a/xbmc/view/Makefile
+++ b/xbmc/view/Makefile
@@ -1,6 +1,7 @@
SRCS=GUIViewControl.cpp \
GUIViewState.cpp \
ViewDatabase.cpp \
+ ViewStateSettings.cpp \
LIB=view.a
diff --git a/xbmc/view/ViewStateSettings.cpp b/xbmc/view/ViewStateSettings.cpp
new file mode 100644
index 0000000000..0df7b8c290
--- /dev/null
+++ b/xbmc/view/ViewStateSettings.cpp
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string.h>
+
+#include "ViewStateSettings.h"
+#include "threads/SingleLock.h"
+#include "utils/log.h"
+#include "utils/StringUtils.h"
+#include "utils/XBMCTinyXML.h"
+#include "utils/XMLUtils.h"
+
+#define XML_VIEWSTATESETTINGS "viewstates"
+#define XML_VIEWMODE "viewmode"
+#define XML_SORTMETHOD "sortmethod"
+#define XML_SORTORDER "sortorder"
+
+using namespace std;
+
+CViewStateSettings::CViewStateSettings()
+{
+ AddViewState("musicnavartists");
+ AddViewState("musicnavalbums");
+ AddViewState("musicnavsongs");
+ AddViewState("musiclastfm");
+ AddViewState("videonavactors");
+ AddViewState("videonavyears");
+ AddViewState("videonavgenres");
+ AddViewState("videonavtitles");
+ AddViewState("videonavepisodes", DEFAULT_VIEW_AUTO, SORT_METHOD_EPISODE);
+ AddViewState("videonavtvshows");
+ AddViewState("videonavseasons");
+ AddViewState("videonavmusicvideos");
+
+ AddViewState("programs", DEFAULT_VIEW_AUTO);
+ AddViewState("pictures", DEFAULT_VIEW_AUTO);
+ AddViewState("videofiles", DEFAULT_VIEW_AUTO);
+ AddViewState("musicfiles", DEFAULT_VIEW_AUTO);
+}
+
+CViewStateSettings::~CViewStateSettings()
+{
+ for (map<string, CViewState*>::const_iterator viewState = m_viewStates.begin(); viewState != m_viewStates.end(); viewState++)
+ delete viewState->second;
+ m_viewStates.clear();
+}
+
+CViewStateSettings& CViewStateSettings::Get()
+{
+ static CViewStateSettings sViewStateSettings;
+ return sViewStateSettings;
+}
+
+bool CViewStateSettings::Load(const TiXmlNode *settings)
+{
+ if (settings == NULL)
+ return false;
+
+ CSingleLock lock(m_critical);
+ const TiXmlNode *pElement = settings->FirstChildElement(XML_VIEWSTATESETTINGS);
+ if (pElement == NULL)
+ {
+ CLog::Log(LOGWARNING, "CViewStateSettings: no <viewstates> tag found");
+ return false;
+ }
+
+ for (map<string, CViewState*>::iterator viewState = m_viewStates.begin(); viewState != m_viewStates.end(); viewState++)
+ {
+ const TiXmlNode* pViewState = pElement->FirstChildElement(viewState->first);
+ if (pViewState == NULL)
+ continue;
+
+ XMLUtils::GetInt(pViewState, XML_VIEWMODE, viewState->second->m_viewMode, DEFAULT_VIEW_LIST, DEFAULT_VIEW_MAX);
+
+ int sortMethod;
+ if (XMLUtils::GetInt(pViewState, XML_SORTMETHOD, sortMethod, SORT_METHOD_NONE, SORT_METHOD_MAX))
+ viewState->second->m_sortMethod = (SORT_METHOD)sortMethod;
+
+ int sortOrder;
+ if (XMLUtils::GetInt(pViewState, XML_SORTORDER, sortOrder, SortOrderNone, SortOrderDescending))
+ viewState->second->m_sortOrder = (SortOrder)sortOrder;
+ }
+
+ return true;
+}
+
+bool CViewStateSettings::Save(TiXmlNode *settings) const
+{
+ if (settings == NULL)
+ return false;
+
+ CSingleLock lock(m_critical);
+ // add the <viewstates> tag
+ TiXmlElement xmlViewStateElement(XML_VIEWSTATESETTINGS);
+ TiXmlNode *pViewStateNode = settings->InsertEndChild(xmlViewStateElement);
+ if (pViewStateNode == NULL)
+ {
+ CLog::Log(LOGWARNING, "CViewStateSettings: could not create <viewstates> tag");
+ return false;
+ }
+
+ for (map<string, CViewState*>::const_iterator viewState = m_viewStates.begin(); viewState != m_viewStates.end(); viewState++)
+ {
+ TiXmlElement newElement(viewState->first);
+ TiXmlNode *pNewNode = pViewStateNode->InsertEndChild(newElement);
+ if (pNewNode == NULL)
+ continue;
+
+ XMLUtils::SetInt(pNewNode, XML_VIEWMODE, viewState->second->m_viewMode);
+ XMLUtils::SetInt(pNewNode, XML_SORTMETHOD, (int)viewState->second->m_sortMethod);
+ XMLUtils::SetInt(pNewNode, XML_SORTORDER, (int)viewState->second->m_sortOrder);
+
+ }
+
+ return true;
+}
+
+const CViewState* CViewStateSettings::Get(const std::string &viewState) const
+{
+ CSingleLock lock(m_critical);
+ map<string, CViewState*>::const_iterator view = m_viewStates.find(viewState);
+ if (view != m_viewStates.end())
+ return view->second;
+
+ return NULL;
+}
+
+CViewState* CViewStateSettings::Get(const std::string &viewState)
+{
+ CSingleLock lock(m_critical);
+ map<string, CViewState*>::iterator view = m_viewStates.find(viewState);
+ if (view != m_viewStates.end())
+ return view->second;
+
+ return NULL;
+}
+
+void CViewStateSettings::AddViewState(const std::string& strTagName, int defaultView /* = DEFAULT_VIEW_LIST */, SORT_METHOD defaultSort /* = SORT_METHOD_LABEL */)
+{
+ if (strTagName.empty() || m_viewStates.find(strTagName) != m_viewStates.end())
+ return;
+
+ CViewState *viewState = new CViewState(defaultView, defaultSort, SortOrderAscending);
+ if (viewState == NULL)
+ return;
+
+ m_viewStates.insert(make_pair(strTagName, viewState));
+}
diff --git a/xbmc/view/ViewStateSettings.h b/xbmc/view/ViewStateSettings.h
new file mode 100644
index 0000000000..b2174a571a
--- /dev/null
+++ b/xbmc/view/ViewStateSettings.h
@@ -0,0 +1,54 @@
+#pragma once
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <map>
+#include <string>
+
+#include "ViewState.h"
+#include "guilib/GraphicContext.h"
+#include "settings/ISubSettings.h"
+#include "threads/CriticalSection.h"
+
+class TiXmlNode;
+
+class CViewStateSettings : public ISubSettings
+{
+public:
+ static CViewStateSettings& Get();
+
+ virtual bool Load(const TiXmlNode *settings);
+ virtual bool Save(TiXmlNode *settings) const;
+
+ const CViewState* Get(const std::string &viewState) const;
+ CViewState* Get(const std::string &viewState);
+
+protected:
+ CViewStateSettings();
+ CViewStateSettings(const CViewStateSettings&);
+ CViewStateSettings const& operator=(CViewStateSettings const&);
+ virtual ~CViewStateSettings();
+
+private:
+ std::map<std::string, CViewState*> m_viewStates;
+ CCriticalSection m_critical;
+
+ void AddViewState(const std::string& strTagName, int defaultView = DEFAULT_VIEW_LIST, SORT_METHOD defaultSort = SORT_METHOD_LABEL);
+};
diff --git a/xbmc/win32/WIN32Util.cpp b/xbmc/win32/WIN32Util.cpp
index aaa2ede5b7..b53fb0c738 100644
--- a/xbmc/win32/WIN32Util.cpp
+++ b/xbmc/win32/WIN32Util.cpp
@@ -35,6 +35,7 @@
#include "storage/MediaManager.h"
#include "windowing/WindowingFactory.h"
#include "guilib/LocalizeStrings.h"
+#include "utils/CharsetConverter.h"
#include "utils/log.h"
#include "utils/StringUtils.h"
#include "DllPaths_win32.h"
diff --git a/xbmc/win32/XBMC_PC.rc b/xbmc/win32/XBMC_PC.rc
index 1db333a51c..207edd8e94 100644
--- a/xbmc/win32/XBMC_PC.rc
+++ b/xbmc/win32/XBMC_PC.rc
@@ -53,8 +53,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 12,9,2,0
- PRODUCTVERSION 12,9,2,0
+ FILEVERSION 12,9,3,0
+ PRODUCTVERSION 12,9,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -71,12 +71,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Team XBMC"
VALUE "FileDescription", "XBMC"
- VALUE "FileVersion", "13.0-ALPHA2"
+ VALUE "FileVersion", "13.0-ALPHA3"
VALUE "InternalName", "XBMC.exe"
VALUE "LegalCopyright", "Copyright (c) Team XBMC. All rights reserved."
VALUE "OriginalFilename", "XBMC.exe"
VALUE "ProductName", "XBMC for Windows"
- VALUE "ProductVersion", "13.0-ALPHA2"
+ VALUE "ProductVersion", "13.0-ALPHA3"
END
END
BLOCK "VarFileInfo"
diff --git a/xbmc/windowing/WinEvents.h b/xbmc/windowing/WinEvents.h
index 68ee03af08..5feb800fd4 100644
--- a/xbmc/windowing/WinEvents.h
+++ b/xbmc/windowing/WinEvents.h
@@ -30,8 +30,6 @@ typedef bool (* PHANDLE_EVENT_FUNC)(XBMC_Event& newEvent);
class CWinEventsBase
{
-public:
- static PHANDLE_EVENT_FUNC m_pEventFunc;
};
#if defined(TARGET_WINDOWS)
diff --git a/xbmc/windowing/WinEventsLinux.cpp b/xbmc/windowing/WinEventsLinux.cpp
index f199d7549c..b979863a8d 100644
--- a/xbmc/windowing/WinEventsLinux.cpp
+++ b/xbmc/windowing/WinEventsLinux.cpp
@@ -30,8 +30,6 @@
#include "utils/log.h"
#include "powermanagement/PowerManager.h"
-PHANDLE_EVENT_FUNC CWinEventsBase::m_pEventFunc = NULL;
-
bool CWinEventsLinux::m_initialized = false;
CLinuxInputDevices CWinEventsLinux::m_devices;
diff --git a/xbmc/windowing/WinEventsSDL.cpp b/xbmc/windowing/WinEventsSDL.cpp
index 02ddc9be22..fde4f73887 100644
--- a/xbmc/windowing/WinEventsSDL.cpp
+++ b/xbmc/windowing/WinEventsSDL.cpp
@@ -43,8 +43,6 @@
#include "utils/log.h"
#endif
-PHANDLE_EVENT_FUNC CWinEventsBase::m_pEventFunc = NULL;
-
#if defined(_LINUX) && !defined(__APPLE__)
// The following chunk of code is Linux specific. For keys that have
// with keysym.sym set to zero it checks the scan code, and sets the sym
diff --git a/xbmc/windowing/android/WinEventsAndroid.cpp b/xbmc/windowing/android/WinEventsAndroid.cpp
index eb7c5078c8..5ef6d7a101 100644
--- a/xbmc/windowing/android/WinEventsAndroid.cpp
+++ b/xbmc/windowing/android/WinEventsAndroid.cpp
@@ -27,8 +27,6 @@
static CCriticalSection g_inputCond;
-PHANDLE_EVENT_FUNC CWinEventsBase::m_pEventFunc = NULL;
-
static std::list<XBMC_Event> events;
void CWinEventsAndroid::DeInit()
diff --git a/xbmc/windowing/osx/WinEventsIOS.mm b/xbmc/windowing/osx/WinEventsIOS.mm
index 0602ae812a..8b6edd437e 100644
--- a/xbmc/windowing/osx/WinEventsIOS.mm
+++ b/xbmc/windowing/osx/WinEventsIOS.mm
@@ -30,8 +30,6 @@
static CCriticalSection g_inputCond;
-PHANDLE_EVENT_FUNC CWinEventsBase::m_pEventFunc = NULL;
-
static std::list<XBMC_Event> events;
void CWinEventsIOS::DeInit()
diff --git a/xbmc/windowing/windows/WinEventsWin32.cpp b/xbmc/windowing/windows/WinEventsWin32.cpp
index 4dedc3e92f..7787bf9350 100644
--- a/xbmc/windowing/windows/WinEventsWin32.cpp
+++ b/xbmc/windowing/windows/WinEventsWin32.cpp
@@ -64,7 +64,7 @@ uint32_t g_uQueryCancelAutoPlay = 0;
int XBMC_TranslateUNICODE = 1;
-PHANDLE_EVENT_FUNC CWinEventsBase::m_pEventFunc = NULL;
+PHANDLE_EVENT_FUNC CWinEventsWin32::m_pEventFunc = NULL;
int CWinEventsWin32::m_lastGesturePosX = 0;
int CWinEventsWin32::m_lastGesturePosY = 0;
diff --git a/xbmc/windowing/windows/WinEventsWin32.h b/xbmc/windowing/windows/WinEventsWin32.h
index 35d9c3e275..e690362dda 100644
--- a/xbmc/windowing/windows/WinEventsWin32.h
+++ b/xbmc/windowing/windows/WinEventsWin32.h
@@ -30,6 +30,7 @@ class CWinEventsWin32 : public CWinEventsBase
public:
static bool MessagePump();
static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ static PHANDLE_EVENT_FUNC m_pEventFunc;
private:
static void RegisterDeviceInterfaceToHwnd(GUID InterfaceClassGuid, HWND hWnd, HDEVNOTIFY *hDeviceNotify);
static void WindowFromScreenCoords(HWND hWnd, POINT *point);
diff --git a/xbmc/windows/GUIMediaWindow.cpp b/xbmc/windows/GUIMediaWindow.cpp
index c3fb28f371..b75da6a865 100644
--- a/xbmc/windows/GUIMediaWindow.cpp
+++ b/xbmc/windows/GUIMediaWindow.cpp
@@ -294,12 +294,7 @@ bool CGUIMediaWindow::OnMessage(CGUIMessage& message)
return true;
}
else if (iControl == CONTROL_BTN_FILTER)
- {
- if (m_canFilterAdvanced)
- return true;
-
- return Filter();
- }
+ return Filter(false);
else if (m_viewControl.HasControl(iControl)) // list/thumb control
{
int iItem = m_viewControl.GetSelectedItem();
@@ -420,11 +415,10 @@ bool CGUIMediaWindow::OnMessage(CGUIMessage& message)
}
else if (message.GetParam1() == GUI_MSG_FILTER_ITEMS && IsActive())
{
- CStdString filter;
+ CStdString filter = GetProperty("filter").asString();
// check if this is meant for advanced filtering
if (message.GetParam2() != 10)
{
- filter = GetProperty("filter").asString();
if (message.GetParam2() == 1) // append
filter += message.GetStringParam();
else if (message.GetParam2() == 2)
@@ -571,8 +565,7 @@ void CGUIMediaWindow::UpdateButtons()
items.Format("%i %s", m_vecItems->GetObjectCount(), g_localizeStrings.Get(127).c_str());
SET_CONTROL_LABEL(CONTROL_LABELFILES, items);
- if (!m_canFilterAdvanced)
- SET_CONTROL_LABEL2(CONTROL_BTN_FILTER, GetProperty("filter").asString());
+ SET_CONTROL_LABEL2(CONTROL_BTN_FILTER, GetProperty("filter").asString());
}
void CGUIMediaWindow::ClearFileItems()
@@ -887,8 +880,7 @@ bool CGUIMediaWindow::Update(const CStdString &strDirectory, bool updateFilterPa
OnCacheFileItems(*m_vecItems);
// Filter and group the items if necessary
- CStdString titleFilter = GetProperty("filter").asString();
- OnFilterItems(titleFilter);
+ OnFilterItems(GetProperty("filter").asString());
// Ask the devived class if it wants to do custom list operations,
// eg. changing the label
@@ -1737,25 +1729,21 @@ void CGUIMediaWindow::OnFilterItems(const CStdString &filter)
}
}
- if (filtered)
+ SetProperty("filter", filter);
+ if (filtered && m_canFilterAdvanced)
{
- if (!m_canFilterAdvanced)
- SetProperty("filter", filter);
- else
+ // to be able to select the same item as before we need to adjust
+ // the path of the item i.e. add or remove the "filter=" URL option
+ // but that's only necessary for folder items
+ if (currentItem.get() != NULL && currentItem->m_bIsFolder)
{
- // to be able to select the same item as before we need to adjust
- // the path of the item i.e. add or remove the "filter=" URL option
- // but that's only necessary for folder items
- if (currentItem.get() != NULL && currentItem->m_bIsFolder)
- {
- CURL curUrl(currentItemPath), newUrl(m_strFilterPath);
- if (newUrl.HasOption("filter"))
- curUrl.SetOption("filter", newUrl.GetOption("filter"));
- else if (curUrl.HasOption("filter"))
- curUrl.RemoveOption("filter");
+ CURL curUrl(currentItemPath), newUrl(m_strFilterPath);
+ if (newUrl.HasOption("filter"))
+ curUrl.SetOption("filter", newUrl.GetOption("filter"));
+ else if (curUrl.HasOption("filter"))
+ curUrl.RemoveOption("filter");
- currentItemPath = curUrl.Get();
- }
+ currentItemPath = curUrl.Get();
}
}
@@ -1779,14 +1767,15 @@ void CGUIMediaWindow::OnFilterItems(const CStdString &filter)
bool CGUIMediaWindow::GetFilteredItems(const CStdString &filter, CFileItemList &items)
{
+ bool result = false;
if (m_canFilterAdvanced)
- return GetAdvanceFilteredItems(items);
+ result = GetAdvanceFilteredItems(items);
CStdString trimmedFilter(filter);
trimmedFilter.TrimLeft().ToLower();
if (trimmedFilter.IsEmpty())
- return true;
+ return result;
CFileItemList filteredItems(items.GetPath()); // use the original path - it'll likely be relied on for other things later.
bool numericMatch = StringUtils::IsNaturalNumber(trimmedFilter);
@@ -1894,10 +1883,10 @@ bool CGUIMediaWindow::IsFiltered()
(m_canFilterAdvanced && !m_filter.IsEmpty());
}
-bool CGUIMediaWindow::Filter()
+bool CGUIMediaWindow::Filter(bool advanced /* = true */)
{
// basic filtering
- if (!m_canFilterAdvanced)
+ if (!m_canFilterAdvanced || !advanced)
{
const CGUIControl *btnFilter = GetControl(CONTROL_BTN_FILTER);
if (btnFilter != NULL && btnFilter->GetControlType() == CGUIControl::GUICONTROL_EDIT)
diff --git a/xbmc/windows/GUIMediaWindow.h b/xbmc/windows/GUIMediaWindow.h
index 3eceb58939..35df23ed1f 100644
--- a/xbmc/windows/GUIMediaWindow.h
+++ b/xbmc/windows/GUIMediaWindow.h
@@ -103,7 +103,7 @@ protected:
\return true if the given path can contain a "filter" parameter otherwise false
*/
virtual bool CanContainFilter(const CStdString &strDirectory) const { return false; }
- virtual bool Filter();
+ virtual bool Filter(bool advanced = true);
/* \brief Called on response to a GUI_MSG_FILTER_ITEMS message
Filters the current list with the given filter using FilterItems()
diff --git a/xbmc/windows/GUIWindowFileManager.cpp b/xbmc/windows/GUIWindowFileManager.cpp
index aa6548565e..b750e9ce99 100644
--- a/xbmc/windows/GUIWindowFileManager.cpp
+++ b/xbmc/windows/GUIWindowFileManager.cpp
@@ -50,6 +50,7 @@
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
#include "settings/GUISettings.h"
+#include "settings/MediaSourceSettings.h"
#include "input/MouseStat.h"
#include "guilib/LocalizeStrings.h"
#include "utils/StringUtils.h"
@@ -565,7 +566,7 @@ void CGUIWindowFileManager::OnClick(int iList, int iItem)
{
if (CGUIDialogMediaSource::ShowAndAddMediaSource("files"))
{
- m_rootDir.SetSources(g_settings.m_fileSources);
+ m_rootDir.SetSources(*CMediaSourceSettings::Get().GetSources("files"));
Update(0,m_Directory[0]->GetPath());
Update(1,m_Directory[1]->GetPath());
}
@@ -984,7 +985,7 @@ void CGUIWindowFileManager::OnPopupMenu(int list, int item, bool bContextDriven
// and do the popup menu
if (CGUIDialogContextMenu::SourcesMenu("files", pItem, posX, posY))
{
- m_rootDir.SetSources(g_settings.m_fileSources);
+ m_rootDir.SetSources(*CMediaSourceSettings::Get().GetSources("files"));
if (m_Directory[1 - list]->IsVirtualDirectoryRoot())
Refresh();
else
@@ -1148,7 +1149,7 @@ int64_t CGUIWindowFileManager::CalculateFolderSize(const CStdString &strDirector
int64_t totalSize = 0;
CFileItemList items;
CVirtualDirectory rootDir;
- rootDir.SetSources(g_settings.m_fileSources);
+ rootDir.SetSources(*CMediaSourceSettings::Get().GetSources("files"));
rootDir.GetDirectory(strDirectory, items, false);
for (int i=0; i < items.Size(); i++)
{
@@ -1227,7 +1228,7 @@ void CGUIWindowFileManager::SetInitialPath(const CStdString &path)
{
// check for a passed destination path
CStdString strDestination = path;
- m_rootDir.SetSources(*g_settings.GetSourcesFromType("files"));
+ m_rootDir.SetSources(*CMediaSourceSettings::Get().GetSources("files"));
if (!strDestination.IsEmpty())
{
CLog::Log(LOGINFO, "Attempting to quickpath to: %s", strDestination.c_str());
@@ -1235,7 +1236,7 @@ void CGUIWindowFileManager::SetInitialPath(const CStdString &path)
// otherwise, is this the first time accessing this window?
else if (m_Directory[0]->GetPath() == "?")
{
- m_Directory[0]->SetPath(strDestination = g_settings.m_defaultFileSource);
+ m_Directory[0]->SetPath(strDestination = CMediaSourceSettings::Get().GetDefaultSource("files"));
CLog::Log(LOGINFO, "Attempting to default to: %s", strDestination.c_str());
}
// try to open the destination path
diff --git a/xbmc/windows/GUIWindowLoginScreen.cpp b/xbmc/windows/GUIWindowLoginScreen.cpp
index ca40758df5..780a8905ad 100644
--- a/xbmc/windows/GUIWindowLoginScreen.cpp
+++ b/xbmc/windows/GUIWindowLoginScreen.cpp
@@ -47,6 +47,7 @@
#include "guilib/Key.h"
#include "guilib/LocalizeStrings.h"
#include "addons/AddonManager.h"
+#include "view/ViewState.h"
#define CONTROL_BIG_LIST 52
#define CONTROL_LABEL_HEADER 2