# HG changeset patch # User Franz Glasner # Date 1742370364 -3600 # Node ID 19458de35e56e7cfebd3fb9e1b79f05a1070e6ff # Parent c7761c5a53899bc6bc48c35aa280ecb63bfc5436 Move old libprom into prometheus-client-c-libprom/ directory. Also remove its .hgignore because there is a new common .hgignore now already. diff -r c7761c5a5389 -r 19458de35e56 .hgignore --- 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(-[^/]+)?/ diff -r c7761c5a5389 -r 19458de35e56 Makefile --- 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 diff -r c7761c5a5389 -r 19458de35e56 distinfo --- 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 diff -r c7761c5a5389 -r 19458de35e56 files/patch-prom_src_prom__metric__sample.c --- 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; - } diff -r c7761c5a5389 -r 19458de35e56 files/patch-prom_src_prom__metric__sample__t.h --- 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 diff -r c7761c5a5389 -r 19458de35e56 pkg-descr --- 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. diff -r c7761c5a5389 -r 19458de35e56 pkg-plist --- 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 diff -r c7761c5a5389 -r 19458de35e56 prometheus-client-c-libprom/Makefile --- /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 diff -r c7761c5a5389 -r 19458de35e56 prometheus-client-c-libprom/distinfo --- /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 diff -r c7761c5a5389 -r 19458de35e56 prometheus-client-c-libprom/files/patch-prom_src_prom__metric__sample.c --- /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; + } diff -r c7761c5a5389 -r 19458de35e56 prometheus-client-c-libprom/files/patch-prom_src_prom__metric__sample__t.h --- /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 diff -r c7761c5a5389 -r 19458de35e56 prometheus-client-c-libprom/pkg-descr --- /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. diff -r c7761c5a5389 -r 19458de35e56 prometheus-client-c-libprom/pkg-plist --- /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