[packages/openfec] - added opt patch (use our optflags, fixes build with debuginfo)

qboosh qboosh at pld-linux.org
Fri Apr 22 22:22:09 CEST 2022


commit 8a5d027786b3ce8157ccf78296490ac65955fac6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Apr 22 22:22:22 2022 +0200

    - added opt patch (use our optflags, fixes build with debuginfo)

 openfec-opt.patch | 25 +++++++++++++++++++++++++
 openfec.spec      |  6 ++++--
 2 files changed, 29 insertions(+), 2 deletions(-)
---
diff --git a/openfec.spec b/openfec.spec
index 869cc82..94d8b51 100644
--- a/openfec.spec
+++ b/openfec.spec
@@ -9,6 +9,7 @@ Group:		Libraries
 #Source0Download: http://openfec.org/downloads.html
 Source0:	http://openfec.org/files/%{name}_v%{tagver}.tgz
 # Source0-md5:	c4f8b0aa3e9352f2e713e3db2885ea1c
+Patch0:		%{name}-opt.patch
 URL:		http://openfec.org/
 BuildRequires:	cmake >= 2.6
 BuildRequires:	rpmbuild(macros) >= 1.605
@@ -47,6 +48,7 @@ Pliki nagłówkowe biblioteki OpenFEC.
 
 %prep
 %setup -q -n %{name}_v%{version}
+%patch0 -p1
 
 %build
 install -d build
@@ -60,8 +62,8 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}}
 install -d $RPM_BUILD_ROOT%{_includedir}/openfec/{lib_advanced/ldpc_from_file,lib_common,lib_stable/{2d_parity_matrix,ldpc_staircase,reed-solomon_gf_2_{8,m}}}
 
-install bin/Release/eperftool $RPM_BUILD_ROOT%{_bindir}
-cp -a bin/Release/libopenfec.so* $RPM_BUILD_ROOT%{_libdir}
+install bin/PLD/eperftool $RPM_BUILD_ROOT%{_bindir}
+cp -a bin/PLD/libopenfec.so* $RPM_BUILD_ROOT%{_libdir}
 
 cp -p src/lib_advanced/ldpc_from_file/{of_codec_profile,of_ldpc_ff_api}.h $RPM_BUILD_ROOT%{_includedir}/openfec/lib_advanced/ldpc_from_file
 cp -p src/lib_common/{of_debug,of_mem,of_openfec_api,of_openfec_profile,of_types}.h $RPM_BUILD_ROOT%{_includedir}/openfec/lib_common
diff --git a/openfec-opt.patch b/openfec-opt.patch
new file mode 100644
index 0000000..67a639b
--- /dev/null
+++ b/openfec-opt.patch
@@ -0,0 +1,25 @@
+--- openfec_v1.4.2/CMakeLists.txt.orig	2014-12-16 15:29:00.000000000 +0100
++++ openfec_v1.4.2/CMakeLists.txt	2022-04-22 22:13:52.223197358 +0200
+@@ -11,19 +11,16 @@ else(PROFILING STREQUAL "ON")
+ 
+ endif(PROFILING STREQUAL "ON")
+ 
+-if (DEBUG STREQUAL "ON")
++if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ # Debug mode
+ ADD_DEFINITIONS(-DOF_DEBUG)
+-set(CMAKE_BUILD_TYPE Debug) 
+ message(STATUS "Debug mode ON" )
+ 
+-else(DEBUG STREQUAL "ON")
++else(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ # Release mode
+-set(CMAKE_BUILD_TYPE Release)
+-set(CMAKE_C_FLAGS "-O4")
+ message(STATUS "Debug mode OFF")
+ 
+-endif (DEBUG STREQUAL "ON")
++endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ 
+ set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE})
+ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE})
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openfec.git/commitdiff/8a5d027786b3ce8157ccf78296490ac65955fac6



More information about the pld-cvs-commit mailing list