aboutsummaryrefslogtreecommitdiff
path: root/ports/argh/remove_unnamespaced_license_file.patch
blob: f6742c86c634b5ed60f48658792972a74e51a807 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 83f364a2eb1b137453772ae9fcf5d7973770637f Mon Sep 17 00:00:00 2001
From: Billy Robert O'Neal III <bion@microsoft.com>
Date: Wed, 29 Apr 2020 13:01:31 -0700
Subject: [PATCH] Don't install 'LICENSE' or 'README.md' directly to the
 installation directory.

This change unconditionally uses GNUInstallDirs which will correctly 'namespace' these files with the 'argh' project name.

=========

The names 'LICENSE' and 'README.md' are extremely common and likely to be taken by other ports. This happened in a recent full vcpkg catalog rebuild:

Starting package 757/1254: qt-advanced-docking-system:x86-windows
Building package qt-advanced-docking-system[core]:x86-windows...
Could not locate cached archive: C:\agent\_work\1\s\archives\a1\a1507296ead5788137561997571557204aaac78f.zip
-- Downloading https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/archive/661d0c4356ab61d155b53718aa1bf6bab86dad13.tar.gz...
-- Extracting source C:/agent/_work/1/s/downloads/githubuser0xFFFF-Qt-Advanced-Docking-System-661d0c4356ab61d155b53718aa1bf6bab86dad13.tar.gz
-- Applying patch config_changes.patch
-- Using source at C:/agent/_work/1/s/buildtrees/qt-advanced-docking-system/src/bab86dad13-3088149a9b
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Installing: C:/agent/_work/1/s/packages/qt-advanced-docking-system_x86-windows/share/qt-advanced-docking-system/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\agent\_work\1\s\archives\a1\a1507296ead5788137561997571557204aaac78f.zip
Building package qt-advanced-docking-system[core]:x86-windows... done
Installing package qt-advanced-docking-system[core]:x86-windows...
The following files are already installed in C:/agent/_work/1/s/installed/x86-windows and are in conflict with qt-advanced-docking-system:x86-windows

Installed by argh:x86-windows
    license/LICENSE

Elapsed time for package qt-advanced-docking-system:x86-windows: 11.09 s
---
 CMakeLists.txt | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13bc879..f6264f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,19 +36,17 @@ endif()
 
 install(TARGETS argh EXPORT arghTargets)
 
+include(GNUInstallDirs)
+install(FILES "${CMAKE_CURRENT_LIST_DIR}/argh.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+install(FILES "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION ${CMAKE_INSTALL_DOCDIR})
+install(FILES "${CMAKE_CURRENT_LIST_DIR}/README.md" DESTINATION ${CMAKE_INSTALL_DOCDIR})
+
 if(CMAKE_SYSTEM_NAME STREQUAL Linux)
 # this might be a bit too restrictive, since for other (BSD, ...) this might apply also
 # but this can be fixed later in extra pull requests from people on the platform
-	include(GNUInstallDirs)
-	install(FILES "${CMAKE_CURRENT_LIST_DIR}/argh.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-	install(FILES "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION ${CMAKE_INSTALL_DOCDIR})
-	install(FILES "${CMAKE_CURRENT_LIST_DIR}/README.md" DESTINATION ${CMAKE_INSTALL_DOCDIR})
 	install(FILES argh-config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/argh)
 	install(EXPORT arghTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/argh)
 else()
-	install(FILES "${CMAKE_CURRENT_LIST_DIR}/argh.h" DESTINATION include)
-	install(FILES "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION license)
-	install(FILES "${CMAKE_CURRENT_LIST_DIR}/README.md" DESTINATION .)
 	install(FILES argh-config.cmake DESTINATION CMake)
 	install(EXPORT arghTargets DESTINATION CMake)
 endif()