enable python3 in libfwnt

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

enable python3 in libfwnt

Remi Pointel
Hi,

this is the diff to build libfwnt with python 3.6 too, to anticipate the
plaso version compatible with python 3.

Ok?

Cheers,

Remi.

libfwnt-20180117.diff (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: enable python3 in libfwnt

Stuart Henderson
On 2018/07/17 13:37, Remi Pointel wrote:
> Hi,
>
> this is the diff to build libfwnt with python 3.6 too, to anticipate the
> plaso version compatible with python 3.

Not a big fan of py2+py3 in the same "libfwnt" package .. is this useful
for anything other than plaso + dependencies? I'm wondering if you can get
away with just switching it to py3..

> Ok?
>
> Cheers,
>
> Remi.

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/libfwnt/Makefile,v
> retrieving revision 1.2
> diff -u -p -u -p -r1.2 Makefile
> --- Makefile 1 Feb 2018 13:24:15 -0000 1.2
> +++ Makefile 17 Jul 2018 11:18:23 -0000
> @@ -5,6 +5,7 @@ COMMENT = library for Windows NT data ty
>  VERSION = 20180117
>  DISTNAME = libfwnt-alpha-${VERSION}
>  PKGNAME = ${DISTNAME:S/-alpha//}
> +REVISION = 0
>  
>  SHARED_LIBS +=  fwnt                       0.0 # 1.0
>  
> @@ -19,14 +20,22 @@ MAINTAINER = Remi Pointel <rpointel@open
>  # LGPLv3+
>  PERMIT_PACKAGE_CDROM = Yes
>  
> -WANTLIB += m pthread util ${MODPY_WANTLIB}
> +WANTLIB += iconv intl m pthread util
> +WANTLIB += python${MODPY_DEFAULT_VERSION_2} python${MODPY_DEFAULT_VERSION_3}m
>  
>  CONFIGURE_STYLE = gnu
> -CONFIGURE_ARGS += --enable-python
> +CONFIGURE_ARGS += --enable-python2 \
> + --enable-python3
> +
> +SUBST_VARS += MODPY_DEFAULT_VERSION_2 MODPY_DEFAULT_VERSION_3
>  
>  WRKDIST = ${WRKDIR}/${PKGNAME}
>  
> -MODULES += lang/python
> +MODULES = lang/python
> +
> +BUILD_DEPENDS = ${RUN_DEPENDS}
> +RUN_DEPENDS = lang/python/${MODPY_DEFAULT_VERSION_2} \
> + lang/python/${MODPY_DEFAULT_VERSION_3}
>  
>  TEST_DEPENDS += shells/bash
>  
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/sysutils/libfwnt/pkg/PLIST,v
> retrieving revision 1.1.1.1
> diff -u -p -u -p -r1.1.1.1 PLIST
> --- pkg/PLIST 12 Feb 2017 06:46:18 -0000 1.1.1.1
> +++ pkg/PLIST 17 Jul 2018 11:18:23 -0000
> @@ -10,7 +10,10 @@ lib/libfwnt.a
>  lib/libfwnt.la
>  @lib lib/libfwnt.so.${LIBfwnt_VERSION}
>  lib/pkgconfig/libfwnt.pc
> -lib/python${MODPY_VERSION}/site-packages/pyfwnt.a
> -lib/python${MODPY_VERSION}/site-packages/pyfwnt.la
> -lib/python${MODPY_VERSION}/site-packages/pyfwnt.so
> +lib/python${MODPY_DEFAULT_VERSION_2}/site-packages/pyfwnt.a
> +lib/python${MODPY_DEFAULT_VERSION_2}/site-packages/pyfwnt.la
> +lib/python${MODPY_DEFAULT_VERSION_2}/site-packages/pyfwnt.so
> +lib/python${MODPY_DEFAULT_VERSION_3}/site-packages/pyfwnt.a
> +lib/python${MODPY_DEFAULT_VERSION_3}/site-packages/pyfwnt.la
> +lib/python${MODPY_DEFAULT_VERSION_3}/site-packages/pyfwnt.so
>  @man man/man3/libfwnt.3