Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147790933
D52520.1784380635.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D52520.1784380635.diff
View Options
diff --git a/devel/Makefile b/devel/Makefile
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -8273,6 +8273,7 @@
SUBDIR += statik
SUBDIR += statsvn
SUBDIR += stb
+ SUBDIR += stc
SUBDIR += stdman
SUBDIR += stdx-allocator
SUBDIR += stfl
diff --git a/devel/stc/Makefile b/devel/stc/Makefile
new file mode 100644
--- /dev/null
+++ b/devel/stc/Makefile
@@ -0,0 +1,32 @@
+PORTNAME= stc
+DISTVERSIONPREFIX= v
+DISTVERSION= 5.0
+CATEGORIES= devel
+
+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
--- /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
--- /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
--- /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
--- /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
--- /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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 18, 1:17 PM (5 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29184215
Default Alt Text
D52520.1784380635.diff (4 KB)
Attached To
Mode
D52520: devel/stc: [NEW PORT] Modern, user-friendly, generic, type-safe and fast C99 library
Attached
Detach File
Event Timeline
Log In to Comment