Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 380779 - latexila-2.2.2.ebuild (New Package) - An Integrated LaTeX Environment for GNOME
Summary: latexila-2.2.2.ebuild (New Package) - An Integrated LaTeX Environment for GNOME
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://projects.gnome.org/latexila/
Whiteboard:
Keywords:
: 348603 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-26 20:44 UTC by Sébastien Wilmet
Modified: 2011-12-22 08:58 UTC (History)
1 user (show)

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


Attachments
ebuild 2.2.0 v1 (latexila-2.2.0.ebuild,1.86 KB, text/plain)
2011-08-26 20:44 UTC, Sébastien Wilmet
Details
The metadata (metadata.xml,273 bytes, text/plain)
2011-08-26 20:45 UTC, Sébastien Wilmet
Details
ebuild 2.2.1 (latexila-2.2.1.ebuild,1.86 KB, patch)
2011-09-17 10:19 UTC, Sébastien Wilmet
Details | Diff
ebuild 2.2.2 (latexila-2.2.2.ebuild,1.85 KB, text/plain)
2011-10-30 17:55 UTC, Sébastien Wilmet
Details
New ebuild version (latexila-2.2.2.ebuild,1.26 KB, text/plain)
2011-12-10 00:36 UTC, Sébastien Wilmet
Details
The metadata (metadata.xml,451 bytes, text/plain)
2011-12-10 00:37 UTC, Sébastien Wilmet
Details
ebuild 2.2.2 v3 (latexila-2.2.2.ebuild,1.44 KB, text/plain)
2011-12-11 22:48 UTC, Sébastien Wilmet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Wilmet 2011-08-26 20:44:13 UTC
Created attachment 284747 [details]
ebuild 2.2.0 v1

Hello,

I'm the main developer of LaTeXila, an Integrated LaTeX Environment for GNOME, written in Vala.

I attach the ebuild for the 2.2.0 version.

This ebuild depends on ITS Tool, which is packaged in the GNOME overlay:

http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=tree;f=dev-util/itstool;h=44d4d95a4793476300c503bae08d5dc2cb440deb;hb=HEAD

I think the best category is "app-editors", since Kile is also there. But Texmaker is in "app-office".

Best regards,
Sébastien
Comment 1 Sébastien Wilmet 2011-08-26 20:45:45 UTC
Created attachment 284749 [details]
The metadata
Comment 2 Sébastien Wilmet 2011-08-28 16:21:36 UTC
Some notes:

"-rf" is useless in the line (in src_prepare()):
rm -rf src/C/*.c

It's possible to compile LaTeXila directly from the C code generated, but I think it's better to compile from Vala files.

Another thing, in the pkg_postinst() function, there is a message to inform the user that Latexmk or Rubber is useful with LaTeXila. I hesitated to create two more USE flags: "latexmk" and "rubber", with dependencies to the corresponding packages. But there is no compilation options to specify if latexmk or rubber should be activated. If latexmk is installed afterwards, or if it is unmerged, it doesn't change anything for latexila. That's why I finally choose the log message.
Comment 3 Sébastien Wilmet 2011-09-17 10:19:03 UTC
Created attachment 286767 [details, diff]
ebuild 2.2.1

With this new minor version, latexila calls "valac-0.12" directly for the compilation, instead of "valac".

So there is no need to set an environment variable, or use eselect-vala and the vala eclass from the vala overlay.

But ITS Tool is still missing.
Comment 4 Sébastien Wilmet 2011-10-30 17:55:29 UTC
Created attachment 291255 [details]
ebuild 2.2.2

Update for the 2.2.2 bugs-fixes release.

And dev-util/itstool is now in Portage.

Can someone review my ebuild?
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-12-09 22:04:25 UTC
Ebuild review:

> I think the best category is "app-editors", since Kile is also there. But
> Texmaker is in "app-office".

For some reason, TeX editors are scattered all over the portage tree :) There is kile in app-editors, lyx in app-office, and kbibtex in app-text. But sure, app-editors sounds reasonable.

> inherit gnome.org gnome2-utils cmake-utils fdo-mime

Why not simply "inherit cmake-utils gnome2"? That way you will not need to write pkg_preinst, pkg_postinst, and pkg_postm boilerplate, and will not need to update it if additional boilerplate becomes necessary in the future.

> local lang=$(basename ${po_file} .po)
> 
> if ! has ${lang} ${LINGUAS}; then
>	rm ${po_file}
> fi

If the user has LINGUAS="zh", then zh_CN.po will be deleted, and the user will not get the Chinese translation that he expects.

> # Build from Vala sources
> rm src/C/*.c

All other vala-based packages in portage that ship pre-generated C code will build from C by default (unless USE=vala). Is there a technical reason why you always want to build from vala?

> Another thing, in the pkg_postinst() function, there is a message to inform the
> user that Latexmk or Rubber is useful with LaTeXila. I hesitated to create two
> more USE flags: "latexmk" and "rubber", with dependencies to the corresponding
> packages. But there is no compilation options to specify if latexmk or rubber
> should be activated. If latexmk is installed afterwards, or if it is unmerged,
> it doesn't change anything for latexila. That's why I finally choose the log
> message.

This is a matter of taste. IMHO, adding a default-enabled USE flag at least for latexmk (which I assume is the default latex build tool that latexila uses) would be a bit more user-friendly, especially since latexmk is a very light package.
Comment 6 Sébastien Wilmet 2011-12-10 00:36:15 UTC
Created attachment 295327 [details]
New ebuild version

> Why not simply "inherit cmake-utils gnome2"?

It's indeed simpler. I didn't use the gnome2 eclass because latexila doesn't use the autotools but cmake. But for the functions pkg_preinst, pkg_postinst, and pkg_postrm, it's almost identical.

> If the user has LINGUAS="zh", then zh_CN.po will be deleted

Fixed.

> All other vala-based packages in portage that ship pre-generated C code will
> build from C by default (unless USE=vala). Is there a technical reason why you
> always want to build from vala?

Fedora for example prefer to build from Vala sources, because they don't like already generated stuff. But since it's OK to build from the C code, I've simplified the ebuild.

> IMHO, adding a default-enabled USE flag at least for
> latexmk (which I assume is the default latex build tool that latexila uses)
> would be a bit more user-friendly

I prefer like that too. Done.
Comment 7 Sébastien Wilmet 2011-12-10 00:37:44 UTC
Created attachment 295329 [details]
The metadata

Add the two new USE flags descriptions: latexmk and rubber.
Comment 8 Sébastien Wilmet 2011-12-10 13:10:10 UTC
(In reply to comment #6)
> > If the user has LINGUAS="zh", then zh_CN.po will be deleted
> 
> Fixed.

Wait, I think it's not completely fixed. If the LINGUAS contains zh_CN, but not zh, then zh_CN.po will be deleted.
Comment 9 Sébastien Wilmet 2011-12-11 22:48:25 UTC
Created attachment 295503 [details]
ebuild 2.2.2 v3

Fix the remove of useless *.po. The LINGUAS variable is simplified to keep only the two first letters for each language. Idem for the *.po.

It's not a perfect solution, but the code is quite simple, and it's better to keep a little too much than removing useful PO files.

Anyway, thanks for your review, Alexandre.
Comment 10 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-12-17 09:08:04 UTC
(In reply to comment #5)
> If the user has LINGUAS="zh", then zh_CN.po will be deleted, and the user will
> not get the Chinese translation that he expects.

I was wrong about this, and I apologize for misleading you. Intltool uses exact language name matches, e.g. LINGUAS="zh" should only match zh, not zh_CN (check /usr/share/intltool/Makefile.in.in if you are interested), so that's the behavior that we want to duplicate. Also, an unset LINGUAS means that all translations need to be installed.

Ebuild committed with the following changes:
* tested on ~amd64 and ~x86;
* CMAKE_IN_SOURCE_BUILD="yes" (needed for gnome2.eclass compatibility);
* GCONF_DEBUG="no" (to avoid spurious debug USE flag);
* added a few missing dependencies (e.g. libX11, pango, gdk-pixbuf);
* change LINGUAS handling to match intltool behavior;
* do not install INSTALL file (Gentoo end users do not need it);
* stylistic fixes.

>*latexila-2.2.2 (17 Dec 2011)
> 
>  17 Dec 2011; Alexandre Rostovtsev <tetromino@gentoo.org>
>  +latexila-2.2.2.ebuild, +metadata.xml:
>  New ebuild for a LaTeX IDE for bug #380779, thanks to Sébastien Wilmet.
Comment 11 Sébastien Wilmet 2011-12-17 10:00:26 UTC
Thank you!
Comment 12 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-12-22 08:58:13 UTC
*** Bug 348603 has been marked as a duplicate of this bug. ***