Changeset View
Standalone View
emulators/virtualbox-ose/files/patch-configure
--- configure.orig 2021-01-07 15:31:21 UTC | --- configure.orig 2021-07-28 16:13:45 UTC | ||||
+++ configure | +++ configure | ||||
@@ -140,10 +140,14 @@ CXX_FLAGS="" | @@ -139,10 +139,14 @@ CXX_FLAGS="" | ||||
if [ "$OS" = "freebsd" ]; then | if [ "$OS" = "freebsd" ]; then | ||||
INCCURL="-I/usr/local/include" | INCCURL="-I/usr/local/include" | ||||
LIBCURL="-L/usr/local/lib -lcurl" | LIBCURL="-L/usr/local/lib -lcurl" | ||||
+ INCALSA="-I/usr/local/include" | + INCALSA="-I/usr/local/include" | ||||
+ LIBALSA="-L/usr/local/lib" | + LIBALSA="-L/usr/local/lib" | ||||
INCPULSE="-I/usr/local/include" | INCPULSE="-I/usr/local/include" | ||||
LIBPULSE="-L/usr/local/lib" | LIBPULSE="-L/usr/local/lib" | ||||
INCPNG="-I/usr/local/include" | INCPNG="-I/usr/local/include" | ||||
LIBPNG="-L/usr/local/lib -lpng" | LIBPNG="-L/usr/local/lib -lpng" | ||||
+ INCVNCSERVER="-I/usr/local/include" | + INCVNCSERVER="-I/usr/local/include" | ||||
+ LIBVNCSERVER="-L/usr/local/lib" | + LIBVNCSERVER="-L/usr/local/lib" | ||||
koobs: Replace hard-coded `/usr/local` with `SUB_FILES` AND `%%LOCALBASE%%` or modify/set them with… | |||||
Done Inline ActionsGood catch. Please note that this was existing code I did not modify it myself in this patch. madpilot: Good catch. Please note that this was existing code I did not modify it myself in this patch. | |||||
Done Inline ActionsLooking at this, there are actually a bunch of these that require fixing. I'm taking a look. madpilot: Looking at this, there are actually a bunch of these that require fixing. I'm taking a look. | |||||
Done Inline ActionsSorry for multiple replies. Actually there is this in the Makefile: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Config.kmk ${WRKSRC}/configure \ Changing this logic would require re-engineering the whole thing, which I don't think is really worth it. madpilot: Sorry for multiple replies. Actually there is this in the Makefile:
```
@${REINPLACE_CMD} -e… | |||||
else | else | ||||
INCCURL="" | INCCURL="" | ||||
LIBCURL="-lcurl" | LIBCURL="-lcurl" | ||||
@@ -1258,7 +1262,7 @@ extern "C" int main(void) | @@ -1257,7 +1261,7 @@ extern "C" int main(void) | ||||
#endif | #endif | ||||
} | } | ||||
EOF | EOF | ||||
- if test_compile "-lasound" asound asound; then | - if test_compile "-lasound" asound asound; then | ||||
+ if test_compile "$INCALSA $LIBALSA -lasound" asound asound; then | + if test_compile "$INCALSA $LIBALSA -lasound" asound asound; then | ||||
test_execute | test_execute | ||||
fi | fi | ||||
} | } | ||||
@@ -1563,9 +1567,7 @@ EOF | @@ -1564,6 +1568,7 @@ EOF | ||||
if [ $? -eq 0 ]; then | FLGQT5=`pkg-config Qt5Core Qt5Gui --cflags` | ||||
echo "(Qt5 from pkg-config)" >> $LOG | # gcc 4.8 is able to compile with C++11 (see also VBOX_GCC_std in Config.kmk) | ||||
FLGQT5=`pkg-config Qt5Core --cflags` | [ $(($cc_maj * 100 + $cc_min)) -ge 408 ] && FLGQT5="$FLGQT5 -std=c++11" | ||||
- # gcc 4.8 is able to compile with C++11 (see also VBOX_GCC_std in Config.kmk) | + FLGQT5="$FLGQT5 -std=c++11" | ||||
- [ $cc_maj -eq 4 -a $cc_min -eq 8 ] && FLGQT5="$FLGQT5 -std=c++11" | INCQT5=`strip_I "$FLGQT5"` | ||||
- INCQT5=`strip_I "$FLGQT5"` | |||||
+ FLGQT5="$FLGQT5 -std=c++11" INCQT5=`strip_I "$FLGQT5"` | |||||
LIBDIR5=`pkg-config Qt5Core --variable=libdir` | LIBDIR5=`pkg-config Qt5Core --variable=libdir` | ||||
LIBQT5=`pkg-config Qt5Core --libs` | LIBQT5=`pkg-config Qt5Core Qt5Gui --libs` | ||||
LIBQT5="-L$LIBDIR5 $LIBQT5" | @@ -1702,7 +1707,7 @@ check_libopus() | ||||
@@ -1703,7 +1705,7 @@ check_libopus() | |||||
fi | fi | ||||
cat > $ODIR.tmp_src.cc << EOF | cat > $ODIR.tmp_src.cc << EOF | ||||
#include <cstdio> | #include <cstdio> | ||||
-#include <opus/opus.h> | -#include <opus/opus.h> | ||||
+#include <opus.h> | +#include <opus.h> | ||||
extern "C" int main(void) | extern "C" int main(void) | ||||
{ | { | ||||
OpusEncoder *test; | OpusEncoder *test; | ||||
@@ -2035,8 +2037,8 @@ EOF | @@ -2034,8 +2039,8 @@ EOF | ||||
echo "compiling the following source file:" >> $LOG | echo "compiling the following source file:" >> $LOG | ||||
cat $ODIR.tmp_src.cc >> $LOG | cat $ODIR.tmp_src.cc >> $LOG | ||||
echo "using the following command line:" >> $LOG | echo "using the following command line:" >> $LOG | ||||
- echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so" >> $LOG | - echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so" >> $LOG | ||||
- $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so >> $LOG 2>&1 | - $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so >> $LOG 2>&1 | ||||
+ echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread" >> $LOG | + echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread" >> $LOG | ||||
+ $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread >> $LOG 2>&1 | + $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread >> $LOG 2>&1 | ||||
if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
found=1 | found=1 | ||||
break | break | ||||
@@ -2512,7 +2514,7 @@ for option in "$@"; do | @@ -2151,7 +2156,7 @@ check_gsoap() | ||||
else | |||||
cnf_append "VBOX_GSOAP_CXX_SOURCES" "" | |||||
fi | |||||
- cnf_append "VBOX_GSOAP_CXX_LIBS" "`strip_l "$GSOAP_CXX_LIBS"`" | |||||
+ cnf_append "VBOX_GSOAP_CXX_LIBS" "`strip_l "$GSOAP_CXX_LIBS"` z" | |||||
Not Done Inline ActionsCan this be done with CONFIGURE_ENV / CONFIGURE_ARGS VBOX_GSOAP_CXX_LIBS='-lz' ? koobs: Can this be done with `CONFIGURE_ENV` / `CONFIGURE_ARGS` `VBOX_GSOAP_CXX_LIBS='-lz'` ? | |||||
Done Inline ActionsThat would not work because VBOX_GSOAP_CXX_LIBS is calculated on the fly based on pkg-config output. In fact I don't understand why that -lz is necessary. Looks like it should be reported by by the gsoap library pkg-config script, but other consumers don't seem to care. I'm adding it there manually to make virtualbox compile. Any other solution would require even more intrusive changes to the configure script. madpilot: That would not work because VBOX_GSOAP_CXX_LIBS is calculated on the fly based on pkg-config… | |||||
gsoap_version=`pkg-config gsoapssl++ --modversion` | |||||
log_success "found version $gsoap_version" | |||||
return | |||||
@@ -2510,7 +2515,7 @@ for option in "$@"; do | |||||
--with-openssl-dir=*) | --with-openssl-dir=*) | ||||
OPENSSLDIR=`echo $option | cut -d'=' -f2` | OPENSSLDIR=`echo $option | cut -d'=' -f2` | ||||
INCCRYPTO="-I${OPENSSLDIR}/include" | INCCRYPTO="-I${OPENSSLDIR}/include" | ||||
- LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a" | - LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a" | ||||
+ LIBCRYPTO="-L${OPENSSLDIR}/lib -lssl -lcrypto" | + LIBCRYPTO="-L${OPENSSLDIR}/lib -lssl -lcrypto" | ||||
;; | ;; | ||||
--with-ow-dir=*) | --with-ow-dir=*) | ||||
WATCOM=`echo $option | cut -d'=' -f2` | WATCOM=`echo $option | cut -d'=' -f2` | ||||
@@ -2856,14 +2858,23 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then | @@ -2853,14 +2858,23 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then | ||||
[ $WITH_PYTHON -eq 1 ] && check_python | [ $WITH_PYTHON -eq 1 ] && check_python | ||||
[ $WITH_JAVA -eq 1 ] && check_java | [ $WITH_JAVA -eq 1 ] && check_java | ||||
- # PulseAudio | - # PulseAudio | ||||
- if [ $WITH_PULSE -eq 1 ]; then | - if [ $WITH_PULSE -eq 1 ]; then | ||||
- check_pulse | - check_pulse | ||||
- elif [ $WITH_PULSE -eq 0 ]; then # Force disabling PulseAudio. | - elif [ $WITH_PULSE -eq 0 ]; then # Force disabling PulseAudio. | ||||
- cnf_append "VBOX_WITH_AUDIO_PULSE" "" | - cnf_append "VBOX_WITH_AUDIO_PULSE" "" | ||||
Show All 15 Lines | |||||
+ fi | + fi | ||||
+ if [ $WITH_DBUS -eq 0 ]; then | + if [ $WITH_DBUS -eq 0 ]; then | ||||
+ cnf_append "VBOX_WITH_DBUS" "" | + cnf_append "VBOX_WITH_DBUS" "" | ||||
+ fi | + fi | ||||
+ fi | + fi | ||||
fi | fi | ||||
# Linux-specific | # Linux-specific | ||||
@@ -2878,14 +2889,6 @@ if [ "$OS" = "linux" ]; then | @@ -2875,14 +2889,6 @@ if [ "$OS" = "linux" ]; then | ||||
cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1" | cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1" | ||||
fi | fi | ||||
if [ $ONLY_ADDITIONS -eq 0 ]; then | if [ $ONLY_ADDITIONS -eq 0 ]; then | ||||
- if [ $WITH_ALSA -eq 1 ]; then | - if [ $WITH_ALSA -eq 1 ]; then | ||||
- check_alsa | - check_alsa | ||||
- else | - else | ||||
- cnf_append "VBOX_WITH_AUDIO_ALSA" "" | - cnf_append "VBOX_WITH_AUDIO_ALSA" "" | ||||
- fi | - fi | ||||
- if [ $WITH_DBUS -eq 0 ]; then | - if [ $WITH_DBUS -eq 0 ]; then | ||||
- cnf_append "VBOX_WITH_DBUS" "" | - cnf_append "VBOX_WITH_DBUS" "" | ||||
- fi | - fi | ||||
if [ $WITH_DEVMAPPER -eq 1 ]; then | if [ $WITH_DEVMAPPER -eq 1 ]; then | ||||
check_libdevmapper | check_libdevmapper | ||||
else | else |
Replace hard-coded /usr/local with SUB_FILES AND %%LOCALBASE%% or modify/set them with CONFIGURE_ARGS instead of patching, which would seem to be the better option.