Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,26 @@ Get involved:
- `How to tell if an issue is editorial <https://github.com/cplusplus/draft/wiki/How-to-tell-if-an-issue-is-editorial>`_
- `How to submit a new issue/defect report <https://isocpp.org/std/submit-issue>`_ for non-editorial issues

More information about the C++ standard can be found at `isocpp.org <http://isocpp.org/std>`_.
More information about the C++ standard can be found at `isocpp.org <https://isocpp.org/std>`_.

---------------------------
Getting Started on Mac OS X
---------------------------
------------------------
Getting Started on macOS
------------------------

Install the `MacTeX distribution <http://tug.org/mactex/>`_.
Install the `MacTeX distribution <https://tug.org/mactex/>`_.

If you are on a slow network, you'll want to get the `BasicTeX package <http://tug.org/mactex/morepackages.html>`_ instead,
If you are on a slow network, you'll want to get the `BasicTeX package <https://tug.org/mactex/morepackages.html>`_ instead,
then run the following command to install the other packages that the draft requires::

sudo tlmgr install latexmk isodate substr relsize ulem fixme rsfs extract layouts enumitem l3packages l3kernel imakeidx splitindex xstring

Using homebrew on macOS
=======================

Instead of downloading packages from the internet, you can use the `HomeBrew package manager <https://brew.sh>` to install all that is needed to build the draft and run checks on it:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "Instead of downloading packages from the internet" referring to? Does brew not download anything from the internet? And is this brew install mactex gnu-sed a complete replacement for the tlmgr installation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brew validates the packages against known checksums. It's against general recommendation "thou shall not download and install stuff random from internet". Brew also manages updating it and also makes easy to uninstall, without depending on package specific way how to remove stuff.

Yes, brew install mactex is a complete replacement for the tlmgr installation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also install BasicTeX using brew and then use tlmgr, but it felt really convoluted and I felt I would end up describing all the combinations. My intention with this PR is just to provide quickest and most straightforwards way how to start with this repo, hence the auto config of gsed instead of asking users to change their whole environment and probably introduce some future problems.


brew install mactex gnu-sed

---------------------------------------
Getting Started on Debian-based Systems
---------------------------------------
Expand Down
8 changes: 8 additions & 0 deletions tools/check-output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ function fail() {
! sed 's/^\(.\+\.tex\):/file=\1::/;s/^/::error /' | grep .
}

# If we detect GNU sed (on macOS installed with brew) then we will use it.
# Otherwise the script can fail on macOS which ships with BSD sed.
if command -v gsed >/dev/null 2>&1; then
GSED=$(command -v gsed)
sed() {
${GSED} "$@"
}
fi

# Discover "Overfull \[hv]box" and "Reference ... undefined" messages from LaTeX.
sed -n '/\.tex/{s/^.*\/\([-a-z0-9]\+\.tex\).*$/\1/;h};
Expand Down
8 changes: 8 additions & 0 deletions tools/check-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ function fail() {
grep .
}

# If we detect GNU sed (on macOS installed with brew) then we will use it.
# Otherwise the script can fail on macOS which ships with BSD sed.
if command -v gsed >/dev/null 2>&1; then
GSED=$(command -v gsed)
sed() {
${GSED} "$@"
}
fi

# We require GNU tools.
sed --version | grep -Fqe "GNU sed" || { echo "sed is not GNU sed"; exit 1; }
Expand Down