Change library install location to %{_libdir}.

epel9
Richard Shaw 4 years ago
parent 1a43c6a750
commit bd8da32bbf

@ -1,15 +0,0 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6c49f5e..a0b9f0a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -29,8 +29,8 @@ target_include_directories(lpcnetfreedv INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
install(TARGETS lpcnetfreedv EXPORT lpcnetfreedv-config
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/lpcnetfreedv
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/lpcnetfreedv
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lpcnet
)

File diff suppressed because it is too large Load Diff

@ -1,62 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 680f52c..e536f30 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,9 @@ message(STATUS "LPCNet version: ${LPCNET_VERSION}")
# Set default flags
set(CMAKE_C_FLAGS "-Wall -W -Wextra -Wno-unused-function -O3 -g -I. -MD ${CMAKE_C_FLAGS} -DENABLE_ASSERTIONS")
+# Arch specific stuff here
+message(STATUS "Host system arch is: ${CMAKE_SYSTEM_PROCESSOR}")
+
# Detection of available CPU optimizations
if(NOT DISABLE_CPU_OPTIMIZATION)
if(UNIX AND NOT APPLE)
@@ -87,7 +90,7 @@ elseif(${AVX} OR ${AVX} GREATER 0)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx")
endif()
-# RPi
+# RPi / ARM 32bit
if(${NEON} OR ${NEON} GREATER 0)
message(STATUS "neon processor flags found or enabled.")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -march=armv8-a -mtune=cortex-a53")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 41a78dc..6c49f5e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -49,7 +49,7 @@ target_link_libraries(dump_data lpcnetfreedv m codec2)
add_executable(test_lpcnet test_lpcnet.c)
target_link_libraries(test_lpcnet lpcnetfreedv m codec2)
-if(AVX OR AVX2)
+if(AVX OR AVX2 OR CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
add_executable(test_vec test_vec.c)
target_link_libraries(test_vec m)
else()
diff --git a/src/nnet.c b/src/nnet.c
index 8ad4a26..ccb9c94 100644
--- a/src/nnet.c
+++ b/src/nnet.c
@@ -43,7 +43,7 @@
#ifdef __AVX__
#include "vec_avx.h"
-#elif __ARM_NEON__
+#elif __ARM_NEON__ || __aarch64__
#include "vec_neon.h"
#else
#warning Compiling without any vectorization. This code will be very slow
diff --git a/src/test_vec.c b/src/test_vec.c
index 09b51e7..254292b 100644
--- a/src/test_vec.c
+++ b/src/test_vec.c
@@ -26,7 +26,7 @@ const char simd[]="AVX2";
#else
const char simd[]="AVX";
#endif
-#elif __ARM_NEON__
+#elif __ARM_NEON__ || __aarch64__
#include "vec_neon.h"
const char simd[]="NEON";
#else

@ -1,6 +1,9 @@
%undefine __cmake_in_source_build
%global sover 0.2
Name: lpcnetfreedv Name: lpcnetfreedv
Version: 0.2 Version: 0.2
Release: 4%{?dist} Release: 5%{?dist}
Summary: LPCNet for FreeDV Summary: LPCNet for FreeDV
License: BSD License: BSD
@ -8,10 +11,7 @@ URL: https://github.com/drowe67/LPCNet
Source0: https://github.com/drowe67/LPCNet/archive/v%{version}/LPCNet-%{version}.tar.gz Source0: https://github.com/drowe67/LPCNet/archive/v%{version}/LPCNet-%{version}.tar.gz
Source1: http://rowetel.com/downloads/deep/lpcnet_191005_v1.0.tgz Source1: http://rowetel.com/downloads/deep/lpcnet_191005_v1.0.tgz
# Fixes for aarch64 which has NEON instructions natively Patch0: lpcnetfreedv-test.patch
Patch0: lpcnetfreedv-vector-updates.patch
# Make library private for FreeDV
Patch1: lpcnetfreedv-private_libs.patch
BuildRequires: cmake gcc BuildRequires: cmake gcc
BuildRequires: codec2-devel BuildRequires: codec2-devel
@ -37,7 +37,7 @@ Summary: Development files and tools for LPCNet
%build %build
# Add model data archive to the build directory so CMake finds it. # Add model data archive to the build directory so CMake finds it.
mkdir -p %{_vpath_builddir} mkdir -p %{_vpath_builddir}
cp %{SOURCE1} %{_vpath_builddir}/ cp %{SOURCE1} %{__cmake_builddir}/
# We need to force optimizations to specific values since the build system and # We need to force optimizations to specific values since the build system and
# host system will likely be different. # host system will likely be different.
@ -63,15 +63,19 @@ cp %{SOURCE1} %{_vpath_builddir}/
%files %files
%license COPYING %license COPYING
%doc README.md %doc README.md
%{_libdir}/%{name}/lib%{name}.so %{_libdir}/lib%{name}.so.%{sover}
%files devel %files devel
%{_bindir}/* %{_bindir}/*
%{_includedir}/lpcnet/ %{_includedir}/lpcnet/
%{_libdir}/cmake/lpcnetfreedv/ %{_libdir}/cmake/lpcnetfreedv/
%{_libdir}/lib%{name}.so
%changelog %changelog
* Sun Dec 20 2020 Richard Shaw <hobbes1069@gmail.com> - 0.2-5
- Change library install location to %%{_libdir}.
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-4 * Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-4
- Second attempt - Rebuilt for - Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

Loading…
Cancel
Save