summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2022-09-07 17:30:58 +0300
committerDmitry Marakasov <amdmi3@FreeBSD.org>2022-09-07 17:53:34 +0300
commite979cc6c84ea64e213e48808f7a00b21431c45f9 (patch)
tree9f751152c0c7ee652329d68808a5f2d82ea17208
parent7169e48ef313fb62792748bdc99dc2efd0ec35df (diff)
downloadfreebsd-ports-e979cc6c84ea64e213e48808f7a00b21431c45f9.zip
emulators/joytran: fix build by removing -Werror
While here, add -fcommon to a more suitable var (cflags instead of warning flags) and in a less obscure way (through patch instead of reinplace_cmd). Approved by: portmgr blanket
-rw-r--r--emulators/joytran/Makefile4
-rw-r--r--emulators/joytran/files/patch-CMakeLists.txt14
2 files changed, 14 insertions, 4 deletions
diff --git a/emulators/joytran/Makefile b/emulators/joytran/Makefile
index 1c3ee58e7e45..d28f112c6599 100644
--- a/emulators/joytran/Makefile
+++ b/emulators/joytran/Makefile
@@ -17,10 +17,6 @@ CMAKE_ARGS= -DLOCALBASE:PATH="${LOCALBASE}"
OPTIONS_DEFINE= DOCS
-post-patch:
- @${REINPLACE_CMD} -e '/WARNING_FLAGS/s,-pedantic,& -fcommon,' \
- ${WRKSRC}/CMakeLists.txt
-
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
diff --git a/emulators/joytran/files/patch-CMakeLists.txt b/emulators/joytran/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..e3b8e55447ce
--- /dev/null
+++ b/emulators/joytran/files/patch-CMakeLists.txt
@@ -0,0 +1,14 @@
+--- CMakeLists.txt.orig 2013-05-02 04:53:08 UTC
++++ CMakeLists.txt
+@@ -119,9 +119,9 @@ IF( SDL_LIB STREQUAL "SDL2" )
+ SET(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -DWITH_SDL2")
+ ENDIF()
+ ## These work in both clang and gcc
+-SET(WARNING_FLAGS "-W -Wall -Werror -pedantic")
++SET(WARNING_FLAGS "-W -Wall -pedantic")
+ SET(CMAKE_C_FLAGS
+- "${WARNING_FLAGS} -isystem${CMAKE_INCLUDE_PATH} ${CMAKE_CPP_FLAGS}")
++ "${WARNING_FLAGS} -isystem${CMAKE_INCLUDE_PATH} ${CMAKE_CPP_FLAGS} -fcommon")
+ SET(CMAKE_LD_FLAGS "-L${CMAKE_LIB_PATH} -lX11 -lXtst -l${SDL_LIB}")
+ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_LD_FLAGS}")
+ SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CMAKE_LD_FLAGS}")