pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/gperf



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Mon May 18 12:09:03 UTC 2026

Modified Files:
        pkgsrc/devel/gperf: Makefile distinfo
Added Files:
        pkgsrc/devel/gperf/patches: patch-Makefile.in
Removed Files:
        pkgsrc/devel/gperf/patches: patch-src_output.cc

Log Message:
gperf: Update to 3.3.

Required for modern C.  While here fix parallel builds, which until now had
been compiling during the install phase when using bmake due to Makefile bugs.

2025-04-20  Bruno Haible  <bruno%clisp.org@localhost>

        Release gperf-3.3.
        * src/version.cc (version_string): Bump.
        * tests/*.exp: Update.
        * NEWS: Mention the changes.

2025-04-20  Bruno Haible  <bruno%clisp.org@localhost>

        Add two more assertions.
        Suggested by Frank Wojcik.
        * src/search.cc (Search::find_asso_values): Assert that a step's
        _changing_count is positive.

2025-04-20  Bruno Haible  <bruno%clisp.org@localhost>

        Fix typo in comment.
        Reported by Frank Wojcik.
        * src/search.cc (Search::find_asso_values): Fix typo in comment.

2025-04-20  Bruno Haible  <bruno%clisp.org@localhost>

        Use an array-list instead of a linked-list of equiv.-classes, part 2.
        * src/search.cc (Search::compute_partition): Fix a memory leak.

2025-04-20  Bruno Haible  <bruno%clisp.org@localhost>

        Use a hash table in compute_partition, part 2.
        * src/search.cc (Search::compute_partition): Fix a memory leak.

2025-04-19  Bruno Haible  <bruno%clisp.org@localhost>

        Optimize: Test large equivalence classes for conflict first.
        This reduces the execution time of gperf on large inputs by ca. 10%.
        * src/search.cc (cmp_equiv_classes): New function.
        (compute_partition): Sort the equivalence classes according to
        decreasing size.

2025-04-19  Bruno Haible  <bruno%clisp.org@localhost>

        Refactor: Use an array-list instead of a linked-list of equiv.-classes.
        * src/search.h (Search::compute_partition): Return a 'Partition *', not
        a 'EquivalenceClass *'.
        (Search::count_possible_collisions, Search::unchanged_partition): Change
        parameter from 'EquivalenceClass *' to 'Partition *'.
        * src/search.cc (struct EquivalenceClass): Remove field _next.
        (struct Partition): New type.
        (struct Step): Change type of _partition from 'EquivalenceClass *' to
        'Partition *'.
        (Search::compute_partition): Return a 'Partition *', not a
        'EquivalenceClass *'.
        (delete_partition): Update.
        (Search::count_possible_collisions, Search::unchanged_partition): Change
        parameter from 'EquivalenceClass *' to 'Partition *'.
        (Search::find_asso_values): Update.

2025-04-19  Bruno Haible  <bruno%clisp.org@localhost>

        Optimize: Use an array-list instead of a linked-list of keywords.
        Storing list elements in contiguous memory means: less cache misses.
        This reduces the execution time of gperf on large inputs by ca. 30%.
        * src/arraylist.h: New file.
        * src/arraylist.cc: New file.
        * src/Makefile.in (OBJECTS): Add arraylist.$(OBJEXT).
        (ARRAYLIST_H): New variable.
        (arraylist.$(OBJEXT)): New rule.
        (search.$(OBJEXT)): Update dependencies.
        (SOURCE_FILES): Add arraylist.cc and arraylist.h.
        * src/search.cc: Include arraylist.h.
        (struct EquivalenceClass): An an ArrayList field. Remove the linked-list
        fields. Add a constructor.
        (Search::compute_partition, delete_partition): Update.
        (Search::count_possible_collisions, Search::unchanged_partition,
        Search::find_asso_values): Update.

2025-04-19  Bruno Haible  <bruno%clisp.org@localhost>

        Optimize: Minimize object references in find_asso_values.
        This reduces the execution time of gperf on large inputs by ca. 4%.
        * src/search.cc (Search::find_asso_values): Cache some values in local
        variables.

2025-04-19  Bruno Haible  <bruno%clisp.org@localhost>

        Optimize: Use a hash table in compute_partition.
        This reduces the execution time of gperf on large inputs by ca. 30%.
        * autogen.sh (GNULIB_MODULES): Add map-c++, hash-map.
        * src/keyword.h: Include <stddef.h>.
        (struct KeywordExt): Add fields _undetermined_chars,
        _undetermined_chars_length, _undetermined_chars_hashcode.
        * src/search.cc: Include gl_map.hh, gl_hash_map.h.
        (Search::prepare_asso_values): Initialize the _undetermined_chars field.
        (struct EquivalenceClass): Remove the fields _undetermined_chars,
        _undetermined_chars_length.
        (undetermined_equals, undetermined_hashcode): New functions.
        (Search::compute_partition): Initialize the _undetermined_chars* fields
        of all keywords. Use a hash map instead of a loop over the equivalence
        classes.
        (Search::find_good_asso_values): Deallocate the _undetermined_chars field.

2025-04-19  Bruno Haible  <bruno%clisp.org@localhost>

        Optimize: Make Bool_Array take less memory.
        Less memory means: less cache misses.
        This reduces the execution time of gperf on large inputs by ca. 2.5%.
        * src/bool-array.h (Bool_Array): For the _storage_array and
        _iteration_number fields, use 'unsigned char' instead of 'unsigned int'.
        * src/bool-array.icc (Bool_Array::Bool_Array, Bool_Array::clear: Update.
        * src/bool-array.cc (Bool_Array::~Bool_Array): Update.

2025-04-19  Bruno Haible  <bruno%clisp.org@localhost>

        tests: Add unit test with many keywords.
        * tests/generate-5000.sh: New file.
        * tests/5000.gperf: New generated file.
        * tests/5000.exp: New generated file.
        * tests/Makefile.in (SOURCE_FILES): Add them.
        (check-large): New rule.

2025-04-19  Bruno Haible  <bruno%clisp.org@localhost>

        build: Update dependencies after 2025-04-16 change.
        * src/Makefile.in (*.$(OBJEXT)): Depend on $(CONFIG_H).

2025-04-17  Bruno Haible  <bruno%clisp.org@localhost>

        Improve comments.
        * src/search.cc: Fix comments.

2025-04-16  Bruno Haible  <bruno%clisp.org@localhost>

        build: Update after gnulib changed.
        * gnulib-local/lib/getopt-pfx-ext.h.diff: Remove file.
        * Makefile.in (SOURCE_FILES): Remove it.

        build: Use more gnulib modules.
        * autogen.sh (GNULIB_MODULES): Add getopt-gnu.
        Use directory gnulib-local.
        * gnulib-local/lib/getopt-pfx-ext.h.diff: New file.
        * Makefile.in (SOURCE_FILES): Add it.
        (distdir): Use 'mkdir -p' instead of 'mkdir'.
        * lib/getopt.h: Remove file.
        * lib/getopt.c: Remove file.
        * lib/getopt1.c: Remove file.
        * lib/Makefile.am (libgp_a_SOURCES): Remove them.

2025-04-16  Bruno Haible  <bruno%clisp.org@localhost>

        build: Use more gnulib modules.
        * autogen.sh (GNULIB_MODULES): Add read-file.
        Copy also config.guess and config.sub.
        * lib/Makefile.am (BUILT_SOURCES, MOSTLYCLEANDIRS): New variables.
        (libgp_a_SOURCES): Remove getline.h, getline.cc.
        * lib/getline.h: Remove file.
        * lib/getline.cc: Remove file.
        * src/configure.ac: Change config.h to also include ../lib/config.h.
        * src/output.cc: Include <config.h> first.
        * src/search.cc: Likewise.
        * src/bool-array.cc: Include <config.h>.
        * src/keyword.cc: Likewise.
        * src/keyword-list.cc: Likewise.
        * src/hash-table.cc: Likewise.
        * src/main.cc: Likewise.
        * src/options.cc: Likewise.
        * src/positions.cc: Likewise.
        * src/version.cc: Likewise.
        * src/input.cc: Likewise. Include read-file.h instead of getline.h.
        (Input<KT>::read_input): Use fread_file instead of get_delim.

2025-04-16  Bruno Haible  <bruno%clisp.org@localhost>

        build: Prepare for using generated .h files in lib/.
        * src/Makefile.in (CPPFLAGS): Add more -I options.

2025-04-16  Bruno Haible  <bruno%clisp.org@localhost>

        build: Use gnulib-tool with a module list.
        * .gitmodules: New file.
        * gitsub.sh: New file, from gnulib/top/gitsub.sh.
        * autopull.sh: Use gitsub.sh to check out gnulib.
        * autogen.sh: Accept --skip-gnulib option. Invoke gnulib-tool, assuming
        a gnulib checkout is already present.
        * Makefile.devel (lib/aclocal.m4): Update reference to macros directory.
        * lib/configure.ac: Likewise. Invoke gl_EARLY, gl_INIT.
        * lib/Makefile.am (EXTRA_DIST, MOSTLYCLEANFILES): New variables.
        Include Makefile.gnulib.

2025-04-16  Bruno Haible  <bruno%clisp.org@localhost>

        build: Use Automake in lib/.
        * autopull.sh: Copy also m4/init-package-version.m4.
        * autogen.sh: Mention the requirement for Automake.
        * Makefile.devel (lib/aclocal.m4, lib/config.h.in, lib/Makefile.in): New
        rules.
        (lib/configure): Use lib/aclocal.m4 instead of the top-level aclocal.m4.
        (src/config.h.in): Fix rule.
        (totally-clean): Remove the new generated files.
        * lib/configure.ac: Require Autoconf >= 2.70. Change AC_INIT invocation.
        Invoke AC_CONFIG_MACRO_DIRS, gl_INIT_PACKAGE_VERSION, AM_INIT_AUTOMAKE,
        AC_CONFIG_HEADERS. Don't invoke AC_MAKE_SET, AC_PROG_CPP,
        AC_PROG_CXXCPP, AC_PROG_INSTALL.
        * lib/Makefile.am: New file.
        * lib/Makefile.in: Remove file.
        * Makefile.in (IMPORTED_FILES): Remove lib/filename.h.

2025-04-13  Bruno Haible  <bruno%clisp.org@localhost>

        Release gperf-3.2.1.
        * src/version.cc (version_string): Bump.
        * tests/*.exp: Update.
        * NEWS: Mention the changes.

2025-04-09  Bruno Haible  <bruno%clisp.org@localhost>

        Fix "make check" failure with an ISO C 23 conforming C compiler.
        Prompted by
        <https://lists.gnu.org/archive/html/bug-gperf/2025-04/msg00002.html>.
        * tests/smtp.gperf (my_case_strcmp, main): Convert from K&R C syntax
        to ISO C 90 syntax.

2025-04-09  Bruno Haible  <bruno%clisp.org@localhost>

        Avoid "-Wundef" warnings in C++ mode on the generated code.
        Reported by Heiko Becker <mail%heiko-becker.de@localhost> in
        <https://lists.gnu.org/archive/html/bug-gperf/2025-04/msg00001.html>
        and by Thomas Klausner <wiz%netbsd.org@localhost>.
        * src/output.cc (Output::output_hash_function): Emit a
        'defined __STDC_VERSION__' before the test of __STDC_VERSION__.
        * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
        tests/cplusplus.exp, tests/java.exp, tests/languages.exp,
        tests/modula2.exp, tests/objc.exp: Update.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 pkgsrc/devel/gperf/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/devel/gperf/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/gperf/patches/patch-Makefile.in
cvs rdiff -u -r1.1 -r0 pkgsrc/devel/gperf/patches/patch-src_output.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/gperf/Makefile
diff -u pkgsrc/devel/gperf/Makefile:1.33 pkgsrc/devel/gperf/Makefile:1.34
--- pkgsrc/devel/gperf/Makefile:1.33    Wed Apr  9 10:43:40 2025
+++ pkgsrc/devel/gperf/Makefile Mon May 18 12:09:03 2026
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.33 2025/04/09 10:43:40 wiz Exp $
+# $NetBSD: Makefile,v 1.34 2026/05/18 12:09:03 jperkin Exp $
 
-DISTNAME=      gperf-3.2
-PKGREVISION=   1
+DISTNAME=      gperf-3.3
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GNU:=gperf/}
 

Index: pkgsrc/devel/gperf/distinfo
diff -u pkgsrc/devel/gperf/distinfo:1.15 pkgsrc/devel/gperf/distinfo:1.16
--- pkgsrc/devel/gperf/distinfo:1.15    Wed Apr  9 10:43:40 2025
+++ pkgsrc/devel/gperf/distinfo Mon May 18 12:09:03 2026
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.15 2025/04/09 10:43:40 wiz Exp $
+$NetBSD: distinfo,v 1.16 2026/05/18 12:09:03 jperkin Exp $
 
-BLAKE2s (gperf-3.2.tar.gz) = e19507dc98ec9f50052b89a8e2f36d8e9a4909c233760abdb043a47284b1e90a
-SHA512 (gperf-3.2.tar.gz) = 97addf85e5b6f801f0f7084ec065d0d4a24a07f3fb6e60e2bc57b0f8813bd5db1bb4bed4f51fb96d0a8b278ffde1dfd0e42302cae911a619b95cc3cc46254fb3
-Size (gperf-3.2.tar.gz) = 1268603 bytes
-SHA1 (patch-src_output.cc) = ba817546030fe9364926e748228bcd0fa277801b
+BLAKE2s (gperf-3.3.tar.gz) = bb590e8b5b45257fc84f89761c5fa4eb6ce44687cbde6e3b54ce4177d71cd406
+SHA512 (gperf-3.3.tar.gz) = 246b75b8ce7d77d6a8725cd15f1cf2e68da404812573af1d5bf32dbe6ad4228f48757baefc77bcb1f5597c2397043c04d31d8a04ab507bfa7a80f85e1ab6045f
+Size (gperf-3.3.tar.gz) = 1831294 bytes
+SHA1 (patch-Makefile.in) = 2ce7e7fe370548692aa8ae32f6aa7156c5fda637

Added files:

Index: pkgsrc/devel/gperf/patches/patch-Makefile.in
diff -u /dev/null pkgsrc/devel/gperf/patches/patch-Makefile.in:1.1
--- /dev/null   Mon May 18 12:09:03 2026
+++ pkgsrc/devel/gperf/patches/patch-Makefile.in        Mon May 18 12:09:03 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile.in,v 1.1 2026/05/18 12:09:03 jperkin Exp $
+
+Fix parallel builds.  This line gets expanded to multiple for each subdir.
+
+--- Makefile.in.orig   2026-05-18 12:05:35.732575210 +0000
++++ Makefile.in
+@@ -35,7 +35,7 @@ SHELL = /bin/sh
+ VPATH = $(srcdir)
+ 
+ all : force
+-      cd @subdir@; $(MAKE) all
++      (cd @subdir@; $(MAKE) all)
+ 
+ install : force
+       cd @subdir@; $(MAKE) install



Home | Main Index | Thread Index | Old Index