Mercurial > hgrepos > FreeBSD > ports > net-mgmt > prometheus-client-c
changeset 7:19458de35e56
Move old libprom into prometheus-client-c-libprom/ directory.
Also remove its .hgignore because there is a new common .hgignore now already.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 19 Mar 2025 08:46:04 +0100 |
| parents | c7761c5a5389 |
| children | e38a6e16e756 |
| files | .hgignore Makefile distinfo files/patch-prom_src_prom__metric__sample.c files/patch-prom_src_prom__metric__sample__t.h pkg-descr pkg-plist prometheus-client-c-libprom/Makefile prometheus-client-c-libprom/distinfo prometheus-client-c-libprom/files/patch-prom_src_prom__metric__sample.c prometheus-client-c-libprom/files/patch-prom_src_prom__metric__sample__t.h prometheus-client-c-libprom/pkg-descr prometheus-client-c-libprom/pkg-plist |
| diffstat | 13 files changed, 93 insertions(+), 96 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Tue Mar 18 19:49:55 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -syntax: regexp - -^work(-[^/]+)?/
--- a/Makefile Tue Mar 18 19:49:55 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -PORTNAME= prometheus-client-c-libprom -DISTVERSION= 0.1.3 -CATEGORIES= net-mgmt - -MAINTAINER= freebsd-dev@dom66.de -COMMENT= This is libprom -- the C-client library for Prometheus -WWW= https://github.com/digitalocean/prometheus-client-c - -LICENSE= APACHE20 -LICENSE_FILE= ${WRKSRC}/LICENSE - -USES= cmake:noninja compiler:c11 - -USE_GITHUB= yes -GH_ACCOUNT= digitalocean -GH_PROJECT= prometheus-client-c -GH_TAGNAME= v${DISTVERSION} - -# Currently compilation errors on incompatible types with clang -USE_LDCONFIG= yes - -CMAKE_SOURCE_PATH= ${WRKSRC}/prom - -do-install: - (cd ${CMAKE_SOURCE_PATH}/include && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include) - ${INSTALL_LIB} ${BUILD_WRKSRC}/libprom.so ${STAGEDIR}${PREFIX}/lib/libprom.so - -.include <bsd.port.mk>
--- a/distinfo Tue Mar 18 19:49:55 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -TIMESTAMP = 1742306323 -SHA256 (digitalocean-prometheus-client-c-0.1.3-v0.1.3_GH0.tar.gz) = 3a82e302a5bdbbd5f699cf21bee97217c0386b5076d878cab724d5f672ef5092 -SIZE (digitalocean-prometheus-client-c-0.1.3-v0.1.3_GH0.tar.gz) = 1038300
--- a/files/patch-prom_src_prom__metric__sample.c Tue Mar 18 19:49:55 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ ---- prom/src/prom_metric_sample.c.orig 2020-12-08 07:38:13 UTC -+++ prom/src/prom_metric_sample.c -@@ -63,9 +63,9 @@ int prom_metric_sample_add(prom_metric_sample_t *self, - if (r_value < 0) { - return 1; - } -- _Atomic double old = atomic_load(&self->r_value); -+ double old = atomic_load(&self->r_value); - for (;;) { -- _Atomic double new = ATOMIC_VAR_INIT(old + r_value); -+ double new = old + r_value; - if (atomic_compare_exchange_weak(&self->r_value, &old, new)) { - return 0; - } -@@ -78,9 +78,9 @@ int prom_metric_sample_sub(prom_metric_sample_t *self, - PROM_LOG(PROM_METRIC_INCORRECT_TYPE); - return 1; - } -- _Atomic double old = atomic_load(&self->r_value); -+ double old = atomic_load(&self->r_value); - for (;;) { -- _Atomic double new = ATOMIC_VAR_INIT(old - r_value); -+ double new = old - r_value; - if (atomic_compare_exchange_weak(&self->r_value, &old, new)) { - return 0; - }
--- a/files/patch-prom_src_prom__metric__sample__t.h Tue Mar 18 19:49:55 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ ---- prom/src/prom_metric_sample_t.h.orig 2020-12-08 07:38:13 UTC -+++ prom/src/prom_metric_sample_t.h -@@ -23,7 +23,7 @@ struct prom_metric_sample { - struct prom_metric_sample { - prom_metric_type_t type; /**< type is the metric type for the sample */ - char *l_value; /**< l_value is the full metric name and label set represeted as a string */ -- _Atomic double r_value; /**< r_value is the value of the metric sample */ -+ _Atomic(double) r_value; /**< r_value is the value of the metric sample */ - }; - - #endif // PROM_METRIC_SAMPLE_T_H
--- a/pkg-descr Tue Mar 18 19:49:55 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -This is libprom -- the C-client library for Prometheus from -https://github.com/digitalocean/prometheus-client-c. - -This project provides this shared library for instrumenting software via -Prometheus. - - libprom: Provides the core API. Resources such as counters, gauges, - histograms, and collector registries can be found - here. This library has no dependencies on third-party - libraries; however, it does rely on pthreads native to - POSIX systems.
--- a/pkg-plist Tue Mar 18 19:49:55 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -include/prom_collector.h -include/prom_alloc.h -include/prom_metric_sample_histogram.h -include/prom_gauge.h -include/prom_map.h -include/prom_collector_registry.h -include/prom_histogram_buckets.h -include/prom_histogram.h -include/prom_counter.h -include/prom.h -include/prom_linked_list.h -include/prom_metric_sample.h -include/prom_metric.h -lib/libprom.so
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prometheus-client-c-libprom/Makefile Wed Mar 19 08:46:04 2025 +0100 @@ -0,0 +1,28 @@ +PORTNAME= prometheus-client-c-libprom +DISTVERSION= 0.1.3 +CATEGORIES= net-mgmt + +MAINTAINER= freebsd-dev@dom66.de +COMMENT= This is libprom -- the C-client library for Prometheus +WWW= https://github.com/digitalocean/prometheus-client-c + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= cmake:noninja compiler:c11 + +USE_GITHUB= yes +GH_ACCOUNT= digitalocean +GH_PROJECT= prometheus-client-c +GH_TAGNAME= v${DISTVERSION} + +# Currently compilation errors on incompatible types with clang +USE_LDCONFIG= yes + +CMAKE_SOURCE_PATH= ${WRKSRC}/prom + +do-install: + (cd ${CMAKE_SOURCE_PATH}/include && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include) + ${INSTALL_LIB} ${BUILD_WRKSRC}/libprom.so ${STAGEDIR}${PREFIX}/lib/libprom.so + +.include <bsd.port.mk>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prometheus-client-c-libprom/distinfo Wed Mar 19 08:46:04 2025 +0100 @@ -0,0 +1,3 @@ +TIMESTAMP = 1742306323 +SHA256 (digitalocean-prometheus-client-c-0.1.3-v0.1.3_GH0.tar.gz) = 3a82e302a5bdbbd5f699cf21bee97217c0386b5076d878cab724d5f672ef5092 +SIZE (digitalocean-prometheus-client-c-0.1.3-v0.1.3_GH0.tar.gz) = 1038300
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prometheus-client-c-libprom/files/patch-prom_src_prom__metric__sample.c Wed Mar 19 08:46:04 2025 +0100 @@ -0,0 +1,26 @@ +--- prom/src/prom_metric_sample.c.orig 2020-12-08 07:38:13 UTC ++++ prom/src/prom_metric_sample.c +@@ -63,9 +63,9 @@ int prom_metric_sample_add(prom_metric_sample_t *self, + if (r_value < 0) { + return 1; + } +- _Atomic double old = atomic_load(&self->r_value); ++ double old = atomic_load(&self->r_value); + for (;;) { +- _Atomic double new = ATOMIC_VAR_INIT(old + r_value); ++ double new = old + r_value; + if (atomic_compare_exchange_weak(&self->r_value, &old, new)) { + return 0; + } +@@ -78,9 +78,9 @@ int prom_metric_sample_sub(prom_metric_sample_t *self, + PROM_LOG(PROM_METRIC_INCORRECT_TYPE); + return 1; + } +- _Atomic double old = atomic_load(&self->r_value); ++ double old = atomic_load(&self->r_value); + for (;;) { +- _Atomic double new = ATOMIC_VAR_INIT(old - r_value); ++ double new = old - r_value; + if (atomic_compare_exchange_weak(&self->r_value, &old, new)) { + return 0; + }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prometheus-client-c-libprom/files/patch-prom_src_prom__metric__sample__t.h Wed Mar 19 08:46:04 2025 +0100 @@ -0,0 +1,11 @@ +--- prom/src/prom_metric_sample_t.h.orig 2020-12-08 07:38:13 UTC ++++ prom/src/prom_metric_sample_t.h +@@ -23,7 +23,7 @@ struct prom_metric_sample { + struct prom_metric_sample { + prom_metric_type_t type; /**< type is the metric type for the sample */ + char *l_value; /**< l_value is the full metric name and label set represeted as a string */ +- _Atomic double r_value; /**< r_value is the value of the metric sample */ ++ _Atomic(double) r_value; /**< r_value is the value of the metric sample */ + }; + + #endif // PROM_METRIC_SAMPLE_T_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prometheus-client-c-libprom/pkg-descr Wed Mar 19 08:46:04 2025 +0100 @@ -0,0 +1,11 @@ +This is libprom -- the C-client library for Prometheus from +https://github.com/digitalocean/prometheus-client-c. + +This project provides this shared library for instrumenting software via +Prometheus. + + libprom: Provides the core API. Resources such as counters, gauges, + histograms, and collector registries can be found + here. This library has no dependencies on third-party + libraries; however, it does rely on pthreads native to + POSIX systems.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prometheus-client-c-libprom/pkg-plist Wed Mar 19 08:46:04 2025 +0100 @@ -0,0 +1,14 @@ +include/prom_collector.h +include/prom_alloc.h +include/prom_metric_sample_histogram.h +include/prom_gauge.h +include/prom_map.h +include/prom_collector_registry.h +include/prom_histogram_buckets.h +include/prom_histogram.h +include/prom_counter.h +include/prom.h +include/prom_linked_list.h +include/prom_metric_sample.h +include/prom_metric.h +lib/libprom.so
