diff options
-rw-r--r-- | user/libqrcodegen/APKBUILD | 31 | ||||
-rw-r--r-- | user/libqrcodegen/cxxflags.patch | 13 |
2 files changed, 44 insertions, 0 deletions
diff --git a/user/libqrcodegen/APKBUILD b/user/libqrcodegen/APKBUILD new file mode 100644 index 000000000..28b6e890e --- /dev/null +++ b/user/libqrcodegen/APKBUILD @@ -0,0 +1,31 @@ +# Contributor: Max Rees <maxcrees@me.com> +# Maintainer: Max Rees <maxcrees@me.com> +pkgname=libqrcodegen +pkgver=1.5.0 +pkgrel=0 +pkgdesc="Multi-language QR code generation library" +url="https://www.nayuki.io/page/qr-code-generator-library" +arch="all" +options="!dbg !check" # No test suite. +license="MIT" +depends="" +makedepends="" +source="libqrcodegen-$pkgver.tar.gz::https://github.com/nayuki/QR-Code-generator/archive/v$pkgver.tar.gz + cxxflags.patch + " +builddir="$srcdir/QR-Code-generator-$pkgver" + +build() { + CXXFLAGS="$CXXFLAGS -fPIC" make -C cpp +} + +package() { + install -Dm644 cpp/libqrcodegen.a "$pkgdir"/usr/lib/libqrcodegencpp.a + for i in QrCode QrSegment BitBuffer; do + install -Dm644 cpp/"$i".hpp \ + "$pkgdir"/usr/include/qrcodegen/"$i".hpp + done +} + +sha512sums="f7887bb1901a7de3f198c7483c35c26552fc51b4a25a5a0e5878562ab9742fc55da33eb01984aab35866b0f092405da3462dc389d125c8c474e4312a57d4183e libqrcodegen-1.5.0.tar.gz +0d0a48eaa084c0ce2ac1acc3c634e5cea4a56864b18aab740ff0f0513b3dc300ec5dfde2e2dd86f3031102de565b849ec11d3fe721862c73bb0df89395103a97 cxxflags.patch" diff --git a/user/libqrcodegen/cxxflags.patch b/user/libqrcodegen/cxxflags.patch new file mode 100644 index 000000000..1007469dd --- /dev/null +++ b/user/libqrcodegen/cxxflags.patch @@ -0,0 +1,13 @@ +--- QR-Code-generator-1.5.0/cpp/Makefile 2019-07-15 23:16:50.000000000 +0000 ++++ QR-Code-generator-1.5.0/cpp/Makefile 2020-02-04 05:42:53.910203051 +0000 +@@ -30,10 +30,6 @@ + + # Mandatory compiler flags + CXXFLAGS += -std=c++11 +-# Diagnostics. Adding '-fsanitize=address' is helpful for most versions of Clang and newer versions of GCC. +-CXXFLAGS += -Wall -fsanitize=undefined +-# Optimization level +-CXXFLAGS += -O1 + + + # ---- Controlling make ---- |