LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1010|回复: 4

amule-2.2.6-r1::gentoo-china 安装出错

[复制链接]
发表于 2010-7-18 07:52:06 | 显示全部楼层 |阅读模式
Compiling wxcascte.cpp
wxcasframe.cpp: In member function 'wxImage* WxCasFrame::GetStatImage() const':
wxcasframe.cpp:292:58: error: cannot call constructor 'wxFont::wxFont' directly
wxcasframe.cpp:292:58: error:   for a function-style cast, remove the redundant '::wxFont'
make[5]: *** [wxcasframe.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
/usr/libexec/paludis/utils/emake: emake returned error 2

!!! ERROR in net-p2p/amule-2.2.6-r1::gentoo-china:
发表于 2010-7-18 08:24:57 | 显示全部楼层
自己做个补丁吧
把源代码里的wxFont::wxFont改成wxFont
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-7-18 08:49:51 | 显示全部楼层
Post by suran;2103867
把源代码里的wxFont::wxFont改成wxFont

这个方法有效,多谢!
回复 支持 反对

使用道具 举报

发表于 2010-12-15 21:21:49 | 显示全部楼层
cat amule-2.2.6-r1.ebuild
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit eutils flag-o-matic wxwidgets

DLP_P="DLP3904"
MY_P=${PN/m/M}-${PV}
S="${WORKDIR}"/${MY_P}

DESCRIPTION="aMule, the all-platform eMule p2p client"
HOMEPAGE="http://www.amule.org/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2
        http://libantixunlei.googlecode.com/files/${MY_P}-${DLP_P}.patch"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha ~amd64 ~hppa ppc ppc64 ~sparc x86"
IUSE="daemon debug geoip gtk nls remote stats unicode upnp dlp"

DEPEND="=x11-libs/wxGTK-2.8*
        >=dev-libs/crypto++-5
        >=sys-libs/zlib-1.2.1
        stats? ( >=media-libs/gd-2.0.26[jpeg] )
        geoip? ( dev-libs/geoip )
        upnp? ( >=net-libs/libupnp-1.6.6 )
        remote? ( >=media-libs/libpng-1.2.0
        unicode? ( >=media-libs/gd-2.0.26 ) )"

pkg_setup() {
        if ! use gtk && ! use remote && ! use daemon; then
                eerror ""
                eerror "You have to specify at least one of gtk, remote or daemon"
                eerror "USE flag to build amule."
                eerror ""
                die "Invalid USE flag set"
        fi

        if use stats && ! use gtk; then
                einfo "Note: You would need both the gtk and stats USE flags"
                einfo "to compile aMule Statistics GUI."
                einfo "I will now compile console versions only."
        fi
}

pkg_preinst() {
        if use daemon || use remote; then
                enewgroup p2p
                enewuser p2p -1 -1 /home/p2p p2p
        fi
}

src_prepare() {
        use dlp && epatch "${DISTDIR}"/${MY_P}-${DLP_P}.patch
        epatch "${FILESDIR}"/${P}-wxFont.diff
}

src_configure() {
        local myconf

        WX_GTK_VER="2.8"

        if use gtk; then
                einfo "wxGTK with gtk support will be used"
                need-wxwidgets unicode
        else
                einfo "wxGTK without X support will be used"
                need-wxwidgets base
        fi

        if use gtk ; then
                use stats && myconf="${myconf}
                        --enable-wxcas
                        --enable-alc"
                use remote && myconf="${myconf}
                        --enable-amule-gui"
        else
                myconf="
                        --disable-monolithic
                        --disable-amule-gui
                        --disable-wxcas
                        --disable-alc"
        fi

        econf \
                --with-wx-config=${WX_CONFIG} \
                --with-wxbase-config=${WX_CONFIG} \
                --enable-amulecmd \
                $(use_enable debug) \
                $(use_enable !debug optimize) \
                $(use_enable daemon amule-daemon) \
                $(use_enable geoip) \
                $(use_enable nls) \
                $(use_enable remote webserver) \
                $(use_enable stats cas) \
                $(use_enable stats alcc) \
                ${myconf} || die
}

src_install() {
        emake DESTDIR="${D}" install || die

        if use daemon; then
                newconfd "${FILESDIR}"/amuled.confd amuled
                newinitd "${FILESDIR}"/amuled.initd amuled
        fi
        if use remote; then
                newconfd "${FILESDIR}"/amuleweb.confd amuleweb
                newinitd "${FILESDIR}"/amuleweb.initd amuleweb
        fi
}

$ cat ./files/amule-2.2.6-wxFont.diff
diff -Nur ./aMule-2.2.6/src/utils/wxCas/src/wxcasframe.cpp ./aMule-2.2.6.new/src/utils/wxCas/src/wxcasframe.cpp
--- ./aMule-2.2.6/src/utils/wxCas/src/wxcasframe.cpp        2008-09-06 23:39:00.000000000 +0800
+++ ./aMule-2.2.6.new/src/utils/wxCas/src/wxcasframe.cpp        2010-12-15 21:06:11.340000001 +0800
@@ -285,11 +285,11 @@
#ifdef __WXMSW__

        memdc.
-        SetFont ( wxFont::wxFont ( 6, wxSWISS, wxNORMAL, wxBOLD ) );
+        SetFont ( wxFont ( 6, wxSWISS, wxNORMAL, wxBOLD ) );
#else

        memdc.
-        SetFont ( wxFont::wxFont ( 8, wxSWISS, wxNORMAL, wxBOLD ) );
+        SetFont ( wxFont ( 8, wxSWISS, wxNORMAL, wxBOLD ) );
#endif

        memdc.
回复 支持 反对

使用道具 举报

发表于 2011-2-19 13:54:56 | 显示全部楼层
用这个(2011-2-18):
# cat amule-2.2.6-r1.ebuild
  1. # Copyright 1999-2010 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: $
  4. EAPI="2"
  5. inherit eutils flag-o-matic wxwidgets
  6. DLP_P="DLP4302"
  7. MY_P=${PN/m/M}-${PV}
  8. S="${WORKDIR}"/${MY_P}
  9. DESCRIPTION="aMule, the all-platform eMule p2p client"
  10. HOMEPAGE="http://www.amule.org/"
  11. SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2
  12.         http://amule-dlp.googlecode.com/files/${MY_P}-${DLP_P}-base.patch"
  13. LICENSE="GPL-2"
  14. SLOT="0"
  15. KEYWORDS="alpha ~amd64 ~hppa ppc ppc64 ~sparc x86"
  16. IUSE="daemon debug geoip gtk nls remote stats unicode upnp dlp"
  17. DEPEND="=x11-libs/wxGTK-2.8*
  18.         >=dev-libs/crypto++-5
  19.         >=sys-libs/zlib-1.2.1
  20.         stats? ( >=media-libs/gd-2.0.26[jpeg] )
  21.         geoip? ( dev-libs/geoip )
  22.         upnp? ( >=net-libs/libupnp-1.6.6 )
  23.         remote? ( >=media-libs/libpng-1.2.0
  24.         unicode? ( >=media-libs/gd-2.0.26 ) )"
  25. pkg_setup() {
  26.         if ! use gtk && ! use remote && ! use daemon; then
  27.                 eerror ""
  28.                 eerror "You have to specify at least one of gtk, remote or daemon"
  29.                 eerror "USE flag to build amule."
  30.                 eerror ""
  31.                 die "Invalid USE flag set"
  32.         fi
  33.         if use stats && ! use gtk; then
  34.                 einfo "Note: You would need both the gtk and stats USE flags"
  35.                 einfo "to compile aMule Statistics GUI."
  36.                 einfo "I will now compile console versions only."
  37.         fi
  38. }
  39. pkg_preinst() {
  40.         if use daemon || use remote; then
  41.                 enewgroup p2p
  42.                 enewuser p2p -1 -1 /home/p2p p2p
  43.         fi
  44. }
  45. src_prepare() {
  46.         use dlp && epatch "${DISTDIR}"/${MY_P}-${DLP_P}-base.patch
  47. }
  48. src_configure() {
  49.         local myconf
  50.         WX_GTK_VER="2.8"
  51.         if use gtk; then
  52.                 einfo "wxGTK with gtk support will be used"
  53.                 need-wxwidgets unicode
  54.         else
  55.                 einfo "wxGTK without X support will be used"
  56.                 need-wxwidgets base
  57.         fi
  58.         if use gtk ; then
  59.                 use stats && myconf="${myconf}
  60.                         --enable-wxcas
  61.                         --enable-alc"
  62.                 use remote && myconf="${myconf}
  63.                         --enable-amule-gui"
  64.         else
  65.                 myconf="
  66.                         --disable-monolithic
  67.                         --disable-amule-gui
  68.                         --disable-wxcas
  69.                         --disable-alc"
  70.         fi
  71.         econf \
  72.                 --with-wx-config=${WX_CONFIG} \
  73.                 --with-wxbase-config=${WX_CONFIG} \
  74.                 --enable-amulecmd \
  75.                 $(use_enable debug) \
  76.                 $(use_enable !debug optimize) \
  77.                 $(use_enable daemon amule-daemon) \
  78.                 $(use_enable geoip) \
  79.                 $(use_enable nls) \
  80.                 $(use_enable remote webserver) \
  81.                 $(use_enable stats cas) \
  82.                 $(use_enable stats alcc) \
  83.                 ${myconf} || die
  84. }
  85. src_install() {
  86.         emake DESTDIR="${D}" install || die
  87.         if use daemon; then
  88.                 newconfd "${FILESDIR}"/amuled.confd amuled
  89.                 newinitd "${FILESDIR}"/amuled.initd amuled
  90.         fi
  91.         if use remote; then
  92.                 newconfd "${FILESDIR}"/amuleweb.confd amuleweb
  93.                 newinitd "${FILESDIR}"/amuleweb.initd amuleweb
  94.         fi
  95. }
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表