void-packages/srcpkgs/mgba/patches/Fix-regex-on-empty-libzip-version.patch

16 lines
662 B
Diff
Raw Normal View History

2020-06-27 09:42:25 +00:00
--- 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)