diff options
author | Wilken 'Akiko' Gottwalt | 2016-07-10 12:42:12 +0200 |
---|---|---|
committer | Wilken 'Akiko' Gottwalt | 2016-07-10 12:42:12 +0200 |
commit | 33d2b1f9d473d17b708238062f4e444f59a46b27 (patch) | |
tree | 75377602fb8c4ee5ce5efaaa527e364ebaf213e1 | |
download | aur-33d2b1f9d473d17b708238062f4e444f59a46b27.tar.gz |
Initial commit of the Nana C++ GUI library for static linking into
C++11 applications. This version defaults to usage of ALSA, libpng,
and libjpeg-turbo.
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | fix_cmake_alsa.patch | 22 | ||||
-rw-r--r-- | fix_memcpy.patch | 12 |
4 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..799796452d27 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = nana + pkgdesc = An opensource cross-platform GUI library written in modern C++11 for static linking + pkgver = 1.3.0 + pkgrel = 1 + url = http://nanapro.org/en-us/ + arch = i686 + arch = x86_64 + license = custom:Boost Software License + makedepends = alsa-lib + makedepends = cmake + makedepends = libjpeg-turbo + makedepends = libpng + depends = alsa-lib + depends = libjpeg-turbo + depends = libpng + source = http://downloads.sourceforge.net/project/nanapro/Nana/Nana 1.x/nana 1.3.0.zip + source = fix_cmake_alsa.patch + source = fix_memcpy.patch + sha256sums = 9d3eea56cf330e7064bb193bc53d102f34b14a3a6dc415585f011f6638ec395d + sha256sums = c0fd8c44b51d663e5191dd859e033fbd2ec096df9f0c0b68c868e3a88b14bda4 + sha256sums = 98c5401396583534682c21b8b2762a1cbbcbecd997804a5b11aabe1094ac4b44 + +pkgname = nana + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8fbda9ebbe7b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Wilken 'Akiko' Gottwalt <akiko@mailbox.org> + +pkgname=nana +pkgver=1.3.0 +pkgrel=1 +pkgdesc="An opensource cross-platform GUI library written in modern C++11 for static linking" +arch=("i686" "x86_64") +url="http://nanapro.org/en-us/" +license=("custom:Boost Software License") +depends=("alsa-lib" "libjpeg-turbo" "libpng") +makedepends=("alsa-lib" "cmake" "libjpeg-turbo" "libpng") +source=("http://downloads.sourceforge.net/project/nanapro/Nana/Nana 1.x/${pkgname} ${pkgver}.zip" + fix_cmake_alsa.patch + fix_memcpy.patch) +sha256sums=('9d3eea56cf330e7064bb193bc53d102f34b14a3a6dc415585f011f6638ec395d' + 'c0fd8c44b51d663e5191dd859e033fbd2ec096df9f0c0b68c868e3a88b14bda4' + '98c5401396583534682c21b8b2762a1cbbcbecd997804a5b11aabe1094ac4b44') + +prepare() { + cd ${srcdir}/${pkgname} + + patch -Np1 < ../fix_cmake_alsa.patch + patch -Np1 < ../fix_memcpy.patch +} + +build() { + cd ${srcdir}/${pkgname} + + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DENABLE_JPEG=ON \ + -DENABLE_PNG=ON \ + -DENABLE_MINGW_STD_THREADS_WITH_MEGANZ=ON \ + -DENABLE_AUDIO=ON + + make +} + +package() { + cd ${srcdir}/${pkgname} + + make DESTDIR="${pkgdir}" install +} diff --git a/fix_cmake_alsa.patch b/fix_cmake_alsa.patch new file mode 100644 index 000000000000..807a8f470480 --- /dev/null +++ b/fix_cmake_alsa.patch @@ -0,0 +1,22 @@ +diff -urpN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2016-02-08 12:57:40.000000000 +0100 ++++ b/CMakeLists.txt 2016-07-10 12:28:14.355518026 +0200 +@@ -108,12 +108,12 @@ endif(ENABLE_JPEG) + if(ENABLE_AUDIO)
+ add_definitions(-DNANA_ENABLE_AUDIO)
+ if(UNIX)
+- find_package(asound)
+- if (ASOUND_FOUND)
+- include_directories( ${ASOUND_INCLUDE_DIRS})
+- else(ASOUND_FOUND)
+- message(FATAL_ERROR "libasound is not found")
+- endif(ASOUND_FOUND)
++ find_package(ALSA)
++ if (ALSA_FOUND)
++ include_directories( ${ALSA_INCLUDE_DIRS})
++ else(ALSA_FOUND)
++ message(FATAL_ERROR "ALSA is not found")
++ endif(ALSA_FOUND)
+ endif(UNIX)
+ endif(ENABLE_AUDIO)
+
diff --git a/fix_memcpy.patch b/fix_memcpy.patch new file mode 100644 index 000000000000..4e5a5d4438c4 --- /dev/null +++ b/fix_memcpy.patch @@ -0,0 +1,12 @@ +diff -urpN a/source/paint/detail/image_png.hpp b/source/paint/detail/image_png.hpp +--- a/source/paint/detail/image_png.hpp 2016-02-08 12:57:42.000000000 +0100 ++++ b/source/paint/detail/image_png.hpp 2016-07-10 12:20:27.927506748 +0200 +@@ -10,7 +10,7 @@ + #include <png.h>
+ #endif
+
+-#include <stdio.h>
++#include <cstring>
+
+ namespace nana
+ {
|