From nobody Thu Jun 23 17:48:34 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C7534871922; Thu, 23 Jun 2022 17:48:34 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LTSR65JJZz3JB6; Thu, 23 Jun 2022 17:48:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656006514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oQfCq1cUQK5sXT2rdGvyXLrVH50x5GuMmkUwpWu/1tU=; b=qEJD9+kT30LcgcdwbU6zCywl6owZyPJiXTqo7V+BoBxMTfouZdyrna0dMVa2B4w0lQiv7u UegLJDhp7f/18CS/9D1NgF7CTgrCh5IBXOCfz/JGAwgDrzM/ljMoIQ/uz5Iqy7KvWpXMhB Mv/Bqg0OyaEUKiVSARhYMAR1fEW7MMupE/DKerV8PehNBy18lcj08taSL59ZabcyfGh6Fn iAAwW6ZhzjRfS5ZswGA9RaQqIgRulyqo4yrK1Y0mubnQ/zq4y3rvkZg9FmpKQws7yDPEsr BvFmGp2bqxlOjIZzysUCPV2O6sme8MN5w91qU9fDx30DaPqb2viex94aE5wHwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 959F91F855; Thu, 23 Jun 2022 17:48:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25NHmYm9073817; Thu, 23 Jun 2022 17:48:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25NHmYI9073816; Thu, 23 Jun 2022 17:48:34 GMT (envelope-from git) Date: Thu, 23 Jun 2022 17:48:34 GMT Message-Id: <202206231748.25NHmYI9073816@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Joseph Mingrone Subject: git: b001febccb5d - main - textproc/peg: [New port] recursive-descent parser generators for C List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b001febccb5de5467426a52b68d355007ddc8c86 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656006514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oQfCq1cUQK5sXT2rdGvyXLrVH50x5GuMmkUwpWu/1tU=; b=wamE1lCV2dHlS3SHYtaHyHASIkte5rN1iHqq4Dw9ROOVQNyE1OkkxiezNDP0byez+6UGMv kfta5KnXWtkmJceQNxQfAMv8SOtRbH5hLOKcgLBaPswhYVZ7hI84b7H0QJn5YcPs0vqgOu C0RZngeev+Nk/9U02uF64Ei/8zTw78iz2uwrTROQnelwsdlqMjJ9Wltt7ZxVd+KP/YKjfh 1r1g+uBSVaZkdchjkL3G0AgQFE8K4y/YN1VBKNrNpUgnaTPUaNUAbybNoHjxR3TFdAfqz+ IDQXY0qFy8Jf03nHDxqOrONfEWFQRLJG4I2XKhuKEx427NMKwXDD9qS2ndB9CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656006514; a=rsa-sha256; cv=none; b=kQF1n/+gH+boaELDLOZ7GhfojeY5URo5xB08P6//XkoK1kPsZ9XD+qTIStDDKYfLCwdueK Otyi5Srf4gWRisH6riZcFPoaWvdP8cDElTE0tZVyZseTtm2B7pio6z2fQ6LVT70yQUbRnP 89DHYVt+PKFVq8VM+4BQ/Wj6IAj1Dv8uhvxNMoyC/OLVTaa91+VRjh3e2yO/Sbsog3i/lj iB93sPMqoGNZMHmCvcQn915CmPi0NcEwL68QChMY/JTWTGoNNxadS49YEU4rq/6xavUEyU LhsrJeEKBvprlg42C8+yzwI7Ps+EAPWUEscXny0n1wVjIW2R7EfdKML4im+SjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/ports/commit/?id=b001febccb5de5467426a52b68d355007ddc8c86 commit b001febccb5de5467426a52b68d355007ddc8c86 Author: Joseph Mingrone AuthorDate: 2022-06-23 09:06:19 +0000 Commit: Joseph Mingrone CommitDate: 2022-06-23 17:40:42 +0000 textproc/peg: [New port] recursive-descent parser generators for C WWW: https://www.piumarta.com/software/peg/ Sponsored by: The FreeBSD Foundation --- textproc/Makefile | 1 + textproc/peg/Makefile | 21 +++++++++++++++++++++ textproc/peg/distinfo | 3 +++ textproc/peg/files/patch-Makefile | 19 +++++++++++++++++++ textproc/peg/pkg-descr | 17 +++++++++++++++++ 5 files changed, 61 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index 41820b06ecc3..70847ef88fa9 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1219,6 +1219,7 @@ SUBDIR += pecl-xdiff2 SUBDIR += pecl-yaml SUBDIR += peco + SUBDIR += peg SUBDIR += perl2html SUBDIR += php-mecab SUBDIR += php74-ctype diff --git a/textproc/peg/Makefile b/textproc/peg/Makefile new file mode 100644 index 000000000000..609978d62fc4 --- /dev/null +++ b/textproc/peg/Makefile @@ -0,0 +1,21 @@ +PORTNAME= peg +DISTVERSION= 0.1.18 +CATEGORIES= textproc +MASTER_SITES= https://www.piumarta.com/software/peg/ + +MAINTAINER= jrm@FreeBSD.org +COMMENT= Recursive-descent parser generators for C + +LICENSE= MIT + +USES= gmake + +PLIST_FILES= bin/leg \ + bin/peg \ + man/man1/peg.1.gz + +post-patch: + @${REINPLACE_CMD} -e 's,%%STAGEDIR%%,${STAGEDIR},g' \ + -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/Makefile + +.include diff --git a/textproc/peg/distinfo b/textproc/peg/distinfo new file mode 100644 index 000000000000..09745daa3e9f --- /dev/null +++ b/textproc/peg/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1655934585 +SHA256 (peg-0.1.18.tar.gz) = 20193bdd673fc7487a38937e297fff08aa73751b633a086ac28c3b34890f9084 +SIZE (peg-0.1.18.tar.gz) = 57776 diff --git a/textproc/peg/files/patch-Makefile b/textproc/peg/files/patch-Makefile new file mode 100644 index 000000000000..dcba9dc57e3a --- /dev/null +++ b/textproc/peg/files/patch-Makefile @@ -0,0 +1,19 @@ +--- Makefile.orig 2016-07-22 00:55:15 UTC ++++ Makefile +@@ -1,4 +1,4 @@ +-CFLAGS = -g -Wall $(OFLAGS) $(XFLAGS) -Isrc ++CFLAGS = -Wall $(OFLAGS) $(XFLAGS) -Isrc + OFLAGS = -O3 -DNDEBUG + #OFLAGS = -pg + +@@ -14,8 +14,8 @@ leg : leg.o $(OBJS) + $(CC) $(CFLAGS) -o $@-new leg.o $(OBJS) + mv $@-new $@ + +-ROOT = +-PREFIX = /usr/local ++ROOT = %%STAGEDIR%% ++PREFIX = %%PREFIX%% + BINDIR = $(ROOT)$(PREFIX)/bin + MANDIR = $(ROOT)$(PREFIX)/man/man1 + diff --git a/textproc/peg/pkg-descr b/textproc/peg/pkg-descr new file mode 100644 index 000000000000..66f68871348f --- /dev/null +++ b/textproc/peg/pkg-descr @@ -0,0 +1,17 @@ +peg and leg are tools for generating recursive-descent parsers: programs +that perform pattern matching on text. They processes a Parsing +Expression Grammar (PEG) [Ford 2004] to produce a program that +recognises legal sentences of that grammar. peg processes PEGs written +using the original syntax described by Ford; leg processes PEGs written +using slightly different syntax and conventions that are intended to +make it an attractive replacement for parsers built with lex and +yacc. Unlike lex and yacc, peg and leg support unlimited backtracking, +provide ordered choice as a means for disambiguation, and can combine +scanning (lexical analysis) and parsing (syntactic analysis) into a +single activity. + +[Ford 2004] Bryan Ford, Parsing Expression Grammars: A Recognition-Based +Syntactic Foundation. ACM SIGPLAN Symposium on Principles of Programming +Languages (POPL), 2004. + +WWW: https://www.piumarta.com/software/peg/