Browse Source

package sfml: fix line endings and convert patches to git format

tags/build-2019-03-04
Tony Theodore 6 years ago
parent
commit
b2bef6b006

+ 2
- 0
.gitattributes View File

@@ -0,0 +1,2 @@
1
+*crlf.patch -text
2
+

+ 0
- 32
src/sfml-1-disable-merge-libs.patch View File

@@ -1,32 +0,0 @@
1
-This file is part of MXE.
2
-See index.html for further information.
3
-
4
-diff -urN SFML-2.0.orig/cmake/Macros.cmake SFML-2.0/cmake/Macros.cmake
5
---- SFML-2.0.orig/cmake/Macros.cmake	2013-04-06 10:17:56.000000000 -0300
6
-+++ SFML-2.0/cmake/Macros.cmake	2013-06-24 09:45:56.694654704 -0300
7
-@@ -11,25 +11,6 @@
8
- #   out-of-the-box (CMake forwards the dependencies automatically)
9
- macro(sfml_static_add_libraries target)
10
-     if(WINDOWS AND COMPILER_GCC)
11
--        # Windows - gcc
12
--        foreach(lib ${ARGN})
13
--            if(NOT ${lib} MATCHES ".*/.*")
14
--                string(REGEX REPLACE "(.*)/bin/.*\\.exe" "\\1" STANDARD_LIBS_PATH "${CMAKE_CXX_COMPILER}")
15
--                if(COMPILER_GCC_W64)
16
--                    set(lib "${STANDARD_LIBS_PATH}/${GCC_MACHINE}/lib/lib${lib}.a")
17
--                else()
18
--                    set(lib "${STANDARD_LIBS_PATH}/lib/lib${lib}.a")
19
--                endif()
20
--            endif()
21
--            string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
22
--            get_target_property(TARGET_FILENAME ${target} ${BUILD_TYPE}_LOCATION)
23
--            add_custom_command(TARGET ${target}
24
--                               POST_BUILD
25
--                               COMMAND ${CMAKE_AR} x ${lib}
26
--                               COMMAND ${CMAKE_AR} rcs ${TARGET_FILENAME} *.o
27
--                               COMMAND del *.o /f /q
28
--                               VERBATIM)
29
--        endforeach()
30
-     elseif(MSVC)
31
-         # Visual C++
32
-         set(LIBRARIES "")

+ 166
- 0
src/sfml-1-fixes-crlf.patch View File

@@ -0,0 +1,166 @@
1
+This file is part of MXE.
2
+See index.html for further information.
3
+
4
+Contains ad hoc patches for cross building.
5
+
6
+From 64c45ad98ec46b721a7ba91952d621d5ae709355 Mon Sep 17 00:00:00 2001
7
+From: MXE
8
+Date: Sat, 6 Jul 2013 17:53:14 +1000
9
+Subject: [PATCH 1/3] disable merge libs
10
+
11
+
12
+diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake
13
+index 072fe75..ee9a849 100755
14
+--- a/cmake/Macros.cmake
15
++++ b/cmake/Macros.cmake
16
+@@ -11,25 +11,6 @@
17
+ #   out-of-the-box (CMake forwards the dependencies automatically)
18
+ macro(sfml_static_add_libraries target)
19
+     if(WINDOWS AND COMPILER_GCC)
20
+-        # Windows - gcc
21
+-        foreach(lib ${ARGN})
22
+-            if(NOT ${lib} MATCHES ".*/.*")
23
+-                string(REGEX REPLACE "(.*)/bin/.*\\.exe" "\\1" STANDARD_LIBS_PATH "${CMAKE_CXX_COMPILER}")
24
+-                if(COMPILER_GCC_W64)
25
+-                    set(lib "${STANDARD_LIBS_PATH}/${GCC_MACHINE}/lib/lib${lib}.a")
26
+-                else()
27
+-                    set(lib "${STANDARD_LIBS_PATH}/lib/lib${lib}.a")
28
+-                endif()
29
+-            endif()
30
+-            string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
31
+-            get_target_property(TARGET_FILENAME ${target} ${BUILD_TYPE}_LOCATION)
32
+-            add_custom_command(TARGET ${target}
33
+-                               POST_BUILD
34
+-                               COMMAND ${CMAKE_AR} x ${lib}
35
+-                               COMMAND ${CMAKE_AR} rcs ${TARGET_FILENAME} *.o
36
+-                               COMMAND del *.o /f /q
37
+-                               VERBATIM)
38
+-        endforeach()
39
+     elseif(MSVC)
40
+         # Visual C++
41
+         set(LIBRARIES "")
42
+@@ -164,17 +145,17 @@ macro(sfml_add_library target)
43
+     if(MACOSX AND BUILD_SHARED_LIBS)
44
+         if(SFML_BUILD_FRAMEWORKS)
45
+             # adapt target to build frameworks instead of dylibs
46
+-            set_target_properties(${target} PROPERTIES 
47
++            set_target_properties(${target} PROPERTIES
48
+                                   FRAMEWORK TRUE
49
+                                   FRAMEWORK_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
50
+                                   MACOSX_FRAMEWORK_IDENTIFIER org.sfml-dev.${target}
51
+                                   MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
52
+                                   MACOSX_FRAMEWORK_BUNDLE_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
53
+         endif()
54
+-        
55
++
56
+         # adapt install directory to allow distributing dylibs/frameworks in user’s frameworks/application bundle
57
+-        set_target_properties(${target} PROPERTIES 
58
+-                              BUILD_WITH_INSTALL_RPATH 1 
59
++        set_target_properties(${target} PROPERTIES
60
++                              BUILD_WITH_INSTALL_RPATH 1
61
+                               INSTALL_NAME_DIR "@executable_path/../Frameworks")
62
+     endif()
63
+ 
64
+@@ -193,7 +174,7 @@ macro(sfml_add_library target)
65
+     # add the install rule
66
+     install(TARGETS ${target}
67
+             RUNTIME DESTINATION bin COMPONENT bin
68
+-            LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT bin 
69
++            LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT bin
70
+             ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT devel
71
+             FRAMEWORK DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX} COMPONENT bin)
72
+ 
73
+-- 
74
+1.8.2.3
75
+
76
+
77
+From 797385b22ae2586bcab47f866bfa50f6cbe4b261 Mon Sep 17 00:00:00 2001
78
+From: MXE
79
+Date: Sat, 6 Jul 2013 17:54:02 +1000
80
+Subject: [PATCH 2/3] static openal
81
+
82
+
83
+diff --git a/CMakeLists.txt b/CMakeLists.txt
84
+index 959a403..bf5a805 100755
85
+--- a/CMakeLists.txt
86
++++ b/CMakeLists.txt
87
+@@ -40,7 +40,7 @@ sfml_set_option(SFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentatio
88
+ if(MACOSX)
89
+     # add an option to build frameworks instead of dylibs (release only)
90
+     sfml_set_option(SFML_BUILD_FRAMEWORKS FALSE BOOL "TRUE to build SFML as frameworks libraries (release only), FALSE to build according to BUILD_SHARED_LIBS")
91
+-    
92
++
93
+     # add an option to let the user specify a custom directory for frameworks installation (SFML, sndfile, ...)
94
+     sfml_set_option(CMAKE_INSTALL_FRAMEWORK_PREFIX "/Library/Frameworks" STRING "Frameworks installation directory")
95
+ 
96
+@@ -51,6 +51,7 @@ endif()
97
+ # define SFML_STATIC if the build type is not set to 'shared'
98
+ if(NOT BUILD_SHARED_LIBS)
99
+     add_definitions(-DSFML_STATIC)
100
++    add_definitions(-DAL_LIBTYPE_STATIC)
101
+ endif()
102
+ 
103
+ # remove SL security warnings with Visual C++
104
+@@ -161,7 +162,7 @@ else()
105
+     add_library(SFML ${SFML_SOURCES})
106
+ 
107
+     # edit target properties
108
+-    set_target_properties(SFML PROPERTIES 
109
++    set_target_properties(SFML PROPERTIES
110
+                           FRAMEWORK TRUE
111
+                           FRAMEWORK_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
112
+                           MACOSX_FRAMEWORK_IDENTIFIER org.sfml-dev.SFML
113
+@@ -170,14 +171,14 @@ else()
114
+                           PUBLIC_HEADER "${SFML_HEADERS}")
115
+ 
116
+     # add the remaining headers
117
+-    add_custom_command(TARGET SFML 
118
++    add_custom_command(TARGET SFML
119
+                        POST_BUILD
120
+                        COMMAND cp -r ${PROJECT_SOURCE_DIR}/include/SFML/* SFML.framework/Versions/${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}/Headers)
121
+ 
122
+     # adapt install directory to allow distributing dylibs/frameworks in user’s frameworks/application bundle
123
+     # NOTE : it's not required to link agains SFML.framework
124
+-    set_target_properties(SFML PROPERTIES 
125
+-                          BUILD_WITH_INSTALL_RPATH 1 
126
++    set_target_properties(SFML PROPERTIES
127
++                          BUILD_WITH_INSTALL_RPATH 1
128
+                           INSTALL_NAME_DIR "@executable_path/../Frameworks")
129
+ 
130
+     # install rule
131
+-- 
132
+1.8.2.3
133
+
134
+
135
+From 4e522133482f3f37ee8f498a35294eb31738e307 Mon Sep 17 00:00:00 2001
136
+From: MXE
137
+Date: Sat, 6 Jul 2013 17:55:39 +1000
138
+Subject: [PATCH 3/3] dont install dlls
139
+
140
+
141
+diff --git a/CMakeLists.txt b/CMakeLists.txt
142
+index bf5a805..78e5630 100755
143
+--- a/CMakeLists.txt
144
++++ b/CMakeLists.txt
145
+@@ -187,18 +187,7 @@ else()
146
+             COMPONENT devel)
147
+ endif()
148
+ 
149
+-install(FILES cmake/Modules/FindSFML.cmake DESTINATION ${INSTALL_MISC_DIR}/cmake/Modules)
150
+-install(FILES license.txt DESTINATION ${INSTALL_MISC_DIR})
151
+-install(FILES readme.txt DESTINATION ${INSTALL_MISC_DIR})
152
+-
153
+ if(WINDOWS)
154
+-    if(ARCH_32BITS)
155
+-        install(FILES extlibs/bin/x86/libsndfile-1.dll DESTINATION bin)
156
+-        install(FILES extlibs/bin/x86/openal32.dll DESTINATION bin)
157
+-    elseif(ARCH_64BITS)
158
+-        install(FILES extlibs/bin/x64/libsndfile-1.dll DESTINATION bin)
159
+-        install(FILES extlibs/bin/x64/openal32.dll DESTINATION bin)
160
+-    endif()
161
+ elseif(MACOSX)
162
+     install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
163
+     install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
164
+-- 
165
+1.8.2.3
166
+

+ 0
- 14
src/sfml-2-static-openal.patch View File

@@ -1,14 +0,0 @@
1
-This file is part of MXE.
2
-See index.html for further information.
3
-
4
-diff -urN SFML-2.0.orig/CMakeLists.txt SFML-2.0/CMakeLists.txt
5
---- SFML-2.0.orig/CMakeLists.txt	2013-02-25 20:16:00.000000000 -0300
6
-+++ SFML-2.0/CMakeLists.txt	2013-06-24 10:39:42.514647661 -0300
7
-@@ -51,6 +51,7 @@
8
- # define SFML_STATIC if the build type is not set to 'shared'
9
- if(NOT BUILD_SHARED_LIBS)
10
-     add_definitions(-DSFML_STATIC)
11
-+    add_definitions(-DAL_LIBTYPE_STATIC)
12
- endif()
13
- 
14
- # remove SL security warnings with Visual C++

+ 0
- 25
src/sfml-3-remove-dirty-installs.patch View File

@@ -1,25 +0,0 @@
1
-This file is part of MXE.
2
-See index.html for further information.
3
-
4
-diff -urN SFML-2.0.orig/CMakeLists.txt SFML-2.0/CMakeLists.txt
5
---- SFML-2.0.orig/CMakeLists.txt	2013-06-24 10:56:39.114645000 -0300
6
-+++ SFML-2.0/CMakeLists.txt	2013-06-24 10:58:33.294645192 -0300
7
-@@ -187,18 +187,7 @@
8
-             COMPONENT devel)
9
- endif()
10
- 
11
--install(FILES cmake/Modules/FindSFML.cmake DESTINATION ${INSTALL_MISC_DIR}/cmake/Modules)
12
--install(FILES license.txt DESTINATION ${INSTALL_MISC_DIR})
13
--install(FILES readme.txt DESTINATION ${INSTALL_MISC_DIR})
14
--
15
- if(WINDOWS)
16
--    if(ARCH_32BITS)
17
--        install(FILES extlibs/bin/x86/libsndfile-1.dll DESTINATION bin)
18
--        install(FILES extlibs/bin/x86/openal32.dll DESTINATION bin)
19
--    elseif(ARCH_64BITS)
20
--        install(FILES extlibs/bin/x64/libsndfile-1.dll DESTINATION bin)
21
--        install(FILES extlibs/bin/x64/openal32.dll DESTINATION bin)
22
--    endif()
23
- elseif(MACOSX)
24
-     install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
25
-     install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})

Loading…
Cancel
Save