O HAI THIS BLOG PURPZIEZ 2 B UZED AZ MAH PLESIOUS MEM. :)

2008/07/04

InheritEclass(owb-svn, subversion, cmake-utils);

DoduoがOWBのtrunkにぶちこまれたので、以前からモニョっていたsvn live ebuildをoverlayに突っ込む犯行計画を実行する。x11-wm/awesomeがcmakeに移行したと言う噂を耳にしていたので、「cmakeをebuildで使うGentooishな方法は?」とmatsuuさんに訊いたら、「cmake-utils.eclassをつかえや、カス」(意味なく誇張)と仰られたのでそうすることにした。 :)
[Doduo went into trunk, so it's time to make an svn live ebuild to fsck upstream for ricing. I've heard that x11-wm/awesome now use cmake, so I asked "Is there any Gentooish way to use cmake in a ebuild?", matsuu answered "n00b, do inherit cmake-utils.eclass."]

が、svn repoをpullってきたトコで走らせていたブツは、
[Well, I used an lazy build script at my ppc lap in pulled svn repos looks like,]
#!/bin/sh
cmake \
-D BUILD_SHARED_LIBS="ON" \
-D CMAKE_COLOR_MAKEFILE="ON" \
-D CMAKE_VERBOSE_MAKEFILE="OFF" \
-D COMPILE_TESTS="ON" \
-D OWBAL_BENCH_LOAD_TIME="OFF" \
-D OWBAL_PLATFORM_MACPORT="OFF" \
-D OWBAL_PLATFORM_GRAPHICS="SDL" \
-D WEBKIT_DEBUG="RELEASE" \
-D WEBKIT_USE_CC_EXCEPTIONS="OFF" \
-D WEBKIT_USE_CC_PIC="ON" \
-D WEBKIT_USE_CC_RTTI="OFF" \
-D WEBKIT_OFFLINE_WEB_APPLICATIONS="ON" \
-D WEBKIT_USE_CROSS_DOCUMENT_MESSAGING="ON" \
-D WEBKIT_USE_DASHBOARD="ON" \
-D WEBKIT_USE_DATABASE="ON" \
-D WEBKIT_USE_DOM_STORAGE="ON" \
-D WEBKIT_USE_FILESYSTEM="POSIX" \
-D WEBKIT_USE_FONTS="FREETYPE" \
-D WEBKIT_USE_HTML5_VIDEO="OFF" \
-D WEBKIT_USE_I18N="ICU" \
-D WEBKIT_USE_NPAPI="OFF" \
-D WEBKIT_USE_SVG="ON" \
-D WEBKIT_USE_SYSTEMTIME="LINUX" \
-D WEBKIT_USE_THREADING="PTHREADS" \
../ \
&& make -k ;
で、cmake-utils.eclassはと言うと、
[OTOH, cmake-utils.eclass has these craps like,]
# @FUNCTION: cmake-utils_use_with
# @USAGE: [flag name]
# @DESCRIPTION:
# Based on use_with. See ebuild(5).
#
# `cmake-utils_use_with foo FOO` echoes -DWITH_FOO=ON if foo is enabled
# and -DWITH_FOO=OFF if it is disabled.
cmake-utils_use_with() { _use_me_now WITH "$@" ; }

# @FUNCTION: cmake-utils_use_enable
# @USAGE: [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_use_enable foo FOO` echoes -DENABLE_FOO=ON if foo is enabled
# and -DENABLE_FOO=OFF if it is disabled.
cmake-utils_use_enable() { _use_me_now ENABLE "$@" ; }

# @FUNCTION: cmake-utils_use_want
# @USAGE: [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_use_want foo FOO` echoes -DWANT_FOO=ON if foo is enabled
# and -DWANT_FOO=OFF if it is disabled.
cmake-utils_use_want() { _use_me_now WANT "$@" ; }

# @FUNCTION: cmake-utils_has
# @USAGE: [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
# and -DHAVE_FOO=OFF if it is disabled.
cmake-utils_has() { _use_me_now HAVE "$@" ; }
なので、「cmake-utils.eclass、つかえねー」とほざいた所、「OWBのオプションがタコなんだよ、カス」(意味なく誇張)とmatsuuさんが宣われたので、upstream devを#owb@freenode.netで叩く事にした。 :)
[So I'd have to say "OMGWTF, cmake-utils.eclass suck0rz!!1", then matsuu sez "It's OWB's cmake opts' faults. Fix0r ASAP!!1". So I'd have to smack t3h upstream devs at #owb.]
07/04 01:12:12 hiyuh
devs, I'm now poking own-svn ebuild to migrate w/ cmake-utils.eclass
on my gentoo.
07/04 01:12:33 hiyuh
but owb's cmake options has inconsistencies WRT thier name, it's
pain to me.
07/04 01:12:41 hiyuh
even if I migrate the ebuild w/ cmake-utils.eclass, it can't get
any benefit from USE flags.
07/04 01:12:46 hiyuh
b/c the eclass can handle -D{WITH,ENABLE,WANT,HAVE}_*, ATM.
07/04 01:13:08 hiyuh
owb doesn't use any -D{WITH,ENABLE,WANT,HAVE}_*.
07/04 01:13:38 hiyuh
is there any plan to clean up cmake options' name?
07/04 01:22:03 [Oliv]
If that's usefull to use cmake-utils eclass facilities... YES !!!
07/04 01:23:40 hiyuh
[Oliv]: then how can I purge owb's cmake opts to be cmake-utils.eclass
friendly? :)
07/04 01:24:58 [Oliv]
Well I think that I should first have a look at cmake-utils to have
a more precise idea of what must be done
07/04 01:28:12 hiyuh
k, so first of all, we need t3h ticket to consider? :)
07/04 01:28:51 [Oliv]
either we use the ticket related to cmake clean or we can create a
new one
07/04 01:30:10 hiyuh
oic, then I'll check the ticket for cmake clean.
07/04 01:30:29 [Oliv]
I had a look at cmake-utils eclass... and the major problem will be
to remove non boolean options :S
07/04 01:31:46 hiyuh
#210?
07/04 01:32:01 [Oliv]
yes... but in fact no
07/04 01:32:13 [Oliv]
I think that creating a new one is better
07/04 01:32:30 hiyuh
k
07/04 01:35:01 [Oliv]
things that will be easy to modify are option like WEBKIT_DEBUG
07/04 01:35:25 [Oliv]
which should become something like ENABLE_DEBUG
07/04 01:36:28 [Oliv]
'cause I had a feedback today about DEBUG_GCC3.X which is now
probably useless...
07/04 01:37:00 [Oliv]
compilation seems ok without it if you use a gcc-3.x
07/04 01:37:53 [Oliv]
the annoying part will probably be: OWBAL_PLATFORM_GRAPHICS
07/04 01:43:22 hiyuh
separate WITH_OWBAL_PLATFORM_GRAPHICS_GTK=[ON or OFF] and
WITH_OWBAL_PLATFORM_GRAPHICS_SDL=[ON or OFF], and enable the one
upstream prefered by default. if both ones are ON, build both
ones (or, only latter's like unixy command opt?)
07/04 01:45:48 [Oliv]
Well I think that if you compile both, you will get some "redefined"
symbols
07/04 01:46:24 [Oliv]
I think that in this case we have to use CMAKE_DEPENDENT_OPTION
07/04 01:46:57 [Oliv]
it is easy to manage if you only have 2 possibilities in graphics
07/04 01:47:21 [Oliv]
but it is planned to integrate amiga os implementation in owb
07/04 01:47:37 hiyuh
zomg, amiga :DDD
07/04 01:47:39 [Oliv]
so it will do a third possibility for graphics
07/04 01:52:07 [Oliv]
I will have to do some tests to know if it is easy to manage such
a case
つーことで、取り合えず、ticket #254を作っておいた。つづく、多分。 :P
[So, ticket #254 was issued by me. ASSIGNED WORKINPROGRESS(tm), prolly. :P]

0 件のコメント: