diff options
author | Michael Straube | 2020-05-12 22:45:34 +0200 |
---|---|---|
committer | Michael Straube | 2020-05-12 22:45:34 +0200 |
commit | 6d8b2678f0826aac38264a0b9e5f98beb2c32ec7 (patch) | |
tree | cd7b597da8c6002d82f3eb20fed74356fec34ede | |
parent | f9d50677b55d2a692786ce124269743b80b51e2a (diff) | |
download | aur-6d8b2678f0826aac38264a0b9e5f98beb2c32ec7.tar.gz |
Fix build (gcc10)
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 0001-chipmachine-rpath.patch | 12 | ||||
-rw-r--r-- | 0002-musicplayer-cmake314.patch | 13 | ||||
-rw-r--r-- | 0003-chipmachine-gcc10.patch | 13 | ||||
-rw-r--r-- | PKGBUILD | 26 |
5 files changed, 63 insertions, 7 deletions
@@ -18,9 +18,15 @@ pkgbase = chipmachine-git source = git+https://github.com/sasq64/chipmachine.git source = git+https://github.com/sasq64/apone.git source = git+https://github.com/sasq64/musicplayer.git + source = 0001-chipmachine-rpath.patch + source = 0002-musicplayer-cmake314.patch + source = 0003-chipmachine-gcc10.patch sha512sums = SKIP sha512sums = SKIP sha512sums = SKIP + sha512sums = 59f5d6f5e34a5fa9fb668f7272415d02c8ebca00d37271f534af81df1698bc415c8ace2a8fe6260972006ec144409dbd3143531816169e6692c1ba1173ec6ad2 + sha512sums = 0ea7b7d1cd46c7adafebcffefe1a92c5bfbdc4e9aa8849a617aff78cdceb216d9007649c1e80a616c650196dba4dd564215aa48b89c3b907fd8cd6561a1840bf + sha512sums = 1cf5640b76f7ca3a03b61d70cfccc9e7600e9f2ed15193e55feed6b07c8501fff32999963e5fa751556b72e1ff85f6efdc8d0623a33883f9ddde640018e78c4f pkgname = chipmachine-git diff --git a/0001-chipmachine-rpath.patch b/0001-chipmachine-rpath.patch new file mode 100644 index 000000000000..9ced0fb2c27b --- /dev/null +++ b/0001-chipmachine-rpath.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6a21e7e..24e5b9f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,7 +5,6 @@ set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_EXPORT_COMPILE_COMMANDS 1) + +-link_directories(/usr/local/lib /usr/local/Cellar/llvm/6.0.1/lib) + include_directories(/usr/local/include) + + find_program(CCACHE_PROGRAM ccache) diff --git a/0002-musicplayer-cmake314.patch b/0002-musicplayer-cmake314.patch new file mode 100644 index 000000000000..8530cf665799 --- /dev/null +++ b/0002-musicplayer-cmake314.patch @@ -0,0 +1,13 @@ +diff --git a/plugins/uadeplugin/CMakeLists.txt b/plugins/uadeplugin/CMakeLists.txt +index 5491e7e..cc1b09c 100644 +--- a/plugins/uadeplugin/CMakeLists.txt ++++ b/plugins/uadeplugin/CMakeLists.txt +@@ -69,7 +69,7 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpuemu.c ${CMAKE_CURRENT_B + COMMENT "Running gencpu") + + add_library(uade OBJECT ${UADE_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/cpuemu.c ${CMAKE_CURRENT_BINARY_DIR}/cpudefs.c ${CMAKE_CURRENT_BINARY_DIR}/cpustbl.c) +-target_link_libraries(uade PRIVATE ws2_32) ++target_link_libraries(uade PRIVATE ${EXTRA_LIBS}) + target_compile_definitions(uade PRIVATE -DPART_1 -DPART_2 -DPART_3 -DPART_4 -DPART_5 -DPART_6 -DPART_7 -DPART_8) + #target_compile_options(uade PRIVATE -Wno-format -Wno-implicit-function-declaration) + target_include_directories(uade PRIVATE diff --git a/0003-chipmachine-gcc10.patch b/0003-chipmachine-gcc10.patch new file mode 100644 index 000000000000..a85b7df0b27f --- /dev/null +++ b/0003-chipmachine-gcc10.patch @@ -0,0 +1,13 @@ +diff --git a/src/di.hpp b/src/di.hpp +index b15b3e7..3f82620 100644 +--- a/src/di.hpp ++++ b/src/di.hpp +@@ -70,7 +70,7 @@ BOOST_DI_CFG_FWD + # pragma clang diagnostic error "-Wundefined-internal" + # pragma clang diagnostic ignored "-Wmissing-field-initializers" + # elif defined(__GCC__) +-# pragma GCC diagnostic error "-Wdeprecated-declarations" ++# pragma GCC diagnostic warning "-Wdeprecated-declarations" + # pragma GCC diagnostic push + # if (__GNUC__ < 6) + # pragma GCC diagnostic error "-Werror" @@ -14,26 +14,38 @@ provides=('chipmachine') conflicts=('chipmachine') source=("git+https://github.com/sasq64/chipmachine.git" "git+https://github.com/sasq64/apone.git" - "git+https://github.com/sasq64/musicplayer.git") + "git+https://github.com/sasq64/musicplayer.git" + "0001-chipmachine-rpath.patch" + "0002-musicplayer-cmake314.patch" + "0003-chipmachine-gcc10.patch") sha512sums=('SKIP' 'SKIP' - 'SKIP') + 'SKIP' + '59f5d6f5e34a5fa9fb668f7272415d02c8ebca00d37271f534af81df1698bc415c8ace2a8fe6260972006ec144409dbd3143531816169e6692c1ba1173ec6ad2' + '0ea7b7d1cd46c7adafebcffefe1a92c5bfbdc4e9aa8849a617aff78cdceb216d9007649c1e80a616c650196dba4dd564215aa48b89c3b907fd8cd6561a1840bf' + '1cf5640b76f7ca3a03b61d70cfccc9e7600e9f2ed15193e55feed6b07c8501fff32999963e5fa751556b72e1ff85f6efdc8d0623a33883f9ddde640018e78c4f') pkgver() { cd chipmachine - git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' + git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./g' } prepare() { mkdir -p build - # remove insecure rpath - sed -i '/link_directories(\/usr\/local\/lib.*/d' chipmachine/CMakeLists.txt - # fix linking errors with cmake >= 3.14.0 - sed -i '/target_link_libraries(uade PRIVATE ws2_32)/d' musicplayer/plugins/uadeplugin/CMakeLists.txt + # Remove insecure rpath + patch -d chipmachine -Np1 < 0001-chipmachine-rpath.patch + # Fix linking errors with cmake >= 3.14.0 + patch -d musicplayer -Np1 < 0002-musicplayer-cmake314.patch + # Fix build errors with gcc10 + patch -d chipmachine -Np1 < 0003-chipmachine-gcc10.patch } build() { cd build + + # Workaround for gcc10 linking errors + export CFLAGS+=" -fcommon" + cmake ../chipmachine make } |