Skip to content

Commit

Permalink
ci: fix macOS builds - Use pkg-config to find popt
Browse files Browse the repository at this point in the history
MAC OS 14+ stores popt in different location than before
  • Loading branch information
jamacku committed May 2, 2024
1 parent ffb18de commit 53f849a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b

- name: Install dependencies
run: sudo apt-get install -y acl automake libacl1-dev libpopt-dev libselinux1-dev rpm
run: sudo apt-get install -y acl automake libacl1-dev libpopt-dev libselinux1-dev pkg-config rpm

- name: Bootstrap
run: ./autogen.sh
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b

- name: Install dependencies
run: brew install automake coreutils popt
run: brew install automake coreutils popt pkg-config

- name: Bootstrap
run: ./autogen.sh
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
sudo apt-get update -q
- name: Install dependencies
run: sudo apt-get install -y automake clang-18 clang-tools-18 libacl1-dev libpopt-dev libselinux1-dev
run: sudo apt-get install -y automake clang-18 clang-tools-18 libacl1-dev libpopt-dev libselinux1-dev pkg-config

- name: Bootstrap
run: ./autogen.sh
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
sudo apt-get update -q
- name: Install dependencies
run: sudo apt-get install -y acl automake clang-18 libacl1-dev libpopt-dev libselinux1-dev
run: sudo apt-get install -y acl automake clang-18 libacl1-dev libpopt-dev libselinux1-dev pkg-config

- name: Bootstrap
run: ./autogen.sh
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b

- name: Install dependencies
run: sudo apt-get install -y automake gcc-12 libacl1-dev libpopt-dev libselinux1-dev
run: sudo apt-get install -y automake gcc-12 libacl1-dev libpopt-dev libselinux1-dev pkg-config

- name: Bootstrap
run: ./autogen.sh
Expand All @@ -178,7 +178,7 @@ jobs:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b

- name: Install dependencies
run: sudo apt-get install -y automake libacl1-dev libpopt-dev libselinux1-dev
run: sudo apt-get install -y automake libacl1-dev libpopt-dev libselinux1-dev pkg-config

- name: Bootstrap
run: ./autogen.sh
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ Obtain source either by [Downloading](#download) it or doing [Git checkout](#git
Install dependencies for Debian systems:
```
apt-get update
apt-get install autoconf automake libpopt-dev libtool make xz-utils
apt-get install autoconf automake libpopt-dev libtool make pkg-config xz-utils
```

Install dependencies for Fedora/CentOS systems:

```
yum install autoconf automake libtool make popt-devel xz
yum install autoconf automake libtool make pkg-config popt-devel xz
```

Compilation (`autoreconf` is optional if you obtained source from tarball):
Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ AC_SYS_LARGEFILE
dnl needed for basename() on OS X
AC_CHECK_HEADERS([libgen.h])

AC_CHECK_LIB([popt],[poptParseArgvString],,
# Use pkg-config to find libpopt - MAC OS 14+ stores popt in different location than before
PKG_CHECK_MODULES([POPT], [popt, poptParseArgvString],,
AC_MSG_ERROR([libpopt required but not found]))

dnl Needed for out-of-source builds
Expand Down

0 comments on commit 53f849a

Please sign in to comment.