git: db99cb34e02c - main - devel/styx: Re-add port: Scanner/parser generator

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 18 Nov 2023 05:53:32 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=db99cb34e02cc0e0aa94288514f8b59436cca7cc

commit db99cb34e02cc0e0aa94288514f8b59436cca7cc
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-11-18 05:51:47 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-11-18 05:53:03 +0000

    devel/styx: Re-add port: Scanner/parser generator
---
 MOVED                                      |   1 -
 devel/Makefile                             |   1 +
 devel/styx/Makefile                        |  25 +++++++
 devel/styx/distinfo                        |   3 +
 devel/styx/files/patch-configure.in        |  19 +++++
 devel/styx/files/patch-libbase__sysbase1.c |  29 ++++++++
 devel/styx/pkg-descr                       |  11 +++
 devel/styx/pkg-plist                       | 107 +++++++++++++++++++++++++++++
 8 files changed, 195 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index dbd4665990e1..830ae4d3c1f4 100644
--- a/MOVED
+++ b/MOVED
@@ -2633,7 +2633,6 @@ devel/py-pqueue||2019-10-16|Has expired: Unfetchable, unmaintained
 devel/pypersrc||2019-10-16|Has expired: Unfetchable, unmaintained
 devel/root-doc||2019-10-16|Has expired: Unfetchable, unmaintained
 devel/sfio||2019-10-16|Has expired: Unfetchable, unmaintained
-devel/styx||2019-10-16|Has expired: Unfetchable, unmaintained
 devel/tclmore||2019-10-16|Has expired: Unfetchable, unmaintained
 devel/umem||2019-10-16|Has expired: Unfetchable, unmaintained
 dns/ez-ipupdate||2019-10-16|Has expired: Unfetchable, unmaintained
diff --git a/devel/Makefile b/devel/Makefile
index d31e04ec83f3..b78a81e3dc21 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -7667,6 +7667,7 @@
     SUBDIR += stuffbin
     SUBDIR += stxxl
     SUBDIR += stylua
+    SUBDIR += styx
     SUBDIR += subversion
     SUBDIR += subversion-book
     SUBDIR += subversion-lts
diff --git a/devel/styx/Makefile b/devel/styx/Makefile
new file mode 100644
index 000000000000..4e4e4c9ef889
--- /dev/null
+++ b/devel/styx/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	styx
+DISTVERSION=	2.0.1
+CATEGORIES=	devel
+MASTER_SITES=	http://speculate.de/
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Scanner/parser generator
+WWW=		http://www.speculate.de/
+
+LICENSE=	GPLv3
+
+USES=		autoreconf gmake iconv libtool
+USE_LDCONFIG=	yes
+
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--includedir=${PREFIX}/include/${PORTNAME}
+
+INSTALL_TARGET=	install-strip
+
+OPTIONS_DEFINE=	EXAMPLES DOCS
+
+PORTDOCS=	*
+PORTEXAMPLES=	*
+
+.include <bsd.port.mk>
diff --git a/devel/styx/distinfo b/devel/styx/distinfo
new file mode 100644
index 000000000000..b2be039db2e7
--- /dev/null
+++ b/devel/styx/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1700284539
+SHA256 (styx-2.0.1.tar.gz) = f370319fe87ce5c61dfad2bb36ecd6574b3af13f314e1b580e1ec1bfabea0086
+SIZE (styx-2.0.1.tar.gz) = 6957941
diff --git a/devel/styx/files/patch-configure.in b/devel/styx/files/patch-configure.in
new file mode 100644
index 000000000000..540570ed9706
--- /dev/null
+++ b/devel/styx/files/patch-configure.in
@@ -0,0 +1,19 @@
+--- configure.in.orig	2003-12-09 15:36:00 UTC
++++ configure.in
+@@ -61,13 +61,13 @@ AC_CHECK_FUNCS(dlerror)
+ dnl AC_PREFIX_DEFAULT(/usr/local/styx)
+ 
+ AC_CACHE_CHECK( [where to install HTML documents],
+-		[ac_cv_htmldir],[ac_cv_htmldir='$(datadir)/doc'])
++		[ac_cv_htmldir],[ac_cv_htmldir='$(datadir)/doc/styx'])
+ htmldir=$ac_cv_htmldir
+ AC_CACHE_CHECK( [where to install SGML documents],
+-		[ac_cv_sgmldir],[ac_cv_sgmldir='$(datadir)/doc'])
++		[ac_cv_sgmldir],[ac_cv_sgmldir='$(datadir)/doc/styx'])
+ sgmldir=$ac_cv_sgmldir
+ AC_CACHE_CHECK( [where to install examples],
+-		[ac_cv_sampledir],[ac_cv_sampledir='$(datadir)/examples'])
++		[ac_cv_sampledir],[ac_cv_sampledir='$(datadir)/examples/styx'])
+ sampledir=$ac_cv_sampledir
+ 
+ AC_SUBST(htmldir)
diff --git a/devel/styx/files/patch-libbase__sysbase1.c b/devel/styx/files/patch-libbase__sysbase1.c
new file mode 100644
index 000000000000..a793c8327401
--- /dev/null
+++ b/devel/styx/files/patch-libbase__sysbase1.c
@@ -0,0 +1,29 @@
+--- libbase/sysbase1.c.orig	2003-12-09 15:37:07 UTC
++++ libbase/sysbase1.c
+@@ -521,7 +521,7 @@ StdCPtr apply_fun(PCFUN f, int cnt, StdC
+ }
+ 
+ #else
+-#if !defined( MSDOS ) && defined ( __GNUC__ ) && #cpu (i386)
++#if !defined( MSDOS ) && defined ( __GNUC__ ) && defined(__i386__)
+ #define PUSH_FUN_ARG(arg) __asm__ volatile ( "pushl %0" : : "r" (arg) )
+ #define CALL_FUN(f)       __asm__ volatile ( "call *%0" : : "r" (f) )
+ 
+@@ -550,7 +550,7 @@ AbstractType( DL_Hdl ); /* Abstract hand
+ #define DL_LOAD_LAZY    0
+ 
+ /*DOC_INTERFACE*/
+-#if !defined(STYX_CONFIG_OSMS) && (!defined(HAVE_CONFIG_H) || (defined(HAVE_LIBDL) && defined(HAVE_DLFCN_H)))
++#if defined(__FreeBSD__) || (!defined(STYX_CONFIG_OSMS) && (!defined(HAVE_CONFIG_H) || (defined(HAVE_LIBDL) && defined(HAVE_DLFCN_H))))
+ #define DL_LAZY         RTLD_LAZY
+ #define DL_NOW          RTLD_NOW
+ #define DL_BINDING_MASK RTLD_BINDING_MASK
+@@ -594,7 +594,7 @@ AbstractType( DL_Hdl ); /* Abstract hand
+   }
+ 
+ #else
+-#if !defined(MSDOS) && ( !defined(HAVE_CONFIG_H) || ( defined(HAVE_LIBDL) && defined(HAVE_DLFCN_H) ) )
++#if defined(__FreeBSD__) || (!defined(MSDOS) && ( !defined(HAVE_CONFIG_H) || ( defined(HAVE_LIBDL) && defined(HAVE_DLFCN_H) ) ) )
+ 
+ DL_Hdl DL_open(string dlname, int flag)
+ /* loads dll 'dlname' in mode 'flag' ( ERROR: NULL )
diff --git a/devel/styx/pkg-descr b/devel/styx/pkg-descr
new file mode 100644
index 000000000000..369539f3e46f
--- /dev/null
+++ b/devel/styx/pkg-descr
@@ -0,0 +1,11 @@
+Styx is a scanner/parser generator designed to address some
+shortcomings of the traditional lex/yacc combination.
+
+It has unique features like automatic derivation of depth grammar,
+production of the derivation tree including it's C interface,
+preservation of full source information and pretty printing to
+facilitate source-source translation, persistence to aid rapid
+interpreter writing.
+
+For application in contemporary computing environments, it supports
+unicode, reentrancy and offers thread-safeness.
diff --git a/devel/styx/pkg-plist b/devel/styx/pkg-plist
new file mode 100644
index 000000000000..7e6549e68dc3
--- /dev/null
+++ b/devel/styx/pkg-plist
@@ -0,0 +1,107 @@
+bin/ctoh
+bin/lim2dot
+bin/lim_test
+bin/pim2dot
+bin/pim_test
+bin/ptm_img
+bin/stydoc
+bin/stypp
+bin/styx
+bin/xml_test
+include/styx/binimg.h
+include/styx/binset.h
+include/styx/ccnv_lim.h
+include/styx/cfg_abs.h
+include/styx/cfg_dfn.h
+include/styx/charlib.h
+include/styx/cmd_int.h
+include/styx/cmd_lim.h
+include/styx/cmd_pim.h
+include/styx/com_get.h
+include/styx/ctoh_cim.h
+include/styx/ctx.h
+include/styx/ctx_app.h
+include/styx/ctx_dfn.h
+include/styx/ctx_imp.h
+include/styx/dict.h
+include/styx/dicts.h
+include/styx/dtd_int.h
+include/styx/dtd_lim.h
+include/styx/dtd_pim.h
+include/styx/glo_tab.h
+include/styx/gls.h
+include/styx/gstream.h
+include/styx/hmap.h
+include/styx/hpat.h
+include/styx/hpat_int.h
+include/styx/hpat_lim.h
+include/styx/hpat_pim.h
+include/styx/hset.h
+include/styx/lim2dot_cim.h
+include/styx/lim__cim.h
+include/styx/line_scn.h
+include/styx/list.h
+include/styx/literal.h
+include/styx/mem_base.h
+include/styx/memosx.h
+include/styx/olist.h
+include/styx/otab.h
+include/styx/pathes.h
+include/styx/pgm_base.h
+include/styx/pgm_popt.h
+include/styx/pgm_sopt.h
+include/styx/pim2dot_cim.h
+include/styx/pim__cim.h
+include/styx/prim.h
+include/styx/prs.h
+include/styx/prs_abs.h
+include/styx/prs_dfn.h
+include/styx/prs_gen.h
+include/styx/prs_imp.h
+include/styx/prs_io.h
+include/styx/ptm.h
+include/styx/ptm__cim.h
+include/styx/ptm_gen.h
+include/styx/ptm_pp.h
+include/styx/reg_exp.h
+include/styx/rexp_lim.h
+include/styx/scn_abs.h
+include/styx/scn_base.h
+include/styx/scn_gen.h
+include/styx/scn_imp.h
+include/styx/scn_io.h
+include/styx/scn_pre.h
+include/styx/sink.h
+include/styx/standard.h
+include/styx/stdosx.h
+include/styx/styconf0.h
+include/styx/styd_cim.h
+include/styx/styp_cim.h
+include/styx/styx_cim.h
+include/styx/styx_gen.h
+include/styx/styx_int.h
+include/styx/styx_lim.h
+include/styx/styx_pim.h
+include/styx/symbols.h
+include/styx/sysbase0.h
+include/styx/sysbase1.h
+include/styx/syscbhdl.h
+include/styx/xml_base.h
+include/styx/xml_dfn.h
+include/styx/xml_int.h
+include/styx/xml_lim.h
+include/styx/xml_pim.h
+include/styx/xml_test_cim.h
+include/styx/xmllit_lim.h
+lib/libdstyx.a
+lib/libdstyx.so
+lib/libdstyx.so.2
+lib/libdstyx.so.2.0.1
+lib/libdxml.a
+lib/libdxml.so
+lib/libdxml.so.1
+lib/libdxml.so.1.0.1
+lib/libxstyx.a
+lib/libxstyx.so
+lib/libxstyx.so.2
+lib/libxstyx.so.2.0.1