From owner-svn-ports-head@freebsd.org Tue Dec 29 05:41:15 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AA354D09FD; Tue, 29 Dec 2020 05:41:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4jvb34yGz3HDl; Tue, 29 Dec 2020 05:41:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D0B826936; Tue, 29 Dec 2020 05:41:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BT5fF9x014879; Tue, 29 Dec 2020 05:41:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BT5fDjX014866; Tue, 29 Dec 2020 05:41:13 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012290541.0BT5fDjX014866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 29 Dec 2020 05:41:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r559542 - in head/devel: . libgnuregex libgnuregex/files X-SVN-Group: ports-head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/devel: . libgnuregex libgnuregex/files X-SVN-Commit-Revision: 559542 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 05:41:15 -0000 Author: kevans Date: Tue Dec 29 05:41:12 2020 New Revision: 559542 URL: https://svnweb.freebsd.org/changeset/ports/559542 Log: [NEW PORT] devel/libgnuregex: GNU regex(3) extension library This version of libgnuregex is based on the latest version of devel/gnulib in the tree, and is intended as a direct replacement for the libgnuregex that has been historically provided in base. A port was chosen over all consumers dragging in devel/gnulib to save rebuilds since more than ~5 consumers need libgnuregex, and this also makes for an easier migration as ports just need to bring in the port and make sure LOCALBASE/lib and LOCALBASE/inclue are included. It is currently expected that ports dependant on this will fully specify the shlib version against ports tree convention so that we can provide a consistent experience across all versions of FreeBSD, past and future, using a less-broken version of the library. PR: 252245 Added: head/devel/libgnuregex/ head/devel/libgnuregex/Makefile (contents, props changed) head/devel/libgnuregex/files/ head/devel/libgnuregex/files/Makefile (contents, props changed) head/devel/libgnuregex/files/config.h (contents, props changed) head/devel/libgnuregex/files/gnuregex.h (contents, props changed) head/devel/libgnuregex/files/patch-regex.c (contents, props changed) head/devel/libgnuregex/files/patch-regex.h (contents, props changed) head/devel/libgnuregex/files/patch-regex__internal.h (contents, props changed) head/devel/libgnuregex/pkg-descr (contents, props changed) head/devel/libgnuregex/pkg-plist (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Tue Dec 29 04:04:14 2020 (r559541) +++ head/devel/Makefile Tue Dec 29 05:41:12 2020 (r559542) @@ -1194,6 +1194,7 @@ SUBDIR += libglade2 SUBDIR += libglademm24 SUBDIR += libgnt + SUBDIR += libgnuregex SUBDIR += libgpc SUBDIR += libgpkg SUBDIR += libgrading Added: head/devel/libgnuregex/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libgnuregex/Makefile Tue Dec 29 05:41:12 2020 (r559542) @@ -0,0 +1,37 @@ +# $FreeBSD$ + +PORTNAME= libgnuregex +PORTVERSION= 6.0 +CATEGORIES= devel +MASTER_SITES= # Nothing to fetch +DISTFILES= # Nothing to fetch + +MAINTAINER= kevans@FreeBSD.org +COMMENT= GNU Regex Library + +LICENSE= LGPL20+ + +EXTRACT_DEPENDS= gnulib>0:devel/gnulib + +USES= uidfix +USE_LDCONFIG= yes + +MAKE_ENV+= INCLUDEDIR="${PREFIX}/include" LIBDIR="${PREFIX}/lib" + +REGEX_FILES= lib/regex.c \ + lib/regex.h \ + lib/regex_internal.c \ + lib/regex_internal.h \ + lib/regexec.c \ + lib/regcomp.c + +do-extract: + ${MKDIR} ${WRKSRC} + ${CP} -a ${REGEX_FILES:C,^,${LOCALBASE}/share/gnulib/,} ${WRKSRC} + ${CP} -a ${FILESDIR}/config.h ${FILESDIR}/gnuregex.h \ + ${FILESDIR}/Makefile ${WRKSRC} + +pre-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/include/gnu + +.include Added: head/devel/libgnuregex/files/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libgnuregex/files/Makefile Tue Dec 29 05:41:12 2020 (r559542) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +LIB= gnuregex +SHLIB_MAJOR= 6 + +MK_PROFILE:= no + +SRCS= regex.c + +INCSGROUPS= INCS WRINCS +INCS= regex.h +INCSDIR= ${INCLUDEDIR}/gnu +WRINCS= gnuregex.h + +.include Added: head/devel/libgnuregex/files/config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libgnuregex/files/config.h Tue Dec 29 05:41:12 2020 (r559542) @@ -0,0 +1,15 @@ +/* $FreeBSD$ */ + +#define _REGEX_RE_COMP 1 +#define HAVE_LANGINFO_H 1 +#define HAVE_LANGINFO_CODESET 1 +#define HAVE_LOCALE_H 1 +#define HAVE_WCHAR_H 1 +#define HAVE_WCTYPE_H 1 +#define HAVE_ISBLANK 1 +#define HAVE_WCRTOMB 1 +#define HAVE_MBRTOWC 1 +#define HAVE_WCSCOLL 1 +#define HAVE_ALLOCA 1 +#define HAVE_STDBOOL_H 1 +#define HAVE_STDINT_H 1 Added: head/devel/libgnuregex/files/gnuregex.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libgnuregex/files/gnuregex.h Tue Dec 29 05:41:12 2020 (r559542) @@ -0,0 +1,33 @@ +/*- + * Copyright (c) 2004 David E. O'Brien + * Copyright (c) 2004 Andrey A. Chernov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifdef __GNUC__ +#warning "Use -I/usr/include/gnu and instead of " +#endif +#include Added: head/devel/libgnuregex/files/patch-regex.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libgnuregex/files/patch-regex.c Tue Dec 29 05:41:12 2020 (r559542) @@ -0,0 +1,20 @@ +--- regex.c.orig 2014-02-03 00:48:46 UTC ++++ regex.c +@@ -18,7 +18,7 @@ + . */ + + #ifndef _LIBC +-# include ++# include "config.h" + + # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ + # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +@@ -64,7 +64,7 @@ + #undefs RE_DUP_MAX and sets it to the right value. */ + #include + +-#include ++#include "regex.h" + #include "regex_internal.h" + + #include "regex_internal.c" Added: head/devel/libgnuregex/files/patch-regex.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libgnuregex/files/patch-regex.h Tue Dec 29 05:41:12 2020 (r559542) @@ -0,0 +1,11 @@ +--- regex.h.orig 2020-12-28 19:24:49 UTC ++++ regex.h +@@ -30,7 +30,7 @@ extern "C" { + + /* Define __USE_GNU to declare GNU extensions that violate the + POSIX name space rules. */ +-#ifdef _GNU_SOURCE ++#if defined(_GNU_SOURCE) || defined(__BSD_VISIBLE) + # define __USE_GNU 1 + #endif + Added: head/devel/libgnuregex/files/patch-regex__internal.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libgnuregex/files/patch-regex__internal.h Tue Dec 29 05:41:12 2020 (r559542) @@ -0,0 +1,11 @@ +--- regex_internal.h.orig 2020-12-28 19:25:52 UTC ++++ regex_internal.h +@@ -481,7 +481,7 @@ static unsigned int re_string_context_at (const re_str + #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) + #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) + +-#if defined _LIBC || HAVE_ALLOCA ++#if defined _LIBC || (HAVE_ALLOCA && HAVE_ALLOCA_H) + # include + #endif + Added: head/devel/libgnuregex/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libgnuregex/pkg-descr Tue Dec 29 05:41:12 2020 (r559542) @@ -0,0 +1,11 @@ +libgnuregex is the regex subset of Gnulib, the GNU portability library. The +regex subset offers an extension of the regex(3) API to allow more flexibility +in the flavor of regular expressions. libgnuregex also enhances POSIX +regular expressions with more features and shorthand, such as: + +- \b and \B (word boundary, not word boundary) +- \s and \S ([[:space:]], [^[:space:]]) +- \w and \W ([[:alnum:]], [^[:alnum:]]) +- \` and \' (beginning of subject, end of subject) + +WWW: http://www.gnu.org/software/gnulib/ Added: head/devel/libgnuregex/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libgnuregex/pkg-plist Tue Dec 29 05:41:12 2020 (r559542) @@ -0,0 +1,5 @@ +include/gnu/regex.h +include/gnuregex.h +lib/libgnuregex.a +lib/libgnuregex.so +lib/libgnuregex.so.6