forked from conda-archive/conda-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request conda-archive#743 from conda/fw_quantlib
Fw quantlib
- Loading branch information
Showing
9 changed files
with
496 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,226 @@ | ||
# Maintainer: Alexey Pavlov <[email protected]> | ||
|
||
_realname=boost | ||
pkgbase=mingw-w64-${_realname} | ||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" | ||
pkgver=1.70.0 | ||
_boostver=${pkgver//./_} | ||
pkgrel=2 | ||
pkgdesc="Free peer-reviewed portable C++ source libraries (mingw-w64)" | ||
arch=('any') | ||
url="https://www.boost.org/" | ||
license=('custom') | ||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" | ||
"${MINGW_PACKAGE_PREFIX}-bzip2" | ||
"${MINGW_PACKAGE_PREFIX}-icu" | ||
"${MINGW_PACKAGE_PREFIX}-zlib") | ||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" | ||
"${MINGW_PACKAGE_PREFIX}-python2" | ||
"${MINGW_PACKAGE_PREFIX}-python3") | ||
options=('strip' 'buildflags' 'staticlibs') | ||
source=(https://downloads.sourceforge.net/sourceforge/boost/boost_${_boostver}.tar.bz2 | ||
boost-1.48.0-add-bjam-man-page.patch | ||
boost-1.50.0-fix-non-utf8-files.patch | ||
boost-1.58.0-pool.patch | ||
boost-1.63.0-python-test-PyImport_AppendInittab.patch | ||
boost-1.57.0-build-optflags.patch | ||
boost-1.57.0-mpl-print.patch | ||
boost-1.68.0-pool-test_linking.patch | ||
boost-1.57.0-python-abi_letters.patch | ||
boost-1.57.0-python-libpython_dep.patch | ||
boost-1.60.0-mingw-context.patch | ||
boost-1.69-old-style-names-layout.patch | ||
boost-1.70.0-fix-python-install.patch | ||
using-mingw-w64-python.patch | ||
msys2-mingw-folders-bootstrap.patch) | ||
sha256sums=('430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778' | ||
'c5eae6354693c6b4e6364d4cf6f06c6c3de4c28486bf812cbd291f4410126cf8' | ||
'8d048e8ecee8b7feaa8651d6bc65d63838df240626619a4fb8738512043c3eb1' | ||
'4551ba9edf64c8ccdab4f4890c20e2e8cf6d4ffa1169d251df11e30d25b886b8' | ||
'b22196b6415f5e1c0fe56b49a12ea7c20073b15a5f31907f363c7be38d70d628' | ||
'b4ed25c499649c06614740d6652e2e1ae70d1d08e2dd1e32a02bd0309125ffd2' | ||
'd4be505bf6cd08b9da232d0311bfda2820dd75cf8911ed07b72eddc418c73614' | ||
'9d159f713fecbcb2b8faf2534da4cbb223bde6c3e393218aca2c0b3dfc3374c1' | ||
'cf46e9b791b45937d5af26b0f35dcdfa416cd9b62ef6c29e3064464835634628' | ||
'01758929643f92530512230d37df9793e6481cd6ce6310e3a79cee5ba287858c' | ||
'9ac0fc0306114d709958ae6e17fdd38616fa7c352d10346f099b51ef49d0ec4e' | ||
'c2508e60bed41471b396875e0289b4b1d4e021f3d01f4294615c72fcd8567439' | ||
'21d039cf867a41253f752c5f04f0cdb2ec86f17ad88459918b326fa48e9c1e05' | ||
'0dd6346d369850aad13bf8d9bc2f0abc16d4b0586e34d61fab11f65d3d7fa9d4' | ||
'81f74c2eafbe004bcbb863cc3cd74571adcffed1169dde86645db4441be236e1') | ||
|
||
prepare() { | ||
cd "${srcdir}/boost_${_boostver}" | ||
|
||
# https://svn.boost.org/trac/boost/ticket/6150 | ||
patch -p1 -i ${srcdir}/boost-1.50.0-fix-non-utf8-files.patch | ||
|
||
# Add a manual page for bjam, based on the on-line documentation: | ||
# https://www.boost.org/boost-build2/doc/html/bbv2/overview.html | ||
rm tools/build/v2/doc/bjam.1 || true | ||
msg2 "boost-1.48.0-add-bjam-man-page.patch" | ||
patch -p1 -i ${srcdir}/boost-1.48.0-add-bjam-man-page.patch | ||
|
||
# https://bugzilla.redhat.com/show_bug.cgi?id=828856 | ||
# https://bugzilla.redhat.com/show_bug.cgi?id=828857 | ||
# https://svn.boost.org/trac/boost/ticket/6701 | ||
msg2 "boost-1.58.0-pool.patch" | ||
patch -p0 -i ${srcdir}/boost-1.58.0-pool.patch | ||
|
||
# https://svn.boost.org/trac/boost/ticket/5637 | ||
msg2 "boost-1.57.0-mpl-print.patch" | ||
patch -p1 -i ${srcdir}/boost-1.57.0-mpl-print.patch | ||
|
||
# https://svn.boost.org/trac/boost/ticket/9038 | ||
msg2 "boost-1.68.0-pool-test_linking.patch" | ||
patch -p1 -i ${srcdir}/boost-1.68.0-pool-test_linking.patch | ||
|
||
# https://bugzilla.redhat.com/show_bug.cgi?id=1102667 | ||
msg2 "boost-1.57.0-python-libpython_dep.patch" | ||
patch -p1 -i ${srcdir}/boost-1.57.0-python-libpython_dep.patch | ||
msg2 "boost-1.57.0-python-abi_letters.patch" | ||
patch -p1 -i ${srcdir}/boost-1.57.0-python-abi_letters.patch | ||
msg2 "boost-1.60.3-python-test-PyImport_AppendInittab.patch" | ||
patch -p1 -i ${srcdir}/boost-1.63.0-python-test-PyImport_AppendInittab.patch | ||
|
||
# https://bugzilla.redhat.com/show_bug.cgi?id=1190039 | ||
msg2 "boost-1.57.0-build-optflags.patch" | ||
patch -p1 -i ${srcdir}/boost-1.57.0-build-optflags.patch | ||
|
||
# https://svn.boost.org/trac/boost/ticket/7262 | ||
msg2 "boost-1.60.0-mingw-context.patch" | ||
patch -p1 -i ${srcdir}/boost-1.60.0-mingw-context.patch | ||
|
||
# Back old names for libraries (without architecture) | ||
msg2 "boost-1.69-old-style-names-layout.patch" | ||
patch -p1 -i ${srcdir}/boost-1.69-old-style-names-layout.patch | ||
|
||
# Use our own build Python | ||
msg2 "using-mingw-w64-python.patch" | ||
patch -p1 -i ${srcdir}/using-mingw-w64-python.patch | ||
|
||
msg2 "msys2-mingw-folders-bootstrap.patch" | ||
patch -p1 -i ${srcdir}/msys2-mingw-folders-bootstrap.patch | ||
|
||
# Fix installation of both Python versions | ||
msg2 "boost-1.70.0-fix-python-install.patch" | ||
patch -p1 -i ${srcdir}/boost-1.70.0-fix-python-install.patch | ||
} | ||
|
||
build() { | ||
local PREFIX_DEPS=$(cygpath -am ${MINGW_PREFIX}) | ||
|
||
[[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} | ||
mkdir -p "${srcdir}/build-${MINGW_CHOST}" | ||
lndir "${srcdir}/boost_${_boostver}" "${srcdir}/build-${MINGW_CHOST}" | ||
|
||
cd "${srcdir}/build-${MINGW_CHOST}" | ||
|
||
_py2ver=$(${MINGW_PREFIX}/bin/python2 -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))") | ||
_py3ver=$(${MINGW_PREFIX}/bin/python3 -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))") | ||
|
||
echo "using python : ${_py2ver} : ${PREFIX_DEPS}/bin/python2.exe : ${PREFIX_DEPS}/include/python${_py2ver} : ${PREFIX_DEPS}/lib/python${_py2ver}/config ;" >> ./tools/build/src/user-config.jam | ||
echo "using python : ${_py3ver} : ${PREFIX_DEPS}/bin/python3.exe : ${PREFIX_DEPS}/include/python${_py3ver}m : ${PREFIX_DEPS}/lib/python${_py3ver}/config-${_py3ver}m ;" >> ./tools/build/src/user-config.jam | ||
#echo "using gcc : : ${PREFIX_DEPS}/bin/g++.exe : <rc>${PREFIX_DEPS}/bin/windres.exe ;" >> ./tools/build/src/user-config.jam | ||
|
||
./bootstrap.sh --with-icu=${MINGW_PREFIX} --with-python=${MINGW_PREFIX} --with-toolset=gcc | ||
|
||
case ${CARCH} in | ||
i686) | ||
local _model=32 | ||
;; | ||
x86_64) | ||
local _model=64 | ||
;; | ||
esac | ||
|
||
if check_option "debug" "y"; then | ||
local variant=debug | ||
else | ||
local variant=release | ||
fi | ||
|
||
./b2 \ | ||
address-model=${_model} \ | ||
link=shared,static \ | ||
pch=off \ | ||
runtime-link=shared \ | ||
threading=multi \ | ||
threadapi=win32 \ | ||
toolset=gcc \ | ||
variant=${variant} \ | ||
python=2.7,3.7 \ | ||
--debug-configuration \ | ||
--prefix=${MINGW_PREFIX} \ | ||
--layout=tagged \ | ||
--without-mpi \ | ||
--no-cmake-config \ | ||
-sHAVE_ICU=1 \ | ||
-sICU_PATH=${MINGW_PREFIX} \ | ||
-sICU_LINK="-L${MINGW_PREFIX}/lib -licuuc -licuin -licudt" \ | ||
-sICONV_PATH=${MINGW_PREFIX} \ | ||
-sICONV_LINK="-L${MINGW_PREFIX}/lib -liconv" \ | ||
-sNO_BZIP2 \ | ||
-sBZIP2_BINARY=bz2 \ | ||
-sBZIP2_INCLUDE=${MINGW_PREFIX}/include \ | ||
-sBZIP2_LIBPATH=${MINGW_PREFIX}/lib \ | ||
-sNO_ZLIB \ | ||
-sZLIB_BINARY=z \ | ||
-sZLIB_INCLUDE=${MINGW_PREFIX}/include \ | ||
-sZLIB_LIBPATH=${MINGW_PREFIX}/lib \ | ||
-d2 \ | ||
-j$(nproc) | ||
} | ||
|
||
package() { | ||
cd "${srcdir}/build-${MINGW_CHOST}" | ||
case ${CARCH} in | ||
i686) | ||
local _model=32 | ||
;; | ||
x86_64) | ||
local _model=64 | ||
;; | ||
esac | ||
|
||
if check_option "debug" "y"; then | ||
local variant=debug | ||
else | ||
local variant=release | ||
fi | ||
|
||
./b2 \ | ||
address-model=${_model} \ | ||
link=shared,static \ | ||
runtime-link=shared \ | ||
threading=multi \ | ||
threadapi=win32 \ | ||
toolset=gcc \ | ||
variant=${variant} \ | ||
python=2.7,3.7 \ | ||
--prefix=${pkgdir}${MINGW_PREFIX} \ | ||
--layout=tagged \ | ||
--without-mpi \ | ||
--no-cmake-config \ | ||
-sHAVE_ICU=1 \ | ||
-sICU_PATH=${MINGW_PREFIX} \ | ||
-sICU_LINK="-L${MINGW_PREFIX}/lib -licuuc -licuin -licudt" \ | ||
-sICONV_PATH=${MINGW_PREFIX} \ | ||
-sICONV_LINK="-L${MINGW_PREFIX}/lib -liconv" \ | ||
-sNO_BZIP2 \ | ||
-sBZIP2_BINARY=bz2 \ | ||
-sBZIP2_INCLUDE=${MINGW_PREFIX}/include \ | ||
-sBZIP2_LIBPATH=${MINGW_PREFIX}/lib \ | ||
-sNO_ZLIB \ | ||
-sZLIB_BINARY=z \ | ||
-sZLIB_INCLUDE=${MINGW_PREFIX}/include \ | ||
-sZLIB_LIBPATH=${MINGW_PREFIX}/lib \ | ||
install | ||
|
||
mkdir -p ${pkgdir}${MINGW_PREFIX}/bin | ||
mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin | ||
|
||
# install b2 and bjam | ||
install -Dm755 b2.exe "${pkgdir}${MINGW_PREFIX}"/bin/b2.exe | ||
cp -rf "${pkgdir}${MINGW_PREFIX}"/bin/b2.exe "${pkgdir}${MINGW_PREFIX}"/bin/bjam.exe | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
:: Trailing semicolon in this variable as set by current (2017/01) | ||
:: conda-build breaks us. Manual fix: | ||
set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out" | ||
:: Delegate to the Unixy script. We need to translate the key path variables | ||
:: to be Unix-y rather than Windows-y, though. | ||
copy "%RECIPE_DIR%\build.sh" . | ||
FOR /F "delims=" %%i IN ('cygpath.exe -u -p "%PATH%"') DO set "PATH_OVERRIDE=%%i" | ||
FOR /F "delims=" %%i IN ('cygpath.exe -u "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_M=%%i" | ||
FOR /F "delims=" %%i IN ('cygpath.exe -u "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_U=%%i" | ||
FOR /F "delims=" %%i IN ('cygpath.exe -u "%PREFIX%"') DO set "PREFIX=%%i" | ||
FOR /F "delims=" %%i IN ('cygpath.exe -u "%PYTHON%"') DO set "PYTHON=%%i" | ||
FOR /F "delims=" %%i IN ('cygpath.exe -u "%RECIPE_DIR%"') DO set "RECIPE_DIR=%%i" | ||
FOR /F "delims=" %%i IN ('cygpath.exe -u "%SP_DIR%"') DO set "SP_DIR=%%i" | ||
FOR /F "delims=" %%i IN ('cygpath.exe -u "%SRC_DIR%"') DO set "SRC_DIR=%%i" | ||
FOR /F "delims=" %%i IN ('cygpath.exe -u "%STDLIB_DIR%"') DO set "STDLIB_DIR=%%i" | ||
set MSYSTEM=MINGW%ARCH% | ||
set MSYS2_PATH_TYPE=inherit | ||
set CHERE_INVOKING=1 | ||
bash -x "./msys2-build-via-PKGBUILD.sh" | ||
if errorlevel 1 exit 1 | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{% set pkgver='1.70.0' %} | ||
{% set pkgrel='2' %} | ||
{% set _realname='boost' %} | ||
{% set pkgname='m2w64-' ~ _realname %} | ||
|
||
package: | ||
name: {{ pkgname }} | ||
version: {{ pkgver }} | ||
source: | ||
- url: https://downloads.sourceforge.net/sourceforge/boost/boost_1_70_0.tar.bz2 | ||
fn: {{ pkgname }}-v{{ pkgver }}.tar.gz | ||
sha256: 430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778 | ||
folder: {{ _realname }}-{{ pkgver }} | ||
- path: ./PKGBUILD | ||
- path: ./msys2-build-via-PKGBUILD.sh | ||
|
||
build: | ||
number: {{ pkgrel }} | ||
requirements: | ||
build: | ||
- m2-filesystem | ||
- m2-sed | ||
- m2-grep | ||
- m2-findutils | ||
- m2-autoconf | ||
- m2-automake-wrapper | ||
- m2-make | ||
- m2-libtool | ||
- m2-bzip2 | ||
- m2w64-bzip2 | ||
- m2w64-icu | ||
- m2w64-toolchain | ||
run: | ||
- msys2-conda-epoch >=20160418 | ||
- m2w64-gcc-libs | ||
about: | ||
home: https://www.boost.org/ | ||
license: custom | ||
summary: 'Free peer-reviewed portable C++ source libraries (mingw-w64)' | ||
description: | | ||
Many applications require the parsing of mathematical expressions. | ||
The main objective of this library is to provide a fast and easy way of | ||
doing this. muParser is an extensible high performance math expression | ||
parser library written in C++. It works by transforming a mathematical | ||
expression into bytecode and precalculating constant parts of the | ||
expression | ||
doc_url: https://www.boost.org/doc/ | ||
dev_url: https://github.com/boostorg/boost | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
export MINGW_PREFIX="/Library/mingw-w64" | ||
if [[ ${ARCH} == 32 ]]; then | ||
export CARCH=i686 | ||
else | ||
export CARCH=x86_64 | ||
fi | ||
export MINGW_CHOST=$(gcc -dumpmachine) | ||
export srcdir=${SRC_DIR} | ||
export MAKEFLAGS=-j${CPU_COUNT} | ||
export PKG_CONFIG_PATH=/mingw-w64/lib/pkgconfig:/mingw-w64/share/pkgconfig | ||
export pkgdir="${PREFIX}" | ||
export pkgver=${PKG_VERSION} | ||
|
||
. ./PKGBUILD | ||
# Breaks, PKG_CONFIG issues leading to CPPUNIT issues. | ||
# pushd ${srcdir}/JAGS-${PKG_VERSION} | ||
# autoreconf -vfi | ||
# popd | ||
build || exit 1 | ||
package || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
cmake_minimum_required(VERSION 1.15) | ||
|
||
project(quantlib CXX) | ||
|
||
include_directories( | ||
include | ||
) | ||
|
||
file( | ||
GLOB | ||
source_files | ||
src/*.cpp | ||
) | ||
|
||
add_library( | ||
quantlib | ||
SHARED | ||
${source_files} | ||
) | ||
|
||
file( | ||
GLOB | ||
header_files | ||
include/* | ||
) | ||
|
||
install( | ||
TARGETS quantlib | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
RUNTIME DESTINATION bin | ||
) | ||
|
||
install( | ||
FILES ${header_files} DESTINATION include | ||
) |
Oops, something went wrong.