void-packages/srcpkgs/mgba/patches/Fix-regex-on-empty-libzip-version.patch
2020-06-30 09:26:49 +02:00

15 lines
662 B
Diff

--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -611,10 +611,10 @@
if(USE_LIBZIP)
include_directories(AFTER ${LIBZIP_INCLUDE_DIRS})
link_directories(${LIBZIP_LIBRARY_DIRS})
- list(APPEND DEPENDENCY_LIB ${LIBZIP_LIBRARIES})
+ list(APPEND DEPENDENCY_LIB zip)
list(APPEND FEATURES LIBZIP)
list(APPEND VFS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/util/vfs/vfs-zip.c)
- string(REGEX MATCH "^[0-9]+" LIBZIP_VERSION_MAJOR ${libzip_VERSION})
+ string(REGEX MATCH "^[0-9]+" LIBZIP_VERSION_MAJOR "${libzip_VERSION}")
if (LIBZIP_VERSION_MAJOR LESS 1)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libzip2")
elseif(LIBZIP_VERSION_MAJOR EQUAL 1)