From 55c1f73d863e4ce656a2097b77b76581186f397c Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sat, 10 Apr 2021 11:01:16 +0100 Subject: [PATCH] Use upstream openwrt libnl-tiny --- pkgs/libnl-tiny/build.sh | 18 +++++++++++++++--- pkgs/libnl-tiny/cmake-no-extra-errs.patch | 11 +++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 pkgs/libnl-tiny/cmake-no-extra-errs.patch diff --git a/pkgs/libnl-tiny/build.sh b/pkgs/libnl-tiny/build.sh index 4a11aa1..4995276 100644 --- a/pkgs/libnl-tiny/build.sh +++ b/pkgs/libnl-tiny/build.sh @@ -2,18 +2,30 @@ pkgname=libnl-tiny pkgver=master fetch() { - curl -L "https://github.com/sabotage-linux/libnl-tiny/archive/refs/heads/master.tar.gz" -o $pkgname-$pkgver.tar.xz + curl "https://git.openwrt.org/?p=project/libnl-tiny.git;a=snapshot;h=HEAD;sf=tgz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz + cp ../cmake-no-extra-errs.patch . + mv $pkgname-HEAD-* $pkgname-$pkgver + mkdir $pkgname-$pkgver/build + cd $pkgname-$pkgver + patch -p1 < ../cmake-no-extra-errs.patch } build() { cd $pkgname-$pkgver - ckati prefix=/usr CC=cc + cd build + cmake -G Ninja ../ \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib + samu } package() { cd $pkgname-$pkgver - ckati install prefix=/usr DESTDIR=$pkgdir CC=cc + cd build + DESTDIR=$pkgdir samu install + ln -sr $pkgdir/usr/lib/pkgconfig/libnl-tiny.pc $pkgdir/usr/lib/pkgconfig/libnl-3.0.pc } license() { diff --git a/pkgs/libnl-tiny/cmake-no-extra-errs.patch b/pkgs/libnl-tiny/cmake-no-extra-errs.patch new file mode 100644 index 0000000..65133e5 --- /dev/null +++ b/pkgs/libnl-tiny/cmake-no-extra-errs.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,7 +5,7 @@ + + INCLUDE_DIRECTORIES(include) + +-ADD_DEFINITIONS(-Wall -Werror -Wextra -Wno-unused-parameter) ++#ADD_DEFINITIONS(-Wall -Werror -Wextra -Wno-unused-parameter) + STRING(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") + + ADD_LIBRARY(nl-tiny SHARED