Rename tool names at cmake level to ensure OpenJPEGTargets.cmake refers to the renamed files
This commit is contained in:
parent
4d9d9e074c
commit
2a820f473a
@ -5,7 +5,7 @@
|
||||
|
||||
Name: openjpeg2
|
||||
Version: 2.3.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: C-Library for JPEG 2000
|
||||
|
||||
# windirent.h is MIT, the rest is BSD
|
||||
@ -21,6 +21,8 @@ Source1: data.tar.xz
|
||||
Patch0: openjpeg2_remove-thirdparty.patch
|
||||
# Fix shared libraries not getting installed if static libraries are disabled
|
||||
Patch1: openjpeg2_install.patch
|
||||
# Rename tool names to avoid conflicts with openjpeg-1.x
|
||||
Patch2: openjpeg2_opj2.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: zlib-devel
|
||||
@ -48,6 +50,8 @@ This package contains
|
||||
%package devel
|
||||
Summary: Development files for OpenJPEG 2
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
# OpenJPEGTargets.cmake refers to the tools
|
||||
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and header files for developing
|
||||
@ -221,10 +225,6 @@ popd
|
||||
%install
|
||||
%make_install -C %{_target_platform}
|
||||
|
||||
# Rename to avoid conflicts with openjpeg-1.x
|
||||
for file in %{buildroot}%{_bindir}/opj_*; do
|
||||
mv $file ${file/opj_/opj2_}
|
||||
done
|
||||
mv %{buildroot}%{_mandir}/man1/opj_compress.1 %{buildroot}%{_mandir}/man1/opj2_compress.1
|
||||
mv %{buildroot}%{_mandir}/man1/opj_decompress.1 %{buildroot}%{_mandir}/man1/opj2_decompress.1
|
||||
mv %{buildroot}%{_mandir}/man1/opj_dump.1 %{buildroot}%{_mandir}/man1/opj2_dump.1
|
||||
@ -327,6 +327,9 @@ make test -C %{_target_platform}
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Dec 25 2017 Sandro Mani <manisandro@gmail.com> - 2.3.0-3
|
||||
- Rename tool names at cmake level to ensure OpenJPEGTargets.cmake refers to the renamed files
|
||||
|
||||
* Mon Dec 25 2017 Sandro Mani <manisandro@gmail.com> - 2.3.0-2
|
||||
- Use BUILD_STATIC_LIBS=OFF instead of deleting the static library after build
|
||||
|
||||
|
||||
12
openjpeg2_opj2.patch
Normal file
12
openjpeg2_opj2.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -rupN openjpeg-2.3.0/src/bin/jp2/CMakeLists.txt openjpeg-2.3.0-new/src/bin/jp2/CMakeLists.txt
|
||||
--- openjpeg-2.3.0/src/bin/jp2/CMakeLists.txt 2017-10-05 00:23:14.000000000 +0200
|
||||
+++ openjpeg-2.3.0-new/src/bin/jp2/CMakeLists.txt 2017-12-25 14:55:37.562470567 +0100
|
||||
@@ -44,6 +44,8 @@ endif()
|
||||
# Loop over all executables:
|
||||
foreach(exe opj_decompress opj_compress opj_dump)
|
||||
add_executable(${exe} ${exe}.c ${common_SRCS})
|
||||
+ STRING(REPLACE "opj_" "opj2_" exe2 ${exe})
|
||||
+ set_target_properties(${exe} PROPERTIES OUTPUT_NAME ${exe2})
|
||||
if(${CMAKE_VERSION} VERSION_GREATER "2.8.11")
|
||||
target_compile_options(${exe} PRIVATE ${OPENJP2_COMPILE_OPTIONS})
|
||||
endif()
|
||||
Loading…
Reference in New Issue
Block a user