summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-p2p/litecoin-qt/Manifest24
-rw-r--r--net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch193
-rw-r--r--net-p2p/litecoin-qt/litecoin-qt-0.8.5.3_rc3.ebuild144
-rw-r--r--net-p2p/litecoin-qt/metadata.xml12
4 files changed, 373 insertions, 0 deletions
diff --git a/net-p2p/litecoin-qt/Manifest b/net-p2p/litecoin-qt/Manifest
new file mode 100644
index 0000000..b1cc27a
--- /dev/null
+++ b/net-p2p/litecoin-qt/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX litecoin-sys_leveldb.patch 7264 SHA256 61e2f69923572903fe7a7f23b38eb6b4c71f19f09ca7881da085174688d3d684 SHA512 96030e7ce3062facf9231b9ae99945c5eb5f5989cb274e9249ebe444b07970d17ed46ec721ad89cf9c607ca8bb86c0a41024e25ab6859df80029b3f03fad0038 WHIRLPOOL 742c70b2a55b3f45862b09717737415f8ff69c5b2700153fb9df810e3a4665df82112e01d30d089403ff5cc21c7b3c25fb13b0ba6f718bfb82c364a546615124
+DIST litecoin-0.8.5.3-rc3.tar.gz 4804918 SHA256 67d2f14ab654825bf21abbb4d2c4681a6af4c3b074a2a1813d6da63fea3a8afc SHA512 640cd8a60122cc26889c81bddd20057c20557ae9a9eea431b68421f5ee37f7938ca2776196649b553b05977278242c4d1bab520671cae549227c1f69835a72b5 WHIRLPOOL f327423e13a1d8e092c54f6201362a8c32acff87a71fd17a737c22e57e09472f579dfdbedcd398fabab75e8f5f7a5559ff566df737fec410baf8dfe80fb3bb6d
+EBUILD litecoin-qt-0.8.5.3_rc3.ebuild 3183 SHA256 9a370a4c22dedabc41ac8b78c5502ce5810b07ca44869b9602de7b71ac2e8dd9 SHA512 0e4631aa9c73f34c5df1627cbdc3e6be21501dc067bd0ac56f517b50d2bd4e6650f20075b6580ec86ad3bca1b3047320682546509abf9a426cec4c61ab66bdbd WHIRLPOOL 3055061674f9e1ed7a76edbc892343fa4a1f8c9fd7c491f0128a16b6ebde0297a1f0502e1df63238a700ba08c185ee0d3fdc6ba700d4e7d90fee05e9392246af
+MISC metadata.xml 410 SHA256 11dd35369374e9d177c13cc65343f63d8138003f943bc098dbf51a322d55f263 SHA512 45ae0fa8f2dfd1bfbaf1802e5d56df1777c5b8cedcd64645d462bb0250eda2a4c70ac756017ccb471475d9c0682dce53fbfc1d0dff12699545d8b6df2c5020e8 WHIRLPOOL b51d5222220a24d3fa72084ab4ec59c5e7de827ca19838aea9f03a3d57fe303cad988d7ef8aafec8538db55d347466a239e82f64264994a9c00af40fbf156332
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.22 (GNU/Linux)
+
+iQIcBAEBCAAGBQJSmRecAAoJEJOE+m71LUu6+pcP/i8hMRFNHw9Pc5OxDNVkOJ8+
+oSBfsHaGvmTHyMrjQzO3A7T+pGdIj9gQ11jtwylcymKCPLNHIF/lJynbKovA4JzL
+HurpPdcOIMSeGSfDl9tyLQDA3sZyxdxENyibuI2151ZkJhrFiZ9NdirEC+3PI9dM
+hrfPBtheHPPivMWE5bsT300S5uh41gw4IaDd38o4ab2LxKbsYgCdOb97M7OOgdtI
+4GvtFDZz0wE6S1i+vphbbxOIRJ3MWDOr+DvZlX4nW4ZSNaS8PIZn9R3ryc5+bLag
+UmOZz2hX5HkDPqPCXGAPg78VDmjLsEJmiYhAToi7BjrrwhRGGKHRRU1MNyrgJGBq
+PQDtbiaoyGkgl9V9Zo22QQzDDoBjq38f1u4ec0YonZav7fh4lC75vs3vgOsHn2GW
+X9USmKqBJR8USV6C9SYd6gIFAnTW0r1Audx/vArJ1FS5OH6MyY1B+BdUguXqayvR
+SfCaiJbPouEjP37DeqoRttjYAX0O3uFyQjQ3KyNux1bTpzH1aCG8+LyKEqfxN3IY
+5PqB/PxgYRfIPPMeaSzpGWQKC1viSwSzEN88z4TORBGcpCAh2ZKrDtvRpofkJnev
+ubRpVmVIUJsPmUaDjAMwPw0LkpZK6Fay0FJktJzYBMIW2SWIvwEVGxJ9gg9ZxKto
+8WMiEsUBLkLPoBasFwmC
+=Dxnw
+-----END PGP SIGNATURE-----
diff --git a/net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch b/net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch
new file mode 100644
index 0000000..a4ae56a
--- /dev/null
+++ b/net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch
@@ -0,0 +1,193 @@
+diff -Naur litecoin-0.8.5.3-rc3.orig/bitcoin-qt.pro litecoin-0.8.5.3-rc3/bitcoin-qt.pro
+--- litecoin-0.8.5.3-rc3.orig/bitcoin-qt.pro 2013-11-28 21:17:05.000000000 -0500
++++ litecoin-0.8.5.3-rc3/bitcoin-qt.pro 2013-11-29 14:53:00.960537685 -0500
+@@ -5,7 +5,7 @@
+ INCLUDEPATH += src src/json src/qt
+ QT += core gui network
+ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
++DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV
+ CONFIG += no_include_pwd
+ CONFIG += thread
+
+@@ -101,25 +101,30 @@
+ QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
+ }
+
++contains(USE_SYSTEM_LEVELDB, 1) {
++ LIBS += -lleveldb
++} else {
+ INCLUDEPATH += src/leveldb/include src/leveldb/helpers
+-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
++LIBS += $$PWD/src/leveldb/libleveldb.a
+ !win32 {
+ # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a
+ } else {
+ # make an educated guess about what the ranlib command is called
+ isEmpty(QMAKE_RANLIB) {
+ QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
+ }
+ LIBS += -lshlwapi
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a
+ }
+ genleveldb.target = $$PWD/src/leveldb/libleveldb.a
+ genleveldb.depends = FORCE
+ PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
+ QMAKE_EXTRA_TARGETS += genleveldb
++}
+ # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
+-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
++QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true
++
+
+ # regenerate src/build.h
+ !win32|contains(USE_BUILD_INFO, 1) {
+diff -Naur litecoin-0.8.5.3-rc3.orig/src/leveldb.cpp litecoin-0.8.5.3-rc3/src/leveldb.cpp
+--- litecoin-0.8.5.3-rc3.orig/src/leveldb.cpp 2013-11-28 21:17:05.000000000 -0500
++++ litecoin-0.8.5.3-rc3/src/leveldb.cpp 2013-11-29 14:55:33.760543008 -0500
+@@ -8,7 +8,9 @@
+ #include <leveldb/env.h>
+ #include <leveldb/cache.h>
+ #include <leveldb/filter_policy.h>
+-#include <memenv/memenv.h>
++#ifndef LEVELDB_WITHOUT_MEMENV
++#include <memenv.h>
++#endif
+
+ #include <boost/filesystem.hpp>
+
+@@ -43,8 +45,12 @@
+ options = GetOptions(nCacheSize);
+ options.create_if_missing = true;
+ if (fMemory) {
++#ifndef LEVELDB_WITHOUT_MEMENV
+ penv = leveldb::NewMemEnv(leveldb::Env::Default());
+ options.env = penv;
++#else
++ throw std::runtime_error("CLevelDB(): compiled without memenv support");
++#endif
+ } else {
+ if (fWipe) {
+ printf("Wiping LevelDB in %s\n", path.string().c_str());
+diff -Naur litecoin-0.8.5.3-rc3.orig/src/makefile.unix litecoin-0.8.5.3-rc3/src/makefile.unix
+--- litecoin-0.8.5.3-rc3.orig/src/makefile.unix 2013-11-28 21:17:05.000000000 -0500
++++ litecoin-0.8.5.3-rc3/src/makefile.unix 2013-11-29 15:08:58.337571033 -0500
+@@ -110,8 +110,7 @@
+ # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work.
+ xLDFLAGS=$(LDHARDENING) $(LDFLAGS)
+
+-OBJS= \
+- leveldb/libleveldb.a \
++BASEOBJS := \
+ obj/alert.o \
+ obj/version.o \
+ obj/checkpoints.o \
+@@ -120,7 +119,6 @@
+ obj/crypter.o \
+ obj/key.o \
+ obj/db.o \
+- obj/init.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/net.o \
+@@ -141,9 +139,17 @@
+ obj/hash.o \
+ obj/bloom.o \
+ obj/noui.o \
+- obj/leveldb.o \
+ obj/txdb.o
+
++OBJS := \
++ obj/leveldb.o \
++ obj/init.o \
++ $(BASEOBJS)
++
++TESTOBJS := \
++ obj-test/leveldb.o \
++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \
++ $(BASEOBJS)
+
+ ifdef USE_SSE2
+ DEFS += -DUSE_SSE2
+@@ -156,15 +162,25 @@
+ test check: test_litecoin FORCE
+ ./test_litecoin
+
++ifdef USE_SYSTEM_LEVELDB
++ LIBS += -lleveldb
++ TESTLIBS += -lmemenv
++else
+ #
+ # LevelDB support
+ #
+ MAKEOVERRIDES =
+-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
++LIBS += $(CURDIR)/leveldb/libleveldb.a
++TESTLIBS += $(CURDIR)/leveldb/libmemenv.a
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/include)
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
+ leveldb/libleveldb.a:
+- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd ..
++ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd ..
++leveldb/libmemenv.a:
++ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd ..
++OBJS += leveldb/libleveldb.a
++TESTOBJS += leveldb/libmemenv.a
++endif
+
+ # auto-generated dependencies:
+ -include obj/*.P
+@@ -175,33 +191,34 @@
+ version.cpp: obj/build.h
+ DEFS += -DHAVE_BUILD_INFO
+
+-obj/%-sse2.o: %-sse2.cpp
+- $(CXX) -c $(xCXXFLAGS) -msse2 -MMD -MF $(@:%.o=%.d) -o $@ $<
++P_TO_D = \
+ @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
++ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+ rm -f $(@:%.o=%.d)
+
++obj/%-sse2.o: %-sse2.cpp
++ $(CXX) -c $(xCXXFLAGS) -msse2 -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
++
+ obj/%.o: %.cpp
+- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
+- @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+- rm -f $(@:%.o=%.d)
++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+-litecoind: $(OBJS:obj/%=obj/%)
++litecoind: $(OBJS)
+ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
+
+-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
+-
+ obj-test/%.o: test/%.cpp
+ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
+- @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+- rm -f $(@:%.o=%.d)
++ $(P_TO_D)
++
++obj-test/leveldb.o: leveldb.cpp
++ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
++
++TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
+
+-test_litecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
++test_litecoin: $(TESTOBJS)
+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
+
+ clean:
diff --git a/net-p2p/litecoin-qt/litecoin-qt-0.8.5.3_rc3.ebuild b/net-p2p/litecoin-qt/litecoin-qt-0.8.5.3_rc3.ebuild
new file mode 100644
index 0000000..dc5cf2f
--- /dev/null
+++ b/net-p2p/litecoin-qt/litecoin-qt-0.8.5.3_rc3.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+DB_VER="4.8"
+
+LANGS="af_ZA ar bg bs ca ca_ES cs cy da de el_GR en eo es es_CL et eu_ES fa fa_IR fi fr fr_CA gu_IN he hi_IN hr hu it ja la lt lv_LV nb nl pl pt_BR pt_PT ro_RO ru sk sr sv th_TH tr uk zh_CN
+ zh_TW"
+inherit db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2
+
+MyPV="${PV/_/-}"
+MyPN="litecoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="P2P Internet currency based on Bitcoin but easier to mine."
+HOMEPAGE="https://litecoin.org/"
+SRC_URI="https://github.com/${MyPN}-project/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyP}.tar.gz"
+
+LICENSE="MIT ISC GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dbus ipv6 kde +qrcode upnp"
+
+RDEPEND="
+ >=dev-libs/boost-1.41.0[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ qrcode? (
+ media-gfx/qrencode
+ )
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ <=dev-libs/leveldb-1.12.0[-snappy]
+ dev-qt/qtgui:4
+ dbus? (
+ dev-qt/qtdbus:4
+ )
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+DOCS="doc/README.md doc/release-notes.md"
+
+S="${WORKDIR}/${MyP}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${MyPN}-sys_leveldb.patch
+ rm -r src/leveldb
+
+ cd src || die
+
+ local filt= yeslang= nolang=
+
+ for lan in $LANGS; do
+ if [ ! -e qt/locale/bitcoin_$lan.ts ]; then
+ ewarn "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in $(ls qt/locale/*.ts)
+ do
+ x="${ts/*bitcoin_/}"
+ x="${x/.ts/}"
+ if ! use "linguas_$x"; then
+ nolang="$nolang $x"
+ rm "$ts"
+ filt="$filt\\|$x"
+ else
+ yeslang="$yeslang $x"
+ fi
+ done
+
+ filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
+ sed "/${filt}/d" -i 'qt/bitcoin.qrc'
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+}
+
+src_configure() {
+ OPTS=()
+
+ use dbus && OPTS+=("USE_DBUS=1")
+ if use upnp; then
+ OPTS+=("USE_UPNP=1")
+ else
+ OPTS+=("USE_UPNP=-")
+ fi
+
+ use qrcode && OPTS+=("USE_QRCODE=1")
+ use ipv6 || OPTS+=("USE_IPV6=-")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ if has_version '>=dev-libs/boost-1.52'; then
+ OPTS+=("LIBS+=-lboost_chrono\$\$BOOST_LIB_SUFFIX")
+ fi
+
+ #The litecoin codebase is mostly taken from bitcoin-qt
+ eqmake4 bitcoin-qt.pro "${OPTS[@]}"
+}
+
+#Tests are broken with and without our litecoin-sys_leveldb.patch
+#src_test() {
+# cd src || die
+# emake -f makefile.unix "${OPTS[@]}" test_litecoin
+# ./test_litecoin || die 'Tests failed'
+#}
+
+src_install() {
+ qt4-r2_src_install
+
+ dobin ${PN}
+
+ insinto /usr/share/pixmaps
+ newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
+
+ make_desktop_entry "${PN} %u" "Litecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/litecoin;\nTerminal=false"
+
+ newman contrib/debian/manpages/bitcoin-qt.1 ${PN}.1
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ newins contrib/debian/bitcoin-qt.protocol ${PN}.protocol
+ fi
+}
+
+update_caches() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+ buildsycoca
+}
+
+pkg_postinst() {
+ update_caches
+}
+
+pkg_postrm() {
+ update_caches
+}
diff --git a/net-p2p/litecoin-qt/metadata.xml b/net-p2p/litecoin-qt/metadata.xml
new file mode 100644
index 0000000..0e8b4f9
--- /dev/null
+++ b/net-p2p/litecoin-qt/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name='1stclassmsg'>Enable first-class Bitcoin message tools</flag>
+ <flag name='qrcode'>Enable generation of QR Codes for receiving payments</flag>
+ </use>
+</pkgmetadata>