From 3449a5431c2f9c5ce20a9837f10fc931b4f79497 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Thu, 12 Nov 2020 05:39:30 +0300 Subject: [PATCH] New package: whdd-3.0 --- srcpkgs/dialog/template | 4 +++- srcpkgs/whdd/patches/gnu-source.patch | 11 +++++++++++ srcpkgs/whdd/template | 17 +++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/whdd/patches/gnu-source.patch create mode 100644 srcpkgs/whdd/template diff --git a/srcpkgs/dialog/template b/srcpkgs/dialog/template index 14ea1d440f459e..e613be6ca19fe2 100644 --- a/srcpkgs/dialog/template +++ b/srcpkgs/dialog/template @@ -6,7 +6,9 @@ version="${_distver}.${_date}" revision=2 wrksrc="${pkgname}-${_distver}-${_date}" build_style=gnu-configure -configure_args="--with-ncursesw --with-libtool --disable-nls" +configure_args="LIBTOOL=${XBPS_CROSS_BASE}/usr/bin/libtool --with-ncursesw --with-libtool --disable-nls" +make_build_args="LIBTOOL=${XBPS_CROSS_BASE}/usr/bin/libtool" +make_install_args="LIBTOOL=${XBPS_CROSS_BASE}/usr/bin/libtool" make_install_target="install-full" hostmakedepends="libtool" makedepends="ncurses-devel" diff --git a/srcpkgs/whdd/patches/gnu-source.patch b/srcpkgs/whdd/patches/gnu-source.patch new file mode 100644 index 00000000000000..08ad39750c1111 --- /dev/null +++ b/srcpkgs/whdd/patches/gnu-source.patch @@ -0,0 +1,11 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -5,7 +5,7 @@ + option(STATIC "Build static binaries" OFF) + option(CLI "Build whdd-cli" OFF) + +-set(CMAKE_C_FLAGS "-std=gnu99 -pthread -Wall -Wextra -Wno-missing-field-initializers ${CFLAGS}") ++set(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -pthread -Wall -Wextra -Wno-missing-field-initializers ${CFLAGS}") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS}") + set(CMAKE_C_FLAGS_DEBUG "-O0 -g -ggdb ${CMAKE_C_FLAGS}") + diff --git a/srcpkgs/whdd/template b/srcpkgs/whdd/template new file mode 100644 index 00000000000000..afcaafb86e2779 --- /dev/null +++ b/srcpkgs/whdd/template @@ -0,0 +1,17 @@ +# Template file for 'whdd' +pkgname=whdd +version=3.0 +revision=1 +build_style=cmake +configure_args="-DCLI=ON" +makedepends="dialog-devel ncurses-devel" +short_desc="HDD diagnostics and data recovery tool for Linux" +maintainer="Artur Sinila " +license="GPL-3.0-only" +homepage="https://github.com/whdd/whdd" +distfiles="https://github.com/whdd/whdd/archive/${version}.tar.gz" +checksum=b0877375a54e0c915dfe418f5330b0e1d409629d1f298539f6a0556df2c8335a + +post_install() { + mv "${DESTDIR}/usr/sbin" "${DESTDIR}/usr/bin" +}