Unbreak building nvi with CMake-3.1 (still works with 3.0.2)
Switch to ninja and remove "USE_NINJA=No"
This commit is contained in:
parent
146503f587
commit
58d1a0c0a7
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.10 2013/11/20 03:43:05 bentley Exp $
|
||||
# $OpenBSD: Makefile,v 1.11 2014/12/25 19:41:07 dcoppa Exp $
|
||||
|
||||
COMMENT= ex/vi text editor with wide character support
|
||||
|
||||
@ -18,10 +18,6 @@ WANTLIB= c ncursesw util
|
||||
|
||||
MODULES= devel/cmake
|
||||
|
||||
# the specialized commands don't work yet.
|
||||
# until we figure out a graceful way to deal with $@ in cmake.
|
||||
USE_NINJA = No
|
||||
|
||||
# ${WRKSRC}/config.h is written
|
||||
SEPARATE_BUILD= No
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-build_CMakeLists_txt,v 1.3 2013/11/20 03:43:05 bentley Exp $
|
||||
--- build/CMakeLists.txt.orig Sat Nov 16 23:27:11 2013
|
||||
+++ build/CMakeLists.txt Sat Nov 16 23:27:18 2013
|
||||
@@ -29,17 +29,17 @@ if(DEBUG)
|
||||
$OpenBSD: patch-build_CMakeLists_txt,v 1.4 2014/12/25 19:41:07 dcoppa Exp $
|
||||
--- build/CMakeLists.txt.orig Sat Nov 2 11:22:55 2013
|
||||
+++ build/CMakeLists.txt Wed Dec 24 15:38:18 2014
|
||||
@@ -29,48 +29,48 @@ if(DEBUG)
|
||||
"-Wstack-protector -fstack-protector"
|
||||
"-Wstrict-aliasing -fstrict-aliasing")
|
||||
join("${_arg_str}" CMAKE_C_FLAGS)
|
||||
@ -30,3 +30,65 @@ $OpenBSD: patch-build_CMakeLists_txt,v 1.3 2013/11/20 03:43:05 bentley Exp $
|
||||
endif(DEBUG)
|
||||
|
||||
# generate the public headers
|
||||
add_custom_target(headers ALL DEPENDS
|
||||
- ../cl/extern.h ../common/extern.h ../ex/extern.h ../vi/extern.h
|
||||
- ../common/options_def.h ../ex/ex_def.h ../ex/version.h)
|
||||
+ cl_extern.h common_extern.h ex_extern.h vi_extern.h
|
||||
+ options_def.h ex_def.h version.h)
|
||||
|
||||
set(extract_protos sed -n 's/^ \\* PUBLIC: \\\(.*\\\)/\\1/p')
|
||||
set(extract_version sed -n
|
||||
's/^.*version \\\([^\)]*\)\\\).*/\#define VI_VERSION \\\"\\1\\\"/p')
|
||||
-add_custom_command(OUTPUT ../cl/extern.h
|
||||
- COMMAND ${extract_protos} ../cl/*.c > $@
|
||||
- DEPENDS ../cl/*.c)
|
||||
-add_custom_command(OUTPUT ../common/extern.h
|
||||
- COMMAND ${extract_protos} ../common/*.c > $@
|
||||
- DEPENDS ../common/*.c)
|
||||
-add_custom_command(OUTPUT ../ex/extern.h
|
||||
- COMMAND ${extract_protos} ../ex/*.c > $@
|
||||
- DEPENDS ../ex/*.c)
|
||||
-add_custom_command(OUTPUT ../vi/extern.h
|
||||
- COMMAND ${extract_protos} ../vi/*.c > $@
|
||||
- DEPENDS ../vi/*.c)
|
||||
-add_custom_command(OUTPUT ../common/options_def.h
|
||||
- COMMAND awk -f ../common/options.awk ../common/options.c > $@
|
||||
- DEPENDS ../common/options.c)
|
||||
-add_custom_command(OUTPUT ../ex/ex_def.h
|
||||
- COMMAND awk -f ../ex/ex.awk ../ex/ex_cmd.c > $@
|
||||
- DEPENDS ../ex/ex_cmd.c)
|
||||
-add_custom_command(OUTPUT ../ex/version.h
|
||||
- COMMAND ${extract_version} ../README > $@
|
||||
- DEPENDS ../README)
|
||||
+add_custom_command(OUTPUT cl_extern.h
|
||||
+ COMMAND ${extract_protos} *.c > cl_extern.h
|
||||
+ WORKING_DIRECTORY ../cl/)
|
||||
+add_custom_command(OUTPUT common_extern.h
|
||||
+ COMMAND ${extract_protos} *.c > common_extern.h
|
||||
+ WORKING_DIRECTORY ../common/)
|
||||
+add_custom_command(OUTPUT ex_extern.h
|
||||
+ COMMAND ${extract_protos} *.c > ex_extern.h
|
||||
+ WORKING_DIRECTORY ../ex/)
|
||||
+add_custom_command(OUTPUT vi_extern.h
|
||||
+ COMMAND ${extract_protos} *.c > vi_extern.h
|
||||
+ WORKING_DIRECTORY ../vi/)
|
||||
+add_custom_command(OUTPUT options_def.h
|
||||
+ COMMAND awk -f options.awk options.c > options_def.h
|
||||
+ WORKING_DIRECTORY ../common/)
|
||||
+add_custom_command(OUTPUT ex_def.h
|
||||
+ COMMAND awk -f ex.awk ex_cmd.c > ex_def.h
|
||||
+ WORKING_DIRECTORY ../ex/)
|
||||
+add_custom_command(OUTPUT version.h
|
||||
+ COMMAND ${extract_version} ../README > version.h
|
||||
+ WORKING_DIRECTORY ../ex/)
|
||||
|
||||
FILE(GLOB MAIN_SRCS ../cl/*.c ../common/*.c ../ex/*.c ../vi/*.c)
|
||||
FILE(GLOB REGEX_SRCS ../regex/reg*.c)
|
||||
@@ -154,6 +154,7 @@ configure_file(${CMAKE_SOURCE_DIR}/recover.in
|
||||
${CMAKE_SOURCE_DIR}/recover @ONLY)
|
||||
|
||||
add_executable(nvi ${MAIN_SRCS})
|
||||
+add_dependencies(nvi headers)
|
||||
target_link_libraries(nvi ${CURSES_LIBRARY} ${UTIL_LIBRARY} ${RESOLV_LIBRARY})
|
||||
if(USE_WIDECHAR)
|
||||
target_link_libraries(nvi regex)
|
||||
|
9
editors/nvi/patches/patch-cl_cl_h
Normal file
9
editors/nvi/patches/patch-cl_cl_h
Normal file
@ -0,0 +1,9 @@
|
||||
$OpenBSD: patch-cl_cl_h,v 1.1 2014/12/25 19:41:07 dcoppa Exp $
|
||||
--- cl/cl.h.orig Wed Dec 24 11:08:53 2014
|
||||
+++ cl/cl.h Wed Dec 24 11:10:07 2014
|
||||
@@ -92,4 +92,4 @@ typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, I
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
-#include "extern.h"
|
||||
+#include "cl_extern.h"
|
9
editors/nvi/patches/patch-common_common_h
Normal file
9
editors/nvi/patches/patch-common_common_h
Normal file
@ -0,0 +1,9 @@
|
||||
$OpenBSD: patch-common_common_h,v 1.1 2014/12/25 19:41:07 dcoppa Exp $
|
||||
--- common/common.h.orig Wed Dec 24 11:09:08 2014
|
||||
+++ common/common.h Wed Dec 24 11:10:21 2014
|
||||
@@ -90,4 +90,4 @@ typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } se
|
||||
#include "log.h"
|
||||
#include "mem.h"
|
||||
|
||||
-#include "extern.h"
|
||||
+#include "common_extern.h"
|
9
editors/nvi/patches/patch-ex_ex_h
Normal file
9
editors/nvi/patches/patch-ex_ex_h
Normal file
@ -0,0 +1,9 @@
|
||||
$OpenBSD: patch-ex_ex_h,v 1.1 2014/12/25 19:41:07 dcoppa Exp $
|
||||
--- ex/ex.h.orig Wed Dec 24 11:09:30 2014
|
||||
+++ ex/ex.h Wed Dec 24 11:10:43 2014
|
||||
@@ -230,4 +230,4 @@ typedef enum {
|
||||
} tagmsg_t;
|
||||
|
||||
#include "ex_def.h"
|
||||
-#include "extern.h"
|
||||
+#include "ex_extern.h"
|
9
editors/nvi/patches/patch-vi_vi_h
Normal file
9
editors/nvi/patches/patch-vi_vi_h
Normal file
@ -0,0 +1,9 @@
|
||||
$OpenBSD: patch-vi_vi_h,v 1.1 2014/12/25 19:41:07 dcoppa Exp $
|
||||
--- vi/vi.h.orig Wed Dec 24 11:09:37 2014
|
||||
+++ vi/vi.h Wed Dec 24 11:10:58 2014
|
||||
@@ -383,4 +383,4 @@ typedef enum {
|
||||
VIM_NOCOM, VIM_NOCOM_B, VIM_USAGE, VIM_WRESIZE
|
||||
} vim_t;
|
||||
|
||||
-#include "extern.h"
|
||||
+#include "vi_extern.h"
|
Loading…
Reference in New Issue
Block a user