[education/rkward] rkward/rbackend/rpackages: Don't use GNU tar options on Mac (where BSD tar seems to be in use).

Thomas Friedrichsmeier null at kde.org
Thu Feb 10 16:16:41 GMT 2022


Git commit 294a90cce91b8e84b3a70d551eec70fc434c6a82 by Thomas Friedrichsmeier.
Committed on 10/02/2022 at 16:14.
Pushed by tfry into branch 'master'.

Don't use GNU tar options on Mac (where BSD tar seems to be in use).

This is a partial undo of https://invent.kde.org/education/rkward/-/merge_requests/6

M  +11   -4    rkward/rbackend/rpackages/CMakeLists.txt

https://invent.kde.org/education/rkward/commit/294a90cce91b8e84b3a70d551eec70fc434c6a82

diff --git a/rkward/rbackend/rpackages/CMakeLists.txt b/rkward/rbackend/rpackages/CMakeLists.txt
index e6de6f61..cca44e8a 100644
--- a/rkward/rbackend/rpackages/CMakeLists.txt
+++ b/rkward/rbackend/rpackages/CMakeLists.txt
@@ -1,9 +1,16 @@
 MACRO(createRpackage name)
 	FILE(GLOB_RECURSE rkwardfiles${name} LIST_DIRECTORIES true CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${name}/*")
-	ADD_CUSTOM_COMMAND(OUTPUT ${name}.tgz
-		COMMAND tar "cfz" "${CMAKE_CURRENT_BINARY_DIR}/${name}.tgz" "--owner=0" "--group=0" "--numeric-owner" "${name}"
-		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-		DEPENDS ${rkwardfiles${name}})
+	IF(APPLE)
+		ADD_CUSTOM_COMMAND(OUTPUT ${name}.tgz
+			COMMAND ${CMAKE_COMMAND} -E tar "cfz" "${CMAKE_CURRENT_BINARY_DIR}/${name}.tgz" "${name}"
+			WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+			DEPENDS ${rkwardfiles${name}})
+	ELSE(APPLE)
+		ADD_CUSTOM_COMMAND(OUTPUT ${name}.tgz
+			COMMAND tar "cfz" "${CMAKE_CURRENT_BINARY_DIR}/${name}.tgz" "--owner=0" "--group=0" "--numeric-owner" "${name}"
+			WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+			DEPENDS ${rkwardfiles${name}})
+	ENDIF(APPLE)
 ENDMACRO()
 
 createRpackage(rkward)


More information about the rkward-tracker mailing list