Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] openobex-1.7.1.ebuild und gitorious
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1914
Location: Schweiz

PostPosted: Wed Aug 21, 2013 12:21 pm    Post subject: [solved] openobex-1.7.1.ebuild und gitorious Reply with quote

Ich versuche nun schon seit Stunden ein ebuild zu schreiben das mir openobex in Version 1.7.1 baut und installiert scheitere jedoch laufend am Download.
http://www.gitorious.org/openobex/mainline/trees/1.7.1
Auf der Seite gibt es zwar einen Link zu einer tar.gz-Datei doch wie dieser Link in einem ebuild verwendet werden kann kapiere ich nicht. Und der Versuch das ebuild dazu zu bewegen das ganze über git herunter zu laden ist leider auch gescheitert.

Kann mir einer sagen wie ich das am besten zum laufen bringe?
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW


Last edited by schmidicom on Sun Aug 25, 2013 7:51 am; edited 1 time in total
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Wed Aug 21, 2013 2:20 pm    Post subject: Reply with quote

Das ist ja der 1.7.1er branch, k.A. ob da noch was geändert wird - z.B. bugfixes. Dann kannst du unverhofft Probleme mit dem digest bekommen ;)
Aber im Wiki gibt's nen Link zum release tarball:
http://www.gitorious.org/openobex/pages/Home
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1914
Location: Schweiz

PostPosted: Wed Aug 21, 2013 4:37 pm    Post subject: Reply with quote

Nein, das ist leider auch kein direkter Link und was anderes klappt nicht.
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Wed Aug 21, 2013 5:02 pm    Post subject: Reply with quote

http://surfnet.dl.sourceforge.net/project/openobex/openobex/1.7.1/openobex-1.7.1-Source.tar.gz
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1914
Location: Schweiz

PostPosted: Wed Aug 21, 2013 5:49 pm    Post subject: Reply with quote

Danke, der Download funktionierte damit und nach einigem Gefummel fing cmake sogar an....bevor es dann Selbstmord beging.
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Thu Aug 22, 2013 5:50 am    Post subject: Reply with quote

schmidicom wrote:
Danke, der Download funktionierte damit und nach einigem Gefummel fing cmake sogar an....bevor es dann Selbstmord beging.

Kannst du mal ebuild und Selbstmordmotiv posten?
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1914
Location: Schweiz

PostPosted: Thu Aug 22, 2013 5:58 am    Post subject: Reply with quote

Ja klar, hier:
openobex-1.7.1.ebuild
build.log
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Thu Aug 22, 2013 7:11 am    Post subject: Reply with quote

Die top-level-CMakeLists.txt enthält "project ( openobex C )" - das reduziert die unterstützten Sprachen auf "C" - obwohl später explizit C++ verlangt wird (lies die Kommentare im CMakeLists.txt weiter unten).
Lösung: in src_prepare() ein sed, welches die project-Zeile durch "project ( openobex )" ersetzt. Keine angegebene Sprache == C+CXX -> passt.
Desweiteren: statt in src_unpack die SOurcen zu verschieben setzt du besser S:
Code:
S="${WORKDIR}/${P}-Source"

in dem Block mit SRC_URI usw.
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1914
Location: Schweiz

PostPosted: Thu Aug 22, 2013 7:22 am    Post subject: Reply with quote

Mit sed kann ich nicht umgehen aber ein patchfile tut es vermutlich auch.
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Thu Aug 22, 2013 7:46 am    Post subject: Reply with quote

Code:
EAPI=5
inherit cmake-utils

DESCRIPTION="An implementation of the OBEX protocol used for transferring data to mobile devices"
HOMEPAGE="http://sourceforge.net/projects/openobex/"
SRC_URI="http://surfnet.dl.sourceforge.net/project/openobex/openobex/${PV}/openobex-${PV}-Source.tar.gz"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
IUSE="bluetooth irda usb"
S="${WORKDIR}/${P}-Source"

RDEPEND="bluetooth? ( net-wireless/bluez )
    usb? ( virtual/libusb:1 )"
DEPEND="${RDEPEND}
    !<app-mobilephone/obexftp-0.24
    virtual/pkgconfig
    >=dev-util/cmake-2.8.5"

src_prepare() {
    sed -e 's/project ( openobex C )/project ( openobex )/' -i "${S}"/CMakeLists.txt || die "sed failed"
}

src_configure() {
    local mycmakeargs=(
        $(cmake-utils_use_with bluetooth OPENOBEX_BLUETOOTH)
        $(cmake-utils_use_with irda OPENOBEX_IRDA)
        $(cmake-utils_use_with usb OPENOBEX_USB)
    )
    cmake-utils_src_configure
}

src_install() {
    cmake-utils_src_install
    dodoc README AUTHORS NEWS ChangeLog
}


// edit:
Funktionen in die richtige Reihenfolge gebracht.


Last edited by franzf on Thu Aug 22, 2013 9:19 am; edited 2 times in total
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1914
Location: Schweiz

PostPosted: Thu Aug 22, 2013 7:53 am    Post subject: Reply with quote

Ich dachte das prepare muss vor configure kommen?
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Thu Aug 22, 2013 7:56 am    Post subject: Reply with quote

schmidicom wrote:
Ich dachte das prepare muss vor configure kommen?

Hab ich nicht gesehen, sollte aber reine Kosmetik sein. Das sind Funktionsdefinitionen. portage wird die im ebuild angegebenen Funktionen einfach aufrufen, die Reihenfolge sollte da nebensächlich sein.
Aber üblich ist es, die Funktionen auch in der aufgerufenen Reihenfolge ins ebuild zu setzen, das stimmt.
Funktionieren tut das ebuild jedenfalls.
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1914
Location: Schweiz

PostPosted: Thu Aug 22, 2013 8:17 am    Post subject: Reply with quote

Der Teil zumindest funktioniert aber leider nicht alles. Nach dem cmake soll man laut INSTALL das ganze mit make bauen nur da behauptet das ebuild:
Code:
*** Keine Targets angegeben und keine »make«-Steuerdatei gefunden.  Schluss.


EDIT:
Offensichtlich wird der "make" Befehl im falschen Verzeichnis abgesetzt wird, warum weiß ich noch nicht...
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW


Last edited by schmidicom on Thu Aug 22, 2013 9:01 am; edited 1 time in total
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Thu Aug 22, 2013 9:01 am    Post subject: Reply with quote

Hast du mein ebuild genommen?
Hast du noch ein eigenes src_compile() und src_install drinnen?
Ich habe auch noch "base" aus dem inherit genommen. Das überschreibt die beiden Funktionen in einer für cmake inkompatiblen Version. cmake baut standardmäßig out-of-source ($WORKDIR/$P_build). Dort liegt das Makefile. cmake-utils bringt dafür selber cmake-utils_src_*-Funktionen mit. Ohne "inherit base" werden die auch automatisch genommen. Wenn du selber in src_compile/src_install was machen willst (dodoc, z.B.) kannst du vorher die Funktion aufrufen. z.B.
Code:
src_install() {
    cmake-utils_src_install
    # was auch immer noch installiert werden soll
}
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1914
Location: Schweiz

PostPosted: Thu Aug 22, 2013 9:06 am    Post subject: Reply with quote

Jetzt verstehe ich gar nichts mehr...
Wenn kein src_compile und src_install mehr vorhanden ist woher soll dann emerge wissen was es damit anfangen soll und was ist mit "dodoc README AUTHORS NEWS ChangeLog" aus den alten ebuilds?
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Thu Aug 22, 2013 9:15 am    Post subject: Reply with quote

In der cmake-utils.eclass steht:
Code:
CMAKE_EXPF="src_compile src_test src_install"
case ${EAPI:-0} in
    2|3|4|5) CMAKE_EXPF+=" src_prepare src_configure" ;;
    1|0) eerror "cmake-utils no longer supports EAPI 0-1." && die
    ;;
    *) die "Unknown EAPI, bug eclass maintainers." ;;
esac
EXPORT_FUNCTIONS ${CMAKE_EXPF}

Wenn du NUR cmake-utils im ebuild einbindest, oder eine eclass, die nicht auch die obigen Funktionen exportiert, hast du automatisch ein passendes src_compile usw. Du musst da GAR NICHTS MEHR (!) selber machen.
base.eclass allerdings exportiert diese Funktionen:
Code:
BASE_EXPF="src_unpack src_compile src_install"
case "${EAPI:-0}" in
    2|3|4|5) BASE_EXPF+=" src_prepare src_configure" ;;
    *) ;;
esac

EXPORT_FUNCTIONS ${BASE_EXPF}

Diese überdecken die aus cmake-utils in einer für cmake inkompatiblen Version. Da du nichts aus base brauchst, hab ich das einfach rausgeworfen ;)
Wg. dem dodoc müsste ich erst noch schauen, sollte aber einfach so funktionieren ;)
// edit:
Ja, docs geht straight-forward :) ebuild oben angepasst
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1914
Location: Schweiz

PostPosted: Thu Aug 22, 2013 9:25 am    Post subject: Reply with quote

So hat es auch geklappt:
Code:
EAPI=5
inherit cmake-utils base

DESCRIPTION="An implementation of the OBEX protocol used for transferring data to mobile devices"
HOMEPAGE="http://sourceforge.net/projects/openobex/"
SRC_URI="http://surfnet.dl.sourceforge.net/project/openobex/openobex/${PV}/openobex-${PV}-Source.tar.gz"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
IUSE="bluetooth irda usb"
S="${WORKDIR}/${P}-Source"

RDEPEND="bluetooth? ( net-wireless/bluez )
        usb? ( virtual/libusb:1 )"
DEPEND="${RDEPEND}
        !<app-mobilephone/obexftp-0.24
        virtual/pkgconfig
        >=dev-util/cmake-2.8.5"

src_unpack() {
        unpack ${A}
}

src_prepare() {
        sed -e 's/project ( openobex C )/project ( openobex )/' -i "${S}"/CMakeLists.txt || die "sed failed"
}

src_configure() {
        local mycmakeargs=(
                $(cmake-utils_use_with bluetooth OPENOBEX_BLUETOOTH)
                $(cmake-utils_use_with irda OPENOBEX_IRDA)
                $(cmake-utils_use_with usb OPENOBEX_USB)
        )
        cmake-utils_src_configure
}

src_install() {
        cmake-utils_src_install
        dodoc README AUTHORS NEWS ChangeLog
}

Aber leider baut jetzt dafür obex-data-server nicht mehr, ist wohl nicht kompatibel mit openobex-1.7.1.

Damit kann man diesen Teil meines Versuchs das versenden von Dateien per Bluetooth wieder zum laufen zu bekommen wohl auch als gescheitert ansehen. Vielleicht bastle ich noch ein ebuild für obexftp-0.24, das wäre dann die letzte mir verbleibende Möglichkeit das in den Griff zu bekommen.
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum