parent
65c3b2e3bd
commit
23e43a9dc9
41
srcpkgs/tmines/patches/cmake.patch
Normal file
41
srcpkgs/tmines/patches/cmake.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -58,6 +58,28 @@ add_library(iodevice_simulation src/iodevice_simulation.cpp)
|
||||||
|
find_package(Curses REQUIRED)
|
||||||
|
include_directories(${CURSES_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
+include (CheckCSourceCompiles)
|
||||||
|
+
|
||||||
|
+check_c_source_compiles (
|
||||||
|
+ "#include <argp.h>
|
||||||
|
+ int main () {
|
||||||
|
+ int argc=1;
|
||||||
|
+ char *argv[]={\"test\"};
|
||||||
|
+ argp_parse(0,argc,argv,0,0,0);
|
||||||
|
+ return 0;
|
||||||
|
+ }" LIBC_HAS_ARGP
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
+if (NOT LIBC_HAS_ARGP)
|
||||||
|
+ message(STATUS "libc does not have argp")
|
||||||
|
+ find_library (ARGP_LIB argp REQUIRED)
|
||||||
|
+ if (ARGP_LIB)
|
||||||
|
+ message(STATUS "Found libargp")
|
||||||
|
+ else(ARGP_LIB)
|
||||||
|
+ message(FATAL_ERROR "libargp required but not found")
|
||||||
|
+ endif(ARGP_LIB)
|
||||||
|
+endif(NOT LIBC_HAS_ARGP)
|
||||||
|
+
|
||||||
|
add_executable(tmines src/tmines.cpp)
|
||||||
|
|
||||||
|
add_subdirectory(doc)
|
||||||
|
@@ -68,6 +90,9 @@ target_link_libraries(tmines minefield)
|
||||||
|
target_link_libraries(tmines iodevice_curses)
|
||||||
|
target_link_libraries(tmines iodevice_simulation)
|
||||||
|
target_link_libraries(tmines ${CURSES_LIBRARIES})
|
||||||
|
+if (ARGP_LIB)
|
||||||
|
+ target_link_libraries (tmines ${ARGP_LIB})
|
||||||
|
+endif(ARGP_LIB)
|
||||||
|
|
||||||
|
install(TARGETS tmines DESTINATION bin)
|
||||||
|
# add manpage
|
20
srcpkgs/tmines/template
Normal file
20
srcpkgs/tmines/template
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Template file for 'tmines'
|
||||||
|
pkgname=tmines
|
||||||
|
version=1.0
|
||||||
|
revision=1
|
||||||
|
build_style=cmake
|
||||||
|
makedepends="ncurses-devel"
|
||||||
|
short_desc="Terminal minesweeper clone"
|
||||||
|
maintainer="SolitudeSF <solitudesf@protonmail.com>"
|
||||||
|
license="MIT"
|
||||||
|
homepage="https://github.com/tropf/tmines"
|
||||||
|
distfiles="${homepage}/archive/v${version}.tar.gz"
|
||||||
|
checksum=7b5037c7cedd6c744ec63d10fa59b415e5e3654e52b0cfda561ac545af8576cf
|
||||||
|
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
*-musl) makedepends+=" argp-standalone";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
vlicense LICENSE.md
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user