-
-
Save SammysHP/fbe6bc26617ca8f61ecb270c40e64746 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit be78089e054676a4f8465997ac4f0dcb48a0b33c | |
Author: SammysHP <sven@sammyshp.de> | |
Date: Fri Jun 3 21:51:18 2022 +0200 | |
Disable checks | |
The CMake check target requires CMake dependencies that aren't generated | |
due to missing dependencies. But we don't run checks anyway in this | |
PKGBUILD, so a little patch is added to remove the CMake check target. | |
diff --git a/0001-disable_check.patch b/0001-disable_check.patch | |
new file mode 100644 | |
index 0000000..e52bcf8 | |
--- /dev/null | |
+++ b/0001-disable_check.patch | |
@@ -0,0 +1,28 @@ | |
+diff --git a/CMakeLists.txt b/CMakeLists.txt | |
+index 98f80df..a698d14 100644 | |
+--- a/CMakeLists.txt | |
++++ b/CMakeLists.txt | |
+@@ -22,6 +22,7 @@ option(BUILD_TCL "build TCL SWIG module" OFF) | |
+ option(BUILD_PYTHON "build Python SWIG module" OFF) | |
+ option(BUILD_VERILOG "build VERILOG module" OFF) | |
+ option(CHECK_VALGRIND "run gtest regression test with valgrind" OFF) | |
++option(WITH_CHECK "add check target" ON) | |
+ | |
+ # find tools | |
+ # find python executable, for Python3 you need a virtual env, which links python to python3 executable! | |
+@@ -85,6 +86,7 @@ add_subdirectory(doc) | |
+ add_subdirectory(kbdgentables) | |
+ | |
+ # check targets | |
++if(WITH_CHECK) | |
+ add_custom_target(check COMMENT "run all regression tests") | |
+ add_subdirectory(regress) | |
+ add_dependencies(check check-regress) | |
+@@ -97,6 +99,7 @@ endif(BUILD_TCL) | |
+ if(BUILD_VERILOG) | |
+ add_dependencies(check check-verilog) | |
+ endif(BUILD_VERILOG) | |
++endif(WITH_CHECK) | |
+ | |
+ # debian package target | |
+ find_program(DPKG dpkg) | |
diff --git a/PKGBUILD b/PKGBUILD | |
index 1c91bd3..eaf4299 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -23,22 +23,30 @@ depends=() | |
makedepends=('cmake' 'git' 'help2man' 'iverilog' 'python' 'swig' 'tcl' 'texinfo') | |
provides=('simulavr') | |
conflicts=('simulavr') | |
-source=("${pkgname}::git+https://git.savannah.nongnu.org/git/simulavr.git") | |
-sha256sums=('SKIP') | |
+source=("${pkgname}::git+https://git.savannah.nongnu.org/git/simulavr.git" | |
+ '0001-disable_check.patch') | |
+sha256sums=('SKIP' | |
+ '89b418d7fa00e37b887b848561914fd4d37a579f32d069537a385d5a235575f9') | |
pkgver() { | |
cd "${srcdir}/${pkgname}" | |
git describe --long --tags --match 'release-*' | sed 's/^release-//;s/\([^-]*-g\)/r\1/;s/-/./g' | |
} | |
+prepare() { | |
+ cd "${srcdir}/${pkgname}" | |
+ patch -p1 -i ../0001-disable_check.patch | |
+} | |
+ | |
build() { | |
cd "${srcdir}/${pkgname}" | |
cmake -S . -B build \ | |
- -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr/" \ | |
+ -DCMAKE_INSTALL_PREFIX="/usr" \ | |
-DBUILD_TCL=ON \ | |
-DBUILD_PYTHON=ON \ | |
- -DBUILD_VERILOG=ON | |
+ -DBUILD_VERILOG=ON \ | |
+ -DWITH_CHECK=OFF | |
make -j1 -C build | |
make -j1 -C build progdoc | |
@@ -47,7 +55,7 @@ build() { | |
package() { | |
cd "${srcdir}/${pkgname}/build" | |
- make -j1 install | |
+ make DESTDIR="${pkgdir}" install | |
mv "${pkgdir}/usr/share/doc/common" "${pkgdir}/usr/share/doc/simulavr" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment