Thursday, May 31, 2018

Re: PHP cleaner patch for preventing libodbc linking to SAPI

On 2018/05/31 13:53, Martijn van Duren wrote:
> The current patch removes the check altogether, this patch adds an
> extra check to make sure libodbc isn't linked to the SAPIs.
>
> This is similar to how other libraries setup the
> PHP_ADD_LIBRARY_WITH_PATH in their config.m4.

Seems an unnecessary change to the port, perhaps upstream will take it though.

> martijn@
>
> Index: 5.6/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/php/5.6/Makefile,v
> retrieving revision 1.72
> diff -u -p -r1.72 Makefile
> --- 5.6/Makefile 27 May 2018 22:05:50 -0000 1.72
> +++ 5.6/Makefile 31 May 2018 11:50:00 -0000
> @@ -4,7 +4,7 @@ BROKEN-alpha= pcre_jit_compile.c:65:2: e
>
> PV= 5.6
> V= ${PV}.36
> -REVISION= 4
> +REVISION= 5
>
> MASTER_SITES0= https://download.suhosin.org/
>
> Index: 5.6/patches/patch-ext_odbc_config_m4
> ===================================================================
> RCS file: /cvs/ports/lang/php/5.6/patches/patch-ext_odbc_config_m4,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-ext_odbc_config_m4
> --- 5.6/patches/patch-ext_odbc_config_m4 25 Apr 2015 16:20:29 -0000 1.3
> +++ 5.6/patches/patch-ext_odbc_config_m4 31 May 2018 11:50:00 -0000
> @@ -1,14 +1,25 @@
> $OpenBSD: patch-ext_odbc_config_m4,v 1.3 2015/04/25 16:20:29 robert Exp $
>
> -don't link php binary with iodbc
> +Unpatched some configure conditions can link libodbc to the SAPI.
>
> ---- ext/odbc/config.m4.orig.port Wed Apr 15 20:05:57 2015
> -+++ ext/odbc/config.m4 Sat Apr 25 18:10:11 2015
> -@@ -396,7 +396,6 @@ PHP_ARG_WITH(iodbc,,
> +Index: ext/odbc/config.m4
> +--- ext/odbc/config.m4.orig
> ++++ ext/odbc/config.m4
> +@@ -396,7 +396,7 @@ PHP_ARG_WITH(iodbc,,
> AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
> fi
> if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libiodbc ; then
> - PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
> ++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR, IODBC_SHARED_LIBADD)
> ODBC_TYPE=iodbc
> ODBC_INCLUDE=`$PKG_CONFIG --cflags-only-I libiodbc`
> ODBC_LFLAGS=`$PKG_CONFIG --libs-only-L libiodbc`
> +@@ -409,7 +409,7 @@ PHP_ARG_WITH(iodbc,,
> + if test "$PHP_IODBC" = "yes"; then
> + PHP_IODBC=/usr/local
> + fi
> +- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
> ++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR, IODBC_SHARED_LIBADD)
> + PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
> + ODBC_TYPE=iodbc
> + ODBC_INCLUDE=-I$PHP_IODBC/include
> Index: 7.0/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/php/7.0/Makefile,v
> retrieving revision 1.55
> diff -u -p -r1.55 Makefile
> --- 7.0/Makefile 27 May 2018 22:05:50 -0000 1.55
> +++ 7.0/Makefile 31 May 2018 11:50:00 -0000
> @@ -2,7 +2,7 @@
>
> PV= 7.0
> V= ${PV}.30
> -REVISION= 4
> +REVISION= 5
>
> BUILD_DEPENDS+= devel/bison
>
> Index: 7.0/patches/patch-ext_odbc_config_m4
> ===================================================================
> RCS file: /cvs/ports/lang/php/7.0/patches/patch-ext_odbc_config_m4,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 patch-ext_odbc_config_m4
> --- 7.0/patches/patch-ext_odbc_config_m4 14 Dec 2015 17:58:45 -0000 1.1.1.1
> +++ 7.0/patches/patch-ext_odbc_config_m4 31 May 2018 11:50:00 -0000
> @@ -1,14 +1,25 @@
> $OpenBSD: patch-ext_odbc_config_m4,v 1.1.1.1 2015/12/14 17:58:45 robert Exp $
>
> -don't link php binary with iodbc
> +Unpatched some configure conditions can link libodbc to the SAPI.
>
> ---- ext/odbc/config.m4.orig.port Wed Apr 15 20:05:57 2015
> -+++ ext/odbc/config.m4 Sat Apr 25 18:10:11 2015
> -@@ -396,7 +396,6 @@ PHP_ARG_WITH(iodbc,,
> +Index: ext/odbc/config.m4
> +--- ext/odbc/config.m4.orig
> ++++ ext/odbc/config.m4
> +@@ -396,7 +396,7 @@ PHP_ARG_WITH(iodbc,,
> AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
> fi
> if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libiodbc ; then
> - PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
> ++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR, IODBC_SHARED_LIBADD)
> ODBC_TYPE=iodbc
> ODBC_INCLUDE=`$PKG_CONFIG --cflags-only-I libiodbc`
> ODBC_LFLAGS=`$PKG_CONFIG --libs-only-L libiodbc`
> +@@ -409,7 +409,7 @@ PHP_ARG_WITH(iodbc,,
> + if test "$PHP_IODBC" = "yes"; then
> + PHP_IODBC=/usr/local
> + fi
> +- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
> ++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR, IODBC_SHARED_LIBADD)
> + PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
> + ODBC_TYPE=iodbc
> + ODBC_INCLUDE=-I$PHP_IODBC/include
>

No comments:

Post a Comment