diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-02-23 14:54:00 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-02-23 14:54:42 +0000 |
commit | e48dbca741b220a9f059ff2400089484082b0b32 (patch) | |
tree | 4413915222e7aacacbb392e5303b4ea70194051a /testing/ustr | |
parent | 0030ca9f7771c9094f8a4383254ae0e52f15e864 (diff) | |
download | aports-e48dbca741b220a9f059ff2400089484082b0b32.tar.bz2 aports-e48dbca741b220a9f059ff2400089484082b0b32.tar.xz |
testing/ustr: new aport
String library, very low memory overhead, simple to import
http://www.and.org/ustr/
Diffstat (limited to 'testing/ustr')
-rw-r--r-- | testing/ustr/APKBUILD | 51 | ||||
-rw-r--r-- | testing/ustr/c99-inline.patch | 30 |
2 files changed, 81 insertions, 0 deletions
diff --git a/testing/ustr/APKBUILD b/testing/ustr/APKBUILD new file mode 100644 index 0000000000..5cde6920c2 --- /dev/null +++ b/testing/ustr/APKBUILD @@ -0,0 +1,51 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=ustr +pkgver=1.0.4 +pkgrel=0 +pkgdesc="String library, very low memory overhead, simple to import" +url="http://www.and.org/ustr/" +arch="all" +license="MIT or LGPLv2+ or BSD" +depends="" +depends_dev="" +makedepends="$depends_dev" +install="" +subpackages="$pkgname-static $pkgname-debug $pkgname-doc $pkgname-dev" +source="http://www.and.org/ustr/$pkgver/ustr-$pkgver.tar.bz2 + c99-inline.patch + " +builddir="$srcdir/ustr-$pkgver" + +build() { + cd "$builddir" + make all-shared CFLAGS="$CFLAGS -fgnu89-inline" || return 1 +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install || return 1 +} + +static() { + pkgdesc="ustr static libraries" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/ +} + +debug() { + pkgdesc="Development files for libustr with debugging enabled" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libustr-debug*.so.* "$subpkgdir"/usr/lib/ || return 1 +} + +dev() { + mkdir -p "$subpkgdir"/usr + mv "$pkgdir"/usr/share \ + "$pkgdir"/usr/bin \ + "$subpkgdir"/usr \ + || return 1 + default_dev +} + +sha512sums="b7df6ca3a9f25ee6f5c9ab4325732d348de27c5e02ebff36a7d5706f56b2df994df35bd652825a28e27bbde731c6a5933248d99c670d192b1952e7534eec1510 ustr-1.0.4.tar.bz2 +3bdda468225b6361f8ae728432e9bf326047e4306924af9eb94331d44913ba5dfd2b330110c72a7210b534539183a2c95d20695ba9e585fb7f9e95aa296ad649 c99-inline.patch" diff --git a/testing/ustr/c99-inline.patch b/testing/ustr/c99-inline.patch new file mode 100644 index 0000000000..dfa021fddc --- /dev/null +++ b/testing/ustr/c99-inline.patch @@ -0,0 +1,30 @@ +diff -rup ustr-1.0.4-orig/ustr-compiler.h ustr-1.0.4/ustr-compiler.h +--- ustr-1.0.4-orig/ustr-compiler.h 2008-02-15 15:12:28.000000000 -0500 ++++ ustr-1.0.4/ustr-compiler.h 2008-06-13 15:25:18.000000000 -0400 +@@ -113,17 +113,23 @@ + #endif + + #ifndef USTR_CONF_EI_PROTO /* external inline */ +-# if USTR_CONF_INCLUDE_CODEONLY_HEADERS ++# if USTR_CONF_INCLUDE_CODEONLY_HEADERS || ! defined(__GNUC__) || \ ++ ! USTR_CONF_COMPILE_USE_INLINE + # define USTR_CONF_EI_PROTO static USTR__INLINE + # else + # define USTR_CONF_EI_PROTO extern + # endif + #endif + #ifndef USTR_CONF_II_PROTO /* implementation of inline */ +-# if USTR_CONF_INCLUDE_CODEONLY_HEADERS ++# if USTR_CONF_INCLUDE_CODEONLY_HEADERS || ! defined(__GNUC__) || \ ++ ! USTR_CONF_COMPILE_USE_INLINE + # define USTR_CONF_II_PROTO static USTR__INLINE + # else +-# define USTR_CONF_II_PROTO extern inline ++# if defined(__GNUC_STDC_INLINE__) || defined(__GNUC_GNU_INLINE__) ++# define USTR_CONF_II_PROTO extern inline __attribute__ ((__gnu_inline__)) ++# else ++# define USTR_CONF_II_PROTO extern inline ++# endif + # endif + #endif + |