diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/ChangeLog libxkbcommon-0.1.0~git20120520.8ca8f05a/ChangeLog --- libxkbcommon-0.1.0~git20120516.3fbc277b/ChangeLog 2012-05-16 08:46:42.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/ChangeLog 2012-05-20 08:51:24.000000000 +0000 @@ -1,9 +1,45 @@ -commit 76d5f9001b075311f40b3749a0928ad4d0499b2d +commit 997a1abab1168d20978e21fdf9f61d1884f4d545 Author: Rico Tzschichholz -Date: Wed May 16 10:46:27 2012 +0200 +Date: Sun May 20 10:51:13 2012 +0200 Add debian tree from origin/debian-experimental +commit 8ca8f05aab86423c2495cd917489becfecca4632 +Author: Pekka Paalanen +Date: Tue May 15 15:23:42 2012 +0300 + + Add xkbcommon-uninstalled.pc + +commit 8bdef139a62c74d002a976e830f9d8e09628aea3 +Author: Pekka Paalanen +Date: Tue May 15 15:23:41 2012 +0300 + + Use eaccess() only if available + + Fixes build on Android. + + Signed-off-by: Pekka Paalanen + +commit cb804a9d4ed2cf3b8501098242ad40be91f46bdb +Author: Pekka Paalanen +Date: Tue May 15 15:23:40 2012 +0300 + + Fix out-of-tree build for config.h + + config.h appreas in the build dir, not src dir. + + Signed-off-by: Pekka Paalanen + +commit 661cb84051d025d80aad54bce2882762cb28fbe7 +Author: Daniel Stone +Date: Fri May 18 00:56:36 2012 +0100 + + Add benchmarking test to rulescomp + + Apparently it only takes us 8ms to build keymaps. Nice! + + Signed-off-by: Daniel Stone + commit 3fbc277bb8717d031f9c863935460b895c3d3beb Author: Kristian Høgsberg Date: Fri May 11 16:14:27 2012 +0100 diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/configure libxkbcommon-0.1.0~git20120520.8ca8f05a/configure --- libxkbcommon-0.1.0~git20120516.3fbc277b/configure 2012-05-16 08:46:41.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/configure 2012-05-20 08:51:22.000000000 +0000 @@ -18092,6 +18092,19 @@ as_fn_error $? "C library does not support strcasecmp/strncasecmp" "$LINENO" 5 fi +for ac_func in eaccess euidaccess +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + # Build native compiler needed for makekeys if test "x$CC_FOR_BUILD" = x; then @@ -18287,7 +18300,7 @@ -ac_config_files="$ac_config_files Makefile makekeys/Makefile xkbcommon.pc" +ac_config_files="$ac_config_files Makefile makekeys/Makefile xkbcommon-uninstalled.pc xkbcommon.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -19304,6 +19317,7 @@ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "makekeys/Makefile") CONFIG_FILES="$CONFIG_FILES makekeys/Makefile" ;; + "xkbcommon-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES xkbcommon-uninstalled.pc" ;; "xkbcommon.pc") CONFIG_FILES="$CONFIG_FILES xkbcommon.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/configure.ac libxkbcommon-0.1.0~git20120520.8ca8f05a/configure.ac --- libxkbcommon-0.1.0~git20120516.3fbc277b/configure.ac 2012-05-16 08:46:27.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/configure.ac 2012-05-20 08:51:13.000000000 +0000 @@ -62,6 +62,8 @@ AC_MSG_ERROR([C library does not support strcasecmp/strncasecmp]) fi +AC_CHECK_FUNCS([eaccess euidaccess]) + # Build native compiler needed for makekeys AC_ARG_VAR([CC_FOR_BUILD], [Build native C compiler program]) if test "x$CC_FOR_BUILD" = x; then @@ -118,5 +120,6 @@ AC_CONFIG_FILES([ Makefile makekeys/Makefile + xkbcommon-uninstalled.pc xkbcommon.pc]) AC_OUTPUT diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/debian/changelog libxkbcommon-0.1.0~git20120520.8ca8f05a/debian/changelog --- libxkbcommon-0.1.0~git20120516.3fbc277b/debian/changelog 2012-05-20 09:01:13.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/debian/changelog 2012-05-20 09:01:13.000000000 +0000 @@ -1,12 +1,12 @@ -libxkbcommon (0.1.0~git20120516.3fbc277b-0ubuntu0ricotz2~precise) precise; urgency=medium +libxkbcommon (0.1.0~git20120520.8ca8f05a-0ubuntu0ricotz~precise) precise; urgency=medium - * Checkout from git 20120516 (master branch) up to commit - 3fbc277bb8717d031f9c863935460b895c3d3beb + * Checkout from git 20120520 (master branch) up to commit + 8ca8f05aab86423c2495cd917489becfecca4632 * Only added debian/ tree from origin/debian-experimental * hook: Adjust install path for headers in libxkbcommon-dev * hook: Drop hard dependency generation - -- Rico Tzschichholz Wed, 16 May 2012 10:46:43 +0200 + -- Rico Tzschichholz Sun, 20 May 2012 10:51:25 +0200 libxkbcommon (0.1.0~1-1) experimental; urgency=low diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/.lastcommit libxkbcommon-0.1.0~git20120520.8ca8f05a/.lastcommit --- libxkbcommon-0.1.0~git20120516.3fbc277b/.lastcommit 2012-05-16 08:46:27.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/.lastcommit 2012-05-20 08:51:13.000000000 +0000 @@ -1 +1 @@ -commit 3fbc277bb8717d031f9c863935460b895c3d3beb +commit 8ca8f05aab86423c2495cd917489becfecca4632 diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/Makefile.am libxkbcommon-0.1.0~git20120520.8ca8f05a/Makefile.am --- libxkbcommon-0.1.0~git20120516.3fbc277b/Makefile.am 2012-05-16 08:46:27.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/Makefile.am 2012-05-20 08:51:13.000000000 +0000 @@ -23,7 +23,7 @@ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/xkbcomp \ -I$(top_builddir)/src/xkbcomp \ - -include $(top_srcdir)/src/config.h + -include $(top_builddir)/src/config.h AM_CFLAGS = \ $(BASE_CFLAGS) \ @@ -113,7 +113,7 @@ test_xkey_LDADD = $(TESTS_LDADD) test_filecomp_LDADD = $(TESTS_LDADD) test_namescomp_LDADD = $(TESTS_LDADD) -test_rulescomp_LDADD = $(TESTS_LDADD) +test_rulescomp_LDADD = $(TESTS_LDADD) -lrt test_canonicalise_LDADD = $(TESTS_LDADD) test_state_LDADD = $(TESTS_LDADD) test_context_LDADD = $(TESTS_LDADD) diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/Makefile.in libxkbcommon-0.1.0~git20120520.8ca8f05a/Makefile.in --- libxkbcommon-0.1.0~git20120516.3fbc277b/Makefile.in 2012-05-16 08:46:42.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/Makefile.in 2012-05-20 08:51:24.000000000 +0000 @@ -60,12 +60,12 @@ check_PROGRAMS = $(am__EXEEXT_1) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/xkbcommon.pc.in \ - $(top_srcdir)/configure $(top_srcdir)/src/config.h.in \ - $(xkbcommoninclude_HEADERS) COPYING ChangeLog INSTALL \ - config.guess config.sub depcomp install-sh ltmain.sh missing \ - src/xkbcomp/parser.c src/xkbcomp/parser.h \ - src/xkbcomp/scanner.c ylwrap + $(srcdir)/Makefile.in $(srcdir)/xkbcommon-uninstalled.pc.in \ + $(srcdir)/xkbcommon.pc.in $(top_srcdir)/configure \ + $(top_srcdir)/src/config.h.in $(xkbcommoninclude_HEADERS) \ + COPYING ChangeLog INSTALL config.guess config.sub depcomp \ + install-sh ltmain.sh missing src/xkbcomp/parser.c \ + src/xkbcomp/parser.h src/xkbcomp/scanner.c ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -77,7 +77,7 @@ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = xkbcommon.pc +CONFIG_CLEAN_FILES = xkbcommon-uninstalled.pc xkbcommon.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -527,7 +527,7 @@ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/xkbcomp \ -I$(top_builddir)/src/xkbcomp \ - -include $(top_srcdir)/src/config.h + -include $(top_builddir)/src/config.h AM_CFLAGS = \ $(BASE_CFLAGS) \ @@ -600,7 +600,7 @@ test_xkey_LDADD = $(TESTS_LDADD) test_filecomp_LDADD = $(TESTS_LDADD) test_namescomp_LDADD = $(TESTS_LDADD) -test_rulescomp_LDADD = $(TESTS_LDADD) +test_rulescomp_LDADD = $(TESTS_LDADD) -lrt test_canonicalise_LDADD = $(TESTS_LDADD) test_state_LDADD = $(TESTS_LDADD) test_context_LDADD = $(TESTS_LDADD) @@ -659,6 +659,8 @@ distclean-hdr: -rm -f src/config.h src/stamp-h1 +xkbcommon-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/xkbcommon-uninstalled.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ xkbcommon.pc: $(top_builddir)/config.status $(srcdir)/xkbcommon.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/src/config.h.in libxkbcommon-0.1.0~git20120520.8ca8f05a/src/config.h.in --- libxkbcommon-0.1.0~git20120516.3fbc277b/src/config.h.in 2012-05-16 08:46:41.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/src/config.h.in 2012-05-20 08:51:23.000000000 +0000 @@ -3,6 +3,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the `eaccess' function. */ +#undef HAVE_EACCESS + +/* Define to 1 if you have the `euidaccess' function. */ +#undef HAVE_EUIDACCESS + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/src/context.c libxkbcommon-0.1.0~git20120520.8ca8f05a/src/context.c --- libxkbcommon-0.1.0~git20120516.3fbc277b/src/context.c 2012-05-16 08:46:27.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/src/context.c 2012-05-20 08:51:13.000000000 +0000 @@ -72,8 +72,14 @@ return 0; if (!S_ISDIR(stat_buf.st_mode)) return 0; + +#if defined(HAVE_EACCESS) if (eaccess(path, R_OK | X_OK) != 0) return 0; +#elif defined(HAVE_EUIDACCESS) + if (euidaccess(path, R_OK | X_OK) != 0) + return 0; +#endif ctx->include_paths[ctx->num_include_paths] = strdup(path); if (!ctx->include_paths[ctx->num_include_paths]) diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/test/rulescomp.c libxkbcommon-0.1.0~git20120520.8ca8f05a/test/rulescomp.c --- libxkbcommon-0.1.0~git20120516.3fbc277b/test/rulescomp.c 2012-05-16 08:46:27.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/test/rulescomp.c 2012-05-20 08:51:13.000000000 +0000 @@ -26,12 +26,15 @@ #include #include +#include #include "xkbcommon/xkbcommon.h" +#define BENCHMARK_ITERATIONS 1000 + static int -test_rmlvo(const char *rules, const char *model, const char *layout, - const char *variant, const char *options) +do_test_rmlvo(const char *rules, const char *model, const char *layout, + const char *variant, const char *options, int silent) { struct xkb_context *context; struct xkb_keymap *keymap; @@ -46,8 +49,9 @@ context = xkb_context_new(0); assert(context); - fprintf(stderr, "\nCompiling %s %s %s %s %s\n", rmlvo.rules, rmlvo.model, - rmlvo.layout, rmlvo.variant, rmlvo.options); + if (!silent) + fprintf(stderr, "Compiling %s %s %s %s %s\n", rules, model, layout, + variant, options); keymap = xkb_map_new_from_names(context, &rmlvo, 0); if (!keymap) { @@ -60,8 +64,43 @@ return 1; } -int -main(void) +static int +test_rmlvo(const char *rules, const char *model, const char *layout, + const char *variant, const char *options) +{ + return do_test_rmlvo(rules, model, layout, variant, options, 0); +} + +static int +test_rmlvo_silent(const char *rules, const char *model, const char *layout, + const char *variant, const char *options) +{ + return do_test_rmlvo(rules, model, layout, variant, options, 1); +} + +static void +benchmark(void) +{ + struct timespec start, stop, elapsed; + int i; + + clock_gettime(CLOCK_MONOTONIC, &start); + for (i = 0; i < BENCHMARK_ITERATIONS; i++) + assert(test_rmlvo_silent("base", "", "us", "", "")); + clock_gettime(CLOCK_MONOTONIC, &stop); + + elapsed.tv_sec = stop.tv_sec - start.tv_sec; + elapsed.tv_nsec = stop.tv_nsec - start.tv_nsec; + if (elapsed.tv_nsec < 0) { + elapsed.tv_nsec += 1000000000; + elapsed.tv_sec--; + } + + fprintf(stderr, "compiled %d keymaps in %ld.%09lds\n", + BENCHMARK_ITERATIONS, elapsed.tv_sec, elapsed.tv_nsec); +} + +int main(int argc, char *argv[]) { assert(test_rmlvo("base", "pc105", "us,il,ru,ca", ",,,multix", "grp:alts_toggle,ctrl:nocaps,compose:rwin")); assert(test_rmlvo("base", "", "us", "", "")); @@ -73,5 +112,5 @@ assert(!test_rmlvo("base", "pc105", "", "", "")); assert(!test_rmlvo("badrules", "", "us", "", "")); - return 0; + benchmark(); } diff -Nru libxkbcommon-0.1.0~git20120516.3fbc277b/xkbcommon-uninstalled.pc.in libxkbcommon-0.1.0~git20120520.8ca8f05a/xkbcommon-uninstalled.pc.in --- libxkbcommon-0.1.0~git20120516.3fbc277b/xkbcommon-uninstalled.pc.in 1970-01-01 00:00:00.000000000 +0000 +++ libxkbcommon-0.1.0~git20120520.8ca8f05a/xkbcommon-uninstalled.pc.in 2012-05-20 08:51:13.000000000 +0000 @@ -0,0 +1,8 @@ +libdir=@abs_top_builddir@/.libs +includedir=@abs_top_srcdir@/include + +Name: xkbcommon +Description: XKB API common to servers and clients (uninstalled) +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lxkbcommon