Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 453348

Summary: dev-ada/zlib-ada-1.3 - a thick [Ada] binding to the popular compression/decompression library ZLib
Product: Gentoo Linux Reporter: silver_ghost
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: IN_PROGRESS ---    
Severity: enhancement CC: ada+disabled, silver_ghost
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://zlib-ada.sourceforge.net
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Initial ebuild, incomplete

Description silver_ghost 2013-01-21 14:50:40 UTC
There are no ebuild for zlib-ada in portage.
Comment 1 silver_ghost 2013-02-18 20:21:56 UTC
Created attachment 339298 [details]
Initial ebuild, incomplete

Which files and where should be copied in src_install?
Comment 2 George Shapovalov (RETIRED) gentoo-dev 2013-02-27 13:51:18 UTC
Dear Mikhail,

Thank you for your interest, and sorry for delayed response - I am a bit swamped in real life at the moment.

A few quick observations:
> Initial ebuild, incomplete
1. Your src_unpack is quite generic, you can skip it. Emerge, by default will do all these steps.
In fact, mkdir ${S} is never necessary - it is always autocreated. As well as cd ${S}. This leaves unpack ${A}, which is done automatically, if you skip the src_install.

2. gmanmake -P zlib
Are you sure this is not a misspelling of gnatmake?

> Which files and where should be copied in src_install?
Does the package provide any install script or make target? What do the docs say? Is there at least a readme?

I'll try to take a look at the package some time soon.
Meanwhile, you can get some practice/introduction by reading sample ebuilds in the tree and I would highly recomment devmanual:
http://devmanual.gentoo.org/

There are also particulars specific to gnat/Ada in gentoo. I have put up a page explaining the present organization of Ada packages and rationale behind it here:
http://www.gentoo.org/proj/en/prog_lang/ada/index.xml
(or search for "gentoo ada project").

I am afraid, I haven't quite finished it, but it should get you started. Let me know when you have gone through these materials and if you have questions.

Thanks again for your interest!

George
Comment 3 silver_ghost 2013-02-27 14:16:25 UTC
(In reply to comment #2)

>Are you sure this is not a misspelling of gnatmake?
Yes, I misspelled. It's gnatmake.

>Does the package provide any install script or make target? What do the docs say? Is there at least a readme?
It has .gpr file and instruction on how to compile library.

The problem is I don't know which of .ali, .abs, .o files should be copied and where.
Comment 4 George Shapovalov (RETIRED) gentoo-dev 2013-02-28 09:19:02 UTC
> >Does the package provide any install script or make target? What do the docs say? Is there at least a readme?
> It has .gpr file and instruction on how to compile library.
As is typical. Unfortunately, majority of Ada packages have no concept of package management. Devs expect users to simply put the whole dir in the corresponding paths or even copy some relevant files around.

> The problem is I don't know which of .ali, .abs, .o files should be copied
> and where.
Well, me neither, so there is a need for some detective work. Here is what I usually do in such situations.

1. Check readme of whatever sort, if available. Author could have mentioned what he considers an important library/interface files.

2. Does the build create any "target" dirs during compilation, even if internal?

3. Look for the intended interfaces - the .ads files that are supposed to be accessible. The matching .ali files should (normally) be installed alongside with the final library.

4. The .o files - it is best to avoid installing them at all. Since you have the project file, you can easily modify it to produce a final library. Best of all dynamic or both static and dynamic versions. Then you install the .so and, possibly, .a files, along with all the necessary .ali files to the lib dir. Ans all the .ads files to the interface dir.


Look at how I do it in some libs under dev-ada, e.g. aunit, booch_components, charles. The ebuild itsellf would, normally, contain general install logic (and would use gnat.eclass). To accomodate this I would usually modify the project file that comes with sources, so just unpack some of the packages and use that as a sample. Since most these libs are GPL or even public domain, you are explicitly allowed to do so.
Comment 5 George Shapovalov (RETIRED) gentoo-dev 2013-02-28 09:20:41 UTC
> To accomodate this I
> would usually modify the project file that comes with sources, so just
> unpack some of the packages and use that as a sample. 
O, and the resulting, modified sources you simply attach here, just as you do for ebuild (they are not going to be that big for this one). I will put the to the src space before committing the ebuild.