mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 03:09:02 +08:00
[sdformat9] no absolute paths (#22339)
This commit is contained in:
parent
5fcea86177
commit
3def06a074
85
ports/sdformat9/fix-quote.patch
Normal file
85
ports/sdformat9/fix-quote.patch
Normal file
@ -0,0 +1,85 @@
|
||||
diff --git a/cmake/FindSSE.cmake b/cmake/FindSSE.cmake
|
||||
index cdbcfcc..0339a17 100644
|
||||
--- a/cmake/FindSSE.cmake
|
||||
+++ b/cmake/FindSSE.cmake
|
||||
@@ -5,7 +5,7 @@ IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO)
|
||||
|
||||
- STRING(REGEX REPLACE "^.*(sse2).*$" "\\1" SSE_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*(sse2).*$" "\\1" SSE_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE)
|
||||
IF (SSE2_TRUE)
|
||||
set(SSE2_FOUND true CACHE BOOL "SSE2 available on host")
|
||||
@@ -14,14 +14,14 @@ IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
|
||||
ENDIF (SSE2_TRUE)
|
||||
|
||||
# /proc/cpuinfo apparently omits sse3 :(
|
||||
- STRING(REGEX REPLACE "^.*[^s](sse3).*$" "\\1" SSE_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*[^s](sse3).*$" "\\1" SSE_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "sse3" "${SSE_THERE}" SSE3_TRUE)
|
||||
IF (NOT SSE3_TRUE)
|
||||
- STRING(REGEX REPLACE "^.*(T2300).*$" "\\1" SSE_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*(T2300).*$" "\\1" SSE_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "T2300" "${SSE_THERE}" SSE3_TRUE)
|
||||
ENDIF (NOT SSE3_TRUE)
|
||||
|
||||
- STRING(REGEX REPLACE "^.*(ssse3).*$" "\\1" SSE_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*(ssse3).*$" "\\1" SSE_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "ssse3" "${SSE_THERE}" SSSE3_TRUE)
|
||||
IF (SSE3_TRUE OR SSSE3_TRUE)
|
||||
set(SSE3_FOUND true CACHE BOOL "SSE3 available on host")
|
||||
@@ -34,7 +34,7 @@ IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
|
||||
set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
|
||||
ENDIF (SSSE3_TRUE)
|
||||
|
||||
- STRING(REGEX REPLACE "^.*(sse4_1).*$" "\\1" SSE_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*(sse4_1).*$" "\\1" SSE_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "sse4_1" "${SSE_THERE}" SSE41_TRUE)
|
||||
IF (SSE41_TRUE)
|
||||
set(SSE4_1_FOUND true CACHE BOOL "SSE4.1 available on host")
|
||||
@@ -42,7 +42,7 @@ IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
|
||||
set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
|
||||
ENDIF (SSE41_TRUE)
|
||||
|
||||
- STRING(REGEX REPLACE "^.*(sse4_2).*$" "\\1" SSE_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*(sse4_2).*$" "\\1" SSE_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "sse4_2" "${SSE_THERE}" SSE42_TRUE)
|
||||
IF (SSE42_TRUE)
|
||||
set(SSE4_2_FOUND true CACHE BOOL "SSE4.2 available on host")
|
||||
@@ -54,7 +54,7 @@ IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
|
||||
EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
|
||||
CPUINFO)
|
||||
|
||||
- STRING(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "SSE2" "${SSE_THERE}" SSE2_TRUE)
|
||||
IF (SSE2_TRUE)
|
||||
set(SSE2_FOUND true CACHE BOOL "SSE2 available on host")
|
||||
@@ -62,7 +62,7 @@ IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
|
||||
set(SSE2_FOUND false CACHE BOOL "SSE2 available on host")
|
||||
ENDIF (SSE2_TRUE)
|
||||
|
||||
- STRING(REGEX REPLACE "^.*[^S](SSE3).*$" "\\1" SSE_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*[^S](SSE3).*$" "\\1" SSE_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "SSE3" "${SSE_THERE}" SSE3_TRUE)
|
||||
IF (SSE3_TRUE)
|
||||
set(SSE3_FOUND true CACHE BOOL "SSE3 available on host")
|
||||
@@ -70,7 +70,7 @@ IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
|
||||
set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
|
||||
ENDIF (SSE3_TRUE)
|
||||
|
||||
- STRING(REGEX REPLACE "^.*(SSSE3).*$" "\\1" SSE_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*(SSSE3).*$" "\\1" SSE_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "SSSE3" "${SSE_THERE}" SSSE3_TRUE)
|
||||
IF (SSSE3_TRUE)
|
||||
set(SSSE3_FOUND true CACHE BOOL "SSSE3 available on host")
|
||||
@@ -78,7 +78,7 @@ IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
|
||||
set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
|
||||
ENDIF (SSSE3_TRUE)
|
||||
|
||||
- STRING(REGEX REPLACE "^.*(SSE4.1).*$" "\\1" SSE_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*(SSE4.1).*$" "\\1" SSE_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "SSE4.1" "${SSE_THERE}" SSE41_TRUE)
|
||||
IF (SSE41_TRUE)
|
||||
set(SSE4_1_FOUND true CACHE BOOL "SSE4.1 available on host")
|
38
ports/sdformat9/no-absolute.patch
Normal file
38
ports/sdformat9/no-absolute.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff --git a/cmake/sdf_config.h.in b/cmake/sdf_config.h.in
|
||||
index c3ce2336..64ac9f5f 100644
|
||||
--- a/cmake/sdf_config.h.in
|
||||
+++ b/cmake/sdf_config.h.in
|
||||
@@ -31,6 +31,3 @@
|
||||
#cmakedefine BUILD_TYPE_RELEASE 1
|
||||
#cmakedefine HAVE_URDFDOM 1
|
||||
#cmakedefine USE_INTERNAL_URDF 1
|
||||
-
|
||||
-#define SDF_SHARE_PATH "${CMAKE_INSTALL_FULL_DATAROOTDIR}/"
|
||||
-#define SDF_VERSION_PATH "${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${SDF_MAJOR_VERSION}/${SDF_PKG_VERSION}"
|
||||
diff --git a/src/SDF.cc b/src/SDF.cc
|
||||
index 48c1943b..bd2c5b31 100644
|
||||
--- a/src/SDF.cc
|
||||
+++ b/src/SDF.cc
|
||||
@@ -100,22 +100,6 @@ std::string findFile(const std::string &_filename, bool _searchLocalPath,
|
||||
filename = filename.substr(idx + sep.length());
|
||||
}
|
||||
|
||||
- // Next check the install path.
|
||||
- path = sdf::filesystem::append(SDF_SHARE_PATH, filename);
|
||||
- if (sdf::filesystem::exists(path))
|
||||
- {
|
||||
- return path;
|
||||
- }
|
||||
-
|
||||
- // Next check the versioned install path.
|
||||
- path = sdf::filesystem::append(SDF_SHARE_PATH,
|
||||
- "sdformat" SDF_MAJOR_VERSION_STR,
|
||||
- sdf::SDF::Version(), filename);
|
||||
- if (sdf::filesystem::exists(path))
|
||||
- {
|
||||
- return path;
|
||||
- }
|
||||
-
|
||||
// Next check to see if the given file exists.
|
||||
path = filename;
|
||||
if (sdf::filesystem::exists(path))
|
@ -6,6 +6,8 @@ vcpkg_from_github(
|
||||
HEAD_REF sdf9
|
||||
PATCHES
|
||||
fix-dependency-urdfdom.patch
|
||||
fix-quote.patch
|
||||
no-absolute.patch
|
||||
)
|
||||
|
||||
# Ruby is required by the sdformat build process
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "sdformat9",
|
||||
"version": "9.4.0",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"description": "Simulation Description Format (SDF) parser and description files.",
|
||||
"homepage": "http://sdformat.org/",
|
||||
"supports": "!(linux | uwp)",
|
||||
|
@ -6246,7 +6246,7 @@
|
||||
},
|
||||
"sdformat9": {
|
||||
"baseline": "9.4.0",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"sdl1": {
|
||||
"baseline": "1.2.15",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2b064abf9a6849ed5234b03bf5604ccd0169db4a",
|
||||
"version": "9.4.0",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "5f47672c7e4349da14189c38db3a15dcdad5a196",
|
||||
"version": "9.4.0",
|
||||
|
Loading…
Reference in New Issue
Block a user