diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-05-08 13:42:03 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-05-08 13:42:03 +0000 |
commit | 7e41e855da70522b776e11a230448c80340e72f3 (patch) | |
tree | bf5ad6e2e57da6c7f2e9111e86a0ae7299caab95 /testing/bitcoin | |
parent | 3c201cf3c1b78959444efa8cc2c49ecff7a6727c (diff) | |
download | aports-7e41e855da70522b776e11a230448c80340e72f3.tar.bz2 aports-7e41e855da70522b776e11a230448c80340e72f3.tar.xz |
testing/bitcoin: enable qt interface fix locale bug
Diffstat (limited to 'testing/bitcoin')
-rw-r--r-- | testing/bitcoin/20-set-default-env.patch | 38 | ||||
-rw-r--r-- | testing/bitcoin/APKBUILD | 33 |
2 files changed, 64 insertions, 7 deletions
diff --git a/testing/bitcoin/20-set-default-env.patch b/testing/bitcoin/20-set-default-env.patch new file mode 100644 index 0000000000..a2e7833c1d --- /dev/null +++ b/testing/bitcoin/20-set-default-env.patch @@ -0,0 +1,38 @@ +--- ./src/bitcoin-cli.cpp ++++ ./src/bitcoin-cli.cpp +@@ -53,6 +53,16 @@ + + int main(int argc, char* argv[]) + { ++ #ifndef WIN32 ++ try ++ { ++ boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid ++ } catch(std::runtime_error &e) ++ { ++ setenv("LC_ALL", "C", 1); // Force C locale ++ } ++ #endif ++ + try + { + if(!AppInitRPC(argc, argv)) +--- ./src/bitcoind.cpp ++++ ./src/bitcoind.cpp +@@ -166,6 +166,16 @@ + + int main(int argc, char* argv[]) + { ++ #ifndef WIN32 ++ try ++ { ++ boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid ++ } catch(std::runtime_error &e) ++ { ++ setenv("LC_ALL", "C", 1); // Force C locale ++ } ++ #endif ++ + bool fRet = false; + + // Connect bitcoind signal handlers diff --git a/testing/bitcoin/APKBUILD b/testing/bitcoin/APKBUILD index 5884c04f3a..9b9d08bae0 100644 --- a/testing/bitcoin/APKBUILD +++ b/testing/bitcoin/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=bitcoin pkgver=0.9.1 -pkgrel=0 +pkgrel=1 pkgdesc="decentralized P2P electronic cash system" url="http://www.bitcoin.org/" arch="all" @@ -9,11 +9,14 @@ license="MIT" depends="" depends_dev="" makedepends="$depends_dev boost-dev openssl-dev db-dev miniupnpc-dev + qt5-qtbase-dev qt5-qttools-dev protobuf-dev libqrencode-dev autoconf automake libtool" install="" -subpackages="" +subpackages="$pkgname-qt $pkgname-cli" source="$pkgname-$pkgver.tar.gz::https://github.com/bitcoin/bitcoin/archive/v$pkgver.tar.gz - ssize_t.patch" + ssize_t.patch + 20-set-default-env.patch + " _builddir="$srcdir"/bitcoin-$pkgver prepare() { @@ -36,18 +39,34 @@ build() { --mandir=/usr/share/man \ --with-incompatible-bdb \ --disable-ccache \ + --with-gui=qt5 \ || return 1 make || return 1 } package() { cd "$_builddir" - install -Dm755 src/bitcoind "$pkgdir"/usr/bin/bitcoind || return 1 + make install DESTDIR="$pkgdir" || return 1 +} + +qt() { + pkgdesc="Bitcoin with a Qt frontend & QR Code support" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/bitcoin-qt "$subpkgdir"/usr/bin/ || return 1 +} + +cli() { + pkgdesc="Bitcoin CLI" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/bitcoin-cli "$subpkgdir"/usr/bin/ || return 1 } md5sums="7a9c14c09b04e3e37d703fbfe5c3b1e2 bitcoin-0.9.1.tar.gz -716a88e668729e89d3eb929da86f7f04 ssize_t.patch" +716a88e668729e89d3eb929da86f7f04 ssize_t.patch +1803737cb8f5f95587323b0209bf9df4 20-set-default-env.patch" sha256sums="bf5021a426b5e38a741a5294a0ceb22daa74cda11c6dc0478c4aa48c55fdccb3 bitcoin-0.9.1.tar.gz -f0a094c7b374338ad153ee06b7dd2369dad6b97b1f1bb0252da12c9aaace5321 ssize_t.patch" +f0a094c7b374338ad153ee06b7dd2369dad6b97b1f1bb0252da12c9aaace5321 ssize_t.patch +b9d482ad6fbdaf843ba7b8a20b4fad2624ddaa5e1d1cc3c906a3da37c6e9cdf6 20-set-default-env.patch" sha512sums="75be422fc263f209783fc66d9fd99027d67c7460c599a23badafcf5546ce7cb21206fce04c516a1c101aeff13542b332249b3b70a70c483aa82a5048dbdc9d92 bitcoin-0.9.1.tar.gz -98aa5ad81bdb4ae961b791bc978c39117cdf2d83c2181f92bebbb0db107d9b6e86eda265fb3f93ff8a5ca8a7754d7148818b98095d57201dff9363d60b97e7dd ssize_t.patch" +98aa5ad81bdb4ae961b791bc978c39117cdf2d83c2181f92bebbb0db107d9b6e86eda265fb3f93ff8a5ca8a7754d7148818b98095d57201dff9363d60b97e7dd ssize_t.patch +42f063926d0c527b74b643bc075af41a6530a295e470e95d6e5d0863a4d946a072b4e6925a96fc48591a038e03d77b30a88f0595da52b531aef3bfa72a2738be 20-set-default-env.patch" |