aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 John Darrington
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2020, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages regex)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix gexp)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system cmake)
  #:use-module (guix utils)
  #:use-module (gnu packages check)
  #:use-module (gnu packages cpp))

(define-public re2
   (package
     (name "re2")
     (version "2022-12-01")
     (home-page "https://github.com/google/re2")
     (source (origin
               (method git-fetch)
               (uri (git-reference (url home-page) (commit version)))
               (file-name (git-file-name name version))
               (sha256
                (base32
                 "0g627a5ppyarhf2ph4gyzj89pwbkwfjfajgljzkmjafjmdyxfqs6"))))
     (build-system gnu-build-system)
     (arguments
      (list #:test-target "test"
            ;; There is no configure step, but the Makefile respects a prefix.
            #:make-flags #~(list (string-append "prefix=" #$output)
                                 (string-append "CXX=" #$(cxx-for-target)))
            #:phases
            #~(modify-phases %standard-phases
                (delete 'configure)
                (add-after 'install 'delete-static-library
                  (lambda _
                    ;; No make target for shared-only; delete the static version.
                    (delete-file (string-append #$output "/lib/libre2.a")))))))
     (synopsis "Fast, safe, thread-friendly regular expression engine")
     (description "RE2 is a fast, safe, thread-friendly alternative to
backtracking regular expression engines like those used in PCRE, Perl and
Python.  It is a C++ library.")
     (license license:bsd-3)))

(define-public re2-next
  (package
    (inherit re2)
    (name "re2")
    (version "2024-07-02")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/google/re2")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "11q0kz8b3y5ysn58fr62yhib520f9l3grbn8gxr8x5s9k700vq11"))))
    (build-system cmake-build-system)
    (arguments (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"
                                               ;; "-DRE2_USE_ICU=ON"
                                               #$@(if (%current-target-system)
                                                      #~("-DRE2_BUILD_TESTING=ON")
                                                      #~()))))
    (native-inputs (list googletest))
    (propagated-inputs (list abseil-cpp))))

(define-public tre
  (package
    (name "tre")
    (version "0.8.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://laurikari.net/tre/"
                                  name "-" version ".tar.bz2"))
              (sha256
               (base32
                "0n36cgqys59r2gmb7jzbqiwsy790v8nbxk82d2n2saz0rp145ild"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'check 'install-locales
           (lambda _
             ;; The tests require the availability of the
             ;; 'en_US.ISO-8859-1' locale.
             (setenv "LOCPATH" (getcwd))
             (invoke "localedef" "--no-archive"
                     "--prefix" (getcwd) "-i" "en_US"
                     "-f" "ISO-8859-1" "./en_US.ISO-8859-1"))))))
    (synopsis "Approximate regex matching library and agrep utility")
    (description "Superset of the POSIX regex API, enabling approximate
matching.  Also ships a version of the agrep utility which behaves similar to
grep but features inexact matching.")
    (home-page "https://laurikari.net/tre")
    (license license:bsd-2)))
ooltip'>* gnu/packages/sdl.scm (sdl2)[arguments]: Remove #:make-flags. Marius Bakke 2020-02-03Merge branch 'staging' into core-updatesMarius Bakke 2020-02-02gnu: Add sdl-pango....* gnu/packages/sdl.scm (sdl-pango): New variable. * gnu/packages/patches/sdl-pango-api_additions.patch: New file. * gnu/packages/patches/sdl-pango-blit_overflow.patch: New file. * gnu/packages/patches/sdl-pango-fillrect_crash.patch: New file. * gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_CopyFTBitmapToSurface.patch: New file. * gnu/packages/patches/sdl-pango-matrix_declarations.patch: New file. * gnu/packages/patches/sdl-pango-sans-serif.patch: New file. * gnu/local.mk (sdl-pango): Reference patches. add Nicolas Goaziou 2020-01-22gnu: Replace uses of 'libjpeg' with 'libjpeg-turbo'....* gnu/packages/abiword.scm (abiword)[inputs]: Change from LIBJPEG to LIBJPEG-TURBO. * gnu/packages/admin.scm (testdisk)[inputs]: Likewise. * gnu/packages/algebra.scm (giac)[inputs]: Likewise. * gnu/packages/animation.scm (synfig)[inputs]: Likewise. * gnu/packages/astronomy.scm (gnuastro, celestia)[inputs]: Likewise. * gnu/packages/cdrom.scm (dvdstyler)[inputs]: Likewise. * gnu/packages/cran.scm (r-jpeg, r-tiff, r-readbitmap)[inputs]: Likewise. * gnu/packages/cups.scm (cups-filters, hplip)[inputs]: Likewise. * gnu/packages/display-managers.scm (slim)[inputs]: Likewise. * gnu/packages/ebook.scm (fbreader)[inputs]: Likewise. * gnu/packages/emacs.scm (emacs)[inputs]: Likewise. * gnu/packages/enlightenment.scm (efl)[propagated-inputs]: Likewise. * gnu/packages/fltk.scm (fltk, ntk)[inputs]: Likewise. * gnu/packages/fontutils.scm (fontforge)[inputs]: Likewise. * gnu/packages/freedesktop.scm (weston)[inputs]: Likewise. * gnu/packages/game-development.scm (sfml, allegro, aseprite, python-pygame, eureka, ioquake3)[inputs]: Likewise. * gnu/packages/games.scm (adanaxisgpl, freedroidrpg, irrlicht, minetest, fizmo, supertuxkart, gzdoom, xmoto, xonotic)[inputs]: Likewise. * gnu/packages/gd.scm (gd, perl-gd)[inputs]: Likewise. * gnu/packages/ghostscript.scm (lcms)[inputs]: Likewise. (ghostscript)[inputs, native-inputs]: Likewise. * gnu/packages/gimp.scm (gegl, gimp)[inputs]: Likewise. * gnu/packages/gnome.scm (libgnomeui, eog, tracker-miners, gthumb)[inputs]: Likewise. * gnu/packages/gnunet.scm (libextractor)[inputs]: Likewise. * gnu/packages/gnustep.scm (windowmaker)[inputs]: Likewise. * gnu/packages/graphics.scm (blender, blender-2.79, openimageio, openscenegraph, openscenegraph-3.4, povray, fgallery)[inputs]: Likewise. * gnu/packages/graphviz.scm (graphviz)[inputs]: Likewise. * gnu/packages/gstreamer.scm (gst-plugins-good)[inputs]: Likewise. * gnu/packages/gtk.scm (gdk-pixbuf)[inputs]: Likewise. * gnu/packages/image-processing.scm (dcmtk, mia, vtk, opencv, vips, nip2, vxl, insight-toolkit)[inputs]: Likewise. * gnu/packages/image-viewers.scm (gpicview, luminance-hdr)[inputs]: Likewise. * gnu/packages/image.scm (jpegoptim, libtiff, leptonica, imlib2, freeimage, vigra, libwebp, libmng, jasper, steghide, jp2a)[inputs]: Likewise. * gnu/packages/imagemagick.scm (imagemagick, graphicsmagick)[inputs]: Likewise. * gnu/packages/java.scm (icedtea-6, icedtea-7, openjdk9, openjdk11, openjdk12)[inputs]: Likewise. * gnu/packages/kde-frameworks.scm (khtml)[inputs]: Likewise. * gnu/packages/kodi.scm (kodi)[inputs]: Likewise. * gnu/packages/machine-learning.scm (dlib, tensorflow)[inputs]: Likewise. * gnu/packages/mate.scm (atril, eom)[inputs]: Likewise. * gnu/packages/maths.scm (hdf4, hdf-java, hdf-eos2, netcdf)[inputs]: Likewise. * gnu/packages/netpbm.scm (netpbm)[inputs]: Likewise. * gnu/packages/pdf.scm (zathura-pdf-mupdf, podofo, mupdf, fbida)[inputs]: Likewise. * gnu/packages/photo.scm (libraw, libpano13, enblend-enfuse, darktable, hugin, rawtherapee)[inputs]: Likewise. * gnu/packages/prolog.scm (swi-prolog)[native-inputs]: Likewise. * gnu/packages/python-xyz.scm (python-hdf4, python-pillow)[inputs]: Likewise. * gnu/packages/qt.scm (qtbase, qtwebkit)[inputs]: Likewise. * gnu/packages/rdesktop.scm (freerdp)[inputs]: Likewise. * gnu/packages/scanner.scm (sane-backends, xsane)[inputs]: Likewise. * gnu/packages/scheme.scm (racket)[inputs]: Likewise. * gnu/packages/scribus.scm (scribus)[inputs]: Likewise. * gnu/packages/sdl.scm (sdl-image)[propagated-inputs]: Likewise. (guile-sdl)[native-inputs]: Likewise. * gnu/packages/spice.scm (spice-gtk)[inputs]: Likewise. * gnu/packages/statistics.scm (r-with-tests)[inputs]: Likewise. * gnu/packages/tcl.scm (perl-tk)[inputs]: Likewise. * gnu/packages/upnp.scm (readymedia)[inputs]: Likewise. * gnu/packages/video.scm (mplayer, mpv, v4l-utils, motion)[inputs]: Likewise. * gnu/packages/web-browsers.scm (dillo, links)[inputs]: Likewise. * gnu/packages/web.scm (netsurf)[inputs]: Likewise. * gnu/packages/webkit.scm (webkitgtk)[inputs]: Likewise. * gnu/packages/wine.scm (wine)[inputs]: Likewise. * gnu/packages/wv.scm (wv)[inputs]: Likewise. * gnu/packages/wxwidgets.scm (wxwidgets, wxwidgets-2)[inputs]: Likewise. * gnu/packages/xdisorg.scm (xscreensaver)[inputs]: Likewise. * gnu/packages/xfce.scm (tumbler)[inputs]: Likewise. * gnu/packages/xfig.scm (xfig, transfig)[inputs]: Likewise. * gnu/packages/xorg.scm (xpra)[inputs]: Likewise. Marius Bakke 2020-01-09gnu: sdl2-image: Update to 2.0.5....* gnu/packages/sdl.scm (sdl2-image): Update to 2.0.5. Oleg Pykhalov 2020-01-07gnu: sdl-mixer: Fix fluidsynth in dependents....Fixes <https://bugs.gnu.org/39008>. Reported by Pierre Neidhardt <mail@ambrevar.xyz>. * gnu/packages/sdl.scm (sdl-mixer)[arguments]<#:phases>[fix-fluidsynth]: New phase. Danny Milosavljevic 2020-01-06gnu: sdl-mixer: Describe runtime configuration....* gnu/packages/sdl.scm (sdl-mixer)[description]: Add information about runtime MIDI playback options. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Timotej Lazar 2020-01-05gnu: sdl2-mixer: Enable opus support....* gnu/packages/sdl.scm (sdl2-mixer)[inputs]: Add opusfile. [native-inputs]: Add pkg-config. [arguments]<#:configure-flags>: Add "--disable-music-opus-shared". Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Timotej Lazar 2020-01-05gnu: sdl-mixer: Enable fluidsynth MIDI backend....* gnu/packages/sdl.scm (sdl-mixer)[inputs]: Add fluidsynth and alphabetize. [arguments]: Reformat. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Timotej Lazar 2020-01-05gnu: sdl2-mixer: Fix configure flags....Some configure options were renamed between SDL / SDL2 mixer; add new variants to the derived package. * gnu/packages/sdl.scm (sdl2-mixer)[arguments]: Fix flags to disable dynamic library loading. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Timotej Lazar 2020-01-05gnu: sdl-mixer: Remove unused configure flag....The flag --disable-music-mp3-shared is only used when building with smpeg instead of libmad, which is linked at build time by default. * gnu/packages/sdl.scm (sdl-mixer)[arguments]: Remove unused configure flag. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Timotej Lazar 2020-01-05gnu: sdl-mixer: Use correct inputs for MOD file support....* gnu/packages/sdl.scm (sdl-mixer)[inputs]: Remove libmodplug. * gnu/packages/sdl.scm (sdl2-mixer)[inputs]: Add libmodplug. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Timotej Lazar 2020-01-03gnu: Add sdl2-cs....* gnu/packages/sdl.scm (sdl2-cs): New variable. Pierre Neidhardt 2019-11-28Merge branch 'master' into stagingMarius Bakke 2019-11-24gnu: sdl2: Add libxcursor to inputs....* gnu/packages/sdl.scm (sdl2)[inputs]: Add libxcursor. Oleg Pykhalov 2019-10-15gnu: sdl2: Fix build on 32-bit architectures....* gnu/packages/patches/sdl2-mesa-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/sdl.scm (sdl2)[source](patches): New field. Marius Bakke 2019-07-31Merge branch 'master' into core-updatesMarius Bakke 2019-07-26gnu: sdl2: Update to 2.0.10....* gnu/packages/sdl.scm (sdl2): Update to 2.0.10. Rutger Helling 2019-07-03gnu: sdl2: Fix FTBFS with GCC7....* gnu/packages/sdl.scm (sdl2)[arguments]: Add <#:make-flags>. Marius Bakke 2019-06-05gnu: guile-sdl2: Update to 0.4.0....* gnu/packages/sdl.scm (guile-sdl2): Update to 0.4.0. Ricardo Wurmus 2019-04-29gnu: Add sdl2-net....* gnu/packages/sdl.scm (sdl2-net): New variable. Nicolas Goaziou 2019-04-08Merge branch 'master' into stagingMarius Bakke 2019-04-04gnu: Mov ghc-sdl2 & co. to haskell-apps.scm....* gnu/packages/sdl.scm (ghc-sdl2, ghc-sdl2-mixer, ghc-sdl2-image): Move to... * gnu/packages/haskell-apps.scm: ... here. Ludovic Courtès 2019-03-19gnu: mesa: Update to 18.3.5....* gnu/packages/gl.scm (mesa): Update to 18.3.5. [build-system]: Switch to meson-build-system. [native-inputs]: Add "bison", "flex" and "gettext-minimal". [arguments]: Adjust arguments to Meson. * gnu/packages/sdl.scm (sdl)[propogated-inputs]: Add mesa. [inputs]: Remove mesa. Rutger Helling 2019-03-04Merge branch 'master' into stagingMarius Bakke 2019-03-01gnu: sdl2: Add KMSDRM video backend....* gnu/packages/sdl.scm (sdl2): Add KMSDRM video backend. Rutger Helling 2019-02-24Merge branch 'master' into stagingMarius Bakke 2019-02-23gnu: libSDL: Build verbosely....* gnu/packages/sdl.scm (sdl)[arguments]: Add #:make-flags. Marius Bakke 2019-02-22gnu: Add sdl2-gfx....* gnu/packages/sdl.scm (sdl2-gfx): New variable. Kei Kebreau 2019-02-14gnu: sdl2-mixer: Update to 2.0.4....* gnu/packages/sdl.scm (sdl2-mixer): Update to 2.0.4. Tobias Geerinckx-Rice 2019-02-14gnu: sdl2-image: Update to 2.0.4....* gnu/packages/sdl.scm (sdl2-image): Update to 2.0.4. Tobias Geerinckx-Rice 2019-02-08gnu: sdl2-ttf: Update to 2.0.15....* gnu/packages/sdl.scm (sdl2-ttf): Update to 2.0.15. Tobias Geerinckx-Rice