[vbox-dev] NetBSD patch 0013: Add support for specifying explicitly INC* and LIB* values

Kamil Rytarowski n54 at gmx.com
Sun Aug 7 11:24:44 GMT 2016


Add support for specifying explicitly INC* and LIB* values

This addresses use-case of pkgsrc and NetBSD.
With this pair we need to specify explicitly include and libraries
options in order to pass RPATH values.

NetBSD and pkgsrc don't use ldconfig, so every executable needs to
pass in its configuration (bundled ELF parameters) RPATH.

Example usage in a package in pkgsrc for X11:
CONFIGURE_ARGS+=        --with-x11-incset="-I${X11BASE}/include"
CONFIGURE_ARGS+=
--with-x11-libset="${COMPILER_RPATH_FLAG}${X11BASE}/lib -L${X11BASE}/lib
-lXext -lX11"

X11BASE can vary from configuration to configuration (X11 native
on the host's base or modular version within pkgsrc) so
autodetecting this sort of information isn't reliable.

To address these needs, allow to specify explicity desired INC* and
LIB* values.

With this patch applied we can mostly pass configure on NetBSD.
Other changes will be proposed afterwards.

The default behavior is unchanged for current customers.

This patch is MIT-licensed.

Author: Kamil Rytarowski
-------------- next part --------------
Add support for specifying explicitly INC* and LIB* values

This addresses use-case of pkgsrc and NetBSD.
With this pair we need to specify explicitly include and libraries
options in order to pass RPATH values.

NetBSD and pkgsrc don't use ldconfig, so every executable needs to
pass in its configuration (bundled ELF parameters) RPATH.

Example usage in a package in pkgsrc for X11:
CONFIGURE_ARGS+=        --with-x11-incset="-I${X11BASE}/include"
CONFIGURE_ARGS+=        --with-x11-libset="${COMPILER_RPATH_FLAG}${X11BASE}/lib -L${X11BASE}/lib -lXext -lX11"

X11BASE can vary from configuration to configuration (X11 native
on the host's base or modular version within pkgsrc) so
autodetecting this sort of information isn't reliable.

To address these needs, allow to specify explicity desired INC* and
LIB* values.

With this patch applied we can mostly pass configure on NetBSD.
Other changes will be proposed afterwards.

The default behavior is unchanged for current customers.

This patch is MIT-licensed.

Author: Kamil Rytarowski

Index: configure
===================================================================
--- configure	(wersja 63022)
+++ configure	(kopia robocza)
@@ -2126,8 +2127,8 @@
         echo "compiling the following source file:" >> $LOG
         cat $ODIR.tmp_src.cc >> $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
-        $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" $PYTHONLINKEXTRA >> $LOG
+        $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so $PYTHONLINKEXTRA >> $LOG 2>&1
         if [ $? -eq 0 ]; then
           found=1
           break
@@ -2605,6 +2606,70 @@
       INCCRYPTO="-I${OPENSSLDIR}/include"
       LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a"
       ;;
+    --with-openssl-incset=*)
+      OPENSSLINCSET=`echo $option | cut -d'=' -f2`
+      INCCRYPTO="${OPENSSLINCSET}"
+      ;;
+    --with-openssl-libset=*)
+      OPENSSLLIBSET=`echo $option | cut -d'=' -f2`
+      LIBCRYPTO="${OPENSSLLIBSET}"
+      ;;
+    --with-curl-incset=*)
+      CURLINCSET=`echo $option | cut -d'=' -f2`
+      INCCURL="${CURLINCSET}"
+      ;;
+    --with-curl-libset=*)
+      CURLLIBSET=`echo $option | cut -d'=' -f2`
+      LIBCURL="${CURLLIBSET}"
+      ;;
+    --with-zlib-incset=*)
+      ZINCSET=`echo $option | cut -d'=' -f2`
+      INCZ="${ZINCSET}"
+      ;;
+    --with-zlib-libset=*)
+      ZLIBSET=`echo $option | cut -d'=' -f2`
+      LIBZ="${ZLIBSET}"
+      ;;
+    --with-x11-incset=*)
+      X11INCSET=`echo $option | cut -d'=' -f2`
+      INCX11="${X11INCSET}"
+      ;;
+    --with-x11-libset=*)
+      X11LIBSET=`echo $option | cut -d'=' -f2`
+      LIBX11="${X11LIBSET}"
+      ;;
+    --with-pulse-incset=*)
+      PULSEINCSET=`echo $option | cut -d'=' -f2`
+      INCPULSE="${PULSEINCSET}"
+      ;;
+    --with-pulse-libset=*)
+      PULSELIBSET=`echo $option | cut -d'=' -f2`
+      LIBPULSE="${PULSELIBSET}"
+      ;;
+    --with-png-incset=*)
+      PNGINCSET=`echo $option | cut -d'=' -f2`
+      INCPNG="${PNGINCSET}"
+      ;;
+    --with-png-libset=*)
+      PNGLIBSET=`echo $option | cut -d'=' -f2`
+      LIBPNG="${PNGLIBSET}"
+      ;;
+    --with-vpx-incset=*)
+      VPXINCSET=`echo $option | cut -d'=' -f2`
+      INCVPX="${VPXINCSET}"
+      ;;
+    --with-vpx-libset=*)
+      VPXLIBSET=`echo $option | cut -d'=' -f2`
+      LIBVPX="${VPXLIBSET}"
+      ;;
+    --with-python-dirset=*)
+      PYTHONDIRSET=`echo $option | cut -d'=' -f2`
+      PYTHONDIR="${PYTHONDIRSET}"
+      ;;
+    --with-python-linkextraset=*)
+      PYTHONLINKEXTRASET=`echo $option | cut -d'=' -f2`
+      PYTHONLINKEXTRA="${PYTHONLINKEXTRASET}"
+      ;;
     --with-ow-dir=*)
       WATCOM=`echo $option | cut -d'=' -f2`
       ;;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20160807/0186826d/attachment.sig>


More information about the vbox-dev mailing list