Update to apertium-recursive-1.2.1.

This commit is contained in:
bentley
2025-11-11 17:40:56 +00:00
parent f648adf3cc
commit 7307a7c2a7
5 changed files with 22 additions and 31 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
COMMENT = recursive structural transfer module for apertium
DISTNAME = apertium-recursive-$V
V = 1.1.2
V = 1.2.1
CATEGORIES = textproc
@@ -33,7 +33,7 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include/utf8cpp"
DEBUG_PACKAGES = ${BUILD_PACKAGES}
AUTOCONF_VERSION = 2.71
AUTOMAKE_VERSION = 1.16
AUTOCONF_VERSION = 2.72
AUTOMAKE_VERSION = 1.18
.include <bsd.port.mk>
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (apertium-recursive-1.1.2.tar.bz2) = DsT4rEE6RLsto2WFadrKXvP+wyjlnntEXf7OyiiqS1A=
SIZE (apertium-recursive-1.1.2.tar.bz2) = 81318
SHA256 (apertium-recursive-1.2.1.tar.bz2) = HU+suBX5En+Nmo3MxjbtU/OdB7Ma4X5a0PGGU1byB10=
SIZE (apertium-recursive-1.2.1.tar.bz2) = 81753
@@ -1,16 +1,14 @@
Index: src/rtx_comp.cc
--- src/rtx_comp.cc.orig
+++ src/rtx_comp.cc
@@ -7,6 +7,7 @@
#include <getopt.h>
@@ -7,11 +7,17 @@
#include <iostream>
#include <libxml/xmlreader.h>
#include <trx_compiler.h>
+#include <unistd.h>
using namespace std;
@@ -33,6 +34,11 @@ void endProgram(char *name)
int main(int argc, char *argv[])
{
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
@@ -19,5 +17,5 @@ Index: src/rtx_comp.cc
+ exit(EXIT_FAILURE);
+ }
LtLocale::tryToSetLocale();
#if HAVE_GETOPT_LONG
CLI cli("compile .rtx files", PACKAGE_VERSION);
cli.add_str_arg('e', "exclude", "exclude a rule by name", "NAME");
@@ -1,26 +1,23 @@
Index: src/rtx_decomp.cc
--- src/rtx_decomp.cc.orig
+++ src/rtx_decomp.cc
@@ -9,7 +9,10 @@
@@ -9,6 +9,7 @@
#include <cstring>
#include <cstdio>
#include <unicode/ustdio.h>
+#include <unistd.h>
+using namespace std;
+
void endProgram(char *name)
void writeRule(UString rule, UFILE* out)
{
std::cout << basename(name) << ": decompile a transfer bytecode file" << std::endl;
@@ -218,6 +221,11 @@ void writeRule(UString rule, UFILE* out)
@@ -212,6 +213,11 @@ void writeRule(UString rule, UFILE* out)
int main(int argc, char *argv[])
{
+ if (pledge("stdio wpath rpath cpath", NULL) == -1)
+ {
+ wcerr << "pledge" << endl;
+ std::wcerr << "pledge" << std::endl;
+ exit(EXIT_FAILURE);
+ }
#if HAVE_GETOPT_LONG
static struct option long_options[]=
{
LtLocale::tryToSetLocale();
CLI cli("decompile a transfer bytecode file", PACKAGE_VERSION);
cli.add_bool_arg('h', "help", "print this message and exit");
@@ -1,16 +1,12 @@
Index: src/rtx_proc.cc
--- src/rtx_proc.cc.orig
+++ src/rtx_proc.cc
@@ -4,6 +4,7 @@
#include <getopt.h>
#include <libgen.h>
@@ -4,9 +4,15 @@
#include <lttoolbox/file_utils.h>
#include <lttoolbox/lt_locale.h>
#include <iostream>
+#include <unistd.h>
void endProgram(char *name)
{
@@ -42,6 +43,11 @@ void endProgram(char *name)
int main(int argc, char *argv[])
{
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
@@ -18,6 +14,6 @@ Index: src/rtx_proc.cc
+ cerr << "pledge" << endl;
+ exit(EXIT_FAILURE);
+ }
RTXProcessor p;
#if HAVE_GETOPT_LONG
LtLocale::tryToSetLocale();
CLI cli("perform structural transfer", PACKAGE_VERSION);
cli.add_bool_arg('a', "anaphora", "expect coreference LUs from apertium-anaphora");