2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright (c) 2021,2022 David Stes
13 # Copyright (c) 2023 Andreas Wacknitz
14 # Copyright (c) 2024 David Stes
17 # The manifest pari.p5m holds no license and copyright info per explicit request from
18 # Bill Allombert from the PARI team
21 include ..
/..
/..
/make-rules
/shared-macros.mk
24 COMPONENT_VERSION
= 2.17.0
26 COMPONENT_SUMMARY
= The PARI Computer Algebra System
27 COMPONENT_PROJECT_URL
= https
://pari.math.u-bordeaux.fr
28 COMPONENT_SRC
= pari-
$(COMPONENT_VERSION
)
29 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
30 COMPONENT_ARCHIVE_HASH
= sha256
:e723e7cef18d08c6ece2283af9a9b4d56077c22b4fce998faaa588d389b1aea8
31 COMPONENT_ARCHIVE_URL
= $(COMPONENT_PROJECT_URL
)/pub
/pari
/unix
/$(COMPONENT_ARCHIVE
)
32 COMPONENT_FMRI
= library
/math
/pari
33 COMPONENT_CLASSIFICATION
= Development
/Other Languages
34 COMPONENT_LICENSE
= GPLv2
35 COMPONENT_LICENSE_FILE
= COPYING
37 include $(WS_MAKE_RULES
)/common.mk
41 # Configure has an option --builddir but this fails when built outside of source tree
42 # The PARI script config/genfunclist uses find -type f and skips symlinks
43 COMPONENT_PRE_CONFIGURE_ACTION
= ( $(CLONEY
) $(SOURCE_DIR
) $(@D
) )
45 # PARI/gp Configure is not autoconf
46 CONFIGURE_SCRIPT
= $(SOURCE_DIR
)/Configure
48 # reset all options because Configure does not understand --sbindir= only --dir
49 CONFIGURE_OPTIONS
= --prefix=$(CONFIGURE_PREFIX
)
50 # PARI/gp installs its 64bit library in /usr/lib
51 CONFIGURE_OPTIONS
+= --libdir=$(USRLIBDIR64
)
52 # multi-threaded libraries (enables tls, or thread local stack)
53 CONFIGURE_OPTIONS
+= --mt
=pthread
54 CONFIGURE_OPTIONS
+= --with-readline
56 CONFIGURE_ENV
+= CFLAGS
="$(CFLAGS)"
58 # all does not work because documentation requires Tex typesetting
59 COMPONENT_BUILD_TARGETS
= gp
61 # dobench is a quicktest, test-all takes more time and also compares gp-static
62 # try to do all regression tests but only on the dynamic executable gp-dyn
63 COMPONENT_TEST_TARGETS
= dyntest-all
65 # I believe PARI measures with test-all diffs between static and dyn linked gp
66 # the test script is in : src/test/dotest
67 # I think it prints timing information and checks for correctness
68 # the timing info could be useful but for our purprose remove/transform it
69 COMPONENT_TEST_TRANSFORMS
+= '-e "s/gp-sta..TIME=[ ]*[0-9]*//g"'
70 COMPONENT_TEST_TRANSFORMS
+= '-e "s/gp-dyn..TIME=[ ]*[0-9]*//g"'
71 COMPONENT_TEST_TRANSFORMS
+= '-e "/Total bench/d"'
73 # gmake test dependencies
74 TEST_REQUIRED_PACKAGES
+= library
/math
/pari-elldata
76 # Auto-generated dependencies
77 REQUIRED_PACKAGES
+= $(READLINE_PKG
)
78 REQUIRED_PACKAGES
+= library
/gmp
79 REQUIRED_PACKAGES
+= runtime
/perl
80 REQUIRED_PACKAGES
+= system
/library
81 REQUIRED_PACKAGES
+= system
/library
/math
82 REQUIRED_PACKAGES
+= x11
/library
/libx11