View previous topic :: View next topic |
Author |
Message |
CRGreathouse n00b
Joined: 28 Oct 2013 Posts: 13
|
Posted: Thu Oct 31, 2013 1:04 am Post subject: Dependencies for a program updated manually |
|
|
There's a program I use which I update manually rather than through Portage, because I develop for it and use the bleeding-edge, prerelease versions. But I would like to notify Portage about it so it can track dependencies and not try to remove them when I ask it to --depclean. What's the right way of doing this?
I could install it through Portage then overwrite it with my latest version, and maybe that's OK. But is there a better approach, or unforeseen drawbacks to this one? (My current method, not telling Portage anything, will surely result in my accidentally removing a dependency I need, so that's not a good option.)
Be gentle, I'm on day zero of Gentoo (running in chroot, haven't yet booted into it until I get my environment set up). |
|
Back to top |
|
|
kurly Apprentice
Joined: 02 Apr 2012 Posts: 260
|
Posted: Thu Oct 31, 2013 1:28 am Post subject: |
|
|
Without knowing what the program is, it's harder to offer specific advice. Is there a -9999 (live ebuild) version of the software in portage? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21624
|
Posted: Thu Oct 31, 2013 2:16 am Post subject: |
|
|
Find or write an ebuild for it, so that you can install it through Portage. With the right ebuild, you can have Portage fetch the sources from the same place you are obtaining the prerelease code now, so you get the same code, but you place it under the control of the package manager.
If you need to write an ebuild and are unsure how to proceed, please post the name of the program and, if unusual, the instructions for how to build it. We can help you write an ebuild for it. |
|
Back to top |
|
|
CRGreathouse n00b
Joined: 28 Oct 2013 Posts: 13
|
Posted: Thu Oct 31, 2013 2:59 am Post subject: |
|
|
The program is sci-mathematics/pari, but I don't think an ebuild will suffice. I have a tricky 200-line script for fetching, configuring, and compiling the program, and that probably goes beyond what I could/should do in an ebuild. (For example, I have a suite of tests based on whether my custom code builds under PARI. I also have it run the standard testsuite, but with modifications to one test which is incorrectly marked as failing. Then there are custom optimizations, etc.)
Er, I mean maybe that is a decent way but not obviously so (to me). |
|
Back to top |
|
|
kurly Apprentice
Joined: 02 Apr 2012 Posts: 260
|
Posted: Thu Oct 31, 2013 3:15 am Post subject: |
|
|
Oh, I thought your name looked familiar: The Mersenne forums. I have still been cranking away at GIMPS, but haven't been as active in the forums lately. Welcome to the Gentoo forums!
Like Hu says, despite how tricky your 200 line script may be, it is likely possible to incorporate that into a live ebuild. |
|
Back to top |
|
|
mackal Tux's lil' helper
Joined: 04 Aug 2011 Posts: 92
|
Posted: Thu Oct 31, 2013 4:13 am Post subject: |
|
|
You could just make a blank ebuild that just pulls in the dependencies and throw in a local overlay. Or just add the dependencies to your world file, but I think just an ebuild to pull deps would be better. |
|
Back to top |
|
|
CRGreathouse n00b
Joined: 28 Oct 2013 Posts: 13
|
Posted: Thu Oct 31, 2013 4:38 am Post subject: |
|
|
mackal wrote: | You could just make a blank ebuild that just pulls in the dependencies and throw in a local overlay. Or just add the dependencies to your world file, but I think just an ebuild to pull deps would be better. |
That sounds like a decent idea. So how do I go about making an ebuild?
Probably mine will be almost identical to the canonical sci-mathematics/pari, apart from pari itself. |
|
Back to top |
|
|
CRGreathouse n00b
Joined: 28 Oct 2013 Posts: 13
|
Posted: Thu Oct 31, 2013 4:42 am Post subject: |
|
|
kurly wrote: | Oh, I thought your name looked familiar: The Mersenne forums. |
Indeed, that's me!
kurly wrote: | I have still been cranking away at GIMPS, but haven't been as active in the forums lately. Welcome to the Gentoo forums! |
Thanks! It's a very nice community, I've had a bunch of questions in the last day or two and everyone has done a great job getting me on my feet. Maybe one day I will be able to return the favor for others.
kurly wrote: | Like Hu says, despite how tricky your 200 line script may be, it is likely possible to incorporate that into a live ebuild. |
Maybe I will. I think I'll start with this prereq-only ebuild first, though, and work from there. |
|
Back to top |
|
|
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Thu Oct 31, 2013 2:11 pm Post subject: |
|
|
CRGreathouse wrote: | mackal wrote: | You could just make a blank ebuild that just pulls in the dependencies and throw in a local overlay. Or just add the dependencies to your world file, but I think just an ebuild to pull deps would be better. |
That sounds like a decent idea. So how do I go about making an ebuild?
Probably mine will be almost identical to the canonical sci-mathematics/pari, apart from pari itself. |
You can copy paste an existing ebuild and drop it into your overlay. That way you don't have to create it from scractch. |
|
Back to top |
|
|
mackal Tux's lil' helper
Joined: 04 Aug 2011 Posts: 92
|
Posted: Thu Oct 31, 2013 5:38 pm Post subject: |
|
|
CRGreathouse wrote: | mackal wrote: | You could just make a blank ebuild that just pulls in the dependencies and throw in a local overlay. Or just add the dependencies to your world file, but I think just an ebuild to pull deps would be better. |
That sounds like a decent idea. So how do I go about making an ebuild?
Probably mine will be almost identical to the canonical sci-mathematics/pari, apart from pari itself. |
I guess the easiest would be to take the park ebuild, set the SRC_URI="" and delete everything after the dependencies and modify the deps if needed. Then just look up how to set up a local overlay and throw it in there. |
|
Back to top |
|
|
CRGreathouse n00b
Joined: 28 Oct 2013 Posts: 13
|
Posted: Thu Oct 31, 2013 8:26 pm Post subject: |
|
|
_______0 wrote: | You can copy paste an existing ebuild and drop it into your overlay. That way you don't have to create it from scractch. |
Where do I get it? I mean, I understand that philosophically when I type "emerge foo" that Portage grabs the foo ebuild, but I don't know what file it gets and from where.
Is there a reference I can read? I don't want to be too bothersome with my neophyte status. |
|
Back to top |
|
|
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Thu Oct 31, 2013 8:53 pm Post subject: |
|
|
Code: | ls /usr/portage/
app-accessibility/ app-misc/ dev-java/ distfiles/ games-strategy/ mail-mta/ net-irc/ rox-extra/ sys-apps/ www-client/
app-admin/ app-mobilephone/ dev-lang/ eclass/ games-util/ media-fonts/ net-libs/ sci-astronomy/ sys-auth/ www-misc/
app-antivirus/ app-office/ dev-libs/ games-action/ gnome-base/ media-gfx/ net-mail/ sci-biology/ sys-block/ www-plugins/
app-arch/ app-officeext/ dev-lisp/ games-arcade/ gnome-extra/ media-libs/ net-misc/ sci-calculators/ sys-boot/ www-servers/
app-backup/ app-pda/ dev-lua/ games-board/ gnustep-apps/ media-plugins/ net-nds/ sci-chemistry/ sys-cluster/ x11-apps/
app-benchmarks/ app-portage/ dev-ml/ games-emulation/ gnustep-base/ media-radio/ net-news/ sci-electronics/ sys-devel/ x11-base/
app-cdr/ app-shells/ dev-perl/ games-engines/ gnustep-libs/ media-sound/ net-nntp/ sci-geosciences/ sys-firmware/ x11-drivers/
app-crypt/ app-text/ dev-php/ games-fps/ gpe-base/ media-tv/ net-p2p/ sci-libs/ sys-freebsd/ x11-libs/
app-dicts/ app-vim/ dev-python/ games-kids/ gpe-utils/ media-video/ net-print/ sci-mathematics/ sys-fs/ x11-misc/
app-doc/ app-xemacs/ dev-qt/ games-misc/ header.txt metadata/ net-proxy/ sci-misc/ sys-infiniband/ x11-plugins/
app-editors/ dev-ada/ dev-ruby/ games-mud/ java-virtuals/ net-analyzer/ net-voip/ sci-physics/ sys-kernel/ x11-proto/
app-emacs/ dev-cpp/ dev-scheme/ games-puzzle/ kde-base/ net-dialup/ net-wireless/ sci-visualization/ sys-libs/ x11-terms/
app-emulation/ dev-db/ dev-tcltk/ games-roguelike/ kde-misc/ net-dns/ net-zope/ scripts/ sys-power/ x11-themes/
app-forensics/ dev-dotnet/ dev-tex/ games-rpg/ licenses/ net-firewall/ perl-core/ sec-policy/ sys-process/ x11-wm/
app-i18n/ dev-embedded/ dev-texlive/ games-server/ lxde-base/ net-fs/ profiles/ skel.ChangeLog virtual/ xfce-base/
app-laptop/ dev-games/ dev-util/ games-simulation/ mail-client/ net-ftp/ razorqt-base/ skel.ebuild www-apache/ xfce-extra/
app-leechcraft/ dev-haskell/ dev-vcs/ games-sports/ mail-filter/ net-im/ rox-base/ skel.metadata.xml www-apps/
|
Code: | ls /usr/portage/games-emulation/
advancemame boycott-advance-sdl desmume emutos gambatte gfceux gnuboy higan mamory metadata.xml nestra sdlmametools tuxnes visualboyadvance zsnes
advancemenu caps dgen-sdl fakenes gcube gngb gxmame hugo mastergear-bin mupen64plus openmsx sdlmess vbam xe
advancescan daphne dolphin fbzx generator gngeo handy kigb mednafen neopocott raine snes9x vgba yabause
atari800 dboxfe dosbox fceux gens gnomeboyadvance hatari lxdream mekanix nestopia sdlmame stella virtualjaguar zinc
|
Code: | ls /usr/portage/games-emulation/dolphin/
ChangeLog Manifest dolphin-3.5.ebuild dolphin-4.0.ebuild dolphin-9999.ebuild files metadata.xml
|
You want:
dolphin-4.0.ebuild
Code: | cat /usr/portage/games-emulation/dolphin/dolphin-4.0.ebuild
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-emulation/dolphin/dolphin-4.0.ebuild,v 1.1 2013/09/26 03:37:02 twitch153 Exp $
EAPI=5
WX_GTK_VER="2.9"
inherit cmake-utils eutils pax-utils toolchain-funcs versionator wxwidgets games
SRC_URI="http://${PN}-emu.googlecode.com/files/${P}-src.zip"
KEYWORDS="~amd64"
DESCRIPTION="Gamecube and Wii game emulator"
HOMEPAGE="http://www.dolphin-emulator.com/"
LICENSE="GPL-2"
SLOT="0"
IUSE="alsa ao bluetooth doc ffmpeg +lzo openal opengl openmp portaudio pulseaudio"
RDEPEND=">=media-libs/glew-1.6
>=media-libs/libsdl-1.2[joystick]
<media-libs/libsfml-2.0
>=net-libs/miniupnpc-1.8
sys-libs/readline
x11-libs/libXext
x11-libs/libXrandr
alsa? ( media-libs/alsa-lib )
ao? ( media-libs/libao )
bluetooth? ( net-wireless/bluez )
ffmpeg? ( virtual/ffmpeg )
lzo? ( dev-libs/lzo )
openal? ( media-libs/openal )
opengl? ( virtual/opengl )
portaudio? ( media-libs/portaudio )
pulseaudio? ( media-sound/pulseaudio )
"
DEPEND="${RDEPEND}
app-arch/zip
media-gfx/nvidia-cg-toolkit
media-libs/freetype
media-libs/libsoundtouch
>=sys-devel/gcc-4.6.0
x11-libs/wxGTK:2.9
"
S="${WORKDIR}/${PN}-emu"
pkg_pretend() {
local ver=4.6.0
local msg="${PN} needs at least GCC ${ver} set to compile."
if [[ ${MERGE_TYPE} != binary ]]; then
if ! version_is_at_least ${ver} $(gcc-fullversion); then
eerror ${msg}
die ${msg}
fi
fi
}
src_prepare() {
# Remove automatic dependencies to prevent building without flags enabled.
if use !alsa; then
sed -i -e '^/include(FindALSA/d' CMakeLists.txt || die
fi
if use !ao; then
sed -i -e '/^check_lib(AO/d' CMakeLists.txt || die
fi
if use !bluetooth; then
sed -i -e '/^check_lib(BLUEZ/d' CMakeLists.txt || die
fi
if use !openal; then
sed -i -e '/^include(FindOpenAL/d' CMakeLists.txt || die
fi
if use !portaudio; then
sed -i -e '/CMAKE_REQUIRED_LIBRARIES portaudio/d' CMakeLists.txt || die
fi
if use !pulseaudio; then
sed -i -e '/^check_lib(PULSEAUDIO/d' CMakeLists.txt || die
fi
# Remove ALL the bundled libraries, aside from:
# - SOIL: The sources are not public.
# - Bochs-disasm: Don't know what it is.
# - CLRun: Part of OpenCL
mv Externals/SOIL . || die
mv Externals/Bochs_disasm . || die
mv Externals/CLRun . || die
mv Externals/polarssl . || die
rm -r Externals/* || die
mv CLRun Externals || die
mv Bochs_disasm Externals || die
mv SOIL Externals || die
mv polarssl Externals || die
}
src_configure() {
local mycmakeargs=(
"-DDOLPHIN_WC_REVISION=${PV}"
"-DCMAKE_INSTALL_PREFIX=${GAMES_PREFIX}"
"-Dprefix=${GAMES_PREFIX}"
"-Ddatadir=${GAMES_DATADIR}/${PN}"
"-Dplugindir=$(games_get_libdir)/${PN}"
$( cmake-utils_use ffmpeg ENCODE_FRAMEDUMPS )
$( cmake-utils_use openmp OPENMP )
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
dodoc Readme.txt
if use doc; then
dodoc -r docs/ActionReplay docs/DSP docs/WiiMote
fi
doicon Source/Core/DolphinWX/resources/Dolphin.xpm
make_desktop_entry "dolphin-emu" "Dolphin" "Dolphin" "Game;"
prepgamesdirs
}
pkg_postinst() {
# Add pax markings for hardened systems
pax-mark -m "${EPREFIX}"/usr/games/bin/"${PN}"-emu
if ! use portaudio; then
ewarn "If you want microphone capabilities in dolphin-emu, rebuild with"
ewarn "USE=\"portaudio\""
fi
}
|
Adjust as needed. It may look intimidating at first but the trick is to change the little bits relevant to your project, thus avoiding braking the whole.
inside the package ls /usr/portage/games-emulation/dolphin/
ChangeLog: changes about versions.
Manifest: no idea
dolphin-3.5.ebuild dolphin-4.0.ebuild dolphin-9999.ebuild: each version dependency info.
file: folder with patches.
metadata.xml: no idea.
Then you manipulate your packages with the tool called ebuild found in app-portage/portage-utils.
The best thing to do is to make your own overlay (the gentoo way), however nothing prevents you from dumping everything in some folder in ur home directory and do stuff from there. To create and manage an overlay you need layman
So the list of packages you need is:
eix
layman
portage-utils
Then you're good to go.
Bear in mind that the ebuild file has many variables, I don't know where they are documented or listed.
some links:
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1
http://linuxreviews.org/gentoo/ebuilds/
Also for alternate ebuilds and to compared how ppl do it look at other overlays ebuilds.
As I said, the fastest way to get your hands on is by creating your own overlay and copy paste an existing ebuild there and tweak from then on.
ps.: w00t dolphin emulator at last in portage!!! |
|
Back to top |
|
|
|