Contribute ebuilds

From ProAudioOverlay

(Difference between revisions)
Jump to: navigation, search
((whoops))
Line 1: Line 1:
-
对于红彤[http://www.100woman.cn 美容整形]也许大家还不太相信它的神奇,看看韩国好多整过形的美女演员出演的电视剧,整形前是多么地
 
-
 
-
难看,整形后判若两人,大家看到的都是他们[http://www.100woman.cn 整形]后的美丽容颜,那在中国的整形美容行业发展的怎么样呢?我们
 
-
 
-
现在来设想下,如果要是把网络红人“芙蓉姐姐”整形成香港明星李嘉欣,那么结果会怎么样呢?她们两个不同风格的人能整形出来什么效果
 
-
 
-
?芙蓉能整出李嘉欣的形象气质出来吗?
 
-
美容整形在国外一直是很热门的产业,许多面部有缺陷的女孩子经过整形以后能成为耀眼的明星。一些
 
-
 
-
[http://www.100woman.cn/zxxm/rfsx/c01.htm 胸部整形]过女星也能跟美国的艳星乔丹相媲美,演艺事业也蒸蒸日上,导演也亲睐她们,经常
 
-
 
-
给她们抛来橄榄枝。[http://www.100woman.cn/zxmr/10.htm 处女膜修复]手术,还你一个做纯洁女人的机会,
 
-
 
-
[http://www.100woman.cn/zxmr/01.htm 双眼皮手术] 手术,能给那些单眼皮女生一次跨越的机会,一下子跻身双眼皮行列,男生们好象比较
 
-
 
-
流行单眼皮,像Rain!割个双眼皮,轻松;做个双眼皮,方便;[http://www.100woman.cn 光子脱毛],快捷;
 
-
 
-
[http://www.100woman.cn/zxxm/qcyx.htm 清除腋臭],简单;去整形美容医院,给自己一次完美的机会,去雅靓看看,能给你一个意外的惊喜
 
-
 
-
 
-
[http://www.100woman.cn/zxmr/10.htm 处女膜修复]
 
-
[http://www.100woman.cn/zxmr/01.htm 双眼皮手术]
 
-
[http://www.100woman.cn/news/zxmr/20051226155422.htm 光子嫩肤]
 
-
[http://www.100woman.cn/zxxm/qcyx.htm 清除腋臭]
 
-
[http://www.100woman.cn/zxxm/rfsx/c01.htm 胸部整形]
 
==Writing ebuilds==
==Writing ebuilds==
So you want to contribute ebuilds. If you've no idea how to create proper ebuilds have a look at this gentoo guides:
So you want to contribute ebuilds. If you've no idea how to create proper ebuilds have a look at this gentoo guides:

Revision as of 16:19, 1 June 2008

Writing ebuilds

So you want to contribute ebuilds. If you've no idea how to create proper ebuilds have a look at this gentoo guides:

Instead of creating ebuilds from scratch you can first search here if there is already one:

Hints to fix common sandbox errors

If the FEATURE=sandbox is enabled in make.conf portage won't allow any operations outside it's sandbox
--> your system/usersfiles are protected from being destroyed/whatever


I'll show this on a example:

  • error message
 /bin/sh ../admin/mkinstalldirs /usr/share/texmf/tex/generic/kgtabs
 mkdir -p -- /usr/share/texmf/tex/generic/kgtabs
 ACCESS DENIED  mkdir:     /usr/share/texmf/tex/generic/kgtabs
 mkdir: cannot create directory `/usr/share/texmf/tex/generic/kgtabs': Permission denied
 make[2]: *** [install-kgtabs] error 1
 make[2]: Leaving directory `/var/tmp/portage/kguitar-0.5/work/kguitar-0.5/kguitar_shell'
 make[1]: *** [install-am] error 2
 make[1]: Leaving directory `/var/tmp/portage/kguitar-0.5/work/kguitar-0.5/kguitar_shell'
 make: *** [install-recursive] error 1

 !!! ERROR: media-sound/kguitar-0.5 failed.
 !!! Function kde_src_install, Line 301, Exitcode 2

the problem above is, that portage's sandbox only allow to write into
/var/tmp/portage/<your_package>/image/

Most packages provide a variable (often called DESTDIR or destdir). So you can point make/scons there

 src_install() {
 	make DESTDIR="${D}" install || die "install failed"
 }

But above this won't solve the issue because either the variable DESTDIR is not defined in the Makefiles or not consistent.

When I've such a package I try to find the cause of the problem in a Makefile[.in]
For above error I found a missing DESTDIR in the Makefile[.in]
in /var/tmp/portage/kguitar-0.5/work/kguitar-0.5/kguitar_shell
(--> this is the location the error above points to).
I removed this error with sed

  • patching with sed
 sed -i -e 's:\(\$(mkinstalldirs)\)\(.*\)\($(TEXMF)/tex/generic/kgtabs\):\1 $(DESTDIR)\3:' \
          -e 's:\(\$(INSTALL_DATA).*$(srcdir)/kgtabs.tex\ *\):\1 $(DESTDIR):' \
          kguitar_shell/Makefile.in
  • Description how sed works

The first line tells sed to find a line which is described between the first : and second :
\(...\) describes a regexp to which I refer with \1 in between the second : and third :
(--> The second line is just the same but for another regexp)

  • changes the above sed-oneliner did
 -$(mkinstalldirs) $(TEXMF)/tex/generic/kgtabs
 -$(INSTALL_DATA) $(srcdir)/kgtabs.tex $(TEXMF)/tex/generic/kgtabs/kgtabs.tex
 +$(mkinstalldirs) $(DESTDIR)$(TEXMF)/tex/generic/kgtabs
 +$(INSTALL_DATA) $(srcdir)/kgtabs.tex $(DESTDIR)$(TEXMF)/tex/generic/kgtabs/kgtabs.tex


So either you can use sed to adjust the Makefile or create a patch and ship it with the ebuild.
Patching files should happen if possible inside:

 src_unpack() {
 	unpack "${A}"
 	cd "${S}"
 	sed -i 's:foo:bar:g' file_to_patch
 	#or
 	epatch "${FILESDIR}"/yourpatch
 }

Always try to patch Makefile.in (or Makefile.am?) if it exists.
--> a Makefile is mostly generated from Makefile.in

  • alternative way

a easier way if no DESTDIR variable exist is just to change the prefix
prefix points per gentoo default to /usr this we change here:

 src_compile(){
 	econf --prefix="${D}"/usr || die "econf failed"
 	emake || die "emake failed"
 }

But sometimes this can give trouble if paths are hardcoded into binaries
So use with care.

Contributing ebuilds

The preferred way to get ebuilds or fixes included into the overlay is:

  • via the proaudio-mailing list Mailing_List
  • via email [evermind att tuxfamily dot org]
Personal tools