cygport 0.17.0: Incorrect 'requires' line in setup.hint

David Stacey drstacey@tiscali.co.uk
Thu Sep 25 20:06:00 GMT 2014


I am trying to package tinyxml2, to be used by cppcheck. I have split 
the package into a library package called 'libtinyxml2-2', and a devel 
package 'libtinyxml2-devel'. However, when I run cygport to generate the 
packages, the setup.hint file for the devel package claims that it is 
dependent on 'libtinyxml2' (note the missing '-2' at the end).

I've obviously done something wrong in either my package naming or in 
the cygport file itself - please could you advise. I am running 
cygport-0.17.0 in x86 Cygwin.

Many thanks in advance,

Dave.

-------------- next part --------------
# tinyxml2.cygport
NAME="tinyxml2"
VERSION=2.1.0
RELEASE=1
SUMMARY="Simple, small and efficient C++ XML parser."
DESCRIPTION="TinyXML-2 is a simple, small, efficient, C++ XML parser that can be easily integrated into other programs. It uses a Document Object Model (DOM), meaning the XML data is parsed into a C++ objects that can be browsed and manipulated, and then written to disk or another output stream.
TinyXML-2 doesn't parse or use DTDs (Document Type Definitions) nor XSLs (eXtensible Stylesheet Language).
TinyXML-2 uses a similar API to TinyXML-1, But the implementation of the parser was completely re-written to make it more appropriate for use in a game. It uses less memory, is faster, and uses far fewer memory allocations."
CATEGORY="Devel"

HOMEPAGE="http://www.grinninglizard.com/tinyxml2/"
GIT_URI="https://github.com/leethomason/tinyxml2"
GIT_TAG="${VERSION}"
inherit git
inherit cmake


#############################################################################
# Determine the tinyxml2 library version. This is contained in a file called
# 'CMakeLists.txt' - but we might not have downloaded those yet. So get the
# library version number direct from github.
LIBRARY_VERSION=$(wget --quiet --no-check-certificate --output-document=- https://raw.githubusercontent.com/leethomason/tinyxml2/${VERSION}/CMakeLists.txt | grep "GENERIC_LIB_SOVERSION" | grep "set" | head -n 1 | cut -d '"' -f 2)
#############################################################################


#############################################################################
# This cygport file produces two packages: the main 'libtinyxml2' package
# that contains the files necessary to run applications built with tinyxml2;
# and 'libtinyxml2-devel', which contains header files and libs required to
# build applications that use tinyxml2.
PKG_NAMES="libtinyxml2-${LIBRARY_VERSION} libtinyxml2-devel"
#############################################################################


#############################################################################
# Details for the 'libtinyxml2' package.
declare libtinyxml2_${LIBRARY_VERSION}_SUMMARY="${SUMMARY}"
declare libtinyxml2_${LIBRARY_VERSION}_DESCRIPTION="${DESCRIPTION}"
declare libtinyxml2_${LIBRARY_VERSION}_CONTENTS="usr/bin usr/share"
declare libtinyxml2_${LIBRARY_VERSION}_CATEGORY="Devel"
#############################################################################


#############################################################################
# Details for the 'libtinyxml2-devel' package.
libtinyxml2_devel_SUMMARY="Development files for tinyxml2."
libtinyxml2_devel_DESCRIPTION="This package contains the libraries and header files that are needed for writing applications with the tinyxml2 library."
libtinyxml2_devel_CONTENTS="usr/include usr/lib"
libtinyxml2_devel_CATEGORY="Devel"
#############################################################################


#############################################################################
# Disable the generation of a static library and package only the dynamically
# linked version of tinyxml2. If doing this, we have to define our own
# install rule to ensure that the lib file gets installed.
CYGCMAKE_ARGS="-DBUILD_STATIC_LIBS=OFF"
src_install() {
	cd ${B}
	cyginstall
	dolib *.dll.a
}
#############################################################################


src_test() {
	cd ${B}
	./test
}


More information about the Cygwin-apps mailing list