summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-23 05:17:08 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-23 05:17:21 -0500
commit15956969034219fe023dc7a42883dd2e525aa06e (patch)
treeb54a1ba0b699131e067fd3cae25e03a918688678
parent13504e81a2654dac070e10036d8dfacba3c3e358 (diff)
downloadpackages-15956969034219fe023dc7a42883dd2e525aa06e.tar.gz
packages-15956969034219fe023dc7a42883dd2e525aa06e.tar.bz2
packages-15956969034219fe023dc7a42883dd2e525aa06e.tar.xz
packages-15956969034219fe023dc7a42883dd2e525aa06e.zip
user/libmowgli: pull in, take, fix
wow, I never thought I'd see my name next to libmowgli ever again...
-rw-r--r--user/libmowgli/APKBUILD36
-rw-r--r--user/libmowgli/cacheline.patch25
2 files changed, 61 insertions, 0 deletions
diff --git a/user/libmowgli/APKBUILD b/user/libmowgli/APKBUILD
new file mode 100644
index 000000000..e951bcf03
--- /dev/null
+++ b/user/libmowgli/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=libmowgli
+pkgver=2.1.3
+pkgrel=1
+pkgdesc="C library framework designed to reduce writing of boilerplate code"
+url="http://atheme.org/"
+arch="all"
+options="!check" # No test suite.
+license="ISC"
+depends=""
+makedepends="openssl-dev"
+subpackages="$pkgname-dev"
+source="https://github.com/atheme/libmowgli-2/archive/v$pkgver/libmowgli-$pkgver.tar.gz
+ cacheline.patch"
+builddir="$srcdir"/$pkgname-2-$pkgver
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="bf976cf8b8bf0efaf7565230f42147adcdbe993339f58f907f5005eddf178d936cffb6cdbba59e38813854f30414856a1b9f8bdc972ea2f59cb08987ee336533 libmowgli-2.1.3.tar.gz
+861f043ef931b6d256c76c45a7958e3fdaf4db2d50ec09c2881a3d9f73c14666693cb11fc5a1ebbe1957efdaed970af86b7b61f2a02302d7f67d0f6c3e4f2bee cacheline.patch"
diff --git a/user/libmowgli/cacheline.patch b/user/libmowgli/cacheline.patch
new file mode 100644
index 000000000..0a5c3374e
--- /dev/null
+++ b/user/libmowgli/cacheline.patch
@@ -0,0 +1,25 @@
+From 2b8892fe2ca51ef0334b08babad0fa9d689087c0 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Wed, 27 Sep 2017 01:42:33 -0500
+Subject: [PATCH] cacheline: Ensure sysconf var is defined before use on Linux
+
+---
+ src/libmowgli/platform/cacheline.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libmowgli/platform/cacheline.c b/src/libmowgli/platform/cacheline.c
+index 90c803f..7651588 100644
+--- a/src/libmowgli/platform/cacheline.c
++++ b/src/libmowgli/platform/cacheline.c
+@@ -32,7 +32,7 @@ size_t cacheline_size;
+ void
+ mowgli_cacheline_bootstrap(void)
+ {
+-#ifdef MOWGLI_OS_LINUX
++#if defined(MOWGLI_OS_LINUX) && defined(_SC_LEVEL1_DCACHE_LINESIZE)
+ cacheline_size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
+ #elif defined(MOWGLI_OS_OSX)
+ size_t size = sizeof(size_t);
+--
+2.10.0
+