mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-12-22 19:12:24 +02:00
plplot: fix detection of target octave headers, libs and install directories
This commit is contained in:
parent
fcb5476931
commit
3613fcbd0c
@ -251,15 +251,16 @@ define Build/Configure
|
|||||||
|
|
||||||
# where is the target environment
|
# where is the target environment
|
||||||
echo "SET(CMAKE_FIND_ROOT_PATH $(STAGING_DIR))" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
echo "SET(CMAKE_FIND_ROOT_PATH $(STAGING_DIR))" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
||||||
|
# echo "SET(CMAKE_PREFIX_PATH /usr)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
||||||
echo "SET(CMAKE_LIBRARY_PATH $(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib $(STAGING_DIR_ROOT)/lib)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
echo "SET(CMAKE_LIBRARY_PATH $(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib $(STAGING_DIR_ROOT)/lib)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
||||||
echo "SET(CMAKE_SKIP_BUILD_RPATH ON)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
echo "SET(CMAKE_SKIP_BUILD_RPATH ON)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
||||||
# echo "SET(CMAKE_INSTALL_RPATH /usr/lib;/lib)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
# echo "SET(CMAKE_INSTALL_RPATH /usr/lib;/lib)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
||||||
|
|
||||||
echo "SET(CMAKE_INCLUDE_PATH $(STAGING_DIR)/usr/include)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
echo "SET(CMAKE_INCLUDE_PATH /usr/include)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
||||||
|
echo "SET(CMAKE_SYSTEM_INCLUDE_PATH /include)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
||||||
# search for programs in the build host directories
|
# search for programs in the build host directories
|
||||||
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
||||||
echo "SET(CMAKE_PROGRAM_PATH $(STAGING_DIR_HOST)/bin)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
echo "SET(CMAKE_PROGRAM_PATH $(STAGING_DIR_HOST)/bin $(STAGING_DIR)/usr/bin)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
||||||
|
|
||||||
# for libraries and headers in the target directories
|
# for libraries and headers in the target directories
|
||||||
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> $(PKG_BUILD_DIR)/toolchain.cmake
|
||||||
|
85
plplot/patches/007-fix-octave.patch
Normal file
85
plplot/patches/007-fix-octave.patch
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
Index: plplot-5.9.7/cmake/modules/octave.cmake
|
||||||
|
===================================================================
|
||||||
|
--- plplot-5.9.7.orig/cmake/modules/octave.cmake 2011-01-28 20:38:37.000000000 +0100
|
||||||
|
+++ plplot-5.9.7/cmake/modules/octave.cmake 2011-01-29 12:38:57.000000000 +0100
|
||||||
|
@@ -45,12 +45,12 @@
|
||||||
|
endif(ENABLE_octave AND NOT PERL_FOUND)
|
||||||
|
|
||||||
|
if(ENABLE_octave)
|
||||||
|
- find_program(OCTAVE octave)
|
||||||
|
+ find_program(OCTAVE octave-config)
|
||||||
|
if(OCTAVE)
|
||||||
|
message(STATUS "OCTAVE = ${OCTAVE}")
|
||||||
|
else(OCTAVE)
|
||||||
|
message(STATUS "WARNING: "
|
||||||
|
- "octave not found. Disabling octave bindings")
|
||||||
|
+ "octave-config not found.")
|
||||||
|
set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE)
|
||||||
|
endif(OCTAVE)
|
||||||
|
endif(ENABLE_octave)
|
||||||
|
@@ -71,10 +71,11 @@
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${OCTAVE} --version
|
||||||
|
OUTPUT_VARIABLE _OCTAVE_VERSION
|
||||||
|
+ OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
string(REGEX REPLACE
|
||||||
|
- "^.*version ([0-9]\\.[0-9]\\.[0-9]*).*$"
|
||||||
|
- "\\1"
|
||||||
|
+ "^.*(version )?([0-9]\\.[0-9]\\.[0-9]*).*$"
|
||||||
|
+ "\\2"
|
||||||
|
OCTAVE_VERSION
|
||||||
|
${_OCTAVE_VERSION}
|
||||||
|
)
|
||||||
|
@@ -168,35 +169,38 @@
|
||||||
|
# this method because as far as I know there is no method
|
||||||
|
# of invoking octave scripts from the octave command line other than
|
||||||
|
# with a file.
|
||||||
|
- file(WRITE ${CMAKE_BINARY_DIR}/octave_command
|
||||||
|
- "printf(octave_config_info(\"prefix\"));"
|
||||||
|
- )
|
||||||
|
+# file(WRITE ${CMAKE_BINARY_DIR}/octave_command
|
||||||
|
+# "printf(octave_config_info(\"prefix\"));"
|
||||||
|
+# )
|
||||||
|
execute_process(
|
||||||
|
- COMMAND ${OCTAVE} -q -f octave_command
|
||||||
|
+ COMMAND ${OCTAVE} -p PREFIX
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
|
OUTPUT_VARIABLE OCTAVE_PREFIX
|
||||||
|
+ OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
- #message(STATUS "OCTAVE_PREFIX = ${OCTAVE_PREFIX}")
|
||||||
|
+ message(STATUS "OCTAVE_PREFIX = ${OCTAVE_PREFIX}")
|
||||||
|
|
||||||
|
# octave-2.1 (or higher) logic.
|
||||||
|
#_OCTAVE_M_DIR
|
||||||
|
- file(WRITE ${CMAKE_BINARY_DIR}/octave_command
|
||||||
|
- "printf(octave_config_info(\"localfcnfiledir\"));"
|
||||||
|
- )
|
||||||
|
+# file(WRITE ${CMAKE_BINARY_DIR}/octave_command
|
||||||
|
+# "printf(octave_config_info(\"localfcnfiledir\"));"
|
||||||
|
+# )
|
||||||
|
execute_process(
|
||||||
|
- COMMAND ${OCTAVE} -q -f octave_command
|
||||||
|
+ COMMAND ${OCTAVE} -p LOCALFCNFILEDIR
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
|
OUTPUT_VARIABLE _OCTAVE_M_DIR
|
||||||
|
+ OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
#OCTAVE_OCT_DIR
|
||||||
|
if(NOT DEFINED OCTAVE_OCT_DIR)
|
||||||
|
- file(WRITE ${CMAKE_BINARY_DIR}/octave_command
|
||||||
|
- "printf(octave_config_info(\"localoctfiledir\"));"
|
||||||
|
- )
|
||||||
|
+# file(WRITE ${CMAKE_BINARY_DIR}/octave_command
|
||||||
|
+# "printf(octave_config_info(\"localoctfiledir\"));"
|
||||||
|
+# )
|
||||||
|
execute_process(
|
||||||
|
- COMMAND ${OCTAVE} -q -f octave_command
|
||||||
|
+ COMMAND ${OCTAVE} -p LOCALVEROCTFILEDIR
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
|
OUTPUT_VARIABLE OCTAVE_OCT_DIR
|
||||||
|
+ OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
endif(NOT DEFINED OCTAVE_OCT_DIR)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user