Skip to content

Commit

Permalink
apparently we *cannot* rely on pkgconf support from libdeflate ugh
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Dec 31, 2024
1 parent 304938e commit 3a7b9d4
Showing 3 changed files with 16 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/macos_test.yml
Original file line number Diff line number Diff line change
@@ -36,8 +36,7 @@ jobs:
env PKG_CONFIG_PATH="/opt/homebrew/opt/ncurses/lib/pkgconfig" \
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_PANDOC=off \
-DUSE_DEFLATE=off
-DUSE_PANDOC=off
- name: make
run: |
22 changes: 15 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -110,13 +110,6 @@ set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND terminfo)
set_package_properties(terminfo PROPERTIES TYPE REQUIRED)
set(PKGCONF_REQ_PRIV "${TERMINFO_LIBRARIES}")

if(${USE_DEFLATE})
pkg_check_modules(DEFLATE REQUIRED libdeflate>=1.9)
else()
find_package(ZLIB)
set_package_properties(ZLIB PROPERTIES TYPE REQUIRED)
endif()

if(${USE_FFMPEG})
pkg_check_modules(AVCODEC REQUIRED libavcodec>=57.0)
pkg_check_modules(AVDEVICE REQUIRED libavdevice>=57.0)
@@ -190,6 +183,21 @@ set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND libunistring)
set_package_properties(libunistring PROPERTIES TYPE REQUIRED)

# optional dependencies lacking pkg-config support
# libdeflate has had pkgconf support since 1.9, where is it on ubuntu? FIXME
if(${USE_DEFLATE})
unset(HAVE_DEFLATE_H CACHE)
check_include_file("libdeflate.h" HAVE_DEFLATE_H)
if(NOT "${HAVE_DEFLATE_H}")
message(FATAL_ERROR "Couldn't find libdeflate.h")
endif()
find_library(libdeflate deflate REQUIRED)
set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND libdeflate)
set_package_properties(libdeflate PROPERTIES TYPE REQUIRED)
else()
find_package(ZLIB)
set_package_properties(ZLIB PROPERTIES TYPE REQUIRED)
endif()

if(${USE_GPM}) # no pkgconfig from gpm
unset(HAVE_GPM_H CACHE)
check_include_file("gpm.h" HAVE_GPM_H)
3 changes: 0 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -11,9 +11,6 @@ rearrangements of Notcurses.
used for `NCBLIT_DEFAULT` when used with `NCSCALE_NONE_HIRES`,
`NCSCALE_SCALE_HIRES`, or `NCSCALE_STRETCH`. Thanks, eschnett! Note
that octants are not supported by GNU libc until 2.41.
* We now depend on at least version 1.9 of libdeflate, when libdeflate
is being used. This was released 2022-01-12, and hopefully won't
cause any problems for anyone.

* 3.0.11 (2024-10-02)
* We now normalize the return of `nl_langinfo()` according to the behavior

0 comments on commit 3a7b9d4

Please sign in to comment.