couchbase-memcached 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +2 -0
- data/BENCHMARKS +134 -0
- data/CHANGELOG +127 -0
- data/LICENSE +184 -0
- data/Manifest +535 -0
- data/README +118 -0
- data/Rakefile +83 -0
- data/TODO +4 -0
- data/couchbase-memcached.gemspec +33 -0
- data/ext/extconf-make.rb +25 -0
- data/ext/extconf.rb +91 -0
- data/ext/libmemcached-0.50/AUTHORS +11 -0
- data/ext/libmemcached-0.50/COPYING +33 -0
- data/ext/libmemcached-0.50/ChangeLog +392 -0
- data/ext/libmemcached-0.50/Makefile.am +114 -0
- data/ext/libmemcached-0.50/Makefile.in +4232 -0
- data/ext/libmemcached-0.50/NEWS +1 -0
- data/ext/libmemcached-0.50/README +43 -0
- data/ext/libmemcached-0.50/README.FIRST +31 -0
- data/ext/libmemcached-0.50/README.win32 +25 -0
- data/ext/libmemcached-0.50/THANKS +14 -0
- data/ext/libmemcached-0.50/TODO +11 -0
- data/ext/libmemcached-0.50/aclocal.m4 +1077 -0
- data/ext/libmemcached-0.50/clients/client_options.h +45 -0
- data/ext/libmemcached-0.50/clients/execute.cc +131 -0
- data/ext/libmemcached-0.50/clients/execute.h +30 -0
- data/ext/libmemcached-0.50/clients/generator.cc +96 -0
- data/ext/libmemcached-0.50/clients/generator.h +36 -0
- data/ext/libmemcached-0.50/clients/include.am +116 -0
- data/ext/libmemcached-0.50/clients/memaslap.c +908 -0
- data/ext/libmemcached-0.50/clients/memcapable.cc +2094 -0
- data/ext/libmemcached-0.50/clients/memcat.cc +242 -0
- data/ext/libmemcached-0.50/clients/memcp.cc +317 -0
- data/ext/libmemcached-0.50/clients/memdump.cc +183 -0
- data/ext/libmemcached-0.50/clients/memerror.cc +102 -0
- data/ext/libmemcached-0.50/clients/memflush.cc +154 -0
- data/ext/libmemcached-0.50/clients/memparse.cc +68 -0
- data/ext/libmemcached-0.50/clients/memrm.cc +177 -0
- data/ext/libmemcached-0.50/clients/memslap.cc +495 -0
- data/ext/libmemcached-0.50/clients/memstat.cc +349 -0
- data/ext/libmemcached-0.50/clients/ms_atomic.h +69 -0
- data/ext/libmemcached-0.50/clients/ms_conn.c +3413 -0
- data/ext/libmemcached-0.50/clients/ms_conn.h +241 -0
- data/ext/libmemcached-0.50/clients/ms_memslap.h +132 -0
- data/ext/libmemcached-0.50/clients/ms_setting.c +1068 -0
- data/ext/libmemcached-0.50/clients/ms_setting.h +181 -0
- data/ext/libmemcached-0.50/clients/ms_sigsegv.c +126 -0
- data/ext/libmemcached-0.50/clients/ms_sigsegv.h +34 -0
- data/ext/libmemcached-0.50/clients/ms_stats.c +307 -0
- data/ext/libmemcached-0.50/clients/ms_stats.h +69 -0
- data/ext/libmemcached-0.50/clients/ms_task.c +1114 -0
- data/ext/libmemcached-0.50/clients/ms_task.h +94 -0
- data/ext/libmemcached-0.50/clients/ms_thread.c +351 -0
- data/ext/libmemcached-0.50/clients/ms_thread.h +78 -0
- data/ext/libmemcached-0.50/clients/utilities.cc +231 -0
- data/ext/libmemcached-0.50/clients/utilities.h +64 -0
- data/ext/libmemcached-0.50/config.h.in +647 -0
- data/ext/libmemcached-0.50/config/autorun.sh +126 -0
- data/ext/libmemcached-0.50/config/compile +143 -0
- data/ext/libmemcached-0.50/config/config.guess +1517 -0
- data/ext/libmemcached-0.50/config/config.rpath +666 -0
- data/ext/libmemcached-0.50/config/config.sub +1760 -0
- data/ext/libmemcached-0.50/config/depcomp +630 -0
- data/ext/libmemcached-0.50/config/install-sh +520 -0
- data/ext/libmemcached-0.50/config/ltmain.sh +9642 -0
- data/ext/libmemcached-0.50/config/missing +376 -0
- data/ext/libmemcached-0.50/config/pandora-plugin +752 -0
- data/ext/libmemcached-0.50/config/uncrustify.cfg +1112 -0
- data/ext/libmemcached-0.50/configure +27103 -0
- data/ext/libmemcached-0.50/configure.ac +186 -0
- data/ext/libmemcached-0.50/docs/conf.py.in +354 -0
- data/ext/libmemcached-0.50/docs/include.am +240 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_clone.3 +88 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_crc32.3 +105 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_create.3 +88 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_fnv1_32.3 +105 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_fnv1_64.3 +105 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_fnv1a_32.3 +105 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_fnv1a_64.3 +105 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_free.3 +88 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_functions.3 +105 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_hsieh.3 +105 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_is_allocated.3 +88 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_jenkins.3 +105 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_md5.3 +105 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_murmur.3 +105 -0
- data/ext/libmemcached-0.50/docs/man/hashkit_value.3 +66 -0
- data/ext/libmemcached-0.50/docs/man/libhashkit.3 +57 -0
- data/ext/libmemcached-0.50/docs/man/libmemcached.3 +208 -0
- data/ext/libmemcached-0.50/docs/man/libmemcached_check_configuration.3 +293 -0
- data/ext/libmemcached-0.50/docs/man/libmemcached_configuration.3 +293 -0
- data/ext/libmemcached-0.50/docs/man/libmemcached_examples.3 +144 -0
- data/ext/libmemcached-0.50/docs/man/libmemcachedutil.3 +68 -0
- data/ext/libmemcached-0.50/docs/man/memaslap.1 +1222 -0
- data/ext/libmemcached-0.50/docs/man/memcached.3 +293 -0
- data/ext/libmemcached-0.50/docs/man/memcached_add.3 +132 -0
- data/ext/libmemcached-0.50/docs/man/memcached_add_by_key.3 +132 -0
- data/ext/libmemcached-0.50/docs/man/memcached_analyze.3 +77 -0
- data/ext/libmemcached-0.50/docs/man/memcached_append.3 +111 -0
- data/ext/libmemcached-0.50/docs/man/memcached_append_by_key.3 +111 -0
- data/ext/libmemcached-0.50/docs/man/memcached_behavior_get.3 +333 -0
- data/ext/libmemcached-0.50/docs/man/memcached_behavior_set.3 +333 -0
- data/ext/libmemcached-0.50/docs/man/memcached_callback_get.3 +159 -0
- data/ext/libmemcached-0.50/docs/man/memcached_callback_set.3 +159 -0
- data/ext/libmemcached-0.50/docs/man/memcached_cas.3 +91 -0
- data/ext/libmemcached-0.50/docs/man/memcached_cas_by_key.3 +91 -0
- data/ext/libmemcached-0.50/docs/man/memcached_clone.3 +99 -0
- data/ext/libmemcached-0.50/docs/man/memcached_create.3 +99 -0
- data/ext/libmemcached-0.50/docs/man/memcached_decrement.3 +124 -0
- data/ext/libmemcached-0.50/docs/man/memcached_decrement_with_initial.3 +124 -0
- data/ext/libmemcached-0.50/docs/man/memcached_delete.3 +83 -0
- data/ext/libmemcached-0.50/docs/man/memcached_delete_by_key.3 +83 -0
- data/ext/libmemcached-0.50/docs/man/memcached_destroy_sasl_auth_data.3 +95 -0
- data/ext/libmemcached-0.50/docs/man/memcached_dump.3 +77 -0
- data/ext/libmemcached-0.50/docs/man/memcached_fetch.3 +174 -0
- data/ext/libmemcached-0.50/docs/man/memcached_fetch_execute.3 +174 -0
- data/ext/libmemcached-0.50/docs/man/memcached_fetch_result.3 +174 -0
- data/ext/libmemcached-0.50/docs/man/memcached_flush_buffers.3 +72 -0
- data/ext/libmemcached-0.50/docs/man/memcached_free.3 +99 -0
- data/ext/libmemcached-0.50/docs/man/memcached_generate_hash.3 +85 -0
- data/ext/libmemcached-0.50/docs/man/memcached_generate_hash_value.3 +85 -0
- data/ext/libmemcached-0.50/docs/man/memcached_get.3 +174 -0
- data/ext/libmemcached-0.50/docs/man/memcached_get_by_key.3 +174 -0
- data/ext/libmemcached-0.50/docs/man/memcached_get_memory_allocators.3 +111 -0
- data/ext/libmemcached-0.50/docs/man/memcached_get_sasl_callbacks.3 +95 -0
- data/ext/libmemcached-0.50/docs/man/memcached_get_user_data.3 +79 -0
- data/ext/libmemcached-0.50/docs/man/memcached_increment.3 +124 -0
- data/ext/libmemcached-0.50/docs/man/memcached_increment_with_initial.3 +124 -0
- data/ext/libmemcached-0.50/docs/man/memcached_lib_version.3 +76 -0
- data/ext/libmemcached-0.50/docs/man/memcached_mget.3 +174 -0
- data/ext/libmemcached-0.50/docs/man/memcached_mget_by_key.3 +174 -0
- data/ext/libmemcached-0.50/docs/man/memcached_mget_execute.3 +174 -0
- data/ext/libmemcached-0.50/docs/man/memcached_mget_execute_by_key.3 +174 -0
- data/ext/libmemcached-0.50/docs/man/memcached_pool_behavior_get.3 +139 -0
- data/ext/libmemcached-0.50/docs/man/memcached_pool_behavior_set.3 +139 -0
- data/ext/libmemcached-0.50/docs/man/memcached_pool_create.3 +139 -0
- data/ext/libmemcached-0.50/docs/man/memcached_pool_destroy.3 +139 -0
- data/ext/libmemcached-0.50/docs/man/memcached_pool_pop.3 +139 -0
- data/ext/libmemcached-0.50/docs/man/memcached_pool_push.3 +139 -0
- data/ext/libmemcached-0.50/docs/man/memcached_pool_st.3 +139 -0
- data/ext/libmemcached-0.50/docs/man/memcached_prepend.3 +111 -0
- data/ext/libmemcached-0.50/docs/man/memcached_prepend_by_key.3 +111 -0
- data/ext/libmemcached-0.50/docs/man/memcached_quit.3 +74 -0
- data/ext/libmemcached-0.50/docs/man/memcached_replace.3 +132 -0
- data/ext/libmemcached-0.50/docs/man/memcached_replace_by_key.3 +132 -0
- data/ext/libmemcached-0.50/docs/man/memcached_sasl_set_auth_data.3 +95 -0
- data/ext/libmemcached-0.50/docs/man/memcached_server_add.3 +141 -0
- data/ext/libmemcached-0.50/docs/man/memcached_server_count.3 +141 -0
- data/ext/libmemcached-0.50/docs/man/memcached_server_cursor.3 +141 -0
- data/ext/libmemcached-0.50/docs/man/memcached_server_list.3 +141 -0
- data/ext/libmemcached-0.50/docs/man/memcached_server_list_append.3 +111 -0
- data/ext/libmemcached-0.50/docs/man/memcached_server_list_count.3 +111 -0
- data/ext/libmemcached-0.50/docs/man/memcached_server_list_free.3 +111 -0
- data/ext/libmemcached-0.50/docs/man/memcached_server_push.3 +141 -0
- data/ext/libmemcached-0.50/docs/man/memcached_servers_parse.3 +111 -0
- data/ext/libmemcached-0.50/docs/man/memcached_set.3 +132 -0
- data/ext/libmemcached-0.50/docs/man/memcached_set_by_key.3 +132 -0
- data/ext/libmemcached-0.50/docs/man/memcached_set_memory_allocators.3 +111 -0
- data/ext/libmemcached-0.50/docs/man/memcached_set_sasl_callbacks.3 +95 -0
- data/ext/libmemcached-0.50/docs/man/memcached_set_user_data.3 +79 -0
- data/ext/libmemcached-0.50/docs/man/memcached_stat.3 +116 -0
- data/ext/libmemcached-0.50/docs/man/memcached_stat_execute.3 +116 -0
- data/ext/libmemcached-0.50/docs/man/memcached_stat_get_keys.3 +116 -0
- data/ext/libmemcached-0.50/docs/man/memcached_stat_get_value.3 +116 -0
- data/ext/libmemcached-0.50/docs/man/memcached_stat_servername.3 +116 -0
- data/ext/libmemcached-0.50/docs/man/memcached_strerror.3 +69 -0
- data/ext/libmemcached-0.50/docs/man/memcached_verbosity.3 +66 -0
- data/ext/libmemcached-0.50/docs/man/memcached_version.3 +76 -0
- data/ext/libmemcached-0.50/docs/man/memcapable.1 +92 -0
- data/ext/libmemcached-0.50/docs/man/memcat.1 +71 -0
- data/ext/libmemcached-0.50/docs/man/memcp.1 +77 -0
- data/ext/libmemcached-0.50/docs/man/memdump.1 +66 -0
- data/ext/libmemcached-0.50/docs/man/memerror.1 +65 -0
- data/ext/libmemcached-0.50/docs/man/memflush.1 +73 -0
- data/ext/libmemcached-0.50/docs/man/memrm.1 +72 -0
- data/ext/libmemcached-0.50/docs/man/memslap.1 +59 -0
- data/ext/libmemcached-0.50/docs/man/memstat.1 +70 -0
- data/ext/libmemcached-0.50/example/include.am +24 -0
- data/ext/libmemcached-0.50/example/interface_v0.c +594 -0
- data/ext/libmemcached-0.50/example/interface_v1.c +411 -0
- data/ext/libmemcached-0.50/example/memcached_light.c +474 -0
- data/ext/libmemcached-0.50/example/memcached_light.h +7 -0
- data/ext/libmemcached-0.50/example/storage.c +172 -0
- data/ext/libmemcached-0.50/example/storage.h +27 -0
- data/ext/libmemcached-0.50/example/storage_innodb.c +535 -0
- data/ext/libmemcached-0.50/libhashkit/algorithm.cc +69 -0
- data/ext/libmemcached-0.50/libhashkit/algorithm.h +96 -0
- data/ext/libmemcached-0.50/libhashkit/behavior.cc +9 -0
- data/ext/libmemcached-0.50/libhashkit/behavior.h +26 -0
- data/ext/libmemcached-0.50/libhashkit/common.h +33 -0
- data/ext/libmemcached-0.50/libhashkit/configure.h.in +19 -0
- data/ext/libmemcached-0.50/libhashkit/crc32.cc +86 -0
- data/ext/libmemcached-0.50/libhashkit/digest.cc +62 -0
- data/ext/libmemcached-0.50/libhashkit/digest.h +30 -0
- data/ext/libmemcached-0.50/libhashkit/fnv.cc +75 -0
- data/ext/libmemcached-0.50/libhashkit/function.cc +156 -0
- data/ext/libmemcached-0.50/libhashkit/function.h +44 -0
- data/ext/libmemcached-0.50/libhashkit/hashkit.cc +100 -0
- data/ext/libmemcached-0.50/libhashkit/hashkit.h +95 -0
- data/ext/libmemcached-0.50/libhashkit/hashkit.hpp +97 -0
- data/ext/libmemcached-0.50/libhashkit/hsieh.cc +70 -0
- data/ext/libmemcached-0.50/libhashkit/include.am +69 -0
- data/ext/libmemcached-0.50/libhashkit/jenkins.cc +214 -0
- data/ext/libmemcached-0.50/libhashkit/ketama.cc +164 -0
- data/ext/libmemcached-0.50/libhashkit/md5.cc +367 -0
- data/ext/libmemcached-0.50/libhashkit/murmur.cc +77 -0
- data/ext/libmemcached-0.50/libhashkit/one_at_a_time.cc +34 -0
- data/ext/libmemcached-0.50/libhashkit/str_algorithm.cc +58 -0
- data/ext/libmemcached-0.50/libhashkit/str_algorithm.h +48 -0
- data/ext/libmemcached-0.50/libhashkit/strerror.cc +25 -0
- data/ext/libmemcached-0.50/libhashkit/strerror.h +23 -0
- data/ext/libmemcached-0.50/libhashkit/types.h +90 -0
- data/ext/libmemcached-0.50/libhashkit/visibility.h +48 -0
- data/ext/libmemcached-0.50/libmemcached/allocators.cc +119 -0
- data/ext/libmemcached-0.50/libmemcached/allocators.h +87 -0
- data/ext/libmemcached-0.50/libmemcached/analyze.cc +110 -0
- data/ext/libmemcached-0.50/libmemcached/analyze.h +66 -0
- data/ext/libmemcached-0.50/libmemcached/array.c +128 -0
- data/ext/libmemcached-0.50/libmemcached/array.h +75 -0
- data/ext/libmemcached-0.50/libmemcached/auto.cc +383 -0
- data/ext/libmemcached-0.50/libmemcached/auto.h +111 -0
- data/ext/libmemcached-0.50/libmemcached/basic_string.h +55 -0
- data/ext/libmemcached-0.50/libmemcached/behavior.cc +590 -0
- data/ext/libmemcached-0.50/libmemcached/behavior.h +86 -0
- data/ext/libmemcached-0.50/libmemcached/byteorder.cc +90 -0
- data/ext/libmemcached-0.50/libmemcached/byteorder.h +52 -0
- data/ext/libmemcached-0.50/libmemcached/callback.cc +160 -0
- data/ext/libmemcached-0.50/libmemcached/callback.h +61 -0
- data/ext/libmemcached-0.50/libmemcached/common.h +182 -0
- data/ext/libmemcached-0.50/libmemcached/configure.h.in +52 -0
- data/ext/libmemcached-0.50/libmemcached/connect.cc +626 -0
- data/ext/libmemcached-0.50/libmemcached/constants.h +167 -0
- data/ext/libmemcached-0.50/libmemcached/delete.cc +266 -0
- data/ext/libmemcached-0.50/libmemcached/delete.h +57 -0
- data/ext/libmemcached-0.50/libmemcached/do.cc +100 -0
- data/ext/libmemcached-0.50/libmemcached/do.hpp +49 -0
- data/ext/libmemcached-0.50/libmemcached/dump.cc +107 -0
- data/ext/libmemcached-0.50/libmemcached/dump.h +51 -0
- data/ext/libmemcached-0.50/libmemcached/error.cc +419 -0
- data/ext/libmemcached-0.50/libmemcached/error.h +61 -0
- data/ext/libmemcached-0.50/libmemcached/error.hpp +87 -0
- data/ext/libmemcached-0.50/libmemcached/exception.hpp +63 -0
- data/ext/libmemcached-0.50/libmemcached/fetch.cc +267 -0
- data/ext/libmemcached-0.50/libmemcached/fetch.h +53 -0
- data/ext/libmemcached-0.50/libmemcached/flush.cc +149 -0
- data/ext/libmemcached-0.50/libmemcached/flush.h +49 -0
- data/ext/libmemcached-0.50/libmemcached/flush_buffers.cc +66 -0
- data/ext/libmemcached-0.50/libmemcached/flush_buffers.h +49 -0
- data/ext/libmemcached-0.50/libmemcached/get.cc +842 -0
- data/ext/libmemcached-0.50/libmemcached/get.h +135 -0
- data/ext/libmemcached-0.50/libmemcached/hash.cc +178 -0
- data/ext/libmemcached-0.50/libmemcached/hash.h +68 -0
- data/ext/libmemcached-0.50/libmemcached/hosts.cc +516 -0
- data/ext/libmemcached-0.50/libmemcached/include.am +183 -0
- data/ext/libmemcached-0.50/libmemcached/initialize_query.cc +70 -0
- data/ext/libmemcached-0.50/libmemcached/initialize_query.h +51 -0
- data/ext/libmemcached-0.50/libmemcached/internal.h +46 -0
- data/ext/libmemcached-0.50/libmemcached/io.cc +920 -0
- data/ext/libmemcached-0.50/libmemcached/io.h +119 -0
- data/ext/libmemcached-0.50/libmemcached/is.h +48 -0
- data/ext/libmemcached-0.50/libmemcached/key.cc +23 -0
- data/ext/libmemcached-0.50/libmemcached/libmemcached_probes.d +30 -0
- data/ext/libmemcached-0.50/libmemcached/libmemcached_probes.h +118 -0
- data/ext/libmemcached-0.50/libmemcached/memcached.cc +437 -0
- data/ext/libmemcached-0.50/libmemcached/memcached.h +214 -0
- data/ext/libmemcached-0.50/libmemcached/memcached.hpp +799 -0
- data/ext/libmemcached-0.50/libmemcached/memcached/README.txt +7 -0
- data/ext/libmemcached-0.50/libmemcached/memcached/protocol_binary.h +726 -0
- data/ext/libmemcached-0.50/libmemcached/memcached/vbucket.h +26 -0
- data/ext/libmemcached-0.50/libmemcached/memcached_util.h +44 -0
- data/ext/libmemcached-0.50/libmemcached/memory.h +79 -0
- data/ext/libmemcached-0.50/libmemcached/options.cc +178 -0
- data/ext/libmemcached-0.50/libmemcached/options.h +49 -0
- data/ext/libmemcached-0.50/libmemcached/options.hpp +56 -0
- data/ext/libmemcached-0.50/libmemcached/options/context.h +151 -0
- data/ext/libmemcached-0.50/libmemcached/options/include.am +19 -0
- data/ext/libmemcached-0.50/libmemcached/options/parser.am +0 -0
- data/ext/libmemcached-0.50/libmemcached/options/parser.cc +2324 -0
- data/ext/libmemcached-0.50/libmemcached/options/parser.h +122 -0
- data/ext/libmemcached-0.50/libmemcached/options/scanner.cc +3203 -0
- data/ext/libmemcached-0.50/libmemcached/options/scanner.h +479 -0
- data/ext/libmemcached-0.50/libmemcached/options/server.h +60 -0
- data/ext/libmemcached-0.50/libmemcached/options/symbol.h +57 -0
- data/ext/libmemcached-0.50/libmemcached/parse.cc +110 -0
- data/ext/libmemcached-0.50/libmemcached/parse.h +23 -0
- data/ext/libmemcached-0.50/libmemcached/platform.h +56 -0
- data/ext/libmemcached-0.50/libmemcached/prefix_key.cc +65 -0
- data/ext/libmemcached-0.50/libmemcached/prefix_key.h +49 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/ascii_handler.c +963 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/ascii_handler.h +40 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/binary_handler.c +1121 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/binary_handler.h +47 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/cache.c +149 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/cache.h +116 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/callback.h +418 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/common.h +163 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/include.am +26 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/pedantic.c +202 -0
- data/ext/libmemcached-0.50/libmemcached/protocol/protocol_handler.c +365 -0
- data/ext/libmemcached-0.50/libmemcached/protocol_handler.h +215 -0
- data/ext/libmemcached-0.50/libmemcached/purge.cc +90 -0
- data/ext/libmemcached-0.50/libmemcached/quit.cc +139 -0
- data/ext/libmemcached-0.50/libmemcached/quit.h +55 -0
- data/ext/libmemcached-0.50/libmemcached/response.cc +619 -0
- data/ext/libmemcached-0.50/libmemcached/response.h +57 -0
- data/ext/libmemcached-0.50/libmemcached/result.cc +173 -0
- data/ext/libmemcached-0.50/libmemcached/result.h +100 -0
- data/ext/libmemcached-0.50/libmemcached/return.h +98 -0
- data/ext/libmemcached-0.50/libmemcached/sasl.c +408 -0
- data/ext/libmemcached-0.50/libmemcached/sasl.h +86 -0
- data/ext/libmemcached-0.50/libmemcached/server.cc +351 -0
- data/ext/libmemcached-0.50/libmemcached/server.h +169 -0
- data/ext/libmemcached-0.50/libmemcached/server_list.cc +88 -0
- data/ext/libmemcached-0.50/libmemcached/server_list.h +77 -0
- data/ext/libmemcached-0.50/libmemcached/stats.cc +623 -0
- data/ext/libmemcached-0.50/libmemcached/stats.h +96 -0
- data/ext/libmemcached-0.50/libmemcached/storage.cc +567 -0
- data/ext/libmemcached-0.50/libmemcached/storage.h +133 -0
- data/ext/libmemcached-0.50/libmemcached/strerror.cc +189 -0
- data/ext/libmemcached-0.50/libmemcached/strerror.h +50 -0
- data/ext/libmemcached-0.50/libmemcached/string.cc +253 -0
- data/ext/libmemcached-0.50/libmemcached/string.h +121 -0
- data/ext/libmemcached-0.50/libmemcached/touch.cc +106 -0
- data/ext/libmemcached-0.50/libmemcached/touch.h +59 -0
- data/ext/libmemcached-0.50/libmemcached/types.h +117 -0
- data/ext/libmemcached-0.50/libmemcached/util.h +40 -0
- data/ext/libmemcached-0.50/libmemcached/util/flush.cc +61 -0
- data/ext/libmemcached-0.50/libmemcached/util/flush.h +50 -0
- data/ext/libmemcached-0.50/libmemcached/util/include.am +34 -0
- data/ext/libmemcached-0.50/libmemcached/util/ping.cc +62 -0
- data/ext/libmemcached-0.50/libmemcached/util/ping.h +49 -0
- data/ext/libmemcached-0.50/libmemcached/util/pool.cc +392 -0
- data/ext/libmemcached-0.50/libmemcached/util/pool.h +78 -0
- data/ext/libmemcached-0.50/libmemcached/util/version.cc +87 -0
- data/ext/libmemcached-0.50/libmemcached/util/version.h +53 -0
- data/ext/libmemcached-0.50/libmemcached/verbosity.cc +97 -0
- data/ext/libmemcached-0.50/libmemcached/verbosity.h +50 -0
- data/ext/libmemcached-0.50/libmemcached/version.cc +214 -0
- data/ext/libmemcached-0.50/libmemcached/version.h +52 -0
- data/ext/libmemcached-0.50/libmemcached/virtual_bucket.c +118 -0
- data/ext/libmemcached-0.50/libmemcached/virtual_bucket.h +59 -0
- data/ext/libmemcached-0.50/libmemcached/visibility.h +51 -0
- data/ext/libmemcached-0.50/libmemcached/watchpoint.h +110 -0
- data/ext/libmemcached-0.50/libtest/callbacks.h +21 -0
- data/ext/libmemcached-0.50/libtest/collection.h +19 -0
- data/ext/libmemcached-0.50/libtest/common.h +50 -0
- data/ext/libmemcached-0.50/libtest/core.h +11 -0
- data/ext/libmemcached-0.50/libtest/error.h +18 -0
- data/ext/libmemcached-0.50/libtest/failed.h +52 -0
- data/ext/libmemcached-0.50/libtest/framework.cc +57 -0
- data/ext/libmemcached-0.50/libtest/framework.h +137 -0
- data/ext/libmemcached-0.50/libtest/get.h +22 -0
- data/ext/libmemcached-0.50/libtest/include.am +52 -0
- data/ext/libmemcached-0.50/libtest/runner.h +19 -0
- data/ext/libmemcached-0.50/libtest/server.c +355 -0
- data/ext/libmemcached-0.50/libtest/server.h +43 -0
- data/ext/libmemcached-0.50/libtest/stats.h +30 -0
- data/ext/libmemcached-0.50/libtest/strerror.h +14 -0
- data/ext/libmemcached-0.50/libtest/test.cc +319 -0
- data/ext/libmemcached-0.50/libtest/test.h +162 -0
- data/ext/libmemcached-0.50/libtest/test.hpp +46 -0
- data/ext/libmemcached-0.50/libtest/visibility.h +69 -0
- data/ext/libmemcached-0.50/m4/ac_cxx_header_stdcxx_98.m4 +83 -0
- data/ext/libmemcached-0.50/m4/acx_pthread.m4 +271 -0
- data/ext/libmemcached-0.50/m4/byteorder.m4 +19 -0
- data/ext/libmemcached-0.50/m4/deprecated.m4 +17 -0
- data/ext/libmemcached-0.50/m4/eagain.m4 +28 -0
- data/ext/libmemcached-0.50/m4/enable_utillib.m4 +16 -0
- data/ext/libmemcached-0.50/m4/gettext.m4 +379 -0
- data/ext/libmemcached-0.50/m4/hsieh.m4 +18 -0
- data/ext/libmemcached-0.50/m4/iconv.m4 +214 -0
- data/ext/libmemcached-0.50/m4/lib-ld.m4 +110 -0
- data/ext/libmemcached-0.50/m4/lib-link.m4 +767 -0
- data/ext/libmemcached-0.50/m4/lib-prefix.m4 +221 -0
- data/ext/libmemcached-0.50/m4/libtool.m4 +7851 -0
- data/ext/libmemcached-0.50/m4/ltoptions.m4 +369 -0
- data/ext/libmemcached-0.50/m4/ltsugar.m4 +123 -0
- data/ext/libmemcached-0.50/m4/ltversion.m4 +23 -0
- data/ext/libmemcached-0.50/m4/lt~obsolete.m4 +98 -0
- data/ext/libmemcached-0.50/m4/memaslap.m4 +9 -0
- data/ext/libmemcached-0.50/m4/memcached.m4 +31 -0
- data/ext/libmemcached-0.50/m4/murmur.m4 +18 -0
- data/ext/libmemcached-0.50/m4/pandora_64bit.m4 +60 -0
- data/ext/libmemcached-0.50/m4/pandora_bison.m4 +33 -0
- data/ext/libmemcached-0.50/m4/pandora_canonical.m4 +418 -0
- data/ext/libmemcached-0.50/m4/pandora_check_compiler_version.m4 +37 -0
- data/ext/libmemcached-0.50/m4/pandora_check_cxx_standard.m4 +23 -0
- data/ext/libmemcached-0.50/m4/pandora_cinttypes.m4 +39 -0
- data/ext/libmemcached-0.50/m4/pandora_clock_gettime.m4 +15 -0
- data/ext/libmemcached-0.50/m4/pandora_compile_stdcxx_0x.m4 +103 -0
- data/ext/libmemcached-0.50/m4/pandora_cstdint.m4 +38 -0
- data/ext/libmemcached-0.50/m4/pandora_cxx_demangle.m4 +27 -0
- data/ext/libmemcached-0.50/m4/pandora_enable_dtrace.m4 +60 -0
- data/ext/libmemcached-0.50/m4/pandora_ensure_gcc_version.m4 +62 -0
- data/ext/libmemcached-0.50/m4/pandora_extensions.m4 +16 -0
- data/ext/libmemcached-0.50/m4/pandora_fdatasync.m4 +25 -0
- data/ext/libmemcached-0.50/m4/pandora_flex.m4 +33 -0
- data/ext/libmemcached-0.50/m4/pandora_have_better_malloc.m4 +66 -0
- data/ext/libmemcached-0.50/m4/pandora_have_boost.m4 +93 -0
- data/ext/libmemcached-0.50/m4/pandora_have_gcc_atomics.m4 +37 -0
- data/ext/libmemcached-0.50/m4/pandora_have_innodb.m4 +41 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libaio.m4 +56 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libavahi.m4 +41 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libbdb.m4 +40 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libboost_date_time.m4 +46 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libboost_filesystem.m4 +47 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libboost_iostreams.m4 +49 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libboost_options.m4 +47 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libboost_regex.m4 +54 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libboost_test.m4 +45 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libboost_thread.m4 +54 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libcassandra.m4 +44 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libcurl.m4 +62 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libdl.m4 +51 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libdrizzle.m4 +61 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libevent.m4 +66 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libgearman.m4 +41 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libgtest.m4 +47 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libhaildb.m4 +43 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libhashkit.m4 +42 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libinnodb.m4 +64 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libldap.m4 +73 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libmemcached.m4 +106 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libmysqlclient.m4 +146 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libndbclient.m4 +80 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libpcre.m4 +73 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libpq.m4 +46 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libpqxx.m4 +44 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libsqlite3.m4 +42 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libtokyocabinet.m4 +54 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libuuid.m4 +55 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libvbucket.m4 +40 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libxml2.m4 +52 -0
- data/ext/libmemcached-0.50/m4/pandora_have_libz.m4 +51 -0
- data/ext/libmemcached-0.50/m4/pandora_have_protobuf.m4 +82 -0
- data/ext/libmemcached-0.50/m4/pandora_have_sasl.m4 +133 -0
- data/ext/libmemcached-0.50/m4/pandora_have_thrift.m4 +45 -0
- data/ext/libmemcached-0.50/m4/pandora_header_assert.m4 +23 -0
- data/ext/libmemcached-0.50/m4/pandora_header_stdcxx_98.m4 +83 -0
- data/ext/libmemcached-0.50/m4/pandora_intltool.m4 +225 -0
- data/ext/libmemcached-0.50/m4/pandora_libtool.m4 +25 -0
- data/ext/libmemcached-0.50/m4/pandora_optimize.m4 +75 -0
- data/ext/libmemcached-0.50/m4/pandora_platform.m4 +117 -0
- data/ext/libmemcached-0.50/m4/pandora_plugins.m4 +62 -0
- data/ext/libmemcached-0.50/m4/pandora_print_callstack.m4 +61 -0
- data/ext/libmemcached-0.50/m4/pandora_pthread.m4 +258 -0
- data/ext/libmemcached-0.50/m4/pandora_python3_devel.m4 +236 -0
- data/ext/libmemcached-0.50/m4/pandora_run_cpplint.m4 +8 -0
- data/ext/libmemcached-0.50/m4/pandora_sasl.m4 +133 -0
- data/ext/libmemcached-0.50/m4/pandora_shared_ptr.m4 +59 -0
- data/ext/libmemcached-0.50/m4/pandora_stack_direction.m4 +39 -0
- data/ext/libmemcached-0.50/m4/pandora_stl_hash.m4 +94 -0
- data/ext/libmemcached-0.50/m4/pandora_swig.m4 +39 -0
- data/ext/libmemcached-0.50/m4/pandora_use_pipe.m4 +36 -0
- data/ext/libmemcached-0.50/m4/pandora_vc_build.m4 +168 -0
- data/ext/libmemcached-0.50/m4/pandora_version.m4 +11 -0
- data/ext/libmemcached-0.50/m4/pandora_visibility.m4 +75 -0
- data/ext/libmemcached-0.50/m4/pandora_warnings.m4 +447 -0
- data/ext/libmemcached-0.50/m4/pandora_with_gettext.m4 +44 -0
- data/ext/libmemcached-0.50/m4/pandora_with_lua.m4 +55 -0
- data/ext/libmemcached-0.50/m4/pandora_with_memcached.m4 +41 -0
- data/ext/libmemcached-0.50/m4/pandora_with_perl.m4 +81 -0
- data/ext/libmemcached-0.50/m4/pandora_with_php.m4 +56 -0
- data/ext/libmemcached-0.50/m4/pandora_with_python.m4 +37 -0
- data/ext/libmemcached-0.50/m4/pandora_with_python3.m4 +44 -0
- data/ext/libmemcached-0.50/m4/pandora_with_r.m4 +33 -0
- data/ext/libmemcached-0.50/m4/pandora_with_ruby.m4 +79 -0
- data/ext/libmemcached-0.50/m4/pandora_with_valgrind.m4 +17 -0
- data/ext/libmemcached-0.50/m4/pkg.m4 +157 -0
- data/ext/libmemcached-0.50/m4/po.m4 +449 -0
- data/ext/libmemcached-0.50/m4/progtest.m4 +92 -0
- data/ext/libmemcached-0.50/m4/protocol_binary.m4 +36 -0
- data/ext/libmemcached-0.50/m4/setsockopt.m4 +73 -0
- data/ext/libmemcached-0.50/m4/socket_send_flags.m4 +66 -0
- data/ext/libmemcached-0.50/poll/include.am +8 -0
- data/ext/libmemcached-0.50/poll/poll.c +77 -0
- data/ext/libmemcached-0.50/poll/poll.h +45 -0
- data/ext/libmemcached-0.50/support/include.am +11 -0
- data/ext/libmemcached-0.50/support/libmemcached-fc.spec.in +105 -0
- data/ext/libmemcached-0.50/support/libmemcached.pc.in +10 -0
- data/ext/libmemcached-0.50/support/libmemcached.spec.in +281 -0
- data/ext/libmemcached-0.50/support/set_benchmark.sh +5 -0
- data/ext/libmemcached-0.50/tests/atomsmasher.cc +295 -0
- data/ext/libmemcached-0.50/tests/basic.cc +134 -0
- data/ext/libmemcached-0.50/tests/basic.h +66 -0
- data/ext/libmemcached-0.50/tests/cpp_example.cc +195 -0
- data/ext/libmemcached-0.50/tests/deprecated.cc +72 -0
- data/ext/libmemcached-0.50/tests/deprecated.h +49 -0
- data/ext/libmemcached-0.50/tests/error_conditions.cc +63 -0
- data/ext/libmemcached-0.50/tests/error_conditions.h +48 -0
- data/ext/libmemcached-0.50/tests/hash_plus.cc +225 -0
- data/ext/libmemcached-0.50/tests/hash_results.h +127 -0
- data/ext/libmemcached-0.50/tests/hashkit_functions.cc +619 -0
- data/ext/libmemcached-0.50/tests/include.am +342 -0
- data/ext/libmemcached-0.50/tests/ketama_test_cases.h +121 -0
- data/ext/libmemcached-0.50/tests/ketama_test_cases_spy.h +118 -0
- data/ext/libmemcached-0.50/tests/libmemcached_world.h +205 -0
- data/ext/libmemcached-0.50/tests/mem_functions.cc +6648 -0
- data/ext/libmemcached-0.50/tests/mem_udp.cc +510 -0
- data/ext/libmemcached-0.50/tests/output_plus.res +5 -0
- data/ext/libmemcached-0.50/tests/parser.cc +599 -0
- data/ext/libmemcached-0.50/tests/parser.h +109 -0
- data/ext/libmemcached-0.50/tests/plus.cpp +240 -0
- data/ext/libmemcached-0.50/tests/pool.cc +78 -0
- data/ext/libmemcached-0.50/tests/pool.h +49 -0
- data/ext/libmemcached-0.50/tests/print.cc +58 -0
- data/ext/libmemcached-0.50/tests/print.h +51 -0
- data/ext/libmemcached-0.50/tests/replication.cc +333 -0
- data/ext/libmemcached-0.50/tests/replication.h +64 -0
- data/ext/libmemcached-0.50/tests/start.cc +29 -0
- data/ext/libmemcached-0.50/tests/string.cc +174 -0
- data/ext/libmemcached-0.50/tests/string.h +67 -0
- data/ext/libmemcached-0.50/tests/virtual_buckets.cc +143 -0
- data/ext/libmemcached-0.50/tests/virtual_buckets.h +51 -0
- data/ext/libmemcached-0.50/win32/include.am +11 -0
- data/ext/libmemcached-0.50/win32/wrappers.h +55 -0
- data/ext/rlibmemcached.i +263 -0
- data/ext/rlibmemcached_wrap.c +16732 -0
- data/lib/memcached.rb +32 -0
- data/lib/memcached/auth.rb +16 -0
- data/lib/memcached/behaviors.rb +77 -0
- data/lib/memcached/exceptions.rb +84 -0
- data/lib/memcached/experimental.rb +48 -0
- data/lib/memcached/memcached.rb +660 -0
- data/lib/memcached/rails.rb +133 -0
- data/test/profile/benchmark.rb +245 -0
- data/test/profile/c_profiler.rb +14 -0
- data/test/profile/exercise.rb +185 -0
- data/test/profile/rb_profiler.rb +21 -0
- data/test/profile/valgrind.rb +10 -0
- data/test/setup.rb +30 -0
- data/test/teardown.rb +0 -0
- data/test/test_helper.rb +19 -0
- data/test/unit/binding_test.rb +8 -0
- data/test/unit/memcached_experimental_test.rb +274 -0
- data/test/unit/memcached_test.rb +1293 -0
- data/test/unit/rails_test.rb +122 -0
- metadata +650 -0
- metadata.gz.sig +0 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
#! /bin/sh
|
|
2
|
+
# Common stub for a few missing GNU programs while installing.
|
|
3
|
+
|
|
4
|
+
scriptversion=2009-04-28.21; # UTC
|
|
5
|
+
|
|
6
|
+
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
|
|
7
|
+
# 2008, 2009 Free Software Foundation, Inc.
|
|
8
|
+
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
|
9
|
+
|
|
10
|
+
# This program is free software; you can redistribute it and/or modify
|
|
11
|
+
# it under the terms of the GNU General Public License as published by
|
|
12
|
+
# the Free Software Foundation; either version 2, or (at your option)
|
|
13
|
+
# any later version.
|
|
14
|
+
|
|
15
|
+
# This program is distributed in the hope that it will be useful,
|
|
16
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
18
|
+
# GNU General Public License for more details.
|
|
19
|
+
|
|
20
|
+
# You should have received a copy of the GNU General Public License
|
|
21
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
22
|
+
|
|
23
|
+
# As a special exception to the GNU General Public License, if you
|
|
24
|
+
# distribute this file as part of a program that contains a
|
|
25
|
+
# configuration script generated by Autoconf, you may include it under
|
|
26
|
+
# the same distribution terms that you use for the rest of that program.
|
|
27
|
+
|
|
28
|
+
if test $# -eq 0; then
|
|
29
|
+
echo 1>&2 "Try \`$0 --help' for more information"
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
run=:
|
|
34
|
+
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
|
35
|
+
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
|
36
|
+
|
|
37
|
+
# In the cases where this matters, `missing' is being run in the
|
|
38
|
+
# srcdir already.
|
|
39
|
+
if test -f configure.ac; then
|
|
40
|
+
configure_ac=configure.ac
|
|
41
|
+
else
|
|
42
|
+
configure_ac=configure.in
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
msg="missing on your system"
|
|
46
|
+
|
|
47
|
+
case $1 in
|
|
48
|
+
--run)
|
|
49
|
+
# Try to run requested program, and just exit if it succeeds.
|
|
50
|
+
run=
|
|
51
|
+
shift
|
|
52
|
+
"$@" && exit 0
|
|
53
|
+
# Exit code 63 means version mismatch. This often happens
|
|
54
|
+
# when the user try to use an ancient version of a tool on
|
|
55
|
+
# a file that requires a minimum version. In this case we
|
|
56
|
+
# we should proceed has if the program had been absent, or
|
|
57
|
+
# if --run hadn't been passed.
|
|
58
|
+
if test $? = 63; then
|
|
59
|
+
run=:
|
|
60
|
+
msg="probably too old"
|
|
61
|
+
fi
|
|
62
|
+
;;
|
|
63
|
+
|
|
64
|
+
-h|--h|--he|--hel|--help)
|
|
65
|
+
echo "\
|
|
66
|
+
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
|
67
|
+
|
|
68
|
+
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
|
69
|
+
error status if there is no known handling for PROGRAM.
|
|
70
|
+
|
|
71
|
+
Options:
|
|
72
|
+
-h, --help display this help and exit
|
|
73
|
+
-v, --version output version information and exit
|
|
74
|
+
--run try to run the given command, and emulate it if it fails
|
|
75
|
+
|
|
76
|
+
Supported PROGRAM values:
|
|
77
|
+
aclocal touch file \`aclocal.m4'
|
|
78
|
+
autoconf touch file \`configure'
|
|
79
|
+
autoheader touch file \`config.h.in'
|
|
80
|
+
autom4te touch the output file, or create a stub one
|
|
81
|
+
automake touch all \`Makefile.in' files
|
|
82
|
+
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
|
83
|
+
flex create \`lex.yy.c', if possible, from existing .c
|
|
84
|
+
help2man touch the output file
|
|
85
|
+
lex create \`lex.yy.c', if possible, from existing .c
|
|
86
|
+
makeinfo touch the output file
|
|
87
|
+
tar try tar, gnutar, gtar, then tar without non-portable flags
|
|
88
|
+
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
|
89
|
+
|
|
90
|
+
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
|
91
|
+
\`g' are ignored when checking the name.
|
|
92
|
+
|
|
93
|
+
Send bug reports to <bug-automake@gnu.org>."
|
|
94
|
+
exit $?
|
|
95
|
+
;;
|
|
96
|
+
|
|
97
|
+
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
|
98
|
+
echo "missing $scriptversion (GNU Automake)"
|
|
99
|
+
exit $?
|
|
100
|
+
;;
|
|
101
|
+
|
|
102
|
+
-*)
|
|
103
|
+
echo 1>&2 "$0: Unknown \`$1' option"
|
|
104
|
+
echo 1>&2 "Try \`$0 --help' for more information"
|
|
105
|
+
exit 1
|
|
106
|
+
;;
|
|
107
|
+
|
|
108
|
+
esac
|
|
109
|
+
|
|
110
|
+
# normalize program name to check for.
|
|
111
|
+
program=`echo "$1" | sed '
|
|
112
|
+
s/^gnu-//; t
|
|
113
|
+
s/^gnu//; t
|
|
114
|
+
s/^g//; t'`
|
|
115
|
+
|
|
116
|
+
# Now exit if we have it, but it failed. Also exit now if we
|
|
117
|
+
# don't have it and --version was passed (most likely to detect
|
|
118
|
+
# the program). This is about non-GNU programs, so use $1 not
|
|
119
|
+
# $program.
|
|
120
|
+
case $1 in
|
|
121
|
+
lex*|yacc*)
|
|
122
|
+
# Not GNU programs, they don't have --version.
|
|
123
|
+
;;
|
|
124
|
+
|
|
125
|
+
tar*)
|
|
126
|
+
if test -n "$run"; then
|
|
127
|
+
echo 1>&2 "ERROR: \`tar' requires --run"
|
|
128
|
+
exit 1
|
|
129
|
+
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
|
130
|
+
exit 1
|
|
131
|
+
fi
|
|
132
|
+
;;
|
|
133
|
+
|
|
134
|
+
*)
|
|
135
|
+
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
|
136
|
+
# We have it, but it failed.
|
|
137
|
+
exit 1
|
|
138
|
+
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
|
139
|
+
# Could not run --version or --help. This is probably someone
|
|
140
|
+
# running `$TOOL --version' or `$TOOL --help' to check whether
|
|
141
|
+
# $TOOL exists and not knowing $TOOL uses missing.
|
|
142
|
+
exit 1
|
|
143
|
+
fi
|
|
144
|
+
;;
|
|
145
|
+
esac
|
|
146
|
+
|
|
147
|
+
# If it does not exist, or fails to run (possibly an outdated version),
|
|
148
|
+
# try to emulate it.
|
|
149
|
+
case $program in
|
|
150
|
+
aclocal*)
|
|
151
|
+
echo 1>&2 "\
|
|
152
|
+
WARNING: \`$1' is $msg. You should only need it if
|
|
153
|
+
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
|
154
|
+
to install the \`Automake' and \`Perl' packages. Grab them from
|
|
155
|
+
any GNU archive site."
|
|
156
|
+
touch aclocal.m4
|
|
157
|
+
;;
|
|
158
|
+
|
|
159
|
+
autoconf*)
|
|
160
|
+
echo 1>&2 "\
|
|
161
|
+
WARNING: \`$1' is $msg. You should only need it if
|
|
162
|
+
you modified \`${configure_ac}'. You might want to install the
|
|
163
|
+
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
|
164
|
+
archive site."
|
|
165
|
+
touch configure
|
|
166
|
+
;;
|
|
167
|
+
|
|
168
|
+
autoheader*)
|
|
169
|
+
echo 1>&2 "\
|
|
170
|
+
WARNING: \`$1' is $msg. You should only need it if
|
|
171
|
+
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
|
172
|
+
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
|
173
|
+
from any GNU archive site."
|
|
174
|
+
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
|
175
|
+
test -z "$files" && files="config.h"
|
|
176
|
+
touch_files=
|
|
177
|
+
for f in $files; do
|
|
178
|
+
case $f in
|
|
179
|
+
*:*) touch_files="$touch_files "`echo "$f" |
|
|
180
|
+
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
|
181
|
+
*) touch_files="$touch_files $f.in";;
|
|
182
|
+
esac
|
|
183
|
+
done
|
|
184
|
+
touch $touch_files
|
|
185
|
+
;;
|
|
186
|
+
|
|
187
|
+
automake*)
|
|
188
|
+
echo 1>&2 "\
|
|
189
|
+
WARNING: \`$1' is $msg. You should only need it if
|
|
190
|
+
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
|
191
|
+
You might want to install the \`Automake' and \`Perl' packages.
|
|
192
|
+
Grab them from any GNU archive site."
|
|
193
|
+
find . -type f -name Makefile.am -print |
|
|
194
|
+
sed 's/\.am$/.in/' |
|
|
195
|
+
while read f; do touch "$f"; done
|
|
196
|
+
;;
|
|
197
|
+
|
|
198
|
+
autom4te*)
|
|
199
|
+
echo 1>&2 "\
|
|
200
|
+
WARNING: \`$1' is needed, but is $msg.
|
|
201
|
+
You might have modified some files without having the
|
|
202
|
+
proper tools for further handling them.
|
|
203
|
+
You can get \`$1' as part of \`Autoconf' from any GNU
|
|
204
|
+
archive site."
|
|
205
|
+
|
|
206
|
+
file=`echo "$*" | sed -n "$sed_output"`
|
|
207
|
+
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
|
208
|
+
if test -f "$file"; then
|
|
209
|
+
touch $file
|
|
210
|
+
else
|
|
211
|
+
test -z "$file" || exec >$file
|
|
212
|
+
echo "#! /bin/sh"
|
|
213
|
+
echo "# Created by GNU Automake missing as a replacement of"
|
|
214
|
+
echo "# $ $@"
|
|
215
|
+
echo "exit 0"
|
|
216
|
+
chmod +x $file
|
|
217
|
+
exit 1
|
|
218
|
+
fi
|
|
219
|
+
;;
|
|
220
|
+
|
|
221
|
+
bison*|yacc*)
|
|
222
|
+
echo 1>&2 "\
|
|
223
|
+
WARNING: \`$1' $msg. You should only need it if
|
|
224
|
+
you modified a \`.y' file. You may need the \`Bison' package
|
|
225
|
+
in order for those modifications to take effect. You can get
|
|
226
|
+
\`Bison' from any GNU archive site."
|
|
227
|
+
rm -f y.tab.c y.tab.h
|
|
228
|
+
if test $# -ne 1; then
|
|
229
|
+
eval LASTARG="\${$#}"
|
|
230
|
+
case $LASTARG in
|
|
231
|
+
*.y)
|
|
232
|
+
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
|
233
|
+
if test -f "$SRCFILE"; then
|
|
234
|
+
cp "$SRCFILE" y.tab.c
|
|
235
|
+
fi
|
|
236
|
+
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
|
237
|
+
if test -f "$SRCFILE"; then
|
|
238
|
+
cp "$SRCFILE" y.tab.h
|
|
239
|
+
fi
|
|
240
|
+
;;
|
|
241
|
+
esac
|
|
242
|
+
fi
|
|
243
|
+
if test ! -f y.tab.h; then
|
|
244
|
+
echo >y.tab.h
|
|
245
|
+
fi
|
|
246
|
+
if test ! -f y.tab.c; then
|
|
247
|
+
echo 'main() { return 0; }' >y.tab.c
|
|
248
|
+
fi
|
|
249
|
+
;;
|
|
250
|
+
|
|
251
|
+
lex*|flex*)
|
|
252
|
+
echo 1>&2 "\
|
|
253
|
+
WARNING: \`$1' is $msg. You should only need it if
|
|
254
|
+
you modified a \`.l' file. You may need the \`Flex' package
|
|
255
|
+
in order for those modifications to take effect. You can get
|
|
256
|
+
\`Flex' from any GNU archive site."
|
|
257
|
+
rm -f lex.yy.c
|
|
258
|
+
if test $# -ne 1; then
|
|
259
|
+
eval LASTARG="\${$#}"
|
|
260
|
+
case $LASTARG in
|
|
261
|
+
*.l)
|
|
262
|
+
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
|
263
|
+
if test -f "$SRCFILE"; then
|
|
264
|
+
cp "$SRCFILE" lex.yy.c
|
|
265
|
+
fi
|
|
266
|
+
;;
|
|
267
|
+
esac
|
|
268
|
+
fi
|
|
269
|
+
if test ! -f lex.yy.c; then
|
|
270
|
+
echo 'main() { return 0; }' >lex.yy.c
|
|
271
|
+
fi
|
|
272
|
+
;;
|
|
273
|
+
|
|
274
|
+
help2man*)
|
|
275
|
+
echo 1>&2 "\
|
|
276
|
+
WARNING: \`$1' is $msg. You should only need it if
|
|
277
|
+
you modified a dependency of a manual page. You may need the
|
|
278
|
+
\`Help2man' package in order for those modifications to take
|
|
279
|
+
effect. You can get \`Help2man' from any GNU archive site."
|
|
280
|
+
|
|
281
|
+
file=`echo "$*" | sed -n "$sed_output"`
|
|
282
|
+
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
|
283
|
+
if test -f "$file"; then
|
|
284
|
+
touch $file
|
|
285
|
+
else
|
|
286
|
+
test -z "$file" || exec >$file
|
|
287
|
+
echo ".ab help2man is required to generate this page"
|
|
288
|
+
exit $?
|
|
289
|
+
fi
|
|
290
|
+
;;
|
|
291
|
+
|
|
292
|
+
makeinfo*)
|
|
293
|
+
echo 1>&2 "\
|
|
294
|
+
WARNING: \`$1' is $msg. You should only need it if
|
|
295
|
+
you modified a \`.texi' or \`.texinfo' file, or any other file
|
|
296
|
+
indirectly affecting the aspect of the manual. The spurious
|
|
297
|
+
call might also be the consequence of using a buggy \`make' (AIX,
|
|
298
|
+
DU, IRIX). You might want to install the \`Texinfo' package or
|
|
299
|
+
the \`GNU make' package. Grab either from any GNU archive site."
|
|
300
|
+
# The file to touch is that specified with -o ...
|
|
301
|
+
file=`echo "$*" | sed -n "$sed_output"`
|
|
302
|
+
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
|
303
|
+
if test -z "$file"; then
|
|
304
|
+
# ... or it is the one specified with @setfilename ...
|
|
305
|
+
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
|
306
|
+
file=`sed -n '
|
|
307
|
+
/^@setfilename/{
|
|
308
|
+
s/.* \([^ ]*\) *$/\1/
|
|
309
|
+
p
|
|
310
|
+
q
|
|
311
|
+
}' $infile`
|
|
312
|
+
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
|
313
|
+
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
|
314
|
+
fi
|
|
315
|
+
# If the file does not exist, the user really needs makeinfo;
|
|
316
|
+
# let's fail without touching anything.
|
|
317
|
+
test -f $file || exit 1
|
|
318
|
+
touch $file
|
|
319
|
+
;;
|
|
320
|
+
|
|
321
|
+
tar*)
|
|
322
|
+
shift
|
|
323
|
+
|
|
324
|
+
# We have already tried tar in the generic part.
|
|
325
|
+
# Look for gnutar/gtar before invocation to avoid ugly error
|
|
326
|
+
# messages.
|
|
327
|
+
if (gnutar --version > /dev/null 2>&1); then
|
|
328
|
+
gnutar "$@" && exit 0
|
|
329
|
+
fi
|
|
330
|
+
if (gtar --version > /dev/null 2>&1); then
|
|
331
|
+
gtar "$@" && exit 0
|
|
332
|
+
fi
|
|
333
|
+
firstarg="$1"
|
|
334
|
+
if shift; then
|
|
335
|
+
case $firstarg in
|
|
336
|
+
*o*)
|
|
337
|
+
firstarg=`echo "$firstarg" | sed s/o//`
|
|
338
|
+
tar "$firstarg" "$@" && exit 0
|
|
339
|
+
;;
|
|
340
|
+
esac
|
|
341
|
+
case $firstarg in
|
|
342
|
+
*h*)
|
|
343
|
+
firstarg=`echo "$firstarg" | sed s/h//`
|
|
344
|
+
tar "$firstarg" "$@" && exit 0
|
|
345
|
+
;;
|
|
346
|
+
esac
|
|
347
|
+
fi
|
|
348
|
+
|
|
349
|
+
echo 1>&2 "\
|
|
350
|
+
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
|
351
|
+
You may want to install GNU tar or Free paxutils, or check the
|
|
352
|
+
command line arguments."
|
|
353
|
+
exit 1
|
|
354
|
+
;;
|
|
355
|
+
|
|
356
|
+
*)
|
|
357
|
+
echo 1>&2 "\
|
|
358
|
+
WARNING: \`$1' is needed, and is $msg.
|
|
359
|
+
You might have modified some files without having the
|
|
360
|
+
proper tools for further handling them. Check the \`README' file,
|
|
361
|
+
it often tells you about the needed prerequisites for installing
|
|
362
|
+
this package. You may also peek at any GNU archive site, in case
|
|
363
|
+
some other package would contain this missing \`$1' program."
|
|
364
|
+
exit 1
|
|
365
|
+
;;
|
|
366
|
+
esac
|
|
367
|
+
|
|
368
|
+
exit 0
|
|
369
|
+
|
|
370
|
+
# Local variables:
|
|
371
|
+
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
372
|
+
# time-stamp-start: "scriptversion="
|
|
373
|
+
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
374
|
+
# time-stamp-time-zone: "UTC"
|
|
375
|
+
# time-stamp-end: "; # UTC"
|
|
376
|
+
# End:
|
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
|
|
3
|
+
# Copyright (C) 2009 Sun Microsystems, Inc.
|
|
4
|
+
# Copyright (C) 2010, 2011 Monty Taylor
|
|
5
|
+
#
|
|
6
|
+
# This program is free software; you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
|
8
|
+
# the Free Software Foundation; version 2 of the License.
|
|
9
|
+
#
|
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
# GNU General Public License for more details.
|
|
14
|
+
#
|
|
15
|
+
# You should have received a copy of the GNU General Public License
|
|
16
|
+
# along with this program; if not, write to the Free Software
|
|
17
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
18
|
+
|
|
19
|
+
pandora_plugin_file = 'config/pandora-plugin.ini'
|
|
20
|
+
|
|
21
|
+
# Find plugins in the tree and add them to the build system
|
|
22
|
+
|
|
23
|
+
import ConfigParser, os, sys
|
|
24
|
+
import datetime, time
|
|
25
|
+
import subprocess
|
|
26
|
+
|
|
27
|
+
plugin_am_file=None
|
|
28
|
+
plugin_ac_file=None
|
|
29
|
+
plugin_doc_index=None
|
|
30
|
+
|
|
31
|
+
class ChangeProtectedFile(object):
|
|
32
|
+
|
|
33
|
+
def __init__(self, fname):
|
|
34
|
+
self.bogus_file= False
|
|
35
|
+
self.real_fname= fname
|
|
36
|
+
self.new_fname= "%s.new" % fname
|
|
37
|
+
try:
|
|
38
|
+
self.new_file= open(self.new_fname,'w+')
|
|
39
|
+
except IOError:
|
|
40
|
+
self.bogus_file= True
|
|
41
|
+
|
|
42
|
+
def write(self, text):
|
|
43
|
+
if not self.bogus_file:
|
|
44
|
+
self.new_file.write(text)
|
|
45
|
+
|
|
46
|
+
# We've written all of this out into .new files, now we only copy them
|
|
47
|
+
# over the old ones if they are different, so that we don't cause
|
|
48
|
+
# unnecessary recompiles
|
|
49
|
+
def close(self):
|
|
50
|
+
"""Return True if the file had changed."""
|
|
51
|
+
if self.bogus_file:
|
|
52
|
+
return
|
|
53
|
+
self.new_file.seek(0)
|
|
54
|
+
new_content = self.new_file.read()
|
|
55
|
+
self.new_file.close()
|
|
56
|
+
try:
|
|
57
|
+
old_file = file(self.real_fname, 'r')
|
|
58
|
+
old_content = old_file.read()
|
|
59
|
+
old_file.close()
|
|
60
|
+
except IOError:
|
|
61
|
+
old_content = None
|
|
62
|
+
if new_content != old_content:
|
|
63
|
+
if old_content != None:
|
|
64
|
+
os.unlink(self.real_fname)
|
|
65
|
+
os.rename(self.new_fname, self.real_fname)
|
|
66
|
+
return True
|
|
67
|
+
else:
|
|
68
|
+
try:
|
|
69
|
+
os.unlink(self.new_fname)
|
|
70
|
+
except:
|
|
71
|
+
pass
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def write_external_configure(plugin, plugin_file):
|
|
75
|
+
"""Write the initial bits of the configure.ac file"""
|
|
76
|
+
if not os.path.exists('m4'):
|
|
77
|
+
os.mkdir('m4')
|
|
78
|
+
plugin_file.write("""
|
|
79
|
+
AC_PREREQ(2.59)dnl Minimum Autoconf version required.
|
|
80
|
+
AC_INIT([%(name)s],[%(version)s],[%(url)s])
|
|
81
|
+
AC_CONFIG_SRCDIR([%(main_source)s])
|
|
82
|
+
AC_CONFIG_AUX_DIR(config)
|
|
83
|
+
|
|
84
|
+
PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, require-cxx, force-gcc42,skip-visibility)
|
|
85
|
+
|
|
86
|
+
PANDORA_REQUIRE_LIBPROTOBUF
|
|
87
|
+
PANDORA_PROTOBUF_REQUIRE_VERSION([2.1.0])
|
|
88
|
+
PANDORA_REQUIRE_PROTOC
|
|
89
|
+
|
|
90
|
+
AC_LANG_PUSH(C++)
|
|
91
|
+
PANDORA_REQUIRE_PTHREAD
|
|
92
|
+
PANDORA_REQUIRE_LIBDL
|
|
93
|
+
AC_LANG_POP
|
|
94
|
+
|
|
95
|
+
PANDORA_USE_BETTER_MALLOC
|
|
96
|
+
|
|
97
|
+
PANDORA_DRIZZLE_BUILD
|
|
98
|
+
""" % plugin)
|
|
99
|
+
|
|
100
|
+
write_plugin_ac(plugin, plugin_file)
|
|
101
|
+
|
|
102
|
+
plugin_file.write("""
|
|
103
|
+
AC_CONFIG_FILES(Makefile)
|
|
104
|
+
|
|
105
|
+
AC_OUTPUT
|
|
106
|
+
|
|
107
|
+
echo "---"
|
|
108
|
+
echo "Configuration summary for $PACKAGE_NAME version $VERSION $PANDORA_RELEASE_COMMENT"
|
|
109
|
+
echo ""
|
|
110
|
+
echo " * Installation prefix: $prefix"
|
|
111
|
+
echo " * System type: $host_vendor-$host_os"
|
|
112
|
+
echo " * Host CPU: $host_cpu"
|
|
113
|
+
echo " * C Compiler: $CC_VERSION"
|
|
114
|
+
echo " * C++ Compiler: $CXX_VERSION"
|
|
115
|
+
echo " * Debug enabled: $with_debug"
|
|
116
|
+
echo " * Warnings as failure: $ac_cv_warnings_as_errors"
|
|
117
|
+
echo " * C++ cstdint location: $ac_cv_cxx_cstdint"
|
|
118
|
+
echo " * C++ hash_map location: $ac_cv_cxx_hash_map"
|
|
119
|
+
echo " * C++ hash namespace: $ac_cv_cxx_hash_namespace"
|
|
120
|
+
echo " * C++ shared_ptr namespace: $ac_cv_shared_ptr_namespace"
|
|
121
|
+
echo ""
|
|
122
|
+
echo "---"
|
|
123
|
+
|
|
124
|
+
""" % plugin)
|
|
125
|
+
|
|
126
|
+
def write_external_makefile(plugin, plugin_file):
|
|
127
|
+
|
|
128
|
+
plugin_file.write("""
|
|
129
|
+
ACLOCAL_AMFLAGS = -I m4 --force
|
|
130
|
+
VERSION=$(PANDORA_RELEASE_VERSION)
|
|
131
|
+
|
|
132
|
+
pkgplugindir=%(pkgplugindir)s
|
|
133
|
+
EXTRA_DIST = plugin.ini
|
|
134
|
+
|
|
135
|
+
noinst_HEADERS=
|
|
136
|
+
nobase_include_HEADERS=
|
|
137
|
+
nobase_pkginclude_HEADERS=
|
|
138
|
+
check_PROGRAMS=
|
|
139
|
+
noinst_LTLIBRARIES=
|
|
140
|
+
bin_PROGRAMS=
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
""" % plugin)
|
|
144
|
+
if plugin['headers'] != "":
|
|
145
|
+
plugin_file.write("noinst_HEADERS += %(headers)s\n" % plugin)
|
|
146
|
+
if plugin['install_headers'] != "":
|
|
147
|
+
plugin_file.write("nobase_pkginclude_HEADERS += %(install_headers)s\n" % plugin)
|
|
148
|
+
if plugin['testsuite']:
|
|
149
|
+
if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
|
|
150
|
+
plugin_file.write("EXTRA_DIST += %(testsuitedir)s\n" % plugin)
|
|
151
|
+
plugin_file.write("""
|
|
152
|
+
pkgplugin_LTLIBRARIES=%(libname)s.la
|
|
153
|
+
%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
|
|
154
|
+
%(libname)s_la_LIBADD=%(libs)s
|
|
155
|
+
%(libname)s_la_DEPENDENCIES=%(libs)s
|
|
156
|
+
%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s %(cppflags)s
|
|
157
|
+
%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
|
|
158
|
+
%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
|
|
159
|
+
%(libname)s_la_SOURCES=%(sources)s
|
|
160
|
+
check_PROGRAMS += %(tests)s
|
|
161
|
+
""" % plugin)
|
|
162
|
+
plugin_am_file=os.path.join(plugin['rel_path'],'plugin.am')
|
|
163
|
+
if os.path.exists(plugin_am_file):
|
|
164
|
+
plugin_file.write('include %s\n' % plugin_am_file)
|
|
165
|
+
|
|
166
|
+
def write_external_plugin():
|
|
167
|
+
"""Return True if the plugin had changed."""
|
|
168
|
+
plugin = read_plugin_ini('.')
|
|
169
|
+
expand_plugin_ini(plugin)
|
|
170
|
+
plugin_file = ChangeProtectedFile('configure.ac')
|
|
171
|
+
write_external_configure(plugin, plugin_file)
|
|
172
|
+
result = plugin_file.close()
|
|
173
|
+
plugin_file = ChangeProtectedFile('Makefile.am')
|
|
174
|
+
write_external_makefile(plugin, plugin_file)
|
|
175
|
+
# Write some stub configure.ac and Makefile.am files that include the above
|
|
176
|
+
result = plugin_file.close() or result
|
|
177
|
+
return result
|
|
178
|
+
|
|
179
|
+
def write_plugin(plugin, plugin_ini_list):
|
|
180
|
+
# Since this function is recursive, make sure we're not already in it.
|
|
181
|
+
if plugin.has_key('writing_status'):
|
|
182
|
+
if plugin['writing_status'] == 'done':
|
|
183
|
+
return
|
|
184
|
+
else:
|
|
185
|
+
print "Dependency loop detected with %s" % plugin['name']
|
|
186
|
+
exit(1)
|
|
187
|
+
|
|
188
|
+
plugin['writing_status'] = 'dependencies'
|
|
189
|
+
|
|
190
|
+
# Write all dependencies first to get around annoying automake bug
|
|
191
|
+
for dependency in plugin['dependency_list']:
|
|
192
|
+
found = False
|
|
193
|
+
for find_plugin in plugin_ini_list:
|
|
194
|
+
if find_plugin['module_name'] == dependency:
|
|
195
|
+
found = True
|
|
196
|
+
write_plugin(find_plugin, plugin_ini_list)
|
|
197
|
+
break
|
|
198
|
+
if found is False:
|
|
199
|
+
print "Could not find dependency %s: %s" % (plugin['name'], dependency)
|
|
200
|
+
exit(1)
|
|
201
|
+
|
|
202
|
+
write_plugin_ac(plugin, plugin_ac_file)
|
|
203
|
+
write_plugin_am(plugin, plugin_am_file)
|
|
204
|
+
write_plugin_docs(plugin, plugin_doc_index, plugin_am_file)
|
|
205
|
+
plugin['writing_status'] = 'done'
|
|
206
|
+
|
|
207
|
+
def write_plugin_docs(plugin, doc_index, plugin_am):
|
|
208
|
+
if plugin['docs'] is not None and os.path.isdir("docs/plugins"):
|
|
209
|
+
if not os.path.exists(os.path.join("docs/plugins",plugin["name"])):
|
|
210
|
+
os.symlink(os.path.abspath(plugin["docs"]), os.path.join("docs/plugins",plugin["name"]))
|
|
211
|
+
doc_index.write("""
|
|
212
|
+
%(name)s/index""" % plugin)
|
|
213
|
+
plugin_am.write("""
|
|
214
|
+
EXTRA_DIST+=${top_srcdir}/docs/plugins/%(name)s/*.rst
|
|
215
|
+
""" % plugin)
|
|
216
|
+
|
|
217
|
+
def write_plugin_ac(plugin, plugin_ac):
|
|
218
|
+
#
|
|
219
|
+
# Write plugin config instructions into plugin.ac file.
|
|
220
|
+
#
|
|
221
|
+
plugin_ac_file=os.path.join(plugin['rel_path'],'plugin.ac')
|
|
222
|
+
plugin_m4_dir=os.path.join(plugin['rel_path'],'m4')
|
|
223
|
+
plugin_m4_files=[]
|
|
224
|
+
if os.path.exists(plugin_m4_dir) and os.path.isdir(plugin_m4_dir):
|
|
225
|
+
for m4_file in os.listdir(plugin_m4_dir):
|
|
226
|
+
if os.path.splitext(m4_file)[-1] == '.m4':
|
|
227
|
+
plugin_m4_files.append(os.path.join(plugin['rel_path'], m4_file))
|
|
228
|
+
plugin_ac.write("""
|
|
229
|
+
dnl Config for %(title)s
|
|
230
|
+
""" % plugin)
|
|
231
|
+
for m4_file in plugin_m4_files:
|
|
232
|
+
plugin_ac.write('m4_sinclude([%s])\n' % m4_file)
|
|
233
|
+
plugin['plugin_dep_libs']=" ".join(["\${top_builddir}/%s" % f for f in plugin['libs'].split()])
|
|
234
|
+
|
|
235
|
+
plugin_ac.write("""
|
|
236
|
+
AC_ARG_WITH([%(name_with_dashes)s-plugin],[
|
|
237
|
+
dnl indented wierd to make the help output correct
|
|
238
|
+
AS_HELP_STRING([--with-%(name_with_dashes)s-plugin],[Build %(title)s. @<:@default=%(enabled)s@:>@])
|
|
239
|
+
AS_HELP_STRING([--without-%(name_with_dashes)s-plugin],[Disable building %(title)s])
|
|
240
|
+
],[
|
|
241
|
+
with_%(name)s_plugin="$withval"
|
|
242
|
+
AS_IF([test "x$with_%(name)s_plugin" = "xyes"],[
|
|
243
|
+
requested_%(name)s_plugin="yes"
|
|
244
|
+
],[
|
|
245
|
+
requested_%(name)s_plugin="no"
|
|
246
|
+
])
|
|
247
|
+
],[
|
|
248
|
+
with_%(name)s_plugin="%(enabled)s"
|
|
249
|
+
requested_%(name)s_plugin="no"
|
|
250
|
+
])
|
|
251
|
+
AC_ARG_WITH([static-%(name_with_dashes)s-plugin],[
|
|
252
|
+
AS_HELP_STRING([--with-static-%(name_with_dashes)s-plugin],[Build Archive Storage Engine. @<:@default=%(static_yesno)s@:>@])
|
|
253
|
+
AS_HELP_STRING([--without-static-%(name_with_dashes)s-plugin],[Disable building Archive Storage Engine])
|
|
254
|
+
],[
|
|
255
|
+
with_static_%(name)s_plugin=${withval}
|
|
256
|
+
],[
|
|
257
|
+
with_static_%(name)s_plugin=%(static_yesno)s
|
|
258
|
+
])
|
|
259
|
+
AS_IF([test "x${with_static_%(name)s_plugin}" = "xyes" -o "x${with_all_static}" = "xyes"],[
|
|
260
|
+
shared_%(name)s_plugin=no
|
|
261
|
+
],[
|
|
262
|
+
shared_%(name)s_plugin=yes
|
|
263
|
+
])
|
|
264
|
+
AC_ARG_ENABLE([%(name_with_dashes)s-plugin],[
|
|
265
|
+
dnl indented wierd to make the help output correct
|
|
266
|
+
AS_HELP_STRING([--enable-%(name_with_dashes)s-plugin],[Enable loading %(title)s by default. @<:@default=%(default_yesno)s@:>@])
|
|
267
|
+
AS_HELP_STRING([--disable-%(name_with_dashes)s-plugin],[Disable loading %(title)s by default.])
|
|
268
|
+
],
|
|
269
|
+
[enable_%(name)s_plugin="$enableval"],
|
|
270
|
+
[enable_%(name)s_plugin=%(default_yesno)s])
|
|
271
|
+
|
|
272
|
+
""" % plugin)
|
|
273
|
+
if os.path.exists(plugin_ac_file):
|
|
274
|
+
plugin_ac.write('m4_sinclude([%s])\n' % plugin_ac_file)
|
|
275
|
+
# The plugin author has specified some check to make to determine
|
|
276
|
+
# if the plugin can be built. If the plugin is turned on and this
|
|
277
|
+
# check fails, then configure should error out. If the plugin is not
|
|
278
|
+
# turned on, then the normal conditional build stuff should just let
|
|
279
|
+
# it silently not build
|
|
280
|
+
if plugin['has_build_conditional']:
|
|
281
|
+
plugin_ac.write("""
|
|
282
|
+
AS_IF([test %(build_conditional)s],
|
|
283
|
+
[], dnl build_conditional can only negate
|
|
284
|
+
[
|
|
285
|
+
AS_IF([test "x${requested_%(name)s_plugin}" = "xyes"],
|
|
286
|
+
[AC_MSG_ERROR([Plugin %(name)s was explicitly requested, yet failed build dependency checks. Aborting!])])
|
|
287
|
+
with_%(name)s_plugin=no
|
|
288
|
+
])
|
|
289
|
+
|
|
290
|
+
""" % plugin)
|
|
291
|
+
if not plugin['unconditional']:
|
|
292
|
+
plugin_ac.write("""
|
|
293
|
+
AM_CONDITIONAL([%(static_build_conditional_tag)s],
|
|
294
|
+
[test %(build_conditional)s -a ! %(shared_build)s])
|
|
295
|
+
AM_CONDITIONAL([%(shared_build_conditional_tag)s],
|
|
296
|
+
[test %(build_conditional)s -a %(shared_build)s])
|
|
297
|
+
AM_CONDITIONAL([%(build_conditional_tag)s],
|
|
298
|
+
[test %(build_conditional)s])
|
|
299
|
+
""" % plugin)
|
|
300
|
+
|
|
301
|
+
plugin_ac.write("""
|
|
302
|
+
AS_IF([test "x$with_%(name)s_plugin" = "xyes"],[
|
|
303
|
+
""" % plugin)
|
|
304
|
+
if plugin['testsuite']:
|
|
305
|
+
plugin_ac.write("""
|
|
306
|
+
pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}"
|
|
307
|
+
""" % plugin)
|
|
308
|
+
plugin_ac.write("""
|
|
309
|
+
AS_IF([test "x${with_static_%(name)s_plugin}" = "xyes" -o "x${with_all_static}" = "xyes"],[
|
|
310
|
+
|
|
311
|
+
AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
|
|
312
|
+
pandora_builtin_load_list="%(module_name)s,${pandora_builtin_load_list}"
|
|
313
|
+
pandora_builtin_load_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_load_symbols_list}"
|
|
314
|
+
PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} %(plugin_dep_libs)s"
|
|
315
|
+
])
|
|
316
|
+
pandora_builtin_list="%(module_name)s,${pandora_builtin_list}"
|
|
317
|
+
pandora_builtin_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_symbols_list}"
|
|
318
|
+
pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/%(root_plugin_dir)s/%(libname)s.la"
|
|
319
|
+
],[
|
|
320
|
+
AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
|
|
321
|
+
pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
|
|
322
|
+
])
|
|
323
|
+
])
|
|
324
|
+
""" % plugin)
|
|
325
|
+
plugin_ac.write("])\n")
|
|
326
|
+
|
|
327
|
+
def fix_file_paths(plugin, files):
|
|
328
|
+
# TODO: determine path to plugin dir relative to top_srcdir... append it to
|
|
329
|
+
# source files if they don't already have it
|
|
330
|
+
new_files=""
|
|
331
|
+
if plugin['plugin_dir'] != ".":
|
|
332
|
+
for file in files.split():
|
|
333
|
+
if not file.startswith(plugin['rel_path']):
|
|
334
|
+
file= os.path.join(plugin['rel_path'], file)
|
|
335
|
+
new_files= "%s %s" % (new_files, file)
|
|
336
|
+
else:
|
|
337
|
+
new_files= " ".join(plugin['sources'].split())
|
|
338
|
+
if new_files != "":
|
|
339
|
+
return new_files
|
|
340
|
+
return files
|
|
341
|
+
|
|
342
|
+
def expand_plugin_ini(plugin):
|
|
343
|
+
if plugin['name'] == "**OUT-OF-TREE**":
|
|
344
|
+
print "Out of tree plugins require the name field to be specified in plugin.ini"
|
|
345
|
+
sys.exit(1)
|
|
346
|
+
|
|
347
|
+
if plugin['plugin_dir'] == ".":
|
|
348
|
+
plugin['rel_path']= plugin['plugin_dir']
|
|
349
|
+
plugin['unconditional']=True
|
|
350
|
+
else:
|
|
351
|
+
plugin['rel_path']= plugin['plugin_dir'][len(config['top_srcdir'])+len(os.path.sep):]
|
|
352
|
+
plugin['unconditional']=False
|
|
353
|
+
|
|
354
|
+
plugin['sources']= fix_file_paths(plugin, plugin['sources'])
|
|
355
|
+
plugin['main_source']= plugin['sources'].split()[0]
|
|
356
|
+
plugin['headers']= fix_file_paths(plugin, plugin['headers'])
|
|
357
|
+
plugin['install_headers']= fix_file_paths(plugin, plugin['install_headers'])
|
|
358
|
+
plugin['tests']= fix_file_paths(plugin, plugin['tests'])
|
|
359
|
+
|
|
360
|
+
# Make a yes/no version for autoconf help messages
|
|
361
|
+
if plugin['load_by_default']:
|
|
362
|
+
plugin['default_yesno']="yes"
|
|
363
|
+
else:
|
|
364
|
+
plugin['default_yesno']="no"
|
|
365
|
+
|
|
366
|
+
if plugin.has_key('extra_dist'):
|
|
367
|
+
plugin['extra_dist']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['extra_dist'].split()])
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
if plugin['static']:
|
|
371
|
+
plugin['static_yesno']="yes"
|
|
372
|
+
else:
|
|
373
|
+
plugin['static_yesno']="no"
|
|
374
|
+
plugin['build_conditional_tag']= "BUILD_%s_PLUGIN" % plugin['name'].upper()
|
|
375
|
+
plugin['shared_build_conditional_tag']= "BUILD_%s_PLUGIN_SHARED" % plugin['name'].upper()
|
|
376
|
+
plugin['static_build_conditional_tag']= "BUILD_%s_PLUGIN_STATIC" % plugin['name'].upper()
|
|
377
|
+
plugin['name_with_dashes']= plugin['name'].replace('_','-')
|
|
378
|
+
if plugin.has_key('build_conditional'):
|
|
379
|
+
plugin['has_build_conditional']=True
|
|
380
|
+
plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes" -a %(build_conditional)s' % plugin
|
|
381
|
+
else:
|
|
382
|
+
plugin['has_build_conditional']=False
|
|
383
|
+
plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes"' %plugin
|
|
384
|
+
plugin['shared_build']='"x${shared_%(name)s_plugin}" = "xyes"' %plugin
|
|
385
|
+
|
|
386
|
+
if plugin['install']:
|
|
387
|
+
plugin['library_type']= 'pkgplugin'
|
|
388
|
+
else:
|
|
389
|
+
plugin['library_type']= 'noinst'
|
|
390
|
+
|
|
391
|
+
def find_testsuite(plugin_dir):
|
|
392
|
+
for testdir in ['drizzle-tests','tests']:
|
|
393
|
+
if os.path.isdir(os.path.join(plugin_dir,testdir)):
|
|
394
|
+
return testdir
|
|
395
|
+
if os.path.isdir(os.path.join('tests','suite',os.path.basename(plugin_dir))):
|
|
396
|
+
return ""
|
|
397
|
+
return None
|
|
398
|
+
|
|
399
|
+
def find_docs(plugin_dir):
|
|
400
|
+
if os.path.isfile(os.path.join(plugin_dir, "docs", "index.rst")):
|
|
401
|
+
return os.path.join(plugin_dir, "docs")
|
|
402
|
+
|
|
403
|
+
def read_plugin_ini(plugin_dir):
|
|
404
|
+
sources_default=""
|
|
405
|
+
if plugin_dir == ".":
|
|
406
|
+
plugin_name="**OUT-OF-TREE**"
|
|
407
|
+
module_name="**OUT-OF-TREE**"
|
|
408
|
+
else:
|
|
409
|
+
sources_default="%s.cc" % os.path.basename(plugin_dir)
|
|
410
|
+
plugin_name = plugin_dir[plugin_dir.index(config['root_plugin_dir']) + len(config['root_plugin_dir']) + 1:]
|
|
411
|
+
module_name = plugin_name.replace("/", config['module_name_separator']).replace("\\", config['module_name_separator'])
|
|
412
|
+
plugin_name = plugin_name.replace("/", config['plugin_name_separator']).replace("\\", config['plugin_name_separator'])
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
plugin_file= os.path.join(plugin_dir,config['plugin_ini_fname'])
|
|
416
|
+
plugin_defaults= dict(sources=sources_default,
|
|
417
|
+
headers="",
|
|
418
|
+
install_headers="",
|
|
419
|
+
cflags="",
|
|
420
|
+
cppflags="",
|
|
421
|
+
cxxflags="",
|
|
422
|
+
libs="",
|
|
423
|
+
ldflags="",
|
|
424
|
+
author="",
|
|
425
|
+
title="",
|
|
426
|
+
description="",
|
|
427
|
+
license="PLUGIN_LICENSE_GPL",
|
|
428
|
+
name=plugin_name,
|
|
429
|
+
module_name=module_name,
|
|
430
|
+
load_by_default=config['default_load_by_default'],
|
|
431
|
+
disabled="False",
|
|
432
|
+
static="False",
|
|
433
|
+
dependencies="",
|
|
434
|
+
dependency_aliases="",
|
|
435
|
+
tests="",
|
|
436
|
+
install=config['default_install'])
|
|
437
|
+
parser=ConfigParser.ConfigParser(defaults= plugin_defaults)
|
|
438
|
+
parser.read(plugin_file)
|
|
439
|
+
plugin=dict(parser.items('plugin'))
|
|
440
|
+
plugin['plugin_dir'] = plugin_dir
|
|
441
|
+
if plugin_dir == '.':
|
|
442
|
+
if not plugin.has_key('url'):
|
|
443
|
+
print "External Plugins are required to specifiy a url"
|
|
444
|
+
plugin['url']= 'http://launchpad.net/%(name)s' % plugin
|
|
445
|
+
sys.exit(1)
|
|
446
|
+
if plugin_dir == '.' and not plugin.has_key('version'):
|
|
447
|
+
print "External Plugins are required to specifiy a version"
|
|
448
|
+
sys.exit(1)
|
|
449
|
+
if not plugin.has_key('version'):
|
|
450
|
+
plugin['version'] = config['default_plugin_version']
|
|
451
|
+
if plugin.has_key('load_by_default'):
|
|
452
|
+
plugin['load_by_default']=parser.getboolean('plugin','load_by_default')
|
|
453
|
+
if plugin.has_key('disabled'):
|
|
454
|
+
plugin['disabled']=parser.getboolean('plugin','disabled')
|
|
455
|
+
if plugin['disabled']:
|
|
456
|
+
plugin['enabled']="no"
|
|
457
|
+
else:
|
|
458
|
+
plugin['enabled']="yes"
|
|
459
|
+
if plugin.has_key('static'):
|
|
460
|
+
try:
|
|
461
|
+
plugin['static']= parser.getboolean('plugin','static')
|
|
462
|
+
except:
|
|
463
|
+
if plugin['static'][:5] == os.sys.platform[:5]:
|
|
464
|
+
plugin['static']= True
|
|
465
|
+
else:
|
|
466
|
+
plugin['static']= False
|
|
467
|
+
if plugin.has_key('install'):
|
|
468
|
+
plugin['install']= parser.getboolean('plugin','install')
|
|
469
|
+
if plugin.has_key('testsuite'):
|
|
470
|
+
if plugin['testsuite'] == 'disable':
|
|
471
|
+
plugin['testsuite']= False
|
|
472
|
+
plugin['dist_testsuite']= find_testsuite(plugin_dir)
|
|
473
|
+
else:
|
|
474
|
+
plugin_testsuite= find_testsuite(plugin_dir)
|
|
475
|
+
plugin['testsuitedir']=plugin_testsuite
|
|
476
|
+
if plugin_testsuite is not None:
|
|
477
|
+
plugin['testsuite']=True
|
|
478
|
+
else:
|
|
479
|
+
plugin['testsuite']=False
|
|
480
|
+
plugin['docs']= find_docs(plugin_dir)
|
|
481
|
+
|
|
482
|
+
plugin['cflags']+= ' ' + config['extra_cflags']
|
|
483
|
+
plugin['cppflags']+= ' ' + config['extra_cppflags']
|
|
484
|
+
plugin['cxxflags']+= ' ' + config['extra_cxxflags']
|
|
485
|
+
|
|
486
|
+
plugin['libname']= "lib%s%s%s" % (config['plugin_prefix'],
|
|
487
|
+
plugin['name'],
|
|
488
|
+
config['plugin_suffix'])
|
|
489
|
+
if config['force_lowercase_libname']:
|
|
490
|
+
plugin['libname']= plugin['libname'].lower()
|
|
491
|
+
|
|
492
|
+
plugin['root_plugin_dir']= config['root_plugin_dir']
|
|
493
|
+
plugin['plugin_prefix']= config['plugin_prefix']
|
|
494
|
+
plugin['plugin_suffix']= config['plugin_suffix']
|
|
495
|
+
plugin['pkgplugindir']= config['pkgplugindir']
|
|
496
|
+
|
|
497
|
+
# Dependencies must have a module but dependency aliases are simply added
|
|
498
|
+
# to the variable passed during compile.
|
|
499
|
+
plugin['dependency_list'] = plugin['dependencies'].split()
|
|
500
|
+
dependency_aliases = plugin['dependency_aliases'].split()
|
|
501
|
+
plugin['dependencies'] = ','.join(plugin['dependency_list'] +
|
|
502
|
+
plugin['dependency_aliases'].split())
|
|
503
|
+
dependency_libs = ["%s/lib%s%s.la" % (config['root_plugin_dir'],
|
|
504
|
+
dependency.lower().replace('::', '_'),
|
|
505
|
+
config['plugin_suffix'])
|
|
506
|
+
for dependency in plugin['dependency_list']]
|
|
507
|
+
plugin['libs'] = " ".join(plugin['libs'].split() + dependency_libs);
|
|
508
|
+
|
|
509
|
+
# Libtool is going to expand:
|
|
510
|
+
# -DPANDORA_MODULE_AUTHOR='"Padraig O'"'"'Sullivan"'
|
|
511
|
+
# to:
|
|
512
|
+
# "-DPANDORA_MODULE_AUTHOR=\"Padraig O'Sullivan\""
|
|
513
|
+
# So we have to replace internal ''s to '"'"'
|
|
514
|
+
for key in ('author','title','description','version'):
|
|
515
|
+
plugin[key]=plugin[key].replace('"','\\"')
|
|
516
|
+
plugin[key]=plugin[key].replace("'","'\"'\"'")
|
|
517
|
+
return plugin
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
def write_plugin_am(plugin, plugin_am):
|
|
521
|
+
"""Write an automake fragment for this plugin.
|
|
522
|
+
|
|
523
|
+
:param plugin: The plugin dict.
|
|
524
|
+
:param plugin_am: The file to write to.
|
|
525
|
+
"""
|
|
526
|
+
# The .plugin.ini.stamp avoids changing the datestamp on plugin.ini which can
|
|
527
|
+
# confuse VCS systems.
|
|
528
|
+
plugin_am.write("""
|
|
529
|
+
EXTRA_DIST += %(rel_path)s/plugin.ini
|
|
530
|
+
|
|
531
|
+
# Prevent errors when a plugin dir is removed
|
|
532
|
+
%(rel_path)s/plugin.ini:
|
|
533
|
+
|
|
534
|
+
""" % plugin)
|
|
535
|
+
if plugin.has_key('extra_dist') and plugin['extra_dist'] != "":
|
|
536
|
+
plugin_am.write("EXTRA_DIST += %(extra_dist)s\n" % plugin)
|
|
537
|
+
if plugin['headers'] != "":
|
|
538
|
+
plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin)
|
|
539
|
+
if plugin['install_headers'] != "":
|
|
540
|
+
plugin_am.write("nobase_pkginclude_HEADERS += %(install_headers)s\n" % plugin)
|
|
541
|
+
if plugin['testsuite']:
|
|
542
|
+
if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
|
|
543
|
+
plugin_am.write("EXTRA_DIST += %(rel_path)s/%(testsuitedir)s\n" % plugin)
|
|
544
|
+
if plugin.has_key('dist_testsuite') and plugin['dist_testsuite'] != "":
|
|
545
|
+
plugin_am.write("EXTRA_DIST += %(rel_path)s/%(dist_testsuite)s\n" % plugin)
|
|
546
|
+
if plugin['docs'] is not None:
|
|
547
|
+
plugin_am.write("EXTRA_DIST += ${top_srcdir}/%(rel_path)s/docs/*.rst\n" % plugin)
|
|
548
|
+
plugin_am.write("""
|
|
549
|
+
%(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
|
|
550
|
+
# Include sources in EXTRA_DIST because we might not build this, but we
|
|
551
|
+
# still want the sources to wind up in a tarball
|
|
552
|
+
EXTRA_DIST += %(rel_path)s/plugin.ini %(sources)s
|
|
553
|
+
if %(static_build_conditional_tag)s
|
|
554
|
+
noinst_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
|
|
555
|
+
%(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
|
|
556
|
+
%(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
|
|
557
|
+
%(root_plugin_dir)s_%(libname)s_la_LDFLAGS=$(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
|
|
558
|
+
%(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='%(dependencies)s' %(cppflags)s
|
|
559
|
+
%(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
|
|
560
|
+
%(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
|
|
561
|
+
%(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
|
|
562
|
+
check_PROGRAMS += %(tests)s
|
|
563
|
+
PANDORA_DYNAMIC_LDADDS+=${top_builddir}/%(root_plugin_dir)s/%(libname)s.la
|
|
564
|
+
endif
|
|
565
|
+
EXTRA_DIST += %(rel_path)s/plugin.ini
|
|
566
|
+
if %(shared_build_conditional_tag)s
|
|
567
|
+
%(library_type)s_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
|
|
568
|
+
%(root_plugin_dir)s_%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
|
|
569
|
+
%(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
|
|
570
|
+
%(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
|
|
571
|
+
%(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='%(dependencies)s' %(cppflags)s
|
|
572
|
+
%(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
|
|
573
|
+
%(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
|
|
574
|
+
%(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
|
|
575
|
+
check_PROGRAMS += %(tests)s
|
|
576
|
+
endif
|
|
577
|
+
""" % plugin)
|
|
578
|
+
plugin_am_file=os.path.join(plugin['rel_path'],'plugin.am')
|
|
579
|
+
if os.path.exists(plugin_am_file):
|
|
580
|
+
plugin_am.write('include %s\n' % plugin_am_file)
|
|
581
|
+
|
|
582
|
+
#
|
|
583
|
+
# MAIN STARTS HERE:
|
|
584
|
+
#
|
|
585
|
+
|
|
586
|
+
# Parse the pandora-plugin config file
|
|
587
|
+
|
|
588
|
+
config_defaults= dict(
|
|
589
|
+
top_srcdir='.',
|
|
590
|
+
top_builddir='.',
|
|
591
|
+
plugin_ini_fname='plugin.ini',
|
|
592
|
+
plugin_prefix='',
|
|
593
|
+
plugin_suffix='',
|
|
594
|
+
extra_cflags='',
|
|
595
|
+
extra_cppflags='',
|
|
596
|
+
extra_cxxflags='',
|
|
597
|
+
root_plugin_dir='',
|
|
598
|
+
pkgplugindir='',
|
|
599
|
+
default_install='True',
|
|
600
|
+
default_plugin_version='',
|
|
601
|
+
default_load_by_default='False',
|
|
602
|
+
force_lowercase_libname='True',
|
|
603
|
+
plugin_name_separator='_',
|
|
604
|
+
module_name_separator='::'
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
config_parser = ConfigParser.ConfigParser(defaults=config_defaults)
|
|
608
|
+
config_parser.read(pandora_plugin_file)
|
|
609
|
+
config = dict(config_parser.items('pandora-plugin'))
|
|
610
|
+
config['force_lowercase_libname']=config_parser.getboolean('pandora-plugin','force_lowercase_libname')
|
|
611
|
+
|
|
612
|
+
# I'm 3 seconds away from writing a comprehensive build solution
|
|
613
|
+
if not os.path.exists('config/pandora_vc_revinfo'):
|
|
614
|
+
if os.path.exists('.bzr'):
|
|
615
|
+
bzr_revno= subprocess.Popen(["bzr", "revno"], stdout=subprocess.PIPE).communicate()[0].strip()
|
|
616
|
+
rev_date= datetime.date.fromtimestamp(time.time())
|
|
617
|
+
config['default_plugin_version'] = "%d.%02d.%s" % (rev_date.year, rev_date.month, bzr_revno)
|
|
618
|
+
else:
|
|
619
|
+
config['default_plugin_version']=datetime.date.fromtimestamp(time.time()).isoformat()
|
|
620
|
+
else:
|
|
621
|
+
# need to read config/pandora_vc_revno
|
|
622
|
+
pandora_vc_revno=open('config/pandora_vc_revinfo','r').read().split()
|
|
623
|
+
rev_date=""
|
|
624
|
+
bzr_revno=""
|
|
625
|
+
for revno_line in pandora_vc_revno:
|
|
626
|
+
(revno_key,revno_val)= revno_line.split("=")
|
|
627
|
+
if revno_key == 'PANDORA_VC_REVNO':
|
|
628
|
+
bzr_revno=revno_val.strip()
|
|
629
|
+
elif revno_key == 'PANDORA_RELEASE_DATE':
|
|
630
|
+
rev_date=revno_val.strip()
|
|
631
|
+
|
|
632
|
+
config['default_plugin_version'] = "%s.%s" % (rev_date, bzr_revno)
|
|
633
|
+
|
|
634
|
+
actions=[]
|
|
635
|
+
for arg in sys.argv:
|
|
636
|
+
if arg.startswith('--top_srcdir='):
|
|
637
|
+
config['top_srcdir']=arg[12:]
|
|
638
|
+
elif arg.startswith('--top_builddir='):
|
|
639
|
+
config['top_builddir']=arg[14:]
|
|
640
|
+
elif arg == "--force-all":
|
|
641
|
+
actions=['plugin-list','pandora-plugin.am','write']
|
|
642
|
+
break
|
|
643
|
+
else:
|
|
644
|
+
actions.append(arg)
|
|
645
|
+
if len(actions) == 0:
|
|
646
|
+
actions.append('write')
|
|
647
|
+
|
|
648
|
+
plugin_list=[]
|
|
649
|
+
|
|
650
|
+
def accumulate_plugins(arg, dirname, fnames):
|
|
651
|
+
# plugin_ini_fname is a name in dirname indicating dirname is a plugin.
|
|
652
|
+
if config['plugin_ini_fname'] in fnames:
|
|
653
|
+
arg.append(dirname)
|
|
654
|
+
|
|
655
|
+
os.path.walk(os.path.join(config['top_srcdir'],
|
|
656
|
+
config['root_plugin_dir']),
|
|
657
|
+
accumulate_plugins,
|
|
658
|
+
plugin_list)
|
|
659
|
+
|
|
660
|
+
if not os.path.exists("config/pandora-plugin.am") or "write" in actions:
|
|
661
|
+
plugin_am_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.am'))
|
|
662
|
+
plugin_am_file.write("""
|
|
663
|
+
# always the current list, generated every build so keep this lean.
|
|
664
|
+
# pandora-plugin.list: datestamp preserved list
|
|
665
|
+
${srcdir}/config/pandora-plugin.list: .plugin.scan
|
|
666
|
+
.plugin.scan:
|
|
667
|
+
@cd ${top_srcdir} && python config/pandora-plugin plugin-list
|
|
668
|
+
|
|
669
|
+
# Plugins affect configure; so to prevent configure running twice in a tarball
|
|
670
|
+
# build (once up front, once with the right list of plugins, we ship the
|
|
671
|
+
# generated list of plugins and the housekeeping material for that list so it
|
|
672
|
+
# is likewise not updated.
|
|
673
|
+
EXTRA_DIST += \
|
|
674
|
+
config/pandora-plugin.am \
|
|
675
|
+
config/pandora-plugin.ac \
|
|
676
|
+
config/pandora-plugin \
|
|
677
|
+
config/pandora-plugin.ini
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
# Seed the list of plugin LDADDS which plugins may extend.
|
|
681
|
+
PANDORA_DYNAMIC_LDADDS=
|
|
682
|
+
|
|
683
|
+
# plugin.stamp: graph dominator for creating all per pandora-plugin.ac/am
|
|
684
|
+
# files. This is invoked when the code to generate such files has altered.""")
|
|
685
|
+
|
|
686
|
+
if not os.path.exists("config/pandora-plugin.ac") or "write" in actions:
|
|
687
|
+
plugin_ac_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.ac'))
|
|
688
|
+
plugin_ac_file.write("dnl Generated file, run make to rebuild\n")
|
|
689
|
+
plugin_ac_file.write("""
|
|
690
|
+
AC_ARG_WITH([all-static],[
|
|
691
|
+
AS_HELP_STRING([--with-all-static],[Link all plugins staticly into the server @<:@default=no@:>@])
|
|
692
|
+
],[
|
|
693
|
+
with_all_static="$withval"
|
|
694
|
+
],[
|
|
695
|
+
with_all_static=no
|
|
696
|
+
])
|
|
697
|
+
""")
|
|
698
|
+
|
|
699
|
+
if os.path.exists("docs/plugins"):
|
|
700
|
+
if not os.path.exists("docs/plugins/list.rst") or "write" in actions:
|
|
701
|
+
plugin_doc_index = ChangeProtectedFile("docs/plugins/list.rst")
|
|
702
|
+
plugin_doc_index.write("""
|
|
703
|
+
Plugin Documentation
|
|
704
|
+
====================
|
|
705
|
+
|
|
706
|
+
.. toctree::
|
|
707
|
+
:maxdepth: 2
|
|
708
|
+
""")
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
if os.path.exists('plugin.ini'):
|
|
712
|
+
# Are we in a plugin dir which wants to have a self-sufficient build system?
|
|
713
|
+
plugin_list=['.']
|
|
714
|
+
|
|
715
|
+
write_external_plugin()
|
|
716
|
+
else:
|
|
717
|
+
plugin_list_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.list'))
|
|
718
|
+
for p in plugin_list:
|
|
719
|
+
plugin_list_file.write(p)
|
|
720
|
+
plugin_list_file.write("\n")
|
|
721
|
+
plugin_list.sort()
|
|
722
|
+
plugin_list_file.close()
|
|
723
|
+
|
|
724
|
+
if not os.path.exists("config/pandora-plugin.am") or 'write' in actions:
|
|
725
|
+
plugin_am_file.write("\n${top_srcdir}/config/pandora-plugin.am: ${top_srcdir}/config/pandora-plugin.list ${top_srcdir}/config/pandora-plugin ")
|
|
726
|
+
for plugin_dir in plugin_list:
|
|
727
|
+
plugin_am_file.write("\\\n\t%s/plugin.ini " % plugin_dir)
|
|
728
|
+
plugin_am_file.write("\n\tcd ${top_srcdir} && python config/pandora-plugin write\n")
|
|
729
|
+
plugin_ini_list=[]
|
|
730
|
+
|
|
731
|
+
# Load all plugin.ini files first so we can do dependency tracking.
|
|
732
|
+
for plugin_dir in plugin_list:
|
|
733
|
+
plugin = read_plugin_ini(plugin_dir)
|
|
734
|
+
expand_plugin_ini(plugin)
|
|
735
|
+
plugin_ini_list.append(plugin)
|
|
736
|
+
|
|
737
|
+
# Check for duplicates
|
|
738
|
+
plugin_name_list = [plugin['libname'] for plugin in plugin_ini_list]
|
|
739
|
+
for plugin in plugin_ini_list:
|
|
740
|
+
if plugin_name_list.count(plugin['libname']) != 1:
|
|
741
|
+
print "Duplicate module name %s" % plugin['libname']
|
|
742
|
+
exit(1)
|
|
743
|
+
|
|
744
|
+
for plugin in plugin_ini_list:
|
|
745
|
+
write_plugin(plugin, plugin_ini_list)
|
|
746
|
+
|
|
747
|
+
if plugin_am_file is not None:
|
|
748
|
+
plugin_am_file.close()
|
|
749
|
+
if plugin_ac_file is not None:
|
|
750
|
+
plugin_ac_file.close()
|
|
751
|
+
if plugin_doc_index is not None:
|
|
752
|
+
plugin_doc_index.close()
|