Stuart Henderson <st...@openbsd.org> writes: > Needed to update coccinelle (attempts to patch the bundled copy of > parmap in coccinelle haven't worked out too well). > > OK to import? > > -- -- > Parmap is a minimalistic library allowing to exploit multicore > architecture for OCaml programs with minimal modifications: if you want > to use your many cores to accelerate an operation which happens to be a > map, fold or map/fold (map-reduce), just use Parmap's parmap, parfold > and parmapfold primitives in place of the standard List.map and friends, > and specify the number of subprocesses to use by the optional parameter > ~ncores. > -- -- >
I would like to avoid ONLY_FOR_ARCHS = ${OCAML_NATIVE_ARCHS}. Here's an updated tarball. Bonus: a weird-looking manpage! I can't test it on a non-native arch right now. ok jca@ if it packages there.
ocaml-parmap.tgz
Description: Binary data
diff -pruN ocaml-parmap.orig/Makefile ocaml-parmap/Makefile --- ocaml-parmap.orig/Makefile Thu Sep 10 17:39:15 2015 +++ ocaml-parmap/Makefile Fri Sep 11 21:36:36 2015 @@ -1,8 +1,5 @@ # $OpenBSD: Makefile,v 1.8 2014/10/30 23:39:23 sthen Exp $ -SHARED_ONLY = Yes -ONLY_FOR_ARCHS = ${OCAML_NATIVE_ARCHS} - COMMENT = OCaml parallel map primitive for multicores CATEGORIES = devel @@ -27,5 +24,7 @@ CONFIGURE_STYLE = gnu TEST_TARGET = tests TEST_DEPENDS = ${BASE_PKGPATH} + +FAKE_FLAGS = DESTDIR=${WRKINST}${TRUEPREFIX} .include <bsd.port.mk> diff -pruN ocaml-parmap.orig/patches/patch-Makefile_in ocaml-parmap/patches/patch-Makefile_in --- ocaml-parmap.orig/patches/patch-Makefile_in Thu Jan 1 01:00:00 1970 +++ ocaml-parmap/patches/patch-Makefile_in Fri Sep 11 21:09:48 2015 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- Makefile.in.orig Fri Sep 11 21:09:21 2015 ++++ Makefile.in Fri Sep 11 21:09:44 2015 +@@ -86,7 +86,7 @@ install: $(LIBS) META + $(INSTALL) -patch-version $(VERSION) $(NAME) $(INSTALL_STUFF) + (cd _build; ocamldoc -man -man-mini parmap.ml parmap.mli) + test -d $(MANDIR) || mkdir -p $(MANDIR) +- cp -a _build/Parmap.3o $(MANDIR) ++ cp -p _build/Parmap.3o $(MANDIR) + + uninstall: + $(UNINSTALL) $(NAME) diff -pruN ocaml-parmap.orig/patches/patch-configure ocaml-parmap/patches/patch-configure --- ocaml-parmap.orig/patches/patch-configure Thu Jan 1 01:00:00 1970 +++ ocaml-parmap/patches/patch-configure Fri Sep 11 21:06:59 2015 @@ -0,0 +1,14 @@ +$OpenBSD$ +--- configure.orig Fri Sep 11 21:06:20 2015 ++++ configure Fri Sep 11 21:06:49 2015 +@@ -4379,8 +4379,8 @@ _ACEOF + ac_config_headers="$ac_config_headers config.h" + + +-t=`$OCAMLBUILD -use-ocamlfind &> /dev/null; echo $?` +-if test $t == 0 ; then ++t=`$OCAMLBUILD -use-ocamlfind >/dev/null 2>&1; echo $?` ++if test "$t" = 0 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ocaml version $OCAMLVERSION. Use standard Makefile" >&5 + $as_echo "ocaml version $OCAMLVERSION. Use standard Makefile" >&6; } + ac_config_files="$ac_config_files Makefile" diff -pruN ocaml-parmap.orig/patches/patch-configure_ac ocaml-parmap/patches/patch-configure_ac --- ocaml-parmap.orig/patches/patch-configure_ac Thu Jan 1 01:00:00 1970 +++ ocaml-parmap/patches/patch-configure_ac Fri Sep 11 21:07:13 2015 @@ -0,0 +1,14 @@ +$OpenBSD$ +--- configure.ac.orig Fri Sep 11 21:00:06 2015 ++++ configure.ac Fri Sep 11 21:00:31 2015 +@@ -26,8 +26,8 @@ AC_CHECK_DECLS([thread_policy_set], [], [], [[ + + AC_CONFIG_HEADERS([config.h]) + +-t=`$OCAMLBUILD -use-ocamlfind &> /dev/null; echo $?` +-if test $t == 0 ; then ++t=`$OCAMLBUILD -use-ocamlfind >/dev/null 2>&1; echo $?` ++if test "$t" = 0 ; then + AC_MSG_RESULT(ocaml version $OCAMLVERSION. Use standard Makefile) + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT diff -pruN ocaml-parmap.orig/pkg/PFRAG.native ocaml-parmap/pkg/PFRAG.native --- ocaml-parmap.orig/pkg/PFRAG.native Thu Jan 1 01:00:00 1970 +++ ocaml-parmap/pkg/PFRAG.native Fri Sep 11 21:16:33 2015 @@ -0,0 +1,2 @@ +@comment $OpenBSD$ +@bin lib/ocaml/parmap/parmap.cmxs diff -pruN ocaml-parmap.orig/pkg/PFRAG.shared ocaml-parmap/pkg/PFRAG.shared --- ocaml-parmap.orig/pkg/PFRAG.shared Thu Jan 1 01:00:00 1970 +++ ocaml-parmap/pkg/PFRAG.shared Fri Sep 11 21:14:11 2015 @@ -0,0 +1,2 @@ +@comment $OpenBSD$ +lib/ocaml/stublibs/dllparmap_stubs.so diff -pruN ocaml-parmap.orig/pkg/PLIST ocaml-parmap/pkg/PLIST --- ocaml-parmap.orig/pkg/PLIST Thu Jul 16 01:42:02 2015 +++ ocaml-parmap/pkg/PLIST Fri Sep 11 21:16:13 2015 @@ -1,20 +1,19 @@ @comment $OpenBSD$ +%%SHARED%% +%%native%% lib/ocaml/parmap/ lib/ocaml/parmap/META lib/ocaml/parmap/bytearray.cmi lib/ocaml/parmap/bytearray.mli -lib/ocaml/parmap/bytearray_stubs.o -lib/ocaml/parmap/libparmap.a +lib/ocaml/parmap/libparmap_stubs.a lib/ocaml/parmap/parmap.a lib/ocaml/parmap/parmap.cma lib/ocaml/parmap/parmap.cmi lib/ocaml/parmap/parmap.cmxa -@bin lib/ocaml/parmap/parmap.cmxs lib/ocaml/parmap/parmap.mli lib/ocaml/parmap/parmap_utils.cmi lib/ocaml/parmap/parmap_utils.mli lib/ocaml/parmap/setcore.cmi lib/ocaml/parmap/setcore.mli -lib/ocaml/parmap/setcore_stubs.o -lib/ocaml/stublibs/dllparmap.so -lib/ocaml/stublibs/dllparmap.so.owner +@comment lib/ocaml/stublibs/dllparmap_stubs.so.owner +@man man/man3/Parmap.3o -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE