Skip to content

Commit

Permalink
eyalroz_printf: Add version 6.2.0-b1
Browse files Browse the repository at this point in the history
A package for a library that provides a custom printf implementation.
See https://github.com/eyalroz/printf.
  • Loading branch information
crvux committed Nov 30, 2023
1 parent 5f6ab17 commit 2f27d18
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ hunter_default_version(eos VERSION 0.12.1)
hunter_default_version(etc2comp VERSION 0.0.0-9cd0f9c-p0)
hunter_default_version(ethash VERSION 1.0.0)
hunter_default_version(eventpp VERSION 0.1.2-for-hunter-pm)
hunter_default_version(eyalroz_printf VERSION 6.2.0-b1)
hunter_default_version(farmhash VERSION 1.1)
hunter_default_version(fast_obj VERSION 1.1-9255172-p0)
hunter_default_version(ffmpeg VERSION n4.1-dev-45499e557c-p7)
Expand Down
30 changes: 30 additions & 0 deletions cmake/projects/eyalroz_printf/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) 2023 Alexander Voronov
# All rights reserved.

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_cmake_args)
include(hunter_download)
include(hunter_pick_scheme)
include(hunter_report_broken_package)
include(hunter_status_debug)

hunter_add_version(
PACKAGE_NAME eyalroz_printf
VERSION "6.2.0-b1"
URL "https://github.com/eyalroz/printf/archive/refs/tags/v6.2.0-b1.zip"
SHA1 4f2e2bbfffb9f6db46d87c5152ce17dd9f7053d5
)

hunter_cmake_args(
eyalroz_printf
CMAKE_ARGS
BUILD_TESTS=OFF
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(eyalroz_printf)
hunter_download(PACKAGE_NAME eyalroz_printf)

19 changes: 19 additions & 0 deletions docs/packages/pkg/eyalroz_printf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. spelling::

eyalroz
printf

.. index:: logging ; eyalroz_printf

.. _pkg.eyalroz_printf:

eyalroz_printf
==============

- `Official <https://github.com/eyalroz/printf>`__

.. literalinclude:: /../examples/eyalroz_printf/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }

20 changes: 20 additions & 0 deletions examples/eyalroz_printf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2023, Alexander Voronov
# All rights reserved.

cmake_minimum_required(VERSION 3.5)

set(TESTING_CONFIG_OPT FILEPATH "${CMAKE_CURRENT_LIST_DIR}/config.cmake")

# Emulate HunterGate:
# * https://github.com/hunter-packages/gate
include("../common.cmake")

project(download-eyalroz_printf)

# DOCUMENTATION_START {
hunter_add_package(eyalroz_printf)
find_package(printf CONFIG REQUIRED)

add_executable(main main.c)
target_link_libraries(main PUBLIC printf::printf)
# DOCUMENTATION_END }
6 changes: 6 additions & 0 deletions examples/eyalroz_printf/config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hunter_config(
eyalroz_printf
VERSION 6.2.0-b1
CMAKE_ARGS BUILD_STATIC_LIBRARY=ON
)

13 changes: 13 additions & 0 deletions examples/eyalroz_printf/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <stdio.h>
#include <math.h>
#include <printf/printf.h>

void putchar_(char c) {
putchar(c);
}

int main() {
printf_("%s %d %f\n", "Hello World!", 42, M_PI);
return 0;
}

0 comments on commit 2f27d18

Please sign in to comment.