Skip to content

Commit

Permalink
V1.0.5 multios (#57)
Browse files Browse the repository at this point in the history
* Add getlocalsolps and getnetworksolps RPC calls, show them in getmininginfo

* Add benchmark for attempting decryption of notes

* Add benchmark for incrementing note witnesses

* Add -metricsui flag to toggle between persistent screen and rolling metrics

Defaults to true if stdout is a TTY, else false.

* Add -metricsrefreshtime option

* Only show metrics by default if stdout is a TTY

* Document metrics screen options

* Fix stale comment referencing upstream block interval

* Add checkpoint at block height 15000

* Make command line option to show all debugging consistent with similar options

Most people expect a value of 1 to enable all for command line arguments.
However to do this for the -debug option you must type "-debug=".
This has been changed to allow "-debug=1" as well as "-debug=" to
enable all debug logging

* Update documentation to match the zcash#4219 change

* Update help message to match the zcash#4219 change

* Clarify that metrics options are only useful without -daemon and -printtoconsole

* Increase length of metrics divider

* Closes zcash#1857. Fixes bug where tx spending only notes had priority of 0.

* Closes zcash#1901. Increase default settings for the max block size when
mining and the amount of space available for priority transactions.

* Write witness caches when writing the best block

For steady-state operation, this reduces the average time between wallet disk
writes from once per block to once per hour.

On -rescan, witness caches are only written out at the end along with the best
block, increasing speed while ensuring that on-disk state is kept consistent.

Witness caches are now never recreated during a -reindex, on the assumption that
the blocks themselves are not changing (the chain is just being reconstructed),
and so the witnesses will remain valid.

Part of zcash#1749.

* Add porter dev overrides for CC, CXX, MAKE, BUILD, HOST

* Apply miniupnpc patches to enable compilation on Solaris 11

These can be removed after the next MiniUPnP release.

Closes zcash#1835.

* Closes zcash#1903. Add fee parameter to z_sendmany.

* Add an upstream miniupnpc patch revision

* Metrics - Don't exclaim unless > 1

"You have validated 0 transactions!" sounds a little less enthusiastic that intended. Also, only says "1 transaction".

* Address review comments, tweak strings

* bash-completion: Adapt for 0.12 and 0.13

 * separate completion for bitcoind and bitcoin-cli
 * remove RPC support from bitcoind completion
 * add completion for bitcoin-tx and bitcoin-qt
 * rely on autoloading of completions

* Change function names to not clash with Bitcoin, apply to correct binaries

* Add bash completion files to Debian package

* Always bash-complete the default account

* Add Zcash RPC commands to CLI argument completion

* Fixes zcash#1823. Witness anchors for input notes no longer cross block boundaries.

* Edit for grammar: "block chain"

At this point, I believe it is universally accepted that "blockchain" is one word, and should not be separated into two.

* Increase timeout as laptops on battery power have cpu throttling.

* Isolate verification to a `ProofVerifier` context object that allows verification behavior to be tuned by the caller.

* Regression test.

* Ensure cache contains valid entry when anchor is popped.

* Ensure ProofVerifier cannot be accidentally copied.

* Document behaviour of CWallet::SetBestChain

* WitnessAnchorData only needs to store one witness per JSOutPoint.

* Rename Dummy to Disabled.

* Add more tests for ProofVerifier.

* Fix indentation

* Generate JS for trydecryptnotes, make number of addresses a variable

* Add JS to second block to ensure witnesses are incremented

* ASSERT_TRUE -> ASSERT_FALSE

* Skip JoinSplit verification before the last checkpoint

Part of zcash#1749

* Gather release notes from previous release to HEAD

Also update release-process.md to replace git shortlog command with
release-notes.py script.

* Add a reindex test that fails because of a bug in decrementing witness caches

Ref: zcash#1904 (comment)

* Make the test pass by fixing the bug!

* Only check cache validity for witnesses being incremented or decremented

Fixes the bug resulting from zcash#1904.

* Update release process to check in with users who opened resolved issues

* Check that E' points are actually in G2 by ensuring they are of order r.

* Fix bug in wallet tests

* Extract block-generation wallet test code into a function

* Rewrite reindex test to check beyond the max witness cache size

* Fix bug in IncrementNoteWitness()

* Extend createjoinsplit to benchmark parallel JoinSplits

Closes zcash#1940

* Update payment API docs to recommend -rescan for fixing witness errors

* Add total number of commitments to getblockchaininfo

* Update version to 1.0.4

* Update man pages

* Release notes, authors, changelog

* Only enable getblocktemplate when wallet is enabled

* Only run wallet tests when wallet is enabled

* Add a tool for profiling the creation of JoinSplits

* Add test for IncrementalMerkleTree::size().

* Exclude test binaries from make install

Closes zcash#1943.

* Fixes zcash#1964 to catch general exception in z_sendmany and catch
exceptions as reference-to-const.

* Fixes zcash#1967 by adding age of note to z_sendmany logging.

* Scan the whole chain whenever a z-key is imported

Closes zcash#1941.

* Instruct users to run zcash-fetch-params if network params aren't available

Closes zcash#1786.

* Fixes a bug where the unsigned transaction was logged by z_sendmany
after a successful sign and send, meaning that the logged hash fragment
would be different from the txid logged by "AddToWallet".  This issue
occured when sending from transparent addresses, as utxo inputs must be
signed.  It did not occur when sending from shielded addresses.

* Trigger metrics UI refresh on new messages

* Strip out the SECURE flag in metrics UI so message style is detected

* Add 'CreateJoinSplit' standalone utility to gitignore.

* Handle newlines in UI messages

* Suggest ./zcutil/fetch-params.sh as well

Once we improve the from-source installation docs to use 'make install', we can
revert this commit.

* Update debug categories

Closes zcash#1954.

* CreateJoinSplit: add start_profiling() call

This solves the problem of profiling output displaying nonsensical large time values.

* rpc: Implement random-cookie based authentication

When no `-rpcpassword` is specified, use a special 'cookie' file for
authentication. This file is generated with random content when the
daemon starts, and deleted when it exits. Read access to this file
controls who can access through RPC. By default this file is stored in
the data directory but it be overriden with `-rpccookiefile`.

This is similar to Tor CookieAuthentication: see
https://www.torproject.org/docs/tor-manual.html.en

Alternative to zcash#6258. Like that pull, this allows running bitcoind
without any manual configuration. However, daemons should ideally never write to
their configuration files, so I prefer this solution.

* Rename build-aux/m4/bitcoin_find_bdb48.m4 to remove version

Closes zcash#1622.

* Bump COPYRIGHT_YEAR from 2016 to 2017.

* Throw an error if zcash.conf is missing

An empty zcash.conf is sufficient to bypass this error.

* Show a friendly message explaining why zcashd needs a zcash.conf

* Closes zcash#1780. Result of z_getoperationstatus now sorted by creation time of operation

* Create ISSUE_TEMPLATE.md

* move template to subdirectory, fix typo, include prompt under describing issue section, include uploading file directly to github ticket as option for sharing logs

* Remove UTF-8 BOM efbbbf from zcash.conf to avoid problems with command line tools

* Closes zcash#1097 so zcash-cli now displays license info like zcashd.

LicenseInfo is refactored from init.cpp to util.cpp so that the
bitcoin-cli makefile target does not need to be modified.

* Fixes zcash#1497 ZCA-009 by restricting data exporting to user defined folder.

Previously the RPC interface allowed z_exportwallet, backupwallet and
dumpwallet to write data to an arbitrary filename.  ZCA-009 demonstrates
how this is vulnerable.  The resolution is to only allow data to
written when the -exportdir has been configured.  Also filenames are
restricted to alphanumeric characters.

* Closes zcash#1957 by adding tx serialization size to listtransactions output.

* Fix gtest ordering broken by zcash#1949

Part of zcash#1539

* Fixes zcash#1960: z_getoperationstatus/result now includes operation details.

* Debian package lint

- Tweak description synopsis to make Debian happy
- Put bash completion files in correct directory
- Add a manpage for zcash-fetch-params

* Generate Debian control file to fix shlibs lint

* Create empty zcash.conf during performance measurements

* Create empty zcash.conf during coverage checks

Fixes regression caused by zcash#2013.

* Coverage build system tweaks

* Update walletbackup.py qa test to use -exportdir option

* Add missing header required by std::accumulate

* Increase timeout for z_sendmany transaction in wallet.py qa test

* Add test for z_importkey rescanning from beginning of chain.

* Bump version to 1.0.5.

* Update release notes and Debian package.

* V1.0.4 mac (#51)

* initial mac version of zclassic

Work in progress - 15JAN2017

more refactoring

linux refactoring fixes

osx refactoring fixes

initial win64 commit

fixup! initial win64 commit

compile libsnark with posix threads

build gtest and gmock with posix

Working build

fixup! Working build

* Windows and Linux builds ok

* fixup! Merge tag 'v1.0.5' into v1.0.5-multios

* fixup! fixup! Merge tag 'v1.0.5' into v1.0.5-multios

* fixup! fixup! fixup! Merge tag 'v1.0.5' into v1.0.5-multios

* Fix OSX compatibility with depends

* OSX Compat - Fix site_t ambiguity in json

* fixup! OSX Compat - Fix site_t ambiguity in json
  • Loading branch information
jmprcx committed Jan 31, 2017
1 parent 928bcdc commit bb8e667
Show file tree
Hide file tree
Showing 81 changed files with 968 additions and 201 deletions.
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--- Remove text and sections that do not apply -->

This issue tracker is only for technical issues related to zcashd.

General Zcash questions and/or support requests and are best directed to the [Zcash Forums](https://forum.z.cash) or [Community Rocket.Chat](https://chat.zcashcommunity.com).

For reporting security vulnerabilities or for sensitive discussions with our security team, please contact [security@z.cash](mailto:security@z.cash). You can use the [GPG key](https://z.cash/gpg-pubkeys/security.asc) (fingerprint: `AF85 0445 546C 18B7 86F9 2C62 88FB 8B86 D8B5 A68C`) to send an encrypted message. The key and fingerprint are duplicated on our [Public Keys page](https://z.cash/support/pubkeys.html).

### Describe the issue
Please provide a general summary of the issue you're experiencing

### Can you reliably reproduce the issue?
#### If so, please list the steps to reproduce below:
1.
2.
3.

### Expected behaviour
Tell us what should happen

### Actual behaviour + errors
Tell us what happens instead including any noticable error output (any messages displayed on-screen when e.g. a crash occurred)

### The version of Zcash you were using:
Run `zcashd --version` to find out

### Machine specs:
- OS name + version:
- CPU:
- RAM:
- Disk size:
- Disk Type (HD/SDD):
- Linux kernel version (uname -a):
- Compiler version (gcc -version):

### Any extra information that might be useful in the debugging process.
This includes the relevant contents of `~/.zcash/debug.log`. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site.
Please also include any non-standard things you did during compilation (extra flags, dependency version changes etc.) if applicable.

### Do you have a back up of `~/.zcash` directory and/or take a VM snapshot?
- Backing up / making a copy of the `~/.zcash` directory might help make the problem reproducible. Please redact appropriately.
- Taking a VM snapshot is really helpful for interactively testing fixes
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ src/qt/test/test_bitcoin-qt

# Zcash utilities
src/zcash/GenerateParams
src/zcash/CreateJoinSplit

*zcashTest.pk
*zcashTest.vk
Expand Down Expand Up @@ -122,3 +123,6 @@ qa/pull-tester/test.*/*
/doc/doxygen/

libzcashconsensus.pc

contrib/debian/files
contrib/debian/substvars
10 changes: 10 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ baseline_filtered.info: baseline.info
"$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@

leveldb_baseline.info: baseline_filtered.info
Expand All @@ -171,6 +173,8 @@ leveldb_baseline_filtered.info: leveldb_baseline.info
"$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@

baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
Expand All @@ -190,6 +194,8 @@ test_bitcoin_filtered.info: test_bitcoin.info
"$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@

zcash-gtest.info: baseline_filtered_combined.info
Expand All @@ -206,6 +212,8 @@ zcash-gtest_filtered.info: zcash-gtest.info
"$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@

block_test.info: test_bitcoin_filtered.info
Expand All @@ -223,6 +231,8 @@ block_test_filtered.info: block_test.info
"$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@

test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Zclassic 1.0.4
Zclassic 1.0.5
==============

What is Zclassic?
Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 4)
define(_CLIENT_VERSION_REVISION, 5)
define(_CLIENT_VERSION_BUILD, 50)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2016)
define(_COPYRIGHT_YEAR, 2017)
AC_INIT([Zcash],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://github.com/zcash/zcash/issues],[zcash])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
Expand Down Expand Up @@ -434,11 +434,10 @@ if test x$use_hardening != xno; then
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=2"
],[AC_MSG_ERROR(Cannot enable -D_FORTIFY_SOURCE=2)])

AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"],[AC_MSG_ERROR(Cannot enable RELRO)])
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"],[AC_MSG_ERROR(Cannot enable BIND_NOW)])

if test x$TARGET_OS != xwindows; then
# All windows code is PIC, forcing it on just adds useless compile warnings
AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"],[AC_MSG_ERROR(Cannot enable RELRO)])
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"],[AC_MSG_ERROR(Cannot enable BIND_NOW)])
AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"],[AC_MSG_ERROR(Cannot enable -fPIE)])
AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],[AC_MSG_ERROR(Cannot enable -pie)])
else
Expand Down
6 changes: 6 additions & 0 deletions contrib/DEBIAN/changelog → contrib/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
zcash (1.0.5) jessie; urgency=medium

* 1.0.5 release.

-- Zcash Company <team@z.cash> Thu, 19 Jan 2016 19:23:40 -0700

zcash (1.0.4) jessie; urgency=medium

* 1.0.4 release.
Expand Down
File renamed without changes.
13 changes: 7 additions & 6 deletions contrib/DEBIAN/control → contrib/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ Section: utils
Priority: optional
Maintainer: Zcash Company <team@z.cash>
Homepage: https://z.cash
Build-Depends: autoconf, automake, bsdmainutils, build-essential
git, g++-multilib, libc6-dev, libtool
m4, ncurses-dev, pkg-config, python
Build-Depends: autoconf, automake, bsdmainutils, build-essential,
git, g++-multilib, libc6-dev, libtool,
m4, ncurses-dev, pkg-config, python,
unzip, wget, zlib1g-dev
Vcs-Git: https://github.com/zcash/zcash.git
Vcs-Browser: https://github.com/zcash/zcash

Package: zcash
Version: 1.0.4
Version: 1.0.5
Architecture: amd64
Depends: libgomp1
Description: An implementation of the "Zerocash" protocol.
Depends: ${shlibs:Depends}
Description: HTTPS for money.
Based on Bitcoin's code, it intends to offer a far higher standard
of privacy and anonymity through a sophisticiated zero-knowledge
proving scheme which preserves confidentiality of transaction metadata.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##
##
## zcash.conf configuration file. Lines beginning with # are comments.
##

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH ZCASH-CLI "1" "December 2016" "Zcash RPC client version v1.0.4" "User Commands"
.TH ZCASH-CLI "1" "January 2017" "Zcash RPC client version v1.0.5" "User Commands"
.SH NAME
zcash-cli \- RPC client for the Zcash daemon
.SH DESCRIPTION
Zcash RPC client version v1.0.4
Zcash RPC client version v1.0.5
.SS "Usage:"
.TP
zcash\-cli [options] <command> [params]
Expand Down
28 changes: 28 additions & 0 deletions contrib/debian/manpages/zcash-fetch-params.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH ZCASH-FETCH-PARAMS "1" "January 2017" "Zcash - zcash-fetch-params" "User Commands"
.SH NAME
zcash-fetch-params \- Downloads the Zcash network parameters
.SH DESCRIPTION
Zcash \- zcash-fetch\-params
.PP
This script will fetch the Zcash zkSNARK parameters and verify their
integrity with sha256sum.
.PP
If they already exist locally, it will exit now and do nothing else.
.PP
This script will fetch the Zcash zkSNARK parameters and verify their
integrity with sha256sum.
.PP
If they already exist locally, it will exit now and do nothing else.
.SH "SEE ALSO"
The full documentation for
.B Zcash
is maintained as a Texinfo manual. If the
.B info
and
.B Zcash
programs are properly installed at your site, the command
.IP
.B info Zcash
.PP
should give you access to the complete manual.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH ZCASHD "1" "December 2016" "Zcash Daemon version v1.0.4" "User Commands"
.TH ZCASHD "1" "January 2017" "Zcash Daemon version v1.0.5" "User Commands"
.SH NAME
zcashd \- Network daemon for interacting with the Zcash blockchain
.SH DESCRIPTION
Zcash Daemon version v1.0.4
Zcash Daemon version v1.0.5
.SS "Usage:"
.TP
zcashd [options]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "zcash-1.0.4"
name: "zcash-1.0.5"
enable_cache: true
distro: "debian"
suites:
Expand Down
2 changes: 1 addition & 1 deletion depends/hosts/linux.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
linux_CFLAGS=-pipe
linux_CFLAGS=-pipe -fPIC
linux_CXXFLAGS=$(linux_CFLAGS)

linux_release_CFLAGS=-O1
Expand Down
6 changes: 4 additions & 2 deletions depends/hosts/mingw32.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
mingw32_CFLAGS=-pipe
mingw32_CXXFLAGS=$(mingw32_CFLAGS)
mingw32_CC=x86_64-w64-mingw32-gcc-posix
mingw32_CXX=x86_64-w64-mingw32-g++-posix
mingw32_CFLAGS=-pipe -fopenmp -std=c11 -DPTW32_STATIC_LIB
mingw32_CXXFLAGS=$(mingw32_CFLAGS) -std=c++11

mingw32_release_CFLAGS=-O2
mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS)
Expand Down
4 changes: 4 additions & 0 deletions depends/packages/bdb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ define $(package)_config_cmds
../dist/$($(package)_autoconf)
endef

define $(package)_preprocess_cmds
sed -i "" -e "s/WinIoCtl.h/winioctl.h/g" src/dbinc/win_db.h
endef

define $(package)_build_cmds
$(MAKE) libdb_cxx-6.2.a libdb-6.2.a
endef
Expand Down
34 changes: 14 additions & 20 deletions depends/packages/googlemock.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,22 @@ $(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_download_file=release-$($(package)_version).tar.gz
$(package)_sha256_hash=3f20b6acb37e5a98e8c4518165711e3e35d47deb6cdb5a4dd4566563b5efd232

ifeq ($(OS),Windows_NT)
uname_S := Windows
define $(package)_set_vars
$(package)_build_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" CXX="$($(package)_cxx)" CXXFLAGS="$($(package)_cxxflags)"
endef

BUILD_OS := $(shell uname)
ifeq ($(BUILD_OS),Darwin)
$(package)_install=ginstall
else
uname_S := $(shell uname -s)
$(package)_install=install
endif

ifeq ($(uname_S), Darwin)
define $(package)_build_cmds
$(MAKE) -C make GTEST_DIR='$(host_prefix)' CXXFLAGS='-fPIC' gmock-all.o
endef
define $(package)_build_cmds
$(MAKE) -C make GTEST_DIR='$(host_prefix)' gmock-all.o
endef

define $(package)_stage_cmds
ginstall -D ./make/gmock-all.o $($(package)_staging_dir)$(host_prefix)/lib/libgmock.a && \
define $(package)_stage_cmds
$($(package)_install) -D ./make/gmock-all.o $($(package)_staging_dir)$(host_prefix)/lib/libgmock.a && \
cp -a ./include $($(package)_staging_dir)$(host_prefix)/include
endef
else
define $(package)_build_cmds
$(MAKE) -C make GTEST_DIR='$(host_prefix)' CXXFLAGS='-fPIC' gmock-all.o
endef

define $(package)_stage_cmds
install -D ./make/gmock-all.o $($(package)_staging_dir)$(host_prefix)/lib/libgmock.a && \
cp -a ./include $($(package)_staging_dir)$(host_prefix)/include
endef
endif
endef
35 changes: 14 additions & 21 deletions depends/packages/googletest.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,22 @@ $(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_download_file=release-$($(package)_version).tar.gz
$(package)_sha256_hash=f73a6546fdf9fce9ff93a5015e0333a8af3062a152a9ad6bcb772c96687016cc

# Determine building operating system
ifeq ($(OS),Windows_NT)
uname_S := Windows
define $(package)_set_vars
$(package)_build_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" CXX="$($(package)_cxx)" CXXFLAGS="$($(package)_cxxflags)"
endef

BUILD_OS := $(shell uname)
ifeq ($(BUILD_OS),Darwin)
$(package)_install=ginstall
else
uname_S := $(shell uname -s)
$(package)_install=install
endif

ifeq ($(uname_S), Darwin)
define $(package)_build_cmds
$(MAKE) -C make CXXFLAGS=-fPIC gtest.a
endef
define $(package)_build_cmds
$(MAKE) -C make gtest.a
endef

define $(package)_stage_cmds
ginstall -D ./make/gtest.a $($(package)_staging_dir)$(host_prefix)/lib/libgtest.a && \
define $(package)_stage_cmds
$($(package)_install) -D ./make/gtest.a $($(package)_staging_dir)$(host_prefix)/lib/libgtest.a && \
cp -a ./include $($(package)_staging_dir)$(host_prefix)/include
endef
else
define $(package)_build_cmds
$(MAKE) -C make CXXFLAGS=-fPIC gtest.a
endef

define $(package)_stage_cmds
install -D ./make/gtest.a $($(package)_staging_dir)$(host_prefix)/lib/libgtest.a && \
cp -a ./include $($(package)_staging_dir)$(host_prefix)/include
endef
endif
endef
11 changes: 6 additions & 5 deletions depends/packages/libgmp.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package=libgmp
$(package)_version=6.1.1
$(package)_download_path=https://gmplib.org/download/gmp/
$(package)_file_name=gmp-$($(package)_version).tar.bz2
$(package)_sha256_hash=a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6
$(package)_download_path=https://github.com/z-classic/$(package)/archive/
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
$(package)_download_file=$($(package)_git_commit).tar.gz
$(package)_sha256_hash=59b2c2b5d58fdf5943bfde1fa709e9eb53e7e072c9699d28dc1c2cbb3c8cc32c
$(package)_git_commit=aece03c7b6967f91f3efdac8c673f55adff53ab1
$(package)_dependencies=
$(package)_config_opts=--enable-cxx --disable-shared

Expand All @@ -11,7 +12,7 @@ define $(package)_config_cmds
endef

define $(package)_build_cmds
$(MAKE) CPPFLAGS='-fPIC'
$(MAKE)
endef

define $(package)_stage_cmds
Expand Down
Loading

0 comments on commit bb8e667

Please sign in to comment.