summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVedang Manerikar <ved.manerikar@gmail.com>2022-04-26 12:47:14 -0400
committerVedang Manerikar <ved.manerikar@gmail.com>2022-04-26 12:52:38 -0400
commit48cf7b89ae752eb57f28d09fc14386e733cbb2f7 (patch)
tree62cea7f39034f6fd1acb6eb3886c57835cd87024
parentffba5f7208a2cf36df80fac9a17731f514f40060 (diff)
Add to PKG_CONFIG_PATH, instead of replacing it.
This is a better solution as it takes into account paths that have already been set up by users. Potentially fixes: #70
-rw-r--r--README.org4
-rwxr-xr-xserver/autobuild4
2 files changed, 4 insertions, 4 deletions
diff --git a/README.org b/README.org
index 594e975..d6bb969 100644
--- a/README.org
+++ b/README.org
@@ -92,9 +92,9 @@ Although macOS is not officially supported, it has been reported that ~pdf-tools
$ brew install poppler automake
#+END_SRC
-You will also have to help ~pkg-config~ find some libraries by setting ~PKG_CONFIG_PATH~, e.g.
+You will also have to help ~pkg-config~ find some libraries by setting ~PKG_CONFIG_PATH~. ~brew~ will show you which paths need to be added to ~PKG_CONFIG_PATH~ during the installation process. Make sure you export the paths to the env variable, eg:
#+BEGIN_SRC sh
- $ export PKG_CONFIG_PATH=/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
+ $ export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(brew --prefix libffi)/lib/pkgconfig/:/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig"
#+END_SRC
or likewise within Emacs using ~setenv~.
diff --git a/server/autobuild b/server/autobuild
index c738f59..f0b18f3 100755
--- a/server/autobuild
+++ b/server/autobuild
@@ -366,9 +366,9 @@ os_macos() {
PKGARGS=install
PACKAGES="pkg-config poppler automake"
PKG_INSTALL_AS_ROOT=
- # homebrew install libffi as keg-only, meaning we need to set
+ # brew installs libffi as keg-only, meaning we need to set
# PKG_CONFIG_PATH manually so configure can find it
- export PKG_CONFIG_PATH="$(brew --prefix libffi)/lib/pkgconfig/"
+ export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(brew --prefix libffi)/lib/pkgconfig/"
elif which port >/dev/null 2>&1; then
PKGCMD=port
PKGARGS=install