Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Chromium Live Ebuild] last-update: 2009-05-31-04-20
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Mon May 11, 2009 6:12 pm    Post subject: Reply with quote

Spaulding wrote:
but this ebuild doesn't work, maybe in free time I fix that. But Binaries packages are very good because I don't have to compile that.


indeed,

they aren't too big (only around 12 MB; deb-packages)

the question's only if they'll work on our system ...
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
Spaulding
Apprentice
Apprentice


Joined: 16 Apr 2006
Posts: 159
Location: /dev/vagina

PostPosted: Mon May 11, 2009 6:39 pm    Post subject: Reply with quote

hmm, now I made some symlinks but now I have this problem:
Code:

zsh/4 3675 % ./chromium-browser
/home/p1r4te/chromium/chrome: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

from what package is this library?
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Mon May 11, 2009 6:52 pm    Post subject: Reply with quote

Spaulding wrote:
hmm, now I made some symlinks but now I have this problem:
Code:

zsh/4 3675 % ./chromium-browser
/home/p1r4te/chromium/chrome: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

from what package is this library?


obviously from gconf

but to be sure:

Code:
equery b libgconf-2.so.4
(you might need gentoolkit or gentoolkit-dev)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
bob_111
Apprentice
Apprentice


Joined: 12 Oct 2004
Posts: 155

PostPosted: Tue May 12, 2009 12:26 am    Post subject: Reply with quote

There's been some big updates lately. I had a lot of problems with warnings stopping compilation so i fixed / updated your disable_warnings.patch

Code:
--- common.gypi 2009-05-12 09:29:59.000000000 +0000
+++ common.gypi.new     2009-05-12 09:42:50.000000000 +0000
@@ -148 +148 @@
-          'werror%': '-Werror',
+          'werror%': '-Wno-deprecated',
@@ -303 +303 @@
-              '-Wall',
+              '-Wno-deprecated',
@@ -330 +330 @@
-          'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'],
+          'WARNING_CFLAGS': ['-Wno-deprecated', '-Wendif-labels'],


That gets me a lot further along but somethings segfaulting with libxml. I'll let you know how i go with that.
Back to top
View user's profile Send private message
Animatrix
Guru
Guru


Joined: 13 May 2006
Posts: 480
Location: France - Gard (30)

PostPosted: Tue May 12, 2009 11:42 am    Post subject: Reply with quote

Quote:
* working copy: /usr/portage/distfiles/gclient-src/chromium/src

>>> Source unpacked in /var/tmp/portage/www-client/chromium-9999/work
>>> Preparing source in /var/tmp/portage/www-client/chromium-9999/work/chromium-9999/src ...
* Updating file_version_info_linux.h
fatal: Not a git repository (or any of the parent directories): .git
* Applying gentoo-cflags.patch ...

* Failed Patch: gentoo-cflags.patch !
* ( /usr/portage/local/layman/THE/www-client/chromium/files/gentoo-cflags.patch )
Do you know how to correct this error ?
Back to top
View user's profile Send private message
vmk
n00b
n00b


Joined: 25 May 2004
Posts: 31

PostPosted: Tue May 12, 2009 11:47 am    Post subject: Reply with quote

Just as i wrote a few postings earlier in this thread: Commenting the line out helps.
_________________
"Security is like an onion - the more you dig in the more you want to cry"
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7694
Location: Pelotas, BR

PostPosted: Tue May 12, 2009 12:16 pm    Post subject: Reply with quote

Spaulding wrote:
but this ebuild doesn't work, maybe in free time I fix that. But Binaries packages are very good because I don't have to compile that.


Looks like (changing i386 to amd64) it installs a 32 bit binary with 64 bit libraries...
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Tue May 12, 2009 1:59 pm    Post subject: Reply with quote

pilla wrote:
Spaulding wrote:
but this ebuild doesn't work, maybe in free time I fix that. But Binaries packages are very good because I don't have to compile that.


Looks like (changing i386 to amd64) it installs a 32 bit binary with 64 bit libraries...


which still doesn't work - it seems it will only run on x86 for some time:

Quote:
chromium-bin
/opt/chromium.org/chromium/chrome: error while loading shared libraries: libnss3.so.1d: wrong ELF class: ELFCLASS64


and that's from the amd64 deb-file - ebuild:

note: that one is for amd64 and has to download the deb-file EVERY time you emerge it (kind of modified the ebuild from the shellex-overlay)

when renaming amd64 to i386 (and the keywords) you should have a nice working x86 binary installation

update:

updated ebuild which should work on x86 (not tested)

moved to other thread: https://forums.gentoo.org/viewtopic-t-763547.html

it still needs some modifications to be able to run ...
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
.yankee
Apprentice
Apprentice


Joined: 24 Feb 2008
Posts: 194
Location: Polska

PostPosted: Tue May 12, 2009 4:36 pm    Post subject: Reply with quote

Hi guys.
I put my hands on rmh3093's chromium ebuild again :]
This time, I've updated the gentoo-cflags.patch to work with the current common.gypi. Named it gentoo-cflags2.patch - here it is:
gentoo-cflags2.patch:
--- common.gypi.old   2009-05-12 22:10:15.000000000 +0200
+++ common.gypi   2009-05-12 22:11:27.000000000 +0200
@@ -148,7 +148,6 @@
           'werror%': '-Werror',
         },
         'cflags': [
-           '<(werror)',  # See note above about the werror variable.
            '-pthread',
         ],
         'ldflags': [
@@ -295,14 +294,11 @@
             # compiler optimized the code, since the value is always kept
             # in its specified precision.
             'cflags': [
+       GENTOOCFLAGS
               '-m32',
-              '-march=pentium4',
-              '-fno-exceptions',
-              '-msse2',
-              '-mfpmath=sse',
-              '-Wall',
             ],
             'ldflags': [
+       GENTOOLDFLAGS
               '-m32',
             ],
           }],


And here's a patch to to include my modifications to the original ebuild by rmh3093:
Code:

--- chromium-9999.ebuild   2009-05-12 18:22:56.000000000 +0200
+++ chromium-9999.ebuild.new   2009-05-12 18:24:18.000000000 +0200
@@ -17,7 +17,7 @@
 LICENSE="GPL-2"
 SLOT="live"
 
-IUSE=""
+IUSE="sandbox"
 
 DEPEND="
    >=dev-lang/python-2.4
@@ -33,7 +33,7 @@
    >=dev-libs/nspr-4.7.1
    media-fonts/corefonts
    >=dev-util/scons-1.2.0
-   >=sys-apps/sandbox-1.8
+   sandbox? >=sys-apps/sandbox-1.8
 "
 RDEPEND="${DEPEND}"
 
@@ -53,7 +53,7 @@
    ../chrome/tools/build/linux/version.sh file_version_info_linux.h.version file_version_info_linux.h || die
    
    cd ${S}/src/build
-   epatch ${FILESDIR}/gentoo-cflags.patch
+   epatch ${FILESDIR}/gentoo-cflags2.patch
 
    flags=
    for flag in $CFLAGS; do


As you can see, it also includes sandbox useflag that, when disabled, lets you build chromium without sandbox - thus making it unnecessary to have the unstable version installed.

If you try these, remember to digest ;)
Also note this one is still x86 only...

Oh, and I can't guarantee the new cflags patch gives the same effects as rmh3093's one - most what I did was just guessing, because the new common.gypi seems to have gotten quite altered since.
Comments welcome!

EDIT: Darn, there's been another update... Fixed the patch.

EDIT2: I can now confirm it works for my pentium3m, with: O2/Os + -pipe, -fomit-frame-pointer and -fno-ident.
As for LDFLAGS, build fails with -Wl,--as-needed, whereas -Wl,-O1 and -Wl,--hash-style=gnu are ok.
Back to top
View user's profile Send private message
.yankee
Apprentice
Apprentice


Joined: 24 Feb 2008
Posts: 194
Location: Polska

PostPosted: Wed May 13, 2009 1:55 pm    Post subject: Reply with quote

Ok... Though the above mentioned method works so far, I'm aware it could only be temporary. Anyway, following rmh3093's suggestions, I replaced the patch with a sed command. Please forgive me the rather ugly form of the commands - I'm only just beginning to learn this magic.

Here's the modified ebuild:
chromium-9999.ebuild:
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

EGCLIENT_REPO_URI="http://src.chromium.org/svn/trunk/src/"
EGCLIENT_CONFIG="${FILESDIR}/.gclient"

inherit gclient eutils flag-o-matic

RESTRICT="mirror"

DESCRIPTION="Chromium is the open-source project behind Google Chrome."
HOMEPAGE="http://code.google.com:80/chromium/"

LICENSE="GPL-2"
SLOT="live"

IUSE="sandbox"

DEPEND="
   >=dev-lang/python-2.4
   >=dev-lang/perl-5.0
   >=sys-devel/gcc-4.2
   >=sys-devel/bison-2.3
   >=sys-devel/flex-2.5.34
   >=dev-util/gperf-3.0.3
   >=dev-util/pkgconfig-0.20
   >=dev-libs/nss-3.12
   dev-libs/glib:2
   x11-libs/gtk+:2
   >=dev-libs/nspr-4.7.1
   media-fonts/corefonts
   >=dev-util/scons-1.2.0
   sandbox? >=sys-apps/sandbox-1.8
"
RDEPEND="${DEPEND}"

S="${S}/src"

pkg_setup() {
   use amd64 && die "No 64bit support at this time!"
}

src_prepare() {

   ### should be no longer needed
   #cd ${S}/src
   #einfo "Updating file_version_info_linux.h"
   #sed -i -e "s,svn info,svn info ${EGCLIENT_STORE_DIR}/${EGCLIENT_PROJECT}/src," \
   #   chrome/tools/build/linux/version.sh || die
   #cd ${S}/src/base
   #../chrome/tools/build/linux/version.sh file_version_info_linux.h.version file_version_info_linux.h || die
   
   cd ${S}/src/build
   # thanks, fb!
   filter-ldflags -Wl,--as-needed
   einfo "Modyfying common.gypi with system C/LDFLAGS..."
      sed -i "/werror)',  # See note above about the werror/d" common.gypi
      sed -i -e "/cflags.: \[/{N;N;N;N;N;N;N;N;N;N}" \
      -e "s/.-march=.*Wall.,/'${CFLAGS// /\',\'}',/" \
      -e "s/\(ldflags.:.*\)\(^.*m32.,\)/\1\t\t'${LDFLAGS// /\',\'}',\n\2/" \
      common.gypi

   #cd ${S}/src/chrome/browser
   #epatch ${FILESDIR}/homepage.patch

   cd ${S}
   src/tools/gyp/gyp_dogfood src/build/all.gyp || die "gpy failed"

}

src_compile() {

   cd ${S}/src/chrome
   scons --mode=Release --site-dir=../site_scons ${MAKEOPTS} app || die "scons build failed"

}

src_install() {

   cd ${S}/src/sconsbuild/Release

   dodir /opt/${PN}
   dodir /opt/${PN}/locales
   dodir /opt/${PN}/themes

   insinto /opt/${PN}
   doins chrome.pak

   insinto /opt/${PN}/locales
   doins -r locales/*

   insinto /opt/${PN}/themes
   doins -r themes/*

   exeinto /opt/${PN}
   doexe chrome
   dosym /opt/${PN}/chrome /opt/bin/chrome   

   insinto /usr/share/applications
   doins ${FILESDIR}/${PN}.desktop

   insinto /usr/share/pixmaps
   doins ${S}/src/chrome/installer/linux/common/chromium-browser/chromium-browser.png

}


As one might notice, I've also commented out the lines responsible for modifying the default homepage. This is because I personally believe the default one is quite useful - and partly also because I just don't like such modifications taking place. But that's just my thoughts - anyone can decide on that for oneself.

EDIT1:
Corrected the third sed line (had some leftovers) and added LDFLAGS filtering against "-Wl,--as-needed".
EDIT2+:
- Commented out the no-longer-relevant lines (version.sh)
- LDFLAGS-filtering sanitized following fb's tip (+ fixed inherit)


Last edited by .yankee on Fri May 29, 2009 11:27 pm; edited 4 times in total
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Thu May 14, 2009 12:29 am    Post subject: Reply with quote

.yankee wrote:
Ok... Though the above mentioned method works so far, I'm aware it could only be temporary. Anyway, following rmh3093's suggestions, I replaced the patch with a sed command. Please forgive me the rather ugly form of the commands - I'm only just beginning to learn this magic.

Here's the modified ebuild:
chromium-9999.ebuild:
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

EGCLIENT_REPO_URI="http://src.chromium.org/svn/trunk/src/"
EGCLIENT_CONFIG="${FILESDIR}/.gclient"

inherit gclient eutils

RESTRICT="mirror"

DESCRIPTION="Chromium is the open-source project behind Google Chrome."
HOMEPAGE="http://code.google.com:80/chromium/"

LICENSE="GPL-2"
SLOT="live"

IUSE="sandbox"

DEPEND="
   >=dev-lang/python-2.4
   >=dev-lang/perl-5.0
   >=sys-devel/gcc-4.2
   >=sys-devel/bison-2.3
   >=sys-devel/flex-2.5.34
   >=dev-util/gperf-3.0.3
   >=dev-util/pkgconfig-0.20
   >=dev-libs/nss-3.12
   dev-libs/glib:2
   x11-libs/gtk+:2
   >=dev-libs/nspr-4.7.1
   media-fonts/corefonts
   >=dev-util/scons-1.2.0
   sandbox? >=sys-apps/sandbox-1.8
"
RDEPEND="${DEPEND}"

S="${S}/src"

pkg_setup() {
   use amd64 && die "No 64bit support at this time!"
}

src_prepare() {

   cd ${S}/src
   einfo "Updating file_version_info_linux.h"
   sed -i -e "s,svn info,svn info ${EGCLIENT_STORE_DIR}/${EGCLIENT_PROJECT}/src," \
      chrome/tools/build/linux/version.sh || die
   cd ${S}/src/base
   ../chrome/tools/build/linux/version.sh file_version_info_linux.h.version file_version_info_linux.h || die
   
   cd ${S}/src/build
   einfo "Modyfying common.gypi with system C/LDFLAGS..."
      sed -i "/werror)',  # See note above about the werror/d" common.gypi
      sed -i -e "/cflags.: \[/{N;N;N;N;N;N;N;N;N;N}" \
      -e "s/.-march=.*.,.*\(^.*Wall.,\)/'${CFLAGS// /\',\'}',/" \
      -e "s/\(ldflags.:.*\)\(^.*m32.,\)/\1\t\t'${LDFLAGS// /\',\'}',\n\2/" \
      common.gypi

   #cd ${S}/src/chrome/browser
   #epatch ${FILESDIR}/homepage.patch

   cd ${S}
   src/tools/gyp/gyp_dogfood src/build/all.gyp || die "gpy failed"

}

src_compile() {

   cd ${S}/src/chrome
   scons --mode=Release --site-dir=../site_scons ${MAKEOPTS} app || die "scons build failed"

}

src_install() {

   cd ${S}/src/sconsbuild/Release

   dodir /opt/${PN}
   dodir /opt/${PN}/locales
   dodir /opt/${PN}/themes

   insinto /opt/${PN}
   doins chrome.pak

   insinto /opt/${PN}/locales
   doins -r locales/*

   insinto /opt/${PN}/themes
   doins -r themes/*

   exeinto /opt/${PN}
   doexe chrome
   dosym /opt/${PN}/chrome /opt/bin/chrome   

   insinto /usr/share/applications
   doins ${FILESDIR}/${PN}.desktop

   insinto /usr/share/pixmaps
   doins ${S}/src/chrome/installer/linux/common/chromium-browser/chromium-browser.png

}


As one might notice, I've also commented out the lines responsible for modifying the default homepage. This is because I personally believe the default one is quite useful - and partly also because I just don't like such modifications taking place. But that's just my thoughts - anyone can decide on that for oneself.


Thanks for your work, I will update the ebuild with your sed magic, im not crazy about the sandbox use flag, this is an ~arch ebuild and no one using this ebuild should have an issue pulling in latest sandbox, in regards to the homepage hack. I was just sick of that defauly linux warning page being my homepage. I think the better idea is to use the homepage windows uses, which is the page you get when you open a new tab.
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
.yankee
Apprentice
Apprentice


Joined: 24 Feb 2008
Posts: 194
Location: Polska

PostPosted: Thu May 14, 2009 7:11 am    Post subject: Reply with quote

rmh3093 wrote:

Thanks for your work, I will update the ebuild with your sed magic, im not crazy about the sandbox use flag, this is an ~arch ebuild and no one using this ebuild should have an issue pulling in latest sandbox, in regards to the homepage hack. I was just sick of that defauly linux warning page being my homepage. I think the better idea is to use the homepage windows uses, which is the page you get when you open a new tab.


Sure, you are the boss of THE and you put in what you see fit :)
You also have your reasons, as have mine and each can have things his way in his box (which for me is The Greatest Bliss Of Gentoo), and since you also maintain a repo, you spread your ways...
Blah blah blah. Sorry for my "Morning With Philosophy" ;p
Great if you found my input useful. I appreciate it. The rest will be in or out as each finds it fit - no hard feelings for that. Especially since chromium is a young package and ** keyworded.

BTW: Good luck tomorrow!
I'll be defending my master's soon too :) (in a month or two)

EDIT:
Just noticed - there's some stupid leftover in the third sed command - it should look like this:
Code:
-e "s/.-march=.*Wall.,/'${CFLAGS// /\',\'}',/" \


Last edited by .yankee on Thu May 14, 2009 7:35 am; edited 1 time in total
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Thu May 14, 2009 7:19 am    Post subject: Reply with quote

.yankee wrote:
rmh3093 wrote:

Thanks for your work, I will update the ebuild with your sed magic, im not crazy about the sandbox use flag, this is an ~arch ebuild and no one using this ebuild should have an issue pulling in latest sandbox, in regards to the homepage hack. I was just sick of that defauly linux warning page being my homepage. I think the better idea is to use the homepage windows uses, which is the page you get when you open a new tab.


Sure, you are the boss of THE and you put in what you see fit :)
You also have your reasons, as have mine and each can have things his way in his box (which for me is The Greatest Bliss Of Gentoo), and since you also maintain a repo, you spread your ways...
Blah blah blah. Sorry for my "Morning With Philosophy" ;p
Great if you found my input useful. I appreciate it. The rest will be in or out as each finds it fit - no hard feelings for that. Especially since chromium is a young package and ** keyworded.

BTW: Good luck tomorrow!
I'll be defending my master's soon too :) (in a month or two)


my defense actually got pushed back a week or so ;) people are too busy
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
.yankee
Apprentice
Apprentice


Joined: 24 Feb 2008
Posts: 194
Location: Polska

PostPosted: Thu May 14, 2009 7:54 am    Post subject: Reply with quote

At least it's better to have one's defense pushed back by others than by himself - as it will probably be in my case.
Back to top
View user's profile Send private message
moult
Retired Dev
Retired Dev


Joined: 31 Mar 2008
Posts: 145
Location: Australia

PostPosted: Tue May 19, 2009 12:13 pm    Post subject: Reply with quote

Oh - I didn't know this thread existed!

Right until somebody posted it as a comment to a blog post I wrote.
For anybody interested in how to get Chromium on 64-bit systems or in general how to get Chromium, I wrote a guide here:
http://thinkmoult.com/2009/05/19/how-to-install-chromium-google-chome-on-gentoo-linux/

No shameless advertising, just that I found this thread after I wrote the post - would be sorta stupid to copy over everything.
_________________
thinkMoult - I write articles online. You might like some of them.
Planet Larry - do you write a blog and use Gentoo? Get your blog added to the Planet Larry Gentoo user blog aggregator!
Back to top
View user's profile Send private message
balkira
Tux's lil' helper
Tux's lil' helper


Joined: 25 Dec 2004
Posts: 116
Location: /local/pub

PostPosted: Tue May 19, 2009 1:41 pm    Post subject: Reply with quote

Moult wrote:
Oh - I didn't know this thread existed!

Right until somebody posted it as a comment to a blog post I wrote.
For anybody interested in how to get Chromium on 64-bit systems or in general how to get Chromium, I wrote a guide here:
http://thinkmoult.com/2009/05/19/how-to-install-chromium-google-chome-on-gentoo-linux/

No shameless advertising, just that I found this thread after I wrote the post - would be sorta stupid to copy over everything.


ohh finally my post was helpful! :)
_________________
no way to happiness, happiness is the way
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Sun May 24, 2009 10:37 pm    Post subject: Reply with quote

.yankee wrote:
Ok... Though the above mentioned method works so far, I'm aware it could only be temporary. Anyway, following rmh3093's suggestions, I replaced the patch with a sed command. Please forgive me the rather ugly form of the commands - I'm only just beginning to learn this magic.

Here's the modified ebuild:
chromium-9999.ebuild:
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

EGCLIENT_REPO_URI="http://src.chromium.org/svn/trunk/src/"
EGCLIENT_CONFIG="${FILESDIR}/.gclient"

inherit gclient eutils

RESTRICT="mirror"

DESCRIPTION="Chromium is the open-source project behind Google Chrome."
HOMEPAGE="http://code.google.com:80/chromium/"

LICENSE="GPL-2"
SLOT="live"

IUSE="sandbox"

DEPEND="
   >=dev-lang/python-2.4
   >=dev-lang/perl-5.0
   >=sys-devel/gcc-4.2
   >=sys-devel/bison-2.3
   >=sys-devel/flex-2.5.34
   >=dev-util/gperf-3.0.3
   >=dev-util/pkgconfig-0.20
   >=dev-libs/nss-3.12
   dev-libs/glib:2
   x11-libs/gtk+:2
   >=dev-libs/nspr-4.7.1
   media-fonts/corefonts
   >=dev-util/scons-1.2.0
   sandbox? >=sys-apps/sandbox-1.8
"
RDEPEND="${DEPEND}"

S="${S}/src"

pkg_setup() {
   use amd64 && die "No 64bit support at this time!"
}

src_prepare() {

   cd ${S}/src
   einfo "Updating file_version_info_linux.h"
   sed -i -e "s,svn info,svn info ${EGCLIENT_STORE_DIR}/${EGCLIENT_PROJECT}/src," \
      chrome/tools/build/linux/version.sh || die
   cd ${S}/src/base
   ../chrome/tools/build/linux/version.sh file_version_info_linux.h.version file_version_info_linux.h || die
   
   cd ${S}/src/build
   LDFLAGS="${LDFLAGS/-Wl,--as-needed/}"
   LDFLAGS="${LDFLAGS//  / }"
   LDFLAGS="${LDFLAGS% }"
   LDFLAGS="${LDFLAGS# }"
   einfo "Modyfying common.gypi with system C/LDFLAGS..."
      sed -i "/werror)',  # See note above about the werror/d" common.gypi
      sed -i -e "/cflags.: \[/{N;N;N;N;N;N;N;N;N;N}" \
      -e "s/.-march=.*Wall.,/'${CFLAGS// /\',\'}',/" \
      -e "s/\(ldflags.:.*\)\(^.*m32.,\)/\1\t\t'${LDFLAGS// /\',\'}',\n\2/" \
      common.gypi

   #cd ${S}/src/chrome/browser
   #epatch ${FILESDIR}/homepage.patch

   cd ${S}
   src/tools/gyp/gyp_dogfood src/build/all.gyp || die "gpy failed"

}

src_compile() {

   cd ${S}/src/chrome
   scons --mode=Release --site-dir=../site_scons ${MAKEOPTS} app || die "scons build failed"

}

src_install() {

   cd ${S}/src/sconsbuild/Release

   dodir /opt/${PN}
   dodir /opt/${PN}/locales
   dodir /opt/${PN}/themes

   insinto /opt/${PN}
   doins chrome.pak

   insinto /opt/${PN}/locales
   doins -r locales/*

   insinto /opt/${PN}/themes
   doins -r themes/*

   exeinto /opt/${PN}
   doexe chrome
   dosym /opt/${PN}/chrome /opt/bin/chrome   

   insinto /usr/share/applications
   doins ${FILESDIR}/${PN}.desktop

   insinto /usr/share/pixmaps
   doins ${S}/src/chrome/installer/linux/common/chromium-browser/chromium-browser.png

}


As one might notice, I've also commented out the lines responsible for modifying the default homepage. This is because I personally believe the default one is quite useful - and partly also because I just don't like such modifications taking place. But that's just my thoughts - anyone can decide on that for oneself.

EDIT:
Corrected the third sed line (had some leftovers) and added LDFLAGS filtering against "-Wl,--as-needed".

will investigate chromuim shortly. In the meantime this is not the proper way of filtering LDFLAGS.
You should use the flag-o-matic eclass (put flag-o-matic in the inherit line) and use
filter-ldflags -Wl,--as-needed
instead. Please look at the dev-manual section about it:
http://devmanual.gentoo.org/eclass-reference/flag-o-matic.eclass/index.html
There are a few more things that can improved using a few helper commands, I may look at it more deeply tonight.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Mon May 25, 2009 1:11 pm    Post subject: Reply with quote

fb wrote:

will investigate chromuim shortly. In the meantime this is not the proper way of filtering LDFLAGS.
You should use the flag-o-matic eclass (put flag-o-matic in the inherit line) and use
filter-ldflags -Wl,--as-needed
instead. Please look at the dev-manual section about it:
http://devmanual.gentoo.org/eclass-reference/flag-o-matic.eclass/index.html
There are a few more things that can improved using a few helper commands, I may look at it more deeply tonight.


The thing is... we are not filtering ldflags here. Chromium has p4 cflags hardcoded into the scons files and it does not use environment cflags (or ldflags for that matter) so you can use the flag-o-matic eclass till you are blue in the face, it wont help anything. The goal of that section of the ebuild is to gather the c/ldflags from the system and inject them into the scons build files. The BEST solution would be make a patch to the build system that uses env flags not the hard coded ones
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Tue May 26, 2009 1:56 am    Post subject: Reply with quote

rmh3093 wrote:
The thing is... we are not filtering ldflags here. Chromium has p4 cflags hardcoded into the scons files and it does not use environment cflags (or ldflags for that matter) so you can use the flag-o-matic eclass till you are blue in the face, it wont help anything. The goal of that section of the ebuild is to gather the c/ldflags from the system and inject them into the scons build files. The BEST solution would be make a patch to the build system that uses env flags not the hard coded ones

Yes an no I guess. Sure you have to insert the flags inside the scons files, but you insert the content
of the variable LDFLAGS, CFLAGS and so on. You know -Wl,--as-needed doesn't work so you
filter it from LDFLAGS before injecting it. The proper way to do the filtering is flag-o-matic, otherwise
you probably should declare a local variable and manipulate it as you wish.
Just to make sure I am uderstood, that bit (from the previous poster and which is not what you do in
your ebuild)
Code:
   LDFLAGS="${LDFLAGS/-Wl,--as-needed/}"
   LDFLAGS="${LDFLAGS//  / }"
   LDFLAGS="${LDFLAGS% }"
   LDFLAGS="${LDFLAGS# }"
   einfo "Modyfying common.gypi with system C/LDFLAGS..."
      sed -i "/werror)',  # See note above about the werror/d" common.gypi
      sed -i -e "/cflags.: \[/{N;N;N;N;N;N;N;N;N;N}" \
      -e "s/.-march=.*Wall.,/'${CFLAGS// /\',\'}',/" \
      -e "s/\(ldflags.:.*\)\(^.*m32.,\)/\1\t\t'${LDFLAGS// /\',\'}',\n\2/" \
      common.gypi
would probably be a bit more sane as
Code:
   filter-ldflags -Wl,--as-needed
   einfo "Modyfying common.gypi with system C/LDFLAGS..."
      sed -i "/werror)',  # See note above about the werror/d" common.gypi
      sed -i -e "/cflags.: \[/{N;N;N;N;N;N;N;N;N;N}" \
      -e "s/.-march=.*Wall.,/'${CFLAGS// /\',\'}',/" \
      -e "s/\(ldflags.:.*\)\(^.*m32.,\)/\1\t\t'${LDFLAGS// /\',\'}',\n\2/" \
      common.gypi
otherwise since you are using eutils, the following can be changed from
Code:
   insinto /usr/share/applications
   doins ${FILESDIR}/${PN}.desktop

   insinto /usr/share/pixmaps
   doins ${S}/src/chrome/installer/linux/common/chromium-browser/chromium-browser.png
to this
Code:
   newicon "${S}/src/chrome/installer/linux/common/chromium-browser/chromium-browser.png"
   make_desktop_entry "/opt/bin/chrome" "chromium-browser.png" "Network;WebBrowser;"

Just my opinion.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Tue May 26, 2009 3:14 am    Post subject: Reply with quote

fb wrote:
rmh3093 wrote:
The thing is... we are not filtering ldflags here. Chromium has p4 cflags hardcoded into the scons files and it does not use environment cflags (or ldflags for that matter) so you can use the flag-o-matic eclass till you are blue in the face, it wont help anything. The goal of that section of the ebuild is to gather the c/ldflags from the system and inject them into the scons build files. The BEST solution would be make a patch to the build system that uses env flags not the hard coded ones

Yes an no I guess. Sure you have to insert the flags inside the scons files, but you insert the content
of the variable LDFLAGS, CFLAGS and so on. You know -Wl,--as-needed doesn't work so you
filter it from LDFLAGS before injecting it. The proper way to do the filtering is flag-o-matic, otherwise
you probably should declare a local variable and manipulate it as you wish.
Just to make sure I am uderstood, that bit (from the previous poster and which is not what you do in
your ebuild)
Code:
   LDFLAGS="${LDFLAGS/-Wl,--as-needed/}"
   LDFLAGS="${LDFLAGS//  / }"
   LDFLAGS="${LDFLAGS% }"
   LDFLAGS="${LDFLAGS# }"
   einfo "Modyfying common.gypi with system C/LDFLAGS..."
      sed -i "/werror)',  # See note above about the werror/d" common.gypi
      sed -i -e "/cflags.: \[/{N;N;N;N;N;N;N;N;N;N}" \
      -e "s/.-march=.*Wall.,/'${CFLAGS// /\',\'}',/" \
      -e "s/\(ldflags.:.*\)\(^.*m32.,\)/\1\t\t'${LDFLAGS// /\',\'}',\n\2/" \
      common.gypi
would probably be a bit more sane as
Code:
   filter-ldflags -Wl,--as-needed
   einfo "Modyfying common.gypi with system C/LDFLAGS..."
      sed -i "/werror)',  # See note above about the werror/d" common.gypi
      sed -i -e "/cflags.: \[/{N;N;N;N;N;N;N;N;N;N}" \
      -e "s/.-march=.*Wall.,/'${CFLAGS// /\',\'}',/" \
      -e "s/\(ldflags.:.*\)\(^.*m32.,\)/\1\t\t'${LDFLAGS// /\',\'}',\n\2/" \
      common.gypi
otherwise since you are using eutils, the following can be changed from
Code:
   insinto /usr/share/applications
   doins ${FILESDIR}/${PN}.desktop

   insinto /usr/share/pixmaps
   doins ${S}/src/chrome/installer/linux/common/chromium-browser/chromium-browser.png
to this
Code:
   newicon "${S}/src/chrome/installer/linux/common/chromium-browser/chromium-browser.png"
   make_desktop_entry "/opt/bin/chrome" "chromium-browser.png" "Network;WebBrowser;"

Just my opinion.


thanks, I will merge these in tomorrow after my defense
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Tue May 26, 2009 10:23 am    Post subject: Reply with quote

rmh3093 wrote:
[snip]
thanks, I will merge these in tomorrow after my defense


good luck ! :)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Tue May 26, 2009 10:26 am    Post subject: Reply with quote

rmh3093 wrote:
thanks, I will merge these in tomorrow after my defense

Been there, done that (2002).
Good luck.
Back to top
View user's profile Send private message
.yankee
Apprentice
Apprentice


Joined: 24 Feb 2008
Posts: 194
Location: Polska

PostPosted: Tue May 26, 2009 4:17 pm    Post subject: Reply with quote

@fb:
Thanks for the lesson - I thought there must me some better way of filtering flags. My way was just a quick work-around from a n00b :wink:

rmh3093 wrote:
I will merge these in tomorrow after my defense


As my latest attempt at updating chromium shows, you'll have to deal with some changes in the sources as well. The one, at which my build stops right now is "Updating file_version_info_linux.h" -- the file chrome/tools/build/linux/version.sh is no longer there, seems to be replaced by a python version in placed chrome/tools/build - but that's more of a guess. You'd probably better backup the version.sh script before doing svn update to compare the two.
I noticed common.gypi being updated as well, but haven't investigated that - I hope the sed way will work the same.

And once more - good luck :!:
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Tue May 26, 2009 6:02 pm    Post subject: Reply with quote

.yankee wrote:
@fb:
Thanks for the lesson - I thought there must me some better way of filtering flags. My way was just a quick work-around from a n00b :wink:

rmh3093 wrote:
I will merge these in tomorrow after my defense


As my latest attempt at updating chromium shows, you'll have to deal with some changes in the sources as well. The one, at which my build stops right now is "Updating file_version_info_linux.h" -- the file chrome/tools/build/linux/version.sh is no longer there, seems to be replaced by a python version in placed chrome/tools/build - but that's more of a guess. You'd probably better backup the version.sh script before doing svn update to compare the two.
I noticed common.gypi being updated as well, but haven't investigated that - I hope the sed way will work the same.

And once more - good luck :!:


hmmm... I guess I will just have to get a real patch upstream for using env flags so that we dont have to keep seding.
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Tue May 26, 2009 6:12 pm    Post subject: Reply with quote

rmh3093 wrote:
.yankee wrote:
@fb:
Thanks for the lesson - I thought there must me some better way of filtering flags. My way was just a quick work-around from a n00b :wink:

rmh3093 wrote:
I will merge these in tomorrow after my defense


As my latest attempt at updating chromium shows, you'll have to deal with some changes in the sources as well. The one, at which my build stops right now is "Updating file_version_info_linux.h" -- the file chrome/tools/build/linux/version.sh is no longer there, seems to be replaced by a python version in placed chrome/tools/build - but that's more of a guess. You'd probably better backup the version.sh script before doing svn update to compare the two.
I noticed common.gypi being updated as well, but haven't investigated that - I hope the sed way will work the same.

And once more - good luck :!:


hmmm... I guess I will just have to get a real patch upstream for using env flags so that we dont have to keep seding.


file_version_info_linux.h should be created automatically now... so try commenting that section out.... if it does not work, there is a bug in the build system
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
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
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 3 of 8

 
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