aboutsummaryrefslogtreecommitdiff
path: root/devel/stc
diff options
context:
space:
mode:
Diffstat (limited to 'devel/stc')
-rw-r--r--devel/stc/Makefile33
-rw-r--r--devel/stc/distinfo3
-rw-r--r--devel/stc/files/patch-meson.build47
-rw-r--r--devel/stc/files/patch-meson__options.txt29
-rw-r--r--devel/stc/pkg-descr3
-rw-r--r--devel/stc/pkg-plist43
6 files changed, 158 insertions, 0 deletions
diff --git a/devel/stc/Makefile b/devel/stc/Makefile
new file mode 100644
index 000000000000..0144dd4420ee
--- /dev/null
+++ b/devel/stc/Makefile
@@ -0,0 +1,33 @@
+PORTNAME= stc
+DISTVERSIONPREFIX= v
+DISTVERSION= 5.0
+CATEGORIES= devel
+PKGNAMESUFFIX= -library
+
+MAINTAINER= alven@FreeBSD.org
+COMMENT= Modern, user-friendly, generic, type-safe and fast C99 library
+WWW= https://github.com/stclib/STC/
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= meson
+USE_GITHUB= yes
+GH_ACCOUNT= stclib
+GH_PROJECT= STC
+USE_LDCONFIG= yes
+
+PORTDOCS= *
+PORTEXAMPLES= *
+
+OPTIONS_DEFINE= DOCS EXAMPLES STATIC
+OPTIONS_SUB= yes
+
+DOCS_MESON_ENABLED= docs
+DOCS_MESON_ON= -Ddocsdir=${DOCSDIR}
+EXAMPLES_MESON_ENABLED= examples
+EXAMPLES_MESON_ON= -Dexamplesdir=${EXAMPLESDIR}
+STATIC_MESON_ON= -Ddefault_library=both
+STATIC_MESON_OFF= -Ddefault_library=shared
+
+.include <bsd.port.mk>
diff --git a/devel/stc/distinfo b/devel/stc/distinfo
new file mode 100644
index 000000000000..5f1ef2442788
--- /dev/null
+++ b/devel/stc/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1758282222
+SHA256 (stclib-STC-v5.0_GH0.tar.gz) = d61353852b9d7ef69b56fa32edcbc7934f2153385f3778536234201ceebcc950
+SIZE (stclib-STC-v5.0_GH0.tar.gz) = 972147
diff --git a/devel/stc/files/patch-meson.build b/devel/stc/files/patch-meson.build
new file mode 100644
index 000000000000..3a696d2778d7
--- /dev/null
+++ b/devel/stc/files/patch-meson.build
@@ -0,0 +1,47 @@
+--- meson.build.orig 2025-01-12 20:41:47 UTC
++++ meson.build
+@@ -144,19 +144,33 @@ root = not meson.is_subproject()
+ endif
+
+ root = not meson.is_subproject()
+-subdir('tests')
+-subdir('examples')
+
+ if root
+- datadir = get_option('datadir')
+- docdir = get_option('docdir')
+- if docdir == ''
+- docdir = datadir / 'doc' / meson.project_name()
++ if get_option('docs').enabled()
++ docsdir = get_option('docsdir')
++
++ install_data('README.md', install_dir: docsdir)
++
++ install_subdir(
++ 'docs',
++ install_dir: docsdir,
++ strip_directory: true
++ )
+ endif
+
+- install_subdir(
+- 'docs',
+- install_dir: docdir,
+- strip_directory: true,
+- )
++ if get_option('examples').enabled()
++ examplesdir = get_option('examplesdir')
++
++ subdir('examples')
++
++ install_subdir(
++ 'examples',
++ install_dir: examplesdir,
++ strip_directory: true
++ )
++ endif
++
++ if get_option('tests').enabled()
++ subdir('tests')
++ endif
+ endif
diff --git a/devel/stc/files/patch-meson__options.txt b/devel/stc/files/patch-meson__options.txt
new file mode 100644
index 000000000000..50a03aeb95a1
--- /dev/null
+++ b/devel/stc/files/patch-meson__options.txt
@@ -0,0 +1,29 @@
+--- meson_options.txt.orig 2025-01-14 15:37:45 UTC
++++ meson_options.txt
+@@ -5,10 +5,10 @@ option(
+ description: 'Build checkscoped tool for c_guard* blocks',
+ )
+ option(
+- 'tests',
++ 'docs',
+ type: 'feature',
+ value: 'auto',
+- description: 'Build tests and ctest',
++ description: 'Build documentation',
+ )
+ option(
+ 'examples',
+@@ -16,5 +16,12 @@ option(
+ value: 'auto',
+ description: 'Build examples',
+ )
++option(
++ 'tests',
++ type: 'feature',
++ value: 'auto',
++ description: 'Build tests and ctest',
++)
+
+-option('docdir', type: 'string', description: 'documentation directory')
++option('docsdir', type: 'string', description: 'documentation directory')
++option('examplesdir', type: 'string', description: 'examples directory')
diff --git a/devel/stc/pkg-descr b/devel/stc/pkg-descr
new file mode 100644
index 000000000000..628b918f445a
--- /dev/null
+++ b/devel/stc/pkg-descr
@@ -0,0 +1,3 @@
+STC is a comprehensive, modern, typesafe and fast templated general purpose
+container and algorithms library for C99. It aims to make C-programming even
+more fun, more productive and safer.
diff --git a/devel/stc/pkg-plist b/devel/stc/pkg-plist
new file mode 100644
index 000000000000..977403744497
--- /dev/null
+++ b/devel/stc/pkg-plist
@@ -0,0 +1,43 @@
+include/c11/fmt.h
+include/stc/algorithm.h
+include/stc/arc.h
+include/stc/box.h
+include/stc/cbits.h
+include/stc/common.h
+include/stc/coption.h
+include/stc/coroutine.h
+include/stc/cregex.h
+include/stc/cspan.h
+include/stc/cstr.h
+include/stc/csview.h
+include/stc/ctest.h
+include/stc/deque.h
+include/stc/hmap.h
+include/stc/hset.h
+include/stc/list.h
+include/stc/pqueue.h
+include/stc/priv/cstr_prv.h
+include/stc/priv/linkage.h
+include/stc/priv/linkage2.h
+include/stc/priv/queue_prv.h
+include/stc/priv/sort_prv.h
+include/stc/priv/template.h
+include/stc/priv/template2.h
+include/stc/priv/utf8_prv.h
+include/stc/queue.h
+include/stc/random.h
+include/stc/smap.h
+include/stc/sort.h
+include/stc/sset.h
+include/stc/stack.h
+include/stc/sys/crange.h
+include/stc/sys/filter.h
+include/stc/sys/sumtype.h
+include/stc/sys/utility.h
+include/stc/types.h
+include/stc/utf8.h
+include/stc/vec.h
+include/stc/zsview.h
+%%STATIC%%lib/libstc.a
+lib/libstc.so
+lib/libstc.so.5