From 9f086a9da1cda372bbc54c89d7f4685670a155e3 Mon Sep 17 00:00:00 2001 From: csilvers Date: Sat, 25 Sep 2010 04:05:20 +0000 Subject: [PATCH] Fri Sep 24 11:38:27 PDT 2010 Google Inc. * ctemplate: version 0.98 release * Add new image URL modifier: :I=html, :I=css, etc (jshneier, dougy) * Allow lowercase words in pragma contexts (csilvers) * Enable full-word matching for tpl filenames (aneeshnaman) * Performance improvements for small_map (wonchun) * Avoid some compiler warnings (mac) * Fix a c++ conformance bug involving const (chandlerc) * BUGFIX: never reload string templates (panicker) * BUGFIX: Fix refcounting to avoid accessing freed memory (panicker) * PORTING: Avoid SIBGUS on sparc by aligning memory more (csilvers) * PORTING: Use isascii_is*() to avoid langtype issues (csilvers) * PORTING: Fix 'class not properly dll-epxorted' warnings (csilvers) * PORTING: Rename README.windows to README_windows.txt (csilvers) * Made NEWS file non-empty. * Added ctemplate.pc + ctemplate_nothreads.pc for pkg-config (csilvers) --- ChangeLog | 18 +++++++ Makefile.am | 29 +++++++++++ Makefile.in | 75 ++++++++++++++++++++++----- NEWS | 17 +++++- configure | 20 +++---- configure.ac | 2 +- doc/guide.html | 2 +- packages/deb/changelog | 6 +++ packages/deb/libctemplate-dev.dirs | 1 + packages/deb/libctemplate-dev.install | 2 + packages/rpm/rpm.spec | 1 + 11 files changed, 146 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ef2f0f..250cfc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +Fri Sep 24 11:38:27 PDT 2010 Google Inc. + + * ctemplate: version 0.98 release + * Add new image URL modifier: :I=html, :I=css, etc (jshneier, dougy) + * Allow lowercase words in pragma contexts (csilvers) + * Enable full-word matching for tpl filenames (aneeshnaman) + * Performance improvements for small_map (wonchun) + * Avoid some compiler warnings (mac) + * Fix a c++ conformance bug involving const (chandlerc) + * BUGFIX: never reload string templates (panicker) + * BUGFIX: Fix refcounting to avoid accessing freed memory (panicker) + * PORTING: Avoid SIBGUS on sparc by aligning memory more (csilvers) + * PORTING: Use isascii_is*() to avoid langtype issues (csilvers) + * PORTING: Fix 'class not properly dll-epxorted' warnings (csilvers) + * PORTING: Rename README.windows to README_windows.txt (csilvers) + * Made NEWS file non-empty. + * Added ctemplate.pc + ctemplate_nothreads.pc for pkg-config (csilvers) + Mon Apr 19 15:55:23 2010 Google Inc. * ctemplate: version 0.97 release diff --git a/Makefile.am b/Makefile.am index c90db09..2595420 100644 --- a/Makefile.am +++ b/Makefile.am @@ -415,6 +415,34 @@ rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec deb: dist-gzip packages/deb.sh packages/deb/* @cd packages && ./deb.sh ${PACKAGE} ${VERSION} +# http://linux.die.net/man/1/pkg-config, http://pkg-config.freedesktop.org/wiki +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = lib${PACKAGE}.pc lib${PACKAGE}_nothreads.pc +CLEANFILES += $(pkgconfig_DATA) + +# I get the description and URL lines from the rpm spec. I use sed to +# try to rewrite exec_prefix, libdir, and includedir in terms of +# prefix, if possible. +lib${PACKAGE}.pc: Makefile packages/rpm/rpm.spec + echo 'prefix=$(prefix)' > "$@".tmp + echo 'exec_prefix='`echo '$(exec_prefix)' | sed 's@^$(prefix)@$${prefix}@'` >> "$@".tmp + echo 'libdir='`echo '$(libdir)' | sed 's@^$(exec_prefix)@$${exec_prefix}@'` >> "$@".tmp + echo 'includedir='`echo '$(includedir)' | sed 's@^$(prefix)@$${prefix}@'` >> "$@".tmp + echo '' >> "$@".tmp + echo 'Name: $(PACKAGE)' >> "$@".tmp + echo 'Version: $(VERSION)' >> "$@".tmp + -grep '^Summary:' packages/rpm/rpm.spec | sed s/^Summary:/Description:/ | head -n1 >> "$@".tmp + -grep '^URL: ' packages/rpm/rpm.spec >> "$@".tmp + echo 'Requires:' >> "$@".tmp + echo 'Libs: -L$${libdir} -l$(PACKAGE)' >> "$@".tmp + echo 'Libs.private: $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)' >> "$@".tmp + echo 'Cflags: -I$${includedir}' >> "$@".tmp + mv -f "$@".tmp "$@" + +# The nothreads version is mostly the same +lib${PACKAGE}_nothreads.pc: lib${PACKAGE}.pc + grep -v Libs.private lib${PACKAGE}.pc | sed s/-l$(PACKAGE)/-l$(PACKAGE)_nothreads/ > "$@" + # Windows wants write permission to .vcproj files and maybe even sln files. dist-hook: test -e "$(distdir)/vsprojects" \ @@ -423,6 +451,7 @@ dist-hook: ## If you're using libtool, add 'libtool' here. Also add this rule: libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck + # In addition to the normal stuff, we include all the windows-specific # code, and also the code used to generate the html-parser fsm files. # NOTE: BUILT_SOURCES should come after the .config files, so they diff --git a/Makefile.in b/Makefile.in index e6c5f7f..28e751b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -97,7 +97,7 @@ am__vpath_adj = case $$p in \ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" \ - "$(DESTDIR)$(ctemplateincludedir)" + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(ctemplateincludedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -490,7 +490,8 @@ DIST_SOURCES = $(am__libctemplate_la_SOURCES_DIST) \ $(template_test_util_test_SOURCES) \ $(template_unittest_SOURCES) dist_docDATA_INSTALL = $(INSTALL_DATA) -DATA = $(dist_doc_DATA) +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(dist_doc_DATA) $(pkgconfig_DATA) nodist_ctemplateincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(nodist_ctemplateinclude_HEADERS) $(noinst_HEADERS) ETAGS = etags @@ -949,13 +950,18 @@ htmlparser_test_LDADD = libctemplate_debug.la $(PTHREAD_LIBS) htmlparser_nothreads_test_SOURCES = $(htmlparser_test_SOURCES) htmlparser_nothreads_test_CXXFLAGS = -DNO_THREADS $(AM_CXXFLAGS) htmlparser_nothreads_test_LDADD = libctemplate_nothreads_debug.la -CLEANFILES = statemachine.c +CLEANFILES = statemachine.c $(pkgconfig_DATA) statemachine_test_SOURCES = src/tests/statemachine_test.c \ statemachine.c statemachine_test_CFLAGS = -I$(top_srcdir)/src/htmlparser generate_fsm_c_test_SOURCES = src/tests/generate_fsm_c_test.c generate_fsm_c_test_DEPENDENCIES = src/tests/htmlparser_testdata/sample_fsm.c + +# http://linux.die.net/man/1/pkg-config, http://pkg-config.freedesktop.org/wiki +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = lib${PACKAGE}.pc lib${PACKAGE}_nothreads.pc + # In addition to the normal stuff, we include all the windows-specific # code, and also the code used to generate the html-parser fsm files. # NOTE: BUILT_SOURCES should come after the .config files, so they @@ -2134,6 +2140,23 @@ uninstall-dist_docDATA: echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ rm -f "$(DESTDIR)$(docdir)/$$f"; \ done +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done install-nodist_ctemplateincludeHEADERS: $(nodist_ctemplateinclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(ctemplateincludedir)" || $(mkdir_p) "$(DESTDIR)$(ctemplateincludedir)" @@ -2414,7 +2437,7 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ install-binPROGRAMS: install-libLTLIBRARIES installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(ctemplateincludedir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(ctemplateincludedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -2468,7 +2491,7 @@ info: info-am info-am: install-data-am: install-dist_docDATA \ - install-nodist_ctemplateincludeHEADERS + install-nodist_ctemplateincludeHEADERS install-pkgconfigDATA install-exec-am: install-binPROGRAMS install-binSCRIPTS \ install-libLTLIBRARIES @@ -2502,7 +2525,8 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-dist_docDATA uninstall-info-am \ uninstall-libLTLIBRARIES \ - uninstall-nodist_ctemplateincludeHEADERS + uninstall-nodist_ctemplateincludeHEADERS \ + uninstall-pkgconfigDATA .PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ clean clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ @@ -2516,14 +2540,16 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ install-data-am install-dist_docDATA install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man \ - install-nodist_ctemplateincludeHEADERS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-dist_docDATA uninstall-info-am \ + install-nodist_ctemplateincludeHEADERS install-pkgconfigDATA \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-dist_docDATA uninstall-info-am \ uninstall-libLTLIBRARIES \ - uninstall-nodist_ctemplateincludeHEADERS + uninstall-nodist_ctemplateincludeHEADERS \ + uninstall-pkgconfigDATA # These files are auto-generated via generate_fsm.py. Since we don't want @@ -2557,6 +2583,29 @@ rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec deb: dist-gzip packages/deb.sh packages/deb/* @cd packages && ./deb.sh ${PACKAGE} ${VERSION} +# I get the description and URL lines from the rpm spec. I use sed to +# try to rewrite exec_prefix, libdir, and includedir in terms of +# prefix, if possible. +lib${PACKAGE}.pc: Makefile packages/rpm/rpm.spec + echo 'prefix=$(prefix)' > "$@".tmp + echo 'exec_prefix='`echo '$(exec_prefix)' | sed 's@^$(prefix)@$${prefix}@'` >> "$@".tmp + echo 'libdir='`echo '$(libdir)' | sed 's@^$(exec_prefix)@$${exec_prefix}@'` >> "$@".tmp + echo 'includedir='`echo '$(includedir)' | sed 's@^$(prefix)@$${prefix}@'` >> "$@".tmp + echo '' >> "$@".tmp + echo 'Name: $(PACKAGE)' >> "$@".tmp + echo 'Version: $(VERSION)' >> "$@".tmp + -grep '^Summary:' packages/rpm/rpm.spec | sed s/^Summary:/Description:/ | head -n1 >> "$@".tmp + -grep '^URL: ' packages/rpm/rpm.spec >> "$@".tmp + echo 'Requires:' >> "$@".tmp + echo 'Libs: -L$${libdir} -l$(PACKAGE)' >> "$@".tmp + echo 'Libs.private: $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)' >> "$@".tmp + echo 'Cflags: -I$${includedir}' >> "$@".tmp + mv -f "$@".tmp "$@" + +# The nothreads version is mostly the same +lib${PACKAGE}_nothreads.pc: lib${PACKAGE}.pc + grep -v Libs.private lib${PACKAGE}.pc | sed s/-l$(PACKAGE)/-l$(PACKAGE)_nothreads/ > "$@" + # Windows wants write permission to .vcproj files and maybe even sln files. dist-hook: test -e "$(distdir)/vsprojects" \ diff --git a/NEWS b/NEWS index c10ae04..8bae1b8 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,17 @@ -=== 20 April 2010 == +=== 23 September 2010 === + +I've just released ctemplate 0.98. The changes are settling down as +we approach ctemplate 1.0 -- a few new default modifiers, a few +performance tweaks, a few portability improvements, but nothing +disruptive. + +In my testing for this release, I noticed that the template regression +test (but not other template tests) would segfault on gcc 4.1.1 when +compiled with -O2. This seems pretty clearly to be a compiler bug; if +you need to use gcc 4.1.1 to compile ctemplate, you may wish to build +via `./configure CXXFLAGS="-O1 -g"` just to be safe. + +=== 20 April 2010 === I've just released ctemplate 0.97. This change consists primarily of a significant change to the API: the addition of the `TemplateCache` @@ -51,7 +64,7 @@ before the 1.0 release. The most significant changes I expect to see are the potential removal of some of the 'forwarding' methods in the (deprecated) `Template` class. -=== 12 June 2009 == +=== 12 June 2009 === I've just released ctemplate 0.95. This is entirely an API cleanup release. Actually, relatively little of the API proper has changed: diff --git a/configure b/configure index 454c58e..094efaf 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for ctemplate 0.97. +# Generated by GNU Autoconf 2.64 for ctemplate 0.98. # # Report bugs to . # @@ -703,8 +703,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ctemplate' PACKAGE_TARNAME='ctemplate' -PACKAGE_VERSION='0.97' -PACKAGE_STRING='ctemplate 0.97' +PACKAGE_VERSION='0.98' +PACKAGE_STRING='ctemplate 0.98' PACKAGE_BUGREPORT='opensource@google.com' PACKAGE_URL='' @@ -1444,7 +1444,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ctemplate 0.97 to adapt to many kinds of systems. +\`configure' configures ctemplate 0.98 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1514,7 +1514,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ctemplate 0.97:";; + short | recursive ) echo "Configuration of ctemplate 0.98:";; esac cat <<\_ACEOF @@ -1623,7 +1623,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ctemplate configure 0.97 +ctemplate configure 0.98 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2253,7 +2253,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ctemplate $as_me 0.97, which was +It was created by ctemplate $as_me 0.98, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -2986,7 +2986,7 @@ fi # Define the identity of the package. PACKAGE='ctemplate' - VERSION='0.97' + VERSION='0.98' cat >>confdefs.h <<_ACEOF @@ -21224,7 +21224,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ctemplate $as_me 0.97, which was +This file was extended by ctemplate $as_me 0.98, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21288,7 +21288,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -ctemplate config.status 0.97 +ctemplate config.status 0.98 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index 9d824b9..df2eaef 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ # make sure we're interpreted by some minimal autoconf AC_PREREQ(2.57) -AC_INIT(ctemplate, 0.97, opensource@google.com) +AC_INIT(ctemplate, 0.98, opensource@google.com) # The argument here is just something that should be in the current directory # (for sanity checking) AC_CONFIG_SRCDIR(README) diff --git a/doc/guide.html b/doc/guide.html index 4993f60..b73e829 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -648,7 +648,7 @@ not just the first one:

Note that this behavior is immaterial when using STRIP_WHITESPACE, since in that case +HREF="#expand">STRIP_WHITESPACE, since in that case all leading whitespace is stripped.

diff --git a/packages/deb/changelog b/packages/deb/changelog index dfdf06f..c7b6ce5 100644 --- a/packages/deb/changelog +++ b/packages/deb/changelog @@ -1,3 +1,9 @@ +ctemplate (0.98-1) unstable; urgency=low + + * New upstream release. + + -- Google Inc. Fri, 24 Sep 2010 11:38:27 -0700 + ctemplate (0.97-1) unstable; urgency=low * New upstream release. diff --git a/packages/deb/libctemplate-dev.dirs b/packages/deb/libctemplate-dev.dirs index 2c42999..ce71d19 100644 --- a/packages/deb/libctemplate-dev.dirs +++ b/packages/deb/libctemplate-dev.dirs @@ -1,4 +1,5 @@ usr/lib +usr/lib/pkgconfig usr/include usr/include/ctemplate usr/bin diff --git a/packages/deb/libctemplate-dev.install b/packages/deb/libctemplate-dev.install index f884674..a4543d7 100644 --- a/packages/deb/libctemplate-dev.install +++ b/packages/deb/libctemplate-dev.install @@ -3,8 +3,10 @@ usr/lib/lib*.so usr/lib/lib*.a usr/lib/lib*.la usr/bin/* +usr/lib/pkgconfig/* debian/tmp/usr/include/ctemplate/* debian/tmp/usr/lib/lib*.so debian/tmp/usr/lib/lib*.a debian/tmp/usr/lib/lib*.la debian/tmp/usr/bin/* +debian/tmp/usr/lib/pkgconfig/* diff --git a/packages/rpm/rpm.spec b/packages/rpm/rpm.spec index 123df93..2cb83c7 100644 --- a/packages/rpm/rpm.spec +++ b/packages/rpm/rpm.spec @@ -78,3 +78,4 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/make_tpl_varnames_h %{_bindir}/template-converter %{_bindir}/diff_tpl_auto_escape +%{_libdir}/pkgconfig/*.pc