Skip to content

Commit

Permalink
Copy ryu to bbryu. (#4300)
Browse files Browse the repository at this point in the history
  • Loading branch information
osubboo authored and GitHub Enterprise committed Jan 7, 2025
1 parent 0ea7dfd commit 367d730
Show file tree
Hide file tree
Showing 37 changed files with 11,284 additions and 62 deletions.
115 changes: 62 additions & 53 deletions Jenkinsfile.conan
Original file line number Diff line number Diff line change
Expand Up @@ -31,59 +31,67 @@ node('WINDOWS') {
}

conan.getReleaseProfiles().each { profile ->
writeFile(file:"standalones/CMakeLists.txt", text: "")
writeFile(file:"groups/CMakeLists.txt", text: "")

writeFile(file:"thirdparty/CMakeLists.txt", text: "add_subdirectory(ryu)")
conan.create(name: 'libryu-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"thirdparty/CMakeLists.txt", text: "add_subdirectory(inteldfp/LIBRARY)")
conan.create(name: 'libinteldfp-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"thirdparty/CMakeLists.txt", text: "add_subdirectory(pcre2)")
conan.create(name: 'libpcre2-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"thirdparty/CMakeLists.txt", text: "")

writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bsl)")
conan.create(name: 'libbsl-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bdl)")
conan.create(name: 'libbdl-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bal)")
conan.create(name: 'libbal-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bbl)")
conan.create(name: 'libbbl-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)
writeFile(file:"standalones/CMakeLists.txt", text: "")
writeFile(file:"groups/CMakeLists.txt", text: "")

writeFile(file:"thirdparty/CMakeLists.txt", text: "add_subdirectory(ryu)")
conan.create(name: 'libryu-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"thirdparty/CMakeLists.txt", text: "add_subdirectory(bbryu)")
conan.create(name: 'libbbryu-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)


writeFile(file:"thirdparty/CMakeLists.txt", text: "add_subdirectory(inteldfp/LIBRARY)")
conan.create(name: 'libinteldfp-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"thirdparty/CMakeLists.txt", text: "add_subdirectory(pcre2)")
conan.create(name: 'libpcre2-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"thirdparty/CMakeLists.txt", text: "")

writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bsl)")
conan.create(name: 'libbsl-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bdl)")
conan.create(name: 'libbdl-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bal)")
conan.create(name: 'libbal-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)

writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bbl)")
conan.create(name: 'libbbl-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)
}
}
stage('Publish package(s)') {
Expand All @@ -94,6 +102,7 @@ node('WINDOWS') {
}

conan.remoteBbConan { remote ->
remote.upload(dryRun: dryRun, pattern: 'libbbryu-dev')
remote.upload(dryRun: dryRun, pattern: 'libryu-dev')
remote.upload(dryRun: dryRun, pattern: 'libinteldfp-dev')
remote.upload(dryRun: dryRun, pattern: 'libpcre2-dev')
Expand Down
14 changes: 14 additions & 0 deletions debian/bbsdpkgconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"pcre2-release", "pcre2-pkgconfig",
"pcre2-headers_direct",
"pcre2-bdemeta_direct" ],
"libbbryu-dev": [ "bbryu", "bbryu-symlinks",
"bbryu-release", "bbryu-pkgconfig",
"bbryu-headers_direct", "bbryu-bdemeta_direct" ],
"libryu-dev": [ "ryu", "ryu-symlinks",
"ryu-release", "ryu-pkgconfig",
"ryu-headers_direct", "ryu-bdemeta_direct" ]
Expand All @@ -40,6 +43,7 @@
"libbsl-dev": [ "bsl", "bsl-symlinks" ],
"libinteldfp-dev": [ "inteldfp", "inteldfp-symlinks" ],
"libpcre2-dev": [ "pcre2", "pcre2-symlinks" ],
"libbbryu-dev": [ "bbryu", "bbryu-symlinks" ],
"libryu-dev": [ "ryu", "ryu-symlinks" ]
}
},
Expand All @@ -59,6 +63,8 @@
"inteldfp-release", "inteldfp-pkgconfig" ],
"libpcre2-dev": [ "pcre2", "pcre2-symlinks",
"pcre2-release", "pcre2-pkgconfig" ],
"libbbryu-dev": [ "bbryu", "bbryu-symlinks",
"bbryu-release", "bbryu-pkgconfig" ],
"libryu-dev": [ "ryu", "ryu-symlinks",
"ryu-release", "ryu-pkgconfig" ]
}
Expand All @@ -83,6 +89,7 @@
"libbsl-dev-extra": [ "bsl", "bsl-symlinks" ],
"libinteldfp-dev-extra": [ "inteldfp", "inteldfp-symlinks" ],
"libpcre2-dev-extra": [ "pcre2", "pcre2-symlinks" ],
"libbbryu-dev-extra": [ "bbryu", "bbryu-symlinks" ],
"libryu-dev-extra": [ "ryu", "ryu-symlinks" ]
}
},
Expand Down Expand Up @@ -122,6 +129,10 @@
"pcre2-release", "pcre2-pkgconfig",
"pcre2-headers_direct",
"pcre2-bdemeta_direct" ],
"libbbryu-dev": [ "bbryu", "bbryu-symlinks",
"bbryu-release", "bbryu-pkgconfig",
"bbryu-headers_direct",
"bbryu-bdemeta_direct" ],
"libryu-dev": [ "ryu", "ryu-symlinks",
"ryu-release", "ryu-pkgconfig",
"ryu-headers_direct",
Expand All @@ -144,6 +155,8 @@
"inteldfp-release", "inteldfp-pkgconfig" ],
"libpcre2-dev": [ "pcre2", "pcre2-symlinks",
"pcre2-release", "pcre2-pkgconfig" ],
"libbbryu-dev": [ "bbryu", "bbryu-symlinks",
"bbryu-release", "bbryu-pkgconfig" ],
"libryu-dev": [ "ryu", "ryu-symlinks",
"ryu-release", "ryu-pkgconfig" ]
}
Expand All @@ -168,6 +181,7 @@
"libbsl-dev-extra": [ "bsl", "bsl-symlinks" ],
"libinteldfp-dev-extra": [ "inteldfp", "inteldfp-symlinks" ],
"libpcre2-dev-extra": [ "pcre2", "pcre2-symlinks" ],
"libbbryu-dev-extra": [ "bbryu", "bbryu-symlinks" ],
"libryu-dev-extra": [ "ryu", "ryu-symlinks" ]
}
},
Expand Down
15 changes: 13 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Description: BDL
groups/bdl extra libraries

Package: libbsl-dev-extra
Depends: libbsl-dev, libryu-dev-extra
Depends: libbsl-dev, libbbryu-dev-extra
Architecture: any
Conflicts: libbsl-dev (<< 3.41.0.0), libbsl-extra-dev
Replaces: libbsl-extra-dev
Expand Down Expand Up @@ -59,7 +59,7 @@ Description: BDL
groups/bdl development files

Package: libbsl-dev
Depends: libryu-dev
Depends: libbbryu-dev
Architecture: any
Description: BSL
groups/bsl development files
Expand Down Expand Up @@ -90,6 +90,17 @@ Description: PCRE 2 Regular Expression Library



Package: libbbryu-dev-extra
Depends: libbbryu-dev, libryu-dev-extra
Architecture: any
Description: Bloomberg LP Extended Ryu Float Formatting Library
thirdparty/bbryu extra libraries

Package: libbbryu-dev
Depends: libryu-dev
Architecture: any
Description: Bloomberg LP Extended Ryu Float Formatting Library

Package: libryu-dev-extra
Depends: libryu-dev
Architecture: any
Expand Down
1 change: 1 addition & 0 deletions debian/libbbryu-dev-extra.lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libbbryu-dev-extra: blp-bde-metadata-missing
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include $(DEBHELPER_PATH)/bbs-debhelper.mk

debian/bde-build-stamp: debian/lintian-overrides-stamp
debian/lintian-overrides-stamp:
for uor in bal bbl bdl bsl inteldfp pcre2 ryu; do \
for uor in bal bbl bdl bsl inteldfp pcre2 bbryu ryu; do \
mkdir -p debian/lib$${uor}-dev-extra$(PREFIX)/share/lintian/overrides; \
cp debian/lib$${uor}-dev-extra.lintian-overrides \
debian/lib$${uor}-dev-extra$(PREFIX)/share/lintian/overrides/lib$${uor}-dev-extra; \
Expand Down
2 changes: 1 addition & 1 deletion groups/bsl/bslalg/bslalg_numericformatterutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ BSLS_IDENT("$Id$ $CSID$")
#include <cstring>
#include <limits>

#include <ryu/blp_ryu.h>
#include <bbryu/blp_ryu.h>

namespace {
namespace u {
Expand Down
8 changes: 4 additions & 4 deletions groups/bsl/bslalg/bslalg_numericformatterutil.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
#include <stdlib.h> // atoi
#include <math.h> // nextafterf

#include <ryu/blp_ryu.h>
#include <ryu/ryu.h>
#include <bbryu/blp_ryu.h>
#include <bbryu/ryu.h>

extern "C" {
#include <ryu/blp_common64.h>
#include <ryu/blp_common32.h>
#include <bbryu/blp_common64.h>
#include <bbryu/blp_common32.h>
}

#if defined(DELETE)
Expand Down
2 changes: 1 addition & 1 deletion groups/bsl/group/bsl.dep
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ryu
bbryu
1 change: 1 addition & 0 deletions thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
add_subdirectory("inteldfp/LIBRARY")
add_subdirectory(pcre2)
add_subdirectory(ryu)
add_subdirectory(bbryu)
49 changes: 49 additions & 0 deletions thirdparty/bbryu/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
set(target bbryu)
message(VERBOSE "Processing target \"${target}\"")

add_library(${target} STATIC
blp_d2cpp.c
blp_f2cpp.c
blp_d2fixed_cpp.c
d2fixed.c
d2s.c
f2s.c
)

set(${target}_INCLUDE_FILES
blp_common.h
blp_common32.h
blp_common64.h
blp_ryu.h
common.h
d2fixed_full_table.h
d2s_full_table.h
d2s_intrinsics.h
d2s_small_table.h
digit_table.h
f2s_full_table.h
f2s_intrinsics.h
ryu.h
)

target_include_directories(
${target}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:include>)

bbs_add_target_thread_flags(${target} PRIVATE)

# This variable controls the set of headers to install
set(${target}_INCLUDE_FILES ${${target}_INCLUDE_FILES} PARENT_SCOPE)

# Set install path for headers instead of INSTALL_INTERFACE
set_target_properties(${target} PROPERTIES INCLUDES_INSTALL_PATH "include/${target}")


bbs_install_target(${target})
bbs_emit_pkg_config(${target})

set_target_properties(${target} PROPERTIES BB_UOR_PARTITION thirdparty)
set_target_properties(${target} PROPERTIES BB_UOR_IS_GROUP FALSE)
bbs_emit_bde_metadata(${target})
3 changes: 3 additions & 0 deletions thirdparty/bbryu/CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Ulf Adams <[email protected]>
Stephan T. Lavavej <[email protected]>
Alexander Bolz <[email protected]>
Loading

0 comments on commit 367d730

Please sign in to comment.