Here is a (hopefully) better update of math/pari. Changes include:
- version 2.11 -> 2.11.1 (bugfix)
- restrict arch to amd64 (aarch64 seems to be the correct name for ports?),
arm64 and i386. I don't have hardware to test arm64 and i386, so it would be
great if someone could (as in my previous attempt the port builds with a GMP
kernel).
- force clang instead of gcc
- build shared library, which is useful for gp2c (the port I sent on Nov 29 now
works as expected). pari versions are of the form major.minor.patch where
minor is always odd for stable releases (even for the development version). I
used (100*major+minor).patch for the OpenBSD lib version, not sure if that's
ideal. Also, pari creates a symlink named libpari.so to
libpari-gmp.so.major.minor. There are few other ports doing that, but maybe
that's not desirable on OpenBSD?
- make the build process honor optimization flags from CFLAGS instead of new
ones
On Thu, Nov 29, 2018 at 11:04:28PM +0100, Olivier Taïbi wrote:
> On Thu, Nov 29, 2018 at 09:57:54AM -0500, Daniel Dickman wrote:
> >
> >
> > > On Nov 23, 2018, at 5:40 PM, Olivier Taïbi <oli@olitb.net> wrote:
> > >
> > >
> > > Here is an attempt at an updated port. It now depends on gmp (on pari's
> > > website they recommend the gmp kernel). The use of gmake is probably
> > > overkill.
> >
> > Thanks. I'll take a look. I also have an update on my end. Will review and merge our updates.
> >
> > Then we can check about the i386 problem after the update (https://marc.info/?l=openbsd-ports&m=154315956117631&w=2)
>
> Does this problem still occur if using the gmp kernel (this is what the
> port I sent uses)? See
> https://pari.math.u-bordeaux.fr/faq.html#whichkernel
> I don't have any i386 to test this, unfortunately.
>
> I am also testing gp2c (attached port), which seems to work on my amd64
> machine (I am using pari for my research, but I am very far from using
> everything in the library), except that gp2c-run looks for a few
> variables in lib/pari/pari.cfg to link compiled scripts (for example
> DLLD and DLLDFLAGS), and these variables are empty with the port of pari
> I sent before. They are set in pari's config/get_dlld. We should add
> openbsd in several case statements there, I guess DLLD should be cc but
> I'm not sure about the flags. I used
> cc -o %s.so -g -O3 -Wall %s.o -L/usr/local/lib/ -lpari
> and it seems to work.
diff -uNprx CVS /usr/ports/math/pari/Makefile /build/usr/ports/math/pari/Makefile
--- /usr/ports/math/pari/Makefile Sat Feb 16 18:34:09 2019
+++ /build/usr/ports/math/pari/Makefile Sun Mar 3 19:58:40 2019
@@ -1,39 +1,41 @@
-# $OpenBSD: Makefile,v 1.15 2019/01/29 11:43:09 sthen Exp $
+# $OpenBSD: Makefile,v 1.14 2015/02/16 22:57:10 naddy Exp $
COMMENT= number theory-oriented computer algebra system
-DISTNAME= pari-2.1.7
-REVISION= 0
-EXTRACT_SUFX= .tgz
+DISTNAME= pari-2.11.1
+EXTRACT_SUFX= .tar.gz
CATEGORIES= math
-HOMEPAGE= http://pari.math.u-bordeaux.fr/
+HOMEPAGE= https://pari.math.u-bordeaux.fr/
+ONLY_FOR_ARCHS= aarch64 amd64 i386
+
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
-WANTLIB= X11 c m ncurses readline
+WANTLIB= X11 c gmp m ncurses readline
-MASTER_SITES= http://pari.math.u-bordeaux.fr/pub/pari/unix/OLD/2.1/
+MASTER_SITES= https://pari.math.u-bordeaux.fr/pub/pari/unix/
BUILD_DEPENDS= print/texlive/base
+LIB_DEPENDS= devel/gmp
+
+SHARED_LIBS += pari-gmp 0.0 # 211.1
+
CONFIGURE_SCRIPT= Configure
CONFIGURE_STYLE= simple
CONFIGURE_ENV= CFLAGS="${CFLAGS}"
CONFIGURE_ARGS+= --datadir=${PREFIX}/share/pari \
- --miscdir=${PREFIX}/share/pari \
--prefix=${PREFIX} \
- --host=${ARCH}
+ --with-gmp=${PREFIX}
-TEST_TARGET= dobench
+TEST_TARGET= test-all
-.if ${MACHINE_ARCH} == i386
-CFLAGS+= -Wl,-znotext
-.endif
-
post-install:
+ mv ${PREFIX}/share/man/man1/* ${PREFIX}/man/man1/
mv ${PREFIX}/share/pari/doc ${PREFIX}/share/doc/pari
- mv ${PREFIX}/share/pari/[A-Z]* ${PREFIX}/share/doc/pari
+ mv ${PREFIX}/share/pari/[A-Z]* ${PREFIX}/share/doc/pari/
mv ${PREFIX}/share/pari/examples ${PREFIX}/share/examples/pari
+ mv ${PREFIX}/share/pari/misc ${PREFIX}/share/misc/pari
.include <bsd.port.mk>
diff -uNprx CVS /usr/ports/math/pari/distinfo /build/usr/ports/math/pari/distinfo
--- /usr/ports/math/pari/distinfo Mon Jan 7 20:42:56 2019
+++ /build/usr/ports/math/pari/distinfo Sun Mar 3 19:55:43 2019
@@ -1,2 +1,2 @@
-SHA256 (pari-2.1.7.tgz) = kULyza8wg8iWLxpcK7Dp/okV99lJDAMxKsI2HH6hVfo=
-SIZE (pari-2.1.7.tgz) = 1542137
+SHA256 (pari-2.11.1.tar.gz) = JKmzJKbp+xYfSd2Tqk3D+LuJlslgUO4EaLL5K0Xqysk=
+SIZE (pari-2.11.1.tar.gz) = 4426390
diff -uNprx CVS /usr/ports/math/pari/patches/patch-Configure /build/usr/ports/math/pari/patches/patch-Configure
--- /usr/ports/math/pari/patches/patch-Configure Mon Sep 15 17:11:35 2014
+++ /build/usr/ports/math/pari/patches/patch-Configure Sun Mar 3 19:55:55 2019
@@ -1,49 +1,17 @@
-$OpenBSD: patch-Configure,v 1.3 2014/09/15 15:11:35 landry Exp $
---- Configure.orig Wed Sep 14 13:26:40 2005
-+++ Configure Thu Sep 11 09:10:43 2014
-@@ -246,7 +246,7 @@ fi
- # We might need the following :
- #
- echo Looking for some tools first ...
--list='ld zcat gzip ranlib perl emacs'
-+list='ld zcat gzip ranlib perl'
- pathspace=`echo $PATH | sed -e "s/$dir_sep/ /g" | sed -e 's,\\\\,/,g'`
+$OpenBSD$
+
+Index: Configure
+--- Configure.orig
++++ Configure
+@@ -65,6 +65,11 @@ to aid debugging if Configure makes a mistake. Command
- for file in $list; do
-@@ -844,7 +844,7 @@ if test -n "$__gnuc__"; then
- esac
- ;;
- esac
-- OPTFLAGS="$OPTFLAGS -DGCC_INLINE $warn"
-+ OPTFLAGS="$CFLAGS -DGCC_INLINE $warn"
- DBGFLAGS="-g $warn"
- # Some architectures need -fPIC for building dynamic lib
- case "$osname-$arch" in hpux-*) DLCFLAGS=-fPIC;; esac
-@@ -1009,7 +1009,7 @@ if test "$optimization" = profiling; then DLLD=; else
- # aix-*) DLSUFFIX=a ;; dynamic linking does not work!
- sunos-*) sodest=$VersionMajor$VersionMinor.$patch
- soname=$sodest;;
-- gnu-*|*-alpha|solaris-*|linux-*|freebsd-*)
-+ gnu-*|solaris-*|linux-*|freebsd-*)
- case $libpari_base in
- pari) sodest=$version.$patch;; # released versions
- *) sodest=$patch.0.0;; # unstable versions
-@@ -1047,10 +1047,6 @@ if test -n "$DLLD"; then
- freebsd-*) DLLDFLAGS="-Bshareable -x" ;;
- gnu-*|linux-*) DLLDFLAGS="-shared -soname \$(LIBPARI_SONAME)" ;;
- irix-*) DLLDFLAGS="-shared -elf -no_unresolved -all" ;;
-- *-alpha) DLLDFLAGS="-shared"; EXTRADLLDFLAGS='${LIBS}'
-- case "$optimization" in
-- full) DLLDFLAGS="$DLLDFLAGS -O3" ;;
-- esac;;
- sunos-*) DLLDFLAGS="-assert nodefinitions" ;;
- solaris-*) DLLDFLAGS="-G -h \$(LIBPARI_SONAME)" ;;
- *) DLLD=;;
-@@ -1162,7 +1158,6 @@ extra_flags=
- list=exp2; . ./look
- list=strftime; . ./look
- case "$arch" in
-- alpha) list='times ftime';; # gp-dyn has problems with getrusage
- *) case "$osname" in
- *cygwin*) list='times ftime';; # getrusage based timer always returns 0
- *) list='getrusage times ftime';;
+ EOT
+ exec 5>> $config_log
++# on OpenBSD, force clang instead of gcc
++case "$osname" in
++ openbsd) gcc=;;
++esac
++
+
+ ####################### CONFIGURE - COMPILATION #############################
+ # $_cc_list (includes 'optimization'), extraflag
diff -uNprx CVS /usr/ports/math/pari/patches/patch-config_Makefile_SH /build/usr/ports/math/pari/patches/patch-config_Makefile_SH
--- /usr/ports/math/pari/patches/patch-config_Makefile_SH Thu Jan 1 01:00:00 1970
+++ /build/usr/ports/math/pari/patches/patch-config_Makefile_SH Sun Mar 3 19:55:55 2019
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Index: config/Makefile.SH
+--- config/Makefile.SH.orig
++++ config/Makefile.SH
+@@ -501,9 +501,9 @@ install-lib-dyn-base:
+ $install_implib
+
+ install-lib-dyn-link: install-lib-dyn-base
+- -if test "\$(LIBPARI_DYN)" != "\$(LIBDIR)/\$(LIBPARI_SO)"; then \
++ -if test "\$(LIBPARI_DYN)" != "\$(LIBPARI_SO)"; then \
+ \$(LN) \$(LIBPARI_DYN) \$(LIBDIR)/\$(LIBPARI_SO); fi
+- -if test "\$(LIBPARI_SONAME)" != "\$(LIBPARI_SO)"; then \
++ -if test "\$(LIBPARI_DYN)" != "\$(LIBPARI_SONAME)"; then \
+ \$(LN) \$(LIBPARI_DYN) \$(LIBDIR)/\$(LIBPARI_SONAME); fi
+ install-lib-dyn: \$(LIBPARI_DYN) install-lib-dyn-link
+
diff -uNprx CVS /usr/ports/math/pari/patches/patch-config_get_cc /build/usr/ports/math/pari/patches/patch-config_get_cc
--- /usr/ports/math/pari/patches/patch-config_get_cc Thu Jan 1 01:00:00 1970
+++ /build/usr/ports/math/pari/patches/patch-config_get_cc Sun Mar 3 19:55:55 2019
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+Index: config/get_cc
+--- config/get_cc.orig
++++ config/get_cc
+@@ -81,6 +81,11 @@ if test -z "$__gnuc__"; then
+ . cleanup_exe
+ fi
+
++# no gcc!
++case "$osname" in
++ openbsd) __gnuc__=;;
++esac
++
+ # Which Flags for Compiler ?
+ cflags=
+ ASMINLINE=
+@@ -137,6 +142,7 @@ else
+ sparc*) OPTFLAGS="$OPTFLAGS -xalias_level=any";;
+ esac;;
+ concentrix-*) OPTFLAGS=-Ogi;;
++ openbsd-*) OPTFLAGS=;;
+ *) OPTFLAGS=-O;;
+ esac
+ PRFFLAGS="$PRFFLAGS $OPTFLAGS"
diff -uNprx CVS /usr/ports/math/pari/patches/patch-config_get_dlcflags /build/usr/ports/math/pari/patches/patch-config_get_dlcflags
--- /usr/ports/math/pari/patches/patch-config_get_dlcflags Thu Jan 1 01:00:00 1970
+++ /build/usr/ports/math/pari/patches/patch-config_get_dlcflags Sun Mar 3 19:55:55 2019
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: config/get_dlcflags
+--- config/get_dlcflags.orig
++++ config/get_dlcflags
+@@ -12,6 +12,7 @@ else #assume native compiler
+ case "$osname" in
+ hpux) DLCFLAGS=+z;;
+ solaris) DLCFLAGS=-KPIC;;
++ openbsd) DLCFLAGS=-fPIC;;
+ esac
+ fi
+
diff -uNprx CVS /usr/ports/math/pari/patches/patch-config_get_dlld /build/usr/ports/math/pari/patches/patch-config_get_dlld
--- /usr/ports/math/pari/patches/patch-config_get_dlld Thu Jan 1 01:00:00 1970
+++ /build/usr/ports/math/pari/patches/patch-config_get_dlld Sun Mar 3 19:55:55 2019
@@ -0,0 +1,31 @@
+$OpenBSD$
+
+Index: config/get_dlld
+--- config/get_dlld.orig
++++ config/get_dlld
+@@ -14,6 +14,8 @@ case "$osname" in
+ *STABLE*) sodest=.$version.$patch;; # released version
+ *DEVELOPMENT*) sodest=.$patch.0.0;; # unstable version
+ esac ;;
++ openbsd) sodest=.`expr '(' 100 '*' $VersionMajor ')' '+' $VersionMinor`.$patch
++ soname=$sodest;;
+ sunos) sodest=.$VersionMajor$VersionMinor.$patch
+ soname=$sodest;;
+ hpux) soname= ; sodest= ; DLSUFFIX=sl;;
+@@ -41,7 +43,7 @@ esac
+
+ # if DLLD is defined at this point, respect it, even if do_dll=no
+ if test $do_dll = yes -a -z "$DLLD"; then
+- if test -n "$__gnuc__" -o "$osname" = "solaris"; then
++ if test -n "$__gnuc__" -o "$osname" = "solaris" -o "$osname" = "openbsd"; then
+ DLLD="$CC"
+ else
+ DLLD=$ld # don't take risks
+@@ -77,6 +79,7 @@ if test -n "$DLLD"; then
+ aix) DLLDFLAGS='-r' ;;
+ darwin) DLLDFLAGS="-compatibility_version $compat_ver -current_version $num_ver" ;;
+ freebsd) DLLDFLAGS='-Bshareable -x' ;;
++ openbsd) DLLDFLAGS='-shared' ;;
+ hpux) DLLDFLAGS='-b' ;;
+ irix) DLLDFLAGS='-shared -elf -no_unresolved -all' ;;
+ osf1) DLLDFLAGS='-shared' ;;
diff -uNprx CVS /usr/ports/math/pari/patches/patch-src_test_dotest /build/usr/ports/math/pari/patches/patch-src_test_dotest
--- /usr/ports/math/pari/patches/patch-src_test_dotest Mon Sep 15 17:11:35 2014
+++ /build/usr/ports/math/pari/patches/patch-src_test_dotest Thu Jan 1 01:00:00 1970
@@ -1,8 +0,0 @@
-$OpenBSD: patch-src_test_dotest,v 1.1 2014/09/15 15:11:35 landry Exp $
---- src/test/dotest.orig Thu Sep 11 06:39:25 2014
-+++ src/test/dotest Thu Sep 11 06:39:37 2014
-@@ -180,3 +180,4 @@ can safely ignore the above warning.
- EOT
- fi
- fi
-+exit 1
diff -uNprx CVS /usr/ports/math/pari/pkg/PLIST /build/usr/ports/math/pari/pkg/PLIST
--- /usr/ports/math/pari/pkg/PLIST Mon Sep 15 17:11:35 2014
+++ /build/usr/ports/math/pari/pkg/PLIST Sun Mar 3 19:56:08 2019
@@ -1,10 +1,11 @@
-@comment $OpenBSD: PLIST,v 1.2 2014/09/15 15:11:35 landry Exp $
+@comment $OpenBSD: PLIST,v$
bin/gp
-@bin bin/gp-2.1
+@bin bin/gp-2.11
bin/gphelp
bin/tex2mail
include/pari/
include/pari/genpari.h
+include/pari/mpinl.h
include/pari/pari.h
include/pari/paricast.h
include/pari/paricfg.h
@@ -13,39 +14,45 @@ include/pari/paridecl.h
include/pari/parierr.h
include/pari/parigen.h
include/pari/pariinl.h
-include/pari/pariport.h
+include/pari/parimt.h
+include/pari/parinf.h
+include/pari/pariold.h
+include/pari/paripriv.h
include/pari/paristio.h
include/pari/parisys.h
-include/pari/paritype.h
-lib/libpari.a
-@comment lib/libpari.a.2.1
+include/pari/paritune.h
+@lib lib/libpari-gmp.so.${LIBpari-gmp_VERSION}
+lib/libpari.so
+lib/pari/
+lib/pari/pari.cfg
+@man man/man1/gp-2.11.1
@man man/man1/gp.1
@man man/man1/gphelp.1
@man man/man1/pari.1
@man man/man1/tex2mail.1
share/doc/pari/
-share/doc/pari/AUTHORS
-share/doc/pari/Announce.2.1
-share/doc/pari/CHANGES
-share/doc/pari/COMPAT
-share/doc/pari/COPYING
-share/doc/pari/CVS.txt
-share/doc/pari/MACHINES
-share/doc/pari/Makefile
-share/doc/pari/NEW
-share/doc/pari/README
-share/doc/pari/TODO
+share/doc/pari/INSTALL.dvi
+share/doc/pari/PARI/
+share/doc/pari/PARI/822.pm
share/doc/pari/appa.tex
share/doc/pari/appb.tex
-share/doc/pari/appc.tex
+share/doc/pari/appd.tex
+share/doc/pari/develop.dvi
+share/doc/pari/develop.tex
+share/doc/pari/libpari.dvi
+share/doc/pari/parallel.dvi
share/doc/pari/paricfg.tex
-share/doc/pari/paricfg.tex.in
share/doc/pari/parimacro.tex
share/doc/pari/pdfmacs.tex
+share/doc/pari/refcard-ell.dvi
+share/doc/pari/refcard-lfun.dvi
+share/doc/pari/refcard-mf.dvi
+share/doc/pari/refcard-nf.dvi
share/doc/pari/refcard.dvi
-share/doc/pari/refcard.ps
share/doc/pari/refcard.tex
share/doc/pari/translations
+share/doc/pari/tutorial-mf.dvi
+share/doc/pari/tutorial-mf.tex
share/doc/pari/tutorial.dvi
share/doc/pari/tutorial.tex
share/doc/pari/users.dvi
@@ -55,6 +62,9 @@ share/doc/pari/usersch2.tex
share/doc/pari/usersch3.tex
share/doc/pari/usersch4.tex
share/doc/pari/usersch5.tex
+share/doc/pari/usersch6.tex
+share/doc/pari/usersch7.tex
+share/doc/pari/usersch8.tex
share/examples/pari/
share/examples/pari/EXPLAIN
share/examples/pari/Inputrc
@@ -63,18 +73,19 @@ share/examples/pari/bench.gp
share/examples/pari/cl.gp
share/examples/pari/classno.gp
share/examples/pari/contfrac.gp
+share/examples/pari/extgcd.c
share/examples/pari/lucas.gp
-share/examples/pari/matexp.c
share/examples/pari/rho.gp
share/examples/pari/squfof.gp
share/examples/pari/taylor.gp
+share/man/
+share/man/man1/
+share/misc/pari/
+share/misc/pari/README
+share/misc/pari/color.dft
+share/misc/pari/gpalias
+share/misc/pari/gpflog
+share/misc/pari/gprc.dft
+share/misc/pari/xgp
share/pari/
-share/pari/misc/
-share/pari/misc/README
-share/pari/misc/color.dft
-share/pari/misc/gpalias
-share/pari/misc/gpflog
-share/pari/misc/gprc.dft
-share/pari/misc/new.dic
-share/pari/misc/pari.xpm
-share/pari/misc/xgp
+share/pari/pari.desc
No comments:
Post a Comment