diff options
author | adridg <adridg@FreeBSD.org> | 2018-03-21 06:52:50 +0800 |
---|---|---|
committer | adridg <adridg@FreeBSD.org> | 2018-03-21 06:52:50 +0800 |
commit | 31bf14cdc4120ee92a3bb866abe68212b9aced02 (patch) | |
tree | 472cda068566695e54d1d76b9c69b9f25e4f1b09 | |
parent | f363cb263a57daf978542e2ff743d7223b039d72 (diff) | |
download | freebsd-ports-gnome-31bf14cdc4120ee92a3bb866abe68212b9aced02.tar.gz freebsd-ports-gnome-31bf14cdc4120ee92a3bb866abe68212b9aced02.tar.zst freebsd-ports-gnome-31bf14cdc4120ee92a3bb866abe68212b9aced02.zip |
Fix emulators/hatari pre-emptively for CMake 3.11. Build error is
CMake Error at /usr/local/share/cmake/Modules/CheckIncludeFiles.cmake:63 (message):
Unknown arguments:
HAVE_SDL_CONFIG_H
which comes because SDL_INCLUDE_DIR can contain more than one element,
in which case the code falls over. Further explanation is in the patch.
Approved by: tcberner (mentor, implicit)
-rw-r--r-- | emulators/hatari/Makefile | 2 | ||||
-rw-r--r-- | emulators/hatari/files/patch-CMakeLists.txt | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/emulators/hatari/Makefile b/emulators/hatari/Makefile index 80abc5e0c8a6..e483c7d1ad70 100644 --- a/emulators/hatari/Makefile +++ b/emulators/hatari/Makefile @@ -3,7 +3,7 @@ PORTNAME= hatari PORTVERSION= 2.0.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= emulators MASTER_SITES= http://download.tuxfamily.org/hatari/${PORTVERSION}/ diff --git a/emulators/hatari/files/patch-CMakeLists.txt b/emulators/hatari/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..6f69561aa339 --- /dev/null +++ b/emulators/hatari/files/patch-CMakeLists.txt @@ -0,0 +1,20 @@ +${SDL_INCLUDE_DIR} can contain more than one directory, +so using it here as if it is a single directory can confuse +check_include_files. Instead, iterate over it. + +--- CMakeLists.txt.orig 2018-03-20 22:30:14.014771000 +0000 ++++ CMakeLists.txt 2018-03-20 22:31:23.332802000 +0000 +@@ -187,7 +187,12 @@ + check_include_files(termios.h HAVE_TERMIOS_H) + check_include_files(strings.h HAVE_STRINGS_H) + check_include_files(malloc.h HAVE_MALLOC_H) +-check_include_files(${SDL_INCLUDE_DIR}/SDL_config.h HAVE_SDL_CONFIG_H) ++foreach(_sid ${SDL_INCLUDE_DIR}) ++ check_include_files(${_sid}/SDL_config.h HAVE_SDL_CONFIG_H) ++ if(HAVE_SDL_CONFIG_H) ++ break() ++ endif() ++endforeach() + check_include_files(sys/time.h HAVE_SYS_TIME_H) + check_include_files(sys/times.h HAVE_SYS_TIMES_H) + check_include_files(utime.h HAVE_UTIME_H) |