<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/daec7b0b7b35b83365aac7479c9e2e4878425d07">https://github.com/macports/macports-ports/commit/daec7b0b7b35b83365aac7479c9e2e4878425d07</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit daec7b0b7b35b83365aac7479c9e2e4878425d07
</span>Author: David Seifert <SoapZA@users.noreply.github.com>
AuthorDate: Sun Sep 30 16:58:49 2018 +0200
<span style='display:block; white-space:pre;color:#404040;'> py-pysam: Bump to 0.15.1
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> * Add python 3.7 support
</span>---
python/py-pysam/Portfile | 11 +-
.../files/patch-pysam-fix-missing-files.diff | 222 +++++++++++++++++++++
2 files changed, 228 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-pysam/Portfile b/python/py-pysam/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index d6c6596..9701b51 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-pysam/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-pysam/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,8 +5,7 @@ PortGroup python 1.0
</span>
name py-pysam
set realname pysam
<span style='display:block; white-space:pre;background:#ffe0e0;'>-version 0.12.0.1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 0.15.1
</span> categories-append science
platforms darwin
license MIT BSD
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -22,12 +21,14 @@ homepage https://pypi.python.org/pypi/${realname}
</span> master_sites pypi:p/${realname}
distname ${realname}-${version}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums rmd160 315bdf74c211fad5372c1eb43751eff3609d3d27 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 04837bf0b1313e57d50076f228463262b9982c410b973eb184c033528f83d523
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 f44ed399f80325bb084d254a3d16d97c6bc25f0f \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 658421124c2f3de1b7445e03ca8413df0077f67ea9980abdaab0d1b5f7a8936f \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 3220356
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-python.versions 27 34 35 36
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+python.versions 27 36 37
</span>
patchfiles patch-pysam-remove-RPATH.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles patch-pysam-fix-missing-files.diff
</span>
if {${name} ne ${subport}} {
depends_build port:py${python.version}-setuptools \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-pysam/files/patch-pysam-fix-missing-files.diff b/python/py-pysam/files/patch-pysam-fix-missing-files.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..5c5a0b0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-pysam/files/patch-pysam-fix-missing-files.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,222 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ htslib/os/lzma_stub.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,85 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef LZMA_STUB_H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define LZMA_STUB_H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Some platforms, notably macOS, ship a usable liblzma shared library but
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ do not ship any LZMA header files. The <lzma.h> and <lzma/{*}.h> header
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ files that come with the library contain the following statement:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Author: Lasse Collin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This file has been put into the public domain.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * You can do whatever you want with this file.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Accordingly the following declarations have been copied and distilled
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ from <lzma/base.h> and <lzma/container.h> (primarily) and are sufficient
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to compile cram/cram_io.c in the absence of proper LZMA headers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ This file, lzma_stub.h, remains in the public domain. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdint.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __cplusplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern "C" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef enum { LZMA_OK = 0, LZMA_STREAM_END = 1 } lzma_ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef enum { LZMA_RUN = 0, LZMA_FINISH = 3 } lzma_action;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef enum { LZMA_CHECK_CRC32 = 1 } lzma_check;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef enum { LZMA_RESERVED_ENUM = 0 } lzma_reserved_enum;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++struct lzma_allocator;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++struct lzma_internal;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef struct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const uint8_t *next_in;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ size_t avail_in;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ uint64_t total_in;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ uint8_t *next_out;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ size_t avail_out;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ uint64_t total_out;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const struct lzma_allocator *allocator;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ struct lzma_internal *internal;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *reserved_ptr1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *reserved_ptr2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *reserved_ptr3;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *reserved_ptr4;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ uint64_t reserved_int1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ uint64_t reserved_int2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ size_t reserved_int3;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ size_t reserved_int4;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lzma_reserved_enum reserved_enum1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lzma_reserved_enum reserved_enum2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++} lzma_stream;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define LZMA_STREAM_INIT \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ { NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern size_t lzma_stream_buffer_bound(size_t uncompressed_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern lzma_ret lzma_easy_buffer_encode(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ uint32_t preset, lzma_check check,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const struct lzma_allocator *allocator,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const uint8_t *in, size_t in_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ uint8_t *out, size_t *out_pos, size_t out_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern lzma_ret lzma_stream_decoder(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lzma_stream *strm, uint64_t memlimit, uint32_t flags);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern uint64_t lzma_easy_decoder_memusage(uint32_t preset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern lzma_ret lzma_code(lzma_stream *strm, lzma_action action);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void lzma_end(lzma_stream *strm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __cplusplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ htslib/os/rand.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,97 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* rand.c -- drand48 implementation from the FreeBSD source tree. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// This file is an amalgamation of the many small files in FreeBSD to do with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// drand48 and friends implementations.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// It comprises _rand48.c, rand48.h, srand48.c, drand48.c, erand48.c, lrand48.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Copyright (c) 1993 Martin Birgmeier
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * All rights reserved.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * You may redistribute unmodified or modified versions of this source
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * code provided that the above copyright notice and this and the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * following conditions are retained.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This software is provided ``as is'', and comes with no warranties
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * of any kind. I shall in no event be liable for anything that happens
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * to anyone/anything when using this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++//#include <sys/cdefs.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++//__FBSDID("$FreeBSD: src/lib/libc/gen/_rand48.c,v 1.2 2002/03/22 21:52:05 obrien Exp $");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <math.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RAND48_SEED_0 (0x330e)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RAND48_SEED_1 (0xabcd)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RAND48_SEED_2 (0x1234)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RAND48_MULT_0 (0xe66d)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RAND48_MULT_1 (0xdeec)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RAND48_MULT_2 (0x0005)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RAND48_ADD (0x000b)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static unsigned short _rand48_seed[3] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RAND48_SEED_0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RAND48_SEED_1,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RAND48_SEED_2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++};
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static unsigned short _rand48_mult[3] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RAND48_MULT_0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RAND48_MULT_1,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RAND48_MULT_2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++};
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static unsigned short _rand48_add = RAND48_ADD;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++_dorand48(unsigned short xseed[3])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ unsigned long accu;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ unsigned short temp[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ accu = (unsigned long) _rand48_mult[0] * (unsigned long) xseed[0] +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (unsigned long) _rand48_add;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ temp[0] = (unsigned short) accu; /* lower 16 bits */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ accu >>= sizeof(unsigned short) * 8;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ accu += (unsigned long) _rand48_mult[0] * (unsigned long) xseed[1] +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (unsigned long) _rand48_mult[1] * (unsigned long) xseed[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ temp[1] = (unsigned short) accu; /* middle 16 bits */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ accu >>= sizeof(unsigned short) * 8;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ accu += _rand48_mult[0] * xseed[2] + _rand48_mult[1] * xseed[1] + _rand48_mult[2] * xseed[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ xseed[0] = temp[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ xseed[1] = temp[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ xseed[2] = (unsigned short) accu;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++hts_srand48(long seed)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _rand48_seed[0] = RAND48_SEED_0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _rand48_seed[1] = (unsigned short) seed;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _rand48_seed[2] = (unsigned short) (seed >> 16);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _rand48_mult[0] = RAND48_MULT_0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _rand48_mult[1] = RAND48_MULT_1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _rand48_mult[2] = RAND48_MULT_2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _rand48_add = RAND48_ADD;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++double
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++hts_erand48(unsigned short xseed[3])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _dorand48(xseed);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ldexp((double) xseed[0], -48) +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ldexp((double) xseed[1], -32) +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ldexp((double) xseed[2], -16);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++double
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++hts_drand48(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return hts_erand48(_rand48_seed);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++long
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++hts_lrand48(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _dorand48(_rand48_seed);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ((long) _rand48_seed[2] << 15) + ((long) _rand48_seed[1] >> 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ htslib/version.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,31 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#!/bin/sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# Master version, for use in tarballs or non-git source copies
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++VERSION=1.9
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# If we have a git clone, then check against the current tag
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if [ -e .git ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # If we ever get to 10.x this will need to be more liberal
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ VERSION=`git describe --match '[0-9].[0-9]*' --dirty`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# Numeric version is for use in .dylib or .so libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# Follows the same logic from the Makefile commit c2e93911
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# as non-numeric versions get bumped to patch level 255 to indicate
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# an unknown value.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if [ "$1" = "numeric" ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ v1=`expr "$VERSION" : '\([0-9]*\)'`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ v2=`expr "$VERSION" : '[0-9]*.\([0-9]*\)'`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ v3=`expr "$VERSION" : '[0-9]*.[0-9]*.\([0-9]*\)'`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if [ -z "`expr "$VERSION" : '^\([0-9.]*\)$'`" ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ VERSION="$v1.$v2.255"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ VERSION="$v1.$v2${v3:+.}$v3"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++echo $VERSION
</span></pre><pre style='margin:0'>
</pre>