Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] emerge live ebuild without svn update
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
Mikkl
n00b
n00b


Joined: 12 Jan 2006
Posts: 71

PostPosted: Tue Jul 13, 2010 8:41 pm    Post subject: [solved] emerge live ebuild without svn update Reply with quote

Hello,

I need to emerge a live ebuild on a computer without connection to the internet. When i try to emerge, the build fails of course, e.g.:
Code:

svn: OPTIONS of 'http://subversion.ardour.org/svn/ardour2/branches/2.0-ongoing': Could not resolve hostname `subversion.ardour.org': Host not found (http://subversion.ardour.org)
 * ERROR: media-sound/ardour-2.9999 failed:
 *   subversion: can't update /usr/portage/distfiles/svn-src/ardour/2.0-ongoing from http://subversion.ardour.org/svn/ardour2/branches/2.0-ongoing.

I know i have seen something like specifying a svn version somewhere in /etc/portage/package.* in a post on the forums, but i just can't find it anymore.
Or is there a way to simply merge the package without it trying to update via svn or cvs or ...?

P.S.: The package has been checked out before, so there are source files there.


Last edited by Mikkl on Wed Jul 14, 2010 10:07 pm; edited 3 times in total
Back to top
View user's profile Send private message
lxg
Veteran
Veteran


Joined: 12 Nov 2005
Posts: 1019
Location: Aachen, Germany

PostPosted: Tue Jul 13, 2010 9:52 pm    Post subject: Reply with quote

This ebuild doesn't seem to be in Portage, I only see one for 2.8.7. Could you please post the ebuild?
_________________
lxg.de – codebits and tech talk
Back to top
View user's profile Send private message
Mikkl
n00b
n00b


Joined: 12 Jan 2006
Posts: 71

PostPosted: Tue Jul 13, 2010 10:42 pm    Post subject: Reply with quote

It's the ardour-2.9999.ebuild from pro-audio overlay. There are still some more live ebuilds i want to remerge on the box that has no internet connection, so i posted this as an example.

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

EAPI=2

inherit eutils toolchain-funcs fdo-mime flag-o-matic subversion versionator

DESCRIPTION="multi-track hard disk recording software"
HOMEPAGE="http://ardour.org/"

ESVN_REPO_URI="http://subversion.ardour.org/svn/ardour2/branches/2.0-ongoing"
ESVN_RESTRICT="export"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="altivec debug freesound nls sse lv2 vst sys-libs"

RDEPEND=">=media-libs/liblrdf-0.4.0
   media-libs/aubio
   >=media-libs/raptor-1.4.2
   >=media-sound/jack-audio-connection-kit-0.116.2
   >=dev-libs/glib-2.10.3
   >=x11-libs/gtk+-2.8.8
   media-libs/flac
   >=media-libs/alsa-lib-1.0.14a-r1
   >=media-libs/libsamplerate-0.1.1-r1
   media-libs/liblo
   >=dev-libs/libxml2-2.6.0
   dev-libs/libxslt
   media-libs/vamp-plugin-sdk
   =sci-libs/fftw-3*
   freesound? ( net-misc/curl )
   lv2? ( >=media-libs/slv2-0.6.1 )
   sys-libs? ( >=dev-libs/libsigc++-2.0
      >=dev-cpp/glibmm-2.4
      >=dev-cpp/cairomm-1.0
      >=dev-cpp/gtkmm-2.8
      >=dev-libs/atk-1.6
      >=x11-libs/pango-1.4
      >=dev-cpp/libgnomecanvasmm-2.12.0
      >=media-libs/libsndfile-1.0.16
      >=media-libs/libsoundtouch-1.0 )"
      # currently internal rubberband is used
      # that needs fftw3 and vamp-sdk, but it rocks, so enable by default

DEPEND="${RDEPEND}
   sys-devel/libtool
   dev-libs/boost
   dev-util/pkgconfig
   dev-util/scons
   nls? ( sys-devel/gettext )"

S="${WORKDIR}/ardour2"

pkg_setup(){
   einfo "this ebuild fetches from the svn maintaince"
   einfo "ardour-2.X branch"
   # issue with ACLOCAL_FLAGS if set to a wrong value
   if use sys-libs;then
      ewarn "You are trying to use the system libraries"
      ewarn "instead the ones provided by ardour"
      ewarn "No upstream support for doing so. Use at your own risk!!!"
      ewarn "To use the ardour provided libs remerge with:"
      ewarn "USE=\"-sys-libs\" emerge =${P}"

      epause 3s
   fi

   if use amd64 && use vst; then
      eerror "${P} currently does not compile with VST support on amd64!"
      eerror "Please unset VST useflag."
      die
   fi
}

src_unpack(){
   # abort if user answers no to distribution of vst enabled binaries
   if use vst; then
      agree_vst || die "you can not distribute ardour with vst support"
   fi
   subversion_src_unpack
   subversion_wc_info
   einfo "Copying working copy to source dir:"
   mkdir -p "${S}"
   cp -R "${ESVN_WC_PATH}"/* "${S}"
   cp -R "${ESVN_WC_PATH}"/.* "${S}"
   cd "${S}"

   # hack to use the sys-lib for sndlib also
#   use sys-libs && epatch "${FILESDIR}/ardour-2.0.3-sndfile-external.patch"

   add_ccache_to_scons

   ardour_vst_prepare
}

src_compile() {
   # Required for scons to "see" intermediate install location
   mkdir -p "${D}"

   local myconf=""
   (use sse || use altivec) && myconf="FPU_OPTIMIZATION=1"
   ! use altivec; myconf="${myconf} ALTIVEC=$?"
   ! use debug; myconf="${myconf} ARDOUR_DEBUG=$?"
   ! use nls; myconf="${myconf} NLS=$?"
   ! use vst; myconf="${myconf} VST=$?"
   ! use sys-libs; myconf="${myconf} SYSLIBS=$?"
   ! use sse; myconf="${myconf} USE_SSE_EVERYWHERE=$? BUILD_SSE_OPTIMIZATIONS=$?"
   ! use lv2; myconf="${myconf} LV2=$?"

   # static settings
   myconf="${myconf} DESTDIR=${D} PREFIX=/usr KSI=0"
   einfo "${myconf}"

   cd "${S}"
   scons ${myconf}   ${MAKEOPTS} || die "compilation failed"
}

src_install() {
   scons install || die "make install failed"
   if use vst;then
      mv "${D}"/usr/bin/ardourvst "${D}"/usr/bin/ardour2
   fi

   dodoc DOCUMENTATION/*

   newicon "${S}/icons/icon/ardour_icon_mac.png" "ardour2.png"
   make_desktop_entry "ardour2" "Ardour2" "ardour2" "AudioVideo;Audio"
}

pkg_postinst() {
   fdo-mime_mime_database_update
   fdo-mime_desktop_database_update

   ewarn "---------------- WARNING -------------------"
   ewarn ""
   ewarn "MAKE BACKUPS OF THE SESSION FILES BEFORE TRYING THIS VERSION."
   ewarn ""
   ewarn "The simplest way to address this is to make a copy of the session file itself"
   ewarn "(e.g mysession/mysession.ardour) and make that file unreadable using chmod(1)."
   ewarn ""
}
Back to top
View user's profile Send private message
lxg
Veteran
Veteran


Joined: 12 Nov 2005
Posts: 1019
Location: Aachen, Germany

PostPosted: Tue Jul 13, 2010 11:00 pm    Post subject: Reply with quote

Ok, I must admit I have never used the Subversion features of the eutils. However, I think it could be done with a bit of hacking.

Basicly, you would have to create the source archive (tar.bz2) yourself, put it in /usr/portage/distfiles, then replace the following part in the ebuild:

Code:

   subversion_src_unpack
   subversion_wc_info
   einfo "Copying working copy to source dir:"
   mkdir -p "${S}"
   cp -R "${ESVN_WC_PATH}"/* "${S}"
   cp -R "${ESVN_WC_PATH}"/.* "${S}"
   cd "${S}"


with something that unpacks your archive to the directory $S (look at any other ebuild). Then create a new digest for the ebuild and try to emerge.

If you say you've seen an easier way to do this – this may well be. The above is just what I would consider doing in this case, at least as long as it's 35 °C hot outside. ;)
_________________
lxg.de – codebits and tech talk
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Wed Jul 14, 2010 12:32 am    Post subject: Reply with quote

I think another way is copying subversion.eclass and editing it:
Code:

cp /usr/portage/eclass/subversion.eclass /var/lib/layman/pro-audio/eclass/subversion.eclass

then change the line in the newly copy in /var/lib/layman/proaudio/eclass/subversion.eclass
Code:

ESVN_UPDATE_CMD="svn update"

into
Code:

ESVN_UPDATE_CMD="/bin/true"

Then you will be able to emerge any live ebuild offline in pro-audio overlay. After you finished, just delete it or better rename the edited subversion.eclass to something like nosubversion.eclass in case you need it again.
_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
Back to top
View user's profile Send private message
floppymaster
Developer
Developer


Joined: 07 Jul 2010
Posts: 222
Location: Detroit, MI, USA

PostPosted: Wed Jul 14, 2010 1:32 am    Post subject: Reply with quote

From subversion.eclass:

# @ECLASS-VARIABLE: ESVN_OFFLINE
# @DESCRIPTION:
# Set this variable to a non-empty value to disable the automatic updating of
# an svn source tree. This is intended to be set outside the subversion source
# tree by users.
ESVN_OFFLINE="${ESVN_OFFLINE:-${ESCM_OFFLINE}}"

So, just do this:

# ESVN_OFFLINE=1 emerge ardour
Back to top
View user's profile Send private message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Wed Jul 14, 2010 8:31 am    Post subject: Reply with quote

Moved from Portage & Programming to Unsupported Software, support questions about overlay ebuilds belong in US.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Mikkl
n00b
n00b


Joined: 12 Jan 2006
Posts: 71

PostPosted: Wed Jul 14, 2010 10:05 pm    Post subject: Reply with quote

Thanks all for your answer! I tried every one of them, and it's nice to see that there are many ways to get things to work.
Well, work is relative, I thought lxg's solution might come in handy if you needed different svn snapshots and could just emerge them as a regular ebuild with a version number, but i soon ran into more and more problems with the ebuild. At least I got it to extract the tarball i made, but more problems arise. Actually my problem's solved with the other two solutions but I guess i'll have to take a closer look at how to write ebuilds. Now I'm curious :)
Back to top
View user's profile Send private message
floppymaster
Developer
Developer


Joined: 07 Jul 2010
Posts: 222
Location: Detroit, MI, USA

PostPosted: Thu Jul 15, 2010 4:03 am    Post subject: Reply with quote

Mikkl wrote:
Actually my problem's solved with the other two solutions but I guess i'll have to take a closer look at how to write ebuilds. Now I'm curious :)


Awesome! Creating/modifying ebuilds is actually pretty fun, though a bit of a time sink.
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