void-packages/srcpkgs/wxWidgets-gtk3/patches/wx-config.patch

57 lines
1.8 KiB
Diff

Fix some of the automatically populated fields, which will generally be
incorrect in xbps-src cross-compilation environments.
--- ./wx-config.in
+++ ./wx-config.in
@@ -268,7 +268,9 @@
--help|-h)
usage
;;
-
+ --host=*)
+ continue
+ ;;
--*=*)
_name=`option_name $arg`
_value=`option_value $arg`
@@ -398,13 +400,13 @@
}
# Returns true if this script is for a cross compiled config.
-is_cross() { [ "x@cross_compiling@" = "xyes" ]; }
+is_cross() { false; }
# Determine the base directories we require.
prefix=${input_option_prefix-${this_prefix:-@prefix@}}
exec_prefix=${input_option_exec_prefix-${input_option_prefix-${this_exec_prefix:-@exec_prefix@}}}
-wxconfdir="@libdir@/wx/config"
+wxconfdir="${exec_prefix}/lib/wx/config"
installed_configs=`cd "$wxconfdir" 2> /dev/null && ls | grep -v "^inplace-"`
@@ -940,8 +942,8 @@
exec_prefix=${this_exec_prefix-$exec_prefix}
includedir="@includedir@"
-libdir="@libdir@"
-bindir="@bindir@"
+libdir="${exec_prefix}/lib"
+bindir="${exec_prefix}/bin"
# Trivial queries we can answer now.
[ -z "$output_option_prefix" ] || echo $prefix
@@ -950,9 +952,9 @@
[ -z "$output_option_version" ] || echo "@WX_VERSION@"
[ -z "$output_option_version_full" ] || echo "@WX_SUBVERSION@"
[ -z "$output_option_basename" ] || echo "@WX_LIBRARY_BASENAME_GUI@"
-[ -z "$output_option_cc" ] || echo "@CC@"
-[ -z "$output_option_cxx" ] || echo "@CXX@"
-[ -z "$output_option_ld" ] || echo "@CXX@ -o"
+[ -z "$output_option_cc" ] || echo "${bindir}/gcc"
+[ -z "$output_option_cxx" ] || echo "${bindir}/g++"
+[ -z "$output_option_ld" ] || echo "${bindir}/g++ -o"
[ -z "$flag_option_selected_config" ] || echo "$this_config"
for q in $query_options; do