File 0001-cmake-detect-lib64-install-dir.patch of Package libfirm

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,16 @@ project(libfirm C)
 set(libfirm_VERSION "1.22.1")
 set(PROJECT_DESCRIPTION "library implementing the intermediate representation Firm")
 
+get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
+if (LIB64)
+    set(LIBSUFFIX 64)
+else()
+    set(LIBSUFFIX "")
+endif()
+
+set(LIB_INSTALL_DIR  lib${LIBSUFFIX} CACHE PATH "Installation directory for libraries")
+mark_as_advanced(INSTALL_LIB_DIR)
+
 set(CMAKE_C_VISIBILITY_PRESET hidden)
 
 set(SOURCES
@@ -521,7 +530,7 @@ set(INSTALL_HEADERS
 
 install(TARGETS firm
 	EXPORT libfirmTargets
-	DESTINATION lib
+	DESTINATION ${LIB_INSTALL_DIR}
 )
 foreach(header ${INSTALL_HEADERS})
 	get_filename_component(DIR ${header} DIRECTORY)
@@ -532,7 +541,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gen/include/libfirm/nodes.h DESTINATIO
 # Generate cmake Config file
 include(CMakePackageConfigHelpers)
 set(libfirm_INCLUDE_DIRS include)
-set(ConfigPackageLocation lib/cmake/libfirm)
+set(ConfigPackageLocation ${LIB_INSTALL_DIR}/cmake/libfirm)
 configure_package_config_file(support/libfirmConfig.cmake.in
 	${CMAKE_CURRENT_BINARY_DIR}/libfirmConfig.cmake
 	INSTALL_DESTINATION ${ConfigPackageLocation}
@@ -559,5 +568,5 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/support/libfirm.pc.in
 	@ONLY
 )
 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libfirm.pc"
-	DESTINATION lib/pkgconfig
+	DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
 )