cmark-0.31.2

#### Supplemental Linux® From Scratch - Version 13.0

### Chapter 3. General Utilities

- Prev

  cava-0.10.7

- Next

  htop-3.4.1

- Up
- Home

# cmark-0.31.2

## Introduction to cmark

The cmark package contains a CommonMark parsing and rendering utility and library in C. BLFS provides the Python version, which the cmark script from it will be moved safely out of the way in this installation.

- Download: https://github.com/commonmark/cmark/archive/0.31.2/cmark-0.31.2.tar.gz

### cmark Dependencies

#### Required

CMake

## Installation of cmark

Install cmark by running the following commands:

    mkdir build &&
    cd    build &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr   \
          -D CMAKE_BUILD_TYPE=Release    \
          -D CMAKE_SKIP_INSTALL_RPATH=ON \
          -D BUILD_SHARED_LIBS=ON        \
          -W no-dev -G Ninja .. &&

    ninja

As the `root` user, move the Python version of cmark out of the way if it's installed:

    if find /usr/bin/cmark &> /dev/null; then
      if grep -qF python3 /usr/bin/cmark; then
        mv   -v           /usr/bin/cmark{,-py3}
      fi
    fi

Now, as the `root` user:

    ninja install

## Command Explanations

`-D CMAKE_SKIP_INSTALL_RPATH=ON`: This switch makes cmake remove hardcoded library search paths (rpath) when installing a binary executable file or a shared library. This package does not need rpath once it's installed into the standard location, and rpath may sometimes cause unwanted effects or even security issues.

`-D BUILD_SHARED_LIBS=ON`: This parameter builds the cmark library as dynamic instead of static.

## Contents

Installed Programs: cmark and cmark-py3 (if applicable)
Installed Libraries: libcmark
Installed Directories: /usr/lib/cmake/cmark

### Short Descriptions

cmark | parses and renders CommonMark
cmark-py3 | is the Python version of cmark, if it was installed previously
`libcmark` | contains CommonMark parsing and rendering functions

- Prev

  cava-0.10.7

- Next

  htop-3.4.1

- Up
- Home