diff options
Diffstat (limited to 'apt-inst')
-rw-r--r-- | apt-inst/CMakeLists.txt | 5 | ||||
-rw-r--r-- | apt-inst/apt-inst.pc.in | 9 | ||||
-rw-r--r-- | apt-inst/contrib/arfile.h | 2 | ||||
-rw-r--r-- | apt-inst/contrib/extracttar.cc | 4 | ||||
-rw-r--r-- | apt-inst/contrib/extracttar.h | 1 | ||||
-rw-r--r-- | apt-inst/deb/debfile.h | 4 | ||||
-rw-r--r-- | apt-inst/filelist.h | 4 |
7 files changed, 18 insertions, 11 deletions
diff --git a/apt-inst/CMakeLists.txt b/apt-inst/CMakeLists.txt index 31da115e4..e4e91e493 100644 --- a/apt-inst/CMakeLists.txt +++ b/apt-inst/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories(${PROJECT_BINARY_DIR}/include/apt-pkg) # Set the version of the library -set(MAJOR 2.0) +set(MAJOR 3.0) set(MINOR 0) set(APT_INST_MAJOR ${MAJOR} PARENT_SCOPE) @@ -12,6 +12,8 @@ set(APT_INST_MAJOR ${MAJOR} PARENT_SCOPE) file(GLOB_RECURSE library "*.cc") file(GLOB_RECURSE headers "*.h") +configure_file(apt-inst.pc.in ${CMAKE_CURRENT_BINARY_DIR}/apt-inst.pc @ONLY) + # Create a library using the C++ files add_library(apt-inst SHARED ${library}) @@ -25,4 +27,5 @@ add_version_script(apt-inst) # Install the library and the headers install(TARGETS apt-inst LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES ${headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/apt-pkg) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-inst.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) flatify(${PROJECT_BINARY_DIR}/include/apt-pkg/ "${headers}") diff --git a/apt-inst/apt-inst.pc.in b/apt-inst/apt-inst.pc.in new file mode 100644 index 000000000..1d61a202f --- /dev/null +++ b/apt-inst/apt-inst.pc.in @@ -0,0 +1,9 @@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: apt-inst +Description: deb package format runtime library +Version: @PROJECT_VERSION@ +Libs: -L${libdir} -lapt-inst +Cflags: -I${includedir} +Requires: apt-pkg diff --git a/apt-inst/contrib/arfile.h b/apt-inst/contrib/arfile.h index 8124208c9..cf454941e 100644 --- a/apt-inst/contrib/arfile.h +++ b/apt-inst/contrib/arfile.h @@ -44,7 +44,7 @@ class ARArchive const Member *FindMember(const char *Name) const; inline Member *Members() { return List; } - ARArchive(FileFd &File); + explicit ARArchive(FileFd &File); ~ARArchive(); }; diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 42032ad13..9bb0a55c0 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -76,10 +76,6 @@ ExtractTar::~ExtractTar() } /*}}}*/ // ExtractTar::Done - Reap the gzip sub process /*{{{*/ -bool ExtractTar::Done(bool) -{ - return Done(); -} bool ExtractTar::Done() { return InFd.Close(); diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h index c0b340e89..adde21352 100644 --- a/apt-inst/contrib/extracttar.h +++ b/apt-inst/contrib/extracttar.h @@ -48,7 +48,6 @@ class ExtractTar // Fork and reap gzip bool StartGzip(); bool Done(); - APT_DEPRECATED_MSG("Parameter Force is ignored, use Done() instead.") bool Done(bool Force); public: diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h index 23a76bfdf..21c59a567 100644 --- a/apt-inst/deb/debfile.h +++ b/apt-inst/deb/debfile.h @@ -56,7 +56,7 @@ class debDebFile const ARArchive::Member *GotoMember(const char *Name); inline FileFd &GetFile() {return File;}; - debDebFile(FileFd &File); + explicit debDebFile(FileFd &File); }; class debDebFile::ControlExtract : public pkgDirStream @@ -87,7 +87,7 @@ class debDebFile::MemControlExtract : public pkgDirStream bool TakeControl(const void *Data,unsigned long long Size); MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {}; - MemControlExtract(std::string Member) : IsControl(false), Control(0), Length(0), Member(Member) {}; + explicit MemControlExtract(std::string Member) : IsControl(false), Control(0), Length(0), Member(Member) {}; ~MemControlExtract() {delete [] Control;}; }; /*}}}*/ diff --git a/apt-inst/filelist.h b/apt-inst/filelist.h index 7fe43de63..c5f103d87 100644 --- a/apt-inst/filelist.h +++ b/apt-inst/filelist.h @@ -97,7 +97,7 @@ class pkgFLCache bool AddConfFile(const char *Name,const char *NameEnd, PkgIterator const &Owner,const unsigned char *Sum); - pkgFLCache(DynamicMMap &Map); + explicit pkgFLCache(DynamicMMap &Map); // ~pkgFLCache(); }; @@ -288,7 +288,7 @@ class pkgFLCache::NodeIterator Package *RealPackage() const; NodeIterator() : Nde(0), Type(NdeHash), Owner(0) {}; - NodeIterator(pkgFLCache &Owner) : Nde(Owner.NodeP), Type(NdeHash), Owner(&Owner) {} + explicit NodeIterator(pkgFLCache &Owner) : Nde(Owner.NodeP), Type(NdeHash), Owner(&Owner) {} NodeIterator(pkgFLCache &Owner,Node *Trg) : Nde(Trg), Type(NdeHash), Owner(&Owner) {} NodeIterator(pkgFLCache &Owner,Node *Trg,Package *) : Nde(Trg), Type(NdePkg), Owner(&Owner) {} }; |