Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
obdgpslogger ebuild (solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
rjmars97
n00b
n00b


Joined: 08 May 2006
Posts: 51
Location: Idaho

PostPosted: Tue Jul 20, 2010 6:47 pm    Post subject: obdgpslogger ebuild (solved) Reply with quote

I couldn't find an ebuild for obdgpslogger so I figured I'd attempt to write one myself. Unfortunately, my ebuild does not seem to work correctly.

Code:
#Copyright 2010 Gentoo Foundation
#Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2
inherit cmake-utils

DESCRIPTION="Logs OBDII and GPS data"
HOMEPAGE="http://icculus.org/odbgpslogger"
SCR_URI="http://icculus.org/obdgpslogger/downloads/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="gps"

RDEPEND="gps? ( sci-geosciences/gpsd )"

src_compile() {
        mkdir build
        cd build
        cmake ..
        emake || die
}

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


The website says this about building it:
Quote:
mkdir build
cd build
cmake .. # or ccmake to edit options
make
make install # optional

Binaries are placed in the "bin" dir of your top level source directory. If you want to install to a different prefix, change CMAKE_INSTALL_PREFIX when you run ccmake

I suspect that I'm not doing cmake correctly, but I'm not sure how to handle it. I did find this thread, but it doesn't specify how to write the scr_compile function. https://forums.gentoo.org/viewtopic-t-813602-start-0.html
The ebuild as written produces this error
Code:
>>> Emerging (1 of 1) app-misc/obdgpslogger-0.15 from darkstar_overlay
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * CPV:  app-misc/obdgpslogger-0.15
 * REPO: darkstar_overlay
 * USE:  elibc_glibc kernel_linux userland_GNU x86
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/app-misc/obdgpslogger-0.15/work
>>> Preparing source in /var/tmp/portage/app-misc/obdgpslogger-0.15/work ...
/var/tmp/portage/app-misc/obdgpslogger-0.15/temp/environment: line 415: pushd: /var/tmp/portage/app-misc/obdgpslogger-0.15/work/obdgpslogger-0.15: No such file or directory
/var/tmp/portage/app-misc/obdgpslogger-0.15/temp/environment: line 447: popd: directory stack empty
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-misc/obdgpslogger-0.15/work ...
>>> Working in BUILD_DIR: "/var/tmp/portage/app-misc/obdgpslogger-0.15/work/obdgpslogger-0.15_build"
 * Unable to locate CMakeLists.txt under:
 * "/var/tmp/portage/app-misc/obdgpslogger-0.15/work/obdgpslogger-0.15/CMakeLists.txt"
 * Consider not inheriting the cmake eclass.
 * ERROR: app-misc/obdgpslogger-0.15 failed:
 *   FATAL: Unable to find CMakeLists.txt
 *
 * Call stack:
 *     ebuild.sh, line   54:  Called src_configure
 *   environment, line 2889:  Called cmake-utils_src_configure
 *   environment, line  700:  Called _execute_optionaly 'src_configure'
 *   environment, line  178:  Called enable_cmake-utils_src_configure
 *   environment, line 1069:  Called die
 * The specific snippet of code:
 *           die "FATAL: Unable to find CMakeLists.txt";
 *
 * If you need support, post the output of 'emerge --info =app-misc/obdgpslogger-0.15',
 * the complete build log and the output of 'emerge -pqv =app-misc/obdgpslogger-0.15'.
 * This ebuild is from an overlay named 'darkstar_overlay': '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/app-misc/obdgpslogger-0.15/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-misc/obdgpslogger-0.15/temp/environment'.
 * S: '/var/tmp/portage/app-misc/obdgpslogger-0.15/work/obdgpslogger-0.15'

>>> Failed to emerge app-misc/obdgpslogger-0.15, Log file:

>>>  '/var/tmp/portage/app-misc/obdgpslogger-0.15/temp/build.log'

The CMakeLists.txt file is in the tarball but apparently is not in the place that portage is looking. Any help would be appreciated.
_________________
I opened Pandora's box, let the cat out of the bag and put the ball in their court.
-- Hon. J. Hacker (The Ministry of Administrative Affairs)


Last edited by rjmars97 on Wed Jul 21, 2010 3:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5387

PostPosted: Tue Jul 20, 2010 8:02 pm    Post subject: Reply with quote

try this:
Code:
#Copyright 2010 Gentoo Foundation
#Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2
inherit cmake-utils

DESCRIPTION="Logs OBDII and GPS data"
HOMEPAGE="http://icculus.org/odbgpslogger"
SCR_URI="http://icculus.org/obdgpslogger/downloads/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="gps"

RDEPEND="gps? ( sci-geosciences/gpsd )"

S=${WORKDIR}/build


_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
rjmars97
n00b
n00b


Joined: 08 May 2006
Posts: 51
Location: Idaho

PostPosted: Tue Jul 20, 2010 11:03 pm    Post subject: Reply with quote

DaggyStyle wrote:
try this:
Code:
#Copyright 2010 Gentoo Foundation
#Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2
inherit cmake-utils

DESCRIPTION="Logs OBDII and GPS data"
HOMEPAGE="http://icculus.org/odbgpslogger"
SCR_URI="http://icculus.org/obdgpslogger/downloads/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="gps"

RDEPEND="gps? ( sci-geosciences/gpsd )"

S=${WORKDIR}/build



This causes the same error:
Code:
>>> Emerging (1 of 1) app-misc/obdgpslogger-0.15 from darkstar_overlay
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * CPV:  app-misc/obdgpslogger-0.15
 * REPO: darkstar_overlay
 * USE:  elibc_glibc kernel_linux userland_GNU x86
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/app-misc/obdgpslogger-0.15/work
>>> Preparing source in /var/tmp/portage/app-misc/obdgpslogger-0.15/work ...
/var/tmp/portage/app-misc/obdgpslogger-0.15/temp/environment: line 415: pushd: /                                                                             var/tmp/portage/app-misc/obdgpslogger-0.15/work/build: No such file or directory
/var/tmp/portage/app-misc/obdgpslogger-0.15/temp/environment: line 447: popd: di                                                                             rectory stack empty
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-misc/obdgpslogger-0.15/work ...
>>> Working in BUILD_DIR: "/var/tmp/portage/app-misc/obdgpslogger-0.15/work/buil                                                                             d_build"
 * Unable to locate CMakeLists.txt under:
 * "/var/tmp/portage/app-misc/obdgpslogger-0.15/work/build/CMakeLists.txt"
 * Consider not inheriting the cmake eclass.
 * ERROR: app-misc/obdgpslogger-0.15 failed:
 *   FATAL: Unable to find CMakeLists.txt
 *
 * Call stack:
 *     ebuild.sh, line   54:  Called src_configure
 *   environment, line 2886:  Called cmake-utils_src_configure
 *   environment, line  700:  Called _execute_optionaly 'src_configure'
 *   environment, line  178:  Called enable_cmake-utils_src_configure
 *   environment, line 1069:  Called die
 * The specific snippet of code:
 *           die "FATAL: Unable to find CMakeLists.txt";
 *
 * If you need support, post the output of 'emerge --info =app-misc/obdgpslogger                                                                             -0.15',
 * the complete build log and the output of 'emerge -pqv =app-misc/obdgpslogger-                                                                             0.15'.
 * This ebuild is from an overlay named 'darkstar_overlay': '/usr/local/portage/                                                                             '
 * The complete build log is located at '/var/tmp/portage/app-misc/obdgpslogger-                                                                             0.15/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-misc/obdgpslo                                                                             gger-0.15/temp/environment'.
 * S: '/var/tmp/portage/app-misc/obdgpslogger-0.15/work/build'

>>> Failed to emerge app-misc/obdgpslogger-0.15, Log file:

>>>  '/var/tmp/portage/app-misc/obdgpslogger-0.15/temp/build.log'

I see that it changed the location where it is looking for the CMakeLists.txt file, but that still seems to be the wrong location. My understanding is that portage will extract the tarball to /var/tmp/portage/app-misc/obdgpslogger-0.15/work/ but the CMakeLists.txt file seems to be missing (despite being in the tarball).
_________________
I opened Pandora's box, let the cat out of the bag and put the ball in their court.
-- Hon. J. Hacker (The Ministry of Administrative Affairs)
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5387

PostPosted: Wed Jul 21, 2010 5:58 am    Post subject: Reply with quote

simple, enter /var/tmp/portage/app-misc/obdgpslogger-0.15/work/ and look until you find the relevant file, then deduce the relative path from /var/tmp/portage/app-misc/obdgpslogger-0.15/work/ ti the file and replace the /build in
Code:
S=${WORKDIR}/build
with it.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
rjmars97
n00b
n00b


Joined: 08 May 2006
Posts: 51
Location: Idaho

PostPosted: Wed Jul 21, 2010 3:05 pm    Post subject: Reply with quote

Well, the mistake was really simple. There was nothing in the work directory /var/tmp/portage/app-misc/obdgpslogger-0.15/work/ and after carefully looking over the ebuild, I noticed a typo. I had SCR_URI rather than SRC_URI so the tarball wasn't being fetched. A working ebuild is:

Code:
#Copyright 2010 Gentoo Foundation
#Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2
inherit cmake-utils

DESCRIPTION="Logs OBDII and GPS data"
HOMEPAGE="http://icculus.org/obdgpslogger"
SRC_URI="http://icculus.org/obdgpslogger/downloads/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="gps"

RDEPEND="gps? ( sci-geosciences/gpsd )"

Just for my understanding, since the package doesn't need anything special for building, portage automatically handles cmake, make, etc? Will you only need src_compile and src_install functions with more complicated builds? Thanks for the help.
_________________
I opened Pandora's box, let the cat out of the bag and put the ball in their court.
-- Hon. J. Hacker (The Ministry of Administrative Affairs)
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5387

PostPosted: Wed Jul 21, 2010 6:02 pm    Post subject: Reply with quote

rjmars97 wrote:
Well, the mistake was really simple. There was nothing in the work directory /var/tmp/portage/app-misc/obdgpslogger-0.15/work/ and after carefully looking over the ebuild, I noticed a typo. I had SCR_URI rather than SRC_URI so the tarball wasn't being fetched. A working ebuild is:

Code:
#Copyright 2010 Gentoo Foundation
#Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2
inherit cmake-utils

DESCRIPTION="Logs OBDII and GPS data"
HOMEPAGE="http://icculus.org/obdgpslogger"
SRC_URI="http://icculus.org/obdgpslogger/downloads/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="gps"

RDEPEND="gps? ( sci-geosciences/gpsd )"

Just for my understanding, since the package doesn't need anything special for building, portage automatically handles cmake, make, etc? Will you only need src_compile and src_install functions with more complicated builds? Thanks for the help.

in general portage is handling all, for more complicated ebuilds, you must do it but usuallu cmake based ebuild are not that complicated.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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