head	1.11;
access;
symbols
	pkgsrc-2026Q1:1.11.0.6
	pkgsrc-2026Q1-base:1.11
	pkgsrc-2025Q4:1.11.0.4
	pkgsrc-2025Q4-base:1.11
	pkgsrc-2025Q3:1.11.0.2
	pkgsrc-2025Q3-base:1.11
	pkgsrc-2025Q2:1.10.0.16
	pkgsrc-2025Q2-base:1.10
	pkgsrc-2025Q1:1.10.0.14
	pkgsrc-2025Q1-base:1.10
	pkgsrc-2024Q4:1.10.0.12
	pkgsrc-2024Q4-base:1.10
	pkgsrc-2024Q3:1.10.0.10
	pkgsrc-2024Q3-base:1.10
	pkgsrc-2024Q2:1.10.0.8
	pkgsrc-2024Q2-base:1.10
	pkgsrc-2024Q1:1.10.0.6
	pkgsrc-2024Q1-base:1.10
	pkgsrc-2023Q4:1.10.0.4
	pkgsrc-2023Q4-base:1.10
	pkgsrc-2023Q3:1.10.0.2
	pkgsrc-2023Q3-base:1.10
	pkgsrc-2023Q2:1.9.0.8
	pkgsrc-2023Q2-base:1.9
	pkgsrc-2023Q1:1.9.0.6
	pkgsrc-2023Q1-base:1.9
	pkgsrc-2022Q4:1.9.0.4
	pkgsrc-2022Q4-base:1.9
	pkgsrc-2022Q3:1.9.0.2
	pkgsrc-2022Q3-base:1.9
	pkgsrc-2022Q2:1.8.0.12
	pkgsrc-2022Q2-base:1.8
	pkgsrc-2022Q1:1.8.0.10
	pkgsrc-2022Q1-base:1.8
	pkgsrc-2021Q4:1.8.0.8
	pkgsrc-2021Q4-base:1.8
	pkgsrc-2021Q3:1.8.0.6
	pkgsrc-2021Q3-base:1.8
	pkgsrc-2021Q2:1.8.0.4
	pkgsrc-2021Q2-base:1.8
	pkgsrc-2021Q1:1.8.0.2
	pkgsrc-2021Q1-base:1.8
	pkgsrc-2020Q4:1.7.0.2
	pkgsrc-2020Q4-base:1.7
	pkgsrc-2020Q3:1.6.0.12
	pkgsrc-2020Q3-base:1.6
	pkgsrc-2020Q2:1.6.0.10
	pkgsrc-2020Q2-base:1.6
	pkgsrc-2020Q1:1.6.0.6
	pkgsrc-2020Q1-base:1.6
	pkgsrc-2019Q4:1.6.0.8
	pkgsrc-2019Q4-base:1.6
	pkgsrc-2019Q3:1.6.0.4
	pkgsrc-2019Q3-base:1.6
	pkgsrc-2019Q2:1.6.0.2
	pkgsrc-2019Q2-base:1.6
	pkgsrc-2019Q1:1.5.0.6
	pkgsrc-2019Q1-base:1.5
	pkgsrc-2018Q4:1.5.0.4
	pkgsrc-2018Q4-base:1.5
	pkgsrc-2018Q3:1.5.0.2
	pkgsrc-2018Q3-base:1.5;
locks; strict;
comment	@# @;


1.11
date	2025.07.03.01.28.19;	author schmonz;	state Exp;
branches;
next	1.10;
commitid	CRqZaAIM5yV7Se1G;

1.10
date	2023.08.14.05.24.49;	author wiz;	state Exp;
branches;
next	1.9;
commitid	LOSB79OLVxvXjIAE;

1.9
date	2022.06.30.11.18.36;	author nia;	state Exp;
branches;
next	1.8;
commitid	AhctUV91Vubws3KD;

1.8
date	2021.02.18.10.08.31;	author schmonz;	state Exp;
branches;
next	1.7;
commitid	ayoWjB7ttlgm3bIC;

1.7
date	2020.12.04.20.45.29;	author nia;	state Exp;
branches;
next	1.6;
commitid	FPz71MqRX3WN0tyC;

1.6
date	2019.04.25.07.33.05;	author maya;	state Exp;
branches;
next	1.5;
commitid	1FEMQBEPb9uTxHkB;

1.5
date	2018.08.09.09.14.16;	author schmonz;	state Exp;
branches;
next	1.4;
commitid	CMnhqOA7auFbsqNA;

1.4
date	2018.07.31.06.34.11;	author schmonz;	state Exp;
branches;
next	1.3;
commitid	tjAH1SLqTnOcRfMA;

1.3
date	2018.07.31.06.24.57;	author schmonz;	state Exp;
branches;
next	1.2;
commitid	OOxrMbIFFXm2OfMA;

1.2
date	2018.07.31.05.38.56;	author schmonz;	state Exp;
branches;
next	1.1;
commitid	Nh2D7nuTP2ofyfMA;

1.1
date	2018.07.29.07.38.48;	author wiz;	state Exp;
branches;
next	;
commitid	7KePbQw5sNdmh0MA;


desc
@@


1.11
log
@djbsort: fix SmartOS build.
@
text
@# $NetBSD: Makefile,v 1.10 2023/08/14 05:24:49 wiz Exp $

DISTNAME=		djbsort-20190516
PKGREVISION=		2
CATEGORIES=		math
MASTER_SITES=		${HOMEPAGE}

MAINTAINER=		schmonz@@NetBSD.org
HOMEPAGE=		https://sorting.cr.yp.to/
COMMENT=		Library for sorting arrays of integers
LICENSE=		public-domain

USE_TOOLS+=		pax

PYTHON_VERSIONS_INCOMPATIBLE=	27

REPLACE_PYTHON=		build test upgrade verif/decompose \
			verif/minmax verif/tryinput verif/unroll
SUBST_CLASSES+=		python3
SUBST_STAGE.python3=	do-configure
SUBST_FILES.python3=	verif/verifymany
SUBST_SED.python3=	-e 's|time python3|time ${PYTHONBIN}|g'

SHAREDIR=		share/${PKGBASE}
FILES_SUBST+=		DIFF=${DIFF:Q}
FILES_SUBST+=		INSTALL_DATA=${INSTALL_DATA:Q}
FILES_SUBST+=		PSEUDO_PLIST=${PSEUDO_PLIST:Q}
FILES_SUBST+=		SHAREDIR=${SHAREDIR:Q}

INSTALLATION_DIRS=	include lib ${SHAREDIR}

PLIST_SRC=		${WRKDIR}/PLIST_DYNAMIC

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "SunOS"
TOOL_DEPENDS+=		binutils>=0:../../devel/binutils
TOOLS_CREATE+=		nm
TOOLS_PATH.nm=		${PREFIX}/bin/gnm
.endif

pre-configure:
	cd ${WRKSRC} && rm -f *.orig

do-build:
	cd ${WRKSRC} && ./build

post-build:
	${CP} pseudo-PLIST ${WRKSRC}
	cd ${WRKSRC} && ${FIND} . -type f | ${SORT} | ${SED} -e 's|^\.|${SHAREDIR}|g' > ${WRKDIR}/PLIST_DYNAMIC

do-install:
	cd ${WRKSRC} && pax -rw -pp -v . ${DESTDIR}${PREFIX}/${SHAREDIR}

.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"
@


1.10
log
@*: recursive bump for Python 3.11 as new default
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2022/06/30 11:18:36 nia Exp $
d34 8
@


1.9
log
@*: Revbump packages that use Python at runtime without a PKGNAME prefix
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2021/02/18 10:08:31 schmonz Exp $
d4 1
a4 1
PKGREVISION=		1
@


1.8
log
@Update to 20190516. From the changelog:

Benchmarking:
- Speed tests now call cpucycles() before setting resource limits. This
  is important on platforms where cpucycles() needs to read files.

Verification:
- Support for SignExt and several more peephole optimizations, working
  towards support for simpler symbolic-execution backend. Various
  updates to work with angr8 and python3.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2020/12/04 20:45:29 nia Exp $
d4 1
@


1.7
log
@Revbump packages with a runtime Python dep but no version prefix.

For the Python 3.8 default switch.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2019/04/25 07:33:05 maya Exp $
d3 1
a3 2
DISTNAME=		djbsort-20180729
PKGREVISION=		3
a11 2
DEPENDS+=		python27-[0-9]*:../../lang/python27

d14 1
a14 6
REPLACE_INTERPRETER+=	python27
REPLACE.python27.old=	.*python2\{0,1\}[^ ]*
REPLACE.python27.new=	${LOCALBASE}/bin/python2.7
REPLACE_FILES.python27=	verif/decompose verif/minmax verif/unroll

PYTHON_VERSIONS_INCOMPATIBLE=	27	# so a python3 will be auto-selected
d16 2
a17 1
REPLACE_PYTHON=		build test upgrade verif/tryinput
d39 1
a39 1
pre-install:
d44 1
a44 1
	cd ${WRKSRC} && pax -rw -pe -v . ${DESTDIR}${PREFIX}/${SHAREDIR}
@


1.6
log
@PKGREVISION bump for anything using python without a PYPKGPREFIX.

This is a semi-manual PKGREVISION bump.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2018/08/09 09:14:16 schmonz Exp $
d4 1
a4 1
PKGREVISION=		2
@


1.5
log
@We don't install multiple architectures, so don't build them. Bump
PKGREVISION defensively, since it's hard to be sure the binary package
hasn't changed.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2018/07/31 06:34:11 schmonz Exp $
d4 1
a4 1
PKGREVISION=		1
@


1.4
log
@Update to 20180729. From the changelog:

Algorithm

Rewrite of the core int32/avx2 implementation for (1) higher speed and
(2) reduced memory consumption. Stack allocation is now at most a few
kilobytes, even for gigantic arrays.

Internally, the sorting algorithm is now mostly bitonic to simplify
indexing, although odd-even speedups are still applied when
convenient. Lanes are complemented to take the down-up decision out of
the inner loops.

As in previous djbsort versions, data is sorted first in vector lanes
and then transposed for final merges, reducing the overall number of
vector permutations. Unlike previous versions, transposition is done
in-place. The transposition in this version is bit-reversal on the outer
6 bits (bottom 3 bits and the top 3 bits), but leaves intermediate bits
alone. Non-power-of-2 array sizes are handled by an extra, more
traditional, merge step.

Sizes 2, 3, 4, 5, 6, 7, 8, 16, 32 are now special-cased. Non-power-of-2
sizes below 256 are padded to the next power of 2.

Portable implementations: The out-of-place int32/portable1 and
int32/portable2 implementations are now gone; the in-place
int32/portable3 and int32/portable4 implementations remain.

C API

float32_sort is now supported. The arithmetic in the reduction from
float32 to int32 is int32 31-bit right shift, uint32 1-bit right shift,
xor; this is slightly more efficient than the reduction from float32 to
uint32 from 2001 Herf.

Compiling

Tests now have more variation (without much slowdown): the uint32 test
cases now deviate from int32 in more than the sign; float32 uses
floating-point numbers that aren't integers; int32 does more loops for
small cases, and some larger cases.

Internals

API for 2-input sorting is now MINMAX macro operating on two
inputs in place.

Better inline assembly from Jason Donenfeld for 2-input sorting: more
flexibility in compiler's register allocation.

The package version number is now automatically copied to version.c as
the implementation version number for implementations that don't provide
version.c.

Verification

minmax now supports more peephole optimizations for complemented bitonic
sorting and for padding: xor(s,xor(s,t)) ⇒ t; xor(-1,s) ⇒ invert(s);
Reverse(Reverse(s)) ⇒ s; signedmin(invert(s),invert(t)) ⇒
invert(signedmax(s,t)); signedmax(invert(s),invert(t)) ⇒
invert(signedmin(s,t)); invert(s)[high:low] ⇒ invert(s[high:low]);
s[bits-1:0] ⇒ s; s[high:low][high2:low2] ⇒ s[high2+low:low2+low];
Concat(...)[high:low] ⇒ ...[high-pos:low-pos] when possible;
Reverse(s)[high:low] ⇒ Reverse(s[...]) when possible; eliminate
signedmin/signedmax when one input is the minimum or maximum constant.

verifymany now includes the implementation version number on
verified lines.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2018/07/31 06:24:57 schmonz Exp $
d4 1
@


1.3
log
@Compiler options are also baked into paths, so switch to dynamic PLIST.
Install with pax, not cp. On deinstall, remove whatever's left in
share/djbsort.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2018/07/31 05:38:56 schmonz Exp $
d3 1
a3 2
DISTNAME=		djbsort-20180717
PKGREVISION=		1
@


1.2
log
@From DJB: "For correctness, ./test has to be run on the installation
machine, not on the machine preparing a binary package." (Also: "The
issues are explained in Section 8 of
https://pqcrypto.eu.org/deliverables/d2.4.pdf.")

For this to work, we install the source tree (with built objects) to
${PREFIX}/share/djbsort. Then we run tests, install to ${PREFIX}/include
and ${PREFIX}/lib, and check the installed files against pseudo-PLIST.

This means pkg_add(1) will fail if no C compiler is present, which is
unusual behavior for pkg_add but perhaps not entirely unreasonable for a
C library.

Bump PKGREVISION.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2018/07/29 07:38:48 wiz Exp $
d15 2
d36 3
a38 1
INSTALLATION_DIRS=	include lib share
d46 4
d51 1
a51 2
	cp pseudo-PLIST ${WRKSRC}
	cp -Rp ${WRKSRC} ${DESTDIR}${PREFIX}/${SHAREDIR}
@


1.1
log
@math/djbsort: import djbsort-20180717

djbsort is a software library for sorting arrays of integers. It
provides the following features:

- Speed: djbsort holds new speed records for in-memory sorting.

- Security: djbsort is designed to be safe for cryptographic contexts.

- Verification: djbsort includes tools to automatically verify correctness.

These features are not separate options: there is a single sorting
function that is simultaneously fast, secure, and verified.

Packaged for wip by schmonz@@
@
text
@d1 1
a1 1
# $NetBSD$
d4 1
d13 9
a21 2
PYTHON_FOR_BUILD_ONLY=	yes
PYTHON_VERSIONS_INCOMPATIBLE=	27
d23 10
d34 4
a37 1
INSTALLATION_DIRS=	include lib
d42 3
a44 12
do-test: do-build
	cd ${WRKSRC} && ./test

do-install: do-test
	cd ${WRKSRC} && ./upgrade &&				\
	cd link-install/newest &&				\
	for i in include/*.h; do				\
	  ${INSTALL_DATA} $${i} ${DESTDIR}${PREFIX}/include;	\
	done;							\
	for i in lib/*/*.a; do					\
	  ${INSTALL_DATA} $${i} ${DESTDIR}${PREFIX}/lib;	\
	done
@

