View previous topic :: View next topic |
Author |
Message |
mizery de aria Guru
Joined: 07 Dec 2003 Posts: 309
|
Posted: Mon Jul 12, 2010 11:51 am Post subject: Trying to create an ebuild for bitcoin svn |
|
|
Related infos:
Emerged wxGTk-2.9 from https://bugs.gentoo.org/show_bug.cgi?id=298387
https://bugs.gentoo.org/show_bug.cgi?id=328391
http://www.bitcoin.org/smf/index.php?topic=170.msg3696#msg3696
bitcoin-9999.ebuild
Code: | # Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/lightblue/lightblue-0.4.ebuild,v 1.3 2010/03/27 17:57:36 arfrever Exp $
EAPI="2"
inherit distutils eutils subversion
DESCRIPTION="Bitcoin is a peer-to-peer network based digital currency. Peer-to-peer (P2P) means that there is no central authority to issue new money or keep track of transactions. Instead, these tasks are managed collectively by the nodes of the network."
HOMEPAGE="http://bitcoin.org"
ESVN_REPO_URI="https://bitcoin.svn.sourceforge.net/svnroot/${PN}"
LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE=""
DEPEND="dev-libs/openssl
dev-libs/boost
x11-libs/gtk+:2
sys-libs/db:4.8
x11-libs/wxGTK:2.9"
RDEPEND="${DEPEND}"
src_prepare() {
cd trunk
epatch "${FILESDIR}"/${P}-Makefile.patch
make -f makefile.unix
}
src_compile() {
cd trunk
emake
}
src_install() {
cd trunk
dobin bitcoin
} |
files/bitcoin-9999-Makefile.patch
Code: | --- makefile.unix 2010-07-19 00:55:13.421417477 -0500
+++ makefile.gentoo 2010-07-19 00:43:07.871416685 -0500
@@ -1,73 +1,71 @@
-# Copyright (c) 2009-2010 Satoshi Nakamoto
-# Distributed under the MIT/X11 software license, see the accompanying
-# file license.txt or http://www.opensource.org/licenses/mit-license.php.
-
-
-
-INCLUDEPATHS= \
- -I"/usr/include" \
- -I"/usr/local/include/wx-2.9" \
- -I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9"
-
-LIBPATHS= \
- -L"/usr/lib" \
- -L"/usr/local/lib"
-
-WXLIBS= \
- -Wl,-Bstatic \
- -l wx_gtk2ud-2.9 \
- -Wl,-Bdynamic \
- -l gtk-x11-2.0 -l SM
-
-LIBS= \
- -Wl,-Bstatic \
- -l boost_system -l boost_filesystem \
- -l db_cxx \
- -l crypto \
- -Wl,-Bdynamic \
- -l gthread-2.0
-
-WXDEFS=-D__WXGTK__ -DNOPCH
-DEBUGFLAGS=-g -D__WXDEBUG__
-CFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
-HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
- script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h init.h sha.h
-
-
-all: bitcoin
-
-
-headers.h.gch: headers.h $(HEADERS)
- g++ -c $(CFLAGS) -o $@ $<
-
-obj/%.o: %.cpp $(HEADERS) headers.h.gch
- g++ -c $(CFLAGS) -o $@ $<
-
-obj/sha.o: sha.cpp sha.h
- g++ -c $(CFLAGS) -O3 -o $@ $<
-
-OBJS= \
- obj/util.o \
- obj/script.o \
- obj/db.o \
- obj/net.o \
- obj/irc.o \
- obj/main.o \
- obj/rpc.o \
- obj/init.o
-
-bitcoin: $(OBJS) obj/ui.o obj/uibase.o obj/sha.o
- g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
-
-
-obj/nogui/%.o: %.cpp $(HEADERS)
- g++ -c $(CFLAGS) -DwxUSE_GUI=0 -o $@ $<
-
-bitcoind: $(OBJS:obj/%=obj/nogui/%) obj/sha.o
- g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -l wx_baseud-2.9 $(LIBS)
-
-
-clean:
- -rm -f obj/*.o
- -rm -f obj/nogui/*.o
- -rm -f headers.h.gch
+# Copyright (c) 2009-2010 Satoshi Nakamoto
+# Distributed under the MIT/X11 software license, see the accompanying
+# file license.txt or http://www.opensource.org/licenses/mit-license.php.
+
+
+
+INCLUDEPATHS= \
+ -I"/usr/include" \
+ -I"/usr/include/wx-2.9" \
+ -I"/usr/lib/wx/include/gtk2-unicode-2.9" \
+ -I"/usr/include/db4.8"
+
+LIBPATHS= \
+ -L"/usr/lib" \
+ -L"/usr/local/lib"
+
+WXLIBS=$(shell $(shell which wx-config) --libs)
+WXBASELIBS=$(shell $(shell which wx-config) --libs base)
+
+LIBS= \
+ -Wl,-Bstatic \
+ -l boost_system -l boost_filesystem \
+ -l db_cxx \
+ -l crypto \
+ -Wl,-Bdynamic \
+ -l gthread-2.0
+
+WXDEFS=$(shell $(shell which wx-config) --cxxflags) -DNOPCH
+DEBUGFLAGS=-g -DwxDEBUG_LEVEL=0
+CFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
+HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
+ script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h init.h sha.h
+
+
+all: bitcoin
+
+
+headers.h.gch: headers.h $(HEADERS)
+ g++ -c $(CFLAGS) -o $@ $<
+
+obj/%.o: %.cpp $(HEADERS) headers.h.gch
+ g++ -c $(CFLAGS) -o $@ $<
+
+obj/sha.o: sha.cpp sha.h
+ g++ -c $(CFLAGS) -O3 -o $@ $<
+
+OBJS= \
+ obj/util.o \
+ obj/script.o \
+ obj/db.o \
+ obj/net.o \
+ obj/irc.o \
+ obj/main.o \
+ obj/rpc.o \
+ obj/init.o
+
+bitcoin: $(OBJS) obj/ui.o obj/uibase.o obj/sha.o
+ g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
+
+
+obj/nogui/%.o: %.cpp $(HEADERS)
+ g++ -c $(CFLAGS) -DwxUSE_GUI=0 -o $@ $<
+
+bitcoind: $(OBJS:obj/%=obj/nogui/%) obj/sha.o
+ g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXBASELIBS) $(LIBS)
+
+
+clean:
+ -rm -f obj/*.o
+ -rm -f obj/nogui/*.o
+ -rm -f headers.h.gch |
Code: | # eselect wxwidgets list
Available wxWidgets profiles:
[1] gtk2-ansi-release-2.6
[2] gtk2-unicode-2.9
[3] gtk2-unicode-release-2.6
[4] gtk2-unicode-release-2.8
# eselect wxwidgets show
Current wxWidgets profile:
none
# eselect wxwidgets set 2
Setting wxWidgets profile to gtk2-unicode-2.9
# eselect wxwidgets list
Available wxWidgets profiles:
[1] gtk2-ansi-release-2.6
[2] gtk2-unicode-2.9 *
[3] gtk2-unicode-release-2.6
[4] gtk2-unicode-release-2.8 |
_________________ Do not repIy to or othErwise communicate with me if you use religious, spiritual or similar terminologies or references in your typings.
Last edited by mizery de aria on Mon Jul 19, 2010 8:17 am; edited 10 times in total |
|
Back to top |
|
|
floppymaster Developer
Joined: 07 Jul 2010 Posts: 229 Location: Detroit, MI, USA
|
Posted: Tue Jul 13, 2010 3:51 am Post subject: |
|
|
First of all, can you even get this to build without throwing an ebuild into the mix?
That sed statement is doing some funny stuff to the include path -- are you trying to get this to work with wx-2.8? The doc you included says you need 2.9.
Also, an ebuild for a python based package is probably not a good starting point for a C++ program. |
|
Back to top |
|
|
mizery de aria Guru
Joined: 07 Dec 2003 Posts: 309
|
Posted: Tue Jul 13, 2010 4:24 am Post subject: |
|
|
I cannot get this to build yet. I do not understand what to do. Also, I know the ebuild looks ugly. I have no idea how to write ebuilds and am just trying to get a working installation for now. _________________ Do not repIy to or othErwise communicate with me if you use religious, spiritual or similar terminologies or references in your typings. |
|
Back to top |
|
|
Letharion Veteran
Joined: 13 Jun 2005 Posts: 1344 Location: Sweden
|
Posted: Tue Jul 13, 2010 9:46 am Post subject: |
|
|
I've been trying to make it build without portage/ebuilds, and the first error message I get is the same.
I think it boils down to wxwidgets 2.8/2.9, and 2.9 isn't in portage AFAICT |
|
Back to top |
|
|
titanofold Developer
Joined: 30 Dec 2003 Posts: 235 Location: Bryson City, NC USA
|
|
Back to top |
|
|
Letharion Veteran
Joined: 13 Jun 2005 Posts: 1344 Location: Sweden
|
Posted: Tue Jul 13, 2010 1:24 pm Post subject: |
|
|
Dunno why someone would to that, but after manually building 2.9 I get bitcoin to build and run.
Since 2.9 probably shouldn't be in portage, I will try to find the time to post instructions somewhere for those that are interested. |
|
Back to top |
|
|
mizery de aria Guru
Joined: 07 Dec 2003 Posts: 309
|
Posted: Sun Jul 18, 2010 4:19 am Post subject: |
|
|
I tried writing my own ebuild for wxGTK-2.9.0 but failed. Instead I used dirtyepic overlay.
https://bugs.gentoo.org/show_bug.cgi?id=298387 _________________ Do not repIy to or othErwise communicate with me if you use religious, spiritual or similar terminologies or references in your typings. |
|
Back to top |
|
|
mizery de aria Guru
Joined: 07 Dec 2003 Posts: 309
|
Posted: Mon Jul 19, 2010 1:18 am Post subject: |
|
|
freenode/wxwidgets
Quote: | <necrodearia> I am trying to install bitcoin svn on a gentoo linux system. It requires wxGTK-2.9. I have it installed. When trying to compile the ebuild I wrote https://forums.gentoo.org/viewtopic-p-6348826.html#6348826 I receive errors from /usr/include/wx-2.9/wx/chkconf.h. I read the comments at the top of the file, but I do not understand them.
<necrodearia> http://pastebin.com/LTL4MNKU
<necrodearia> /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT *
<Auria> how did you install wx 2.9?
<Auria> looks like a bad install or various mixed up installations
<necrodearia> /usr/lib64/wx/include/gtk2-unicode-2.9/wx/setup.h exists
<necrodearia> Auria, I used https://bugs.gentoo.org/show_bug.cgi?id=298387 to install wxGTK-2.9
<Auria> do you have many wx installs? maybe it pickes the wrong one
<Auria> Ok, don't know gentoo ebuilds much
<Auria> also, can you post the exact errors you get
<necrodearia> Ah, that could be true. I do have multiple wx installs
<Auria> do you use wx-config? (or does the project use wx-config) wx-config is generally smart at separating separate installaitons properly but you're not helping it by having them in the first place
<Auria> Often people here will recommend to build wx from source but not install it to /usr/* but just keep it local, avoiding all possible conflicts
<necrodearia> I haven't used wx-config. I'll check it out.
<Auria> I suppose the project you're building uses it in its build system
<Auria> If not, then it should
<necrodearia> Auria: http://pastebin.com/eyRjiK24
<Auria> you're on OS X?
<Auria> these are from the OS X makefile
<Auria> no gentoo ^^
<Auria> if it's using autotools/CMake maybe it's just importing the wx definition files, and these files mention wx-config
<Auria> anyway, it *probably* uses wx-confog
<necrodearia> I'm using gentoo linux
<Auria> Can you build a mnimal wx sample yourself?
<Auria> If we can move away from that big project it may get easier
<necrodearia> hmm
<necrodearia> The source code contains makefile.mingw, makefile.osx, makefile.unix and makefile.vc. But it appears only the osx makefile uses wx-config
<necrodearia> s/source code/package/
<Auria> humm, wonder what makefile.unix does then
<Auria> hope it doesn't hardcode build flags
<necrodearia> makefile.unix: http://pastebin.com/HFpFAZmY
<Auria> arg, they hardcode build flags xD
<Auria> very bad idea they had here.
<necrodearia> mm, well, good to know. I can report it to devteam and maybe they can fix it.
<Auria> yes, they really should use wx-config
<Auria> otherwise only people with exactly the same wxWidgets configuration as them will be able to build the app |
_________________ Do not repIy to or othErwise communicate with me if you use religious, spiritual or similar terminologies or references in your typings. |
|
Back to top |
|
|
mizery de aria Guru
Joined: 07 Dec 2003 Posts: 309
|
|
Back to top |
|
|
Polyatomic n00b
Joined: 18 May 2014 Posts: 36
|
Posted: Sun Jul 06, 2014 7:31 am Post subject: |
|
|
mizery de aria wrote: | http://github.com/mizerydearia/bitcoin_gentoo_ebuild |
G'day I m new to the forums, and was wondering how I could get bitcoind installed on Gentoo. I am interested to know if any of you guys have bitcoind running on your machines. Did you compile all the dependencies such as boost and Berkeleydb4.8 from source. Anyway I will keep researching and come back later. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Jul 06, 2014 9:27 am Post subject: |
|
|
Polyatomic wrote: | G'day I m new to the forums, and was wondering how I could get bitcoind installed on Gentoo. I am interested to know if any of you guys have bitcoind running on your machines. Did you compile all the dependencies such as boost and Berkeleydb4.8 from source. Anyway I will keep researching and come back later. |
Polyatomic ... the package is in the tree ...
Code: | # eix -e bitcoind
* net-p2p/bitcoind
Available versions: 0.8.5 ~0.8.6 ~0.8.6-r1 {bash-completion examples ipv6 logrotate upnp}
Homepage: http://bitcoin.org/
Description: Original Bitcoin crypto-currency wallet for automated services |
sys-libs/db, dev-libs/boost, etc, are pulled in as a dependency of the package, so no need to install via sources.
best ... khay |
|
Back to top |
|
|
Polyatomic n00b
Joined: 18 May 2014 Posts: 36
|
Posted: Tue Jul 08, 2014 7:18 am Post subject: |
|
|
khayyam wrote: | Polyatomic wrote: | G'day I m new to the forums, and was wondering how I could get bitcoind installed on Gentoo. I am interested to know if any of you guys have bitcoind running on your machines. Did you compile all the dependencies such as boost and Berkeleydb4.8 from source. Anyway I will keep researching and come back later. |
Polyatomic ... the package is in the tree ...
Code: | # eix -e bitcoind
* net-p2p/bitcoind
Available versions: 0.8.5 ~0.8.6 ~0.8.6-r1 {bash-completion examples ipv6 logrotate upnp}
Homepage: http://bitcoin.org/
Description: Original Bitcoin crypto-currency wallet for automated services |
sys-libs/db, dev-libs/boost, etc, are pulled in as a dependency of the package, so no need to install via sources.
best ... khay |
Good to meet you man, cheers for that. |
|
Back to top |
|
|
|