summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Bernardoff2018-01-27 19:10:41 +0100
committerVincent Bernardoff2018-01-27 19:10:41 +0100
commit2686b7050f5986079df09b30262570db0f40226a (patch)
treead8577225b746c7664a223d2a13be6c7339f7c9d
downloadaur-2686b7050f5986079df09b30262570db0f40226a.tar.gz
Initial commit.
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD76
-rw-r--r--linux-install-rules.patch142
3 files changed, 238 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e7514a6892c1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = libne10-git
+ pkgdesc = An open optimized software library project for the ARM® Architecture
+ pkgver = v1.1.2.r98.ga778f6d
+ pkgrel = 1
+ url = https://github.com/projectNe10/Ne10
+ arch = armv7h
+ arch = aarch64
+ license = BSD
+ makedepends = git
+ makedepends = doxygen
+ makedepends = cmake
+ provides = libne10
+ conflicts = libne10
+ source = libne10::git+https://github.com/projectNe10/Ne10
+ source = linux-install-rules.patch
+ sha256sums = SKIP
+ sha256sums = 659e7915c4484f3cd85e7e5ada6561731e209533ffce21ec2609b2ce251cc161
+
+pkgname = libne10-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1a9617661655
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,76 @@
+# Maintainer: Vincent Bernardoff <vb AT luminar.eu.org>
+
+pkgname=libne10-git
+pkgver=v1.1.2.r98.ga778f6d
+pkgrel=1
+pkgdesc="An open optimized software library project for the ARM® Architecture"
+arch=('armv7h' 'aarch64')
+url="https://github.com/projectNe10/Ne10"
+makedepends=('git' 'doxygen' 'cmake')
+license=('BSD')
+source=(${pkgname%-git}::git+https://github.com/projectNe10/Ne10
+ "linux-install-rules.patch")
+sha256sums=('SKIP'
+ '659e7915c4484f3cd85e7e5ada6561731e209533ffce21ec2609b2ce251cc161')
+provides=('libne10')
+conflicts=('libne10')
+
+pkgver() {
+ cd "${pkgname%-git}"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd ${pkgname%-git}
+ rm -rf build
+ git clean -f
+ patch -p1 < ../linux-install-rules.patch
+}
+
+build() {
+ cd ${pkgname%-git}
+
+ if [ "$CARCH" == "armv7h" ] ; then
+ export NE10_LINUX_TARGET_ARCH=armv7
+ else
+ export NE10_LINUX_TARGET_ARCH="$CARCH"
+ fi
+
+ cd doc
+ doxygen
+ cd ..
+
+ mkdir build
+ cd build
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DGNULINUX_PLATFORM=ON \
+ -DNE10_BUILD_SHARED=ON \
+ ..
+
+ msg2 'Building...'
+ make
+}
+
+package() {
+ cd ${pkgname%-git}
+
+ if [ "$CARCH" == "armv7h" ] ; then
+ export NE10_LINUX_TARGET_ARCH=armv7
+ else
+ export NE10_LINUX_TARGET_ARCH="$CARCH"
+ fi
+
+ msg2 'Installing license...'
+ install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/${pkgname%-git}"
+
+ msg2 'Installing documentation'
+ install -d "$pkgdir/usr/share/doc/${pkgname%-git}"
+ cp -a "doc/html" "$pkgdir/usr/share/doc/${pkgname%-git}"
+ cp -a samples/*.c "$pkgdir/usr/share/doc/${pkgname%-git}"
+
+ msg2 'Installing...'
+ cd build
+ make DESTDIR="$pkgdir" install
+}
diff --git a/linux-install-rules.patch b/linux-install-rules.patch
new file mode 100644
index 000000000000..859df232340e
--- /dev/null
+++ b/linux-install-rules.patch
@@ -0,0 +1,142 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e023b99..02af3e5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -187,3 +187,61 @@ endif()
+ if(IOS_PLATFORM AND IOS_DEMO)
+ add_subdirectory(ios)
+ endif()
++
++if(GNULINUX_PLATFORM)
++ # package config
++ set(prefix ${CMAKE_INSTALL_PREFIX})
++ set(exec_prefix "\${prefix}")
++ set(libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
++ set(includedir "\${prefix}/include")
++
++ configure_file(
++ ${CMAKE_CURRENT_SOURCE_DIR}/ne10.pc.in
++ ${CMAKE_CURRENT_BINARY_DIR}/ne10.pc
++ @ONLY)
++
++ install(
++ FILES ${CMAKE_CURRENT_BINARY_DIR}/ne10.pc
++ DESTINATION lib${LIB_SUFFIX}/pkgconfig)
++
++ # install rules
++ install(DIRECTORY inc/
++ DESTINATION include/ne10
++ FILES_MATCHING PATTERN "*.h")
++ install(DIRECTORY common/
++ DESTINATION include/ne10
++ FILES_MATCHING PATTERN "*.h")
++
++ if(NE10_ENABLE_DSP)
++ install(DIRECTORY modules/dsp/
++ DESTINATION include/ne10/dsp
++ FILES_MATCHING PATTERN "*.h")
++ endif()
++
++ if(NE10_ENABLE_MATH)
++ install(DIRECTORY modules/math/
++ DESTINATION include/ne10/math
++ FILES_MATCHING PATTERN "*.h")
++ endif()
++
++ if(NE10_ENABLE_IMGPROC)
++ install(DIRECTORY modules/imgproc/
++ DESTINATION include/ne10/imgproc
++ FILES_MATCHING PATTERN "*.h")
++ endif()
++
++ if(NE10_ENABLE_PHYSICS)
++ install(DIRECTORY modules/physics/
++ DESTINATION include/ne10/physics
++ FILES_MATCHING PATTERN "*.h")
++ endif()
++ # uninstall rules
++ configure_file(
++ ${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
++ ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
++ @ONLY)
++
++ add_custom_target(uninstall
++ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
++ )
++endif()
+diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in
+new file mode 100644
+index 0000000..84cba82
+--- /dev/null
++++ b/cmake/cmake_uninstall.cmake.in
+@@ -0,0 +1,32 @@
++# http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
++
++IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
++ MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
++ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
++
++FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
++STRING(REGEX REPLACE "\n" ";" files "${files}")
++FOREACH(file ${files})
++ MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
++ IF(EXISTS "$ENV{DESTDIR}${file}")
++ EXEC_PROGRAM(
++ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
++ OUTPUT_VARIABLE rm_out
++ RETURN_VALUE rm_retval
++ )
++ IF(NOT "${rm_retval}" STREQUAL 0)
++ MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
++ ENDIF(NOT "${rm_retval}" STREQUAL 0)
++ ELSEIF(IS_SYMLINK "$ENV{DESTDIR}${file}")
++ EXEC_PROGRAM(
++ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
++ OUTPUT_VARIABLE rm_out
++ RETURN_VALUE rm_retval
++ )
++ IF(NOT "${rm_retval}" STREQUAL 0)
++ MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
++ ENDIF(NOT "${rm_retval}" STREQUAL 0)
++ ELSE(EXISTS "$ENV{DESTDIR}${file}")
++ MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
++ ENDIF(EXISTS "$ENV{DESTDIR}${file}")
++ENDFOREACH(file)
+diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
+index 4aa19e4..f4f878e 100644
+--- a/modules/CMakeLists.txt
++++ b/modules/CMakeLists.txt
+@@ -387,6 +387,8 @@ if(NE10_BUILD_STATIC OR ANDROID_PLATFORM OR IOS_DEMO)
+ install(TARGETS NE10
+ DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/../ios/NE10Demo/libs/)
+ endif(IOS_DEMO)
++
++ install(TARGETS NE10 DESTINATION lib)
+ endif()
+
+ if(NE10_BUILD_SHARED)
+@@ -422,4 +424,5 @@ if(NE10_BUILD_SHARED)
+
+ target_link_libraries(NE10_test m)
+
++ install(TARGETS NE10_shared DESTINATION lib)
+ endif()
+diff --git a/ne10.pc.in b/ne10.pc.in
+new file mode 100644
+index 0000000..6c22e48
+--- /dev/null
++++ b/ne10.pc.in
+@@ -0,0 +1,13 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++LV_CXXFLAGS=@LV_CXXFLAGS@
++
++
++Name: ne10
++Description: Ne10: An open optimized software library project for the ARM® Architecture
++Requires:
++Version: @LIBVER@
++Libs: -L${libdir} -lne10
++Cflags: -I${includedir} ${LV_CXXFLAGS}