On Wed, 2012-09-05 at 10:57 +0200, Václav Zeman wrote:
> I would like to add log4cplus ([1], [2]) to Cygwin ports. I am
> attaching the current version of my .cygport file.

I'm not in a position to accept contributions to Ports at this time.  If
you have something that can use this library, then please feel free to
ITA it for the distro proper.

> I am not sure what to do about the Cygwin .hints files. Do they get
> automatically generated now?

They do, provided you define the necessary variables as described in the
cygport API documentation.

> Also, I am not sure what is appropriate for the DESCRIPTION variables
> in the .cygport file. Could you please suggest something? The
> description on the project's SourceForge site is this: "log4cplus is a
> simple to use C++ logging API providing thread-safe, flexible, and
> arbitrarily granular control over log management and configuration. It
> is modelled after the Java log4j API." Is this appropriate?

Sounds good to me.

>  Should it be the same for all of the 4 packages?

That's fine, in which case you need only define the DESCRIPTION
variable, which applies automatically to all subpackages (unless
overridden by a [PKG_]DESCRIPTION).

Review of your .cygport follows.

> DESCRIPTION="C++ logging API library modelled after log4j API"

This is a duplicate.

> fullversion="1.1.0"
> SRC_URI="mirror://sourceforge/log4cplus/log4cplus-stable/${fullversion}/log4cplus-${fullversion}-rc8.tar.xz"
> SRC_DIR="${PN}-${fullversion}-rc8"

This package should be named log4cplus-1.1.0-rc8-1.cygport, in which
case these lines can be replaced by:

SRC_URI="mirror://sourceforge/log4cplus/log4cplus-stable/${PV
%-rc*}/${P}.tar.xz"

> PKG_NAMES="lib${PN}4 lib${PN}-qt4debugappender4 lib${PN}-devel"

The DLLs are linked with both -release and -version-info flags, meaning
that 1.0 and 1.1 DLLs have different SONAMEs.  I also suggest separate
liblog4cplus-devel and liblog4cplusqt4debugappender-devel packages, as a
single -devel package will require both DLLs, which will pull in
libQtCore4.  Therefore, I would change this to:

PKG_NAMES="lib${PN}1.1_4 lib${PN}qt4debugappender1.1_4 lib${PN}-devel
lib${PN}qt4debugappender-devel"

> CATEGORY="Devel"

IMO this should be Libs, and if all subpackages are the same, you don't
need the individual [PKG_]CATEGORY.

> SUMMARY="log4cplus logging library (runtime)"

I'd drop the " (runtime)" here, then use ${SUMMARY} inside the
[PKG_]SUMMARY defines.

> DESCRIPTION="XXX"

This can be defined as mentioned above, and the individual
[PKG_]DESCRIPTION are superfluous.

> liblog4cplus4_CONTENTS="--exclude=*qt4* usr/bin/*.dll usr/share/"
> liblog4cplus_qt4debugappender4_CONTENTS="usr/bin/*log4cplusqt4*.dll"

Listing "usr/bin/*.dll" in [PKG_]CONTENTS is dangerous; if a future
release changes the SONAME, you may easily miss this and ship a package
which will break users' installations.

> liblog4cplus4_SUMMARY="log4cplus logging library (runtime)"

A matter of style:
liblog4cplus1_1_4_SUMMARY="${SUMMARY} (runtime)"

> liblog4cplus_devel_CONTENTS="usr/include/ usr/lib/"

liblog4cplus_devel_CONTENTS="--exclude=*qt4* usr/include/ usr/lib/"
liblog4cplusqt4debugappender_devel_CONTENTS="usr/include/${PN}/qt4*
usr/lib/lib${PN}qt4*"
 
> CYGCONF_ARGS="--enable-threads=yes --with-working-c-locale
> --with-gnu-ld"

You don't need --with-gnu-ld on Cygwin (or Linux for that matter).

Revised .cygport attached.


Yaakov

Attachment: log4cplus-1.1.0-rc8-1.cygport
Description: application/cygport

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Cygwin-ports-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cygwin-ports-general

Reply via email to