From: Martin Ling Date: Sun, 22 Dec 2013 20:45:47 +0000 (+0000) Subject: Use patch instead of sed to apply hack to pulseview link flags. X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-util.git;a=commitdiff_plain;h=cb1a1fd5b98a04754aee1fd78297d062861d6fe4 Use patch instead of sed to apply hack to pulseview link flags. --- diff --git a/cross-compile/mingw/pulseview.patch b/cross-compile/mingw/pulseview.patch new file mode 100644 index 0000000..e80207e --- /dev/null +++ b/cross-compile/mingw/pulseview.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 443dea6..7b91e0b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -250,6 +250,7 @@ set(PULSEVIEW_LINK_LIBS + if(STATIC_PKGDEPS_LIBS) + link_directories(${PKGDEPS_STATIC_LIBRARY_DIRS}) + list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_STATIC_LIBRARIES}) ++ list(APPEND PULSEVIEW_LINK_LIBS "-llzma -llcms2") # Quick hack + else() + link_directories(${PKGDEPS_LIBRARY_DIRS}) + list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_LIBRARIES}) diff --git a/cross-compile/mingw/sigrok-cross-mingw b/cross-compile/mingw/sigrok-cross-mingw index 6b6c2ac..c2cf88b 100755 --- a/cross-compile/mingw/sigrok-cross-mingw +++ b/cross-compile/mingw/sigrok-cross-mingw @@ -111,8 +111,7 @@ cd .. # PulseView git clone git://sigrok.org/pulseview cd pulseview -# Temporary workaround: append (not prepend) "-llzma -llcms2" to the linker. -sed -i '247a \\tlist(APPEND PULSEVIEW_LINK_LIBS "-llzma -llcms2") # Quick hack' CMakeLists.txt +patch -p1 < ../../pulseview.patch PKG_CONFIG_PATH_i686_pc_mingw32=$P:$P2 cmake $CM -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDISABLE_WERROR=y . && make install VERBOSE=1 makensis -DHOME=$HOME contrib/pulseview_cross.nsi cd ..