aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2022-11-24 00:10:38 +0000
committerpsykose <alice@ayaya.dev>2022-11-24 01:10:38 +0100
commit6e959b3c5527a5f791866aa6f4dac7f88b6d4459 (patch)
tree062a25d01638727e3bb5c604db9a138e6296a528
parent93f7660414ea69e464bc7b448e86a325ccba3754 (diff)
downloadaports-6e959b3c5527a5f791866aa6f4dac7f88b6d4459.tar.gz
aports-6e959b3c5527a5f791866aa6f4dac7f88b6d4459.tar.bz2
aports-6e959b3c5527a5f791866aa6f4dac7f88b6d4459.tar.xz
testing/openscap: fix build, modernise
-rw-r--r--testing/openscap/APKBUILD58
-rw-r--r--testing/openscap/strerror_r.patch14
2 files changed, 55 insertions, 17 deletions
diff --git a/testing/openscap/APKBUILD b/testing/openscap/APKBUILD
index ffd4fc59f3..cc84727df3 100644
--- a/testing/openscap/APKBUILD
+++ b/testing/openscap/APKBUILD
@@ -7,39 +7,61 @@ pkgdesc="NIST Certified SCAP 1.2 toolkit"
url="https://www.open-scap.org/tools/openscap-base/"
arch="all"
license="LGPL-2.1-or-later"
-makedepends="cmake python3-dev dbus-dev dbus-glib-dev bash libselinux-dev
- curl-dev openssl-dev>3 libgcrypt-dev acl-dev libblkid libcap-dev libxml2-dev
- libxslt-dev openldap-dev pcre2-dev perl-xml-parser perl-xml-xpath perl-dev
- rpm-dev swig bzip2-dev asciidoc musl-fts-dev doxygen procps-dev
- libbz2 util-linux-dev nss-dev xmlsec-dev"
+makedepends="
+ acl-dev
+ asciidoc
+ bash
+ bzip2-dev
+ cmake
+ curl-dev
+ dbus-dev
+ dbus-glib-dev
+ doxygen
+ libblkid
+ libbz2
+ libcap-dev
+ libgcrypt-dev
+ libselinux-dev
+ libxml2-dev
+ libxslt-dev
+ musl-fts-dev
+ nss-dev
+ openldap-dev
+ openssl-dev>3
+ pcre-dev
+ perl-dev
+ perl-xml-parser
+ perl-xml-xpath
+ procps-dev
+ python3-dev
+ rpm-dev
+ swig
+ util-linux-dev
+ xmlsec-dev
+ "
options="!check"
subpackages="$pkgname-dev $pkgname-doc $pkgname-bash-completion"
source="https://github.com/OpenSCAP/openscap/releases/download/$pkgver/openscap-$pkgver.tar.gz
fix-ppc64le-path_max.patch
path_mounted.patch
+ $pkgname-rpm.patch::https://github.com/OpenSCAP/openscap/commit/8dec1bb5e9546e75ae6e7b7cf94cf00197ce3e5d.patch
+ strerror_r.patch
"
-prepare() {
- default_prepare
- mkdir -p build
-}
-
build() {
- cd "$builddir"/build
export LIBS=-lfts
- cmake \
+ cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DENABLE_DOCS=ON \
-DENABLE_PERL=OFF \
- -DENABLE_TESTS=OFF\
- ..
- make
+ -DENABLE_TESTS=OFF
+
+ cmake --build build
}
package() {
- cd "$builddir"/build
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" cmake --install build
install -Dm644 "$builddir"/dist/bash_completion.d/oscap \
"$pkgdir"/usr/share/bash-completion/completions/$pkgname
@@ -49,4 +71,6 @@ sha512sums="
5e4d6c4addc15b2a0245b5caef80fda3020f1cac83ed4aa436ef3f1703d1d761060c931c2536fa68de7ad5bab002b79c8b2d1e5f7695d46249f4562f5a1569a0 openscap-1.3.6.tar.gz
0d8e5eb492b4439b82e35e4a87a2030f9aeff3173bda60d8ce57584fa7d7dda970ad35099e45fe46a7e135d9a55d6c2ced0a8b180556e37c7a9926de28244133 fix-ppc64le-path_max.patch
f2157d6b1d31affe16edb184a287b69d28808123f1cc26a5a4238040d935517b307772b1f2d66271b8ee99b59a4d204930f9147b78478c83c36c7fc8718ec1d9 path_mounted.patch
+06011efb9727051dd579e8adec892b8c99e68154495fa49048a44bad8fd613fbe6fa486eef0e129fb820234c45f6eb33b9f05a0ea261db00dd96bcaa26c63238 openscap-rpm.patch
+75abc126d393dd0d1e71c0cf9805346f34d4953531d86d734f3c086f5234ce39238c97d9cc379411d75e654afa74fed74566811d0f8a836a24054b656d8af7ec strerror_r.patch
"
diff --git a/testing/openscap/strerror_r.patch b/testing/openscap/strerror_r.patch
new file mode 100644
index 0000000000..4689316868
--- /dev/null
+++ b/testing/openscap/strerror_r.patch
@@ -0,0 +1,14 @@
+musl uses the non-gnu variant
+diff --git a/src/common/util.c b/src/common/util.c
+index 8f9f751..78b613e 100644
+--- a/src/common/util.c
++++ b/src/common/util.c
+@@ -324,7 +324,7 @@ char *oscap_strerror_r(int errnum, char *buf, size_t buflen)
+ #ifdef OS_WINDOWS
+ strerror_s(buf, buflen, errnum);
+ return buf;
+-#elif defined(OS_FREEBSD)
++#elif true
+ strerror_r(errnum, buf, buflen);
+ return buf;
+ #else