Friday, October 26, 2018

Re: gmpxx, productivity/libalkimia [Re: CVS: cvs.openbsd.org: ports]

On Fri, Oct 26, 2018 at 03:59:55PM +0100, Stuart Henderson wrote:
> On 2018/10/24 09:21, Stuart Henderson wrote:
> > CVSROOT: /cvs
> > Module name: ports
> > Changes by: sthen@cvs.openbsd.org 2018/10/24 09:21:56
> >
> > Modified files:
> > devel/gmp : Makefile
> > devel/gmp/pkg : PLIST
> >
> > Log message:
> > disable gmpxx (c++ library), it isn't used in ports or enabled by default upstream
> > ok naddy@
> >
>
> Annoyingly it turns out that productivity/libalkimia uses the gmpxx.h
> header but not the library from gmp's C++ support.
>
> This gives a choice between a dirty option (install gmpxx.h anyway)
> and the messy option below. I think I've got the bootstrap parts right
> but a pair of eyes that understands it better than me wouldn't go
> amiss :)
>
> (bumps in dependent ports not shown here but also needed).
>
> Index: devel/gmp/Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/gmp/Makefile,v
> retrieving revision 1.37
> diff -u -p -r1.37 Makefile
> --- devel/gmp/Makefile 24 Oct 2018 15:21:56 -0000 1.37
> +++ devel/gmp/Makefile 26 Oct 2018 14:57:53 -0000
> @@ -1,10 +1,16 @@
> # $OpenBSD: Makefile,v 1.37 2018/10/24 15:21:56 sthen Exp $
>
> -COMMENT= library for arbitrary precision arithmetic
> +COMMENT-main= library for arbitrary precision arithmetic
> +COMMENT-gmpxx= C++ library for arbitrary precision arithmetic
>
> DISTNAME= gmp-6.1.2
> -REVISION = 2
> +MULTI_PACKAGES= -main -gmpxx
> +PKGNAME-main= ${DISTNAME}
> +PKGNAME-gmpxx= gmpxx-6.1.2
> +
> +REVISION = 3
> SHARED_LIBS += gmp 10.0 # 13.2
> +SHARED_LIBS += gmpxx 2.0 # 9.2
> CATEGORIES= devel math
>
> HOMEPAGE= https://gmplib.org/
> @@ -15,11 +21,25 @@ EXTRACT_SUFX= .tar.xz
> # LGPLv3+
> PERMIT_PACKAGE_CDROM= Yes
>
> +WANTLIB-main= # empty
> +WANTLIB-gmpxx= gmp m ${COMPILER_LIBCXX}
> +
> +LIB_DEPENDS-gmpxx= ${BASE_PKGPATH},-main
> +
> +PSEUDO_FLAVORS= no_gmpxx bootstrap
> +FLAVOR?= no_gmpxx bootstrap
> +
> MASTER_SITES= https://gmplib.org/download/gmp/ \
> ${MASTER_SITE_GNU:=gmp/}
>
> CONFIGURE_STYLE=autoconf
> AUTOCONF_VERSION=2.69
> +
> +.include <bsd.port.arch.mk>
> +.if ${BUILD_PACKAGES:M-gmpxx}
> +CONFIGURE_ARGS= --enable-cxx
> +.endif
> +
> # Don't try to optimize for the local CPU submodel
> CONFIGURE_ARGS+=--build=${MACHINE_ARCH}-unknown-openbsd${OSrev}
>
> Index: devel/gmp/pkg/DESCR
> ===================================================================
> RCS file: devel/gmp/pkg/DESCR
> diff -N devel/gmp/pkg/DESCR
> --- devel/gmp/pkg/DESCR 1 Nov 2006 18:43:09 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,17 +0,0 @@
> -GNU MP is a library for arbitrary precision arithmetic, operating on
> -signed integers, rational numbers, and floating point numbers. It has a
> -rich set of functions, and the functions have a regular interface.
> -
> -GNU MP is designed to be as fast as possible, both for small operands and
> -for huge operands. The speed is achieved by using fullwords as the basic
> -arithmetic type, by using fast algorithms, by carefully optimized assembly
> -code for the most common inner loops for a lots of CPUs, and by a general
> -emphasis on speed (instead of simplicity or elegance).
> -
> -The speed of GNU MP is believed to be faster than any other similar
> -library. The advantage for GNU MP increases with the operand sizes for
> -certain operations, since GNU MP in many cases has asymptotically faster
> -algorithms.
> -
> -The mpfr library is no longer bundled with gmp, but exists as a separate
> -package instead.
> Index: devel/gmp/pkg/DESCR-gmpxx
> ===================================================================
> RCS file: devel/gmp/pkg/DESCR-gmpxx
> diff -N devel/gmp/pkg/DESCR-gmpxx
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ devel/gmp/pkg/DESCR-gmpxx 26 Oct 2018 14:57:53 -0000
> @@ -0,0 +1,5 @@
> +GNU MP is a library for arbitrary precision arithmetic, operating on
> +signed integers, rational numbers, and floating point numbers. It has a
> +rich set of functions, and the functions have a regular interface.
> +
> +This subpackage contains "gmpxx", the C++ support.
> Index: devel/gmp/pkg/DESCR-main
> ===================================================================
> RCS file: devel/gmp/pkg/DESCR-main
> diff -N devel/gmp/pkg/DESCR-main
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ devel/gmp/pkg/DESCR-main 26 Oct 2018 14:57:53 -0000
> @@ -0,0 +1,17 @@
> +GNU MP is a library for arbitrary precision arithmetic, operating on
> +signed integers, rational numbers, and floating point numbers. It has a
> +rich set of functions, and the functions have a regular interface.
> +
> +GNU MP is designed to be as fast as possible, both for small operands and
> +for huge operands. The speed is achieved by using fullwords as the basic
> +arithmetic type, by using fast algorithms, by carefully optimized assembly
> +code for the most common inner loops for a lots of CPUs, and by a general
> +emphasis on speed (instead of simplicity or elegance).
> +
> +The speed of GNU MP is believed to be faster than any other similar
> +library. The advantage for GNU MP increases with the operand sizes for
> +certain operations, since GNU MP in many cases has asymptotically faster
> +algorithms.
> +
> +The mpfr library is no longer bundled with gmp, but exists as a separate
> +package instead.
> Index: devel/gmp/pkg/PLIST
> ===================================================================
> RCS file: devel/gmp/pkg/PLIST
> diff -N devel/gmp/pkg/PLIST
> --- devel/gmp/pkg/PLIST 24 Oct 2018 15:21:56 -0000 1.9
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,6 +0,0 @@
> -@comment $OpenBSD: PLIST,v 1.9 2018/10/24 15:21:56 sthen Exp $
> -include/gmp.h
> -@info info/gmp.info
> -lib/libgmp.a
> -lib/libgmp.la
> -@lib lib/libgmp.so.${LIBgmp_VERSION}
> Index: devel/gmp/pkg/PLIST-gmpxx
> ===================================================================
> RCS file: devel/gmp/pkg/PLIST-gmpxx
> diff -N devel/gmp/pkg/PLIST-gmpxx
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ devel/gmp/pkg/PLIST-gmpxx 26 Oct 2018 14:57:53 -0000
> @@ -0,0 +1,6 @@
> +@comment $OpenBSD: PLIST,v 1.9 2018/10/24 15:21:56 sthen Exp $
> +@conflict gmp-<6.1.2p2
> +include/gmpxx.h
> +lib/libgmpxx.a
> +lib/libgmpxx.la
> +@lib lib/libgmpxx.so.${LIBgmpxx_VERSION}
> Index: devel/gmp/pkg/PLIST-main
> ===================================================================
> RCS file: devel/gmp/pkg/PLIST-main
> diff -N devel/gmp/pkg/PLIST-main
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ devel/gmp/pkg/PLIST-main 26 Oct 2018 14:57:53 -0000
> @@ -0,0 +1,7 @@
> +@comment $OpenBSD: PLIST,v 1.9 2018/10/24 15:21:56 sthen Exp $
> +@pkgpath devel/gmp
> +include/gmp.h
> +@info info/gmp.info
> +lib/libgmp.a
> +lib/libgmp.la
> +@lib lib/libgmp.so.${LIBgmp_VERSION}
> Index: productivity/libalkimia/Makefile
> ===================================================================
> RCS file: /cvs/ports/productivity/libalkimia/Makefile,v
> retrieving revision 1.7
> diff -u -p -r1.7 Makefile
> --- productivity/libalkimia/Makefile 27 Jul 2017 10:05:20 -0000 1.7
> +++ productivity/libalkimia/Makefile 26 Oct 2018 14:57:53 -0000
> @@ -5,7 +5,7 @@ HOMEPAGE = http://kmymoney2.sourceforge
> MAINTAINER = KDE porting team <openbsd-kde@googlegroups.com>
> V = 5.0.0
> DISTNAME = libalkimia-$V
> -REVISION = 0
> +REVISION = 1
>
> SHARED_LIBS = alkimia 1.0 # 5.0
>
> @@ -23,6 +23,7 @@ KDE4_ONLY = Yes
>
> BUILD_DEPENDS = ${MODKDE4_DEP_DIR}/libs
> LIB_DEPENDS = devel/gmp
> +BUILD_DEPENDS = devel/gmp,,-gmpxx
>
> CONFIGURE_ARGS += -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen:Bool=Yes
> CXXFLAGS += -I${LOCALBASE}/include
This is almost what I sent you the other day, except that I would
leave the default flavor empty, and use the bootstrap flavor where
it's really needed.

Now that you switched stuff to use COMPILER everytime C++ is involved,
you *also* want a COMPILER line in the !bootstrap branch...

No comments:

Post a Comment