Skip to content

Commit

Permalink
Merge pull request #39569 from ralreegorganon/macos-brew-gettext
Browse files Browse the repository at this point in the history
Update handling of gettext via Homebrew on macOS
  • Loading branch information
ZhilkinSerg authored Apr 14, 2020
2 parents 43805ae + c1891dc commit 48fe4ed
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
directories:
- $HOME/.ccache

- env: CLANG=clang++ NATIVE=osx OSX_MIN=10.13 TILES=1 SOUND=1
- env: CLANG=clang++ NATIVE=osx OSX_MIN=10.13 TILES=1 SOUND=1 BREWGETTEXT=1
name: "Xcode 10.1 Make build with Tiles and sound (macOS)"
os: osx
osx_image: xcode10.1
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,11 @@ ifeq ($(NATIVE), osx)
LDFLAGS += -L$(LIBSDIR)/gettext/lib
CXXFLAGS += -I$(LIBSDIR)/gettext/include
endif
ifeq ($(BREWGETTEXT), 1)
# recent versions of brew will not allow you to link
LDFLAGS += -L/usr/local/opt/gettext/lib
CXXFLAGS += -I/usr/local/opt/gettext/include
endif
ifeq ($(MACPORTS), 1)
ifneq ($(TILES), 1)
CXXFLAGS += -I$(shell ncursesw6-config --includedir)
Expand Down
1 change: 0 additions & 1 deletion build-scripts/requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ncurses ccache
brew link --force gettext ncurses
fi

if [[ "$NATIVE" == "android" ]]; then
Expand Down
6 changes: 1 addition & 5 deletions doc/COMPILING/COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,6 @@ ncurses (with wide character support enabled) and gettext are needed if you want
For Homebrew:

brew install gettext ncurses
brew link --force gettext ncurses

Then, after compiling, be sure to unlink these libraries to prevent conflicts with the OS X shared libraries:

brew unlink gettext ncurses

For MacPorts:

Expand Down Expand Up @@ -493,6 +488,7 @@ The Cataclysm source is compiled using `make`.
* `SOUND=1` - if you want sound; this requires `TILES=1` and the additional dependencies mentioned above.
* `FRAMEWORK=1` (tiles only) link to SDL libraries under the OS X Frameworks folders; omit to use SDL shared libraries from Homebrew or Macports.
* `LOCALIZE=0` disable localization (to get around possible `gettext` errors if it is not setup correctly); omit to use `gettext`.
* `BREWGETTEXT=1` set this if you don't set LOCALIZE=0 and have installed `gettext` from homebrew--homebrew will refuse to link gettext in recent versions.
* `LANGUAGES="<lang_id_1>[lang_id_2][...]"` compile localization files for specified languages. e.g. `LANGUAGES="zh_CN zh_TW"`. You can also use `LANGUAGES=all` to compile all localization files.
* `RELEASE=1` build an optimized release version; omit for debug build.
* `CLANG=1` build with [Clang](http://clang.llvm.org/), the compiler that's included with the latest Command Line Tools for Xcode; omit to build using gcc/g++.
Expand Down

0 comments on commit 48fe4ed

Please sign in to comment.