Fix build

This commit is contained in:
Nicolas Chauvet 2018-08-13 16:00:19 +02:00
commit da7459fed0
4 changed files with 107 additions and 2745 deletions

13
xmount-cflags.patch Normal file
View file

@ -0,0 +1,13 @@
diff -up xmount-0.7.6/CMakeLists.txt.cflags xmount-0.7.6/CMakeLists.txt
--- xmount-0.7.6/CMakeLists.txt.cflags 2018-04-16 11:22:27.000000000 +0200
+++ xmount-0.7.6/CMakeLists.txt 2018-08-13 15:38:08.571593927 +0200
@@ -85,9 +85,6 @@ include_directories(${CMAKE_CURRENT_BINA
add_definitions(-D_LARGEFILE64_SOURCE)
add_definitions(-D_FILE_OFFSET_BITS=64)
add_definitions(-D_GNU_SOURCE)
-set(CMAKE_C_FLAGS "-fno-strict-aliasing -std=c99 -Wall")
-set(CMAKE_C_FLAGS_RELEASE "-O2 ${CMAKE_C_FLAGS}")
-set(CMAKE_C_FLAGS_DEBUG "-ggdb -O0 ${CMAKE_C_FLAGS}")
# Check that off_t can represent 2**63 - 1 correctly.
# If it can't, we need to set _FILE_OFFSET_BITS=64

File diff suppressed because it is too large Load diff

80
xmount-suffix.patch Normal file
View file

@ -0,0 +1,80 @@
diff -up xmount-0.7.6/libxmount_input/libxmount_input_aaff/CMakeLists.txt.suffix xmount-0.7.6/libxmount_input/libxmount_input_aaff/CMakeLists.txt
--- xmount-0.7.6/libxmount_input/libxmount_input_aaff/CMakeLists.txt.suffix 2018-04-05 08:09:54.000000000 +0200
+++ xmount-0.7.6/libxmount_input/libxmount_input_aaff/CMakeLists.txt 2018-08-13 15:54:39.977186606 +0200
@@ -9,5 +9,5 @@ include_directories(${LIBZ_INCLUDE_DIRS}
target_link_libraries(xmount_input_aaff ${LIBZ_LIBRARIES})
-install(TARGETS xmount_input_aaff DESTINATION lib/xmount)
+install(TARGETS xmount_input_aaff DESTINATION lib${LIB_SUFFIX}/xmount)
diff -up xmount-0.7.6/libxmount_input/libxmount_input_aewf/CMakeLists.txt.suffix xmount-0.7.6/libxmount_input/libxmount_input_aewf/CMakeLists.txt
--- xmount-0.7.6/libxmount_input/libxmount_input_aewf/CMakeLists.txt.suffix 2018-04-05 08:09:54.000000000 +0200
+++ xmount-0.7.6/libxmount_input/libxmount_input_aewf/CMakeLists.txt 2018-08-13 15:53:31.918802688 +0200
@@ -10,5 +10,5 @@ include_directories(${LIBZ_INCLUDE_DIRS}
target_link_libraries(xmount_input_aewf ${LIBZ_LIBRARIES})
-install(TARGETS xmount_input_aewf DESTINATION lib/xmount)
+install(TARGETS xmount_input_aewf DESTINATION lib${LIB_SUFFIX}/xmount)
diff -up xmount-0.7.6/libxmount_input/libxmount_input_aff/CMakeLists.txt.suffix xmount-0.7.6/libxmount_input/libxmount_input_aff/CMakeLists.txt
--- xmount-0.7.6/libxmount_input/libxmount_input_aff/CMakeLists.txt.suffix 2018-04-05 08:09:54.000000000 +0200
+++ xmount-0.7.6/libxmount_input/libxmount_input_aff/CMakeLists.txt 2018-08-13 15:55:03.596319166 +0200
@@ -61,5 +61,5 @@ endif(NOT STATIC_AFF)
target_link_libraries(xmount_input_aff ${LIBS})
-install(TARGETS xmount_input_aff DESTINATION lib/xmount)
+install(TARGETS xmount_input_aff DESTINATION lib${LIB_SUFFIX}/xmount)
diff -up xmount-0.7.6/libxmount_input/libxmount_input_ewf/CMakeLists.txt.suffix xmount-0.7.6/libxmount_input/libxmount_input_ewf/CMakeLists.txt
--- xmount-0.7.6/libxmount_input/libxmount_input_ewf/CMakeLists.txt.suffix 2018-04-05 08:09:54.000000000 +0200
+++ xmount-0.7.6/libxmount_input/libxmount_input_ewf/CMakeLists.txt 2018-08-13 15:53:52.675919781 +0200
@@ -24,5 +24,5 @@ endif(NOT STATIC_EWF)
target_link_libraries(xmount_input_ewf ${LIBS})
-install(TARGETS xmount_input_ewf DESTINATION lib/xmount)
+install(TARGETS xmount_input_ewf DESTINATION lib${LIB_SUFFIX}/xmount)
diff -up xmount-0.7.6/libxmount_input/libxmount_input_raw/CMakeLists.txt.suffix xmount-0.7.6/libxmount_input/libxmount_input_raw/CMakeLists.txt
--- xmount-0.7.6/libxmount_input/libxmount_input_raw/CMakeLists.txt.suffix 2018-04-05 08:09:54.000000000 +0200
+++ xmount-0.7.6/libxmount_input/libxmount_input_raw/CMakeLists.txt 2018-08-13 15:54:15.024045849 +0200
@@ -6,5 +6,5 @@ project(libxmount_input_raw C)
add_library(xmount_input_raw SHARED libxmount_input_raw.c ../../libxmount/libxmount.c)
-install(TARGETS xmount_input_raw DESTINATION lib/xmount)
+install(TARGETS xmount_input_raw DESTINATION lib${LIB_SUFFIX}/xmount)
diff -up xmount-0.7.6/libxmount_morphing/libxmount_morphing_combine/CMakeLists.txt.suffix xmount-0.7.6/libxmount_morphing/libxmount_morphing_combine/CMakeLists.txt
--- xmount-0.7.6/libxmount_morphing/libxmount_morphing_combine/CMakeLists.txt.suffix 2018-04-05 08:09:54.000000000 +0200
+++ xmount-0.7.6/libxmount_morphing/libxmount_morphing_combine/CMakeLists.txt 2018-08-13 15:52:45.384540173 +0200
@@ -6,5 +6,5 @@ project(libxmount_morphing_combine C)
add_library(xmount_morphing_combine SHARED libxmount_morphing_combine.c ../../libxmount/libxmount.c)
-install(TARGETS xmount_morphing_combine DESTINATION lib/xmount)
+install(TARGETS xmount_morphing_combine DESTINATION lib${LIB_SUFFIX}/xmount)
diff -up xmount-0.7.6/libxmount_morphing/libxmount_morphing_raid/CMakeLists.txt.suffix xmount-0.7.6/libxmount_morphing/libxmount_morphing_raid/CMakeLists.txt
--- xmount-0.7.6/libxmount_morphing/libxmount_morphing_raid/CMakeLists.txt.suffix 2018-04-05 08:09:54.000000000 +0200
+++ xmount-0.7.6/libxmount_morphing/libxmount_morphing_raid/CMakeLists.txt 2018-08-13 15:56:05.272662795 +0200
@@ -6,5 +6,5 @@ project(libxmount_morphing_raid C)
add_library(xmount_morphing_raid SHARED libxmount_morphing_raid.c ../../libxmount/libxmount.c)
-install(TARGETS xmount_morphing_raid DESTINATION lib/xmount)
+install(TARGETS xmount_morphing_raid DESTINATION lib${LIB_SUFFIX}/xmount)
diff -up xmount-0.7.6/libxmount_morphing/libxmount_morphing_unallocated/CMakeLists.txt.suffix xmount-0.7.6/libxmount_morphing/libxmount_morphing_unallocated/CMakeLists.txt
--- xmount-0.7.6/libxmount_morphing/libxmount_morphing_unallocated/CMakeLists.txt.suffix 2018-04-05 08:09:54.000000000 +0200
+++ xmount-0.7.6/libxmount_morphing/libxmount_morphing_unallocated/CMakeLists.txt 2018-08-13 15:55:33.767487267 +0200
@@ -6,5 +6,5 @@ project(libxmount_morphing_unallocated C
add_library(xmount_morphing_unallocated SHARED libxmount_morphing_unallocated.c hfs_functions.c fat_functions.c ../../libxmount/libxmount.c)
-install(TARGETS xmount_morphing_unallocated DESTINATION lib/xmount)
+install(TARGETS xmount_morphing_unallocated DESTINATION lib${LIB_SUFFIX}/xmount)

View file

@ -6,6 +6,8 @@ Summary: A on-the-fly convert for multiple hard disk image types
License: GPLv3+
URL: https://www.pinguin.lu/index.php
Source0: https://files.pinguin.lu/%{name}-%{version}.tar.gz
Patch0: xmount-suffix.patch
Patch1: xmount-cflags.patch
BuildRequires: gcc-c++
BuildRequires: fuse-devel
@ -29,26 +31,35 @@ files that is redirected to a cache file. This makes it possible
to boot acquired hard disk images using QEMU, KVM, VirtualBox,
VmWare, or alike.
%prep
%autosetup
%autosetup -p1
# Fix perm
chmod -x src/xmount.*
%build
mkdir build && cd build
%cmake -DCMAKE_BUILD_TYPE=Release \
%cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=ON \
..
%make_build CFLAGS="%{optflags} -lz -fPIC"
%make_build V=1
%install
cd build
%make_install
%files
%doc AUTHORS ChangeLog NEWS README ROADMAP TODO
%license COPYING
%{_mandir}/man*/%{name}*.*
%{_bindir}/%{name}
%{_libdir}/xmount
%changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.6-2