Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 533006 - www-client/uzbl-9999 - ENABLE_GTK expects yes/no not 1/0
Summary: www-client/uzbl-9999 - ENABLE_GTK expects yes/no not 1/0
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: tharvik
URL:
Whiteboard:
Keywords: PATCH
: 533148 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-19 08:30 UTC by Franz Trischberger
Modified: 2016-02-09 12:27 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
uzbl-2012.05.14_gtk3_no_autodep.patch (uzbl-2012.05.14_gtk3_no_autodep.patch,522 bytes, patch)
2014-12-20 19:26 UTC, Franz Trischberger
Details | Diff
uzbl-9999.ebuild (with dev-python/six) (uzbl-9999.ebuild,3.36 KB, text/plain)
2015-03-27 07:51 UTC, tharvik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Trischberger 2014-12-19 08:30:54 UTC
I already mentioned this issue in https://bugs.gentoo.org/show_bug.cgi?id=506006#c6 (and possibly in other bugs):
ENABLE_GTK3 takes yes/no instead of 1/0. I did not notice that this change was missed because I used my own ebuild.



--- uzbl-9999.ebuild.org        2014-12-19 09:28:07.631513998 +0100
+++ uzbl-9999.ebuild    2014-12-19 09:28:43.076511606 +0100
@@ -126,7 +126,7 @@
 
 src_compile() {
        [[ ${PV} == 9999 ]] && gtk_var='ENABLE_GTK3' || gtk_var='USE_GTK3'
-       emake PREFIX="${PREFIX}" ${gtk_var}=$(use gtk3 && echo 1 || echo 0)
+       emake PREFIX="${PREFIX}" ${gtk_var}=$(use gtk3 && echo yes || echo no)
 }
 
 src_install() {
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-19 14:09:59 UTC
(In reply to Franz Fellner from comment #0)
> +       emake PREFIX="${PREFIX}" ${gtk_var}=$(use gtk3 && echo yes || echo

Or use the newfangled $(usex gtk3 yes no '' '')
Comment 2 Franz Trischberger 2014-12-20 11:16:17 UTC
(In reply to Jeroen Roovers from comment #1)
> (In reply to Franz Fellner from comment #0)
> > +       emake PREFIX="${PREFIX}" ${gtk_var}=$(use gtk3 && echo yes || echo
> 
> Or use the newfangled $(usex gtk3 yes no '' '')

Probably, yes.
But it would still require extra code for the non-live-ebuild, as they expect "1/0". IMHO the best solution would be to simply patch the non-live-sources to use ENABLE_GTK3, make it optional and use yes/no. Should be straight forward.

If this package still has a maintainer and he will accept such a patch I will create it. Otherwise I will (have to) use my own ebuild, again.
Comment 3 tharvik 2014-12-20 16:21:40 UTC
There is still a maintainer (a proxy-maintainer as a matter of fact). Please attach your patch, I'll apply it.
Comment 4 Franz Trischberger 2014-12-20 19:26:56 UTC
Created attachment 392106 [details, diff]
uzbl-2012.05.14_gtk3_no_autodep.patch

--- uzbl-2012.05.14-r1.ebuild.org       2014-12-20 19:46:37.059945813 +0100
+++ uzbl-2012.05.14-r1.ebuild   2014-12-20 20:09:31.079853087 +0100
@@ -97,14 +97,15 @@
 }
 
 src_prepare() {
+       if [ ${PV} != 9999 ]
+       then 
+               epatch "${FILESDIR}/${P}_gtk3_no_autodep.patch"
+       fi
+
        # remove -ggdb
        sed -i 's/-ggdb //g' Makefile ||
                die '-ggdb removal sed failed'
 
-       # make gtk3 configurable
-       sed -r 's:^(USE_GTK3) = (.*):\1?=\2:' -i Makefile ||
-               die 'Makefile sed for gtk3 failed'
-
        # specify python version
        python_fix_shebang bin/uzbl-tabbed ||
                die 'Fix shebang failed'
@@ -125,8 +126,7 @@
 }
 
 src_compile() {
-       [[ ${PV} == 9999 ]] && gtk_var='ENABLE_GTK3' || gtk_var='USE_GTK3'
-       emake PREFIX="${PREFIX}" ${gtk_var}=$(use gtk3 && echo 1 || echo 0)
+       emake PREFIX="${PREFIX}" ENABLE_GTK3=$(usex gtk3 yes no '' '')
 }
 
 src_install() {



===

I tested both 2012.05.14-r1 and 9999 with gtk3 enabled and disabled. Patch applies only to non-live, USE="-gtk3" emerge --nodeps fails - which is what I expect as I don't have webkit-gtk:2 installed - my laptop simply doesn't have the power to emerge yet another webkit just for fun/testing ;)
USE="gtk3" compiles fine.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-21 11:17:44 UTC
*** Bug 533148 has been marked as a duplicate of this bug. ***
Comment 6 Andrew Savchenko gentoo-dev 2015-03-26 21:14:51 UTC
*** Bug 533148 has been marked as a duplicate of this bug. ***
Comment 7 tharvik 2015-03-27 07:51:45 UTC
Created attachment 399848 [details]
uzbl-9999.ebuild (with dev-python/six)

New version of the ebuild.
Changelog:
 - fix bug 533006 (thanks to Franz Fellner)
 - remove -j1 in install as upstream fixed 351
 - add dev-python/six in RDEPEND, as it fail with the latest release

Same ebuild for both 9999 and 2012.05.14-r1.
Comment 8 Ian Delaney (RETIRED) gentoo-dev 2015-03-30 14:17:40 UTC
It took
real	132m10.817s
to emerge net-libs/webkit-gtk-2.4.8-r200::gentoo but it was all worth it for it took and all of 
real	0m4.437s
to build uzbl-2012.05.14-r2.ebuild.  Unless someone has any doubt or reason not to, the ebuild and patch appear good to commit.
Comment 9 tharvik 2016-02-09 12:27:55 UTC
uzbl is out of tree now.