(jarvis) new package: asplib

This commit is contained in:
Stefan Saraev 2015-10-20 01:23:10 -07:00 committed by Stephan Raue
parent 7474542d51
commit e24932e632
3 changed files with 217 additions and 0 deletions

View File

@ -0,0 +1,40 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="asplib"
PKG_VERSION="39fe0a7"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/AchimTuran/asplib"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="asplib: Achim's Signal Processing LIBrary"
PKG_LONGDESC="asplib is a small and lightweight C++ library for digital signal processing."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
configure_target() {
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
-DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=0 \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -DTARGET_LINUX" \
..
}

View File

@ -0,0 +1,134 @@
diff -Naur asplib-39fe0a7.orig/CMakeLists.txt asplib-39fe0a7/CMakeLists.txt
--- asplib-39fe0a7.orig/CMakeLists.txt 2015-10-21 16:06:32.000000000 -0700
+++ asplib-39fe0a7/CMakeLists.txt 2015-10-22 21:04:00.057711594 -0700
@@ -1,60 +1,17 @@
project(asplib)
-cmake_minimum_required(VERSION 2.6)
-enable_language(CXX)
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
-
-include(UseMultiArch.cmake)
+cmake_minimum_required(VERSION 2.8)
set(asplib_NAME asplib)
set(asplib_DESCRIPTION "asplib (Achim's Signal Processing LIBrary), is a small and lightweight C++ library for digital signal processing.")
-set(asplib_VERSION_MAJOR ${APP_VERSION_MAJOR})
-set(asplib_VERSION_MINOR ${APP_VERSION_MINOR})
-set(asplib_VERSION_PATCH 0)
-
-if(NOT WIN32)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
-endif()
-
-if(CMAKE_SYSTEM_NAME MATCHES "Linux")
- set(CMAKE_CXX_FLAGS "-DTARGET_LINUX")
-endif()
-
-if(CMAKE_SYSTEM_NAME MATCHES "Windows")
- set(CMAKE_CXX_FLAGS "-DTARGET_WINDOWS")
-endif()
-
-#set(asplib_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX}/include/kodi")
-#set(asplib_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} ${TINYXML_LIBRARIES})
-
-include_directories(${PROJECT_SOURCE_DIR}
- ${PROJECT_SOURCE_DIR}/Biquads)
-set(SOURCES asplib_utils/computeDeviceInfo/cpuInfo.cpp
- Biquads/Biquad_Native/asplib_Biquad_Native.cpp
+set(SOURCES Biquads/Biquad_Native/asplib_Biquad_Native.cpp
Biquads/apslib_BiquadFactory.cpp)
-set(HEADERS interfaces/asplib_IBaseBiquad.h
- asplib_utils/constants_typedefs/asplib_constants.h
- asplib_utils/constants_typedefs/asplib_typedefs.h
- asplib_utils/os/asplib_base_os.h
- asplib_utils/os/windows/windows_definitions.h
- asplib_utils/os/linux/linux_definitions.h
- asplib_utils/computeDeviceInfo/cpuInfo_types.h
- asplib_utils/computeDeviceInfo/cpuInfo.h
- Biquads/apslib_BiquadFactory.h
- Biquads/Biquad_Native/asplib_Biquad_Native.h)
-
-
-#include_directories(${TINYXML_INCLUDE_DIR} ${KODI_INCLUDE_DIR})
-
-add_library(asplib ${SOURCES} ${PLAT_SOURCES})
-target_link_libraries(asplib ${asplib_LIBRARIES})
-#set_target_properties(asplib PROPERTIES VERSION ${asplib_VERSION_MAJOR}.${asplib_VERSION_MINOR}.${asplib_VERSION_PATCH}
-# SOVERSION ${asplib_VERSION_MAJOR}.0)
+add_library(asplib STATIC ${SOURCES})
-install(TARGETS asplib DESTINATION ${CMAKE_INSTALL_LIBDIR})
+include_directories(${PROJECT_SOURCE_DIR}
+ ${PROJECT_SOURCE_DIR}/Biquads)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/interfaces/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/interfaces
FILES_MATCHING PATTERN "*.h")
@@ -62,8 +19,6 @@
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${PROJECT_SOURCE_DIR}/asplib_utils/os/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/asplib_utils/os/
FILES_MATCHING PATTERN "*.h")
-install(DIRECTORY ${PROJECT_SOURCE_DIR}/asplib_utils/os/windows/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/asplib_utils/os/windows/
- FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${PROJECT_SOURCE_DIR}/asplib_utils/os/linux/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/asplib_utils/os/linux/
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${PROJECT_SOURCE_DIR}/asplib_utils/computeDeviceInfo/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/asplib_utils/computeDeviceInfo/
@@ -73,54 +28,4 @@
install(DIRECTORY ${PROJECT_SOURCE_DIR}/Biquads/Biquad_Native/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/Biquads/Biquad_Native/
FILES_MATCHING PATTERN "*.h")
-
-# install(FILES interfaces/asplib_IBaseBiquad.h
- # asplib_utils/constants_typedefs/asplib_constants.h
- # asplib_utils/constants_typedefs/asplib_typedefs.h
-
- # DESTINATION include/asplib/asplib_utils/constants_typedefs/)
-
- # asplib_utils/os/asplib_base_os.h
- # asplib_utils/os/windows/windows_definitions.h
- # asplib_utils/os/linux/linux_definitions.h
- # utils/computeDeviceInfo/cpuInfo_types.h
- # utils/computeDeviceInfo/cpuInfo.h
- # Biquads/apslib_BiquadFactory.h
- # Biquads/Biquad_Native/asplib_Biquad_Native.h
- # )
-
-# install(FILES interfaces/asplib_IBaseBiquad.h
- # DESTINATION include/asplib/interfaces)
-# install(FILES constants_typedefs/asplib_constants.h
- # constants_typedefs/asplib_typedefs.h
- # DESTINATION include/asplib/constants_typedefs)
-# install(FILES utils/computeDeviceInfo/cpuInfo_types.h
- # utils/computeDeviceInfo/cpuInfo.h
- # DESTINATION include/asplib/utils)
-# install(FILES Biquads/apslib_BiquadFactory.h
- # Biquads/Biquad_Native/asplib_Biquad_Native.h
- # DESTINATION include/asplib/Biquads)
-
-#install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib)
-
-#IF(NOT WIN32)
- # Pkgconfig
- #include(PkgConfigHandler.cmake)
- #configure_pc_file(kodiutilities kodiutilities.pc.in
- # kodiutilities.pc
- # ${CMAKE_INSTALL_PREFIX}
- # ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
- # ${CMAKE_INSTALL_PREFIX}/include)
-
-# install(FILES ${CMAKE_BINARY_DIR}/kodiutilities.pc
-# DESTINATION ${CMAKE_INSTALL_LIBDIR_NOARCH}/pkgconfig)
-#ENDIF(NOT WIN32)
-
-# config mode
-#configure_file (kodiutilities-config.cmake.in
-# kodiutilities-config.cmake @ONLY)
-#install(FILES ${CMAKE_BINARY_DIR}/kodiutilities-config.cmake
-# DESTINATION ${CMAKE_INSTALL_LIBDIR_NOARCH}/kodiutilities)
-
-# Quell warnings with in-tree builds
-#set(KODI_BUILD_DIR ${KODI_BUILD_DIR})
+install(TARGETS asplib DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)

43
tools/mkpkg/mkpkg_asplib Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
echo "getting sources..."
if [ ! -d asplib.git ]; then
git clone https://github.com/AchimTuran/asplib.git asplib.git
fi
cd asplib.git
git pull
GIT_REV=`git log -n1 --format=%h`
cd ..
echo "copying sources..."
rm -rf asplib-$GIT_REV
cp -R asplib.git asplib-$GIT_REV
echo "cleaning sources..."
rm -rf asplib-$GIT_REV/.git
echo "packing sources..."
tar cvJf asplib-$GIT_REV.tar.xz asplib-$GIT_REV
echo "remove temporary sourcedir..."
rm -rf asplib-$GIT_REV